diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h new file mode 100644 index 0000000000000000000000000000000000000000..dfbd09befae13448fae876f297f3ab32b7e27954 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h @@ -0,0 +1,108 @@ +/* + * Summary: main header file + * + * Copy: See Copyright for the status of this software. + */ + + +#ifndef __EXSLT_H__ +#define __EXSLT_H__ + +#include +#include +#include "exsltexports.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXSLTPUBVAR const char *exsltLibraryVersion; +EXSLTPUBVAR const int exsltLibexsltVersion; +EXSLTPUBVAR const int exsltLibxsltVersion; +EXSLTPUBVAR const int exsltLibxmlVersion; + +/** + * EXSLT_COMMON_NAMESPACE: + * + * Namespace for EXSLT common functions + */ +#define EXSLT_COMMON_NAMESPACE ((const xmlChar *) "http://exslt.org/common") +/** + * EXSLT_CRYPTO_NAMESPACE: + * + * Namespace for EXSLT crypto functions + */ +#define EXSLT_CRYPTO_NAMESPACE ((const xmlChar *) "http://exslt.org/crypto") +/** + * EXSLT_MATH_NAMESPACE: + * + * Namespace for EXSLT math functions + */ +#define EXSLT_MATH_NAMESPACE ((const xmlChar *) "http://exslt.org/math") +/** + * EXSLT_SETS_NAMESPACE: + * + * Namespace for EXSLT set functions + */ +#define EXSLT_SETS_NAMESPACE ((const xmlChar *) "http://exslt.org/sets") +/** + * EXSLT_FUNCTIONS_NAMESPACE: + * + * Namespace for EXSLT functions extension functions + */ +#define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *) "http://exslt.org/functions") +/** + * EXSLT_STRINGS_NAMESPACE: + * + * Namespace for EXSLT strings functions + */ +#define EXSLT_STRINGS_NAMESPACE ((const xmlChar *) "http://exslt.org/strings") +/** + * EXSLT_DATE_NAMESPACE: + * + * Namespace for EXSLT date functions + */ +#define EXSLT_DATE_NAMESPACE ((const xmlChar *) "http://exslt.org/dates-and-times") +/** + * EXSLT_DYNAMIC_NAMESPACE: + * + * Namespace for EXSLT dynamic functions + */ +#define EXSLT_DYNAMIC_NAMESPACE ((const xmlChar *) "http://exslt.org/dynamic") + +/** + * SAXON_NAMESPACE: + * + * Namespace for SAXON extensions functions + */ +#define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon") + +EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void); +#ifdef EXSLT_CRYPTO_ENABLED +EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void); +#endif +EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltStrRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltDateRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltSaxonRegister (void); +EXSLTPUBFUN void EXSLTCALL exsltDynRegister(void); + +EXSLTPUBFUN void EXSLTCALL exsltRegisterAll (void); + +EXSLTPUBFUN int EXSLTCALL exsltDateXpathCtxtRegister (xmlXPathContextPtr ctxt, + const xmlChar *prefix); +EXSLTPUBFUN int EXSLTCALL exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt, + const xmlChar *prefix); +EXSLTPUBFUN int EXSLTCALL exsltSetsXpathCtxtRegister (xmlXPathContextPtr ctxt, + const xmlChar *prefix); +EXSLTPUBFUN int EXSLTCALL exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt, + const xmlChar *prefix); + +#ifdef __cplusplus +} +#endif +#endif /* __EXSLT_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..10e43b0f5dcc517999fea0265ea71724eaa5a60a --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h @@ -0,0 +1,70 @@ +/* + * exsltconfig.h: compile-time version information for the EXSLT library + * + * See Copyright for the status of this software. + * + * daniel@veillard.com + */ + +#ifndef __XML_EXSLTCONFIG_H__ +#define __XML_EXSLTCONFIG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * LIBEXSLT_DOTTED_VERSION: + * + * the version string like "1.2.3" + */ +#define LIBEXSLT_DOTTED_VERSION "0.8.24" + +/** + * LIBEXSLT_VERSION: + * + * the version number: 1.2.3 value is 10203 + */ +#define LIBEXSLT_VERSION 824 + +/** + * LIBEXSLT_VERSION_STRING: + * + * the version number string, 1.2.3 value is "10203" + */ +#define LIBEXSLT_VERSION_STRING "824" + +/** + * LIBEXSLT_VERSION_EXTRA: + * + * extra version information, used to show a Git commit description + */ +#define LIBEXSLT_VERSION_EXTRA "" + +/** + * WITH_CRYPTO: + * + * Whether crypto support is configured into exslt + */ +#if 0 +#define EXSLT_CRYPTO_ENABLED +#endif + +/** + * ATTRIBUTE_UNUSED: + * + * This macro is used to flag unused function parameters to GCC + */ +#ifdef __GNUC__ +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__((unused)) +#endif +#else +#define ATTRIBUTE_UNUSED +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_EXSLTCONFIG_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/__init__.py b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h new file mode 100644 index 0000000000000000000000000000000000000000..d9b99a74aa1394507a6f2fea9c322741fe36b1a5 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h @@ -0,0 +1,39 @@ +/* + * Summary: interface for the XSLT attribute handling + * Description: this module handles the specificities of attribute + * and attribute groups processing. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_ATTRIBUTES_H__ +#define __XML_XSLT_ATTRIBUTES_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +XSLTPUBFUN void XSLTCALL + xsltParseStylesheetAttributeSet (xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN void XSLTCALL + xsltFreeAttributeSetsHashes (xsltStylesheetPtr style); +XSLTPUBFUN void XSLTCALL + xsltApplyAttributeSet (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + const xmlChar *attributes); +XSLTPUBFUN void XSLTCALL + xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style); +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_ATTRIBUTES_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h new file mode 100644 index 0000000000000000000000000000000000000000..ae7c0ca24b93ec9a14b1dba5808f45998bba796c --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h @@ -0,0 +1,93 @@ +/* + * Summary: interface for the document handling + * Description: implements document loading and cache (multiple + * document() reference for the same resources must + * be equal. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_DOCUMENTS_H__ +#define __XML_XSLT_DOCUMENTS_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +XSLTPUBFUN xsltDocumentPtr XSLTCALL + xsltNewDocument (xsltTransformContextPtr ctxt, + xmlDocPtr doc); +XSLTPUBFUN xsltDocumentPtr XSLTCALL + xsltLoadDocument (xsltTransformContextPtr ctxt, + const xmlChar *URI); +XSLTPUBFUN xsltDocumentPtr XSLTCALL + xsltFindDocument (xsltTransformContextPtr ctxt, + xmlDocPtr doc); +XSLTPUBFUN void XSLTCALL + xsltFreeDocuments (xsltTransformContextPtr ctxt); + +XSLTPUBFUN xsltDocumentPtr XSLTCALL + xsltLoadStyleDocument (xsltStylesheetPtr style, + const xmlChar *URI); +XSLTPUBFUN xsltDocumentPtr XSLTCALL + xsltNewStyleDocument (xsltStylesheetPtr style, + xmlDocPtr doc); +XSLTPUBFUN void XSLTCALL + xsltFreeStyleDocuments (xsltStylesheetPtr style); + +/* + * Hooks for document loading + */ + +/** + * xsltLoadType: + * + * Enum defining the kind of loader requirement. + */ +typedef enum { + XSLT_LOAD_START = 0, /* loading for a top stylesheet */ + XSLT_LOAD_STYLESHEET = 1, /* loading for a stylesheet include/import */ + XSLT_LOAD_DOCUMENT = 2 /* loading document at transformation time */ +} xsltLoadType; + +/** + * xsltDocLoaderFunc: + * @URI: the URI of the document to load + * @dict: the dictionary to use when parsing that document + * @options: parsing options, a set of xmlParserOption + * @ctxt: the context, either a stylesheet or a transformation context + * @type: the xsltLoadType indicating the kind of loading required + * + * An xsltDocLoaderFunc is a signature for a function which can be + * registered to load document not provided by the compilation or + * transformation API themselve, for example when an xsl:import, + * xsl:include is found at compilation time or when a document() + * call is made at runtime. + * + * Returns the pointer to the document (which will be modified and + * freed by the engine later), or NULL in case of error. + */ +typedef xmlDocPtr (*xsltDocLoaderFunc) (const xmlChar *URI, + xmlDictPtr dict, + int options, + void *ctxt, + xsltLoadType type); + +XSLTPUBFUN void XSLTCALL + xsltSetLoaderFunc (xsltDocLoaderFunc f); + +/* the loader may be needed by extension libraries so it is exported */ +XSLTPUBVAR xsltDocLoaderFunc xsltDocDefaultLoader; + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_DOCUMENTS_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h new file mode 100644 index 0000000000000000000000000000000000000000..84d6aa44ad3e89ddece4d45e4eb738771c7e1f0f --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h @@ -0,0 +1,262 @@ +/* + * Summary: interface for the extension support + * Description: This provide the API needed for simple and module + * extension support. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_EXTENSION_H__ +#define __XML_XSLT_EXTENSION_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Extension Modules API. + */ + +/** + * xsltInitGlobals: + * + * Initialize the global variables for extensions + * + */ + +XSLTPUBFUN void XSLTCALL + xsltInitGlobals (void); + +/** + * xsltStyleExtInitFunction: + * @ctxt: an XSLT stylesheet + * @URI: the namespace URI for the extension + * + * A function called at initialization time of an XSLT extension module. + * + * Returns a pointer to the module specific data for this transformation. + */ +typedef void * (*xsltStyleExtInitFunction) (xsltStylesheetPtr style, + const xmlChar *URI); + +/** + * xsltStyleExtShutdownFunction: + * @ctxt: an XSLT stylesheet + * @URI: the namespace URI for the extension + * @data: the data associated to this module + * + * A function called at shutdown time of an XSLT extension module. + */ +typedef void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style, + const xmlChar *URI, + void *data); + +/** + * xsltExtInitFunction: + * @ctxt: an XSLT transformation context + * @URI: the namespace URI for the extension + * + * A function called at initialization time of an XSLT extension module. + * + * Returns a pointer to the module specific data for this transformation. + */ +typedef void * (*xsltExtInitFunction) (xsltTransformContextPtr ctxt, + const xmlChar *URI); + +/** + * xsltExtShutdownFunction: + * @ctxt: an XSLT transformation context + * @URI: the namespace URI for the extension + * @data: the data associated to this module + * + * A function called at shutdown time of an XSLT extension module. + */ +typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt, + const xmlChar *URI, + void *data); + +XSLTPUBFUN int XSLTCALL + xsltRegisterExtModule (const xmlChar *URI, + xsltExtInitFunction initFunc, + xsltExtShutdownFunction shutdownFunc); +XSLTPUBFUN int XSLTCALL + xsltRegisterExtModuleFull + (const xmlChar * URI, + xsltExtInitFunction initFunc, + xsltExtShutdownFunction shutdownFunc, + xsltStyleExtInitFunction styleInitFunc, + xsltStyleExtShutdownFunction styleShutdownFunc); + +XSLTPUBFUN int XSLTCALL + xsltUnregisterExtModule (const xmlChar * URI); + +XSLTPUBFUN void * XSLTCALL + xsltGetExtData (xsltTransformContextPtr ctxt, + const xmlChar *URI); + +XSLTPUBFUN void * XSLTCALL + xsltStyleGetExtData (xsltStylesheetPtr style, + const xmlChar *URI); +#ifdef XSLT_REFACTORED +XSLTPUBFUN void * XSLTCALL + xsltStyleStylesheetLevelGetExtData( + xsltStylesheetPtr style, + const xmlChar * URI); +#endif +XSLTPUBFUN void XSLTCALL + xsltShutdownCtxtExts (xsltTransformContextPtr ctxt); + +XSLTPUBFUN void XSLTCALL + xsltShutdownExts (xsltStylesheetPtr style); + +XSLTPUBFUN xsltTransformContextPtr XSLTCALL + xsltXPathGetTransformContext + (xmlXPathParserContextPtr ctxt); + +/* + * extension functions +*/ +XSLTPUBFUN int XSLTCALL + xsltRegisterExtModuleFunction + (const xmlChar *name, + const xmlChar *URI, + xmlXPathFunction function); +XSLTPUBFUN xmlXPathFunction XSLTCALL + xsltExtModuleFunctionLookup (const xmlChar *name, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltUnregisterExtModuleFunction + (const xmlChar *name, + const xmlChar *URI); + +/* + * extension elements + */ +typedef xsltElemPreCompPtr (*xsltPreComputeFunction) + (xsltStylesheetPtr style, + xmlNodePtr inst, + xsltTransformFunction function); + +XSLTPUBFUN xsltElemPreCompPtr XSLTCALL + xsltNewElemPreComp (xsltStylesheetPtr style, + xmlNodePtr inst, + xsltTransformFunction function); +XSLTPUBFUN void XSLTCALL + xsltInitElemPreComp (xsltElemPreCompPtr comp, + xsltStylesheetPtr style, + xmlNodePtr inst, + xsltTransformFunction function, + xsltElemPreCompDeallocator freeFunc); + +XSLTPUBFUN int XSLTCALL + xsltRegisterExtModuleElement + (const xmlChar *name, + const xmlChar *URI, + xsltPreComputeFunction precomp, + xsltTransformFunction transform); +XSLTPUBFUN xsltTransformFunction XSLTCALL + xsltExtElementLookup (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *URI); +XSLTPUBFUN xsltTransformFunction XSLTCALL + xsltExtModuleElementLookup + (const xmlChar *name, + const xmlChar *URI); +XSLTPUBFUN xsltPreComputeFunction XSLTCALL + xsltExtModuleElementPreComputeLookup + (const xmlChar *name, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltUnregisterExtModuleElement + (const xmlChar *name, + const xmlChar *URI); + +/* + * top-level elements + */ +typedef void (*xsltTopLevelFunction) (xsltStylesheetPtr style, + xmlNodePtr inst); + +XSLTPUBFUN int XSLTCALL + xsltRegisterExtModuleTopLevel + (const xmlChar *name, + const xmlChar *URI, + xsltTopLevelFunction function); +XSLTPUBFUN xsltTopLevelFunction XSLTCALL + xsltExtModuleTopLevelLookup + (const xmlChar *name, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltUnregisterExtModuleTopLevel + (const xmlChar *name, + const xmlChar *URI); + + +/* These 2 functions are deprecated for use within modules. */ +XSLTPUBFUN int XSLTCALL + xsltRegisterExtFunction (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *URI, + xmlXPathFunction function); +XSLTPUBFUN int XSLTCALL + xsltRegisterExtElement (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *URI, + xsltTransformFunction function); + +/* + * Extension Prefix handling API. + * Those are used by the XSLT (pre)processor. + */ + +XSLTPUBFUN int XSLTCALL + xsltRegisterExtPrefix (xsltStylesheetPtr style, + const xmlChar *prefix, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltCheckExtPrefix (xsltStylesheetPtr style, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltCheckExtURI (xsltStylesheetPtr style, + const xmlChar *URI); +XSLTPUBFUN int XSLTCALL + xsltInitCtxtExts (xsltTransformContextPtr ctxt); +XSLTPUBFUN void XSLTCALL + xsltFreeCtxtExts (xsltTransformContextPtr ctxt); +XSLTPUBFUN void XSLTCALL + xsltFreeExts (xsltStylesheetPtr style); + +XSLTPUBFUN xsltElemPreCompPtr XSLTCALL + xsltPreComputeExtModuleElement + (xsltStylesheetPtr style, + xmlNodePtr inst); +/* + * Extension Infos access. + * Used by exslt initialisation + */ + +XSLTPUBFUN xmlHashTablePtr XSLTCALL + xsltGetExtInfo (xsltStylesheetPtr style, + const xmlChar *URI); + +/** + * Test of the extension module API + */ +XSLTPUBFUN void XSLTCALL + xsltRegisterTestModule (void); +XSLTPUBFUN void XSLTCALL + xsltDebugDumpExtensions (FILE * output); + + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_EXTENSION_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h new file mode 100644 index 0000000000000000000000000000000000000000..e512fd03dd4b4c459e2498e50126be59557d30c9 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h @@ -0,0 +1,72 @@ +/* + * Summary: interface for the non-standard features + * Description: implement some extension outside the XSLT namespace + * but not EXSLT with is in a different library. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_EXTRA_H__ +#define __XML_XSLT_EXTRA_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XSLT_LIBXSLT_NAMESPACE: + * + * This is the libxslt namespace for specific extensions. + */ +#define XSLT_LIBXSLT_NAMESPACE ((xmlChar *) "http://xmlsoft.org/XSLT/namespace") + +/** + * XSLT_SAXON_NAMESPACE: + * + * This is Michael Kay's Saxon processor namespace for extensions. + */ +#define XSLT_SAXON_NAMESPACE ((xmlChar *) "http://icl.com/saxon") + +/** + * XSLT_XT_NAMESPACE: + * + * This is James Clark's XT processor namespace for extensions. + */ +#define XSLT_XT_NAMESPACE ((xmlChar *) "http://www.jclark.com/xt") + +/** + * XSLT_XALAN_NAMESPACE: + * + * This is the Apache project XALAN processor namespace for extensions. + */ +#define XSLT_XALAN_NAMESPACE ((xmlChar *) \ + "org.apache.xalan.xslt.extensions.Redirect") + + +XSLTPUBFUN void XSLTCALL + xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltDebug (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); + + +XSLTPUBFUN void XSLTCALL + xsltRegisterExtras (xsltTransformContextPtr ctxt); +XSLTPUBFUN void XSLTCALL + xsltRegisterAllExtras (void); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_EXTRA_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h new file mode 100644 index 0000000000000000000000000000000000000000..5455b7f47802ac6cae284fadbbcd7a0665c34341 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h @@ -0,0 +1,78 @@ +/* + * Summary: interface for the XSLT functions not from XPath + * Description: a set of extra functions coming from XSLT but not in XPath + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard and Bjorn Reese + */ + +#ifndef __XML_XSLT_FUNCTIONS_H__ +#define __XML_XSLT_FUNCTIONS_H__ + +#include +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XSLT_REGISTER_FUNCTION_LOOKUP: + * + * Registering macro, not general purpose at all but used in different modules. + */ +#define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \ + xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \ + xsltXPathFunctionLookup, \ + (void *)(ctxt->xpathCtxt)); + +XSLTPUBFUN xmlXPathFunction XSLTCALL + xsltXPathFunctionLookup (void *vctxt, + const xmlChar *name, + const xmlChar *ns_uri); + +/* + * Interfaces for the functions implementations. + */ + +XSLTPUBFUN void XSLTCALL + xsltDocumentFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltKeyFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt, + int nargs); +XSLTPUBFUN void XSLTCALL + xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt, + int nargs); + +/* + * And the registration + */ + +XSLTPUBFUN void XSLTCALL + xsltRegisterAllFunctions (xmlXPathContextPtr ctxt); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_FUNCTIONS_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h new file mode 100644 index 0000000000000000000000000000000000000000..95e44e51da10f1a7334ddefd56f02ef40d94719d --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h @@ -0,0 +1,75 @@ +/* + * Summary: interface for the XSLT import support + * Description: macros and fuctions needed to implement and + * access the import tree + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_IMPORTS_H__ +#define __XML_XSLT_IMPORTS_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XSLT_GET_IMPORT_PTR: + * + * A macro to import pointers from the stylesheet cascading order. + */ +#define XSLT_GET_IMPORT_PTR(res, style, name) { \ + xsltStylesheetPtr st = style; \ + res = NULL; \ + while (st != NULL) { \ + if (st->name != NULL) { res = st->name; break; } \ + st = xsltNextImport(st); \ + }} + +/** + * XSLT_GET_IMPORT_INT: + * + * A macro to import intergers from the stylesheet cascading order. + */ +#define XSLT_GET_IMPORT_INT(res, style, name) { \ + xsltStylesheetPtr st = style; \ + res = -1; \ + while (st != NULL) { \ + if (st->name != -1) { res = st->name; break; } \ + st = xsltNextImport(st); \ + }} + +/* + * Module interfaces + */ +XSLTPUBFUN int XSLTCALL + xsltParseStylesheetImport(xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN int XSLTCALL + xsltParseStylesheetInclude + (xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltNextImport (xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt); +XSLTPUBFUN int XSLTCALL + xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt, + xmlNodePtr node); +XSLTPUBFUN xsltTemplatePtr XSLTCALL + xsltFindTemplate (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *nameURI); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_IMPORTS_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h new file mode 100644 index 0000000000000000000000000000000000000000..757d122463ae4f3476bbf73e549e15c30e7de617 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h @@ -0,0 +1,53 @@ +/* + * Summary: interface for the key matching used in key() and template matches. + * Description: implementation of the key mechanims. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_KEY_H__ +#define __XML_XSLT_KEY_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * NODE_IS_KEYED: + * + * check for bit 15 set + */ +#define NODE_IS_KEYED (1 >> 15) + +XSLTPUBFUN int XSLTCALL + xsltAddKey (xsltStylesheetPtr style, + const xmlChar *name, + const xmlChar *nameURI, + const xmlChar *match, + const xmlChar *use, + xmlNodePtr inst); +XSLTPUBFUN xmlNodeSetPtr XSLTCALL + xsltGetKey (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *nameURI, + const xmlChar *value); +XSLTPUBFUN void XSLTCALL + xsltInitCtxtKeys (xsltTransformContextPtr ctxt, + xsltDocumentPtr doc); +XSLTPUBFUN void XSLTCALL + xsltFreeKeys (xsltStylesheetPtr style); +XSLTPUBFUN void XSLTCALL + xsltFreeDocumentKeys (xsltDocumentPtr doc); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h new file mode 100644 index 0000000000000000000000000000000000000000..fa2d3b4ce75cf64da845ed8eac860145f99a0b81 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h @@ -0,0 +1,68 @@ +/* + * Summary: interface for the XSLT namespace handling + * Description: set of function easing the processing and generation + * of namespace nodes in XSLT. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_NAMESPACES_H__ +#define __XML_XSLT_NAMESPACES_H__ + +#include +#include "xsltexports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Used within nsAliases hashtable when the default namespace is required + * but it's not been explicitly defined + */ +/** + * UNDEFINED_DEFAULT_NS: + * + * Special value for undefined namespace, internal + */ +#define UNDEFINED_DEFAULT_NS (const xmlChar *) -1L + +XSLTPUBFUN void XSLTCALL + xsltNamespaceAlias (xsltStylesheetPtr style, + xmlNodePtr node); +XSLTPUBFUN xmlNsPtr XSLTCALL + xsltGetNamespace (xsltTransformContextPtr ctxt, + xmlNodePtr cur, + xmlNsPtr ns, + xmlNodePtr out); +XSLTPUBFUN xmlNsPtr XSLTCALL + xsltGetPlainNamespace (xsltTransformContextPtr ctxt, + xmlNodePtr cur, + xmlNsPtr ns, + xmlNodePtr out); +XSLTPUBFUN xmlNsPtr XSLTCALL + xsltGetSpecialNamespace (xsltTransformContextPtr ctxt, + xmlNodePtr cur, + const xmlChar *URI, + const xmlChar *prefix, + xmlNodePtr out); +XSLTPUBFUN xmlNsPtr XSLTCALL + xsltCopyNamespace (xsltTransformContextPtr ctxt, + xmlNodePtr elem, + xmlNsPtr ns); +XSLTPUBFUN xmlNsPtr XSLTCALL + xsltCopyNamespaceList (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNsPtr cur); +XSLTPUBFUN void XSLTCALL + xsltFreeNamespaceAliasHashes + (xsltStylesheetPtr style); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_NAMESPACES_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h new file mode 100644 index 0000000000000000000000000000000000000000..a0991c0ce83ee4406d6dca356138dd698e8efbe2 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h @@ -0,0 +1,84 @@ +/* + * Summary: interface for the pattern matching used in template matches. + * Description: the implementation of the lookup of the right template + * for a given node must be really fast in order to keep + * decent performances. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_PATTERN_H__ +#define __XML_XSLT_PATTERN_H__ + +#include "xsltInternals.h" +#include "xsltexports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xsltCompMatch: + * + * Data structure used for the implementation of patterns. + * It is kept private (in pattern.c). + */ +typedef struct _xsltCompMatch xsltCompMatch; +typedef xsltCompMatch *xsltCompMatchPtr; + +/* + * Pattern related interfaces. + */ + +XSLTPUBFUN xsltCompMatchPtr XSLTCALL + xsltCompilePattern (const xmlChar *pattern, + xmlDocPtr doc, + xmlNodePtr node, + xsltStylesheetPtr style, + xsltTransformContextPtr runtime); +XSLTPUBFUN void XSLTCALL + xsltFreeCompMatchList (xsltCompMatchPtr comp); +XSLTPUBFUN int XSLTCALL + xsltTestCompMatchList (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xsltCompMatchPtr comp); +XSLTPUBFUN void XSLTCALL + xsltCompMatchClearCache (xsltTransformContextPtr ctxt, + xsltCompMatchPtr comp); +XSLTPUBFUN void XSLTCALL + xsltNormalizeCompSteps (void *payload, + void *data, + const xmlChar *name); + +/* + * Template related interfaces. + */ +XSLTPUBFUN int XSLTCALL + xsltAddTemplate (xsltStylesheetPtr style, + xsltTemplatePtr cur, + const xmlChar *mode, + const xmlChar *modeURI); +XSLTPUBFUN xsltTemplatePtr XSLTCALL + xsltGetTemplate (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xsltStylesheetPtr style); +XSLTPUBFUN void XSLTCALL + xsltFreeTemplateHashes (xsltStylesheetPtr style); +XSLTPUBFUN void XSLTCALL + xsltCleanupTemplates (xsltStylesheetPtr style); + +#if 0 +int xsltMatchPattern (xsltTransformContextPtr ctxt, + xmlNodePtr node, + const xmlChar *pattern, + xmlDocPtr ctxtdoc, + xmlNodePtr ctxtnode); +#endif +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_PATTERN_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/security.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/security.h new file mode 100644 index 0000000000000000000000000000000000000000..bab5c8c6b213ae0dec3160c08870e5232112cea4 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/security.h @@ -0,0 +1,104 @@ +/* + * Summary: interface for the libxslt security framework + * Description: the libxslt security framework allow to restrict + * the access to new resources (file or URL) from + * the stylesheet at runtime. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_SECURITY_H__ +#define __XML_XSLT_SECURITY_H__ + +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * xsltSecurityPref: + * + * structure to indicate the preferences for security in the XSLT + * transformation. + */ +typedef struct _xsltSecurityPrefs xsltSecurityPrefs; +typedef xsltSecurityPrefs *xsltSecurityPrefsPtr; + +/** + * xsltSecurityOption: + * + * the set of option that can be configured + */ +typedef enum { + XSLT_SECPREF_READ_FILE = 1, + XSLT_SECPREF_WRITE_FILE, + XSLT_SECPREF_CREATE_DIRECTORY, + XSLT_SECPREF_READ_NETWORK, + XSLT_SECPREF_WRITE_NETWORK +} xsltSecurityOption; + +/** + * xsltSecurityCheck: + * + * User provided function to check the value of a string like a file + * path or an URL ... + */ +typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt, + const char *value); + +/* + * Module interfaces + */ +XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL + xsltNewSecurityPrefs (void); +XSLTPUBFUN void XSLTCALL + xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec); +XSLTPUBFUN int XSLTCALL + xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec, + xsltSecurityOption option, + xsltSecurityCheck func); +XSLTPUBFUN xsltSecurityCheck XSLTCALL + xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec, + xsltSecurityOption option); + +XSLTPUBFUN void XSLTCALL + xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec); +XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL + xsltGetDefaultSecurityPrefs (void); + +XSLTPUBFUN int XSLTCALL + xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt); + +XSLTPUBFUN int XSLTCALL + xsltSecurityAllow (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt, + const char *value); +XSLTPUBFUN int XSLTCALL + xsltSecurityForbid (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt, + const char *value); +/* + * internal interfaces + */ +XSLTPUBFUN int XSLTCALL + xsltCheckWrite (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt, + const xmlChar *URL); +XSLTPUBFUN int XSLTCALL + xsltCheckRead (xsltSecurityPrefsPtr sec, + xsltTransformContextPtr ctxt, + const xmlChar *URL); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_SECURITY_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h new file mode 100644 index 0000000000000000000000000000000000000000..84a9de4d359668b40fe0f24e67795ec350e0eb04 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h @@ -0,0 +1,77 @@ +/* + * Summary: interface for the template processing + * Description: This set of routine encapsulates XPath calls + * and Attribute Value Templates evaluation. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_TEMPLATES_H__ +#define __XML_XSLT_TEMPLATES_H__ + +#include +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +XSLTPUBFUN int XSLTCALL + xsltEvalXPathPredicate (xsltTransformContextPtr ctxt, + xmlXPathCompExprPtr comp, + xmlNsPtr *nsList, + int nsNr); +XSLTPUBFUN xmlChar * XSLTCALL + xsltEvalTemplateString (xsltTransformContextPtr ctxt, + xmlNodePtr contextNode, + xmlNodePtr inst); +XSLTPUBFUN xmlChar * XSLTCALL + xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt, + xmlNodePtr node, + const xmlChar *name, + const xmlChar *ns); +XSLTPUBFUN const xmlChar * XSLTCALL + xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style, + xmlNodePtr node, + const xmlChar *name, + const xmlChar *ns, + int *found); + +/* TODO: this is obviously broken ... the namespaces should be passed too ! */ +XSLTPUBFUN xmlChar * XSLTCALL + xsltEvalXPathString (xsltTransformContextPtr ctxt, + xmlXPathCompExprPtr comp); +XSLTPUBFUN xmlChar * XSLTCALL + xsltEvalXPathStringNs (xsltTransformContextPtr ctxt, + xmlXPathCompExprPtr comp, + int nsNr, + xmlNsPtr *nsList); + +XSLTPUBFUN xmlNodePtr * XSLTCALL + xsltTemplateProcess (xsltTransformContextPtr ctxt, + xmlNodePtr node); +XSLTPUBFUN xmlAttrPtr XSLTCALL + xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt, + xmlNodePtr target, + xmlAttrPtr cur); +XSLTPUBFUN xmlAttrPtr XSLTCALL + xsltAttrTemplateProcess (xsltTransformContextPtr ctxt, + xmlNodePtr target, + xmlAttrPtr attr); +XSLTPUBFUN xmlChar * XSLTCALL + xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt, + const xmlChar* attr); +XSLTPUBFUN xmlChar * XSLTCALL + xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt, + const xmlChar* str, + xmlNodePtr node); +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_TEMPLATES_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/transform.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/transform.h new file mode 100644 index 0000000000000000000000000000000000000000..5a6f79591079a8ed59a3003936279acb504378fc --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/transform.h @@ -0,0 +1,207 @@ +/* + * Summary: the XSLT engine transformation part. + * Description: This module implements the bulk of the actual + * transformation processing. Most of the xsl: element + * constructs are implemented in this module. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_TRANSFORM_H__ +#define __XML_XSLT_TRANSFORM_H__ + +#include +#include +#include "xsltexports.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XInclude default processing. + */ +XSLTPUBFUN void XSLTCALL + xsltSetXIncludeDefault (int xinclude); +XSLTPUBFUN int XSLTCALL + xsltGetXIncludeDefault (void); + +/** + * Export context to users. + */ +XSLTPUBFUN xsltTransformContextPtr XSLTCALL + xsltNewTransformContext (xsltStylesheetPtr style, + xmlDocPtr doc); + +XSLTPUBFUN void XSLTCALL + xsltFreeTransformContext(xsltTransformContextPtr ctxt); + +XSLTPUBFUN xmlDocPtr XSLTCALL + xsltApplyStylesheetUser (xsltStylesheetPtr style, + xmlDocPtr doc, + const char **params, + const char *output, + FILE * profile, + xsltTransformContextPtr userCtxt); +XSLTPUBFUN void XSLTCALL + xsltProcessOneNode (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xsltStackElemPtr params); +/** + * Private Interfaces. + */ +XSLTPUBFUN void XSLTCALL + xsltApplyStripSpaces (xsltTransformContextPtr ctxt, + xmlNodePtr node); +XSLTPUBFUN xmlDocPtr XSLTCALL + xsltApplyStylesheet (xsltStylesheetPtr style, + xmlDocPtr doc, + const char **params); +XSLTPUBFUN xmlDocPtr XSLTCALL + xsltProfileStylesheet (xsltStylesheetPtr style, + xmlDocPtr doc, + const char **params, + FILE * output); +XSLTPUBFUN int XSLTCALL + xsltRunStylesheet (xsltStylesheetPtr style, + xmlDocPtr doc, + const char **params, + const char *output, + xmlSAXHandlerPtr SAX, + xmlOutputBufferPtr IObuf); +XSLTPUBFUN int XSLTCALL + xsltRunStylesheetUser (xsltStylesheetPtr style, + xmlDocPtr doc, + const char **params, + const char *output, + xmlSAXHandlerPtr SAX, + xmlOutputBufferPtr IObuf, + FILE * profile, + xsltTransformContextPtr userCtxt); +XSLTPUBFUN void XSLTCALL + xsltApplyOneTemplate (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr list, + xsltTemplatePtr templ, + xsltStackElemPtr params); +XSLTPUBFUN void XSLTCALL + xsltDocumentElem (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltSort (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltCopy (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltText (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltElement (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltComment (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltAttribute (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltProcessingInstruction(xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltCopyOf (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltValueOf (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltNumber (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltApplyImports (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltCallTemplate (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltApplyTemplates (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltChoose (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltIf (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltForEach (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); +XSLTPUBFUN void XSLTCALL + xsltRegisterAllElement (xsltTransformContextPtr ctxt); + +XSLTPUBFUN xmlNodePtr XSLTCALL + xsltCopyTextString (xsltTransformContextPtr ctxt, + xmlNodePtr target, + const xmlChar *string, + int noescape); + +/* Following 2 functions needed for libexslt/functions.c */ +XSLTPUBFUN void XSLTCALL + xsltLocalVariablePop (xsltTransformContextPtr ctxt, + int limitNr, + int level); +XSLTPUBFUN int XSLTCALL + xsltLocalVariablePush (xsltTransformContextPtr ctxt, + xsltStackElemPtr variable, + int level); +/* + * Hook for the debugger if activated. + */ +XSLTPUBFUN void XSLTCALL + xslHandleDebugger (xmlNodePtr cur, + xmlNodePtr node, + xsltTemplatePtr templ, + xsltTransformContextPtr ctxt); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_TRANSFORM_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h new file mode 100644 index 0000000000000000000000000000000000000000..e2adee0f7551c6b80e2b76ded49f0b51e405f546 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h @@ -0,0 +1,118 @@ +/* + * Summary: interface for the variable matching and lookup. + * Description: interface for the variable matching and lookup. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_VARIABLES_H__ +#define __XML_XSLT_VARIABLES_H__ + +#include +#include +#include "xsltexports.h" +#include "xsltInternals.h" +#include "functions.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * XSLT_REGISTER_VARIABLE_LOOKUP: + * + * Registering macro, not general purpose at all but used in different modules. + */ + +#define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt) \ + xmlXPathRegisterVariableLookup((ctxt)->xpathCtxt, \ + xsltXPathVariableLookup, (void *)(ctxt)); \ + xsltRegisterAllFunctions((ctxt)->xpathCtxt); \ + xsltRegisterAllElement(ctxt); \ + (ctxt)->xpathCtxt->extra = ctxt + +/* + * Flags for memory management of RVTs + */ + +/** + * XSLT_RVT_LOCAL: + * + * RVT is destroyed after the current instructions ends. + */ +#define XSLT_RVT_LOCAL 1 + +/** + * XSLT_RVT_FUNC_RESULT: + * + * RVT is part of results returned with func:result. The RVT won't be + * destroyed after exiting a template and will be reset to XSLT_RVT_LOCAL or + * XSLT_RVT_VARIABLE in the template that receives the return value. + */ +#define XSLT_RVT_FUNC_RESULT 2 + +/** + * XSLT_RVT_GLOBAL: + * + * RVT is part of a global variable. + */ +#define XSLT_RVT_GLOBAL 3 + +/* + * Interfaces for the variable module. + */ + +XSLTPUBFUN int XSLTCALL + xsltEvalGlobalVariables (xsltTransformContextPtr ctxt); +XSLTPUBFUN int XSLTCALL + xsltEvalUserParams (xsltTransformContextPtr ctxt, + const char **params); +XSLTPUBFUN int XSLTCALL + xsltQuoteUserParams (xsltTransformContextPtr ctxt, + const char **params); +XSLTPUBFUN int XSLTCALL + xsltEvalOneUserParam (xsltTransformContextPtr ctxt, + const xmlChar * name, + const xmlChar * value); +XSLTPUBFUN int XSLTCALL + xsltQuoteOneUserParam (xsltTransformContextPtr ctxt, + const xmlChar * name, + const xmlChar * value); + +XSLTPUBFUN void XSLTCALL + xsltParseGlobalVariable (xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN void XSLTCALL + xsltParseGlobalParam (xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN void XSLTCALL + xsltParseStylesheetVariable (xsltTransformContextPtr ctxt, + xmlNodePtr cur); +XSLTPUBFUN void XSLTCALL + xsltParseStylesheetParam (xsltTransformContextPtr ctxt, + xmlNodePtr cur); +XSLTPUBFUN xsltStackElemPtr XSLTCALL + xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt, + xmlNodePtr cur); +XSLTPUBFUN int XSLTCALL + xsltAddStackElemList (xsltTransformContextPtr ctxt, + xsltStackElemPtr elems); +XSLTPUBFUN void XSLTCALL + xsltFreeGlobalVariables (xsltTransformContextPtr ctxt); +XSLTPUBFUN xmlXPathObjectPtr XSLTCALL + xsltVariableLookup (xsltTransformContextPtr ctxt, + const xmlChar *name, + const xmlChar *ns_uri); +XSLTPUBFUN xmlXPathObjectPtr XSLTCALL + xsltXPathVariableLookup (void *ctxt, + const xmlChar *name, + const xmlChar *ns_uri); +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_VARIABLES_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h new file mode 100644 index 0000000000000000000000000000000000000000..02f491a58ec0e87e5e9d630be1ab81ad3e354f87 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h @@ -0,0 +1,110 @@ +/* + * Summary: Interfaces, constants and types related to the XSLT engine + * Description: Interfaces, constants and types related to the XSLT engine + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_H__ +#define __XML_XSLT_H__ + +#include +#include "xsltexports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XSLT_DEFAULT_VERSION: + * + * The default version of XSLT supported. + */ +#define XSLT_DEFAULT_VERSION "1.0" + +/** + * XSLT_DEFAULT_VENDOR: + * + * The XSLT "vendor" string for this processor. + */ +#define XSLT_DEFAULT_VENDOR "libxslt" + +/** + * XSLT_DEFAULT_URL: + * + * The XSLT "vendor" URL for this processor. + */ +#define XSLT_DEFAULT_URL "http://xmlsoft.org/XSLT/" + +/** + * XSLT_NAMESPACE: + * + * The XSLT specification namespace. + */ +#define XSLT_NAMESPACE ((const xmlChar *)"http://www.w3.org/1999/XSL/Transform") + +/** + * XSLT_PARSE_OPTIONS: + * + * The set of options to pass to an xmlReadxxx when loading files for + * XSLT consumption. + */ +#define XSLT_PARSE_OPTIONS \ + XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA + +/** + * xsltMaxDepth: + * + * This value is used to detect templates loops. + */ +XSLTPUBVAR int xsltMaxDepth; + +/** + * * xsltMaxVars: + * * + * * This value is used to detect templates loops. + * */ +XSLTPUBVAR int xsltMaxVars; + +/** + * xsltEngineVersion: + * + * The version string for libxslt. + */ +XSLTPUBVAR const char *xsltEngineVersion; + +/** + * xsltLibxsltVersion: + * + * The version of libxslt compiled. + */ +XSLTPUBVAR const int xsltLibxsltVersion; + +/** + * xsltLibxmlVersion: + * + * The version of libxml libxslt was compiled against. + */ +XSLTPUBVAR const int xsltLibxmlVersion; + +/* + * Global initialization function. + */ + +XSLTPUBFUN void XSLTCALL + xsltInit (void); + +/* + * Global cleanup function. + */ +XSLTPUBFUN void XSLTCALL + xsltCleanupGlobals (void); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h new file mode 100644 index 0000000000000000000000000000000000000000..6faa07db5299557507739b99838a03ab5f3d8995 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h @@ -0,0 +1,1995 @@ +/* + * Summary: internal data structures, constants and functions + * Description: Internal data structures, constants and functions used + * by the XSLT engine. + * They are not part of the API or ABI, i.e. they can change + * without prior notice, use carefully. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLT_INTERNALS_H__ +#define __XML_XSLT_INTERNALS_H__ + +#include +#include +#include +#include +#include +#include +#include +#include "xsltexports.h" +#include "numbersInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* #define XSLT_DEBUG_PROFILE_CACHE */ + +/** + * XSLT_IS_TEXT_NODE: + * + * check if the argument is a text node + */ +#define XSLT_IS_TEXT_NODE(n) ((n != NULL) && \ + (((n)->type == XML_TEXT_NODE) || \ + ((n)->type == XML_CDATA_SECTION_NODE))) + + +/** + * XSLT_MARK_RES_TREE_FRAG: + * + * internal macro to set up tree fragments + */ +#define XSLT_MARK_RES_TREE_FRAG(n) \ + (n)->name = (char *) xmlStrdup(BAD_CAST " fake node libxslt"); + +/** + * XSLT_IS_RES_TREE_FRAG: + * + * internal macro to test tree fragments + */ +#define XSLT_IS_RES_TREE_FRAG(n) \ + ((n != NULL) && ((n)->type == XML_DOCUMENT_NODE) && \ + ((n)->name != NULL) && ((n)->name[0] == ' ')) + +/** + * XSLT_REFACTORED_KEYCOMP: + * + * Internal define to enable on-demand xsl:key computation. + * That's the only mode now but the define is kept for compatibility + */ +#define XSLT_REFACTORED_KEYCOMP + +/** + * XSLT_FAST_IF: + * + * Internal define to enable usage of xmlXPathCompiledEvalToBoolean() + * for XSLT "tests"; e.g. in + */ +#define XSLT_FAST_IF + +/** + * XSLT_REFACTORED: + * + * Internal define to enable the refactored parts of Libxslt. + */ +/* #define XSLT_REFACTORED */ +/* ==================================================================== */ + +/** + * XSLT_REFACTORED_VARS: + * + * Internal define to enable the refactored variable part of libxslt + */ +#define XSLT_REFACTORED_VARS + +#ifdef XSLT_REFACTORED + +extern const xmlChar *xsltXSLTAttrMarker; + + +/* TODO: REMOVE: #define XSLT_REFACTORED_EXCLRESNS */ + +/* TODO: REMOVE: #define XSLT_REFACTORED_NSALIAS */ + +/** + * XSLT_REFACTORED_XSLT_NSCOMP + * + * Internal define to enable the pointer-comparison of + * namespaces of XSLT elements. + */ +/* #define XSLT_REFACTORED_XSLT_NSCOMP */ + +#ifdef XSLT_REFACTORED_XSLT_NSCOMP + +extern const xmlChar *xsltConstNamespaceNameXSLT; + +/** + * IS_XSLT_ELEM_FAST: + * + * quick test to detect XSLT elements + */ +#define IS_XSLT_ELEM_FAST(n) \ + (((n) != NULL) && ((n)->ns != NULL) && \ + ((n)->ns->href == xsltConstNamespaceNameXSLT)) + +/** + * IS_XSLT_ATTR_FAST: + * + * quick test to detect XSLT attributes + */ +#define IS_XSLT_ATTR_FAST(a) \ + (((a) != NULL) && ((a)->ns != NULL) && \ + ((a)->ns->href == xsltConstNamespaceNameXSLT)) + +/** + * XSLT_HAS_INTERNAL_NSMAP: + * + * check for namespace mapping + */ +#define XSLT_HAS_INTERNAL_NSMAP(s) \ + (((s) != NULL) && ((s)->principal) && \ + ((s)->principal->principalData) && \ + ((s)->principal->principalData->nsMap)) + +/** + * XSLT_GET_INTERNAL_NSMAP: + * + * get pointer to namespace map + */ +#define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap) + +#else /* XSLT_REFACTORED_XSLT_NSCOMP */ + +/** + * IS_XSLT_ELEM_FAST: + * + * quick check whether this is an xslt element + */ +#define IS_XSLT_ELEM_FAST(n) \ + (((n) != NULL) && ((n)->ns != NULL) && \ + (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) + +/** + * IS_XSLT_ATTR_FAST: + * + * quick check for xslt namespace attribute + */ +#define IS_XSLT_ATTR_FAST(a) \ + (((a) != NULL) && ((a)->ns != NULL) && \ + (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE))) + + +#endif /* XSLT_REFACTORED_XSLT_NSCOMP */ + + +/** + * XSLT_REFACTORED_MANDATORY_VERSION: + * + * TODO: Currently disabled to surpress regression test failures, since + * the old behaviour was that a missing version attribute + * produced a only a warning and not an error, which was incerrect. + * So the regression tests need to be fixed if this is enabled. + */ +/* #define XSLT_REFACTORED_MANDATORY_VERSION */ + +/** + * xsltPointerList: + * + * Pointer-list for various purposes. + */ +typedef struct _xsltPointerList xsltPointerList; +typedef xsltPointerList *xsltPointerListPtr; +struct _xsltPointerList { + void **items; + int number; + int size; +}; + +#endif + +/** + * XSLT_REFACTORED_PARSING: + * + * Internal define to enable the refactored parts of Libxslt + * related to parsing. + */ +/* #define XSLT_REFACTORED_PARSING */ + +/** + * XSLT_MAX_SORT: + * + * Max number of specified xsl:sort on an element. + */ +#define XSLT_MAX_SORT 15 + +/** + * XSLT_PAT_NO_PRIORITY: + * + * Specific value for pattern without priority expressed. + */ +#define XSLT_PAT_NO_PRIORITY -12345789 + +/** + * xsltRuntimeExtra: + * + * Extra information added to the transformation context. + */ +typedef struct _xsltRuntimeExtra xsltRuntimeExtra; +typedef xsltRuntimeExtra *xsltRuntimeExtraPtr; +struct _xsltRuntimeExtra { + void *info; /* pointer to the extra data */ + xmlFreeFunc deallocate; /* pointer to the deallocation routine */ + union { /* dual-purpose field */ + void *ptr; /* data not needing deallocation */ + int ival; /* integer value storage */ + } val; +}; + +/** + * XSLT_RUNTIME_EXTRA_LST: + * @ctxt: the transformation context + * @nr: the index + * + * Macro used to access extra information stored in the context + */ +#define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info +/** + * XSLT_RUNTIME_EXTRA_FREE: + * @ctxt: the transformation context + * @nr: the index + * + * Macro used to free extra information stored in the context + */ +#define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate +/** + * XSLT_RUNTIME_EXTRA: + * @ctxt: the transformation context + * @nr: the index + * + * Macro used to define extra information stored in the context + */ +#define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ + +/** + * xsltTemplate: + * + * The in-memory structure corresponding to an XSLT Template. + */ +typedef struct _xsltTemplate xsltTemplate; +typedef xsltTemplate *xsltTemplatePtr; +struct _xsltTemplate { + struct _xsltTemplate *next;/* chained list sorted by priority */ + struct _xsltStylesheet *style;/* the containing stylesheet */ + xmlChar *match; /* the matching string */ + float priority; /* as given from the stylesheet, not computed */ + const xmlChar *name; /* the local part of the name QName */ + const xmlChar *nameURI; /* the URI part of the name QName */ + const xmlChar *mode;/* the local part of the mode QName */ + const xmlChar *modeURI;/* the URI part of the mode QName */ + xmlNodePtr content; /* the template replacement value */ + xmlNodePtr elem; /* the source element */ + + /* + * TODO: @inheritedNsNr and @inheritedNs won't be used in the + * refactored code. + */ + int inheritedNsNr; /* number of inherited namespaces */ + xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */ + + /* Profiling information */ + int nbCalls; /* the number of time the template was called */ + unsigned long time; /* the time spent in this template */ + void *params; /* xsl:param instructions */ + + int templNr; /* Nb of templates in the stack */ + int templMax; /* Size of the templtes stack */ + xsltTemplatePtr *templCalledTab; /* templates called */ + int *templCountTab; /* .. and how often */ + + /* Conflict resolution */ + int position; +}; + +/** + * xsltDecimalFormat: + * + * Data structure of decimal-format. + */ +typedef struct _xsltDecimalFormat xsltDecimalFormat; +typedef xsltDecimalFormat *xsltDecimalFormatPtr; +struct _xsltDecimalFormat { + struct _xsltDecimalFormat *next; /* chained list */ + xmlChar *name; + /* Used for interpretation of pattern */ + xmlChar *digit; + xmlChar *patternSeparator; + /* May appear in result */ + xmlChar *minusSign; + xmlChar *infinity; + xmlChar *noNumber; /* Not-a-number */ + /* Used for interpretation of pattern and may appear in result */ + xmlChar *decimalPoint; + xmlChar *grouping; + xmlChar *percent; + xmlChar *permille; + xmlChar *zeroDigit; + const xmlChar *nsUri; +}; + +/** + * xsltDocument: + * + * Data structure associated to a parsed document. + */ +typedef struct _xsltDocument xsltDocument; +typedef xsltDocument *xsltDocumentPtr; +struct _xsltDocument { + struct _xsltDocument *next; /* documents are kept in a chained list */ + int main; /* is this the main document */ + xmlDocPtr doc; /* the parsed document */ + void *keys; /* key tables storage */ + struct _xsltDocument *includes; /* subsidiary includes */ + int preproc; /* pre-processing already done */ + int nbKeysComputed; +}; + +/** + * xsltKeyDef: + * + * Representation of an xsl:key. + */ +typedef struct _xsltKeyDef xsltKeyDef; +typedef xsltKeyDef *xsltKeyDefPtr; +struct _xsltKeyDef { + struct _xsltKeyDef *next; + xmlNodePtr inst; + xmlChar *name; + xmlChar *nameURI; + xmlChar *match; + xmlChar *use; + xmlXPathCompExprPtr comp; + xmlXPathCompExprPtr usecomp; + xmlNsPtr *nsList; /* the namespaces in scope */ + int nsNr; /* the number of namespaces in scope */ +}; + +/** + * xsltKeyTable: + * + * Holds the computed keys for key definitions of the same QName. + * Is owned by an xsltDocument. + */ +typedef struct _xsltKeyTable xsltKeyTable; +typedef xsltKeyTable *xsltKeyTablePtr; +struct _xsltKeyTable { + struct _xsltKeyTable *next; + xmlChar *name; + xmlChar *nameURI; + xmlHashTablePtr keys; +}; + +/* + * The in-memory structure corresponding to an XSLT Stylesheet. + * NOTE: most of the content is simply linked from the doc tree + * structure, no specific allocation is made. + */ +typedef struct _xsltStylesheet xsltStylesheet; +typedef xsltStylesheet *xsltStylesheetPtr; + +typedef struct _xsltTransformContext xsltTransformContext; +typedef xsltTransformContext *xsltTransformContextPtr; + +/** + * xsltElemPreComp: + * + * The in-memory structure corresponding to element precomputed data, + * designed to be extended by extension implementors. + */ +typedef struct _xsltElemPreComp xsltElemPreComp; +typedef xsltElemPreComp *xsltElemPreCompPtr; + +/** + * xsltTransformFunction: + * @ctxt: the XSLT transformation context + * @node: the input node + * @inst: the stylesheet node + * @comp: the compiled information from the stylesheet + * + * Signature of the function associated to elements part of the + * stylesheet language like xsl:if or xsl:apply-templates. + */ +typedef void (*xsltTransformFunction) (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst, + xsltElemPreCompPtr comp); + +/** + * xsltSortFunc: + * @ctxt: a transformation context + * @sorts: the node-set to sort + * @nbsorts: the number of sorts + * + * Signature of the function to use during sorting + */ +typedef void (*xsltSortFunc) (xsltTransformContextPtr ctxt, xmlNodePtr *sorts, + int nbsorts); + +typedef enum { + XSLT_FUNC_COPY=1, + XSLT_FUNC_SORT, + XSLT_FUNC_TEXT, + XSLT_FUNC_ELEMENT, + XSLT_FUNC_ATTRIBUTE, + XSLT_FUNC_COMMENT, + XSLT_FUNC_PI, + XSLT_FUNC_COPYOF, + XSLT_FUNC_VALUEOF, + XSLT_FUNC_NUMBER, + XSLT_FUNC_APPLYIMPORTS, + XSLT_FUNC_CALLTEMPLATE, + XSLT_FUNC_APPLYTEMPLATES, + XSLT_FUNC_CHOOSE, + XSLT_FUNC_IF, + XSLT_FUNC_FOREACH, + XSLT_FUNC_DOCUMENT, + XSLT_FUNC_WITHPARAM, + XSLT_FUNC_PARAM, + XSLT_FUNC_VARIABLE, + XSLT_FUNC_WHEN, + XSLT_FUNC_EXTENSION +#ifdef XSLT_REFACTORED + , + XSLT_FUNC_OTHERWISE, + XSLT_FUNC_FALLBACK, + XSLT_FUNC_MESSAGE, + XSLT_FUNC_INCLUDE, + XSLT_FUNC_ATTRSET, + XSLT_FUNC_LITERAL_RESULT_ELEMENT, + XSLT_FUNC_UNKOWN_FORWARDS_COMPAT +#endif +} xsltStyleType; + +/** + * xsltElemPreCompDeallocator: + * @comp: the #xsltElemPreComp to free up + * + * Deallocates an #xsltElemPreComp structure. + */ +typedef void (*xsltElemPreCompDeallocator) (xsltElemPreCompPtr comp); + +/** + * xsltElemPreComp: + * + * The basic structure for compiled items of the AST of the XSLT processor. + * This structure is also intended to be extended by extension implementors. + * TODO: This is somehow not nice, since it has a "free" field, which + * derived stylesheet-structs do not have. + */ +struct _xsltElemPreComp { + xsltElemPreCompPtr next; /* next item in the global chained + list held by xsltStylesheet. */ + xsltStyleType type; /* type of the element */ + xsltTransformFunction func; /* handling function */ + xmlNodePtr inst; /* the node in the stylesheet's tree + corresponding to this item */ + + /* end of common part */ + xsltElemPreCompDeallocator free; /* the deallocator */ +}; + +/** + * xsltStylePreComp: + * + * The abstract basic structure for items of the XSLT processor. + * This includes: + * 1) compiled forms of XSLT instructions (xsl:if, xsl:attribute, etc.) + * 2) compiled forms of literal result elements + * 3) compiled forms of extension elements + */ +typedef struct _xsltStylePreComp xsltStylePreComp; +typedef xsltStylePreComp *xsltStylePreCompPtr; + +#ifdef XSLT_REFACTORED + +/* +* Some pointer-list utility functions. +*/ +XSLTPUBFUN xsltPointerListPtr XSLTCALL + xsltPointerListCreate (int initialSize); +XSLTPUBFUN void XSLTCALL + xsltPointerListFree (xsltPointerListPtr list); +XSLTPUBFUN void XSLTCALL + xsltPointerListClear (xsltPointerListPtr list); +XSLTPUBFUN int XSLTCALL + xsltPointerListAddSize (xsltPointerListPtr list, + void *item, + int initialSize); + +/************************************************************************ + * * + * Refactored structures * + * * + ************************************************************************/ + +typedef struct _xsltNsListContainer xsltNsListContainer; +typedef xsltNsListContainer *xsltNsListContainerPtr; +struct _xsltNsListContainer { + xmlNsPtr *list; + int totalNumber; + int xpathNumber; +}; + +/** + * XSLT_ITEM_COMPATIBILITY_FIELDS: + * + * Fields for API compatibility to the structure + * _xsltElemPreComp which is used for extension functions. + * Note that @next is used for storage; it does not reflect a next + * sibling in the tree. + * TODO: Evaluate if we really need such a compatibility. + */ +#define XSLT_ITEM_COMPATIBILITY_FIELDS \ + xsltElemPreCompPtr next;\ + xsltStyleType type;\ + xsltTransformFunction func;\ + xmlNodePtr inst; + +/** + * XSLT_ITEM_NAVIGATION_FIELDS: + * + * Currently empty. + * TODO: It is intended to hold navigational fields in the future. + */ +#define XSLT_ITEM_NAVIGATION_FIELDS +/* + xsltStylePreCompPtr parent;\ + xsltStylePreCompPtr children;\ + xsltStylePreCompPtr nextItem; +*/ + +/** + * XSLT_ITEM_NSINSCOPE_FIELDS: + * + * The in-scope namespaces. + */ +#define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs; + +/** + * XSLT_ITEM_COMMON_FIELDS: + * + * Common fields used for all items. + */ +#define XSLT_ITEM_COMMON_FIELDS \ + XSLT_ITEM_COMPATIBILITY_FIELDS \ + XSLT_ITEM_NAVIGATION_FIELDS \ + XSLT_ITEM_NSINSCOPE_FIELDS + +/** + * _xsltStylePreComp: + * + * The abstract basic structure for items of the XSLT processor. + * This includes: + * 1) compiled forms of XSLT instructions (e.g. xsl:if, xsl:attribute, etc.) + * 2) compiled forms of literal result elements + * 3) various properties for XSLT instructions (e.g. xsl:when, + * xsl:with-param) + * + * REVISIT TODO: Keep this structure equal to the fields + * defined by XSLT_ITEM_COMMON_FIELDS + */ +struct _xsltStylePreComp { + xsltElemPreCompPtr next; /* next item in the global chained + list held by xsltStylesheet */ + xsltStyleType type; /* type of the item */ + xsltTransformFunction func; /* handling function */ + xmlNodePtr inst; /* the node in the stylesheet's tree + corresponding to this item. */ + /* Currently no navigational fields. */ + xsltNsListContainerPtr inScopeNs; +}; + +/** + * xsltStyleBasicEmptyItem: + * + * Abstract structure only used as a short-cut for + * XSLT items with no extra fields. + * NOTE that it is intended that this structure looks the same as + * _xsltStylePreComp. + */ +typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem; +typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr; + +struct _xsltStyleBasicEmptyItem { + XSLT_ITEM_COMMON_FIELDS +}; + +/** + * xsltStyleBasicExpressionItem: + * + * Abstract structure only used as a short-cut for + * XSLT items with just an expression. + */ +typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem; +typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr; + +struct _xsltStyleBasicExpressionItem { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *select; /* TODO: Change this to "expression". */ + xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */ +}; + +/************************************************************************ + * * + * XSLT-instructions/declarations * + * * + ************************************************************************/ + +/** + * xsltStyleItemElement: + * + * + * + * + * + */ +typedef struct _xsltStyleItemElement xsltStyleItemElement; +typedef xsltStyleItemElement *xsltStyleItemElementPtr; + +struct _xsltStyleItemElement { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *use; + int has_use; + const xmlChar *name; + int has_name; + const xmlChar *ns; + const xmlChar *nsPrefix; + int has_ns; +}; + +/** + * xsltStyleItemAttribute: + * + * + * + * + * + */ +typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute; +typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr; + +struct _xsltStyleItemAttribute { + XSLT_ITEM_COMMON_FIELDS + const xmlChar *name; + int has_name; + const xmlChar *ns; + const xmlChar *nsPrefix; + int has_ns; +}; + +/** + * xsltStyleItemText: + * + * + * + * + * + */ +typedef struct _xsltStyleItemText xsltStyleItemText; +typedef xsltStyleItemText *xsltStyleItemTextPtr; + +struct _xsltStyleItemText { + XSLT_ITEM_COMMON_FIELDS + int noescape; /* text */ +}; + +/** + * xsltStyleItemComment: + * + * + * + * + * + */ +typedef xsltStyleBasicEmptyItem xsltStyleItemComment; +typedef xsltStyleItemComment *xsltStyleItemCommentPtr; + +/** + * xsltStyleItemPI: + * + * + * + * + * + */ +typedef struct _xsltStyleItemPI xsltStyleItemPI; +typedef xsltStyleItemPI *xsltStyleItemPIPtr; + +struct _xsltStyleItemPI { + XSLT_ITEM_COMMON_FIELDS + const xmlChar *name; + int has_name; +}; + +/** + * xsltStyleItemApplyImports: + * + * + * + */ +typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports; +typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr; + +/** + * xsltStyleItemApplyTemplates: + * + * + * + * + * + */ +typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates; +typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr; + +struct _xsltStyleItemApplyTemplates { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *mode; /* apply-templates */ + const xmlChar *modeURI; /* apply-templates */ + const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ + /* TODO: with-params */ +}; + +/** + * xsltStyleItemCallTemplate: + * + * + * + * + * + */ +typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate; +typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr; + +struct _xsltStyleItemCallTemplate { + XSLT_ITEM_COMMON_FIELDS + + xsltTemplatePtr templ; /* call-template */ + const xmlChar *name; /* element, attribute, pi */ + int has_name; /* element, attribute, pi */ + const xmlChar *ns; /* element */ + int has_ns; /* element */ + /* TODO: with-params */ +}; + +/** + * xsltStyleItemCopy: + * + * + * + * + * + */ +typedef struct _xsltStyleItemCopy xsltStyleItemCopy; +typedef xsltStyleItemCopy *xsltStyleItemCopyPtr; + +struct _xsltStyleItemCopy { + XSLT_ITEM_COMMON_FIELDS + const xmlChar *use; /* copy, element */ + int has_use; /* copy, element */ +}; + +/** + * xsltStyleItemIf: + * + * + * + * + * + */ +typedef struct _xsltStyleItemIf xsltStyleItemIf; +typedef xsltStyleItemIf *xsltStyleItemIfPtr; + +struct _xsltStyleItemIf { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *test; /* if */ + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ +}; + + +/** + * xsltStyleItemCopyOf: + * + * + * + */ +typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf; +typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr; + +/** + * xsltStyleItemValueOf: + * + * + * + */ +typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf; +typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr; + +struct _xsltStyleItemValueOf { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *select; + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ + int noescape; +}; + +/** + * xsltStyleItemNumber: + * + * + * + */ +typedef struct _xsltStyleItemNumber xsltStyleItemNumber; +typedef xsltStyleItemNumber *xsltStyleItemNumberPtr; + +struct _xsltStyleItemNumber { + XSLT_ITEM_COMMON_FIELDS + xsltNumberData numdata; /* number */ +}; + +/** + * xsltStyleItemChoose: + * + * + * + * + * + */ +typedef xsltStyleBasicEmptyItem xsltStyleItemChoose; +typedef xsltStyleItemChoose *xsltStyleItemChoosePtr; + +/** + * xsltStyleItemFallback: + * + * + * + * + * + */ +typedef xsltStyleBasicEmptyItem xsltStyleItemFallback; +typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr; + +/** + * xsltStyleItemForEach: + * + * + * + * + * + */ +typedef xsltStyleBasicExpressionItem xsltStyleItemForEach; +typedef xsltStyleItemForEach *xsltStyleItemForEachPtr; + +/** + * xsltStyleItemMessage: + * + * + * + * + * + */ +typedef struct _xsltStyleItemMessage xsltStyleItemMessage; +typedef xsltStyleItemMessage *xsltStyleItemMessagePtr; + +struct _xsltStyleItemMessage { + XSLT_ITEM_COMMON_FIELDS + int terminate; +}; + +/** + * xsltStyleItemDocument: + * + * NOTE: This is not an instruction of XSLT 1.0. + */ +typedef struct _xsltStyleItemDocument xsltStyleItemDocument; +typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr; + +struct _xsltStyleItemDocument { + XSLT_ITEM_COMMON_FIELDS + int ver11; /* assigned: in xsltDocumentComp; + read: nowhere; + TODO: Check if we need. */ + const xmlChar *filename; /* document URL */ + int has_filename; +}; + +/************************************************************************ + * * + * Non-instructions (actually properties of instructions/declarations) * + * * + ************************************************************************/ + +/** + * xsltStyleBasicItemVariable: + * + * Basic struct for xsl:variable, xsl:param and xsl:with-param. + * It's currently important to have equal fields, since + * xsltParseStylesheetCallerParam() is used with xsl:with-param from + * the xslt side and with xsl:param from the exslt side (in + * exsltFuncFunctionFunction()). + * + * FUTURE NOTE: In XSLT 2.0 xsl:param, xsl:variable and xsl:with-param + * have additional different fields. + */ +typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable; +typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr; + +struct _xsltStyleBasicItemVariable { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *select; + xmlXPathCompExprPtr comp; + + const xmlChar *name; + int has_name; + const xmlChar *ns; + int has_ns; +}; + +/** + * xsltStyleItemVariable: + * + * + * + * + * + */ +typedef xsltStyleBasicItemVariable xsltStyleItemVariable; +typedef xsltStyleItemVariable *xsltStyleItemVariablePtr; + +/** + * xsltStyleItemParam: + * + * + * + * + * + */ +typedef struct _xsltStyleItemParam xsltStyleItemParam; +typedef xsltStyleItemParam *xsltStyleItemParamPtr; + +struct _xsltStyleItemParam { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *select; + xmlXPathCompExprPtr comp; + + const xmlChar *name; + int has_name; + const xmlChar *ns; + int has_ns; +}; + +/** + * xsltStyleItemWithParam: + * + * + * + * + */ +typedef xsltStyleBasicItemVariable xsltStyleItemWithParam; +typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr; + +/** + * xsltStyleItemSort: + * + * Reflects the XSLT xsl:sort item. + * Allowed parents: xsl:apply-templates, xsl:for-each + * + */ +typedef struct _xsltStyleItemSort xsltStyleItemSort; +typedef xsltStyleItemSort *xsltStyleItemSortPtr; + +struct _xsltStyleItemSort { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *stype; /* sort */ + int has_stype; /* sort */ + int number; /* sort */ + const xmlChar *order; /* sort */ + int has_order; /* sort */ + int descending; /* sort */ + const xmlChar *lang; /* sort */ + int has_lang; /* sort */ + const xmlChar *case_order; /* sort */ + int lower_first; /* sort */ + + const xmlChar *use; + int has_use; + + const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ + + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ +}; + + +/** + * xsltStyleItemWhen: + * + * + * + * + * Allowed parent: xsl:choose + */ +typedef struct _xsltStyleItemWhen xsltStyleItemWhen; +typedef xsltStyleItemWhen *xsltStyleItemWhenPtr; + +struct _xsltStyleItemWhen { + XSLT_ITEM_COMMON_FIELDS + + const xmlChar *test; + xmlXPathCompExprPtr comp; +}; + +/** + * xsltStyleItemOtherwise: + * + * Allowed parent: xsl:choose + * + * + * + */ +typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise; +typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr; + +struct _xsltStyleItemOtherwise { + XSLT_ITEM_COMMON_FIELDS +}; + +typedef struct _xsltStyleItemInclude xsltStyleItemInclude; +typedef xsltStyleItemInclude *xsltStyleItemIncludePtr; + +struct _xsltStyleItemInclude { + XSLT_ITEM_COMMON_FIELDS + xsltDocumentPtr include; +}; + +/************************************************************************ + * * + * XSLT elements in forwards-compatible mode * + * * + ************************************************************************/ + +typedef struct _xsltStyleItemUknown xsltStyleItemUknown; +typedef xsltStyleItemUknown *xsltStyleItemUknownPtr; +struct _xsltStyleItemUknown { + XSLT_ITEM_COMMON_FIELDS +}; + + +/************************************************************************ + * * + * Extension elements * + * * + ************************************************************************/ + +/* + * xsltStyleItemExtElement: + * + * Reflects extension elements. + * + * NOTE: Due to the fact that the structure xsltElemPreComp is most + * probably already heavily in use out there by users, so we cannot + * easily change it, we'll create an intermediate structure which will + * hold an xsltElemPreCompPtr. + * BIG NOTE: The only problem I see here is that the user processes the + * content of the stylesheet tree, possibly he'll lookup the node->psvi + * fields in order to find subsequent extension functions. + * In this case, the user's code will break, since the node->psvi + * field will hold now the xsltStyleItemExtElementPtr and not + * the xsltElemPreCompPtr. + * However the place where the structure is anchored in the node-tree, + * namely node->psvi, has beed already once been moved from node->_private + * to node->psvi, so we have a precedent here, which, I think, should allow + * us to change such semantics without headaches. + */ +typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement; +typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr; +struct _xsltStyleItemExtElement { + XSLT_ITEM_COMMON_FIELDS + xsltElemPreCompPtr item; +}; + +/************************************************************************ + * * + * Literal result elements * + * * + ************************************************************************/ + +typedef struct _xsltEffectiveNs xsltEffectiveNs; +typedef xsltEffectiveNs *xsltEffectiveNsPtr; +struct _xsltEffectiveNs { + xsltEffectiveNsPtr nextInStore; /* storage next */ + xsltEffectiveNsPtr next; /* next item in the list */ + const xmlChar *prefix; + const xmlChar *nsName; + /* + * Indicates if eclared on the literal result element; dunno if really + * needed. + */ + int holdByElem; +}; + +/* + * Info for literal result elements. + * This will be set on the elem->psvi field and will be + * shared by literal result elements, which have the same + * excluded result namespaces; i.e., this *won't* be created uniquely + * for every literal result element. + */ +typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo; +typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr; +struct _xsltStyleItemLRElementInfo { + XSLT_ITEM_COMMON_FIELDS + /* + * @effectiveNs is the set of effective ns-nodes + * on the literal result element, which will be added to the result + * element if not already existing in the result tree. + * This means that excluded namespaces (via exclude-result-prefixes, + * extension-element-prefixes and the XSLT namespace) not added + * to the set. + * Namespace-aliasing was applied on the @effectiveNs. + */ + xsltEffectiveNsPtr effectiveNs; + +}; + +#ifdef XSLT_REFACTORED + +typedef struct _xsltNsAlias xsltNsAlias; +typedef xsltNsAlias *xsltNsAliasPtr; +struct _xsltNsAlias { + xsltNsAliasPtr next; /* next in the list */ + xmlNsPtr literalNs; + xmlNsPtr targetNs; + xmlDocPtr docOfTargetNs; +}; +#endif + +#ifdef XSLT_REFACTORED_XSLT_NSCOMP + +typedef struct _xsltNsMap xsltNsMap; +typedef xsltNsMap *xsltNsMapPtr; +struct _xsltNsMap { + xsltNsMapPtr next; /* next in the list */ + xmlDocPtr doc; + xmlNodePtr elem; /* the element holding the ns-decl */ + xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */ + const xmlChar *origNsName; /* the original XML namespace name */ + const xmlChar *newNsName; /* the mapped XML namespace name */ +}; +#endif + +/************************************************************************ + * * + * Compile-time structures for *internal* use only * + * * + ************************************************************************/ + +typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData; +typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr; + +typedef struct _xsltNsList xsltNsList; +typedef xsltNsList *xsltNsListPtr; +struct _xsltNsList { + xsltNsListPtr next; /* next in the list */ + xmlNsPtr ns; +}; + +/* +* xsltVarInfo: +* +* Used at compilation time for parameters and variables. +*/ +typedef struct _xsltVarInfo xsltVarInfo; +typedef xsltVarInfo *xsltVarInfoPtr; +struct _xsltVarInfo { + xsltVarInfoPtr next; /* next in the list */ + xsltVarInfoPtr prev; + int depth; /* the depth in the tree */ + const xmlChar *name; + const xmlChar *nsName; +}; + +/** + * xsltCompilerNodeInfo: + * + * Per-node information during compile-time. + */ +typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo; +typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr; +struct _xsltCompilerNodeInfo { + xsltCompilerNodeInfoPtr next; + xsltCompilerNodeInfoPtr prev; + xmlNodePtr node; + int depth; + xsltTemplatePtr templ; /* The owning template */ + int category; /* XSLT element, LR-element or + extension element */ + xsltStyleType type; + xsltElemPreCompPtr item; /* The compiled information */ + /* The current in-scope namespaces */ + xsltNsListContainerPtr inScopeNs; + /* The current excluded result namespaces */ + xsltPointerListPtr exclResultNs; + /* The current extension instruction namespaces */ + xsltPointerListPtr extElemNs; + + /* The current info for literal result elements. */ + xsltStyleItemLRElementInfoPtr litResElemInfo; + /* + * Set to 1 if in-scope namespaces changed, + * or excluded result namespaces changed, + * or extension element namespaces changed. + * This will trigger creation of new infos + * for literal result elements. + */ + int nsChanged; + int preserveWhitespace; + int stripWhitespace; + int isRoot; /* whether this is the stylesheet's root node */ + int forwardsCompat; /* whether forwards-compatible mode is enabled */ + /* whether the content of an extension element was processed */ + int extContentHandled; + /* the type of the current child */ + xsltStyleType curChildType; +}; + +/** + * XSLT_CCTXT: + * + * get pointer to compiler context + */ +#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt) + +typedef enum { + XSLT_ERROR_SEVERITY_ERROR = 0, + XSLT_ERROR_SEVERITY_WARNING +} xsltErrorSeverityType; + +typedef struct _xsltCompilerCtxt xsltCompilerCtxt; +typedef xsltCompilerCtxt *xsltCompilerCtxtPtr; +struct _xsltCompilerCtxt { + void *errorCtxt; /* user specific error context */ + /* + * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */ + xsltErrorSeverityType errSeverity; + int warnings; /* TODO: number of warnings found at + compilation */ + int errors; /* TODO: number of errors found at + compilation */ + xmlDictPtr dict; + xsltStylesheetPtr style; + int simplified; /* whether this is a simplified stylesheet */ + /* TODO: structured/unstructured error contexts. */ + int depth; /* Current depth of processing */ + + xsltCompilerNodeInfoPtr inode; + xsltCompilerNodeInfoPtr inodeList; + xsltCompilerNodeInfoPtr inodeLast; + xsltPointerListPtr tmpList; /* Used for various purposes */ + /* + * The XSLT version as specified by the stylesheet's root element. + */ + int isInclude; + int hasForwardsCompat; /* whether forwards-compatible mode was used + in a parsing episode */ + int maxNodeInfos; /* TEMP TODO: just for the interest */ + int maxLREs; /* TEMP TODO: just for the interest */ + /* + * In order to keep the old behaviour, applying strict rules of + * the spec can be turned off. This has effect only on special + * mechanisms like whitespace-stripping in the stylesheet. + */ + int strict; + xsltPrincipalStylesheetDataPtr psData; + xsltStyleItemUknownPtr unknownItem; + int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */ + xsltNsAliasPtr nsAliases; + xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */ + xsltVarInfoPtr ivar; /* topmost local variable/param. */ +}; + +#else /* XSLT_REFACTORED */ +/* +* The old structures before refactoring. +*/ + +/** + * _xsltStylePreComp: + * + * The in-memory structure corresponding to XSLT stylesheet constructs + * precomputed data. + */ +struct _xsltStylePreComp { + xsltElemPreCompPtr next; /* chained list */ + xsltStyleType type; /* type of the element */ + xsltTransformFunction func; /* handling function */ + xmlNodePtr inst; /* the instruction */ + + /* + * Pre computed values. + */ + + const xmlChar *stype; /* sort */ + int has_stype; /* sort */ + int number; /* sort */ + const xmlChar *order; /* sort */ + int has_order; /* sort */ + int descending; /* sort */ + const xmlChar *lang; /* sort */ + int has_lang; /* sort */ + const xmlChar *case_order; /* sort */ + int lower_first; /* sort */ + + const xmlChar *use; /* copy, element */ + int has_use; /* copy, element */ + + int noescape; /* text */ + + const xmlChar *name; /* element, attribute, pi */ + int has_name; /* element, attribute, pi */ + const xmlChar *ns; /* element */ + int has_ns; /* element */ + + const xmlChar *mode; /* apply-templates */ + const xmlChar *modeURI; /* apply-templates */ + + const xmlChar *test; /* if */ + + xsltTemplatePtr templ; /* call-template */ + + const xmlChar *select; /* sort, copy-of, value-of, apply-templates */ + + int ver11; /* document */ + const xmlChar *filename; /* document URL */ + int has_filename; /* document */ + + xsltNumberData numdata; /* number */ + + xmlXPathCompExprPtr comp; /* a precompiled XPath expression */ + xmlNsPtr *nsList; /* the namespaces in scope */ + int nsNr; /* the number of namespaces in scope */ +}; + +#endif /* XSLT_REFACTORED */ + + +/* + * The in-memory structure corresponding to an XSLT Variable + * or Param. + */ +typedef struct _xsltStackElem xsltStackElem; +typedef xsltStackElem *xsltStackElemPtr; +struct _xsltStackElem { + struct _xsltStackElem *next;/* chained list */ + xsltStylePreCompPtr comp; /* the compiled form */ + int computed; /* was the evaluation done */ + const xmlChar *name; /* the local part of the name QName */ + const xmlChar *nameURI; /* the URI part of the name QName */ + const xmlChar *select; /* the eval string */ + xmlNodePtr tree; /* the sequence constructor if no eval + string or the location */ + xmlXPathObjectPtr value; /* The value if computed */ + xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0) + which are bound to the variable's lifetime. */ + int level; /* the depth in the tree; + -1 if persistent (e.g. a given xsl:with-param) */ + xsltTransformContextPtr context; /* The transformation context; needed to cache + the variables */ + int flags; +}; + +#ifdef XSLT_REFACTORED + +struct _xsltPrincipalStylesheetData { + /* + * Namespace dictionary for ns-prefixes and ns-names: + * TODO: Shared between stylesheets, and XPath mechanisms. + * Not used yet. + */ + xmlDictPtr namespaceDict; + /* + * Global list of in-scope namespaces. + */ + xsltPointerListPtr inScopeNamespaces; + /* + * Global list of information for [xsl:]excluded-result-prefixes. + */ + xsltPointerListPtr exclResultNamespaces; + /* + * Global list of information for [xsl:]extension-element-prefixes. + */ + xsltPointerListPtr extElemNamespaces; + xsltEffectiveNsPtr effectiveNs; +#ifdef XSLT_REFACTORED_XSLT_NSCOMP + /* + * Namespace name map to get rid of string comparison of namespace names. + */ + xsltNsMapPtr nsMap; +#endif +}; + + +#endif +/* + * Note that we added a @compCtxt field to anchor an stylesheet compilation + * context, since, due to historical reasons, various compile-time function + * take only the stylesheet as argument and not a compilation context. + */ +struct _xsltStylesheet { + /* + * The stylesheet import relation is kept as a tree. + */ + struct _xsltStylesheet *parent; + struct _xsltStylesheet *next; + struct _xsltStylesheet *imports; + + xsltDocumentPtr docList; /* the include document list */ + + /* + * General data on the style sheet document. + */ + xmlDocPtr doc; /* the parsed XML stylesheet */ + xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and + preserve space elements */ + int stripAll; /* strip-space * (1) preserve-space * (-1) */ + xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */ + + /* + * Global variable or parameters. + */ + xsltStackElemPtr variables; /* linked list of param and variables */ + + /* + * Template descriptions. + */ + xsltTemplatePtr templates; /* the ordered list of templates */ + xmlHashTablePtr templatesHash; /* hash table or wherever compiled + templates information is stored */ + struct _xsltCompMatch *rootMatch; /* template based on / */ + struct _xsltCompMatch *keyMatch; /* template based on key() */ + struct _xsltCompMatch *elemMatch; /* template based on * */ + struct _xsltCompMatch *attrMatch; /* template based on @* */ + struct _xsltCompMatch *parentMatch; /* template based on .. */ + struct _xsltCompMatch *textMatch; /* template based on text() */ + struct _xsltCompMatch *piMatch; /* template based on + processing-instruction() */ + struct _xsltCompMatch *commentMatch; /* template based on comment() */ + + /* + * Namespace aliases. + * NOTE: Not used in the refactored code. + */ + xmlHashTablePtr nsAliases; /* the namespace alias hash tables */ + + /* + * Attribute sets. + */ + xmlHashTablePtr attributeSets;/* the attribute sets hash tables */ + + /* + * Namespaces. + * TODO: Eliminate this. + */ + xmlHashTablePtr nsHash; /* the set of namespaces in use: + ATTENTION: This is used for + execution of XPath expressions; unfortunately + it restricts the stylesheet to have distinct + prefixes. + TODO: We need to get rid of this. + */ + void *nsDefs; /* ATTENTION TODO: This is currently used to store + xsltExtDefPtr (in extensions.c) and + *not* xmlNsPtr. + */ + + /* + * Key definitions. + */ + void *keys; /* key definitions */ + + /* + * Output related stuff. + */ + xmlChar *method; /* the output method */ + xmlChar *methodURI; /* associated namespace if any */ + xmlChar *version; /* version string */ + xmlChar *encoding; /* encoding string */ + int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */ + + /* + * Number formatting. + */ + xsltDecimalFormatPtr decimalFormat; + int standalone; /* standalone = "yes" | "no" */ + xmlChar *doctypePublic; /* doctype-public string */ + xmlChar *doctypeSystem; /* doctype-system string */ + int indent; /* should output being indented */ + xmlChar *mediaType; /* media-type string */ + + /* + * Precomputed blocks. + */ + xsltElemPreCompPtr preComps;/* list of precomputed blocks */ + int warnings; /* number of warnings found at compilation */ + int errors; /* number of errors found at compilation */ + + xmlChar *exclPrefix; /* last excluded prefixes */ + xmlChar **exclPrefixTab; /* array of excluded prefixes */ + int exclPrefixNr; /* number of excluded prefixes in scope */ + int exclPrefixMax; /* size of the array */ + + void *_private; /* user defined data */ + + /* + * Extensions. + */ + xmlHashTablePtr extInfos; /* the extension data */ + int extrasNr; /* the number of extras required */ + + /* + * For keeping track of nested includes + */ + xsltDocumentPtr includes; /* points to last nested include */ + + /* + * dictionary: shared between stylesheet, context and documents. + */ + xmlDictPtr dict; + /* + * precompiled attribute value templates. + */ + void *attVTs; + /* + * if namespace-alias has an alias for the default stylesheet prefix + * NOTE: Not used in the refactored code. + */ + const xmlChar *defaultAlias; + /* + * bypass pre-processing (already done) (used in imports) + */ + int nopreproc; + /* + * all document text strings were internalized + */ + int internalized; + /* + * Literal Result Element as Stylesheet c.f. section 2.3 + */ + int literal_result; + /* + * The principal stylesheet + */ + xsltStylesheetPtr principal; +#ifdef XSLT_REFACTORED + /* + * Compilation context used during compile-time. + */ + xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */ + + xsltPrincipalStylesheetDataPtr principalData; +#endif + /* + * Forwards-compatible processing + */ + int forwards_compatible; + + xmlHashTablePtr namedTemplates; /* hash table of named templates */ + + xmlXPathContextPtr xpathCtxt; + + unsigned long opLimit; + unsigned long opCount; +}; + +typedef struct _xsltTransformCache xsltTransformCache; +typedef xsltTransformCache *xsltTransformCachePtr; +struct _xsltTransformCache { + xmlDocPtr RVT; + int nbRVT; + xsltStackElemPtr stackItems; + int nbStackItems; +#ifdef XSLT_DEBUG_PROFILE_CACHE + int dbgCachedRVTs; + int dbgReusedRVTs; + int dbgCachedVars; + int dbgReusedVars; +#endif +}; + +/* + * The in-memory structure corresponding to an XSLT Transformation. + */ +typedef enum { + XSLT_OUTPUT_XML = 0, + XSLT_OUTPUT_HTML, + XSLT_OUTPUT_TEXT +} xsltOutputType; + +typedef void * +(*xsltNewLocaleFunc)(const xmlChar *lang, int lowerFirst); +typedef void +(*xsltFreeLocaleFunc)(void *locale); +typedef xmlChar * +(*xsltGenSortKeyFunc)(void *locale, const xmlChar *lang); + +typedef enum { + XSLT_STATE_OK = 0, + XSLT_STATE_ERROR, + XSLT_STATE_STOPPED +} xsltTransformState; + +struct _xsltTransformContext { + xsltStylesheetPtr style; /* the stylesheet used */ + xsltOutputType type; /* the type of output */ + + xsltTemplatePtr templ; /* the current template */ + int templNr; /* Nb of templates in the stack */ + int templMax; /* Size of the templtes stack */ + xsltTemplatePtr *templTab; /* the template stack */ + + xsltStackElemPtr vars; /* the current variable list */ + int varsNr; /* Nb of variable list in the stack */ + int varsMax; /* Size of the variable list stack */ + xsltStackElemPtr *varsTab; /* the variable list stack */ + int varsBase; /* the var base for current templ */ + + /* + * Extensions + */ + xmlHashTablePtr extFunctions; /* the extension functions */ + xmlHashTablePtr extElements; /* the extension elements */ + xmlHashTablePtr extInfos; /* the extension data */ + + const xmlChar *mode; /* the current mode */ + const xmlChar *modeURI; /* the current mode URI */ + + xsltDocumentPtr docList; /* the document list */ + + xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */ + xmlNodePtr node; /* the current node being processed */ + xmlNodeSetPtr nodeList; /* the current node list */ + /* xmlNodePtr current; the node */ + + xmlDocPtr output; /* the resulting document */ + xmlNodePtr insert; /* the insertion node */ + + xmlXPathContextPtr xpathCtxt; /* the XPath context */ + xsltTransformState state; /* the current state */ + + /* + * Global variables + */ + xmlHashTablePtr globalVars; /* the global variables and params */ + + xmlNodePtr inst; /* the instruction in the stylesheet */ + + int xinclude; /* should XInclude be processed */ + + const char * outputFile; /* the output URI if known */ + + int profile; /* is this run profiled */ + long prof; /* the current profiled value */ + int profNr; /* Nb of templates in the stack */ + int profMax; /* Size of the templtaes stack */ + long *profTab; /* the profile template stack */ + + void *_private; /* user defined data */ + + int extrasNr; /* the number of extras used */ + int extrasMax; /* the number of extras allocated */ + xsltRuntimeExtraPtr extras; /* extra per runtime information */ + + xsltDocumentPtr styleList; /* the stylesheet docs list */ + void * sec; /* the security preferences if any */ + + xmlGenericErrorFunc error; /* a specific error handler */ + void * errctx; /* context for the error handler */ + + xsltSortFunc sortfunc; /* a ctxt specific sort routine */ + + /* + * handling of temporary Result Value Tree + * (XSLT 1.0 term: "Result Tree Fragment") + */ + xmlDocPtr tmpRVT; /* list of RVT without persistance */ + xmlDocPtr persistRVT; /* list of persistant RVTs */ + int ctxtflags; /* context processing flags */ + + /* + * Speed optimization when coalescing text nodes + */ + const xmlChar *lasttext; /* last text node content */ + int lasttsize; /* last text node size */ + int lasttuse; /* last text node use */ + /* + * Per Context Debugging + */ + int debugStatus; /* the context level debug status */ + unsigned long* traceCode; /* pointer to the variable holding the mask */ + + int parserOptions; /* parser options xmlParserOption */ + + /* + * dictionary: shared between stylesheet, context and documents. + */ + xmlDictPtr dict; + xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */ + /* + * all document text strings are internalized + */ + int internalized; + int nbKeys; + int hasTemplKeyPatterns; + xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */ + xmlNodePtr initialContextNode; + xmlDocPtr initialContextDoc; + xsltTransformCachePtr cache; + void *contextVariable; /* the current variable item */ + xmlDocPtr localRVT; /* list of local tree fragments; will be freed when + the instruction which created the fragment + exits */ + xmlDocPtr localRVTBase; /* Obsolete */ + int keyInitLevel; /* Needed to catch recursive keys issues */ + int depth; /* Needed to catch recursions */ + int maxTemplateDepth; + int maxTemplateVars; + unsigned long opLimit; + unsigned long opCount; + int sourceDocDirty; + unsigned long currentId; /* For generate-id() */ + + xsltNewLocaleFunc newLocale; + xsltFreeLocaleFunc freeLocale; + xsltGenSortKeyFunc genSortKey; +}; + +/** + * CHECK_STOPPED: + * + * Macro to check if the XSLT processing should be stopped. + * Will return from the function. + */ +#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return; + +/** + * CHECK_STOPPEDE: + * + * Macro to check if the XSLT processing should be stopped. + * Will goto the error: label. + */ +#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error; + +/** + * CHECK_STOPPED0: + * + * Macro to check if the XSLT processing should be stopped. + * Will return from the function with a 0 value. + */ +#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0); + +/* + * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about + * possible incompatibilities between function pointers and object + * pointers. It is defined in libxml/hash.h within recent versions + * of libxml2, but is put here for compatibility. + */ +#ifndef XML_CAST_FPTR +/** + * XML_CAST_FPTR: + * @fptr: pointer to a function + * + * Macro to do a casting from an object pointer to a + * function pointer without encountering a warning from + * gcc + * + * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) + * This macro violated ISO C aliasing rules (gcc4 on s390 broke) + * so it is disabled now + */ + +#define XML_CAST_FPTR(fptr) fptr +#endif +/* + * Functions associated to the internal types +xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet, + xmlChar *name); + */ +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltNewStylesheet (void); +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltParseStylesheetFile (const xmlChar* filename); +XSLTPUBFUN void XSLTCALL + xsltFreeStylesheet (xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltIsBlank (xmlChar *str); +XSLTPUBFUN void XSLTCALL + xsltFreeStackElemList (xsltStackElemPtr elem); +XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL + xsltDecimalFormatGetByName(xsltStylesheetPtr style, + xmlChar *name); +XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL + xsltDecimalFormatGetByQName(xsltStylesheetPtr style, + const xmlChar *nsUri, + const xmlChar *name); + +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltParseStylesheetProcess(xsltStylesheetPtr ret, + xmlDocPtr doc); +XSLTPUBFUN void XSLTCALL + xsltParseStylesheetOutput(xsltStylesheetPtr style, + xmlNodePtr cur); +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltParseStylesheetDoc (xmlDocPtr doc); +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltParseStylesheetImportedDoc(xmlDocPtr doc, + xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltParseStylesheetUser(xsltStylesheetPtr style, + xmlDocPtr doc); +XSLTPUBFUN xsltStylesheetPtr XSLTCALL + xsltLoadStylesheetPI (xmlDocPtr doc); +XSLTPUBFUN void XSLTCALL + xsltNumberFormat (xsltTransformContextPtr ctxt, + xsltNumberDataPtr data, + xmlNodePtr node); +XSLTPUBFUN xmlXPathError XSLTCALL + xsltFormatNumberConversion(xsltDecimalFormatPtr self, + xmlChar *format, + double number, + xmlChar **result); + +XSLTPUBFUN void XSLTCALL + xsltParseTemplateContent(xsltStylesheetPtr style, + xmlNodePtr templ); +XSLTPUBFUN int XSLTCALL + xsltAllocateExtra (xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltAllocateExtraCtxt (xsltTransformContextPtr ctxt); +/* + * Extra functions for Result Value Trees + */ +XSLTPUBFUN xmlDocPtr XSLTCALL + xsltCreateRVT (xsltTransformContextPtr ctxt); +XSLTPUBFUN int XSLTCALL + xsltRegisterTmpRVT (xsltTransformContextPtr ctxt, + xmlDocPtr RVT); +XSLTPUBFUN int XSLTCALL + xsltRegisterLocalRVT (xsltTransformContextPtr ctxt, + xmlDocPtr RVT); +XSLTPUBFUN int XSLTCALL + xsltRegisterPersistRVT (xsltTransformContextPtr ctxt, + xmlDocPtr RVT); +XSLTPUBFUN int XSLTCALL + xsltExtensionInstructionResultRegister( + xsltTransformContextPtr ctxt, + xmlXPathObjectPtr obj); +XSLTPUBFUN int XSLTCALL + xsltExtensionInstructionResultFinalize( + xsltTransformContextPtr ctxt); +XSLTPUBFUN int XSLTCALL + xsltFlagRVTs( + xsltTransformContextPtr ctxt, + xmlXPathObjectPtr obj, + int val); +XSLTPUBFUN void XSLTCALL + xsltFreeRVTs (xsltTransformContextPtr ctxt); +XSLTPUBFUN void XSLTCALL + xsltReleaseRVT (xsltTransformContextPtr ctxt, + xmlDocPtr RVT); +/* + * Extra functions for Attribute Value Templates + */ +XSLTPUBFUN void XSLTCALL + xsltCompileAttr (xsltStylesheetPtr style, + xmlAttrPtr attr); +XSLTPUBFUN xmlChar * XSLTCALL + xsltEvalAVT (xsltTransformContextPtr ctxt, + void *avt, + xmlNodePtr node); +XSLTPUBFUN void XSLTCALL + xsltFreeAVTList (void *avt); + +/* + * Extra function for successful xsltCleanupGlobals / xsltInit sequence. + */ + +XSLTPUBFUN void XSLTCALL + xsltUninit (void); + +/************************************************************************ + * * + * Compile-time functions for *internal* use only * + * * + ************************************************************************/ + +#ifdef XSLT_REFACTORED +XSLTPUBFUN void XSLTCALL + xsltParseSequenceConstructor( + xsltCompilerCtxtPtr cctxt, + xmlNodePtr start); +XSLTPUBFUN int XSLTCALL + xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt, + xmlNodePtr elem); +#ifdef XSLT_REFACTORED_XSLT_NSCOMP +XSLTPUBFUN int XSLTCALL + xsltRestoreDocumentNamespaces( + xsltNsMapPtr ns, + xmlDocPtr doc); +#endif +#endif /* XSLT_REFACTORED */ + +/************************************************************************ + * * + * Transformation-time functions for *internal* use only * + * * + ************************************************************************/ +XSLTPUBFUN int XSLTCALL + xsltInitCtxtKey (xsltTransformContextPtr ctxt, + xsltDocumentPtr doc, + xsltKeyDefPtr keyd); +XSLTPUBFUN int XSLTCALL + xsltInitAllDocKeys (xsltTransformContextPtr ctxt); +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLT_H__ */ + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..4f4b7f1f65a9f662257cafa823e4f6f70dc9389b --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h @@ -0,0 +1,146 @@ +/* + * Summary: compile-time version information for the XSLT engine + * Description: compile-time version information for the XSLT engine + * this module is autogenerated. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLTCONFIG_H__ +#define __XML_XSLTCONFIG_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * LIBXSLT_DOTTED_VERSION: + * + * the version string like "1.2.3" + */ +#define LIBXSLT_DOTTED_VERSION "1.1.43" + +/** + * LIBXSLT_VERSION: + * + * the version number: 1.2.3 value is 10203 + */ +#define LIBXSLT_VERSION 10143 + +/** + * LIBXSLT_VERSION_STRING: + * + * the version number string, 1.2.3 value is "10203" + */ +#define LIBXSLT_VERSION_STRING "10143" + +/** + * LIBXSLT_VERSION_EXTRA: + * + * extra version information, used to show a Git commit description + */ +#define LIBXSLT_VERSION_EXTRA "" + +/** + * WITH_XSLT_DEBUG: + * + * Activate the compilation of the debug reporting. Speed penalty + * is insignifiant and being able to run xsltpoc -v is useful. On + * by default unless --without-debug is passed to configure + */ +#if 0 +#define WITH_XSLT_DEBUG +#endif + +/** + * XSLT_NEED_TRIO: + * + * should be activated if the existing libc library lacks some of the + * string formatting function, in that case reuse the Trio ones already + * compiled in the libxml2 library. + */ + +#if 0 +#define XSLT_NEED_TRIO +#endif +#ifdef __VMS +#define HAVE_SYS_STAT_H 1 +#ifndef XSLT_NEED_TRIO +#define XSLT_NEED_TRIO +#endif +#endif + +#ifdef XSLT_NEED_TRIO +#define TRIO_REPLACE_STDIO +#endif + +/** + * WITH_XSLT_DEBUGGER: + * + * Activate the compilation of the debugger support. Speed penalty + * is insignifiant. + * On by default unless --without-debugger is passed to configure + */ +#if 0 +#ifndef WITH_DEBUGGER +#define WITH_DEBUGGER +#endif +#endif + +/** + * WITH_PROFILER: + * + * Activate the compilation of the profiler. Speed penalty + * is insignifiant. + * On by default unless --without-profiler is passed to configure + */ +#if 1 +#ifndef WITH_PROFILER +#define WITH_PROFILER +#endif +#endif + +/** + * WITH_MODULES: + * + * Whether module support is configured into libxslt + * Note: no default module path for win32 platforms + */ +#if 0 +#ifndef WITH_MODULES +#define WITH_MODULES +#endif +#define LIBXSLT_DEFAULT_PLUGINS_PATH() "" +#endif + +/** + * LIBXSLT_ATTR_FORMAT: + * + * This macro is used to indicate to GCC the parameters are printf-like + */ +#ifdef __GNUC__ +#define LIBXSLT_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +#else +#define LIBXSLT_ATTR_FORMAT(fmt,args) +#endif + +/** + * LIBXSLT_PUBLIC: + * + * This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows + */ +#if !defined LIBXSLT_PUBLIC +#if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC +#define LIBXSLT_PUBLIC __declspec(dllimport) +#else +#define LIBXSLT_PUBLIC +#endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLTCONFIG_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h new file mode 100644 index 0000000000000000000000000000000000000000..c8be58d3dbef5e311da65a7ef9bdf9074bcc483d --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h @@ -0,0 +1,44 @@ +/* + * Summary: Locale handling + * Description: Interfaces for locale handling. Needed for language dependent + * sorting. + * + * Copy: See Copyright for the status of this software. + * + * Author: Nick Wellnhofer + */ + +#ifndef __XML_XSLTLOCALE_H__ +#define __XML_XSLTLOCALE_H__ + +#include +#include "xsltexports.h" + +#ifdef __cplusplus +extern "C" { +#endif + +XSLTPUBFUN void * XSLTCALL + xsltNewLocale (const xmlChar *langName, + int lowerFirst); +XSLTPUBFUN void XSLTCALL + xsltFreeLocale (void *locale); +XSLTPUBFUN xmlChar * XSLTCALL + xsltStrxfrm (void *locale, + const xmlChar *string); +XSLTPUBFUN void XSLTCALL + xsltFreeLocales (void); + +/* Backward compatibility */ +typedef void *xsltLocale; +typedef xmlChar xsltLocaleChar; +XSLTPUBFUN int XSLTCALL + xsltLocaleStrcmp (void *locale, + const xmlChar *str1, + const xmlChar *str2); + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLTLOCALE_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h new file mode 100644 index 0000000000000000000000000000000000000000..2514774b3f11a0c0dd3069484b31c8a282d1d411 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h @@ -0,0 +1,343 @@ +/* + * Summary: set of utilities for the XSLT engine + * Description: interfaces for the utilities module of the XSLT engine. + * things like message handling, profiling, and other + * generally useful routines. + * + * Copy: See Copyright for the status of this software. + * + * Author: Daniel Veillard + */ + +#ifndef __XML_XSLTUTILS_H__ +#define __XML_XSLTUTILS_H__ + +#include +#include +#include +#include +#include "xsltexports.h" +#include "xsltInternals.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * XSLT_TODO: + * + * Macro to flag unimplemented blocks. + */ +#define XSLT_TODO \ + xsltGenericError(xsltGenericErrorContext, \ + "Unimplemented block at %s:%d\n", \ + __FILE__, __LINE__); + +/** + * XSLT_STRANGE: + * + * Macro to flag that a problem was detected internally. + */ +#define XSLT_STRANGE \ + xsltGenericError(xsltGenericErrorContext, \ + "Internal error at %s:%d\n", \ + __FILE__, __LINE__); + +/** + * IS_XSLT_ELEM: + * + * Checks that the element pertains to XSLT namespace. + */ +#define IS_XSLT_ELEM(n) \ + (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \ + ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE))) + +/** + * IS_XSLT_NAME: + * + * Checks the value of an element in XSLT namespace. + */ +#define IS_XSLT_NAME(n, val) \ + (xmlStrEqual((n)->name, (const xmlChar *) (val))) + +/** + * IS_XSLT_REAL_NODE: + * + * Check that a node is a 'real' one: document, element, text or attribute. + */ +#define IS_XSLT_REAL_NODE(n) \ + (((n) != NULL) && \ + (((n)->type == XML_ELEMENT_NODE) || \ + ((n)->type == XML_TEXT_NODE) || \ + ((n)->type == XML_CDATA_SECTION_NODE) || \ + ((n)->type == XML_ATTRIBUTE_NODE) || \ + ((n)->type == XML_DOCUMENT_NODE) || \ + ((n)->type == XML_HTML_DOCUMENT_NODE) || \ + ((n)->type == XML_COMMENT_NODE) || \ + ((n)->type == XML_PI_NODE))) + +/* + * Our own version of namespaced attributes lookup. + */ +XSLTPUBFUN xmlChar * XSLTCALL + xsltGetNsProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *nameSpace); +XSLTPUBFUN const xmlChar * XSLTCALL + xsltGetCNsProp (xsltStylesheetPtr style, + xmlNodePtr node, + const xmlChar *name, + const xmlChar *nameSpace); +XSLTPUBFUN int XSLTCALL + xsltGetUTF8Char (const unsigned char *utf, + int *len); +#ifdef IN_LIBXSLT +/** DOC_DISABLE */ +XSLTPUBFUN int XSLTCALL + xsltGetUTF8CharZ (const unsigned char *utf, + int *len); +/** DOC_ENABLE */ +#endif + +/* + * XSLT Debug Tracing Tracing Types + */ +typedef enum { + XSLT_TRACE_ALL = -1, + XSLT_TRACE_NONE = 0, + XSLT_TRACE_COPY_TEXT = 1<<0, + XSLT_TRACE_PROCESS_NODE = 1<<1, + XSLT_TRACE_APPLY_TEMPLATE = 1<<2, + XSLT_TRACE_COPY = 1<<3, + XSLT_TRACE_COMMENT = 1<<4, + XSLT_TRACE_PI = 1<<5, + XSLT_TRACE_COPY_OF = 1<<6, + XSLT_TRACE_VALUE_OF = 1<<7, + XSLT_TRACE_CALL_TEMPLATE = 1<<8, + XSLT_TRACE_APPLY_TEMPLATES = 1<<9, + XSLT_TRACE_CHOOSE = 1<<10, + XSLT_TRACE_IF = 1<<11, + XSLT_TRACE_FOR_EACH = 1<<12, + XSLT_TRACE_STRIP_SPACES = 1<<13, + XSLT_TRACE_TEMPLATES = 1<<14, + XSLT_TRACE_KEYS = 1<<15, + XSLT_TRACE_VARIABLES = 1<<16 +} xsltDebugTraceCodes; + +/** + * XSLT_TRACE: + * + * Control the type of xsl debugtrace messages emitted. + */ +#define XSLT_TRACE(ctxt,code,call) \ + if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \ + call + +XSLTPUBFUN void XSLTCALL + xsltDebugSetDefaultTrace(xsltDebugTraceCodes val); +XSLTPUBFUN xsltDebugTraceCodes XSLTCALL + xsltDebugGetDefaultTrace(void); + +/* + * XSLT specific error and debug reporting functions. + */ +XSLTPUBVAR xmlGenericErrorFunc xsltGenericError; +XSLTPUBVAR void *xsltGenericErrorContext; +XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug; +XSLTPUBVAR void *xsltGenericDebugContext; + +XSLTPUBFUN void XSLTCALL + xsltPrintErrorContext (xsltTransformContextPtr ctxt, + xsltStylesheetPtr style, + xmlNodePtr node); +XSLTPUBFUN void XSLTCALL + xsltMessage (xsltTransformContextPtr ctxt, + xmlNodePtr node, + xmlNodePtr inst); +XSLTPUBFUN void XSLTCALL + xsltSetGenericErrorFunc (void *ctx, + xmlGenericErrorFunc handler); +XSLTPUBFUN void XSLTCALL + xsltSetGenericDebugFunc (void *ctx, + xmlGenericErrorFunc handler); +XSLTPUBFUN void XSLTCALL + xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt, + void *ctx, + xmlGenericErrorFunc handler); +XSLTPUBFUN void XSLTCALL + xsltTransformError (xsltTransformContextPtr ctxt, + xsltStylesheetPtr style, + xmlNodePtr node, + const char *msg, + ...) LIBXSLT_ATTR_FORMAT(4,5); + +XSLTPUBFUN int XSLTCALL + xsltSetCtxtParseOptions (xsltTransformContextPtr ctxt, + int options); +/* + * Sorting. + */ + +XSLTPUBFUN void XSLTCALL + xsltDocumentSortFunction (xmlNodeSetPtr list); +XSLTPUBFUN void XSLTCALL + xsltSetSortFunc (xsltSortFunc handler); +XSLTPUBFUN void XSLTCALL + xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt, + xsltSortFunc handler); +XSLTPUBFUN void XSLTCALL + xsltSetCtxtLocaleHandlers (xsltTransformContextPtr ctxt, + xsltNewLocaleFunc newLocale, + xsltFreeLocaleFunc freeLocale, + xsltGenSortKeyFunc genSortKey); +XSLTPUBFUN void XSLTCALL + xsltDefaultSortFunction (xsltTransformContextPtr ctxt, + xmlNodePtr *sorts, + int nbsorts); +XSLTPUBFUN void XSLTCALL + xsltDoSortFunction (xsltTransformContextPtr ctxt, + xmlNodePtr * sorts, + int nbsorts); +XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL + xsltComputeSortResult (xsltTransformContextPtr ctxt, + xmlNodePtr sort); + +/* + * QNames handling. + */ + +XSLTPUBFUN const xmlChar * XSLTCALL + xsltSplitQName (xmlDictPtr dict, + const xmlChar *name, + const xmlChar **prefix); +XSLTPUBFUN const xmlChar * XSLTCALL + xsltGetQNameURI (xmlNodePtr node, + xmlChar **name); + +XSLTPUBFUN const xmlChar * XSLTCALL + xsltGetQNameURI2 (xsltStylesheetPtr style, + xmlNodePtr node, + const xmlChar **name); + +/* + * Output, reuse libxml I/O buffers. + */ +XSLTPUBFUN int XSLTCALL + xsltSaveResultTo (xmlOutputBufferPtr buf, + xmlDocPtr result, + xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltSaveResultToFilename (const char *URI, + xmlDocPtr result, + xsltStylesheetPtr style, + int compression); +XSLTPUBFUN int XSLTCALL + xsltSaveResultToFile (FILE *file, + xmlDocPtr result, + xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltSaveResultToFd (int fd, + xmlDocPtr result, + xsltStylesheetPtr style); +XSLTPUBFUN int XSLTCALL + xsltSaveResultToString (xmlChar **doc_txt_ptr, + int * doc_txt_len, + xmlDocPtr result, + xsltStylesheetPtr style); + +/* + * XPath interface + */ +XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL + xsltXPathCompile (xsltStylesheetPtr style, + const xmlChar *str); +XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL + xsltXPathCompileFlags (xsltStylesheetPtr style, + const xmlChar *str, + int flags); + +#ifdef IN_LIBXSLT +/** DOC_DISABLE */ +#define XSLT_SOURCE_NODE_MASK 15u +#define XSLT_SOURCE_NODE_HAS_KEY 1u +#define XSLT_SOURCE_NODE_HAS_ID 2u +int +xsltGetSourceNodeFlags(xmlNodePtr node); +int +xsltSetSourceNodeFlags(xsltTransformContextPtr ctxt, xmlNodePtr node, + int flags); +int +xsltClearSourceNodeFlags(xmlNodePtr node, int flags); +void ** +xsltGetPSVIPtr(xmlNodePtr cur); +/** DOC_ENABLE */ +#endif + +#ifdef WITH_PROFILER +/* + * Profiling. + */ +XSLTPUBFUN void XSLTCALL + xsltSaveProfiling (xsltTransformContextPtr ctxt, + FILE *output); +XSLTPUBFUN xmlDocPtr XSLTCALL + xsltGetProfileInformation (xsltTransformContextPtr ctxt); + +XSLTPUBFUN long XSLTCALL + xsltTimestamp (void); +XSLTPUBFUN void XSLTCALL + xsltCalibrateAdjust (long delta); +#endif + +/** + * XSLT_TIMESTAMP_TICS_PER_SEC: + * + * Sampling precision for profiling + */ +#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l + +/* + * Hooks for the debugger. + */ + +typedef enum { + XSLT_DEBUG_NONE = 0, /* no debugging allowed */ + XSLT_DEBUG_INIT, + XSLT_DEBUG_STEP, + XSLT_DEBUG_STEPOUT, + XSLT_DEBUG_NEXT, + XSLT_DEBUG_STOP, + XSLT_DEBUG_CONT, + XSLT_DEBUG_RUN, + XSLT_DEBUG_RUN_RESTART, + XSLT_DEBUG_QUIT +} xsltDebugStatusCodes; + +XSLTPUBVAR int xslDebugStatus; + +typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node, + xsltTemplatePtr templ, xsltTransformContextPtr ctxt); +typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source); +typedef void (*xsltDropCallCallback) (void); + +XSLTPUBFUN int XSLTCALL + xsltGetDebuggerStatus (void); +#ifdef WITH_DEBUGGER +XSLTPUBFUN void XSLTCALL + xsltSetDebuggerStatus (int value); +XSLTPUBFUN int XSLTCALL + xsltSetDebuggerCallbacks (int no, void *block); +XSLTPUBFUN int XSLTCALL + xslAddCall (xsltTemplatePtr templ, + xmlNodePtr source); +XSLTPUBFUN void XSLTCALL + xslDropCall (void); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __XML_XSLTUTILS_H__ */ + + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/builtin_types.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/builtin_types.h new file mode 100644 index 0000000000000000000000000000000000000000..5247c40807f0dd36a886513ab1bff5d2977364db --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/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/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_awbarrier_primitives.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_awbarrier_primitives.h new file mode 100644 index 0000000000000000000000000000000000000000..5562ef3f6afeb7fce4bad4cb8067b3cb1b9a690f --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_awbarrier_primitives.h @@ -0,0 +1,109 @@ +/* + * 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. + */ + +#ifndef _CUDA_AWBARRIER_PRIMITIVES_H_ +#define _CUDA_AWBARRIER_PRIMITIVES_H_ + +#include "cuda_awbarrier_helpers.h" + +#if !defined(_CUDA_AWBARRIER_SM_TARGET) +# error This file requires compute capability 7.0 or greater. +#endif + +_CUDA_AWBARRIER_STATIC_QUALIFIER __host__ +uint32_t __mbarrier_maximum_count() { + return _CUDA_AWBARRIER_MAX_COUNT; +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +void __mbarrier_init(__mbarrier_t* barrier, uint32_t expected_count) { + _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_init(barrier, expected_count); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +void __mbarrier_inval(__mbarrier_t* barrier) { + _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_inval(barrier); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +__mbarrier_token_t __mbarrier_arrive(__mbarrier_t* barrier) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_arrive_drop(barrier); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +__mbarrier_token_t __mbarrier_arrive_and_drop(__mbarrier_t* barrier) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_arrive_drop(barrier); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +bool __mbarrier_test_wait(__mbarrier_t* barrier, __mbarrier_token_t token) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_test_wait(barrier, token); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +uint32_t __mbarrier_token_pending_count(__mbarrier_token_t token) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_token_pending_count(token); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +bool __mbarrier_test_wait_parity(__mbarrier_t* barrier, bool phase_parity) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_test_wait_parity(barrier, phase_parity); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +bool __mbarrier_try_wait(__mbarrier_t* barrier, __mbarrier_token_t token, uint32_t max_sleep_nanosec) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_try_wait(barrier, token, max_sleep_nanosec); +} + +_CUDA_AWBARRIER_STATIC_QUALIFIER +bool __mbarrier_try_wait_parity(__mbarrier_t* barrier, bool phase_parity, uint32_t max_sleep_nanosec) { + return _CUDA_AWBARRIER_INTERNAL_NAMESPACE::awbarrier_try_wait_parity(barrier, phase_parity, max_sleep_nanosec); +} + +#endif /* !_CUDA_AWBARRIER_PRIMITIVES_H_ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_fp16.hpp b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_fp16.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f0eb872db456a661133a1a90bfed36864ff47ebf --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_fp16.hpp @@ -0,0 +1,3483 @@ +/* +* Copyright 1993-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(__CUDA_FP16_HPP__) +#define __CUDA_FP16_HPP__ + +#if !defined(__CUDA_FP16_H__) +#error "Do not include this file directly. Instead, include cuda_fp16.h." +#endif + +#if !defined(IF_DEVICE_OR_CUDACC) +#if defined(__CUDACC__) + #define IF_DEVICE_OR_CUDACC(d, c, f) NV_IF_ELSE_TARGET(NV_IS_DEVICE, d, c) +#else + #define IF_DEVICE_OR_CUDACC(d, c, f) NV_IF_ELSE_TARGET(NV_IS_DEVICE, d, f) +#endif +#endif + +/* Macros for half & half2 binary arithmetic */ +#define __BINARY_OP_HALF_MACRO(name) /* do */ {\ + __half val; \ + asm( "{" __CUDA_FP16_STRINGIFY(name) ".f16 %0,%1,%2;\n}" \ + :"=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a)),"h"(__HALF_TO_CUS(b))); \ + return val; \ +} /* while(0) */ +#define __BINARY_OP_HALF2_MACRO(name) /* do */ {\ + __half2 val; \ + asm( "{" __CUDA_FP16_STRINGIFY(name) ".f16x2 %0,%1,%2;\n}" \ + :"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)),"r"(__HALF2_TO_CUI(b))); \ + return val; \ +} /* while(0) */ +#define __TERNARY_OP_HALF_MACRO(name) /* do */ {\ + __half val; \ + asm( "{" __CUDA_FP16_STRINGIFY(name) ".f16 %0,%1,%2,%3;\n}" \ + :"=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a)),"h"(__HALF_TO_CUS(b)),"h"(__HALF_TO_CUS(c))); \ + return val; \ +} /* while(0) */ +#define __TERNARY_OP_HALF2_MACRO(name) /* do */ {\ + __half2 val; \ + asm( "{" __CUDA_FP16_STRINGIFY(name) ".f16x2 %0,%1,%2,%3;\n}" \ + :"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)),"r"(__HALF2_TO_CUI(b)),"r"(__HALF2_TO_CUI(c))); \ + return val; \ +} /* while(0) */ + +/* All other definitions in this file are only visible to C++ compilers */ +#if defined(__cplusplus) + +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines floating-point positive infinity value for the \p half data type + */ +#define CUDART_INF_FP16 __ushort_as_half((unsigned short)0x7C00U) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines canonical NaN value for the \p half data type + */ +#define CUDART_NAN_FP16 __ushort_as_half((unsigned short)0x7FFFU) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines a minimum representable (denormalized) value for the \p half data type + */ +#define CUDART_MIN_DENORM_FP16 __ushort_as_half((unsigned short)0x0001U) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines a maximum representable value for the \p half data type + */ +#define CUDART_MAX_NORMAL_FP16 __ushort_as_half((unsigned short)0x7BFFU) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines a negative zero value for the \p half data type + */ +#define CUDART_NEG_ZERO_FP16 __ushort_as_half((unsigned short)0x8000U) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines a positive zero value for the \p half data type + */ +#define CUDART_ZERO_FP16 __ushort_as_half((unsigned short)0x0000U) +/** + * \ingroup CUDA_MATH_INTRINSIC_HALF_CONSTANTS + * \brief Defines a value of 1.0 for the \p half data type + */ +#define CUDART_ONE_FP16 __ushort_as_half((unsigned short)0x3C00U) + +#if !(defined __DOXYGEN_ONLY__) + +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const __half_raw &hr) { __x = hr.x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ volatile __half &__half::operator=(const __half_raw &hr) volatile { __x = hr.x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ volatile __half &__half::operator=(const volatile __half_raw &hr) volatile { __x = hr.x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator __half_raw() const { __half_raw ret; ret.x = __x; return ret; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator __half_raw() const volatile { __half_raw ret; ret.x = __x; return ret; } +#if !defined(__CUDA_NO_HALF_CONVERSIONS__) +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator float() const { return __half2float(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const float f) { __x = __float2half(f).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const double f) { __x = __double2half(f).__x; return *this; } +#if !(defined __CUDA_FP16_DISABLE_IMPLICIT_INTEGER_CONVERTS_FOR_HOST_COMPILERS__) || (defined __CUDACC__) +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator signed char() const { return __half2char_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator unsigned char() const { return __half2uchar_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator char() const { + char value; + /* Suppress VS warning: warning C4127: conditional expression is constant */ +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (push) +#pragma warning (disable: 4127) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + if (((char)-1) < (char)0) +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (pop) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + { + value = static_cast(__half2char_rz(*this)); + } + else + { + value = static_cast(__half2uchar_rz(*this)); + } + return value; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator short() const { return __half2short_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator unsigned short() const { return __half2ushort_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator int() const { return __half2int_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator unsigned int() const { return __half2uint_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator long() const { + long retval; + /* Suppress VS warning: warning C4127: conditional expression is constant */ +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (push) +#pragma warning (disable: 4127) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + if (sizeof(long) == sizeof(long long)) +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (pop) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + { + retval = static_cast(__half2ll_rz(*this)); + } + else + { + retval = static_cast(__half2int_rz(*this)); + } + return retval; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator unsigned long() const { + unsigned long retval; + /* Suppress VS warning: warning C4127: conditional expression is constant */ +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (push) +#pragma warning (disable: 4127) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + if (sizeof(unsigned long) == sizeof(unsigned long long)) +#if defined(_MSC_VER) && !defined(__CUDA_ARCH__) +#pragma warning (pop) +#endif /* _MSC_VER && !defined(__CUDA_ARCH__) */ + { + retval = static_cast(__half2ull_rz(*this)); + } + else + { + retval = static_cast(__half2uint_rz(*this)); + } + return retval; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator long long() const { return __half2ll_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half::operator unsigned long long() const { return __half2ull_rz(*this); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const short val) { __x = __short2half_rn(val).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const unsigned short val) { __x = __ushort2half_rn(val).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const int val) { __x = __int2half_rn(val).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const unsigned int val) { __x = __uint2half_rn(val).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const long long val) { __x = __ll2half_rn(val).__x; return *this; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half &__half::operator=(const unsigned long long val) { __x = __ull2half_rn(val).__x; return *this; } + +#endif /* #if !(defined __CUDA_FP16_DISABLE_IMPLICIT_INTEGER_CONVERTS_FOR_HOST_COMPILERS__) || (defined __CUDACC__) */ +#endif /* !defined(__CUDA_NO_HALF_CONVERSIONS__) */ +#if !defined(__CUDA_NO_HALF_OPERATORS__) +/* Some basic arithmetic operations expected of a built-in */ +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator+(const __half &lh, const __half &rh) { return __hadd(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator-(const __half &lh, const __half &rh) { return __hsub(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator*(const __half &lh, const __half &rh) { return __hmul(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator/(const __half &lh, const __half &rh) { return __hdiv(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator+=(__half &lh, const __half &rh) { lh = __hadd(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator-=(__half &lh, const __half &rh) { lh = __hsub(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator*=(__half &lh, const __half &rh) { lh = __hmul(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator/=(__half &lh, const __half &rh) { lh = __hdiv(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator++(__half &h) { __half_raw one; one.x = 0x3C00U; h += one; return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half &operator--(__half &h) { __half_raw one; one.x = 0x3C00U; h -= one; return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator++(__half &h, const int ignored) +{ + // ignored on purpose. Parameter only needed to distinguish the function declaration from other types of operators. + static_cast(ignored); + + const __half ret = h; + __half_raw one; + one.x = 0x3C00U; + h += one; + return ret; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator--(__half &h, const int ignored) +{ + // ignored on purpose. Parameter only needed to distinguish the function declaration from other types of operators. + static_cast(ignored); + + const __half ret = h; + __half_raw one; + one.x = 0x3C00U; + h -= one; + return ret; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator+(const __half &h) { return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half operator-(const __half &h) { return __hneg(h); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator==(const __half &lh, const __half &rh) { return __heq(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator!=(const __half &lh, const __half &rh) { return __hneu(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator> (const __half &lh, const __half &rh) { return __hgt(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator< (const __half &lh, const __half &rh) { return __hlt(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator>=(const __half &lh, const __half &rh) { return __hge(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator<=(const __half &lh, const __half &rh) { return __hle(lh, rh); } +#endif /* !defined(__CUDA_NO_HALF_OPERATORS__) */ +#if defined(__CPP_VERSION_AT_LEAST_11_FP16) +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half2 &__half2::operator=(const __half2 &&src) { +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __HALF2_TO_UI(*this) = std::move(__HALF2_TO_CUI(src)); +, + this->x = src.x; + this->y = src.y; +) + return *this; +} +#endif /* defined(__CPP_VERSION_AT_LEAST_11_FP16) */ +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half2 &__half2::operator=(const __half2 &src) { +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __HALF2_TO_UI(*this) = __HALF2_TO_CUI(src); +, + this->x = src.x; + this->y = src.y; +) + return *this; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half2 &__half2::operator=(const __half2_raw &h2r) { +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __HALF2_TO_UI(*this) = __HALF2_TO_CUI(h2r); +, + __half_raw tr; + tr.x = h2r.x; + this->x = static_cast<__half>(tr); + tr.x = h2r.y; + this->y = static_cast<__half>(tr); +) + return *this; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_INLINE__ __half2::operator __half2_raw() const { + __half2_raw ret; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + ret.x = 0U; + ret.y = 0U; + __HALF2_TO_UI(ret) = __HALF2_TO_CUI(*this); +, + ret.x = static_cast<__half_raw>(this->x).x; + ret.y = static_cast<__half_raw>(this->y).x; +) + return ret; +} +#if !defined(__CUDA_NO_HALF2_OPERATORS__) +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator+(const __half2 &lh, const __half2 &rh) { return __hadd2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator-(const __half2 &lh, const __half2 &rh) { return __hsub2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator*(const __half2 &lh, const __half2 &rh) { return __hmul2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator/(const __half2 &lh, const __half2 &rh) { return __h2div(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2& operator+=(__half2 &lh, const __half2 &rh) { lh = __hadd2(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2& operator-=(__half2 &lh, const __half2 &rh) { lh = __hsub2(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2& operator*=(__half2 &lh, const __half2 &rh) { lh = __hmul2(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2& operator/=(__half2 &lh, const __half2 &rh) { lh = __h2div(lh, rh); return lh; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 &operator++(__half2 &h) { __half2_raw one; one.x = 0x3C00U; one.y = 0x3C00U; h = __hadd2(h, one); return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 &operator--(__half2 &h) { __half2_raw one; one.x = 0x3C00U; one.y = 0x3C00U; h = __hsub2(h, one); return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator++(__half2 &h, const int ignored) +{ + // ignored on purpose. Parameter only needed to distinguish the function declaration from other types of operators. + static_cast(ignored); + + const __half2 ret = h; + __half2_raw one; + one.x = 0x3C00U; + one.y = 0x3C00U; + h = __hadd2(h, one); + return ret; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator--(__half2 &h, const int ignored) +{ + // ignored on purpose. Parameter only needed to distinguish the function declaration from other types of operators. + static_cast(ignored); + + const __half2 ret = h; + __half2_raw one; + one.x = 0x3C00U; + one.y = 0x3C00U; + h = __hsub2(h, one); + return ret; +} +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator+(const __half2 &h) { return h; } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ __half2 operator-(const __half2 &h) { return __hneg2(h); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator==(const __half2 &lh, const __half2 &rh) { return __hbeq2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator!=(const __half2 &lh, const __half2 &rh) { return __hbneu2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator>(const __half2 &lh, const __half2 &rh) { return __hbgt2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator<(const __half2 &lh, const __half2 &rh) { return __hblt2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator>=(const __half2 &lh, const __half2 &rh) { return __hbge2(lh, rh); } +__CUDA_HOSTDEVICE__ __CUDA_FP16_FORCEINLINE__ bool operator<=(const __half2 &lh, const __half2 &rh) { return __hble2(lh, rh); } +#endif /* !defined(__CUDA_NO_HALF2_OPERATORS__) */ + +/* Restore warning for multiple assignment operators */ +#if defined(_MSC_VER) && _MSC_VER >= 1500 +#pragma warning( pop ) +#endif /* defined(_MSC_VER) && _MSC_VER >= 1500 */ + +/* Restore -Weffc++ warnings from here on */ +#if defined(__GNUC__) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#pragma GCC diagnostic pop +#endif /* __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) */ +#endif /* defined(__GNUC__) */ + +#undef __CUDA_HOSTDEVICE__ +#undef __CUDA_ALIGN__ + +#ifndef __CUDACC_RTC__ /* no host functions in NVRTC mode */ +static inline unsigned short __internal_float2half(const float f, unsigned int &sign, unsigned int &remainder) +{ + unsigned int x; + unsigned int u; + unsigned int result; +#if defined(__CUDACC__) + (void)memcpy(&x, &f, sizeof(f)); +#else + (void)std::memcpy(&x, &f, sizeof(f)); +#endif + u = (x & 0x7fffffffU); + sign = ((x >> 16U) & 0x8000U); + // NaN/+Inf/-Inf + if (u >= 0x7f800000U) { + remainder = 0U; + result = ((u == 0x7f800000U) ? (sign | 0x7c00U) : 0x7fffU); + } else if (u > 0x477fefffU) { // Overflows + remainder = 0x80000000U; + result = (sign | 0x7bffU); + } else if (u >= 0x38800000U) { // Normal numbers + remainder = u << 19U; + u -= 0x38000000U; + result = (sign | (u >> 13U)); + } else if (u < 0x33000001U) { // +0/-0 + remainder = u; + result = sign; + } else { // Denormal numbers + const unsigned int exponent = u >> 23U; + const unsigned int shift = 0x7eU - exponent; + unsigned int mantissa = (u & 0x7fffffU); + mantissa |= 0x800000U; + remainder = mantissa << (32U - shift); + result = (sign | (mantissa >> shift)); + result &= 0x0000FFFFU; + } + return static_cast(result); +} +#endif /* #if !defined(__CUDACC_RTC__) */ + +__CUDA_HOSTDEVICE_FP16_DECL__ __half __double2half(const double a) +{ +IF_DEVICE_OR_CUDACC( + __half val; + asm("{ cvt.rn.f16.f64 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "d"(a)); + return val; +, + __half result; + // Perform rounding to 11 bits of precision, convert value + // to float and call existing float to half conversion. + // By pre-rounding to 11 bits we avoid additional rounding + // in float to half conversion. + unsigned long long int absa; + unsigned long long int ua; + (void)memcpy(&ua, &a, sizeof(a)); + absa = (ua & 0x7fffffffffffffffULL); + if ((absa >= 0x40f0000000000000ULL) || (absa <= 0x3e60000000000000ULL)) + { + // |a| >= 2^16 or NaN or |a| <= 2^(-25) + // double-rounding is not a problem + result = __float2half(static_cast(a)); + } + else + { + // here 2^(-25) < |a| < 2^16 + // prepare shifter value such that a + shifter + // done in double precision performs round-to-nearest-even + // and (a + shifter) - shifter results in a rounded to + // 11 bits of precision. Shifter needs to have exponent of + // a plus 53 - 11 = 42 and a leading bit in mantissa to guard + // against negative values. + // So need to have |a| capped to avoid overflow in exponent. + // For inputs that are smaller than half precision minnorm + // we prepare fixed shifter exponent. + unsigned long long shifterBits; + if (absa >= 0x3f10000000000000ULL) + { // Here if |a| >= 2^(-14) + // add 42 to exponent bits + shifterBits = (ua & 0x7ff0000000000000ULL) + 0x02A0000000000000ULL; + } + else + { // 2^(-25) < |a| < 2^(-14), potentially results in denormal + // set exponent bits to 42 - 14 + bias + shifterBits = 0x41B0000000000000ULL; + } + // set leading mantissa bit to protect against negative inputs + shifterBits |= 0x0008000000000000ULL; + double shifter; + (void)memcpy(&shifter, &shifterBits, sizeof(shifterBits)); + double aShiftRound = a + shifter; + + // Prevent the compiler from optimizing away a + shifter - shifter + // by doing intermediate memcopy and harmless bitwize operation + unsigned long long int aShiftRoundBits; + (void)memcpy(&aShiftRoundBits, &aShiftRound, sizeof(aShiftRound)); + + // the value is positive, so this operation doesn't change anything + aShiftRoundBits &= 0x7fffffffffffffffULL; + + (void)memcpy(&aShiftRound, &aShiftRoundBits, sizeof(aShiftRound)); + + result = __float2half(static_cast(aShiftRound - shifter)); + } + + return result; +, + __half result; + /* + // Perform rounding to 11 bits of precision, convert value + // to float and call existing float to half conversion. + // By pre-rounding to 11 bits we avoid additional rounding + // in float to half conversion. + */ + unsigned long long int absa; + unsigned long long int ua; + (void)std::memcpy(&ua, &a, sizeof(a)); + absa = (ua & 0x7fffffffffffffffULL); + if ((absa >= 0x40f0000000000000ULL) || (absa <= 0x3e60000000000000ULL)) + { + /* + // |a| >= 2^16 or NaN or |a| <= 2^(-25) + // double-rounding is not a problem + */ + result = __float2half(static_cast(a)); + } + else + { + /* + // here 2^(-25) < |a| < 2^16 + // prepare shifter value such that a + shifter + // done in double precision performs round-to-nearest-even + // and (a + shifter) - shifter results in a rounded to + // 11 bits of precision. Shifter needs to have exponent of + // a plus 53 - 11 = 42 and a leading bit in mantissa to guard + // against negative values. + // So need to have |a| capped to avoid overflow in exponent. + // For inputs that are smaller than half precision minnorm + // we prepare fixed shifter exponent. + */ + unsigned long long shifterBits; + if (absa >= 0x3f10000000000000ULL) + { + /* + // Here if |a| >= 2^(-14) + // add 42 to exponent bits + */ + shifterBits = (ua & 0x7ff0000000000000ULL) + 0x02A0000000000000ULL; + } + else + { + /* + // 2^(-25) < |a| < 2^(-14), potentially results in denormal + // set exponent bits to 42 - 14 + bias + */ + shifterBits = 0x41B0000000000000ULL; + } + // set leading mantissa bit to protect against negative inputs + shifterBits |= 0x0008000000000000ULL; + double shifter; + (void)std::memcpy(&shifter, &shifterBits, sizeof(shifterBits)); + double aShiftRound = a + shifter; + + /* + // Prevent the compiler from optimizing away a + shifter - shifter + // by doing intermediate memcopy and harmless bitwize operation + */ + unsigned long long int aShiftRoundBits; + (void)std::memcpy(&aShiftRoundBits, &aShiftRound, sizeof(aShiftRound)); + + // the value is positive, so this operation doesn't change anything + aShiftRoundBits &= 0x7fffffffffffffffULL; + + (void)std::memcpy(&aShiftRound, &aShiftRoundBits, sizeof(aShiftRound)); + + result = __float2half(static_cast(aShiftRound - shifter)); + } + + return result; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __float2half(const float a) +{ + __half val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.rn.f16.f32 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "f"(a)); +, + __half_raw r; + unsigned int sign = 0U; + unsigned int remainder = 0U; + r.x = __internal_float2half(a, sign, remainder); + if ((remainder > 0x80000000U) || ((remainder == 0x80000000U) && ((r.x & 0x1U) != 0U))) { + r.x++; + } + val = r; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __float2half_rn(const float a) +{ + __half val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.rn.f16.f32 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "f"(a)); +, + __half_raw r; + unsigned int sign = 0U; + unsigned int remainder = 0U; + r.x = __internal_float2half(a, sign, remainder); + if ((remainder > 0x80000000U) || ((remainder == 0x80000000U) && ((r.x & 0x1U) != 0U))) { + r.x++; + } + val = r; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __float2half_rz(const float a) +{ + __half val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.rz.f16.f32 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "f"(a)); +, + __half_raw r; + unsigned int sign = 0U; + unsigned int remainder = 0U; + r.x = __internal_float2half(a, sign, remainder); + val = r; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __float2half_rd(const float a) +{ + __half val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.rm.f16.f32 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "f"(a)); +, + __half_raw r; + unsigned int sign = 0U; + unsigned int remainder = 0U; + r.x = __internal_float2half(a, sign, remainder); + if ((remainder != 0U) && (sign != 0U)) { + r.x++; + } + val = r; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __float2half_ru(const float a) +{ + __half val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.rp.f16.f32 %0, %1;}\n" : "=h"(__HALF_TO_US(val)) : "f"(a)); +, + __half_raw r; + unsigned int sign = 0U; + unsigned int remainder = 0U; + r.x = __internal_float2half(a, sign, remainder); + if ((remainder != 0U) && (sign == 0U)) { + r.x++; + } + val = r; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __float2half2_rn(const float a) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low;\n" + " cvt.rn.f16.f32 low, %1;\n" + " mov.b32 %0, {low,low};}\n" : "=r"(__HALF2_TO_UI(val)) : "f"(a)); +, + val = __half2(__float2half_rn(a), __float2half_rn(a)); +) + return val; +} + +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half2 __internal_device_float2_to_half2_rn(const float a, const float b) { + __half2 val; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + asm("{ cvt.rn.f16x2.f32 %0, %2, %1; }\n" + : "=r"(__HALF2_TO_UI(val)) : "f"(a), "f"(b)); +, + asm("{.reg .f16 low,high;\n" + " cvt.rn.f16.f32 low, %1;\n" + " cvt.rn.f16.f32 high, %2;\n" + " mov.b32 %0, {low,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "f"(a), "f"(b)); +) + return val; +} + +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ + +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __floats2half2_rn(const float a, const float b) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + val = __internal_device_float2_to_half2_rn(a,b); +, + val = __half2(__float2half_rn(a), __float2half_rn(b)); +) + return val; +} + +#ifndef __CUDACC_RTC__ /* no host functions in NVRTC mode */ +static inline float __internal_half2float(const unsigned short h) +{ + unsigned int sign = ((static_cast(h) >> 15U) & 1U); + unsigned int exponent = ((static_cast(h) >> 10U) & 0x1fU); + unsigned int mantissa = ((static_cast(h) & 0x3ffU) << 13U); + float f; + if (exponent == 0x1fU) { /* NaN or Inf */ + /* discard sign of a NaN */ + sign = ((mantissa != 0U) ? (sign >> 1U) : sign); + mantissa = ((mantissa != 0U) ? 0x7fffffU : 0U); + exponent = 0xffU; + } else if (exponent == 0U) { /* Denorm or Zero */ + if (mantissa != 0U) { + unsigned int msb; + exponent = 0x71U; + do { + msb = (mantissa & 0x400000U); + mantissa <<= 1U; /* normalize */ + --exponent; + } while (msb == 0U); + mantissa &= 0x7fffffU; /* 1.mantissa is implicit */ + } + } else { + exponent += 0x70U; + } + const unsigned int u = ((sign << 31U) | (exponent << 23U) | mantissa); +#if defined(__CUDACC__) + (void)memcpy(&f, &u, sizeof(u)); +#else + (void)std::memcpy(&f, &u, sizeof(u)); +#endif + return f; +} +#endif /* !defined(__CUDACC_RTC__) */ + +__CUDA_HOSTDEVICE_FP16_DECL__ float __half2float(const __half a) +{ + float val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ cvt.f32.f16 %0, %1;}\n" : "=f"(val) : "h"(__HALF_TO_CUS(a))); +, + val = __internal_half2float(static_cast<__half_raw>(a).x); +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ float __low2float(const __half2 a) +{ + float val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high},%1;\n" + " cvt.f32.f16 %0, low;}\n" : "=f"(val) : "r"(__HALF2_TO_CUI(a))); +, + val = __internal_half2float(static_cast<__half2_raw>(a).x); +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ float __high2float(const __half2 a) +{ + float val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high},%1;\n" + " cvt.f32.f16 %0, high;}\n" : "=f"(val) : "r"(__HALF2_TO_CUI(a))); +, + val = __internal_half2float(static_cast<__half2_raw>(a).y); +) + return val; +} + +__CUDA_HOSTDEVICE_FP16_DECL__ signed char __half2char_rz(const __half h) +{ + signed char i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + unsigned int tmp; + asm("cvt.rzi.s8.f16 %0, %1;" : "=r"(tmp) : "h"(__HALF_TO_CUS(h))); + const unsigned char u = static_cast(tmp); + i = static_cast(u); +, + const float f = __half2float(h); + const signed char max_val = (signed char)0x7fU; + const signed char min_val = (signed char)0x80U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} + +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned char __half2uchar_rz(const __half h) +{ + unsigned char i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + unsigned int tmp; + asm("cvt.rzi.u8.f16 %0, %1;" : "=r"(tmp) : "h"(__HALF_TO_CUS(h))); + i = static_cast(tmp); +, + const float f = __half2float(h); + const unsigned char max_val = 0xffU; + const unsigned char min_val = 0U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0U; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} + +__CUDA_HOSTDEVICE_FP16_DECL__ short int __half2short_rz(const __half h) +{ + short int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.s16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const short int max_val = (short int)0x7fffU; + const short int min_val = (short int)0x8000U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned short int __half2ushort_rz(const __half h) +{ + unsigned short int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.u16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const unsigned short int max_val = 0xffffU; + const unsigned short int min_val = 0U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0U; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +__CUDA_HOSTDEVICE_FP16_DECL__ int __half2int_rz(const __half h) +{ + int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.s32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const int max_val = (int)0x7fffffffU; + const int min_val = (int)0x80000000U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __half2uint_rz(const __half h) +{ + unsigned int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.u32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const unsigned int max_val = 0xffffffffU; + const unsigned int min_val = 0U; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0U; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +__CUDA_HOSTDEVICE_FP16_DECL__ long long int __half2ll_rz(const __half h) +{ + long long int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.s64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const long long int max_val = (long long int)0x7fffffffffffffffULL; + const long long int min_val = (long long int)0x8000000000000000ULL; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = min_val; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned long long int __half2ull_rz(const __half h) +{ + unsigned long long int i; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rzi.u64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); +, + const float f = __half2float(h); + const unsigned long long int max_val = 0xffffffffffffffffULL; + const unsigned long long int min_val = 0ULL; + const unsigned short bits = static_cast(static_cast<__half_raw>(h).x << 1U); + // saturation fixup + if (bits > (unsigned short)0xF800U) { + // NaN + i = 0x8000000000000000ULL; + } else if (f > static_cast(max_val)) { + // saturate maximum + i = max_val; + } else if (f < static_cast(min_val)) { + // saturate minimum + i = min_val; + } else { + // normal value, conversion is well-defined + i = static_cast(f); + } +) + return i; +} +/* CUDA vector-types compatible vector creation function (note returns __half2, not half2) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 make_half2(const __half x, const __half y) +{ + __half2 t; t.x = x; t.y = y; return t; +} + + +/* Definitions of intrinsics */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __float22half2_rn(const float2 a) +{ + const __half2 val = __floats2half2_rn(a.x, a.y); + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ float2 __half22float2(const __half2 a) +{ + float hi_float; + float lo_float; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high},%1;\n" + " cvt.f32.f16 %0, low;}\n" : "=f"(lo_float) : "r"(__HALF2_TO_CUI(a))); + + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high},%1;\n" + " cvt.f32.f16 %0, high;}\n" : "=f"(hi_float) : "r"(__HALF2_TO_CUI(a))); +, + lo_float = __internal_half2float(((__half2_raw)a).x); + hi_float = __internal_half2float(((__half2_raw)a).y); +) + return make_float2(lo_float, hi_float); +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ int __half2int_rn(const __half h) +{ + int i; + asm("cvt.rni.s32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ int __half2int_rd(const __half h) +{ + int i; + asm("cvt.rmi.s32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ int __half2int_ru(const __half h) +{ + int i; + asm("cvt.rpi.s32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __int2half_rn(const int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.s32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + // double-rounding is not a problem here: if integer + // has more than 24 bits, it is already too large to + // be represented in half precision, and result will + // be infinity. + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __int2half_rz(const int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.s32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __int2half_rd(const int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.s32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __int2half_ru(const int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.s32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ short int __half2short_rn(const __half h) +{ + short int i; + asm("cvt.rni.s16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ short int __half2short_rd(const __half h) +{ + short int i; + asm("cvt.rmi.s16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ short int __half2short_ru(const __half h) +{ + short int i; + asm("cvt.rpi.s16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __short2half_rn(const short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.s16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __short2half_rz(const short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.s16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __short2half_rd(const short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.s16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __short2half_ru(const short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.s16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ unsigned int __half2uint_rn(const __half h) +{ + unsigned int i; + asm("cvt.rni.u32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned int __half2uint_rd(const __half h) +{ + unsigned int i; + asm("cvt.rmi.u32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned int __half2uint_ru(const __half h) +{ + unsigned int i; + asm("cvt.rpi.u32.f16 %0, %1;" : "=r"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __uint2half_rn(const unsigned int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.u32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + // double-rounding is not a problem here: if integer + // has more than 24 bits, it is already too large to + // be represented in half precision, and result will + // be infinity. + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __uint2half_rz(const unsigned int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.u32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __uint2half_rd(const unsigned int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.u32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __uint2half_ru(const unsigned int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.u32 %0, %1;" : "=h"(__HALF_TO_US(h)) : "r"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ unsigned short int __half2ushort_rn(const __half h) +{ + unsigned short int i; + asm("cvt.rni.u16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned short int __half2ushort_rd(const __half h) +{ + unsigned short int i; + asm("cvt.rmi.u16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned short int __half2ushort_ru(const __half h) +{ + unsigned short int i; + asm("cvt.rpi.u16.f16 %0, %1;" : "=h"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ushort2half_rn(const unsigned short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.u16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ushort2half_rz(const unsigned short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.u16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ushort2half_rd(const unsigned short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.u16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ushort2half_ru(const unsigned short int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.u16 %0, %1;" : "=h"(__HALF_TO_US(h)) : "h"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ unsigned long long int __half2ull_rn(const __half h) +{ + unsigned long long int i; + asm("cvt.rni.u64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned long long int __half2ull_rd(const __half h) +{ + unsigned long long int i; + asm("cvt.rmi.u64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ unsigned long long int __half2ull_ru(const __half h) +{ + unsigned long long int i; + asm("cvt.rpi.u64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ull2half_rn(const unsigned long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.u64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + // double-rounding is not a problem here: if integer + // has more than 24 bits, it is already too large to + // be represented in half precision, and result will + // be infinity. + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ull2half_rz(const unsigned long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.u64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ull2half_rd(const unsigned long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.u64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ull2half_ru(const unsigned long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.u64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ long long int __half2ll_rn(const __half h) +{ + long long int i; + asm("cvt.rni.s64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ long long int __half2ll_rd(const __half h) +{ + long long int i; + asm("cvt.rmi.s64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +__CUDA_FP16_DECL__ long long int __half2ll_ru(const __half h) +{ + long long int i; + asm("cvt.rpi.s64.f16 %0, %1;" : "=l"(i) : "h"(__HALF_TO_CUS(h))); + return i; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ll2half_rn(const long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rn.f16.s64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + // double-rounding is not a problem here: if integer + // has more than 24 bits, it is already too large to + // be represented in half precision, and result will + // be infinity. + const float f = static_cast(i); + h = __float2half_rn(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ll2half_rz(const long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rz.f16.s64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_rz(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ll2half_rd(const long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rm.f16.s64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_rd(f); +) + return h; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ll2half_ru(const long long int i) +{ + __half h; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("cvt.rp.f16.s64 %0, %1;" : "=h"(__HALF_TO_US(h)) : "l"(i)); +, + const float f = static_cast(i); + h = __float2half_ru(f); +) + return h; +} +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half htrunc(const __half h) +{ + __half r; + asm("cvt.rzi.f16.f16 %0, %1;" : "=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(h))); + return r; +} +__CUDA_FP16_DECL__ __half hceil(const __half h) +{ + __half r; + asm("cvt.rpi.f16.f16 %0, %1;" : "=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(h))); + return r; +} +__CUDA_FP16_DECL__ __half hfloor(const __half h) +{ + __half r; + asm("cvt.rmi.f16.f16 %0, %1;" : "=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(h))); + return r; +} +__CUDA_FP16_DECL__ __half hrint(const __half h) +{ + __half r; + asm("cvt.rni.f16.f16 %0, %1;" : "=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(h))); + return r; +} + +__CUDA_FP16_DECL__ __half2 h2trunc(const __half2 h) +{ + __half2 val; + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " cvt.rzi.f16.f16 low, low;\n" + " cvt.rzi.f16.f16 high, high;\n" + " mov.b32 %0, {low,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(h))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2ceil(const __half2 h) +{ + __half2 val; + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " cvt.rpi.f16.f16 low, low;\n" + " cvt.rpi.f16.f16 high, high;\n" + " mov.b32 %0, {low,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(h))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2floor(const __half2 h) +{ + __half2 val; + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " cvt.rmi.f16.f16 low, low;\n" + " cvt.rmi.f16.f16 high, high;\n" + " mov.b32 %0, {low,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(h))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2rint(const __half2 h) +{ + __half2 val; + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " cvt.rni.f16.f16 low, low;\n" + " cvt.rni.f16.f16 high, high;\n" + " mov.b32 %0, {low,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(h))); + return val; +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __lows2half2(const __half2 a, const __half2 b) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 alow,ahigh,blow,bhigh;\n" + " mov.b32 {alow,ahigh}, %1;\n" + " mov.b32 {blow,bhigh}, %2;\n" + " mov.b32 %0, {alow,blow};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)), "r"(__HALF2_TO_CUI(b))); +, + val.x = a.x; + val.y = b.x; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __highs2half2(const __half2 a, const __half2 b) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 alow,ahigh,blow,bhigh;\n" + " mov.b32 {alow,ahigh}, %1;\n" + " mov.b32 {blow,bhigh}, %2;\n" + " mov.b32 %0, {ahigh,bhigh};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)), "r"(__HALF2_TO_CUI(b))); +, + val.x = a.y; + val.y = b.y; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __low2half(const __half2 a) +{ + __half ret; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " mov.b16 %0, low;}" : "=h"(__HALF_TO_US(ret)) : "r"(__HALF2_TO_CUI(a))); +, + ret = a.x; +) + return ret; +} +__CUDA_HOSTDEVICE_FP16_DECL__ int __hisinf(const __half a) +{ + int retval; + const __half_raw araw = __half_raw(a); + if (araw.x == 0xFC00U) { + retval = -1; + } else if (araw.x == 0x7C00U) { + retval = 1; + } else { + retval = 0; + } + return retval; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __low2half2(const __half2 a) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " mov.b32 %0, {low,low};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); +, + val.x = a.x; + val.y = a.x; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __high2half2(const __half2 a) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " mov.b32 %0, {high,high};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); +, + val.x = a.y; + val.y = a.y; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __high2half(const __half2 a) +{ + __half ret; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " mov.b16 %0, high;}" : "=h"(__HALF_TO_US(ret)) : "r"(__HALF2_TO_CUI(a))); +, + ret = a.y; +) + return ret; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __halves2half2(const __half a, const __half b) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ mov.b32 %0, {%1,%2};}\n" + : "=r"(__HALF2_TO_UI(val)) : "h"(__HALF_TO_CUS(a)), "h"(__HALF_TO_CUS(b))); +, + val.x = a; + val.y = b; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __half2half2(const __half a) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{ mov.b32 %0, {%1,%1};}\n" + : "=r"(__HALF2_TO_UI(val)) : "h"(__HALF_TO_CUS(a))); +, + val.x = a; + val.y = a; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __lowhigh2highlow(const __half2 a) +{ + __half2 val; +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + asm("{.reg .f16 low,high;\n" + " mov.b32 {low,high}, %1;\n" + " mov.b32 %0, {high,low};}\n" : "=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); +, + val.x = a.y; + val.y = a.x; +) + return val; +} +__CUDA_HOSTDEVICE_FP16_DECL__ short int __half_as_short(const __half h) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + return static_cast(__HALF_TO_CUS(h)); +, + return static_cast(__half_raw(h).x); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned short int __half_as_ushort(const __half h) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + return __HALF_TO_CUS(h); +, + return __half_raw(h).x; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __short_as_half(const short int i) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __half h; + __HALF_TO_US(h) = static_cast(i); + return h; +, + __half_raw hr; + hr.x = static_cast(i); + return __half(hr); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __ushort_as_half(const unsigned short int i) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __half h; + __HALF_TO_US(h) = i; + return h; +, + __half_raw hr; + hr.x = i; + return __half(hr);) +} + +/****************************************************************************** +* __half arithmetic * +******************************************************************************/ +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half __internal_device_hmax(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF_MACRO(max) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + float fr; + asm("{max.f32 %0,%1,%2;\n}" + :"=f"(fr) : "f"(fa), "f"(fb)); + const __half hr = __float2half(fr); + return hr; +) +} +__CUDA_FP16_DECL__ __half __internal_device_hmin(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF_MACRO(min) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + float fr; + asm("{min.f32 %0,%1,%2;\n}" + :"=f"(fr) : "f"(fa), "f"(fb)); + const __half hr = __float2half(fr); + return hr; +) +} +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmax(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + return __internal_device_hmax(a, b); +, + __half maxval; + + maxval = (__hge(a, b) || __hisnan(b)) ? a : b; + + if (__hisnan(maxval)) + { + // if both inputs are NaN, return canonical NaN + maxval = CUDART_NAN_FP16; + } + else if (__heq(a, b)) + { + // hmax(+0.0, -0.0) = +0.0 + // unsigned compare 0x8000U > 0x0000U + __half_raw ra = __half_raw(a); + __half_raw rb = __half_raw(b); + maxval = (ra.x > rb.x) ? b : a; + } + return maxval; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmin(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + return __internal_device_hmin(a, b); +, + __half minval; + + minval = (__hle(a, b) || __hisnan(b)) ? a : b; + + if (__hisnan(minval)) + { + // if both inputs are NaN, return canonical NaN + minval = CUDART_NAN_FP16; + } + else if (__heq(a, b)) + { + // hmin(+0.0, -0.0) = -0.0 + // unsigned compare 0x8000U > 0x0000U + __half_raw ra = __half_raw(a); + __half_raw rb = __half_raw(b); + minval = (ra.x > rb.x) ? a : b; + } + + return minval; +) +} + + +/****************************************************************************** +* __half2 arithmetic * +******************************************************************************/ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmax2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF2_MACRO(max) +, + __half2 val; + val.x = __hmax(a.x, b.x); + val.y = __hmax(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmin2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF2_MACRO(min) +, + __half2 val; + val.x = __hmin(a.x, b.x); + val.y = __hmin(a.y, b.y); + return val; +) +} + +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 300) || defined(_NVHPC_CUDA) +/****************************************************************************** +* __half, __half2 warp shuffle * +******************************************************************************/ +#define __SHUFFLE_HALF2_MACRO(name) /* do */ {\ + __half2 r; \ + asm volatile ("{" __CUDA_FP16_STRINGIFY(name) " %0,%1,%2,%3;\n}" \ + :"=r"(__HALF2_TO_UI(r)): "r"(__HALF2_TO_CUI(var)), "r"(delta), "r"(c)); \ + return r; \ +} /* while(0) */ + +#define __SHUFFLE_SYNC_HALF2_MACRO(name, var, delta, c, mask) /* do */ {\ + __half2 r; \ + asm volatile ("{" __CUDA_FP16_STRINGIFY(name) " %0,%1,%2,%3,%4;\n}" \ + :"=r"(__HALF2_TO_UI(r)): "r"(__HALF2_TO_CUI(var)), "r"(delta), "r"(c), "r"(mask)); \ + return r; \ +} /* while(0) */ + +#if defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ < 700) + +__CUDA_FP16_DECL__ __half2 __shfl(const __half2 var, const int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_HALF2_MACRO(shfl.idx.b32) +} +__CUDA_FP16_DECL__ __half2 __shfl_up(const __half2 var, const unsigned int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = (warp_size - static_cast(width)) << 8U; + __SHUFFLE_HALF2_MACRO(shfl.up.b32) +} +__CUDA_FP16_DECL__ __half2 __shfl_down(const __half2 var, const unsigned int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_HALF2_MACRO(shfl.down.b32) +} +__CUDA_FP16_DECL__ __half2 __shfl_xor(const __half2 var, const int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_HALF2_MACRO(shfl.bfly.b32) +} + +#endif /* defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ < 700) */ + +__CUDA_FP16_DECL__ __half2 __shfl_sync(const unsigned int mask, const __half2 var, const int srcLane, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_SYNC_HALF2_MACRO(shfl.sync.idx.b32, var, srcLane, c, mask) +} +__CUDA_FP16_DECL__ __half2 __shfl_up_sync(const unsigned int mask, const __half2 var, const unsigned int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = (warp_size - static_cast(width)) << 8U; + __SHUFFLE_SYNC_HALF2_MACRO(shfl.sync.up.b32, var, delta, c, mask) +} +__CUDA_FP16_DECL__ __half2 __shfl_down_sync(const unsigned int mask, const __half2 var, const unsigned int delta, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_SYNC_HALF2_MACRO(shfl.sync.down.b32, var, delta, c, mask) +} +__CUDA_FP16_DECL__ __half2 __shfl_xor_sync(const unsigned int mask, const __half2 var, const int laneMask, const int width) +{ + unsigned int warp_size; + asm("{mov.u32 %0, WARP_SZ;\n}" : "=r"(warp_size)); + const unsigned int c = ((warp_size - static_cast(width)) << 8U) | 0x1fU; + __SHUFFLE_SYNC_HALF2_MACRO(shfl.sync.bfly.b32, var, laneMask, c, mask) +} + +#undef __SHUFFLE_HALF2_MACRO +#undef __SHUFFLE_SYNC_HALF2_MACRO + +#if defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ < 700) + +__CUDA_FP16_DECL__ __half __shfl(const __half var, const int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl(temp1, delta, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_up(const __half var, const unsigned int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_up(temp1, delta, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_down(const __half var, const unsigned int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_down(temp1, delta, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_xor(const __half var, const int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_xor(temp1, delta, width); + return __low2half(temp2); +} + +#endif /* defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ < 700) */ + +__CUDA_FP16_DECL__ __half __shfl_sync(const unsigned int mask, const __half var, const int srcLane, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_sync(mask, temp1, srcLane, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_up_sync(const unsigned int mask, const __half var, const unsigned int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_up_sync(mask, temp1, delta, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_down_sync(const unsigned int mask, const __half var, const unsigned int delta, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_down_sync(mask, temp1, delta, width); + return __low2half(temp2); +} +__CUDA_FP16_DECL__ __half __shfl_xor_sync(const unsigned int mask, const __half var, const int laneMask, const int width) +{ + const __half2 temp1 = __halves2half2(var, var); + const __half2 temp2 = __shfl_xor_sync(mask, temp1, laneMask, width); + return __low2half(temp2); +} + +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 300) || defined(_NVHPC_CUDA) */ +/****************************************************************************** +* __half and __half2 __ldg,__ldcg,__ldca,__ldcs * +******************************************************************************/ + +#if defined(__cplusplus) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 320) || defined(_NVHPC_CUDA)) +#if (defined(_MSC_VER) && defined(_WIN64)) || defined(__LP64__) || defined(__CUDACC_RTC__) +#define __LDG_PTR "l" +#else +#define __LDG_PTR "r" +#endif /*(defined(_MSC_VER) && defined(_WIN64)) || defined(__LP64__) || defined(__CUDACC_RTC__)*/ +__CUDA_FP16_DECL__ __half2 __ldg(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.nc.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half __ldg(const __half *const ptr) +{ + __half ret; + asm ("ld.global.nc.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half2 __ldcg(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.cg.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half __ldcg(const __half *const ptr) +{ + __half ret; + asm ("ld.global.cg.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half2 __ldca(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.ca.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half __ldca(const __half *const ptr) +{ + __half ret; + asm ("ld.global.ca.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half2 __ldcs(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.cs.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half __ldcs(const __half *const ptr) +{ + __half ret; + asm ("ld.global.cs.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr)); + return ret; +} +__CUDA_FP16_DECL__ __half2 __ldlu(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.lu.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr) : "memory"); + return ret; +} +__CUDA_FP16_DECL__ __half __ldlu(const __half *const ptr) +{ + __half ret; + asm ("ld.global.lu.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr) : "memory"); + return ret; +} +__CUDA_FP16_DECL__ __half2 __ldcv(const __half2 *const ptr) +{ + __half2 ret; + asm ("ld.global.cv.b32 %0, [%1];" : "=r"(__HALF2_TO_UI(ret)) : __LDG_PTR(ptr) : "memory"); + return ret; +} +__CUDA_FP16_DECL__ __half __ldcv(const __half *const ptr) +{ + __half ret; + asm ("ld.global.cv.b16 %0, [%1];" : "=h"(__HALF_TO_US(ret)) : __LDG_PTR(ptr) : "memory"); + return ret; +} +__CUDA_FP16_DECL__ void __stwb(__half2 *const ptr, const __half2 value) +{ + asm ("st.global.wb.b32 [%0], %1;" :: __LDG_PTR(ptr), "r"(__HALF2_TO_CUI(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stwb(__half *const ptr, const __half value) +{ + asm ("st.global.wb.b16 [%0], %1;" :: __LDG_PTR(ptr), "h"(__HALF_TO_CUS(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stcg(__half2 *const ptr, const __half2 value) +{ + asm ("st.global.cg.b32 [%0], %1;" :: __LDG_PTR(ptr), "r"(__HALF2_TO_CUI(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stcg(__half *const ptr, const __half value) +{ + asm ("st.global.cg.b16 [%0], %1;" :: __LDG_PTR(ptr), "h"(__HALF_TO_CUS(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stcs(__half2 *const ptr, const __half2 value) +{ + asm ("st.global.cs.b32 [%0], %1;" :: __LDG_PTR(ptr), "r"(__HALF2_TO_CUI(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stcs(__half *const ptr, const __half value) +{ + asm ("st.global.cs.b16 [%0], %1;" :: __LDG_PTR(ptr), "h"(__HALF_TO_CUS(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stwt(__half2 *const ptr, const __half2 value) +{ + asm ("st.global.wt.b32 [%0], %1;" :: __LDG_PTR(ptr), "r"(__HALF2_TO_CUI(value)) : "memory"); +} +__CUDA_FP16_DECL__ void __stwt(__half *const ptr, const __half value) +{ + asm ("st.global.wt.b16 [%0], %1;" :: __LDG_PTR(ptr), "h"(__HALF_TO_CUS(value)) : "memory"); +} +#undef __LDG_PTR +#endif /* defined(__cplusplus) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 320) || defined(_NVHPC_CUDA)) */ +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ + +/****************************************************************************** +* __half2 comparison * +******************************************************************************/ +#define __COMPARISON_OP_HALF2_MACRO(name) /* do */ {\ + __half2 val; \ + asm( "{ " __CUDA_FP16_STRINGIFY(name) ".f16x2.f16x2 %0,%1,%2;\n}" \ + :"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)),"r"(__HALF2_TO_CUI(b))); \ + return val; \ +} /* while(0) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __heq2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.eq) +, + __half2_raw val; + val.x = __heq(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __heq(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hne2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.ne) +, + __half2_raw val; + val.x = __hne(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hne(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hle2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.le) +, + __half2_raw val; + val.x = __hle(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hle(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hge2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.ge) +, + __half2_raw val; + val.x = __hge(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hge(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hlt2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.lt) +, + __half2_raw val; + val.x = __hlt(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hlt(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hgt2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.gt) +, + __half2_raw val; + val.x = __hgt(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hgt(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hequ2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.equ) +, + __half2_raw val; + val.x = __hequ(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hequ(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hneu2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.neu) +, + __half2_raw val; + val.x = __hneu(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hneu(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hleu2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.leu) +, + __half2_raw val; + val.x = __hleu(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hleu(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hgeu2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.geu) +, + __half2_raw val; + val.x = __hgeu(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hgeu(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hltu2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.ltu) +, + __half2_raw val; + val.x = __hltu(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hltu(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hgtu2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO(set.gtu) +, + __half2_raw val; + val.x = __hgtu(a.x, b.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hgtu(a.y, b.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + return __half2(val); +) +} +#undef __COMPARISON_OP_HALF2_MACRO +/****************************************************************************** +* __half2 comparison with mask output * +******************************************************************************/ +#define __COMPARISON_OP_HALF2_MACRO_MASK(name) /* do */ {\ + unsigned val; \ + asm( "{ " __CUDA_FP16_STRINGIFY(name) ".u32.f16x2 %0,%1,%2;\n}" \ + :"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a)),"r"(__HALF2_TO_CUI(b))); \ + return val; \ +} /* while(0) */ +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __heq2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.eq) +, + const unsigned short px = __heq(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __heq(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hne2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.ne) +, + const unsigned short px = __hne(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hne(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hle2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.le) +, + const unsigned short px = __hle(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hle(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hge2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.ge) +, + const unsigned short px = __hge(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hge(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hlt2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.lt) +, + const unsigned short px = __hlt(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hlt(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hgt2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.gt) +, + const unsigned short px = __hgt(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hgt(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hequ2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.equ) +, + const unsigned short px = __hequ(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hequ(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hneu2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.neu) +, + const unsigned short px = __hneu(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hneu(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hleu2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.leu) +, + const unsigned short px = __hleu(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hleu(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hgeu2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.geu) +, + const unsigned short px = __hgeu(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hgeu(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hltu2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.ltu) +, + const unsigned short px = __hltu(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hltu(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ unsigned int __hgtu2_mask(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF2_MACRO_MASK(set.gtu) +, + const unsigned short px = __hgtu(a.x, b.x) ? (unsigned short)0xFFFFU : (unsigned short)0U; + const unsigned short py = __hgtu(a.y, b.y) ? (unsigned short)0xFFFFU : (unsigned short)0U; + unsigned ur = (unsigned)py; + ur <<= (unsigned)16U; + ur |= (unsigned)px; + return ur; +) +} +#undef __COMPARISON_OP_HALF2_MACRO_MASK + +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbeq2(const __half2 a, const __half2 b) +{ + const unsigned mask = __heq2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbne2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hne2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hble2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hle2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbge2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hge2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hblt2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hlt2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbgt2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hgt2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbequ2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hequ2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbneu2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hneu2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbleu2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hleu2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbgeu2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hgeu2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbltu2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hltu2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hbgtu2(const __half2 a, const __half2 b) +{ + const unsigned mask = __hgtu2_mask(a, b); + return (mask == 0xFFFFFFFFU); +} +/****************************************************************************** +* __half comparison * +******************************************************************************/ +#define __COMPARISON_OP_HALF_MACRO(name) /* do */ {\ + unsigned short val; \ + asm( "{ .reg .pred __$temp3;\n" \ + " setp." __CUDA_FP16_STRINGIFY(name) ".f16 __$temp3, %1, %2;\n" \ + " selp.u16 %0, 1, 0, __$temp3;}" \ + : "=h"(val) : "h"(__HALF_TO_CUS(a)), "h"(__HALF_TO_CUS(b))); \ + return (val != 0U) ? true : false; \ +} /* while(0) */ +__CUDA_HOSTDEVICE_FP16_DECL__ bool __heq(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(eq) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa == fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hne(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(ne) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa != fb) && (!__hisnan(a)) && (!__hisnan(b)); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hle(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(le) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa <= fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hge(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(ge) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa >= fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hlt(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(lt) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa < fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hgt(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(gt) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa > fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hequ(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(equ) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa == fb) || (__hisnan(a)) || (__hisnan(b)); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hneu(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(neu) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa != fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hleu(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(leu) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa <= fb) || (__hisnan(a)) || (__hisnan(b)); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hgeu(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(geu) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa >= fb) || (__hisnan(a)) || (__hisnan(b)); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hltu(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(ltu) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa < fb) || (__hisnan(a)) || (__hisnan(b)); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hgtu(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __COMPARISON_OP_HALF_MACRO(gtu) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return (fa > fb) || (__hisnan(a)) || (__hisnan(b)); +) +} +#undef __COMPARISON_OP_HALF_MACRO +/****************************************************************************** +* __half2 arithmetic * +******************************************************************************/ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hadd2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(add) +, + __half2 val; + val.x = __hadd(a.x, b.x); + val.y = __hadd(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hsub2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(sub) +, + __half2 val; + val.x = __hsub(a.x, b.x); + val.y = __hsub(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmul2(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(mul) +, + __half2 val; + val.x = __hmul(a.x, b.x); + val.y = __hmul(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hadd2_sat(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(add.sat) +, + __half2 val; + val.x = __hadd_sat(a.x, b.x); + val.y = __hadd_sat(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hsub2_sat(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(sub.sat) +, + __half2 val; + val.x = __hsub_sat(a.x, b.x); + val.y = __hsub_sat(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmul2_sat(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(mul.sat) +, + __half2 val; + val.x = __hmul_sat(a.x, b.x); + val.y = __hmul_sat(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hadd2_rn(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(add.rn) +, + __half2 val; + val.x = __hadd_rn(a.x, b.x); + val.y = __hadd_rn(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hsub2_rn(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(sub.rn) +, + __half2 val; + val.x = __hsub_rn(a.x, b.x); + val.y = __hsub_rn(a.y, b.y); + return val; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmul2_rn(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF2_MACRO(mul.rn) +, + __half2 val; + val.x = __hmul_rn(a.x, b.x); + val.y = __hmul_rn(a.y, b.y); + return val; +) +} +#if defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half2 __hfma2(const __half2 a, const __half2 b, const __half2 c) +{ + __TERNARY_OP_HALF2_MACRO(fma.rn) +} +__CUDA_FP16_DECL__ __half2 __hfma2_sat(const __half2 a, const __half2 b, const __half2 c) +{ + __TERNARY_OP_HALF2_MACRO(fma.rn.sat) +} +#endif /* defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __h2div(const __half2 a, const __half2 b) { + __half ha = __low2half(a); + __half hb = __low2half(b); + + const __half v1 = __hdiv(ha, hb); + + ha = __high2half(a); + hb = __high2half(b); + + const __half v2 = __hdiv(ha, hb); + + return __halves2half2(v1, v2); +} + +/****************************************************************************** +* __half arithmetic * +******************************************************************************/ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hadd(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(add) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa + fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hsub(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(sub) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa - fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmul(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(mul) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa * fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hadd_sat(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(add.sat) +, + return __hmin(__hmax(__hadd(a, b), CUDART_ZERO_FP16), CUDART_ONE_FP16); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hsub_sat(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(sub.sat) +, + return __hmin(__hmax(__hsub(a, b), CUDART_ZERO_FP16), CUDART_ONE_FP16); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmul_sat(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(mul.sat) +, + return __hmin(__hmax(__hmul(a, b), CUDART_ZERO_FP16), CUDART_ONE_FP16); +) +} + +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hadd_rn(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(add.rn) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa + fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hsub_rn(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(sub.rn) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa - fb); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmul_rn(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __BINARY_OP_HALF_MACRO(mul.rn) +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa * fb); +) +} +#if defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half __hfma(const __half a, const __half b, const __half c) +{ + __TERNARY_OP_HALF_MACRO(fma.rn) +} +__CUDA_FP16_DECL__ __half __hfma_sat(const __half a, const __half b, const __half c) +{ + __TERNARY_OP_HALF_MACRO(fma.rn.sat) +} +#endif /* defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hdiv(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_IS_DEVICE, + __half v; + __half abs; + __half den; + __HALF_TO_US(den) = 0x008FU; + + float rcp; + const float fa = __half2float(a); + const float fb = __half2float(b); + + asm("{rcp.approx.ftz.f32 %0, %1;\n}" :"=f"(rcp) : "f"(fb)); + + float fv = rcp * fa; + + v = __float2half(fv); + abs = __habs(v); + if (__hlt(abs, den) && __hlt(__float2half(0.0f), abs)) { + const float err = __fmaf_rn(-fb, fv, fa); + fv = __fmaf_rn(rcp, err, fv); + v = __float2half(fv); + } + return v; +, + const float fa = __half2float(a); + const float fb = __half2float(b); + return __float2half(fa / fb); +) +} + +/****************************************************************************** +* __half2 functions * +******************************************************************************/ +#if defined(_NVHPC_CUDA) || defined(__CUDACC__) +#define __APPROX_FCAST(fun) /* do */ {\ + __half val;\ + asm("{.reg.b32 f; \n"\ + " .reg.b16 r; \n"\ + " mov.b16 r,%1; \n"\ + " cvt.f32.f16 f,r; \n"\ + " " __CUDA_FP16_STRINGIFY(fun) ".approx.ftz.f32 f,f; \n"\ + " cvt.rn.f16.f32 r,f; \n"\ + " mov.b16 %0,r; \n"\ + "}": "=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a)));\ + return val;\ +} /* while(0) */ +#define __APPROX_FCAST2(fun) /* do */ {\ + __half2 val;\ + asm("{.reg.b16 hl, hu; \n"\ + " .reg.b32 fl, fu; \n"\ + " mov.b32 {hl, hu}, %1; \n"\ + " cvt.f32.f16 fl, hl; \n"\ + " cvt.f32.f16 fu, hu; \n"\ + " " __CUDA_FP16_STRINGIFY(fun) ".approx.ftz.f32 fl, fl; \n"\ + " " __CUDA_FP16_STRINGIFY(fun) ".approx.ftz.f32 fu, fu; \n"\ + " cvt.rn.f16.f32 hl, fl; \n"\ + " cvt.rn.f16.f32 hu, fu; \n"\ + " mov.b32 %0, {hl, hu}; \n"\ + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); \ + return val;\ +} /* while(0) */ +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530) || defined(_NVHPC_CUDA) +#define __SPEC_CASE2(i,r, spc, ulp) \ + "{.reg.b32 spc, ulp, p;\n"\ + " mov.b32 spc," __CUDA_FP16_STRINGIFY(spc) ";\n"\ + " mov.b32 ulp," __CUDA_FP16_STRINGIFY(ulp) ";\n"\ + " set.eq.f16x2.f16x2 p," __CUDA_FP16_STRINGIFY(i) ", spc;\n"\ + " fma.rn.f16x2 " __CUDA_FP16_STRINGIFY(r) ",p,ulp," __CUDA_FP16_STRINGIFY(r) ";\n}\n" +#define __SPEC_CASE(i,r, spc, ulp) \ + "{.reg.b16 spc, ulp, p;\n"\ + " mov.b16 spc," __CUDA_FP16_STRINGIFY(spc) ";\n"\ + " mov.b16 ulp," __CUDA_FP16_STRINGIFY(ulp) ";\n"\ + " set.eq.f16.f16 p," __CUDA_FP16_STRINGIFY(i) ", spc;\n"\ + " fma.rn.f16 " __CUDA_FP16_STRINGIFY(r) ",p,ulp," __CUDA_FP16_STRINGIFY(r) ";\n}\n" +static __device__ __forceinline__ float __float_simpl_sinf(float a); +static __device__ __forceinline__ float __float_simpl_cosf(float a); +__CUDA_FP16_DECL__ __half hsin(const __half a) { + const float sl = __float_simpl_sinf(__half2float(a)); + __half r = __float2half_rn(sl); + asm("{\n\t" + " .reg.b16 i,r,t; \n\t" + " mov.b16 r, %0; \n\t" + " mov.b16 i, %1; \n\t" + " and.b16 t, r, 0x8000U; \n\t" + " abs.f16 r, r; \n\t" + " abs.f16 i, i; \n\t" + __SPEC_CASE(i, r, 0X32B3U, 0x0800U) + __SPEC_CASE(i, r, 0X5CB0U, 0x9000U) + " or.b16 r,r,t; \n\t" + " mov.b16 %0, r; \n" + "}\n" : "+h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(a))); + return r; +} +__CUDA_FP16_DECL__ __half2 h2sin(const __half2 a) { + const float sl = __float_simpl_sinf(__half2float(a.x)); + const float sh = __float_simpl_sinf(__half2float(a.y)); + __half2 r = __floats2half2_rn(sl, sh); + asm("{\n\t" + " .reg.b32 i,r,t; \n\t" + " mov.b32 r, %0; \n\t" + " mov.b32 i, %1; \n\t" + " and.b32 t, r, 0x80008000U; \n\t" + " abs.f16x2 r, r; \n\t" + " abs.f16x2 i, i; \n\t" + __SPEC_CASE2(i, r, 0X32B332B3U, 0x08000800U) + __SPEC_CASE2(i, r, 0X5CB05CB0U, 0x90009000U) + " or.b32 r, r, t; \n\t" + " mov.b32 %0, r; \n" + "}\n" : "+r"(__HALF2_TO_UI(r)) : "r"(__HALF2_TO_CUI(a))); + return r; +} +__CUDA_FP16_DECL__ __half hcos(const __half a) { + const float cl = __float_simpl_cosf(__half2float(a)); + __half r = __float2half_rn(cl); + asm("{\n\t" + " .reg.b16 i,r; \n\t" + " mov.b16 r, %0; \n\t" + " mov.b16 i, %1; \n\t" + " abs.f16 i, i; \n\t" + __SPEC_CASE(i, r, 0X2B7CU, 0x1000U) + " mov.b16 %0, r; \n" + "}\n" : "+h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(a))); + return r; +} +__CUDA_FP16_DECL__ __half2 h2cos(const __half2 a) { + const float cl = __float_simpl_cosf(__half2float(a.x)); + const float ch = __float_simpl_cosf(__half2float(a.y)); + __half2 r = __floats2half2_rn(cl, ch); + asm("{\n\t" + " .reg.b32 i,r; \n\t" + " mov.b32 r, %0; \n\t" + " mov.b32 i, %1; \n\t" + " abs.f16x2 i, i; \n\t" + __SPEC_CASE2(i, r, 0X2B7C2B7CU, 0x10001000U) + " mov.b32 %0, r; \n" + "}\n" : "+r"(__HALF2_TO_UI(r)) : "r"(__HALF2_TO_CUI(a))); + return r; +} +static __device__ __forceinline__ float __internal_trig_reduction_kernel(const float a, unsigned int *const quadrant) +{ + const float ar = __fmaf_rn(a, 0.636619772F, 12582912.0F); + const unsigned q = __float_as_uint(ar); + const float j = __fsub_rn(ar, 12582912.0F); + float t = __fmaf_rn(j, -1.5707962512969971e+000F, a); + t = __fmaf_rn(j, -7.5497894158615964e-008F, t); + *quadrant = q; + return t; +} +static __device__ __forceinline__ float __internal_sin_cos_kernel(const float x, const unsigned int i) +{ + float z; + const float x2 = x*x; + float a8; + float a6; + float a4; + float a2; + float a1; + float a0; + + if ((i & 1U) != 0U) { + // cos + a8 = 2.44331571e-5F; + a6 = -1.38873163e-3F; + a4 = 4.16666457e-2F; + a2 = -5.00000000e-1F; + a1 = x2; + a0 = 1.0F; + } + else { + // sin + a8 = -1.95152959e-4F; + a6 = 8.33216087e-3F; + a4 = -1.66666546e-1F; + a2 = 0.0F; + a1 = x; + a0 = x; + } + + z = __fmaf_rn(a8, x2, a6); + z = __fmaf_rn(z, x2, a4); + z = __fmaf_rn(z, x2, a2); + z = __fmaf_rn(z, a1, a0); + + if ((i & 2U) != 0U) { + z = -z; + } + return z; +} +static __device__ __forceinline__ float __float_simpl_sinf(float a) +{ + float z; + unsigned i; + a = __internal_trig_reduction_kernel(a, &i); + z = __internal_sin_cos_kernel(a, i); + return z; +} +static __device__ __forceinline__ float __float_simpl_cosf(float a) +{ + float z; + unsigned i; + a = __internal_trig_reduction_kernel(a, &i); + z = __internal_sin_cos_kernel(a, (i & 0x3U) + 1U); + return z; +} + +__CUDA_FP16_DECL__ __half hexp(const __half a) { + __half val; + asm("{.reg.b32 f, C, nZ; \n" + " .reg.b16 h,r; \n" + " mov.b16 h,%1; \n" + " cvt.f32.f16 f,h; \n" + " mov.b32 C, 0x3fb8aa3bU; \n" + " mov.b32 nZ, 0x80000000U;\n" + " fma.rn.f32 f,f,C,nZ; \n" + " ex2.approx.ftz.f32 f,f; \n" + " cvt.rn.f16.f32 r,f; \n" + __SPEC_CASE(h, r, 0X1F79U, 0x9400U) + __SPEC_CASE(h, r, 0X25CFU, 0x9400U) + __SPEC_CASE(h, r, 0XC13BU, 0x0400U) + __SPEC_CASE(h, r, 0XC1EFU, 0x0200U) + " mov.b16 %0,r; \n" + "}": "=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2exp(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 h,r,fl,fu,C,nZ; \n" + " mov.b32 {hl, hu}, %1; \n" + " mov.b32 h, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " mov.b32 C, 0x3fb8aa3bU; \n" + " mov.b32 nZ, 0x80000000U;\n" + " fma.rn.f32 fl,fl,C,nZ; \n" + " fma.rn.f32 fu,fu,C,nZ; \n" + " ex2.approx.ftz.f32 fl, fl; \n" + " ex2.approx.ftz.f32 fu, fu; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 r, {hl, hu}; \n" + __SPEC_CASE2(h, r, 0X1F791F79U, 0x94009400U) + __SPEC_CASE2(h, r, 0X25CF25CFU, 0x94009400U) + __SPEC_CASE2(h, r, 0XC13BC13BU, 0x04000400U) + __SPEC_CASE2(h, r, 0XC1EFC1EFU, 0x02000200U) + " mov.b32 %0, r; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530) || defined(_NVHPC_CUDA) */ + +__CUDA_FP16_DECL__ __half htanh(const __half a) { + float f = __half2float(a); + f = tanhf(f); + __half h = __float2half_rn(f); + return h; +} +__CUDA_FP16_DECL__ __half2 h2tanh(const __half2 a) { + float2 f = __half22float2(a); + f.x = tanhf(f.x); + f.y = tanhf(f.y); + __half2 h = __float22half2_rn(f); + return h; +} + +__CUDA_FP16_DECL__ __half htanh_approx(const __half a) { + __half r; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_75, + __half_raw hr = (__half_raw)a; + asm("tanh.approx.f16 %0, %0;" : "+h"(hr.x)); + r = (__half)hr; +, + r = htanh(a); +) + return r; +} +__CUDA_FP16_DECL__ __half2 h2tanh_approx(const __half2 a) { + __half2 res; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_75, + asm("tanh.approx.f16x2 %0, %1;" : "=r"(__HALF2_TO_UI(res)) : "r"(__HALF2_TO_CUI(a))); +, + res = h2tanh(a); +) + return res; +} + +__CUDA_FP16_DECL__ __half hexp2(const __half a) { + __half val; + asm("{.reg.b32 f, ULP; \n" + " .reg.b16 r; \n" + " mov.b16 r,%1; \n" + " cvt.f32.f16 f,r; \n" + " ex2.approx.ftz.f32 f,f; \n" + " mov.b32 ULP, 0x33800000U;\n" + " fma.rn.f32 f,f,ULP,f; \n" + " cvt.rn.f16.f32 r,f; \n" + " mov.b16 %0,r; \n" + "}": "=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2exp2(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 fl, fu, ULP; \n" + " mov.b32 {hl, hu}, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " ex2.approx.ftz.f32 fl, fl; \n" + " ex2.approx.ftz.f32 fu, fu; \n" + " mov.b32 ULP, 0x33800000U;\n" + " fma.rn.f32 fl,fl,ULP,fl; \n" + " fma.rn.f32 fu,fu,ULP,fu; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 %0, {hl, hu}; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half hexp10(const __half a) { + __half val; + asm("{.reg.b16 h,r; \n" + " .reg.b32 f, C, nZ; \n" + " mov.b16 h, %1; \n" + " cvt.f32.f16 f, h; \n" + " mov.b32 C, 0x40549A78U; \n" + " mov.b32 nZ, 0x80000000U;\n" + " fma.rn.f32 f,f,C,nZ; \n" + " ex2.approx.ftz.f32 f, f; \n" + " cvt.rn.f16.f32 r, f; \n" + __SPEC_CASE(h, r, 0x34DEU, 0x9800U) + __SPEC_CASE(h, r, 0x9766U, 0x9000U) + __SPEC_CASE(h, r, 0x9972U, 0x1000U) + __SPEC_CASE(h, r, 0xA5C4U, 0x1000U) + __SPEC_CASE(h, r, 0xBF0AU, 0x8100U) + " mov.b16 %0, r; \n" + "}":"=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2exp10(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 h,r,fl,fu,C,nZ; \n" + " mov.b32 {hl, hu}, %1; \n" + " mov.b32 h, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " mov.b32 C, 0x40549A78U; \n" + " mov.b32 nZ, 0x80000000U;\n" + " fma.rn.f32 fl,fl,C,nZ; \n" + " fma.rn.f32 fu,fu,C,nZ; \n" + " ex2.approx.ftz.f32 fl, fl; \n" + " ex2.approx.ftz.f32 fu, fu; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 r, {hl, hu}; \n" + __SPEC_CASE2(h, r, 0x34DE34DEU, 0x98009800U) + __SPEC_CASE2(h, r, 0x97669766U, 0x90009000U) + __SPEC_CASE2(h, r, 0x99729972U, 0x10001000U) + __SPEC_CASE2(h, r, 0xA5C4A5C4U, 0x10001000U) + __SPEC_CASE2(h, r, 0xBF0ABF0AU, 0x81008100U) + " mov.b32 %0, r; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +__CUDA_FP16_DECL__ __half hlog2(const __half a) { + __half val; + asm("{.reg.b16 h, r; \n" + " .reg.b32 f; \n" + " mov.b16 h, %1; \n" + " cvt.f32.f16 f, h; \n" + " lg2.approx.ftz.f32 f, f; \n" + " cvt.rn.f16.f32 r, f; \n" + __SPEC_CASE(r, r, 0xA2E2U, 0x8080U) + __SPEC_CASE(r, r, 0xBF46U, 0x9400U) + " mov.b16 %0, r; \n" + "}":"=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2log2(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 fl, fu, r, p; \n" + " mov.b32 {hl, hu}, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " lg2.approx.ftz.f32 fl, fl; \n" + " lg2.approx.ftz.f32 fu, fu; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 r, {hl, hu}; \n" + __SPEC_CASE2(r, r, 0xA2E2A2E2U, 0x80808080U) + __SPEC_CASE2(r, r, 0xBF46BF46U, 0x94009400U) + " mov.b32 %0, r; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +__CUDA_FP16_DECL__ __half hlog(const __half a) { + __half val; + asm("{.reg.b32 f, C; \n" + " .reg.b16 r,h; \n" + " mov.b16 h,%1; \n" + " cvt.f32.f16 f,h; \n" + " lg2.approx.ftz.f32 f,f; \n" + " mov.b32 C, 0x3f317218U; \n" + " mul.f32 f,f,C; \n" + " cvt.rn.f16.f32 r,f; \n" + __SPEC_CASE(h, r, 0X160DU, 0x9C00U) + __SPEC_CASE(h, r, 0X3BFEU, 0x8010U) + __SPEC_CASE(h, r, 0X3C0BU, 0x8080U) + __SPEC_CASE(h, r, 0X6051U, 0x1C00U) + " mov.b16 %0,r; \n" + "}": "=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2log(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 r, fl, fu, C, h; \n" + " mov.b32 {hl, hu}, %1; \n" + " mov.b32 h, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " lg2.approx.ftz.f32 fl, fl; \n" + " lg2.approx.ftz.f32 fu, fu; \n" + " mov.b32 C, 0x3f317218U; \n" + " mul.f32 fl,fl,C; \n" + " mul.f32 fu,fu,C; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 r, {hl, hu}; \n" + __SPEC_CASE2(h, r, 0X160D160DU, 0x9C009C00U) + __SPEC_CASE2(h, r, 0X3BFE3BFEU, 0x80108010U) + __SPEC_CASE2(h, r, 0X3C0B3C0BU, 0x80808080U) + __SPEC_CASE2(h, r, 0X60516051U, 0x1C001C00U) + " mov.b32 %0, r; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +__CUDA_FP16_DECL__ __half hlog10(const __half a) { + __half val; + asm("{.reg.b16 h, r; \n" + " .reg.b32 f, C; \n" + " mov.b16 h, %1; \n" + " cvt.f32.f16 f, h; \n" + " lg2.approx.ftz.f32 f, f; \n" + " mov.b32 C, 0x3E9A209BU; \n" + " mul.f32 f,f,C; \n" + " cvt.rn.f16.f32 r, f; \n" + __SPEC_CASE(h, r, 0x338FU, 0x1000U) + __SPEC_CASE(h, r, 0x33F8U, 0x9000U) + __SPEC_CASE(h, r, 0x57E1U, 0x9800U) + __SPEC_CASE(h, r, 0x719DU, 0x9C00U) + " mov.b16 %0, r; \n" + "}":"=h"(__HALF_TO_US(val)) : "h"(__HALF_TO_CUS(a))); + return val; +} +__CUDA_FP16_DECL__ __half2 h2log10(const __half2 a) { + __half2 val; + asm("{.reg.b16 hl, hu; \n" + " .reg.b32 r, fl, fu, C, h; \n" + " mov.b32 {hl, hu}, %1; \n" + " mov.b32 h, %1; \n" + " cvt.f32.f16 fl, hl; \n" + " cvt.f32.f16 fu, hu; \n" + " lg2.approx.ftz.f32 fl, fl; \n" + " lg2.approx.ftz.f32 fu, fu; \n" + " mov.b32 C, 0x3E9A209BU; \n" + " mul.f32 fl,fl,C; \n" + " mul.f32 fu,fu,C; \n" + " cvt.rn.f16.f32 hl, fl; \n" + " cvt.rn.f16.f32 hu, fu; \n" + " mov.b32 r, {hl, hu}; \n" + __SPEC_CASE2(h, r, 0x338F338FU, 0x10001000U) + __SPEC_CASE2(h, r, 0x33F833F8U, 0x90009000U) + __SPEC_CASE2(h, r, 0x57E157E1U, 0x98009800U) + __SPEC_CASE2(h, r, 0x719D719DU, 0x9C009C00U) + " mov.b32 %0, r; \n" + "}":"=r"(__HALF2_TO_UI(val)) : "r"(__HALF2_TO_CUI(a))); + return val; +} +#undef __SPEC_CASE2 +#undef __SPEC_CASE +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530) || defined(_NVHPC_CUDA) */ +__CUDA_FP16_DECL__ __half2 h2rcp(const __half2 a) { + __APPROX_FCAST2(rcp) +} +__CUDA_FP16_DECL__ __half hrcp(const __half a) { + __APPROX_FCAST(rcp) +} +__CUDA_FP16_DECL__ __half2 h2rsqrt(const __half2 a) { + __APPROX_FCAST2(rsqrt) +} +__CUDA_FP16_DECL__ __half hrsqrt(const __half a) { + __APPROX_FCAST(rsqrt) +} +__CUDA_FP16_DECL__ __half2 h2sqrt(const __half2 a) { + __APPROX_FCAST2(sqrt) +} +__CUDA_FP16_DECL__ __half hsqrt(const __half a) { + __APPROX_FCAST(sqrt) +} +#undef __APPROX_FCAST +#undef __APPROX_FCAST2 +#endif /* defined(_NVHPC_CUDA) || defined(__CUDACC__) */ +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hisnan2(const __half2 a) +{ + __half2 r; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + asm("{set.nan.f16x2.f16x2 %0,%1,%2;\n}" + :"=r"(__HALF2_TO_UI(r)) : "r"(__HALF2_TO_CUI(a)), "r"(__HALF2_TO_CUI(a))); +, + __half2_raw val; + val.x = __hisnan(a.x) ? (unsigned short)0x3C00U : (unsigned short)0U; + val.y = __hisnan(a.y) ? (unsigned short)0x3C00U : (unsigned short)0U; + r = __half2(val); +) + return r; +} +__CUDA_HOSTDEVICE_FP16_DECL__ bool __hisnan(const __half a) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __half r; + asm("{set.nan.f16.f16 %0,%1,%2;\n}" + :"=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(a)), "h"(__HALF_TO_CUS(a))); + return __HALF_TO_CUS(r) != 0U; +, + const __half_raw hr = static_cast<__half_raw>(a); + return ((hr.x & (unsigned short)0x7FFFU) > (unsigned short)0x7C00U); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hneg2(const __half2 a) +{ + __half2 r; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + asm("{neg.f16x2 %0,%1;\n}" + :"=r"(__HALF2_TO_UI(r)) : "r"(__HALF2_TO_CUI(a))); +, + r.x = __hneg(a.x); + r.y = __hneg(a.y); +) + return r; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hneg(const __half a) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __half r; + asm("{neg.f16 %0,%1;\n}" + :"=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(a))); + return r; +, + const float fa = __half2float(a); + return __float2half(-fa); +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __habs2(const __half2 a) +{ + __half2 r; +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + asm("{abs.f16x2 %0,%1;\n}" + :"=r"(__HALF2_TO_UI(r)) : "r"(__HALF2_TO_CUI(a))); +, + r.x = __habs(a.x); + r.y = __habs(a.y); +) + return r; +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __habs(const __half a) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_53, + __half r; + asm("{abs.f16 %0,%1;\n}" + :"=h"(__HALF_TO_US(r)) : "h"(__HALF_TO_CUS(a))); + return r; +, + __half_raw abs_a_raw = static_cast<__half_raw>(a); + abs_a_raw.x &= (unsigned short)0x7FFFU; + if (abs_a_raw.x > (unsigned short)0x7C00U) + { + // return canonical NaN + abs_a_raw.x = (unsigned short)0x7FFFU; + } + return static_cast<__half>(abs_a_raw); +) +} +#if defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half2 __hcmadd(const __half2 a, const __half2 b, const __half2 c) +{ + // fast version of complex multiply-accumulate + // (a.re, a.im) * (b.re, b.im) + (c.re, c.im) + // acc.re = (c.re + a.re*b.re) - a.im*b.im + // acc.im = (c.im + a.re*b.im) + a.im*b.re + __half real_tmp = __hfma(a.x, b.x, c.x); + __half img_tmp = __hfma(a.x, b.y, c.y); + real_tmp = __hfma(__hneg(a.y), b.y, real_tmp); + img_tmp = __hfma(a.y, b.x, img_tmp); + return make_half2(real_tmp, img_tmp); +} +#endif /* defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) */ + +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmax_nan(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF_MACRO(max.NaN) +, + __half maxval; + if (__hisnan(a) || __hisnan(b)) + { + maxval = CUDART_NAN_FP16; + } + else + { + maxval = __hmax(a, b); + } + return maxval; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half __hmin_nan(const __half a, const __half b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF_MACRO(min.NaN) +, + __half minval; + if (__hisnan(a) || __hisnan(b)) + { + minval = CUDART_NAN_FP16; + } + else + { + minval = __hmin(a, b); + } + return minval; +) +} + +#if defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half __hfma_relu(const __half a, const __half b, const __half c) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __TERNARY_OP_HALF_MACRO(fma.rn.relu) +, + return __hmax_nan(__hfma(a, b, c), CUDART_ZERO_FP16); +) +} +#endif /* defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) */ + +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmax2_nan(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF2_MACRO(max.NaN) +, + __half2 result = __hmax2(a, b); + if (__hisnan(a.x) || __hisnan(b.x)) + { + result.x = CUDART_NAN_FP16; + } + if (__hisnan(a.y) || __hisnan(b.y)) + { + result.y = CUDART_NAN_FP16; + } + return result; +) +} +__CUDA_HOSTDEVICE_FP16_DECL__ __half2 __hmin2_nan(const __half2 a, const __half2 b) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __BINARY_OP_HALF2_MACRO(min.NaN) +, + __half2 result = __hmin2(a, b); + if (__hisnan(a.x) || __hisnan(b.x)) + { + result.x = CUDART_NAN_FP16; + } + if (__hisnan(a.y) || __hisnan(b.y)) + { + result.y = CUDART_NAN_FP16; + } + return result; +) +} +#if defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half2 __hfma2_relu(const __half2 a, const __half2 b, const __half2 c) +{ +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_80, + __TERNARY_OP_HALF2_MACRO(fma.rn.relu) +, + __half2_raw hzero; + hzero.x = (unsigned short)0U; + hzero.y = (unsigned short)0U; + return __hmax2_nan(__hfma2(a, b, c), __half2(hzero)); +) +} +#endif /* defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 530)) || defined(_NVHPC_CUDA) */ + +#if defined(__CUDACC__) || defined(_NVHPC_CUDA) +/* Define __PTR for atomicAdd prototypes below, undef after done */ +#if (defined(_MSC_VER) && defined(_WIN64)) || defined(__LP64__) || defined(__CUDACC_RTC__) +#define __PTR "l" +#else +#define __PTR "r" +#endif /*(defined(_MSC_VER) && defined(_WIN64)) || defined(__LP64__) || defined(__CUDACC_RTC__)*/ + +__CUDA_FP16_DECL__ __half2 atomicAdd(__half2 *const address, const __half2 val) { +NV_IF_ELSE_TARGET(NV_PROVIDES_SM_60, + __half2 r; + asm volatile ("{ atom.add.noftz.f16x2 %0,[%1],%2; }\n" + : "=r"(__HALF2_TO_UI(r)) : __PTR(address), "r"(__HALF2_TO_CUI(val)) + : "memory"); + return r; +, + unsigned int* address_as_uint = (unsigned int*)address; + unsigned int old = *address_as_uint; + unsigned int assumed; + do { + assumed = old; + __half2 new_val = __hadd2(val, *(__half2*)&assumed); + old = atomicCAS(address_as_uint, assumed, *(unsigned int*)&new_val); + } while (assumed != old); + return *(__half2*)&old; +) +} + +#if (defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700))) || defined(_NVHPC_CUDA) +__CUDA_FP16_DECL__ __half atomicAdd(__half *const address, const __half val) { + __half r; + asm volatile ("{ atom.add.noftz.f16 %0,[%1],%2; }\n" + : "=h"(__HALF_TO_US(r)) + : __PTR(address), "h"(__HALF_TO_CUS(val)) + : "memory"); + return r; +} +#endif /* (defined(__CUDACC__) && (!defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700))) || defined(_NVHPC_CUDA) */ + +#undef __PTR +#endif /* defined(__CUDACC__) || defined(_NVHPC_CUDA) */ +#endif /* !(defined __DOXYGEN_ONLY__) */ +#endif /* defined(__cplusplus) */ + +#undef __TERNARY_OP_HALF2_MACRO +#undef __TERNARY_OP_HALF_MACRO +#undef __BINARY_OP_HALF2_MACRO +#undef __BINARY_OP_HALF_MACRO + +#undef __CUDA_HOSTDEVICE_FP16_DECL__ +#undef __CUDA_FP16_DECL__ + +#undef __HALF_TO_US +#undef __HALF_TO_CUS +#undef __HALF2_TO_UI +#undef __HALF2_TO_CUI +#undef __CUDA_FP16_CONSTEXPR__ + +#if defined(__CPP_VERSION_AT_LEAST_11_FP16) +#undef __CPP_VERSION_AT_LEAST_11_FP16 +#endif /* defined(__CPP_VERSION_AT_LEAST_11_FP16) */ + +#undef ___CUDA_FP16_STRINGIFY_INNERMOST +#undef __CUDA_FP16_STRINGIFY + +#endif /* end of include guard: __CUDA_FP16_HPP__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline.h new file mode 100644 index 0000000000000000000000000000000000000000..46bc89e4499576f1ae58848cd8684ba3e32420cf --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline.h @@ -0,0 +1,224 @@ +/* + * 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. + */ + +#ifndef _CUDA_PIPELINE_H_ +# define _CUDA_PIPELINE_H_ + +# include "cuda_pipeline_primitives.h" + +# if !defined(_CUDA_PIPELINE_CPLUSPLUS_11_OR_LATER) +# error This file requires compiler support for the ISO C++ 2011 standard. This support must be enabled with the \ + -std=c++11 compiler option. +# endif + +# if defined(_CUDA_PIPELINE_ARCH_700_OR_LATER) +# include "cuda_awbarrier.h" +# endif + +// Integration with libcu++'s cuda::barrier. + +# if defined(_CUDA_PIPELINE_ARCH_700_OR_LATER) +# if defined(_LIBCUDACXX_CUDA_ABI_VERSION) +# define _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION _LIBCUDACXX_CUDA_ABI_VERSION +# else +# define _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION 4 +# endif + +# define _LIBCUDACXX_PIPELINE_CONCAT(X, Y) X ## Y +# define _LIBCUDACXX_PIPELINE_CONCAT2(X, Y) _LIBCUDACXX_PIPELINE_CONCAT(X, Y) +# define _LIBCUDACXX_PIPELINE_INLINE_NAMESPACE _LIBCUDACXX_PIPELINE_CONCAT2(__, _LIBCUDACXX_PIPELINE_ASSUMED_ABI_VERSION) + +namespace cuda { inline namespace _LIBCUDACXX_PIPELINE_INLINE_NAMESPACE { + struct __block_scope_barrier_base; +}} + +# endif + +_CUDA_PIPELINE_BEGIN_NAMESPACE + +template +_CUDA_PIPELINE_QUALIFIER +auto segment(T* ptr) -> T(*)[N]; + +class pipeline { +public: + pipeline(const pipeline&) = delete; + pipeline(pipeline&&) = delete; + pipeline& operator=(const pipeline&) = delete; + pipeline& operator=(pipeline&&) = delete; + + _CUDA_PIPELINE_QUALIFIER pipeline(); + _CUDA_PIPELINE_QUALIFIER size_t commit(); + _CUDA_PIPELINE_QUALIFIER void commit_and_wait(); + _CUDA_PIPELINE_QUALIFIER void wait(size_t batch); + template + _CUDA_PIPELINE_QUALIFIER void wait_prior(); + +# if defined(_CUDA_PIPELINE_ARCH_700_OR_LATER) + _CUDA_PIPELINE_QUALIFIER void arrive_on(awbarrier& barrier); + _CUDA_PIPELINE_QUALIFIER void arrive_on(cuda::__block_scope_barrier_base& barrier); +# endif + +private: + size_t current_batch; +}; + +template +_CUDA_PIPELINE_QUALIFIER +void memcpy_async(T& dst, const T& src, pipeline& pipe); + +template +_CUDA_PIPELINE_QUALIFIER +void memcpy_async(T(*dst)[DstN], const T(*src)[SrcN], pipeline& pipe); + +template +_CUDA_PIPELINE_QUALIFIER +auto segment(T* ptr) -> T(*)[N] +{ + return (T(*)[N])ptr; +} + +_CUDA_PIPELINE_QUALIFIER +pipeline::pipeline() + : current_batch(0) +{ +} + +_CUDA_PIPELINE_QUALIFIER +size_t pipeline::commit() +{ + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_commit(); + return this->current_batch++; +} + +_CUDA_PIPELINE_QUALIFIER +void pipeline::commit_and_wait() +{ + (void)pipeline::commit(); + pipeline::wait_prior<0>(); +} + +_CUDA_PIPELINE_QUALIFIER +void pipeline::wait(size_t batch) +{ + const size_t prior = this->current_batch > batch ? this->current_batch - batch : 0; + + switch (prior) { + case 0 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<0>(); break; + case 1 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<1>(); break; + case 2 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<2>(); break; + case 3 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<3>(); break; + case 4 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<4>(); break; + case 5 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<5>(); break; + case 6 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<6>(); break; + case 7 : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<7>(); break; + default : _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior<8>(); break; + } +} + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline::wait_prior() +{ + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_wait_prior(); +} + +# if defined(_CUDA_PIPELINE_ARCH_700_OR_LATER) +_CUDA_PIPELINE_QUALIFIER +void pipeline::arrive_on(awbarrier& barrier) +{ + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_arrive_on(&barrier.barrier); +} + +_CUDA_PIPELINE_QUALIFIER +void pipeline::arrive_on(cuda::__block_scope_barrier_base & barrier) +{ + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_arrive_on(reinterpret_cast(&barrier)); +} +# endif + +template +_CUDA_PIPELINE_QUALIFIER +void memcpy_async(T& dst, const T& src, pipeline& pipe) +{ + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(&src) & (alignof(T) - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(&dst) & (alignof(T) - 1))); + + if (__is_trivially_copyable(T)) { + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_copy_relaxed( + reinterpret_cast(&dst), reinterpret_cast(&src)); + } else { + dst = src; + } +} + +template +_CUDA_PIPELINE_QUALIFIER +void memcpy_async(T(*dst)[DstN], const T(*src)[SrcN], pipeline& pipe) +{ + constexpr size_t dst_size = sizeof(*dst); + constexpr size_t src_size = sizeof(*src); + static_assert(dst_size == 4 || dst_size == 8 || dst_size == 16, "Unsupported copy size."); + static_assert(src_size <= dst_size, "Source size must be less than or equal to destination size."); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (dst_size - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (dst_size - 1))); + + if (__is_trivially_copyable(T)) { + _CUDA_PIPELINE_INTERNAL_NAMESPACE::pipeline_copy_strict( + reinterpret_cast(*dst), reinterpret_cast(*src)); + } else { + for (size_t i = 0; i < DstN; ++i) { + (*dst)[i] = (i < SrcN) ? (*src)[i] : T(); + } + } +} + +_CUDA_PIPELINE_END_NAMESPACE + +#endif /* !_CUDA_PIPELINE_H_ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline_helpers.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline_helpers.h new file mode 100644 index 0000000000000000000000000000000000000000..01882b6b976347b9bfdf276c3d0adcec1d8a55fa --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_pipeline_helpers.h @@ -0,0 +1,373 @@ +/* + * 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. + */ + +#ifndef _CUDA_PIPELINE_HELPERS_H_ +# define _CUDA_PIPELINE_HELPERS_H_ + +# define _CUDA_PIPELINE_NAMESPACE nvcuda::experimental +# define _CUDA_PIPELINE_BEGIN_NAMESPACE namespace nvcuda { namespace experimental { +# define _CUDA_PIPELINE_END_NAMESPACE } } + +# define _CUDA_PIPELINE_INTERNAL_NAMESPACE _CUDA_PIPELINE_NAMESPACE::__pipeline_internal +# define _CUDA_PIPELINE_BEGIN_INTERNAL_NAMESPACE _CUDA_PIPELINE_BEGIN_NAMESPACE namespace __pipeline_internal { +# define _CUDA_PIPELINE_END_INTERNAL_NAMESPACE } _CUDA_PIPELINE_END_NAMESPACE + +# if !defined(_CUDA_PIPELINE_QUALIFIER) +# define _CUDA_PIPELINE_QUALIFIER inline __device__ +# endif +# if !defined(_CUDA_PIPELINE_STATIC_QUALIFIER) +# define _CUDA_PIPELINE_STATIC_QUALIFIER static inline __device__ +# endif + +# if defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) +# define _CUDA_PIPELINE_ARCH_700_OR_LATER +# endif + +# if (__CUDA_ARCH__ >= 800) +# define _CUDA_PIPELINE_HAS_ASYNC_COPY 1 +# else +# define _CUDA_PIPELINE_HAS_ASYNC_COPY 0 +# endif + +# if !defined(_CUDA_PIPELINE_MAX_STAGES) +# define _CUDA_PIPELINE_MAX_STAGES 8 +# endif + +# if defined(__cplusplus) && ((__cplusplus >= 201103L) || (defined(_MSC_VER) && (_MSC_VER >= 1900))) +# define _CUDA_PIPELINE_CPLUSPLUS_11_OR_LATER +# endif + +# if !defined(_CUDA_PIPELINE_DEBUG) +# if defined(__CUDACC_DEBUG__) +# define _CUDA_PIPELINE_DEBUG 1 +# else +# define _CUDA_PIPELINE_DEBUG 0 +# endif +# endif + +# if defined(_CUDA_PIPELINE_DEBUG) && (_CUDA_PIPELINE_DEBUG == 1) && !defined(NDEBUG) +# if !defined(__CUDACC_RTC__) +# include +# endif +# define _CUDA_PIPELINE_ASSERT(x) assert((x)); +# define _CUDA_PIPELINE_ABORT() assert(0); +# else +# define _CUDA_PIPELINE_ASSERT(x) +# define _CUDA_PIPELINE_ABORT() __trap(); +# endif + +# if defined(_CUDA_PIPELINE_CPLUSPLUS_11_OR_LATER) +# define _CUDA_PIPELINE_STATIC_ASSERT(c, m) static_assert(c, m) +# else +# define _CUDA_PIPELINE_STATIC_ASSERT(c, m) +# endif + +# if (defined(_MSC_VER) && !defined(_WIN64)) || defined(__arm__) +# define _CUDA_PIPELINE_ASM_PTR_CONSTRAINT "r" +# else +# define _CUDA_PIPELINE_ASM_PTR_CONSTRAINT "l" +# endif + +# if defined(__CUDACC_RTC__) +typedef unsigned int uint32_t; +typedef unsigned long long uint64_t; +typedef uint64_t uintptr_t; +# else +# include +# endif + +_CUDA_PIPELINE_BEGIN_INTERNAL_NAMESPACE + +_CUDA_PIPELINE_STATIC_ASSERT(sizeof(short) == 2, "Size mismatch for type 'short'"); +_CUDA_PIPELINE_STATIC_ASSERT(sizeof(int) == 4, "Size mismatch for type 'int'"); +_CUDA_PIPELINE_STATIC_ASSERT(sizeof(int2) == 8, "Size mismatch for type 'int2'"); +_CUDA_PIPELINE_STATIC_ASSERT(sizeof(int4) == 16, "Size mismatch for type 'int4'"); + +extern "C" __device__ uint32_t __nvvm_get_smem_pointer(void *); + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline_memcpy_sync(void* __restrict__ dst, const void* __restrict__ src) +{ + _CUDA_PIPELINE_STATIC_ASSERT(CopySize == 4 || CopySize == 8 || CopySize == 16, "Unsupported copy size."); + _CUDA_PIPELINE_STATIC_ASSERT(SourceSize <= CopySize, "Source size must be less than or equal to copy size"); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (CopySize - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (CopySize - 1))); + + char* const d = reinterpret_cast(dst); + const char* const s = reinterpret_cast(src); + + size_t copy_step_size; + if (SourceSize == 0) { + copy_step_size = CopySize; + } else if (SourceSize == 2 || SourceSize == 4 || SourceSize == 8 || SourceSize == 16) { + copy_step_size = SourceSize; + } else { + copy_step_size = 1; + } + + for (size_t i = 0; i < CopySize; i += copy_step_size) { + const bool copy_source = SourceSize && (i < SourceSize); + + switch (copy_step_size) { + case 1: + d[i] = copy_source ? s[i] : char(); + break; + case 2: + *reinterpret_cast(d + i) = copy_source ? *reinterpret_cast(s + i) : short(); + break; + case 4: + *reinterpret_cast(d + i) = copy_source ? *reinterpret_cast(s + i) : int(); + break; + case 8: + *reinterpret_cast(d + i) = copy_source ? *reinterpret_cast(s + i) : int2(); + break; + case 16: + *reinterpret_cast(d + i) = copy_source ? *reinterpret_cast(s + i) : int4(); + break; + } + } +} + +template +struct ImplementationChooser; + +template<> +struct ImplementationChooser { + template + struct CpAsyncChooser { + _CUDA_PIPELINE_STATIC_QUALIFIER + void cp_async(void* __restrict__ dst, const void* __restrict__ src) + { + asm volatile ("cp.async.ca.shared.global [%0], [%1], %2, %3;" + : + : "r"(__nvvm_get_smem_pointer(dst)), _CUDA_PIPELINE_ASM_PTR_CONSTRAINT(src), "n"(CopySize), + "n"(SourceSize) + : "memory"); + } + }; + + template + struct CpAsyncChooser<16, SourceSize> { + _CUDA_PIPELINE_STATIC_QUALIFIER + void cp_async(void* __restrict__ dst, const void* __restrict__ src) + { + asm volatile ("cp.async.cg.shared.global [%0], [%1], %2, %3;" + : + : "r"(__nvvm_get_smem_pointer(dst)), _CUDA_PIPELINE_ASM_PTR_CONSTRAINT(src), "n"(16), "n"(SourceSize) + : "memory"); + } + }; + + template + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_memcpy_async(void* __restrict__ dst, const void* __restrict__ src) + { + _CUDA_PIPELINE_STATIC_ASSERT(CopySize == 4 || CopySize == 8 || CopySize == 16, "Unsupported copy size."); + _CUDA_PIPELINE_STATIC_ASSERT(SourceSize <= CopySize, "Source size must be less than or equal to copy size"); + _CUDA_PIPELINE_ASSERT(__isShared(dst)); + _CUDA_PIPELINE_ASSERT(__isGlobal(src)); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (CopySize - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (CopySize - 1))); + + CpAsyncChooser::cp_async(dst, src); + } + + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_commit() + { + asm volatile ("cp.async.commit_group;"); + } + + template + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_wait_prior() + { + asm volatile ("cp.async.wait_group %0;" + : + : "n"(N < _CUDA_PIPELINE_MAX_STAGES ? N : _CUDA_PIPELINE_MAX_STAGES)); + } + + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_arrive_on(uint64_t* barrier) + { + _CUDA_PIPELINE_ASSERT(__isShared(barrier)); + + asm volatile ("cp.async.mbarrier.arrive.shared.b64 [%0];" + : + : "r"(__nvvm_get_smem_pointer(barrier))); + } +}; + +template<> +struct ImplementationChooser { + template + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_memcpy_async(void* __restrict__ dst, const void* __restrict__ src) + { + _CUDA_PIPELINE_STATIC_ASSERT(CopySize == 4 || CopySize == 8 || CopySize == 16, "Unsupported copy size."); + _CUDA_PIPELINE_STATIC_ASSERT(SourceSize <= CopySize, "Source size must be less than or equal to copy size"); + _CUDA_PIPELINE_ASSERT(__isShared(dst)); + _CUDA_PIPELINE_ASSERT(__isGlobal(src)); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (CopySize - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (CopySize - 1))); + + pipeline_memcpy_sync(dst, src); + } + + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_commit() + { + } + + template + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_wait_prior() + { + } + + _CUDA_PIPELINE_STATIC_QUALIFIER + void pipeline_arrive_on(uint64_t* barrier) + { + } +}; + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline_memcpy_async(void* __restrict__ dst, const void* __restrict__ src) +{ + _CUDA_PIPELINE_STATIC_ASSERT(CopySize == 4 || CopySize == 8 || CopySize == 16, "Unsupported copy size."); + _CUDA_PIPELINE_STATIC_ASSERT(SourceSize <= CopySize, "Source size must be less than or equal to copy size"); + _CUDA_PIPELINE_ASSERT(__isShared(dst)); + _CUDA_PIPELINE_ASSERT(__isGlobal(src)); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (CopySize - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (CopySize - 1))); + + ImplementationChooser<_CUDA_PIPELINE_HAS_ASYNC_COPY>::pipeline_memcpy_async(dst, src); +} + +_CUDA_PIPELINE_QUALIFIER +void pipeline_commit() +{ + ImplementationChooser<_CUDA_PIPELINE_HAS_ASYNC_COPY>::pipeline_commit(); +} + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline_wait_prior() +{ + ImplementationChooser<_CUDA_PIPELINE_HAS_ASYNC_COPY>::pipeline_wait_prior(); +} + +_CUDA_PIPELINE_QUALIFIER +void pipeline_arrive_on(uint64_t* barrier) +{ + ImplementationChooser<_CUDA_PIPELINE_HAS_ASYNC_COPY>::pipeline_arrive_on(barrier); +} + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline_copy_strict(void* __restrict__ dst, const void* __restrict__ src) +{ + _CUDA_PIPELINE_STATIC_ASSERT(CopySize == 4 || CopySize == 8 || CopySize == 16, "Unsupported copy size."); + _CUDA_PIPELINE_STATIC_ASSERT(SourceSize <= CopySize, "Source size must be less than or equal to copy size."); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (CopySize - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (CopySize - 1))); + + if (__isGlobal(src) && __isShared(dst)) { + pipeline_memcpy_async(dst, src); + } else { + pipeline_memcpy_sync(dst, src); + } +} + +template +_CUDA_PIPELINE_QUALIFIER +void pipeline_copy_relaxed(void* __restrict__ dst, const void* __restrict__ src) +{ + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(src) & (Align - 1))); + _CUDA_PIPELINE_ASSERT(!(reinterpret_cast(dst) & (Align - 1))); + + const char* s = reinterpret_cast(src); + char* d = reinterpret_cast(dst); + size_t remaining = CopySize; + + while (remaining) { + if ((Align >= 16) && (remaining >= 16)) { + pipeline_copy_strict<16, 16>(dst, src); + d += 16; + s += 16; + remaining -= 16; + } else if ((Align >= 8) && (remaining >= 8)) { + pipeline_copy_strict<8, 8>(dst, src); + d += 8; + s += 8; + remaining -= 8; + } else if ((Align >= 4) && (remaining >= 4)) { + pipeline_copy_strict<4, 4>(dst, src); + d += 4; + s += 4; + remaining -= 4; + } else if ((Align >= 2) && (remaining >= 2)) { + *reinterpret_cast(d) = *reinterpret_cast(s); + d += 2; + s += 2; + remaining -= 2; + } else { + *d = *s; + d += 1; + s += 1; + remaining -= 1; + } + } +} + +_CUDA_PIPELINE_END_INTERNAL_NAMESPACE + +#endif /* !_CUDA_PIPELINE_HELPERS_H_ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime.h new file mode 100644 index 0000000000000000000000000000000000000000..dc36a6079c30f86fa9df3a011a5a2670861c0fe6 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime.h @@ -0,0 +1,2591 @@ +/* + * Copyright 1993-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(__CUDA_RUNTIME_H__) +#define __CUDA_RUNTIME_H__ + +#if !defined(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__) +#define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__ +#endif + +#define EXCLUDE_FROM_RTC +#if defined(__GNUC__) +#if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) +#pragma GCC diagnostic push +#endif +#if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))) +#pragma GCC diagnostic ignored "-Wunused-function" +#endif +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable: 4820) +#endif +#ifdef __QNX__ +#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) +typedef unsigned size_t; +#endif +#endif +#undef EXCLUDE_FROM_RTC +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "crt/host_config.h" + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "builtin_types.h" +#include "library_types.h" +#if !defined(__CUDACC_RTC__) +#define EXCLUDE_FROM_RTC +#include "channel_descriptor.h" +#include "cuda_runtime_api.h" +#include "driver_functions.h" +#undef EXCLUDE_FROM_RTC +#endif /* !__CUDACC_RTC__ */ +#include "crt/host_defines.h" +#ifdef __CUDACC_RTC__ +#include "target" +#endif /* defined(__CUDACC_RTC__) */ + + +#include "vector_functions.h" + +#if defined(__CUDACC__) + +#if defined(__CUDACC_RTC__) +#include "nvrtc_device_runtime.h" +#include "crt/device_functions.h" +#include "crt/common_functions.h" +#include "device_launch_parameters.h" + +#else /* !__CUDACC_RTC__ */ +#define EXCLUDE_FROM_RTC +#include "crt/common_functions.h" +#include "crt/device_functions.h" +#include "device_launch_parameters.h" + +#if defined(__CUDACC_EXTENDED_LAMBDA__) +#include +#include +struct __device_builtin__ __nv_lambda_preheader_injection { }; +#endif /* defined(__CUDACC_EXTENDED_LAMBDA__) */ + +#undef EXCLUDE_FROM_RTC +#endif /* __CUDACC_RTC__ */ + +#endif /* __CUDACC__ */ + +/** \cond impl_private */ +#if defined(__DOXYGEN_ONLY__) || defined(CUDA_ENABLE_DEPRECATED) +#define __CUDA_DEPRECATED +#elif defined(_MSC_VER) +#define __CUDA_DEPRECATED __declspec(deprecated) +#elif defined(__GNUC__) +#define __CUDA_DEPRECATED __attribute__((deprecated)) +#else +#define __CUDA_DEPRECATED +#endif +/** \endcond impl_private */ + +#define EXCLUDE_FROM_RTC +#if defined(__cplusplus) && !defined(__CUDACC_RTC__) + +#if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900)) +#include +#endif + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +/** + * \addtogroup CUDART_HIGHLEVEL + * @{ + */ + +/** + *\brief Launches a device function + * + * The function invokes kernel \p func on \p gridDim (\p gridDim.x × \p gridDim.y + * × \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x × + * \p blockDim.y × \p blockDim.z) threads. + * + * If the kernel has N parameters the \p args should point to array of N pointers. + * Each pointer, from args[0] to args[N - 1], point to the region + * of memory from which the actual parameter will be copied. + * + * \p sharedMem sets the amount of dynamic shared memory that will be available to + * each thread block. + * + * \p stream specifies a stream the invocation is associated to. + * + * \param func - Device function symbol + * \param gridDim - Grid dimentions + * \param blockDim - Block dimentions + * \param args - Arguments + * \param sharedMem - Shared memory (defaults to 0) + * \param stream - Stream identifier (defaults to NULL) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C API)" + */ +template +static __inline__ __host__ cudaError_t cudaLaunchKernel( + T *func, + dim3 gridDim, + dim3 blockDim, + void **args, + size_t sharedMem = 0, + cudaStream_t stream = 0 +) +{ + return ::cudaLaunchKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream); +} + + +#if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__DOXYGEN_ONLY__) +/** + * \brief Launches a CUDA function with launch-time configuration + * + * Invokes the kernel \p kernel on \p config->gridDim (\p config->gridDim.x + * × \p config->gridDim.y × \p config->gridDim.z) grid of blocks. + * Each block contains \p config->blockDim (\p config->blockDim.x × + * \p config->blockDim.y × \p config->blockDim.z) threads. + * + * \p config->dynamicSmemBytes sets the amount of dynamic shared memory that + * will be available to each thread block. + * + * \p config->stream specifies a stream the invocation is associated to. + * + * Configuration beyond grid and block dimensions, dynamic shared memory size, + * and stream can be provided with the following two fields of \p config: + * + * \p config->attrs is an array of \p config->numAttrs contiguous + * ::cudaLaunchAttribute elements. The value of this pointer is not considered + * if \p config->numAttrs is zero. However, in that case, it is recommended to + * set the pointer to NULL. + * \p config->numAttrs is the number of attributes populating the first + * \p config->numAttrs positions of the \p config->attrs array. + * + * The kernel arguments should be passed as arguments to this function via the + * \p args parameter pack. + * + * The C API version of this function, \p cudaLaunchKernelExC, is also available + * for pre-C++11 compilers and for use cases where the ability to pass kernel + * parameters via void* array is preferable. + * + * \param config - Launch configuration + * \param kernel - Kernel to launch + * \param args - Parameter pack of kernel parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * \ref ::cudaLaunchKernelExC(const cudaLaunchConfig_t *config, const void *func, void **args) "cudaLaunchKernelEx (C API)", + * ::cuLaunchKernelEx + */ +template +static __inline__ __host__ cudaError_t cudaLaunchKernelEx( + const cudaLaunchConfig_t *config, + void (*kernel)(ExpTypes...), + ActTypes &&... args +) +{ + return [&](ExpTypes... coercedArgs){ + void *pArgs[] = { &coercedArgs... }; + return ::cudaLaunchKernelExC(config, (const void *)kernel, pArgs); + }(std::forward(args)...); +} + +/** + * \brief Launches a CUDA function with launch-time configuration + * + * Invokes the kernel \p kernel on \p config->gridDim (\p config->gridDim.x + * × \p config->gridDim.y × \p config->gridDim.z) grid of blocks. + * Each block contains \p config->blockDim (\p config->blockDim.x × + * \p config->blockDim.y × \p config->blockDim.z) threads. + * + * \p config->dynamicSmemBytes sets the amount of dynamic shared memory that + * will be available to each thread block. + * + * \p config->stream specifies a stream the invocation is associated to. + * + * Configuration beyond grid and block dimensions, dynamic shared memory size, + * and stream can be provided with the following two fields of \p config: + * + * \p config->attrs is an array of \p config->numAttrs contiguous + * ::cudaLaunchAttribute elements. The value of this pointer is not considered + * if \p config->numAttrs is zero. However, in that case, it is recommended to + * set the pointer to NULL. + * \p config->numAttrs is the number of attributes populating the first + * \p config->numAttrs positions of the \p config->attrs array. + * + * The kernel arguments should be passed as arguments to this function via the + * \p args parameter pack. + * + * The C API version of this function, \p cudaLaunchKernelExC, is also available + * for pre-C++11 compilers and for use cases where the ability to pass kernel + * parameters via void* array is preferable. + * + * \param config - Launch configuration + * \param func - Kernel to launch + * \param args - Parameter pack of kernel parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaLaunchKernelExC(const cudaLaunchConfig_t *config, const void *func, void **args) "cudaLaunchKernelEx (C API)", + * ::cuLaunchKernelEx + */ +template +static __inline__ __host__ cudaError_t cudaLaunchKernelEx( + const cudaLaunchConfig_t *config, + const cudaKernel_t kernel, + ActTypes &&... args +) +{ + void *pArgs[] = { &args... }; + return ::cudaLaunchKernelExC(config, (const void *)kernel, pArgs); +} +#endif + +/** + *\brief Launches a device function + * + * The function invokes kernel \p func on \p gridDim (\p gridDim.x × \p gridDim.y + * × \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x × + * \p blockDim.y × \p blockDim.z) threads. + * + * The device on which this kernel is invoked must have a non-zero value for + * the device attribute ::cudaDevAttrCooperativeLaunch. + * + * The total number of blocks launched cannot exceed the maximum number of blocks per + * multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or + * ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors + * as specified by the device attribute ::cudaDevAttrMultiProcessorCount. + * + * The kernel cannot make use of CUDA dynamic parallelism. + * + * If the kernel has N parameters the \p args should point to array of N pointers. + * Each pointer, from args[0] to args[N - 1], point to the region + * of memory from which the actual parameter will be copied. + * + * \p sharedMem sets the amount of dynamic shared memory that will be available to + * each thread block. + * + * \p stream specifies a stream the invocation is associated to. + * + * \param func - Device function symbol + * \param gridDim - Grid dimentions + * \param blockDim - Block dimentions + * \param args - Arguments + * \param sharedMem - Shared memory (defaults to 0) + * \param stream - Stream identifier (defaults to NULL) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaLaunchCooperativeKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchCooperativeKernel (C API)" + */ +template +static __inline__ __host__ cudaError_t cudaLaunchCooperativeKernel( + T *func, + dim3 gridDim, + dim3 blockDim, + void **args, + size_t sharedMem = 0, + cudaStream_t stream = 0 +) +{ + return ::cudaLaunchCooperativeKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream); +} + +/** + * \brief \hl Creates an event object with the specified flags + * + * Creates an event object with the specified flags. Valid flags include: + * - ::cudaEventDefault: Default event creation flag. + * - ::cudaEventBlockingSync: Specifies that event should use blocking + * synchronization. A host thread that uses ::cudaEventSynchronize() to wait + * on an event created with this flag will block until the event actually + * completes. + * - ::cudaEventDisableTiming: Specifies that the created event does not need + * to record timing data. Events created with this flag specified and + * the ::cudaEventBlockingSync flag not specified will provide the best + * performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery(). + * + * \param event - Newly created event + * \param flags - Flags for new event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorLaunchFailure, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cudaStreamWaitEvent + */ +static __inline__ __host__ cudaError_t cudaEventCreate( + cudaEvent_t *event, + unsigned int flags +) +{ + return ::cudaEventCreateWithFlags(event, flags); +} + +/** + * \brief Creates an executable graph from a graph + * + * Instantiates \p graph as an executable graph. The graph is validated for any + * structural constraints or intra-node constraints which were not previously + * validated. If instantiation is successful, a handle to the instantiated graph + * is returned in \p pGraphExec. + * + * If there are any errors, diagnostic information may be returned in \p pErrorNode and + * \p pLogBuffer. This is the primary way to inspect instantiation errors. The output + * will be null terminated unless the diagnostics overflow + * the buffer. In this case, they will be truncated, and the last byte can be + * inspected to determine if truncation occurred. + * + * \param pGraphExec - Returns instantiated graph + * \param graph - Graph to instantiate + * \param pErrorNode - In case of an instantiation error, this may be modified to + * indicate a node contributing to the error + * \param pLogBuffer - A character buffer to store diagnostic messages + * \param bufferSize - Size of the log buffer in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiateWithFlags, + * ::cudaGraphCreate, + * ::cudaGraphUpload, + * ::cudaGraphLaunch, + * ::cudaGraphExecDestroy + */ +static __inline__ __host__ cudaError_t cudaGraphInstantiate( + cudaGraphExec_t *pGraphExec, + cudaGraph_t graph, + cudaGraphNode_t *pErrorNode, + char *pLogBuffer, + size_t bufferSize +) +{ + (void)pErrorNode; + (void)pLogBuffer; + (void)bufferSize; + return ::cudaGraphInstantiate(pGraphExec, graph, 0); +} + +/** + * \brief \hl Allocates page-locked memory on the host + * + * Allocates \p size bytes of host memory that is page-locked and accessible + * to the device. The driver tracks the virtual memory ranges allocated with + * this function and automatically accelerates calls to functions such as + * ::cudaMemcpy(). Since the memory can be accessed directly by the device, it + * can be read or written with much higher bandwidth than pageable memory + * obtained with functions such as ::malloc(). Allocating excessive amounts of + * pinned memory may degrade system performance, since it reduces the amount + * of memory available to the system for paging. As a result, this function is + * best used sparingly to allocate staging areas for data exchange between host + * and device. + * + * The \p flags parameter enables different options to be specified that affect + * the allocation, as follows. + * - ::cudaHostAllocDefault: This flag's value is defined to be 0. + * - ::cudaHostAllocPortable: The memory returned by this call will be + * considered as pinned memory by all CUDA contexts, not just the one that + * performed the allocation. + * - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space. + * The device pointer to the memory may be obtained by calling + * ::cudaHostGetDevicePointer(). + * - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC). + * WC memory can be transferred across the PCI Express bus more quickly on some + * system configurations, but cannot be read efficiently by most CPUs. WC + * memory is a good option for buffers that will be written by the CPU and read + * by the device via mapped pinned memory or host->device transfers. + * + * All of these flags are orthogonal to one another: a developer may allocate + * memory that is portable, mapped and/or write-combined with no restrictions. + * + * ::cudaSetDeviceFlags() must have been called with the ::cudaDeviceMapHost + * flag in order for the ::cudaHostAllocMapped flag to have any effect. + * + * The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices + * that do not support mapped pinned memory. The failure is deferred to + * ::cudaHostGetDevicePointer() because the memory may be mapped into other + * CUDA contexts via the ::cudaHostAllocPortable flag. + * + * Memory allocated by this function must be freed with ::cudaFreeHost(). + * + * \param ptr - Device pointer to allocated memory + * \param size - Requested allocation size in bytes + * \param flags - Requested properties of allocated memory + * + * \return + * ::cudaSuccess, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaSetDeviceFlags, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc + */ +static __inline__ __host__ cudaError_t cudaMallocHost( + void **ptr, + size_t size, + unsigned int flags +) +{ + return ::cudaHostAlloc(ptr, size, flags); +} + +template +static __inline__ __host__ cudaError_t cudaHostAlloc( + T **ptr, + size_t size, + unsigned int flags +) +{ + return ::cudaHostAlloc((void**)(void*)ptr, size, flags); +} + +template +static __inline__ __host__ cudaError_t cudaHostGetDevicePointer( + T **pDevice, + void *pHost, + unsigned int flags +) +{ + return ::cudaHostGetDevicePointer((void**)(void*)pDevice, pHost, flags); +} + +/** + * \brief Allocates memory that will be automatically managed by the Unified Memory system + * + * Allocates \p size bytes of managed memory on the device and returns in + * \p *devPtr a pointer to the allocated memory. If the device doesn't support + * allocating managed memory, ::cudaErrorNotSupported is returned. Support + * for managed memory can be queried using the device attribute + * ::cudaDevAttrManagedMemory. The allocated memory is suitably + * aligned for any kind of variable. The memory is not cleared. If \p size + * is 0, ::cudaMallocManaged returns ::cudaErrorInvalidValue. The pointer + * is valid on the CPU and on all GPUs in the system that support managed memory. + * All accesses to this pointer must obey the Unified Memory programming model. + * + * \p flags specifies the default stream association for this allocation. + * \p flags must be one of ::cudaMemAttachGlobal or ::cudaMemAttachHost. The + * default value for \p flags is ::cudaMemAttachGlobal. + * If ::cudaMemAttachGlobal is specified, then this memory is accessible from + * any stream on any device. If ::cudaMemAttachHost is specified, then the + * allocation should not be accessed from devices that have a zero value for the + * device attribute ::cudaDevAttrConcurrentManagedAccess; an explicit call to + * ::cudaStreamAttachMemAsync will be required to enable access on such devices. + * + * If the association is later changed via ::cudaStreamAttachMemAsync to + * a single stream, the default association, as specifed during ::cudaMallocManaged, + * is restored when that stream is destroyed. For __managed__ variables, the + * default association is always ::cudaMemAttachGlobal. Note that destroying a + * stream is an asynchronous operation, and as a result, the change to default + * association won't happen until all work in the stream has completed. + * + * Memory allocated with ::cudaMallocManaged should be released with ::cudaFree. + * + * Device memory oversubscription is possible for GPUs that have a non-zero value for the + * device attribute ::cudaDevAttrConcurrentManagedAccess. Managed memory on + * such GPUs may be evicted from device memory to host memory at any time by the Unified + * Memory driver in order to make room for other allocations. + * + * In a multi-GPU system where all GPUs have a non-zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess, managed memory may not be populated when this + * API returns and instead may be populated on access. In such systems, managed memory can + * migrate to any processor's memory at any time. The Unified Memory driver will employ heuristics to + * maintain data locality and prevent excessive page faults to the extent possible. The application + * can also guide the driver about memory usage patterns via ::cudaMemAdvise. The application + * can also explicitly migrate memory to a desired processor's memory via + * ::cudaMemPrefetchAsync. + * + * In a multi-GPU system where all of the GPUs have a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess and all the GPUs have peer-to-peer support + * with each other, the physical storage for managed memory is created on the GPU which is active + * at the time ::cudaMallocManaged is called. All other GPUs will reference the data at reduced + * bandwidth via peer mappings over the PCIe bus. The Unified Memory driver does not migrate + * memory among such GPUs. + * + * In a multi-GPU system where not all GPUs have peer-to-peer support with each other and + * where the value of the device attribute ::cudaDevAttrConcurrentManagedAccess + * is zero for at least one of those GPUs, the location chosen for physical storage of managed + * memory is system-dependent. + * - On Linux, the location chosen will be device memory as long as the current set of active + * contexts are on devices that either have peer-to-peer support with each other or have a + * non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * If there is an active context on a GPU that does not have a non-zero value for that device + * attribute and it does not have peer-to-peer support with the other devices that have active + * contexts on them, then the location for physical storage will be 'zero-copy' or host memory. + * Note that this means that managed memory that is located in device memory is migrated to + * host memory if a new context is created on a GPU that doesn't have a non-zero value for + * the device attribute and does not support peer-to-peer with at least one of the other devices + * that has an active context. This in turn implies that context creation may fail if there is + * insufficient host memory to migrate all managed allocations. + * - On Windows, the physical storage is always created in 'zero-copy' or host memory. + * All GPUs will reference the data at reduced bandwidth over the PCIe bus. In these + * circumstances, use of the environment variable CUDA_VISIBLE_DEVICES is recommended to + * restrict CUDA to only use those GPUs that have peer-to-peer support. + * Alternatively, users can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero + * value to force the driver to always use device memory for physical storage. + * When this environment variable is set to a non-zero value, all devices used in + * that process that support managed memory have to be peer-to-peer compatible + * with each other. The error ::cudaErrorInvalidDevice will be returned if a device + * that supports managed memory is used and it is not peer-to-peer compatible with + * any of the other managed memory supporting devices that were previously used in + * that process, even if ::cudaDeviceReset has been called on those devices. These + * environment variables are described in the CUDA programming guide under the + * "CUDA environment variables" section. + * - On ARM, managed memory is not available on discrete gpu with Drive PX-2. + * + * \param devPtr - Pointer to allocated device memory + * \param size - Requested allocation size in bytes + * \param flags - Must be either ::cudaMemAttachGlobal or ::cudaMemAttachHost (defaults to ::cudaMemAttachGlobal) + * + * \return + * ::cudaSuccess, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, + * ::cudaMalloc3D, ::cudaMalloc3DArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, ::cudaDeviceGetAttribute, ::cudaStreamAttachMemAsync + */ +template +static __inline__ __host__ cudaError_t cudaMallocManaged( + T **devPtr, + size_t size, + unsigned int flags = cudaMemAttachGlobal +) +{ + return ::cudaMallocManaged((void**)(void*)devPtr, size, flags); +} + +/** + * \brief Advise about the usage of a given memory range. + * + * This is an alternate spelling for cudaMemAdvise made available through function overloading. + * + * \sa ::cudaMemAdvise, + * \ref ::cudaMemAdvise(const void* devPtr, size_t count, enum cudaMemoryAdvise advice, struct cudaMemLocation location) "cudaMemAdvise (C API)" + */ +template +cudaError_t cudaMemAdvise( + T *devPtr, + size_t count, + enum cudaMemoryAdvise advice, + struct cudaMemLocation location +) +{ + return ::cudaMemAdvise_v2((const void *)devPtr, count, advice, location); +} + +template +static __inline__ __host__ cudaError_t cudaMemPrefetchAsync( + T *devPtr, + size_t count, + struct cudaMemLocation location, + unsigned int flags, + cudaStream_t stream = 0 +) +{ + return ::cudaMemPrefetchAsync_v2((const void *)devPtr, count, location, flags, stream); +} + +/** + * \brief Attach memory to a stream asynchronously + * + * Enqueues an operation in \p stream to specify stream association of + * \p length bytes of memory starting from \p devPtr. This function is a + * stream-ordered operation, meaning that it is dependent on, and will + * only take effect when, previous work in stream has completed. Any + * previous association is automatically replaced. + * + * \p devPtr must point to an one of the following types of memories: + * - managed memory declared using the __managed__ keyword or allocated with + * ::cudaMallocManaged. + * - a valid host-accessible region of system-allocated pageable memory. This + * type of memory may only be specified if the device associated with the + * stream reports a non-zero value for the device attribute + * ::cudaDevAttrPageableMemoryAccess. + * + * For managed allocations, \p length must be either zero or the entire + * allocation's size. Both indicate that the entire allocation's stream + * association is being changed. Currently, it is not possible to change stream + * association for a portion of a managed allocation. + * + * For pageable allocations, \p length must be non-zero. + * + * The stream association is specified using \p flags which must be + * one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle. + * The default value for \p flags is ::cudaMemAttachSingle + * If the ::cudaMemAttachGlobal flag is specified, the memory can be accessed + * by any stream on any device. + * If the ::cudaMemAttachHost flag is specified, the program makes a guarantee + * that it won't access the memory on the device from any stream on a device that + * has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * If the ::cudaMemAttachSingle flag is specified and \p stream is associated with + * a device that has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess, + * the program makes a guarantee that it will only access the memory on the device + * from \p stream. It is illegal to attach singly to the NULL stream, because the + * NULL stream is a virtual global stream and not a specific stream. An error will + * be returned in this case. + * + * When memory is associated with a single stream, the Unified Memory system will + * allow CPU access to this memory region so long as all operations in \p stream + * have completed, regardless of whether other streams are active. In effect, + * this constrains exclusive ownership of the managed memory region by + * an active GPU to per-stream activity instead of whole-GPU activity. + * + * Accessing memory on the device from streams that are not associated with + * it will produce undefined results. No error checking is performed by the + * Unified Memory system to ensure that kernels launched into other streams + * do not access this region. + * + * It is a program's responsibility to order calls to ::cudaStreamAttachMemAsync + * via events, synchronization or other means to ensure legal access to memory + * at all times. Data visibility and coherency will be changed appropriately + * for all kernels which follow a stream-association change. + * + * If \p stream is destroyed while data is associated with it, the association is + * removed and the association reverts to the default visibility of the allocation + * as specified at ::cudaMallocManaged. For __managed__ variables, the default + * association is always ::cudaMemAttachGlobal. Note that destroying a stream is an + * asynchronous operation, and as a result, the change to default association won't + * happen until all work in the stream has completed. + * + * \param stream - Stream in which to enqueue the attach operation + * \param devPtr - Pointer to memory (must be a pointer to managed memory or + * to a valid host-accessible region of system-allocated + * memory) + * \param length - Length of memory (defaults to zero) + * \param flags - Must be one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle (defaults to ::cudaMemAttachSingle) + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy, ::cudaMallocManaged + */ +template +static __inline__ __host__ cudaError_t cudaStreamAttachMemAsync( + cudaStream_t stream, + T *devPtr, + size_t length = 0, + unsigned int flags = cudaMemAttachSingle +) +{ + return ::cudaStreamAttachMemAsync(stream, (void*)devPtr, length, flags); +} + +template +static __inline__ __host__ cudaError_t cudaMalloc( + T **devPtr, + size_t size +) +{ + return ::cudaMalloc((void**)(void*)devPtr, size); +} + +template +static __inline__ __host__ cudaError_t cudaMallocHost( + T **ptr, + size_t size, + unsigned int flags = 0 +) +{ + return cudaMallocHost((void**)(void*)ptr, size, flags); +} + +template +static __inline__ __host__ cudaError_t cudaMallocPitch( + T **devPtr, + size_t *pitch, + size_t width, + size_t height +) +{ + return ::cudaMallocPitch((void**)(void*)devPtr, pitch, width, height); +} + +/** + * \brief Allocate from a pool + * + * This is an alternate spelling for cudaMallocFromPoolAsync + * made available through function overloading. + * + * \sa ::cudaMallocFromPoolAsync, + * \ref ::cudaMallocAsync(void** ptr, size_t size, cudaStream_t hStream) "cudaMallocAsync (C API)" + */ +static __inline__ __host__ cudaError_t cudaMallocAsync( + void **ptr, + size_t size, + cudaMemPool_t memPool, + cudaStream_t stream +) +{ + return ::cudaMallocFromPoolAsync(ptr, size, memPool, stream); +} + +template +static __inline__ __host__ cudaError_t cudaMallocAsync( + T **ptr, + size_t size, + cudaMemPool_t memPool, + cudaStream_t stream +) +{ + return ::cudaMallocFromPoolAsync((void**)(void*)ptr, size, memPool, stream); +} + +template +static __inline__ __host__ cudaError_t cudaMallocAsync( + T **ptr, + size_t size, + cudaStream_t stream +) +{ + return ::cudaMallocAsync((void**)(void*)ptr, size, stream); +} + +template +static __inline__ __host__ cudaError_t cudaMallocFromPoolAsync( + T **ptr, + size_t size, + cudaMemPool_t memPool, + cudaStream_t stream +) +{ + return ::cudaMallocFromPoolAsync((void**)(void*)ptr, size, memPool, stream); +} + +/** + * \brief Performs a batch of memory copies asynchronously. + * + * This is an alternate spelling for cudaMemcpyBatchAsync + * made available through function overloading. + * + * \sa ::cudaMemcpyBatchAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyBatchAsync( + T **dsts, U **srcs, size_t *sizes, size_t count, struct cudaMemcpyAttributes *attrs, + size_t *attrsIdxs, size_t numAttrs, size_t *failIdx, cudaStream_t hStream +) +{ + return ::cudaMemcpyBatchAsync((void **)dsts, (void **)srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream); +} + +/** + * \brief Performs a batch of memory copies asynchronously. + * + * This is an alternate spelling for cudaMemcpyBatchAsync + * made available through function overloading. + * + * The ::cudaMemcpyAttributes specified by \p attr are applicable for all the copies specified in the batch. + * + * \sa ::cudaMemcpyBatchAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyBatchAsync( + T **dsts, U **srcs, size_t *sizes, size_t count, struct cudaMemcpyAttributes attr, size_t *failIdx, cudaStream_t hStream +) +{ + size_t attrsIdxs = 0; + return ::cudaMemcpyBatchAsync((void **)dsts, (void **)srcs, sizes, count, &attr, &attrsIdxs, 1, failIdx, hStream); +} + +#if defined(__CUDACC__) + +/** + * \brief \hl Copies data to the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p src + * to the memory area \p offset bytes from the start of symbol + * \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToDevice. + * + * \param symbol - Device symbol reference + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_sync + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyToSymbol( + const T &symbol, + const void *src, + size_t count, + size_t offset = 0, + enum cudaMemcpyKind kind = cudaMemcpyHostToDevice +) +{ + return ::cudaMemcpyToSymbol((const void*)&symbol, src, count, offset, kind); +} + +/** + * \brief \hl Copies data to the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p src + * to the memory area \p offset bytes from the start of symbol + * \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToDevice. + * + * ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If + * \p kind is ::cudaMemcpyHostToDevice and \p stream is non-zero, the copy + * may overlap with operations in other streams. + * + * \param symbol - Device symbol reference + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_async + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyFromSymbolAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyToSymbolAsync( + const T &symbol, + const void *src, + size_t count, + size_t offset = 0, + enum cudaMemcpyKind kind = cudaMemcpyHostToDevice, + cudaStream_t stream = 0 +) +{ + return ::cudaMemcpyToSymbolAsync((const void*)&symbol, src, count, offset, kind, stream); +} + +/** + * \brief \hl Copies data from the given symbol on the device + * + * Copies \p count bytes from the memory area \p offset bytes + * from the start of symbol \p symbol to the memory area pointed to by \p dst. + * The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost or ::cudaMemcpyDeviceToDevice. + * + * \param dst - Destination memory address + * \param symbol - Device symbol reference + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_sync + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyFromSymbol( + void *dst, + const T &symbol, + size_t count, + size_t offset = 0, + enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost +) +{ + return ::cudaMemcpyFromSymbol(dst, (const void*)&symbol, count, offset, kind); +} + +/** + * \brief \hl Copies data from the given symbol on the device + * + * Copies \p count bytes from the memory area \p offset bytes + * from the start of symbol \p symbol to the memory area pointed to by \p dst. + * The memory areas may not overlap. \p symbol is a variable that resides in + * global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost or ::cudaMemcpyDeviceToDevice. + * + * ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally be + * associated to a stream by passing a non-zero \p stream argument. If \p kind + * is ::cudaMemcpyDeviceToHost and \p stream is non-zero, the copy may overlap + * with operations in other streams. + * + * \param dst - Destination memory address + * \param symbol - Device symbol reference + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_async + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync + */ +template +static __inline__ __host__ cudaError_t cudaMemcpyFromSymbolAsync( + void *dst, + const T &symbol, + size_t count, + size_t offset = 0, + enum cudaMemcpyKind kind = cudaMemcpyDeviceToHost, + cudaStream_t stream = 0 +) +{ + return ::cudaMemcpyFromSymbolAsync(dst, (const void*)&symbol, count, offset, kind, stream); +} + +/** + * \brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph + * + * Creates a new memcpy node to copy to \p symbol and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p src to the memory area pointed to by \p offset bytes from the start + * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyToSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeFromSymbol, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +template +static __inline__ __host__ cudaError_t cudaGraphAddMemcpyNodeToSymbol( + cudaGraphNode_t *pGraphNode, + cudaGraph_t graph, + const cudaGraphNode_t *pDependencies, + size_t numDependencies, + const T &symbol, + const void* src, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphAddMemcpyNodeToSymbol(pGraphNode, graph, pDependencies, numDependencies, (const void*)&symbol, src, count, offset, kind); +} + +/** + * \brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph + * + * Creates a new memcpy node to copy from \p symbol and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area + * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable + * that resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyFromSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeToSymbol, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +template +static __inline__ __host__ cudaError_t cudaGraphAddMemcpyNodeFromSymbol( + cudaGraphNode_t* pGraphNode, + cudaGraph_t graph, + const cudaGraphNode_t* pDependencies, + size_t numDependencies, + void* dst, + const T &symbol, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphAddMemcpyNodeFromSymbol(pGraphNode, graph, pDependencies, numDependencies, dst, (const void*)&symbol, count, offset, kind); +} + +/** + * \brief Sets a memcpy node's parameters to copy to a symbol on the device + * + * Sets the parameters of memcpy node \p node to the copy described by the provided parameters. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p src to the memory area pointed to by \p offset bytes from the start + * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * \param node - Node to set the parameters for + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyToSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +template +static __inline__ __host__ cudaError_t cudaGraphMemcpyNodeSetParamsToSymbol( + cudaGraphNode_t node, + const T &symbol, + const void* src, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphMemcpyNodeSetParamsToSymbol(node, (const void*)&symbol, src, count, offset, kind); +} + +/** + * \brief Sets a memcpy node's parameters to copy from a symbol on the device + * + * Sets the parameters of memcpy node \p node to the copy described by the provided parameters. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area + * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable + * that resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * \param node - Node to set the parameters for + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyFromSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +template +static __inline__ __host__ cudaError_t cudaGraphMemcpyNodeSetParamsFromSymbol( + cudaGraphNode_t node, + void* dst, + const T &symbol, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphMemcpyNodeSetParamsFromSymbol(node, dst, (const void*)&symbol, count, offset, kind); +} + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the device + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained the given params at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * \p src and \p symbol must be allocated from the same contexts as the original source and + * destination memory. The instantiation-time memory operands must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * the original memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeToSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphInstantiate, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams + */ +template +static __inline__ __host__ cudaError_t cudaGraphExecMemcpyNodeSetParamsToSymbol( + cudaGraphExec_t hGraphExec, + cudaGraphNode_t node, + const T &symbol, + const void* src, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphExecMemcpyNodeSetParamsToSymbol(hGraphExec, node, (const void*)&symbol, src, count, offset, kind); +} + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the device + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained the given params at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * \p symbol and \p dst must be allocated from the same contexts as the original source and + * destination memory. The instantiation-time memory operands must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * the original memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeFromSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphInstantiate, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParamsToSymbol, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams + */ +template +static __inline__ __host__ cudaError_t cudaGraphExecMemcpyNodeSetParamsFromSymbol( + cudaGraphExec_t hGraphExec, + cudaGraphNode_t node, + void* dst, + const T &symbol, + size_t count, + size_t offset, + enum cudaMemcpyKind kind) +{ + return ::cudaGraphExecMemcpyNodeSetParamsFromSymbol(hGraphExec, node, dst, (const void*)&symbol, count, offset, kind); +} + +// convenience function to avoid source breakage in c++ code +static __inline__ __host__ cudaError_t CUDARTAPI cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphNode_t *hErrorNode_out, enum cudaGraphExecUpdateResult *updateResult_out) +{ + cudaGraphExecUpdateResultInfo resultInfo; + cudaError_t status = cudaGraphExecUpdate(hGraphExec, hGraph, &resultInfo); + if (hErrorNode_out) { + *hErrorNode_out = resultInfo.errorNode; + } + if (updateResult_out) { + *updateResult_out = resultInfo.result; + } + return status; +} + +#if __cplusplus >= 201103L || (defined(_MSC_VER) && (_MSC_VER >= 1900)) + +/** + * \brief Creates a user object by wrapping a C++ object + * + * TODO detail + * + * \param object_out - Location to return the user object handle + * \param objectToWrap - This becomes the \ptr argument to ::cudaUserObjectCreate. A + * lambda will be passed for the \p destroy argument, which calls + * delete on this object pointer. + * \param initialRefcount - The initial refcount to create the object with, typically 1. The + * initial references are owned by the calling thread. + * \param flags - Currently it is required to pass cudaUserObjectNoDestructorSync, + * which is the only defined flag. This indicates that the destroy + * callback cannot be waited on by any CUDA API. Users requiring + * synchronization of the callback should signal its completion + * manually. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectCreate + */ +template +static __inline__ __host__ cudaError_t cudaUserObjectCreate( + cudaUserObject_t *object_out, + T *objectToWrap, + unsigned int initialRefcount, + unsigned int flags) +{ + return ::cudaUserObjectCreate( + object_out, + objectToWrap, + [](void *vpObj) { delete reinterpret_cast(vpObj); }, + initialRefcount, + flags); +} + +template +static __inline__ __host__ cudaError_t cudaUserObjectCreate( + cudaUserObject_t *object_out, + T *objectToWrap, + unsigned int initialRefcount, + cudaUserObjectFlags flags) +{ + return cudaUserObjectCreate(object_out, objectToWrap, initialRefcount, (unsigned int)flags); +} + +#endif + +/** + * \brief \hl Finds the address associated with a CUDA symbol + * + * Returns in \p *devPtr the address of symbol \p symbol on the device. + * \p symbol can either be a variable that resides in global or constant memory space. + * If \p symbol cannot be found, or if \p symbol is not declared + * in the global or constant memory space, \p *devPtr is unchanged and the error + * ::cudaErrorInvalidSymbol is returned. + * + * \param devPtr - Return device pointer associated with symbol + * \param symbol - Device symbol reference + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaGetSymbolAddress(void**, const void*) "cudaGetSymbolAddress (C API)", + * \ref ::cudaGetSymbolSize(size_t*, const T&) "cudaGetSymbolSize (C++ API)" + */ +template +static __inline__ __host__ cudaError_t cudaGetSymbolAddress( + void **devPtr, + const T &symbol +) +{ + return ::cudaGetSymbolAddress(devPtr, (const void*)&symbol); +} + +/** + * \brief \hl Finds the size of the object associated with a CUDA symbol + * + * Returns in \p *size the size of symbol \p symbol. \p symbol must be a + * variable that resides in global or constant memory space. + * If \p symbol cannot be found, or if \p symbol is not declared + * in global or constant memory space, \p *size is unchanged and the error + * ::cudaErrorInvalidSymbol is returned. + * + * \param size - Size of object associated with symbol + * \param symbol - Device symbol reference + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaGetSymbolAddress(void**, const T&) "cudaGetSymbolAddress (C++ API)", + * \ref ::cudaGetSymbolSize(size_t*, const void*) "cudaGetSymbolSize (C API)" + */ +template +static __inline__ __host__ cudaError_t cudaGetSymbolSize( + size_t *size, + const T &symbol +) +{ + return ::cudaGetSymbolSize(size, (const void*)&symbol); +} + +/** + * \brief \hl Sets the preferred cache configuration for a device function + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this sets through \p cacheConfig the preferred cache configuration + * for the function specified via \p func. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute \p func. + * + * \p func must be a pointer to a function that executes on the device. + * The parameter specified by \p func must be declared as a \p __global__ + * function. If the specified function does not exist, + * then ::cudaErrorInvalidDeviceFunction is returned. + * + * This setting does nothing on devices where the size of the L1 cache and + * shared memory are fixed. + * + * Launching a kernel with a different preference than the most recent + * preference setting may insert a device-side synchronization point. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * + * \param func - device function pointer + * \param cacheConfig - Requested cache configuration + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_init_rt + * \note_callback + * + * \ref ::cudaLaunchKernel(T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)", + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) "cudaFuncGetAttributes (C++ API)", + * ::cudaSetDoubleForDevice, + * ::cudaSetDoubleForHost, + * ::cudaThreadGetCacheConfig, + * ::cudaThreadSetCacheConfig + */ +template +static __inline__ __host__ cudaError_t cudaFuncSetCacheConfig( + T *func, + enum cudaFuncCache cacheConfig +) +{ + return ::cudaFuncSetCacheConfig((const void*)func, cacheConfig); +} + +template +static __inline__ +__CUDA_DEPRECATED +__host__ cudaError_t cudaFuncSetSharedMemConfig( + T *func, + enum cudaSharedMemConfig config +) +{ +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#elif defined(_MSC_VER) +#pragma warning(suppress: 4996) +#endif + return ::cudaFuncSetSharedMemConfig((const void*)func, config); +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif +} + +#endif // __CUDACC__ + +/** + * \brief Returns occupancy for a device function + * + * Returns in \p *numBlocks the maximum number of active blocks per + * streaming multiprocessor for the device function. + * + * \param numBlocks - Returned occupancy + * \param func - Kernel function for which occupancy is calulated + * \param blockSize - Block size the kernel is intended to be launched with + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ +template +static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor( + int *numBlocks, + T func, + int blockSize, + size_t dynamicSMemSize) +{ + return ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, (const void*)func, blockSize, dynamicSMemSize, cudaOccupancyDefault); +} + +/** + * \brief Returns occupancy for a device function with the specified flags + * + * Returns in \p *numBlocks the maximum number of active blocks per + * streaming multiprocessor for the device function. + * + * The \p flags parameter controls how special cases are handled. Valid flags include: + * + * - ::cudaOccupancyDefault: keeps the default behavior as + * ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * + * - ::cudaOccupancyDisableCachingOverride: suppresses the default behavior + * on platform where global caching affects occupancy. On such platforms, if caching + * is enabled, but per-block SM resource usage would result in zero occupancy, the + * occupancy calculator will calculate the occupancy as if caching is disabled. + * Setting this flag makes the occupancy calculator to return 0 in such cases. + * More information can be found about this feature in the "Unified L1/Texture Cache" + * section of the Maxwell tuning guide. + * + * \param numBlocks - Returned occupancy + * \param func - Kernel function for which occupancy is calulated + * \param blockSize - Block size the kernel is intended to be launched with + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * \param flags - Requested behavior for the occupancy calculator + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ +template +static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + int *numBlocks, + T func, + int blockSize, + size_t dynamicSMemSize, + unsigned int flags) +{ + return ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, (const void*)func, blockSize, dynamicSMemSize, flags); +} + +/** + * Helper functor for cudaOccupancyMaxPotentialBlockSize + */ +class __cudaOccupancyB2DHelper { + size_t n; +public: + inline __host__ CUDART_DEVICE __cudaOccupancyB2DHelper(size_t n_) : n(n_) {} + inline __host__ CUDART_DEVICE size_t operator()(int) + { + return n; + } +}; + +/** + * \brief Returns grid and block size that achieves maximum potential occupancy for a device function + * + * Returns in \p *minGridSize and \p *blocksize a suggested grid / + * block size pair that achieves the best potential occupancy + * (i.e. the maximum number of active warps with the smallest number + * of blocks). + * + * The \p flags parameter controls how special cases are handled. Valid flags include: + * + * - ::cudaOccupancyDefault: keeps the default behavior as + * ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * + * - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior + * on platform where global caching affects occupancy. On such platforms, if caching + * is enabled, but per-block SM resource usage would result in zero occupancy, the + * occupancy calculator will calculate the occupancy as if caching is disabled. + * Setting this flag makes the occupancy calculator to return 0 in such cases. + * More information can be found about this feature in the "Unified L1/Texture Cache" + * section of the Maxwell tuning guide. + * + * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy + * \param blockSize - Returned block size + * \param func - Device function symbol + * \param blockSizeToDynamicSMemSize - A unary function / functor that takes block size, and returns the size, in bytes, of dynamic shared memory needed for a block + * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit. + * \param flags - Requested behavior for the occupancy calculator + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ + +template +static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags( + int *minGridSize, + int *blockSize, + T func, + UnaryFunction blockSizeToDynamicSMemSize, + int blockSizeLimit = 0, + unsigned int flags = 0) +{ + cudaError_t status; + + // Device and function properties + int device; + struct cudaFuncAttributes attr; + + // Limits + int maxThreadsPerMultiProcessor; + int warpSize; + int devMaxThreadsPerBlock; + int multiProcessorCount; + int funcMaxThreadsPerBlock; + int occupancyLimit; + int granularity; + + // Recorded maximum + int maxBlockSize = 0; + int numBlocks = 0; + int maxOccupancy = 0; + + // Temporary + int blockSizeToTryAligned; + int blockSizeToTry; + int blockSizeLimitAligned; + int occupancyInBlocks; + int occupancyInThreads; + size_t dynamicSMemSize; + + /////////////////////////// + // Check user input + /////////////////////////// + + if (!minGridSize || !blockSize || !func) { + return cudaErrorInvalidValue; + } + + ////////////////////////////////////////////// + // Obtain device and function properties + ////////////////////////////////////////////// + + status = ::cudaGetDevice(&device); + if (status != cudaSuccess) { + return status; + } + + status = cudaDeviceGetAttribute( + &maxThreadsPerMultiProcessor, + cudaDevAttrMaxThreadsPerMultiProcessor, + device); + if (status != cudaSuccess) { + return status; + } + + status = cudaDeviceGetAttribute( + &warpSize, + cudaDevAttrWarpSize, + device); + if (status != cudaSuccess) { + return status; + } + + status = cudaDeviceGetAttribute( + &devMaxThreadsPerBlock, + cudaDevAttrMaxThreadsPerBlock, + device); + if (status != cudaSuccess) { + return status; + } + + status = cudaDeviceGetAttribute( + &multiProcessorCount, + cudaDevAttrMultiProcessorCount, + device); + if (status != cudaSuccess) { + return status; + } + + status = cudaFuncGetAttributes(&attr, func); + if (status != cudaSuccess) { + return status; + } + + funcMaxThreadsPerBlock = attr.maxThreadsPerBlock; + + ///////////////////////////////////////////////////////////////////////////////// + // Try each block size, and pick the block size with maximum occupancy + ///////////////////////////////////////////////////////////////////////////////// + + occupancyLimit = maxThreadsPerMultiProcessor; + granularity = warpSize; + + if (blockSizeLimit == 0) { + blockSizeLimit = devMaxThreadsPerBlock; + } + + if (devMaxThreadsPerBlock < blockSizeLimit) { + blockSizeLimit = devMaxThreadsPerBlock; + } + + if (funcMaxThreadsPerBlock < blockSizeLimit) { + blockSizeLimit = funcMaxThreadsPerBlock; + } + + blockSizeLimitAligned = ((blockSizeLimit + (granularity - 1)) / granularity) * granularity; + + for (blockSizeToTryAligned = blockSizeLimitAligned; blockSizeToTryAligned > 0; blockSizeToTryAligned -= granularity) { + // This is needed for the first iteration, because + // blockSizeLimitAligned could be greater than blockSizeLimit + // + if (blockSizeLimit < blockSizeToTryAligned) { + blockSizeToTry = blockSizeLimit; + } else { + blockSizeToTry = blockSizeToTryAligned; + } + + dynamicSMemSize = blockSizeToDynamicSMemSize(blockSizeToTry); + + status = cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + &occupancyInBlocks, + func, + blockSizeToTry, + dynamicSMemSize, + flags); + + if (status != cudaSuccess) { + return status; + } + + occupancyInThreads = blockSizeToTry * occupancyInBlocks; + + if (occupancyInThreads > maxOccupancy) { + maxBlockSize = blockSizeToTry; + numBlocks = occupancyInBlocks; + maxOccupancy = occupancyInThreads; + } + + // Early out if we have reached the maximum + // + if (occupancyLimit == maxOccupancy) { + break; + } + } + + /////////////////////////// + // Return best available + /////////////////////////// + + // Suggested min grid size to achieve a full machine launch + // + *minGridSize = numBlocks * multiProcessorCount; + *blockSize = maxBlockSize; + + return status; +} + +/** + * \brief Returns grid and block size that achieves maximum potential occupancy for a device function + * + * Returns in \p *minGridSize and \p *blocksize a suggested grid / + * block size pair that achieves the best potential occupancy + * (i.e. the maximum number of active warps with the smallest number + * of blocks). + * + * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy + * \param blockSize - Returned block size + * \param func - Device function symbol + * \param blockSizeToDynamicSMemSize - A unary function / functor that takes block size, and returns the size, in bytes, of dynamic shared memory needed for a block + * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ + +template +static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeVariableSMem( + int *minGridSize, + int *blockSize, + T func, + UnaryFunction blockSizeToDynamicSMemSize, + int blockSizeLimit = 0) +{ + return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, blockSizeLimit, cudaOccupancyDefault); +} + +/** + * \brief Returns grid and block size that achieves maximum potential occupancy for a device function + * + * Returns in \p *minGridSize and \p *blocksize a suggested grid / + * block size pair that achieves the best potential occupancy + * (i.e. the maximum number of active warps with the smallest number + * of blocks). + * + * Use \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem if the + * amount of per-block dynamic shared memory changes with different + * block sizes. + * + * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy + * \param blockSize - Returned block size + * \param func - Device function symbol + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ +template +static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSize( + int *minGridSize, + int *blockSize, + T func, + size_t dynamicSMemSize = 0, + int blockSizeLimit = 0) +{ + return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, __cudaOccupancyB2DHelper(dynamicSMemSize), blockSizeLimit, cudaOccupancyDefault); +} + +/** + * \brief Returns dynamic shared memory available per block when launching \p numBlocks blocks on SM. + * + * Returns in \p *dynamicSmemSize the maximum size of dynamic shared memory to allow \p numBlocks blocks per SM. + * + * \param dynamicSmemSize - Returned maximum dynamic shared memory + * \param func - Kernel function for which occupancy is calculated + * \param numBlocks - Number of blocks to fit on SM + * \param blockSize - Size of the block + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxPotentialBlockSizeWithFlags + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + */ +template +static __inline__ __host__ cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock( + size_t *dynamicSmemSize, + T *func, + int numBlocks, + int blockSize) +{ + return ::cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, (const void*)func, numBlocks, blockSize); +} + +/** + * \brief Returns grid and block size that achived maximum potential occupancy for a device function with the specified flags + * + * Returns in \p *minGridSize and \p *blocksize a suggested grid / + * block size pair that achieves the best potential occupancy + * (i.e. the maximum number of active warps with the smallest number + * of blocks). + * + * The \p flags parameter controls how special cases are handle. Valid flags include: + * + * - ::cudaOccupancyDefault: keeps the default behavior as + * ::cudaOccupancyMaxPotentialBlockSize + * + * - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior + * on platform where global caching affects occupancy. On such platforms, if caching + * is enabled, but per-block SM resource usage would result in zero occupancy, the + * occupancy calculator will calculate the occupancy as if caching is disabled. + * Setting this flag makes the occupancy calculator to return 0 in such cases. + * More information can be found about this feature in the "Unified L1/Texture Cache" + * section of the Maxwell tuning guide. + * + * Use \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem if the + * amount of per-block dynamic shared memory changes with different + * block sizes. + * + * \param minGridSize - Returned minimum grid size needed to achieve the best potential occupancy + * \param blockSize - Returned block size + * \param func - Device function symbol + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * \param blockSizeLimit - The maximum block size \p func is designed to work with. 0 means no limit. + * \param flags - Requested behavior for the occupancy calculator + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaOccupancyMaxPotentialBlockSize + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMem + * \sa ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags + * \sa ::cudaOccupancyAvailableDynamicSMemPerBlock + */ +template +static __inline__ __host__ CUDART_DEVICE cudaError_t cudaOccupancyMaxPotentialBlockSizeWithFlags( + int *minGridSize, + int *blockSize, + T func, + size_t dynamicSMemSize = 0, + int blockSizeLimit = 0, + unsigned int flags = 0) +{ + return cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(minGridSize, blockSize, func, __cudaOccupancyB2DHelper(dynamicSMemSize), blockSizeLimit, flags); +} + +/** + * \brief Given the kernel function (\p func) and launch configuration + * (\p config), return the maximum cluster size in \p *clusterSize. + * + * The cluster dimensions in \p config are ignored. If func has a required + * cluster size set (see ::cudaFuncGetAttributes),\p *clusterSize will reflect + * the required cluster size. + * + * By default this function will always return a value that's portable on + * future hardware. A higher value may be returned if the kernel function + * allows non-portable cluster sizes. + * + * This function will respect the compile time launch bounds. + * + * \param clusterSize - Returned maximum cluster size that can be launched + * for the given kernel function and launch configuration + * \param func - Kernel function for which maximum cluster + * size is calculated + * \param config - Launch configuration for the given kernel function + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaFuncGetAttributes + */ +template +static __inline__ __host__ cudaError_t cudaOccupancyMaxPotentialClusterSize( + int *clusterSize, + T *func, + const cudaLaunchConfig_t *config) +{ + return ::cudaOccupancyMaxPotentialClusterSize(clusterSize, (const void*)func, config); +} + +/** + * \brief Given the kernel function (\p func) and launch configuration + * (\p config), return the maximum number of clusters that could co-exist + * on the target device in \p *numClusters. + * + * If the function has required cluster size already set (see + * ::cudaFuncGetAttributes), the cluster size from config must either be + * unspecified or match the required size. + * Without required sizes, the cluster size must be specified in config, + * else the function will return an error. + * + * Note that various attributes of the kernel function may affect occupancy + * calculation. Runtime environment may affect how the hardware schedules + * the clusters, so the calculated occupancy is not guaranteed to be achievable. + * + * \param numClusters - Returned maximum number of clusters that + * could co-exist on the target device + * \param func - Kernel function for which maximum number + * of clusters are calculated + * \param config - Launch configuration for the given kernel function + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidClusterSize, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaFuncGetAttributes + */ +template +static __inline__ __host__ cudaError_t cudaOccupancyMaxActiveClusters( + int *numClusters, + T *func, + const cudaLaunchConfig_t *config) +{ + return ::cudaOccupancyMaxActiveClusters(numClusters, (const void*)func, config); +} + +#if defined __CUDACC__ + +/** + * \brief \hl Find out attributes for a given function + * + * This function obtains the attributes of a function specified via \p entry. + * The parameter \p entry must be a pointer to a function that executes + * on the device. The parameter specified by \p entry must be declared as a \p __global__ + * function. The fetched attributes are placed in \p attr. If the specified + * function does not exist, then ::cudaErrorInvalidDeviceFunction is returned. + * + * Note that some function attributes such as + * \ref ::cudaFuncAttributes::maxThreadsPerBlock "maxThreadsPerBlock" + * may vary based on the device that is currently being used. + * + * \param attr - Return pointer to function's attributes + * \param entry - Function to get attributes of + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaLaunchKernel(T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)", + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + * ::cudaSetDoubleForDevice, + * ::cudaSetDoubleForHost + */ +template +static __inline__ __host__ cudaError_t cudaFuncGetAttributes( + struct cudaFuncAttributes *attr, + T *entry +) +{ + return ::cudaFuncGetAttributes(attr, (const void*)entry); +} + +/** + * \brief \hl Set attributes for a given function + * + * This function sets the attributes of a function specified via \p entry. + * The parameter \p entry must be a pointer to a function that executes + * on the device. The parameter specified by \p entry must be declared as a \p __global__ + * function. The enumeration defined by \p attr is set to the value defined by \p value. + * If the specified function does not exist, then ::cudaErrorInvalidDeviceFunction is returned. + * If the specified attribute cannot be written, or if the value is incorrect, + * then ::cudaErrorInvalidValue is returned. + * + * Valid values for \p attr are: + * - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes + * cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture. + * - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources, + * this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor. + * This is only a hint, and the driver can choose a different ratio if required to execute the function. + * - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the + * function can be launched with non-portable cluster size. 1 is allowed, 0 is + * disallowed. + * - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block + * scheduling policy of a function. The value type is cudaClusterSchedulingPolicy. + * + * \param entry - Function to get attributes of + * \param attr - Attribute to set + * \param value - Value to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaLaunchKernel(T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)", + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + * ::cudaSetDoubleForDevice, + * ::cudaSetDoubleForHost + */ +template +static __inline__ __host__ cudaError_t cudaFuncSetAttribute( + T *func, + enum cudaFuncAttribute attr, + int value +) +{ + return ::cudaFuncSetAttribute((const void*)func, attr, value); +} + +/** + * \brief Returns the function name for a device entry function pointer. + * + * Returns in \p **name the function name associated with the symbol \p func . + * The function name is returned as a null-terminated string. This API may + * return a mangled name if the function is not declared as having C linkage. + * If \p **name is NULL, ::cudaErrorInvalidValue is returned. If \p func is + * not a device entry function, ::cudaErrorInvalidDeviceFunction is returned. + * + * \param name - The returned name of the function + * \param func - The function pointer to retrieve name for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaFuncGetName(const char **name, const void *func) "cudaFuncGetName (C API)" + */ +template +static __inline__ __host__ cudaError_t CUDARTAPI cudaFuncGetName( + const char **name, + T *func +) +{ + return ::cudaFuncGetName(name, (const void *)func); +} + +/** + * \brief Get pointer to device kernel that matches entry function \p entryFuncAddr + * + * Returns in \p kernelPtr the device kernel corresponding to the entry function \p entryFuncAddr. + * + * \param kernelPtr - Returns the device kernel + * \param entryFuncAddr - Address of device entry function to search kernel for + * + * \return + * ::cudaSuccess + * + * \sa + * \ref ::cudaGetKernel(cudaKernel_t *kernelPtr, const void *entryFuncAddr) "cudaGetKernel (C API)" + */ +template +static __inline__ __host__ cudaError_t cudaGetKernel( + cudaKernel_t *kernelPtr, + T *func +) +{ + return ::cudaGetKernel(kernelPtr, (const void *)func); +} + +/** + * \brief Returns a global device pointer + * + * Returns in \p *dptr and \p *bytes the base pointer and size of the global with + * name \p name for the requested library \p library and the current device. + * If no global for the requested name \p name exists, the call returns ::cudaErrorSymbolNotFound. + * One of the parameters \p dptr or \p bytes (not both) can be NULL in which + * case it is ignored. + * + * \param dptr - Returned global device pointer for the requested library + * \param bytes - Returned global size in bytes + * \param library - Library to retrieve global from + * \param name - Name of global to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * ::cudaErrorDeviceUninitialized, + * ::cudaErrorContextIsDestroyed + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cudaLibraryGetManaged + */ +template +static __inline__ __host__ cudaError_t cudaLibraryGetGlobal(T **dptr, size_t *bytes, cudaLibrary_t library, const char *name) +{ + return ::cudaLibraryGetGlobal((void**)(void*)dptr, bytes, library, name); +} + +/** + * \brief Returns a pointer to managed memory + * + * Returns in \p *dptr and \p *bytes the base pointer and size of the managed memory with + * name \p name for the requested library \p library. If no managed memory with the + * requested name \p name exists, the call returns ::cudaErrorSymbolNotFound. One of the parameters + * \p dptr or \p bytes (not both) can be NULL in which case it is ignored. + * Note that managed memory for library \p library is shared across devices and is registered + * when the library is loaded. + * + * \param dptr - Returned pointer to the managed memory + * \param bytes - Returned memory size in bytes + * \param library - Library to retrieve managed memory from + * \param name - Name of managed memory to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cudaLibraryGetGlobal + */ +template +static __inline__ __host__ cudaError_t cudaLibraryGetManaged(T **dptr, size_t *bytes, cudaLibrary_t library, const char *name) +{ + return ::cudaLibraryGetManaged((void**)(void*)dptr, bytes, library, name); +} + +/** + * \brief Returns a pointer to a unified function + * + * Returns in \p *fptr the function pointer to a unified function denoted by \p symbol. + * If no unified function with name \p symbol exists, the call returns ::cudaErrorSymbolNotFound. + * If there is no device with attribute ::cudaDeviceProp::unifiedFunctionPointers present in the system, + * the call may return ::cudaErrorSymbolNotFound. + * + * \param fptr - Returned pointer to a unified function + * \param library - Library to retrieve function pointer memory from + * \param symbol - Name of function pointer to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload + */ +template +static __inline__ __host__ cudaError_t cudaLibraryGetUnifiedFunction(T **fptr, cudaLibrary_t library, const char *symbol) +{ + return ::cudaLibraryGetUnifiedFunction((void**)(void*)fptr, library, symbol); +} + +/** @} */ /* END CUDART_LIBRARY */ +#endif /* __CUDACC__ */ + +/** @} */ /* END CUDART_HIGHLEVEL */ + +#endif /* __cplusplus && !__CUDACC_RTC__ */ + +#if !defined(__CUDACC_RTC__) +#if defined(__GNUC__) +#if defined(__clang__) || (!defined(__PGIC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) +#pragma GCC diagnostic pop +#endif +#elif defined(_MSC_VER) +#pragma warning(pop) +#endif +#endif + +#undef EXCLUDE_FROM_RTC +#undef __CUDA_DEPRECATED + +#if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__) +#undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_H__ +#endif + +#endif /* !__CUDA_RUNTIME_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime_api.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime_api.h new file mode 100644 index 0000000000000000000000000000000000000000..3328e2cb3f78f2f13eb2018f49c8f7ac0d4a06a2 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cuda_runtime_api.h @@ -0,0 +1,14933 @@ +/* + * Copyright 1993-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(__CUDA_RUNTIME_API_H__) +#define __CUDA_RUNTIME_API_H__ + +#if !defined(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__) +#define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_API_H__ +#endif + +/** + * \latexonly + * \page sync_async API synchronization behavior + * + * \section memcpy_sync_async_behavior Memcpy + * The API provides memcpy/memset functions in both synchronous and asynchronous forms, + * the latter having an \e "Async" suffix. This is a misnomer as each function + * may exhibit synchronous or asynchronous behavior depending on the arguments + * passed to the function. In the reference documentation, each memcpy function is + * categorized as \e synchronous or \e asynchronous, corresponding to the definitions + * below. + * + * \subsection MemcpySynchronousBehavior Synchronous + * + *
    + *
  1. For transfers from pageable host memory to device memory, a stream sync is performed + * before the copy is initiated. The function will return once the pageable + * buffer has been copied to the staging memory for DMA transfer to device memory, + * but the DMA to final destination may not have completed. + * + *
  2. For transfers from pinned host memory to device memory, the function is synchronous + * with respect to the host. + * + *
  3. For transfers from device to either pageable or pinned host memory, the function returns + * only once the copy has completed. + * + *
  4. For transfers from device memory to device memory, no host-side synchronization is + * performed. + * + *
  5. For transfers from any host memory to any host memory, the function is fully + * synchronous with respect to the host. + *
+ * + * \subsection MemcpyAsynchronousBehavior Asynchronous + * + *
    + *
  1. For transfers between device memory and pageable host memory, the function might + * be synchronous with respect to host. + * + *
  2. For transfers from any host memory to any host memory, the function is fully + * synchronous with respect to the host. + * + *
  3. If pageable memory must first be staged to pinned memory, the driver may + * synchronize with the stream and stage the copy into pinned memory. + * + *
  4. For all other transfers, the function should be fully asynchronous. + *
+ * + * \section memset_sync_async_behavior Memset + * The cudaMemset functions are asynchronous with respect to the host + * except when the target memory is pinned host memory. The \e Async + * versions are always asynchronous with respect to the host. + * + * \section kernel_launch_details Kernel Launches + * Kernel launches are asynchronous with respect to the host. Details of + * concurrent kernel execution and data transfers can be found in the CUDA + * Programmers Guide. + * + * \endlatexonly + */ + +/** + * There are two levels for the runtime API. + * + * The C API (cuda_runtime_api.h) is + * a C-style interface that does not require compiling with \p nvcc. + * + * The \ref CUDART_HIGHLEVEL "C++ API" (cuda_runtime.h) is a + * C++-style interface built on top of the C API. It wraps some of the + * C API routines, using overloading, references and default arguments. + * These wrappers can be used from C++ code and can be compiled with any C++ + * compiler. The C++ API also has some CUDA-specific wrappers that wrap + * C API routines that deal with symbols, textures, and device functions. + * These wrappers require the use of \p nvcc because they depend on code being + * generated by the compiler. For example, the execution configuration syntax + * to invoke kernels is only available in source code compiled with \p nvcc. + */ + +/** CUDA Runtime API Version */ +#define CUDART_VERSION 12080 + +#if defined(__CUDA_API_VER_MAJOR__) && defined(__CUDA_API_VER_MINOR__) +# define __CUDART_API_VERSION ((__CUDA_API_VER_MAJOR__ * 1000) + (__CUDA_API_VER_MINOR__ * 10)) +#else +# define __CUDART_API_VERSION CUDART_VERSION +#endif + +#ifndef __DOXYGEN_ONLY__ +#include "crt/host_defines.h" +#endif +#include "builtin_types.h" + +#if !defined(__CUDACC_RTC_MINIMAL__) && ((defined(__CUDACC_RDC__) || defined(__CUDACC_EWP__) || !defined(__CUDACC_RTC__))) +#include "cuda_device_runtime_api.h" +#endif /* !defined(__CUDACC_RTC_MINIMAL__) && (defined(__CUDACC_RDC__) || defined(__CUDACC_EWP__) || !defined(__CUDACC_RTC__)) */ + + +#ifndef __CUDACC_RTC_MINIMAL__ +#if defined(CUDA_API_PER_THREAD_DEFAULT_STREAM) || defined(__CUDA_API_VERSION_INTERNAL) + #define __CUDART_API_PER_THREAD_DEFAULT_STREAM + #define __CUDART_API_PTDS(api) api ## _ptds + #define __CUDART_API_PTSZ(api) api ## _ptsz +#else + #define __CUDART_API_PTDS(api) api + #define __CUDART_API_PTSZ(api) api +#endif + +#define cudaSignalExternalSemaphoresAsync __CUDART_API_PTSZ(cudaSignalExternalSemaphoresAsync_v2) +#define cudaWaitExternalSemaphoresAsync __CUDART_API_PTSZ(cudaWaitExternalSemaphoresAsync_v2) + + #define cudaStreamGetCaptureInfo __CUDART_API_PTSZ(cudaStreamGetCaptureInfo_v2) + +#define cudaGetDeviceProperties cudaGetDeviceProperties_v2 + +#if defined(__CUDART_API_PER_THREAD_DEFAULT_STREAM) + #define cudaMemcpy __CUDART_API_PTDS(cudaMemcpy) + #define cudaMemcpyToSymbol __CUDART_API_PTDS(cudaMemcpyToSymbol) + #define cudaMemcpyFromSymbol __CUDART_API_PTDS(cudaMemcpyFromSymbol) + #define cudaMemcpy2D __CUDART_API_PTDS(cudaMemcpy2D) + #define cudaMemcpyToArray __CUDART_API_PTDS(cudaMemcpyToArray) + #define cudaMemcpy2DToArray __CUDART_API_PTDS(cudaMemcpy2DToArray) + #define cudaMemcpyFromArray __CUDART_API_PTDS(cudaMemcpyFromArray) + #define cudaMemcpy2DFromArray __CUDART_API_PTDS(cudaMemcpy2DFromArray) + #define cudaMemcpyArrayToArray __CUDART_API_PTDS(cudaMemcpyArrayToArray) + #define cudaMemcpy2DArrayToArray __CUDART_API_PTDS(cudaMemcpy2DArrayToArray) + #define cudaMemcpy3D __CUDART_API_PTDS(cudaMemcpy3D) + #define cudaMemcpy3DPeer __CUDART_API_PTDS(cudaMemcpy3DPeer) + #define cudaMemset __CUDART_API_PTDS(cudaMemset) + #define cudaMemset2D __CUDART_API_PTDS(cudaMemset2D) + #define cudaMemset3D __CUDART_API_PTDS(cudaMemset3D) + #define cudaGraphInstantiateWithParams __CUDART_API_PTSZ(cudaGraphInstantiateWithParams) + #define cudaGraphUpload __CUDART_API_PTSZ(cudaGraphUpload) + #define cudaGraphLaunch __CUDART_API_PTSZ(cudaGraphLaunch) + #define cudaStreamBeginCapture __CUDART_API_PTSZ(cudaStreamBeginCapture) + #define cudaStreamBeginCaptureToGraph __CUDART_API_PTSZ(cudaStreamBeginCaptureToGraph) + #define cudaStreamEndCapture __CUDART_API_PTSZ(cudaStreamEndCapture) + #define cudaStreamGetCaptureInfo_v3 __CUDART_API_PTSZ(cudaStreamGetCaptureInfo_v3) + #define cudaStreamUpdateCaptureDependencies __CUDART_API_PTSZ(cudaStreamUpdateCaptureDependencies) + #define cudaStreamUpdateCaptureDependencies_v2 __CUDART_API_PTSZ(cudaStreamUpdateCaptureDependencies_v2) + #define cudaStreamIsCapturing __CUDART_API_PTSZ(cudaStreamIsCapturing) + #define cudaMemcpyAsync __CUDART_API_PTSZ(cudaMemcpyAsync) + #define cudaMemcpyToSymbolAsync __CUDART_API_PTSZ(cudaMemcpyToSymbolAsync) + #define cudaMemcpyFromSymbolAsync __CUDART_API_PTSZ(cudaMemcpyFromSymbolAsync) + #define cudaMemcpy2DAsync __CUDART_API_PTSZ(cudaMemcpy2DAsync) + #define cudaMemcpyToArrayAsync __CUDART_API_PTSZ(cudaMemcpyToArrayAsync) + #define cudaMemcpy2DToArrayAsync __CUDART_API_PTSZ(cudaMemcpy2DToArrayAsync) + #define cudaMemcpyFromArrayAsync __CUDART_API_PTSZ(cudaMemcpyFromArrayAsync) + #define cudaMemcpy2DFromArrayAsync __CUDART_API_PTSZ(cudaMemcpy2DFromArrayAsync) + #define cudaMemcpy3DAsync __CUDART_API_PTSZ(cudaMemcpy3DAsync) + #define cudaMemcpy3DPeerAsync __CUDART_API_PTSZ(cudaMemcpy3DPeerAsync) + #define cudaMemcpyBatchAsync __CUDART_API_PTSZ(cudaMemcpyBatchAsync) + #define cudaMemcpy3DBatchAsync __CUDART_API_PTSZ(cudaMemcpy3DBatchAsync) + #define cudaMemsetAsync __CUDART_API_PTSZ(cudaMemsetAsync) + #define cudaMemset2DAsync __CUDART_API_PTSZ(cudaMemset2DAsync) + #define cudaMemset3DAsync __CUDART_API_PTSZ(cudaMemset3DAsync) + #define cudaStreamQuery __CUDART_API_PTSZ(cudaStreamQuery) + #define cudaStreamGetDevice __CUDART_API_PTSZ(cudaStreamGetDevice) + #define cudaStreamGetFlags __CUDART_API_PTSZ(cudaStreamGetFlags) + #define cudaStreamGetId __CUDART_API_PTSZ(cudaStreamGetId) + #define cudaStreamGetPriority __CUDART_API_PTSZ(cudaStreamGetPriority) + #define cudaEventRecord __CUDART_API_PTSZ(cudaEventRecord) + #define cudaEventRecordWithFlags __CUDART_API_PTSZ(cudaEventRecordWithFlags) + #define cudaStreamWaitEvent __CUDART_API_PTSZ(cudaStreamWaitEvent) + #define cudaStreamAddCallback __CUDART_API_PTSZ(cudaStreamAddCallback) + #define cudaStreamAttachMemAsync __CUDART_API_PTSZ(cudaStreamAttachMemAsync) + #define cudaStreamSynchronize __CUDART_API_PTSZ(cudaStreamSynchronize) + #define cudaLaunchKernel __CUDART_API_PTSZ(cudaLaunchKernel) + #define cudaLaunchKernelExC __CUDART_API_PTSZ(cudaLaunchKernelExC) + #define cudaLaunchHostFunc __CUDART_API_PTSZ(cudaLaunchHostFunc) + #define cudaMemPrefetchAsync __CUDART_API_PTSZ(cudaMemPrefetchAsync) + #define cudaMemPrefetchAsync_v2 __CUDART_API_PTSZ(cudaMemPrefetchAsync_v2) + #define cudaLaunchCooperativeKernel __CUDART_API_PTSZ(cudaLaunchCooperativeKernel) + #define cudaStreamCopyAttributes __CUDART_API_PTSZ(cudaStreamCopyAttributes) + #define cudaStreamGetAttribute __CUDART_API_PTSZ(cudaStreamGetAttribute) + #define cudaStreamSetAttribute __CUDART_API_PTSZ(cudaStreamSetAttribute) + #define cudaMallocAsync __CUDART_API_PTSZ(cudaMallocAsync) + #define cudaFreeAsync __CUDART_API_PTSZ(cudaFreeAsync) + #define cudaMallocFromPoolAsync __CUDART_API_PTSZ(cudaMallocFromPoolAsync) + #define cudaGetDriverEntryPoint __CUDART_API_PTSZ(cudaGetDriverEntryPoint) + #define cudaGetDriverEntryPointByVersion __CUDART_API_PTSZ(cudaGetDriverEntryPointByVersion) +#endif + +#endif /* __CUDACC_RTC_MINIMAL__ */ + +/** \cond impl_private */ +#if !defined(__dv) + +#if defined(__cplusplus) + +#define __dv(v) \ + = v + +#else /* __cplusplus */ + +#define __dv(v) + +#endif /* __cplusplus */ + +#endif /* !__dv */ +/** \endcond impl_private */ + +#if (defined(_NVHPC_CUDA) || !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 350)) /** Visible to SM>=3.5 and "__host__ __device__" only **/ + +#define CUDART_DEVICE __device__ + +#else + +#define CUDART_DEVICE + +#endif /** CUDART_DEVICE */ + +#if !defined(__CUDACC_RTC__) +#define EXCLUDE_FROM_RTC + +/** \cond impl_private */ +#if defined(__DOXYGEN_ONLY__) || defined(CUDA_ENABLE_DEPRECATED) +#define __CUDA_DEPRECATED +#elif defined(_MSC_VER) +#define __CUDA_DEPRECATED __declspec(deprecated) +#elif defined(__GNUC__) +#define __CUDA_DEPRECATED __attribute__((deprecated)) +#else +#define __CUDA_DEPRECATED +#endif +/** \endcond impl_private */ + +#if defined(__cplusplus) +extern "C" { +#endif /* __cplusplus */ + +/** + * \defgroup CUDART_DEVICE Device Management + * + * ___MANBRIEF___ device management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the device management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Destroy all allocations and reset all state on the current device + * in the current process. + * + * Explicitly destroys and cleans up all resources associated with the current + * device in the current process. It is the caller's responsibility to ensure + * that the resources are not accessed or passed in subsequent API calls and + * doing so will result in undefined behavior. These resources include CUDA types + * ::cudaStream_t, ::cudaEvent_t, ::cudaArray_t, ::cudaMipmappedArray_t, ::cudaPitchedPtr, + * ::cudaTextureObject_t, ::cudaSurfaceObject_t, ::textureReference, ::surfaceReference, + * ::cudaExternalMemory_t, ::cudaExternalSemaphore_t and ::cudaGraphicsResource_t. + * These resources also include memory allocations by ::cudaMalloc, ::cudaMallocHost, + * ::cudaMallocManaged and ::cudaMallocPitch. + * Any subsequent API call to this device will reinitialize the device. + * + * Note that this function will reset the device immediately. It is the caller's + * responsibility to ensure that the device is not being accessed by any + * other host threads from the process when this function is called. + * + * \note ::cudaDeviceReset() will not destroy memory allocations by ::cudaMallocAsync() and + * ::cudaMallocFromPoolAsync(). These memory allocations need to be destroyed explicitly. + * \note If a non-primary ::CUcontext is current to the thread, ::cudaDeviceReset() + * will destroy only the internal CUDA RT state for that ::CUcontext. + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSynchronize + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceReset(void); + +/** + * \brief Wait for compute device to finish + * + * Blocks until the device has completed all preceding requested tasks. + * ::cudaDeviceSynchronize() returns an error if one of the preceding tasks + * has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for + * this device, the host thread will block until the device has finished + * its work. + * + * \return + * ::cudaSuccess + * \note_device_sync_deprecated + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceReset, + * ::cuCtxSynchronize + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceSynchronize(void); + +/** + * \brief Set resource limits + * + * Setting \p limit to \p value is a request by the application to update + * the current limit maintained by the device. The driver is free to + * modify the requested value to meet h/w requirements (this could be + * clamping to minimum or maximum values, rounding up to nearest element + * size, etc). The application can use ::cudaDeviceGetLimit() to find out + * exactly what the limit has been set to. + * + * Setting each ::cudaLimit has its own specific restrictions, so each is + * discussed here. + * + * - ::cudaLimitStackSize controls the stack size in bytes of each GPU thread. + * + * - ::cudaLimitPrintfFifoSize controls the size in bytes of the shared FIFO + * used by the ::printf() device system call. Setting + * ::cudaLimitPrintfFifoSize must not be performed after launching any kernel + * that uses the ::printf() device system call - in such case + * ::cudaErrorInvalidValue will be returned. + * + * - ::cudaLimitMallocHeapSize controls the size in bytes of the heap used by + * the ::malloc() and ::free() device system calls. Setting + * ::cudaLimitMallocHeapSize must not be performed after launching any kernel + * that uses the ::malloc() or ::free() device system calls - in such case + * ::cudaErrorInvalidValue will be returned. + * + * - ::cudaLimitDevRuntimeSyncDepth controls the maximum nesting depth of a + * grid at which a thread can safely call ::cudaDeviceSynchronize(). Setting + * this limit must be performed before any launch of a kernel that uses the + * device runtime and calls ::cudaDeviceSynchronize() above the default sync + * depth, two levels of grids. Calls to ::cudaDeviceSynchronize() will fail + * with error code ::cudaErrorSyncDepthExceeded if the limitation is + * violated. This limit can be set smaller than the default or up the maximum + * launch depth of 24. When setting this limit, keep in mind that additional + * levels of sync depth require the runtime to reserve large amounts of + * device memory which can no longer be used for user allocations. If these + * reservations of device memory fail, ::cudaDeviceSetLimit will return + * ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value. + * This limit is only applicable to devices of compute capability < 9.0. + * Attempting to set this limit on devices of other compute capability will + * results in error ::cudaErrorUnsupportedLimit being returned. + * + * - ::cudaLimitDevRuntimePendingLaunchCount controls the maximum number of + * outstanding device runtime launches that can be made from the current + * device. A grid is outstanding from the point of launch up until the grid + * is known to have been completed. Device runtime launches which violate + * this limitation fail and return ::cudaErrorLaunchPendingCountExceeded when + * ::cudaGetLastError() is called after launch. If more pending launches than + * the default (2048 launches) are needed for a module using the device + * runtime, this limit can be increased. Keep in mind that being able to + * sustain additional pending launches will require the runtime to reserve + * larger amounts of device memory upfront which can no longer be used for + * allocations. If these reservations fail, ::cudaDeviceSetLimit will return + * ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value. + * This limit is only applicable to devices of compute capability 3.5 and + * higher. Attempting to set this limit on devices of compute capability less + * than 3.5 will result in the error ::cudaErrorUnsupportedLimit being + * returned. + * + * - ::cudaLimitMaxL2FetchGranularity controls the L2 cache fetch granularity. + * Values can range from 0B to 128B. This is purely a performance hint and + * it can be ignored or clamped depending on the platform. + * + * - ::cudaLimitPersistingL2CacheSize controls size in bytes available + * for persisting L2 cache. This is purely a performance hint and it + * can be ignored or clamped depending on the platform. + * + * \param limit - Limit to set + * \param value - Size of limit + * + * \return + * ::cudaSuccess, + * ::cudaErrorUnsupportedLimit, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceGetLimit, + * ::cuCtxSetLimit + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceSetLimit(enum cudaLimit limit, size_t value); + +/** + * \brief Return resource limits + * + * Returns in \p *pValue the current size of \p limit. The following ::cudaLimit values are supported. + * - ::cudaLimitStackSize is the stack size in bytes of each GPU thread. + * - ::cudaLimitPrintfFifoSize is the size in bytes of the shared FIFO used by the + * ::printf() device system call. + * - ::cudaLimitMallocHeapSize is the size in bytes of the heap used by the + * ::malloc() and ::free() device system calls. + * - ::cudaLimitDevRuntimeSyncDepth is the maximum grid depth at which a + * thread can isssue the device runtime call ::cudaDeviceSynchronize() + * to wait on child grid launches to complete. This functionality is removed + * for devices of compute capability >= 9.0, and hence will return error + * ::cudaErrorUnsupportedLimit on such devices. + * - ::cudaLimitDevRuntimePendingLaunchCount is the maximum number of outstanding + * device runtime launches. + * - ::cudaLimitMaxL2FetchGranularity is the L2 cache fetch granularity. + * - ::cudaLimitPersistingL2CacheSize is the persisting L2 cache size in bytes. + * + * \param limit - Limit to query + * \param pValue - Returned size of the limit + * + * \return + * ::cudaSuccess, + * ::cudaErrorUnsupportedLimit, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceSetLimit, + * ::cuCtxGetLimit + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetLimit(size_t *pValue, enum cudaLimit limit); + +/** + * \brief Returns the maximum number of elements allocatable in a 1D linear texture for a given element size. + * + * Returns in \p maxWidthInElements the maximum number of elements allocatable in a 1D linear texture + * for given format descriptor \p fmtDesc. + * + * \param maxWidthInElements - Returns maximum number of texture elements allocatable for given \p fmtDesc. + * \param fmtDesc - Texture format description. + * + * \return + * ::cudaSuccess, + * ::cudaErrorUnsupportedLimit, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cuDeviceGetTexture1DLinearMaxWidth + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetTexture1DLinearMaxWidth(size_t *maxWidthInElements, const struct cudaChannelFormatDesc *fmtDesc, int device); +#endif + +/** + * \brief Returns the preferred cache configuration for the current device. + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this returns through \p pCacheConfig the preferred cache + * configuration for the current device. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute functions. + * + * This will return a \p pCacheConfig of ::cudaFuncCachePreferNone on devices + * where the size of the L1 cache and shared memory are fixed. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory + * + * \param pCacheConfig - Returned cache configuration + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetCacheConfig, + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * ::cuCtxGetCacheConfig + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetCacheConfig(enum cudaFuncCache *pCacheConfig); + +/** + * \brief Returns numerical values that correspond to the least and + * greatest stream priorities. + * + * Returns in \p *leastPriority and \p *greatestPriority the numerical values that correspond + * to the least and greatest stream priorities respectively. Stream priorities + * follow a convention where lower numbers imply greater priorities. The range of + * meaningful stream priorities is given by [\p *greatestPriority, \p *leastPriority]. + * If the user attempts to create a stream with a priority value that is + * outside the the meaningful range as specified by this API, the priority is + * automatically clamped down or up to either \p *leastPriority or \p *greatestPriority + * respectively. See ::cudaStreamCreateWithPriority for details on creating a + * priority stream. + * A NULL may be passed in for \p *leastPriority or \p *greatestPriority if the value + * is not desired. + * + * This function will return '0' in both \p *leastPriority and \p *greatestPriority if + * the current context's device does not support stream priorities + * (see ::cudaDeviceGetAttribute). + * + * \param leastPriority - Pointer to an int in which the numerical value for least + * stream priority is returned + * \param greatestPriority - Pointer to an int in which the numerical value for greatest + * stream priority is returned + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreateWithPriority, + * ::cudaStreamGetPriority, + * ::cuCtxGetStreamPriorityRange + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetStreamPriorityRange(int *leastPriority, int *greatestPriority); + +/** + * \brief Sets the preferred cache configuration for the current device. + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this sets through \p cacheConfig the preferred cache + * configuration for the current device. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute the function. Any + * function preference set via + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)" + * or + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)" + * will be preferred over this device-wide setting. Setting the device-wide + * cache configuration to ::cudaFuncCachePreferNone will cause subsequent + * kernel launches to prefer to not change the cache configuration unless + * required to launch the kernel. + * + * This setting does nothing on devices where the size of the L1 cache and + * shared memory are fixed. + * + * Launching a kernel with a different preference than the most recent + * preference setting may insert a device-side synchronization point. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory + * + * \param cacheConfig - Requested cache configuration + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceGetCacheConfig, + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * ::cuCtxSetCacheConfig + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceSetCacheConfig(enum cudaFuncCache cacheConfig); + +/** + * \brief Returns a handle to a compute device + * + * Returns in \p *device a device ordinal given a PCI bus ID string. + * + * \param device - Returned device ordinal + * + * \param pciBusId - String in one of the following forms: + * [domain]:[bus]:[device].[function] + * [domain]:[bus]:[device] + * [bus]:[device].[function] + * where \p domain, \p bus, \p device, and \p function are all hexadecimal values + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceGetPCIBusId, + * ::cuDeviceGetByPCIBusId + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetByPCIBusId(int *device, const char *pciBusId); + +/** + * \brief Returns a PCI Bus Id string for the device + * + * Returns an ASCII string identifying the device \p dev in the NULL-terminated + * string pointed to by \p pciBusId. \p len specifies the maximum length of the + * string that may be returned. + * + * \param pciBusId - Returned identifier string for the device in the following format + * [domain]:[bus]:[device].[function] + * where \p domain, \p bus, \p device, and \p function are all hexadecimal values. + * pciBusId should be large enough to store 13 characters including the NULL-terminator. + * + * \param len - Maximum length of string to store in \p name + * + * \param device - Device to get identifier string for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceGetByPCIBusId, + * ::cuDeviceGetPCIBusId + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetPCIBusId(char *pciBusId, int len, int device); + +/** + * \brief Gets an interprocess handle for a previously allocated event + * + * Takes as input a previously allocated event. This event must have been + * created with the ::cudaEventInterprocess and ::cudaEventDisableTiming + * flags set. This opaque handle may be copied into other processes and + * opened with ::cudaIpcOpenEventHandle to allow efficient hardware + * synchronization between GPU work in different processes. + * + * After the event has been been opened in the importing process, + * ::cudaEventRecord, ::cudaEventSynchronize, ::cudaStreamWaitEvent and + * ::cudaEventQuery may be used in either process. Performing operations + * on the imported event after the exported event has been freed + * with ::cudaEventDestroy will result in undefined behavior. + * + * IPC functionality is restricted to devices with support for unified + * addressing on Linux and Windows operating systems. + * IPC functionality on Windows is supported for compatibility purposes + * but not recommended as it comes with performance cost. + * Users can test their device for IPC functionality by calling + * ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport + * + * \param handle - Pointer to a user allocated cudaIpcEventHandle + * in which to return the opaque event handle + * \param event - Event allocated with ::cudaEventInterprocess and + * ::cudaEventDisableTiming flags. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorMapBufferObjectFailed, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaEventCreate, + * ::cudaEventDestroy, + * ::cudaEventSynchronize, + * ::cudaEventQuery, + * ::cudaStreamWaitEvent, + * ::cudaIpcOpenEventHandle, + * ::cudaIpcGetMemHandle, + * ::cudaIpcOpenMemHandle, + * ::cudaIpcCloseMemHandle, + * ::cuIpcGetEventHandle + */ +extern __host__ cudaError_t CUDARTAPI cudaIpcGetEventHandle(cudaIpcEventHandle_t *handle, cudaEvent_t event); + +/** + * \brief Opens an interprocess event handle for use in the current process + * + * Opens an interprocess event handle exported from another process with + * ::cudaIpcGetEventHandle. This function returns a ::cudaEvent_t that behaves like + * a locally created event with the ::cudaEventDisableTiming flag specified. + * This event must be freed with ::cudaEventDestroy. + * + * Performing operations on the imported event after the exported event has + * been freed with ::cudaEventDestroy will result in undefined behavior. + * + * IPC functionality is restricted to devices with support for unified + * addressing on Linux and Windows operating systems. + * IPC functionality on Windows is supported for compatibility purposes + * but not recommended as it comes with performance cost. + * Users can test their device for IPC functionality by calling + * ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport + * + * \param event - Returns the imported event + * \param handle - Interprocess handle to open + * + * \returns + * ::cudaSuccess, + * ::cudaErrorMapBufferObjectFailed, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue, + * ::cudaErrorDeviceUninitialized + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaEventCreate, + * ::cudaEventDestroy, + * ::cudaEventSynchronize, + * ::cudaEventQuery, + * ::cudaStreamWaitEvent, + * ::cudaIpcGetEventHandle, + * ::cudaIpcGetMemHandle, + * ::cudaIpcOpenMemHandle, + * ::cudaIpcCloseMemHandle, + * ::cuIpcOpenEventHandle + */ +extern __host__ cudaError_t CUDARTAPI cudaIpcOpenEventHandle(cudaEvent_t *event, cudaIpcEventHandle_t handle); + +/** + * \brief Gets an interprocess memory handle for an existing device memory + * allocation + * + * Takes a pointer to the base of an existing device memory allocation created + * with ::cudaMalloc and exports it for use in another process. This is a + * lightweight operation and may be called multiple times on an allocation + * without adverse effects. + * + * If a region of memory is freed with ::cudaFree and a subsequent call + * to ::cudaMalloc returns memory with the same device address, + * ::cudaIpcGetMemHandle will return a unique handle for the + * new memory. + * + * IPC functionality is restricted to devices with support for unified + * addressing on Linux and Windows operating systems. + * IPC functionality on Windows is supported for compatibility purposes + * but not recommended as it comes with performance cost. + * Users can test their device for IPC functionality by calling + * ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport + * + * \param handle - Pointer to user allocated ::cudaIpcMemHandle to return + * the handle in. + * \param devPtr - Base pointer to previously allocated device memory + * + * \returns + * ::cudaSuccess, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorMapBufferObjectFailed, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMalloc, + * ::cudaFree, + * ::cudaIpcGetEventHandle, + * ::cudaIpcOpenEventHandle, + * ::cudaIpcOpenMemHandle, + * ::cudaIpcCloseMemHandle, + * ::cuIpcGetMemHandle + */ +extern __host__ cudaError_t CUDARTAPI cudaIpcGetMemHandle(cudaIpcMemHandle_t *handle, void *devPtr); + +/** + * \brief Opens an interprocess memory handle exported from another process + * and returns a device pointer usable in the local process. + * + * Maps memory exported from another process with ::cudaIpcGetMemHandle into + * the current device address space. For contexts on different devices + * ::cudaIpcOpenMemHandle can attempt to enable peer access between the + * devices as if the user called ::cudaDeviceEnablePeerAccess. This behavior is + * controlled by the ::cudaIpcMemLazyEnablePeerAccess flag. + * ::cudaDeviceCanAccessPeer can determine if a mapping is possible. + * + * ::cudaIpcOpenMemHandle can open handles to devices that may not be visible + * in the process calling the API. + * + * Contexts that may open ::cudaIpcMemHandles are restricted in the following way. + * ::cudaIpcMemHandles from each device in a given process may only be opened + * by one context per device per other process. + * + * If the memory handle has already been opened by the current context, the + * reference count on the handle is incremented by 1 and the existing device pointer + * is returned. + * + * Memory returned from ::cudaIpcOpenMemHandle must be freed with + * ::cudaIpcCloseMemHandle. + * + * Calling ::cudaFree on an exported memory region before calling + * ::cudaIpcCloseMemHandle in the importing context will result in undefined + * behavior. + * + * IPC functionality is restricted to devices with support for unified + * addressing on Linux and Windows operating systems. + * IPC functionality on Windows is supported for compatibility purposes + * but not recommended as it comes with performance cost. + * Users can test their device for IPC functionality by calling + * ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport + * + * \param devPtr - Returned device pointer + * \param handle - ::cudaIpcMemHandle to open + * \param flags - Flags for this operation. Must be specified as ::cudaIpcMemLazyEnablePeerAccess + * + * \returns + * ::cudaSuccess, + * ::cudaErrorMapBufferObjectFailed, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorDeviceUninitialized, + * ::cudaErrorTooManyPeers, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \note No guarantees are made about the address returned in \p *devPtr. + * In particular, multiple processes may not receive the same address for the same \p handle. + * + * \sa + * ::cudaMalloc, + * ::cudaFree, + * ::cudaIpcGetEventHandle, + * ::cudaIpcOpenEventHandle, + * ::cudaIpcGetMemHandle, + * ::cudaIpcCloseMemHandle, + * ::cudaDeviceEnablePeerAccess, + * ::cudaDeviceCanAccessPeer, + * ::cuIpcOpenMemHandle + */ +extern __host__ cudaError_t CUDARTAPI cudaIpcOpenMemHandle(void **devPtr, cudaIpcMemHandle_t handle, unsigned int flags); + +/** + * \brief Attempts to close memory mapped with cudaIpcOpenMemHandle + * + * Decrements the reference count of the memory returnd by ::cudaIpcOpenMemHandle by 1. + * When the reference count reaches 0, this API unmaps the memory. The original allocation + * in the exporting process as well as imported mappings in other processes + * will be unaffected. + * + * Any resources used to enable peer access will be freed if this is the + * last mapping using them. + * + * IPC functionality is restricted to devices with support for unified + * addressing on Linux and Windows operating systems. + * IPC functionality on Windows is supported for compatibility purposes + * but not recommended as it comes with performance cost. + * Users can test their device for IPC functionality by calling + * ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport + * + * \param devPtr - Device pointer returned by ::cudaIpcOpenMemHandle + * + * \returns + * ::cudaSuccess, + * ::cudaErrorMapBufferObjectFailed, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMalloc, + * ::cudaFree, + * ::cudaIpcGetEventHandle, + * ::cudaIpcOpenEventHandle, + * ::cudaIpcGetMemHandle, + * ::cudaIpcOpenMemHandle, + * ::cuIpcCloseMemHandle + */ +extern __host__ cudaError_t CUDARTAPI cudaIpcCloseMemHandle(void *devPtr); + +/** + * \brief Blocks until remote writes are visible to the specified scope + * + * Blocks until remote writes to the target context via mappings created + * through GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see + * https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are + * visible to the specified scope. + * + * If the scope equals or lies within the scope indicated by + * ::cudaDevAttrGPUDirectRDMAWritesOrdering, the call will be a no-op and + * can be safely omitted for performance. This can be determined by + * comparing the numerical values between the two enums, with smaller + * scopes having smaller values. + * + * Users may query support for this API via ::cudaDevAttrGPUDirectRDMAFlushWritesOptions. + * + * \param target - The target of the operation, see cudaFlushGPUDirectRDMAWritesTarget + * \param scope - The scope of the operation, see cudaFlushGPUDirectRDMAWritesScope + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotSupported, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cuFlushGPUDirectRDMAWrites + */ +#if __CUDART_API_VERSION >= 11030 +extern __host__ cudaError_t CUDARTAPI cudaDeviceFlushGPUDirectRDMAWrites(enum cudaFlushGPUDirectRDMAWritesTarget target, enum cudaFlushGPUDirectRDMAWritesScope scope); +#endif + +/** +* \brief Registers a callback function to receive async notifications +* +* Registers \p callbackFunc to receive async notifications. +* +* The \p userData parameter is passed to the callback function at async notification time. +* Likewise, \p callback is also passed to the callback function to distinguish between +* multiple registered callbacks. +* +* The callback function being registered should be designed to return quickly (~10ms). +* Any long running tasks should be queued for execution on an application thread. +* +* Callbacks may not call cudaDeviceRegisterAsyncNotification or cudaDeviceUnregisterAsyncNotification. +* Doing so will result in ::cudaErrorNotPermitted. Async notification callbacks execute +* in an undefined order and may be serialized. +* +* Returns in \p *callback a handle representing the registered callback instance. +* +* \param device - The device on which to register the callback +* \param callbackFunc - The function to register as a callback +* \param userData - A generic pointer to user data. This is passed into the callback function. +* \param callback - A handle representing the registered callback instance +* +* \return +* ::cudaSuccess +* ::cudaErrorNotSupported +* ::cudaErrorInvalidDevice +* ::cudaErrorInvalidValue +* ::cudaErrorNotPermitted +* ::cudaErrorUnknown +* \notefnerr +* +* \sa +* ::cudaDeviceUnregisterAsyncNotification +*/ +extern __host__ cudaError_t CUDARTAPI cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback); + +/** +* \brief Unregisters an async notification callback +* +* Unregisters \p callback so that the corresponding callback function will stop receiving +* async notifications. +* +* \param device - The device from which to remove \p callback. +* \param callback - The callback instance to unregister from receiving async notifications. +* +* \return +* ::cudaSuccess +* ::cudaErrorNotSupported +* ::cudaErrorInvalidDevice +* ::cudaErrorInvalidValue +* ::cudaErrorNotPermitted +* ::cudaErrorUnknown +* \notefnerr +* +* \sa +* ::cudaDeviceRegisterAsyncNotification +*/ +extern __host__ cudaError_t CUDARTAPI cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback); + +/** @} */ /* END CUDART_DEVICE */ + +/** + * \defgroup CUDART_DEVICE_DEPRECATED Device Management [DEPRECATED] + * + * ___MANBRIEF___ deprecated device management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the deprecated device management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Returns the shared memory configuration for the current device. + * + * \deprecated + * + * This function will return in \p pConfig the current size of shared memory banks + * on the current device. On devices with configurable shared memory banks, + * ::cudaDeviceSetSharedMemConfig can be used to change this setting, so that all + * subsequent kernel launches will by default use the new bank size. When + * ::cudaDeviceGetSharedMemConfig is called on devices without configurable shared + * memory, it will return the fixed bank size of the hardware. + * + * The returned bank configurations can be either: + * - ::cudaSharedMemBankSizeFourByte - shared memory bank width is four bytes. + * - ::cudaSharedMemBankSizeEightByte - shared memory bank width is eight bytes. + * + * \param pConfig - Returned cache configuration + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetCacheConfig, + * ::cudaDeviceGetCacheConfig, + * ::cudaDeviceSetSharedMemConfig, + * ::cudaFuncSetCacheConfig, + * ::cuCtxGetSharedMemConfig + */ +extern __CUDA_DEPRECATED __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *pConfig); + +/** + * \brief Sets the shared memory configuration for the current device. + * + * \deprecated + * + * On devices with configurable shared memory banks, this function will set + * the shared memory bank size which is used for all subsequent kernel launches. + * Any per-function setting of shared memory set via ::cudaFuncSetSharedMemConfig + * will override the device wide setting. + * + * Changing the shared memory configuration between launches may introduce + * a device side synchronization point. + * + * Changing the shared memory bank size will not increase shared memory usage + * or affect occupancy of kernels, but may have major effects on performance. + * Larger bank sizes will allow for greater potential bandwidth to shared memory, + * but will change what kinds of accesses to shared memory will result in bank + * conflicts. + * + * This function will do nothing on devices with fixed shared memory bank size. + * + * The supported bank configurations are: + * - ::cudaSharedMemBankSizeDefault: set bank width the device default (currently, + * four bytes) + * - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be four bytes + * natively. + * - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight + * bytes natively. + * + * \param config - Requested cache configuration + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetCacheConfig, + * ::cudaDeviceGetCacheConfig, + * ::cudaDeviceGetSharedMemConfig, + * ::cudaFuncSetCacheConfig, + * ::cuCtxSetSharedMemConfig + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaDeviceSetSharedMemConfig(enum cudaSharedMemConfig config); +/** @} */ /* END CUDART_DEVICE_DEPRECATED */ + +/** + * \defgroup CUDART_THREAD_DEPRECATED Thread Management [DEPRECATED] + * + * ___MANBRIEF___ deprecated thread management functions of the CUDA runtime + * API (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes deprecated thread management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Exit and clean up from CUDA launches + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is identical to the + * non-deprecated function ::cudaDeviceReset(), which should be used + * instead. + * + * Explicitly destroys all cleans up all resources associated with the current + * device in the current process. Any subsequent API call to this device will + * reinitialize the device. + * + * Note that this function will reset the device immediately. It is the caller's + * responsibility to ensure that the device is not being accessed by any + * other host threads from the process when this function is called. + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceReset + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadExit(void); + +/** + * \brief Wait for compute device to finish + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is similar to the + * non-deprecated function ::cudaDeviceSynchronize(), which should be used + * instead. + * + * Blocks until the device has completed all preceding requested tasks. + * ::cudaThreadSynchronize() returns an error if one of the preceding tasks + * has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for + * this device, the host thread will block until the device has finished + * its work. + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSynchronize + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadSynchronize(void); + +/** + * \brief Set resource limits + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is identical to the + * non-deprecated function ::cudaDeviceSetLimit(), which should be used + * instead. + * + * Setting \p limit to \p value is a request by the application to update + * the current limit maintained by the device. The driver is free to + * modify the requested value to meet h/w requirements (this could be + * clamping to minimum or maximum values, rounding up to nearest element + * size, etc). The application can use ::cudaThreadGetLimit() to find out + * exactly what the limit has been set to. + * + * Setting each ::cudaLimit has its own specific restrictions, so each is + * discussed here. + * + * - ::cudaLimitStackSize controls the stack size of each GPU thread. + * + * - ::cudaLimitPrintfFifoSize controls the size of the shared FIFO + * used by the ::printf() device system call. + * Setting ::cudaLimitPrintfFifoSize must be performed before + * launching any kernel that uses the ::printf() device + * system call, otherwise ::cudaErrorInvalidValue will be returned. + * + * - ::cudaLimitMallocHeapSize controls the size of the heap used + * by the ::malloc() and ::free() device system calls. Setting + * ::cudaLimitMallocHeapSize must be performed before launching + * any kernel that uses the ::malloc() or ::free() device system calls, + * otherwise ::cudaErrorInvalidValue will be returned. + * + * \param limit - Limit to set + * \param value - Size in bytes of limit + * + * \return + * ::cudaSuccess, + * ::cudaErrorUnsupportedLimit, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetLimit + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadSetLimit(enum cudaLimit limit, size_t value); + +/** + * \brief Returns resource limits + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is identical to the + * non-deprecated function ::cudaDeviceGetLimit(), which should be used + * instead. + * + * Returns in \p *pValue the current size of \p limit. The supported + * ::cudaLimit values are: + * - ::cudaLimitStackSize: stack size of each GPU thread; + * - ::cudaLimitPrintfFifoSize: size of the shared FIFO used by the + * ::printf() device system call. + * - ::cudaLimitMallocHeapSize: size of the heap used by the + * ::malloc() and ::free() device system calls; + * + * \param limit - Limit to query + * \param pValue - Returned size in bytes of limit + * + * \return + * ::cudaSuccess, + * ::cudaErrorUnsupportedLimit, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceGetLimit + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadGetLimit(size_t *pValue, enum cudaLimit limit); + +/** + * \brief Returns the preferred cache configuration for the current device. + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is identical to the + * non-deprecated function ::cudaDeviceGetCacheConfig(), which should be + * used instead. + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this returns through \p pCacheConfig the preferred cache + * configuration for the current device. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute functions. + * + * This will return a \p pCacheConfig of ::cudaFuncCachePreferNone on devices + * where the size of the L1 cache and shared memory are fixed. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * + * \param pCacheConfig - Returned cache configuration + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceGetCacheConfig + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadGetCacheConfig(enum cudaFuncCache *pCacheConfig); + +/** + * \brief Sets the preferred cache configuration for the current device. + * + * \deprecated + * + * Note that this function is deprecated because its name does not + * reflect its behavior. Its functionality is identical to the + * non-deprecated function ::cudaDeviceSetCacheConfig(), which should be + * used instead. + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this sets through \p cacheConfig the preferred cache + * configuration for the current device. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute the function. Any + * function preference set via + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)" + * or + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)" + * will be preferred over this device-wide setting. Setting the device-wide + * cache configuration to ::cudaFuncCachePreferNone will cause subsequent + * kernel launches to prefer to not change the cache configuration unless + * required to launch the kernel. + * + * This setting does nothing on devices where the size of the L1 cache and + * shared memory are fixed. + * + * Launching a kernel with a different preference than the most recent + * preference setting may insert a device-side synchronization point. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * + * \param cacheConfig - Requested cache configuration + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetCacheConfig + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaThreadSetCacheConfig(enum cudaFuncCache cacheConfig); + +/** @} */ /* END CUDART_THREAD_DEPRECATED */ + +/** + * \defgroup CUDART_ERROR Error Handling + * + * ___MANBRIEF___ error handling functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the error handling functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Returns the last error from a runtime call + * + * Returns the last error that has been produced by any of the runtime calls + * in the same instance of the CUDA Runtime library in the host thread and + * resets it to ::cudaSuccess. + * + * Note: Multiple instances of the CUDA Runtime library can be present in an + * application when using a library that statically links the CUDA Runtime. + * + * \return + * ::cudaSuccess, + * ::cudaErrorMissingConfiguration, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorInitializationError, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorUnmapBufferObjectFailed, + * ::cudaErrorInvalidDevicePointer, + * ::cudaErrorInvalidTexture, + * ::cudaErrorInvalidTextureBinding, + * ::cudaErrorInvalidChannelDescriptor, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorInvalidFilterSetting, + * ::cudaErrorInvalidNormSetting, + * ::cudaErrorUnknown, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorInsufficientDriver, + * ::cudaErrorNoDevice, + * ::cudaErrorSetOnActiveProcess, + * ::cudaErrorStartupFailure, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaPeekAtLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetLastError(void); + +/** + * \brief Returns the last error from a runtime call + * + * Returns the last error that has been produced by any of the runtime calls + * in the same instance of the CUDA Runtime library in the host thread. This + * call does not reset the error to ::cudaSuccess like ::cudaGetLastError(). + * + * Note: Multiple instances of the CUDA Runtime library can be present in an + * application when using a library that statically links the CUDA Runtime. + * + * \return + * ::cudaSuccess, + * ::cudaErrorMissingConfiguration, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorInitializationError, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorUnmapBufferObjectFailed, + * ::cudaErrorInvalidDevicePointer, + * ::cudaErrorInvalidTexture, + * ::cudaErrorInvalidTextureBinding, + * ::cudaErrorInvalidChannelDescriptor, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorInvalidFilterSetting, + * ::cudaErrorInvalidNormSetting, + * ::cudaErrorUnknown, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorInsufficientDriver, + * ::cudaErrorNoDevice, + * ::cudaErrorSetOnActiveProcess, + * ::cudaErrorStartupFailure, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaPeekAtLastError(void); + +/** + * \brief Returns the string representation of an error code enum name + * + * Returns a string containing the name of an error code in the enum. If the error + * code is not recognized, "unrecognized error code" is returned. + * + * \param error - Error code to convert to string + * + * \return + * \p char* pointer to a NULL-terminated string + * + * \sa ::cudaGetErrorString, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError, + * ::cuGetErrorName + */ +extern __host__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorName(cudaError_t error); + +/** + * \brief Returns the description string for an error code + * + * Returns the description string for an error code. If the error + * code is not recognized, "unrecognized error code" is returned. + * + * \param error - Error code to convert to string + * + * \return + * \p char* pointer to a NULL-terminated string + * + * \sa ::cudaGetErrorName, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError, + * ::cuGetErrorString + */ +extern __host__ __cudart_builtin__ const char* CUDARTAPI cudaGetErrorString(cudaError_t error); +/** @} */ /* END CUDART_ERROR */ + +/** + * \addtogroup CUDART_DEVICE + * + * @{ + */ + +/** + * \brief Returns the number of compute-capable devices + * + * Returns in \p *count the number of devices with compute capability greater + * or equal to 2.0 that are available for execution. + * + * \param count - Returns the number of devices with compute capability + * greater or equal to 2.0 + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDevice, ::cudaSetDevice, ::cudaGetDeviceProperties, + * ::cudaChooseDevice, + * ::cudaInitDevice, + * ::cuDeviceGetCount + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceCount(int *count); + +/** + * \brief Returns information about the compute-device + * + * Returns in \p *prop the properties of device \p dev. The ::cudaDeviceProp + * structure is defined as: + * \code + struct cudaDeviceProp { + char name[256]; + cudaUUID_t uuid; + size_t totalGlobalMem; + size_t sharedMemPerBlock; + int regsPerBlock; + int warpSize; + size_t memPitch; + int maxThreadsPerBlock; + int maxThreadsDim[3]; + int maxGridSize[3]; + int clockRate; + size_t totalConstMem; + int major; + int minor; + size_t textureAlignment; + size_t texturePitchAlignment; + int deviceOverlap; + int multiProcessorCount; + int kernelExecTimeoutEnabled; + int integrated; + int canMapHostMemory; + int computeMode; + int maxTexture1D; + int maxTexture1DMipmap; + int maxTexture1DLinear; + int maxTexture2D[2]; + int maxTexture2DMipmap[2]; + int maxTexture2DLinear[3]; + int maxTexture2DGather[2]; + int maxTexture3D[3]; + int maxTexture3DAlt[3]; + int maxTextureCubemap; + int maxTexture1DLayered[2]; + int maxTexture2DLayered[3]; + int maxTextureCubemapLayered[2]; + int maxSurface1D; + int maxSurface2D[2]; + int maxSurface3D[3]; + int maxSurface1DLayered[2]; + int maxSurface2DLayered[3]; + int maxSurfaceCubemap; + int maxSurfaceCubemapLayered[2]; + size_t surfaceAlignment; + int concurrentKernels; + int ECCEnabled; + int pciBusID; + int pciDeviceID; + int pciDomainID; + int tccDriver; + int asyncEngineCount; + int unifiedAddressing; + int memoryClockRate; + int memoryBusWidth; + int l2CacheSize; + int persistingL2CacheMaxSize; + int maxThreadsPerMultiProcessor; + int streamPrioritiesSupported; + int globalL1CacheSupported; + int localL1CacheSupported; + size_t sharedMemPerMultiprocessor; + int regsPerMultiprocessor; + int managedMemory; + int isMultiGpuBoard; + int multiGpuBoardGroupID; + int singleToDoublePrecisionPerfRatio; + int pageableMemoryAccess; + int concurrentManagedAccess; + int computePreemptionSupported; + int canUseHostPointerForRegisteredMem; + int cooperativeLaunch; + int cooperativeMultiDeviceLaunch; + int pageableMemoryAccessUsesHostPageTables; + int directManagedMemAccessFromHost; + int accessPolicyMaxWindowSize; + } + \endcode + * where: + * - \ref ::cudaDeviceProp::name "name[256]" is an ASCII string identifying + * the device. + * - \ref ::cudaDeviceProp::uuid "uuid" is a 16-byte unique identifier. + * - \ref ::cudaDeviceProp::totalGlobalMem "totalGlobalMem" is the total + * amount of global memory available on the device in bytes. + * - \ref ::cudaDeviceProp::sharedMemPerBlock "sharedMemPerBlock" is the + * maximum amount of shared memory available to a thread block in bytes. + * - \ref ::cudaDeviceProp::regsPerBlock "regsPerBlock" is the maximum number + * of 32-bit registers available to a thread block. + * - \ref ::cudaDeviceProp::warpSize "warpSize" is the warp size in threads. + * - \ref ::cudaDeviceProp::memPitch "memPitch" is the maximum pitch in + * bytes allowed by the memory copy functions that involve memory regions + * allocated through ::cudaMallocPitch(). + * - \ref ::cudaDeviceProp::maxThreadsPerBlock "maxThreadsPerBlock" is the + * maximum number of threads per block. + * - \ref ::cudaDeviceProp::maxThreadsDim "maxThreadsDim[3]" contains the + * maximum size of each dimension of a block. + * - \ref ::cudaDeviceProp::maxGridSize "maxGridSize[3]" contains the + * maximum size of each dimension of a grid. + * - \ref ::cudaDeviceProp::clockRate "clockRate" is the clock frequency in + * kilohertz. + * - \ref ::cudaDeviceProp::totalConstMem "totalConstMem" is the total amount + * of constant memory available on the device in bytes. + * - \ref ::cudaDeviceProp::major "major", + * \ref ::cudaDeviceProp::minor "minor" are the major and minor revision + * numbers defining the device's compute capability. + * - \ref ::cudaDeviceProp::textureAlignment "textureAlignment" is the + * alignment requirement; texture base addresses that are aligned to + * \ref ::cudaDeviceProp::textureAlignment "textureAlignment" bytes do not + * need an offset applied to texture fetches. + * - \ref ::cudaDeviceProp::texturePitchAlignment "texturePitchAlignment" is the + * pitch alignment requirement for 2D texture references that are bound to + * pitched memory. + * - \ref ::cudaDeviceProp::deviceOverlap "deviceOverlap" is 1 if the device + * can concurrently copy memory between host and device while executing a + * kernel, or 0 if not. Deprecated, use instead asyncEngineCount. + * - \ref ::cudaDeviceProp::multiProcessorCount "multiProcessorCount" is the + * number of multiprocessors on the device. + * - \ref ::cudaDeviceProp::kernelExecTimeoutEnabled "kernelExecTimeoutEnabled" + * is 1 if there is a run time limit for kernels executed on the device, or + * 0 if not. + * - \ref ::cudaDeviceProp::integrated "integrated" is 1 if the device is an + * integrated (motherboard) GPU and 0 if it is a discrete (card) component. + * - \ref ::cudaDeviceProp::canMapHostMemory "canMapHostMemory" is 1 if the + * device can map host memory into the CUDA address space for use with + * ::cudaHostAlloc()/::cudaHostGetDevicePointer(), or 0 if not. + * - \ref ::cudaDeviceProp::computeMode "computeMode" is the compute mode + * that the device is currently in. Available modes are as follows: + * - cudaComputeModeDefault: Default mode - Device is not restricted and + * multiple threads can use ::cudaSetDevice() with this device. + * - cudaComputeModeProhibited: Compute-prohibited mode - No threads can use + * ::cudaSetDevice() with this device. + * - cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many + * threads in one process will be able to use ::cudaSetDevice() with this device. + *
When an occupied exclusive mode device is chosen with ::cudaSetDevice, + * all subsequent non-device management runtime functions will return + * ::cudaErrorDevicesUnavailable. + * - \ref ::cudaDeviceProp::maxTexture1D "maxTexture1D" is the maximum 1D + * texture size. + * - \ref ::cudaDeviceProp::maxTexture1DMipmap "maxTexture1DMipmap" is the maximum + * 1D mipmapped texture texture size. + * - \ref ::cudaDeviceProp::maxTexture1DLinear "maxTexture1DLinear" is the maximum + * 1D texture size for textures bound to linear memory. + * - \ref ::cudaDeviceProp::maxTexture2D "maxTexture2D[2]" contains the maximum + * 2D texture dimensions. + * - \ref ::cudaDeviceProp::maxTexture2DMipmap "maxTexture2DMipmap[2]" contains the + * maximum 2D mipmapped texture dimensions. + * - \ref ::cudaDeviceProp::maxTexture2DLinear "maxTexture2DLinear[3]" contains the + * maximum 2D texture dimensions for 2D textures bound to pitch linear memory. + * - \ref ::cudaDeviceProp::maxTexture2DGather "maxTexture2DGather[2]" contains the + * maximum 2D texture dimensions if texture gather operations have to be performed. + * - \ref ::cudaDeviceProp::maxTexture3D "maxTexture3D[3]" contains the maximum + * 3D texture dimensions. + * - \ref ::cudaDeviceProp::maxTexture3DAlt "maxTexture3DAlt[3]" + * contains the maximum alternate 3D texture dimensions. + * - \ref ::cudaDeviceProp::maxTextureCubemap "maxTextureCubemap" is the + * maximum cubemap texture width or height. + * - \ref ::cudaDeviceProp::maxTexture1DLayered "maxTexture1DLayered[2]" contains + * the maximum 1D layered texture dimensions. + * - \ref ::cudaDeviceProp::maxTexture2DLayered "maxTexture2DLayered[3]" contains + * the maximum 2D layered texture dimensions. + * - \ref ::cudaDeviceProp::maxTextureCubemapLayered "maxTextureCubemapLayered[2]" + * contains the maximum cubemap layered texture dimensions. + * - \ref ::cudaDeviceProp::maxSurface1D "maxSurface1D" is the maximum 1D + * surface size. + * - \ref ::cudaDeviceProp::maxSurface2D "maxSurface2D[2]" contains the maximum + * 2D surface dimensions. + * - \ref ::cudaDeviceProp::maxSurface3D "maxSurface3D[3]" contains the maximum + * 3D surface dimensions. + * - \ref ::cudaDeviceProp::maxSurface1DLayered "maxSurface1DLayered[2]" contains + * the maximum 1D layered surface dimensions. + * - \ref ::cudaDeviceProp::maxSurface2DLayered "maxSurface2DLayered[3]" contains + * the maximum 2D layered surface dimensions. + * - \ref ::cudaDeviceProp::maxSurfaceCubemap "maxSurfaceCubemap" is the maximum + * cubemap surface width or height. + * - \ref ::cudaDeviceProp::maxSurfaceCubemapLayered "maxSurfaceCubemapLayered[2]" + * contains the maximum cubemap layered surface dimensions. + * - \ref ::cudaDeviceProp::surfaceAlignment "surfaceAlignment" specifies the + * alignment requirements for surfaces. + * - \ref ::cudaDeviceProp::concurrentKernels "concurrentKernels" is 1 if the + * device supports executing multiple kernels within the same context + * simultaneously, or 0 if not. It is not guaranteed that multiple kernels + * will be resident on the device concurrently so this feature should not be + * relied upon for correctness. + * - \ref ::cudaDeviceProp::ECCEnabled "ECCEnabled" is 1 if the device has ECC + * support turned on, or 0 if not. + * - \ref ::cudaDeviceProp::pciBusID "pciBusID" is the PCI bus identifier of + * the device. + * - \ref ::cudaDeviceProp::pciDeviceID "pciDeviceID" is the PCI device + * (sometimes called slot) identifier of the device. + * - \ref ::cudaDeviceProp::pciDomainID "pciDomainID" is the PCI domain identifier + * of the device. + * - \ref ::cudaDeviceProp::tccDriver "tccDriver" is 1 if the device is using a + * TCC driver or 0 if not. + * - \ref ::cudaDeviceProp::asyncEngineCount "asyncEngineCount" is 1 when the + * device can concurrently copy memory between host and device while executing + * a kernel. It is 2 when the device can concurrently copy memory between host + * and device in both directions and execute a kernel at the same time. It is + * 0 if neither of these is supported. + * - \ref ::cudaDeviceProp::unifiedAddressing "unifiedAddressing" is 1 if the device + * shares a unified address space with the host and 0 otherwise. + * - \ref ::cudaDeviceProp::memoryClockRate "memoryClockRate" is the peak memory + * clock frequency in kilohertz. + * - \ref ::cudaDeviceProp::memoryBusWidth "memoryBusWidth" is the memory bus width + * in bits. + * - \ref ::cudaDeviceProp::l2CacheSize "l2CacheSize" is L2 cache size in bytes. + * - \ref ::cudaDeviceProp::persistingL2CacheMaxSize "persistingL2CacheMaxSize" is L2 cache's maximum persisting lines size in bytes. + * - \ref ::cudaDeviceProp::maxThreadsPerMultiProcessor "maxThreadsPerMultiProcessor" + * is the number of maximum resident threads per multiprocessor. + * - \ref ::cudaDeviceProp::streamPrioritiesSupported "streamPrioritiesSupported" + * is 1 if the device supports stream priorities, or 0 if it is not supported. + * - \ref ::cudaDeviceProp::globalL1CacheSupported "globalL1CacheSupported" + * is 1 if the device supports caching of globals in L1 cache, or 0 if it is not supported. + * - \ref ::cudaDeviceProp::localL1CacheSupported "localL1CacheSupported" + * is 1 if the device supports caching of locals in L1 cache, or 0 if it is not supported. + * - \ref ::cudaDeviceProp::sharedMemPerMultiprocessor "sharedMemPerMultiprocessor" is the + * maximum amount of shared memory available to a multiprocessor in bytes; this amount is + * shared by all thread blocks simultaneously resident on a multiprocessor. + * - \ref ::cudaDeviceProp::regsPerMultiprocessor "regsPerMultiprocessor" is the maximum number + * of 32-bit registers available to a multiprocessor; this number is shared + * by all thread blocks simultaneously resident on a multiprocessor. + * - \ref ::cudaDeviceProp::managedMemory "managedMemory" + * is 1 if the device supports allocating managed memory on this system, or 0 if it is not supported. + * - \ref ::cudaDeviceProp::isMultiGpuBoard "isMultiGpuBoard" + * is 1 if the device is on a multi-GPU board (e.g. Gemini cards), and 0 if not; + * - \ref ::cudaDeviceProp::multiGpuBoardGroupID "multiGpuBoardGroupID" is a unique identifier + * for a group of devices associated with the same board. + * Devices on the same multi-GPU board will share the same identifier. + * - \ref ::cudaDeviceProp::hostNativeAtomicSupported "hostNativeAtomicSupported" + * is 1 if the link between the device and the host supports native atomic operations, or 0 if it is not supported. + * - \ref ::cudaDeviceProp::singleToDoublePrecisionPerfRatio "singleToDoublePrecisionPerfRatio" + * is the ratio of single precision performance (in floating-point operations per second) + * to double precision performance. + * - \ref ::cudaDeviceProp::pageableMemoryAccess "pageableMemoryAccess" is 1 if the device supports + * coherently accessing pageable memory without calling cudaHostRegister on it, and 0 otherwise. + * - \ref ::cudaDeviceProp::concurrentManagedAccess "concurrentManagedAccess" is 1 if the device can + * coherently access managed memory concurrently with the CPU, and 0 otherwise. + * - \ref ::cudaDeviceProp::computePreemptionSupported "computePreemptionSupported" is 1 if the device + * supports Compute Preemption, and 0 otherwise. + * - \ref ::cudaDeviceProp::canUseHostPointerForRegisteredMem "canUseHostPointerForRegisteredMem" is 1 if + * the device can access host registered memory at the same virtual address as the CPU, and 0 otherwise. + * - \ref ::cudaDeviceProp::cooperativeLaunch "cooperativeLaunch" is 1 if the device supports launching + * cooperative kernels via ::cudaLaunchCooperativeKernel, and 0 otherwise. + * - \ref ::cudaDeviceProp::cooperativeMultiDeviceLaunch "cooperativeMultiDeviceLaunch" is 1 if the device + * supports launching cooperative kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise. + * - \ref ::cudaDeviceProp::sharedMemPerBlockOptin "sharedMemPerBlockOptin" + * is the per device maximum shared memory per block usable by special opt in + * - \ref ::cudaDeviceProp::pageableMemoryAccessUsesHostPageTables "pageableMemoryAccessUsesHostPageTables" is 1 if the device accesses + * pageable memory via the host's page tables, and 0 otherwise. + * - \ref ::cudaDeviceProp::directManagedMemAccessFromHost "directManagedMemAccessFromHost" is 1 if the host can directly access managed + * memory on the device without migration, and 0 otherwise. + * - \ref ::cudaDeviceProp::maxBlocksPerMultiProcessor "maxBlocksPerMultiProcessor" is the maximum number of thread blocks + * that can reside on a multiprocessor. + * - \ref ::cudaDeviceProp::accessPolicyMaxWindowSize "accessPolicyMaxWindowSize" is + * the maximum value of ::cudaAccessPolicyWindow::num_bytes. + * - \ref ::cudaDeviceProp::reservedSharedMemPerBlock "reservedSharedMemPerBlock" + * is the shared memory reserved by CUDA driver per block in bytes + * - \ref ::cudaDeviceProp::hostRegisterSupported "hostRegisterSupported" + * is 1 if the device supports host memory registration via ::cudaHostRegister, and 0 otherwise. + * - \ref ::cudaDeviceProp::sparseCudaArraySupported "sparseCudaArraySupported" + * is 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise + * - \ref ::cudaDeviceProp::hostRegisterReadOnlySupported "hostRegisterReadOnlySupported" + * is 1 if the device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as + * read-only to the GPU + * - \ref ::cudaDeviceProp::timelineSemaphoreInteropSupported "timelineSemaphoreInteropSupported" + * is 1 if external timeline semaphore interop is supported on the device, 0 otherwise + * - \ref ::cudaDeviceProp::memoryPoolsSupported "memoryPoolsSupported" + * is 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise + * - \ref ::cudaDeviceProp::gpuDirectRDMASupported "gpuDirectRDMASupported" + * is 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + * - \ref ::cudaDeviceProp::gpuDirectRDMAFlushWritesOptions "gpuDirectRDMAFlushWritesOptions" + * is a bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum + * - \ref ::cudaDeviceProp::gpuDirectRDMAWritesOrdering "gpuDirectRDMAWritesOrdering" + * See the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values + * - \ref ::cudaDeviceProp::memoryPoolSupportedHandleTypes "memoryPoolSupportedHandleTypes" + * is a bitmask of handle types supported with mempool-based IPC + * - \ref ::cudaDeviceProp::deferredMappingCudaArraySupported "deferredMappingCudaArraySupported" + * is 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays + * - \ref ::cudaDeviceProp::ipcEventSupported "ipcEventSupported" + * is 1 if the device supports IPC Events, and 0 otherwise + * - \ref ::cudaDeviceProp::unifiedFunctionPointers "unifiedFunctionPointers" + * is 1 if the device support unified pointers, and 0 otherwise + * \param prop - Properties for the specified device + * \param device - Device number to get properties for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice, + * ::cudaDeviceGetAttribute, + * ::cudaInitDevice, + * ::cuDeviceGetAttribute, + * ::cuDeviceGetName + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceProperties(struct cudaDeviceProp *prop, int device); + +/** + * \brief Returns information about the device + * + * Returns in \p *value the integer value of the attribute \p attr on device + * \p device. The supported attributes are: + * - ::cudaDevAttrMaxThreadsPerBlock: Maximum number of threads per block + * - ::cudaDevAttrMaxBlockDimX: Maximum x-dimension of a block + * - ::cudaDevAttrMaxBlockDimY: Maximum y-dimension of a block + * - ::cudaDevAttrMaxBlockDimZ: Maximum z-dimension of a block + * - ::cudaDevAttrMaxGridDimX: Maximum x-dimension of a grid + * - ::cudaDevAttrMaxGridDimY: Maximum y-dimension of a grid + * - ::cudaDevAttrMaxGridDimZ: Maximum z-dimension of a grid + * - ::cudaDevAttrMaxSharedMemoryPerBlock: Maximum amount of shared memory + * available to a thread block in bytes + * - ::cudaDevAttrTotalConstantMemory: Memory available on device for + * __constant__ variables in a CUDA C kernel in bytes + * - ::cudaDevAttrWarpSize: Warp size in threads + * - ::cudaDevAttrMaxPitch: Maximum pitch in bytes allowed by the memory copy + * functions that involve memory regions allocated through ::cudaMallocPitch() + * - ::cudaDevAttrMaxTexture1DWidth: Maximum 1D texture width + * - ::cudaDevAttrMaxTexture1DLinearWidth: Maximum width for a 1D texture bound + * to linear memory + * - ::cudaDevAttrMaxTexture1DMipmappedWidth: Maximum mipmapped 1D texture width + * - ::cudaDevAttrMaxTexture2DWidth: Maximum 2D texture width + * - ::cudaDevAttrMaxTexture2DHeight: Maximum 2D texture height + * - ::cudaDevAttrMaxTexture2DLinearWidth: Maximum width for a 2D texture + * bound to linear memory + * - ::cudaDevAttrMaxTexture2DLinearHeight: Maximum height for a 2D texture + * bound to linear memory + * - ::cudaDevAttrMaxTexture2DLinearPitch: Maximum pitch in bytes for a 2D + * texture bound to linear memory + * - ::cudaDevAttrMaxTexture2DMipmappedWidth: Maximum mipmapped 2D texture + * width + * - ::cudaDevAttrMaxTexture2DMipmappedHeight: Maximum mipmapped 2D texture + * height + * - ::cudaDevAttrMaxTexture3DWidth: Maximum 3D texture width + * - ::cudaDevAttrMaxTexture3DHeight: Maximum 3D texture height + * - ::cudaDevAttrMaxTexture3DDepth: Maximum 3D texture depth + * - ::cudaDevAttrMaxTexture3DWidthAlt: Alternate maximum 3D texture width, + * 0 if no alternate maximum 3D texture size is supported + * - ::cudaDevAttrMaxTexture3DHeightAlt: Alternate maximum 3D texture height, + * 0 if no alternate maximum 3D texture size is supported + * - ::cudaDevAttrMaxTexture3DDepthAlt: Alternate maximum 3D texture depth, + * 0 if no alternate maximum 3D texture size is supported + * - ::cudaDevAttrMaxTextureCubemapWidth: Maximum cubemap texture width or + * height + * - ::cudaDevAttrMaxTexture1DLayeredWidth: Maximum 1D layered texture width + * - ::cudaDevAttrMaxTexture1DLayeredLayers: Maximum layers in a 1D layered + * texture + * - ::cudaDevAttrMaxTexture2DLayeredWidth: Maximum 2D layered texture width + * - ::cudaDevAttrMaxTexture2DLayeredHeight: Maximum 2D layered texture height + * - ::cudaDevAttrMaxTexture2DLayeredLayers: Maximum layers in a 2D layered + * texture + * - ::cudaDevAttrMaxTextureCubemapLayeredWidth: Maximum cubemap layered + * texture width or height + * - ::cudaDevAttrMaxTextureCubemapLayeredLayers: Maximum layers in a cubemap + * layered texture + * - ::cudaDevAttrMaxSurface1DWidth: Maximum 1D surface width + * - ::cudaDevAttrMaxSurface2DWidth: Maximum 2D surface width + * - ::cudaDevAttrMaxSurface2DHeight: Maximum 2D surface height + * - ::cudaDevAttrMaxSurface3DWidth: Maximum 3D surface width + * - ::cudaDevAttrMaxSurface3DHeight: Maximum 3D surface height + * - ::cudaDevAttrMaxSurface3DDepth: Maximum 3D surface depth + * - ::cudaDevAttrMaxSurface1DLayeredWidth: Maximum 1D layered surface width + * - ::cudaDevAttrMaxSurface1DLayeredLayers: Maximum layers in a 1D layered + * surface + * - ::cudaDevAttrMaxSurface2DLayeredWidth: Maximum 2D layered surface width + * - ::cudaDevAttrMaxSurface2DLayeredHeight: Maximum 2D layered surface height + * - ::cudaDevAttrMaxSurface2DLayeredLayers: Maximum layers in a 2D layered + * surface + * - ::cudaDevAttrMaxSurfaceCubemapWidth: Maximum cubemap surface width + * - ::cudaDevAttrMaxSurfaceCubemapLayeredWidth: Maximum cubemap layered + * surface width + * - ::cudaDevAttrMaxSurfaceCubemapLayeredLayers: Maximum layers in a cubemap + * layered surface + * - ::cudaDevAttrMaxRegistersPerBlock: Maximum number of 32-bit registers + * available to a thread block + * - ::cudaDevAttrClockRate: Peak clock frequency in kilohertz + * - ::cudaDevAttrTextureAlignment: Alignment requirement; texture base + * addresses aligned to ::textureAlign bytes do not need an offset applied + * to texture fetches + * - ::cudaDevAttrTexturePitchAlignment: Pitch alignment requirement for 2D + * texture references bound to pitched memory + * - ::cudaDevAttrGpuOverlap: 1 if the device can concurrently copy memory + * between host and device while executing a kernel, or 0 if not + * - ::cudaDevAttrMultiProcessorCount: Number of multiprocessors on the device + * - ::cudaDevAttrKernelExecTimeout: 1 if there is a run time limit for kernels + * executed on the device, or 0 if not + * - ::cudaDevAttrIntegrated: 1 if the device is integrated with the memory + * subsystem, or 0 if not + * - ::cudaDevAttrCanMapHostMemory: 1 if the device can map host memory into + * the CUDA address space, or 0 if not + * - ::cudaDevAttrComputeMode: Compute mode is the compute mode that the device + * is currently in. Available modes are as follows: + * - ::cudaComputeModeDefault: Default mode - Device is not restricted and + * multiple threads can use ::cudaSetDevice() with this device. + * - ::cudaComputeModeProhibited: Compute-prohibited mode - No threads can use + * ::cudaSetDevice() with this device. + * - ::cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many + * threads in one process will be able to use ::cudaSetDevice() with this + * device. + * - ::cudaDevAttrConcurrentKernels: 1 if the device supports executing + * multiple kernels within the same context simultaneously, or 0 if + * not. It is not guaranteed that multiple kernels will be resident on the + * device concurrently so this feature should not be relied upon for + * correctness. + * - ::cudaDevAttrEccEnabled: 1 if error correction is enabled on the device, + * 0 if error correction is disabled or not supported by the device + * - ::cudaDevAttrPciBusId: PCI bus identifier of the device + * - ::cudaDevAttrPciDeviceId: PCI device (also known as slot) identifier of + * the device + * - ::cudaDevAttrTccDriver: 1 if the device is using a TCC driver. TCC is only + * available on Tesla hardware running Windows Vista or later. + * - ::cudaDevAttrMemoryClockRate: Peak memory clock frequency in kilohertz + * - ::cudaDevAttrGlobalMemoryBusWidth: Global memory bus width in bits + * - ::cudaDevAttrL2CacheSize: Size of L2 cache in bytes. 0 if the device + * doesn't have L2 cache. + * - ::cudaDevAttrMaxThreadsPerMultiProcessor: Maximum resident threads per + * multiprocessor + * - ::cudaDevAttrUnifiedAddressing: 1 if the device shares a unified address + * space with the host, or 0 if not + * - ::cudaDevAttrComputeCapabilityMajor: Major compute capability version + * number + * - ::cudaDevAttrComputeCapabilityMinor: Minor compute capability version + * number + * - ::cudaDevAttrStreamPrioritiesSupported: 1 if the device supports stream + * priorities, or 0 if not + * - ::cudaDevAttrGlobalL1CacheSupported: 1 if device supports caching globals + * in L1 cache, 0 if not + * - ::cudaDevAttrLocalL1CacheSupported: 1 if device supports caching locals + * in L1 cache, 0 if not + * - ::cudaDevAttrMaxSharedMemoryPerMultiprocessor: Maximum amount of shared memory + * available to a multiprocessor in bytes; this amount is shared by all + * thread blocks simultaneously resident on a multiprocessor + * - ::cudaDevAttrMaxRegistersPerMultiprocessor: Maximum number of 32-bit registers + * available to a multiprocessor; this number is shared by all thread blocks + * simultaneously resident on a multiprocessor + * - ::cudaDevAttrManagedMemory: 1 if device supports allocating + * managed memory, 0 if not + * - ::cudaDevAttrIsMultiGpuBoard: 1 if device is on a multi-GPU board, 0 if not + * - ::cudaDevAttrMultiGpuBoardGroupID: Unique identifier for a group of devices on the + * same multi-GPU board + * - ::cudaDevAttrHostNativeAtomicSupported: 1 if the link between the device and the + * host supports native atomic operations + * - ::cudaDevAttrSingleToDoublePrecisionPerfRatio: Ratio of single precision performance + * (in floating-point operations per second) to double precision performance + * - ::cudaDevAttrPageableMemoryAccess: 1 if the device supports coherently accessing + * pageable memory without calling cudaHostRegister on it, and 0 otherwise + * - ::cudaDevAttrConcurrentManagedAccess: 1 if the device can coherently access managed + * memory concurrently with the CPU, and 0 otherwise + * - ::cudaDevAttrComputePreemptionSupported: 1 if the device supports + * Compute Preemption, 0 if not + * - ::cudaDevAttrCanUseHostPointerForRegisteredMem: 1 if the device can access host + * registered memory at the same virtual address as the CPU, and 0 otherwise + * - ::cudaDevAttrCooperativeLaunch: 1 if the device supports launching cooperative kernels + * via ::cudaLaunchCooperativeKernel, and 0 otherwise + * - ::cudaDevAttrCooperativeMultiDeviceLaunch: 1 if the device supports launching cooperative + * kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise + * - ::cudaDevAttrCanFlushRemoteWrites: 1 if the device supports flushing of outstanding + * remote writes, and 0 otherwise + * - ::cudaDevAttrHostRegisterSupported: 1 if the device supports host memory registration + * via ::cudaHostRegister, and 0 otherwise + * - ::cudaDevAttrPageableMemoryAccessUsesHostPageTables: 1 if the device accesses pageable memory via the + * host's page tables, and 0 otherwise + * - ::cudaDevAttrDirectManagedMemAccessFromHost: 1 if the host can directly access managed memory on the device + * without migration, and 0 otherwise + * - ::cudaDevAttrMaxSharedMemoryPerBlockOptin: Maximum per block shared memory size on the device. This value can + * be opted into when using ::cudaFuncSetAttribute + * - ::cudaDevAttrMaxBlocksPerMultiprocessor: Maximum number of thread blocks that can reside on a multiprocessor + * - ::cudaDevAttrMaxPersistingL2CacheSize: Maximum L2 persisting lines capacity setting in bytes + * - ::cudaDevAttrMaxAccessPolicyWindowSize: Maximum value of cudaAccessPolicyWindow::num_bytes + * - ::cudaDevAttrReservedSharedMemoryPerBlock: Shared memory reserved by CUDA driver per block in bytes + * - ::cudaDevAttrSparseCudaArraySupported: 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays. + * - ::cudaDevAttrHostRegisterReadOnlySupported: Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly + * to register memory that must be mapped as read-only to the GPU + * - ::cudaDevAttrMemoryPoolsSupported: 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, and 0 otherwise + * - ::cudaDevAttrGPUDirectRDMASupported: 1 if the device supports GPUDirect RDMA APIs, and 0 otherwise + * - ::cudaDevAttrGPUDirectRDMAFlushWritesOptions: bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum + * - ::cudaDevAttrGPUDirectRDMAWritesOrdering: see the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values + * - ::cudaDevAttrMemoryPoolSupportedHandleTypes: Bitmask of handle types supported with mempool based IPC + * - ::cudaDevAttrDeferredMappingCudaArraySupported : 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays. + * - ::cudaDevAttrIpcEventSupport: 1 if the device supports IPC Events. + * - ::cudaDevAttrNumaConfig: NUMA configuration of a device: value is of type ::cudaDeviceNumaConfig enum + * - ::cudaDevAttrNumaId: NUMA node ID of the GPU memory + * - ::cudaDevAttrGpuPciDeviceId: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + * - ::cudaDevAttrGpuPciSubsystemId: The combined 16-bit PCI subsystem ID and 16-bit PCI vendor subsystem ID. + * + * \param value - Returned device attribute value + * \param attr - Device attribute to query + * \param device - Device number to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice, + * ::cudaGetDeviceProperties, + * ::cudaInitDevice, + * ::cuDeviceGetAttribute + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device); + +/** + * \brief Returns the default mempool of a device + * + * The default mempool of a device contains device memory from that device. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue + * ::cudaErrorNotSupported + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cuDeviceGetDefaultMemPool, ::cudaMallocAsync, ::cudaMemPoolTrimTo, ::cudaMemPoolGetAttribute, ::cudaDeviceSetMemPool, ::cudaMemPoolSetAttribute, ::cudaMemPoolSetAccess + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetDefaultMemPool(cudaMemPool_t *memPool, int device); + + +/** + * \brief Sets the current memory pool of a device + * + * The memory pool must be local to the specified device. + * Unless a mempool is specified in the ::cudaMallocAsync call, + * ::cudaMallocAsync allocates from the current mempool of the provided stream's device. + * By default, a device's current memory pool is its default memory pool. + * + * \note Use ::cudaMallocFromPoolAsync to specify asynchronous allocations from a device different + * than the one the stream runs on. + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * ::cudaErrorInvalidDevice + * ::cudaErrorNotSupported + * \notefnerr + * \note_callback + * + * \sa ::cuDeviceSetMemPool, ::cudaDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolDestroy, ::cudaMallocFromPoolAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceSetMemPool(int device, cudaMemPool_t memPool); + +/** + * \brief Gets the current mempool for a device + * + * Returns the last pool provided to ::cudaDeviceSetMemPool for this device + * or the device's default memory pool if ::cudaDeviceSetMemPool has never been called. + * By default the current mempool is the default mempool for a device, + * otherwise the returned pool must have been set with ::cuDeviceSetMemPool or ::cudaDeviceSetMemPool. + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * ::cudaErrorNotSupported + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cuDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceSetMemPool + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetMemPool(cudaMemPool_t *memPool, int device); + +/** + * \brief Return NvSciSync attributes that this device can support. + * + * Returns in \p nvSciSyncAttrList, the properties of NvSciSync that + * this CUDA device, \p dev can support. The returned \p nvSciSyncAttrList + * can be used to create an NvSciSync that matches this device's capabilities. + * + * If NvSciSyncAttrKey_RequiredPerm field in \p nvSciSyncAttrList is + * already set this API will return ::cudaErrorInvalidValue. + * + * The applications should set \p nvSciSyncAttrList to a valid + * NvSciSyncAttrList failing which this API will return + * ::cudaErrorInvalidHandle. + * + * The \p flags controls how applications intends to use + * the NvSciSync created from the \p nvSciSyncAttrList. The valid flags are: + * - ::cudaNvSciSyncAttrSignal, specifies that the applications intends to + * signal an NvSciSync on this CUDA device. + * - ::cudaNvSciSyncAttrWait, specifies that the applications intends to + * wait on an NvSciSync on this CUDA device. + * + * At least one of these flags must be set, failing which the API + * returns ::cudaErrorInvalidValue. Both the flags are orthogonal + * to one another: a developer may set both these flags that allows to + * set both wait and signal specific attributes in the same \p nvSciSyncAttrList. + * + * Note that this API updates the input \p nvSciSyncAttrList with values equivalent + * to the following public attribute key-values: + * NvSciSyncAttrKey_RequiredPerm is set to + * - NvSciSyncAccessPerm_SignalOnly if ::cudaNvSciSyncAttrSignal is set in \p flags. + * - NvSciSyncAccessPerm_WaitOnly if ::cudaNvSciSyncAttrWait is set in \p flags. + * - NvSciSyncAccessPerm_WaitSignal if both ::cudaNvSciSyncAttrWait and + * ::cudaNvSciSyncAttrSignal are set in \p flags. + * NvSciSyncAttrKey_PrimitiveInfo is set to + * - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid \p device. + * - NvSciSyncAttrValPrimitiveType_Syncpoint if \p device is a Tegra device. + * - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if \p device is GA10X+. + * NvSciSyncAttrKey_GpuId is set to the same UUID that is returned in + * \p cudaDeviceProp.uuid from ::cudaDeviceGetProperties for this \p device. + * + * \param nvSciSyncAttrList - Return NvSciSync attributes supported. + * \param device - Valid Cuda Device to get NvSciSync attributes for. + * \param flags - flags describing NvSciSync usage. + * + * \return + * + * ::cudaSuccess, + * ::cudaErrorDeviceUninitialized, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidHandle, + * ::cudaErrorInvalidDevice, + * ::cudaErrorNotSupported, + * ::cudaErrorMemoryAllocation + * + * \sa + * ::cudaImportExternalSemaphore, + * ::cudaDestroyExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetNvSciSyncAttributes(void *nvSciSyncAttrList, int device, int flags); + +/** + * \brief Queries attributes of the link between two devices. + * + * Returns in \p *value the value of the requested attribute \p attrib of the + * link between \p srcDevice and \p dstDevice. The supported attributes are: + * - ::cudaDevP2PAttrPerformanceRank: A relative value indicating the + * performance of the link between two devices. Lower value means better + * performance (0 being the value used for most performant link). + * - ::cudaDevP2PAttrAccessSupported: 1 if peer access is enabled. + * - ::cudaDevP2PAttrNativeAtomicSupported: 1 if native atomic operations over + * the link are supported. + * - ::cudaDevP2PAttrCudaArrayAccessSupported: 1 if accessing CUDA arrays over + * the link is supported. + * + * Returns ::cudaErrorInvalidDevice if \p srcDevice or \p dstDevice are not valid + * or if they represent the same device. + * + * Returns ::cudaErrorInvalidValue if \p attrib is not valid or if \p value is + * a null pointer. + * + * \param value - Returned value of the requested attribute + * \param attrib - The requested attribute of the link between \p srcDevice and \p dstDevice. + * \param srcDevice - The source device of the target link. + * \param dstDevice - The destination device of the target link. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceEnablePeerAccess, + * ::cudaDeviceDisablePeerAccess, + * ::cudaDeviceCanAccessPeer, + * ::cuDeviceGetP2PAttribute + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetP2PAttribute(int *value, enum cudaDeviceP2PAttr attr, int srcDevice, int dstDevice); + +/** + * \brief Select compute-device which best matches criteria + * + * Returns in \p *device the device which has properties that best match + * \p *prop. + * + * \param device - Device with best match + * \param prop - Desired device properties + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, + * ::cudaGetDeviceProperties, + * ::cudaInitDevice + */ +extern __host__ cudaError_t CUDARTAPI cudaChooseDevice(int *device, const struct cudaDeviceProp *prop); +/** + * \brief Initialize device to be used for GPU executions + * + * This function will initialize the CUDA Runtime structures and primary context on \p device when called, + * but the context will not be made current to \p device. + * + * When ::cudaInitDeviceFlagsAreValid is set in \p flags, deviceFlags are applied to the requested device. + * The values of deviceFlags match those of the flags parameters in ::cudaSetDeviceFlags. + * The effect may be verified by ::cudaGetDeviceFlags. + * + * This function will return an error if the device is in ::cudaComputeModeExclusiveProcess + * and is occupied by another process or if the device is in ::cudaComputeModeProhibited. + * + * \param device - Device on which the runtime will initialize itself. + * \param deviceFlags - Parameters for device operation. + * \param flags - Flags for controlling the device initialization. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties, + * ::cudaChooseDevice, ::cudaSetDevice + * ::cuCtxSetCurrent + */ +extern __host__ cudaError_t CUDARTAPI cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags); +/** + * \brief Set device to be used for GPU executions + * + * Sets \p device as the current device for the calling host thread. + * Valid device id's are 0 to (::cudaGetDeviceCount() - 1). + * + * Any device memory subsequently allocated from this host thread + * using ::cudaMalloc(), ::cudaMallocPitch() or ::cudaMallocArray() + * will be physically resident on \p device. Any host memory allocated + * from this host thread using ::cudaMallocHost() or ::cudaHostAlloc() + * or ::cudaHostRegister() will have its lifetime associated with + * \p device. Any streams or events created from this host thread will + * be associated with \p device. Any kernels launched from this host + * thread using the <<<>>> operator or ::cudaLaunchKernel() will be executed + * on \p device. + * + * This call may be made from any host thread, to any device, and at + * any time. This function will do no synchronization with the previous + * or new device, + * and should only take significant time when it initializes the runtime's context state. + * This call will bind the primary context of the specified device to the calling thread and all the + * subsequent memory allocations, stream and event creations, and kernel launches + * will be associated with the primary context. + * This function will also immediately initialize the runtime state on the primary context, + * and the context will be current on \p device immediately. This function will return an + * error if the device is in ::cudaComputeModeExclusiveProcess and is occupied by another + * process or if the device is in ::cudaComputeModeProhibited. + * + * It is not required to call ::cudaInitDevice before using this function. + * \param device - Device on which the active host thread should execute the + * device code. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorDeviceUnavailable, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties, + * ::cudaChooseDevice, + * ::cudaInitDevice, + * ::cuCtxSetCurrent + */ +extern __host__ cudaError_t CUDARTAPI cudaSetDevice(int device); + +/** + * \brief Returns which device is currently being used + * + * Returns in \p *device the current device for the calling host thread. + * + * \param device - Returns the device on which the active host thread + * executes the device code. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorDeviceUnavailable, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties, + * ::cudaChooseDevice, + * ::cuCtxGetCurrent + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDevice(int *device); + +/** + * \brief Set a list of devices that can be used for CUDA + * + * Sets a list of devices for CUDA execution in priority order using + * \p device_arr. The parameter \p len specifies the number of elements in the + * list. CUDA will try devices from the list sequentially until it finds one + * that works. If this function is not called, or if it is called with a \p len + * of 0, then CUDA will go back to its default behavior of trying devices + * sequentially from a default list containing all of the available CUDA + * devices in the system. If a specified device ID in the list does not exist, + * this function will return ::cudaErrorInvalidDevice. If \p len is not 0 and + * \p device_arr is NULL or if \p len exceeds the number of devices in + * the system, then ::cudaErrorInvalidValue is returned. + * + * \param device_arr - List of devices to try + * \param len - Number of devices in specified list + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties, + * ::cudaSetDeviceFlags, + * ::cudaChooseDevice + */ +extern __host__ cudaError_t CUDARTAPI cudaSetValidDevices(int *device_arr, int len); + +/** + * \brief Sets flags to be used for device executions + * + * Records \p flags as the flags for the current device. If the current device + * has been set and that device has already been initialized, the previous flags + * are overwritten. If the current device has not been initialized, it is + * initialized with the provided flags. If no device has been made current to + * the calling thread, a default device is selected and initialized with the + * provided flags. + * + * The three LSBs of the \p flags parameter can be used to control how the CPU + * thread interacts with the OS scheduler when waiting for results from the + * device. + * + * - ::cudaDeviceScheduleAuto: The default value if the \p flags parameter is + * zero, uses a heuristic based on the number of active CUDA contexts in the + * process \p C and the number of logical processors in the system \p P. If + * \p C \> \p P, then CUDA will yield to other OS threads when waiting for the + * device, otherwise CUDA will not yield while waiting for results and + * actively spin on the processor. Additionally, on Tegra devices, + * ::cudaDeviceScheduleAuto uses a heuristic based on the power profile of + * the platform and may choose ::cudaDeviceScheduleBlockingSync for low-powered + * devices. + * - ::cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for + * results from the device. This can decrease latency when waiting for the + * device, but may lower the performance of CPU threads if they are performing + * work in parallel with the CUDA thread. + * - ::cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting + * for results from the device. This can increase latency when waiting for the + * device, but can increase the performance of CPU threads performing work in + * parallel with the device. + * - ::cudaDeviceScheduleBlockingSync: Instruct CUDA to block the CPU thread + * on a synchronization primitive when waiting for the device to finish work. + * - ::cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a + * synchronization primitive when waiting for the device to finish work.
+ * \ref deprecated "Deprecated:" This flag was deprecated as of CUDA 4.0 and + * replaced with ::cudaDeviceScheduleBlockingSync. + * - ::cudaDeviceMapHost: This flag enables allocating pinned + * host memory that is accessible to the device. It is implicit for the + * runtime but may be absent if a context is created using the driver API. + * If this flag is not set, ::cudaHostGetDevicePointer() will always return + * a failure code. + * - ::cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory + * after resizing local memory for a kernel. This can prevent thrashing by + * local memory allocations when launching many kernels with high local + * memory usage at the cost of potentially increased memory usage.
+ * \ref deprecated "Deprecated:" This flag is deprecated and the behavior enabled + * by this flag is now the default and cannot be disabled. + * - ::cudaDeviceSyncMemops: Ensures that synchronous memory operations initiated + * on this context will always synchronize. See further documentation in the + * section titled "API Synchronization behavior" to learn more about cases when + * synchronous memory operations can exhibit asynchronous behavior. + * + * \param flags - Parameters for device operation + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceFlags, ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties, + * ::cudaSetDevice, ::cudaSetValidDevices, + * ::cudaInitDevice, + * ::cudaChooseDevice, + * ::cuDevicePrimaryCtxSetFlags + */ +extern __host__ cudaError_t CUDARTAPI cudaSetDeviceFlags( unsigned int flags ); + +/** + * \brief Gets the flags for the current device + * + * + * Returns in \p flags the flags for the current device. If there is a current + * device for the calling thread, the flags for the device are returned. If + * there is no current device, the flags for the first device are returned, + * which may be the default flags. Compare to the behavior of + * ::cudaSetDeviceFlags. + * + * Typically, the flags returned should match the behavior that will be seen + * if the calling thread uses a device after this call, without any change to + * the flags or current device inbetween by this or another thread. Note that + * if the device is not initialized, it is possible for another thread to + * change the flags for the current device before it is initialized. + * Additionally, when using exclusive mode, if this thread has not requested a + * specific device, it may use a device other than the first device, contrary + * to the assumption made by this function. + * + * If a context has been created via the driver API and is current to the + * calling thread, the flags for that context are always returned. + * + * Flags returned by this function may specifically include ::cudaDeviceMapHost + * even though it is not accepted by ::cudaSetDeviceFlags because it is + * implicit in runtime API flags. The reason for this is that the current + * context may have been created via the driver API in which case the flag is + * not implicit and may be unset. + * + * \param flags - Pointer to store the device flags + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDevice, ::cudaGetDeviceProperties, + * ::cudaSetDevice, ::cudaSetDeviceFlags, + * ::cudaInitDevice, + * ::cuCtxGetFlags, + * ::cuDevicePrimaryCtxGetState + */ +extern __host__ cudaError_t CUDARTAPI cudaGetDeviceFlags( unsigned int *flags ); +/** @} */ /* END CUDART_DEVICE */ + +/** + * \defgroup CUDART_STREAM Stream Management + * + * ___MANBRIEF___ stream management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the stream management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Create an asynchronous stream + * + * Creates a new asynchronous stream on the context that is current to the calling host thread. + * If no context is current to the calling host thread, then the primary context for a device + * is selected, made current to the calling thread, and initialized before creating a stream on it. + * + * \param pStream - Pointer to new stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreateWithPriority, + * ::cudaStreamCreateWithFlags, + * ::cudaStreamGetPriority, + * ::cudaStreamGetFlags, + * ::cudaStreamGetDevice, + * ::cudaStreamQuery, + * ::cudaStreamSynchronize, + * ::cudaStreamWaitEvent, + * ::cudaStreamAddCallback, + * ::cudaSetDevice, + * ::cudaStreamDestroy, + * ::cuStreamCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamCreate(cudaStream_t *pStream); + +/** + * \brief Create an asynchronous stream + * + * Creates a new asynchronous stream on the context that is current to the calling host thread. + * If no context is current to the calling host thread, then the primary context for a device + * is selected, made current to the calling thread, and initialized before creating a stream on it. + * The \p flags argument determines the behaviors of the stream. Valid values for \p flags are + * - ::cudaStreamDefault: Default stream creation flag. + * - ::cudaStreamNonBlocking: Specifies that work running in the created + * stream may run concurrently with work in stream 0 (the NULL stream), and that + * the created stream should perform no implicit synchronization with stream 0. + * + * \param pStream - Pointer to new stream identifier + * \param flags - Parameters for stream creation + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, + * ::cudaStreamCreateWithPriority, + * ::cudaStreamGetFlags, + * ::cudaStreamGetDevice, + * ::cudaStreamQuery, + * ::cudaStreamSynchronize, + * ::cudaStreamWaitEvent, + * ::cudaStreamAddCallback, + * ::cudaSetDevice, + * ::cudaStreamDestroy, + * ::cuStreamCreate + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithFlags(cudaStream_t *pStream, unsigned int flags); + +/** + * \brief Create an asynchronous stream with the specified priority + * + * Creates a stream with the specified priority and returns a handle in \p pStream. + * The stream is created on the context that is current to the calling host thread. + * If no context is current to the calling host thread, then the primary context for a device + * is selected, made current to the calling thread, and initialized before creating a stream on it. + * This affects the scheduling priority of work in the stream. Priorities provide a + * hint to preferentially run work with higher priority when possible, but do + * not preempt already-running work or provide any other functional guarantee on + * execution order. + * + * \p priority follows a convention where lower numbers represent higher priorities. + * '0' represents default priority. The range of meaningful numerical priorities can + * be queried using ::cudaDeviceGetStreamPriorityRange. If the specified priority is + * outside the numerical range returned by ::cudaDeviceGetStreamPriorityRange, + * it will automatically be clamped to the lowest or the highest number in the range. + * + * \param pStream - Pointer to new stream identifier + * \param flags - Flags for stream creation. See ::cudaStreamCreateWithFlags for a list of valid flags that can be passed + * \param priority - Priority of the stream. Lower numbers represent higher priorities. + * See ::cudaDeviceGetStreamPriorityRange for more information about + * the meaningful stream priorities that can be passed. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \note Stream priorities are supported only on GPUs + * with compute capability 3.5 or higher. + * + * \note In the current implementation, only compute kernels launched in + * priority streams are affected by the stream's priority. Stream priorities have + * no effect on host-to-device and device-to-host memory operations. + * + * \sa ::cudaStreamCreate, + * ::cudaStreamCreateWithFlags, + * ::cudaDeviceGetStreamPriorityRange, + * ::cudaStreamGetPriority, + * ::cudaStreamQuery, + * ::cudaStreamWaitEvent, + * ::cudaStreamAddCallback, + * ::cudaStreamSynchronize, + * ::cudaSetDevice, + * ::cudaStreamDestroy, + * ::cuStreamCreateWithPriority + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCreateWithPriority(cudaStream_t *pStream, unsigned int flags, int priority); + +/** + * \brief Query the priority of a stream + * + * Query the priority of a stream. The priority is returned in in \p priority. + * Note that if the stream was created with a priority outside the meaningful + * numerical range returned by ::cudaDeviceGetStreamPriorityRange, + * this function returns the clamped priority. + * See ::cudaStreamCreateWithPriority for details about priority clamping. + * + * \param hStream - Handle to the stream to be queried + * \param priority - Pointer to a signed integer in which the stream's priority is returned + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreateWithPriority, + * ::cudaDeviceGetStreamPriorityRange, + * ::cudaStreamGetFlags, + * ::cudaStreamGetDevice, + * ::cuStreamGetPriority + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetPriority(cudaStream_t hStream, int *priority); + +/** + * \brief Query the flags of a stream + * + * Query the flags of a stream. The flags are returned in \p flags. + * See ::cudaStreamCreateWithFlags for a list of valid flags. + * + * \param hStream - Handle to the stream to be queried + * \param flags - Pointer to an unsigned integer in which the stream's flags are returned + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreateWithPriority, + * ::cudaStreamCreateWithFlags, + * ::cudaStreamGetPriority, + * ::cudaStreamGetDevice, + * ::cuStreamGetFlags + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetFlags(cudaStream_t hStream, unsigned int *flags); + +/** + * \brief Query the Id of a stream + * + * Query the Id of a stream. The Id is returned in \p streamId. + * The Id is unique for the life of the program. + * + * The stream handle \p hStream can refer to any of the following: + *
    + *
  • a stream created via any of the CUDA runtime APIs such as ::cudaStreamCreate, + * ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority, or their driver + * API equivalents such as ::cuStreamCreate or ::cuStreamCreateWithPriority. + * Passing an invalid handle will result in undefined behavior.
  • + *
  • any of the special streams such as the NULL stream, ::cudaStreamLegacy + * and ::cudaStreamPerThread respectively. The driver API equivalents of these + * are also accepted which are NULL, ::CU_STREAM_LEGACY and ::CU_STREAM_PER_THREAD.
  • + *
+ * + * \param hStream - Handle to the stream to be queried + * \param streamId - Pointer to an unsigned long long in which the stream Id is returned + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreateWithPriority, + * ::cudaStreamCreateWithFlags, + * ::cudaStreamGetPriority, + * ::cudaStreamGetFlags, + * ::cuStreamGetId + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetId(cudaStream_t hStream, unsigned long long *streamId); + +/** + * \brief Query the device of a stream + * + * Returns in \p *device the device of the stream. + * + * \param hStream - Handle to the stream to be queried + * \param device - Returns the device to which the stream belongs + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorDeviceUnavailable, + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaSetDevice, + * ::cudaGetDevice, + * ::cudaStreamCreate, + * ::cudaStreamGetPriority, + * ::cudaStreamGetFlags, + * ::cuStreamGetId + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetDevice(cudaStream_t hStream, int *device); + +/** + * \brief Resets all persisting lines in cache to normal status. + * + * Resets all persisting lines in cache to normal status. + * Takes effect on function return. + * + * \return + * ::cudaSuccess, + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ cudaError_t CUDARTAPI cudaCtxResetPersistingL2Cache(void); + +/** + * \brief Copies attributes from source stream to destination stream. + * + * Copies attributes from source stream \p src to destination stream \p dst. + * Both streams must have the same context. + * + * \param[out] dst Destination stream + * \param[in] src Source stream + * For attributes see ::cudaStreamAttrID + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotSupported + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src); + + /** + * \brief Queries stream attribute. + * + * Queries attribute \p attr from \p hStream and stores it in corresponding + * member of \p value_out. + * + * \param[in] hStream + * \param[in] attr + * \param[out] value_out + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetAttribute( + cudaStream_t hStream, cudaStreamAttrID attr, + cudaStreamAttrValue *value_out); + + /** + * \brief Sets stream attribute. + * + * Sets attribute \p attr on \p hStream from corresponding attribute of + * \p value. The updated attribute will be applied to subsequent work + * submitted to the stream. It will not affect previously submitted work. + * + * \param[out] hStream + * \param[in] attr + * \param[in] value + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamSetAttribute( + cudaStream_t hStream, cudaStreamAttrID attr, + const cudaStreamAttrValue *value); + + /** + * \brief Destroys and cleans up an asynchronous stream + * + * Destroys and cleans up the asynchronous stream specified by \p stream. + * + * In case the device is still doing work in the stream \p stream + * when ::cudaStreamDestroy() is called, the function will return immediately + * and the resources associated with \p stream will be released automatically + * once the device has completed all work in \p stream. + * + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa ::cudaStreamCreate, + * ::cudaStreamCreateWithFlags, + * ::cudaStreamQuery, + * ::cudaStreamWaitEvent, + * ::cudaStreamSynchronize, + * ::cudaStreamAddCallback, + * ::cuStreamDestroy + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream); + +/** + * \brief Make a compute stream wait on an event + * + * Makes all future work submitted to \p stream wait for all work captured in + * \p event. See ::cudaEventRecord() for details on what is captured by an event. + * The synchronization will be performed efficiently on the device when applicable. + * \p event may be from a different device than \p stream. + * + * flags include: + * - ::cudaEventWaitDefault: Default event creation flag. + * - ::cudaEventWaitExternal: Event is captured in the graph as an external + * event node when performing stream capture. + * + * \param stream - Stream to wait + * \param event - Event to wait on + * \param flags - Parameters for the operation(See above) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy, + * ::cuStreamWaitEvent + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags __dv(0)); + +/** + * Type of stream callback functions. + * \param stream The stream as passed to ::cudaStreamAddCallback, may be NULL. + * \param status ::cudaSuccess or any persistent error on the stream. + * \param userData User parameter provided at registration. + */ +typedef void (CUDART_CB *cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void *userData); + +/** + * \brief Add a callback to a compute stream + * + * \note This function is slated for eventual deprecation and removal. If + * you do not require the callback to execute in case of a device error, + * consider using ::cudaLaunchHostFunc. Additionally, this function is not + * supported with ::cudaStreamBeginCapture and ::cudaStreamEndCapture, unlike + * ::cudaLaunchHostFunc. + * + * Adds a callback to be called on the host after all currently enqueued + * items in the stream have completed. For each + * cudaStreamAddCallback call, a callback will be executed exactly once. + * The callback will block later work in the stream until it is finished. + * + * The callback may be passed ::cudaSuccess or an error code. In the event + * of a device error, all subsequently executed callbacks will receive an + * appropriate ::cudaError_t. + * + * Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs + * may result in ::cudaErrorNotPermitted. Callbacks must not perform any + * synchronization that may depend on outstanding device work or other callbacks + * that are not mandated to run earlier. Callbacks without a mandated order + * (in independent streams) execute in undefined order and may be serialized. + * + * For the purposes of Unified Memory, callback execution makes a number of + * guarantees: + *
    + *
  • The callback stream is considered idle for the duration of the + * callback. Thus, for example, a callback may always use memory attached + * to the callback stream.
  • + *
  • The start of execution of a callback has the same effect as + * synchronizing an event recorded in the same stream immediately prior to + * the callback. It thus synchronizes streams which have been "joined" + * prior to the callback.
  • + *
  • Adding device work to any stream does not have the effect of making + * the stream active until all preceding callbacks have executed. Thus, for + * example, a callback might use global attached memory even if work has + * been added to another stream, if it has been properly ordered with an + * event.
  • + *
  • Completion of a callback does not cause a stream to become + * active except as described above. The callback stream will remain idle + * if no device work follows the callback, and will remain idle across + * consecutive callbacks without device work in between. Thus, for example, + * stream synchronization can be done by signaling from a callback at the + * end of the stream.
  • + *
+ * + * \param stream - Stream to add callback to + * \param callback - The function to call once preceding stream operations are complete + * \param userData - User specified data to be passed to the callback function + * \param flags - Reserved for future use, must be 0 + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamWaitEvent, ::cudaStreamDestroy, ::cudaMallocManaged, ::cudaStreamAttachMemAsync, + * ::cudaLaunchHostFunc, ::cuStreamAddCallback + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamAddCallback(cudaStream_t stream, + cudaStreamCallback_t callback, void *userData, unsigned int flags); + +/** + * \brief Waits for stream tasks to complete + * + * Blocks until \p stream has completed all operations. If the + * ::cudaDeviceScheduleBlockingSync flag was set for this device, + * the host thread will block until the stream is finished with + * all of its tasks. + * + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamWaitEvent, ::cudaStreamAddCallback, ::cudaStreamDestroy, + * ::cuStreamSynchronize + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamSynchronize(cudaStream_t stream); + +/** + * \brief Queries an asynchronous stream for completion status + * + * Returns ::cudaSuccess if all operations in \p stream have + * completed, or ::cudaErrorNotReady if not. + * + * For the purposes of Unified Memory, a return value of ::cudaSuccess + * is equivalent to having called ::cudaStreamSynchronize(). + * + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidResourceHandle + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy, + * ::cuStreamQuery + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamQuery(cudaStream_t stream); + +/** + * \brief Attach memory to a stream asynchronously + * + * Enqueues an operation in \p stream to specify stream association of + * \p length bytes of memory starting from \p devPtr. This function is a + * stream-ordered operation, meaning that it is dependent on, and will + * only take effect when, previous work in stream has completed. Any + * previous association is automatically replaced. + * + * \p devPtr must point to an one of the following types of memories: + * - managed memory declared using the __managed__ keyword or allocated with + * ::cudaMallocManaged. + * - a valid host-accessible region of system-allocated pageable memory. This + * type of memory may only be specified if the device associated with the + * stream reports a non-zero value for the device attribute + * ::cudaDevAttrPageableMemoryAccess. + * + * For managed allocations, \p length must be either zero or the entire + * allocation's size. Both indicate that the entire allocation's stream + * association is being changed. Currently, it is not possible to change stream + * association for a portion of a managed allocation. + * + * For pageable allocations, \p length must be non-zero. + * + * The stream association is specified using \p flags which must be + * one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle. + * The default value for \p flags is ::cudaMemAttachSingle + * If the ::cudaMemAttachGlobal flag is specified, the memory can be accessed + * by any stream on any device. + * If the ::cudaMemAttachHost flag is specified, the program makes a guarantee + * that it won't access the memory on the device from any stream on a device that + * has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * If the ::cudaMemAttachSingle flag is specified and \p stream is associated with + * a device that has a zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess, + * the program makes a guarantee that it will only access the memory on the device + * from \p stream. It is illegal to attach singly to the NULL stream, because the + * NULL stream is a virtual global stream and not a specific stream. An error will + * be returned in this case. + * + * When memory is associated with a single stream, the Unified Memory system will + * allow CPU access to this memory region so long as all operations in \p stream + * have completed, regardless of whether other streams are active. In effect, + * this constrains exclusive ownership of the managed memory region by + * an active GPU to per-stream activity instead of whole-GPU activity. + * + * Accessing memory on the device from streams that are not associated with + * it will produce undefined results. No error checking is performed by the + * Unified Memory system to ensure that kernels launched into other streams + * do not access this region. + * + * It is a program's responsibility to order calls to ::cudaStreamAttachMemAsync + * via events, synchronization or other means to ensure legal access to memory + * at all times. Data visibility and coherency will be changed appropriately + * for all kernels which follow a stream-association change. + * + * If \p stream is destroyed while data is associated with it, the association is + * removed and the association reverts to the default visibility of the allocation + * as specified at ::cudaMallocManaged. For __managed__ variables, the default + * association is always ::cudaMemAttachGlobal. Note that destroying a stream is an + * asynchronous operation, and as a result, the change to default association won't + * happen until all work in the stream has completed. + * + * \param stream - Stream in which to enqueue the attach operation + * \param devPtr - Pointer to memory (must be a pointer to managed memory or + * to a valid host-accessible region of system-allocated + * memory) + * \param length - Length of memory (defaults to zero) + * \param flags - Must be one of ::cudaMemAttachGlobal, ::cudaMemAttachHost or ::cudaMemAttachSingle (defaults to ::cudaMemAttachSingle) + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy, ::cudaMallocManaged, + * ::cuStreamAttachMemAsync + */ +#if defined(__cplusplus) +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamAttachMemAsync(cudaStream_t stream, void *devPtr, size_t length __dv(0), unsigned int flags = cudaMemAttachSingle); +#else +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamAttachMemAsync(cudaStream_t stream, void *devPtr, size_t length __dv(0), unsigned int flags); +#endif + +/** + * \brief Begins graph capture on a stream + * + * Begin graph capture on \p stream. When a stream is in capture mode, all operations + * pushed into the stream will not be executed, but will instead be captured into + * a graph, which will be returned via ::cudaStreamEndCapture. Capture may not be initiated + * if \p stream is ::cudaStreamLegacy. Capture must be ended on the same stream in which + * it was initiated, and it may only be initiated if the stream is not already in capture + * mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id + * representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo. + * + * If \p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be + * called on this stream from the same thread. + * + * \note Kernels captured using this API must not use texture and surface references. + * Reading or writing through any texture or surface reference is undefined + * behavior. This restriction does not apply to texture and surface objects. + * + * \param stream - Stream in which to initiate capture + * \param mode - Controls the interaction of this capture sequence with other API + * calls that are potentially unsafe. For more details see + * ::cudaThreadExchangeStreamCaptureMode. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * + * \sa + * ::cudaStreamCreate, + * ::cudaStreamIsCapturing, + * ::cudaStreamEndCapture, + * ::cudaThreadExchangeStreamCaptureMode + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode); + +/** + * \brief Begins graph capture on a stream to an existing graph + * + * Begin graph capture on \p stream. When a stream is in capture mode, all operations + * pushed into the stream will not be executed, but will instead be captured into + * \p graph, which will be returned via ::cudaStreamEndCapture. + * + * Capture may not be initiated if \p stream is ::cudaStreamLegacy. Capture must be ended on the + * same stream in which it was initiated, and it may only be initiated if the stream is not + * already in capture mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id + * representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo. + * + * If \p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be + * called on this stream from the same thread. + * + * \note Kernels captured using this API must not use texture and surface references. + * Reading or writing through any texture or surface reference is undefined + * behavior. This restriction does not apply to texture and surface objects. + * + * \param stream - Stream in which to initiate capture. + * \param graph - Graph to capture into. + * \param dependencies - Dependencies of the first node captured in the stream. Can be NULL if numDependencies is 0. + * \param dependencyData - Optional array of data associated with each dependency. + * \param numDependencies - Number of dependencies. + * \param mode - Controls the interaction of this capture sequence with other API + * calls that are potentially unsafe. For more details see + * ::cudaThreadExchangeStreamCaptureMode. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * + * \sa + * ::cudaStreamCreate, + * ::cudaStreamIsCapturing, + * ::cudaStreamEndCapture, + * ::cudaThreadExchangeStreamCaptureMode + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t *dependencies, const cudaGraphEdgeData *dependencyData, size_t numDependencies, enum cudaStreamCaptureMode mode); + +/** + * \brief Swaps the stream capture interaction mode for a thread + * + * Sets the calling thread's stream capture interaction mode to the value contained + * in \p *mode, and overwrites \p *mode with the previous mode for the thread. To + * facilitate deterministic behavior across function or module boundaries, callers + * are encouraged to use this API in a push-pop fashion: \code + cudaStreamCaptureMode mode = desiredMode; + cudaThreadExchangeStreamCaptureMode(&mode); + ... + cudaThreadExchangeStreamCaptureMode(&mode); // restore previous mode + * \endcode + * + * During stream capture (see ::cudaStreamBeginCapture), some actions, such as a call + * to ::cudaMalloc, may be unsafe. In the case of ::cudaMalloc, the operation is + * not enqueued asynchronously to a stream, and is not observed by stream capture. + * Therefore, if the sequence of operations captured via ::cudaStreamBeginCapture + * depended on the allocation being replayed whenever the graph is launched, the + * captured graph would be invalid. + * + * Therefore, stream capture places restrictions on API calls that can be made within + * or concurrently to a ::cudaStreamBeginCapture-::cudaStreamEndCapture sequence. This + * behavior can be controlled via this API and flags to ::cudaStreamBeginCapture. + * + * A thread's mode is one of the following: + * - \p cudaStreamCaptureModeGlobal: This is the default mode. If the local thread has + * an ongoing capture sequence that was not initiated with + * \p cudaStreamCaptureModeRelaxed at \p cuStreamBeginCapture, or if any other thread + * has a concurrent capture sequence initiated with \p cudaStreamCaptureModeGlobal, + * this thread is prohibited from potentially unsafe API calls. + * - \p cudaStreamCaptureModeThreadLocal: If the local thread has an ongoing capture + * sequence not initiated with \p cudaStreamCaptureModeRelaxed, it is prohibited + * from potentially unsafe API calls. Concurrent capture sequences in other threads + * are ignored. + * - \p cudaStreamCaptureModeRelaxed: The local thread is not prohibited from potentially + * unsafe API calls. Note that the thread is still prohibited from API calls which + * necessarily conflict with stream capture, for example, attempting ::cudaEventQuery + * on an event that was last recorded inside a capture sequence. + * + * \param mode - Pointer to mode value to swap with the current mode + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * + * \sa + * ::cudaStreamBeginCapture + */ +extern __host__ cudaError_t CUDARTAPI cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *mode); + +/** + * \brief Ends capture on a stream, returning the captured graph + * + * End capture on \p stream, returning the captured graph via \p pGraph. + * Capture must have been initiated on \p stream via a call to ::cudaStreamBeginCapture. + * If capture was invalidated, due to a violation of the rules of stream capture, then + * a NULL graph will be returned. + * + * If the \p mode argument to ::cudaStreamBeginCapture was not + * ::cudaStreamCaptureModeRelaxed, this call must be from the same thread as + * ::cudaStreamBeginCapture. + * + * \param stream - Stream to query + * \param pGraph - The captured graph + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorStreamCaptureWrongThread + * \notefnerr + * + * \sa + * ::cudaStreamCreate, + * ::cudaStreamBeginCapture, + * ::cudaStreamIsCapturing, + * ::cudaGraphDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t *pGraph); + +/** + * \brief Returns a stream's capture status + * + * Return the capture status of \p stream via \p pCaptureStatus. After a successful + * call, \p *pCaptureStatus will contain one of the following: + * - ::cudaStreamCaptureStatusNone: The stream is not capturing. + * - ::cudaStreamCaptureStatusActive: The stream is capturing. + * - ::cudaStreamCaptureStatusInvalidated: The stream was capturing but an error + * has invalidated the capture sequence. The capture sequence must be terminated + * with ::cudaStreamEndCapture on the stream where it was initiated in order to + * continue using \p stream. + * + * Note that, if this is called on ::cudaStreamLegacy (the "null stream") while + * a blocking stream on the same device is capturing, it will return + * ::cudaErrorStreamCaptureImplicit and \p *pCaptureStatus is unspecified + * after the call. The blocking stream capture is not invalidated. + * + * When a blocking stream is capturing, the legacy stream is in an + * unusable state until the blocking stream capture is terminated. The legacy + * stream is not supported for stream capture, but attempted use would have an + * implicit dependency on the capturing stream(s). + * + * \param stream - Stream to query + * \param pCaptureStatus - Returns the stream's capture status + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorStreamCaptureImplicit + * \notefnerr + * + * \sa + * ::cudaStreamCreate, + * ::cudaStreamBeginCapture, + * ::cudaStreamEndCapture + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamIsCapturing(cudaStream_t stream, enum cudaStreamCaptureStatus *pCaptureStatus); + + +/** + * \brief Query a stream's capture state + * + * Query stream state related to stream capture. + * + * If called on ::cudaStreamLegacy (the "null stream") while a stream not created + * with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit. + * + * Valid data (other than capture status) is returned only if both of the following are true: + * - the call returns cudaSuccess + * - the returned capture status is ::cudaStreamCaptureStatusActive + * + * \param stream - The stream to query + * \param captureStatus_out - Location to return the capture status of the stream; required + * \param id_out - Optional location to return an id for the capture sequence, which is + * unique over the lifetime of the process + * \param graph_out - Optional location to return the graph being captured into. All + * operations other than destroy and node removal are permitted on the graph + * while the capture sequence is in progress. This API does not transfer + * ownership of the graph, which is transferred or destroyed at + * ::cudaStreamEndCapture. Note that the graph handle may be invalidated before + * end of capture for certain errors. Nodes that are or become + * unreachable from the original stream at ::cudaStreamEndCapture due to direct + * actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined. + * \param dependencies_out - Optional location to store a pointer to an array of nodes. + * The next node to be captured in the stream will depend on this set of nodes, + * absent operations such as event wait which modify this set. The array pointer + * is valid until the next API call which operates on the stream or until the + * capture is terminated. The node handles may be copied out and are valid until + * they or the graph is destroyed. The driver-owned array may also be passed + * directly to APIs that operate on the graph (not the stream) without copying. + * \param numDependencies_out - Optional location to store the size of the array + * returned in dependencies_out. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorStreamCaptureImplicit + * \note_graph_thread_safety + * \notefnerr + * + * \sa + * ::cudaStreamGetCaptureInfo_v3, + * ::cudaStreamBeginCapture, + * ::cudaStreamIsCapturing, + * ::cudaStreamUpdateCaptureDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo(cudaStream_t stream, enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out __dv(0), cudaGraph_t *graph_out __dv(0), const cudaGraphNode_t **dependencies_out __dv(0), size_t *numDependencies_out __dv(0)); + +/** + * \brief Query a stream's capture state (12.3+) + * + * Query stream state related to stream capture. + * + * If called on ::cudaStreamLegacy (the "null stream") while a stream not created + * with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit. + * + * Valid data (other than capture status) is returned only if both of the following are true: + * - the call returns cudaSuccess + * - the returned capture status is ::cudaStreamCaptureStatusActive + * + * If \p edgeData_out is non-NULL then \p dependencies_out must be as well. If + * \p dependencies_out is non-NULL and \p edgeData_out is NULL, but there is non-zero edge + * data for one or more of the current stream dependencies, the call will return + * ::cudaErrorLossyQuery. + * + * \param stream - The stream to query + * \param captureStatus_out - Location to return the capture status of the stream; required + * \param id_out - Optional location to return an id for the capture sequence, which is + * unique over the lifetime of the process + * \param graph_out - Optional location to return the graph being captured into. All + * operations other than destroy and node removal are permitted on the graph + * while the capture sequence is in progress. This API does not transfer + * ownership of the graph, which is transferred or destroyed at + * ::cudaStreamEndCapture. Note that the graph handle may be invalidated before + * end of capture for certain errors. Nodes that are or become + * unreachable from the original stream at ::cudaStreamEndCapture due to direct + * actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined. + * \param dependencies_out - Optional location to store a pointer to an array of nodes. + * The next node to be captured in the stream will depend on this set of nodes, + * absent operations such as event wait which modify this set. The array pointer + * is valid until the next API call which operates on the stream or until the + * capture is terminated. The node handles may be copied out and are valid until + * they or the graph is destroyed. The driver-owned array may also be passed + * directly to APIs that operate on the graph (not the stream) without copying. + * \param edgeData_out - Optional location to store a pointer to an array of graph edge + * data. This array parallels \c dependencies_out; the next node to be added + * has an edge to \c dependencies_out[i] with annotation \c edgeData_out[i] for + * each \c i. The array pointer is valid until the next API call which operates + * on the stream or until the capture is terminated. + * \param numDependencies_out - Optional location to store the size of the array + * returned in dependencies_out. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorStreamCaptureImplicit, + * ::cudaErrorLossyQuery + * \note_graph_thread_safety + * \notefnerr + * + * \sa + * ::cudaStreamBeginCapture, + * ::cudaStreamIsCapturing, + * ::cudaStreamUpdateCaptureDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo_v3(cudaStream_t stream, + enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out __dv(0), + cudaGraph_t *graph_out __dv(0), const cudaGraphNode_t **dependencies_out __dv(0), + const cudaGraphEdgeData **edgeData_out __dv(0), size_t *numDependencies_out __dv(0)); + +/** + * \brief Update the set of dependencies in a capturing stream (11.3+) + * + * Modifies the dependency set of a capturing stream. The dependency set is the set + * of nodes that the next captured node in the stream will depend on. + * + * Valid flags are ::cudaStreamAddCaptureDependencies and + * ::cudaStreamSetCaptureDependencies. These control whether the set passed to + * the API is added to the existing set or replaces it. A flags value of 0 defaults + * to ::cudaStreamAddCaptureDependencies. + * + * Nodes that are removed from the dependency set via this API do not result in + * ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at + * ::cudaStreamEndCapture. + * + * Returns ::cudaErrorIllegalState if the stream is not capturing. + * + * This API is new in CUDA 11.3. Developers requiring compatibility across minor + * versions of the CUDA driver to 11.0 should not use this API or provide a fallback. + * + * \param stream - The stream to update + * \param dependencies - The set of dependencies to add + * \param numDependencies - The size of the dependencies array + * \param flags - See above + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorIllegalState + * \notefnerr + * + * \sa + * ::cudaStreamBeginCapture, + * ::cudaStreamGetCaptureInfo, + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t *dependencies, size_t numDependencies, unsigned int flags __dv(0)); + +/** + * \brief Update the set of dependencies in a capturing stream (12.3+) + * + * Modifies the dependency set of a capturing stream. The dependency set is the set + * of nodes that the next captured node in the stream will depend on. + * + * Valid flags are ::cudaStreamAddCaptureDependencies and + * ::cudaStreamSetCaptureDependencies. These control whether the set passed to + * the API is added to the existing set or replaces it. A flags value of 0 defaults + * to ::cudaStreamAddCaptureDependencies. + * + * Nodes that are removed from the dependency set via this API do not result in + * ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at + * ::cudaStreamEndCapture. + * + * Returns ::cudaErrorIllegalState if the stream is not capturing. + * + * \param stream - The stream to update + * \param dependencies - The set of dependencies to add + * \param dependencyData - Optional array of data associated with each dependency. + * \param numDependencies - The size of the dependencies array + * \param flags - See above + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorIllegalState + * \notefnerr + * + * \sa + * ::cudaStreamBeginCapture, + * ::cudaStreamGetCaptureInfo, + */ +extern __host__ cudaError_t CUDARTAPI cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t *dependencies, const cudaGraphEdgeData *dependencyData, size_t numDependencies, unsigned int flags __dv(0)); +/** @} */ /* END CUDART_STREAM */ + +/** + * \defgroup CUDART_EVENT Event Management + * + * ___MANBRIEF___ event management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the event management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Creates an event object + * + * Creates an event object for the current device using ::cudaEventDefault. + * + * \param event - Newly created event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorLaunchFailure, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*, unsigned int) "cudaEventCreate (C++ API)", + * ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cudaStreamWaitEvent, + * ::cuEventCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaEventCreate(cudaEvent_t *event); + +/** + * \brief Creates an event object with the specified flags + * + * Creates an event object for the current device with the specified flags. Valid + * flags include: + * - ::cudaEventDefault: Default event creation flag. + * - ::cudaEventBlockingSync: Specifies that event should use blocking + * synchronization. A host thread that uses ::cudaEventSynchronize() to wait + * on an event created with this flag will block until the event actually + * completes. + * - ::cudaEventDisableTiming: Specifies that the created event does not need + * to record timing data. Events created with this flag specified and + * the ::cudaEventBlockingSync flag not specified will provide the best + * performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery(). + * - ::cudaEventInterprocess: Specifies that the created event may be used as an + * interprocess event by ::cudaIpcGetEventHandle(). ::cudaEventInterprocess must + * be specified along with ::cudaEventDisableTiming. + * + * \param event - Newly created event + * \param flags - Flags for new event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorLaunchFailure, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cudaStreamWaitEvent, + * ::cuEventCreate + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventCreateWithFlags(cudaEvent_t *event, unsigned int flags); + +/** + * \brief Records an event + * + * Captures in \p event the contents of \p stream at the time of this call. + * \p event and \p stream must be on the same CUDA context. + * Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then + * examine or wait for completion of the work that was captured. Uses of + * \p stream after this call do not modify \p event. See note on default + * stream behavior for what is captured in the default case. + * + * ::cudaEventRecord() can be called multiple times on the same event and + * will overwrite the previously captured state. Other APIs such as + * ::cudaStreamWaitEvent() use the most recently captured state at the time + * of the API call, and are not affected by later calls to + * ::cudaEventRecord(). Before the first call to ::cudaEventRecord(), an + * event represents an empty set of work, so for example ::cudaEventQuery() + * would return ::cudaSuccess. + * + * \param event - Event to record + * \param stream - Stream in which to record event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cudaStreamWaitEvent, + * ::cudaEventRecordWithFlags, + * ::cuEventRecord + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream __dv(0)); + +/** + * \brief Records an event + * + * Captures in \p event the contents of \p stream at the time of this call. + * \p event and \p stream must be on the same CUDA context. + * Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then + * examine or wait for completion of the work that was captured. Uses of + * \p stream after this call do not modify \p event. See note on default + * stream behavior for what is captured in the default case. + * + * ::cudaEventRecordWithFlags() can be called multiple times on the same event and + * will overwrite the previously captured state. Other APIs such as + * ::cudaStreamWaitEvent() use the most recently captured state at the time + * of the API call, and are not affected by later calls to + * ::cudaEventRecordWithFlags(). Before the first call to ::cudaEventRecordWithFlags(), an + * event represents an empty set of work, so for example ::cudaEventQuery() + * would return ::cudaSuccess. + * + * flags include: + * - ::cudaEventRecordDefault: Default event creation flag. + * - ::cudaEventRecordExternal: Event is captured in the graph as an external + * event node when performing stream capture. + * + * \param event - Event to record + * \param stream - Stream in which to record event + * \param flags - Parameters for the operation(See above) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cudaStreamWaitEvent, + * ::cudaEventRecord, + * ::cuEventRecord, + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream __dv(0), unsigned int flags __dv(0)); +#endif + +/** + * \brief Queries an event's status + * + * Queries the status of all work currently captured by \p event. See + * ::cudaEventRecord() for details on what is captured by an event. + * + * Returns ::cudaSuccess if all captured work has been completed, or + * ::cudaErrorNotReady if any captured work is incomplete. + * + * For the purposes of Unified Memory, a return value of ::cudaSuccess + * is equivalent to having called ::cudaEventSynchronize(). + * + * \param event - Event to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventRecord, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cuEventQuery + */ +extern __host__ cudaError_t CUDARTAPI cudaEventQuery(cudaEvent_t event); + +/** + * \brief Waits for an event to complete + * + * Waits until the completion of all work currently captured in \p event. + * See ::cudaEventRecord() for details on what is captured by an event. + * + * Waiting for an event that was created with the ::cudaEventBlockingSync + * flag will cause the calling CPU thread to block until the event has + * been completed by the device. If the ::cudaEventBlockingSync flag has + * not been set, then the CPU thread will busy-wait until the event has + * been completed by the device. + * + * \param event - Event to wait for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventRecord, + * ::cudaEventQuery, ::cudaEventDestroy, ::cudaEventElapsedTime, + * ::cuEventSynchronize + */ +extern __host__ cudaError_t CUDARTAPI cudaEventSynchronize(cudaEvent_t event); + +/** + * \brief Destroys an event object + * + * Destroys the event specified by \p event. + * + * An event may be destroyed before it is complete (i.e., while + * ::cudaEventQuery() would return ::cudaErrorNotReady). In this case, the + * call does not block on completion of the event, and any associated + * resources will automatically be released asynchronously at completion. + * + * \param event - Event to destroy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventRecord, ::cudaEventElapsedTime, + * ::cuEventDestroy + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventDestroy(cudaEvent_t event); + +/** + * \brief Computes the elapsed time between events + * + * Computes the elapsed time between two events (in milliseconds with a + * resolution of around 0.5 microseconds). + * + * If either event was last recorded in a non-NULL stream, the resulting time + * may be greater than expected (even if both used the same stream handle). This + * happens because the ::cudaEventRecord() operation takes place asynchronously + * and there is no guarantee that the measured latency is actually just between + * the two events. Any number of other different stream operations could execute + * in between the two measured events, thus altering the timing in a significant + * way. + * + * If ::cudaEventRecord() has not been called on either event, then + * ::cudaErrorInvalidResourceHandle is returned. If ::cudaEventRecord() has been + * called on both events but one or both of them has not yet been completed + * (that is, ::cudaEventQuery() would return ::cudaErrorNotReady on at least one + * of the events), ::cudaErrorNotReady is returned. If either event was created + * with the ::cudaEventDisableTiming flag, then this function will return + * ::cudaErrorInvalidResourceHandle. + * + * \param ms - Time between \p start and \p end in ms + * \param start - Starting event + * \param end - Ending event + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventRecord, + * ::cuEventElapsedTime + */ +extern __host__ cudaError_t CUDARTAPI cudaEventElapsedTime(float *ms, cudaEvent_t start, cudaEvent_t end); + +/** + * \brief Computes the elapsed time between events + * + * Computes the elapsed time between two events (in milliseconds with a + * resolution of around 0.5 microseconds). Note this API is not guaranteed + * to return the latest errors for pending work. As such this API is intended to + * serve as a elapsed time calculation only and polling for completion on the + * events to be compared should be done with ::cudaEventQuery instead. + * + * If either event was last recorded in a non-NULL stream, the resulting time + * may be greater than expected (even if both used the same stream handle). This + * happens because the ::cudaEventRecord() operation takes place asynchronously + * and there is no guarantee that the measured latency is actually just between + * the two events. Any number of other different stream operations could execute + * in between the two measured events, thus altering the timing in a significant + * way. + * + * If ::cudaEventRecord() has not been called on either event, then + * ::cudaErrorInvalidResourceHandle is returned. If ::cudaEventRecord() has been + * called on both events but one or both of them has not yet been completed + * (that is, ::cudaEventQuery() would return ::cudaErrorNotReady on at least one + * of the events), ::cudaErrorNotReady is returned. If either event was created + * with the ::cudaEventDisableTiming flag, then this function will return + * ::cudaErrorInvalidResourceHandle. + * + * \param ms - Time between \p start and \p end in ms + * \param start - Starting event + * \param end - Ending event + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotReady, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorLaunchFailure, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * \note_null_event + * + * \sa \ref ::cudaEventCreate(cudaEvent_t*) "cudaEventCreate (C API)", + * ::cudaEventCreateWithFlags, ::cudaEventQuery, + * ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventRecord, + * ::cuEventElapsedTime + */ +extern __host__ cudaError_t CUDARTAPI cudaEventElapsedTime_v2(float *ms, cudaEvent_t start, cudaEvent_t end); + +/** @} */ /* END CUDART_EVENT */ + +/** + * \defgroup CUDART_EXTRES_INTEROP External Resource Interoperability + * + * ___MANBRIEF___ External resource interoperability functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the external resource interoperability functions of the CUDA + * runtime application programming interface. + * + * @{ + */ + +/** + * \brief Imports an external memory object + * + * Imports an externally allocated memory object and returns + * a handle to that in \p extMem_out. + * + * The properties of the handle being imported must be described in + * \p memHandleDesc. The ::cudaExternalMemoryHandleDesc structure + * is defined as follows: + * + * \code + typedef struct cudaExternalMemoryHandleDesc_st { + cudaExternalMemoryHandleType type; + union { + int fd; + struct { + void *handle; + const void *name; + } win32; + const void *nvSciBufObject; + } handle; + unsigned long long size; + unsigned int flags; + } cudaExternalMemoryHandleDesc; + * \endcode + * + * where ::cudaExternalMemoryHandleDesc::type specifies the type + * of handle being imported. ::cudaExternalMemoryHandleType is + * defined as: + * + * \code + typedef enum cudaExternalMemoryHandleType_enum { + cudaExternalMemoryHandleTypeOpaqueFd = 1, + cudaExternalMemoryHandleTypeOpaqueWin32 = 2, + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, + cudaExternalMemoryHandleTypeD3D12Heap = 4, + cudaExternalMemoryHandleTypeD3D12Resource = 5, + cudaExternalMemoryHandleTypeD3D11Resource = 6, + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, + cudaExternalMemoryHandleTypeNvSciBuf = 8 + } cudaExternalMemoryHandleType; + * \endcode + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeOpaqueFd, then + * ::cudaExternalMemoryHandleDesc::handle::fd must be a valid + * file descriptor referencing a memory object. Ownership of + * the file descriptor is transferred to the CUDA driver when the + * handle is imported successfully. Performing any operations on the + * file descriptor after it is imported results in undefined behavior. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeOpaqueWin32, then exactly one + * of ::cudaExternalMemoryHandleDesc::handle::win32::handle and + * ::cudaExternalMemoryHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * references a memory object. Ownership of this handle is + * not transferred to CUDA after the import operation, so the + * application must release the handle using the appropriate system + * call. If ::cudaExternalMemoryHandleDesc::handle::win32::name + * is not NULL, then it must point to a NULL-terminated array of + * UTF-16 characters that refers to a memory object. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt, then + * ::cudaExternalMemoryHandleDesc::handle::win32::handle must + * be non-NULL and + * ::cudaExternalMemoryHandleDesc::handle::win32::name + * must be NULL. The handle specified must be a globally shared KMT + * handle. This handle does not hold a reference to the underlying + * object, and thus will be invalid when all references to the + * memory object are destroyed. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeD3D12Heap, then exactly one + * of ::cudaExternalMemoryHandleDesc::handle::win32::handle and + * ::cudaExternalMemoryHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * is returned by ID3D12Device::CreateSharedHandle when referring to a + * ID3D12Heap object. This handle holds a reference to the underlying + * object. If ::cudaExternalMemoryHandleDesc::handle::win32::name + * is not NULL, then it must point to a NULL-terminated array of + * UTF-16 characters that refers to a ID3D12Heap object. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeD3D12Resource, then exactly one + * of ::cudaExternalMemoryHandleDesc::handle::win32::handle and + * ::cudaExternalMemoryHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * is returned by ID3D12Device::CreateSharedHandle when referring to a + * ID3D12Resource object. This handle holds a reference to the + * underlying object. If + * ::cudaExternalMemoryHandleDesc::handle::win32::name + * is not NULL, then it must point to a NULL-terminated array of + * UTF-16 characters that refers to a ID3D12Resource object. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeD3D11Resource,then exactly one + * of ::cudaExternalMemoryHandleDesc::handle::win32::handle and + * ::cudaExternalMemoryHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle is + * not NULL, then it must represent a valid shared NT handle that is + * returned by IDXGIResource1::CreateSharedHandle when referring to a + * ID3D11Resource object. If + * ::cudaExternalMemoryHandleDesc::handle::win32::name + * is not NULL, then it must point to a NULL-terminated array of + * UTF-16 characters that refers to a ID3D11Resource object. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeD3D11ResourceKmt, then + * ::cudaExternalMemoryHandleDesc::handle::win32::handle must + * be non-NULL and ::cudaExternalMemoryHandleDesc::handle::win32::name + * must be NULL. The handle specified must be a valid shared KMT + * handle that is returned by IDXGIResource::GetSharedHandle when + * referring to a ID3D11Resource object. + * + * If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeNvSciBuf, then + * ::cudaExternalMemoryHandleDesc::handle::nvSciBufObject must be NON-NULL + * and reference a valid NvSciBuf object. + * If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the + * application must use ::cudaWaitExternalSemaphoresAsync or ::cudaSignalExternalSemaphoresAsync + * as approprriate barriers to maintain coherence between CUDA and the other drivers. + * See ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync and ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync + * for memory synchronization. + * + * The size of the memory object must be specified in + * ::cudaExternalMemoryHandleDesc::size. + * + * Specifying the flag ::cudaExternalMemoryDedicated in + * ::cudaExternalMemoryHandleDesc::flags indicates that the + * resource is a dedicated resource. The definition of what a + * dedicated resource is outside the scope of this extension. + * This flag must be set if ::cudaExternalMemoryHandleDesc::type + * is one of the following: + * ::cudaExternalMemoryHandleTypeD3D12Resource + * ::cudaExternalMemoryHandleTypeD3D11Resource + * ::cudaExternalMemoryHandleTypeD3D11ResourceKmt + * + * \param extMem_out - Returned handle to an external memory object + * \param memHandleDesc - Memory import handle descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorOperatingSystem + * \notefnerr + * \note_init_rt + * \note_callback + * + * \note If the Vulkan memory imported into CUDA is mapped on the CPU then the + * application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges + * as well as appropriate Vulkan pipeline barriers to maintain coherence between + * CPU and GPU. For more information on these APIs, please refer to "Synchronization + * and Cache Control" chapter from Vulkan specification. + * + * + * \sa ::cudaDestroyExternalMemory, + * ::cudaExternalMemoryGetMappedBuffer, + * ::cudaExternalMemoryGetMappedMipmappedArray + */ +extern __host__ cudaError_t CUDARTAPI cudaImportExternalMemory(cudaExternalMemory_t *extMem_out, const struct cudaExternalMemoryHandleDesc *memHandleDesc); + +/** + * \brief Maps a buffer onto an imported memory object + * + * Maps a buffer onto an imported memory object and returns a device + * pointer in \p devPtr. + * + * The properties of the buffer being mapped must be described in + * \p bufferDesc. The ::cudaExternalMemoryBufferDesc structure is + * defined as follows: + * + * \code + typedef struct cudaExternalMemoryBufferDesc_st { + unsigned long long offset; + unsigned long long size; + unsigned int flags; + } cudaExternalMemoryBufferDesc; + * \endcode + * + * where ::cudaExternalMemoryBufferDesc::offset is the offset in + * the memory object where the buffer's base address is. + * ::cudaExternalMemoryBufferDesc::size is the size of the buffer. + * ::cudaExternalMemoryBufferDesc::flags must be zero. + * + * The offset and size have to be suitably aligned to match the + * requirements of the external API. Mapping two buffers whose ranges + * overlap may or may not result in the same virtual address being + * returned for the overlapped portion. In such cases, the application + * must ensure that all accesses to that region from the GPU are + * volatile. Otherwise writes made via one address are not guaranteed + * to be visible via the other address, even if they're issued by the + * same thread. It is recommended that applications map the combined + * range instead of mapping separate buffers and then apply the + * appropriate offsets to the returned pointer to derive the + * individual buffers. + * + * The returned pointer \p devPtr must be freed using ::cudaFree. + * + * \param devPtr - Returned device pointer to buffer + * \param extMem - Handle to external memory object + * \param bufferDesc - Buffer descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaImportExternalMemory, + * ::cudaDestroyExternalMemory, + * ::cudaExternalMemoryGetMappedMipmappedArray + */ +extern __host__ cudaError_t CUDARTAPI cudaExternalMemoryGetMappedBuffer(void **devPtr, cudaExternalMemory_t extMem, const struct cudaExternalMemoryBufferDesc *bufferDesc); + +/** + * \brief Maps a CUDA mipmapped array onto an external memory object + * + * Maps a CUDA mipmapped array onto an external object and returns a + * handle to it in \p mipmap. + * + * The properties of the CUDA mipmapped array being mapped must be + * described in \p mipmapDesc. The structure + * ::cudaExternalMemoryMipmappedArrayDesc is defined as follows: + * + * \code + typedef struct cudaExternalMemoryMipmappedArrayDesc_st { + unsigned long long offset; + cudaChannelFormatDesc formatDesc; + cudaExtent extent; + unsigned int flags; + unsigned int numLevels; + } cudaExternalMemoryMipmappedArrayDesc; + * \endcode + * + * where ::cudaExternalMemoryMipmappedArrayDesc::offset is the + * offset in the memory object where the base level of the mipmap + * chain is. + * ::cudaExternalMemoryMipmappedArrayDesc::formatDesc describes the + * format of the data. + * ::cudaExternalMemoryMipmappedArrayDesc::extent specifies the + * dimensions of the base level of the mipmap chain. + * ::cudaExternalMemoryMipmappedArrayDesc::flags are flags associated + * with CUDA mipmapped arrays. For further details, please refer to + * the documentation for ::cudaMalloc3DArray. Note that if the mipmapped + * array is bound as a color target in the graphics API, then the flag + * ::cudaArrayColorAttachment must be specified in + * ::cudaExternalMemoryMipmappedArrayDesc::flags. + * ::cudaExternalMemoryMipmappedArrayDesc::numLevels specifies + * the total number of levels in the mipmap chain. + * + * The returned CUDA mipmapped array must be freed using ::cudaFreeMipmappedArray. + * + * \param mipmap - Returned CUDA mipmapped array + * \param extMem - Handle to external memory object + * \param mipmapDesc - CUDA array descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaImportExternalMemory, + * ::cudaDestroyExternalMemory, + * ::cudaExternalMemoryGetMappedBuffer + * + * \note If ::cudaExternalMemoryHandleDesc::type is + * ::cudaExternalMemoryHandleTypeNvSciBuf, then + * ::cudaExternalMemoryMipmappedArrayDesc::numLevels must not be greater than 1. + */ +extern __host__ cudaError_t CUDARTAPI cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t *mipmap, cudaExternalMemory_t extMem, const struct cudaExternalMemoryMipmappedArrayDesc *mipmapDesc); + +/** + * \brief Destroys an external memory object. + * + * Destroys the specified external memory object. Any existing buffers + * and CUDA mipmapped arrays mapped onto this object must no longer be + * used and must be explicitly freed using ::cudaFree and + * ::cudaFreeMipmappedArray respectively. + * + * \param extMem - External memory object to be destroyed + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa ::cudaImportExternalMemory, + * ::cudaExternalMemoryGetMappedBuffer, + * ::cudaExternalMemoryGetMappedMipmappedArray + */ +extern __host__ cudaError_t CUDARTAPI cudaDestroyExternalMemory(cudaExternalMemory_t extMem); + +/** + * \brief Imports an external semaphore + * + * Imports an externally allocated synchronization object and returns + * a handle to that in \p extSem_out. + * + * The properties of the handle being imported must be described in + * \p semHandleDesc. The ::cudaExternalSemaphoreHandleDesc is defined + * as follows: + * + * \code + typedef struct cudaExternalSemaphoreHandleDesc_st { + cudaExternalSemaphoreHandleType type; + union { + int fd; + struct { + void *handle; + const void *name; + } win32; + const void* NvSciSyncObj; + } handle; + unsigned int flags; + } cudaExternalSemaphoreHandleDesc; + * \endcode + * + * where ::cudaExternalSemaphoreHandleDesc::type specifies the type of + * handle being imported. ::cudaExternalSemaphoreHandleType is defined + * as: + * + * \code + typedef enum cudaExternalSemaphoreHandleType_enum { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10 + } cudaExternalSemaphoreHandleType; + * \endcode + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeOpaqueFd, then + * ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file + * descriptor referencing a synchronization object. Ownership of the + * file descriptor is transferred to the CUDA driver when the handle + * is imported successfully. Performing any operations on the file + * descriptor after it is imported results in undefined behavior. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32, then exactly one of + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * references a synchronization object. Ownership of this handle is + * not transferred to CUDA after the import operation, so the + * application must release the handle using the appropriate system + * call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is + * not NULL, then it must name a valid synchronization object. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, then + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be + * non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name + * must be NULL. The handle specified must be a globally shared KMT + * handle. This handle does not hold a reference to the underlying + * object, and thus will be invalid when all references to the + * synchronization object are destroyed. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeD3D12Fence, then exactly one of + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * is returned by ID3D12Device::CreateSharedHandle when referring to a + * ID3D12Fence object. This handle holds a reference to the underlying + * object. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name + * is not NULL, then it must name a valid synchronization object that + * refers to a valid ID3D12Fence object. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeD3D11Fence, then exactly one of + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * is returned by ID3D11Fence::CreateSharedHandle. If + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name + * is not NULL, then it must name a valid synchronization object that + * refers to a valid ID3D11Fence object. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeNvSciSync, then + * ::cudaExternalSemaphoreHandleDesc::handle::nvSciSyncObj + * represents a valid NvSciSyncObj. + * + * ::cudaExternalSemaphoreHandleTypeKeyedMutex, then exactly one of + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle + * is not NULL, then it represent a valid shared NT handle that + * is returned by IDXGIResource1::CreateSharedHandle when referring to + * a IDXGIKeyedMutex object. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be + * non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name + * must be NULL. The handle specified must represent a valid KMT + * handle that is returned by IDXGIResource::GetSharedHandle when + * referring to a IDXGIKeyedMutex object. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, then + * ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file + * descriptor referencing a synchronization object. Ownership of the + * file descriptor is transferred to the CUDA driver when the handle + * is imported successfully. Performing any operations on the file + * descriptor after it is imported results in undefined behavior. + * + * If ::cudaExternalSemaphoreHandleDesc::type is + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, then exactly one of + * ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and + * ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be + * NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle + * is not NULL, then it must represent a valid shared NT handle that + * references a synchronization object. Ownership of this handle is + * not transferred to CUDA after the import operation, so the + * application must release the handle using the appropriate system + * call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is + * not NULL, then it must name a valid synchronization object. + * + * \param extSem_out - Returned handle to an external semaphore + * \param semHandleDesc - Semaphore import handle descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorOperatingSystem + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDestroyExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaImportExternalSemaphore(cudaExternalSemaphore_t *extSem_out, const struct cudaExternalSemaphoreHandleDesc *semHandleDesc); + +/** + * \brief Signals a set of external semaphore objects + * + * Enqueues a signal operation on a set of externally allocated + * semaphore object in the specified stream. The operations will be + * executed when all prior operations in the stream complete. + * + * The exact semantics of signaling a semaphore depends on the type of + * the object. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeOpaqueFd, + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32, + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt + * then signaling the semaphore will set it to the signaled state. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeD3D12Fence, + * ::cudaExternalSemaphoreHandleTypeD3D11Fence, + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 + * then the semaphore will be set to the value specified in + * ::cudaExternalSemaphoreSignalParams::params::fence::value. + * + * If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync + * this API sets ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence to a + * value that can be used by subsequent waiters of the same NvSciSync object to + * order operations with those currently submitted in \p stream. Such an update + * will overwrite previous contents of + * ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence. By default, + * signaling such an external semaphore object causes appropriate memory synchronization + * operations to be performed over all the external memory objects that are imported as + * ::cudaExternalMemoryHandleTypeNvSciBuf. This ensures that any subsequent accesses + * made by other importers of the same set of NvSciBuf memory object(s) are coherent. + * These operations can be skipped by specifying the flag + * ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync, which can be used as a + * performance optimization when data coherency is not required. But specifying this + * flag in scenarios where data coherency is required results in undefined behavior. + * Also, for semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync, + * if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in + * ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrSignal, this API will return + * cudaErrorNotSupported. + * + * ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence associated with + * semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync can be + * deterministic. For this the NvSciSyncAttrList used to create the semaphore object + * must have value of NvSciSyncAttrKey_RequireDeterministicFences key set to true. + * Deterministic fences allow users to enqueue a wait over the semaphore object even + * before corresponding signal is enqueued. For such a semaphore object, CUDA guarantees + * that each signal operation will increment the fence value by '1'. Users are expected + * to track count of signals enqueued on the semaphore object and insert waits accordingly. + * When such a semaphore object is signaled from multiple streams, due to concurrent + * stream execution, it is possible that the order in which the semaphore gets signaled + * is indeterministic. This could lead to waiters of the semaphore getting unblocked + * incorrectly. Users are expected to handle such situations, either by not using the + * same semaphore object with deterministic fence support enabled in different streams + * or by adding explicit dependency amongst such streams so that the semaphore is + * signaled in order. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeKeyedMutex, + * ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, + * then the keyed mutex will be released with the key specified in + * ::cudaExternalSemaphoreSignalParams::params::keyedmutex::key. + * + * \param extSemArray - Set of external semaphores to be signaled + * \param paramsArray - Array of semaphore parameters + * \param numExtSems - Number of semaphores to signal + * \param stream - Stream to enqueue the signal operations in + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaImportExternalSemaphore, + * ::cudaDestroyExternalSemaphore, + * ::cudaWaitExternalSemaphoresAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreSignalParams *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + +/** + * \brief Waits on a set of external semaphore objects + * + * Enqueues a wait operation on a set of externally allocated + * semaphore object in the specified stream. The operations will be + * executed when all prior operations in the stream complete. + * + * The exact semantics of waiting on a semaphore depends on the type + * of the object. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeOpaqueFd, + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32, + * ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt + * then waiting on the semaphore will wait until the semaphore reaches + * the signaled state. The semaphore will then be reset to the + * unsignaled state. Therefore for every signal operation, there can + * only be one wait operation. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeD3D12Fence, + * ::cudaExternalSemaphoreHandleTypeD3D11Fence, + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, + * ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 + * then waiting on the semaphore will wait until the value of the + * semaphore is greater than or equal to + * ::cudaExternalSemaphoreWaitParams::params::fence::value. + * + * If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync + * then, waiting on the semaphore will wait until the + * ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence is signaled by the + * signaler of the NvSciSyncObj that was associated with this semaphore object. + * By default, waiting on such an external semaphore object causes appropriate + * memory synchronization operations to be performed over all external memory objects + * that are imported as ::cudaExternalMemoryHandleTypeNvSciBuf. This ensures that + * any subsequent accesses made by other importers of the same set of NvSciBuf memory + * object(s) are coherent. These operations can be skipped by specifying the flag + * ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync, which can be used as a + * performance optimization when data coherency is not required. But specifying this + * flag in scenarios where data coherency is required results in undefined behavior. + * Also, for semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync, + * if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in + * ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrWait, this API will return + * cudaErrorNotSupported. + * + * If the semaphore object is any one of the following types: + * ::cudaExternalSemaphoreHandleTypeKeyedMutex, + * ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, + * then the keyed mutex will be acquired when it is released with the key specified + * in ::cudaExternalSemaphoreSignalParams::params::keyedmutex::key or + * until the timeout specified by + * ::cudaExternalSemaphoreSignalParams::params::keyedmutex::timeoutMs + * has lapsed. The timeout interval can either be a finite value + * specified in milliseconds or an infinite value. In case an infinite + * value is specified the timeout never elapses. The windows INFINITE + * macro must be used to specify infinite timeout + * + * \param extSemArray - External semaphores to be waited on + * \param paramsArray - Array of semaphore parameters + * \param numExtSems - Number of semaphores to wait on + * \param stream - Stream to enqueue the wait operations in + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle + * ::cudaErrorTimeout + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaImportExternalSemaphore, + * ::cudaDestroyExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreWaitParams *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + +/** + * \brief Destroys an external semaphore + * + * Destroys an external semaphore object and releases any references + * to the underlying resource. Any outstanding signals or waits must + * have completed before the semaphore is destroyed. + * + * \param extSem - External semaphore to be destroyed + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa ::cudaImportExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem); + +/** @} */ /* END CUDART_EXTRES_INTEROP */ + +/** + * \defgroup CUDART_EXECUTION Execution Control + * + * ___MANBRIEF___ execution control functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the execution control functions of the CUDA runtime + * application programming interface. + * + * Some functions have overloaded C++ API template versions documented separately in the + * \ref CUDART_HIGHLEVEL "C++ API Routines" module. + * + * @{ + */ + +/** + * \brief Launches a device function + * + * The function invokes kernel \p func on \p gridDim (\p gridDim.x × \p gridDim.y + * × \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x × + * \p blockDim.y × \p blockDim.z) threads. + * + * If the kernel has N parameters the \p args should point to array of N pointers. + * Each pointer, from args[0] to args[N - 1], point to the region + * of memory from which the actual parameter will be copied. + * + * For templated functions, pass the function symbol as follows: + * func_name + * + * \p sharedMem sets the amount of dynamic shared memory that will be available to + * each thread block. + * + * \p stream specifies a stream the invocation is associated to. + * + * \param func - Device function symbol + * \param gridDim - Grid dimentions + * \param blockDim - Block dimentions + * \param args - Arguments + * \param sharedMem - Shared memory + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * \ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)", + * ::cuLaunchKernel + */ +extern __host__ cudaError_t CUDARTAPI cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream); + +/** + * \brief Launches a CUDA function with launch-time configuration + * + * Note that the functionally equivalent variadic template ::cudaLaunchKernelEx + * is available for C++11 and newer. + * + * Invokes the kernel \p func on \p config->gridDim (\p config->gridDim.x + * × \p config->gridDim.y × \p config->gridDim.z) grid of blocks. + * Each block contains \p config->blockDim (\p config->blockDim.x × + * \p config->blockDim.y × \p config->blockDim.z) threads. + * + * \p config->dynamicSmemBytes sets the amount of dynamic shared memory that + * will be available to each thread block. + * + * \p config->stream specifies a stream the invocation is associated to. + * + * Configuration beyond grid and block dimensions, dynamic shared memory size, + * and stream can be provided with the following two fields of \p config: + * + * \p config->attrs is an array of \p config->numAttrs contiguous + * ::cudaLaunchAttribute elements. The value of this pointer is not considered + * if \p config->numAttrs is zero. However, in that case, it is recommended to + * set the pointer to NULL. + * \p config->numAttrs is the number of attributes populating the first + * \p config->numAttrs positions of the \p config->attrs array. + * + * If the kernel has N parameters the \p args should point to array of N + * pointers. Each pointer, from args[0] to args[N - 1], point + * to the region of memory from which the actual parameter will be copied. + * + * N.B. This function is so named to avoid unintentionally invoking the + * templated version, \p cudaLaunchKernelEx, for kernels taking a single + * void** or void* parameter. + * + * \param config - Launch configuration + * \param func - Kernel to launch + * \param args - Array of pointers to kernel parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorJitCompilerNotFound, + * ::cudaErrorJitCompilationDisabled + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * \ref ::cudaLaunchKernelEx(const cudaLaunchConfig_t *config, void (*kernel)(ExpTypes...), ActTypes &&... args) "cudaLaunchKernelEx (C++ API)", + * ::cuLaunchKernelEx + */ +extern __host__ cudaError_t CUDARTAPI cudaLaunchKernelExC(const cudaLaunchConfig_t *config, const void *func, void **args); + +/** + * \brief Launches a device function where thread blocks can cooperate and synchronize as they execute + * + * The function invokes kernel \p func on \p gridDim (\p gridDim.x × \p gridDim.y + * × \p gridDim.z) grid of blocks. Each block contains \p blockDim (\p blockDim.x × + * \p blockDim.y × \p blockDim.z) threads. + * + * The device on which this kernel is invoked must have a non-zero value for + * the device attribute ::cudaDevAttrCooperativeLaunch. + * + * The total number of blocks launched cannot exceed the maximum number of blocks per + * multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or + * ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors + * as specified by the device attribute ::cudaDevAttrMultiProcessorCount. + * + * The kernel cannot make use of CUDA dynamic parallelism. + * + * If the kernel has N parameters the \p args should point to array of N pointers. + * Each pointer, from args[0] to args[N - 1], point to the region + * of memory from which the actual parameter will be copied. + * + * For templated functions, pass the function symbol as follows: + * func_name + * + * \p sharedMem sets the amount of dynamic shared memory that will be available to + * each thread block. + * + * \p stream specifies a stream the invocation is associated to. + * + * \param func - Device function symbol + * \param gridDim - Grid dimentions + * \param blockDim - Block dimentions + * \param args - Arguments + * \param sharedMem - Shared memory + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorCooperativeLaunchTooLarge, + * ::cudaErrorSharedObjectInitFailed + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * \ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchCooperativeKernel (C++ API)", + * ::cudaLaunchCooperativeKernelMultiDevice, + * ::cuLaunchCooperativeKernel + */ +extern __host__ cudaError_t CUDARTAPI cudaLaunchCooperativeKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream); + +/** + * \brief Launches device functions on multiple devices where thread blocks can cooperate and synchronize as they execute + * + * \deprecated This function is deprecated as of CUDA 11.3. + * + * Invokes kernels as specified in the \p launchParamsList array where each element + * of the array specifies all the parameters required to perform a single kernel launch. + * These kernels can cooperate and synchronize as they execute. The size of the array is + * specified by \p numDevices. + * + * No two kernels can be launched on the same device. All the devices targeted by this + * multi-device launch must be identical. All devices must have a non-zero value for the + * device attribute ::cudaDevAttrCooperativeMultiDeviceLaunch. + * + * The same kernel must be launched on all devices. Note that any __device__ or __constant__ + * variables are independently instantiated on every device. It is the application's + * responsiblity to ensure these variables are initialized and used appropriately. + * + * The size of the grids as specified in blocks, the size of the blocks themselves and the + * amount of shared memory used by each thread block must also match across all launched kernels. + * + * The streams used to launch these kernels must have been created via either ::cudaStreamCreate + * or ::cudaStreamCreateWithPriority or ::cudaStreamCreateWithPriority. The NULL stream or + * ::cudaStreamLegacy or ::cudaStreamPerThread cannot be used. + * + * The total number of blocks launched per kernel cannot exceed the maximum number of blocks + * per multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or + * ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors + * as specified by the device attribute ::cudaDevAttrMultiProcessorCount. Since the + * total number of blocks launched per device has to match across all devices, the maximum + * number of blocks that can be launched per device will be limited by the device with the + * least number of multiprocessors. + * + * The kernel cannot make use of CUDA dynamic parallelism. + * + * The ::cudaLaunchParams structure is defined as: + * \code + struct cudaLaunchParams + { + void *func; + dim3 gridDim; + dim3 blockDim; + void **args; + size_t sharedMem; + cudaStream_t stream; + }; + * \endcode + * where: + * - ::cudaLaunchParams::func specifies the kernel to be launched. This same functions must + * be launched on all devices. For templated functions, pass the function symbol as follows: + * func_name + * - ::cudaLaunchParams::gridDim specifies the width, height and depth of the grid in blocks. + * This must match across all kernels launched. + * - ::cudaLaunchParams::blockDim is the width, height and depth of each thread block. This + * must match across all kernels launched. + * - ::cudaLaunchParams::args specifies the arguments to the kernel. If the kernel has + * N parameters then ::cudaLaunchParams::args should point to array of N pointers. Each + * pointer, from ::cudaLaunchParams::args[0] to ::cudaLaunchParams::args[N - 1], + * point to the region of memory from which the actual parameter will be copied. + * - ::cudaLaunchParams::sharedMem is the dynamic shared-memory size per thread block in bytes. + * This must match across all kernels launched. + * - ::cudaLaunchParams::stream is the handle to the stream to perform the launch in. This cannot + * be the NULL stream or ::cudaStreamLegacy or ::cudaStreamPerThread. + * + * By default, the kernel won't begin execution on any GPU until all prior work in all the specified + * streams has completed. This behavior can be overridden by specifying the flag + * ::cudaCooperativeLaunchMultiDeviceNoPreSync. When this flag is specified, each kernel + * will only wait for prior work in the stream corresponding to that GPU to complete before it begins + * execution. + * + * Similarly, by default, any subsequent work pushed in any of the specified streams will not begin + * execution until the kernels on all GPUs have completed. This behavior can be overridden by specifying + * the flag ::cudaCooperativeLaunchMultiDeviceNoPostSync. When this flag is specified, + * any subsequent work pushed in any of the specified streams will only wait for the kernel launched + * on the GPU corresponding to that stream to complete before it begins execution. + * + * \param launchParamsList - List of launch parameters, one per device + * \param numDevices - Size of the \p launchParamsList array + * \param flags - Flags to control launch behavior + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidConfiguration, + * ::cudaErrorLaunchFailure, + * ::cudaErrorLaunchTimeout, + * ::cudaErrorLaunchOutOfResources, + * ::cudaErrorCooperativeLaunchTooLarge, + * ::cudaErrorSharedObjectInitFailed + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchCooperativeKernel (C++ API)", + * ::cudaLaunchCooperativeKernel, + * ::cuLaunchCooperativeKernelMultiDevice + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaLaunchCooperativeKernelMultiDevice(struct cudaLaunchParams *launchParamsList, unsigned int numDevices, unsigned int flags __dv(0)); + +/** + * \brief Sets the preferred cache configuration for a device function + * + * On devices where the L1 cache and shared memory use the same hardware + * resources, this sets through \p cacheConfig the preferred cache configuration + * for the function specified via \p func. This is only a preference. The + * runtime will use the requested configuration if possible, but it is free to + * choose a different configuration if required to execute \p func. + * + * \p func is a device function symbol and must be declared as a + * \c __global__ function. If the specified function does not exist, + * then ::cudaErrorInvalidDeviceFunction is returned. For templated functions, + * pass the function symbol as follows: func_name + * + * This setting does nothing on devices where the size of the L1 cache and + * shared memory are fixed. + * + * Launching a kernel with a different preference than the most recent + * preference setting may insert a device-side synchronization point. + * + * The supported cache configurations are: + * - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default) + * - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache + * - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory + * - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory + * + * \param func - Device function symbol + * \param cacheConfig - Requested cache configuration + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_string_api_deprecation2 + * \note_init_rt + * \note_callback + * + * \note This API does not accept a ::cudaKernel_t casted as void*. If cache config modification + * is required for a ::cudaKernel_t (or a __global__ function), it can be replaced with a call to + * ::cudaFuncSetAttributes with the attribute ::cudaFuncAttributePreferredSharedMemoryCarveout + * to specify a more granular L1 cache and shared memory split configuration. + * + * \sa + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + * \ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C API)", + * ::cuFuncSetCacheConfig + */ +extern __host__ cudaError_t CUDARTAPI cudaFuncSetCacheConfig(const void *func, enum cudaFuncCache cacheConfig); + +/** + * \brief Find out attributes for a given function + * + * This function obtains the attributes of a function specified via \p func. + * \p func is a device function symbol and must be declared as a + * \c __global__ function. The fetched attributes are placed in \p attr. + * If the specified function does not exist, then it is assumed to + * be a ::cudaKernel_t and used as is. + * For templated functions, pass the function symbol as follows: + * func_name + * + * Note that some function attributes such as + * \ref ::cudaFuncAttributes::maxThreadsPerBlock "maxThreadsPerBlock" + * may vary based on the device that is currently being used. + * + * \param attr - Return pointer to function's attributes + * \param func - Device function symbol + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_string_api_deprecation2 + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) "cudaFuncGetAttributes (C++ API)", + * \ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C API)", + * ::cuFuncGetAttribute + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetAttributes(struct cudaFuncAttributes *attr, const void *func); + + +/** + * \brief Set attributes for a given function + * + * This function sets the attributes of a function specified via \p func. + * The parameter \p func must be a pointer to a function that executes + * on the device. The parameter specified by \p func must be declared as a \p __global__ + * function. The enumeration defined by \p attr is set to the value defined by \p value. + * If the specified function does not exist, then it is assumed to + * be a ::cudaKernel_t and used as is. + * If the specified attribute cannot be written, or if the value is incorrect, + * then ::cudaErrorInvalidValue is returned. + * + * Valid values for \p attr are: + * - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes + * cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture. + * - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources, + * this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor. + * This is only a hint, and the driver can choose a different ratio if required to execute the function. + * - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the + * function can be launched with non-portable cluster size. 1 is allowed, 0 is + * disallowed. + * - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block + * scheduling policy of a function. The value type is cudaClusterSchedulingPolicy. + * + * \param func - Function to get attributes of + * \param attr - Attribute to set + * \param value - Value to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) "cudaLaunchKernel (C++ API)", + * \ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C++ API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncSetAttribute(const void *func, enum cudaFuncAttribute attr, int value); + +/** + * \brief Returns the function name for a device entry function pointer. + * + * Returns in \p **name the function name associated with the symbol \p func . + * The function name is returned as a null-terminated string. This API may + * return a mangled name if the function is not declared as having C linkage. + * If \p **name is NULL, ::cudaErrorInvalidValue is returned. + * If \p func is not a device entry function, then it is assumed to + * be a ::cudaKernel_t and used as is. + * + * \param name - The returned name of the function + * \param func - The function pointer to retrieve name for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \ref ::cudaFuncGetName(const char **name, const T *func) "cudaFuncGetName (C++ API)" + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetName(const char **name, const void *func); + +/** + * \brief Returns the offset and size of a kernel parameter in the device-side parameter layout. + * + * Queries the kernel parameter at \p paramIndex in \p func's list of parameters and returns + * parameter information via \p paramOffset and \p paramSize. \p paramOffset returns the + * offset of the parameter in the device-side parameter layout. \p paramSize returns the size + * in bytes of the parameter. This information can be used to update kernel node parameters + * from the device via ::cudaGraphKernelNodeSetParam() and ::cudaGraphKernelNodeUpdatesApply(). + * \p paramIndex must be less than the number of parameters that \p func takes. + * + * \param func - The function to query + * \param paramIndex - The parameter index to query + * \param paramOffset - The offset into the device-side parameter layout at which the parameter resides + * \param paramSize - The size of the parameter in the device-side parameter layout + * + * \return + * ::CUDA_SUCCESS, + * ::CUDA_ERROR_INVALID_VALUE, + * \notefnerr + * \note_cudaKernel_t + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncGetParamInfo(const void *func, size_t paramIndex, size_t *paramOffset, size_t *paramSize); + +/** + * \brief Converts a double argument to be executed on a device + * + * \param d - Double to convert + * + * \deprecated This function is deprecated as of CUDA 7.5 + * + * Converts the double value of \p d to an internal float representation if + * the device does not support double arithmetic. If the device does natively + * support doubles, then this function does nothing. + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + * ::cudaSetDoubleForHost + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaSetDoubleForDevice(double *d); + +/** + * \brief Converts a double argument after execution on a device + * + * \deprecated This function is deprecated as of CUDA 7.5 + * + * Converts the double value of \p d from a potentially internal float + * representation if the device does not support double arithmetic. If the + * device does natively support doubles, then this function does nothing. + * + * \param d - Double to convert + * + * \return + * ::cudaSuccess + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) "cudaFuncSetCacheConfig (C API)", + * \ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) "cudaFuncGetAttributes (C API)", + * ::cudaSetDoubleForDevice + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaSetDoubleForHost(double *d); + +/** + * \brief Enqueues a host function call in a stream + * + * Enqueues a host function to run in a stream. The function will be called + * after currently enqueued work and will block work added after it. + * + * The host function must not make any CUDA API calls. Attempting to use a + * CUDA API may result in ::cudaErrorNotPermitted, but this is not required. + * The host function must not perform any synchronization that may depend on + * outstanding CUDA work not mandated to run earlier. Host functions without a + * mandated order (such as in independent streams) execute in undefined order + * and may be serialized. + * + * For the purposes of Unified Memory, execution makes a number of guarantees: + *
    + *
  • The stream is considered idle for the duration of the function's + * execution. Thus, for example, the function may always use memory attached + * to the stream it was enqueued in.
  • + *
  • The start of execution of the function has the same effect as + * synchronizing an event recorded in the same stream immediately prior to + * the function. It thus synchronizes streams which have been "joined" + * prior to the function.
  • + *
  • Adding device work to any stream does not have the effect of making + * the stream active until all preceding host functions and stream callbacks + * have executed. Thus, for + * example, a function might use global attached memory even if work has + * been added to another stream, if the work has been ordered behind the + * function call with an event.
  • + *
  • Completion of the function does not cause a stream to become + * active except as described above. The stream will remain idle + * if no device work follows the function, and will remain idle across + * consecutive host functions or stream callbacks without device work in + * between. Thus, for example, + * stream synchronization can be done by signaling from a host function at the + * end of the stream.
  • + *
+ * + * Note that, in constrast to ::cuStreamAddCallback, the function will not be + * called in the event of an error in the CUDA context. + * + * \param hStream - Stream to enqueue function call in + * \param fn - The function to call once preceding stream operations are complete + * \param userData - User-specified data to be passed to the function + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaStreamCreate, + * ::cudaStreamQuery, + * ::cudaStreamSynchronize, + * ::cudaStreamWaitEvent, + * ::cudaStreamDestroy, + * ::cudaMallocManaged, + * ::cudaStreamAttachMemAsync, + * ::cudaStreamAddCallback, + * ::cuLaunchHostFunc + */ +extern __host__ cudaError_t CUDARTAPI cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void *userData); + +/** @} */ /* END CUDART_EXECUTION */ + +/** + * \defgroup CUDART_EXECUTION_DEPRECATED Execution Control [DEPRECATED] + * + * ___MANBRIEF___ deprecated execution control functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the deprecated execution control functions of the CUDA runtime + * application programming interface. + * + * Some functions have overloaded C++ API template versions documented separately in the + * \ref CUDART_HIGHLEVEL "C++ API Routines" module. + * + * @{ + */ + +/** + * \brief Sets the shared memory configuration for a device function + * + * \deprecated + * + * On devices with configurable shared memory banks, this function will + * force all subsequent launches of the specified device function to have + * the given shared memory bank size configuration. On any given launch of the + * function, the shared memory configuration of the device will be temporarily + * changed if needed to suit the function's preferred configuration. Changes in + * shared memory configuration between subsequent launches of functions, + * may introduce a device side synchronization point. + * + * Any per-function setting of shared memory bank size set via + * ::cudaFuncSetSharedMemConfig will override the device wide setting set by + * ::cudaDeviceSetSharedMemConfig. + * + * Changing the shared memory bank size will not increase shared memory usage + * or affect occupancy of kernels, but may have major effects on performance. + * Larger bank sizes will allow for greater potential bandwidth to shared memory, + * but will change what kinds of accesses to shared memory will result in bank + * conflicts. + * + * This function will do nothing on devices with fixed shared memory bank size. + * + * For templated functions, pass the function symbol as follows: + * func_name + * + * The supported bank configurations are: + * - ::cudaSharedMemBankSizeDefault: use the device's shared memory configuration + * when launching this function. + * - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be + * four bytes natively when launching this function. + * - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight + * bytes natively when launching this function. + * + * \param func - Device function symbol + * \param config - Requested shared memory configuration + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_string_api_deprecation2 + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceSetSharedMemConfig, + * ::cudaDeviceGetSharedMemConfig, + * ::cudaDeviceSetCacheConfig, + * ::cudaDeviceGetCacheConfig, + * ::cudaFuncSetCacheConfig, + * ::cuFuncSetSharedMemConfig + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaFuncSetSharedMemConfig(const void *func, enum cudaSharedMemConfig config); +/** @} */ /* END CUDART_EXECUTION_DEPRECATED */ + +/** + * \defgroup CUDART_OCCUPANCY Occupancy + * + * ___MANBRIEF___ occupancy calculation functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the occupancy calculation functions of the CUDA runtime + * application programming interface. + * + * Besides the occupancy calculator functions + * (\ref ::cudaOccupancyMaxActiveBlocksPerMultiprocessor and \ref ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), + * there are also C++ only occupancy-based launch configuration functions documented in + * \ref CUDART_HIGHLEVEL "C++ API Routines" module. + * + * See + * \ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) "cudaOccupancyMaxPotentialBlockSize (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) "cudaOccupancyMaxPotentialBlockSize (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) "cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)" + * \ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) "cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)", + * + * @{ + */ + +/** + * \brief Returns occupancy for a device function + * + * Returns in \p *numBlocks the maximum number of active blocks per + * streaming multiprocessor for the device function. + * + * \param numBlocks - Returned occupancy + * \param func - Kernel function for which occupancy is calculated + * \param blockSize - Block size the kernel is intended to be launched with + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, + * \ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) "cudaOccupancyMaxPotentialBlockSize (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) "cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)", + * \ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) "cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)", + * ::cuOccupancyMaxActiveBlocksPerMultiprocessor + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *numBlocks, const void *func, int blockSize, size_t dynamicSMemSize); + +/** + * \brief Returns dynamic shared memory available per block when launching \p numBlocks blocks on SM. + * + * Returns in \p *dynamicSmemSize the maximum size of dynamic shared memory to allow \p numBlocks blocks per SM. + * + * \param dynamicSmemSize - Returned maximum dynamic shared memory + * \param func - Kernel function for which occupancy is calculated + * \param numBlocks - Number of blocks to fit on SM + * \param blockSize - Size of the block + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, + * \ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) "cudaOccupancyMaxPotentialBlockSize (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) "cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)", + * ::cudaOccupancyAvailableDynamicSMemPerBlock + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyAvailableDynamicSMemPerBlock(size_t *dynamicSmemSize, const void *func, int numBlocks, int blockSize); + +/** + * \brief Returns occupancy for a device function with the specified flags + * + * Returns in \p *numBlocks the maximum number of active blocks per + * streaming multiprocessor for the device function. + * + * The \p flags parameter controls how special cases are handled. Valid flags include: + * + * - ::cudaOccupancyDefault: keeps the default behavior as + * ::cudaOccupancyMaxActiveBlocksPerMultiprocessor + * + * - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior + * on platform where global caching affects occupancy. On such platforms, if caching + * is enabled, but per-block SM resource usage would result in zero occupancy, the + * occupancy calculator will calculate the occupancy as if caching is disabled. + * Setting this flag makes the occupancy calculator to return 0 in such cases. + * More information can be found about this feature in the "Unified L1/Texture Cache" + * section of the Maxwell tuning guide. + * + * \param numBlocks - Returned occupancy + * \param func - Kernel function for which occupancy is calculated + * \param blockSize - Block size the kernel is intended to be launched with + * \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes + * \param flags - Requested behavior for the occupancy calculator + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor, + * \ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) "cudaOccupancyMaxPotentialBlockSize (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) "cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)", + * \ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) "cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)", + * \ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) "cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)", + * ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *numBlocks, const void *func, int blockSize, size_t dynamicSMemSize, unsigned int flags); + +/** + * \brief Given the kernel function (\p func) and launch configuration + * (\p config), return the maximum cluster size in \p *clusterSize. + * + * The cluster dimensions in \p config are ignored. If func has a required + * cluster size set (see ::cudaFuncGetAttributes),\p *clusterSize will reflect + * the required cluster size. + * + * By default this function will always return a value that's portable on + * future hardware. A higher value may be returned if the kernel function + * allows non-portable cluster sizes. + * + * This function will respect the compile time launch bounds. + * + * \param clusterSize - Returned maximum cluster size that can be launched + * for the given kernel function and launch configuration + * \param func - Kernel function for which maximum cluster + * size is calculated + * \param config - Launch configuration for the given kernel function + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa ::cudaFuncGetAttributes + * \ref ::cudaOccupancyMaxPotentialClusterSize(int*, T, const cudaLaunchConfig_t*) "cudaOccupancyMaxPotentialClusterSize (C++ API)", + * ::cuOccupancyMaxPotentialClusterSize + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxPotentialClusterSize(int *clusterSize, const void *func, const cudaLaunchConfig_t *launchConfig); + + +/** + * \brief Given the kernel function (\p func) and launch configuration + * (\p config), return the maximum number of clusters that could co-exist + * on the target device in \p *numClusters. + * + * If the function has required cluster size already set (see + * ::cudaFuncGetAttributes), the cluster size from config must either be + * unspecified or match the required size. + * Without required sizes, the cluster size must be specified in config, + * else the function will return an error. + * + * Note that various attributes of the kernel function may affect occupancy + * calculation. Runtime environment may affect how the hardware schedules + * the clusters, so the calculated occupancy is not guaranteed to be achievable. + * + * \param numClusters - Returned maximum number of clusters that + * could co-exist on the target device + * \param func - Kernel function for which maximum number + * of clusters are calculated + * \param config - Launch configuration for the given kernel function + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidClusterSize, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaFuncGetAttributes + * \ref ::cudaOccupancyMaxActiveClusters(int*, T, const cudaLaunchConfig_t*) "cudaOccupancyMaxActiveClusters (C++ API)", + * ::cuOccupancyMaxActiveClusters + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaOccupancyMaxActiveClusters(int *numClusters, const void *func, const cudaLaunchConfig_t *launchConfig); +/** @} */ /* END CUDA_OCCUPANCY */ + +/** + * \defgroup CUDART_MEMORY Memory Management + * + * ___MANBRIEF___ memory management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the memory management functions of the CUDA runtime + * application programming interface. + * + * Some functions have overloaded C++ API template versions documented separately in the + * \ref CUDART_HIGHLEVEL "C++ API Routines" module. + * + * @{ + */ + +/** + * \brief Allocates memory that will be automatically managed by the Unified Memory system + * + * Allocates \p size bytes of managed memory on the device and returns in + * \p *devPtr a pointer to the allocated memory. If the device doesn't support + * allocating managed memory, ::cudaErrorNotSupported is returned. Support + * for managed memory can be queried using the device attribute + * ::cudaDevAttrManagedMemory. The allocated memory is suitably + * aligned for any kind of variable. The memory is not cleared. If \p size + * is 0, ::cudaMallocManaged returns ::cudaErrorInvalidValue. The pointer + * is valid on the CPU and on all GPUs in the system that support managed memory. + * All accesses to this pointer must obey the Unified Memory programming model. + * + * \p flags specifies the default stream association for this allocation. + * \p flags must be one of ::cudaMemAttachGlobal or ::cudaMemAttachHost. The + * default value for \p flags is ::cudaMemAttachGlobal. + * If ::cudaMemAttachGlobal is specified, then this memory is accessible from + * any stream on any device. If ::cudaMemAttachHost is specified, then the + * allocation should not be accessed from devices that have a zero value for the + * device attribute ::cudaDevAttrConcurrentManagedAccess; an explicit call to + * ::cudaStreamAttachMemAsync will be required to enable access on such devices. + * + * If the association is later changed via ::cudaStreamAttachMemAsync to + * a single stream, the default association, as specifed during ::cudaMallocManaged, + * is restored when that stream is destroyed. For __managed__ variables, the + * default association is always ::cudaMemAttachGlobal. Note that destroying a + * stream is an asynchronous operation, and as a result, the change to default + * association won't happen until all work in the stream has completed. + * + * Memory allocated with ::cudaMallocManaged should be released with ::cudaFree. + * + * Device memory oversubscription is possible for GPUs that have a non-zero value for the + * device attribute ::cudaDevAttrConcurrentManagedAccess. Managed memory on + * such GPUs may be evicted from device memory to host memory at any time by the Unified + * Memory driver in order to make room for other allocations. + * + * In a system where all GPUs have a non-zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess, managed memory may not be populated when this + * API returns and instead may be populated on access. In such systems, managed memory can + * migrate to any processor's memory at any time. The Unified Memory driver will employ heuristics to + * maintain data locality and prevent excessive page faults to the extent possible. The application + * can also guide the driver about memory usage patterns via ::cudaMemAdvise. The application + * can also explicitly migrate memory to a desired processor's memory via + * ::cudaMemPrefetchAsync. + * + * In a multi-GPU system where all of the GPUs have a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess and all the GPUs have peer-to-peer support + * with each other, the physical storage for managed memory is created on the GPU which is active + * at the time ::cudaMallocManaged is called. All other GPUs will reference the data at reduced + * bandwidth via peer mappings over the PCIe bus. The Unified Memory driver does not migrate + * memory among such GPUs. + * + * In a multi-GPU system where not all GPUs have peer-to-peer support with each other and + * where the value of the device attribute ::cudaDevAttrConcurrentManagedAccess + * is zero for at least one of those GPUs, the location chosen for physical storage of managed + * memory is system-dependent. + * - On Linux, the location chosen will be device memory as long as the current set of active + * contexts are on devices that either have peer-to-peer support with each other or have a + * non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * If there is an active context on a GPU that does not have a non-zero value for that device + * attribute and it does not have peer-to-peer support with the other devices that have active + * contexts on them, then the location for physical storage will be 'zero-copy' or host memory. + * Note that this means that managed memory that is located in device memory is migrated to + * host memory if a new context is created on a GPU that doesn't have a non-zero value for + * the device attribute and does not support peer-to-peer with at least one of the other devices + * that has an active context. This in turn implies that context creation may fail if there is + * insufficient host memory to migrate all managed allocations. + * - On Windows, the physical storage is always created in 'zero-copy' or host memory. + * All GPUs will reference the data at reduced bandwidth over the PCIe bus. In these + * circumstances, use of the environment variable CUDA_VISIBLE_DEVICES is recommended to + * restrict CUDA to only use those GPUs that have peer-to-peer support. + * Alternatively, users can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero + * value to force the driver to always use device memory for physical storage. + * When this environment variable is set to a non-zero value, all devices used in + * that process that support managed memory have to be peer-to-peer compatible + * with each other. The error ::cudaErrorInvalidDevice will be returned if a device + * that supports managed memory is used and it is not peer-to-peer compatible with + * any of the other managed memory supporting devices that were previously used in + * that process, even if ::cudaDeviceReset has been called on those devices. These + * environment variables are described in the CUDA programming guide under the + * "CUDA environment variables" section. + * + * \param devPtr - Pointer to allocated device memory + * \param size - Requested allocation size in bytes + * \param flags - Must be either ::cudaMemAttachGlobal or ::cudaMemAttachHost (defaults to ::cudaMemAttachGlobal) + * + * \return + * ::cudaSuccess, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, + * ::cudaMalloc3D, ::cudaMalloc3DArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, ::cudaDeviceGetAttribute, ::cudaStreamAttachMemAsync, + * ::cuMemAllocManaged + */ +#if defined(__cplusplus) +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMallocManaged(void **devPtr, size_t size, unsigned int flags = cudaMemAttachGlobal); +#else +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMallocManaged(void **devPtr, size_t size, unsigned int flags); +#endif + +/** + * \brief Allocate memory on the device + * + * Allocates \p size bytes of linear memory on the device and returns in + * \p *devPtr a pointer to the allocated memory. The allocated memory is + * suitably aligned for any kind of variable. The memory is not cleared. + * ::cudaMalloc() returns ::cudaErrorMemoryAllocation in case of failure. + * + * The device version of ::cudaFree cannot be used with a \p *devPtr + * allocated using the host API, and vice versa. + * + * \param devPtr - Pointer to allocated device memory + * \param size - Requested allocation size in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, + * ::cudaMalloc3D, ::cudaMalloc3DArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::cuMemAlloc + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size); + +/** + * \brief Allocates page-locked memory on the host + * + * Allocates \p size bytes of host memory that is page-locked and accessible + * to the device. The driver tracks the virtual memory ranges allocated with + * this function and automatically accelerates calls to functions such as + * ::cudaMemcpy*(). Since the memory can be accessed directly by the device, + * it can be read or written with much higher bandwidth than pageable memory + * obtained with functions such as ::malloc(). + + * On systems where ::pageableMemoryAccessUsesHostPageTables + * is true, ::cudaMallocHost may not page-lock the allocated memory. + + * Page-locking excessive amounts of memory with ::cudaMallocHost() may degrade + * system performance, since it reduces the amount of memory available to the + * system for paging. As a result, this function is best used sparingly to allocate + * staging areas for data exchange between host and device. + * + * \param ptr - Pointer to allocated host memory + * \param size - Requested allocation size in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaMalloc3D, + * ::cudaMalloc3DArray, ::cudaHostAlloc, ::cudaFree, ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t, unsigned int) "cudaMallocHost (C++ API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::cuMemAllocHost + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocHost(void **ptr, size_t size); + +/** + * \brief Allocates pitched memory on the device + * + * Allocates at least \p width (in bytes) * \p height bytes of linear memory + * on the device and returns in \p *devPtr a pointer to the allocated memory. + * The function may pad the allocation to ensure that corresponding pointers + * in any given row will continue to meet the alignment requirements for + * coalescing as the address is updated from row to row. The pitch returned in + * \p *pitch by ::cudaMallocPitch() is the width in bytes of the allocation. + * The intended usage of \p pitch is as a separate parameter of the allocation, + * used to compute addresses within the 2D array. Given the row and column of + * an array element of type \p T, the address is computed as: + * \code + T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column; + \endcode + * + * For allocations of 2D arrays, it is recommended that programmers consider + * performing pitch allocations using ::cudaMallocPitch(). Due to pitch + * alignment restrictions in the hardware, this is especially true if the + * application will be performing 2D memory copies between different regions + * of device memory (whether linear memory or CUDA arrays). + * + * \param devPtr - Pointer to allocated pitched device memory + * \param pitch - Pitch for allocation + * \param width - Requested pitched allocation width (in bytes) + * \param height - Requested pitched allocation height + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, + * ::cudaHostAlloc, + * ::cuMemAllocPitch + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocPitch(void **devPtr, size_t *pitch, size_t width, size_t height); + +/** + * \brief Allocate an array on the device + * + * Allocates a CUDA array according to the ::cudaChannelFormatDesc structure + * \p desc and returns a handle to the new CUDA array in \p *array. + * + * The ::cudaChannelFormatDesc is defined as: + * \code + struct cudaChannelFormatDesc { + int x, y, z, w; + enum cudaChannelFormatKind f; + }; + \endcode + * where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned, + * ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat. + * + * The \p flags parameter enables different options to be specified that affect + * the allocation, as follows. + * - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation + * - ::cudaArraySurfaceLoadStore: Allocates an array that can be read from or written to using a surface reference + * - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the array. + * - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array + * can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. + * The physical backing memory must be allocated via ::cuMemCreate. + * - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can + * later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. + * The physical backing memory must be allocated via ::cuMemCreate. + * + * \p width and \p height must meet certain size requirements. See ::cudaMalloc3DArray() for more details. + * + * \param array - Pointer to allocated array in device memory + * \param desc - Requested channel format + * \param width - Requested array allocation width + * \param height - Requested array allocation height + * \param flags - Requested properties of allocated array + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, + * ::cudaHostAlloc, + * ::cuArrayCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocArray(cudaArray_t *array, const struct cudaChannelFormatDesc *desc, size_t width, size_t height __dv(0), unsigned int flags __dv(0)); + +/** + * \brief Frees memory on the device + * + * Frees the memory space pointed to by \p devPtr, which must have been + * returned by a previous call to one of the following memory allocation APIs - + * ::cudaMalloc(), ::cudaMallocPitch(), ::cudaMallocManaged(), ::cudaMallocAsync(), + * ::cudaMallocFromPoolAsync(). + * + * Note - This API will not perform any implicit synchronization when the pointer was + * allocated with ::cudaMallocAsync or ::cudaMallocFromPoolAsync. Callers must ensure + * that all accesses to these pointer have completed before invoking ::cudaFree. For + * best performance and memory reuse, users should use ::cudaFreeAsync to free memory + * allocated via the stream ordered memory allocator. + * For all other pointers, this API may perform implicit synchronization. + * + * If ::cudaFree(\p devPtr) has already been called before, + * an error is returned. If \p devPtr is 0, no operation is performed. + * ::cudaFree() returns ::cudaErrorValue in case of failure. + * + * The device version of ::cudaFree cannot be used with a \p *devPtr + * allocated using the host API, and vice versa. + * + * \param devPtr - Device pointer to memory to free + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocManaged, ::cudaMallocArray, ::cudaFreeArray, ::cudaMallocAsync, ::cudaMallocFromPoolAsync + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaFreeAsync + * ::cudaHostAlloc, + * ::cuMemFree + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaFree(void *devPtr); + +/** + * \brief Frees page-locked memory + * + * Frees the memory space pointed to by \p hostPtr, which must have been + * returned by a previous call to ::cudaMallocHost() or ::cudaHostAlloc(). + * + * \param ptr - Pointer to memory to free + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, + * ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaHostAlloc, + * ::cuMemFreeHost + */ +extern __host__ cudaError_t CUDARTAPI cudaFreeHost(void *ptr); + +/** + * \brief Frees an array on the device + * + * Frees the CUDA array \p array, which must have been returned by a + * previous call to ::cudaMallocArray(). If \p devPtr is 0, + * no operation is performed. + * + * \param array - Pointer to array to free + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::cuArrayDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaFreeArray(cudaArray_t array); + +/** + * \brief Frees a mipmapped array on the device + * + * Frees the CUDA mipmapped array \p mipmappedArray, which must have been + * returned by a previous call to ::cudaMallocMipmappedArray(). If \p devPtr + * is 0, no operation is performed. + * + * \param mipmappedArray - Pointer to mipmapped array to free + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::cuMipmappedArrayDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray); + + +/** + * \brief Allocates page-locked memory on the host + * + * Allocates \p size bytes of host memory that is page-locked and accessible + * to the device. The driver tracks the virtual memory ranges allocated with + * this function and automatically accelerates calls to functions such as + * ::cudaMemcpy(). Since the memory can be accessed directly by the device, it + * can be read or written with much higher bandwidth than pageable memory + * obtained with functions such as ::malloc(). Allocating excessive amounts of + * pinned memory may degrade system performance, since it reduces the amount + * of memory available to the system for paging. As a result, this function is + * best used sparingly to allocate staging areas for data exchange between host + * and device. + * + * The \p flags parameter enables different options to be specified that affect + * the allocation, as follows. + * - ::cudaHostAllocDefault: This flag's value is defined to be 0 and causes + * ::cudaHostAlloc() to emulate ::cudaMallocHost(). + * - ::cudaHostAllocPortable: The memory returned by this call will be + * considered as pinned memory by all CUDA contexts, not just the one that + * performed the allocation. + * - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space. + * The device pointer to the memory may be obtained by calling + * ::cudaHostGetDevicePointer(). + * - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC). + * WC memory can be transferred across the PCI Express bus more quickly on some + * system configurations, but cannot be read efficiently by most CPUs. WC + * memory is a good option for buffers that will be written by the CPU and read + * by the device via mapped pinned memory or host->device transfers. + * + * All of these flags are orthogonal to one another: a developer may allocate + * memory that is portable, mapped and/or write-combined with no restrictions. + * + * In order for the ::cudaHostAllocMapped flag to have any effect, the CUDA context + * must support the ::cudaDeviceMapHost flag, which can be checked via + * ::cudaGetDeviceFlags(). The ::cudaDeviceMapHost flag is implicitly set for + * contexts created via the runtime API. + * + * The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices + * that do not support mapped pinned memory. The failure is deferred to + * ::cudaHostGetDevicePointer() because the memory may be mapped into other + * CUDA contexts via the ::cudaHostAllocPortable flag. + * + * Memory allocated by this function must be freed with ::cudaFreeHost(). + * + * \param pHost - Device pointer to allocated memory + * \param size - Requested allocation size in bytes + * \param flags - Requested properties of allocated memory + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaSetDeviceFlags, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, + * ::cudaGetDeviceFlags, + * ::cuMemHostAlloc + */ +extern __host__ cudaError_t CUDARTAPI cudaHostAlloc(void **pHost, size_t size, unsigned int flags); + +/** + * \brief Registers an existing host memory range for use by CUDA + * + * Page-locks the memory range specified by \p ptr and \p size and maps it + * for the device(s) as specified by \p flags. This memory range also is added + * to the same tracking mechanism as ::cudaHostAlloc() to automatically accelerate + * calls to functions such as ::cudaMemcpy(). Since the memory can be accessed + * directly by the device, it can be read or written with much higher bandwidth + * than pageable memory that has not been registered. Page-locking excessive + * amounts of memory may degrade system performance, since it reduces the amount + * of memory available to the system for paging. As a result, this function is + * best used sparingly to register staging areas for data exchange between + * host and device. + * + * On systems where ::pageableMemoryAccessUsesHostPageTables is true, ::cudaHostRegister + * will not page-lock the memory range specified by \p ptr but only populate + * unpopulated pages. + * + * ::cudaHostRegister is supported only on I/O coherent devices that have a non-zero + * value for the device attribute ::cudaDevAttrHostRegisterSupported. + * + * The \p flags parameter enables different options to be specified that + * affect the allocation, as follows. + * + * - ::cudaHostRegisterDefault: On a system with unified virtual addressing, + * the memory will be both mapped and portable. On a system with no unified + * virtual addressing, the memory will be neither mapped nor portable. + * + * - ::cudaHostRegisterPortable: The memory returned by this call will be + * considered as pinned memory by all CUDA contexts, not just the one that + * performed the allocation. + * + * - ::cudaHostRegisterMapped: Maps the allocation into the CUDA address + * space. The device pointer to the memory may be obtained by calling + * ::cudaHostGetDevicePointer(). + * + * - ::cudaHostRegisterIoMemory: The passed memory pointer is treated as + * pointing to some memory-mapped I/O space, e.g. belonging to a + * third-party PCIe device, and it will marked as non cache-coherent and + * contiguous. + * + * - ::cudaHostRegisterReadOnly: The passed memory pointer is treated as + * pointing to memory that is considered read-only by the device. On + * platforms without ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, this + * flag is required in order to register memory mapped to the CPU as + * read-only. Support for the use of this flag can be queried from the device + * attribute ::cudaDevAttrHostRegisterReadOnlySupported. Using this flag with + * a current context associated with a device that does not have this attribute + * set will cause ::cudaHostRegister to error with cudaErrorNotSupported. + * + * All of these flags are orthogonal to one another: a developer may page-lock + * memory that is portable or mapped with no restrictions. + * + * The CUDA context must have been created with the ::cudaMapHost flag in + * order for the ::cudaHostRegisterMapped flag to have any effect. + * + * The ::cudaHostRegisterMapped flag may be specified on CUDA contexts for + * devices that do not support mapped pinned memory. The failure is deferred + * to ::cudaHostGetDevicePointer() because the memory may be mapped into + * other CUDA contexts via the ::cudaHostRegisterPortable flag. + * + * For devices that have a non-zero value for the device attribute + * ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory + * can also be accessed from the device using the host pointer \p ptr. + * The device pointer returned by ::cudaHostGetDevicePointer() may or may not + * match the original host pointer \p ptr and depends on the devices visible to the + * application. If all devices visible to the application have a non-zero value for the + * device attribute, the device pointer returned by ::cudaHostGetDevicePointer() + * will match the original pointer \p ptr. If any device visible to the application + * has a zero value for the device attribute, the device pointer returned by + * ::cudaHostGetDevicePointer() will not match the original host pointer \p ptr, + * but it will be suitable for use on all devices provided Unified Virtual Addressing + * is enabled. In such systems, it is valid to access the memory using either pointer + * on devices that have a non-zero value for the device attribute. Note however that + * such devices should access the memory using only of the two pointers and not both. + * + * The memory page-locked by this function must be unregistered with ::cudaHostUnregister(). + * + * \param ptr - Host pointer to memory to page-lock + * \param size - Size in bytes of the address range to page-lock in bytes + * \param flags - Flags for allocation request + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorHostMemoryAlreadyRegistered, + * ::cudaErrorNotSupported + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaHostUnregister, ::cudaHostGetFlags, ::cudaHostGetDevicePointer, + * ::cuMemHostRegister + */ +extern __host__ cudaError_t CUDARTAPI cudaHostRegister(void *ptr, size_t size, unsigned int flags); + +/** + * \brief Unregisters a memory range that was registered with cudaHostRegister + * + * Unmaps the memory range whose base address is specified by \p ptr, and makes + * it pageable again. + * + * The base address must be the same one specified to ::cudaHostRegister(). + * + * \param ptr - Host pointer to memory to unregister + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorHostMemoryNotRegistered + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaHostUnregister, + * ::cuMemHostUnregister + */ +extern __host__ cudaError_t CUDARTAPI cudaHostUnregister(void *ptr); + +/** + * \brief Passes back device pointer of mapped host memory allocated by + * cudaHostAlloc or registered by cudaHostRegister + * + * Passes back the device pointer corresponding to the mapped, pinned host + * buffer allocated by ::cudaHostAlloc() or registered by ::cudaHostRegister(). + * + * ::cudaHostGetDevicePointer() will fail if the ::cudaDeviceMapHost flag was + * not specified before deferred context creation occurred, or if called on a + * device that does not support mapped, pinned memory. + * + * For devices that have a non-zero value for the device attribute + * ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory + * can also be accessed from the device using the host pointer \p pHost. + * The device pointer returned by ::cudaHostGetDevicePointer() may or may not + * match the original host pointer \p pHost and depends on the devices visible to the + * application. If all devices visible to the application have a non-zero value for the + * device attribute, the device pointer returned by ::cudaHostGetDevicePointer() + * will match the original pointer \p pHost. If any device visible to the application + * has a zero value for the device attribute, the device pointer returned by + * ::cudaHostGetDevicePointer() will not match the original host pointer \p pHost, + * but it will be suitable for use on all devices provided Unified Virtual Addressing + * is enabled. In such systems, it is valid to access the memory using either pointer + * on devices that have a non-zero value for the device attribute. Note however that + * such devices should access the memory using only of the two pointers and not both. + * + * \p flags provides for future releases. For now, it must be set to 0. + * + * \param pDevice - Returned device pointer for mapped memory + * \param pHost - Requested host pointer mapping + * \param flags - Flags for extensions (must be 0 for now) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaSetDeviceFlags, ::cudaHostAlloc, + * ::cuMemHostGetDevicePointer + */ +extern __host__ cudaError_t CUDARTAPI cudaHostGetDevicePointer(void **pDevice, void *pHost, unsigned int flags); + +/** + * \brief Passes back flags used to allocate pinned host memory allocated by + * cudaHostAlloc + * + * ::cudaHostGetFlags() will fail if the input pointer does not + * reside in an address range allocated by ::cudaHostAlloc(). + * + * \param pFlags - Returned flags word + * \param pHost - Host pointer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaHostAlloc, + * ::cuMemHostGetFlags + */ +extern __host__ cudaError_t CUDARTAPI cudaHostGetFlags(unsigned int *pFlags, void *pHost); + +/** + * \brief Allocates logical 1D, 2D, or 3D memory objects on the device + * + * Allocates at least \p width * \p height * \p depth bytes of linear memory + * on the device and returns a ::cudaPitchedPtr in which \p ptr is a pointer + * to the allocated memory. The function may pad the allocation to ensure + * hardware alignment requirements are met. The pitch returned in the \p pitch + * field of \p pitchedDevPtr is the width in bytes of the allocation. + * + * The returned ::cudaPitchedPtr contains additional fields \p xsize and + * \p ysize, the logical width and height of the allocation, which are + * equivalent to the \p width and \p height \p extent parameters provided by + * the programmer during allocation. + * + * For allocations of 2D and 3D objects, it is highly recommended that + * programmers perform allocations using ::cudaMalloc3D() or + * ::cudaMallocPitch(). Due to alignment restrictions in the hardware, this is + * especially true if the application will be performing memory copies + * involving 2D or 3D objects (whether linear memory or CUDA arrays). + * + * \param pitchedDevPtr - Pointer to allocated pitched device memory + * \param extent - Requested allocation size (\p width field in bytes) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMallocPitch, ::cudaFree, ::cudaMemcpy3D, ::cudaMemset3D, + * ::cudaMalloc3DArray, ::cudaMallocArray, ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, ::make_cudaPitchedPtr, ::make_cudaExtent, + * ::cuMemAllocPitch + */ +extern __host__ cudaError_t CUDARTAPI cudaMalloc3D(struct cudaPitchedPtr* pitchedDevPtr, struct cudaExtent extent); + +/** + * \brief Allocate an array on the device + * + * Allocates a CUDA array according to the ::cudaChannelFormatDesc structure + * \p desc and returns a handle to the new CUDA array in \p *array. + * + * The ::cudaChannelFormatDesc is defined as: + * \code + struct cudaChannelFormatDesc { + int x, y, z, w; + enum cudaChannelFormatKind f; + }; + \endcode + * where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned, + * ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat. + * + * ::cudaMalloc3DArray() can allocate the following: + * + * - A 1D array is allocated if the height and depth extents are both zero. + * - A 2D array is allocated if only the depth extent is zero. + * - A 3D array is allocated if all three extents are non-zero. + * - A 1D layered CUDA array is allocated if only the height extent is zero and + * the cudaArrayLayered flag is set. Each layer is a 1D array. The number of layers is + * determined by the depth extent. + * - A 2D layered CUDA array is allocated if all three extents are non-zero and + * the cudaArrayLayered flag is set. Each layer is a 2D array. The number of layers is + * determined by the depth extent. + * - A cubemap CUDA array is allocated if all three extents are non-zero and the + * cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six. A cubemap is + * a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube. + * The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace. + * - A cubemap layered CUDA array is allocated if all three extents are non-zero, and both, + * cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be + * a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists + * of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form + * the second cubemap, and so on. + * + * + * The \p flags parameter enables different options to be specified that affect + * the allocation, as follows. + * - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation + * - ::cudaArrayLayered: Allocates a layered CUDA array, with the depth extent indicating the number of layers + * - ::cudaArrayCubemap: Allocates a cubemap CUDA array. Width must be equal to height, and depth must be six. + * If the cudaArrayLayered flag is also set, depth must be a multiple of six. + * - ::cudaArraySurfaceLoadStore: Allocates a CUDA array that could be read from or written to using a surface + * reference. + * - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA + * array. Texture gather can only be performed on 2D CUDA arrays. + * - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array + * can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for + * creating 2D, 3D or 2D layered sparse CUDA arrays. The physical backing memory must be allocated via ::cuMemCreate. + * - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can + * later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated + * via ::cuMemCreate. + * + * The width, height and depth extents must meet certain size requirements as listed in the following table. + * All values are specified in elements. + * + * Note that 2D CUDA arrays have different size requirements if the ::cudaArrayTextureGather flag is set. In that + * case, the valid range for (width, height, depth) is ((1,maxTexture2DGather[0]), (1,maxTexture2DGather[1]), 0). + * + * \xmlonly + * + * + * + * + * + * + * + * CUDA array type + * Valid extents that must always be met {(width range in elements), + * (height range), (depth range)} + * Valid extents with cudaArraySurfaceLoadStore set {(width range in + * elements), (height range), (depth range)} + * + * + * + * + * 1D + * { (1,maxTexture1D), 0, 0 } + * { (1,maxSurface1D), 0, 0 } + * + * + * 2D + * { (1,maxTexture2D[0]), (1,maxTexture2D[1]), 0 } + * { (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 } + * + * + * 3D + * { (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) } + * OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]), + * (1,maxTexture3DAlt[2]) } + * { (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) } + * + * + * 1D Layered + * { (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) } + * { (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) } + * + * + * 2D Layered + * { (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]), + * (1,maxTexture2DLayered[2]) } + * { (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]), + * (1,maxSurface2DLayered[2]) } + * + * + * Cubemap + * { (1,maxTextureCubemap), (1,maxTextureCubemap), 6 } + * { (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 } + * + * + * Cubemap Layered + * { (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]), + * (1,maxTextureCubemapLayered[1]) } + * { (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]), + * (1,maxSurfaceCubemapLayered[1]) } + * + * + * + *
+ * \endxmlonly + * + * \param array - Pointer to allocated array in device memory + * \param desc - Requested channel format + * \param extent - Requested allocation size (\p width field in elements) + * \param flags - Flags for extensions + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, + * ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::make_cudaExtent, + * ::cuArray3DCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaMalloc3DArray(cudaArray_t *array, const struct cudaChannelFormatDesc* desc, struct cudaExtent extent, unsigned int flags __dv(0)); + +/** + * \brief Allocate a mipmapped array on the device + * + * Allocates a CUDA mipmapped array according to the ::cudaChannelFormatDesc structure + * \p desc and returns a handle to the new CUDA mipmapped array in \p *mipmappedArray. + * \p numLevels specifies the number of mipmap levels to be allocated. This value is + * clamped to the range [1, 1 + floor(log2(max(width, height, depth)))]. + * + * The ::cudaChannelFormatDesc is defined as: + * \code + struct cudaChannelFormatDesc { + int x, y, z, w; + enum cudaChannelFormatKind f; + }; + \endcode + * where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned, + * ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat. + * + * ::cudaMallocMipmappedArray() can allocate the following: + * + * - A 1D mipmapped array is allocated if the height and depth extents are both zero. + * - A 2D mipmapped array is allocated if only the depth extent is zero. + * - A 3D mipmapped array is allocated if all three extents are non-zero. + * - A 1D layered CUDA mipmapped array is allocated if only the height extent is zero and + * the cudaArrayLayered flag is set. Each layer is a 1D mipmapped array. The number of layers is + * determined by the depth extent. + * - A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and + * the cudaArrayLayered flag is set. Each layer is a 2D mipmapped array. The number of layers is + * determined by the depth extent. + * - A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the + * cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six. + * The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace. + * - A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both, + * cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be + * a multiple of six. A cubemap layered CUDA mipmapped array is a special type of 2D layered CUDA mipmapped + * array that consists of a collection of cubemap mipmapped arrays. The first six layers represent the + * first cubemap mipmapped array, the next six layers form the second cubemap mipmapped array, and so on. + * + * + * The \p flags parameter enables different options to be specified that affect + * the allocation, as follows. + * - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default mipmapped array allocation + * - ::cudaArrayLayered: Allocates a layered CUDA mipmapped array, with the depth extent indicating the number of layers + * - ::cudaArrayCubemap: Allocates a cubemap CUDA mipmapped array. Width must be equal to height, and depth must be six. + * If the cudaArrayLayered flag is also set, depth must be a multiple of six. + * - ::cudaArraySurfaceLoadStore: This flag indicates that individual mipmap levels of the CUDA mipmapped array + * will be read from or written to using a surface reference. + * - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA + * array. Texture gather can only be performed on 2D CUDA mipmapped arrays, and the gather operations are + * performed only on the most detailed mipmap level. + * - ::cudaArraySparse: Allocates a CUDA mipmapped array without physical backing memory. The subregions within this sparse array + * can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for creating + * 2D, 3D or 2D layered sparse CUDA mipmapped arrays. The physical backing memory must be allocated via ::cuMemCreate. + * - ::cudaArrayDeferredMapping: Allocates a CUDA mipmapped array without physical backing memory. The entire array can + * later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated + * via ::cuMemCreate. + * + * The width, height and depth extents must meet certain size requirements as listed in the following table. + * All values are specified in elements. + * + * \xmlonly + * + * + * + * + * + * + * + * CUDA array type + * Valid extents that must always be met {(width range in elements), + * (height range), (depth range)} + * Valid extents with cudaArraySurfaceLoadStore set {(width range in + * elements), (height range), (depth range)} + * + * + * + * + * 1D + * { (1,maxTexture1DMipmap), 0, 0 } + * { (1,maxSurface1D), 0, 0 } + * + * + * 2D + * { (1,maxTexture2DMipmap[0]), (1,maxTexture2DMipmap[1]), 0 } + * { (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 } + * + * + * 3D + * { (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) } + * OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]), + * (1,maxTexture3DAlt[2]) } + * { (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) } + * + * + * 1D Layered + * { (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) } + * { (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) } + * + * + * 2D Layered + * { (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]), + * (1,maxTexture2DLayered[2]) } + * { (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]), + * (1,maxSurface2DLayered[2]) } + * + * + * Cubemap + * { (1,maxTextureCubemap), (1,maxTextureCubemap), 6 } + * { (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 } + * + * + * Cubemap Layered + * { (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]), + * (1,maxTextureCubemapLayered[1]) } + * { (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]), + * (1,maxSurfaceCubemapLayered[1]) } + * + * + * + *
+ * \endxmlonly + * + * \param mipmappedArray - Pointer to allocated mipmapped array in device memory + * \param desc - Requested channel format + * \param extent - Requested allocation size (\p width field in elements) + * \param numLevels - Number of mipmap levels to allocate + * \param flags - Flags for extensions + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, + * ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::make_cudaExtent, + * ::cuMipmappedArrayCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocMipmappedArray(cudaMipmappedArray_t *mipmappedArray, const struct cudaChannelFormatDesc* desc, struct cudaExtent extent, unsigned int numLevels, unsigned int flags __dv(0)); + +/** + * \brief Gets a mipmap level of a CUDA mipmapped array + * + * Returns in \p *levelArray a CUDA array that represents a single mipmap level + * of the CUDA mipmapped array \p mipmappedArray. + * + * If \p level is greater than the maximum number of levels in this mipmapped array, + * ::cudaErrorInvalidValue is returned. + * + * If \p mipmappedArray is NULL, + * ::cudaErrorInvalidResourceHandle is returned. + * + * \param levelArray - Returned mipmap level CUDA array + * \param mipmappedArray - CUDA mipmapped array + * \param level - Mipmap level + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, + * ::cudaFreeArray, + * \ref ::cudaMallocHost(void**, size_t) "cudaMallocHost (C API)", + * ::cudaFreeHost, ::cudaHostAlloc, + * ::make_cudaExtent, + * ::cuMipmappedArrayGetLevel + */ +extern __host__ cudaError_t CUDARTAPI cudaGetMipmappedArrayLevel(cudaArray_t *levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level); + +/** + * \brief Copies data between 3D objects + * +\code +struct cudaExtent { + size_t width; + size_t height; + size_t depth; +}; +struct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d); + +struct cudaPos { + size_t x; + size_t y; + size_t z; +}; +struct cudaPos make_cudaPos(size_t x, size_t y, size_t z); + +struct cudaMemcpy3DParms { + cudaArray_t srcArray; + struct cudaPos srcPos; + struct cudaPitchedPtr srcPtr; + cudaArray_t dstArray; + struct cudaPos dstPos; + struct cudaPitchedPtr dstPtr; + struct cudaExtent extent; + enum cudaMemcpyKind kind; +}; +\endcode + * + * ::cudaMemcpy3D() copies data betwen two 3D objects. The source and + * destination objects may be in either host memory, device memory, or a CUDA + * array. The source, destination, extent, and kind of copy performed is + * specified by the ::cudaMemcpy3DParms struct which should be initialized to + * zero before use: +\code +cudaMemcpy3DParms myParms = {0}; +\endcode + * + * The struct passed to ::cudaMemcpy3D() must specify one of \p srcArray or + * \p srcPtr and one of \p dstArray or \p dstPtr. Passing more than one + * non-zero source or destination will cause ::cudaMemcpy3D() to return an + * error. + * + * The \p srcPos and \p dstPos fields are optional offsets into the source and + * destination objects and are defined in units of each object's elements. The + * element for a host or device pointer is assumed to be unsigned char. + * + * The \p extent field defines the dimensions of the transferred area in + * elements. If a CUDA array is participating in the copy, the extent is + * defined in terms of that array's elements. If no CUDA array is + * participating in the copy then the extents are defined in elements of + * unsigned char. + * + * The \p kind field defines the direction of the copy. It must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost + * passed as kind and cudaArray type passed as source or destination, if the kind + * implies cudaArray type to be present on the host, ::cudaMemcpy3D() will + * disregard that implication and silently correct the kind based on the fact that + * cudaArray type can only be present on the device. + * + * If the source and destination are both arrays, ::cudaMemcpy3D() will return + * an error if they do not have the same element size. + * + * The source and destination object may not overlap. If overlapping source + * and destination objects are specified, undefined behavior will result. + * + * The source object must entirely contain the region defined by \p srcPos + * and \p extent. The destination object must entirely contain the region + * defined by \p dstPos and \p extent. + * + * ::cudaMemcpy3D() returns an error if the pitch of \p srcPtr or \p dstPtr + * exceeds the maximum allowed. The pitch of a ::cudaPitchedPtr allocated + * with ::cudaMalloc3D() will always be valid. + * + * \param p - 3D memory copy parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3DAsync, + * ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::make_cudaExtent, ::make_cudaPos, + * ::cuMemcpy3D + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy3D(const struct cudaMemcpy3DParms *p); + +/** + * \brief Copies memory between devices + * + * Perform a 3D memory copy according to the parameters specified in + * \p p. See the definition of the ::cudaMemcpy3DPeerParms structure + * for documentation of its parameters. + * + * Note that this function is synchronous with respect to the host only if + * the source or destination of the transfer is host memory. Note also + * that this copy is serialized with respect to all pending and future + * asynchronous work in to the current device, the copy's source device, + * and the copy's destination device (use ::cudaMemcpy3DPeerAsync to avoid + * this synchronization). + * + * \param p - Parameters for the memory copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidPitchValue + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync, + * ::cudaMemcpy3DPeerAsync, + * ::cuMemcpy3DPeer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DPeer(const struct cudaMemcpy3DPeerParms *p); + +/** + * \brief Copies data between 3D objects + * +\code +struct cudaExtent { + size_t width; + size_t height; + size_t depth; +}; +struct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d); + +struct cudaPos { + size_t x; + size_t y; + size_t z; +}; +struct cudaPos make_cudaPos(size_t x, size_t y, size_t z); + +struct cudaMemcpy3DParms { + cudaArray_t srcArray; + struct cudaPos srcPos; + struct cudaPitchedPtr srcPtr; + cudaArray_t dstArray; + struct cudaPos dstPos; + struct cudaPitchedPtr dstPtr; + struct cudaExtent extent; + enum cudaMemcpyKind kind; +}; +\endcode + * + * ::cudaMemcpy3DAsync() copies data betwen two 3D objects. The source and + * destination objects may be in either host memory, device memory, or a CUDA + * array. The source, destination, extent, and kind of copy performed is + * specified by the ::cudaMemcpy3DParms struct which should be initialized to + * zero before use: +\code +cudaMemcpy3DParms myParms = {0}; +\endcode + * + * The struct passed to ::cudaMemcpy3DAsync() must specify one of \p srcArray + * or \p srcPtr and one of \p dstArray or \p dstPtr. Passing more than one + * non-zero source or destination will cause ::cudaMemcpy3DAsync() to return an + * error. + * + * The \p srcPos and \p dstPos fields are optional offsets into the source and + * destination objects and are defined in units of each object's elements. The + * element for a host or device pointer is assumed to be unsigned char. + * For CUDA arrays, positions must be in the range [0, 2048) for any + * dimension. + * + * The \p extent field defines the dimensions of the transferred area in + * elements. If a CUDA array is participating in the copy, the extent is + * defined in terms of that array's elements. If no CUDA array is + * participating in the copy then the extents are defined in elements of + * unsigned char. + * + * The \p kind field defines the direction of the copy. It must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost + * passed as kind and cudaArray type passed as source or destination, if the kind + * implies cudaArray type to be present on the host, ::cudaMemcpy3DAsync() will + * disregard that implication and silently correct the kind based on the fact that + * cudaArray type can only be present on the device. + * + * If the source and destination are both arrays, ::cudaMemcpy3DAsync() will + * return an error if they do not have the same element size. + * + * The source and destination object may not overlap. If overlapping source + * and destination objects are specified, undefined behavior will result. + * + * The source object must lie entirely within the region defined by \p srcPos + * and \p extent. The destination object must lie entirely within the region + * defined by \p dstPos and \p extent. + * + * ::cudaMemcpy3DAsync() returns an error if the pitch of \p srcPtr or + * \p dstPtr exceeds the maximum allowed. The pitch of a + * ::cudaPitchedPtr allocated with ::cudaMalloc3D() will always be valid. + * + * ::cudaMemcpy3DAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If + * \p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \p stream + * is non-zero, the copy may overlap with operations in other streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param p - 3D memory copy parameters + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3D, + * ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, :::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::make_cudaExtent, ::make_cudaPos, + * ::cuMemcpy3DAsync + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream __dv(0)); + +/** + * \brief Copies memory between devices asynchronously. + * + * Perform a 3D memory copy according to the parameters specified in + * \p p. See the definition of the ::cudaMemcpy3DPeerParms structure + * for documentation of its parameters. + * + * \param p - Parameters for the memory copy + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidPitchValue + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync, + * ::cudaMemcpy3DPeerAsync, + * ::cuMemcpy3DPeerAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DPeerAsync(const struct cudaMemcpy3DPeerParms *p, cudaStream_t stream __dv(0)); + +/** + * \brief Gets free and total device memory + * + * Returns in \p *total the total amount of memory available to the the current context. + * Returns in \p *free the amount of memory on the device that is free according to the OS. + * CUDA is not guaranteed to be able to allocate all of the memory that the OS reports as free. + * In a multi-tenet situation, free estimate returned is prone to race condition where + * a new allocation/free done by a different process or a different thread in the same + * process between the time when free memory was estimated and reported, will result in + * deviation in free value reported and actual free memory. + * + * The integrated GPU on Tegra shares memory with CPU and other component + * of the SoC. The free and total values returned by the API excludes + * the SWAP memory space maintained by the OS on some platforms. + * The OS may move some of the memory pages into swap area as the GPU or + * CPU allocate or access memory. See Tegra app note on how to calculate + * total and free memory on Tegra. + * + * \param free - Returned free memory in bytes + * \param total - Returned total memory in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorLaunchFailure + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cuMemGetInfo + */ +extern __host__ cudaError_t CUDARTAPI cudaMemGetInfo(size_t *free, size_t *total); + +/** + * \brief Gets info about the specified cudaArray + * + * Returns in \p *desc, \p *extent and \p *flags respectively, the type, shape + * and flags of \p array. + * + * Any of \p *desc, \p *extent and \p *flags may be specified as NULL. + * + * \param desc - Returned array type + * \param extent - Returned array shape. 2D arrays will have depth of zero + * \param flags - Returned array flags + * \param array - The ::cudaArray to get info for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cuArrayGetDescriptor, + * ::cuArray3DGetDescriptor + */ +extern __host__ cudaError_t CUDARTAPI cudaArrayGetInfo(struct cudaChannelFormatDesc *desc, struct cudaExtent *extent, unsigned int *flags, cudaArray_t array); + +/** + * \brief Gets a CUDA array plane from a CUDA array + * + * Returns in \p pPlaneArray a CUDA array that represents a single format plane + * of the CUDA array \p hArray. + * + * If \p planeIdx is greater than the maximum number of planes in this array or if the array does + * not have a multi-planar format e.g: ::cudaChannelFormatKindNV12, then ::cudaErrorInvalidValue is returned. + * + * Note that if the \p hArray has format ::cudaChannelFormatKindNV12, then passing in 0 for \p planeIdx returns + * a CUDA array of the same size as \p hArray but with one 8-bit channel and ::cudaChannelFormatKindUnsigned as its format kind. + * If 1 is passed for \p planeIdx, then the returned CUDA array has half the height and width + * of \p hArray with two 8-bit channels and ::cudaChannelFormatKindUnsigned as its format kind. + * + * \param pPlaneArray - Returned CUDA array referenced by the \p planeIdx + * \param hArray - CUDA array + * \param planeIdx - Plane index + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * + * \sa + * ::cuArrayGetPlane + */ +extern __host__ cudaError_t CUDARTAPI cudaArrayGetPlane(cudaArray_t *pPlaneArray, cudaArray_t hArray, unsigned int planeIdx); + +/** + * \brief Returns the memory requirements of a CUDA array + * + * Returns the memory requirements of a CUDA array in \p memoryRequirements + * If the CUDA array is not allocated with flag ::cudaArrayDeferredMapping + * ::cudaErrorInvalidValue will be returned. + * + * The returned value in ::cudaArrayMemoryRequirements::size + * represents the total size of the CUDA array. + * The returned value in ::cudaArrayMemoryRequirements::alignment + * represents the alignment necessary for mapping the CUDA array. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * + * \param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements + * \param[in] array - CUDA array to get the memory requirements of + * \param[in] device - Device to get the memory requirements for + * \sa ::cudaMipmappedArrayGetMemoryRequirements + */ +extern __host__ cudaError_t CUDARTAPI cudaArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *memoryRequirements, cudaArray_t array, int device); + +/** + * \brief Returns the memory requirements of a CUDA mipmapped array + * + * Returns the memory requirements of a CUDA mipmapped array in \p memoryRequirements + * If the CUDA mipmapped array is not allocated with flag ::cudaArrayDeferredMapping + * ::cudaErrorInvalidValue will be returned. + * + * The returned value in ::cudaArrayMemoryRequirements::size + * represents the total size of the CUDA mipmapped array. + * The returned value in ::cudaArrayMemoryRequirements::alignment + * represents the alignment necessary for mapping the CUDA mipmapped + * array. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * + * \param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements + * \param[in] mipmap - CUDA mipmapped array to get the memory requirements of + * \param[in] device - Device to get the memory requirements for + * \sa ::cudaArrayGetMemoryRequirements + */ +extern __host__ cudaError_t CUDARTAPI cudaMipmappedArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *memoryRequirements, cudaMipmappedArray_t mipmap, int device); + +/** + * \brief Returns the layout properties of a sparse CUDA array + * + * Returns the layout properties of a sparse CUDA array in \p sparseProperties. + * If the CUDA array is not allocated with flag ::cudaArraySparse + * ::cudaErrorInvalidValue will be returned. + * + * If the returned value in ::cudaArraySparseProperties::flags contains ::cudaArraySparsePropertiesSingleMipTail, + * then ::cudaArraySparseProperties::miptailSize represents the total size of the array. Otherwise, it will be zero. + * Also, the returned value in ::cudaArraySparseProperties::miptailFirstLevel is always zero. + * Note that the \p array must have been allocated using ::cudaMallocArray or ::cudaMalloc3DArray. For CUDA arrays obtained + * using ::cudaMipmappedArrayGetLevel, ::cudaErrorInvalidValue will be returned. Instead, ::cudaMipmappedArrayGetSparseProperties + * must be used to obtain the sparse properties of the entire CUDA mipmapped array to which \p array belongs to. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * + * \param[out] sparseProperties - Pointer to return the ::cudaArraySparseProperties + * \param[in] array - The CUDA array to get the sparse properties of + * + * \sa + * ::cudaMipmappedArrayGetSparseProperties, + * ::cuMemMapArrayAsync + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaArrayGetSparseProperties(struct cudaArraySparseProperties *sparseProperties, cudaArray_t array); +#endif + +/** + * \brief Returns the layout properties of a sparse CUDA mipmapped array + * + * Returns the sparse array layout properties in \p sparseProperties. + * If the CUDA mipmapped array is not allocated with flag ::cudaArraySparse + * ::cudaErrorInvalidValue will be returned. + * + * For non-layered CUDA mipmapped arrays, ::cudaArraySparseProperties::miptailSize returns the + * size of the mip tail region. The mip tail region includes all mip levels whose width, height or depth + * is less than that of the tile. + * For layered CUDA mipmapped arrays, if ::cudaArraySparseProperties::flags contains ::cudaArraySparsePropertiesSingleMipTail, + * then ::cudaArraySparseProperties::miptailSize specifies the size of the mip tail of all layers combined. + * Otherwise, ::cudaArraySparseProperties::miptailSize specifies mip tail size per layer. + * The returned value of ::cudaArraySparseProperties::miptailFirstLevel is valid only if ::cudaArraySparseProperties::miptailSize is non-zero. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * + * \param[out] sparseProperties - Pointer to return ::cudaArraySparseProperties + * \param[in] mipmap - The CUDA mipmapped array to get the sparse properties of + * + * \sa + * ::cudaArrayGetSparseProperties, + * ::cuMemMapArrayAsync + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaMipmappedArrayGetSparseProperties(struct cudaArraySparseProperties *sparseProperties, cudaMipmappedArray_t mipmap); +#endif + +/** + * \brief Copies data between host and device + * + * Copies \p count bytes from the memory area pointed to by \p src to the + * memory area pointed to by \p dst, where \p kind specifies the direction + * of the copy, and must be one of ::cudaMemcpyHostToHost, + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. Calling + * ::cudaMemcpy() with dst and src pointers that do not match the direction of + * the copy results in an undefined behavior. + * + * \param dst - Destination memory address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_init_rt + * \note_callback + * + * \note_sync + * \note_memcpy + * + * \sa ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyDtoH, + * ::cuMemcpyHtoD, + * ::cuMemcpyDtoD, + * ::cuMemcpy + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind); + +/** + * \brief Copies memory between two devices + * + * Copies memory from one device to memory on another device. \p dst is the + * base device pointer of the destination memory and \p dstDevice is the + * destination device. \p src is the base device pointer of the source memory + * and \p srcDevice is the source device. \p count specifies the number of bytes + * to copy. + * + * Note that this function is asynchronous with respect to the host, but + * serialized with respect all pending and future asynchronous work in to the + * current device, \p srcDevice, and \p dstDevice (use ::cudaMemcpyPeerAsync + * to avoid this synchronization). + * + * \param dst - Destination device pointer + * \param dstDevice - Destination device + * \param src - Source device pointer + * \param srcDevice - Source device + * \param count - Size of memory copy in bytes + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync, + * ::cudaMemcpy3DPeerAsync, + * ::cuMemcpyPeer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyPeer(void *dst, int dstDevice, const void *src, int srcDevice, size_t count); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the memory + * area pointed to by \p src to the memory area pointed to by \p dst, where + * \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. \p dpitch and + * \p spitch are the widths in memory in bytes of the 2D arrays pointed to by + * \p dst and \p src, including any padding added to the end of each row. The + * memory areas may not overlap. \p width must not exceed either \p dpitch or + * \p spitch. Calling ::cudaMemcpy2D() with \p dst and \p src pointers that do + * not match the direction of the copy results in an undefined behavior. + * ::cudaMemcpy2D() returns an error if \p dpitch or \p spitch exceeds + * the maximum allowed. + * + * \param dst - Destination memory address + * \param dpitch - Pitch of destination memory + * \param src - Source memory address + * \param spitch - Pitch of source memory + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2D, + * ::cuMemcpy2DUnaligned + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2D(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the memory + * area pointed to by \p src to the CUDA array \p dst starting at + * \p hOffset rows and \p wOffset bytes from the upper left corner, + * where \p kind specifies the direction of the copy, and must be one + * of ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * \p spitch is the width in memory in bytes of the 2D array pointed to by + * \p src, including any padding added to the end of each row. \p wOffset + + * \p width must not exceed the width of the CUDA array \p dst. \p width must + * not exceed \p spitch. ::cudaMemcpy2DToArray() returns an error if \p spitch + * exceeds the maximum allowed. + * + * \param dst - Destination memory address + * \param wOffset - Destination starting X offset (columns in bytes) + * \param hOffset - Destination starting Y offset (rows) + * \param src - Source memory address + * \param spitch - Pitch of source memory + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2D, + * ::cuMemcpy2DUnaligned + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the CUDA + * array \p src starting at \p hOffset rows and \p wOffset bytes from the + * upper left corner to the memory area pointed to by \p dst, where + * \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. \p dpitch is the + * width in memory in bytes of the 2D array pointed to by \p dst, including any + * padding added to the end of each row. \p wOffset + \p width must not exceed + * the width of the CUDA array \p src. \p width must not exceed \p dpitch. + * ::cudaMemcpy2DFromArray() returns an error if \p dpitch exceeds the maximum + * allowed. + * + * \param dst - Destination memory address + * \param dpitch - Pitch of destination memory + * \param src - Source memory address + * \param wOffset - Source starting X offset (columns in bytes) + * \param hOffset - Source starting Y offset (rows) + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2D, + * ::cuMemcpy2DUnaligned + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DFromArray(void *dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the CUDA + * array \p src starting at \p hOffsetSrc rows and \p wOffsetSrc bytes from the + * upper left corner to the CUDA array \p dst starting at \p hOffsetDst rows + * and \p wOffsetDst bytes from the upper left corner, where \p kind + * specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * \p wOffsetDst + \p width must not exceed the width of the CUDA array \p dst. + * \p wOffsetSrc + \p width must not exceed the width of the CUDA array \p src. + * + * \param dst - Destination memory address + * \param wOffsetDst - Destination starting X offset (columns in bytes) + * \param hOffsetDst - Destination starting Y offset (rows) + * \param src - Source memory address + * \param wOffsetSrc - Source starting X offset (columns in bytes) + * \param hOffsetSrc - Source starting Y offset (rows) + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2D, + * ::cuMemcpy2DUnaligned + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DArrayToArray(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 __dv(cudaMemcpyDeviceToDevice)); + +/** + * \brief Copies data to the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p src + * to the memory area pointed to by \p offset bytes from the start of symbol + * \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_sync + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy, + * ::cuMemcpyHtoD, + * ::cuMemcpyDtoD + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyToSymbol(const void *symbol, const void *src, size_t count, size_t offset __dv(0), enum cudaMemcpyKind kind __dv(cudaMemcpyHostToDevice)); + + +/** + * \brief Copies data from the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p offset bytes + * from the start of symbol \p symbol to the memory area pointed to by \p dst. + * The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_sync + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy, + * ::cuMemcpyDtoH, + * ::cuMemcpyDtoD + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t offset __dv(0), enum cudaMemcpyKind kind __dv(cudaMemcpyDeviceToHost)); + + +/** + * \brief Copies data between host and device + * + * Copies \p count bytes from the memory area pointed to by \p src to the + * memory area pointed to by \p dst, where \p kind specifies the + * direction of the copy, and must be one of ::cudaMemcpyHostToHost, + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * The memory areas may not overlap. Calling ::cudaMemcpyAsync() with \p dst and + * \p src pointers that do not match the direction of the copy results in an + * undefined behavior. + * + * ::cudaMemcpyAsync() is asynchronous with respect to the host, so the call + * may return before the copy is complete. The copy can optionally be + * associated to a stream by passing a non-zero \p stream argument. If \p kind + * is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and the \p stream is + * non-zero, the copy may overlap with operations in other streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param dst - Destination memory address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyAsync, + * ::cuMemcpyDtoHAsync, + * ::cuMemcpyHtoDAsync, + * ::cuMemcpyDtoDAsync + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + +/** + * \brief Copies memory between two devices asynchronously. + * + * Copies memory from one device to memory on another device. \p dst is the + * base device pointer of the destination memory and \p dstDevice is the + * destination device. \p src is the base device pointer of the source memory + * and \p srcDevice is the source device. \p count specifies the number of bytes + * to copy. + * + * Note that this function is asynchronous with respect to the host and all work + * on other devices. + * + * \param dst - Destination device pointer + * \param dstDevice - Destination device + * \param src - Source device pointer + * \param srcDevice - Source device + * \param count - Size of memory copy in bytes + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, + * ::cudaMemcpy3DPeerAsync, + * ::cuMemcpyPeerAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyPeerAsync(void *dst, int dstDevice, const void *src, int srcDevice, size_t count, cudaStream_t stream __dv(0)); + +/** + * \brief Performs a batch of memory copies asynchronously. + * + * Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a + * batch are not guaranteed to execute in any specific order. This API only supports pointer-to-pointer copies. + * For copies involving CUDA arrays, please see ::cudaMemcpy3DBatchAsync. + * + * Performs memory copies from source buffers specified in \p srcs to destination buffers specified in \p dsts. + * The size of each copy is specified in \p sizes. All three arrays must be of the same length as specified + * by \p count. Since there are no ordering guarantees for copies within a batch, specifying any dependent copies + * within a batch will result in undefined behavior. + * + * Every copy in the batch has to be associated with a set of attributes specified in the \p attrs array. + * Each entry in this array can apply to more than one copy. This can be done by specifying in the \p attrsIdxs array, + * the index of the first copy that the corresponding entry in the \p attrs array applies to. Both \p attrs and + * \p attrsIdxs must be of the same length as specified by \p numAttrs. For example, if a batch has 10 copies listed + * in dst/src/sizes, the first 6 of which have one set of attributes and the remaining 4 another, then \p numAttrs + * will be 2, \p attrsIdxs will be {0, 6} and \p attrs will contains the two sets of attributes. Note that the first entry + * in \p attrsIdxs must always be 0. Also, each entry must be greater than the previous entry and the last entry should be + * less than \p count. Furthermore, \p numAttrs must be lesser than or equal to \p count. + * + * The ::cudaMemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated + * with the attribute. If the source access order is set to ::cudaMemcpySrcAccessOrderStream, then the source will + * be accessed in stream order. If the source access order is set to ::cudaMemcpySrcAccessOrderDuringApiCall then + * it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the + * API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior + * operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope + * that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the + * need for the user to synchronize the stream after the API call. If the source access order is set to + * ::cudaMemcpySrcAccessOrderAny then it indicates that access to the source pointer can be out of stream order and the + * accesses can happen even after the API call returns. This flag is suited for host pointers allocated + * outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. + * Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcpy operation in the batch + * must have a valid ::cudaMemcpyAttributes corresponding to it including the appropriate srcAccessOrder setting, + * otherwise the API will return ::cudaErrorInvalidValue. + * + * The ::cudaMemcpyAttributes::srcLocHint and ::cudaMemcpyAttributes::dstLocHint allows applications to specify hint locations + * for operands of a copy when the operand doesn't have a fixed location. That is, these hints are + * only applicable for managed memory pointers on devices where ::cudaDevAttrConcurrentManagedAccess is true or + * system-allocated pageable memory on devices where ::cudaDevAttrPageableMemoryAccess is true. + * For other cases, these hints are ignored. + * + * The ::cudaMemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the + * ::cudaMemcpyFlagPreferOverlapWithCompute flag indicates that the associated copies should preferably overlap with + * any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy. + * + * If any error is encountered while parsing the batch, the index within the batch where the error was encountered + * will be returned in \p failIdx. + * + * \param dsts - Array of destination pointers. + * \param srcs - Array of memcpy source pointers. + * \param sizes - Array of sizes for memcpy operations. + * \param count - Size of \p dsts, \p srcs and \p sizes arrays + * \param attrs - Array of memcpy attributes. + * \param attrsIdxs - Array of indices to specify which copies each entry in the \p attrs array applies to. + * The attributes specified in attrs[k] will be applied to copies starting from attrsIdxs[k] + * through attrsIdxs[k+1] - 1. Also attrs[numAttrs-1] will apply to copies starting from + * attrsIdxs[numAttrs-1] through count - 1. + * \param numAttrs - Size of \p attrs and \p attrsIdxs arrays. + * \param failIdx - Pointer to a location to return the index of the copy where a failure was encountered. + * The value will be SIZE_MAX if the error doesn't pertain to any specific copy. + * \param hStream - The stream to enqueue the operations in. Must not be legacy NULL stream. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * \notefnerr + * \note_async + * \note_memcpy + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyBatchAsync(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); + +/** + * \brief Performs a batch of 3D memory copies asynchronously. + * + * Performs a batch of memory copies. The batch as a whole executes in stream order but copies within a + * batch are not guaranteed to execute in any specific order. Note that this means specifying any dependent + * copies within a batch will result in undefined behavior. + * +* Performs memory copies as specified in the \p opList array. The length of this array is specified in \p numOps. + * Each entry in this array describes a copy operation. This includes among other things, the source and destination + * operands for the copy as specified in ::cudaMemcpy3DBatchOp::src and ::cudaMemcpy3DBatchOp::dst respectively. + * The source and destination operands of a copy can either be a pointer or a CUDA array. The width, height and depth + * of a copy is specified in ::cudaMemcpy3DBatchOp::extent. The width, height and depth of a copy are specified in + * elements and must not be zero. For pointer-to-pointer copies, the element size is considered to be 1. For pointer + * to CUDA array or vice versa copies, the element size is determined by the CUDA array. For CUDA array to CUDA array copies, + * the element size of the two CUDA arrays must match. + * + * For a given operand, if ::cudaMemcpy3DOperand::type is specified as ::cudaMemcpyOperandTypePointer, then + * ::cudaMemcpy3DOperand::op::ptr will be used. The ::cudaMemcpy3DOperand::op::ptr::ptr field must contain the pointer where + * the copy should begin. The ::cudaMemcpy3DOperand::op::ptr::rowLength field specifies the length of each row in elements and + * must either be zero or be greater than or equal to the width of the copy specified in ::cudaMemcpy3DBatchOp::extent::width. + * The ::cudaMemcpy3DOperand::op::ptr::layerHeight field specifies the height of each layer and must either be + * zero or be greater than or equal to the height of the copy specified in ::cudaMemcpy3DBatchOp::extent::height. + * When either of these values is zero, that aspect of the operand is considered to be tightly packed according to the copy extent. + * For managed memory pointers on devices where ::cudaDevAttrConcurrentManagedAccess is true or system-allocated pageable memory + * on devices where ::cudaDevAttrPageableMemoryAccess is true, the ::cudaMemcpy3DOperand::op::ptr::locHint field can be used to hint + * the location of the operand. + * + * If an operand's type is specified as ::cudaMemcpyOperandTypeArray, then ::cudaMemcpy3DOperand::op::array will be used. + * The ::cudaMemcpy3DOperand::op::array::array field specifies the CUDA array and ::cudaMemcpy3DOperand::op::array::offset specifies + * the 3D offset into that array where the copy begins. + * + * The ::cudaMemcpyAttributes::srcAccessOrder indicates the source access ordering to be observed for copies associated + * with the attribute. If the source access order is set to ::cudaMemcpySrcAccessOrderStream, then the source will + * be accessed in stream order. If the source access order is set to ::cudaMemcpySrcAccessOrderDuringApiCall then + * it indicates that access to the source pointer can be out of stream order and all accesses must be complete before the + * API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior + * operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope + * that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the + * need for the user to synchronize the stream after the API call. If the source access order is set to + * ::cudaMemcpySrcAccessOrderAny then it indicates that access to the source pointer can be out of stream order and the + * accesses can happen even after the API call returns. This flag is suited for host pointers allocated + * outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. + * Specifying this flag allows the driver to optimize the copy on certain platforms. Each memcopy operation in \p opList + * must have a valid srcAccessOrder setting, otherwise this API will return ::cudaErrorInvalidValue. + * + * The ::cudaMemcpyAttributes::flags field can be used to specify certain flags for copies. Setting the + * ::cudaMemcpyFlagPreferOverlapWithCompute flag indicates that the associated copies should preferably overlap with + * any compute work. Note that this flag is a hint and can be ignored depending on the platform and other parameters of the copy. + * + * If any error is encountered while parsing the batch, the index within the batch where the error was encountered + * will be returned in \p failIdx. + * + * \param numOps - Total number of memcpy operations. + * \param opList - Array of size \p numOps containing the actual memcpy operations. + * \param failIdx - Pointer to a location to return the index of the copy where a failure was encountered. + * The value will be SIZE_MAX if the error doesn't pertain to any specific copy. + * \param flags - Flags for future use, must be zero now. + * \param hStream - The stream to enqueue the operations in. Must not be default NULL stream. + * + * \return + * ::cudaSuccess + * ::cudaErrorInvalidValue + * \notefnerr + * \note_async + * \note_memcpy + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DBatchAsync(size_t numOps, struct cudaMemcpy3DBatchOp *opList, size_t *failIdx, unsigned long long flags, cudaStream_t stream); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the memory + * area pointed to by \p src to the memory area pointed to by \p dst, where + * \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * \p dpitch and \p spitch are the widths in memory in bytes of the 2D arrays + * pointed to by \p dst and \p src, including any padding added to the end of + * each row. The memory areas may not overlap. \p width must not exceed either + * \p dpitch or \p spitch. + * + * Calling ::cudaMemcpy2DAsync() with \p dst and \p src pointers that do not + * match the direction of the copy results in an undefined behavior. + * ::cudaMemcpy2DAsync() returns an error if \p dpitch or \p spitch is greater + * than the maximum allowed. + * + * ::cudaMemcpy2DAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If + * \p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and + * \p stream is non-zero, the copy may overlap with operations in other + * streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param dst - Destination memory address + * \param dpitch - Pitch of destination memory + * \param src - Source memory address + * \param spitch - Pitch of source memory + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2DAsync + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the memory + * area pointed to by \p src to the CUDA array \p dst starting at \p hOffset + * rows and \p wOffset bytes from the upper left corner, where \p kind specifies + * the direction of the copy, and must be one of ::cudaMemcpyHostToHost, + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * \p spitch is the width in memory in bytes of the 2D array pointed to by + * \p src, including any padding added to the end of each row. \p wOffset + + * \p width must not exceed the width of the CUDA array \p dst. \p width must + * not exceed \p spitch. ::cudaMemcpy2DToArrayAsync() returns an error if + * \p spitch exceeds the maximum allowed. + * + * ::cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If + * \p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and + * \p stream is non-zero, the copy may overlap with operations in other + * streams. + * + * \param dst - Destination memory address + * \param wOffset - Destination starting X offset (columns in bytes) + * \param hOffset - Destination starting Y offset (rows) + * \param src - Source memory address + * \param spitch - Pitch of source memory + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2DAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DToArrayAsync(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 __dv(0)); + +/** + * \brief Copies data between host and device + * + * Copies a matrix (\p height rows of \p width bytes each) from the CUDA + * array \p src starting at \p hOffset rows and \p wOffset bytes from the + * upper left corner to the memory area pointed to by \p dst, + * where \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * \p dpitch is the width in memory in bytes of the 2D + * array pointed to by \p dst, including any padding added to the end of each + * row. \p wOffset + \p width must not exceed the width of the CUDA array + * \p src. \p width must not exceed \p dpitch. ::cudaMemcpy2DFromArrayAsync() + * returns an error if \p dpitch exceeds the maximum allowed. + * + * ::cudaMemcpy2DFromArrayAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally be + * associated to a stream by passing a non-zero \p stream argument. If \p kind + * is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \p stream is + * non-zero, the copy may overlap with operations in other streams. + * + * \param dst - Destination memory address + * \param dpitch - Pitch of destination memory + * \param src - Source memory address + * \param wOffset - Source starting X offset (columns in bytes) + * \param hOffset - Source starting Y offset (rows) + * \param width - Width of matrix transfer (columns in bytes) + * \param height - Height of matrix transfer (rows) + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidPitchValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * \note_memcpy + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpy2DAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DFromArrayAsync(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 __dv(0)); + +/** + * \brief Copies data to the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p src + * to the memory area pointed to by \p offset bytes from the start of symbol + * \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If + * \p kind is ::cudaMemcpyHostToDevice and \p stream is non-zero, the copy + * may overlap with operations in other streams. + * + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyAsync, + * ::cuMemcpyHtoDAsync, + * ::cuMemcpyDtoDAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyToSymbolAsync(const void *symbol, const void *src, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + +/** + * \brief Copies data from the given symbol on the device + * + * Copies \p count bytes from the memory area pointed to by \p offset bytes + * from the start of symbol \p symbol to the memory area pointed to by \p dst. + * The memory areas may not overlap. \p symbol is a variable that resides in + * global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally be + * associated to a stream by passing a non-zero \p stream argument. If \p kind + * is ::cudaMemcpyDeviceToHost and \p stream is non-zero, the copy may overlap + * with operations in other streams. + * + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorInvalidMemcpyDirection, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, + * ::cuMemcpyAsync, + * ::cuMemcpyDtoHAsync, + * ::cuMemcpyDtoDAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromSymbolAsync(void *dst, const void *symbol, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + + +/** + * \brief Initializes or sets device memory to a value + * + * Fills the first \p count bytes of the memory area pointed to by \p devPtr + * with the constant byte value \p value. + * + * Note that this function is asynchronous with respect to the host unless + * \p devPtr refers to pinned host memory. + * + * \param devPtr - Pointer to device memory + * \param value - Value to set for each byte of specified memory + * \param count - Size in bytes to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_init_rt + * \note_callback + * + * \sa + * ::cuMemsetD8, + * ::cuMemsetD16, + * ::cuMemsetD32 + */ +extern __host__ cudaError_t CUDARTAPI cudaMemset(void *devPtr, int value, size_t count); + +/** + * \brief Initializes or sets device memory to a value + * + * Sets to the specified value \p value a matrix (\p height rows of \p width + * bytes each) pointed to by \p dstPtr. \p pitch is the width in bytes of the + * 2D array pointed to by \p dstPtr, including any padding added to the end + * of each row. This function performs fastest when the pitch is one that has + * been passed back by ::cudaMallocPitch(). + * + * Note that this function is asynchronous with respect to the host unless + * \p devPtr refers to pinned host memory. + * + * \param devPtr - Pointer to 2D device memory + * \param pitch - Pitch in bytes of 2D device memory(Unused if \p height is 1) + * \param value - Value to set for each byte of specified memory + * \param width - Width of matrix set (columns in bytes) + * \param height - Height of matrix set (rows) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemset, ::cudaMemset3D, ::cudaMemsetAsync, + * ::cudaMemset2DAsync, ::cudaMemset3DAsync, + * ::cuMemsetD2D8, + * ::cuMemsetD2D16, + * ::cuMemsetD2D32 + */ +extern __host__ cudaError_t CUDARTAPI cudaMemset2D(void *devPtr, size_t pitch, int value, size_t width, size_t height); + +/** + * \brief Initializes or sets device memory to a value + * + * Initializes each element of a 3D array to the specified value \p value. + * The object to initialize is defined by \p pitchedDevPtr. The \p pitch field + * of \p pitchedDevPtr is the width in memory in bytes of the 3D array pointed + * to by \p pitchedDevPtr, including any padding added to the end of each row. + * The \p xsize field specifies the logical width of each row in bytes, while + * the \p ysize field specifies the height of each 2D slice in rows. + * The \p pitch field of \p pitchedDevPtr is ignored when \p height and \p depth + * are both equal to 1. + * + * The extents of the initialized region are specified as a \p width in bytes, + * a \p height in rows, and a \p depth in slices. + * + * Extents with \p width greater than or equal to the \p xsize of + * \p pitchedDevPtr may perform significantly faster than extents narrower + * than the \p xsize. Secondarily, extents with \p height equal to the + * \p ysize of \p pitchedDevPtr will perform faster than when the \p height is + * shorter than the \p ysize. + * + * This function performs fastest when the \p pitchedDevPtr has been allocated + * by ::cudaMalloc3D(). + * + * Note that this function is asynchronous with respect to the host unless + * \p pitchedDevPtr refers to pinned host memory. + * + * \param pitchedDevPtr - Pointer to pitched device memory + * \param value - Value to set for each byte of specified memory + * \param extent - Size parameters for where to set device memory (\p width field in bytes) + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemset, ::cudaMemset2D, + * ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMemset3DAsync, + * ::cudaMalloc3D, ::make_cudaPitchedPtr, + * ::make_cudaExtent + */ +extern __host__ cudaError_t CUDARTAPI cudaMemset3D(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent); + +/** + * \brief Initializes or sets device memory to a value + * + * Fills the first \p count bytes of the memory area pointed to by \p devPtr + * with the constant byte value \p value. + * + * ::cudaMemsetAsync() is asynchronous with respect to the host, so + * the call may return before the memset is complete. The operation can optionally + * be associated to a stream by passing a non-zero \p stream argument. + * If \p stream is non-zero, the operation may overlap with operations in other streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param devPtr - Pointer to device memory + * \param value - Value to set for each byte of specified memory + * \param count - Size in bytes to set + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, + * ::cudaMemset2DAsync, ::cudaMemset3DAsync, + * ::cuMemsetD8Async, + * ::cuMemsetD16Async, + * ::cuMemsetD32Async + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream __dv(0)); + +/** + * \brief Initializes or sets device memory to a value + * + * Sets to the specified value \p value a matrix (\p height rows of \p width + * bytes each) pointed to by \p dstPtr. \p pitch is the width in bytes of the + * 2D array pointed to by \p dstPtr, including any padding added to the end + * of each row. This function performs fastest when the pitch is one that has + * been passed back by ::cudaMallocPitch(). + * + * ::cudaMemset2DAsync() is asynchronous with respect to the host, so + * the call may return before the memset is complete. The operation can optionally + * be associated to a stream by passing a non-zero \p stream argument. + * If \p stream is non-zero, the operation may overlap with operations in other streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param devPtr - Pointer to 2D device memory + * \param pitch - Pitch in bytes of 2D device memory(Unused if \p height is 1) + * \param value - Value to set for each byte of specified memory + * \param width - Width of matrix set (columns in bytes) + * \param height - Height of matrix set (rows) + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, + * ::cudaMemsetAsync, ::cudaMemset3DAsync, + * ::cuMemsetD2D8Async, + * ::cuMemsetD2D16Async, + * ::cuMemsetD2D32Async + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream __dv(0)); + +/** + * \brief Initializes or sets device memory to a value + * + * Initializes each element of a 3D array to the specified value \p value. + * The object to initialize is defined by \p pitchedDevPtr. The \p pitch field + * of \p pitchedDevPtr is the width in memory in bytes of the 3D array pointed + * to by \p pitchedDevPtr, including any padding added to the end of each row. + * The \p xsize field specifies the logical width of each row in bytes, while + * the \p ysize field specifies the height of each 2D slice in rows. + * The \p pitch field of \p pitchedDevPtr is ignored when \p height and \p depth + * are both equal to 1. + * + * The extents of the initialized region are specified as a \p width in bytes, + * a \p height in rows, and a \p depth in slices. + * + * Extents with \p width greater than or equal to the \p xsize of + * \p pitchedDevPtr may perform significantly faster than extents narrower + * than the \p xsize. Secondarily, extents with \p height equal to the + * \p ysize of \p pitchedDevPtr will perform faster than when the \p height is + * shorter than the \p ysize. + * + * This function performs fastest when the \p pitchedDevPtr has been allocated + * by ::cudaMalloc3D(). + * + * ::cudaMemset3DAsync() is asynchronous with respect to the host, so + * the call may return before the memset is complete. The operation can optionally + * be associated to a stream by passing a non-zero \p stream argument. + * If \p stream is non-zero, the operation may overlap with operations in other streams. + * + * The device version of this function only handles device to device copies and + * cannot be given local or shared pointers. + * + * \param pitchedDevPtr - Pointer to pitched device memory + * \param value - Value to set for each byte of specified memory + * \param extent - Size parameters for where to set device memory (\p width field in bytes) + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_memset + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, + * ::cudaMemsetAsync, ::cudaMemset2DAsync, + * ::cudaMalloc3D, ::make_cudaPitchedPtr, + * ::make_cudaExtent + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream __dv(0)); + +/** + * \brief Finds the address associated with a CUDA symbol + * + * Returns in \p *devPtr the address of symbol \p symbol on the device. + * \p symbol is a variable that resides in global or constant memory space. + * If \p symbol cannot be found, or if \p symbol is not declared in the + * global or constant memory space, \p *devPtr is unchanged and the error + * ::cudaErrorInvalidSymbol is returned. + * + * \param devPtr - Return device pointer associated with symbol + * \param symbol - Device symbol address + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaGetSymbolAddress(void**, const T&) "cudaGetSymbolAddress (C++ API)", + * \ref ::cudaGetSymbolSize(size_t*, const void*) "cudaGetSymbolSize (C API)", + * ::cuModuleGetGlobal + */ +extern __host__ cudaError_t CUDARTAPI cudaGetSymbolAddress(void **devPtr, const void *symbol); + +/** + * \brief Finds the size of the object associated with a CUDA symbol + * + * Returns in \p *size the size of symbol \p symbol. \p symbol is a variable that + * resides in global or constant memory space. If \p symbol cannot be found, or + * if \p symbol is not declared in global or constant memory space, \p *size is + * unchanged and the error ::cudaErrorInvalidSymbol is returned. + * + * \param size - Size of object associated with symbol + * \param symbol - Device symbol address + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidSymbol, + * ::cudaErrorNoKernelImageForDevice + * \notefnerr + * \note_string_api_deprecation + * \note_init_rt + * \note_callback + * + * \sa + * \ref ::cudaGetSymbolAddress(void**, const void*) "cudaGetSymbolAddress (C API)", + * \ref ::cudaGetSymbolSize(size_t*, const T&) "cudaGetSymbolSize (C++ API)", + * ::cuModuleGetGlobal + */ +extern __host__ cudaError_t CUDARTAPI cudaGetSymbolSize(size_t *size, const void *symbol); + +/** + * \brief Prefetches memory to the specified destination device + * + * Prefetches memory to the specified destination device. \p devPtr is the + * base device pointer of the memory to be prefetched and \p dstDevice is the + * destination device. \p count specifies the number of bytes to copy. \p stream + * is the stream in which the operation is enqueued. The memory range must refer + * to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables, + * or it may also refer to system-allocated memory on systems with non-zero + * cudaDevAttrPageableMemoryAccess. + * + * Passing in cudaCpuDeviceId for \p dstDevice will prefetch the data to host memory. If + * \p dstDevice is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess + * must be non-zero. Additionally, \p stream must be associated with a device that has a + * non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * + * The start address and end address of the memory range will be rounded down and rounded up + * respectively to be aligned to CPU page size before the prefetch operation is enqueued + * in the stream. + * + * If no physical memory has been allocated for this region, then this memory region + * will be populated and mapped on the destination device. If there's insufficient + * memory to prefetch the desired region, the Unified Memory driver may evict pages from other + * ::cudaMallocManaged allocations to host memory in order to make room. Device memory + * allocated using ::cudaMalloc or ::cudaMallocArray will not be evicted. + * + * By default, any mappings to the previous location of the migrated pages are removed and + * mappings for the new location are only setup on \p dstDevice. The exact behavior however + * also depends on the settings applied to this memory range via ::cudaMemAdvise as described + * below: + * + * If ::cudaMemAdviseSetReadMostly was set on any subset of this memory range, + * then that subset will create a read-only copy of the pages on \p dstDevice. + * + * If ::cudaMemAdviseSetPreferredLocation was called on any subset of this memory + * range, then the pages will be migrated to \p dstDevice even if \p dstDevice is not the + * preferred location of any pages in the memory range. + * + * If ::cudaMemAdviseSetAccessedBy was called on any subset of this memory range, + * then mappings to those pages from all the appropriate processors are updated to + * refer to the new location if establishing such a mapping is possible. Otherwise, + * those mappings are cleared. + * + * Note that this API is not required for functionality and only serves to improve performance + * by allowing the application to migrate data to a suitable location before it is accessed. + * Memory accesses to this range are always coherent and are allowed even when the data is + * actively being migrated. + * + * Note that this function is asynchronous with respect to the host and all work + * on other devices. + * + * \param devPtr - Pointer to be prefetched + * \param count - Size in bytes + * \param dstDevice - Destination device to prefetch to + * \param stream - Stream to enqueue prefetch operation + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, + * ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise, ::cudaMemAdvise_v2 + * ::cuMemPrefetchAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPrefetchAsync(const void *devPtr, size_t count, int dstDevice, cudaStream_t stream __dv(0)); + +/** + * \brief Prefetches memory to the specified destination location + * + * Prefetches memory to the specified destination location. \p devPtr is the + * base device pointer of the memory to be prefetched and \p location specifies the + * destination location. \p count specifies the number of bytes to copy. \p stream + * is the stream in which the operation is enqueued. The memory range must refer + * to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables, + * or it may also refer to system-allocated memory on systems with non-zero + * cudaDevAttrPageableMemoryAccess. + * + * Specifying ::cudaMemLocationTypeDevice for ::cudaMemLocation::type will prefetch memory to GPU + * specified by device ordinal ::cudaMemLocation::id which must have non-zero value for the device attribute + * ::concurrentManagedAccess. Additionally, \p stream must be associated with a device + * that has a non-zero value for the device attribute ::concurrentManagedAccess. + * Specifying ::cudaMemLocationTypeHost as ::cudaMemLocation::type will prefetch data to host memory. + * Applications can request prefetching memory to a specific host NUMA node by specifying + * ::cudaMemLocationTypeHostNuma for ::cudaMemLocation::type and a valid host NUMA node id in ::cudaMemLocation::id + * Users can also request prefetching memory to the host NUMA node closest to the current thread's CPU by specifying + * ::cudaMemLocationTypeHostNumaCurrent for ::cudaMemLocation::type. Note when ::cudaMemLocation::type is etiher + * ::cudaMemLocationTypeHost OR ::cudaMemLocationTypeHostNumaCurrent, ::cudaMemLocation::id will be ignored. + * + * The start address and end address of the memory range will be rounded down and rounded up + * respectively to be aligned to CPU page size before the prefetch operation is enqueued + * in the stream. + * + * If no physical memory has been allocated for this region, then this memory region + * will be populated and mapped on the destination device. If there's insufficient + * memory to prefetch the desired region, the Unified Memory driver may evict pages from other + * ::cudaMallocManaged allocations to host memory in order to make room. Device memory + * allocated using ::cudaMalloc or ::cudaMallocArray will not be evicted. + * + * By default, any mappings to the previous location of the migrated pages are removed and + * mappings for the new location are only setup on the destination location. The exact behavior however + * also depends on the settings applied to this memory range via ::cuMemAdvise as described + * below: + * + * If ::cudaMemAdviseSetReadMostly was set on any subset of this memory range, + * then that subset will create a read-only copy of the pages on destination location. + * If however the destination location is a host NUMA node, then any pages of that subset + * that are already in another host NUMA node will be transferred to the destination. + * + * If ::cudaMemAdviseSetPreferredLocation was called on any subset of this memory + * range, then the pages will be migrated to \p location even if \p location is not the + * preferred location of any pages in the memory range. + * + * If ::cudaMemAdviseSetAccessedBy was called on any subset of this memory range, + * then mappings to those pages from all the appropriate processors are updated to + * refer to the new location if establishing such a mapping is possible. Otherwise, + * those mappings are cleared. + * + * Note that this API is not required for functionality and only serves to improve performance + * by allowing the application to migrate data to a suitable location before it is accessed. + * Memory accesses to this range are always coherent and are allowed even when the data is + * actively being migrated. + * + * Note that this function is asynchronous with respect to the host and all work + * on other devices. + * + * \param devPtr - Pointer to be prefetched + * \param count - Size in bytes + * \param location - location to prefetch to + * \param flags - flags for future use, must be zero now. + * \param stream - Stream to enqueue prefetch operation + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, + * ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise, ::cudaMemAdvise_v2 + * ::cuMemPrefetchAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPrefetchAsync_v2(const void *devPtr, size_t count, struct cudaMemLocation location, unsigned int flags, cudaStream_t stream __dv(0)); + +/** + * \brief Advise about the usage of a given memory range + * + * Advise the Unified Memory subsystem about the usage pattern for the memory range + * starting at \p devPtr with a size of \p count bytes. The start address and end address of the memory + * range will be rounded down and rounded up respectively to be aligned to CPU page size before the + * advice is applied. The memory range must refer to managed memory allocated via ::cudaMallocManaged + * or declared via __managed__ variables. The memory range could also refer to system-allocated pageable + * memory provided it represents a valid, host-accessible region of memory and all additional constraints + * imposed by \p advice as outlined below are also satisfied. Specifying an invalid system-allocated pageable + * memory range results in an error being returned. + * + * The \p advice parameter can take the following values: + * - ::cudaMemAdviseSetReadMostly: This implies that the data is mostly going to be read + * from and only occasionally written to. Any read accesses from any processor to this region will create a + * read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cudaMemPrefetchAsync + * is called on this region, it will create a read-only copy of the data on the destination processor. + * If any processor writes to this region, all copies of the corresponding page will be invalidated + * except for the one where the write occurred. The \p device argument is ignored for this advice. + * Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU + * that has a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * Also, if a context is created on a device that does not have the device attribute + * ::cudaDevAttrConcurrentManagedAccess set, then read-duplication will not occur until + * all such contexts are destroyed. + * If the memory region refers to valid system-allocated pageable memory, then the accessing device must + * have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess for a read-only + * copy to be created on that device. Note however that if the accessing device also has a non-zero value for the + * device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice + * will not create a read-only copy when that device accesses this memory region. + * + * - ::cudaMemAdviceUnsetReadMostly: Undoes the effect of ::cudaMemAdviceReadMostly and also prevents the + * Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated + * copies of the data will be collapsed into a single copy. The location for the collapsed + * copy will be the preferred location if the page has a preferred location and one of the read-duplicated + * copies was resident at that location. Otherwise, the location chosen is arbitrary. + * + * - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the + * data to be the memory belonging to \p device. Passing in cudaCpuDeviceId for \p device sets the + * preferred location as host memory. If \p device is a GPU, then it must have a non-zero value for the + * device attribute ::cudaDevAttrConcurrentManagedAccess. Setting the preferred location + * does not cause data to migrate to that location immediately. Instead, it guides the migration policy + * when a fault occurs on that memory region. If the data is already in its preferred location and the + * faulting processor can establish a mapping without requiring the data to be migrated, then + * data migration will be avoided. On the other hand, if the data is not in its preferred location + * or if a direct mapping cannot be established, then it will be migrated to the processor accessing + * it. It is important to note that setting the preferred location does not prevent data prefetching + * done using ::cudaMemPrefetchAsync. + * Having a preferred location can override the page thrash detection and resolution logic in the Unified + * Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device + * memory, the page may eventually be pinned to host memory by the Unified Memory driver. But + * if the preferred location is set as device memory, then the page will continue to thrash indefinitely. + * If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the + * policies associated with that advice will override the policies of this advice, unless read accesses from + * \p device will not result in a read-only copy being created on that device as outlined in description for + * the advice ::cudaMemAdviseSetReadMostly. + * If the memory region refers to valid system-allocated pageable memory, then \p device must have a non-zero + * value for the device attribute ::cudaDevAttrPageableMemoryAccess. + * + * - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation + * and changes the preferred location to none. + * + * - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by \p device. + * Passing in ::cudaCpuDeviceId for \p device will set the advice for the CPU. If \p device is a GPU, then + * the device attribute ::cudaDevAttrConcurrentManagedAccess must be non-zero. + * This advice does not cause data migration and has no impact on the location of the data per se. Instead, + * it causes the data to always be mapped in the specified processor's page tables, as long as the + * location of the data permits a mapping to be established. If the data gets migrated for any reason, + * the mappings are updated accordingly. + * This advice is recommended in scenarios where data locality is not important, but avoiding faults is. + * Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the + * data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data + * over to the other GPUs is not as important because the accesses are infrequent and the overhead of + * migration may be too high. But preventing faults can still help improve performance, and so having + * a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated + * to host memory because the CPU typically cannot access device memory directly. Any GPU that had the + * ::cudaMemAdviceSetAccessedBy flag set for this data will now have its mapping updated to point to the + * page in host memory. + * If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the + * policies associated with that advice will override the policies of this advice. Additionally, if the + * preferred location of this memory region or any subset of it is also \p device, then the policies + * associated with ::cudaMemAdviseSetPreferredLocation will override the policies of this advice. + * If the memory region refers to valid system-allocated pageable memory, then \p device must have a non-zero + * value for the device attribute ::cudaDevAttrPageableMemoryAccess. Additionally, if \p device has + * a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, + * then this call has no effect. + * + * - ::cudaMemAdviseUnsetAccessedBy: Undoes the effect of ::cudaMemAdviseSetAccessedBy. Any mappings to + * the data from \p device may be removed at any time causing accesses to result in non-fatal page faults. + * If the memory region refers to valid system-allocated pageable memory, then \p device must have a non-zero + * value for the device attribute ::cudaDevAttrPageableMemoryAccess. Additionally, if \p device has + * a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, + * then this call has no effect. + * + * \param devPtr - Pointer to memory to set the advice for + * \param count - Size in bytes of the memory range + * \param advice - Advice to be applied for the specified memory range + * \param device - Device to apply the advice for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, + * ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync, + * ::cuMemAdvise + */ +extern __host__ cudaError_t CUDARTAPI cudaMemAdvise(const void *devPtr, size_t count, enum cudaMemoryAdvise advice, int device); + +/** + * \brief Advise about the usage of a given memory range + * + * Advise the Unified Memory subsystem about the usage pattern for the memory range + * starting at \p devPtr with a size of \p count bytes. The start address and end address of the memory + * range will be rounded down and rounded up respectively to be aligned to CPU page size before the + * advice is applied. The memory range must refer to managed memory allocated via ::cudaMallocManaged + * or declared via __managed__ variables. The memory range could also refer to system-allocated pageable + * memory provided it represents a valid, host-accessible region of memory and all additional constraints + * imposed by \p advice as outlined below are also satisfied. Specifying an invalid system-allocated pageable + * memory range results in an error being returned. + * + * The \p advice parameter can take the following values: + * - ::cudaMemAdviseSetReadMostly: This implies that the data is mostly going to be read + * from and only occasionally written to. Any read accesses from any processor to this region will create a + * read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cudaMemPrefetchAsync + * or ::cudaMemPrefetchAsync_v2 is called on this region, it will create a read-only copy of the data on the destination processor. + * If the target location for ::cudaMemPrefetchAsync_v2 is a host NUMA node and a read-only copy already exists on + * another host NUMA node, that copy will be migrated to the targeted host NUMA node. + * If any processor writes to this region, all copies of the corresponding page will be invalidated + * except for the one where the write occurred. If the writing processor is the CPU and the preferred location of + * the page is a host NUMA node, then the page will also be migrated to that host NUMA node. The \p location argument is ignored for this advice. + * Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU + * that has a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * Also, if a context is created on a device that does not have the device attribute + * ::cudaDevAttrConcurrentManagedAccess set, then read-duplication will not occur until + * all such contexts are destroyed. + * If the memory region refers to valid system-allocated pageable memory, then the accessing device must + * have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess for a read-only + * copy to be created on that device. Note however that if the accessing device also has a non-zero value for the + * device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice + * will not create a read-only copy when that device accesses this memory region. + * + * - ::cudaMemAdviceUnsetReadMostly: Undoes the effect of ::cudaMemAdviseSetReadMostly and also prevents the + * Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated + * copies of the data will be collapsed into a single copy. The location for the collapsed + * copy will be the preferred location if the page has a preferred location and one of the read-duplicated + * copies was resident at that location. Otherwise, the location chosen is arbitrary. + * Note: The \p location argument is ignored for this advice. + * + * - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the + * data to be the memory belonging to \p location. When ::cudaMemLocation::type is ::cudaMemLocationTypeHost, + * ::cudaMemLocation::id is ignored and the preferred location is set to be host memory. To set the preferred location + * to a specific host NUMA node, applications must set ::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and + * ::cudaMemLocation::id must specify the NUMA ID of the host NUMA node. If ::cudaMemLocation::type is set to ::cudaMemLocationTypeHostNumaCurrent, + * ::cudaMemLocation::id will be ignored and the host NUMA node closest to the calling thread's CPU will be used as the preferred location. + * If ::cudaMemLocation::type is a ::cudaMemLocationTypeDevice, then ::cudaMemLocation::id must be a valid device ordinal + * and the device must have a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess. + * Setting the preferred location does not cause data to migrate to that location immediately. Instead, it guides the migration policy + * when a fault occurs on that memory region. If the data is already in its preferred location and the + * faulting processor can establish a mapping without requiring the data to be migrated, then + * data migration will be avoided. On the other hand, if the data is not in its preferred location + * or if a direct mapping cannot be established, then it will be migrated to the processor accessing + * it. It is important to note that setting the preferred location does not prevent data prefetching + * done using ::cudaMemPrefetchAsync. + * Having a preferred location can override the page thrash detection and resolution logic in the Unified + * Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device + * memory, the page may eventually be pinned to host memory by the Unified Memory driver. But + * if the preferred location is set as device memory, then the page will continue to thrash indefinitely. + * If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the + * policies associated with that advice will override the policies of this advice, unless read accesses from + * \p location will not result in a read-only copy being created on that procesor as outlined in description for + * the advice ::cudaMemAdviseSetReadMostly. + * If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice + * then ::cudaMemLocation::id must be a valid device that has a non-zero alue for the device attribute ::cudaDevAttrPageableMemoryAccess. + * + * - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation + * and changes the preferred location to none. The \p location argument is ignored for this advice. + * + * - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by processor \p location. + * The ::cudaMemLocation::type must be either ::cudaMemLocationTypeDevice with ::cudaMemLocation::id representing a valid device + * ordinal or ::cudaMemLocationTypeHost and ::cudaMemLocation::id will be ignored. All other location types are invalid. + * If ::cudaMemLocation::id is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess must be non-zero. + * This advice does not cause data migration and has no impact on the location of the data per se. Instead, + * it causes the data to always be mapped in the specified processor's page tables, as long as the + * location of the data permits a mapping to be established. If the data gets migrated for any reason, + * the mappings are updated accordingly. + * This advice is recommended in scenarios where data locality is not important, but avoiding faults is. + * Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the + * data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data + * over to the other GPUs is not as important because the accesses are infrequent and the overhead of + * migration may be too high. But preventing faults can still help improve performance, and so having + * a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated + * to host memory because the CPU typically cannot access device memory directly. Any GPU that had the + * ::cudaMemAdviseSetAccessedBy flag set for this data will now have its mapping updated to point to the + * page in host memory. + * If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the + * policies associated with that advice will override the policies of this advice. Additionally, if the + * preferred location of this memory region or any subset of it is also \p location, then the policies + * associated with ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the policies of this advice. + * If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice + * then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess. + * Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, + * then this call has no effect. + * + * - ::CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of ::cudaMemAdviseSetAccessedBy. Any mappings to + * the data from \p location may be removed at any time causing accesses to result in non-fatal page faults. + * If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice + * then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess. + * Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, + * then this call has no effect. + * + * \param devPtr - Pointer to memory to set the advice for + * \param count - Size in bytes of the memory range + * \param advice - Advice to be applied for the specified memory range + * \param location - location to apply the advice for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, + * ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync, + * ::cuMemAdvise, ::cuMemAdvise_v2 + */ +extern __host__ cudaError_t CUDARTAPI cudaMemAdvise_v2(const void *devPtr, size_t count, enum cudaMemoryAdvise advice, struct cudaMemLocation location); + +/** +* \brief Query an attribute of a given memory range +* +* Query an attribute about the memory range starting at \p devPtr with a size of \p count bytes. The +* memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via +* __managed__ variables. +* +* The \p attribute parameter can take the following values: +* - ::cudaMemRangeAttributeReadMostly: If this attribute is specified, \p data will be interpreted +* as a 32-bit integer, and \p dataSize must be 4. The result returned will be 1 if all pages in the given +* memory range have read-duplication enabled, or 0 otherwise. +* - ::cudaMemRangeAttributePreferredLocation: If this attribute is specified, \p data will be +* interpreted as a 32-bit integer, and \p dataSize must be 4. The result returned will be a GPU device +* id if all pages in the memory range have that GPU as their preferred location, or it will be cudaCpuDeviceId +* if all pages in the memory range have the CPU as their preferred location, or it will be cudaInvalidDeviceId +* if either all the pages don't have the same preferred location or some of the pages don't have a +* preferred location at all. Note that the actual location of the pages in the memory range at the time of +* the query may be different from the preferred location. +* - ::cudaMemRangeAttributeAccessedBy: If this attribute is specified, \p data will be interpreted +* as an array of 32-bit integers, and \p dataSize must be a non-zero multiple of 4. The result returned +* will be a list of device ids that had ::cudaMemAdviceSetAccessedBy set for that entire memory range. +* If any device does not have that advice set for the entire memory range, that device will not be included. +* If \p data is larger than the number of devices that have that advice set for that memory range, +* cudaInvalidDeviceId will be returned in all the extra space provided. For ex., if \p dataSize is 12 +* (i.e. \p data has 3 elements) and only device 0 has the advice set, then the result returned will be +* { 0, cudaInvalidDeviceId, cudaInvalidDeviceId }. If \p data is smaller than the number of devices that have +* that advice set, then only as many devices will be returned as can fit in the array. There is no +* guarantee on which specific devices will be returned, however. +* - ::cudaMemRangeAttributeLastPrefetchLocation: If this attribute is specified, \p data will be +* interpreted as a 32-bit integer, and \p dataSize must be 4. The result returned will be the last location +* to which all pages in the memory range were prefetched explicitly via ::cudaMemPrefetchAsync. This will either be +* a GPU id or cudaCpuDeviceId depending on whether the last location for prefetch was a GPU or the CPU +* respectively. If any page in the memory range was never explicitly prefetched or if all pages were not +* prefetched to the same location, cudaInvalidDeviceId will be returned. Note that this simply returns the +* last location that the applicaton requested to prefetch the memory range to. It gives no indication as to +* whether the prefetch operation to that location has completed or even begun. + * - ::cudaMemRangeAttributePreferredLocationType: If this attribute is specified, \p data will be + * interpreted as a ::cudaMemLocationType, and \p dataSize must be sizeof(cudaMemLocationType). The ::cudaMemLocationType returned will be + * ::cudaMemLocationTypeDevice if all pages in the memory range have the same GPU as their preferred location, or ::cudaMemLocationType + * will be ::cudaMemLocationTypeHost if all pages in the memory range have the CPU as their preferred location, or or it will be ::cudaMemLocationTypeHostNuma + * if all the pages in the memory range have the same host NUMA node ID as their preferred location or it will be ::cudaMemLocationTypeInvalid + * if either all the pages don't have the same preferred location or some of the pages don't have a preferred location at all. + * Note that the actual location type of the pages in the memory range at the time of the query may be different from the preferred location type. + * - ::cudaMemRangeAttributePreferredLocationId: If this attribute is specified, \p data will be + * interpreted as a 32-bit integer, and \p dataSize must be 4. If the ::cudaMemRangeAttributePreferredLocationType query for the same address range + * returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID + * or if it returns any other location type, the id should be ignored. + * - ::cudaMemRangeAttributeLastPrefetchLocationType: If this attribute is specified, \p data will be + * interpreted as a ::cudaMemLocationType, and \p dataSize must be sizeof(cudaMemLocationType). The result returned will be the last location type + * to which all pages in the memory range were prefetched explicitly via ::cuMemPrefetchAsync. The ::cudaMemLocationType returned + * will be ::cudaMemLocationTypeDevice if the last prefetch location was the GPU or ::cudaMemLocationTypeHost if it was the CPU or ::cudaMemLocationTypeHostNuma if + * the last prefetch location was a specific host NUMA node. If any page in the memory range was never explicitly prefetched or if all pages were not + * prefetched to the same location, ::CUmemLocationType will be ::cudaMemLocationTypeInvalid. + * Note that this simply returns the last location type that the application requested to prefetch the memory range to. It gives no indication as to + * whether the prefetch operation to that location has completed or even begun. + * - ::cudaMemRangeAttributeLastPrefetchLocationId: If this attribute is specified, \p data will be + * interpreted as a 32-bit integer, and \p dataSize must be 4. If the ::cudaMemRangeAttributeLastPrefetchLocationType query for the same address range + * returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID + * or if it returns any other location type, the id should be ignored. +* +* \param data - A pointers to a memory location where the result +* of each attribute query will be written to. +* \param dataSize - Array containing the size of data +* \param attribute - The attribute to query +* \param devPtr - Start of the range to query +* \param count - Size of the range to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemRangeGetAttributes, ::cudaMemPrefetchAsync, + * ::cudaMemAdvise, + * ::cuMemRangeGetAttribute + */ +extern __host__ cudaError_t CUDARTAPI cudaMemRangeGetAttribute(void *data, size_t dataSize, enum cudaMemRangeAttribute attribute, const void *devPtr, size_t count); + +/** + * \brief Query attributes of a given memory range. + * + * Query attributes of the memory range starting at \p devPtr with a size of \p count bytes. The + * memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via + * __managed__ variables. The \p attributes array will be interpreted to have \p numAttributes + * entries. The \p dataSizes array will also be interpreted to have \p numAttributes entries. + * The results of the query will be stored in \p data. + * + * The list of supported attributes are given below. Please refer to ::cudaMemRangeGetAttribute for + * attribute descriptions and restrictions. + * + * - ::cudaMemRangeAttributeReadMostly + * - ::cudaMemRangeAttributePreferredLocation + * - ::cudaMemRangeAttributeAccessedBy + * - ::cudaMemRangeAttributeLastPrefetchLocation + * - :: cudaMemRangeAttributePreferredLocationType + * - :: cudaMemRangeAttributePreferredLocationId + * - :: cudaMemRangeAttributeLastPrefetchLocationType + * - :: cudaMemRangeAttributeLastPrefetchLocationId + * + * \param data - A two-dimensional array containing pointers to memory + * locations where the result of each attribute query will be written to. + * \param dataSizes - Array containing the sizes of each result + * \param attributes - An array of attributes to query + * (numAttributes and the number of attributes in this array should match) + * \param numAttributes - Number of attributes to query + * \param devPtr - Start of the range to query + * \param count - Size of the range to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemRangeGetAttribute, ::cudaMemAdvise, + * ::cudaMemPrefetchAsync, + * ::cuMemRangeGetAttributes + */ +extern __host__ cudaError_t CUDARTAPI cudaMemRangeGetAttributes(void **data, size_t *dataSizes, enum cudaMemRangeAttribute *attributes, size_t numAttributes, const void *devPtr, size_t count); + +/** @} */ /* END CUDART_MEMORY */ + +/** + * \defgroup CUDART_MEMORY_DEPRECATED Memory Management [DEPRECATED] + * + * ___MANBRIEF___ deprecated memory management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes deprecated memory management functions of the CUDA runtime + * application programming interface. + * + * Some functions have overloaded C++ API template versions documented separately in the + * \ref CUDART_HIGHLEVEL "C++ API Routines" module. + * + * @{ + */ + +/** + * \brief Copies data between host and device + * + * \deprecated + * + * Copies \p count bytes from the memory area pointed to by \p src to the + * CUDA array \p dst starting at \p hOffset rows and \p wOffset bytes from + * the upper left corner, where \p kind specifies the direction + * of the copy, and must be one of ::cudaMemcpyHostToHost, + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * \param dst - Destination memory address + * \param wOffset - Destination starting X offset (columns in bytes) + * \param hOffset - Destination starting Y offset (rows) + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, + * ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyHtoA, + * ::cuMemcpyDtoA + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind); + +/** + * \brief Copies data between host and device + * + * \deprecated + * + * Copies \p count bytes from the CUDA array \p src starting at \p hOffset rows + * and \p wOffset bytes from the upper left corner to the memory area pointed to + * by \p dst, where \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * \param dst - Destination memory address + * \param src - Source memory address + * \param wOffset - Source starting X offset (columns in bytes) + * \param hOffset - Source starting Y offset (rows) + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_sync + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray, + * ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyAtoH, + * ::cuMemcpyAtoD + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaMemcpyFromArray(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind); + +/** + * \brief Copies data between host and device + * + * \deprecated + * + * Copies \p count bytes from the CUDA array \p src starting at \p hOffsetSrc + * rows and \p wOffsetSrc bytes from the upper left corner to the CUDA array + * \p dst starting at \p hOffsetDst rows and \p wOffsetDst bytes from the upper + * left corner, where \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * \param dst - Destination memory address + * \param wOffsetDst - Destination starting X offset (columns in bytes) + * \param hOffsetDst - Destination starting Y offset (rows) + * \param src - Source memory address + * \param wOffsetSrc - Source starting X offset (columns in bytes) + * \param hOffsetSrc - Source starting Y offset (rows) + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray, + * ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyAtoA + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaMemcpyArrayToArray(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 __dv(cudaMemcpyDeviceToDevice)); + +/** + * \brief Copies data between host and device + * + * \deprecated + * + * Copies \p count bytes from the memory area pointed to by \p src to the + * CUDA array \p dst starting at \p hOffset rows and \p wOffset bytes from + * the upper left corner, where \p kind specifies the + * direction of the copy, and must be one of ::cudaMemcpyHostToHost, + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * ::cudaMemcpyToArrayAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If \p + * kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \p stream + * is non-zero, the copy may overlap with operations in other streams. + * + * \param dst - Destination memory address + * \param wOffset - Destination starting X offset (columns in bytes) + * \param hOffset - Destination starting Y offset (rows) + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray, + * ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyHtoAAsync, + * ::cuMemcpy2DAsync + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + +/** + * \brief Copies data between host and device + * + * \deprecated + * + * Copies \p count bytes from the CUDA array \p src starting at \p hOffset rows + * and \p wOffset bytes from the upper left corner to the memory area pointed to + * by \p dst, where \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * ::cudaMemcpyFromArrayAsync() is asynchronous with respect to the host, so + * the call may return before the copy is complete. The copy can optionally + * be associated to a stream by passing a non-zero \p stream argument. If \p + * kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \p stream + * is non-zero, the copy may overlap with operations in other streams. + * + * \param dst - Destination memory address + * \param src - Source memory address + * \param wOffset - Source starting X offset (columns in bytes) + * \param hOffset - Source starting Y offset (rows) + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * \param stream - Stream identifier + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidMemcpyDirection + * \notefnerr + * \note_async + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray, + * ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray, + * ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol, + * ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync, + * ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync, + * ::cudaMemcpy2DFromArrayAsync, + * ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync, + * ::cuMemcpyAtoHAsync, + * ::cuMemcpy2DAsync + */ +extern __CUDA_DEPRECATED __host__ cudaError_t CUDARTAPI cudaMemcpyFromArrayAsync(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + +/** @} */ /* END CUDART_MEMORY_DEPRECATED */ + +/** + * \defgroup CUDART_MEMORY_POOLS Stream Ordered Memory Allocator + * + * ___MANBRIEF___ Functions for performing allocation and free operations in stream order. + * Functions for controlling the behavior of the underlying allocator. + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * + * @{ + * + * \section CUDART_MEMORY_POOLS_overview overview + * + * The asynchronous allocator allows the user to allocate and free in stream order. + * All asynchronous accesses of the allocation must happen between + * the stream executions of the allocation and the free. If the memory is accessed + * outside of the promised stream order, a use before allocation / use after free error + * will cause undefined behavior. + * + * The allocator is free to reallocate the memory as long as it can guarantee + * that compliant memory accesses will not overlap temporally. + * The allocator may refer to internal stream ordering as well as inter-stream dependencies + * (such as CUDA events and null stream dependencies) when establishing the temporal guarantee. + * The allocator may also insert inter-stream dependencies to establish the temporal guarantee. + * + * \section CUDART_MEMORY_POOLS_support Supported Platforms + * + * Whether or not a device supports the integrated stream ordered memory allocator + * may be queried by calling ::cudaDeviceGetAttribute() with the device attribute + * ::cudaDevAttrMemoryPoolsSupported. + */ + +/** + * \brief Allocates memory with stream ordered semantics + * + * Inserts an allocation operation into \p hStream. + * A pointer to the allocated memory is returned immediately in *dptr. + * The allocation must not be accessed until the the allocation operation completes. + * The allocation comes from the memory pool associated with the stream's device. + * + * \note The default memory pool of a device contains device memory from that device. + * \note Basic stream ordering allows future work submitted into the same stream to use the allocation. + * Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation + * operation completes before work submitted in a separate stream runs. + * \note During stream capture, this function results in the creation of an allocation node. In this case, + * the allocation is owned by the graph instead of the memory pool. The memory pool's properties + * are used to set the node's creation parameters. + * + * \param[out] devPtr - Returned device pointer + * \param[in] size - Number of bytes to allocate + * \param[in] hStream - The stream establishing the stream ordering contract and the memory pool to allocate from + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported, + * ::cudaErrorOutOfMemory, + * \notefnerr + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cuMemAllocAsync, + * \ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) "cudaMallocAsync (C++ API)", + * ::cudaMallocFromPoolAsync, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute, ::cudaMemPoolGetAttribute + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocAsync(void **devPtr, size_t size, cudaStream_t hStream); + +/** + * \brief Frees memory with stream ordered semantics + * + * Inserts a free operation into \p hStream. + * The allocation must not be accessed after stream execution reaches the free. + * After this API returns, accessing the memory from any subsequent work launched on the GPU + * or querying its pointer attributes results in undefined behavior. + * + * \note During stream capture, this function results in the creation of a free node and + * must therefore be passed the address of a graph allocation. + * + * \param dptr - memory to free + * \param hStream - The stream establishing the stream ordering promise + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * \notefnerr + * \note_null_stream + * \note_init_rt + * \note_callback + * + * \sa ::cuMemFreeAsync, ::cudaMallocAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaFreeAsync(void *devPtr, cudaStream_t hStream); + +/** + * \brief Tries to release memory back to the OS + * + * Releases memory back to the OS until the pool contains fewer than minBytesToKeep + * reserved bytes, or there is no more memory that the allocator can safely release. + * The allocator cannot release OS allocations that back outstanding asynchronous allocations. + * The OS allocations may happen at different granularity from the user allocations. + * + * \note: Allocations that have not been freed count as outstanding. + * \note: Allocations that have been asynchronously freed but whose completion has + * not been observed on the host (eg. by a synchronize) can count as outstanding. + * + * \param[in] pool - The memory pool to trim + * \param[in] minBytesToKeep - If the pool has less than minBytesToKeep reserved, + * the TrimTo operation is a no-op. Otherwise the pool will be guaranteed to have + * at least minBytesToKeep bytes reserved after the operation. + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_callback + * + * \sa ::cuMemPoolTrimTo, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep); + +/** + * \brief Sets attributes of a memory pool + * + * Supported attributes are: + * - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t) + * Amount of reserved memory in bytes to hold onto before trying + * to release memory back to the OS. When more than the release + * threshold bytes of memory are held by the memory pool, the + * allocator will try to release memory back to the OS on the + * next call to stream, event or context synchronize. (default 0) + * - ::cudaMemPoolReuseFollowEventDependencies: (value type = int) + * Allow ::cudaMallocAsync to use memory asynchronously freed + * in another stream as long as a stream ordering dependency + * of the allocating stream on the free action exists. + * Cuda events and null stream interactions can create the required + * stream ordered dependencies. (default enabled) + * - ::cudaMemPoolReuseAllowOpportunistic: (value type = int) + * Allow reuse of already completed frees when there is no dependency + * between the free and allocation. (default enabled) + * - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int) + * Allow ::cudaMallocAsync to insert new stream dependencies + * in order to establish the stream ordering required to reuse + * a piece of memory released by ::cudaFreeAsync (default enabled). + * - ::cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t) + * Reset the high watermark that tracks the amount of backing memory that was + * allocated for the memory pool. It is illegal to set this attribute to a non-zero value. + * - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t) + * Reset the high watermark that tracks the amount of used memory that was + * allocated for the memory pool. It is illegal to set this attribute to a non-zero value. + * + * \param[in] pool - The memory pool to modify + * \param[in] attr - The attribute to modify + * \param[in] value - Pointer to the value to assign + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_callback + * + * \sa ::cuMemPoolSetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate + + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolSetAttribute(cudaMemPool_t memPool, enum cudaMemPoolAttr attr, void *value ); + +/** + * \brief Gets attributes of a memory pool + * + * Supported attributes are: + * - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t) + * Amount of reserved memory in bytes to hold onto before trying + * to release memory back to the OS. When more than the release + * threshold bytes of memory are held by the memory pool, the + * allocator will try to release memory back to the OS on the + * next call to stream, event or context synchronize. (default 0) + * - ::cudaMemPoolReuseFollowEventDependencies: (value type = int) + * Allow ::cudaMallocAsync to use memory asynchronously freed + * in another stream as long as a stream ordering dependency + * of the allocating stream on the free action exists. + * Cuda events and null stream interactions can create the required + * stream ordered dependencies. (default enabled) + * - ::cudaMemPoolReuseAllowOpportunistic: (value type = int) + * Allow reuse of already completed frees when there is no dependency + * between the free and allocation. (default enabled) + * - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int) + * Allow ::cudaMallocAsync to insert new stream dependencies + * in order to establish the stream ordering required to reuse + * a piece of memory released by ::cudaFreeAsync (default enabled). + * - ::cudaMemPoolAttrReservedMemCurrent: (value type = cuuint64_t) + * Amount of backing memory currently allocated for the mempool. + * - ::cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t) + * High watermark of backing memory allocated for the mempool since + * the last time it was reset. + * - ::cudaMemPoolAttrUsedMemCurrent: (value type = cuuint64_t) + * Amount of memory from the pool that is currently in use by the application. + * - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t) + * High watermark of the amount of memory from the pool that was in use by the + * application since the last time it was reset. + * + * \param[in] pool - The memory pool to get attributes of + * \param[in] attr - The attribute to get + * \param[in] value - Retrieved value + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_callback + * + * \sa ::cuMemPoolGetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate + + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolGetAttribute(cudaMemPool_t memPool, enum cudaMemPoolAttr attr, void *value ); + +/** + * \brief Controls visibility of pools between devices + * + * \param[in] pool - The pool being modified + * \param[in] map - Array of access descriptors. Each descriptor instructs the access to enable for a single gpu + * \param[in] count - Number of descriptors in the map array. + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa ::cuMemPoolSetAccess, ::cudaMemPoolGetAccess, ::cudaMallocAsync, cudaFreeAsync + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolSetAccess(cudaMemPool_t memPool, const struct cudaMemAccessDesc *descList, size_t count); + +/** + * \brief Returns the accessibility of a pool from a device + * + * Returns the accessibility of the pool's memory from the specified location. + * + * \param[out] flags - the accessibility of the pool from the specified location + * \param[in] memPool - the pool being queried + * \param[in] location - the location accessing the pool + * + * \sa ::cuMemPoolGetAccess, ::cudaMemPoolSetAccess + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolGetAccess(enum cudaMemAccessFlags *flags, cudaMemPool_t memPool, struct cudaMemLocation *location); + +/** + * \brief Creates a memory pool + * + * Creates a CUDA memory pool and returns the handle in \p pool. The \p poolProps determines + * the properties of the pool such as the backing device and IPC capabilities. + * + * To create a memory pool targeting a specific host NUMA node, applications must + * set ::cudaMemPoolProps::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and + * ::cudaMemPoolProps::cudaMemLocation::id must specify the NUMA ID of the host memory node. + * Specifying ::cudaMemLocationTypeHostNumaCurrent or ::cudaMemLocationTypeHost as the + * ::cudaMemPoolProps::cudaMemLocation::type will result in ::cudaErrorInvalidValue. +* By default, the pool's memory will be accessible from the device it is allocated on. + * In the case of pools created with ::cudaMemLocationTypeHostNuma, their default accessibility + * will be from the host CPU. + * Applications can control the maximum size of the pool by specifying a non-zero value for ::cudaMemPoolProps::maxSize. + * If set to 0, the maximum size of the pool will default to a system dependent value. + * + * Applications that intend to use ::CU_MEM_HANDLE_TYPE_FABRIC based memory sharing must ensure: + * (1) `nvidia-caps-imex-channels` character device is created by the driver and is listed under /proc/devices + * (2) have at least one IMEX channel file accessible by the user launching the application. + * + * When exporter and importer CUDA processes have been granted access to the same IMEX channel, they can securely + * share memory. + * + * The IMEX channel security model works on a per user basis. Which means all processes under a user can share + * memory if the user has access to a valid IMEX channel. When multi-user isolation is desired, a separate IMEX + * channel is required for each user. + * + * These channel files exist in /dev/nvidia-caps-imex-channels/channel* and can be created using standard OS + * native calls like mknod on Linux. For example: To create channel0 with the major number from /proc/devices + * users can execute the following command: `mknod /dev/nvidia-caps-imex-channels/channel0 c 0` + * + * \note Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC. + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * + * \sa ::cuMemPoolCreate, ::cudaDeviceSetMemPool, ::cudaMallocFromPoolAsync, ::cudaMemPoolExportToShareableHandle, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool + + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolCreate(cudaMemPool_t *memPool, const struct cudaMemPoolProps *poolProps); + +/** + * \brief Destroys the specified memory pool + * + * If any pointers obtained from this pool haven't been freed or + * the pool has free operations that haven't completed + * when ::cudaMemPoolDestroy is invoked, the function will return immediately and the + * resources associated with the pool will be released automatically + * once there are no more outstanding allocations. + * + * Destroying the current mempool of a device sets the default mempool of + * that device as the current mempool for that device. + * + * \note A device's default memory pool cannot be destroyed. + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa cuMemPoolDestroy, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolDestroy(cudaMemPool_t memPool); + +/** + * \brief Allocates memory from a specified pool with stream ordered semantics. + * + * Inserts an allocation operation into \p hStream. + * A pointer to the allocated memory is returned immediately in *dptr. + * The allocation must not be accessed until the the allocation operation completes. + * The allocation comes from the specified memory pool. + * + * \note + * - The specified memory pool may be from a device different than that of the specified \p hStream. + * + * - Basic stream ordering allows future work submitted into the same stream to use the allocation. + * Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation + * operation completes before work submitted in a separate stream runs. + * + * \note During stream capture, this function results in the creation of an allocation node. In this case, + * the allocation is owned by the graph instead of the memory pool. The memory pool's properties + * are used to set the node's creation parameters. + * + * \param[out] ptr - Returned device pointer + * \param[in] bytesize - Number of bytes to allocate + * \param[in] memPool - The pool to allocate from + * \param[in] stream - The stream establishing the stream ordering semantic + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported, + * ::cudaErrorOutOfMemory + * + * \sa ::cuMemAllocFromPoolAsync, + * \ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) "cudaMallocAsync (C++ API)", + * ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute + */ +extern __host__ cudaError_t CUDARTAPI cudaMallocFromPoolAsync(void **ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream); + +/** + * \brief Exports a memory pool to the requested handle type. + * + * Given an IPC capable mempool, create an OS handle to share the pool with another process. + * A recipient process can convert the shareable handle into a mempool with ::cudaMemPoolImportFromShareableHandle. + * Individual pointers can then be shared with the ::cudaMemPoolExportPointer and ::cudaMemPoolImportPointer APIs. + * The implementation of what the shareable handle is and how it can be transferred is defined by the requested + * handle type. + * + * \note: To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone. + * + * \param[out] handle_out - pointer to the location in which to store the requested handle + * \param[in] pool - pool to export + * \param[in] handleType - the type of handle to create + * \param[in] flags - must be 0 + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorOutOfMemory + * + * \sa ::cuMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolExportToShareableHandle( + void *shareableHandle, + cudaMemPool_t memPool, + enum cudaMemAllocationHandleType handleType, + unsigned int flags); + +/** + * \brief imports a memory pool from a shared handle. + * + * Specific allocations can be imported from the imported pool with ::cudaMemPoolImportPointer. + * + * \note Imported memory pools do not support creating new allocations. + * As such imported memory pools may not be used in ::cudaDeviceSetMemPool + * or ::cudaMallocFromPoolAsync calls. + * + * \param[out] pool_out - Returned memory pool + * \param[in] handle - OS handle of the pool to open + * \param[in] handleType - The type of handle being imported + * \param[in] flags - must be 0 + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorOutOfMemory + * + * \sa ::cuMemPoolImportFromShareableHandle, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolImportFromShareableHandle( + cudaMemPool_t *memPool, + void *shareableHandle, + enum cudaMemAllocationHandleType handleType, + unsigned int flags); + +/** + * \brief Export data to share a memory pool allocation between processes. + * + * Constructs \p shareData_out for sharing a specific allocation from an already shared memory pool. + * The recipient process can import the allocation with the ::cudaMemPoolImportPointer api. + * The data is not a handle and may be shared through any IPC mechanism. + * + * \param[out] shareData_out - Returned export data + * \param[in] ptr - pointer to memory being exported + * + * \returns + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorOutOfMemory + * + * \sa ::cuMemPoolExportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolImportPointer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolExportPointer(struct cudaMemPoolPtrExportData *exportData, void *ptr); + +/** + * \brief Import a memory pool allocation from another process. + * + * Returns in \p ptr_out a pointer to the imported memory. + * The imported memory must not be accessed before the allocation operation completes + * in the exporting process. The imported memory must be freed from all importing processes before + * being freed in the exporting process. The pointer may be freed with cudaFree + * or cudaFreeAsync. If ::cudaFreeAsync is used, the free must be completed + * on the importing process before the free operation on the exporting process. + * + * \note The ::cudaFreeAsync api may be used in the exporting process before + * the ::cudaFreeAsync operation completes in its stream as long as the + * ::cudaFreeAsync in the exporting process specifies a stream with + * a stream dependency on the importing process's ::cudaFreeAsync. + * + * \param[out] ptr_out - pointer to imported memory + * \param[in] pool - pool from which to import + * \param[in] shareData - data specifying the memory to import + * + * \returns + * ::CUDA_SUCCESS, + * ::CUDA_ERROR_INVALID_VALUE, + * ::CUDA_ERROR_NOT_INITIALIZED, + * ::CUDA_ERROR_OUT_OF_MEMORY + * + * \sa ::cuMemPoolImportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer + */ +extern __host__ cudaError_t CUDARTAPI cudaMemPoolImportPointer(void **ptr, cudaMemPool_t memPool, struct cudaMemPoolPtrExportData *exportData); + +/** @} */ /* END CUDART_MEMORY_POOLS */ + +/** + * \defgroup CUDART_UNIFIED Unified Addressing + * + * ___MANBRIEF___ unified addressing functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the unified addressing functions of the CUDA + * runtime application programming interface. + * + * @{ + * + * \section CUDART_UNIFIED_overview Overview + * + * CUDA devices can share a unified address space with the host. + * For these devices there is no distinction between a device + * pointer and a host pointer -- the same pointer value may be + * used to access memory from the host program and from a kernel + * running on the device (with exceptions enumerated below). + * + * \section CUDART_UNIFIED_support Supported Platforms + * + * Whether or not a device supports unified addressing may be + * queried by calling ::cudaGetDeviceProperties() with the device + * property ::cudaDeviceProp::unifiedAddressing. + * + * Unified addressing is automatically enabled in 64-bit processes . + * + * \section CUDART_UNIFIED_lookup Looking Up Information from Pointer Values + * + * It is possible to look up information about the memory which backs a + * pointer value. For instance, one may want to know if a pointer points + * to host or device memory. As another example, in the case of device + * memory, one may want to know on which CUDA device the memory + * resides. These properties may be queried using the function + * ::cudaPointerGetAttributes() + * + * Since pointers are unique, it is not necessary to specify information + * about the pointers specified to ::cudaMemcpy() and other copy functions. + * The copy direction ::cudaMemcpyDefault may be used to specify that the + * CUDA runtime should infer the location of the pointer from its value. + * + * \section CUDART_UNIFIED_automaphost Automatic Mapping of Host Allocated Host Memory + * + * All host memory allocated through all devices using ::cudaMallocHost() and + * ::cudaHostAlloc() is always directly accessible from all devices that + * support unified addressing. This is the case regardless of whether or + * not the flags ::cudaHostAllocPortable and ::cudaHostAllocMapped are + * specified. + * + * The pointer value through which allocated host memory may be accessed + * in kernels on all devices that support unified addressing is the same + * as the pointer value through which that memory is accessed on the host. + * It is not necessary to call ::cudaHostGetDevicePointer() to get the device + * pointer for these allocations. + * + * Note that this is not the case for memory allocated using the flag + * ::cudaHostAllocWriteCombined, as discussed below. + * + * \section CUDART_UNIFIED_autopeerregister Direct Access of Peer Memory + + * Upon enabling direct access from a device that supports unified addressing + * to another peer device that supports unified addressing using + * ::cudaDeviceEnablePeerAccess() all memory allocated in the peer device using + * ::cudaMalloc() and ::cudaMallocPitch() will immediately be accessible + * by the current device. The device pointer value through + * which any peer's memory may be accessed in the current device + * is the same pointer value through which that memory may be + * accessed from the peer device. + * + * \section CUDART_UNIFIED_exceptions Exceptions, Disjoint Addressing + * + * Not all memory may be accessed on devices through the same pointer + * value through which they are accessed on the host. These exceptions + * are host memory registered using ::cudaHostRegister() and host memory + * allocated using the flag ::cudaHostAllocWriteCombined. For these + * exceptions, there exists a distinct host and device address for the + * memory. The device address is guaranteed to not overlap any valid host + * pointer range and is guaranteed to have the same value across all devices + * that support unified addressing. + * + * This device address may be queried using ::cudaHostGetDevicePointer() + * when a device using unified addressing is current. Either the host + * or the unified device pointer value may be used to refer to this memory + * in ::cudaMemcpy() and similar functions using the ::cudaMemcpyDefault + * memory direction. + * + */ + +/** + * \brief Returns attributes about a specified pointer + * + * Returns in \p *attributes the attributes of the pointer \p ptr. + * If pointer was not allocated in, mapped by or registered with context + * supporting unified addressing ::cudaErrorInvalidValue is returned. + * + * \note In CUDA 11.0 forward passing host pointer will return ::cudaMemoryTypeUnregistered + * in ::cudaPointerAttributes::type and call will return ::cudaSuccess. + * + * The ::cudaPointerAttributes structure is defined as: + * \code + struct cudaPointerAttributes { + enum cudaMemoryType type; + int device; + void *devicePointer; + void *hostPointer; + } + \endcode + * In this structure, the individual fields mean + * + * - \ref ::cudaPointerAttributes::type identifies type of memory. It can be + * ::cudaMemoryTypeUnregistered for unregistered host memory, + * ::cudaMemoryTypeHost for registered host memory, ::cudaMemoryTypeDevice for device + * memory or ::cudaMemoryTypeManaged for managed memory. + * + * - \ref ::cudaPointerAttributes::device "device" is the device against which + * \p ptr was allocated. If \p ptr has memory type ::cudaMemoryTypeDevice + * then this identifies the device on which the memory referred to by \p ptr + * physically resides. If \p ptr has memory type ::cudaMemoryTypeHost then this + * identifies the device which was current when the allocation was made + * (and if that device is deinitialized then this allocation will vanish + * with that device's state). + * + * - \ref ::cudaPointerAttributes::devicePointer "devicePointer" is + * the device pointer alias through which the memory referred to by \p ptr + * may be accessed on the current device. + * If the memory referred to by \p ptr cannot be accessed directly by the + * current device then this is NULL. + * + * - \ref ::cudaPointerAttributes::hostPointer "hostPointer" is + * the host pointer alias through which the memory referred to by \p ptr + * may be accessed on the host. + * If the memory referred to by \p ptr cannot be accessed directly by the + * host then this is NULL. + * + * \param attributes - Attributes for the specified pointer + * \param ptr - Pointer to get attributes for + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, + * ::cudaChooseDevice, + * ::cudaInitDevice, + * ::cuPointerGetAttributes + */ +extern __host__ cudaError_t CUDARTAPI cudaPointerGetAttributes(struct cudaPointerAttributes *attributes, const void *ptr); + +/** @} */ /* END CUDART_UNIFIED */ + +/** + * \defgroup CUDART_PEER Peer Device Memory Access + * + * ___MANBRIEF___ peer device memory access functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the peer device memory access functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Queries if a device may directly access a peer device's memory. + * + * Returns in \p *canAccessPeer a value of 1 if device \p device is capable of + * directly accessing memory from \p peerDevice and 0 otherwise. If direct + * access of \p peerDevice from \p device is possible, then access may be + * enabled by calling ::cudaDeviceEnablePeerAccess(). + * + * \param canAccessPeer - Returned access capability + * \param device - Device from which allocations on \p peerDevice are to + * be directly accessed. + * \param peerDevice - Device on which the allocations to be directly accessed + * by \p device reside. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceEnablePeerAccess, + * ::cudaDeviceDisablePeerAccess, + * ::cuDeviceCanAccessPeer + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceCanAccessPeer(int *canAccessPeer, int device, int peerDevice); + +/** + * \brief Enables direct access to memory allocations on a peer device. + * + * On success, all allocations from \p peerDevice will immediately be accessible by + * the current device. They will remain accessible until access is explicitly + * disabled using ::cudaDeviceDisablePeerAccess() or either device is reset using + * ::cudaDeviceReset(). + * + * Note that access granted by this call is unidirectional and that in order to access + * memory on the current device from \p peerDevice, a separate symmetric call + * to ::cudaDeviceEnablePeerAccess() is required. + * + * Note that there are both device-wide and system-wide limitations per system + * configuration, as noted in the CUDA Programming Guide under the section + * "Peer-to-Peer Memory Access". + * + * Returns ::cudaErrorInvalidDevice if ::cudaDeviceCanAccessPeer() indicates + * that the current device cannot directly access memory from \p peerDevice. + * + * Returns ::cudaErrorPeerAccessAlreadyEnabled if direct access of + * \p peerDevice from the current device has already been enabled. + * + * Returns ::cudaErrorInvalidValue if \p flags is not 0. + * + * \param peerDevice - Peer device to enable direct access to from the current device + * \param flags - Reserved for future use and must be set to 0 + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice, + * ::cudaErrorPeerAccessAlreadyEnabled, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceCanAccessPeer, + * ::cudaDeviceDisablePeerAccess, + * ::cuCtxEnablePeerAccess + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags); + +/** + * \brief Disables direct access to memory allocations on a peer device. + * + * Returns ::cudaErrorPeerAccessNotEnabled if direct access to memory on + * \p peerDevice has not yet been enabled from the current device. + * + * \param peerDevice - Peer device to disable direct access to + * + * \return + * ::cudaSuccess, + * ::cudaErrorPeerAccessNotEnabled, + * ::cudaErrorInvalidDevice + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa ::cudaDeviceCanAccessPeer, + * ::cudaDeviceEnablePeerAccess, + * ::cuCtxDisablePeerAccess + */ +extern __host__ cudaError_t CUDARTAPI cudaDeviceDisablePeerAccess(int peerDevice); + +/** @} */ /* END CUDART_PEER */ + +/** \defgroup CUDART_OPENGL OpenGL Interoperability */ + +/** \defgroup CUDART_OPENGL_DEPRECATED OpenGL Interoperability [DEPRECATED] */ + +/** \defgroup CUDART_D3D9 Direct3D 9 Interoperability */ + +/** \defgroup CUDART_D3D9_DEPRECATED Direct3D 9 Interoperability [DEPRECATED] */ + +/** \defgroup CUDART_D3D10 Direct3D 10 Interoperability */ + +/** \defgroup CUDART_D3D10_DEPRECATED Direct3D 10 Interoperability [DEPRECATED] */ + +/** \defgroup CUDART_D3D11 Direct3D 11 Interoperability */ + +/** \defgroup CUDART_D3D11_DEPRECATED Direct3D 11 Interoperability [DEPRECATED] */ + +/** \defgroup CUDART_VDPAU VDPAU Interoperability */ + +/** \defgroup CUDART_EGL EGL Interoperability */ + +/** + * \defgroup CUDART_INTEROP Graphics Interoperability + * + * ___MANBRIEF___ graphics interoperability functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the graphics interoperability functions of the CUDA + * runtime application programming interface. + * + * @{ + */ + +/** + * \brief Unregisters a graphics resource for access by CUDA + * + * Unregisters the graphics resource \p resource so it is not accessible by + * CUDA unless registered again. + * + * If \p resource is invalid then ::cudaErrorInvalidResourceHandle is + * returned. + * + * \param resource - Resource to unregister + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaGraphicsD3D9RegisterResource, + * ::cudaGraphicsD3D10RegisterResource, + * ::cudaGraphicsD3D11RegisterResource, + * ::cudaGraphicsGLRegisterBuffer, + * ::cudaGraphicsGLRegisterImage, + * ::cuGraphicsUnregisterResource + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource); + +/** + * \brief Set usage flags for mapping a graphics resource + * + * Set \p flags for mapping the graphics resource \p resource. + * + * Changes to \p flags will take effect the next time \p resource is mapped. + * The \p flags argument may be any of the following: + * - ::cudaGraphicsMapFlagsNone: Specifies no hints about how \p resource will + * be used. It is therefore assumed that CUDA may read from or write to \p resource. + * - ::cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to \p resource. + * - ::cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from \p resource and will + * write over the entire contents of \p resource, so none of the data + * previously stored in \p resource will be preserved. + * + * If \p resource is presently mapped for access by CUDA then ::cudaErrorUnknown is returned. + * If \p flags is not one of the above values then ::cudaErrorInvalidValue is returned. + * + * \param resource - Registered resource to set flags for + * \param flags - Parameters for resource mapping + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown, + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsMapResources, + * ::cuGraphicsResourceSetMapFlags + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags); + +/** + * \brief Map graphics resources for access by CUDA + * + * Maps the \p count graphics resources in \p resources for access by CUDA. + * + * The resources in \p resources may be accessed by CUDA until they + * are unmapped. The graphics API from which \p resources were registered + * should not access any resources while they are mapped by CUDA. If an + * application does so, the results are undefined. + * + * This function provides the synchronization guarantee that any graphics calls + * issued before ::cudaGraphicsMapResources() will complete before any subsequent CUDA + * work issued in \p stream begins. + * + * If \p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle + * is returned. If any of \p resources are presently mapped for access by + * CUDA then ::cudaErrorUnknown is returned. + * + * \param count - Number of resources to map + * \param resources - Resources to map for CUDA + * \param stream - Stream for synchronization + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsResourceGetMappedPointer, + * ::cudaGraphicsSubResourceGetMappedArray, + * ::cudaGraphicsUnmapResources, + * ::cuGraphicsMapResources + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsMapResources(int count, cudaGraphicsResource_t *resources, cudaStream_t stream __dv(0)); + +/** + * \brief Unmap graphics resources. + * + * Unmaps the \p count graphics resources in \p resources. + * + * Once unmapped, the resources in \p resources may not be accessed by CUDA + * until they are mapped again. + * + * This function provides the synchronization guarantee that any CUDA work issued + * in \p stream before ::cudaGraphicsUnmapResources() will complete before any + * subsequently issued graphics work begins. + * + * If \p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle + * is returned. If any of \p resources are not presently mapped for access by + * CUDA then ::cudaErrorUnknown is returned. + * + * \param count - Number of resources to unmap + * \param resources - Resources to unmap + * \param stream - Stream for synchronization + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \note_null_stream + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsMapResources, + * ::cuGraphicsUnmapResources + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t *resources, cudaStream_t stream __dv(0)); + +/** + * \brief Get an device pointer through which to access a mapped graphics resource. + * + * Returns in \p *devPtr a pointer through which the mapped graphics resource + * \p resource may be accessed. + * Returns in \p *size the size of the memory in bytes which may be accessed from that pointer. + * The value set in \p devPtr may change every time that \p resource is mapped. + * + * If \p resource is not a buffer then it cannot be accessed via a pointer and + * ::cudaErrorUnknown is returned. + * If \p resource is not mapped then ::cudaErrorUnknown is returned. + * * + * \param devPtr - Returned pointer through which \p resource may be accessed + * \param size - Returned size of the buffer accessible starting at \p *devPtr + * \param resource - Mapped resource to access + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsMapResources, + * ::cudaGraphicsSubResourceGetMappedArray, + * ::cuGraphicsResourceGetMappedPointer + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsResourceGetMappedPointer(void **devPtr, size_t *size, cudaGraphicsResource_t resource); + +/** + * \brief Get an array through which to access a subresource of a mapped graphics resource. + * + * Returns in \p *array an array through which the subresource of the mapped + * graphics resource \p resource which corresponds to array index \p arrayIndex + * and mipmap level \p mipLevel may be accessed. The value set in \p array may + * change every time that \p resource is mapped. + * + * If \p resource is not a texture then it cannot be accessed via an array and + * ::cudaErrorUnknown is returned. + * If \p arrayIndex is not a valid array index for \p resource then + * ::cudaErrorInvalidValue is returned. + * If \p mipLevel is not a valid mipmap level for \p resource then + * ::cudaErrorInvalidValue is returned. + * If \p resource is not mapped then ::cudaErrorUnknown is returned. + * + * \param array - Returned array through which a subresource of \p resource may be accessed + * \param resource - Mapped resource to access + * \param arrayIndex - Array index for array textures or cubemap face + * index as defined by ::cudaGraphicsCubeFace for + * cubemap textures for the subresource to access + * \param mipLevel - Mipmap level for the subresource to access + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsResourceGetMappedPointer, + * ::cuGraphicsSubResourceGetMappedArray + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsSubResourceGetMappedArray(cudaArray_t *array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel); + +/** + * \brief Get a mipmapped array through which to access a mapped graphics resource. + * + * Returns in \p *mipmappedArray a mipmapped array through which the mapped + * graphics resource \p resource may be accessed. The value set in \p mipmappedArray may + * change every time that \p resource is mapped. + * + * If \p resource is not a texture then it cannot be accessed via an array and + * ::cudaErrorUnknown is returned. + * If \p resource is not mapped then ::cudaErrorUnknown is returned. + * + * \param mipmappedArray - Returned mipmapped array through which \p resource may be accessed + * \param resource - Mapped resource to access + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorUnknown + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphicsResourceGetMappedPointer, + * ::cuGraphicsResourceGetMappedMipmappedArray + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t *mipmappedArray, cudaGraphicsResource_t resource); + +/** @} */ /* END CUDART_INTEROP */ + +/** + * \defgroup CUDART_TEXTURE_OBJECT Texture Object Management + * + * ___MANBRIEF___ texture object management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the low level texture object management functions + * of the CUDA runtime application programming interface. The texture + * object API is only supported on devices of compute capability 3.0 or higher. + * + * @{ + */ + +/** + * \brief Get the channel descriptor of an array + * + * Returns in \p *desc the channel descriptor of the CUDA array \p array. + * + * \param desc - Channel format + * \param array - Memory array on device + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa \ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) "cudaCreateChannelDesc (C API)", + * ::cudaCreateTextureObject, ::cudaCreateSurfaceObject + */ +extern __host__ cudaError_t CUDARTAPI cudaGetChannelDesc(struct cudaChannelFormatDesc *desc, cudaArray_const_t array); + +/** + * \brief 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, or ::cudaChannelFormatKindFloat. + * + * \param x - X component + * \param y - Y component + * \param z - Z component + * \param w - W component + * \param f - Channel format + * + * \return + * Channel descriptor with format \p f + * + * \sa \ref ::cudaCreateChannelDesc(void) "cudaCreateChannelDesc (C++ API)", + * ::cudaGetChannelDesc, ::cudaCreateTextureObject, ::cudaCreateSurfaceObject + */ +extern __host__ struct cudaChannelFormatDesc CUDARTAPI cudaCreateChannelDesc(int x, int y, int z, int w, enum cudaChannelFormatKind f); + +/** + * \brief Creates a texture object + * + * Creates a texture object and returns it in \p pTexObject. \p pResDesc describes + * the data to texture from. \p pTexDesc describes how the data should be sampled. + * \p pResViewDesc is an optional argument that specifies an alternate format for + * the data described by \p pResDesc, and also describes the subresource region + * to restrict access to when texturing. \p pResViewDesc can only be specified if + * the type of resource is a CUDA array or a CUDA mipmapped array not in a block + * compressed format. + * + * Texture objects are only supported on devices of compute capability 3.0 or higher. + * Additionally, a texture object is an opaque value, and, as such, should only be + * accessed through CUDA API calls. + * + * The ::cudaResourceDesc structure is defined as: + * \code + struct cudaResourceDesc { + enum cudaResourceType resType; + + union { + struct { + cudaArray_t array; + } array; + struct { + cudaMipmappedArray_t mipmap; + } mipmap; + struct { + void *devPtr; + struct cudaChannelFormatDesc desc; + size_t sizeInBytes; + } linear; + struct { + void *devPtr; + struct cudaChannelFormatDesc desc; + size_t width; + size_t height; + size_t pitchInBytes; + } pitch2D; + } res; + }; + * \endcode + * where: + * - ::cudaResourceDesc::resType specifies the type of resource to texture from. + * CUresourceType is defined as: + * \code + enum cudaResourceType { + cudaResourceTypeArray = 0x00, + cudaResourceTypeMipmappedArray = 0x01, + cudaResourceTypeLinear = 0x02, + cudaResourceTypePitch2D = 0x03 + }; + * \endcode + * + * \par + * If ::cudaResourceDesc::resType is set to ::cudaResourceTypeArray, ::cudaResourceDesc::res::array::array + * must be set to a valid CUDA array handle. + * + * \par + * If ::cudaResourceDesc::resType is set to ::cudaResourceTypeMipmappedArray, ::cudaResourceDesc::res::mipmap::mipmap + * must be set to a valid CUDA mipmapped array handle and ::cudaTextureDesc::normalizedCoords must be set to true. + * + * \par + * If ::cudaResourceDesc::resType is set to ::cudaResourceTypeLinear, ::cudaResourceDesc::res::linear::devPtr + * must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment. + * ::cudaResourceDesc::res::linear::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::linear::sizeInBytes + * specifies the size of the array in bytes. The total number of elements in the linear address range cannot exceed + * ::cudaDeviceProp::maxTexture1DLinear. The number of elements is computed as (sizeInBytes / sizeof(desc)). + * + * \par + * If ::cudaResourceDesc::resType is set to ::cudaResourceTypePitch2D, ::cudaResourceDesc::res::pitch2D::devPtr + * must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment. + * ::cudaResourceDesc::res::pitch2D::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::pitch2D::width + * and ::cudaResourceDesc::res::pitch2D::height specify the width and height of the array in elements, and cannot exceed + * ::cudaDeviceProp::maxTexture2DLinear[0] and ::cudaDeviceProp::maxTexture2DLinear[1] respectively. + * ::cudaResourceDesc::res::pitch2D::pitchInBytes specifies the pitch between two rows in bytes and has to be aligned to + * ::cudaDeviceProp::texturePitchAlignment. Pitch cannot exceed ::cudaDeviceProp::maxTexture2DLinear[2]. + * + * + * The ::cudaTextureDesc struct is defined as + * \code + struct cudaTextureDesc { + enum cudaTextureAddressMode addressMode[3]; + enum cudaTextureFilterMode filterMode; + enum cudaTextureReadMode readMode; + int sRGB; + float borderColor[4]; + int normalizedCoords; + unsigned int maxAnisotropy; + enum cudaTextureFilterMode mipmapFilterMode; + float mipmapLevelBias; + float minMipmapLevelClamp; + float maxMipmapLevelClamp; + int disableTrilinearOptimization; + int seamlessCubemap; + }; + * \endcode + * where + * - ::cudaTextureDesc::addressMode specifies the addressing mode for each dimension of the texture data. ::cudaTextureAddressMode is defined as: + * \code + enum cudaTextureAddressMode { + cudaAddressModeWrap = 0, + cudaAddressModeClamp = 1, + cudaAddressModeMirror = 2, + cudaAddressModeBorder = 3 + }; + * \endcode + * This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear. Also, if ::cudaTextureDesc::normalizedCoords + * is set to zero, ::cudaAddressModeWrap and ::cudaAddressModeMirror won't be supported and will be switched to ::cudaAddressModeClamp. + * + * - ::cudaTextureDesc::filterMode specifies the filtering mode to be used when fetching from the texture. ::cudaTextureFilterMode is defined as: + * \code + enum cudaTextureFilterMode { + cudaFilterModePoint = 0, + cudaFilterModeLinear = 1 + }; + * \endcode + * This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear. + * + * - ::cudaTextureDesc::readMode specifies whether integer data should be converted to floating point or not. ::cudaTextureReadMode is defined as: + * \code + enum cudaTextureReadMode { + cudaReadModeElementType = 0, + cudaReadModeNormalizedFloat = 1 + }; + * \endcode + * Note that this applies only to 8-bit and 16-bit integer formats. 32-bit integer format would not be promoted, regardless of + * whether or not this ::cudaTextureDesc::readMode is set ::cudaReadModeNormalizedFloat is specified. + * + * - ::cudaTextureDesc::sRGB specifies whether sRGB to linear conversion should be performed during texture fetch. + * + * - ::cudaTextureDesc::borderColor specifies the float values of color. where: + * ::cudaTextureDesc::borderColor[0] contains value of 'R', + * ::cudaTextureDesc::borderColor[1] contains value of 'G', + * ::cudaTextureDesc::borderColor[2] contains value of 'B', + * ::cudaTextureDesc::borderColor[3] contains value of 'A' + * Note that application using integer border color values will need to these values to float. + * The values are set only when the addressing mode specified by ::cudaTextureDesc::addressMode is cudaAddressModeBorder. + * + * - ::cudaTextureDesc::normalizedCoords specifies whether the texture coordinates will be normalized or not. + * + * - ::cudaTextureDesc::maxAnisotropy specifies the maximum anistropy ratio to be used when doing anisotropic filtering. This value will be + * clamped to the range [1,16]. + * + * - ::cudaTextureDesc::mipmapFilterMode specifies the filter mode when the calculated mipmap level lies between two defined mipmap levels. + * + * - ::cudaTextureDesc::mipmapLevelBias specifies the offset to be applied to the calculated mipmap level. + * + * - ::cudaTextureDesc::minMipmapLevelClamp specifies the lower end of the mipmap level range to clamp access to. + * + * - ::cudaTextureDesc::maxMipmapLevelClamp specifies the upper end of the mipmap level range to clamp access to. + * + * - ::cudaTextureDesc::disableTrilinearOptimization specifies whether the trilinear filtering optimizations will be disabled. + * + * - ::cudaTextureDesc::seamlessCubemap specifies whether seamless cube map filtering is enabled. This flag can only be specified if the + * underlying resource is a CUDA array or a CUDA mipmapped array that was created with the flag ::cudaArrayCubemap. + * When seamless cube map filtering is enabled, texture address modes specified by ::cudaTextureDesc::addressMode are ignored. + * Instead, if the ::cudaTextureDesc::filterMode is set to ::cudaFilterModePoint the address mode ::cudaAddressModeClamp will be applied for all dimensions. + * If the ::cudaTextureDesc::filterMode is set to ::cudaFilterModeLinear seamless cube map filtering will be performed when sampling along the cube face borders. + * + * The ::cudaResourceViewDesc struct is defined as + * \code + struct cudaResourceViewDesc { + enum cudaResourceViewFormat format; + size_t width; + size_t height; + size_t depth; + unsigned int firstMipmapLevel; + unsigned int lastMipmapLevel; + unsigned int firstLayer; + unsigned int lastLayer; + }; + * \endcode + * where: + * - ::cudaResourceViewDesc::format specifies how the data contained in the CUDA array or CUDA mipmapped array should + * be interpreted. Note that this can incur a change in size of the texture data. If the resource view format is a block + * compressed format, then the underlying CUDA array or CUDA mipmapped array has to have a 32-bit unsigned integer format + * with 2 or 4 channels, depending on the block compressed format. For ex., BC1 and BC4 require the underlying CUDA array to have + * a 32-bit unsigned int with 2 channels. The other BC formats require the underlying resource to have the same 32-bit unsigned int + * format but with 4 channels. + * + * - ::cudaResourceViewDesc::width specifies the new width of the texture data. If the resource view format is a block + * compressed format, this value has to be 4 times the original width of the resource. For non block compressed formats, + * this value has to be equal to that of the original resource. + * + * - ::cudaResourceViewDesc::height specifies the new height of the texture data. If the resource view format is a block + * compressed format, this value has to be 4 times the original height of the resource. For non block compressed formats, + * this value has to be equal to that of the original resource. + * + * - ::cudaResourceViewDesc::depth specifies the new depth of the texture data. This value has to be equal to that of the + * original resource. + * + * - ::cudaResourceViewDesc::firstMipmapLevel specifies the most detailed mipmap level. This will be the new mipmap level zero. + * For non-mipmapped resources, this value has to be zero.::cudaTextureDesc::minMipmapLevelClamp and ::cudaTextureDesc::maxMipmapLevelClamp + * will be relative to this value. For ex., if the firstMipmapLevel is set to 2, and a minMipmapLevelClamp of 1.2 is specified, + * then the actual minimum mipmap level clamp will be 3.2. + * + * - ::cudaResourceViewDesc::lastMipmapLevel specifies the least detailed mipmap level. For non-mipmapped resources, this value + * has to be zero. + * + * - ::cudaResourceViewDesc::firstLayer specifies the first layer index for layered textures. This will be the new layer zero. + * For non-layered resources, this value has to be zero. + * + * - ::cudaResourceViewDesc::lastLayer specifies the last layer index for layered textures. For non-layered resources, + * this value has to be zero. + * + * + * \param pTexObject - Texture object to create + * \param pResDesc - Resource descriptor + * \param pTexDesc - Texture descriptor + * \param pResViewDesc - Resource view descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDestroyTextureObject, + * ::cuTexObjectCreate + */ + +extern __host__ cudaError_t CUDARTAPI cudaCreateTextureObject(cudaTextureObject_t *pTexObject, const struct cudaResourceDesc *pResDesc, const struct cudaTextureDesc *pTexDesc, const struct cudaResourceViewDesc *pResViewDesc); + +/** + * \brief Destroys a texture object + * + * Destroys the texture object specified by \p texObject. + * + * \param texObject - Texture object to destroy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaCreateTextureObject, + * ::cuTexObjectDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaDestroyTextureObject(cudaTextureObject_t texObject); + +/** + * \brief Returns a texture object's resource descriptor + * + * Returns the resource descriptor for the texture object specified by \p texObject. + * + * \param pResDesc - Resource descriptor + * \param texObject - Texture object + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaCreateTextureObject, + * ::cuTexObjectGetResourceDesc + */ +extern __host__ cudaError_t CUDARTAPI cudaGetTextureObjectResourceDesc(struct cudaResourceDesc *pResDesc, cudaTextureObject_t texObject); + +/** + * \brief Returns a texture object's texture descriptor + * + * Returns the texture descriptor for the texture object specified by \p texObject. + * + * \param pTexDesc - Texture descriptor + * \param texObject - Texture object + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaCreateTextureObject, + * ::cuTexObjectGetTextureDesc + */ +extern __host__ cudaError_t CUDARTAPI cudaGetTextureObjectTextureDesc(struct cudaTextureDesc *pTexDesc, cudaTextureObject_t texObject); + +/** + * \brief Returns a texture object's resource view descriptor + * + * Returns the resource view descriptor for the texture object specified by \p texObject. + * If no resource view was specified, ::cudaErrorInvalidValue is returned. + * + * \param pResViewDesc - Resource view descriptor + * \param texObject - Texture object + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaCreateTextureObject, + * ::cuTexObjectGetResourceViewDesc + */ +extern __host__ cudaError_t CUDARTAPI cudaGetTextureObjectResourceViewDesc(struct cudaResourceViewDesc *pResViewDesc, cudaTextureObject_t texObject); + +/** @} */ /* END CUDART_TEXTURE_OBJECT */ + +/** + * \defgroup CUDART_SURFACE_OBJECT Surface Object Management + * + * ___MANBRIEF___ surface object management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the low level texture object management functions + * of the CUDA runtime application programming interface. The surface object + * API is only supported on devices of compute capability 3.0 or higher. + * + * @{ + */ + +/** + * \brief Creates a surface object + * + * Creates a surface object and returns it in \p pSurfObject. \p pResDesc describes + * the data to perform surface load/stores on. ::cudaResourceDesc::resType must be + * ::cudaResourceTypeArray and ::cudaResourceDesc::res::array::array + * must be set to a valid CUDA array handle. + * + * Surface objects are only supported on devices of compute capability 3.0 or higher. + * Additionally, a surface object is an opaque value, and, as such, should only be + * accessed through CUDA API calls. + * + * \param pSurfObject - Surface object to create + * \param pResDesc - Resource descriptor + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidChannelDescriptor, + * ::cudaErrorInvalidResourceHandle + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDestroySurfaceObject, + * ::cuSurfObjectCreate + */ + +extern __host__ cudaError_t CUDARTAPI cudaCreateSurfaceObject(cudaSurfaceObject_t *pSurfObject, const struct cudaResourceDesc *pResDesc); + +/** + * \brief Destroys a surface object + * + * Destroys the surface object specified by \p surfObject. + * + * \param surfObject - Surface object to destroy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaCreateSurfaceObject, + * ::cuSurfObjectDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject); + +/** + * \brief Returns a surface object's resource descriptor + * Returns the resource descriptor for the surface object specified by \p surfObject. + * + * \param pResDesc - Resource descriptor + * \param surfObject - Surface object + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaCreateSurfaceObject, + * ::cuSurfObjectGetResourceDesc + */ +extern __host__ cudaError_t CUDARTAPI cudaGetSurfaceObjectResourceDesc(struct cudaResourceDesc *pResDesc, cudaSurfaceObject_t surfObject); + +/** @} */ /* END CUDART_SURFACE_OBJECT */ + +/** + * \defgroup CUDART__VERSION Version Management + * + * @{ + */ + +/** + * \brief Returns the latest version of CUDA supported by the driver + * + * Returns in \p *driverVersion the latest version of CUDA supported by + * the driver. The version is returned as (1000 × major + 10 × minor). + * For example, CUDA 9.2 would be represented by 9020. If no driver is installed, + * then 0 is returned as the driver version. + * + * This function automatically returns ::cudaErrorInvalidValue + * if \p driverVersion is NULL. + * + * \param driverVersion - Returns the CUDA driver version. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaRuntimeGetVersion, + * ::cuDriverGetVersion + */ +extern __host__ cudaError_t CUDARTAPI cudaDriverGetVersion(int *driverVersion); + +/** + * \brief Returns the CUDA Runtime version + * + * Returns in \p *runtimeVersion the version number of the current CUDA + * Runtime instance. The version is returned as + * (1000 × major + 10 × minor). For example, + * CUDA 9.2 would be represented by 9020. + * + * As of CUDA 12.0, this function no longer initializes CUDA. The purpose + * of this API is solely to return a compile-time constant stating the + * CUDA Toolkit version in the above format. + * + * This function automatically returns ::cudaErrorInvalidValue if + * the \p runtimeVersion argument is NULL. + * + * \param runtimeVersion - Returns the CUDA Runtime version. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDriverGetVersion, + * ::cuDriverGetVersion + */ +extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaRuntimeGetVersion(int *runtimeVersion); + +/** @} */ /* END CUDART__VERSION */ + +/** + * \defgroup CUDART_GRAPH Graph Management + * + * ___MANBRIEF___ graph management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the graph management functions of CUDA + * runtime application programming interface. + * + * @{ + */ + +/** + * \brief Creates a graph + * + * Creates an empty graph, which is returned via \p pGraph. + * + * \param pGraph - Returns newly created graph + * \param flags - Graph creation flags, must be 0 + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode, + * ::cudaGraphInstantiate, + * ::cudaGraphDestroy, + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphClone + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphCreate(cudaGraph_t *pGraph, unsigned int flags); + +/** + * \brief Creates a kernel execution node and adds it to a graph + * + * Creates a new kernel execution node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies and arguments specified in \p pNodeParams. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * The cudaKernelNodeParams structure is defined as: + * + * \code + * struct cudaKernelNodeParams + * { + * void* func; + * dim3 gridDim; + * dim3 blockDim; + * unsigned int sharedMemBytes; + * void **kernelParams; + * void **extra; + * }; + * \endcode + * + * When the graph is launched, the node will invoke kernel \p func on a (\p gridDim.x x + * \p gridDim.y x \p gridDim.z) grid of blocks. Each block contains + * (\p blockDim.x x \p blockDim.y x \p blockDim.z) threads. + * + * \p sharedMem sets the amount of dynamic shared memory that will be + * available to each thread block. + * + * Kernel parameters to \p func can be specified in one of two ways: + * + * 1) Kernel parameters can be specified via \p kernelParams. If the kernel has N + * parameters, then \p kernelParams needs to be an array of N pointers. Each pointer, + * from \p kernelParams[0] to \p kernelParams[N-1], points to the region of memory from which the actual + * parameter will be copied. The number of kernel parameters and their offsets and sizes do not need + * to be specified as that information is retrieved directly from the kernel's image. + * + * 2) Kernel parameters can also be packaged by the application into a single buffer that is passed in + * via \p extra. This places the burden on the application of knowing each kernel + * parameter's size and alignment/padding within the buffer. The \p extra parameter exists + * to allow this function to take additional less commonly used arguments. \p extra specifies + * a list of names of extra settings and their corresponding values. Each extra setting name is + * immediately followed by the corresponding value. The list must be terminated with either NULL or + * CU_LAUNCH_PARAM_END. + * + * - ::CU_LAUNCH_PARAM_END, which indicates the end of the \p extra + * array; + * - ::CU_LAUNCH_PARAM_BUFFER_POINTER, which specifies that the next + * value in \p extra will be a pointer to a buffer + * containing all the kernel parameters for launching kernel + * \p func; + * - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next + * value in \p extra will be a pointer to a size_t + * containing the size of the buffer specified with + * ::CU_LAUNCH_PARAM_BUFFER_POINTER; + * + * The error ::cudaErrorInvalidValue will be returned if kernel parameters are specified with both + * \p kernelParams and \p extra (i.e. both \p kernelParams and + * \p extra are non-NULL). + * + * The \p kernelParams or \p extra array, as well as the argument values it points to, + * are copied during this call. + * + * \note Kernels launched using graphs must not use texture and surface references. Reading or + * writing through any texture or surface reference is undefined behavior. + * This restriction does not apply to texture and surface objects. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param pNodeParams - Parameters for the GPU execution node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaGraphAddNode, + * ::cudaLaunchKernel, + * ::cudaGraphKernelNodeGetParams, + * ::cudaGraphKernelNodeSetParams, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddKernelNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaKernelNodeParams *pNodeParams); + +/** + * \brief Returns a kernel node's parameters + * + * Returns the parameters of kernel node \p node in \p pNodeParams. + * The \p kernelParams or \p extra array returned in \p pNodeParams, + * as well as the argument values it points to, are owned by the node. + * This memory remains valid until the node is destroyed or its + * parameters are modified, and should not be modified + * directly. Use ::cudaGraphKernelNodeSetParams to update the + * parameters of this node. + * + * The params will contain either \p kernelParams or \p extra, + * according to which of these was most recently set on the node. + * + * \param node - Node to get the parameters for + * \param pNodeParams - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaLaunchKernel, + * ::cudaGraphAddKernelNode, + * ::cudaGraphKernelNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphKernelNodeGetParams(cudaGraphNode_t node, struct cudaKernelNodeParams *pNodeParams); + +/** + * \brief Sets a kernel node's parameters + * + * Sets the parameters of kernel node \p node to \p pNodeParams. + * + * \param node - Node to set the parameters for + * \param pNodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorMemoryAllocation + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaLaunchKernel, + * ::cudaGraphAddKernelNode, + * ::cudaGraphKernelNodeGetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const struct cudaKernelNodeParams *pNodeParams); + +/** + * \brief Copies attributes from source node to destination node. + * + * Copies attributes from source node \p src to destination node \p dst. + * Both node must have the same context. + * + * \param[out] dst Destination node + * \param[in] src Source node + * For list of attributes see ::cudaKernelNodeAttrID + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidContext + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphKernelNodeCopyAttributes( + cudaGraphNode_t hSrc, + cudaGraphNode_t hDst); + +/** + * \brief Queries node attribute. + * + * Queries attribute \p attr from node \p hNode and stores it in corresponding + * member of \p value_out. + * + * \param[in] hNode + * \param[in] attr + * \param[out] value_out + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphKernelNodeGetAttribute( + cudaGraphNode_t hNode, + cudaKernelNodeAttrID attr, + cudaKernelNodeAttrValue *value_out); + +/** + * \brief Sets node attribute. + * + * Sets attribute \p attr on node \p hNode from corresponding attribute of + * \p value. + * + * \param[out] hNode + * \param[in] attr + * \param[out] value + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * \notefnerr + * + * \sa + * ::cudaAccessPolicyWindow + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphKernelNodeSetAttribute( + cudaGraphNode_t hNode, + cudaKernelNodeAttrID attr, + const cudaKernelNodeAttrValue *value); + +/** + * \brief Creates a memcpy node and adds it to a graph + * + * Creates a new memcpy node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will perform the memcpy described by \p pCopyParams. + * See ::cudaMemcpy3D() for a description of the structure and its restrictions. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param pCopyParams - Parameters for the memory copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaMemcpy3D, + * ::cudaGraphAddMemcpyNodeToSymbol, + * ::cudaGraphAddMemcpyNodeFromSymbol, + * ::cudaGraphAddMemcpyNode1D, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaMemcpy3DParms *pCopyParams); + +/** + * \brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph + * + * Creates a new memcpy node to copy to \p symbol and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p src to the memory area pointed to by \p offset bytes from the start + * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyToSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeFromSymbol, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeToSymbol( + 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); +#endif + +/** + * \brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph + * + * Creates a new memcpy node to copy from \p symbol and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area + * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable + * that resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyFromSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeToSymbol, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNodeFromSymbol( + 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); +#endif + +/** + * \brief Creates a 1D memcpy node and adds it to a graph + * + * Creates a new 1D memcpy node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will copy \p count bytes from the memory + * area pointed to by \p src to the memory area pointed to by \p dst, where + * \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. Launching a + * memcpy node with dst and src pointers that do not match the direction of + * the copy results in an undefined behavior. + * + * Memcpy nodes have some additional restrictions with regards to managed memory, if the + * system contains at least one device which has a zero value for the device attribute + * ::cudaDevAttrConcurrentManagedAccess. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param dst - Destination memory address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpy, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParams1D, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemcpyNode1D( + cudaGraphNode_t *pGraphNode, + cudaGraph_t graph, + const cudaGraphNode_t *pDependencies, + size_t numDependencies, + void* dst, + const void* src, + size_t count, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Returns a memcpy node's parameters + * + * Returns the parameters of memcpy node \p node in \p pNodeParams. + * + * \param node - Node to get the parameters for + * \param pNodeParams - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpy3D, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, struct cudaMemcpy3DParms *pNodeParams); + +/** + * \brief Sets a memcpy node's parameters + * + * Sets the parameters of memcpy node \p node to \p pNodeParams. + * + * \param node - Node to set the parameters for + * \param pNodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaMemcpy3D, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphMemcpyNodeSetParams1D, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const struct cudaMemcpy3DParms *pNodeParams); + +/** + * \brief Sets a memcpy node's parameters to copy to a symbol on the device + * + * Sets the parameters of memcpy node \p node to the copy described by the provided parameters. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p src to the memory area pointed to by \p offset bytes from the start + * of symbol \p symbol. The memory areas may not overlap. \p symbol is a variable that + * resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of + * transfer is inferred from the pointer values. However, ::cudaMemcpyDefault + * is only allowed on systems that support unified virtual addressing. + * + * \param node - Node to set the parameters for + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyToSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsToSymbol( + cudaGraphNode_t node, + const void* symbol, + const void* src, + size_t count, + size_t offset, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Sets a memcpy node's parameters to copy from a symbol on the device + * + * Sets the parameters of memcpy node \p node to the copy described by the provided parameters. + * + * When the graph is launched, the node will copy \p count bytes from the memory area + * pointed to by \p offset bytes from the start of symbol \p symbol to the memory area + * pointed to by \p dst. The memory areas may not overlap. \p symbol is a variable + * that resides in global or constant memory space. \p kind can be either + * ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. + * Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer + * is inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. + * + * \param node - Node to set the parameters for + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpyFromSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParamsFromSymbol( + cudaGraphNode_t node, + void* dst, + const void* symbol, + size_t count, + size_t offset, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Sets a memcpy node's parameters to perform a 1-dimensional copy + * + * Sets the parameters of memcpy node \p node to the copy described by the provided parameters. + * + * When the graph is launched, the node will copy \p count bytes from the memory + * area pointed to by \p src to the memory area pointed to by \p dst, where + * \p kind specifies the direction of the copy, and must be one of + * ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost, + * ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing + * ::cudaMemcpyDefault is recommended, in which case the type of transfer is + * inferred from the pointer values. However, ::cudaMemcpyDefault is only + * allowed on systems that support unified virtual addressing. Launching a + * memcpy node with dst and src pointers that do not match the direction of + * the copy results in an undefined behavior. + * + * \param node - Node to set the parameters for + * \param dst - Destination memory address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemcpy, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeGetParams + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphMemcpyNodeSetParams1D( + cudaGraphNode_t node, + void* dst, + const void* src, + size_t count, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Creates a memset node and adds it to a graph + * + * Creates a new memset node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * The element size must be 1, 2, or 4 bytes. + * When the graph is launched, the node will perform the memset described by \p pMemsetParams. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param pMemsetParams - Parameters for the memory set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDevice + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaMemset2D, + * ::cudaGraphMemsetNodeGetParams, + * ::cudaGraphMemsetNodeSetParams, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemsetNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaMemsetParams *pMemsetParams); + +/** + * \brief Returns a memset node's parameters + * + * Returns the parameters of memset node \p node in \p pNodeParams. + * + * \param node - Node to get the parameters for + * \param pNodeParams - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaMemset2D, + * ::cudaGraphAddMemsetNode, + * ::cudaGraphMemsetNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, struct cudaMemsetParams *pNodeParams); + +/** + * \brief Sets a memset node's parameters + * + * Sets the parameters of memset node \p node to \p pNodeParams. + * + * \param node - Node to set the parameters for + * \param pNodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaMemset2D, + * ::cudaGraphAddMemsetNode, + * ::cudaGraphMemsetNodeGetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const struct cudaMemsetParams *pNodeParams); + +/** + * \brief Creates a host execution node and adds it to a graph + * + * Creates a new CPU execution node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies and arguments specified in \p pNodeParams. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * When the graph is launched, the node will invoke the specified CPU function. + * Host nodes are not supported under MPS with pre-Volta GPUs. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param pNodeParams - Parameters for the host node + * + * \return + * ::cudaSuccess, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaLaunchHostFunc, + * ::cudaGraphHostNodeGetParams, + * ::cudaGraphHostNodeSetParams, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddHostNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaHostNodeParams *pNodeParams); + +/** + * \brief Returns a host node's parameters + * + * Returns the parameters of host node \p node in \p pNodeParams. + * + * \param node - Node to get the parameters for + * \param pNodeParams - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaLaunchHostFunc, + * ::cudaGraphAddHostNode, + * ::cudaGraphHostNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphHostNodeGetParams(cudaGraphNode_t node, struct cudaHostNodeParams *pNodeParams); + +/** + * \brief Sets a host node's parameters + * + * Sets the parameters of host node \p node to \p nodeParams. + * + * \param node - Node to set the parameters for + * \param pNodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaLaunchHostFunc, + * ::cudaGraphAddHostNode, + * ::cudaGraphHostNodeGetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphHostNodeSetParams(cudaGraphNode_t node, const struct cudaHostNodeParams *pNodeParams); + +/** + * \brief Creates a child graph node and adds it to a graph + * + * Creates a new node which executes an embedded graph, and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * If \p hGraph contains allocation or free nodes, this call will return an error. + * + * The node executes an embedded child graph. The child graph is cloned in this call. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param childGraph - The graph to clone into this node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphChildGraphNodeGetGraph, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode, + * ::cudaGraphClone + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddChildGraphNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, cudaGraph_t childGraph); + +/** + * \brief Gets a handle to the embedded graph of a child graph node + * + * Gets a handle to the embedded graph in a child graph node. This call + * does not clone the graph. Changes to the graph will be reflected in + * the node, and the node retains ownership of the graph. + * + * Allocation and free nodes cannot be added to the returned graph. + * Attempting to do so will return an error. + * + * \param node - Node to get the embedded graph for + * \param pGraph - Location to store a handle to the graph + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphNodeFindInClone + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t *pGraph); + +/** + * \brief Creates an empty node and adds it to a graph + * + * Creates a new node which performs no operation, and adds it to \p graph with + * \p numDependencies dependencies specified via \p pDependencies. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p pGraphNode. + * + * An empty node performs no operation during execution, but can be used for + * transitive ordering. For example, a phased execution graph with 2 groups of n + * nodes with a barrier between them can be represented using an empty node and + * 2*n dependency edges, rather than no empty node and n^2 dependency edges. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddEmptyNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies); + +/** + * \brief Creates an event record node and adds it to a graph + * + * Creates a new event record node and adds it to \p hGraph with \p numDependencies + * dependencies specified via \p dependencies and event specified in \p event. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p dependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p phGraphNode. + * + * Each launch of the graph will record \p event to capture execution of the + * node's dependencies. + * + * These nodes may not be used in loops or conditionals. + * + * \param phGraphNode - Returns newly created node + * \param hGraph - Graph to which to add the node + * \param dependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param event - Event for the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphAddEventWaitNode, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphAddEventRecordNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, cudaEvent_t event); +#endif + +/** + * \brief Returns the event associated with an event record node + * + * Returns the event of event record node \p hNode in \p event_out. + * + * \param hNode - Node to get the event for + * \param event_out - Pointer to return the event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphEventRecordNodeSetEvent, + * ::cudaGraphEventWaitNodeGetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t *event_out); +#endif + +/** + * \brief Sets an event record node's event + * + * Sets the event of event record node \p hNode to \p event. + * + * \param hNode - Node to set the event for + * \param event - Event to use + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphEventRecordNodeGetEvent, + * ::cudaGraphEventWaitNodeSetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event); +#endif + +/** + * \brief Creates an event wait node and adds it to a graph + * + * Creates a new event wait node and adds it to \p hGraph with \p numDependencies + * dependencies specified via \p dependencies and event specified in \p event. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p dependencies may not have any duplicate entries. + * A handle to the new node will be returned in \p phGraphNode. + * + * The graph node will wait for all work captured in \p event. See ::cuEventRecord() + * for details on what is captured by an event. The synchronization will be performed + * efficiently on the device when applicable. \p event may be from a different context + * or device than the launch stream. + * + * These nodes may not be used in loops or conditionals. + * + * \param phGraphNode - Returns newly created node + * \param hGraph - Graph to which to add the node + * \param dependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param event - Event for the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphAddEventRecordNode, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphAddEventWaitNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, cudaEvent_t event); +#endif + +/** + * \brief Returns the event associated with an event wait node + * + * Returns the event of event wait node \p hNode in \p event_out. + * + * \param hNode - Node to get the event for + * \param event_out - Pointer to return the event + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphEventWaitNodeSetEvent, + * ::cudaGraphEventRecordNodeGetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t *event_out); +#endif + +/** + * \brief Sets an event wait node's event + * + * Sets the event of event wait node \p hNode to \p event. + * + * \param hNode - Node to set the event for + * \param event - Event to use + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphEventWaitNodeGetEvent, + * ::cudaGraphEventRecordNodeSetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event); +#endif + +/** + * \brief Creates an external semaphore signal node and adds it to a graph + * + * Creates a new external semaphore signal node and adds it to \p graph with \p + * numDependencies dependencies specified via \p dependencies and arguments specified + * in \p nodeParams. It is possible for \p numDependencies to be 0, in which case the + * node will be placed at the root of the graph. \p dependencies may not have any + * duplicate entries. A handle to the new node will be returned in \p pGraphNode. + * + * Performs a signal operation on a set of externally allocated semaphore objects + * when the node is launched. The operation(s) will occur after all of the node's + * dependencies have completed. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param nodeParams - Parameters for the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphExternalSemaphoresSignalNodeGetParams, + * ::cudaGraphExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaImportExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaExternalSemaphoreSignalNodeParams *nodeParams); +#endif + +/** + * \brief Returns an external semaphore signal node's parameters + * + * Returns the parameters of an external semaphore signal node \p hNode in \p params_out. + * The \p extSemArray and \p paramsArray returned in \p params_out, + * are owned by the node. This memory remains valid until the node is destroyed or its + * parameters are modified, and should not be modified + * directly. Use ::cudaGraphExternalSemaphoresSignalNodeSetParams to update the + * parameters of this node. + * + * \param hNode - Node to get the parameters for + * \param params_out - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaLaunchKernel, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaGraphExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, struct cudaExternalSemaphoreSignalNodeParams *params_out); +#endif + +/** + * \brief Sets an external semaphore signal node's parameters + * + * Sets the parameters of an external semaphore signal node \p hNode to \p nodeParams. + * + * \param hNode - Node to set the parameters for + * \param nodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaGraphExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const struct cudaExternalSemaphoreSignalNodeParams *nodeParams); +#endif + +/** + * \brief Creates an external semaphore wait node and adds it to a graph + * + * Creates a new external semaphore wait node and adds it to \p graph with \p numDependencies + * dependencies specified via \p dependencies and arguments specified in \p nodeParams. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p dependencies may not have any duplicate entries. A handle + * to the new node will be returned in \p pGraphNode. + * + * Performs a wait operation on a set of externally allocated semaphore objects + * when the node is launched. The node's dependencies will not be launched until + * the wait operation has completed. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param nodeParams - Parameters for the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphExternalSemaphoresWaitNodeGetParams, + * ::cudaGraphExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaImportExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, const struct cudaExternalSemaphoreWaitNodeParams *nodeParams); +#endif + +/** + * \brief Returns an external semaphore wait node's parameters + * + * Returns the parameters of an external semaphore wait node \p hNode in \p params_out. + * The \p extSemArray and \p paramsArray returned in \p params_out, + * are owned by the node. This memory remains valid until the node is destroyed or its + * parameters are modified, and should not be modified + * directly. Use ::cudaGraphExternalSemaphoresSignalNodeSetParams to update the + * parameters of this node. + * + * \param hNode - Node to get the parameters for + * \param params_out - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaLaunchKernel, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaGraphExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, struct cudaExternalSemaphoreWaitNodeParams *params_out); +#endif + +/** + * \brief Sets an external semaphore wait node's parameters + * + * Sets the parameters of an external semaphore wait node \p hNode to \p nodeParams. + * + * \param hNode - Node to set the parameters for + * \param nodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaGraphExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const struct cudaExternalSemaphoreWaitNodeParams *nodeParams); +#endif + +/** + * \brief Creates an allocation node and adds it to a graph + * + * Creates a new allocation node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies and arguments specified in \p nodeParams. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. A handle + * to the new node will be returned in \p pGraphNode. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param nodeParams - Parameters for the node + * + * When ::cudaGraphAddMemAllocNode creates an allocation node, it returns the address of the allocation in + * \p nodeParams.dptr. The allocation's address remains fixed across instantiations and launches. + * + * If the allocation is freed in the same graph, by creating a free node using ::cudaGraphAddMemFreeNode, + * the allocation can be accessed by nodes ordered after the allocation node but before the free node. + * These allocations cannot be freed outside the owning graph, and they can only be freed once in the + * owning graph. + * + * If the allocation is not freed in the same graph, then it can be accessed not only by nodes in the + * graph which are ordered after the allocation node, but also by stream operations ordered after the + * graph's execution but before the allocation is freed. + * + * Allocations which are not freed in the same graph can be freed by: + * - passing the allocation to ::cudaMemFreeAsync or ::cudaMemFree; + * - launching a graph with a free node for that allocation; or + * - specifying ::cudaGraphInstantiateFlagAutoFreeOnLaunch during instantiation, which makes + * each launch behave as though it called ::cudaMemFreeAsync for every unfreed allocation. + * + * It is not possible to free an allocation in both the owning graph and another graph. If the allocation + * is freed in the same graph, a free node cannot be added to another graph. If the allocation is freed + * in another graph, a free node can no longer be added to the owning graph. + * + * The following restrictions apply to graphs which contain allocation and/or memory free nodes: + * - Nodes and edges of the graph cannot be deleted. + * - The graph cannot be used in a child node. + * - Only one instantiation of the graph may exist at any point in time. + * - The graph cannot be cloned. + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue, + * ::cudaErrorOutOfMemory + * \note_graph_thread_safety + * \notefnerr + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphAddMemFreeNode, + * ::cudaGraphMemAllocNodeGetParams, + * ::cudaDeviceGraphMemTrim, + * ::cudaDeviceGetGraphMemAttribute, + * ::cudaDeviceSetGraphMemAttribute, + * ::cudaMallocAsync, + * ::cudaFreeAsync, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemAllocNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, struct cudaMemAllocNodeParams *nodeParams); +#endif + +/** + * \brief Returns a memory alloc node's parameters + * + * Returns the parameters of a memory alloc node \p hNode in \p params_out. + * The \p poolProps and \p accessDescs returned in \p params_out, are owned by the + * node. This memory remains valid until the node is destroyed. The returned + * parameters must not be modified. + * + * \param node - Node to get the parameters for + * \param params_out - Pointer to return the parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemAllocNode, + * ::cudaGraphMemFreeNodeGetParams + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, struct cudaMemAllocNodeParams *params_out); +#endif + +/** + * \brief Creates a memory free node and adds it to a graph + * + * Creates a new memory free node and adds it to \p graph with \p numDependencies + * dependencies specified via \p pDependencies and address specified in \p dptr. + * It is possible for \p numDependencies to be 0, in which case the node will be placed + * at the root of the graph. \p pDependencies may not have any duplicate entries. A handle + * to the new node will be returned in \p pGraphNode. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param dptr - Address of memory to free + * + * ::cudaGraphAddMemFreeNode will return ::cudaErrorInvalidValue if the user attempts to free: + * - an allocation twice in the same graph. + * - an address that was not returned by an allocation node. + * - an invalid address. + * + * The following restrictions apply to graphs which contain allocation and/or memory free nodes: + * - Nodes and edges of the graph cannot be deleted. + * - The graph cannot be used in a child node. + * - Only one instantiation of the graph may exist at any point in time. + * - The graph cannot be cloned. + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorNotSupported, + * ::cudaErrorInvalidValue, + * ::cudaErrorOutOfMemory + * \note_graph_thread_safety + * \notefnerr + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphAddMemAllocNode, + * ::cudaGraphMemFreeNodeGetParams, + * ::cudaDeviceGraphMemTrim, + * ::cudaDeviceGetGraphMemAttribute, + * ::cudaDeviceSetGraphMemAttribute, + * ::cudaMallocAsync, + * ::cudaFreeAsync, + * ::cudaGraphCreate, + * ::cudaGraphDestroyNode, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaGraphAddMemFreeNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, void *dptr); +#endif + +/** + * \brief Returns a memory free node's parameters + * + * Returns the address of a memory free node \p hNode in \p dptr_out. + * + * \param node - Node to get the parameters for + * \param dptr_out - Pointer to return the device address + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemFreeNode, + * ::cudaGraphMemFreeNodeGetParams + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void *dptr_out); +#endif + +/** + * \brief Free unused memory that was cached on the specified device for use with graphs back to the OS. + * + * Blocks which are not in use by a graph that is either currently executing or scheduled to execute are + * freed back to the operating system. + * + * \param device - The device for which cached memory should be freed. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemAllocNode, + * ::cudaGraphAddMemFreeNode, + * ::cudaDeviceGetGraphMemAttribute, + * ::cudaDeviceSetGraphMemAttribute, + * ::cudaMallocAsync, + * ::cudaFreeAsync + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaDeviceGraphMemTrim(int device); +#endif + +/** + * \brief Query asynchronous allocation attributes related to graphs + * + * Valid attributes are: + * + * - ::cudaGraphMemAttrUsedMemCurrent: Amount of memory, in bytes, currently associated with graphs + * - ::cudaGraphMemAttrUsedMemHigh: High watermark of memory, in bytes, associated with graphs since the + * last time it was reset. High watermark can only be reset to zero. + * - ::cudaGraphMemAttrReservedMemCurrent: Amount of memory, in bytes, currently allocated for use by + * the CUDA graphs asynchronous allocator. + * - ::cudaGraphMemAttrReservedMemHigh: High watermark of memory, in bytes, currently allocated for use by + * the CUDA graphs asynchronous allocator. + * + * \param device - Specifies the scope of the query + * \param attr - attribute to get + * \param value - retrieved value + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceSetGraphMemAttribute, + * ::cudaGraphAddMemAllocNode, + * ::cudaGraphAddMemFreeNode, + * ::cudaDeviceGraphMemTrim, + * ::cudaMallocAsync, + * ::cudaFreeAsync + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaDeviceGetGraphMemAttribute(int device, enum cudaGraphMemAttributeType attr, void* value); +#endif + +/** + * \brief Set asynchronous allocation attributes related to graphs + * + * Valid attributes are: + * + * - ::cudaGraphMemAttrUsedMemHigh: High watermark of memory, in bytes, associated with graphs since the + * last time it was reset. High watermark can only be reset to zero. + * - ::cudaGraphMemAttrReservedMemHigh: High watermark of memory, in bytes, currently allocated for use by + * the CUDA graphs asynchronous allocator. + * + * \param device - Specifies the scope of the query + * \param attr - attribute to get + * \param value - pointer to value to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDevice + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaDeviceGetGraphMemAttribute, + * ::cudaGraphAddMemAllocNode, + * ::cudaGraphAddMemFreeNode, + * ::cudaDeviceGraphMemTrim, + * ::cudaMallocAsync, + * ::cudaFreeAsync + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaDeviceSetGraphMemAttribute(int device, enum cudaGraphMemAttributeType attr, void* value); +#endif + +/** + * \brief Clones a graph + * + * This function creates a copy of \p originalGraph and returns it in \p pGraphClone. + * All parameters are copied into the cloned graph. The original graph may be modified + * after this call without affecting the clone. + * + * Child graph nodes in the original graph are recursively copied into the clone. + * + * \param pGraphClone - Returns newly created cloned graph + * \param originalGraph - Graph to clone + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphNodeFindInClone + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphClone(cudaGraph_t *pGraphClone, cudaGraph_t originalGraph); + +/** + * \brief Finds a cloned version of a node + * + * This function returns the node in \p clonedGraph corresponding to \p originalNode + * in the original graph. + * + * \p clonedGraph must have been cloned from \p originalGraph via ::cudaGraphClone. + * \p originalNode must have been in \p originalGraph at the time of the call to + * ::cudaGraphClone, and the corresponding cloned node in \p clonedGraph must not have + * been removed. The cloned node is then returned via \p pClonedNode. + * + * \param pNode - Returns handle to the cloned node + * \param originalNode - Handle to the original node + * \param clonedGraph - Cloned graph to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphClone + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeFindInClone(cudaGraphNode_t *pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph); + +/** + * \brief Returns a node's type + * + * Returns the node type of \p node in \p pType. + * + * \param node - Node to query + * \param pType - Pointer to return the node type + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphChildGraphNodeGetGraph, + * ::cudaGraphKernelNodeGetParams, + * ::cudaGraphKernelNodeSetParams, + * ::cudaGraphHostNodeGetParams, + * ::cudaGraphHostNodeSetParams, + * ::cudaGraphMemcpyNodeGetParams, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemsetNodeGetParams, + * ::cudaGraphMemsetNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetType(cudaGraphNode_t node, enum cudaGraphNodeType *pType); + +/** + * \brief Returns a graph's nodes + * + * Returns a list of \p graph's nodes. \p nodes may be NULL, in which case this + * function will return the number of nodes in \p numNodes. Otherwise, + * \p numNodes entries will be filled in. If \p numNodes is higher than the actual + * number of nodes, the remaining entries in \p nodes will be set to NULL, and the + * number of nodes actually obtained will be returned in \p numNodes. + * + * \param graph - Graph to query + * \param nodes - Pointer to return the nodes + * \param numNodes - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetType, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t *nodes, size_t *numNodes); + +/** + * \brief Returns a graph's root nodes + * + * Returns a list of \p graph's root nodes. \p pRootNodes may be NULL, in which case this + * function will return the number of root nodes in \p pNumRootNodes. Otherwise, + * \p pNumRootNodes entries will be filled in. If \p pNumRootNodes is higher than the actual + * number of root nodes, the remaining entries in \p pRootNodes will be set to NULL, and the + * number of nodes actually obtained will be returned in \p pNumRootNodes. + * + * \param graph - Graph to query + * \param pRootNodes - Pointer to return the root nodes + * \param pNumRootNodes - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphGetNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetType, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t *pRootNodes, size_t *pNumRootNodes); + +/** + * \brief Returns a graph's dependency edges + * + * Returns a list of \p graph's dependency edges. Edges are returned via corresponding + * indices in \p from and \p to; that is, the node in \p to[i] has a dependency on the + * node in \p from[i]. \p from and \p to may both be NULL, in which + * case this function only returns the number of edges in \p numEdges. Otherwise, + * \p numEdges entries will be filled in. If \p numEdges is higher than the actual + * number of edges, the remaining entries in \p from and \p to will be set to NULL, and + * the number of edges actually returned will be written to \p numEdges. + * + * \param graph - Graph to get the edges from + * \param from - Location to return edge endpoints + * \param to - Location to return edge endpoints + * \param numEdges - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t *from, cudaGraphNode_t *to, size_t *numEdges); + +/** + * \brief Returns a graph's dependency edges (12.3+) + * + * Returns a list of \p graph's dependency edges. Edges are returned via corresponding + * indices in \p from, \p to and \p edgeData; that is, the node in \p to[i] has a + * dependency on the node in \p from[i] with data \p edgeData[i]. \p from and \p to may + * both be NULL, in which case this function only returns the number of edges in + * \p numEdges. Otherwise, \p numEdges entries will be filled in. If \p numEdges is higher + * than the actual number of edges, the remaining entries in \p from and \p to will be + * set to NULL, and the number of edges actually returned will be written to \p numEdges. + * \p edgeData may alone be NULL, in which case the edges must all have default (zeroed) + * edge data. Attempting a losst query via NULL \p edgeData will result in + * ::cudaErrorLossyQuery. If \p edgeData is non-NULL then \p from and \p to must be as + * well. + * + * \param graph - Graph to get the edges from + * \param from - Location to return edge endpoints + * \param to - Location to return edge endpoints + * \param edgeData - Optional location to return edge data + * \param numEdges - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorLossyQuery, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t *from, cudaGraphNode_t *to, cudaGraphEdgeData *edgeData, size_t *numEdges); + +/** + * \brief Returns a node's dependencies + * + * Returns a list of \p node's dependencies. \p pDependencies may be NULL, in which case this + * function will return the number of dependencies in \p pNumDependencies. Otherwise, + * \p pNumDependencies entries will be filled in. If \p pNumDependencies is higher than the actual + * number of dependencies, the remaining entries in \p pDependencies will be set to NULL, and the + * number of nodes actually obtained will be returned in \p pNumDependencies. + * + * \param node - Node to query + * \param pDependencies - Pointer to return the dependencies + * \param pNumDependencies - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeGetDependentNodes, + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t *pDependencies, size_t *pNumDependencies); + +/** + * \brief Returns a node's dependencies (12.3+) + * + * Returns a list of \p node's dependencies. \p pDependencies may be NULL, in which case this + * function will return the number of dependencies in \p pNumDependencies. Otherwise, + * \p pNumDependencies entries will be filled in. If \p pNumDependencies is higher than the actual + * number of dependencies, the remaining entries in \p pDependencies will be set to NULL, and the + * number of nodes actually obtained will be returned in \p pNumDependencies. + * + * Note that if an edge has non-zero (non-default) edge data and \p edgeData is NULL, + * this API will return ::cudaErrorLossyQuery. If \p edgeData is non-NULL, then + * \p pDependencies must be as well. + * + * \param node - Node to query + * \param pDependencies - Pointer to return the dependencies + * \param edgeData - Optional array to return edge data for each dependency + * \param pNumDependencies - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorLossyQuery, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeGetDependentNodes, + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t *pDependencies, cudaGraphEdgeData *edgeData, size_t *pNumDependencies); + +/** + * \brief Returns a node's dependent nodes + * + * Returns a list of \p node's dependent nodes. \p pDependentNodes may be NULL, in which + * case this function will return the number of dependent nodes in \p pNumDependentNodes. + * Otherwise, \p pNumDependentNodes entries will be filled in. If \p pNumDependentNodes is + * higher than the actual number of dependent nodes, the remaining entries in + * \p pDependentNodes will be set to NULL, and the number of nodes actually obtained will + * be returned in \p pNumDependentNodes. + * + * \param node - Node to query + * \param pDependentNodes - Pointer to return the dependent nodes + * \param pNumDependentNodes - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t *pDependentNodes, size_t *pNumDependentNodes); + +/** + * \brief Returns a node's dependent nodes (12.3+) + * + * Returns a list of \p node's dependent nodes. \p pDependentNodes may be NULL, in which + * case this function will return the number of dependent nodes in \p pNumDependentNodes. + * Otherwise, \p pNumDependentNodes entries will be filled in. If \p pNumDependentNodes is + * higher than the actual number of dependent nodes, the remaining entries in + * \p pDependentNodes will be set to NULL, and the number of nodes actually obtained will + * be returned in \p pNumDependentNodes. + * + * Note that if an edge has non-zero (non-default) edge data and \p edgeData is NULL, + * this API will return ::cudaErrorLossyQuery. If \p edgeData is non-NULL, then + * \p pDependentNodes must be as well. + * + * \param node - Node to query + * \param pDependentNodes - Pointer to return the dependent nodes + * \param edgeData - Optional pointer to return edge data for dependent nodes + * \param pNumDependentNodes - See description + * + * \return + * ::cudaSuccess, + * ::cudaErrorLossyQuery, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphGetNodes, + * ::cudaGraphGetRootNodes, + * ::cudaGraphGetEdges, + * ::cudaGraphAddDependencies, + * ::cudaGraphRemoveDependencies + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t *pDependentNodes, cudaGraphEdgeData *edgeData, size_t *pNumDependentNodes); + +/** + * \brief Adds dependency edges to a graph. + * + * The number of dependencies to be added is defined by \p numDependencies + * Elements in \p pFrom and \p pTo at corresponding indices define a dependency. + * Each node in \p pFrom and \p pTo must belong to \p graph. + * + * If \p numDependencies is 0, elements in \p pFrom and \p pTo will be ignored. + * Specifying an existing dependency will return an error. + * + * \param graph - Graph to which dependencies are added + * \param from - Array of nodes that provide the dependencies + * \param to - Array of dependent nodes + * \param numDependencies - Number of dependencies to be added + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphRemoveDependencies, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t *from, const cudaGraphNode_t *to, size_t numDependencies); + +/** + * \brief Adds dependency edges to a graph. (12.3+) + * + * The number of dependencies to be added is defined by \p numDependencies + * Elements in \p pFrom and \p pTo at corresponding indices define a dependency. + * Each node in \p pFrom and \p pTo must belong to \p graph. + * + * If \p numDependencies is 0, elements in \p pFrom and \p pTo will be ignored. + * Specifying an existing dependency will return an error. + * + * \param graph - Graph to which dependencies are added + * \param from - Array of nodes that provide the dependencies + * \param to - Array of dependent nodes + * \param edgeData - Optional array of edge data. If NULL, default (zeroed) edge data is assumed. + * \param numDependencies - Number of dependencies to be added + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphRemoveDependencies, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t *from, const cudaGraphNode_t *to, const cudaGraphEdgeData *edgeData, size_t numDependencies); + +/** + * \brief Removes dependency edges from a graph. + * + * The number of \p pDependencies to be removed is defined by \p numDependencies. + * Elements in \p pFrom and \p pTo at corresponding indices define a dependency. + * Each node in \p pFrom and \p pTo must belong to \p graph. + * + * If \p numDependencies is 0, elements in \p pFrom and \p pTo will be ignored. + * Specifying a non-existing dependency will return an error. + * + * \param graph - Graph from which to remove dependencies + * \param from - Array of nodes that provide the dependencies + * \param to - Array of dependent nodes + * \param numDependencies - Number of dependencies to be removed + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddDependencies, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t *from, const cudaGraphNode_t *to, size_t numDependencies); + +/** + * \brief Removes dependency edges from a graph. (12.3+) + * + * The number of \p pDependencies to be removed is defined by \p numDependencies. + * Elements in \p pFrom and \p pTo at corresponding indices define a dependency. + * Each node in \p pFrom and \p pTo must belong to \p graph. + * + * If \p numDependencies is 0, elements in \p pFrom and \p pTo will be ignored. + * Specifying an edge that does not exist in the graph, with data matching + * \p edgeData, results in an error. \p edgeData is nullable, which is equivalent + * to passing default (zeroed) data for each edge. + * + * \param graph - Graph from which to remove dependencies + * \param from - Array of nodes that provide the dependencies + * \param to - Array of dependent nodes + * \param edgeData - Optional array of edge data. If NULL, edge data is assumed to + * be default (zeroed). + * \param numDependencies - Number of dependencies to be removed + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddDependencies, + * ::cudaGraphGetEdges, + * ::cudaGraphNodeGetDependencies, + * ::cudaGraphNodeGetDependentNodes + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t *from, const cudaGraphNode_t *to, const cudaGraphEdgeData *edgeData, size_t numDependencies); + +/** + * \brief Remove a node from the graph + * + * Removes \p node from its graph. This operation also severs any dependencies of other nodes + * on \p node and vice versa. + * + * Dependencies cannot be removed from graphs which contain allocation or free nodes. + * Any attempt to do so will return an error. + * + * \param node - Node to remove + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphAddEmptyNode, + * ::cudaGraphAddKernelNode, + * ::cudaGraphAddHostNode, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemsetNode + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphDestroyNode(cudaGraphNode_t node); + +/** + * \brief Creates an executable graph from a graph + * + * Instantiates \p graph as an executable graph. The graph is validated for any + * structural constraints or intra-node constraints which were not previously + * validated. If instantiation is successful, a handle to the instantiated graph + * is returned in \p pGraphExec. + * + * The \p flags parameter controls the behavior of instantiation and subsequent + * graph launches. Valid flags are: + * + * - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a + * graph containing memory allocation nodes to automatically free any + * unfreed memory allocations before the graph is relaunched. + * + * - ::cudaGraphInstantiateFlagDeviceLaunch, which configures the graph for launch + * from the device. If this flag is passed, the executable graph handle returned can be + * used to launch the graph from both the host and device. This flag cannot be used in + * conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch. + * + * - ::cudaGraphInstantiateFlagUseNodePriority, which causes the graph + * to use the priorities from the per-node attributes rather than the priority + * of the launch stream during execution. Note that priorities are only available + * on kernel nodes, and are copied from stream priority during stream capture. + * + * If \p graph contains any allocation or free nodes, there can be at most one + * executable graph in existence for that graph at a time. An attempt to + * instantiate a second executable graph before destroying the first with + * ::cudaGraphExecDestroy will result in an error. + * The same also applies if \p graph contains any device-updatable kernel nodes. + * + * Graphs instantiated for launch on the device have additional restrictions which do not + * apply to host graphs: + * + * - The graph's nodes must reside on a single device. + * - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes. + * - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node. + * Operation-specific restrictions are outlined below. + * - Kernel nodes: + * - Use of CUDA Dynamic Parallelism is not permitted. + * - Cooperative launches are permitted as long as MPS is not in use. + * - Memcpy nodes: + * - Only copies involving device memory and/or pinned device-mapped host memory are permitted. + * - Copies involving CUDA arrays are not permitted. + * - Both operands must be accessible from the current device, and the current device must + * match the device of other nodes in the graph. + * + * If \p graph is not instantiated for launch on the device but contains kernels which + * call device-side cudaGraphLaunch() from multiple devices, this will result in an error. + * + * \param pGraphExec - Returns instantiated graph + * \param graph - Graph to instantiate + * \param flags - Flags to control instantiation. See ::CUgraphInstantiate_flags. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiateWithFlags, + * ::cudaGraphCreate, + * ::cudaGraphUpload, + * ::cudaGraphLaunch, + * ::cudaGraphExecDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphInstantiate(cudaGraphExec_t *pGraphExec, cudaGraph_t graph, unsigned long long flags __dv(0)); + +/** + * \brief Creates an executable graph from a graph + * + * Instantiates \p graph as an executable graph. The graph is validated for any + * structural constraints or intra-node constraints which were not previously + * validated. If instantiation is successful, a handle to the instantiated graph + * is returned in \p pGraphExec. + * + * The \p flags parameter controls the behavior of instantiation and subsequent + * graph launches. Valid flags are: + * + * - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a + * graph containing memory allocation nodes to automatically free any + * unfreed memory allocations before the graph is relaunched. + * + * - ::cudaGraphInstantiateFlagDeviceLaunch, which configures the graph for launch + * from the device. If this flag is passed, the executable graph handle returned can be + * used to launch the graph from both the host and device. This flag can only be used + * on platforms which support unified addressing. This flag cannot be used in + * conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch. + * + * - ::cudaGraphInstantiateFlagUseNodePriority, which causes the graph + * to use the priorities from the per-node attributes rather than the priority + * of the launch stream during execution. Note that priorities are only available + * on kernel nodes, and are copied from stream priority during stream capture. + * + * If \p graph contains any allocation or free nodes, there can be at most one + * executable graph in existence for that graph at a time. An attempt to + * instantiate a second executable graph before destroying the first with + * ::cudaGraphExecDestroy will result in an error. + * The same also applies if \p graph contains any device-updatable kernel nodes. + * + * If \p graph contains kernels which call device-side cudaGraphLaunch() from multiple + * devices, this will result in an error. + * + * Graphs instantiated for launch on the device have additional restrictions which do not + * apply to host graphs: + * + * - The graph's nodes must reside on a single device. + * - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes. + * - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node. + * Operation-specific restrictions are outlined below. + * - Kernel nodes: + * - Use of CUDA Dynamic Parallelism is not permitted. + * - Cooperative launches are permitted as long as MPS is not in use. + * - Memcpy nodes: + * - Only copies involving device memory and/or pinned device-mapped host memory are permitted. + * - Copies involving CUDA arrays are not permitted. + * - Both operands must be accessible from the current device, and the current device must + * match the device of other nodes in the graph. + * + * \param pGraphExec - Returns instantiated graph + * \param graph - Graph to instantiate + * \param flags - Flags to control instantiation. See ::CUgraphInstantiate_flags. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiate, + * ::cudaGraphCreate, + * ::cudaGraphUpload, + * ::cudaGraphLaunch, + * ::cudaGraphExecDestroy + */ +#if __CUDART_API_VERSION >= 11040 +extern __host__ cudaError_t CUDARTAPI cudaGraphInstantiateWithFlags(cudaGraphExec_t *pGraphExec, cudaGraph_t graph, unsigned long long flags __dv(0)); +#endif + +/** + * \brief Creates an executable graph from a graph + * + * Instantiates \p graph as an executable graph according to the \p instantiateParams structure. + * The graph is validated for any structural constraints or intra-node constraints + * which were not previously validated. If instantiation is successful, a handle to + * the instantiated graph is returned in \p pGraphExec. + * + * \p instantiateParams controls the behavior of instantiation and subsequent + * graph launches, as well as returning more detailed information in the event of an error. + * ::cudaGraphInstantiateParams is defined as: + * + * \code + typedef struct { + unsigned long long flags; + cudaStream_t uploadStream; + cudaGraphNode_t errNode_out; + cudaGraphInstantiateResult result_out; + } cudaGraphInstantiateParams; + * \endcode + * + * The \p flags field controls the behavior of instantiation and subsequent + * graph launches. Valid flags are: + * + * - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a + * graph containing memory allocation nodes to automatically free any + * unfreed memory allocations before the graph is relaunched. + * + * - ::cudaGraphInstantiateFlagUpload, which will perform an upload of the graph + * into \p uploadStream once the graph has been instantiated. + * + * - ::cudaGraphInstantiateFlagDeviceLaunch, which configures the graph for launch + * from the device. If this flag is passed, the executable graph handle returned can be + * used to launch the graph from both the host and device. This flag can only be used + * on platforms which support unified addressing. This flag cannot be used in + * conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch. + * + * - ::cudaGraphInstantiateFlagUseNodePriority, which causes the graph + * to use the priorities from the per-node attributes rather than the priority + * of the launch stream during execution. Note that priorities are only available + * on kernel nodes, and are copied from stream priority during stream capture. + * + * If \p graph contains any allocation or free nodes, there can be at most one + * executable graph in existence for that graph at a time. An attempt to instantiate a + * second executable graph before destroying the first with ::cudaGraphExecDestroy will + * result in an error. + * The same also applies if \p graph contains any device-updatable kernel nodes. + * + * If \p graph contains kernels which call device-side cudaGraphLaunch() from multiple + * devices, this will result in an error. + * + * Graphs instantiated for launch on the device have additional restrictions which do not + * apply to host graphs: + * + * - The graph's nodes must reside on a single device. + * - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes. + * - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node. + * Operation-specific restrictions are outlined below. + * - Kernel nodes: + * - Use of CUDA Dynamic Parallelism is not permitted. + * - Cooperative launches are permitted as long as MPS is not in use. + * - Memcpy nodes: + * - Only copies involving device memory and/or pinned device-mapped host memory are permitted. + * - Copies involving CUDA arrays are not permitted. + * - Both operands must be accessible from the current device, and the current device must + * match the device of other nodes in the graph. + * + * In the event of an error, the \p result_out and \p errNode_out fields will contain more + * information about the nature of the error. Possible error reporting includes: + * + * - ::cudaGraphInstantiateError, if passed an invalid value or if an unexpected error occurred + * which is described by the return value of the function. \p errNode_out will be set to NULL. + * - ::cudaGraphInstantiateInvalidStructure, if the graph structure is invalid. \p errNode_out + * will be set to one of the offending nodes. + * - ::cudaGraphInstantiateNodeOperationNotSupported, if the graph is instantiated for device + * launch but contains a node of an unsupported node type, or a node which performs unsupported + * operations, such as use of CUDA dynamic parallelism within a kernel node. \p errNode_out will + * be set to this node. + * - ::cudaGraphInstantiateMultipleDevicesNotSupported, if the graph is instantiated for device + * launch but a node’s device differs from that of another node. This error can also be returned + * if a graph is not instantiated for device launch and it contains kernels which call device-side + * cudaGraphLaunch() from multiple devices. \p errNode_out will be set to this node. + * + * If instantiation is successful, \p result_out will be set to ::cudaGraphInstantiateSuccess, + * and \p hErrNode_out will be set to NULL. + * + * \param pGraphExec - Returns instantiated graph + * \param graph - Graph to instantiate + * \param instantiateParams - Instantiation parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphInstantiate, + * ::cudaGraphInstantiateWithFlags, + * ::cudaGraphExecDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphInstantiateWithParams(cudaGraphExec_t *pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams *instantiateParams); + +/** + * \brief Query the instantiation flags of an executable graph + * + * Returns the flags that were passed to instantiation for the given executable graph. + * ::cudaGraphInstantiateFlagUpload will not be returned by this API as it does + * not affect the resulting executable graph. + * + * \param graphExec - The executable graph to query + * \param flags - Returns the instantiation flags + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiate, + * ::cudaGraphInstantiateWithFlags, + * ::cudaGraphInstantiateWithParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long *flags); + +/** + * \brief Sets the parameters for a kernel node in the given graphExec + * + * Sets the parameters of a kernel node in an executable graph \p hGraphExec. + * The node is identified by the corresponding node \p node in the + * non-executable graph, from which the executable graph was instantiated. + * + * \p node must not have been removed from the original graph. All \p nodeParams + * fields may change, but the following restrictions apply to \p func updates: + * + * - The owning device of the function cannot change. + * - A node whose function originally did not use CUDA dynamic parallelism cannot be updated + * to a function which uses CDP + * - A node whose function originally did not make device-side update calls cannot be updated + * to a function which makes device-side update calls. + * - If \p hGraphExec was not instantiated for device launch, a node whose function originally + * did not use device-side cudaGraphLaunch() cannot be updated to a function which uses + * device-side cudaGraphLaunch() unless the node resides on the same device as nodes which + * contained such calls at instantiate-time. If no such calls were present at instantiation, + * these updates cannot be performed at all. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p node is also not modified by this call. + * + * If \p node is a device-updatable kernel node, the next upload/launch of \p hGraphExec + * will overwrite any previous device-side updates. Additionally, applying host updates to a + * device-updatable kernel node while it is being updated from the device will result in + * undefined behavior. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - kernel node from the graph from which graphExec was instantiated + * \param pNodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_cudaKernel_t + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddKernelNode, + * ::cudaGraphKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const struct cudaKernelNodeParams *pNodeParams); + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec. + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained \p pNodeParams at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * The source and destination memory in \p pNodeParams must be allocated from the same + * contexts as the original source and destination memory. Both the instantiation-time + * memory operands and the memory operands in \p pNodeParams must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * either the original or new memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param pNodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParamsToSymbol, + * ::cudaGraphExecMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphExecMemcpyNodeSetParams1D, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const struct cudaMemcpy3DParms *pNodeParams); + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the device + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained the given params at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * \p src and \p symbol must be allocated from the same contexts as the original source and + * destination memory. The instantiation-time memory operands must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * the original memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param symbol - Device symbol address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeToSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsToSymbol, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsToSymbol( + cudaGraphExec_t hGraphExec, + cudaGraphNode_t node, + const void* symbol, + const void* src, + size_t count, + size_t offset, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the device + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained the given params at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * \p symbol and \p dst must be allocated from the same contexts as the original source and + * destination memory. The instantiation-time memory operands must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * the original memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param dst - Destination memory address + * \param symbol - Device symbol address + * \param count - Size in bytes to copy + * \param offset - Offset from start of symbol in bytes + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNodeFromSymbol, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParamsFromSymbol, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParamsToSymbol, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParamsFromSymbol( + cudaGraphExec_t hGraphExec, + cudaGraphNode_t node, + void* dst, + const void* symbol, + size_t count, + size_t offset, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional copy + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained the given params at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * \p src and \p dst must be allocated from the same contexts as the original source + * and destination memory. The instantiation-time memory operands must be 1-dimensional. + * Zero-length operations are not supported. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or + * the original memory operands are multidimensional. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memcpy node from the graph which was used to instantiate graphExec + * \param dst - Destination memory address + * \param src - Source memory address + * \param count - Size in bytes to copy + * \param kind - Type of transfer + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddMemcpyNode, + * ::cudaGraphAddMemcpyNode1D, + * ::cudaGraphMemcpyNodeSetParams, + * ::cudaGraphMemcpyNodeSetParams1D, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemcpyNodeSetParams1D( + cudaGraphExec_t hGraphExec, + cudaGraphNode_t node, + void* dst, + const void* src, + size_t count, + enum cudaMemcpyKind kind); +#endif + +/** + * \brief Sets the parameters for a memset node in the given graphExec. + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained \p pNodeParams at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * Zero sized operations are not supported. + * + * The new destination pointer in \p pNodeParams must be to the same kind of allocation + * as the original destination pointer and have the same context association and device mapping + * as the original destination pointer. + * + * Both the value and pointer address may be updated. + * Changing other aspects of the memset (width, height, element size or pitch) may cause the update to be rejected. + * Specifically, for 2d memsets, all dimension changes are rejected. + * For 1d memsets, changes in height are explicitly rejected and other changes are oportunistically allowed + * if the resulting work maps onto the work resources already allocated for the node. + + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Memset node from the graph which was used to instantiate graphExec + * \param pNodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddMemsetNode, + * ::cudaGraphMemsetNodeSetParams, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const struct cudaMemsetParams *pNodeParams); + +/** + * \brief Sets the parameters for a host node in the given graphExec. + * + * Updates the work represented by \p node in \p hGraphExec as though \p node had + * contained \p pNodeParams at instantiation. \p node must remain in the graph which was + * used to instantiate \p hGraphExec. Changed edges to and from \p node are ignored. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Host node from the graph which was used to instantiate graphExec + * \param pNodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddHostNode, + * ::cudaGraphHostNodeSetParams, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const struct cudaHostNodeParams *pNodeParams); + +/** + * \brief Updates node parameters in the child graph node in the given graphExec. + * + * Updates the work represented by \p node in \p hGraphExec as though the nodes contained + * in \p node's graph had the parameters contained in \p childGraph's nodes at instantiation. + * \p node must remain in the graph which was used to instantiate \p hGraphExec. + * Changed edges to and from \p node are ignored. + * + * The modifications only affect future launches of \p hGraphExec. Already enqueued + * or running launches of \p hGraphExec are not affected by this call. \p node is also + * not modified by this call. + * + * The topology of \p childGraph, as well as the node insertion order, must match that + * of the graph contained in \p node. See ::cudaGraphExecUpdate() for a list of restrictions + * on what can be updated in an instantiated graph. The update is recursive, so child graph + * nodes contained within the top level child graph will also be updated. + + * \param hGraphExec - The executable graph in which to set the specified node + * \param node - Host node from the graph which was used to instantiate graphExec + * \param childGraph - The graph supplying the updated parameters + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddChildGraphNode, + * ::cudaGraphChildGraphNodeGetGraph, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph); +#endif + +/** + * \brief Sets the event for an event record node in the given graphExec + * + * Sets the event of an event record node in an executable graph \p hGraphExec. + * The node is identified by the corresponding node \p hNode in the + * non-executable graph, from which the executable graph was instantiated. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p hNode is also not modified by this call. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - Event record node from the graph from which graphExec was instantiated + * \param event - Updated event to use + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddEventRecordNode, + * ::cudaGraphEventRecordNodeGetEvent, + * ::cudaGraphEventWaitNodeSetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event); +#endif + +/** + * \brief Sets the event for an event wait node in the given graphExec + * + * Sets the event of an event wait node in an executable graph \p hGraphExec. + * The node is identified by the corresponding node \p hNode in the + * non-executable graph, from which the executable graph was instantiated. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p hNode is also not modified by this call. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - Event wait node from the graph from which graphExec was instantiated + * \param event - Updated event to use + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddEventWaitNode, + * ::cudaGraphEventWaitNodeGetEvent, + * ::cudaGraphEventRecordNodeSetEvent, + * ::cudaEventRecordWithFlags, + * ::cudaStreamWaitEvent, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event); +#endif + +/** + * \brief Sets the parameters for an external semaphore signal node in the given graphExec + * + * Sets the parameters of an external semaphore signal node in an executable graph \p hGraphExec. + * The node is identified by the corresponding node \p hNode in the + * non-executable graph, from which the executable graph was instantiated. + * + * \p hNode must not have been removed from the original graph. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p hNode is also not modified by this call. + * + * Changing \p nodeParams->numExtSems is not supported. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - semaphore signal node from the graph from which graphExec was instantiated + * \param nodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddExternalSemaphoresSignalNode, + * ::cudaImportExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresWaitNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const struct cudaExternalSemaphoreSignalNodeParams *nodeParams); +#endif + +/** + * \brief Sets the parameters for an external semaphore wait node in the given graphExec + * + * Sets the parameters of an external semaphore wait node in an executable graph \p hGraphExec. + * The node is identified by the corresponding node \p hNode in the + * non-executable graph, from which the executable graph was instantiated. + * + * \p hNode must not have been removed from the original graph. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p hNode is also not modified by this call. + * + * Changing \p nodeParams->numExtSems is not supported. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - semaphore wait node from the graph from which graphExec was instantiated + * \param nodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphExecNodeSetParams, + * ::cudaGraphAddExternalSemaphoresWaitNode, + * ::cudaImportExternalSemaphore, + * ::cudaSignalExternalSemaphoresAsync, + * ::cudaWaitExternalSemaphoresAsync, + * ::cudaGraphExecKernelNodeSetParams, + * ::cudaGraphExecMemcpyNodeSetParams, + * ::cudaGraphExecMemsetNodeSetParams, + * ::cudaGraphExecHostNodeSetParams, + * ::cudaGraphExecChildGraphNodeSetParams, + * ::cudaGraphExecEventRecordNodeSetEvent, + * ::cudaGraphExecEventWaitNodeSetEvent, + * ::cudaGraphExecExternalSemaphoresSignalNodeSetParams, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +#if __CUDART_API_VERSION >= 11020 +extern __host__ cudaError_t CUDARTAPI cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const struct cudaExternalSemaphoreWaitNodeParams *nodeParams); +#endif + +/** + * \brief Enables or disables the specified node in the given graphExec + * + * Sets \p hNode to be either enabled or disabled. Disabled nodes are functionally equivalent + * to empty nodes until they are reenabled. Existing node parameters are not affected by + * disabling/enabling the node. + * + * The node is identified by the corresponding node \p hNode in the non-executable + * graph, from which the executable graph was instantiated. + * + * \p hNode must not have been removed from the original graph. + * + * The modifications only affect future launches of \p hGraphExec. Already + * enqueued or running launches of \p hGraphExec are not affected by this call. + * \p hNode is also not modified by this call. + * + * \note Currently only kernel, memset and memcpy nodes are supported. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - Node from the graph from which graphExec was instantiated + * \param isEnabled - Node is enabled if != 0, otherwise the node is disabled + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeGetEnabled, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + * ::cudaGraphLaunch + */ +#if __CUDART_API_VERSION >= 11060 +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled); +#endif + +/** + * \brief Query whether a node in the given graphExec is enabled + * + * Sets isEnabled to 1 if \p hNode is enabled, or 0 if \p hNode is disabled. + * + * The node is identified by the corresponding node \p hNode in the non-executable + * graph, from which the executable graph was instantiated. + * + * \p hNode must not have been removed from the original graph. + * + * \note Currently only kernel, memset and memcpy nodes are supported. + * + * \param hGraphExec - The executable graph in which to set the specified node + * \param hNode - Node from the graph from which graphExec was instantiated + * \param isEnabled - Location to return the enabled status of the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphNodeSetEnabled, + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + * ::cudaGraphLaunch + */ +#if __CUDART_API_VERSION >= 11060 +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int *isEnabled); +#endif + +/** + * \brief Check whether an executable graph can be updated with a graph and perform the update if possible + * + * Updates the node parameters in the instantiated graph specified by \p hGraphExec with the + * node parameters in a topologically identical graph specified by \p hGraph. + * + * Limitations: + * + * - Kernel nodes: + * - The owning context of the function cannot change. + * - A node whose function originally did not use CUDA dynamic parallelism cannot be updated + * to a function which uses CDP. + * - A node whose function originally did not make device-side update calls cannot be updated + * to a function which makes device-side update calls. + * - A cooperative node cannot be updated to a non-cooperative node, and vice-versa. + * - If the graph was instantiated with cudaGraphInstantiateFlagUseNodePriority, the + * priority attribute cannot change. Equality is checked on the originally requested + * priority values, before they are clamped to the device's supported range. + * - If \p hGraphExec was not instantiated for device launch, a node whose function originally + * did not use device-side cudaGraphLaunch() cannot be updated to a function which uses + * device-side cudaGraphLaunch() unless the node resides on the same device as nodes which + * contained such calls at instantiate-time. If no such calls were present at instantiation, + * these updates cannot be performed at all. + * - Neither \p hGraph nor \p hGraphExec may contain device-updatable kernel nodes. + * - Memset and memcpy nodes: + * - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change. + * - The source/destination memory must be allocated from the same contexts as the original + * source/destination memory. + * - For 2d memsets, only address and assinged value may be updated. + * - For 1d memsets, updating dimensions is also allowed, but may fail if the resulting operation doesn't + * map onto the work resources already allocated for the node. + * - Additional memcpy node restrictions: + * - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE, + * CU_MEMORYTYPE_ARRAY, etc.) is not supported. + * - Conditional nodes: + * - Changing node parameters is not supported. + * - Changeing parameters of nodes within the conditional body graph is subject to the rules above. + * - Conditional handle flags and default values are updated as part of the graph update. + * + * Note: The API may add further restrictions in future releases. The return code should always be checked. + * + * cudaGraphExecUpdate sets the result member of \p resultInfo to cudaGraphExecUpdateErrorTopologyChanged + * under the following conditions: + * - The count of nodes directly in \p hGraphExec and \p hGraph differ, in which case resultInfo->errorNode + * is set to NULL. + * - \p hGraph has more exit nodes than \p hGraph, in which case resultInfo->errorNode is set to one of + * the exit nodes in hGraph. + * - A node in \p hGraph has a different number of dependencies than the node from \p hGraphExec it is paired with, + * in which case resultInfo->errorNode is set to the node from \p hGraph. + * - A node in \p hGraph has a dependency that does not match with the corresponding dependency of the paired node + * from \p hGraphExec. resultInfo->errorNode will be set to the node from \p hGraph. resultInfo->errorFromNode + * will be set to the mismatched dependency. The dependencies are paired based on edge order and a dependency + * does not match when the nodes are already paired based on other edges examined in the graph. + * + * cudaGraphExecUpdate sets \p the result member of \p resultInfo to: + * - cudaGraphExecUpdateError if passed an invalid value. + * - cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed + * - cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node changed, in which case + * \p hErrorNode_out is set to the node from \p hGraph. + * - cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel node changed (CUDA driver < 11.2) + * - cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field of a kernel changed in an + * unsupported way(see note above), in which case \p hErrorNode_out is set to the node from \p hGraph + * - cudaGraphExecUpdateErrorParametersChanged if any parameters to a node changed in a way + * that is not supported, in which case \p hErrorNode_out is set to the node from \p hGraph + * - cudaGraphExecUpdateErrorAttributesChanged if any attributes of a node changed in a way + * that is not supported, in which case \p hErrorNode_out is set to the node from \p hGraph + * - cudaGraphExecUpdateErrorNotSupported if something about a node is unsupported, like + * the node's type or configuration, in which case \p hErrorNode_out is set to the node from \p hGraph + * + * If the update fails for a reason not listed above, the result member of \p resultInfo will be set + * to cudaGraphExecUpdateError. If the update succeeds, the result member will be set to cudaGraphExecUpdateSuccess. + * + * cudaGraphExecUpdate returns cudaSuccess when the updated was performed successfully. It returns + * cudaErrorGraphExecUpdateFailure if the graph update was not performed because it included + * changes which violated constraints specific to instantiated graph update. + * + * \param hGraphExec The instantiated graph to be updated + * \param hGraph The graph containing the updated parameters + \param resultInfo the error info structure + * + * \return + * ::cudaSuccess, + * ::cudaErrorGraphExecUpdateFailure, + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo *resultInfo); + +/** + * \brief Uploads an executable graph in a stream + * + * Uploads \p hGraphExec to the device in \p hStream without executing it. Uploads of + * the same \p hGraphExec will be serialized. Each upload is ordered behind both any + * previous work in \p hStream and any previous launches of \p hGraphExec. + * Uses memory cached by \p stream to back the allocations owned by \p graphExec. + * + * \param hGraphExec - Executable graph to upload + * \param hStream - Stream in which to upload the graph + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * \notefnerr + * \note_init_rt + * + * \sa + * ::cudaGraphInstantiate, + * ::cudaGraphLaunch, + * ::cudaGraphExecDestroy + */ +#if __CUDART_API_VERSION >= 11010 + extern __host__ cudaError_t CUDARTAPI cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream); +#endif + +/** + * \brief Launches an executable graph in a stream + * + * Executes \p graphExec in \p stream. Only one instance of \p graphExec may be executing + * at a time. Each launch is ordered behind both any previous work in \p stream + * and any previous launches of \p graphExec. To execute a graph concurrently, it must be + * instantiated multiple times into multiple executable graphs. + * + * If any allocations created by \p graphExec remain unfreed (from a previous launch) and + * \p graphExec was not instantiated with ::cudaGraphInstantiateFlagAutoFreeOnLaunch, + * the launch will fail with ::cudaErrorInvalidValue. + * + * \param graphExec - Executable graph to launch + * \param stream - Stream in which to launch the graph + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphInstantiate, + * ::cudaGraphUpload, + * ::cudaGraphExecDestroy + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream); + +/** + * \brief Destroys an executable graph + * + * Destroys the executable graph specified by \p graphExec. + * + * \param graphExec - Executable graph to destroy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaGraphInstantiate, + * ::cudaGraphUpload, + * ::cudaGraphLaunch + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecDestroy(cudaGraphExec_t graphExec); + +/** + * \brief Destroys a graph + * + * Destroys the graph specified by \p graph, as well as all of its nodes. + * + * \param graph - Graph to destroy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * \note_destroy_ub + * + * \sa + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphDestroy(cudaGraph_t graph); + +/** + * \brief Write a DOT file describing graph structure + * + * Using the provided \p graph, write to \p path a DOT formatted description of the graph. + * By default this includes the graph topology, node types, node id, kernel names and memcpy direction. + * \p flags can be specified to write more detailed information about each node type such as + * parameter values, kernel attributes, node and function handles. + * + * \param graph - The graph to create a DOT file from + * \param path - The path to write the DOT file to + * \param flags - Flags from cudaGraphDebugDotFlags for specifying which additional node information to write + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorOperatingSystem + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphDebugDotPrint(cudaGraph_t graph, const char *path, unsigned int flags); + +/** + * \brief Create a user object + * + * Create a user object with the specified destructor callback and initial reference count. The + * initial references are owned by the caller. + * + * Destructor callbacks cannot make CUDA API calls and should avoid blocking behavior, as they + * are executed by a shared internal thread. Another thread may be signaled to perform such + * actions, if it does not block forward progress of tasks scheduled through CUDA. + * + * See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects. + * + * \param object_out - Location to return the user object handle + * \param ptr - The pointer to pass to the destroy function + * \param destroy - Callback to free the user object when it is no longer in use + * \param initialRefcount - The initial refcount to create the object with, typically 1. The + * initial references are owned by the calling thread. + * \param flags - Currently it is required to pass ::cudaUserObjectNoDestructorSync, + * which is the only defined flag. This indicates that the destroy + * callback cannot be waited on by any CUDA API. Users requiring + * synchronization of the callback should signal its completion + * manually. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectRetain, + * ::cudaUserObjectRelease, + * ::cudaGraphRetainUserObject, + * ::cudaGraphReleaseUserObject, + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaUserObjectCreate(cudaUserObject_t *object_out, void *ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags); + +/** + * \brief Retain a reference to a user object + * + * Retains new references to a user object. The new references are owned by the caller. + * + * See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects. + * + * \param object - The object to retain + * \param count - The number of references to retain, typically 1. Must be nonzero + * and not larger than INT_MAX. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectCreate, + * ::cudaUserObjectRelease, + * ::cudaGraphRetainUserObject, + * ::cudaGraphReleaseUserObject, + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaUserObjectRetain(cudaUserObject_t object, unsigned int count __dv(1)); + +/** + * \brief Release a reference to a user object + * + * Releases user object references owned by the caller. The object's destructor is invoked if + * the reference count reaches zero. + * + * It is undefined behavior to release references not owned by the caller, or to use a user + * object handle after all references are released. + * + * See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects. + * + * \param object - The object to release + * \param count - The number of references to release, typically 1. Must be nonzero + * and not larger than INT_MAX. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectCreate, + * ::cudaUserObjectRetain, + * ::cudaGraphRetainUserObject, + * ::cudaGraphReleaseUserObject, + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaUserObjectRelease(cudaUserObject_t object, unsigned int count __dv(1)); + +/** + * \brief Retain a reference to a user object from a graph + * + * Creates or moves user object references that will be owned by a CUDA graph. + * + * See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects. + * + * \param graph - The graph to associate the reference with + * \param object - The user object to retain a reference for + * \param count - The number of references to add to the graph, typically 1. Must be + * nonzero and not larger than INT_MAX. + * \param flags - The optional flag ::cudaGraphUserObjectMove transfers references + * from the calling thread, rather than create new references. Pass 0 + * to create new references. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectCreate + * ::cudaUserObjectRetain, + * ::cudaUserObjectRelease, + * ::cudaGraphReleaseUserObject, + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count __dv(1), unsigned int flags __dv(0)); + +/** + * \brief Release a user object reference from a graph + * + * Releases user object references owned by a graph. + * + * See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects. + * + * \param graph - The graph that will release the reference + * \param object - The user object to release a reference for + * \param count - The number of references to release, typically 1. Must be nonzero + * and not larger than INT_MAX. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue + * + * \sa + * ::cudaUserObjectCreate + * ::cudaUserObjectRetain, + * ::cudaUserObjectRelease, + * ::cudaGraphRetainUserObject, + * ::cudaGraphCreate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count __dv(1)); + +/** + * \brief Adds a node of arbitrary type to a graph + * + * Creates a new node in \p graph described by \p nodeParams with \p numDependencies + * dependencies specified via \p pDependencies. \p numDependencies may be 0. + * \p pDependencies may be null if \p numDependencies is 0. \p pDependencies may not have + * any duplicate entries. + * + * \p nodeParams is a tagged union. The node type should be specified in the \p type field, + * and type-specific parameters in the corresponding union member. All unused bytes - that + * is, \p reserved0 and all bytes past the utilized union member - must be set to zero. + * It is recommended to use brace initialization or memset to ensure all bytes are + * initialized. + * + * Note that for some node types, \p nodeParams may contain "out parameters" which are + * modified during the call, such as \p nodeParams->alloc.dptr. + * + * A handle to the new node will be returned in \p phGraphNode. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param numDependencies - Number of dependencies + * \param nodeParams - Specification of the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorNotSupported + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphNodeSetParams, + * ::cudaGraphExecNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddNode(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, size_t numDependencies, struct cudaGraphNodeParams *nodeParams); + +/** + * \brief Adds a node of arbitrary type to a graph (12.3+) + * + * Creates a new node in \p graph described by \p nodeParams with \p numDependencies + * dependencies specified via \p pDependencies. \p numDependencies may be 0. + * \p pDependencies may be null if \p numDependencies is 0. \p pDependencies may not have + * any duplicate entries. + * + * \p nodeParams is a tagged union. The node type should be specified in the \p type field, + * and type-specific parameters in the corresponding union member. All unused bytes - that + * is, \p reserved0 and all bytes past the utilized union member - must be set to zero. + * It is recommended to use brace initialization or memset to ensure all bytes are + * initialized. + * + * Note that for some node types, \p nodeParams may contain "out parameters" which are + * modified during the call, such as \p nodeParams->alloc.dptr. + * + * A handle to the new node will be returned in \p phGraphNode. + * + * \param pGraphNode - Returns newly created node + * \param graph - Graph to which to add the node + * \param pDependencies - Dependencies of the node + * \param dependencyData - Optional edge data for the dependencies. If NULL, the data is + * assumed to be default (zeroed) for all dependencies. + * \param numDependencies - Number of dependencies + * \param nodeParams - Specification of the node + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorNotSupported + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphCreate, + * ::cudaGraphNodeSetParams, + * ::cudaGraphExecNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphAddNode_v2(cudaGraphNode_t *pGraphNode, cudaGraph_t graph, const cudaGraphNode_t *pDependencies, const cudaGraphEdgeData *dependencyData, size_t numDependencies, struct cudaGraphNodeParams *nodeParams); + +/** + * \brief Update's a graph node's parameters + * + * Sets the parameters of graph node \p node to \p nodeParams. The node type specified by + * \p nodeParams->type must match the type of \p node. \p nodeParams must be fully + * initialized and all unused bytes (reserved, padding) zeroed. + * + * Modifying parameters is not supported for node types cudaGraphNodeTypeMemAlloc and + * cudaGraphNodeTypeMemFree. + * + * \param node - Node to set the parameters for + * \param nodeParams - Parameters to copy + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorNotSupported + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphExecNodeSetParams + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphNodeSetParams(cudaGraphNode_t node, struct cudaGraphNodeParams *nodeParams); + +/** + * \brief Update's a graph node's parameters in an instantiated graph + * + * Sets the parameters of a node in an executable graph \p graphExec. The node is identified + * by the corresponding node \p node in the non-executable graph from which the executable + * graph was instantiated. \p node must not have been removed from the original graph. + * + * The modifications only affect future launches of \p graphExec. Already + * enqueued or running launches of \p graphExec are not affected by this call. + * \p node is also not modified by this call. + * + * Allowed changes to parameters on executable graphs are as follows: + * + *
Node typeAllowed changes + *
kernelSee ::cudaGraphExecKernelNodeSetParams + *
memcpyAddresses for 1-dimensional copies if allocated in same context; see ::cudaGraphExecMemcpyNodeSetParams + *
memsetAddresses for 1-dimensional memsets if allocated in same context; see ::cudaGraphExecMemsetNodeSetParams + *
hostUnrestricted + *
child graphTopology must match and restrictions apply recursively; see ::cudaGraphExecUpdate + *
event waitUnrestricted + *
event recordUnrestricted + *
external semaphore signalNumber of semaphore operations cannot change + *
external semaphore waitNumber of semaphore operations cannot change + *
memory allocationAPI unsupported + *
memory freeAPI unsupported + *
+ * + * \param graphExec - The executable graph in which to update the specified node + * \param node - Corresponding node from the graph from which graphExec was instantiated + * \param nodeParams - Updated Parameters to set + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorNotSupported + * \note_graph_thread_safety + * \notefnerr + * \note_init_rt + * \note_callback + * + * \sa + * ::cudaGraphAddNode, + * ::cudaGraphNodeSetParams + * ::cudaGraphExecUpdate, + * ::cudaGraphInstantiate + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, struct cudaGraphNodeParams *nodeParams); + +/** + * \brief Create a conditional handle + * + * Creates a conditional handle associated with \p hGraph. + * + * The conditional handle must be associated with a conditional node in this graph or one of its children. + * + * Handles not associated with a conditional node may cause graph instantiation to fail. + * + * \param pHandle_out - Pointer used to return the handle to the caller. + * \param hGraph - Graph which will contain the conditional node using this handle. + * \param defaultLaunchValue - Optional initial value for the conditional variable. + * Applied at the beginning of each graph execution if cudaGraphCondAssignDefault is set in \p flags. + * \param flags - Currently must be cudaGraphCondAssignDefault or 0. + * + * \return + * ::CUDA_SUCCESS, + * ::CUDA_ERROR_INVALID_VALUE, + * ::CUDA_ERROR_NOT_SUPPORTED + * \note_graph_thread_safety + * \notefnerr + * + * \sa + * ::cuGraphAddNode, + */ +extern __host__ cudaError_t CUDARTAPI cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle *pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue __dv(0), unsigned int flags __dv(0)); + +/** @} */ /* END CUDART_GRAPH */ + +/** + * \defgroup CUDART_DRIVER_ENTRY_POINT Driver Entry Point Access + * + * ___MANBRIEF___ driver entry point access functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the driver entry point access functions of CUDA + * runtime application programming interface. + * + * @{ + */ + +/** + * \brief Returns the requested driver API function pointer + * + * Returns in \p **funcPtr the address of the CUDA driver function for the requested flags. + * + * For a requested driver symbol, if the CUDA version in which the driver symbol was + * introduced is less than or equal to the CUDA runtime version, the API will return + * the function pointer to the corresponding versioned driver function. + * + * The pointer returned by the API should be cast to a function pointer matching the + * requested driver function's definition in the API header file. The function pointer + * typedef can be picked up from the corresponding typedefs header file. For example, + * cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h. + * + * The API will return ::cudaSuccess and set the returned \p funcPtr if the + * requested driver function is valid and supported on the platform. + * + * The API will return ::cudaSuccess and set the returned \p funcPtr to NULL if the + * requested driver function is not supported on the platform, no ABI + * compatible driver function exists for the CUDA runtime version or if the + * driver symbol is invalid. + * + * It will also set the optional \p driverStatus to one of the values in + * ::cudaDriverEntryPointQueryResult with the following meanings: + * - ::cudaDriverEntryPointSuccess - The requested symbol was succesfully found based + * on input arguments and \p pfn is valid + * - ::cudaDriverEntryPointSymbolNotFound - The requested symbol was not found + * - ::cudaDriverEntryPointVersionNotSufficent - The requested symbol was found but is + * not supported by the current runtime version (CUDART_VERSION) + * + * The requested flags can be: + * - ::cudaEnableDefault: This is the default mode. This is equivalent to + * ::cudaEnablePerThreadDefaultStream if the code is compiled with + * --default-stream per-thread compilation flag or the macro CUDA_API_PER_THREAD_DEFAULT_STREAM + * is defined; ::cudaEnableLegacyStream otherwise. + * - ::cudaEnableLegacyStream: This will enable the search for all driver symbols + * that match the requested driver symbol name except the corresponding per-thread versions. + * - ::cudaEnablePerThreadDefaultStream: This will enable the search for all + * driver symbols that match the requested driver symbol name including the per-thread + * versions. If a per-thread version is not found, the API will return the legacy version + * of the driver function. + * + * \param symbol - The base name of the driver API function to look for. As an example, + * for the driver API ::cuMemAlloc_v2, \p symbol would be cuMemAlloc. + * Note that the API will use the CUDA runtime version to return the + * address to the most recent ABI compatible driver symbol, ::cuMemAlloc + * or ::cuMemAlloc_v2. + * \param funcPtr - Location to return the function pointer to the requested driver function + * \param flags - Flags to specify search options. + * \param driverStatus - Optional location to store the status of finding the symbol from + * the driver. See ::cudaDriverEntryPointQueryResult for + * possible values. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * \note_version_mixing + * \note_init_rt + * \note_callback + * + * \sa + * ::cuGetProcAddress + */ +#if defined(__cplusplus) +extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPoint(const char *symbol, void **funcPtr, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus = NULL); +#else +extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPoint(const char *symbol, void **funcPtr, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus); +#endif + +/** + * \brief Returns the requested driver API function pointer by CUDA version + * + * Returns in \p **funcPtr the address of the CUDA driver function for the requested flags and CUDA driver version. + * + * The CUDA version is specified as (1000 * major + 10 * minor), so CUDA 11.2 + * should be specified as 11020. For a requested driver symbol, if the specified + * CUDA version is greater than or equal to the CUDA version in which the driver symbol + * was introduced, this API will return the function pointer to the corresponding + * versioned function. + * + * The pointer returned by the API should be cast to a function pointer matching the + * requested driver function's definition in the API header file. The function pointer + * typedef can be picked up from the corresponding typedefs header file. For example, + * cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h. + * + * For the case where the CUDA version requested is greater than the CUDA Toolkit + * installed, there may not be an appropriate function pointer typedef in the + * corresponding header file and may need a custom typedef to match the driver + * function signature returned. This can be done by getting the typedefs from a later + * toolkit or creating appropriately matching custom function typedefs. + * + * The API will return ::cudaSuccess and set the returned \p funcPtr if the + * requested driver function is valid and supported on the platform. + * + * The API will return ::cudaSuccess and set the returned \p funcPtr to NULL if the + * requested driver function is not supported on the platform, no ABI + * compatible driver function exists for the requested version or if the + * driver symbol is invalid. + * + * It will also set the optional \p driverStatus to one of the values in + * ::cudaDriverEntryPointQueryResult with the following meanings: + * - ::cudaDriverEntryPointSuccess - The requested symbol was succesfully found based + * on input arguments and \p pfn is valid + * - ::cudaDriverEntryPointSymbolNotFound - The requested symbol was not found + * - ::cudaDriverEntryPointVersionNotSufficent - The requested symbol was found but is + * not supported by the specified version \p cudaVersion + * + * The requested flags can be: + * - ::cudaEnableDefault: This is the default mode. This is equivalent to + * ::cudaEnablePerThreadDefaultStream if the code is compiled with + * --default-stream per-thread compilation flag or the macro CUDA_API_PER_THREAD_DEFAULT_STREAM + * is defined; ::cudaEnableLegacyStream otherwise. + * - ::cudaEnableLegacyStream: This will enable the search for all driver symbols + * that match the requested driver symbol name except the corresponding per-thread versions. + * - ::cudaEnablePerThreadDefaultStream: This will enable the search for all + * driver symbols that match the requested driver symbol name including the per-thread + * versions. If a per-thread version is not found, the API will return the legacy version + * of the driver function. + * + * \param symbol - The base name of the driver API function to look for. As an example, + * for the driver API ::cuMemAlloc_v2, \p symbol would be cuMemAlloc. + * \param funcPtr - Location to return the function pointer to the requested driver function + * \param cudaVersion - The CUDA version to look for the requested driver symbol + * \param flags - Flags to specify search options. + * \param driverStatus - Optional location to store the status of finding the symbol from + * the driver. See ::cudaDriverEntryPointQueryResult for + * possible values. + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorNotSupported + * \note_version_mixing + * \note_init_rt + * \note_callback + * + * \sa + * ::cuGetProcAddress + */ +#if defined(__cplusplus) +extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPointByVersion(const char *symbol, void **funcPtr, unsigned int cudaVersion, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus = NULL); +#else +extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPointByVersion(const char *symbol, void **funcPtr, unsigned int cudaVersion, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus); +#endif + +/** @} */ /* END CUDART_DRIVER_ENTRY_POINT */ + +/** + * \defgroup CUDART_LIBRARY Library Management + * + * ___MANBRIEF___ library management functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the library management functions of the CUDA runtime + * application programming interface. + * + * @{ + */ + +/** + * \brief Load a library with specified code and options + * + * Takes a pointer \p code and loads the corresponding library \p library based on + * the application defined library loading mode: + * - If module loading is set to EAGER, via the environment variables described in "Module loading", + * \p library is loaded eagerly into all contexts at the time of the call and future contexts + * at the time of creation until the library is unloaded with ::cudaLibraryUnload(). + * - If the environment variables are set to LAZY, \p library + * is not immediately loaded onto all existent contexts and will only be + * loaded when a function is needed for that context, such as a kernel launch. + * + * These environment variables are described in the CUDA programming guide under the + * "CUDA environment variables" section. + * + * The \p code may be a \e cubin or \e fatbin as output by \b nvcc, + * or a NULL-terminated \e PTX, either as output by \b nvcc or hand-written. + * A fatbin should also contain relocatable code when doing separate compilation. + * Please also see the documentation for nvrtc (https://docs.nvidia.com/cuda/nvrtc/index.html), + * nvjitlink (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + * (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information on generating + * loadable code at runtime. + * + * Options are passed as an array via \p jitOptions and any corresponding parameters are passed in + * \p jitOptionsValues. The number of total JIT options is supplied via \p numJitOptions. + * Any outputs will be returned via \p jitOptionsValues. + * + * Library load options are passed as an array via \p libraryOptions and any corresponding parameters are passed in + * \p libraryOptionValues. The number of total library load options is supplied via \p numLibraryOptions. + * + * \param library - Returned library + * \param code - Code to load + * \param jitOptions - Options for JIT + * \param jitOptionsValues - Option values for JIT + * \param numJitOptions - Number of options + * \param libraryOptions - Options for loading + * \param libraryOptionValues - Option values for loading + * \param numLibraryOptions - Number of options for loading + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorInitializationError, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorSharedObjectSymbolNotFound, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorJitCompilerNotFound + * + * \sa ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cuLibraryLoadData + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryLoadData(cudaLibrary_t *library, const void *code, + enum cudaJitOption *jitOptions, void **jitOptionsValues, unsigned int numJitOptions, + enum cudaLibraryOption *libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions); + +/** + * \brief Load a library with specified file and options + * + * Takes a pointer \p code and loads the corresponding library \p library based on + * the application defined library loading mode: + * - If module loading is set to EAGER, via the environment variables described in "Module loading", + * \p library is loaded eagerly into all contexts at the time of the call and future contexts + * at the time of creation until the library is unloaded with ::cudaLibraryUnload(). + * - If the environment variables are set to LAZY, \p library + * is not immediately loaded onto all existent contexts and will only be + * loaded when a function is needed for that context, such as a kernel launch. + * + * These environment variables are described in the CUDA programming guide under the + * "CUDA environment variables" section. + * + * The file should be a \e cubin file as output by \b nvcc, or a \e PTX file either + * as output by \b nvcc or handwritten, or a \e fatbin file as output by \b nvcc. + * A fatbin should also contain relocatable code when doing separate compilation. + * Please also see the documentation for nvrtc (https://docs.nvidia.com/cuda/nvrtc/index.html), + * nvjitlink (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + * (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information on generating + * loadable code at runtime. + * + * Options are passed as an array via \p jitOptions and any corresponding parameters are + * passed in \p jitOptionsValues. The number of total options is supplied via \p numJitOptions. + * Any outputs will be returned via \p jitOptionsValues. + * + * Library load options are passed as an array via \p libraryOptions and any corresponding parameters are passed in + * \p libraryOptionValues. The number of total library load options is supplied via \p numLibraryOptions. + * + * \param library - Returned library + * \param fileName - File to load from + * \param jitOptions - Options for JIT + * \param jitOptionsValues - Option values for JIT + * \param numJitOptions - Number of options + * \param libraryOptions - Options for loading + * \param libraryOptionValues - Option values for loading + * \param numLibraryOptions - Number of options for loading + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidValue, + * ::cudaErrorMemoryAllocation, + * ::cudaErrorInitializationError, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInvalidPtx, + * ::cudaErrorUnsupportedPtxVersion, + * ::cudaErrorNoKernelImageForDevice, + * ::cudaErrorSharedObjectSymbolNotFound, + * ::cudaErrorSharedObjectInitFailed, + * ::cudaErrorJitCompilerNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryUnload, + * ::cuLibraryLoadFromFile + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryLoadFromFile(cudaLibrary_t *library, const char *fileName, + enum cudaJitOption *jitOptions, void **jitOptionsValues, unsigned int numJitOptions, + enum cudaLibraryOption *libraryOptions, void **libraryOptionValues, unsigned int numLibraryOptions); + +/** + * \brief Unloads a library + * + * Unloads the library specified with \p library + * + * \param library - Library to unload + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cuLibraryUnload + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryUnload(cudaLibrary_t library); + +/** + * \brief Returns a kernel handle + * + * Returns in \p pKernel the handle of the kernel with name \p name located in library \p library. + * If kernel handle is not found, the call returns ::cudaErrorSymbolNotFound. + * + * \param pKernel - Returned kernel handle + * \param library - Library to retrieve kernel from + * \param name - Name of kernel to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cuLibraryGetKernel + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryGetKernel(cudaKernel_t *pKernel, cudaLibrary_t library, const char *name); + +/** + * \brief Returns a global device pointer + * + * Returns in \p *dptr and \p *bytes the base pointer and size of the global with + * name \p name for the requested library \p library and the current device. + * If no global for the requested name \p name exists, the call returns ::cudaErrorSymbolNotFound. + * One of the parameters \p dptr or \p bytes (not both) can be NULL in which + * case it is ignored. The returned \p dptr cannot be passed to the Symbol APIs + * such as ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaGetSymbolAddress, or + * ::cudaGetSymbolSize. + * + * \param dptr - Returned global device pointer for the requested library + * \param bytes - Returned global size in bytes + * \param library - Library to retrieve global from + * \param name - Name of global to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * ::cudaErrorDeviceUninitialized, + * ::cudaErrorContextIsDestroyed + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cudaLibraryGetManaged, + * ::cuLibraryGetGlobal + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryGetGlobal(void **dptr, size_t *bytes, cudaLibrary_t library, const char *name); + +/** + * \brief Returns a pointer to managed memory + * + * Returns in \p *dptr and \p *bytes the base pointer and size of the managed memory with + * name \p name for the requested library \p library. If no managed memory with the + * requested name \p name exists, the call returns ::cudaErrorSymbolNotFound. One of the parameters + * \p dptr or \p bytes (not both) can be NULL in which case it is ignored. + * Note that managed memory for library \p library is shared across devices and is registered + * when the library is loaded. The returned \p dptr cannot be passed to the Symbol APIs + * such as ::cudaMemcpyToSymbol, ::cudaMemcpyFromSymbol, ::cudaGetSymbolAddress, or + * ::cudaGetSymbolSize. + * + * \param dptr - Returned pointer to the managed memory + * \param bytes - Returned memory size in bytes + * \param library - Library to retrieve managed memory from + * \param name - Name of managed memory to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cudaLibraryGetGlobal, + * ::cuLibraryGetManaged + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryGetManaged(void **dptr, size_t *bytes, cudaLibrary_t library, const char *name); + +/** + * \brief Returns a pointer to a unified function + * + * Returns in \p *fptr the function pointer to a unified function denoted by \p symbol. + * If no unified function with name \p symbol exists, the call returns ::cudaErrorSymbolNotFound. + * If there is no device with attribute ::cudaDeviceProp::unifiedFunctionPointers present in the system, + * the call may return ::cudaErrorSymbolNotFound. + * + * \param fptr - Returned pointer to a unified function + * \param library - Library to retrieve function pointer memory from + * \param symbol - Name of function pointer to retrieve + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle, + * ::cudaErrorSymbolNotFound + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cuLibraryGetUnifiedFunction + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryGetUnifiedFunction(void **fptr, cudaLibrary_t library, const char *symbol); + +/** + * \brief Returns the number of kernels within a library + * + * Returns in \p count the number of kernels in \p lib. + * + * \param count - Number of kernels found within the library + * \param lib - Library to query + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * + * \sa ::cudaLibraryEnumerateKernels, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryLoadData, + * ::cuLibraryGetKernelCount + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryGetKernelCount(unsigned int *count, cudaLibrary_t lib); + +/** + * \brief Retrieve the kernel handles within a library. + * + * Returns in \p kernels a maximum number of \p numKernels kernel handles within \p lib. + * The returned kernel handle becomes invalid when the library is unloaded. + * + * \param kernels - Buffer where the kernel handles are returned to + * \param numKernels - Maximum number of kernel handles may be returned to the buffer + * \param lib - Library to query from + * + * \return + * ::cudaSuccess, + * ::cudaErrorCudartUnloading, + * ::cudaErrorInitializationError, + * ::cudaErrorInvalidValue, + * ::cudaErrorInvalidResourceHandle + * + * \sa ::cudaLibraryGetKernelCount, + * ::cuLibraryEnumerateKernels + */ +extern __host__ cudaError_t CUDARTAPI cudaLibraryEnumerateKernels(cudaKernel_t *kernels, unsigned int numKernels, cudaLibrary_t lib); + +/** + * \brief Sets information about a kernel + * + * This call sets the value of a specified attribute \p attr on the kernel \p kernel + * for the requested device \p device to an integer value specified by \p value. + * This function returns ::cudaSuccess if the new value of the attribute could be + * successfully set. If the set fails, this call will return an error. + * Not all attributes can have values set. Attempting to set a value on a read-only + * attribute will result in an error (::cudaErrorInvalidValue) + * + * Note that attributes set using ::cudaFuncSetAttribute() will override the attribute + * set by this API irrespective of whether the call to ::cudaFuncSetAttribute() is made + * before or after this API call. Because of this and the stricter locking requirements + * mentioned below it is suggested that this call be used during the initialization path + * and not on each thread accessing \p kernel such as on kernel launches or on the + * critical path. + * + * Valid values for \p attr are: + * - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes + * cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture. + * - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources, + * this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor. + * This is only a hint, and the driver can choose a different ratio if required to execute the function. + * - ::cudaFuncAttributeRequiredClusterWidth: The required cluster width in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterHeight: The required cluster height in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeRequiredClusterDepth: The required cluster depth in + * blocks. The width, height, and depth values must either all be 0 or all be + * positive. The validity of the cluster dimensions is checked at launch time. + * If the value is set during compile time, it cannot be set at runtime. + * Setting it at runtime will return cudaErrorNotPermitted. + * - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the + * function can be launched with non-portable cluster size. 1 is allowed, 0 is + * disallowed. + * - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block + * scheduling policy of a function. The value type is cudaClusterSchedulingPolicy. + * + * \note The API has stricter locking requirements in comparison to its legacy counterpart + * ::cudaFuncSetAttribute() due to device-wide semantics. If multiple threads are trying to + * set the same attribute on the same device simultaneously, the attribute setting will depend + * on the interleavings chosen by the OS scheduler and memory consistency. + * + * \param kernel - Kernel to set attribute of + * \param attr - Attribute requested + * \param value - Value to set + * \param device - Device to set attribute of + * + * \return + * ::cudaSuccess, + * ::cudaErrorInvalidDeviceFunction, + * ::cudaErrorInvalidValue + * + * \sa ::cudaLibraryLoadData, + * ::cudaLibraryLoadFromFile, + * ::cudaLibraryUnload, + * ::cudaLibraryGetKernel, + * ::cudaLaunchKernel, + * ::cudaFuncSetAttribute, + * ::cuKernelSetAttribute + */ +extern __host__ cudaError_t CUDARTAPI cudaKernelSetAttributeForDevice(cudaKernel_t kernel, enum cudaFuncAttribute attr, int value, int device); + +/** @} */ /* END CUDART_LIBRARY */ + +/** \cond impl_private */ +extern __host__ cudaError_t CUDARTAPI cudaGetExportTable(const void **ppExportTable, const cudaUUID_t *pExportTableId); +/** \endcond impl_private */ + +/** + * \defgroup CUDART_HIGHLEVEL C++ API Routines + * + * ___MANBRIEF___ C++ high level API functions of the CUDA runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the C++ high level API functions of the CUDA runtime + * application programming interface. To use these functions, your + * application needs to be compiled with the \p nvcc compiler. + * + * \brief C++-style interface built on top of CUDA runtime API + */ + +/** + * \defgroup CUDART_DRIVER Interactions with the CUDA Driver API + * + * ___MANBRIEF___ interactions between CUDA Driver API and CUDA Runtime API + * (___CURRENT_FILE___) ___ENDMANBRIEF___ + * + * This section describes the interactions between the CUDA Driver API and the CUDA Runtime API + * + * @{ + * + * \section CUDART_CUDA_primary Primary Contexts + * + * There exists a one to one relationship between CUDA devices in the CUDA Runtime + * API and ::CUcontext s in the CUDA Driver API within a process. The specific + * context which the CUDA Runtime API uses for a device is called the device's + * primary context. From the perspective of the CUDA Runtime API, a device and + * its primary context are synonymous. + * + * \section CUDART_CUDA_init Initialization and Tear-Down + * + * CUDA Runtime API calls operate on the CUDA Driver API ::CUcontext which is current to + * to the calling host thread. + * + * The function ::cudaInitDevice() ensures that the primary context is initialized + * for the requested device but does not make it current to the calling thread. + * + * The function ::cudaSetDevice() initializes the primary context for the + * specified device and makes it current to the calling thread by calling ::cuCtxSetCurrent(). + * + * The CUDA Runtime API will automatically initialize the primary context for + * a device at the first CUDA Runtime API call which requires an active context. + * If no ::CUcontext is current to the calling thread when a CUDA Runtime API call + * which requires an active context is made, then the primary context for a device + * will be selected, made current to the calling thread, and initialized. + * + * The context which the CUDA Runtime API initializes will be initialized using + * the parameters specified by the CUDA Runtime API functions + * ::cudaSetDeviceFlags(), + * ::cudaD3D9SetDirect3DDevice(), + * ::cudaD3D10SetDirect3DDevice(), + * ::cudaD3D11SetDirect3DDevice(), + * ::cudaGLSetGLDevice(), and + * ::cudaVDPAUSetVDPAUDevice(). + * Note that these functions will fail with ::cudaErrorSetOnActiveProcess if they are + * called when the primary context for the specified device has already been initialized, + * except for ::cudaSetDeviceFlags() which will simply overwrite the previous settings. + * + * Primary contexts will remain active until they are explicitly deinitialized + * using ::cudaDeviceReset(). The function ::cudaDeviceReset() will deinitialize the + * primary context for the calling thread's current device immediately. The context + * will remain current to all of the threads that it was current to. The next CUDA + * Runtime API call on any thread which requires an active context will trigger the + * reinitialization of that device's primary context. + * + * Note that primary contexts are shared resources. It is recommended that + * the primary context not be reset except just before exit or to recover from an + * unspecified launch failure. + * + * \section CUDART_CUDA_context Context Interoperability + * + * Note that the use of multiple ::CUcontext s per device within a single process + * will substantially degrade performance and is strongly discouraged. Instead, + * it is highly recommended that the implicit one-to-one device-to-context mapping + * for the process provided by the CUDA Runtime API be used. + * + * If a non-primary ::CUcontext created by the CUDA Driver API is current to a + * thread then the CUDA Runtime API calls to that thread will operate on that + * ::CUcontext, with some exceptions listed below. Interoperability between data + * types is discussed in the following sections. + * + * The function ::cudaPointerGetAttributes() will return the error + * ::cudaErrorIncompatibleDriverContext if the pointer being queried was allocated by a + * non-primary context. The function ::cudaDeviceEnablePeerAccess() and the rest of + * the peer access API may not be called when a non-primary ::CUcontext is current. + * To use the pointer query and peer access APIs with a context created using the + * CUDA Driver API, it is necessary that the CUDA Driver API be used to access + * these features. + * + * All CUDA Runtime API state (e.g, global variables' addresses and values) travels + * with its underlying ::CUcontext. In particular, if a ::CUcontext is moved from one + * thread to another then all CUDA Runtime API state will move to that thread as well. + * + * Please note that attaching to legacy contexts (those with a version of 3010 as returned + * by ::cuCtxGetApiVersion()) is not possible. The CUDA Runtime will return + * ::cudaErrorIncompatibleDriverContext in such cases. + * + * \section CUDART_CUDA_stream Interactions between CUstream and cudaStream_t + * + * The types ::CUstream and ::cudaStream_t are identical and may be used interchangeably. + * + * \section CUDART_CUDA_event Interactions between CUevent and cudaEvent_t + * + * The types ::CUevent and ::cudaEvent_t are identical and may be used interchangeably. + * + * \section CUDART_CUDA_array Interactions between CUarray and cudaArray_t + * + * The types ::CUarray and struct ::cudaArray * represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::CUarray in a CUDA Runtime API function which takes a struct ::cudaArray *, + * it is necessary to explicitly cast the ::CUarray to a struct ::cudaArray *. + * + * In order to use a struct ::cudaArray * in a CUDA Driver API function which takes a ::CUarray, + * it is necessary to explicitly cast the struct ::cudaArray * to a ::CUarray . + * + * \section CUDART_CUDA_graphicsResource Interactions between CUgraphicsResource and cudaGraphicsResource_t + * + * The types ::CUgraphicsResource and ::cudaGraphicsResource_t represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::CUgraphicsResource in a CUDA Runtime API function which takes a + * ::cudaGraphicsResource_t, it is necessary to explicitly cast the ::CUgraphicsResource + * to a ::cudaGraphicsResource_t. + * + * In order to use a ::cudaGraphicsResource_t in a CUDA Driver API function which takes a + * ::CUgraphicsResource, it is necessary to explicitly cast the ::cudaGraphicsResource_t + * to a ::CUgraphicsResource. + * + * \section CUDART_CUDA_texture_objects Interactions between CUtexObject and cudaTextureObject_t + * + * The types ::CUtexObject and ::cudaTextureObject_t represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::CUtexObject in a CUDA Runtime API function which takes a ::cudaTextureObject_t, + * it is necessary to explicitly cast the ::CUtexObject to a ::cudaTextureObject_t. + * + * In order to use a ::cudaTextureObject_t in a CUDA Driver API function which takes a ::CUtexObject, + * it is necessary to explicitly cast the ::cudaTextureObject_t to a ::CUtexObject. + * + * \section CUDART_CUDA_surface_objects Interactions between CUsurfObject and cudaSurfaceObject_t + * + * The types ::CUsurfObject and ::cudaSurfaceObject_t represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::CUsurfObject in a CUDA Runtime API function which takes a ::cudaSurfaceObject_t, + * it is necessary to explicitly cast the ::CUsurfObject to a ::cudaSurfaceObject_t. + * + * In order to use a ::cudaSurfaceObject_t in a CUDA Driver API function which takes a ::CUsurfObject, + * it is necessary to explicitly cast the ::cudaSurfaceObject_t to a ::CUsurfObject. + * + * \section CUDART_CUDA_module Interactions between CUfunction and cudaFunction_t + * + * The types ::CUfunction and ::cudaFunction_t represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::cudaFunction_t in a CUDA Driver API function which takes a ::CUfunction, + * it is necessary to explicitly cast the ::cudaFunction_t to a ::CUfunction. + * + * \section CUDART_CUDA_library Interactions between CUkernel and cudaKernel_t + * + * The types ::CUkernel and ::cudaKernel_t represent the same data type and may be used + * interchangeably by casting the two types between each other. + * + * In order to use a ::cudaKernel_t in a CUDA Driver API function which takes a ::CUkernel, + * it is necessary to explicitly cast the ::cudaKernel_t to a ::CUkernel. + * + */ + + /** + * \brief Get pointer to device entry function that matches entry function \p symbolPtr + * + * Returns in \p functionPtr the device entry function corresponding to the symbol \p symbolPtr. + * + * \param functionPtr - Returns the device entry function + * \param symbolPtr - Pointer to device entry function to search for + * + * \return + * ::cudaSuccess + * + */ +extern __host__ cudaError_t cudaGetFuncBySymbol(cudaFunction_t* functionPtr, const void* symbolPtr); + +/** + * \brief Get pointer to device kernel that matches entry function \p entryFuncAddr + * + * Returns in \p kernelPtr the device kernel corresponding to the entry function \p entryFuncAddr. + * + * Note that it is possible that there are multiple symbols belonging to different + * translation units with the same \p entryFuncAddr registered with this CUDA Runtime + * and so the order which the translation units are loaded and registered with the + * CUDA Runtime can lead to differing return pointers in \p kernelPtr . + * Suggested methods of ensuring uniqueness are to limit visibility of __global__ + * device functions by using static or hidden visibility attribute in the + * respective translation units. + * + * \param kernelPtr - Returns the device kernel + * \param entryFuncAddr - Address of device entry function to search kernel for + * + * \return + * ::cudaSuccess + * + * \sa + * \ref ::cudaGetKernel(cudaKernel_t *kernelPtr, const T *entryFuncAddr) "cudaGetKernel (C++ API)" + */ +extern __host__ cudaError_t CUDARTAPI cudaGetKernel(cudaKernel_t *kernelPtr, const void *entryFuncAddr); + +/** @} */ /* END CUDART_DRIVER */ + +#if defined(__CUDA_API_VERSION_INTERNAL) + #undef cudaMemcpy + #undef cudaMemcpyToSymbol + #undef cudaMemcpyFromSymbol + #undef cudaMemcpy2D + #undef cudaMemcpyToArray + #undef cudaMemcpy2DToArray + #undef cudaMemcpyFromArray + #undef cudaMemcpy2DFromArray + #undef cudaMemcpyArrayToArray + #undef cudaMemcpy2DArrayToArray + #undef cudaMemcpy3D + #undef cudaMemcpy3DPeer + #undef cudaMemset + #undef cudaMemset2D + #undef cudaMemset3D + #undef cudaMemcpyAsync + #undef cudaMemcpyToSymbolAsync + #undef cudaMemcpyFromSymbolAsync + #undef cudaMemcpy2DAsync + #undef cudaMemcpyToArrayAsync + #undef cudaMemcpy2DToArrayAsync + #undef cudaMemcpyFromArrayAsync + #undef cudaMemcpy2DFromArrayAsync + #undef cudaMemcpy3DAsync + #undef cudaMemcpy3DPeerAsync + #undef cudaMemcpyBatchAsync + #undef cudaMemcpy3DBatchAsync + #undef cudaMemsetAsync + #undef cudaMemset2DAsync + #undef cudaMemset3DAsync + #undef cudaStreamQuery + #undef cudaStreamGetDevice + #undef cudaStreamGetFlags + #undef cudaStreamGetId + #undef cudaStreamGetPriority + #undef cudaEventRecord + #undef cudaEventRecordWithFlags + #undef cudaStreamWaitEvent + #undef cudaStreamAddCallback + #undef cudaStreamAttachMemAsync + #undef cudaStreamSynchronize + #undef cudaLaunchKernel + #undef cudaLaunchKernelExC + #undef cudaLaunchHostFunc + #undef cudaMemPrefetchAsync + #undef cudaMemPrefetchAsync_v2 + #undef cudaLaunchCooperativeKernel + #undef cudaSignalExternalSemaphoresAsync + #undef cudaWaitExternalSemaphoresAsync + #undef cudaGraphInstantiateWithParams + #undef cudaGraphUpload + #undef cudaGraphLaunch + #undef cudaStreamBeginCapture + #undef cudaStreamBeginCaptureToGraph + #undef cudaStreamEndCapture + #undef cudaStreamIsCapturing + #undef cudaStreamGetCaptureInfo + #undef cudaStreamGetCaptureInfo_v2 + #undef cudaStreamGetCaptureInfo_v3 + #undef cudaStreamUpdateCaptureDependencies + #undef cudaStreamUpdateCaptureDependencies_v2 + #undef cudaStreamCopyAttributes + #undef cudaStreamGetAttribute + #undef cudaStreamSetAttribute + #undef cudaMallocAsync + #undef cudaFreeAsync + #undef cudaMallocFromPoolAsync + #undef cudaGetDriverEntryPoint + #undef cudaGetDriverEntryPointByVersion + + #undef cudaGetDeviceProperties + + extern __host__ cudaError_t CUDARTAPI cudaMemcpy(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyToSymbol(const void *symbol, const void *src, size_t count, size_t offset __dv(0), enum cudaMemcpyKind kind __dv(cudaMemcpyHostToDevice)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t offset __dv(0), enum cudaMemcpyKind kind __dv(cudaMemcpyDeviceToHost)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2D(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromArray(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DFromArray(void *dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, enum cudaMemcpyKind kind); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyArrayToArray(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 __dv(cudaMemcpyDeviceToDevice)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DArrayToArray(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 __dv(cudaMemcpyDeviceToDevice)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy3D(const struct cudaMemcpy3DParms *p); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DPeer(const struct cudaMemcpy3DPeerParms *p); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyBatchAsync(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); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DBatchAsync(size_t numOps, struct cudaMemcpy3DBatchOp *opList, size_t *failIdx, unsigned long long flags, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaMemset(void *devPtr, int value, size_t count); + extern __host__ cudaError_t CUDARTAPI cudaMemset2D(void *devPtr, size_t pitch, int value, size_t width, size_t height); + extern __host__ cudaError_t CUDARTAPI cudaMemset3D(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpyAsync(void *dst, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyToSymbolAsync(const void *symbol, const void *src, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromSymbolAsync(void *dst, const void *symbol, size_t count, size_t offset, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy2DAsync(void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t height, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DToArrayAsync(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 __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpyFromArrayAsync(void *dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, enum cudaMemcpyKind kind, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy2DFromArrayAsync(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 __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemcpy3DAsync(const struct cudaMemcpy3DParms *p, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaMemcpy3DPeerAsync(const struct cudaMemcpy3DPeerParms *p, cudaStream_t stream __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemsetAsync(void *devPtr, int value, size_t count, cudaStream_t stream __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset2DAsync(void *devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMemset3DAsync(struct cudaPitchedPtr pitchedDevPtr, int value, struct cudaExtent extent, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaStreamQuery(cudaStream_t stream); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetDevice(cudaStream_t hStream, int *device); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetFlags(cudaStream_t hStream, unsigned int *flags); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetId(cudaStream_t hStream, unsigned long long *streamId); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamGetPriority(cudaStream_t hStream, int *priority); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecord(cudaEvent_t event, cudaStream_t stream __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream __dv(0), unsigned int flags __dv(0)); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags); + extern __host__ cudaError_t CUDARTAPI cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void *userData, unsigned int flags); + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaStreamAttachMemAsync(cudaStream_t stream, void *devPtr, size_t length, unsigned int flags); + extern __host__ cudaError_t CUDARTAPI cudaStreamSynchronize(cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaLaunchKernelExC(const cudaLaunchConfig_t *config, const void *func, void **args); + extern __host__ cudaError_t CUDARTAPI cudaLaunchCooperativeKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void *userData); + extern __host__ cudaError_t CUDARTAPI cudaMemPrefetchAsync(const void *devPtr, size_t count, int dstDevice, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaMemPrefetchAsync_v2(const void *devPtr, size_t count, struct cudaMemLocation location, unsigned int flags, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreSignalParams_v1 *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaSignalExternalSemaphoresAsync_ptsz(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreSignalParams_v1 *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreSignalParams *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreWaitParams_v1 *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaWaitExternalSemaphoresAsync_ptsz(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreWaitParams_v1 *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t *extSemArray, const struct cudaExternalSemaphoreWaitParams *paramsArray, unsigned int numExtSems, cudaStream_t stream __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaGraphInstantiateWithParams(cudaGraphExec_t *pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams *instantiateParams); + extern __host__ cudaError_t CUDARTAPI cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCapture(cudaStream_t stream, enum cudaStreamCaptureMode mode); + extern __host__ cudaError_t CUDARTAPI cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t *dependencies, const cudaGraphEdgeData *dependencyData, size_t numDependencies, enum cudaStreamCaptureMode mode); + extern __host__ cudaError_t CUDARTAPI cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t *pGraph); + extern __host__ cudaError_t CUDARTAPI cudaStreamIsCapturing(cudaStream_t stream, enum cudaStreamCaptureStatus *pCaptureStatus); + extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo(cudaStream_t stream, enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out); + extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo_ptsz(cudaStream_t stream, enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out); + extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo_v2(cudaStream_t stream, enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out __dv(0), cudaGraph_t *graph_out __dv(0), const cudaGraphNode_t **dependencies_out __dv(0), size_t *numDependencies_out __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaStreamGetCaptureInfo_v3(cudaStream_t stream, enum cudaStreamCaptureStatus *captureStatus_out, unsigned long long *id_out __dv(0), cudaGraph_t *graph_out __dv(0), const cudaGraphNode_t **dependencies_out __dv(0), const cudaGraphEdgeData **edgeData_out __dv(0), size_t *numDependencies_out __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t *dependencies, size_t numDependencies, unsigned int flags __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t *dependencies, const cudaGraphEdgeData *dependencyData, size_t numDependencies, unsigned int flags __dv(0)); + extern __host__ cudaError_t CUDARTAPI cudaStreamCopyAttributes(cudaStream_t dstStream, cudaStream_t srcStream); + extern __host__ cudaError_t CUDARTAPI cudaStreamGetAttribute(cudaStream_t stream, cudaStreamAttrID attr, cudaStreamAttrValue *value); + extern __host__ cudaError_t CUDARTAPI cudaStreamSetAttribute(cudaStream_t stream, cudaStreamAttrID attr, const cudaStreamAttrValue *param); + + extern __host__ cudaError_t CUDARTAPI cudaMallocAsync(void **devPtr, size_t size, cudaStream_t hStream); + extern __host__ cudaError_t CUDARTAPI cudaFreeAsync(void *devPtr, cudaStream_t hStream); + extern __host__ cudaError_t CUDARTAPI cudaMallocFromPoolAsync(void **ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream); + extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPoint(const char *symbol, void **funcPtr, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus); + extern __host__ cudaError_t CUDARTAPI cudaGetDriverEntryPointByVersion(const char *symbol, void **funcPtr, unsigned int cudaVersion, unsigned long long flags, enum cudaDriverEntryPointQueryResult *driverStatus); + + extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaGetDeviceProperties(struct cudaDeviceProp *prop, int device); + +#elif defined(__CUDART_API_PER_THREAD_DEFAULT_STREAM) + // nvcc stubs reference the 'cudaLaunch'/'cudaLaunchKernel' identifier even if it was defined + // to 'cudaLaunch_ptsz'/'cudaLaunchKernel_ptsz'. Redirect through a static inline function. + #undef cudaLaunchKernel + static __inline__ __host__ cudaError_t cudaLaunchKernel(const void *func, + dim3 gridDim, dim3 blockDim, + void **args, size_t sharedMem, + cudaStream_t stream) + { + return cudaLaunchKernel_ptsz(func, gridDim, blockDim, args, sharedMem, stream); + } + #define cudaLaunchKernel __CUDART_API_PTSZ(cudaLaunchKernel) + #undef cudaLaunchKernelExC + static __inline__ __host__ cudaError_t cudaLaunchKernelExC(const cudaLaunchConfig_t *config, + const void *func, + void **args) + { + return cudaLaunchKernelExC_ptsz(config, func, args); + } + #define cudaLaunchKernelExC __CUDART_API_PTSZ(cudaLaunchKernelExC) +#endif + +#if defined(__cplusplus) +} + +#endif /* __cplusplus */ + +#undef EXCLUDE_FROM_RTC +#endif /* !__CUDACC_RTC__ */ + +#undef __dv +#undef __CUDA_DEPRECATED + +#if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_API_H__) +#undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_CUDA_RUNTIME_API_H__ +#endif + +#endif /* !__CUDA_RUNTIME_API_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_callbacks.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_callbacks.h new file mode 100644 index 0000000000000000000000000000000000000000..7dc1c94b2a6dc2cbab63af058ccec71f822cf63b --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/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/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_checkpoint.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_checkpoint.h new file mode 100644 index 0000000000000000000000000000000000000000..36eeddc4e2b7bfd1902ce313d71f173db70beaef --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/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/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_driver_cbid.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/cupti_driver_cbid.h new file mode 100644 index 0000000000000000000000000000000000000000..4b23832372a3a69c7bfbf0aa188b0417d9270be6 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/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/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/generated_cuda_gl_interop_meta.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/generated_cuda_gl_interop_meta.h new file mode 100644 index 0000000000000000000000000000000000000000..eaba3ac5a760e338f1edc191609f6fa2a32adee7 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/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/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/nvfunctional b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/nvfunctional new file mode 100644 index 0000000000000000000000000000000000000000..4fdeeecf6b63f92c5d684a03bb461cd935c0fd35 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/nvfunctional @@ -0,0 +1,60 @@ +/* + * Copyright 2014-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(__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__) +#define __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#define __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_NV_LIBCXX_FUNCTIONAL_H_WRAPPER__ +#endif + +#include "crt/nvfunctional" + +#if defined(__UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_NV_LIBCXX_FUNCTIONAL_H_WRAPPER__) +#undef __CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ +#undef __UNDEF_CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS_NV_LIBCXX_FUNCTIONAL_H_WRAPPER__ +#endif diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/sm_20_intrinsics.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/sm_20_intrinsics.h new file mode 100644 index 0000000000000000000000000000000000000000..f0405fd837a83ad6b5a65ddcba6d5be707fa5a3d --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/sm_20_intrinsics.h @@ -0,0 +1,1156 @@ +/* + * Copyright 1993-2021 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. + */ + +//NOTE: For NVRTC, these declarations have been moved into the compiler (to reduce compile time) +#define EXCLUDE_FROM_RTC + +#if !defined(__SM_20_INTRINSICS_H__) +#define __SM_20_INTRINSICS_H__ + +#if defined(__CUDACC_RTC__) +#define __SM_20_INTRINSICS_DECL__ __device__ +#define __COMMON_INTRINSICS_DECL__ __device__ +#else /* __CUDACC_RTC__ */ +#define __SM_20_INTRINSICS_DECL__ static __inline__ __device__ +#define __COMMON_INTRINSICS_DECL__ static __inline__ __host__ __device__ +#endif /* __CUDACC_RTC__ */ + +#if defined(__cplusplus) && defined(__CUDACC__) + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "cuda_runtime_api.h" + +#if !defined(__CUDA_ARCH__) && !defined(_NVHPC_CUDA) +#define __DEF_IF_HOST { } +#else /* !__CUDA_ARCH__ && !_NVHPC_CUDA */ +#define __DEF_IF_HOST ; +#endif /* __CUDA_ARCH__ || _NVHPC_CUDA */ + +#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)) +#else +# define __DEPRECATED__(msg) __attribute__((deprecated(msg))) +#endif + +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 700 +#define __WSB_DEPRECATION_MESSAGE(x) #x"() is not valid on compute_70 and above, and should be replaced with "#x"_sync()."\ + "To continue using "#x"(), specify virtual architecture compute_60 when targeting sm_70 and above, for example, using the pair of compiler options: -arch=compute_60 -code=sm_70." +#elif defined(_NVHPC_CUDA) +#define __WSB_DEPRECATION_MESSAGE(x) #x"() is not valid on cc70 and above, and should be replaced with "#x"_sync()." +#else +#define __WSB_DEPRECATION_MESSAGE(x) #x"() is deprecated in favor of "#x"_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning)." +#endif + +extern "C" +{ +extern __device__ __device_builtin__ void __threadfence_system(void); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Divide two floating-point values in round-to-nearest-even mode. + * + * Divides two floating-point values \p x by \p y in round-to-nearest-even mode. + * + * \return Returns \p x / \p y. + * - sign of the quotient \p x / \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __ddiv_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns NaN. + * - __ddiv_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __ddiv_rn(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p x. + * - __ddiv_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for finite \p y. + * - __ddiv_rn(\p x, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __ddiv_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for \p y \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __ddiv_rn(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Divide two floating-point values in round-towards-zero mode. + * + * Divides two floating-point values \p x by \p y in round-towards-zero mode. + * + * \return Returns \p x / \p y. + * - sign of the quotient \p x / \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __ddiv_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns NaN. + * - __ddiv_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __ddiv_rz(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p x. + * - __ddiv_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for finite \p y. + * - __ddiv_rz(\p x, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __ddiv_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for \p y \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __ddiv_rz(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Divide two floating-point values in round-up mode. + * + * Divides two floating-point values \p x by \p y in round-up (to positive infinity) mode. + * + * \return Returns \p x / \p y. + * - sign of the quotient \p x / \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __ddiv_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns NaN. + * - __ddiv_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __ddiv_ru(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p x. + * - __ddiv_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for finite \p y. + * - __ddiv_ru(\p x, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __ddiv_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for \p y \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __ddiv_ru(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Divide two floating-point values in round-down mode. + * + * Divides two floating-point values \p x by \p y in round-down (to negative infinity) mode. + * + * \return Returns \p x / \p y. + * - sign of the quotient \p x / \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __ddiv_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns NaN. + * - __ddiv_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __ddiv_rd(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p x. + * - __ddiv_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for finite \p y. + * - __ddiv_rd(\p x, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __ddiv_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for \p y \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __ddiv_rd(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula + * in round-to-nearest-even mode. + * + * Compute the reciprocal of \p x in round-to-nearest-even mode. + * + * \return Returns + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __drcp_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula + * in round-towards-zero mode. + * + * Compute the reciprocal of \p x in round-towards-zero mode. + * + * \return Returns + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __drcp_rz(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula + * in round-up mode. + * + * Compute the reciprocal of \p x in round-up (to positive infinity) mode. + * + * \return Returns + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __drcp_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula + * in round-down mode. + * + * Compute the reciprocal of \p x in round-down (to negative infinity) mode. + * + * \return Returns + * \cuda_math_formula \frac{1}{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __drcp_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula + * in round-to-nearest-even mode. + * + * Compute the square root of \p x in round-to-nearest-even mode. + * + * \return Returns + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __dsqrt_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula + * in round-towards-zero mode. + * + * Compute the square root of \p x in round-towards-zero mode. + * + * \return Returns + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __dsqrt_rz(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula + * in round-up mode. + * + * Compute the square root of \p x in round-up (to positive infinity) mode. + * + * \return Returns + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __dsqrt_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula + * in round-down mode. + * + * Compute the square root of \p x in round-down (to negative infinity) mode. + * + * \return Returns + * \cuda_math_formula \sqrt{x} \end_cuda_math_formula. + * + * \note_accuracy_double_intrinsic + * \note_requires_fermi + */ +extern __device__ __device_builtin__ double __dsqrt_rd(double x); +extern __device__ __device_builtin__ __DEPRECATED__(__WSB_DEPRECATION_MESSAGE(__ballot)) unsigned int __ballot(int); +extern __device__ __device_builtin__ int __syncthreads_count(int); +extern __device__ __device_builtin__ int __syncthreads_and(int); +extern __device__ __device_builtin__ int __syncthreads_or(int); +extern __device__ __device_builtin__ long long int clock64(void); + + +/** + * \ingroup CUDA_MATH_INTRINSIC_SINGLE + * \brief Compute fused multiply-add operation in round-to-nearest-even mode, ignore \p -ftz=true compiler flag + * + * Behavior is the same as ::__fmaf_rn(\p x, \p y, \p z), the difference is in + * handling denormalized inputs and outputs: \p -ftz compiler flag has no effect. + */ +extern __device__ __device_builtin__ float __fmaf_ieee_rn(float x, float y, float z); + +/** + * \ingroup CUDA_MATH_INTRINSIC_SINGLE + * \brief Compute fused multiply-add operation in round-down mode, ignore \p -ftz=true compiler flag + * + * Behavior is the same as ::__fmaf_rd(\p x, \p y, \p z), the difference is in + * handling denormalized inputs and outputs: \p -ftz compiler flag has no effect. + */ +extern __device__ __device_builtin__ float __fmaf_ieee_rd(float x, float y, float z); + +/** + * \ingroup CUDA_MATH_INTRINSIC_SINGLE + * \brief Compute fused multiply-add operation in round-up mode, ignore \p -ftz=true compiler flag + * + * Behavior is the same as ::__fmaf_ru(\p x, \p y, \p z), the difference is in + * handling denormalized inputs and outputs: \p -ftz compiler flag has no effect. + */ +extern __device__ __device_builtin__ float __fmaf_ieee_ru(float x, float y, float z); + +/** + * \ingroup CUDA_MATH_INTRINSIC_SINGLE + * \brief Compute fused multiply-add operation in round-towards-zero mode, ignore \p -ftz=true compiler flag + * + * Behavior is the same as ::__fmaf_rz(\p x, \p y, \p z), the difference is in + * handling denormalized inputs and outputs: \p -ftz compiler flag has no effect. + */ +extern __device__ __device_builtin__ float __fmaf_ieee_rz(float x, float y, float z); + + +// SM_13 intrinsics + +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Reinterpret bits in a double as a 64-bit signed integer. + * + * Reinterpret the bits in the double-precision floating-point value \p x + * as a signed 64-bit integer. + * \return Returns reinterpreted value. + */ +extern __device__ __device_builtin__ long long int __double_as_longlong(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Reinterpret bits in a 64-bit signed integer as a double. + * + * Reinterpret the bits in the 64-bit signed integer value \p x as + * a double-precision floating-point value. + * \return Returns reinterpreted value. + */ +extern __device__ __device_builtin__ double __longlong_as_double(long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation in round-to-nearest-even mode. + * + * Computes the value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single ternary operation, rounding the + * result once in round-to-nearest-even mode. + * + * \return Returns the rounded value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation. + * - __fma_rn( + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rn( + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rn(\p x, \p y, + * \cuda_math_formula -\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula +\infty \end_cuda_math_formula. + * - __fma_rn(\p x, \p y, + * \cuda_math_formula +\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula -\infty \end_cuda_math_formula. + * - __fma_rn(\p x, \p y, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rn(\p x, \p y, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rn(\p x, \p y, \p z) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y + z \end_cuda_math_formula is exactly zero and \cuda_math_formula z \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + */ +extern __device__ __device_builtin__ double __fma_rn(double x, double y, double z); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation in round-towards-zero mode. + * + * Computes the value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single ternary operation, rounding the + * result once in round-towards-zero mode. + * + * \return Returns the rounded value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation. + * - __fma_rz( + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rz( + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rz(\p x, \p y, + * \cuda_math_formula -\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula +\infty \end_cuda_math_formula. + * - __fma_rz(\p x, \p y, + * \cuda_math_formula +\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula -\infty \end_cuda_math_formula. + * - __fma_rz(\p x, \p y, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rz(\p x, \p y, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rz(\p x, \p y, \p z) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y + z \end_cuda_math_formula is exactly zero and \cuda_math_formula z \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + */ +extern __device__ __device_builtin__ double __fma_rz(double x, double y, double z); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation in round-up mode. + * + * Computes the value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single ternary operation, rounding the + * result once in round-up (to positive infinity) mode. + * + * \return Returns the rounded value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation. + * - __fma_ru( + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_ru( + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_ru(\p x, \p y, + * \cuda_math_formula -\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula +\infty \end_cuda_math_formula. + * - __fma_ru(\p x, \p y, + * \cuda_math_formula +\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula -\infty \end_cuda_math_formula. + * - __fma_ru(\p x, \p y, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_ru(\p x, \p y, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_ru(\p x, \p y, \p z) returns \cuda_math_formula +0 \end_cuda_math_formula if \cuda_math_formula x \times y + z \end_cuda_math_formula is exactly zero and \cuda_math_formula z \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + */ +extern __device__ __device_builtin__ double __fma_ru(double x, double y, double z); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Compute + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation in round-down mode. + * + * Computes the value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single ternary operation, rounding the + * result once in round-down (to negative infinity) mode. + * + * \return Returns the rounded value of + * \cuda_math_formula x \times y + z \end_cuda_math_formula + * as a single operation. + * - __fma_rd( + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rd( + * \cuda_math_formula \pm 0 \end_cuda_math_formula + * , + * \cuda_math_formula \pm \infty \end_cuda_math_formula + * , \p z) returns NaN. + * - __fma_rd(\p x, \p y, + * \cuda_math_formula -\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula +\infty \end_cuda_math_formula. + * - __fma_rd(\p x, \p y, + * \cuda_math_formula +\infty \end_cuda_math_formula + * ) returns NaN if + * \cuda_math_formula x \times y \end_cuda_math_formula + * is an exact + * \cuda_math_formula -\infty \end_cuda_math_formula. + * - __fma_rd(\p x, \p y, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rd(\p x, \p y, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula -0 \end_cuda_math_formula if \cuda_math_formula x \times y \end_cuda_math_formula is exact \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __fma_rd(\p x, \p y, \p z) returns \cuda_math_formula -0 \end_cuda_math_formula if \cuda_math_formula x \times y + z \end_cuda_math_formula is exactly zero and \cuda_math_formula z \neq 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + */ +extern __device__ __device_builtin__ double __fma_rd(double x, double y, double z); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Add two floating-point values in round-to-nearest-even mode. + * + * Adds two floating-point values \p x and \p y in round-to-nearest-even mode. + * + * \return Returns \p x + \p y. + * - __dadd_rn(\p x, \p y) is equivalent to __dadd_rn(\p y, \p x). + * - __dadd_rn(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p x. + * - __dadd_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dadd_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns NaN. + * - __dadd_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dadd_rn(\p x, \p -x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dadd_rn(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Add two floating-point values in round-towards-zero mode. + * + * Adds two floating-point values \p x and \p y in round-towards-zero mode. + * + * \return Returns \p x + \p y. + * - __dadd_rz(\p x, \p y) is equivalent to __dadd_rz(\p y, \p x). + * - __dadd_rz(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p x. + * - __dadd_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dadd_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns NaN. + * - __dadd_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dadd_rz(\p x, \p -x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dadd_rz(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Add two floating-point values in round-up mode. + * + * Adds two floating-point values \p x and \p y in round-up (to positive infinity) mode. + * + * \return Returns \p x + \p y. + * - __dadd_ru(\p x, \p y) is equivalent to __dadd_ru(\p y, \p x). + * - __dadd_ru(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p x. + * - __dadd_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dadd_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns NaN. + * - __dadd_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dadd_ru(\p x, \p -x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dadd_ru(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Add two floating-point values in round-down mode. + * + * Adds two floating-point values \p x and \p y in round-down (to negative infinity) mode. + * + * \return Returns \p x + \p y. + * - __dadd_rd(\p x, \p y) is equivalent to __dadd_rd(\p y, \p x). + * - __dadd_rd(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p x. + * - __dadd_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dadd_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns NaN. + * - __dadd_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dadd_rd(\p x, \p -x) returns \cuda_math_formula -0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dadd_rd(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Subtract two floating-point values in round-to-nearest-even mode. + * + * Subtracts two floating-point values \p x and \p y in round-to-nearest-even mode. + * + * \return Returns \p x - \p y. + * - __dsub_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p y. + * - __dsub_rn(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \mp\infty \end_cuda_math_formula for finite \p x. + * - __dsub_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dsub_rn(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dsub_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dsub_rn(\p x, \p x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dsub_rn(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Subtract two floating-point values in round-towards-zero mode. + * + * Subtracts two floating-point values \p x and \p y in round-towards-zero mode. + * + * \return Returns \p x - \p y. + * - __dsub_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p y. + * - __dsub_rz(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \mp\infty \end_cuda_math_formula for finite \p x. + * - __dsub_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dsub_rz(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dsub_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dsub_rz(\p x, \p x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dsub_rz(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Subtract two floating-point values in round-up mode. + * + * Subtracts two floating-point values \p x and \p y in round-up (to positive infinity) mode. + * + * \return Returns \p x - \p y. + * - __dsub_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p y. + * - __dsub_ru(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \mp\infty \end_cuda_math_formula for finite \p x. + * - __dsub_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dsub_ru(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dsub_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dsub_ru(\p x, \p x) returns \cuda_math_formula +0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dsub_ru(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Subtract two floating-point values in round-down mode. + * + * Subtracts two floating-point values \p x and \p y in round-down (to negative infinity) mode. + * + * \return Returns \p x - \p y. + * - __dsub_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \p y) returns \cuda_math_formula \pm\infty \end_cuda_math_formula for finite \p y. + * - __dsub_rd(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \mp\infty \end_cuda_math_formula for finite \p x. + * - __dsub_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dsub_rd(\cuda_math_formula \pm\infty \end_cuda_math_formula, \cuda_math_formula \mp\infty \end_cuda_math_formula) returns \cuda_math_formula \pm\infty \end_cuda_math_formula. + * - __dsub_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \mp 0 \end_cuda_math_formula) returns \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - __dsub_rd(\p x, \p x) returns \cuda_math_formula -0 \end_cuda_math_formula for finite \p x, including \cuda_math_formula \pm 0 \end_cuda_math_formula. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dsub_rd(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Multiply two floating-point values in round-to-nearest-even mode. + * + * Multiplies two floating-point values \p x and \p y in round-to-nearest-even mode. + * + * \return Returns \p x * \p y. + * - sign of the product \p x * \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __dmul_rn(\p x, \p y) is equivalent to __dmul_rn(\p y, \p x). + * - __dmul_rn(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __dmul_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dmul_rn(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p y. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dmul_rn(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Multiply two floating-point values in round-towards-zero mode. + * + * Multiplies two floating-point values \p x and \p y in round-towards-zero mode. + * + * \return Returns \p x * \p y. + * - sign of the product \p x * \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __dmul_rz(\p x, \p y) is equivalent to __dmul_rz(\p y, \p x). + * - __dmul_rz(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __dmul_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dmul_rz(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p y. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dmul_rz(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Multiply two floating-point values in round-up mode. + * + * Multiplies two floating-point values \p x and \p y in round-up (to positive infinity) mode. + * + * \return Returns \p x * \p y. + * - sign of the product \p x * \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __dmul_ru(\p x, \p y) is equivalent to __dmul_ru(\p y, \p x). + * - __dmul_ru(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __dmul_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dmul_ru(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p y. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dmul_ru(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_DOUBLE + * \brief Multiply two floating-point values in round-down mode. + * + * Multiplies two floating-point values \p x and \p y in round-down (to negative infinity) mode. + * + * \return Returns \p x * \p y. + * - sign of the product \p x * \p y is XOR of the signs of \p x and \p y when neither inputs nor result are NaN. + * - __dmul_rd(\p x, \p y) is equivalent to __dmul_rd(\p y, \p x). + * - __dmul_rd(\p x, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns \cuda_math_formula \infty \end_cuda_math_formula of appropriate sign for \p x \cuda_math_formula \neq 0 \end_cuda_math_formula. + * - __dmul_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \cuda_math_formula \pm\infty \end_cuda_math_formula) returns NaN. + * - __dmul_rd(\cuda_math_formula \pm 0 \end_cuda_math_formula, \p y) returns \cuda_math_formula 0 \end_cuda_math_formula of appropriate sign for finite \p y. + * - If either argument is NaN, NaN is returned. + * + * \note_accuracy_double_intrinsic + * \note_nofma + */ +extern __device__ __device_builtin__ double __dmul_rd(double x, double y); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a float in round-to-nearest-even mode. + * + * Convert the double-precision floating-point value \p x to a single-precision + * floating-point value in round-to-nearest-even mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ float __double2float_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a float in round-towards-zero mode. + * + * Convert the double-precision floating-point value \p x to a single-precision + * floating-point value in round-towards-zero mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ float __double2float_rz(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a float in round-up mode. + * + * Convert the double-precision floating-point value \p x to a single-precision + * floating-point value in round-up (to positive infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ float __double2float_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a float in round-down mode. + * + * Convert the double-precision floating-point value \p x to a single-precision + * floating-point value in round-down (to negative infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ float __double2float_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed int in round-to-nearest-even mode. + * + * Convert the double-precision floating-point value \p x to a + * signed integer value in round-to-nearest-even mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ int __double2int_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed int in round-up mode. + * + * Convert the double-precision floating-point value \p x to a + * signed integer value in round-up (to positive infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ int __double2int_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed int in round-down mode. + * + * Convert the double-precision floating-point value \p x to a + * signed integer value in round-down (to negative infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ int __double2int_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned int in round-to-nearest-even mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned integer value in round-to-nearest-even mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned int __double2uint_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned int in round-up mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned integer value in round-up (to positive infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned int __double2uint_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned int in round-down mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned integer value in round-down (to negative infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned int __double2uint_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed 64-bit int in round-to-nearest-even mode. + * + * Convert the double-precision floating-point value \p x to a + * signed 64-bit integer value in round-to-nearest-even mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ long long int __double2ll_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed 64-bit int in round-up mode. + * + * Convert the double-precision floating-point value \p x to a + * signed 64-bit integer value in round-up (to positive infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ long long int __double2ll_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to a signed 64-bit int in round-down mode. + * + * Convert the double-precision floating-point value \p x to a + * signed 64-bit integer value in round-down (to negative infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ long long int __double2ll_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned 64-bit int in round-to-nearest-even mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned 64-bit integer value in round-to-nearest-even mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned long long int __double2ull_rn(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned 64-bit int in round-up mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned 64-bit integer value in round-up (to positive infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned long long int __double2ull_ru(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a double to an unsigned 64-bit int in round-down mode. + * + * Convert the double-precision floating-point value \p x to an + * unsigned 64-bit integer value in round-down (to negative infinity) mode. + * \return Returns converted value. + * \note_fp_to_int_out_of_range_undefined + */ +extern __device__ __device_builtin__ unsigned long long int __double2ull_rd(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a signed int to a double. + * + * Convert the signed integer value \p x to a double-precision floating-point value. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __int2double_rn(int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert an unsigned int to a double. + * + * Convert the unsigned integer value \p x to a double-precision floating-point value. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __uint2double_rn(unsigned int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a signed 64-bit int to a double in round-to-nearest-even mode. + * + * Convert the signed 64-bit integer value \p x to a double-precision floating-point + * value in round-to-nearest-even mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ll2double_rn(long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a signed 64-bit int to a double in round-towards-zero mode. + * + * Convert the signed 64-bit integer value \p x to a double-precision floating-point + * value in round-towards-zero mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ll2double_rz(long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a signed 64-bit int to a double in round-up mode. + * + * Convert the signed 64-bit integer value \p x to a double-precision floating-point + * value in round-up (to positive infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ll2double_ru(long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert a signed 64-bit int to a double in round-down mode. + * + * Convert the signed 64-bit integer value \p x to a double-precision floating-point + * value in round-down (to negative infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ll2double_rd(long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert an unsigned 64-bit int to a double in round-to-nearest-even mode. + * + * Convert the unsigned 64-bit integer value \p x to a double-precision floating-point + * value in round-to-nearest-even mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ull2double_rn(unsigned long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert an unsigned 64-bit int to a double in round-towards-zero mode. + * + * Convert the unsigned 64-bit integer value \p x to a double-precision floating-point + * value in round-towards-zero mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ull2double_rz(unsigned long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert an unsigned 64-bit int to a double in round-up mode. + * + * Convert the unsigned 64-bit integer value \p x to a double-precision floating-point + * value in round-up (to positive infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ull2double_ru(unsigned long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Convert an unsigned 64-bit int to a double in round-down mode. + * + * Convert the unsigned 64-bit integer value \p x to a double-precision floating-point + * value in round-down (to negative infinity) mode. + * \return Returns converted value. + */ +extern __device__ __device_builtin__ double __ull2double_rd(unsigned long long int x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Reinterpret high 32 bits in a double as a signed integer. + * + * Reinterpret the high 32 bits in the double-precision floating-point value \p x + * as a signed integer. + * \return Returns reinterpreted value. + */ +extern __device__ __device_builtin__ int __double2hiint(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Reinterpret low 32 bits in a double as a signed integer. + * + * Reinterpret the low 32 bits in the double-precision floating-point value \p x + * as a signed integer. + * \return Returns reinterpreted value. + */ +extern __device__ __device_builtin__ int __double2loint(double x); +/** + * \ingroup CUDA_MATH_INTRINSIC_CAST + * \brief Reinterpret high and low 32-bit integer values as a double. + * + * Reinterpret the integer value of \p hi as the high 32 bits of a + * double-precision floating-point value and the integer value of \p lo + * as the low 32 bits of the same double-precision floating-point value. + * \return Returns reinterpreted value. + */ +extern __device__ __device_builtin__ double __hiloint2double(int hi, int lo); + + +} + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ +__SM_20_INTRINSICS_DECL__ __DEPRECATED__(__WSB_DEPRECATION_MESSAGE(__ballot)) unsigned int ballot(bool pred) __DEF_IF_HOST + +__SM_20_INTRINSICS_DECL__ int syncthreads_count(bool pred) __DEF_IF_HOST + +__SM_20_INTRINSICS_DECL__ bool syncthreads_and(bool pred) __DEF_IF_HOST + +__SM_20_INTRINSICS_DECL__ bool syncthreads_or(bool pred) __DEF_IF_HOST + +#undef __DEPRECATED__ +#undef __WSB_DEPRECATION_MESSAGE + +__SM_20_INTRINSICS_DECL__ unsigned int __isGlobal(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ unsigned int __isShared(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ unsigned int __isConstant(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ unsigned int __isLocal(const void *ptr) __DEF_IF_HOST +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) +__SM_20_INTRINSICS_DECL__ unsigned int __isGridConstant(const void *ptr) __DEF_IF_HOST +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) */ +__SM_20_INTRINSICS_DECL__ size_t __cvta_generic_to_global(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ size_t __cvta_generic_to_shared(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ size_t __cvta_generic_to_constant(const void *ptr) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ size_t __cvta_generic_to_local(const void *ptr) __DEF_IF_HOST +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) +__SM_20_INTRINSICS_DECL__ size_t __cvta_generic_to_grid_constant(const void *ptr) __DEF_IF_HOST +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) */ + +__SM_20_INTRINSICS_DECL__ void * __cvta_global_to_generic(size_t rawbits) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ void * __cvta_shared_to_generic(size_t rawbits) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ void * __cvta_constant_to_generic(size_t rawbits) __DEF_IF_HOST +__SM_20_INTRINSICS_DECL__ void * __cvta_local_to_generic(size_t rawbits) __DEF_IF_HOST +#if !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) +__SM_20_INTRINSICS_DECL__ void * __cvta_grid_constant_to_generic(size_t rawbits) __DEF_IF_HOST +#endif /* !defined(__CUDA_ARCH__) || (__CUDA_ARCH__ >= 700) */ + +// notice: update documentation for __nv_bswap*() when more host compilers are supported +#if !defined(__CUDA_ARCH__) && !defined(_NVHPC_CUDA) +/** + * \ingroup CUDA_MATH_INTRINSIC_INT + * \brief Reverse the order of bytes of the 16-bit unsigned integer. + * + * Reverse the order of bytes of \p x . Only supported in MSVC and other host + * compilers which define the `__GNUC__` macro, such as GCC and CLANG. + * + * \return Returns \p x with the order of bytes reversed. + */ +__COMMON_INTRINSICS_DECL__ unsigned short __nv_bswap16(unsigned short x) { +#if defined(__GNUC__) + return __builtin_bswap16(x); +#elif defined(_WIN32) + return _byteswap_ushort(x); +#else +#error "unsupported platform" +#endif /* defined(__GNUC__) */ +} + +/** + * \ingroup CUDA_MATH_INTRINSIC_INT + * \brief Reverse the order of bytes of the 32-bit unsigned integer. + * + * Reverse the order of bytes of \p x . Only supported in MSVC and other host + * compilers which define the `__GNUC__` macro, such as GCC and CLANG. + * + * \return Returns \p x with the order of bytes reversed. + */ +__COMMON_INTRINSICS_DECL__ unsigned int __nv_bswap32(unsigned int x) { +#if defined(__GNUC__) + return __builtin_bswap32(x); +#elif defined(_WIN32) + unsigned long ret = _byteswap_ulong(static_cast(x)); + return static_cast(ret); +#else +#error "unsupported platform" +#endif /* defined(__GNUC__) */ +} + +/** + * \ingroup CUDA_MATH_INTRINSIC_INT + * \brief Reverse the order of bytes of the 64-bit unsigned integer. + * + * Reverse the order of bytes of \p x . Only supported in MSVC and other host + * compilers which define the `__GNUC__` macro, such as GCC and CLANG. + * + * \return Returns \p x with the order of bytes reversed. + */ +__COMMON_INTRINSICS_DECL__ unsigned long long __nv_bswap64(unsigned long long x) { +#if defined(__GNUC__) + return __builtin_bswap64(x); +#elif defined(_WIN32) + unsigned __int64 ret = _byteswap_uint64(static_cast(x)); + return static_cast(ret); +#else +#error "unsupported platform" +#endif /* defined(__GNUC__) */ +} +#else +__COMMON_INTRINSICS_DECL__ unsigned short __nv_bswap16(unsigned short in); +__COMMON_INTRINSICS_DECL__ unsigned int __nv_bswap32(unsigned int in); +__COMMON_INTRINSICS_DECL__ unsigned long long __nv_bswap64(unsigned long long in); +#endif /* !defined(__CUDA_ARCH__) */ + +#endif /* __cplusplus && __CUDACC__ */ + +#undef __DEF_IF_HOST +#undef __SM_20_INTRINSICS_DECL__ +#undef __COMMON_INTRINSICS_DECL__ + +#if (!defined(__CUDACC_RTC__) && defined(__CUDA_ARCH__)) || defined(_NVHPC_CUDA) +#include "sm_20_intrinsics.hpp" +#endif /* (!__CUDACC_RTC__ && __CUDA_ARCH__) || _NVHPC_CUDA */ +#endif /* !__SM_20_INTRINSICS_H__ */ + +#undef EXCLUDE_FROM_RTC diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_indirect_functions.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_indirect_functions.h new file mode 100644 index 0000000000000000000000000000000000000000..a93faf052f98d81f8cb65bd9591d08ec90c994d9 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_indirect_functions.h @@ -0,0 +1,243 @@ +/* + * 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. + */ + + +#ifndef __SURFACE_INDIRECT_FUNCTIONS_H__ +#define __SURFACE_INDIRECT_FUNCTIONS_H__ + +#if defined(__cplusplus) && defined(__CUDACC__) + +#include "cuda_runtime_api.h" + +template struct __nv_isurf_trait { }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; + +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; + +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; +template<> struct __nv_isurf_trait { typedef void type; }; + + +template +static __device__ typename __nv_isurf_trait::type surf1Dread(T *ptr, cudaSurfaceObject_t obj, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf1Dread", ptr, obj, x, mode); +} + +template +static __device__ T surf1Dread(cudaSurfaceObject_t surfObject, int x, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surf1Dread(&ret, surfObject, x, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surf2Dread(T *ptr, cudaSurfaceObject_t obj, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf2Dread", ptr, obj, x, y, mode); +} + +template +static __device__ T surf2Dread(cudaSurfaceObject_t surfObject, int x, int y, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surf2Dread(&ret, surfObject, x, y, boundaryMode); + return ret; +} + + +template +static __device__ typename __nv_isurf_trait::type surf3Dread(T *ptr, cudaSurfaceObject_t obj, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf3Dread", ptr, obj, x, y, z, mode); +} + +template +static __device__ T surf3Dread(cudaSurfaceObject_t surfObject, int x, int y, int z, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surf3Dread(&ret, surfObject, x, y, z, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surf1DLayeredread(T *ptr, cudaSurfaceObject_t obj, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf1DLayeredread", ptr, obj, x, layer, mode); +} + +template +static __device__ T surf1DLayeredread(cudaSurfaceObject_t surfObject, int x, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surf1DLayeredread(&ret, surfObject, x, layer, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surf2DLayeredread(T *ptr, cudaSurfaceObject_t obj, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf2DLayeredread", ptr, obj, x, y, layer, mode); +} + +template +static __device__ T surf2DLayeredread(cudaSurfaceObject_t surfObject, int x, int y, int layer, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surf2DLayeredread(&ret, surfObject, x, y, layer, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surfCubemapread(T *ptr, cudaSurfaceObject_t obj, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurfCubemapread", ptr, obj, x, y, face, mode); +} + +template +static __device__ T surfCubemapread(cudaSurfaceObject_t surfObject, int x, int y, int face, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surfCubemapread(&ret, surfObject, x, y, face, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surfCubemapLayeredread(T *ptr, cudaSurfaceObject_t obj, int x, int y, int layerface, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurfCubemapLayeredread", ptr, obj, x, y, layerface, mode); +} + +template +static __device__ T surfCubemapLayeredread(cudaSurfaceObject_t surfObject, int x, int y, int layerface, cudaSurfaceBoundaryMode boundaryMode = cudaBoundaryModeTrap) +{ + T ret; + surfCubemapLayeredread(&ret, surfObject, x, y, layerface, boundaryMode); + return ret; +} + +template +static __device__ typename __nv_isurf_trait::type surf1Dwrite(T val, cudaSurfaceObject_t obj, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf1Dwrite_v2", &val, obj, x, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surf2Dwrite(T val, cudaSurfaceObject_t obj, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf2Dwrite_v2", &val, obj, x, y, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surf3Dwrite(T val, cudaSurfaceObject_t obj, int x, int y, int z, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf3Dwrite_v2", &val, obj, x, y, z, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surf1DLayeredwrite(T val, cudaSurfaceObject_t obj, int x, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf1DLayeredwrite_v2", &val, obj, x, layer, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surf2DLayeredwrite(T val, cudaSurfaceObject_t obj, int x, int y, int layer, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurf2DLayeredwrite_v2", &val, obj, x, y, layer, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surfCubemapwrite(T val, cudaSurfaceObject_t obj, int x, int y, int face, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurfCubemapwrite_v2", &val, obj, x, y, face, mode); +} + +template +static __device__ typename __nv_isurf_trait::type surfCubemapLayeredwrite(T val, cudaSurfaceObject_t obj, int x, int y, int layerface, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) +{ + __nv_tex_surf_handler("__isurfCubemapLayeredwrite_v2", &val, obj, x, y, layerface, mode); +} + +#endif // __cplusplus && __CUDACC__ + +#endif // __SURFACE_INDIRECT_FUNCTIONS_H__ + + diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_types.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_types.h new file mode 100644 index 0000000000000000000000000000000000000000..e1d0eccdee2a80132c5dadfcd80643c1b41eb8ec --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/surface_types.h @@ -0,0 +1,111 @@ +/* + * Copyright 1993-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(__SURFACE_TYPES_H__) +#define __SURFACE_TYPES_H__ + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "driver_types.h" + +#ifndef __CUDACC_RTC_MINIMAL__ + +/** + * \addtogroup CUDART_TYPES + * + * @{ + */ + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#define cudaSurfaceType1D 0x01 +#define cudaSurfaceType2D 0x02 +#define cudaSurfaceType3D 0x03 +#define cudaSurfaceTypeCubemap 0x0C +#define cudaSurfaceType1DLayered 0xF1 +#define cudaSurfaceType2DLayered 0xF2 +#define cudaSurfaceTypeCubemapLayered 0xFC + +/** + * CUDA Surface boundary modes + */ +enum __device_builtin__ cudaSurfaceBoundaryMode +{ + cudaBoundaryModeZero = 0, /**< Zero boundary mode */ + cudaBoundaryModeClamp = 1, /**< Clamp boundary mode */ + cudaBoundaryModeTrap = 2 /**< Trap boundary mode */ +}; + +/** + * CUDA Surface format modes + */ +enum __device_builtin__ cudaSurfaceFormatMode +{ + cudaFormatModeForced = 0, /**< Forced format mode */ + cudaFormatModeAuto = 1 /**< Auto format mode */ +}; + +/** + * An opaque value that represents a CUDA Surface object + */ +typedef __device_builtin__ unsigned long long cudaSurfaceObject_t; + +/** @} */ +/** @} */ /* END CUDART_TYPES */ + +#endif /* !__CUDACC_RTC_MINIMAL__ */ +#endif /* !__SURFACE_TYPES_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/texture_fetch_functions.h b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/texture_fetch_functions.h new file mode 100644 index 0000000000000000000000000000000000000000..704e8518da6b3cf7b77e7b9d34638bc06dd3937f --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/texture_fetch_functions.h @@ -0,0 +1,223 @@ +/* + * 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. + */ + +#if !defined(__TEXTURE_FETCH_FUNCTIONS_H__) +#define __TEXTURE_FETCH_FUNCTIONS_H__ + + +#if defined(__cplusplus) && defined(__CUDACC__) + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "cuda_runtime_api.h" +#include "cuda_texture_types.h" + +#if defined(_WIN32) +# define __DEPRECATED__ __declspec(deprecated) +#else +# define __DEPRECATED__ __attribute__((deprecated)) +#endif + + +template +struct __nv_tex_rmet_ret { }; + +template<> struct __nv_tex_rmet_ret { typedef char type; }; +template<> struct __nv_tex_rmet_ret { typedef signed char type; }; +template<> struct __nv_tex_rmet_ret { typedef unsigned char type; }; +template<> struct __nv_tex_rmet_ret { typedef char1 type; }; +template<> struct __nv_tex_rmet_ret { typedef uchar1 type; }; +template<> struct __nv_tex_rmet_ret { typedef char2 type; }; +template<> struct __nv_tex_rmet_ret { typedef uchar2 type; }; +template<> struct __nv_tex_rmet_ret { typedef char4 type; }; +template<> struct __nv_tex_rmet_ret { typedef uchar4 type; }; + +template<> struct __nv_tex_rmet_ret { typedef short type; }; +template<> struct __nv_tex_rmet_ret { typedef unsigned short type; }; +template<> struct __nv_tex_rmet_ret { typedef short1 type; }; +template<> struct __nv_tex_rmet_ret { typedef ushort1 type; }; +template<> struct __nv_tex_rmet_ret { typedef short2 type; }; +template<> struct __nv_tex_rmet_ret { typedef ushort2 type; }; +template<> struct __nv_tex_rmet_ret { typedef short4 type; }; +template<> struct __nv_tex_rmet_ret { typedef ushort4 type; }; + +template<> struct __nv_tex_rmet_ret { typedef int type; }; +template<> struct __nv_tex_rmet_ret { typedef unsigned int type; }; +template<> struct __nv_tex_rmet_ret { typedef int1 type; }; +template<> struct __nv_tex_rmet_ret { typedef uint1 type; }; +template<> struct __nv_tex_rmet_ret { typedef int2 type; }; +template<> struct __nv_tex_rmet_ret { typedef uint2 type; }; +template<> struct __nv_tex_rmet_ret { typedef int4 type; }; +template<> struct __nv_tex_rmet_ret { typedef uint4 type; }; + +#if !defined(__LP64__) +template<> struct __nv_tex_rmet_ret { typedef long type; }; +template<> struct __nv_tex_rmet_ret { typedef unsigned long type; }; +template<> struct __nv_tex_rmet_ret { typedef long1 type; }; +template<> struct __nv_tex_rmet_ret { typedef ulong1 type; }; +template<> struct __nv_tex_rmet_ret { typedef long2 type; }; +template<> struct __nv_tex_rmet_ret { typedef ulong2 type; }; +template<> struct __nv_tex_rmet_ret { typedef long4 type; }; +template<> struct __nv_tex_rmet_ret { typedef ulong4 type; }; +#endif /* !__LP64__ */ +template<> struct __nv_tex_rmet_ret { typedef float type; }; +template<> struct __nv_tex_rmet_ret { typedef float1 type; }; +template<> struct __nv_tex_rmet_ret { typedef float2 type; }; +template<> struct __nv_tex_rmet_ret { typedef float4 type; }; + + +template struct __nv_tex_rmet_cast { typedef T* type; }; +#if !defined(__LP64__) +template<> struct __nv_tex_rmet_cast { typedef int *type; }; +template<> struct __nv_tex_rmet_cast { typedef unsigned int *type; }; +template<> struct __nv_tex_rmet_cast { typedef int1 *type; }; +template<> struct __nv_tex_rmet_cast { typedef uint1 *type; }; +template<> struct __nv_tex_rmet_cast { typedef int2 *type; }; +template<> struct __nv_tex_rmet_cast { typedef uint2 *type; }; +template<> struct __nv_tex_rmet_cast { typedef int4 *type; }; +template<> struct __nv_tex_rmet_cast { typedef uint4 *type; }; +#endif /* !__LP64__ */ + +template +struct __nv_tex_rmnf_ret { }; + +template <> struct __nv_tex_rmnf_ret { typedef float type; }; +template <> struct __nv_tex_rmnf_ret { typedef float type; }; +template <> struct __nv_tex_rmnf_ret { typedef float type; }; +template <> struct __nv_tex_rmnf_ret { typedef float type; }; +template <> struct __nv_tex_rmnf_ret { typedef float type; }; +template <> struct __nv_tex_rmnf_ret { typedef float1 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float1 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float1 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float1 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float2 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float2 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float2 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float2 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float4 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float4 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float4 type; }; +template <> struct __nv_tex_rmnf_ret { typedef float4 type; }; + + +template +struct __nv_tex2dgather_ret { }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef char4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uchar4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uchar4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uchar4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uchar4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uchar4 type; }; + +template <> struct __nv_tex2dgather_ret { typedef short4 type; }; +template <> struct __nv_tex2dgather_ret { typedef short4 type; }; +template <> struct __nv_tex2dgather_ret { typedef short4 type; }; +template <> struct __nv_tex2dgather_ret { typedef short4 type; }; +template <> struct __nv_tex2dgather_ret { typedef short4 type; }; +template <> struct __nv_tex2dgather_ret { typedef ushort4 type; }; +template <> struct __nv_tex2dgather_ret { typedef ushort4 type; }; +template <> struct __nv_tex2dgather_ret { typedef ushort4 type; }; +template <> struct __nv_tex2dgather_ret { typedef ushort4 type; }; +template <> struct __nv_tex2dgather_ret { typedef ushort4 type; }; + +template <> struct __nv_tex2dgather_ret { typedef int4 type; }; +template <> struct __nv_tex2dgather_ret { typedef int4 type; }; +template <> struct __nv_tex2dgather_ret { typedef int4 type; }; +template <> struct __nv_tex2dgather_ret { typedef int4 type; }; +template <> struct __nv_tex2dgather_ret { typedef int4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uint4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uint4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uint4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uint4 type; }; +template <> struct __nv_tex2dgather_ret { typedef uint4 type; }; + +template <> struct __nv_tex2dgather_ret { typedef float4 type; }; +template <> struct __nv_tex2dgather_ret { typedef float4 type; }; +template <> struct __nv_tex2dgather_ret { typedef float4 type; }; +template <> struct __nv_tex2dgather_ret { typedef float4 type; }; +template <> struct __nv_tex2dgather_ret { typedef float4 type; }; + + +template struct __nv_tex2dgather_rmnf_ret { }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; +template<> struct __nv_tex2dgather_rmnf_ret { typedef float4 type; }; + +#undef __DEPRECATED__ + +#endif /* __cplusplus && __CUDACC__ */ + +#endif /* !__TEXTURE_FETCH_FUNCTIONS_H__ */ diff --git a/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/vector_functions.hpp b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/vector_functions.hpp new file mode 100644 index 0000000000000000000000000000000000000000..ab69cf38045a7c44dae67e7149d49ac4c6148747 --- /dev/null +++ b/Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/triton/backends/nvidia/include/vector_functions.hpp @@ -0,0 +1,316 @@ +/* + * 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. + */ + +#if !defined(__VECTOR_FUNCTIONS_HPP__) +#define __VECTOR_FUNCTIONS_HPP__ + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +#include "cuda_runtime_api.h" + +#if defined(__CUDACC_RTC__) +#define __VECTOR_FUNCTIONS_DECL__ __host__ __device__ +#else /* !__CUDACC_RTC__ */ +#define __VECTOR_FUNCTIONS_DECL__ static __inline__ __host__ __device__ +#endif /* __CUDACC_RTC__ */ + +/******************************************************************************* +* * +* * +* * +*******************************************************************************/ + +__VECTOR_FUNCTIONS_DECL__ char1 make_char1(signed char x) +{ + char1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uchar1 make_uchar1(unsigned char x) +{ + uchar1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ char2 make_char2(signed char x, signed char y) +{ + char2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uchar2 make_uchar2(unsigned char x, unsigned char y) +{ + uchar2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ char3 make_char3(signed char x, signed char y, signed char z) +{ + char3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) +{ + uchar3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ char4 make_char4(signed char x, signed char y, signed char z, signed char w) +{ + char4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) +{ + uchar4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ short1 make_short1(short x) +{ + short1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ushort1 make_ushort1(unsigned short x) +{ + ushort1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ short2 make_short2(short x, short y) +{ + short2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ushort2 make_ushort2(unsigned short x, unsigned short y) +{ + ushort2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ short3 make_short3(short x,short y, short z) +{ + short3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) +{ + ushort3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ short4 make_short4(short x, short y, short z, short w) +{ + short4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) +{ + ushort4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ int1 make_int1(int x) +{ + int1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uint1 make_uint1(unsigned int x) +{ + uint1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ int2 make_int2(int x, int y) +{ + int2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uint2 make_uint2(unsigned int x, unsigned int y) +{ + uint2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ int3 make_int3(int x, int y, int z) +{ + int3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z) +{ + uint3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ int4 make_int4(int x, int y, int z, int w) +{ + int4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) +{ + uint4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ long1 make_long1(long int x) +{ + long1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulong1 make_ulong1(unsigned long int x) +{ + ulong1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ long2 make_long2(long int x, long int y) +{ + long2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulong2 make_ulong2(unsigned long int x, unsigned long int y) +{ + ulong2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ long3 make_long3(long int x, long int y, long int z) +{ + long3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulong3 make_ulong3(unsigned long int x, unsigned long int y, unsigned long int z) +{ + ulong3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ long4 make_long4(long int x, long int y, long int z, long int w) +{ + long4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulong4 make_ulong4(unsigned long int x, unsigned long int y, unsigned long int z, unsigned long int w) +{ + ulong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ float1 make_float1(float x) +{ + float1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ float2 make_float2(float x, float y) +{ + float2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ float3 make_float3(float x, float y, float z) +{ + float3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ float4 make_float4(float x, float y, float z, float w) +{ + float4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ longlong1 make_longlong1(long long int x) +{ + longlong1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulonglong1 make_ulonglong1(unsigned long long int x) +{ + ulonglong1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ longlong2 make_longlong2(long long int x, long long int y) +{ + longlong2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulonglong2 make_ulonglong2(unsigned long long int x, unsigned long long int y) +{ + ulonglong2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ longlong3 make_longlong3(long long int x, long long int y, long long int z) +{ + longlong3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulonglong3 make_ulonglong3(unsigned long long int x, unsigned long long int y, unsigned long long int z) +{ + ulonglong3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ longlong4 make_longlong4(long long int x, long long int y, long long int z, long long int w) +{ + longlong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ ulonglong4 make_ulonglong4(unsigned long long int x, unsigned long long int y, unsigned long long int z, unsigned long long int w) +{ + ulonglong4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +__VECTOR_FUNCTIONS_DECL__ double1 make_double1(double x) +{ + double1 t; t.x = x; return t; +} + +__VECTOR_FUNCTIONS_DECL__ double2 make_double2(double x, double y) +{ + double2 t; t.x = x; t.y = y; return t; +} + +__VECTOR_FUNCTIONS_DECL__ double3 make_double3(double x, double y, double z) +{ + double3 t; t.x = x; t.y = y; t.z = z; return t; +} + +__VECTOR_FUNCTIONS_DECL__ double4 make_double4(double x, double y, double z, double w) +{ + double4 t; t.x = x; t.y = y; t.z = z; t.w = w; return t; +} + +#undef __VECTOR_FUNCTIONS_DECL__ + +#endif /* !__VECTOR_FUNCTIONS_HPP__ */ + diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__init__.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__init__.pxd new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38d71fcfde45b03afb9df9a9e3afa940d14557ae --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from cuda.bindings import utils +from cuda.bindings._version import __version__ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fb35996eb6b5fcfa52fcdf5b4cc52ee9d6727bf Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/_version.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/_version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76bace0ec3400b0b158c89ae966ba3971e00ac7b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/__pycache__/_version.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..09c8f687e73aaf09f3ccc717da2b9eeb92901513 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.cpp new file mode 100644 index 0000000000000000000000000000000000000000..81303108cb9c58a2b3785f30eda9ce7841f6bfe8 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.cpp @@ -0,0 +1,103006 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h", + "cuda/bindings/_bindings/loader.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "./cuda/bindings/_bindings", + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._bindings.cydriver", + "sources": [ + "cuda/bindings/_bindings/cydriver.pyx", + "cuda/bindings/_bindings/loader.cpp" + ] + }, + "module_name": "cuda.bindings._bindings.cydriver" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___bindings__cydriver +#define __PYX_HAVE_API__cuda__bindings___bindings__cydriver +/* Early includes */ +#include +#include "cuda.h" +#include "cudaProfiler.h" +#include +#include "loader.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_bindings/cydriver.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; + +/* "cuda/bindings/_bindings/cydriver.pyx":489 + * + * # To make cuPythonInit reentrant + * ctypedef CUresult (*__cuGetProcAddress_v2_T)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) except?CUDA_ERROR_NOT_FOUND nogil # <<<<<<<<<<<<<< + * cdef __cuGetProcAddress_v2_T _F_cuGetProcAddress_v2 = NULL + * +*/ +typedef CUresult (*__pyx_t_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2_T)(char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *); +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* IncludeStringH.proto */ +#include + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_string.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings._lib.dlfcn" */ + +/* Module declarations from "cuda.bindings._bindings.loader" */ + +/* Module declarations from "cuda.bindings._bindings.cydriver" */ +static PyObject *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock = 0; +static int __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPythonInit; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface; +static void *__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface; +static __pyx_t_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2_T __pyx_v_4cuda_8bindings_9_bindings_8cydriver__F_cuGetProcAddress_v2; +static PyObject *__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs = 0; +static int __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPythonInit(void); /*proto*/ +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(void); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointer(PyObject *, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._bindings.cydriver" +extern int __pyx_module_is_main_cuda__bindings___bindings__cydriver; +int __pyx_module_is_main_cuda__bindings___bindings__cydriver = 0; + +/* Implementation of "cuda.bindings._bindings.cydriver" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_RuntimeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_sys[] = "sys"; +static const char __pyx_k_Lock[] = "Lock"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_cuInit[] = "__cuInit"; +static const char __pyx_k_getenv[] = "getenv"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_default[] = "default"; +static const char __pyx_k_maxsize[] = "maxsize"; +static const char __pyx_k_add_note[] = "add_note"; +static const char __pyx_k_cuLaunch[] = "__cuLaunch"; +static const char __pyx_k_cuMemMap[] = "__cuMemMap"; +static const char __pyx_k_cuMemcpy[] = "__cuMemcpy"; +static const char __pyx_k_encoding[] = "encoding"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_z_A_a_9AQ[] = "\200\001\330\004\005\330\004\007\200z\220\023\220A\330\010\024\320\024.\250a\330\004\013\2109\220A\220Q"; +static const char __pyx_k_cuCtxGetId[] = "__cuCtxGetId"; +static const char __pyx_k_cuFuncLoad[] = "__cuFuncLoad"; +static const char __pyx_k_cuMemUnmap[] = "__cuMemUnmap"; +static const char __pyx_k_cuCtxAttach[] = "__cuCtxAttach"; +static const char __pyx_k_cuCtxDetach[] = "__cuCtxDetach"; +static const char __pyx_k_cuDeviceGet[] = "__cuDeviceGet"; +static const char __pyx_k_cuMemAdvise[] = "__cuMemAdvise"; +static const char __pyx_k_cuMemCreate[] = "__cuMemCreate"; +static const char __pyx_k_cuParamSetf[] = "__cuParamSetf"; +static const char __pyx_k_cuParamSeti[] = "__cuParamSeti"; +static const char __pyx_k_cuParamSetv[] = "__cuParamSetv"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_cuEventQuery[] = "__cuEventQuery"; +static const char __pyx_k_cuGraphClone[] = "__cuGraphClone"; +static const char __pyx_k_cuLaunchGrid[] = "__cuLaunchGrid"; +static const char __pyx_k_cuMemFree_v2[] = "__cuMemFree_v2"; +static const char __pyx_k_cuMemRelease[] = "__cuMemRelease"; +static const char __pyx_k_cuMemcpyPeer[] = "__cuMemcpyPeer"; +static const char __pyx_k_cuModuleLoad[] = "__cuModuleLoad"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_libcuda_so_1[] = "libcuda.so.1"; +static const char __pyx_k_cuCtxGetFlags[] = "__cuCtxGetFlags"; +static const char __pyx_k_cuCtxGetLimit[] = "__cuCtxGetLimit"; +static const char __pyx_k_cuCtxSetFlags[] = "__cuCtxSetFlags"; +static const char __pyx_k_cuCtxSetLimit[] = "__cuCtxSetLimit"; +static const char __pyx_k_cuEventCreate[] = "__cuEventCreate"; +static const char __pyx_k_cuEventRecord[] = "__cuEventRecord"; +static const char __pyx_k_cuFuncGetName[] = "__cuFuncGetName"; +static const char __pyx_k_cuGraphCreate[] = "__cuGraphCreate"; +static const char __pyx_k_cuGraphLaunch[] = "__cuGraphLaunch"; +static const char __pyx_k_cuGraphUpload[] = "__cuGraphUpload"; +static const char __pyx_k_cuLinkDestroy[] = "__cuLinkDestroy"; +static const char __pyx_k_cuLogsCurrent[] = "__cuLogsCurrent"; +static const char __pyx_k_cuMemAlloc_v2[] = "__cuMemAlloc_v2"; +static const char __pyx_k_cuMemFreeHost[] = "__cuMemFreeHost"; +static const char __pyx_k_cuMemcpy2D_v2[] = "__cuMemcpy2D_v2"; +static const char __pyx_k_cuMemcpy3D_v2[] = "__cuMemcpy3D_v2"; +static const char __pyx_k_cuMemcpyAsync[] = "__cuMemcpyAsync"; +static const char __pyx_k_cuMemsetD8_v2[] = "__cuMemsetD8_v2"; +static const char __pyx_k_cuStreamGetId[] = "__cuStreamGetId"; +static const char __pyx_k_cuStreamQuery[] = "__cuStreamQuery"; +static const char __pyx_k_cuArrayDestroy[] = "__cuArrayDestroy"; +static const char __pyx_k_cuCtxCreate_v2[] = "__cuCtxCreate_v2"; +static const char __pyx_k_cuCtxCreate_v3[] = "__cuCtxCreate_v3"; +static const char __pyx_k_cuCtxCreate_v4[] = "__cuCtxCreate_v4"; +static const char __pyx_k_cuCtxGetDevice[] = "__cuCtxGetDevice"; +static const char __pyx_k_cuCtxWaitEvent[] = "__cuCtxWaitEvent"; +static const char __pyx_k_cuFuncIsLoaded[] = "__cuFuncIsLoaded"; +static const char __pyx_k_cuGetErrorName[] = "__cuGetErrorName"; +static const char __pyx_k_cuGraphAddNode[] = "__cuGraphAddNode"; +static const char __pyx_k_cuGraphDestroy[] = "__cuGraphDestroy"; +static const char __pyx_k_cuLaunchKernel[] = "__cuLaunchKernel"; +static const char __pyx_k_cuLinkComplete[] = "__cuLinkComplete"; +static const char __pyx_k_cuMemAdvise_v2[] = "__cuMemAdvise_v2"; +static const char __pyx_k_cuMemFreeAsync[] = "__cuMemFreeAsync"; +static const char __pyx_k_cuMemGetAccess[] = "__cuMemGetAccess"; +static const char __pyx_k_cuMemHostAlloc[] = "__cuMemHostAlloc"; +static const char __pyx_k_cuMemSetAccess[] = "__cuMemSetAccess"; +static const char __pyx_k_cuMemcpy3DPeer[] = "__cuMemcpy3DPeer"; +static const char __pyx_k_cuMemsetD16_v2[] = "__cuMemsetD16_v2"; +static const char __pyx_k_cuMemsetD32_v2[] = "__cuMemsetD32_v2"; +static const char __pyx_k_cuModuleUnload[] = "__cuModuleUnload"; +static const char __pyx_k_cuParamSetSize[] = "__cuParamSetSize"; +static const char __pyx_k_cuProfilerStop[] = "__cuProfilerStop"; +static const char __pyx_k_cuStreamCreate[] = "__cuStreamCreate"; +static const char __pyx_k_cuStreamGetCtx[] = "__cuStreamGetCtx"; +static const char __pyx_k_cuTexRefCreate[] = "__cuTexRefCreate"; +static const char __pyx_k_cuArrayGetPlane[] = "__cuArrayGetPlane"; +static const char __pyx_k_cuCtxDestroy_v2[] = "__cuCtxDestroy_v2"; +static const char __pyx_k_cuCtxGetCurrent[] = "__cuCtxGetCurrent"; +static const char __pyx_k_cuCtxSetCurrent[] = "__cuCtxSetCurrent"; +static const char __pyx_k_cuDeviceGetLuid[] = "__cuDeviceGetLuid"; +static const char __pyx_k_cuDeviceGetName[] = "__cuDeviceGetName"; +static const char __pyx_k_cuDeviceGetUuid[] = "__cuDeviceGetUuid"; +static const char __pyx_k_cuFuncGetModule[] = "__cuFuncGetModule"; +static const char __pyx_k_cuGraphGetEdges[] = "__cuGraphGetEdges"; +static const char __pyx_k_cuGraphGetNodes[] = "__cuGraphGetNodes"; +static const char __pyx_k_cuKernelGetName[] = "__cuKernelGetName"; +static const char __pyx_k_cuLibraryUnload[] = "__cuLibraryUnload"; +static const char __pyx_k_cuLinkCreate_v2[] = "__cuLinkCreate_v2"; +static const char __pyx_k_cuMemAllocAsync[] = "__cuMemAllocAsync"; +static const char __pyx_k_cuMemGetInfo_v2[] = "__cuMemGetInfo_v2"; +static const char __pyx_k_cuMemPoolCreate[] = "__cuMemPoolCreate"; +static const char __pyx_k_cuMemPoolTrimTo[] = "__cuMemPoolTrimTo"; +static const char __pyx_k_cuMemcpyAtoA_v2[] = "__cuMemcpyAtoA_v2"; +static const char __pyx_k_cuMemcpyAtoD_v2[] = "__cuMemcpyAtoD_v2"; +static const char __pyx_k_cuMemcpyAtoH_v2[] = "__cuMemcpyAtoH_v2"; +static const char __pyx_k_cuMemcpyDtoA_v2[] = "__cuMemcpyDtoA_v2"; +static const char __pyx_k_cuMemcpyDtoD_v2[] = "__cuMemcpyDtoD_v2"; +static const char __pyx_k_cuMemcpyDtoH_v2[] = "__cuMemcpyDtoH_v2"; +static const char __pyx_k_cuMemcpyHtoA_v2[] = "__cuMemcpyHtoA_v2"; +static const char __pyx_k_cuMemcpyHtoD_v2[] = "__cuMemcpyHtoD_v2"; +static const char __pyx_k_cuMemsetD2D8_v2[] = "__cuMemsetD2D8_v2"; +static const char __pyx_k_cuMemsetD8Async[] = "__cuMemsetD8Async"; +static const char __pyx_k_cuProfilerStart[] = "__cuProfilerStart"; +static const char __pyx_k_cuTexRefDestroy[] = "__cuTexRefDestroy"; +static const char __pyx_k_Failed_to_dlopen[] = "Failed to dlopen "; +static const char __pyx_k_cuArrayCreate_v2[] = "__cuArrayCreate_v2"; +static const char __pyx_k_cuCtxRecordEvent[] = "__cuCtxRecordEvent"; +static const char __pyx_k_cuCtxSynchronize[] = "__cuCtxSynchronize"; +static const char __pyx_k_cuDeviceGetCount[] = "__cuDeviceGetCount"; +static const char __pyx_k_cuGetErrorString[] = "__cuGetErrorString"; +static const char __pyx_k_cuGetExportTable[] = "__cuGetExportTable"; +static const char __pyx_k_cuGreenCtxCreate[] = "__cuGreenCtxCreate"; +static const char __pyx_k_cuLaunchHostFunc[] = "__cuLaunchHostFunc"; +static const char __pyx_k_cuLaunchKernelEx[] = "__cuLaunchKernelEx"; +static const char __pyx_k_cuLinkAddData_v2[] = "__cuLinkAddData_v2"; +static const char __pyx_k_cuLinkAddFile_v2[] = "__cuLinkAddFile_v2"; +static const char __pyx_k_cuLogsDumpToFile[] = "__cuLogsDumpToFile"; +static const char __pyx_k_cuMemAddressFree[] = "__cuMemAddressFree"; +static const char __pyx_k_cuMemPoolDestroy[] = "__cuMemPoolDestroy"; +static const char __pyx_k_cuMemsetD16Async[] = "__cuMemsetD16Async"; +static const char __pyx_k_cuMemsetD2D16_v2[] = "__cuMemsetD2D16_v2"; +static const char __pyx_k_cuMemsetD2D32_v2[] = "__cuMemsetD2D32_v2"; +static const char __pyx_k_cuMemsetD32Async[] = "__cuMemsetD32Async"; +static const char __pyx_k_cuModuleLoadData[] = "__cuModuleLoadData"; +static const char __pyx_k_cuParamSetTexRef[] = "__cuParamSetTexRef"; +static const char __pyx_k_cuStreamGetFlags[] = "__cuStreamGetFlags"; +static const char __pyx_k_cuTexRefGetArray[] = "__cuTexRefGetArray"; +static const char __pyx_k_cuTexRefGetFlags[] = "__cuTexRefGetFlags"; +static const char __pyx_k_cuTexRefSetArray[] = "__cuTexRefSetArray"; +static const char __pyx_k_cuTexRefSetFlags[] = "__cuTexRefSetFlags"; +static const char __pyx_k_cuVDPAUGetDevice[] = "__cuVDPAUGetDevice"; +static const char __pyx_k_cuCtxFromGreenCtx[] = "__cuCtxFromGreenCtx"; +static const char __pyx_k_cuEventDestroy_v2[] = "__cuEventDestroy_v2"; +static const char __pyx_k_cuGLGetDevices_v2[] = "__cuGLGetDevices_v2"; +static const char __pyx_k_cuGraphAddNode_v2[] = "__cuGraphAddNode_v2"; +static const char __pyx_k_cuGreenCtxDestroy[] = "__cuGreenCtxDestroy"; +static const char __pyx_k_cuIpcGetMemHandle[] = "__cuIpcGetMemHandle"; +static const char __pyx_k_cuLaunchGridAsync[] = "__cuLaunchGridAsync"; +static const char __pyx_k_cuLibraryLoadData[] = "__cuLibraryLoadData"; +static const char __pyx_k_cuMemAllocHost_v2[] = "__cuMemAllocHost_v2"; +static const char __pyx_k_cuMemAllocManaged[] = "__cuMemAllocManaged"; +static const char __pyx_k_cuMemHostGetFlags[] = "__cuMemHostGetFlags"; +static const char __pyx_k_cuMemcpyPeerAsync[] = "__cuMemcpyPeerAsync"; +static const char __pyx_k_cuMemsetD2D8Async[] = "__cuMemsetD2D8Async"; +static const char __pyx_k_cuModuleGetTexRef[] = "__cuModuleGetTexRef"; +static const char __pyx_k_cuMulticastCreate[] = "__cuMulticastCreate"; +static const char __pyx_k_cuMulticastUnbind[] = "__cuMulticastUnbind"; +static const char __pyx_k_cuStreamGetCtx_v2[] = "__cuStreamGetCtx_v2"; +static const char __pyx_k_cuStreamGetDevice[] = "__cuStreamGetDevice"; +static const char __pyx_k_cuStreamWaitEvent[] = "__cuStreamWaitEvent"; +static const char __pyx_k_cuSurfRefGetArray[] = "__cuSurfRefGetArray"; +static const char __pyx_k_cuSurfRefSetArray[] = "__cuSurfRefSetArray"; +static const char __pyx_k_cuTexObjectCreate[] = "__cuTexObjectCreate"; +static const char __pyx_k_cuTexRefGetFormat[] = "__cuTexRefGetFormat"; +static const char __pyx_k_cuTexRefSetFormat[] = "__cuTexRefSetFormat"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_cuArray3DCreate_v2[] = "__cuArray3DCreate_v2"; +static const char __pyx_k_cuCtxGetApiVersion[] = "__cuCtxGetApiVersion"; +static const char __pyx_k_cuCtxPopCurrent_v2[] = "__cuCtxPopCurrent_v2"; +static const char __pyx_k_cuDeviceGetMemPool[] = "__cuDeviceGetMemPool"; +static const char __pyx_k_cuDeviceGetUuid_v2[] = "__cuDeviceGetUuid_v2"; +static const char __pyx_k_cuDeviceSetMemPool[] = "__cuDeviceSetMemPool"; +static const char __pyx_k_cuDriverGetVersion[] = "__cuDriverGetVersion"; +static const char __pyx_k_cuEventElapsedTime[] = "__cuEventElapsedTime"; +static const char __pyx_k_cuEventSynchronize[] = "__cuEventSynchronize"; +static const char __pyx_k_cuFuncGetAttribute[] = "__cuFuncGetAttribute"; +static const char __pyx_k_cuFuncGetParamInfo[] = "__cuFuncGetParamInfo"; +static const char __pyx_k_cuFuncSetAttribute[] = "__cuFuncSetAttribute"; +static const char __pyx_k_cuGraphAddHostNode[] = "__cuGraphAddHostNode"; +static const char __pyx_k_cuGraphDestroyNode[] = "__cuGraphDestroyNode"; +static const char __pyx_k_cuGraphExecDestroy[] = "__cuGraphExecDestroy"; +static const char __pyx_k_cuGraphGetEdges_v2[] = "__cuGraphGetEdges_v2"; +static const char __pyx_k_cuGraphNodeGetType[] = "__cuGraphNodeGetType"; +static const char __pyx_k_cuKernelGetLibrary[] = "__cuKernelGetLibrary"; +static const char __pyx_k_cuLibraryGetGlobal[] = "__cuLibraryGetGlobal"; +static const char __pyx_k_cuLibraryGetKernel[] = "__cuLibraryGetKernel"; +static const char __pyx_k_cuLibraryGetModule[] = "__cuLibraryGetModule"; +static const char __pyx_k_cuLogsDumpToMemory[] = "__cuLogsDumpToMemory"; +static const char __pyx_k_cuMemAllocPitch_v2[] = "__cuMemAllocPitch_v2"; +static const char __pyx_k_cuMemMapArrayAsync[] = "__cuMemMapArrayAsync"; +static const char __pyx_k_cuMemPoolGetAccess[] = "__cuMemPoolGetAccess"; +static const char __pyx_k_cuMemPoolSetAccess[] = "__cuMemPoolSetAccess"; +static const char __pyx_k_cuMemPrefetchAsync[] = "__cuMemPrefetchAsync"; +static const char __pyx_k_cuMemcpy2DAsync_v2[] = "__cuMemcpy2DAsync_v2"; +static const char __pyx_k_cuMemcpy3DAsync_v2[] = "__cuMemcpy3DAsync_v2"; +static const char __pyx_k_cuMemcpyBatchAsync[] = "__cuMemcpyBatchAsync"; +static const char __pyx_k_cuMemsetD2D16Async[] = "__cuMemsetD2D16Async"; +static const char __pyx_k_cuMemsetD2D32Async[] = "__cuMemsetD2D32Async"; +static const char __pyx_k_cuModuleGetSurfRef[] = "__cuModuleGetSurfRef"; +static const char __pyx_k_cuModuleLoadDataEx[] = "__cuModuleLoadDataEx"; +static const char __pyx_k_cuMulticastBindMem[] = "__cuMulticastBindMem"; +static const char __pyx_k_cuStreamDestroy_v2[] = "__cuStreamDestroy_v2"; +static const char __pyx_k_cuStreamEndCapture[] = "__cuStreamEndCapture"; +static const char __pyx_k_cuSurfObjectCreate[] = "__cuSurfObjectCreate"; +static const char __pyx_k_cuTexObjectDestroy[] = "__cuTexObjectDestroy"; +static const char __pyx_k_cuUserObjectCreate[] = "__cuUserObjectCreate"; +static const char __pyx_k_cuUserObjectRetain[] = "__cuUserObjectRetain"; +static const char __pyx_k_cuCtxGetCacheConfig[] = "__cuCtxGetCacheConfig"; +static const char __pyx_k_cuCtxGetDevResource[] = "__cuCtxGetDevResource"; +static const char __pyx_k_cuCtxPushCurrent_v2[] = "__cuCtxPushCurrent_v2"; +static const char __pyx_k_cuCtxSetCacheConfig[] = "__cuCtxSetCacheConfig"; +static const char __pyx_k_cuDeviceGetPCIBusId[] = "__cuDeviceGetPCIBusId"; +static const char __pyx_k_cuDeviceTotalMem_v2[] = "__cuDeviceTotalMem_v2"; +static const char __pyx_k_cuFuncSetBlockShape[] = "__cuFuncSetBlockShape"; +static const char __pyx_k_cuFuncSetSharedSize[] = "__cuFuncSetSharedSize"; +static const char __pyx_k_cuGetProcAddress_v2[] = "__cuGetProcAddress_v2"; +static const char __pyx_k_cuGraphAddEmptyNode[] = "__cuGraphAddEmptyNode"; +static const char __pyx_k_cuGraphExecGetFlags[] = "__cuGraphExecGetFlags"; +static const char __pyx_k_cuGraphGetRootNodes[] = "__cuGraphGetRootNodes"; +static const char __pyx_k_cuGreenCtxWaitEvent[] = "__cuGreenCtxWaitEvent"; +static const char __pyx_k_cuIpcCloseMemHandle[] = "__cuIpcCloseMemHandle"; +static const char __pyx_k_cuIpcGetEventHandle[] = "__cuIpcGetEventHandle"; +static const char __pyx_k_cuKernelGetFunction[] = "__cuKernelGetFunction"; +static const char __pyx_k_cuLibraryGetManaged[] = "__cuLibraryGetManaged"; +static const char __pyx_k_cuMemAddressReserve[] = "__cuMemAddressReserve"; +static const char __pyx_k_cuMemHostUnregister[] = "__cuMemHostUnregister"; +static const char __pyx_k_cuMemcpy3DPeerAsync[] = "__cuMemcpy3DPeerAsync"; +static const char __pyx_k_cuModuleGetFunction[] = "__cuModuleGetFunction"; +static const char __pyx_k_cuMulticastBindAddr[] = "__cuMulticastBindAddr"; +static const char __pyx_k_cuStreamAddCallback[] = "__cuStreamAddCallback"; +static const char __pyx_k_cuStreamGetGreenCtx[] = "__cuStreamGetGreenCtx"; +static const char __pyx_k_cuStreamGetPriority[] = "__cuStreamGetPriority"; +static const char __pyx_k_cuStreamIsCapturing[] = "__cuStreamIsCapturing"; +static const char __pyx_k_cuStreamSynchronize[] = "__cuStreamSynchronize"; +static const char __pyx_k_cuSurfObjectDestroy[] = "__cuSurfObjectDestroy"; +static const char __pyx_k_cuUserObjectRelease[] = "__cuUserObjectRelease"; +static const char __pyx_k_cuVDPAUCtxCreate_v2[] = "__cuVDPAUCtxCreate_v2"; +static const char __pyx_k_cuCtxGetExecAffinity[] = "__cuCtxGetExecAffinity"; +static const char __pyx_k_cuDeviceGetAttribute[] = "__cuDeviceGetAttribute"; +static const char __pyx_k_cuDeviceGraphMemTrim[] = "__cuDeviceGraphMemTrim"; +static const char __pyx_k_cuFuncSetCacheConfig[] = "__cuFuncSetCacheConfig"; +static const char __pyx_k_cuGraphAddMemcpyNode[] = "__cuGraphAddMemcpyNode"; +static const char __pyx_k_cuGraphAddMemsetNode[] = "__cuGraphAddMemsetNode"; +static const char __pyx_k_cuGraphDebugDotPrint[] = "__cuGraphDebugDotPrint"; +static const char __pyx_k_cuGraphExecUpdate_v2[] = "__cuGraphExecUpdate_v2"; +static const char __pyx_k_cuGraphNodeSetParams[] = "__cuGraphNodeSetParams"; +static const char __pyx_k_cuIpcOpenEventHandle[] = "__cuIpcOpenEventHandle"; +static const char __pyx_k_cuKernelGetAttribute[] = "__cuKernelGetAttribute"; +static const char __pyx_k_cuKernelGetParamInfo[] = "__cuKernelGetParamInfo"; +static const char __pyx_k_cuKernelSetAttribute[] = "__cuKernelSetAttribute"; +static const char __pyx_k_cuMemHostRegister_v2[] = "__cuMemHostRegister_v2"; +static const char __pyx_k_cuMemcpy3DBatchAsync[] = "__cuMemcpy3DBatchAsync"; +static const char __pyx_k_cuMemcpyAtoHAsync_v2[] = "__cuMemcpyAtoHAsync_v2"; +static const char __pyx_k_cuMemcpyDtoDAsync_v2[] = "__cuMemcpyDtoDAsync_v2"; +static const char __pyx_k_cuMemcpyDtoHAsync_v2[] = "__cuMemcpyDtoHAsync_v2"; +static const char __pyx_k_cuMemcpyHtoAAsync_v2[] = "__cuMemcpyHtoAAsync_v2"; +static const char __pyx_k_cuMemcpyHtoDAsync_v2[] = "__cuMemcpyHtoDAsync_v2"; +static const char __pyx_k_cuModuleGetGlobal_v2[] = "__cuModuleGetGlobal_v2"; +static const char __pyx_k_cuMulticastAddDevice[] = "__cuMulticastAddDevice"; +static const char __pyx_k_cuStreamGetAttribute[] = "__cuStreamGetAttribute"; +static const char __pyx_k_cuStreamSetAttribute[] = "__cuStreamSetAttribute"; +static const char __pyx_k_cuCtxEnablePeerAccess[] = "__cuCtxEnablePeerAccess"; +static const char __pyx_k_cuDeviceCanAccessPeer[] = "__cuDeviceCanAccessPeer"; +static const char __pyx_k_cuDeviceGetByPCIBusId[] = "__cuDeviceGetByPCIBusId"; +static const char __pyx_k_cuDeviceGetProperties[] = "__cuDeviceGetProperties"; +static const char __pyx_k_cuEventElapsedTime_v2[] = "__cuEventElapsedTime_v2"; +static const char __pyx_k_cuGraphAddMemFreeNode[] = "__cuGraphAddMemFreeNode"; +static const char __pyx_k_cuGraphNodeGetEnabled[] = "__cuGraphNodeGetEnabled"; +static const char __pyx_k_cuGraphNodeSetEnabled[] = "__cuGraphNodeSetEnabled"; +static const char __pyx_k_cuGreenCtxRecordEvent[] = "__cuGreenCtxRecordEvent"; +static const char __pyx_k_cuIpcOpenMemHandle_v2[] = "__cuIpcOpenMemHandle_v2"; +static const char __pyx_k_cuLibraryLoadFromFile[] = "__cuLibraryLoadFromFile"; +static const char __pyx_k_cuMemPoolGetAttribute[] = "__cuMemPoolGetAttribute"; +static const char __pyx_k_cuMemPoolSetAttribute[] = "__cuMemPoolSetAttribute"; +static const char __pyx_k_cuMemPrefetchAsync_v2[] = "__cuMemPrefetchAsync_v2"; +static const char __pyx_k_cuModuleLoadFatBinary[] = "__cuModuleLoadFatBinary"; +static const char __pyx_k_cuPointerGetAttribute[] = "__cuPointerGetAttribute"; +static const char __pyx_k_cuPointerSetAttribute[] = "__cuPointerSetAttribute"; +static const char __pyx_k_cuStreamBatchMemOp_v2[] = "__cuStreamBatchMemOp_v2"; +static const char __pyx_k_cuTexRefGetAddress_v2[] = "__cuTexRefGetAddress_v2"; +static const char __pyx_k_cuTexRefGetFilterMode[] = "__cuTexRefGetFilterMode"; +static const char __pyx_k_cuTexRefSetAddress_v2[] = "__cuTexRefSetAddress_v2"; +static const char __pyx_k_cuTexRefSetFilterMode[] = "__cuTexRefSetFilterMode"; +static const char __pyx_k_cuCoredumpGetAttribute[] = "__cuCoredumpGetAttribute"; +static const char __pyx_k_cuCoredumpSetAttribute[] = "__cuCoredumpSetAttribute"; +static const char __pyx_k_cuCtxDisablePeerAccess[] = "__cuCtxDisablePeerAccess"; +static const char __pyx_k_cuDeviceGetDevResource[] = "__cuDeviceGetDevResource"; +static const char __pyx_k_cuEventRecordWithFlags[] = "__cuEventRecordWithFlags"; +static const char __pyx_k_cuGraphAddDependencies[] = "__cuGraphAddDependencies"; +static const char __pyx_k_cuGraphAddMemAllocNode[] = "__cuGraphAddMemAllocNode"; +static const char __pyx_k_cuGraphNodeFindInClone[] = "__cuGraphNodeFindInClone"; +static const char __pyx_k_cuGraphicsMapResources[] = "__cuGraphicsMapResources"; +static const char __pyx_k_cuGreenCtxStreamCreate[] = "__cuGreenCtxStreamCreate"; +static const char __pyx_k_cuImportExternalMemory[] = "__cuImportExternalMemory"; +static const char __pyx_k_cuKernelSetCacheConfig[] = "__cuKernelSetCacheConfig"; +static const char __pyx_k_cuLogsRegisterCallback[] = "__cuLogsRegisterCallback"; +static const char __pyx_k_cuMemPoolExportPointer[] = "__cuMemPoolExportPointer"; +static const char __pyx_k_cuMemPoolImportPointer[] = "__cuMemPoolImportPointer"; +static const char __pyx_k_cuMemRangeGetAttribute[] = "__cuMemRangeGetAttribute"; +static const char __pyx_k_cuMemcpy2DUnaligned_v2[] = "__cuMemcpy2DUnaligned_v2"; +static const char __pyx_k_cuMipmappedArrayCreate[] = "__cuMipmappedArrayCreate"; +static const char __pyx_k_cuModuleGetLoadingMode[] = "__cuModuleGetLoadingMode"; +static const char __pyx_k_cuPointerGetAttributes[] = "__cuPointerGetAttributes"; +static const char __pyx_k_cuStreamAttachMemAsync[] = "__cuStreamAttachMemAsync"; +static const char __pyx_k_cuStreamCopyAttributes[] = "__cuStreamCopyAttributes"; +static const char __pyx_k_cuStreamWaitValue32_v2[] = "__cuStreamWaitValue32_v2"; +static const char __pyx_k_cuStreamWaitValue64_v2[] = "__cuStreamWaitValue64_v2"; +static const char __pyx_k_cuTensorMapEncodeTiled[] = "__cuTensorMapEncodeTiled"; +static const char __pyx_k_cuTexRefGetAddressMode[] = "__cuTexRefGetAddressMode"; +static const char __pyx_k_cuTexRefGetBorderColor[] = "__cuTexRefGetBorderColor"; +static const char __pyx_k_cuTexRefSetAddressMode[] = "__cuTexRefSetAddressMode"; +static const char __pyx_k_cuTexRefSetBorderColor[] = "__cuTexRefSetBorderColor"; +static const char __pyx_k_cuArrayGetDescriptor_v2[] = "__cuArrayGetDescriptor_v2"; +static const char __pyx_k_cuCheckpointProcessLock[] = "__cuCheckpointProcessLock"; +static const char __pyx_k_cuCtxGetSharedMemConfig[] = "__cuCtxGetSharedMemConfig"; +static const char __pyx_k_cuCtxSetSharedMemConfig[] = "__cuCtxSetSharedMemConfig"; +static const char __pyx_k_cuDestroyExternalMemory[] = "__cuDestroyExternalMemory"; +static const char __pyx_k_cuDeviceGetP2PAttribute[] = "__cuDeviceGetP2PAttribute"; +static const char __pyx_k_cuGraphAddEventWaitNode[] = "__cuGraphAddEventWaitNode"; +static const char __pyx_k_cuGraphAddKernelNode_v2[] = "__cuGraphAddKernelNode_v2"; +static const char __pyx_k_cuGraphRetainUserObject[] = "__cuGraphRetainUserObject"; +static const char __pyx_k_cuLibraryGetKernelCount[] = "__cuLibraryGetKernelCount"; +static const char __pyx_k_cuMemAllocFromPoolAsync[] = "__cuMemAllocFromPoolAsync"; +static const char __pyx_k_cuMemGetAddressRange_v2[] = "__cuMemGetAddressRange_v2"; +static const char __pyx_k_cuMemRangeGetAttributes[] = "__cuMemRangeGetAttributes"; +static const char __pyx_k_cuMipmappedArrayDestroy[] = "__cuMipmappedArrayDestroy"; +static const char __pyx_k_cuStreamBeginCapture_v2[] = "__cuStreamBeginCapture_v2"; +static const char __pyx_k_cuStreamWriteValue32_v2[] = "__cuStreamWriteValue32_v2"; +static const char __pyx_k_cuStreamWriteValue64_v2[] = "__cuStreamWriteValue64_v2"; +static const char __pyx_k_cuTensorMapEncodeIm2col[] = "__cuTensorMapEncodeIm2col"; +static const char __pyx_k_cuTexRefSetAddress2D_v3[] = "__cuTexRefSetAddress2D_v3"; +static const char __pyx_k_cuDevicePrimaryCtxRetain[] = "__cuDevicePrimaryCtxRetain"; +static const char __pyx_k_cuEventCreateFromEGLSync[] = "__cuEventCreateFromEGLSync"; +static const char __pyx_k_cuFuncSetSharedMemConfig[] = "__cuFuncSetSharedMemConfig"; +static const char __pyx_k_cuGraphAddBatchMemOpNode[] = "__cuGraphAddBatchMemOpNode"; +static const char __pyx_k_cuGraphAddChildGraphNode[] = "__cuGraphAddChildGraphNode"; +static const char __pyx_k_cuGraphExecNodeSetParams[] = "__cuGraphExecNodeSetParams"; +static const char __pyx_k_cuGraphHostNodeGetParams[] = "__cuGraphHostNodeGetParams"; +static const char __pyx_k_cuGraphHostNodeSetParams[] = "__cuGraphHostNodeSetParams"; +static const char __pyx_k_cuGraphReleaseUserObject[] = "__cuGraphReleaseUserObject"; +static const char __pyx_k_cuGraphicsUnmapResources[] = "__cuGraphicsUnmapResources"; +static const char __pyx_k_cuGreenCtxGetDevResource[] = "__cuGreenCtxGetDevResource"; +static const char __pyx_k_cuLogsUnregisterCallback[] = "__cuLogsUnregisterCallback"; +static const char __pyx_k_cuMipmappedArrayGetLevel[] = "__cuMipmappedArrayGetLevel"; +static const char __pyx_k_cuModuleGetFunctionCount[] = "__cuModuleGetFunctionCount"; +static const char __pyx_k_cuTexRefGetMaxAnisotropy[] = "__cuTexRefGetMaxAnisotropy"; +static const char __pyx_k_cuTexRefSetMaxAnisotropy[] = "__cuTexRefSetMaxAnisotropy"; +static const char __pyx_k_inspect_function_pointer[] = "_inspect_function_pointer"; +static const char __pyx_k_Function_cuInit_not_found[] = "Function \"cuInit\" not found"; +static const char __pyx_k_cuArray3DGetDescriptor_v2[] = "__cuArray3DGetDescriptor_v2"; +static const char __pyx_k_cuCheckpointProcessUnlock[] = "__cuCheckpointProcessUnlock"; +static const char __pyx_k_cuDevResourceGenerateDesc[] = "__cuDevResourceGenerateDesc"; +static const char __pyx_k_cuDeviceComputeCapability[] = "__cuDeviceComputeCapability"; +static const char __pyx_k_cuDeviceGetDefaultMemPool[] = "__cuDeviceGetDefaultMemPool"; +static const char __pyx_k_cuGraphAddDependencies_v2[] = "__cuGraphAddDependencies_v2"; +static const char __pyx_k_cuGraphAddEventRecordNode[] = "__cuGraphAddEventRecordNode"; +static const char __pyx_k_cuGraphRemoveDependencies[] = "__cuGraphRemoveDependencies"; +static const char __pyx_k_cuGraphicsGLRegisterImage[] = "__cuGraphicsGLRegisterImage"; +static const char __pyx_k_cuImportExternalSemaphore[] = "__cuImportExternalSemaphore"; +static const char __pyx_k_cuLaunchCooperativeKernel[] = "__cuLaunchCooperativeKernel"; +static const char __pyx_k_cuLibraryEnumerateKernels[] = "__cuLibraryEnumerateKernels"; +static const char __pyx_k_cuMemBatchDecompressAsync[] = "__cuMemBatchDecompressAsync"; +static const char __pyx_k_cuMulticastGetGranularity[] = "__cuMulticastGetGranularity"; +static const char __pyx_k_cuStreamGetCaptureInfo_v2[] = "__cuStreamGetCaptureInfo_v2"; +static const char __pyx_k_cuStreamGetCaptureInfo_v3[] = "__cuStreamGetCaptureInfo_v3"; +static const char __pyx_k_cuTensorMapReplaceAddress[] = "__cuTensorMapReplaceAddress"; +static const char __pyx_k_cuTexObjectGetTextureDesc[] = "__cuTexObjectGetTextureDesc"; +static const char __pyx_k_cuTexRefGetMipmappedArray[] = "__cuTexRefGetMipmappedArray"; +static const char __pyx_k_cuTexRefSetMipmappedArray[] = "__cuTexRefSetMipmappedArray"; +static const char __pyx_k_inspect_function_pointers[] = "_inspect_function_pointers"; +static const char __pyx_k_cuArrayGetSparseProperties[] = "__cuArrayGetSparseProperties"; +static const char __pyx_k_cuCheckpointProcessRestore[] = "__cuCheckpointProcessRestore"; +static const char __pyx_k_cuDestroyExternalSemaphore[] = "__cuDestroyExternalSemaphore"; +static const char __pyx_k_cuDevicePrimaryCtxGetState[] = "__cuDevicePrimaryCtxGetState"; +static const char __pyx_k_cuDevicePrimaryCtxReset_v2[] = "__cuDevicePrimaryCtxReset_v2"; +static const char __pyx_k_cuEGLStreamConsumerConnect[] = "__cuEGLStreamConsumerConnect"; +static const char __pyx_k_cuEGLStreamProducerConnect[] = "__cuEGLStreamProducerConnect"; +static const char __pyx_k_cuFlushGPUDirectRDMAWrites[] = "__cuFlushGPUDirectRDMAWrites"; +static const char __pyx_k_cuGraphMemcpyNodeGetParams[] = "__cuGraphMemcpyNodeGetParams"; +static const char __pyx_k_cuGraphMemcpyNodeSetParams[] = "__cuGraphMemcpyNodeSetParams"; +static const char __pyx_k_cuGraphMemsetNodeGetParams[] = "__cuGraphMemsetNodeGetParams"; +static const char __pyx_k_cuGraphMemsetNodeSetParams[] = "__cuGraphMemsetNodeSetParams"; +static const char __pyx_k_cuGraphNodeGetDependencies[] = "__cuGraphNodeGetDependencies"; +static const char __pyx_k_cuGraphicsEGLRegisterImage[] = "__cuGraphicsEGLRegisterImage"; +static const char __pyx_k_cuGraphicsGLRegisterBuffer[] = "__cuGraphicsGLRegisterBuffer"; +static const char __pyx_k_cuModuleEnumerateFunctions[] = "__cuModuleEnumerateFunctions"; +static const char __pyx_k_cuStreamCreateWithPriority[] = "__cuStreamCreateWithPriority"; +static const char __pyx_k_cuTexObjectGetResourceDesc[] = "__cuTexObjectGetResourceDesc"; +static const char __pyx_k_cuTexRefGetMipmapLevelBias[] = "__cuTexRefGetMipmapLevelBias"; +static const char __pyx_k_cuTexRefSetMipmapLevelBias[] = "__cuTexRefSetMipmapLevelBias"; +static const char __pyx_k_Function_cuLaunch_not_found[] = "Function \"cuLaunch\" not found"; +static const char __pyx_k_Function_cuMemMap_not_found[] = "Function \"cuMemMap\" not found"; +static const char __pyx_k_Function_cuMemcpy_not_found[] = "Function \"cuMemcpy\" not found"; +static const char __pyx_k_cuCheckpointProcessGetState[] = "__cuCheckpointProcessGetState"; +static const char __pyx_k_cuCtxGetStreamPriorityRange[] = "__cuCtxGetStreamPriorityRange"; +static const char __pyx_k_cuCtxResetPersistingL2Cache[] = "__cuCtxResetPersistingL2Cache"; +static const char __pyx_k_cuDevSmResourceSplitByCount[] = "__cuDevSmResourceSplitByCount"; +static const char __pyx_k_cuGraphInstantiateWithFlags[] = "__cuGraphInstantiateWithFlags"; +static const char __pyx_k_cuGraphMemFreeNodeGetParams[] = "__cuGraphMemFreeNodeGetParams"; +static const char __pyx_k_cuLibraryGetUnifiedFunction[] = "__cuLibraryGetUnifiedFunction"; +static const char __pyx_k_cuMemRetainAllocationHandle[] = "__cuMemRetainAllocationHandle"; +static const char __pyx_k_cuStreamBeginCaptureToGraph[] = "__cuStreamBeginCaptureToGraph"; +static const char __pyx_k_cuSurfObjectGetResourceDesc[] = "__cuSurfObjectGetResourceDesc"; +static const char __pyx_k_cuTensorMapEncodeIm2colWide[] = "__cuTensorMapEncodeIm2colWide"; +static const char __pyx_k_cuTexRefGetMipmapFilterMode[] = "__cuTexRefGetMipmapFilterMode"; +static const char __pyx_k_cuTexRefGetMipmapLevelClamp[] = "__cuTexRefGetMipmapLevelClamp"; +static const char __pyx_k_cuTexRefSetMipmapFilterMode[] = "__cuTexRefSetMipmapFilterMode"; +static const char __pyx_k_cuTexRefSetMipmapLevelClamp[] = "__cuTexRefSetMipmapLevelClamp"; +static const char __pyx_k_cuArrayGetMemoryRequirements[] = "__cuArrayGetMemoryRequirements"; +static const char __pyx_k_cuCoredumpGetAttributeGlobal[] = "__cuCoredumpGetAttributeGlobal"; +static const char __pyx_k_cuCoredumpSetAttributeGlobal[] = "__cuCoredumpSetAttributeGlobal"; +static const char __pyx_k_cuDeviceGetGraphMemAttribute[] = "__cuDeviceGetGraphMemAttribute"; +static const char __pyx_k_cuDevicePrimaryCtxRelease_v2[] = "__cuDevicePrimaryCtxRelease_v2"; +static const char __pyx_k_cuDeviceSetGraphMemAttribute[] = "__cuDeviceSetGraphMemAttribute"; +static const char __pyx_k_cuGraphEventWaitNodeGetEvent[] = "__cuGraphEventWaitNodeGetEvent"; +static const char __pyx_k_cuGraphEventWaitNodeSetEvent[] = "__cuGraphEventWaitNodeSetEvent"; +static const char __pyx_k_cuGraphExecHostNodeSetParams[] = "__cuGraphExecHostNodeSetParams"; +static const char __pyx_k_cuGraphInstantiateWithParams[] = "__cuGraphInstantiateWithParams"; +static const char __pyx_k_cuGraphMemAllocNodeGetParams[] = "__cuGraphMemAllocNodeGetParams"; +static const char __pyx_k_cuGraphNodeGetDependentNodes[] = "__cuGraphNodeGetDependentNodes"; +static const char __pyx_k_cuGraphRemoveDependencies_v2[] = "__cuGraphRemoveDependencies_v2"; +static const char __pyx_k_cuGraphicsUnregisterResource[] = "__cuGraphicsUnregisterResource"; +static const char __pyx_k_cuMemExportToShareableHandle[] = "__cuMemExportToShareableHandle"; +static const char __pyx_k_cuMemHostGetDevicePointer_v2[] = "__cuMemHostGetDevicePointer_v2"; +static const char __pyx_k_cuOccupancyMaxActiveClusters[] = "__cuOccupancyMaxActiveClusters"; +static const char __pyx_k_Function_cuCtxGetId_not_found[] = "Function \"cuCtxGetId\" not found"; +static const char __pyx_k_Function_cuFuncLoad_not_found[] = "Function \"cuFuncLoad\" not found"; +static const char __pyx_k_Function_cuMemUnmap_not_found[] = "Function \"cuMemUnmap\" not found"; +static const char __pyx_k_cuCheckpointProcessCheckpoint[] = "__cuCheckpointProcessCheckpoint"; +static const char __pyx_k_cuDevicePrimaryCtxSetFlags_v2[] = "__cuDevicePrimaryCtxSetFlags_v2"; +static const char __pyx_k_cuEGLStreamConsumerDisconnect[] = "__cuEGLStreamConsumerDisconnect"; +static const char __pyx_k_cuEGLStreamProducerDisconnect[] = "__cuEGLStreamProducerDisconnect"; +static const char __pyx_k_cuGraphChildGraphNodeGetGraph[] = "__cuGraphChildGraphNodeGetGraph"; +static const char __pyx_k_cuGraphKernelNodeGetAttribute[] = "__cuGraphKernelNodeGetAttribute"; +static const char __pyx_k_cuGraphKernelNodeGetParams_v2[] = "__cuGraphKernelNodeGetParams_v2"; +static const char __pyx_k_cuGraphKernelNodeSetAttribute[] = "__cuGraphKernelNodeSetAttribute"; +static const char __pyx_k_cuGraphKernelNodeSetParams_v2[] = "__cuGraphKernelNodeSetParams_v2"; +static const char __pyx_k_cuGraphNodeGetDependencies_v2[] = "__cuGraphNodeGetDependencies_v2"; +static const char __pyx_k_cuGraphicsResourceSetMapFlags[] = "__cuGraphicsResourceSetMapFlags_v2"; +static const char __pyx_k_cuMemGetAllocationGranularity[] = "__cuMemGetAllocationGranularity"; +static const char __pyx_k_cuMemGetHandleForAddressRange[] = "__cuMemGetHandleForAddressRange"; +static const char __pyx_k_cuWaitExternalSemaphoresAsync[] = "__cuWaitExternalSemaphoresAsync"; +static const char __pyx_k_Function_cuCtxAttach_not_found[] = "Function \"cuCtxAttach\" not found"; +static const char __pyx_k_Function_cuCtxDetach_not_found[] = "Function \"cuCtxDetach\" not found"; +static const char __pyx_k_Function_cuDeviceGet_not_found[] = "Function \"cuDeviceGet\" not found"; +static const char __pyx_k_Function_cuMemAdvise_not_found[] = "Function \"cuMemAdvise\" not found"; +static const char __pyx_k_Function_cuMemCreate_not_found[] = "Function \"cuMemCreate\" not found"; +static const char __pyx_k_Function_cuParamSetf_not_found[] = "Function \"cuParamSetf\" not found"; +static const char __pyx_k_Function_cuParamSeti_not_found[] = "Function \"cuParamSeti\" not found"; +static const char __pyx_k_Function_cuParamSetv_not_found[] = "Function \"cuParamSetv\" not found"; +static const char __pyx_k_cuCheckpointProcessGetRestoreT[] = "__cuCheckpointProcessGetRestoreThreadId"; +static const char __pyx_k_cuDeviceGetExecAffinitySupport[] = "__cuDeviceGetExecAffinitySupport"; +static const char __pyx_k_cuDeviceGetNvSciSyncAttributes[] = "__cuDeviceGetNvSciSyncAttributes"; +static const char __pyx_k_cuDeviceGetTexture1DLinearMaxW[] = "__cuDeviceGetTexture1DLinearMaxWidth"; +static const char __pyx_k_cuDeviceRegisterAsyncNotificat[] = "__cuDeviceRegisterAsyncNotification"; +static const char __pyx_k_cuDeviceUnregisterAsyncNotific[] = "__cuDeviceUnregisterAsyncNotification"; +static const char __pyx_k_cuEGLStreamConsumerAcquireFram[] = "__cuEGLStreamConsumerAcquireFrame"; +static const char __pyx_k_cuEGLStreamConsumerConnectWith[] = "__cuEGLStreamConsumerConnectWithFlags"; +static const char __pyx_k_cuEGLStreamConsumerReleaseFram[] = "__cuEGLStreamConsumerReleaseFrame"; +static const char __pyx_k_cuEGLStreamProducerPresentFram[] = "__cuEGLStreamProducerPresentFrame"; +static const char __pyx_k_cuEGLStreamProducerReturnFrame[] = "__cuEGLStreamProducerReturnFrame"; +static const char __pyx_k_cuExternalMemoryGetMappedBuffe[] = "__cuExternalMemoryGetMappedBuffer"; +static const char __pyx_k_cuExternalMemoryGetMappedMipma[] = "__cuExternalMemoryGetMappedMipmappedArray"; +static const char __pyx_k_cuGraphAddExternalSemaphoresSi[] = "__cuGraphAddExternalSemaphoresSignalNode"; +static const char __pyx_k_cuGraphAddExternalSemaphoresWa[] = "__cuGraphAddExternalSemaphoresWaitNode"; +static const char __pyx_k_cuGraphBatchMemOpNodeGetParams[] = "__cuGraphBatchMemOpNodeGetParams"; +static const char __pyx_k_cuGraphBatchMemOpNodeSetParams[] = "__cuGraphBatchMemOpNodeSetParams"; +static const char __pyx_k_cuGraphConditionalHandleCreate[] = "__cuGraphConditionalHandleCreate"; +static const char __pyx_k_cuGraphEventRecordNodeGetEvent[] = "__cuGraphEventRecordNodeGetEvent"; +static const char __pyx_k_cuGraphEventRecordNodeSetEvent[] = "__cuGraphEventRecordNodeSetEvent"; +static const char __pyx_k_cuGraphExecBatchMemOpNodeSetPa[] = "__cuGraphExecBatchMemOpNodeSetParams"; +static const char __pyx_k_cuGraphExecChildGraphNodeSetPa[] = "__cuGraphExecChildGraphNodeSetParams"; +static const char __pyx_k_cuGraphExecEventRecordNodeSetE[] = "__cuGraphExecEventRecordNodeSetEvent"; +static const char __pyx_k_cuGraphExecEventWaitNodeSetEve[] = "__cuGraphExecEventWaitNodeSetEvent"; +static const char __pyx_k_cuGraphExecExternalSemaphoresS[] = "__cuGraphExecExternalSemaphoresSignalNodeSetParams"; +static const char __pyx_k_cuGraphExecExternalSemaphoresW[] = "__cuGraphExecExternalSemaphoresWaitNodeSetParams"; +static const char __pyx_k_cuGraphExecKernelNodeSetParams[] = "__cuGraphExecKernelNodeSetParams_v2"; +static const char __pyx_k_cuGraphExecMemcpyNodeSetParams[] = "__cuGraphExecMemcpyNodeSetParams"; +static const char __pyx_k_cuGraphExecMemsetNodeSetParams[] = "__cuGraphExecMemsetNodeSetParams"; +static const char __pyx_k_cuGraphExternalSemaphoresSigna[] = "__cuGraphExternalSemaphoresSignalNodeGetParams"; +static const char __pyx_k_cuGraphExternalSemaphoresWaitN[] = "__cuGraphExternalSemaphoresWaitNodeGetParams"; +static const char __pyx_k_cuGraphKernelNodeCopyAttribute[] = "__cuGraphKernelNodeCopyAttributes"; +static const char __pyx_k_cuGraphNodeGetDependentNodes_v[] = "__cuGraphNodeGetDependentNodes_v2"; +static const char __pyx_k_cuGraphicsResourceGetMappedEgl[] = "__cuGraphicsResourceGetMappedEglFrame"; +static const char __pyx_k_cuGraphicsResourceGetMappedMip[] = "__cuGraphicsResourceGetMappedMipmappedArray"; +static const char __pyx_k_cuGraphicsResourceGetMappedPoi[] = "__cuGraphicsResourceGetMappedPointer_v2"; +static const char __pyx_k_cuGraphicsSubResourceGetMapped[] = "__cuGraphicsSubResourceGetMappedArray"; +static const char __pyx_k_cuGraphicsVDPAURegisterOutputS[] = "__cuGraphicsVDPAURegisterOutputSurface"; +static const char __pyx_k_cuGraphicsVDPAURegisterVideoSu[] = "__cuGraphicsVDPAURegisterVideoSurface"; +static const char __pyx_k_cuLaunchCooperativeKernelMulti[] = "__cuLaunchCooperativeKernelMultiDevice"; +static const char __pyx_k_cuMemGetAllocationPropertiesFr[] = "__cuMemGetAllocationPropertiesFromHandle"; +static const char __pyx_k_cuMemImportFromShareableHandle[] = "__cuMemImportFromShareableHandle"; +static const char __pyx_k_cuMemPoolExportToShareableHand[] = "__cuMemPoolExportToShareableHandle"; +static const char __pyx_k_cuMemPoolImportFromShareableHa[] = "__cuMemPoolImportFromShareableHandle"; +static const char __pyx_k_cuMipmappedArrayGetMemoryRequi[] = "__cuMipmappedArrayGetMemoryRequirements"; +static const char __pyx_k_cuMipmappedArrayGetSparsePrope[] = "__cuMipmappedArrayGetSparseProperties"; +static const char __pyx_k_cuOccupancyAvailableDynamicSMe[] = "__cuOccupancyAvailableDynamicSMemPerBlock"; +static const char __pyx_k_cuOccupancyMaxActiveBlocksPerM[] = "__cuOccupancyMaxActiveBlocksPerMultiprocessor"; +static const char __pyx_k_cuOccupancyMaxPotentialBlockSi[] = "__cuOccupancyMaxPotentialBlockSize"; +static const char __pyx_k_cuOccupancyMaxPotentialCluster[] = "__cuOccupancyMaxPotentialClusterSize"; +static const char __pyx_k_cuSignalExternalSemaphoresAsyn[] = "__cuSignalExternalSemaphoresAsync"; +static const char __pyx_k_cuStreamUpdateCaptureDependenc[] = "__cuStreamUpdateCaptureDependencies"; +static const char __pyx_k_cuTexObjectGetResourceViewDesc[] = "__cuTexObjectGetResourceViewDesc"; +static const char __pyx_k_cuThreadExchangeStreamCaptureM[] = "__cuThreadExchangeStreamCaptureMode"; +static const char __pyx_k_z_q_Q_1_z_z_Q_Ja_1_Q_Ja_3_Q_Zq[] = "\200\001\330\004\005\330\004\007\200z\220\027\230\001\330\010\017\210q\340\004\020\220\001\330\004\025\220Q\340\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\210\036\220z\240\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\036\230j\250\001""\330\004\005\330\004\010\210\001\320\t\033\230:\240Q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t*\250*\260A\330""\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t2\260*\270A\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t\031\230\032\2401\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t ""\240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t6\260j\300\001\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\037\230z\250""\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t\031\230\032\2401\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\033\230:\240Q\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t7\260z\300\021\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t1\260\032\2701\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330""\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t2\260*\270A\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t2\260*\270A\330\004\005\330\004\010\210\001\320\t5\260Z\270q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330""\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t8\270\n\300!\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\033\230:\240Q\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t5\260Z\270q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\031\230\032\2401\330\004\005\330\004\010""\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t7\260z\300\021\330\004\005\330\004\010\210\001\320\t=\270Z\300q\330\004\005\330\004\010\210\001\320\t=\270Z\300q\330\004\005\330\004\010\210\001\320\t5\260Z\270q\330\004\005\330\004\010\210\001\320\t;\270:\300Q\330\004\005\330\004\010\210\001\320\t;\270:\300Q\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t,\250J\260a""\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t2\260*\270A\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t1\260\032\2701\330\004\005\330\004\010\210\001\320\tA\300\032\3101\330\004\005\330\004\010\210\001\320\t?\270z\310\021\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001""\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t%\240Z\250q\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t<\270J\300a\330\004\005\330\004\010\210\001\320\tE\300Z\310q\330\004\005\330\004\010\210\001\320\t1\260\032\2701\330\004\005\330\004\010\210\001\320\t:\270*\300A\330\004\005\330\004\010\210\001\320\t8\270\n\300!\330\004\005\330\004\010\210\001\320\t3\260:\270Q\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004""\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t:\270*\300A\330\004\005\330\004\010\210\001\320\t6\260j\300\001\330\004\005\330\004\010\210\001\320\t1\260\032\2701\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t-\250Z\260q\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320""\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t&\240j\260\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t6\260j\300\001\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\037\230z\250\021\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t.\250j\270\001\330\004\005\330\004\010\210\001\320\t0\260\n\270!\330\004\005\330\004\010\210\001\320\t/\250z\270\021\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t)\250\032\2601\330\004\005\330\004\010\210\001\320\t+\250:\260Q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005""\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t4\260J\270a\330\004\005\330\004\010\210\001\320\t5\260Z\270q\340\004\020\220\001\330\004\013\2101"; +static const char __pyx_k_Function_cuArray3DCreate_v2_not[] = "Function \"cuArray3DCreate_v2\" not found"; +static const char __pyx_k_Function_cuArray3DGetDescriptor[] = "Function \"cuArray3DGetDescriptor_v2\" not found"; +static const char __pyx_k_Function_cuCoredumpGetAttribute[] = "Function \"cuCoredumpGetAttribute\" not found"; +static const char __pyx_k_Function_cuCoredumpSetAttribute[] = "Function \"cuCoredumpSetAttribute\" not found"; +static const char __pyx_k_Function_cuCtxDisablePeerAccess[] = "Function \"cuCtxDisablePeerAccess\" not found"; +static const char __pyx_k_Function_cuCtxGetApiVersion_not[] = "Function \"cuCtxGetApiVersion\" not found"; +static const char __pyx_k_Function_cuCtxPopCurrent_v2_not[] = "Function \"cuCtxPopCurrent_v2\" not found"; +static const char __pyx_k_Function_cuDeviceGetDevResource[] = "Function \"cuDeviceGetDevResource\" not found"; +static const char __pyx_k_Function_cuDeviceGetMemPool_not[] = "Function \"cuDeviceGetMemPool\" not found"; +static const char __pyx_k_Function_cuDeviceGetUuid_v2_not[] = "Function \"cuDeviceGetUuid_v2\" not found"; +static const char __pyx_k_Function_cuDeviceSetMemPool_not[] = "Function \"cuDeviceSetMemPool\" not found"; +static const char __pyx_k_Function_cuDriverGetVersion_not[] = "Function \"cuDriverGetVersion\" not found"; +static const char __pyx_k_Function_cuEventElapsedTime_not[] = "Function \"cuEventElapsedTime\" not found"; +static const char __pyx_k_Function_cuEventQuery_not_found[] = "Function \"cuEventQuery\" not found"; +static const char __pyx_k_Function_cuEventRecordWithFlags[] = "Function \"cuEventRecordWithFlags\" not found"; +static const char __pyx_k_Function_cuEventSynchronize_not[] = "Function \"cuEventSynchronize\" not found"; +static const char __pyx_k_Function_cuFuncGetAttribute_not[] = "Function \"cuFuncGetAttribute\" not found"; +static const char __pyx_k_Function_cuFuncGetParamInfo_not[] = "Function \"cuFuncGetParamInfo\" not found"; +static const char __pyx_k_Function_cuFuncSetAttribute_not[] = "Function \"cuFuncSetAttribute\" not found"; +static const char __pyx_k_Function_cuGraphAddDependencies[] = "Function \"cuGraphAddDependencies\" not found"; +static const char __pyx_k_Function_cuGraphAddHostNode_not[] = "Function \"cuGraphAddHostNode\" not found"; +static const char __pyx_k_Function_cuGraphAddMemAllocNode[] = "Function \"cuGraphAddMemAllocNode\" not found"; +static const char __pyx_k_Function_cuGraphClone_not_found[] = "Function \"cuGraphClone\" not found"; +static const char __pyx_k_Function_cuGraphDestroyNode_not[] = "Function \"cuGraphDestroyNode\" not found"; +static const char __pyx_k_Function_cuGraphExecDestroy_not[] = "Function \"cuGraphExecDestroy\" not found"; +static const char __pyx_k_Function_cuGraphGetEdges_v2_not[] = "Function \"cuGraphGetEdges_v2\" not found"; +static const char __pyx_k_Function_cuGraphNodeFindInClone[] = "Function \"cuGraphNodeFindInClone\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetType_not[] = "Function \"cuGraphNodeGetType\" not found"; +static const char __pyx_k_Function_cuGraphicsMapResources[] = "Function \"cuGraphicsMapResources\" not found"; +static const char __pyx_k_Function_cuGreenCtxStreamCreate[] = "Function \"cuGreenCtxStreamCreate\" not found"; +static const char __pyx_k_Function_cuImportExternalMemory[] = "Function \"cuImportExternalMemory\" not found"; +static const char __pyx_k_Function_cuKernelGetLibrary_not[] = "Function \"cuKernelGetLibrary\" not found"; +static const char __pyx_k_Function_cuKernelSetCacheConfig[] = "Function \"cuKernelSetCacheConfig\" not found"; +static const char __pyx_k_Function_cuLaunchGrid_not_found[] = "Function \"cuLaunchGrid\" not found"; +static const char __pyx_k_Function_cuLibraryGetGlobal_not[] = "Function \"cuLibraryGetGlobal\" not found"; +static const char __pyx_k_Function_cuLibraryGetKernel_not[] = "Function \"cuLibraryGetKernel\" not found"; +static const char __pyx_k_Function_cuLibraryGetModule_not[] = "Function \"cuLibraryGetModule\" not found"; +static const char __pyx_k_Function_cuLogsDumpToMemory_not[] = "Function \"cuLogsDumpToMemory\" not found"; +static const char __pyx_k_Function_cuLogsRegisterCallback[] = "Function \"cuLogsRegisterCallback\" not found"; +static const char __pyx_k_Function_cuMemAllocPitch_v2_not[] = "Function \"cuMemAllocPitch_v2\" not found"; +static const char __pyx_k_Function_cuMemFree_v2_not_found[] = "Function \"cuMemFree_v2\" not found"; +static const char __pyx_k_Function_cuMemMapArrayAsync_not[] = "Function \"cuMemMapArrayAsync\" not found"; +static const char __pyx_k_Function_cuMemPoolExportPointer[] = "Function \"cuMemPoolExportPointer\" not found"; +static const char __pyx_k_Function_cuMemPoolGetAccess_not[] = "Function \"cuMemPoolGetAccess\" not found"; +static const char __pyx_k_Function_cuMemPoolImportPointer[] = "Function \"cuMemPoolImportPointer\" not found"; +static const char __pyx_k_Function_cuMemPoolSetAccess_not[] = "Function \"cuMemPoolSetAccess\" not found"; +static const char __pyx_k_Function_cuMemPrefetchAsync_not[] = "Function \"cuMemPrefetchAsync\" not found"; +static const char __pyx_k_Function_cuMemRangeGetAttribute[] = "Function \"cuMemRangeGetAttribute\" not found"; +static const char __pyx_k_Function_cuMemRelease_not_found[] = "Function \"cuMemRelease\" not found"; +static const char __pyx_k_Function_cuMemcpy2DAsync_v2_not[] = "Function \"cuMemcpy2DAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpy2DUnaligned_v2[] = "Function \"cuMemcpy2DUnaligned_v2\" not found"; +static const char __pyx_k_Function_cuMemcpy3DAsync_v2_not[] = "Function \"cuMemcpy3DAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyBatchAsync_not[] = "Function \"cuMemcpyBatchAsync\" not found"; +static const char __pyx_k_Function_cuMemcpyPeer_not_found[] = "Function \"cuMemcpyPeer\" not found"; +static const char __pyx_k_Function_cuMemsetD2D16Async_not[] = "Function \"cuMemsetD2D16Async\" not found"; +static const char __pyx_k_Function_cuMemsetD2D32Async_not[] = "Function \"cuMemsetD2D32Async\" not found"; +static const char __pyx_k_Function_cuMipmappedArrayCreate[] = "Function \"cuMipmappedArrayCreate\" not found"; +static const char __pyx_k_Function_cuModuleGetLoadingMode[] = "Function \"cuModuleGetLoadingMode\" not found"; +static const char __pyx_k_Function_cuModuleGetSurfRef_not[] = "Function \"cuModuleGetSurfRef\" not found"; +static const char __pyx_k_Function_cuModuleLoadDataEx_not[] = "Function \"cuModuleLoadDataEx\" not found"; +static const char __pyx_k_Function_cuModuleLoad_not_found[] = "Function \"cuModuleLoad\" not found"; +static const char __pyx_k_Function_cuMulticastBindMem_not[] = "Function \"cuMulticastBindMem\" not found"; +static const char __pyx_k_Function_cuPointerGetAttributes[] = "Function \"cuPointerGetAttributes\" not found"; +static const char __pyx_k_Function_cuStreamAttachMemAsync[] = "Function \"cuStreamAttachMemAsync\" not found"; +static const char __pyx_k_Function_cuStreamCopyAttributes[] = "Function \"cuStreamCopyAttributes\" not found"; +static const char __pyx_k_Function_cuStreamDestroy_v2_not[] = "Function \"cuStreamDestroy_v2\" not found"; +static const char __pyx_k_Function_cuStreamEndCapture_not[] = "Function \"cuStreamEndCapture\" not found"; +static const char __pyx_k_Function_cuStreamGetCaptureInfo[] = "Function \"cuStreamGetCaptureInfo_v2\" not found"; +static const char __pyx_k_Function_cuStreamWaitValue32_v2[] = "Function \"cuStreamWaitValue32_v2\" not found"; +static const char __pyx_k_Function_cuStreamWaitValue64_v2[] = "Function \"cuStreamWaitValue64_v2\" not found"; +static const char __pyx_k_Function_cuSurfObjectCreate_not[] = "Function \"cuSurfObjectCreate\" not found"; +static const char __pyx_k_Function_cuTensorMapEncodeTiled[] = "Function \"cuTensorMapEncodeTiled\" not found"; +static const char __pyx_k_Function_cuTexObjectDestroy_not[] = "Function \"cuTexObjectDestroy\" not found"; +static const char __pyx_k_Function_cuTexRefGetAddressMode[] = "Function \"cuTexRefGetAddressMode\" not found"; +static const char __pyx_k_Function_cuTexRefGetBorderColor[] = "Function \"cuTexRefGetBorderColor\" not found"; +static const char __pyx_k_Function_cuTexRefSetAddressMode[] = "Function \"cuTexRefSetAddressMode\" not found"; +static const char __pyx_k_Function_cuTexRefSetBorderColor[] = "Function \"cuTexRefSetBorderColor\" not found"; +static const char __pyx_k_Function_cuUserObjectCreate_not[] = "Function \"cuUserObjectCreate\" not found"; +static const char __pyx_k_Function_cuUserObjectRetain_not[] = "Function \"cuUserObjectRetain\" not found"; +static const char __pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA[] = "CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM"; +static const char __pyx_k_Function_cuArrayCreate_v2_not_fo[] = "Function \"cuArrayCreate_v2\" not found"; +static const char __pyx_k_Function_cuArrayDestroy_not_foun[] = "Function \"cuArrayDestroy\" not found"; +static const char __pyx_k_Function_cuArrayGetDescriptor_v2[] = "Function \"cuArrayGetDescriptor_v2\" not found"; +static const char __pyx_k_Function_cuArrayGetMemoryRequire[] = "Function \"cuArrayGetMemoryRequirements\" not found"; +static const char __pyx_k_Function_cuArrayGetPlane_not_fou[] = "Function \"cuArrayGetPlane\" not found"; +static const char __pyx_k_Function_cuArrayGetSparsePropert[] = "Function \"cuArrayGetSparseProperties\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessChec[] = "Function \"cuCheckpointProcessCheckpoint\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessGetR[] = "Function \"cuCheckpointProcessGetRestoreThreadId\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessGetS[] = "Function \"cuCheckpointProcessGetState\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessLock[] = "Function \"cuCheckpointProcessLock\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessRest[] = "Function \"cuCheckpointProcessRestore\" not found"; +static const char __pyx_k_Function_cuCheckpointProcessUnlo[] = "Function \"cuCheckpointProcessUnlock\" not found"; +static const char __pyx_k_Function_cuCoredumpGetAttributeG[] = "Function \"cuCoredumpGetAttributeGlobal\" not found"; +static const char __pyx_k_Function_cuCoredumpSetAttributeG[] = "Function \"cuCoredumpSetAttributeGlobal\" not found"; +static const char __pyx_k_Function_cuCtxCreate_v2_not_foun[] = "Function \"cuCtxCreate_v2\" not found"; +static const char __pyx_k_Function_cuCtxCreate_v3_not_foun[] = "Function \"cuCtxCreate_v3\" not found"; +static const char __pyx_k_Function_cuCtxCreate_v4_not_foun[] = "Function \"cuCtxCreate_v4\" not found"; +static const char __pyx_k_Function_cuCtxDestroy_v2_not_fou[] = "Function \"cuCtxDestroy_v2\" not found"; +static const char __pyx_k_Function_cuCtxEnablePeerAccess_n[] = "Function \"cuCtxEnablePeerAccess\" not found"; +static const char __pyx_k_Function_cuCtxFromGreenCtx_not_f[] = "Function \"cuCtxFromGreenCtx\" not found"; +static const char __pyx_k_Function_cuCtxGetCacheConfig_not[] = "Function \"cuCtxGetCacheConfig\" not found"; +static const char __pyx_k_Function_cuCtxGetCurrent_not_fou[] = "Function \"cuCtxGetCurrent\" not found"; +static const char __pyx_k_Function_cuCtxGetDevResource_not[] = "Function \"cuCtxGetDevResource\" not found"; +static const char __pyx_k_Function_cuCtxGetDevice_not_foun[] = "Function \"cuCtxGetDevice\" not found"; +static const char __pyx_k_Function_cuCtxGetExecAffinity_no[] = "Function \"cuCtxGetExecAffinity\" not found"; +static const char __pyx_k_Function_cuCtxGetFlags_not_found[] = "Function \"cuCtxGetFlags\" not found"; +static const char __pyx_k_Function_cuCtxGetLimit_not_found[] = "Function \"cuCtxGetLimit\" not found"; +static const char __pyx_k_Function_cuCtxGetSharedMemConfig[] = "Function \"cuCtxGetSharedMemConfig\" not found"; +static const char __pyx_k_Function_cuCtxGetStreamPriorityR[] = "Function \"cuCtxGetStreamPriorityRange\" not found"; +static const char __pyx_k_Function_cuCtxPushCurrent_v2_not[] = "Function \"cuCtxPushCurrent_v2\" not found"; +static const char __pyx_k_Function_cuCtxRecordEvent_not_fo[] = "Function \"cuCtxRecordEvent\" not found"; +static const char __pyx_k_Function_cuCtxResetPersistingL2C[] = "Function \"cuCtxResetPersistingL2Cache\" not found"; +static const char __pyx_k_Function_cuCtxSetCacheConfig_not[] = "Function \"cuCtxSetCacheConfig\" not found"; +static const char __pyx_k_Function_cuCtxSetCurrent_not_fou[] = "Function \"cuCtxSetCurrent\" not found"; +static const char __pyx_k_Function_cuCtxSetFlags_not_found[] = "Function \"cuCtxSetFlags\" not found"; +static const char __pyx_k_Function_cuCtxSetLimit_not_found[] = "Function \"cuCtxSetLimit\" not found"; +static const char __pyx_k_Function_cuCtxSetSharedMemConfig[] = "Function \"cuCtxSetSharedMemConfig\" not found"; +static const char __pyx_k_Function_cuCtxSynchronize_not_fo[] = "Function \"cuCtxSynchronize\" not found"; +static const char __pyx_k_Function_cuCtxWaitEvent_not_foun[] = "Function \"cuCtxWaitEvent\" not found"; +static const char __pyx_k_Function_cuDestroyExternalMemory[] = "Function \"cuDestroyExternalMemory\" not found"; +static const char __pyx_k_Function_cuDestroyExternalSemaph[] = "Function \"cuDestroyExternalSemaphore\" not found"; +static const char __pyx_k_Function_cuDevResourceGenerateDe[] = "Function \"cuDevResourceGenerateDesc\" not found"; +static const char __pyx_k_Function_cuDevSmResourceSplitByC[] = "Function \"cuDevSmResourceSplitByCount\" not found"; +static const char __pyx_k_Function_cuDeviceCanAccessPeer_n[] = "Function \"cuDeviceCanAccessPeer\" not found"; +static const char __pyx_k_Function_cuDeviceComputeCapabili[] = "Function \"cuDeviceComputeCapability\" not found"; +static const char __pyx_k_Function_cuDeviceGetAttribute_no[] = "Function \"cuDeviceGetAttribute\" not found"; +static const char __pyx_k_Function_cuDeviceGetByPCIBusId_n[] = "Function \"cuDeviceGetByPCIBusId\" not found"; +static const char __pyx_k_Function_cuDeviceGetCount_not_fo[] = "Function \"cuDeviceGetCount\" not found"; +static const char __pyx_k_Function_cuDeviceGetDefaultMemPo[] = "Function \"cuDeviceGetDefaultMemPool\" not found"; +static const char __pyx_k_Function_cuDeviceGetExecAffinity[] = "Function \"cuDeviceGetExecAffinitySupport\" not found"; +static const char __pyx_k_Function_cuDeviceGetGraphMemAttr[] = "Function \"cuDeviceGetGraphMemAttribute\" not found"; +static const char __pyx_k_Function_cuDeviceGetLuid_not_fou[] = "Function \"cuDeviceGetLuid\" not found"; +static const char __pyx_k_Function_cuDeviceGetName_not_fou[] = "Function \"cuDeviceGetName\" not found"; +static const char __pyx_k_Function_cuDeviceGetNvSciSyncAtt[] = "Function \"cuDeviceGetNvSciSyncAttributes\" not found"; +static const char __pyx_k_Function_cuDeviceGetP2PAttribute[] = "Function \"cuDeviceGetP2PAttribute\" not found"; +static const char __pyx_k_Function_cuDeviceGetPCIBusId_not[] = "Function \"cuDeviceGetPCIBusId\" not found"; +static const char __pyx_k_Function_cuDeviceGetProperties_n[] = "Function \"cuDeviceGetProperties\" not found"; +static const char __pyx_k_Function_cuDeviceGetTexture1DLin[] = "Function \"cuDeviceGetTexture1DLinearMaxWidth\" not found"; +static const char __pyx_k_Function_cuDeviceGetUuid_not_fou[] = "Function \"cuDeviceGetUuid\" not found"; +static const char __pyx_k_Function_cuDeviceGraphMemTrim_no[] = "Function \"cuDeviceGraphMemTrim\" not found"; +static const char __pyx_k_Function_cuDevicePrimaryCtxGetSt[] = "Function \"cuDevicePrimaryCtxGetState\" not found"; +static const char __pyx_k_Function_cuDevicePrimaryCtxRelea[] = "Function \"cuDevicePrimaryCtxRelease_v2\" not found"; +static const char __pyx_k_Function_cuDevicePrimaryCtxReset[] = "Function \"cuDevicePrimaryCtxReset_v2\" not found"; +static const char __pyx_k_Function_cuDevicePrimaryCtxRetai[] = "Function \"cuDevicePrimaryCtxRetain\" not found"; +static const char __pyx_k_Function_cuDevicePrimaryCtxSetFl[] = "Function \"cuDevicePrimaryCtxSetFlags_v2\" not found"; +static const char __pyx_k_Function_cuDeviceRegisterAsyncNo[] = "Function \"cuDeviceRegisterAsyncNotification\" not found"; +static const char __pyx_k_Function_cuDeviceSetGraphMemAttr[] = "Function \"cuDeviceSetGraphMemAttribute\" not found"; +static const char __pyx_k_Function_cuDeviceTotalMem_v2_not[] = "Function \"cuDeviceTotalMem_v2\" not found"; +static const char __pyx_k_Function_cuDeviceUnregisterAsync[] = "Function \"cuDeviceUnregisterAsyncNotification\" not found"; +static const char __pyx_k_Function_cuEGLStreamConsumerAcqu[] = "Function \"cuEGLStreamConsumerAcquireFrame\" not found"; +static const char __pyx_k_Function_cuEGLStreamConsumerConn[] = "Function \"cuEGLStreamConsumerConnect\" not found"; +static const char __pyx_k_Function_cuEGLStreamConsumerDisc[] = "Function \"cuEGLStreamConsumerDisconnect\" not found"; +static const char __pyx_k_Function_cuEGLStreamConsumerRele[] = "Function \"cuEGLStreamConsumerReleaseFrame\" not found"; +static const char __pyx_k_Function_cuEGLStreamProducerConn[] = "Function \"cuEGLStreamProducerConnect\" not found"; +static const char __pyx_k_Function_cuEGLStreamProducerDisc[] = "Function \"cuEGLStreamProducerDisconnect\" not found"; +static const char __pyx_k_Function_cuEGLStreamProducerPres[] = "Function \"cuEGLStreamProducerPresentFrame\" not found"; +static const char __pyx_k_Function_cuEGLStreamProducerRetu[] = "Function \"cuEGLStreamProducerReturnFrame\" not found"; +static const char __pyx_k_Function_cuEventCreateFromEGLSyn[] = "Function \"cuEventCreateFromEGLSync\" not found"; +static const char __pyx_k_Function_cuEventCreate_not_found[] = "Function \"cuEventCreate\" not found"; +static const char __pyx_k_Function_cuEventDestroy_v2_not_f[] = "Function \"cuEventDestroy_v2\" not found"; +static const char __pyx_k_Function_cuEventElapsedTime_v2_n[] = "Function \"cuEventElapsedTime_v2\" not found"; +static const char __pyx_k_Function_cuEventRecord_not_found[] = "Function \"cuEventRecord\" not found"; +static const char __pyx_k_Function_cuExternalMemoryGetMapp[] = "Function \"cuExternalMemoryGetMappedBuffer\" not found"; +static const char __pyx_k_Function_cuFlushGPUDirectRDMAWri[] = "Function \"cuFlushGPUDirectRDMAWrites\" not found"; +static const char __pyx_k_Function_cuFuncGetModule_not_fou[] = "Function \"cuFuncGetModule\" not found"; +static const char __pyx_k_Function_cuFuncGetName_not_found[] = "Function \"cuFuncGetName\" not found"; +static const char __pyx_k_Function_cuFuncIsLoaded_not_foun[] = "Function \"cuFuncIsLoaded\" not found"; +static const char __pyx_k_Function_cuFuncSetBlockShape_not[] = "Function \"cuFuncSetBlockShape\" not found"; +static const char __pyx_k_Function_cuFuncSetCacheConfig_no[] = "Function \"cuFuncSetCacheConfig\" not found"; +static const char __pyx_k_Function_cuFuncSetSharedMemConfi[] = "Function \"cuFuncSetSharedMemConfig\" not found"; +static const char __pyx_k_Function_cuFuncSetSharedSize_not[] = "Function \"cuFuncSetSharedSize\" not found"; +static const char __pyx_k_Function_cuGLGetDevices_v2_not_f[] = "Function \"cuGLGetDevices_v2\" not found"; +static const char __pyx_k_Function_cuGetErrorName_not_foun[] = "Function \"cuGetErrorName\" not found"; +static const char __pyx_k_Function_cuGetErrorString_not_fo[] = "Function \"cuGetErrorString\" not found"; +static const char __pyx_k_Function_cuGetExportTable_not_fo[] = "Function \"cuGetExportTable\" not found"; +static const char __pyx_k_Function_cuGetProcAddress_v2_not[] = "Function \"cuGetProcAddress_v2\" not found"; +static const char __pyx_k_Function_cuGraphAddBatchMemOpNod[] = "Function \"cuGraphAddBatchMemOpNode\" not found"; +static const char __pyx_k_Function_cuGraphAddChildGraphNod[] = "Function \"cuGraphAddChildGraphNode\" not found"; +static const char __pyx_k_Function_cuGraphAddEmptyNode_not[] = "Function \"cuGraphAddEmptyNode\" not found"; +static const char __pyx_k_Function_cuGraphAddEventRecordNo[] = "Function \"cuGraphAddEventRecordNode\" not found"; +static const char __pyx_k_Function_cuGraphAddEventWaitNode[] = "Function \"cuGraphAddEventWaitNode\" not found"; +static const char __pyx_k_Function_cuGraphAddExternalSemap[] = "Function \"cuGraphAddExternalSemaphoresSignalNode\" not found"; +static const char __pyx_k_Function_cuGraphAddKernelNode_v2[] = "Function \"cuGraphAddKernelNode_v2\" not found"; +static const char __pyx_k_Function_cuGraphAddMemFreeNode_n[] = "Function \"cuGraphAddMemFreeNode\" not found"; +static const char __pyx_k_Function_cuGraphAddMemcpyNode_no[] = "Function \"cuGraphAddMemcpyNode\" not found"; +static const char __pyx_k_Function_cuGraphAddMemsetNode_no[] = "Function \"cuGraphAddMemsetNode\" not found"; +static const char __pyx_k_Function_cuGraphAddNode_not_foun[] = "Function \"cuGraphAddNode\" not found"; +static const char __pyx_k_Function_cuGraphAddNode_v2_not_f[] = "Function \"cuGraphAddNode_v2\" not found"; +static const char __pyx_k_Function_cuGraphBatchMemOpNodeGe[] = "Function \"cuGraphBatchMemOpNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphBatchMemOpNodeSe[] = "Function \"cuGraphBatchMemOpNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphChildGraphNodeGe[] = "Function \"cuGraphChildGraphNodeGetGraph\" not found"; +static const char __pyx_k_Function_cuGraphConditionalHandl[] = "Function \"cuGraphConditionalHandleCreate\" not found"; +static const char __pyx_k_Function_cuGraphCreate_not_found[] = "Function \"cuGraphCreate\" not found"; +static const char __pyx_k_Function_cuGraphDebugDotPrint_no[] = "Function \"cuGraphDebugDotPrint\" not found"; +static const char __pyx_k_Function_cuGraphDestroy_not_foun[] = "Function \"cuGraphDestroy\" not found"; +static const char __pyx_k_Function_cuGraphEventRecordNodeG[] = "Function \"cuGraphEventRecordNodeGetEvent\" not found"; +static const char __pyx_k_Function_cuGraphEventRecordNodeS[] = "Function \"cuGraphEventRecordNodeSetEvent\" not found"; +static const char __pyx_k_Function_cuGraphEventWaitNodeGet[] = "Function \"cuGraphEventWaitNodeGetEvent\" not found"; +static const char __pyx_k_Function_cuGraphEventWaitNodeSet[] = "Function \"cuGraphEventWaitNodeSetEvent\" not found"; +static const char __pyx_k_Function_cuGraphExecBatchMemOpNo[] = "Function \"cuGraphExecBatchMemOpNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecChildGraphNo[] = "Function \"cuGraphExecChildGraphNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecEventRecordN[] = "Function \"cuGraphExecEventRecordNodeSetEvent\" not found"; +static const char __pyx_k_Function_cuGraphExecEventWaitNod[] = "Function \"cuGraphExecEventWaitNodeSetEvent\" not found"; +static const char __pyx_k_Function_cuGraphExecExternalSema[] = "Function \"cuGraphExecExternalSemaphoresSignalNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecGetFlags_not[] = "Function \"cuGraphExecGetFlags\" not found"; +static const char __pyx_k_Function_cuGraphExecHostNodeSetP[] = "Function \"cuGraphExecHostNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecKernelNodeSe[] = "Function \"cuGraphExecKernelNodeSetParams_v2\" not found"; +static const char __pyx_k_Function_cuGraphExecMemcpyNodeSe[] = "Function \"cuGraphExecMemcpyNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecMemsetNodeSe[] = "Function \"cuGraphExecMemsetNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecNodeSetParam[] = "Function \"cuGraphExecNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExecUpdate_v2_no[] = "Function \"cuGraphExecUpdate_v2\" not found"; +static const char __pyx_k_Function_cuGraphExternalSemaphor[] = "Function \"cuGraphExternalSemaphoresSignalNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphGetEdges_not_fou[] = "Function \"cuGraphGetEdges\" not found"; +static const char __pyx_k_Function_cuGraphGetNodes_not_fou[] = "Function \"cuGraphGetNodes\" not found"; +static const char __pyx_k_Function_cuGraphGetRootNodes_not[] = "Function \"cuGraphGetRootNodes\" not found"; +static const char __pyx_k_Function_cuGraphHostNodeGetParam[] = "Function \"cuGraphHostNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphHostNodeSetParam[] = "Function \"cuGraphHostNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphInstantiateWithF[] = "Function \"cuGraphInstantiateWithFlags\" not found"; +static const char __pyx_k_Function_cuGraphInstantiateWithP[] = "Function \"cuGraphInstantiateWithParams\" not found"; +static const char __pyx_k_Function_cuGraphKernelNodeCopyAt[] = "Function \"cuGraphKernelNodeCopyAttributes\" not found"; +static const char __pyx_k_Function_cuGraphKernelNodeGetAtt[] = "Function \"cuGraphKernelNodeGetAttribute\" not found"; +static const char __pyx_k_Function_cuGraphKernelNodeGetPar[] = "Function \"cuGraphKernelNodeGetParams_v2\" not found"; +static const char __pyx_k_Function_cuGraphKernelNodeSetAtt[] = "Function \"cuGraphKernelNodeSetAttribute\" not found"; +static const char __pyx_k_Function_cuGraphKernelNodeSetPar[] = "Function \"cuGraphKernelNodeSetParams_v2\" not found"; +static const char __pyx_k_Function_cuGraphLaunch_not_found[] = "Function \"cuGraphLaunch\" not found"; +static const char __pyx_k_Function_cuGraphMemAllocNodeGetP[] = "Function \"cuGraphMemAllocNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphMemFreeNodeGetPa[] = "Function \"cuGraphMemFreeNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphMemcpyNodeGetPar[] = "Function \"cuGraphMemcpyNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphMemcpyNodeSetPar[] = "Function \"cuGraphMemcpyNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphMemsetNodeGetPar[] = "Function \"cuGraphMemsetNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphMemsetNodeSetPar[] = "Function \"cuGraphMemsetNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetDependenc[] = "Function \"cuGraphNodeGetDependencies\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetDependent[] = "Function \"cuGraphNodeGetDependentNodes\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetEnabled_n[] = "Function \"cuGraphNodeGetEnabled\" not found"; +static const char __pyx_k_Function_cuGraphNodeSetEnabled_n[] = "Function \"cuGraphNodeSetEnabled\" not found"; +static const char __pyx_k_Function_cuGraphNodeSetParams_no[] = "Function \"cuGraphNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphReleaseUserObjec[] = "Function \"cuGraphReleaseUserObject\" not found"; +static const char __pyx_k_Function_cuGraphRemoveDependenci[] = "Function \"cuGraphRemoveDependencies\" not found"; +static const char __pyx_k_Function_cuGraphRetainUserObject[] = "Function \"cuGraphRetainUserObject\" not found"; +static const char __pyx_k_Function_cuGraphUpload_not_found[] = "Function \"cuGraphUpload\" not found"; +static const char __pyx_k_Function_cuGraphicsEGLRegisterIm[] = "Function \"cuGraphicsEGLRegisterImage\" not found"; +static const char __pyx_k_Function_cuGraphicsGLRegisterBuf[] = "Function \"cuGraphicsGLRegisterBuffer\" not found"; +static const char __pyx_k_Function_cuGraphicsGLRegisterIma[] = "Function \"cuGraphicsGLRegisterImage\" not found"; +static const char __pyx_k_Function_cuGraphicsResourceGetMa[] = "Function \"cuGraphicsResourceGetMappedMipmappedArray\" not found"; +static const char __pyx_k_Function_cuGraphicsResourceSetMa[] = "Function \"cuGraphicsResourceSetMapFlags_v2\" not found"; +static const char __pyx_k_Function_cuGraphicsSubResourceGe[] = "Function \"cuGraphicsSubResourceGetMappedArray\" not found"; +static const char __pyx_k_Function_cuGraphicsUnmapResource[] = "Function \"cuGraphicsUnmapResources\" not found"; +static const char __pyx_k_Function_cuGraphicsUnregisterRes[] = "Function \"cuGraphicsUnregisterResource\" not found"; +static const char __pyx_k_Function_cuGraphicsVDPAURegister[] = "Function \"cuGraphicsVDPAURegisterVideoSurface\" not found"; +static const char __pyx_k_Function_cuGreenCtxCreate_not_fo[] = "Function \"cuGreenCtxCreate\" not found"; +static const char __pyx_k_Function_cuGreenCtxDestroy_not_f[] = "Function \"cuGreenCtxDestroy\" not found"; +static const char __pyx_k_Function_cuGreenCtxGetDevResourc[] = "Function \"cuGreenCtxGetDevResource\" not found"; +static const char __pyx_k_Function_cuGreenCtxRecordEvent_n[] = "Function \"cuGreenCtxRecordEvent\" not found"; +static const char __pyx_k_Function_cuGreenCtxWaitEvent_not[] = "Function \"cuGreenCtxWaitEvent\" not found"; +static const char __pyx_k_Function_cuImportExternalSemapho[] = "Function \"cuImportExternalSemaphore\" not found"; +static const char __pyx_k_Function_cuIpcCloseMemHandle_not[] = "Function \"cuIpcCloseMemHandle\" not found"; +static const char __pyx_k_Function_cuIpcGetEventHandle_not[] = "Function \"cuIpcGetEventHandle\" not found"; +static const char __pyx_k_Function_cuIpcGetMemHandle_not_f[] = "Function \"cuIpcGetMemHandle\" not found"; +static const char __pyx_k_Function_cuIpcOpenEventHandle_no[] = "Function \"cuIpcOpenEventHandle\" not found"; +static const char __pyx_k_Function_cuIpcOpenMemHandle_v2_n[] = "Function \"cuIpcOpenMemHandle_v2\" not found"; +static const char __pyx_k_Function_cuKernelGetAttribute_no[] = "Function \"cuKernelGetAttribute\" not found"; +static const char __pyx_k_Function_cuKernelGetFunction_not[] = "Function \"cuKernelGetFunction\" not found"; +static const char __pyx_k_Function_cuKernelGetName_not_fou[] = "Function \"cuKernelGetName\" not found"; +static const char __pyx_k_Function_cuKernelGetParamInfo_no[] = "Function \"cuKernelGetParamInfo\" not found"; +static const char __pyx_k_Function_cuKernelSetAttribute_no[] = "Function \"cuKernelSetAttribute\" not found"; +static const char __pyx_k_Function_cuLaunchCooperativeKern[] = "Function \"cuLaunchCooperativeKernel\" not found"; +static const char __pyx_k_Function_cuLaunchGridAsync_not_f[] = "Function \"cuLaunchGridAsync\" not found"; +static const char __pyx_k_Function_cuLaunchHostFunc_not_fo[] = "Function \"cuLaunchHostFunc\" not found"; +static const char __pyx_k_Function_cuLaunchKernelEx_not_fo[] = "Function \"cuLaunchKernelEx\" not found"; +static const char __pyx_k_Function_cuLaunchKernel_not_foun[] = "Function \"cuLaunchKernel\" not found"; +static const char __pyx_k_Function_cuLibraryEnumerateKerne[] = "Function \"cuLibraryEnumerateKernels\" not found"; +static const char __pyx_k_Function_cuLibraryGetKernelCount[] = "Function \"cuLibraryGetKernelCount\" not found"; +static const char __pyx_k_Function_cuLibraryGetManaged_not[] = "Function \"cuLibraryGetManaged\" not found"; +static const char __pyx_k_Function_cuLibraryGetUnifiedFunc[] = "Function \"cuLibraryGetUnifiedFunction\" not found"; +static const char __pyx_k_Function_cuLibraryLoadData_not_f[] = "Function \"cuLibraryLoadData\" not found"; +static const char __pyx_k_Function_cuLibraryLoadFromFile_n[] = "Function \"cuLibraryLoadFromFile\" not found"; +static const char __pyx_k_Function_cuLibraryUnload_not_fou[] = "Function \"cuLibraryUnload\" not found"; +static const char __pyx_k_Function_cuLinkAddData_v2_not_fo[] = "Function \"cuLinkAddData_v2\" not found"; +static const char __pyx_k_Function_cuLinkAddFile_v2_not_fo[] = "Function \"cuLinkAddFile_v2\" not found"; +static const char __pyx_k_Function_cuLinkComplete_not_foun[] = "Function \"cuLinkComplete\" not found"; +static const char __pyx_k_Function_cuLinkCreate_v2_not_fou[] = "Function \"cuLinkCreate_v2\" not found"; +static const char __pyx_k_Function_cuLinkDestroy_not_found[] = "Function \"cuLinkDestroy\" not found"; +static const char __pyx_k_Function_cuLogsCurrent_not_found[] = "Function \"cuLogsCurrent\" not found"; +static const char __pyx_k_Function_cuLogsDumpToFile_not_fo[] = "Function \"cuLogsDumpToFile\" not found"; +static const char __pyx_k_Function_cuLogsUnregisterCallbac[] = "Function \"cuLogsUnregisterCallback\" not found"; +static const char __pyx_k_Function_cuMemAddressFree_not_fo[] = "Function \"cuMemAddressFree\" not found"; +static const char __pyx_k_Function_cuMemAddressReserve_not[] = "Function \"cuMemAddressReserve\" not found"; +static const char __pyx_k_Function_cuMemAdvise_v2_not_foun[] = "Function \"cuMemAdvise_v2\" not found"; +static const char __pyx_k_Function_cuMemAllocAsync_not_fou[] = "Function \"cuMemAllocAsync\" not found"; +static const char __pyx_k_Function_cuMemAllocFromPoolAsync[] = "Function \"cuMemAllocFromPoolAsync\" not found"; +static const char __pyx_k_Function_cuMemAllocHost_v2_not_f[] = "Function \"cuMemAllocHost_v2\" not found"; +static const char __pyx_k_Function_cuMemAllocManaged_not_f[] = "Function \"cuMemAllocManaged\" not found"; +static const char __pyx_k_Function_cuMemAlloc_v2_not_found[] = "Function \"cuMemAlloc_v2\" not found"; +static const char __pyx_k_Function_cuMemBatchDecompressAsy[] = "Function \"cuMemBatchDecompressAsync\" not found"; +static const char __pyx_k_Function_cuMemExportToShareableH[] = "Function \"cuMemExportToShareableHandle\" not found"; +static const char __pyx_k_Function_cuMemFreeAsync_not_foun[] = "Function \"cuMemFreeAsync\" not found"; +static const char __pyx_k_Function_cuMemFreeHost_not_found[] = "Function \"cuMemFreeHost\" not found"; +static const char __pyx_k_Function_cuMemGetAccess_not_foun[] = "Function \"cuMemGetAccess\" not found"; +static const char __pyx_k_Function_cuMemGetAddressRange_v2[] = "Function \"cuMemGetAddressRange_v2\" not found"; +static const char __pyx_k_Function_cuMemGetAllocationGranu[] = "Function \"cuMemGetAllocationGranularity\" not found"; +static const char __pyx_k_Function_cuMemGetAllocationPrope[] = "Function \"cuMemGetAllocationPropertiesFromHandle\" not found"; +static const char __pyx_k_Function_cuMemGetHandleForAddres[] = "Function \"cuMemGetHandleForAddressRange\" not found"; +static const char __pyx_k_Function_cuMemGetInfo_v2_not_fou[] = "Function \"cuMemGetInfo_v2\" not found"; +static const char __pyx_k_Function_cuMemHostAlloc_not_foun[] = "Function \"cuMemHostAlloc\" not found"; +static const char __pyx_k_Function_cuMemHostGetDevicePoint[] = "Function \"cuMemHostGetDevicePointer_v2\" not found"; +static const char __pyx_k_Function_cuMemHostGetFlags_not_f[] = "Function \"cuMemHostGetFlags\" not found"; +static const char __pyx_k_Function_cuMemHostRegister_v2_no[] = "Function \"cuMemHostRegister_v2\" not found"; +static const char __pyx_k_Function_cuMemHostUnregister_not[] = "Function \"cuMemHostUnregister\" not found"; +static const char __pyx_k_Function_cuMemImportFromShareabl[] = "Function \"cuMemImportFromShareableHandle\" not found"; +static const char __pyx_k_Function_cuMemPoolCreate_not_fou[] = "Function \"cuMemPoolCreate\" not found"; +static const char __pyx_k_Function_cuMemPoolDestroy_not_fo[] = "Function \"cuMemPoolDestroy\" not found"; +static const char __pyx_k_Function_cuMemPoolExportToSharea[] = "Function \"cuMemPoolExportToShareableHandle\" not found"; +static const char __pyx_k_Function_cuMemPoolGetAttribute_n[] = "Function \"cuMemPoolGetAttribute\" not found"; +static const char __pyx_k_Function_cuMemPoolImportFromShar[] = "Function \"cuMemPoolImportFromShareableHandle\" not found"; +static const char __pyx_k_Function_cuMemPoolSetAttribute_n[] = "Function \"cuMemPoolSetAttribute\" not found"; +static const char __pyx_k_Function_cuMemPoolTrimTo_not_fou[] = "Function \"cuMemPoolTrimTo\" not found"; +static const char __pyx_k_Function_cuMemPrefetchAsync_v2_n[] = "Function \"cuMemPrefetchAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemRangeGetAttributes[] = "Function \"cuMemRangeGetAttributes\" not found"; +static const char __pyx_k_Function_cuMemRetainAllocationHa[] = "Function \"cuMemRetainAllocationHandle\" not found"; +static const char __pyx_k_Function_cuMemSetAccess_not_foun[] = "Function \"cuMemSetAccess\" not found"; +static const char __pyx_k_Function_cuMemcpy2D_v2_not_found[] = "Function \"cuMemcpy2D_v2\" not found"; +static const char __pyx_k_Function_cuMemcpy3DBatchAsync_no[] = "Function \"cuMemcpy3DBatchAsync\" not found"; +static const char __pyx_k_Function_cuMemcpy3DPeerAsync_not[] = "Function \"cuMemcpy3DPeerAsync\" not found"; +static const char __pyx_k_Function_cuMemcpy3DPeer_not_foun[] = "Function \"cuMemcpy3DPeer\" not found"; +static const char __pyx_k_Function_cuMemcpy3D_v2_not_found[] = "Function \"cuMemcpy3D_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyAsync_not_found[] = "Function \"cuMemcpyAsync\" not found"; +static const char __pyx_k_Function_cuMemcpyAtoA_v2_not_fou[] = "Function \"cuMemcpyAtoA_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyAtoD_v2_not_fou[] = "Function \"cuMemcpyAtoD_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyAtoHAsync_v2_no[] = "Function \"cuMemcpyAtoHAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyAtoH_v2_not_fou[] = "Function \"cuMemcpyAtoH_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyDtoA_v2_not_fou[] = "Function \"cuMemcpyDtoA_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyDtoDAsync_v2_no[] = "Function \"cuMemcpyDtoDAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyDtoD_v2_not_fou[] = "Function \"cuMemcpyDtoD_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyDtoHAsync_v2_no[] = "Function \"cuMemcpyDtoHAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyDtoH_v2_not_fou[] = "Function \"cuMemcpyDtoH_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyHtoAAsync_v2_no[] = "Function \"cuMemcpyHtoAAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyHtoA_v2_not_fou[] = "Function \"cuMemcpyHtoA_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyHtoDAsync_v2_no[] = "Function \"cuMemcpyHtoDAsync_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyHtoD_v2_not_fou[] = "Function \"cuMemcpyHtoD_v2\" not found"; +static const char __pyx_k_Function_cuMemcpyPeerAsync_not_f[] = "Function \"cuMemcpyPeerAsync\" not found"; +static const char __pyx_k_Function_cuMemsetD16Async_not_fo[] = "Function \"cuMemsetD16Async\" not found"; +static const char __pyx_k_Function_cuMemsetD16_v2_not_foun[] = "Function \"cuMemsetD16_v2\" not found"; +static const char __pyx_k_Function_cuMemsetD2D16_v2_not_fo[] = "Function \"cuMemsetD2D16_v2\" not found"; +static const char __pyx_k_Function_cuMemsetD2D32_v2_not_fo[] = "Function \"cuMemsetD2D32_v2\" not found"; +static const char __pyx_k_Function_cuMemsetD2D8Async_not_f[] = "Function \"cuMemsetD2D8Async\" not found"; +static const char __pyx_k_Function_cuMemsetD2D8_v2_not_fou[] = "Function \"cuMemsetD2D8_v2\" not found"; +static const char __pyx_k_Function_cuMemsetD32Async_not_fo[] = "Function \"cuMemsetD32Async\" not found"; +static const char __pyx_k_Function_cuMemsetD32_v2_not_foun[] = "Function \"cuMemsetD32_v2\" not found"; +static const char __pyx_k_Function_cuMemsetD8Async_not_fou[] = "Function \"cuMemsetD8Async\" not found"; +static const char __pyx_k_Function_cuMemsetD8_v2_not_found[] = "Function \"cuMemsetD8_v2\" not found"; +static const char __pyx_k_Function_cuMipmappedArrayDestroy[] = "Function \"cuMipmappedArrayDestroy\" not found"; +static const char __pyx_k_Function_cuMipmappedArrayGetLeve[] = "Function \"cuMipmappedArrayGetLevel\" not found"; +static const char __pyx_k_Function_cuMipmappedArrayGetMemo[] = "Function \"cuMipmappedArrayGetMemoryRequirements\" not found"; +static const char __pyx_k_Function_cuMipmappedArrayGetSpar[] = "Function \"cuMipmappedArrayGetSparseProperties\" not found"; +static const char __pyx_k_Function_cuModuleEnumerateFuncti[] = "Function \"cuModuleEnumerateFunctions\" not found"; +static const char __pyx_k_Function_cuModuleGetFunctionCoun[] = "Function \"cuModuleGetFunctionCount\" not found"; +static const char __pyx_k_Function_cuModuleGetFunction_not[] = "Function \"cuModuleGetFunction\" not found"; +static const char __pyx_k_Function_cuModuleGetGlobal_v2_no[] = "Function \"cuModuleGetGlobal_v2\" not found"; +static const char __pyx_k_Function_cuModuleGetTexRef_not_f[] = "Function \"cuModuleGetTexRef\" not found"; +static const char __pyx_k_Function_cuModuleLoadData_not_fo[] = "Function \"cuModuleLoadData\" not found"; +static const char __pyx_k_Function_cuModuleLoadFatBinary_n[] = "Function \"cuModuleLoadFatBinary\" not found"; +static const char __pyx_k_Function_cuModuleUnload_not_foun[] = "Function \"cuModuleUnload\" not found"; +static const char __pyx_k_Function_cuMulticastAddDevice_no[] = "Function \"cuMulticastAddDevice\" not found"; +static const char __pyx_k_Function_cuMulticastBindAddr_not[] = "Function \"cuMulticastBindAddr\" not found"; +static const char __pyx_k_Function_cuMulticastCreate_not_f[] = "Function \"cuMulticastCreate\" not found"; +static const char __pyx_k_Function_cuMulticastGetGranulari[] = "Function \"cuMulticastGetGranularity\" not found"; +static const char __pyx_k_Function_cuMulticastUnbind_not_f[] = "Function \"cuMulticastUnbind\" not found"; +static const char __pyx_k_Function_cuOccupancyAvailableDyn[] = "Function \"cuOccupancyAvailableDynamicSMemPerBlock\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxActiveBlo[] = "Function \"cuOccupancyMaxActiveBlocksPerMultiprocessor\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxActiveClu[] = "Function \"cuOccupancyMaxActiveClusters\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxPotential[] = "Function \"cuOccupancyMaxPotentialBlockSize\" not found"; +static const char __pyx_k_Function_cuParamSetSize_not_foun[] = "Function \"cuParamSetSize\" not found"; +static const char __pyx_k_Function_cuParamSetTexRef_not_fo[] = "Function \"cuParamSetTexRef\" not found"; +static const char __pyx_k_Function_cuPointerGetAttribute_n[] = "Function \"cuPointerGetAttribute\" not found"; +static const char __pyx_k_Function_cuPointerSetAttribute_n[] = "Function \"cuPointerSetAttribute\" not found"; +static const char __pyx_k_Function_cuProfilerStart_not_fou[] = "Function \"cuProfilerStart\" not found"; +static const char __pyx_k_Function_cuProfilerStop_not_foun[] = "Function \"cuProfilerStop\" not found"; +static const char __pyx_k_Function_cuSignalExternalSemapho[] = "Function \"cuSignalExternalSemaphoresAsync\" not found"; +static const char __pyx_k_Function_cuStreamAddCallback_not[] = "Function \"cuStreamAddCallback\" not found"; +static const char __pyx_k_Function_cuStreamBatchMemOp_v2_n[] = "Function \"cuStreamBatchMemOp_v2\" not found"; +static const char __pyx_k_Function_cuStreamBeginCaptureToG[] = "Function \"cuStreamBeginCaptureToGraph\" not found"; +static const char __pyx_k_Function_cuStreamBeginCapture_v2[] = "Function \"cuStreamBeginCapture_v2\" not found"; +static const char __pyx_k_Function_cuStreamCreateWithPrior[] = "Function \"cuStreamCreateWithPriority\" not found"; +static const char __pyx_k_Function_cuStreamCreate_not_foun[] = "Function \"cuStreamCreate\" not found"; +static const char __pyx_k_Function_cuStreamGetAttribute_no[] = "Function \"cuStreamGetAttribute\" not found"; +static const char __pyx_k_Function_cuStreamGetCtx_not_foun[] = "Function \"cuStreamGetCtx\" not found"; +static const char __pyx_k_Function_cuStreamGetCtx_v2_not_f[] = "Function \"cuStreamGetCtx_v2\" not found"; +static const char __pyx_k_Function_cuStreamGetDevice_not_f[] = "Function \"cuStreamGetDevice\" not found"; +static const char __pyx_k_Function_cuStreamGetFlags_not_fo[] = "Function \"cuStreamGetFlags\" not found"; +static const char __pyx_k_Function_cuStreamGetGreenCtx_not[] = "Function \"cuStreamGetGreenCtx\" not found"; +static const char __pyx_k_Function_cuStreamGetId_not_found[] = "Function \"cuStreamGetId\" not found"; +static const char __pyx_k_Function_cuStreamGetPriority_not[] = "Function \"cuStreamGetPriority\" not found"; +static const char __pyx_k_Function_cuStreamIsCapturing_not[] = "Function \"cuStreamIsCapturing\" not found"; +static const char __pyx_k_Function_cuStreamQuery_not_found[] = "Function \"cuStreamQuery\" not found"; +static const char __pyx_k_Function_cuStreamSetAttribute_no[] = "Function \"cuStreamSetAttribute\" not found"; +static const char __pyx_k_Function_cuStreamSynchronize_not[] = "Function \"cuStreamSynchronize\" not found"; +static const char __pyx_k_Function_cuStreamUpdateCaptureDe[] = "Function \"cuStreamUpdateCaptureDependencies\" not found"; +static const char __pyx_k_Function_cuStreamWaitEvent_not_f[] = "Function \"cuStreamWaitEvent\" not found"; +static const char __pyx_k_Function_cuStreamWriteValue32_v2[] = "Function \"cuStreamWriteValue32_v2\" not found"; +static const char __pyx_k_Function_cuStreamWriteValue64_v2[] = "Function \"cuStreamWriteValue64_v2\" not found"; +static const char __pyx_k_Function_cuSurfObjectDestroy_not[] = "Function \"cuSurfObjectDestroy\" not found"; +static const char __pyx_k_Function_cuSurfObjectGetResource[] = "Function \"cuSurfObjectGetResourceDesc\" not found"; +static const char __pyx_k_Function_cuSurfRefGetArray_not_f[] = "Function \"cuSurfRefGetArray\" not found"; +static const char __pyx_k_Function_cuSurfRefSetArray_not_f[] = "Function \"cuSurfRefSetArray\" not found"; +static const char __pyx_k_Function_cuTensorMapEncodeIm2col[] = "Function \"cuTensorMapEncodeIm2col\" not found"; +static const char __pyx_k_Function_cuTensorMapReplaceAddre[] = "Function \"cuTensorMapReplaceAddress\" not found"; +static const char __pyx_k_Function_cuTexObjectCreate_not_f[] = "Function \"cuTexObjectCreate\" not found"; +static const char __pyx_k_Function_cuTexObjectGetResourceD[] = "Function \"cuTexObjectGetResourceDesc\" not found"; +static const char __pyx_k_Function_cuTexObjectGetResourceV[] = "Function \"cuTexObjectGetResourceViewDesc\" not found"; +static const char __pyx_k_Function_cuTexObjectGetTextureDe[] = "Function \"cuTexObjectGetTextureDesc\" not found"; +static const char __pyx_k_Function_cuTexRefCreate_not_foun[] = "Function \"cuTexRefCreate\" not found"; +static const char __pyx_k_Function_cuTexRefDestroy_not_fou[] = "Function \"cuTexRefDestroy\" not found"; +static const char __pyx_k_Function_cuTexRefGetAddress_v2_n[] = "Function \"cuTexRefGetAddress_v2\" not found"; +static const char __pyx_k_Function_cuTexRefGetArray_not_fo[] = "Function \"cuTexRefGetArray\" not found"; +static const char __pyx_k_Function_cuTexRefGetFilterMode_n[] = "Function \"cuTexRefGetFilterMode\" not found"; +static const char __pyx_k_Function_cuTexRefGetFlags_not_fo[] = "Function \"cuTexRefGetFlags\" not found"; +static const char __pyx_k_Function_cuTexRefGetFormat_not_f[] = "Function \"cuTexRefGetFormat\" not found"; +static const char __pyx_k_Function_cuTexRefGetMaxAnisotrop[] = "Function \"cuTexRefGetMaxAnisotropy\" not found"; +static const char __pyx_k_Function_cuTexRefGetMipmapFilter[] = "Function \"cuTexRefGetMipmapFilterMode\" not found"; +static const char __pyx_k_Function_cuTexRefGetMipmapLevelB[] = "Function \"cuTexRefGetMipmapLevelBias\" not found"; +static const char __pyx_k_Function_cuTexRefGetMipmapLevelC[] = "Function \"cuTexRefGetMipmapLevelClamp\" not found"; +static const char __pyx_k_Function_cuTexRefGetMipmappedArr[] = "Function \"cuTexRefGetMipmappedArray\" not found"; +static const char __pyx_k_Function_cuTexRefSetAddress2D_v3[] = "Function \"cuTexRefSetAddress2D_v3\" not found"; +static const char __pyx_k_Function_cuTexRefSetAddress_v2_n[] = "Function \"cuTexRefSetAddress_v2\" not found"; +static const char __pyx_k_Function_cuTexRefSetArray_not_fo[] = "Function \"cuTexRefSetArray\" not found"; +static const char __pyx_k_Function_cuTexRefSetFilterMode_n[] = "Function \"cuTexRefSetFilterMode\" not found"; +static const char __pyx_k_Function_cuTexRefSetFlags_not_fo[] = "Function \"cuTexRefSetFlags\" not found"; +static const char __pyx_k_Function_cuTexRefSetFormat_not_f[] = "Function \"cuTexRefSetFormat\" not found"; +static const char __pyx_k_Function_cuTexRefSetMaxAnisotrop[] = "Function \"cuTexRefSetMaxAnisotropy\" not found"; +static const char __pyx_k_Function_cuTexRefSetMipmapFilter[] = "Function \"cuTexRefSetMipmapFilterMode\" not found"; +static const char __pyx_k_Function_cuTexRefSetMipmapLevelB[] = "Function \"cuTexRefSetMipmapLevelBias\" not found"; +static const char __pyx_k_Function_cuTexRefSetMipmapLevelC[] = "Function \"cuTexRefSetMipmapLevelClamp\" not found"; +static const char __pyx_k_Function_cuTexRefSetMipmappedArr[] = "Function \"cuTexRefSetMipmappedArray\" not found"; +static const char __pyx_k_Function_cuThreadExchangeStreamC[] = "Function \"cuThreadExchangeStreamCaptureMode\" not found"; +static const char __pyx_k_Function_cuUserObjectRelease_not[] = "Function \"cuUserObjectRelease\" not found"; +static const char __pyx_k_Function_cuVDPAUCtxCreate_v2_not[] = "Function \"cuVDPAUCtxCreate_v2\" not found"; +static const char __pyx_k_Function_cuVDPAUGetDevice_not_fo[] = "Function \"cuVDPAUGetDevice\" not found"; +static const char __pyx_k_Function_cuWaitExternalSemaphore[] = "Function \"cuWaitExternalSemaphoresAsync\" not found"; +static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; +static const char __pyx_k_cuGraphExternalSemaphoresSigna_2[] = "__cuGraphExternalSemaphoresSignalNodeSetParams"; +static const char __pyx_k_cuGraphExternalSemaphoresWaitN_2[] = "__cuGraphExternalSemaphoresWaitNodeSetParams"; +static const char __pyx_k_cuOccupancyMaxActiveBlocksPerM_2[] = "__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"; +static const char __pyx_k_cuOccupancyMaxPotentialBlockSi_2[] = "__cuOccupancyMaxPotentialBlockSizeWithFlags"; +static const char __pyx_k_cuStreamUpdateCaptureDependenc_2[] = "__cuStreamUpdateCaptureDependencies_v2"; +static const char __pyx_k_cuda_bindings__bindings_cydriver[] = "cuda.bindings._bindings.cydriver"; +static const char __pyx_k_Function_cuGraphAddDependencies_2[] = "Function \"cuGraphAddDependencies_v2\" not found"; +static const char __pyx_k_Function_cuStreamGetCaptureInfo_2[] = "Function \"cuStreamGetCaptureInfo_v3\" not found"; +static const char __pyx_k_Function_cuEGLStreamConsumerConn_2[] = "Function \"cuEGLStreamConsumerConnectWithFlags\" not found"; +static const char __pyx_k_Function_cuExternalMemoryGetMapp_2[] = "Function \"cuExternalMemoryGetMappedMipmappedArray\" not found"; +static const char __pyx_k_Function_cuGraphAddExternalSemap_2[] = "Function \"cuGraphAddExternalSemaphoresWaitNode\" not found"; +static const char __pyx_k_Function_cuGraphExecExternalSema_2[] = "Function \"cuGraphExecExternalSemaphoresWaitNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExternalSemaphor_2[] = "Function \"cuGraphExternalSemaphoresSignalNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphExternalSemaphor_3[] = "Function \"cuGraphExternalSemaphoresWaitNodeGetParams\" not found"; +static const char __pyx_k_Function_cuGraphExternalSemaphor_4[] = "Function \"cuGraphExternalSemaphoresWaitNodeSetParams\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetDependenc_2[] = "Function \"cuGraphNodeGetDependencies_v2\" not found"; +static const char __pyx_k_Function_cuGraphNodeGetDependent_2[] = "Function \"cuGraphNodeGetDependentNodes_v2\" not found"; +static const char __pyx_k_Function_cuGraphRemoveDependenci_2[] = "Function \"cuGraphRemoveDependencies_v2\" not found"; +static const char __pyx_k_Function_cuGraphicsResourceGetMa_2[] = "Function \"cuGraphicsResourceGetMappedPointer_v2\" not found"; +static const char __pyx_k_Function_cuGraphicsResourceGetMa_3[] = "Function \"cuGraphicsResourceGetMappedEglFrame\" not found"; +static const char __pyx_k_Function_cuGraphicsVDPAURegister_2[] = "Function \"cuGraphicsVDPAURegisterOutputSurface\" not found"; +static const char __pyx_k_Function_cuLaunchCooperativeKern_2[] = "Function \"cuLaunchCooperativeKernelMultiDevice\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxActiveBlo_2[] = "Function \"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxPotential_2[] = "Function \"cuOccupancyMaxPotentialBlockSizeWithFlags\" not found"; +static const char __pyx_k_Function_cuOccupancyMaxPotential_3[] = "Function \"cuOccupancyMaxPotentialClusterSize\" not found"; +static const char __pyx_k_Function_cuStreamUpdateCaptureDe_2[] = "Function \"cuStreamUpdateCaptureDependencies_v2\" not found"; +static const char __pyx_k_Function_cuTensorMapEncodeIm2col_2[] = "Function \"cuTensorMapEncodeIm2colWide\" not found"; +static const char __pyx_k_cuda_bindings__bindings_cydriver_2[] = "cuda/bindings/_bindings/cydriver.pyx"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_8cydriver_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[2]; + PyObject *__pyx_string_tab[982]; + PyObject *__pyx_int_0; + PyObject *__pyx_int_4294967296; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA __pyx_string_tab[1] +#define __pyx_kp_u_Failed_to_dlopen __pyx_string_tab[2] +#define __pyx_kp_u_Function_cuArray3DCreate_v2_not __pyx_string_tab[3] +#define __pyx_kp_u_Function_cuArray3DGetDescriptor __pyx_string_tab[4] +#define __pyx_kp_u_Function_cuArrayCreate_v2_not_fo __pyx_string_tab[5] +#define __pyx_kp_u_Function_cuArrayDestroy_not_foun __pyx_string_tab[6] +#define __pyx_kp_u_Function_cuArrayGetDescriptor_v2 __pyx_string_tab[7] +#define __pyx_kp_u_Function_cuArrayGetMemoryRequire __pyx_string_tab[8] +#define __pyx_kp_u_Function_cuArrayGetPlane_not_fou __pyx_string_tab[9] +#define __pyx_kp_u_Function_cuArrayGetSparsePropert __pyx_string_tab[10] +#define __pyx_kp_u_Function_cuCheckpointProcessChec __pyx_string_tab[11] +#define __pyx_kp_u_Function_cuCheckpointProcessGetR __pyx_string_tab[12] +#define __pyx_kp_u_Function_cuCheckpointProcessGetS __pyx_string_tab[13] +#define __pyx_kp_u_Function_cuCheckpointProcessLock __pyx_string_tab[14] +#define __pyx_kp_u_Function_cuCheckpointProcessRest __pyx_string_tab[15] +#define __pyx_kp_u_Function_cuCheckpointProcessUnlo __pyx_string_tab[16] +#define __pyx_kp_u_Function_cuCoredumpGetAttribute __pyx_string_tab[17] +#define __pyx_kp_u_Function_cuCoredumpGetAttributeG __pyx_string_tab[18] +#define __pyx_kp_u_Function_cuCoredumpSetAttribute __pyx_string_tab[19] +#define __pyx_kp_u_Function_cuCoredumpSetAttributeG __pyx_string_tab[20] +#define __pyx_kp_u_Function_cuCtxAttach_not_found __pyx_string_tab[21] +#define __pyx_kp_u_Function_cuCtxCreate_v2_not_foun __pyx_string_tab[22] +#define __pyx_kp_u_Function_cuCtxCreate_v3_not_foun __pyx_string_tab[23] +#define __pyx_kp_u_Function_cuCtxCreate_v4_not_foun __pyx_string_tab[24] +#define __pyx_kp_u_Function_cuCtxDestroy_v2_not_fou __pyx_string_tab[25] +#define __pyx_kp_u_Function_cuCtxDetach_not_found __pyx_string_tab[26] +#define __pyx_kp_u_Function_cuCtxDisablePeerAccess __pyx_string_tab[27] +#define __pyx_kp_u_Function_cuCtxEnablePeerAccess_n __pyx_string_tab[28] +#define __pyx_kp_u_Function_cuCtxFromGreenCtx_not_f __pyx_string_tab[29] +#define __pyx_kp_u_Function_cuCtxGetApiVersion_not __pyx_string_tab[30] +#define __pyx_kp_u_Function_cuCtxGetCacheConfig_not __pyx_string_tab[31] +#define __pyx_kp_u_Function_cuCtxGetCurrent_not_fou __pyx_string_tab[32] +#define __pyx_kp_u_Function_cuCtxGetDevResource_not __pyx_string_tab[33] +#define __pyx_kp_u_Function_cuCtxGetDevice_not_foun __pyx_string_tab[34] +#define __pyx_kp_u_Function_cuCtxGetExecAffinity_no __pyx_string_tab[35] +#define __pyx_kp_u_Function_cuCtxGetFlags_not_found __pyx_string_tab[36] +#define __pyx_kp_u_Function_cuCtxGetId_not_found __pyx_string_tab[37] +#define __pyx_kp_u_Function_cuCtxGetLimit_not_found __pyx_string_tab[38] +#define __pyx_kp_u_Function_cuCtxGetSharedMemConfig __pyx_string_tab[39] +#define __pyx_kp_u_Function_cuCtxGetStreamPriorityR __pyx_string_tab[40] +#define __pyx_kp_u_Function_cuCtxPopCurrent_v2_not __pyx_string_tab[41] +#define __pyx_kp_u_Function_cuCtxPushCurrent_v2_not __pyx_string_tab[42] +#define __pyx_kp_u_Function_cuCtxRecordEvent_not_fo __pyx_string_tab[43] +#define __pyx_kp_u_Function_cuCtxResetPersistingL2C __pyx_string_tab[44] +#define __pyx_kp_u_Function_cuCtxSetCacheConfig_not __pyx_string_tab[45] +#define __pyx_kp_u_Function_cuCtxSetCurrent_not_fou __pyx_string_tab[46] +#define __pyx_kp_u_Function_cuCtxSetFlags_not_found __pyx_string_tab[47] +#define __pyx_kp_u_Function_cuCtxSetLimit_not_found __pyx_string_tab[48] +#define __pyx_kp_u_Function_cuCtxSetSharedMemConfig __pyx_string_tab[49] +#define __pyx_kp_u_Function_cuCtxSynchronize_not_fo __pyx_string_tab[50] +#define __pyx_kp_u_Function_cuCtxWaitEvent_not_foun __pyx_string_tab[51] +#define __pyx_kp_u_Function_cuDestroyExternalMemory __pyx_string_tab[52] +#define __pyx_kp_u_Function_cuDestroyExternalSemaph __pyx_string_tab[53] +#define __pyx_kp_u_Function_cuDevResourceGenerateDe __pyx_string_tab[54] +#define __pyx_kp_u_Function_cuDevSmResourceSplitByC __pyx_string_tab[55] +#define __pyx_kp_u_Function_cuDeviceCanAccessPeer_n __pyx_string_tab[56] +#define __pyx_kp_u_Function_cuDeviceComputeCapabili __pyx_string_tab[57] +#define __pyx_kp_u_Function_cuDeviceGetAttribute_no __pyx_string_tab[58] +#define __pyx_kp_u_Function_cuDeviceGetByPCIBusId_n __pyx_string_tab[59] +#define __pyx_kp_u_Function_cuDeviceGetCount_not_fo __pyx_string_tab[60] +#define __pyx_kp_u_Function_cuDeviceGetDefaultMemPo __pyx_string_tab[61] +#define __pyx_kp_u_Function_cuDeviceGetDevResource __pyx_string_tab[62] +#define __pyx_kp_u_Function_cuDeviceGetExecAffinity __pyx_string_tab[63] +#define __pyx_kp_u_Function_cuDeviceGetGraphMemAttr __pyx_string_tab[64] +#define __pyx_kp_u_Function_cuDeviceGetLuid_not_fou __pyx_string_tab[65] +#define __pyx_kp_u_Function_cuDeviceGetMemPool_not __pyx_string_tab[66] +#define __pyx_kp_u_Function_cuDeviceGetName_not_fou __pyx_string_tab[67] +#define __pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt __pyx_string_tab[68] +#define __pyx_kp_u_Function_cuDeviceGetP2PAttribute __pyx_string_tab[69] +#define __pyx_kp_u_Function_cuDeviceGetPCIBusId_not __pyx_string_tab[70] +#define __pyx_kp_u_Function_cuDeviceGetProperties_n __pyx_string_tab[71] +#define __pyx_kp_u_Function_cuDeviceGetTexture1DLin __pyx_string_tab[72] +#define __pyx_kp_u_Function_cuDeviceGetUuid_not_fou __pyx_string_tab[73] +#define __pyx_kp_u_Function_cuDeviceGetUuid_v2_not __pyx_string_tab[74] +#define __pyx_kp_u_Function_cuDeviceGet_not_found __pyx_string_tab[75] +#define __pyx_kp_u_Function_cuDeviceGraphMemTrim_no __pyx_string_tab[76] +#define __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt __pyx_string_tab[77] +#define __pyx_kp_u_Function_cuDevicePrimaryCtxRelea __pyx_string_tab[78] +#define __pyx_kp_u_Function_cuDevicePrimaryCtxReset __pyx_string_tab[79] +#define __pyx_kp_u_Function_cuDevicePrimaryCtxRetai __pyx_string_tab[80] +#define __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl __pyx_string_tab[81] +#define __pyx_kp_u_Function_cuDeviceRegisterAsyncNo __pyx_string_tab[82] +#define __pyx_kp_u_Function_cuDeviceSetGraphMemAttr __pyx_string_tab[83] +#define __pyx_kp_u_Function_cuDeviceSetMemPool_not __pyx_string_tab[84] +#define __pyx_kp_u_Function_cuDeviceTotalMem_v2_not __pyx_string_tab[85] +#define __pyx_kp_u_Function_cuDeviceUnregisterAsync __pyx_string_tab[86] +#define __pyx_kp_u_Function_cuDriverGetVersion_not __pyx_string_tab[87] +#define __pyx_kp_u_Function_cuEGLStreamConsumerAcqu __pyx_string_tab[88] +#define __pyx_kp_u_Function_cuEGLStreamConsumerConn __pyx_string_tab[89] +#define __pyx_kp_u_Function_cuEGLStreamConsumerConn_2 __pyx_string_tab[90] +#define __pyx_kp_u_Function_cuEGLStreamConsumerDisc __pyx_string_tab[91] +#define __pyx_kp_u_Function_cuEGLStreamConsumerRele __pyx_string_tab[92] +#define __pyx_kp_u_Function_cuEGLStreamProducerConn __pyx_string_tab[93] +#define __pyx_kp_u_Function_cuEGLStreamProducerDisc __pyx_string_tab[94] +#define __pyx_kp_u_Function_cuEGLStreamProducerPres __pyx_string_tab[95] +#define __pyx_kp_u_Function_cuEGLStreamProducerRetu __pyx_string_tab[96] +#define __pyx_kp_u_Function_cuEventCreateFromEGLSyn __pyx_string_tab[97] +#define __pyx_kp_u_Function_cuEventCreate_not_found __pyx_string_tab[98] +#define __pyx_kp_u_Function_cuEventDestroy_v2_not_f __pyx_string_tab[99] +#define __pyx_kp_u_Function_cuEventElapsedTime_not __pyx_string_tab[100] +#define __pyx_kp_u_Function_cuEventElapsedTime_v2_n __pyx_string_tab[101] +#define __pyx_kp_u_Function_cuEventQuery_not_found __pyx_string_tab[102] +#define __pyx_kp_u_Function_cuEventRecordWithFlags __pyx_string_tab[103] +#define __pyx_kp_u_Function_cuEventRecord_not_found __pyx_string_tab[104] +#define __pyx_kp_u_Function_cuEventSynchronize_not __pyx_string_tab[105] +#define __pyx_kp_u_Function_cuExternalMemoryGetMapp __pyx_string_tab[106] +#define __pyx_kp_u_Function_cuExternalMemoryGetMapp_2 __pyx_string_tab[107] +#define __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri __pyx_string_tab[108] +#define __pyx_kp_u_Function_cuFuncGetAttribute_not __pyx_string_tab[109] +#define __pyx_kp_u_Function_cuFuncGetModule_not_fou __pyx_string_tab[110] +#define __pyx_kp_u_Function_cuFuncGetName_not_found __pyx_string_tab[111] +#define __pyx_kp_u_Function_cuFuncGetParamInfo_not __pyx_string_tab[112] +#define __pyx_kp_u_Function_cuFuncIsLoaded_not_foun __pyx_string_tab[113] +#define __pyx_kp_u_Function_cuFuncLoad_not_found __pyx_string_tab[114] +#define __pyx_kp_u_Function_cuFuncSetAttribute_not __pyx_string_tab[115] +#define __pyx_kp_u_Function_cuFuncSetBlockShape_not __pyx_string_tab[116] +#define __pyx_kp_u_Function_cuFuncSetCacheConfig_no __pyx_string_tab[117] +#define __pyx_kp_u_Function_cuFuncSetSharedMemConfi __pyx_string_tab[118] +#define __pyx_kp_u_Function_cuFuncSetSharedSize_not __pyx_string_tab[119] +#define __pyx_kp_u_Function_cuGLGetDevices_v2_not_f __pyx_string_tab[120] +#define __pyx_kp_u_Function_cuGetErrorName_not_foun __pyx_string_tab[121] +#define __pyx_kp_u_Function_cuGetErrorString_not_fo __pyx_string_tab[122] +#define __pyx_kp_u_Function_cuGetExportTable_not_fo __pyx_string_tab[123] +#define __pyx_kp_u_Function_cuGetProcAddress_v2_not __pyx_string_tab[124] +#define __pyx_kp_u_Function_cuGraphAddBatchMemOpNod __pyx_string_tab[125] +#define __pyx_kp_u_Function_cuGraphAddChildGraphNod __pyx_string_tab[126] +#define __pyx_kp_u_Function_cuGraphAddDependencies __pyx_string_tab[127] +#define __pyx_kp_u_Function_cuGraphAddDependencies_2 __pyx_string_tab[128] +#define __pyx_kp_u_Function_cuGraphAddEmptyNode_not __pyx_string_tab[129] +#define __pyx_kp_u_Function_cuGraphAddEventRecordNo __pyx_string_tab[130] +#define __pyx_kp_u_Function_cuGraphAddEventWaitNode __pyx_string_tab[131] +#define __pyx_kp_u_Function_cuGraphAddExternalSemap __pyx_string_tab[132] +#define __pyx_kp_u_Function_cuGraphAddExternalSemap_2 __pyx_string_tab[133] +#define __pyx_kp_u_Function_cuGraphAddHostNode_not __pyx_string_tab[134] +#define __pyx_kp_u_Function_cuGraphAddKernelNode_v2 __pyx_string_tab[135] +#define __pyx_kp_u_Function_cuGraphAddMemAllocNode __pyx_string_tab[136] +#define __pyx_kp_u_Function_cuGraphAddMemFreeNode_n __pyx_string_tab[137] +#define __pyx_kp_u_Function_cuGraphAddMemcpyNode_no __pyx_string_tab[138] +#define __pyx_kp_u_Function_cuGraphAddMemsetNode_no __pyx_string_tab[139] +#define __pyx_kp_u_Function_cuGraphAddNode_not_foun __pyx_string_tab[140] +#define __pyx_kp_u_Function_cuGraphAddNode_v2_not_f __pyx_string_tab[141] +#define __pyx_kp_u_Function_cuGraphBatchMemOpNodeGe __pyx_string_tab[142] +#define __pyx_kp_u_Function_cuGraphBatchMemOpNodeSe __pyx_string_tab[143] +#define __pyx_kp_u_Function_cuGraphChildGraphNodeGe __pyx_string_tab[144] +#define __pyx_kp_u_Function_cuGraphClone_not_found __pyx_string_tab[145] +#define __pyx_kp_u_Function_cuGraphConditionalHandl __pyx_string_tab[146] +#define __pyx_kp_u_Function_cuGraphCreate_not_found __pyx_string_tab[147] +#define __pyx_kp_u_Function_cuGraphDebugDotPrint_no __pyx_string_tab[148] +#define __pyx_kp_u_Function_cuGraphDestroyNode_not __pyx_string_tab[149] +#define __pyx_kp_u_Function_cuGraphDestroy_not_foun __pyx_string_tab[150] +#define __pyx_kp_u_Function_cuGraphEventRecordNodeG __pyx_string_tab[151] +#define __pyx_kp_u_Function_cuGraphEventRecordNodeS __pyx_string_tab[152] +#define __pyx_kp_u_Function_cuGraphEventWaitNodeGet __pyx_string_tab[153] +#define __pyx_kp_u_Function_cuGraphEventWaitNodeSet __pyx_string_tab[154] +#define __pyx_kp_u_Function_cuGraphExecBatchMemOpNo __pyx_string_tab[155] +#define __pyx_kp_u_Function_cuGraphExecChildGraphNo __pyx_string_tab[156] +#define __pyx_kp_u_Function_cuGraphExecDestroy_not __pyx_string_tab[157] +#define __pyx_kp_u_Function_cuGraphExecEventRecordN __pyx_string_tab[158] +#define __pyx_kp_u_Function_cuGraphExecEventWaitNod __pyx_string_tab[159] +#define __pyx_kp_u_Function_cuGraphExecExternalSema __pyx_string_tab[160] +#define __pyx_kp_u_Function_cuGraphExecExternalSema_2 __pyx_string_tab[161] +#define __pyx_kp_u_Function_cuGraphExecGetFlags_not __pyx_string_tab[162] +#define __pyx_kp_u_Function_cuGraphExecHostNodeSetP __pyx_string_tab[163] +#define __pyx_kp_u_Function_cuGraphExecKernelNodeSe __pyx_string_tab[164] +#define __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe __pyx_string_tab[165] +#define __pyx_kp_u_Function_cuGraphExecMemsetNodeSe __pyx_string_tab[166] +#define __pyx_kp_u_Function_cuGraphExecNodeSetParam __pyx_string_tab[167] +#define __pyx_kp_u_Function_cuGraphExecUpdate_v2_no __pyx_string_tab[168] +#define __pyx_kp_u_Function_cuGraphExternalSemaphor __pyx_string_tab[169] +#define __pyx_kp_u_Function_cuGraphExternalSemaphor_2 __pyx_string_tab[170] +#define __pyx_kp_u_Function_cuGraphExternalSemaphor_3 __pyx_string_tab[171] +#define __pyx_kp_u_Function_cuGraphExternalSemaphor_4 __pyx_string_tab[172] +#define __pyx_kp_u_Function_cuGraphGetEdges_not_fou __pyx_string_tab[173] +#define __pyx_kp_u_Function_cuGraphGetEdges_v2_not __pyx_string_tab[174] +#define __pyx_kp_u_Function_cuGraphGetNodes_not_fou __pyx_string_tab[175] +#define __pyx_kp_u_Function_cuGraphGetRootNodes_not __pyx_string_tab[176] +#define __pyx_kp_u_Function_cuGraphHostNodeGetParam __pyx_string_tab[177] +#define __pyx_kp_u_Function_cuGraphHostNodeSetParam __pyx_string_tab[178] +#define __pyx_kp_u_Function_cuGraphInstantiateWithF __pyx_string_tab[179] +#define __pyx_kp_u_Function_cuGraphInstantiateWithP __pyx_string_tab[180] +#define __pyx_kp_u_Function_cuGraphKernelNodeCopyAt __pyx_string_tab[181] +#define __pyx_kp_u_Function_cuGraphKernelNodeGetAtt __pyx_string_tab[182] +#define __pyx_kp_u_Function_cuGraphKernelNodeGetPar __pyx_string_tab[183] +#define __pyx_kp_u_Function_cuGraphKernelNodeSetAtt __pyx_string_tab[184] +#define __pyx_kp_u_Function_cuGraphKernelNodeSetPar __pyx_string_tab[185] +#define __pyx_kp_u_Function_cuGraphLaunch_not_found __pyx_string_tab[186] +#define __pyx_kp_u_Function_cuGraphMemAllocNodeGetP __pyx_string_tab[187] +#define __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa __pyx_string_tab[188] +#define __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar __pyx_string_tab[189] +#define __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar __pyx_string_tab[190] +#define __pyx_kp_u_Function_cuGraphMemsetNodeGetPar __pyx_string_tab[191] +#define __pyx_kp_u_Function_cuGraphMemsetNodeSetPar __pyx_string_tab[192] +#define __pyx_kp_u_Function_cuGraphNodeFindInClone __pyx_string_tab[193] +#define __pyx_kp_u_Function_cuGraphNodeGetDependenc __pyx_string_tab[194] +#define __pyx_kp_u_Function_cuGraphNodeGetDependenc_2 __pyx_string_tab[195] +#define __pyx_kp_u_Function_cuGraphNodeGetDependent __pyx_string_tab[196] +#define __pyx_kp_u_Function_cuGraphNodeGetDependent_2 __pyx_string_tab[197] +#define __pyx_kp_u_Function_cuGraphNodeGetEnabled_n __pyx_string_tab[198] +#define __pyx_kp_u_Function_cuGraphNodeGetType_not __pyx_string_tab[199] +#define __pyx_kp_u_Function_cuGraphNodeSetEnabled_n __pyx_string_tab[200] +#define __pyx_kp_u_Function_cuGraphNodeSetParams_no __pyx_string_tab[201] +#define __pyx_kp_u_Function_cuGraphReleaseUserObjec __pyx_string_tab[202] +#define __pyx_kp_u_Function_cuGraphRemoveDependenci __pyx_string_tab[203] +#define __pyx_kp_u_Function_cuGraphRemoveDependenci_2 __pyx_string_tab[204] +#define __pyx_kp_u_Function_cuGraphRetainUserObject __pyx_string_tab[205] +#define __pyx_kp_u_Function_cuGraphUpload_not_found __pyx_string_tab[206] +#define __pyx_kp_u_Function_cuGraphicsEGLRegisterIm __pyx_string_tab[207] +#define __pyx_kp_u_Function_cuGraphicsGLRegisterBuf __pyx_string_tab[208] +#define __pyx_kp_u_Function_cuGraphicsGLRegisterIma __pyx_string_tab[209] +#define __pyx_kp_u_Function_cuGraphicsMapResources __pyx_string_tab[210] +#define __pyx_kp_u_Function_cuGraphicsResourceGetMa __pyx_string_tab[211] +#define __pyx_kp_u_Function_cuGraphicsResourceGetMa_2 __pyx_string_tab[212] +#define __pyx_kp_u_Function_cuGraphicsResourceGetMa_3 __pyx_string_tab[213] +#define __pyx_kp_u_Function_cuGraphicsResourceSetMa __pyx_string_tab[214] +#define __pyx_kp_u_Function_cuGraphicsSubResourceGe __pyx_string_tab[215] +#define __pyx_kp_u_Function_cuGraphicsUnmapResource __pyx_string_tab[216] +#define __pyx_kp_u_Function_cuGraphicsUnregisterRes __pyx_string_tab[217] +#define __pyx_kp_u_Function_cuGraphicsVDPAURegister __pyx_string_tab[218] +#define __pyx_kp_u_Function_cuGraphicsVDPAURegister_2 __pyx_string_tab[219] +#define __pyx_kp_u_Function_cuGreenCtxCreate_not_fo __pyx_string_tab[220] +#define __pyx_kp_u_Function_cuGreenCtxDestroy_not_f __pyx_string_tab[221] +#define __pyx_kp_u_Function_cuGreenCtxGetDevResourc __pyx_string_tab[222] +#define __pyx_kp_u_Function_cuGreenCtxRecordEvent_n __pyx_string_tab[223] +#define __pyx_kp_u_Function_cuGreenCtxStreamCreate __pyx_string_tab[224] +#define __pyx_kp_u_Function_cuGreenCtxWaitEvent_not __pyx_string_tab[225] +#define __pyx_kp_u_Function_cuImportExternalMemory __pyx_string_tab[226] +#define __pyx_kp_u_Function_cuImportExternalSemapho __pyx_string_tab[227] +#define __pyx_kp_u_Function_cuInit_not_found __pyx_string_tab[228] +#define __pyx_kp_u_Function_cuIpcCloseMemHandle_not __pyx_string_tab[229] +#define __pyx_kp_u_Function_cuIpcGetEventHandle_not __pyx_string_tab[230] +#define __pyx_kp_u_Function_cuIpcGetMemHandle_not_f __pyx_string_tab[231] +#define __pyx_kp_u_Function_cuIpcOpenEventHandle_no __pyx_string_tab[232] +#define __pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n __pyx_string_tab[233] +#define __pyx_kp_u_Function_cuKernelGetAttribute_no __pyx_string_tab[234] +#define __pyx_kp_u_Function_cuKernelGetFunction_not __pyx_string_tab[235] +#define __pyx_kp_u_Function_cuKernelGetLibrary_not __pyx_string_tab[236] +#define __pyx_kp_u_Function_cuKernelGetName_not_fou __pyx_string_tab[237] +#define __pyx_kp_u_Function_cuKernelGetParamInfo_no __pyx_string_tab[238] +#define __pyx_kp_u_Function_cuKernelSetAttribute_no __pyx_string_tab[239] +#define __pyx_kp_u_Function_cuKernelSetCacheConfig __pyx_string_tab[240] +#define __pyx_kp_u_Function_cuLaunchCooperativeKern __pyx_string_tab[241] +#define __pyx_kp_u_Function_cuLaunchCooperativeKern_2 __pyx_string_tab[242] +#define __pyx_kp_u_Function_cuLaunchGridAsync_not_f __pyx_string_tab[243] +#define __pyx_kp_u_Function_cuLaunchGrid_not_found __pyx_string_tab[244] +#define __pyx_kp_u_Function_cuLaunchHostFunc_not_fo __pyx_string_tab[245] +#define __pyx_kp_u_Function_cuLaunchKernelEx_not_fo __pyx_string_tab[246] +#define __pyx_kp_u_Function_cuLaunchKernel_not_foun __pyx_string_tab[247] +#define __pyx_kp_u_Function_cuLaunch_not_found __pyx_string_tab[248] +#define __pyx_kp_u_Function_cuLibraryEnumerateKerne __pyx_string_tab[249] +#define __pyx_kp_u_Function_cuLibraryGetGlobal_not __pyx_string_tab[250] +#define __pyx_kp_u_Function_cuLibraryGetKernelCount __pyx_string_tab[251] +#define __pyx_kp_u_Function_cuLibraryGetKernel_not __pyx_string_tab[252] +#define __pyx_kp_u_Function_cuLibraryGetManaged_not __pyx_string_tab[253] +#define __pyx_kp_u_Function_cuLibraryGetModule_not __pyx_string_tab[254] +#define __pyx_kp_u_Function_cuLibraryGetUnifiedFunc __pyx_string_tab[255] +#define __pyx_kp_u_Function_cuLibraryLoadData_not_f __pyx_string_tab[256] +#define __pyx_kp_u_Function_cuLibraryLoadFromFile_n __pyx_string_tab[257] +#define __pyx_kp_u_Function_cuLibraryUnload_not_fou __pyx_string_tab[258] +#define __pyx_kp_u_Function_cuLinkAddData_v2_not_fo __pyx_string_tab[259] +#define __pyx_kp_u_Function_cuLinkAddFile_v2_not_fo __pyx_string_tab[260] +#define __pyx_kp_u_Function_cuLinkComplete_not_foun __pyx_string_tab[261] +#define __pyx_kp_u_Function_cuLinkCreate_v2_not_fou __pyx_string_tab[262] +#define __pyx_kp_u_Function_cuLinkDestroy_not_found __pyx_string_tab[263] +#define __pyx_kp_u_Function_cuLogsCurrent_not_found __pyx_string_tab[264] +#define __pyx_kp_u_Function_cuLogsDumpToFile_not_fo __pyx_string_tab[265] +#define __pyx_kp_u_Function_cuLogsDumpToMemory_not __pyx_string_tab[266] +#define __pyx_kp_u_Function_cuLogsRegisterCallback __pyx_string_tab[267] +#define __pyx_kp_u_Function_cuLogsUnregisterCallbac __pyx_string_tab[268] +#define __pyx_kp_u_Function_cuMemAddressFree_not_fo __pyx_string_tab[269] +#define __pyx_kp_u_Function_cuMemAddressReserve_not __pyx_string_tab[270] +#define __pyx_kp_u_Function_cuMemAdvise_not_found __pyx_string_tab[271] +#define __pyx_kp_u_Function_cuMemAdvise_v2_not_foun __pyx_string_tab[272] +#define __pyx_kp_u_Function_cuMemAllocAsync_not_fou __pyx_string_tab[273] +#define __pyx_kp_u_Function_cuMemAllocFromPoolAsync __pyx_string_tab[274] +#define __pyx_kp_u_Function_cuMemAllocHost_v2_not_f __pyx_string_tab[275] +#define __pyx_kp_u_Function_cuMemAllocManaged_not_f __pyx_string_tab[276] +#define __pyx_kp_u_Function_cuMemAllocPitch_v2_not __pyx_string_tab[277] +#define __pyx_kp_u_Function_cuMemAlloc_v2_not_found __pyx_string_tab[278] +#define __pyx_kp_u_Function_cuMemBatchDecompressAsy __pyx_string_tab[279] +#define __pyx_kp_u_Function_cuMemCreate_not_found __pyx_string_tab[280] +#define __pyx_kp_u_Function_cuMemExportToShareableH __pyx_string_tab[281] +#define __pyx_kp_u_Function_cuMemFreeAsync_not_foun __pyx_string_tab[282] +#define __pyx_kp_u_Function_cuMemFreeHost_not_found __pyx_string_tab[283] +#define __pyx_kp_u_Function_cuMemFree_v2_not_found __pyx_string_tab[284] +#define __pyx_kp_u_Function_cuMemGetAccess_not_foun __pyx_string_tab[285] +#define __pyx_kp_u_Function_cuMemGetAddressRange_v2 __pyx_string_tab[286] +#define __pyx_kp_u_Function_cuMemGetAllocationGranu __pyx_string_tab[287] +#define __pyx_kp_u_Function_cuMemGetAllocationPrope __pyx_string_tab[288] +#define __pyx_kp_u_Function_cuMemGetHandleForAddres __pyx_string_tab[289] +#define __pyx_kp_u_Function_cuMemGetInfo_v2_not_fou __pyx_string_tab[290] +#define __pyx_kp_u_Function_cuMemHostAlloc_not_foun __pyx_string_tab[291] +#define __pyx_kp_u_Function_cuMemHostGetDevicePoint __pyx_string_tab[292] +#define __pyx_kp_u_Function_cuMemHostGetFlags_not_f __pyx_string_tab[293] +#define __pyx_kp_u_Function_cuMemHostRegister_v2_no __pyx_string_tab[294] +#define __pyx_kp_u_Function_cuMemHostUnregister_not __pyx_string_tab[295] +#define __pyx_kp_u_Function_cuMemImportFromShareabl __pyx_string_tab[296] +#define __pyx_kp_u_Function_cuMemMapArrayAsync_not __pyx_string_tab[297] +#define __pyx_kp_u_Function_cuMemMap_not_found __pyx_string_tab[298] +#define __pyx_kp_u_Function_cuMemPoolCreate_not_fou __pyx_string_tab[299] +#define __pyx_kp_u_Function_cuMemPoolDestroy_not_fo __pyx_string_tab[300] +#define __pyx_kp_u_Function_cuMemPoolExportPointer __pyx_string_tab[301] +#define __pyx_kp_u_Function_cuMemPoolExportToSharea __pyx_string_tab[302] +#define __pyx_kp_u_Function_cuMemPoolGetAccess_not __pyx_string_tab[303] +#define __pyx_kp_u_Function_cuMemPoolGetAttribute_n __pyx_string_tab[304] +#define __pyx_kp_u_Function_cuMemPoolImportFromShar __pyx_string_tab[305] +#define __pyx_kp_u_Function_cuMemPoolImportPointer __pyx_string_tab[306] +#define __pyx_kp_u_Function_cuMemPoolSetAccess_not __pyx_string_tab[307] +#define __pyx_kp_u_Function_cuMemPoolSetAttribute_n __pyx_string_tab[308] +#define __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou __pyx_string_tab[309] +#define __pyx_kp_u_Function_cuMemPrefetchAsync_not __pyx_string_tab[310] +#define __pyx_kp_u_Function_cuMemPrefetchAsync_v2_n __pyx_string_tab[311] +#define __pyx_kp_u_Function_cuMemRangeGetAttribute __pyx_string_tab[312] +#define __pyx_kp_u_Function_cuMemRangeGetAttributes __pyx_string_tab[313] +#define __pyx_kp_u_Function_cuMemRelease_not_found __pyx_string_tab[314] +#define __pyx_kp_u_Function_cuMemRetainAllocationHa __pyx_string_tab[315] +#define __pyx_kp_u_Function_cuMemSetAccess_not_foun __pyx_string_tab[316] +#define __pyx_kp_u_Function_cuMemUnmap_not_found __pyx_string_tab[317] +#define __pyx_kp_u_Function_cuMemcpy2DAsync_v2_not __pyx_string_tab[318] +#define __pyx_kp_u_Function_cuMemcpy2DUnaligned_v2 __pyx_string_tab[319] +#define __pyx_kp_u_Function_cuMemcpy2D_v2_not_found __pyx_string_tab[320] +#define __pyx_kp_u_Function_cuMemcpy3DAsync_v2_not __pyx_string_tab[321] +#define __pyx_kp_u_Function_cuMemcpy3DBatchAsync_no __pyx_string_tab[322] +#define __pyx_kp_u_Function_cuMemcpy3DPeerAsync_not __pyx_string_tab[323] +#define __pyx_kp_u_Function_cuMemcpy3DPeer_not_foun __pyx_string_tab[324] +#define __pyx_kp_u_Function_cuMemcpy3D_v2_not_found __pyx_string_tab[325] +#define __pyx_kp_u_Function_cuMemcpyAsync_not_found __pyx_string_tab[326] +#define __pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou __pyx_string_tab[327] +#define __pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou __pyx_string_tab[328] +#define __pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no __pyx_string_tab[329] +#define __pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou __pyx_string_tab[330] +#define __pyx_kp_u_Function_cuMemcpyBatchAsync_not __pyx_string_tab[331] +#define __pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou __pyx_string_tab[332] +#define __pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no __pyx_string_tab[333] +#define __pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou __pyx_string_tab[334] +#define __pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no __pyx_string_tab[335] +#define __pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou __pyx_string_tab[336] +#define __pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no __pyx_string_tab[337] +#define __pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou __pyx_string_tab[338] +#define __pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no __pyx_string_tab[339] +#define __pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou __pyx_string_tab[340] +#define __pyx_kp_u_Function_cuMemcpyPeerAsync_not_f __pyx_string_tab[341] +#define __pyx_kp_u_Function_cuMemcpyPeer_not_found __pyx_string_tab[342] +#define __pyx_kp_u_Function_cuMemcpy_not_found __pyx_string_tab[343] +#define __pyx_kp_u_Function_cuMemsetD16Async_not_fo __pyx_string_tab[344] +#define __pyx_kp_u_Function_cuMemsetD16_v2_not_foun __pyx_string_tab[345] +#define __pyx_kp_u_Function_cuMemsetD2D16Async_not __pyx_string_tab[346] +#define __pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo __pyx_string_tab[347] +#define __pyx_kp_u_Function_cuMemsetD2D32Async_not __pyx_string_tab[348] +#define __pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo __pyx_string_tab[349] +#define __pyx_kp_u_Function_cuMemsetD2D8Async_not_f __pyx_string_tab[350] +#define __pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou __pyx_string_tab[351] +#define __pyx_kp_u_Function_cuMemsetD32Async_not_fo __pyx_string_tab[352] +#define __pyx_kp_u_Function_cuMemsetD32_v2_not_foun __pyx_string_tab[353] +#define __pyx_kp_u_Function_cuMemsetD8Async_not_fou __pyx_string_tab[354] +#define __pyx_kp_u_Function_cuMemsetD8_v2_not_found __pyx_string_tab[355] +#define __pyx_kp_u_Function_cuMipmappedArrayCreate __pyx_string_tab[356] +#define __pyx_kp_u_Function_cuMipmappedArrayDestroy __pyx_string_tab[357] +#define __pyx_kp_u_Function_cuMipmappedArrayGetLeve __pyx_string_tab[358] +#define __pyx_kp_u_Function_cuMipmappedArrayGetMemo __pyx_string_tab[359] +#define __pyx_kp_u_Function_cuMipmappedArrayGetSpar __pyx_string_tab[360] +#define __pyx_kp_u_Function_cuModuleEnumerateFuncti __pyx_string_tab[361] +#define __pyx_kp_u_Function_cuModuleGetFunctionCoun __pyx_string_tab[362] +#define __pyx_kp_u_Function_cuModuleGetFunction_not __pyx_string_tab[363] +#define __pyx_kp_u_Function_cuModuleGetGlobal_v2_no __pyx_string_tab[364] +#define __pyx_kp_u_Function_cuModuleGetLoadingMode __pyx_string_tab[365] +#define __pyx_kp_u_Function_cuModuleGetSurfRef_not __pyx_string_tab[366] +#define __pyx_kp_u_Function_cuModuleGetTexRef_not_f __pyx_string_tab[367] +#define __pyx_kp_u_Function_cuModuleLoadDataEx_not __pyx_string_tab[368] +#define __pyx_kp_u_Function_cuModuleLoadData_not_fo __pyx_string_tab[369] +#define __pyx_kp_u_Function_cuModuleLoadFatBinary_n __pyx_string_tab[370] +#define __pyx_kp_u_Function_cuModuleLoad_not_found __pyx_string_tab[371] +#define __pyx_kp_u_Function_cuModuleUnload_not_foun __pyx_string_tab[372] +#define __pyx_kp_u_Function_cuMulticastAddDevice_no __pyx_string_tab[373] +#define __pyx_kp_u_Function_cuMulticastBindAddr_not __pyx_string_tab[374] +#define __pyx_kp_u_Function_cuMulticastBindMem_not __pyx_string_tab[375] +#define __pyx_kp_u_Function_cuMulticastCreate_not_f __pyx_string_tab[376] +#define __pyx_kp_u_Function_cuMulticastGetGranulari __pyx_string_tab[377] +#define __pyx_kp_u_Function_cuMulticastUnbind_not_f __pyx_string_tab[378] +#define __pyx_kp_u_Function_cuOccupancyAvailableDyn __pyx_string_tab[379] +#define __pyx_kp_u_Function_cuOccupancyMaxActiveBlo __pyx_string_tab[380] +#define __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2 __pyx_string_tab[381] +#define __pyx_kp_u_Function_cuOccupancyMaxActiveClu __pyx_string_tab[382] +#define __pyx_kp_u_Function_cuOccupancyMaxPotential __pyx_string_tab[383] +#define __pyx_kp_u_Function_cuOccupancyMaxPotential_2 __pyx_string_tab[384] +#define __pyx_kp_u_Function_cuOccupancyMaxPotential_3 __pyx_string_tab[385] +#define __pyx_kp_u_Function_cuParamSetSize_not_foun __pyx_string_tab[386] +#define __pyx_kp_u_Function_cuParamSetTexRef_not_fo __pyx_string_tab[387] +#define __pyx_kp_u_Function_cuParamSetf_not_found __pyx_string_tab[388] +#define __pyx_kp_u_Function_cuParamSeti_not_found __pyx_string_tab[389] +#define __pyx_kp_u_Function_cuParamSetv_not_found __pyx_string_tab[390] +#define __pyx_kp_u_Function_cuPointerGetAttribute_n __pyx_string_tab[391] +#define __pyx_kp_u_Function_cuPointerGetAttributes __pyx_string_tab[392] +#define __pyx_kp_u_Function_cuPointerSetAttribute_n __pyx_string_tab[393] +#define __pyx_kp_u_Function_cuProfilerStart_not_fou __pyx_string_tab[394] +#define __pyx_kp_u_Function_cuProfilerStop_not_foun __pyx_string_tab[395] +#define __pyx_kp_u_Function_cuSignalExternalSemapho __pyx_string_tab[396] +#define __pyx_kp_u_Function_cuStreamAddCallback_not __pyx_string_tab[397] +#define __pyx_kp_u_Function_cuStreamAttachMemAsync __pyx_string_tab[398] +#define __pyx_kp_u_Function_cuStreamBatchMemOp_v2_n __pyx_string_tab[399] +#define __pyx_kp_u_Function_cuStreamBeginCaptureToG __pyx_string_tab[400] +#define __pyx_kp_u_Function_cuStreamBeginCapture_v2 __pyx_string_tab[401] +#define __pyx_kp_u_Function_cuStreamCopyAttributes __pyx_string_tab[402] +#define __pyx_kp_u_Function_cuStreamCreateWithPrior __pyx_string_tab[403] +#define __pyx_kp_u_Function_cuStreamCreate_not_foun __pyx_string_tab[404] +#define __pyx_kp_u_Function_cuStreamDestroy_v2_not __pyx_string_tab[405] +#define __pyx_kp_u_Function_cuStreamEndCapture_not __pyx_string_tab[406] +#define __pyx_kp_u_Function_cuStreamGetAttribute_no __pyx_string_tab[407] +#define __pyx_kp_u_Function_cuStreamGetCaptureInfo __pyx_string_tab[408] +#define __pyx_kp_u_Function_cuStreamGetCaptureInfo_2 __pyx_string_tab[409] +#define __pyx_kp_u_Function_cuStreamGetCtx_not_foun __pyx_string_tab[410] +#define __pyx_kp_u_Function_cuStreamGetCtx_v2_not_f __pyx_string_tab[411] +#define __pyx_kp_u_Function_cuStreamGetDevice_not_f __pyx_string_tab[412] +#define __pyx_kp_u_Function_cuStreamGetFlags_not_fo __pyx_string_tab[413] +#define __pyx_kp_u_Function_cuStreamGetGreenCtx_not __pyx_string_tab[414] +#define __pyx_kp_u_Function_cuStreamGetId_not_found __pyx_string_tab[415] +#define __pyx_kp_u_Function_cuStreamGetPriority_not __pyx_string_tab[416] +#define __pyx_kp_u_Function_cuStreamIsCapturing_not __pyx_string_tab[417] +#define __pyx_kp_u_Function_cuStreamQuery_not_found __pyx_string_tab[418] +#define __pyx_kp_u_Function_cuStreamSetAttribute_no __pyx_string_tab[419] +#define __pyx_kp_u_Function_cuStreamSynchronize_not __pyx_string_tab[420] +#define __pyx_kp_u_Function_cuStreamUpdateCaptureDe __pyx_string_tab[421] +#define __pyx_kp_u_Function_cuStreamUpdateCaptureDe_2 __pyx_string_tab[422] +#define __pyx_kp_u_Function_cuStreamWaitEvent_not_f __pyx_string_tab[423] +#define __pyx_kp_u_Function_cuStreamWaitValue32_v2 __pyx_string_tab[424] +#define __pyx_kp_u_Function_cuStreamWaitValue64_v2 __pyx_string_tab[425] +#define __pyx_kp_u_Function_cuStreamWriteValue32_v2 __pyx_string_tab[426] +#define __pyx_kp_u_Function_cuStreamWriteValue64_v2 __pyx_string_tab[427] +#define __pyx_kp_u_Function_cuSurfObjectCreate_not __pyx_string_tab[428] +#define __pyx_kp_u_Function_cuSurfObjectDestroy_not __pyx_string_tab[429] +#define __pyx_kp_u_Function_cuSurfObjectGetResource __pyx_string_tab[430] +#define __pyx_kp_u_Function_cuSurfRefGetArray_not_f __pyx_string_tab[431] +#define __pyx_kp_u_Function_cuSurfRefSetArray_not_f __pyx_string_tab[432] +#define __pyx_kp_u_Function_cuTensorMapEncodeIm2col __pyx_string_tab[433] +#define __pyx_kp_u_Function_cuTensorMapEncodeIm2col_2 __pyx_string_tab[434] +#define __pyx_kp_u_Function_cuTensorMapEncodeTiled __pyx_string_tab[435] +#define __pyx_kp_u_Function_cuTensorMapReplaceAddre __pyx_string_tab[436] +#define __pyx_kp_u_Function_cuTexObjectCreate_not_f __pyx_string_tab[437] +#define __pyx_kp_u_Function_cuTexObjectDestroy_not __pyx_string_tab[438] +#define __pyx_kp_u_Function_cuTexObjectGetResourceD __pyx_string_tab[439] +#define __pyx_kp_u_Function_cuTexObjectGetResourceV __pyx_string_tab[440] +#define __pyx_kp_u_Function_cuTexObjectGetTextureDe __pyx_string_tab[441] +#define __pyx_kp_u_Function_cuTexRefCreate_not_foun __pyx_string_tab[442] +#define __pyx_kp_u_Function_cuTexRefDestroy_not_fou __pyx_string_tab[443] +#define __pyx_kp_u_Function_cuTexRefGetAddressMode __pyx_string_tab[444] +#define __pyx_kp_u_Function_cuTexRefGetAddress_v2_n __pyx_string_tab[445] +#define __pyx_kp_u_Function_cuTexRefGetArray_not_fo __pyx_string_tab[446] +#define __pyx_kp_u_Function_cuTexRefGetBorderColor __pyx_string_tab[447] +#define __pyx_kp_u_Function_cuTexRefGetFilterMode_n __pyx_string_tab[448] +#define __pyx_kp_u_Function_cuTexRefGetFlags_not_fo __pyx_string_tab[449] +#define __pyx_kp_u_Function_cuTexRefGetFormat_not_f __pyx_string_tab[450] +#define __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop __pyx_string_tab[451] +#define __pyx_kp_u_Function_cuTexRefGetMipmapFilter __pyx_string_tab[452] +#define __pyx_kp_u_Function_cuTexRefGetMipmapLevelB __pyx_string_tab[453] +#define __pyx_kp_u_Function_cuTexRefGetMipmapLevelC __pyx_string_tab[454] +#define __pyx_kp_u_Function_cuTexRefGetMipmappedArr __pyx_string_tab[455] +#define __pyx_kp_u_Function_cuTexRefSetAddress2D_v3 __pyx_string_tab[456] +#define __pyx_kp_u_Function_cuTexRefSetAddressMode __pyx_string_tab[457] +#define __pyx_kp_u_Function_cuTexRefSetAddress_v2_n __pyx_string_tab[458] +#define __pyx_kp_u_Function_cuTexRefSetArray_not_fo __pyx_string_tab[459] +#define __pyx_kp_u_Function_cuTexRefSetBorderColor __pyx_string_tab[460] +#define __pyx_kp_u_Function_cuTexRefSetFilterMode_n __pyx_string_tab[461] +#define __pyx_kp_u_Function_cuTexRefSetFlags_not_fo __pyx_string_tab[462] +#define __pyx_kp_u_Function_cuTexRefSetFormat_not_f __pyx_string_tab[463] +#define __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop __pyx_string_tab[464] +#define __pyx_kp_u_Function_cuTexRefSetMipmapFilter __pyx_string_tab[465] +#define __pyx_kp_u_Function_cuTexRefSetMipmapLevelB __pyx_string_tab[466] +#define __pyx_kp_u_Function_cuTexRefSetMipmapLevelC __pyx_string_tab[467] +#define __pyx_kp_u_Function_cuTexRefSetMipmappedArr __pyx_string_tab[468] +#define __pyx_kp_u_Function_cuThreadExchangeStreamC __pyx_string_tab[469] +#define __pyx_kp_u_Function_cuUserObjectCreate_not __pyx_string_tab[470] +#define __pyx_kp_u_Function_cuUserObjectRelease_not __pyx_string_tab[471] +#define __pyx_kp_u_Function_cuUserObjectRetain_not __pyx_string_tab[472] +#define __pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not __pyx_string_tab[473] +#define __pyx_kp_u_Function_cuVDPAUGetDevice_not_fo __pyx_string_tab[474] +#define __pyx_kp_u_Function_cuWaitExternalSemaphore __pyx_string_tab[475] +#define __pyx_n_u_Lock __pyx_string_tab[476] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[477] +#define __pyx_n_u_RuntimeError __pyx_string_tab[478] +#define __pyx_kp_u_add_note __pyx_string_tab[479] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[480] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[481] +#define __pyx_n_u_cuArray3DCreate_v2 __pyx_string_tab[482] +#define __pyx_n_u_cuArray3DGetDescriptor_v2 __pyx_string_tab[483] +#define __pyx_n_u_cuArrayCreate_v2 __pyx_string_tab[484] +#define __pyx_n_u_cuArrayDestroy __pyx_string_tab[485] +#define __pyx_n_u_cuArrayGetDescriptor_v2 __pyx_string_tab[486] +#define __pyx_n_u_cuArrayGetMemoryRequirements __pyx_string_tab[487] +#define __pyx_n_u_cuArrayGetPlane __pyx_string_tab[488] +#define __pyx_n_u_cuArrayGetSparseProperties __pyx_string_tab[489] +#define __pyx_n_u_cuCheckpointProcessCheckpoint __pyx_string_tab[490] +#define __pyx_n_u_cuCheckpointProcessGetRestoreT __pyx_string_tab[491] +#define __pyx_n_u_cuCheckpointProcessGetState __pyx_string_tab[492] +#define __pyx_n_u_cuCheckpointProcessLock __pyx_string_tab[493] +#define __pyx_n_u_cuCheckpointProcessRestore __pyx_string_tab[494] +#define __pyx_n_u_cuCheckpointProcessUnlock __pyx_string_tab[495] +#define __pyx_n_u_cuCoredumpGetAttribute __pyx_string_tab[496] +#define __pyx_n_u_cuCoredumpGetAttributeGlobal __pyx_string_tab[497] +#define __pyx_n_u_cuCoredumpSetAttribute __pyx_string_tab[498] +#define __pyx_n_u_cuCoredumpSetAttributeGlobal __pyx_string_tab[499] +#define __pyx_n_u_cuCtxAttach __pyx_string_tab[500] +#define __pyx_n_u_cuCtxCreate_v2 __pyx_string_tab[501] +#define __pyx_n_u_cuCtxCreate_v3 __pyx_string_tab[502] +#define __pyx_n_u_cuCtxCreate_v4 __pyx_string_tab[503] +#define __pyx_n_u_cuCtxDestroy_v2 __pyx_string_tab[504] +#define __pyx_n_u_cuCtxDetach __pyx_string_tab[505] +#define __pyx_n_u_cuCtxDisablePeerAccess __pyx_string_tab[506] +#define __pyx_n_u_cuCtxEnablePeerAccess __pyx_string_tab[507] +#define __pyx_n_u_cuCtxFromGreenCtx __pyx_string_tab[508] +#define __pyx_n_u_cuCtxGetApiVersion __pyx_string_tab[509] +#define __pyx_n_u_cuCtxGetCacheConfig __pyx_string_tab[510] +#define __pyx_n_u_cuCtxGetCurrent __pyx_string_tab[511] +#define __pyx_n_u_cuCtxGetDevResource __pyx_string_tab[512] +#define __pyx_n_u_cuCtxGetDevice __pyx_string_tab[513] +#define __pyx_n_u_cuCtxGetExecAffinity __pyx_string_tab[514] +#define __pyx_n_u_cuCtxGetFlags __pyx_string_tab[515] +#define __pyx_n_u_cuCtxGetId __pyx_string_tab[516] +#define __pyx_n_u_cuCtxGetLimit __pyx_string_tab[517] +#define __pyx_n_u_cuCtxGetSharedMemConfig __pyx_string_tab[518] +#define __pyx_n_u_cuCtxGetStreamPriorityRange __pyx_string_tab[519] +#define __pyx_n_u_cuCtxPopCurrent_v2 __pyx_string_tab[520] +#define __pyx_n_u_cuCtxPushCurrent_v2 __pyx_string_tab[521] +#define __pyx_n_u_cuCtxRecordEvent __pyx_string_tab[522] +#define __pyx_n_u_cuCtxResetPersistingL2Cache __pyx_string_tab[523] +#define __pyx_n_u_cuCtxSetCacheConfig __pyx_string_tab[524] +#define __pyx_n_u_cuCtxSetCurrent __pyx_string_tab[525] +#define __pyx_n_u_cuCtxSetFlags __pyx_string_tab[526] +#define __pyx_n_u_cuCtxSetLimit __pyx_string_tab[527] +#define __pyx_n_u_cuCtxSetSharedMemConfig __pyx_string_tab[528] +#define __pyx_n_u_cuCtxSynchronize __pyx_string_tab[529] +#define __pyx_n_u_cuCtxWaitEvent __pyx_string_tab[530] +#define __pyx_n_u_cuDestroyExternalMemory __pyx_string_tab[531] +#define __pyx_n_u_cuDestroyExternalSemaphore __pyx_string_tab[532] +#define __pyx_n_u_cuDevResourceGenerateDesc __pyx_string_tab[533] +#define __pyx_n_u_cuDevSmResourceSplitByCount __pyx_string_tab[534] +#define __pyx_n_u_cuDeviceCanAccessPeer __pyx_string_tab[535] +#define __pyx_n_u_cuDeviceComputeCapability __pyx_string_tab[536] +#define __pyx_n_u_cuDeviceGet __pyx_string_tab[537] +#define __pyx_n_u_cuDeviceGetAttribute __pyx_string_tab[538] +#define __pyx_n_u_cuDeviceGetByPCIBusId __pyx_string_tab[539] +#define __pyx_n_u_cuDeviceGetCount __pyx_string_tab[540] +#define __pyx_n_u_cuDeviceGetDefaultMemPool __pyx_string_tab[541] +#define __pyx_n_u_cuDeviceGetDevResource __pyx_string_tab[542] +#define __pyx_n_u_cuDeviceGetExecAffinitySupport __pyx_string_tab[543] +#define __pyx_n_u_cuDeviceGetGraphMemAttribute __pyx_string_tab[544] +#define __pyx_n_u_cuDeviceGetLuid __pyx_string_tab[545] +#define __pyx_n_u_cuDeviceGetMemPool __pyx_string_tab[546] +#define __pyx_n_u_cuDeviceGetName __pyx_string_tab[547] +#define __pyx_n_u_cuDeviceGetNvSciSyncAttributes __pyx_string_tab[548] +#define __pyx_n_u_cuDeviceGetP2PAttribute __pyx_string_tab[549] +#define __pyx_n_u_cuDeviceGetPCIBusId __pyx_string_tab[550] +#define __pyx_n_u_cuDeviceGetProperties __pyx_string_tab[551] +#define __pyx_n_u_cuDeviceGetTexture1DLinearMaxW __pyx_string_tab[552] +#define __pyx_n_u_cuDeviceGetUuid __pyx_string_tab[553] +#define __pyx_n_u_cuDeviceGetUuid_v2 __pyx_string_tab[554] +#define __pyx_n_u_cuDeviceGraphMemTrim __pyx_string_tab[555] +#define __pyx_n_u_cuDevicePrimaryCtxGetState __pyx_string_tab[556] +#define __pyx_n_u_cuDevicePrimaryCtxRelease_v2 __pyx_string_tab[557] +#define __pyx_n_u_cuDevicePrimaryCtxReset_v2 __pyx_string_tab[558] +#define __pyx_n_u_cuDevicePrimaryCtxRetain __pyx_string_tab[559] +#define __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2 __pyx_string_tab[560] +#define __pyx_n_u_cuDeviceRegisterAsyncNotificat __pyx_string_tab[561] +#define __pyx_n_u_cuDeviceSetGraphMemAttribute __pyx_string_tab[562] +#define __pyx_n_u_cuDeviceSetMemPool __pyx_string_tab[563] +#define __pyx_n_u_cuDeviceTotalMem_v2 __pyx_string_tab[564] +#define __pyx_n_u_cuDeviceUnregisterAsyncNotific __pyx_string_tab[565] +#define __pyx_n_u_cuDriverGetVersion __pyx_string_tab[566] +#define __pyx_n_u_cuEGLStreamConsumerAcquireFram __pyx_string_tab[567] +#define __pyx_n_u_cuEGLStreamConsumerConnect __pyx_string_tab[568] +#define __pyx_n_u_cuEGLStreamConsumerConnectWith __pyx_string_tab[569] +#define __pyx_n_u_cuEGLStreamConsumerDisconnect __pyx_string_tab[570] +#define __pyx_n_u_cuEGLStreamConsumerReleaseFram __pyx_string_tab[571] +#define __pyx_n_u_cuEGLStreamProducerConnect __pyx_string_tab[572] +#define __pyx_n_u_cuEGLStreamProducerDisconnect __pyx_string_tab[573] +#define __pyx_n_u_cuEGLStreamProducerPresentFram __pyx_string_tab[574] +#define __pyx_n_u_cuEGLStreamProducerReturnFrame __pyx_string_tab[575] +#define __pyx_n_u_cuEventCreate __pyx_string_tab[576] +#define __pyx_n_u_cuEventCreateFromEGLSync __pyx_string_tab[577] +#define __pyx_n_u_cuEventDestroy_v2 __pyx_string_tab[578] +#define __pyx_n_u_cuEventElapsedTime __pyx_string_tab[579] +#define __pyx_n_u_cuEventElapsedTime_v2 __pyx_string_tab[580] +#define __pyx_n_u_cuEventQuery __pyx_string_tab[581] +#define __pyx_n_u_cuEventRecord __pyx_string_tab[582] +#define __pyx_n_u_cuEventRecordWithFlags __pyx_string_tab[583] +#define __pyx_n_u_cuEventSynchronize __pyx_string_tab[584] +#define __pyx_n_u_cuExternalMemoryGetMappedBuffe __pyx_string_tab[585] +#define __pyx_n_u_cuExternalMemoryGetMappedMipma __pyx_string_tab[586] +#define __pyx_n_u_cuFlushGPUDirectRDMAWrites __pyx_string_tab[587] +#define __pyx_n_u_cuFuncGetAttribute __pyx_string_tab[588] +#define __pyx_n_u_cuFuncGetModule __pyx_string_tab[589] +#define __pyx_n_u_cuFuncGetName __pyx_string_tab[590] +#define __pyx_n_u_cuFuncGetParamInfo __pyx_string_tab[591] +#define __pyx_n_u_cuFuncIsLoaded __pyx_string_tab[592] +#define __pyx_n_u_cuFuncLoad __pyx_string_tab[593] +#define __pyx_n_u_cuFuncSetAttribute __pyx_string_tab[594] +#define __pyx_n_u_cuFuncSetBlockShape __pyx_string_tab[595] +#define __pyx_n_u_cuFuncSetCacheConfig __pyx_string_tab[596] +#define __pyx_n_u_cuFuncSetSharedMemConfig __pyx_string_tab[597] +#define __pyx_n_u_cuFuncSetSharedSize __pyx_string_tab[598] +#define __pyx_n_u_cuGLGetDevices_v2 __pyx_string_tab[599] +#define __pyx_n_u_cuGetErrorName __pyx_string_tab[600] +#define __pyx_n_u_cuGetErrorString __pyx_string_tab[601] +#define __pyx_n_u_cuGetExportTable __pyx_string_tab[602] +#define __pyx_n_u_cuGetProcAddress_v2 __pyx_string_tab[603] +#define __pyx_n_u_cuGraphAddBatchMemOpNode __pyx_string_tab[604] +#define __pyx_n_u_cuGraphAddChildGraphNode __pyx_string_tab[605] +#define __pyx_n_u_cuGraphAddDependencies __pyx_string_tab[606] +#define __pyx_n_u_cuGraphAddDependencies_v2 __pyx_string_tab[607] +#define __pyx_n_u_cuGraphAddEmptyNode __pyx_string_tab[608] +#define __pyx_n_u_cuGraphAddEventRecordNode __pyx_string_tab[609] +#define __pyx_n_u_cuGraphAddEventWaitNode __pyx_string_tab[610] +#define __pyx_n_u_cuGraphAddExternalSemaphoresSi __pyx_string_tab[611] +#define __pyx_n_u_cuGraphAddExternalSemaphoresWa __pyx_string_tab[612] +#define __pyx_n_u_cuGraphAddHostNode __pyx_string_tab[613] +#define __pyx_n_u_cuGraphAddKernelNode_v2 __pyx_string_tab[614] +#define __pyx_n_u_cuGraphAddMemAllocNode __pyx_string_tab[615] +#define __pyx_n_u_cuGraphAddMemFreeNode __pyx_string_tab[616] +#define __pyx_n_u_cuGraphAddMemcpyNode __pyx_string_tab[617] +#define __pyx_n_u_cuGraphAddMemsetNode __pyx_string_tab[618] +#define __pyx_n_u_cuGraphAddNode __pyx_string_tab[619] +#define __pyx_n_u_cuGraphAddNode_v2 __pyx_string_tab[620] +#define __pyx_n_u_cuGraphBatchMemOpNodeGetParams __pyx_string_tab[621] +#define __pyx_n_u_cuGraphBatchMemOpNodeSetParams __pyx_string_tab[622] +#define __pyx_n_u_cuGraphChildGraphNodeGetGraph __pyx_string_tab[623] +#define __pyx_n_u_cuGraphClone __pyx_string_tab[624] +#define __pyx_n_u_cuGraphConditionalHandleCreate __pyx_string_tab[625] +#define __pyx_n_u_cuGraphCreate __pyx_string_tab[626] +#define __pyx_n_u_cuGraphDebugDotPrint __pyx_string_tab[627] +#define __pyx_n_u_cuGraphDestroy __pyx_string_tab[628] +#define __pyx_n_u_cuGraphDestroyNode __pyx_string_tab[629] +#define __pyx_n_u_cuGraphEventRecordNodeGetEvent __pyx_string_tab[630] +#define __pyx_n_u_cuGraphEventRecordNodeSetEvent __pyx_string_tab[631] +#define __pyx_n_u_cuGraphEventWaitNodeGetEvent __pyx_string_tab[632] +#define __pyx_n_u_cuGraphEventWaitNodeSetEvent __pyx_string_tab[633] +#define __pyx_n_u_cuGraphExecBatchMemOpNodeSetPa __pyx_string_tab[634] +#define __pyx_n_u_cuGraphExecChildGraphNodeSetPa __pyx_string_tab[635] +#define __pyx_n_u_cuGraphExecDestroy __pyx_string_tab[636] +#define __pyx_n_u_cuGraphExecEventRecordNodeSetE __pyx_string_tab[637] +#define __pyx_n_u_cuGraphExecEventWaitNodeSetEve __pyx_string_tab[638] +#define __pyx_n_u_cuGraphExecExternalSemaphoresS __pyx_string_tab[639] +#define __pyx_n_u_cuGraphExecExternalSemaphoresW __pyx_string_tab[640] +#define __pyx_n_u_cuGraphExecGetFlags __pyx_string_tab[641] +#define __pyx_n_u_cuGraphExecHostNodeSetParams __pyx_string_tab[642] +#define __pyx_n_u_cuGraphExecKernelNodeSetParams __pyx_string_tab[643] +#define __pyx_n_u_cuGraphExecMemcpyNodeSetParams __pyx_string_tab[644] +#define __pyx_n_u_cuGraphExecMemsetNodeSetParams __pyx_string_tab[645] +#define __pyx_n_u_cuGraphExecNodeSetParams __pyx_string_tab[646] +#define __pyx_n_u_cuGraphExecUpdate_v2 __pyx_string_tab[647] +#define __pyx_n_u_cuGraphExternalSemaphoresSigna __pyx_string_tab[648] +#define __pyx_n_u_cuGraphExternalSemaphoresSigna_2 __pyx_string_tab[649] +#define __pyx_n_u_cuGraphExternalSemaphoresWaitN __pyx_string_tab[650] +#define __pyx_n_u_cuGraphExternalSemaphoresWaitN_2 __pyx_string_tab[651] +#define __pyx_n_u_cuGraphGetEdges __pyx_string_tab[652] +#define __pyx_n_u_cuGraphGetEdges_v2 __pyx_string_tab[653] +#define __pyx_n_u_cuGraphGetNodes __pyx_string_tab[654] +#define __pyx_n_u_cuGraphGetRootNodes __pyx_string_tab[655] +#define __pyx_n_u_cuGraphHostNodeGetParams __pyx_string_tab[656] +#define __pyx_n_u_cuGraphHostNodeSetParams __pyx_string_tab[657] +#define __pyx_n_u_cuGraphInstantiateWithFlags __pyx_string_tab[658] +#define __pyx_n_u_cuGraphInstantiateWithParams __pyx_string_tab[659] +#define __pyx_n_u_cuGraphKernelNodeCopyAttribute __pyx_string_tab[660] +#define __pyx_n_u_cuGraphKernelNodeGetAttribute __pyx_string_tab[661] +#define __pyx_n_u_cuGraphKernelNodeGetParams_v2 __pyx_string_tab[662] +#define __pyx_n_u_cuGraphKernelNodeSetAttribute __pyx_string_tab[663] +#define __pyx_n_u_cuGraphKernelNodeSetParams_v2 __pyx_string_tab[664] +#define __pyx_n_u_cuGraphLaunch __pyx_string_tab[665] +#define __pyx_n_u_cuGraphMemAllocNodeGetParams __pyx_string_tab[666] +#define __pyx_n_u_cuGraphMemFreeNodeGetParams __pyx_string_tab[667] +#define __pyx_n_u_cuGraphMemcpyNodeGetParams __pyx_string_tab[668] +#define __pyx_n_u_cuGraphMemcpyNodeSetParams __pyx_string_tab[669] +#define __pyx_n_u_cuGraphMemsetNodeGetParams __pyx_string_tab[670] +#define __pyx_n_u_cuGraphMemsetNodeSetParams __pyx_string_tab[671] +#define __pyx_n_u_cuGraphNodeFindInClone __pyx_string_tab[672] +#define __pyx_n_u_cuGraphNodeGetDependencies __pyx_string_tab[673] +#define __pyx_n_u_cuGraphNodeGetDependencies_v2 __pyx_string_tab[674] +#define __pyx_n_u_cuGraphNodeGetDependentNodes __pyx_string_tab[675] +#define __pyx_n_u_cuGraphNodeGetDependentNodes_v __pyx_string_tab[676] +#define __pyx_n_u_cuGraphNodeGetEnabled __pyx_string_tab[677] +#define __pyx_n_u_cuGraphNodeGetType __pyx_string_tab[678] +#define __pyx_n_u_cuGraphNodeSetEnabled __pyx_string_tab[679] +#define __pyx_n_u_cuGraphNodeSetParams __pyx_string_tab[680] +#define __pyx_n_u_cuGraphReleaseUserObject __pyx_string_tab[681] +#define __pyx_n_u_cuGraphRemoveDependencies __pyx_string_tab[682] +#define __pyx_n_u_cuGraphRemoveDependencies_v2 __pyx_string_tab[683] +#define __pyx_n_u_cuGraphRetainUserObject __pyx_string_tab[684] +#define __pyx_n_u_cuGraphUpload __pyx_string_tab[685] +#define __pyx_n_u_cuGraphicsEGLRegisterImage __pyx_string_tab[686] +#define __pyx_n_u_cuGraphicsGLRegisterBuffer __pyx_string_tab[687] +#define __pyx_n_u_cuGraphicsGLRegisterImage __pyx_string_tab[688] +#define __pyx_n_u_cuGraphicsMapResources __pyx_string_tab[689] +#define __pyx_n_u_cuGraphicsResourceGetMappedEgl __pyx_string_tab[690] +#define __pyx_n_u_cuGraphicsResourceGetMappedMip __pyx_string_tab[691] +#define __pyx_n_u_cuGraphicsResourceGetMappedPoi __pyx_string_tab[692] +#define __pyx_n_u_cuGraphicsResourceSetMapFlags __pyx_string_tab[693] +#define __pyx_n_u_cuGraphicsSubResourceGetMapped __pyx_string_tab[694] +#define __pyx_n_u_cuGraphicsUnmapResources __pyx_string_tab[695] +#define __pyx_n_u_cuGraphicsUnregisterResource __pyx_string_tab[696] +#define __pyx_n_u_cuGraphicsVDPAURegisterOutputS __pyx_string_tab[697] +#define __pyx_n_u_cuGraphicsVDPAURegisterVideoSu __pyx_string_tab[698] +#define __pyx_n_u_cuGreenCtxCreate __pyx_string_tab[699] +#define __pyx_n_u_cuGreenCtxDestroy __pyx_string_tab[700] +#define __pyx_n_u_cuGreenCtxGetDevResource __pyx_string_tab[701] +#define __pyx_n_u_cuGreenCtxRecordEvent __pyx_string_tab[702] +#define __pyx_n_u_cuGreenCtxStreamCreate __pyx_string_tab[703] +#define __pyx_n_u_cuGreenCtxWaitEvent __pyx_string_tab[704] +#define __pyx_n_u_cuImportExternalMemory __pyx_string_tab[705] +#define __pyx_n_u_cuImportExternalSemaphore __pyx_string_tab[706] +#define __pyx_n_u_cuInit __pyx_string_tab[707] +#define __pyx_n_u_cuIpcCloseMemHandle __pyx_string_tab[708] +#define __pyx_n_u_cuIpcGetEventHandle __pyx_string_tab[709] +#define __pyx_n_u_cuIpcGetMemHandle __pyx_string_tab[710] +#define __pyx_n_u_cuIpcOpenEventHandle __pyx_string_tab[711] +#define __pyx_n_u_cuIpcOpenMemHandle_v2 __pyx_string_tab[712] +#define __pyx_n_u_cuKernelGetAttribute __pyx_string_tab[713] +#define __pyx_n_u_cuKernelGetFunction __pyx_string_tab[714] +#define __pyx_n_u_cuKernelGetLibrary __pyx_string_tab[715] +#define __pyx_n_u_cuKernelGetName __pyx_string_tab[716] +#define __pyx_n_u_cuKernelGetParamInfo __pyx_string_tab[717] +#define __pyx_n_u_cuKernelSetAttribute __pyx_string_tab[718] +#define __pyx_n_u_cuKernelSetCacheConfig __pyx_string_tab[719] +#define __pyx_n_u_cuLaunch __pyx_string_tab[720] +#define __pyx_n_u_cuLaunchCooperativeKernel __pyx_string_tab[721] +#define __pyx_n_u_cuLaunchCooperativeKernelMulti __pyx_string_tab[722] +#define __pyx_n_u_cuLaunchGrid __pyx_string_tab[723] +#define __pyx_n_u_cuLaunchGridAsync __pyx_string_tab[724] +#define __pyx_n_u_cuLaunchHostFunc __pyx_string_tab[725] +#define __pyx_n_u_cuLaunchKernel __pyx_string_tab[726] +#define __pyx_n_u_cuLaunchKernelEx __pyx_string_tab[727] +#define __pyx_n_u_cuLibraryEnumerateKernels __pyx_string_tab[728] +#define __pyx_n_u_cuLibraryGetGlobal __pyx_string_tab[729] +#define __pyx_n_u_cuLibraryGetKernel __pyx_string_tab[730] +#define __pyx_n_u_cuLibraryGetKernelCount __pyx_string_tab[731] +#define __pyx_n_u_cuLibraryGetManaged __pyx_string_tab[732] +#define __pyx_n_u_cuLibraryGetModule __pyx_string_tab[733] +#define __pyx_n_u_cuLibraryGetUnifiedFunction __pyx_string_tab[734] +#define __pyx_n_u_cuLibraryLoadData __pyx_string_tab[735] +#define __pyx_n_u_cuLibraryLoadFromFile __pyx_string_tab[736] +#define __pyx_n_u_cuLibraryUnload __pyx_string_tab[737] +#define __pyx_n_u_cuLinkAddData_v2 __pyx_string_tab[738] +#define __pyx_n_u_cuLinkAddFile_v2 __pyx_string_tab[739] +#define __pyx_n_u_cuLinkComplete __pyx_string_tab[740] +#define __pyx_n_u_cuLinkCreate_v2 __pyx_string_tab[741] +#define __pyx_n_u_cuLinkDestroy __pyx_string_tab[742] +#define __pyx_n_u_cuLogsCurrent __pyx_string_tab[743] +#define __pyx_n_u_cuLogsDumpToFile __pyx_string_tab[744] +#define __pyx_n_u_cuLogsDumpToMemory __pyx_string_tab[745] +#define __pyx_n_u_cuLogsRegisterCallback __pyx_string_tab[746] +#define __pyx_n_u_cuLogsUnregisterCallback __pyx_string_tab[747] +#define __pyx_n_u_cuMemAddressFree __pyx_string_tab[748] +#define __pyx_n_u_cuMemAddressReserve __pyx_string_tab[749] +#define __pyx_n_u_cuMemAdvise __pyx_string_tab[750] +#define __pyx_n_u_cuMemAdvise_v2 __pyx_string_tab[751] +#define __pyx_n_u_cuMemAllocAsync __pyx_string_tab[752] +#define __pyx_n_u_cuMemAllocFromPoolAsync __pyx_string_tab[753] +#define __pyx_n_u_cuMemAllocHost_v2 __pyx_string_tab[754] +#define __pyx_n_u_cuMemAllocManaged __pyx_string_tab[755] +#define __pyx_n_u_cuMemAllocPitch_v2 __pyx_string_tab[756] +#define __pyx_n_u_cuMemAlloc_v2 __pyx_string_tab[757] +#define __pyx_n_u_cuMemBatchDecompressAsync __pyx_string_tab[758] +#define __pyx_n_u_cuMemCreate __pyx_string_tab[759] +#define __pyx_n_u_cuMemExportToShareableHandle __pyx_string_tab[760] +#define __pyx_n_u_cuMemFreeAsync __pyx_string_tab[761] +#define __pyx_n_u_cuMemFreeHost __pyx_string_tab[762] +#define __pyx_n_u_cuMemFree_v2 __pyx_string_tab[763] +#define __pyx_n_u_cuMemGetAccess __pyx_string_tab[764] +#define __pyx_n_u_cuMemGetAddressRange_v2 __pyx_string_tab[765] +#define __pyx_n_u_cuMemGetAllocationGranularity __pyx_string_tab[766] +#define __pyx_n_u_cuMemGetAllocationPropertiesFr __pyx_string_tab[767] +#define __pyx_n_u_cuMemGetHandleForAddressRange __pyx_string_tab[768] +#define __pyx_n_u_cuMemGetInfo_v2 __pyx_string_tab[769] +#define __pyx_n_u_cuMemHostAlloc __pyx_string_tab[770] +#define __pyx_n_u_cuMemHostGetDevicePointer_v2 __pyx_string_tab[771] +#define __pyx_n_u_cuMemHostGetFlags __pyx_string_tab[772] +#define __pyx_n_u_cuMemHostRegister_v2 __pyx_string_tab[773] +#define __pyx_n_u_cuMemHostUnregister __pyx_string_tab[774] +#define __pyx_n_u_cuMemImportFromShareableHandle __pyx_string_tab[775] +#define __pyx_n_u_cuMemMap __pyx_string_tab[776] +#define __pyx_n_u_cuMemMapArrayAsync __pyx_string_tab[777] +#define __pyx_n_u_cuMemPoolCreate __pyx_string_tab[778] +#define __pyx_n_u_cuMemPoolDestroy __pyx_string_tab[779] +#define __pyx_n_u_cuMemPoolExportPointer __pyx_string_tab[780] +#define __pyx_n_u_cuMemPoolExportToShareableHand __pyx_string_tab[781] +#define __pyx_n_u_cuMemPoolGetAccess __pyx_string_tab[782] +#define __pyx_n_u_cuMemPoolGetAttribute __pyx_string_tab[783] +#define __pyx_n_u_cuMemPoolImportFromShareableHa __pyx_string_tab[784] +#define __pyx_n_u_cuMemPoolImportPointer __pyx_string_tab[785] +#define __pyx_n_u_cuMemPoolSetAccess __pyx_string_tab[786] +#define __pyx_n_u_cuMemPoolSetAttribute __pyx_string_tab[787] +#define __pyx_n_u_cuMemPoolTrimTo __pyx_string_tab[788] +#define __pyx_n_u_cuMemPrefetchAsync __pyx_string_tab[789] +#define __pyx_n_u_cuMemPrefetchAsync_v2 __pyx_string_tab[790] +#define __pyx_n_u_cuMemRangeGetAttribute __pyx_string_tab[791] +#define __pyx_n_u_cuMemRangeGetAttributes __pyx_string_tab[792] +#define __pyx_n_u_cuMemRelease __pyx_string_tab[793] +#define __pyx_n_u_cuMemRetainAllocationHandle __pyx_string_tab[794] +#define __pyx_n_u_cuMemSetAccess __pyx_string_tab[795] +#define __pyx_n_u_cuMemUnmap __pyx_string_tab[796] +#define __pyx_n_u_cuMemcpy __pyx_string_tab[797] +#define __pyx_n_u_cuMemcpy2DAsync_v2 __pyx_string_tab[798] +#define __pyx_n_u_cuMemcpy2DUnaligned_v2 __pyx_string_tab[799] +#define __pyx_n_u_cuMemcpy2D_v2 __pyx_string_tab[800] +#define __pyx_n_u_cuMemcpy3DAsync_v2 __pyx_string_tab[801] +#define __pyx_n_u_cuMemcpy3DBatchAsync __pyx_string_tab[802] +#define __pyx_n_u_cuMemcpy3DPeer __pyx_string_tab[803] +#define __pyx_n_u_cuMemcpy3DPeerAsync __pyx_string_tab[804] +#define __pyx_n_u_cuMemcpy3D_v2 __pyx_string_tab[805] +#define __pyx_n_u_cuMemcpyAsync __pyx_string_tab[806] +#define __pyx_n_u_cuMemcpyAtoA_v2 __pyx_string_tab[807] +#define __pyx_n_u_cuMemcpyAtoD_v2 __pyx_string_tab[808] +#define __pyx_n_u_cuMemcpyAtoHAsync_v2 __pyx_string_tab[809] +#define __pyx_n_u_cuMemcpyAtoH_v2 __pyx_string_tab[810] +#define __pyx_n_u_cuMemcpyBatchAsync __pyx_string_tab[811] +#define __pyx_n_u_cuMemcpyDtoA_v2 __pyx_string_tab[812] +#define __pyx_n_u_cuMemcpyDtoDAsync_v2 __pyx_string_tab[813] +#define __pyx_n_u_cuMemcpyDtoD_v2 __pyx_string_tab[814] +#define __pyx_n_u_cuMemcpyDtoHAsync_v2 __pyx_string_tab[815] +#define __pyx_n_u_cuMemcpyDtoH_v2 __pyx_string_tab[816] +#define __pyx_n_u_cuMemcpyHtoAAsync_v2 __pyx_string_tab[817] +#define __pyx_n_u_cuMemcpyHtoA_v2 __pyx_string_tab[818] +#define __pyx_n_u_cuMemcpyHtoDAsync_v2 __pyx_string_tab[819] +#define __pyx_n_u_cuMemcpyHtoD_v2 __pyx_string_tab[820] +#define __pyx_n_u_cuMemcpyPeer __pyx_string_tab[821] +#define __pyx_n_u_cuMemcpyPeerAsync __pyx_string_tab[822] +#define __pyx_n_u_cuMemsetD16Async __pyx_string_tab[823] +#define __pyx_n_u_cuMemsetD16_v2 __pyx_string_tab[824] +#define __pyx_n_u_cuMemsetD2D16Async __pyx_string_tab[825] +#define __pyx_n_u_cuMemsetD2D16_v2 __pyx_string_tab[826] +#define __pyx_n_u_cuMemsetD2D32Async __pyx_string_tab[827] +#define __pyx_n_u_cuMemsetD2D32_v2 __pyx_string_tab[828] +#define __pyx_n_u_cuMemsetD2D8Async __pyx_string_tab[829] +#define __pyx_n_u_cuMemsetD2D8_v2 __pyx_string_tab[830] +#define __pyx_n_u_cuMemsetD32Async __pyx_string_tab[831] +#define __pyx_n_u_cuMemsetD32_v2 __pyx_string_tab[832] +#define __pyx_n_u_cuMemsetD8Async __pyx_string_tab[833] +#define __pyx_n_u_cuMemsetD8_v2 __pyx_string_tab[834] +#define __pyx_n_u_cuMipmappedArrayCreate __pyx_string_tab[835] +#define __pyx_n_u_cuMipmappedArrayDestroy __pyx_string_tab[836] +#define __pyx_n_u_cuMipmappedArrayGetLevel __pyx_string_tab[837] +#define __pyx_n_u_cuMipmappedArrayGetMemoryRequi __pyx_string_tab[838] +#define __pyx_n_u_cuMipmappedArrayGetSparsePrope __pyx_string_tab[839] +#define __pyx_n_u_cuModuleEnumerateFunctions __pyx_string_tab[840] +#define __pyx_n_u_cuModuleGetFunction __pyx_string_tab[841] +#define __pyx_n_u_cuModuleGetFunctionCount __pyx_string_tab[842] +#define __pyx_n_u_cuModuleGetGlobal_v2 __pyx_string_tab[843] +#define __pyx_n_u_cuModuleGetLoadingMode __pyx_string_tab[844] +#define __pyx_n_u_cuModuleGetSurfRef __pyx_string_tab[845] +#define __pyx_n_u_cuModuleGetTexRef __pyx_string_tab[846] +#define __pyx_n_u_cuModuleLoad __pyx_string_tab[847] +#define __pyx_n_u_cuModuleLoadData __pyx_string_tab[848] +#define __pyx_n_u_cuModuleLoadDataEx __pyx_string_tab[849] +#define __pyx_n_u_cuModuleLoadFatBinary __pyx_string_tab[850] +#define __pyx_n_u_cuModuleUnload __pyx_string_tab[851] +#define __pyx_n_u_cuMulticastAddDevice __pyx_string_tab[852] +#define __pyx_n_u_cuMulticastBindAddr __pyx_string_tab[853] +#define __pyx_n_u_cuMulticastBindMem __pyx_string_tab[854] +#define __pyx_n_u_cuMulticastCreate __pyx_string_tab[855] +#define __pyx_n_u_cuMulticastGetGranularity __pyx_string_tab[856] +#define __pyx_n_u_cuMulticastUnbind __pyx_string_tab[857] +#define __pyx_n_u_cuOccupancyAvailableDynamicSMe __pyx_string_tab[858] +#define __pyx_n_u_cuOccupancyMaxActiveBlocksPerM __pyx_string_tab[859] +#define __pyx_n_u_cuOccupancyMaxActiveBlocksPerM_2 __pyx_string_tab[860] +#define __pyx_n_u_cuOccupancyMaxActiveClusters __pyx_string_tab[861] +#define __pyx_n_u_cuOccupancyMaxPotentialBlockSi __pyx_string_tab[862] +#define __pyx_n_u_cuOccupancyMaxPotentialBlockSi_2 __pyx_string_tab[863] +#define __pyx_n_u_cuOccupancyMaxPotentialCluster __pyx_string_tab[864] +#define __pyx_n_u_cuParamSetSize __pyx_string_tab[865] +#define __pyx_n_u_cuParamSetTexRef __pyx_string_tab[866] +#define __pyx_n_u_cuParamSetf __pyx_string_tab[867] +#define __pyx_n_u_cuParamSeti __pyx_string_tab[868] +#define __pyx_n_u_cuParamSetv __pyx_string_tab[869] +#define __pyx_n_u_cuPointerGetAttribute __pyx_string_tab[870] +#define __pyx_n_u_cuPointerGetAttributes __pyx_string_tab[871] +#define __pyx_n_u_cuPointerSetAttribute __pyx_string_tab[872] +#define __pyx_n_u_cuProfilerStart __pyx_string_tab[873] +#define __pyx_n_u_cuProfilerStop __pyx_string_tab[874] +#define __pyx_n_u_cuSignalExternalSemaphoresAsyn __pyx_string_tab[875] +#define __pyx_n_u_cuStreamAddCallback __pyx_string_tab[876] +#define __pyx_n_u_cuStreamAttachMemAsync __pyx_string_tab[877] +#define __pyx_n_u_cuStreamBatchMemOp_v2 __pyx_string_tab[878] +#define __pyx_n_u_cuStreamBeginCaptureToGraph __pyx_string_tab[879] +#define __pyx_n_u_cuStreamBeginCapture_v2 __pyx_string_tab[880] +#define __pyx_n_u_cuStreamCopyAttributes __pyx_string_tab[881] +#define __pyx_n_u_cuStreamCreate __pyx_string_tab[882] +#define __pyx_n_u_cuStreamCreateWithPriority __pyx_string_tab[883] +#define __pyx_n_u_cuStreamDestroy_v2 __pyx_string_tab[884] +#define __pyx_n_u_cuStreamEndCapture __pyx_string_tab[885] +#define __pyx_n_u_cuStreamGetAttribute __pyx_string_tab[886] +#define __pyx_n_u_cuStreamGetCaptureInfo_v2 __pyx_string_tab[887] +#define __pyx_n_u_cuStreamGetCaptureInfo_v3 __pyx_string_tab[888] +#define __pyx_n_u_cuStreamGetCtx __pyx_string_tab[889] +#define __pyx_n_u_cuStreamGetCtx_v2 __pyx_string_tab[890] +#define __pyx_n_u_cuStreamGetDevice __pyx_string_tab[891] +#define __pyx_n_u_cuStreamGetFlags __pyx_string_tab[892] +#define __pyx_n_u_cuStreamGetGreenCtx __pyx_string_tab[893] +#define __pyx_n_u_cuStreamGetId __pyx_string_tab[894] +#define __pyx_n_u_cuStreamGetPriority __pyx_string_tab[895] +#define __pyx_n_u_cuStreamIsCapturing __pyx_string_tab[896] +#define __pyx_n_u_cuStreamQuery __pyx_string_tab[897] +#define __pyx_n_u_cuStreamSetAttribute __pyx_string_tab[898] +#define __pyx_n_u_cuStreamSynchronize __pyx_string_tab[899] +#define __pyx_n_u_cuStreamUpdateCaptureDependenc __pyx_string_tab[900] +#define __pyx_n_u_cuStreamUpdateCaptureDependenc_2 __pyx_string_tab[901] +#define __pyx_n_u_cuStreamWaitEvent __pyx_string_tab[902] +#define __pyx_n_u_cuStreamWaitValue32_v2 __pyx_string_tab[903] +#define __pyx_n_u_cuStreamWaitValue64_v2 __pyx_string_tab[904] +#define __pyx_n_u_cuStreamWriteValue32_v2 __pyx_string_tab[905] +#define __pyx_n_u_cuStreamWriteValue64_v2 __pyx_string_tab[906] +#define __pyx_n_u_cuSurfObjectCreate __pyx_string_tab[907] +#define __pyx_n_u_cuSurfObjectDestroy __pyx_string_tab[908] +#define __pyx_n_u_cuSurfObjectGetResourceDesc __pyx_string_tab[909] +#define __pyx_n_u_cuSurfRefGetArray __pyx_string_tab[910] +#define __pyx_n_u_cuSurfRefSetArray __pyx_string_tab[911] +#define __pyx_n_u_cuTensorMapEncodeIm2col __pyx_string_tab[912] +#define __pyx_n_u_cuTensorMapEncodeIm2colWide __pyx_string_tab[913] +#define __pyx_n_u_cuTensorMapEncodeTiled __pyx_string_tab[914] +#define __pyx_n_u_cuTensorMapReplaceAddress __pyx_string_tab[915] +#define __pyx_n_u_cuTexObjectCreate __pyx_string_tab[916] +#define __pyx_n_u_cuTexObjectDestroy __pyx_string_tab[917] +#define __pyx_n_u_cuTexObjectGetResourceDesc __pyx_string_tab[918] +#define __pyx_n_u_cuTexObjectGetResourceViewDesc __pyx_string_tab[919] +#define __pyx_n_u_cuTexObjectGetTextureDesc __pyx_string_tab[920] +#define __pyx_n_u_cuTexRefCreate __pyx_string_tab[921] +#define __pyx_n_u_cuTexRefDestroy __pyx_string_tab[922] +#define __pyx_n_u_cuTexRefGetAddressMode __pyx_string_tab[923] +#define __pyx_n_u_cuTexRefGetAddress_v2 __pyx_string_tab[924] +#define __pyx_n_u_cuTexRefGetArray __pyx_string_tab[925] +#define __pyx_n_u_cuTexRefGetBorderColor __pyx_string_tab[926] +#define __pyx_n_u_cuTexRefGetFilterMode __pyx_string_tab[927] +#define __pyx_n_u_cuTexRefGetFlags __pyx_string_tab[928] +#define __pyx_n_u_cuTexRefGetFormat __pyx_string_tab[929] +#define __pyx_n_u_cuTexRefGetMaxAnisotropy __pyx_string_tab[930] +#define __pyx_n_u_cuTexRefGetMipmapFilterMode __pyx_string_tab[931] +#define __pyx_n_u_cuTexRefGetMipmapLevelBias __pyx_string_tab[932] +#define __pyx_n_u_cuTexRefGetMipmapLevelClamp __pyx_string_tab[933] +#define __pyx_n_u_cuTexRefGetMipmappedArray __pyx_string_tab[934] +#define __pyx_n_u_cuTexRefSetAddress2D_v3 __pyx_string_tab[935] +#define __pyx_n_u_cuTexRefSetAddressMode __pyx_string_tab[936] +#define __pyx_n_u_cuTexRefSetAddress_v2 __pyx_string_tab[937] +#define __pyx_n_u_cuTexRefSetArray __pyx_string_tab[938] +#define __pyx_n_u_cuTexRefSetBorderColor __pyx_string_tab[939] +#define __pyx_n_u_cuTexRefSetFilterMode __pyx_string_tab[940] +#define __pyx_n_u_cuTexRefSetFlags __pyx_string_tab[941] +#define __pyx_n_u_cuTexRefSetFormat __pyx_string_tab[942] +#define __pyx_n_u_cuTexRefSetMaxAnisotropy __pyx_string_tab[943] +#define __pyx_n_u_cuTexRefSetMipmapFilterMode __pyx_string_tab[944] +#define __pyx_n_u_cuTexRefSetMipmapLevelBias __pyx_string_tab[945] +#define __pyx_n_u_cuTexRefSetMipmapLevelClamp __pyx_string_tab[946] +#define __pyx_n_u_cuTexRefSetMipmappedArray __pyx_string_tab[947] +#define __pyx_n_u_cuThreadExchangeStreamCaptureM __pyx_string_tab[948] +#define __pyx_n_u_cuUserObjectCreate __pyx_string_tab[949] +#define __pyx_n_u_cuUserObjectRelease __pyx_string_tab[950] +#define __pyx_n_u_cuUserObjectRetain __pyx_string_tab[951] +#define __pyx_n_u_cuVDPAUCtxCreate_v2 __pyx_string_tab[952] +#define __pyx_n_u_cuVDPAUGetDevice __pyx_string_tab[953] +#define __pyx_n_u_cuWaitExternalSemaphoresAsync __pyx_string_tab[954] +#define __pyx_n_u_cuda_bindings__bindings_cydriver __pyx_string_tab[955] +#define __pyx_kp_u_cuda_bindings__bindings_cydriver_2 __pyx_string_tab[956] +#define __pyx_n_u_default __pyx_string_tab[957] +#define __pyx_n_u_encoding __pyx_string_tab[958] +#define __pyx_n_u_enter __pyx_string_tab[959] +#define __pyx_n_u_exit __pyx_string_tab[960] +#define __pyx_n_u_func __pyx_string_tab[961] +#define __pyx_n_u_getenv __pyx_string_tab[962] +#define __pyx_n_u_initializing __pyx_string_tab[963] +#define __pyx_n_u_inspect_function_pointer __pyx_string_tab[964] +#define __pyx_n_u_inspect_function_pointers __pyx_string_tab[965] +#define __pyx_n_u_is_coroutine __pyx_string_tab[966] +#define __pyx_kp_u_libcuda_so_1 __pyx_string_tab[967] +#define __pyx_n_u_main __pyx_string_tab[968] +#define __pyx_n_u_maxsize __pyx_string_tab[969] +#define __pyx_n_u_module __pyx_string_tab[970] +#define __pyx_n_u_name __pyx_string_tab[971] +#define __pyx_n_u_name_2 __pyx_string_tab[972] +#define __pyx_n_u_os __pyx_string_tab[973] +#define __pyx_n_u_pop __pyx_string_tab[974] +#define __pyx_n_u_qualname __pyx_string_tab[975] +#define __pyx_n_u_set_name __pyx_string_tab[976] +#define __pyx_n_u_spec __pyx_string_tab[977] +#define __pyx_n_u_sys __pyx_string_tab[978] +#define __pyx_n_u_test __pyx_string_tab[979] +#define __pyx_n_u_threading __pyx_string_tab[980] +#define __pyx_kp_u_utf_8 __pyx_string_tab[981] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<982; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + Py_CLEAR(clear_module_state->__pyx_int_0); + Py_CLEAR(clear_module_state->__pyx_int_4294967296); + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<982; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_4294967296); + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_bindings/cydriver.pyx":492 + * cdef __cuGetProcAddress_v2_T _F_cuGetProcAddress_v2 = NULL + * + * cdef int _cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cuPythonInit + * +*/ + +static int __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPythonInit(void) { + int __pyx_v_usePTDS; + char __pyx_v_libPath[0x104]; + int __pyx_v_status; + PyObject *__pyx_v_path = NULL; + void *__pyx_v_handle; + __pyx_t_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2_T __pyx_v__F_cuGetProcAddress_v2; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; + char const *__pyx_t_13; + CUresult __pyx_t_14; + PyObject *__pyx_t_15 = NULL; + int __pyx_t_16; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuPythonInit", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":498 + * cdef char libPath[260] + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) + * +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":499 + * + * with gil, __symbol_lock: + * usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) # <<<<<<<<<<<<<< + * + * # Load library +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getenv); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 499, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_default, __pyx_mstate_global->__pyx_int_0, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 499, __pyx_L10_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 499, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_usePTDS = __pyx_t_10; + + /* "cuda/bindings/_bindings/cydriver.pyx":502 + * + * # Load library + * libPath[0] = 0 # <<<<<<<<<<<<<< + * status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) + * if status == 0 and len(libPath) != 0: +*/ + (__pyx_v_libPath[0]) = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":503 + * # Load library + * libPath[0] = 0 + * status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) # <<<<<<<<<<<<<< + * if status == 0 and len(libPath) != 0: + * path = libPath.decode('utf-8') +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_maxsize); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 503, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_mstate_global->__pyx_int_4294967296, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_status = getCUDALibraryPath(__pyx_v_libPath, __pyx_t_10); + + /* "cuda/bindings/_bindings/cydriver.pyx":504 + * libPath[0] = 0 + * status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) + * if status == 0 and len(libPath) != 0: # <<<<<<<<<<<<<< + * path = libPath.decode('utf-8') + * else: +*/ + __pyx_t_11 = (__pyx_v_status == 0); + if (__pyx_t_11) { + } else { + __pyx_t_10 = __pyx_t_11; + goto __pyx_L17_bool_binop_done; + } + __pyx_t_12 = __Pyx_ssize_strlen(__pyx_v_libPath); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 504, __pyx_L10_error) + __pyx_t_11 = (__pyx_t_12 != 0); + __pyx_t_10 = __pyx_t_11; + __pyx_L17_bool_binop_done:; + if (__pyx_t_10) { + + /* "cuda/bindings/_bindings/cydriver.pyx":505 + * status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) + * if status == 0 and len(libPath) != 0: + * path = libPath.decode('utf-8') # <<<<<<<<<<<<<< + * else: + * path = 'libcuda.so.1' +*/ + __pyx_t_12 = __Pyx_ssize_strlen(__pyx_v_libPath); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 505, __pyx_L10_error) + __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_libPath, 0, __pyx_t_12, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_path = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":504 + * libPath[0] = 0 + * status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) + * if status == 0 and len(libPath) != 0: # <<<<<<<<<<<<<< + * path = libPath.decode('utf-8') + * else: +*/ + goto __pyx_L16; + } + + /* "cuda/bindings/_bindings/cydriver.pyx":507 + * path = libPath.decode('utf-8') + * else: + * path = 'libcuda.so.1' # <<<<<<<<<<<<<< + * handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) + * if handle == NULL: +*/ + /*else*/ { + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_libcuda_so_1); + __pyx_v_path = __pyx_mstate_global->__pyx_kp_u_libcuda_so_1; + } + __pyx_L16:; + + /* "cuda/bindings/_bindings/cydriver.pyx":508 + * else: + * path = 'libcuda.so.1' + * handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) # <<<<<<<<<<<<<< + * if handle == NULL: + * raise RuntimeError('Failed to dlopen ' + path) +*/ + __pyx_t_9 = NULL; + __Pyx_INCREF((PyObject *)(&PyBytes_Type)); + __pyx_t_3 = ((PyObject *)(&PyBytes_Type)); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_9, __pyx_v_path}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_kp_u_utf_8, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 508, __pyx_L10_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_13 = __Pyx_PyBytes_AsString(__pyx_t_2); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L10_error) + __pyx_v_handle = dlopen(__pyx_t_13, RTLD_NOW); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":509 + * path = 'libcuda.so.1' + * handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) + * if handle == NULL: # <<<<<<<<<<<<<< + * raise RuntimeError('Failed to dlopen ' + path) + * +*/ + __pyx_t_10 = (__pyx_v_handle == NULL); + if (unlikely(__pyx_t_10)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":510 + * handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) + * if handle == NULL: + * raise RuntimeError('Failed to dlopen ' + path) # <<<<<<<<<<<<<< + * + * # Get latest __cuGetProcAddress_v2 +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_4 = __pyx_builtin_RuntimeError; + __pyx_t_9 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u_Failed_to_dlopen, __pyx_v_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 510, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 510, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":509 + * path = 'libcuda.so.1' + * handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) + * if handle == NULL: # <<<<<<<<<<<<<< + * raise RuntimeError('Failed to dlopen ' + path) + * +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":514 + * # Get latest __cuGetProcAddress_v2 + * global __cuGetProcAddress_v2 + * __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') # <<<<<<<<<<<<<< + * + * # Load using cuGetProcAddress if available +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGetProcAddress_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":517 + * + * # Load using cuGetProcAddress if available + * if __cuGetProcAddress_v2 != NULL: # <<<<<<<<<<<<<< + * _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 + * if usePTDS: +*/ + __pyx_t_10 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2 != NULL); + if (__pyx_t_10) { + + /* "cuda/bindings/_bindings/cydriver.pyx":518 + * # Load using cuGetProcAddress if available + * if __cuGetProcAddress_v2 != NULL: + * _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 # <<<<<<<<<<<<<< + * if usePTDS: + * # Get all PTDS version of functions +*/ + __pyx_v__F_cuGetProcAddress_v2 = ((__pyx_t_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2_T)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2); + + /* "cuda/bindings/_bindings/cydriver.pyx":519 + * if __cuGetProcAddress_v2 != NULL: + * _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 + * if usePTDS: # <<<<<<<<<<<<<< + * # Get all PTDS version of functions + * pass +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cydriver.pyx":523 + * pass + * global __cuMemcpy + * _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":525 + * _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyPeer + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 525, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":527 + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyHtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":529 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyDtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 529, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":531 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyDtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":533 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyDtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":535 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyAtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 535, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":537 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyHtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":539 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyAtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 539, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":541 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyAtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":543 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy2D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 543, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":545 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy2DUnaligned_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 545, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":547 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy3D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 547, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":549 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy3DPeer + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 549, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":551 + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyAsync + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 551, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":553 + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":555 + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyHtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":557 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyDtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 557, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":559 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyDtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":561 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyHtoAAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":563 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyAtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":565 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy2DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":567 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy3DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":569 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy3DPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":571 + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpyBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyBatchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync), 0x2F30, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 571, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":573 + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemcpy3DBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DBatchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync), 0x2F30, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 573, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":575 + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":577 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":579 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 579, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":581 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":583 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 583, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":585 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 585, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":587 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD8Async + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 587, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":589 + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD16Async + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 589, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":591 + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD32Async + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 591, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":593 + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D8Async + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 593, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":595 + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D16Async + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 595, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":597 + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemsetD2D32Async + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":599 + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemBatchDecompressAsync + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemBatchDecompressAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync), 0x2F1C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":601 + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemMapArrayAsync + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":603 + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemFreeAsync + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":605 + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemAllocAsync + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":607 + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemAllocFromPoolAsync + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync), 0x2B0C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":609 + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemPrefetchAsync + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync), 0x1F40, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":611 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuMemPrefetchAsync_v2 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2), 0x2EF4, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 611, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":613 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetPriority + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":615 + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetDevice + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice), 0x2F30, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":617 + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetFlags + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetId + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 617, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":619 + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetId + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId), 0x2EE0, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":621 + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetCtx + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx), 0x233C, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 621, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":623 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetCtx_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2), 0x2F12, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 623, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":625 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamWaitEvent + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":627 + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamAddCallback + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 627, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":629 + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamBeginCapture_v2 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2), 0x271A, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":631 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamBeginCaptureToGraph + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBeginCaptureToGraph"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph), 0x2EFE, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 631, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":633 + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamEndCapture + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 633, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":635 + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamIsCapturing + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 635, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":637 + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetCaptureInfo_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2), 0x2B16, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":639 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetCaptureInfo_v3 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3), 0x2EFE, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":641 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamUpdateCaptureDependencies + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies), 0x2B16, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":643 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamUpdateCaptureDependencies_v2 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2), 0x2EFE, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 643, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":645 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamAttachMemAsync + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamQuery + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":647 + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamQuery + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 647, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":649 + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamSynchronize + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 649, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":651 + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamCopyAttributes + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 651, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":653 + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamGetAttribute + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 653, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":655 + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamSetAttribute + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuEventRecord + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 655, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":657 + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuEventRecord + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":659 + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuEventRecordWithFlags + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":661 + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuSignalExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":663 + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuWaitExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":665 + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamWaitValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 665, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":667 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamWaitValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":669 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamWriteValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 669, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":671 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamWriteValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 671, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":673 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuStreamBatchMemOp_v2 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2), 0x2B3E, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":675 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuLaunchKernel + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":677 + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuLaunchKernelEx + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchKernelEx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx), 0x2B34, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":679 + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuLaunchCooperativeKernel + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel), 0x2328, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 679, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":681 + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuLaunchHostFunc + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 681, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":683 + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuGraphInstantiateWithParams + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuGraphUpload + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphInstantiateWithParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams), 0x2EE0, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":685 + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuGraphUpload + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload), 0x2B02, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":687 + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuGraphLaunch + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch), 0x2710, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":689 + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuGraphicsMapResources + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 689, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":691 + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + * global __cuGraphicsUnmapResources + * _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) # <<<<<<<<<<<<<< + * else: + * # Else get the regular version +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources), 0x1B58, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 691, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":519 + * if __cuGetProcAddress_v2 != NULL: + * _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 + * if usePTDS: # <<<<<<<<<<<<<< + * # Get all PTDS version of functions + * pass +*/ + goto __pyx_L21; + } + + /* "cuda/bindings/_bindings/cydriver.pyx":694 + * else: + * # Else get the regular version + * pass # <<<<<<<<<<<<<< + * global __cuMemcpy + * _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + /*else*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":696 + * pass + * global __cuMemcpy + * _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 696, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":698 + * _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyPeer + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyPeer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 698, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":700 + * _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyHtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":702 + * _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyDtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoH"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":704 + * _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyDtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":706 + * _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyDtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 706, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":708 + * _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyAtoD_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoD"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":710 + * _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyHtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":712 + * _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyAtoH_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoH"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 712, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":714 + * _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyAtoA_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoA"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 714, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":716 + * _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy2D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2D"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":718 + * _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy2DUnaligned_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2DUnaligned"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 718, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":720 + * _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy3D_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3D"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":722 + * _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy3DPeer + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DPeer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":724 + * _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyAsync + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":726 + * _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyPeerAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 726, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":728 + * _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyHtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoDAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 728, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":730 + * _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyDtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoHAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":732 + * _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyDtoDAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyDtoDAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 732, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":734 + * _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyHtoAAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyHtoAAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 734, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":736 + * _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyAtoHAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyAtoHAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":738 + * _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy2DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy2DAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":740 + * _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy3DAsync_v2 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":742 + * _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy3DPeerAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DPeerAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":744 + * _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpyBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpyBatchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":746 + * _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemcpy3DBatchAsync + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemcpy3DBatchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":748 + * _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD8"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":750 + * _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD16"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":752 + * _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 752, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":754 + * _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D8_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D8"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 754, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":756 + * _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D16_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D16"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":758 + * _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D32_v2 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":760 + * _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD8Async + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD8Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":762 + * _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD16Async + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD16Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":764 + * _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD32Async + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD32Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":766 + * _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D8Async + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D8Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 766, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":768 + * _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D16Async + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D16Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":770 + * _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemsetD2D32Async + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemsetD2D32Async"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":772 + * _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemBatchDecompressAsync + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemBatchDecompressAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync), 0x2F1C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":774 + * _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemMapArrayAsync + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemMapArrayAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":776 + * _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemFreeAsync + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemFreeAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":778 + * _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAllocAsync + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":780 + * _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAllocFromPoolAsync + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocFromPoolAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":782 + * _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPrefetchAsync + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":784 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPrefetchAsync_v2 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPrefetchAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 784, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":786 + * _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetPriority + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetPriority"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":788 + * _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetDevice + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 788, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":790 + * _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetFlags + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetId + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":792 + * _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetId + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 792, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":794 + * _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetCtx + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx), 0x233C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":796 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetCtx_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":798 + * _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamWaitEvent + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 798, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":800 + * _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamAddCallback + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamAddCallback"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":802 + * _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamBeginCapture_v2 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBeginCapture"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":804 + * _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamBeginCaptureToGraph + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBeginCaptureToGraph"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":806 + * _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamEndCapture + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamEndCapture"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":808 + * _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamIsCapturing + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamIsCapturing"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":810 + * _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetCaptureInfo_v2 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":812 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetCaptureInfo_v3 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetCaptureInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":814 + * _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamUpdateCaptureDependencies + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 814, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":816 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamUpdateCaptureDependencies_v2 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamUpdateCaptureDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 816, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":818 + * _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamAttachMemAsync + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamQuery + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamAttachMemAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":820 + * _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamQuery + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamQuery"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":822 + * _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamSynchronize + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamSynchronize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 822, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":824 + * _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamCopyAttributes + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamCopyAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":826 + * _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetAttribute + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 826, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":828 + * _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamSetAttribute + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventRecord + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":830 + * _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventRecord + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventRecord"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":832 + * _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventRecordWithFlags + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventRecordWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":834 + * _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSignalExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSignalExternalSemaphoresAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 834, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":836 + * _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuWaitExternalSemaphoresAsync + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuWaitExternalSemaphoresAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":838 + * _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamWaitValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitValue32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 838, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":840 + * _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamWaitValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWaitValue64"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 840, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":842 + * _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamWriteValue32_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWriteValue32"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 842, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":844 + * _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamWriteValue64_v2 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamWriteValue64"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 844, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":846 + * _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamBatchMemOp_v2 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamBatchMemOp"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":848 + * _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchKernel + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchKernel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 848, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":850 + * _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchKernelEx + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchKernelEx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 850, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":852 + * _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchCooperativeKernel + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchCooperativeKernel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":854 + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchHostFunc + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchHostFunc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":856 + * _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphInstantiateWithParams + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphUpload + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphInstantiateWithParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":858 + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphUpload + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphUpload"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 858, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":860 + * _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphLaunch + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphLaunch"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 860, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":862 + * _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsMapResources + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsMapResources"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 862, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":864 + * _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsUnmapResources + * _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * # Get remaining functions + * global __cuGetErrorString +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsUnmapResources"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L10_error) + } + __pyx_L21:; + + /* "cuda/bindings/_bindings/cydriver.pyx":867 + * # Get remaining functions + * global __cuGetErrorString + * _F_cuGetProcAddress_v2('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGetErrorName + * _F_cuGetProcAddress_v2('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGetErrorString"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 867, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":869 + * _F_cuGetProcAddress_v2('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGetErrorName + * _F_cuGetProcAddress_v2('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuInit + * _F_cuGetProcAddress_v2('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGetErrorName"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 869, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":871 + * _F_cuGetProcAddress_v2('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuInit + * _F_cuGetProcAddress_v2('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDriverGetVersion + * _F_cuGetProcAddress_v2('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuInit"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":873 + * _F_cuGetProcAddress_v2('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDriverGetVersion + * _F_cuGetProcAddress_v2('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGet + * _F_cuGetProcAddress_v2('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDriverGetVersion"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":875 + * _F_cuGetProcAddress_v2('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGet + * _F_cuGetProcAddress_v2('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetCount + * _F_cuGetProcAddress_v2('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGet"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 875, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":877 + * _F_cuGetProcAddress_v2('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetCount + * _F_cuGetProcAddress_v2('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetName + * _F_cuGetProcAddress_v2('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetCount"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 877, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":879 + * _F_cuGetProcAddress_v2('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetName + * _F_cuGetProcAddress_v2('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetName"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":881 + * _F_cuGetProcAddress_v2('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetUuid + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid_v2 + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid), 0x233C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":883 + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetUuid_v2 + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetLuid + * _F_cuGetProcAddress_v2('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetUuid"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 883, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":885 + * _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetLuid + * _F_cuGetProcAddress_v2('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceTotalMem_v2 + * _F_cuGetProcAddress_v2('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetLuid"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":887 + * _F_cuGetProcAddress_v2('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceTotalMem_v2 + * _F_cuGetProcAddress_v2('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetTexture1DLinearMaxWidth + * _F_cuGetProcAddress_v2('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceTotalMem"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 887, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":889 + * _F_cuGetProcAddress_v2('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetTexture1DLinearMaxWidth + * _F_cuGetProcAddress_v2('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetTexture1DLinearMaxWidth"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 889, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":891 + * _F_cuGetProcAddress_v2('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetNvSciSyncAttributes + * _F_cuGetProcAddress_v2('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 891, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":893 + * _F_cuGetProcAddress_v2('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetNvSciSyncAttributes + * _F_cuGetProcAddress_v2('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceSetMemPool + * _F_cuGetProcAddress_v2('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetNvSciSyncAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 893, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":895 + * _F_cuGetProcAddress_v2('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceSetMemPool + * _F_cuGetProcAddress_v2('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetMemPool + * _F_cuGetProcAddress_v2('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceSetMemPool"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 895, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":897 + * _F_cuGetProcAddress_v2('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetMemPool + * _F_cuGetProcAddress_v2('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetDefaultMemPool + * _F_cuGetProcAddress_v2('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetMemPool"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 897, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":899 + * _F_cuGetProcAddress_v2('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetDefaultMemPool + * _F_cuGetProcAddress_v2('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetExecAffinitySupport + * _F_cuGetProcAddress_v2('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetDefaultMemPool"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 899, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":901 + * _F_cuGetProcAddress_v2('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetExecAffinitySupport + * _F_cuGetProcAddress_v2('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFlushGPUDirectRDMAWrites + * _F_cuGetProcAddress_v2('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetExecAffinitySupport"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":903 + * _F_cuGetProcAddress_v2('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFlushGPUDirectRDMAWrites + * _F_cuGetProcAddress_v2('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetProperties + * _F_cuGetProcAddress_v2('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFlushGPUDirectRDMAWrites"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":905 + * _F_cuGetProcAddress_v2('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetProperties + * _F_cuGetProcAddress_v2('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceComputeCapability + * _F_cuGetProcAddress_v2('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetProperties"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":907 + * _F_cuGetProcAddress_v2('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceComputeCapability + * _F_cuGetProcAddress_v2('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRetain + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceComputeCapability"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":909 + * _F_cuGetProcAddress_v2('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevicePrimaryCtxRetain + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRelease_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevicePrimaryCtxRetain"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 909, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":911 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevicePrimaryCtxRelease_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxSetFlags_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevicePrimaryCtxRelease"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 911, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":913 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevicePrimaryCtxSetFlags_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxGetState + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevicePrimaryCtxSetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 913, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":915 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevicePrimaryCtxGetState + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxReset_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevicePrimaryCtxGetState"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 915, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":917 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevicePrimaryCtxReset_v2 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxCreate_v2 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevicePrimaryCtxReset"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 917, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":919 + * _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxCreate_v2 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxCreate_v3 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 919, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":921 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxCreate_v3 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxCreate_v4 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 921, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":923 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxCreate_v4 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxDestroy_v2 + * _F_cuGetProcAddress_v2('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 923, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":925 + * _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxDestroy_v2 + * _F_cuGetProcAddress_v2('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxPushCurrent_v2 + * _F_cuGetProcAddress_v2('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 925, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":927 + * _F_cuGetProcAddress_v2('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxPushCurrent_v2 + * _F_cuGetProcAddress_v2('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxPopCurrent_v2 + * _F_cuGetProcAddress_v2('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxPushCurrent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 927, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":929 + * _F_cuGetProcAddress_v2('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxPopCurrent_v2 + * _F_cuGetProcAddress_v2('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSetCurrent + * _F_cuGetProcAddress_v2('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxPopCurrent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":931 + * _F_cuGetProcAddress_v2('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSetCurrent + * _F_cuGetProcAddress_v2('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetCurrent + * _F_cuGetProcAddress_v2('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSetCurrent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":933 + * _F_cuGetProcAddress_v2('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetCurrent + * _F_cuGetProcAddress_v2('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetDevice + * _F_cuGetProcAddress_v2('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetCurrent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":935 + * _F_cuGetProcAddress_v2('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetDevice + * _F_cuGetProcAddress_v2('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetFlags + * _F_cuGetProcAddress_v2('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":937 + * _F_cuGetProcAddress_v2('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetFlags + * _F_cuGetProcAddress_v2('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSetFlags + * _F_cuGetProcAddress_v2('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":939 + * _F_cuGetProcAddress_v2('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSetFlags + * _F_cuGetProcAddress_v2('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetId + * _F_cuGetProcAddress_v2('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":941 + * _F_cuGetProcAddress_v2('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetId + * _F_cuGetProcAddress_v2('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSynchronize + * _F_cuGetProcAddress_v2('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 941, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":943 + * _F_cuGetProcAddress_v2('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSynchronize + * _F_cuGetProcAddress_v2('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSetLimit + * _F_cuGetProcAddress_v2('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSynchronize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 943, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":945 + * _F_cuGetProcAddress_v2('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSetLimit + * _F_cuGetProcAddress_v2('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetLimit + * _F_cuGetProcAddress_v2('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSetLimit"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 945, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":947 + * _F_cuGetProcAddress_v2('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetLimit + * _F_cuGetProcAddress_v2('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetCacheConfig + * _F_cuGetProcAddress_v2('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetLimit"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":949 + * _F_cuGetProcAddress_v2('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetCacheConfig + * _F_cuGetProcAddress_v2('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSetCacheConfig + * _F_cuGetProcAddress_v2('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetCacheConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":951 + * _F_cuGetProcAddress_v2('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSetCacheConfig + * _F_cuGetProcAddress_v2('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetApiVersion + * _F_cuGetProcAddress_v2('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSetCacheConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":953 + * _F_cuGetProcAddress_v2('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetApiVersion + * _F_cuGetProcAddress_v2('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetStreamPriorityRange + * _F_cuGetProcAddress_v2('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetApiVersion"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 953, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":955 + * _F_cuGetProcAddress_v2('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetStreamPriorityRange + * _F_cuGetProcAddress_v2('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxResetPersistingL2Cache + * _F_cuGetProcAddress_v2('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetStreamPriorityRange"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":957 + * _F_cuGetProcAddress_v2('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxResetPersistingL2Cache + * _F_cuGetProcAddress_v2('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetExecAffinity + * _F_cuGetProcAddress_v2('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxResetPersistingL2Cache"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 957, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":959 + * _F_cuGetProcAddress_v2('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetExecAffinity + * _F_cuGetProcAddress_v2('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxRecordEvent + * _F_cuGetProcAddress_v2('cuCtxRecordEvent', &__cuCtxRecordEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetExecAffinity"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":961 + * _F_cuGetProcAddress_v2('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxRecordEvent + * _F_cuGetProcAddress_v2('cuCtxRecordEvent', &__cuCtxRecordEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxWaitEvent + * _F_cuGetProcAddress_v2('cuCtxWaitEvent', &__cuCtxWaitEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxRecordEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":963 + * _F_cuGetProcAddress_v2('cuCtxRecordEvent', &__cuCtxRecordEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxWaitEvent + * _F_cuGetProcAddress_v2('cuCtxWaitEvent', &__cuCtxWaitEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxAttach + * _F_cuGetProcAddress_v2('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxWaitEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":965 + * _F_cuGetProcAddress_v2('cuCtxWaitEvent', &__cuCtxWaitEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxAttach + * _F_cuGetProcAddress_v2('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxDetach + * _F_cuGetProcAddress_v2('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxAttach"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":967 + * _F_cuGetProcAddress_v2('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxDetach + * _F_cuGetProcAddress_v2('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetSharedMemConfig + * _F_cuGetProcAddress_v2('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxDetach"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":969 + * _F_cuGetProcAddress_v2('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetSharedMemConfig + * _F_cuGetProcAddress_v2('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxSetSharedMemConfig + * _F_cuGetProcAddress_v2('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetSharedMemConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":971 + * _F_cuGetProcAddress_v2('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxSetSharedMemConfig + * _F_cuGetProcAddress_v2('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleLoad + * _F_cuGetProcAddress_v2('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxSetSharedMemConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 971, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":973 + * _F_cuGetProcAddress_v2('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleLoad + * _F_cuGetProcAddress_v2('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleLoadData + * _F_cuGetProcAddress_v2('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleLoad"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":975 + * _F_cuGetProcAddress_v2('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleLoadData + * _F_cuGetProcAddress_v2('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleLoadDataEx + * _F_cuGetProcAddress_v2('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleLoadData"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 975, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":977 + * _F_cuGetProcAddress_v2('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleLoadDataEx + * _F_cuGetProcAddress_v2('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleLoadFatBinary + * _F_cuGetProcAddress_v2('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleLoadDataEx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx), 0x7DA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 977, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":979 + * _F_cuGetProcAddress_v2('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleLoadFatBinary + * _F_cuGetProcAddress_v2('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleUnload + * _F_cuGetProcAddress_v2('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleLoadFatBinary"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 979, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":981 + * _F_cuGetProcAddress_v2('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleUnload + * _F_cuGetProcAddress_v2('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetLoadingMode + * _F_cuGetProcAddress_v2('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleUnload"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 981, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":983 + * _F_cuGetProcAddress_v2('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetLoadingMode + * _F_cuGetProcAddress_v2('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetFunction + * _F_cuGetProcAddress_v2('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetLoadingMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":985 + * _F_cuGetProcAddress_v2('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetFunction + * _F_cuGetProcAddress_v2('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetFunctionCount + * _F_cuGetProcAddress_v2('cuModuleGetFunctionCount', &__cuModuleGetFunctionCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetFunction"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":987 + * _F_cuGetProcAddress_v2('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetFunctionCount + * _F_cuGetProcAddress_v2('cuModuleGetFunctionCount', &__cuModuleGetFunctionCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleEnumerateFunctions + * _F_cuGetProcAddress_v2('cuModuleEnumerateFunctions', &__cuModuleEnumerateFunctions, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetFunctionCount"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 987, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":989 + * _F_cuGetProcAddress_v2('cuModuleGetFunctionCount', &__cuModuleGetFunctionCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleEnumerateFunctions + * _F_cuGetProcAddress_v2('cuModuleEnumerateFunctions', &__cuModuleEnumerateFunctions, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetGlobal_v2 + * _F_cuGetProcAddress_v2('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleEnumerateFunctions"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":991 + * _F_cuGetProcAddress_v2('cuModuleEnumerateFunctions', &__cuModuleEnumerateFunctions, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetGlobal_v2 + * _F_cuGetProcAddress_v2('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLinkCreate_v2 + * _F_cuGetProcAddress_v2('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetGlobal"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":993 + * _F_cuGetProcAddress_v2('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLinkCreate_v2 + * _F_cuGetProcAddress_v2('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLinkAddData_v2 + * _F_cuGetProcAddress_v2('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLinkCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 993, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":995 + * _F_cuGetProcAddress_v2('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLinkAddData_v2 + * _F_cuGetProcAddress_v2('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLinkAddFile_v2 + * _F_cuGetProcAddress_v2('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLinkAddData"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 995, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":997 + * _F_cuGetProcAddress_v2('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLinkAddFile_v2 + * _F_cuGetProcAddress_v2('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLinkComplete + * _F_cuGetProcAddress_v2('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLinkAddFile"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 997, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":999 + * _F_cuGetProcAddress_v2('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLinkComplete + * _F_cuGetProcAddress_v2('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLinkDestroy + * _F_cuGetProcAddress_v2('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLinkComplete"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1001 + * _F_cuGetProcAddress_v2('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLinkDestroy + * _F_cuGetProcAddress_v2('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetTexRef + * _F_cuGetProcAddress_v2('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLinkDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1001, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1003 + * _F_cuGetProcAddress_v2('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetTexRef + * _F_cuGetProcAddress_v2('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuModuleGetSurfRef + * _F_cuGetProcAddress_v2('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetTexRef"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1003, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1005 + * _F_cuGetProcAddress_v2('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuModuleGetSurfRef + * _F_cuGetProcAddress_v2('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryLoadData + * _F_cuGetProcAddress_v2('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuModuleGetSurfRef"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1005, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1007 + * _F_cuGetProcAddress_v2('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryLoadData + * _F_cuGetProcAddress_v2('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryLoadFromFile + * _F_cuGetProcAddress_v2('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryLoadData"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1009 + * _F_cuGetProcAddress_v2('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryLoadFromFile + * _F_cuGetProcAddress_v2('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryUnload + * _F_cuGetProcAddress_v2('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryLoadFromFile"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1011 + * _F_cuGetProcAddress_v2('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryUnload + * _F_cuGetProcAddress_v2('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetKernel + * _F_cuGetProcAddress_v2('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryUnload"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1013 + * _F_cuGetProcAddress_v2('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetKernel + * _F_cuGetProcAddress_v2('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetKernelCount + * _F_cuGetProcAddress_v2('cuLibraryGetKernelCount', &__cuLibraryGetKernelCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetKernel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1015 + * _F_cuGetProcAddress_v2('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetKernelCount + * _F_cuGetProcAddress_v2('cuLibraryGetKernelCount', &__cuLibraryGetKernelCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryEnumerateKernels + * _F_cuGetProcAddress_v2('cuLibraryEnumerateKernels', &__cuLibraryEnumerateKernels, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetKernelCount"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1015, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1017 + * _F_cuGetProcAddress_v2('cuLibraryGetKernelCount', &__cuLibraryGetKernelCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryEnumerateKernels + * _F_cuGetProcAddress_v2('cuLibraryEnumerateKernels', &__cuLibraryEnumerateKernels, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetModule + * _F_cuGetProcAddress_v2('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryEnumerateKernels"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1019 + * _F_cuGetProcAddress_v2('cuLibraryEnumerateKernels', &__cuLibraryEnumerateKernels, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetModule + * _F_cuGetProcAddress_v2('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelGetFunction + * _F_cuGetProcAddress_v2('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetModule"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1019, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1021 + * _F_cuGetProcAddress_v2('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelGetFunction + * _F_cuGetProcAddress_v2('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelGetLibrary + * _F_cuGetProcAddress_v2('cuKernelGetLibrary', &__cuKernelGetLibrary, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelGetFunction"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1023 + * _F_cuGetProcAddress_v2('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelGetLibrary + * _F_cuGetProcAddress_v2('cuKernelGetLibrary', &__cuKernelGetLibrary, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetGlobal + * _F_cuGetProcAddress_v2('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelGetLibrary"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1025 + * _F_cuGetProcAddress_v2('cuKernelGetLibrary', &__cuKernelGetLibrary, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetGlobal + * _F_cuGetProcAddress_v2('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetManaged + * _F_cuGetProcAddress_v2('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetGlobal"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1027 + * _F_cuGetProcAddress_v2('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetManaged + * _F_cuGetProcAddress_v2('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLibraryGetUnifiedFunction + * _F_cuGetProcAddress_v2('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetManaged"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1029 + * _F_cuGetProcAddress_v2('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLibraryGetUnifiedFunction + * _F_cuGetProcAddress_v2('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelGetAttribute + * _F_cuGetProcAddress_v2('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLibraryGetUnifiedFunction"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1031 + * _F_cuGetProcAddress_v2('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelGetAttribute + * _F_cuGetProcAddress_v2('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelSetAttribute + * _F_cuGetProcAddress_v2('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1031, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1033 + * _F_cuGetProcAddress_v2('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelSetAttribute + * _F_cuGetProcAddress_v2('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelSetCacheConfig + * _F_cuGetProcAddress_v2('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1035 + * _F_cuGetProcAddress_v2('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelSetCacheConfig + * _F_cuGetProcAddress_v2('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelGetName + * _F_cuGetProcAddress_v2('cuKernelGetName', &__cuKernelGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelSetCacheConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1035, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1037 + * _F_cuGetProcAddress_v2('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelGetName + * _F_cuGetProcAddress_v2('cuKernelGetName', &__cuKernelGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuKernelGetParamInfo + * _F_cuGetProcAddress_v2('cuKernelGetParamInfo', &__cuKernelGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelGetName"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1039 + * _F_cuGetProcAddress_v2('cuKernelGetName', &__cuKernelGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuKernelGetParamInfo + * _F_cuGetProcAddress_v2('cuKernelGetParamInfo', &__cuKernelGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetInfo_v2 + * _F_cuGetProcAddress_v2('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuKernelGetParamInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1039, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1041 + * _F_cuGetProcAddress_v2('cuKernelGetParamInfo', &__cuKernelGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetInfo_v2 + * _F_cuGetProcAddress_v2('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAlloc_v2 + * _F_cuGetProcAddress_v2('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1041, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1043 + * _F_cuGetProcAddress_v2('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAlloc_v2 + * _F_cuGetProcAddress_v2('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocPitch_v2 + * _F_cuGetProcAddress_v2('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAlloc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1043, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1045 + * _F_cuGetProcAddress_v2('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAllocPitch_v2 + * _F_cuGetProcAddress_v2('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemFree_v2 + * _F_cuGetProcAddress_v2('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocPitch"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1045, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1047 + * _F_cuGetProcAddress_v2('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemFree_v2 + * _F_cuGetProcAddress_v2('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetAddressRange_v2 + * _F_cuGetProcAddress_v2('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemFree"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1047, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1049 + * _F_cuGetProcAddress_v2('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetAddressRange_v2 + * _F_cuGetProcAddress_v2('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocHost_v2 + * _F_cuGetProcAddress_v2('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetAddressRange"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1049, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1051 + * _F_cuGetProcAddress_v2('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAllocHost_v2 + * _F_cuGetProcAddress_v2('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemFreeHost + * _F_cuGetProcAddress_v2('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocHost"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1053 + * _F_cuGetProcAddress_v2('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemFreeHost + * _F_cuGetProcAddress_v2('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemHostAlloc + * _F_cuGetProcAddress_v2('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemFreeHost"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1055 + * _F_cuGetProcAddress_v2('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemHostAlloc + * _F_cuGetProcAddress_v2('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemHostGetDevicePointer_v2 + * _F_cuGetProcAddress_v2('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemHostAlloc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1055, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1057 + * _F_cuGetProcAddress_v2('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemHostGetDevicePointer_v2 + * _F_cuGetProcAddress_v2('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemHostGetFlags + * _F_cuGetProcAddress_v2('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemHostGetDevicePointer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1057, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1059 + * _F_cuGetProcAddress_v2('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemHostGetFlags + * _F_cuGetProcAddress_v2('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAllocManaged + * _F_cuGetProcAddress_v2('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemHostGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags), 0x7EE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1059, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1061 + * _F_cuGetProcAddress_v2('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAllocManaged + * _F_cuGetProcAddress_v2('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceRegisterAsyncNotification + * _F_cuGetProcAddress_v2('cuDeviceRegisterAsyncNotification', &__cuDeviceRegisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAllocManaged"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1061, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1063 + * _F_cuGetProcAddress_v2('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceRegisterAsyncNotification + * _F_cuGetProcAddress_v2('cuDeviceRegisterAsyncNotification', &__cuDeviceRegisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceUnregisterAsyncNotification + * _F_cuGetProcAddress_v2('cuDeviceUnregisterAsyncNotification', &__cuDeviceUnregisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceRegisterAsyncNotification"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1063, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1065 + * _F_cuGetProcAddress_v2('cuDeviceRegisterAsyncNotification', &__cuDeviceRegisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceUnregisterAsyncNotification + * _F_cuGetProcAddress_v2('cuDeviceUnregisterAsyncNotification', &__cuDeviceUnregisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetByPCIBusId + * _F_cuGetProcAddress_v2('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceUnregisterAsyncNotification"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1067 + * _F_cuGetProcAddress_v2('cuDeviceUnregisterAsyncNotification', &__cuDeviceUnregisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetByPCIBusId + * _F_cuGetProcAddress_v2('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetPCIBusId + * _F_cuGetProcAddress_v2('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetByPCIBusId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1067, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1069 + * _F_cuGetProcAddress_v2('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetPCIBusId + * _F_cuGetProcAddress_v2('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuIpcGetEventHandle + * _F_cuGetProcAddress_v2('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetPCIBusId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1069, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1071 + * _F_cuGetProcAddress_v2('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuIpcGetEventHandle + * _F_cuGetProcAddress_v2('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuIpcOpenEventHandle + * _F_cuGetProcAddress_v2('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuIpcGetEventHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1071, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1073 + * _F_cuGetProcAddress_v2('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuIpcOpenEventHandle + * _F_cuGetProcAddress_v2('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuIpcGetMemHandle + * _F_cuGetProcAddress_v2('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuIpcOpenEventHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1075 + * _F_cuGetProcAddress_v2('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuIpcGetMemHandle + * _F_cuGetProcAddress_v2('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuIpcOpenMemHandle_v2 + * _F_cuGetProcAddress_v2('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuIpcGetMemHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1075, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1077 + * _F_cuGetProcAddress_v2('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuIpcOpenMemHandle_v2 + * _F_cuGetProcAddress_v2('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuIpcCloseMemHandle + * _F_cuGetProcAddress_v2('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuIpcOpenMemHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1077, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1079 + * _F_cuGetProcAddress_v2('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuIpcCloseMemHandle + * _F_cuGetProcAddress_v2('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemHostRegister_v2 + * _F_cuGetProcAddress_v2('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuIpcCloseMemHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1081 + * _F_cuGetProcAddress_v2('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemHostRegister_v2 + * _F_cuGetProcAddress_v2('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemHostUnregister + * _F_cuGetProcAddress_v2('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemHostRegister"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1083 + * _F_cuGetProcAddress_v2('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemHostUnregister + * _F_cuGetProcAddress_v2('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayCreate_v2 + * _F_cuGetProcAddress_v2('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemHostUnregister"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1085 + * _F_cuGetProcAddress_v2('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayCreate_v2 + * _F_cuGetProcAddress_v2('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayGetDescriptor_v2 + * _F_cuGetProcAddress_v2('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1087 + * _F_cuGetProcAddress_v2('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayGetDescriptor_v2 + * _F_cuGetProcAddress_v2('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayGetSparseProperties + * _F_cuGetProcAddress_v2('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayGetDescriptor"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1089 + * _F_cuGetProcAddress_v2('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayGetSparseProperties + * _F_cuGetProcAddress_v2('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetSparseProperties + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayGetSparseProperties"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1089, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1091 + * _F_cuGetProcAddress_v2('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMipmappedArrayGetSparseProperties + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayGetMemoryRequirements + * _F_cuGetProcAddress_v2('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMipmappedArrayGetSparseProperties"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1093 + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayGetMemoryRequirements + * _F_cuGetProcAddress_v2('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetMemoryRequirements + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayGetMemoryRequirements"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1095 + * _F_cuGetProcAddress_v2('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMipmappedArrayGetMemoryRequirements + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayGetPlane + * _F_cuGetProcAddress_v2('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMipmappedArrayGetMemoryRequirements"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1095, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1097 + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayGetPlane + * _F_cuGetProcAddress_v2('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArrayDestroy + * _F_cuGetProcAddress_v2('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayGetPlane"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1099 + * _F_cuGetProcAddress_v2('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArrayDestroy + * _F_cuGetProcAddress_v2('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArray3DCreate_v2 + * _F_cuGetProcAddress_v2('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArrayDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1101 + * _F_cuGetProcAddress_v2('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArray3DCreate_v2 + * _F_cuGetProcAddress_v2('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuArray3DGetDescriptor_v2 + * _F_cuGetProcAddress_v2('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArray3DCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1101, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1103 + * _F_cuGetProcAddress_v2('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuArray3DGetDescriptor_v2 + * _F_cuGetProcAddress_v2('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMipmappedArrayCreate + * _F_cuGetProcAddress_v2('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuArray3DGetDescriptor"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1105 + * _F_cuGetProcAddress_v2('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMipmappedArrayCreate + * _F_cuGetProcAddress_v2('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetLevel + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMipmappedArrayCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1107 + * _F_cuGetProcAddress_v2('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMipmappedArrayGetLevel + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMipmappedArrayDestroy + * _F_cuGetProcAddress_v2('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMipmappedArrayGetLevel"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1109 + * _F_cuGetProcAddress_v2('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMipmappedArrayDestroy + * _F_cuGetProcAddress_v2('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetHandleForAddressRange + * _F_cuGetProcAddress_v2('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMipmappedArrayDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1111 + * _F_cuGetProcAddress_v2('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetHandleForAddressRange + * _F_cuGetProcAddress_v2('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAddressReserve + * _F_cuGetProcAddress_v2('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetHandleForAddressRange"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1111, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1113 + * _F_cuGetProcAddress_v2('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAddressReserve + * _F_cuGetProcAddress_v2('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAddressFree + * _F_cuGetProcAddress_v2('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAddressReserve"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1115 + * _F_cuGetProcAddress_v2('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAddressFree + * _F_cuGetProcAddress_v2('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemCreate + * _F_cuGetProcAddress_v2('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAddressFree"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1115, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1117 + * _F_cuGetProcAddress_v2('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemCreate + * _F_cuGetProcAddress_v2('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemRelease + * _F_cuGetProcAddress_v2('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1119 + * _F_cuGetProcAddress_v2('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemRelease + * _F_cuGetProcAddress_v2('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemMap + * _F_cuGetProcAddress_v2('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemRelease"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1121 + * _F_cuGetProcAddress_v2('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemMap + * _F_cuGetProcAddress_v2('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemUnmap + * _F_cuGetProcAddress_v2('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemMap"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1121, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1123 + * _F_cuGetProcAddress_v2('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemUnmap + * _F_cuGetProcAddress_v2('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemSetAccess + * _F_cuGetProcAddress_v2('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemUnmap"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1123, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1125 + * _F_cuGetProcAddress_v2('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemSetAccess + * _F_cuGetProcAddress_v2('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetAccess + * _F_cuGetProcAddress_v2('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemSetAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1127 + * _F_cuGetProcAddress_v2('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetAccess + * _F_cuGetProcAddress_v2('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemExportToShareableHandle + * _F_cuGetProcAddress_v2('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1127, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1129 + * _F_cuGetProcAddress_v2('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemExportToShareableHandle + * _F_cuGetProcAddress_v2('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemImportFromShareableHandle + * _F_cuGetProcAddress_v2('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemExportToShareableHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1129, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1131 + * _F_cuGetProcAddress_v2('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemImportFromShareableHandle + * _F_cuGetProcAddress_v2('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetAllocationGranularity + * _F_cuGetProcAddress_v2('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemImportFromShareableHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1133 + * _F_cuGetProcAddress_v2('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetAllocationGranularity + * _F_cuGetProcAddress_v2('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemGetAllocationPropertiesFromHandle + * _F_cuGetProcAddress_v2('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetAllocationGranularity"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1133, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1135 + * _F_cuGetProcAddress_v2('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemGetAllocationPropertiesFromHandle + * _F_cuGetProcAddress_v2('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemRetainAllocationHandle + * _F_cuGetProcAddress_v2('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemGetAllocationPropertiesFromHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1135, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1137 + * _F_cuGetProcAddress_v2('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemRetainAllocationHandle + * _F_cuGetProcAddress_v2('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolTrimTo + * _F_cuGetProcAddress_v2('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemRetainAllocationHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1139 + * _F_cuGetProcAddress_v2('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolTrimTo + * _F_cuGetProcAddress_v2('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolSetAttribute + * _F_cuGetProcAddress_v2('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolTrimTo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1139, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1141 + * _F_cuGetProcAddress_v2('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolSetAttribute + * _F_cuGetProcAddress_v2('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolGetAttribute + * _F_cuGetProcAddress_v2('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1141, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1143 + * _F_cuGetProcAddress_v2('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolGetAttribute + * _F_cuGetProcAddress_v2('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolSetAccess + * _F_cuGetProcAddress_v2('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1143, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1145 + * _F_cuGetProcAddress_v2('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolSetAccess + * _F_cuGetProcAddress_v2('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolGetAccess + * _F_cuGetProcAddress_v2('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolSetAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1145, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1147 + * _F_cuGetProcAddress_v2('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolGetAccess + * _F_cuGetProcAddress_v2('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolCreate + * _F_cuGetProcAddress_v2('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolGetAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1147, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1149 + * _F_cuGetProcAddress_v2('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolCreate + * _F_cuGetProcAddress_v2('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolDestroy + * _F_cuGetProcAddress_v2('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1151 + * _F_cuGetProcAddress_v2('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolDestroy + * _F_cuGetProcAddress_v2('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolExportToShareableHandle + * _F_cuGetProcAddress_v2('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1151, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1153 + * _F_cuGetProcAddress_v2('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolExportToShareableHandle + * _F_cuGetProcAddress_v2('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolImportFromShareableHandle + * _F_cuGetProcAddress_v2('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolExportToShareableHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1155 + * _F_cuGetProcAddress_v2('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolImportFromShareableHandle + * _F_cuGetProcAddress_v2('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolExportPointer + * _F_cuGetProcAddress_v2('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolImportFromShareableHandle"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1157 + * _F_cuGetProcAddress_v2('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolExportPointer + * _F_cuGetProcAddress_v2('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemPoolImportPointer + * _F_cuGetProcAddress_v2('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolExportPointer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1159 + * _F_cuGetProcAddress_v2('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemPoolImportPointer + * _F_cuGetProcAddress_v2('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastCreate + * _F_cuGetProcAddress_v2('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemPoolImportPointer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1159, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1161 + * _F_cuGetProcAddress_v2('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastCreate + * _F_cuGetProcAddress_v2('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastAddDevice + * _F_cuGetProcAddress_v2('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1161, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1163 + * _F_cuGetProcAddress_v2('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastAddDevice + * _F_cuGetProcAddress_v2('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastBindMem + * _F_cuGetProcAddress_v2('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastAddDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1163, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1165 + * _F_cuGetProcAddress_v2('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastBindMem + * _F_cuGetProcAddress_v2('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastBindAddr + * _F_cuGetProcAddress_v2('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastBindMem"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1167 + * _F_cuGetProcAddress_v2('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastBindAddr + * _F_cuGetProcAddress_v2('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastUnbind + * _F_cuGetProcAddress_v2('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastBindAddr"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1169 + * _F_cuGetProcAddress_v2('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastUnbind + * _F_cuGetProcAddress_v2('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMulticastGetGranularity + * _F_cuGetProcAddress_v2('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastUnbind"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1169, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1171 + * _F_cuGetProcAddress_v2('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMulticastGetGranularity + * _F_cuGetProcAddress_v2('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuPointerGetAttribute + * _F_cuGetProcAddress_v2('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMulticastGetGranularity"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1171, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1173 + * _F_cuGetProcAddress_v2('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuPointerGetAttribute + * _F_cuGetProcAddress_v2('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAdvise + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuPointerGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1175 + * _F_cuGetProcAddress_v2('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAdvise + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemAdvise_v2 + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1175, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1177 + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemAdvise_v2 + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttribute + * _F_cuGetProcAddress_v2('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemAdvise"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1177, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1179 + * _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemRangeGetAttribute + * _F_cuGetProcAddress_v2('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttributes + * _F_cuGetProcAddress_v2('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemRangeGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1179, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1181 + * _F_cuGetProcAddress_v2('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuMemRangeGetAttributes + * _F_cuGetProcAddress_v2('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuPointerSetAttribute + * _F_cuGetProcAddress_v2('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuMemRangeGetAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1183 + * _F_cuGetProcAddress_v2('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuPointerSetAttribute + * _F_cuGetProcAddress_v2('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuPointerGetAttributes + * _F_cuGetProcAddress_v2('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuPointerSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute), 0x1770, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1185 + * _F_cuGetProcAddress_v2('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuPointerGetAttributes + * _F_cuGetProcAddress_v2('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamCreate + * _F_cuGetProcAddress_v2('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuPointerGetAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1187 + * _F_cuGetProcAddress_v2('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamCreate + * _F_cuGetProcAddress_v2('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamCreateWithPriority + * _F_cuGetProcAddress_v2('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1189 + * _F_cuGetProcAddress_v2('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamCreateWithPriority + * _F_cuGetProcAddress_v2('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuThreadExchangeStreamCaptureMode + * _F_cuGetProcAddress_v2('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamCreateWithPriority"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority), 0x13BA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1189, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1191 + * _F_cuGetProcAddress_v2('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuThreadExchangeStreamCaptureMode + * _F_cuGetProcAddress_v2('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamDestroy_v2 + * _F_cuGetProcAddress_v2('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuThreadExchangeStreamCaptureMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode), 0x271A, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1191, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1193 + * _F_cuGetProcAddress_v2('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamDestroy_v2 + * _F_cuGetProcAddress_v2('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventCreate + * _F_cuGetProcAddress_v2('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1195 + * _F_cuGetProcAddress_v2('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventCreate + * _F_cuGetProcAddress_v2('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventQuery + * _F_cuGetProcAddress_v2('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1197 + * _F_cuGetProcAddress_v2('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventQuery + * _F_cuGetProcAddress_v2('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventSynchronize + * _F_cuGetProcAddress_v2('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventQuery"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1197, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1199 + * _F_cuGetProcAddress_v2('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventSynchronize + * _F_cuGetProcAddress_v2('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventDestroy_v2 + * _F_cuGetProcAddress_v2('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventSynchronize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1199, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1201 + * _F_cuGetProcAddress_v2('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventDestroy_v2 + * _F_cuGetProcAddress_v2('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventElapsedTime + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1201, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1203 + * _F_cuGetProcAddress_v2('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventElapsedTime + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventElapsedTime_v2 + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime_v2, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventElapsedTime"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1205 + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventElapsedTime_v2 + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime_v2, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuImportExternalMemory + * _F_cuGetProcAddress_v2('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventElapsedTime"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1205, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1207 + * _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime_v2, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuImportExternalMemory + * _F_cuGetProcAddress_v2('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedBuffer + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuImportExternalMemory"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1207, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1209 + * _F_cuGetProcAddress_v2('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuExternalMemoryGetMappedBuffer + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedMipmappedArray + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuExternalMemoryGetMappedBuffer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1211 + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuExternalMemoryGetMappedMipmappedArray + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDestroyExternalMemory + * _F_cuGetProcAddress_v2('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuExternalMemoryGetMappedMipmappedArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1211, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1213 + * _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDestroyExternalMemory + * _F_cuGetProcAddress_v2('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuImportExternalSemaphore + * _F_cuGetProcAddress_v2('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDestroyExternalMemory"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1213, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1215 + * _F_cuGetProcAddress_v2('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuImportExternalSemaphore + * _F_cuGetProcAddress_v2('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDestroyExternalSemaphore + * _F_cuGetProcAddress_v2('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuImportExternalSemaphore"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1217 + * _F_cuGetProcAddress_v2('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDestroyExternalSemaphore + * _F_cuGetProcAddress_v2('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncGetAttribute + * _F_cuGetProcAddress_v2('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDestroyExternalSemaphore"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1217, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1219 + * _F_cuGetProcAddress_v2('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncGetAttribute + * _F_cuGetProcAddress_v2('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncSetAttribute + * _F_cuGetProcAddress_v2('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute), 0x7E4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1219, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1221 + * _F_cuGetProcAddress_v2('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncSetAttribute + * _F_cuGetProcAddress_v2('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncSetCacheConfig + * _F_cuGetProcAddress_v2('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1223 + * _F_cuGetProcAddress_v2('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncSetCacheConfig + * _F_cuGetProcAddress_v2('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncGetModule + * _F_cuGetProcAddress_v2('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncSetCacheConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1223, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1225 + * _F_cuGetProcAddress_v2('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncGetModule + * _F_cuGetProcAddress_v2('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncGetName + * _F_cuGetProcAddress_v2('cuFuncGetName', &__cuFuncGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncGetModule"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1225, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1227 + * _F_cuGetProcAddress_v2('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncGetName + * _F_cuGetProcAddress_v2('cuFuncGetName', &__cuFuncGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncGetParamInfo + * _F_cuGetProcAddress_v2('cuFuncGetParamInfo', &__cuFuncGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncGetName"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1229 + * _F_cuGetProcAddress_v2('cuFuncGetName', &__cuFuncGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncGetParamInfo + * _F_cuGetProcAddress_v2('cuFuncGetParamInfo', &__cuFuncGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncIsLoaded + * _F_cuGetProcAddress_v2('cuFuncIsLoaded', &__cuFuncIsLoaded, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncGetParamInfo"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1229, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1231 + * _F_cuGetProcAddress_v2('cuFuncGetParamInfo', &__cuFuncGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncIsLoaded + * _F_cuGetProcAddress_v2('cuFuncIsLoaded', &__cuFuncIsLoaded, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncLoad + * _F_cuGetProcAddress_v2('cuFuncLoad', &__cuFuncLoad, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncIsLoaded"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1231, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1233 + * _F_cuGetProcAddress_v2('cuFuncIsLoaded', &__cuFuncIsLoaded, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncLoad + * _F_cuGetProcAddress_v2('cuFuncLoad', &__cuFuncLoad, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernelMultiDevice + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncLoad"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1233, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1235 + * _F_cuGetProcAddress_v2('cuFuncLoad', &__cuFuncLoad, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchCooperativeKernelMultiDevice + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncSetBlockShape + * _F_cuGetProcAddress_v2('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchCooperativeKernelMultiDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1235, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1237 + * _F_cuGetProcAddress_v2('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncSetBlockShape + * _F_cuGetProcAddress_v2('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncSetSharedSize + * _F_cuGetProcAddress_v2('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncSetBlockShape"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1237, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1239 + * _F_cuGetProcAddress_v2('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncSetSharedSize + * _F_cuGetProcAddress_v2('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuParamSetSize + * _F_cuGetProcAddress_v2('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncSetSharedSize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1239, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1241 + * _F_cuGetProcAddress_v2('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuParamSetSize + * _F_cuGetProcAddress_v2('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuParamSeti + * _F_cuGetProcAddress_v2('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuParamSetSize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1241, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1243 + * _F_cuGetProcAddress_v2('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuParamSeti + * _F_cuGetProcAddress_v2('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuParamSetf + * _F_cuGetProcAddress_v2('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuParamSeti"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1245 + * _F_cuGetProcAddress_v2('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuParamSetf + * _F_cuGetProcAddress_v2('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuParamSetv + * _F_cuGetProcAddress_v2('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuParamSetf"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1245, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1247 + * _F_cuGetProcAddress_v2('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuParamSetv + * _F_cuGetProcAddress_v2('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunch + * _F_cuGetProcAddress_v2('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuParamSetv"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1249 + * _F_cuGetProcAddress_v2('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunch + * _F_cuGetProcAddress_v2('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchGrid + * _F_cuGetProcAddress_v2('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunch"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1249, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1251 + * _F_cuGetProcAddress_v2('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchGrid + * _F_cuGetProcAddress_v2('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLaunchGridAsync + * _F_cuGetProcAddress_v2('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchGrid"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1253 + * _F_cuGetProcAddress_v2('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLaunchGridAsync + * _F_cuGetProcAddress_v2('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuParamSetTexRef + * _F_cuGetProcAddress_v2('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLaunchGridAsync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1255 + * _F_cuGetProcAddress_v2('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuParamSetTexRef + * _F_cuGetProcAddress_v2('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuFuncSetSharedMemConfig + * _F_cuGetProcAddress_v2('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuParamSetTexRef"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1257 + * _F_cuGetProcAddress_v2('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuFuncSetSharedMemConfig + * _F_cuGetProcAddress_v2('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphCreate + * _F_cuGetProcAddress_v2('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuFuncSetSharedMemConfig"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig), 0xFB4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1257, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1259 + * _F_cuGetProcAddress_v2('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphCreate + * _F_cuGetProcAddress_v2('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddKernelNode_v2 + * _F_cuGetProcAddress_v2('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1259, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1261 + * _F_cuGetProcAddress_v2('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddKernelNode_v2 + * _F_cuGetProcAddress_v2('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddKernelNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1261, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1263 + * _F_cuGetProcAddress_v2('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphKernelNodeGetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphKernelNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1263, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1265 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphKernelNodeSetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddMemcpyNode + * _F_cuGetProcAddress_v2('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphKernelNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1267 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddMemcpyNode + * _F_cuGetProcAddress_v2('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddMemcpyNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1269 + * _F_cuGetProcAddress_v2('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemcpyNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemcpyNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1269, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1271 + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemcpyNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddMemsetNode + * _F_cuGetProcAddress_v2('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemcpyNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1271, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1273 + * _F_cuGetProcAddress_v2('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddMemsetNode + * _F_cuGetProcAddress_v2('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddMemsetNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1273, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1275 + * _F_cuGetProcAddress_v2('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemsetNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemsetNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1275, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1277 + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemsetNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddHostNode + * _F_cuGetProcAddress_v2('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemsetNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1277, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1279 + * _F_cuGetProcAddress_v2('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddHostNode + * _F_cuGetProcAddress_v2('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphHostNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddHostNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1279, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1281 + * _F_cuGetProcAddress_v2('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphHostNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphHostNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphHostNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1281, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1283 + * _F_cuGetProcAddress_v2('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphHostNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddChildGraphNode + * _F_cuGetProcAddress_v2('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphHostNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1283, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1285 + * _F_cuGetProcAddress_v2('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddChildGraphNode + * _F_cuGetProcAddress_v2('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphChildGraphNodeGetGraph + * _F_cuGetProcAddress_v2('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddChildGraphNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1285, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1287 + * _F_cuGetProcAddress_v2('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphChildGraphNodeGetGraph + * _F_cuGetProcAddress_v2('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddEmptyNode + * _F_cuGetProcAddress_v2('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphChildGraphNodeGetGraph"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1289 + * _F_cuGetProcAddress_v2('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddEmptyNode + * _F_cuGetProcAddress_v2('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddEventRecordNode + * _F_cuGetProcAddress_v2('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddEmptyNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1291 + * _F_cuGetProcAddress_v2('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddEventRecordNode + * _F_cuGetProcAddress_v2('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeGetEvent + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddEventRecordNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1293 + * _F_cuGetProcAddress_v2('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphEventRecordNodeGetEvent + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphEventRecordNodeGetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1293, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1295 + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphEventRecordNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddEventWaitNode + * _F_cuGetProcAddress_v2('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphEventRecordNodeSetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1295, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1297 + * _F_cuGetProcAddress_v2('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddEventWaitNode + * _F_cuGetProcAddress_v2('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeGetEvent + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddEventWaitNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1297, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1299 + * _F_cuGetProcAddress_v2('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphEventWaitNodeGetEvent + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphEventWaitNodeGetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1299, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1301 + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphEventWaitNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresSignalNode + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphEventWaitNodeSetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1301, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1303 + * _F_cuGetProcAddress_v2('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddExternalSemaphoresSignalNode + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddExternalSemaphoresSignalNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1303, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1305 + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1305, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1307 + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresWaitNode + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1309 + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddExternalSemaphoresWaitNode + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddExternalSemaphoresWaitNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1309, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1311 + * _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1311, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1313 + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddBatchMemOpNode + * _F_cuGetProcAddress_v2('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1313, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1315 + * _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddBatchMemOpNode + * _F_cuGetProcAddress_v2('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddBatchMemOpNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1315, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1317 + * _F_cuGetProcAddress_v2('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphBatchMemOpNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphBatchMemOpNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1319 + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphBatchMemOpNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecBatchMemOpNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphBatchMemOpNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1321 + * _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecBatchMemOpNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddMemAllocNode + * _F_cuGetProcAddress_v2('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecBatchMemOpNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1321, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1323 + * _F_cuGetProcAddress_v2('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddMemAllocNode + * _F_cuGetProcAddress_v2('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemAllocNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddMemAllocNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1325 + * _F_cuGetProcAddress_v2('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemAllocNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddMemFreeNode + * _F_cuGetProcAddress_v2('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemAllocNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1327 + * _F_cuGetProcAddress_v2('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddMemFreeNode + * _F_cuGetProcAddress_v2('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphMemFreeNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddMemFreeNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1329 + * _F_cuGetProcAddress_v2('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphMemFreeNodeGetParams + * _F_cuGetProcAddress_v2('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGraphMemTrim + * _F_cuGetProcAddress_v2('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphMemFreeNodeGetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1329, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1331 + * _F_cuGetProcAddress_v2('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGraphMemTrim + * _F_cuGetProcAddress_v2('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetGraphMemAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGraphMemTrim"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1333 + * _F_cuGetProcAddress_v2('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetGraphMemAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceSetGraphMemAttribute + * _F_cuGetProcAddress_v2('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetGraphMemAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1335 + * _F_cuGetProcAddress_v2('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceSetGraphMemAttribute + * _F_cuGetProcAddress_v2('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphClone + * _F_cuGetProcAddress_v2('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceSetGraphMemAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1337 + * _F_cuGetProcAddress_v2('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphClone + * _F_cuGetProcAddress_v2('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeFindInClone + * _F_cuGetProcAddress_v2('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphClone"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1337, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1339 + * _F_cuGetProcAddress_v2('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeFindInClone + * _F_cuGetProcAddress_v2('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetType + * _F_cuGetProcAddress_v2('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeFindInClone"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1341 + * _F_cuGetProcAddress_v2('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetType + * _F_cuGetProcAddress_v2('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphGetNodes + * _F_cuGetProcAddress_v2('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetType"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1343 + * _F_cuGetProcAddress_v2('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphGetNodes + * _F_cuGetProcAddress_v2('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphGetRootNodes + * _F_cuGetProcAddress_v2('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphGetNodes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1343, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1345 + * _F_cuGetProcAddress_v2('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphGetRootNodes + * _F_cuGetProcAddress_v2('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphGetEdges + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphGetRootNodes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1347 + * _F_cuGetProcAddress_v2('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphGetEdges + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphGetEdges_v2 + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphGetEdges"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1347, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1349 + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphGetEdges_v2 + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphGetEdges"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1349, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1351 + * _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetDependencies + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1353 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1353, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1355 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetDependentNodes + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes_v2 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetDependentNodes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1355, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1357 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetDependentNodes_v2 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetDependentNodes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1359 + * _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddDependencies + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1359, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1361 + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1363 + * _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphRemoveDependencies + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphRemoveDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1363, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1365 + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphRemoveDependencies_v2 + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphDestroyNode + * _F_cuGetProcAddress_v2('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphRemoveDependencies"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1365, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1367 + * _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphDestroyNode + * _F_cuGetProcAddress_v2('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithFlags + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphDestroyNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1369 + * _F_cuGetProcAddress_v2('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphInstantiateWithFlags + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecGetFlags + * _F_cuGetProcAddress_v2('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphInstantiateWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags), 0x2B20, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1371 + * _F_cuGetProcAddress_v2('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecGetFlags + * _F_cuGetProcAddress_v2('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecKernelNodeSetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1373 + * _F_cuGetProcAddress_v2('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecKernelNodeSetParams_v2 + * _F_cuGetProcAddress_v2('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecMemcpyNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecKernelNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1375 + * _F_cuGetProcAddress_v2('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecMemcpyNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecMemsetNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecMemcpyNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1375, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1377 + * _F_cuGetProcAddress_v2('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecMemsetNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecHostNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecMemsetNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1379 + * _F_cuGetProcAddress_v2('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecHostNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecChildGraphNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecHostNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1381 + * _F_cuGetProcAddress_v2('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecChildGraphNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecEventRecordNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecChildGraphNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1383 + * _F_cuGetProcAddress_v2('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecEventRecordNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecEventWaitNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecEventRecordNodeSetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1383, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1385 + * _F_cuGetProcAddress_v2('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecEventWaitNodeSetEvent + * _F_cuGetProcAddress_v2('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecEventWaitNodeSetEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent), 0x2B02, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1387 + * _F_cuGetProcAddress_v2('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1389 + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeSetEnabled + * _F_cuGetProcAddress_v2('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams), 0x2B0C, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1389, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1391 + * _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeSetEnabled + * _F_cuGetProcAddress_v2('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeGetEnabled + * _F_cuGetProcAddress_v2('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeSetEnabled"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1391, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1393 + * _F_cuGetProcAddress_v2('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeGetEnabled + * _F_cuGetProcAddress_v2('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecDestroy + * _F_cuGetProcAddress_v2('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeGetEnabled"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled), 0x2B34, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1393, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1395 + * _F_cuGetProcAddress_v2('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecDestroy + * _F_cuGetProcAddress_v2('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphDestroy + * _F_cuGetProcAddress_v2('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1395, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1397 + * _F_cuGetProcAddress_v2('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphDestroy + * _F_cuGetProcAddress_v2('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecUpdate_v2 + * _F_cuGetProcAddress_v2('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy), 0x2710, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1397, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1399 + * _F_cuGetProcAddress_v2('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecUpdate_v2 + * _F_cuGetProcAddress_v2('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeCopyAttributes + * _F_cuGetProcAddress_v2('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecUpdate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1399, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1401 + * _F_cuGetProcAddress_v2('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphKernelNodeCopyAttributes + * _F_cuGetProcAddress_v2('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetAttribute + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphKernelNodeCopyAttributes"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1401, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1403 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphKernelNodeGetAttribute + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetAttribute + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphKernelNodeGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1403, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1405 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphKernelNodeSetAttribute + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphDebugDotPrint + * _F_cuGetProcAddress_v2('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphKernelNodeSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute), 0x2AF8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1407 + * _F_cuGetProcAddress_v2('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphDebugDotPrint + * _F_cuGetProcAddress_v2('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuUserObjectCreate + * _F_cuGetProcAddress_v2('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphDebugDotPrint"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1409 + * _F_cuGetProcAddress_v2('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuUserObjectCreate + * _F_cuGetProcAddress_v2('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuUserObjectRetain + * _F_cuGetProcAddress_v2('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuUserObjectCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1411 + * _F_cuGetProcAddress_v2('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuUserObjectRetain + * _F_cuGetProcAddress_v2('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuUserObjectRelease + * _F_cuGetProcAddress_v2('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuUserObjectRetain"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1411, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1413 + * _F_cuGetProcAddress_v2('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuUserObjectRelease + * _F_cuGetProcAddress_v2('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphRetainUserObject + * _F_cuGetProcAddress_v2('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuUserObjectRelease"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1413, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1415 + * _F_cuGetProcAddress_v2('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphRetainUserObject + * _F_cuGetProcAddress_v2('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphReleaseUserObject + * _F_cuGetProcAddress_v2('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphRetainUserObject"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1415, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1417 + * _F_cuGetProcAddress_v2('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphReleaseUserObject + * _F_cuGetProcAddress_v2('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddNode + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphReleaseUserObject"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject), 0x2B16, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1417, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1419 + * _F_cuGetProcAddress_v2('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddNode + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphAddNode_v2 + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1419, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1421 + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphAddNode_v2 + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphAddNode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1421, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1423 + * _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphExecNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1423, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1425 + * _F_cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphExecNodeSetParams + * _F_cuGetProcAddress_v2('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphConditionalHandleCreate + * _F_cuGetProcAddress_v2('cuGraphConditionalHandleCreate', &__cuGraphConditionalHandleCreate, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphExecNodeSetParams"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams), 0x2EF4, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1425, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1427 + * _F_cuGetProcAddress_v2('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphConditionalHandleCreate + * _F_cuGetProcAddress_v2('cuGraphConditionalHandleCreate', &__cuGraphConditionalHandleCreate, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphConditionalHandleCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate), 0x2EFE, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1429 + * _F_cuGetProcAddress_v2('cuGraphConditionalHandleCreate', &__cuGraphConditionalHandleCreate, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1429, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1431 + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSize + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1433 + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxPotentialBlockSize + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxPotentialBlockSize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1433, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1435 + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyAvailableDynamicSMemPerBlock + * _F_cuGetProcAddress_v2('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1435, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1437 + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyAvailableDynamicSMemPerBlock + * _F_cuGetProcAddress_v2('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialClusterSize + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyAvailableDynamicSMemPerBlock"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock), 0x2724, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1437, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1439 + * _F_cuGetProcAddress_v2('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxPotentialClusterSize + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveClusters + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxPotentialClusterSize"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1441 + * _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuOccupancyMaxActiveClusters + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetArray + * _F_cuGetProcAddress_v2('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuOccupancyMaxActiveClusters"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters), 0x2B3E, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1441, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1443 + * _F_cuGetProcAddress_v2('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetArray + * _F_cuGetProcAddress_v2('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmappedArray + * _F_cuGetProcAddress_v2('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1443, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1445 + * _F_cuGetProcAddress_v2('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetMipmappedArray + * _F_cuGetProcAddress_v2('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress_v2 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetMipmappedArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1445, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1447 + * _F_cuGetProcAddress_v2('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetAddress_v2 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress2D_v3 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetAddress"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1447, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1449 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetAddress2D_v3 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetFormat + * _F_cuGetProcAddress_v2('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetAddress2D"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3), 0xFAA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1449, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1451 + * _F_cuGetProcAddress_v2('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetFormat + * _F_cuGetProcAddress_v2('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetAddressMode + * _F_cuGetProcAddress_v2('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetFormat"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1453 + * _F_cuGetProcAddress_v2('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetAddressMode + * _F_cuGetProcAddress_v2('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetFilterMode + * _F_cuGetProcAddress_v2('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetAddressMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1455 + * _F_cuGetProcAddress_v2('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetFilterMode + * _F_cuGetProcAddress_v2('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapFilterMode + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetFilterMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1457 + * _F_cuGetProcAddress_v2('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetMipmapFilterMode + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelBias + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetMipmapFilterMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1459 + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetMipmapLevelBias + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelClamp + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetMipmapLevelBias"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1459, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1461 + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetMipmapLevelClamp + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetMaxAnisotropy + * _F_cuGetProcAddress_v2('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetMipmapLevelClamp"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1461, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1463 + * _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetMaxAnisotropy + * _F_cuGetProcAddress_v2('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetBorderColor + * _F_cuGetProcAddress_v2('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetMaxAnisotropy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1463, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1465 + * _F_cuGetProcAddress_v2('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetBorderColor + * _F_cuGetProcAddress_v2('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefSetFlags + * _F_cuGetProcAddress_v2('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetBorderColor"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1467 + * _F_cuGetProcAddress_v2('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefSetFlags + * _F_cuGetProcAddress_v2('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetAddress_v2 + * _F_cuGetProcAddress_v2('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefSetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1469 + * _F_cuGetProcAddress_v2('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetAddress_v2 + * _F_cuGetProcAddress_v2('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetArray + * _F_cuGetProcAddress_v2('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetAddress"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1471 + * _F_cuGetProcAddress_v2('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetArray + * _F_cuGetProcAddress_v2('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmappedArray + * _F_cuGetProcAddress_v2('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1471, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1473 + * _F_cuGetProcAddress_v2('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetMipmappedArray + * _F_cuGetProcAddress_v2('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetAddressMode + * _F_cuGetProcAddress_v2('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetMipmappedArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1473, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1475 + * _F_cuGetProcAddress_v2('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetAddressMode + * _F_cuGetProcAddress_v2('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetFilterMode + * _F_cuGetProcAddress_v2('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetAddressMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1475, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1477 + * _F_cuGetProcAddress_v2('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetFilterMode + * _F_cuGetProcAddress_v2('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetFormat + * _F_cuGetProcAddress_v2('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetFilterMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1477, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1479 + * _F_cuGetProcAddress_v2('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetFormat + * _F_cuGetProcAddress_v2('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapFilterMode + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetFormat"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1479, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1481 + * _F_cuGetProcAddress_v2('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetMipmapFilterMode + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelBias + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetMipmapFilterMode"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1481, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1483 + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetMipmapLevelBias + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelClamp + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetMipmapLevelBias"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1485 + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetMipmapLevelClamp + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetMaxAnisotropy + * _F_cuGetProcAddress_v2('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetMipmapLevelClamp"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1487 + * _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetMaxAnisotropy + * _F_cuGetProcAddress_v2('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetBorderColor + * _F_cuGetProcAddress_v2('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetMaxAnisotropy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1487, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1489 + * _F_cuGetProcAddress_v2('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetBorderColor + * _F_cuGetProcAddress_v2('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefGetFlags + * _F_cuGetProcAddress_v2('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetBorderColor"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1491 + * _F_cuGetProcAddress_v2('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefGetFlags + * _F_cuGetProcAddress_v2('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefCreate + * _F_cuGetProcAddress_v2('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefGetFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1493 + * _F_cuGetProcAddress_v2('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefCreate + * _F_cuGetProcAddress_v2('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexRefDestroy + * _F_cuGetProcAddress_v2('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1493, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1495 + * _F_cuGetProcAddress_v2('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexRefDestroy + * _F_cuGetProcAddress_v2('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSurfRefSetArray + * _F_cuGetProcAddress_v2('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexRefDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy), 0x7D0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1497 + * _F_cuGetProcAddress_v2('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSurfRefSetArray + * _F_cuGetProcAddress_v2('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSurfRefGetArray + * _F_cuGetProcAddress_v2('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSurfRefSetArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1499 + * _F_cuGetProcAddress_v2('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSurfRefGetArray + * _F_cuGetProcAddress_v2('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexObjectCreate + * _F_cuGetProcAddress_v2('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSurfRefGetArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1499, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1501 + * _F_cuGetProcAddress_v2('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexObjectCreate + * _F_cuGetProcAddress_v2('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexObjectDestroy + * _F_cuGetProcAddress_v2('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexObjectCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1503 + * _F_cuGetProcAddress_v2('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexObjectDestroy + * _F_cuGetProcAddress_v2('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexObjectDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1503, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1505 + * _F_cuGetProcAddress_v2('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexObjectGetResourceDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexObjectGetTextureDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexObjectGetResourceDesc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1507 + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexObjectGetTextureDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceViewDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexObjectGetTextureDesc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1507, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1509 + * _F_cuGetProcAddress_v2('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTexObjectGetResourceViewDesc + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSurfObjectCreate + * _F_cuGetProcAddress_v2('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTexObjectGetResourceViewDesc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1509, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1511 + * _F_cuGetProcAddress_v2('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSurfObjectCreate + * _F_cuGetProcAddress_v2('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSurfObjectDestroy + * _F_cuGetProcAddress_v2('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSurfObjectCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1513 + * _F_cuGetProcAddress_v2('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSurfObjectDestroy + * _F_cuGetProcAddress_v2('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuSurfObjectGetResourceDesc + * _F_cuGetProcAddress_v2('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSurfObjectDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1515 + * _F_cuGetProcAddress_v2('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuSurfObjectGetResourceDesc + * _F_cuGetProcAddress_v2('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeTiled + * _F_cuGetProcAddress_v2('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuSurfObjectGetResourceDesc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1515, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1517 + * _F_cuGetProcAddress_v2('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTensorMapEncodeTiled + * _F_cuGetProcAddress_v2('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2col + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTensorMapEncodeTiled"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1517, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1519 + * _F_cuGetProcAddress_v2('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTensorMapEncodeIm2col + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2colWide + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2colWide', &__cuTensorMapEncodeIm2colWide, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTensorMapEncodeIm2col"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1519, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1521 + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTensorMapEncodeIm2colWide + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2colWide', &__cuTensorMapEncodeIm2colWide, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuTensorMapReplaceAddress + * _F_cuGetProcAddress_v2('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTensorMapEncodeIm2colWide"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1521, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1523 + * _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2colWide', &__cuTensorMapEncodeIm2colWide, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuTensorMapReplaceAddress + * _F_cuGetProcAddress_v2('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceCanAccessPeer + * _F_cuGetProcAddress_v2('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuTensorMapReplaceAddress"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1523, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1525 + * _F_cuGetProcAddress_v2('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceCanAccessPeer + * _F_cuGetProcAddress_v2('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxEnablePeerAccess + * _F_cuGetProcAddress_v2('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceCanAccessPeer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1525, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1527 + * _F_cuGetProcAddress_v2('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxEnablePeerAccess + * _F_cuGetProcAddress_v2('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxDisablePeerAccess + * _F_cuGetProcAddress_v2('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxEnablePeerAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1527, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1529 + * _F_cuGetProcAddress_v2('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxDisablePeerAccess + * _F_cuGetProcAddress_v2('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetP2PAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxDisablePeerAccess"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1531 + * _F_cuGetProcAddress_v2('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetP2PAttribute + * _F_cuGetProcAddress_v2('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsUnregisterResource + * _F_cuGetProcAddress_v2('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetP2PAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1531, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1533 + * _F_cuGetProcAddress_v2('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsUnregisterResource + * _F_cuGetProcAddress_v2('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsSubResourceGetMappedArray + * _F_cuGetProcAddress_v2('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsUnregisterResource"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1533, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1535 + * _F_cuGetProcAddress_v2('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsSubResourceGetMappedArray + * _F_cuGetProcAddress_v2('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedMipmappedArray + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsSubResourceGetMappedArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1535, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1537 + * _F_cuGetProcAddress_v2('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsResourceGetMappedMipmappedArray + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedPointer_v2 + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsResourceGetMappedMipmappedArray"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray), 0x1388, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1539 + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsResourceGetMappedPointer_v2 + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsResourceSetMapFlags_v2 + * _F_cuGetProcAddress_v2('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsResourceGetMappedPointer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1539, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1541 + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsResourceSetMapFlags_v2 + * _F_cuGetProcAddress_v2('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGetProcAddress_v2 + * _F_cuGetProcAddress_v2('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsResourceSetMapFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1541, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1543 + * _F_cuGetProcAddress_v2('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGetProcAddress_v2 + * _F_cuGetProcAddress_v2('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttribute + * _F_cuGetProcAddress_v2('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGetProcAddress"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2), 0x2EE0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1545 + * _F_cuGetProcAddress_v2('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCoredumpGetAttribute + * _F_cuGetProcAddress_v2('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttributeGlobal + * _F_cuGetProcAddress_v2('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCoredumpGetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1545, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1547 + * _F_cuGetProcAddress_v2('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCoredumpGetAttributeGlobal + * _F_cuGetProcAddress_v2('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttribute + * _F_cuGetProcAddress_v2('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCoredumpGetAttributeGlobal"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1547, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1549 + * _F_cuGetProcAddress_v2('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCoredumpSetAttribute + * _F_cuGetProcAddress_v2('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttributeGlobal + * _F_cuGetProcAddress_v2('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCoredumpSetAttribute"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1549, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1551 + * _F_cuGetProcAddress_v2('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCoredumpSetAttributeGlobal + * _F_cuGetProcAddress_v2('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGetExportTable + * _F_cuGetProcAddress_v2('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCoredumpSetAttributeGlobal"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal), 0x2EEA, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1553 + * _F_cuGetProcAddress_v2('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGetExportTable + * _F_cuGetProcAddress_v2('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxCreate + * _F_cuGetProcAddress_v2('cuGreenCtxCreate', &__cuGreenCtxCreate, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGetExportTable"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1553, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1555 + * _F_cuGetProcAddress_v2('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxCreate + * _F_cuGetProcAddress_v2('cuGreenCtxCreate', &__cuGreenCtxCreate, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxDestroy + * _F_cuGetProcAddress_v2('cuGreenCtxDestroy', &__cuGreenCtxDestroy, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1555, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1557 + * _F_cuGetProcAddress_v2('cuGreenCtxCreate', &__cuGreenCtxCreate, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxDestroy + * _F_cuGetProcAddress_v2('cuGreenCtxDestroy', &__cuGreenCtxDestroy, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxFromGreenCtx + * _F_cuGetProcAddress_v2('cuCtxFromGreenCtx', &__cuCtxFromGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxDestroy"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1557, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1559 + * _F_cuGetProcAddress_v2('cuGreenCtxDestroy', &__cuGreenCtxDestroy, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxFromGreenCtx + * _F_cuGetProcAddress_v2('cuCtxFromGreenCtx', &__cuCtxFromGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDeviceGetDevResource + * _F_cuGetProcAddress_v2('cuDeviceGetDevResource', &__cuDeviceGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxFromGreenCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1559, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1561 + * _F_cuGetProcAddress_v2('cuCtxFromGreenCtx', &__cuCtxFromGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDeviceGetDevResource + * _F_cuGetProcAddress_v2('cuDeviceGetDevResource', &__cuDeviceGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCtxGetDevResource + * _F_cuGetProcAddress_v2('cuCtxGetDevResource', &__cuCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDeviceGetDevResource"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1563 + * _F_cuGetProcAddress_v2('cuDeviceGetDevResource', &__cuDeviceGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCtxGetDevResource + * _F_cuGetProcAddress_v2('cuCtxGetDevResource', &__cuCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxGetDevResource + * _F_cuGetProcAddress_v2('cuGreenCtxGetDevResource', &__cuGreenCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCtxGetDevResource"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1563, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1565 + * _F_cuGetProcAddress_v2('cuCtxGetDevResource', &__cuCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxGetDevResource + * _F_cuGetProcAddress_v2('cuGreenCtxGetDevResource', &__cuGreenCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevSmResourceSplitByCount + * _F_cuGetProcAddress_v2('cuDevSmResourceSplitByCount', &__cuDevSmResourceSplitByCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxGetDevResource"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1567 + * _F_cuGetProcAddress_v2('cuGreenCtxGetDevResource', &__cuGreenCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevSmResourceSplitByCount + * _F_cuGetProcAddress_v2('cuDevSmResourceSplitByCount', &__cuDevSmResourceSplitByCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuDevResourceGenerateDesc + * _F_cuGetProcAddress_v2('cuDevResourceGenerateDesc', &__cuDevResourceGenerateDesc, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevSmResourceSplitByCount"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1567, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1569 + * _F_cuGetProcAddress_v2('cuDevSmResourceSplitByCount', &__cuDevSmResourceSplitByCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuDevResourceGenerateDesc + * _F_cuGetProcAddress_v2('cuDevResourceGenerateDesc', &__cuDevResourceGenerateDesc, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxRecordEvent + * _F_cuGetProcAddress_v2('cuGreenCtxRecordEvent', &__cuGreenCtxRecordEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuDevResourceGenerateDesc"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1569, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1571 + * _F_cuGetProcAddress_v2('cuDevResourceGenerateDesc', &__cuDevResourceGenerateDesc, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxRecordEvent + * _F_cuGetProcAddress_v2('cuGreenCtxRecordEvent', &__cuGreenCtxRecordEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxWaitEvent + * _F_cuGetProcAddress_v2('cuGreenCtxWaitEvent', &__cuGreenCtxWaitEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxRecordEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1571, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1573 + * _F_cuGetProcAddress_v2('cuGreenCtxRecordEvent', &__cuGreenCtxRecordEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxWaitEvent + * _F_cuGetProcAddress_v2('cuGreenCtxWaitEvent', &__cuGreenCtxWaitEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuStreamGetGreenCtx + * _F_cuGetProcAddress_v2('cuStreamGetGreenCtx', &__cuStreamGetGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxWaitEvent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1573, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1575 + * _F_cuGetProcAddress_v2('cuGreenCtxWaitEvent', &__cuGreenCtxWaitEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuStreamGetGreenCtx + * _F_cuGetProcAddress_v2('cuStreamGetGreenCtx', &__cuStreamGetGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGreenCtxStreamCreate + * _F_cuGetProcAddress_v2('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuStreamGetGreenCtx"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx), 0x2F08, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1577 + * _F_cuGetProcAddress_v2('cuStreamGetGreenCtx', &__cuStreamGetGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGreenCtxStreamCreate + * _F_cuGetProcAddress_v2('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLogsRegisterCallback + * _F_cuGetProcAddress_v2('cuLogsRegisterCallback', &__cuLogsRegisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGreenCtxStreamCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate), 0x2F12, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1579 + * _F_cuGetProcAddress_v2('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLogsRegisterCallback + * _F_cuGetProcAddress_v2('cuLogsRegisterCallback', &__cuLogsRegisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLogsUnregisterCallback + * _F_cuGetProcAddress_v2('cuLogsUnregisterCallback', &__cuLogsUnregisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLogsRegisterCallback"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1581 + * _F_cuGetProcAddress_v2('cuLogsRegisterCallback', &__cuLogsRegisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLogsUnregisterCallback + * _F_cuGetProcAddress_v2('cuLogsUnregisterCallback', &__cuLogsUnregisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLogsCurrent + * _F_cuGetProcAddress_v2('cuLogsCurrent', &__cuLogsCurrent, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLogsUnregisterCallback"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1583 + * _F_cuGetProcAddress_v2('cuLogsUnregisterCallback', &__cuLogsUnregisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLogsCurrent + * _F_cuGetProcAddress_v2('cuLogsCurrent', &__cuLogsCurrent, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLogsDumpToFile + * _F_cuGetProcAddress_v2('cuLogsDumpToFile', &__cuLogsDumpToFile, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLogsCurrent"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1585 + * _F_cuGetProcAddress_v2('cuLogsCurrent', &__cuLogsCurrent, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLogsDumpToFile + * _F_cuGetProcAddress_v2('cuLogsDumpToFile', &__cuLogsDumpToFile, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuLogsDumpToMemory + * _F_cuGetProcAddress_v2('cuLogsDumpToMemory', &__cuLogsDumpToMemory, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLogsDumpToFile"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1587 + * _F_cuGetProcAddress_v2('cuLogsDumpToFile', &__cuLogsDumpToFile, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuLogsDumpToMemory + * _F_cuGetProcAddress_v2('cuLogsDumpToMemory', &__cuLogsDumpToMemory, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetRestoreThreadId + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetRestoreThreadId', &__cuCheckpointProcessGetRestoreThreadId, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuLogsDumpToMemory"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1587, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1589 + * _F_cuGetProcAddress_v2('cuLogsDumpToMemory', &__cuLogsDumpToMemory, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessGetRestoreThreadId + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetRestoreThreadId', &__cuCheckpointProcessGetRestoreThreadId, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetState + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetState', &__cuCheckpointProcessGetState, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessGetRestoreThreadId"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1589, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1591 + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetRestoreThreadId', &__cuCheckpointProcessGetRestoreThreadId, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessGetState + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetState', &__cuCheckpointProcessGetState, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessLock + * _F_cuGetProcAddress_v2('cuCheckpointProcessLock', &__cuCheckpointProcessLock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessGetState"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1591, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1593 + * _F_cuGetProcAddress_v2('cuCheckpointProcessGetState', &__cuCheckpointProcessGetState, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessLock + * _F_cuGetProcAddress_v2('cuCheckpointProcessLock', &__cuCheckpointProcessLock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessCheckpoint + * _F_cuGetProcAddress_v2('cuCheckpointProcessCheckpoint', &__cuCheckpointProcessCheckpoint, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessLock"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1593, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1595 + * _F_cuGetProcAddress_v2('cuCheckpointProcessLock', &__cuCheckpointProcessLock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessCheckpoint + * _F_cuGetProcAddress_v2('cuCheckpointProcessCheckpoint', &__cuCheckpointProcessCheckpoint, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessRestore + * _F_cuGetProcAddress_v2('cuCheckpointProcessRestore', &__cuCheckpointProcessRestore, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessCheckpoint"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1595, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1597 + * _F_cuGetProcAddress_v2('cuCheckpointProcessCheckpoint', &__cuCheckpointProcessCheckpoint, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessRestore + * _F_cuGetProcAddress_v2('cuCheckpointProcessRestore', &__cuCheckpointProcessRestore, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuCheckpointProcessUnlock + * _F_cuGetProcAddress_v2('cuCheckpointProcessUnlock', &__cuCheckpointProcessUnlock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessRestore"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1599 + * _F_cuGetProcAddress_v2('cuCheckpointProcessRestore', &__cuCheckpointProcessRestore, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuCheckpointProcessUnlock + * _F_cuGetProcAddress_v2('cuCheckpointProcessUnlock', &__cuCheckpointProcessUnlock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuProfilerStart + * _F_cuGetProcAddress_v2('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuCheckpointProcessUnlock"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock), 0x2F30, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1599, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1601 + * _F_cuGetProcAddress_v2('cuCheckpointProcessUnlock', &__cuCheckpointProcessUnlock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuProfilerStart + * _F_cuGetProcAddress_v2('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuProfilerStop + * _F_cuGetProcAddress_v2('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuProfilerStart"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1601, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1603 + * _F_cuGetProcAddress_v2('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuProfilerStop + * _F_cuGetProcAddress_v2('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsEGLRegisterImage + * _F_cuGetProcAddress_v2('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuProfilerStop"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop), 0xFA0, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1603, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1605 + * _F_cuGetProcAddress_v2('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsEGLRegisterImage + * _F_cuGetProcAddress_v2('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnect + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsEGLRegisterImage"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1607 + * _F_cuGetProcAddress_v2('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamConsumerConnect + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnectWithFlags + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamConsumerConnect"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1607, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1609 + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamConsumerConnectWithFlags + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerDisconnect + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamConsumerConnectWithFlags"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags), 0x1F40, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1609, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1611 + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamConsumerDisconnect + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerAcquireFrame + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamConsumerDisconnect"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1613 + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamConsumerAcquireFrame + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerReleaseFrame + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamConsumerAcquireFrame"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1615 + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamConsumerReleaseFrame + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerConnect + * _F_cuGetProcAddress_v2('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamConsumerReleaseFrame"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1617 + * _F_cuGetProcAddress_v2('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamProducerConnect + * _F_cuGetProcAddress_v2('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerDisconnect + * _F_cuGetProcAddress_v2('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamProducerConnect"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1617, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1619 + * _F_cuGetProcAddress_v2('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamProducerDisconnect + * _F_cuGetProcAddress_v2('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerPresentFrame + * _F_cuGetProcAddress_v2('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamProducerDisconnect"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1619, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1621 + * _F_cuGetProcAddress_v2('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamProducerPresentFrame + * _F_cuGetProcAddress_v2('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerReturnFrame + * _F_cuGetProcAddress_v2('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamProducerPresentFrame"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1623 + * _F_cuGetProcAddress_v2('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEGLStreamProducerReturnFrame + * _F_cuGetProcAddress_v2('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedEglFrame + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEGLStreamProducerReturnFrame"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1623, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1625 + * _F_cuGetProcAddress_v2('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsResourceGetMappedEglFrame + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuEventCreateFromEGLSync + * _F_cuGetProcAddress_v2('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsResourceGetMappedEglFrame"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame), 0x1B58, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1625, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1627 + * _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuEventCreateFromEGLSync + * _F_cuGetProcAddress_v2('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterBuffer + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuEventCreateFromEGLSync"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync), 0x2328, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1627, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1629 + * _F_cuGetProcAddress_v2('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsGLRegisterBuffer + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterImage + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsGLRegisterBuffer"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1629, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1631 + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsGLRegisterImage + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGLGetDevices_v2 + * _F_cuGetProcAddress_v2('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsGLRegisterImage"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage), 0xBB8, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1631, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1633 + * _F_cuGetProcAddress_v2('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGLGetDevices_v2 + * _F_cuGetProcAddress_v2('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuVDPAUGetDevice + * _F_cuGetProcAddress_v2('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGLGetDevices"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2), 0x17A2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1633, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1635 + * _F_cuGetProcAddress_v2('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuVDPAUGetDevice + * _F_cuGetProcAddress_v2('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuVDPAUCtxCreate_v2 + * _F_cuGetProcAddress_v2('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuVDPAUGetDevice"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1635, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1637 + * _F_cuGetProcAddress_v2('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuVDPAUCtxCreate_v2 + * _F_cuGetProcAddress_v2('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterVideoSurface + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuVDPAUCtxCreate"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2), 0xBCC, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1639 + * _F_cuGetProcAddress_v2('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsVDPAURegisterVideoSurface + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterOutputSurface + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsVDPAURegisterVideoSurface"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1639, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1641 + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * global __cuGraphicsVDPAURegisterOutputSurface + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) # <<<<<<<<<<<<<< + * __cuPythonInit = True + * return 0 +*/ + __pyx_t_14 = __pyx_v__F_cuGetProcAddress_v2(((char const *)"cuGraphicsVDPAURegisterOutputSurface"), (&__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface), 0xBC2, CU_GET_PROC_ADDRESS_DEFAULT, NULL); if (unlikely(__pyx_t_14 == ((CUresult)CUDA_ERROR_NOT_FOUND) && PyErr_Occurred())) __PYX_ERR(0, 1641, __pyx_L10_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":1642 + * global __cuGraphicsVDPAURegisterOutputSurface + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * __cuPythonInit = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPythonInit = 1; + + /* "cuda/bindings/_bindings/cydriver.pyx":1643 + * _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + * __cuPythonInit = True + * return 0 # <<<<<<<<<<<<<< + * + * # Load using dlsym +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_bindings/cydriver.pyx":517 + * + * # Load using cuGetProcAddress if available + * if __cuGetProcAddress_v2 != NULL: # <<<<<<<<<<<<<< + * _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 + * if usePTDS: +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":1646 + * + * # Load using dlsym + * if usePTDS: # <<<<<<<<<<<<<< + * # Get all PTDS version of functions + * pass +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cydriver.pyx":1650 + * pass + * global __cuMemcpy + * __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1652 + * __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds') + * global __cuMemcpyPeer + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeer_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1654 + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds') + * global __cuMemcpyHtoD_v2 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoD_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1656 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds') + * global __cuMemcpyDtoH_v2 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoH_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1658 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds') + * global __cuMemcpyDtoD_v2 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoD_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1660 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds') + * global __cuMemcpyDtoA_v2 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoA_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1662 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds') + * global __cuMemcpyAtoD_v2 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoD_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1664 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds') + * global __cuMemcpyHtoA_v2 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoA_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1666 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds') + * global __cuMemcpyAtoH_v2 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoH_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1668 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds') + * global __cuMemcpyAtoA_v2 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoA_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1670 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds') + * global __cuMemcpy2D_v2 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2D_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1672 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds') + * global __cuMemcpy2DUnaligned_v2 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DUnaligned_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1674 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds') + * global __cuMemcpy3D_v2 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3D_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1676 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds') + * global __cuMemcpy3DPeer + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds') # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeer_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1678 + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds') + * global __cuMemcpyAsync + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1680 + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz') + * global __cuMemcpyPeerAsync + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeerAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1682 + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz') + * global __cuMemcpyHtoDAsync_v2 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoDAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1684 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz') + * global __cuMemcpyDtoHAsync_v2 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoHAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1686 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz') + * global __cuMemcpyDtoDAsync_v2 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoDAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1688 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz') + * global __cuMemcpyHtoAAsync_v2 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoAAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1690 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz') + * global __cuMemcpyAtoHAsync_v2 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoHAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1692 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz') + * global __cuMemcpy2DAsync_v2 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1694 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz') + * global __cuMemcpy3DAsync_v2 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1696 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz') + * global __cuMemcpy3DPeerAsync + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeerAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1698 + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') + * global __cuMemcpyBatchAsync + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyBatchAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1700 + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync_ptsz') + * global __cuMemcpy3DBatchAsync + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DBatchAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1702 + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync_ptsz') + * global __cuMemsetD8_v2 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1704 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') + * global __cuMemsetD16_v2 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1706 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds') + * global __cuMemsetD32_v2 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1708 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds') + * global __cuMemsetD2D8_v2 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1710 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds') + * global __cuMemsetD2D16_v2 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1712 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds') + * global __cuMemsetD2D32_v2 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds') # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32_v2_ptds")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1714 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds') + * global __cuMemsetD8Async + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1716 + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz') + * global __cuMemsetD16Async + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1718 + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz') + * global __cuMemsetD32Async + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1720 + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz') + * global __cuMemsetD2D8Async + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1722 + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz') + * global __cuMemsetD2D16Async + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1724 + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz') + * global __cuMemsetD2D32Async + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32Async_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1726 + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') + * global __cuMemBatchDecompressAsync + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemBatchDecompressAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1728 + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync_ptsz') + * global __cuMemMapArrayAsync + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemMapArrayAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1730 + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') + * global __cuMemFreeAsync + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1732 + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz') + * global __cuMemAllocAsync + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1734 + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz') + * global __cuMemAllocFromPoolAsync + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocFromPoolAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1736 + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz') + * global __cuMemPrefetchAsync + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1738 + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz') + * global __cuMemPrefetchAsync_v2 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1740 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2_ptsz') + * global __cuStreamGetPriority + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetPriority_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1742 + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') + * global __cuStreamGetDevice + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetDevice_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1744 + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice_ptsz') + * global __cuStreamGetFlags + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetId + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetFlags_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1746 + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') + * global __cuStreamGetId + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetId_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1748 + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId_ptsz') + * global __cuStreamGetCtx + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1750 + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz') + * global __cuStreamGetCtx_v2 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1752 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2_ptsz') + * global __cuStreamWaitEvent + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitEvent_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1754 + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz') + * global __cuStreamAddCallback + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback = dlsym(__pyx_v_handle, ((char const *)"cuStreamAddCallback_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1756 + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz') + * global __cuStreamBeginCapture_v2 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCapture_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1758 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz') + * global __cuStreamBeginCaptureToGraph + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCaptureToGraph_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1760 + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph_ptsz') + * global __cuStreamEndCapture + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture = dlsym(__pyx_v_handle, ((char const *)"cuStreamEndCapture_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1762 + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz') + * global __cuStreamIsCapturing + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing = dlsym(__pyx_v_handle, ((char const *)"cuStreamIsCapturing_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1764 + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz') + * global __cuStreamGetCaptureInfo_v2 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1766 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz') + * global __cuStreamGetCaptureInfo_v3 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v3_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1768 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3_ptsz') + * global __cuStreamUpdateCaptureDependencies + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1770 + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz') + * global __cuStreamUpdateCaptureDependencies_v2 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1772 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') + * global __cuStreamAttachMemAsync + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamQuery + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync = dlsym(__pyx_v_handle, ((char const *)"cuStreamAttachMemAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1774 + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz') + * global __cuStreamQuery + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery = dlsym(__pyx_v_handle, ((char const *)"cuStreamQuery_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1776 + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz') + * global __cuStreamSynchronize + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuStreamSynchronize_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1778 + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz') + * global __cuStreamCopyAttributes + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuStreamCopyAttributes_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1780 + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz') + * global __cuStreamGetAttribute + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetAttribute_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1782 + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz') + * global __cuStreamSetAttribute + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz') # <<<<<<<<<<<<<< + * global __cuEventRecord + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamSetAttribute_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1784 + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz') + * global __cuEventRecord + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz') # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord = dlsym(__pyx_v_handle, ((char const *)"cuEventRecord_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1786 + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz') + * global __cuEventRecordWithFlags + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz') # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEventRecordWithFlags_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1788 + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz') + * global __cuSignalExternalSemaphoresAsync + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuSignalExternalSemaphoresAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1790 + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz') + * global __cuWaitExternalSemaphoresAsync + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuWaitExternalSemaphoresAsync_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1792 + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz') + * global __cuStreamWaitValue32_v2 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue32_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1794 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2_ptsz') + * global __cuStreamWaitValue64_v2 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue64_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1796 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2_ptsz') + * global __cuStreamWriteValue32_v2 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue32_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1798 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2_ptsz') + * global __cuStreamWriteValue64_v2 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue64_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1800 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2_ptsz') + * global __cuStreamBatchMemOp_v2 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2_ptsz') # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBatchMemOp_v2_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1802 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2_ptsz') + * global __cuLaunchKernel + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz') # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernel_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1804 + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz') + * global __cuLaunchKernelEx + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx_ptsz') # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernelEx_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1806 + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx_ptsz') + * global __cuLaunchCooperativeKernel + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz') # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernel_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1808 + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz') + * global __cuLaunchHostFunc + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz') # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc = dlsym(__pyx_v_handle, ((char const *)"cuLaunchHostFunc_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1810 + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz') + * global __cuGraphInstantiateWithParams + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams_ptsz') # <<<<<<<<<<<<<< + * global __cuGraphUpload + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphInstantiateWithParams_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1812 + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams_ptsz') + * global __cuGraphUpload + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz') # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload = dlsym(__pyx_v_handle, ((char const *)"cuGraphUpload_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1814 + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz') + * global __cuGraphLaunch + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz') # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch = dlsym(__pyx_v_handle, ((char const *)"cuGraphLaunch_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1816 + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz') + * global __cuGraphicsMapResources + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz') # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsMapResources_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1818 + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz') + * global __cuGraphicsUnmapResources + * __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz') # <<<<<<<<<<<<<< + * else: + * # Else get the regular version +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnmapResources_ptsz")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1646 + * + * # Load using dlsym + * if usePTDS: # <<<<<<<<<<<<<< + * # Get all PTDS version of functions + * pass +*/ + goto __pyx_L22; + } + + /* "cuda/bindings/_bindings/cydriver.pyx":1821 + * else: + * # Else get the regular version + * pass # <<<<<<<<<<<<<< + * global __cuMemcpy + * __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy') +*/ + /*else*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":1823 + * pass + * global __cuMemcpy + * __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy') # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1825 + * __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy') + * global __cuMemcpyPeer + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1827 + * __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer') + * global __cuMemcpyHtoD_v2 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoD_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1829 + * __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2') + * global __cuMemcpyDtoH_v2 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoH_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1831 + * __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2') + * global __cuMemcpyDtoD_v2 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoD_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1833 + * __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2') + * global __cuMemcpyDtoA_v2 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoA_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1835 + * __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2') + * global __cuMemcpyAtoD_v2 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoD_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1837 + * __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2') + * global __cuMemcpyHtoA_v2 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoA_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1839 + * __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2') + * global __cuMemcpyAtoH_v2 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoH_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1841 + * __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2') + * global __cuMemcpyAtoA_v2 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoA_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1843 + * __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2') + * global __cuMemcpy2D_v2 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2D_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1845 + * __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2') + * global __cuMemcpy2DUnaligned_v2 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DUnaligned_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1847 + * __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2') + * global __cuMemcpy3D_v2 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3D_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1849 + * __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2') + * global __cuMemcpy3DPeer + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer') # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1851 + * __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer') + * global __cuMemcpyAsync + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync') # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1853 + * __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync') + * global __cuMemcpyPeerAsync + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyPeerAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1855 + * __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync') + * global __cuMemcpyHtoDAsync_v2 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoDAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1857 + * __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2') + * global __cuMemcpyDtoHAsync_v2 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoHAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1859 + * __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2') + * global __cuMemcpyDtoDAsync_v2 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyDtoDAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1861 + * __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2') + * global __cuMemcpyHtoAAsync_v2 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyHtoAAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1863 + * __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2') + * global __cuMemcpyAtoHAsync_v2 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyAtoHAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1865 + * __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2') + * global __cuMemcpy2DAsync_v2 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy2DAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1867 + * __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2') + * global __cuMemcpy3DAsync_v2 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2') # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1869 + * __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2') + * global __cuMemcpy3DPeerAsync + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DPeerAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1871 + * __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') + * global __cuMemcpyBatchAsync + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync') # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpyBatchAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1873 + * __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync') + * global __cuMemcpy3DBatchAsync + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync') # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemcpy3DBatchAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1875 + * __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync') + * global __cuMemsetD8_v2 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1877 + * __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') + * global __cuMemsetD16_v2 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1879 + * __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2') + * global __cuMemsetD32_v2 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1881 + * __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2') + * global __cuMemsetD2D8_v2 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1883 + * __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2') + * global __cuMemsetD2D16_v2 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1885 + * __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2') + * global __cuMemsetD2D32_v2 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2') # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1887 + * __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2') + * global __cuMemsetD8Async + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async') # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD8Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1889 + * __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async') + * global __cuMemsetD16Async + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async') # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD16Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1891 + * __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async') + * global __cuMemsetD32Async + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async') # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD32Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1893 + * __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async') + * global __cuMemsetD2D8Async + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async') # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D8Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1895 + * __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async') + * global __cuMemsetD2D16Async + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async') # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D16Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1897 + * __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async') + * global __cuMemsetD2D32Async + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async = dlsym(__pyx_v_handle, ((char const *)"cuMemsetD2D32Async")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1899 + * __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') + * global __cuMemBatchDecompressAsync + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync') # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemBatchDecompressAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1901 + * __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync') + * global __cuMemMapArrayAsync + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemMapArrayAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1903 + * __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') + * global __cuMemFreeAsync + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync') # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1905 + * __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync') + * global __cuMemAllocAsync + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync') # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1907 + * __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync') + * global __cuMemAllocFromPoolAsync + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync') # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocFromPoolAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1909 + * __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync') + * global __cuMemPrefetchAsync + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync') # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1911 + * __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync') + * global __cuMemPrefetchAsync_v2 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2') # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemPrefetchAsync_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1913 + * __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2') + * global __cuStreamGetPriority + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetPriority")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1915 + * __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') + * global __cuStreamGetDevice + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice') # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetDevice")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1917 + * __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice') + * global __cuStreamGetFlags + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') # <<<<<<<<<<<<<< + * global __cuStreamGetId + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1919 + * __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') + * global __cuStreamGetId + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId') # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetId")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1921 + * __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId') + * global __cuStreamGetCtx + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx') # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1923 + * __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx') + * global __cuStreamGetCtx_v2 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2') # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCtx_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1925 + * __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2') + * global __cuStreamWaitEvent + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent') # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1927 + * __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent') + * global __cuStreamAddCallback + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback') # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback = dlsym(__pyx_v_handle, ((char const *)"cuStreamAddCallback")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1929 + * __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback') + * global __cuStreamBeginCapture_v2 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2') # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCapture_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1931 + * __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2') + * global __cuStreamBeginCaptureToGraph + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph') # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph = dlsym(__pyx_v_handle, ((char const *)"cuStreamBeginCaptureToGraph")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1933 + * __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph') + * global __cuStreamEndCapture + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture') # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture = dlsym(__pyx_v_handle, ((char const *)"cuStreamEndCapture")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1935 + * __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture') + * global __cuStreamIsCapturing + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing') # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing = dlsym(__pyx_v_handle, ((char const *)"cuStreamIsCapturing")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1937 + * __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing') + * global __cuStreamGetCaptureInfo_v2 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2') # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1939 + * __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2') + * global __cuStreamGetCaptureInfo_v3 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3') # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3 = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetCaptureInfo_v3")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1941 + * __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3') + * global __cuStreamUpdateCaptureDependencies + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies') # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1943 + * __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies') + * global __cuStreamUpdateCaptureDependencies_v2 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2') # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamUpdateCaptureDependencies_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1945 + * __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2') + * global __cuStreamAttachMemAsync + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync') # <<<<<<<<<<<<<< + * global __cuStreamQuery + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync = dlsym(__pyx_v_handle, ((char const *)"cuStreamAttachMemAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1947 + * __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync') + * global __cuStreamQuery + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery') # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery = dlsym(__pyx_v_handle, ((char const *)"cuStreamQuery")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1949 + * __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery') + * global __cuStreamSynchronize + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize') # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuStreamSynchronize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1951 + * __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize') + * global __cuStreamCopyAttributes + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes') # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuStreamCopyAttributes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1953 + * __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes') + * global __cuStreamGetAttribute + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute') # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1955 + * __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute') + * global __cuStreamSetAttribute + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute') # <<<<<<<<<<<<<< + * global __cuEventRecord + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuStreamSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1957 + * __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute') + * global __cuEventRecord + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord') # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord = dlsym(__pyx_v_handle, ((char const *)"cuEventRecord")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1959 + * __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord') + * global __cuEventRecordWithFlags + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags') # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEventRecordWithFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1961 + * __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags') + * global __cuSignalExternalSemaphoresAsync + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync') # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuSignalExternalSemaphoresAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1963 + * __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync') + * global __cuWaitExternalSemaphoresAsync + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync') # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync = dlsym(__pyx_v_handle, ((char const *)"cuWaitExternalSemaphoresAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1965 + * __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync') + * global __cuStreamWaitValue32_v2 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2') # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue32_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1967 + * __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2') + * global __cuStreamWaitValue64_v2 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2') # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWaitValue64_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1969 + * __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2') + * global __cuStreamWriteValue32_v2 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2') # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue32_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1971 + * __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2') + * global __cuStreamWriteValue64_v2 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2') # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamWriteValue64_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1973 + * __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2') + * global __cuStreamBatchMemOp_v2 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2') # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamBatchMemOp_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1975 + * __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2') + * global __cuLaunchKernel + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel') # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernel")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1977 + * __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel') + * global __cuLaunchKernelEx + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx') # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx = dlsym(__pyx_v_handle, ((char const *)"cuLaunchKernelEx")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1979 + * __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx') + * global __cuLaunchCooperativeKernel + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel') # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernel")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1981 + * __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel') + * global __cuLaunchHostFunc + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc') # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc = dlsym(__pyx_v_handle, ((char const *)"cuLaunchHostFunc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1983 + * __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc') + * global __cuGraphInstantiateWithParams + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams') # <<<<<<<<<<<<<< + * global __cuGraphUpload + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphInstantiateWithParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1985 + * __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams') + * global __cuGraphUpload + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload') # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload = dlsym(__pyx_v_handle, ((char const *)"cuGraphUpload")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1987 + * __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload') + * global __cuGraphLaunch + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch') # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch = dlsym(__pyx_v_handle, ((char const *)"cuGraphLaunch")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1989 + * __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch') + * global __cuGraphicsMapResources + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources') # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsMapResources")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1991 + * __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources') + * global __cuGraphicsUnmapResources + * __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources') # <<<<<<<<<<<<<< + * # Get remaining functions + * global __cuGetErrorString +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnmapResources")); + } + __pyx_L22:; + + /* "cuda/bindings/_bindings/cydriver.pyx":1994 + * # Get remaining functions + * global __cuGetErrorString + * __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString') # <<<<<<<<<<<<<< + * global __cuGetErrorName + * __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString = dlsym(__pyx_v_handle, ((char const *)"cuGetErrorString")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1996 + * __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString') + * global __cuGetErrorName + * __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName') # <<<<<<<<<<<<<< + * global __cuInit + * __cuInit = dlfcn.dlsym(handle, 'cuInit') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName = dlsym(__pyx_v_handle, ((char const *)"cuGetErrorName")); + + /* "cuda/bindings/_bindings/cydriver.pyx":1998 + * __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName') + * global __cuInit + * __cuInit = dlfcn.dlsym(handle, 'cuInit') # <<<<<<<<<<<<<< + * global __cuDriverGetVersion + * __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit = dlsym(__pyx_v_handle, ((char const *)"cuInit")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2000 + * __cuInit = dlfcn.dlsym(handle, 'cuInit') + * global __cuDriverGetVersion + * __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion') # <<<<<<<<<<<<<< + * global __cuDeviceGet + * __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion = dlsym(__pyx_v_handle, ((char const *)"cuDriverGetVersion")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2002 + * __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion') + * global __cuDeviceGet + * __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet') # <<<<<<<<<<<<<< + * global __cuDeviceGetCount + * __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGet")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2004 + * __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet') + * global __cuDeviceGetCount + * __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount') # <<<<<<<<<<<<<< + * global __cuDeviceGetName + * __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetCount")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2006 + * __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount') + * global __cuDeviceGetName + * __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName') # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid + * __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetName")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2008 + * __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName') + * global __cuDeviceGetUuid + * __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid') # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid_v2 + * __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetUuid")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2010 + * __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid') + * global __cuDeviceGetUuid_v2 + * __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2') # <<<<<<<<<<<<<< + * global __cuDeviceGetLuid + * __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetUuid_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2012 + * __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2') + * global __cuDeviceGetLuid + * __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid') # <<<<<<<<<<<<<< + * global __cuDeviceTotalMem_v2 + * __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetLuid")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2014 + * __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid') + * global __cuDeviceTotalMem_v2 + * __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2') # <<<<<<<<<<<<<< + * global __cuDeviceGetTexture1DLinearMaxWidth + * __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDeviceTotalMem_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2016 + * __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2') + * global __cuDeviceGetTexture1DLinearMaxWidth + * __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth') # <<<<<<<<<<<<<< + * global __cuDeviceGetAttribute + * __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetTexture1DLinearMaxWidth")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2018 + * __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth') + * global __cuDeviceGetAttribute + * __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute') # <<<<<<<<<<<<<< + * global __cuDeviceGetNvSciSyncAttributes + * __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2020 + * __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute') + * global __cuDeviceGetNvSciSyncAttributes + * __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes') # <<<<<<<<<<<<<< + * global __cuDeviceSetMemPool + * __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetNvSciSyncAttributes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2022 + * __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes') + * global __cuDeviceSetMemPool + * __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool') # <<<<<<<<<<<<<< + * global __cuDeviceGetMemPool + * __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceSetMemPool")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2024 + * __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool') + * global __cuDeviceGetMemPool + * __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool') # <<<<<<<<<<<<<< + * global __cuDeviceGetDefaultMemPool + * __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetMemPool")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2026 + * __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool') + * global __cuDeviceGetDefaultMemPool + * __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool') # <<<<<<<<<<<<<< + * global __cuDeviceGetExecAffinitySupport + * __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetDefaultMemPool")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2028 + * __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool') + * global __cuDeviceGetExecAffinitySupport + * __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport') # <<<<<<<<<<<<<< + * global __cuFlushGPUDirectRDMAWrites + * __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetExecAffinitySupport")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2030 + * __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport') + * global __cuFlushGPUDirectRDMAWrites + * __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites') # <<<<<<<<<<<<<< + * global __cuDeviceGetProperties + * __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites = dlsym(__pyx_v_handle, ((char const *)"cuFlushGPUDirectRDMAWrites")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2032 + * __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites') + * global __cuDeviceGetProperties + * __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties') # <<<<<<<<<<<<<< + * global __cuDeviceComputeCapability + * __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetProperties")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2034 + * __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties') + * global __cuDeviceComputeCapability + * __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability') # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRetain + * __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability = dlsym(__pyx_v_handle, ((char const *)"cuDeviceComputeCapability")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2036 + * __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability') + * global __cuDevicePrimaryCtxRetain + * __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain') # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRelease_v2 + * __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxRetain")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2038 + * __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain') + * global __cuDevicePrimaryCtxRelease_v2 + * __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2') # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxSetFlags_v2 + * __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxRelease_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2040 + * __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2') + * global __cuDevicePrimaryCtxSetFlags_v2 + * __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2') # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxGetState + * __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxSetFlags_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2042 + * __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2') + * global __cuDevicePrimaryCtxGetState + * __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState') # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxReset_v2 + * __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxGetState")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2044 + * __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState') + * global __cuDevicePrimaryCtxReset_v2 + * __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2') # <<<<<<<<<<<<<< + * global __cuCtxCreate_v2 + * __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2 = dlsym(__pyx_v_handle, ((char const *)"cuDevicePrimaryCtxReset_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2046 + * __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2') + * global __cuCtxCreate_v2 + * __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2') # <<<<<<<<<<<<<< + * global __cuCtxCreate_v3 + * __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxCreate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2048 + * __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2') + * global __cuCtxCreate_v3 + * __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3') # <<<<<<<<<<<<<< + * global __cuCtxCreate_v4 + * __cuCtxCreate_v4 = dlfcn.dlsym(handle, 'cuCtxCreate_v4') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3 = dlsym(__pyx_v_handle, ((char const *)"cuCtxCreate_v3")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2050 + * __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3') + * global __cuCtxCreate_v4 + * __cuCtxCreate_v4 = dlfcn.dlsym(handle, 'cuCtxCreate_v4') # <<<<<<<<<<<<<< + * global __cuCtxDestroy_v2 + * __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4 = dlsym(__pyx_v_handle, ((char const *)"cuCtxCreate_v4")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2052 + * __cuCtxCreate_v4 = dlfcn.dlsym(handle, 'cuCtxCreate_v4') + * global __cuCtxDestroy_v2 + * __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2') # <<<<<<<<<<<<<< + * global __cuCtxPushCurrent_v2 + * __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxDestroy_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2054 + * __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2') + * global __cuCtxPushCurrent_v2 + * __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2') # <<<<<<<<<<<<<< + * global __cuCtxPopCurrent_v2 + * __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxPushCurrent_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2056 + * __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2') + * global __cuCtxPopCurrent_v2 + * __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2') # <<<<<<<<<<<<<< + * global __cuCtxSetCurrent + * __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2 = dlsym(__pyx_v_handle, ((char const *)"cuCtxPopCurrent_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2058 + * __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2') + * global __cuCtxSetCurrent + * __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent') # <<<<<<<<<<<<<< + * global __cuCtxGetCurrent + * __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetCurrent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2060 + * __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent') + * global __cuCtxGetCurrent + * __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent') # <<<<<<<<<<<<<< + * global __cuCtxGetDevice + * __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetCurrent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2062 + * __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent') + * global __cuCtxGetDevice + * __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice') # <<<<<<<<<<<<<< + * global __cuCtxGetFlags + * __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetDevice")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2064 + * __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice') + * global __cuCtxGetFlags + * __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags') # <<<<<<<<<<<<<< + * global __cuCtxSetFlags + * __cuCtxSetFlags = dlfcn.dlsym(handle, 'cuCtxSetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2066 + * __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags') + * global __cuCtxSetFlags + * __cuCtxSetFlags = dlfcn.dlsym(handle, 'cuCtxSetFlags') # <<<<<<<<<<<<<< + * global __cuCtxGetId + * __cuCtxGetId = dlfcn.dlsym(handle, 'cuCtxGetId') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2068 + * __cuCtxSetFlags = dlfcn.dlsym(handle, 'cuCtxSetFlags') + * global __cuCtxGetId + * __cuCtxGetId = dlfcn.dlsym(handle, 'cuCtxGetId') # <<<<<<<<<<<<<< + * global __cuCtxSynchronize + * __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetId")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2070 + * __cuCtxGetId = dlfcn.dlsym(handle, 'cuCtxGetId') + * global __cuCtxSynchronize + * __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize') # <<<<<<<<<<<<<< + * global __cuCtxSetLimit + * __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuCtxSynchronize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2072 + * __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize') + * global __cuCtxSetLimit + * __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit') # <<<<<<<<<<<<<< + * global __cuCtxGetLimit + * __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetLimit")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2074 + * __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit') + * global __cuCtxGetLimit + * __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit') # <<<<<<<<<<<<<< + * global __cuCtxGetCacheConfig + * __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetLimit")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2076 + * __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit') + * global __cuCtxGetCacheConfig + * __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig') # <<<<<<<<<<<<<< + * global __cuCtxSetCacheConfig + * __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetCacheConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2078 + * __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig') + * global __cuCtxSetCacheConfig + * __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig') # <<<<<<<<<<<<<< + * global __cuCtxGetApiVersion + * __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetCacheConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2080 + * __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig') + * global __cuCtxGetApiVersion + * __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion') # <<<<<<<<<<<<<< + * global __cuCtxGetStreamPriorityRange + * __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetApiVersion")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2082 + * __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion') + * global __cuCtxGetStreamPriorityRange + * __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange') # <<<<<<<<<<<<<< + * global __cuCtxResetPersistingL2Cache + * __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetStreamPriorityRange")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2084 + * __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange') + * global __cuCtxResetPersistingL2Cache + * __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache') # <<<<<<<<<<<<<< + * global __cuCtxGetExecAffinity + * __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache = dlsym(__pyx_v_handle, ((char const *)"cuCtxResetPersistingL2Cache")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2086 + * __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache') + * global __cuCtxGetExecAffinity + * __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity') # <<<<<<<<<<<<<< + * global __cuCtxRecordEvent + * __cuCtxRecordEvent = dlfcn.dlsym(handle, 'cuCtxRecordEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetExecAffinity")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2088 + * __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity') + * global __cuCtxRecordEvent + * __cuCtxRecordEvent = dlfcn.dlsym(handle, 'cuCtxRecordEvent') # <<<<<<<<<<<<<< + * global __cuCtxWaitEvent + * __cuCtxWaitEvent = dlfcn.dlsym(handle, 'cuCtxWaitEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent = dlsym(__pyx_v_handle, ((char const *)"cuCtxRecordEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2090 + * __cuCtxRecordEvent = dlfcn.dlsym(handle, 'cuCtxRecordEvent') + * global __cuCtxWaitEvent + * __cuCtxWaitEvent = dlfcn.dlsym(handle, 'cuCtxWaitEvent') # <<<<<<<<<<<<<< + * global __cuCtxAttach + * __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuCtxWaitEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2092 + * __cuCtxWaitEvent = dlfcn.dlsym(handle, 'cuCtxWaitEvent') + * global __cuCtxAttach + * __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach') # <<<<<<<<<<<<<< + * global __cuCtxDetach + * __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach = dlsym(__pyx_v_handle, ((char const *)"cuCtxAttach")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2094 + * __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach') + * global __cuCtxDetach + * __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach') # <<<<<<<<<<<<<< + * global __cuCtxGetSharedMemConfig + * __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach = dlsym(__pyx_v_handle, ((char const *)"cuCtxDetach")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2096 + * __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach') + * global __cuCtxGetSharedMemConfig + * __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig') # <<<<<<<<<<<<<< + * global __cuCtxSetSharedMemConfig + * __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetSharedMemConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2098 + * __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig') + * global __cuCtxSetSharedMemConfig + * __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig') # <<<<<<<<<<<<<< + * global __cuModuleLoad + * __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuCtxSetSharedMemConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2100 + * __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig') + * global __cuModuleLoad + * __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad') # <<<<<<<<<<<<<< + * global __cuModuleLoadData + * __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoad")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2102 + * __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad') + * global __cuModuleLoadData + * __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData') # <<<<<<<<<<<<<< + * global __cuModuleLoadDataEx + * __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadData")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2104 + * __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData') + * global __cuModuleLoadDataEx + * __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx') # <<<<<<<<<<<<<< + * global __cuModuleLoadFatBinary + * __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadDataEx")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2106 + * __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx') + * global __cuModuleLoadFatBinary + * __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary') # <<<<<<<<<<<<<< + * global __cuModuleUnload + * __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary = dlsym(__pyx_v_handle, ((char const *)"cuModuleLoadFatBinary")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2108 + * __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary') + * global __cuModuleUnload + * __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload') # <<<<<<<<<<<<<< + * global __cuModuleGetLoadingMode + * __cuModuleGetLoadingMode = dlfcn.dlsym(handle, 'cuModuleGetLoadingMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload = dlsym(__pyx_v_handle, ((char const *)"cuModuleUnload")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2110 + * __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload') + * global __cuModuleGetLoadingMode + * __cuModuleGetLoadingMode = dlfcn.dlsym(handle, 'cuModuleGetLoadingMode') # <<<<<<<<<<<<<< + * global __cuModuleGetFunction + * __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetLoadingMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2112 + * __cuModuleGetLoadingMode = dlfcn.dlsym(handle, 'cuModuleGetLoadingMode') + * global __cuModuleGetFunction + * __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction') # <<<<<<<<<<<<<< + * global __cuModuleGetFunctionCount + * __cuModuleGetFunctionCount = dlfcn.dlsym(handle, 'cuModuleGetFunctionCount') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetFunction")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2114 + * __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction') + * global __cuModuleGetFunctionCount + * __cuModuleGetFunctionCount = dlfcn.dlsym(handle, 'cuModuleGetFunctionCount') # <<<<<<<<<<<<<< + * global __cuModuleEnumerateFunctions + * __cuModuleEnumerateFunctions = dlfcn.dlsym(handle, 'cuModuleEnumerateFunctions') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetFunctionCount")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2116 + * __cuModuleGetFunctionCount = dlfcn.dlsym(handle, 'cuModuleGetFunctionCount') + * global __cuModuleEnumerateFunctions + * __cuModuleEnumerateFunctions = dlfcn.dlsym(handle, 'cuModuleEnumerateFunctions') # <<<<<<<<<<<<<< + * global __cuModuleGetGlobal_v2 + * __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions = dlsym(__pyx_v_handle, ((char const *)"cuModuleEnumerateFunctions")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2118 + * __cuModuleEnumerateFunctions = dlfcn.dlsym(handle, 'cuModuleEnumerateFunctions') + * global __cuModuleGetGlobal_v2 + * __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2') # <<<<<<<<<<<<<< + * global __cuLinkCreate_v2 + * __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2 = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetGlobal_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2120 + * __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2') + * global __cuLinkCreate_v2 + * __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2') # <<<<<<<<<<<<<< + * global __cuLinkAddData_v2 + * __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkCreate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2122 + * __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2') + * global __cuLinkAddData_v2 + * __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2') # <<<<<<<<<<<<<< + * global __cuLinkAddFile_v2 + * __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkAddData_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2124 + * __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2') + * global __cuLinkAddFile_v2 + * __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2') # <<<<<<<<<<<<<< + * global __cuLinkComplete + * __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2 = dlsym(__pyx_v_handle, ((char const *)"cuLinkAddFile_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2126 + * __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2') + * global __cuLinkComplete + * __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete') # <<<<<<<<<<<<<< + * global __cuLinkDestroy + * __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete = dlsym(__pyx_v_handle, ((char const *)"cuLinkComplete")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2128 + * __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete') + * global __cuLinkDestroy + * __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy') # <<<<<<<<<<<<<< + * global __cuModuleGetTexRef + * __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy = dlsym(__pyx_v_handle, ((char const *)"cuLinkDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2130 + * __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy') + * global __cuModuleGetTexRef + * __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef') # <<<<<<<<<<<<<< + * global __cuModuleGetSurfRef + * __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetTexRef")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2132 + * __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef') + * global __cuModuleGetSurfRef + * __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef') # <<<<<<<<<<<<<< + * global __cuLibraryLoadData + * __cuLibraryLoadData = dlfcn.dlsym(handle, 'cuLibraryLoadData') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef = dlsym(__pyx_v_handle, ((char const *)"cuModuleGetSurfRef")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2134 + * __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef') + * global __cuLibraryLoadData + * __cuLibraryLoadData = dlfcn.dlsym(handle, 'cuLibraryLoadData') # <<<<<<<<<<<<<< + * global __cuLibraryLoadFromFile + * __cuLibraryLoadFromFile = dlfcn.dlsym(handle, 'cuLibraryLoadFromFile') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData = dlsym(__pyx_v_handle, ((char const *)"cuLibraryLoadData")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2136 + * __cuLibraryLoadData = dlfcn.dlsym(handle, 'cuLibraryLoadData') + * global __cuLibraryLoadFromFile + * __cuLibraryLoadFromFile = dlfcn.dlsym(handle, 'cuLibraryLoadFromFile') # <<<<<<<<<<<<<< + * global __cuLibraryUnload + * __cuLibraryUnload = dlfcn.dlsym(handle, 'cuLibraryUnload') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile = dlsym(__pyx_v_handle, ((char const *)"cuLibraryLoadFromFile")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2138 + * __cuLibraryLoadFromFile = dlfcn.dlsym(handle, 'cuLibraryLoadFromFile') + * global __cuLibraryUnload + * __cuLibraryUnload = dlfcn.dlsym(handle, 'cuLibraryUnload') # <<<<<<<<<<<<<< + * global __cuLibraryGetKernel + * __cuLibraryGetKernel = dlfcn.dlsym(handle, 'cuLibraryGetKernel') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload = dlsym(__pyx_v_handle, ((char const *)"cuLibraryUnload")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2140 + * __cuLibraryUnload = dlfcn.dlsym(handle, 'cuLibraryUnload') + * global __cuLibraryGetKernel + * __cuLibraryGetKernel = dlfcn.dlsym(handle, 'cuLibraryGetKernel') # <<<<<<<<<<<<<< + * global __cuLibraryGetKernelCount + * __cuLibraryGetKernelCount = dlfcn.dlsym(handle, 'cuLibraryGetKernelCount') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetKernel")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2142 + * __cuLibraryGetKernel = dlfcn.dlsym(handle, 'cuLibraryGetKernel') + * global __cuLibraryGetKernelCount + * __cuLibraryGetKernelCount = dlfcn.dlsym(handle, 'cuLibraryGetKernelCount') # <<<<<<<<<<<<<< + * global __cuLibraryEnumerateKernels + * __cuLibraryEnumerateKernels = dlfcn.dlsym(handle, 'cuLibraryEnumerateKernels') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetKernelCount")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2144 + * __cuLibraryGetKernelCount = dlfcn.dlsym(handle, 'cuLibraryGetKernelCount') + * global __cuLibraryEnumerateKernels + * __cuLibraryEnumerateKernels = dlfcn.dlsym(handle, 'cuLibraryEnumerateKernels') # <<<<<<<<<<<<<< + * global __cuLibraryGetModule + * __cuLibraryGetModule = dlfcn.dlsym(handle, 'cuLibraryGetModule') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels = dlsym(__pyx_v_handle, ((char const *)"cuLibraryEnumerateKernels")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2146 + * __cuLibraryEnumerateKernels = dlfcn.dlsym(handle, 'cuLibraryEnumerateKernels') + * global __cuLibraryGetModule + * __cuLibraryGetModule = dlfcn.dlsym(handle, 'cuLibraryGetModule') # <<<<<<<<<<<<<< + * global __cuKernelGetFunction + * __cuKernelGetFunction = dlfcn.dlsym(handle, 'cuKernelGetFunction') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetModule")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2148 + * __cuLibraryGetModule = dlfcn.dlsym(handle, 'cuLibraryGetModule') + * global __cuKernelGetFunction + * __cuKernelGetFunction = dlfcn.dlsym(handle, 'cuKernelGetFunction') # <<<<<<<<<<<<<< + * global __cuKernelGetLibrary + * __cuKernelGetLibrary = dlfcn.dlsym(handle, 'cuKernelGetLibrary') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction = dlsym(__pyx_v_handle, ((char const *)"cuKernelGetFunction")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2150 + * __cuKernelGetFunction = dlfcn.dlsym(handle, 'cuKernelGetFunction') + * global __cuKernelGetLibrary + * __cuKernelGetLibrary = dlfcn.dlsym(handle, 'cuKernelGetLibrary') # <<<<<<<<<<<<<< + * global __cuLibraryGetGlobal + * __cuLibraryGetGlobal = dlfcn.dlsym(handle, 'cuLibraryGetGlobal') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary = dlsym(__pyx_v_handle, ((char const *)"cuKernelGetLibrary")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2152 + * __cuKernelGetLibrary = dlfcn.dlsym(handle, 'cuKernelGetLibrary') + * global __cuLibraryGetGlobal + * __cuLibraryGetGlobal = dlfcn.dlsym(handle, 'cuLibraryGetGlobal') # <<<<<<<<<<<<<< + * global __cuLibraryGetManaged + * __cuLibraryGetManaged = dlfcn.dlsym(handle, 'cuLibraryGetManaged') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetGlobal")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2154 + * __cuLibraryGetGlobal = dlfcn.dlsym(handle, 'cuLibraryGetGlobal') + * global __cuLibraryGetManaged + * __cuLibraryGetManaged = dlfcn.dlsym(handle, 'cuLibraryGetManaged') # <<<<<<<<<<<<<< + * global __cuLibraryGetUnifiedFunction + * __cuLibraryGetUnifiedFunction = dlfcn.dlsym(handle, 'cuLibraryGetUnifiedFunction') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetManaged")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2156 + * __cuLibraryGetManaged = dlfcn.dlsym(handle, 'cuLibraryGetManaged') + * global __cuLibraryGetUnifiedFunction + * __cuLibraryGetUnifiedFunction = dlfcn.dlsym(handle, 'cuLibraryGetUnifiedFunction') # <<<<<<<<<<<<<< + * global __cuKernelGetAttribute + * __cuKernelGetAttribute = dlfcn.dlsym(handle, 'cuKernelGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction = dlsym(__pyx_v_handle, ((char const *)"cuLibraryGetUnifiedFunction")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2158 + * __cuLibraryGetUnifiedFunction = dlfcn.dlsym(handle, 'cuLibraryGetUnifiedFunction') + * global __cuKernelGetAttribute + * __cuKernelGetAttribute = dlfcn.dlsym(handle, 'cuKernelGetAttribute') # <<<<<<<<<<<<<< + * global __cuKernelSetAttribute + * __cuKernelSetAttribute = dlfcn.dlsym(handle, 'cuKernelSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuKernelGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2160 + * __cuKernelGetAttribute = dlfcn.dlsym(handle, 'cuKernelGetAttribute') + * global __cuKernelSetAttribute + * __cuKernelSetAttribute = dlfcn.dlsym(handle, 'cuKernelSetAttribute') # <<<<<<<<<<<<<< + * global __cuKernelSetCacheConfig + * __cuKernelSetCacheConfig = dlfcn.dlsym(handle, 'cuKernelSetCacheConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuKernelSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2162 + * __cuKernelSetAttribute = dlfcn.dlsym(handle, 'cuKernelSetAttribute') + * global __cuKernelSetCacheConfig + * __cuKernelSetCacheConfig = dlfcn.dlsym(handle, 'cuKernelSetCacheConfig') # <<<<<<<<<<<<<< + * global __cuKernelGetName + * __cuKernelGetName = dlfcn.dlsym(handle, 'cuKernelGetName') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuKernelSetCacheConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2164 + * __cuKernelSetCacheConfig = dlfcn.dlsym(handle, 'cuKernelSetCacheConfig') + * global __cuKernelGetName + * __cuKernelGetName = dlfcn.dlsym(handle, 'cuKernelGetName') # <<<<<<<<<<<<<< + * global __cuKernelGetParamInfo + * __cuKernelGetParamInfo = dlfcn.dlsym(handle, 'cuKernelGetParamInfo') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName = dlsym(__pyx_v_handle, ((char const *)"cuKernelGetName")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2166 + * __cuKernelGetName = dlfcn.dlsym(handle, 'cuKernelGetName') + * global __cuKernelGetParamInfo + * __cuKernelGetParamInfo = dlfcn.dlsym(handle, 'cuKernelGetParamInfo') # <<<<<<<<<<<<<< + * global __cuMemGetInfo_v2 + * __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo = dlsym(__pyx_v_handle, ((char const *)"cuKernelGetParamInfo")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2168 + * __cuKernelGetParamInfo = dlfcn.dlsym(handle, 'cuKernelGetParamInfo') + * global __cuMemGetInfo_v2 + * __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2') # <<<<<<<<<<<<<< + * global __cuMemAlloc_v2 + * __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemGetInfo_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2170 + * __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2') + * global __cuMemAlloc_v2 + * __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2') # <<<<<<<<<<<<<< + * global __cuMemAllocPitch_v2 + * __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAlloc_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2172 + * __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2') + * global __cuMemAllocPitch_v2 + * __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2') # <<<<<<<<<<<<<< + * global __cuMemFree_v2 + * __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocPitch_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2174 + * __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2') + * global __cuMemFree_v2 + * __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2') # <<<<<<<<<<<<<< + * global __cuMemGetAddressRange_v2 + * __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemFree_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2176 + * __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2') + * global __cuMemGetAddressRange_v2 + * __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2') # <<<<<<<<<<<<<< + * global __cuMemAllocHost_v2 + * __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAddressRange_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2178 + * __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2') + * global __cuMemAllocHost_v2 + * __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2') # <<<<<<<<<<<<<< + * global __cuMemFreeHost + * __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocHost_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2180 + * __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2') + * global __cuMemFreeHost + * __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost') # <<<<<<<<<<<<<< + * global __cuMemHostAlloc + * __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost = dlsym(__pyx_v_handle, ((char const *)"cuMemFreeHost")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2182 + * __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost') + * global __cuMemHostAlloc + * __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc') # <<<<<<<<<<<<<< + * global __cuMemHostGetDevicePointer_v2 + * __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc = dlsym(__pyx_v_handle, ((char const *)"cuMemHostAlloc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2184 + * __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc') + * global __cuMemHostGetDevicePointer_v2 + * __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2') # <<<<<<<<<<<<<< + * global __cuMemHostGetFlags + * __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemHostGetDevicePointer_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2186 + * __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2') + * global __cuMemHostGetFlags + * __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags') # <<<<<<<<<<<<<< + * global __cuMemAllocManaged + * __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuMemHostGetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2188 + * __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags') + * global __cuMemAllocManaged + * __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged') # <<<<<<<<<<<<<< + * global __cuDeviceRegisterAsyncNotification + * __cuDeviceRegisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceRegisterAsyncNotification') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged = dlsym(__pyx_v_handle, ((char const *)"cuMemAllocManaged")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2190 + * __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged') + * global __cuDeviceRegisterAsyncNotification + * __cuDeviceRegisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceRegisterAsyncNotification') # <<<<<<<<<<<<<< + * global __cuDeviceUnregisterAsyncNotification + * __cuDeviceUnregisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceUnregisterAsyncNotification') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification = dlsym(__pyx_v_handle, ((char const *)"cuDeviceRegisterAsyncNotification")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2192 + * __cuDeviceRegisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceRegisterAsyncNotification') + * global __cuDeviceUnregisterAsyncNotification + * __cuDeviceUnregisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceUnregisterAsyncNotification') # <<<<<<<<<<<<<< + * global __cuDeviceGetByPCIBusId + * __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification = dlsym(__pyx_v_handle, ((char const *)"cuDeviceUnregisterAsyncNotification")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2194 + * __cuDeviceUnregisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceUnregisterAsyncNotification') + * global __cuDeviceGetByPCIBusId + * __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId') # <<<<<<<<<<<<<< + * global __cuDeviceGetPCIBusId + * __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetByPCIBusId")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2196 + * __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId') + * global __cuDeviceGetPCIBusId + * __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId') # <<<<<<<<<<<<<< + * global __cuIpcGetEventHandle + * __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetPCIBusId")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2198 + * __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId') + * global __cuIpcGetEventHandle + * __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle') # <<<<<<<<<<<<<< + * global __cuIpcOpenEventHandle + * __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcGetEventHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2200 + * __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle') + * global __cuIpcOpenEventHandle + * __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle') # <<<<<<<<<<<<<< + * global __cuIpcGetMemHandle + * __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcOpenEventHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2202 + * __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle') + * global __cuIpcGetMemHandle + * __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle') # <<<<<<<<<<<<<< + * global __cuIpcOpenMemHandle_v2 + * __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcGetMemHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2204 + * __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle') + * global __cuIpcOpenMemHandle_v2 + * __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2') # <<<<<<<<<<<<<< + * global __cuIpcCloseMemHandle + * __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2 = dlsym(__pyx_v_handle, ((char const *)"cuIpcOpenMemHandle_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2206 + * __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2') + * global __cuIpcCloseMemHandle + * __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle') # <<<<<<<<<<<<<< + * global __cuMemHostRegister_v2 + * __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle = dlsym(__pyx_v_handle, ((char const *)"cuIpcCloseMemHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2208 + * __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle') + * global __cuMemHostRegister_v2 + * __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2') # <<<<<<<<<<<<<< + * global __cuMemHostUnregister + * __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemHostRegister_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2210 + * __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2') + * global __cuMemHostUnregister + * __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister') # <<<<<<<<<<<<<< + * global __cuArrayCreate_v2 + * __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister = dlsym(__pyx_v_handle, ((char const *)"cuMemHostUnregister")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2212 + * __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister') + * global __cuArrayCreate_v2 + * __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2') # <<<<<<<<<<<<<< + * global __cuArrayGetDescriptor_v2 + * __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArrayCreate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2214 + * __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2') + * global __cuArrayGetDescriptor_v2 + * __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2') # <<<<<<<<<<<<<< + * global __cuArrayGetSparseProperties + * __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetDescriptor_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2216 + * __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2') + * global __cuArrayGetSparseProperties + * __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties') # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetSparseProperties + * __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetSparseProperties")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2218 + * __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties') + * global __cuMipmappedArrayGetSparseProperties + * __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties') # <<<<<<<<<<<<<< + * global __cuArrayGetMemoryRequirements + * __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetSparseProperties")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2220 + * __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties') + * global __cuArrayGetMemoryRequirements + * __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements') # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetMemoryRequirements + * __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetMemoryRequirements")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2222 + * __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements') + * global __cuMipmappedArrayGetMemoryRequirements + * __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements') # <<<<<<<<<<<<<< + * global __cuArrayGetPlane + * __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetMemoryRequirements")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2224 + * __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements') + * global __cuArrayGetPlane + * __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane') # <<<<<<<<<<<<<< + * global __cuArrayDestroy + * __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane = dlsym(__pyx_v_handle, ((char const *)"cuArrayGetPlane")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2226 + * __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane') + * global __cuArrayDestroy + * __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy') # <<<<<<<<<<<<<< + * global __cuArray3DCreate_v2 + * __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy = dlsym(__pyx_v_handle, ((char const *)"cuArrayDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2228 + * __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy') + * global __cuArray3DCreate_v2 + * __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2') # <<<<<<<<<<<<<< + * global __cuArray3DGetDescriptor_v2 + * __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArray3DCreate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2230 + * __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2') + * global __cuArray3DGetDescriptor_v2 + * __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2') # <<<<<<<<<<<<<< + * global __cuMipmappedArrayCreate + * __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2 = dlsym(__pyx_v_handle, ((char const *)"cuArray3DGetDescriptor_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2232 + * __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2') + * global __cuMipmappedArrayCreate + * __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate') # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetLevel + * __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2234 + * __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate') + * global __cuMipmappedArrayGetLevel + * __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel') # <<<<<<<<<<<<<< + * global __cuMipmappedArrayDestroy + * __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayGetLevel")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2236 + * __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel') + * global __cuMipmappedArrayDestroy + * __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy') # <<<<<<<<<<<<<< + * global __cuMemGetHandleForAddressRange + * __cuMemGetHandleForAddressRange = dlfcn.dlsym(handle, 'cuMemGetHandleForAddressRange') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy = dlsym(__pyx_v_handle, ((char const *)"cuMipmappedArrayDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2238 + * __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy') + * global __cuMemGetHandleForAddressRange + * __cuMemGetHandleForAddressRange = dlfcn.dlsym(handle, 'cuMemGetHandleForAddressRange') # <<<<<<<<<<<<<< + * global __cuMemAddressReserve + * __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange = dlsym(__pyx_v_handle, ((char const *)"cuMemGetHandleForAddressRange")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2240 + * __cuMemGetHandleForAddressRange = dlfcn.dlsym(handle, 'cuMemGetHandleForAddressRange') + * global __cuMemAddressReserve + * __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve') # <<<<<<<<<<<<<< + * global __cuMemAddressFree + * __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve = dlsym(__pyx_v_handle, ((char const *)"cuMemAddressReserve")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2242 + * __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve') + * global __cuMemAddressFree + * __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree') # <<<<<<<<<<<<<< + * global __cuMemCreate + * __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree = dlsym(__pyx_v_handle, ((char const *)"cuMemAddressFree")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2244 + * __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree') + * global __cuMemCreate + * __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate') # <<<<<<<<<<<<<< + * global __cuMemRelease + * __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate = dlsym(__pyx_v_handle, ((char const *)"cuMemCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2246 + * __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate') + * global __cuMemRelease + * __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease') # <<<<<<<<<<<<<< + * global __cuMemMap + * __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease = dlsym(__pyx_v_handle, ((char const *)"cuMemRelease")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2248 + * __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease') + * global __cuMemMap + * __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap') # <<<<<<<<<<<<<< + * global __cuMemUnmap + * __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap = dlsym(__pyx_v_handle, ((char const *)"cuMemMap")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2250 + * __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap') + * global __cuMemUnmap + * __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap') # <<<<<<<<<<<<<< + * global __cuMemSetAccess + * __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap = dlsym(__pyx_v_handle, ((char const *)"cuMemUnmap")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2252 + * __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap') + * global __cuMemSetAccess + * __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess') # <<<<<<<<<<<<<< + * global __cuMemGetAccess + * __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemSetAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2254 + * __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess') + * global __cuMemGetAccess + * __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess') # <<<<<<<<<<<<<< + * global __cuMemExportToShareableHandle + * __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2256 + * __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess') + * global __cuMemExportToShareableHandle + * __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle') # <<<<<<<<<<<<<< + * global __cuMemImportFromShareableHandle + * __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemExportToShareableHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2258 + * __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle') + * global __cuMemImportFromShareableHandle + * __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle') # <<<<<<<<<<<<<< + * global __cuMemGetAllocationGranularity + * __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemImportFromShareableHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2260 + * __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle') + * global __cuMemGetAllocationGranularity + * __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity') # <<<<<<<<<<<<<< + * global __cuMemGetAllocationPropertiesFromHandle + * __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAllocationGranularity")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2262 + * __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity') + * global __cuMemGetAllocationPropertiesFromHandle + * __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle') # <<<<<<<<<<<<<< + * global __cuMemRetainAllocationHandle + * __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemGetAllocationPropertiesFromHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2264 + * __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle') + * global __cuMemRetainAllocationHandle + * __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle') # <<<<<<<<<<<<<< + * global __cuMemPoolTrimTo + * __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemRetainAllocationHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2266 + * __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle') + * global __cuMemPoolTrimTo + * __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo') # <<<<<<<<<<<<<< + * global __cuMemPoolSetAttribute + * __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolTrimTo")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2268 + * __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo') + * global __cuMemPoolSetAttribute + * __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute') # <<<<<<<<<<<<<< + * global __cuMemPoolGetAttribute + * __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2270 + * __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute') + * global __cuMemPoolGetAttribute + * __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute') # <<<<<<<<<<<<<< + * global __cuMemPoolSetAccess + * __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2272 + * __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute') + * global __cuMemPoolSetAccess + * __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess') # <<<<<<<<<<<<<< + * global __cuMemPoolGetAccess + * __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolSetAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2274 + * __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess') + * global __cuMemPoolGetAccess + * __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess') # <<<<<<<<<<<<<< + * global __cuMemPoolCreate + * __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolGetAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2276 + * __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess') + * global __cuMemPoolCreate + * __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate') # <<<<<<<<<<<<<< + * global __cuMemPoolDestroy + * __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2278 + * __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate') + * global __cuMemPoolDestroy + * __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy') # <<<<<<<<<<<<<< + * global __cuMemPoolExportToShareableHandle + * __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2280 + * __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy') + * global __cuMemPoolExportToShareableHandle + * __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle') # <<<<<<<<<<<<<< + * global __cuMemPoolImportFromShareableHandle + * __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolExportToShareableHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2282 + * __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle') + * global __cuMemPoolImportFromShareableHandle + * __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle') # <<<<<<<<<<<<<< + * global __cuMemPoolExportPointer + * __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolImportFromShareableHandle")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2284 + * __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle') + * global __cuMemPoolExportPointer + * __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer') # <<<<<<<<<<<<<< + * global __cuMemPoolImportPointer + * __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolExportPointer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2286 + * __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer') + * global __cuMemPoolImportPointer + * __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer') # <<<<<<<<<<<<<< + * global __cuMulticastCreate + * __cuMulticastCreate = dlfcn.dlsym(handle, 'cuMulticastCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer = dlsym(__pyx_v_handle, ((char const *)"cuMemPoolImportPointer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2288 + * __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer') + * global __cuMulticastCreate + * __cuMulticastCreate = dlfcn.dlsym(handle, 'cuMulticastCreate') # <<<<<<<<<<<<<< + * global __cuMulticastAddDevice + * __cuMulticastAddDevice = dlfcn.dlsym(handle, 'cuMulticastAddDevice') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate = dlsym(__pyx_v_handle, ((char const *)"cuMulticastCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2290 + * __cuMulticastCreate = dlfcn.dlsym(handle, 'cuMulticastCreate') + * global __cuMulticastAddDevice + * __cuMulticastAddDevice = dlfcn.dlsym(handle, 'cuMulticastAddDevice') # <<<<<<<<<<<<<< + * global __cuMulticastBindMem + * __cuMulticastBindMem = dlfcn.dlsym(handle, 'cuMulticastBindMem') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice = dlsym(__pyx_v_handle, ((char const *)"cuMulticastAddDevice")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2292 + * __cuMulticastAddDevice = dlfcn.dlsym(handle, 'cuMulticastAddDevice') + * global __cuMulticastBindMem + * __cuMulticastBindMem = dlfcn.dlsym(handle, 'cuMulticastBindMem') # <<<<<<<<<<<<<< + * global __cuMulticastBindAddr + * __cuMulticastBindAddr = dlfcn.dlsym(handle, 'cuMulticastBindAddr') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem = dlsym(__pyx_v_handle, ((char const *)"cuMulticastBindMem")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2294 + * __cuMulticastBindMem = dlfcn.dlsym(handle, 'cuMulticastBindMem') + * global __cuMulticastBindAddr + * __cuMulticastBindAddr = dlfcn.dlsym(handle, 'cuMulticastBindAddr') # <<<<<<<<<<<<<< + * global __cuMulticastUnbind + * __cuMulticastUnbind = dlfcn.dlsym(handle, 'cuMulticastUnbind') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr = dlsym(__pyx_v_handle, ((char const *)"cuMulticastBindAddr")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2296 + * __cuMulticastBindAddr = dlfcn.dlsym(handle, 'cuMulticastBindAddr') + * global __cuMulticastUnbind + * __cuMulticastUnbind = dlfcn.dlsym(handle, 'cuMulticastUnbind') # <<<<<<<<<<<<<< + * global __cuMulticastGetGranularity + * __cuMulticastGetGranularity = dlfcn.dlsym(handle, 'cuMulticastGetGranularity') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind = dlsym(__pyx_v_handle, ((char const *)"cuMulticastUnbind")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2298 + * __cuMulticastUnbind = dlfcn.dlsym(handle, 'cuMulticastUnbind') + * global __cuMulticastGetGranularity + * __cuMulticastGetGranularity = dlfcn.dlsym(handle, 'cuMulticastGetGranularity') # <<<<<<<<<<<<<< + * global __cuPointerGetAttribute + * __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity = dlsym(__pyx_v_handle, ((char const *)"cuMulticastGetGranularity")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2300 + * __cuMulticastGetGranularity = dlfcn.dlsym(handle, 'cuMulticastGetGranularity') + * global __cuPointerGetAttribute + * __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute') # <<<<<<<<<<<<<< + * global __cuMemAdvise + * __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuPointerGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2302 + * __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute') + * global __cuMemAdvise + * __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise') # <<<<<<<<<<<<<< + * global __cuMemAdvise_v2 + * __cuMemAdvise_v2 = dlfcn.dlsym(handle, 'cuMemAdvise_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise = dlsym(__pyx_v_handle, ((char const *)"cuMemAdvise")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2304 + * __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise') + * global __cuMemAdvise_v2 + * __cuMemAdvise_v2 = dlfcn.dlsym(handle, 'cuMemAdvise_v2') # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttribute + * __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2 = dlsym(__pyx_v_handle, ((char const *)"cuMemAdvise_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2306 + * __cuMemAdvise_v2 = dlfcn.dlsym(handle, 'cuMemAdvise_v2') + * global __cuMemRangeGetAttribute + * __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute') # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttributes + * __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuMemRangeGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2308 + * __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute') + * global __cuMemRangeGetAttributes + * __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes') # <<<<<<<<<<<<<< + * global __cuPointerSetAttribute + * __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes = dlsym(__pyx_v_handle, ((char const *)"cuMemRangeGetAttributes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2310 + * __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes') + * global __cuPointerSetAttribute + * __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute') # <<<<<<<<<<<<<< + * global __cuPointerGetAttributes + * __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuPointerSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2312 + * __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute') + * global __cuPointerGetAttributes + * __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes') # <<<<<<<<<<<<<< + * global __cuStreamCreate + * __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes = dlsym(__pyx_v_handle, ((char const *)"cuPointerGetAttributes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2314 + * __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes') + * global __cuStreamCreate + * __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate') # <<<<<<<<<<<<<< + * global __cuStreamCreateWithPriority + * __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2316 + * __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate') + * global __cuStreamCreateWithPriority + * __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority') # <<<<<<<<<<<<<< + * global __cuThreadExchangeStreamCaptureMode + * __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority = dlsym(__pyx_v_handle, ((char const *)"cuStreamCreateWithPriority")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2318 + * __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority') + * global __cuThreadExchangeStreamCaptureMode + * __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode') # <<<<<<<<<<<<<< + * global __cuStreamDestroy_v2 + * __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode = dlsym(__pyx_v_handle, ((char const *)"cuThreadExchangeStreamCaptureMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2320 + * __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode') + * global __cuStreamDestroy_v2 + * __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2') # <<<<<<<<<<<<<< + * global __cuEventCreate + * __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuStreamDestroy_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2322 + * __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2') + * global __cuEventCreate + * __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate') # <<<<<<<<<<<<<< + * global __cuEventQuery + * __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate = dlsym(__pyx_v_handle, ((char const *)"cuEventCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2324 + * __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate') + * global __cuEventQuery + * __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery') # <<<<<<<<<<<<<< + * global __cuEventSynchronize + * __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery = dlsym(__pyx_v_handle, ((char const *)"cuEventQuery")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2326 + * __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery') + * global __cuEventSynchronize + * __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize') # <<<<<<<<<<<<<< + * global __cuEventDestroy_v2 + * __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize = dlsym(__pyx_v_handle, ((char const *)"cuEventSynchronize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2328 + * __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize') + * global __cuEventDestroy_v2 + * __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2') # <<<<<<<<<<<<<< + * global __cuEventElapsedTime + * __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2 = dlsym(__pyx_v_handle, ((char const *)"cuEventDestroy_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2330 + * __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2') + * global __cuEventElapsedTime + * __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') # <<<<<<<<<<<<<< + * global __cuEventElapsedTime_v2 + * __cuEventElapsedTime_v2 = dlfcn.dlsym(handle, 'cuEventElapsedTime_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime = dlsym(__pyx_v_handle, ((char const *)"cuEventElapsedTime")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2332 + * __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') + * global __cuEventElapsedTime_v2 + * __cuEventElapsedTime_v2 = dlfcn.dlsym(handle, 'cuEventElapsedTime_v2') # <<<<<<<<<<<<<< + * global __cuImportExternalMemory + * __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2 = dlsym(__pyx_v_handle, ((char const *)"cuEventElapsedTime_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2334 + * __cuEventElapsedTime_v2 = dlfcn.dlsym(handle, 'cuEventElapsedTime_v2') + * global __cuImportExternalMemory + * __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedBuffer + * __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory = dlsym(__pyx_v_handle, ((char const *)"cuImportExternalMemory")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2336 + * __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') + * global __cuExternalMemoryGetMappedBuffer + * __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer') # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedMipmappedArray + * __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer = dlsym(__pyx_v_handle, ((char const *)"cuExternalMemoryGetMappedBuffer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2338 + * __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer') + * global __cuExternalMemoryGetMappedMipmappedArray + * __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray') # <<<<<<<<<<<<<< + * global __cuDestroyExternalMemory + * __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuExternalMemoryGetMappedMipmappedArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2340 + * __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray') + * global __cuDestroyExternalMemory + * __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory') # <<<<<<<<<<<<<< + * global __cuImportExternalSemaphore + * __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalMemory")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2342 + * __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory') + * global __cuImportExternalSemaphore + * __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore') # <<<<<<<<<<<<<< + * global __cuDestroyExternalSemaphore + * __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuImportExternalSemaphore")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2344 + * __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore') + * global __cuDestroyExternalSemaphore + * __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore') # <<<<<<<<<<<<<< + * global __cuFuncGetAttribute + * __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore = dlsym(__pyx_v_handle, ((char const *)"cuDestroyExternalSemaphore")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2346 + * __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore') + * global __cuFuncGetAttribute + * __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute') # <<<<<<<<<<<<<< + * global __cuFuncSetAttribute + * __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2348 + * __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute') + * global __cuFuncSetAttribute + * __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute') # <<<<<<<<<<<<<< + * global __cuFuncSetCacheConfig + * __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2350 + * __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute') + * global __cuFuncSetCacheConfig + * __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig') # <<<<<<<<<<<<<< + * global __cuFuncGetModule + * __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetCacheConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2352 + * __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig') + * global __cuFuncGetModule + * __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule') # <<<<<<<<<<<<<< + * global __cuFuncGetName + * __cuFuncGetName = dlfcn.dlsym(handle, 'cuFuncGetName') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetModule")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2354 + * __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule') + * global __cuFuncGetName + * __cuFuncGetName = dlfcn.dlsym(handle, 'cuFuncGetName') # <<<<<<<<<<<<<< + * global __cuFuncGetParamInfo + * __cuFuncGetParamInfo = dlfcn.dlsym(handle, 'cuFuncGetParamInfo') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetName")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2356 + * __cuFuncGetName = dlfcn.dlsym(handle, 'cuFuncGetName') + * global __cuFuncGetParamInfo + * __cuFuncGetParamInfo = dlfcn.dlsym(handle, 'cuFuncGetParamInfo') # <<<<<<<<<<<<<< + * global __cuFuncIsLoaded + * __cuFuncIsLoaded = dlfcn.dlsym(handle, 'cuFuncIsLoaded') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo = dlsym(__pyx_v_handle, ((char const *)"cuFuncGetParamInfo")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2358 + * __cuFuncGetParamInfo = dlfcn.dlsym(handle, 'cuFuncGetParamInfo') + * global __cuFuncIsLoaded + * __cuFuncIsLoaded = dlfcn.dlsym(handle, 'cuFuncIsLoaded') # <<<<<<<<<<<<<< + * global __cuFuncLoad + * __cuFuncLoad = dlfcn.dlsym(handle, 'cuFuncLoad') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded = dlsym(__pyx_v_handle, ((char const *)"cuFuncIsLoaded")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2360 + * __cuFuncIsLoaded = dlfcn.dlsym(handle, 'cuFuncIsLoaded') + * global __cuFuncLoad + * __cuFuncLoad = dlfcn.dlsym(handle, 'cuFuncLoad') # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernelMultiDevice + * __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad = dlsym(__pyx_v_handle, ((char const *)"cuFuncLoad")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2362 + * __cuFuncLoad = dlfcn.dlsym(handle, 'cuFuncLoad') + * global __cuLaunchCooperativeKernelMultiDevice + * __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice') # <<<<<<<<<<<<<< + * global __cuFuncSetBlockShape + * __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice = dlsym(__pyx_v_handle, ((char const *)"cuLaunchCooperativeKernelMultiDevice")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2364 + * __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice') + * global __cuFuncSetBlockShape + * __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape') # <<<<<<<<<<<<<< + * global __cuFuncSetSharedSize + * __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetBlockShape")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2366 + * __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape') + * global __cuFuncSetSharedSize + * __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize') # <<<<<<<<<<<<<< + * global __cuParamSetSize + * __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetSharedSize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2368 + * __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize') + * global __cuParamSetSize + * __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize') # <<<<<<<<<<<<<< + * global __cuParamSeti + * __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize = dlsym(__pyx_v_handle, ((char const *)"cuParamSetSize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2370 + * __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize') + * global __cuParamSeti + * __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti') # <<<<<<<<<<<<<< + * global __cuParamSetf + * __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti = dlsym(__pyx_v_handle, ((char const *)"cuParamSeti")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2372 + * __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti') + * global __cuParamSetf + * __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf') # <<<<<<<<<<<<<< + * global __cuParamSetv + * __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf = dlsym(__pyx_v_handle, ((char const *)"cuParamSetf")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2374 + * __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf') + * global __cuParamSetv + * __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv') # <<<<<<<<<<<<<< + * global __cuLaunch + * __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv = dlsym(__pyx_v_handle, ((char const *)"cuParamSetv")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2376 + * __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv') + * global __cuLaunch + * __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch') # <<<<<<<<<<<<<< + * global __cuLaunchGrid + * __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch = dlsym(__pyx_v_handle, ((char const *)"cuLaunch")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2378 + * __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch') + * global __cuLaunchGrid + * __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid') # <<<<<<<<<<<<<< + * global __cuLaunchGridAsync + * __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid = dlsym(__pyx_v_handle, ((char const *)"cuLaunchGrid")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2380 + * __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid') + * global __cuLaunchGridAsync + * __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync') # <<<<<<<<<<<<<< + * global __cuParamSetTexRef + * __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync = dlsym(__pyx_v_handle, ((char const *)"cuLaunchGridAsync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2382 + * __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync') + * global __cuParamSetTexRef + * __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef') # <<<<<<<<<<<<<< + * global __cuFuncSetSharedMemConfig + * __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef = dlsym(__pyx_v_handle, ((char const *)"cuParamSetTexRef")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2384 + * __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef') + * global __cuFuncSetSharedMemConfig + * __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig') # <<<<<<<<<<<<<< + * global __cuGraphCreate + * __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig = dlsym(__pyx_v_handle, ((char const *)"cuFuncSetSharedMemConfig")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2386 + * __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig') + * global __cuGraphCreate + * __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate') # <<<<<<<<<<<<<< + * global __cuGraphAddKernelNode_v2 + * __cuGraphAddKernelNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddKernelNode_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate = dlsym(__pyx_v_handle, ((char const *)"cuGraphCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2388 + * __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate') + * global __cuGraphAddKernelNode_v2 + * __cuGraphAddKernelNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddKernelNode_v2') # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetParams_v2 + * __cuGraphKernelNodeGetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddKernelNode_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2390 + * __cuGraphAddKernelNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddKernelNode_v2') + * global __cuGraphKernelNodeGetParams_v2 + * __cuGraphKernelNodeGetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams_v2') # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetParams_v2 + * __cuGraphKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeGetParams_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2392 + * __cuGraphKernelNodeGetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams_v2') + * global __cuGraphKernelNodeSetParams_v2 + * __cuGraphKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams_v2') # <<<<<<<<<<<<<< + * global __cuGraphAddMemcpyNode + * __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeSetParams_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2394 + * __cuGraphKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams_v2') + * global __cuGraphAddMemcpyNode + * __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode') # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeGetParams + * __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemcpyNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2396 + * __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode') + * global __cuGraphMemcpyNodeGetParams + * __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeSetParams + * __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemcpyNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2398 + * __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams') + * global __cuGraphMemcpyNodeSetParams + * __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddMemsetNode + * __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemcpyNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2400 + * __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams') + * global __cuGraphAddMemsetNode + * __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode') # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeGetParams + * __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemsetNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2402 + * __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode') + * global __cuGraphMemsetNodeGetParams + * __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeSetParams + * __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemsetNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2404 + * __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams') + * global __cuGraphMemsetNodeSetParams + * __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddHostNode + * __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemsetNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2406 + * __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams') + * global __cuGraphAddHostNode + * __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode') # <<<<<<<<<<<<<< + * global __cuGraphHostNodeGetParams + * __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddHostNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2408 + * __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode') + * global __cuGraphHostNodeGetParams + * __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphHostNodeSetParams + * __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphHostNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2410 + * __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams') + * global __cuGraphHostNodeSetParams + * __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddChildGraphNode + * __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphHostNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2412 + * __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams') + * global __cuGraphAddChildGraphNode + * __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode') # <<<<<<<<<<<<<< + * global __cuGraphChildGraphNodeGetGraph + * __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddChildGraphNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2414 + * __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode') + * global __cuGraphChildGraphNodeGetGraph + * __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph') # <<<<<<<<<<<<<< + * global __cuGraphAddEmptyNode + * __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph = dlsym(__pyx_v_handle, ((char const *)"cuGraphChildGraphNodeGetGraph")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2416 + * __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph') + * global __cuGraphAddEmptyNode + * __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode') # <<<<<<<<<<<<<< + * global __cuGraphAddEventRecordNode + * __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEmptyNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2418 + * __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode') + * global __cuGraphAddEventRecordNode + * __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode') # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeGetEvent + * __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEventRecordNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2420 + * __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode') + * global __cuGraphEventRecordNodeGetEvent + * __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent') # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeSetEvent + * __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventRecordNodeGetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2422 + * __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent') + * global __cuGraphEventRecordNodeSetEvent + * __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent') # <<<<<<<<<<<<<< + * global __cuGraphAddEventWaitNode + * __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventRecordNodeSetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2424 + * __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent') + * global __cuGraphAddEventWaitNode + * __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode') # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeGetEvent + * __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddEventWaitNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2426 + * __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode') + * global __cuGraphEventWaitNodeGetEvent + * __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent') # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeSetEvent + * __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventWaitNodeGetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2428 + * __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent') + * global __cuGraphEventWaitNodeSetEvent + * __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent') # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresSignalNode + * __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphEventWaitNodeSetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2430 + * __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent') + * global __cuGraphAddExternalSemaphoresSignalNode + * __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode') # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddExternalSemaphoresSignalNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2432 + * __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode') + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresSignalNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2434 + * __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresWaitNode + * __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresSignalNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2436 + * __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') + * global __cuGraphAddExternalSemaphoresWaitNode + * __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode') # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddExternalSemaphoresWaitNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2438 + * __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode') + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresWaitNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2440 + * __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddBatchMemOpNode + * __cuGraphAddBatchMemOpNode = dlfcn.dlsym(handle, 'cuGraphAddBatchMemOpNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExternalSemaphoresWaitNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2442 + * __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') + * global __cuGraphAddBatchMemOpNode + * __cuGraphAddBatchMemOpNode = dlfcn.dlsym(handle, 'cuGraphAddBatchMemOpNode') # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeGetParams + * __cuGraphBatchMemOpNodeGetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddBatchMemOpNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2444 + * __cuGraphAddBatchMemOpNode = dlfcn.dlsym(handle, 'cuGraphAddBatchMemOpNode') + * global __cuGraphBatchMemOpNodeGetParams + * __cuGraphBatchMemOpNodeGetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeSetParams + * __cuGraphBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphBatchMemOpNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2446 + * __cuGraphBatchMemOpNodeGetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeGetParams') + * global __cuGraphBatchMemOpNodeSetParams + * __cuGraphBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecBatchMemOpNodeSetParams + * __cuGraphExecBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecBatchMemOpNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphBatchMemOpNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2448 + * __cuGraphBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeSetParams') + * global __cuGraphExecBatchMemOpNodeSetParams + * __cuGraphExecBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecBatchMemOpNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddMemAllocNode + * __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecBatchMemOpNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2450 + * __cuGraphExecBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecBatchMemOpNodeSetParams') + * global __cuGraphAddMemAllocNode + * __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode') # <<<<<<<<<<<<<< + * global __cuGraphMemAllocNodeGetParams + * __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemAllocNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2452 + * __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode') + * global __cuGraphMemAllocNodeGetParams + * __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams') # <<<<<<<<<<<<<< + * global __cuGraphAddMemFreeNode + * __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemAllocNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2454 + * __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams') + * global __cuGraphAddMemFreeNode + * __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode') # <<<<<<<<<<<<<< + * global __cuGraphMemFreeNodeGetParams + * __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddMemFreeNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2456 + * __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode') + * global __cuGraphMemFreeNodeGetParams + * __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams') # <<<<<<<<<<<<<< + * global __cuDeviceGraphMemTrim + * __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphMemFreeNodeGetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2458 + * __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams') + * global __cuDeviceGraphMemTrim + * __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim') # <<<<<<<<<<<<<< + * global __cuDeviceGetGraphMemAttribute + * __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGraphMemTrim")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2460 + * __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim') + * global __cuDeviceGetGraphMemAttribute + * __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute') # <<<<<<<<<<<<<< + * global __cuDeviceSetGraphMemAttribute + * __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetGraphMemAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2462 + * __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute') + * global __cuDeviceSetGraphMemAttribute + * __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute') # <<<<<<<<<<<<<< + * global __cuGraphClone + * __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceSetGraphMemAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2464 + * __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute') + * global __cuGraphClone + * __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone') # <<<<<<<<<<<<<< + * global __cuGraphNodeFindInClone + * __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone = dlsym(__pyx_v_handle, ((char const *)"cuGraphClone")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2466 + * __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone') + * global __cuGraphNodeFindInClone + * __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetType + * __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeFindInClone")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2468 + * __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone') + * global __cuGraphNodeGetType + * __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType') # <<<<<<<<<<<<<< + * global __cuGraphGetNodes + * __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetType")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2470 + * __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType') + * global __cuGraphGetNodes + * __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes') # <<<<<<<<<<<<<< + * global __cuGraphGetRootNodes + * __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetNodes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2472 + * __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes') + * global __cuGraphGetRootNodes + * __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes') # <<<<<<<<<<<<<< + * global __cuGraphGetEdges + * __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetRootNodes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2474 + * __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes') + * global __cuGraphGetEdges + * __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges') # <<<<<<<<<<<<<< + * global __cuGraphGetEdges_v2 + * __cuGraphGetEdges_v2 = dlfcn.dlsym(handle, 'cuGraphGetEdges_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetEdges")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2476 + * __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges') + * global __cuGraphGetEdges_v2 + * __cuGraphGetEdges_v2 = dlfcn.dlsym(handle, 'cuGraphGetEdges_v2') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies + * __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphGetEdges_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2478 + * __cuGraphGetEdges_v2 = dlfcn.dlsym(handle, 'cuGraphGetEdges_v2') + * global __cuGraphNodeGetDependencies + * __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies_v2 + * __cuGraphNodeGetDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependencies")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2480 + * __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies') + * global __cuGraphNodeGetDependencies_v2 + * __cuGraphNodeGetDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies_v2') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes + * __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependencies_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2482 + * __cuGraphNodeGetDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies_v2') + * global __cuGraphNodeGetDependentNodes + * __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes_v2 + * __cuGraphNodeGetDependentNodes_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependentNodes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2484 + * __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes') + * global __cuGraphNodeGetDependentNodes_v2 + * __cuGraphNodeGetDependentNodes_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes_v2') # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies + * __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetDependentNodes_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2486 + * __cuGraphNodeGetDependentNodes_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes_v2') + * global __cuGraphAddDependencies + * __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies') # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies_v2 + * __cuGraphAddDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphAddDependencies_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddDependencies")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2488 + * __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies') + * global __cuGraphAddDependencies_v2 + * __cuGraphAddDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphAddDependencies_v2') # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies + * __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddDependencies_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2490 + * __cuGraphAddDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphAddDependencies_v2') + * global __cuGraphRemoveDependencies + * __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies') # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies_v2 + * __cuGraphRemoveDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies = dlsym(__pyx_v_handle, ((char const *)"cuGraphRemoveDependencies")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2492 + * __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies') + * global __cuGraphRemoveDependencies_v2 + * __cuGraphRemoveDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies_v2') # <<<<<<<<<<<<<< + * global __cuGraphDestroyNode + * __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphRemoveDependencies_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2494 + * __cuGraphRemoveDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies_v2') + * global __cuGraphDestroyNode + * __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode') # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithFlags + * __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphDestroyNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2496 + * __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode') + * global __cuGraphInstantiateWithFlags + * __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags') # <<<<<<<<<<<<<< + * global __cuGraphExecGetFlags + * __cuGraphExecGetFlags = dlfcn.dlsym(handle, 'cuGraphExecGetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuGraphInstantiateWithFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2498 + * __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags') + * global __cuGraphExecGetFlags + * __cuGraphExecGetFlags = dlfcn.dlsym(handle, 'cuGraphExecGetFlags') # <<<<<<<<<<<<<< + * global __cuGraphExecKernelNodeSetParams_v2 + * __cuGraphExecKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecGetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2500 + * __cuGraphExecGetFlags = dlfcn.dlsym(handle, 'cuGraphExecGetFlags') + * global __cuGraphExecKernelNodeSetParams_v2 + * __cuGraphExecKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams_v2') # <<<<<<<<<<<<<< + * global __cuGraphExecMemcpyNodeSetParams + * __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecKernelNodeSetParams_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2502 + * __cuGraphExecKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams_v2') + * global __cuGraphExecMemcpyNodeSetParams + * __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecMemsetNodeSetParams + * __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecMemcpyNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2504 + * __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams') + * global __cuGraphExecMemsetNodeSetParams + * __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecHostNodeSetParams + * __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecMemsetNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2506 + * __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams') + * global __cuGraphExecHostNodeSetParams + * __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecChildGraphNodeSetParams + * __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecHostNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2508 + * __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams') + * global __cuGraphExecChildGraphNodeSetParams + * __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecEventRecordNodeSetEvent + * __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecChildGraphNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2510 + * __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams') + * global __cuGraphExecEventRecordNodeSetEvent + * __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent') # <<<<<<<<<<<<<< + * global __cuGraphExecEventWaitNodeSetEvent + * __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecEventRecordNodeSetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2512 + * __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent') + * global __cuGraphExecEventWaitNodeSetEvent + * __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent') # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecEventWaitNodeSetEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2514 + * __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent') + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresSignalNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2516 + * __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphNodeSetEnabled + * __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecExternalSemaphoresWaitNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2518 + * __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') + * global __cuGraphNodeSetEnabled + * __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled') # <<<<<<<<<<<<<< + * global __cuGraphNodeGetEnabled + * __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeSetEnabled")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2520 + * __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled') + * global __cuGraphNodeGetEnabled + * __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled') # <<<<<<<<<<<<<< + * global __cuGraphExecDestroy + * __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeGetEnabled")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2522 + * __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled') + * global __cuGraphExecDestroy + * __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy') # <<<<<<<<<<<<<< + * global __cuGraphDestroy + * __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2524 + * __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy') + * global __cuGraphDestroy + * __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy') # <<<<<<<<<<<<<< + * global __cuGraphExecUpdate_v2 + * __cuGraphExecUpdate_v2 = dlfcn.dlsym(handle, 'cuGraphExecUpdate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy = dlsym(__pyx_v_handle, ((char const *)"cuGraphDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2526 + * __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy') + * global __cuGraphExecUpdate_v2 + * __cuGraphExecUpdate_v2 = dlfcn.dlsym(handle, 'cuGraphExecUpdate_v2') # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeCopyAttributes + * __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecUpdate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2528 + * __cuGraphExecUpdate_v2 = dlfcn.dlsym(handle, 'cuGraphExecUpdate_v2') + * global __cuGraphKernelNodeCopyAttributes + * __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes') # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetAttribute + * __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeCopyAttributes")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2530 + * __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes') + * global __cuGraphKernelNodeGetAttribute + * __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute') # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetAttribute + * __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2532 + * __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute') + * global __cuGraphKernelNodeSetAttribute + * __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute') # <<<<<<<<<<<<<< + * global __cuGraphDebugDotPrint + * __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuGraphKernelNodeSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2534 + * __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute') + * global __cuGraphDebugDotPrint + * __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint') # <<<<<<<<<<<<<< + * global __cuUserObjectCreate + * __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint = dlsym(__pyx_v_handle, ((char const *)"cuGraphDebugDotPrint")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2536 + * __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint') + * global __cuUserObjectCreate + * __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate') # <<<<<<<<<<<<<< + * global __cuUserObjectRetain + * __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2538 + * __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate') + * global __cuUserObjectRetain + * __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain') # <<<<<<<<<<<<<< + * global __cuUserObjectRelease + * __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectRetain")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2540 + * __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain') + * global __cuUserObjectRelease + * __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease') # <<<<<<<<<<<<<< + * global __cuGraphRetainUserObject + * __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease = dlsym(__pyx_v_handle, ((char const *)"cuUserObjectRelease")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2542 + * __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease') + * global __cuGraphRetainUserObject + * __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject') # <<<<<<<<<<<<<< + * global __cuGraphReleaseUserObject + * __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject = dlsym(__pyx_v_handle, ((char const *)"cuGraphRetainUserObject")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2544 + * __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject') + * global __cuGraphReleaseUserObject + * __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject') # <<<<<<<<<<<<<< + * global __cuGraphAddNode + * __cuGraphAddNode = dlfcn.dlsym(handle, 'cuGraphAddNode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject = dlsym(__pyx_v_handle, ((char const *)"cuGraphReleaseUserObject")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2546 + * __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject') + * global __cuGraphAddNode + * __cuGraphAddNode = dlfcn.dlsym(handle, 'cuGraphAddNode') # <<<<<<<<<<<<<< + * global __cuGraphAddNode_v2 + * __cuGraphAddNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddNode_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddNode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2548 + * __cuGraphAddNode = dlfcn.dlsym(handle, 'cuGraphAddNode') + * global __cuGraphAddNode_v2 + * __cuGraphAddNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddNode_v2') # <<<<<<<<<<<<<< + * global __cuGraphNodeSetParams + * __cuGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphAddNode_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2550 + * __cuGraphAddNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddNode_v2') + * global __cuGraphNodeSetParams + * __cuGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphExecNodeSetParams + * __cuGraphExecNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecNodeSetParams') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2552 + * __cuGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphNodeSetParams') + * global __cuGraphExecNodeSetParams + * __cuGraphExecNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecNodeSetParams') # <<<<<<<<<<<<<< + * global __cuGraphConditionalHandleCreate + * __cuGraphConditionalHandleCreate = dlfcn.dlsym(handle, 'cuGraphConditionalHandleCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams = dlsym(__pyx_v_handle, ((char const *)"cuGraphExecNodeSetParams")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2554 + * __cuGraphExecNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecNodeSetParams') + * global __cuGraphConditionalHandleCreate + * __cuGraphConditionalHandleCreate = dlfcn.dlsym(handle, 'cuGraphConditionalHandleCreate') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate = dlsym(__pyx_v_handle, ((char const *)"cuGraphConditionalHandleCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2556 + * __cuGraphConditionalHandleCreate = dlfcn.dlsym(handle, 'cuGraphConditionalHandleCreate') + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessor")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2558 + * __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSize + * __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2560 + * __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') + * global __cuOccupancyMaxPotentialBlockSize + * __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxPotentialBlockSize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2562 + * __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize') + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') # <<<<<<<<<<<<<< + * global __cuOccupancyAvailableDynamicSMemPerBlock + * __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxPotentialBlockSizeWithFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2564 + * __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') + * global __cuOccupancyAvailableDynamicSMemPerBlock + * __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialClusterSize + * __cuOccupancyMaxPotentialClusterSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialClusterSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyAvailableDynamicSMemPerBlock")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2566 + * __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') + * global __cuOccupancyMaxPotentialClusterSize + * __cuOccupancyMaxPotentialClusterSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialClusterSize') # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveClusters + * __cuOccupancyMaxActiveClusters = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveClusters') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxPotentialClusterSize")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2568 + * __cuOccupancyMaxPotentialClusterSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialClusterSize') + * global __cuOccupancyMaxActiveClusters + * __cuOccupancyMaxActiveClusters = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveClusters') # <<<<<<<<<<<<<< + * global __cuTexRefSetArray + * __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters = dlsym(__pyx_v_handle, ((char const *)"cuOccupancyMaxActiveClusters")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2570 + * __cuOccupancyMaxActiveClusters = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveClusters') + * global __cuTexRefSetArray + * __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray') # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmappedArray + * __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2572 + * __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray') + * global __cuTexRefSetMipmappedArray + * __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray') # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress_v2 + * __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmappedArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2574 + * __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray') + * global __cuTexRefSetAddress_v2 + * __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2') # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress2D_v3 + * __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddress_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2576 + * __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2') + * global __cuTexRefSetAddress2D_v3 + * __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3') # <<<<<<<<<<<<<< + * global __cuTexRefSetFormat + * __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddress2D_v3")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2578 + * __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3') + * global __cuTexRefSetFormat + * __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat') # <<<<<<<<<<<<<< + * global __cuTexRefSetAddressMode + * __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFormat")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2580 + * __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat') + * global __cuTexRefSetAddressMode + * __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode') # <<<<<<<<<<<<<< + * global __cuTexRefSetFilterMode + * __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetAddressMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2582 + * __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode') + * global __cuTexRefSetFilterMode + * __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode') # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapFilterMode + * __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFilterMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2584 + * __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode') + * global __cuTexRefSetMipmapFilterMode + * __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode') # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelBias + * __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapFilterMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2586 + * __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode') + * global __cuTexRefSetMipmapLevelBias + * __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias') # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelClamp + * __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapLevelBias")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2588 + * __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias') + * global __cuTexRefSetMipmapLevelClamp + * __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp') # <<<<<<<<<<<<<< + * global __cuTexRefSetMaxAnisotropy + * __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMipmapLevelClamp")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2590 + * __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp') + * global __cuTexRefSetMaxAnisotropy + * __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy') # <<<<<<<<<<<<<< + * global __cuTexRefSetBorderColor + * __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetMaxAnisotropy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2592 + * __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy') + * global __cuTexRefSetBorderColor + * __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor') # <<<<<<<<<<<<<< + * global __cuTexRefSetFlags + * __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetBorderColor")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2594 + * __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor') + * global __cuTexRefSetFlags + * __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags') # <<<<<<<<<<<<<< + * global __cuTexRefGetAddress_v2 + * __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags = dlsym(__pyx_v_handle, ((char const *)"cuTexRefSetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2596 + * __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags') + * global __cuTexRefGetAddress_v2 + * __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2') # <<<<<<<<<<<<<< + * global __cuTexRefGetArray + * __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetAddress_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2598 + * __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2') + * global __cuTexRefGetArray + * __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray') # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmappedArray + * __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2600 + * __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray') + * global __cuTexRefGetMipmappedArray + * __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray') # <<<<<<<<<<<<<< + * global __cuTexRefGetAddressMode + * __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmappedArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2602 + * __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray') + * global __cuTexRefGetAddressMode + * __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode') # <<<<<<<<<<<<<< + * global __cuTexRefGetFilterMode + * __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetAddressMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2604 + * __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode') + * global __cuTexRefGetFilterMode + * __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode') # <<<<<<<<<<<<<< + * global __cuTexRefGetFormat + * __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFilterMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2606 + * __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode') + * global __cuTexRefGetFormat + * __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat') # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapFilterMode + * __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFormat")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2608 + * __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat') + * global __cuTexRefGetMipmapFilterMode + * __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode') # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelBias + * __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapFilterMode")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2610 + * __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode') + * global __cuTexRefGetMipmapLevelBias + * __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias') # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelClamp + * __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapLevelBias")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2612 + * __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias') + * global __cuTexRefGetMipmapLevelClamp + * __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp') # <<<<<<<<<<<<<< + * global __cuTexRefGetMaxAnisotropy + * __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMipmapLevelClamp")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2614 + * __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp') + * global __cuTexRefGetMaxAnisotropy + * __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy') # <<<<<<<<<<<<<< + * global __cuTexRefGetBorderColor + * __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetMaxAnisotropy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2616 + * __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy') + * global __cuTexRefGetBorderColor + * __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor') # <<<<<<<<<<<<<< + * global __cuTexRefGetFlags + * __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetBorderColor")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2618 + * __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor') + * global __cuTexRefGetFlags + * __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags') # <<<<<<<<<<<<<< + * global __cuTexRefCreate + * __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags = dlsym(__pyx_v_handle, ((char const *)"cuTexRefGetFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2620 + * __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags') + * global __cuTexRefCreate + * __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate') # <<<<<<<<<<<<<< + * global __cuTexRefDestroy + * __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate = dlsym(__pyx_v_handle, ((char const *)"cuTexRefCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2622 + * __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate') + * global __cuTexRefDestroy + * __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy') # <<<<<<<<<<<<<< + * global __cuSurfRefSetArray + * __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy = dlsym(__pyx_v_handle, ((char const *)"cuTexRefDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2624 + * __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy') + * global __cuSurfRefSetArray + * __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray') # <<<<<<<<<<<<<< + * global __cuSurfRefGetArray + * __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray = dlsym(__pyx_v_handle, ((char const *)"cuSurfRefSetArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2626 + * __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray') + * global __cuSurfRefGetArray + * __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray') # <<<<<<<<<<<<<< + * global __cuTexObjectCreate + * __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray = dlsym(__pyx_v_handle, ((char const *)"cuSurfRefGetArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2628 + * __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray') + * global __cuTexObjectCreate + * __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate') # <<<<<<<<<<<<<< + * global __cuTexObjectDestroy + * __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2630 + * __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate') + * global __cuTexObjectDestroy + * __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy') # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceDesc + * __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2632 + * __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy') + * global __cuTexObjectGetResourceDesc + * __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc') # <<<<<<<<<<<<<< + * global __cuTexObjectGetTextureDesc + * __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetResourceDesc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2634 + * __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc') + * global __cuTexObjectGetTextureDesc + * __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc') # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceViewDesc + * __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetTextureDesc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2636 + * __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc') + * global __cuTexObjectGetResourceViewDesc + * __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc') # <<<<<<<<<<<<<< + * global __cuSurfObjectCreate + * __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc = dlsym(__pyx_v_handle, ((char const *)"cuTexObjectGetResourceViewDesc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2638 + * __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc') + * global __cuSurfObjectCreate + * __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate') # <<<<<<<<<<<<<< + * global __cuSurfObjectDestroy + * __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2640 + * __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate') + * global __cuSurfObjectDestroy + * __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy') # <<<<<<<<<<<<<< + * global __cuSurfObjectGetResourceDesc + * __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2642 + * __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy') + * global __cuSurfObjectGetResourceDesc + * __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc') # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeTiled + * __cuTensorMapEncodeTiled = dlfcn.dlsym(handle, 'cuTensorMapEncodeTiled') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc = dlsym(__pyx_v_handle, ((char const *)"cuSurfObjectGetResourceDesc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2644 + * __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc') + * global __cuTensorMapEncodeTiled + * __cuTensorMapEncodeTiled = dlfcn.dlsym(handle, 'cuTensorMapEncodeTiled') # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2col + * __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled = dlsym(__pyx_v_handle, ((char const *)"cuTensorMapEncodeTiled")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2646 + * __cuTensorMapEncodeTiled = dlfcn.dlsym(handle, 'cuTensorMapEncodeTiled') + * global __cuTensorMapEncodeIm2col + * __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2colWide + * __cuTensorMapEncodeIm2colWide = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2colWide') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col = dlsym(__pyx_v_handle, ((char const *)"cuTensorMapEncodeIm2col")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2648 + * __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') + * global __cuTensorMapEncodeIm2colWide + * __cuTensorMapEncodeIm2colWide = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2colWide') # <<<<<<<<<<<<<< + * global __cuTensorMapReplaceAddress + * __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide = dlsym(__pyx_v_handle, ((char const *)"cuTensorMapEncodeIm2colWide")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2650 + * __cuTensorMapEncodeIm2colWide = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2colWide') + * global __cuTensorMapReplaceAddress + * __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') # <<<<<<<<<<<<<< + * global __cuDeviceCanAccessPeer + * __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress = dlsym(__pyx_v_handle, ((char const *)"cuTensorMapReplaceAddress")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2652 + * __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') + * global __cuDeviceCanAccessPeer + * __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer') # <<<<<<<<<<<<<< + * global __cuCtxEnablePeerAccess + * __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer = dlsym(__pyx_v_handle, ((char const *)"cuDeviceCanAccessPeer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2654 + * __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer') + * global __cuCtxEnablePeerAccess + * __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess') # <<<<<<<<<<<<<< + * global __cuCtxDisablePeerAccess + * __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess = dlsym(__pyx_v_handle, ((char const *)"cuCtxEnablePeerAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2656 + * __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess') + * global __cuCtxDisablePeerAccess + * __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess') # <<<<<<<<<<<<<< + * global __cuDeviceGetP2PAttribute + * __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess = dlsym(__pyx_v_handle, ((char const *)"cuCtxDisablePeerAccess")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2658 + * __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess') + * global __cuDeviceGetP2PAttribute + * __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute') # <<<<<<<<<<<<<< + * global __cuGraphicsUnregisterResource + * __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetP2PAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2660 + * __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute') + * global __cuGraphicsUnregisterResource + * __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource') # <<<<<<<<<<<<<< + * global __cuGraphicsSubResourceGetMappedArray + * __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsUnregisterResource")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2662 + * __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource') + * global __cuGraphicsSubResourceGetMappedArray + * __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray') # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedMipmappedArray + * __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsSubResourceGetMappedArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2664 + * __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray') + * global __cuGraphicsResourceGetMappedMipmappedArray + * __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray') # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedPointer_v2 + * __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedMipmappedArray")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2666 + * __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray') + * global __cuGraphicsResourceGetMappedPointer_v2 + * __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2') # <<<<<<<<<<<<<< + * global __cuGraphicsResourceSetMapFlags_v2 + * __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedPointer_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2668 + * __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2') + * global __cuGraphicsResourceSetMapFlags_v2 + * __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2') # <<<<<<<<<<<<<< + * global __cuGetProcAddress_v2 + * __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceSetMapFlags_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2670 + * __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2') + * global __cuGetProcAddress_v2 + * __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttribute + * __cuCoredumpGetAttribute = dlfcn.dlsym(handle, 'cuCoredumpGetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGetProcAddress_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2672 + * __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') + * global __cuCoredumpGetAttribute + * __cuCoredumpGetAttribute = dlfcn.dlsym(handle, 'cuCoredumpGetAttribute') # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttributeGlobal + * __cuCoredumpGetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpGetAttributeGlobal') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuCoredumpGetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2674 + * __cuCoredumpGetAttribute = dlfcn.dlsym(handle, 'cuCoredumpGetAttribute') + * global __cuCoredumpGetAttributeGlobal + * __cuCoredumpGetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpGetAttributeGlobal') # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttribute + * __cuCoredumpSetAttribute = dlfcn.dlsym(handle, 'cuCoredumpSetAttribute') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal = dlsym(__pyx_v_handle, ((char const *)"cuCoredumpGetAttributeGlobal")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2676 + * __cuCoredumpGetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpGetAttributeGlobal') + * global __cuCoredumpSetAttribute + * __cuCoredumpSetAttribute = dlfcn.dlsym(handle, 'cuCoredumpSetAttribute') # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttributeGlobal + * __cuCoredumpSetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpSetAttributeGlobal') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute = dlsym(__pyx_v_handle, ((char const *)"cuCoredumpSetAttribute")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2678 + * __cuCoredumpSetAttribute = dlfcn.dlsym(handle, 'cuCoredumpSetAttribute') + * global __cuCoredumpSetAttributeGlobal + * __cuCoredumpSetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpSetAttributeGlobal') # <<<<<<<<<<<<<< + * global __cuGetExportTable + * __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal = dlsym(__pyx_v_handle, ((char const *)"cuCoredumpSetAttributeGlobal")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2680 + * __cuCoredumpSetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpSetAttributeGlobal') + * global __cuGetExportTable + * __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable') # <<<<<<<<<<<<<< + * global __cuGreenCtxCreate + * __cuGreenCtxCreate = dlfcn.dlsym(handle, 'cuGreenCtxCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable = dlsym(__pyx_v_handle, ((char const *)"cuGetExportTable")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2682 + * __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable') + * global __cuGreenCtxCreate + * __cuGreenCtxCreate = dlfcn.dlsym(handle, 'cuGreenCtxCreate') # <<<<<<<<<<<<<< + * global __cuGreenCtxDestroy + * __cuGreenCtxDestroy = dlfcn.dlsym(handle, 'cuGreenCtxDestroy') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2684 + * __cuGreenCtxCreate = dlfcn.dlsym(handle, 'cuGreenCtxCreate') + * global __cuGreenCtxDestroy + * __cuGreenCtxDestroy = dlfcn.dlsym(handle, 'cuGreenCtxDestroy') # <<<<<<<<<<<<<< + * global __cuCtxFromGreenCtx + * __cuCtxFromGreenCtx = dlfcn.dlsym(handle, 'cuCtxFromGreenCtx') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxDestroy")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2686 + * __cuGreenCtxDestroy = dlfcn.dlsym(handle, 'cuGreenCtxDestroy') + * global __cuCtxFromGreenCtx + * __cuCtxFromGreenCtx = dlfcn.dlsym(handle, 'cuCtxFromGreenCtx') # <<<<<<<<<<<<<< + * global __cuDeviceGetDevResource + * __cuDeviceGetDevResource = dlfcn.dlsym(handle, 'cuDeviceGetDevResource') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx = dlsym(__pyx_v_handle, ((char const *)"cuCtxFromGreenCtx")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2688 + * __cuCtxFromGreenCtx = dlfcn.dlsym(handle, 'cuCtxFromGreenCtx') + * global __cuDeviceGetDevResource + * __cuDeviceGetDevResource = dlfcn.dlsym(handle, 'cuDeviceGetDevResource') # <<<<<<<<<<<<<< + * global __cuCtxGetDevResource + * __cuCtxGetDevResource = dlfcn.dlsym(handle, 'cuCtxGetDevResource') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource = dlsym(__pyx_v_handle, ((char const *)"cuDeviceGetDevResource")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2690 + * __cuDeviceGetDevResource = dlfcn.dlsym(handle, 'cuDeviceGetDevResource') + * global __cuCtxGetDevResource + * __cuCtxGetDevResource = dlfcn.dlsym(handle, 'cuCtxGetDevResource') # <<<<<<<<<<<<<< + * global __cuGreenCtxGetDevResource + * __cuGreenCtxGetDevResource = dlfcn.dlsym(handle, 'cuGreenCtxGetDevResource') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource = dlsym(__pyx_v_handle, ((char const *)"cuCtxGetDevResource")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2692 + * __cuCtxGetDevResource = dlfcn.dlsym(handle, 'cuCtxGetDevResource') + * global __cuGreenCtxGetDevResource + * __cuGreenCtxGetDevResource = dlfcn.dlsym(handle, 'cuGreenCtxGetDevResource') # <<<<<<<<<<<<<< + * global __cuDevSmResourceSplitByCount + * __cuDevSmResourceSplitByCount = dlfcn.dlsym(handle, 'cuDevSmResourceSplitByCount') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxGetDevResource")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2694 + * __cuGreenCtxGetDevResource = dlfcn.dlsym(handle, 'cuGreenCtxGetDevResource') + * global __cuDevSmResourceSplitByCount + * __cuDevSmResourceSplitByCount = dlfcn.dlsym(handle, 'cuDevSmResourceSplitByCount') # <<<<<<<<<<<<<< + * global __cuDevResourceGenerateDesc + * __cuDevResourceGenerateDesc = dlfcn.dlsym(handle, 'cuDevResourceGenerateDesc') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount = dlsym(__pyx_v_handle, ((char const *)"cuDevSmResourceSplitByCount")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2696 + * __cuDevSmResourceSplitByCount = dlfcn.dlsym(handle, 'cuDevSmResourceSplitByCount') + * global __cuDevResourceGenerateDesc + * __cuDevResourceGenerateDesc = dlfcn.dlsym(handle, 'cuDevResourceGenerateDesc') # <<<<<<<<<<<<<< + * global __cuGreenCtxRecordEvent + * __cuGreenCtxRecordEvent = dlfcn.dlsym(handle, 'cuGreenCtxRecordEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc = dlsym(__pyx_v_handle, ((char const *)"cuDevResourceGenerateDesc")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2698 + * __cuDevResourceGenerateDesc = dlfcn.dlsym(handle, 'cuDevResourceGenerateDesc') + * global __cuGreenCtxRecordEvent + * __cuGreenCtxRecordEvent = dlfcn.dlsym(handle, 'cuGreenCtxRecordEvent') # <<<<<<<<<<<<<< + * global __cuGreenCtxWaitEvent + * __cuGreenCtxWaitEvent = dlfcn.dlsym(handle, 'cuGreenCtxWaitEvent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxRecordEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2700 + * __cuGreenCtxRecordEvent = dlfcn.dlsym(handle, 'cuGreenCtxRecordEvent') + * global __cuGreenCtxWaitEvent + * __cuGreenCtxWaitEvent = dlfcn.dlsym(handle, 'cuGreenCtxWaitEvent') # <<<<<<<<<<<<<< + * global __cuStreamGetGreenCtx + * __cuStreamGetGreenCtx = dlfcn.dlsym(handle, 'cuStreamGetGreenCtx') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxWaitEvent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2702 + * __cuGreenCtxWaitEvent = dlfcn.dlsym(handle, 'cuGreenCtxWaitEvent') + * global __cuStreamGetGreenCtx + * __cuStreamGetGreenCtx = dlfcn.dlsym(handle, 'cuStreamGetGreenCtx') # <<<<<<<<<<<<<< + * global __cuGreenCtxStreamCreate + * __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx = dlsym(__pyx_v_handle, ((char const *)"cuStreamGetGreenCtx")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2704 + * __cuStreamGetGreenCtx = dlfcn.dlsym(handle, 'cuStreamGetGreenCtx') + * global __cuGreenCtxStreamCreate + * __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') # <<<<<<<<<<<<<< + * global __cuLogsRegisterCallback + * __cuLogsRegisterCallback = dlfcn.dlsym(handle, 'cuLogsRegisterCallback') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate = dlsym(__pyx_v_handle, ((char const *)"cuGreenCtxStreamCreate")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2706 + * __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') + * global __cuLogsRegisterCallback + * __cuLogsRegisterCallback = dlfcn.dlsym(handle, 'cuLogsRegisterCallback') # <<<<<<<<<<<<<< + * global __cuLogsUnregisterCallback + * __cuLogsUnregisterCallback = dlfcn.dlsym(handle, 'cuLogsUnregisterCallback') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback = dlsym(__pyx_v_handle, ((char const *)"cuLogsRegisterCallback")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2708 + * __cuLogsRegisterCallback = dlfcn.dlsym(handle, 'cuLogsRegisterCallback') + * global __cuLogsUnregisterCallback + * __cuLogsUnregisterCallback = dlfcn.dlsym(handle, 'cuLogsUnregisterCallback') # <<<<<<<<<<<<<< + * global __cuLogsCurrent + * __cuLogsCurrent = dlfcn.dlsym(handle, 'cuLogsCurrent') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback = dlsym(__pyx_v_handle, ((char const *)"cuLogsUnregisterCallback")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2710 + * __cuLogsUnregisterCallback = dlfcn.dlsym(handle, 'cuLogsUnregisterCallback') + * global __cuLogsCurrent + * __cuLogsCurrent = dlfcn.dlsym(handle, 'cuLogsCurrent') # <<<<<<<<<<<<<< + * global __cuLogsDumpToFile + * __cuLogsDumpToFile = dlfcn.dlsym(handle, 'cuLogsDumpToFile') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent = dlsym(__pyx_v_handle, ((char const *)"cuLogsCurrent")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2712 + * __cuLogsCurrent = dlfcn.dlsym(handle, 'cuLogsCurrent') + * global __cuLogsDumpToFile + * __cuLogsDumpToFile = dlfcn.dlsym(handle, 'cuLogsDumpToFile') # <<<<<<<<<<<<<< + * global __cuLogsDumpToMemory + * __cuLogsDumpToMemory = dlfcn.dlsym(handle, 'cuLogsDumpToMemory') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile = dlsym(__pyx_v_handle, ((char const *)"cuLogsDumpToFile")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2714 + * __cuLogsDumpToFile = dlfcn.dlsym(handle, 'cuLogsDumpToFile') + * global __cuLogsDumpToMemory + * __cuLogsDumpToMemory = dlfcn.dlsym(handle, 'cuLogsDumpToMemory') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetRestoreThreadId + * __cuCheckpointProcessGetRestoreThreadId = dlfcn.dlsym(handle, 'cuCheckpointProcessGetRestoreThreadId') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory = dlsym(__pyx_v_handle, ((char const *)"cuLogsDumpToMemory")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2716 + * __cuLogsDumpToMemory = dlfcn.dlsym(handle, 'cuLogsDumpToMemory') + * global __cuCheckpointProcessGetRestoreThreadId + * __cuCheckpointProcessGetRestoreThreadId = dlfcn.dlsym(handle, 'cuCheckpointProcessGetRestoreThreadId') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetState + * __cuCheckpointProcessGetState = dlfcn.dlsym(handle, 'cuCheckpointProcessGetState') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessGetRestoreThreadId")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2718 + * __cuCheckpointProcessGetRestoreThreadId = dlfcn.dlsym(handle, 'cuCheckpointProcessGetRestoreThreadId') + * global __cuCheckpointProcessGetState + * __cuCheckpointProcessGetState = dlfcn.dlsym(handle, 'cuCheckpointProcessGetState') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessLock + * __cuCheckpointProcessLock = dlfcn.dlsym(handle, 'cuCheckpointProcessLock') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessGetState")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2720 + * __cuCheckpointProcessGetState = dlfcn.dlsym(handle, 'cuCheckpointProcessGetState') + * global __cuCheckpointProcessLock + * __cuCheckpointProcessLock = dlfcn.dlsym(handle, 'cuCheckpointProcessLock') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessCheckpoint + * __cuCheckpointProcessCheckpoint = dlfcn.dlsym(handle, 'cuCheckpointProcessCheckpoint') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessLock")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2722 + * __cuCheckpointProcessLock = dlfcn.dlsym(handle, 'cuCheckpointProcessLock') + * global __cuCheckpointProcessCheckpoint + * __cuCheckpointProcessCheckpoint = dlfcn.dlsym(handle, 'cuCheckpointProcessCheckpoint') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessRestore + * __cuCheckpointProcessRestore = dlfcn.dlsym(handle, 'cuCheckpointProcessRestore') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessCheckpoint")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2724 + * __cuCheckpointProcessCheckpoint = dlfcn.dlsym(handle, 'cuCheckpointProcessCheckpoint') + * global __cuCheckpointProcessRestore + * __cuCheckpointProcessRestore = dlfcn.dlsym(handle, 'cuCheckpointProcessRestore') # <<<<<<<<<<<<<< + * global __cuCheckpointProcessUnlock + * __cuCheckpointProcessUnlock = dlfcn.dlsym(handle, 'cuCheckpointProcessUnlock') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessRestore")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2726 + * __cuCheckpointProcessRestore = dlfcn.dlsym(handle, 'cuCheckpointProcessRestore') + * global __cuCheckpointProcessUnlock + * __cuCheckpointProcessUnlock = dlfcn.dlsym(handle, 'cuCheckpointProcessUnlock') # <<<<<<<<<<<<<< + * global __cuProfilerStart + * __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock = dlsym(__pyx_v_handle, ((char const *)"cuCheckpointProcessUnlock")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2728 + * __cuCheckpointProcessUnlock = dlfcn.dlsym(handle, 'cuCheckpointProcessUnlock') + * global __cuProfilerStart + * __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') # <<<<<<<<<<<<<< + * global __cuProfilerStop + * __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart = dlsym(__pyx_v_handle, ((char const *)"cuProfilerStart")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2730 + * __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') + * global __cuProfilerStop + * __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop') # <<<<<<<<<<<<<< + * global __cuGraphicsEGLRegisterImage + * __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop = dlsym(__pyx_v_handle, ((char const *)"cuProfilerStop")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2732 + * __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop') + * global __cuGraphicsEGLRegisterImage + * __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage') # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnect + * __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsEGLRegisterImage")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2734 + * __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage') + * global __cuEGLStreamConsumerConnect + * __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect') # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnectWithFlags + * __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerConnect")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2736 + * __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect') + * global __cuEGLStreamConsumerConnectWithFlags + * __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags') # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerDisconnect + * __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerConnectWithFlags")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2738 + * __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags') + * global __cuEGLStreamConsumerDisconnect + * __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect') # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerAcquireFrame + * __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerDisconnect")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2740 + * __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect') + * global __cuEGLStreamConsumerAcquireFrame + * __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame') # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerReleaseFrame + * __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerAcquireFrame")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2742 + * __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame') + * global __cuEGLStreamConsumerReleaseFrame + * __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame') # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerConnect + * __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamConsumerReleaseFrame")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2744 + * __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame') + * global __cuEGLStreamProducerConnect + * __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect') # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerDisconnect + * __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerConnect")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2746 + * __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect') + * global __cuEGLStreamProducerDisconnect + * __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect') # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerPresentFrame + * __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerDisconnect")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2748 + * __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect') + * global __cuEGLStreamProducerPresentFrame + * __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame') # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerReturnFrame + * __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerPresentFrame")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2750 + * __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame') + * global __cuEGLStreamProducerReturnFrame + * __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame') # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedEglFrame + * __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame = dlsym(__pyx_v_handle, ((char const *)"cuEGLStreamProducerReturnFrame")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2752 + * __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame') + * global __cuGraphicsResourceGetMappedEglFrame + * __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame') # <<<<<<<<<<<<<< + * global __cuEventCreateFromEGLSync + * __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsResourceGetMappedEglFrame")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2754 + * __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame') + * global __cuEventCreateFromEGLSync + * __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync') # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterBuffer + * __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync = dlsym(__pyx_v_handle, ((char const *)"cuEventCreateFromEGLSync")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2756 + * __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync') + * global __cuGraphicsGLRegisterBuffer + * __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer') # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterImage + * __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsGLRegisterBuffer")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2758 + * __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer') + * global __cuGraphicsGLRegisterImage + * __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage') # <<<<<<<<<<<<<< + * global __cuGLGetDevices_v2 + * __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsGLRegisterImage")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2760 + * __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage') + * global __cuGLGetDevices_v2 + * __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2') # <<<<<<<<<<<<<< + * global __cuVDPAUGetDevice + * __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2 = dlsym(__pyx_v_handle, ((char const *)"cuGLGetDevices_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2762 + * __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2') + * global __cuVDPAUGetDevice + * __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice') # <<<<<<<<<<<<<< + * global __cuVDPAUCtxCreate_v2 + * __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice = dlsym(__pyx_v_handle, ((char const *)"cuVDPAUGetDevice")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2764 + * __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice') + * global __cuVDPAUCtxCreate_v2 + * __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2') # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterVideoSurface + * __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2 = dlsym(__pyx_v_handle, ((char const *)"cuVDPAUCtxCreate_v2")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2766 + * __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2') + * global __cuGraphicsVDPAURegisterVideoSurface + * __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface') # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterOutputSurface + * __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsVDPAURegisterVideoSurface")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2768 + * __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface') + * global __cuGraphicsVDPAURegisterOutputSurface + * __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') # <<<<<<<<<<<<<< + * __cuPythonInit = True + * return 0 +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface = dlsym(__pyx_v_handle, ((char const *)"cuGraphicsVDPAURegisterOutputSurface")); + + /* "cuda/bindings/_bindings/cydriver.pyx":2769 + * global __cuGraphicsVDPAURegisterOutputSurface + * __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') + * __cuPythonInit = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPythonInit = 1; + + /* "cuda/bindings/_bindings/cydriver.pyx":2770 + * __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') + * __cuPythonInit = True + * return 0 # <<<<<<<<<<<<<< + * + * # Create a very small function to check whether we are init'ed, so the C +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_bindings/cydriver.pyx":498 + * cdef char libPath[260] + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) + * +*/ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + /*except:*/ { + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 498, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_9); + __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 498, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (__pyx_t_10 < (0)) __PYX_ERR(0, 498, __pyx_L12_except_error) + __pyx_t_11 = (!__pyx_t_10); + if (unlikely(__pyx_t_11)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_9); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_9 = 0; + __PYX_ERR(0, 498, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_16 = __pyx_r; + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_16; + goto __pyx_L3_return; + } + __pyx_L9:; + } + goto __pyx_L26; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_error; + __pyx_L26:; + } + } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L3_return: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L0; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":492 + * cdef __cuGetProcAddress_v2_T _F_cuGetProcAddress_v2 = NULL + * + * cdef int _cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cuPythonInit + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_v_path); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2774 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cuPythonInit: + * return 0 +*/ + +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cydriver.pyx":2775 + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: # <<<<<<<<<<<<<< + * return 0 + * return _cuPythonInit() +*/ + if (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPythonInit) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2776 + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: + * return 0 # <<<<<<<<<<<<<< + * return _cuPythonInit() + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2775 + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: # <<<<<<<<<<<<<< + * return 0 + * return _cuPythonInit() +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2777 + * if __cuPythonInit: + * return 0 + * return _cuPythonInit() # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2777, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2774 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cuPythonInit: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver.cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2779 + * return _cuPythonInit() + * + * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetErrorString + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorString(CUresult __pyx_v_error, char const **__pyx_v_pStr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGetErrorString", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2781 + * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGetErrorString + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGetErrorString == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2781, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2782 + * global __cuGetErrorString + * cuPythonInit() + * if __cuGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetErrorString" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2783 + * cuPythonInit() + * if __cuGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetErrorString" not found') + * err = ( __cuGetErrorString)(error, pStr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2784 + * if __cuGetErrorString == NULL: + * with gil: + * raise RuntimeError('Function "cuGetErrorString" not found') # <<<<<<<<<<<<<< + * err = ( __cuGetErrorString)(error, pStr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGetErrorString_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2784, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2784, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2783 + * cuPythonInit() + * if __cuGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetErrorString" not found') + * err = ( __cuGetErrorString)(error, pStr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2782 + * global __cuGetErrorString + * cuPythonInit() + * if __cuGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetErrorString" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2785 + * with gil: + * raise RuntimeError('Function "cuGetErrorString" not found') + * err = ( __cuGetErrorString)(error, pStr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUresult, char const **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString)(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2785, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2786 + * raise RuntimeError('Function "cuGetErrorString" not found') + * err = ( __cuGetErrorString)(error, pStr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2779 + * return _cuPythonInit() + * + * cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetErrorString + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2788 + * return err + * + * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetErrorName + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorName(CUresult __pyx_v_error, char const **__pyx_v_pStr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGetErrorName", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2790 + * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGetErrorName + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGetErrorName == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2790, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2791 + * global __cuGetErrorName + * cuPythonInit() + * if __cuGetErrorName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetErrorName" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2792 + * cuPythonInit() + * if __cuGetErrorName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetErrorName" not found') + * err = ( __cuGetErrorName)(error, pStr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2793 + * if __cuGetErrorName == NULL: + * with gil: + * raise RuntimeError('Function "cuGetErrorName" not found') # <<<<<<<<<<<<<< + * err = ( __cuGetErrorName)(error, pStr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGetErrorName_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2793, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2793, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2792 + * cuPythonInit() + * if __cuGetErrorName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetErrorName" not found') + * err = ( __cuGetErrorName)(error, pStr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2791 + * global __cuGetErrorName + * cuPythonInit() + * if __cuGetErrorName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetErrorName" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2794 + * with gil: + * raise RuntimeError('Function "cuGetErrorName" not found') + * err = ( __cuGetErrorName)(error, pStr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUresult, char const **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName)(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2794, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2795 + * raise RuntimeError('Function "cuGetErrorName" not found') + * err = ( __cuGetErrorName)(error, pStr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2788 + * return err + * + * cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetErrorName + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2797 + * return err + * + * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuInit + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuInit(unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuInit", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2799 + * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuInit + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuInit == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2799, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2800 + * global __cuInit + * cuPythonInit() + * if __cuInit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuInit" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2801 + * cuPythonInit() + * if __cuInit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuInit" not found') + * err = ( __cuInit)(Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2802 + * if __cuInit == NULL: + * with gil: + * raise RuntimeError('Function "cuInit" not found') # <<<<<<<<<<<<<< + * err = ( __cuInit)(Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuInit_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2802, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2802, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2801 + * cuPythonInit() + * if __cuInit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuInit" not found') + * err = ( __cuInit)(Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2800 + * global __cuInit + * cuPythonInit() + * if __cuInit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuInit" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2803 + * with gil: + * raise RuntimeError('Function "cuInit" not found') + * err = ( __cuInit)(Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit)(__pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2803, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2804 + * raise RuntimeError('Function "cuInit" not found') + * err = ( __cuInit)(Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2797 + * return err + * + * cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuInit + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2806 + * return err + * + * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDriverGetVersion + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDriverGetVersion(int *__pyx_v_driverVersion) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDriverGetVersion", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2808 + * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDriverGetVersion + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDriverGetVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2808, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2809 + * global __cuDriverGetVersion + * cuPythonInit() + * if __cuDriverGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDriverGetVersion" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2810 + * cuPythonInit() + * if __cuDriverGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDriverGetVersion" not found') + * err = ( __cuDriverGetVersion)(driverVersion) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2811 + * if __cuDriverGetVersion == NULL: + * with gil: + * raise RuntimeError('Function "cuDriverGetVersion" not found') # <<<<<<<<<<<<<< + * err = ( __cuDriverGetVersion)(driverVersion) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDriverGetVersion_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2811, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2810 + * cuPythonInit() + * if __cuDriverGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDriverGetVersion" not found') + * err = ( __cuDriverGetVersion)(driverVersion) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2809 + * global __cuDriverGetVersion + * cuPythonInit() + * if __cuDriverGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDriverGetVersion" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2812 + * with gil: + * raise RuntimeError('Function "cuDriverGetVersion" not found') + * err = ( __cuDriverGetVersion)(driverVersion) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion)(__pyx_v_driverVersion); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2812, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2813 + * raise RuntimeError('Function "cuDriverGetVersion" not found') + * err = ( __cuDriverGetVersion)(driverVersion) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2806 + * return err + * + * cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDriverGetVersion + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2815 + * return err + * + * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGet + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGet(CUdevice *__pyx_v_device, int __pyx_v_ordinal) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGet", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2817 + * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGet + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGet == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2817, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2818 + * global __cuDeviceGet + * cuPythonInit() + * if __cuDeviceGet == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGet" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2819 + * cuPythonInit() + * if __cuDeviceGet == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGet" not found') + * err = ( __cuDeviceGet)(device, ordinal) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2820 + * if __cuDeviceGet == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGet" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGet)(device, ordinal) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGet_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2820, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2819 + * cuPythonInit() + * if __cuDeviceGet == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGet" not found') + * err = ( __cuDeviceGet)(device, ordinal) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2818 + * global __cuDeviceGet + * cuPythonInit() + * if __cuDeviceGet == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGet" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2821 + * with gil: + * raise RuntimeError('Function "cuDeviceGet" not found') + * err = ( __cuDeviceGet)(device, ordinal) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice *, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet)(__pyx_v_device, __pyx_v_ordinal); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2821, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2822 + * raise RuntimeError('Function "cuDeviceGet" not found') + * err = ( __cuDeviceGet)(device, ordinal) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2815 + * return err + * + * cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGet + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2824 + * return err + * + * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetCount + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetCount(int *__pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetCount", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2826 + * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetCount + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetCount == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2826, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2827 + * global __cuDeviceGetCount + * cuPythonInit() + * if __cuDeviceGetCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetCount" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2828 + * cuPythonInit() + * if __cuDeviceGetCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetCount" not found') + * err = ( __cuDeviceGetCount)(count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2829 + * if __cuDeviceGetCount == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetCount" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetCount)(count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetCount_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2829, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2829, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2828 + * cuPythonInit() + * if __cuDeviceGetCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetCount" not found') + * err = ( __cuDeviceGetCount)(count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2827 + * global __cuDeviceGetCount + * cuPythonInit() + * if __cuDeviceGetCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetCount" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2830 + * with gil: + * raise RuntimeError('Function "cuDeviceGetCount" not found') + * err = ( __cuDeviceGetCount)(count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount)(__pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2830, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2831 + * raise RuntimeError('Function "cuDeviceGetCount" not found') + * err = ( __cuDeviceGetCount)(count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2824 + * return err + * + * cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetCount + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2833 + * return err + * + * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetName + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetName(char *__pyx_v_name, int __pyx_v_length, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetName", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2835 + * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetName + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetName == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2835, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2836 + * global __cuDeviceGetName + * cuPythonInit() + * if __cuDeviceGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetName" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2837 + * cuPythonInit() + * if __cuDeviceGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetName" not found') + * err = ( __cuDeviceGetName)(name, length, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2838 + * if __cuDeviceGetName == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetName" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetName)(name, length, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetName_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2838, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2838, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2837 + * cuPythonInit() + * if __cuDeviceGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetName" not found') + * err = ( __cuDeviceGetName)(name, length, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2836 + * global __cuDeviceGetName + * cuPythonInit() + * if __cuDeviceGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetName" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2839 + * with gil: + * raise RuntimeError('Function "cuDeviceGetName" not found') + * err = ( __cuDeviceGetName)(name, length, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char *, int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName)(__pyx_v_name, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2839, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2840 + * raise RuntimeError('Function "cuDeviceGetName" not found') + * err = ( __cuDeviceGetName)(name, length, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2833 + * return err + * + * cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetName + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2842 + * return err + * + * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetUuid", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2844 + * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetUuid + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetUuid == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2844, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2845 + * global __cuDeviceGetUuid + * cuPythonInit() + * if __cuDeviceGetUuid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2846 + * cuPythonInit() + * if __cuDeviceGetUuid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetUuid" not found') + * err = ( __cuDeviceGetUuid)(uuid, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2847 + * if __cuDeviceGetUuid == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetUuid)(uuid, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetUuid_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2847, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2846 + * cuPythonInit() + * if __cuDeviceGetUuid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetUuid" not found') + * err = ( __cuDeviceGetUuid)(uuid, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2845 + * global __cuDeviceGetUuid + * cuPythonInit() + * if __cuDeviceGetUuid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2848 + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid" not found') + * err = ( __cuDeviceGetUuid)(uuid, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUuuid *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid)(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2848, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2849 + * raise RuntimeError('Function "cuDeviceGetUuid" not found') + * err = ( __cuDeviceGetUuid)(uuid, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2842 + * return err + * + * cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetUuid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2851 + * return err + * + * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid_v2(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetUuid_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2853 + * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetUuid_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetUuid_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2853, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2854 + * global __cuDeviceGetUuid_v2 + * cuPythonInit() + * if __cuDeviceGetUuid_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2855 + * cuPythonInit() + * if __cuDeviceGetUuid_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') + * err = ( __cuDeviceGetUuid_v2)(uuid, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2856 + * if __cuDeviceGetUuid_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetUuid_v2)(uuid, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetUuid_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2856, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2856, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2855 + * cuPythonInit() + * if __cuDeviceGetUuid_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') + * err = ( __cuDeviceGetUuid_v2)(uuid, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2854 + * global __cuDeviceGetUuid_v2 + * cuPythonInit() + * if __cuDeviceGetUuid_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2857 + * with gil: + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') + * err = ( __cuDeviceGetUuid_v2)(uuid, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUuuid *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2)(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2857, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2858 + * raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') + * err = ( __cuDeviceGetUuid_v2)(uuid, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2851 + * return err + * + * cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetUuid_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2860 + * return err + * + * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetLuid + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetLuid(char *__pyx_v_luid, unsigned int *__pyx_v_deviceNodeMask, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetLuid", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2862 + * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetLuid + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetLuid == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2862, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2863 + * global __cuDeviceGetLuid + * cuPythonInit() + * if __cuDeviceGetLuid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetLuid" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2864 + * cuPythonInit() + * if __cuDeviceGetLuid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetLuid" not found') + * err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2865 + * if __cuDeviceGetLuid == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetLuid" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetLuid_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2865, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2864 + * cuPythonInit() + * if __cuDeviceGetLuid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetLuid" not found') + * err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2863 + * global __cuDeviceGetLuid + * cuPythonInit() + * if __cuDeviceGetLuid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetLuid" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2866 + * with gil: + * raise RuntimeError('Function "cuDeviceGetLuid" not found') + * err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char *, unsigned int *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid)(__pyx_v_luid, __pyx_v_deviceNodeMask, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2866, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2867 + * raise RuntimeError('Function "cuDeviceGetLuid" not found') + * err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2860 + * return err + * + * cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetLuid + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetLuid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2869 + * return err + * + * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceTotalMem_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceTotalMem_v2(size_t *__pyx_v_numbytes, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceTotalMem_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2871 + * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceTotalMem_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceTotalMem_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2871, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2872 + * global __cuDeviceTotalMem_v2 + * cuPythonInit() + * if __cuDeviceTotalMem_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2873 + * cuPythonInit() + * if __cuDeviceTotalMem_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') + * err = ( __cuDeviceTotalMem_v2)(numbytes, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2874 + * if __cuDeviceTotalMem_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceTotalMem_v2)(numbytes, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceTotalMem_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2874, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2874, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2873 + * cuPythonInit() + * if __cuDeviceTotalMem_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') + * err = ( __cuDeviceTotalMem_v2)(numbytes, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2872 + * global __cuDeviceTotalMem_v2 + * cuPythonInit() + * if __cuDeviceTotalMem_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2875 + * with gil: + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') + * err = ( __cuDeviceTotalMem_v2)(numbytes, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2)(__pyx_v_numbytes, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2875, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2876 + * raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') + * err = ( __cuDeviceTotalMem_v2)(numbytes, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2869 + * return err + * + * cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceTotalMem_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceTotalMem_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2878 + * return err + * + * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetTexture1DLinearMaxWidth + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, CUarray_format __pyx_v_pformat, unsigned int __pyx_v_numChannels, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetTexture1DLinearMaxWidth", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2880 + * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetTexture1DLinearMaxWidth + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2880, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2881 + * global __cuDeviceGetTexture1DLinearMaxWidth + * cuPythonInit() + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2882 + * cuPythonInit() + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') + * err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2883 + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetTexture1DLin}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2883, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2882 + * cuPythonInit() + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') + * err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2881 + * global __cuDeviceGetTexture1DLinearMaxWidth + * cuPythonInit() + * if __cuDeviceGetTexture1DLinearMaxWidth == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2884 + * with gil: + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') + * err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUarray_format, unsigned int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth)(__pyx_v_maxWidthInElements, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2884, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2885 + * raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') + * err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2878 + * return err + * + * cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetTexture1DLinearMaxWidth + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2887 + * return err + * + * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetAttribute(int *__pyx_v_pi, CUdevice_attribute __pyx_v_attrib, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2889 + * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2889, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2890 + * global __cuDeviceGetAttribute + * cuPythonInit() + * if __cuDeviceGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2891 + * cuPythonInit() + * if __cuDeviceGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') + * err = ( __cuDeviceGetAttribute)(pi, attrib, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2892 + * if __cuDeviceGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetAttribute)(pi, attrib, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetAttribute_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2892, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2892, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2891 + * cuPythonInit() + * if __cuDeviceGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') + * err = ( __cuDeviceGetAttribute)(pi, attrib, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2890 + * global __cuDeviceGetAttribute + * cuPythonInit() + * if __cuDeviceGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2893 + * with gil: + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') + * err = ( __cuDeviceGetAttribute)(pi, attrib, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUdevice_attribute, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2893, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2894 + * raise RuntimeError('Function "cuDeviceGetAttribute" not found') + * err = ( __cuDeviceGetAttribute)(pi, attrib, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2887 + * return err + * + * cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2896 + * return err + * + * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetNvSciSyncAttributes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, CUdevice __pyx_v_dev, int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetNvSciSyncAttributes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2898 + * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetNvSciSyncAttributes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetNvSciSyncAttributes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2898, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2899 + * global __cuDeviceGetNvSciSyncAttributes + * cuPythonInit() + * if __cuDeviceGetNvSciSyncAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2900 + * cuPythonInit() + * if __cuDeviceGetNvSciSyncAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') + * err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2901 + * if __cuDeviceGetNvSciSyncAttributes == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2901, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2901, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2900 + * cuPythonInit() + * if __cuDeviceGetNvSciSyncAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') + * err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2899 + * global __cuDeviceGetNvSciSyncAttributes + * cuPythonInit() + * if __cuDeviceGetNvSciSyncAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2902 + * with gil: + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') + * err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUdevice, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes)(__pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2902, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2903 + * raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') + * err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2896 + * return err + * + * cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetNvSciSyncAttributes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2905 + * return err + * + * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceSetMemPool + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetMemPool(CUdevice __pyx_v_dev, CUmemoryPool __pyx_v_pool) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceSetMemPool", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2907 + * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceSetMemPool + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceSetMemPool == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2907, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2908 + * global __cuDeviceSetMemPool + * cuPythonInit() + * if __cuDeviceSetMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2909 + * cuPythonInit() + * if __cuDeviceSetMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') + * err = ( __cuDeviceSetMemPool)(dev, pool) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2910 + * if __cuDeviceSetMemPool == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceSetMemPool)(dev, pool) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceSetMemPool_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2910, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2910, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2909 + * cuPythonInit() + * if __cuDeviceSetMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') + * err = ( __cuDeviceSetMemPool)(dev, pool) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2908 + * global __cuDeviceSetMemPool + * cuPythonInit() + * if __cuDeviceSetMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2911 + * with gil: + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') + * err = ( __cuDeviceSetMemPool)(dev, pool) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUmemoryPool))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool)(__pyx_v_dev, __pyx_v_pool); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2911, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2912 + * raise RuntimeError('Function "cuDeviceSetMemPool" not found') + * err = ( __cuDeviceSetMemPool)(dev, pool) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2905 + * return err + * + * cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceSetMemPool + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2914 + * return err + * + * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetMemPool + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetMemPool(CUmemoryPool *__pyx_v_pool, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetMemPool", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2916 + * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetMemPool + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetMemPool == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2916, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2917 + * global __cuDeviceGetMemPool + * cuPythonInit() + * if __cuDeviceGetMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2918 + * cuPythonInit() + * if __cuDeviceGetMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') + * err = ( __cuDeviceGetMemPool)(pool, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2919 + * if __cuDeviceGetMemPool == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetMemPool)(pool, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetMemPool_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2919, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2919, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2918 + * cuPythonInit() + * if __cuDeviceGetMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') + * err = ( __cuDeviceGetMemPool)(pool, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2917 + * global __cuDeviceGetMemPool + * cuPythonInit() + * if __cuDeviceGetMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2920 + * with gil: + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') + * err = ( __cuDeviceGetMemPool)(pool, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool)(__pyx_v_pool, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2920, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2921 + * raise RuntimeError('Function "cuDeviceGetMemPool" not found') + * err = ( __cuDeviceGetMemPool)(pool, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2914 + * return err + * + * cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetMemPool + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2923 + * return err + * + * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetDefaultMemPool + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDefaultMemPool(CUmemoryPool *__pyx_v_pool_out, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetDefaultMemPool", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2925 + * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetDefaultMemPool + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetDefaultMemPool == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2925, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2926 + * global __cuDeviceGetDefaultMemPool + * cuPythonInit() + * if __cuDeviceGetDefaultMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2927 + * cuPythonInit() + * if __cuDeviceGetDefaultMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') + * err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2928 + * if __cuDeviceGetDefaultMemPool == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetDefaultMemPo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2928, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2928, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2927 + * cuPythonInit() + * if __cuDeviceGetDefaultMemPool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') + * err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2926 + * global __cuDeviceGetDefaultMemPool + * cuPythonInit() + * if __cuDeviceGetDefaultMemPool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2929 + * with gil: + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') + * err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool)(__pyx_v_pool_out, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2929, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2930 + * raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') + * err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2923 + * return err + * + * cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetDefaultMemPool + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2932 + * return err + * + * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetExecAffinitySupport + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetExecAffinitySupport(int *__pyx_v_pi, CUexecAffinityType __pyx_v_typename, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetExecAffinitySupport", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2934 + * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetExecAffinitySupport + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetExecAffinitySupport == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2934, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2935 + * global __cuDeviceGetExecAffinitySupport + * cuPythonInit() + * if __cuDeviceGetExecAffinitySupport == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2936 + * cuPythonInit() + * if __cuDeviceGetExecAffinitySupport == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') + * err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2937 + * if __cuDeviceGetExecAffinitySupport == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetExecAffinity}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2937, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2937, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2936 + * cuPythonInit() + * if __cuDeviceGetExecAffinitySupport == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') + * err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2935 + * global __cuDeviceGetExecAffinitySupport + * cuPythonInit() + * if __cuDeviceGetExecAffinitySupport == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2938 + * with gil: + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') + * err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUexecAffinityType, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport)(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2938, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2939 + * raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') + * err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2932 + * return err + * + * cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetExecAffinitySupport + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2941 + * return err + * + * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFlushGPUDirectRDMAWrites + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget __pyx_v_target, CUflushGPUDirectRDMAWritesScope __pyx_v_scope) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFlushGPUDirectRDMAWrites", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2943 + * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFlushGPUDirectRDMAWrites + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFlushGPUDirectRDMAWrites == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2943, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2944 + * global __cuFlushGPUDirectRDMAWrites + * cuPythonInit() + * if __cuFlushGPUDirectRDMAWrites == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2945 + * cuPythonInit() + * if __cuFlushGPUDirectRDMAWrites == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') + * err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2946 + * if __cuFlushGPUDirectRDMAWrites == NULL: + * with gil: + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') # <<<<<<<<<<<<<< + * err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFlushGPUDirectRDMAWri}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2946, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2945 + * cuPythonInit() + * if __cuFlushGPUDirectRDMAWrites == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') + * err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2944 + * global __cuFlushGPUDirectRDMAWrites + * cuPythonInit() + * if __cuFlushGPUDirectRDMAWrites == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2947 + * with gil: + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') + * err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites)(__pyx_v_target, __pyx_v_scope); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2947, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2948 + * raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') + * err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2941 + * return err + * + * cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFlushGPUDirectRDMAWrites + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2950 + * return err + * + * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetProperties + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetProperties(CUdevprop *__pyx_v_prop, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetProperties", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2952 + * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetProperties + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetProperties == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2952, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2953 + * global __cuDeviceGetProperties + * cuPythonInit() + * if __cuDeviceGetProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetProperties" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2954 + * cuPythonInit() + * if __cuDeviceGetProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetProperties" not found') + * err = ( __cuDeviceGetProperties)(prop, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2955 + * if __cuDeviceGetProperties == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetProperties" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetProperties)(prop, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetProperties_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2955, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2955, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2954 + * cuPythonInit() + * if __cuDeviceGetProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetProperties" not found') + * err = ( __cuDeviceGetProperties)(prop, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2953 + * global __cuDeviceGetProperties + * cuPythonInit() + * if __cuDeviceGetProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetProperties" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2956 + * with gil: + * raise RuntimeError('Function "cuDeviceGetProperties" not found') + * err = ( __cuDeviceGetProperties)(prop, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevprop *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties)(__pyx_v_prop, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2956, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2957 + * raise RuntimeError('Function "cuDeviceGetProperties" not found') + * err = ( __cuDeviceGetProperties)(prop, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2950 + * return err + * + * cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetProperties + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2959 + * return err + * + * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceComputeCapability + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceComputeCapability(int *__pyx_v_major, int *__pyx_v_minor, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceComputeCapability", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2961 + * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceComputeCapability + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceComputeCapability == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2961, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2962 + * global __cuDeviceComputeCapability + * cuPythonInit() + * if __cuDeviceComputeCapability == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2963 + * cuPythonInit() + * if __cuDeviceComputeCapability == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') + * err = ( __cuDeviceComputeCapability)(major, minor, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2964 + * if __cuDeviceComputeCapability == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceComputeCapability)(major, minor, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceComputeCapabili}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2964, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2964, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2963 + * cuPythonInit() + * if __cuDeviceComputeCapability == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') + * err = ( __cuDeviceComputeCapability)(major, minor, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2962 + * global __cuDeviceComputeCapability + * cuPythonInit() + * if __cuDeviceComputeCapability == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2965 + * with gil: + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') + * err = ( __cuDeviceComputeCapability)(major, minor, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, int *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability)(__pyx_v_major, __pyx_v_minor, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2965, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2966 + * raise RuntimeError('Function "cuDeviceComputeCapability" not found') + * err = ( __cuDeviceComputeCapability)(major, minor, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2959 + * return err + * + * cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceComputeCapability + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceComputeCapability", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2968 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRetain + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRetain(CUcontext *__pyx_v_pctx, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxRetain", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2970 + * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevicePrimaryCtxRetain + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevicePrimaryCtxRetain == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2970, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2971 + * global __cuDevicePrimaryCtxRetain + * cuPythonInit() + * if __cuDevicePrimaryCtxRetain == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2972 + * cuPythonInit() + * if __cuDevicePrimaryCtxRetain == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') + * err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2973 + * if __cuDevicePrimaryCtxRetain == NULL: + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevicePrimaryCtxRetai}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2973, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2973, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2972 + * cuPythonInit() + * if __cuDevicePrimaryCtxRetain == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') + * err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2971 + * global __cuDevicePrimaryCtxRetain + * cuPythonInit() + * if __cuDevicePrimaryCtxRetain == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2974 + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') + * err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain)(__pyx_v_pctx, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2974, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2975 + * raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') + * err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2968 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRetain + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevicePrimaryCtxRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2977 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRelease_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRelease_v2(CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxRelease_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2979 + * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevicePrimaryCtxRelease_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevicePrimaryCtxRelease_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2979, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2980 + * global __cuDevicePrimaryCtxRelease_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxRelease_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2981 + * cuPythonInit() + * if __cuDevicePrimaryCtxRelease_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') + * err = ( __cuDevicePrimaryCtxRelease_v2)(dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2982 + * if __cuDevicePrimaryCtxRelease_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevicePrimaryCtxRelease_v2)(dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevicePrimaryCtxRelea}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2982, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2982, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2981 + * cuPythonInit() + * if __cuDevicePrimaryCtxRelease_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') + * err = ( __cuDevicePrimaryCtxRelease_v2)(dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2980 + * global __cuDevicePrimaryCtxRelease_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxRelease_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2983 + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') + * err = ( __cuDevicePrimaryCtxRelease_v2)(dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2)(__pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2983, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2984 + * raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') + * err = ( __cuDevicePrimaryCtxRelease_v2)(dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2977 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRelease_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevicePrimaryCtxRelease_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2986 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxSetFlags_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxSetFlags_v2(CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxSetFlags_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2988 + * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevicePrimaryCtxSetFlags_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2988, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2989 + * global __cuDevicePrimaryCtxSetFlags_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2990 + * cuPythonInit() + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') + * err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":2991 + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevicePrimaryCtxSetFl}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2991, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 2991, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2990 + * cuPythonInit() + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') + * err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2989 + * global __cuDevicePrimaryCtxSetFlags_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxSetFlags_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2992 + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') + * err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2)(__pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 2992, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":2993 + * raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') + * err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2986 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxSetFlags_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevicePrimaryCtxSetFlags_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":2995 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxGetState + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxGetState(CUdevice __pyx_v_dev, unsigned int *__pyx_v_flags, int *__pyx_v_active) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxGetState", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":2997 + * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevicePrimaryCtxGetState + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevicePrimaryCtxGetState == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2997, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":2998 + * global __cuDevicePrimaryCtxGetState + * cuPythonInit() + * if __cuDevicePrimaryCtxGetState == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":2999 + * cuPythonInit() + * if __cuDevicePrimaryCtxGetState == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') + * err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3000 + * if __cuDevicePrimaryCtxGetState == NULL: + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevicePrimaryCtxGetSt}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3000, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2999 + * cuPythonInit() + * if __cuDevicePrimaryCtxGetState == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') + * err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":2998 + * global __cuDevicePrimaryCtxGetState + * cuPythonInit() + * if __cuDevicePrimaryCtxGetState == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3001 + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') + * err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, unsigned int *, int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState)(__pyx_v_dev, __pyx_v_flags, __pyx_v_active); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3001, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3002 + * raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') + * err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":2995 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxGetState + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevicePrimaryCtxGetState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3004 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxReset_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxReset_v2(CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevicePrimaryCtxReset_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3006 + * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevicePrimaryCtxReset_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevicePrimaryCtxReset_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3006, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3007 + * global __cuDevicePrimaryCtxReset_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxReset_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3008 + * cuPythonInit() + * if __cuDevicePrimaryCtxReset_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') + * err = ( __cuDevicePrimaryCtxReset_v2)(dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3009 + * if __cuDevicePrimaryCtxReset_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevicePrimaryCtxReset_v2)(dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevicePrimaryCtxReset}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3009, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3009, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3008 + * cuPythonInit() + * if __cuDevicePrimaryCtxReset_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') + * err = ( __cuDevicePrimaryCtxReset_v2)(dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3007 + * global __cuDevicePrimaryCtxReset_v2 + * cuPythonInit() + * if __cuDevicePrimaryCtxReset_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3010 + * with gil: + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') + * err = ( __cuDevicePrimaryCtxReset_v2)(dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2)(__pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3010, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3011 + * raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') + * err = ( __cuDevicePrimaryCtxReset_v2)(dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3004 + * return err + * + * cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxReset_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevicePrimaryCtxReset_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3013 + * return err + * + * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v2(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxCreate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3015 + * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxCreate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxCreate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3015, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3016 + * global __cuCtxCreate_v2 + * cuPythonInit() + * if __cuCtxCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3017 + * cuPythonInit() + * if __cuCtxCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v2" not found') + * err = ( __cuCtxCreate_v2)(pctx, flags, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3018 + * if __cuCtxCreate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxCreate_v2)(pctx, flags, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxCreate_v2_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3018, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3017 + * cuPythonInit() + * if __cuCtxCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v2" not found') + * err = ( __cuCtxCreate_v2)(pctx, flags, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3016 + * global __cuCtxCreate_v2 + * cuPythonInit() + * if __cuCtxCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3019 + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v2" not found') + * err = ( __cuCtxCreate_v2)(pctx, flags, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, unsigned int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2)(__pyx_v_pctx, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3019, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3020 + * raise RuntimeError('Function "cuCtxCreate_v2" not found') + * err = ( __cuCtxCreate_v2)(pctx, flags, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3013 + * return err + * + * cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3022 + * return err + * + * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v3 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v3(CUcontext *__pyx_v_pctx, CUexecAffinityParam *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxCreate_v3", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3024 + * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxCreate_v3 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxCreate_v3 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3024, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3025 + * global __cuCtxCreate_v3 + * cuPythonInit() + * if __cuCtxCreate_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v3" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3026 + * cuPythonInit() + * if __cuCtxCreate_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v3" not found') + * err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3027 + * if __cuCtxCreate_v3 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v3" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxCreate_v3_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3027, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3027, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3026 + * cuPythonInit() + * if __cuCtxCreate_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v3" not found') + * err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3025 + * global __cuCtxCreate_v3 + * cuPythonInit() + * if __cuCtxCreate_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v3" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3028 + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v3" not found') + * err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3)(__pyx_v_pctx, __pyx_v_paramsArray, __pyx_v_numParams, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3028, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3029 + * raise RuntimeError('Function "cuCtxCreate_v3" not found') + * err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3022 + * return err + * + * cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v3 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3031 + * return err + * + * cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v4 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v4(CUcontext *__pyx_v_pctx, CUctxCreateParams *__pyx_v_ctxCreateParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxCreate_v4", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3033 + * cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxCreate_v4 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxCreate_v4 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3033, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3034 + * global __cuCtxCreate_v4 + * cuPythonInit() + * if __cuCtxCreate_v4 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v4" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3035 + * cuPythonInit() + * if __cuCtxCreate_v4 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v4" not found') + * err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3036 + * if __cuCtxCreate_v4 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v4" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxCreate_v4_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3036, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3035 + * cuPythonInit() + * if __cuCtxCreate_v4 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxCreate_v4" not found') + * err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3034 + * global __cuCtxCreate_v4 + * cuPythonInit() + * if __cuCtxCreate_v4 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v4" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3037 + * with gil: + * raise RuntimeError('Function "cuCtxCreate_v4" not found') + * err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, CUctxCreateParams *, unsigned int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4)(__pyx_v_pctx, __pyx_v_ctxCreateParams, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3037, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3038 + * raise RuntimeError('Function "cuCtxCreate_v4" not found') + * err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3031 + * return err + * + * cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxCreate_v4 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxCreate_v4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3040 + * return err + * + * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDestroy_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDestroy_v2(CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxDestroy_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3042 + * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxDestroy_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxDestroy_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3042, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3043 + * global __cuCtxDestroy_v2 + * cuPythonInit() + * if __cuCtxDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3044 + * cuPythonInit() + * if __cuCtxDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') + * err = ( __cuCtxDestroy_v2)(ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3045 + * if __cuCtxDestroy_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxDestroy_v2)(ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxDestroy_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3045, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3045, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3044 + * cuPythonInit() + * if __cuCtxDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') + * err = ( __cuCtxDestroy_v2)(ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3043 + * global __cuCtxDestroy_v2 + * cuPythonInit() + * if __cuCtxDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3046 + * with gil: + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') + * err = ( __cuCtxDestroy_v2)(ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2)(__pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3047 + * raise RuntimeError('Function "cuCtxDestroy_v2" not found') + * err = ( __cuCtxDestroy_v2)(ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3040 + * return err + * + * cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDestroy_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3049 + * return err + * + * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxPushCurrent_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPushCurrent_v2(CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxPushCurrent_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3051 + * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxPushCurrent_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxPushCurrent_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3051, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3052 + * global __cuCtxPushCurrent_v2 + * cuPythonInit() + * if __cuCtxPushCurrent_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3053 + * cuPythonInit() + * if __cuCtxPushCurrent_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') + * err = ( __cuCtxPushCurrent_v2)(ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3054 + * if __cuCtxPushCurrent_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxPushCurrent_v2)(ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxPushCurrent_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3054, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3053 + * cuPythonInit() + * if __cuCtxPushCurrent_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') + * err = ( __cuCtxPushCurrent_v2)(ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3052 + * global __cuCtxPushCurrent_v2 + * cuPythonInit() + * if __cuCtxPushCurrent_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3055 + * with gil: + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') + * err = ( __cuCtxPushCurrent_v2)(ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2)(__pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3055, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3056 + * raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') + * err = ( __cuCtxPushCurrent_v2)(ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3049 + * return err + * + * cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxPushCurrent_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxPushCurrent_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3058 + * return err + * + * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxPopCurrent_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPopCurrent_v2(CUcontext *__pyx_v_pctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxPopCurrent_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3060 + * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxPopCurrent_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxPopCurrent_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3060, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3061 + * global __cuCtxPopCurrent_v2 + * cuPythonInit() + * if __cuCtxPopCurrent_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3062 + * cuPythonInit() + * if __cuCtxPopCurrent_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') + * err = ( __cuCtxPopCurrent_v2)(pctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3063 + * if __cuCtxPopCurrent_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxPopCurrent_v2)(pctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxPopCurrent_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3063, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3063, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3062 + * cuPythonInit() + * if __cuCtxPopCurrent_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') + * err = ( __cuCtxPopCurrent_v2)(pctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3061 + * global __cuCtxPopCurrent_v2 + * cuPythonInit() + * if __cuCtxPopCurrent_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3064 + * with gil: + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') + * err = ( __cuCtxPopCurrent_v2)(pctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2)(__pyx_v_pctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3064, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3065 + * raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') + * err = ( __cuCtxPopCurrent_v2)(pctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3058 + * return err + * + * cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxPopCurrent_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxPopCurrent_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3067 + * return err + * + * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetCurrent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCurrent(CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSetCurrent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3069 + * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSetCurrent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSetCurrent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3069, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3070 + * global __cuCtxSetCurrent + * cuPythonInit() + * if __cuCtxSetCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetCurrent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3071 + * cuPythonInit() + * if __cuCtxSetCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetCurrent" not found') + * err = ( __cuCtxSetCurrent)(ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3072 + * if __cuCtxSetCurrent == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSetCurrent" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSetCurrent)(ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSetCurrent_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3072, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3072, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3071 + * cuPythonInit() + * if __cuCtxSetCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetCurrent" not found') + * err = ( __cuCtxSetCurrent)(ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3070 + * global __cuCtxSetCurrent + * cuPythonInit() + * if __cuCtxSetCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetCurrent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3073 + * with gil: + * raise RuntimeError('Function "cuCtxSetCurrent" not found') + * err = ( __cuCtxSetCurrent)(ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent)(__pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3073, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3074 + * raise RuntimeError('Function "cuCtxSetCurrent" not found') + * err = ( __cuCtxSetCurrent)(ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3067 + * return err + * + * cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetCurrent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3076 + * return err + * + * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetCurrent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCurrent(CUcontext *__pyx_v_pctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetCurrent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3078 + * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetCurrent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetCurrent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3078, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3079 + * global __cuCtxGetCurrent + * cuPythonInit() + * if __cuCtxGetCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetCurrent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3080 + * cuPythonInit() + * if __cuCtxGetCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetCurrent" not found') + * err = ( __cuCtxGetCurrent)(pctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3081 + * if __cuCtxGetCurrent == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetCurrent" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetCurrent)(pctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetCurrent_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3081, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3081, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3080 + * cuPythonInit() + * if __cuCtxGetCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetCurrent" not found') + * err = ( __cuCtxGetCurrent)(pctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3079 + * global __cuCtxGetCurrent + * cuPythonInit() + * if __cuCtxGetCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetCurrent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3082 + * with gil: + * raise RuntimeError('Function "cuCtxGetCurrent" not found') + * err = ( __cuCtxGetCurrent)(pctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent)(__pyx_v_pctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3082, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3083 + * raise RuntimeError('Function "cuCtxGetCurrent" not found') + * err = ( __cuCtxGetCurrent)(pctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3076 + * return err + * + * cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetCurrent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3085 + * return err + * + * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetDevice + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevice(CUdevice *__pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetDevice", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3087 + * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetDevice + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetDevice == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3087, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3088 + * global __cuCtxGetDevice + * cuPythonInit() + * if __cuCtxGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetDevice" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3089 + * cuPythonInit() + * if __cuCtxGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetDevice" not found') + * err = ( __cuCtxGetDevice)(device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3090 + * if __cuCtxGetDevice == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetDevice" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetDevice)(device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetDevice_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3090, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3090, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3089 + * cuPythonInit() + * if __cuCtxGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetDevice" not found') + * err = ( __cuCtxGetDevice)(device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3088 + * global __cuCtxGetDevice + * cuPythonInit() + * if __cuCtxGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetDevice" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3091 + * with gil: + * raise RuntimeError('Function "cuCtxGetDevice" not found') + * err = ( __cuCtxGetDevice)(device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice)(__pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3091, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3092 + * raise RuntimeError('Function "cuCtxGetDevice" not found') + * err = ( __cuCtxGetDevice)(device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3085 + * return err + * + * cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetDevice + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3094 + * return err + * + * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetFlags(unsigned int *__pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3096 + * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3096, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3097 + * global __cuCtxGetFlags + * cuPythonInit() + * if __cuCtxGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3098 + * cuPythonInit() + * if __cuCtxGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetFlags" not found') + * err = ( __cuCtxGetFlags)(flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3099 + * if __cuCtxGetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetFlags)(flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetFlags_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3099, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3099, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3098 + * cuPythonInit() + * if __cuCtxGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetFlags" not found') + * err = ( __cuCtxGetFlags)(flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3097 + * global __cuCtxGetFlags + * cuPythonInit() + * if __cuCtxGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3100 + * with gil: + * raise RuntimeError('Function "cuCtxGetFlags" not found') + * err = ( __cuCtxGetFlags)(flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags)(__pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3100, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3101 + * raise RuntimeError('Function "cuCtxGetFlags" not found') + * err = ( __cuCtxGetFlags)(flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3094 + * return err + * + * cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3103 + * return err + * + * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetFlags(unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3105 + * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3105, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3106 + * global __cuCtxSetFlags + * cuPythonInit() + * if __cuCtxSetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3107 + * cuPythonInit() + * if __cuCtxSetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetFlags" not found') + * err = ( __cuCtxSetFlags)(flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3108 + * if __cuCtxSetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSetFlags)(flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSetFlags_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3108, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3107 + * cuPythonInit() + * if __cuCtxSetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetFlags" not found') + * err = ( __cuCtxSetFlags)(flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3106 + * global __cuCtxSetFlags + * cuPythonInit() + * if __cuCtxSetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3109 + * with gil: + * raise RuntimeError('Function "cuCtxSetFlags" not found') + * err = ( __cuCtxSetFlags)(flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags)(__pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3109, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3110 + * raise RuntimeError('Function "cuCtxSetFlags" not found') + * err = ( __cuCtxSetFlags)(flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3103 + * return err + * + * cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3112 + * return err + * + * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetId + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetId(CUcontext __pyx_v_ctx, unsigned PY_LONG_LONG *__pyx_v_ctxId) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetId", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3114 + * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetId + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetId == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3114, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3115 + * global __cuCtxGetId + * cuPythonInit() + * if __cuCtxGetId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetId" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3116 + * cuPythonInit() + * if __cuCtxGetId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetId" not found') + * err = ( __cuCtxGetId)(ctx, ctxId) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3117 + * if __cuCtxGetId == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetId" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetId)(ctx, ctxId) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetId_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3117, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3117, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3116 + * cuPythonInit() + * if __cuCtxGetId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetId" not found') + * err = ( __cuCtxGetId)(ctx, ctxId) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3115 + * global __cuCtxGetId + * cuPythonInit() + * if __cuCtxGetId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetId" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3118 + * with gil: + * raise RuntimeError('Function "cuCtxGetId" not found') + * err = ( __cuCtxGetId)(ctx, ctxId) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, unsigned PY_LONG_LONG *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId)(__pyx_v_ctx, __pyx_v_ctxId); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3118, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3119 + * raise RuntimeError('Function "cuCtxGetId" not found') + * err = ( __cuCtxGetId)(ctx, ctxId) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3112 + * return err + * + * cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetId + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3121 + * return err + * + * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSynchronize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSynchronize(void) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSynchronize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3123 + * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSynchronize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSynchronize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3123, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3124 + * global __cuCtxSynchronize + * cuPythonInit() + * if __cuCtxSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSynchronize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3125 + * cuPythonInit() + * if __cuCtxSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSynchronize" not found') + * err = ( __cuCtxSynchronize)() +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3126 + * if __cuCtxSynchronize == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSynchronize" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSynchronize)() + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSynchronize_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3126, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3126, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3125 + * cuPythonInit() + * if __cuCtxSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSynchronize" not found') + * err = ( __cuCtxSynchronize)() +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3124 + * global __cuCtxSynchronize + * cuPythonInit() + * if __cuCtxSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSynchronize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3127 + * with gil: + * raise RuntimeError('Function "cuCtxSynchronize" not found') + * err = ( __cuCtxSynchronize)() # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize)(); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3127, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3128 + * raise RuntimeError('Function "cuCtxSynchronize" not found') + * err = ( __cuCtxSynchronize)() + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3121 + * return err + * + * cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSynchronize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3130 + * return err + * + * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetLimit + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetLimit(CUlimit __pyx_v_limit, size_t __pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSetLimit", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3132 + * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSetLimit + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSetLimit == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3132, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3133 + * global __cuCtxSetLimit + * cuPythonInit() + * if __cuCtxSetLimit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetLimit" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3134 + * cuPythonInit() + * if __cuCtxSetLimit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetLimit" not found') + * err = ( __cuCtxSetLimit)(limit, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3135 + * if __cuCtxSetLimit == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSetLimit" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSetLimit)(limit, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSetLimit_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3135, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3135, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3134 + * cuPythonInit() + * if __cuCtxSetLimit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetLimit" not found') + * err = ( __cuCtxSetLimit)(limit, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3133 + * global __cuCtxSetLimit + * cuPythonInit() + * if __cuCtxSetLimit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetLimit" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3136 + * with gil: + * raise RuntimeError('Function "cuCtxSetLimit" not found') + * err = ( __cuCtxSetLimit)(limit, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlimit, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit)(__pyx_v_limit, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3137 + * raise RuntimeError('Function "cuCtxSetLimit" not found') + * err = ( __cuCtxSetLimit)(limit, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3130 + * return err + * + * cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetLimit + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3139 + * return err + * + * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetLimit + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetLimit(size_t *__pyx_v_pvalue, CUlimit __pyx_v_limit) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetLimit", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3141 + * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetLimit + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetLimit == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3141, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3142 + * global __cuCtxGetLimit + * cuPythonInit() + * if __cuCtxGetLimit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetLimit" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3143 + * cuPythonInit() + * if __cuCtxGetLimit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetLimit" not found') + * err = ( __cuCtxGetLimit)(pvalue, limit) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3144 + * if __cuCtxGetLimit == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetLimit" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetLimit)(pvalue, limit) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetLimit_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3144, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3143 + * cuPythonInit() + * if __cuCtxGetLimit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetLimit" not found') + * err = ( __cuCtxGetLimit)(pvalue, limit) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3142 + * global __cuCtxGetLimit + * cuPythonInit() + * if __cuCtxGetLimit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetLimit" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3145 + * with gil: + * raise RuntimeError('Function "cuCtxGetLimit" not found') + * err = ( __cuCtxGetLimit)(pvalue, limit) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUlimit))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit)(__pyx_v_pvalue, __pyx_v_limit); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3145, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3146 + * raise RuntimeError('Function "cuCtxGetLimit" not found') + * err = ( __cuCtxGetLimit)(pvalue, limit) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3139 + * return err + * + * cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetLimit + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3148 + * return err + * + * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetCacheConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCacheConfig(CUfunc_cache *__pyx_v_pconfig) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetCacheConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3150 + * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetCacheConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetCacheConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3150, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3151 + * global __cuCtxGetCacheConfig + * cuPythonInit() + * if __cuCtxGetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3152 + * cuPythonInit() + * if __cuCtxGetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') + * err = ( __cuCtxGetCacheConfig)(pconfig) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3153 + * if __cuCtxGetCacheConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetCacheConfig)(pconfig) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetCacheConfig_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3153, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3152 + * cuPythonInit() + * if __cuCtxGetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') + * err = ( __cuCtxGetCacheConfig)(pconfig) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3151 + * global __cuCtxGetCacheConfig + * cuPythonInit() + * if __cuCtxGetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3154 + * with gil: + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') + * err = ( __cuCtxGetCacheConfig)(pconfig) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunc_cache *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig)(__pyx_v_pconfig); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3154, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3155 + * raise RuntimeError('Function "cuCtxGetCacheConfig" not found') + * err = ( __cuCtxGetCacheConfig)(pconfig) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3148 + * return err + * + * cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetCacheConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3157 + * return err + * + * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetCacheConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCacheConfig(CUfunc_cache __pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSetCacheConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3159 + * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSetCacheConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSetCacheConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3159, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3160 + * global __cuCtxSetCacheConfig + * cuPythonInit() + * if __cuCtxSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3161 + * cuPythonInit() + * if __cuCtxSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') + * err = ( __cuCtxSetCacheConfig)(config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3162 + * if __cuCtxSetCacheConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSetCacheConfig)(config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSetCacheConfig_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3162, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3162, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3161 + * cuPythonInit() + * if __cuCtxSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') + * err = ( __cuCtxSetCacheConfig)(config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3160 + * global __cuCtxSetCacheConfig + * cuPythonInit() + * if __cuCtxSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3163 + * with gil: + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') + * err = ( __cuCtxSetCacheConfig)(config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunc_cache))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig)(__pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3163, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3164 + * raise RuntimeError('Function "cuCtxSetCacheConfig" not found') + * err = ( __cuCtxSetCacheConfig)(config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3157 + * return err + * + * cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetCacheConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3166 + * return err + * + * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetApiVersion + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetApiVersion(CUcontext __pyx_v_ctx, unsigned int *__pyx_v_version) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetApiVersion", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3168 + * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetApiVersion + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetApiVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3168, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3169 + * global __cuCtxGetApiVersion + * cuPythonInit() + * if __cuCtxGetApiVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3170 + * cuPythonInit() + * if __cuCtxGetApiVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') + * err = ( __cuCtxGetApiVersion)(ctx, version) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3171 + * if __cuCtxGetApiVersion == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetApiVersion)(ctx, version) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetApiVersion_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3171, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3170 + * cuPythonInit() + * if __cuCtxGetApiVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') + * err = ( __cuCtxGetApiVersion)(ctx, version) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3169 + * global __cuCtxGetApiVersion + * cuPythonInit() + * if __cuCtxGetApiVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3172 + * with gil: + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') + * err = ( __cuCtxGetApiVersion)(ctx, version) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, unsigned int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion)(__pyx_v_ctx, __pyx_v_version); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3172, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3173 + * raise RuntimeError('Function "cuCtxGetApiVersion" not found') + * err = ( __cuCtxGetApiVersion)(ctx, version) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3166 + * return err + * + * cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetApiVersion + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetApiVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3175 + * return err + * + * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetStreamPriorityRange + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetStreamPriorityRange", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3177 + * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetStreamPriorityRange + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetStreamPriorityRange == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3177, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3178 + * global __cuCtxGetStreamPriorityRange + * cuPythonInit() + * if __cuCtxGetStreamPriorityRange == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3179 + * cuPythonInit() + * if __cuCtxGetStreamPriorityRange == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') + * err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3180 + * if __cuCtxGetStreamPriorityRange == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetStreamPriorityR}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3180, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3179 + * cuPythonInit() + * if __cuCtxGetStreamPriorityRange == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') + * err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3178 + * global __cuCtxGetStreamPriorityRange + * cuPythonInit() + * if __cuCtxGetStreamPriorityRange == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3181 + * with gil: + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') + * err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange)(__pyx_v_leastPriority, __pyx_v_greatestPriority); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3181, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3182 + * raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') + * err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3175 + * return err + * + * cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetStreamPriorityRange + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3184 + * return err + * + * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxResetPersistingL2Cache + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxResetPersistingL2Cache(void) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxResetPersistingL2Cache", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3186 + * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxResetPersistingL2Cache + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxResetPersistingL2Cache == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3186, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3187 + * global __cuCtxResetPersistingL2Cache + * cuPythonInit() + * if __cuCtxResetPersistingL2Cache == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3188 + * cuPythonInit() + * if __cuCtxResetPersistingL2Cache == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') + * err = ( __cuCtxResetPersistingL2Cache)() +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3189 + * if __cuCtxResetPersistingL2Cache == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxResetPersistingL2Cache)() + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxResetPersistingL2C}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3189, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3188 + * cuPythonInit() + * if __cuCtxResetPersistingL2Cache == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') + * err = ( __cuCtxResetPersistingL2Cache)() +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3187 + * global __cuCtxResetPersistingL2Cache + * cuPythonInit() + * if __cuCtxResetPersistingL2Cache == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3190 + * with gil: + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') + * err = ( __cuCtxResetPersistingL2Cache)() # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache)(); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3190, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3191 + * raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') + * err = ( __cuCtxResetPersistingL2Cache)() + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3184 + * return err + * + * cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxResetPersistingL2Cache + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3193 + * return err + * + * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetExecAffinity + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetExecAffinity(CUexecAffinityParam *__pyx_v_pExecAffinity, CUexecAffinityType __pyx_v_typename) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetExecAffinity", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3195 + * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetExecAffinity + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetExecAffinity == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3195, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3196 + * global __cuCtxGetExecAffinity + * cuPythonInit() + * if __cuCtxGetExecAffinity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3197 + * cuPythonInit() + * if __cuCtxGetExecAffinity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') + * err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3198 + * if __cuCtxGetExecAffinity == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetExecAffinity_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3198, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3198, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3197 + * cuPythonInit() + * if __cuCtxGetExecAffinity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') + * err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3196 + * global __cuCtxGetExecAffinity + * cuPythonInit() + * if __cuCtxGetExecAffinity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3199 + * with gil: + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') + * err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexecAffinityParam *, CUexecAffinityType))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity)(__pyx_v_pExecAffinity, __pyx_v_typename); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3199, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3200 + * raise RuntimeError('Function "cuCtxGetExecAffinity" not found') + * err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3193 + * return err + * + * cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetExecAffinity + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetExecAffinity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3202 + * return err + * + * cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxRecordEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxRecordEvent(CUcontext __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxRecordEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3204 + * cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxRecordEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxRecordEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3204, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3205 + * global __cuCtxRecordEvent + * cuPythonInit() + * if __cuCtxRecordEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxRecordEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3206 + * cuPythonInit() + * if __cuCtxRecordEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxRecordEvent" not found') + * err = ( __cuCtxRecordEvent)(hCtx, hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3207 + * if __cuCtxRecordEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxRecordEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxRecordEvent)(hCtx, hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxRecordEvent_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3207, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3206 + * cuPythonInit() + * if __cuCtxRecordEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxRecordEvent" not found') + * err = ( __cuCtxRecordEvent)(hCtx, hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3205 + * global __cuCtxRecordEvent + * cuPythonInit() + * if __cuCtxRecordEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxRecordEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3208 + * with gil: + * raise RuntimeError('Function "cuCtxRecordEvent" not found') + * err = ( __cuCtxRecordEvent)(hCtx, hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent)(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3208, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3209 + * raise RuntimeError('Function "cuCtxRecordEvent" not found') + * err = ( __cuCtxRecordEvent)(hCtx, hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3202 + * return err + * + * cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxRecordEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxRecordEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3211 + * return err + * + * cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxWaitEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxWaitEvent(CUcontext __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxWaitEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3213 + * cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxWaitEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxWaitEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3213, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3214 + * global __cuCtxWaitEvent + * cuPythonInit() + * if __cuCtxWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxWaitEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3215 + * cuPythonInit() + * if __cuCtxWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxWaitEvent" not found') + * err = ( __cuCtxWaitEvent)(hCtx, hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3216 + * if __cuCtxWaitEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxWaitEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxWaitEvent)(hCtx, hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxWaitEvent_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3216, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3216, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3215 + * cuPythonInit() + * if __cuCtxWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxWaitEvent" not found') + * err = ( __cuCtxWaitEvent)(hCtx, hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3214 + * global __cuCtxWaitEvent + * cuPythonInit() + * if __cuCtxWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxWaitEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3217 + * with gil: + * raise RuntimeError('Function "cuCtxWaitEvent" not found') + * err = ( __cuCtxWaitEvent)(hCtx, hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent)(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3217, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3218 + * raise RuntimeError('Function "cuCtxWaitEvent" not found') + * err = ( __cuCtxWaitEvent)(hCtx, hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3211 + * return err + * + * cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxWaitEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3220 + * return err + * + * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxAttach + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxAttach(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxAttach", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3222 + * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxAttach + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxAttach == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3222, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3223 + * global __cuCtxAttach + * cuPythonInit() + * if __cuCtxAttach == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxAttach" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3224 + * cuPythonInit() + * if __cuCtxAttach == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxAttach" not found') + * err = ( __cuCtxAttach)(pctx, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3225 + * if __cuCtxAttach == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxAttach" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxAttach)(pctx, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxAttach_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3225, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3225, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3224 + * cuPythonInit() + * if __cuCtxAttach == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxAttach" not found') + * err = ( __cuCtxAttach)(pctx, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3223 + * global __cuCtxAttach + * cuPythonInit() + * if __cuCtxAttach == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxAttach" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3226 + * with gil: + * raise RuntimeError('Function "cuCtxAttach" not found') + * err = ( __cuCtxAttach)(pctx, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach)(__pyx_v_pctx, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3226, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3227 + * raise RuntimeError('Function "cuCtxAttach" not found') + * err = ( __cuCtxAttach)(pctx, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3220 + * return err + * + * cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxAttach + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3229 + * return err + * + * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDetach + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDetach(CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxDetach", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3231 + * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxDetach + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxDetach == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3231, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3232 + * global __cuCtxDetach + * cuPythonInit() + * if __cuCtxDetach == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDetach" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3233 + * cuPythonInit() + * if __cuCtxDetach == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDetach" not found') + * err = ( __cuCtxDetach)(ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3234 + * if __cuCtxDetach == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxDetach" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxDetach)(ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxDetach_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3234, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3234, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3233 + * cuPythonInit() + * if __cuCtxDetach == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDetach" not found') + * err = ( __cuCtxDetach)(ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3232 + * global __cuCtxDetach + * cuPythonInit() + * if __cuCtxDetach == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDetach" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3235 + * with gil: + * raise RuntimeError('Function "cuCtxDetach" not found') + * err = ( __cuCtxDetach)(ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach)(__pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3236 + * raise RuntimeError('Function "cuCtxDetach" not found') + * err = ( __cuCtxDetach)(ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3229 + * return err + * + * cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDetach + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxDetach", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3238 + * return err + * + * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetSharedMemConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetSharedMemConfig(CUsharedconfig *__pyx_v_pConfig) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetSharedMemConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3240 + * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetSharedMemConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetSharedMemConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3240, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3241 + * global __cuCtxGetSharedMemConfig + * cuPythonInit() + * if __cuCtxGetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3242 + * cuPythonInit() + * if __cuCtxGetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') + * err = ( __cuCtxGetSharedMemConfig)(pConfig) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3243 + * if __cuCtxGetSharedMemConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetSharedMemConfig)(pConfig) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetSharedMemConfig}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3243, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3242 + * cuPythonInit() + * if __cuCtxGetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') + * err = ( __cuCtxGetSharedMemConfig)(pConfig) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3241 + * global __cuCtxGetSharedMemConfig + * cuPythonInit() + * if __cuCtxGetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3244 + * with gil: + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') + * err = ( __cuCtxGetSharedMemConfig)(pConfig) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsharedconfig *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig)(__pyx_v_pConfig); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3244, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3245 + * raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') + * err = ( __cuCtxGetSharedMemConfig)(pConfig) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3238 + * return err + * + * cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetSharedMemConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3247 + * return err + * + * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetSharedMemConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetSharedMemConfig(CUsharedconfig __pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxSetSharedMemConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3249 + * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxSetSharedMemConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxSetSharedMemConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3249, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3250 + * global __cuCtxSetSharedMemConfig + * cuPythonInit() + * if __cuCtxSetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3251 + * cuPythonInit() + * if __cuCtxSetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') + * err = ( __cuCtxSetSharedMemConfig)(config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3252 + * if __cuCtxSetSharedMemConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxSetSharedMemConfig)(config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxSetSharedMemConfig}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3252, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3251 + * cuPythonInit() + * if __cuCtxSetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') + * err = ( __cuCtxSetSharedMemConfig)(config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3250 + * global __cuCtxSetSharedMemConfig + * cuPythonInit() + * if __cuCtxSetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3253 + * with gil: + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') + * err = ( __cuCtxSetSharedMemConfig)(config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsharedconfig))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig)(__pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3253, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3254 + * raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') + * err = ( __cuCtxSetSharedMemConfig)(config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3247 + * return err + * + * cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxSetSharedMemConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3256 + * return err + * + * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoad + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoad(CUmodule *__pyx_v_module, char const *__pyx_v_fname) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleLoad", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3258 + * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleLoad + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleLoad == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3258, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3259 + * global __cuModuleLoad + * cuPythonInit() + * if __cuModuleLoad == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoad" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3260 + * cuPythonInit() + * if __cuModuleLoad == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoad" not found') + * err = ( __cuModuleLoad)(module, fname) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3261 + * if __cuModuleLoad == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleLoad" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleLoad)(module, fname) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleLoad_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3261, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3261, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3260 + * cuPythonInit() + * if __cuModuleLoad == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoad" not found') + * err = ( __cuModuleLoad)(module, fname) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3259 + * global __cuModuleLoad + * cuPythonInit() + * if __cuModuleLoad == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoad" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3262 + * with gil: + * raise RuntimeError('Function "cuModuleLoad" not found') + * err = ( __cuModuleLoad)(module, fname) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad)(__pyx_v_module, __pyx_v_fname); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3262, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3263 + * raise RuntimeError('Function "cuModuleLoad" not found') + * err = ( __cuModuleLoad)(module, fname) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3256 + * return err + * + * cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoad + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3265 + * return err + * + * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadData + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadData(CUmodule *__pyx_v_module, void const *__pyx_v_image) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleLoadData", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3267 + * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleLoadData + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleLoadData == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3267, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3268 + * global __cuModuleLoadData + * cuPythonInit() + * if __cuModuleLoadData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadData" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3269 + * cuPythonInit() + * if __cuModuleLoadData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadData" not found') + * err = ( __cuModuleLoadData)(module, image) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3270 + * if __cuModuleLoadData == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleLoadData" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleLoadData)(module, image) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleLoadData_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3270, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3270, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3269 + * cuPythonInit() + * if __cuModuleLoadData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadData" not found') + * err = ( __cuModuleLoadData)(module, image) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3268 + * global __cuModuleLoadData + * cuPythonInit() + * if __cuModuleLoadData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadData" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3271 + * with gil: + * raise RuntimeError('Function "cuModuleLoadData" not found') + * err = ( __cuModuleLoadData)(module, image) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, void const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData)(__pyx_v_module, __pyx_v_image); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3271, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3272 + * raise RuntimeError('Function "cuModuleLoadData" not found') + * err = ( __cuModuleLoadData)(module, image) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3265 + * return err + * + * cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadData + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3274 + * return err + * + * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadDataEx + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadDataEx(CUmodule *__pyx_v_module, void const *__pyx_v_image, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleLoadDataEx", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3276 + * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleLoadDataEx + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleLoadDataEx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3276, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3277 + * global __cuModuleLoadDataEx + * cuPythonInit() + * if __cuModuleLoadDataEx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3278 + * cuPythonInit() + * if __cuModuleLoadDataEx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') + * err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3279 + * if __cuModuleLoadDataEx == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleLoadDataEx_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3279, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3279, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3278 + * cuPythonInit() + * if __cuModuleLoadDataEx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') + * err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3277 + * global __cuModuleLoadDataEx + * cuPythonInit() + * if __cuModuleLoadDataEx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3280 + * with gil: + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') + * err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, void const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx)(__pyx_v_module, __pyx_v_image, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3280, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3281 + * raise RuntimeError('Function "cuModuleLoadDataEx" not found') + * err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3274 + * return err + * + * cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadDataEx + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3283 + * return err + * + * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadFatBinary + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadFatBinary(CUmodule *__pyx_v_module, void const *__pyx_v_fatCubin) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleLoadFatBinary", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3285 + * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleLoadFatBinary + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleLoadFatBinary == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3285, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3286 + * global __cuModuleLoadFatBinary + * cuPythonInit() + * if __cuModuleLoadFatBinary == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3287 + * cuPythonInit() + * if __cuModuleLoadFatBinary == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') + * err = ( __cuModuleLoadFatBinary)(module, fatCubin) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3288 + * if __cuModuleLoadFatBinary == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleLoadFatBinary)(module, fatCubin) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleLoadFatBinary_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3288, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3288, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3287 + * cuPythonInit() + * if __cuModuleLoadFatBinary == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') + * err = ( __cuModuleLoadFatBinary)(module, fatCubin) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3286 + * global __cuModuleLoadFatBinary + * cuPythonInit() + * if __cuModuleLoadFatBinary == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3289 + * with gil: + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') + * err = ( __cuModuleLoadFatBinary)(module, fatCubin) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, void const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary)(__pyx_v_module, __pyx_v_fatCubin); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3289, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3290 + * raise RuntimeError('Function "cuModuleLoadFatBinary" not found') + * err = ( __cuModuleLoadFatBinary)(module, fatCubin) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3283 + * return err + * + * cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleLoadFatBinary + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleLoadFatBinary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3292 + * return err + * + * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleUnload + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleUnload(CUmodule __pyx_v_hmod) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleUnload", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3294 + * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleUnload + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleUnload == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3294, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3295 + * global __cuModuleUnload + * cuPythonInit() + * if __cuModuleUnload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleUnload" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3296 + * cuPythonInit() + * if __cuModuleUnload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleUnload" not found') + * err = ( __cuModuleUnload)(hmod) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3297 + * if __cuModuleUnload == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleUnload" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleUnload)(hmod) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleUnload_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3297, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3297, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3296 + * cuPythonInit() + * if __cuModuleUnload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleUnload" not found') + * err = ( __cuModuleUnload)(hmod) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3295 + * global __cuModuleUnload + * cuPythonInit() + * if __cuModuleUnload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleUnload" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3298 + * with gil: + * raise RuntimeError('Function "cuModuleUnload" not found') + * err = ( __cuModuleUnload)(hmod) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload)(__pyx_v_hmod); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3298, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3299 + * raise RuntimeError('Function "cuModuleUnload" not found') + * err = ( __cuModuleUnload)(hmod) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3292 + * return err + * + * cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleUnload + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3301 + * return err + * + * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetLoadingMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetLoadingMode(CUmoduleLoadingMode *__pyx_v_mode) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetLoadingMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3303 + * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetLoadingMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetLoadingMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3303, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3304 + * global __cuModuleGetLoadingMode + * cuPythonInit() + * if __cuModuleGetLoadingMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3305 + * cuPythonInit() + * if __cuModuleGetLoadingMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') + * err = ( __cuModuleGetLoadingMode)(mode) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3306 + * if __cuModuleGetLoadingMode == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetLoadingMode)(mode) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetLoadingMode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3306, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3306, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3305 + * cuPythonInit() + * if __cuModuleGetLoadingMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') + * err = ( __cuModuleGetLoadingMode)(mode) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3304 + * global __cuModuleGetLoadingMode + * cuPythonInit() + * if __cuModuleGetLoadingMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3307 + * with gil: + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') + * err = ( __cuModuleGetLoadingMode)(mode) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmoduleLoadingMode *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode)(__pyx_v_mode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3307, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3308 + * raise RuntimeError('Function "cuModuleGetLoadingMode" not found') + * err = ( __cuModuleGetLoadingMode)(mode) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3301 + * return err + * + * cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetLoadingMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetLoadingMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3310 + * return err + * + * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetFunction + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunction(CUfunction *__pyx_v_hfunc, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetFunction", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3312 + * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetFunction + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetFunction == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3312, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3313 + * global __cuModuleGetFunction + * cuPythonInit() + * if __cuModuleGetFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetFunction" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3314 + * cuPythonInit() + * if __cuModuleGetFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetFunction" not found') + * err = ( __cuModuleGetFunction)(hfunc, hmod, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3315 + * if __cuModuleGetFunction == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetFunction" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetFunction)(hfunc, hmod, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetFunction_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3315, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3314 + * cuPythonInit() + * if __cuModuleGetFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetFunction" not found') + * err = ( __cuModuleGetFunction)(hfunc, hmod, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3313 + * global __cuModuleGetFunction + * cuPythonInit() + * if __cuModuleGetFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetFunction" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3316 + * with gil: + * raise RuntimeError('Function "cuModuleGetFunction" not found') + * err = ( __cuModuleGetFunction)(hfunc, hmod, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction *, CUmodule, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction)(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3316, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3317 + * raise RuntimeError('Function "cuModuleGetFunction" not found') + * err = ( __cuModuleGetFunction)(hfunc, hmod, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3310 + * return err + * + * cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetFunction + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3319 + * return err + * + * cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetFunctionCount + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunctionCount(unsigned int *__pyx_v_count, CUmodule __pyx_v_mod) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetFunctionCount", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3321 + * cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetFunctionCount + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetFunctionCount == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3321, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3322 + * global __cuModuleGetFunctionCount + * cuPythonInit() + * if __cuModuleGetFunctionCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3323 + * cuPythonInit() + * if __cuModuleGetFunctionCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') + * err = ( __cuModuleGetFunctionCount)(count, mod) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3324 + * if __cuModuleGetFunctionCount == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetFunctionCount)(count, mod) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetFunctionCoun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3324, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3323 + * cuPythonInit() + * if __cuModuleGetFunctionCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') + * err = ( __cuModuleGetFunctionCount)(count, mod) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3322 + * global __cuModuleGetFunctionCount + * cuPythonInit() + * if __cuModuleGetFunctionCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3325 + * with gil: + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') + * err = ( __cuModuleGetFunctionCount)(count, mod) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *, CUmodule))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount)(__pyx_v_count, __pyx_v_mod); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3325, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3326 + * raise RuntimeError('Function "cuModuleGetFunctionCount" not found') + * err = ( __cuModuleGetFunctionCount)(count, mod) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3319 + * return err + * + * cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetFunctionCount + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetFunctionCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3328 + * return err + * + * cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleEnumerateFunctions + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleEnumerateFunctions(CUfunction *__pyx_v_functions, unsigned int __pyx_v_numFunctions, CUmodule __pyx_v_mod) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleEnumerateFunctions", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3330 + * cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleEnumerateFunctions + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleEnumerateFunctions == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3330, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3331 + * global __cuModuleEnumerateFunctions + * cuPythonInit() + * if __cuModuleEnumerateFunctions == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3332 + * cuPythonInit() + * if __cuModuleEnumerateFunctions == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') + * err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3333 + * if __cuModuleEnumerateFunctions == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleEnumerateFuncti}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3333, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3333, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3332 + * cuPythonInit() + * if __cuModuleEnumerateFunctions == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') + * err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3331 + * global __cuModuleEnumerateFunctions + * cuPythonInit() + * if __cuModuleEnumerateFunctions == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3334 + * with gil: + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') + * err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction *, unsigned int, CUmodule))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions)(__pyx_v_functions, __pyx_v_numFunctions, __pyx_v_mod); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3334, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3335 + * raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') + * err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3328 + * return err + * + * cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleEnumerateFunctions + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleEnumerateFunctions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3337 + * return err + * + * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetGlobal_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetGlobal_v2(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetGlobal_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3339 + * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetGlobal_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetGlobal_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3339, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3340 + * global __cuModuleGetGlobal_v2 + * cuPythonInit() + * if __cuModuleGetGlobal_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3341 + * cuPythonInit() + * if __cuModuleGetGlobal_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') + * err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3342 + * if __cuModuleGetGlobal_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetGlobal_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3342, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3342, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3341 + * cuPythonInit() + * if __cuModuleGetGlobal_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') + * err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3340 + * global __cuModuleGetGlobal_v2 + * cuPythonInit() + * if __cuModuleGetGlobal_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3343 + * with gil: + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') + * err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, CUmodule, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3343, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3344 + * raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') + * err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3337 + * return err + * + * cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetGlobal_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetGlobal_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3346 + * return err + * + * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkCreate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkCreate_v2(unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues, CUlinkState *__pyx_v_stateOut) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLinkCreate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3348 + * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLinkCreate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLinkCreate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3348, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3349 + * global __cuLinkCreate_v2 + * cuPythonInit() + * if __cuLinkCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkCreate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3350 + * cuPythonInit() + * if __cuLinkCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkCreate_v2" not found') + * err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3351 + * if __cuLinkCreate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuLinkCreate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLinkCreate_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3351, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3351, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3350 + * cuPythonInit() + * if __cuLinkCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkCreate_v2" not found') + * err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3349 + * global __cuLinkCreate_v2 + * cuPythonInit() + * if __cuLinkCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkCreate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3352 + * with gil: + * raise RuntimeError('Function "cuLinkCreate_v2" not found') + * err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int, CUjit_option *, void **, CUlinkState *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2)(__pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues, __pyx_v_stateOut); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3353 + * raise RuntimeError('Function "cuLinkCreate_v2" not found') + * err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3346 + * return err + * + * cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkCreate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLinkCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3355 + * return err + * + * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkAddData_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddData_v2(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, void *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLinkAddData_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3357 + * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLinkAddData_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLinkAddData_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3357, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3358 + * global __cuLinkAddData_v2 + * cuPythonInit() + * if __cuLinkAddData_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkAddData_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3359 + * cuPythonInit() + * if __cuLinkAddData_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkAddData_v2" not found') + * err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3360 + * if __cuLinkAddData_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuLinkAddData_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLinkAddData_v2_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3360, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3360, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3359 + * cuPythonInit() + * if __cuLinkAddData_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkAddData_v2" not found') + * err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3358 + * global __cuLinkAddData_v2 + * cuPythonInit() + * if __cuLinkAddData_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkAddData_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3361 + * with gil: + * raise RuntimeError('Function "cuLinkAddData_v2" not found') + * err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2)(__pyx_v_state, __pyx_v_typename, __pyx_v_data, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3362 + * raise RuntimeError('Function "cuLinkAddData_v2" not found') + * err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3355 + * return err + * + * cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkAddData_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLinkAddData_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3364 + * return err + * + * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkAddFile_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddFile_v2(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, char const *__pyx_v_path, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLinkAddFile_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3366 + * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLinkAddFile_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLinkAddFile_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3366, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3367 + * global __cuLinkAddFile_v2 + * cuPythonInit() + * if __cuLinkAddFile_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3368 + * cuPythonInit() + * if __cuLinkAddFile_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') + * err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3369 + * if __cuLinkAddFile_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLinkAddFile_v2_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3369, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3369, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3368 + * cuPythonInit() + * if __cuLinkAddFile_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') + * err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3367 + * global __cuLinkAddFile_v2 + * cuPythonInit() + * if __cuLinkAddFile_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3370 + * with gil: + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') + * err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2)(__pyx_v_state, __pyx_v_typename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3370, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3371 + * raise RuntimeError('Function "cuLinkAddFile_v2" not found') + * err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3364 + * return err + * + * cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkAddFile_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLinkAddFile_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3373 + * return err + * + * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkComplete + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkComplete(CUlinkState __pyx_v_state, void **__pyx_v_cubinOut, size_t *__pyx_v_sizeOut) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLinkComplete", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3375 + * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLinkComplete + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLinkComplete == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3375, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3376 + * global __cuLinkComplete + * cuPythonInit() + * if __cuLinkComplete == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkComplete" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3377 + * cuPythonInit() + * if __cuLinkComplete == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkComplete" not found') + * err = ( __cuLinkComplete)(state, cubinOut, sizeOut) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3378 + * if __cuLinkComplete == NULL: + * with gil: + * raise RuntimeError('Function "cuLinkComplete" not found') # <<<<<<<<<<<<<< + * err = ( __cuLinkComplete)(state, cubinOut, sizeOut) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLinkComplete_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3378, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3378, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3377 + * cuPythonInit() + * if __cuLinkComplete == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkComplete" not found') + * err = ( __cuLinkComplete)(state, cubinOut, sizeOut) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3376 + * global __cuLinkComplete + * cuPythonInit() + * if __cuLinkComplete == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkComplete" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3379 + * with gil: + * raise RuntimeError('Function "cuLinkComplete" not found') + * err = ( __cuLinkComplete)(state, cubinOut, sizeOut) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlinkState, void **, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete)(__pyx_v_state, __pyx_v_cubinOut, __pyx_v_sizeOut); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3379, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3380 + * raise RuntimeError('Function "cuLinkComplete" not found') + * err = ( __cuLinkComplete)(state, cubinOut, sizeOut) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3373 + * return err + * + * cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkComplete + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3382 + * return err + * + * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkDestroy(CUlinkState __pyx_v_state) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLinkDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3384 + * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLinkDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLinkDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3384, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3385 + * global __cuLinkDestroy + * cuPythonInit() + * if __cuLinkDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3386 + * cuPythonInit() + * if __cuLinkDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkDestroy" not found') + * err = ( __cuLinkDestroy)(state) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3387 + * if __cuLinkDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuLinkDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuLinkDestroy)(state) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLinkDestroy_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3387, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3387, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3386 + * cuPythonInit() + * if __cuLinkDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLinkDestroy" not found') + * err = ( __cuLinkDestroy)(state) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3385 + * global __cuLinkDestroy + * cuPythonInit() + * if __cuLinkDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLinkDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3388 + * with gil: + * raise RuntimeError('Function "cuLinkDestroy" not found') + * err = ( __cuLinkDestroy)(state) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlinkState))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy)(__pyx_v_state); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3388, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3389 + * raise RuntimeError('Function "cuLinkDestroy" not found') + * err = ( __cuLinkDestroy)(state) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3382 + * return err + * + * cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLinkDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3391 + * return err + * + * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetTexRef + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetTexRef(CUtexref *__pyx_v_pTexRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetTexRef", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3393 + * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetTexRef + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetTexRef == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3393, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3394 + * global __cuModuleGetTexRef + * cuPythonInit() + * if __cuModuleGetTexRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetTexRef" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3395 + * cuPythonInit() + * if __cuModuleGetTexRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetTexRef" not found') + * err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3396 + * if __cuModuleGetTexRef == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetTexRef" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetTexRef_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3396, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3396, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3395 + * cuPythonInit() + * if __cuModuleGetTexRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetTexRef" not found') + * err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3394 + * global __cuModuleGetTexRef + * cuPythonInit() + * if __cuModuleGetTexRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetTexRef" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3397 + * with gil: + * raise RuntimeError('Function "cuModuleGetTexRef" not found') + * err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref *, CUmodule, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef)(__pyx_v_pTexRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3397, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3398 + * raise RuntimeError('Function "cuModuleGetTexRef" not found') + * err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3391 + * return err + * + * cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetTexRef + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3400 + * return err + * + * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetSurfRef + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetSurfRef(CUsurfref *__pyx_v_pSurfRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuModuleGetSurfRef", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3402 + * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuModuleGetSurfRef + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuModuleGetSurfRef == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3402, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3403 + * global __cuModuleGetSurfRef + * cuPythonInit() + * if __cuModuleGetSurfRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3404 + * cuPythonInit() + * if __cuModuleGetSurfRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') + * err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3405 + * if __cuModuleGetSurfRef == NULL: + * with gil: + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') # <<<<<<<<<<<<<< + * err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuModuleGetSurfRef_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3405, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3405, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3404 + * cuPythonInit() + * if __cuModuleGetSurfRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') + * err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3403 + * global __cuModuleGetSurfRef + * cuPythonInit() + * if __cuModuleGetSurfRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3406 + * with gil: + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') + * err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsurfref *, CUmodule, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef)(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3406, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3407 + * raise RuntimeError('Function "cuModuleGetSurfRef" not found') + * err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3400 + * return err + * + * cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuModuleGetSurfRef + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3409 + * return err + * + * cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryLoadData + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadData(CUlibrary *__pyx_v_library, void const *__pyx_v_code, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryLoadData", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3411 + * cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryLoadData + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryLoadData == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3411, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3412 + * global __cuLibraryLoadData + * cuPythonInit() + * if __cuLibraryLoadData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryLoadData" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3413 + * cuPythonInit() + * if __cuLibraryLoadData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryLoadData" not found') + * err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3414 + * if __cuLibraryLoadData == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryLoadData" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryLoadData_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3414, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3414, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3413 + * cuPythonInit() + * if __cuLibraryLoadData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryLoadData" not found') + * err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3412 + * global __cuLibraryLoadData + * cuPythonInit() + * if __cuLibraryLoadData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryLoadData" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3415 + * with gil: + * raise RuntimeError('Function "cuLibraryLoadData" not found') + * err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData)(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3415, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3416 + * raise RuntimeError('Function "cuLibraryLoadData" not found') + * err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3409 + * return err + * + * cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryLoadData + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3418 + * return err + * + * cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryLoadFromFile + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadFromFile(CUlibrary *__pyx_v_library, char const *__pyx_v_fileName, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryLoadFromFile", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3420 + * cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryLoadFromFile + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryLoadFromFile == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3420, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3421 + * global __cuLibraryLoadFromFile + * cuPythonInit() + * if __cuLibraryLoadFromFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3422 + * cuPythonInit() + * if __cuLibraryLoadFromFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') + * err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3423 + * if __cuLibraryLoadFromFile == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryLoadFromFile_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3423, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3423, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3422 + * cuPythonInit() + * if __cuLibraryLoadFromFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') + * err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3421 + * global __cuLibraryLoadFromFile + * cuPythonInit() + * if __cuLibraryLoadFromFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3424 + * with gil: + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') + * err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile)(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3424, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3425 + * raise RuntimeError('Function "cuLibraryLoadFromFile" not found') + * err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3418 + * return err + * + * cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryLoadFromFile + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryLoadFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3427 + * return err + * + * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryUnload + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryUnload(CUlibrary __pyx_v_library) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryUnload", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3429 + * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryUnload + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryUnload == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3429, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3430 + * global __cuLibraryUnload + * cuPythonInit() + * if __cuLibraryUnload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryUnload" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3431 + * cuPythonInit() + * if __cuLibraryUnload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryUnload" not found') + * err = ( __cuLibraryUnload)(library) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3432 + * if __cuLibraryUnload == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryUnload" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryUnload)(library) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryUnload_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3432, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3432, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3431 + * cuPythonInit() + * if __cuLibraryUnload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryUnload" not found') + * err = ( __cuLibraryUnload)(library) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3430 + * global __cuLibraryUnload + * cuPythonInit() + * if __cuLibraryUnload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryUnload" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3433 + * with gil: + * raise RuntimeError('Function "cuLibraryUnload" not found') + * err = ( __cuLibraryUnload)(library) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlibrary))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload)(__pyx_v_library); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3433, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3434 + * raise RuntimeError('Function "cuLibraryUnload" not found') + * err = ( __cuLibraryUnload)(library) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3427 + * return err + * + * cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryUnload + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3436 + * return err + * + * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetKernel + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernel(CUkernel *__pyx_v_pKernel, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetKernel", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3438 + * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetKernel + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetKernel == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3438, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3439 + * global __cuLibraryGetKernel + * cuPythonInit() + * if __cuLibraryGetKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernel" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3440 + * cuPythonInit() + * if __cuLibraryGetKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetKernel" not found') + * err = ( __cuLibraryGetKernel)(pKernel, library, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3441 + * if __cuLibraryGetKernel == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernel" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetKernel)(pKernel, library, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetKernel_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3441, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3441, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3440 + * cuPythonInit() + * if __cuLibraryGetKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetKernel" not found') + * err = ( __cuLibraryGetKernel)(pKernel, library, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3439 + * global __cuLibraryGetKernel + * cuPythonInit() + * if __cuLibraryGetKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernel" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3442 + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernel" not found') + * err = ( __cuLibraryGetKernel)(pKernel, library, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUkernel *, CUlibrary, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel)(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3442, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3443 + * raise RuntimeError('Function "cuLibraryGetKernel" not found') + * err = ( __cuLibraryGetKernel)(pKernel, library, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3436 + * return err + * + * cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetKernel + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3445 + * return err + * + * cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetKernelCount + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernelCount(unsigned int *__pyx_v_count, CUlibrary __pyx_v_lib) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetKernelCount", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3447 + * cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetKernelCount + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetKernelCount == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3447, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3448 + * global __cuLibraryGetKernelCount + * cuPythonInit() + * if __cuLibraryGetKernelCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3449 + * cuPythonInit() + * if __cuLibraryGetKernelCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') + * err = ( __cuLibraryGetKernelCount)(count, lib) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3450 + * if __cuLibraryGetKernelCount == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetKernelCount)(count, lib) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetKernelCount}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3450, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3450, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3449 + * cuPythonInit() + * if __cuLibraryGetKernelCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') + * err = ( __cuLibraryGetKernelCount)(count, lib) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3448 + * global __cuLibraryGetKernelCount + * cuPythonInit() + * if __cuLibraryGetKernelCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3451 + * with gil: + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') + * err = ( __cuLibraryGetKernelCount)(count, lib) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *, CUlibrary))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount)(__pyx_v_count, __pyx_v_lib); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3451, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3452 + * raise RuntimeError('Function "cuLibraryGetKernelCount" not found') + * err = ( __cuLibraryGetKernelCount)(count, lib) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3445 + * return err + * + * cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetKernelCount + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetKernelCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3454 + * return err + * + * cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryEnumerateKernels + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryEnumerateKernels(CUkernel *__pyx_v_kernels, unsigned int __pyx_v_numKernels, CUlibrary __pyx_v_lib) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryEnumerateKernels", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3456 + * cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryEnumerateKernels + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryEnumerateKernels == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3456, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3457 + * global __cuLibraryEnumerateKernels + * cuPythonInit() + * if __cuLibraryEnumerateKernels == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3458 + * cuPythonInit() + * if __cuLibraryEnumerateKernels == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') + * err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3459 + * if __cuLibraryEnumerateKernels == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryEnumerateKerne}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3459, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3459, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3458 + * cuPythonInit() + * if __cuLibraryEnumerateKernels == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') + * err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3457 + * global __cuLibraryEnumerateKernels + * cuPythonInit() + * if __cuLibraryEnumerateKernels == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3460 + * with gil: + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') + * err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUkernel *, unsigned int, CUlibrary))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels)(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3460, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3461 + * raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') + * err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3454 + * return err + * + * cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryEnumerateKernels + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryEnumerateKernels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3463 + * return err + * + * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetModule + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetModule(CUmodule *__pyx_v_pMod, CUlibrary __pyx_v_library) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetModule", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3465 + * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetModule + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetModule == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3465, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3466 + * global __cuLibraryGetModule + * cuPythonInit() + * if __cuLibraryGetModule == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetModule" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3467 + * cuPythonInit() + * if __cuLibraryGetModule == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetModule" not found') + * err = ( __cuLibraryGetModule)(pMod, library) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3468 + * if __cuLibraryGetModule == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetModule" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetModule)(pMod, library) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetModule_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3468, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3468, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3467 + * cuPythonInit() + * if __cuLibraryGetModule == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetModule" not found') + * err = ( __cuLibraryGetModule)(pMod, library) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3466 + * global __cuLibraryGetModule + * cuPythonInit() + * if __cuLibraryGetModule == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetModule" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3469 + * with gil: + * raise RuntimeError('Function "cuLibraryGetModule" not found') + * err = ( __cuLibraryGetModule)(pMod, library) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, CUlibrary))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule)(__pyx_v_pMod, __pyx_v_library); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3469, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3470 + * raise RuntimeError('Function "cuLibraryGetModule" not found') + * err = ( __cuLibraryGetModule)(pMod, library) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3463 + * return err + * + * cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetModule + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3472 + * return err + * + * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetFunction + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetFunction(CUfunction *__pyx_v_pFunc, CUkernel __pyx_v_kernel) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelGetFunction", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3474 + * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelGetFunction + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelGetFunction == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3474, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3475 + * global __cuKernelGetFunction + * cuPythonInit() + * if __cuKernelGetFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetFunction" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3476 + * cuPythonInit() + * if __cuKernelGetFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetFunction" not found') + * err = ( __cuKernelGetFunction)(pFunc, kernel) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3477 + * if __cuKernelGetFunction == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelGetFunction" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelGetFunction)(pFunc, kernel) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelGetFunction_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3477, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3477, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3476 + * cuPythonInit() + * if __cuKernelGetFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetFunction" not found') + * err = ( __cuKernelGetFunction)(pFunc, kernel) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3475 + * global __cuKernelGetFunction + * cuPythonInit() + * if __cuKernelGetFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetFunction" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3478 + * with gil: + * raise RuntimeError('Function "cuKernelGetFunction" not found') + * err = ( __cuKernelGetFunction)(pFunc, kernel) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction *, CUkernel))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction)(__pyx_v_pFunc, __pyx_v_kernel); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3478, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3479 + * raise RuntimeError('Function "cuKernelGetFunction" not found') + * err = ( __cuKernelGetFunction)(pFunc, kernel) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3472 + * return err + * + * cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetFunction + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3481 + * return err + * + * cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetLibrary + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetLibrary(CUlibrary *__pyx_v_pLib, CUkernel __pyx_v_kernel) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelGetLibrary", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3483 + * cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelGetLibrary + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelGetLibrary == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3483, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3484 + * global __cuKernelGetLibrary + * cuPythonInit() + * if __cuKernelGetLibrary == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetLibrary" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3485 + * cuPythonInit() + * if __cuKernelGetLibrary == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetLibrary" not found') + * err = ( __cuKernelGetLibrary)(pLib, kernel) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3486 + * if __cuKernelGetLibrary == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelGetLibrary" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelGetLibrary)(pLib, kernel) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelGetLibrary_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3486, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3485 + * cuPythonInit() + * if __cuKernelGetLibrary == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetLibrary" not found') + * err = ( __cuKernelGetLibrary)(pLib, kernel) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3484 + * global __cuKernelGetLibrary + * cuPythonInit() + * if __cuKernelGetLibrary == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetLibrary" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3487 + * with gil: + * raise RuntimeError('Function "cuKernelGetLibrary" not found') + * err = ( __cuKernelGetLibrary)(pLib, kernel) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlibrary *, CUkernel))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary)(__pyx_v_pLib, __pyx_v_kernel); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3487, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3488 + * raise RuntimeError('Function "cuKernelGetLibrary" not found') + * err = ( __cuKernelGetLibrary)(pLib, kernel) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3481 + * return err + * + * cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetLibrary + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelGetLibrary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3490 + * return err + * + * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetGlobal + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetGlobal", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3492 + * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetGlobal + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetGlobal == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3492, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3493 + * global __cuLibraryGetGlobal + * cuPythonInit() + * if __cuLibraryGetGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3494 + * cuPythonInit() + * if __cuLibraryGetGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') + * err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3495 + * if __cuLibraryGetGlobal == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetGlobal_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3495, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3495, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3494 + * cuPythonInit() + * if __cuLibraryGetGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') + * err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3493 + * global __cuLibraryGetGlobal + * cuPythonInit() + * if __cuLibraryGetGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3496 + * with gil: + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') + * err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, CUlibrary, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3496, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3497 + * raise RuntimeError('Function "cuLibraryGetGlobal" not found') + * err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3490 + * return err + * + * cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetGlobal + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3499 + * return err + * + * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetManaged + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetManaged(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetManaged", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3501 + * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetManaged + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetManaged == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3501, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3502 + * global __cuLibraryGetManaged + * cuPythonInit() + * if __cuLibraryGetManaged == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetManaged" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3503 + * cuPythonInit() + * if __cuLibraryGetManaged == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetManaged" not found') + * err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3504 + * if __cuLibraryGetManaged == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetManaged" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetManaged_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3504, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3504, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3503 + * cuPythonInit() + * if __cuLibraryGetManaged == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetManaged" not found') + * err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3502 + * global __cuLibraryGetManaged + * cuPythonInit() + * if __cuLibraryGetManaged == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetManaged" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3505 + * with gil: + * raise RuntimeError('Function "cuLibraryGetManaged" not found') + * err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, CUlibrary, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged)(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3505, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3506 + * raise RuntimeError('Function "cuLibraryGetManaged" not found') + * err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3499 + * return err + * + * cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetManaged + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3508 + * return err + * + * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetUnifiedFunction + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetUnifiedFunction(void **__pyx_v_fptr, CUlibrary __pyx_v_library, char const *__pyx_v_symbol) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLibraryGetUnifiedFunction", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3510 + * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLibraryGetUnifiedFunction + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLibraryGetUnifiedFunction == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3510, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3511 + * global __cuLibraryGetUnifiedFunction + * cuPythonInit() + * if __cuLibraryGetUnifiedFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3512 + * cuPythonInit() + * if __cuLibraryGetUnifiedFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') + * err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3513 + * if __cuLibraryGetUnifiedFunction == NULL: + * with gil: + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') # <<<<<<<<<<<<<< + * err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLibraryGetUnifiedFunc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3513, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3513, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3512 + * cuPythonInit() + * if __cuLibraryGetUnifiedFunction == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') + * err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3511 + * global __cuLibraryGetUnifiedFunction + * cuPythonInit() + * if __cuLibraryGetUnifiedFunction == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3514 + * with gil: + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') + * err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void **, CUlibrary, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction)(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3514, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3515 + * raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') + * err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3508 + * return err + * + * cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLibraryGetUnifiedFunction + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLibraryGetUnifiedFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3517 + * return err + * + * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3519 + * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3519, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3520 + * global __cuKernelGetAttribute + * cuPythonInit() + * if __cuKernelGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3521 + * cuPythonInit() + * if __cuKernelGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetAttribute" not found') + * err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3522 + * if __cuKernelGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelGetAttribute_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3522, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3522, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3521 + * cuPythonInit() + * if __cuKernelGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetAttribute" not found') + * err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3520 + * global __cuKernelGetAttribute + * cuPythonInit() + * if __cuKernelGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3523 + * with gil: + * raise RuntimeError('Function "cuKernelGetAttribute" not found') + * err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction_attribute, CUkernel, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3523, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3524 + * raise RuntimeError('Function "cuKernelGetAttribute" not found') + * err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3517 + * return err + * + * cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3526 + * return err + * + * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetAttribute(CUfunction_attribute __pyx_v_attrib, int __pyx_v_val, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3528 + * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3528, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3529 + * global __cuKernelSetAttribute + * cuPythonInit() + * if __cuKernelSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3530 + * cuPythonInit() + * if __cuKernelSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelSetAttribute" not found') + * err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3531 + * if __cuKernelSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelSetAttribute_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3531, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3531, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3530 + * cuPythonInit() + * if __cuKernelSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelSetAttribute" not found') + * err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3529 + * global __cuKernelSetAttribute + * cuPythonInit() + * if __cuKernelSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3532 + * with gil: + * raise RuntimeError('Function "cuKernelSetAttribute" not found') + * err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction_attribute, int, CUkernel, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute)(__pyx_v_attrib, __pyx_v_val, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3532, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3533 + * raise RuntimeError('Function "cuKernelSetAttribute" not found') + * err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3526 + * return err + * + * cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3535 + * return err + * + * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelSetCacheConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetCacheConfig(CUkernel __pyx_v_kernel, CUfunc_cache __pyx_v_config, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelSetCacheConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3537 + * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelSetCacheConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelSetCacheConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3537, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3538 + * global __cuKernelSetCacheConfig + * cuPythonInit() + * if __cuKernelSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3539 + * cuPythonInit() + * if __cuKernelSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') + * err = ( __cuKernelSetCacheConfig)(kernel, config, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3540 + * if __cuKernelSetCacheConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelSetCacheConfig)(kernel, config, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelSetCacheConfig}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3540, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3540, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3539 + * cuPythonInit() + * if __cuKernelSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') + * err = ( __cuKernelSetCacheConfig)(kernel, config, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3538 + * global __cuKernelSetCacheConfig + * cuPythonInit() + * if __cuKernelSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3541 + * with gil: + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') + * err = ( __cuKernelSetCacheConfig)(kernel, config, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUkernel, CUfunc_cache, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig)(__pyx_v_kernel, __pyx_v_config, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3541, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3542 + * raise RuntimeError('Function "cuKernelSetCacheConfig" not found') + * err = ( __cuKernelSetCacheConfig)(kernel, config, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3535 + * return err + * + * cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelSetCacheConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3544 + * return err + * + * cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetName + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetName(char const **__pyx_v_name, CUkernel __pyx_v_hfunc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelGetName", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3546 + * cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelGetName + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelGetName == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3546, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3547 + * global __cuKernelGetName + * cuPythonInit() + * if __cuKernelGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetName" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3548 + * cuPythonInit() + * if __cuKernelGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetName" not found') + * err = ( __cuKernelGetName)(name, hfunc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3549 + * if __cuKernelGetName == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelGetName" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelGetName)(name, hfunc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelGetName_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3549, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3549, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3548 + * cuPythonInit() + * if __cuKernelGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetName" not found') + * err = ( __cuKernelGetName)(name, hfunc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3547 + * global __cuKernelGetName + * cuPythonInit() + * if __cuKernelGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetName" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3550 + * with gil: + * raise RuntimeError('Function "cuKernelGetName" not found') + * err = ( __cuKernelGetName)(name, hfunc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char const **, CUkernel))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName)(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3550, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3551 + * raise RuntimeError('Function "cuKernelGetName" not found') + * err = ( __cuKernelGetName)(name, hfunc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3544 + * return err + * + * cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetName + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3553 + * return err + * + * cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetParamInfo + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetParamInfo(CUkernel __pyx_v_kernel, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuKernelGetParamInfo", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3555 + * cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuKernelGetParamInfo + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuKernelGetParamInfo == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3555, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3556 + * global __cuKernelGetParamInfo + * cuPythonInit() + * if __cuKernelGetParamInfo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3557 + * cuPythonInit() + * if __cuKernelGetParamInfo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') + * err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3558 + * if __cuKernelGetParamInfo == NULL: + * with gil: + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') # <<<<<<<<<<<<<< + * err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuKernelGetParamInfo_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3558, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3558, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3557 + * cuPythonInit() + * if __cuKernelGetParamInfo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') + * err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3556 + * global __cuKernelGetParamInfo + * cuPythonInit() + * if __cuKernelGetParamInfo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3559 + * with gil: + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') + * err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUkernel, size_t, size_t *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo)(__pyx_v_kernel, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3559, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3560 + * raise RuntimeError('Function "cuKernelGetParamInfo" not found') + * err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3553 + * return err + * + * cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuKernelGetParamInfo + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuKernelGetParamInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3562 + * return err + * + * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetInfo_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetInfo_v2(size_t *__pyx_v_free, size_t *__pyx_v_total) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetInfo_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3564 + * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetInfo_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetInfo_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3564, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3565 + * global __cuMemGetInfo_v2 + * cuPythonInit() + * if __cuMemGetInfo_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3566 + * cuPythonInit() + * if __cuMemGetInfo_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') + * err = ( __cuMemGetInfo_v2)(free, total) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3567 + * if __cuMemGetInfo_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetInfo_v2)(free, total) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetInfo_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3567, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3567, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3566 + * cuPythonInit() + * if __cuMemGetInfo_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') + * err = ( __cuMemGetInfo_v2)(free, total) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3565 + * global __cuMemGetInfo_v2 + * cuPythonInit() + * if __cuMemGetInfo_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3568 + * with gil: + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') + * err = ( __cuMemGetInfo_v2)(free, total) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2)(__pyx_v_free, __pyx_v_total); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3568, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3569 + * raise RuntimeError('Function "cuMemGetInfo_v2" not found') + * err = ( __cuMemGetInfo_v2)(free, total) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3562 + * return err + * + * cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetInfo_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3571 + * return err + * + * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAlloc_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAlloc_v2(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAlloc_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3573 + * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAlloc_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAlloc_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3573, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3574 + * global __cuMemAlloc_v2 + * cuPythonInit() + * if __cuMemAlloc_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAlloc_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3575 + * cuPythonInit() + * if __cuMemAlloc_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAlloc_v2" not found') + * err = ( __cuMemAlloc_v2)(dptr, bytesize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3576 + * if __cuMemAlloc_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAlloc_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAlloc_v2)(dptr, bytesize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAlloc_v2_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3576, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3576, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3575 + * cuPythonInit() + * if __cuMemAlloc_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAlloc_v2" not found') + * err = ( __cuMemAlloc_v2)(dptr, bytesize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3574 + * global __cuMemAlloc_v2 + * cuPythonInit() + * if __cuMemAlloc_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAlloc_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3577 + * with gil: + * raise RuntimeError('Function "cuMemAlloc_v2" not found') + * err = ( __cuMemAlloc_v2)(dptr, bytesize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2)(__pyx_v_dptr, __pyx_v_bytesize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3577, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3578 + * raise RuntimeError('Function "cuMemAlloc_v2" not found') + * err = ( __cuMemAlloc_v2)(dptr, bytesize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3571 + * return err + * + * cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAlloc_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAlloc_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3580 + * return err + * + * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocPitch_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocPitch_v2(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_pPitch, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAllocPitch_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3582 + * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAllocPitch_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAllocPitch_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3582, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3583 + * global __cuMemAllocPitch_v2 + * cuPythonInit() + * if __cuMemAllocPitch_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3584 + * cuPythonInit() + * if __cuMemAllocPitch_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') + * err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3585 + * if __cuMemAllocPitch_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAllocPitch_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3585, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3585, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3584 + * cuPythonInit() + * if __cuMemAllocPitch_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') + * err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3583 + * global __cuMemAllocPitch_v2 + * cuPythonInit() + * if __cuMemAllocPitch_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3586 + * with gil: + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') + * err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, size_t, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2)(__pyx_v_dptr, __pyx_v_pPitch, __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3586, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3587 + * raise RuntimeError('Function "cuMemAllocPitch_v2" not found') + * err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3580 + * return err + * + * cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocPitch_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAllocPitch_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3589 + * return err + * + * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFree_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFree_v2(CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemFree_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3591 + * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemFree_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemFree_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3591, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3592 + * global __cuMemFree_v2 + * cuPythonInit() + * if __cuMemFree_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFree_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3593 + * cuPythonInit() + * if __cuMemFree_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFree_v2" not found') + * err = ( __cuMemFree_v2)(dptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3594 + * if __cuMemFree_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemFree_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemFree_v2)(dptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemFree_v2_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3594, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3594, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3593 + * cuPythonInit() + * if __cuMemFree_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFree_v2" not found') + * err = ( __cuMemFree_v2)(dptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3592 + * global __cuMemFree_v2 + * cuPythonInit() + * if __cuMemFree_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFree_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3595 + * with gil: + * raise RuntimeError('Function "cuMemFree_v2" not found') + * err = ( __cuMemFree_v2)(dptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2)(__pyx_v_dptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3595, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3596 + * raise RuntimeError('Function "cuMemFree_v2" not found') + * err = ( __cuMemFree_v2)(dptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3589 + * return err + * + * cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFree_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemFree_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3598 + * return err + * + * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAddressRange_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAddressRange_v2(CUdeviceptr *__pyx_v_pbase, size_t *__pyx_v_psize, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetAddressRange_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3600 + * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetAddressRange_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetAddressRange_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3600, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3601 + * global __cuMemGetAddressRange_v2 + * cuPythonInit() + * if __cuMemGetAddressRange_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3602 + * cuPythonInit() + * if __cuMemGetAddressRange_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') + * err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3603 + * if __cuMemGetAddressRange_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetAddressRange_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3603, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3603, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3602 + * cuPythonInit() + * if __cuMemGetAddressRange_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') + * err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3601 + * global __cuMemGetAddressRange_v2 + * cuPythonInit() + * if __cuMemGetAddressRange_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3604 + * with gil: + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') + * err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2)(__pyx_v_pbase, __pyx_v_psize, __pyx_v_dptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3604, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3605 + * raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') + * err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3598 + * return err + * + * cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAddressRange_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetAddressRange_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3607 + * return err + * + * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocHost_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocHost_v2(void **__pyx_v_pp, size_t __pyx_v_bytesize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAllocHost_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3609 + * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAllocHost_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAllocHost_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3609, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3610 + * global __cuMemAllocHost_v2 + * cuPythonInit() + * if __cuMemAllocHost_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3611 + * cuPythonInit() + * if __cuMemAllocHost_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') + * err = ( __cuMemAllocHost_v2)(pp, bytesize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3612 + * if __cuMemAllocHost_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAllocHost_v2)(pp, bytesize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAllocHost_v2_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3612, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3612, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3611 + * cuPythonInit() + * if __cuMemAllocHost_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') + * err = ( __cuMemAllocHost_v2)(pp, bytesize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3610 + * global __cuMemAllocHost_v2 + * cuPythonInit() + * if __cuMemAllocHost_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3613 + * with gil: + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') + * err = ( __cuMemAllocHost_v2)(pp, bytesize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void **, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2)(__pyx_v_pp, __pyx_v_bytesize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3613, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3614 + * raise RuntimeError('Function "cuMemAllocHost_v2" not found') + * err = ( __cuMemAllocHost_v2)(pp, bytesize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3607 + * return err + * + * cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocHost_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAllocHost_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3616 + * return err + * + * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFreeHost + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeHost(void *__pyx_v_p) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemFreeHost", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3618 + * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemFreeHost + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemFreeHost == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3618, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3619 + * global __cuMemFreeHost + * cuPythonInit() + * if __cuMemFreeHost == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFreeHost" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3620 + * cuPythonInit() + * if __cuMemFreeHost == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFreeHost" not found') + * err = ( __cuMemFreeHost)(p) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3621 + * if __cuMemFreeHost == NULL: + * with gil: + * raise RuntimeError('Function "cuMemFreeHost" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemFreeHost)(p) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemFreeHost_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3621, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3621, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3620 + * cuPythonInit() + * if __cuMemFreeHost == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFreeHost" not found') + * err = ( __cuMemFreeHost)(p) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3619 + * global __cuMemFreeHost + * cuPythonInit() + * if __cuMemFreeHost == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFreeHost" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3622 + * with gil: + * raise RuntimeError('Function "cuMemFreeHost" not found') + * err = ( __cuMemFreeHost)(p) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost)(__pyx_v_p); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3622, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3623 + * raise RuntimeError('Function "cuMemFreeHost" not found') + * err = ( __cuMemFreeHost)(p) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3616 + * return err + * + * cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFreeHost + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3625 + * return err + * + * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostAlloc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostAlloc(void **__pyx_v_pp, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemHostAlloc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3627 + * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemHostAlloc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemHostAlloc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3627, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3628 + * global __cuMemHostAlloc + * cuPythonInit() + * if __cuMemHostAlloc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostAlloc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3629 + * cuPythonInit() + * if __cuMemHostAlloc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostAlloc" not found') + * err = ( __cuMemHostAlloc)(pp, bytesize, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3630 + * if __cuMemHostAlloc == NULL: + * with gil: + * raise RuntimeError('Function "cuMemHostAlloc" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemHostAlloc)(pp, bytesize, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemHostAlloc_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3630, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3630, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3629 + * cuPythonInit() + * if __cuMemHostAlloc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostAlloc" not found') + * err = ( __cuMemHostAlloc)(pp, bytesize, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3628 + * global __cuMemHostAlloc + * cuPythonInit() + * if __cuMemHostAlloc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostAlloc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3631 + * with gil: + * raise RuntimeError('Function "cuMemHostAlloc" not found') + * err = ( __cuMemHostAlloc)(pp, bytesize, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void **, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc)(__pyx_v_pp, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3631, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3632 + * raise RuntimeError('Function "cuMemHostAlloc" not found') + * err = ( __cuMemHostAlloc)(pp, bytesize, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3625 + * return err + * + * cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostAlloc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3634 + * return err + * + * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostGetDevicePointer_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetDevicePointer_v2(CUdeviceptr *__pyx_v_pdptr, void *__pyx_v_p, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemHostGetDevicePointer_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3636 + * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemHostGetDevicePointer_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemHostGetDevicePointer_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3636, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3637 + * global __cuMemHostGetDevicePointer_v2 + * cuPythonInit() + * if __cuMemHostGetDevicePointer_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3638 + * cuPythonInit() + * if __cuMemHostGetDevicePointer_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') + * err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3639 + * if __cuMemHostGetDevicePointer_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemHostGetDevicePoint}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3639, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3639, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3638 + * cuPythonInit() + * if __cuMemHostGetDevicePointer_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') + * err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3637 + * global __cuMemHostGetDevicePointer_v2 + * cuPythonInit() + * if __cuMemHostGetDevicePointer_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3640 + * with gil: + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') + * err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, void *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2)(__pyx_v_pdptr, __pyx_v_p, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3640, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3641 + * raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') + * err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3634 + * return err + * + * cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostGetDevicePointer_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemHostGetDevicePointer_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3643 + * return err + * + * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostGetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_p) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemHostGetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3645 + * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemHostGetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemHostGetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3645, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3646 + * global __cuMemHostGetFlags + * cuPythonInit() + * if __cuMemHostGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostGetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3647 + * cuPythonInit() + * if __cuMemHostGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostGetFlags" not found') + * err = ( __cuMemHostGetFlags)(pFlags, p) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3648 + * if __cuMemHostGetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuMemHostGetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemHostGetFlags)(pFlags, p) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemHostGetFlags_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3648, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3648, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3647 + * cuPythonInit() + * if __cuMemHostGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostGetFlags" not found') + * err = ( __cuMemHostGetFlags)(pFlags, p) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3646 + * global __cuMemHostGetFlags + * cuPythonInit() + * if __cuMemHostGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostGetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3649 + * with gil: + * raise RuntimeError('Function "cuMemHostGetFlags" not found') + * err = ( __cuMemHostGetFlags)(pFlags, p) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags)(__pyx_v_pFlags, __pyx_v_p); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3649, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3650 + * raise RuntimeError('Function "cuMemHostGetFlags" not found') + * err = ( __cuMemHostGetFlags)(pFlags, p) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3643 + * return err + * + * cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostGetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3652 + * return err + * + * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocManaged + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocManaged(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAllocManaged", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3654 + * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAllocManaged + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAllocManaged == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3654, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3655 + * global __cuMemAllocManaged + * cuPythonInit() + * if __cuMemAllocManaged == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocManaged" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3656 + * cuPythonInit() + * if __cuMemAllocManaged == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocManaged" not found') + * err = ( __cuMemAllocManaged)(dptr, bytesize, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3657 + * if __cuMemAllocManaged == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAllocManaged" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAllocManaged)(dptr, bytesize, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAllocManaged_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3657, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3657, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3656 + * cuPythonInit() + * if __cuMemAllocManaged == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocManaged" not found') + * err = ( __cuMemAllocManaged)(dptr, bytesize, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3655 + * global __cuMemAllocManaged + * cuPythonInit() + * if __cuMemAllocManaged == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocManaged" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3658 + * with gil: + * raise RuntimeError('Function "cuMemAllocManaged" not found') + * err = ( __cuMemAllocManaged)(dptr, bytesize, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3658, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3659 + * raise RuntimeError('Function "cuMemAllocManaged" not found') + * err = ( __cuMemAllocManaged)(dptr, bytesize, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3652 + * return err + * + * cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocManaged + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3661 + * return err + * + * cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceRegisterAsyncNotification + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceRegisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, CUasyncCallbackHandle *__pyx_v_callback) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceRegisterAsyncNotification", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3663 + * cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceRegisterAsyncNotification + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceRegisterAsyncNotification == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3663, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3664 + * global __cuDeviceRegisterAsyncNotification + * cuPythonInit() + * if __cuDeviceRegisterAsyncNotification == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3665 + * cuPythonInit() + * if __cuDeviceRegisterAsyncNotification == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') + * err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3666 + * if __cuDeviceRegisterAsyncNotification == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceRegisterAsyncNo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3666, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3666, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3665 + * cuPythonInit() + * if __cuDeviceRegisterAsyncNotification == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') + * err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3664 + * global __cuDeviceRegisterAsyncNotification + * cuPythonInit() + * if __cuDeviceRegisterAsyncNotification == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3667 + * with gil: + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') + * err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification)(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3667, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3668 + * raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') + * err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3661 + * return err + * + * cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceRegisterAsyncNotification + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceRegisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3670 + * return err + * + * cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceUnregisterAsyncNotification + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceUnregisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallbackHandle __pyx_v_callback) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceUnregisterAsyncNotification", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3672 + * cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceUnregisterAsyncNotification + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceUnregisterAsyncNotification == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3672, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3673 + * global __cuDeviceUnregisterAsyncNotification + * cuPythonInit() + * if __cuDeviceUnregisterAsyncNotification == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3674 + * cuPythonInit() + * if __cuDeviceUnregisterAsyncNotification == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') + * err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3675 + * if __cuDeviceUnregisterAsyncNotification == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceUnregisterAsync}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3675, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3675, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3674 + * cuPythonInit() + * if __cuDeviceUnregisterAsyncNotification == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') + * err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3673 + * global __cuDeviceUnregisterAsyncNotification + * cuPythonInit() + * if __cuDeviceUnregisterAsyncNotification == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3676 + * with gil: + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') + * err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUasyncCallbackHandle))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification)(__pyx_v_device, __pyx_v_callback); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3676, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3677 + * raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') + * err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3670 + * return err + * + * cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceUnregisterAsyncNotification + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceUnregisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3679 + * return err + * + * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetByPCIBusId + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetByPCIBusId(CUdevice *__pyx_v_dev, char const *__pyx_v_pciBusId) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetByPCIBusId", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3681 + * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetByPCIBusId + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetByPCIBusId == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3681, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3682 + * global __cuDeviceGetByPCIBusId + * cuPythonInit() + * if __cuDeviceGetByPCIBusId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3683 + * cuPythonInit() + * if __cuDeviceGetByPCIBusId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') + * err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3684 + * if __cuDeviceGetByPCIBusId == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetByPCIBusId_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3684, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3684, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3683 + * cuPythonInit() + * if __cuDeviceGetByPCIBusId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') + * err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3682 + * global __cuDeviceGetByPCIBusId + * cuPythonInit() + * if __cuDeviceGetByPCIBusId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3685 + * with gil: + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') + * err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice *, char const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId)(__pyx_v_dev, __pyx_v_pciBusId); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3685, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3686 + * raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') + * err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3679 + * return err + * + * cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetByPCIBusId + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3688 + * return err + * + * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetPCIBusId + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetPCIBusId", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3690 + * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetPCIBusId + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetPCIBusId == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3690, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3691 + * global __cuDeviceGetPCIBusId + * cuPythonInit() + * if __cuDeviceGetPCIBusId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3692 + * cuPythonInit() + * if __cuDeviceGetPCIBusId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') + * err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3693 + * if __cuDeviceGetPCIBusId == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetPCIBusId_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3693, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3693, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3692 + * cuPythonInit() + * if __cuDeviceGetPCIBusId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') + * err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3691 + * global __cuDeviceGetPCIBusId + * cuPythonInit() + * if __cuDeviceGetPCIBusId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3694 + * with gil: + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') + * err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char *, int, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId)(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3694, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3695 + * raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') + * err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3688 + * return err + * + * cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetPCIBusId + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3697 + * return err + * + * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcGetEventHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetEventHandle(CUipcEventHandle *__pyx_v_pHandle, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuIpcGetEventHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3699 + * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuIpcGetEventHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuIpcGetEventHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3699, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3700 + * global __cuIpcGetEventHandle + * cuPythonInit() + * if __cuIpcGetEventHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3701 + * cuPythonInit() + * if __cuIpcGetEventHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') + * err = ( __cuIpcGetEventHandle)(pHandle, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3702 + * if __cuIpcGetEventHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuIpcGetEventHandle)(pHandle, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuIpcGetEventHandle_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3702, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3702, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3701 + * cuPythonInit() + * if __cuIpcGetEventHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') + * err = ( __cuIpcGetEventHandle)(pHandle, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3700 + * global __cuIpcGetEventHandle + * cuPythonInit() + * if __cuIpcGetEventHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3703 + * with gil: + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') + * err = ( __cuIpcGetEventHandle)(pHandle, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUipcEventHandle *, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle)(__pyx_v_pHandle, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3703, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3704 + * raise RuntimeError('Function "cuIpcGetEventHandle" not found') + * err = ( __cuIpcGetEventHandle)(pHandle, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3697 + * return err + * + * cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcGetEventHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3706 + * return err + * + * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcOpenEventHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenEventHandle(CUevent *__pyx_v_phEvent, CUipcEventHandle __pyx_v_handle) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuIpcOpenEventHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3708 + * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuIpcOpenEventHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuIpcOpenEventHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3708, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3709 + * global __cuIpcOpenEventHandle + * cuPythonInit() + * if __cuIpcOpenEventHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3710 + * cuPythonInit() + * if __cuIpcOpenEventHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') + * err = ( __cuIpcOpenEventHandle)(phEvent, handle) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3711 + * if __cuIpcOpenEventHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuIpcOpenEventHandle)(phEvent, handle) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuIpcOpenEventHandle_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3711, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3711, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3710 + * cuPythonInit() + * if __cuIpcOpenEventHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') + * err = ( __cuIpcOpenEventHandle)(phEvent, handle) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3709 + * global __cuIpcOpenEventHandle + * cuPythonInit() + * if __cuIpcOpenEventHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3712 + * with gil: + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') + * err = ( __cuIpcOpenEventHandle)(phEvent, handle) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent *, CUipcEventHandle))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle)(__pyx_v_phEvent, __pyx_v_handle); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3712, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3713 + * raise RuntimeError('Function "cuIpcOpenEventHandle" not found') + * err = ( __cuIpcOpenEventHandle)(phEvent, handle) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3706 + * return err + * + * cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcOpenEventHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3715 + * return err + * + * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcGetMemHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetMemHandle(CUipcMemHandle *__pyx_v_pHandle, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuIpcGetMemHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3717 + * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuIpcGetMemHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuIpcGetMemHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3717, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3718 + * global __cuIpcGetMemHandle + * cuPythonInit() + * if __cuIpcGetMemHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3719 + * cuPythonInit() + * if __cuIpcGetMemHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') + * err = ( __cuIpcGetMemHandle)(pHandle, dptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3720 + * if __cuIpcGetMemHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuIpcGetMemHandle)(pHandle, dptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuIpcGetMemHandle_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3720, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3720, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3719 + * cuPythonInit() + * if __cuIpcGetMemHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') + * err = ( __cuIpcGetMemHandle)(pHandle, dptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3718 + * global __cuIpcGetMemHandle + * cuPythonInit() + * if __cuIpcGetMemHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3721 + * with gil: + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') + * err = ( __cuIpcGetMemHandle)(pHandle, dptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUipcMemHandle *, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle)(__pyx_v_pHandle, __pyx_v_dptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3721, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3722 + * raise RuntimeError('Function "cuIpcGetMemHandle" not found') + * err = ( __cuIpcGetMemHandle)(pHandle, dptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3715 + * return err + * + * cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcGetMemHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3724 + * return err + * + * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcOpenMemHandle_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenMemHandle_v2(CUdeviceptr *__pyx_v_pdptr, CUipcMemHandle __pyx_v_handle, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuIpcOpenMemHandle_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3726 + * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuIpcOpenMemHandle_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuIpcOpenMemHandle_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3726, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3727 + * global __cuIpcOpenMemHandle_v2 + * cuPythonInit() + * if __cuIpcOpenMemHandle_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3728 + * cuPythonInit() + * if __cuIpcOpenMemHandle_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') + * err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3729 + * if __cuIpcOpenMemHandle_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3729, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3729, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3728 + * cuPythonInit() + * if __cuIpcOpenMemHandle_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') + * err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3727 + * global __cuIpcOpenMemHandle_v2 + * cuPythonInit() + * if __cuIpcOpenMemHandle_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3730 + * with gil: + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') + * err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, CUipcMemHandle, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2)(__pyx_v_pdptr, __pyx_v_handle, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3730, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3731 + * raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') + * err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3724 + * return err + * + * cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcOpenMemHandle_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuIpcOpenMemHandle_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3733 + * return err + * + * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcCloseMemHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcCloseMemHandle(CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuIpcCloseMemHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3735 + * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuIpcCloseMemHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuIpcCloseMemHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3735, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3736 + * global __cuIpcCloseMemHandle + * cuPythonInit() + * if __cuIpcCloseMemHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3737 + * cuPythonInit() + * if __cuIpcCloseMemHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') + * err = ( __cuIpcCloseMemHandle)(dptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3738 + * if __cuIpcCloseMemHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuIpcCloseMemHandle)(dptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuIpcCloseMemHandle_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3738, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3738, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3737 + * cuPythonInit() + * if __cuIpcCloseMemHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') + * err = ( __cuIpcCloseMemHandle)(dptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3736 + * global __cuIpcCloseMemHandle + * cuPythonInit() + * if __cuIpcCloseMemHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3739 + * with gil: + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') + * err = ( __cuIpcCloseMemHandle)(dptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle)(__pyx_v_dptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3739, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3740 + * raise RuntimeError('Function "cuIpcCloseMemHandle" not found') + * err = ( __cuIpcCloseMemHandle)(dptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3733 + * return err + * + * cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuIpcCloseMemHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3742 + * return err + * + * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostRegister_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostRegister_v2(void *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemHostRegister_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3744 + * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemHostRegister_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemHostRegister_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3744, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3745 + * global __cuMemHostRegister_v2 + * cuPythonInit() + * if __cuMemHostRegister_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3746 + * cuPythonInit() + * if __cuMemHostRegister_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') + * err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3747 + * if __cuMemHostRegister_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemHostRegister_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3747, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3747, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3746 + * cuPythonInit() + * if __cuMemHostRegister_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') + * err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3745 + * global __cuMemHostRegister_v2 + * cuPythonInit() + * if __cuMemHostRegister_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3748 + * with gil: + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') + * err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2)(__pyx_v_p, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3748, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3749 + * raise RuntimeError('Function "cuMemHostRegister_v2" not found') + * err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3742 + * return err + * + * cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostRegister_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemHostRegister_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3751 + * return err + * + * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostUnregister + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostUnregister(void *__pyx_v_p) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemHostUnregister", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3753 + * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemHostUnregister + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemHostUnregister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3753, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3754 + * global __cuMemHostUnregister + * cuPythonInit() + * if __cuMemHostUnregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostUnregister" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3755 + * cuPythonInit() + * if __cuMemHostUnregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostUnregister" not found') + * err = ( __cuMemHostUnregister)(p) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3756 + * if __cuMemHostUnregister == NULL: + * with gil: + * raise RuntimeError('Function "cuMemHostUnregister" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemHostUnregister)(p) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemHostUnregister_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3756, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3756, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3755 + * cuPythonInit() + * if __cuMemHostUnregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemHostUnregister" not found') + * err = ( __cuMemHostUnregister)(p) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3754 + * global __cuMemHostUnregister + * cuPythonInit() + * if __cuMemHostUnregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemHostUnregister" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3757 + * with gil: + * raise RuntimeError('Function "cuMemHostUnregister" not found') + * err = ( __cuMemHostUnregister)(p) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister)(__pyx_v_p); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3757, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3758 + * raise RuntimeError('Function "cuMemHostUnregister" not found') + * err = ( __cuMemHostUnregister)(p) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3751 + * return err + * + * cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemHostUnregister + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3760 + * return err + * + * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3762 + * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3762, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3763 + * global __cuMemcpy + * cuPythonInit() + * if __cuMemcpy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3764 + * cuPythonInit() + * if __cuMemcpy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy" not found') + * err = ( __cuMemcpy)(dst, src, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3765 + * if __cuMemcpy == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy)(dst, src, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3765, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3765, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3764 + * cuPythonInit() + * if __cuMemcpy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy" not found') + * err = ( __cuMemcpy)(dst, src, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3763 + * global __cuMemcpy + * cuPythonInit() + * if __cuMemcpy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3766 + * with gil: + * raise RuntimeError('Function "cuMemcpy" not found') + * err = ( __cuMemcpy)(dst, src, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3766, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3767 + * raise RuntimeError('Function "cuMemcpy" not found') + * err = ( __cuMemcpy)(dst, src, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3760 + * return err + * + * cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3769 + * return err + * + * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeer(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyPeer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3771 + * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyPeer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyPeer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3771, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3772 + * global __cuMemcpyPeer + * cuPythonInit() + * if __cuMemcpyPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyPeer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3773 + * cuPythonInit() + * if __cuMemcpyPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyPeer" not found') + * err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3774 + * if __cuMemcpyPeer == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyPeer" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyPeer_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3774, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3774, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3773 + * cuPythonInit() + * if __cuMemcpyPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyPeer" not found') + * err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3772 + * global __cuMemcpyPeer + * cuPythonInit() + * if __cuMemcpyPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyPeer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3775 + * with gil: + * raise RuntimeError('Function "cuMemcpyPeer" not found') + * err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer)(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3775, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3776 + * raise RuntimeError('Function "cuMemcpyPeer" not found') + * err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3769 + * return err + * + * cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3778 + * return err + * + * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoD_v2(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyHtoD_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3780 + * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyHtoD_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyHtoD_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3780, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3781 + * global __cuMemcpyHtoD_v2 + * cuPythonInit() + * if __cuMemcpyHtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3782 + * cuPythonInit() + * if __cuMemcpyHtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') + * err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3783 + * if __cuMemcpyHtoD_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3783, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3783, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3782 + * cuPythonInit() + * if __cuMemcpyHtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') + * err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3781 + * global __cuMemcpyHtoD_v2 + * cuPythonInit() + * if __cuMemcpyHtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3784 + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') + * err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, void const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3784, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3785 + * raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') + * err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3778 + * return err + * + * cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyHtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3787 + * return err + * + * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoH_v2(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyDtoH_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3789 + * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyDtoH_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyDtoH_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3789, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3790 + * global __cuMemcpyDtoH_v2 + * cuPythonInit() + * if __cuMemcpyDtoH_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3791 + * cuPythonInit() + * if __cuMemcpyDtoH_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') + * err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3792 + * if __cuMemcpyDtoH_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3792, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3792, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3791 + * cuPythonInit() + * if __cuMemcpyDtoH_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') + * err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3790 + * global __cuMemcpyDtoH_v2 + * cuPythonInit() + * if __cuMemcpyDtoH_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3793 + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') + * err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2)(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3793, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3794 + * raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') + * err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3787 + * return err + * + * cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyDtoH_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3796 + * return err + * + * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoD_v2(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyDtoD_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3798 + * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyDtoD_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyDtoD_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3798, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3799 + * global __cuMemcpyDtoD_v2 + * cuPythonInit() + * if __cuMemcpyDtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3800 + * cuPythonInit() + * if __cuMemcpyDtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') + * err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3801 + * if __cuMemcpyDtoD_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3801, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3801, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3800 + * cuPythonInit() + * if __cuMemcpyDtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') + * err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3799 + * global __cuMemcpyDtoD_v2 + * cuPythonInit() + * if __cuMemcpyDtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3802 + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') + * err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3802, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3803 + * raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') + * err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3796 + * return err + * + * cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyDtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3805 + * return err + * + * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyDtoA_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3807 + * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyDtoA_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyDtoA_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3807, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3808 + * global __cuMemcpyDtoA_v2 + * cuPythonInit() + * if __cuMemcpyDtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3809 + * cuPythonInit() + * if __cuMemcpyDtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') + * err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3810 + * if __cuMemcpyDtoA_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3810, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3810, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3809 + * cuPythonInit() + * if __cuMemcpyDtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') + * err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3808 + * global __cuMemcpyDtoA_v2 + * cuPythonInit() + * if __cuMemcpyDtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3811 + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') + * err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray, size_t, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3811, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3812 + * raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') + * err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3805 + * return err + * + * cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyDtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3814 + * return err + * + * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoD_v2(CUdeviceptr __pyx_v_dstDevice, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyAtoD_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3816 + * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyAtoD_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyAtoD_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3816, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3817 + * global __cuMemcpyAtoD_v2 + * cuPythonInit() + * if __cuMemcpyAtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3818 + * cuPythonInit() + * if __cuMemcpyAtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') + * err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3819 + * if __cuMemcpyAtoD_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3819, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3819, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3818 + * cuPythonInit() + * if __cuMemcpyAtoD_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') + * err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3817 + * global __cuMemcpyAtoD_v2 + * cuPythonInit() + * if __cuMemcpyAtoD_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3820 + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') + * err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUarray, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2)(__pyx_v_dstDevice, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3820, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3821 + * raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') + * err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3814 + * return err + * + * cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyAtoD_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3823 + * return err + * + * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyHtoA_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3825 + * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyHtoA_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyHtoA_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3825, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3826 + * global __cuMemcpyHtoA_v2 + * cuPythonInit() + * if __cuMemcpyHtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3827 + * cuPythonInit() + * if __cuMemcpyHtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') + * err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3828 + * if __cuMemcpyHtoA_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3828, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3828, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3827 + * cuPythonInit() + * if __cuMemcpyHtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') + * err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3826 + * global __cuMemcpyHtoA_v2 + * cuPythonInit() + * if __cuMemcpyHtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3829 + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') + * err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray, size_t, void const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3829, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3830 + * raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') + * err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3823 + * return err + * + * cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyHtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3832 + * return err + * + * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoH_v2(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyAtoH_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3834 + * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyAtoH_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyAtoH_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3834, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3835 + * global __cuMemcpyAtoH_v2 + * cuPythonInit() + * if __cuMemcpyAtoH_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3836 + * cuPythonInit() + * if __cuMemcpyAtoH_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') + * err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3837 + * if __cuMemcpyAtoH_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3837, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3837, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3836 + * cuPythonInit() + * if __cuMemcpyAtoH_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') + * err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3835 + * global __cuMemcpyAtoH_v2 + * cuPythonInit() + * if __cuMemcpyAtoH_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3838 + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') + * err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUarray, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2)(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3838, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3839 + * raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') + * err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3832 + * return err + * + * cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyAtoH_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3841 + * return err + * + * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoA_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyAtoA_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3843 + * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyAtoA_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyAtoA_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3843, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3844 + * global __cuMemcpyAtoA_v2 + * cuPythonInit() + * if __cuMemcpyAtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3845 + * cuPythonInit() + * if __cuMemcpyAtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') + * err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3846 + * if __cuMemcpyAtoA_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3846, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3846, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3845 + * cuPythonInit() + * if __cuMemcpyAtoA_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') + * err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3844 + * global __cuMemcpyAtoA_v2 + * cuPythonInit() + * if __cuMemcpyAtoA_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3847 + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') + * err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray, size_t, CUarray, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3847, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3848 + * raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') + * err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3841 + * return err + * + * cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyAtoA_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3850 + * return err + * + * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2D_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy2D_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3852 + * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy2D_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy2D_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3852, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3853 + * global __cuMemcpy2D_v2 + * cuPythonInit() + * if __cuMemcpy2D_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3854 + * cuPythonInit() + * if __cuMemcpy2D_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') + * err = ( __cuMemcpy2D_v2)(pCopy) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3855 + * if __cuMemcpy2D_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy2D_v2)(pCopy) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy2D_v2_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3855, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3855, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3854 + * cuPythonInit() + * if __cuMemcpy2D_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') + * err = ( __cuMemcpy2D_v2)(pCopy) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3853 + * global __cuMemcpy2D_v2 + * cuPythonInit() + * if __cuMemcpy2D_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3856 + * with gil: + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') + * err = ( __cuMemcpy2D_v2)(pCopy) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY2D const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2)(__pyx_v_pCopy); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3856, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3857 + * raise RuntimeError('Function "cuMemcpy2D_v2" not found') + * err = ( __cuMemcpy2D_v2)(pCopy) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3850 + * return err + * + * cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy2D_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3859 + * return err + * + * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DUnaligned_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy2DUnaligned_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3861 + * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy2DUnaligned_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy2DUnaligned_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3861, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3862 + * global __cuMemcpy2DUnaligned_v2 + * cuPythonInit() + * if __cuMemcpy2DUnaligned_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3863 + * cuPythonInit() + * if __cuMemcpy2DUnaligned_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') + * err = ( __cuMemcpy2DUnaligned_v2)(pCopy) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3864 + * if __cuMemcpy2DUnaligned_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy2DUnaligned_v2)(pCopy) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy2DUnaligned_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3864, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3864, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3863 + * cuPythonInit() + * if __cuMemcpy2DUnaligned_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') + * err = ( __cuMemcpy2DUnaligned_v2)(pCopy) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3862 + * global __cuMemcpy2DUnaligned_v2 + * cuPythonInit() + * if __cuMemcpy2DUnaligned_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3865 + * with gil: + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') + * err = ( __cuMemcpy2DUnaligned_v2)(pCopy) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY2D const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2)(__pyx_v_pCopy); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3865, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3866 + * raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') + * err = ( __cuMemcpy2DUnaligned_v2)(pCopy) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3859 + * return err + * + * cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy2DUnaligned_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3868 + * return err + * + * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3D_v2(CUDA_MEMCPY3D const *__pyx_v_pCopy) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy3D_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3870 + * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy3D_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy3D_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3870, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3871 + * global __cuMemcpy3D_v2 + * cuPythonInit() + * if __cuMemcpy3D_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3872 + * cuPythonInit() + * if __cuMemcpy3D_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') + * err = ( __cuMemcpy3D_v2)(pCopy) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3873 + * if __cuMemcpy3D_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy3D_v2)(pCopy) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy3D_v2_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3873, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3873, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3872 + * cuPythonInit() + * if __cuMemcpy3D_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') + * err = ( __cuMemcpy3D_v2)(pCopy) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3871 + * global __cuMemcpy3D_v2 + * cuPythonInit() + * if __cuMemcpy3D_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3874 + * with gil: + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') + * err = ( __cuMemcpy3D_v2)(pCopy) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY3D const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2)(__pyx_v_pCopy); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3874, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3875 + * raise RuntimeError('Function "cuMemcpy3D_v2" not found') + * err = ( __cuMemcpy3D_v2)(pCopy) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3868 + * return err + * + * cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy3D_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3877 + * return err + * + * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy3DPeer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3879 + * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy3DPeer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy3DPeer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3879, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3880 + * global __cuMemcpy3DPeer + * cuPythonInit() + * if __cuMemcpy3DPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3881 + * cuPythonInit() + * if __cuMemcpy3DPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') + * err = ( __cuMemcpy3DPeer)(pCopy) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3882 + * if __cuMemcpy3DPeer == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy3DPeer)(pCopy) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy3DPeer_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3882, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3882, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3881 + * cuPythonInit() + * if __cuMemcpy3DPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') + * err = ( __cuMemcpy3DPeer)(pCopy) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3880 + * global __cuMemcpy3DPeer + * cuPythonInit() + * if __cuMemcpy3DPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3883 + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') + * err = ( __cuMemcpy3DPeer)(pCopy) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY3D_PEER const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer)(__pyx_v_pCopy); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3883, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3884 + * raise RuntimeError('Function "cuMemcpy3DPeer" not found') + * err = ( __cuMemcpy3DPeer)(pCopy) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3877 + * return err + * + * cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3886 + * return err + * + * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAsync(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3888 + * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3888, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3889 + * global __cuMemcpyAsync + * cuPythonInit() + * if __cuMemcpyAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3890 + * cuPythonInit() + * if __cuMemcpyAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAsync" not found') + * err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3891 + * if __cuMemcpyAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyAsync_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3891, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3891, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3890 + * cuPythonInit() + * if __cuMemcpyAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAsync" not found') + * err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3889 + * global __cuMemcpyAsync + * cuPythonInit() + * if __cuMemcpyAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3892 + * with gil: + * raise RuntimeError('Function "cuMemcpyAsync" not found') + * err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync)(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3892, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3893 + * raise RuntimeError('Function "cuMemcpyAsync" not found') + * err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3886 + * return err + * + * cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3895 + * return err + * + * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeerAsync(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyPeerAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3897 + * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyPeerAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyPeerAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3897, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3898 + * global __cuMemcpyPeerAsync + * cuPythonInit() + * if __cuMemcpyPeerAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3899 + * cuPythonInit() + * if __cuMemcpyPeerAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') + * err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3900 + * if __cuMemcpyPeerAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyPeerAsync_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3900, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3900, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3899 + * cuPythonInit() + * if __cuMemcpyPeerAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') + * err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3898 + * global __cuMemcpyPeerAsync + * cuPythonInit() + * if __cuMemcpyPeerAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3901 + * with gil: + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') + * err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync)(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3901, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3902 + * raise RuntimeError('Function "cuMemcpyPeerAsync" not found') + * err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3895 + * return err + * + * cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3904 + * return err + * + * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoDAsync_v2(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyHtoDAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3906 + * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyHtoDAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyHtoDAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3906, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3907 + * global __cuMemcpyHtoDAsync_v2 + * cuPythonInit() + * if __cuMemcpyHtoDAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3908 + * cuPythonInit() + * if __cuMemcpyHtoDAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') + * err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3909 + * if __cuMemcpyHtoDAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3909, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3909, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3908 + * cuPythonInit() + * if __cuMemcpyHtoDAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') + * err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3907 + * global __cuMemcpyHtoDAsync_v2 + * cuPythonInit() + * if __cuMemcpyHtoDAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3910 + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') + * err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, void const *, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2)(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3910, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3911 + * raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') + * err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3904 + * return err + * + * cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyHtoDAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3913 + * return err + * + * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoHAsync_v2(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyDtoHAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3915 + * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyDtoHAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyDtoHAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3915, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3916 + * global __cuMemcpyDtoHAsync_v2 + * cuPythonInit() + * if __cuMemcpyDtoHAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3917 + * cuPythonInit() + * if __cuMemcpyDtoHAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') + * err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3918 + * if __cuMemcpyDtoHAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3918, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3918, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3917 + * cuPythonInit() + * if __cuMemcpyDtoHAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') + * err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3916 + * global __cuMemcpyDtoHAsync_v2 + * cuPythonInit() + * if __cuMemcpyDtoHAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3919 + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') + * err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2)(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3919, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3920 + * raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') + * err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3913 + * return err + * + * cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyDtoHAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3922 + * return err + * + * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoDAsync_v2(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyDtoDAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3924 + * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyDtoDAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyDtoDAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3924, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3925 + * global __cuMemcpyDtoDAsync_v2 + * cuPythonInit() + * if __cuMemcpyDtoDAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3926 + * cuPythonInit() + * if __cuMemcpyDtoDAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') + * err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3927 + * if __cuMemcpyDtoDAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3927, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3927, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3926 + * cuPythonInit() + * if __cuMemcpyDtoDAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') + * err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3925 + * global __cuMemcpyDtoDAsync_v2 + * cuPythonInit() + * if __cuMemcpyDtoDAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3928 + * with gil: + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') + * err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUdeviceptr, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2)(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3928, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3929 + * raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') + * err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3922 + * return err + * + * cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyDtoDAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3931 + * return err + * + * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoAAsync_v2(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyHtoAAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3933 + * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyHtoAAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyHtoAAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3933, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3934 + * global __cuMemcpyHtoAAsync_v2 + * cuPythonInit() + * if __cuMemcpyHtoAAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3935 + * cuPythonInit() + * if __cuMemcpyHtoAAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') + * err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3936 + * if __cuMemcpyHtoAAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3936, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3936, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3935 + * cuPythonInit() + * if __cuMemcpyHtoAAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') + * err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3934 + * global __cuMemcpyHtoAAsync_v2 + * cuPythonInit() + * if __cuMemcpyHtoAAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3937 + * with gil: + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') + * err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray, size_t, void const *, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2)(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3937, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3938 + * raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') + * err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3931 + * return err + * + * cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyHtoAAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3940 + * return err + * + * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoHAsync_v2(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyAtoHAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3942 + * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyAtoHAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyAtoHAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3942, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3943 + * global __cuMemcpyAtoHAsync_v2 + * cuPythonInit() + * if __cuMemcpyAtoHAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3944 + * cuPythonInit() + * if __cuMemcpyAtoHAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') + * err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3945 + * if __cuMemcpyAtoHAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3945, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3945, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3944 + * cuPythonInit() + * if __cuMemcpyAtoHAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') + * err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3943 + * global __cuMemcpyAtoHAsync_v2 + * cuPythonInit() + * if __cuMemcpyAtoHAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3946 + * with gil: + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') + * err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUarray, size_t, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2)(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3946, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3947 + * raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') + * err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3940 + * return err + * + * cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyAtoHAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3949 + * return err + * + * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DAsync_v2(CUDA_MEMCPY2D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy2DAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3951 + * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy2DAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy2DAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3951, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3952 + * global __cuMemcpy2DAsync_v2 + * cuPythonInit() + * if __cuMemcpy2DAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3953 + * cuPythonInit() + * if __cuMemcpy2DAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') + * err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3954 + * if __cuMemcpy2DAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy2DAsync_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3954, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3954, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3953 + * cuPythonInit() + * if __cuMemcpy2DAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') + * err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3952 + * global __cuMemcpy2DAsync_v2 + * cuPythonInit() + * if __cuMemcpy2DAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3955 + * with gil: + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') + * err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY2D const *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3955, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3956 + * raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') + * err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3949 + * return err + * + * cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy2DAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3958 + * return err + * + * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DAsync_v2(CUDA_MEMCPY3D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy3DAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3960 + * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy3DAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy3DAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3960, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3961 + * global __cuMemcpy3DAsync_v2 + * cuPythonInit() + * if __cuMemcpy3DAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3962 + * cuPythonInit() + * if __cuMemcpy3DAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') + * err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3963 + * if __cuMemcpy3DAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy3DAsync_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3963, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3963, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3962 + * cuPythonInit() + * if __cuMemcpy3DAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') + * err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3961 + * global __cuMemcpy3DAsync_v2 + * cuPythonInit() + * if __cuMemcpy3DAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3964 + * with gil: + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') + * err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY3D const *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2)(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3964, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3965 + * raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') + * err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3958 + * return err + * + * cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy3DAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3967 + * return err + * + * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy3DPeerAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3969 + * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy3DPeerAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy3DPeerAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3969, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3970 + * global __cuMemcpy3DPeerAsync + * cuPythonInit() + * if __cuMemcpy3DPeerAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3971 + * cuPythonInit() + * if __cuMemcpy3DPeerAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') + * err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3972 + * if __cuMemcpy3DPeerAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy3DPeerAsync_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3972, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3972, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3971 + * cuPythonInit() + * if __cuMemcpy3DPeerAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') + * err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3970 + * global __cuMemcpy3DPeerAsync + * cuPythonInit() + * if __cuMemcpy3DPeerAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3973 + * with gil: + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') + * err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_MEMCPY3D_PEER const *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync)(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3973, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3974 + * raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') + * err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3967 + * return err + * + * cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3976 + * return err + * + * cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyBatchAsync(CUdeviceptr *__pyx_v_dsts, CUdeviceptr *__pyx_v_srcs, size_t *__pyx_v_sizes, size_t __pyx_v_count, CUmemcpyAttributes *__pyx_v_attrs, size_t *__pyx_v_attrsIdxs, size_t __pyx_v_numAttrs, size_t *__pyx_v_failIdx, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpyBatchAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3978 + * cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpyBatchAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpyBatchAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3978, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3979 + * global __cuMemcpyBatchAsync + * cuPythonInit() + * if __cuMemcpyBatchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3980 + * cuPythonInit() + * if __cuMemcpyBatchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + * err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3981 + * if __cuMemcpyBatchAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpyBatchAsync_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3981, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3981, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3980 + * cuPythonInit() + * if __cuMemcpyBatchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + * err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3979 + * global __cuMemcpyBatchAsync + * cuPythonInit() + * if __cuMemcpyBatchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3982 + * with gil: + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + * err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, CUdeviceptr *, size_t *, size_t, CUmemcpyAttributes *, size_t *, size_t, size_t *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync)(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3982, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3983 + * raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + * err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3976 + * return err + * + * cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpyBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3985 + * return err + * + * cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DBatchAsync(size_t __pyx_v_numOps, CUDA_MEMCPY3D_BATCH_OP *__pyx_v_opList, size_t *__pyx_v_failIdx, unsigned PY_LONG_LONG __pyx_v_flags, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemcpy3DBatchAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3987 + * cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemcpy3DBatchAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemcpy3DBatchAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3987, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3988 + * global __cuMemcpy3DBatchAsync + * cuPythonInit() + * if __cuMemcpy3DBatchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3989 + * cuPythonInit() + * if __cuMemcpy3DBatchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + * err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3990 + * if __cuMemcpy3DBatchAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemcpy3DBatchAsync_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3990, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3990, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3989 + * cuPythonInit() + * if __cuMemcpy3DBatchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + * err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3988 + * global __cuMemcpy3DBatchAsync + * cuPythonInit() + * if __cuMemcpy3DBatchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3991 + * with gil: + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + * err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t, CUDA_MEMCPY3D_BATCH_OP *, size_t *, unsigned PY_LONG_LONG, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync)(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 3991, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":3992 + * raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + * err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3985 + * return err + * + * cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemcpy3DBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":3994 + * return err + * + * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8_v2(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD8_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":3996 + * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD8_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD8_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3996, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":3997 + * global __cuMemsetD8_v2 + * cuPythonInit() + * if __cuMemsetD8_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD8_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":3998 + * cuPythonInit() + * if __cuMemsetD8_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD8_v2" not found') + * err = ( __cuMemsetD8_v2)(dstDevice, uc, N) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":3999 + * if __cuMemsetD8_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD8_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD8_v2)(dstDevice, uc, N) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD8_v2_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3999, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 3999, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3998 + * cuPythonInit() + * if __cuMemsetD8_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD8_v2" not found') + * err = ( __cuMemsetD8_v2)(dstDevice, uc, N) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":3997 + * global __cuMemsetD8_v2 + * cuPythonInit() + * if __cuMemsetD8_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD8_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4000 + * with gil: + * raise RuntimeError('Function "cuMemsetD8_v2" not found') + * err = ( __cuMemsetD8_v2)(dstDevice, uc, N) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned char, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2)(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4000, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4001 + * raise RuntimeError('Function "cuMemsetD8_v2" not found') + * err = ( __cuMemsetD8_v2)(dstDevice, uc, N) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":3994 + * return err + * + * cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD8_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4003 + * return err + * + * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16_v2(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD16_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4005 + * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD16_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD16_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4005, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4006 + * global __cuMemsetD16_v2 + * cuPythonInit() + * if __cuMemsetD16_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD16_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4007 + * cuPythonInit() + * if __cuMemsetD16_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD16_v2" not found') + * err = ( __cuMemsetD16_v2)(dstDevice, us, N) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4008 + * if __cuMemsetD16_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD16_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD16_v2)(dstDevice, us, N) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD16_v2_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4008, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4008, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4007 + * cuPythonInit() + * if __cuMemsetD16_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD16_v2" not found') + * err = ( __cuMemsetD16_v2)(dstDevice, us, N) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4006 + * global __cuMemsetD16_v2 + * cuPythonInit() + * if __cuMemsetD16_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD16_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4009 + * with gil: + * raise RuntimeError('Function "cuMemsetD16_v2" not found') + * err = ( __cuMemsetD16_v2)(dstDevice, us, N) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned short, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2)(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4009, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4010 + * raise RuntimeError('Function "cuMemsetD16_v2" not found') + * err = ( __cuMemsetD16_v2)(dstDevice, us, N) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4003 + * return err + * + * cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD16_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4012 + * return err + * + * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32_v2(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD32_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4014 + * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD32_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD32_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4014, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4015 + * global __cuMemsetD32_v2 + * cuPythonInit() + * if __cuMemsetD32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD32_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4016 + * cuPythonInit() + * if __cuMemsetD32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD32_v2" not found') + * err = ( __cuMemsetD32_v2)(dstDevice, ui, N) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4017 + * if __cuMemsetD32_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD32_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD32_v2)(dstDevice, ui, N) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD32_v2_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4017, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4017, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4016 + * cuPythonInit() + * if __cuMemsetD32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD32_v2" not found') + * err = ( __cuMemsetD32_v2)(dstDevice, ui, N) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4015 + * global __cuMemsetD32_v2 + * cuPythonInit() + * if __cuMemsetD32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD32_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4018 + * with gil: + * raise RuntimeError('Function "cuMemsetD32_v2" not found') + * err = ( __cuMemsetD32_v2)(dstDevice, ui, N) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned int, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2)(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4018, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4019 + * raise RuntimeError('Function "cuMemsetD32_v2" not found') + * err = ( __cuMemsetD32_v2)(dstDevice, ui, N) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4012 + * return err + * + * cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4021 + * return err + * + * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D8_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4023 + * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D8_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D8_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4023, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4024 + * global __cuMemsetD2D8_v2 + * cuPythonInit() + * if __cuMemsetD2D8_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4025 + * cuPythonInit() + * if __cuMemsetD2D8_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') + * err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4026 + * if __cuMemsetD2D8_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4026, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4026, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4025 + * cuPythonInit() + * if __cuMemsetD2D8_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') + * err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4024 + * global __cuMemsetD2D8_v2 + * cuPythonInit() + * if __cuMemsetD2D8_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4027 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') + * err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4027, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4028 + * raise RuntimeError('Function "cuMemsetD2D8_v2" not found') + * err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4021 + * return err + * + * cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D8_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4030 + * return err + * + * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D16_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4032 + * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D16_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D16_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4032, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4033 + * global __cuMemsetD2D16_v2 + * cuPythonInit() + * if __cuMemsetD2D16_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4034 + * cuPythonInit() + * if __cuMemsetD2D16_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') + * err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4035 + * if __cuMemsetD2D16_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4035, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4035, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4034 + * cuPythonInit() + * if __cuMemsetD2D16_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') + * err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4033 + * global __cuMemsetD2D16_v2 + * cuPythonInit() + * if __cuMemsetD2D16_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4036 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') + * err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4036, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4037 + * raise RuntimeError('Function "cuMemsetD2D16_v2" not found') + * err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4030 + * return err + * + * cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D16_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4039 + * return err + * + * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32_v2(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D32_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4041 + * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D32_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D32_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4041, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4042 + * global __cuMemsetD2D32_v2 + * cuPythonInit() + * if __cuMemsetD2D32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4043 + * cuPythonInit() + * if __cuMemsetD2D32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') + * err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4044 + * if __cuMemsetD2D32_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4044, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4044, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4043 + * cuPythonInit() + * if __cuMemsetD2D32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') + * err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4042 + * global __cuMemsetD2D32_v2 + * cuPythonInit() + * if __cuMemsetD2D32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4045 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') + * err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4045, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4046 + * raise RuntimeError('Function "cuMemsetD2D32_v2" not found') + * err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4039 + * return err + * + * cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4048 + * return err + * + * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8Async(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD8Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4050 + * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD8Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD8Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4050, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4051 + * global __cuMemsetD8Async + * cuPythonInit() + * if __cuMemsetD8Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD8Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4052 + * cuPythonInit() + * if __cuMemsetD8Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD8Async" not found') + * err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4053 + * if __cuMemsetD8Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD8Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD8Async_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4053, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4053, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4052 + * cuPythonInit() + * if __cuMemsetD8Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD8Async" not found') + * err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4051 + * global __cuMemsetD8Async + * cuPythonInit() + * if __cuMemsetD8Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD8Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4054 + * with gil: + * raise RuntimeError('Function "cuMemsetD8Async" not found') + * err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned char, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async)(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4054, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4055 + * raise RuntimeError('Function "cuMemsetD8Async" not found') + * err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4048 + * return err + * + * cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4057 + * return err + * + * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16Async(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD16Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4059 + * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD16Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD16Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4059, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4060 + * global __cuMemsetD16Async + * cuPythonInit() + * if __cuMemsetD16Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD16Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4061 + * cuPythonInit() + * if __cuMemsetD16Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD16Async" not found') + * err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4062 + * if __cuMemsetD16Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD16Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD16Async_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4062, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4062, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4061 + * cuPythonInit() + * if __cuMemsetD16Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD16Async" not found') + * err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4060 + * global __cuMemsetD16Async + * cuPythonInit() + * if __cuMemsetD16Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD16Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4063 + * with gil: + * raise RuntimeError('Function "cuMemsetD16Async" not found') + * err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned short, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async)(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4063, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4064 + * raise RuntimeError('Function "cuMemsetD16Async" not found') + * err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4057 + * return err + * + * cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4066 + * return err + * + * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32Async(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD32Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4068 + * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD32Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD32Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4068, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4069 + * global __cuMemsetD32Async + * cuPythonInit() + * if __cuMemsetD32Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD32Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4070 + * cuPythonInit() + * if __cuMemsetD32Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD32Async" not found') + * err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4071 + * if __cuMemsetD32Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD32Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD32Async_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4071, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4071, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4070 + * cuPythonInit() + * if __cuMemsetD32Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD32Async" not found') + * err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4069 + * global __cuMemsetD32Async + * cuPythonInit() + * if __cuMemsetD32Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD32Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4072 + * with gil: + * raise RuntimeError('Function "cuMemsetD32Async" not found') + * err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, unsigned int, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async)(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4072, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4073 + * raise RuntimeError('Function "cuMemsetD32Async" not found') + * err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4066 + * return err + * + * cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4075 + * return err + * + * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D8Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4077 + * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D8Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D8Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4077, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4078 + * global __cuMemsetD2D8Async + * cuPythonInit() + * if __cuMemsetD2D8Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4079 + * cuPythonInit() + * if __cuMemsetD2D8Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') + * err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4080 + * if __cuMemsetD2D8Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D8Async_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4080, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4080, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4079 + * cuPythonInit() + * if __cuMemsetD2D8Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') + * err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4078 + * global __cuMemsetD2D8Async + * cuPythonInit() + * if __cuMemsetD2D8Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4081 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') + * err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4081, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4082 + * raise RuntimeError('Function "cuMemsetD2D8Async" not found') + * err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4075 + * return err + * + * cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4084 + * return err + * + * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D16Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4086 + * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D16Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D16Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4086, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4087 + * global __cuMemsetD2D16Async + * cuPythonInit() + * if __cuMemsetD2D16Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4088 + * cuPythonInit() + * if __cuMemsetD2D16Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') + * err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4089 + * if __cuMemsetD2D16Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D16Async_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4089, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4089, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4088 + * cuPythonInit() + * if __cuMemsetD2D16Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') + * err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4087 + * global __cuMemsetD2D16Async + * cuPythonInit() + * if __cuMemsetD2D16Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4090 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') + * err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4090, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4091 + * raise RuntimeError('Function "cuMemsetD2D16Async" not found') + * err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4084 + * return err + * + * cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4093 + * return err + * + * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemsetD2D32Async", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4095 + * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemsetD2D32Async + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemsetD2D32Async == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4095, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4096 + * global __cuMemsetD2D32Async + * cuPythonInit() + * if __cuMemsetD2D32Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4097 + * cuPythonInit() + * if __cuMemsetD2D32Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') + * err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4098 + * if __cuMemsetD2D32Async == NULL: + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemsetD2D32Async_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4098, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4098, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4097 + * cuPythonInit() + * if __cuMemsetD2D32Async == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') + * err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4096 + * global __cuMemsetD2D32Async + * cuPythonInit() + * if __cuMemsetD2D32Async == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4099 + * with gil: + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') + * err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async)(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4099, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4100 + * raise RuntimeError('Function "cuMemsetD2D32Async" not found') + * err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4093 + * return err + * + * cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4102 + * return err + * + * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayCreate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayCreate_v2(CUarray *__pyx_v_pHandle, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_pAllocateArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayCreate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4104 + * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayCreate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayCreate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4104, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4105 + * global __cuArrayCreate_v2 + * cuPythonInit() + * if __cuArrayCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayCreate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4106 + * cuPythonInit() + * if __cuArrayCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayCreate_v2" not found') + * err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4107 + * if __cuArrayCreate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayCreate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayCreate_v2_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4107, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4107, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4106 + * cuPythonInit() + * if __cuArrayCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayCreate_v2" not found') + * err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4105 + * global __cuArrayCreate_v2 + * cuPythonInit() + * if __cuArrayCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayCreate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4108 + * with gil: + * raise RuntimeError('Function "cuArrayCreate_v2" not found') + * err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUDA_ARRAY_DESCRIPTOR const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4108, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4109 + * raise RuntimeError('Function "cuArrayCreate_v2" not found') + * err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4102 + * return err + * + * cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayCreate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4111 + * return err + * + * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetDescriptor_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayGetDescriptor_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4113 + * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayGetDescriptor_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayGetDescriptor_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4113, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4114 + * global __cuArrayGetDescriptor_v2 + * cuPythonInit() + * if __cuArrayGetDescriptor_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4115 + * cuPythonInit() + * if __cuArrayGetDescriptor_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') + * err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4116 + * if __cuArrayGetDescriptor_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayGetDescriptor_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4116, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4116, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4115 + * cuPythonInit() + * if __cuArrayGetDescriptor_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') + * err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4114 + * global __cuArrayGetDescriptor_v2 + * cuPythonInit() + * if __cuArrayGetDescriptor_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4117 + * with gil: + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') + * err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY_DESCRIPTOR *, CUarray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4117, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4118 + * raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') + * err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4111 + * return err + * + * cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetDescriptor_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayGetDescriptor_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4120 + * return err + * + * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetSparseProperties + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUarray __pyx_v_array) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayGetSparseProperties", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4122 + * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayGetSparseProperties + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayGetSparseProperties == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4122, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4123 + * global __cuArrayGetSparseProperties + * cuPythonInit() + * if __cuArrayGetSparseProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4124 + * cuPythonInit() + * if __cuArrayGetSparseProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') + * err = ( __cuArrayGetSparseProperties)(sparseProperties, array) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4125 + * if __cuArrayGetSparseProperties == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayGetSparseProperties)(sparseProperties, array) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayGetSparsePropert}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4125, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4125, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4124 + * cuPythonInit() + * if __cuArrayGetSparseProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') + * err = ( __cuArrayGetSparseProperties)(sparseProperties, array) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4123 + * global __cuArrayGetSparseProperties + * cuPythonInit() + * if __cuArrayGetSparseProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4126 + * with gil: + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') + * err = ( __cuArrayGetSparseProperties)(sparseProperties, array) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_array); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4126, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4127 + * raise RuntimeError('Function "cuArrayGetSparseProperties" not found') + * err = ( __cuArrayGetSparseProperties)(sparseProperties, array) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4120 + * return err + * + * cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetSparseProperties + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4129 + * return err + * + * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetSparseProperties + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUmipmappedArray __pyx_v_mipmap) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMipmappedArrayGetSparseProperties", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4131 + * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMipmappedArrayGetSparseProperties + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMipmappedArrayGetSparseProperties == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4131, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4132 + * global __cuMipmappedArrayGetSparseProperties + * cuPythonInit() + * if __cuMipmappedArrayGetSparseProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4133 + * cuPythonInit() + * if __cuMipmappedArrayGetSparseProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') + * err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4134 + * if __cuMipmappedArrayGetSparseProperties == NULL: + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') # <<<<<<<<<<<<<< + * err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMipmappedArrayGetSpar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4134, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4134, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4133 + * cuPythonInit() + * if __cuMipmappedArrayGetSparseProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') + * err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4132 + * global __cuMipmappedArrayGetSparseProperties + * cuPythonInit() + * if __cuMipmappedArrayGetSparseProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4135 + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') + * err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties)(__pyx_v_sparseProperties, __pyx_v_mipmap); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4135, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4136 + * raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') + * err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4129 + * return err + * + * cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetSparseProperties + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4138 + * return err + * + * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetMemoryRequirements + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUarray __pyx_v_array, CUdevice __pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayGetMemoryRequirements", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4140 + * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayGetMemoryRequirements + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayGetMemoryRequirements == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4140, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4141 + * global __cuArrayGetMemoryRequirements + * cuPythonInit() + * if __cuArrayGetMemoryRequirements == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4142 + * cuPythonInit() + * if __cuArrayGetMemoryRequirements == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') + * err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4143 + * if __cuArrayGetMemoryRequirements == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayGetMemoryRequire}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4143, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4143, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4142 + * cuPythonInit() + * if __cuArrayGetMemoryRequirements == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') + * err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4141 + * global __cuArrayGetMemoryRequirements + * cuPythonInit() + * if __cuArrayGetMemoryRequirements == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4144 + * with gil: + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') + * err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4144, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4145 + * raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') + * err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4138 + * return err + * + * cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetMemoryRequirements + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4147 + * return err + * + * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetMemoryRequirements + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUmipmappedArray __pyx_v_mipmap, CUdevice __pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMipmappedArrayGetMemoryRequirements", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4149 + * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMipmappedArrayGetMemoryRequirements + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMipmappedArrayGetMemoryRequirements == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4149, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4150 + * global __cuMipmappedArrayGetMemoryRequirements + * cuPythonInit() + * if __cuMipmappedArrayGetMemoryRequirements == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4151 + * cuPythonInit() + * if __cuMipmappedArrayGetMemoryRequirements == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') + * err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4152 + * if __cuMipmappedArrayGetMemoryRequirements == NULL: + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') # <<<<<<<<<<<<<< + * err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMipmappedArrayGetMemo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4152, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4152, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4151 + * cuPythonInit() + * if __cuMipmappedArrayGetMemoryRequirements == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') + * err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4150 + * global __cuMipmappedArrayGetMemoryRequirements + * cuPythonInit() + * if __cuMipmappedArrayGetMemoryRequirements == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4153 + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') + * err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements)(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4153, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4154 + * raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') + * err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4147 + * return err + * + * cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetMemoryRequirements + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4156 + * return err + * + * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetPlane + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetPlane(CUarray *__pyx_v_pPlaneArray, CUarray __pyx_v_hArray, unsigned int __pyx_v_planeIdx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayGetPlane", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4158 + * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayGetPlane + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayGetPlane == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4158, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4159 + * global __cuArrayGetPlane + * cuPythonInit() + * if __cuArrayGetPlane == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetPlane" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4160 + * cuPythonInit() + * if __cuArrayGetPlane == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetPlane" not found') + * err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4161 + * if __cuArrayGetPlane == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayGetPlane" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayGetPlane_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4161, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4161, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4160 + * cuPythonInit() + * if __cuArrayGetPlane == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayGetPlane" not found') + * err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4159 + * global __cuArrayGetPlane + * cuPythonInit() + * if __cuArrayGetPlane == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayGetPlane" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4162 + * with gil: + * raise RuntimeError('Function "cuArrayGetPlane" not found') + * err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUarray, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane)(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4162, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4163 + * raise RuntimeError('Function "cuArrayGetPlane" not found') + * err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4156 + * return err + * + * cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayGetPlane + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4165 + * return err + * + * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayDestroy(CUarray __pyx_v_hArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArrayDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4167 + * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArrayDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArrayDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4167, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4168 + * global __cuArrayDestroy + * cuPythonInit() + * if __cuArrayDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4169 + * cuPythonInit() + * if __cuArrayDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayDestroy" not found') + * err = ( __cuArrayDestroy)(hArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4170 + * if __cuArrayDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuArrayDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuArrayDestroy)(hArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArrayDestroy_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4170, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4170, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4169 + * cuPythonInit() + * if __cuArrayDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArrayDestroy" not found') + * err = ( __cuArrayDestroy)(hArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4168 + * global __cuArrayDestroy + * cuPythonInit() + * if __cuArrayDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArrayDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4171 + * with gil: + * raise RuntimeError('Function "cuArrayDestroy" not found') + * err = ( __cuArrayDestroy)(hArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy)(__pyx_v_hArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4171, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4172 + * raise RuntimeError('Function "cuArrayDestroy" not found') + * err = ( __cuArrayDestroy)(hArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4165 + * return err + * + * cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArrayDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4174 + * return err + * + * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArray3DCreate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DCreate_v2(CUarray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pAllocateArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArray3DCreate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4176 + * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArray3DCreate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArray3DCreate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4176, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4177 + * global __cuArray3DCreate_v2 + * cuPythonInit() + * if __cuArray3DCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4178 + * cuPythonInit() + * if __cuArray3DCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') + * err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4179 + * if __cuArray3DCreate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArray3DCreate_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4179, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4179, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4178 + * cuPythonInit() + * if __cuArray3DCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') + * err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4177 + * global __cuArray3DCreate_v2 + * cuPythonInit() + * if __cuArray3DCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4180 + * with gil: + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') + * err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2)(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4180, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4181 + * raise RuntimeError('Function "cuArray3DCreate_v2" not found') + * err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4174 + * return err + * + * cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArray3DCreate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArray3DCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4183 + * return err + * + * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArray3DGetDescriptor_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuArray3DGetDescriptor_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4185 + * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuArray3DGetDescriptor_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuArray3DGetDescriptor_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4185, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4186 + * global __cuArray3DGetDescriptor_v2 + * cuPythonInit() + * if __cuArray3DGetDescriptor_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4187 + * cuPythonInit() + * if __cuArray3DGetDescriptor_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') + * err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4188 + * if __cuArray3DGetDescriptor_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuArray3DGetDescriptor}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4188, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4188, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4187 + * cuPythonInit() + * if __cuArray3DGetDescriptor_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') + * err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4186 + * global __cuArray3DGetDescriptor_v2 + * cuPythonInit() + * if __cuArray3DGetDescriptor_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4189 + * with gil: + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') + * err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_ARRAY3D_DESCRIPTOR *, CUarray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2)(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4189, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4190 + * raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') + * err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4183 + * return err + * + * cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuArray3DGetDescriptor_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuArray3DGetDescriptor_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4192 + * return err + * + * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayCreate(CUmipmappedArray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMipmappedArrayCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4194 + * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMipmappedArrayCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMipmappedArrayCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4194, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4195 + * global __cuMipmappedArrayCreate + * cuPythonInit() + * if __cuMipmappedArrayCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4196 + * cuPythonInit() + * if __cuMipmappedArrayCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') + * err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4197 + * if __cuMipmappedArrayCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMipmappedArrayCreate}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4197, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4197, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4196 + * cuPythonInit() + * if __cuMipmappedArrayCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') + * err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4195 + * global __cuMipmappedArrayCreate + * cuPythonInit() + * if __cuMipmappedArrayCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4198 + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') + * err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate)(__pyx_v_pHandle, __pyx_v_pMipmappedArrayDesc, __pyx_v_numMipmapLevels); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4198, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4199 + * raise RuntimeError('Function "cuMipmappedArrayCreate" not found') + * err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4192 + * return err + * + * cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4201 + * return err + * + * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetLevel + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetLevel(CUarray *__pyx_v_pLevelArray, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_level) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMipmappedArrayGetLevel", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4203 + * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMipmappedArrayGetLevel + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMipmappedArrayGetLevel == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4203, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4204 + * global __cuMipmappedArrayGetLevel + * cuPythonInit() + * if __cuMipmappedArrayGetLevel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4205 + * cuPythonInit() + * if __cuMipmappedArrayGetLevel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') + * err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4206 + * if __cuMipmappedArrayGetLevel == NULL: + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') # <<<<<<<<<<<<<< + * err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMipmappedArrayGetLeve}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4206, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4206, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4205 + * cuPythonInit() + * if __cuMipmappedArrayGetLevel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') + * err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4204 + * global __cuMipmappedArrayGetLevel + * cuPythonInit() + * if __cuMipmappedArrayGetLevel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4207 + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') + * err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUmipmappedArray, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel)(__pyx_v_pLevelArray, __pyx_v_hMipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4207, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4208 + * raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') + * err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4201 + * return err + * + * cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetLevel + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4210 + * return err + * + * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayDestroy(CUmipmappedArray __pyx_v_hMipmappedArray) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMipmappedArrayDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4212 + * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMipmappedArrayDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMipmappedArrayDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4212, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4213 + * global __cuMipmappedArrayDestroy + * cuPythonInit() + * if __cuMipmappedArrayDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4214 + * cuPythonInit() + * if __cuMipmappedArrayDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') + * err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4215 + * if __cuMipmappedArrayDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMipmappedArrayDestroy}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4215, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4215, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4214 + * cuPythonInit() + * if __cuMipmappedArrayDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') + * err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4213 + * global __cuMipmappedArrayDestroy + * cuPythonInit() + * if __cuMipmappedArrayDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4216 + * with gil: + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') + * err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmipmappedArray))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy)(__pyx_v_hMipmappedArray); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4216, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4217 + * raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') + * err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4210 + * return err + * + * cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMipmappedArrayDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMipmappedArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4219 + * return err + * + * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetHandleForAddressRange + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetHandleForAddressRange(void *__pyx_v_handle, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_size, CUmemRangeHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetHandleForAddressRange", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4221 + * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetHandleForAddressRange + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetHandleForAddressRange == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4221, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4222 + * global __cuMemGetHandleForAddressRange + * cuPythonInit() + * if __cuMemGetHandleForAddressRange == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4223 + * cuPythonInit() + * if __cuMemGetHandleForAddressRange == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') + * err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4224 + * if __cuMemGetHandleForAddressRange == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetHandleForAddres}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4224, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4224, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4223 + * cuPythonInit() + * if __cuMemGetHandleForAddressRange == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') + * err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4222 + * global __cuMemGetHandleForAddressRange + * cuPythonInit() + * if __cuMemGetHandleForAddressRange == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4225 + * with gil: + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') + * err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange)(__pyx_v_handle, __pyx_v_dptr, __pyx_v_size, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4225, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4226 + * raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') + * err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4219 + * return err + * + * cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetHandleForAddressRange + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4228 + * return err + * + * cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemBatchDecompressAsync(CUmemDecompressParams *__pyx_v_paramsArray, size_t __pyx_v_count, unsigned int __pyx_v_flags, size_t *__pyx_v_errorIndex, CUstream __pyx_v_stream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemBatchDecompressAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4230 + * cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemBatchDecompressAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemBatchDecompressAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4230, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4231 + * global __cuMemBatchDecompressAsync + * cuPythonInit() + * if __cuMemBatchDecompressAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4232 + * cuPythonInit() + * if __cuMemBatchDecompressAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + * err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4233 + * if __cuMemBatchDecompressAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemBatchDecompressAsy}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4233, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4233, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4232 + * cuPythonInit() + * if __cuMemBatchDecompressAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + * err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4231 + * global __cuMemBatchDecompressAsync + * cuPythonInit() + * if __cuMemBatchDecompressAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4234 + * with gil: + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + * err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemDecompressParams *, size_t, unsigned int, size_t *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync)(__pyx_v_paramsArray, __pyx_v_count, __pyx_v_flags, __pyx_v_errorIndex, __pyx_v_stream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4234, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4235 + * raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + * err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4228 + * return err + * + * cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemBatchDecompressAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4237 + * return err + * + * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAddressReserve + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressReserve(CUdeviceptr *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_alignment, CUdeviceptr __pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAddressReserve", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4239 + * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAddressReserve + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAddressReserve == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4239, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4240 + * global __cuMemAddressReserve + * cuPythonInit() + * if __cuMemAddressReserve == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAddressReserve" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4241 + * cuPythonInit() + * if __cuMemAddressReserve == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAddressReserve" not found') + * err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4242 + * if __cuMemAddressReserve == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAddressReserve" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAddressReserve_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4242, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4242, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4241 + * cuPythonInit() + * if __cuMemAddressReserve == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAddressReserve" not found') + * err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4240 + * global __cuMemAddressReserve + * cuPythonInit() + * if __cuMemAddressReserve == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAddressReserve" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4243 + * with gil: + * raise RuntimeError('Function "cuMemAddressReserve" not found') + * err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve)(__pyx_v_ptr, __pyx_v_size, __pyx_v_alignment, __pyx_v_addr, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4243, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4244 + * raise RuntimeError('Function "cuMemAddressReserve" not found') + * err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4237 + * return err + * + * cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAddressReserve + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4246 + * return err + * + * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAddressFree + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressFree(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAddressFree", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4248 + * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAddressFree + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAddressFree == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4248, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4249 + * global __cuMemAddressFree + * cuPythonInit() + * if __cuMemAddressFree == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAddressFree" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4250 + * cuPythonInit() + * if __cuMemAddressFree == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAddressFree" not found') + * err = ( __cuMemAddressFree)(ptr, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4251 + * if __cuMemAddressFree == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAddressFree" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAddressFree)(ptr, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAddressFree_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4251, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4251, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4250 + * cuPythonInit() + * if __cuMemAddressFree == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAddressFree" not found') + * err = ( __cuMemAddressFree)(ptr, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4249 + * global __cuMemAddressFree + * cuPythonInit() + * if __cuMemAddressFree == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAddressFree" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4252 + * with gil: + * raise RuntimeError('Function "cuMemAddressFree" not found') + * err = ( __cuMemAddressFree)(ptr, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree)(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4252, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4253 + * raise RuntimeError('Function "cuMemAddressFree" not found') + * err = ( __cuMemAddressFree)(ptr, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4246 + * return err + * + * cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAddressFree + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4255 + * return err + * + * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemCreate(CUmemGenericAllocationHandle *__pyx_v_handle, size_t __pyx_v_size, CUmemAllocationProp const *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4257 + * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4257, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4258 + * global __cuMemCreate + * cuPythonInit() + * if __cuMemCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4259 + * cuPythonInit() + * if __cuMemCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemCreate" not found') + * err = ( __cuMemCreate)(handle, size, prop, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4260 + * if __cuMemCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuMemCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemCreate)(handle, size, prop, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemCreate_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4260, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4260, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4259 + * cuPythonInit() + * if __cuMemCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemCreate" not found') + * err = ( __cuMemCreate)(handle, size, prop, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4258 + * global __cuMemCreate + * cuPythonInit() + * if __cuMemCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4261 + * with gil: + * raise RuntimeError('Function "cuMemCreate" not found') + * err = ( __cuMemCreate)(handle, size, prop, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate)(__pyx_v_handle, __pyx_v_size, __pyx_v_prop, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4261, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4262 + * raise RuntimeError('Function "cuMemCreate" not found') + * err = ( __cuMemCreate)(handle, size, prop, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4255 + * return err + * + * cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4264 + * return err + * + * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRelease + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRelease(CUmemGenericAllocationHandle __pyx_v_handle) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemRelease", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4266 + * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemRelease + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemRelease == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4266, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4267 + * global __cuMemRelease + * cuPythonInit() + * if __cuMemRelease == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRelease" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4268 + * cuPythonInit() + * if __cuMemRelease == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRelease" not found') + * err = ( __cuMemRelease)(handle) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4269 + * if __cuMemRelease == NULL: + * with gil: + * raise RuntimeError('Function "cuMemRelease" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemRelease)(handle) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemRelease_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4269, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4269, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4268 + * cuPythonInit() + * if __cuMemRelease == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRelease" not found') + * err = ( __cuMemRelease)(handle) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4267 + * global __cuMemRelease + * cuPythonInit() + * if __cuMemRelease == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRelease" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4270 + * with gil: + * raise RuntimeError('Function "cuMemRelease" not found') + * err = ( __cuMemRelease)(handle) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease)(__pyx_v_handle); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4270, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4271 + * raise RuntimeError('Function "cuMemRelease" not found') + * err = ( __cuMemRelease)(handle) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4264 + * return err + * + * cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRelease + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4273 + * return err + * + * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemMap + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemMap", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4275 + * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemMap + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemMap == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4275, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4276 + * global __cuMemMap + * cuPythonInit() + * if __cuMemMap == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemMap" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4277 + * cuPythonInit() + * if __cuMemMap == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemMap" not found') + * err = ( __cuMemMap)(ptr, size, offset, handle, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4278 + * if __cuMemMap == NULL: + * with gil: + * raise RuntimeError('Function "cuMemMap" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemMap)(ptr, size, offset, handle, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemMap_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4278, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4278, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4277 + * cuPythonInit() + * if __cuMemMap == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemMap" not found') + * err = ( __cuMemMap)(ptr, size, offset, handle, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4276 + * global __cuMemMap + * cuPythonInit() + * if __cuMemMap == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemMap" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4279 + * with gil: + * raise RuntimeError('Function "cuMemMap" not found') + * err = ( __cuMemMap)(ptr, size, offset, handle, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap)(__pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4279, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4280 + * raise RuntimeError('Function "cuMemMap" not found') + * err = ( __cuMemMap)(ptr, size, offset, handle, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4273 + * return err + * + * cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemMap + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4282 + * return err + * + * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMapArrayAsync(CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemMapArrayAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4284 + * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemMapArrayAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemMapArrayAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4284, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4285 + * global __cuMemMapArrayAsync + * cuPythonInit() + * if __cuMemMapArrayAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4286 + * cuPythonInit() + * if __cuMemMapArrayAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') + * err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4287 + * if __cuMemMapArrayAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemMapArrayAsync_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4287, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4287, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4286 + * cuPythonInit() + * if __cuMemMapArrayAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') + * err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4285 + * global __cuMemMapArrayAsync + * cuPythonInit() + * if __cuMemMapArrayAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4288 + * with gil: + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') + * err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarrayMapInfo *, unsigned int, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync)(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4288, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4289 + * raise RuntimeError('Function "cuMemMapArrayAsync" not found') + * err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4282 + * return err + * + * cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4291 + * return err + * + * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemUnmap + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemUnmap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemUnmap", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4293 + * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemUnmap + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemUnmap == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4293, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4294 + * global __cuMemUnmap + * cuPythonInit() + * if __cuMemUnmap == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemUnmap" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4295 + * cuPythonInit() + * if __cuMemUnmap == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemUnmap" not found') + * err = ( __cuMemUnmap)(ptr, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4296 + * if __cuMemUnmap == NULL: + * with gil: + * raise RuntimeError('Function "cuMemUnmap" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemUnmap)(ptr, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemUnmap_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4296, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4296, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4295 + * cuPythonInit() + * if __cuMemUnmap == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemUnmap" not found') + * err = ( __cuMemUnmap)(ptr, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4294 + * global __cuMemUnmap + * cuPythonInit() + * if __cuMemUnmap == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemUnmap" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4297 + * with gil: + * raise RuntimeError('Function "cuMemUnmap" not found') + * err = ( __cuMemUnmap)(ptr, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap)(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4297, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4298 + * raise RuntimeError('Function "cuMemUnmap" not found') + * err = ( __cuMemUnmap)(ptr, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4291 + * return err + * + * cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemUnmap + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4300 + * return err + * + * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemSetAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemSetAccess(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemSetAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4302 + * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemSetAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemSetAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4302, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4303 + * global __cuMemSetAccess + * cuPythonInit() + * if __cuMemSetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemSetAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4304 + * cuPythonInit() + * if __cuMemSetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemSetAccess" not found') + * err = ( __cuMemSetAccess)(ptr, size, desc, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4305 + * if __cuMemSetAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuMemSetAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemSetAccess)(ptr, size, desc, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemSetAccess_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4305, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4305, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4304 + * cuPythonInit() + * if __cuMemSetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemSetAccess" not found') + * err = ( __cuMemSetAccess)(ptr, size, desc, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4303 + * global __cuMemSetAccess + * cuPythonInit() + * if __cuMemSetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemSetAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4306 + * with gil: + * raise RuntimeError('Function "cuMemSetAccess" not found') + * err = ( __cuMemSetAccess)(ptr, size, desc, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, CUmemAccessDesc const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess)(__pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4306, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4307 + * raise RuntimeError('Function "cuMemSetAccess" not found') + * err = ( __cuMemSetAccess)(ptr, size, desc, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4300 + * return err + * + * cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemSetAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4309 + * return err + * + * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, CUmemLocation const *__pyx_v_location, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4311 + * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4311, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4312 + * global __cuMemGetAccess + * cuPythonInit() + * if __cuMemGetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4313 + * cuPythonInit() + * if __cuMemGetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAccess" not found') + * err = ( __cuMemGetAccess)(flags, location, ptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4314 + * if __cuMemGetAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetAccess)(flags, location, ptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetAccess_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4314, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4314, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4313 + * cuPythonInit() + * if __cuMemGetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAccess" not found') + * err = ( __cuMemGetAccess)(flags, location, ptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4312 + * global __cuMemGetAccess + * cuPythonInit() + * if __cuMemGetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4315 + * with gil: + * raise RuntimeError('Function "cuMemGetAccess" not found') + * err = ( __cuMemGetAccess)(flags, location, ptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess)(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4315, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4316 + * raise RuntimeError('Function "cuMemGetAccess" not found') + * err = ( __cuMemGetAccess)(flags, location, ptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4309 + * return err + * + * cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4318 + * return err + * + * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemExportToShareableHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, CUmemGenericAllocationHandle __pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemExportToShareableHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4320 + * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemExportToShareableHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemExportToShareableHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4320, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4321 + * global __cuMemExportToShareableHandle + * cuPythonInit() + * if __cuMemExportToShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4322 + * cuPythonInit() + * if __cuMemExportToShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') + * err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4323 + * if __cuMemExportToShareableHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemExportToShareableH}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4323, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4323, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4322 + * cuPythonInit() + * if __cuMemExportToShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') + * err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4321 + * global __cuMemExportToShareableHandle + * cuPythonInit() + * if __cuMemExportToShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4324 + * with gil: + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') + * err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle)(__pyx_v_shareableHandle, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4324, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4325 + * raise RuntimeError('Function "cuMemExportToShareableHandle" not found') + * err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4318 + * return err + * + * cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemExportToShareableHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4327 + * return err + * + * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemImportFromShareableHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, CUmemAllocationHandleType __pyx_v_shHandleType) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemImportFromShareableHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4329 + * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemImportFromShareableHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemImportFromShareableHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4329, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4330 + * global __cuMemImportFromShareableHandle + * cuPythonInit() + * if __cuMemImportFromShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4331 + * cuPythonInit() + * if __cuMemImportFromShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') + * err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4332 + * if __cuMemImportFromShareableHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemImportFromShareabl}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4332, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4332, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4331 + * cuPythonInit() + * if __cuMemImportFromShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') + * err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4330 + * global __cuMemImportFromShareableHandle + * cuPythonInit() + * if __cuMemImportFromShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4333 + * with gil: + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') + * err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle)(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4333, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4334 + * raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') + * err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4327 + * return err + * + * cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemImportFromShareableHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4336 + * return err + * + * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAllocationGranularity + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, CUmemAllocationProp const *__pyx_v_prop, CUmemAllocationGranularity_flags __pyx_v_option) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetAllocationGranularity", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4338 + * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetAllocationGranularity + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetAllocationGranularity == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4338, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4339 + * global __cuMemGetAllocationGranularity + * cuPythonInit() + * if __cuMemGetAllocationGranularity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4340 + * cuPythonInit() + * if __cuMemGetAllocationGranularity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') + * err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4341 + * if __cuMemGetAllocationGranularity == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetAllocationGranu}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4341, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4341, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4340 + * cuPythonInit() + * if __cuMemGetAllocationGranularity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') + * err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4339 + * global __cuMemGetAllocationGranularity + * cuPythonInit() + * if __cuMemGetAllocationGranularity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4342 + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') + * err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity)(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4342, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4343 + * raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') + * err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4336 + * return err + * + * cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAllocationGranularity + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4345 + * return err + * + * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAllocationPropertiesFromHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *__pyx_v_prop, CUmemGenericAllocationHandle __pyx_v_handle) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemGetAllocationPropertiesFromHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4347 + * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemGetAllocationPropertiesFromHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemGetAllocationPropertiesFromHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4347, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4348 + * global __cuMemGetAllocationPropertiesFromHandle + * cuPythonInit() + * if __cuMemGetAllocationPropertiesFromHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4349 + * cuPythonInit() + * if __cuMemGetAllocationPropertiesFromHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') + * err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4350 + * if __cuMemGetAllocationPropertiesFromHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemGetAllocationPrope}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4350, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4350, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4349 + * cuPythonInit() + * if __cuMemGetAllocationPropertiesFromHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') + * err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4348 + * global __cuMemGetAllocationPropertiesFromHandle + * cuPythonInit() + * if __cuMemGetAllocationPropertiesFromHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4351 + * with gil: + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') + * err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemAllocationProp *, CUmemGenericAllocationHandle))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle)(__pyx_v_prop, __pyx_v_handle); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4351, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4352 + * raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') + * err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4345 + * return err + * + * cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemGetAllocationPropertiesFromHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemGetAllocationPropertiesFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4354 + * return err + * + * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRetainAllocationHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemRetainAllocationHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4356 + * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemRetainAllocationHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemRetainAllocationHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4356, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4357 + * global __cuMemRetainAllocationHandle + * cuPythonInit() + * if __cuMemRetainAllocationHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4358 + * cuPythonInit() + * if __cuMemRetainAllocationHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') + * err = ( __cuMemRetainAllocationHandle)(handle, addr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4359 + * if __cuMemRetainAllocationHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemRetainAllocationHandle)(handle, addr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemRetainAllocationHa}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4359, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4359, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4358 + * cuPythonInit() + * if __cuMemRetainAllocationHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') + * err = ( __cuMemRetainAllocationHandle)(handle, addr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4357 + * global __cuMemRetainAllocationHandle + * cuPythonInit() + * if __cuMemRetainAllocationHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4360 + * with gil: + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') + * err = ( __cuMemRetainAllocationHandle)(handle, addr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle *, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle)(__pyx_v_handle, __pyx_v_addr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4360, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4361 + * raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') + * err = ( __cuMemRetainAllocationHandle)(handle, addr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4354 + * return err + * + * cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRetainAllocationHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemRetainAllocationHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4363 + * return err + * + * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeAsync(CUdeviceptr __pyx_v_dptr, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemFreeAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4365 + * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemFreeAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemFreeAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4365, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4366 + * global __cuMemFreeAsync + * cuPythonInit() + * if __cuMemFreeAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFreeAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4367 + * cuPythonInit() + * if __cuMemFreeAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFreeAsync" not found') + * err = ( __cuMemFreeAsync)(dptr, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4368 + * if __cuMemFreeAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemFreeAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemFreeAsync)(dptr, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemFreeAsync_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4368, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4368, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4367 + * cuPythonInit() + * if __cuMemFreeAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemFreeAsync" not found') + * err = ( __cuMemFreeAsync)(dptr, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4366 + * global __cuMemFreeAsync + * cuPythonInit() + * if __cuMemFreeAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemFreeAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4369 + * with gil: + * raise RuntimeError('Function "cuMemFreeAsync" not found') + * err = ( __cuMemFreeAsync)(dptr, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync)(__pyx_v_dptr, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4369, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4370 + * raise RuntimeError('Function "cuMemFreeAsync" not found') + * err = ( __cuMemFreeAsync)(dptr, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4363 + * return err + * + * cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4372 + * return err + * + * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAllocAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4374 + * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAllocAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAllocAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4374, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4375 + * global __cuMemAllocAsync + * cuPythonInit() + * if __cuMemAllocAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4376 + * cuPythonInit() + * if __cuMemAllocAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocAsync" not found') + * err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4377 + * if __cuMemAllocAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAllocAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAllocAsync_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4377, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4377, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4376 + * cuPythonInit() + * if __cuMemAllocAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocAsync" not found') + * err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4375 + * global __cuMemAllocAsync + * cuPythonInit() + * if __cuMemAllocAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4378 + * with gil: + * raise RuntimeError('Function "cuMemAllocAsync" not found') + * err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4378, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4379 + * raise RuntimeError('Function "cuMemAllocAsync" not found') + * err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4372 + * return err + * + * cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4381 + * return err + * + * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolTrimTo + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolTrimTo(CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolTrimTo", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4383 + * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolTrimTo + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolTrimTo == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4383, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4384 + * global __cuMemPoolTrimTo + * cuPythonInit() + * if __cuMemPoolTrimTo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4385 + * cuPythonInit() + * if __cuMemPoolTrimTo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') + * err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4386 + * if __cuMemPoolTrimTo == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolTrimTo_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4386, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4386, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4385 + * cuPythonInit() + * if __cuMemPoolTrimTo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') + * err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4384 + * global __cuMemPoolTrimTo + * cuPythonInit() + * if __cuMemPoolTrimTo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4387 + * with gil: + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') + * err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo)(__pyx_v_pool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4387, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4388 + * raise RuntimeError('Function "cuMemPoolTrimTo" not found') + * err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4381 + * return err + * + * cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolTrimTo + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4390 + * return err + * + * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4392 + * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4392, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4393 + * global __cuMemPoolSetAttribute + * cuPythonInit() + * if __cuMemPoolSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4394 + * cuPythonInit() + * if __cuMemPoolSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') + * err = ( __cuMemPoolSetAttribute)(pool, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4395 + * if __cuMemPoolSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolSetAttribute)(pool, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolSetAttribute_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4395, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4395, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4394 + * cuPythonInit() + * if __cuMemPoolSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') + * err = ( __cuMemPoolSetAttribute)(pool, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4393 + * global __cuMemPoolSetAttribute + * cuPythonInit() + * if __cuMemPoolSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4396 + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') + * err = ( __cuMemPoolSetAttribute)(pool, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool, CUmemPool_attribute, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4396, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4397 + * raise RuntimeError('Function "cuMemPoolSetAttribute" not found') + * err = ( __cuMemPoolSetAttribute)(pool, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4390 + * return err + * + * cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4399 + * return err + * + * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4401 + * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4401, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4402 + * global __cuMemPoolGetAttribute + * cuPythonInit() + * if __cuMemPoolGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4403 + * cuPythonInit() + * if __cuMemPoolGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') + * err = ( __cuMemPoolGetAttribute)(pool, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4404 + * if __cuMemPoolGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolGetAttribute)(pool, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolGetAttribute_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4404, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4404, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4403 + * cuPythonInit() + * if __cuMemPoolGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') + * err = ( __cuMemPoolGetAttribute)(pool, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4402 + * global __cuMemPoolGetAttribute + * cuPythonInit() + * if __cuMemPoolGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4405 + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') + * err = ( __cuMemPoolGetAttribute)(pool, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool, CUmemPool_attribute, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute)(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4405, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4406 + * raise RuntimeError('Function "cuMemPoolGetAttribute" not found') + * err = ( __cuMemPoolGetAttribute)(pool, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4399 + * return err + * + * cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4408 + * return err + * + * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolSetAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAccess(CUmemoryPool __pyx_v_pool, CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolSetAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4410 + * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolSetAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolSetAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4410, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4411 + * global __cuMemPoolSetAccess + * cuPythonInit() + * if __cuMemPoolSetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4412 + * cuPythonInit() + * if __cuMemPoolSetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') + * err = ( __cuMemPoolSetAccess)(pool, map, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4413 + * if __cuMemPoolSetAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolSetAccess)(pool, map, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolSetAccess_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4413, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4413, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4412 + * cuPythonInit() + * if __cuMemPoolSetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') + * err = ( __cuMemPoolSetAccess)(pool, map, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4411 + * global __cuMemPoolSetAccess + * cuPythonInit() + * if __cuMemPoolSetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4414 + * with gil: + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') + * err = ( __cuMemPoolSetAccess)(pool, map, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool, CUmemAccessDesc const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess)(__pyx_v_pool, __pyx_v_map, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4414, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4415 + * raise RuntimeError('Function "cuMemPoolSetAccess" not found') + * err = ( __cuMemPoolSetAccess)(pool, map, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4408 + * return err + * + * cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolSetAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4417 + * return err + * + * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolGetAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAccess(CUmemAccess_flags *__pyx_v_flags, CUmemoryPool __pyx_v_memPool, CUmemLocation *__pyx_v_location) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolGetAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4419 + * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolGetAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolGetAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4419, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4420 + * global __cuMemPoolGetAccess + * cuPythonInit() + * if __cuMemPoolGetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4421 + * cuPythonInit() + * if __cuMemPoolGetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') + * err = ( __cuMemPoolGetAccess)(flags, memPool, location) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4422 + * if __cuMemPoolGetAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolGetAccess)(flags, memPool, location) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolGetAccess_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4422, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4422, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4421 + * cuPythonInit() + * if __cuMemPoolGetAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') + * err = ( __cuMemPoolGetAccess)(flags, memPool, location) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4420 + * global __cuMemPoolGetAccess + * cuPythonInit() + * if __cuMemPoolGetAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4423 + * with gil: + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') + * err = ( __cuMemPoolGetAccess)(flags, memPool, location) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemAccess_flags *, CUmemoryPool, CUmemLocation *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess)(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4423, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4424 + * raise RuntimeError('Function "cuMemPoolGetAccess" not found') + * err = ( __cuMemPoolGetAccess)(flags, memPool, location) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4417 + * return err + * + * cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolGetAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4426 + * return err + * + * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolCreate(CUmemoryPool *__pyx_v_pool, CUmemPoolProps const *__pyx_v_poolProps) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4428 + * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4428, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4429 + * global __cuMemPoolCreate + * cuPythonInit() + * if __cuMemPoolCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4430 + * cuPythonInit() + * if __cuMemPoolCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolCreate" not found') + * err = ( __cuMemPoolCreate)(pool, poolProps) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4431 + * if __cuMemPoolCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolCreate)(pool, poolProps) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolCreate_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4431, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4431, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4430 + * cuPythonInit() + * if __cuMemPoolCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolCreate" not found') + * err = ( __cuMemPoolCreate)(pool, poolProps) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4429 + * global __cuMemPoolCreate + * cuPythonInit() + * if __cuMemPoolCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4432 + * with gil: + * raise RuntimeError('Function "cuMemPoolCreate" not found') + * err = ( __cuMemPoolCreate)(pool, poolProps) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool *, CUmemPoolProps const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate)(__pyx_v_pool, __pyx_v_poolProps); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4432, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4433 + * raise RuntimeError('Function "cuMemPoolCreate" not found') + * err = ( __cuMemPoolCreate)(pool, poolProps) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4426 + * return err + * + * cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4435 + * return err + * + * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolDestroy(CUmemoryPool __pyx_v_pool) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4437 + * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4437, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4438 + * global __cuMemPoolDestroy + * cuPythonInit() + * if __cuMemPoolDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4439 + * cuPythonInit() + * if __cuMemPoolDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolDestroy" not found') + * err = ( __cuMemPoolDestroy)(pool) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4440 + * if __cuMemPoolDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolDestroy)(pool) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolDestroy_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4440, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4440, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4439 + * cuPythonInit() + * if __cuMemPoolDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolDestroy" not found') + * err = ( __cuMemPoolDestroy)(pool) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4438 + * global __cuMemPoolDestroy + * cuPythonInit() + * if __cuMemPoolDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4441 + * with gil: + * raise RuntimeError('Function "cuMemPoolDestroy" not found') + * err = ( __cuMemPoolDestroy)(pool) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy)(__pyx_v_pool); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4441, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4442 + * raise RuntimeError('Function "cuMemPoolDestroy" not found') + * err = ( __cuMemPoolDestroy)(pool) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4435 + * return err + * + * cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4444 + * return err + * + * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocFromPoolAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUmemoryPool __pyx_v_pool, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAllocFromPoolAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4446 + * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAllocFromPoolAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAllocFromPoolAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4446, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4447 + * global __cuMemAllocFromPoolAsync + * cuPythonInit() + * if __cuMemAllocFromPoolAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4448 + * cuPythonInit() + * if __cuMemAllocFromPoolAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') + * err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4449 + * if __cuMemAllocFromPoolAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAllocFromPoolAsync}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4449, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4449, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4448 + * cuPythonInit() + * if __cuMemAllocFromPoolAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') + * err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4447 + * global __cuMemAllocFromPoolAsync + * cuPythonInit() + * if __cuMemAllocFromPoolAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4450 + * with gil: + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') + * err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t, CUmemoryPool, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync)(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4450, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4451 + * raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') + * err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4444 + * return err + * + * cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4453 + * return err + * + * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolExportToShareableHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, CUmemoryPool __pyx_v_pool, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolExportToShareableHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4455 + * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolExportToShareableHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolExportToShareableHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4455, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4456 + * global __cuMemPoolExportToShareableHandle + * cuPythonInit() + * if __cuMemPoolExportToShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4457 + * cuPythonInit() + * if __cuMemPoolExportToShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') + * err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4458 + * if __cuMemPoolExportToShareableHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolExportToSharea}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4458, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4458, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4457 + * cuPythonInit() + * if __cuMemPoolExportToShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') + * err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4456 + * global __cuMemPoolExportToShareableHandle + * cuPythonInit() + * if __cuMemPoolExportToShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4459 + * with gil: + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') + * err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle)(__pyx_v_handle_out, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4459, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4460 + * raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') + * err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4453 + * return err + * + * cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolExportToShareableHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4462 + * return err + * + * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolImportFromShareableHandle + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportFromShareableHandle(CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolImportFromShareableHandle", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4464 + * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolImportFromShareableHandle + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolImportFromShareableHandle == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4464, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4465 + * global __cuMemPoolImportFromShareableHandle + * cuPythonInit() + * if __cuMemPoolImportFromShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4466 + * cuPythonInit() + * if __cuMemPoolImportFromShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') + * err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4467 + * if __cuMemPoolImportFromShareableHandle == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolImportFromShar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4467, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4467, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4466 + * cuPythonInit() + * if __cuMemPoolImportFromShareableHandle == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') + * err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4465 + * global __cuMemPoolImportFromShareableHandle + * cuPythonInit() + * if __cuMemPoolImportFromShareableHandle == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4468 + * with gil: + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') + * err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle)(__pyx_v_pool_out, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4468, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4469 + * raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') + * err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4462 + * return err + * + * cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolImportFromShareableHandle + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4471 + * return err + * + * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolExportPointer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportPointer(CUmemPoolPtrExportData *__pyx_v_shareData_out, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolExportPointer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4473 + * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolExportPointer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolExportPointer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4473, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4474 + * global __cuMemPoolExportPointer + * cuPythonInit() + * if __cuMemPoolExportPointer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4475 + * cuPythonInit() + * if __cuMemPoolExportPointer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') + * err = ( __cuMemPoolExportPointer)(shareData_out, ptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4476 + * if __cuMemPoolExportPointer == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolExportPointer)(shareData_out, ptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolExportPointer}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4476, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4476, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4475 + * cuPythonInit() + * if __cuMemPoolExportPointer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') + * err = ( __cuMemPoolExportPointer)(shareData_out, ptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4474 + * global __cuMemPoolExportPointer + * cuPythonInit() + * if __cuMemPoolExportPointer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4477 + * with gil: + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') + * err = ( __cuMemPoolExportPointer)(shareData_out, ptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemPoolPtrExportData *, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer)(__pyx_v_shareData_out, __pyx_v_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4477, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4478 + * raise RuntimeError('Function "cuMemPoolExportPointer" not found') + * err = ( __cuMemPoolExportPointer)(shareData_out, ptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4471 + * return err + * + * cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolExportPointer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4480 + * return err + * + * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolImportPointer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportPointer(CUdeviceptr *__pyx_v_ptr_out, CUmemoryPool __pyx_v_pool, CUmemPoolPtrExportData *__pyx_v_shareData) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPoolImportPointer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4482 + * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPoolImportPointer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPoolImportPointer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4482, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4483 + * global __cuMemPoolImportPointer + * cuPythonInit() + * if __cuMemPoolImportPointer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4484 + * cuPythonInit() + * if __cuMemPoolImportPointer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') + * err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4485 + * if __cuMemPoolImportPointer == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPoolImportPointer}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4485, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4485, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4484 + * cuPythonInit() + * if __cuMemPoolImportPointer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') + * err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4483 + * global __cuMemPoolImportPointer + * cuPythonInit() + * if __cuMemPoolImportPointer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4486 + * with gil: + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') + * err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer)(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4486, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4487 + * raise RuntimeError('Function "cuMemPoolImportPointer" not found') + * err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4480 + * return err + * + * cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPoolImportPointer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4489 + * return err + * + * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastCreate(CUmemGenericAllocationHandle *__pyx_v_mcHandle, CUmulticastObjectProp const *__pyx_v_prop) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4491 + * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4491, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4492 + * global __cuMulticastCreate + * cuPythonInit() + * if __cuMulticastCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4493 + * cuPythonInit() + * if __cuMulticastCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastCreate" not found') + * err = ( __cuMulticastCreate)(mcHandle, prop) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4494 + * if __cuMulticastCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastCreate)(mcHandle, prop) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastCreate_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4494, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4494, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4493 + * cuPythonInit() + * if __cuMulticastCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastCreate" not found') + * err = ( __cuMulticastCreate)(mcHandle, prop) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4492 + * global __cuMulticastCreate + * cuPythonInit() + * if __cuMulticastCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4495 + * with gil: + * raise RuntimeError('Function "cuMulticastCreate" not found') + * err = ( __cuMulticastCreate)(mcHandle, prop) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle *, CUmulticastObjectProp const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate)(__pyx_v_mcHandle, __pyx_v_prop); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4495, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4496 + * raise RuntimeError('Function "cuMulticastCreate" not found') + * err = ( __cuMulticastCreate)(mcHandle, prop) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4489 + * return err + * + * cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4498 + * return err + * + * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastAddDevice + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastAddDevice(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastAddDevice", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4500 + * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastAddDevice + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastAddDevice == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4500, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4501 + * global __cuMulticastAddDevice + * cuPythonInit() + * if __cuMulticastAddDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastAddDevice" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4502 + * cuPythonInit() + * if __cuMulticastAddDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastAddDevice" not found') + * err = ( __cuMulticastAddDevice)(mcHandle, dev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4503 + * if __cuMulticastAddDevice == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastAddDevice" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastAddDevice)(mcHandle, dev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastAddDevice_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4503, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4503, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4502 + * cuPythonInit() + * if __cuMulticastAddDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastAddDevice" not found') + * err = ( __cuMulticastAddDevice)(mcHandle, dev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4501 + * global __cuMulticastAddDevice + * cuPythonInit() + * if __cuMulticastAddDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastAddDevice" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4504 + * with gil: + * raise RuntimeError('Function "cuMulticastAddDevice" not found') + * err = ( __cuMulticastAddDevice)(mcHandle, dev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice)(__pyx_v_mcHandle, __pyx_v_dev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4504, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4505 + * raise RuntimeError('Function "cuMulticastAddDevice" not found') + * err = ( __cuMulticastAddDevice)(mcHandle, dev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4498 + * return err + * + * cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastAddDevice + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastAddDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4507 + * return err + * + * cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastBindMem + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindMem(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUmemGenericAllocationHandle __pyx_v_memHandle, size_t __pyx_v_memOffset, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastBindMem", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4509 + * cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastBindMem + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastBindMem == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4509, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4510 + * global __cuMulticastBindMem + * cuPythonInit() + * if __cuMulticastBindMem == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastBindMem" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4511 + * cuPythonInit() + * if __cuMulticastBindMem == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastBindMem" not found') + * err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4512 + * if __cuMulticastBindMem == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastBindMem" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastBindMem_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4512, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4512, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4511 + * cuPythonInit() + * if __cuMulticastBindMem == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastBindMem" not found') + * err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4510 + * global __cuMulticastBindMem + * cuPythonInit() + * if __cuMulticastBindMem == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastBindMem" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4513 + * with gil: + * raise RuntimeError('Function "cuMulticastBindMem" not found') + * err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem)(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memHandle, __pyx_v_memOffset, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4513, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4514 + * raise RuntimeError('Function "cuMulticastBindMem" not found') + * err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4507 + * return err + * + * cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastBindMem + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastBindMem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4516 + * return err + * + * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastBindAddr + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindAddr(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUdeviceptr __pyx_v_memptr, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastBindAddr", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4518 + * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastBindAddr + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastBindAddr == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4518, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4519 + * global __cuMulticastBindAddr + * cuPythonInit() + * if __cuMulticastBindAddr == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastBindAddr" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4520 + * cuPythonInit() + * if __cuMulticastBindAddr == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastBindAddr" not found') + * err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4521 + * if __cuMulticastBindAddr == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastBindAddr" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastBindAddr_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4521, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4521, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4520 + * cuPythonInit() + * if __cuMulticastBindAddr == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastBindAddr" not found') + * err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4519 + * global __cuMulticastBindAddr + * cuPythonInit() + * if __cuMulticastBindAddr == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastBindAddr" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4522 + * with gil: + * raise RuntimeError('Function "cuMulticastBindAddr" not found') + * err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr)(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memptr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4522, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4523 + * raise RuntimeError('Function "cuMulticastBindAddr" not found') + * err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4516 + * return err + * + * cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastBindAddr + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastBindAddr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4525 + * return err + * + * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastUnbind + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastUnbind(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev, size_t __pyx_v_mcOffset, size_t __pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastUnbind", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4527 + * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastUnbind + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastUnbind == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4527, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4528 + * global __cuMulticastUnbind + * cuPythonInit() + * if __cuMulticastUnbind == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastUnbind" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4529 + * cuPythonInit() + * if __cuMulticastUnbind == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastUnbind" not found') + * err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4530 + * if __cuMulticastUnbind == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastUnbind" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastUnbind_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4530, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4530, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4529 + * cuPythonInit() + * if __cuMulticastUnbind == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastUnbind" not found') + * err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4528 + * global __cuMulticastUnbind + * cuPythonInit() + * if __cuMulticastUnbind == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastUnbind" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4531 + * with gil: + * raise RuntimeError('Function "cuMulticastUnbind" not found') + * err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind)(__pyx_v_mcHandle, __pyx_v_dev, __pyx_v_mcOffset, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4531, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4532 + * raise RuntimeError('Function "cuMulticastUnbind" not found') + * err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4525 + * return err + * + * cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastUnbind + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastUnbind", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4534 + * return err + * + * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastGetGranularity + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastGetGranularity(size_t *__pyx_v_granularity, CUmulticastObjectProp const *__pyx_v_prop, CUmulticastGranularity_flags __pyx_v_option) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMulticastGetGranularity", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4536 + * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMulticastGetGranularity + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMulticastGetGranularity == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4536, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4537 + * global __cuMulticastGetGranularity + * cuPythonInit() + * if __cuMulticastGetGranularity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4538 + * cuPythonInit() + * if __cuMulticastGetGranularity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') + * err = ( __cuMulticastGetGranularity)(granularity, prop, option) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4539 + * if __cuMulticastGetGranularity == NULL: + * with gil: + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') # <<<<<<<<<<<<<< + * err = ( __cuMulticastGetGranularity)(granularity, prop, option) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMulticastGetGranulari}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4539, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4539, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4538 + * cuPythonInit() + * if __cuMulticastGetGranularity == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') + * err = ( __cuMulticastGetGranularity)(granularity, prop, option) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4537 + * global __cuMulticastGetGranularity + * cuPythonInit() + * if __cuMulticastGetGranularity == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4540 + * with gil: + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') + * err = ( __cuMulticastGetGranularity)(granularity, prop, option) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity)(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4540, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4541 + * raise RuntimeError('Function "cuMulticastGetGranularity" not found') + * err = ( __cuMulticastGetGranularity)(granularity, prop, option) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4534 + * return err + * + * cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMulticastGetGranularity + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMulticastGetGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4543 + * return err + * + * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttribute(void *__pyx_v_data, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuPointerGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4545 + * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuPointerGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuPointerGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4545, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4546 + * global __cuPointerGetAttribute + * cuPythonInit() + * if __cuPointerGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4547 + * cuPythonInit() + * if __cuPointerGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerGetAttribute" not found') + * err = ( __cuPointerGetAttribute)(data, attribute, ptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4548 + * if __cuPointerGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuPointerGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuPointerGetAttribute)(data, attribute, ptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuPointerGetAttribute_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4548, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4548, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4547 + * cuPythonInit() + * if __cuPointerGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerGetAttribute" not found') + * err = ( __cuPointerGetAttribute)(data, attribute, ptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4546 + * global __cuPointerGetAttribute + * cuPythonInit() + * if __cuPointerGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4549 + * with gil: + * raise RuntimeError('Function "cuPointerGetAttribute" not found') + * err = ( __cuPointerGetAttribute)(data, attribute, ptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, CUpointer_attribute, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute)(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4549, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4550 + * raise RuntimeError('Function "cuPointerGetAttribute" not found') + * err = ( __cuPointerGetAttribute)(data, attribute, ptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4543 + * return err + * + * cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4552 + * return err + * + * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUdevice __pyx_v_dstDevice, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPrefetchAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4554 + * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPrefetchAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPrefetchAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4554, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4555 + * global __cuMemPrefetchAsync + * cuPythonInit() + * if __cuMemPrefetchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4556 + * cuPythonInit() + * if __cuMemPrefetchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') + * err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4557 + * if __cuMemPrefetchAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPrefetchAsync_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4557, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4557, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4556 + * cuPythonInit() + * if __cuMemPrefetchAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') + * err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4555 + * global __cuMemPrefetchAsync + * cuPythonInit() + * if __cuMemPrefetchAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4558 + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') + * err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, CUdevice, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4558, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4559 + * raise RuntimeError('Function "cuMemPrefetchAsync" not found') + * err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4552 + * return err + * + * cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4561 + * return err + * + * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmemLocation __pyx_v_location, unsigned int __pyx_v_flags, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemPrefetchAsync_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4563 + * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemPrefetchAsync_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemPrefetchAsync_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4563, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4564 + * global __cuMemPrefetchAsync_v2 + * cuPythonInit() + * if __cuMemPrefetchAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4565 + * cuPythonInit() + * if __cuMemPrefetchAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') + * err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4566 + * if __cuMemPrefetchAsync_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemPrefetchAsync_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4566, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4566, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4565 + * cuPythonInit() + * if __cuMemPrefetchAsync_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') + * err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4564 + * global __cuMemPrefetchAsync_v2 + * cuPythonInit() + * if __cuMemPrefetchAsync_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4567 + * with gil: + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') + * err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4567, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4568 + * raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') + * err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4561 + * return err + * + * cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemPrefetchAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4570 + * return err + * + * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAdvise + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUdevice __pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAdvise", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4572 + * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAdvise + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAdvise == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4572, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4573 + * global __cuMemAdvise + * cuPythonInit() + * if __cuMemAdvise == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAdvise" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4574 + * cuPythonInit() + * if __cuMemAdvise == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAdvise" not found') + * err = ( __cuMemAdvise)(devPtr, count, advice, device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4575 + * if __cuMemAdvise == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAdvise" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAdvise)(devPtr, count, advice, device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAdvise_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4575, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4575, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4574 + * cuPythonInit() + * if __cuMemAdvise == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAdvise" not found') + * err = ( __cuMemAdvise)(devPtr, count, advice, device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4573 + * global __cuMemAdvise + * cuPythonInit() + * if __cuMemAdvise == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAdvise" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4576 + * with gil: + * raise RuntimeError('Function "cuMemAdvise" not found') + * err = ( __cuMemAdvise)(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4576, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4577 + * raise RuntimeError('Function "cuMemAdvise" not found') + * err = ( __cuMemAdvise)(devPtr, count, advice, device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4570 + * return err + * + * cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAdvise + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4579 + * return err + * + * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAdvise_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUmemLocation __pyx_v_location) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemAdvise_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4581 + * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemAdvise_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemAdvise_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4581, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4582 + * global __cuMemAdvise_v2 + * cuPythonInit() + * if __cuMemAdvise_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAdvise_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4583 + * cuPythonInit() + * if __cuMemAdvise_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAdvise_v2" not found') + * err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4584 + * if __cuMemAdvise_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuMemAdvise_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemAdvise_v2_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4584, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4584, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4583 + * cuPythonInit() + * if __cuMemAdvise_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemAdvise_v2" not found') + * err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4582 + * global __cuMemAdvise_v2 + * cuPythonInit() + * if __cuMemAdvise_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemAdvise_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4585 + * with gil: + * raise RuntimeError('Function "cuMemAdvise_v2" not found') + * err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2)(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4585, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4586 + * raise RuntimeError('Function "cuMemAdvise_v2" not found') + * err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4579 + * return err + * + * cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemAdvise_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemAdvise_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4588 + * return err + * + * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, CUmem_range_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemRangeGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4590 + * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemRangeGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemRangeGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4590, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4591 + * global __cuMemRangeGetAttribute + * cuPythonInit() + * if __cuMemRangeGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4592 + * cuPythonInit() + * if __cuMemRangeGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') + * err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4593 + * if __cuMemRangeGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemRangeGetAttribute}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4593, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4593, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4592 + * cuPythonInit() + * if __cuMemRangeGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') + * err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4591 + * global __cuMemRangeGetAttribute + * cuPythonInit() + * if __cuMemRangeGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4594 + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') + * err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute)(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4594, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4595 + * raise RuntimeError('Function "cuMemRangeGetAttribute" not found') + * err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4588 + * return err + * + * cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4597 + * return err + * + * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttributes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuMemRangeGetAttributes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4599 + * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuMemRangeGetAttributes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuMemRangeGetAttributes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4599, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4600 + * global __cuMemRangeGetAttributes + * cuPythonInit() + * if __cuMemRangeGetAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4601 + * cuPythonInit() + * if __cuMemRangeGetAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') + * err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4602 + * if __cuMemRangeGetAttributes == NULL: + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') # <<<<<<<<<<<<<< + * err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuMemRangeGetAttributes}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4602, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4602, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4601 + * cuPythonInit() + * if __cuMemRangeGetAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') + * err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4600 + * global __cuMemRangeGetAttributes + * cuPythonInit() + * if __cuMemRangeGetAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4603 + * with gil: + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') + * err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes)(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4603, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4604 + * raise RuntimeError('Function "cuMemRangeGetAttributes" not found') + * err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4597 + * return err + * + * cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttributes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4606 + * return err + * + * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerSetAttribute(void const *__pyx_v_value, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuPointerSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4608 + * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuPointerSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuPointerSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4608, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4609 + * global __cuPointerSetAttribute + * cuPythonInit() + * if __cuPointerSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4610 + * cuPythonInit() + * if __cuPointerSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerSetAttribute" not found') + * err = ( __cuPointerSetAttribute)(value, attribute, ptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4611 + * if __cuPointerSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuPointerSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuPointerSetAttribute)(value, attribute, ptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuPointerSetAttribute_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4611, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4611, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4610 + * cuPythonInit() + * if __cuPointerSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerSetAttribute" not found') + * err = ( __cuPointerSetAttribute)(value, attribute, ptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4609 + * global __cuPointerSetAttribute + * cuPythonInit() + * if __cuPointerSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4612 + * with gil: + * raise RuntimeError('Function "cuPointerSetAttribute" not found') + * err = ( __cuPointerSetAttribute)(value, attribute, ptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void const *, CUpointer_attribute, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute)(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4612, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4613 + * raise RuntimeError('Function "cuPointerSetAttribute" not found') + * err = ( __cuPointerSetAttribute)(value, attribute, ptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4606 + * return err + * + * cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4615 + * return err + * + * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerGetAttributes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuPointerGetAttributes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4617 + * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuPointerGetAttributes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuPointerGetAttributes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4617, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4618 + * global __cuPointerGetAttributes + * cuPythonInit() + * if __cuPointerGetAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerGetAttributes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4619 + * cuPythonInit() + * if __cuPointerGetAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerGetAttributes" not found') + * err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4620 + * if __cuPointerGetAttributes == NULL: + * with gil: + * raise RuntimeError('Function "cuPointerGetAttributes" not found') # <<<<<<<<<<<<<< + * err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuPointerGetAttributes}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4620, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4620, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4619 + * cuPythonInit() + * if __cuPointerGetAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuPointerGetAttributes" not found') + * err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4618 + * global __cuPointerGetAttributes + * cuPythonInit() + * if __cuPointerGetAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuPointerGetAttributes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4621 + * with gil: + * raise RuntimeError('Function "cuPointerGetAttributes" not found') + * err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes)(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4621, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4622 + * raise RuntimeError('Function "cuPointerGetAttributes" not found') + * err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4615 + * return err + * + * cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuPointerGetAttributes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4624 + * return err + * + * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreate(CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4626 + * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4626, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4627 + * global __cuStreamCreate + * cuPythonInit() + * if __cuStreamCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4628 + * cuPythonInit() + * if __cuStreamCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCreate" not found') + * err = ( __cuStreamCreate)(phStream, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4629 + * if __cuStreamCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamCreate)(phStream, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamCreate_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4629, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4629, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4628 + * cuPythonInit() + * if __cuStreamCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCreate" not found') + * err = ( __cuStreamCreate)(phStream, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4627 + * global __cuStreamCreate + * cuPythonInit() + * if __cuStreamCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4630 + * with gil: + * raise RuntimeError('Function "cuStreamCreate" not found') + * err = ( __cuStreamCreate)(phStream, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate)(__pyx_v_phStream, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4630, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4631 + * raise RuntimeError('Function "cuStreamCreate" not found') + * err = ( __cuStreamCreate)(phStream, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4624 + * return err + * + * cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4633 + * return err + * + * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCreateWithPriority + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreateWithPriority(CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamCreateWithPriority", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4635 + * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamCreateWithPriority + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamCreateWithPriority == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4635, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4636 + * global __cuStreamCreateWithPriority + * cuPythonInit() + * if __cuStreamCreateWithPriority == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4637 + * cuPythonInit() + * if __cuStreamCreateWithPriority == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') + * err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4638 + * if __cuStreamCreateWithPriority == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamCreateWithPrior}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4638, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4638, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4637 + * cuPythonInit() + * if __cuStreamCreateWithPriority == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') + * err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4636 + * global __cuStreamCreateWithPriority + * cuPythonInit() + * if __cuStreamCreateWithPriority == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4639 + * with gil: + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') + * err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream *, unsigned int, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority)(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4639, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4640 + * raise RuntimeError('Function "cuStreamCreateWithPriority" not found') + * err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4633 + * return err + * + * cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCreateWithPriority + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4642 + * return err + * + * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetPriority(CUstream __pyx_v_hStream, int *__pyx_v_priority) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetPriority", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4644 + * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetPriority + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetPriority == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4644, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4645 + * global __cuStreamGetPriority + * cuPythonInit() + * if __cuStreamGetPriority == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetPriority" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4646 + * cuPythonInit() + * if __cuStreamGetPriority == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetPriority" not found') + * err = ( __cuStreamGetPriority)(hStream, priority) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4647 + * if __cuStreamGetPriority == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetPriority" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetPriority)(hStream, priority) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetPriority_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4647, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4647, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4646 + * cuPythonInit() + * if __cuStreamGetPriority == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetPriority" not found') + * err = ( __cuStreamGetPriority)(hStream, priority) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4645 + * global __cuStreamGetPriority + * cuPythonInit() + * if __cuStreamGetPriority == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetPriority" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4648 + * with gil: + * raise RuntimeError('Function "cuStreamGetPriority" not found') + * err = ( __cuStreamGetPriority)(hStream, priority) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority)(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4648, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4649 + * raise RuntimeError('Function "cuStreamGetPriority" not found') + * err = ( __cuStreamGetPriority)(hStream, priority) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4642 + * return err + * + * cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4651 + * return err + * + * cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetDevice(CUstream __pyx_v_hStream, CUdevice *__pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetDevice", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4653 + * cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetDevice + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetDevice == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4653, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4654 + * global __cuStreamGetDevice + * cuPythonInit() + * if __cuStreamGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetDevice" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4655 + * cuPythonInit() + * if __cuStreamGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetDevice" not found') + * err = ( __cuStreamGetDevice)(hStream, device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4656 + * if __cuStreamGetDevice == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetDevice" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetDevice)(hStream, device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetDevice_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4656, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4656, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4655 + * cuPythonInit() + * if __cuStreamGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetDevice" not found') + * err = ( __cuStreamGetDevice)(hStream, device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4654 + * global __cuStreamGetDevice + * cuPythonInit() + * if __cuStreamGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetDevice" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4657 + * with gil: + * raise RuntimeError('Function "cuStreamGetDevice" not found') + * err = ( __cuStreamGetDevice)(hStream, device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdevice *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice)(__pyx_v_hStream, __pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4657, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4658 + * raise RuntimeError('Function "cuStreamGetDevice" not found') + * err = ( __cuStreamGetDevice)(hStream, device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4651 + * return err + * + * cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4660 + * return err + * + * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetFlags(CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4662 + * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4662, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4663 + * global __cuStreamGetFlags + * cuPythonInit() + * if __cuStreamGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4664 + * cuPythonInit() + * if __cuStreamGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetFlags" not found') + * err = ( __cuStreamGetFlags)(hStream, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4665 + * if __cuStreamGetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetFlags)(hStream, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetFlags_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4665, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4665, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4664 + * cuPythonInit() + * if __cuStreamGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetFlags" not found') + * err = ( __cuStreamGetFlags)(hStream, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4663 + * global __cuStreamGetFlags + * cuPythonInit() + * if __cuStreamGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4666 + * with gil: + * raise RuntimeError('Function "cuStreamGetFlags" not found') + * err = ( __cuStreamGetFlags)(hStream, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, unsigned int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags)(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4666, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4667 + * raise RuntimeError('Function "cuStreamGetFlags" not found') + * err = ( __cuStreamGetFlags)(hStream, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4660 + * return err + * + * cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4669 + * return err + * + * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetId + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetId(CUstream __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetId", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4671 + * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetId + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetId == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4671, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4672 + * global __cuStreamGetId + * cuPythonInit() + * if __cuStreamGetId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetId" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4673 + * cuPythonInit() + * if __cuStreamGetId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetId" not found') + * err = ( __cuStreamGetId)(hStream, streamId) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4674 + * if __cuStreamGetId == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetId" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetId)(hStream, streamId) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetId_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4674, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4674, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4673 + * cuPythonInit() + * if __cuStreamGetId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetId" not found') + * err = ( __cuStreamGetId)(hStream, streamId) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4672 + * global __cuStreamGetId + * cuPythonInit() + * if __cuStreamGetId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetId" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4675 + * with gil: + * raise RuntimeError('Function "cuStreamGetId" not found') + * err = ( __cuStreamGetId)(hStream, streamId) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, unsigned PY_LONG_LONG *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId)(__pyx_v_hStream, __pyx_v_streamId); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4675, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4676 + * raise RuntimeError('Function "cuStreamGetId" not found') + * err = ( __cuStreamGetId)(hStream, streamId) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4669 + * return err + * + * cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetId + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4678 + * return err + * + * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetCtx", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4680 + * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetCtx + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetCtx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4680, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4681 + * global __cuStreamGetCtx + * cuPythonInit() + * if __cuStreamGetCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4682 + * cuPythonInit() + * if __cuStreamGetCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCtx" not found') + * err = ( __cuStreamGetCtx)(hStream, pctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4683 + * if __cuStreamGetCtx == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetCtx)(hStream, pctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetCtx_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4683, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4683, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4682 + * cuPythonInit() + * if __cuStreamGetCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCtx" not found') + * err = ( __cuStreamGetCtx)(hStream, pctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4681 + * global __cuStreamGetCtx + * cuPythonInit() + * if __cuStreamGetCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4684 + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx" not found') + * err = ( __cuStreamGetCtx)(hStream, pctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUcontext *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx)(__pyx_v_hStream, __pyx_v_pctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4684, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4685 + * raise RuntimeError('Function "cuStreamGetCtx" not found') + * err = ( __cuStreamGetCtx)(hStream, pctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4678 + * return err + * + * cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4687 + * return err + * + * cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx_v2(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pCtx, CUgreenCtx *__pyx_v_pGreenCtx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetCtx_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4689 + * cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetCtx_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetCtx_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4689, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4690 + * global __cuStreamGetCtx_v2 + * cuPythonInit() + * if __cuStreamGetCtx_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4691 + * cuPythonInit() + * if __cuStreamGetCtx_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') + * err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4692 + * if __cuStreamGetCtx_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetCtx_v2_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4692, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4692, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4691 + * cuPythonInit() + * if __cuStreamGetCtx_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') + * err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4690 + * global __cuStreamGetCtx_v2 + * cuPythonInit() + * if __cuStreamGetCtx_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4693 + * with gil: + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') + * err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUcontext *, CUgreenCtx *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2)(__pyx_v_hStream, __pyx_v_pCtx, __pyx_v_pGreenCtx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4693, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4694 + * raise RuntimeError('Function "cuStreamGetCtx_v2" not found') + * err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4687 + * return err + * + * cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetCtx_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4696 + * return err + * + * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitEvent(CUstream __pyx_v_hStream, CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamWaitEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4698 + * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamWaitEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamWaitEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4698, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4699 + * global __cuStreamWaitEvent + * cuPythonInit() + * if __cuStreamWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4700 + * cuPythonInit() + * if __cuStreamWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitEvent" not found') + * err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4701 + * if __cuStreamWaitEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamWaitEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamWaitEvent_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4701, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4701, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4700 + * cuPythonInit() + * if __cuStreamWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitEvent" not found') + * err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4699 + * global __cuStreamWaitEvent + * cuPythonInit() + * if __cuStreamWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4702 + * with gil: + * raise RuntimeError('Function "cuStreamWaitEvent" not found') + * err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUevent, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent)(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4702, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4703 + * raise RuntimeError('Function "cuStreamWaitEvent" not found') + * err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4696 + * return err + * + * cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4705 + * return err + * + * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAddCallback(CUstream __pyx_v_hStream, CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamAddCallback", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4707 + * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamAddCallback + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamAddCallback == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4707, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4708 + * global __cuStreamAddCallback + * cuPythonInit() + * if __cuStreamAddCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamAddCallback" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4709 + * cuPythonInit() + * if __cuStreamAddCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamAddCallback" not found') + * err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4710 + * if __cuStreamAddCallback == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamAddCallback" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamAddCallback_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4710, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4710, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4709 + * cuPythonInit() + * if __cuStreamAddCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamAddCallback" not found') + * err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4708 + * global __cuStreamAddCallback + * cuPythonInit() + * if __cuStreamAddCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamAddCallback" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4711 + * with gil: + * raise RuntimeError('Function "cuStreamAddCallback" not found') + * err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamCallback, void *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback)(__pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4711, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4712 + * raise RuntimeError('Function "cuStreamAddCallback" not found') + * err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4705 + * return err + * + * cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4714 + * return err + * + * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCapture_v2(CUstream __pyx_v_hStream, CUstreamCaptureMode __pyx_v_mode) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamBeginCapture_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4716 + * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamBeginCapture_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamBeginCapture_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4716, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4717 + * global __cuStreamBeginCapture_v2 + * cuPythonInit() + * if __cuStreamBeginCapture_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4718 + * cuPythonInit() + * if __cuStreamBeginCapture_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') + * err = ( __cuStreamBeginCapture_v2)(hStream, mode) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4719 + * if __cuStreamBeginCapture_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamBeginCapture_v2)(hStream, mode) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamBeginCapture_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4719, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4719, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4718 + * cuPythonInit() + * if __cuStreamBeginCapture_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') + * err = ( __cuStreamBeginCapture_v2)(hStream, mode) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4717 + * global __cuStreamBeginCapture_v2 + * cuPythonInit() + * if __cuStreamBeginCapture_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4720 + * with gil: + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') + * err = ( __cuStreamBeginCapture_v2)(hStream, mode) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamCaptureMode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2)(__pyx_v_hStream, __pyx_v_mode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4720, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4721 + * raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') + * err = ( __cuStreamBeginCapture_v2)(hStream, mode) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4714 + * return err + * + * cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamBeginCapture_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4723 + * return err + * + * cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCaptureToGraph(CUstream __pyx_v_hStream, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUstreamCaptureMode __pyx_v_mode) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamBeginCaptureToGraph", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4725 + * cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamBeginCaptureToGraph + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamBeginCaptureToGraph == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4725, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4726 + * global __cuStreamBeginCaptureToGraph + * cuPythonInit() + * if __cuStreamBeginCaptureToGraph == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4727 + * cuPythonInit() + * if __cuStreamBeginCaptureToGraph == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') + * err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4728 + * if __cuStreamBeginCaptureToGraph == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamBeginCaptureToG}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4728, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4728, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4727 + * cuPythonInit() + * if __cuStreamBeginCaptureToGraph == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') + * err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4726 + * global __cuStreamBeginCaptureToGraph + * cuPythonInit() + * if __cuStreamBeginCaptureToGraph == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4729 + * with gil: + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') + * err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph)(__pyx_v_hStream, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_mode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4729, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4730 + * raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') + * err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4723 + * return err + * + * cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamBeginCaptureToGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4732 + * return err + * + * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuThreadExchangeStreamCaptureMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *__pyx_v_mode) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuThreadExchangeStreamCaptureMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4734 + * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuThreadExchangeStreamCaptureMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuThreadExchangeStreamCaptureMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4734, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4735 + * global __cuThreadExchangeStreamCaptureMode + * cuPythonInit() + * if __cuThreadExchangeStreamCaptureMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4736 + * cuPythonInit() + * if __cuThreadExchangeStreamCaptureMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') + * err = ( __cuThreadExchangeStreamCaptureMode)(mode) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4737 + * if __cuThreadExchangeStreamCaptureMode == NULL: + * with gil: + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuThreadExchangeStreamCaptureMode)(mode) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuThreadExchangeStreamC}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4737, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4737, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4736 + * cuPythonInit() + * if __cuThreadExchangeStreamCaptureMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') + * err = ( __cuThreadExchangeStreamCaptureMode)(mode) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4735 + * global __cuThreadExchangeStreamCaptureMode + * cuPythonInit() + * if __cuThreadExchangeStreamCaptureMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4738 + * with gil: + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') + * err = ( __cuThreadExchangeStreamCaptureMode)(mode) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstreamCaptureMode *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode)(__pyx_v_mode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4738, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4739 + * raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') + * err = ( __cuThreadExchangeStreamCaptureMode)(mode) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4732 + * return err + * + * cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuThreadExchangeStreamCaptureMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4741 + * return err + * + * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamEndCapture(CUstream __pyx_v_hStream, CUgraph *__pyx_v_phGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamEndCapture", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4743 + * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamEndCapture + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamEndCapture == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4743, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4744 + * global __cuStreamEndCapture + * cuPythonInit() + * if __cuStreamEndCapture == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamEndCapture" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4745 + * cuPythonInit() + * if __cuStreamEndCapture == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamEndCapture" not found') + * err = ( __cuStreamEndCapture)(hStream, phGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4746 + * if __cuStreamEndCapture == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamEndCapture" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamEndCapture)(hStream, phGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamEndCapture_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4746, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4746, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4745 + * cuPythonInit() + * if __cuStreamEndCapture == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamEndCapture" not found') + * err = ( __cuStreamEndCapture)(hStream, phGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4744 + * global __cuStreamEndCapture + * cuPythonInit() + * if __cuStreamEndCapture == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamEndCapture" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4747 + * with gil: + * raise RuntimeError('Function "cuStreamEndCapture" not found') + * err = ( __cuStreamEndCapture)(hStream, phGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUgraph *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture)(__pyx_v_hStream, __pyx_v_phGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4747, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4748 + * raise RuntimeError('Function "cuStreamEndCapture" not found') + * err = ( __cuStreamEndCapture)(hStream, phGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4741 + * return err + * + * cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4750 + * return err + * + * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamIsCapturing(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamIsCapturing", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4752 + * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamIsCapturing + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamIsCapturing == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4752, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4753 + * global __cuStreamIsCapturing + * cuPythonInit() + * if __cuStreamIsCapturing == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamIsCapturing" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4754 + * cuPythonInit() + * if __cuStreamIsCapturing == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamIsCapturing" not found') + * err = ( __cuStreamIsCapturing)(hStream, captureStatus) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4755 + * if __cuStreamIsCapturing == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamIsCapturing" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamIsCapturing)(hStream, captureStatus) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamIsCapturing_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4755, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4755, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4754 + * cuPythonInit() + * if __cuStreamIsCapturing == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamIsCapturing" not found') + * err = ( __cuStreamIsCapturing)(hStream, captureStatus) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4753 + * global __cuStreamIsCapturing + * cuPythonInit() + * if __cuStreamIsCapturing == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamIsCapturing" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4756 + * with gil: + * raise RuntimeError('Function "cuStreamIsCapturing" not found') + * err = ( __cuStreamIsCapturing)(hStream, captureStatus) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamCaptureStatus *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing)(__pyx_v_hStream, __pyx_v_captureStatus); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4756, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4757 + * raise RuntimeError('Function "cuStreamIsCapturing" not found') + * err = ( __cuStreamIsCapturing)(hStream, captureStatus) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4750 + * return err + * + * cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4759 + * return err + * + * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v2(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetCaptureInfo_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4761 + * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetCaptureInfo_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetCaptureInfo_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4761, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4762 + * global __cuStreamGetCaptureInfo_v2 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4763 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') + * err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4764 + * if __cuStreamGetCaptureInfo_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetCaptureInfo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4764, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4764, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4763 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') + * err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4762 + * global __cuStreamGetCaptureInfo_v2 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4765 + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') + * err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2)(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4765, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4766 + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') + * err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4759 + * return err + * + * cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetCaptureInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4768 + * return err + * + * cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v3(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, CUgraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetCaptureInfo_v3", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4770 + * cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetCaptureInfo_v3 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetCaptureInfo_v3 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4770, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4771 + * global __cuStreamGetCaptureInfo_v3 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4772 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') + * err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4773 + * if __cuStreamGetCaptureInfo_v3 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetCaptureInfo_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4773, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4773, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4772 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') + * err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4771 + * global __cuStreamGetCaptureInfo_v3 + * cuPythonInit() + * if __cuStreamGetCaptureInfo_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4774 + * with gil: + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') + * err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3)(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4774, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4775 + * raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') + * err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4768 + * return err + * + * cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetCaptureInfo_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4777 + * return err + * + * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamUpdateCaptureDependencies", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4779 + * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamUpdateCaptureDependencies + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamUpdateCaptureDependencies == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4779, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4780 + * global __cuStreamUpdateCaptureDependencies + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4781 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') + * err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4782 + * if __cuStreamUpdateCaptureDependencies == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamUpdateCaptureDe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4782, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4782, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4781 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') + * err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4780 + * global __cuStreamUpdateCaptureDependencies + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4783 + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') + * err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUgraphNode *, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies)(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4783, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4784 + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') + * err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4777 + * return err + * + * cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4786 + * return err + * + * cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies_v2(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamUpdateCaptureDependencies_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4788 + * cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamUpdateCaptureDependencies_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4788, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4789 + * global __cuStreamUpdateCaptureDependencies_v2 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4790 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') + * err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4791 + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamUpdateCaptureDe_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4791, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4791, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4790 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') + * err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4789 + * global __cuStreamUpdateCaptureDependencies_v2 + * cuPythonInit() + * if __cuStreamUpdateCaptureDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4792 + * with gil: + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') + * err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2)(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4792, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4793 + * raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') + * err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4786 + * return err + * + * cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamUpdateCaptureDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4795 + * return err + * + * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAttachMemAsync(CUstream __pyx_v_hStream, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamAttachMemAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4797 + * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamAttachMemAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamAttachMemAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4797, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4798 + * global __cuStreamAttachMemAsync + * cuPythonInit() + * if __cuStreamAttachMemAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4799 + * cuPythonInit() + * if __cuStreamAttachMemAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') + * err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4800 + * if __cuStreamAttachMemAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamAttachMemAsync}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4800, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4800, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4799 + * cuPythonInit() + * if __cuStreamAttachMemAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') + * err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4798 + * global __cuStreamAttachMemAsync + * cuPythonInit() + * if __cuStreamAttachMemAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4801 + * with gil: + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') + * err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdeviceptr, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync)(__pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4801, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4802 + * raise RuntimeError('Function "cuStreamAttachMemAsync" not found') + * err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4795 + * return err + * + * cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4804 + * return err + * + * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamQuery + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamQuery(CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamQuery", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4806 + * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamQuery + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamQuery == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4806, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4807 + * global __cuStreamQuery + * cuPythonInit() + * if __cuStreamQuery == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamQuery" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4808 + * cuPythonInit() + * if __cuStreamQuery == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamQuery" not found') + * err = ( __cuStreamQuery)(hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4809 + * if __cuStreamQuery == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamQuery" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamQuery)(hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamQuery_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4809, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4809, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4808 + * cuPythonInit() + * if __cuStreamQuery == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamQuery" not found') + * err = ( __cuStreamQuery)(hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4807 + * global __cuStreamQuery + * cuPythonInit() + * if __cuStreamQuery == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamQuery" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4810 + * with gil: + * raise RuntimeError('Function "cuStreamQuery" not found') + * err = ( __cuStreamQuery)(hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery)(__pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4810, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4811 + * raise RuntimeError('Function "cuStreamQuery" not found') + * err = ( __cuStreamQuery)(hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4804 + * return err + * + * cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamQuery + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4813 + * return err + * + * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSynchronize(CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamSynchronize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4815 + * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamSynchronize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamSynchronize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4815, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4816 + * global __cuStreamSynchronize + * cuPythonInit() + * if __cuStreamSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamSynchronize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4817 + * cuPythonInit() + * if __cuStreamSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamSynchronize" not found') + * err = ( __cuStreamSynchronize)(hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4818 + * if __cuStreamSynchronize == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamSynchronize" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamSynchronize)(hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamSynchronize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4818, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4818, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4817 + * cuPythonInit() + * if __cuStreamSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamSynchronize" not found') + * err = ( __cuStreamSynchronize)(hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4816 + * global __cuStreamSynchronize + * cuPythonInit() + * if __cuStreamSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamSynchronize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4819 + * with gil: + * raise RuntimeError('Function "cuStreamSynchronize" not found') + * err = ( __cuStreamSynchronize)(hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize)(__pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4819, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4820 + * raise RuntimeError('Function "cuStreamSynchronize" not found') + * err = ( __cuStreamSynchronize)(hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4813 + * return err + * + * cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4822 + * return err + * + * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamDestroy_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamDestroy_v2(CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamDestroy_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4824 + * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamDestroy_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamDestroy_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4824, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4825 + * global __cuStreamDestroy_v2 + * cuPythonInit() + * if __cuStreamDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4826 + * cuPythonInit() + * if __cuStreamDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') + * err = ( __cuStreamDestroy_v2)(hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4827 + * if __cuStreamDestroy_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamDestroy_v2)(hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamDestroy_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4827, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4827, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4826 + * cuPythonInit() + * if __cuStreamDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') + * err = ( __cuStreamDestroy_v2)(hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4825 + * global __cuStreamDestroy_v2 + * cuPythonInit() + * if __cuStreamDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4828 + * with gil: + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') + * err = ( __cuStreamDestroy_v2)(hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2)(__pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4828, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4829 + * raise RuntimeError('Function "cuStreamDestroy_v2" not found') + * err = ( __cuStreamDestroy_v2)(hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4822 + * return err + * + * cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamDestroy_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4831 + * return err + * + * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCopyAttributes(CUstream __pyx_v_dst, CUstream __pyx_v_src) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamCopyAttributes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4833 + * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamCopyAttributes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamCopyAttributes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4833, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4834 + * global __cuStreamCopyAttributes + * cuPythonInit() + * if __cuStreamCopyAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4835 + * cuPythonInit() + * if __cuStreamCopyAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') + * err = ( __cuStreamCopyAttributes)(dst, src) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4836 + * if __cuStreamCopyAttributes == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamCopyAttributes)(dst, src) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamCopyAttributes}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4836, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4836, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4835 + * cuPythonInit() + * if __cuStreamCopyAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') + * err = ( __cuStreamCopyAttributes)(dst, src) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4834 + * global __cuStreamCopyAttributes + * cuPythonInit() + * if __cuStreamCopyAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4837 + * with gil: + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') + * err = ( __cuStreamCopyAttributes)(dst, src) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes)(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4837, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4838 + * raise RuntimeError('Function "cuStreamCopyAttributes" not found') + * err = ( __cuStreamCopyAttributes)(dst, src) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4831 + * return err + * + * cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4840 + * return err + * + * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue *__pyx_v_value_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4842 + * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4842, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4843 + * global __cuStreamGetAttribute + * cuPythonInit() + * if __cuStreamGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4844 + * cuPythonInit() + * if __cuStreamGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetAttribute" not found') + * err = ( __cuStreamGetAttribute)(hStream, attr, value_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4845 + * if __cuStreamGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetAttribute)(hStream, attr, value_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetAttribute_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4845, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4845, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4844 + * cuPythonInit() + * if __cuStreamGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetAttribute" not found') + * err = ( __cuStreamGetAttribute)(hStream, attr, value_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4843 + * global __cuStreamGetAttribute + * cuPythonInit() + * if __cuStreamGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4846 + * with gil: + * raise RuntimeError('Function "cuStreamGetAttribute" not found') + * err = ( __cuStreamGetAttribute)(hStream, attr, value_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4846, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4847 + * raise RuntimeError('Function "cuStreamGetAttribute" not found') + * err = ( __cuStreamGetAttribute)(hStream, attr, value_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4840 + * return err + * + * cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4849 + * return err + * + * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue const *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4851 + * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4851, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4852 + * global __cuStreamSetAttribute + * cuPythonInit() + * if __cuStreamSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4853 + * cuPythonInit() + * if __cuStreamSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamSetAttribute" not found') + * err = ( __cuStreamSetAttribute)(hStream, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4854 + * if __cuStreamSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamSetAttribute)(hStream, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamSetAttribute_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4854, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4854, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4853 + * cuPythonInit() + * if __cuStreamSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamSetAttribute" not found') + * err = ( __cuStreamSetAttribute)(hStream, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4852 + * global __cuStreamSetAttribute + * cuPythonInit() + * if __cuStreamSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4855 + * with gil: + * raise RuntimeError('Function "cuStreamSetAttribute" not found') + * err = ( __cuStreamSetAttribute)(hStream, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUstreamAttrID, CUstreamAttrValue const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute)(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4855, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4856 + * raise RuntimeError('Function "cuStreamSetAttribute" not found') + * err = ( __cuStreamSetAttribute)(hStream, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4849 + * return err + * + * cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4858 + * return err + * + * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreate(CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4860 + * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4860, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4861 + * global __cuEventCreate + * cuPythonInit() + * if __cuEventCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4862 + * cuPythonInit() + * if __cuEventCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventCreate" not found') + * err = ( __cuEventCreate)(phEvent, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4863 + * if __cuEventCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuEventCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventCreate)(phEvent, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventCreate_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4863, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4863, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4862 + * cuPythonInit() + * if __cuEventCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventCreate" not found') + * err = ( __cuEventCreate)(phEvent, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4861 + * global __cuEventCreate + * cuPythonInit() + * if __cuEventCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4864 + * with gil: + * raise RuntimeError('Function "cuEventCreate" not found') + * err = ( __cuEventCreate)(phEvent, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate)(__pyx_v_phEvent, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4864, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4865 + * raise RuntimeError('Function "cuEventCreate" not found') + * err = ( __cuEventCreate)(phEvent, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4858 + * return err + * + * cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4867 + * return err + * + * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventRecord + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecord(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventRecord", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4869 + * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventRecord + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventRecord == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4869, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4870 + * global __cuEventRecord + * cuPythonInit() + * if __cuEventRecord == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventRecord" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4871 + * cuPythonInit() + * if __cuEventRecord == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventRecord" not found') + * err = ( __cuEventRecord)(hEvent, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4872 + * if __cuEventRecord == NULL: + * with gil: + * raise RuntimeError('Function "cuEventRecord" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventRecord)(hEvent, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventRecord_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4872, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4872, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4871 + * cuPythonInit() + * if __cuEventRecord == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventRecord" not found') + * err = ( __cuEventRecord)(hEvent, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4870 + * global __cuEventRecord + * cuPythonInit() + * if __cuEventRecord == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventRecord" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4873 + * with gil: + * raise RuntimeError('Function "cuEventRecord" not found') + * err = ( __cuEventRecord)(hEvent, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord)(__pyx_v_hEvent, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4873, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4874 + * raise RuntimeError('Function "cuEventRecord" not found') + * err = ( __cuEventRecord)(hEvent, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4867 + * return err + * + * cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventRecord + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4876 + * return err + * + * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecordWithFlags(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventRecordWithFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4878 + * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventRecordWithFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventRecordWithFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4878, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4879 + * global __cuEventRecordWithFlags + * cuPythonInit() + * if __cuEventRecordWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4880 + * cuPythonInit() + * if __cuEventRecordWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') + * err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4881 + * if __cuEventRecordWithFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventRecordWithFlags}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4881, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4881, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4880 + * cuPythonInit() + * if __cuEventRecordWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') + * err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4879 + * global __cuEventRecordWithFlags + * cuPythonInit() + * if __cuEventRecordWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4882 + * with gil: + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') + * err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent, CUstream, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags)(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4882, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4883 + * raise RuntimeError('Function "cuEventRecordWithFlags" not found') + * err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4876 + * return err + * + * cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4885 + * return err + * + * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventQuery + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventQuery(CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventQuery", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4887 + * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventQuery + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventQuery == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4887, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4888 + * global __cuEventQuery + * cuPythonInit() + * if __cuEventQuery == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventQuery" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4889 + * cuPythonInit() + * if __cuEventQuery == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventQuery" not found') + * err = ( __cuEventQuery)(hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4890 + * if __cuEventQuery == NULL: + * with gil: + * raise RuntimeError('Function "cuEventQuery" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventQuery)(hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventQuery_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4890, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4890, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4889 + * cuPythonInit() + * if __cuEventQuery == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventQuery" not found') + * err = ( __cuEventQuery)(hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4888 + * global __cuEventQuery + * cuPythonInit() + * if __cuEventQuery == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventQuery" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4891 + * with gil: + * raise RuntimeError('Function "cuEventQuery" not found') + * err = ( __cuEventQuery)(hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery)(__pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4891, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4892 + * raise RuntimeError('Function "cuEventQuery" not found') + * err = ( __cuEventQuery)(hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4885 + * return err + * + * cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventQuery + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4894 + * return err + * + * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventSynchronize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventSynchronize(CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventSynchronize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4896 + * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventSynchronize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventSynchronize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4896, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4897 + * global __cuEventSynchronize + * cuPythonInit() + * if __cuEventSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventSynchronize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4898 + * cuPythonInit() + * if __cuEventSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventSynchronize" not found') + * err = ( __cuEventSynchronize)(hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4899 + * if __cuEventSynchronize == NULL: + * with gil: + * raise RuntimeError('Function "cuEventSynchronize" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventSynchronize)(hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventSynchronize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4899, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4899, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4898 + * cuPythonInit() + * if __cuEventSynchronize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventSynchronize" not found') + * err = ( __cuEventSynchronize)(hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4897 + * global __cuEventSynchronize + * cuPythonInit() + * if __cuEventSynchronize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventSynchronize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4900 + * with gil: + * raise RuntimeError('Function "cuEventSynchronize" not found') + * err = ( __cuEventSynchronize)(hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize)(__pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4900, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4901 + * raise RuntimeError('Function "cuEventSynchronize" not found') + * err = ( __cuEventSynchronize)(hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4894 + * return err + * + * cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventSynchronize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4903 + * return err + * + * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventDestroy_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventDestroy_v2(CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventDestroy_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4905 + * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventDestroy_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventDestroy_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4905, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4906 + * global __cuEventDestroy_v2 + * cuPythonInit() + * if __cuEventDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventDestroy_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4907 + * cuPythonInit() + * if __cuEventDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventDestroy_v2" not found') + * err = ( __cuEventDestroy_v2)(hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4908 + * if __cuEventDestroy_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuEventDestroy_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventDestroy_v2)(hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventDestroy_v2_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4908, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4908, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4907 + * cuPythonInit() + * if __cuEventDestroy_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventDestroy_v2" not found') + * err = ( __cuEventDestroy_v2)(hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4906 + * global __cuEventDestroy_v2 + * cuPythonInit() + * if __cuEventDestroy_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventDestroy_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4909 + * with gil: + * raise RuntimeError('Function "cuEventDestroy_v2" not found') + * err = ( __cuEventDestroy_v2)(hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2)(__pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4909, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4910 + * raise RuntimeError('Function "cuEventDestroy_v2" not found') + * err = ( __cuEventDestroy_v2)(hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4903 + * return err + * + * cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventDestroy_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventDestroy_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4912 + * return err + * + * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventElapsedTime + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventElapsedTime", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4914 + * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventElapsedTime + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventElapsedTime == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4914, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4915 + * global __cuEventElapsedTime + * cuPythonInit() + * if __cuEventElapsedTime == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4916 + * cuPythonInit() + * if __cuEventElapsedTime == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventElapsedTime" not found') + * err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4917 + * if __cuEventElapsedTime == NULL: + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventElapsedTime_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4917, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4917, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4916 + * cuPythonInit() + * if __cuEventElapsedTime == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventElapsedTime" not found') + * err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4915 + * global __cuEventElapsedTime + * cuPythonInit() + * if __cuEventElapsedTime == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4918 + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime" not found') + * err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(float *, CUevent, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime)(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4918, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4919 + * raise RuntimeError('Function "cuEventElapsedTime" not found') + * err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4912 + * return err + * + * cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventElapsedTime + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4921 + * return err + * + * cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventElapsedTime_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime_v2(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventElapsedTime_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4923 + * cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventElapsedTime_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventElapsedTime_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4923, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4924 + * global __cuEventElapsedTime_v2 + * cuPythonInit() + * if __cuEventElapsedTime_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4925 + * cuPythonInit() + * if __cuEventElapsedTime_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + * err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4926 + * if __cuEventElapsedTime_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventElapsedTime_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4926, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4926, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4925 + * cuPythonInit() + * if __cuEventElapsedTime_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + * err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4924 + * global __cuEventElapsedTime_v2 + * cuPythonInit() + * if __cuEventElapsedTime_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4927 + * with gil: + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + * err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(float *, CUevent, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2)(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4927, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4928 + * raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + * err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4921 + * return err + * + * cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventElapsedTime_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventElapsedTime_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4930 + * return err + * + * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuImportExternalMemory + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalMemory(CUexternalMemory *__pyx_v_extMem_out, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuImportExternalMemory", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4932 + * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuImportExternalMemory + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuImportExternalMemory == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4932, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4933 + * global __cuImportExternalMemory + * cuPythonInit() + * if __cuImportExternalMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuImportExternalMemory" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4934 + * cuPythonInit() + * if __cuImportExternalMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuImportExternalMemory" not found') + * err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4935 + * if __cuImportExternalMemory == NULL: + * with gil: + * raise RuntimeError('Function "cuImportExternalMemory" not found') # <<<<<<<<<<<<<< + * err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuImportExternalMemory}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4935, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4935, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4934 + * cuPythonInit() + * if __cuImportExternalMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuImportExternalMemory" not found') + * err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4933 + * global __cuImportExternalMemory + * cuPythonInit() + * if __cuImportExternalMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuImportExternalMemory" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4936 + * with gil: + * raise RuntimeError('Function "cuImportExternalMemory" not found') + * err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory)(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4936, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4937 + * raise RuntimeError('Function "cuImportExternalMemory" not found') + * err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4930 + * return err + * + * cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuImportExternalMemory + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4939 + * return err + * + * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedBuffer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedBuffer(CUdeviceptr *__pyx_v_devPtr, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuExternalMemoryGetMappedBuffer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4941 + * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuExternalMemoryGetMappedBuffer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuExternalMemoryGetMappedBuffer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4941, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4942 + * global __cuExternalMemoryGetMappedBuffer + * cuPythonInit() + * if __cuExternalMemoryGetMappedBuffer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4943 + * cuPythonInit() + * if __cuExternalMemoryGetMappedBuffer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') + * err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4944 + * if __cuExternalMemoryGetMappedBuffer == NULL: + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') # <<<<<<<<<<<<<< + * err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuExternalMemoryGetMapp}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4944, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4944, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4943 + * cuPythonInit() + * if __cuExternalMemoryGetMappedBuffer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') + * err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4942 + * global __cuExternalMemoryGetMappedBuffer + * cuPythonInit() + * if __cuExternalMemoryGetMappedBuffer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4945 + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') + * err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer)(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4945, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4946 + * raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') + * err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4939 + * return err + * + * cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedBuffer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4948 + * return err + * + * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedMipmappedArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_mipmap, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuExternalMemoryGetMappedMipmappedArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4950 + * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuExternalMemoryGetMappedMipmappedArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4950, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4951 + * global __cuExternalMemoryGetMappedMipmappedArray + * cuPythonInit() + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4952 + * cuPythonInit() + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') + * err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4953 + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuExternalMemoryGetMapp_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4953, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4953, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4952 + * cuPythonInit() + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') + * err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4951 + * global __cuExternalMemoryGetMappedMipmappedArray + * cuPythonInit() + * if __cuExternalMemoryGetMappedMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4954 + * with gil: + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') + * err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray)(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4954, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4955 + * raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') + * err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4948 + * return err + * + * cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedMipmappedArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4957 + * return err + * + * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDestroyExternalMemory + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalMemory(CUexternalMemory __pyx_v_extMem) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDestroyExternalMemory", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4959 + * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDestroyExternalMemory + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDestroyExternalMemory == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4959, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4960 + * global __cuDestroyExternalMemory + * cuPythonInit() + * if __cuDestroyExternalMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4961 + * cuPythonInit() + * if __cuDestroyExternalMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') + * err = ( __cuDestroyExternalMemory)(extMem) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4962 + * if __cuDestroyExternalMemory == NULL: + * with gil: + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') # <<<<<<<<<<<<<< + * err = ( __cuDestroyExternalMemory)(extMem) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDestroyExternalMemory}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4962, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4962, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4961 + * cuPythonInit() + * if __cuDestroyExternalMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') + * err = ( __cuDestroyExternalMemory)(extMem) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4960 + * global __cuDestroyExternalMemory + * cuPythonInit() + * if __cuDestroyExternalMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4963 + * with gil: + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') + * err = ( __cuDestroyExternalMemory)(extMem) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalMemory))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory)(__pyx_v_extMem); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4963, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4964 + * raise RuntimeError('Function "cuDestroyExternalMemory" not found') + * err = ( __cuDestroyExternalMemory)(extMem) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4957 + * return err + * + * cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDestroyExternalMemory + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4966 + * return err + * + * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuImportExternalSemaphore + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalSemaphore(CUexternalSemaphore *__pyx_v_extSem_out, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuImportExternalSemaphore", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4968 + * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuImportExternalSemaphore + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuImportExternalSemaphore == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4968, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4969 + * global __cuImportExternalSemaphore + * cuPythonInit() + * if __cuImportExternalSemaphore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4970 + * cuPythonInit() + * if __cuImportExternalSemaphore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') + * err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4971 + * if __cuImportExternalSemaphore == NULL: + * with gil: + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') # <<<<<<<<<<<<<< + * err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuImportExternalSemapho}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4971, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4971, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4970 + * cuPythonInit() + * if __cuImportExternalSemaphore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') + * err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4969 + * global __cuImportExternalSemaphore + * cuPythonInit() + * if __cuImportExternalSemaphore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4972 + * with gil: + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') + * err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore)(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4972, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4973 + * raise RuntimeError('Function "cuImportExternalSemaphore" not found') + * err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4966 + * return err + * + * cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuImportExternalSemaphore + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4975 + * return err + * + * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSignalExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSignalExternalSemaphoresAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4977 + * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSignalExternalSemaphoresAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSignalExternalSemaphoresAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4977, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4978 + * global __cuSignalExternalSemaphoresAsync + * cuPythonInit() + * if __cuSignalExternalSemaphoresAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4979 + * cuPythonInit() + * if __cuSignalExternalSemaphoresAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') + * err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4980 + * if __cuSignalExternalSemaphoresAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSignalExternalSemapho}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4980, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4980, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4979 + * cuPythonInit() + * if __cuSignalExternalSemaphoresAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') + * err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4978 + * global __cuSignalExternalSemaphoresAsync + * cuPythonInit() + * if __cuSignalExternalSemaphoresAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4981 + * with gil: + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') + * err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4981, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4982 + * raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') + * err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4975 + * return err + * + * cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4984 + * return err + * + * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuWaitExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuWaitExternalSemaphoresAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4986 + * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuWaitExternalSemaphoresAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuWaitExternalSemaphoresAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4986, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4987 + * global __cuWaitExternalSemaphoresAsync + * cuPythonInit() + * if __cuWaitExternalSemaphoresAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4988 + * cuPythonInit() + * if __cuWaitExternalSemaphoresAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') + * err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4989 + * if __cuWaitExternalSemaphoresAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuWaitExternalSemaphore}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4989, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4989, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4988 + * cuPythonInit() + * if __cuWaitExternalSemaphoresAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') + * err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4987 + * global __cuWaitExternalSemaphoresAsync + * cuPythonInit() + * if __cuWaitExternalSemaphoresAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4990 + * with gil: + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') + * err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync)(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4990, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":4991 + * raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') + * err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4984 + * return err + * + * cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":4993 + * return err + * + * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDestroyExternalSemaphore + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalSemaphore(CUexternalSemaphore __pyx_v_extSem) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDestroyExternalSemaphore", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":4995 + * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDestroyExternalSemaphore + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDestroyExternalSemaphore == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4995, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":4996 + * global __cuDestroyExternalSemaphore + * cuPythonInit() + * if __cuDestroyExternalSemaphore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":4997 + * cuPythonInit() + * if __cuDestroyExternalSemaphore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') + * err = ( __cuDestroyExternalSemaphore)(extSem) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":4998 + * if __cuDestroyExternalSemaphore == NULL: + * with gil: + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') # <<<<<<<<<<<<<< + * err = ( __cuDestroyExternalSemaphore)(extSem) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDestroyExternalSemaph}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4998, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 4998, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4997 + * cuPythonInit() + * if __cuDestroyExternalSemaphore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') + * err = ( __cuDestroyExternalSemaphore)(extSem) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4996 + * global __cuDestroyExternalSemaphore + * cuPythonInit() + * if __cuDestroyExternalSemaphore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":4999 + * with gil: + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') + * err = ( __cuDestroyExternalSemaphore)(extSem) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUexternalSemaphore))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore)(__pyx_v_extSem); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 4999, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5000 + * raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') + * err = ( __cuDestroyExternalSemaphore)(extSem) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":4993 + * return err + * + * cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDestroyExternalSemaphore + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5002 + * return err + * + * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamWaitValue32_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5004 + * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamWaitValue32_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamWaitValue32_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5004, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5005 + * global __cuStreamWaitValue32_v2 + * cuPythonInit() + * if __cuStreamWaitValue32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5006 + * cuPythonInit() + * if __cuStreamWaitValue32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') + * err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5007 + * if __cuStreamWaitValue32_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamWaitValue32_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5007, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5007, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5006 + * cuPythonInit() + * if __cuStreamWaitValue32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') + * err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5005 + * global __cuStreamWaitValue32_v2 + * cuPythonInit() + * if __cuStreamWaitValue32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5008 + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') + * err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5008, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5009 + * raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') + * err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5002 + * return err + * + * cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamWaitValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5011 + * return err + * + * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamWaitValue64_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5013 + * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamWaitValue64_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamWaitValue64_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5013, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5014 + * global __cuStreamWaitValue64_v2 + * cuPythonInit() + * if __cuStreamWaitValue64_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5015 + * cuPythonInit() + * if __cuStreamWaitValue64_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') + * err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5016 + * if __cuStreamWaitValue64_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamWaitValue64_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5016, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5016, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5015 + * cuPythonInit() + * if __cuStreamWaitValue64_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') + * err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5014 + * global __cuStreamWaitValue64_v2 + * cuPythonInit() + * if __cuStreamWaitValue64_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5017 + * with gil: + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') + * err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5017, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5018 + * raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') + * err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5011 + * return err + * + * cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamWaitValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5020 + * return err + * + * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamWriteValue32_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5022 + * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamWriteValue32_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamWriteValue32_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5022, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5023 + * global __cuStreamWriteValue32_v2 + * cuPythonInit() + * if __cuStreamWriteValue32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5024 + * cuPythonInit() + * if __cuStreamWriteValue32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') + * err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5025 + * if __cuStreamWriteValue32_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamWriteValue32_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5025, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5025, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5024 + * cuPythonInit() + * if __cuStreamWriteValue32_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') + * err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5023 + * global __cuStreamWriteValue32_v2 + * cuPythonInit() + * if __cuStreamWriteValue32_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5026 + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') + * err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdeviceptr, cuuint32_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5026, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5027 + * raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') + * err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5020 + * return err + * + * cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamWriteValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5029 + * return err + * + * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamWriteValue64_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5031 + * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamWriteValue64_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamWriteValue64_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5031, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5032 + * global __cuStreamWriteValue64_v2 + * cuPythonInit() + * if __cuStreamWriteValue64_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5033 + * cuPythonInit() + * if __cuStreamWriteValue64_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') + * err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5034 + * if __cuStreamWriteValue64_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamWriteValue64_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5034, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5034, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5033 + * cuPythonInit() + * if __cuStreamWriteValue64_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') + * err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5032 + * global __cuStreamWriteValue64_v2 + * cuPythonInit() + * if __cuStreamWriteValue64_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5035 + * with gil: + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') + * err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUdeviceptr, cuuint64_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2)(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5035, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5036 + * raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') + * err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5029 + * return err + * + * cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamWriteValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5038 + * return err + * + * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBatchMemOp_v2(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamBatchMemOp_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5040 + * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamBatchMemOp_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamBatchMemOp_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5040, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5041 + * global __cuStreamBatchMemOp_v2 + * cuPythonInit() + * if __cuStreamBatchMemOp_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5042 + * cuPythonInit() + * if __cuStreamBatchMemOp_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') + * err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5043 + * if __cuStreamBatchMemOp_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamBatchMemOp_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5043, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5043, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5042 + * cuPythonInit() + * if __cuStreamBatchMemOp_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') + * err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5041 + * global __cuStreamBatchMemOp_v2 + * cuPythonInit() + * if __cuStreamBatchMemOp_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5044 + * with gil: + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') + * err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2)(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5044, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5045 + * raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') + * err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5038 + * return err + * + * cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamBatchMemOp_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5047 + * return err + * + * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUfunction __pyx_v_hfunc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5049 + * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5049, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5050 + * global __cuFuncGetAttribute + * cuPythonInit() + * if __cuFuncGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5051 + * cuPythonInit() + * if __cuFuncGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetAttribute" not found') + * err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5052 + * if __cuFuncGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncGetAttribute_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5052, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5052, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5051 + * cuPythonInit() + * if __cuFuncGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetAttribute" not found') + * err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5050 + * global __cuFuncGetAttribute + * cuPythonInit() + * if __cuFuncGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5053 + * with gil: + * raise RuntimeError('Function "cuFuncGetAttribute" not found') + * err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction_attribute, CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute)(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5053, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5054 + * raise RuntimeError('Function "cuFuncGetAttribute" not found') + * err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5047 + * return err + * + * cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5056 + * return err + * + * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetAttribute(CUfunction __pyx_v_hfunc, CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5058 + * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5058, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5059 + * global __cuFuncSetAttribute + * cuPythonInit() + * if __cuFuncSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5060 + * cuPythonInit() + * if __cuFuncSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetAttribute" not found') + * err = ( __cuFuncSetAttribute)(hfunc, attrib, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5061 + * if __cuFuncSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncSetAttribute)(hfunc, attrib, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncSetAttribute_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5061, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5061, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5060 + * cuPythonInit() + * if __cuFuncSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetAttribute" not found') + * err = ( __cuFuncSetAttribute)(hfunc, attrib, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5059 + * global __cuFuncSetAttribute + * cuPythonInit() + * if __cuFuncSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5062 + * with gil: + * raise RuntimeError('Function "cuFuncSetAttribute" not found') + * err = ( __cuFuncSetAttribute)(hfunc, attrib, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, CUfunction_attribute, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute)(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5062, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5063 + * raise RuntimeError('Function "cuFuncSetAttribute" not found') + * err = ( __cuFuncSetAttribute)(hfunc, attrib, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5056 + * return err + * + * cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5065 + * return err + * + * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetCacheConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetCacheConfig(CUfunction __pyx_v_hfunc, CUfunc_cache __pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncSetCacheConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5067 + * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncSetCacheConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncSetCacheConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5067, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5068 + * global __cuFuncSetCacheConfig + * cuPythonInit() + * if __cuFuncSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5069 + * cuPythonInit() + * if __cuFuncSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') + * err = ( __cuFuncSetCacheConfig)(hfunc, config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5070 + * if __cuFuncSetCacheConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncSetCacheConfig)(hfunc, config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncSetCacheConfig_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5070, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5070, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5069 + * cuPythonInit() + * if __cuFuncSetCacheConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') + * err = ( __cuFuncSetCacheConfig)(hfunc, config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5068 + * global __cuFuncSetCacheConfig + * cuPythonInit() + * if __cuFuncSetCacheConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5071 + * with gil: + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') + * err = ( __cuFuncSetCacheConfig)(hfunc, config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, CUfunc_cache))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig)(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5071, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5072 + * raise RuntimeError('Function "cuFuncSetCacheConfig" not found') + * err = ( __cuFuncSetCacheConfig)(hfunc, config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5065 + * return err + * + * cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetCacheConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5074 + * return err + * + * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetModule + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetModule(CUmodule *__pyx_v_hmod, CUfunction __pyx_v_hfunc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncGetModule", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5076 + * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncGetModule + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncGetModule == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5076, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5077 + * global __cuFuncGetModule + * cuPythonInit() + * if __cuFuncGetModule == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetModule" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5078 + * cuPythonInit() + * if __cuFuncGetModule == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetModule" not found') + * err = ( __cuFuncGetModule)(hmod, hfunc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5079 + * if __cuFuncGetModule == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncGetModule" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncGetModule)(hmod, hfunc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncGetModule_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5079, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5079, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5078 + * cuPythonInit() + * if __cuFuncGetModule == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetModule" not found') + * err = ( __cuFuncGetModule)(hmod, hfunc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5077 + * global __cuFuncGetModule + * cuPythonInit() + * if __cuFuncGetModule == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetModule" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5080 + * with gil: + * raise RuntimeError('Function "cuFuncGetModule" not found') + * err = ( __cuFuncGetModule)(hmod, hfunc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmodule *, CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule)(__pyx_v_hmod, __pyx_v_hfunc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5080, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5081 + * raise RuntimeError('Function "cuFuncGetModule" not found') + * err = ( __cuFuncGetModule)(hmod, hfunc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5074 + * return err + * + * cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetModule + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5083 + * return err + * + * cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetName + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetName(char const **__pyx_v_name, CUfunction __pyx_v_hfunc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncGetName", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5085 + * cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncGetName + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncGetName == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5085, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5086 + * global __cuFuncGetName + * cuPythonInit() + * if __cuFuncGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetName" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5087 + * cuPythonInit() + * if __cuFuncGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetName" not found') + * err = ( __cuFuncGetName)(name, hfunc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5088 + * if __cuFuncGetName == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncGetName" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncGetName)(name, hfunc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncGetName_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5088, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5088, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5087 + * cuPythonInit() + * if __cuFuncGetName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetName" not found') + * err = ( __cuFuncGetName)(name, hfunc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5086 + * global __cuFuncGetName + * cuPythonInit() + * if __cuFuncGetName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetName" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5089 + * with gil: + * raise RuntimeError('Function "cuFuncGetName" not found') + * err = ( __cuFuncGetName)(name, hfunc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char const **, CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName)(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5089, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5090 + * raise RuntimeError('Function "cuFuncGetName" not found') + * err = ( __cuFuncGetName)(name, hfunc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5083 + * return err + * + * cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetName + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5092 + * return err + * + * cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetParamInfo + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetParamInfo(CUfunction __pyx_v_func, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncGetParamInfo", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5094 + * cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncGetParamInfo + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncGetParamInfo == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5094, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5095 + * global __cuFuncGetParamInfo + * cuPythonInit() + * if __cuFuncGetParamInfo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5096 + * cuPythonInit() + * if __cuFuncGetParamInfo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') + * err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5097 + * if __cuFuncGetParamInfo == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncGetParamInfo_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5097, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5097, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5096 + * cuPythonInit() + * if __cuFuncGetParamInfo == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') + * err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5095 + * global __cuFuncGetParamInfo + * cuPythonInit() + * if __cuFuncGetParamInfo == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5098 + * with gil: + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') + * err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, size_t, size_t *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo)(__pyx_v_func, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5098, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5099 + * raise RuntimeError('Function "cuFuncGetParamInfo" not found') + * err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5092 + * return err + * + * cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncGetParamInfo + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncGetParamInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5101 + * return err + * + * cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncIsLoaded + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncIsLoaded(CUfunctionLoadingState *__pyx_v_state, CUfunction __pyx_v_function) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncIsLoaded", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5103 + * cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncIsLoaded + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncIsLoaded == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5103, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5104 + * global __cuFuncIsLoaded + * cuPythonInit() + * if __cuFuncIsLoaded == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncIsLoaded" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5105 + * cuPythonInit() + * if __cuFuncIsLoaded == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncIsLoaded" not found') + * err = ( __cuFuncIsLoaded)(state, function) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5106 + * if __cuFuncIsLoaded == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncIsLoaded" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncIsLoaded)(state, function) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncIsLoaded_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5106, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5106, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5105 + * cuPythonInit() + * if __cuFuncIsLoaded == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncIsLoaded" not found') + * err = ( __cuFuncIsLoaded)(state, function) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5104 + * global __cuFuncIsLoaded + * cuPythonInit() + * if __cuFuncIsLoaded == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncIsLoaded" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5107 + * with gil: + * raise RuntimeError('Function "cuFuncIsLoaded" not found') + * err = ( __cuFuncIsLoaded)(state, function) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunctionLoadingState *, CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded)(__pyx_v_state, __pyx_v_function); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5107, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5108 + * raise RuntimeError('Function "cuFuncIsLoaded" not found') + * err = ( __cuFuncIsLoaded)(state, function) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5101 + * return err + * + * cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncIsLoaded + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncIsLoaded", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5110 + * return err + * + * cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncLoad + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncLoad(CUfunction __pyx_v_function) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncLoad", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5112 + * cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncLoad + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncLoad == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5112, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5113 + * global __cuFuncLoad + * cuPythonInit() + * if __cuFuncLoad == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncLoad" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5114 + * cuPythonInit() + * if __cuFuncLoad == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncLoad" not found') + * err = ( __cuFuncLoad)(function) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5115 + * if __cuFuncLoad == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncLoad" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncLoad)(function) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncLoad_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5115, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5115, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5114 + * cuPythonInit() + * if __cuFuncLoad == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncLoad" not found') + * err = ( __cuFuncLoad)(function) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5113 + * global __cuFuncLoad + * cuPythonInit() + * if __cuFuncLoad == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncLoad" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5116 + * with gil: + * raise RuntimeError('Function "cuFuncLoad" not found') + * err = ( __cuFuncLoad)(function) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad)(__pyx_v_function); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5116, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5117 + * raise RuntimeError('Function "cuFuncLoad" not found') + * err = ( __cuFuncLoad)(function) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5110 + * return err + * + * cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncLoad + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5119 + * return err + * + * cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchKernel", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5121 + * cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchKernel + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchKernel == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5121, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5122 + * global __cuLaunchKernel + * cuPythonInit() + * if __cuLaunchKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchKernel" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5123 + * cuPythonInit() + * if __cuLaunchKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchKernel" not found') + * err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5124 + * if __cuLaunchKernel == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchKernel" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchKernel_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5124, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5124, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5123 + * cuPythonInit() + * if __cuLaunchKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchKernel" not found') + * err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5122 + * global __cuLaunchKernel + * cuPythonInit() + * if __cuLaunchKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchKernel" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5125 + * with gil: + * raise RuntimeError('Function "cuLaunchKernel" not found') + * err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel)(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5125, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5126 + * raise RuntimeError('Function "cuLaunchKernel" not found') + * err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5119 + * return err + * + * cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5128 + * return err + * + * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernelEx(CUlaunchConfig const *__pyx_v_config, CUfunction __pyx_v_f, void **__pyx_v_kernelParams, void **__pyx_v_extra) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchKernelEx", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5130 + * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchKernelEx + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchKernelEx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5130, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5131 + * global __cuLaunchKernelEx + * cuPythonInit() + * if __cuLaunchKernelEx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchKernelEx" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5132 + * cuPythonInit() + * if __cuLaunchKernelEx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchKernelEx" not found') + * err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5133 + * if __cuLaunchKernelEx == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchKernelEx" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchKernelEx_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5133, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5133, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5132 + * cuPythonInit() + * if __cuLaunchKernelEx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchKernelEx" not found') + * err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5131 + * global __cuLaunchKernelEx + * cuPythonInit() + * if __cuLaunchKernelEx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchKernelEx" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5134 + * with gil: + * raise RuntimeError('Function "cuLaunchKernelEx" not found') + * err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlaunchConfig const *, CUfunction, void **, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx)(__pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5134, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5135 + * raise RuntimeError('Function "cuLaunchKernelEx" not found') + * err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5128 + * return err + * + * cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5137 + * return err + * + * cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchCooperativeKernel", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5139 + * cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchCooperativeKernel + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchCooperativeKernel == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5139, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5140 + * global __cuLaunchCooperativeKernel + * cuPythonInit() + * if __cuLaunchCooperativeKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5141 + * cuPythonInit() + * if __cuLaunchCooperativeKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') + * err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5142 + * if __cuLaunchCooperativeKernel == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchCooperativeKern}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5142, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5142, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5141 + * cuPythonInit() + * if __cuLaunchCooperativeKernel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') + * err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5140 + * global __cuLaunchCooperativeKernel + * cuPythonInit() + * if __cuLaunchCooperativeKernel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5143 + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') + * err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel)(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5143, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5144 + * raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') + * err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5137 + * return err + * + * cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5146 + * return err + * + * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernelMultiDevice + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchCooperativeKernelMultiDevice", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5148 + * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchCooperativeKernelMultiDevice + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchCooperativeKernelMultiDevice == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5148, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5149 + * global __cuLaunchCooperativeKernelMultiDevice + * cuPythonInit() + * if __cuLaunchCooperativeKernelMultiDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5150 + * cuPythonInit() + * if __cuLaunchCooperativeKernelMultiDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') + * err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5151 + * if __cuLaunchCooperativeKernelMultiDevice == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchCooperativeKern_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5151, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5151, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5150 + * cuPythonInit() + * if __cuLaunchCooperativeKernelMultiDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') + * err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5149 + * global __cuLaunchCooperativeKernelMultiDevice + * cuPythonInit() + * if __cuLaunchCooperativeKernelMultiDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5152 + * with gil: + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') + * err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice)(__pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5152, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5153 + * raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') + * err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5146 + * return err + * + * cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernelMultiDevice + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5155 + * return err + * + * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchHostFunc(CUstream __pyx_v_hStream, CUhostFn __pyx_v_fn, void *__pyx_v_userData) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchHostFunc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5157 + * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchHostFunc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchHostFunc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5157, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5158 + * global __cuLaunchHostFunc + * cuPythonInit() + * if __cuLaunchHostFunc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchHostFunc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5159 + * cuPythonInit() + * if __cuLaunchHostFunc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchHostFunc" not found') + * err = ( __cuLaunchHostFunc)(hStream, fn, userData) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5160 + * if __cuLaunchHostFunc == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchHostFunc" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchHostFunc)(hStream, fn, userData) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchHostFunc_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5160, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5160, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5159 + * cuPythonInit() + * if __cuLaunchHostFunc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchHostFunc" not found') + * err = ( __cuLaunchHostFunc)(hStream, fn, userData) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5158 + * global __cuLaunchHostFunc + * cuPythonInit() + * if __cuLaunchHostFunc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchHostFunc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5161 + * with gil: + * raise RuntimeError('Function "cuLaunchHostFunc" not found') + * err = ( __cuLaunchHostFunc)(hStream, fn, userData) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUhostFn, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc)(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5161, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5162 + * raise RuntimeError('Function "cuLaunchHostFunc" not found') + * err = ( __cuLaunchHostFunc)(hStream, fn, userData) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5155 + * return err + * + * cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5164 + * return err + * + * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetBlockShape + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetBlockShape(CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncSetBlockShape", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5166 + * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncSetBlockShape + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncSetBlockShape == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5166, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5167 + * global __cuFuncSetBlockShape + * cuPythonInit() + * if __cuFuncSetBlockShape == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5168 + * cuPythonInit() + * if __cuFuncSetBlockShape == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') + * err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5169 + * if __cuFuncSetBlockShape == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncSetBlockShape_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5169, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5169, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5168 + * cuPythonInit() + * if __cuFuncSetBlockShape == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') + * err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5167 + * global __cuFuncSetBlockShape + * cuPythonInit() + * if __cuFuncSetBlockShape == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5170 + * with gil: + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') + * err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, int, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape)(__pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5170, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5171 + * raise RuntimeError('Function "cuFuncSetBlockShape" not found') + * err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5164 + * return err + * + * cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetBlockShape + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5173 + * return err + * + * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetSharedSize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncSetSharedSize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5175 + * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncSetSharedSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncSetSharedSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5175, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5176 + * global __cuFuncSetSharedSize + * cuPythonInit() + * if __cuFuncSetSharedSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5177 + * cuPythonInit() + * if __cuFuncSetSharedSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') + * err = ( __cuFuncSetSharedSize)(hfunc, numbytes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5178 + * if __cuFuncSetSharedSize == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncSetSharedSize)(hfunc, numbytes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncSetSharedSize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5178, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5178, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5177 + * cuPythonInit() + * if __cuFuncSetSharedSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') + * err = ( __cuFuncSetSharedSize)(hfunc, numbytes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5176 + * global __cuFuncSetSharedSize + * cuPythonInit() + * if __cuFuncSetSharedSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5179 + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') + * err = ( __cuFuncSetSharedSize)(hfunc, numbytes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize)(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5179, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5180 + * raise RuntimeError('Function "cuFuncSetSharedSize" not found') + * err = ( __cuFuncSetSharedSize)(hfunc, numbytes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5173 + * return err + * + * cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetSharedSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5182 + * return err + * + * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetSize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuParamSetSize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5184 + * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuParamSetSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuParamSetSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5184, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5185 + * global __cuParamSetSize + * cuPythonInit() + * if __cuParamSetSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5186 + * cuPythonInit() + * if __cuParamSetSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetSize" not found') + * err = ( __cuParamSetSize)(hfunc, numbytes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5187 + * if __cuParamSetSize == NULL: + * with gil: + * raise RuntimeError('Function "cuParamSetSize" not found') # <<<<<<<<<<<<<< + * err = ( __cuParamSetSize)(hfunc, numbytes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuParamSetSize_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5187, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5187, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5186 + * cuPythonInit() + * if __cuParamSetSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetSize" not found') + * err = ( __cuParamSetSize)(hfunc, numbytes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5185 + * global __cuParamSetSize + * cuPythonInit() + * if __cuParamSetSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5188 + * with gil: + * raise RuntimeError('Function "cuParamSetSize" not found') + * err = ( __cuParamSetSize)(hfunc, numbytes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize)(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5188, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5189 + * raise RuntimeError('Function "cuParamSetSize" not found') + * err = ( __cuParamSetSize)(hfunc, numbytes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5182 + * return err + * + * cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5191 + * return err + * + * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSeti + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSeti(CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuParamSeti", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5193 + * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuParamSeti + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuParamSeti == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5193, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5194 + * global __cuParamSeti + * cuPythonInit() + * if __cuParamSeti == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSeti" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5195 + * cuPythonInit() + * if __cuParamSeti == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSeti" not found') + * err = ( __cuParamSeti)(hfunc, offset, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5196 + * if __cuParamSeti == NULL: + * with gil: + * raise RuntimeError('Function "cuParamSeti" not found') # <<<<<<<<<<<<<< + * err = ( __cuParamSeti)(hfunc, offset, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuParamSeti_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5196, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5196, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5195 + * cuPythonInit() + * if __cuParamSeti == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSeti" not found') + * err = ( __cuParamSeti)(hfunc, offset, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5194 + * global __cuParamSeti + * cuPythonInit() + * if __cuParamSeti == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSeti" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5197 + * with gil: + * raise RuntimeError('Function "cuParamSeti" not found') + * err = ( __cuParamSeti)(hfunc, offset, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5197, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5198 + * raise RuntimeError('Function "cuParamSeti" not found') + * err = ( __cuParamSeti)(hfunc, offset, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5191 + * return err + * + * cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSeti + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5200 + * return err + * + * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetf + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetf(CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuParamSetf", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5202 + * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuParamSetf + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuParamSetf == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5202, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5203 + * global __cuParamSetf + * cuPythonInit() + * if __cuParamSetf == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetf" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5204 + * cuPythonInit() + * if __cuParamSetf == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetf" not found') + * err = ( __cuParamSetf)(hfunc, offset, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5205 + * if __cuParamSetf == NULL: + * with gil: + * raise RuntimeError('Function "cuParamSetf" not found') # <<<<<<<<<<<<<< + * err = ( __cuParamSetf)(hfunc, offset, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuParamSetf_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5205, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5205, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5204 + * cuPythonInit() + * if __cuParamSetf == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetf" not found') + * err = ( __cuParamSetf)(hfunc, offset, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5203 + * global __cuParamSetf + * cuPythonInit() + * if __cuParamSetf == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetf" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5206 + * with gil: + * raise RuntimeError('Function "cuParamSetf" not found') + * err = ( __cuParamSetf)(hfunc, offset, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, float))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5206, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5207 + * raise RuntimeError('Function "cuParamSetf" not found') + * err = ( __cuParamSetf)(hfunc, offset, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5200 + * return err + * + * cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetf + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5209 + * return err + * + * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetv + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetv(CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuParamSetv", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5211 + * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuParamSetv + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuParamSetv == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5211, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5212 + * global __cuParamSetv + * cuPythonInit() + * if __cuParamSetv == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetv" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5213 + * cuPythonInit() + * if __cuParamSetv == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetv" not found') + * err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5214 + * if __cuParamSetv == NULL: + * with gil: + * raise RuntimeError('Function "cuParamSetv" not found') # <<<<<<<<<<<<<< + * err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuParamSetv_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5214, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5214, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5213 + * cuPythonInit() + * if __cuParamSetv == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetv" not found') + * err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5212 + * global __cuParamSetv + * cuPythonInit() + * if __cuParamSetv == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetv" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5215 + * with gil: + * raise RuntimeError('Function "cuParamSetv" not found') + * err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, void *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv)(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5215, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5216 + * raise RuntimeError('Function "cuParamSetv" not found') + * err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5209 + * return err + * + * cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetv + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5218 + * return err + * + * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunch + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunch(CUfunction __pyx_v_f) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunch", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5220 + * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunch + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunch == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5220, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5221 + * global __cuLaunch + * cuPythonInit() + * if __cuLaunch == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunch" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5222 + * cuPythonInit() + * if __cuLaunch == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunch" not found') + * err = ( __cuLaunch)(f) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5223 + * if __cuLaunch == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunch" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunch)(f) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunch_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5223, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5223, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5222 + * cuPythonInit() + * if __cuLaunch == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunch" not found') + * err = ( __cuLaunch)(f) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5221 + * global __cuLaunch + * cuPythonInit() + * if __cuLaunch == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunch" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5224 + * with gil: + * raise RuntimeError('Function "cuLaunch" not found') + * err = ( __cuLaunch)(f) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch)(__pyx_v_f); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5224, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5225 + * raise RuntimeError('Function "cuLaunch" not found') + * err = ( __cuLaunch)(f) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5218 + * return err + * + * cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunch + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5227 + * return err + * + * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchGrid + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGrid(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchGrid", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5229 + * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchGrid + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchGrid == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5229, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5230 + * global __cuLaunchGrid + * cuPythonInit() + * if __cuLaunchGrid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchGrid" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5231 + * cuPythonInit() + * if __cuLaunchGrid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchGrid" not found') + * err = ( __cuLaunchGrid)(f, grid_width, grid_height) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5232 + * if __cuLaunchGrid == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchGrid" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchGrid)(f, grid_width, grid_height) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchGrid_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5232, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5232, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5231 + * cuPythonInit() + * if __cuLaunchGrid == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchGrid" not found') + * err = ( __cuLaunchGrid)(f, grid_width, grid_height) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5230 + * global __cuLaunchGrid + * cuPythonInit() + * if __cuLaunchGrid == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchGrid" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5233 + * with gil: + * raise RuntimeError('Function "cuLaunchGrid" not found') + * err = ( __cuLaunchGrid)(f, grid_width, grid_height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid)(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5233, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5234 + * raise RuntimeError('Function "cuLaunchGrid" not found') + * err = ( __cuLaunchGrid)(f, grid_width, grid_height) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5227 + * return err + * + * cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchGrid + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5236 + * return err + * + * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchGridAsync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGridAsync(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLaunchGridAsync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5238 + * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLaunchGridAsync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLaunchGridAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5238, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5239 + * global __cuLaunchGridAsync + * cuPythonInit() + * if __cuLaunchGridAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchGridAsync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5240 + * cuPythonInit() + * if __cuLaunchGridAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchGridAsync" not found') + * err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5241 + * if __cuLaunchGridAsync == NULL: + * with gil: + * raise RuntimeError('Function "cuLaunchGridAsync" not found') # <<<<<<<<<<<<<< + * err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLaunchGridAsync_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5241, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5241, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5240 + * cuPythonInit() + * if __cuLaunchGridAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLaunchGridAsync" not found') + * err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5239 + * global __cuLaunchGridAsync + * cuPythonInit() + * if __cuLaunchGridAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLaunchGridAsync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5242 + * with gil: + * raise RuntimeError('Function "cuLaunchGridAsync" not found') + * err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, int, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync)(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5242, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5243 + * raise RuntimeError('Function "cuLaunchGridAsync" not found') + * err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5236 + * return err + * + * cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLaunchGridAsync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5245 + * return err + * + * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetTexRef + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetTexRef(CUfunction __pyx_v_hfunc, int __pyx_v_texunit, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuParamSetTexRef", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5247 + * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuParamSetTexRef + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuParamSetTexRef == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5247, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5248 + * global __cuParamSetTexRef + * cuPythonInit() + * if __cuParamSetTexRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetTexRef" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5249 + * cuPythonInit() + * if __cuParamSetTexRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetTexRef" not found') + * err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5250 + * if __cuParamSetTexRef == NULL: + * with gil: + * raise RuntimeError('Function "cuParamSetTexRef" not found') # <<<<<<<<<<<<<< + * err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuParamSetTexRef_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5250, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5250, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5249 + * cuPythonInit() + * if __cuParamSetTexRef == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuParamSetTexRef" not found') + * err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5248 + * global __cuParamSetTexRef + * cuPythonInit() + * if __cuParamSetTexRef == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuParamSetTexRef" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5251 + * with gil: + * raise RuntimeError('Function "cuParamSetTexRef" not found') + * err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, int, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef)(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5251, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5252 + * raise RuntimeError('Function "cuParamSetTexRef" not found') + * err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5245 + * return err + * + * cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuParamSetTexRef + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5254 + * return err + * + * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetSharedMemConfig + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedMemConfig(CUfunction __pyx_v_hfunc, CUsharedconfig __pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFuncSetSharedMemConfig", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5256 + * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuFuncSetSharedMemConfig + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuFuncSetSharedMemConfig == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5256, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5257 + * global __cuFuncSetSharedMemConfig + * cuPythonInit() + * if __cuFuncSetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5258 + * cuPythonInit() + * if __cuFuncSetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') + * err = ( __cuFuncSetSharedMemConfig)(hfunc, config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5259 + * if __cuFuncSetSharedMemConfig == NULL: + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') # <<<<<<<<<<<<<< + * err = ( __cuFuncSetSharedMemConfig)(hfunc, config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuFuncSetSharedMemConfi}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5259, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5259, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5258 + * cuPythonInit() + * if __cuFuncSetSharedMemConfig == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') + * err = ( __cuFuncSetSharedMemConfig)(hfunc, config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5257 + * global __cuFuncSetSharedMemConfig + * cuPythonInit() + * if __cuFuncSetSharedMemConfig == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5260 + * with gil: + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') + * err = ( __cuFuncSetSharedMemConfig)(hfunc, config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfunction, CUsharedconfig))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig)(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5260, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5261 + * raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') + * err = ( __cuFuncSetSharedMemConfig)(hfunc, config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5254 + * return err + * + * cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuFuncSetSharedMemConfig + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5263 + * return err + * + * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphCreate(CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5265 + * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5265, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5266 + * global __cuGraphCreate + * cuPythonInit() + * if __cuGraphCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5267 + * cuPythonInit() + * if __cuGraphCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphCreate" not found') + * err = ( __cuGraphCreate)(phGraph, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5268 + * if __cuGraphCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphCreate)(phGraph, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphCreate_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5268, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5268, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5267 + * cuPythonInit() + * if __cuGraphCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphCreate" not found') + * err = ( __cuGraphCreate)(phGraph, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5266 + * global __cuGraphCreate + * cuPythonInit() + * if __cuGraphCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5269 + * with gil: + * raise RuntimeError('Function "cuGraphCreate" not found') + * err = ( __cuGraphCreate)(phGraph, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate)(__pyx_v_phGraph, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5269, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5270 + * raise RuntimeError('Function "cuGraphCreate" not found') + * err = ( __cuGraphCreate)(phGraph, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5263 + * return err + * + * cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5272 + * return err + * + * cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddKernelNode_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddKernelNode_v2(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddKernelNode_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5274 + * cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddKernelNode_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddKernelNode_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5274, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5275 + * global __cuGraphAddKernelNode_v2 + * cuPythonInit() + * if __cuGraphAddKernelNode_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5276 + * cuPythonInit() + * if __cuGraphAddKernelNode_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') + * err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5277 + * if __cuGraphAddKernelNode_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddKernelNode_v2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5277, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5277, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5276 + * cuPythonInit() + * if __cuGraphAddKernelNode_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') + * err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5275 + * global __cuGraphAddKernelNode_v2 + * cuPythonInit() + * if __cuGraphAddKernelNode_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5278 + * with gil: + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') + * err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5278, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5279 + * raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') + * err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5272 + * return err + * + * cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddKernelNode_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddKernelNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5281 + * return err + * + * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetParams_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetParams_v2(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphKernelNodeGetParams_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5283 + * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphKernelNodeGetParams_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphKernelNodeGetParams_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5283, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5284 + * global __cuGraphKernelNodeGetParams_v2 + * cuPythonInit() + * if __cuGraphKernelNodeGetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5285 + * cuPythonInit() + * if __cuGraphKernelNodeGetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') + * err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5286 + * if __cuGraphKernelNodeGetParams_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphKernelNodeGetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5286, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5286, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5285 + * cuPythonInit() + * if __cuGraphKernelNodeGetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') + * err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5284 + * global __cuGraphKernelNodeGetParams_v2 + * cuPythonInit() + * if __cuGraphKernelNodeGetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5287 + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') + * err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5287, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5288 + * raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') + * err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5281 + * return err + * + * cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetParams_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphKernelNodeGetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5290 + * return err + * + * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetParams_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetParams_v2(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphKernelNodeSetParams_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5292 + * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphKernelNodeSetParams_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphKernelNodeSetParams_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5292, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5293 + * global __cuGraphKernelNodeSetParams_v2 + * cuPythonInit() + * if __cuGraphKernelNodeSetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5294 + * cuPythonInit() + * if __cuGraphKernelNodeSetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') + * err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5295 + * if __cuGraphKernelNodeSetParams_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphKernelNodeSetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5295, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5295, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5294 + * cuPythonInit() + * if __cuGraphKernelNodeSetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') + * err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5293 + * global __cuGraphKernelNodeSetParams_v2 + * cuPythonInit() + * if __cuGraphKernelNodeSetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5296 + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') + * err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5296, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5297 + * raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') + * err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5290 + * return err + * + * cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetParams_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphKernelNodeSetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5299 + * return err + * + * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemcpyNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemcpyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddMemcpyNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5301 + * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddMemcpyNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddMemcpyNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5301, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5302 + * global __cuGraphAddMemcpyNode + * cuPythonInit() + * if __cuGraphAddMemcpyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5303 + * cuPythonInit() + * if __cuGraphAddMemcpyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') + * err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5304 + * if __cuGraphAddMemcpyNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddMemcpyNode_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5304, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5304, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5303 + * cuPythonInit() + * if __cuGraphAddMemcpyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') + * err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5302 + * global __cuGraphAddMemcpyNode + * cuPythonInit() + * if __cuGraphAddMemcpyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5305 + * with gil: + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') + * err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5305, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5306 + * raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') + * err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5299 + * return err + * + * cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemcpyNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5308 + * return err + * + * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemcpyNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5310 + * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemcpyNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemcpyNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5310, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5311 + * global __cuGraphMemcpyNodeGetParams + * cuPythonInit() + * if __cuGraphMemcpyNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5312 + * cuPythonInit() + * if __cuGraphMemcpyNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') + * err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5313 + * if __cuGraphMemcpyNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemcpyNodeGetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5313, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5313, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5312 + * cuPythonInit() + * if __cuGraphMemcpyNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') + * err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5311 + * global __cuGraphMemcpyNodeGetParams + * cuPythonInit() + * if __cuGraphMemcpyNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5314 + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') + * err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_MEMCPY3D *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5314, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5315 + * raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') + * err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5308 + * return err + * + * cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5317 + * return err + * + * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemcpyNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5319 + * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemcpyNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemcpyNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5319, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5320 + * global __cuGraphMemcpyNodeSetParams + * cuPythonInit() + * if __cuGraphMemcpyNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5321 + * cuPythonInit() + * if __cuGraphMemcpyNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') + * err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5322 + * if __cuGraphMemcpyNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemcpyNodeSetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5322, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5322, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5321 + * cuPythonInit() + * if __cuGraphMemcpyNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') + * err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5320 + * global __cuGraphMemcpyNodeSetParams + * cuPythonInit() + * if __cuGraphMemcpyNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5323 + * with gil: + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') + * err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_MEMCPY3D const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5323, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5324 + * raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') + * err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5317 + * return err + * + * cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5326 + * return err + * + * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemsetNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemsetNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddMemsetNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5328 + * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddMemsetNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddMemsetNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5328, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5329 + * global __cuGraphAddMemsetNode + * cuPythonInit() + * if __cuGraphAddMemsetNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5330 + * cuPythonInit() + * if __cuGraphAddMemsetNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') + * err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5331 + * if __cuGraphAddMemsetNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddMemsetNode_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5331, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5331, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5330 + * cuPythonInit() + * if __cuGraphAddMemsetNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') + * err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5329 + * global __cuGraphAddMemsetNode + * cuPythonInit() + * if __cuGraphAddMemsetNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5332 + * with gil: + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') + * err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5332, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5333 + * raise RuntimeError('Function "cuGraphAddMemsetNode" not found') + * err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5326 + * return err + * + * cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemsetNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5335 + * return err + * + * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemsetNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5337 + * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemsetNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemsetNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5337, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5338 + * global __cuGraphMemsetNodeGetParams + * cuPythonInit() + * if __cuGraphMemsetNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5339 + * cuPythonInit() + * if __cuGraphMemsetNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') + * err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5340 + * if __cuGraphMemsetNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemsetNodeGetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5340, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5340, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5339 + * cuPythonInit() + * if __cuGraphMemsetNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') + * err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5338 + * global __cuGraphMemsetNodeGetParams + * cuPythonInit() + * if __cuGraphMemsetNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5341 + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') + * err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5341, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5342 + * raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') + * err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5335 + * return err + * + * cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5344 + * return err + * + * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemsetNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5346 + * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemsetNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemsetNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5346, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5347 + * global __cuGraphMemsetNodeSetParams + * cuPythonInit() + * if __cuGraphMemsetNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5348 + * cuPythonInit() + * if __cuGraphMemsetNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') + * err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5349 + * if __cuGraphMemsetNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemsetNodeSetPar}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5349, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5348 + * cuPythonInit() + * if __cuGraphMemsetNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') + * err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5347 + * global __cuGraphMemsetNodeSetParams + * cuPythonInit() + * if __cuGraphMemsetNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5350 + * with gil: + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') + * err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5350, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5351 + * raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') + * err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5344 + * return err + * + * cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5353 + * return err + * + * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddHostNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddHostNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddHostNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5355 + * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddHostNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddHostNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5355, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5356 + * global __cuGraphAddHostNode + * cuPythonInit() + * if __cuGraphAddHostNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddHostNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5357 + * cuPythonInit() + * if __cuGraphAddHostNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddHostNode" not found') + * err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5358 + * if __cuGraphAddHostNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddHostNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddHostNode_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5358, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5358, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5357 + * cuPythonInit() + * if __cuGraphAddHostNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddHostNode" not found') + * err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5356 + * global __cuGraphAddHostNode + * cuPythonInit() + * if __cuGraphAddHostNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddHostNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5359 + * with gil: + * raise RuntimeError('Function "cuGraphAddHostNode" not found') + * err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5359, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5360 + * raise RuntimeError('Function "cuGraphAddHostNode" not found') + * err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5353 + * return err + * + * cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddHostNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5362 + * return err + * + * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphHostNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphHostNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5364 + * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphHostNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphHostNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5364, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5365 + * global __cuGraphHostNodeGetParams + * cuPythonInit() + * if __cuGraphHostNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5366 + * cuPythonInit() + * if __cuGraphHostNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') + * err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5367 + * if __cuGraphHostNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphHostNodeGetParam}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5367, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5367, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5366 + * cuPythonInit() + * if __cuGraphHostNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') + * err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5365 + * global __cuGraphHostNodeGetParams + * cuPythonInit() + * if __cuGraphHostNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5368 + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') + * err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5368, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5369 + * raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') + * err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5362 + * return err + * + * cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphHostNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5371 + * return err + * + * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphHostNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphHostNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5373 + * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphHostNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphHostNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5373, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5374 + * global __cuGraphHostNodeSetParams + * cuPythonInit() + * if __cuGraphHostNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5375 + * cuPythonInit() + * if __cuGraphHostNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') + * err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5376 + * if __cuGraphHostNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphHostNodeSetParam}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5376, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5376, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5375 + * cuPythonInit() + * if __cuGraphHostNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') + * err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5374 + * global __cuGraphHostNodeSetParams + * cuPythonInit() + * if __cuGraphHostNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5377 + * with gil: + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') + * err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5377, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5378 + * raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') + * err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5371 + * return err + * + * cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphHostNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5380 + * return err + * + * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddChildGraphNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddChildGraphNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraph __pyx_v_childGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddChildGraphNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5382 + * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddChildGraphNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddChildGraphNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5382, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5383 + * global __cuGraphAddChildGraphNode + * cuPythonInit() + * if __cuGraphAddChildGraphNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5384 + * cuPythonInit() + * if __cuGraphAddChildGraphNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') + * err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5385 + * if __cuGraphAddChildGraphNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddChildGraphNod}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5385, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5385, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5384 + * cuPythonInit() + * if __cuGraphAddChildGraphNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') + * err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5383 + * global __cuGraphAddChildGraphNode + * cuPythonInit() + * if __cuGraphAddChildGraphNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5386 + * with gil: + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') + * err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5386, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5387 + * raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') + * err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5380 + * return err + * + * cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddChildGraphNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5389 + * return err + * + * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphChildGraphNodeGetGraph + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphChildGraphNodeGetGraph(CUgraphNode __pyx_v_hNode, CUgraph *__pyx_v_phGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphChildGraphNodeGetGraph", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5391 + * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphChildGraphNodeGetGraph + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphChildGraphNodeGetGraph == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5391, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5392 + * global __cuGraphChildGraphNodeGetGraph + * cuPythonInit() + * if __cuGraphChildGraphNodeGetGraph == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5393 + * cuPythonInit() + * if __cuGraphChildGraphNodeGetGraph == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') + * err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5394 + * if __cuGraphChildGraphNodeGetGraph == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphChildGraphNodeGe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5394, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5394, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5393 + * cuPythonInit() + * if __cuGraphChildGraphNodeGetGraph == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') + * err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5392 + * global __cuGraphChildGraphNodeGetGraph + * cuPythonInit() + * if __cuGraphChildGraphNodeGetGraph == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5395 + * with gil: + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') + * err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraph *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph)(__pyx_v_hNode, __pyx_v_phGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5395, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5396 + * raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') + * err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5389 + * return err + * + * cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphChildGraphNodeGetGraph + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5398 + * return err + * + * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEmptyNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEmptyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddEmptyNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5400 + * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddEmptyNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddEmptyNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5400, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5401 + * global __cuGraphAddEmptyNode + * cuPythonInit() + * if __cuGraphAddEmptyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5402 + * cuPythonInit() + * if __cuGraphAddEmptyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') + * err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5403 + * if __cuGraphAddEmptyNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddEmptyNode_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5403, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5403, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5402 + * cuPythonInit() + * if __cuGraphAddEmptyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') + * err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5401 + * global __cuGraphAddEmptyNode + * cuPythonInit() + * if __cuGraphAddEmptyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5404 + * with gil: + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') + * err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5404, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5405 + * raise RuntimeError('Function "cuGraphAddEmptyNode" not found') + * err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5398 + * return err + * + * cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEmptyNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5407 + * return err + * + * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEventRecordNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventRecordNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddEventRecordNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5409 + * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddEventRecordNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddEventRecordNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5409, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5410 + * global __cuGraphAddEventRecordNode + * cuPythonInit() + * if __cuGraphAddEventRecordNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5411 + * cuPythonInit() + * if __cuGraphAddEventRecordNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') + * err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5412 + * if __cuGraphAddEventRecordNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddEventRecordNo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5412, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5412, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5411 + * cuPythonInit() + * if __cuGraphAddEventRecordNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') + * err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5410 + * global __cuGraphAddEventRecordNode + * cuPythonInit() + * if __cuGraphAddEventRecordNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5413 + * with gil: + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') + * err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5413, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5414 + * raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') + * err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5407 + * return err + * + * cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEventRecordNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5416 + * return err + * + * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeGetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphEventRecordNodeGetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5418 + * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphEventRecordNodeGetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphEventRecordNodeGetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5418, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5419 + * global __cuGraphEventRecordNodeGetEvent + * cuPythonInit() + * if __cuGraphEventRecordNodeGetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5420 + * cuPythonInit() + * if __cuGraphEventRecordNodeGetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') + * err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5421 + * if __cuGraphEventRecordNodeGetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphEventRecordNodeG}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5421, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5421, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5420 + * cuPythonInit() + * if __cuGraphEventRecordNodeGetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') + * err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5419 + * global __cuGraphEventRecordNodeGetEvent + * cuPythonInit() + * if __cuGraphEventRecordNodeGetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5422 + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') + * err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUevent *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5422, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5423 + * raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') + * err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5416 + * return err + * + * cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeGetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5425 + * return err + * + * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeSetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphEventRecordNodeSetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5427 + * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphEventRecordNodeSetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphEventRecordNodeSetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5427, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5428 + * global __cuGraphEventRecordNodeSetEvent + * cuPythonInit() + * if __cuGraphEventRecordNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5429 + * cuPythonInit() + * if __cuGraphEventRecordNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') + * err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5430 + * if __cuGraphEventRecordNodeSetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphEventRecordNodeS}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5430, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5430, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5429 + * cuPythonInit() + * if __cuGraphEventRecordNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') + * err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5428 + * global __cuGraphEventRecordNodeSetEvent + * cuPythonInit() + * if __cuGraphEventRecordNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5431 + * with gil: + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') + * err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent)(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5431, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5432 + * raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') + * err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5425 + * return err + * + * cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeSetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5434 + * return err + * + * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEventWaitNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddEventWaitNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5436 + * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddEventWaitNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddEventWaitNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5436, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5437 + * global __cuGraphAddEventWaitNode + * cuPythonInit() + * if __cuGraphAddEventWaitNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5438 + * cuPythonInit() + * if __cuGraphAddEventWaitNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') + * err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5439 + * if __cuGraphAddEventWaitNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddEventWaitNode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5439, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5439, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5438 + * cuPythonInit() + * if __cuGraphAddEventWaitNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') + * err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5437 + * global __cuGraphAddEventWaitNode + * cuPythonInit() + * if __cuGraphAddEventWaitNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5440 + * with gil: + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') + * err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5440, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5441 + * raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') + * err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5434 + * return err + * + * cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddEventWaitNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5443 + * return err + * + * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeGetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphEventWaitNodeGetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5445 + * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphEventWaitNodeGetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphEventWaitNodeGetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5445, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5446 + * global __cuGraphEventWaitNodeGetEvent + * cuPythonInit() + * if __cuGraphEventWaitNodeGetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5447 + * cuPythonInit() + * if __cuGraphEventWaitNodeGetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') + * err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5448 + * if __cuGraphEventWaitNodeGetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphEventWaitNodeGet}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5448, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5448, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5447 + * cuPythonInit() + * if __cuGraphEventWaitNodeGetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') + * err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5446 + * global __cuGraphEventWaitNodeGetEvent + * cuPythonInit() + * if __cuGraphEventWaitNodeGetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5449 + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') + * err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUevent *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent)(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5449, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5450 + * raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') + * err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5443 + * return err + * + * cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeGetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5452 + * return err + * + * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeSetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphEventWaitNodeSetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5454 + * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphEventWaitNodeSetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphEventWaitNodeSetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5454, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5455 + * global __cuGraphEventWaitNodeSetEvent + * cuPythonInit() + * if __cuGraphEventWaitNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5456 + * cuPythonInit() + * if __cuGraphEventWaitNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') + * err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5457 + * if __cuGraphEventWaitNodeSetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphEventWaitNodeSet}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5457, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5457, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5456 + * cuPythonInit() + * if __cuGraphEventWaitNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') + * err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5455 + * global __cuGraphEventWaitNodeSetEvent + * cuPythonInit() + * if __cuGraphEventWaitNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5458 + * with gil: + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') + * err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent)(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5458, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5459 + * raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') + * err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5452 + * return err + * + * cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeSetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5461 + * return err + * + * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresSignalNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresSignalNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddExternalSemaphoresSignalNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5463 + * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddExternalSemaphoresSignalNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5463, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5464 + * global __cuGraphAddExternalSemaphoresSignalNode + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5465 + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') + * err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5466 + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddExternalSemap}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5466, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5466, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5465 + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') + * err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5464 + * global __cuGraphAddExternalSemaphoresSignalNode + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresSignalNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5467 + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') + * err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5467, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5468 + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') + * err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5461 + * return err + * + * cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresSignalNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5470 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresSignalNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5472 + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5472, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5473 + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5474 + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5475 + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExternalSemaphor}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5475, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5475, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5474 + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5473 + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5476 + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5476, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5477 + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5470 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5479 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresSignalNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5481 + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5481, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5482 + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5483 + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5484 + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExternalSemaphor_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5484, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5484, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5483 + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5482 + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5485 + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5485, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5486 + * raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5479 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5488 + * return err + * + * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresWaitNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddExternalSemaphoresWaitNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5490 + * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddExternalSemaphoresWaitNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5490, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5491 + * global __cuGraphAddExternalSemaphoresWaitNode + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5492 + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') + * err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5493 + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddExternalSemap_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5493, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5493, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5492 + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') + * err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5491 + * global __cuGraphAddExternalSemaphoresWaitNode + * cuPythonInit() + * if __cuGraphAddExternalSemaphoresWaitNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5494 + * with gil: + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') + * err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5494, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5495 + * raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') + * err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5488 + * return err + * + * cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresWaitNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5497 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresWaitNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5499 + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5499, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5500 + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5501 + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5502 + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExternalSemaphor_3}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5502, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5502, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5501 + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5500 + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5503 + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5503, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5504 + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5497 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5506 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExternalSemaphoresWaitNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5508 + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5508, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5509 + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5510 + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5511 + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExternalSemaphor_4}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5511, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5511, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5510 + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5509 + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * cuPythonInit() + * if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5512 + * with gil: + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5512, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5513 + * raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5506 + * return err + * + * cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5515 + * return err + * + * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddBatchMemOpNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddBatchMemOpNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddBatchMemOpNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5517 + * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddBatchMemOpNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddBatchMemOpNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5517, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5518 + * global __cuGraphAddBatchMemOpNode + * cuPythonInit() + * if __cuGraphAddBatchMemOpNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5519 + * cuPythonInit() + * if __cuGraphAddBatchMemOpNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') + * err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5520 + * if __cuGraphAddBatchMemOpNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddBatchMemOpNod}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5520, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5520, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5519 + * cuPythonInit() + * if __cuGraphAddBatchMemOpNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') + * err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5518 + * global __cuGraphAddBatchMemOpNode + * cuPythonInit() + * if __cuGraphAddBatchMemOpNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5521 + * with gil: + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') + * err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5521, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5522 + * raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') + * err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5515 + * return err + * + * cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddBatchMemOpNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5524 + * return err + * + * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphBatchMemOpNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5526 + * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphBatchMemOpNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphBatchMemOpNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5526, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5527 + * global __cuGraphBatchMemOpNodeGetParams + * cuPythonInit() + * if __cuGraphBatchMemOpNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5528 + * cuPythonInit() + * if __cuGraphBatchMemOpNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') + * err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5529 + * if __cuGraphBatchMemOpNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphBatchMemOpNodeGe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5529, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5529, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5528 + * cuPythonInit() + * if __cuGraphBatchMemOpNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') + * err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5527 + * global __cuGraphBatchMemOpNodeGetParams + * cuPythonInit() + * if __cuGraphBatchMemOpNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5530 + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') + * err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams)(__pyx_v_hNode, __pyx_v_nodeParams_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5530, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5531 + * raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') + * err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5524 + * return err + * + * cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5533 + * return err + * + * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphBatchMemOpNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5535 + * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphBatchMemOpNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphBatchMemOpNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5535, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5536 + * global __cuGraphBatchMemOpNodeSetParams + * cuPythonInit() + * if __cuGraphBatchMemOpNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5537 + * cuPythonInit() + * if __cuGraphBatchMemOpNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5538 + * if __cuGraphBatchMemOpNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphBatchMemOpNodeSe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5538, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5538, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5537 + * cuPythonInit() + * if __cuGraphBatchMemOpNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5536 + * global __cuGraphBatchMemOpNodeSetParams + * cuPythonInit() + * if __cuGraphBatchMemOpNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5539 + * with gil: + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5539, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5540 + * raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5533 + * return err + * + * cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5542 + * return err + * + * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecBatchMemOpNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecBatchMemOpNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecBatchMemOpNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5544 + * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecBatchMemOpNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5544, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5545 + * global __cuGraphExecBatchMemOpNodeSetParams + * cuPythonInit() + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5546 + * cuPythonInit() + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5547 + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecBatchMemOpNo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5547, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5547, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5546 + * cuPythonInit() + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5545 + * global __cuGraphExecBatchMemOpNodeSetParams + * cuPythonInit() + * if __cuGraphExecBatchMemOpNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5548 + * with gil: + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5548, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5549 + * raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') + * err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5542 + * return err + * + * cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecBatchMemOpNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5551 + * return err + * + * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemAllocNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemAllocNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddMemAllocNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5553 + * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddMemAllocNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddMemAllocNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5553, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5554 + * global __cuGraphAddMemAllocNode + * cuPythonInit() + * if __cuGraphAddMemAllocNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5555 + * cuPythonInit() + * if __cuGraphAddMemAllocNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') + * err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5556 + * if __cuGraphAddMemAllocNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddMemAllocNode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5556, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5556, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5555 + * cuPythonInit() + * if __cuGraphAddMemAllocNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') + * err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5554 + * global __cuGraphAddMemAllocNode + * cuPythonInit() + * if __cuGraphAddMemAllocNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5557 + * with gil: + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') + * err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5557, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5558 + * raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') + * err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5551 + * return err + * + * cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemAllocNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5560 + * return err + * + * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemAllocNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemAllocNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemAllocNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5562 + * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemAllocNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemAllocNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5562, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5563 + * global __cuGraphMemAllocNodeGetParams + * cuPythonInit() + * if __cuGraphMemAllocNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5564 + * cuPythonInit() + * if __cuGraphMemAllocNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') + * err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5565 + * if __cuGraphMemAllocNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemAllocNodeGetP}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5565, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5565, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5564 + * cuPythonInit() + * if __cuGraphMemAllocNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') + * err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5563 + * global __cuGraphMemAllocNodeGetParams + * cuPythonInit() + * if __cuGraphMemAllocNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5566 + * with gil: + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') + * err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams)(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5566, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5567 + * raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') + * err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5560 + * return err + * + * cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemAllocNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5569 + * return err + * + * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemFreeNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemFreeNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddMemFreeNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5571 + * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddMemFreeNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddMemFreeNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5571, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5572 + * global __cuGraphAddMemFreeNode + * cuPythonInit() + * if __cuGraphAddMemFreeNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5573 + * cuPythonInit() + * if __cuGraphAddMemFreeNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') + * err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5574 + * if __cuGraphAddMemFreeNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddMemFreeNode_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5574, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5574, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5573 + * cuPythonInit() + * if __cuGraphAddMemFreeNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') + * err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5572 + * global __cuGraphAddMemFreeNode + * cuPythonInit() + * if __cuGraphAddMemFreeNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5575 + * with gil: + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') + * err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5575, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5576 + * raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') + * err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5569 + * return err + * + * cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddMemFreeNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5578 + * return err + * + * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemFreeNodeGetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemFreeNodeGetParams(CUgraphNode __pyx_v_hNode, CUdeviceptr *__pyx_v_dptr_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphMemFreeNodeGetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5580 + * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphMemFreeNodeGetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphMemFreeNodeGetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5580, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5581 + * global __cuGraphMemFreeNodeGetParams + * cuPythonInit() + * if __cuGraphMemFreeNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5582 + * cuPythonInit() + * if __cuGraphMemFreeNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') + * err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5583 + * if __cuGraphMemFreeNodeGetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphMemFreeNodeGetPa}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5583, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5583, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5582 + * cuPythonInit() + * if __cuGraphMemFreeNodeGetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') + * err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5581 + * global __cuGraphMemFreeNodeGetParams + * cuPythonInit() + * if __cuGraphMemFreeNodeGetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5584 + * with gil: + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') + * err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUdeviceptr *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams)(__pyx_v_hNode, __pyx_v_dptr_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5584, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5585 + * raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') + * err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5578 + * return err + * + * cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphMemFreeNodeGetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5587 + * return err + * + * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGraphMemTrim + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGraphMemTrim(CUdevice __pyx_v_device) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGraphMemTrim", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5589 + * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGraphMemTrim + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGraphMemTrim == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5589, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5590 + * global __cuDeviceGraphMemTrim + * cuPythonInit() + * if __cuDeviceGraphMemTrim == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5591 + * cuPythonInit() + * if __cuDeviceGraphMemTrim == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') + * err = ( __cuDeviceGraphMemTrim)(device) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5592 + * if __cuDeviceGraphMemTrim == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGraphMemTrim)(device) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGraphMemTrim_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5592, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5592, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5591 + * cuPythonInit() + * if __cuDeviceGraphMemTrim == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') + * err = ( __cuDeviceGraphMemTrim)(device) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5590 + * global __cuDeviceGraphMemTrim + * cuPythonInit() + * if __cuDeviceGraphMemTrim == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5593 + * with gil: + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') + * err = ( __cuDeviceGraphMemTrim)(device) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim)(__pyx_v_device); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5593, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5594 + * raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') + * err = ( __cuDeviceGraphMemTrim)(device) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5587 + * return err + * + * cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGraphMemTrim + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5596 + * return err + * + * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetGraphMemAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetGraphMemAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5598 + * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetGraphMemAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetGraphMemAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5598, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5599 + * global __cuDeviceGetGraphMemAttribute + * cuPythonInit() + * if __cuDeviceGetGraphMemAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5600 + * cuPythonInit() + * if __cuDeviceGetGraphMemAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') + * err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5601 + * if __cuDeviceGetGraphMemAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetGraphMemAttr}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5601, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5601, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5600 + * cuPythonInit() + * if __cuDeviceGetGraphMemAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') + * err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5599 + * global __cuDeviceGetGraphMemAttribute + * cuPythonInit() + * if __cuDeviceGetGraphMemAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5602 + * with gil: + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') + * err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUgraphMem_attribute, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5602, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5603 + * raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') + * err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5596 + * return err + * + * cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetGraphMemAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5605 + * return err + * + * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceSetGraphMemAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceSetGraphMemAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5607 + * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceSetGraphMemAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceSetGraphMemAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5607, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5608 + * global __cuDeviceSetGraphMemAttribute + * cuPythonInit() + * if __cuDeviceSetGraphMemAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5609 + * cuPythonInit() + * if __cuDeviceSetGraphMemAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') + * err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5610 + * if __cuDeviceSetGraphMemAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceSetGraphMemAttr}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5610, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5610, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5609 + * cuPythonInit() + * if __cuDeviceSetGraphMemAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') + * err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5608 + * global __cuDeviceSetGraphMemAttribute + * cuPythonInit() + * if __cuDeviceSetGraphMemAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5611 + * with gil: + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') + * err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUgraphMem_attribute, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute)(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5611, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5612 + * raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') + * err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5605 + * return err + * + * cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceSetGraphMemAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5614 + * return err + * + * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphClone + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphClone(CUgraph *__pyx_v_phGraphClone, CUgraph __pyx_v_originalGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphClone", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5616 + * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphClone + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphClone == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5616, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5617 + * global __cuGraphClone + * cuPythonInit() + * if __cuGraphClone == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphClone" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5618 + * cuPythonInit() + * if __cuGraphClone == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphClone" not found') + * err = ( __cuGraphClone)(phGraphClone, originalGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5619 + * if __cuGraphClone == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphClone" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphClone)(phGraphClone, originalGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphClone_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5619, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5619, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5618 + * cuPythonInit() + * if __cuGraphClone == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphClone" not found') + * err = ( __cuGraphClone)(phGraphClone, originalGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5617 + * global __cuGraphClone + * cuPythonInit() + * if __cuGraphClone == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphClone" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5620 + * with gil: + * raise RuntimeError('Function "cuGraphClone" not found') + * err = ( __cuGraphClone)(phGraphClone, originalGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph *, CUgraph))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone)(__pyx_v_phGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5620, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5621 + * raise RuntimeError('Function "cuGraphClone" not found') + * err = ( __cuGraphClone)(phGraphClone, originalGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5614 + * return err + * + * cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphClone + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5623 + * return err + * + * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeFindInClone + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeFindInClone(CUgraphNode *__pyx_v_phNode, CUgraphNode __pyx_v_hOriginalNode, CUgraph __pyx_v_hClonedGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeFindInClone", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5625 + * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeFindInClone + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeFindInClone == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5625, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5626 + * global __cuGraphNodeFindInClone + * cuPythonInit() + * if __cuGraphNodeFindInClone == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5627 + * cuPythonInit() + * if __cuGraphNodeFindInClone == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') + * err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5628 + * if __cuGraphNodeFindInClone == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeFindInClone}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5628, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5628, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5627 + * cuPythonInit() + * if __cuGraphNodeFindInClone == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') + * err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5626 + * global __cuGraphNodeFindInClone + * cuPythonInit() + * if __cuGraphNodeFindInClone == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5629 + * with gil: + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') + * err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraphNode, CUgraph))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone)(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5629, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5630 + * raise RuntimeError('Function "cuGraphNodeFindInClone" not found') + * err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5623 + * return err + * + * cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeFindInClone + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5632 + * return err + * + * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetType + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetType(CUgraphNode __pyx_v_hNode, CUgraphNodeType *__pyx_v_typename) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetType", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5634 + * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetType + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetType == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5634, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5635 + * global __cuGraphNodeGetType + * cuPythonInit() + * if __cuGraphNodeGetType == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetType" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5636 + * cuPythonInit() + * if __cuGraphNodeGetType == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetType" not found') + * err = ( __cuGraphNodeGetType)(hNode, typename) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5637 + * if __cuGraphNodeGetType == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetType" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetType)(hNode, typename) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetType_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5637, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5637, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5636 + * cuPythonInit() + * if __cuGraphNodeGetType == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetType" not found') + * err = ( __cuGraphNodeGetType)(hNode, typename) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5635 + * global __cuGraphNodeGetType + * cuPythonInit() + * if __cuGraphNodeGetType == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetType" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5638 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetType" not found') + * err = ( __cuGraphNodeGetType)(hNode, typename) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNodeType *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType)(__pyx_v_hNode, __pyx_v_typename); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5638, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5639 + * raise RuntimeError('Function "cuGraphNodeGetType" not found') + * err = ( __cuGraphNodeGetType)(hNode, typename) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5632 + * return err + * + * cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetType + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5641 + * return err + * + * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetNodes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphGetNodes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5643 + * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphGetNodes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphGetNodes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5643, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5644 + * global __cuGraphGetNodes + * cuPythonInit() + * if __cuGraphGetNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetNodes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5645 + * cuPythonInit() + * if __cuGraphGetNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetNodes" not found') + * err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5646 + * if __cuGraphGetNodes == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphGetNodes" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphGetNodes_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5646, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5646, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5645 + * cuPythonInit() + * if __cuGraphGetNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetNodes" not found') + * err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5644 + * global __cuGraphGetNodes + * cuPythonInit() + * if __cuGraphGetNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetNodes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5647 + * with gil: + * raise RuntimeError('Function "cuGraphGetNodes" not found') + * err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes)(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5647, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5648 + * raise RuntimeError('Function "cuGraphGetNodes" not found') + * err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5641 + * return err + * + * cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetNodes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5650 + * return err + * + * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetRootNodes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetRootNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphGetRootNodes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5652 + * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphGetRootNodes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphGetRootNodes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5652, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5653 + * global __cuGraphGetRootNodes + * cuPythonInit() + * if __cuGraphGetRootNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5654 + * cuPythonInit() + * if __cuGraphGetRootNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') + * err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5655 + * if __cuGraphGetRootNodes == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphGetRootNodes_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5655, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5655, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5654 + * cuPythonInit() + * if __cuGraphGetRootNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') + * err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5653 + * global __cuGraphGetRootNodes + * cuPythonInit() + * if __cuGraphGetRootNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5656 + * with gil: + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') + * err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes)(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5656, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5657 + * raise RuntimeError('Function "cuGraphGetRootNodes" not found') + * err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5650 + * return err + * + * cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetRootNodes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5659 + * return err + * + * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetEdges + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphGetEdges", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5661 + * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphGetEdges + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphGetEdges == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5661, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5662 + * global __cuGraphGetEdges + * cuPythonInit() + * if __cuGraphGetEdges == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5663 + * cuPythonInit() + * if __cuGraphGetEdges == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetEdges" not found') + * err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5664 + * if __cuGraphGetEdges == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphGetEdges_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5664, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5664, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5663 + * cuPythonInit() + * if __cuGraphGetEdges == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetEdges" not found') + * err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5662 + * global __cuGraphGetEdges + * cuPythonInit() + * if __cuGraphGetEdges == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5665 + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges" not found') + * err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode *, CUgraphNode *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5665, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5666 + * raise RuntimeError('Function "cuGraphGetEdges" not found') + * err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5659 + * return err + * + * cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetEdges + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5668 + * return err + * + * cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetEdges_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges_v2(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphGetEdges_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5670 + * cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphGetEdges_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphGetEdges_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5670, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5671 + * global __cuGraphGetEdges_v2 + * cuPythonInit() + * if __cuGraphGetEdges_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5672 + * cuPythonInit() + * if __cuGraphGetEdges_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') + * err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5673 + * if __cuGraphGetEdges_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphGetEdges_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5673, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5673, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5672 + * cuPythonInit() + * if __cuGraphGetEdges_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') + * err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5671 + * global __cuGraphGetEdges_v2 + * cuPythonInit() + * if __cuGraphGetEdges_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5674 + * with gil: + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') + * err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5674, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5675 + * raise RuntimeError('Function "cuGraphGetEdges_v2" not found') + * err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5668 + * return err + * + * cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphGetEdges_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphGetEdges_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5677 + * return err + * + * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetDependencies", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5679 + * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetDependencies + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetDependencies == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5679, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5680 + * global __cuGraphNodeGetDependencies + * cuPythonInit() + * if __cuGraphNodeGetDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5681 + * cuPythonInit() + * if __cuGraphNodeGetDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') + * err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5682 + * if __cuGraphNodeGetDependencies == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetDependenc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5682, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5682, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5681 + * cuPythonInit() + * if __cuGraphNodeGetDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') + * err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5680 + * global __cuGraphNodeGetDependencies + * cuPythonInit() + * if __cuGraphNodeGetDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5683 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') + * err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNode *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies)(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5683, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5684 + * raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') + * err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5677 + * return err + * + * cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5686 + * return err + * + * cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetDependencies_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5688 + * cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetDependencies_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetDependencies_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5688, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5689 + * global __cuGraphNodeGetDependencies_v2 + * cuPythonInit() + * if __cuGraphNodeGetDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5690 + * cuPythonInit() + * if __cuGraphNodeGetDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') + * err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5691 + * if __cuGraphNodeGetDependencies_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetDependenc_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5691, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5691, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5690 + * cuPythonInit() + * if __cuGraphNodeGetDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') + * err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5689 + * global __cuGraphNodeGetDependencies_v2 + * cuPythonInit() + * if __cuGraphNodeGetDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5692 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') + * err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2)(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5692, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5693 + * raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') + * err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5686 + * return err + * + * cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5695 + * return err + * + * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetDependentNodes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5697 + * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetDependentNodes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetDependentNodes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5697, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5698 + * global __cuGraphNodeGetDependentNodes + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5699 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') + * err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5700 + * if __cuGraphNodeGetDependentNodes == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetDependent}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5700, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5700, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5699 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') + * err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5698 + * global __cuGraphNodeGetDependentNodes + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5701 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') + * err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNode *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes)(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5701, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5702 + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') + * err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5695 + * return err + * + * cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5704 + * return err + * + * cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependentNodes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetDependentNodes_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5706 + * cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetDependentNodes_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetDependentNodes_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5706, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5707 + * global __cuGraphNodeGetDependentNodes_v2 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5708 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') + * err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5709 + * if __cuGraphNodeGetDependentNodes_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetDependent_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5709, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5709, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5708 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') + * err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5707 + * global __cuGraphNodeGetDependentNodes_v2 + * cuPythonInit() + * if __cuGraphNodeGetDependentNodes_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5710 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') + * err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2)(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_edgeData, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5710, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5711 + * raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') + * err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5704 + * return err + * + * cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetDependentNodes_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5713 + * return err + * + * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddDependencies", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5715 + * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddDependencies + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddDependencies == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5715, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5716 + * global __cuGraphAddDependencies + * cuPythonInit() + * if __cuGraphAddDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5717 + * cuPythonInit() + * if __cuGraphAddDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddDependencies" not found') + * err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5718 + * if __cuGraphAddDependencies == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddDependencies}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5718, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5718, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5717 + * cuPythonInit() + * if __cuGraphAddDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddDependencies" not found') + * err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5716 + * global __cuGraphAddDependencies + * cuPythonInit() + * if __cuGraphAddDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5719 + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies" not found') + * err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5719, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5720 + * raise RuntimeError('Function "cuGraphAddDependencies" not found') + * err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5713 + * return err + * + * cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5722 + * return err + * + * cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddDependencies_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5724 + * cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddDependencies_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddDependencies_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5724, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5725 + * global __cuGraphAddDependencies_v2 + * cuPythonInit() + * if __cuGraphAddDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5726 + * cuPythonInit() + * if __cuGraphAddDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') + * err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5727 + * if __cuGraphAddDependencies_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddDependencies_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5727, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5727, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5726 + * cuPythonInit() + * if __cuGraphAddDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') + * err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5725 + * global __cuGraphAddDependencies_v2 + * cuPythonInit() + * if __cuGraphAddDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5728 + * with gil: + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') + * err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5728, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5729 + * raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') + * err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5722 + * return err + * + * cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5731 + * return err + * + * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphRemoveDependencies", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5733 + * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphRemoveDependencies + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphRemoveDependencies == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5733, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5734 + * global __cuGraphRemoveDependencies + * cuPythonInit() + * if __cuGraphRemoveDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5735 + * cuPythonInit() + * if __cuGraphRemoveDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') + * err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5736 + * if __cuGraphRemoveDependencies == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphRemoveDependenci}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5736, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5736, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5735 + * cuPythonInit() + * if __cuGraphRemoveDependencies == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') + * err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5734 + * global __cuGraphRemoveDependencies + * cuPythonInit() + * if __cuGraphRemoveDependencies == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5737 + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') + * err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5737, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5738 + * raise RuntimeError('Function "cuGraphRemoveDependencies" not found') + * err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5731 + * return err + * + * cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5740 + * return err + * + * cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphRemoveDependencies_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5742 + * cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphRemoveDependencies_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphRemoveDependencies_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5742, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5743 + * global __cuGraphRemoveDependencies_v2 + * cuPythonInit() + * if __cuGraphRemoveDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5744 + * cuPythonInit() + * if __cuGraphRemoveDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') + * err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5745 + * if __cuGraphRemoveDependencies_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphRemoveDependenci_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5745, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5745, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5744 + * cuPythonInit() + * if __cuGraphRemoveDependencies_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') + * err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5743 + * global __cuGraphRemoveDependencies_v2 + * cuPythonInit() + * if __cuGraphRemoveDependencies_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5746 + * with gil: + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') + * err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2)(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5746, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5747 + * raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') + * err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5740 + * return err + * + * cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphRemoveDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5749 + * return err + * + * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDestroyNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroyNode(CUgraphNode __pyx_v_hNode) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphDestroyNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5751 + * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphDestroyNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphDestroyNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5751, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5752 + * global __cuGraphDestroyNode + * cuPythonInit() + * if __cuGraphDestroyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDestroyNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5753 + * cuPythonInit() + * if __cuGraphDestroyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDestroyNode" not found') + * err = ( __cuGraphDestroyNode)(hNode) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5754 + * if __cuGraphDestroyNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphDestroyNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphDestroyNode)(hNode) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphDestroyNode_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5754, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5754, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5753 + * cuPythonInit() + * if __cuGraphDestroyNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDestroyNode" not found') + * err = ( __cuGraphDestroyNode)(hNode) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5752 + * global __cuGraphDestroyNode + * cuPythonInit() + * if __cuGraphDestroyNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDestroyNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5755 + * with gil: + * raise RuntimeError('Function "cuGraphDestroyNode" not found') + * err = ( __cuGraphDestroyNode)(hNode) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode)(__pyx_v_hNode); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5755, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5756 + * raise RuntimeError('Function "cuGraphDestroyNode" not found') + * err = ( __cuGraphDestroyNode)(hNode) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5749 + * return err + * + * cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDestroyNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5758 + * return err + * + * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithFlags(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphInstantiateWithFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5760 + * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphInstantiateWithFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphInstantiateWithFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5760, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5761 + * global __cuGraphInstantiateWithFlags + * cuPythonInit() + * if __cuGraphInstantiateWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5762 + * cuPythonInit() + * if __cuGraphInstantiateWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') + * err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5763 + * if __cuGraphInstantiateWithFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphInstantiateWithF}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5763, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5763, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5762 + * cuPythonInit() + * if __cuGraphInstantiateWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') + * err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5761 + * global __cuGraphInstantiateWithFlags + * cuPythonInit() + * if __cuGraphInstantiateWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5764 + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') + * err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec *, CUgraph, unsigned PY_LONG_LONG))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags)(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5764, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5765 + * raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') + * err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5758 + * return err + * + * cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5767 + * return err + * + * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithParams(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS *__pyx_v_instantiateParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphInstantiateWithParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5769 + * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphInstantiateWithParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphInstantiateWithParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5769, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5770 + * global __cuGraphInstantiateWithParams + * cuPythonInit() + * if __cuGraphInstantiateWithParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5771 + * cuPythonInit() + * if __cuGraphInstantiateWithParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') + * err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5772 + * if __cuGraphInstantiateWithParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphInstantiateWithP}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5772, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5772, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5771 + * cuPythonInit() + * if __cuGraphInstantiateWithParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') + * err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5770 + * global __cuGraphInstantiateWithParams + * cuPythonInit() + * if __cuGraphInstantiateWithParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5773 + * with gil: + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') + * err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams)(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_instantiateParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5773, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5774 + * raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') + * err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5767 + * return err + * + * cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5776 + * return err + * + * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecGetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecGetFlags(CUgraphExec __pyx_v_hGraphExec, cuuint64_t *__pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecGetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5778 + * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecGetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecGetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5778, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5779 + * global __cuGraphExecGetFlags + * cuPythonInit() + * if __cuGraphExecGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5780 + * cuPythonInit() + * if __cuGraphExecGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') + * err = ( __cuGraphExecGetFlags)(hGraphExec, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5781 + * if __cuGraphExecGetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecGetFlags)(hGraphExec, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecGetFlags_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5781, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5781, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5780 + * cuPythonInit() + * if __cuGraphExecGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') + * err = ( __cuGraphExecGetFlags)(hGraphExec, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5779 + * global __cuGraphExecGetFlags + * cuPythonInit() + * if __cuGraphExecGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5782 + * with gil: + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') + * err = ( __cuGraphExecGetFlags)(hGraphExec, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, cuuint64_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags)(__pyx_v_hGraphExec, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5782, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5783 + * raise RuntimeError('Function "cuGraphExecGetFlags" not found') + * err = ( __cuGraphExecGetFlags)(hGraphExec, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5776 + * return err + * + * cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecGetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5785 + * return err + * + * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecKernelNodeSetParams_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecKernelNodeSetParams_v2(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecKernelNodeSetParams_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5787 + * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecKernelNodeSetParams_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5787, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5788 + * global __cuGraphExecKernelNodeSetParams_v2 + * cuPythonInit() + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5789 + * cuPythonInit() + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') + * err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5790 + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecKernelNodeSe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5790, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5790, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5789 + * cuPythonInit() + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') + * err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5788 + * global __cuGraphExecKernelNodeSetParams_v2 + * cuPythonInit() + * if __cuGraphExecKernelNodeSetParams_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5791 + * with gil: + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') + * err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5791, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5792 + * raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') + * err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5785 + * return err + * + * cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecKernelNodeSetParams_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecKernelNodeSetParams_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5794 + * return err + * + * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecMemcpyNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemcpyNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecMemcpyNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5796 + * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecMemcpyNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecMemcpyNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5796, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5797 + * global __cuGraphExecMemcpyNodeSetParams + * cuPythonInit() + * if __cuGraphExecMemcpyNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5798 + * cuPythonInit() + * if __cuGraphExecMemcpyNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') + * err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5799 + * if __cuGraphExecMemcpyNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecMemcpyNodeSe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5799, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5799, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5798 + * cuPythonInit() + * if __cuGraphExecMemcpyNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') + * err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5797 + * global __cuGraphExecMemcpyNodeSetParams + * cuPythonInit() + * if __cuGraphExecMemcpyNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5800 + * with gil: + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') + * err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5800, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5801 + * raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') + * err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5794 + * return err + * + * cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecMemcpyNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5803 + * return err + * + * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecMemsetNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemsetNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecMemsetNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5805 + * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecMemsetNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecMemsetNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5805, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5806 + * global __cuGraphExecMemsetNodeSetParams + * cuPythonInit() + * if __cuGraphExecMemsetNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5807 + * cuPythonInit() + * if __cuGraphExecMemsetNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') + * err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5808 + * if __cuGraphExecMemsetNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecMemsetNodeSe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5808, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5808, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5807 + * cuPythonInit() + * if __cuGraphExecMemsetNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') + * err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5806 + * global __cuGraphExecMemsetNodeSetParams + * cuPythonInit() + * if __cuGraphExecMemsetNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5809 + * with gil: + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') + * err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5809, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5810 + * raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') + * err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5803 + * return err + * + * cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecMemsetNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5812 + * return err + * + * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecHostNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecHostNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecHostNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5814 + * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecHostNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecHostNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5814, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5815 + * global __cuGraphExecHostNodeSetParams + * cuPythonInit() + * if __cuGraphExecHostNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5816 + * cuPythonInit() + * if __cuGraphExecHostNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') + * err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5817 + * if __cuGraphExecHostNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecHostNodeSetP}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5817, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5817, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5816 + * cuPythonInit() + * if __cuGraphExecHostNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') + * err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5815 + * global __cuGraphExecHostNodeSetParams + * cuPythonInit() + * if __cuGraphExecHostNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5818 + * with gil: + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') + * err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5818, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5819 + * raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') + * err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5812 + * return err + * + * cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecHostNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5821 + * return err + * + * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecChildGraphNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecChildGraphNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraph __pyx_v_childGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecChildGraphNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5823 + * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecChildGraphNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecChildGraphNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5823, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5824 + * global __cuGraphExecChildGraphNodeSetParams + * cuPythonInit() + * if __cuGraphExecChildGraphNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5825 + * cuPythonInit() + * if __cuGraphExecChildGraphNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') + * err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5826 + * if __cuGraphExecChildGraphNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecChildGraphNo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5826, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5826, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5825 + * cuPythonInit() + * if __cuGraphExecChildGraphNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') + * err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5824 + * global __cuGraphExecChildGraphNodeSetParams + * cuPythonInit() + * if __cuGraphExecChildGraphNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5827 + * with gil: + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') + * err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUgraph))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5827, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5828 + * raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') + * err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5821 + * return err + * + * cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecChildGraphNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5830 + * return err + * + * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecEventRecordNodeSetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventRecordNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecEventRecordNodeSetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5832 + * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecEventRecordNodeSetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecEventRecordNodeSetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5832, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5833 + * global __cuGraphExecEventRecordNodeSetEvent + * cuPythonInit() + * if __cuGraphExecEventRecordNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5834 + * cuPythonInit() + * if __cuGraphExecEventRecordNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') + * err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5835 + * if __cuGraphExecEventRecordNodeSetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecEventRecordN}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5835, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5835, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5834 + * cuPythonInit() + * if __cuGraphExecEventRecordNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') + * err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5833 + * global __cuGraphExecEventRecordNodeSetEvent + * cuPythonInit() + * if __cuGraphExecEventRecordNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5836 + * with gil: + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') + * err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5836, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5837 + * raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') + * err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5830 + * return err + * + * cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecEventRecordNodeSetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5839 + * return err + * + * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecEventWaitNodeSetEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventWaitNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecEventWaitNodeSetEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5841 + * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecEventWaitNodeSetEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecEventWaitNodeSetEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5841, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5842 + * global __cuGraphExecEventWaitNodeSetEvent + * cuPythonInit() + * if __cuGraphExecEventWaitNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5843 + * cuPythonInit() + * if __cuGraphExecEventWaitNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') + * err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5844 + * if __cuGraphExecEventWaitNodeSetEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecEventWaitNod}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5844, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5844, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5843 + * cuPythonInit() + * if __cuGraphExecEventWaitNodeSetEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') + * err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5842 + * global __cuGraphExecEventWaitNodeSetEvent + * cuPythonInit() + * if __cuGraphExecEventWaitNodeSetEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5845 + * with gil: + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') + * err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5845, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5846 + * raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') + * err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5839 + * return err + * + * cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecEventWaitNodeSetEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5848 + * return err + * + * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecExternalSemaphoresSignalNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5850 + * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5850, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5851 + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5852 + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5853 + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecExternalSema}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5853, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5853, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5852 + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5851 + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5854 + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5854, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5855 + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5848 + * return err + * + * cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5857 + * return err + * + * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecExternalSemaphoresWaitNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5859 + * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5859, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5860 + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5861 + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5862 + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecExternalSema_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5862, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5862, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5861 + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5860 + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * cuPythonInit() + * if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5863 + * with gil: + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5863, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5864 + * raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') + * err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5857 + * return err + * + * cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5866 + * return err + * + * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeSetEnabled + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeSetEnabled", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5868 + * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeSetEnabled + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeSetEnabled == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5868, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5869 + * global __cuGraphNodeSetEnabled + * cuPythonInit() + * if __cuGraphNodeSetEnabled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5870 + * cuPythonInit() + * if __cuGraphNodeSetEnabled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') + * err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5871 + * if __cuGraphNodeSetEnabled == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeSetEnabled_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5871, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5871, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5870 + * cuPythonInit() + * if __cuGraphNodeSetEnabled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') + * err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5869 + * global __cuGraphNodeSetEnabled + * cuPythonInit() + * if __cuGraphNodeSetEnabled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5872 + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') + * err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5872, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5873 + * raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') + * err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5866 + * return err + * + * cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeSetEnabled + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5875 + * return err + * + * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetEnabled + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeGetEnabled", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5877 + * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeGetEnabled + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeGetEnabled == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5877, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5878 + * global __cuGraphNodeGetEnabled + * cuPythonInit() + * if __cuGraphNodeGetEnabled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5879 + * cuPythonInit() + * if __cuGraphNodeGetEnabled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') + * err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5880 + * if __cuGraphNodeGetEnabled == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeGetEnabled_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5880, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5880, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5879 + * cuPythonInit() + * if __cuGraphNodeGetEnabled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') + * err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5878 + * global __cuGraphNodeGetEnabled + * cuPythonInit() + * if __cuGraphNodeGetEnabled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5881 + * with gil: + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') + * err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, unsigned int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5881, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5882 + * raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') + * err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5875 + * return err + * + * cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeGetEnabled + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5884 + * return err + * + * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphUpload + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphUpload(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphUpload", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5886 + * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphUpload + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphUpload == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5886, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5887 + * global __cuGraphUpload + * cuPythonInit() + * if __cuGraphUpload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphUpload" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5888 + * cuPythonInit() + * if __cuGraphUpload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphUpload" not found') + * err = ( __cuGraphUpload)(hGraphExec, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5889 + * if __cuGraphUpload == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphUpload" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphUpload)(hGraphExec, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphUpload_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5889, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5889, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5888 + * cuPythonInit() + * if __cuGraphUpload == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphUpload" not found') + * err = ( __cuGraphUpload)(hGraphExec, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5887 + * global __cuGraphUpload + * cuPythonInit() + * if __cuGraphUpload == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphUpload" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5890 + * with gil: + * raise RuntimeError('Function "cuGraphUpload" not found') + * err = ( __cuGraphUpload)(hGraphExec, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload)(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5890, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5891 + * raise RuntimeError('Function "cuGraphUpload" not found') + * err = ( __cuGraphUpload)(hGraphExec, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5884 + * return err + * + * cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphUpload + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5893 + * return err + * + * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphLaunch(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphLaunch", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5895 + * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphLaunch + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphLaunch == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5895, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5896 + * global __cuGraphLaunch + * cuPythonInit() + * if __cuGraphLaunch == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphLaunch" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5897 + * cuPythonInit() + * if __cuGraphLaunch == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphLaunch" not found') + * err = ( __cuGraphLaunch)(hGraphExec, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5898 + * if __cuGraphLaunch == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphLaunch" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphLaunch)(hGraphExec, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphLaunch_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5898, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5898, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5897 + * cuPythonInit() + * if __cuGraphLaunch == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphLaunch" not found') + * err = ( __cuGraphLaunch)(hGraphExec, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5896 + * global __cuGraphLaunch + * cuPythonInit() + * if __cuGraphLaunch == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphLaunch" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5899 + * with gil: + * raise RuntimeError('Function "cuGraphLaunch" not found') + * err = ( __cuGraphLaunch)(hGraphExec, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch)(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5899, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5900 + * raise RuntimeError('Function "cuGraphLaunch" not found') + * err = ( __cuGraphLaunch)(hGraphExec, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5893 + * return err + * + * cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5902 + * return err + * + * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecDestroy(CUgraphExec __pyx_v_hGraphExec) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5904 + * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5904, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5905 + * global __cuGraphExecDestroy + * cuPythonInit() + * if __cuGraphExecDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5906 + * cuPythonInit() + * if __cuGraphExecDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecDestroy" not found') + * err = ( __cuGraphExecDestroy)(hGraphExec) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5907 + * if __cuGraphExecDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecDestroy)(hGraphExec) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecDestroy_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5907, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5907, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5906 + * cuPythonInit() + * if __cuGraphExecDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecDestroy" not found') + * err = ( __cuGraphExecDestroy)(hGraphExec) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5905 + * global __cuGraphExecDestroy + * cuPythonInit() + * if __cuGraphExecDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5908 + * with gil: + * raise RuntimeError('Function "cuGraphExecDestroy" not found') + * err = ( __cuGraphExecDestroy)(hGraphExec) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy)(__pyx_v_hGraphExec); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5908, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5909 + * raise RuntimeError('Function "cuGraphExecDestroy" not found') + * err = ( __cuGraphExecDestroy)(hGraphExec) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5902 + * return err + * + * cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5911 + * return err + * + * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroy(CUgraph __pyx_v_hGraph) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5913 + * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5913, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5914 + * global __cuGraphDestroy + * cuPythonInit() + * if __cuGraphDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5915 + * cuPythonInit() + * if __cuGraphDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDestroy" not found') + * err = ( __cuGraphDestroy)(hGraph) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5916 + * if __cuGraphDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphDestroy)(hGraph) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphDestroy_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5916, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5916, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5915 + * cuPythonInit() + * if __cuGraphDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDestroy" not found') + * err = ( __cuGraphDestroy)(hGraph) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5914 + * global __cuGraphDestroy + * cuPythonInit() + * if __cuGraphDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5917 + * with gil: + * raise RuntimeError('Function "cuGraphDestroy" not found') + * err = ( __cuGraphDestroy)(hGraph) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy)(__pyx_v_hGraph); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5917, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5918 + * raise RuntimeError('Function "cuGraphDestroy" not found') + * err = ( __cuGraphDestroy)(hGraph) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5911 + * return err + * + * cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5920 + * return err + * + * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecUpdate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecUpdate_v2(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphExecUpdateResultInfo *__pyx_v_resultInfo) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecUpdate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5922 + * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecUpdate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecUpdate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5922, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5923 + * global __cuGraphExecUpdate_v2 + * cuPythonInit() + * if __cuGraphExecUpdate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5924 + * cuPythonInit() + * if __cuGraphExecUpdate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') + * err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5925 + * if __cuGraphExecUpdate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecUpdate_v2_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5925, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5925, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5924 + * cuPythonInit() + * if __cuGraphExecUpdate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') + * err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5923 + * global __cuGraphExecUpdate_v2 + * cuPythonInit() + * if __cuGraphExecUpdate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5926 + * with gil: + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') + * err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2)(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5926, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5927 + * raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') + * err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5920 + * return err + * + * cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecUpdate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecUpdate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5929 + * return err + * + * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeCopyAttributes + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeCopyAttributes(CUgraphNode __pyx_v_dst, CUgraphNode __pyx_v_src) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphKernelNodeCopyAttributes", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5931 + * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphKernelNodeCopyAttributes + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphKernelNodeCopyAttributes == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5931, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5932 + * global __cuGraphKernelNodeCopyAttributes + * cuPythonInit() + * if __cuGraphKernelNodeCopyAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5933 + * cuPythonInit() + * if __cuGraphKernelNodeCopyAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') + * err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5934 + * if __cuGraphKernelNodeCopyAttributes == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphKernelNodeCopyAt}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5934, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5934, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5933 + * cuPythonInit() + * if __cuGraphKernelNodeCopyAttributes == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') + * err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5932 + * global __cuGraphKernelNodeCopyAttributes + * cuPythonInit() + * if __cuGraphKernelNodeCopyAttributes == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5935 + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') + * err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes)(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5935, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5936 + * raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') + * err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5929 + * return err + * + * cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeCopyAttributes + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5938 + * return err + * + * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue *__pyx_v_value_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphKernelNodeGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5940 + * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphKernelNodeGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphKernelNodeGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5940, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5941 + * global __cuGraphKernelNodeGetAttribute + * cuPythonInit() + * if __cuGraphKernelNodeGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5942 + * cuPythonInit() + * if __cuGraphKernelNodeGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') + * err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5943 + * if __cuGraphKernelNodeGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphKernelNodeGetAtt}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5943, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5943, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5942 + * cuPythonInit() + * if __cuGraphKernelNodeGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') + * err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5941 + * global __cuGraphKernelNodeGetAttribute + * cuPythonInit() + * if __cuGraphKernelNodeGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5944 + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') + * err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5944, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5945 + * raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') + * err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5938 + * return err + * + * cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5947 + * return err + * + * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue const *__pyx_v_value) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphKernelNodeSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5949 + * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphKernelNodeSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphKernelNodeSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5949, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5950 + * global __cuGraphKernelNodeSetAttribute + * cuPythonInit() + * if __cuGraphKernelNodeSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5951 + * cuPythonInit() + * if __cuGraphKernelNodeSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') + * err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5952 + * if __cuGraphKernelNodeSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphKernelNodeSetAtt}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5952, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5952, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5951 + * cuPythonInit() + * if __cuGraphKernelNodeSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') + * err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5950 + * global __cuGraphKernelNodeSetAttribute + * cuPythonInit() + * if __cuGraphKernelNodeSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5953 + * with gil: + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') + * err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute)(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5953, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5954 + * raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') + * err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5947 + * return err + * + * cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5956 + * return err + * + * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDebugDotPrint + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDebugDotPrint(CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphDebugDotPrint", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5958 + * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphDebugDotPrint + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphDebugDotPrint == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5958, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5959 + * global __cuGraphDebugDotPrint + * cuPythonInit() + * if __cuGraphDebugDotPrint == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5960 + * cuPythonInit() + * if __cuGraphDebugDotPrint == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') + * err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5961 + * if __cuGraphDebugDotPrint == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphDebugDotPrint_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5961, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5961, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5960 + * cuPythonInit() + * if __cuGraphDebugDotPrint == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') + * err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5959 + * global __cuGraphDebugDotPrint + * cuPythonInit() + * if __cuGraphDebugDotPrint == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5962 + * with gil: + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') + * err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, char const *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint)(__pyx_v_hGraph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5962, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5963 + * raise RuntimeError('Function "cuGraphDebugDotPrint" not found') + * err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5956 + * return err + * + * cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphDebugDotPrint + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5965 + * return err + * + * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectCreate(CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuUserObjectCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5967 + * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuUserObjectCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuUserObjectCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5967, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5968 + * global __cuUserObjectCreate + * cuPythonInit() + * if __cuUserObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5969 + * cuPythonInit() + * if __cuUserObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectCreate" not found') + * err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5970 + * if __cuUserObjectCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuUserObjectCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuUserObjectCreate_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5970, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5970, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5969 + * cuPythonInit() + * if __cuUserObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectCreate" not found') + * err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5968 + * global __cuUserObjectCreate + * cuPythonInit() + * if __cuUserObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5971 + * with gil: + * raise RuntimeError('Function "cuUserObjectCreate" not found') + * err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUuserObject *, void *, CUhostFn, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate)(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5971, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5972 + * raise RuntimeError('Function "cuUserObjectCreate" not found') + * err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5965 + * return err + * + * cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5974 + * return err + * + * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectRetain + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRetain(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuUserObjectRetain", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5976 + * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuUserObjectRetain + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuUserObjectRetain == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5976, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5977 + * global __cuUserObjectRetain + * cuPythonInit() + * if __cuUserObjectRetain == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectRetain" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5978 + * cuPythonInit() + * if __cuUserObjectRetain == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectRetain" not found') + * err = ( __cuUserObjectRetain)(object, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5979 + * if __cuUserObjectRetain == NULL: + * with gil: + * raise RuntimeError('Function "cuUserObjectRetain" not found') # <<<<<<<<<<<<<< + * err = ( __cuUserObjectRetain)(object, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuUserObjectRetain_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5979, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5979, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5978 + * cuPythonInit() + * if __cuUserObjectRetain == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectRetain" not found') + * err = ( __cuUserObjectRetain)(object, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5977 + * global __cuUserObjectRetain + * cuPythonInit() + * if __cuUserObjectRetain == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectRetain" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5980 + * with gil: + * raise RuntimeError('Function "cuUserObjectRetain" not found') + * err = ( __cuUserObjectRetain)(object, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUuserObject, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain)(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5980, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5981 + * raise RuntimeError('Function "cuUserObjectRetain" not found') + * err = ( __cuUserObjectRetain)(object, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5974 + * return err + * + * cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectRetain + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5983 + * return err + * + * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectRelease + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRelease(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuUserObjectRelease", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5985 + * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuUserObjectRelease + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuUserObjectRelease == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5985, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5986 + * global __cuUserObjectRelease + * cuPythonInit() + * if __cuUserObjectRelease == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectRelease" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5987 + * cuPythonInit() + * if __cuUserObjectRelease == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectRelease" not found') + * err = ( __cuUserObjectRelease)(object, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5988 + * if __cuUserObjectRelease == NULL: + * with gil: + * raise RuntimeError('Function "cuUserObjectRelease" not found') # <<<<<<<<<<<<<< + * err = ( __cuUserObjectRelease)(object, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuUserObjectRelease_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5988, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5988, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5987 + * cuPythonInit() + * if __cuUserObjectRelease == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuUserObjectRelease" not found') + * err = ( __cuUserObjectRelease)(object, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5986 + * global __cuUserObjectRelease + * cuPythonInit() + * if __cuUserObjectRelease == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuUserObjectRelease" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5989 + * with gil: + * raise RuntimeError('Function "cuUserObjectRelease" not found') + * err = ( __cuUserObjectRelease)(object, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUuserObject, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease)(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5989, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5990 + * raise RuntimeError('Function "cuUserObjectRelease" not found') + * err = ( __cuUserObjectRelease)(object, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5983 + * return err + * + * cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuUserObjectRelease + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":5992 + * return err + * + * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRetainUserObject + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRetainUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphRetainUserObject", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":5994 + * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphRetainUserObject + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphRetainUserObject == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 5994, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":5995 + * global __cuGraphRetainUserObject + * cuPythonInit() + * if __cuGraphRetainUserObject == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":5996 + * cuPythonInit() + * if __cuGraphRetainUserObject == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') + * err = ( __cuGraphRetainUserObject)(graph, object, count, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":5997 + * if __cuGraphRetainUserObject == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphRetainUserObject)(graph, object, count, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphRetainUserObject}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5997, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 5997, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5996 + * cuPythonInit() + * if __cuGraphRetainUserObject == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') + * err = ( __cuGraphRetainUserObject)(graph, object, count, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5995 + * global __cuGraphRetainUserObject + * cuPythonInit() + * if __cuGraphRetainUserObject == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":5998 + * with gil: + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') + * err = ( __cuGraphRetainUserObject)(graph, object, count, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUuserObject, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject)(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 5998, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":5999 + * raise RuntimeError('Function "cuGraphRetainUserObject" not found') + * err = ( __cuGraphRetainUserObject)(graph, object, count, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":5992 + * return err + * + * cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphRetainUserObject + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6001 + * return err + * + * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphReleaseUserObject + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphReleaseUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphReleaseUserObject", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6003 + * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphReleaseUserObject + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphReleaseUserObject == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6003, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6004 + * global __cuGraphReleaseUserObject + * cuPythonInit() + * if __cuGraphReleaseUserObject == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6005 + * cuPythonInit() + * if __cuGraphReleaseUserObject == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') + * err = ( __cuGraphReleaseUserObject)(graph, object, count) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6006 + * if __cuGraphReleaseUserObject == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphReleaseUserObject)(graph, object, count) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphReleaseUserObjec}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6006, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6006, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6005 + * cuPythonInit() + * if __cuGraphReleaseUserObject == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') + * err = ( __cuGraphReleaseUserObject)(graph, object, count) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6004 + * global __cuGraphReleaseUserObject + * cuPythonInit() + * if __cuGraphReleaseUserObject == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6007 + * with gil: + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') + * err = ( __cuGraphReleaseUserObject)(graph, object, count) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraph, CUuserObject, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject)(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6007, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6008 + * raise RuntimeError('Function "cuGraphReleaseUserObject" not found') + * err = ( __cuGraphReleaseUserObject)(graph, object, count) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6001 + * return err + * + * cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphReleaseUserObject + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6010 + * return err + * + * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddNode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddNode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6012 + * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddNode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddNode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6012, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6013 + * global __cuGraphAddNode + * cuPythonInit() + * if __cuGraphAddNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddNode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6014 + * cuPythonInit() + * if __cuGraphAddNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddNode" not found') + * err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6015 + * if __cuGraphAddNode == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddNode" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddNode_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6015, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6015, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6014 + * cuPythonInit() + * if __cuGraphAddNode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddNode" not found') + * err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6013 + * global __cuGraphAddNode + * cuPythonInit() + * if __cuGraphAddNode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddNode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6016 + * with gil: + * raise RuntimeError('Function "cuGraphAddNode" not found') + * err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6016, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6017 + * raise RuntimeError('Function "cuGraphAddNode" not found') + * err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6010 + * return err + * + * cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddNode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6019 + * return err + * + * cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddNode_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode_v2(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphAddNode_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6021 + * cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphAddNode_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphAddNode_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6021, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6022 + * global __cuGraphAddNode_v2 + * cuPythonInit() + * if __cuGraphAddNode_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6023 + * cuPythonInit() + * if __cuGraphAddNode_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') + * err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6024 + * if __cuGraphAddNode_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphAddNode_v2_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6024, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6024, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6023 + * cuPythonInit() + * if __cuGraphAddNode_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') + * err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6022 + * global __cuGraphAddNode_v2 + * cuPythonInit() + * if __cuGraphAddNode_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6025 + * with gil: + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') + * err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2)(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6025, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6026 + * raise RuntimeError('Function "cuGraphAddNode_v2" not found') + * err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6019 + * return err + * + * cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphAddNode_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphAddNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6028 + * return err + * + * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetParams(CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6030 + * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6030, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6031 + * global __cuGraphNodeSetParams + * cuPythonInit() + * if __cuGraphNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6032 + * cuPythonInit() + * if __cuGraphNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') + * err = ( __cuGraphNodeSetParams)(hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6033 + * if __cuGraphNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphNodeSetParams)(hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphNodeSetParams_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6033, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6033, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6032 + * cuPythonInit() + * if __cuGraphNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') + * err = ( __cuGraphNodeSetParams)(hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6031 + * global __cuGraphNodeSetParams + * cuPythonInit() + * if __cuGraphNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6034 + * with gil: + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') + * err = ( __cuGraphNodeSetParams)(hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphNode, CUgraphNodeParams *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams)(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6034, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6035 + * raise RuntimeError('Function "cuGraphNodeSetParams" not found') + * err = ( __cuGraphNodeSetParams)(hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6028 + * return err + * + * cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6037 + * return err + * + * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecNodeSetParams + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphExecNodeSetParams", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6039 + * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphExecNodeSetParams + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphExecNodeSetParams == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6039, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6040 + * global __cuGraphExecNodeSetParams + * cuPythonInit() + * if __cuGraphExecNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6041 + * cuPythonInit() + * if __cuGraphExecNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') + * err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6042 + * if __cuGraphExecNodeSetParams == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphExecNodeSetParam}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6042, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6042, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6041 + * cuPythonInit() + * if __cuGraphExecNodeSetParams == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') + * err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6040 + * global __cuGraphExecNodeSetParams + * cuPythonInit() + * if __cuGraphExecNodeSetParams == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6043 + * with gil: + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') + * err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphExec, CUgraphNode, CUgraphNodeParams *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams)(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6043, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6044 + * raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') + * err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6037 + * return err + * + * cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphExecNodeSetParams + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6046 + * return err + * + * cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphConditionalHandleCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphConditionalHandleCreate(CUgraphConditionalHandle *__pyx_v_pHandle_out, CUgraph __pyx_v_hGraph, CUcontext __pyx_v_ctx, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphConditionalHandleCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6048 + * cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphConditionalHandleCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphConditionalHandleCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6048, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6049 + * global __cuGraphConditionalHandleCreate + * cuPythonInit() + * if __cuGraphConditionalHandleCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6050 + * cuPythonInit() + * if __cuGraphConditionalHandleCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') + * err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6051 + * if __cuGraphConditionalHandleCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphConditionalHandl}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6051, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6051, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6050 + * cuPythonInit() + * if __cuGraphConditionalHandleCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') + * err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6049 + * global __cuGraphConditionalHandleCreate + * cuPythonInit() + * if __cuGraphConditionalHandleCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6052 + * with gil: + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') + * err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate)(__pyx_v_pHandle_out, __pyx_v_hGraph, __pyx_v_ctx, __pyx_v_defaultLaunchValue, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6052, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6053 + * raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') + * err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6046 + * return err + * + * cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphConditionalHandleCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphConditionalHandleCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6055 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveBlocksPerMultiprocessor", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6057 + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6057, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6058 + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6059 + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6060 + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxActiveBlo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6060, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6060, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6059 + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6058 + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6061 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction, int, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor)(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6061, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6062 + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6055 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6064 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6066 + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6066, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6067 + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6068 + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6069 + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6069, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6069, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6068 + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6067 + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * cuPythonInit() + * if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6070 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction, int, size_t, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6070, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6071 + * raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') + * err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6064 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6073 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialBlockSize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6075 + * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxPotentialBlockSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxPotentialBlockSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6075, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6076 + * global __cuOccupancyMaxPotentialBlockSize + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6077 + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') + * err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6078 + * if __cuOccupancyMaxPotentialBlockSize == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxPotential}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6078, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6078, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6077 + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') + * err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6076 + * global __cuOccupancyMaxPotentialBlockSize + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6079 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') + * err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize)(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6079, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6080 + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') + * err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6073 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6082 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialBlockSizeWithFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6084 + * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6084, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6085 + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6086 + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') + * err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6087 + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxPotential_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6087, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6087, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6086 + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') + * err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6085 + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * cuPythonInit() + * if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6088 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') + * err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags)(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6088, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6089 + * raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') + * err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6082 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6091 + * return err + * + * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyAvailableDynamicSMemPerBlock + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyAvailableDynamicSMemPerBlock", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6093 + * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyAvailableDynamicSMemPerBlock + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6093, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6094 + * global __cuOccupancyAvailableDynamicSMemPerBlock + * cuPythonInit() + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6095 + * cuPythonInit() + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') + * err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6096 + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyAvailableDyn}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6096, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6096, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6095 + * cuPythonInit() + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') + * err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6094 + * global __cuOccupancyAvailableDynamicSMemPerBlock + * cuPythonInit() + * if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6097 + * with gil: + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') + * err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUfunction, int, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock)(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6097, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6098 + * raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') + * err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6091 + * return err + * + * cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyAvailableDynamicSMemPerBlock + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6100 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialClusterSize + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialClusterSize(int *__pyx_v_clusterSize, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxPotentialClusterSize", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6102 + * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxPotentialClusterSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxPotentialClusterSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6102, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6103 + * global __cuOccupancyMaxPotentialClusterSize + * cuPythonInit() + * if __cuOccupancyMaxPotentialClusterSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6104 + * cuPythonInit() + * if __cuOccupancyMaxPotentialClusterSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') + * err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6105 + * if __cuOccupancyMaxPotentialClusterSize == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxPotential_3}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6105, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6105, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6104 + * cuPythonInit() + * if __cuOccupancyMaxPotentialClusterSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') + * err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6103 + * global __cuOccupancyMaxPotentialClusterSize + * cuPythonInit() + * if __cuOccupancyMaxPotentialClusterSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6106 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') + * err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction, CUlaunchConfig const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize)(__pyx_v_clusterSize, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6106, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6107 + * raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') + * err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6100 + * return err + * + * cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialClusterSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6109 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveClusters + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveClusters(int *__pyx_v_numClusters, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuOccupancyMaxActiveClusters", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6111 + * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuOccupancyMaxActiveClusters + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuOccupancyMaxActiveClusters == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6111, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6112 + * global __cuOccupancyMaxActiveClusters + * cuPythonInit() + * if __cuOccupancyMaxActiveClusters == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6113 + * cuPythonInit() + * if __cuOccupancyMaxActiveClusters == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') + * err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6114 + * if __cuOccupancyMaxActiveClusters == NULL: + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') # <<<<<<<<<<<<<< + * err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuOccupancyMaxActiveClu}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6114, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6114, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6113 + * cuPythonInit() + * if __cuOccupancyMaxActiveClusters == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') + * err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6112 + * global __cuOccupancyMaxActiveClusters + * cuPythonInit() + * if __cuOccupancyMaxActiveClusters == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6115 + * with gil: + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') + * err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUfunction, CUlaunchConfig const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters)(__pyx_v_numClusters, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6115, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6116 + * raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') + * err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6109 + * return err + * + * cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveClusters + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6118 + * return err + * + * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetArray(CUtexref __pyx_v_hTexRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6120 + * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6120, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6121 + * global __cuTexRefSetArray + * cuPythonInit() + * if __cuTexRefSetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6122 + * cuPythonInit() + * if __cuTexRefSetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetArray" not found') + * err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6123 + * if __cuTexRefSetArray == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetArray_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6123, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6123, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6122 + * cuPythonInit() + * if __cuTexRefSetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetArray" not found') + * err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6121 + * global __cuTexRefSetArray + * cuPythonInit() + * if __cuTexRefSetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6124 + * with gil: + * raise RuntimeError('Function "cuTexRefSetArray" not found') + * err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUarray, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray)(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6124, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6125 + * raise RuntimeError('Function "cuTexRefSetArray" not found') + * err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6118 + * return err + * + * cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6127 + * return err + * + * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmappedArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmappedArray(CUtexref __pyx_v_hTexRef, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetMipmappedArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6129 + * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetMipmappedArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetMipmappedArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6129, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6130 + * global __cuTexRefSetMipmappedArray + * cuPythonInit() + * if __cuTexRefSetMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6131 + * cuPythonInit() + * if __cuTexRefSetMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') + * err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6132 + * if __cuTexRefSetMipmappedArray == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetMipmappedArr}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6132, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6132, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6131 + * cuPythonInit() + * if __cuTexRefSetMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') + * err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6130 + * global __cuTexRefSetMipmappedArray + * cuPythonInit() + * if __cuTexRefSetMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6133 + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') + * err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUmipmappedArray, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray)(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6133, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6134 + * raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') + * err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6127 + * return err + * + * cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmappedArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6136 + * return err + * + * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress_v2(size_t *__pyx_v_ByteOffset, CUtexref __pyx_v_hTexRef, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetAddress_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6138 + * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetAddress_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetAddress_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6138, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6139 + * global __cuTexRefSetAddress_v2 + * cuPythonInit() + * if __cuTexRefSetAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6140 + * cuPythonInit() + * if __cuTexRefSetAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') + * err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6141 + * if __cuTexRefSetAddress_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetAddress_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6141, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6141, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6140 + * cuPythonInit() + * if __cuTexRefSetAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') + * err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6139 + * global __cuTexRefSetAddress_v2 + * cuPythonInit() + * if __cuTexRefSetAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6142 + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') + * err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(size_t *, CUtexref, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2)(__pyx_v_ByteOffset, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6142, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6143 + * raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') + * err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6136 + * return err + * + * cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6145 + * return err + * + * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress2D_v3 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress2D_v3(CUtexref __pyx_v_hTexRef, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetAddress2D_v3", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6147 + * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetAddress2D_v3 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetAddress2D_v3 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6147, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6148 + * global __cuTexRefSetAddress2D_v3 + * cuPythonInit() + * if __cuTexRefSetAddress2D_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6149 + * cuPythonInit() + * if __cuTexRefSetAddress2D_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') + * err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6150 + * if __cuTexRefSetAddress2D_v3 == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetAddress2D_v3}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6150, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6150, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6149 + * cuPythonInit() + * if __cuTexRefSetAddress2D_v3 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') + * err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6148 + * global __cuTexRefSetAddress2D_v3 + * cuPythonInit() + * if __cuTexRefSetAddress2D_v3 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6151 + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') + * err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3)(__pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6151, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6152 + * raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') + * err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6145 + * return err + * + * cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress2D_v3 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetAddress2D_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6154 + * return err + * + * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFormat + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFormat(CUtexref __pyx_v_hTexRef, CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetFormat", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6156 + * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetFormat + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetFormat == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6156, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6157 + * global __cuTexRefSetFormat + * cuPythonInit() + * if __cuTexRefSetFormat == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFormat" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6158 + * cuPythonInit() + * if __cuTexRefSetFormat == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFormat" not found') + * err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6159 + * if __cuTexRefSetFormat == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetFormat" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetFormat_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6159, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6159, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6158 + * cuPythonInit() + * if __cuTexRefSetFormat == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFormat" not found') + * err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6157 + * global __cuTexRefSetFormat + * cuPythonInit() + * if __cuTexRefSetFormat == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFormat" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6160 + * with gil: + * raise RuntimeError('Function "cuTexRefSetFormat" not found') + * err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUarray_format, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat)(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6160, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6161 + * raise RuntimeError('Function "cuTexRefSetFormat" not found') + * err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6154 + * return err + * + * cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFormat + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6163 + * return err + * + * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddressMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddressMode(CUtexref __pyx_v_hTexRef, int __pyx_v_dim, CUaddress_mode __pyx_v_am) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetAddressMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6165 + * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetAddressMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetAddressMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6165, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6166 + * global __cuTexRefSetAddressMode + * cuPythonInit() + * if __cuTexRefSetAddressMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6167 + * cuPythonInit() + * if __cuTexRefSetAddressMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') + * err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6168 + * if __cuTexRefSetAddressMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetAddressMode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6168, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6168, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6167 + * cuPythonInit() + * if __cuTexRefSetAddressMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') + * err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6166 + * global __cuTexRefSetAddressMode + * cuPythonInit() + * if __cuTexRefSetAddressMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6169 + * with gil: + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') + * err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, int, CUaddress_mode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode)(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6169, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6170 + * raise RuntimeError('Function "cuTexRefSetAddressMode" not found') + * err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6163 + * return err + * + * cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetAddressMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6172 + * return err + * + * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFilterMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetFilterMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6174 + * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetFilterMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetFilterMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6174, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6175 + * global __cuTexRefSetFilterMode + * cuPythonInit() + * if __cuTexRefSetFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6176 + * cuPythonInit() + * if __cuTexRefSetFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') + * err = ( __cuTexRefSetFilterMode)(hTexRef, fm) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6177 + * if __cuTexRefSetFilterMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetFilterMode)(hTexRef, fm) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetFilterMode_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6177, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6177, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6176 + * cuPythonInit() + * if __cuTexRefSetFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') + * err = ( __cuTexRefSetFilterMode)(hTexRef, fm) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6175 + * global __cuTexRefSetFilterMode + * cuPythonInit() + * if __cuTexRefSetFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6178 + * with gil: + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') + * err = ( __cuTexRefSetFilterMode)(hTexRef, fm) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUfilter_mode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode)(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6178, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6179 + * raise RuntimeError('Function "cuTexRefSetFilterMode" not found') + * err = ( __cuTexRefSetFilterMode)(hTexRef, fm) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6172 + * return err + * + * cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFilterMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6181 + * return err + * + * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapFilterMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetMipmapFilterMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6183 + * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetMipmapFilterMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetMipmapFilterMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6183, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6184 + * global __cuTexRefSetMipmapFilterMode + * cuPythonInit() + * if __cuTexRefSetMipmapFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6185 + * cuPythonInit() + * if __cuTexRefSetMipmapFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') + * err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6186 + * if __cuTexRefSetMipmapFilterMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetMipmapFilter}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6186, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6186, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6185 + * cuPythonInit() + * if __cuTexRefSetMipmapFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') + * err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6184 + * global __cuTexRefSetMipmapFilterMode + * cuPythonInit() + * if __cuTexRefSetMipmapFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6187 + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') + * err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, CUfilter_mode))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode)(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6187, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6188 + * raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') + * err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6181 + * return err + * + * cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapFilterMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6190 + * return err + * + * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelBias + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelBias(CUtexref __pyx_v_hTexRef, float __pyx_v_bias) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetMipmapLevelBias", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6192 + * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetMipmapLevelBias + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetMipmapLevelBias == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6192, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6193 + * global __cuTexRefSetMipmapLevelBias + * cuPythonInit() + * if __cuTexRefSetMipmapLevelBias == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6194 + * cuPythonInit() + * if __cuTexRefSetMipmapLevelBias == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') + * err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6195 + * if __cuTexRefSetMipmapLevelBias == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetMipmapLevelB}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6195, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6195, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6194 + * cuPythonInit() + * if __cuTexRefSetMipmapLevelBias == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') + * err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6193 + * global __cuTexRefSetMipmapLevelBias + * cuPythonInit() + * if __cuTexRefSetMipmapLevelBias == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6196 + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') + * err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, float))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias)(__pyx_v_hTexRef, __pyx_v_bias); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6196, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6197 + * raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') + * err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6190 + * return err + * + * cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelBias + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6199 + * return err + * + * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelClamp + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelClamp(CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetMipmapLevelClamp", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6201 + * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetMipmapLevelClamp + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetMipmapLevelClamp == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6201, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6202 + * global __cuTexRefSetMipmapLevelClamp + * cuPythonInit() + * if __cuTexRefSetMipmapLevelClamp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6203 + * cuPythonInit() + * if __cuTexRefSetMipmapLevelClamp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') + * err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6204 + * if __cuTexRefSetMipmapLevelClamp == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetMipmapLevelC}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6204, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6204, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6203 + * cuPythonInit() + * if __cuTexRefSetMipmapLevelClamp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') + * err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6202 + * global __cuTexRefSetMipmapLevelClamp + * cuPythonInit() + * if __cuTexRefSetMipmapLevelClamp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6205 + * with gil: + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') + * err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, float, float))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp)(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6205, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6206 + * raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') + * err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6199 + * return err + * + * cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelClamp + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6208 + * return err + * + * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMaxAnisotropy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMaxAnisotropy(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetMaxAnisotropy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6210 + * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetMaxAnisotropy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetMaxAnisotropy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6210, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6211 + * global __cuTexRefSetMaxAnisotropy + * cuPythonInit() + * if __cuTexRefSetMaxAnisotropy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6212 + * cuPythonInit() + * if __cuTexRefSetMaxAnisotropy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') + * err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6213 + * if __cuTexRefSetMaxAnisotropy == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetMaxAnisotrop}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6213, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6213, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6212 + * cuPythonInit() + * if __cuTexRefSetMaxAnisotropy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') + * err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6211 + * global __cuTexRefSetMaxAnisotropy + * cuPythonInit() + * if __cuTexRefSetMaxAnisotropy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6214 + * with gil: + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') + * err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy)(__pyx_v_hTexRef, __pyx_v_maxAniso); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6214, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6215 + * raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') + * err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6208 + * return err + * + * cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetMaxAnisotropy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6217 + * return err + * + * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetBorderColor + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetBorderColor(CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetBorderColor", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6219 + * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetBorderColor + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetBorderColor == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6219, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6220 + * global __cuTexRefSetBorderColor + * cuPythonInit() + * if __cuTexRefSetBorderColor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6221 + * cuPythonInit() + * if __cuTexRefSetBorderColor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') + * err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6222 + * if __cuTexRefSetBorderColor == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetBorderColor}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6222, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6222, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6221 + * cuPythonInit() + * if __cuTexRefSetBorderColor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') + * err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6220 + * global __cuTexRefSetBorderColor + * cuPythonInit() + * if __cuTexRefSetBorderColor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6223 + * with gil: + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') + * err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, float *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor)(__pyx_v_hTexRef, __pyx_v_pBorderColor); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6223, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6224 + * raise RuntimeError('Function "cuTexRefSetBorderColor" not found') + * err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6217 + * return err + * + * cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetBorderColor + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6226 + * return err + * + * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFlags(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefSetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6228 + * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefSetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefSetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6228, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6229 + * global __cuTexRefSetFlags + * cuPythonInit() + * if __cuTexRefSetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6230 + * cuPythonInit() + * if __cuTexRefSetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFlags" not found') + * err = ( __cuTexRefSetFlags)(hTexRef, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6231 + * if __cuTexRefSetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefSetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefSetFlags)(hTexRef, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefSetFlags_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6231, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6231, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6230 + * cuPythonInit() + * if __cuTexRefSetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefSetFlags" not found') + * err = ( __cuTexRefSetFlags)(hTexRef, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6229 + * global __cuTexRefSetFlags + * cuPythonInit() + * if __cuTexRefSetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefSetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6232 + * with gil: + * raise RuntimeError('Function "cuTexRefSetFlags" not found') + * err = ( __cuTexRefSetFlags)(hTexRef, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags)(__pyx_v_hTexRef, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6232, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6233 + * raise RuntimeError('Function "cuTexRefSetFlags" not found') + * err = ( __cuTexRefSetFlags)(hTexRef, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6226 + * return err + * + * cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefSetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6235 + * return err + * + * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetAddress_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddress_v2(CUdeviceptr *__pyx_v_pdptr, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetAddress_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6237 + * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetAddress_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetAddress_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6237, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6238 + * global __cuTexRefGetAddress_v2 + * cuPythonInit() + * if __cuTexRefGetAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6239 + * cuPythonInit() + * if __cuTexRefGetAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') + * err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6240 + * if __cuTexRefGetAddress_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetAddress_v2_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6240, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6240, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6239 + * cuPythonInit() + * if __cuTexRefGetAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') + * err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6238 + * global __cuTexRefGetAddress_v2 + * cuPythonInit() + * if __cuTexRefGetAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6241 + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') + * err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2)(__pyx_v_pdptr, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6241, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6242 + * raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') + * err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6235 + * return err + * + * cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetAddress_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6244 + * return err + * + * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetArray(CUarray *__pyx_v_phArray, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6246 + * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6246, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6247 + * global __cuTexRefGetArray + * cuPythonInit() + * if __cuTexRefGetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6248 + * cuPythonInit() + * if __cuTexRefGetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetArray" not found') + * err = ( __cuTexRefGetArray)(phArray, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6249 + * if __cuTexRefGetArray == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetArray)(phArray, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetArray_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6249, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6249, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6248 + * cuPythonInit() + * if __cuTexRefGetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetArray" not found') + * err = ( __cuTexRefGetArray)(phArray, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6247 + * global __cuTexRefGetArray + * cuPythonInit() + * if __cuTexRefGetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6250 + * with gil: + * raise RuntimeError('Function "cuTexRefGetArray" not found') + * err = ( __cuTexRefGetArray)(phArray, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray)(__pyx_v_phArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6250, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6251 + * raise RuntimeError('Function "cuTexRefGetArray" not found') + * err = ( __cuTexRefGetArray)(phArray, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6244 + * return err + * + * cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6253 + * return err + * + * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmappedArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmappedArray(CUmipmappedArray *__pyx_v_phMipmappedArray, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetMipmappedArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6255 + * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetMipmappedArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetMipmappedArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6255, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6256 + * global __cuTexRefGetMipmappedArray + * cuPythonInit() + * if __cuTexRefGetMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6257 + * cuPythonInit() + * if __cuTexRefGetMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') + * err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6258 + * if __cuTexRefGetMipmappedArray == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetMipmappedArr}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6258, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6258, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6257 + * cuPythonInit() + * if __cuTexRefGetMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') + * err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6256 + * global __cuTexRefGetMipmappedArray + * cuPythonInit() + * if __cuTexRefGetMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6259 + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') + * err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmipmappedArray *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray)(__pyx_v_phMipmappedArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6259, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6260 + * raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') + * err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6253 + * return err + * + * cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmappedArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6262 + * return err + * + * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetAddressMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddressMode(CUaddress_mode *__pyx_v_pam, CUtexref __pyx_v_hTexRef, int __pyx_v_dim) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetAddressMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6264 + * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetAddressMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetAddressMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6264, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6265 + * global __cuTexRefGetAddressMode + * cuPythonInit() + * if __cuTexRefGetAddressMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6266 + * cuPythonInit() + * if __cuTexRefGetAddressMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') + * err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6267 + * if __cuTexRefGetAddressMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetAddressMode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6267, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6267, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6266 + * cuPythonInit() + * if __cuTexRefGetAddressMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') + * err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6265 + * global __cuTexRefGetAddressMode + * cuPythonInit() + * if __cuTexRefGetAddressMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6268 + * with gil: + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') + * err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUaddress_mode *, CUtexref, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode)(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6268, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6269 + * raise RuntimeError('Function "cuTexRefGetAddressMode" not found') + * err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6262 + * return err + * + * cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetAddressMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6271 + * return err + * + * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFilterMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetFilterMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6273 + * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetFilterMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetFilterMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6273, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6274 + * global __cuTexRefGetFilterMode + * cuPythonInit() + * if __cuTexRefGetFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6275 + * cuPythonInit() + * if __cuTexRefGetFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') + * err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6276 + * if __cuTexRefGetFilterMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetFilterMode_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6276, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6276, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6275 + * cuPythonInit() + * if __cuTexRefGetFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') + * err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6274 + * global __cuTexRefGetFilterMode + * cuPythonInit() + * if __cuTexRefGetFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6277 + * with gil: + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') + * err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfilter_mode *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6277, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6278 + * raise RuntimeError('Function "cuTexRefGetFilterMode" not found') + * err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6271 + * return err + * + * cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFilterMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6280 + * return err + * + * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFormat + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFormat(CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetFormat", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6282 + * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetFormat + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetFormat == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6282, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6283 + * global __cuTexRefGetFormat + * cuPythonInit() + * if __cuTexRefGetFormat == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFormat" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6284 + * cuPythonInit() + * if __cuTexRefGetFormat == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFormat" not found') + * err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6285 + * if __cuTexRefGetFormat == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetFormat" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetFormat_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6285, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6285, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6284 + * cuPythonInit() + * if __cuTexRefGetFormat == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFormat" not found') + * err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6283 + * global __cuTexRefGetFormat + * cuPythonInit() + * if __cuTexRefGetFormat == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFormat" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6286 + * with gil: + * raise RuntimeError('Function "cuTexRefGetFormat" not found') + * err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray_format *, int *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat)(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6286, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6287 + * raise RuntimeError('Function "cuTexRefGetFormat" not found') + * err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6280 + * return err + * + * cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFormat + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6289 + * return err + * + * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapFilterMode + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetMipmapFilterMode", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6291 + * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetMipmapFilterMode + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetMipmapFilterMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6291, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6292 + * global __cuTexRefGetMipmapFilterMode + * cuPythonInit() + * if __cuTexRefGetMipmapFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6293 + * cuPythonInit() + * if __cuTexRefGetMipmapFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') + * err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6294 + * if __cuTexRefGetMipmapFilterMode == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetMipmapFilter}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6294, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6294, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6293 + * cuPythonInit() + * if __cuTexRefGetMipmapFilterMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') + * err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6292 + * global __cuTexRefGetMipmapFilterMode + * cuPythonInit() + * if __cuTexRefGetMipmapFilterMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6295 + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') + * err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUfilter_mode *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode)(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6295, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6296 + * raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') + * err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6289 + * return err + * + * cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapFilterMode + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6298 + * return err + * + * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelBias + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetMipmapLevelBias", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6300 + * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetMipmapLevelBias + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetMipmapLevelBias == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6300, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6301 + * global __cuTexRefGetMipmapLevelBias + * cuPythonInit() + * if __cuTexRefGetMipmapLevelBias == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6302 + * cuPythonInit() + * if __cuTexRefGetMipmapLevelBias == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') + * err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6303 + * if __cuTexRefGetMipmapLevelBias == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetMipmapLevelB}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6303, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6303, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6302 + * cuPythonInit() + * if __cuTexRefGetMipmapLevelBias == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') + * err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6301 + * global __cuTexRefGetMipmapLevelBias + * cuPythonInit() + * if __cuTexRefGetMipmapLevelBias == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6304 + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') + * err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(float *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias)(__pyx_v_pbias, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6304, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6305 + * raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') + * err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6298 + * return err + * + * cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelBias + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6307 + * return err + * + * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelClamp + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetMipmapLevelClamp", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6309 + * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetMipmapLevelClamp + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetMipmapLevelClamp == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6309, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6310 + * global __cuTexRefGetMipmapLevelClamp + * cuPythonInit() + * if __cuTexRefGetMipmapLevelClamp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6311 + * cuPythonInit() + * if __cuTexRefGetMipmapLevelClamp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') + * err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6312 + * if __cuTexRefGetMipmapLevelClamp == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetMipmapLevelC}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6312, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6312, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6311 + * cuPythonInit() + * if __cuTexRefGetMipmapLevelClamp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') + * err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6310 + * global __cuTexRefGetMipmapLevelClamp + * cuPythonInit() + * if __cuTexRefGetMipmapLevelClamp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6313 + * with gil: + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') + * err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(float *, float *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp)(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6313, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6314 + * raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') + * err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6307 + * return err + * + * cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelClamp + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6316 + * return err + * + * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMaxAnisotropy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetMaxAnisotropy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6318 + * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetMaxAnisotropy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetMaxAnisotropy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6318, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6319 + * global __cuTexRefGetMaxAnisotropy + * cuPythonInit() + * if __cuTexRefGetMaxAnisotropy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6320 + * cuPythonInit() + * if __cuTexRefGetMaxAnisotropy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') + * err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6321 + * if __cuTexRefGetMaxAnisotropy == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetMaxAnisotrop}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6321, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6321, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6320 + * cuPythonInit() + * if __cuTexRefGetMaxAnisotropy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') + * err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6319 + * global __cuTexRefGetMaxAnisotropy + * cuPythonInit() + * if __cuTexRefGetMaxAnisotropy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6322 + * with gil: + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') + * err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy)(__pyx_v_pmaxAniso, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6322, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6323 + * raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') + * err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6316 + * return err + * + * cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetMaxAnisotropy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6325 + * return err + * + * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetBorderColor + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetBorderColor", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6327 + * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetBorderColor + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetBorderColor == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6327, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6328 + * global __cuTexRefGetBorderColor + * cuPythonInit() + * if __cuTexRefGetBorderColor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6329 + * cuPythonInit() + * if __cuTexRefGetBorderColor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') + * err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6330 + * if __cuTexRefGetBorderColor == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetBorderColor}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6330, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6330, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6329 + * cuPythonInit() + * if __cuTexRefGetBorderColor == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') + * err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6328 + * global __cuTexRefGetBorderColor + * cuPythonInit() + * if __cuTexRefGetBorderColor == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6331 + * with gil: + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') + * err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(float *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor)(__pyx_v_pBorderColor, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6331, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6332 + * raise RuntimeError('Function "cuTexRefGetBorderColor" not found') + * err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6325 + * return err + * + * cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetBorderColor + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6334 + * return err + * + * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefGetFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6336 + * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefGetFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefGetFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6336, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6337 + * global __cuTexRefGetFlags + * cuPythonInit() + * if __cuTexRefGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6338 + * cuPythonInit() + * if __cuTexRefGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFlags" not found') + * err = ( __cuTexRefGetFlags)(pFlags, hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6339 + * if __cuTexRefGetFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefGetFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefGetFlags)(pFlags, hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefGetFlags_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6339, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6338 + * cuPythonInit() + * if __cuTexRefGetFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefGetFlags" not found') + * err = ( __cuTexRefGetFlags)(pFlags, hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6337 + * global __cuTexRefGetFlags + * cuPythonInit() + * if __cuTexRefGetFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefGetFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6340 + * with gil: + * raise RuntimeError('Function "cuTexRefGetFlags" not found') + * err = ( __cuTexRefGetFlags)(pFlags, hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *, CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags)(__pyx_v_pFlags, __pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6340, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6341 + * raise RuntimeError('Function "cuTexRefGetFlags" not found') + * err = ( __cuTexRefGetFlags)(pFlags, hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6334 + * return err + * + * cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefGetFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6343 + * return err + * + * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefCreate(CUtexref *__pyx_v_pTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6345 + * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6345, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6346 + * global __cuTexRefCreate + * cuPythonInit() + * if __cuTexRefCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6347 + * cuPythonInit() + * if __cuTexRefCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefCreate" not found') + * err = ( __cuTexRefCreate)(pTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6348 + * if __cuTexRefCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefCreate)(pTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefCreate_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6348, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6348, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6347 + * cuPythonInit() + * if __cuTexRefCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefCreate" not found') + * err = ( __cuTexRefCreate)(pTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6346 + * global __cuTexRefCreate + * cuPythonInit() + * if __cuTexRefCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6349 + * with gil: + * raise RuntimeError('Function "cuTexRefCreate" not found') + * err = ( __cuTexRefCreate)(pTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate)(__pyx_v_pTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6349, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6350 + * raise RuntimeError('Function "cuTexRefCreate" not found') + * err = ( __cuTexRefCreate)(pTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6343 + * return err + * + * cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6352 + * return err + * + * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefDestroy(CUtexref __pyx_v_hTexRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexRefDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6354 + * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexRefDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexRefDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6354, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6355 + * global __cuTexRefDestroy + * cuPythonInit() + * if __cuTexRefDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6356 + * cuPythonInit() + * if __cuTexRefDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefDestroy" not found') + * err = ( __cuTexRefDestroy)(hTexRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6357 + * if __cuTexRefDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuTexRefDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexRefDestroy)(hTexRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexRefDestroy_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6357, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6357, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6356 + * cuPythonInit() + * if __cuTexRefDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexRefDestroy" not found') + * err = ( __cuTexRefDestroy)(hTexRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6355 + * global __cuTexRefDestroy + * cuPythonInit() + * if __cuTexRefDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexRefDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6358 + * with gil: + * raise RuntimeError('Function "cuTexRefDestroy" not found') + * err = ( __cuTexRefDestroy)(hTexRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy)(__pyx_v_hTexRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6358, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6359 + * raise RuntimeError('Function "cuTexRefDestroy" not found') + * err = ( __cuTexRefDestroy)(hTexRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6352 + * return err + * + * cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexRefDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6361 + * return err + * + * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfRefSetArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefSetArray(CUsurfref __pyx_v_hSurfRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSurfRefSetArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6363 + * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSurfRefSetArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSurfRefSetArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6363, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6364 + * global __cuSurfRefSetArray + * cuPythonInit() + * if __cuSurfRefSetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfRefSetArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6365 + * cuPythonInit() + * if __cuSurfRefSetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfRefSetArray" not found') + * err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6366 + * if __cuSurfRefSetArray == NULL: + * with gil: + * raise RuntimeError('Function "cuSurfRefSetArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSurfRefSetArray_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6366, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6366, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6365 + * cuPythonInit() + * if __cuSurfRefSetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfRefSetArray" not found') + * err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6364 + * global __cuSurfRefSetArray + * cuPythonInit() + * if __cuSurfRefSetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfRefSetArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6367 + * with gil: + * raise RuntimeError('Function "cuSurfRefSetArray" not found') + * err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsurfref, CUarray, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray)(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6367, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6368 + * raise RuntimeError('Function "cuSurfRefSetArray" not found') + * err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6361 + * return err + * + * cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfRefSetArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6370 + * return err + * + * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfRefGetArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefGetArray(CUarray *__pyx_v_phArray, CUsurfref __pyx_v_hSurfRef) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSurfRefGetArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6372 + * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSurfRefGetArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSurfRefGetArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6372, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6373 + * global __cuSurfRefGetArray + * cuPythonInit() + * if __cuSurfRefGetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfRefGetArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6374 + * cuPythonInit() + * if __cuSurfRefGetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfRefGetArray" not found') + * err = ( __cuSurfRefGetArray)(phArray, hSurfRef) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6375 + * if __cuSurfRefGetArray == NULL: + * with gil: + * raise RuntimeError('Function "cuSurfRefGetArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuSurfRefGetArray)(phArray, hSurfRef) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSurfRefGetArray_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6375, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6375, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6374 + * cuPythonInit() + * if __cuSurfRefGetArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfRefGetArray" not found') + * err = ( __cuSurfRefGetArray)(phArray, hSurfRef) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6373 + * global __cuSurfRefGetArray + * cuPythonInit() + * if __cuSurfRefGetArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfRefGetArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6376 + * with gil: + * raise RuntimeError('Function "cuSurfRefGetArray" not found') + * err = ( __cuSurfRefGetArray)(phArray, hSurfRef) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUsurfref))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray)(__pyx_v_phArray, __pyx_v_hSurfRef); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6376, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6377 + * raise RuntimeError('Function "cuSurfRefGetArray" not found') + * err = ( __cuSurfRefGetArray)(phArray, hSurfRef) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6370 + * return err + * + * cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfRefGetArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6379 + * return err + * + * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectCreate(CUtexObject *__pyx_v_pTexObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexObjectCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6381 + * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexObjectCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexObjectCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6381, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6382 + * global __cuTexObjectCreate + * cuPythonInit() + * if __cuTexObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6383 + * cuPythonInit() + * if __cuTexObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectCreate" not found') + * err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6384 + * if __cuTexObjectCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuTexObjectCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexObjectCreate_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6384, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6384, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6383 + * cuPythonInit() + * if __cuTexObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectCreate" not found') + * err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6382 + * global __cuTexObjectCreate + * cuPythonInit() + * if __cuTexObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6385 + * with gil: + * raise RuntimeError('Function "cuTexObjectCreate" not found') + * err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate)(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6385, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6386 + * raise RuntimeError('Function "cuTexObjectCreate" not found') + * err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6379 + * return err + * + * cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6388 + * return err + * + * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectDestroy(CUtexObject __pyx_v_texObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexObjectDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6390 + * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexObjectDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexObjectDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6390, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6391 + * global __cuTexObjectDestroy + * cuPythonInit() + * if __cuTexObjectDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6392 + * cuPythonInit() + * if __cuTexObjectDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectDestroy" not found') + * err = ( __cuTexObjectDestroy)(texObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6393 + * if __cuTexObjectDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuTexObjectDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexObjectDestroy)(texObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexObjectDestroy_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6393, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6393, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6392 + * cuPythonInit() + * if __cuTexObjectDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectDestroy" not found') + * err = ( __cuTexObjectDestroy)(texObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6391 + * global __cuTexObjectDestroy + * cuPythonInit() + * if __cuTexObjectDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6394 + * with gil: + * raise RuntimeError('Function "cuTexObjectDestroy" not found') + * err = ( __cuTexObjectDestroy)(texObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtexObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy)(__pyx_v_texObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6394, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6395 + * raise RuntimeError('Function "cuTexObjectDestroy" not found') + * err = ( __cuTexObjectDestroy)(texObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6388 + * return err + * + * cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6397 + * return err + * + * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceDesc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexObjectGetResourceDesc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6399 + * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexObjectGetResourceDesc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexObjectGetResourceDesc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6399, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6400 + * global __cuTexObjectGetResourceDesc + * cuPythonInit() + * if __cuTexObjectGetResourceDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6401 + * cuPythonInit() + * if __cuTexObjectGetResourceDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') + * err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6402 + * if __cuTexObjectGetResourceDesc == NULL: + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexObjectGetResourceD}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6402, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6402, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6401 + * cuPythonInit() + * if __cuTexObjectGetResourceDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') + * err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6400 + * global __cuTexObjectGetResourceDesc + * cuPythonInit() + * if __cuTexObjectGetResourceDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6403 + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') + * err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_RESOURCE_DESC *, CUtexObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6403, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6404 + * raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') + * err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6397 + * return err + * + * cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceDesc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6406 + * return err + * + * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetTextureDesc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexObjectGetTextureDesc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6408 + * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexObjectGetTextureDesc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexObjectGetTextureDesc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6408, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6409 + * global __cuTexObjectGetTextureDesc + * cuPythonInit() + * if __cuTexObjectGetTextureDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6410 + * cuPythonInit() + * if __cuTexObjectGetTextureDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') + * err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6411 + * if __cuTexObjectGetTextureDesc == NULL: + * with gil: + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexObjectGetTextureDe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6411, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6411, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6410 + * cuPythonInit() + * if __cuTexObjectGetTextureDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') + * err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6409 + * global __cuTexObjectGetTextureDesc + * cuPythonInit() + * if __cuTexObjectGetTextureDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6412 + * with gil: + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') + * err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_TEXTURE_DESC *, CUtexObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc)(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6412, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6413 + * raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') + * err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6406 + * return err + * + * cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetTextureDesc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6415 + * return err + * + * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceViewDesc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTexObjectGetResourceViewDesc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6417 + * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTexObjectGetResourceViewDesc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTexObjectGetResourceViewDesc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6417, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6418 + * global __cuTexObjectGetResourceViewDesc + * cuPythonInit() + * if __cuTexObjectGetResourceViewDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6419 + * cuPythonInit() + * if __cuTexObjectGetResourceViewDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') + * err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6420 + * if __cuTexObjectGetResourceViewDesc == NULL: + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') # <<<<<<<<<<<<<< + * err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTexObjectGetResourceV}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6420, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6420, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6419 + * cuPythonInit() + * if __cuTexObjectGetResourceViewDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') + * err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6418 + * global __cuTexObjectGetResourceViewDesc + * cuPythonInit() + * if __cuTexObjectGetResourceViewDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6421 + * with gil: + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') + * err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_RESOURCE_VIEW_DESC *, CUtexObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc)(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6421, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6422 + * raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') + * err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6415 + * return err + * + * cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceViewDesc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6424 + * return err + * + * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectCreate(CUsurfObject *__pyx_v_pSurfObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSurfObjectCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6426 + * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSurfObjectCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSurfObjectCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6426, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6427 + * global __cuSurfObjectCreate + * cuPythonInit() + * if __cuSurfObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6428 + * cuPythonInit() + * if __cuSurfObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectCreate" not found') + * err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6429 + * if __cuSurfObjectCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuSurfObjectCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSurfObjectCreate_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6429, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6429, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6428 + * cuPythonInit() + * if __cuSurfObjectCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectCreate" not found') + * err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6427 + * global __cuSurfObjectCreate + * cuPythonInit() + * if __cuSurfObjectCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6430 + * with gil: + * raise RuntimeError('Function "cuSurfObjectCreate" not found') + * err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsurfObject *, CUDA_RESOURCE_DESC const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate)(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6430, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6431 + * raise RuntimeError('Function "cuSurfObjectCreate" not found') + * err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6424 + * return err + * + * cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6433 + * return err + * + * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectDestroy(CUsurfObject __pyx_v_surfObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSurfObjectDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6435 + * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSurfObjectDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSurfObjectDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6435, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6436 + * global __cuSurfObjectDestroy + * cuPythonInit() + * if __cuSurfObjectDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6437 + * cuPythonInit() + * if __cuSurfObjectDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') + * err = ( __cuSurfObjectDestroy)(surfObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6438 + * if __cuSurfObjectDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuSurfObjectDestroy)(surfObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSurfObjectDestroy_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6438, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6438, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6437 + * cuPythonInit() + * if __cuSurfObjectDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') + * err = ( __cuSurfObjectDestroy)(surfObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6436 + * global __cuSurfObjectDestroy + * cuPythonInit() + * if __cuSurfObjectDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6439 + * with gil: + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') + * err = ( __cuSurfObjectDestroy)(surfObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUsurfObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy)(__pyx_v_surfObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6439, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6440 + * raise RuntimeError('Function "cuSurfObjectDestroy" not found') + * err = ( __cuSurfObjectDestroy)(surfObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6433 + * return err + * + * cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6442 + * return err + * + * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectGetResourceDesc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUsurfObject __pyx_v_surfObject) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuSurfObjectGetResourceDesc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6444 + * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuSurfObjectGetResourceDesc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuSurfObjectGetResourceDesc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6444, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6445 + * global __cuSurfObjectGetResourceDesc + * cuPythonInit() + * if __cuSurfObjectGetResourceDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6446 + * cuPythonInit() + * if __cuSurfObjectGetResourceDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') + * err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6447 + * if __cuSurfObjectGetResourceDesc == NULL: + * with gil: + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') # <<<<<<<<<<<<<< + * err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuSurfObjectGetResource}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6447, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6447, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6446 + * cuPythonInit() + * if __cuSurfObjectGetResourceDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') + * err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6445 + * global __cuSurfObjectGetResourceDesc + * cuPythonInit() + * if __cuSurfObjectGetResourceDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6448 + * with gil: + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') + * err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUDA_RESOURCE_DESC *, CUsurfObject))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc)(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6448, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6449 + * raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') + * err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6442 + * return err + * + * cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuSurfObjectGetResourceDesc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6451 + * return err + * + * cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeTiled + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeTiled(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, cuuint32_t const *__pyx_v_boxDim, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTensorMapEncodeTiled", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6453 + * cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTensorMapEncodeTiled + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTensorMapEncodeTiled == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6453, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6454 + * global __cuTensorMapEncodeTiled + * cuPythonInit() + * if __cuTensorMapEncodeTiled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6455 + * cuPythonInit() + * if __cuTensorMapEncodeTiled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') + * err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6456 + * if __cuTensorMapEncodeTiled == NULL: + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') # <<<<<<<<<<<<<< + * err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTensorMapEncodeTiled}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6456, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6456, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6455 + * cuPythonInit() + * if __cuTensorMapEncodeTiled == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') + * err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6454 + * global __cuTensorMapEncodeTiled + * cuPythonInit() + * if __cuTensorMapEncodeTiled == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6457 + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') + * err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled)(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_boxDim, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6457, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6458 + * raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') + * err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6451 + * return err + * + * cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeTiled + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTensorMapEncodeTiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6460 + * return err + * + * cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2col + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2col(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int const *__pyx_v_pixelBoxLowerCorner, int const *__pyx_v_pixelBoxUpperCorner, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTensorMapEncodeIm2col", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6462 + * cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTensorMapEncodeIm2col + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTensorMapEncodeIm2col == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6462, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6463 + * global __cuTensorMapEncodeIm2col + * cuPythonInit() + * if __cuTensorMapEncodeIm2col == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6464 + * cuPythonInit() + * if __cuTensorMapEncodeIm2col == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') + * err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6465 + * if __cuTensorMapEncodeIm2col == NULL: + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') # <<<<<<<<<<<<<< + * err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTensorMapEncodeIm2col}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6465, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6465, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6464 + * cuPythonInit() + * if __cuTensorMapEncodeIm2col == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') + * err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6463 + * global __cuTensorMapEncodeIm2col + * cuPythonInit() + * if __cuTensorMapEncodeIm2col == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6466 + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') + * err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col)(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCorner, __pyx_v_pixelBoxUpperCorner, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6466, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6467 + * raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') + * err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6460 + * return err + * + * cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2col + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTensorMapEncodeIm2col", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6469 + * return err + * + * cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2colWide + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2colWide(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int __pyx_v_pixelBoxLowerCornerWidth, int __pyx_v_pixelBoxUpperCornerWidth, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapIm2ColWideMode __pyx_v_mode, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTensorMapEncodeIm2colWide", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6471 + * cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTensorMapEncodeIm2colWide + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTensorMapEncodeIm2colWide == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6471, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6472 + * global __cuTensorMapEncodeIm2colWide + * cuPythonInit() + * if __cuTensorMapEncodeIm2colWide == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6473 + * cuPythonInit() + * if __cuTensorMapEncodeIm2colWide == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + * err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6474 + * if __cuTensorMapEncodeIm2colWide == NULL: + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') # <<<<<<<<<<<<<< + * err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTensorMapEncodeIm2col_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6474, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6474, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6473 + * cuPythonInit() + * if __cuTensorMapEncodeIm2colWide == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + * err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6472 + * global __cuTensorMapEncodeIm2colWide + * cuPythonInit() + * if __cuTensorMapEncodeIm2colWide == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6475 + * with gil: + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + * err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int, int, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapIm2ColWideMode, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide)(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCornerWidth, __pyx_v_pixelBoxUpperCornerWidth, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_mode, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6475, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6476 + * raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + * err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6469 + * return err + * + * cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2colWide + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTensorMapEncodeIm2colWide", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6478 + * return err + * + * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapReplaceAddress + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapReplaceAddress(CUtensorMap *__pyx_v_tensorMap, void *__pyx_v_globalAddress) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuTensorMapReplaceAddress", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6480 + * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuTensorMapReplaceAddress + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuTensorMapReplaceAddress == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6480, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6481 + * global __cuTensorMapReplaceAddress + * cuPythonInit() + * if __cuTensorMapReplaceAddress == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6482 + * cuPythonInit() + * if __cuTensorMapReplaceAddress == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') + * err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6483 + * if __cuTensorMapReplaceAddress == NULL: + * with gil: + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') # <<<<<<<<<<<<<< + * err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuTensorMapReplaceAddre}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6483, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6483, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6482 + * cuPythonInit() + * if __cuTensorMapReplaceAddress == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') + * err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6481 + * global __cuTensorMapReplaceAddress + * cuPythonInit() + * if __cuTensorMapReplaceAddress == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6484 + * with gil: + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') + * err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUtensorMap *, void *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress)(__pyx_v_tensorMap, __pyx_v_globalAddress); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6484, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6485 + * raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') + * err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6478 + * return err + * + * cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuTensorMapReplaceAddress + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuTensorMapReplaceAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6487 + * return err + * + * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceCanAccessPeer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, CUdevice __pyx_v_dev, CUdevice __pyx_v_peerDev) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceCanAccessPeer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6489 + * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceCanAccessPeer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceCanAccessPeer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6489, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6490 + * global __cuDeviceCanAccessPeer + * cuPythonInit() + * if __cuDeviceCanAccessPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6491 + * cuPythonInit() + * if __cuDeviceCanAccessPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') + * err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6492 + * if __cuDeviceCanAccessPeer == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceCanAccessPeer_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6492, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6492, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6491 + * cuPythonInit() + * if __cuDeviceCanAccessPeer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') + * err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6490 + * global __cuDeviceCanAccessPeer + * cuPythonInit() + * if __cuDeviceCanAccessPeer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6493 + * with gil: + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') + * err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUdevice, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer)(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6493, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6494 + * raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') + * err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6487 + * return err + * + * cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceCanAccessPeer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6496 + * return err + * + * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxEnablePeerAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxEnablePeerAccess(CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxEnablePeerAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6498 + * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxEnablePeerAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxEnablePeerAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6498, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6499 + * global __cuCtxEnablePeerAccess + * cuPythonInit() + * if __cuCtxEnablePeerAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6500 + * cuPythonInit() + * if __cuCtxEnablePeerAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') + * err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6501 + * if __cuCtxEnablePeerAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxEnablePeerAccess_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6501, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6501, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6500 + * cuPythonInit() + * if __cuCtxEnablePeerAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') + * err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6499 + * global __cuCtxEnablePeerAccess + * cuPythonInit() + * if __cuCtxEnablePeerAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6502 + * with gil: + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') + * err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess)(__pyx_v_peerContext, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6502, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6503 + * raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') + * err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6496 + * return err + * + * cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxEnablePeerAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6505 + * return err + * + * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDisablePeerAccess + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDisablePeerAccess(CUcontext __pyx_v_peerContext) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxDisablePeerAccess", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6507 + * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxDisablePeerAccess + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxDisablePeerAccess == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6507, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6508 + * global __cuCtxDisablePeerAccess + * cuPythonInit() + * if __cuCtxDisablePeerAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6509 + * cuPythonInit() + * if __cuCtxDisablePeerAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') + * err = ( __cuCtxDisablePeerAccess)(peerContext) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6510 + * if __cuCtxDisablePeerAccess == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxDisablePeerAccess)(peerContext) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxDisablePeerAccess}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6510, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6510, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6509 + * cuPythonInit() + * if __cuCtxDisablePeerAccess == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') + * err = ( __cuCtxDisablePeerAccess)(peerContext) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6508 + * global __cuCtxDisablePeerAccess + * cuPythonInit() + * if __cuCtxDisablePeerAccess == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6511 + * with gil: + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') + * err = ( __cuCtxDisablePeerAccess)(peerContext) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess)(__pyx_v_peerContext); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6511, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6512 + * raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') + * err = ( __cuCtxDisablePeerAccess)(peerContext) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6505 + * return err + * + * cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxDisablePeerAccess + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6514 + * return err + * + * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetP2PAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetP2PAttribute(int *__pyx_v_value, CUdevice_P2PAttribute __pyx_v_attrib, CUdevice __pyx_v_srcDevice, CUdevice __pyx_v_dstDevice) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetP2PAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6516 + * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetP2PAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetP2PAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6516, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6517 + * global __cuDeviceGetP2PAttribute + * cuPythonInit() + * if __cuDeviceGetP2PAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6518 + * cuPythonInit() + * if __cuDeviceGetP2PAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') + * err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6519 + * if __cuDeviceGetP2PAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetP2PAttribute}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6519, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6519, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6518 + * cuPythonInit() + * if __cuDeviceGetP2PAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') + * err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6517 + * global __cuDeviceGetP2PAttribute + * cuPythonInit() + * if __cuDeviceGetP2PAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6520 + * with gil: + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') + * err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int *, CUdevice_P2PAttribute, CUdevice, CUdevice))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute)(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6520, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6521 + * raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') + * err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6514 + * return err + * + * cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetP2PAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6523 + * return err + * + * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsUnregisterResource + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnregisterResource(CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsUnregisterResource", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6525 + * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsUnregisterResource + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsUnregisterResource == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6525, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6526 + * global __cuGraphicsUnregisterResource + * cuPythonInit() + * if __cuGraphicsUnregisterResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6527 + * cuPythonInit() + * if __cuGraphicsUnregisterResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') + * err = ( __cuGraphicsUnregisterResource)(resource) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6528 + * if __cuGraphicsUnregisterResource == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsUnregisterResource)(resource) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsUnregisterRes}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6528, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6528, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6527 + * cuPythonInit() + * if __cuGraphicsUnregisterResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') + * err = ( __cuGraphicsUnregisterResource)(resource) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6526 + * global __cuGraphicsUnregisterResource + * cuPythonInit() + * if __cuGraphicsUnregisterResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6529 + * with gil: + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') + * err = ( __cuGraphicsUnregisterResource)(resource) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource)(__pyx_v_resource); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6529, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6530 + * raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') + * err = ( __cuGraphicsUnregisterResource)(resource) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6523 + * return err + * + * cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsUnregisterResource + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6532 + * return err + * + * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsSubResourceGetMappedArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsSubResourceGetMappedArray(CUarray *__pyx_v_pArray, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsSubResourceGetMappedArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6534 + * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsSubResourceGetMappedArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsSubResourceGetMappedArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6534, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6535 + * global __cuGraphicsSubResourceGetMappedArray + * cuPythonInit() + * if __cuGraphicsSubResourceGetMappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6536 + * cuPythonInit() + * if __cuGraphicsSubResourceGetMappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') + * err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6537 + * if __cuGraphicsSubResourceGetMappedArray == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsSubResourceGe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6537, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6537, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6536 + * cuPythonInit() + * if __cuGraphicsSubResourceGetMappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') + * err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6535 + * global __cuGraphicsSubResourceGetMappedArray + * cuPythonInit() + * if __cuGraphicsSubResourceGetMappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6538 + * with gil: + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') + * err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUarray *, CUgraphicsResource, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray)(__pyx_v_pArray, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6538, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6539 + * raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') + * err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6532 + * return err + * + * cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsSubResourceGetMappedArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6541 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedMipmappedArray + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_pMipmappedArray, CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedMipmappedArray", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6543 + * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsResourceGetMappedMipmappedArray + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6543, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6544 + * global __cuGraphicsResourceGetMappedMipmappedArray + * cuPythonInit() + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6545 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') + * err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6546 + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsResourceGetMa}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6546, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6546, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6545 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') + * err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6544 + * global __cuGraphicsResourceGetMappedMipmappedArray + * cuPythonInit() + * if __cuGraphicsResourceGetMappedMipmappedArray == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6547 + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') + * err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUmipmappedArray *, CUgraphicsResource))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray)(__pyx_v_pMipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6547, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6548 + * raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') + * err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6541 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedMipmappedArray + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6550 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedPointer_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedPointer_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6552 + * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsResourceGetMappedPointer_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6552, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6553 + * global __cuGraphicsResourceGetMappedPointer_v2 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6554 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') + * err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6555 + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsResourceGetMa_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6555, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6555, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6554 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') + * err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6553 + * global __cuGraphicsResourceGetMappedPointer_v2 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedPointer_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6556 + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') + * err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdeviceptr *, size_t *, CUgraphicsResource))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2)(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6556, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6557 + * raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') + * err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6550 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedPointer_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsResourceGetMappedPointer_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6559 + * return err + * + * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceSetMapFlags_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsResourceSetMapFlags_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6561 + * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsResourceSetMapFlags_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6561, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6562 + * global __cuGraphicsResourceSetMapFlags_v2 + * cuPythonInit() + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6563 + * cuPythonInit() + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') + * err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6564 + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsResourceSetMa}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6564, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6564, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6563 + * cuPythonInit() + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') + * err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6562 + * global __cuGraphicsResourceSetMapFlags_v2 + * cuPythonInit() + * if __cuGraphicsResourceSetMapFlags_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6565 + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') + * err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2)(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6565, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6566 + * raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') + * err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6559 + * return err + * + * cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceSetMapFlags_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsResourceSetMapFlags_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6568 + * return err + * + * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsMapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsMapResources", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6570 + * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsMapResources + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsMapResources == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6570, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6571 + * global __cuGraphicsMapResources + * cuPythonInit() + * if __cuGraphicsMapResources == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsMapResources" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6572 + * cuPythonInit() + * if __cuGraphicsMapResources == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsMapResources" not found') + * err = ( __cuGraphicsMapResources)(count, resources, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6573 + * if __cuGraphicsMapResources == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsMapResources" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsMapResources)(count, resources, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsMapResources}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6573, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6573, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6572 + * cuPythonInit() + * if __cuGraphicsMapResources == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsMapResources" not found') + * err = ( __cuGraphicsMapResources)(count, resources, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6571 + * global __cuGraphicsMapResources + * cuPythonInit() + * if __cuGraphicsMapResources == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsMapResources" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6574 + * with gil: + * raise RuntimeError('Function "cuGraphicsMapResources" not found') + * err = ( __cuGraphicsMapResources)(count, resources, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int, CUgraphicsResource *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6574, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6575 + * raise RuntimeError('Function "cuGraphicsMapResources" not found') + * err = ( __cuGraphicsMapResources)(count, resources, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6568 + * return err + * + * cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6577 + * return err + * + * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnmapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsUnmapResources", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6579 + * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsUnmapResources + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsUnmapResources == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6579, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6580 + * global __cuGraphicsUnmapResources + * cuPythonInit() + * if __cuGraphicsUnmapResources == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6581 + * cuPythonInit() + * if __cuGraphicsUnmapResources == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') + * err = ( __cuGraphicsUnmapResources)(count, resources, hStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6582 + * if __cuGraphicsUnmapResources == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsUnmapResources)(count, resources, hStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsUnmapResource}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6582, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6582, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6581 + * cuPythonInit() + * if __cuGraphicsUnmapResources == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') + * err = ( __cuGraphicsUnmapResources)(count, resources, hStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6580 + * global __cuGraphicsUnmapResources + * cuPythonInit() + * if __cuGraphicsUnmapResources == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6583 + * with gil: + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') + * err = ( __cuGraphicsUnmapResources)(count, resources, hStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int, CUgraphicsResource *, CUstream))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources)(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6583, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6584 + * raise RuntimeError('Function "cuGraphicsUnmapResources" not found') + * err = ( __cuGraphicsUnmapResources)(count, resources, hStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6577 + * return err + * + * cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6586 + * return err + * + * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetProcAddress_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetProcAddress_v2(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, cuuint64_t __pyx_v_flags, CUdriverProcAddressQueryResult *__pyx_v_symbolStatus) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGetProcAddress_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6588 + * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGetProcAddress_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGetProcAddress_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6588, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6589 + * global __cuGetProcAddress_v2 + * cuPythonInit() + * if __cuGetProcAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6590 + * cuPythonInit() + * if __cuGetProcAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') + * err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6591 + * if __cuGetProcAddress_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGetProcAddress_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6591, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6591, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6590 + * cuPythonInit() + * if __cuGetProcAddress_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') + * err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6589 + * global __cuGetProcAddress_v2 + * cuPythonInit() + * if __cuGetProcAddress_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6592 + * with gil: + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') + * err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2)(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_symbolStatus); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6592, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6593 + * raise RuntimeError('Function "cuGetProcAddress_v2" not found') + * err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6586 + * return err + * + * cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetProcAddress_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGetProcAddress_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6595 + * return err + * + * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCoredumpGetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6597 + * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCoredumpGetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCoredumpGetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6597, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6598 + * global __cuCoredumpGetAttribute + * cuPythonInit() + * if __cuCoredumpGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6599 + * cuPythonInit() + * if __cuCoredumpGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') + * err = ( __cuCoredumpGetAttribute)(attrib, value, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6600 + * if __cuCoredumpGetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuCoredumpGetAttribute)(attrib, value, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCoredumpGetAttribute}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6600, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6600, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6599 + * cuPythonInit() + * if __cuCoredumpGetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') + * err = ( __cuCoredumpGetAttribute)(attrib, value, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6598 + * global __cuCoredumpGetAttribute + * cuPythonInit() + * if __cuCoredumpGetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6601 + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') + * err = ( __cuCoredumpGetAttribute)(attrib, value, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6601, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6602 + * raise RuntimeError('Function "cuCoredumpGetAttribute" not found') + * err = ( __cuCoredumpGetAttribute)(attrib, value, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6595 + * return err + * + * cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCoredumpGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6604 + * return err + * + * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttributeGlobal + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCoredumpGetAttributeGlobal", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6606 + * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCoredumpGetAttributeGlobal + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCoredumpGetAttributeGlobal == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6606, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6607 + * global __cuCoredumpGetAttributeGlobal + * cuPythonInit() + * if __cuCoredumpGetAttributeGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6608 + * cuPythonInit() + * if __cuCoredumpGetAttributeGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') + * err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6609 + * if __cuCoredumpGetAttributeGlobal == NULL: + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') # <<<<<<<<<<<<<< + * err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCoredumpGetAttributeG}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6609, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6609, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6608 + * cuPythonInit() + * if __cuCoredumpGetAttributeGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') + * err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6607 + * global __cuCoredumpGetAttributeGlobal + * cuPythonInit() + * if __cuCoredumpGetAttributeGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6610 + * with gil: + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') + * err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6610, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6611 + * raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') + * err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6604 + * return err + * + * cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttributeGlobal + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCoredumpGetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6613 + * return err + * + * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttribute + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCoredumpSetAttribute", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6615 + * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCoredumpSetAttribute + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCoredumpSetAttribute == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6615, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6616 + * global __cuCoredumpSetAttribute + * cuPythonInit() + * if __cuCoredumpSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6617 + * cuPythonInit() + * if __cuCoredumpSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') + * err = ( __cuCoredumpSetAttribute)(attrib, value, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6618 + * if __cuCoredumpSetAttribute == NULL: + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') # <<<<<<<<<<<<<< + * err = ( __cuCoredumpSetAttribute)(attrib, value, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCoredumpSetAttribute}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6618, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6618, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6617 + * cuPythonInit() + * if __cuCoredumpSetAttribute == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') + * err = ( __cuCoredumpSetAttribute)(attrib, value, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6616 + * global __cuCoredumpSetAttribute + * cuPythonInit() + * if __cuCoredumpSetAttribute == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6619 + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') + * err = ( __cuCoredumpSetAttribute)(attrib, value, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6619, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6620 + * raise RuntimeError('Function "cuCoredumpSetAttribute" not found') + * err = ( __cuCoredumpSetAttribute)(attrib, value, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6613 + * return err + * + * cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttribute + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCoredumpSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6622 + * return err + * + * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttributeGlobal + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCoredumpSetAttributeGlobal", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6624 + * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCoredumpSetAttributeGlobal + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCoredumpSetAttributeGlobal == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6624, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6625 + * global __cuCoredumpSetAttributeGlobal + * cuPythonInit() + * if __cuCoredumpSetAttributeGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6626 + * cuPythonInit() + * if __cuCoredumpSetAttributeGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') + * err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6627 + * if __cuCoredumpSetAttributeGlobal == NULL: + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') # <<<<<<<<<<<<<< + * err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCoredumpSetAttributeG}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6627, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6627, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6626 + * cuPythonInit() + * if __cuCoredumpSetAttributeGlobal == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') + * err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6625 + * global __cuCoredumpSetAttributeGlobal + * cuPythonInit() + * if __cuCoredumpSetAttributeGlobal == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6628 + * with gil: + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') + * err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcoredumpSettings, void *, size_t *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal)(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6628, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6629 + * raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') + * err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6622 + * return err + * + * cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttributeGlobal + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCoredumpSetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6631 + * return err + * + * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetExportTable + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetExportTable(void const **__pyx_v_ppExportTable, CUuuid const *__pyx_v_pExportTableId) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGetExportTable", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6633 + * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGetExportTable + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGetExportTable == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6633, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6634 + * global __cuGetExportTable + * cuPythonInit() + * if __cuGetExportTable == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetExportTable" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6635 + * cuPythonInit() + * if __cuGetExportTable == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetExportTable" not found') + * err = ( __cuGetExportTable)(ppExportTable, pExportTableId) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6636 + * if __cuGetExportTable == NULL: + * with gil: + * raise RuntimeError('Function "cuGetExportTable" not found') # <<<<<<<<<<<<<< + * err = ( __cuGetExportTable)(ppExportTable, pExportTableId) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGetExportTable_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6636, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6636, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6635 + * cuPythonInit() + * if __cuGetExportTable == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGetExportTable" not found') + * err = ( __cuGetExportTable)(ppExportTable, pExportTableId) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6634 + * global __cuGetExportTable + * cuPythonInit() + * if __cuGetExportTable == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGetExportTable" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6637 + * with gil: + * raise RuntimeError('Function "cuGetExportTable" not found') + * err = ( __cuGetExportTable)(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void const **, CUuuid const *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable)(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6637, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6638 + * raise RuntimeError('Function "cuGetExportTable" not found') + * err = ( __cuGetExportTable)(ppExportTable, pExportTableId) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6631 + * return err + * + * cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGetExportTable + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6640 + * return err + * + * cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxCreate(CUgreenCtx *__pyx_v_phCtx, CUdevResourceDesc __pyx_v_desc, CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6642 + * cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6642, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6643 + * global __cuGreenCtxCreate + * cuPythonInit() + * if __cuGreenCtxCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6644 + * cuPythonInit() + * if __cuGreenCtxCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxCreate" not found') + * err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6645 + * if __cuGreenCtxCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxCreate_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6645, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6645, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6644 + * cuPythonInit() + * if __cuGreenCtxCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxCreate" not found') + * err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6643 + * global __cuGreenCtxCreate + * cuPythonInit() + * if __cuGreenCtxCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6646 + * with gil: + * raise RuntimeError('Function "cuGreenCtxCreate" not found') + * err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate)(__pyx_v_phCtx, __pyx_v_desc, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6646, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6647 + * raise RuntimeError('Function "cuGreenCtxCreate" not found') + * err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6640 + * return err + * + * cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6649 + * return err + * + * cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxDestroy + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxDestroy(CUgreenCtx __pyx_v_hCtx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxDestroy", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6651 + * cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxDestroy + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6651, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6652 + * global __cuGreenCtxDestroy + * cuPythonInit() + * if __cuGreenCtxDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6653 + * cuPythonInit() + * if __cuGreenCtxDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') + * err = ( __cuGreenCtxDestroy)(hCtx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6654 + * if __cuGreenCtxDestroy == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxDestroy)(hCtx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxDestroy_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6654, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6654, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6653 + * cuPythonInit() + * if __cuGreenCtxDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') + * err = ( __cuGreenCtxDestroy)(hCtx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6652 + * global __cuGreenCtxDestroy + * cuPythonInit() + * if __cuGreenCtxDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6655 + * with gil: + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') + * err = ( __cuGreenCtxDestroy)(hCtx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgreenCtx))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy)(__pyx_v_hCtx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6655, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6656 + * raise RuntimeError('Function "cuGreenCtxDestroy" not found') + * err = ( __cuGreenCtxDestroy)(hCtx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6649 + * return err + * + * cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxDestroy + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6658 + * return err + * + * cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxFromGreenCtx + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxFromGreenCtx(CUcontext *__pyx_v_pContext, CUgreenCtx __pyx_v_hCtx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxFromGreenCtx", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6660 + * cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxFromGreenCtx + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxFromGreenCtx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6660, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6661 + * global __cuCtxFromGreenCtx + * cuPythonInit() + * if __cuCtxFromGreenCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6662 + * cuPythonInit() + * if __cuCtxFromGreenCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') + * err = ( __cuCtxFromGreenCtx)(pContext, hCtx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6663 + * if __cuCtxFromGreenCtx == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxFromGreenCtx)(pContext, hCtx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxFromGreenCtx_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6663, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6663, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6662 + * cuPythonInit() + * if __cuCtxFromGreenCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') + * err = ( __cuCtxFromGreenCtx)(pContext, hCtx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6661 + * global __cuCtxFromGreenCtx + * cuPythonInit() + * if __cuCtxFromGreenCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6664 + * with gil: + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') + * err = ( __cuCtxFromGreenCtx)(pContext, hCtx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, CUgreenCtx))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx)(__pyx_v_pContext, __pyx_v_hCtx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6664, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6665 + * raise RuntimeError('Function "cuCtxFromGreenCtx" not found') + * err = ( __cuCtxFromGreenCtx)(pContext, hCtx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6658 + * return err + * + * cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxFromGreenCtx + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxFromGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6667 + * return err + * + * cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetDevResource + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDevResource(CUdevice __pyx_v_device, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDeviceGetDevResource", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6669 + * cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDeviceGetDevResource + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDeviceGetDevResource == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6669, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6670 + * global __cuDeviceGetDevResource + * cuPythonInit() + * if __cuDeviceGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6671 + * cuPythonInit() + * if __cuDeviceGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') + * err = ( __cuDeviceGetDevResource)(device, resource, typename) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6672 + * if __cuDeviceGetDevResource == NULL: + * with gil: + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') # <<<<<<<<<<<<<< + * err = ( __cuDeviceGetDevResource)(device, resource, typename) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDeviceGetDevResource}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6672, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6672, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6671 + * cuPythonInit() + * if __cuDeviceGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') + * err = ( __cuDeviceGetDevResource)(device, resource, typename) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6670 + * global __cuDeviceGetDevResource + * cuPythonInit() + * if __cuDeviceGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6673 + * with gil: + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') + * err = ( __cuDeviceGetDevResource)(device, resource, typename) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice, CUdevResource *, CUdevResourceType))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource)(__pyx_v_device, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6673, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6674 + * raise RuntimeError('Function "cuDeviceGetDevResource" not found') + * err = ( __cuDeviceGetDevResource)(device, resource, typename) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6667 + * return err + * + * cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDeviceGetDevResource + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDeviceGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6676 + * return err + * + * cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetDevResource + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevResource(CUcontext __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCtxGetDevResource", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6678 + * cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCtxGetDevResource + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCtxGetDevResource == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6678, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6679 + * global __cuCtxGetDevResource + * cuPythonInit() + * if __cuCtxGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetDevResource" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6680 + * cuPythonInit() + * if __cuCtxGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetDevResource" not found') + * err = ( __cuCtxGetDevResource)(hCtx, resource, typename) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6681 + * if __cuCtxGetDevResource == NULL: + * with gil: + * raise RuntimeError('Function "cuCtxGetDevResource" not found') # <<<<<<<<<<<<<< + * err = ( __cuCtxGetDevResource)(hCtx, resource, typename) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCtxGetDevResource_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6681, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6681, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6680 + * cuPythonInit() + * if __cuCtxGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCtxGetDevResource" not found') + * err = ( __cuCtxGetDevResource)(hCtx, resource, typename) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6679 + * global __cuCtxGetDevResource + * cuPythonInit() + * if __cuCtxGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCtxGetDevResource" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6682 + * with gil: + * raise RuntimeError('Function "cuCtxGetDevResource" not found') + * err = ( __cuCtxGetDevResource)(hCtx, resource, typename) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext, CUdevResource *, CUdevResourceType))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource)(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6682, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6683 + * raise RuntimeError('Function "cuCtxGetDevResource" not found') + * err = ( __cuCtxGetDevResource)(hCtx, resource, typename) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6676 + * return err + * + * cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCtxGetDevResource + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6685 + * return err + * + * cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxGetDevResource + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxGetDevResource(CUgreenCtx __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxGetDevResource", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6687 + * cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxGetDevResource + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxGetDevResource == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6687, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6688 + * global __cuGreenCtxGetDevResource + * cuPythonInit() + * if __cuGreenCtxGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6689 + * cuPythonInit() + * if __cuGreenCtxGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') + * err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6690 + * if __cuGreenCtxGetDevResource == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxGetDevResourc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6690, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6690, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6689 + * cuPythonInit() + * if __cuGreenCtxGetDevResource == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') + * err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6688 + * global __cuGreenCtxGetDevResource + * cuPythonInit() + * if __cuGreenCtxGetDevResource == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6691 + * with gil: + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') + * err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgreenCtx, CUdevResource *, CUdevResourceType))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource)(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6691, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6692 + * raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') + * err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6685 + * return err + * + * cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxGetDevResource + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6694 + * return err + * + * cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevSmResourceSplitByCount + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevSmResourceSplitByCount(CUdevResource *__pyx_v_result, unsigned int *__pyx_v_nbGroups, CUdevResource const *__pyx_v_input, CUdevResource *__pyx_v_remaining, unsigned int __pyx_v_useFlags, unsigned int __pyx_v_minCount) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevSmResourceSplitByCount", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6696 + * cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevSmResourceSplitByCount + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevSmResourceSplitByCount == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6696, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6697 + * global __cuDevSmResourceSplitByCount + * cuPythonInit() + * if __cuDevSmResourceSplitByCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6698 + * cuPythonInit() + * if __cuDevSmResourceSplitByCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') + * err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6699 + * if __cuDevSmResourceSplitByCount == NULL: + * with gil: + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevSmResourceSplitByC}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6699, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6699, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6698 + * cuPythonInit() + * if __cuDevSmResourceSplitByCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') + * err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6697 + * global __cuDevSmResourceSplitByCount + * cuPythonInit() + * if __cuDevSmResourceSplitByCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6700 + * with gil: + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') + * err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount)(__pyx_v_result, __pyx_v_nbGroups, __pyx_v_input, __pyx_v_remaining, __pyx_v_useFlags, __pyx_v_minCount); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6700, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6701 + * raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') + * err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6694 + * return err + * + * cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevSmResourceSplitByCount + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevSmResourceSplitByCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6703 + * return err + * + * cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevResourceGenerateDesc + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevResourceGenerateDesc(CUdevResourceDesc *__pyx_v_phDesc, CUdevResource *__pyx_v_resources, unsigned int __pyx_v_nbResources) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuDevResourceGenerateDesc", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6705 + * cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuDevResourceGenerateDesc + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuDevResourceGenerateDesc == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6705, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6706 + * global __cuDevResourceGenerateDesc + * cuPythonInit() + * if __cuDevResourceGenerateDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6707 + * cuPythonInit() + * if __cuDevResourceGenerateDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') + * err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6708 + * if __cuDevResourceGenerateDesc == NULL: + * with gil: + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') # <<<<<<<<<<<<<< + * err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuDevResourceGenerateDe}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6708, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6708, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6707 + * cuPythonInit() + * if __cuDevResourceGenerateDesc == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') + * err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6706 + * global __cuDevResourceGenerateDesc + * cuPythonInit() + * if __cuDevResourceGenerateDesc == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6709 + * with gil: + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') + * err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevResourceDesc *, CUdevResource *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc)(__pyx_v_phDesc, __pyx_v_resources, __pyx_v_nbResources); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6709, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6710 + * raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') + * err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6703 + * return err + * + * cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuDevResourceGenerateDesc + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuDevResourceGenerateDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6712 + * return err + * + * cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxRecordEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxRecordEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxRecordEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6714 + * cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxRecordEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxRecordEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6714, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6715 + * global __cuGreenCtxRecordEvent + * cuPythonInit() + * if __cuGreenCtxRecordEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6716 + * cuPythonInit() + * if __cuGreenCtxRecordEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') + * err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6717 + * if __cuGreenCtxRecordEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxRecordEvent_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6717, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6717, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6716 + * cuPythonInit() + * if __cuGreenCtxRecordEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') + * err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6715 + * global __cuGreenCtxRecordEvent + * cuPythonInit() + * if __cuGreenCtxRecordEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6718 + * with gil: + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') + * err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgreenCtx, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent)(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6718, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6719 + * raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') + * err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6712 + * return err + * + * cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxRecordEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxRecordEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6721 + * return err + * + * cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxWaitEvent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxWaitEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxWaitEvent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6723 + * cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxWaitEvent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxWaitEvent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6723, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6724 + * global __cuGreenCtxWaitEvent + * cuPythonInit() + * if __cuGreenCtxWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6725 + * cuPythonInit() + * if __cuGreenCtxWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') + * err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6726 + * if __cuGreenCtxWaitEvent == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxWaitEvent_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6726, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6726, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6725 + * cuPythonInit() + * if __cuGreenCtxWaitEvent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') + * err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6724 + * global __cuGreenCtxWaitEvent + * cuPythonInit() + * if __cuGreenCtxWaitEvent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6727 + * with gil: + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') + * err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgreenCtx, CUevent))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent)(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6727, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6728 + * raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') + * err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6721 + * return err + * + * cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxWaitEvent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6730 + * return err + * + * cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetGreenCtx + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetGreenCtx(CUstream __pyx_v_hStream, CUgreenCtx *__pyx_v_phCtx) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuStreamGetGreenCtx", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6732 + * cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuStreamGetGreenCtx + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuStreamGetGreenCtx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6732, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6733 + * global __cuStreamGetGreenCtx + * cuPythonInit() + * if __cuStreamGetGreenCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6734 + * cuPythonInit() + * if __cuStreamGetGreenCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') + * err = ( __cuStreamGetGreenCtx)(hStream, phCtx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6735 + * if __cuStreamGetGreenCtx == NULL: + * with gil: + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') # <<<<<<<<<<<<<< + * err = ( __cuStreamGetGreenCtx)(hStream, phCtx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuStreamGetGreenCtx_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6735, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6735, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6734 + * cuPythonInit() + * if __cuStreamGetGreenCtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') + * err = ( __cuStreamGetGreenCtx)(hStream, phCtx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6733 + * global __cuStreamGetGreenCtx + * cuPythonInit() + * if __cuStreamGetGreenCtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6736 + * with gil: + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') + * err = ( __cuStreamGetGreenCtx)(hStream, phCtx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream, CUgreenCtx *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx)(__pyx_v_hStream, __pyx_v_phCtx); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6736, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6737 + * raise RuntimeError('Function "cuStreamGetGreenCtx" not found') + * err = ( __cuStreamGetGreenCtx)(hStream, phCtx) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6730 + * return err + * + * cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuStreamGetGreenCtx + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuStreamGetGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6739 + * return err + * + * cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxStreamCreate + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxStreamCreate(CUstream *__pyx_v_phStream, CUgreenCtx __pyx_v_greenCtx, unsigned int __pyx_v_flags, int __pyx_v_priority) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGreenCtxStreamCreate", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6741 + * cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGreenCtxStreamCreate + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGreenCtxStreamCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6741, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6742 + * global __cuGreenCtxStreamCreate + * cuPythonInit() + * if __cuGreenCtxStreamCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6743 + * cuPythonInit() + * if __cuGreenCtxStreamCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') + * err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6744 + * if __cuGreenCtxStreamCreate == NULL: + * with gil: + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') # <<<<<<<<<<<<<< + * err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGreenCtxStreamCreate}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6744, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6744, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6743 + * cuPythonInit() + * if __cuGreenCtxStreamCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') + * err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6742 + * global __cuGreenCtxStreamCreate + * cuPythonInit() + * if __cuGreenCtxStreamCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6745 + * with gil: + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') + * err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUstream *, CUgreenCtx, unsigned int, int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate)(__pyx_v_phStream, __pyx_v_greenCtx, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6745, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6746 + * raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') + * err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6739 + * return err + * + * cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGreenCtxStreamCreate + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGreenCtxStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6748 + * return err + * + * cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsRegisterCallback + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsRegisterCallback(CUlogsCallback __pyx_v_callbackFunc, void *__pyx_v_userData, CUlogsCallbackHandle *__pyx_v_callback_out) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLogsRegisterCallback", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6750 + * cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLogsRegisterCallback + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLogsRegisterCallback == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6750, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6751 + * global __cuLogsRegisterCallback + * cuPythonInit() + * if __cuLogsRegisterCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6752 + * cuPythonInit() + * if __cuLogsRegisterCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') + * err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6753 + * if __cuLogsRegisterCallback == NULL: + * with gil: + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') # <<<<<<<<<<<<<< + * err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLogsRegisterCallback}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6753, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6753, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6752 + * cuPythonInit() + * if __cuLogsRegisterCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') + * err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6751 + * global __cuLogsRegisterCallback + * cuPythonInit() + * if __cuLogsRegisterCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6754 + * with gil: + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') + * err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlogsCallback, void *, CUlogsCallbackHandle *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback)(__pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback_out); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6754, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6755 + * raise RuntimeError('Function "cuLogsRegisterCallback" not found') + * err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6748 + * return err + * + * cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsRegisterCallback + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLogsRegisterCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6757 + * return err + * + * cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsUnregisterCallback + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsUnregisterCallback(CUlogsCallbackHandle __pyx_v_callback) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLogsUnregisterCallback", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6759 + * cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLogsUnregisterCallback + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLogsUnregisterCallback == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6759, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6760 + * global __cuLogsUnregisterCallback + * cuPythonInit() + * if __cuLogsUnregisterCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6761 + * cuPythonInit() + * if __cuLogsUnregisterCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') + * err = ( __cuLogsUnregisterCallback)(callback) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6762 + * if __cuLogsUnregisterCallback == NULL: + * with gil: + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') # <<<<<<<<<<<<<< + * err = ( __cuLogsUnregisterCallback)(callback) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLogsUnregisterCallbac}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6762, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6762, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6761 + * cuPythonInit() + * if __cuLogsUnregisterCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') + * err = ( __cuLogsUnregisterCallback)(callback) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6760 + * global __cuLogsUnregisterCallback + * cuPythonInit() + * if __cuLogsUnregisterCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6763 + * with gil: + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') + * err = ( __cuLogsUnregisterCallback)(callback) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlogsCallbackHandle))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback)(__pyx_v_callback); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6763, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6764 + * raise RuntimeError('Function "cuLogsUnregisterCallback" not found') + * err = ( __cuLogsUnregisterCallback)(callback) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6757 + * return err + * + * cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsUnregisterCallback + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLogsUnregisterCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6766 + * return err + * + * cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsCurrent + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsCurrent(CUlogIterator *__pyx_v_iterator_out, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLogsCurrent", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6768 + * cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLogsCurrent + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLogsCurrent == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6768, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6769 + * global __cuLogsCurrent + * cuPythonInit() + * if __cuLogsCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsCurrent" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6770 + * cuPythonInit() + * if __cuLogsCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsCurrent" not found') + * err = ( __cuLogsCurrent)(iterator_out, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6771 + * if __cuLogsCurrent == NULL: + * with gil: + * raise RuntimeError('Function "cuLogsCurrent" not found') # <<<<<<<<<<<<<< + * err = ( __cuLogsCurrent)(iterator_out, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLogsCurrent_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6771, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6771, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6770 + * cuPythonInit() + * if __cuLogsCurrent == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsCurrent" not found') + * err = ( __cuLogsCurrent)(iterator_out, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6769 + * global __cuLogsCurrent + * cuPythonInit() + * if __cuLogsCurrent == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsCurrent" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6772 + * with gil: + * raise RuntimeError('Function "cuLogsCurrent" not found') + * err = ( __cuLogsCurrent)(iterator_out, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlogIterator *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent)(__pyx_v_iterator_out, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6772, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6773 + * raise RuntimeError('Function "cuLogsCurrent" not found') + * err = ( __cuLogsCurrent)(iterator_out, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6766 + * return err + * + * cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsCurrent + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLogsCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6775 + * return err + * + * cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsDumpToFile + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToFile(CUlogIterator *__pyx_v_iterator, char const *__pyx_v_pathToFile, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLogsDumpToFile", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6777 + * cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLogsDumpToFile + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLogsDumpToFile == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6777, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6778 + * global __cuLogsDumpToFile + * cuPythonInit() + * if __cuLogsDumpToFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsDumpToFile" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6779 + * cuPythonInit() + * if __cuLogsDumpToFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsDumpToFile" not found') + * err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6780 + * if __cuLogsDumpToFile == NULL: + * with gil: + * raise RuntimeError('Function "cuLogsDumpToFile" not found') # <<<<<<<<<<<<<< + * err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLogsDumpToFile_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6780, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6780, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6779 + * cuPythonInit() + * if __cuLogsDumpToFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsDumpToFile" not found') + * err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6778 + * global __cuLogsDumpToFile + * cuPythonInit() + * if __cuLogsDumpToFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsDumpToFile" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6781 + * with gil: + * raise RuntimeError('Function "cuLogsDumpToFile" not found') + * err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlogIterator *, char const *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile)(__pyx_v_iterator, __pyx_v_pathToFile, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6781, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6782 + * raise RuntimeError('Function "cuLogsDumpToFile" not found') + * err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6775 + * return err + * + * cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsDumpToFile + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLogsDumpToFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6784 + * return err + * + * cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsDumpToMemory + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToMemory(CUlogIterator *__pyx_v_iterator, char *__pyx_v_buffer, size_t *__pyx_v_size, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuLogsDumpToMemory", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6786 + * cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuLogsDumpToMemory + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuLogsDumpToMemory == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6786, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6787 + * global __cuLogsDumpToMemory + * cuPythonInit() + * if __cuLogsDumpToMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6788 + * cuPythonInit() + * if __cuLogsDumpToMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') + * err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6789 + * if __cuLogsDumpToMemory == NULL: + * with gil: + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') # <<<<<<<<<<<<<< + * err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuLogsDumpToMemory_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6789, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6789, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6788 + * cuPythonInit() + * if __cuLogsDumpToMemory == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') + * err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6787 + * global __cuLogsDumpToMemory + * cuPythonInit() + * if __cuLogsDumpToMemory == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6790 + * with gil: + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') + * err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUlogIterator *, char *, size_t *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory)(__pyx_v_iterator, __pyx_v_buffer, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6790, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6791 + * raise RuntimeError('Function "cuLogsDumpToMemory" not found') + * err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6784 + * return err + * + * cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuLogsDumpToMemory + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuLogsDumpToMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6793 + * return err + * + * cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetRestoreThreadId + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetRestoreThreadId(int __pyx_v_pid, int *__pyx_v_tid) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessGetRestoreThreadId", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6795 + * cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessGetRestoreThreadId + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessGetRestoreThreadId == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6795, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6796 + * global __cuCheckpointProcessGetRestoreThreadId + * cuPythonInit() + * if __cuCheckpointProcessGetRestoreThreadId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6797 + * cuPythonInit() + * if __cuCheckpointProcessGetRestoreThreadId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + * err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6798 + * if __cuCheckpointProcessGetRestoreThreadId == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessGetR}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6798, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6798, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6797 + * cuPythonInit() + * if __cuCheckpointProcessGetRestoreThreadId == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + * err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6796 + * global __cuCheckpointProcessGetRestoreThreadId + * cuPythonInit() + * if __cuCheckpointProcessGetRestoreThreadId == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6799 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + * err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, int *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId)(__pyx_v_pid, __pyx_v_tid); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6799, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6800 + * raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + * err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6793 + * return err + * + * cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetRestoreThreadId + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessGetRestoreThreadId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6802 + * return err + * + * cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetState + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetState(int __pyx_v_pid, CUprocessState *__pyx_v_state) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessGetState", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6804 + * cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessGetState + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessGetState == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6804, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6805 + * global __cuCheckpointProcessGetState + * cuPythonInit() + * if __cuCheckpointProcessGetState == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6806 + * cuPythonInit() + * if __cuCheckpointProcessGetState == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + * err = ( __cuCheckpointProcessGetState)(pid, state) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6807 + * if __cuCheckpointProcessGetState == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessGetState)(pid, state) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessGetS}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6807, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6807, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6806 + * cuPythonInit() + * if __cuCheckpointProcessGetState == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + * err = ( __cuCheckpointProcessGetState)(pid, state) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6805 + * global __cuCheckpointProcessGetState + * cuPythonInit() + * if __cuCheckpointProcessGetState == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6808 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + * err = ( __cuCheckpointProcessGetState)(pid, state) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, CUprocessState *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState)(__pyx_v_pid, __pyx_v_state); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6808, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6809 + * raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + * err = ( __cuCheckpointProcessGetState)(pid, state) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6802 + * return err + * + * cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetState + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessGetState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6811 + * return err + * + * cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessLock + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessLock(int __pyx_v_pid, CUcheckpointLockArgs *__pyx_v_args) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessLock", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6813 + * cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessLock + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessLock == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6813, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6814 + * global __cuCheckpointProcessLock + * cuPythonInit() + * if __cuCheckpointProcessLock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6815 + * cuPythonInit() + * if __cuCheckpointProcessLock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') + * err = ( __cuCheckpointProcessLock)(pid, args) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6816 + * if __cuCheckpointProcessLock == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessLock)(pid, args) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessLock}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6816, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6816, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6815 + * cuPythonInit() + * if __cuCheckpointProcessLock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') + * err = ( __cuCheckpointProcessLock)(pid, args) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6814 + * global __cuCheckpointProcessLock + * cuPythonInit() + * if __cuCheckpointProcessLock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6817 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') + * err = ( __cuCheckpointProcessLock)(pid, args) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, CUcheckpointLockArgs *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock)(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6817, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6818 + * raise RuntimeError('Function "cuCheckpointProcessLock" not found') + * err = ( __cuCheckpointProcessLock)(pid, args) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6811 + * return err + * + * cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessLock + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessLock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6820 + * return err + * + * cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessCheckpoint + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessCheckpoint(int __pyx_v_pid, CUcheckpointCheckpointArgs *__pyx_v_args) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessCheckpoint", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6822 + * cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessCheckpoint + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessCheckpoint == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6822, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6823 + * global __cuCheckpointProcessCheckpoint + * cuPythonInit() + * if __cuCheckpointProcessCheckpoint == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6824 + * cuPythonInit() + * if __cuCheckpointProcessCheckpoint == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + * err = ( __cuCheckpointProcessCheckpoint)(pid, args) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6825 + * if __cuCheckpointProcessCheckpoint == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessCheckpoint)(pid, args) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessChec}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6825, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6825, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6824 + * cuPythonInit() + * if __cuCheckpointProcessCheckpoint == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + * err = ( __cuCheckpointProcessCheckpoint)(pid, args) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6823 + * global __cuCheckpointProcessCheckpoint + * cuPythonInit() + * if __cuCheckpointProcessCheckpoint == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6826 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + * err = ( __cuCheckpointProcessCheckpoint)(pid, args) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, CUcheckpointCheckpointArgs *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint)(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6826, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6827 + * raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + * err = ( __cuCheckpointProcessCheckpoint)(pid, args) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6820 + * return err + * + * cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessCheckpoint + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessCheckpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6829 + * return err + * + * cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessRestore + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessRestore(int __pyx_v_pid, CUcheckpointRestoreArgs *__pyx_v_args) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessRestore", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6831 + * cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessRestore + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessRestore == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6831, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6832 + * global __cuCheckpointProcessRestore + * cuPythonInit() + * if __cuCheckpointProcessRestore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6833 + * cuPythonInit() + * if __cuCheckpointProcessRestore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + * err = ( __cuCheckpointProcessRestore)(pid, args) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6834 + * if __cuCheckpointProcessRestore == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessRestore)(pid, args) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessRest}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6834, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6834, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6833 + * cuPythonInit() + * if __cuCheckpointProcessRestore == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + * err = ( __cuCheckpointProcessRestore)(pid, args) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6832 + * global __cuCheckpointProcessRestore + * cuPythonInit() + * if __cuCheckpointProcessRestore == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6835 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + * err = ( __cuCheckpointProcessRestore)(pid, args) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, CUcheckpointRestoreArgs *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore)(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6835, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6836 + * raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + * err = ( __cuCheckpointProcessRestore)(pid, args) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6829 + * return err + * + * cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessRestore + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessRestore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6838 + * return err + * + * cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessUnlock + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessUnlock(int __pyx_v_pid, CUcheckpointUnlockArgs *__pyx_v_args) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuCheckpointProcessUnlock", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6840 + * cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuCheckpointProcessUnlock + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuCheckpointProcessUnlock == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6840, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6841 + * global __cuCheckpointProcessUnlock + * cuPythonInit() + * if __cuCheckpointProcessUnlock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6842 + * cuPythonInit() + * if __cuCheckpointProcessUnlock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + * err = ( __cuCheckpointProcessUnlock)(pid, args) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6843 + * if __cuCheckpointProcessUnlock == NULL: + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') # <<<<<<<<<<<<<< + * err = ( __cuCheckpointProcessUnlock)(pid, args) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuCheckpointProcessUnlo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6843, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6843, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6842 + * cuPythonInit() + * if __cuCheckpointProcessUnlock == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + * err = ( __cuCheckpointProcessUnlock)(pid, args) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6841 + * global __cuCheckpointProcessUnlock + * cuPythonInit() + * if __cuCheckpointProcessUnlock == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6844 + * with gil: + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + * err = ( __cuCheckpointProcessUnlock)(pid, args) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(int, CUcheckpointUnlockArgs *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock)(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6844, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6845 + * raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + * err = ( __cuCheckpointProcessUnlock)(pid, args) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6838 + * return err + * + * cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuCheckpointProcessUnlock + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuCheckpointProcessUnlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6847 + * return err + * + * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuProfilerStart + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStart(void) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuProfilerStart", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6849 + * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuProfilerStart + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuProfilerStart == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6849, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6850 + * global __cuProfilerStart + * cuPythonInit() + * if __cuProfilerStart == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuProfilerStart" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6851 + * cuPythonInit() + * if __cuProfilerStart == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuProfilerStart" not found') + * err = ( __cuProfilerStart)() +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6852 + * if __cuProfilerStart == NULL: + * with gil: + * raise RuntimeError('Function "cuProfilerStart" not found') # <<<<<<<<<<<<<< + * err = ( __cuProfilerStart)() + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuProfilerStart_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6852, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6852, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6851 + * cuPythonInit() + * if __cuProfilerStart == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuProfilerStart" not found') + * err = ( __cuProfilerStart)() +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6850 + * global __cuProfilerStart + * cuPythonInit() + * if __cuProfilerStart == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuProfilerStart" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6853 + * with gil: + * raise RuntimeError('Function "cuProfilerStart" not found') + * err = ( __cuProfilerStart)() # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart)(); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6853, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6854 + * raise RuntimeError('Function "cuProfilerStart" not found') + * err = ( __cuProfilerStart)() + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6847 + * return err + * + * cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuProfilerStart + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6856 + * return err + * + * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuProfilerStop + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStop(void) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuProfilerStop", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6858 + * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuProfilerStop + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuProfilerStop == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6858, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6859 + * global __cuProfilerStop + * cuPythonInit() + * if __cuProfilerStop == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuProfilerStop" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6860 + * cuPythonInit() + * if __cuProfilerStop == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuProfilerStop" not found') + * err = ( __cuProfilerStop)() +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6861 + * if __cuProfilerStop == NULL: + * with gil: + * raise RuntimeError('Function "cuProfilerStop" not found') # <<<<<<<<<<<<<< + * err = ( __cuProfilerStop)() + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuProfilerStop_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6861, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6861, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6860 + * cuPythonInit() + * if __cuProfilerStop == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuProfilerStop" not found') + * err = ( __cuProfilerStop)() +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6859 + * global __cuProfilerStop + * cuPythonInit() + * if __cuProfilerStop == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuProfilerStop" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6862 + * with gil: + * raise RuntimeError('Function "cuProfilerStop" not found') + * err = ( __cuProfilerStop)() # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(void))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop)(); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6862, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6863 + * raise RuntimeError('Function "cuProfilerStop" not found') + * err = ( __cuProfilerStop)() + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6856 + * return err + * + * cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuProfilerStop + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6865 + * return err + * + * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsEGLRegisterImage + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsEGLRegisterImage", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6867 + * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsEGLRegisterImage + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsEGLRegisterImage == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6867, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6868 + * global __cuGraphicsEGLRegisterImage + * cuPythonInit() + * if __cuGraphicsEGLRegisterImage == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6869 + * cuPythonInit() + * if __cuGraphicsEGLRegisterImage == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') + * err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6870 + * if __cuGraphicsEGLRegisterImage == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsEGLRegisterIm}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6870, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6870, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6869 + * cuPythonInit() + * if __cuGraphicsEGLRegisterImage == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') + * err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6868 + * global __cuGraphicsEGLRegisterImage + * cuPythonInit() + * if __cuGraphicsEGLRegisterImage == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6871 + * with gil: + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') + * err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage)(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6871, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6872 + * raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') + * err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6865 + * return err + * + * cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsEGLRegisterImage + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6874 + * return err + * + * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnect + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamConsumerConnect", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6876 + * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamConsumerConnect + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamConsumerConnect == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6876, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6877 + * global __cuEGLStreamConsumerConnect + * cuPythonInit() + * if __cuEGLStreamConsumerConnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6878 + * cuPythonInit() + * if __cuEGLStreamConsumerConnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') + * err = ( __cuEGLStreamConsumerConnect)(conn, stream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6879 + * if __cuEGLStreamConsumerConnect == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamConsumerConnect)(conn, stream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamConsumerConn}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6879, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6879, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6878 + * cuPythonInit() + * if __cuEGLStreamConsumerConnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') + * err = ( __cuEGLStreamConsumerConnect)(conn, stream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6877 + * global __cuEGLStreamConsumerConnect + * cuPythonInit() + * if __cuEGLStreamConsumerConnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6880 + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') + * err = ( __cuEGLStreamConsumerConnect)(conn, stream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect)(__pyx_v_conn, __pyx_v_stream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6880, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6881 + * raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') + * err = ( __cuEGLStreamConsumerConnect)(conn, stream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6874 + * return err + * + * cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnect + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6883 + * return err + * + * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnectWithFlags + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamConsumerConnectWithFlags", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6885 + * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamConsumerConnectWithFlags + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamConsumerConnectWithFlags == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6885, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6886 + * global __cuEGLStreamConsumerConnectWithFlags + * cuPythonInit() + * if __cuEGLStreamConsumerConnectWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6887 + * cuPythonInit() + * if __cuEGLStreamConsumerConnectWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') + * err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6888 + * if __cuEGLStreamConsumerConnectWithFlags == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamConsumerConn_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6888, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6888, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6887 + * cuPythonInit() + * if __cuEGLStreamConsumerConnectWithFlags == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') + * err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6886 + * global __cuEGLStreamConsumerConnectWithFlags + * cuPythonInit() + * if __cuEGLStreamConsumerConnectWithFlags == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6889 + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') + * err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags)(__pyx_v_conn, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6889, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6890 + * raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') + * err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6883 + * return err + * + * cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnectWithFlags + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6892 + * return err + * + * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerDisconnect + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamConsumerDisconnect", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6894 + * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamConsumerDisconnect + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamConsumerDisconnect == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6894, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6895 + * global __cuEGLStreamConsumerDisconnect + * cuPythonInit() + * if __cuEGLStreamConsumerDisconnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6896 + * cuPythonInit() + * if __cuEGLStreamConsumerDisconnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') + * err = ( __cuEGLStreamConsumerDisconnect)(conn) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6897 + * if __cuEGLStreamConsumerDisconnect == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamConsumerDisconnect)(conn) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamConsumerDisc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6897, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6897, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6896 + * cuPythonInit() + * if __cuEGLStreamConsumerDisconnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') + * err = ( __cuEGLStreamConsumerDisconnect)(conn) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6895 + * global __cuEGLStreamConsumerDisconnect + * cuPythonInit() + * if __cuEGLStreamConsumerDisconnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6898 + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') + * err = ( __cuEGLStreamConsumerDisconnect)(conn) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect)(__pyx_v_conn); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6898, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6899 + * raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') + * err = ( __cuEGLStreamConsumerDisconnect)(conn) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6892 + * return err + * + * cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerDisconnect + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6901 + * return err + * + * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerAcquireFrame + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource *__pyx_v_pCudaResource, CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamConsumerAcquireFrame", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6903 + * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamConsumerAcquireFrame + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamConsumerAcquireFrame == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6903, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6904 + * global __cuEGLStreamConsumerAcquireFrame + * cuPythonInit() + * if __cuEGLStreamConsumerAcquireFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6905 + * cuPythonInit() + * if __cuEGLStreamConsumerAcquireFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') + * err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6906 + * if __cuEGLStreamConsumerAcquireFrame == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamConsumerAcqu}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6906, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6906, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6905 + * cuPythonInit() + * if __cuEGLStreamConsumerAcquireFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') + * err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6904 + * global __cuEGLStreamConsumerAcquireFrame + * cuPythonInit() + * if __cuEGLStreamConsumerAcquireFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6907 + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') + * err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame)(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6907, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6908 + * raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') + * err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6901 + * return err + * + * cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerAcquireFrame + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6910 + * return err + * + * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerReleaseFrame + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource __pyx_v_pCudaResource, CUstream *__pyx_v_pStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamConsumerReleaseFrame", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6912 + * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamConsumerReleaseFrame + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamConsumerReleaseFrame == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6912, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6913 + * global __cuEGLStreamConsumerReleaseFrame + * cuPythonInit() + * if __cuEGLStreamConsumerReleaseFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6914 + * cuPythonInit() + * if __cuEGLStreamConsumerReleaseFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') + * err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6915 + * if __cuEGLStreamConsumerReleaseFrame == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamConsumerRele}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6915, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6915, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6914 + * cuPythonInit() + * if __cuEGLStreamConsumerReleaseFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') + * err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6913 + * global __cuEGLStreamConsumerReleaseFrame + * cuPythonInit() + * if __cuEGLStreamConsumerReleaseFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6916 + * with gil: + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') + * err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame)(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6916, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6917 + * raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') + * err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6910 + * return err + * + * cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerReleaseFrame + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6919 + * return err + * + * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerConnect + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream, __pyx_t_4cuda_8bindings_8cydriver_EGLint __pyx_v_width, __pyx_t_4cuda_8bindings_8cydriver_EGLint __pyx_v_height) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamProducerConnect", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6921 + * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamProducerConnect + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamProducerConnect == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6921, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6922 + * global __cuEGLStreamProducerConnect + * cuPythonInit() + * if __cuEGLStreamProducerConnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6923 + * cuPythonInit() + * if __cuEGLStreamProducerConnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') + * err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6924 + * if __cuEGLStreamProducerConnect == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamProducerConn}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6924, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6924, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6923 + * cuPythonInit() + * if __cuEGLStreamProducerConnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') + * err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6922 + * global __cuEGLStreamProducerConnect + * cuPythonInit() + * if __cuEGLStreamProducerConnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6925 + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') + * err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect)(__pyx_v_conn, __pyx_v_stream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6925, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6926 + * raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') + * err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6919 + * return err + * + * cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerConnect + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6928 + * return err + * + * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerDisconnect + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamProducerDisconnect", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6930 + * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamProducerDisconnect + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamProducerDisconnect == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6930, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6931 + * global __cuEGLStreamProducerDisconnect + * cuPythonInit() + * if __cuEGLStreamProducerDisconnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6932 + * cuPythonInit() + * if __cuEGLStreamProducerDisconnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') + * err = ( __cuEGLStreamProducerDisconnect)(conn) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6933 + * if __cuEGLStreamProducerDisconnect == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamProducerDisconnect)(conn) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamProducerDisc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6933, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6933, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6932 + * cuPythonInit() + * if __cuEGLStreamProducerDisconnect == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') + * err = ( __cuEGLStreamProducerDisconnect)(conn) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6931 + * global __cuEGLStreamProducerDisconnect + * cuPythonInit() + * if __cuEGLStreamProducerDisconnect == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6934 + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') + * err = ( __cuEGLStreamProducerDisconnect)(conn) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect)(__pyx_v_conn); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6934, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6935 + * raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') + * err = ( __cuEGLStreamProducerDisconnect)(conn) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6928 + * return err + * + * cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerDisconnect + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6937 + * return err + * + * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerPresentFrame + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_eglframe, CUstream *__pyx_v_pStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamProducerPresentFrame", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6939 + * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamProducerPresentFrame + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamProducerPresentFrame == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6939, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6940 + * global __cuEGLStreamProducerPresentFrame + * cuPythonInit() + * if __cuEGLStreamProducerPresentFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6941 + * cuPythonInit() + * if __cuEGLStreamProducerPresentFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') + * err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6942 + * if __cuEGLStreamProducerPresentFrame == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamProducerPres}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6942, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6942, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6941 + * cuPythonInit() + * if __cuEGLStreamProducerPresentFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') + * err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6940 + * global __cuEGLStreamProducerPresentFrame + * cuPythonInit() + * if __cuEGLStreamProducerPresentFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6943 + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') + * err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6943, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6944 + * raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') + * err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6937 + * return err + * + * cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerPresentFrame + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6946 + * return err + * + * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerReturnFrame + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *__pyx_v_eglframe, CUstream *__pyx_v_pStream) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEGLStreamProducerReturnFrame", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6948 + * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEGLStreamProducerReturnFrame + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEGLStreamProducerReturnFrame == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6948, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6949 + * global __cuEGLStreamProducerReturnFrame + * cuPythonInit() + * if __cuEGLStreamProducerReturnFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6950 + * cuPythonInit() + * if __cuEGLStreamProducerReturnFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') + * err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6951 + * if __cuEGLStreamProducerReturnFrame == NULL: + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') # <<<<<<<<<<<<<< + * err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEGLStreamProducerRetu}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6951, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6951, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6950 + * cuPythonInit() + * if __cuEGLStreamProducerReturnFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') + * err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6949 + * global __cuEGLStreamProducerReturnFrame + * cuPythonInit() + * if __cuEGLStreamProducerReturnFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6952 + * with gil: + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') + * err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame)(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6952, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6953 + * raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') + * err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6946 + * return err + * + * cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerReturnFrame + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6955 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedEglFrame + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *__pyx_v_eglFrame, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsResourceGetMappedEglFrame", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6957 + * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsResourceGetMappedEglFrame + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsResourceGetMappedEglFrame == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6957, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6958 + * global __cuGraphicsResourceGetMappedEglFrame + * cuPythonInit() + * if __cuGraphicsResourceGetMappedEglFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6959 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedEglFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') + * err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6960 + * if __cuGraphicsResourceGetMappedEglFrame == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsResourceGetMa_3}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6960, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6960, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6959 + * cuPythonInit() + * if __cuGraphicsResourceGetMappedEglFrame == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') + * err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6958 + * global __cuGraphicsResourceGetMappedEglFrame + * cuPythonInit() + * if __cuGraphicsResourceGetMappedEglFrame == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6961 + * with gil: + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') + * err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame)(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6961, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6962 + * raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') + * err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6955 + * return err + * + * cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedEglFrame + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6964 + * return err + * + * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventCreateFromEGLSync + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync(CUevent *__pyx_v_phEvent, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuEventCreateFromEGLSync", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6966 + * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuEventCreateFromEGLSync + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuEventCreateFromEGLSync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6966, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6967 + * global __cuEventCreateFromEGLSync + * cuPythonInit() + * if __cuEventCreateFromEGLSync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6968 + * cuPythonInit() + * if __cuEventCreateFromEGLSync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') + * err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6969 + * if __cuEventCreateFromEGLSync == NULL: + * with gil: + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') # <<<<<<<<<<<<<< + * err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuEventCreateFromEGLSyn}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6969, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6969, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6968 + * cuPythonInit() + * if __cuEventCreateFromEGLSync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') + * err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6967 + * global __cuEventCreateFromEGLSync + * cuPythonInit() + * if __cuEventCreateFromEGLSync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6970 + * with gil: + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') + * err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync)(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6970, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6971 + * raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') + * err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6964 + * return err + * + * cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuEventCreateFromEGLSync + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6973 + * return err + * + * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterBuffer + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsGLRegisterBuffer", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6975 + * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsGLRegisterBuffer + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsGLRegisterBuffer == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6975, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6976 + * global __cuGraphicsGLRegisterBuffer + * cuPythonInit() + * if __cuGraphicsGLRegisterBuffer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6977 + * cuPythonInit() + * if __cuGraphicsGLRegisterBuffer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') + * err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6978 + * if __cuGraphicsGLRegisterBuffer == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsGLRegisterBuf}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6978, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6978, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6977 + * cuPythonInit() + * if __cuGraphicsGLRegisterBuffer == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') + * err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6976 + * global __cuGraphicsGLRegisterBuffer + * cuPythonInit() + * if __cuGraphicsGLRegisterBuffer == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6979 + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') + * err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer)(__pyx_v_pCudaResource, __pyx_v_buffer, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6979, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6980 + * raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') + * err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6973 + * return err + * + * cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterBuffer + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6982 + * return err + * + * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterImage + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_GLuint __pyx_v_image, __pyx_t_4cuda_8bindings_8cydriver_GLenum __pyx_v_target, unsigned int __pyx_v_Flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsGLRegisterImage", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6984 + * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsGLRegisterImage + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsGLRegisterImage == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6984, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6985 + * global __cuGraphicsGLRegisterImage + * cuPythonInit() + * if __cuGraphicsGLRegisterImage == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6986 + * cuPythonInit() + * if __cuGraphicsGLRegisterImage == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') + * err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6987 + * if __cuGraphicsGLRegisterImage == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsGLRegisterIma}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6987, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6987, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6986 + * cuPythonInit() + * if __cuGraphicsGLRegisterImage == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') + * err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6985 + * global __cuGraphicsGLRegisterImage + * cuPythonInit() + * if __cuGraphicsGLRegisterImage == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6988 + * with gil: + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') + * err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage)(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_target, __pyx_v_Flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6988, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6989 + * raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') + * err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6982 + * return err + * + * cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterImage + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":6991 + * return err + * + * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGLGetDevices_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2(unsigned int *__pyx_v_pCudaDeviceCount, CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList __pyx_v_deviceList) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGLGetDevices_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":6993 + * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGLGetDevices_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGLGetDevices_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 6993, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":6994 + * global __cuGLGetDevices_v2 + * cuPythonInit() + * if __cuGLGetDevices_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":6995 + * cuPythonInit() + * if __cuGLGetDevices_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') + * err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":6996 + * if __cuGLGetDevices_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGLGetDevices_v2_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6996, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 6996, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6995 + * cuPythonInit() + * if __cuGLGetDevices_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') + * err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6994 + * global __cuGLGetDevices_v2 + * cuPythonInit() + * if __cuGLGetDevices_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":6997 + * with gil: + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') + * err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2)(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 6997, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":6998 + * raise RuntimeError('Function "cuGLGetDevices_v2" not found') + * err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":6991 + * return err + * + * cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGLGetDevices_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGLGetDevices_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7000 + * return err + * + * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuVDPAUGetDevice + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice(CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuVDPAUGetDevice", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":7002 + * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuVDPAUGetDevice + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuVDPAUGetDevice == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7002, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":7003 + * global __cuVDPAUGetDevice + * cuPythonInit() + * if __cuVDPAUGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7004 + * cuPythonInit() + * if __cuVDPAUGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') + * err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":7005 + * if __cuVDPAUGetDevice == NULL: + * with gil: + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') # <<<<<<<<<<<<<< + * err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuVDPAUGetDevice_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7005, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7005, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7004 + * cuPythonInit() + * if __cuVDPAUGetDevice == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') + * err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7003 + * global __cuVDPAUGetDevice + * cuPythonInit() + * if __cuVDPAUGetDevice == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7006 + * with gil: + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') + * err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice)(__pyx_v_pDevice, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 7006, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":7007 + * raise RuntimeError('Function "cuVDPAUGetDevice" not found') + * err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7000 + * return err + * + * cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuVDPAUGetDevice + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7009 + * return err + * + * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuVDPAUCtxCreate_v2 + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUCtxCreate_v2(CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, CUdevice __pyx_v_device, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuVDPAUCtxCreate_v2", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":7011 + * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuVDPAUCtxCreate_v2 + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuVDPAUCtxCreate_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7011, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":7012 + * global __cuVDPAUCtxCreate_v2 + * cuPythonInit() + * if __cuVDPAUCtxCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7013 + * cuPythonInit() + * if __cuVDPAUCtxCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') + * err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":7014 + * if __cuVDPAUCtxCreate_v2 == NULL: + * with gil: + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') # <<<<<<<<<<<<<< + * err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7014, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7014, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7013 + * cuPythonInit() + * if __cuVDPAUCtxCreate_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') + * err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7012 + * global __cuVDPAUCtxCreate_v2 + * cuPythonInit() + * if __cuVDPAUCtxCreate_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7015 + * with gil: + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') + * err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2)(__pyx_v_pCtx, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 7015, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":7016 + * raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') + * err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7009 + * return err + * + * cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuVDPAUCtxCreate_v2 + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuVDPAUCtxCreate_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7018 + * return err + * + * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterVideoSurface + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsVDPAURegisterVideoSurface", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":7020 + * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsVDPAURegisterVideoSurface + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7020, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":7021 + * global __cuGraphicsVDPAURegisterVideoSurface + * cuPythonInit() + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7022 + * cuPythonInit() + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') + * err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":7023 + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsVDPAURegister}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7023, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7023, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7022 + * cuPythonInit() + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') + * err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7021 + * global __cuGraphicsVDPAURegisterVideoSurface + * cuPythonInit() + * if __cuGraphicsVDPAURegisterVideoSurface == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7024 + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') + * err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface)(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 7024, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":7025 + * raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') + * err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7018 + * return err + * + * cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterVideoSurface + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7027 + * return err + * + * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterOutputSurface + * cuPythonInit() +*/ + +static CUresult __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + CUresult __pyx_v_err; + CUresult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + CUresult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuGraphicsVDPAURegisterOutputSurface", 1); + + /* "cuda/bindings/_bindings/cydriver.pyx":7029 + * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * global __cuGraphicsVDPAURegisterOutputSurface + * cuPythonInit() # <<<<<<<<<<<<<< + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 7029, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":7030 + * global __cuGraphicsVDPAURegisterOutputSurface + * cuPythonInit() + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7031 + * cuPythonInit() + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') + * err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cydriver.pyx":7032 + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') # <<<<<<<<<<<<<< + * err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_cuGraphicsVDPAURegister_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7032, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 7032, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7031 + * cuPythonInit() + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') + * err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7030 + * global __cuGraphicsVDPAURegisterOutputSurface + * cuPythonInit() + * if __cuGraphicsVDPAURegisterOutputSurface == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7033 + * with gil: + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') + * err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((CUresult (*)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int))__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface)(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_7 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 7033, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cydriver.pyx":7034 + * raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') + * err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef dict func_ptrs = None +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7027 + * return err + * + * cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterOutputSurface + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7038 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_data = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + + /* "cuda/bindings/_bindings/cydriver.pyx":7040 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs != ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7041 + * global func_ptrs + * if func_ptrs is not None: + * return func_ptrs # <<<<<<<<<<<<<< + * + * cuPythonInit() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs); + __pyx_r = __pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7040 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":7043 + * return func_ptrs + * + * cuPythonInit() # <<<<<<<<<<<<<< + * cdef dict data = {} + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver_cuPythonInit(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 7043, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cydriver.pyx":7044 + * + * cuPythonInit() + * cdef dict data = {} # <<<<<<<<<<<<<< + * + * global __cuGetErrorString +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_data = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7047 + * + * global __cuGetErrorString + * data["__cuGetErrorString"] = __cuGetErrorString # <<<<<<<<<<<<<< + * global __cuGetErrorName + * data["__cuGetErrorName"] = __cuGetErrorName +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7047, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGetErrorString, __pyx_t_3) < 0))) __PYX_ERR(0, 7047, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7049 + * data["__cuGetErrorString"] = __cuGetErrorString + * global __cuGetErrorName + * data["__cuGetErrorName"] = __cuGetErrorName # <<<<<<<<<<<<<< + * global __cuInit + * data["__cuInit"] = __cuInit +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7049, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGetErrorName, __pyx_t_3) < 0))) __PYX_ERR(0, 7049, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7051 + * data["__cuGetErrorName"] = __cuGetErrorName + * global __cuInit + * data["__cuInit"] = __cuInit # <<<<<<<<<<<<<< + * global __cuDriverGetVersion + * data["__cuDriverGetVersion"] = __cuDriverGetVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7051, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuInit, __pyx_t_3) < 0))) __PYX_ERR(0, 7051, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7053 + * data["__cuInit"] = __cuInit + * global __cuDriverGetVersion + * data["__cuDriverGetVersion"] = __cuDriverGetVersion # <<<<<<<<<<<<<< + * global __cuDeviceGet + * data["__cuDeviceGet"] = __cuDeviceGet +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDriverGetVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 7053, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7055 + * data["__cuDriverGetVersion"] = __cuDriverGetVersion + * global __cuDeviceGet + * data["__cuDeviceGet"] = __cuDeviceGet # <<<<<<<<<<<<<< + * global __cuDeviceGetCount + * data["__cuDeviceGetCount"] = __cuDeviceGetCount +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7055, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGet, __pyx_t_3) < 0))) __PYX_ERR(0, 7055, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7057 + * data["__cuDeviceGet"] = __cuDeviceGet + * global __cuDeviceGetCount + * data["__cuDeviceGetCount"] = __cuDeviceGetCount # <<<<<<<<<<<<<< + * global __cuDeviceGetName + * data["__cuDeviceGetName"] = __cuDeviceGetName +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7057, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetCount, __pyx_t_3) < 0))) __PYX_ERR(0, 7057, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7059 + * data["__cuDeviceGetCount"] = __cuDeviceGetCount + * global __cuDeviceGetName + * data["__cuDeviceGetName"] = __cuDeviceGetName # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid + * data["__cuDeviceGetUuid"] = __cuDeviceGetUuid +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7059, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetName, __pyx_t_3) < 0))) __PYX_ERR(0, 7059, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7061 + * data["__cuDeviceGetName"] = __cuDeviceGetName + * global __cuDeviceGetUuid + * data["__cuDeviceGetUuid"] = __cuDeviceGetUuid # <<<<<<<<<<<<<< + * global __cuDeviceGetUuid_v2 + * data["__cuDeviceGetUuid_v2"] = __cuDeviceGetUuid_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7061, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetUuid, __pyx_t_3) < 0))) __PYX_ERR(0, 7061, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7063 + * data["__cuDeviceGetUuid"] = __cuDeviceGetUuid + * global __cuDeviceGetUuid_v2 + * data["__cuDeviceGetUuid_v2"] = __cuDeviceGetUuid_v2 # <<<<<<<<<<<<<< + * global __cuDeviceGetLuid + * data["__cuDeviceGetLuid"] = __cuDeviceGetLuid +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7063, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetUuid_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7063, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7065 + * data["__cuDeviceGetUuid_v2"] = __cuDeviceGetUuid_v2 + * global __cuDeviceGetLuid + * data["__cuDeviceGetLuid"] = __cuDeviceGetLuid # <<<<<<<<<<<<<< + * global __cuDeviceTotalMem_v2 + * data["__cuDeviceTotalMem_v2"] = __cuDeviceTotalMem_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7065, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetLuid, __pyx_t_3) < 0))) __PYX_ERR(0, 7065, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7067 + * data["__cuDeviceGetLuid"] = __cuDeviceGetLuid + * global __cuDeviceTotalMem_v2 + * data["__cuDeviceTotalMem_v2"] = __cuDeviceTotalMem_v2 # <<<<<<<<<<<<<< + * global __cuDeviceGetTexture1DLinearMaxWidth + * data["__cuDeviceGetTexture1DLinearMaxWidth"] = __cuDeviceGetTexture1DLinearMaxWidth +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7067, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceTotalMem_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7067, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7069 + * data["__cuDeviceTotalMem_v2"] = __cuDeviceTotalMem_v2 + * global __cuDeviceGetTexture1DLinearMaxWidth + * data["__cuDeviceGetTexture1DLinearMaxWidth"] = __cuDeviceGetTexture1DLinearMaxWidth # <<<<<<<<<<<<<< + * global __cuDeviceGetAttribute + * data["__cuDeviceGetAttribute"] = __cuDeviceGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7069, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetTexture1DLinearMaxW, __pyx_t_3) < 0))) __PYX_ERR(0, 7069, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7071 + * data["__cuDeviceGetTexture1DLinearMaxWidth"] = __cuDeviceGetTexture1DLinearMaxWidth + * global __cuDeviceGetAttribute + * data["__cuDeviceGetAttribute"] = __cuDeviceGetAttribute # <<<<<<<<<<<<<< + * global __cuDeviceGetNvSciSyncAttributes + * data["__cuDeviceGetNvSciSyncAttributes"] = __cuDeviceGetNvSciSyncAttributes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7071, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7071, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7073 + * data["__cuDeviceGetAttribute"] = __cuDeviceGetAttribute + * global __cuDeviceGetNvSciSyncAttributes + * data["__cuDeviceGetNvSciSyncAttributes"] = __cuDeviceGetNvSciSyncAttributes # <<<<<<<<<<<<<< + * global __cuDeviceSetMemPool + * data["__cuDeviceSetMemPool"] = __cuDeviceSetMemPool +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7073, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetNvSciSyncAttributes, __pyx_t_3) < 0))) __PYX_ERR(0, 7073, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7075 + * data["__cuDeviceGetNvSciSyncAttributes"] = __cuDeviceGetNvSciSyncAttributes + * global __cuDeviceSetMemPool + * data["__cuDeviceSetMemPool"] = __cuDeviceSetMemPool # <<<<<<<<<<<<<< + * global __cuDeviceGetMemPool + * data["__cuDeviceGetMemPool"] = __cuDeviceGetMemPool +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceSetMemPool, __pyx_t_3) < 0))) __PYX_ERR(0, 7075, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7077 + * data["__cuDeviceSetMemPool"] = __cuDeviceSetMemPool + * global __cuDeviceGetMemPool + * data["__cuDeviceGetMemPool"] = __cuDeviceGetMemPool # <<<<<<<<<<<<<< + * global __cuDeviceGetDefaultMemPool + * data["__cuDeviceGetDefaultMemPool"] = __cuDeviceGetDefaultMemPool +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetMemPool, __pyx_t_3) < 0))) __PYX_ERR(0, 7077, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7079 + * data["__cuDeviceGetMemPool"] = __cuDeviceGetMemPool + * global __cuDeviceGetDefaultMemPool + * data["__cuDeviceGetDefaultMemPool"] = __cuDeviceGetDefaultMemPool # <<<<<<<<<<<<<< + * global __cuDeviceGetExecAffinitySupport + * data["__cuDeviceGetExecAffinitySupport"] = __cuDeviceGetExecAffinitySupport +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7079, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetDefaultMemPool, __pyx_t_3) < 0))) __PYX_ERR(0, 7079, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7081 + * data["__cuDeviceGetDefaultMemPool"] = __cuDeviceGetDefaultMemPool + * global __cuDeviceGetExecAffinitySupport + * data["__cuDeviceGetExecAffinitySupport"] = __cuDeviceGetExecAffinitySupport # <<<<<<<<<<<<<< + * global __cuFlushGPUDirectRDMAWrites + * data["__cuFlushGPUDirectRDMAWrites"] = __cuFlushGPUDirectRDMAWrites +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7081, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetExecAffinitySupport, __pyx_t_3) < 0))) __PYX_ERR(0, 7081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7083 + * data["__cuDeviceGetExecAffinitySupport"] = __cuDeviceGetExecAffinitySupport + * global __cuFlushGPUDirectRDMAWrites + * data["__cuFlushGPUDirectRDMAWrites"] = __cuFlushGPUDirectRDMAWrites # <<<<<<<<<<<<<< + * global __cuDeviceGetProperties + * data["__cuDeviceGetProperties"] = __cuDeviceGetProperties +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7083, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFlushGPUDirectRDMAWrites, __pyx_t_3) < 0))) __PYX_ERR(0, 7083, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7085 + * data["__cuFlushGPUDirectRDMAWrites"] = __cuFlushGPUDirectRDMAWrites + * global __cuDeviceGetProperties + * data["__cuDeviceGetProperties"] = __cuDeviceGetProperties # <<<<<<<<<<<<<< + * global __cuDeviceComputeCapability + * data["__cuDeviceComputeCapability"] = __cuDeviceComputeCapability +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7085, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetProperties, __pyx_t_3) < 0))) __PYX_ERR(0, 7085, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7087 + * data["__cuDeviceGetProperties"] = __cuDeviceGetProperties + * global __cuDeviceComputeCapability + * data["__cuDeviceComputeCapability"] = __cuDeviceComputeCapability # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRetain + * data["__cuDevicePrimaryCtxRetain"] = __cuDevicePrimaryCtxRetain +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceComputeCapability, __pyx_t_3) < 0))) __PYX_ERR(0, 7087, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7089 + * data["__cuDeviceComputeCapability"] = __cuDeviceComputeCapability + * global __cuDevicePrimaryCtxRetain + * data["__cuDevicePrimaryCtxRetain"] = __cuDevicePrimaryCtxRetain # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxRelease_v2 + * data["__cuDevicePrimaryCtxRelease_v2"] = __cuDevicePrimaryCtxRelease_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7089, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevicePrimaryCtxRetain, __pyx_t_3) < 0))) __PYX_ERR(0, 7089, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7091 + * data["__cuDevicePrimaryCtxRetain"] = __cuDevicePrimaryCtxRetain + * global __cuDevicePrimaryCtxRelease_v2 + * data["__cuDevicePrimaryCtxRelease_v2"] = __cuDevicePrimaryCtxRelease_v2 # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxSetFlags_v2 + * data["__cuDevicePrimaryCtxSetFlags_v2"] = __cuDevicePrimaryCtxSetFlags_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7091, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevicePrimaryCtxRelease_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7091, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7093 + * data["__cuDevicePrimaryCtxRelease_v2"] = __cuDevicePrimaryCtxRelease_v2 + * global __cuDevicePrimaryCtxSetFlags_v2 + * data["__cuDevicePrimaryCtxSetFlags_v2"] = __cuDevicePrimaryCtxSetFlags_v2 # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxGetState + * data["__cuDevicePrimaryCtxGetState"] = __cuDevicePrimaryCtxGetState +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7093, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevicePrimaryCtxSetFlags_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7093, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7095 + * data["__cuDevicePrimaryCtxSetFlags_v2"] = __cuDevicePrimaryCtxSetFlags_v2 + * global __cuDevicePrimaryCtxGetState + * data["__cuDevicePrimaryCtxGetState"] = __cuDevicePrimaryCtxGetState # <<<<<<<<<<<<<< + * global __cuDevicePrimaryCtxReset_v2 + * data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevicePrimaryCtxGetState, __pyx_t_3) < 0))) __PYX_ERR(0, 7095, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7097 + * data["__cuDevicePrimaryCtxGetState"] = __cuDevicePrimaryCtxGetState + * global __cuDevicePrimaryCtxReset_v2 + * data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 # <<<<<<<<<<<<<< + * global __cuCtxCreate_v2 + * data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevicePrimaryCtxReset_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7099 + * data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 + * global __cuCtxCreate_v2 + * data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 # <<<<<<<<<<<<<< + * global __cuCtxCreate_v3 + * data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7099, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxCreate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7099, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7101 + * data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 + * global __cuCtxCreate_v3 + * data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 # <<<<<<<<<<<<<< + * global __cuCtxCreate_v4 + * data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxCreate_v3, __pyx_t_3) < 0))) __PYX_ERR(0, 7101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7103 + * data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 + * global __cuCtxCreate_v4 + * data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 # <<<<<<<<<<<<<< + * global __cuCtxDestroy_v2 + * data["__cuCtxDestroy_v2"] = __cuCtxDestroy_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxCreate_v4, __pyx_t_3) < 0))) __PYX_ERR(0, 7103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7105 + * data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 + * global __cuCtxDestroy_v2 + * data["__cuCtxDestroy_v2"] = __cuCtxDestroy_v2 # <<<<<<<<<<<<<< + * global __cuCtxPushCurrent_v2 + * data["__cuCtxPushCurrent_v2"] = __cuCtxPushCurrent_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxDestroy_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7107 + * data["__cuCtxDestroy_v2"] = __cuCtxDestroy_v2 + * global __cuCtxPushCurrent_v2 + * data["__cuCtxPushCurrent_v2"] = __cuCtxPushCurrent_v2 # <<<<<<<<<<<<<< + * global __cuCtxPopCurrent_v2 + * data["__cuCtxPopCurrent_v2"] = __cuCtxPopCurrent_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxPushCurrent_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7107, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7109 + * data["__cuCtxPushCurrent_v2"] = __cuCtxPushCurrent_v2 + * global __cuCtxPopCurrent_v2 + * data["__cuCtxPopCurrent_v2"] = __cuCtxPopCurrent_v2 # <<<<<<<<<<<<<< + * global __cuCtxSetCurrent + * data["__cuCtxSetCurrent"] = __cuCtxSetCurrent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxPopCurrent_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7111 + * data["__cuCtxPopCurrent_v2"] = __cuCtxPopCurrent_v2 + * global __cuCtxSetCurrent + * data["__cuCtxSetCurrent"] = __cuCtxSetCurrent # <<<<<<<<<<<<<< + * global __cuCtxGetCurrent + * data["__cuCtxGetCurrent"] = __cuCtxGetCurrent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSetCurrent, __pyx_t_3) < 0))) __PYX_ERR(0, 7111, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7113 + * data["__cuCtxSetCurrent"] = __cuCtxSetCurrent + * global __cuCtxGetCurrent + * data["__cuCtxGetCurrent"] = __cuCtxGetCurrent # <<<<<<<<<<<<<< + * global __cuCtxGetDevice + * data["__cuCtxGetDevice"] = __cuCtxGetDevice +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7113, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetCurrent, __pyx_t_3) < 0))) __PYX_ERR(0, 7113, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7115 + * data["__cuCtxGetCurrent"] = __cuCtxGetCurrent + * global __cuCtxGetDevice + * data["__cuCtxGetDevice"] = __cuCtxGetDevice # <<<<<<<<<<<<<< + * global __cuCtxGetFlags + * data["__cuCtxGetFlags"] = __cuCtxGetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetDevice, __pyx_t_3) < 0))) __PYX_ERR(0, 7115, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7117 + * data["__cuCtxGetDevice"] = __cuCtxGetDevice + * global __cuCtxGetFlags + * data["__cuCtxGetFlags"] = __cuCtxGetFlags # <<<<<<<<<<<<<< + * global __cuCtxSetFlags + * data["__cuCtxSetFlags"] = __cuCtxSetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7117, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7119 + * data["__cuCtxGetFlags"] = __cuCtxGetFlags + * global __cuCtxSetFlags + * data["__cuCtxSetFlags"] = __cuCtxSetFlags # <<<<<<<<<<<<<< + * global __cuCtxGetId + * data["__cuCtxGetId"] = __cuCtxGetId +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7119, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7121 + * data["__cuCtxSetFlags"] = __cuCtxSetFlags + * global __cuCtxGetId + * data["__cuCtxGetId"] = __cuCtxGetId # <<<<<<<<<<<<<< + * global __cuCtxSynchronize + * data["__cuCtxSynchronize"] = __cuCtxSynchronize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7121, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetId, __pyx_t_3) < 0))) __PYX_ERR(0, 7121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7123 + * data["__cuCtxGetId"] = __cuCtxGetId + * global __cuCtxSynchronize + * data["__cuCtxSynchronize"] = __cuCtxSynchronize # <<<<<<<<<<<<<< + * global __cuCtxSetLimit + * data["__cuCtxSetLimit"] = __cuCtxSetLimit +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSynchronize, __pyx_t_3) < 0))) __PYX_ERR(0, 7123, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7125 + * data["__cuCtxSynchronize"] = __cuCtxSynchronize + * global __cuCtxSetLimit + * data["__cuCtxSetLimit"] = __cuCtxSetLimit # <<<<<<<<<<<<<< + * global __cuCtxGetLimit + * data["__cuCtxGetLimit"] = __cuCtxGetLimit +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSetLimit, __pyx_t_3) < 0))) __PYX_ERR(0, 7125, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7127 + * data["__cuCtxSetLimit"] = __cuCtxSetLimit + * global __cuCtxGetLimit + * data["__cuCtxGetLimit"] = __cuCtxGetLimit # <<<<<<<<<<<<<< + * global __cuCtxGetCacheConfig + * data["__cuCtxGetCacheConfig"] = __cuCtxGetCacheConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetLimit, __pyx_t_3) < 0))) __PYX_ERR(0, 7127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7129 + * data["__cuCtxGetLimit"] = __cuCtxGetLimit + * global __cuCtxGetCacheConfig + * data["__cuCtxGetCacheConfig"] = __cuCtxGetCacheConfig # <<<<<<<<<<<<<< + * global __cuCtxSetCacheConfig + * data["__cuCtxSetCacheConfig"] = __cuCtxSetCacheConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetCacheConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7131 + * data["__cuCtxGetCacheConfig"] = __cuCtxGetCacheConfig + * global __cuCtxSetCacheConfig + * data["__cuCtxSetCacheConfig"] = __cuCtxSetCacheConfig # <<<<<<<<<<<<<< + * global __cuCtxGetApiVersion + * data["__cuCtxGetApiVersion"] = __cuCtxGetApiVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSetCacheConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7133 + * data["__cuCtxSetCacheConfig"] = __cuCtxSetCacheConfig + * global __cuCtxGetApiVersion + * data["__cuCtxGetApiVersion"] = __cuCtxGetApiVersion # <<<<<<<<<<<<<< + * global __cuCtxGetStreamPriorityRange + * data["__cuCtxGetStreamPriorityRange"] = __cuCtxGetStreamPriorityRange +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetApiVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 7133, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7135 + * data["__cuCtxGetApiVersion"] = __cuCtxGetApiVersion + * global __cuCtxGetStreamPriorityRange + * data["__cuCtxGetStreamPriorityRange"] = __cuCtxGetStreamPriorityRange # <<<<<<<<<<<<<< + * global __cuCtxResetPersistingL2Cache + * data["__cuCtxResetPersistingL2Cache"] = __cuCtxResetPersistingL2Cache +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetStreamPriorityRange, __pyx_t_3) < 0))) __PYX_ERR(0, 7135, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7137 + * data["__cuCtxGetStreamPriorityRange"] = __cuCtxGetStreamPriorityRange + * global __cuCtxResetPersistingL2Cache + * data["__cuCtxResetPersistingL2Cache"] = __cuCtxResetPersistingL2Cache # <<<<<<<<<<<<<< + * global __cuCtxGetExecAffinity + * data["__cuCtxGetExecAffinity"] = __cuCtxGetExecAffinity +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxResetPersistingL2Cache, __pyx_t_3) < 0))) __PYX_ERR(0, 7137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7139 + * data["__cuCtxResetPersistingL2Cache"] = __cuCtxResetPersistingL2Cache + * global __cuCtxGetExecAffinity + * data["__cuCtxGetExecAffinity"] = __cuCtxGetExecAffinity # <<<<<<<<<<<<<< + * global __cuCtxRecordEvent + * data["__cuCtxRecordEvent"] = __cuCtxRecordEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetExecAffinity, __pyx_t_3) < 0))) __PYX_ERR(0, 7139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7141 + * data["__cuCtxGetExecAffinity"] = __cuCtxGetExecAffinity + * global __cuCtxRecordEvent + * data["__cuCtxRecordEvent"] = __cuCtxRecordEvent # <<<<<<<<<<<<<< + * global __cuCtxWaitEvent + * data["__cuCtxWaitEvent"] = __cuCtxWaitEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxRecordEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7141, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7143 + * data["__cuCtxRecordEvent"] = __cuCtxRecordEvent + * global __cuCtxWaitEvent + * data["__cuCtxWaitEvent"] = __cuCtxWaitEvent # <<<<<<<<<<<<<< + * global __cuCtxAttach + * data["__cuCtxAttach"] = __cuCtxAttach +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxWaitEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7143, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7145 + * data["__cuCtxWaitEvent"] = __cuCtxWaitEvent + * global __cuCtxAttach + * data["__cuCtxAttach"] = __cuCtxAttach # <<<<<<<<<<<<<< + * global __cuCtxDetach + * data["__cuCtxDetach"] = __cuCtxDetach +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxAttach, __pyx_t_3) < 0))) __PYX_ERR(0, 7145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7147 + * data["__cuCtxAttach"] = __cuCtxAttach + * global __cuCtxDetach + * data["__cuCtxDetach"] = __cuCtxDetach # <<<<<<<<<<<<<< + * global __cuCtxGetSharedMemConfig + * data["__cuCtxGetSharedMemConfig"] = __cuCtxGetSharedMemConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxDetach, __pyx_t_3) < 0))) __PYX_ERR(0, 7147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7149 + * data["__cuCtxDetach"] = __cuCtxDetach + * global __cuCtxGetSharedMemConfig + * data["__cuCtxGetSharedMemConfig"] = __cuCtxGetSharedMemConfig # <<<<<<<<<<<<<< + * global __cuCtxSetSharedMemConfig + * data["__cuCtxSetSharedMemConfig"] = __cuCtxSetSharedMemConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetSharedMemConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7151 + * data["__cuCtxGetSharedMemConfig"] = __cuCtxGetSharedMemConfig + * global __cuCtxSetSharedMemConfig + * data["__cuCtxSetSharedMemConfig"] = __cuCtxSetSharedMemConfig # <<<<<<<<<<<<<< + * global __cuModuleLoad + * data["__cuModuleLoad"] = __cuModuleLoad +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxSetSharedMemConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7151, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7153 + * data["__cuCtxSetSharedMemConfig"] = __cuCtxSetSharedMemConfig + * global __cuModuleLoad + * data["__cuModuleLoad"] = __cuModuleLoad # <<<<<<<<<<<<<< + * global __cuModuleLoadData + * data["__cuModuleLoadData"] = __cuModuleLoadData +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleLoad, __pyx_t_3) < 0))) __PYX_ERR(0, 7153, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7155 + * data["__cuModuleLoad"] = __cuModuleLoad + * global __cuModuleLoadData + * data["__cuModuleLoadData"] = __cuModuleLoadData # <<<<<<<<<<<<<< + * global __cuModuleLoadDataEx + * data["__cuModuleLoadDataEx"] = __cuModuleLoadDataEx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleLoadData, __pyx_t_3) < 0))) __PYX_ERR(0, 7155, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7157 + * data["__cuModuleLoadData"] = __cuModuleLoadData + * global __cuModuleLoadDataEx + * data["__cuModuleLoadDataEx"] = __cuModuleLoadDataEx # <<<<<<<<<<<<<< + * global __cuModuleLoadFatBinary + * data["__cuModuleLoadFatBinary"] = __cuModuleLoadFatBinary +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleLoadDataEx, __pyx_t_3) < 0))) __PYX_ERR(0, 7157, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7159 + * data["__cuModuleLoadDataEx"] = __cuModuleLoadDataEx + * global __cuModuleLoadFatBinary + * data["__cuModuleLoadFatBinary"] = __cuModuleLoadFatBinary # <<<<<<<<<<<<<< + * global __cuModuleUnload + * data["__cuModuleUnload"] = __cuModuleUnload +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleLoadFatBinary, __pyx_t_3) < 0))) __PYX_ERR(0, 7159, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7161 + * data["__cuModuleLoadFatBinary"] = __cuModuleLoadFatBinary + * global __cuModuleUnload + * data["__cuModuleUnload"] = __cuModuleUnload # <<<<<<<<<<<<<< + * global __cuModuleGetLoadingMode + * data["__cuModuleGetLoadingMode"] = __cuModuleGetLoadingMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleUnload, __pyx_t_3) < 0))) __PYX_ERR(0, 7161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7163 + * data["__cuModuleUnload"] = __cuModuleUnload + * global __cuModuleGetLoadingMode + * data["__cuModuleGetLoadingMode"] = __cuModuleGetLoadingMode # <<<<<<<<<<<<<< + * global __cuModuleGetFunction + * data["__cuModuleGetFunction"] = __cuModuleGetFunction +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetLoadingMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7163, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7165 + * data["__cuModuleGetLoadingMode"] = __cuModuleGetLoadingMode + * global __cuModuleGetFunction + * data["__cuModuleGetFunction"] = __cuModuleGetFunction # <<<<<<<<<<<<<< + * global __cuModuleGetFunctionCount + * data["__cuModuleGetFunctionCount"] = __cuModuleGetFunctionCount +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetFunction, __pyx_t_3) < 0))) __PYX_ERR(0, 7165, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7167 + * data["__cuModuleGetFunction"] = __cuModuleGetFunction + * global __cuModuleGetFunctionCount + * data["__cuModuleGetFunctionCount"] = __cuModuleGetFunctionCount # <<<<<<<<<<<<<< + * global __cuModuleEnumerateFunctions + * data["__cuModuleEnumerateFunctions"] = __cuModuleEnumerateFunctions +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetFunctionCount, __pyx_t_3) < 0))) __PYX_ERR(0, 7167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7169 + * data["__cuModuleGetFunctionCount"] = __cuModuleGetFunctionCount + * global __cuModuleEnumerateFunctions + * data["__cuModuleEnumerateFunctions"] = __cuModuleEnumerateFunctions # <<<<<<<<<<<<<< + * global __cuModuleGetGlobal_v2 + * data["__cuModuleGetGlobal_v2"] = __cuModuleGetGlobal_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7169, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleEnumerateFunctions, __pyx_t_3) < 0))) __PYX_ERR(0, 7169, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7171 + * data["__cuModuleEnumerateFunctions"] = __cuModuleEnumerateFunctions + * global __cuModuleGetGlobal_v2 + * data["__cuModuleGetGlobal_v2"] = __cuModuleGetGlobal_v2 # <<<<<<<<<<<<<< + * global __cuLinkCreate_v2 + * data["__cuLinkCreate_v2"] = __cuLinkCreate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7171, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetGlobal_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7171, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7173 + * data["__cuModuleGetGlobal_v2"] = __cuModuleGetGlobal_v2 + * global __cuLinkCreate_v2 + * data["__cuLinkCreate_v2"] = __cuLinkCreate_v2 # <<<<<<<<<<<<<< + * global __cuLinkAddData_v2 + * data["__cuLinkAddData_v2"] = __cuLinkAddData_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLinkCreate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7175 + * data["__cuLinkCreate_v2"] = __cuLinkCreate_v2 + * global __cuLinkAddData_v2 + * data["__cuLinkAddData_v2"] = __cuLinkAddData_v2 # <<<<<<<<<<<<<< + * global __cuLinkAddFile_v2 + * data["__cuLinkAddFile_v2"] = __cuLinkAddFile_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLinkAddData_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7175, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7177 + * data["__cuLinkAddData_v2"] = __cuLinkAddData_v2 + * global __cuLinkAddFile_v2 + * data["__cuLinkAddFile_v2"] = __cuLinkAddFile_v2 # <<<<<<<<<<<<<< + * global __cuLinkComplete + * data["__cuLinkComplete"] = __cuLinkComplete +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLinkAddFile_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7177, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7179 + * data["__cuLinkAddFile_v2"] = __cuLinkAddFile_v2 + * global __cuLinkComplete + * data["__cuLinkComplete"] = __cuLinkComplete # <<<<<<<<<<<<<< + * global __cuLinkDestroy + * data["__cuLinkDestroy"] = __cuLinkDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLinkComplete, __pyx_t_3) < 0))) __PYX_ERR(0, 7179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7181 + * data["__cuLinkComplete"] = __cuLinkComplete + * global __cuLinkDestroy + * data["__cuLinkDestroy"] = __cuLinkDestroy # <<<<<<<<<<<<<< + * global __cuModuleGetTexRef + * data["__cuModuleGetTexRef"] = __cuModuleGetTexRef +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLinkDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7183 + * data["__cuLinkDestroy"] = __cuLinkDestroy + * global __cuModuleGetTexRef + * data["__cuModuleGetTexRef"] = __cuModuleGetTexRef # <<<<<<<<<<<<<< + * global __cuModuleGetSurfRef + * data["__cuModuleGetSurfRef"] = __cuModuleGetSurfRef +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetTexRef, __pyx_t_3) < 0))) __PYX_ERR(0, 7183, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7185 + * data["__cuModuleGetTexRef"] = __cuModuleGetTexRef + * global __cuModuleGetSurfRef + * data["__cuModuleGetSurfRef"] = __cuModuleGetSurfRef # <<<<<<<<<<<<<< + * global __cuLibraryLoadData + * data["__cuLibraryLoadData"] = __cuLibraryLoadData +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuModuleGetSurfRef, __pyx_t_3) < 0))) __PYX_ERR(0, 7185, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7187 + * data["__cuModuleGetSurfRef"] = __cuModuleGetSurfRef + * global __cuLibraryLoadData + * data["__cuLibraryLoadData"] = __cuLibraryLoadData # <<<<<<<<<<<<<< + * global __cuLibraryLoadFromFile + * data["__cuLibraryLoadFromFile"] = __cuLibraryLoadFromFile +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryLoadData, __pyx_t_3) < 0))) __PYX_ERR(0, 7187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7189 + * data["__cuLibraryLoadData"] = __cuLibraryLoadData + * global __cuLibraryLoadFromFile + * data["__cuLibraryLoadFromFile"] = __cuLibraryLoadFromFile # <<<<<<<<<<<<<< + * global __cuLibraryUnload + * data["__cuLibraryUnload"] = __cuLibraryUnload +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryLoadFromFile, __pyx_t_3) < 0))) __PYX_ERR(0, 7189, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7191 + * data["__cuLibraryLoadFromFile"] = __cuLibraryLoadFromFile + * global __cuLibraryUnload + * data["__cuLibraryUnload"] = __cuLibraryUnload # <<<<<<<<<<<<<< + * global __cuLibraryGetKernel + * data["__cuLibraryGetKernel"] = __cuLibraryGetKernel +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryUnload, __pyx_t_3) < 0))) __PYX_ERR(0, 7191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7193 + * data["__cuLibraryUnload"] = __cuLibraryUnload + * global __cuLibraryGetKernel + * data["__cuLibraryGetKernel"] = __cuLibraryGetKernel # <<<<<<<<<<<<<< + * global __cuLibraryGetKernelCount + * data["__cuLibraryGetKernelCount"] = __cuLibraryGetKernelCount +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetKernel, __pyx_t_3) < 0))) __PYX_ERR(0, 7193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7195 + * data["__cuLibraryGetKernel"] = __cuLibraryGetKernel + * global __cuLibraryGetKernelCount + * data["__cuLibraryGetKernelCount"] = __cuLibraryGetKernelCount # <<<<<<<<<<<<<< + * global __cuLibraryEnumerateKernels + * data["__cuLibraryEnumerateKernels"] = __cuLibraryEnumerateKernels +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetKernelCount, __pyx_t_3) < 0))) __PYX_ERR(0, 7195, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7197 + * data["__cuLibraryGetKernelCount"] = __cuLibraryGetKernelCount + * global __cuLibraryEnumerateKernels + * data["__cuLibraryEnumerateKernels"] = __cuLibraryEnumerateKernels # <<<<<<<<<<<<<< + * global __cuLibraryGetModule + * data["__cuLibraryGetModule"] = __cuLibraryGetModule +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryEnumerateKernels, __pyx_t_3) < 0))) __PYX_ERR(0, 7197, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7199 + * data["__cuLibraryEnumerateKernels"] = __cuLibraryEnumerateKernels + * global __cuLibraryGetModule + * data["__cuLibraryGetModule"] = __cuLibraryGetModule # <<<<<<<<<<<<<< + * global __cuKernelGetFunction + * data["__cuKernelGetFunction"] = __cuKernelGetFunction +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetModule, __pyx_t_3) < 0))) __PYX_ERR(0, 7199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7201 + * data["__cuLibraryGetModule"] = __cuLibraryGetModule + * global __cuKernelGetFunction + * data["__cuKernelGetFunction"] = __cuKernelGetFunction # <<<<<<<<<<<<<< + * global __cuKernelGetLibrary + * data["__cuKernelGetLibrary"] = __cuKernelGetLibrary +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelGetFunction, __pyx_t_3) < 0))) __PYX_ERR(0, 7201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7203 + * data["__cuKernelGetFunction"] = __cuKernelGetFunction + * global __cuKernelGetLibrary + * data["__cuKernelGetLibrary"] = __cuKernelGetLibrary # <<<<<<<<<<<<<< + * global __cuLibraryGetGlobal + * data["__cuLibraryGetGlobal"] = __cuLibraryGetGlobal +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelGetLibrary, __pyx_t_3) < 0))) __PYX_ERR(0, 7203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7205 + * data["__cuKernelGetLibrary"] = __cuKernelGetLibrary + * global __cuLibraryGetGlobal + * data["__cuLibraryGetGlobal"] = __cuLibraryGetGlobal # <<<<<<<<<<<<<< + * global __cuLibraryGetManaged + * data["__cuLibraryGetManaged"] = __cuLibraryGetManaged +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetGlobal, __pyx_t_3) < 0))) __PYX_ERR(0, 7205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7207 + * data["__cuLibraryGetGlobal"] = __cuLibraryGetGlobal + * global __cuLibraryGetManaged + * data["__cuLibraryGetManaged"] = __cuLibraryGetManaged # <<<<<<<<<<<<<< + * global __cuLibraryGetUnifiedFunction + * data["__cuLibraryGetUnifiedFunction"] = __cuLibraryGetUnifiedFunction +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetManaged, __pyx_t_3) < 0))) __PYX_ERR(0, 7207, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7209 + * data["__cuLibraryGetManaged"] = __cuLibraryGetManaged + * global __cuLibraryGetUnifiedFunction + * data["__cuLibraryGetUnifiedFunction"] = __cuLibraryGetUnifiedFunction # <<<<<<<<<<<<<< + * global __cuKernelGetAttribute + * data["__cuKernelGetAttribute"] = __cuKernelGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLibraryGetUnifiedFunction, __pyx_t_3) < 0))) __PYX_ERR(0, 7209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7211 + * data["__cuLibraryGetUnifiedFunction"] = __cuLibraryGetUnifiedFunction + * global __cuKernelGetAttribute + * data["__cuKernelGetAttribute"] = __cuKernelGetAttribute # <<<<<<<<<<<<<< + * global __cuKernelSetAttribute + * data["__cuKernelSetAttribute"] = __cuKernelSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7213 + * data["__cuKernelGetAttribute"] = __cuKernelGetAttribute + * global __cuKernelSetAttribute + * data["__cuKernelSetAttribute"] = __cuKernelSetAttribute # <<<<<<<<<<<<<< + * global __cuKernelSetCacheConfig + * data["__cuKernelSetCacheConfig"] = __cuKernelSetCacheConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7215 + * data["__cuKernelSetAttribute"] = __cuKernelSetAttribute + * global __cuKernelSetCacheConfig + * data["__cuKernelSetCacheConfig"] = __cuKernelSetCacheConfig # <<<<<<<<<<<<<< + * global __cuKernelGetName + * data["__cuKernelGetName"] = __cuKernelGetName +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelSetCacheConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7217 + * data["__cuKernelSetCacheConfig"] = __cuKernelSetCacheConfig + * global __cuKernelGetName + * data["__cuKernelGetName"] = __cuKernelGetName # <<<<<<<<<<<<<< + * global __cuKernelGetParamInfo + * data["__cuKernelGetParamInfo"] = __cuKernelGetParamInfo +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelGetName, __pyx_t_3) < 0))) __PYX_ERR(0, 7217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7219 + * data["__cuKernelGetName"] = __cuKernelGetName + * global __cuKernelGetParamInfo + * data["__cuKernelGetParamInfo"] = __cuKernelGetParamInfo # <<<<<<<<<<<<<< + * global __cuMemGetInfo_v2 + * data["__cuMemGetInfo_v2"] = __cuMemGetInfo_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuKernelGetParamInfo, __pyx_t_3) < 0))) __PYX_ERR(0, 7219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7221 + * data["__cuKernelGetParamInfo"] = __cuKernelGetParamInfo + * global __cuMemGetInfo_v2 + * data["__cuMemGetInfo_v2"] = __cuMemGetInfo_v2 # <<<<<<<<<<<<<< + * global __cuMemAlloc_v2 + * data["__cuMemAlloc_v2"] = __cuMemAlloc_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetInfo_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7223 + * data["__cuMemGetInfo_v2"] = __cuMemGetInfo_v2 + * global __cuMemAlloc_v2 + * data["__cuMemAlloc_v2"] = __cuMemAlloc_v2 # <<<<<<<<<<<<<< + * global __cuMemAllocPitch_v2 + * data["__cuMemAllocPitch_v2"] = __cuMemAllocPitch_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAlloc_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7225 + * data["__cuMemAlloc_v2"] = __cuMemAlloc_v2 + * global __cuMemAllocPitch_v2 + * data["__cuMemAllocPitch_v2"] = __cuMemAllocPitch_v2 # <<<<<<<<<<<<<< + * global __cuMemFree_v2 + * data["__cuMemFree_v2"] = __cuMemFree_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAllocPitch_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7227 + * data["__cuMemAllocPitch_v2"] = __cuMemAllocPitch_v2 + * global __cuMemFree_v2 + * data["__cuMemFree_v2"] = __cuMemFree_v2 # <<<<<<<<<<<<<< + * global __cuMemGetAddressRange_v2 + * data["__cuMemGetAddressRange_v2"] = __cuMemGetAddressRange_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemFree_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7229 + * data["__cuMemFree_v2"] = __cuMemFree_v2 + * global __cuMemGetAddressRange_v2 + * data["__cuMemGetAddressRange_v2"] = __cuMemGetAddressRange_v2 # <<<<<<<<<<<<<< + * global __cuMemAllocHost_v2 + * data["__cuMemAllocHost_v2"] = __cuMemAllocHost_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetAddressRange_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7231 + * data["__cuMemGetAddressRange_v2"] = __cuMemGetAddressRange_v2 + * global __cuMemAllocHost_v2 + * data["__cuMemAllocHost_v2"] = __cuMemAllocHost_v2 # <<<<<<<<<<<<<< + * global __cuMemFreeHost + * data["__cuMemFreeHost"] = __cuMemFreeHost +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAllocHost_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7233 + * data["__cuMemAllocHost_v2"] = __cuMemAllocHost_v2 + * global __cuMemFreeHost + * data["__cuMemFreeHost"] = __cuMemFreeHost # <<<<<<<<<<<<<< + * global __cuMemHostAlloc + * data["__cuMemHostAlloc"] = __cuMemHostAlloc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemFreeHost, __pyx_t_3) < 0))) __PYX_ERR(0, 7233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7235 + * data["__cuMemFreeHost"] = __cuMemFreeHost + * global __cuMemHostAlloc + * data["__cuMemHostAlloc"] = __cuMemHostAlloc # <<<<<<<<<<<<<< + * global __cuMemHostGetDevicePointer_v2 + * data["__cuMemHostGetDevicePointer_v2"] = __cuMemHostGetDevicePointer_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemHostAlloc, __pyx_t_3) < 0))) __PYX_ERR(0, 7235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7237 + * data["__cuMemHostAlloc"] = __cuMemHostAlloc + * global __cuMemHostGetDevicePointer_v2 + * data["__cuMemHostGetDevicePointer_v2"] = __cuMemHostGetDevicePointer_v2 # <<<<<<<<<<<<<< + * global __cuMemHostGetFlags + * data["__cuMemHostGetFlags"] = __cuMemHostGetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemHostGetDevicePointer_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7239 + * data["__cuMemHostGetDevicePointer_v2"] = __cuMemHostGetDevicePointer_v2 + * global __cuMemHostGetFlags + * data["__cuMemHostGetFlags"] = __cuMemHostGetFlags # <<<<<<<<<<<<<< + * global __cuMemAllocManaged + * data["__cuMemAllocManaged"] = __cuMemAllocManaged +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemHostGetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7239, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7241 + * data["__cuMemHostGetFlags"] = __cuMemHostGetFlags + * global __cuMemAllocManaged + * data["__cuMemAllocManaged"] = __cuMemAllocManaged # <<<<<<<<<<<<<< + * global __cuDeviceRegisterAsyncNotification + * data["__cuDeviceRegisterAsyncNotification"] = __cuDeviceRegisterAsyncNotification +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAllocManaged, __pyx_t_3) < 0))) __PYX_ERR(0, 7241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7243 + * data["__cuMemAllocManaged"] = __cuMemAllocManaged + * global __cuDeviceRegisterAsyncNotification + * data["__cuDeviceRegisterAsyncNotification"] = __cuDeviceRegisterAsyncNotification # <<<<<<<<<<<<<< + * global __cuDeviceUnregisterAsyncNotification + * data["__cuDeviceUnregisterAsyncNotification"] = __cuDeviceUnregisterAsyncNotification +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceRegisterAsyncNotificat, __pyx_t_3) < 0))) __PYX_ERR(0, 7243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7245 + * data["__cuDeviceRegisterAsyncNotification"] = __cuDeviceRegisterAsyncNotification + * global __cuDeviceUnregisterAsyncNotification + * data["__cuDeviceUnregisterAsyncNotification"] = __cuDeviceUnregisterAsyncNotification # <<<<<<<<<<<<<< + * global __cuDeviceGetByPCIBusId + * data["__cuDeviceGetByPCIBusId"] = __cuDeviceGetByPCIBusId +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceUnregisterAsyncNotific, __pyx_t_3) < 0))) __PYX_ERR(0, 7245, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7247 + * data["__cuDeviceUnregisterAsyncNotification"] = __cuDeviceUnregisterAsyncNotification + * global __cuDeviceGetByPCIBusId + * data["__cuDeviceGetByPCIBusId"] = __cuDeviceGetByPCIBusId # <<<<<<<<<<<<<< + * global __cuDeviceGetPCIBusId + * data["__cuDeviceGetPCIBusId"] = __cuDeviceGetPCIBusId +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetByPCIBusId, __pyx_t_3) < 0))) __PYX_ERR(0, 7247, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7249 + * data["__cuDeviceGetByPCIBusId"] = __cuDeviceGetByPCIBusId + * global __cuDeviceGetPCIBusId + * data["__cuDeviceGetPCIBusId"] = __cuDeviceGetPCIBusId # <<<<<<<<<<<<<< + * global __cuIpcGetEventHandle + * data["__cuIpcGetEventHandle"] = __cuIpcGetEventHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetPCIBusId, __pyx_t_3) < 0))) __PYX_ERR(0, 7249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7251 + * data["__cuDeviceGetPCIBusId"] = __cuDeviceGetPCIBusId + * global __cuIpcGetEventHandle + * data["__cuIpcGetEventHandle"] = __cuIpcGetEventHandle # <<<<<<<<<<<<<< + * global __cuIpcOpenEventHandle + * data["__cuIpcOpenEventHandle"] = __cuIpcOpenEventHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuIpcGetEventHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7253 + * data["__cuIpcGetEventHandle"] = __cuIpcGetEventHandle + * global __cuIpcOpenEventHandle + * data["__cuIpcOpenEventHandle"] = __cuIpcOpenEventHandle # <<<<<<<<<<<<<< + * global __cuIpcGetMemHandle + * data["__cuIpcGetMemHandle"] = __cuIpcGetMemHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuIpcOpenEventHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7253, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7255 + * data["__cuIpcOpenEventHandle"] = __cuIpcOpenEventHandle + * global __cuIpcGetMemHandle + * data["__cuIpcGetMemHandle"] = __cuIpcGetMemHandle # <<<<<<<<<<<<<< + * global __cuIpcOpenMemHandle_v2 + * data["__cuIpcOpenMemHandle_v2"] = __cuIpcOpenMemHandle_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuIpcGetMemHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7257 + * data["__cuIpcGetMemHandle"] = __cuIpcGetMemHandle + * global __cuIpcOpenMemHandle_v2 + * data["__cuIpcOpenMemHandle_v2"] = __cuIpcOpenMemHandle_v2 # <<<<<<<<<<<<<< + * global __cuIpcCloseMemHandle + * data["__cuIpcCloseMemHandle"] = __cuIpcCloseMemHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuIpcOpenMemHandle_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7257, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7259 + * data["__cuIpcOpenMemHandle_v2"] = __cuIpcOpenMemHandle_v2 + * global __cuIpcCloseMemHandle + * data["__cuIpcCloseMemHandle"] = __cuIpcCloseMemHandle # <<<<<<<<<<<<<< + * global __cuMemHostRegister_v2 + * data["__cuMemHostRegister_v2"] = __cuMemHostRegister_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7259, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuIpcCloseMemHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7259, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7261 + * data["__cuIpcCloseMemHandle"] = __cuIpcCloseMemHandle + * global __cuMemHostRegister_v2 + * data["__cuMemHostRegister_v2"] = __cuMemHostRegister_v2 # <<<<<<<<<<<<<< + * global __cuMemHostUnregister + * data["__cuMemHostUnregister"] = __cuMemHostUnregister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemHostRegister_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7263 + * data["__cuMemHostRegister_v2"] = __cuMemHostRegister_v2 + * global __cuMemHostUnregister + * data["__cuMemHostUnregister"] = __cuMemHostUnregister # <<<<<<<<<<<<<< + * global __cuMemcpy + * data["__cuMemcpy"] = __cuMemcpy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemHostUnregister, __pyx_t_3) < 0))) __PYX_ERR(0, 7263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7265 + * data["__cuMemHostUnregister"] = __cuMemHostUnregister + * global __cuMemcpy + * data["__cuMemcpy"] = __cuMemcpy # <<<<<<<<<<<<<< + * global __cuMemcpyPeer + * data["__cuMemcpyPeer"] = __cuMemcpyPeer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7265, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy, __pyx_t_3) < 0))) __PYX_ERR(0, 7265, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7267 + * data["__cuMemcpy"] = __cuMemcpy + * global __cuMemcpyPeer + * data["__cuMemcpyPeer"] = __cuMemcpyPeer # <<<<<<<<<<<<<< + * global __cuMemcpyHtoD_v2 + * data["__cuMemcpyHtoD_v2"] = __cuMemcpyHtoD_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyPeer, __pyx_t_3) < 0))) __PYX_ERR(0, 7267, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7269 + * data["__cuMemcpyPeer"] = __cuMemcpyPeer + * global __cuMemcpyHtoD_v2 + * data["__cuMemcpyHtoD_v2"] = __cuMemcpyHtoD_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyDtoH_v2 + * data["__cuMemcpyDtoH_v2"] = __cuMemcpyDtoH_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyHtoD_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7269, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7271 + * data["__cuMemcpyHtoD_v2"] = __cuMemcpyHtoD_v2 + * global __cuMemcpyDtoH_v2 + * data["__cuMemcpyDtoH_v2"] = __cuMemcpyDtoH_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyDtoD_v2 + * data["__cuMemcpyDtoD_v2"] = __cuMemcpyDtoD_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyDtoH_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7271, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7273 + * data["__cuMemcpyDtoH_v2"] = __cuMemcpyDtoH_v2 + * global __cuMemcpyDtoD_v2 + * data["__cuMemcpyDtoD_v2"] = __cuMemcpyDtoD_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyDtoA_v2 + * data["__cuMemcpyDtoA_v2"] = __cuMemcpyDtoA_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyDtoD_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7273, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7275 + * data["__cuMemcpyDtoD_v2"] = __cuMemcpyDtoD_v2 + * global __cuMemcpyDtoA_v2 + * data["__cuMemcpyDtoA_v2"] = __cuMemcpyDtoA_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyAtoD_v2 + * data["__cuMemcpyAtoD_v2"] = __cuMemcpyAtoD_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyDtoA_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7277 + * data["__cuMemcpyDtoA_v2"] = __cuMemcpyDtoA_v2 + * global __cuMemcpyAtoD_v2 + * data["__cuMemcpyAtoD_v2"] = __cuMemcpyAtoD_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyHtoA_v2 + * data["__cuMemcpyHtoA_v2"] = __cuMemcpyHtoA_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyAtoD_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7279 + * data["__cuMemcpyAtoD_v2"] = __cuMemcpyAtoD_v2 + * global __cuMemcpyHtoA_v2 + * data["__cuMemcpyHtoA_v2"] = __cuMemcpyHtoA_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyAtoH_v2 + * data["__cuMemcpyAtoH_v2"] = __cuMemcpyAtoH_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyHtoA_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7281 + * data["__cuMemcpyHtoA_v2"] = __cuMemcpyHtoA_v2 + * global __cuMemcpyAtoH_v2 + * data["__cuMemcpyAtoH_v2"] = __cuMemcpyAtoH_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyAtoA_v2 + * data["__cuMemcpyAtoA_v2"] = __cuMemcpyAtoA_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyAtoH_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7281, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7283 + * data["__cuMemcpyAtoH_v2"] = __cuMemcpyAtoH_v2 + * global __cuMemcpyAtoA_v2 + * data["__cuMemcpyAtoA_v2"] = __cuMemcpyAtoA_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy2D_v2 + * data["__cuMemcpy2D_v2"] = __cuMemcpy2D_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyAtoA_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7283, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7285 + * data["__cuMemcpyAtoA_v2"] = __cuMemcpyAtoA_v2 + * global __cuMemcpy2D_v2 + * data["__cuMemcpy2D_v2"] = __cuMemcpy2D_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy2DUnaligned_v2 + * data["__cuMemcpy2DUnaligned_v2"] = __cuMemcpy2DUnaligned_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy2D_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7287 + * data["__cuMemcpy2D_v2"] = __cuMemcpy2D_v2 + * global __cuMemcpy2DUnaligned_v2 + * data["__cuMemcpy2DUnaligned_v2"] = __cuMemcpy2DUnaligned_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy3D_v2 + * data["__cuMemcpy3D_v2"] = __cuMemcpy3D_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy2DUnaligned_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7287, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7289 + * data["__cuMemcpy2DUnaligned_v2"] = __cuMemcpy2DUnaligned_v2 + * global __cuMemcpy3D_v2 + * data["__cuMemcpy3D_v2"] = __cuMemcpy3D_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeer + * data["__cuMemcpy3DPeer"] = __cuMemcpy3DPeer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7289, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy3D_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7289, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7291 + * data["__cuMemcpy3D_v2"] = __cuMemcpy3D_v2 + * global __cuMemcpy3DPeer + * data["__cuMemcpy3DPeer"] = __cuMemcpy3DPeer # <<<<<<<<<<<<<< + * global __cuMemcpyAsync + * data["__cuMemcpyAsync"] = __cuMemcpyAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy3DPeer, __pyx_t_3) < 0))) __PYX_ERR(0, 7291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7293 + * data["__cuMemcpy3DPeer"] = __cuMemcpy3DPeer + * global __cuMemcpyAsync + * data["__cuMemcpyAsync"] = __cuMemcpyAsync # <<<<<<<<<<<<<< + * global __cuMemcpyPeerAsync + * data["__cuMemcpyPeerAsync"] = __cuMemcpyPeerAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7293, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7295 + * data["__cuMemcpyAsync"] = __cuMemcpyAsync + * global __cuMemcpyPeerAsync + * data["__cuMemcpyPeerAsync"] = __cuMemcpyPeerAsync # <<<<<<<<<<<<<< + * global __cuMemcpyHtoDAsync_v2 + * data["__cuMemcpyHtoDAsync_v2"] = __cuMemcpyHtoDAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyPeerAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7297 + * data["__cuMemcpyPeerAsync"] = __cuMemcpyPeerAsync + * global __cuMemcpyHtoDAsync_v2 + * data["__cuMemcpyHtoDAsync_v2"] = __cuMemcpyHtoDAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyDtoHAsync_v2 + * data["__cuMemcpyDtoHAsync_v2"] = __cuMemcpyDtoHAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7297, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyHtoDAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7297, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7299 + * data["__cuMemcpyHtoDAsync_v2"] = __cuMemcpyHtoDAsync_v2 + * global __cuMemcpyDtoHAsync_v2 + * data["__cuMemcpyDtoHAsync_v2"] = __cuMemcpyDtoHAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyDtoDAsync_v2 + * data["__cuMemcpyDtoDAsync_v2"] = __cuMemcpyDtoDAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7299, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyDtoHAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7299, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7301 + * data["__cuMemcpyDtoHAsync_v2"] = __cuMemcpyDtoHAsync_v2 + * global __cuMemcpyDtoDAsync_v2 + * data["__cuMemcpyDtoDAsync_v2"] = __cuMemcpyDtoDAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyHtoAAsync_v2 + * data["__cuMemcpyHtoAAsync_v2"] = __cuMemcpyHtoAAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyDtoDAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7303 + * data["__cuMemcpyDtoDAsync_v2"] = __cuMemcpyDtoDAsync_v2 + * global __cuMemcpyHtoAAsync_v2 + * data["__cuMemcpyHtoAAsync_v2"] = __cuMemcpyHtoAAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpyAtoHAsync_v2 + * data["__cuMemcpyAtoHAsync_v2"] = __cuMemcpyAtoHAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyHtoAAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7305 + * data["__cuMemcpyHtoAAsync_v2"] = __cuMemcpyHtoAAsync_v2 + * global __cuMemcpyAtoHAsync_v2 + * data["__cuMemcpyAtoHAsync_v2"] = __cuMemcpyAtoHAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy2DAsync_v2 + * data["__cuMemcpy2DAsync_v2"] = __cuMemcpy2DAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyAtoHAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7307 + * data["__cuMemcpyAtoHAsync_v2"] = __cuMemcpyAtoHAsync_v2 + * global __cuMemcpy2DAsync_v2 + * data["__cuMemcpy2DAsync_v2"] = __cuMemcpy2DAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy3DAsync_v2 + * data["__cuMemcpy3DAsync_v2"] = __cuMemcpy3DAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7307, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy2DAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7307, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7309 + * data["__cuMemcpy2DAsync_v2"] = __cuMemcpy2DAsync_v2 + * global __cuMemcpy3DAsync_v2 + * data["__cuMemcpy3DAsync_v2"] = __cuMemcpy3DAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemcpy3DPeerAsync + * data["__cuMemcpy3DPeerAsync"] = __cuMemcpy3DPeerAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy3DAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7309, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7311 + * data["__cuMemcpy3DAsync_v2"] = __cuMemcpy3DAsync_v2 + * global __cuMemcpy3DPeerAsync + * data["__cuMemcpy3DPeerAsync"] = __cuMemcpy3DPeerAsync # <<<<<<<<<<<<<< + * global __cuMemcpyBatchAsync + * data["__cuMemcpyBatchAsync"] = __cuMemcpyBatchAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy3DPeerAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7311, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7313 + * data["__cuMemcpy3DPeerAsync"] = __cuMemcpy3DPeerAsync + * global __cuMemcpyBatchAsync + * data["__cuMemcpyBatchAsync"] = __cuMemcpyBatchAsync # <<<<<<<<<<<<<< + * global __cuMemcpy3DBatchAsync + * data["__cuMemcpy3DBatchAsync"] = __cuMemcpy3DBatchAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpyBatchAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7313, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7315 + * data["__cuMemcpyBatchAsync"] = __cuMemcpyBatchAsync + * global __cuMemcpy3DBatchAsync + * data["__cuMemcpy3DBatchAsync"] = __cuMemcpy3DBatchAsync # <<<<<<<<<<<<<< + * global __cuMemsetD8_v2 + * data["__cuMemsetD8_v2"] = __cuMemsetD8_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemcpy3DBatchAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7315, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7317 + * data["__cuMemcpy3DBatchAsync"] = __cuMemcpy3DBatchAsync + * global __cuMemsetD8_v2 + * data["__cuMemsetD8_v2"] = __cuMemsetD8_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD16_v2 + * data["__cuMemsetD16_v2"] = __cuMemsetD16_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD8_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7317, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7319 + * data["__cuMemsetD8_v2"] = __cuMemsetD8_v2 + * global __cuMemsetD16_v2 + * data["__cuMemsetD16_v2"] = __cuMemsetD16_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD32_v2 + * data["__cuMemsetD32_v2"] = __cuMemsetD32_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD16_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7319, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7321 + * data["__cuMemsetD16_v2"] = __cuMemsetD16_v2 + * global __cuMemsetD32_v2 + * data["__cuMemsetD32_v2"] = __cuMemsetD32_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD2D8_v2 + * data["__cuMemsetD2D8_v2"] = __cuMemsetD2D8_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD32_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7321, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7323 + * data["__cuMemsetD32_v2"] = __cuMemsetD32_v2 + * global __cuMemsetD2D8_v2 + * data["__cuMemsetD2D8_v2"] = __cuMemsetD2D8_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD2D16_v2 + * data["__cuMemsetD2D16_v2"] = __cuMemsetD2D16_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D8_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7325 + * data["__cuMemsetD2D8_v2"] = __cuMemsetD2D8_v2 + * global __cuMemsetD2D16_v2 + * data["__cuMemsetD2D16_v2"] = __cuMemsetD2D16_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD2D32_v2 + * data["__cuMemsetD2D32_v2"] = __cuMemsetD2D32_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D16_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7325, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7327 + * data["__cuMemsetD2D16_v2"] = __cuMemsetD2D16_v2 + * global __cuMemsetD2D32_v2 + * data["__cuMemsetD2D32_v2"] = __cuMemsetD2D32_v2 # <<<<<<<<<<<<<< + * global __cuMemsetD8Async + * data["__cuMemsetD8Async"] = __cuMemsetD8Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D32_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7327, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7329 + * data["__cuMemsetD2D32_v2"] = __cuMemsetD2D32_v2 + * global __cuMemsetD8Async + * data["__cuMemsetD8Async"] = __cuMemsetD8Async # <<<<<<<<<<<<<< + * global __cuMemsetD16Async + * data["__cuMemsetD16Async"] = __cuMemsetD16Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD8Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7331 + * data["__cuMemsetD8Async"] = __cuMemsetD8Async + * global __cuMemsetD16Async + * data["__cuMemsetD16Async"] = __cuMemsetD16Async # <<<<<<<<<<<<<< + * global __cuMemsetD32Async + * data["__cuMemsetD32Async"] = __cuMemsetD32Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD16Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7331, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7333 + * data["__cuMemsetD16Async"] = __cuMemsetD16Async + * global __cuMemsetD32Async + * data["__cuMemsetD32Async"] = __cuMemsetD32Async # <<<<<<<<<<<<<< + * global __cuMemsetD2D8Async + * data["__cuMemsetD2D8Async"] = __cuMemsetD2D8Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD32Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7335 + * data["__cuMemsetD32Async"] = __cuMemsetD32Async + * global __cuMemsetD2D8Async + * data["__cuMemsetD2D8Async"] = __cuMemsetD2D8Async # <<<<<<<<<<<<<< + * global __cuMemsetD2D16Async + * data["__cuMemsetD2D16Async"] = __cuMemsetD2D16Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D8Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7337 + * data["__cuMemsetD2D8Async"] = __cuMemsetD2D8Async + * global __cuMemsetD2D16Async + * data["__cuMemsetD2D16Async"] = __cuMemsetD2D16Async # <<<<<<<<<<<<<< + * global __cuMemsetD2D32Async + * data["__cuMemsetD2D32Async"] = __cuMemsetD2D32Async +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D16Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7339 + * data["__cuMemsetD2D16Async"] = __cuMemsetD2D16Async + * global __cuMemsetD2D32Async + * data["__cuMemsetD2D32Async"] = __cuMemsetD2D32Async # <<<<<<<<<<<<<< + * global __cuArrayCreate_v2 + * data["__cuArrayCreate_v2"] = __cuArrayCreate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemsetD2D32Async, __pyx_t_3) < 0))) __PYX_ERR(0, 7339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7341 + * data["__cuMemsetD2D32Async"] = __cuMemsetD2D32Async + * global __cuArrayCreate_v2 + * data["__cuArrayCreate_v2"] = __cuArrayCreate_v2 # <<<<<<<<<<<<<< + * global __cuArrayGetDescriptor_v2 + * data["__cuArrayGetDescriptor_v2"] = __cuArrayGetDescriptor_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayCreate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7341, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7343 + * data["__cuArrayCreate_v2"] = __cuArrayCreate_v2 + * global __cuArrayGetDescriptor_v2 + * data["__cuArrayGetDescriptor_v2"] = __cuArrayGetDescriptor_v2 # <<<<<<<<<<<<<< + * global __cuArrayGetSparseProperties + * data["__cuArrayGetSparseProperties"] = __cuArrayGetSparseProperties +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayGetDescriptor_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7345 + * data["__cuArrayGetDescriptor_v2"] = __cuArrayGetDescriptor_v2 + * global __cuArrayGetSparseProperties + * data["__cuArrayGetSparseProperties"] = __cuArrayGetSparseProperties # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetSparseProperties + * data["__cuMipmappedArrayGetSparseProperties"] = __cuMipmappedArrayGetSparseProperties +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayGetSparseProperties, __pyx_t_3) < 0))) __PYX_ERR(0, 7345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7347 + * data["__cuArrayGetSparseProperties"] = __cuArrayGetSparseProperties + * global __cuMipmappedArrayGetSparseProperties + * data["__cuMipmappedArrayGetSparseProperties"] = __cuMipmappedArrayGetSparseProperties # <<<<<<<<<<<<<< + * global __cuArrayGetMemoryRequirements + * data["__cuArrayGetMemoryRequirements"] = __cuArrayGetMemoryRequirements +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMipmappedArrayGetSparsePrope, __pyx_t_3) < 0))) __PYX_ERR(0, 7347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7349 + * data["__cuMipmappedArrayGetSparseProperties"] = __cuMipmappedArrayGetSparseProperties + * global __cuArrayGetMemoryRequirements + * data["__cuArrayGetMemoryRequirements"] = __cuArrayGetMemoryRequirements # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetMemoryRequirements + * data["__cuMipmappedArrayGetMemoryRequirements"] = __cuMipmappedArrayGetMemoryRequirements +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayGetMemoryRequirements, __pyx_t_3) < 0))) __PYX_ERR(0, 7349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7351 + * data["__cuArrayGetMemoryRequirements"] = __cuArrayGetMemoryRequirements + * global __cuMipmappedArrayGetMemoryRequirements + * data["__cuMipmappedArrayGetMemoryRequirements"] = __cuMipmappedArrayGetMemoryRequirements # <<<<<<<<<<<<<< + * global __cuArrayGetPlane + * data["__cuArrayGetPlane"] = __cuArrayGetPlane +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMipmappedArrayGetMemoryRequi, __pyx_t_3) < 0))) __PYX_ERR(0, 7351, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7353 + * data["__cuMipmappedArrayGetMemoryRequirements"] = __cuMipmappedArrayGetMemoryRequirements + * global __cuArrayGetPlane + * data["__cuArrayGetPlane"] = __cuArrayGetPlane # <<<<<<<<<<<<<< + * global __cuArrayDestroy + * data["__cuArrayDestroy"] = __cuArrayDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayGetPlane, __pyx_t_3) < 0))) __PYX_ERR(0, 7353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7355 + * data["__cuArrayGetPlane"] = __cuArrayGetPlane + * global __cuArrayDestroy + * data["__cuArrayDestroy"] = __cuArrayDestroy # <<<<<<<<<<<<<< + * global __cuArray3DCreate_v2 + * data["__cuArray3DCreate_v2"] = __cuArray3DCreate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArrayDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7355, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7357 + * data["__cuArrayDestroy"] = __cuArrayDestroy + * global __cuArray3DCreate_v2 + * data["__cuArray3DCreate_v2"] = __cuArray3DCreate_v2 # <<<<<<<<<<<<<< + * global __cuArray3DGetDescriptor_v2 + * data["__cuArray3DGetDescriptor_v2"] = __cuArray3DGetDescriptor_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArray3DCreate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7357, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7359 + * data["__cuArray3DCreate_v2"] = __cuArray3DCreate_v2 + * global __cuArray3DGetDescriptor_v2 + * data["__cuArray3DGetDescriptor_v2"] = __cuArray3DGetDescriptor_v2 # <<<<<<<<<<<<<< + * global __cuMipmappedArrayCreate + * data["__cuMipmappedArrayCreate"] = __cuMipmappedArrayCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuArray3DGetDescriptor_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7361 + * data["__cuArray3DGetDescriptor_v2"] = __cuArray3DGetDescriptor_v2 + * global __cuMipmappedArrayCreate + * data["__cuMipmappedArrayCreate"] = __cuMipmappedArrayCreate # <<<<<<<<<<<<<< + * global __cuMipmappedArrayGetLevel + * data["__cuMipmappedArrayGetLevel"] = __cuMipmappedArrayGetLevel +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMipmappedArrayCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7361, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7363 + * data["__cuMipmappedArrayCreate"] = __cuMipmappedArrayCreate + * global __cuMipmappedArrayGetLevel + * data["__cuMipmappedArrayGetLevel"] = __cuMipmappedArrayGetLevel # <<<<<<<<<<<<<< + * global __cuMipmappedArrayDestroy + * data["__cuMipmappedArrayDestroy"] = __cuMipmappedArrayDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMipmappedArrayGetLevel, __pyx_t_3) < 0))) __PYX_ERR(0, 7363, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7365 + * data["__cuMipmappedArrayGetLevel"] = __cuMipmappedArrayGetLevel + * global __cuMipmappedArrayDestroy + * data["__cuMipmappedArrayDestroy"] = __cuMipmappedArrayDestroy # <<<<<<<<<<<<<< + * global __cuMemGetHandleForAddressRange + * data["__cuMemGetHandleForAddressRange"] = __cuMemGetHandleForAddressRange +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMipmappedArrayDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7365, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7367 + * data["__cuMipmappedArrayDestroy"] = __cuMipmappedArrayDestroy + * global __cuMemGetHandleForAddressRange + * data["__cuMemGetHandleForAddressRange"] = __cuMemGetHandleForAddressRange # <<<<<<<<<<<<<< + * global __cuMemBatchDecompressAsync + * data["__cuMemBatchDecompressAsync"] = __cuMemBatchDecompressAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetHandleForAddressRange, __pyx_t_3) < 0))) __PYX_ERR(0, 7367, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7369 + * data["__cuMemGetHandleForAddressRange"] = __cuMemGetHandleForAddressRange + * global __cuMemBatchDecompressAsync + * data["__cuMemBatchDecompressAsync"] = __cuMemBatchDecompressAsync # <<<<<<<<<<<<<< + * global __cuMemAddressReserve + * data["__cuMemAddressReserve"] = __cuMemAddressReserve +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemBatchDecompressAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7369, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7371 + * data["__cuMemBatchDecompressAsync"] = __cuMemBatchDecompressAsync + * global __cuMemAddressReserve + * data["__cuMemAddressReserve"] = __cuMemAddressReserve # <<<<<<<<<<<<<< + * global __cuMemAddressFree + * data["__cuMemAddressFree"] = __cuMemAddressFree +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAddressReserve, __pyx_t_3) < 0))) __PYX_ERR(0, 7371, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7373 + * data["__cuMemAddressReserve"] = __cuMemAddressReserve + * global __cuMemAddressFree + * data["__cuMemAddressFree"] = __cuMemAddressFree # <<<<<<<<<<<<<< + * global __cuMemCreate + * data["__cuMemCreate"] = __cuMemCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7373, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAddressFree, __pyx_t_3) < 0))) __PYX_ERR(0, 7373, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7375 + * data["__cuMemAddressFree"] = __cuMemAddressFree + * global __cuMemCreate + * data["__cuMemCreate"] = __cuMemCreate # <<<<<<<<<<<<<< + * global __cuMemRelease + * data["__cuMemRelease"] = __cuMemRelease +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7375, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7377 + * data["__cuMemCreate"] = __cuMemCreate + * global __cuMemRelease + * data["__cuMemRelease"] = __cuMemRelease # <<<<<<<<<<<<<< + * global __cuMemMap + * data["__cuMemMap"] = __cuMemMap +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemRelease, __pyx_t_3) < 0))) __PYX_ERR(0, 7377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7379 + * data["__cuMemRelease"] = __cuMemRelease + * global __cuMemMap + * data["__cuMemMap"] = __cuMemMap # <<<<<<<<<<<<<< + * global __cuMemMapArrayAsync + * data["__cuMemMapArrayAsync"] = __cuMemMapArrayAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7379, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemMap, __pyx_t_3) < 0))) __PYX_ERR(0, 7379, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7381 + * data["__cuMemMap"] = __cuMemMap + * global __cuMemMapArrayAsync + * data["__cuMemMapArrayAsync"] = __cuMemMapArrayAsync # <<<<<<<<<<<<<< + * global __cuMemUnmap + * data["__cuMemUnmap"] = __cuMemUnmap +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemMapArrayAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7383 + * data["__cuMemMapArrayAsync"] = __cuMemMapArrayAsync + * global __cuMemUnmap + * data["__cuMemUnmap"] = __cuMemUnmap # <<<<<<<<<<<<<< + * global __cuMemSetAccess + * data["__cuMemSetAccess"] = __cuMemSetAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemUnmap, __pyx_t_3) < 0))) __PYX_ERR(0, 7383, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7385 + * data["__cuMemUnmap"] = __cuMemUnmap + * global __cuMemSetAccess + * data["__cuMemSetAccess"] = __cuMemSetAccess # <<<<<<<<<<<<<< + * global __cuMemGetAccess + * data["__cuMemGetAccess"] = __cuMemGetAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemSetAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7387 + * data["__cuMemSetAccess"] = __cuMemSetAccess + * global __cuMemGetAccess + * data["__cuMemGetAccess"] = __cuMemGetAccess # <<<<<<<<<<<<<< + * global __cuMemExportToShareableHandle + * data["__cuMemExportToShareableHandle"] = __cuMemExportToShareableHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7387, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7389 + * data["__cuMemGetAccess"] = __cuMemGetAccess + * global __cuMemExportToShareableHandle + * data["__cuMemExportToShareableHandle"] = __cuMemExportToShareableHandle # <<<<<<<<<<<<<< + * global __cuMemImportFromShareableHandle + * data["__cuMemImportFromShareableHandle"] = __cuMemImportFromShareableHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemExportToShareableHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7391 + * data["__cuMemExportToShareableHandle"] = __cuMemExportToShareableHandle + * global __cuMemImportFromShareableHandle + * data["__cuMemImportFromShareableHandle"] = __cuMemImportFromShareableHandle # <<<<<<<<<<<<<< + * global __cuMemGetAllocationGranularity + * data["__cuMemGetAllocationGranularity"] = __cuMemGetAllocationGranularity +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemImportFromShareableHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7391, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7393 + * data["__cuMemImportFromShareableHandle"] = __cuMemImportFromShareableHandle + * global __cuMemGetAllocationGranularity + * data["__cuMemGetAllocationGranularity"] = __cuMemGetAllocationGranularity # <<<<<<<<<<<<<< + * global __cuMemGetAllocationPropertiesFromHandle + * data["__cuMemGetAllocationPropertiesFromHandle"] = __cuMemGetAllocationPropertiesFromHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetAllocationGranularity, __pyx_t_3) < 0))) __PYX_ERR(0, 7393, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7395 + * data["__cuMemGetAllocationGranularity"] = __cuMemGetAllocationGranularity + * global __cuMemGetAllocationPropertiesFromHandle + * data["__cuMemGetAllocationPropertiesFromHandle"] = __cuMemGetAllocationPropertiesFromHandle # <<<<<<<<<<<<<< + * global __cuMemRetainAllocationHandle + * data["__cuMemRetainAllocationHandle"] = __cuMemRetainAllocationHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemGetAllocationPropertiesFr, __pyx_t_3) < 0))) __PYX_ERR(0, 7395, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7397 + * data["__cuMemGetAllocationPropertiesFromHandle"] = __cuMemGetAllocationPropertiesFromHandle + * global __cuMemRetainAllocationHandle + * data["__cuMemRetainAllocationHandle"] = __cuMemRetainAllocationHandle # <<<<<<<<<<<<<< + * global __cuMemFreeAsync + * data["__cuMemFreeAsync"] = __cuMemFreeAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemRetainAllocationHandle, __pyx_t_3) < 0))) __PYX_ERR(0, 7397, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7399 + * data["__cuMemRetainAllocationHandle"] = __cuMemRetainAllocationHandle + * global __cuMemFreeAsync + * data["__cuMemFreeAsync"] = __cuMemFreeAsync # <<<<<<<<<<<<<< + * global __cuMemAllocAsync + * data["__cuMemAllocAsync"] = __cuMemAllocAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemFreeAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7401 + * data["__cuMemFreeAsync"] = __cuMemFreeAsync + * global __cuMemAllocAsync + * data["__cuMemAllocAsync"] = __cuMemAllocAsync # <<<<<<<<<<<<<< + * global __cuMemPoolTrimTo + * data["__cuMemPoolTrimTo"] = __cuMemPoolTrimTo +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAllocAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7403 + * data["__cuMemAllocAsync"] = __cuMemAllocAsync + * global __cuMemPoolTrimTo + * data["__cuMemPoolTrimTo"] = __cuMemPoolTrimTo # <<<<<<<<<<<<<< + * global __cuMemPoolSetAttribute + * data["__cuMemPoolSetAttribute"] = __cuMemPoolSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7403, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolTrimTo, __pyx_t_3) < 0))) __PYX_ERR(0, 7403, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7405 + * data["__cuMemPoolTrimTo"] = __cuMemPoolTrimTo + * global __cuMemPoolSetAttribute + * data["__cuMemPoolSetAttribute"] = __cuMemPoolSetAttribute # <<<<<<<<<<<<<< + * global __cuMemPoolGetAttribute + * data["__cuMemPoolGetAttribute"] = __cuMemPoolGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7405, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7407 + * data["__cuMemPoolSetAttribute"] = __cuMemPoolSetAttribute + * global __cuMemPoolGetAttribute + * data["__cuMemPoolGetAttribute"] = __cuMemPoolGetAttribute # <<<<<<<<<<<<<< + * global __cuMemPoolSetAccess + * data["__cuMemPoolSetAccess"] = __cuMemPoolSetAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7407, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7409 + * data["__cuMemPoolGetAttribute"] = __cuMemPoolGetAttribute + * global __cuMemPoolSetAccess + * data["__cuMemPoolSetAccess"] = __cuMemPoolSetAccess # <<<<<<<<<<<<<< + * global __cuMemPoolGetAccess + * data["__cuMemPoolGetAccess"] = __cuMemPoolGetAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolSetAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7411 + * data["__cuMemPoolSetAccess"] = __cuMemPoolSetAccess + * global __cuMemPoolGetAccess + * data["__cuMemPoolGetAccess"] = __cuMemPoolGetAccess # <<<<<<<<<<<<<< + * global __cuMemPoolCreate + * data["__cuMemPoolCreate"] = __cuMemPoolCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolGetAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7411, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7413 + * data["__cuMemPoolGetAccess"] = __cuMemPoolGetAccess + * global __cuMemPoolCreate + * data["__cuMemPoolCreate"] = __cuMemPoolCreate # <<<<<<<<<<<<<< + * global __cuMemPoolDestroy + * data["__cuMemPoolDestroy"] = __cuMemPoolDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7415 + * data["__cuMemPoolCreate"] = __cuMemPoolCreate + * global __cuMemPoolDestroy + * data["__cuMemPoolDestroy"] = __cuMemPoolDestroy # <<<<<<<<<<<<<< + * global __cuMemAllocFromPoolAsync + * data["__cuMemAllocFromPoolAsync"] = __cuMemAllocFromPoolAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7415, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7417 + * data["__cuMemPoolDestroy"] = __cuMemPoolDestroy + * global __cuMemAllocFromPoolAsync + * data["__cuMemAllocFromPoolAsync"] = __cuMemAllocFromPoolAsync # <<<<<<<<<<<<<< + * global __cuMemPoolExportToShareableHandle + * data["__cuMemPoolExportToShareableHandle"] = __cuMemPoolExportToShareableHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7417, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAllocFromPoolAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7417, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7419 + * data["__cuMemAllocFromPoolAsync"] = __cuMemAllocFromPoolAsync + * global __cuMemPoolExportToShareableHandle + * data["__cuMemPoolExportToShareableHandle"] = __cuMemPoolExportToShareableHandle # <<<<<<<<<<<<<< + * global __cuMemPoolImportFromShareableHandle + * data["__cuMemPoolImportFromShareableHandle"] = __cuMemPoolImportFromShareableHandle +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolExportToShareableHand, __pyx_t_3) < 0))) __PYX_ERR(0, 7419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7421 + * data["__cuMemPoolExportToShareableHandle"] = __cuMemPoolExportToShareableHandle + * global __cuMemPoolImportFromShareableHandle + * data["__cuMemPoolImportFromShareableHandle"] = __cuMemPoolImportFromShareableHandle # <<<<<<<<<<<<<< + * global __cuMemPoolExportPointer + * data["__cuMemPoolExportPointer"] = __cuMemPoolExportPointer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolImportFromShareableHa, __pyx_t_3) < 0))) __PYX_ERR(0, 7421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7423 + * data["__cuMemPoolImportFromShareableHandle"] = __cuMemPoolImportFromShareableHandle + * global __cuMemPoolExportPointer + * data["__cuMemPoolExportPointer"] = __cuMemPoolExportPointer # <<<<<<<<<<<<<< + * global __cuMemPoolImportPointer + * data["__cuMemPoolImportPointer"] = __cuMemPoolImportPointer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolExportPointer, __pyx_t_3) < 0))) __PYX_ERR(0, 7423, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7425 + * data["__cuMemPoolExportPointer"] = __cuMemPoolExportPointer + * global __cuMemPoolImportPointer + * data["__cuMemPoolImportPointer"] = __cuMemPoolImportPointer # <<<<<<<<<<<<<< + * global __cuMulticastCreate + * data["__cuMulticastCreate"] = __cuMulticastCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPoolImportPointer, __pyx_t_3) < 0))) __PYX_ERR(0, 7425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7427 + * data["__cuMemPoolImportPointer"] = __cuMemPoolImportPointer + * global __cuMulticastCreate + * data["__cuMulticastCreate"] = __cuMulticastCreate # <<<<<<<<<<<<<< + * global __cuMulticastAddDevice + * data["__cuMulticastAddDevice"] = __cuMulticastAddDevice +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7427, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7429 + * data["__cuMulticastCreate"] = __cuMulticastCreate + * global __cuMulticastAddDevice + * data["__cuMulticastAddDevice"] = __cuMulticastAddDevice # <<<<<<<<<<<<<< + * global __cuMulticastBindMem + * data["__cuMulticastBindMem"] = __cuMulticastBindMem +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastAddDevice, __pyx_t_3) < 0))) __PYX_ERR(0, 7429, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7431 + * data["__cuMulticastAddDevice"] = __cuMulticastAddDevice + * global __cuMulticastBindMem + * data["__cuMulticastBindMem"] = __cuMulticastBindMem # <<<<<<<<<<<<<< + * global __cuMulticastBindAddr + * data["__cuMulticastBindAddr"] = __cuMulticastBindAddr +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7431, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastBindMem, __pyx_t_3) < 0))) __PYX_ERR(0, 7431, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7433 + * data["__cuMulticastBindMem"] = __cuMulticastBindMem + * global __cuMulticastBindAddr + * data["__cuMulticastBindAddr"] = __cuMulticastBindAddr # <<<<<<<<<<<<<< + * global __cuMulticastUnbind + * data["__cuMulticastUnbind"] = __cuMulticastUnbind +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastBindAddr, __pyx_t_3) < 0))) __PYX_ERR(0, 7433, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7435 + * data["__cuMulticastBindAddr"] = __cuMulticastBindAddr + * global __cuMulticastUnbind + * data["__cuMulticastUnbind"] = __cuMulticastUnbind # <<<<<<<<<<<<<< + * global __cuMulticastGetGranularity + * data["__cuMulticastGetGranularity"] = __cuMulticastGetGranularity +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastUnbind, __pyx_t_3) < 0))) __PYX_ERR(0, 7435, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7437 + * data["__cuMulticastUnbind"] = __cuMulticastUnbind + * global __cuMulticastGetGranularity + * data["__cuMulticastGetGranularity"] = __cuMulticastGetGranularity # <<<<<<<<<<<<<< + * global __cuPointerGetAttribute + * data["__cuPointerGetAttribute"] = __cuPointerGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMulticastGetGranularity, __pyx_t_3) < 0))) __PYX_ERR(0, 7437, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7439 + * data["__cuMulticastGetGranularity"] = __cuMulticastGetGranularity + * global __cuPointerGetAttribute + * data["__cuPointerGetAttribute"] = __cuPointerGetAttribute # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync + * data["__cuMemPrefetchAsync"] = __cuMemPrefetchAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuPointerGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7439, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7441 + * data["__cuPointerGetAttribute"] = __cuPointerGetAttribute + * global __cuMemPrefetchAsync + * data["__cuMemPrefetchAsync"] = __cuMemPrefetchAsync # <<<<<<<<<<<<<< + * global __cuMemPrefetchAsync_v2 + * data["__cuMemPrefetchAsync_v2"] = __cuMemPrefetchAsync_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7441, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPrefetchAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7441, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7443 + * data["__cuMemPrefetchAsync"] = __cuMemPrefetchAsync + * global __cuMemPrefetchAsync_v2 + * data["__cuMemPrefetchAsync_v2"] = __cuMemPrefetchAsync_v2 # <<<<<<<<<<<<<< + * global __cuMemAdvise + * data["__cuMemAdvise"] = __cuMemAdvise +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7443, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemPrefetchAsync_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7445 + * data["__cuMemPrefetchAsync_v2"] = __cuMemPrefetchAsync_v2 + * global __cuMemAdvise + * data["__cuMemAdvise"] = __cuMemAdvise # <<<<<<<<<<<<<< + * global __cuMemAdvise_v2 + * data["__cuMemAdvise_v2"] = __cuMemAdvise_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAdvise, __pyx_t_3) < 0))) __PYX_ERR(0, 7445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7447 + * data["__cuMemAdvise"] = __cuMemAdvise + * global __cuMemAdvise_v2 + * data["__cuMemAdvise_v2"] = __cuMemAdvise_v2 # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttribute + * data["__cuMemRangeGetAttribute"] = __cuMemRangeGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemAdvise_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7449 + * data["__cuMemAdvise_v2"] = __cuMemAdvise_v2 + * global __cuMemRangeGetAttribute + * data["__cuMemRangeGetAttribute"] = __cuMemRangeGetAttribute # <<<<<<<<<<<<<< + * global __cuMemRangeGetAttributes + * data["__cuMemRangeGetAttributes"] = __cuMemRangeGetAttributes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemRangeGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7451 + * data["__cuMemRangeGetAttribute"] = __cuMemRangeGetAttribute + * global __cuMemRangeGetAttributes + * data["__cuMemRangeGetAttributes"] = __cuMemRangeGetAttributes # <<<<<<<<<<<<<< + * global __cuPointerSetAttribute + * data["__cuPointerSetAttribute"] = __cuPointerSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuMemRangeGetAttributes, __pyx_t_3) < 0))) __PYX_ERR(0, 7451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7453 + * data["__cuMemRangeGetAttributes"] = __cuMemRangeGetAttributes + * global __cuPointerSetAttribute + * data["__cuPointerSetAttribute"] = __cuPointerSetAttribute # <<<<<<<<<<<<<< + * global __cuPointerGetAttributes + * data["__cuPointerGetAttributes"] = __cuPointerGetAttributes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuPointerSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7453, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7455 + * data["__cuPointerSetAttribute"] = __cuPointerSetAttribute + * global __cuPointerGetAttributes + * data["__cuPointerGetAttributes"] = __cuPointerGetAttributes # <<<<<<<<<<<<<< + * global __cuStreamCreate + * data["__cuStreamCreate"] = __cuStreamCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuPointerGetAttributes, __pyx_t_3) < 0))) __PYX_ERR(0, 7455, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7457 + * data["__cuPointerGetAttributes"] = __cuPointerGetAttributes + * global __cuStreamCreate + * data["__cuStreamCreate"] = __cuStreamCreate # <<<<<<<<<<<<<< + * global __cuStreamCreateWithPriority + * data["__cuStreamCreateWithPriority"] = __cuStreamCreateWithPriority +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7457, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7459 + * data["__cuStreamCreate"] = __cuStreamCreate + * global __cuStreamCreateWithPriority + * data["__cuStreamCreateWithPriority"] = __cuStreamCreateWithPriority # <<<<<<<<<<<<<< + * global __cuStreamGetPriority + * data["__cuStreamGetPriority"] = __cuStreamGetPriority +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamCreateWithPriority, __pyx_t_3) < 0))) __PYX_ERR(0, 7459, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7461 + * data["__cuStreamCreateWithPriority"] = __cuStreamCreateWithPriority + * global __cuStreamGetPriority + * data["__cuStreamGetPriority"] = __cuStreamGetPriority # <<<<<<<<<<<<<< + * global __cuStreamGetDevice + * data["__cuStreamGetDevice"] = __cuStreamGetDevice +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetPriority, __pyx_t_3) < 0))) __PYX_ERR(0, 7461, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7463 + * data["__cuStreamGetPriority"] = __cuStreamGetPriority + * global __cuStreamGetDevice + * data["__cuStreamGetDevice"] = __cuStreamGetDevice # <<<<<<<<<<<<<< + * global __cuStreamGetFlags + * data["__cuStreamGetFlags"] = __cuStreamGetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetDevice, __pyx_t_3) < 0))) __PYX_ERR(0, 7463, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7465 + * data["__cuStreamGetDevice"] = __cuStreamGetDevice + * global __cuStreamGetFlags + * data["__cuStreamGetFlags"] = __cuStreamGetFlags # <<<<<<<<<<<<<< + * global __cuStreamGetId + * data["__cuStreamGetId"] = __cuStreamGetId +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7467 + * data["__cuStreamGetFlags"] = __cuStreamGetFlags + * global __cuStreamGetId + * data["__cuStreamGetId"] = __cuStreamGetId # <<<<<<<<<<<<<< + * global __cuStreamGetCtx + * data["__cuStreamGetCtx"] = __cuStreamGetCtx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetId, __pyx_t_3) < 0))) __PYX_ERR(0, 7467, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7469 + * data["__cuStreamGetId"] = __cuStreamGetId + * global __cuStreamGetCtx + * data["__cuStreamGetCtx"] = __cuStreamGetCtx # <<<<<<<<<<<<<< + * global __cuStreamGetCtx_v2 + * data["__cuStreamGetCtx_v2"] = __cuStreamGetCtx_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetCtx, __pyx_t_3) < 0))) __PYX_ERR(0, 7469, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7471 + * data["__cuStreamGetCtx"] = __cuStreamGetCtx + * global __cuStreamGetCtx_v2 + * data["__cuStreamGetCtx_v2"] = __cuStreamGetCtx_v2 # <<<<<<<<<<<<<< + * global __cuStreamWaitEvent + * data["__cuStreamWaitEvent"] = __cuStreamWaitEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetCtx_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7471, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7473 + * data["__cuStreamGetCtx_v2"] = __cuStreamGetCtx_v2 + * global __cuStreamWaitEvent + * data["__cuStreamWaitEvent"] = __cuStreamWaitEvent # <<<<<<<<<<<<<< + * global __cuStreamAddCallback + * data["__cuStreamAddCallback"] = __cuStreamAddCallback +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamWaitEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7473, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7475 + * data["__cuStreamWaitEvent"] = __cuStreamWaitEvent + * global __cuStreamAddCallback + * data["__cuStreamAddCallback"] = __cuStreamAddCallback # <<<<<<<<<<<<<< + * global __cuStreamBeginCapture_v2 + * data["__cuStreamBeginCapture_v2"] = __cuStreamBeginCapture_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7475, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamAddCallback, __pyx_t_3) < 0))) __PYX_ERR(0, 7475, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7477 + * data["__cuStreamAddCallback"] = __cuStreamAddCallback + * global __cuStreamBeginCapture_v2 + * data["__cuStreamBeginCapture_v2"] = __cuStreamBeginCapture_v2 # <<<<<<<<<<<<<< + * global __cuStreamBeginCaptureToGraph + * data["__cuStreamBeginCaptureToGraph"] = __cuStreamBeginCaptureToGraph +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamBeginCapture_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7477, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7479 + * data["__cuStreamBeginCapture_v2"] = __cuStreamBeginCapture_v2 + * global __cuStreamBeginCaptureToGraph + * data["__cuStreamBeginCaptureToGraph"] = __cuStreamBeginCaptureToGraph # <<<<<<<<<<<<<< + * global __cuThreadExchangeStreamCaptureMode + * data["__cuThreadExchangeStreamCaptureMode"] = __cuThreadExchangeStreamCaptureMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamBeginCaptureToGraph, __pyx_t_3) < 0))) __PYX_ERR(0, 7479, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7481 + * data["__cuStreamBeginCaptureToGraph"] = __cuStreamBeginCaptureToGraph + * global __cuThreadExchangeStreamCaptureMode + * data["__cuThreadExchangeStreamCaptureMode"] = __cuThreadExchangeStreamCaptureMode # <<<<<<<<<<<<<< + * global __cuStreamEndCapture + * data["__cuStreamEndCapture"] = __cuStreamEndCapture +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7481, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuThreadExchangeStreamCaptureM, __pyx_t_3) < 0))) __PYX_ERR(0, 7481, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7483 + * data["__cuThreadExchangeStreamCaptureMode"] = __cuThreadExchangeStreamCaptureMode + * global __cuStreamEndCapture + * data["__cuStreamEndCapture"] = __cuStreamEndCapture # <<<<<<<<<<<<<< + * global __cuStreamIsCapturing + * data["__cuStreamIsCapturing"] = __cuStreamIsCapturing +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamEndCapture, __pyx_t_3) < 0))) __PYX_ERR(0, 7483, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7485 + * data["__cuStreamEndCapture"] = __cuStreamEndCapture + * global __cuStreamIsCapturing + * data["__cuStreamIsCapturing"] = __cuStreamIsCapturing # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v2 + * data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamIsCapturing, __pyx_t_3) < 0))) __PYX_ERR(0, 7485, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7487 + * data["__cuStreamIsCapturing"] = __cuStreamIsCapturing + * global __cuStreamGetCaptureInfo_v2 + * data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 # <<<<<<<<<<<<<< + * global __cuStreamGetCaptureInfo_v3 + * data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetCaptureInfo_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7489 + * data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 + * global __cuStreamGetCaptureInfo_v3 + * data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies + * data["__cuStreamUpdateCaptureDependencies"] = __cuStreamUpdateCaptureDependencies +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetCaptureInfo_v3, __pyx_t_3) < 0))) __PYX_ERR(0, 7489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7491 + * data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 + * global __cuStreamUpdateCaptureDependencies + * data["__cuStreamUpdateCaptureDependencies"] = __cuStreamUpdateCaptureDependencies # <<<<<<<<<<<<<< + * global __cuStreamUpdateCaptureDependencies_v2 + * data["__cuStreamUpdateCaptureDependencies_v2"] = __cuStreamUpdateCaptureDependencies_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamUpdateCaptureDependenc, __pyx_t_3) < 0))) __PYX_ERR(0, 7491, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7493 + * data["__cuStreamUpdateCaptureDependencies"] = __cuStreamUpdateCaptureDependencies + * global __cuStreamUpdateCaptureDependencies_v2 + * data["__cuStreamUpdateCaptureDependencies_v2"] = __cuStreamUpdateCaptureDependencies_v2 # <<<<<<<<<<<<<< + * global __cuStreamAttachMemAsync + * data["__cuStreamAttachMemAsync"] = __cuStreamAttachMemAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamUpdateCaptureDependenc_2, __pyx_t_3) < 0))) __PYX_ERR(0, 7493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7495 + * data["__cuStreamUpdateCaptureDependencies_v2"] = __cuStreamUpdateCaptureDependencies_v2 + * global __cuStreamAttachMemAsync + * data["__cuStreamAttachMemAsync"] = __cuStreamAttachMemAsync # <<<<<<<<<<<<<< + * global __cuStreamQuery + * data["__cuStreamQuery"] = __cuStreamQuery +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7495, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamAttachMemAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7495, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7497 + * data["__cuStreamAttachMemAsync"] = __cuStreamAttachMemAsync + * global __cuStreamQuery + * data["__cuStreamQuery"] = __cuStreamQuery # <<<<<<<<<<<<<< + * global __cuStreamSynchronize + * data["__cuStreamSynchronize"] = __cuStreamSynchronize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamQuery, __pyx_t_3) < 0))) __PYX_ERR(0, 7497, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7499 + * data["__cuStreamQuery"] = __cuStreamQuery + * global __cuStreamSynchronize + * data["__cuStreamSynchronize"] = __cuStreamSynchronize # <<<<<<<<<<<<<< + * global __cuStreamDestroy_v2 + * data["__cuStreamDestroy_v2"] = __cuStreamDestroy_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamSynchronize, __pyx_t_3) < 0))) __PYX_ERR(0, 7499, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7501 + * data["__cuStreamSynchronize"] = __cuStreamSynchronize + * global __cuStreamDestroy_v2 + * data["__cuStreamDestroy_v2"] = __cuStreamDestroy_v2 # <<<<<<<<<<<<<< + * global __cuStreamCopyAttributes + * data["__cuStreamCopyAttributes"] = __cuStreamCopyAttributes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamDestroy_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7503 + * data["__cuStreamDestroy_v2"] = __cuStreamDestroy_v2 + * global __cuStreamCopyAttributes + * data["__cuStreamCopyAttributes"] = __cuStreamCopyAttributes # <<<<<<<<<<<<<< + * global __cuStreamGetAttribute + * data["__cuStreamGetAttribute"] = __cuStreamGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamCopyAttributes, __pyx_t_3) < 0))) __PYX_ERR(0, 7503, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7505 + * data["__cuStreamCopyAttributes"] = __cuStreamCopyAttributes + * global __cuStreamGetAttribute + * data["__cuStreamGetAttribute"] = __cuStreamGetAttribute # <<<<<<<<<<<<<< + * global __cuStreamSetAttribute + * data["__cuStreamSetAttribute"] = __cuStreamSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7505, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7507 + * data["__cuStreamGetAttribute"] = __cuStreamGetAttribute + * global __cuStreamSetAttribute + * data["__cuStreamSetAttribute"] = __cuStreamSetAttribute # <<<<<<<<<<<<<< + * global __cuEventCreate + * data["__cuEventCreate"] = __cuEventCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7507, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7509 + * data["__cuStreamSetAttribute"] = __cuStreamSetAttribute + * global __cuEventCreate + * data["__cuEventCreate"] = __cuEventCreate # <<<<<<<<<<<<<< + * global __cuEventRecord + * data["__cuEventRecord"] = __cuEventRecord +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7509, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7511 + * data["__cuEventCreate"] = __cuEventCreate + * global __cuEventRecord + * data["__cuEventRecord"] = __cuEventRecord # <<<<<<<<<<<<<< + * global __cuEventRecordWithFlags + * data["__cuEventRecordWithFlags"] = __cuEventRecordWithFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventRecord, __pyx_t_3) < 0))) __PYX_ERR(0, 7511, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7513 + * data["__cuEventRecord"] = __cuEventRecord + * global __cuEventRecordWithFlags + * data["__cuEventRecordWithFlags"] = __cuEventRecordWithFlags # <<<<<<<<<<<<<< + * global __cuEventQuery + * data["__cuEventQuery"] = __cuEventQuery +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventRecordWithFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7513, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7515 + * data["__cuEventRecordWithFlags"] = __cuEventRecordWithFlags + * global __cuEventQuery + * data["__cuEventQuery"] = __cuEventQuery # <<<<<<<<<<<<<< + * global __cuEventSynchronize + * data["__cuEventSynchronize"] = __cuEventSynchronize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventQuery, __pyx_t_3) < 0))) __PYX_ERR(0, 7515, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7517 + * data["__cuEventQuery"] = __cuEventQuery + * global __cuEventSynchronize + * data["__cuEventSynchronize"] = __cuEventSynchronize # <<<<<<<<<<<<<< + * global __cuEventDestroy_v2 + * data["__cuEventDestroy_v2"] = __cuEventDestroy_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventSynchronize, __pyx_t_3) < 0))) __PYX_ERR(0, 7517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7519 + * data["__cuEventSynchronize"] = __cuEventSynchronize + * global __cuEventDestroy_v2 + * data["__cuEventDestroy_v2"] = __cuEventDestroy_v2 # <<<<<<<<<<<<<< + * global __cuEventElapsedTime + * data["__cuEventElapsedTime"] = __cuEventElapsedTime +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventDestroy_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7521 + * data["__cuEventDestroy_v2"] = __cuEventDestroy_v2 + * global __cuEventElapsedTime + * data["__cuEventElapsedTime"] = __cuEventElapsedTime # <<<<<<<<<<<<<< + * global __cuEventElapsedTime_v2 + * data["__cuEventElapsedTime_v2"] = __cuEventElapsedTime_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventElapsedTime, __pyx_t_3) < 0))) __PYX_ERR(0, 7521, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7523 + * data["__cuEventElapsedTime"] = __cuEventElapsedTime + * global __cuEventElapsedTime_v2 + * data["__cuEventElapsedTime_v2"] = __cuEventElapsedTime_v2 # <<<<<<<<<<<<<< + * global __cuImportExternalMemory + * data["__cuImportExternalMemory"] = __cuImportExternalMemory +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7523, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventElapsedTime_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7523, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7525 + * data["__cuEventElapsedTime_v2"] = __cuEventElapsedTime_v2 + * global __cuImportExternalMemory + * data["__cuImportExternalMemory"] = __cuImportExternalMemory # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedBuffer + * data["__cuExternalMemoryGetMappedBuffer"] = __cuExternalMemoryGetMappedBuffer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7525, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuImportExternalMemory, __pyx_t_3) < 0))) __PYX_ERR(0, 7525, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7527 + * data["__cuImportExternalMemory"] = __cuImportExternalMemory + * global __cuExternalMemoryGetMappedBuffer + * data["__cuExternalMemoryGetMappedBuffer"] = __cuExternalMemoryGetMappedBuffer # <<<<<<<<<<<<<< + * global __cuExternalMemoryGetMappedMipmappedArray + * data["__cuExternalMemoryGetMappedMipmappedArray"] = __cuExternalMemoryGetMappedMipmappedArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuExternalMemoryGetMappedBuffe, __pyx_t_3) < 0))) __PYX_ERR(0, 7527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7529 + * data["__cuExternalMemoryGetMappedBuffer"] = __cuExternalMemoryGetMappedBuffer + * global __cuExternalMemoryGetMappedMipmappedArray + * data["__cuExternalMemoryGetMappedMipmappedArray"] = __cuExternalMemoryGetMappedMipmappedArray # <<<<<<<<<<<<<< + * global __cuDestroyExternalMemory + * data["__cuDestroyExternalMemory"] = __cuDestroyExternalMemory +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuExternalMemoryGetMappedMipma, __pyx_t_3) < 0))) __PYX_ERR(0, 7529, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7531 + * data["__cuExternalMemoryGetMappedMipmappedArray"] = __cuExternalMemoryGetMappedMipmappedArray + * global __cuDestroyExternalMemory + * data["__cuDestroyExternalMemory"] = __cuDestroyExternalMemory # <<<<<<<<<<<<<< + * global __cuImportExternalSemaphore + * data["__cuImportExternalSemaphore"] = __cuImportExternalSemaphore +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDestroyExternalMemory, __pyx_t_3) < 0))) __PYX_ERR(0, 7531, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7533 + * data["__cuDestroyExternalMemory"] = __cuDestroyExternalMemory + * global __cuImportExternalSemaphore + * data["__cuImportExternalSemaphore"] = __cuImportExternalSemaphore # <<<<<<<<<<<<<< + * global __cuSignalExternalSemaphoresAsync + * data["__cuSignalExternalSemaphoresAsync"] = __cuSignalExternalSemaphoresAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuImportExternalSemaphore, __pyx_t_3) < 0))) __PYX_ERR(0, 7533, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7535 + * data["__cuImportExternalSemaphore"] = __cuImportExternalSemaphore + * global __cuSignalExternalSemaphoresAsync + * data["__cuSignalExternalSemaphoresAsync"] = __cuSignalExternalSemaphoresAsync # <<<<<<<<<<<<<< + * global __cuWaitExternalSemaphoresAsync + * data["__cuWaitExternalSemaphoresAsync"] = __cuWaitExternalSemaphoresAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSignalExternalSemaphoresAsyn, __pyx_t_3) < 0))) __PYX_ERR(0, 7535, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7537 + * data["__cuSignalExternalSemaphoresAsync"] = __cuSignalExternalSemaphoresAsync + * global __cuWaitExternalSemaphoresAsync + * data["__cuWaitExternalSemaphoresAsync"] = __cuWaitExternalSemaphoresAsync # <<<<<<<<<<<<<< + * global __cuDestroyExternalSemaphore + * data["__cuDestroyExternalSemaphore"] = __cuDestroyExternalSemaphore +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7537, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuWaitExternalSemaphoresAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7537, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7539 + * data["__cuWaitExternalSemaphoresAsync"] = __cuWaitExternalSemaphoresAsync + * global __cuDestroyExternalSemaphore + * data["__cuDestroyExternalSemaphore"] = __cuDestroyExternalSemaphore # <<<<<<<<<<<<<< + * global __cuStreamWaitValue32_v2 + * data["__cuStreamWaitValue32_v2"] = __cuStreamWaitValue32_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7539, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDestroyExternalSemaphore, __pyx_t_3) < 0))) __PYX_ERR(0, 7539, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7541 + * data["__cuDestroyExternalSemaphore"] = __cuDestroyExternalSemaphore + * global __cuStreamWaitValue32_v2 + * data["__cuStreamWaitValue32_v2"] = __cuStreamWaitValue32_v2 # <<<<<<<<<<<<<< + * global __cuStreamWaitValue64_v2 + * data["__cuStreamWaitValue64_v2"] = __cuStreamWaitValue64_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamWaitValue32_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7541, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7543 + * data["__cuStreamWaitValue32_v2"] = __cuStreamWaitValue32_v2 + * global __cuStreamWaitValue64_v2 + * data["__cuStreamWaitValue64_v2"] = __cuStreamWaitValue64_v2 # <<<<<<<<<<<<<< + * global __cuStreamWriteValue32_v2 + * data["__cuStreamWriteValue32_v2"] = __cuStreamWriteValue32_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamWaitValue64_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7543, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7545 + * data["__cuStreamWaitValue64_v2"] = __cuStreamWaitValue64_v2 + * global __cuStreamWriteValue32_v2 + * data["__cuStreamWriteValue32_v2"] = __cuStreamWriteValue32_v2 # <<<<<<<<<<<<<< + * global __cuStreamWriteValue64_v2 + * data["__cuStreamWriteValue64_v2"] = __cuStreamWriteValue64_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamWriteValue32_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7545, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7547 + * data["__cuStreamWriteValue32_v2"] = __cuStreamWriteValue32_v2 + * global __cuStreamWriteValue64_v2 + * data["__cuStreamWriteValue64_v2"] = __cuStreamWriteValue64_v2 # <<<<<<<<<<<<<< + * global __cuStreamBatchMemOp_v2 + * data["__cuStreamBatchMemOp_v2"] = __cuStreamBatchMemOp_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7547, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamWriteValue64_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7547, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7549 + * data["__cuStreamWriteValue64_v2"] = __cuStreamWriteValue64_v2 + * global __cuStreamBatchMemOp_v2 + * data["__cuStreamBatchMemOp_v2"] = __cuStreamBatchMemOp_v2 # <<<<<<<<<<<<<< + * global __cuFuncGetAttribute + * data["__cuFuncGetAttribute"] = __cuFuncGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7549, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamBatchMemOp_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7549, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7551 + * data["__cuStreamBatchMemOp_v2"] = __cuStreamBatchMemOp_v2 + * global __cuFuncGetAttribute + * data["__cuFuncGetAttribute"] = __cuFuncGetAttribute # <<<<<<<<<<<<<< + * global __cuFuncSetAttribute + * data["__cuFuncSetAttribute"] = __cuFuncSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7551, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7553 + * data["__cuFuncGetAttribute"] = __cuFuncGetAttribute + * global __cuFuncSetAttribute + * data["__cuFuncSetAttribute"] = __cuFuncSetAttribute # <<<<<<<<<<<<<< + * global __cuFuncSetCacheConfig + * data["__cuFuncSetCacheConfig"] = __cuFuncSetCacheConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7553, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7555 + * data["__cuFuncSetAttribute"] = __cuFuncSetAttribute + * global __cuFuncSetCacheConfig + * data["__cuFuncSetCacheConfig"] = __cuFuncSetCacheConfig # <<<<<<<<<<<<<< + * global __cuFuncGetModule + * data["__cuFuncGetModule"] = __cuFuncGetModule +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncSetCacheConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7555, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7557 + * data["__cuFuncSetCacheConfig"] = __cuFuncSetCacheConfig + * global __cuFuncGetModule + * data["__cuFuncGetModule"] = __cuFuncGetModule # <<<<<<<<<<<<<< + * global __cuFuncGetName + * data["__cuFuncGetName"] = __cuFuncGetName +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7557, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncGetModule, __pyx_t_3) < 0))) __PYX_ERR(0, 7557, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7559 + * data["__cuFuncGetModule"] = __cuFuncGetModule + * global __cuFuncGetName + * data["__cuFuncGetName"] = __cuFuncGetName # <<<<<<<<<<<<<< + * global __cuFuncGetParamInfo + * data["__cuFuncGetParamInfo"] = __cuFuncGetParamInfo +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncGetName, __pyx_t_3) < 0))) __PYX_ERR(0, 7559, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7561 + * data["__cuFuncGetName"] = __cuFuncGetName + * global __cuFuncGetParamInfo + * data["__cuFuncGetParamInfo"] = __cuFuncGetParamInfo # <<<<<<<<<<<<<< + * global __cuFuncIsLoaded + * data["__cuFuncIsLoaded"] = __cuFuncIsLoaded +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncGetParamInfo, __pyx_t_3) < 0))) __PYX_ERR(0, 7561, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7563 + * data["__cuFuncGetParamInfo"] = __cuFuncGetParamInfo + * global __cuFuncIsLoaded + * data["__cuFuncIsLoaded"] = __cuFuncIsLoaded # <<<<<<<<<<<<<< + * global __cuFuncLoad + * data["__cuFuncLoad"] = __cuFuncLoad +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncIsLoaded, __pyx_t_3) < 0))) __PYX_ERR(0, 7563, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7565 + * data["__cuFuncIsLoaded"] = __cuFuncIsLoaded + * global __cuFuncLoad + * data["__cuFuncLoad"] = __cuFuncLoad # <<<<<<<<<<<<<< + * global __cuLaunchKernel + * data["__cuLaunchKernel"] = __cuLaunchKernel +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncLoad, __pyx_t_3) < 0))) __PYX_ERR(0, 7565, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7567 + * data["__cuFuncLoad"] = __cuFuncLoad + * global __cuLaunchKernel + * data["__cuLaunchKernel"] = __cuLaunchKernel # <<<<<<<<<<<<<< + * global __cuLaunchKernelEx + * data["__cuLaunchKernelEx"] = __cuLaunchKernelEx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchKernel, __pyx_t_3) < 0))) __PYX_ERR(0, 7567, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7569 + * data["__cuLaunchKernel"] = __cuLaunchKernel + * global __cuLaunchKernelEx + * data["__cuLaunchKernelEx"] = __cuLaunchKernelEx # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernel + * data["__cuLaunchCooperativeKernel"] = __cuLaunchCooperativeKernel +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchKernelEx, __pyx_t_3) < 0))) __PYX_ERR(0, 7569, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7571 + * data["__cuLaunchKernelEx"] = __cuLaunchKernelEx + * global __cuLaunchCooperativeKernel + * data["__cuLaunchCooperativeKernel"] = __cuLaunchCooperativeKernel # <<<<<<<<<<<<<< + * global __cuLaunchCooperativeKernelMultiDevice + * data["__cuLaunchCooperativeKernelMultiDevice"] = __cuLaunchCooperativeKernelMultiDevice +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchCooperativeKernel, __pyx_t_3) < 0))) __PYX_ERR(0, 7571, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7573 + * data["__cuLaunchCooperativeKernel"] = __cuLaunchCooperativeKernel + * global __cuLaunchCooperativeKernelMultiDevice + * data["__cuLaunchCooperativeKernelMultiDevice"] = __cuLaunchCooperativeKernelMultiDevice # <<<<<<<<<<<<<< + * global __cuLaunchHostFunc + * data["__cuLaunchHostFunc"] = __cuLaunchHostFunc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7573, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchCooperativeKernelMulti, __pyx_t_3) < 0))) __PYX_ERR(0, 7573, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7575 + * data["__cuLaunchCooperativeKernelMultiDevice"] = __cuLaunchCooperativeKernelMultiDevice + * global __cuLaunchHostFunc + * data["__cuLaunchHostFunc"] = __cuLaunchHostFunc # <<<<<<<<<<<<<< + * global __cuFuncSetBlockShape + * data["__cuFuncSetBlockShape"] = __cuFuncSetBlockShape +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7575, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchHostFunc, __pyx_t_3) < 0))) __PYX_ERR(0, 7575, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7577 + * data["__cuLaunchHostFunc"] = __cuLaunchHostFunc + * global __cuFuncSetBlockShape + * data["__cuFuncSetBlockShape"] = __cuFuncSetBlockShape # <<<<<<<<<<<<<< + * global __cuFuncSetSharedSize + * data["__cuFuncSetSharedSize"] = __cuFuncSetSharedSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7577, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncSetBlockShape, __pyx_t_3) < 0))) __PYX_ERR(0, 7577, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7579 + * data["__cuFuncSetBlockShape"] = __cuFuncSetBlockShape + * global __cuFuncSetSharedSize + * data["__cuFuncSetSharedSize"] = __cuFuncSetSharedSize # <<<<<<<<<<<<<< + * global __cuParamSetSize + * data["__cuParamSetSize"] = __cuParamSetSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncSetSharedSize, __pyx_t_3) < 0))) __PYX_ERR(0, 7579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7581 + * data["__cuFuncSetSharedSize"] = __cuFuncSetSharedSize + * global __cuParamSetSize + * data["__cuParamSetSize"] = __cuParamSetSize # <<<<<<<<<<<<<< + * global __cuParamSeti + * data["__cuParamSeti"] = __cuParamSeti +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuParamSetSize, __pyx_t_3) < 0))) __PYX_ERR(0, 7581, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7583 + * data["__cuParamSetSize"] = __cuParamSetSize + * global __cuParamSeti + * data["__cuParamSeti"] = __cuParamSeti # <<<<<<<<<<<<<< + * global __cuParamSetf + * data["__cuParamSetf"] = __cuParamSetf +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuParamSeti, __pyx_t_3) < 0))) __PYX_ERR(0, 7583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7585 + * data["__cuParamSeti"] = __cuParamSeti + * global __cuParamSetf + * data["__cuParamSetf"] = __cuParamSetf # <<<<<<<<<<<<<< + * global __cuParamSetv + * data["__cuParamSetv"] = __cuParamSetv +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7585, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuParamSetf, __pyx_t_3) < 0))) __PYX_ERR(0, 7585, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7587 + * data["__cuParamSetf"] = __cuParamSetf + * global __cuParamSetv + * data["__cuParamSetv"] = __cuParamSetv # <<<<<<<<<<<<<< + * global __cuLaunch + * data["__cuLaunch"] = __cuLaunch +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7587, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuParamSetv, __pyx_t_3) < 0))) __PYX_ERR(0, 7587, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7589 + * data["__cuParamSetv"] = __cuParamSetv + * global __cuLaunch + * data["__cuLaunch"] = __cuLaunch # <<<<<<<<<<<<<< + * global __cuLaunchGrid + * data["__cuLaunchGrid"] = __cuLaunchGrid +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunch, __pyx_t_3) < 0))) __PYX_ERR(0, 7589, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7591 + * data["__cuLaunch"] = __cuLaunch + * global __cuLaunchGrid + * data["__cuLaunchGrid"] = __cuLaunchGrid # <<<<<<<<<<<<<< + * global __cuLaunchGridAsync + * data["__cuLaunchGridAsync"] = __cuLaunchGridAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchGrid, __pyx_t_3) < 0))) __PYX_ERR(0, 7591, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7593 + * data["__cuLaunchGrid"] = __cuLaunchGrid + * global __cuLaunchGridAsync + * data["__cuLaunchGridAsync"] = __cuLaunchGridAsync # <<<<<<<<<<<<<< + * global __cuParamSetTexRef + * data["__cuParamSetTexRef"] = __cuParamSetTexRef +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLaunchGridAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 7593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7595 + * data["__cuLaunchGridAsync"] = __cuLaunchGridAsync + * global __cuParamSetTexRef + * data["__cuParamSetTexRef"] = __cuParamSetTexRef # <<<<<<<<<<<<<< + * global __cuFuncSetSharedMemConfig + * data["__cuFuncSetSharedMemConfig"] = __cuFuncSetSharedMemConfig +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuParamSetTexRef, __pyx_t_3) < 0))) __PYX_ERR(0, 7595, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7597 + * data["__cuParamSetTexRef"] = __cuParamSetTexRef + * global __cuFuncSetSharedMemConfig + * data["__cuFuncSetSharedMemConfig"] = __cuFuncSetSharedMemConfig # <<<<<<<<<<<<<< + * global __cuGraphCreate + * data["__cuGraphCreate"] = __cuGraphCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFuncSetSharedMemConfig, __pyx_t_3) < 0))) __PYX_ERR(0, 7597, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7599 + * data["__cuFuncSetSharedMemConfig"] = __cuFuncSetSharedMemConfig + * global __cuGraphCreate + * data["__cuGraphCreate"] = __cuGraphCreate # <<<<<<<<<<<<<< + * global __cuGraphAddKernelNode_v2 + * data["__cuGraphAddKernelNode_v2"] = __cuGraphAddKernelNode_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7599, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7601 + * data["__cuGraphCreate"] = __cuGraphCreate + * global __cuGraphAddKernelNode_v2 + * data["__cuGraphAddKernelNode_v2"] = __cuGraphAddKernelNode_v2 # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetParams_v2 + * data["__cuGraphKernelNodeGetParams_v2"] = __cuGraphKernelNodeGetParams_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddKernelNode_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7603 + * data["__cuGraphAddKernelNode_v2"] = __cuGraphAddKernelNode_v2 + * global __cuGraphKernelNodeGetParams_v2 + * data["__cuGraphKernelNodeGetParams_v2"] = __cuGraphKernelNodeGetParams_v2 # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetParams_v2 + * data["__cuGraphKernelNodeSetParams_v2"] = __cuGraphKernelNodeSetParams_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphKernelNodeGetParams_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7603, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7605 + * data["__cuGraphKernelNodeGetParams_v2"] = __cuGraphKernelNodeGetParams_v2 + * global __cuGraphKernelNodeSetParams_v2 + * data["__cuGraphKernelNodeSetParams_v2"] = __cuGraphKernelNodeSetParams_v2 # <<<<<<<<<<<<<< + * global __cuGraphAddMemcpyNode + * data["__cuGraphAddMemcpyNode"] = __cuGraphAddMemcpyNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphKernelNodeSetParams_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7607 + * data["__cuGraphKernelNodeSetParams_v2"] = __cuGraphKernelNodeSetParams_v2 + * global __cuGraphAddMemcpyNode + * data["__cuGraphAddMemcpyNode"] = __cuGraphAddMemcpyNode # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeGetParams + * data["__cuGraphMemcpyNodeGetParams"] = __cuGraphMemcpyNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddMemcpyNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7607, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7609 + * data["__cuGraphAddMemcpyNode"] = __cuGraphAddMemcpyNode + * global __cuGraphMemcpyNodeGetParams + * data["__cuGraphMemcpyNodeGetParams"] = __cuGraphMemcpyNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphMemcpyNodeSetParams + * data["__cuGraphMemcpyNodeSetParams"] = __cuGraphMemcpyNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemcpyNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7609, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7611 + * data["__cuGraphMemcpyNodeGetParams"] = __cuGraphMemcpyNodeGetParams + * global __cuGraphMemcpyNodeSetParams + * data["__cuGraphMemcpyNodeSetParams"] = __cuGraphMemcpyNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddMemsetNode + * data["__cuGraphAddMemsetNode"] = __cuGraphAddMemsetNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemcpyNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7611, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7613 + * data["__cuGraphMemcpyNodeSetParams"] = __cuGraphMemcpyNodeSetParams + * global __cuGraphAddMemsetNode + * data["__cuGraphAddMemsetNode"] = __cuGraphAddMemsetNode # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeGetParams + * data["__cuGraphMemsetNodeGetParams"] = __cuGraphMemsetNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddMemsetNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7615 + * data["__cuGraphAddMemsetNode"] = __cuGraphAddMemsetNode + * global __cuGraphMemsetNodeGetParams + * data["__cuGraphMemsetNodeGetParams"] = __cuGraphMemsetNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphMemsetNodeSetParams + * data["__cuGraphMemsetNodeSetParams"] = __cuGraphMemsetNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7615, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemsetNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7615, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7617 + * data["__cuGraphMemsetNodeGetParams"] = __cuGraphMemsetNodeGetParams + * global __cuGraphMemsetNodeSetParams + * data["__cuGraphMemsetNodeSetParams"] = __cuGraphMemsetNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddHostNode + * data["__cuGraphAddHostNode"] = __cuGraphAddHostNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemsetNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7617, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7619 + * data["__cuGraphMemsetNodeSetParams"] = __cuGraphMemsetNodeSetParams + * global __cuGraphAddHostNode + * data["__cuGraphAddHostNode"] = __cuGraphAddHostNode # <<<<<<<<<<<<<< + * global __cuGraphHostNodeGetParams + * data["__cuGraphHostNodeGetParams"] = __cuGraphHostNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddHostNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7619, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7621 + * data["__cuGraphAddHostNode"] = __cuGraphAddHostNode + * global __cuGraphHostNodeGetParams + * data["__cuGraphHostNodeGetParams"] = __cuGraphHostNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphHostNodeSetParams + * data["__cuGraphHostNodeSetParams"] = __cuGraphHostNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphHostNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7621, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7623 + * data["__cuGraphHostNodeGetParams"] = __cuGraphHostNodeGetParams + * global __cuGraphHostNodeSetParams + * data["__cuGraphHostNodeSetParams"] = __cuGraphHostNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddChildGraphNode + * data["__cuGraphAddChildGraphNode"] = __cuGraphAddChildGraphNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphHostNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7623, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7625 + * data["__cuGraphHostNodeSetParams"] = __cuGraphHostNodeSetParams + * global __cuGraphAddChildGraphNode + * data["__cuGraphAddChildGraphNode"] = __cuGraphAddChildGraphNode # <<<<<<<<<<<<<< + * global __cuGraphChildGraphNodeGetGraph + * data["__cuGraphChildGraphNodeGetGraph"] = __cuGraphChildGraphNodeGetGraph +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddChildGraphNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7625, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7627 + * data["__cuGraphAddChildGraphNode"] = __cuGraphAddChildGraphNode + * global __cuGraphChildGraphNodeGetGraph + * data["__cuGraphChildGraphNodeGetGraph"] = __cuGraphChildGraphNodeGetGraph # <<<<<<<<<<<<<< + * global __cuGraphAddEmptyNode + * data["__cuGraphAddEmptyNode"] = __cuGraphAddEmptyNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphChildGraphNodeGetGraph, __pyx_t_3) < 0))) __PYX_ERR(0, 7627, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7629 + * data["__cuGraphChildGraphNodeGetGraph"] = __cuGraphChildGraphNodeGetGraph + * global __cuGraphAddEmptyNode + * data["__cuGraphAddEmptyNode"] = __cuGraphAddEmptyNode # <<<<<<<<<<<<<< + * global __cuGraphAddEventRecordNode + * data["__cuGraphAddEventRecordNode"] = __cuGraphAddEventRecordNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddEmptyNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7629, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7631 + * data["__cuGraphAddEmptyNode"] = __cuGraphAddEmptyNode + * global __cuGraphAddEventRecordNode + * data["__cuGraphAddEventRecordNode"] = __cuGraphAddEventRecordNode # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeGetEvent + * data["__cuGraphEventRecordNodeGetEvent"] = __cuGraphEventRecordNodeGetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddEventRecordNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7631, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7633 + * data["__cuGraphAddEventRecordNode"] = __cuGraphAddEventRecordNode + * global __cuGraphEventRecordNodeGetEvent + * data["__cuGraphEventRecordNodeGetEvent"] = __cuGraphEventRecordNodeGetEvent # <<<<<<<<<<<<<< + * global __cuGraphEventRecordNodeSetEvent + * data["__cuGraphEventRecordNodeSetEvent"] = __cuGraphEventRecordNodeSetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphEventRecordNodeGetEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7633, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7635 + * data["__cuGraphEventRecordNodeGetEvent"] = __cuGraphEventRecordNodeGetEvent + * global __cuGraphEventRecordNodeSetEvent + * data["__cuGraphEventRecordNodeSetEvent"] = __cuGraphEventRecordNodeSetEvent # <<<<<<<<<<<<<< + * global __cuGraphAddEventWaitNode + * data["__cuGraphAddEventWaitNode"] = __cuGraphAddEventWaitNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphEventRecordNodeSetEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7635, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7637 + * data["__cuGraphEventRecordNodeSetEvent"] = __cuGraphEventRecordNodeSetEvent + * global __cuGraphAddEventWaitNode + * data["__cuGraphAddEventWaitNode"] = __cuGraphAddEventWaitNode # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeGetEvent + * data["__cuGraphEventWaitNodeGetEvent"] = __cuGraphEventWaitNodeGetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddEventWaitNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7637, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7639 + * data["__cuGraphAddEventWaitNode"] = __cuGraphAddEventWaitNode + * global __cuGraphEventWaitNodeGetEvent + * data["__cuGraphEventWaitNodeGetEvent"] = __cuGraphEventWaitNodeGetEvent # <<<<<<<<<<<<<< + * global __cuGraphEventWaitNodeSetEvent + * data["__cuGraphEventWaitNodeSetEvent"] = __cuGraphEventWaitNodeSetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphEventWaitNodeGetEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7639, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7641 + * data["__cuGraphEventWaitNodeGetEvent"] = __cuGraphEventWaitNodeGetEvent + * global __cuGraphEventWaitNodeSetEvent + * data["__cuGraphEventWaitNodeSetEvent"] = __cuGraphEventWaitNodeSetEvent # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresSignalNode + * data["__cuGraphAddExternalSemaphoresSignalNode"] = __cuGraphAddExternalSemaphoresSignalNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphEventWaitNodeSetEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7641, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7643 + * data["__cuGraphEventWaitNodeSetEvent"] = __cuGraphEventWaitNodeSetEvent + * global __cuGraphAddExternalSemaphoresSignalNode + * data["__cuGraphAddExternalSemaphoresSignalNode"] = __cuGraphAddExternalSemaphoresSignalNode # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * data["__cuGraphExternalSemaphoresSignalNodeGetParams"] = __cuGraphExternalSemaphoresSignalNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7643, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddExternalSemaphoresSi, __pyx_t_3) < 0))) __PYX_ERR(0, 7643, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7645 + * data["__cuGraphAddExternalSemaphoresSignalNode"] = __cuGraphAddExternalSemaphoresSignalNode + * global __cuGraphExternalSemaphoresSignalNodeGetParams + * data["__cuGraphExternalSemaphoresSignalNodeGetParams"] = __cuGraphExternalSemaphoresSignalNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * data["__cuGraphExternalSemaphoresSignalNodeSetParams"] = __cuGraphExternalSemaphoresSignalNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7645, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExternalSemaphoresSigna, __pyx_t_3) < 0))) __PYX_ERR(0, 7645, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7647 + * data["__cuGraphExternalSemaphoresSignalNodeGetParams"] = __cuGraphExternalSemaphoresSignalNodeGetParams + * global __cuGraphExternalSemaphoresSignalNodeSetParams + * data["__cuGraphExternalSemaphoresSignalNodeSetParams"] = __cuGraphExternalSemaphoresSignalNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddExternalSemaphoresWaitNode + * data["__cuGraphAddExternalSemaphoresWaitNode"] = __cuGraphAddExternalSemaphoresWaitNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExternalSemaphoresSigna_2, __pyx_t_3) < 0))) __PYX_ERR(0, 7647, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7649 + * data["__cuGraphExternalSemaphoresSignalNodeSetParams"] = __cuGraphExternalSemaphoresSignalNodeSetParams + * global __cuGraphAddExternalSemaphoresWaitNode + * data["__cuGraphAddExternalSemaphoresWaitNode"] = __cuGraphAddExternalSemaphoresWaitNode # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * data["__cuGraphExternalSemaphoresWaitNodeGetParams"] = __cuGraphExternalSemaphoresWaitNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7649, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddExternalSemaphoresWa, __pyx_t_3) < 0))) __PYX_ERR(0, 7649, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7651 + * data["__cuGraphAddExternalSemaphoresWaitNode"] = __cuGraphAddExternalSemaphoresWaitNode + * global __cuGraphExternalSemaphoresWaitNodeGetParams + * data["__cuGraphExternalSemaphoresWaitNodeGetParams"] = __cuGraphExternalSemaphoresWaitNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * data["__cuGraphExternalSemaphoresWaitNodeSetParams"] = __cuGraphExternalSemaphoresWaitNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExternalSemaphoresWaitN, __pyx_t_3) < 0))) __PYX_ERR(0, 7651, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7653 + * data["__cuGraphExternalSemaphoresWaitNodeGetParams"] = __cuGraphExternalSemaphoresWaitNodeGetParams + * global __cuGraphExternalSemaphoresWaitNodeSetParams + * data["__cuGraphExternalSemaphoresWaitNodeSetParams"] = __cuGraphExternalSemaphoresWaitNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddBatchMemOpNode + * data["__cuGraphAddBatchMemOpNode"] = __cuGraphAddBatchMemOpNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExternalSemaphoresWaitN_2, __pyx_t_3) < 0))) __PYX_ERR(0, 7653, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7655 + * data["__cuGraphExternalSemaphoresWaitNodeSetParams"] = __cuGraphExternalSemaphoresWaitNodeSetParams + * global __cuGraphAddBatchMemOpNode + * data["__cuGraphAddBatchMemOpNode"] = __cuGraphAddBatchMemOpNode # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeGetParams + * data["__cuGraphBatchMemOpNodeGetParams"] = __cuGraphBatchMemOpNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddBatchMemOpNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7655, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7657 + * data["__cuGraphAddBatchMemOpNode"] = __cuGraphAddBatchMemOpNode + * global __cuGraphBatchMemOpNodeGetParams + * data["__cuGraphBatchMemOpNodeGetParams"] = __cuGraphBatchMemOpNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphBatchMemOpNodeSetParams + * data["__cuGraphBatchMemOpNodeSetParams"] = __cuGraphBatchMemOpNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphBatchMemOpNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7657, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7659 + * data["__cuGraphBatchMemOpNodeGetParams"] = __cuGraphBatchMemOpNodeGetParams + * global __cuGraphBatchMemOpNodeSetParams + * data["__cuGraphBatchMemOpNodeSetParams"] = __cuGraphBatchMemOpNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecBatchMemOpNodeSetParams + * data["__cuGraphExecBatchMemOpNodeSetParams"] = __cuGraphExecBatchMemOpNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7659, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphBatchMemOpNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7659, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7661 + * data["__cuGraphBatchMemOpNodeSetParams"] = __cuGraphBatchMemOpNodeSetParams + * global __cuGraphExecBatchMemOpNodeSetParams + * data["__cuGraphExecBatchMemOpNodeSetParams"] = __cuGraphExecBatchMemOpNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphAddMemAllocNode + * data["__cuGraphAddMemAllocNode"] = __cuGraphAddMemAllocNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecBatchMemOpNodeSetPa, __pyx_t_3) < 0))) __PYX_ERR(0, 7661, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7663 + * data["__cuGraphExecBatchMemOpNodeSetParams"] = __cuGraphExecBatchMemOpNodeSetParams + * global __cuGraphAddMemAllocNode + * data["__cuGraphAddMemAllocNode"] = __cuGraphAddMemAllocNode # <<<<<<<<<<<<<< + * global __cuGraphMemAllocNodeGetParams + * data["__cuGraphMemAllocNodeGetParams"] = __cuGraphMemAllocNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddMemAllocNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7663, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7665 + * data["__cuGraphAddMemAllocNode"] = __cuGraphAddMemAllocNode + * global __cuGraphMemAllocNodeGetParams + * data["__cuGraphMemAllocNodeGetParams"] = __cuGraphMemAllocNodeGetParams # <<<<<<<<<<<<<< + * global __cuGraphAddMemFreeNode + * data["__cuGraphAddMemFreeNode"] = __cuGraphAddMemFreeNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7665, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemAllocNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7665, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7667 + * data["__cuGraphMemAllocNodeGetParams"] = __cuGraphMemAllocNodeGetParams + * global __cuGraphAddMemFreeNode + * data["__cuGraphAddMemFreeNode"] = __cuGraphAddMemFreeNode # <<<<<<<<<<<<<< + * global __cuGraphMemFreeNodeGetParams + * data["__cuGraphMemFreeNodeGetParams"] = __cuGraphMemFreeNodeGetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddMemFreeNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7669 + * data["__cuGraphAddMemFreeNode"] = __cuGraphAddMemFreeNode + * global __cuGraphMemFreeNodeGetParams + * data["__cuGraphMemFreeNodeGetParams"] = __cuGraphMemFreeNodeGetParams # <<<<<<<<<<<<<< + * global __cuDeviceGraphMemTrim + * data["__cuDeviceGraphMemTrim"] = __cuDeviceGraphMemTrim +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphMemFreeNodeGetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7669, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7671 + * data["__cuGraphMemFreeNodeGetParams"] = __cuGraphMemFreeNodeGetParams + * global __cuDeviceGraphMemTrim + * data["__cuDeviceGraphMemTrim"] = __cuDeviceGraphMemTrim # <<<<<<<<<<<<<< + * global __cuDeviceGetGraphMemAttribute + * data["__cuDeviceGetGraphMemAttribute"] = __cuDeviceGetGraphMemAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7671, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGraphMemTrim, __pyx_t_3) < 0))) __PYX_ERR(0, 7671, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7673 + * data["__cuDeviceGraphMemTrim"] = __cuDeviceGraphMemTrim + * global __cuDeviceGetGraphMemAttribute + * data["__cuDeviceGetGraphMemAttribute"] = __cuDeviceGetGraphMemAttribute # <<<<<<<<<<<<<< + * global __cuDeviceSetGraphMemAttribute + * data["__cuDeviceSetGraphMemAttribute"] = __cuDeviceSetGraphMemAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetGraphMemAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7673, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7675 + * data["__cuDeviceGetGraphMemAttribute"] = __cuDeviceGetGraphMemAttribute + * global __cuDeviceSetGraphMemAttribute + * data["__cuDeviceSetGraphMemAttribute"] = __cuDeviceSetGraphMemAttribute # <<<<<<<<<<<<<< + * global __cuGraphClone + * data["__cuGraphClone"] = __cuGraphClone +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceSetGraphMemAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7675, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7677 + * data["__cuDeviceSetGraphMemAttribute"] = __cuDeviceSetGraphMemAttribute + * global __cuGraphClone + * data["__cuGraphClone"] = __cuGraphClone # <<<<<<<<<<<<<< + * global __cuGraphNodeFindInClone + * data["__cuGraphNodeFindInClone"] = __cuGraphNodeFindInClone +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7677, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphClone, __pyx_t_3) < 0))) __PYX_ERR(0, 7677, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7679 + * data["__cuGraphClone"] = __cuGraphClone + * global __cuGraphNodeFindInClone + * data["__cuGraphNodeFindInClone"] = __cuGraphNodeFindInClone # <<<<<<<<<<<<<< + * global __cuGraphNodeGetType + * data["__cuGraphNodeGetType"] = __cuGraphNodeGetType +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeFindInClone, __pyx_t_3) < 0))) __PYX_ERR(0, 7679, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7681 + * data["__cuGraphNodeFindInClone"] = __cuGraphNodeFindInClone + * global __cuGraphNodeGetType + * data["__cuGraphNodeGetType"] = __cuGraphNodeGetType # <<<<<<<<<<<<<< + * global __cuGraphGetNodes + * data["__cuGraphGetNodes"] = __cuGraphGetNodes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetType, __pyx_t_3) < 0))) __PYX_ERR(0, 7681, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7683 + * data["__cuGraphNodeGetType"] = __cuGraphNodeGetType + * global __cuGraphGetNodes + * data["__cuGraphGetNodes"] = __cuGraphGetNodes # <<<<<<<<<<<<<< + * global __cuGraphGetRootNodes + * data["__cuGraphGetRootNodes"] = __cuGraphGetRootNodes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7683, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphGetNodes, __pyx_t_3) < 0))) __PYX_ERR(0, 7683, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7685 + * data["__cuGraphGetNodes"] = __cuGraphGetNodes + * global __cuGraphGetRootNodes + * data["__cuGraphGetRootNodes"] = __cuGraphGetRootNodes # <<<<<<<<<<<<<< + * global __cuGraphGetEdges + * data["__cuGraphGetEdges"] = __cuGraphGetEdges +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphGetRootNodes, __pyx_t_3) < 0))) __PYX_ERR(0, 7685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7687 + * data["__cuGraphGetRootNodes"] = __cuGraphGetRootNodes + * global __cuGraphGetEdges + * data["__cuGraphGetEdges"] = __cuGraphGetEdges # <<<<<<<<<<<<<< + * global __cuGraphGetEdges_v2 + * data["__cuGraphGetEdges_v2"] = __cuGraphGetEdges_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphGetEdges, __pyx_t_3) < 0))) __PYX_ERR(0, 7687, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7689 + * data["__cuGraphGetEdges"] = __cuGraphGetEdges + * global __cuGraphGetEdges_v2 + * data["__cuGraphGetEdges_v2"] = __cuGraphGetEdges_v2 # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies + * data["__cuGraphNodeGetDependencies"] = __cuGraphNodeGetDependencies +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphGetEdges_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7691 + * data["__cuGraphGetEdges_v2"] = __cuGraphGetEdges_v2 + * global __cuGraphNodeGetDependencies + * data["__cuGraphNodeGetDependencies"] = __cuGraphNodeGetDependencies # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependencies_v2 + * data["__cuGraphNodeGetDependencies_v2"] = __cuGraphNodeGetDependencies_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetDependencies, __pyx_t_3) < 0))) __PYX_ERR(0, 7691, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7693 + * data["__cuGraphNodeGetDependencies"] = __cuGraphNodeGetDependencies + * global __cuGraphNodeGetDependencies_v2 + * data["__cuGraphNodeGetDependencies_v2"] = __cuGraphNodeGetDependencies_v2 # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes + * data["__cuGraphNodeGetDependentNodes"] = __cuGraphNodeGetDependentNodes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetDependencies_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7695 + * data["__cuGraphNodeGetDependencies_v2"] = __cuGraphNodeGetDependencies_v2 + * global __cuGraphNodeGetDependentNodes + * data["__cuGraphNodeGetDependentNodes"] = __cuGraphNodeGetDependentNodes # <<<<<<<<<<<<<< + * global __cuGraphNodeGetDependentNodes_v2 + * data["__cuGraphNodeGetDependentNodes_v2"] = __cuGraphNodeGetDependentNodes_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7695, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetDependentNodes, __pyx_t_3) < 0))) __PYX_ERR(0, 7695, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7697 + * data["__cuGraphNodeGetDependentNodes"] = __cuGraphNodeGetDependentNodes + * global __cuGraphNodeGetDependentNodes_v2 + * data["__cuGraphNodeGetDependentNodes_v2"] = __cuGraphNodeGetDependentNodes_v2 # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies + * data["__cuGraphAddDependencies"] = __cuGraphAddDependencies +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7697, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetDependentNodes_v, __pyx_t_3) < 0))) __PYX_ERR(0, 7697, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7699 + * data["__cuGraphNodeGetDependentNodes_v2"] = __cuGraphNodeGetDependentNodes_v2 + * global __cuGraphAddDependencies + * data["__cuGraphAddDependencies"] = __cuGraphAddDependencies # <<<<<<<<<<<<<< + * global __cuGraphAddDependencies_v2 + * data["__cuGraphAddDependencies_v2"] = __cuGraphAddDependencies_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddDependencies, __pyx_t_3) < 0))) __PYX_ERR(0, 7699, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7701 + * data["__cuGraphAddDependencies"] = __cuGraphAddDependencies + * global __cuGraphAddDependencies_v2 + * data["__cuGraphAddDependencies_v2"] = __cuGraphAddDependencies_v2 # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies + * data["__cuGraphRemoveDependencies"] = __cuGraphRemoveDependencies +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddDependencies_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7701, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7703 + * data["__cuGraphAddDependencies_v2"] = __cuGraphAddDependencies_v2 + * global __cuGraphRemoveDependencies + * data["__cuGraphRemoveDependencies"] = __cuGraphRemoveDependencies # <<<<<<<<<<<<<< + * global __cuGraphRemoveDependencies_v2 + * data["__cuGraphRemoveDependencies_v2"] = __cuGraphRemoveDependencies_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphRemoveDependencies, __pyx_t_3) < 0))) __PYX_ERR(0, 7703, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7705 + * data["__cuGraphRemoveDependencies"] = __cuGraphRemoveDependencies + * global __cuGraphRemoveDependencies_v2 + * data["__cuGraphRemoveDependencies_v2"] = __cuGraphRemoveDependencies_v2 # <<<<<<<<<<<<<< + * global __cuGraphDestroyNode + * data["__cuGraphDestroyNode"] = __cuGraphDestroyNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphRemoveDependencies_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7705, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7707 + * data["__cuGraphRemoveDependencies_v2"] = __cuGraphRemoveDependencies_v2 + * global __cuGraphDestroyNode + * data["__cuGraphDestroyNode"] = __cuGraphDestroyNode # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithFlags + * data["__cuGraphInstantiateWithFlags"] = __cuGraphInstantiateWithFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphDestroyNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7707, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7709 + * data["__cuGraphDestroyNode"] = __cuGraphDestroyNode + * global __cuGraphInstantiateWithFlags + * data["__cuGraphInstantiateWithFlags"] = __cuGraphInstantiateWithFlags # <<<<<<<<<<<<<< + * global __cuGraphInstantiateWithParams + * data["__cuGraphInstantiateWithParams"] = __cuGraphInstantiateWithParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphInstantiateWithFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7709, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7711 + * data["__cuGraphInstantiateWithFlags"] = __cuGraphInstantiateWithFlags + * global __cuGraphInstantiateWithParams + * data["__cuGraphInstantiateWithParams"] = __cuGraphInstantiateWithParams # <<<<<<<<<<<<<< + * global __cuGraphExecGetFlags + * data["__cuGraphExecGetFlags"] = __cuGraphExecGetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7711, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphInstantiateWithParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7711, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7713 + * data["__cuGraphInstantiateWithParams"] = __cuGraphInstantiateWithParams + * global __cuGraphExecGetFlags + * data["__cuGraphExecGetFlags"] = __cuGraphExecGetFlags # <<<<<<<<<<<<<< + * global __cuGraphExecKernelNodeSetParams_v2 + * data["__cuGraphExecKernelNodeSetParams_v2"] = __cuGraphExecKernelNodeSetParams_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7713, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecGetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7713, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7715 + * data["__cuGraphExecGetFlags"] = __cuGraphExecGetFlags + * global __cuGraphExecKernelNodeSetParams_v2 + * data["__cuGraphExecKernelNodeSetParams_v2"] = __cuGraphExecKernelNodeSetParams_v2 # <<<<<<<<<<<<<< + * global __cuGraphExecMemcpyNodeSetParams + * data["__cuGraphExecMemcpyNodeSetParams"] = __cuGraphExecMemcpyNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7715, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecKernelNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7715, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7717 + * data["__cuGraphExecKernelNodeSetParams_v2"] = __cuGraphExecKernelNodeSetParams_v2 + * global __cuGraphExecMemcpyNodeSetParams + * data["__cuGraphExecMemcpyNodeSetParams"] = __cuGraphExecMemcpyNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecMemsetNodeSetParams + * data["__cuGraphExecMemsetNodeSetParams"] = __cuGraphExecMemsetNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7717, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecMemcpyNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7717, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7719 + * data["__cuGraphExecMemcpyNodeSetParams"] = __cuGraphExecMemcpyNodeSetParams + * global __cuGraphExecMemsetNodeSetParams + * data["__cuGraphExecMemsetNodeSetParams"] = __cuGraphExecMemsetNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecHostNodeSetParams + * data["__cuGraphExecHostNodeSetParams"] = __cuGraphExecHostNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecMemsetNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7719, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7721 + * data["__cuGraphExecMemsetNodeSetParams"] = __cuGraphExecMemsetNodeSetParams + * global __cuGraphExecHostNodeSetParams + * data["__cuGraphExecHostNodeSetParams"] = __cuGraphExecHostNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecChildGraphNodeSetParams + * data["__cuGraphExecChildGraphNodeSetParams"] = __cuGraphExecChildGraphNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7721, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecHostNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7721, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7723 + * data["__cuGraphExecHostNodeSetParams"] = __cuGraphExecHostNodeSetParams + * global __cuGraphExecChildGraphNodeSetParams + * data["__cuGraphExecChildGraphNodeSetParams"] = __cuGraphExecChildGraphNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecEventRecordNodeSetEvent + * data["__cuGraphExecEventRecordNodeSetEvent"] = __cuGraphExecEventRecordNodeSetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7723, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecChildGraphNodeSetPa, __pyx_t_3) < 0))) __PYX_ERR(0, 7723, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7725 + * data["__cuGraphExecChildGraphNodeSetParams"] = __cuGraphExecChildGraphNodeSetParams + * global __cuGraphExecEventRecordNodeSetEvent + * data["__cuGraphExecEventRecordNodeSetEvent"] = __cuGraphExecEventRecordNodeSetEvent # <<<<<<<<<<<<<< + * global __cuGraphExecEventWaitNodeSetEvent + * data["__cuGraphExecEventWaitNodeSetEvent"] = __cuGraphExecEventWaitNodeSetEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7725, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecEventRecordNodeSetE, __pyx_t_3) < 0))) __PYX_ERR(0, 7725, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7727 + * data["__cuGraphExecEventRecordNodeSetEvent"] = __cuGraphExecEventRecordNodeSetEvent + * global __cuGraphExecEventWaitNodeSetEvent + * data["__cuGraphExecEventWaitNodeSetEvent"] = __cuGraphExecEventWaitNodeSetEvent # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * data["__cuGraphExecExternalSemaphoresSignalNodeSetParams"] = __cuGraphExecExternalSemaphoresSignalNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7727, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecEventWaitNodeSetEve, __pyx_t_3) < 0))) __PYX_ERR(0, 7727, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7729 + * data["__cuGraphExecEventWaitNodeSetEvent"] = __cuGraphExecEventWaitNodeSetEvent + * global __cuGraphExecExternalSemaphoresSignalNodeSetParams + * data["__cuGraphExecExternalSemaphoresSignalNodeSetParams"] = __cuGraphExecExternalSemaphoresSignalNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * data["__cuGraphExecExternalSemaphoresWaitNodeSetParams"] = __cuGraphExecExternalSemaphoresWaitNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecExternalSemaphoresS, __pyx_t_3) < 0))) __PYX_ERR(0, 7729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7731 + * data["__cuGraphExecExternalSemaphoresSignalNodeSetParams"] = __cuGraphExecExternalSemaphoresSignalNodeSetParams + * global __cuGraphExecExternalSemaphoresWaitNodeSetParams + * data["__cuGraphExecExternalSemaphoresWaitNodeSetParams"] = __cuGraphExecExternalSemaphoresWaitNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphNodeSetEnabled + * data["__cuGraphNodeSetEnabled"] = __cuGraphNodeSetEnabled +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecExternalSemaphoresW, __pyx_t_3) < 0))) __PYX_ERR(0, 7731, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7733 + * data["__cuGraphExecExternalSemaphoresWaitNodeSetParams"] = __cuGraphExecExternalSemaphoresWaitNodeSetParams + * global __cuGraphNodeSetEnabled + * data["__cuGraphNodeSetEnabled"] = __cuGraphNodeSetEnabled # <<<<<<<<<<<<<< + * global __cuGraphNodeGetEnabled + * data["__cuGraphNodeGetEnabled"] = __cuGraphNodeGetEnabled +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7733, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeSetEnabled, __pyx_t_3) < 0))) __PYX_ERR(0, 7733, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7735 + * data["__cuGraphNodeSetEnabled"] = __cuGraphNodeSetEnabled + * global __cuGraphNodeGetEnabled + * data["__cuGraphNodeGetEnabled"] = __cuGraphNodeGetEnabled # <<<<<<<<<<<<<< + * global __cuGraphUpload + * data["__cuGraphUpload"] = __cuGraphUpload +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7735, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeGetEnabled, __pyx_t_3) < 0))) __PYX_ERR(0, 7735, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7737 + * data["__cuGraphNodeGetEnabled"] = __cuGraphNodeGetEnabled + * global __cuGraphUpload + * data["__cuGraphUpload"] = __cuGraphUpload # <<<<<<<<<<<<<< + * global __cuGraphLaunch + * data["__cuGraphLaunch"] = __cuGraphLaunch +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7737, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphUpload, __pyx_t_3) < 0))) __PYX_ERR(0, 7737, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7739 + * data["__cuGraphUpload"] = __cuGraphUpload + * global __cuGraphLaunch + * data["__cuGraphLaunch"] = __cuGraphLaunch # <<<<<<<<<<<<<< + * global __cuGraphExecDestroy + * data["__cuGraphExecDestroy"] = __cuGraphExecDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7739, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphLaunch, __pyx_t_3) < 0))) __PYX_ERR(0, 7739, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7741 + * data["__cuGraphLaunch"] = __cuGraphLaunch + * global __cuGraphExecDestroy + * data["__cuGraphExecDestroy"] = __cuGraphExecDestroy # <<<<<<<<<<<<<< + * global __cuGraphDestroy + * data["__cuGraphDestroy"] = __cuGraphDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7741, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7743 + * data["__cuGraphExecDestroy"] = __cuGraphExecDestroy + * global __cuGraphDestroy + * data["__cuGraphDestroy"] = __cuGraphDestroy # <<<<<<<<<<<<<< + * global __cuGraphExecUpdate_v2 + * data["__cuGraphExecUpdate_v2"] = __cuGraphExecUpdate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7743, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7743, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7745 + * data["__cuGraphDestroy"] = __cuGraphDestroy + * global __cuGraphExecUpdate_v2 + * data["__cuGraphExecUpdate_v2"] = __cuGraphExecUpdate_v2 # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeCopyAttributes + * data["__cuGraphKernelNodeCopyAttributes"] = __cuGraphKernelNodeCopyAttributes +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7745, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecUpdate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7745, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7747 + * data["__cuGraphExecUpdate_v2"] = __cuGraphExecUpdate_v2 + * global __cuGraphKernelNodeCopyAttributes + * data["__cuGraphKernelNodeCopyAttributes"] = __cuGraphKernelNodeCopyAttributes # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeGetAttribute + * data["__cuGraphKernelNodeGetAttribute"] = __cuGraphKernelNodeGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7747, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphKernelNodeCopyAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7747, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7749 + * data["__cuGraphKernelNodeCopyAttributes"] = __cuGraphKernelNodeCopyAttributes + * global __cuGraphKernelNodeGetAttribute + * data["__cuGraphKernelNodeGetAttribute"] = __cuGraphKernelNodeGetAttribute # <<<<<<<<<<<<<< + * global __cuGraphKernelNodeSetAttribute + * data["__cuGraphKernelNodeSetAttribute"] = __cuGraphKernelNodeSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7749, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphKernelNodeGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7749, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7751 + * data["__cuGraphKernelNodeGetAttribute"] = __cuGraphKernelNodeGetAttribute + * global __cuGraphKernelNodeSetAttribute + * data["__cuGraphKernelNodeSetAttribute"] = __cuGraphKernelNodeSetAttribute # <<<<<<<<<<<<<< + * global __cuGraphDebugDotPrint + * data["__cuGraphDebugDotPrint"] = __cuGraphDebugDotPrint +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphKernelNodeSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7753 + * data["__cuGraphKernelNodeSetAttribute"] = __cuGraphKernelNodeSetAttribute + * global __cuGraphDebugDotPrint + * data["__cuGraphDebugDotPrint"] = __cuGraphDebugDotPrint # <<<<<<<<<<<<<< + * global __cuUserObjectCreate + * data["__cuUserObjectCreate"] = __cuUserObjectCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7753, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphDebugDotPrint, __pyx_t_3) < 0))) __PYX_ERR(0, 7753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7755 + * data["__cuGraphDebugDotPrint"] = __cuGraphDebugDotPrint + * global __cuUserObjectCreate + * data["__cuUserObjectCreate"] = __cuUserObjectCreate # <<<<<<<<<<<<<< + * global __cuUserObjectRetain + * data["__cuUserObjectRetain"] = __cuUserObjectRetain +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuUserObjectCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7755, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7757 + * data["__cuUserObjectCreate"] = __cuUserObjectCreate + * global __cuUserObjectRetain + * data["__cuUserObjectRetain"] = __cuUserObjectRetain # <<<<<<<<<<<<<< + * global __cuUserObjectRelease + * data["__cuUserObjectRelease"] = __cuUserObjectRelease +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuUserObjectRetain, __pyx_t_3) < 0))) __PYX_ERR(0, 7757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7759 + * data["__cuUserObjectRetain"] = __cuUserObjectRetain + * global __cuUserObjectRelease + * data["__cuUserObjectRelease"] = __cuUserObjectRelease # <<<<<<<<<<<<<< + * global __cuGraphRetainUserObject + * data["__cuGraphRetainUserObject"] = __cuGraphRetainUserObject +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7759, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuUserObjectRelease, __pyx_t_3) < 0))) __PYX_ERR(0, 7759, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7761 + * data["__cuUserObjectRelease"] = __cuUserObjectRelease + * global __cuGraphRetainUserObject + * data["__cuGraphRetainUserObject"] = __cuGraphRetainUserObject # <<<<<<<<<<<<<< + * global __cuGraphReleaseUserObject + * data["__cuGraphReleaseUserObject"] = __cuGraphReleaseUserObject +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7761, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphRetainUserObject, __pyx_t_3) < 0))) __PYX_ERR(0, 7761, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7763 + * data["__cuGraphRetainUserObject"] = __cuGraphRetainUserObject + * global __cuGraphReleaseUserObject + * data["__cuGraphReleaseUserObject"] = __cuGraphReleaseUserObject # <<<<<<<<<<<<<< + * global __cuGraphAddNode + * data["__cuGraphAddNode"] = __cuGraphAddNode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7763, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphReleaseUserObject, __pyx_t_3) < 0))) __PYX_ERR(0, 7763, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7765 + * data["__cuGraphReleaseUserObject"] = __cuGraphReleaseUserObject + * global __cuGraphAddNode + * data["__cuGraphAddNode"] = __cuGraphAddNode # <<<<<<<<<<<<<< + * global __cuGraphAddNode_v2 + * data["__cuGraphAddNode_v2"] = __cuGraphAddNode_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7765, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddNode, __pyx_t_3) < 0))) __PYX_ERR(0, 7765, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7767 + * data["__cuGraphAddNode"] = __cuGraphAddNode + * global __cuGraphAddNode_v2 + * data["__cuGraphAddNode_v2"] = __cuGraphAddNode_v2 # <<<<<<<<<<<<<< + * global __cuGraphNodeSetParams + * data["__cuGraphNodeSetParams"] = __cuGraphNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7767, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphAddNode_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7767, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7769 + * data["__cuGraphAddNode_v2"] = __cuGraphAddNode_v2 + * global __cuGraphNodeSetParams + * data["__cuGraphNodeSetParams"] = __cuGraphNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphExecNodeSetParams + * data["__cuGraphExecNodeSetParams"] = __cuGraphExecNodeSetParams +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7769, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7769, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7771 + * data["__cuGraphNodeSetParams"] = __cuGraphNodeSetParams + * global __cuGraphExecNodeSetParams + * data["__cuGraphExecNodeSetParams"] = __cuGraphExecNodeSetParams # <<<<<<<<<<<<<< + * global __cuGraphConditionalHandleCreate + * data["__cuGraphConditionalHandleCreate"] = __cuGraphConditionalHandleCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7771, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphExecNodeSetParams, __pyx_t_3) < 0))) __PYX_ERR(0, 7771, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7773 + * data["__cuGraphExecNodeSetParams"] = __cuGraphExecNodeSetParams + * global __cuGraphConditionalHandleCreate + * data["__cuGraphConditionalHandleCreate"] = __cuGraphConditionalHandleCreate # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessor"] = __cuOccupancyMaxActiveBlocksPerMultiprocessor +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphConditionalHandleCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7773, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7775 + * data["__cuGraphConditionalHandleCreate"] = __cuGraphConditionalHandleCreate + * global __cuOccupancyMaxActiveBlocksPerMultiprocessor + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessor"] = __cuOccupancyMaxActiveBlocksPerMultiprocessor # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"] = __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxActiveBlocksPerM, __pyx_t_3) < 0))) __PYX_ERR(0, 7775, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7777 + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessor"] = __cuOccupancyMaxActiveBlocksPerMultiprocessor + * global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"] = __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSize + * data["__cuOccupancyMaxPotentialBlockSize"] = __cuOccupancyMaxPotentialBlockSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxActiveBlocksPerM_2, __pyx_t_3) < 0))) __PYX_ERR(0, 7777, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7779 + * data["__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"] = __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + * global __cuOccupancyMaxPotentialBlockSize + * data["__cuOccupancyMaxPotentialBlockSize"] = __cuOccupancyMaxPotentialBlockSize # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * data["__cuOccupancyMaxPotentialBlockSizeWithFlags"] = __cuOccupancyMaxPotentialBlockSizeWithFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxPotentialBlockSi, __pyx_t_3) < 0))) __PYX_ERR(0, 7779, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7781 + * data["__cuOccupancyMaxPotentialBlockSize"] = __cuOccupancyMaxPotentialBlockSize + * global __cuOccupancyMaxPotentialBlockSizeWithFlags + * data["__cuOccupancyMaxPotentialBlockSizeWithFlags"] = __cuOccupancyMaxPotentialBlockSizeWithFlags # <<<<<<<<<<<<<< + * global __cuOccupancyAvailableDynamicSMemPerBlock + * data["__cuOccupancyAvailableDynamicSMemPerBlock"] = __cuOccupancyAvailableDynamicSMemPerBlock +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7781, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxPotentialBlockSi_2, __pyx_t_3) < 0))) __PYX_ERR(0, 7781, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7783 + * data["__cuOccupancyMaxPotentialBlockSizeWithFlags"] = __cuOccupancyMaxPotentialBlockSizeWithFlags + * global __cuOccupancyAvailableDynamicSMemPerBlock + * data["__cuOccupancyAvailableDynamicSMemPerBlock"] = __cuOccupancyAvailableDynamicSMemPerBlock # <<<<<<<<<<<<<< + * global __cuOccupancyMaxPotentialClusterSize + * data["__cuOccupancyMaxPotentialClusterSize"] = __cuOccupancyMaxPotentialClusterSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyAvailableDynamicSMe, __pyx_t_3) < 0))) __PYX_ERR(0, 7783, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7785 + * data["__cuOccupancyAvailableDynamicSMemPerBlock"] = __cuOccupancyAvailableDynamicSMemPerBlock + * global __cuOccupancyMaxPotentialClusterSize + * data["__cuOccupancyMaxPotentialClusterSize"] = __cuOccupancyMaxPotentialClusterSize # <<<<<<<<<<<<<< + * global __cuOccupancyMaxActiveClusters + * data["__cuOccupancyMaxActiveClusters"] = __cuOccupancyMaxActiveClusters +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxPotentialCluster, __pyx_t_3) < 0))) __PYX_ERR(0, 7785, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7787 + * data["__cuOccupancyMaxPotentialClusterSize"] = __cuOccupancyMaxPotentialClusterSize + * global __cuOccupancyMaxActiveClusters + * data["__cuOccupancyMaxActiveClusters"] = __cuOccupancyMaxActiveClusters # <<<<<<<<<<<<<< + * global __cuTexRefSetArray + * data["__cuTexRefSetArray"] = __cuTexRefSetArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7787, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuOccupancyMaxActiveClusters, __pyx_t_3) < 0))) __PYX_ERR(0, 7787, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7789 + * data["__cuOccupancyMaxActiveClusters"] = __cuOccupancyMaxActiveClusters + * global __cuTexRefSetArray + * data["__cuTexRefSetArray"] = __cuTexRefSetArray # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmappedArray + * data["__cuTexRefSetMipmappedArray"] = __cuTexRefSetMipmappedArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7789, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7789, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7791 + * data["__cuTexRefSetArray"] = __cuTexRefSetArray + * global __cuTexRefSetMipmappedArray + * data["__cuTexRefSetMipmappedArray"] = __cuTexRefSetMipmappedArray # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress_v2 + * data["__cuTexRefSetAddress_v2"] = __cuTexRefSetAddress_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7791, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetMipmappedArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7791, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7793 + * data["__cuTexRefSetMipmappedArray"] = __cuTexRefSetMipmappedArray + * global __cuTexRefSetAddress_v2 + * data["__cuTexRefSetAddress_v2"] = __cuTexRefSetAddress_v2 # <<<<<<<<<<<<<< + * global __cuTexRefSetAddress2D_v3 + * data["__cuTexRefSetAddress2D_v3"] = __cuTexRefSetAddress2D_v3 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7793, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetAddress_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7793, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7795 + * data["__cuTexRefSetAddress_v2"] = __cuTexRefSetAddress_v2 + * global __cuTexRefSetAddress2D_v3 + * data["__cuTexRefSetAddress2D_v3"] = __cuTexRefSetAddress2D_v3 # <<<<<<<<<<<<<< + * global __cuTexRefSetFormat + * data["__cuTexRefSetFormat"] = __cuTexRefSetFormat +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetAddress2D_v3, __pyx_t_3) < 0))) __PYX_ERR(0, 7795, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7797 + * data["__cuTexRefSetAddress2D_v3"] = __cuTexRefSetAddress2D_v3 + * global __cuTexRefSetFormat + * data["__cuTexRefSetFormat"] = __cuTexRefSetFormat # <<<<<<<<<<<<<< + * global __cuTexRefSetAddressMode + * data["__cuTexRefSetAddressMode"] = __cuTexRefSetAddressMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetFormat, __pyx_t_3) < 0))) __PYX_ERR(0, 7797, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7799 + * data["__cuTexRefSetFormat"] = __cuTexRefSetFormat + * global __cuTexRefSetAddressMode + * data["__cuTexRefSetAddressMode"] = __cuTexRefSetAddressMode # <<<<<<<<<<<<<< + * global __cuTexRefSetFilterMode + * data["__cuTexRefSetFilterMode"] = __cuTexRefSetFilterMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetAddressMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7799, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7801 + * data["__cuTexRefSetAddressMode"] = __cuTexRefSetAddressMode + * global __cuTexRefSetFilterMode + * data["__cuTexRefSetFilterMode"] = __cuTexRefSetFilterMode # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapFilterMode + * data["__cuTexRefSetMipmapFilterMode"] = __cuTexRefSetMipmapFilterMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7801, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetFilterMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7801, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7803 + * data["__cuTexRefSetFilterMode"] = __cuTexRefSetFilterMode + * global __cuTexRefSetMipmapFilterMode + * data["__cuTexRefSetMipmapFilterMode"] = __cuTexRefSetMipmapFilterMode # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelBias + * data["__cuTexRefSetMipmapLevelBias"] = __cuTexRefSetMipmapLevelBias +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7803, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetMipmapFilterMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7803, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7805 + * data["__cuTexRefSetMipmapFilterMode"] = __cuTexRefSetMipmapFilterMode + * global __cuTexRefSetMipmapLevelBias + * data["__cuTexRefSetMipmapLevelBias"] = __cuTexRefSetMipmapLevelBias # <<<<<<<<<<<<<< + * global __cuTexRefSetMipmapLevelClamp + * data["__cuTexRefSetMipmapLevelClamp"] = __cuTexRefSetMipmapLevelClamp +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetMipmapLevelBias, __pyx_t_3) < 0))) __PYX_ERR(0, 7805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7807 + * data["__cuTexRefSetMipmapLevelBias"] = __cuTexRefSetMipmapLevelBias + * global __cuTexRefSetMipmapLevelClamp + * data["__cuTexRefSetMipmapLevelClamp"] = __cuTexRefSetMipmapLevelClamp # <<<<<<<<<<<<<< + * global __cuTexRefSetMaxAnisotropy + * data["__cuTexRefSetMaxAnisotropy"] = __cuTexRefSetMaxAnisotropy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetMipmapLevelClamp, __pyx_t_3) < 0))) __PYX_ERR(0, 7807, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7809 + * data["__cuTexRefSetMipmapLevelClamp"] = __cuTexRefSetMipmapLevelClamp + * global __cuTexRefSetMaxAnisotropy + * data["__cuTexRefSetMaxAnisotropy"] = __cuTexRefSetMaxAnisotropy # <<<<<<<<<<<<<< + * global __cuTexRefSetBorderColor + * data["__cuTexRefSetBorderColor"] = __cuTexRefSetBorderColor +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetMaxAnisotropy, __pyx_t_3) < 0))) __PYX_ERR(0, 7809, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7811 + * data["__cuTexRefSetMaxAnisotropy"] = __cuTexRefSetMaxAnisotropy + * global __cuTexRefSetBorderColor + * data["__cuTexRefSetBorderColor"] = __cuTexRefSetBorderColor # <<<<<<<<<<<<<< + * global __cuTexRefSetFlags + * data["__cuTexRefSetFlags"] = __cuTexRefSetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetBorderColor, __pyx_t_3) < 0))) __PYX_ERR(0, 7811, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7813 + * data["__cuTexRefSetBorderColor"] = __cuTexRefSetBorderColor + * global __cuTexRefSetFlags + * data["__cuTexRefSetFlags"] = __cuTexRefSetFlags # <<<<<<<<<<<<<< + * global __cuTexRefGetAddress_v2 + * data["__cuTexRefGetAddress_v2"] = __cuTexRefGetAddress_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefSetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7815 + * data["__cuTexRefSetFlags"] = __cuTexRefSetFlags + * global __cuTexRefGetAddress_v2 + * data["__cuTexRefGetAddress_v2"] = __cuTexRefGetAddress_v2 # <<<<<<<<<<<<<< + * global __cuTexRefGetArray + * data["__cuTexRefGetArray"] = __cuTexRefGetArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetAddress_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7815, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7817 + * data["__cuTexRefGetAddress_v2"] = __cuTexRefGetAddress_v2 + * global __cuTexRefGetArray + * data["__cuTexRefGetArray"] = __cuTexRefGetArray # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmappedArray + * data["__cuTexRefGetMipmappedArray"] = __cuTexRefGetMipmappedArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7817, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7817, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7819 + * data["__cuTexRefGetArray"] = __cuTexRefGetArray + * global __cuTexRefGetMipmappedArray + * data["__cuTexRefGetMipmappedArray"] = __cuTexRefGetMipmappedArray # <<<<<<<<<<<<<< + * global __cuTexRefGetAddressMode + * data["__cuTexRefGetAddressMode"] = __cuTexRefGetAddressMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetMipmappedArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7819, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7821 + * data["__cuTexRefGetMipmappedArray"] = __cuTexRefGetMipmappedArray + * global __cuTexRefGetAddressMode + * data["__cuTexRefGetAddressMode"] = __cuTexRefGetAddressMode # <<<<<<<<<<<<<< + * global __cuTexRefGetFilterMode + * data["__cuTexRefGetFilterMode"] = __cuTexRefGetFilterMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7821, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetAddressMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7821, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7823 + * data["__cuTexRefGetAddressMode"] = __cuTexRefGetAddressMode + * global __cuTexRefGetFilterMode + * data["__cuTexRefGetFilterMode"] = __cuTexRefGetFilterMode # <<<<<<<<<<<<<< + * global __cuTexRefGetFormat + * data["__cuTexRefGetFormat"] = __cuTexRefGetFormat +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetFilterMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7823, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7825 + * data["__cuTexRefGetFilterMode"] = __cuTexRefGetFilterMode + * global __cuTexRefGetFormat + * data["__cuTexRefGetFormat"] = __cuTexRefGetFormat # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapFilterMode + * data["__cuTexRefGetMipmapFilterMode"] = __cuTexRefGetMipmapFilterMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetFormat, __pyx_t_3) < 0))) __PYX_ERR(0, 7825, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7827 + * data["__cuTexRefGetFormat"] = __cuTexRefGetFormat + * global __cuTexRefGetMipmapFilterMode + * data["__cuTexRefGetMipmapFilterMode"] = __cuTexRefGetMipmapFilterMode # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelBias + * data["__cuTexRefGetMipmapLevelBias"] = __cuTexRefGetMipmapLevelBias +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetMipmapFilterMode, __pyx_t_3) < 0))) __PYX_ERR(0, 7827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7829 + * data["__cuTexRefGetMipmapFilterMode"] = __cuTexRefGetMipmapFilterMode + * global __cuTexRefGetMipmapLevelBias + * data["__cuTexRefGetMipmapLevelBias"] = __cuTexRefGetMipmapLevelBias # <<<<<<<<<<<<<< + * global __cuTexRefGetMipmapLevelClamp + * data["__cuTexRefGetMipmapLevelClamp"] = __cuTexRefGetMipmapLevelClamp +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetMipmapLevelBias, __pyx_t_3) < 0))) __PYX_ERR(0, 7829, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7831 + * data["__cuTexRefGetMipmapLevelBias"] = __cuTexRefGetMipmapLevelBias + * global __cuTexRefGetMipmapLevelClamp + * data["__cuTexRefGetMipmapLevelClamp"] = __cuTexRefGetMipmapLevelClamp # <<<<<<<<<<<<<< + * global __cuTexRefGetMaxAnisotropy + * data["__cuTexRefGetMaxAnisotropy"] = __cuTexRefGetMaxAnisotropy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetMipmapLevelClamp, __pyx_t_3) < 0))) __PYX_ERR(0, 7831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7833 + * data["__cuTexRefGetMipmapLevelClamp"] = __cuTexRefGetMipmapLevelClamp + * global __cuTexRefGetMaxAnisotropy + * data["__cuTexRefGetMaxAnisotropy"] = __cuTexRefGetMaxAnisotropy # <<<<<<<<<<<<<< + * global __cuTexRefGetBorderColor + * data["__cuTexRefGetBorderColor"] = __cuTexRefGetBorderColor +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetMaxAnisotropy, __pyx_t_3) < 0))) __PYX_ERR(0, 7833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7835 + * data["__cuTexRefGetMaxAnisotropy"] = __cuTexRefGetMaxAnisotropy + * global __cuTexRefGetBorderColor + * data["__cuTexRefGetBorderColor"] = __cuTexRefGetBorderColor # <<<<<<<<<<<<<< + * global __cuTexRefGetFlags + * data["__cuTexRefGetFlags"] = __cuTexRefGetFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetBorderColor, __pyx_t_3) < 0))) __PYX_ERR(0, 7835, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7837 + * data["__cuTexRefGetBorderColor"] = __cuTexRefGetBorderColor + * global __cuTexRefGetFlags + * data["__cuTexRefGetFlags"] = __cuTexRefGetFlags # <<<<<<<<<<<<<< + * global __cuTexRefCreate + * data["__cuTexRefCreate"] = __cuTexRefCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefGetFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7837, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7839 + * data["__cuTexRefGetFlags"] = __cuTexRefGetFlags + * global __cuTexRefCreate + * data["__cuTexRefCreate"] = __cuTexRefCreate # <<<<<<<<<<<<<< + * global __cuTexRefDestroy + * data["__cuTexRefDestroy"] = __cuTexRefDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7841 + * data["__cuTexRefCreate"] = __cuTexRefCreate + * global __cuTexRefDestroy + * data["__cuTexRefDestroy"] = __cuTexRefDestroy # <<<<<<<<<<<<<< + * global __cuSurfRefSetArray + * data["__cuSurfRefSetArray"] = __cuSurfRefSetArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexRefDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7841, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7843 + * data["__cuTexRefDestroy"] = __cuTexRefDestroy + * global __cuSurfRefSetArray + * data["__cuSurfRefSetArray"] = __cuSurfRefSetArray # <<<<<<<<<<<<<< + * global __cuSurfRefGetArray + * data["__cuSurfRefGetArray"] = __cuSurfRefGetArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSurfRefSetArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7843, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7845 + * data["__cuSurfRefSetArray"] = __cuSurfRefSetArray + * global __cuSurfRefGetArray + * data["__cuSurfRefGetArray"] = __cuSurfRefGetArray # <<<<<<<<<<<<<< + * global __cuTexObjectCreate + * data["__cuTexObjectCreate"] = __cuTexObjectCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSurfRefGetArray, __pyx_t_3) < 0))) __PYX_ERR(0, 7845, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7847 + * data["__cuSurfRefGetArray"] = __cuSurfRefGetArray + * global __cuTexObjectCreate + * data["__cuTexObjectCreate"] = __cuTexObjectCreate # <<<<<<<<<<<<<< + * global __cuTexObjectDestroy + * data["__cuTexObjectDestroy"] = __cuTexObjectDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexObjectCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7847, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7849 + * data["__cuTexObjectCreate"] = __cuTexObjectCreate + * global __cuTexObjectDestroy + * data["__cuTexObjectDestroy"] = __cuTexObjectDestroy # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceDesc + * data["__cuTexObjectGetResourceDesc"] = __cuTexObjectGetResourceDesc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexObjectDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7849, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7851 + * data["__cuTexObjectDestroy"] = __cuTexObjectDestroy + * global __cuTexObjectGetResourceDesc + * data["__cuTexObjectGetResourceDesc"] = __cuTexObjectGetResourceDesc # <<<<<<<<<<<<<< + * global __cuTexObjectGetTextureDesc + * data["__cuTexObjectGetTextureDesc"] = __cuTexObjectGetTextureDesc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexObjectGetResourceDesc, __pyx_t_3) < 0))) __PYX_ERR(0, 7851, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7853 + * data["__cuTexObjectGetResourceDesc"] = __cuTexObjectGetResourceDesc + * global __cuTexObjectGetTextureDesc + * data["__cuTexObjectGetTextureDesc"] = __cuTexObjectGetTextureDesc # <<<<<<<<<<<<<< + * global __cuTexObjectGetResourceViewDesc + * data["__cuTexObjectGetResourceViewDesc"] = __cuTexObjectGetResourceViewDesc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexObjectGetTextureDesc, __pyx_t_3) < 0))) __PYX_ERR(0, 7853, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7855 + * data["__cuTexObjectGetTextureDesc"] = __cuTexObjectGetTextureDesc + * global __cuTexObjectGetResourceViewDesc + * data["__cuTexObjectGetResourceViewDesc"] = __cuTexObjectGetResourceViewDesc # <<<<<<<<<<<<<< + * global __cuSurfObjectCreate + * data["__cuSurfObjectCreate"] = __cuSurfObjectCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTexObjectGetResourceViewDesc, __pyx_t_3) < 0))) __PYX_ERR(0, 7855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7857 + * data["__cuTexObjectGetResourceViewDesc"] = __cuTexObjectGetResourceViewDesc + * global __cuSurfObjectCreate + * data["__cuSurfObjectCreate"] = __cuSurfObjectCreate # <<<<<<<<<<<<<< + * global __cuSurfObjectDestroy + * data["__cuSurfObjectDestroy"] = __cuSurfObjectDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSurfObjectCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7857, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7859 + * data["__cuSurfObjectCreate"] = __cuSurfObjectCreate + * global __cuSurfObjectDestroy + * data["__cuSurfObjectDestroy"] = __cuSurfObjectDestroy # <<<<<<<<<<<<<< + * global __cuSurfObjectGetResourceDesc + * data["__cuSurfObjectGetResourceDesc"] = __cuSurfObjectGetResourceDesc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSurfObjectDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7859, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7861 + * data["__cuSurfObjectDestroy"] = __cuSurfObjectDestroy + * global __cuSurfObjectGetResourceDesc + * data["__cuSurfObjectGetResourceDesc"] = __cuSurfObjectGetResourceDesc # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeTiled + * data["__cuTensorMapEncodeTiled"] = __cuTensorMapEncodeTiled +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuSurfObjectGetResourceDesc, __pyx_t_3) < 0))) __PYX_ERR(0, 7861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7863 + * data["__cuSurfObjectGetResourceDesc"] = __cuSurfObjectGetResourceDesc + * global __cuTensorMapEncodeTiled + * data["__cuTensorMapEncodeTiled"] = __cuTensorMapEncodeTiled # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2col + * data["__cuTensorMapEncodeIm2col"] = __cuTensorMapEncodeIm2col +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7863, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTensorMapEncodeTiled, __pyx_t_3) < 0))) __PYX_ERR(0, 7863, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7865 + * data["__cuTensorMapEncodeTiled"] = __cuTensorMapEncodeTiled + * global __cuTensorMapEncodeIm2col + * data["__cuTensorMapEncodeIm2col"] = __cuTensorMapEncodeIm2col # <<<<<<<<<<<<<< + * global __cuTensorMapEncodeIm2colWide + * data["__cuTensorMapEncodeIm2colWide"] = __cuTensorMapEncodeIm2colWide +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7865, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTensorMapEncodeIm2col, __pyx_t_3) < 0))) __PYX_ERR(0, 7865, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7867 + * data["__cuTensorMapEncodeIm2col"] = __cuTensorMapEncodeIm2col + * global __cuTensorMapEncodeIm2colWide + * data["__cuTensorMapEncodeIm2colWide"] = __cuTensorMapEncodeIm2colWide # <<<<<<<<<<<<<< + * global __cuTensorMapReplaceAddress + * data["__cuTensorMapReplaceAddress"] = __cuTensorMapReplaceAddress +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTensorMapEncodeIm2colWide, __pyx_t_3) < 0))) __PYX_ERR(0, 7867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7869 + * data["__cuTensorMapEncodeIm2colWide"] = __cuTensorMapEncodeIm2colWide + * global __cuTensorMapReplaceAddress + * data["__cuTensorMapReplaceAddress"] = __cuTensorMapReplaceAddress # <<<<<<<<<<<<<< + * global __cuDeviceCanAccessPeer + * data["__cuDeviceCanAccessPeer"] = __cuDeviceCanAccessPeer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuTensorMapReplaceAddress, __pyx_t_3) < 0))) __PYX_ERR(0, 7869, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7871 + * data["__cuTensorMapReplaceAddress"] = __cuTensorMapReplaceAddress + * global __cuDeviceCanAccessPeer + * data["__cuDeviceCanAccessPeer"] = __cuDeviceCanAccessPeer # <<<<<<<<<<<<<< + * global __cuCtxEnablePeerAccess + * data["__cuCtxEnablePeerAccess"] = __cuCtxEnablePeerAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceCanAccessPeer, __pyx_t_3) < 0))) __PYX_ERR(0, 7871, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7873 + * data["__cuDeviceCanAccessPeer"] = __cuDeviceCanAccessPeer + * global __cuCtxEnablePeerAccess + * data["__cuCtxEnablePeerAccess"] = __cuCtxEnablePeerAccess # <<<<<<<<<<<<<< + * global __cuCtxDisablePeerAccess + * data["__cuCtxDisablePeerAccess"] = __cuCtxDisablePeerAccess +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxEnablePeerAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7875 + * data["__cuCtxEnablePeerAccess"] = __cuCtxEnablePeerAccess + * global __cuCtxDisablePeerAccess + * data["__cuCtxDisablePeerAccess"] = __cuCtxDisablePeerAccess # <<<<<<<<<<<<<< + * global __cuDeviceGetP2PAttribute + * data["__cuDeviceGetP2PAttribute"] = __cuDeviceGetP2PAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxDisablePeerAccess, __pyx_t_3) < 0))) __PYX_ERR(0, 7875, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7877 + * data["__cuCtxDisablePeerAccess"] = __cuCtxDisablePeerAccess + * global __cuDeviceGetP2PAttribute + * data["__cuDeviceGetP2PAttribute"] = __cuDeviceGetP2PAttribute # <<<<<<<<<<<<<< + * global __cuGraphicsUnregisterResource + * data["__cuGraphicsUnregisterResource"] = __cuGraphicsUnregisterResource +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetP2PAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7877, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7879 + * data["__cuDeviceGetP2PAttribute"] = __cuDeviceGetP2PAttribute + * global __cuGraphicsUnregisterResource + * data["__cuGraphicsUnregisterResource"] = __cuGraphicsUnregisterResource # <<<<<<<<<<<<<< + * global __cuGraphicsSubResourceGetMappedArray + * data["__cuGraphicsSubResourceGetMappedArray"] = __cuGraphicsSubResourceGetMappedArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsUnregisterResource, __pyx_t_3) < 0))) __PYX_ERR(0, 7879, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7881 + * data["__cuGraphicsUnregisterResource"] = __cuGraphicsUnregisterResource + * global __cuGraphicsSubResourceGetMappedArray + * data["__cuGraphicsSubResourceGetMappedArray"] = __cuGraphicsSubResourceGetMappedArray # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedMipmappedArray + * data["__cuGraphicsResourceGetMappedMipmappedArray"] = __cuGraphicsResourceGetMappedMipmappedArray +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsSubResourceGetMapped, __pyx_t_3) < 0))) __PYX_ERR(0, 7881, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7883 + * data["__cuGraphicsSubResourceGetMappedArray"] = __cuGraphicsSubResourceGetMappedArray + * global __cuGraphicsResourceGetMappedMipmappedArray + * data["__cuGraphicsResourceGetMappedMipmappedArray"] = __cuGraphicsResourceGetMappedMipmappedArray # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedPointer_v2 + * data["__cuGraphicsResourceGetMappedPointer_v2"] = __cuGraphicsResourceGetMappedPointer_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7883, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsResourceGetMappedMip, __pyx_t_3) < 0))) __PYX_ERR(0, 7883, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7885 + * data["__cuGraphicsResourceGetMappedMipmappedArray"] = __cuGraphicsResourceGetMappedMipmappedArray + * global __cuGraphicsResourceGetMappedPointer_v2 + * data["__cuGraphicsResourceGetMappedPointer_v2"] = __cuGraphicsResourceGetMappedPointer_v2 # <<<<<<<<<<<<<< + * global __cuGraphicsResourceSetMapFlags_v2 + * data["__cuGraphicsResourceSetMapFlags_v2"] = __cuGraphicsResourceSetMapFlags_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7885, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsResourceGetMappedPoi, __pyx_t_3) < 0))) __PYX_ERR(0, 7885, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7887 + * data["__cuGraphicsResourceGetMappedPointer_v2"] = __cuGraphicsResourceGetMappedPointer_v2 + * global __cuGraphicsResourceSetMapFlags_v2 + * data["__cuGraphicsResourceSetMapFlags_v2"] = __cuGraphicsResourceSetMapFlags_v2 # <<<<<<<<<<<<<< + * global __cuGraphicsMapResources + * data["__cuGraphicsMapResources"] = __cuGraphicsMapResources +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsResourceSetMapFlags, __pyx_t_3) < 0))) __PYX_ERR(0, 7887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7889 + * data["__cuGraphicsResourceSetMapFlags_v2"] = __cuGraphicsResourceSetMapFlags_v2 + * global __cuGraphicsMapResources + * data["__cuGraphicsMapResources"] = __cuGraphicsMapResources # <<<<<<<<<<<<<< + * global __cuGraphicsUnmapResources + * data["__cuGraphicsUnmapResources"] = __cuGraphicsUnmapResources +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsMapResources, __pyx_t_3) < 0))) __PYX_ERR(0, 7889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7891 + * data["__cuGraphicsMapResources"] = __cuGraphicsMapResources + * global __cuGraphicsUnmapResources + * data["__cuGraphicsUnmapResources"] = __cuGraphicsUnmapResources # <<<<<<<<<<<<<< + * global __cuGetProcAddress_v2 + * data["__cuGetProcAddress_v2"] = __cuGetProcAddress_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsUnmapResources, __pyx_t_3) < 0))) __PYX_ERR(0, 7891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7893 + * data["__cuGraphicsUnmapResources"] = __cuGraphicsUnmapResources + * global __cuGetProcAddress_v2 + * data["__cuGetProcAddress_v2"] = __cuGetProcAddress_v2 # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttribute + * data["__cuCoredumpGetAttribute"] = __cuCoredumpGetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGetProcAddress_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7895 + * data["__cuGetProcAddress_v2"] = __cuGetProcAddress_v2 + * global __cuCoredumpGetAttribute + * data["__cuCoredumpGetAttribute"] = __cuCoredumpGetAttribute # <<<<<<<<<<<<<< + * global __cuCoredumpGetAttributeGlobal + * data["__cuCoredumpGetAttributeGlobal"] = __cuCoredumpGetAttributeGlobal +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCoredumpGetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7897 + * data["__cuCoredumpGetAttribute"] = __cuCoredumpGetAttribute + * global __cuCoredumpGetAttributeGlobal + * data["__cuCoredumpGetAttributeGlobal"] = __cuCoredumpGetAttributeGlobal # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttribute + * data["__cuCoredumpSetAttribute"] = __cuCoredumpSetAttribute +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCoredumpGetAttributeGlobal, __pyx_t_3) < 0))) __PYX_ERR(0, 7897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7899 + * data["__cuCoredumpGetAttributeGlobal"] = __cuCoredumpGetAttributeGlobal + * global __cuCoredumpSetAttribute + * data["__cuCoredumpSetAttribute"] = __cuCoredumpSetAttribute # <<<<<<<<<<<<<< + * global __cuCoredumpSetAttributeGlobal + * data["__cuCoredumpSetAttributeGlobal"] = __cuCoredumpSetAttributeGlobal +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCoredumpSetAttribute, __pyx_t_3) < 0))) __PYX_ERR(0, 7899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7901 + * data["__cuCoredumpSetAttribute"] = __cuCoredumpSetAttribute + * global __cuCoredumpSetAttributeGlobal + * data["__cuCoredumpSetAttributeGlobal"] = __cuCoredumpSetAttributeGlobal # <<<<<<<<<<<<<< + * global __cuGetExportTable + * data["__cuGetExportTable"] = __cuGetExportTable +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCoredumpSetAttributeGlobal, __pyx_t_3) < 0))) __PYX_ERR(0, 7901, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7903 + * data["__cuCoredumpSetAttributeGlobal"] = __cuCoredumpSetAttributeGlobal + * global __cuGetExportTable + * data["__cuGetExportTable"] = __cuGetExportTable # <<<<<<<<<<<<<< + * global __cuGreenCtxCreate + * data["__cuGreenCtxCreate"] = __cuGreenCtxCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGetExportTable, __pyx_t_3) < 0))) __PYX_ERR(0, 7903, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7905 + * data["__cuGetExportTable"] = __cuGetExportTable + * global __cuGreenCtxCreate + * data["__cuGreenCtxCreate"] = __cuGreenCtxCreate # <<<<<<<<<<<<<< + * global __cuGreenCtxDestroy + * data["__cuGreenCtxDestroy"] = __cuGreenCtxDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7905, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7907 + * data["__cuGreenCtxCreate"] = __cuGreenCtxCreate + * global __cuGreenCtxDestroy + * data["__cuGreenCtxDestroy"] = __cuGreenCtxDestroy # <<<<<<<<<<<<<< + * global __cuCtxFromGreenCtx + * data["__cuCtxFromGreenCtx"] = __cuCtxFromGreenCtx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 7907, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7909 + * data["__cuGreenCtxDestroy"] = __cuGreenCtxDestroy + * global __cuCtxFromGreenCtx + * data["__cuCtxFromGreenCtx"] = __cuCtxFromGreenCtx # <<<<<<<<<<<<<< + * global __cuDeviceGetDevResource + * data["__cuDeviceGetDevResource"] = __cuDeviceGetDevResource +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxFromGreenCtx, __pyx_t_3) < 0))) __PYX_ERR(0, 7909, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7911 + * data["__cuCtxFromGreenCtx"] = __cuCtxFromGreenCtx + * global __cuDeviceGetDevResource + * data["__cuDeviceGetDevResource"] = __cuDeviceGetDevResource # <<<<<<<<<<<<<< + * global __cuCtxGetDevResource + * data["__cuCtxGetDevResource"] = __cuCtxGetDevResource +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDeviceGetDevResource, __pyx_t_3) < 0))) __PYX_ERR(0, 7911, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7913 + * data["__cuDeviceGetDevResource"] = __cuDeviceGetDevResource + * global __cuCtxGetDevResource + * data["__cuCtxGetDevResource"] = __cuCtxGetDevResource # <<<<<<<<<<<<<< + * global __cuGreenCtxGetDevResource + * data["__cuGreenCtxGetDevResource"] = __cuGreenCtxGetDevResource +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCtxGetDevResource, __pyx_t_3) < 0))) __PYX_ERR(0, 7913, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7915 + * data["__cuCtxGetDevResource"] = __cuCtxGetDevResource + * global __cuGreenCtxGetDevResource + * data["__cuGreenCtxGetDevResource"] = __cuGreenCtxGetDevResource # <<<<<<<<<<<<<< + * global __cuDevSmResourceSplitByCount + * data["__cuDevSmResourceSplitByCount"] = __cuDevSmResourceSplitByCount +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxGetDevResource, __pyx_t_3) < 0))) __PYX_ERR(0, 7915, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7917 + * data["__cuGreenCtxGetDevResource"] = __cuGreenCtxGetDevResource + * global __cuDevSmResourceSplitByCount + * data["__cuDevSmResourceSplitByCount"] = __cuDevSmResourceSplitByCount # <<<<<<<<<<<<<< + * global __cuDevResourceGenerateDesc + * data["__cuDevResourceGenerateDesc"] = __cuDevResourceGenerateDesc +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevSmResourceSplitByCount, __pyx_t_3) < 0))) __PYX_ERR(0, 7917, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7919 + * data["__cuDevSmResourceSplitByCount"] = __cuDevSmResourceSplitByCount + * global __cuDevResourceGenerateDesc + * data["__cuDevResourceGenerateDesc"] = __cuDevResourceGenerateDesc # <<<<<<<<<<<<<< + * global __cuGreenCtxRecordEvent + * data["__cuGreenCtxRecordEvent"] = __cuGreenCtxRecordEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuDevResourceGenerateDesc, __pyx_t_3) < 0))) __PYX_ERR(0, 7919, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7921 + * data["__cuDevResourceGenerateDesc"] = __cuDevResourceGenerateDesc + * global __cuGreenCtxRecordEvent + * data["__cuGreenCtxRecordEvent"] = __cuGreenCtxRecordEvent # <<<<<<<<<<<<<< + * global __cuGreenCtxWaitEvent + * data["__cuGreenCtxWaitEvent"] = __cuGreenCtxWaitEvent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxRecordEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7921, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7923 + * data["__cuGreenCtxRecordEvent"] = __cuGreenCtxRecordEvent + * global __cuGreenCtxWaitEvent + * data["__cuGreenCtxWaitEvent"] = __cuGreenCtxWaitEvent # <<<<<<<<<<<<<< + * global __cuStreamGetGreenCtx + * data["__cuStreamGetGreenCtx"] = __cuStreamGetGreenCtx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxWaitEvent, __pyx_t_3) < 0))) __PYX_ERR(0, 7923, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7925 + * data["__cuGreenCtxWaitEvent"] = __cuGreenCtxWaitEvent + * global __cuStreamGetGreenCtx + * data["__cuStreamGetGreenCtx"] = __cuStreamGetGreenCtx # <<<<<<<<<<<<<< + * global __cuGreenCtxStreamCreate + * data["__cuGreenCtxStreamCreate"] = __cuGreenCtxStreamCreate +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuStreamGetGreenCtx, __pyx_t_3) < 0))) __PYX_ERR(0, 7925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7927 + * data["__cuStreamGetGreenCtx"] = __cuStreamGetGreenCtx + * global __cuGreenCtxStreamCreate + * data["__cuGreenCtxStreamCreate"] = __cuGreenCtxStreamCreate # <<<<<<<<<<<<<< + * global __cuLogsRegisterCallback + * data["__cuLogsRegisterCallback"] = __cuLogsRegisterCallback +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGreenCtxStreamCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 7927, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7929 + * data["__cuGreenCtxStreamCreate"] = __cuGreenCtxStreamCreate + * global __cuLogsRegisterCallback + * data["__cuLogsRegisterCallback"] = __cuLogsRegisterCallback # <<<<<<<<<<<<<< + * global __cuLogsUnregisterCallback + * data["__cuLogsUnregisterCallback"] = __cuLogsUnregisterCallback +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLogsRegisterCallback, __pyx_t_3) < 0))) __PYX_ERR(0, 7929, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7931 + * data["__cuLogsRegisterCallback"] = __cuLogsRegisterCallback + * global __cuLogsUnregisterCallback + * data["__cuLogsUnregisterCallback"] = __cuLogsUnregisterCallback # <<<<<<<<<<<<<< + * global __cuLogsCurrent + * data["__cuLogsCurrent"] = __cuLogsCurrent +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLogsUnregisterCallback, __pyx_t_3) < 0))) __PYX_ERR(0, 7931, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7933 + * data["__cuLogsUnregisterCallback"] = __cuLogsUnregisterCallback + * global __cuLogsCurrent + * data["__cuLogsCurrent"] = __cuLogsCurrent # <<<<<<<<<<<<<< + * global __cuLogsDumpToFile + * data["__cuLogsDumpToFile"] = __cuLogsDumpToFile +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLogsCurrent, __pyx_t_3) < 0))) __PYX_ERR(0, 7933, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7935 + * data["__cuLogsCurrent"] = __cuLogsCurrent + * global __cuLogsDumpToFile + * data["__cuLogsDumpToFile"] = __cuLogsDumpToFile # <<<<<<<<<<<<<< + * global __cuLogsDumpToMemory + * data["__cuLogsDumpToMemory"] = __cuLogsDumpToMemory +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLogsDumpToFile, __pyx_t_3) < 0))) __PYX_ERR(0, 7935, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7937 + * data["__cuLogsDumpToFile"] = __cuLogsDumpToFile + * global __cuLogsDumpToMemory + * data["__cuLogsDumpToMemory"] = __cuLogsDumpToMemory # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetRestoreThreadId + * data["__cuCheckpointProcessGetRestoreThreadId"] = __cuCheckpointProcessGetRestoreThreadId +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuLogsDumpToMemory, __pyx_t_3) < 0))) __PYX_ERR(0, 7937, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7939 + * data["__cuLogsDumpToMemory"] = __cuLogsDumpToMemory + * global __cuCheckpointProcessGetRestoreThreadId + * data["__cuCheckpointProcessGetRestoreThreadId"] = __cuCheckpointProcessGetRestoreThreadId # <<<<<<<<<<<<<< + * global __cuCheckpointProcessGetState + * data["__cuCheckpointProcessGetState"] = __cuCheckpointProcessGetState +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessGetRestoreT, __pyx_t_3) < 0))) __PYX_ERR(0, 7939, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7941 + * data["__cuCheckpointProcessGetRestoreThreadId"] = __cuCheckpointProcessGetRestoreThreadId + * global __cuCheckpointProcessGetState + * data["__cuCheckpointProcessGetState"] = __cuCheckpointProcessGetState # <<<<<<<<<<<<<< + * global __cuCheckpointProcessLock + * data["__cuCheckpointProcessLock"] = __cuCheckpointProcessLock +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessGetState, __pyx_t_3) < 0))) __PYX_ERR(0, 7941, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7943 + * data["__cuCheckpointProcessGetState"] = __cuCheckpointProcessGetState + * global __cuCheckpointProcessLock + * data["__cuCheckpointProcessLock"] = __cuCheckpointProcessLock # <<<<<<<<<<<<<< + * global __cuCheckpointProcessCheckpoint + * data["__cuCheckpointProcessCheckpoint"] = __cuCheckpointProcessCheckpoint +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessLock, __pyx_t_3) < 0))) __PYX_ERR(0, 7943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7945 + * data["__cuCheckpointProcessLock"] = __cuCheckpointProcessLock + * global __cuCheckpointProcessCheckpoint + * data["__cuCheckpointProcessCheckpoint"] = __cuCheckpointProcessCheckpoint # <<<<<<<<<<<<<< + * global __cuCheckpointProcessRestore + * data["__cuCheckpointProcessRestore"] = __cuCheckpointProcessRestore +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessCheckpoint, __pyx_t_3) < 0))) __PYX_ERR(0, 7945, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7947 + * data["__cuCheckpointProcessCheckpoint"] = __cuCheckpointProcessCheckpoint + * global __cuCheckpointProcessRestore + * data["__cuCheckpointProcessRestore"] = __cuCheckpointProcessRestore # <<<<<<<<<<<<<< + * global __cuCheckpointProcessUnlock + * data["__cuCheckpointProcessUnlock"] = __cuCheckpointProcessUnlock +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessRestore, __pyx_t_3) < 0))) __PYX_ERR(0, 7947, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7949 + * data["__cuCheckpointProcessRestore"] = __cuCheckpointProcessRestore + * global __cuCheckpointProcessUnlock + * data["__cuCheckpointProcessUnlock"] = __cuCheckpointProcessUnlock # <<<<<<<<<<<<<< + * global __cuProfilerStart + * data["__cuProfilerStart"] = __cuProfilerStart +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuCheckpointProcessUnlock, __pyx_t_3) < 0))) __PYX_ERR(0, 7949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7951 + * data["__cuCheckpointProcessUnlock"] = __cuCheckpointProcessUnlock + * global __cuProfilerStart + * data["__cuProfilerStart"] = __cuProfilerStart # <<<<<<<<<<<<<< + * global __cuProfilerStop + * data["__cuProfilerStop"] = __cuProfilerStop +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7951, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuProfilerStart, __pyx_t_3) < 0))) __PYX_ERR(0, 7951, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7953 + * data["__cuProfilerStart"] = __cuProfilerStart + * global __cuProfilerStop + * data["__cuProfilerStop"] = __cuProfilerStop # <<<<<<<<<<<<<< + * global __cuGraphicsEGLRegisterImage + * data["__cuGraphicsEGLRegisterImage"] = __cuGraphicsEGLRegisterImage +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuProfilerStop, __pyx_t_3) < 0))) __PYX_ERR(0, 7953, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7955 + * data["__cuProfilerStop"] = __cuProfilerStop + * global __cuGraphicsEGLRegisterImage + * data["__cuGraphicsEGLRegisterImage"] = __cuGraphicsEGLRegisterImage # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnect + * data["__cuEGLStreamConsumerConnect"] = __cuEGLStreamConsumerConnect +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsEGLRegisterImage, __pyx_t_3) < 0))) __PYX_ERR(0, 7955, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7957 + * data["__cuGraphicsEGLRegisterImage"] = __cuGraphicsEGLRegisterImage + * global __cuEGLStreamConsumerConnect + * data["__cuEGLStreamConsumerConnect"] = __cuEGLStreamConsumerConnect # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerConnectWithFlags + * data["__cuEGLStreamConsumerConnectWithFlags"] = __cuEGLStreamConsumerConnectWithFlags +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7957, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamConsumerConnect, __pyx_t_3) < 0))) __PYX_ERR(0, 7957, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7959 + * data["__cuEGLStreamConsumerConnect"] = __cuEGLStreamConsumerConnect + * global __cuEGLStreamConsumerConnectWithFlags + * data["__cuEGLStreamConsumerConnectWithFlags"] = __cuEGLStreamConsumerConnectWithFlags # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerDisconnect + * data["__cuEGLStreamConsumerDisconnect"] = __cuEGLStreamConsumerDisconnect +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7959, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamConsumerConnectWith, __pyx_t_3) < 0))) __PYX_ERR(0, 7959, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7961 + * data["__cuEGLStreamConsumerConnectWithFlags"] = __cuEGLStreamConsumerConnectWithFlags + * global __cuEGLStreamConsumerDisconnect + * data["__cuEGLStreamConsumerDisconnect"] = __cuEGLStreamConsumerDisconnect # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerAcquireFrame + * data["__cuEGLStreamConsumerAcquireFrame"] = __cuEGLStreamConsumerAcquireFrame +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7961, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamConsumerDisconnect, __pyx_t_3) < 0))) __PYX_ERR(0, 7961, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7963 + * data["__cuEGLStreamConsumerDisconnect"] = __cuEGLStreamConsumerDisconnect + * global __cuEGLStreamConsumerAcquireFrame + * data["__cuEGLStreamConsumerAcquireFrame"] = __cuEGLStreamConsumerAcquireFrame # <<<<<<<<<<<<<< + * global __cuEGLStreamConsumerReleaseFrame + * data["__cuEGLStreamConsumerReleaseFrame"] = __cuEGLStreamConsumerReleaseFrame +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7963, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamConsumerAcquireFram, __pyx_t_3) < 0))) __PYX_ERR(0, 7963, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7965 + * data["__cuEGLStreamConsumerAcquireFrame"] = __cuEGLStreamConsumerAcquireFrame + * global __cuEGLStreamConsumerReleaseFrame + * data["__cuEGLStreamConsumerReleaseFrame"] = __cuEGLStreamConsumerReleaseFrame # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerConnect + * data["__cuEGLStreamProducerConnect"] = __cuEGLStreamProducerConnect +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7965, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamConsumerReleaseFram, __pyx_t_3) < 0))) __PYX_ERR(0, 7965, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7967 + * data["__cuEGLStreamConsumerReleaseFrame"] = __cuEGLStreamConsumerReleaseFrame + * global __cuEGLStreamProducerConnect + * data["__cuEGLStreamProducerConnect"] = __cuEGLStreamProducerConnect # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerDisconnect + * data["__cuEGLStreamProducerDisconnect"] = __cuEGLStreamProducerDisconnect +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamProducerConnect, __pyx_t_3) < 0))) __PYX_ERR(0, 7967, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7969 + * data["__cuEGLStreamProducerConnect"] = __cuEGLStreamProducerConnect + * global __cuEGLStreamProducerDisconnect + * data["__cuEGLStreamProducerDisconnect"] = __cuEGLStreamProducerDisconnect # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerPresentFrame + * data["__cuEGLStreamProducerPresentFrame"] = __cuEGLStreamProducerPresentFrame +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7969, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamProducerDisconnect, __pyx_t_3) < 0))) __PYX_ERR(0, 7969, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7971 + * data["__cuEGLStreamProducerDisconnect"] = __cuEGLStreamProducerDisconnect + * global __cuEGLStreamProducerPresentFrame + * data["__cuEGLStreamProducerPresentFrame"] = __cuEGLStreamProducerPresentFrame # <<<<<<<<<<<<<< + * global __cuEGLStreamProducerReturnFrame + * data["__cuEGLStreamProducerReturnFrame"] = __cuEGLStreamProducerReturnFrame +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamProducerPresentFram, __pyx_t_3) < 0))) __PYX_ERR(0, 7971, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7973 + * data["__cuEGLStreamProducerPresentFrame"] = __cuEGLStreamProducerPresentFrame + * global __cuEGLStreamProducerReturnFrame + * data["__cuEGLStreamProducerReturnFrame"] = __cuEGLStreamProducerReturnFrame # <<<<<<<<<<<<<< + * global __cuGraphicsResourceGetMappedEglFrame + * data["__cuGraphicsResourceGetMappedEglFrame"] = __cuGraphicsResourceGetMappedEglFrame +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7973, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEGLStreamProducerReturnFrame, __pyx_t_3) < 0))) __PYX_ERR(0, 7973, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7975 + * data["__cuEGLStreamProducerReturnFrame"] = __cuEGLStreamProducerReturnFrame + * global __cuGraphicsResourceGetMappedEglFrame + * data["__cuGraphicsResourceGetMappedEglFrame"] = __cuGraphicsResourceGetMappedEglFrame # <<<<<<<<<<<<<< + * global __cuEventCreateFromEGLSync + * data["__cuEventCreateFromEGLSync"] = __cuEventCreateFromEGLSync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsResourceGetMappedEgl, __pyx_t_3) < 0))) __PYX_ERR(0, 7975, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7977 + * data["__cuGraphicsResourceGetMappedEglFrame"] = __cuGraphicsResourceGetMappedEglFrame + * global __cuEventCreateFromEGLSync + * data["__cuEventCreateFromEGLSync"] = __cuEventCreateFromEGLSync # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterBuffer + * data["__cuGraphicsGLRegisterBuffer"] = __cuGraphicsGLRegisterBuffer +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7977, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuEventCreateFromEGLSync, __pyx_t_3) < 0))) __PYX_ERR(0, 7977, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7979 + * data["__cuEventCreateFromEGLSync"] = __cuEventCreateFromEGLSync + * global __cuGraphicsGLRegisterBuffer + * data["__cuGraphicsGLRegisterBuffer"] = __cuGraphicsGLRegisterBuffer # <<<<<<<<<<<<<< + * global __cuGraphicsGLRegisterImage + * data["__cuGraphicsGLRegisterImage"] = __cuGraphicsGLRegisterImage +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7979, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsGLRegisterBuffer, __pyx_t_3) < 0))) __PYX_ERR(0, 7979, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7981 + * data["__cuGraphicsGLRegisterBuffer"] = __cuGraphicsGLRegisterBuffer + * global __cuGraphicsGLRegisterImage + * data["__cuGraphicsGLRegisterImage"] = __cuGraphicsGLRegisterImage # <<<<<<<<<<<<<< + * global __cuGLGetDevices_v2 + * data["__cuGLGetDevices_v2"] = __cuGLGetDevices_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsGLRegisterImage, __pyx_t_3) < 0))) __PYX_ERR(0, 7981, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7983 + * data["__cuGraphicsGLRegisterImage"] = __cuGraphicsGLRegisterImage + * global __cuGLGetDevices_v2 + * data["__cuGLGetDevices_v2"] = __cuGLGetDevices_v2 # <<<<<<<<<<<<<< + * global __cuVDPAUGetDevice + * data["__cuVDPAUGetDevice"] = __cuVDPAUGetDevice +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGLGetDevices_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7983, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7985 + * data["__cuGLGetDevices_v2"] = __cuGLGetDevices_v2 + * global __cuVDPAUGetDevice + * data["__cuVDPAUGetDevice"] = __cuVDPAUGetDevice # <<<<<<<<<<<<<< + * global __cuVDPAUCtxCreate_v2 + * data["__cuVDPAUCtxCreate_v2"] = __cuVDPAUCtxCreate_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7985, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuVDPAUGetDevice, __pyx_t_3) < 0))) __PYX_ERR(0, 7985, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7987 + * data["__cuVDPAUGetDevice"] = __cuVDPAUGetDevice + * global __cuVDPAUCtxCreate_v2 + * data["__cuVDPAUCtxCreate_v2"] = __cuVDPAUCtxCreate_v2 # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterVideoSurface + * data["__cuGraphicsVDPAURegisterVideoSurface"] = __cuGraphicsVDPAURegisterVideoSurface +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7987, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuVDPAUCtxCreate_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 7987, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7989 + * data["__cuVDPAUCtxCreate_v2"] = __cuVDPAUCtxCreate_v2 + * global __cuGraphicsVDPAURegisterVideoSurface + * data["__cuGraphicsVDPAURegisterVideoSurface"] = __cuGraphicsVDPAURegisterVideoSurface # <<<<<<<<<<<<<< + * global __cuGraphicsVDPAURegisterOutputSurface + * data["__cuGraphicsVDPAURegisterOutputSurface"] = __cuGraphicsVDPAURegisterOutputSurface +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7989, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsVDPAURegisterVideoSu, __pyx_t_3) < 0))) __PYX_ERR(0, 7989, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7991 + * data["__cuGraphicsVDPAURegisterVideoSurface"] = __cuGraphicsVDPAURegisterVideoSurface + * global __cuGraphicsVDPAURegisterOutputSurface + * data["__cuGraphicsVDPAURegisterOutputSurface"] = __cuGraphicsVDPAURegisterOutputSurface # <<<<<<<<<<<<<< + * + * func_ptrs = data +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7991, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuGraphicsVDPAURegisterOutputS, __pyx_t_3) < 0))) __PYX_ERR(0, 7991, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7993 + * data["__cuGraphicsVDPAURegisterOutputSurface"] = __cuGraphicsVDPAURegisterOutputSurface + * + * func_ptrs = data # <<<<<<<<<<<<<< + * return data + * +*/ + __Pyx_INCREF(__pyx_v_data); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + + /* "cuda/bindings/_bindings/cydriver.pyx":7994 + * + * func_ptrs = data + * return data # <<<<<<<<<<<<<< + * + * cpdef _inspect_function_pointer(str name): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7038 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers, "_inspect_function_pointers() -> dict"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers = {"_inspect_function_pointers", (PyCFunction)__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers, METH_NOARGS, __pyx_doc_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers}; +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointers (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cydriver.pyx":7996 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointer(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + + /* "cuda/bindings/_bindings/cydriver.pyx":7998 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs == ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_bindings/cydriver.pyx":7999 + * global func_ptrs + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() # <<<<<<<<<<<<<< + * return func_ptrs[name] +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointers(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7999, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7998 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + } + + /* "cuda/bindings/_bindings/cydriver.pyx":8000 + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 8000, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7996 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_bindings_8cydriver_2_inspect_function_pointer, "_inspect_function_pointer(str name)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer = {"_inspect_function_pointer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9_bindings_8cydriver_2_inspect_function_pointer}; +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 7996, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7996, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_inspect_function_pointer", 0) < (0)) __PYX_ERR(0, 7996, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, i); __PYX_ERR(0, 7996, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 7996, __pyx_L3_error) + } + __pyx_v_name = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 7996, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 7996, __pyx_L1_error) + __pyx_r = __pyx_pf_4cuda_8bindings_9_bindings_8cydriver_2_inspect_function_pointer(__pyx_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_8cydriver_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__inspect_function_pointer(__pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._bindings.cydriver._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_cuGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGetErrorName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuInit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGet", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceTotalMem_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceTotalMem_v2, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevicePrimaryCtxRelease_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRelease_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevicePrimaryCtxSetFlags_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxSetFlags_v2, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevicePrimaryCtxReset_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxReset_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxCreate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxCreate_v4", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v4, "CUresult (CUcontext *, CUctxCreateParams *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxDestroy_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDestroy_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxPushCurrent_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPushCurrent_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxPopCurrent_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPopCurrent_v2, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxRecordEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxRecordEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxWaitEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxAttach", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxDetach", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleLoad", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleUnload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetLoadingMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetFunctionCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunctionCount, "CUresult (unsigned int *, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleEnumerateFunctions", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleEnumerateFunctions, "CUresult (CUfunction *, unsigned int, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetGlobal_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetGlobal_v2, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLinkCreate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkCreate_v2, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLinkAddData_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddData_v2, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLinkAddFile_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddFile_v2, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLinkComplete", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLinkDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryUnload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernelCount, "CUresult (unsigned int *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryEnumerateKernels, "CUresult (CUkernel *, unsigned int, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetModule", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelGetFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelGetLibrary", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetLibrary, "CUresult (CUlibrary *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelGetName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetName, "CUresult (char const **, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuKernelGetParamInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetParamInfo, "CUresult (CUkernel, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetInfo_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetInfo_v2, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAlloc_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAlloc_v2, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAllocPitch_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocPitch_v2, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemFree_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFree_v2, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetAddressRange_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAddressRange_v2, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAllocHost_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocHost_v2, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemFreeHost", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemHostGetDevicePointer_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetDevicePointer_v2, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemHostGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAllocManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceRegisterAsyncNotification, "CUresult (CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceUnregisterAsyncNotification, "CUresult (CUdevice, CUasyncCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuIpcOpenMemHandle_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenMemHandle_v2, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemHostRegister_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostRegister_v2, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemHostUnregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyHtoD_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoD_v2, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyDtoH_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoH_v2, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyDtoD_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoD_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyDtoA_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoA_v2, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyAtoD_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoD_v2, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyHtoA_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoA_v2, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyAtoH_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoH_v2, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyAtoA_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoA_v2, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy2D_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2D_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy2DUnaligned_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DUnaligned_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy3D_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3D_v2, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyHtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoDAsync_v2, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyDtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoHAsync_v2, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyDtoDAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoDAsync_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyHtoAAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoAAsync_v2, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyAtoHAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoHAsync_v2, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy2DAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DAsync_v2, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy3DAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DAsync_v2, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpyBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyBatchAsync, "CUresult (CUdeviceptr *, CUdeviceptr *, size_t *, size_t, CUmemcpyAttributes *, size_t *, size_t, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemcpy3DBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DBatchAsync, "CUresult (size_t, CUDA_MEMCPY3D_BATCH_OP *, size_t *, unsigned PY_LONG_LONG, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD8_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8_v2, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD16_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16_v2, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD32_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32_v2, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D8_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8_v2, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D16_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16_v2, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D32_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32_v2, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD8Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayCreate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayCreate_v2, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayGetDescriptor_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetDescriptor_v2, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArray3DCreate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DCreate_v2, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuArray3DGetDescriptor_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DGetDescriptor_v2, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMipmappedArrayGetLevel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetHandleForAddressRange", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemBatchDecompressAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemBatchDecompressAsync, "CUresult (CUmemDecompressParams *, size_t, unsigned int, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAddressFree", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemRelease", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemMap", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemMapArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemUnmap", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastAddDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastBindMem", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastBindAddr", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastUnbind", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMulticastGetGranularity", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAdvise", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetDevice, "CUresult (CUstream, CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetCtx_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx_v2, "CUresult (CUstream, CUcontext *, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamBeginCapture_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCapture_v2, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCaptureToGraph, "CUresult (CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetCaptureInfo_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v3, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies_v2, "CUresult (CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamDestroy_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamDestroy_v2, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventRecord", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventDestroy_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventDestroy_v2, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventElapsedTime_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime_v2, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamWaitValue32_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamWaitValue64_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamWriteValue32_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamWriteValue64_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamBatchMemOp_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncGetName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetName, "CUresult (char const **, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncGetParamInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetParamInfo, "CUresult (CUfunction, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncIsLoaded", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncIsLoaded, "CUresult (CUfunctionLoadingState *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncLoad", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncLoad, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchKernelEx", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncSetSharedSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuParamSetSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuParamSeti", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuParamSetf", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuParamSetv", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddKernelNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddKernelNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphKernelNodeGetParams_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphKernelNodeSetParams_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddBatchMemOpNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphBatchMemOpNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges_v2, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecKernelNodeSetParams_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecKernelNodeSetParams_v2, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphUpload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecUpdate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecUpdate_v2, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuUserObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuUserObjectRetain", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphConditionalHandleCreate, "CUresult (CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialBlockSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialBlockSizeWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxPotentialClusterSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuOccupancyMaxActiveClusters", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetAddress_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress_v2, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetAddress2D_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress2D_v3, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetAddress_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddress_v2, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexObjectDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSurfObjectDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTensorMapEncodeTiled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTensorMapEncodeIm2col", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTensorMapEncodeIm2colWide", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2colWide, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int, int, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapIm2ColWideMode, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuTensorMapReplaceAddress", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedPointer_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedPointer_v2, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsResourceSetMapFlags_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceSetMapFlags_v2, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGetProcAddress_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetProcAddress_v2, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCoredumpGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCoredumpGetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCoredumpSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCoredumpSetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGetExportTable", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxCreate, "CUresult (CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxDestroy, "CUresult (CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxFromGreenCtx", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxFromGreenCtx, "CUresult (CUcontext *, CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDeviceGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDevResource, "CUresult (CUdevice, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevResource, "CUresult (CUcontext, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxGetDevResource, "CUresult (CUgreenCtx, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevSmResourceSplitByCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevSmResourceSplitByCount, "CUresult (CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuDevResourceGenerateDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevResourceGenerateDesc, "CUresult (CUdevResourceDesc *, CUdevResource *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxRecordEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxRecordEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxWaitEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuStreamGetGreenCtx", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetGreenCtx, "CUresult (CUstream, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGreenCtxStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxStreamCreate, "CUresult (CUstream *, CUgreenCtx, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLogsRegisterCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsRegisterCallback, "CUresult (CUlogsCallback, void *, CUlogsCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLogsUnregisterCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsUnregisterCallback, "CUresult (CUlogsCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLogsCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsCurrent, "CUresult (CUlogIterator *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLogsDumpToFile", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToFile, "CUresult (CUlogIterator *, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuLogsDumpToMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToMemory, "CUresult (CUlogIterator *, char *, size_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessGetRestoreThreadId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetRestoreThreadId, "CUresult (int, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessGetState", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetState, "CUresult (int, CUprocessState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessLock", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessLock, "CUresult (int, CUcheckpointLockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessCheckpoint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessCheckpoint, "CUresult (int, CUcheckpointCheckpointArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessRestore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessRestore, "CUresult (int, CUcheckpointRestoreArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuCheckpointProcessUnlock", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessUnlock, "CUresult (int, CUcheckpointUnlockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuProfilerStart", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuProfilerStop", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGLGetDevices_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuVDPAUCtxCreate_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cydriver(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cydriver}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cydriver", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cydriver(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cydriver(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cydriver(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cydriver' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cydriver" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cydriver", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___bindings__cydriver) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._bindings.cydriver")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._bindings.cydriver", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_bindings/cydriver.pyx":7 + * cimport cuda.bindings._lib.dlfcn as dlfcn + * from libc.stdint cimport intptr_t, uintptr_t + * import os # <<<<<<<<<<<<<< + * import sys + * cimport cuda.bindings._bindings.loader as loader +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":8 + * from libc.stdint cimport intptr_t, uintptr_t + * import os + * import sys # <<<<<<<<<<<<<< + * cimport cuda.bindings._bindings.loader as loader + * import threading +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":10 + * import sys + * cimport cuda.bindings._bindings.loader as loader + * import threading # <<<<<<<<<<<<<< + * + * cdef object __symbol_lock = threading.Lock() +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_threading, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":12 + * import threading + * + * cdef object __symbol_lock = threading.Lock() # <<<<<<<<<<<<<< + * cdef bint __cuPythonInit = False + * cdef void *__cuGetErrorString = NULL +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_8cydriver___symbol_lock, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":13 + * + * cdef object __symbol_lock = threading.Lock() + * cdef bint __cuPythonInit = False # <<<<<<<<<<<<<< + * cdef void *__cuGetErrorString = NULL + * cdef void *__cuGetErrorName = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPythonInit = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":14 + * cdef object __symbol_lock = threading.Lock() + * cdef bint __cuPythonInit = False + * cdef void *__cuGetErrorString = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGetErrorName = NULL + * cdef void *__cuInit = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorString = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":15 + * cdef bint __cuPythonInit = False + * cdef void *__cuGetErrorString = NULL + * cdef void *__cuGetErrorName = NULL # <<<<<<<<<<<<<< + * cdef void *__cuInit = NULL + * cdef void *__cuDriverGetVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetErrorName = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":16 + * cdef void *__cuGetErrorString = NULL + * cdef void *__cuGetErrorName = NULL + * cdef void *__cuInit = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDriverGetVersion = NULL + * cdef void *__cuDeviceGet = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuInit = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":17 + * cdef void *__cuGetErrorName = NULL + * cdef void *__cuInit = NULL + * cdef void *__cuDriverGetVersion = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGet = NULL + * cdef void *__cuDeviceGetCount = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDriverGetVersion = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":18 + * cdef void *__cuInit = NULL + * cdef void *__cuDriverGetVersion = NULL + * cdef void *__cuDeviceGet = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetCount = NULL + * cdef void *__cuDeviceGetName = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGet = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":19 + * cdef void *__cuDriverGetVersion = NULL + * cdef void *__cuDeviceGet = NULL + * cdef void *__cuDeviceGetCount = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetName = NULL + * cdef void *__cuDeviceGetUuid = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetCount = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":20 + * cdef void *__cuDeviceGet = NULL + * cdef void *__cuDeviceGetCount = NULL + * cdef void *__cuDeviceGetName = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetUuid = NULL + * cdef void *__cuDeviceGetUuid_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetName = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":21 + * cdef void *__cuDeviceGetCount = NULL + * cdef void *__cuDeviceGetName = NULL + * cdef void *__cuDeviceGetUuid = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetUuid_v2 = NULL + * cdef void *__cuDeviceGetLuid = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":22 + * cdef void *__cuDeviceGetName = NULL + * cdef void *__cuDeviceGetUuid = NULL + * cdef void *__cuDeviceGetUuid_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetLuid = NULL + * cdef void *__cuDeviceTotalMem_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetUuid_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":23 + * cdef void *__cuDeviceGetUuid = NULL + * cdef void *__cuDeviceGetUuid_v2 = NULL + * cdef void *__cuDeviceGetLuid = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceTotalMem_v2 = NULL + * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetLuid = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":24 + * cdef void *__cuDeviceGetUuid_v2 = NULL + * cdef void *__cuDeviceGetLuid = NULL + * cdef void *__cuDeviceTotalMem_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL + * cdef void *__cuDeviceGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceTotalMem_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":25 + * cdef void *__cuDeviceGetLuid = NULL + * cdef void *__cuDeviceTotalMem_v2 = NULL + * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetAttribute = NULL + * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetTexture1DLinearMaxWidth = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":26 + * cdef void *__cuDeviceTotalMem_v2 = NULL + * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL + * cdef void *__cuDeviceGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL + * cdef void *__cuDeviceSetMemPool = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":27 + * cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL + * cdef void *__cuDeviceGetAttribute = NULL + * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceSetMemPool = NULL + * cdef void *__cuDeviceGetMemPool = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetNvSciSyncAttributes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":28 + * cdef void *__cuDeviceGetAttribute = NULL + * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL + * cdef void *__cuDeviceSetMemPool = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetMemPool = NULL + * cdef void *__cuDeviceGetDefaultMemPool = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetMemPool = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":29 + * cdef void *__cuDeviceGetNvSciSyncAttributes = NULL + * cdef void *__cuDeviceSetMemPool = NULL + * cdef void *__cuDeviceGetMemPool = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetDefaultMemPool = NULL + * cdef void *__cuDeviceGetExecAffinitySupport = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetMemPool = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":30 + * cdef void *__cuDeviceSetMemPool = NULL + * cdef void *__cuDeviceGetMemPool = NULL + * cdef void *__cuDeviceGetDefaultMemPool = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetExecAffinitySupport = NULL + * cdef void *__cuFlushGPUDirectRDMAWrites = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDefaultMemPool = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":31 + * cdef void *__cuDeviceGetMemPool = NULL + * cdef void *__cuDeviceGetDefaultMemPool = NULL + * cdef void *__cuDeviceGetExecAffinitySupport = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFlushGPUDirectRDMAWrites = NULL + * cdef void *__cuDeviceGetProperties = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetExecAffinitySupport = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":32 + * cdef void *__cuDeviceGetDefaultMemPool = NULL + * cdef void *__cuDeviceGetExecAffinitySupport = NULL + * cdef void *__cuFlushGPUDirectRDMAWrites = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetProperties = NULL + * cdef void *__cuDeviceComputeCapability = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFlushGPUDirectRDMAWrites = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":33 + * cdef void *__cuDeviceGetExecAffinitySupport = NULL + * cdef void *__cuFlushGPUDirectRDMAWrites = NULL + * cdef void *__cuDeviceGetProperties = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceComputeCapability = NULL + * cdef void *__cuDevicePrimaryCtxRetain = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetProperties = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":34 + * cdef void *__cuFlushGPUDirectRDMAWrites = NULL + * cdef void *__cuDeviceGetProperties = NULL + * cdef void *__cuDeviceComputeCapability = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevicePrimaryCtxRetain = NULL + * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceComputeCapability = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":35 + * cdef void *__cuDeviceGetProperties = NULL + * cdef void *__cuDeviceComputeCapability = NULL + * cdef void *__cuDevicePrimaryCtxRetain = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL + * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRetain = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":36 + * cdef void *__cuDeviceComputeCapability = NULL + * cdef void *__cuDevicePrimaryCtxRetain = NULL + * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL + * cdef void *__cuDevicePrimaryCtxGetState = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxRelease_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":37 + * cdef void *__cuDevicePrimaryCtxRetain = NULL + * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL + * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevicePrimaryCtxGetState = NULL + * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxSetFlags_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":38 + * cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL + * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL + * cdef void *__cuDevicePrimaryCtxGetState = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL + * cdef void *__cuCtxCreate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxGetState = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":39 + * cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL + * cdef void *__cuDevicePrimaryCtxGetState = NULL + * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxCreate_v2 = NULL + * cdef void *__cuCtxCreate_v3 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevicePrimaryCtxReset_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":40 + * cdef void *__cuDevicePrimaryCtxGetState = NULL + * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL + * cdef void *__cuCtxCreate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxCreate_v3 = NULL + * cdef void *__cuCtxCreate_v4 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":41 + * cdef void *__cuDevicePrimaryCtxReset_v2 = NULL + * cdef void *__cuCtxCreate_v2 = NULL + * cdef void *__cuCtxCreate_v3 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxCreate_v4 = NULL + * cdef void *__cuCtxDestroy_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v3 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":42 + * cdef void *__cuCtxCreate_v2 = NULL + * cdef void *__cuCtxCreate_v3 = NULL + * cdef void *__cuCtxCreate_v4 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxDestroy_v2 = NULL + * cdef void *__cuCtxPushCurrent_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxCreate_v4 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":43 + * cdef void *__cuCtxCreate_v3 = NULL + * cdef void *__cuCtxCreate_v4 = NULL + * cdef void *__cuCtxDestroy_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxPushCurrent_v2 = NULL + * cdef void *__cuCtxPopCurrent_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDestroy_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":44 + * cdef void *__cuCtxCreate_v4 = NULL + * cdef void *__cuCtxDestroy_v2 = NULL + * cdef void *__cuCtxPushCurrent_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxPopCurrent_v2 = NULL + * cdef void *__cuCtxSetCurrent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPushCurrent_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":45 + * cdef void *__cuCtxDestroy_v2 = NULL + * cdef void *__cuCtxPushCurrent_v2 = NULL + * cdef void *__cuCtxPopCurrent_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSetCurrent = NULL + * cdef void *__cuCtxGetCurrent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxPopCurrent_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":46 + * cdef void *__cuCtxPushCurrent_v2 = NULL + * cdef void *__cuCtxPopCurrent_v2 = NULL + * cdef void *__cuCtxSetCurrent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetCurrent = NULL + * cdef void *__cuCtxGetDevice = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCurrent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":47 + * cdef void *__cuCtxPopCurrent_v2 = NULL + * cdef void *__cuCtxSetCurrent = NULL + * cdef void *__cuCtxGetCurrent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetDevice = NULL + * cdef void *__cuCtxGetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCurrent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":48 + * cdef void *__cuCtxSetCurrent = NULL + * cdef void *__cuCtxGetCurrent = NULL + * cdef void *__cuCtxGetDevice = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetFlags = NULL + * cdef void *__cuCtxSetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevice = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":49 + * cdef void *__cuCtxGetCurrent = NULL + * cdef void *__cuCtxGetDevice = NULL + * cdef void *__cuCtxGetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSetFlags = NULL + * cdef void *__cuCtxGetId = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":50 + * cdef void *__cuCtxGetDevice = NULL + * cdef void *__cuCtxGetFlags = NULL + * cdef void *__cuCtxSetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetId = NULL + * cdef void *__cuCtxSynchronize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":51 + * cdef void *__cuCtxGetFlags = NULL + * cdef void *__cuCtxSetFlags = NULL + * cdef void *__cuCtxGetId = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSynchronize = NULL + * cdef void *__cuCtxSetLimit = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetId = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":52 + * cdef void *__cuCtxSetFlags = NULL + * cdef void *__cuCtxGetId = NULL + * cdef void *__cuCtxSynchronize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSetLimit = NULL + * cdef void *__cuCtxGetLimit = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSynchronize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":53 + * cdef void *__cuCtxGetId = NULL + * cdef void *__cuCtxSynchronize = NULL + * cdef void *__cuCtxSetLimit = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetLimit = NULL + * cdef void *__cuCtxGetCacheConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetLimit = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":54 + * cdef void *__cuCtxSynchronize = NULL + * cdef void *__cuCtxSetLimit = NULL + * cdef void *__cuCtxGetLimit = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetCacheConfig = NULL + * cdef void *__cuCtxSetCacheConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetLimit = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":55 + * cdef void *__cuCtxSetLimit = NULL + * cdef void *__cuCtxGetLimit = NULL + * cdef void *__cuCtxGetCacheConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSetCacheConfig = NULL + * cdef void *__cuCtxGetApiVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetCacheConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":56 + * cdef void *__cuCtxGetLimit = NULL + * cdef void *__cuCtxGetCacheConfig = NULL + * cdef void *__cuCtxSetCacheConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetApiVersion = NULL + * cdef void *__cuCtxGetStreamPriorityRange = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetCacheConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":57 + * cdef void *__cuCtxGetCacheConfig = NULL + * cdef void *__cuCtxSetCacheConfig = NULL + * cdef void *__cuCtxGetApiVersion = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetStreamPriorityRange = NULL + * cdef void *__cuCtxResetPersistingL2Cache = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetApiVersion = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":58 + * cdef void *__cuCtxSetCacheConfig = NULL + * cdef void *__cuCtxGetApiVersion = NULL + * cdef void *__cuCtxGetStreamPriorityRange = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxResetPersistingL2Cache = NULL + * cdef void *__cuCtxGetExecAffinity = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetStreamPriorityRange = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":59 + * cdef void *__cuCtxGetApiVersion = NULL + * cdef void *__cuCtxGetStreamPriorityRange = NULL + * cdef void *__cuCtxResetPersistingL2Cache = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetExecAffinity = NULL + * cdef void *__cuCtxRecordEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxResetPersistingL2Cache = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":60 + * cdef void *__cuCtxGetStreamPriorityRange = NULL + * cdef void *__cuCtxResetPersistingL2Cache = NULL + * cdef void *__cuCtxGetExecAffinity = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxRecordEvent = NULL + * cdef void *__cuCtxWaitEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetExecAffinity = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":61 + * cdef void *__cuCtxResetPersistingL2Cache = NULL + * cdef void *__cuCtxGetExecAffinity = NULL + * cdef void *__cuCtxRecordEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxWaitEvent = NULL + * cdef void *__cuCtxAttach = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxRecordEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":62 + * cdef void *__cuCtxGetExecAffinity = NULL + * cdef void *__cuCtxRecordEvent = NULL + * cdef void *__cuCtxWaitEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxAttach = NULL + * cdef void *__cuCtxDetach = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxWaitEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":63 + * cdef void *__cuCtxRecordEvent = NULL + * cdef void *__cuCtxWaitEvent = NULL + * cdef void *__cuCtxAttach = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxDetach = NULL + * cdef void *__cuCtxGetSharedMemConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxAttach = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":64 + * cdef void *__cuCtxWaitEvent = NULL + * cdef void *__cuCtxAttach = NULL + * cdef void *__cuCtxDetach = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetSharedMemConfig = NULL + * cdef void *__cuCtxSetSharedMemConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDetach = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":65 + * cdef void *__cuCtxAttach = NULL + * cdef void *__cuCtxDetach = NULL + * cdef void *__cuCtxGetSharedMemConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxSetSharedMemConfig = NULL + * cdef void *__cuModuleLoad = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetSharedMemConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":66 + * cdef void *__cuCtxDetach = NULL + * cdef void *__cuCtxGetSharedMemConfig = NULL + * cdef void *__cuCtxSetSharedMemConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleLoad = NULL + * cdef void *__cuModuleLoadData = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxSetSharedMemConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":67 + * cdef void *__cuCtxGetSharedMemConfig = NULL + * cdef void *__cuCtxSetSharedMemConfig = NULL + * cdef void *__cuModuleLoad = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleLoadData = NULL + * cdef void *__cuModuleLoadDataEx = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoad = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":68 + * cdef void *__cuCtxSetSharedMemConfig = NULL + * cdef void *__cuModuleLoad = NULL + * cdef void *__cuModuleLoadData = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleLoadDataEx = NULL + * cdef void *__cuModuleLoadFatBinary = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadData = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":69 + * cdef void *__cuModuleLoad = NULL + * cdef void *__cuModuleLoadData = NULL + * cdef void *__cuModuleLoadDataEx = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleLoadFatBinary = NULL + * cdef void *__cuModuleUnload = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadDataEx = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":70 + * cdef void *__cuModuleLoadData = NULL + * cdef void *__cuModuleLoadDataEx = NULL + * cdef void *__cuModuleLoadFatBinary = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleUnload = NULL + * cdef void *__cuModuleGetLoadingMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleLoadFatBinary = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":71 + * cdef void *__cuModuleLoadDataEx = NULL + * cdef void *__cuModuleLoadFatBinary = NULL + * cdef void *__cuModuleUnload = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetLoadingMode = NULL + * cdef void *__cuModuleGetFunction = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleUnload = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":72 + * cdef void *__cuModuleLoadFatBinary = NULL + * cdef void *__cuModuleUnload = NULL + * cdef void *__cuModuleGetLoadingMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetFunction = NULL + * cdef void *__cuModuleGetFunctionCount = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetLoadingMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":73 + * cdef void *__cuModuleUnload = NULL + * cdef void *__cuModuleGetLoadingMode = NULL + * cdef void *__cuModuleGetFunction = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetFunctionCount = NULL + * cdef void *__cuModuleEnumerateFunctions = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunction = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":74 + * cdef void *__cuModuleGetLoadingMode = NULL + * cdef void *__cuModuleGetFunction = NULL + * cdef void *__cuModuleGetFunctionCount = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleEnumerateFunctions = NULL + * cdef void *__cuModuleGetGlobal_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetFunctionCount = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":75 + * cdef void *__cuModuleGetFunction = NULL + * cdef void *__cuModuleGetFunctionCount = NULL + * cdef void *__cuModuleEnumerateFunctions = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetGlobal_v2 = NULL + * cdef void *__cuLinkCreate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleEnumerateFunctions = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":76 + * cdef void *__cuModuleGetFunctionCount = NULL + * cdef void *__cuModuleEnumerateFunctions = NULL + * cdef void *__cuModuleGetGlobal_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLinkCreate_v2 = NULL + * cdef void *__cuLinkAddData_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetGlobal_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":77 + * cdef void *__cuModuleEnumerateFunctions = NULL + * cdef void *__cuModuleGetGlobal_v2 = NULL + * cdef void *__cuLinkCreate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLinkAddData_v2 = NULL + * cdef void *__cuLinkAddFile_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkCreate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":78 + * cdef void *__cuModuleGetGlobal_v2 = NULL + * cdef void *__cuLinkCreate_v2 = NULL + * cdef void *__cuLinkAddData_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLinkAddFile_v2 = NULL + * cdef void *__cuLinkComplete = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddData_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":79 + * cdef void *__cuLinkCreate_v2 = NULL + * cdef void *__cuLinkAddData_v2 = NULL + * cdef void *__cuLinkAddFile_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLinkComplete = NULL + * cdef void *__cuLinkDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkAddFile_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":80 + * cdef void *__cuLinkAddData_v2 = NULL + * cdef void *__cuLinkAddFile_v2 = NULL + * cdef void *__cuLinkComplete = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLinkDestroy = NULL + * cdef void *__cuModuleGetTexRef = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkComplete = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":81 + * cdef void *__cuLinkAddFile_v2 = NULL + * cdef void *__cuLinkComplete = NULL + * cdef void *__cuLinkDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetTexRef = NULL + * cdef void *__cuModuleGetSurfRef = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLinkDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":82 + * cdef void *__cuLinkComplete = NULL + * cdef void *__cuLinkDestroy = NULL + * cdef void *__cuModuleGetTexRef = NULL # <<<<<<<<<<<<<< + * cdef void *__cuModuleGetSurfRef = NULL + * cdef void *__cuLibraryLoadData = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetTexRef = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":83 + * cdef void *__cuLinkDestroy = NULL + * cdef void *__cuModuleGetTexRef = NULL + * cdef void *__cuModuleGetSurfRef = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryLoadData = NULL + * cdef void *__cuLibraryLoadFromFile = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuModuleGetSurfRef = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":84 + * cdef void *__cuModuleGetTexRef = NULL + * cdef void *__cuModuleGetSurfRef = NULL + * cdef void *__cuLibraryLoadData = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryLoadFromFile = NULL + * cdef void *__cuLibraryUnload = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadData = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":85 + * cdef void *__cuModuleGetSurfRef = NULL + * cdef void *__cuLibraryLoadData = NULL + * cdef void *__cuLibraryLoadFromFile = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryUnload = NULL + * cdef void *__cuLibraryGetKernel = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryLoadFromFile = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":86 + * cdef void *__cuLibraryLoadData = NULL + * cdef void *__cuLibraryLoadFromFile = NULL + * cdef void *__cuLibraryUnload = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetKernel = NULL + * cdef void *__cuLibraryGetKernelCount = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryUnload = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":87 + * cdef void *__cuLibraryLoadFromFile = NULL + * cdef void *__cuLibraryUnload = NULL + * cdef void *__cuLibraryGetKernel = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetKernelCount = NULL + * cdef void *__cuLibraryEnumerateKernels = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernel = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":88 + * cdef void *__cuLibraryUnload = NULL + * cdef void *__cuLibraryGetKernel = NULL + * cdef void *__cuLibraryGetKernelCount = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryEnumerateKernels = NULL + * cdef void *__cuLibraryGetModule = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetKernelCount = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":89 + * cdef void *__cuLibraryGetKernel = NULL + * cdef void *__cuLibraryGetKernelCount = NULL + * cdef void *__cuLibraryEnumerateKernels = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetModule = NULL + * cdef void *__cuKernelGetFunction = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryEnumerateKernels = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":90 + * cdef void *__cuLibraryGetKernelCount = NULL + * cdef void *__cuLibraryEnumerateKernels = NULL + * cdef void *__cuLibraryGetModule = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelGetFunction = NULL + * cdef void *__cuKernelGetLibrary = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetModule = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":91 + * cdef void *__cuLibraryEnumerateKernels = NULL + * cdef void *__cuLibraryGetModule = NULL + * cdef void *__cuKernelGetFunction = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelGetLibrary = NULL + * cdef void *__cuLibraryGetGlobal = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetFunction = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":92 + * cdef void *__cuLibraryGetModule = NULL + * cdef void *__cuKernelGetFunction = NULL + * cdef void *__cuKernelGetLibrary = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetGlobal = NULL + * cdef void *__cuLibraryGetManaged = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetLibrary = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":93 + * cdef void *__cuKernelGetFunction = NULL + * cdef void *__cuKernelGetLibrary = NULL + * cdef void *__cuLibraryGetGlobal = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetManaged = NULL + * cdef void *__cuLibraryGetUnifiedFunction = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetGlobal = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":94 + * cdef void *__cuKernelGetLibrary = NULL + * cdef void *__cuLibraryGetGlobal = NULL + * cdef void *__cuLibraryGetManaged = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLibraryGetUnifiedFunction = NULL + * cdef void *__cuKernelGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetManaged = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":95 + * cdef void *__cuLibraryGetGlobal = NULL + * cdef void *__cuLibraryGetManaged = NULL + * cdef void *__cuLibraryGetUnifiedFunction = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelGetAttribute = NULL + * cdef void *__cuKernelSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLibraryGetUnifiedFunction = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":96 + * cdef void *__cuLibraryGetManaged = NULL + * cdef void *__cuLibraryGetUnifiedFunction = NULL + * cdef void *__cuKernelGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelSetAttribute = NULL + * cdef void *__cuKernelSetCacheConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":97 + * cdef void *__cuLibraryGetUnifiedFunction = NULL + * cdef void *__cuKernelGetAttribute = NULL + * cdef void *__cuKernelSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelSetCacheConfig = NULL + * cdef void *__cuKernelGetName = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":98 + * cdef void *__cuKernelGetAttribute = NULL + * cdef void *__cuKernelSetAttribute = NULL + * cdef void *__cuKernelSetCacheConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelGetName = NULL + * cdef void *__cuKernelGetParamInfo = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelSetCacheConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":99 + * cdef void *__cuKernelSetAttribute = NULL + * cdef void *__cuKernelSetCacheConfig = NULL + * cdef void *__cuKernelGetName = NULL # <<<<<<<<<<<<<< + * cdef void *__cuKernelGetParamInfo = NULL + * cdef void *__cuMemGetInfo_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetName = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":100 + * cdef void *__cuKernelSetCacheConfig = NULL + * cdef void *__cuKernelGetName = NULL + * cdef void *__cuKernelGetParamInfo = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetInfo_v2 = NULL + * cdef void *__cuMemAlloc_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuKernelGetParamInfo = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":101 + * cdef void *__cuKernelGetName = NULL + * cdef void *__cuKernelGetParamInfo = NULL + * cdef void *__cuMemGetInfo_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAlloc_v2 = NULL + * cdef void *__cuMemAllocPitch_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetInfo_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":102 + * cdef void *__cuKernelGetParamInfo = NULL + * cdef void *__cuMemGetInfo_v2 = NULL + * cdef void *__cuMemAlloc_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAllocPitch_v2 = NULL + * cdef void *__cuMemFree_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAlloc_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":103 + * cdef void *__cuMemGetInfo_v2 = NULL + * cdef void *__cuMemAlloc_v2 = NULL + * cdef void *__cuMemAllocPitch_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemFree_v2 = NULL + * cdef void *__cuMemGetAddressRange_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocPitch_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":104 + * cdef void *__cuMemAlloc_v2 = NULL + * cdef void *__cuMemAllocPitch_v2 = NULL + * cdef void *__cuMemFree_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetAddressRange_v2 = NULL + * cdef void *__cuMemAllocHost_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFree_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":105 + * cdef void *__cuMemAllocPitch_v2 = NULL + * cdef void *__cuMemFree_v2 = NULL + * cdef void *__cuMemGetAddressRange_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAllocHost_v2 = NULL + * cdef void *__cuMemFreeHost = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAddressRange_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":106 + * cdef void *__cuMemFree_v2 = NULL + * cdef void *__cuMemGetAddressRange_v2 = NULL + * cdef void *__cuMemAllocHost_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemFreeHost = NULL + * cdef void *__cuMemHostAlloc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocHost_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":107 + * cdef void *__cuMemGetAddressRange_v2 = NULL + * cdef void *__cuMemAllocHost_v2 = NULL + * cdef void *__cuMemFreeHost = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemHostAlloc = NULL + * cdef void *__cuMemHostGetDevicePointer_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeHost = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":108 + * cdef void *__cuMemAllocHost_v2 = NULL + * cdef void *__cuMemFreeHost = NULL + * cdef void *__cuMemHostAlloc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemHostGetDevicePointer_v2 = NULL + * cdef void *__cuMemHostGetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostAlloc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":109 + * cdef void *__cuMemFreeHost = NULL + * cdef void *__cuMemHostAlloc = NULL + * cdef void *__cuMemHostGetDevicePointer_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemHostGetFlags = NULL + * cdef void *__cuMemAllocManaged = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetDevicePointer_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":110 + * cdef void *__cuMemHostAlloc = NULL + * cdef void *__cuMemHostGetDevicePointer_v2 = NULL + * cdef void *__cuMemHostGetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAllocManaged = NULL + * cdef void *__cuDeviceRegisterAsyncNotification = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostGetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":111 + * cdef void *__cuMemHostGetDevicePointer_v2 = NULL + * cdef void *__cuMemHostGetFlags = NULL + * cdef void *__cuMemAllocManaged = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceRegisterAsyncNotification = NULL + * cdef void *__cuDeviceUnregisterAsyncNotification = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocManaged = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":112 + * cdef void *__cuMemHostGetFlags = NULL + * cdef void *__cuMemAllocManaged = NULL + * cdef void *__cuDeviceRegisterAsyncNotification = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceUnregisterAsyncNotification = NULL + * cdef void *__cuDeviceGetByPCIBusId = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceRegisterAsyncNotification = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":113 + * cdef void *__cuMemAllocManaged = NULL + * cdef void *__cuDeviceRegisterAsyncNotification = NULL + * cdef void *__cuDeviceUnregisterAsyncNotification = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetByPCIBusId = NULL + * cdef void *__cuDeviceGetPCIBusId = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceUnregisterAsyncNotification = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":114 + * cdef void *__cuDeviceRegisterAsyncNotification = NULL + * cdef void *__cuDeviceUnregisterAsyncNotification = NULL + * cdef void *__cuDeviceGetByPCIBusId = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetPCIBusId = NULL + * cdef void *__cuIpcGetEventHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetByPCIBusId = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":115 + * cdef void *__cuDeviceUnregisterAsyncNotification = NULL + * cdef void *__cuDeviceGetByPCIBusId = NULL + * cdef void *__cuDeviceGetPCIBusId = NULL # <<<<<<<<<<<<<< + * cdef void *__cuIpcGetEventHandle = NULL + * cdef void *__cuIpcOpenEventHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetPCIBusId = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":116 + * cdef void *__cuDeviceGetByPCIBusId = NULL + * cdef void *__cuDeviceGetPCIBusId = NULL + * cdef void *__cuIpcGetEventHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuIpcOpenEventHandle = NULL + * cdef void *__cuIpcGetMemHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetEventHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":117 + * cdef void *__cuDeviceGetPCIBusId = NULL + * cdef void *__cuIpcGetEventHandle = NULL + * cdef void *__cuIpcOpenEventHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuIpcGetMemHandle = NULL + * cdef void *__cuIpcOpenMemHandle_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenEventHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":118 + * cdef void *__cuIpcGetEventHandle = NULL + * cdef void *__cuIpcOpenEventHandle = NULL + * cdef void *__cuIpcGetMemHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuIpcOpenMemHandle_v2 = NULL + * cdef void *__cuIpcCloseMemHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcGetMemHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":119 + * cdef void *__cuIpcOpenEventHandle = NULL + * cdef void *__cuIpcGetMemHandle = NULL + * cdef void *__cuIpcOpenMemHandle_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuIpcCloseMemHandle = NULL + * cdef void *__cuMemHostRegister_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcOpenMemHandle_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":120 + * cdef void *__cuIpcGetMemHandle = NULL + * cdef void *__cuIpcOpenMemHandle_v2 = NULL + * cdef void *__cuIpcCloseMemHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemHostRegister_v2 = NULL + * cdef void *__cuMemHostUnregister = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuIpcCloseMemHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":121 + * cdef void *__cuIpcOpenMemHandle_v2 = NULL + * cdef void *__cuIpcCloseMemHandle = NULL + * cdef void *__cuMemHostRegister_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemHostUnregister = NULL + * cdef void *__cuMemcpy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostRegister_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":122 + * cdef void *__cuIpcCloseMemHandle = NULL + * cdef void *__cuMemHostRegister_v2 = NULL + * cdef void *__cuMemHostUnregister = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy = NULL + * cdef void *__cuMemcpyPeer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemHostUnregister = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":123 + * cdef void *__cuMemHostRegister_v2 = NULL + * cdef void *__cuMemHostUnregister = NULL + * cdef void *__cuMemcpy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyPeer = NULL + * cdef void *__cuMemcpyHtoD_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":124 + * cdef void *__cuMemHostUnregister = NULL + * cdef void *__cuMemcpy = NULL + * cdef void *__cuMemcpyPeer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyHtoD_v2 = NULL + * cdef void *__cuMemcpyDtoH_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":125 + * cdef void *__cuMemcpy = NULL + * cdef void *__cuMemcpyPeer = NULL + * cdef void *__cuMemcpyHtoD_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyDtoH_v2 = NULL + * cdef void *__cuMemcpyDtoD_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoD_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":126 + * cdef void *__cuMemcpyPeer = NULL + * cdef void *__cuMemcpyHtoD_v2 = NULL + * cdef void *__cuMemcpyDtoH_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyDtoD_v2 = NULL + * cdef void *__cuMemcpyDtoA_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoH_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":127 + * cdef void *__cuMemcpyHtoD_v2 = NULL + * cdef void *__cuMemcpyDtoH_v2 = NULL + * cdef void *__cuMemcpyDtoD_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyDtoA_v2 = NULL + * cdef void *__cuMemcpyAtoD_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoD_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":128 + * cdef void *__cuMemcpyDtoH_v2 = NULL + * cdef void *__cuMemcpyDtoD_v2 = NULL + * cdef void *__cuMemcpyDtoA_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyAtoD_v2 = NULL + * cdef void *__cuMemcpyHtoA_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoA_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":129 + * cdef void *__cuMemcpyDtoD_v2 = NULL + * cdef void *__cuMemcpyDtoA_v2 = NULL + * cdef void *__cuMemcpyAtoD_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyHtoA_v2 = NULL + * cdef void *__cuMemcpyAtoH_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoD_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":130 + * cdef void *__cuMemcpyDtoA_v2 = NULL + * cdef void *__cuMemcpyAtoD_v2 = NULL + * cdef void *__cuMemcpyHtoA_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyAtoH_v2 = NULL + * cdef void *__cuMemcpyAtoA_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoA_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":131 + * cdef void *__cuMemcpyAtoD_v2 = NULL + * cdef void *__cuMemcpyHtoA_v2 = NULL + * cdef void *__cuMemcpyAtoH_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyAtoA_v2 = NULL + * cdef void *__cuMemcpy2D_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoH_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":132 + * cdef void *__cuMemcpyHtoA_v2 = NULL + * cdef void *__cuMemcpyAtoH_v2 = NULL + * cdef void *__cuMemcpyAtoA_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy2D_v2 = NULL + * cdef void *__cuMemcpy2DUnaligned_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoA_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":133 + * cdef void *__cuMemcpyAtoH_v2 = NULL + * cdef void *__cuMemcpyAtoA_v2 = NULL + * cdef void *__cuMemcpy2D_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy2DUnaligned_v2 = NULL + * cdef void *__cuMemcpy3D_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2D_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":134 + * cdef void *__cuMemcpyAtoA_v2 = NULL + * cdef void *__cuMemcpy2D_v2 = NULL + * cdef void *__cuMemcpy2DUnaligned_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy3D_v2 = NULL + * cdef void *__cuMemcpy3DPeer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DUnaligned_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":135 + * cdef void *__cuMemcpy2D_v2 = NULL + * cdef void *__cuMemcpy2DUnaligned_v2 = NULL + * cdef void *__cuMemcpy3D_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy3DPeer = NULL + * cdef void *__cuMemcpyAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3D_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":136 + * cdef void *__cuMemcpy2DUnaligned_v2 = NULL + * cdef void *__cuMemcpy3D_v2 = NULL + * cdef void *__cuMemcpy3DPeer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyAsync = NULL + * cdef void *__cuMemcpyPeerAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":137 + * cdef void *__cuMemcpy3D_v2 = NULL + * cdef void *__cuMemcpy3DPeer = NULL + * cdef void *__cuMemcpyAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyPeerAsync = NULL + * cdef void *__cuMemcpyHtoDAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":138 + * cdef void *__cuMemcpy3DPeer = NULL + * cdef void *__cuMemcpyAsync = NULL + * cdef void *__cuMemcpyPeerAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyHtoDAsync_v2 = NULL + * cdef void *__cuMemcpyDtoHAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyPeerAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":139 + * cdef void *__cuMemcpyAsync = NULL + * cdef void *__cuMemcpyPeerAsync = NULL + * cdef void *__cuMemcpyHtoDAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyDtoHAsync_v2 = NULL + * cdef void *__cuMemcpyDtoDAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoDAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":140 + * cdef void *__cuMemcpyPeerAsync = NULL + * cdef void *__cuMemcpyHtoDAsync_v2 = NULL + * cdef void *__cuMemcpyDtoHAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyDtoDAsync_v2 = NULL + * cdef void *__cuMemcpyHtoAAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoHAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":141 + * cdef void *__cuMemcpyHtoDAsync_v2 = NULL + * cdef void *__cuMemcpyDtoHAsync_v2 = NULL + * cdef void *__cuMemcpyDtoDAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyHtoAAsync_v2 = NULL + * cdef void *__cuMemcpyAtoHAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyDtoDAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":142 + * cdef void *__cuMemcpyDtoHAsync_v2 = NULL + * cdef void *__cuMemcpyDtoDAsync_v2 = NULL + * cdef void *__cuMemcpyHtoAAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyAtoHAsync_v2 = NULL + * cdef void *__cuMemcpy2DAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyHtoAAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":143 + * cdef void *__cuMemcpyDtoDAsync_v2 = NULL + * cdef void *__cuMemcpyHtoAAsync_v2 = NULL + * cdef void *__cuMemcpyAtoHAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy2DAsync_v2 = NULL + * cdef void *__cuMemcpy3DAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyAtoHAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":144 + * cdef void *__cuMemcpyHtoAAsync_v2 = NULL + * cdef void *__cuMemcpyAtoHAsync_v2 = NULL + * cdef void *__cuMemcpy2DAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy3DAsync_v2 = NULL + * cdef void *__cuMemcpy3DPeerAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy2DAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":145 + * cdef void *__cuMemcpyAtoHAsync_v2 = NULL + * cdef void *__cuMemcpy2DAsync_v2 = NULL + * cdef void *__cuMemcpy3DAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy3DPeerAsync = NULL + * cdef void *__cuMemcpyBatchAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":146 + * cdef void *__cuMemcpy2DAsync_v2 = NULL + * cdef void *__cuMemcpy3DAsync_v2 = NULL + * cdef void *__cuMemcpy3DPeerAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpyBatchAsync = NULL + * cdef void *__cuMemcpy3DBatchAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DPeerAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":147 + * cdef void *__cuMemcpy3DAsync_v2 = NULL + * cdef void *__cuMemcpy3DPeerAsync = NULL + * cdef void *__cuMemcpyBatchAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemcpy3DBatchAsync = NULL + * cdef void *__cuMemsetD8_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpyBatchAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":148 + * cdef void *__cuMemcpy3DPeerAsync = NULL + * cdef void *__cuMemcpyBatchAsync = NULL + * cdef void *__cuMemcpy3DBatchAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD8_v2 = NULL + * cdef void *__cuMemsetD16_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemcpy3DBatchAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":149 + * cdef void *__cuMemcpyBatchAsync = NULL + * cdef void *__cuMemcpy3DBatchAsync = NULL + * cdef void *__cuMemsetD8_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD16_v2 = NULL + * cdef void *__cuMemsetD32_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":150 + * cdef void *__cuMemcpy3DBatchAsync = NULL + * cdef void *__cuMemsetD8_v2 = NULL + * cdef void *__cuMemsetD16_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD32_v2 = NULL + * cdef void *__cuMemsetD2D8_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":151 + * cdef void *__cuMemsetD8_v2 = NULL + * cdef void *__cuMemsetD16_v2 = NULL + * cdef void *__cuMemsetD32_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D8_v2 = NULL + * cdef void *__cuMemsetD2D16_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":152 + * cdef void *__cuMemsetD16_v2 = NULL + * cdef void *__cuMemsetD32_v2 = NULL + * cdef void *__cuMemsetD2D8_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D16_v2 = NULL + * cdef void *__cuMemsetD2D32_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":153 + * cdef void *__cuMemsetD32_v2 = NULL + * cdef void *__cuMemsetD2D8_v2 = NULL + * cdef void *__cuMemsetD2D16_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D32_v2 = NULL + * cdef void *__cuMemsetD8Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":154 + * cdef void *__cuMemsetD2D8_v2 = NULL + * cdef void *__cuMemsetD2D16_v2 = NULL + * cdef void *__cuMemsetD2D32_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD8Async = NULL + * cdef void *__cuMemsetD16Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":155 + * cdef void *__cuMemsetD2D16_v2 = NULL + * cdef void *__cuMemsetD2D32_v2 = NULL + * cdef void *__cuMemsetD8Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD16Async = NULL + * cdef void *__cuMemsetD32Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD8Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":156 + * cdef void *__cuMemsetD2D32_v2 = NULL + * cdef void *__cuMemsetD8Async = NULL + * cdef void *__cuMemsetD16Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD32Async = NULL + * cdef void *__cuMemsetD2D8Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD16Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":157 + * cdef void *__cuMemsetD8Async = NULL + * cdef void *__cuMemsetD16Async = NULL + * cdef void *__cuMemsetD32Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D8Async = NULL + * cdef void *__cuMemsetD2D16Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD32Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":158 + * cdef void *__cuMemsetD16Async = NULL + * cdef void *__cuMemsetD32Async = NULL + * cdef void *__cuMemsetD2D8Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D16Async = NULL + * cdef void *__cuMemsetD2D32Async = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D8Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":159 + * cdef void *__cuMemsetD32Async = NULL + * cdef void *__cuMemsetD2D8Async = NULL + * cdef void *__cuMemsetD2D16Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemsetD2D32Async = NULL + * cdef void *__cuArrayCreate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D16Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":160 + * cdef void *__cuMemsetD2D8Async = NULL + * cdef void *__cuMemsetD2D16Async = NULL + * cdef void *__cuMemsetD2D32Async = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayCreate_v2 = NULL + * cdef void *__cuArrayGetDescriptor_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemsetD2D32Async = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":161 + * cdef void *__cuMemsetD2D16Async = NULL + * cdef void *__cuMemsetD2D32Async = NULL + * cdef void *__cuArrayCreate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayGetDescriptor_v2 = NULL + * cdef void *__cuArrayGetSparseProperties = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayCreate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":162 + * cdef void *__cuMemsetD2D32Async = NULL + * cdef void *__cuArrayCreate_v2 = NULL + * cdef void *__cuArrayGetDescriptor_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayGetSparseProperties = NULL + * cdef void *__cuMipmappedArrayGetSparseProperties = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetDescriptor_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":163 + * cdef void *__cuArrayCreate_v2 = NULL + * cdef void *__cuArrayGetDescriptor_v2 = NULL + * cdef void *__cuArrayGetSparseProperties = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMipmappedArrayGetSparseProperties = NULL + * cdef void *__cuArrayGetMemoryRequirements = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetSparseProperties = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":164 + * cdef void *__cuArrayGetDescriptor_v2 = NULL + * cdef void *__cuArrayGetSparseProperties = NULL + * cdef void *__cuMipmappedArrayGetSparseProperties = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayGetMemoryRequirements = NULL + * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetSparseProperties = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":165 + * cdef void *__cuArrayGetSparseProperties = NULL + * cdef void *__cuMipmappedArrayGetSparseProperties = NULL + * cdef void *__cuArrayGetMemoryRequirements = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL + * cdef void *__cuArrayGetPlane = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetMemoryRequirements = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":166 + * cdef void *__cuMipmappedArrayGetSparseProperties = NULL + * cdef void *__cuArrayGetMemoryRequirements = NULL + * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayGetPlane = NULL + * cdef void *__cuArrayDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetMemoryRequirements = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":167 + * cdef void *__cuArrayGetMemoryRequirements = NULL + * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL + * cdef void *__cuArrayGetPlane = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArrayDestroy = NULL + * cdef void *__cuArray3DCreate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayGetPlane = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":168 + * cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL + * cdef void *__cuArrayGetPlane = NULL + * cdef void *__cuArrayDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArray3DCreate_v2 = NULL + * cdef void *__cuArray3DGetDescriptor_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArrayDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":169 + * cdef void *__cuArrayGetPlane = NULL + * cdef void *__cuArrayDestroy = NULL + * cdef void *__cuArray3DCreate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuArray3DGetDescriptor_v2 = NULL + * cdef void *__cuMipmappedArrayCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DCreate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":170 + * cdef void *__cuArrayDestroy = NULL + * cdef void *__cuArray3DCreate_v2 = NULL + * cdef void *__cuArray3DGetDescriptor_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMipmappedArrayCreate = NULL + * cdef void *__cuMipmappedArrayGetLevel = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuArray3DGetDescriptor_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":171 + * cdef void *__cuArray3DCreate_v2 = NULL + * cdef void *__cuArray3DGetDescriptor_v2 = NULL + * cdef void *__cuMipmappedArrayCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMipmappedArrayGetLevel = NULL + * cdef void *__cuMipmappedArrayDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":172 + * cdef void *__cuArray3DGetDescriptor_v2 = NULL + * cdef void *__cuMipmappedArrayCreate = NULL + * cdef void *__cuMipmappedArrayGetLevel = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMipmappedArrayDestroy = NULL + * cdef void *__cuMemGetHandleForAddressRange = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayGetLevel = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":173 + * cdef void *__cuMipmappedArrayCreate = NULL + * cdef void *__cuMipmappedArrayGetLevel = NULL + * cdef void *__cuMipmappedArrayDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetHandleForAddressRange = NULL + * cdef void *__cuMemBatchDecompressAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMipmappedArrayDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":174 + * cdef void *__cuMipmappedArrayGetLevel = NULL + * cdef void *__cuMipmappedArrayDestroy = NULL + * cdef void *__cuMemGetHandleForAddressRange = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemBatchDecompressAsync = NULL + * cdef void *__cuMemAddressReserve = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetHandleForAddressRange = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":175 + * cdef void *__cuMipmappedArrayDestroy = NULL + * cdef void *__cuMemGetHandleForAddressRange = NULL + * cdef void *__cuMemBatchDecompressAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAddressReserve = NULL + * cdef void *__cuMemAddressFree = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemBatchDecompressAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":176 + * cdef void *__cuMemGetHandleForAddressRange = NULL + * cdef void *__cuMemBatchDecompressAsync = NULL + * cdef void *__cuMemAddressReserve = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAddressFree = NULL + * cdef void *__cuMemCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressReserve = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":177 + * cdef void *__cuMemBatchDecompressAsync = NULL + * cdef void *__cuMemAddressReserve = NULL + * cdef void *__cuMemAddressFree = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemCreate = NULL + * cdef void *__cuMemRelease = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAddressFree = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":178 + * cdef void *__cuMemAddressReserve = NULL + * cdef void *__cuMemAddressFree = NULL + * cdef void *__cuMemCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemRelease = NULL + * cdef void *__cuMemMap = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":179 + * cdef void *__cuMemAddressFree = NULL + * cdef void *__cuMemCreate = NULL + * cdef void *__cuMemRelease = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemMap = NULL + * cdef void *__cuMemMapArrayAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRelease = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":180 + * cdef void *__cuMemCreate = NULL + * cdef void *__cuMemRelease = NULL + * cdef void *__cuMemMap = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemMapArrayAsync = NULL + * cdef void *__cuMemUnmap = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMap = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":181 + * cdef void *__cuMemRelease = NULL + * cdef void *__cuMemMap = NULL + * cdef void *__cuMemMapArrayAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemUnmap = NULL + * cdef void *__cuMemSetAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemMapArrayAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":182 + * cdef void *__cuMemMap = NULL + * cdef void *__cuMemMapArrayAsync = NULL + * cdef void *__cuMemUnmap = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemSetAccess = NULL + * cdef void *__cuMemGetAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemUnmap = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":183 + * cdef void *__cuMemMapArrayAsync = NULL + * cdef void *__cuMemUnmap = NULL + * cdef void *__cuMemSetAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetAccess = NULL + * cdef void *__cuMemExportToShareableHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemSetAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":184 + * cdef void *__cuMemUnmap = NULL + * cdef void *__cuMemSetAccess = NULL + * cdef void *__cuMemGetAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemExportToShareableHandle = NULL + * cdef void *__cuMemImportFromShareableHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":185 + * cdef void *__cuMemSetAccess = NULL + * cdef void *__cuMemGetAccess = NULL + * cdef void *__cuMemExportToShareableHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemImportFromShareableHandle = NULL + * cdef void *__cuMemGetAllocationGranularity = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemExportToShareableHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":186 + * cdef void *__cuMemGetAccess = NULL + * cdef void *__cuMemExportToShareableHandle = NULL + * cdef void *__cuMemImportFromShareableHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetAllocationGranularity = NULL + * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemImportFromShareableHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":187 + * cdef void *__cuMemExportToShareableHandle = NULL + * cdef void *__cuMemImportFromShareableHandle = NULL + * cdef void *__cuMemGetAllocationGranularity = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL + * cdef void *__cuMemRetainAllocationHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationGranularity = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":188 + * cdef void *__cuMemImportFromShareableHandle = NULL + * cdef void *__cuMemGetAllocationGranularity = NULL + * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemRetainAllocationHandle = NULL + * cdef void *__cuMemFreeAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemGetAllocationPropertiesFromHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":189 + * cdef void *__cuMemGetAllocationGranularity = NULL + * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL + * cdef void *__cuMemRetainAllocationHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemFreeAsync = NULL + * cdef void *__cuMemAllocAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRetainAllocationHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":190 + * cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL + * cdef void *__cuMemRetainAllocationHandle = NULL + * cdef void *__cuMemFreeAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAllocAsync = NULL + * cdef void *__cuMemPoolTrimTo = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemFreeAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":191 + * cdef void *__cuMemRetainAllocationHandle = NULL + * cdef void *__cuMemFreeAsync = NULL + * cdef void *__cuMemAllocAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolTrimTo = NULL + * cdef void *__cuMemPoolSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":192 + * cdef void *__cuMemFreeAsync = NULL + * cdef void *__cuMemAllocAsync = NULL + * cdef void *__cuMemPoolTrimTo = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolSetAttribute = NULL + * cdef void *__cuMemPoolGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolTrimTo = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":193 + * cdef void *__cuMemAllocAsync = NULL + * cdef void *__cuMemPoolTrimTo = NULL + * cdef void *__cuMemPoolSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolGetAttribute = NULL + * cdef void *__cuMemPoolSetAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":194 + * cdef void *__cuMemPoolTrimTo = NULL + * cdef void *__cuMemPoolSetAttribute = NULL + * cdef void *__cuMemPoolGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolSetAccess = NULL + * cdef void *__cuMemPoolGetAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":195 + * cdef void *__cuMemPoolSetAttribute = NULL + * cdef void *__cuMemPoolGetAttribute = NULL + * cdef void *__cuMemPoolSetAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolGetAccess = NULL + * cdef void *__cuMemPoolCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolSetAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":196 + * cdef void *__cuMemPoolGetAttribute = NULL + * cdef void *__cuMemPoolSetAccess = NULL + * cdef void *__cuMemPoolGetAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolCreate = NULL + * cdef void *__cuMemPoolDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolGetAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":197 + * cdef void *__cuMemPoolSetAccess = NULL + * cdef void *__cuMemPoolGetAccess = NULL + * cdef void *__cuMemPoolCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolDestroy = NULL + * cdef void *__cuMemAllocFromPoolAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":198 + * cdef void *__cuMemPoolGetAccess = NULL + * cdef void *__cuMemPoolCreate = NULL + * cdef void *__cuMemPoolDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAllocFromPoolAsync = NULL + * cdef void *__cuMemPoolExportToShareableHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":199 + * cdef void *__cuMemPoolCreate = NULL + * cdef void *__cuMemPoolDestroy = NULL + * cdef void *__cuMemAllocFromPoolAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolExportToShareableHandle = NULL + * cdef void *__cuMemPoolImportFromShareableHandle = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAllocFromPoolAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":200 + * cdef void *__cuMemPoolDestroy = NULL + * cdef void *__cuMemAllocFromPoolAsync = NULL + * cdef void *__cuMemPoolExportToShareableHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolImportFromShareableHandle = NULL + * cdef void *__cuMemPoolExportPointer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportToShareableHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":201 + * cdef void *__cuMemAllocFromPoolAsync = NULL + * cdef void *__cuMemPoolExportToShareableHandle = NULL + * cdef void *__cuMemPoolImportFromShareableHandle = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolExportPointer = NULL + * cdef void *__cuMemPoolImportPointer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportFromShareableHandle = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":202 + * cdef void *__cuMemPoolExportToShareableHandle = NULL + * cdef void *__cuMemPoolImportFromShareableHandle = NULL + * cdef void *__cuMemPoolExportPointer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPoolImportPointer = NULL + * cdef void *__cuMulticastCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolExportPointer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":203 + * cdef void *__cuMemPoolImportFromShareableHandle = NULL + * cdef void *__cuMemPoolExportPointer = NULL + * cdef void *__cuMemPoolImportPointer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastCreate = NULL + * cdef void *__cuMulticastAddDevice = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPoolImportPointer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":204 + * cdef void *__cuMemPoolExportPointer = NULL + * cdef void *__cuMemPoolImportPointer = NULL + * cdef void *__cuMulticastCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastAddDevice = NULL + * cdef void *__cuMulticastBindMem = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":205 + * cdef void *__cuMemPoolImportPointer = NULL + * cdef void *__cuMulticastCreate = NULL + * cdef void *__cuMulticastAddDevice = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastBindMem = NULL + * cdef void *__cuMulticastBindAddr = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastAddDevice = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":206 + * cdef void *__cuMulticastCreate = NULL + * cdef void *__cuMulticastAddDevice = NULL + * cdef void *__cuMulticastBindMem = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastBindAddr = NULL + * cdef void *__cuMulticastUnbind = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindMem = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":207 + * cdef void *__cuMulticastAddDevice = NULL + * cdef void *__cuMulticastBindMem = NULL + * cdef void *__cuMulticastBindAddr = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastUnbind = NULL + * cdef void *__cuMulticastGetGranularity = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastBindAddr = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":208 + * cdef void *__cuMulticastBindMem = NULL + * cdef void *__cuMulticastBindAddr = NULL + * cdef void *__cuMulticastUnbind = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMulticastGetGranularity = NULL + * cdef void *__cuPointerGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastUnbind = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":209 + * cdef void *__cuMulticastBindAddr = NULL + * cdef void *__cuMulticastUnbind = NULL + * cdef void *__cuMulticastGetGranularity = NULL # <<<<<<<<<<<<<< + * cdef void *__cuPointerGetAttribute = NULL + * cdef void *__cuMemPrefetchAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMulticastGetGranularity = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":210 + * cdef void *__cuMulticastUnbind = NULL + * cdef void *__cuMulticastGetGranularity = NULL + * cdef void *__cuPointerGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPrefetchAsync = NULL + * cdef void *__cuMemPrefetchAsync_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":211 + * cdef void *__cuMulticastGetGranularity = NULL + * cdef void *__cuPointerGetAttribute = NULL + * cdef void *__cuMemPrefetchAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemPrefetchAsync_v2 = NULL + * cdef void *__cuMemAdvise = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":212 + * cdef void *__cuPointerGetAttribute = NULL + * cdef void *__cuMemPrefetchAsync = NULL + * cdef void *__cuMemPrefetchAsync_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAdvise = NULL + * cdef void *__cuMemAdvise_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemPrefetchAsync_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":213 + * cdef void *__cuMemPrefetchAsync = NULL + * cdef void *__cuMemPrefetchAsync_v2 = NULL + * cdef void *__cuMemAdvise = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemAdvise_v2 = NULL + * cdef void *__cuMemRangeGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":214 + * cdef void *__cuMemPrefetchAsync_v2 = NULL + * cdef void *__cuMemAdvise = NULL + * cdef void *__cuMemAdvise_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemRangeGetAttribute = NULL + * cdef void *__cuMemRangeGetAttributes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemAdvise_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":215 + * cdef void *__cuMemAdvise = NULL + * cdef void *__cuMemAdvise_v2 = NULL + * cdef void *__cuMemRangeGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuMemRangeGetAttributes = NULL + * cdef void *__cuPointerSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":216 + * cdef void *__cuMemAdvise_v2 = NULL + * cdef void *__cuMemRangeGetAttribute = NULL + * cdef void *__cuMemRangeGetAttributes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuPointerSetAttribute = NULL + * cdef void *__cuPointerGetAttributes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuMemRangeGetAttributes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":217 + * cdef void *__cuMemRangeGetAttribute = NULL + * cdef void *__cuMemRangeGetAttributes = NULL + * cdef void *__cuPointerSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuPointerGetAttributes = NULL + * cdef void *__cuStreamCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":218 + * cdef void *__cuMemRangeGetAttributes = NULL + * cdef void *__cuPointerSetAttribute = NULL + * cdef void *__cuPointerGetAttributes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamCreate = NULL + * cdef void *__cuStreamCreateWithPriority = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuPointerGetAttributes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":219 + * cdef void *__cuPointerSetAttribute = NULL + * cdef void *__cuPointerGetAttributes = NULL + * cdef void *__cuStreamCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamCreateWithPriority = NULL + * cdef void *__cuStreamGetPriority = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":220 + * cdef void *__cuPointerGetAttributes = NULL + * cdef void *__cuStreamCreate = NULL + * cdef void *__cuStreamCreateWithPriority = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetPriority = NULL + * cdef void *__cuStreamGetDevice = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCreateWithPriority = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":221 + * cdef void *__cuStreamCreate = NULL + * cdef void *__cuStreamCreateWithPriority = NULL + * cdef void *__cuStreamGetPriority = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetDevice = NULL + * cdef void *__cuStreamGetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetPriority = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":222 + * cdef void *__cuStreamCreateWithPriority = NULL + * cdef void *__cuStreamGetPriority = NULL + * cdef void *__cuStreamGetDevice = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetFlags = NULL + * cdef void *__cuStreamGetId = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetDevice = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":223 + * cdef void *__cuStreamGetPriority = NULL + * cdef void *__cuStreamGetDevice = NULL + * cdef void *__cuStreamGetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetId = NULL + * cdef void *__cuStreamGetCtx = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":224 + * cdef void *__cuStreamGetDevice = NULL + * cdef void *__cuStreamGetFlags = NULL + * cdef void *__cuStreamGetId = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetCtx = NULL + * cdef void *__cuStreamGetCtx_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetId = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":225 + * cdef void *__cuStreamGetFlags = NULL + * cdef void *__cuStreamGetId = NULL + * cdef void *__cuStreamGetCtx = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetCtx_v2 = NULL + * cdef void *__cuStreamWaitEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":226 + * cdef void *__cuStreamGetId = NULL + * cdef void *__cuStreamGetCtx = NULL + * cdef void *__cuStreamGetCtx_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamWaitEvent = NULL + * cdef void *__cuStreamAddCallback = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCtx_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":227 + * cdef void *__cuStreamGetCtx = NULL + * cdef void *__cuStreamGetCtx_v2 = NULL + * cdef void *__cuStreamWaitEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamAddCallback = NULL + * cdef void *__cuStreamBeginCapture_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":228 + * cdef void *__cuStreamGetCtx_v2 = NULL + * cdef void *__cuStreamWaitEvent = NULL + * cdef void *__cuStreamAddCallback = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamBeginCapture_v2 = NULL + * cdef void *__cuStreamBeginCaptureToGraph = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAddCallback = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":229 + * cdef void *__cuStreamWaitEvent = NULL + * cdef void *__cuStreamAddCallback = NULL + * cdef void *__cuStreamBeginCapture_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamBeginCaptureToGraph = NULL + * cdef void *__cuThreadExchangeStreamCaptureMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCapture_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":230 + * cdef void *__cuStreamAddCallback = NULL + * cdef void *__cuStreamBeginCapture_v2 = NULL + * cdef void *__cuStreamBeginCaptureToGraph = NULL # <<<<<<<<<<<<<< + * cdef void *__cuThreadExchangeStreamCaptureMode = NULL + * cdef void *__cuStreamEndCapture = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBeginCaptureToGraph = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":231 + * cdef void *__cuStreamBeginCapture_v2 = NULL + * cdef void *__cuStreamBeginCaptureToGraph = NULL + * cdef void *__cuThreadExchangeStreamCaptureMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamEndCapture = NULL + * cdef void *__cuStreamIsCapturing = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuThreadExchangeStreamCaptureMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":232 + * cdef void *__cuStreamBeginCaptureToGraph = NULL + * cdef void *__cuThreadExchangeStreamCaptureMode = NULL + * cdef void *__cuStreamEndCapture = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamIsCapturing = NULL + * cdef void *__cuStreamGetCaptureInfo_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamEndCapture = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":233 + * cdef void *__cuThreadExchangeStreamCaptureMode = NULL + * cdef void *__cuStreamEndCapture = NULL + * cdef void *__cuStreamIsCapturing = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetCaptureInfo_v2 = NULL + * cdef void *__cuStreamGetCaptureInfo_v3 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamIsCapturing = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":234 + * cdef void *__cuStreamEndCapture = NULL + * cdef void *__cuStreamIsCapturing = NULL + * cdef void *__cuStreamGetCaptureInfo_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetCaptureInfo_v3 = NULL + * cdef void *__cuStreamUpdateCaptureDependencies = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":235 + * cdef void *__cuStreamIsCapturing = NULL + * cdef void *__cuStreamGetCaptureInfo_v2 = NULL + * cdef void *__cuStreamGetCaptureInfo_v3 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamUpdateCaptureDependencies = NULL + * cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetCaptureInfo_v3 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":236 + * cdef void *__cuStreamGetCaptureInfo_v2 = NULL + * cdef void *__cuStreamGetCaptureInfo_v3 = NULL + * cdef void *__cuStreamUpdateCaptureDependencies = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL + * cdef void *__cuStreamAttachMemAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":237 + * cdef void *__cuStreamGetCaptureInfo_v3 = NULL + * cdef void *__cuStreamUpdateCaptureDependencies = NULL + * cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamAttachMemAsync = NULL + * cdef void *__cuStreamQuery = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamUpdateCaptureDependencies_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":238 + * cdef void *__cuStreamUpdateCaptureDependencies = NULL + * cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL + * cdef void *__cuStreamAttachMemAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamQuery = NULL + * cdef void *__cuStreamSynchronize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamAttachMemAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":239 + * cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL + * cdef void *__cuStreamAttachMemAsync = NULL + * cdef void *__cuStreamQuery = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamSynchronize = NULL + * cdef void *__cuStreamDestroy_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamQuery = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":240 + * cdef void *__cuStreamAttachMemAsync = NULL + * cdef void *__cuStreamQuery = NULL + * cdef void *__cuStreamSynchronize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamDestroy_v2 = NULL + * cdef void *__cuStreamCopyAttributes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSynchronize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":241 + * cdef void *__cuStreamQuery = NULL + * cdef void *__cuStreamSynchronize = NULL + * cdef void *__cuStreamDestroy_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamCopyAttributes = NULL + * cdef void *__cuStreamGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamDestroy_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":242 + * cdef void *__cuStreamSynchronize = NULL + * cdef void *__cuStreamDestroy_v2 = NULL + * cdef void *__cuStreamCopyAttributes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetAttribute = NULL + * cdef void *__cuStreamSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamCopyAttributes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":243 + * cdef void *__cuStreamDestroy_v2 = NULL + * cdef void *__cuStreamCopyAttributes = NULL + * cdef void *__cuStreamGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamSetAttribute = NULL + * cdef void *__cuEventCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":244 + * cdef void *__cuStreamCopyAttributes = NULL + * cdef void *__cuStreamGetAttribute = NULL + * cdef void *__cuStreamSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventCreate = NULL + * cdef void *__cuEventRecord = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":245 + * cdef void *__cuStreamGetAttribute = NULL + * cdef void *__cuStreamSetAttribute = NULL + * cdef void *__cuEventCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventRecord = NULL + * cdef void *__cuEventRecordWithFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":246 + * cdef void *__cuStreamSetAttribute = NULL + * cdef void *__cuEventCreate = NULL + * cdef void *__cuEventRecord = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventRecordWithFlags = NULL + * cdef void *__cuEventQuery = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecord = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":247 + * cdef void *__cuEventCreate = NULL + * cdef void *__cuEventRecord = NULL + * cdef void *__cuEventRecordWithFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventQuery = NULL + * cdef void *__cuEventSynchronize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventRecordWithFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":248 + * cdef void *__cuEventRecord = NULL + * cdef void *__cuEventRecordWithFlags = NULL + * cdef void *__cuEventQuery = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventSynchronize = NULL + * cdef void *__cuEventDestroy_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventQuery = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":249 + * cdef void *__cuEventRecordWithFlags = NULL + * cdef void *__cuEventQuery = NULL + * cdef void *__cuEventSynchronize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventDestroy_v2 = NULL + * cdef void *__cuEventElapsedTime = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventSynchronize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":250 + * cdef void *__cuEventQuery = NULL + * cdef void *__cuEventSynchronize = NULL + * cdef void *__cuEventDestroy_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventElapsedTime = NULL + * cdef void *__cuEventElapsedTime_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventDestroy_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":251 + * cdef void *__cuEventSynchronize = NULL + * cdef void *__cuEventDestroy_v2 = NULL + * cdef void *__cuEventElapsedTime = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventElapsedTime_v2 = NULL + * cdef void *__cuImportExternalMemory = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":252 + * cdef void *__cuEventDestroy_v2 = NULL + * cdef void *__cuEventElapsedTime = NULL + * cdef void *__cuEventElapsedTime_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuImportExternalMemory = NULL + * cdef void *__cuExternalMemoryGetMappedBuffer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventElapsedTime_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":253 + * cdef void *__cuEventElapsedTime = NULL + * cdef void *__cuEventElapsedTime_v2 = NULL + * cdef void *__cuImportExternalMemory = NULL # <<<<<<<<<<<<<< + * cdef void *__cuExternalMemoryGetMappedBuffer = NULL + * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalMemory = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":254 + * cdef void *__cuEventElapsedTime_v2 = NULL + * cdef void *__cuImportExternalMemory = NULL + * cdef void *__cuExternalMemoryGetMappedBuffer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL + * cdef void *__cuDestroyExternalMemory = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedBuffer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":255 + * cdef void *__cuImportExternalMemory = NULL + * cdef void *__cuExternalMemoryGetMappedBuffer = NULL + * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDestroyExternalMemory = NULL + * cdef void *__cuImportExternalSemaphore = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuExternalMemoryGetMappedMipmappedArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":256 + * cdef void *__cuExternalMemoryGetMappedBuffer = NULL + * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL + * cdef void *__cuDestroyExternalMemory = NULL # <<<<<<<<<<<<<< + * cdef void *__cuImportExternalSemaphore = NULL + * cdef void *__cuSignalExternalSemaphoresAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalMemory = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":257 + * cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL + * cdef void *__cuDestroyExternalMemory = NULL + * cdef void *__cuImportExternalSemaphore = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSignalExternalSemaphoresAsync = NULL + * cdef void *__cuWaitExternalSemaphoresAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuImportExternalSemaphore = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":258 + * cdef void *__cuDestroyExternalMemory = NULL + * cdef void *__cuImportExternalSemaphore = NULL + * cdef void *__cuSignalExternalSemaphoresAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuWaitExternalSemaphoresAsync = NULL + * cdef void *__cuDestroyExternalSemaphore = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSignalExternalSemaphoresAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":259 + * cdef void *__cuImportExternalSemaphore = NULL + * cdef void *__cuSignalExternalSemaphoresAsync = NULL + * cdef void *__cuWaitExternalSemaphoresAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDestroyExternalSemaphore = NULL + * cdef void *__cuStreamWaitValue32_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuWaitExternalSemaphoresAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":260 + * cdef void *__cuSignalExternalSemaphoresAsync = NULL + * cdef void *__cuWaitExternalSemaphoresAsync = NULL + * cdef void *__cuDestroyExternalSemaphore = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamWaitValue32_v2 = NULL + * cdef void *__cuStreamWaitValue64_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDestroyExternalSemaphore = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":261 + * cdef void *__cuWaitExternalSemaphoresAsync = NULL + * cdef void *__cuDestroyExternalSemaphore = NULL + * cdef void *__cuStreamWaitValue32_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamWaitValue64_v2 = NULL + * cdef void *__cuStreamWriteValue32_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue32_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":262 + * cdef void *__cuDestroyExternalSemaphore = NULL + * cdef void *__cuStreamWaitValue32_v2 = NULL + * cdef void *__cuStreamWaitValue64_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamWriteValue32_v2 = NULL + * cdef void *__cuStreamWriteValue64_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWaitValue64_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":263 + * cdef void *__cuStreamWaitValue32_v2 = NULL + * cdef void *__cuStreamWaitValue64_v2 = NULL + * cdef void *__cuStreamWriteValue32_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamWriteValue64_v2 = NULL + * cdef void *__cuStreamBatchMemOp_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue32_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":264 + * cdef void *__cuStreamWaitValue64_v2 = NULL + * cdef void *__cuStreamWriteValue32_v2 = NULL + * cdef void *__cuStreamWriteValue64_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamBatchMemOp_v2 = NULL + * cdef void *__cuFuncGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamWriteValue64_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":265 + * cdef void *__cuStreamWriteValue32_v2 = NULL + * cdef void *__cuStreamWriteValue64_v2 = NULL + * cdef void *__cuStreamBatchMemOp_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncGetAttribute = NULL + * cdef void *__cuFuncSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamBatchMemOp_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":266 + * cdef void *__cuStreamWriteValue64_v2 = NULL + * cdef void *__cuStreamBatchMemOp_v2 = NULL + * cdef void *__cuFuncGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncSetAttribute = NULL + * cdef void *__cuFuncSetCacheConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":267 + * cdef void *__cuStreamBatchMemOp_v2 = NULL + * cdef void *__cuFuncGetAttribute = NULL + * cdef void *__cuFuncSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncSetCacheConfig = NULL + * cdef void *__cuFuncGetModule = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":268 + * cdef void *__cuFuncGetAttribute = NULL + * cdef void *__cuFuncSetAttribute = NULL + * cdef void *__cuFuncSetCacheConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncGetModule = NULL + * cdef void *__cuFuncGetName = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetCacheConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":269 + * cdef void *__cuFuncSetAttribute = NULL + * cdef void *__cuFuncSetCacheConfig = NULL + * cdef void *__cuFuncGetModule = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncGetName = NULL + * cdef void *__cuFuncGetParamInfo = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetModule = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":270 + * cdef void *__cuFuncSetCacheConfig = NULL + * cdef void *__cuFuncGetModule = NULL + * cdef void *__cuFuncGetName = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncGetParamInfo = NULL + * cdef void *__cuFuncIsLoaded = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetName = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":271 + * cdef void *__cuFuncGetModule = NULL + * cdef void *__cuFuncGetName = NULL + * cdef void *__cuFuncGetParamInfo = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncIsLoaded = NULL + * cdef void *__cuFuncLoad = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncGetParamInfo = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":272 + * cdef void *__cuFuncGetName = NULL + * cdef void *__cuFuncGetParamInfo = NULL + * cdef void *__cuFuncIsLoaded = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncLoad = NULL + * cdef void *__cuLaunchKernel = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncIsLoaded = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":273 + * cdef void *__cuFuncGetParamInfo = NULL + * cdef void *__cuFuncIsLoaded = NULL + * cdef void *__cuFuncLoad = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchKernel = NULL + * cdef void *__cuLaunchKernelEx = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncLoad = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":274 + * cdef void *__cuFuncIsLoaded = NULL + * cdef void *__cuFuncLoad = NULL + * cdef void *__cuLaunchKernel = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchKernelEx = NULL + * cdef void *__cuLaunchCooperativeKernel = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernel = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":275 + * cdef void *__cuFuncLoad = NULL + * cdef void *__cuLaunchKernel = NULL + * cdef void *__cuLaunchKernelEx = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchCooperativeKernel = NULL + * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchKernelEx = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":276 + * cdef void *__cuLaunchKernel = NULL + * cdef void *__cuLaunchKernelEx = NULL + * cdef void *__cuLaunchCooperativeKernel = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL + * cdef void *__cuLaunchHostFunc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernel = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":277 + * cdef void *__cuLaunchKernelEx = NULL + * cdef void *__cuLaunchCooperativeKernel = NULL + * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchHostFunc = NULL + * cdef void *__cuFuncSetBlockShape = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchCooperativeKernelMultiDevice = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":278 + * cdef void *__cuLaunchCooperativeKernel = NULL + * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL + * cdef void *__cuLaunchHostFunc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncSetBlockShape = NULL + * cdef void *__cuFuncSetSharedSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchHostFunc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":279 + * cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL + * cdef void *__cuLaunchHostFunc = NULL + * cdef void *__cuFuncSetBlockShape = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncSetSharedSize = NULL + * cdef void *__cuParamSetSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetBlockShape = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":280 + * cdef void *__cuLaunchHostFunc = NULL + * cdef void *__cuFuncSetBlockShape = NULL + * cdef void *__cuFuncSetSharedSize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuParamSetSize = NULL + * cdef void *__cuParamSeti = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedSize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":281 + * cdef void *__cuFuncSetBlockShape = NULL + * cdef void *__cuFuncSetSharedSize = NULL + * cdef void *__cuParamSetSize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuParamSeti = NULL + * cdef void *__cuParamSetf = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetSize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":282 + * cdef void *__cuFuncSetSharedSize = NULL + * cdef void *__cuParamSetSize = NULL + * cdef void *__cuParamSeti = NULL # <<<<<<<<<<<<<< + * cdef void *__cuParamSetf = NULL + * cdef void *__cuParamSetv = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSeti = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":283 + * cdef void *__cuParamSetSize = NULL + * cdef void *__cuParamSeti = NULL + * cdef void *__cuParamSetf = NULL # <<<<<<<<<<<<<< + * cdef void *__cuParamSetv = NULL + * cdef void *__cuLaunch = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetf = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":284 + * cdef void *__cuParamSeti = NULL + * cdef void *__cuParamSetf = NULL + * cdef void *__cuParamSetv = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunch = NULL + * cdef void *__cuLaunchGrid = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetv = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":285 + * cdef void *__cuParamSetf = NULL + * cdef void *__cuParamSetv = NULL + * cdef void *__cuLaunch = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchGrid = NULL + * cdef void *__cuLaunchGridAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunch = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":286 + * cdef void *__cuParamSetv = NULL + * cdef void *__cuLaunch = NULL + * cdef void *__cuLaunchGrid = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLaunchGridAsync = NULL + * cdef void *__cuParamSetTexRef = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGrid = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":287 + * cdef void *__cuLaunch = NULL + * cdef void *__cuLaunchGrid = NULL + * cdef void *__cuLaunchGridAsync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuParamSetTexRef = NULL + * cdef void *__cuFuncSetSharedMemConfig = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLaunchGridAsync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":288 + * cdef void *__cuLaunchGrid = NULL + * cdef void *__cuLaunchGridAsync = NULL + * cdef void *__cuParamSetTexRef = NULL # <<<<<<<<<<<<<< + * cdef void *__cuFuncSetSharedMemConfig = NULL + * cdef void *__cuGraphCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuParamSetTexRef = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":289 + * cdef void *__cuLaunchGridAsync = NULL + * cdef void *__cuParamSetTexRef = NULL + * cdef void *__cuFuncSetSharedMemConfig = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphCreate = NULL + * cdef void *__cuGraphAddKernelNode_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuFuncSetSharedMemConfig = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":290 + * cdef void *__cuParamSetTexRef = NULL + * cdef void *__cuFuncSetSharedMemConfig = NULL + * cdef void *__cuGraphCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddKernelNode_v2 = NULL + * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":291 + * cdef void *__cuFuncSetSharedMemConfig = NULL + * cdef void *__cuGraphCreate = NULL + * cdef void *__cuGraphAddKernelNode_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL + * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddKernelNode_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":292 + * cdef void *__cuGraphCreate = NULL + * cdef void *__cuGraphAddKernelNode_v2 = NULL + * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphAddMemcpyNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetParams_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":293 + * cdef void *__cuGraphAddKernelNode_v2 = NULL + * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL + * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddMemcpyNode = NULL + * cdef void *__cuGraphMemcpyNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetParams_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":294 + * cdef void *__cuGraphKernelNodeGetParams_v2 = NULL + * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphAddMemcpyNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemcpyNodeGetParams = NULL + * cdef void *__cuGraphMemcpyNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemcpyNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":295 + * cdef void *__cuGraphKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphAddMemcpyNode = NULL + * cdef void *__cuGraphMemcpyNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemcpyNodeSetParams = NULL + * cdef void *__cuGraphAddMemsetNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":296 + * cdef void *__cuGraphAddMemcpyNode = NULL + * cdef void *__cuGraphMemcpyNodeGetParams = NULL + * cdef void *__cuGraphMemcpyNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddMemsetNode = NULL + * cdef void *__cuGraphMemsetNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemcpyNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":297 + * cdef void *__cuGraphMemcpyNodeGetParams = NULL + * cdef void *__cuGraphMemcpyNodeSetParams = NULL + * cdef void *__cuGraphAddMemsetNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemsetNodeGetParams = NULL + * cdef void *__cuGraphMemsetNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemsetNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":298 + * cdef void *__cuGraphMemcpyNodeSetParams = NULL + * cdef void *__cuGraphAddMemsetNode = NULL + * cdef void *__cuGraphMemsetNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemsetNodeSetParams = NULL + * cdef void *__cuGraphAddHostNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":299 + * cdef void *__cuGraphAddMemsetNode = NULL + * cdef void *__cuGraphMemsetNodeGetParams = NULL + * cdef void *__cuGraphMemsetNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddHostNode = NULL + * cdef void *__cuGraphHostNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemsetNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":300 + * cdef void *__cuGraphMemsetNodeGetParams = NULL + * cdef void *__cuGraphMemsetNodeSetParams = NULL + * cdef void *__cuGraphAddHostNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphHostNodeGetParams = NULL + * cdef void *__cuGraphHostNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddHostNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":301 + * cdef void *__cuGraphMemsetNodeSetParams = NULL + * cdef void *__cuGraphAddHostNode = NULL + * cdef void *__cuGraphHostNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphHostNodeSetParams = NULL + * cdef void *__cuGraphAddChildGraphNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":302 + * cdef void *__cuGraphAddHostNode = NULL + * cdef void *__cuGraphHostNodeGetParams = NULL + * cdef void *__cuGraphHostNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddChildGraphNode = NULL + * cdef void *__cuGraphChildGraphNodeGetGraph = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphHostNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":303 + * cdef void *__cuGraphHostNodeGetParams = NULL + * cdef void *__cuGraphHostNodeSetParams = NULL + * cdef void *__cuGraphAddChildGraphNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphChildGraphNodeGetGraph = NULL + * cdef void *__cuGraphAddEmptyNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddChildGraphNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":304 + * cdef void *__cuGraphHostNodeSetParams = NULL + * cdef void *__cuGraphAddChildGraphNode = NULL + * cdef void *__cuGraphChildGraphNodeGetGraph = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddEmptyNode = NULL + * cdef void *__cuGraphAddEventRecordNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphChildGraphNodeGetGraph = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":305 + * cdef void *__cuGraphAddChildGraphNode = NULL + * cdef void *__cuGraphChildGraphNodeGetGraph = NULL + * cdef void *__cuGraphAddEmptyNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddEventRecordNode = NULL + * cdef void *__cuGraphEventRecordNodeGetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEmptyNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":306 + * cdef void *__cuGraphChildGraphNodeGetGraph = NULL + * cdef void *__cuGraphAddEmptyNode = NULL + * cdef void *__cuGraphAddEventRecordNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphEventRecordNodeGetEvent = NULL + * cdef void *__cuGraphEventRecordNodeSetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventRecordNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":307 + * cdef void *__cuGraphAddEmptyNode = NULL + * cdef void *__cuGraphAddEventRecordNode = NULL + * cdef void *__cuGraphEventRecordNodeGetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphAddEventWaitNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeGetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":308 + * cdef void *__cuGraphAddEventRecordNode = NULL + * cdef void *__cuGraphEventRecordNodeGetEvent = NULL + * cdef void *__cuGraphEventRecordNodeSetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddEventWaitNode = NULL + * cdef void *__cuGraphEventWaitNodeGetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventRecordNodeSetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":309 + * cdef void *__cuGraphEventRecordNodeGetEvent = NULL + * cdef void *__cuGraphEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphAddEventWaitNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphEventWaitNodeGetEvent = NULL + * cdef void *__cuGraphEventWaitNodeSetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddEventWaitNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":310 + * cdef void *__cuGraphEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphAddEventWaitNode = NULL + * cdef void *__cuGraphEventWaitNodeGetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeGetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":311 + * cdef void *__cuGraphAddEventWaitNode = NULL + * cdef void *__cuGraphEventWaitNodeGetEvent = NULL + * cdef void *__cuGraphEventWaitNodeSetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphEventWaitNodeSetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":312 + * cdef void *__cuGraphEventWaitNodeGetEvent = NULL + * cdef void *__cuGraphEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresSignalNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":313 + * cdef void *__cuGraphEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":314 + * cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresSignalNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":315 + * cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddExternalSemaphoresWaitNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":316 + * cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphAddBatchMemOpNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":317 + * cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddBatchMemOpNode = NULL + * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExternalSemaphoresWaitNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":318 + * cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL + * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphAddBatchMemOpNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL + * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddBatchMemOpNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":319 + * cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphAddBatchMemOpNode = NULL + * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":320 + * cdef void *__cuGraphAddBatchMemOpNode = NULL + * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL + * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphAddMemAllocNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphBatchMemOpNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":321 + * cdef void *__cuGraphBatchMemOpNodeGetParams = NULL + * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddMemAllocNode = NULL + * cdef void *__cuGraphMemAllocNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecBatchMemOpNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":322 + * cdef void *__cuGraphBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphAddMemAllocNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemAllocNodeGetParams = NULL + * cdef void *__cuGraphAddMemFreeNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemAllocNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":323 + * cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL + * cdef void *__cuGraphAddMemAllocNode = NULL + * cdef void *__cuGraphMemAllocNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddMemFreeNode = NULL + * cdef void *__cuGraphMemFreeNodeGetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemAllocNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":324 + * cdef void *__cuGraphAddMemAllocNode = NULL + * cdef void *__cuGraphMemAllocNodeGetParams = NULL + * cdef void *__cuGraphAddMemFreeNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphMemFreeNodeGetParams = NULL + * cdef void *__cuDeviceGraphMemTrim = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddMemFreeNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":325 + * cdef void *__cuGraphMemAllocNodeGetParams = NULL + * cdef void *__cuGraphAddMemFreeNode = NULL + * cdef void *__cuGraphMemFreeNodeGetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGraphMemTrim = NULL + * cdef void *__cuDeviceGetGraphMemAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphMemFreeNodeGetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":326 + * cdef void *__cuGraphAddMemFreeNode = NULL + * cdef void *__cuGraphMemFreeNodeGetParams = NULL + * cdef void *__cuDeviceGraphMemTrim = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetGraphMemAttribute = NULL + * cdef void *__cuDeviceSetGraphMemAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGraphMemTrim = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":327 + * cdef void *__cuGraphMemFreeNodeGetParams = NULL + * cdef void *__cuDeviceGraphMemTrim = NULL + * cdef void *__cuDeviceGetGraphMemAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceSetGraphMemAttribute = NULL + * cdef void *__cuGraphClone = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetGraphMemAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":328 + * cdef void *__cuDeviceGraphMemTrim = NULL + * cdef void *__cuDeviceGetGraphMemAttribute = NULL + * cdef void *__cuDeviceSetGraphMemAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphClone = NULL + * cdef void *__cuGraphNodeFindInClone = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceSetGraphMemAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":329 + * cdef void *__cuDeviceGetGraphMemAttribute = NULL + * cdef void *__cuDeviceSetGraphMemAttribute = NULL + * cdef void *__cuGraphClone = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeFindInClone = NULL + * cdef void *__cuGraphNodeGetType = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphClone = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":330 + * cdef void *__cuDeviceSetGraphMemAttribute = NULL + * cdef void *__cuGraphClone = NULL + * cdef void *__cuGraphNodeFindInClone = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetType = NULL + * cdef void *__cuGraphGetNodes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeFindInClone = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":331 + * cdef void *__cuGraphClone = NULL + * cdef void *__cuGraphNodeFindInClone = NULL + * cdef void *__cuGraphNodeGetType = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphGetNodes = NULL + * cdef void *__cuGraphGetRootNodes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetType = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":332 + * cdef void *__cuGraphNodeFindInClone = NULL + * cdef void *__cuGraphNodeGetType = NULL + * cdef void *__cuGraphGetNodes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphGetRootNodes = NULL + * cdef void *__cuGraphGetEdges = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetNodes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":333 + * cdef void *__cuGraphNodeGetType = NULL + * cdef void *__cuGraphGetNodes = NULL + * cdef void *__cuGraphGetRootNodes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphGetEdges = NULL + * cdef void *__cuGraphGetEdges_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetRootNodes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":334 + * cdef void *__cuGraphGetNodes = NULL + * cdef void *__cuGraphGetRootNodes = NULL + * cdef void *__cuGraphGetEdges = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphGetEdges_v2 = NULL + * cdef void *__cuGraphNodeGetDependencies = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":335 + * cdef void *__cuGraphGetRootNodes = NULL + * cdef void *__cuGraphGetEdges = NULL + * cdef void *__cuGraphGetEdges_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetDependencies = NULL + * cdef void *__cuGraphNodeGetDependencies_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphGetEdges_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":336 + * cdef void *__cuGraphGetEdges = NULL + * cdef void *__cuGraphGetEdges_v2 = NULL + * cdef void *__cuGraphNodeGetDependencies = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetDependencies_v2 = NULL + * cdef void *__cuGraphNodeGetDependentNodes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":337 + * cdef void *__cuGraphGetEdges_v2 = NULL + * cdef void *__cuGraphNodeGetDependencies = NULL + * cdef void *__cuGraphNodeGetDependencies_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetDependentNodes = NULL + * cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependencies_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":338 + * cdef void *__cuGraphNodeGetDependencies = NULL + * cdef void *__cuGraphNodeGetDependencies_v2 = NULL + * cdef void *__cuGraphNodeGetDependentNodes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL + * cdef void *__cuGraphAddDependencies = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":339 + * cdef void *__cuGraphNodeGetDependencies_v2 = NULL + * cdef void *__cuGraphNodeGetDependentNodes = NULL + * cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddDependencies = NULL + * cdef void *__cuGraphAddDependencies_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetDependentNodes_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":340 + * cdef void *__cuGraphNodeGetDependentNodes = NULL + * cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL + * cdef void *__cuGraphAddDependencies = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddDependencies_v2 = NULL + * cdef void *__cuGraphRemoveDependencies = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":341 + * cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL + * cdef void *__cuGraphAddDependencies = NULL + * cdef void *__cuGraphAddDependencies_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphRemoveDependencies = NULL + * cdef void *__cuGraphRemoveDependencies_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddDependencies_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":342 + * cdef void *__cuGraphAddDependencies = NULL + * cdef void *__cuGraphAddDependencies_v2 = NULL + * cdef void *__cuGraphRemoveDependencies = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphRemoveDependencies_v2 = NULL + * cdef void *__cuGraphDestroyNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":343 + * cdef void *__cuGraphAddDependencies_v2 = NULL + * cdef void *__cuGraphRemoveDependencies = NULL + * cdef void *__cuGraphRemoveDependencies_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphDestroyNode = NULL + * cdef void *__cuGraphInstantiateWithFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRemoveDependencies_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":344 + * cdef void *__cuGraphRemoveDependencies = NULL + * cdef void *__cuGraphRemoveDependencies_v2 = NULL + * cdef void *__cuGraphDestroyNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphInstantiateWithFlags = NULL + * cdef void *__cuGraphInstantiateWithParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroyNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":345 + * cdef void *__cuGraphRemoveDependencies_v2 = NULL + * cdef void *__cuGraphDestroyNode = NULL + * cdef void *__cuGraphInstantiateWithFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphInstantiateWithParams = NULL + * cdef void *__cuGraphExecGetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":346 + * cdef void *__cuGraphDestroyNode = NULL + * cdef void *__cuGraphInstantiateWithFlags = NULL + * cdef void *__cuGraphInstantiateWithParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecGetFlags = NULL + * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphInstantiateWithParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":347 + * cdef void *__cuGraphInstantiateWithFlags = NULL + * cdef void *__cuGraphInstantiateWithParams = NULL + * cdef void *__cuGraphExecGetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecGetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":348 + * cdef void *__cuGraphInstantiateWithParams = NULL + * cdef void *__cuGraphExecGetFlags = NULL + * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL + * cdef void *__cuGraphExecMemsetNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecKernelNodeSetParams_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":349 + * cdef void *__cuGraphExecGetFlags = NULL + * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecMemsetNodeSetParams = NULL + * cdef void *__cuGraphExecHostNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemcpyNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":350 + * cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL + * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL + * cdef void *__cuGraphExecMemsetNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecHostNodeSetParams = NULL + * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecMemsetNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":351 + * cdef void *__cuGraphExecMemcpyNodeSetParams = NULL + * cdef void *__cuGraphExecMemsetNodeSetParams = NULL + * cdef void *__cuGraphExecHostNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL + * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecHostNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":352 + * cdef void *__cuGraphExecMemsetNodeSetParams = NULL + * cdef void *__cuGraphExecHostNodeSetParams = NULL + * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecChildGraphNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":353 + * cdef void *__cuGraphExecHostNodeSetParams = NULL + * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL + * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventRecordNodeSetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":354 + * cdef void *__cuGraphExecChildGraphNodeSetParams = NULL + * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecEventWaitNodeSetEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":355 + * cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL + * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphNodeSetEnabled = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":356 + * cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL + * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeSetEnabled = NULL + * cdef void *__cuGraphNodeGetEnabled = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":357 + * cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL + * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphNodeSetEnabled = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeGetEnabled = NULL + * cdef void *__cuGraphUpload = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetEnabled = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":358 + * cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL + * cdef void *__cuGraphNodeSetEnabled = NULL + * cdef void *__cuGraphNodeGetEnabled = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphUpload = NULL + * cdef void *__cuGraphLaunch = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeGetEnabled = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":359 + * cdef void *__cuGraphNodeSetEnabled = NULL + * cdef void *__cuGraphNodeGetEnabled = NULL + * cdef void *__cuGraphUpload = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphLaunch = NULL + * cdef void *__cuGraphExecDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphUpload = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":360 + * cdef void *__cuGraphNodeGetEnabled = NULL + * cdef void *__cuGraphUpload = NULL + * cdef void *__cuGraphLaunch = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecDestroy = NULL + * cdef void *__cuGraphDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphLaunch = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":361 + * cdef void *__cuGraphUpload = NULL + * cdef void *__cuGraphLaunch = NULL + * cdef void *__cuGraphExecDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphDestroy = NULL + * cdef void *__cuGraphExecUpdate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":362 + * cdef void *__cuGraphLaunch = NULL + * cdef void *__cuGraphExecDestroy = NULL + * cdef void *__cuGraphDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecUpdate_v2 = NULL + * cdef void *__cuGraphKernelNodeCopyAttributes = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":363 + * cdef void *__cuGraphExecDestroy = NULL + * cdef void *__cuGraphDestroy = NULL + * cdef void *__cuGraphExecUpdate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphKernelNodeCopyAttributes = NULL + * cdef void *__cuGraphKernelNodeGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecUpdate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":364 + * cdef void *__cuGraphDestroy = NULL + * cdef void *__cuGraphExecUpdate_v2 = NULL + * cdef void *__cuGraphKernelNodeCopyAttributes = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphKernelNodeGetAttribute = NULL + * cdef void *__cuGraphKernelNodeSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeCopyAttributes = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":365 + * cdef void *__cuGraphExecUpdate_v2 = NULL + * cdef void *__cuGraphKernelNodeCopyAttributes = NULL + * cdef void *__cuGraphKernelNodeGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphKernelNodeSetAttribute = NULL + * cdef void *__cuGraphDebugDotPrint = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":366 + * cdef void *__cuGraphKernelNodeCopyAttributes = NULL + * cdef void *__cuGraphKernelNodeGetAttribute = NULL + * cdef void *__cuGraphKernelNodeSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphDebugDotPrint = NULL + * cdef void *__cuUserObjectCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphKernelNodeSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":367 + * cdef void *__cuGraphKernelNodeGetAttribute = NULL + * cdef void *__cuGraphKernelNodeSetAttribute = NULL + * cdef void *__cuGraphDebugDotPrint = NULL # <<<<<<<<<<<<<< + * cdef void *__cuUserObjectCreate = NULL + * cdef void *__cuUserObjectRetain = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphDebugDotPrint = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":368 + * cdef void *__cuGraphKernelNodeSetAttribute = NULL + * cdef void *__cuGraphDebugDotPrint = NULL + * cdef void *__cuUserObjectCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuUserObjectRetain = NULL + * cdef void *__cuUserObjectRelease = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":369 + * cdef void *__cuGraphDebugDotPrint = NULL + * cdef void *__cuUserObjectCreate = NULL + * cdef void *__cuUserObjectRetain = NULL # <<<<<<<<<<<<<< + * cdef void *__cuUserObjectRelease = NULL + * cdef void *__cuGraphRetainUserObject = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRetain = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":370 + * cdef void *__cuUserObjectCreate = NULL + * cdef void *__cuUserObjectRetain = NULL + * cdef void *__cuUserObjectRelease = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphRetainUserObject = NULL + * cdef void *__cuGraphReleaseUserObject = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuUserObjectRelease = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":371 + * cdef void *__cuUserObjectRetain = NULL + * cdef void *__cuUserObjectRelease = NULL + * cdef void *__cuGraphRetainUserObject = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphReleaseUserObject = NULL + * cdef void *__cuGraphAddNode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphRetainUserObject = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":372 + * cdef void *__cuUserObjectRelease = NULL + * cdef void *__cuGraphRetainUserObject = NULL + * cdef void *__cuGraphReleaseUserObject = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddNode = NULL + * cdef void *__cuGraphAddNode_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphReleaseUserObject = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":373 + * cdef void *__cuGraphRetainUserObject = NULL + * cdef void *__cuGraphReleaseUserObject = NULL + * cdef void *__cuGraphAddNode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphAddNode_v2 = NULL + * cdef void *__cuGraphNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":374 + * cdef void *__cuGraphReleaseUserObject = NULL + * cdef void *__cuGraphAddNode = NULL + * cdef void *__cuGraphAddNode_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphNodeSetParams = NULL + * cdef void *__cuGraphExecNodeSetParams = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphAddNode_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":375 + * cdef void *__cuGraphAddNode = NULL + * cdef void *__cuGraphAddNode_v2 = NULL + * cdef void *__cuGraphNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphExecNodeSetParams = NULL + * cdef void *__cuGraphConditionalHandleCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":376 + * cdef void *__cuGraphAddNode_v2 = NULL + * cdef void *__cuGraphNodeSetParams = NULL + * cdef void *__cuGraphExecNodeSetParams = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphConditionalHandleCreate = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphExecNodeSetParams = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":377 + * cdef void *__cuGraphNodeSetParams = NULL + * cdef void *__cuGraphExecNodeSetParams = NULL + * cdef void *__cuGraphConditionalHandleCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphConditionalHandleCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":378 + * cdef void *__cuGraphExecNodeSetParams = NULL + * cdef void *__cuGraphConditionalHandleCreate = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":379 + * cdef void *__cuGraphConditionalHandleCreate = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":380 + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL + * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":381 + * cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL + * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialBlockSizeWithFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":382 + * cdef void *__cuOccupancyMaxPotentialBlockSize = NULL + * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL + * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL + * cdef void *__cuOccupancyMaxActiveClusters = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyAvailableDynamicSMemPerBlock = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":383 + * cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL + * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL + * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL # <<<<<<<<<<<<<< + * cdef void *__cuOccupancyMaxActiveClusters = NULL + * cdef void *__cuTexRefSetArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxPotentialClusterSize = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":384 + * cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL + * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL + * cdef void *__cuOccupancyMaxActiveClusters = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetArray = NULL + * cdef void *__cuTexRefSetMipmappedArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuOccupancyMaxActiveClusters = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":385 + * cdef void *__cuOccupancyMaxPotentialClusterSize = NULL + * cdef void *__cuOccupancyMaxActiveClusters = NULL + * cdef void *__cuTexRefSetArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetMipmappedArray = NULL + * cdef void *__cuTexRefSetAddress_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":386 + * cdef void *__cuOccupancyMaxActiveClusters = NULL + * cdef void *__cuTexRefSetArray = NULL + * cdef void *__cuTexRefSetMipmappedArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetAddress_v2 = NULL + * cdef void *__cuTexRefSetAddress2D_v3 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmappedArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":387 + * cdef void *__cuTexRefSetArray = NULL + * cdef void *__cuTexRefSetMipmappedArray = NULL + * cdef void *__cuTexRefSetAddress_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetAddress2D_v3 = NULL + * cdef void *__cuTexRefSetFormat = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":388 + * cdef void *__cuTexRefSetMipmappedArray = NULL + * cdef void *__cuTexRefSetAddress_v2 = NULL + * cdef void *__cuTexRefSetAddress2D_v3 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetFormat = NULL + * cdef void *__cuTexRefSetAddressMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddress2D_v3 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":389 + * cdef void *__cuTexRefSetAddress_v2 = NULL + * cdef void *__cuTexRefSetAddress2D_v3 = NULL + * cdef void *__cuTexRefSetFormat = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetAddressMode = NULL + * cdef void *__cuTexRefSetFilterMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFormat = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":390 + * cdef void *__cuTexRefSetAddress2D_v3 = NULL + * cdef void *__cuTexRefSetFormat = NULL + * cdef void *__cuTexRefSetAddressMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetFilterMode = NULL + * cdef void *__cuTexRefSetMipmapFilterMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetAddressMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":391 + * cdef void *__cuTexRefSetFormat = NULL + * cdef void *__cuTexRefSetAddressMode = NULL + * cdef void *__cuTexRefSetFilterMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetMipmapFilterMode = NULL + * cdef void *__cuTexRefSetMipmapLevelBias = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFilterMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":392 + * cdef void *__cuTexRefSetAddressMode = NULL + * cdef void *__cuTexRefSetFilterMode = NULL + * cdef void *__cuTexRefSetMipmapFilterMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetMipmapLevelBias = NULL + * cdef void *__cuTexRefSetMipmapLevelClamp = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapFilterMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":393 + * cdef void *__cuTexRefSetFilterMode = NULL + * cdef void *__cuTexRefSetMipmapFilterMode = NULL + * cdef void *__cuTexRefSetMipmapLevelBias = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetMipmapLevelClamp = NULL + * cdef void *__cuTexRefSetMaxAnisotropy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelBias = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":394 + * cdef void *__cuTexRefSetMipmapFilterMode = NULL + * cdef void *__cuTexRefSetMipmapLevelBias = NULL + * cdef void *__cuTexRefSetMipmapLevelClamp = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetMaxAnisotropy = NULL + * cdef void *__cuTexRefSetBorderColor = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMipmapLevelClamp = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":395 + * cdef void *__cuTexRefSetMipmapLevelBias = NULL + * cdef void *__cuTexRefSetMipmapLevelClamp = NULL + * cdef void *__cuTexRefSetMaxAnisotropy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetBorderColor = NULL + * cdef void *__cuTexRefSetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetMaxAnisotropy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":396 + * cdef void *__cuTexRefSetMipmapLevelClamp = NULL + * cdef void *__cuTexRefSetMaxAnisotropy = NULL + * cdef void *__cuTexRefSetBorderColor = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefSetFlags = NULL + * cdef void *__cuTexRefGetAddress_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetBorderColor = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":397 + * cdef void *__cuTexRefSetMaxAnisotropy = NULL + * cdef void *__cuTexRefSetBorderColor = NULL + * cdef void *__cuTexRefSetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetAddress_v2 = NULL + * cdef void *__cuTexRefGetArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefSetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":398 + * cdef void *__cuTexRefSetBorderColor = NULL + * cdef void *__cuTexRefSetFlags = NULL + * cdef void *__cuTexRefGetAddress_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetArray = NULL + * cdef void *__cuTexRefGetMipmappedArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddress_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":399 + * cdef void *__cuTexRefSetFlags = NULL + * cdef void *__cuTexRefGetAddress_v2 = NULL + * cdef void *__cuTexRefGetArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetMipmappedArray = NULL + * cdef void *__cuTexRefGetAddressMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":400 + * cdef void *__cuTexRefGetAddress_v2 = NULL + * cdef void *__cuTexRefGetArray = NULL + * cdef void *__cuTexRefGetMipmappedArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetAddressMode = NULL + * cdef void *__cuTexRefGetFilterMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmappedArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":401 + * cdef void *__cuTexRefGetArray = NULL + * cdef void *__cuTexRefGetMipmappedArray = NULL + * cdef void *__cuTexRefGetAddressMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetFilterMode = NULL + * cdef void *__cuTexRefGetFormat = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetAddressMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":402 + * cdef void *__cuTexRefGetMipmappedArray = NULL + * cdef void *__cuTexRefGetAddressMode = NULL + * cdef void *__cuTexRefGetFilterMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetFormat = NULL + * cdef void *__cuTexRefGetMipmapFilterMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFilterMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":403 + * cdef void *__cuTexRefGetAddressMode = NULL + * cdef void *__cuTexRefGetFilterMode = NULL + * cdef void *__cuTexRefGetFormat = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetMipmapFilterMode = NULL + * cdef void *__cuTexRefGetMipmapLevelBias = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFormat = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":404 + * cdef void *__cuTexRefGetFilterMode = NULL + * cdef void *__cuTexRefGetFormat = NULL + * cdef void *__cuTexRefGetMipmapFilterMode = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetMipmapLevelBias = NULL + * cdef void *__cuTexRefGetMipmapLevelClamp = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapFilterMode = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":405 + * cdef void *__cuTexRefGetFormat = NULL + * cdef void *__cuTexRefGetMipmapFilterMode = NULL + * cdef void *__cuTexRefGetMipmapLevelBias = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetMipmapLevelClamp = NULL + * cdef void *__cuTexRefGetMaxAnisotropy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelBias = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":406 + * cdef void *__cuTexRefGetMipmapFilterMode = NULL + * cdef void *__cuTexRefGetMipmapLevelBias = NULL + * cdef void *__cuTexRefGetMipmapLevelClamp = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetMaxAnisotropy = NULL + * cdef void *__cuTexRefGetBorderColor = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMipmapLevelClamp = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":407 + * cdef void *__cuTexRefGetMipmapLevelBias = NULL + * cdef void *__cuTexRefGetMipmapLevelClamp = NULL + * cdef void *__cuTexRefGetMaxAnisotropy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetBorderColor = NULL + * cdef void *__cuTexRefGetFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetMaxAnisotropy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":408 + * cdef void *__cuTexRefGetMipmapLevelClamp = NULL + * cdef void *__cuTexRefGetMaxAnisotropy = NULL + * cdef void *__cuTexRefGetBorderColor = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefGetFlags = NULL + * cdef void *__cuTexRefCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetBorderColor = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":409 + * cdef void *__cuTexRefGetMaxAnisotropy = NULL + * cdef void *__cuTexRefGetBorderColor = NULL + * cdef void *__cuTexRefGetFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefCreate = NULL + * cdef void *__cuTexRefDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefGetFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":410 + * cdef void *__cuTexRefGetBorderColor = NULL + * cdef void *__cuTexRefGetFlags = NULL + * cdef void *__cuTexRefCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexRefDestroy = NULL + * cdef void *__cuSurfRefSetArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":411 + * cdef void *__cuTexRefGetFlags = NULL + * cdef void *__cuTexRefCreate = NULL + * cdef void *__cuTexRefDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSurfRefSetArray = NULL + * cdef void *__cuSurfRefGetArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexRefDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":412 + * cdef void *__cuTexRefCreate = NULL + * cdef void *__cuTexRefDestroy = NULL + * cdef void *__cuSurfRefSetArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSurfRefGetArray = NULL + * cdef void *__cuTexObjectCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefSetArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":413 + * cdef void *__cuTexRefDestroy = NULL + * cdef void *__cuSurfRefSetArray = NULL + * cdef void *__cuSurfRefGetArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexObjectCreate = NULL + * cdef void *__cuTexObjectDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfRefGetArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":414 + * cdef void *__cuSurfRefSetArray = NULL + * cdef void *__cuSurfRefGetArray = NULL + * cdef void *__cuTexObjectCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexObjectDestroy = NULL + * cdef void *__cuTexObjectGetResourceDesc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":415 + * cdef void *__cuSurfRefGetArray = NULL + * cdef void *__cuTexObjectCreate = NULL + * cdef void *__cuTexObjectDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexObjectGetResourceDesc = NULL + * cdef void *__cuTexObjectGetTextureDesc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":416 + * cdef void *__cuTexObjectCreate = NULL + * cdef void *__cuTexObjectDestroy = NULL + * cdef void *__cuTexObjectGetResourceDesc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexObjectGetTextureDesc = NULL + * cdef void *__cuTexObjectGetResourceViewDesc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceDesc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":417 + * cdef void *__cuTexObjectDestroy = NULL + * cdef void *__cuTexObjectGetResourceDesc = NULL + * cdef void *__cuTexObjectGetTextureDesc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTexObjectGetResourceViewDesc = NULL + * cdef void *__cuSurfObjectCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetTextureDesc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":418 + * cdef void *__cuTexObjectGetResourceDesc = NULL + * cdef void *__cuTexObjectGetTextureDesc = NULL + * cdef void *__cuTexObjectGetResourceViewDesc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSurfObjectCreate = NULL + * cdef void *__cuSurfObjectDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTexObjectGetResourceViewDesc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":419 + * cdef void *__cuTexObjectGetTextureDesc = NULL + * cdef void *__cuTexObjectGetResourceViewDesc = NULL + * cdef void *__cuSurfObjectCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSurfObjectDestroy = NULL + * cdef void *__cuSurfObjectGetResourceDesc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":420 + * cdef void *__cuTexObjectGetResourceViewDesc = NULL + * cdef void *__cuSurfObjectCreate = NULL + * cdef void *__cuSurfObjectDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuSurfObjectGetResourceDesc = NULL + * cdef void *__cuTensorMapEncodeTiled = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":421 + * cdef void *__cuSurfObjectCreate = NULL + * cdef void *__cuSurfObjectDestroy = NULL + * cdef void *__cuSurfObjectGetResourceDesc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTensorMapEncodeTiled = NULL + * cdef void *__cuTensorMapEncodeIm2col = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuSurfObjectGetResourceDesc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":422 + * cdef void *__cuSurfObjectDestroy = NULL + * cdef void *__cuSurfObjectGetResourceDesc = NULL + * cdef void *__cuTensorMapEncodeTiled = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTensorMapEncodeIm2col = NULL + * cdef void *__cuTensorMapEncodeIm2colWide = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeTiled = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":423 + * cdef void *__cuSurfObjectGetResourceDesc = NULL + * cdef void *__cuTensorMapEncodeTiled = NULL + * cdef void *__cuTensorMapEncodeIm2col = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTensorMapEncodeIm2colWide = NULL + * cdef void *__cuTensorMapReplaceAddress = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2col = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":424 + * cdef void *__cuTensorMapEncodeTiled = NULL + * cdef void *__cuTensorMapEncodeIm2col = NULL + * cdef void *__cuTensorMapEncodeIm2colWide = NULL # <<<<<<<<<<<<<< + * cdef void *__cuTensorMapReplaceAddress = NULL + * cdef void *__cuDeviceCanAccessPeer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapEncodeIm2colWide = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":425 + * cdef void *__cuTensorMapEncodeIm2col = NULL + * cdef void *__cuTensorMapEncodeIm2colWide = NULL + * cdef void *__cuTensorMapReplaceAddress = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceCanAccessPeer = NULL + * cdef void *__cuCtxEnablePeerAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuTensorMapReplaceAddress = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":426 + * cdef void *__cuTensorMapEncodeIm2colWide = NULL + * cdef void *__cuTensorMapReplaceAddress = NULL + * cdef void *__cuDeviceCanAccessPeer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxEnablePeerAccess = NULL + * cdef void *__cuCtxDisablePeerAccess = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceCanAccessPeer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":427 + * cdef void *__cuTensorMapReplaceAddress = NULL + * cdef void *__cuDeviceCanAccessPeer = NULL + * cdef void *__cuCtxEnablePeerAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxDisablePeerAccess = NULL + * cdef void *__cuDeviceGetP2PAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxEnablePeerAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":428 + * cdef void *__cuDeviceCanAccessPeer = NULL + * cdef void *__cuCtxEnablePeerAccess = NULL + * cdef void *__cuCtxDisablePeerAccess = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetP2PAttribute = NULL + * cdef void *__cuGraphicsUnregisterResource = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxDisablePeerAccess = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":429 + * cdef void *__cuCtxEnablePeerAccess = NULL + * cdef void *__cuCtxDisablePeerAccess = NULL + * cdef void *__cuDeviceGetP2PAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsUnregisterResource = NULL + * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetP2PAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":430 + * cdef void *__cuCtxDisablePeerAccess = NULL + * cdef void *__cuDeviceGetP2PAttribute = NULL + * cdef void *__cuGraphicsUnregisterResource = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnregisterResource = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":431 + * cdef void *__cuDeviceGetP2PAttribute = NULL + * cdef void *__cuGraphicsUnregisterResource = NULL + * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsSubResourceGetMappedArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":432 + * cdef void *__cuGraphicsUnregisterResource = NULL + * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL + * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedMipmappedArray = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":433 + * cdef void *__cuGraphicsSubResourceGetMappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL + * cdef void *__cuGraphicsMapResources = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedPointer_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":434 + * cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL + * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL + * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsMapResources = NULL + * cdef void *__cuGraphicsUnmapResources = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceSetMapFlags_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":435 + * cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL + * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL + * cdef void *__cuGraphicsMapResources = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsUnmapResources = NULL + * cdef void *__cuGetProcAddress_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsMapResources = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":436 + * cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL + * cdef void *__cuGraphicsMapResources = NULL + * cdef void *__cuGraphicsUnmapResources = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGetProcAddress_v2 = NULL + * cdef void *__cuCoredumpGetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsUnmapResources = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":437 + * cdef void *__cuGraphicsMapResources = NULL + * cdef void *__cuGraphicsUnmapResources = NULL + * cdef void *__cuGetProcAddress_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCoredumpGetAttribute = NULL + * cdef void *__cuCoredumpGetAttributeGlobal = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetProcAddress_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":438 + * cdef void *__cuGraphicsUnmapResources = NULL + * cdef void *__cuGetProcAddress_v2 = NULL + * cdef void *__cuCoredumpGetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCoredumpGetAttributeGlobal = NULL + * cdef void *__cuCoredumpSetAttribute = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":439 + * cdef void *__cuGetProcAddress_v2 = NULL + * cdef void *__cuCoredumpGetAttribute = NULL + * cdef void *__cuCoredumpGetAttributeGlobal = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCoredumpSetAttribute = NULL + * cdef void *__cuCoredumpSetAttributeGlobal = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpGetAttributeGlobal = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":440 + * cdef void *__cuCoredumpGetAttribute = NULL + * cdef void *__cuCoredumpGetAttributeGlobal = NULL + * cdef void *__cuCoredumpSetAttribute = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCoredumpSetAttributeGlobal = NULL + * cdef void *__cuGetExportTable = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttribute = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":441 + * cdef void *__cuCoredumpGetAttributeGlobal = NULL + * cdef void *__cuCoredumpSetAttribute = NULL + * cdef void *__cuCoredumpSetAttributeGlobal = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGetExportTable = NULL + * cdef void *__cuGreenCtxCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCoredumpSetAttributeGlobal = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":442 + * cdef void *__cuCoredumpSetAttribute = NULL + * cdef void *__cuCoredumpSetAttributeGlobal = NULL + * cdef void *__cuGetExportTable = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxCreate = NULL + * cdef void *__cuGreenCtxDestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGetExportTable = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":443 + * cdef void *__cuCoredumpSetAttributeGlobal = NULL + * cdef void *__cuGetExportTable = NULL + * cdef void *__cuGreenCtxCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxDestroy = NULL + * cdef void *__cuCtxFromGreenCtx = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":444 + * cdef void *__cuGetExportTable = NULL + * cdef void *__cuGreenCtxCreate = NULL + * cdef void *__cuGreenCtxDestroy = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxFromGreenCtx = NULL + * cdef void *__cuDeviceGetDevResource = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxDestroy = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":445 + * cdef void *__cuGreenCtxCreate = NULL + * cdef void *__cuGreenCtxDestroy = NULL + * cdef void *__cuCtxFromGreenCtx = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDeviceGetDevResource = NULL + * cdef void *__cuCtxGetDevResource = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxFromGreenCtx = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":446 + * cdef void *__cuGreenCtxDestroy = NULL + * cdef void *__cuCtxFromGreenCtx = NULL + * cdef void *__cuDeviceGetDevResource = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCtxGetDevResource = NULL + * cdef void *__cuGreenCtxGetDevResource = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDeviceGetDevResource = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":447 + * cdef void *__cuCtxFromGreenCtx = NULL + * cdef void *__cuDeviceGetDevResource = NULL + * cdef void *__cuCtxGetDevResource = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxGetDevResource = NULL + * cdef void *__cuDevSmResourceSplitByCount = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCtxGetDevResource = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":448 + * cdef void *__cuDeviceGetDevResource = NULL + * cdef void *__cuCtxGetDevResource = NULL + * cdef void *__cuGreenCtxGetDevResource = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevSmResourceSplitByCount = NULL + * cdef void *__cuDevResourceGenerateDesc = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxGetDevResource = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":449 + * cdef void *__cuCtxGetDevResource = NULL + * cdef void *__cuGreenCtxGetDevResource = NULL + * cdef void *__cuDevSmResourceSplitByCount = NULL # <<<<<<<<<<<<<< + * cdef void *__cuDevResourceGenerateDesc = NULL + * cdef void *__cuGreenCtxRecordEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevSmResourceSplitByCount = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":450 + * cdef void *__cuGreenCtxGetDevResource = NULL + * cdef void *__cuDevSmResourceSplitByCount = NULL + * cdef void *__cuDevResourceGenerateDesc = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxRecordEvent = NULL + * cdef void *__cuGreenCtxWaitEvent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuDevResourceGenerateDesc = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":451 + * cdef void *__cuDevSmResourceSplitByCount = NULL + * cdef void *__cuDevResourceGenerateDesc = NULL + * cdef void *__cuGreenCtxRecordEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxWaitEvent = NULL + * cdef void *__cuStreamGetGreenCtx = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxRecordEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":452 + * cdef void *__cuDevResourceGenerateDesc = NULL + * cdef void *__cuGreenCtxRecordEvent = NULL + * cdef void *__cuGreenCtxWaitEvent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuStreamGetGreenCtx = NULL + * cdef void *__cuGreenCtxStreamCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxWaitEvent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":453 + * cdef void *__cuGreenCtxRecordEvent = NULL + * cdef void *__cuGreenCtxWaitEvent = NULL + * cdef void *__cuStreamGetGreenCtx = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGreenCtxStreamCreate = NULL + * cdef void *__cuLogsRegisterCallback = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuStreamGetGreenCtx = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":454 + * cdef void *__cuGreenCtxWaitEvent = NULL + * cdef void *__cuStreamGetGreenCtx = NULL + * cdef void *__cuGreenCtxStreamCreate = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLogsRegisterCallback = NULL + * cdef void *__cuLogsUnregisterCallback = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGreenCtxStreamCreate = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":455 + * cdef void *__cuStreamGetGreenCtx = NULL + * cdef void *__cuGreenCtxStreamCreate = NULL + * cdef void *__cuLogsRegisterCallback = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLogsUnregisterCallback = NULL + * cdef void *__cuLogsCurrent = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsRegisterCallback = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":456 + * cdef void *__cuGreenCtxStreamCreate = NULL + * cdef void *__cuLogsRegisterCallback = NULL + * cdef void *__cuLogsUnregisterCallback = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLogsCurrent = NULL + * cdef void *__cuLogsDumpToFile = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsUnregisterCallback = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":457 + * cdef void *__cuLogsRegisterCallback = NULL + * cdef void *__cuLogsUnregisterCallback = NULL + * cdef void *__cuLogsCurrent = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLogsDumpToFile = NULL + * cdef void *__cuLogsDumpToMemory = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsCurrent = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":458 + * cdef void *__cuLogsUnregisterCallback = NULL + * cdef void *__cuLogsCurrent = NULL + * cdef void *__cuLogsDumpToFile = NULL # <<<<<<<<<<<<<< + * cdef void *__cuLogsDumpToMemory = NULL + * cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToFile = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":459 + * cdef void *__cuLogsCurrent = NULL + * cdef void *__cuLogsDumpToFile = NULL + * cdef void *__cuLogsDumpToMemory = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL + * cdef void *__cuCheckpointProcessGetState = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuLogsDumpToMemory = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":460 + * cdef void *__cuLogsDumpToFile = NULL + * cdef void *__cuLogsDumpToMemory = NULL + * cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessGetState = NULL + * cdef void *__cuCheckpointProcessLock = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetRestoreThreadId = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":461 + * cdef void *__cuLogsDumpToMemory = NULL + * cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL + * cdef void *__cuCheckpointProcessGetState = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessLock = NULL + * cdef void *__cuCheckpointProcessCheckpoint = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessGetState = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":462 + * cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL + * cdef void *__cuCheckpointProcessGetState = NULL + * cdef void *__cuCheckpointProcessLock = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessCheckpoint = NULL + * cdef void *__cuCheckpointProcessRestore = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessLock = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":463 + * cdef void *__cuCheckpointProcessGetState = NULL + * cdef void *__cuCheckpointProcessLock = NULL + * cdef void *__cuCheckpointProcessCheckpoint = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessRestore = NULL + * cdef void *__cuCheckpointProcessUnlock = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessCheckpoint = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":464 + * cdef void *__cuCheckpointProcessLock = NULL + * cdef void *__cuCheckpointProcessCheckpoint = NULL + * cdef void *__cuCheckpointProcessRestore = NULL # <<<<<<<<<<<<<< + * cdef void *__cuCheckpointProcessUnlock = NULL + * cdef void *__cuProfilerStart = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessRestore = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":465 + * cdef void *__cuCheckpointProcessCheckpoint = NULL + * cdef void *__cuCheckpointProcessRestore = NULL + * cdef void *__cuCheckpointProcessUnlock = NULL # <<<<<<<<<<<<<< + * cdef void *__cuProfilerStart = NULL + * cdef void *__cuProfilerStop = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuCheckpointProcessUnlock = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":466 + * cdef void *__cuCheckpointProcessRestore = NULL + * cdef void *__cuCheckpointProcessUnlock = NULL + * cdef void *__cuProfilerStart = NULL # <<<<<<<<<<<<<< + * cdef void *__cuProfilerStop = NULL + * cdef void *__cuGraphicsEGLRegisterImage = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStart = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":467 + * cdef void *__cuCheckpointProcessUnlock = NULL + * cdef void *__cuProfilerStart = NULL + * cdef void *__cuProfilerStop = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsEGLRegisterImage = NULL + * cdef void *__cuEGLStreamConsumerConnect = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuProfilerStop = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":468 + * cdef void *__cuProfilerStart = NULL + * cdef void *__cuProfilerStop = NULL + * cdef void *__cuGraphicsEGLRegisterImage = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamConsumerConnect = NULL + * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsEGLRegisterImage = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":469 + * cdef void *__cuProfilerStop = NULL + * cdef void *__cuGraphicsEGLRegisterImage = NULL + * cdef void *__cuEGLStreamConsumerConnect = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL + * cdef void *__cuEGLStreamConsumerDisconnect = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnect = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":470 + * cdef void *__cuGraphicsEGLRegisterImage = NULL + * cdef void *__cuEGLStreamConsumerConnect = NULL + * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamConsumerDisconnect = NULL + * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerConnectWithFlags = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":471 + * cdef void *__cuEGLStreamConsumerConnect = NULL + * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL + * cdef void *__cuEGLStreamConsumerDisconnect = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL + * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerDisconnect = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":472 + * cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL + * cdef void *__cuEGLStreamConsumerDisconnect = NULL + * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL + * cdef void *__cuEGLStreamProducerConnect = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerAcquireFrame = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":473 + * cdef void *__cuEGLStreamConsumerDisconnect = NULL + * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL + * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamProducerConnect = NULL + * cdef void *__cuEGLStreamProducerDisconnect = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamConsumerReleaseFrame = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":474 + * cdef void *__cuEGLStreamConsumerAcquireFrame = NULL + * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL + * cdef void *__cuEGLStreamProducerConnect = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamProducerDisconnect = NULL + * cdef void *__cuEGLStreamProducerPresentFrame = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerConnect = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":475 + * cdef void *__cuEGLStreamConsumerReleaseFrame = NULL + * cdef void *__cuEGLStreamProducerConnect = NULL + * cdef void *__cuEGLStreamProducerDisconnect = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamProducerPresentFrame = NULL + * cdef void *__cuEGLStreamProducerReturnFrame = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerDisconnect = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":476 + * cdef void *__cuEGLStreamProducerConnect = NULL + * cdef void *__cuEGLStreamProducerDisconnect = NULL + * cdef void *__cuEGLStreamProducerPresentFrame = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEGLStreamProducerReturnFrame = NULL + * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerPresentFrame = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":477 + * cdef void *__cuEGLStreamProducerDisconnect = NULL + * cdef void *__cuEGLStreamProducerPresentFrame = NULL + * cdef void *__cuEGLStreamProducerReturnFrame = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL + * cdef void *__cuEventCreateFromEGLSync = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEGLStreamProducerReturnFrame = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":478 + * cdef void *__cuEGLStreamProducerPresentFrame = NULL + * cdef void *__cuEGLStreamProducerReturnFrame = NULL + * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL # <<<<<<<<<<<<<< + * cdef void *__cuEventCreateFromEGLSync = NULL + * cdef void *__cuGraphicsGLRegisterBuffer = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsResourceGetMappedEglFrame = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":479 + * cdef void *__cuEGLStreamProducerReturnFrame = NULL + * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL + * cdef void *__cuEventCreateFromEGLSync = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsGLRegisterBuffer = NULL + * cdef void *__cuGraphicsGLRegisterImage = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuEventCreateFromEGLSync = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":480 + * cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL + * cdef void *__cuEventCreateFromEGLSync = NULL + * cdef void *__cuGraphicsGLRegisterBuffer = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsGLRegisterImage = NULL + * cdef void *__cuGLGetDevices_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterBuffer = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":481 + * cdef void *__cuEventCreateFromEGLSync = NULL + * cdef void *__cuGraphicsGLRegisterBuffer = NULL + * cdef void *__cuGraphicsGLRegisterImage = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGLGetDevices_v2 = NULL + * cdef void *__cuVDPAUGetDevice = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsGLRegisterImage = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":482 + * cdef void *__cuGraphicsGLRegisterBuffer = NULL + * cdef void *__cuGraphicsGLRegisterImage = NULL + * cdef void *__cuGLGetDevices_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuVDPAUGetDevice = NULL + * cdef void *__cuVDPAUCtxCreate_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGLGetDevices_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":483 + * cdef void *__cuGraphicsGLRegisterImage = NULL + * cdef void *__cuGLGetDevices_v2 = NULL + * cdef void *__cuVDPAUGetDevice = NULL # <<<<<<<<<<<<<< + * cdef void *__cuVDPAUCtxCreate_v2 = NULL + * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUGetDevice = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":484 + * cdef void *__cuGLGetDevices_v2 = NULL + * cdef void *__cuVDPAUGetDevice = NULL + * cdef void *__cuVDPAUCtxCreate_v2 = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL + * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuVDPAUCtxCreate_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":485 + * cdef void *__cuVDPAUGetDevice = NULL + * cdef void *__cuVDPAUCtxCreate_v2 = NULL + * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL # <<<<<<<<<<<<<< + * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterVideoSurface = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":486 + * cdef void *__cuVDPAUCtxCreate_v2 = NULL + * cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL + * cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL # <<<<<<<<<<<<<< + * + * # To make cuPythonInit reentrant +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver___cuGraphicsVDPAURegisterOutputSurface = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":490 + * # To make cuPythonInit reentrant + * ctypedef CUresult (*__cuGetProcAddress_v2_T)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) except?CUDA_ERROR_NOT_FOUND nogil + * cdef __cuGetProcAddress_v2_T _F_cuGetProcAddress_v2 = NULL # <<<<<<<<<<<<<< + * + * cdef int _cuPythonInit() except -1 nogil: +*/ + __pyx_v_4cuda_8bindings_9_bindings_8cydriver__F_cuGetProcAddress_v2 = NULL; + + /* "cuda/bindings/_bindings/cydriver.pyx":7036 + * return err + * + * cdef dict func_ptrs = None # <<<<<<<<<<<<<< + * + * cpdef dict _inspect_function_pointers(): +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_8cydriver_func_ptrs, ((PyObject*)Py_None)); + __Pyx_GIVEREF(Py_None); + + /* "cuda/bindings/_bindings/cydriver.pyx":7038 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_bindings_8cydriver_1_inspect_function_pointers, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__bindings_cydriver, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, __pyx_t_2) < (0)) __PYX_ERR(0, 7038, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":7996 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_bindings_8cydriver_3_inspect_function_pointer, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__bindings_cydriver, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, __pyx_t_2) < (0)) __PYX_ERR(0, 7996, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cydriver.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._bindings.cydriver", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._bindings.cydriver"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 179 <= 65535 + const unsigned short n; +#elif 179 / 2 < INT_MAX + const unsigned int n; +#elif 179 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA, sizeof(__pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA */ + {__pyx_k_Failed_to_dlopen, sizeof(__pyx_k_Failed_to_dlopen), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_dlopen */ + {__pyx_k_Function_cuArray3DCreate_v2_not, sizeof(__pyx_k_Function_cuArray3DCreate_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArray3DCreate_v2_not */ + {__pyx_k_Function_cuArray3DGetDescriptor, sizeof(__pyx_k_Function_cuArray3DGetDescriptor), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArray3DGetDescriptor */ + {__pyx_k_Function_cuArrayCreate_v2_not_fo, sizeof(__pyx_k_Function_cuArrayCreate_v2_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayCreate_v2_not_fo */ + {__pyx_k_Function_cuArrayDestroy_not_foun, sizeof(__pyx_k_Function_cuArrayDestroy_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayDestroy_not_foun */ + {__pyx_k_Function_cuArrayGetDescriptor_v2, sizeof(__pyx_k_Function_cuArrayGetDescriptor_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayGetDescriptor_v2 */ + {__pyx_k_Function_cuArrayGetMemoryRequire, sizeof(__pyx_k_Function_cuArrayGetMemoryRequire), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayGetMemoryRequire */ + {__pyx_k_Function_cuArrayGetPlane_not_fou, sizeof(__pyx_k_Function_cuArrayGetPlane_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayGetPlane_not_fou */ + {__pyx_k_Function_cuArrayGetSparsePropert, sizeof(__pyx_k_Function_cuArrayGetSparsePropert), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuArrayGetSparsePropert */ + {__pyx_k_Function_cuCheckpointProcessChec, sizeof(__pyx_k_Function_cuCheckpointProcessChec), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessChec */ + {__pyx_k_Function_cuCheckpointProcessGetR, sizeof(__pyx_k_Function_cuCheckpointProcessGetR), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessGetR */ + {__pyx_k_Function_cuCheckpointProcessGetS, sizeof(__pyx_k_Function_cuCheckpointProcessGetS), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessGetS */ + {__pyx_k_Function_cuCheckpointProcessLock, sizeof(__pyx_k_Function_cuCheckpointProcessLock), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessLock */ + {__pyx_k_Function_cuCheckpointProcessRest, sizeof(__pyx_k_Function_cuCheckpointProcessRest), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessRest */ + {__pyx_k_Function_cuCheckpointProcessUnlo, sizeof(__pyx_k_Function_cuCheckpointProcessUnlo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCheckpointProcessUnlo */ + {__pyx_k_Function_cuCoredumpGetAttribute, sizeof(__pyx_k_Function_cuCoredumpGetAttribute), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCoredumpGetAttribute */ + {__pyx_k_Function_cuCoredumpGetAttributeG, sizeof(__pyx_k_Function_cuCoredumpGetAttributeG), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCoredumpGetAttributeG */ + {__pyx_k_Function_cuCoredumpSetAttribute, sizeof(__pyx_k_Function_cuCoredumpSetAttribute), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCoredumpSetAttribute */ + {__pyx_k_Function_cuCoredumpSetAttributeG, sizeof(__pyx_k_Function_cuCoredumpSetAttributeG), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCoredumpSetAttributeG */ + {__pyx_k_Function_cuCtxAttach_not_found, sizeof(__pyx_k_Function_cuCtxAttach_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxAttach_not_found */ + {__pyx_k_Function_cuCtxCreate_v2_not_foun, sizeof(__pyx_k_Function_cuCtxCreate_v2_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxCreate_v2_not_foun */ + {__pyx_k_Function_cuCtxCreate_v3_not_foun, sizeof(__pyx_k_Function_cuCtxCreate_v3_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxCreate_v3_not_foun */ + {__pyx_k_Function_cuCtxCreate_v4_not_foun, sizeof(__pyx_k_Function_cuCtxCreate_v4_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxCreate_v4_not_foun */ + {__pyx_k_Function_cuCtxDestroy_v2_not_fou, sizeof(__pyx_k_Function_cuCtxDestroy_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxDestroy_v2_not_fou */ + {__pyx_k_Function_cuCtxDetach_not_found, sizeof(__pyx_k_Function_cuCtxDetach_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxDetach_not_found */ + {__pyx_k_Function_cuCtxDisablePeerAccess, sizeof(__pyx_k_Function_cuCtxDisablePeerAccess), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxDisablePeerAccess */ + {__pyx_k_Function_cuCtxEnablePeerAccess_n, sizeof(__pyx_k_Function_cuCtxEnablePeerAccess_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxEnablePeerAccess_n */ + {__pyx_k_Function_cuCtxFromGreenCtx_not_f, sizeof(__pyx_k_Function_cuCtxFromGreenCtx_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxFromGreenCtx_not_f */ + {__pyx_k_Function_cuCtxGetApiVersion_not, sizeof(__pyx_k_Function_cuCtxGetApiVersion_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetApiVersion_not */ + {__pyx_k_Function_cuCtxGetCacheConfig_not, sizeof(__pyx_k_Function_cuCtxGetCacheConfig_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetCacheConfig_not */ + {__pyx_k_Function_cuCtxGetCurrent_not_fou, sizeof(__pyx_k_Function_cuCtxGetCurrent_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetCurrent_not_fou */ + {__pyx_k_Function_cuCtxGetDevResource_not, sizeof(__pyx_k_Function_cuCtxGetDevResource_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetDevResource_not */ + {__pyx_k_Function_cuCtxGetDevice_not_foun, sizeof(__pyx_k_Function_cuCtxGetDevice_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetDevice_not_foun */ + {__pyx_k_Function_cuCtxGetExecAffinity_no, sizeof(__pyx_k_Function_cuCtxGetExecAffinity_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetExecAffinity_no */ + {__pyx_k_Function_cuCtxGetFlags_not_found, sizeof(__pyx_k_Function_cuCtxGetFlags_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetFlags_not_found */ + {__pyx_k_Function_cuCtxGetId_not_found, sizeof(__pyx_k_Function_cuCtxGetId_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetId_not_found */ + {__pyx_k_Function_cuCtxGetLimit_not_found, sizeof(__pyx_k_Function_cuCtxGetLimit_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetLimit_not_found */ + {__pyx_k_Function_cuCtxGetSharedMemConfig, sizeof(__pyx_k_Function_cuCtxGetSharedMemConfig), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetSharedMemConfig */ + {__pyx_k_Function_cuCtxGetStreamPriorityR, sizeof(__pyx_k_Function_cuCtxGetStreamPriorityR), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxGetStreamPriorityR */ + {__pyx_k_Function_cuCtxPopCurrent_v2_not, sizeof(__pyx_k_Function_cuCtxPopCurrent_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxPopCurrent_v2_not */ + {__pyx_k_Function_cuCtxPushCurrent_v2_not, sizeof(__pyx_k_Function_cuCtxPushCurrent_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxPushCurrent_v2_not */ + {__pyx_k_Function_cuCtxRecordEvent_not_fo, sizeof(__pyx_k_Function_cuCtxRecordEvent_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxRecordEvent_not_fo */ + {__pyx_k_Function_cuCtxResetPersistingL2C, sizeof(__pyx_k_Function_cuCtxResetPersistingL2C), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxResetPersistingL2C */ + {__pyx_k_Function_cuCtxSetCacheConfig_not, sizeof(__pyx_k_Function_cuCtxSetCacheConfig_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSetCacheConfig_not */ + {__pyx_k_Function_cuCtxSetCurrent_not_fou, sizeof(__pyx_k_Function_cuCtxSetCurrent_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSetCurrent_not_fou */ + {__pyx_k_Function_cuCtxSetFlags_not_found, sizeof(__pyx_k_Function_cuCtxSetFlags_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSetFlags_not_found */ + {__pyx_k_Function_cuCtxSetLimit_not_found, sizeof(__pyx_k_Function_cuCtxSetLimit_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSetLimit_not_found */ + {__pyx_k_Function_cuCtxSetSharedMemConfig, sizeof(__pyx_k_Function_cuCtxSetSharedMemConfig), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSetSharedMemConfig */ + {__pyx_k_Function_cuCtxSynchronize_not_fo, sizeof(__pyx_k_Function_cuCtxSynchronize_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxSynchronize_not_fo */ + {__pyx_k_Function_cuCtxWaitEvent_not_foun, sizeof(__pyx_k_Function_cuCtxWaitEvent_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuCtxWaitEvent_not_foun */ + {__pyx_k_Function_cuDestroyExternalMemory, sizeof(__pyx_k_Function_cuDestroyExternalMemory), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDestroyExternalMemory */ + {__pyx_k_Function_cuDestroyExternalSemaph, sizeof(__pyx_k_Function_cuDestroyExternalSemaph), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDestroyExternalSemaph */ + {__pyx_k_Function_cuDevResourceGenerateDe, sizeof(__pyx_k_Function_cuDevResourceGenerateDe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevResourceGenerateDe */ + {__pyx_k_Function_cuDevSmResourceSplitByC, sizeof(__pyx_k_Function_cuDevSmResourceSplitByC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevSmResourceSplitByC */ + {__pyx_k_Function_cuDeviceCanAccessPeer_n, sizeof(__pyx_k_Function_cuDeviceCanAccessPeer_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceCanAccessPeer_n */ + {__pyx_k_Function_cuDeviceComputeCapabili, sizeof(__pyx_k_Function_cuDeviceComputeCapabili), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceComputeCapabili */ + {__pyx_k_Function_cuDeviceGetAttribute_no, sizeof(__pyx_k_Function_cuDeviceGetAttribute_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetAttribute_no */ + {__pyx_k_Function_cuDeviceGetByPCIBusId_n, sizeof(__pyx_k_Function_cuDeviceGetByPCIBusId_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetByPCIBusId_n */ + {__pyx_k_Function_cuDeviceGetCount_not_fo, sizeof(__pyx_k_Function_cuDeviceGetCount_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetCount_not_fo */ + {__pyx_k_Function_cuDeviceGetDefaultMemPo, sizeof(__pyx_k_Function_cuDeviceGetDefaultMemPo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetDefaultMemPo */ + {__pyx_k_Function_cuDeviceGetDevResource, sizeof(__pyx_k_Function_cuDeviceGetDevResource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetDevResource */ + {__pyx_k_Function_cuDeviceGetExecAffinity, sizeof(__pyx_k_Function_cuDeviceGetExecAffinity), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetExecAffinity */ + {__pyx_k_Function_cuDeviceGetGraphMemAttr, sizeof(__pyx_k_Function_cuDeviceGetGraphMemAttr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetGraphMemAttr */ + {__pyx_k_Function_cuDeviceGetLuid_not_fou, sizeof(__pyx_k_Function_cuDeviceGetLuid_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetLuid_not_fou */ + {__pyx_k_Function_cuDeviceGetMemPool_not, sizeof(__pyx_k_Function_cuDeviceGetMemPool_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetMemPool_not */ + {__pyx_k_Function_cuDeviceGetName_not_fou, sizeof(__pyx_k_Function_cuDeviceGetName_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetName_not_fou */ + {__pyx_k_Function_cuDeviceGetNvSciSyncAtt, sizeof(__pyx_k_Function_cuDeviceGetNvSciSyncAtt), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetNvSciSyncAtt */ + {__pyx_k_Function_cuDeviceGetP2PAttribute, sizeof(__pyx_k_Function_cuDeviceGetP2PAttribute), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetP2PAttribute */ + {__pyx_k_Function_cuDeviceGetPCIBusId_not, sizeof(__pyx_k_Function_cuDeviceGetPCIBusId_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetPCIBusId_not */ + {__pyx_k_Function_cuDeviceGetProperties_n, sizeof(__pyx_k_Function_cuDeviceGetProperties_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetProperties_n */ + {__pyx_k_Function_cuDeviceGetTexture1DLin, sizeof(__pyx_k_Function_cuDeviceGetTexture1DLin), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetTexture1DLin */ + {__pyx_k_Function_cuDeviceGetUuid_not_fou, sizeof(__pyx_k_Function_cuDeviceGetUuid_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetUuid_not_fou */ + {__pyx_k_Function_cuDeviceGetUuid_v2_not, sizeof(__pyx_k_Function_cuDeviceGetUuid_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGetUuid_v2_not */ + {__pyx_k_Function_cuDeviceGet_not_found, sizeof(__pyx_k_Function_cuDeviceGet_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGet_not_found */ + {__pyx_k_Function_cuDeviceGraphMemTrim_no, sizeof(__pyx_k_Function_cuDeviceGraphMemTrim_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceGraphMemTrim_no */ + {__pyx_k_Function_cuDevicePrimaryCtxGetSt, sizeof(__pyx_k_Function_cuDevicePrimaryCtxGetSt), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevicePrimaryCtxGetSt */ + {__pyx_k_Function_cuDevicePrimaryCtxRelea, sizeof(__pyx_k_Function_cuDevicePrimaryCtxRelea), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevicePrimaryCtxRelea */ + {__pyx_k_Function_cuDevicePrimaryCtxReset, sizeof(__pyx_k_Function_cuDevicePrimaryCtxReset), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevicePrimaryCtxReset */ + {__pyx_k_Function_cuDevicePrimaryCtxRetai, sizeof(__pyx_k_Function_cuDevicePrimaryCtxRetai), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevicePrimaryCtxRetai */ + {__pyx_k_Function_cuDevicePrimaryCtxSetFl, sizeof(__pyx_k_Function_cuDevicePrimaryCtxSetFl), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDevicePrimaryCtxSetFl */ + {__pyx_k_Function_cuDeviceRegisterAsyncNo, sizeof(__pyx_k_Function_cuDeviceRegisterAsyncNo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceRegisterAsyncNo */ + {__pyx_k_Function_cuDeviceSetGraphMemAttr, sizeof(__pyx_k_Function_cuDeviceSetGraphMemAttr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceSetGraphMemAttr */ + {__pyx_k_Function_cuDeviceSetMemPool_not, sizeof(__pyx_k_Function_cuDeviceSetMemPool_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceSetMemPool_not */ + {__pyx_k_Function_cuDeviceTotalMem_v2_not, sizeof(__pyx_k_Function_cuDeviceTotalMem_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceTotalMem_v2_not */ + {__pyx_k_Function_cuDeviceUnregisterAsync, sizeof(__pyx_k_Function_cuDeviceUnregisterAsync), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDeviceUnregisterAsync */ + {__pyx_k_Function_cuDriverGetVersion_not, sizeof(__pyx_k_Function_cuDriverGetVersion_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuDriverGetVersion_not */ + {__pyx_k_Function_cuEGLStreamConsumerAcqu, sizeof(__pyx_k_Function_cuEGLStreamConsumerAcqu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamConsumerAcqu */ + {__pyx_k_Function_cuEGLStreamConsumerConn, sizeof(__pyx_k_Function_cuEGLStreamConsumerConn), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamConsumerConn */ + {__pyx_k_Function_cuEGLStreamConsumerConn_2, sizeof(__pyx_k_Function_cuEGLStreamConsumerConn_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamConsumerConn_2 */ + {__pyx_k_Function_cuEGLStreamConsumerDisc, sizeof(__pyx_k_Function_cuEGLStreamConsumerDisc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamConsumerDisc */ + {__pyx_k_Function_cuEGLStreamConsumerRele, sizeof(__pyx_k_Function_cuEGLStreamConsumerRele), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamConsumerRele */ + {__pyx_k_Function_cuEGLStreamProducerConn, sizeof(__pyx_k_Function_cuEGLStreamProducerConn), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamProducerConn */ + {__pyx_k_Function_cuEGLStreamProducerDisc, sizeof(__pyx_k_Function_cuEGLStreamProducerDisc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamProducerDisc */ + {__pyx_k_Function_cuEGLStreamProducerPres, sizeof(__pyx_k_Function_cuEGLStreamProducerPres), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamProducerPres */ + {__pyx_k_Function_cuEGLStreamProducerRetu, sizeof(__pyx_k_Function_cuEGLStreamProducerRetu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEGLStreamProducerRetu */ + {__pyx_k_Function_cuEventCreateFromEGLSyn, sizeof(__pyx_k_Function_cuEventCreateFromEGLSyn), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventCreateFromEGLSyn */ + {__pyx_k_Function_cuEventCreate_not_found, sizeof(__pyx_k_Function_cuEventCreate_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventCreate_not_found */ + {__pyx_k_Function_cuEventDestroy_v2_not_f, sizeof(__pyx_k_Function_cuEventDestroy_v2_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventDestroy_v2_not_f */ + {__pyx_k_Function_cuEventElapsedTime_not, sizeof(__pyx_k_Function_cuEventElapsedTime_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventElapsedTime_not */ + {__pyx_k_Function_cuEventElapsedTime_v2_n, sizeof(__pyx_k_Function_cuEventElapsedTime_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventElapsedTime_v2_n */ + {__pyx_k_Function_cuEventQuery_not_found, sizeof(__pyx_k_Function_cuEventQuery_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventQuery_not_found */ + {__pyx_k_Function_cuEventRecordWithFlags, sizeof(__pyx_k_Function_cuEventRecordWithFlags), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventRecordWithFlags */ + {__pyx_k_Function_cuEventRecord_not_found, sizeof(__pyx_k_Function_cuEventRecord_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventRecord_not_found */ + {__pyx_k_Function_cuEventSynchronize_not, sizeof(__pyx_k_Function_cuEventSynchronize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuEventSynchronize_not */ + {__pyx_k_Function_cuExternalMemoryGetMapp, sizeof(__pyx_k_Function_cuExternalMemoryGetMapp), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuExternalMemoryGetMapp */ + {__pyx_k_Function_cuExternalMemoryGetMapp_2, sizeof(__pyx_k_Function_cuExternalMemoryGetMapp_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuExternalMemoryGetMapp_2 */ + {__pyx_k_Function_cuFlushGPUDirectRDMAWri, sizeof(__pyx_k_Function_cuFlushGPUDirectRDMAWri), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFlushGPUDirectRDMAWri */ + {__pyx_k_Function_cuFuncGetAttribute_not, sizeof(__pyx_k_Function_cuFuncGetAttribute_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncGetAttribute_not */ + {__pyx_k_Function_cuFuncGetModule_not_fou, sizeof(__pyx_k_Function_cuFuncGetModule_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncGetModule_not_fou */ + {__pyx_k_Function_cuFuncGetName_not_found, sizeof(__pyx_k_Function_cuFuncGetName_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncGetName_not_found */ + {__pyx_k_Function_cuFuncGetParamInfo_not, sizeof(__pyx_k_Function_cuFuncGetParamInfo_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncGetParamInfo_not */ + {__pyx_k_Function_cuFuncIsLoaded_not_foun, sizeof(__pyx_k_Function_cuFuncIsLoaded_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncIsLoaded_not_foun */ + {__pyx_k_Function_cuFuncLoad_not_found, sizeof(__pyx_k_Function_cuFuncLoad_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncLoad_not_found */ + {__pyx_k_Function_cuFuncSetAttribute_not, sizeof(__pyx_k_Function_cuFuncSetAttribute_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncSetAttribute_not */ + {__pyx_k_Function_cuFuncSetBlockShape_not, sizeof(__pyx_k_Function_cuFuncSetBlockShape_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncSetBlockShape_not */ + {__pyx_k_Function_cuFuncSetCacheConfig_no, sizeof(__pyx_k_Function_cuFuncSetCacheConfig_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncSetCacheConfig_no */ + {__pyx_k_Function_cuFuncSetSharedMemConfi, sizeof(__pyx_k_Function_cuFuncSetSharedMemConfi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncSetSharedMemConfi */ + {__pyx_k_Function_cuFuncSetSharedSize_not, sizeof(__pyx_k_Function_cuFuncSetSharedSize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuFuncSetSharedSize_not */ + {__pyx_k_Function_cuGLGetDevices_v2_not_f, sizeof(__pyx_k_Function_cuGLGetDevices_v2_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGLGetDevices_v2_not_f */ + {__pyx_k_Function_cuGetErrorName_not_foun, sizeof(__pyx_k_Function_cuGetErrorName_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGetErrorName_not_foun */ + {__pyx_k_Function_cuGetErrorString_not_fo, sizeof(__pyx_k_Function_cuGetErrorString_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGetErrorString_not_fo */ + {__pyx_k_Function_cuGetExportTable_not_fo, sizeof(__pyx_k_Function_cuGetExportTable_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGetExportTable_not_fo */ + {__pyx_k_Function_cuGetProcAddress_v2_not, sizeof(__pyx_k_Function_cuGetProcAddress_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGetProcAddress_v2_not */ + {__pyx_k_Function_cuGraphAddBatchMemOpNod, sizeof(__pyx_k_Function_cuGraphAddBatchMemOpNod), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddBatchMemOpNod */ + {__pyx_k_Function_cuGraphAddChildGraphNod, sizeof(__pyx_k_Function_cuGraphAddChildGraphNod), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddChildGraphNod */ + {__pyx_k_Function_cuGraphAddDependencies, sizeof(__pyx_k_Function_cuGraphAddDependencies), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddDependencies */ + {__pyx_k_Function_cuGraphAddDependencies_2, sizeof(__pyx_k_Function_cuGraphAddDependencies_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddDependencies_2 */ + {__pyx_k_Function_cuGraphAddEmptyNode_not, sizeof(__pyx_k_Function_cuGraphAddEmptyNode_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddEmptyNode_not */ + {__pyx_k_Function_cuGraphAddEventRecordNo, sizeof(__pyx_k_Function_cuGraphAddEventRecordNo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddEventRecordNo */ + {__pyx_k_Function_cuGraphAddEventWaitNode, sizeof(__pyx_k_Function_cuGraphAddEventWaitNode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddEventWaitNode */ + {__pyx_k_Function_cuGraphAddExternalSemap, sizeof(__pyx_k_Function_cuGraphAddExternalSemap), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddExternalSemap */ + {__pyx_k_Function_cuGraphAddExternalSemap_2, sizeof(__pyx_k_Function_cuGraphAddExternalSemap_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddExternalSemap_2 */ + {__pyx_k_Function_cuGraphAddHostNode_not, sizeof(__pyx_k_Function_cuGraphAddHostNode_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddHostNode_not */ + {__pyx_k_Function_cuGraphAddKernelNode_v2, sizeof(__pyx_k_Function_cuGraphAddKernelNode_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddKernelNode_v2 */ + {__pyx_k_Function_cuGraphAddMemAllocNode, sizeof(__pyx_k_Function_cuGraphAddMemAllocNode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddMemAllocNode */ + {__pyx_k_Function_cuGraphAddMemFreeNode_n, sizeof(__pyx_k_Function_cuGraphAddMemFreeNode_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddMemFreeNode_n */ + {__pyx_k_Function_cuGraphAddMemcpyNode_no, sizeof(__pyx_k_Function_cuGraphAddMemcpyNode_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddMemcpyNode_no */ + {__pyx_k_Function_cuGraphAddMemsetNode_no, sizeof(__pyx_k_Function_cuGraphAddMemsetNode_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddMemsetNode_no */ + {__pyx_k_Function_cuGraphAddNode_not_foun, sizeof(__pyx_k_Function_cuGraphAddNode_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddNode_not_foun */ + {__pyx_k_Function_cuGraphAddNode_v2_not_f, sizeof(__pyx_k_Function_cuGraphAddNode_v2_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphAddNode_v2_not_f */ + {__pyx_k_Function_cuGraphBatchMemOpNodeGe, sizeof(__pyx_k_Function_cuGraphBatchMemOpNodeGe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphBatchMemOpNodeGe */ + {__pyx_k_Function_cuGraphBatchMemOpNodeSe, sizeof(__pyx_k_Function_cuGraphBatchMemOpNodeSe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphBatchMemOpNodeSe */ + {__pyx_k_Function_cuGraphChildGraphNodeGe, sizeof(__pyx_k_Function_cuGraphChildGraphNodeGe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphChildGraphNodeGe */ + {__pyx_k_Function_cuGraphClone_not_found, sizeof(__pyx_k_Function_cuGraphClone_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphClone_not_found */ + {__pyx_k_Function_cuGraphConditionalHandl, sizeof(__pyx_k_Function_cuGraphConditionalHandl), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphConditionalHandl */ + {__pyx_k_Function_cuGraphCreate_not_found, sizeof(__pyx_k_Function_cuGraphCreate_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphCreate_not_found */ + {__pyx_k_Function_cuGraphDebugDotPrint_no, sizeof(__pyx_k_Function_cuGraphDebugDotPrint_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphDebugDotPrint_no */ + {__pyx_k_Function_cuGraphDestroyNode_not, sizeof(__pyx_k_Function_cuGraphDestroyNode_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphDestroyNode_not */ + {__pyx_k_Function_cuGraphDestroy_not_foun, sizeof(__pyx_k_Function_cuGraphDestroy_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphDestroy_not_foun */ + {__pyx_k_Function_cuGraphEventRecordNodeG, sizeof(__pyx_k_Function_cuGraphEventRecordNodeG), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphEventRecordNodeG */ + {__pyx_k_Function_cuGraphEventRecordNodeS, sizeof(__pyx_k_Function_cuGraphEventRecordNodeS), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphEventRecordNodeS */ + {__pyx_k_Function_cuGraphEventWaitNodeGet, sizeof(__pyx_k_Function_cuGraphEventWaitNodeGet), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphEventWaitNodeGet */ + {__pyx_k_Function_cuGraphEventWaitNodeSet, sizeof(__pyx_k_Function_cuGraphEventWaitNodeSet), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphEventWaitNodeSet */ + {__pyx_k_Function_cuGraphExecBatchMemOpNo, sizeof(__pyx_k_Function_cuGraphExecBatchMemOpNo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecBatchMemOpNo */ + {__pyx_k_Function_cuGraphExecChildGraphNo, sizeof(__pyx_k_Function_cuGraphExecChildGraphNo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecChildGraphNo */ + {__pyx_k_Function_cuGraphExecDestroy_not, sizeof(__pyx_k_Function_cuGraphExecDestroy_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecDestroy_not */ + {__pyx_k_Function_cuGraphExecEventRecordN, sizeof(__pyx_k_Function_cuGraphExecEventRecordN), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecEventRecordN */ + {__pyx_k_Function_cuGraphExecEventWaitNod, sizeof(__pyx_k_Function_cuGraphExecEventWaitNod), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecEventWaitNod */ + {__pyx_k_Function_cuGraphExecExternalSema, sizeof(__pyx_k_Function_cuGraphExecExternalSema), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecExternalSema */ + {__pyx_k_Function_cuGraphExecExternalSema_2, sizeof(__pyx_k_Function_cuGraphExecExternalSema_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecExternalSema_2 */ + {__pyx_k_Function_cuGraphExecGetFlags_not, sizeof(__pyx_k_Function_cuGraphExecGetFlags_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecGetFlags_not */ + {__pyx_k_Function_cuGraphExecHostNodeSetP, sizeof(__pyx_k_Function_cuGraphExecHostNodeSetP), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecHostNodeSetP */ + {__pyx_k_Function_cuGraphExecKernelNodeSe, sizeof(__pyx_k_Function_cuGraphExecKernelNodeSe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecKernelNodeSe */ + {__pyx_k_Function_cuGraphExecMemcpyNodeSe, sizeof(__pyx_k_Function_cuGraphExecMemcpyNodeSe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecMemcpyNodeSe */ + {__pyx_k_Function_cuGraphExecMemsetNodeSe, sizeof(__pyx_k_Function_cuGraphExecMemsetNodeSe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecMemsetNodeSe */ + {__pyx_k_Function_cuGraphExecNodeSetParam, sizeof(__pyx_k_Function_cuGraphExecNodeSetParam), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecNodeSetParam */ + {__pyx_k_Function_cuGraphExecUpdate_v2_no, sizeof(__pyx_k_Function_cuGraphExecUpdate_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExecUpdate_v2_no */ + {__pyx_k_Function_cuGraphExternalSemaphor, sizeof(__pyx_k_Function_cuGraphExternalSemaphor), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExternalSemaphor */ + {__pyx_k_Function_cuGraphExternalSemaphor_2, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExternalSemaphor_2 */ + {__pyx_k_Function_cuGraphExternalSemaphor_3, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExternalSemaphor_3 */ + {__pyx_k_Function_cuGraphExternalSemaphor_4, sizeof(__pyx_k_Function_cuGraphExternalSemaphor_4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphExternalSemaphor_4 */ + {__pyx_k_Function_cuGraphGetEdges_not_fou, sizeof(__pyx_k_Function_cuGraphGetEdges_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphGetEdges_not_fou */ + {__pyx_k_Function_cuGraphGetEdges_v2_not, sizeof(__pyx_k_Function_cuGraphGetEdges_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphGetEdges_v2_not */ + {__pyx_k_Function_cuGraphGetNodes_not_fou, sizeof(__pyx_k_Function_cuGraphGetNodes_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphGetNodes_not_fou */ + {__pyx_k_Function_cuGraphGetRootNodes_not, sizeof(__pyx_k_Function_cuGraphGetRootNodes_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphGetRootNodes_not */ + {__pyx_k_Function_cuGraphHostNodeGetParam, sizeof(__pyx_k_Function_cuGraphHostNodeGetParam), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphHostNodeGetParam */ + {__pyx_k_Function_cuGraphHostNodeSetParam, sizeof(__pyx_k_Function_cuGraphHostNodeSetParam), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphHostNodeSetParam */ + {__pyx_k_Function_cuGraphInstantiateWithF, sizeof(__pyx_k_Function_cuGraphInstantiateWithF), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphInstantiateWithF */ + {__pyx_k_Function_cuGraphInstantiateWithP, sizeof(__pyx_k_Function_cuGraphInstantiateWithP), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphInstantiateWithP */ + {__pyx_k_Function_cuGraphKernelNodeCopyAt, sizeof(__pyx_k_Function_cuGraphKernelNodeCopyAt), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphKernelNodeCopyAt */ + {__pyx_k_Function_cuGraphKernelNodeGetAtt, sizeof(__pyx_k_Function_cuGraphKernelNodeGetAtt), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphKernelNodeGetAtt */ + {__pyx_k_Function_cuGraphKernelNodeGetPar, sizeof(__pyx_k_Function_cuGraphKernelNodeGetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphKernelNodeGetPar */ + {__pyx_k_Function_cuGraphKernelNodeSetAtt, sizeof(__pyx_k_Function_cuGraphKernelNodeSetAtt), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphKernelNodeSetAtt */ + {__pyx_k_Function_cuGraphKernelNodeSetPar, sizeof(__pyx_k_Function_cuGraphKernelNodeSetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphKernelNodeSetPar */ + {__pyx_k_Function_cuGraphLaunch_not_found, sizeof(__pyx_k_Function_cuGraphLaunch_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphLaunch_not_found */ + {__pyx_k_Function_cuGraphMemAllocNodeGetP, sizeof(__pyx_k_Function_cuGraphMemAllocNodeGetP), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemAllocNodeGetP */ + {__pyx_k_Function_cuGraphMemFreeNodeGetPa, sizeof(__pyx_k_Function_cuGraphMemFreeNodeGetPa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemFreeNodeGetPa */ + {__pyx_k_Function_cuGraphMemcpyNodeGetPar, sizeof(__pyx_k_Function_cuGraphMemcpyNodeGetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemcpyNodeGetPar */ + {__pyx_k_Function_cuGraphMemcpyNodeSetPar, sizeof(__pyx_k_Function_cuGraphMemcpyNodeSetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemcpyNodeSetPar */ + {__pyx_k_Function_cuGraphMemsetNodeGetPar, sizeof(__pyx_k_Function_cuGraphMemsetNodeGetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemsetNodeGetPar */ + {__pyx_k_Function_cuGraphMemsetNodeSetPar, sizeof(__pyx_k_Function_cuGraphMemsetNodeSetPar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphMemsetNodeSetPar */ + {__pyx_k_Function_cuGraphNodeFindInClone, sizeof(__pyx_k_Function_cuGraphNodeFindInClone), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeFindInClone */ + {__pyx_k_Function_cuGraphNodeGetDependenc, sizeof(__pyx_k_Function_cuGraphNodeGetDependenc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetDependenc */ + {__pyx_k_Function_cuGraphNodeGetDependenc_2, sizeof(__pyx_k_Function_cuGraphNodeGetDependenc_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetDependenc_2 */ + {__pyx_k_Function_cuGraphNodeGetDependent, sizeof(__pyx_k_Function_cuGraphNodeGetDependent), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetDependent */ + {__pyx_k_Function_cuGraphNodeGetDependent_2, sizeof(__pyx_k_Function_cuGraphNodeGetDependent_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetDependent_2 */ + {__pyx_k_Function_cuGraphNodeGetEnabled_n, sizeof(__pyx_k_Function_cuGraphNodeGetEnabled_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetEnabled_n */ + {__pyx_k_Function_cuGraphNodeGetType_not, sizeof(__pyx_k_Function_cuGraphNodeGetType_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeGetType_not */ + {__pyx_k_Function_cuGraphNodeSetEnabled_n, sizeof(__pyx_k_Function_cuGraphNodeSetEnabled_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeSetEnabled_n */ + {__pyx_k_Function_cuGraphNodeSetParams_no, sizeof(__pyx_k_Function_cuGraphNodeSetParams_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphNodeSetParams_no */ + {__pyx_k_Function_cuGraphReleaseUserObjec, sizeof(__pyx_k_Function_cuGraphReleaseUserObjec), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphReleaseUserObjec */ + {__pyx_k_Function_cuGraphRemoveDependenci, sizeof(__pyx_k_Function_cuGraphRemoveDependenci), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphRemoveDependenci */ + {__pyx_k_Function_cuGraphRemoveDependenci_2, sizeof(__pyx_k_Function_cuGraphRemoveDependenci_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphRemoveDependenci_2 */ + {__pyx_k_Function_cuGraphRetainUserObject, sizeof(__pyx_k_Function_cuGraphRetainUserObject), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphRetainUserObject */ + {__pyx_k_Function_cuGraphUpload_not_found, sizeof(__pyx_k_Function_cuGraphUpload_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphUpload_not_found */ + {__pyx_k_Function_cuGraphicsEGLRegisterIm, sizeof(__pyx_k_Function_cuGraphicsEGLRegisterIm), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsEGLRegisterIm */ + {__pyx_k_Function_cuGraphicsGLRegisterBuf, sizeof(__pyx_k_Function_cuGraphicsGLRegisterBuf), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsGLRegisterBuf */ + {__pyx_k_Function_cuGraphicsGLRegisterIma, sizeof(__pyx_k_Function_cuGraphicsGLRegisterIma), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsGLRegisterIma */ + {__pyx_k_Function_cuGraphicsMapResources, sizeof(__pyx_k_Function_cuGraphicsMapResources), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsMapResources */ + {__pyx_k_Function_cuGraphicsResourceGetMa, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsResourceGetMa */ + {__pyx_k_Function_cuGraphicsResourceGetMa_2, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsResourceGetMa_2 */ + {__pyx_k_Function_cuGraphicsResourceGetMa_3, sizeof(__pyx_k_Function_cuGraphicsResourceGetMa_3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsResourceGetMa_3 */ + {__pyx_k_Function_cuGraphicsResourceSetMa, sizeof(__pyx_k_Function_cuGraphicsResourceSetMa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsResourceSetMa */ + {__pyx_k_Function_cuGraphicsSubResourceGe, sizeof(__pyx_k_Function_cuGraphicsSubResourceGe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsSubResourceGe */ + {__pyx_k_Function_cuGraphicsUnmapResource, sizeof(__pyx_k_Function_cuGraphicsUnmapResource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsUnmapResource */ + {__pyx_k_Function_cuGraphicsUnregisterRes, sizeof(__pyx_k_Function_cuGraphicsUnregisterRes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsUnregisterRes */ + {__pyx_k_Function_cuGraphicsVDPAURegister, sizeof(__pyx_k_Function_cuGraphicsVDPAURegister), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsVDPAURegister */ + {__pyx_k_Function_cuGraphicsVDPAURegister_2, sizeof(__pyx_k_Function_cuGraphicsVDPAURegister_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGraphicsVDPAURegister_2 */ + {__pyx_k_Function_cuGreenCtxCreate_not_fo, sizeof(__pyx_k_Function_cuGreenCtxCreate_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxCreate_not_fo */ + {__pyx_k_Function_cuGreenCtxDestroy_not_f, sizeof(__pyx_k_Function_cuGreenCtxDestroy_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxDestroy_not_f */ + {__pyx_k_Function_cuGreenCtxGetDevResourc, sizeof(__pyx_k_Function_cuGreenCtxGetDevResourc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxGetDevResourc */ + {__pyx_k_Function_cuGreenCtxRecordEvent_n, sizeof(__pyx_k_Function_cuGreenCtxRecordEvent_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxRecordEvent_n */ + {__pyx_k_Function_cuGreenCtxStreamCreate, sizeof(__pyx_k_Function_cuGreenCtxStreamCreate), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxStreamCreate */ + {__pyx_k_Function_cuGreenCtxWaitEvent_not, sizeof(__pyx_k_Function_cuGreenCtxWaitEvent_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuGreenCtxWaitEvent_not */ + {__pyx_k_Function_cuImportExternalMemory, sizeof(__pyx_k_Function_cuImportExternalMemory), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuImportExternalMemory */ + {__pyx_k_Function_cuImportExternalSemapho, sizeof(__pyx_k_Function_cuImportExternalSemapho), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuImportExternalSemapho */ + {__pyx_k_Function_cuInit_not_found, sizeof(__pyx_k_Function_cuInit_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuInit_not_found */ + {__pyx_k_Function_cuIpcCloseMemHandle_not, sizeof(__pyx_k_Function_cuIpcCloseMemHandle_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuIpcCloseMemHandle_not */ + {__pyx_k_Function_cuIpcGetEventHandle_not, sizeof(__pyx_k_Function_cuIpcGetEventHandle_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuIpcGetEventHandle_not */ + {__pyx_k_Function_cuIpcGetMemHandle_not_f, sizeof(__pyx_k_Function_cuIpcGetMemHandle_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuIpcGetMemHandle_not_f */ + {__pyx_k_Function_cuIpcOpenEventHandle_no, sizeof(__pyx_k_Function_cuIpcOpenEventHandle_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuIpcOpenEventHandle_no */ + {__pyx_k_Function_cuIpcOpenMemHandle_v2_n, sizeof(__pyx_k_Function_cuIpcOpenMemHandle_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuIpcOpenMemHandle_v2_n */ + {__pyx_k_Function_cuKernelGetAttribute_no, sizeof(__pyx_k_Function_cuKernelGetAttribute_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelGetAttribute_no */ + {__pyx_k_Function_cuKernelGetFunction_not, sizeof(__pyx_k_Function_cuKernelGetFunction_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelGetFunction_not */ + {__pyx_k_Function_cuKernelGetLibrary_not, sizeof(__pyx_k_Function_cuKernelGetLibrary_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelGetLibrary_not */ + {__pyx_k_Function_cuKernelGetName_not_fou, sizeof(__pyx_k_Function_cuKernelGetName_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelGetName_not_fou */ + {__pyx_k_Function_cuKernelGetParamInfo_no, sizeof(__pyx_k_Function_cuKernelGetParamInfo_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelGetParamInfo_no */ + {__pyx_k_Function_cuKernelSetAttribute_no, sizeof(__pyx_k_Function_cuKernelSetAttribute_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelSetAttribute_no */ + {__pyx_k_Function_cuKernelSetCacheConfig, sizeof(__pyx_k_Function_cuKernelSetCacheConfig), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuKernelSetCacheConfig */ + {__pyx_k_Function_cuLaunchCooperativeKern, sizeof(__pyx_k_Function_cuLaunchCooperativeKern), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchCooperativeKern */ + {__pyx_k_Function_cuLaunchCooperativeKern_2, sizeof(__pyx_k_Function_cuLaunchCooperativeKern_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchCooperativeKern_2 */ + {__pyx_k_Function_cuLaunchGridAsync_not_f, sizeof(__pyx_k_Function_cuLaunchGridAsync_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchGridAsync_not_f */ + {__pyx_k_Function_cuLaunchGrid_not_found, sizeof(__pyx_k_Function_cuLaunchGrid_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchGrid_not_found */ + {__pyx_k_Function_cuLaunchHostFunc_not_fo, sizeof(__pyx_k_Function_cuLaunchHostFunc_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchHostFunc_not_fo */ + {__pyx_k_Function_cuLaunchKernelEx_not_fo, sizeof(__pyx_k_Function_cuLaunchKernelEx_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchKernelEx_not_fo */ + {__pyx_k_Function_cuLaunchKernel_not_foun, sizeof(__pyx_k_Function_cuLaunchKernel_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunchKernel_not_foun */ + {__pyx_k_Function_cuLaunch_not_found, sizeof(__pyx_k_Function_cuLaunch_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLaunch_not_found */ + {__pyx_k_Function_cuLibraryEnumerateKerne, sizeof(__pyx_k_Function_cuLibraryEnumerateKerne), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryEnumerateKerne */ + {__pyx_k_Function_cuLibraryGetGlobal_not, sizeof(__pyx_k_Function_cuLibraryGetGlobal_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetGlobal_not */ + {__pyx_k_Function_cuLibraryGetKernelCount, sizeof(__pyx_k_Function_cuLibraryGetKernelCount), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetKernelCount */ + {__pyx_k_Function_cuLibraryGetKernel_not, sizeof(__pyx_k_Function_cuLibraryGetKernel_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetKernel_not */ + {__pyx_k_Function_cuLibraryGetManaged_not, sizeof(__pyx_k_Function_cuLibraryGetManaged_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetManaged_not */ + {__pyx_k_Function_cuLibraryGetModule_not, sizeof(__pyx_k_Function_cuLibraryGetModule_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetModule_not */ + {__pyx_k_Function_cuLibraryGetUnifiedFunc, sizeof(__pyx_k_Function_cuLibraryGetUnifiedFunc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryGetUnifiedFunc */ + {__pyx_k_Function_cuLibraryLoadData_not_f, sizeof(__pyx_k_Function_cuLibraryLoadData_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryLoadData_not_f */ + {__pyx_k_Function_cuLibraryLoadFromFile_n, sizeof(__pyx_k_Function_cuLibraryLoadFromFile_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryLoadFromFile_n */ + {__pyx_k_Function_cuLibraryUnload_not_fou, sizeof(__pyx_k_Function_cuLibraryUnload_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLibraryUnload_not_fou */ + {__pyx_k_Function_cuLinkAddData_v2_not_fo, sizeof(__pyx_k_Function_cuLinkAddData_v2_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLinkAddData_v2_not_fo */ + {__pyx_k_Function_cuLinkAddFile_v2_not_fo, sizeof(__pyx_k_Function_cuLinkAddFile_v2_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLinkAddFile_v2_not_fo */ + {__pyx_k_Function_cuLinkComplete_not_foun, sizeof(__pyx_k_Function_cuLinkComplete_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLinkComplete_not_foun */ + {__pyx_k_Function_cuLinkCreate_v2_not_fou, sizeof(__pyx_k_Function_cuLinkCreate_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLinkCreate_v2_not_fou */ + {__pyx_k_Function_cuLinkDestroy_not_found, sizeof(__pyx_k_Function_cuLinkDestroy_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLinkDestroy_not_found */ + {__pyx_k_Function_cuLogsCurrent_not_found, sizeof(__pyx_k_Function_cuLogsCurrent_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLogsCurrent_not_found */ + {__pyx_k_Function_cuLogsDumpToFile_not_fo, sizeof(__pyx_k_Function_cuLogsDumpToFile_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLogsDumpToFile_not_fo */ + {__pyx_k_Function_cuLogsDumpToMemory_not, sizeof(__pyx_k_Function_cuLogsDumpToMemory_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLogsDumpToMemory_not */ + {__pyx_k_Function_cuLogsRegisterCallback, sizeof(__pyx_k_Function_cuLogsRegisterCallback), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLogsRegisterCallback */ + {__pyx_k_Function_cuLogsUnregisterCallbac, sizeof(__pyx_k_Function_cuLogsUnregisterCallbac), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuLogsUnregisterCallbac */ + {__pyx_k_Function_cuMemAddressFree_not_fo, sizeof(__pyx_k_Function_cuMemAddressFree_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAddressFree_not_fo */ + {__pyx_k_Function_cuMemAddressReserve_not, sizeof(__pyx_k_Function_cuMemAddressReserve_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAddressReserve_not */ + {__pyx_k_Function_cuMemAdvise_not_found, sizeof(__pyx_k_Function_cuMemAdvise_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAdvise_not_found */ + {__pyx_k_Function_cuMemAdvise_v2_not_foun, sizeof(__pyx_k_Function_cuMemAdvise_v2_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAdvise_v2_not_foun */ + {__pyx_k_Function_cuMemAllocAsync_not_fou, sizeof(__pyx_k_Function_cuMemAllocAsync_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAllocAsync_not_fou */ + {__pyx_k_Function_cuMemAllocFromPoolAsync, sizeof(__pyx_k_Function_cuMemAllocFromPoolAsync), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAllocFromPoolAsync */ + {__pyx_k_Function_cuMemAllocHost_v2_not_f, sizeof(__pyx_k_Function_cuMemAllocHost_v2_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAllocHost_v2_not_f */ + {__pyx_k_Function_cuMemAllocManaged_not_f, sizeof(__pyx_k_Function_cuMemAllocManaged_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAllocManaged_not_f */ + {__pyx_k_Function_cuMemAllocPitch_v2_not, sizeof(__pyx_k_Function_cuMemAllocPitch_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAllocPitch_v2_not */ + {__pyx_k_Function_cuMemAlloc_v2_not_found, sizeof(__pyx_k_Function_cuMemAlloc_v2_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemAlloc_v2_not_found */ + {__pyx_k_Function_cuMemBatchDecompressAsy, sizeof(__pyx_k_Function_cuMemBatchDecompressAsy), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemBatchDecompressAsy */ + {__pyx_k_Function_cuMemCreate_not_found, sizeof(__pyx_k_Function_cuMemCreate_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemCreate_not_found */ + {__pyx_k_Function_cuMemExportToShareableH, sizeof(__pyx_k_Function_cuMemExportToShareableH), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemExportToShareableH */ + {__pyx_k_Function_cuMemFreeAsync_not_foun, sizeof(__pyx_k_Function_cuMemFreeAsync_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemFreeAsync_not_foun */ + {__pyx_k_Function_cuMemFreeHost_not_found, sizeof(__pyx_k_Function_cuMemFreeHost_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemFreeHost_not_found */ + {__pyx_k_Function_cuMemFree_v2_not_found, sizeof(__pyx_k_Function_cuMemFree_v2_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemFree_v2_not_found */ + {__pyx_k_Function_cuMemGetAccess_not_foun, sizeof(__pyx_k_Function_cuMemGetAccess_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetAccess_not_foun */ + {__pyx_k_Function_cuMemGetAddressRange_v2, sizeof(__pyx_k_Function_cuMemGetAddressRange_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetAddressRange_v2 */ + {__pyx_k_Function_cuMemGetAllocationGranu, sizeof(__pyx_k_Function_cuMemGetAllocationGranu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetAllocationGranu */ + {__pyx_k_Function_cuMemGetAllocationPrope, sizeof(__pyx_k_Function_cuMemGetAllocationPrope), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetAllocationPrope */ + {__pyx_k_Function_cuMemGetHandleForAddres, sizeof(__pyx_k_Function_cuMemGetHandleForAddres), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetHandleForAddres */ + {__pyx_k_Function_cuMemGetInfo_v2_not_fou, sizeof(__pyx_k_Function_cuMemGetInfo_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemGetInfo_v2_not_fou */ + {__pyx_k_Function_cuMemHostAlloc_not_foun, sizeof(__pyx_k_Function_cuMemHostAlloc_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemHostAlloc_not_foun */ + {__pyx_k_Function_cuMemHostGetDevicePoint, sizeof(__pyx_k_Function_cuMemHostGetDevicePoint), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemHostGetDevicePoint */ + {__pyx_k_Function_cuMemHostGetFlags_not_f, sizeof(__pyx_k_Function_cuMemHostGetFlags_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemHostGetFlags_not_f */ + {__pyx_k_Function_cuMemHostRegister_v2_no, sizeof(__pyx_k_Function_cuMemHostRegister_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemHostRegister_v2_no */ + {__pyx_k_Function_cuMemHostUnregister_not, sizeof(__pyx_k_Function_cuMemHostUnregister_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemHostUnregister_not */ + {__pyx_k_Function_cuMemImportFromShareabl, sizeof(__pyx_k_Function_cuMemImportFromShareabl), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemImportFromShareabl */ + {__pyx_k_Function_cuMemMapArrayAsync_not, sizeof(__pyx_k_Function_cuMemMapArrayAsync_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemMapArrayAsync_not */ + {__pyx_k_Function_cuMemMap_not_found, sizeof(__pyx_k_Function_cuMemMap_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemMap_not_found */ + {__pyx_k_Function_cuMemPoolCreate_not_fou, sizeof(__pyx_k_Function_cuMemPoolCreate_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolCreate_not_fou */ + {__pyx_k_Function_cuMemPoolDestroy_not_fo, sizeof(__pyx_k_Function_cuMemPoolDestroy_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolDestroy_not_fo */ + {__pyx_k_Function_cuMemPoolExportPointer, sizeof(__pyx_k_Function_cuMemPoolExportPointer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolExportPointer */ + {__pyx_k_Function_cuMemPoolExportToSharea, sizeof(__pyx_k_Function_cuMemPoolExportToSharea), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolExportToSharea */ + {__pyx_k_Function_cuMemPoolGetAccess_not, sizeof(__pyx_k_Function_cuMemPoolGetAccess_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolGetAccess_not */ + {__pyx_k_Function_cuMemPoolGetAttribute_n, sizeof(__pyx_k_Function_cuMemPoolGetAttribute_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolGetAttribute_n */ + {__pyx_k_Function_cuMemPoolImportFromShar, sizeof(__pyx_k_Function_cuMemPoolImportFromShar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolImportFromShar */ + {__pyx_k_Function_cuMemPoolImportPointer, sizeof(__pyx_k_Function_cuMemPoolImportPointer), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolImportPointer */ + {__pyx_k_Function_cuMemPoolSetAccess_not, sizeof(__pyx_k_Function_cuMemPoolSetAccess_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolSetAccess_not */ + {__pyx_k_Function_cuMemPoolSetAttribute_n, sizeof(__pyx_k_Function_cuMemPoolSetAttribute_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolSetAttribute_n */ + {__pyx_k_Function_cuMemPoolTrimTo_not_fou, sizeof(__pyx_k_Function_cuMemPoolTrimTo_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPoolTrimTo_not_fou */ + {__pyx_k_Function_cuMemPrefetchAsync_not, sizeof(__pyx_k_Function_cuMemPrefetchAsync_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPrefetchAsync_not */ + {__pyx_k_Function_cuMemPrefetchAsync_v2_n, sizeof(__pyx_k_Function_cuMemPrefetchAsync_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemPrefetchAsync_v2_n */ + {__pyx_k_Function_cuMemRangeGetAttribute, sizeof(__pyx_k_Function_cuMemRangeGetAttribute), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemRangeGetAttribute */ + {__pyx_k_Function_cuMemRangeGetAttributes, sizeof(__pyx_k_Function_cuMemRangeGetAttributes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemRangeGetAttributes */ + {__pyx_k_Function_cuMemRelease_not_found, sizeof(__pyx_k_Function_cuMemRelease_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemRelease_not_found */ + {__pyx_k_Function_cuMemRetainAllocationHa, sizeof(__pyx_k_Function_cuMemRetainAllocationHa), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemRetainAllocationHa */ + {__pyx_k_Function_cuMemSetAccess_not_foun, sizeof(__pyx_k_Function_cuMemSetAccess_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemSetAccess_not_foun */ + {__pyx_k_Function_cuMemUnmap_not_found, sizeof(__pyx_k_Function_cuMemUnmap_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemUnmap_not_found */ + {__pyx_k_Function_cuMemcpy2DAsync_v2_not, sizeof(__pyx_k_Function_cuMemcpy2DAsync_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy2DAsync_v2_not */ + {__pyx_k_Function_cuMemcpy2DUnaligned_v2, sizeof(__pyx_k_Function_cuMemcpy2DUnaligned_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy2DUnaligned_v2 */ + {__pyx_k_Function_cuMemcpy2D_v2_not_found, sizeof(__pyx_k_Function_cuMemcpy2D_v2_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy2D_v2_not_found */ + {__pyx_k_Function_cuMemcpy3DAsync_v2_not, sizeof(__pyx_k_Function_cuMemcpy3DAsync_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy3DAsync_v2_not */ + {__pyx_k_Function_cuMemcpy3DBatchAsync_no, sizeof(__pyx_k_Function_cuMemcpy3DBatchAsync_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy3DBatchAsync_no */ + {__pyx_k_Function_cuMemcpy3DPeerAsync_not, sizeof(__pyx_k_Function_cuMemcpy3DPeerAsync_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy3DPeerAsync_not */ + {__pyx_k_Function_cuMemcpy3DPeer_not_foun, sizeof(__pyx_k_Function_cuMemcpy3DPeer_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy3DPeer_not_foun */ + {__pyx_k_Function_cuMemcpy3D_v2_not_found, sizeof(__pyx_k_Function_cuMemcpy3D_v2_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy3D_v2_not_found */ + {__pyx_k_Function_cuMemcpyAsync_not_found, sizeof(__pyx_k_Function_cuMemcpyAsync_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyAsync_not_found */ + {__pyx_k_Function_cuMemcpyAtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoA_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyAtoA_v2_not_fou */ + {__pyx_k_Function_cuMemcpyAtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoD_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyAtoD_v2_not_fou */ + {__pyx_k_Function_cuMemcpyAtoHAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyAtoHAsync_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyAtoHAsync_v2_no */ + {__pyx_k_Function_cuMemcpyAtoH_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyAtoH_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyAtoH_v2_not_fou */ + {__pyx_k_Function_cuMemcpyBatchAsync_not, sizeof(__pyx_k_Function_cuMemcpyBatchAsync_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyBatchAsync_not */ + {__pyx_k_Function_cuMemcpyDtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoA_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyDtoA_v2_not_fou */ + {__pyx_k_Function_cuMemcpyDtoDAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyDtoDAsync_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyDtoDAsync_v2_no */ + {__pyx_k_Function_cuMemcpyDtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoD_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyDtoD_v2_not_fou */ + {__pyx_k_Function_cuMemcpyDtoHAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyDtoHAsync_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyDtoHAsync_v2_no */ + {__pyx_k_Function_cuMemcpyDtoH_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyDtoH_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyDtoH_v2_not_fou */ + {__pyx_k_Function_cuMemcpyHtoAAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyHtoAAsync_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyHtoAAsync_v2_no */ + {__pyx_k_Function_cuMemcpyHtoA_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyHtoA_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyHtoA_v2_not_fou */ + {__pyx_k_Function_cuMemcpyHtoDAsync_v2_no, sizeof(__pyx_k_Function_cuMemcpyHtoDAsync_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyHtoDAsync_v2_no */ + {__pyx_k_Function_cuMemcpyHtoD_v2_not_fou, sizeof(__pyx_k_Function_cuMemcpyHtoD_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyHtoD_v2_not_fou */ + {__pyx_k_Function_cuMemcpyPeerAsync_not_f, sizeof(__pyx_k_Function_cuMemcpyPeerAsync_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyPeerAsync_not_f */ + {__pyx_k_Function_cuMemcpyPeer_not_found, sizeof(__pyx_k_Function_cuMemcpyPeer_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpyPeer_not_found */ + {__pyx_k_Function_cuMemcpy_not_found, sizeof(__pyx_k_Function_cuMemcpy_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemcpy_not_found */ + {__pyx_k_Function_cuMemsetD16Async_not_fo, sizeof(__pyx_k_Function_cuMemsetD16Async_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD16Async_not_fo */ + {__pyx_k_Function_cuMemsetD16_v2_not_foun, sizeof(__pyx_k_Function_cuMemsetD16_v2_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD16_v2_not_foun */ + {__pyx_k_Function_cuMemsetD2D16Async_not, sizeof(__pyx_k_Function_cuMemsetD2D16Async_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D16Async_not */ + {__pyx_k_Function_cuMemsetD2D16_v2_not_fo, sizeof(__pyx_k_Function_cuMemsetD2D16_v2_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D16_v2_not_fo */ + {__pyx_k_Function_cuMemsetD2D32Async_not, sizeof(__pyx_k_Function_cuMemsetD2D32Async_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D32Async_not */ + {__pyx_k_Function_cuMemsetD2D32_v2_not_fo, sizeof(__pyx_k_Function_cuMemsetD2D32_v2_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D32_v2_not_fo */ + {__pyx_k_Function_cuMemsetD2D8Async_not_f, sizeof(__pyx_k_Function_cuMemsetD2D8Async_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D8Async_not_f */ + {__pyx_k_Function_cuMemsetD2D8_v2_not_fou, sizeof(__pyx_k_Function_cuMemsetD2D8_v2_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD2D8_v2_not_fou */ + {__pyx_k_Function_cuMemsetD32Async_not_fo, sizeof(__pyx_k_Function_cuMemsetD32Async_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD32Async_not_fo */ + {__pyx_k_Function_cuMemsetD32_v2_not_foun, sizeof(__pyx_k_Function_cuMemsetD32_v2_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD32_v2_not_foun */ + {__pyx_k_Function_cuMemsetD8Async_not_fou, sizeof(__pyx_k_Function_cuMemsetD8Async_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD8Async_not_fou */ + {__pyx_k_Function_cuMemsetD8_v2_not_found, sizeof(__pyx_k_Function_cuMemsetD8_v2_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMemsetD8_v2_not_found */ + {__pyx_k_Function_cuMipmappedArrayCreate, sizeof(__pyx_k_Function_cuMipmappedArrayCreate), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMipmappedArrayCreate */ + {__pyx_k_Function_cuMipmappedArrayDestroy, sizeof(__pyx_k_Function_cuMipmappedArrayDestroy), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMipmappedArrayDestroy */ + {__pyx_k_Function_cuMipmappedArrayGetLeve, sizeof(__pyx_k_Function_cuMipmappedArrayGetLeve), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMipmappedArrayGetLeve */ + {__pyx_k_Function_cuMipmappedArrayGetMemo, sizeof(__pyx_k_Function_cuMipmappedArrayGetMemo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMipmappedArrayGetMemo */ + {__pyx_k_Function_cuMipmappedArrayGetSpar, sizeof(__pyx_k_Function_cuMipmappedArrayGetSpar), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMipmappedArrayGetSpar */ + {__pyx_k_Function_cuModuleEnumerateFuncti, sizeof(__pyx_k_Function_cuModuleEnumerateFuncti), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleEnumerateFuncti */ + {__pyx_k_Function_cuModuleGetFunctionCoun, sizeof(__pyx_k_Function_cuModuleGetFunctionCoun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetFunctionCoun */ + {__pyx_k_Function_cuModuleGetFunction_not, sizeof(__pyx_k_Function_cuModuleGetFunction_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetFunction_not */ + {__pyx_k_Function_cuModuleGetGlobal_v2_no, sizeof(__pyx_k_Function_cuModuleGetGlobal_v2_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetGlobal_v2_no */ + {__pyx_k_Function_cuModuleGetLoadingMode, sizeof(__pyx_k_Function_cuModuleGetLoadingMode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetLoadingMode */ + {__pyx_k_Function_cuModuleGetSurfRef_not, sizeof(__pyx_k_Function_cuModuleGetSurfRef_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetSurfRef_not */ + {__pyx_k_Function_cuModuleGetTexRef_not_f, sizeof(__pyx_k_Function_cuModuleGetTexRef_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleGetTexRef_not_f */ + {__pyx_k_Function_cuModuleLoadDataEx_not, sizeof(__pyx_k_Function_cuModuleLoadDataEx_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleLoadDataEx_not */ + {__pyx_k_Function_cuModuleLoadData_not_fo, sizeof(__pyx_k_Function_cuModuleLoadData_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleLoadData_not_fo */ + {__pyx_k_Function_cuModuleLoadFatBinary_n, sizeof(__pyx_k_Function_cuModuleLoadFatBinary_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleLoadFatBinary_n */ + {__pyx_k_Function_cuModuleLoad_not_found, sizeof(__pyx_k_Function_cuModuleLoad_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleLoad_not_found */ + {__pyx_k_Function_cuModuleUnload_not_foun, sizeof(__pyx_k_Function_cuModuleUnload_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuModuleUnload_not_foun */ + {__pyx_k_Function_cuMulticastAddDevice_no, sizeof(__pyx_k_Function_cuMulticastAddDevice_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastAddDevice_no */ + {__pyx_k_Function_cuMulticastBindAddr_not, sizeof(__pyx_k_Function_cuMulticastBindAddr_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastBindAddr_not */ + {__pyx_k_Function_cuMulticastBindMem_not, sizeof(__pyx_k_Function_cuMulticastBindMem_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastBindMem_not */ + {__pyx_k_Function_cuMulticastCreate_not_f, sizeof(__pyx_k_Function_cuMulticastCreate_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastCreate_not_f */ + {__pyx_k_Function_cuMulticastGetGranulari, sizeof(__pyx_k_Function_cuMulticastGetGranulari), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastGetGranulari */ + {__pyx_k_Function_cuMulticastUnbind_not_f, sizeof(__pyx_k_Function_cuMulticastUnbind_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuMulticastUnbind_not_f */ + {__pyx_k_Function_cuOccupancyAvailableDyn, sizeof(__pyx_k_Function_cuOccupancyAvailableDyn), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyAvailableDyn */ + {__pyx_k_Function_cuOccupancyMaxActiveBlo, sizeof(__pyx_k_Function_cuOccupancyMaxActiveBlo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxActiveBlo */ + {__pyx_k_Function_cuOccupancyMaxActiveBlo_2, sizeof(__pyx_k_Function_cuOccupancyMaxActiveBlo_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxActiveBlo_2 */ + {__pyx_k_Function_cuOccupancyMaxActiveClu, sizeof(__pyx_k_Function_cuOccupancyMaxActiveClu), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxActiveClu */ + {__pyx_k_Function_cuOccupancyMaxPotential, sizeof(__pyx_k_Function_cuOccupancyMaxPotential), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxPotential */ + {__pyx_k_Function_cuOccupancyMaxPotential_2, sizeof(__pyx_k_Function_cuOccupancyMaxPotential_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxPotential_2 */ + {__pyx_k_Function_cuOccupancyMaxPotential_3, sizeof(__pyx_k_Function_cuOccupancyMaxPotential_3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuOccupancyMaxPotential_3 */ + {__pyx_k_Function_cuParamSetSize_not_foun, sizeof(__pyx_k_Function_cuParamSetSize_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuParamSetSize_not_foun */ + {__pyx_k_Function_cuParamSetTexRef_not_fo, sizeof(__pyx_k_Function_cuParamSetTexRef_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuParamSetTexRef_not_fo */ + {__pyx_k_Function_cuParamSetf_not_found, sizeof(__pyx_k_Function_cuParamSetf_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuParamSetf_not_found */ + {__pyx_k_Function_cuParamSeti_not_found, sizeof(__pyx_k_Function_cuParamSeti_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuParamSeti_not_found */ + {__pyx_k_Function_cuParamSetv_not_found, sizeof(__pyx_k_Function_cuParamSetv_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuParamSetv_not_found */ + {__pyx_k_Function_cuPointerGetAttribute_n, sizeof(__pyx_k_Function_cuPointerGetAttribute_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuPointerGetAttribute_n */ + {__pyx_k_Function_cuPointerGetAttributes, sizeof(__pyx_k_Function_cuPointerGetAttributes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuPointerGetAttributes */ + {__pyx_k_Function_cuPointerSetAttribute_n, sizeof(__pyx_k_Function_cuPointerSetAttribute_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuPointerSetAttribute_n */ + {__pyx_k_Function_cuProfilerStart_not_fou, sizeof(__pyx_k_Function_cuProfilerStart_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuProfilerStart_not_fou */ + {__pyx_k_Function_cuProfilerStop_not_foun, sizeof(__pyx_k_Function_cuProfilerStop_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuProfilerStop_not_foun */ + {__pyx_k_Function_cuSignalExternalSemapho, sizeof(__pyx_k_Function_cuSignalExternalSemapho), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSignalExternalSemapho */ + {__pyx_k_Function_cuStreamAddCallback_not, sizeof(__pyx_k_Function_cuStreamAddCallback_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamAddCallback_not */ + {__pyx_k_Function_cuStreamAttachMemAsync, sizeof(__pyx_k_Function_cuStreamAttachMemAsync), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamAttachMemAsync */ + {__pyx_k_Function_cuStreamBatchMemOp_v2_n, sizeof(__pyx_k_Function_cuStreamBatchMemOp_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamBatchMemOp_v2_n */ + {__pyx_k_Function_cuStreamBeginCaptureToG, sizeof(__pyx_k_Function_cuStreamBeginCaptureToG), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamBeginCaptureToG */ + {__pyx_k_Function_cuStreamBeginCapture_v2, sizeof(__pyx_k_Function_cuStreamBeginCapture_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamBeginCapture_v2 */ + {__pyx_k_Function_cuStreamCopyAttributes, sizeof(__pyx_k_Function_cuStreamCopyAttributes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamCopyAttributes */ + {__pyx_k_Function_cuStreamCreateWithPrior, sizeof(__pyx_k_Function_cuStreamCreateWithPrior), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamCreateWithPrior */ + {__pyx_k_Function_cuStreamCreate_not_foun, sizeof(__pyx_k_Function_cuStreamCreate_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamCreate_not_foun */ + {__pyx_k_Function_cuStreamDestroy_v2_not, sizeof(__pyx_k_Function_cuStreamDestroy_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamDestroy_v2_not */ + {__pyx_k_Function_cuStreamEndCapture_not, sizeof(__pyx_k_Function_cuStreamEndCapture_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamEndCapture_not */ + {__pyx_k_Function_cuStreamGetAttribute_no, sizeof(__pyx_k_Function_cuStreamGetAttribute_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetAttribute_no */ + {__pyx_k_Function_cuStreamGetCaptureInfo, sizeof(__pyx_k_Function_cuStreamGetCaptureInfo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetCaptureInfo */ + {__pyx_k_Function_cuStreamGetCaptureInfo_2, sizeof(__pyx_k_Function_cuStreamGetCaptureInfo_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetCaptureInfo_2 */ + {__pyx_k_Function_cuStreamGetCtx_not_foun, sizeof(__pyx_k_Function_cuStreamGetCtx_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetCtx_not_foun */ + {__pyx_k_Function_cuStreamGetCtx_v2_not_f, sizeof(__pyx_k_Function_cuStreamGetCtx_v2_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetCtx_v2_not_f */ + {__pyx_k_Function_cuStreamGetDevice_not_f, sizeof(__pyx_k_Function_cuStreamGetDevice_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetDevice_not_f */ + {__pyx_k_Function_cuStreamGetFlags_not_fo, sizeof(__pyx_k_Function_cuStreamGetFlags_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetFlags_not_fo */ + {__pyx_k_Function_cuStreamGetGreenCtx_not, sizeof(__pyx_k_Function_cuStreamGetGreenCtx_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetGreenCtx_not */ + {__pyx_k_Function_cuStreamGetId_not_found, sizeof(__pyx_k_Function_cuStreamGetId_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetId_not_found */ + {__pyx_k_Function_cuStreamGetPriority_not, sizeof(__pyx_k_Function_cuStreamGetPriority_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamGetPriority_not */ + {__pyx_k_Function_cuStreamIsCapturing_not, sizeof(__pyx_k_Function_cuStreamIsCapturing_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamIsCapturing_not */ + {__pyx_k_Function_cuStreamQuery_not_found, sizeof(__pyx_k_Function_cuStreamQuery_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamQuery_not_found */ + {__pyx_k_Function_cuStreamSetAttribute_no, sizeof(__pyx_k_Function_cuStreamSetAttribute_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamSetAttribute_no */ + {__pyx_k_Function_cuStreamSynchronize_not, sizeof(__pyx_k_Function_cuStreamSynchronize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamSynchronize_not */ + {__pyx_k_Function_cuStreamUpdateCaptureDe, sizeof(__pyx_k_Function_cuStreamUpdateCaptureDe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamUpdateCaptureDe */ + {__pyx_k_Function_cuStreamUpdateCaptureDe_2, sizeof(__pyx_k_Function_cuStreamUpdateCaptureDe_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamUpdateCaptureDe_2 */ + {__pyx_k_Function_cuStreamWaitEvent_not_f, sizeof(__pyx_k_Function_cuStreamWaitEvent_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamWaitEvent_not_f */ + {__pyx_k_Function_cuStreamWaitValue32_v2, sizeof(__pyx_k_Function_cuStreamWaitValue32_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamWaitValue32_v2 */ + {__pyx_k_Function_cuStreamWaitValue64_v2, sizeof(__pyx_k_Function_cuStreamWaitValue64_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamWaitValue64_v2 */ + {__pyx_k_Function_cuStreamWriteValue32_v2, sizeof(__pyx_k_Function_cuStreamWriteValue32_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamWriteValue32_v2 */ + {__pyx_k_Function_cuStreamWriteValue64_v2, sizeof(__pyx_k_Function_cuStreamWriteValue64_v2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuStreamWriteValue64_v2 */ + {__pyx_k_Function_cuSurfObjectCreate_not, sizeof(__pyx_k_Function_cuSurfObjectCreate_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSurfObjectCreate_not */ + {__pyx_k_Function_cuSurfObjectDestroy_not, sizeof(__pyx_k_Function_cuSurfObjectDestroy_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSurfObjectDestroy_not */ + {__pyx_k_Function_cuSurfObjectGetResource, sizeof(__pyx_k_Function_cuSurfObjectGetResource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSurfObjectGetResource */ + {__pyx_k_Function_cuSurfRefGetArray_not_f, sizeof(__pyx_k_Function_cuSurfRefGetArray_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSurfRefGetArray_not_f */ + {__pyx_k_Function_cuSurfRefSetArray_not_f, sizeof(__pyx_k_Function_cuSurfRefSetArray_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuSurfRefSetArray_not_f */ + {__pyx_k_Function_cuTensorMapEncodeIm2col, sizeof(__pyx_k_Function_cuTensorMapEncodeIm2col), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTensorMapEncodeIm2col */ + {__pyx_k_Function_cuTensorMapEncodeIm2col_2, sizeof(__pyx_k_Function_cuTensorMapEncodeIm2col_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTensorMapEncodeIm2col_2 */ + {__pyx_k_Function_cuTensorMapEncodeTiled, sizeof(__pyx_k_Function_cuTensorMapEncodeTiled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTensorMapEncodeTiled */ + {__pyx_k_Function_cuTensorMapReplaceAddre, sizeof(__pyx_k_Function_cuTensorMapReplaceAddre), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTensorMapReplaceAddre */ + {__pyx_k_Function_cuTexObjectCreate_not_f, sizeof(__pyx_k_Function_cuTexObjectCreate_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexObjectCreate_not_f */ + {__pyx_k_Function_cuTexObjectDestroy_not, sizeof(__pyx_k_Function_cuTexObjectDestroy_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexObjectDestroy_not */ + {__pyx_k_Function_cuTexObjectGetResourceD, sizeof(__pyx_k_Function_cuTexObjectGetResourceD), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexObjectGetResourceD */ + {__pyx_k_Function_cuTexObjectGetResourceV, sizeof(__pyx_k_Function_cuTexObjectGetResourceV), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexObjectGetResourceV */ + {__pyx_k_Function_cuTexObjectGetTextureDe, sizeof(__pyx_k_Function_cuTexObjectGetTextureDe), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexObjectGetTextureDe */ + {__pyx_k_Function_cuTexRefCreate_not_foun, sizeof(__pyx_k_Function_cuTexRefCreate_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefCreate_not_foun */ + {__pyx_k_Function_cuTexRefDestroy_not_fou, sizeof(__pyx_k_Function_cuTexRefDestroy_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefDestroy_not_fou */ + {__pyx_k_Function_cuTexRefGetAddressMode, sizeof(__pyx_k_Function_cuTexRefGetAddressMode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetAddressMode */ + {__pyx_k_Function_cuTexRefGetAddress_v2_n, sizeof(__pyx_k_Function_cuTexRefGetAddress_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetAddress_v2_n */ + {__pyx_k_Function_cuTexRefGetArray_not_fo, sizeof(__pyx_k_Function_cuTexRefGetArray_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetArray_not_fo */ + {__pyx_k_Function_cuTexRefGetBorderColor, sizeof(__pyx_k_Function_cuTexRefGetBorderColor), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetBorderColor */ + {__pyx_k_Function_cuTexRefGetFilterMode_n, sizeof(__pyx_k_Function_cuTexRefGetFilterMode_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetFilterMode_n */ + {__pyx_k_Function_cuTexRefGetFlags_not_fo, sizeof(__pyx_k_Function_cuTexRefGetFlags_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetFlags_not_fo */ + {__pyx_k_Function_cuTexRefGetFormat_not_f, sizeof(__pyx_k_Function_cuTexRefGetFormat_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetFormat_not_f */ + {__pyx_k_Function_cuTexRefGetMaxAnisotrop, sizeof(__pyx_k_Function_cuTexRefGetMaxAnisotrop), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetMaxAnisotrop */ + {__pyx_k_Function_cuTexRefGetMipmapFilter, sizeof(__pyx_k_Function_cuTexRefGetMipmapFilter), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetMipmapFilter */ + {__pyx_k_Function_cuTexRefGetMipmapLevelB, sizeof(__pyx_k_Function_cuTexRefGetMipmapLevelB), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetMipmapLevelB */ + {__pyx_k_Function_cuTexRefGetMipmapLevelC, sizeof(__pyx_k_Function_cuTexRefGetMipmapLevelC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetMipmapLevelC */ + {__pyx_k_Function_cuTexRefGetMipmappedArr, sizeof(__pyx_k_Function_cuTexRefGetMipmappedArr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefGetMipmappedArr */ + {__pyx_k_Function_cuTexRefSetAddress2D_v3, sizeof(__pyx_k_Function_cuTexRefSetAddress2D_v3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetAddress2D_v3 */ + {__pyx_k_Function_cuTexRefSetAddressMode, sizeof(__pyx_k_Function_cuTexRefSetAddressMode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetAddressMode */ + {__pyx_k_Function_cuTexRefSetAddress_v2_n, sizeof(__pyx_k_Function_cuTexRefSetAddress_v2_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetAddress_v2_n */ + {__pyx_k_Function_cuTexRefSetArray_not_fo, sizeof(__pyx_k_Function_cuTexRefSetArray_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetArray_not_fo */ + {__pyx_k_Function_cuTexRefSetBorderColor, sizeof(__pyx_k_Function_cuTexRefSetBorderColor), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetBorderColor */ + {__pyx_k_Function_cuTexRefSetFilterMode_n, sizeof(__pyx_k_Function_cuTexRefSetFilterMode_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetFilterMode_n */ + {__pyx_k_Function_cuTexRefSetFlags_not_fo, sizeof(__pyx_k_Function_cuTexRefSetFlags_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetFlags_not_fo */ + {__pyx_k_Function_cuTexRefSetFormat_not_f, sizeof(__pyx_k_Function_cuTexRefSetFormat_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetFormat_not_f */ + {__pyx_k_Function_cuTexRefSetMaxAnisotrop, sizeof(__pyx_k_Function_cuTexRefSetMaxAnisotrop), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetMaxAnisotrop */ + {__pyx_k_Function_cuTexRefSetMipmapFilter, sizeof(__pyx_k_Function_cuTexRefSetMipmapFilter), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetMipmapFilter */ + {__pyx_k_Function_cuTexRefSetMipmapLevelB, sizeof(__pyx_k_Function_cuTexRefSetMipmapLevelB), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetMipmapLevelB */ + {__pyx_k_Function_cuTexRefSetMipmapLevelC, sizeof(__pyx_k_Function_cuTexRefSetMipmapLevelC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetMipmapLevelC */ + {__pyx_k_Function_cuTexRefSetMipmappedArr, sizeof(__pyx_k_Function_cuTexRefSetMipmappedArr), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuTexRefSetMipmappedArr */ + {__pyx_k_Function_cuThreadExchangeStreamC, sizeof(__pyx_k_Function_cuThreadExchangeStreamC), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuThreadExchangeStreamC */ + {__pyx_k_Function_cuUserObjectCreate_not, sizeof(__pyx_k_Function_cuUserObjectCreate_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuUserObjectCreate_not */ + {__pyx_k_Function_cuUserObjectRelease_not, sizeof(__pyx_k_Function_cuUserObjectRelease_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuUserObjectRelease_not */ + {__pyx_k_Function_cuUserObjectRetain_not, sizeof(__pyx_k_Function_cuUserObjectRetain_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuUserObjectRetain_not */ + {__pyx_k_Function_cuVDPAUCtxCreate_v2_not, sizeof(__pyx_k_Function_cuVDPAUCtxCreate_v2_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuVDPAUCtxCreate_v2_not */ + {__pyx_k_Function_cuVDPAUGetDevice_not_fo, sizeof(__pyx_k_Function_cuVDPAUGetDevice_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuVDPAUGetDevice_not_fo */ + {__pyx_k_Function_cuWaitExternalSemaphore, sizeof(__pyx_k_Function_cuWaitExternalSemaphore), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cuWaitExternalSemaphore */ + {__pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Lock */ + {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuArray3DCreate_v2, sizeof(__pyx_k_cuArray3DCreate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArray3DCreate_v2 */ + {__pyx_k_cuArray3DGetDescriptor_v2, sizeof(__pyx_k_cuArray3DGetDescriptor_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArray3DGetDescriptor_v2 */ + {__pyx_k_cuArrayCreate_v2, sizeof(__pyx_k_cuArrayCreate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayCreate_v2 */ + {__pyx_k_cuArrayDestroy, sizeof(__pyx_k_cuArrayDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayDestroy */ + {__pyx_k_cuArrayGetDescriptor_v2, sizeof(__pyx_k_cuArrayGetDescriptor_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayGetDescriptor_v2 */ + {__pyx_k_cuArrayGetMemoryRequirements, sizeof(__pyx_k_cuArrayGetMemoryRequirements), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayGetMemoryRequirements */ + {__pyx_k_cuArrayGetPlane, sizeof(__pyx_k_cuArrayGetPlane), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayGetPlane */ + {__pyx_k_cuArrayGetSparseProperties, sizeof(__pyx_k_cuArrayGetSparseProperties), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuArrayGetSparseProperties */ + {__pyx_k_cuCheckpointProcessCheckpoint, sizeof(__pyx_k_cuCheckpointProcessCheckpoint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessCheckpoint */ + {__pyx_k_cuCheckpointProcessGetRestoreT, sizeof(__pyx_k_cuCheckpointProcessGetRestoreT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessGetRestoreT */ + {__pyx_k_cuCheckpointProcessGetState, sizeof(__pyx_k_cuCheckpointProcessGetState), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessGetState */ + {__pyx_k_cuCheckpointProcessLock, sizeof(__pyx_k_cuCheckpointProcessLock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessLock */ + {__pyx_k_cuCheckpointProcessRestore, sizeof(__pyx_k_cuCheckpointProcessRestore), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessRestore */ + {__pyx_k_cuCheckpointProcessUnlock, sizeof(__pyx_k_cuCheckpointProcessUnlock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCheckpointProcessUnlock */ + {__pyx_k_cuCoredumpGetAttribute, sizeof(__pyx_k_cuCoredumpGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCoredumpGetAttribute */ + {__pyx_k_cuCoredumpGetAttributeGlobal, sizeof(__pyx_k_cuCoredumpGetAttributeGlobal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCoredumpGetAttributeGlobal */ + {__pyx_k_cuCoredumpSetAttribute, sizeof(__pyx_k_cuCoredumpSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCoredumpSetAttribute */ + {__pyx_k_cuCoredumpSetAttributeGlobal, sizeof(__pyx_k_cuCoredumpSetAttributeGlobal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCoredumpSetAttributeGlobal */ + {__pyx_k_cuCtxAttach, sizeof(__pyx_k_cuCtxAttach), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxAttach */ + {__pyx_k_cuCtxCreate_v2, sizeof(__pyx_k_cuCtxCreate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxCreate_v2 */ + {__pyx_k_cuCtxCreate_v3, sizeof(__pyx_k_cuCtxCreate_v3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxCreate_v3 */ + {__pyx_k_cuCtxCreate_v4, sizeof(__pyx_k_cuCtxCreate_v4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxCreate_v4 */ + {__pyx_k_cuCtxDestroy_v2, sizeof(__pyx_k_cuCtxDestroy_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxDestroy_v2 */ + {__pyx_k_cuCtxDetach, sizeof(__pyx_k_cuCtxDetach), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxDetach */ + {__pyx_k_cuCtxDisablePeerAccess, sizeof(__pyx_k_cuCtxDisablePeerAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxDisablePeerAccess */ + {__pyx_k_cuCtxEnablePeerAccess, sizeof(__pyx_k_cuCtxEnablePeerAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxEnablePeerAccess */ + {__pyx_k_cuCtxFromGreenCtx, sizeof(__pyx_k_cuCtxFromGreenCtx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxFromGreenCtx */ + {__pyx_k_cuCtxGetApiVersion, sizeof(__pyx_k_cuCtxGetApiVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetApiVersion */ + {__pyx_k_cuCtxGetCacheConfig, sizeof(__pyx_k_cuCtxGetCacheConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetCacheConfig */ + {__pyx_k_cuCtxGetCurrent, sizeof(__pyx_k_cuCtxGetCurrent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetCurrent */ + {__pyx_k_cuCtxGetDevResource, sizeof(__pyx_k_cuCtxGetDevResource), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetDevResource */ + {__pyx_k_cuCtxGetDevice, sizeof(__pyx_k_cuCtxGetDevice), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetDevice */ + {__pyx_k_cuCtxGetExecAffinity, sizeof(__pyx_k_cuCtxGetExecAffinity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetExecAffinity */ + {__pyx_k_cuCtxGetFlags, sizeof(__pyx_k_cuCtxGetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetFlags */ + {__pyx_k_cuCtxGetId, sizeof(__pyx_k_cuCtxGetId), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetId */ + {__pyx_k_cuCtxGetLimit, sizeof(__pyx_k_cuCtxGetLimit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetLimit */ + {__pyx_k_cuCtxGetSharedMemConfig, sizeof(__pyx_k_cuCtxGetSharedMemConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetSharedMemConfig */ + {__pyx_k_cuCtxGetStreamPriorityRange, sizeof(__pyx_k_cuCtxGetStreamPriorityRange), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxGetStreamPriorityRange */ + {__pyx_k_cuCtxPopCurrent_v2, sizeof(__pyx_k_cuCtxPopCurrent_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxPopCurrent_v2 */ + {__pyx_k_cuCtxPushCurrent_v2, sizeof(__pyx_k_cuCtxPushCurrent_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxPushCurrent_v2 */ + {__pyx_k_cuCtxRecordEvent, sizeof(__pyx_k_cuCtxRecordEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxRecordEvent */ + {__pyx_k_cuCtxResetPersistingL2Cache, sizeof(__pyx_k_cuCtxResetPersistingL2Cache), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxResetPersistingL2Cache */ + {__pyx_k_cuCtxSetCacheConfig, sizeof(__pyx_k_cuCtxSetCacheConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSetCacheConfig */ + {__pyx_k_cuCtxSetCurrent, sizeof(__pyx_k_cuCtxSetCurrent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSetCurrent */ + {__pyx_k_cuCtxSetFlags, sizeof(__pyx_k_cuCtxSetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSetFlags */ + {__pyx_k_cuCtxSetLimit, sizeof(__pyx_k_cuCtxSetLimit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSetLimit */ + {__pyx_k_cuCtxSetSharedMemConfig, sizeof(__pyx_k_cuCtxSetSharedMemConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSetSharedMemConfig */ + {__pyx_k_cuCtxSynchronize, sizeof(__pyx_k_cuCtxSynchronize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxSynchronize */ + {__pyx_k_cuCtxWaitEvent, sizeof(__pyx_k_cuCtxWaitEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuCtxWaitEvent */ + {__pyx_k_cuDestroyExternalMemory, sizeof(__pyx_k_cuDestroyExternalMemory), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDestroyExternalMemory */ + {__pyx_k_cuDestroyExternalSemaphore, sizeof(__pyx_k_cuDestroyExternalSemaphore), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDestroyExternalSemaphore */ + {__pyx_k_cuDevResourceGenerateDesc, sizeof(__pyx_k_cuDevResourceGenerateDesc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevResourceGenerateDesc */ + {__pyx_k_cuDevSmResourceSplitByCount, sizeof(__pyx_k_cuDevSmResourceSplitByCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevSmResourceSplitByCount */ + {__pyx_k_cuDeviceCanAccessPeer, sizeof(__pyx_k_cuDeviceCanAccessPeer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceCanAccessPeer */ + {__pyx_k_cuDeviceComputeCapability, sizeof(__pyx_k_cuDeviceComputeCapability), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceComputeCapability */ + {__pyx_k_cuDeviceGet, sizeof(__pyx_k_cuDeviceGet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGet */ + {__pyx_k_cuDeviceGetAttribute, sizeof(__pyx_k_cuDeviceGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetAttribute */ + {__pyx_k_cuDeviceGetByPCIBusId, sizeof(__pyx_k_cuDeviceGetByPCIBusId), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetByPCIBusId */ + {__pyx_k_cuDeviceGetCount, sizeof(__pyx_k_cuDeviceGetCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetCount */ + {__pyx_k_cuDeviceGetDefaultMemPool, sizeof(__pyx_k_cuDeviceGetDefaultMemPool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetDefaultMemPool */ + {__pyx_k_cuDeviceGetDevResource, sizeof(__pyx_k_cuDeviceGetDevResource), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetDevResource */ + {__pyx_k_cuDeviceGetExecAffinitySupport, sizeof(__pyx_k_cuDeviceGetExecAffinitySupport), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetExecAffinitySupport */ + {__pyx_k_cuDeviceGetGraphMemAttribute, sizeof(__pyx_k_cuDeviceGetGraphMemAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetGraphMemAttribute */ + {__pyx_k_cuDeviceGetLuid, sizeof(__pyx_k_cuDeviceGetLuid), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetLuid */ + {__pyx_k_cuDeviceGetMemPool, sizeof(__pyx_k_cuDeviceGetMemPool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetMemPool */ + {__pyx_k_cuDeviceGetName, sizeof(__pyx_k_cuDeviceGetName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetName */ + {__pyx_k_cuDeviceGetNvSciSyncAttributes, sizeof(__pyx_k_cuDeviceGetNvSciSyncAttributes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetNvSciSyncAttributes */ + {__pyx_k_cuDeviceGetP2PAttribute, sizeof(__pyx_k_cuDeviceGetP2PAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetP2PAttribute */ + {__pyx_k_cuDeviceGetPCIBusId, sizeof(__pyx_k_cuDeviceGetPCIBusId), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetPCIBusId */ + {__pyx_k_cuDeviceGetProperties, sizeof(__pyx_k_cuDeviceGetProperties), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetProperties */ + {__pyx_k_cuDeviceGetTexture1DLinearMaxW, sizeof(__pyx_k_cuDeviceGetTexture1DLinearMaxW), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetTexture1DLinearMaxW */ + {__pyx_k_cuDeviceGetUuid, sizeof(__pyx_k_cuDeviceGetUuid), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetUuid */ + {__pyx_k_cuDeviceGetUuid_v2, sizeof(__pyx_k_cuDeviceGetUuid_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGetUuid_v2 */ + {__pyx_k_cuDeviceGraphMemTrim, sizeof(__pyx_k_cuDeviceGraphMemTrim), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceGraphMemTrim */ + {__pyx_k_cuDevicePrimaryCtxGetState, sizeof(__pyx_k_cuDevicePrimaryCtxGetState), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevicePrimaryCtxGetState */ + {__pyx_k_cuDevicePrimaryCtxRelease_v2, sizeof(__pyx_k_cuDevicePrimaryCtxRelease_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevicePrimaryCtxRelease_v2 */ + {__pyx_k_cuDevicePrimaryCtxReset_v2, sizeof(__pyx_k_cuDevicePrimaryCtxReset_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevicePrimaryCtxReset_v2 */ + {__pyx_k_cuDevicePrimaryCtxRetain, sizeof(__pyx_k_cuDevicePrimaryCtxRetain), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevicePrimaryCtxRetain */ + {__pyx_k_cuDevicePrimaryCtxSetFlags_v2, sizeof(__pyx_k_cuDevicePrimaryCtxSetFlags_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDevicePrimaryCtxSetFlags_v2 */ + {__pyx_k_cuDeviceRegisterAsyncNotificat, sizeof(__pyx_k_cuDeviceRegisterAsyncNotificat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceRegisterAsyncNotificat */ + {__pyx_k_cuDeviceSetGraphMemAttribute, sizeof(__pyx_k_cuDeviceSetGraphMemAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceSetGraphMemAttribute */ + {__pyx_k_cuDeviceSetMemPool, sizeof(__pyx_k_cuDeviceSetMemPool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceSetMemPool */ + {__pyx_k_cuDeviceTotalMem_v2, sizeof(__pyx_k_cuDeviceTotalMem_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceTotalMem_v2 */ + {__pyx_k_cuDeviceUnregisterAsyncNotific, sizeof(__pyx_k_cuDeviceUnregisterAsyncNotific), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDeviceUnregisterAsyncNotific */ + {__pyx_k_cuDriverGetVersion, sizeof(__pyx_k_cuDriverGetVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuDriverGetVersion */ + {__pyx_k_cuEGLStreamConsumerAcquireFram, sizeof(__pyx_k_cuEGLStreamConsumerAcquireFram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamConsumerAcquireFram */ + {__pyx_k_cuEGLStreamConsumerConnect, sizeof(__pyx_k_cuEGLStreamConsumerConnect), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamConsumerConnect */ + {__pyx_k_cuEGLStreamConsumerConnectWith, sizeof(__pyx_k_cuEGLStreamConsumerConnectWith), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamConsumerConnectWith */ + {__pyx_k_cuEGLStreamConsumerDisconnect, sizeof(__pyx_k_cuEGLStreamConsumerDisconnect), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamConsumerDisconnect */ + {__pyx_k_cuEGLStreamConsumerReleaseFram, sizeof(__pyx_k_cuEGLStreamConsumerReleaseFram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamConsumerReleaseFram */ + {__pyx_k_cuEGLStreamProducerConnect, sizeof(__pyx_k_cuEGLStreamProducerConnect), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamProducerConnect */ + {__pyx_k_cuEGLStreamProducerDisconnect, sizeof(__pyx_k_cuEGLStreamProducerDisconnect), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamProducerDisconnect */ + {__pyx_k_cuEGLStreamProducerPresentFram, sizeof(__pyx_k_cuEGLStreamProducerPresentFram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamProducerPresentFram */ + {__pyx_k_cuEGLStreamProducerReturnFrame, sizeof(__pyx_k_cuEGLStreamProducerReturnFrame), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEGLStreamProducerReturnFrame */ + {__pyx_k_cuEventCreate, sizeof(__pyx_k_cuEventCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventCreate */ + {__pyx_k_cuEventCreateFromEGLSync, sizeof(__pyx_k_cuEventCreateFromEGLSync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventCreateFromEGLSync */ + {__pyx_k_cuEventDestroy_v2, sizeof(__pyx_k_cuEventDestroy_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventDestroy_v2 */ + {__pyx_k_cuEventElapsedTime, sizeof(__pyx_k_cuEventElapsedTime), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventElapsedTime */ + {__pyx_k_cuEventElapsedTime_v2, sizeof(__pyx_k_cuEventElapsedTime_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventElapsedTime_v2 */ + {__pyx_k_cuEventQuery, sizeof(__pyx_k_cuEventQuery), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventQuery */ + {__pyx_k_cuEventRecord, sizeof(__pyx_k_cuEventRecord), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventRecord */ + {__pyx_k_cuEventRecordWithFlags, sizeof(__pyx_k_cuEventRecordWithFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventRecordWithFlags */ + {__pyx_k_cuEventSynchronize, sizeof(__pyx_k_cuEventSynchronize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuEventSynchronize */ + {__pyx_k_cuExternalMemoryGetMappedBuffe, sizeof(__pyx_k_cuExternalMemoryGetMappedBuffe), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuExternalMemoryGetMappedBuffe */ + {__pyx_k_cuExternalMemoryGetMappedMipma, sizeof(__pyx_k_cuExternalMemoryGetMappedMipma), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuExternalMemoryGetMappedMipma */ + {__pyx_k_cuFlushGPUDirectRDMAWrites, sizeof(__pyx_k_cuFlushGPUDirectRDMAWrites), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFlushGPUDirectRDMAWrites */ + {__pyx_k_cuFuncGetAttribute, sizeof(__pyx_k_cuFuncGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncGetAttribute */ + {__pyx_k_cuFuncGetModule, sizeof(__pyx_k_cuFuncGetModule), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncGetModule */ + {__pyx_k_cuFuncGetName, sizeof(__pyx_k_cuFuncGetName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncGetName */ + {__pyx_k_cuFuncGetParamInfo, sizeof(__pyx_k_cuFuncGetParamInfo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncGetParamInfo */ + {__pyx_k_cuFuncIsLoaded, sizeof(__pyx_k_cuFuncIsLoaded), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncIsLoaded */ + {__pyx_k_cuFuncLoad, sizeof(__pyx_k_cuFuncLoad), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncLoad */ + {__pyx_k_cuFuncSetAttribute, sizeof(__pyx_k_cuFuncSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncSetAttribute */ + {__pyx_k_cuFuncSetBlockShape, sizeof(__pyx_k_cuFuncSetBlockShape), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncSetBlockShape */ + {__pyx_k_cuFuncSetCacheConfig, sizeof(__pyx_k_cuFuncSetCacheConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncSetCacheConfig */ + {__pyx_k_cuFuncSetSharedMemConfig, sizeof(__pyx_k_cuFuncSetSharedMemConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncSetSharedMemConfig */ + {__pyx_k_cuFuncSetSharedSize, sizeof(__pyx_k_cuFuncSetSharedSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFuncSetSharedSize */ + {__pyx_k_cuGLGetDevices_v2, sizeof(__pyx_k_cuGLGetDevices_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGLGetDevices_v2 */ + {__pyx_k_cuGetErrorName, sizeof(__pyx_k_cuGetErrorName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGetErrorName */ + {__pyx_k_cuGetErrorString, sizeof(__pyx_k_cuGetErrorString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGetErrorString */ + {__pyx_k_cuGetExportTable, sizeof(__pyx_k_cuGetExportTable), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGetExportTable */ + {__pyx_k_cuGetProcAddress_v2, sizeof(__pyx_k_cuGetProcAddress_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGetProcAddress_v2 */ + {__pyx_k_cuGraphAddBatchMemOpNode, sizeof(__pyx_k_cuGraphAddBatchMemOpNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddBatchMemOpNode */ + {__pyx_k_cuGraphAddChildGraphNode, sizeof(__pyx_k_cuGraphAddChildGraphNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddChildGraphNode */ + {__pyx_k_cuGraphAddDependencies, sizeof(__pyx_k_cuGraphAddDependencies), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddDependencies */ + {__pyx_k_cuGraphAddDependencies_v2, sizeof(__pyx_k_cuGraphAddDependencies_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddDependencies_v2 */ + {__pyx_k_cuGraphAddEmptyNode, sizeof(__pyx_k_cuGraphAddEmptyNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddEmptyNode */ + {__pyx_k_cuGraphAddEventRecordNode, sizeof(__pyx_k_cuGraphAddEventRecordNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddEventRecordNode */ + {__pyx_k_cuGraphAddEventWaitNode, sizeof(__pyx_k_cuGraphAddEventWaitNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddEventWaitNode */ + {__pyx_k_cuGraphAddExternalSemaphoresSi, sizeof(__pyx_k_cuGraphAddExternalSemaphoresSi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddExternalSemaphoresSi */ + {__pyx_k_cuGraphAddExternalSemaphoresWa, sizeof(__pyx_k_cuGraphAddExternalSemaphoresWa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddExternalSemaphoresWa */ + {__pyx_k_cuGraphAddHostNode, sizeof(__pyx_k_cuGraphAddHostNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddHostNode */ + {__pyx_k_cuGraphAddKernelNode_v2, sizeof(__pyx_k_cuGraphAddKernelNode_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddKernelNode_v2 */ + {__pyx_k_cuGraphAddMemAllocNode, sizeof(__pyx_k_cuGraphAddMemAllocNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddMemAllocNode */ + {__pyx_k_cuGraphAddMemFreeNode, sizeof(__pyx_k_cuGraphAddMemFreeNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddMemFreeNode */ + {__pyx_k_cuGraphAddMemcpyNode, sizeof(__pyx_k_cuGraphAddMemcpyNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddMemcpyNode */ + {__pyx_k_cuGraphAddMemsetNode, sizeof(__pyx_k_cuGraphAddMemsetNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddMemsetNode */ + {__pyx_k_cuGraphAddNode, sizeof(__pyx_k_cuGraphAddNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddNode */ + {__pyx_k_cuGraphAddNode_v2, sizeof(__pyx_k_cuGraphAddNode_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphAddNode_v2 */ + {__pyx_k_cuGraphBatchMemOpNodeGetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphBatchMemOpNodeGetParams */ + {__pyx_k_cuGraphBatchMemOpNodeSetParams, sizeof(__pyx_k_cuGraphBatchMemOpNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphBatchMemOpNodeSetParams */ + {__pyx_k_cuGraphChildGraphNodeGetGraph, sizeof(__pyx_k_cuGraphChildGraphNodeGetGraph), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphChildGraphNodeGetGraph */ + {__pyx_k_cuGraphClone, sizeof(__pyx_k_cuGraphClone), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphClone */ + {__pyx_k_cuGraphConditionalHandleCreate, sizeof(__pyx_k_cuGraphConditionalHandleCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphConditionalHandleCreate */ + {__pyx_k_cuGraphCreate, sizeof(__pyx_k_cuGraphCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphCreate */ + {__pyx_k_cuGraphDebugDotPrint, sizeof(__pyx_k_cuGraphDebugDotPrint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphDebugDotPrint */ + {__pyx_k_cuGraphDestroy, sizeof(__pyx_k_cuGraphDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphDestroy */ + {__pyx_k_cuGraphDestroyNode, sizeof(__pyx_k_cuGraphDestroyNode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphDestroyNode */ + {__pyx_k_cuGraphEventRecordNodeGetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeGetEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphEventRecordNodeGetEvent */ + {__pyx_k_cuGraphEventRecordNodeSetEvent, sizeof(__pyx_k_cuGraphEventRecordNodeSetEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphEventRecordNodeSetEvent */ + {__pyx_k_cuGraphEventWaitNodeGetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeGetEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphEventWaitNodeGetEvent */ + {__pyx_k_cuGraphEventWaitNodeSetEvent, sizeof(__pyx_k_cuGraphEventWaitNodeSetEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphEventWaitNodeSetEvent */ + {__pyx_k_cuGraphExecBatchMemOpNodeSetPa, sizeof(__pyx_k_cuGraphExecBatchMemOpNodeSetPa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecBatchMemOpNodeSetPa */ + {__pyx_k_cuGraphExecChildGraphNodeSetPa, sizeof(__pyx_k_cuGraphExecChildGraphNodeSetPa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecChildGraphNodeSetPa */ + {__pyx_k_cuGraphExecDestroy, sizeof(__pyx_k_cuGraphExecDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecDestroy */ + {__pyx_k_cuGraphExecEventRecordNodeSetE, sizeof(__pyx_k_cuGraphExecEventRecordNodeSetE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecEventRecordNodeSetE */ + {__pyx_k_cuGraphExecEventWaitNodeSetEve, sizeof(__pyx_k_cuGraphExecEventWaitNodeSetEve), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecEventWaitNodeSetEve */ + {__pyx_k_cuGraphExecExternalSemaphoresS, sizeof(__pyx_k_cuGraphExecExternalSemaphoresS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecExternalSemaphoresS */ + {__pyx_k_cuGraphExecExternalSemaphoresW, sizeof(__pyx_k_cuGraphExecExternalSemaphoresW), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecExternalSemaphoresW */ + {__pyx_k_cuGraphExecGetFlags, sizeof(__pyx_k_cuGraphExecGetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecGetFlags */ + {__pyx_k_cuGraphExecHostNodeSetParams, sizeof(__pyx_k_cuGraphExecHostNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecHostNodeSetParams */ + {__pyx_k_cuGraphExecKernelNodeSetParams, sizeof(__pyx_k_cuGraphExecKernelNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecKernelNodeSetParams */ + {__pyx_k_cuGraphExecMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphExecMemcpyNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecMemcpyNodeSetParams */ + {__pyx_k_cuGraphExecMemsetNodeSetParams, sizeof(__pyx_k_cuGraphExecMemsetNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecMemsetNodeSetParams */ + {__pyx_k_cuGraphExecNodeSetParams, sizeof(__pyx_k_cuGraphExecNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecNodeSetParams */ + {__pyx_k_cuGraphExecUpdate_v2, sizeof(__pyx_k_cuGraphExecUpdate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExecUpdate_v2 */ + {__pyx_k_cuGraphExternalSemaphoresSigna, sizeof(__pyx_k_cuGraphExternalSemaphoresSigna), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExternalSemaphoresSigna */ + {__pyx_k_cuGraphExternalSemaphoresSigna_2, sizeof(__pyx_k_cuGraphExternalSemaphoresSigna_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExternalSemaphoresSigna_2 */ + {__pyx_k_cuGraphExternalSemaphoresWaitN, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExternalSemaphoresWaitN */ + {__pyx_k_cuGraphExternalSemaphoresWaitN_2, sizeof(__pyx_k_cuGraphExternalSemaphoresWaitN_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphExternalSemaphoresWaitN_2 */ + {__pyx_k_cuGraphGetEdges, sizeof(__pyx_k_cuGraphGetEdges), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphGetEdges */ + {__pyx_k_cuGraphGetEdges_v2, sizeof(__pyx_k_cuGraphGetEdges_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphGetEdges_v2 */ + {__pyx_k_cuGraphGetNodes, sizeof(__pyx_k_cuGraphGetNodes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphGetNodes */ + {__pyx_k_cuGraphGetRootNodes, sizeof(__pyx_k_cuGraphGetRootNodes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphGetRootNodes */ + {__pyx_k_cuGraphHostNodeGetParams, sizeof(__pyx_k_cuGraphHostNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphHostNodeGetParams */ + {__pyx_k_cuGraphHostNodeSetParams, sizeof(__pyx_k_cuGraphHostNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphHostNodeSetParams */ + {__pyx_k_cuGraphInstantiateWithFlags, sizeof(__pyx_k_cuGraphInstantiateWithFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphInstantiateWithFlags */ + {__pyx_k_cuGraphInstantiateWithParams, sizeof(__pyx_k_cuGraphInstantiateWithParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphInstantiateWithParams */ + {__pyx_k_cuGraphKernelNodeCopyAttribute, sizeof(__pyx_k_cuGraphKernelNodeCopyAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphKernelNodeCopyAttribute */ + {__pyx_k_cuGraphKernelNodeGetAttribute, sizeof(__pyx_k_cuGraphKernelNodeGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphKernelNodeGetAttribute */ + {__pyx_k_cuGraphKernelNodeGetParams_v2, sizeof(__pyx_k_cuGraphKernelNodeGetParams_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphKernelNodeGetParams_v2 */ + {__pyx_k_cuGraphKernelNodeSetAttribute, sizeof(__pyx_k_cuGraphKernelNodeSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphKernelNodeSetAttribute */ + {__pyx_k_cuGraphKernelNodeSetParams_v2, sizeof(__pyx_k_cuGraphKernelNodeSetParams_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphKernelNodeSetParams_v2 */ + {__pyx_k_cuGraphLaunch, sizeof(__pyx_k_cuGraphLaunch), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphLaunch */ + {__pyx_k_cuGraphMemAllocNodeGetParams, sizeof(__pyx_k_cuGraphMemAllocNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemAllocNodeGetParams */ + {__pyx_k_cuGraphMemFreeNodeGetParams, sizeof(__pyx_k_cuGraphMemFreeNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemFreeNodeGetParams */ + {__pyx_k_cuGraphMemcpyNodeGetParams, sizeof(__pyx_k_cuGraphMemcpyNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemcpyNodeGetParams */ + {__pyx_k_cuGraphMemcpyNodeSetParams, sizeof(__pyx_k_cuGraphMemcpyNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemcpyNodeSetParams */ + {__pyx_k_cuGraphMemsetNodeGetParams, sizeof(__pyx_k_cuGraphMemsetNodeGetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemsetNodeGetParams */ + {__pyx_k_cuGraphMemsetNodeSetParams, sizeof(__pyx_k_cuGraphMemsetNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphMemsetNodeSetParams */ + {__pyx_k_cuGraphNodeFindInClone, sizeof(__pyx_k_cuGraphNodeFindInClone), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeFindInClone */ + {__pyx_k_cuGraphNodeGetDependencies, sizeof(__pyx_k_cuGraphNodeGetDependencies), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetDependencies */ + {__pyx_k_cuGraphNodeGetDependencies_v2, sizeof(__pyx_k_cuGraphNodeGetDependencies_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetDependencies_v2 */ + {__pyx_k_cuGraphNodeGetDependentNodes, sizeof(__pyx_k_cuGraphNodeGetDependentNodes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetDependentNodes */ + {__pyx_k_cuGraphNodeGetDependentNodes_v, sizeof(__pyx_k_cuGraphNodeGetDependentNodes_v), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetDependentNodes_v */ + {__pyx_k_cuGraphNodeGetEnabled, sizeof(__pyx_k_cuGraphNodeGetEnabled), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetEnabled */ + {__pyx_k_cuGraphNodeGetType, sizeof(__pyx_k_cuGraphNodeGetType), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeGetType */ + {__pyx_k_cuGraphNodeSetEnabled, sizeof(__pyx_k_cuGraphNodeSetEnabled), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeSetEnabled */ + {__pyx_k_cuGraphNodeSetParams, sizeof(__pyx_k_cuGraphNodeSetParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphNodeSetParams */ + {__pyx_k_cuGraphReleaseUserObject, sizeof(__pyx_k_cuGraphReleaseUserObject), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphReleaseUserObject */ + {__pyx_k_cuGraphRemoveDependencies, sizeof(__pyx_k_cuGraphRemoveDependencies), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphRemoveDependencies */ + {__pyx_k_cuGraphRemoveDependencies_v2, sizeof(__pyx_k_cuGraphRemoveDependencies_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphRemoveDependencies_v2 */ + {__pyx_k_cuGraphRetainUserObject, sizeof(__pyx_k_cuGraphRetainUserObject), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphRetainUserObject */ + {__pyx_k_cuGraphUpload, sizeof(__pyx_k_cuGraphUpload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphUpload */ + {__pyx_k_cuGraphicsEGLRegisterImage, sizeof(__pyx_k_cuGraphicsEGLRegisterImage), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsEGLRegisterImage */ + {__pyx_k_cuGraphicsGLRegisterBuffer, sizeof(__pyx_k_cuGraphicsGLRegisterBuffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsGLRegisterBuffer */ + {__pyx_k_cuGraphicsGLRegisterImage, sizeof(__pyx_k_cuGraphicsGLRegisterImage), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsGLRegisterImage */ + {__pyx_k_cuGraphicsMapResources, sizeof(__pyx_k_cuGraphicsMapResources), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsMapResources */ + {__pyx_k_cuGraphicsResourceGetMappedEgl, sizeof(__pyx_k_cuGraphicsResourceGetMappedEgl), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsResourceGetMappedEgl */ + {__pyx_k_cuGraphicsResourceGetMappedMip, sizeof(__pyx_k_cuGraphicsResourceGetMappedMip), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsResourceGetMappedMip */ + {__pyx_k_cuGraphicsResourceGetMappedPoi, sizeof(__pyx_k_cuGraphicsResourceGetMappedPoi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsResourceGetMappedPoi */ + {__pyx_k_cuGraphicsResourceSetMapFlags, sizeof(__pyx_k_cuGraphicsResourceSetMapFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsResourceSetMapFlags */ + {__pyx_k_cuGraphicsSubResourceGetMapped, sizeof(__pyx_k_cuGraphicsSubResourceGetMapped), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsSubResourceGetMapped */ + {__pyx_k_cuGraphicsUnmapResources, sizeof(__pyx_k_cuGraphicsUnmapResources), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsUnmapResources */ + {__pyx_k_cuGraphicsUnregisterResource, sizeof(__pyx_k_cuGraphicsUnregisterResource), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsUnregisterResource */ + {__pyx_k_cuGraphicsVDPAURegisterOutputS, sizeof(__pyx_k_cuGraphicsVDPAURegisterOutputS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsVDPAURegisterOutputS */ + {__pyx_k_cuGraphicsVDPAURegisterVideoSu, sizeof(__pyx_k_cuGraphicsVDPAURegisterVideoSu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGraphicsVDPAURegisterVideoSu */ + {__pyx_k_cuGreenCtxCreate, sizeof(__pyx_k_cuGreenCtxCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxCreate */ + {__pyx_k_cuGreenCtxDestroy, sizeof(__pyx_k_cuGreenCtxDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxDestroy */ + {__pyx_k_cuGreenCtxGetDevResource, sizeof(__pyx_k_cuGreenCtxGetDevResource), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxGetDevResource */ + {__pyx_k_cuGreenCtxRecordEvent, sizeof(__pyx_k_cuGreenCtxRecordEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxRecordEvent */ + {__pyx_k_cuGreenCtxStreamCreate, sizeof(__pyx_k_cuGreenCtxStreamCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxStreamCreate */ + {__pyx_k_cuGreenCtxWaitEvent, sizeof(__pyx_k_cuGreenCtxWaitEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuGreenCtxWaitEvent */ + {__pyx_k_cuImportExternalMemory, sizeof(__pyx_k_cuImportExternalMemory), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuImportExternalMemory */ + {__pyx_k_cuImportExternalSemaphore, sizeof(__pyx_k_cuImportExternalSemaphore), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuImportExternalSemaphore */ + {__pyx_k_cuInit, sizeof(__pyx_k_cuInit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuInit */ + {__pyx_k_cuIpcCloseMemHandle, sizeof(__pyx_k_cuIpcCloseMemHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuIpcCloseMemHandle */ + {__pyx_k_cuIpcGetEventHandle, sizeof(__pyx_k_cuIpcGetEventHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuIpcGetEventHandle */ + {__pyx_k_cuIpcGetMemHandle, sizeof(__pyx_k_cuIpcGetMemHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuIpcGetMemHandle */ + {__pyx_k_cuIpcOpenEventHandle, sizeof(__pyx_k_cuIpcOpenEventHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuIpcOpenEventHandle */ + {__pyx_k_cuIpcOpenMemHandle_v2, sizeof(__pyx_k_cuIpcOpenMemHandle_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuIpcOpenMemHandle_v2 */ + {__pyx_k_cuKernelGetAttribute, sizeof(__pyx_k_cuKernelGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelGetAttribute */ + {__pyx_k_cuKernelGetFunction, sizeof(__pyx_k_cuKernelGetFunction), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelGetFunction */ + {__pyx_k_cuKernelGetLibrary, sizeof(__pyx_k_cuKernelGetLibrary), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelGetLibrary */ + {__pyx_k_cuKernelGetName, sizeof(__pyx_k_cuKernelGetName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelGetName */ + {__pyx_k_cuKernelGetParamInfo, sizeof(__pyx_k_cuKernelGetParamInfo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelGetParamInfo */ + {__pyx_k_cuKernelSetAttribute, sizeof(__pyx_k_cuKernelSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelSetAttribute */ + {__pyx_k_cuKernelSetCacheConfig, sizeof(__pyx_k_cuKernelSetCacheConfig), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuKernelSetCacheConfig */ + {__pyx_k_cuLaunch, sizeof(__pyx_k_cuLaunch), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunch */ + {__pyx_k_cuLaunchCooperativeKernel, sizeof(__pyx_k_cuLaunchCooperativeKernel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchCooperativeKernel */ + {__pyx_k_cuLaunchCooperativeKernelMulti, sizeof(__pyx_k_cuLaunchCooperativeKernelMulti), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchCooperativeKernelMulti */ + {__pyx_k_cuLaunchGrid, sizeof(__pyx_k_cuLaunchGrid), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchGrid */ + {__pyx_k_cuLaunchGridAsync, sizeof(__pyx_k_cuLaunchGridAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchGridAsync */ + {__pyx_k_cuLaunchHostFunc, sizeof(__pyx_k_cuLaunchHostFunc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchHostFunc */ + {__pyx_k_cuLaunchKernel, sizeof(__pyx_k_cuLaunchKernel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchKernel */ + {__pyx_k_cuLaunchKernelEx, sizeof(__pyx_k_cuLaunchKernelEx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLaunchKernelEx */ + {__pyx_k_cuLibraryEnumerateKernels, sizeof(__pyx_k_cuLibraryEnumerateKernels), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryEnumerateKernels */ + {__pyx_k_cuLibraryGetGlobal, sizeof(__pyx_k_cuLibraryGetGlobal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetGlobal */ + {__pyx_k_cuLibraryGetKernel, sizeof(__pyx_k_cuLibraryGetKernel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetKernel */ + {__pyx_k_cuLibraryGetKernelCount, sizeof(__pyx_k_cuLibraryGetKernelCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetKernelCount */ + {__pyx_k_cuLibraryGetManaged, sizeof(__pyx_k_cuLibraryGetManaged), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetManaged */ + {__pyx_k_cuLibraryGetModule, sizeof(__pyx_k_cuLibraryGetModule), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetModule */ + {__pyx_k_cuLibraryGetUnifiedFunction, sizeof(__pyx_k_cuLibraryGetUnifiedFunction), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryGetUnifiedFunction */ + {__pyx_k_cuLibraryLoadData, sizeof(__pyx_k_cuLibraryLoadData), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryLoadData */ + {__pyx_k_cuLibraryLoadFromFile, sizeof(__pyx_k_cuLibraryLoadFromFile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryLoadFromFile */ + {__pyx_k_cuLibraryUnload, sizeof(__pyx_k_cuLibraryUnload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLibraryUnload */ + {__pyx_k_cuLinkAddData_v2, sizeof(__pyx_k_cuLinkAddData_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLinkAddData_v2 */ + {__pyx_k_cuLinkAddFile_v2, sizeof(__pyx_k_cuLinkAddFile_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLinkAddFile_v2 */ + {__pyx_k_cuLinkComplete, sizeof(__pyx_k_cuLinkComplete), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLinkComplete */ + {__pyx_k_cuLinkCreate_v2, sizeof(__pyx_k_cuLinkCreate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLinkCreate_v2 */ + {__pyx_k_cuLinkDestroy, sizeof(__pyx_k_cuLinkDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLinkDestroy */ + {__pyx_k_cuLogsCurrent, sizeof(__pyx_k_cuLogsCurrent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLogsCurrent */ + {__pyx_k_cuLogsDumpToFile, sizeof(__pyx_k_cuLogsDumpToFile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLogsDumpToFile */ + {__pyx_k_cuLogsDumpToMemory, sizeof(__pyx_k_cuLogsDumpToMemory), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLogsDumpToMemory */ + {__pyx_k_cuLogsRegisterCallback, sizeof(__pyx_k_cuLogsRegisterCallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLogsRegisterCallback */ + {__pyx_k_cuLogsUnregisterCallback, sizeof(__pyx_k_cuLogsUnregisterCallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuLogsUnregisterCallback */ + {__pyx_k_cuMemAddressFree, sizeof(__pyx_k_cuMemAddressFree), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAddressFree */ + {__pyx_k_cuMemAddressReserve, sizeof(__pyx_k_cuMemAddressReserve), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAddressReserve */ + {__pyx_k_cuMemAdvise, sizeof(__pyx_k_cuMemAdvise), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAdvise */ + {__pyx_k_cuMemAdvise_v2, sizeof(__pyx_k_cuMemAdvise_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAdvise_v2 */ + {__pyx_k_cuMemAllocAsync, sizeof(__pyx_k_cuMemAllocAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAllocAsync */ + {__pyx_k_cuMemAllocFromPoolAsync, sizeof(__pyx_k_cuMemAllocFromPoolAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAllocFromPoolAsync */ + {__pyx_k_cuMemAllocHost_v2, sizeof(__pyx_k_cuMemAllocHost_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAllocHost_v2 */ + {__pyx_k_cuMemAllocManaged, sizeof(__pyx_k_cuMemAllocManaged), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAllocManaged */ + {__pyx_k_cuMemAllocPitch_v2, sizeof(__pyx_k_cuMemAllocPitch_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAllocPitch_v2 */ + {__pyx_k_cuMemAlloc_v2, sizeof(__pyx_k_cuMemAlloc_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemAlloc_v2 */ + {__pyx_k_cuMemBatchDecompressAsync, sizeof(__pyx_k_cuMemBatchDecompressAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemBatchDecompressAsync */ + {__pyx_k_cuMemCreate, sizeof(__pyx_k_cuMemCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemCreate */ + {__pyx_k_cuMemExportToShareableHandle, sizeof(__pyx_k_cuMemExportToShareableHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemExportToShareableHandle */ + {__pyx_k_cuMemFreeAsync, sizeof(__pyx_k_cuMemFreeAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemFreeAsync */ + {__pyx_k_cuMemFreeHost, sizeof(__pyx_k_cuMemFreeHost), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemFreeHost */ + {__pyx_k_cuMemFree_v2, sizeof(__pyx_k_cuMemFree_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemFree_v2 */ + {__pyx_k_cuMemGetAccess, sizeof(__pyx_k_cuMemGetAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetAccess */ + {__pyx_k_cuMemGetAddressRange_v2, sizeof(__pyx_k_cuMemGetAddressRange_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetAddressRange_v2 */ + {__pyx_k_cuMemGetAllocationGranularity, sizeof(__pyx_k_cuMemGetAllocationGranularity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetAllocationGranularity */ + {__pyx_k_cuMemGetAllocationPropertiesFr, sizeof(__pyx_k_cuMemGetAllocationPropertiesFr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetAllocationPropertiesFr */ + {__pyx_k_cuMemGetHandleForAddressRange, sizeof(__pyx_k_cuMemGetHandleForAddressRange), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetHandleForAddressRange */ + {__pyx_k_cuMemGetInfo_v2, sizeof(__pyx_k_cuMemGetInfo_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemGetInfo_v2 */ + {__pyx_k_cuMemHostAlloc, sizeof(__pyx_k_cuMemHostAlloc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemHostAlloc */ + {__pyx_k_cuMemHostGetDevicePointer_v2, sizeof(__pyx_k_cuMemHostGetDevicePointer_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemHostGetDevicePointer_v2 */ + {__pyx_k_cuMemHostGetFlags, sizeof(__pyx_k_cuMemHostGetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemHostGetFlags */ + {__pyx_k_cuMemHostRegister_v2, sizeof(__pyx_k_cuMemHostRegister_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemHostRegister_v2 */ + {__pyx_k_cuMemHostUnregister, sizeof(__pyx_k_cuMemHostUnregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemHostUnregister */ + {__pyx_k_cuMemImportFromShareableHandle, sizeof(__pyx_k_cuMemImportFromShareableHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemImportFromShareableHandle */ + {__pyx_k_cuMemMap, sizeof(__pyx_k_cuMemMap), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemMap */ + {__pyx_k_cuMemMapArrayAsync, sizeof(__pyx_k_cuMemMapArrayAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemMapArrayAsync */ + {__pyx_k_cuMemPoolCreate, sizeof(__pyx_k_cuMemPoolCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolCreate */ + {__pyx_k_cuMemPoolDestroy, sizeof(__pyx_k_cuMemPoolDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolDestroy */ + {__pyx_k_cuMemPoolExportPointer, sizeof(__pyx_k_cuMemPoolExportPointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolExportPointer */ + {__pyx_k_cuMemPoolExportToShareableHand, sizeof(__pyx_k_cuMemPoolExportToShareableHand), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolExportToShareableHand */ + {__pyx_k_cuMemPoolGetAccess, sizeof(__pyx_k_cuMemPoolGetAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolGetAccess */ + {__pyx_k_cuMemPoolGetAttribute, sizeof(__pyx_k_cuMemPoolGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolGetAttribute */ + {__pyx_k_cuMemPoolImportFromShareableHa, sizeof(__pyx_k_cuMemPoolImportFromShareableHa), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolImportFromShareableHa */ + {__pyx_k_cuMemPoolImportPointer, sizeof(__pyx_k_cuMemPoolImportPointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolImportPointer */ + {__pyx_k_cuMemPoolSetAccess, sizeof(__pyx_k_cuMemPoolSetAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolSetAccess */ + {__pyx_k_cuMemPoolSetAttribute, sizeof(__pyx_k_cuMemPoolSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolSetAttribute */ + {__pyx_k_cuMemPoolTrimTo, sizeof(__pyx_k_cuMemPoolTrimTo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPoolTrimTo */ + {__pyx_k_cuMemPrefetchAsync, sizeof(__pyx_k_cuMemPrefetchAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPrefetchAsync */ + {__pyx_k_cuMemPrefetchAsync_v2, sizeof(__pyx_k_cuMemPrefetchAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemPrefetchAsync_v2 */ + {__pyx_k_cuMemRangeGetAttribute, sizeof(__pyx_k_cuMemRangeGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemRangeGetAttribute */ + {__pyx_k_cuMemRangeGetAttributes, sizeof(__pyx_k_cuMemRangeGetAttributes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemRangeGetAttributes */ + {__pyx_k_cuMemRelease, sizeof(__pyx_k_cuMemRelease), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemRelease */ + {__pyx_k_cuMemRetainAllocationHandle, sizeof(__pyx_k_cuMemRetainAllocationHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemRetainAllocationHandle */ + {__pyx_k_cuMemSetAccess, sizeof(__pyx_k_cuMemSetAccess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemSetAccess */ + {__pyx_k_cuMemUnmap, sizeof(__pyx_k_cuMemUnmap), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemUnmap */ + {__pyx_k_cuMemcpy, sizeof(__pyx_k_cuMemcpy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy */ + {__pyx_k_cuMemcpy2DAsync_v2, sizeof(__pyx_k_cuMemcpy2DAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy2DAsync_v2 */ + {__pyx_k_cuMemcpy2DUnaligned_v2, sizeof(__pyx_k_cuMemcpy2DUnaligned_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy2DUnaligned_v2 */ + {__pyx_k_cuMemcpy2D_v2, sizeof(__pyx_k_cuMemcpy2D_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy2D_v2 */ + {__pyx_k_cuMemcpy3DAsync_v2, sizeof(__pyx_k_cuMemcpy3DAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy3DAsync_v2 */ + {__pyx_k_cuMemcpy3DBatchAsync, sizeof(__pyx_k_cuMemcpy3DBatchAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy3DBatchAsync */ + {__pyx_k_cuMemcpy3DPeer, sizeof(__pyx_k_cuMemcpy3DPeer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy3DPeer */ + {__pyx_k_cuMemcpy3DPeerAsync, sizeof(__pyx_k_cuMemcpy3DPeerAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy3DPeerAsync */ + {__pyx_k_cuMemcpy3D_v2, sizeof(__pyx_k_cuMemcpy3D_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpy3D_v2 */ + {__pyx_k_cuMemcpyAsync, sizeof(__pyx_k_cuMemcpyAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyAsync */ + {__pyx_k_cuMemcpyAtoA_v2, sizeof(__pyx_k_cuMemcpyAtoA_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyAtoA_v2 */ + {__pyx_k_cuMemcpyAtoD_v2, sizeof(__pyx_k_cuMemcpyAtoD_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyAtoD_v2 */ + {__pyx_k_cuMemcpyAtoHAsync_v2, sizeof(__pyx_k_cuMemcpyAtoHAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyAtoHAsync_v2 */ + {__pyx_k_cuMemcpyAtoH_v2, sizeof(__pyx_k_cuMemcpyAtoH_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyAtoH_v2 */ + {__pyx_k_cuMemcpyBatchAsync, sizeof(__pyx_k_cuMemcpyBatchAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyBatchAsync */ + {__pyx_k_cuMemcpyDtoA_v2, sizeof(__pyx_k_cuMemcpyDtoA_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyDtoA_v2 */ + {__pyx_k_cuMemcpyDtoDAsync_v2, sizeof(__pyx_k_cuMemcpyDtoDAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyDtoDAsync_v2 */ + {__pyx_k_cuMemcpyDtoD_v2, sizeof(__pyx_k_cuMemcpyDtoD_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyDtoD_v2 */ + {__pyx_k_cuMemcpyDtoHAsync_v2, sizeof(__pyx_k_cuMemcpyDtoHAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyDtoHAsync_v2 */ + {__pyx_k_cuMemcpyDtoH_v2, sizeof(__pyx_k_cuMemcpyDtoH_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyDtoH_v2 */ + {__pyx_k_cuMemcpyHtoAAsync_v2, sizeof(__pyx_k_cuMemcpyHtoAAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyHtoAAsync_v2 */ + {__pyx_k_cuMemcpyHtoA_v2, sizeof(__pyx_k_cuMemcpyHtoA_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyHtoA_v2 */ + {__pyx_k_cuMemcpyHtoDAsync_v2, sizeof(__pyx_k_cuMemcpyHtoDAsync_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyHtoDAsync_v2 */ + {__pyx_k_cuMemcpyHtoD_v2, sizeof(__pyx_k_cuMemcpyHtoD_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyHtoD_v2 */ + {__pyx_k_cuMemcpyPeer, sizeof(__pyx_k_cuMemcpyPeer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyPeer */ + {__pyx_k_cuMemcpyPeerAsync, sizeof(__pyx_k_cuMemcpyPeerAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemcpyPeerAsync */ + {__pyx_k_cuMemsetD16Async, sizeof(__pyx_k_cuMemsetD16Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD16Async */ + {__pyx_k_cuMemsetD16_v2, sizeof(__pyx_k_cuMemsetD16_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD16_v2 */ + {__pyx_k_cuMemsetD2D16Async, sizeof(__pyx_k_cuMemsetD2D16Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D16Async */ + {__pyx_k_cuMemsetD2D16_v2, sizeof(__pyx_k_cuMemsetD2D16_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D16_v2 */ + {__pyx_k_cuMemsetD2D32Async, sizeof(__pyx_k_cuMemsetD2D32Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D32Async */ + {__pyx_k_cuMemsetD2D32_v2, sizeof(__pyx_k_cuMemsetD2D32_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D32_v2 */ + {__pyx_k_cuMemsetD2D8Async, sizeof(__pyx_k_cuMemsetD2D8Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D8Async */ + {__pyx_k_cuMemsetD2D8_v2, sizeof(__pyx_k_cuMemsetD2D8_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD2D8_v2 */ + {__pyx_k_cuMemsetD32Async, sizeof(__pyx_k_cuMemsetD32Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD32Async */ + {__pyx_k_cuMemsetD32_v2, sizeof(__pyx_k_cuMemsetD32_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD32_v2 */ + {__pyx_k_cuMemsetD8Async, sizeof(__pyx_k_cuMemsetD8Async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD8Async */ + {__pyx_k_cuMemsetD8_v2, sizeof(__pyx_k_cuMemsetD8_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMemsetD8_v2 */ + {__pyx_k_cuMipmappedArrayCreate, sizeof(__pyx_k_cuMipmappedArrayCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMipmappedArrayCreate */ + {__pyx_k_cuMipmappedArrayDestroy, sizeof(__pyx_k_cuMipmappedArrayDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMipmappedArrayDestroy */ + {__pyx_k_cuMipmappedArrayGetLevel, sizeof(__pyx_k_cuMipmappedArrayGetLevel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMipmappedArrayGetLevel */ + {__pyx_k_cuMipmappedArrayGetMemoryRequi, sizeof(__pyx_k_cuMipmappedArrayGetMemoryRequi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMipmappedArrayGetMemoryRequi */ + {__pyx_k_cuMipmappedArrayGetSparsePrope, sizeof(__pyx_k_cuMipmappedArrayGetSparsePrope), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMipmappedArrayGetSparsePrope */ + {__pyx_k_cuModuleEnumerateFunctions, sizeof(__pyx_k_cuModuleEnumerateFunctions), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleEnumerateFunctions */ + {__pyx_k_cuModuleGetFunction, sizeof(__pyx_k_cuModuleGetFunction), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetFunction */ + {__pyx_k_cuModuleGetFunctionCount, sizeof(__pyx_k_cuModuleGetFunctionCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetFunctionCount */ + {__pyx_k_cuModuleGetGlobal_v2, sizeof(__pyx_k_cuModuleGetGlobal_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetGlobal_v2 */ + {__pyx_k_cuModuleGetLoadingMode, sizeof(__pyx_k_cuModuleGetLoadingMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetLoadingMode */ + {__pyx_k_cuModuleGetSurfRef, sizeof(__pyx_k_cuModuleGetSurfRef), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetSurfRef */ + {__pyx_k_cuModuleGetTexRef, sizeof(__pyx_k_cuModuleGetTexRef), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleGetTexRef */ + {__pyx_k_cuModuleLoad, sizeof(__pyx_k_cuModuleLoad), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleLoad */ + {__pyx_k_cuModuleLoadData, sizeof(__pyx_k_cuModuleLoadData), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleLoadData */ + {__pyx_k_cuModuleLoadDataEx, sizeof(__pyx_k_cuModuleLoadDataEx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleLoadDataEx */ + {__pyx_k_cuModuleLoadFatBinary, sizeof(__pyx_k_cuModuleLoadFatBinary), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleLoadFatBinary */ + {__pyx_k_cuModuleUnload, sizeof(__pyx_k_cuModuleUnload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuModuleUnload */ + {__pyx_k_cuMulticastAddDevice, sizeof(__pyx_k_cuMulticastAddDevice), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastAddDevice */ + {__pyx_k_cuMulticastBindAddr, sizeof(__pyx_k_cuMulticastBindAddr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastBindAddr */ + {__pyx_k_cuMulticastBindMem, sizeof(__pyx_k_cuMulticastBindMem), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastBindMem */ + {__pyx_k_cuMulticastCreate, sizeof(__pyx_k_cuMulticastCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastCreate */ + {__pyx_k_cuMulticastGetGranularity, sizeof(__pyx_k_cuMulticastGetGranularity), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastGetGranularity */ + {__pyx_k_cuMulticastUnbind, sizeof(__pyx_k_cuMulticastUnbind), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuMulticastUnbind */ + {__pyx_k_cuOccupancyAvailableDynamicSMe, sizeof(__pyx_k_cuOccupancyAvailableDynamicSMe), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyAvailableDynamicSMe */ + {__pyx_k_cuOccupancyMaxActiveBlocksPerM, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxActiveBlocksPerM */ + {__pyx_k_cuOccupancyMaxActiveBlocksPerM_2, sizeof(__pyx_k_cuOccupancyMaxActiveBlocksPerM_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxActiveBlocksPerM_2 */ + {__pyx_k_cuOccupancyMaxActiveClusters, sizeof(__pyx_k_cuOccupancyMaxActiveClusters), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxActiveClusters */ + {__pyx_k_cuOccupancyMaxPotentialBlockSi, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSi), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxPotentialBlockSi */ + {__pyx_k_cuOccupancyMaxPotentialBlockSi_2, sizeof(__pyx_k_cuOccupancyMaxPotentialBlockSi_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxPotentialBlockSi_2 */ + {__pyx_k_cuOccupancyMaxPotentialCluster, sizeof(__pyx_k_cuOccupancyMaxPotentialCluster), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuOccupancyMaxPotentialCluster */ + {__pyx_k_cuParamSetSize, sizeof(__pyx_k_cuParamSetSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuParamSetSize */ + {__pyx_k_cuParamSetTexRef, sizeof(__pyx_k_cuParamSetTexRef), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuParamSetTexRef */ + {__pyx_k_cuParamSetf, sizeof(__pyx_k_cuParamSetf), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuParamSetf */ + {__pyx_k_cuParamSeti, sizeof(__pyx_k_cuParamSeti), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuParamSeti */ + {__pyx_k_cuParamSetv, sizeof(__pyx_k_cuParamSetv), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuParamSetv */ + {__pyx_k_cuPointerGetAttribute, sizeof(__pyx_k_cuPointerGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuPointerGetAttribute */ + {__pyx_k_cuPointerGetAttributes, sizeof(__pyx_k_cuPointerGetAttributes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuPointerGetAttributes */ + {__pyx_k_cuPointerSetAttribute, sizeof(__pyx_k_cuPointerSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuPointerSetAttribute */ + {__pyx_k_cuProfilerStart, sizeof(__pyx_k_cuProfilerStart), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuProfilerStart */ + {__pyx_k_cuProfilerStop, sizeof(__pyx_k_cuProfilerStop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuProfilerStop */ + {__pyx_k_cuSignalExternalSemaphoresAsyn, sizeof(__pyx_k_cuSignalExternalSemaphoresAsyn), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSignalExternalSemaphoresAsyn */ + {__pyx_k_cuStreamAddCallback, sizeof(__pyx_k_cuStreamAddCallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamAddCallback */ + {__pyx_k_cuStreamAttachMemAsync, sizeof(__pyx_k_cuStreamAttachMemAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamAttachMemAsync */ + {__pyx_k_cuStreamBatchMemOp_v2, sizeof(__pyx_k_cuStreamBatchMemOp_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamBatchMemOp_v2 */ + {__pyx_k_cuStreamBeginCaptureToGraph, sizeof(__pyx_k_cuStreamBeginCaptureToGraph), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamBeginCaptureToGraph */ + {__pyx_k_cuStreamBeginCapture_v2, sizeof(__pyx_k_cuStreamBeginCapture_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamBeginCapture_v2 */ + {__pyx_k_cuStreamCopyAttributes, sizeof(__pyx_k_cuStreamCopyAttributes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamCopyAttributes */ + {__pyx_k_cuStreamCreate, sizeof(__pyx_k_cuStreamCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamCreate */ + {__pyx_k_cuStreamCreateWithPriority, sizeof(__pyx_k_cuStreamCreateWithPriority), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamCreateWithPriority */ + {__pyx_k_cuStreamDestroy_v2, sizeof(__pyx_k_cuStreamDestroy_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamDestroy_v2 */ + {__pyx_k_cuStreamEndCapture, sizeof(__pyx_k_cuStreamEndCapture), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamEndCapture */ + {__pyx_k_cuStreamGetAttribute, sizeof(__pyx_k_cuStreamGetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetAttribute */ + {__pyx_k_cuStreamGetCaptureInfo_v2, sizeof(__pyx_k_cuStreamGetCaptureInfo_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetCaptureInfo_v2 */ + {__pyx_k_cuStreamGetCaptureInfo_v3, sizeof(__pyx_k_cuStreamGetCaptureInfo_v3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetCaptureInfo_v3 */ + {__pyx_k_cuStreamGetCtx, sizeof(__pyx_k_cuStreamGetCtx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetCtx */ + {__pyx_k_cuStreamGetCtx_v2, sizeof(__pyx_k_cuStreamGetCtx_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetCtx_v2 */ + {__pyx_k_cuStreamGetDevice, sizeof(__pyx_k_cuStreamGetDevice), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetDevice */ + {__pyx_k_cuStreamGetFlags, sizeof(__pyx_k_cuStreamGetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetFlags */ + {__pyx_k_cuStreamGetGreenCtx, sizeof(__pyx_k_cuStreamGetGreenCtx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetGreenCtx */ + {__pyx_k_cuStreamGetId, sizeof(__pyx_k_cuStreamGetId), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetId */ + {__pyx_k_cuStreamGetPriority, sizeof(__pyx_k_cuStreamGetPriority), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamGetPriority */ + {__pyx_k_cuStreamIsCapturing, sizeof(__pyx_k_cuStreamIsCapturing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamIsCapturing */ + {__pyx_k_cuStreamQuery, sizeof(__pyx_k_cuStreamQuery), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamQuery */ + {__pyx_k_cuStreamSetAttribute, sizeof(__pyx_k_cuStreamSetAttribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamSetAttribute */ + {__pyx_k_cuStreamSynchronize, sizeof(__pyx_k_cuStreamSynchronize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamSynchronize */ + {__pyx_k_cuStreamUpdateCaptureDependenc, sizeof(__pyx_k_cuStreamUpdateCaptureDependenc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamUpdateCaptureDependenc */ + {__pyx_k_cuStreamUpdateCaptureDependenc_2, sizeof(__pyx_k_cuStreamUpdateCaptureDependenc_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamUpdateCaptureDependenc_2 */ + {__pyx_k_cuStreamWaitEvent, sizeof(__pyx_k_cuStreamWaitEvent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamWaitEvent */ + {__pyx_k_cuStreamWaitValue32_v2, sizeof(__pyx_k_cuStreamWaitValue32_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamWaitValue32_v2 */ + {__pyx_k_cuStreamWaitValue64_v2, sizeof(__pyx_k_cuStreamWaitValue64_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamWaitValue64_v2 */ + {__pyx_k_cuStreamWriteValue32_v2, sizeof(__pyx_k_cuStreamWriteValue32_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamWriteValue32_v2 */ + {__pyx_k_cuStreamWriteValue64_v2, sizeof(__pyx_k_cuStreamWriteValue64_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuStreamWriteValue64_v2 */ + {__pyx_k_cuSurfObjectCreate, sizeof(__pyx_k_cuSurfObjectCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSurfObjectCreate */ + {__pyx_k_cuSurfObjectDestroy, sizeof(__pyx_k_cuSurfObjectDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSurfObjectDestroy */ + {__pyx_k_cuSurfObjectGetResourceDesc, sizeof(__pyx_k_cuSurfObjectGetResourceDesc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSurfObjectGetResourceDesc */ + {__pyx_k_cuSurfRefGetArray, sizeof(__pyx_k_cuSurfRefGetArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSurfRefGetArray */ + {__pyx_k_cuSurfRefSetArray, sizeof(__pyx_k_cuSurfRefSetArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuSurfRefSetArray */ + {__pyx_k_cuTensorMapEncodeIm2col, sizeof(__pyx_k_cuTensorMapEncodeIm2col), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTensorMapEncodeIm2col */ + {__pyx_k_cuTensorMapEncodeIm2colWide, sizeof(__pyx_k_cuTensorMapEncodeIm2colWide), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTensorMapEncodeIm2colWide */ + {__pyx_k_cuTensorMapEncodeTiled, sizeof(__pyx_k_cuTensorMapEncodeTiled), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTensorMapEncodeTiled */ + {__pyx_k_cuTensorMapReplaceAddress, sizeof(__pyx_k_cuTensorMapReplaceAddress), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTensorMapReplaceAddress */ + {__pyx_k_cuTexObjectCreate, sizeof(__pyx_k_cuTexObjectCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexObjectCreate */ + {__pyx_k_cuTexObjectDestroy, sizeof(__pyx_k_cuTexObjectDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexObjectDestroy */ + {__pyx_k_cuTexObjectGetResourceDesc, sizeof(__pyx_k_cuTexObjectGetResourceDesc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexObjectGetResourceDesc */ + {__pyx_k_cuTexObjectGetResourceViewDesc, sizeof(__pyx_k_cuTexObjectGetResourceViewDesc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexObjectGetResourceViewDesc */ + {__pyx_k_cuTexObjectGetTextureDesc, sizeof(__pyx_k_cuTexObjectGetTextureDesc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexObjectGetTextureDesc */ + {__pyx_k_cuTexRefCreate, sizeof(__pyx_k_cuTexRefCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefCreate */ + {__pyx_k_cuTexRefDestroy, sizeof(__pyx_k_cuTexRefDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefDestroy */ + {__pyx_k_cuTexRefGetAddressMode, sizeof(__pyx_k_cuTexRefGetAddressMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetAddressMode */ + {__pyx_k_cuTexRefGetAddress_v2, sizeof(__pyx_k_cuTexRefGetAddress_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetAddress_v2 */ + {__pyx_k_cuTexRefGetArray, sizeof(__pyx_k_cuTexRefGetArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetArray */ + {__pyx_k_cuTexRefGetBorderColor, sizeof(__pyx_k_cuTexRefGetBorderColor), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetBorderColor */ + {__pyx_k_cuTexRefGetFilterMode, sizeof(__pyx_k_cuTexRefGetFilterMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetFilterMode */ + {__pyx_k_cuTexRefGetFlags, sizeof(__pyx_k_cuTexRefGetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetFlags */ + {__pyx_k_cuTexRefGetFormat, sizeof(__pyx_k_cuTexRefGetFormat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetFormat */ + {__pyx_k_cuTexRefGetMaxAnisotropy, sizeof(__pyx_k_cuTexRefGetMaxAnisotropy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetMaxAnisotropy */ + {__pyx_k_cuTexRefGetMipmapFilterMode, sizeof(__pyx_k_cuTexRefGetMipmapFilterMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetMipmapFilterMode */ + {__pyx_k_cuTexRefGetMipmapLevelBias, sizeof(__pyx_k_cuTexRefGetMipmapLevelBias), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetMipmapLevelBias */ + {__pyx_k_cuTexRefGetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefGetMipmapLevelClamp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetMipmapLevelClamp */ + {__pyx_k_cuTexRefGetMipmappedArray, sizeof(__pyx_k_cuTexRefGetMipmappedArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefGetMipmappedArray */ + {__pyx_k_cuTexRefSetAddress2D_v3, sizeof(__pyx_k_cuTexRefSetAddress2D_v3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetAddress2D_v3 */ + {__pyx_k_cuTexRefSetAddressMode, sizeof(__pyx_k_cuTexRefSetAddressMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetAddressMode */ + {__pyx_k_cuTexRefSetAddress_v2, sizeof(__pyx_k_cuTexRefSetAddress_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetAddress_v2 */ + {__pyx_k_cuTexRefSetArray, sizeof(__pyx_k_cuTexRefSetArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetArray */ + {__pyx_k_cuTexRefSetBorderColor, sizeof(__pyx_k_cuTexRefSetBorderColor), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetBorderColor */ + {__pyx_k_cuTexRefSetFilterMode, sizeof(__pyx_k_cuTexRefSetFilterMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetFilterMode */ + {__pyx_k_cuTexRefSetFlags, sizeof(__pyx_k_cuTexRefSetFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetFlags */ + {__pyx_k_cuTexRefSetFormat, sizeof(__pyx_k_cuTexRefSetFormat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetFormat */ + {__pyx_k_cuTexRefSetMaxAnisotropy, sizeof(__pyx_k_cuTexRefSetMaxAnisotropy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetMaxAnisotropy */ + {__pyx_k_cuTexRefSetMipmapFilterMode, sizeof(__pyx_k_cuTexRefSetMipmapFilterMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetMipmapFilterMode */ + {__pyx_k_cuTexRefSetMipmapLevelBias, sizeof(__pyx_k_cuTexRefSetMipmapLevelBias), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetMipmapLevelBias */ + {__pyx_k_cuTexRefSetMipmapLevelClamp, sizeof(__pyx_k_cuTexRefSetMipmapLevelClamp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetMipmapLevelClamp */ + {__pyx_k_cuTexRefSetMipmappedArray, sizeof(__pyx_k_cuTexRefSetMipmappedArray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuTexRefSetMipmappedArray */ + {__pyx_k_cuThreadExchangeStreamCaptureM, sizeof(__pyx_k_cuThreadExchangeStreamCaptureM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuThreadExchangeStreamCaptureM */ + {__pyx_k_cuUserObjectCreate, sizeof(__pyx_k_cuUserObjectCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuUserObjectCreate */ + {__pyx_k_cuUserObjectRelease, sizeof(__pyx_k_cuUserObjectRelease), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuUserObjectRelease */ + {__pyx_k_cuUserObjectRetain, sizeof(__pyx_k_cuUserObjectRetain), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuUserObjectRetain */ + {__pyx_k_cuVDPAUCtxCreate_v2, sizeof(__pyx_k_cuVDPAUCtxCreate_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuVDPAUCtxCreate_v2 */ + {__pyx_k_cuVDPAUGetDevice, sizeof(__pyx_k_cuVDPAUGetDevice), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuVDPAUGetDevice */ + {__pyx_k_cuWaitExternalSemaphoresAsync, sizeof(__pyx_k_cuWaitExternalSemaphoresAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuWaitExternalSemaphoresAsync */ + {__pyx_k_cuda_bindings__bindings_cydriver, sizeof(__pyx_k_cuda_bindings__bindings_cydriver), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__bindings_cydriver */ + {__pyx_k_cuda_bindings__bindings_cydriver_2, sizeof(__pyx_k_cuda_bindings__bindings_cydriver_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__bindings_cydriver_2 */ + {__pyx_k_default, sizeof(__pyx_k_default), 0, 1, 1}, /* PyObject cname: __pyx_n_u_default */ + {__pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 1, 1}, /* PyObject cname: __pyx_n_u_encoding */ + {__pyx_k_enter, sizeof(__pyx_k_enter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enter */ + {__pyx_k_exit, sizeof(__pyx_k_exit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_exit */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_getenv, sizeof(__pyx_k_getenv), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getenv */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_inspect_function_pointer, sizeof(__pyx_k_inspect_function_pointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointer */ + {__pyx_k_inspect_function_pointers, sizeof(__pyx_k_inspect_function_pointers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointers */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_libcuda_so_1, sizeof(__pyx_k_libcuda_so_1), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_libcuda_so_1 */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_maxsize, sizeof(__pyx_k_maxsize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_maxsize */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_os, sizeof(__pyx_k_os), 0, 1, 1}, /* PyObject cname: __pyx_n_u_os */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_sys, sizeof(__pyx_k_sys), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sys */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_threading, sizeof(__pyx_k_threading), 0, 1, 1}, /* PyObject cname: __pyx_n_u_threading */ + {__pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_utf_8 */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 510, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_bindings/cydriver.pyx":498 + * cdef char libPath[260] + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) + * +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_4294967296 = PyLong_FromString("4294967296", 0, 0); if (unlikely(!__pyx_mstate->__pyx_int_4294967296)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 1; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 1; + unsigned int flags : 10; + unsigned int first_line : 13; + unsigned int line_table_length : 18; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7038, 7133}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__bindings_cydriver_2, __pyx_mstate->__pyx_n_u_inspect_function_pointers, __pyx_k_z_q_Q_1_z_z_Q_Ja_1_Q_Ja_3_Q_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 7996, 31}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__bindings_cydriver_2, __pyx_mstate->__pyx_n_u_inspect_function_pointer, __pyx_k_z_A_a_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* decode_c_string */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..8dfd6f87f05364a6836ee91ce11d0732e0944412 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pxd @@ -0,0 +1,951 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +from cuda.bindings.cydriver cimport * + +cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pyx new file mode 100644 index 0000000000000000000000000000000000000000..f82bbea49d242ed5ea93311fd604ec522e8ee391 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cydriver.pyx @@ -0,0 +1,8000 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings._lib.dlfcn as dlfcn +from libc.stdint cimport intptr_t, uintptr_t +import os +import sys +cimport cuda.bindings._bindings.loader as loader +import threading + +cdef object __symbol_lock = threading.Lock() +cdef bint __cuPythonInit = False +cdef void *__cuGetErrorString = NULL +cdef void *__cuGetErrorName = NULL +cdef void *__cuInit = NULL +cdef void *__cuDriverGetVersion = NULL +cdef void *__cuDeviceGet = NULL +cdef void *__cuDeviceGetCount = NULL +cdef void *__cuDeviceGetName = NULL +cdef void *__cuDeviceGetUuid = NULL +cdef void *__cuDeviceGetUuid_v2 = NULL +cdef void *__cuDeviceGetLuid = NULL +cdef void *__cuDeviceTotalMem_v2 = NULL +cdef void *__cuDeviceGetTexture1DLinearMaxWidth = NULL +cdef void *__cuDeviceGetAttribute = NULL +cdef void *__cuDeviceGetNvSciSyncAttributes = NULL +cdef void *__cuDeviceSetMemPool = NULL +cdef void *__cuDeviceGetMemPool = NULL +cdef void *__cuDeviceGetDefaultMemPool = NULL +cdef void *__cuDeviceGetExecAffinitySupport = NULL +cdef void *__cuFlushGPUDirectRDMAWrites = NULL +cdef void *__cuDeviceGetProperties = NULL +cdef void *__cuDeviceComputeCapability = NULL +cdef void *__cuDevicePrimaryCtxRetain = NULL +cdef void *__cuDevicePrimaryCtxRelease_v2 = NULL +cdef void *__cuDevicePrimaryCtxSetFlags_v2 = NULL +cdef void *__cuDevicePrimaryCtxGetState = NULL +cdef void *__cuDevicePrimaryCtxReset_v2 = NULL +cdef void *__cuCtxCreate_v2 = NULL +cdef void *__cuCtxCreate_v3 = NULL +cdef void *__cuCtxCreate_v4 = NULL +cdef void *__cuCtxDestroy_v2 = NULL +cdef void *__cuCtxPushCurrent_v2 = NULL +cdef void *__cuCtxPopCurrent_v2 = NULL +cdef void *__cuCtxSetCurrent = NULL +cdef void *__cuCtxGetCurrent = NULL +cdef void *__cuCtxGetDevice = NULL +cdef void *__cuCtxGetFlags = NULL +cdef void *__cuCtxSetFlags = NULL +cdef void *__cuCtxGetId = NULL +cdef void *__cuCtxSynchronize = NULL +cdef void *__cuCtxSetLimit = NULL +cdef void *__cuCtxGetLimit = NULL +cdef void *__cuCtxGetCacheConfig = NULL +cdef void *__cuCtxSetCacheConfig = NULL +cdef void *__cuCtxGetApiVersion = NULL +cdef void *__cuCtxGetStreamPriorityRange = NULL +cdef void *__cuCtxResetPersistingL2Cache = NULL +cdef void *__cuCtxGetExecAffinity = NULL +cdef void *__cuCtxRecordEvent = NULL +cdef void *__cuCtxWaitEvent = NULL +cdef void *__cuCtxAttach = NULL +cdef void *__cuCtxDetach = NULL +cdef void *__cuCtxGetSharedMemConfig = NULL +cdef void *__cuCtxSetSharedMemConfig = NULL +cdef void *__cuModuleLoad = NULL +cdef void *__cuModuleLoadData = NULL +cdef void *__cuModuleLoadDataEx = NULL +cdef void *__cuModuleLoadFatBinary = NULL +cdef void *__cuModuleUnload = NULL +cdef void *__cuModuleGetLoadingMode = NULL +cdef void *__cuModuleGetFunction = NULL +cdef void *__cuModuleGetFunctionCount = NULL +cdef void *__cuModuleEnumerateFunctions = NULL +cdef void *__cuModuleGetGlobal_v2 = NULL +cdef void *__cuLinkCreate_v2 = NULL +cdef void *__cuLinkAddData_v2 = NULL +cdef void *__cuLinkAddFile_v2 = NULL +cdef void *__cuLinkComplete = NULL +cdef void *__cuLinkDestroy = NULL +cdef void *__cuModuleGetTexRef = NULL +cdef void *__cuModuleGetSurfRef = NULL +cdef void *__cuLibraryLoadData = NULL +cdef void *__cuLibraryLoadFromFile = NULL +cdef void *__cuLibraryUnload = NULL +cdef void *__cuLibraryGetKernel = NULL +cdef void *__cuLibraryGetKernelCount = NULL +cdef void *__cuLibraryEnumerateKernels = NULL +cdef void *__cuLibraryGetModule = NULL +cdef void *__cuKernelGetFunction = NULL +cdef void *__cuKernelGetLibrary = NULL +cdef void *__cuLibraryGetGlobal = NULL +cdef void *__cuLibraryGetManaged = NULL +cdef void *__cuLibraryGetUnifiedFunction = NULL +cdef void *__cuKernelGetAttribute = NULL +cdef void *__cuKernelSetAttribute = NULL +cdef void *__cuKernelSetCacheConfig = NULL +cdef void *__cuKernelGetName = NULL +cdef void *__cuKernelGetParamInfo = NULL +cdef void *__cuMemGetInfo_v2 = NULL +cdef void *__cuMemAlloc_v2 = NULL +cdef void *__cuMemAllocPitch_v2 = NULL +cdef void *__cuMemFree_v2 = NULL +cdef void *__cuMemGetAddressRange_v2 = NULL +cdef void *__cuMemAllocHost_v2 = NULL +cdef void *__cuMemFreeHost = NULL +cdef void *__cuMemHostAlloc = NULL +cdef void *__cuMemHostGetDevicePointer_v2 = NULL +cdef void *__cuMemHostGetFlags = NULL +cdef void *__cuMemAllocManaged = NULL +cdef void *__cuDeviceRegisterAsyncNotification = NULL +cdef void *__cuDeviceUnregisterAsyncNotification = NULL +cdef void *__cuDeviceGetByPCIBusId = NULL +cdef void *__cuDeviceGetPCIBusId = NULL +cdef void *__cuIpcGetEventHandle = NULL +cdef void *__cuIpcOpenEventHandle = NULL +cdef void *__cuIpcGetMemHandle = NULL +cdef void *__cuIpcOpenMemHandle_v2 = NULL +cdef void *__cuIpcCloseMemHandle = NULL +cdef void *__cuMemHostRegister_v2 = NULL +cdef void *__cuMemHostUnregister = NULL +cdef void *__cuMemcpy = NULL +cdef void *__cuMemcpyPeer = NULL +cdef void *__cuMemcpyHtoD_v2 = NULL +cdef void *__cuMemcpyDtoH_v2 = NULL +cdef void *__cuMemcpyDtoD_v2 = NULL +cdef void *__cuMemcpyDtoA_v2 = NULL +cdef void *__cuMemcpyAtoD_v2 = NULL +cdef void *__cuMemcpyHtoA_v2 = NULL +cdef void *__cuMemcpyAtoH_v2 = NULL +cdef void *__cuMemcpyAtoA_v2 = NULL +cdef void *__cuMemcpy2D_v2 = NULL +cdef void *__cuMemcpy2DUnaligned_v2 = NULL +cdef void *__cuMemcpy3D_v2 = NULL +cdef void *__cuMemcpy3DPeer = NULL +cdef void *__cuMemcpyAsync = NULL +cdef void *__cuMemcpyPeerAsync = NULL +cdef void *__cuMemcpyHtoDAsync_v2 = NULL +cdef void *__cuMemcpyDtoHAsync_v2 = NULL +cdef void *__cuMemcpyDtoDAsync_v2 = NULL +cdef void *__cuMemcpyHtoAAsync_v2 = NULL +cdef void *__cuMemcpyAtoHAsync_v2 = NULL +cdef void *__cuMemcpy2DAsync_v2 = NULL +cdef void *__cuMemcpy3DAsync_v2 = NULL +cdef void *__cuMemcpy3DPeerAsync = NULL +cdef void *__cuMemcpyBatchAsync = NULL +cdef void *__cuMemcpy3DBatchAsync = NULL +cdef void *__cuMemsetD8_v2 = NULL +cdef void *__cuMemsetD16_v2 = NULL +cdef void *__cuMemsetD32_v2 = NULL +cdef void *__cuMemsetD2D8_v2 = NULL +cdef void *__cuMemsetD2D16_v2 = NULL +cdef void *__cuMemsetD2D32_v2 = NULL +cdef void *__cuMemsetD8Async = NULL +cdef void *__cuMemsetD16Async = NULL +cdef void *__cuMemsetD32Async = NULL +cdef void *__cuMemsetD2D8Async = NULL +cdef void *__cuMemsetD2D16Async = NULL +cdef void *__cuMemsetD2D32Async = NULL +cdef void *__cuArrayCreate_v2 = NULL +cdef void *__cuArrayGetDescriptor_v2 = NULL +cdef void *__cuArrayGetSparseProperties = NULL +cdef void *__cuMipmappedArrayGetSparseProperties = NULL +cdef void *__cuArrayGetMemoryRequirements = NULL +cdef void *__cuMipmappedArrayGetMemoryRequirements = NULL +cdef void *__cuArrayGetPlane = NULL +cdef void *__cuArrayDestroy = NULL +cdef void *__cuArray3DCreate_v2 = NULL +cdef void *__cuArray3DGetDescriptor_v2 = NULL +cdef void *__cuMipmappedArrayCreate = NULL +cdef void *__cuMipmappedArrayGetLevel = NULL +cdef void *__cuMipmappedArrayDestroy = NULL +cdef void *__cuMemGetHandleForAddressRange = NULL +cdef void *__cuMemBatchDecompressAsync = NULL +cdef void *__cuMemAddressReserve = NULL +cdef void *__cuMemAddressFree = NULL +cdef void *__cuMemCreate = NULL +cdef void *__cuMemRelease = NULL +cdef void *__cuMemMap = NULL +cdef void *__cuMemMapArrayAsync = NULL +cdef void *__cuMemUnmap = NULL +cdef void *__cuMemSetAccess = NULL +cdef void *__cuMemGetAccess = NULL +cdef void *__cuMemExportToShareableHandle = NULL +cdef void *__cuMemImportFromShareableHandle = NULL +cdef void *__cuMemGetAllocationGranularity = NULL +cdef void *__cuMemGetAllocationPropertiesFromHandle = NULL +cdef void *__cuMemRetainAllocationHandle = NULL +cdef void *__cuMemFreeAsync = NULL +cdef void *__cuMemAllocAsync = NULL +cdef void *__cuMemPoolTrimTo = NULL +cdef void *__cuMemPoolSetAttribute = NULL +cdef void *__cuMemPoolGetAttribute = NULL +cdef void *__cuMemPoolSetAccess = NULL +cdef void *__cuMemPoolGetAccess = NULL +cdef void *__cuMemPoolCreate = NULL +cdef void *__cuMemPoolDestroy = NULL +cdef void *__cuMemAllocFromPoolAsync = NULL +cdef void *__cuMemPoolExportToShareableHandle = NULL +cdef void *__cuMemPoolImportFromShareableHandle = NULL +cdef void *__cuMemPoolExportPointer = NULL +cdef void *__cuMemPoolImportPointer = NULL +cdef void *__cuMulticastCreate = NULL +cdef void *__cuMulticastAddDevice = NULL +cdef void *__cuMulticastBindMem = NULL +cdef void *__cuMulticastBindAddr = NULL +cdef void *__cuMulticastUnbind = NULL +cdef void *__cuMulticastGetGranularity = NULL +cdef void *__cuPointerGetAttribute = NULL +cdef void *__cuMemPrefetchAsync = NULL +cdef void *__cuMemPrefetchAsync_v2 = NULL +cdef void *__cuMemAdvise = NULL +cdef void *__cuMemAdvise_v2 = NULL +cdef void *__cuMemRangeGetAttribute = NULL +cdef void *__cuMemRangeGetAttributes = NULL +cdef void *__cuPointerSetAttribute = NULL +cdef void *__cuPointerGetAttributes = NULL +cdef void *__cuStreamCreate = NULL +cdef void *__cuStreamCreateWithPriority = NULL +cdef void *__cuStreamGetPriority = NULL +cdef void *__cuStreamGetDevice = NULL +cdef void *__cuStreamGetFlags = NULL +cdef void *__cuStreamGetId = NULL +cdef void *__cuStreamGetCtx = NULL +cdef void *__cuStreamGetCtx_v2 = NULL +cdef void *__cuStreamWaitEvent = NULL +cdef void *__cuStreamAddCallback = NULL +cdef void *__cuStreamBeginCapture_v2 = NULL +cdef void *__cuStreamBeginCaptureToGraph = NULL +cdef void *__cuThreadExchangeStreamCaptureMode = NULL +cdef void *__cuStreamEndCapture = NULL +cdef void *__cuStreamIsCapturing = NULL +cdef void *__cuStreamGetCaptureInfo_v2 = NULL +cdef void *__cuStreamGetCaptureInfo_v3 = NULL +cdef void *__cuStreamUpdateCaptureDependencies = NULL +cdef void *__cuStreamUpdateCaptureDependencies_v2 = NULL +cdef void *__cuStreamAttachMemAsync = NULL +cdef void *__cuStreamQuery = NULL +cdef void *__cuStreamSynchronize = NULL +cdef void *__cuStreamDestroy_v2 = NULL +cdef void *__cuStreamCopyAttributes = NULL +cdef void *__cuStreamGetAttribute = NULL +cdef void *__cuStreamSetAttribute = NULL +cdef void *__cuEventCreate = NULL +cdef void *__cuEventRecord = NULL +cdef void *__cuEventRecordWithFlags = NULL +cdef void *__cuEventQuery = NULL +cdef void *__cuEventSynchronize = NULL +cdef void *__cuEventDestroy_v2 = NULL +cdef void *__cuEventElapsedTime = NULL +cdef void *__cuEventElapsedTime_v2 = NULL +cdef void *__cuImportExternalMemory = NULL +cdef void *__cuExternalMemoryGetMappedBuffer = NULL +cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL +cdef void *__cuDestroyExternalMemory = NULL +cdef void *__cuImportExternalSemaphore = NULL +cdef void *__cuSignalExternalSemaphoresAsync = NULL +cdef void *__cuWaitExternalSemaphoresAsync = NULL +cdef void *__cuDestroyExternalSemaphore = NULL +cdef void *__cuStreamWaitValue32_v2 = NULL +cdef void *__cuStreamWaitValue64_v2 = NULL +cdef void *__cuStreamWriteValue32_v2 = NULL +cdef void *__cuStreamWriteValue64_v2 = NULL +cdef void *__cuStreamBatchMemOp_v2 = NULL +cdef void *__cuFuncGetAttribute = NULL +cdef void *__cuFuncSetAttribute = NULL +cdef void *__cuFuncSetCacheConfig = NULL +cdef void *__cuFuncGetModule = NULL +cdef void *__cuFuncGetName = NULL +cdef void *__cuFuncGetParamInfo = NULL +cdef void *__cuFuncIsLoaded = NULL +cdef void *__cuFuncLoad = NULL +cdef void *__cuLaunchKernel = NULL +cdef void *__cuLaunchKernelEx = NULL +cdef void *__cuLaunchCooperativeKernel = NULL +cdef void *__cuLaunchCooperativeKernelMultiDevice = NULL +cdef void *__cuLaunchHostFunc = NULL +cdef void *__cuFuncSetBlockShape = NULL +cdef void *__cuFuncSetSharedSize = NULL +cdef void *__cuParamSetSize = NULL +cdef void *__cuParamSeti = NULL +cdef void *__cuParamSetf = NULL +cdef void *__cuParamSetv = NULL +cdef void *__cuLaunch = NULL +cdef void *__cuLaunchGrid = NULL +cdef void *__cuLaunchGridAsync = NULL +cdef void *__cuParamSetTexRef = NULL +cdef void *__cuFuncSetSharedMemConfig = NULL +cdef void *__cuGraphCreate = NULL +cdef void *__cuGraphAddKernelNode_v2 = NULL +cdef void *__cuGraphKernelNodeGetParams_v2 = NULL +cdef void *__cuGraphKernelNodeSetParams_v2 = NULL +cdef void *__cuGraphAddMemcpyNode = NULL +cdef void *__cuGraphMemcpyNodeGetParams = NULL +cdef void *__cuGraphMemcpyNodeSetParams = NULL +cdef void *__cuGraphAddMemsetNode = NULL +cdef void *__cuGraphMemsetNodeGetParams = NULL +cdef void *__cuGraphMemsetNodeSetParams = NULL +cdef void *__cuGraphAddHostNode = NULL +cdef void *__cuGraphHostNodeGetParams = NULL +cdef void *__cuGraphHostNodeSetParams = NULL +cdef void *__cuGraphAddChildGraphNode = NULL +cdef void *__cuGraphChildGraphNodeGetGraph = NULL +cdef void *__cuGraphAddEmptyNode = NULL +cdef void *__cuGraphAddEventRecordNode = NULL +cdef void *__cuGraphEventRecordNodeGetEvent = NULL +cdef void *__cuGraphEventRecordNodeSetEvent = NULL +cdef void *__cuGraphAddEventWaitNode = NULL +cdef void *__cuGraphEventWaitNodeGetEvent = NULL +cdef void *__cuGraphEventWaitNodeSetEvent = NULL +cdef void *__cuGraphAddExternalSemaphoresSignalNode = NULL +cdef void *__cuGraphExternalSemaphoresSignalNodeGetParams = NULL +cdef void *__cuGraphExternalSemaphoresSignalNodeSetParams = NULL +cdef void *__cuGraphAddExternalSemaphoresWaitNode = NULL +cdef void *__cuGraphExternalSemaphoresWaitNodeGetParams = NULL +cdef void *__cuGraphExternalSemaphoresWaitNodeSetParams = NULL +cdef void *__cuGraphAddBatchMemOpNode = NULL +cdef void *__cuGraphBatchMemOpNodeGetParams = NULL +cdef void *__cuGraphBatchMemOpNodeSetParams = NULL +cdef void *__cuGraphExecBatchMemOpNodeSetParams = NULL +cdef void *__cuGraphAddMemAllocNode = NULL +cdef void *__cuGraphMemAllocNodeGetParams = NULL +cdef void *__cuGraphAddMemFreeNode = NULL +cdef void *__cuGraphMemFreeNodeGetParams = NULL +cdef void *__cuDeviceGraphMemTrim = NULL +cdef void *__cuDeviceGetGraphMemAttribute = NULL +cdef void *__cuDeviceSetGraphMemAttribute = NULL +cdef void *__cuGraphClone = NULL +cdef void *__cuGraphNodeFindInClone = NULL +cdef void *__cuGraphNodeGetType = NULL +cdef void *__cuGraphGetNodes = NULL +cdef void *__cuGraphGetRootNodes = NULL +cdef void *__cuGraphGetEdges = NULL +cdef void *__cuGraphGetEdges_v2 = NULL +cdef void *__cuGraphNodeGetDependencies = NULL +cdef void *__cuGraphNodeGetDependencies_v2 = NULL +cdef void *__cuGraphNodeGetDependentNodes = NULL +cdef void *__cuGraphNodeGetDependentNodes_v2 = NULL +cdef void *__cuGraphAddDependencies = NULL +cdef void *__cuGraphAddDependencies_v2 = NULL +cdef void *__cuGraphRemoveDependencies = NULL +cdef void *__cuGraphRemoveDependencies_v2 = NULL +cdef void *__cuGraphDestroyNode = NULL +cdef void *__cuGraphInstantiateWithFlags = NULL +cdef void *__cuGraphInstantiateWithParams = NULL +cdef void *__cuGraphExecGetFlags = NULL +cdef void *__cuGraphExecKernelNodeSetParams_v2 = NULL +cdef void *__cuGraphExecMemcpyNodeSetParams = NULL +cdef void *__cuGraphExecMemsetNodeSetParams = NULL +cdef void *__cuGraphExecHostNodeSetParams = NULL +cdef void *__cuGraphExecChildGraphNodeSetParams = NULL +cdef void *__cuGraphExecEventRecordNodeSetEvent = NULL +cdef void *__cuGraphExecEventWaitNodeSetEvent = NULL +cdef void *__cuGraphExecExternalSemaphoresSignalNodeSetParams = NULL +cdef void *__cuGraphExecExternalSemaphoresWaitNodeSetParams = NULL +cdef void *__cuGraphNodeSetEnabled = NULL +cdef void *__cuGraphNodeGetEnabled = NULL +cdef void *__cuGraphUpload = NULL +cdef void *__cuGraphLaunch = NULL +cdef void *__cuGraphExecDestroy = NULL +cdef void *__cuGraphDestroy = NULL +cdef void *__cuGraphExecUpdate_v2 = NULL +cdef void *__cuGraphKernelNodeCopyAttributes = NULL +cdef void *__cuGraphKernelNodeGetAttribute = NULL +cdef void *__cuGraphKernelNodeSetAttribute = NULL +cdef void *__cuGraphDebugDotPrint = NULL +cdef void *__cuUserObjectCreate = NULL +cdef void *__cuUserObjectRetain = NULL +cdef void *__cuUserObjectRelease = NULL +cdef void *__cuGraphRetainUserObject = NULL +cdef void *__cuGraphReleaseUserObject = NULL +cdef void *__cuGraphAddNode = NULL +cdef void *__cuGraphAddNode_v2 = NULL +cdef void *__cuGraphNodeSetParams = NULL +cdef void *__cuGraphExecNodeSetParams = NULL +cdef void *__cuGraphConditionalHandleCreate = NULL +cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessor = NULL +cdef void *__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = NULL +cdef void *__cuOccupancyMaxPotentialBlockSize = NULL +cdef void *__cuOccupancyMaxPotentialBlockSizeWithFlags = NULL +cdef void *__cuOccupancyAvailableDynamicSMemPerBlock = NULL +cdef void *__cuOccupancyMaxPotentialClusterSize = NULL +cdef void *__cuOccupancyMaxActiveClusters = NULL +cdef void *__cuTexRefSetArray = NULL +cdef void *__cuTexRefSetMipmappedArray = NULL +cdef void *__cuTexRefSetAddress_v2 = NULL +cdef void *__cuTexRefSetAddress2D_v3 = NULL +cdef void *__cuTexRefSetFormat = NULL +cdef void *__cuTexRefSetAddressMode = NULL +cdef void *__cuTexRefSetFilterMode = NULL +cdef void *__cuTexRefSetMipmapFilterMode = NULL +cdef void *__cuTexRefSetMipmapLevelBias = NULL +cdef void *__cuTexRefSetMipmapLevelClamp = NULL +cdef void *__cuTexRefSetMaxAnisotropy = NULL +cdef void *__cuTexRefSetBorderColor = NULL +cdef void *__cuTexRefSetFlags = NULL +cdef void *__cuTexRefGetAddress_v2 = NULL +cdef void *__cuTexRefGetArray = NULL +cdef void *__cuTexRefGetMipmappedArray = NULL +cdef void *__cuTexRefGetAddressMode = NULL +cdef void *__cuTexRefGetFilterMode = NULL +cdef void *__cuTexRefGetFormat = NULL +cdef void *__cuTexRefGetMipmapFilterMode = NULL +cdef void *__cuTexRefGetMipmapLevelBias = NULL +cdef void *__cuTexRefGetMipmapLevelClamp = NULL +cdef void *__cuTexRefGetMaxAnisotropy = NULL +cdef void *__cuTexRefGetBorderColor = NULL +cdef void *__cuTexRefGetFlags = NULL +cdef void *__cuTexRefCreate = NULL +cdef void *__cuTexRefDestroy = NULL +cdef void *__cuSurfRefSetArray = NULL +cdef void *__cuSurfRefGetArray = NULL +cdef void *__cuTexObjectCreate = NULL +cdef void *__cuTexObjectDestroy = NULL +cdef void *__cuTexObjectGetResourceDesc = NULL +cdef void *__cuTexObjectGetTextureDesc = NULL +cdef void *__cuTexObjectGetResourceViewDesc = NULL +cdef void *__cuSurfObjectCreate = NULL +cdef void *__cuSurfObjectDestroy = NULL +cdef void *__cuSurfObjectGetResourceDesc = NULL +cdef void *__cuTensorMapEncodeTiled = NULL +cdef void *__cuTensorMapEncodeIm2col = NULL +cdef void *__cuTensorMapEncodeIm2colWide = NULL +cdef void *__cuTensorMapReplaceAddress = NULL +cdef void *__cuDeviceCanAccessPeer = NULL +cdef void *__cuCtxEnablePeerAccess = NULL +cdef void *__cuCtxDisablePeerAccess = NULL +cdef void *__cuDeviceGetP2PAttribute = NULL +cdef void *__cuGraphicsUnregisterResource = NULL +cdef void *__cuGraphicsSubResourceGetMappedArray = NULL +cdef void *__cuGraphicsResourceGetMappedMipmappedArray = NULL +cdef void *__cuGraphicsResourceGetMappedPointer_v2 = NULL +cdef void *__cuGraphicsResourceSetMapFlags_v2 = NULL +cdef void *__cuGraphicsMapResources = NULL +cdef void *__cuGraphicsUnmapResources = NULL +cdef void *__cuGetProcAddress_v2 = NULL +cdef void *__cuCoredumpGetAttribute = NULL +cdef void *__cuCoredumpGetAttributeGlobal = NULL +cdef void *__cuCoredumpSetAttribute = NULL +cdef void *__cuCoredumpSetAttributeGlobal = NULL +cdef void *__cuGetExportTable = NULL +cdef void *__cuGreenCtxCreate = NULL +cdef void *__cuGreenCtxDestroy = NULL +cdef void *__cuCtxFromGreenCtx = NULL +cdef void *__cuDeviceGetDevResource = NULL +cdef void *__cuCtxGetDevResource = NULL +cdef void *__cuGreenCtxGetDevResource = NULL +cdef void *__cuDevSmResourceSplitByCount = NULL +cdef void *__cuDevResourceGenerateDesc = NULL +cdef void *__cuGreenCtxRecordEvent = NULL +cdef void *__cuGreenCtxWaitEvent = NULL +cdef void *__cuStreamGetGreenCtx = NULL +cdef void *__cuGreenCtxStreamCreate = NULL +cdef void *__cuLogsRegisterCallback = NULL +cdef void *__cuLogsUnregisterCallback = NULL +cdef void *__cuLogsCurrent = NULL +cdef void *__cuLogsDumpToFile = NULL +cdef void *__cuLogsDumpToMemory = NULL +cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL +cdef void *__cuCheckpointProcessGetState = NULL +cdef void *__cuCheckpointProcessLock = NULL +cdef void *__cuCheckpointProcessCheckpoint = NULL +cdef void *__cuCheckpointProcessRestore = NULL +cdef void *__cuCheckpointProcessUnlock = NULL +cdef void *__cuProfilerStart = NULL +cdef void *__cuProfilerStop = NULL +cdef void *__cuGraphicsEGLRegisterImage = NULL +cdef void *__cuEGLStreamConsumerConnect = NULL +cdef void *__cuEGLStreamConsumerConnectWithFlags = NULL +cdef void *__cuEGLStreamConsumerDisconnect = NULL +cdef void *__cuEGLStreamConsumerAcquireFrame = NULL +cdef void *__cuEGLStreamConsumerReleaseFrame = NULL +cdef void *__cuEGLStreamProducerConnect = NULL +cdef void *__cuEGLStreamProducerDisconnect = NULL +cdef void *__cuEGLStreamProducerPresentFrame = NULL +cdef void *__cuEGLStreamProducerReturnFrame = NULL +cdef void *__cuGraphicsResourceGetMappedEglFrame = NULL +cdef void *__cuEventCreateFromEGLSync = NULL +cdef void *__cuGraphicsGLRegisterBuffer = NULL +cdef void *__cuGraphicsGLRegisterImage = NULL +cdef void *__cuGLGetDevices_v2 = NULL +cdef void *__cuVDPAUGetDevice = NULL +cdef void *__cuVDPAUCtxCreate_v2 = NULL +cdef void *__cuGraphicsVDPAURegisterVideoSurface = NULL +cdef void *__cuGraphicsVDPAURegisterOutputSurface = NULL + +# To make cuPythonInit reentrant +ctypedef CUresult (*__cuGetProcAddress_v2_T)(const char*, void**, int, cuuint64_t, CUdriverProcAddressQueryResult*) except?CUDA_ERROR_NOT_FOUND nogil +cdef __cuGetProcAddress_v2_T _F_cuGetProcAddress_v2 = NULL + +cdef int _cuPythonInit() except -1 nogil: + global __cuPythonInit + + cdef bint usePTDS + cdef char libPath[260] + + with gil, __symbol_lock: + usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=0) + + # Load library + libPath[0] = 0 + status = loader.getCUDALibraryPath(libPath, sys.maxsize > 2**32) + if status == 0 and len(libPath) != 0: + path = libPath.decode('utf-8') + else: + path = 'libcuda.so.1' + handle = dlfcn.dlopen(bytes(path, encoding='utf-8'), dlfcn.RTLD_NOW) + if handle == NULL: + raise RuntimeError('Failed to dlopen ' + path) + + # Get latest __cuGetProcAddress_v2 + global __cuGetProcAddress_v2 + __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') + + # Load using cuGetProcAddress if available + if __cuGetProcAddress_v2 != NULL: + _F_cuGetProcAddress_v2 = <__cuGetProcAddress_v2_T>__cuGetProcAddress_v2 + if usePTDS: + # Get all PTDS version of functions + pass + global __cuMemcpy + _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyPeer + _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyHtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyDtoH_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyDtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyDtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyAtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyHtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyAtoH_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyAtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy2D_v2 + _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy2DUnaligned_v2 + _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy3D_v2 + _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy3DPeer + _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyAsync + _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyPeerAsync + _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyHtoDAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyDtoHAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyDtoDAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyHtoAAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyAtoHAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy2DAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy3DAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy3DPeerAsync + _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpyBatchAsync + _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemcpy3DBatchAsync + _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD8_v2 + _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD16_v2 + _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD32_v2 + _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D8_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D16_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D32_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD8Async + _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD16Async + _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD32Async + _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D8Async + _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D16Async + _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemsetD2D32Async + _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemBatchDecompressAsync + _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemMapArrayAsync + _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemFreeAsync + _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemAllocAsync + _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemAllocFromPoolAsync + _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemPrefetchAsync + _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuMemPrefetchAsync_v2 + _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetPriority + _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetDevice + _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetFlags + _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetId + _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetCtx + _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetCtx_v2 + _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamWaitEvent + _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamAddCallback + _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamBeginCapture_v2 + _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamBeginCaptureToGraph + _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamEndCapture + _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamIsCapturing + _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetCaptureInfo_v2 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetCaptureInfo_v3 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamUpdateCaptureDependencies + _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamUpdateCaptureDependencies_v2 + _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamAttachMemAsync + _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamQuery + _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamSynchronize + _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamCopyAttributes + _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamGetAttribute + _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamSetAttribute + _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuEventRecord + _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuEventRecordWithFlags + _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuSignalExternalSemaphoresAsync + _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuWaitExternalSemaphoresAsync + _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamWaitValue32_v2 + _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamWaitValue64_v2 + _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamWriteValue32_v2 + _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamWriteValue64_v2 + _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuStreamBatchMemOp_v2 + _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuLaunchKernel + _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuLaunchKernelEx + _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuLaunchCooperativeKernel + _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuLaunchHostFunc + _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuGraphInstantiateWithParams + _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuGraphUpload + _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuGraphLaunch + _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuGraphicsMapResources + _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + global __cuGraphicsUnmapResources + _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + else: + # Else get the regular version + pass + global __cuMemcpy + _F_cuGetProcAddress_v2('cuMemcpy', &__cuMemcpy, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyPeer + _F_cuGetProcAddress_v2('cuMemcpyPeer', &__cuMemcpyPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyHtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoD', &__cuMemcpyHtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyDtoH_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoH', &__cuMemcpyDtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyDtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoD', &__cuMemcpyDtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyDtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoA', &__cuMemcpyDtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyAtoD_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoD', &__cuMemcpyAtoD_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyHtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoA', &__cuMemcpyHtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyAtoH_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoH', &__cuMemcpyAtoH_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyAtoA_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoA', &__cuMemcpyAtoA_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy2D_v2 + _F_cuGetProcAddress_v2('cuMemcpy2D', &__cuMemcpy2D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy2DUnaligned_v2 + _F_cuGetProcAddress_v2('cuMemcpy2DUnaligned', &__cuMemcpy2DUnaligned_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy3D_v2 + _F_cuGetProcAddress_v2('cuMemcpy3D', &__cuMemcpy3D_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy3DPeer + _F_cuGetProcAddress_v2('cuMemcpy3DPeer', &__cuMemcpy3DPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyAsync + _F_cuGetProcAddress_v2('cuMemcpyAsync', &__cuMemcpyAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyPeerAsync + _F_cuGetProcAddress_v2('cuMemcpyPeerAsync', &__cuMemcpyPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyHtoDAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoDAsync', &__cuMemcpyHtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyDtoHAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoHAsync', &__cuMemcpyDtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyDtoDAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyDtoDAsync', &__cuMemcpyDtoDAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyHtoAAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyHtoAAsync', &__cuMemcpyHtoAAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyAtoHAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpyAtoHAsync', &__cuMemcpyAtoHAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy2DAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpy2DAsync', &__cuMemcpy2DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy3DAsync_v2 + _F_cuGetProcAddress_v2('cuMemcpy3DAsync', &__cuMemcpy3DAsync_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy3DPeerAsync + _F_cuGetProcAddress_v2('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpyBatchAsync + _F_cuGetProcAddress_v2('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemcpy3DBatchAsync + _F_cuGetProcAddress_v2('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD8_v2 + _F_cuGetProcAddress_v2('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD16_v2 + _F_cuGetProcAddress_v2('cuMemsetD16', &__cuMemsetD16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD32_v2 + _F_cuGetProcAddress_v2('cuMemsetD32', &__cuMemsetD32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D8_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D8', &__cuMemsetD2D8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D16_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D16', &__cuMemsetD2D16_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D32_v2 + _F_cuGetProcAddress_v2('cuMemsetD2D32', &__cuMemsetD2D32_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD8Async + _F_cuGetProcAddress_v2('cuMemsetD8Async', &__cuMemsetD8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD16Async + _F_cuGetProcAddress_v2('cuMemsetD16Async', &__cuMemsetD16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD32Async + _F_cuGetProcAddress_v2('cuMemsetD32Async', &__cuMemsetD32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D8Async + _F_cuGetProcAddress_v2('cuMemsetD2D8Async', &__cuMemsetD2D8Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D16Async + _F_cuGetProcAddress_v2('cuMemsetD2D16Async', &__cuMemsetD2D16Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemsetD2D32Async + _F_cuGetProcAddress_v2('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemBatchDecompressAsync + _F_cuGetProcAddress_v2('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemMapArrayAsync + _F_cuGetProcAddress_v2('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemFreeAsync + _F_cuGetProcAddress_v2('cuMemFreeAsync', &__cuMemFreeAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAllocAsync + _F_cuGetProcAddress_v2('cuMemAllocAsync', &__cuMemAllocAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAllocFromPoolAsync + _F_cuGetProcAddress_v2('cuMemAllocFromPoolAsync', &__cuMemAllocFromPoolAsync, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPrefetchAsync + _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPrefetchAsync_v2 + _F_cuGetProcAddress_v2('cuMemPrefetchAsync', &__cuMemPrefetchAsync_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetPriority + _F_cuGetProcAddress_v2('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetDevice + _F_cuGetProcAddress_v2('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetFlags + _F_cuGetProcAddress_v2('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetId + _F_cuGetProcAddress_v2('cuStreamGetId', &__cuStreamGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetCtx + _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetCtx_v2 + _F_cuGetProcAddress_v2('cuStreamGetCtx', &__cuStreamGetCtx_v2, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamWaitEvent + _F_cuGetProcAddress_v2('cuStreamWaitEvent', &__cuStreamWaitEvent, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamAddCallback + _F_cuGetProcAddress_v2('cuStreamAddCallback', &__cuStreamAddCallback, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamBeginCapture_v2 + _F_cuGetProcAddress_v2('cuStreamBeginCapture', &__cuStreamBeginCapture_v2, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamBeginCaptureToGraph + _F_cuGetProcAddress_v2('cuStreamBeginCaptureToGraph', &__cuStreamBeginCaptureToGraph, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamEndCapture + _F_cuGetProcAddress_v2('cuStreamEndCapture', &__cuStreamEndCapture, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamIsCapturing + _F_cuGetProcAddress_v2('cuStreamIsCapturing', &__cuStreamIsCapturing, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetCaptureInfo_v2 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v2, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetCaptureInfo_v3 + _F_cuGetProcAddress_v2('cuStreamGetCaptureInfo', &__cuStreamGetCaptureInfo_v3, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamUpdateCaptureDependencies + _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamUpdateCaptureDependencies_v2 + _F_cuGetProcAddress_v2('cuStreamUpdateCaptureDependencies', &__cuStreamUpdateCaptureDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamAttachMemAsync + _F_cuGetProcAddress_v2('cuStreamAttachMemAsync', &__cuStreamAttachMemAsync, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamQuery + _F_cuGetProcAddress_v2('cuStreamQuery', &__cuStreamQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamSynchronize + _F_cuGetProcAddress_v2('cuStreamSynchronize', &__cuStreamSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamCopyAttributes + _F_cuGetProcAddress_v2('cuStreamCopyAttributes', &__cuStreamCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetAttribute + _F_cuGetProcAddress_v2('cuStreamGetAttribute', &__cuStreamGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamSetAttribute + _F_cuGetProcAddress_v2('cuStreamSetAttribute', &__cuStreamSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventRecord + _F_cuGetProcAddress_v2('cuEventRecord', &__cuEventRecord, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventRecordWithFlags + _F_cuGetProcAddress_v2('cuEventRecordWithFlags', &__cuEventRecordWithFlags, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSignalExternalSemaphoresAsync + _F_cuGetProcAddress_v2('cuSignalExternalSemaphoresAsync', &__cuSignalExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuWaitExternalSemaphoresAsync + _F_cuGetProcAddress_v2('cuWaitExternalSemaphoresAsync', &__cuWaitExternalSemaphoresAsync, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamWaitValue32_v2 + _F_cuGetProcAddress_v2('cuStreamWaitValue32', &__cuStreamWaitValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamWaitValue64_v2 + _F_cuGetProcAddress_v2('cuStreamWaitValue64', &__cuStreamWaitValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamWriteValue32_v2 + _F_cuGetProcAddress_v2('cuStreamWriteValue32', &__cuStreamWriteValue32_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamWriteValue64_v2 + _F_cuGetProcAddress_v2('cuStreamWriteValue64', &__cuStreamWriteValue64_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamBatchMemOp_v2 + _F_cuGetProcAddress_v2('cuStreamBatchMemOp', &__cuStreamBatchMemOp_v2, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchKernel + _F_cuGetProcAddress_v2('cuLaunchKernel', &__cuLaunchKernel, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchKernelEx + _F_cuGetProcAddress_v2('cuLaunchKernelEx', &__cuLaunchKernelEx, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchCooperativeKernel + _F_cuGetProcAddress_v2('cuLaunchCooperativeKernel', &__cuLaunchCooperativeKernel, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchHostFunc + _F_cuGetProcAddress_v2('cuLaunchHostFunc', &__cuLaunchHostFunc, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphInstantiateWithParams + _F_cuGetProcAddress_v2('cuGraphInstantiateWithParams', &__cuGraphInstantiateWithParams, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphUpload + _F_cuGetProcAddress_v2('cuGraphUpload', &__cuGraphUpload, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphLaunch + _F_cuGetProcAddress_v2('cuGraphLaunch', &__cuGraphLaunch, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsMapResources + _F_cuGetProcAddress_v2('cuGraphicsMapResources', &__cuGraphicsMapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsUnmapResources + _F_cuGetProcAddress_v2('cuGraphicsUnmapResources', &__cuGraphicsUnmapResources, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + # Get remaining functions + global __cuGetErrorString + _F_cuGetProcAddress_v2('cuGetErrorString', &__cuGetErrorString, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGetErrorName + _F_cuGetProcAddress_v2('cuGetErrorName', &__cuGetErrorName, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuInit + _F_cuGetProcAddress_v2('cuInit', &__cuInit, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDriverGetVersion + _F_cuGetProcAddress_v2('cuDriverGetVersion', &__cuDriverGetVersion, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGet + _F_cuGetProcAddress_v2('cuDeviceGet', &__cuDeviceGet, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetCount + _F_cuGetProcAddress_v2('cuDeviceGetCount', &__cuDeviceGetCount, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetName + _F_cuGetProcAddress_v2('cuDeviceGetName', &__cuDeviceGetName, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetUuid + _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid, 9020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetUuid_v2 + _F_cuGetProcAddress_v2('cuDeviceGetUuid', &__cuDeviceGetUuid_v2, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetLuid + _F_cuGetProcAddress_v2('cuDeviceGetLuid', &__cuDeviceGetLuid, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceTotalMem_v2 + _F_cuGetProcAddress_v2('cuDeviceTotalMem', &__cuDeviceTotalMem_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetTexture1DLinearMaxWidth + _F_cuGetProcAddress_v2('cuDeviceGetTexture1DLinearMaxWidth', &__cuDeviceGetTexture1DLinearMaxWidth, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetAttribute + _F_cuGetProcAddress_v2('cuDeviceGetAttribute', &__cuDeviceGetAttribute, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetNvSciSyncAttributes + _F_cuGetProcAddress_v2('cuDeviceGetNvSciSyncAttributes', &__cuDeviceGetNvSciSyncAttributes, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceSetMemPool + _F_cuGetProcAddress_v2('cuDeviceSetMemPool', &__cuDeviceSetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetMemPool + _F_cuGetProcAddress_v2('cuDeviceGetMemPool', &__cuDeviceGetMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetDefaultMemPool + _F_cuGetProcAddress_v2('cuDeviceGetDefaultMemPool', &__cuDeviceGetDefaultMemPool, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetExecAffinitySupport + _F_cuGetProcAddress_v2('cuDeviceGetExecAffinitySupport', &__cuDeviceGetExecAffinitySupport, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFlushGPUDirectRDMAWrites + _F_cuGetProcAddress_v2('cuFlushGPUDirectRDMAWrites', &__cuFlushGPUDirectRDMAWrites, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetProperties + _F_cuGetProcAddress_v2('cuDeviceGetProperties', &__cuDeviceGetProperties, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceComputeCapability + _F_cuGetProcAddress_v2('cuDeviceComputeCapability', &__cuDeviceComputeCapability, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevicePrimaryCtxRetain + _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRetain', &__cuDevicePrimaryCtxRetain, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevicePrimaryCtxRelease_v2 + _F_cuGetProcAddress_v2('cuDevicePrimaryCtxRelease', &__cuDevicePrimaryCtxRelease_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevicePrimaryCtxSetFlags_v2 + _F_cuGetProcAddress_v2('cuDevicePrimaryCtxSetFlags', &__cuDevicePrimaryCtxSetFlags_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevicePrimaryCtxGetState + _F_cuGetProcAddress_v2('cuDevicePrimaryCtxGetState', &__cuDevicePrimaryCtxGetState, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevicePrimaryCtxReset_v2 + _F_cuGetProcAddress_v2('cuDevicePrimaryCtxReset', &__cuDevicePrimaryCtxReset_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxCreate_v2 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxCreate_v3 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v3, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxCreate_v4 + _F_cuGetProcAddress_v2('cuCtxCreate', &__cuCtxCreate_v4, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxDestroy_v2 + _F_cuGetProcAddress_v2('cuCtxDestroy', &__cuCtxDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxPushCurrent_v2 + _F_cuGetProcAddress_v2('cuCtxPushCurrent', &__cuCtxPushCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxPopCurrent_v2 + _F_cuGetProcAddress_v2('cuCtxPopCurrent', &__cuCtxPopCurrent_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSetCurrent + _F_cuGetProcAddress_v2('cuCtxSetCurrent', &__cuCtxSetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetCurrent + _F_cuGetProcAddress_v2('cuCtxGetCurrent', &__cuCtxGetCurrent, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetDevice + _F_cuGetProcAddress_v2('cuCtxGetDevice', &__cuCtxGetDevice, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetFlags + _F_cuGetProcAddress_v2('cuCtxGetFlags', &__cuCtxGetFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSetFlags + _F_cuGetProcAddress_v2('cuCtxSetFlags', &__cuCtxSetFlags, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetId + _F_cuGetProcAddress_v2('cuCtxGetId', &__cuCtxGetId, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSynchronize + _F_cuGetProcAddress_v2('cuCtxSynchronize', &__cuCtxSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSetLimit + _F_cuGetProcAddress_v2('cuCtxSetLimit', &__cuCtxSetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetLimit + _F_cuGetProcAddress_v2('cuCtxGetLimit', &__cuCtxGetLimit, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetCacheConfig + _F_cuGetProcAddress_v2('cuCtxGetCacheConfig', &__cuCtxGetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSetCacheConfig + _F_cuGetProcAddress_v2('cuCtxSetCacheConfig', &__cuCtxSetCacheConfig, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetApiVersion + _F_cuGetProcAddress_v2('cuCtxGetApiVersion', &__cuCtxGetApiVersion, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetStreamPriorityRange + _F_cuGetProcAddress_v2('cuCtxGetStreamPriorityRange', &__cuCtxGetStreamPriorityRange, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxResetPersistingL2Cache + _F_cuGetProcAddress_v2('cuCtxResetPersistingL2Cache', &__cuCtxResetPersistingL2Cache, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetExecAffinity + _F_cuGetProcAddress_v2('cuCtxGetExecAffinity', &__cuCtxGetExecAffinity, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxRecordEvent + _F_cuGetProcAddress_v2('cuCtxRecordEvent', &__cuCtxRecordEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxWaitEvent + _F_cuGetProcAddress_v2('cuCtxWaitEvent', &__cuCtxWaitEvent, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxAttach + _F_cuGetProcAddress_v2('cuCtxAttach', &__cuCtxAttach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxDetach + _F_cuGetProcAddress_v2('cuCtxDetach', &__cuCtxDetach, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetSharedMemConfig + _F_cuGetProcAddress_v2('cuCtxGetSharedMemConfig', &__cuCtxGetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxSetSharedMemConfig + _F_cuGetProcAddress_v2('cuCtxSetSharedMemConfig', &__cuCtxSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleLoad + _F_cuGetProcAddress_v2('cuModuleLoad', &__cuModuleLoad, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleLoadData + _F_cuGetProcAddress_v2('cuModuleLoadData', &__cuModuleLoadData, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleLoadDataEx + _F_cuGetProcAddress_v2('cuModuleLoadDataEx', &__cuModuleLoadDataEx, 2010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleLoadFatBinary + _F_cuGetProcAddress_v2('cuModuleLoadFatBinary', &__cuModuleLoadFatBinary, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleUnload + _F_cuGetProcAddress_v2('cuModuleUnload', &__cuModuleUnload, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetLoadingMode + _F_cuGetProcAddress_v2('cuModuleGetLoadingMode', &__cuModuleGetLoadingMode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetFunction + _F_cuGetProcAddress_v2('cuModuleGetFunction', &__cuModuleGetFunction, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetFunctionCount + _F_cuGetProcAddress_v2('cuModuleGetFunctionCount', &__cuModuleGetFunctionCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleEnumerateFunctions + _F_cuGetProcAddress_v2('cuModuleEnumerateFunctions', &__cuModuleEnumerateFunctions, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetGlobal_v2 + _F_cuGetProcAddress_v2('cuModuleGetGlobal', &__cuModuleGetGlobal_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLinkCreate_v2 + _F_cuGetProcAddress_v2('cuLinkCreate', &__cuLinkCreate_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLinkAddData_v2 + _F_cuGetProcAddress_v2('cuLinkAddData', &__cuLinkAddData_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLinkAddFile_v2 + _F_cuGetProcAddress_v2('cuLinkAddFile', &__cuLinkAddFile_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLinkComplete + _F_cuGetProcAddress_v2('cuLinkComplete', &__cuLinkComplete, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLinkDestroy + _F_cuGetProcAddress_v2('cuLinkDestroy', &__cuLinkDestroy, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetTexRef + _F_cuGetProcAddress_v2('cuModuleGetTexRef', &__cuModuleGetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuModuleGetSurfRef + _F_cuGetProcAddress_v2('cuModuleGetSurfRef', &__cuModuleGetSurfRef, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryLoadData + _F_cuGetProcAddress_v2('cuLibraryLoadData', &__cuLibraryLoadData, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryLoadFromFile + _F_cuGetProcAddress_v2('cuLibraryLoadFromFile', &__cuLibraryLoadFromFile, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryUnload + _F_cuGetProcAddress_v2('cuLibraryUnload', &__cuLibraryUnload, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetKernel + _F_cuGetProcAddress_v2('cuLibraryGetKernel', &__cuLibraryGetKernel, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetKernelCount + _F_cuGetProcAddress_v2('cuLibraryGetKernelCount', &__cuLibraryGetKernelCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryEnumerateKernels + _F_cuGetProcAddress_v2('cuLibraryEnumerateKernels', &__cuLibraryEnumerateKernels, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetModule + _F_cuGetProcAddress_v2('cuLibraryGetModule', &__cuLibraryGetModule, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelGetFunction + _F_cuGetProcAddress_v2('cuKernelGetFunction', &__cuKernelGetFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelGetLibrary + _F_cuGetProcAddress_v2('cuKernelGetLibrary', &__cuKernelGetLibrary, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetGlobal + _F_cuGetProcAddress_v2('cuLibraryGetGlobal', &__cuLibraryGetGlobal, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetManaged + _F_cuGetProcAddress_v2('cuLibraryGetManaged', &__cuLibraryGetManaged, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLibraryGetUnifiedFunction + _F_cuGetProcAddress_v2('cuLibraryGetUnifiedFunction', &__cuLibraryGetUnifiedFunction, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelGetAttribute + _F_cuGetProcAddress_v2('cuKernelGetAttribute', &__cuKernelGetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelSetAttribute + _F_cuGetProcAddress_v2('cuKernelSetAttribute', &__cuKernelSetAttribute, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelSetCacheConfig + _F_cuGetProcAddress_v2('cuKernelSetCacheConfig', &__cuKernelSetCacheConfig, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelGetName + _F_cuGetProcAddress_v2('cuKernelGetName', &__cuKernelGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuKernelGetParamInfo + _F_cuGetProcAddress_v2('cuKernelGetParamInfo', &__cuKernelGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetInfo_v2 + _F_cuGetProcAddress_v2('cuMemGetInfo', &__cuMemGetInfo_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAlloc_v2 + _F_cuGetProcAddress_v2('cuMemAlloc', &__cuMemAlloc_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAllocPitch_v2 + _F_cuGetProcAddress_v2('cuMemAllocPitch', &__cuMemAllocPitch_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemFree_v2 + _F_cuGetProcAddress_v2('cuMemFree', &__cuMemFree_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetAddressRange_v2 + _F_cuGetProcAddress_v2('cuMemGetAddressRange', &__cuMemGetAddressRange_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAllocHost_v2 + _F_cuGetProcAddress_v2('cuMemAllocHost', &__cuMemAllocHost_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemFreeHost + _F_cuGetProcAddress_v2('cuMemFreeHost', &__cuMemFreeHost, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemHostAlloc + _F_cuGetProcAddress_v2('cuMemHostAlloc', &__cuMemHostAlloc, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemHostGetDevicePointer_v2 + _F_cuGetProcAddress_v2('cuMemHostGetDevicePointer', &__cuMemHostGetDevicePointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemHostGetFlags + _F_cuGetProcAddress_v2('cuMemHostGetFlags', &__cuMemHostGetFlags, 2030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAllocManaged + _F_cuGetProcAddress_v2('cuMemAllocManaged', &__cuMemAllocManaged, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceRegisterAsyncNotification + _F_cuGetProcAddress_v2('cuDeviceRegisterAsyncNotification', &__cuDeviceRegisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceUnregisterAsyncNotification + _F_cuGetProcAddress_v2('cuDeviceUnregisterAsyncNotification', &__cuDeviceUnregisterAsyncNotification, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetByPCIBusId + _F_cuGetProcAddress_v2('cuDeviceGetByPCIBusId', &__cuDeviceGetByPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetPCIBusId + _F_cuGetProcAddress_v2('cuDeviceGetPCIBusId', &__cuDeviceGetPCIBusId, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuIpcGetEventHandle + _F_cuGetProcAddress_v2('cuIpcGetEventHandle', &__cuIpcGetEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuIpcOpenEventHandle + _F_cuGetProcAddress_v2('cuIpcOpenEventHandle', &__cuIpcOpenEventHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuIpcGetMemHandle + _F_cuGetProcAddress_v2('cuIpcGetMemHandle', &__cuIpcGetMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuIpcOpenMemHandle_v2 + _F_cuGetProcAddress_v2('cuIpcOpenMemHandle', &__cuIpcOpenMemHandle_v2, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuIpcCloseMemHandle + _F_cuGetProcAddress_v2('cuIpcCloseMemHandle', &__cuIpcCloseMemHandle, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemHostRegister_v2 + _F_cuGetProcAddress_v2('cuMemHostRegister', &__cuMemHostRegister_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemHostUnregister + _F_cuGetProcAddress_v2('cuMemHostUnregister', &__cuMemHostUnregister, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayCreate_v2 + _F_cuGetProcAddress_v2('cuArrayCreate', &__cuArrayCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayGetDescriptor_v2 + _F_cuGetProcAddress_v2('cuArrayGetDescriptor', &__cuArrayGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayGetSparseProperties + _F_cuGetProcAddress_v2('cuArrayGetSparseProperties', &__cuArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMipmappedArrayGetSparseProperties + _F_cuGetProcAddress_v2('cuMipmappedArrayGetSparseProperties', &__cuMipmappedArrayGetSparseProperties, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayGetMemoryRequirements + _F_cuGetProcAddress_v2('cuArrayGetMemoryRequirements', &__cuArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMipmappedArrayGetMemoryRequirements + _F_cuGetProcAddress_v2('cuMipmappedArrayGetMemoryRequirements', &__cuMipmappedArrayGetMemoryRequirements, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayGetPlane + _F_cuGetProcAddress_v2('cuArrayGetPlane', &__cuArrayGetPlane, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArrayDestroy + _F_cuGetProcAddress_v2('cuArrayDestroy', &__cuArrayDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArray3DCreate_v2 + _F_cuGetProcAddress_v2('cuArray3DCreate', &__cuArray3DCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuArray3DGetDescriptor_v2 + _F_cuGetProcAddress_v2('cuArray3DGetDescriptor', &__cuArray3DGetDescriptor_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMipmappedArrayCreate + _F_cuGetProcAddress_v2('cuMipmappedArrayCreate', &__cuMipmappedArrayCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMipmappedArrayGetLevel + _F_cuGetProcAddress_v2('cuMipmappedArrayGetLevel', &__cuMipmappedArrayGetLevel, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMipmappedArrayDestroy + _F_cuGetProcAddress_v2('cuMipmappedArrayDestroy', &__cuMipmappedArrayDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetHandleForAddressRange + _F_cuGetProcAddress_v2('cuMemGetHandleForAddressRange', &__cuMemGetHandleForAddressRange, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAddressReserve + _F_cuGetProcAddress_v2('cuMemAddressReserve', &__cuMemAddressReserve, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAddressFree + _F_cuGetProcAddress_v2('cuMemAddressFree', &__cuMemAddressFree, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemCreate + _F_cuGetProcAddress_v2('cuMemCreate', &__cuMemCreate, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemRelease + _F_cuGetProcAddress_v2('cuMemRelease', &__cuMemRelease, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemMap + _F_cuGetProcAddress_v2('cuMemMap', &__cuMemMap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemUnmap + _F_cuGetProcAddress_v2('cuMemUnmap', &__cuMemUnmap, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemSetAccess + _F_cuGetProcAddress_v2('cuMemSetAccess', &__cuMemSetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetAccess + _F_cuGetProcAddress_v2('cuMemGetAccess', &__cuMemGetAccess, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemExportToShareableHandle + _F_cuGetProcAddress_v2('cuMemExportToShareableHandle', &__cuMemExportToShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemImportFromShareableHandle + _F_cuGetProcAddress_v2('cuMemImportFromShareableHandle', &__cuMemImportFromShareableHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetAllocationGranularity + _F_cuGetProcAddress_v2('cuMemGetAllocationGranularity', &__cuMemGetAllocationGranularity, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemGetAllocationPropertiesFromHandle + _F_cuGetProcAddress_v2('cuMemGetAllocationPropertiesFromHandle', &__cuMemGetAllocationPropertiesFromHandle, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemRetainAllocationHandle + _F_cuGetProcAddress_v2('cuMemRetainAllocationHandle', &__cuMemRetainAllocationHandle, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolTrimTo + _F_cuGetProcAddress_v2('cuMemPoolTrimTo', &__cuMemPoolTrimTo, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolSetAttribute + _F_cuGetProcAddress_v2('cuMemPoolSetAttribute', &__cuMemPoolSetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolGetAttribute + _F_cuGetProcAddress_v2('cuMemPoolGetAttribute', &__cuMemPoolGetAttribute, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolSetAccess + _F_cuGetProcAddress_v2('cuMemPoolSetAccess', &__cuMemPoolSetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolGetAccess + _F_cuGetProcAddress_v2('cuMemPoolGetAccess', &__cuMemPoolGetAccess, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolCreate + _F_cuGetProcAddress_v2('cuMemPoolCreate', &__cuMemPoolCreate, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolDestroy + _F_cuGetProcAddress_v2('cuMemPoolDestroy', &__cuMemPoolDestroy, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolExportToShareableHandle + _F_cuGetProcAddress_v2('cuMemPoolExportToShareableHandle', &__cuMemPoolExportToShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolImportFromShareableHandle + _F_cuGetProcAddress_v2('cuMemPoolImportFromShareableHandle', &__cuMemPoolImportFromShareableHandle, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolExportPointer + _F_cuGetProcAddress_v2('cuMemPoolExportPointer', &__cuMemPoolExportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemPoolImportPointer + _F_cuGetProcAddress_v2('cuMemPoolImportPointer', &__cuMemPoolImportPointer, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastCreate + _F_cuGetProcAddress_v2('cuMulticastCreate', &__cuMulticastCreate, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastAddDevice + _F_cuGetProcAddress_v2('cuMulticastAddDevice', &__cuMulticastAddDevice, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastBindMem + _F_cuGetProcAddress_v2('cuMulticastBindMem', &__cuMulticastBindMem, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastBindAddr + _F_cuGetProcAddress_v2('cuMulticastBindAddr', &__cuMulticastBindAddr, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastUnbind + _F_cuGetProcAddress_v2('cuMulticastUnbind', &__cuMulticastUnbind, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMulticastGetGranularity + _F_cuGetProcAddress_v2('cuMulticastGetGranularity', &__cuMulticastGetGranularity, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuPointerGetAttribute + _F_cuGetProcAddress_v2('cuPointerGetAttribute', &__cuPointerGetAttribute, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAdvise + _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemAdvise_v2 + _F_cuGetProcAddress_v2('cuMemAdvise', &__cuMemAdvise_v2, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemRangeGetAttribute + _F_cuGetProcAddress_v2('cuMemRangeGetAttribute', &__cuMemRangeGetAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuMemRangeGetAttributes + _F_cuGetProcAddress_v2('cuMemRangeGetAttributes', &__cuMemRangeGetAttributes, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuPointerSetAttribute + _F_cuGetProcAddress_v2('cuPointerSetAttribute', &__cuPointerSetAttribute, 6000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuPointerGetAttributes + _F_cuGetProcAddress_v2('cuPointerGetAttributes', &__cuPointerGetAttributes, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamCreate + _F_cuGetProcAddress_v2('cuStreamCreate', &__cuStreamCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamCreateWithPriority + _F_cuGetProcAddress_v2('cuStreamCreateWithPriority', &__cuStreamCreateWithPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuThreadExchangeStreamCaptureMode + _F_cuGetProcAddress_v2('cuThreadExchangeStreamCaptureMode', &__cuThreadExchangeStreamCaptureMode, 10010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamDestroy_v2 + _F_cuGetProcAddress_v2('cuStreamDestroy', &__cuStreamDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventCreate + _F_cuGetProcAddress_v2('cuEventCreate', &__cuEventCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventQuery + _F_cuGetProcAddress_v2('cuEventQuery', &__cuEventQuery, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventSynchronize + _F_cuGetProcAddress_v2('cuEventSynchronize', &__cuEventSynchronize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventDestroy_v2 + _F_cuGetProcAddress_v2('cuEventDestroy', &__cuEventDestroy_v2, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventElapsedTime + _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventElapsedTime_v2 + _F_cuGetProcAddress_v2('cuEventElapsedTime', &__cuEventElapsedTime_v2, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuImportExternalMemory + _F_cuGetProcAddress_v2('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuExternalMemoryGetMappedBuffer + _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedBuffer', &__cuExternalMemoryGetMappedBuffer, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuExternalMemoryGetMappedMipmappedArray + _F_cuGetProcAddress_v2('cuExternalMemoryGetMappedMipmappedArray', &__cuExternalMemoryGetMappedMipmappedArray, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDestroyExternalMemory + _F_cuGetProcAddress_v2('cuDestroyExternalMemory', &__cuDestroyExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuImportExternalSemaphore + _F_cuGetProcAddress_v2('cuImportExternalSemaphore', &__cuImportExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDestroyExternalSemaphore + _F_cuGetProcAddress_v2('cuDestroyExternalSemaphore', &__cuDestroyExternalSemaphore, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncGetAttribute + _F_cuGetProcAddress_v2('cuFuncGetAttribute', &__cuFuncGetAttribute, 2020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncSetAttribute + _F_cuGetProcAddress_v2('cuFuncSetAttribute', &__cuFuncSetAttribute, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncSetCacheConfig + _F_cuGetProcAddress_v2('cuFuncSetCacheConfig', &__cuFuncSetCacheConfig, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncGetModule + _F_cuGetProcAddress_v2('cuFuncGetModule', &__cuFuncGetModule, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncGetName + _F_cuGetProcAddress_v2('cuFuncGetName', &__cuFuncGetName, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncGetParamInfo + _F_cuGetProcAddress_v2('cuFuncGetParamInfo', &__cuFuncGetParamInfo, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncIsLoaded + _F_cuGetProcAddress_v2('cuFuncIsLoaded', &__cuFuncIsLoaded, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncLoad + _F_cuGetProcAddress_v2('cuFuncLoad', &__cuFuncLoad, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchCooperativeKernelMultiDevice + _F_cuGetProcAddress_v2('cuLaunchCooperativeKernelMultiDevice', &__cuLaunchCooperativeKernelMultiDevice, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncSetBlockShape + _F_cuGetProcAddress_v2('cuFuncSetBlockShape', &__cuFuncSetBlockShape, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncSetSharedSize + _F_cuGetProcAddress_v2('cuFuncSetSharedSize', &__cuFuncSetSharedSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuParamSetSize + _F_cuGetProcAddress_v2('cuParamSetSize', &__cuParamSetSize, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuParamSeti + _F_cuGetProcAddress_v2('cuParamSeti', &__cuParamSeti, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuParamSetf + _F_cuGetProcAddress_v2('cuParamSetf', &__cuParamSetf, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuParamSetv + _F_cuGetProcAddress_v2('cuParamSetv', &__cuParamSetv, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunch + _F_cuGetProcAddress_v2('cuLaunch', &__cuLaunch, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchGrid + _F_cuGetProcAddress_v2('cuLaunchGrid', &__cuLaunchGrid, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLaunchGridAsync + _F_cuGetProcAddress_v2('cuLaunchGridAsync', &__cuLaunchGridAsync, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuParamSetTexRef + _F_cuGetProcAddress_v2('cuParamSetTexRef', &__cuParamSetTexRef, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuFuncSetSharedMemConfig + _F_cuGetProcAddress_v2('cuFuncSetSharedMemConfig', &__cuFuncSetSharedMemConfig, 4020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphCreate + _F_cuGetProcAddress_v2('cuGraphCreate', &__cuGraphCreate, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddKernelNode_v2 + _F_cuGetProcAddress_v2('cuGraphAddKernelNode', &__cuGraphAddKernelNode_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphKernelNodeGetParams_v2 + _F_cuGetProcAddress_v2('cuGraphKernelNodeGetParams', &__cuGraphKernelNodeGetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphKernelNodeSetParams_v2 + _F_cuGetProcAddress_v2('cuGraphKernelNodeSetParams', &__cuGraphKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddMemcpyNode + _F_cuGetProcAddress_v2('cuGraphAddMemcpyNode', &__cuGraphAddMemcpyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemcpyNodeGetParams + _F_cuGetProcAddress_v2('cuGraphMemcpyNodeGetParams', &__cuGraphMemcpyNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemcpyNodeSetParams + _F_cuGetProcAddress_v2('cuGraphMemcpyNodeSetParams', &__cuGraphMemcpyNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddMemsetNode + _F_cuGetProcAddress_v2('cuGraphAddMemsetNode', &__cuGraphAddMemsetNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemsetNodeGetParams + _F_cuGetProcAddress_v2('cuGraphMemsetNodeGetParams', &__cuGraphMemsetNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemsetNodeSetParams + _F_cuGetProcAddress_v2('cuGraphMemsetNodeSetParams', &__cuGraphMemsetNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddHostNode + _F_cuGetProcAddress_v2('cuGraphAddHostNode', &__cuGraphAddHostNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphHostNodeGetParams + _F_cuGetProcAddress_v2('cuGraphHostNodeGetParams', &__cuGraphHostNodeGetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphHostNodeSetParams + _F_cuGetProcAddress_v2('cuGraphHostNodeSetParams', &__cuGraphHostNodeSetParams, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddChildGraphNode + _F_cuGetProcAddress_v2('cuGraphAddChildGraphNode', &__cuGraphAddChildGraphNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphChildGraphNodeGetGraph + _F_cuGetProcAddress_v2('cuGraphChildGraphNodeGetGraph', &__cuGraphChildGraphNodeGetGraph, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddEmptyNode + _F_cuGetProcAddress_v2('cuGraphAddEmptyNode', &__cuGraphAddEmptyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddEventRecordNode + _F_cuGetProcAddress_v2('cuGraphAddEventRecordNode', &__cuGraphAddEventRecordNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphEventRecordNodeGetEvent + _F_cuGetProcAddress_v2('cuGraphEventRecordNodeGetEvent', &__cuGraphEventRecordNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphEventRecordNodeSetEvent + _F_cuGetProcAddress_v2('cuGraphEventRecordNodeSetEvent', &__cuGraphEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddEventWaitNode + _F_cuGetProcAddress_v2('cuGraphAddEventWaitNode', &__cuGraphAddEventWaitNode, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphEventWaitNodeGetEvent + _F_cuGetProcAddress_v2('cuGraphEventWaitNodeGetEvent', &__cuGraphEventWaitNodeGetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphEventWaitNodeSetEvent + _F_cuGetProcAddress_v2('cuGraphEventWaitNodeSetEvent', &__cuGraphEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddExternalSemaphoresSignalNode + _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresSignalNode', &__cuGraphAddExternalSemaphoresSignalNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExternalSemaphoresSignalNodeGetParams + _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeGetParams', &__cuGraphExternalSemaphoresSignalNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExternalSemaphoresSignalNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresSignalNodeSetParams', &__cuGraphExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddExternalSemaphoresWaitNode + _F_cuGetProcAddress_v2('cuGraphAddExternalSemaphoresWaitNode', &__cuGraphAddExternalSemaphoresWaitNode, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExternalSemaphoresWaitNodeGetParams + _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeGetParams', &__cuGraphExternalSemaphoresWaitNodeGetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExternalSemaphoresWaitNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExternalSemaphoresWaitNodeSetParams', &__cuGraphExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddBatchMemOpNode + _F_cuGetProcAddress_v2('cuGraphAddBatchMemOpNode', &__cuGraphAddBatchMemOpNode, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphBatchMemOpNodeGetParams + _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeGetParams', &__cuGraphBatchMemOpNodeGetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphBatchMemOpNodeSetParams + _F_cuGetProcAddress_v2('cuGraphBatchMemOpNodeSetParams', &__cuGraphBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecBatchMemOpNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecBatchMemOpNodeSetParams', &__cuGraphExecBatchMemOpNodeSetParams, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddMemAllocNode + _F_cuGetProcAddress_v2('cuGraphAddMemAllocNode', &__cuGraphAddMemAllocNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemAllocNodeGetParams + _F_cuGetProcAddress_v2('cuGraphMemAllocNodeGetParams', &__cuGraphMemAllocNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddMemFreeNode + _F_cuGetProcAddress_v2('cuGraphAddMemFreeNode', &__cuGraphAddMemFreeNode, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphMemFreeNodeGetParams + _F_cuGetProcAddress_v2('cuGraphMemFreeNodeGetParams', &__cuGraphMemFreeNodeGetParams, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGraphMemTrim + _F_cuGetProcAddress_v2('cuDeviceGraphMemTrim', &__cuDeviceGraphMemTrim, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetGraphMemAttribute + _F_cuGetProcAddress_v2('cuDeviceGetGraphMemAttribute', &__cuDeviceGetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceSetGraphMemAttribute + _F_cuGetProcAddress_v2('cuDeviceSetGraphMemAttribute', &__cuDeviceSetGraphMemAttribute, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphClone + _F_cuGetProcAddress_v2('cuGraphClone', &__cuGraphClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeFindInClone + _F_cuGetProcAddress_v2('cuGraphNodeFindInClone', &__cuGraphNodeFindInClone, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetType + _F_cuGetProcAddress_v2('cuGraphNodeGetType', &__cuGraphNodeGetType, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphGetNodes + _F_cuGetProcAddress_v2('cuGraphGetNodes', &__cuGraphGetNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphGetRootNodes + _F_cuGetProcAddress_v2('cuGraphGetRootNodes', &__cuGraphGetRootNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphGetEdges + _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphGetEdges_v2 + _F_cuGetProcAddress_v2('cuGraphGetEdges', &__cuGraphGetEdges_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetDependencies + _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetDependencies_v2 + _F_cuGetProcAddress_v2('cuGraphNodeGetDependencies', &__cuGraphNodeGetDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetDependentNodes + _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetDependentNodes_v2 + _F_cuGetProcAddress_v2('cuGraphNodeGetDependentNodes', &__cuGraphNodeGetDependentNodes_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddDependencies + _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddDependencies_v2 + _F_cuGetProcAddress_v2('cuGraphAddDependencies', &__cuGraphAddDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphRemoveDependencies + _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphRemoveDependencies_v2 + _F_cuGetProcAddress_v2('cuGraphRemoveDependencies', &__cuGraphRemoveDependencies_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphDestroyNode + _F_cuGetProcAddress_v2('cuGraphDestroyNode', &__cuGraphDestroyNode, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphInstantiateWithFlags + _F_cuGetProcAddress_v2('cuGraphInstantiateWithFlags', &__cuGraphInstantiateWithFlags, 11040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecGetFlags + _F_cuGetProcAddress_v2('cuGraphExecGetFlags', &__cuGraphExecGetFlags, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecKernelNodeSetParams_v2 + _F_cuGetProcAddress_v2('cuGraphExecKernelNodeSetParams', &__cuGraphExecKernelNodeSetParams_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecMemcpyNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecMemcpyNodeSetParams', &__cuGraphExecMemcpyNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecMemsetNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecMemsetNodeSetParams', &__cuGraphExecMemsetNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecHostNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecHostNodeSetParams', &__cuGraphExecHostNodeSetParams, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecChildGraphNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecChildGraphNodeSetParams', &__cuGraphExecChildGraphNodeSetParams, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecEventRecordNodeSetEvent + _F_cuGetProcAddress_v2('cuGraphExecEventRecordNodeSetEvent', &__cuGraphExecEventRecordNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecEventWaitNodeSetEvent + _F_cuGetProcAddress_v2('cuGraphExecEventWaitNodeSetEvent', &__cuGraphExecEventWaitNodeSetEvent, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecExternalSemaphoresSignalNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresSignalNodeSetParams', &__cuGraphExecExternalSemaphoresSignalNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecExternalSemaphoresWaitNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecExternalSemaphoresWaitNodeSetParams', &__cuGraphExecExternalSemaphoresWaitNodeSetParams, 11020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeSetEnabled + _F_cuGetProcAddress_v2('cuGraphNodeSetEnabled', &__cuGraphNodeSetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeGetEnabled + _F_cuGetProcAddress_v2('cuGraphNodeGetEnabled', &__cuGraphNodeGetEnabled, 11060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecDestroy + _F_cuGetProcAddress_v2('cuGraphExecDestroy', &__cuGraphExecDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphDestroy + _F_cuGetProcAddress_v2('cuGraphDestroy', &__cuGraphDestroy, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecUpdate_v2 + _F_cuGetProcAddress_v2('cuGraphExecUpdate', &__cuGraphExecUpdate_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphKernelNodeCopyAttributes + _F_cuGetProcAddress_v2('cuGraphKernelNodeCopyAttributes', &__cuGraphKernelNodeCopyAttributes, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphKernelNodeGetAttribute + _F_cuGetProcAddress_v2('cuGraphKernelNodeGetAttribute', &__cuGraphKernelNodeGetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphKernelNodeSetAttribute + _F_cuGetProcAddress_v2('cuGraphKernelNodeSetAttribute', &__cuGraphKernelNodeSetAttribute, 11000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphDebugDotPrint + _F_cuGetProcAddress_v2('cuGraphDebugDotPrint', &__cuGraphDebugDotPrint, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuUserObjectCreate + _F_cuGetProcAddress_v2('cuUserObjectCreate', &__cuUserObjectCreate, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuUserObjectRetain + _F_cuGetProcAddress_v2('cuUserObjectRetain', &__cuUserObjectRetain, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuUserObjectRelease + _F_cuGetProcAddress_v2('cuUserObjectRelease', &__cuUserObjectRelease, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphRetainUserObject + _F_cuGetProcAddress_v2('cuGraphRetainUserObject', &__cuGraphRetainUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphReleaseUserObject + _F_cuGetProcAddress_v2('cuGraphReleaseUserObject', &__cuGraphReleaseUserObject, 11030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddNode + _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphAddNode_v2 + _F_cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v2, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphNodeSetParams + _F_cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphExecNodeSetParams + _F_cuGetProcAddress_v2('cuGraphExecNodeSetParams', &__cuGraphExecNodeSetParams, 12020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphConditionalHandleCreate + _F_cuGetProcAddress_v2('cuGraphConditionalHandleCreate', &__cuGraphConditionalHandleCreate, 12030, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxActiveBlocksPerMultiprocessor + _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessor', &__cuOccupancyMaxActiveBlocksPerMultiprocessor, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + _F_cuGetProcAddress_v2('cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags', &__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxPotentialBlockSize + _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSize', &__cuOccupancyMaxPotentialBlockSize, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxPotentialBlockSizeWithFlags + _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialBlockSizeWithFlags', &__cuOccupancyMaxPotentialBlockSizeWithFlags, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyAvailableDynamicSMemPerBlock + _F_cuGetProcAddress_v2('cuOccupancyAvailableDynamicSMemPerBlock', &__cuOccupancyAvailableDynamicSMemPerBlock, 10020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxPotentialClusterSize + _F_cuGetProcAddress_v2('cuOccupancyMaxPotentialClusterSize', &__cuOccupancyMaxPotentialClusterSize, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuOccupancyMaxActiveClusters + _F_cuGetProcAddress_v2('cuOccupancyMaxActiveClusters', &__cuOccupancyMaxActiveClusters, 11070, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetArray + _F_cuGetProcAddress_v2('cuTexRefSetArray', &__cuTexRefSetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetMipmappedArray + _F_cuGetProcAddress_v2('cuTexRefSetMipmappedArray', &__cuTexRefSetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetAddress_v2 + _F_cuGetProcAddress_v2('cuTexRefSetAddress', &__cuTexRefSetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetAddress2D_v3 + _F_cuGetProcAddress_v2('cuTexRefSetAddress2D', &__cuTexRefSetAddress2D_v3, 4010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetFormat + _F_cuGetProcAddress_v2('cuTexRefSetFormat', &__cuTexRefSetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetAddressMode + _F_cuGetProcAddress_v2('cuTexRefSetAddressMode', &__cuTexRefSetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetFilterMode + _F_cuGetProcAddress_v2('cuTexRefSetFilterMode', &__cuTexRefSetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetMipmapFilterMode + _F_cuGetProcAddress_v2('cuTexRefSetMipmapFilterMode', &__cuTexRefSetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetMipmapLevelBias + _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelBias', &__cuTexRefSetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetMipmapLevelClamp + _F_cuGetProcAddress_v2('cuTexRefSetMipmapLevelClamp', &__cuTexRefSetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetMaxAnisotropy + _F_cuGetProcAddress_v2('cuTexRefSetMaxAnisotropy', &__cuTexRefSetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetBorderColor + _F_cuGetProcAddress_v2('cuTexRefSetBorderColor', &__cuTexRefSetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefSetFlags + _F_cuGetProcAddress_v2('cuTexRefSetFlags', &__cuTexRefSetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetAddress_v2 + _F_cuGetProcAddress_v2('cuTexRefGetAddress', &__cuTexRefGetAddress_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetArray + _F_cuGetProcAddress_v2('cuTexRefGetArray', &__cuTexRefGetArray, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetMipmappedArray + _F_cuGetProcAddress_v2('cuTexRefGetMipmappedArray', &__cuTexRefGetMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetAddressMode + _F_cuGetProcAddress_v2('cuTexRefGetAddressMode', &__cuTexRefGetAddressMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetFilterMode + _F_cuGetProcAddress_v2('cuTexRefGetFilterMode', &__cuTexRefGetFilterMode, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetFormat + _F_cuGetProcAddress_v2('cuTexRefGetFormat', &__cuTexRefGetFormat, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetMipmapFilterMode + _F_cuGetProcAddress_v2('cuTexRefGetMipmapFilterMode', &__cuTexRefGetMipmapFilterMode, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetMipmapLevelBias + _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelBias', &__cuTexRefGetMipmapLevelBias, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetMipmapLevelClamp + _F_cuGetProcAddress_v2('cuTexRefGetMipmapLevelClamp', &__cuTexRefGetMipmapLevelClamp, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetMaxAnisotropy + _F_cuGetProcAddress_v2('cuTexRefGetMaxAnisotropy', &__cuTexRefGetMaxAnisotropy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetBorderColor + _F_cuGetProcAddress_v2('cuTexRefGetBorderColor', &__cuTexRefGetBorderColor, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefGetFlags + _F_cuGetProcAddress_v2('cuTexRefGetFlags', &__cuTexRefGetFlags, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefCreate + _F_cuGetProcAddress_v2('cuTexRefCreate', &__cuTexRefCreate, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexRefDestroy + _F_cuGetProcAddress_v2('cuTexRefDestroy', &__cuTexRefDestroy, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSurfRefSetArray + _F_cuGetProcAddress_v2('cuSurfRefSetArray', &__cuSurfRefSetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSurfRefGetArray + _F_cuGetProcAddress_v2('cuSurfRefGetArray', &__cuSurfRefGetArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexObjectCreate + _F_cuGetProcAddress_v2('cuTexObjectCreate', &__cuTexObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexObjectDestroy + _F_cuGetProcAddress_v2('cuTexObjectDestroy', &__cuTexObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexObjectGetResourceDesc + _F_cuGetProcAddress_v2('cuTexObjectGetResourceDesc', &__cuTexObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexObjectGetTextureDesc + _F_cuGetProcAddress_v2('cuTexObjectGetTextureDesc', &__cuTexObjectGetTextureDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTexObjectGetResourceViewDesc + _F_cuGetProcAddress_v2('cuTexObjectGetResourceViewDesc', &__cuTexObjectGetResourceViewDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSurfObjectCreate + _F_cuGetProcAddress_v2('cuSurfObjectCreate', &__cuSurfObjectCreate, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSurfObjectDestroy + _F_cuGetProcAddress_v2('cuSurfObjectDestroy', &__cuSurfObjectDestroy, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuSurfObjectGetResourceDesc + _F_cuGetProcAddress_v2('cuSurfObjectGetResourceDesc', &__cuSurfObjectGetResourceDesc, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTensorMapEncodeTiled + _F_cuGetProcAddress_v2('cuTensorMapEncodeTiled', &__cuTensorMapEncodeTiled, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTensorMapEncodeIm2col + _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTensorMapEncodeIm2colWide + _F_cuGetProcAddress_v2('cuTensorMapEncodeIm2colWide', &__cuTensorMapEncodeIm2colWide, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuTensorMapReplaceAddress + _F_cuGetProcAddress_v2('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceCanAccessPeer + _F_cuGetProcAddress_v2('cuDeviceCanAccessPeer', &__cuDeviceCanAccessPeer, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxEnablePeerAccess + _F_cuGetProcAddress_v2('cuCtxEnablePeerAccess', &__cuCtxEnablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxDisablePeerAccess + _F_cuGetProcAddress_v2('cuCtxDisablePeerAccess', &__cuCtxDisablePeerAccess, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetP2PAttribute + _F_cuGetProcAddress_v2('cuDeviceGetP2PAttribute', &__cuDeviceGetP2PAttribute, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsUnregisterResource + _F_cuGetProcAddress_v2('cuGraphicsUnregisterResource', &__cuGraphicsUnregisterResource, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsSubResourceGetMappedArray + _F_cuGetProcAddress_v2('cuGraphicsSubResourceGetMappedArray', &__cuGraphicsSubResourceGetMappedArray, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsResourceGetMappedMipmappedArray + _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedMipmappedArray', &__cuGraphicsResourceGetMappedMipmappedArray, 5000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsResourceGetMappedPointer_v2 + _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedPointer', &__cuGraphicsResourceGetMappedPointer_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsResourceSetMapFlags_v2 + _F_cuGetProcAddress_v2('cuGraphicsResourceSetMapFlags', &__cuGraphicsResourceSetMapFlags_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGetProcAddress_v2 + _F_cuGetProcAddress_v2('cuGetProcAddress', &__cuGetProcAddress_v2, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCoredumpGetAttribute + _F_cuGetProcAddress_v2('cuCoredumpGetAttribute', &__cuCoredumpGetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCoredumpGetAttributeGlobal + _F_cuGetProcAddress_v2('cuCoredumpGetAttributeGlobal', &__cuCoredumpGetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCoredumpSetAttribute + _F_cuGetProcAddress_v2('cuCoredumpSetAttribute', &__cuCoredumpSetAttribute, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCoredumpSetAttributeGlobal + _F_cuGetProcAddress_v2('cuCoredumpSetAttributeGlobal', &__cuCoredumpSetAttributeGlobal, 12010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGetExportTable + _F_cuGetProcAddress_v2('cuGetExportTable', &__cuGetExportTable, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxCreate + _F_cuGetProcAddress_v2('cuGreenCtxCreate', &__cuGreenCtxCreate, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxDestroy + _F_cuGetProcAddress_v2('cuGreenCtxDestroy', &__cuGreenCtxDestroy, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxFromGreenCtx + _F_cuGetProcAddress_v2('cuCtxFromGreenCtx', &__cuCtxFromGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDeviceGetDevResource + _F_cuGetProcAddress_v2('cuDeviceGetDevResource', &__cuDeviceGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCtxGetDevResource + _F_cuGetProcAddress_v2('cuCtxGetDevResource', &__cuCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxGetDevResource + _F_cuGetProcAddress_v2('cuGreenCtxGetDevResource', &__cuGreenCtxGetDevResource, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevSmResourceSplitByCount + _F_cuGetProcAddress_v2('cuDevSmResourceSplitByCount', &__cuDevSmResourceSplitByCount, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuDevResourceGenerateDesc + _F_cuGetProcAddress_v2('cuDevResourceGenerateDesc', &__cuDevResourceGenerateDesc, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxRecordEvent + _F_cuGetProcAddress_v2('cuGreenCtxRecordEvent', &__cuGreenCtxRecordEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxWaitEvent + _F_cuGetProcAddress_v2('cuGreenCtxWaitEvent', &__cuGreenCtxWaitEvent, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuStreamGetGreenCtx + _F_cuGetProcAddress_v2('cuStreamGetGreenCtx', &__cuStreamGetGreenCtx, 12040, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGreenCtxStreamCreate + _F_cuGetProcAddress_v2('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLogsRegisterCallback + _F_cuGetProcAddress_v2('cuLogsRegisterCallback', &__cuLogsRegisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLogsUnregisterCallback + _F_cuGetProcAddress_v2('cuLogsUnregisterCallback', &__cuLogsUnregisterCallback, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLogsCurrent + _F_cuGetProcAddress_v2('cuLogsCurrent', &__cuLogsCurrent, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLogsDumpToFile + _F_cuGetProcAddress_v2('cuLogsDumpToFile', &__cuLogsDumpToFile, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuLogsDumpToMemory + _F_cuGetProcAddress_v2('cuLogsDumpToMemory', &__cuLogsDumpToMemory, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessGetRestoreThreadId + _F_cuGetProcAddress_v2('cuCheckpointProcessGetRestoreThreadId', &__cuCheckpointProcessGetRestoreThreadId, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessGetState + _F_cuGetProcAddress_v2('cuCheckpointProcessGetState', &__cuCheckpointProcessGetState, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessLock + _F_cuGetProcAddress_v2('cuCheckpointProcessLock', &__cuCheckpointProcessLock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessCheckpoint + _F_cuGetProcAddress_v2('cuCheckpointProcessCheckpoint', &__cuCheckpointProcessCheckpoint, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessRestore + _F_cuGetProcAddress_v2('cuCheckpointProcessRestore', &__cuCheckpointProcessRestore, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuCheckpointProcessUnlock + _F_cuGetProcAddress_v2('cuCheckpointProcessUnlock', &__cuCheckpointProcessUnlock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuProfilerStart + _F_cuGetProcAddress_v2('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuProfilerStop + _F_cuGetProcAddress_v2('cuProfilerStop', &__cuProfilerStop, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsEGLRegisterImage + _F_cuGetProcAddress_v2('cuGraphicsEGLRegisterImage', &__cuGraphicsEGLRegisterImage, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamConsumerConnect + _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnect', &__cuEGLStreamConsumerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamConsumerConnectWithFlags + _F_cuGetProcAddress_v2('cuEGLStreamConsumerConnectWithFlags', &__cuEGLStreamConsumerConnectWithFlags, 8000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamConsumerDisconnect + _F_cuGetProcAddress_v2('cuEGLStreamConsumerDisconnect', &__cuEGLStreamConsumerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamConsumerAcquireFrame + _F_cuGetProcAddress_v2('cuEGLStreamConsumerAcquireFrame', &__cuEGLStreamConsumerAcquireFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamConsumerReleaseFrame + _F_cuGetProcAddress_v2('cuEGLStreamConsumerReleaseFrame', &__cuEGLStreamConsumerReleaseFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamProducerConnect + _F_cuGetProcAddress_v2('cuEGLStreamProducerConnect', &__cuEGLStreamProducerConnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamProducerDisconnect + _F_cuGetProcAddress_v2('cuEGLStreamProducerDisconnect', &__cuEGLStreamProducerDisconnect, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamProducerPresentFrame + _F_cuGetProcAddress_v2('cuEGLStreamProducerPresentFrame', &__cuEGLStreamProducerPresentFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEGLStreamProducerReturnFrame + _F_cuGetProcAddress_v2('cuEGLStreamProducerReturnFrame', &__cuEGLStreamProducerReturnFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsResourceGetMappedEglFrame + _F_cuGetProcAddress_v2('cuGraphicsResourceGetMappedEglFrame', &__cuGraphicsResourceGetMappedEglFrame, 7000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuEventCreateFromEGLSync + _F_cuGetProcAddress_v2('cuEventCreateFromEGLSync', &__cuEventCreateFromEGLSync, 9000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsGLRegisterBuffer + _F_cuGetProcAddress_v2('cuGraphicsGLRegisterBuffer', &__cuGraphicsGLRegisterBuffer, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsGLRegisterImage + _F_cuGetProcAddress_v2('cuGraphicsGLRegisterImage', &__cuGraphicsGLRegisterImage, 3000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGLGetDevices_v2 + _F_cuGetProcAddress_v2('cuGLGetDevices', &__cuGLGetDevices_v2, 6050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuVDPAUGetDevice + _F_cuGetProcAddress_v2('cuVDPAUGetDevice', &__cuVDPAUGetDevice, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuVDPAUCtxCreate_v2 + _F_cuGetProcAddress_v2('cuVDPAUCtxCreate', &__cuVDPAUCtxCreate_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsVDPAURegisterVideoSurface + _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterVideoSurface', &__cuGraphicsVDPAURegisterVideoSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + global __cuGraphicsVDPAURegisterOutputSurface + _F_cuGetProcAddress_v2('cuGraphicsVDPAURegisterOutputSurface', &__cuGraphicsVDPAURegisterOutputSurface, 3010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + __cuPythonInit = True + return 0 + + # Load using dlsym + if usePTDS: + # Get all PTDS version of functions + pass + global __cuMemcpy + __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy_ptds') + global __cuMemcpyPeer + __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer_ptds') + global __cuMemcpyHtoD_v2 + __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2_ptds') + global __cuMemcpyDtoH_v2 + __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2_ptds') + global __cuMemcpyDtoD_v2 + __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2_ptds') + global __cuMemcpyDtoA_v2 + __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2_ptds') + global __cuMemcpyAtoD_v2 + __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2_ptds') + global __cuMemcpyHtoA_v2 + __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2_ptds') + global __cuMemcpyAtoH_v2 + __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2_ptds') + global __cuMemcpyAtoA_v2 + __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2_ptds') + global __cuMemcpy2D_v2 + __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2_ptds') + global __cuMemcpy2DUnaligned_v2 + __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2_ptds') + global __cuMemcpy3D_v2 + __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2_ptds') + global __cuMemcpy3DPeer + __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer_ptds') + global __cuMemcpyAsync + __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync_ptsz') + global __cuMemcpyPeerAsync + __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync_ptsz') + global __cuMemcpyHtoDAsync_v2 + __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2_ptsz') + global __cuMemcpyDtoHAsync_v2 + __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2_ptsz') + global __cuMemcpyDtoDAsync_v2 + __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2_ptsz') + global __cuMemcpyHtoAAsync_v2 + __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2_ptsz') + global __cuMemcpyAtoHAsync_v2 + __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2_ptsz') + global __cuMemcpy2DAsync_v2 + __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2_ptsz') + global __cuMemcpy3DAsync_v2 + __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2_ptsz') + global __cuMemcpy3DPeerAsync + __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync_ptsz') + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync_ptsz') + global __cuMemsetD8_v2 + __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') + global __cuMemsetD16_v2 + __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2_ptds') + global __cuMemsetD32_v2 + __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2_ptds') + global __cuMemsetD2D8_v2 + __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2_ptds') + global __cuMemsetD2D16_v2 + __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2_ptds') + global __cuMemsetD2D32_v2 + __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2_ptds') + global __cuMemsetD8Async + __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async_ptsz') + global __cuMemsetD16Async + __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async_ptsz') + global __cuMemsetD32Async + __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async_ptsz') + global __cuMemsetD2D8Async + __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async_ptsz') + global __cuMemsetD2D16Async + __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async_ptsz') + global __cuMemsetD2D32Async + __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync_ptsz') + global __cuMemMapArrayAsync + __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') + global __cuMemFreeAsync + __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync_ptsz') + global __cuMemAllocAsync + __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync_ptsz') + global __cuMemAllocFromPoolAsync + __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync_ptsz') + global __cuMemPrefetchAsync + __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_ptsz') + global __cuMemPrefetchAsync_v2 + __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2_ptsz') + global __cuStreamGetPriority + __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') + global __cuStreamGetDevice + __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice_ptsz') + global __cuStreamGetFlags + __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') + global __cuStreamGetId + __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId_ptsz') + global __cuStreamGetCtx + __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx_ptsz') + global __cuStreamGetCtx_v2 + __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2_ptsz') + global __cuStreamWaitEvent + __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent_ptsz') + global __cuStreamAddCallback + __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback_ptsz') + global __cuStreamBeginCapture_v2 + __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2_ptsz') + global __cuStreamBeginCaptureToGraph + __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph_ptsz') + global __cuStreamEndCapture + __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture_ptsz') + global __cuStreamIsCapturing + __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing_ptsz') + global __cuStreamGetCaptureInfo_v2 + __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2_ptsz') + global __cuStreamGetCaptureInfo_v3 + __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3_ptsz') + global __cuStreamUpdateCaptureDependencies + __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_ptsz') + global __cuStreamUpdateCaptureDependencies_v2 + __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2_ptsz') + global __cuStreamAttachMemAsync + __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync_ptsz') + global __cuStreamQuery + __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery_ptsz') + global __cuStreamSynchronize + __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize_ptsz') + global __cuStreamCopyAttributes + __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes_ptsz') + global __cuStreamGetAttribute + __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute_ptsz') + global __cuStreamSetAttribute + __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute_ptsz') + global __cuEventRecord + __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord_ptsz') + global __cuEventRecordWithFlags + __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags_ptsz') + global __cuSignalExternalSemaphoresAsync + __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync_ptsz') + global __cuWaitExternalSemaphoresAsync + __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync_ptsz') + global __cuStreamWaitValue32_v2 + __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2_ptsz') + global __cuStreamWaitValue64_v2 + __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2_ptsz') + global __cuStreamWriteValue32_v2 + __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2_ptsz') + global __cuStreamWriteValue64_v2 + __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2_ptsz') + global __cuStreamBatchMemOp_v2 + __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2_ptsz') + global __cuLaunchKernel + __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel_ptsz') + global __cuLaunchKernelEx + __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx_ptsz') + global __cuLaunchCooperativeKernel + __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel_ptsz') + global __cuLaunchHostFunc + __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc_ptsz') + global __cuGraphInstantiateWithParams + __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams_ptsz') + global __cuGraphUpload + __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload_ptsz') + global __cuGraphLaunch + __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch_ptsz') + global __cuGraphicsMapResources + __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources_ptsz') + global __cuGraphicsUnmapResources + __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources_ptsz') + else: + # Else get the regular version + pass + global __cuMemcpy + __cuMemcpy = dlfcn.dlsym(handle, 'cuMemcpy') + global __cuMemcpyPeer + __cuMemcpyPeer = dlfcn.dlsym(handle, 'cuMemcpyPeer') + global __cuMemcpyHtoD_v2 + __cuMemcpyHtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoD_v2') + global __cuMemcpyDtoH_v2 + __cuMemcpyDtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoH_v2') + global __cuMemcpyDtoD_v2 + __cuMemcpyDtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoD_v2') + global __cuMemcpyDtoA_v2 + __cuMemcpyDtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoA_v2') + global __cuMemcpyAtoD_v2 + __cuMemcpyAtoD_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoD_v2') + global __cuMemcpyHtoA_v2 + __cuMemcpyHtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoA_v2') + global __cuMemcpyAtoH_v2 + __cuMemcpyAtoH_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoH_v2') + global __cuMemcpyAtoA_v2 + __cuMemcpyAtoA_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoA_v2') + global __cuMemcpy2D_v2 + __cuMemcpy2D_v2 = dlfcn.dlsym(handle, 'cuMemcpy2D_v2') + global __cuMemcpy2DUnaligned_v2 + __cuMemcpy2DUnaligned_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DUnaligned_v2') + global __cuMemcpy3D_v2 + __cuMemcpy3D_v2 = dlfcn.dlsym(handle, 'cuMemcpy3D_v2') + global __cuMemcpy3DPeer + __cuMemcpy3DPeer = dlfcn.dlsym(handle, 'cuMemcpy3DPeer') + global __cuMemcpyAsync + __cuMemcpyAsync = dlfcn.dlsym(handle, 'cuMemcpyAsync') + global __cuMemcpyPeerAsync + __cuMemcpyPeerAsync = dlfcn.dlsym(handle, 'cuMemcpyPeerAsync') + global __cuMemcpyHtoDAsync_v2 + __cuMemcpyHtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoDAsync_v2') + global __cuMemcpyDtoHAsync_v2 + __cuMemcpyDtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoHAsync_v2') + global __cuMemcpyDtoDAsync_v2 + __cuMemcpyDtoDAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyDtoDAsync_v2') + global __cuMemcpyHtoAAsync_v2 + __cuMemcpyHtoAAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyHtoAAsync_v2') + global __cuMemcpyAtoHAsync_v2 + __cuMemcpyAtoHAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpyAtoHAsync_v2') + global __cuMemcpy2DAsync_v2 + __cuMemcpy2DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy2DAsync_v2') + global __cuMemcpy3DAsync_v2 + __cuMemcpy3DAsync_v2 = dlfcn.dlsym(handle, 'cuMemcpy3DAsync_v2') + global __cuMemcpy3DPeerAsync + __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync') + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync') + global __cuMemsetD8_v2 + __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') + global __cuMemsetD16_v2 + __cuMemsetD16_v2 = dlfcn.dlsym(handle, 'cuMemsetD16_v2') + global __cuMemsetD32_v2 + __cuMemsetD32_v2 = dlfcn.dlsym(handle, 'cuMemsetD32_v2') + global __cuMemsetD2D8_v2 + __cuMemsetD2D8_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D8_v2') + global __cuMemsetD2D16_v2 + __cuMemsetD2D16_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D16_v2') + global __cuMemsetD2D32_v2 + __cuMemsetD2D32_v2 = dlfcn.dlsym(handle, 'cuMemsetD2D32_v2') + global __cuMemsetD8Async + __cuMemsetD8Async = dlfcn.dlsym(handle, 'cuMemsetD8Async') + global __cuMemsetD16Async + __cuMemsetD16Async = dlfcn.dlsym(handle, 'cuMemsetD16Async') + global __cuMemsetD32Async + __cuMemsetD32Async = dlfcn.dlsym(handle, 'cuMemsetD32Async') + global __cuMemsetD2D8Async + __cuMemsetD2D8Async = dlfcn.dlsym(handle, 'cuMemsetD2D8Async') + global __cuMemsetD2D16Async + __cuMemsetD2D16Async = dlfcn.dlsym(handle, 'cuMemsetD2D16Async') + global __cuMemsetD2D32Async + __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync') + global __cuMemMapArrayAsync + __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') + global __cuMemFreeAsync + __cuMemFreeAsync = dlfcn.dlsym(handle, 'cuMemFreeAsync') + global __cuMemAllocAsync + __cuMemAllocAsync = dlfcn.dlsym(handle, 'cuMemAllocAsync') + global __cuMemAllocFromPoolAsync + __cuMemAllocFromPoolAsync = dlfcn.dlsym(handle, 'cuMemAllocFromPoolAsync') + global __cuMemPrefetchAsync + __cuMemPrefetchAsync = dlfcn.dlsym(handle, 'cuMemPrefetchAsync') + global __cuMemPrefetchAsync_v2 + __cuMemPrefetchAsync_v2 = dlfcn.dlsym(handle, 'cuMemPrefetchAsync_v2') + global __cuStreamGetPriority + __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') + global __cuStreamGetDevice + __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice') + global __cuStreamGetFlags + __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') + global __cuStreamGetId + __cuStreamGetId = dlfcn.dlsym(handle, 'cuStreamGetId') + global __cuStreamGetCtx + __cuStreamGetCtx = dlfcn.dlsym(handle, 'cuStreamGetCtx') + global __cuStreamGetCtx_v2 + __cuStreamGetCtx_v2 = dlfcn.dlsym(handle, 'cuStreamGetCtx_v2') + global __cuStreamWaitEvent + __cuStreamWaitEvent = dlfcn.dlsym(handle, 'cuStreamWaitEvent') + global __cuStreamAddCallback + __cuStreamAddCallback = dlfcn.dlsym(handle, 'cuStreamAddCallback') + global __cuStreamBeginCapture_v2 + __cuStreamBeginCapture_v2 = dlfcn.dlsym(handle, 'cuStreamBeginCapture_v2') + global __cuStreamBeginCaptureToGraph + __cuStreamBeginCaptureToGraph = dlfcn.dlsym(handle, 'cuStreamBeginCaptureToGraph') + global __cuStreamEndCapture + __cuStreamEndCapture = dlfcn.dlsym(handle, 'cuStreamEndCapture') + global __cuStreamIsCapturing + __cuStreamIsCapturing = dlfcn.dlsym(handle, 'cuStreamIsCapturing') + global __cuStreamGetCaptureInfo_v2 + __cuStreamGetCaptureInfo_v2 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v2') + global __cuStreamGetCaptureInfo_v3 + __cuStreamGetCaptureInfo_v3 = dlfcn.dlsym(handle, 'cuStreamGetCaptureInfo_v3') + global __cuStreamUpdateCaptureDependencies + __cuStreamUpdateCaptureDependencies = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies') + global __cuStreamUpdateCaptureDependencies_v2 + __cuStreamUpdateCaptureDependencies_v2 = dlfcn.dlsym(handle, 'cuStreamUpdateCaptureDependencies_v2') + global __cuStreamAttachMemAsync + __cuStreamAttachMemAsync = dlfcn.dlsym(handle, 'cuStreamAttachMemAsync') + global __cuStreamQuery + __cuStreamQuery = dlfcn.dlsym(handle, 'cuStreamQuery') + global __cuStreamSynchronize + __cuStreamSynchronize = dlfcn.dlsym(handle, 'cuStreamSynchronize') + global __cuStreamCopyAttributes + __cuStreamCopyAttributes = dlfcn.dlsym(handle, 'cuStreamCopyAttributes') + global __cuStreamGetAttribute + __cuStreamGetAttribute = dlfcn.dlsym(handle, 'cuStreamGetAttribute') + global __cuStreamSetAttribute + __cuStreamSetAttribute = dlfcn.dlsym(handle, 'cuStreamSetAttribute') + global __cuEventRecord + __cuEventRecord = dlfcn.dlsym(handle, 'cuEventRecord') + global __cuEventRecordWithFlags + __cuEventRecordWithFlags = dlfcn.dlsym(handle, 'cuEventRecordWithFlags') + global __cuSignalExternalSemaphoresAsync + __cuSignalExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuSignalExternalSemaphoresAsync') + global __cuWaitExternalSemaphoresAsync + __cuWaitExternalSemaphoresAsync = dlfcn.dlsym(handle, 'cuWaitExternalSemaphoresAsync') + global __cuStreamWaitValue32_v2 + __cuStreamWaitValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue32_v2') + global __cuStreamWaitValue64_v2 + __cuStreamWaitValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWaitValue64_v2') + global __cuStreamWriteValue32_v2 + __cuStreamWriteValue32_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue32_v2') + global __cuStreamWriteValue64_v2 + __cuStreamWriteValue64_v2 = dlfcn.dlsym(handle, 'cuStreamWriteValue64_v2') + global __cuStreamBatchMemOp_v2 + __cuStreamBatchMemOp_v2 = dlfcn.dlsym(handle, 'cuStreamBatchMemOp_v2') + global __cuLaunchKernel + __cuLaunchKernel = dlfcn.dlsym(handle, 'cuLaunchKernel') + global __cuLaunchKernelEx + __cuLaunchKernelEx = dlfcn.dlsym(handle, 'cuLaunchKernelEx') + global __cuLaunchCooperativeKernel + __cuLaunchCooperativeKernel = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernel') + global __cuLaunchHostFunc + __cuLaunchHostFunc = dlfcn.dlsym(handle, 'cuLaunchHostFunc') + global __cuGraphInstantiateWithParams + __cuGraphInstantiateWithParams = dlfcn.dlsym(handle, 'cuGraphInstantiateWithParams') + global __cuGraphUpload + __cuGraphUpload = dlfcn.dlsym(handle, 'cuGraphUpload') + global __cuGraphLaunch + __cuGraphLaunch = dlfcn.dlsym(handle, 'cuGraphLaunch') + global __cuGraphicsMapResources + __cuGraphicsMapResources = dlfcn.dlsym(handle, 'cuGraphicsMapResources') + global __cuGraphicsUnmapResources + __cuGraphicsUnmapResources = dlfcn.dlsym(handle, 'cuGraphicsUnmapResources') + # Get remaining functions + global __cuGetErrorString + __cuGetErrorString = dlfcn.dlsym(handle, 'cuGetErrorString') + global __cuGetErrorName + __cuGetErrorName = dlfcn.dlsym(handle, 'cuGetErrorName') + global __cuInit + __cuInit = dlfcn.dlsym(handle, 'cuInit') + global __cuDriverGetVersion + __cuDriverGetVersion = dlfcn.dlsym(handle, 'cuDriverGetVersion') + global __cuDeviceGet + __cuDeviceGet = dlfcn.dlsym(handle, 'cuDeviceGet') + global __cuDeviceGetCount + __cuDeviceGetCount = dlfcn.dlsym(handle, 'cuDeviceGetCount') + global __cuDeviceGetName + __cuDeviceGetName = dlfcn.dlsym(handle, 'cuDeviceGetName') + global __cuDeviceGetUuid + __cuDeviceGetUuid = dlfcn.dlsym(handle, 'cuDeviceGetUuid') + global __cuDeviceGetUuid_v2 + __cuDeviceGetUuid_v2 = dlfcn.dlsym(handle, 'cuDeviceGetUuid_v2') + global __cuDeviceGetLuid + __cuDeviceGetLuid = dlfcn.dlsym(handle, 'cuDeviceGetLuid') + global __cuDeviceTotalMem_v2 + __cuDeviceTotalMem_v2 = dlfcn.dlsym(handle, 'cuDeviceTotalMem_v2') + global __cuDeviceGetTexture1DLinearMaxWidth + __cuDeviceGetTexture1DLinearMaxWidth = dlfcn.dlsym(handle, 'cuDeviceGetTexture1DLinearMaxWidth') + global __cuDeviceGetAttribute + __cuDeviceGetAttribute = dlfcn.dlsym(handle, 'cuDeviceGetAttribute') + global __cuDeviceGetNvSciSyncAttributes + __cuDeviceGetNvSciSyncAttributes = dlfcn.dlsym(handle, 'cuDeviceGetNvSciSyncAttributes') + global __cuDeviceSetMemPool + __cuDeviceSetMemPool = dlfcn.dlsym(handle, 'cuDeviceSetMemPool') + global __cuDeviceGetMemPool + __cuDeviceGetMemPool = dlfcn.dlsym(handle, 'cuDeviceGetMemPool') + global __cuDeviceGetDefaultMemPool + __cuDeviceGetDefaultMemPool = dlfcn.dlsym(handle, 'cuDeviceGetDefaultMemPool') + global __cuDeviceGetExecAffinitySupport + __cuDeviceGetExecAffinitySupport = dlfcn.dlsym(handle, 'cuDeviceGetExecAffinitySupport') + global __cuFlushGPUDirectRDMAWrites + __cuFlushGPUDirectRDMAWrites = dlfcn.dlsym(handle, 'cuFlushGPUDirectRDMAWrites') + global __cuDeviceGetProperties + __cuDeviceGetProperties = dlfcn.dlsym(handle, 'cuDeviceGetProperties') + global __cuDeviceComputeCapability + __cuDeviceComputeCapability = dlfcn.dlsym(handle, 'cuDeviceComputeCapability') + global __cuDevicePrimaryCtxRetain + __cuDevicePrimaryCtxRetain = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRetain') + global __cuDevicePrimaryCtxRelease_v2 + __cuDevicePrimaryCtxRelease_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxRelease_v2') + global __cuDevicePrimaryCtxSetFlags_v2 + __cuDevicePrimaryCtxSetFlags_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxSetFlags_v2') + global __cuDevicePrimaryCtxGetState + __cuDevicePrimaryCtxGetState = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxGetState') + global __cuDevicePrimaryCtxReset_v2 + __cuDevicePrimaryCtxReset_v2 = dlfcn.dlsym(handle, 'cuDevicePrimaryCtxReset_v2') + global __cuCtxCreate_v2 + __cuCtxCreate_v2 = dlfcn.dlsym(handle, 'cuCtxCreate_v2') + global __cuCtxCreate_v3 + __cuCtxCreate_v3 = dlfcn.dlsym(handle, 'cuCtxCreate_v3') + global __cuCtxCreate_v4 + __cuCtxCreate_v4 = dlfcn.dlsym(handle, 'cuCtxCreate_v4') + global __cuCtxDestroy_v2 + __cuCtxDestroy_v2 = dlfcn.dlsym(handle, 'cuCtxDestroy_v2') + global __cuCtxPushCurrent_v2 + __cuCtxPushCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPushCurrent_v2') + global __cuCtxPopCurrent_v2 + __cuCtxPopCurrent_v2 = dlfcn.dlsym(handle, 'cuCtxPopCurrent_v2') + global __cuCtxSetCurrent + __cuCtxSetCurrent = dlfcn.dlsym(handle, 'cuCtxSetCurrent') + global __cuCtxGetCurrent + __cuCtxGetCurrent = dlfcn.dlsym(handle, 'cuCtxGetCurrent') + global __cuCtxGetDevice + __cuCtxGetDevice = dlfcn.dlsym(handle, 'cuCtxGetDevice') + global __cuCtxGetFlags + __cuCtxGetFlags = dlfcn.dlsym(handle, 'cuCtxGetFlags') + global __cuCtxSetFlags + __cuCtxSetFlags = dlfcn.dlsym(handle, 'cuCtxSetFlags') + global __cuCtxGetId + __cuCtxGetId = dlfcn.dlsym(handle, 'cuCtxGetId') + global __cuCtxSynchronize + __cuCtxSynchronize = dlfcn.dlsym(handle, 'cuCtxSynchronize') + global __cuCtxSetLimit + __cuCtxSetLimit = dlfcn.dlsym(handle, 'cuCtxSetLimit') + global __cuCtxGetLimit + __cuCtxGetLimit = dlfcn.dlsym(handle, 'cuCtxGetLimit') + global __cuCtxGetCacheConfig + __cuCtxGetCacheConfig = dlfcn.dlsym(handle, 'cuCtxGetCacheConfig') + global __cuCtxSetCacheConfig + __cuCtxSetCacheConfig = dlfcn.dlsym(handle, 'cuCtxSetCacheConfig') + global __cuCtxGetApiVersion + __cuCtxGetApiVersion = dlfcn.dlsym(handle, 'cuCtxGetApiVersion') + global __cuCtxGetStreamPriorityRange + __cuCtxGetStreamPriorityRange = dlfcn.dlsym(handle, 'cuCtxGetStreamPriorityRange') + global __cuCtxResetPersistingL2Cache + __cuCtxResetPersistingL2Cache = dlfcn.dlsym(handle, 'cuCtxResetPersistingL2Cache') + global __cuCtxGetExecAffinity + __cuCtxGetExecAffinity = dlfcn.dlsym(handle, 'cuCtxGetExecAffinity') + global __cuCtxRecordEvent + __cuCtxRecordEvent = dlfcn.dlsym(handle, 'cuCtxRecordEvent') + global __cuCtxWaitEvent + __cuCtxWaitEvent = dlfcn.dlsym(handle, 'cuCtxWaitEvent') + global __cuCtxAttach + __cuCtxAttach = dlfcn.dlsym(handle, 'cuCtxAttach') + global __cuCtxDetach + __cuCtxDetach = dlfcn.dlsym(handle, 'cuCtxDetach') + global __cuCtxGetSharedMemConfig + __cuCtxGetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxGetSharedMemConfig') + global __cuCtxSetSharedMemConfig + __cuCtxSetSharedMemConfig = dlfcn.dlsym(handle, 'cuCtxSetSharedMemConfig') + global __cuModuleLoad + __cuModuleLoad = dlfcn.dlsym(handle, 'cuModuleLoad') + global __cuModuleLoadData + __cuModuleLoadData = dlfcn.dlsym(handle, 'cuModuleLoadData') + global __cuModuleLoadDataEx + __cuModuleLoadDataEx = dlfcn.dlsym(handle, 'cuModuleLoadDataEx') + global __cuModuleLoadFatBinary + __cuModuleLoadFatBinary = dlfcn.dlsym(handle, 'cuModuleLoadFatBinary') + global __cuModuleUnload + __cuModuleUnload = dlfcn.dlsym(handle, 'cuModuleUnload') + global __cuModuleGetLoadingMode + __cuModuleGetLoadingMode = dlfcn.dlsym(handle, 'cuModuleGetLoadingMode') + global __cuModuleGetFunction + __cuModuleGetFunction = dlfcn.dlsym(handle, 'cuModuleGetFunction') + global __cuModuleGetFunctionCount + __cuModuleGetFunctionCount = dlfcn.dlsym(handle, 'cuModuleGetFunctionCount') + global __cuModuleEnumerateFunctions + __cuModuleEnumerateFunctions = dlfcn.dlsym(handle, 'cuModuleEnumerateFunctions') + global __cuModuleGetGlobal_v2 + __cuModuleGetGlobal_v2 = dlfcn.dlsym(handle, 'cuModuleGetGlobal_v2') + global __cuLinkCreate_v2 + __cuLinkCreate_v2 = dlfcn.dlsym(handle, 'cuLinkCreate_v2') + global __cuLinkAddData_v2 + __cuLinkAddData_v2 = dlfcn.dlsym(handle, 'cuLinkAddData_v2') + global __cuLinkAddFile_v2 + __cuLinkAddFile_v2 = dlfcn.dlsym(handle, 'cuLinkAddFile_v2') + global __cuLinkComplete + __cuLinkComplete = dlfcn.dlsym(handle, 'cuLinkComplete') + global __cuLinkDestroy + __cuLinkDestroy = dlfcn.dlsym(handle, 'cuLinkDestroy') + global __cuModuleGetTexRef + __cuModuleGetTexRef = dlfcn.dlsym(handle, 'cuModuleGetTexRef') + global __cuModuleGetSurfRef + __cuModuleGetSurfRef = dlfcn.dlsym(handle, 'cuModuleGetSurfRef') + global __cuLibraryLoadData + __cuLibraryLoadData = dlfcn.dlsym(handle, 'cuLibraryLoadData') + global __cuLibraryLoadFromFile + __cuLibraryLoadFromFile = dlfcn.dlsym(handle, 'cuLibraryLoadFromFile') + global __cuLibraryUnload + __cuLibraryUnload = dlfcn.dlsym(handle, 'cuLibraryUnload') + global __cuLibraryGetKernel + __cuLibraryGetKernel = dlfcn.dlsym(handle, 'cuLibraryGetKernel') + global __cuLibraryGetKernelCount + __cuLibraryGetKernelCount = dlfcn.dlsym(handle, 'cuLibraryGetKernelCount') + global __cuLibraryEnumerateKernels + __cuLibraryEnumerateKernels = dlfcn.dlsym(handle, 'cuLibraryEnumerateKernels') + global __cuLibraryGetModule + __cuLibraryGetModule = dlfcn.dlsym(handle, 'cuLibraryGetModule') + global __cuKernelGetFunction + __cuKernelGetFunction = dlfcn.dlsym(handle, 'cuKernelGetFunction') + global __cuKernelGetLibrary + __cuKernelGetLibrary = dlfcn.dlsym(handle, 'cuKernelGetLibrary') + global __cuLibraryGetGlobal + __cuLibraryGetGlobal = dlfcn.dlsym(handle, 'cuLibraryGetGlobal') + global __cuLibraryGetManaged + __cuLibraryGetManaged = dlfcn.dlsym(handle, 'cuLibraryGetManaged') + global __cuLibraryGetUnifiedFunction + __cuLibraryGetUnifiedFunction = dlfcn.dlsym(handle, 'cuLibraryGetUnifiedFunction') + global __cuKernelGetAttribute + __cuKernelGetAttribute = dlfcn.dlsym(handle, 'cuKernelGetAttribute') + global __cuKernelSetAttribute + __cuKernelSetAttribute = dlfcn.dlsym(handle, 'cuKernelSetAttribute') + global __cuKernelSetCacheConfig + __cuKernelSetCacheConfig = dlfcn.dlsym(handle, 'cuKernelSetCacheConfig') + global __cuKernelGetName + __cuKernelGetName = dlfcn.dlsym(handle, 'cuKernelGetName') + global __cuKernelGetParamInfo + __cuKernelGetParamInfo = dlfcn.dlsym(handle, 'cuKernelGetParamInfo') + global __cuMemGetInfo_v2 + __cuMemGetInfo_v2 = dlfcn.dlsym(handle, 'cuMemGetInfo_v2') + global __cuMemAlloc_v2 + __cuMemAlloc_v2 = dlfcn.dlsym(handle, 'cuMemAlloc_v2') + global __cuMemAllocPitch_v2 + __cuMemAllocPitch_v2 = dlfcn.dlsym(handle, 'cuMemAllocPitch_v2') + global __cuMemFree_v2 + __cuMemFree_v2 = dlfcn.dlsym(handle, 'cuMemFree_v2') + global __cuMemGetAddressRange_v2 + __cuMemGetAddressRange_v2 = dlfcn.dlsym(handle, 'cuMemGetAddressRange_v2') + global __cuMemAllocHost_v2 + __cuMemAllocHost_v2 = dlfcn.dlsym(handle, 'cuMemAllocHost_v2') + global __cuMemFreeHost + __cuMemFreeHost = dlfcn.dlsym(handle, 'cuMemFreeHost') + global __cuMemHostAlloc + __cuMemHostAlloc = dlfcn.dlsym(handle, 'cuMemHostAlloc') + global __cuMemHostGetDevicePointer_v2 + __cuMemHostGetDevicePointer_v2 = dlfcn.dlsym(handle, 'cuMemHostGetDevicePointer_v2') + global __cuMemHostGetFlags + __cuMemHostGetFlags = dlfcn.dlsym(handle, 'cuMemHostGetFlags') + global __cuMemAllocManaged + __cuMemAllocManaged = dlfcn.dlsym(handle, 'cuMemAllocManaged') + global __cuDeviceRegisterAsyncNotification + __cuDeviceRegisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceRegisterAsyncNotification') + global __cuDeviceUnregisterAsyncNotification + __cuDeviceUnregisterAsyncNotification = dlfcn.dlsym(handle, 'cuDeviceUnregisterAsyncNotification') + global __cuDeviceGetByPCIBusId + __cuDeviceGetByPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetByPCIBusId') + global __cuDeviceGetPCIBusId + __cuDeviceGetPCIBusId = dlfcn.dlsym(handle, 'cuDeviceGetPCIBusId') + global __cuIpcGetEventHandle + __cuIpcGetEventHandle = dlfcn.dlsym(handle, 'cuIpcGetEventHandle') + global __cuIpcOpenEventHandle + __cuIpcOpenEventHandle = dlfcn.dlsym(handle, 'cuIpcOpenEventHandle') + global __cuIpcGetMemHandle + __cuIpcGetMemHandle = dlfcn.dlsym(handle, 'cuIpcGetMemHandle') + global __cuIpcOpenMemHandle_v2 + __cuIpcOpenMemHandle_v2 = dlfcn.dlsym(handle, 'cuIpcOpenMemHandle_v2') + global __cuIpcCloseMemHandle + __cuIpcCloseMemHandle = dlfcn.dlsym(handle, 'cuIpcCloseMemHandle') + global __cuMemHostRegister_v2 + __cuMemHostRegister_v2 = dlfcn.dlsym(handle, 'cuMemHostRegister_v2') + global __cuMemHostUnregister + __cuMemHostUnregister = dlfcn.dlsym(handle, 'cuMemHostUnregister') + global __cuArrayCreate_v2 + __cuArrayCreate_v2 = dlfcn.dlsym(handle, 'cuArrayCreate_v2') + global __cuArrayGetDescriptor_v2 + __cuArrayGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArrayGetDescriptor_v2') + global __cuArrayGetSparseProperties + __cuArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuArrayGetSparseProperties') + global __cuMipmappedArrayGetSparseProperties + __cuMipmappedArrayGetSparseProperties = dlfcn.dlsym(handle, 'cuMipmappedArrayGetSparseProperties') + global __cuArrayGetMemoryRequirements + __cuArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuArrayGetMemoryRequirements') + global __cuMipmappedArrayGetMemoryRequirements + __cuMipmappedArrayGetMemoryRequirements = dlfcn.dlsym(handle, 'cuMipmappedArrayGetMemoryRequirements') + global __cuArrayGetPlane + __cuArrayGetPlane = dlfcn.dlsym(handle, 'cuArrayGetPlane') + global __cuArrayDestroy + __cuArrayDestroy = dlfcn.dlsym(handle, 'cuArrayDestroy') + global __cuArray3DCreate_v2 + __cuArray3DCreate_v2 = dlfcn.dlsym(handle, 'cuArray3DCreate_v2') + global __cuArray3DGetDescriptor_v2 + __cuArray3DGetDescriptor_v2 = dlfcn.dlsym(handle, 'cuArray3DGetDescriptor_v2') + global __cuMipmappedArrayCreate + __cuMipmappedArrayCreate = dlfcn.dlsym(handle, 'cuMipmappedArrayCreate') + global __cuMipmappedArrayGetLevel + __cuMipmappedArrayGetLevel = dlfcn.dlsym(handle, 'cuMipmappedArrayGetLevel') + global __cuMipmappedArrayDestroy + __cuMipmappedArrayDestroy = dlfcn.dlsym(handle, 'cuMipmappedArrayDestroy') + global __cuMemGetHandleForAddressRange + __cuMemGetHandleForAddressRange = dlfcn.dlsym(handle, 'cuMemGetHandleForAddressRange') + global __cuMemAddressReserve + __cuMemAddressReserve = dlfcn.dlsym(handle, 'cuMemAddressReserve') + global __cuMemAddressFree + __cuMemAddressFree = dlfcn.dlsym(handle, 'cuMemAddressFree') + global __cuMemCreate + __cuMemCreate = dlfcn.dlsym(handle, 'cuMemCreate') + global __cuMemRelease + __cuMemRelease = dlfcn.dlsym(handle, 'cuMemRelease') + global __cuMemMap + __cuMemMap = dlfcn.dlsym(handle, 'cuMemMap') + global __cuMemUnmap + __cuMemUnmap = dlfcn.dlsym(handle, 'cuMemUnmap') + global __cuMemSetAccess + __cuMemSetAccess = dlfcn.dlsym(handle, 'cuMemSetAccess') + global __cuMemGetAccess + __cuMemGetAccess = dlfcn.dlsym(handle, 'cuMemGetAccess') + global __cuMemExportToShareableHandle + __cuMemExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemExportToShareableHandle') + global __cuMemImportFromShareableHandle + __cuMemImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemImportFromShareableHandle') + global __cuMemGetAllocationGranularity + __cuMemGetAllocationGranularity = dlfcn.dlsym(handle, 'cuMemGetAllocationGranularity') + global __cuMemGetAllocationPropertiesFromHandle + __cuMemGetAllocationPropertiesFromHandle = dlfcn.dlsym(handle, 'cuMemGetAllocationPropertiesFromHandle') + global __cuMemRetainAllocationHandle + __cuMemRetainAllocationHandle = dlfcn.dlsym(handle, 'cuMemRetainAllocationHandle') + global __cuMemPoolTrimTo + __cuMemPoolTrimTo = dlfcn.dlsym(handle, 'cuMemPoolTrimTo') + global __cuMemPoolSetAttribute + __cuMemPoolSetAttribute = dlfcn.dlsym(handle, 'cuMemPoolSetAttribute') + global __cuMemPoolGetAttribute + __cuMemPoolGetAttribute = dlfcn.dlsym(handle, 'cuMemPoolGetAttribute') + global __cuMemPoolSetAccess + __cuMemPoolSetAccess = dlfcn.dlsym(handle, 'cuMemPoolSetAccess') + global __cuMemPoolGetAccess + __cuMemPoolGetAccess = dlfcn.dlsym(handle, 'cuMemPoolGetAccess') + global __cuMemPoolCreate + __cuMemPoolCreate = dlfcn.dlsym(handle, 'cuMemPoolCreate') + global __cuMemPoolDestroy + __cuMemPoolDestroy = dlfcn.dlsym(handle, 'cuMemPoolDestroy') + global __cuMemPoolExportToShareableHandle + __cuMemPoolExportToShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolExportToShareableHandle') + global __cuMemPoolImportFromShareableHandle + __cuMemPoolImportFromShareableHandle = dlfcn.dlsym(handle, 'cuMemPoolImportFromShareableHandle') + global __cuMemPoolExportPointer + __cuMemPoolExportPointer = dlfcn.dlsym(handle, 'cuMemPoolExportPointer') + global __cuMemPoolImportPointer + __cuMemPoolImportPointer = dlfcn.dlsym(handle, 'cuMemPoolImportPointer') + global __cuMulticastCreate + __cuMulticastCreate = dlfcn.dlsym(handle, 'cuMulticastCreate') + global __cuMulticastAddDevice + __cuMulticastAddDevice = dlfcn.dlsym(handle, 'cuMulticastAddDevice') + global __cuMulticastBindMem + __cuMulticastBindMem = dlfcn.dlsym(handle, 'cuMulticastBindMem') + global __cuMulticastBindAddr + __cuMulticastBindAddr = dlfcn.dlsym(handle, 'cuMulticastBindAddr') + global __cuMulticastUnbind + __cuMulticastUnbind = dlfcn.dlsym(handle, 'cuMulticastUnbind') + global __cuMulticastGetGranularity + __cuMulticastGetGranularity = dlfcn.dlsym(handle, 'cuMulticastGetGranularity') + global __cuPointerGetAttribute + __cuPointerGetAttribute = dlfcn.dlsym(handle, 'cuPointerGetAttribute') + global __cuMemAdvise + __cuMemAdvise = dlfcn.dlsym(handle, 'cuMemAdvise') + global __cuMemAdvise_v2 + __cuMemAdvise_v2 = dlfcn.dlsym(handle, 'cuMemAdvise_v2') + global __cuMemRangeGetAttribute + __cuMemRangeGetAttribute = dlfcn.dlsym(handle, 'cuMemRangeGetAttribute') + global __cuMemRangeGetAttributes + __cuMemRangeGetAttributes = dlfcn.dlsym(handle, 'cuMemRangeGetAttributes') + global __cuPointerSetAttribute + __cuPointerSetAttribute = dlfcn.dlsym(handle, 'cuPointerSetAttribute') + global __cuPointerGetAttributes + __cuPointerGetAttributes = dlfcn.dlsym(handle, 'cuPointerGetAttributes') + global __cuStreamCreate + __cuStreamCreate = dlfcn.dlsym(handle, 'cuStreamCreate') + global __cuStreamCreateWithPriority + __cuStreamCreateWithPriority = dlfcn.dlsym(handle, 'cuStreamCreateWithPriority') + global __cuThreadExchangeStreamCaptureMode + __cuThreadExchangeStreamCaptureMode = dlfcn.dlsym(handle, 'cuThreadExchangeStreamCaptureMode') + global __cuStreamDestroy_v2 + __cuStreamDestroy_v2 = dlfcn.dlsym(handle, 'cuStreamDestroy_v2') + global __cuEventCreate + __cuEventCreate = dlfcn.dlsym(handle, 'cuEventCreate') + global __cuEventQuery + __cuEventQuery = dlfcn.dlsym(handle, 'cuEventQuery') + global __cuEventSynchronize + __cuEventSynchronize = dlfcn.dlsym(handle, 'cuEventSynchronize') + global __cuEventDestroy_v2 + __cuEventDestroy_v2 = dlfcn.dlsym(handle, 'cuEventDestroy_v2') + global __cuEventElapsedTime + __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') + global __cuEventElapsedTime_v2 + __cuEventElapsedTime_v2 = dlfcn.dlsym(handle, 'cuEventElapsedTime_v2') + global __cuImportExternalMemory + __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') + global __cuExternalMemoryGetMappedBuffer + __cuExternalMemoryGetMappedBuffer = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedBuffer') + global __cuExternalMemoryGetMappedMipmappedArray + __cuExternalMemoryGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuExternalMemoryGetMappedMipmappedArray') + global __cuDestroyExternalMemory + __cuDestroyExternalMemory = dlfcn.dlsym(handle, 'cuDestroyExternalMemory') + global __cuImportExternalSemaphore + __cuImportExternalSemaphore = dlfcn.dlsym(handle, 'cuImportExternalSemaphore') + global __cuDestroyExternalSemaphore + __cuDestroyExternalSemaphore = dlfcn.dlsym(handle, 'cuDestroyExternalSemaphore') + global __cuFuncGetAttribute + __cuFuncGetAttribute = dlfcn.dlsym(handle, 'cuFuncGetAttribute') + global __cuFuncSetAttribute + __cuFuncSetAttribute = dlfcn.dlsym(handle, 'cuFuncSetAttribute') + global __cuFuncSetCacheConfig + __cuFuncSetCacheConfig = dlfcn.dlsym(handle, 'cuFuncSetCacheConfig') + global __cuFuncGetModule + __cuFuncGetModule = dlfcn.dlsym(handle, 'cuFuncGetModule') + global __cuFuncGetName + __cuFuncGetName = dlfcn.dlsym(handle, 'cuFuncGetName') + global __cuFuncGetParamInfo + __cuFuncGetParamInfo = dlfcn.dlsym(handle, 'cuFuncGetParamInfo') + global __cuFuncIsLoaded + __cuFuncIsLoaded = dlfcn.dlsym(handle, 'cuFuncIsLoaded') + global __cuFuncLoad + __cuFuncLoad = dlfcn.dlsym(handle, 'cuFuncLoad') + global __cuLaunchCooperativeKernelMultiDevice + __cuLaunchCooperativeKernelMultiDevice = dlfcn.dlsym(handle, 'cuLaunchCooperativeKernelMultiDevice') + global __cuFuncSetBlockShape + __cuFuncSetBlockShape = dlfcn.dlsym(handle, 'cuFuncSetBlockShape') + global __cuFuncSetSharedSize + __cuFuncSetSharedSize = dlfcn.dlsym(handle, 'cuFuncSetSharedSize') + global __cuParamSetSize + __cuParamSetSize = dlfcn.dlsym(handle, 'cuParamSetSize') + global __cuParamSeti + __cuParamSeti = dlfcn.dlsym(handle, 'cuParamSeti') + global __cuParamSetf + __cuParamSetf = dlfcn.dlsym(handle, 'cuParamSetf') + global __cuParamSetv + __cuParamSetv = dlfcn.dlsym(handle, 'cuParamSetv') + global __cuLaunch + __cuLaunch = dlfcn.dlsym(handle, 'cuLaunch') + global __cuLaunchGrid + __cuLaunchGrid = dlfcn.dlsym(handle, 'cuLaunchGrid') + global __cuLaunchGridAsync + __cuLaunchGridAsync = dlfcn.dlsym(handle, 'cuLaunchGridAsync') + global __cuParamSetTexRef + __cuParamSetTexRef = dlfcn.dlsym(handle, 'cuParamSetTexRef') + global __cuFuncSetSharedMemConfig + __cuFuncSetSharedMemConfig = dlfcn.dlsym(handle, 'cuFuncSetSharedMemConfig') + global __cuGraphCreate + __cuGraphCreate = dlfcn.dlsym(handle, 'cuGraphCreate') + global __cuGraphAddKernelNode_v2 + __cuGraphAddKernelNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddKernelNode_v2') + global __cuGraphKernelNodeGetParams_v2 + __cuGraphKernelNodeGetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetParams_v2') + global __cuGraphKernelNodeSetParams_v2 + __cuGraphKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetParams_v2') + global __cuGraphAddMemcpyNode + __cuGraphAddMemcpyNode = dlfcn.dlsym(handle, 'cuGraphAddMemcpyNode') + global __cuGraphMemcpyNodeGetParams + __cuGraphMemcpyNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeGetParams') + global __cuGraphMemcpyNodeSetParams + __cuGraphMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemcpyNodeSetParams') + global __cuGraphAddMemsetNode + __cuGraphAddMemsetNode = dlfcn.dlsym(handle, 'cuGraphAddMemsetNode') + global __cuGraphMemsetNodeGetParams + __cuGraphMemsetNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeGetParams') + global __cuGraphMemsetNodeSetParams + __cuGraphMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphMemsetNodeSetParams') + global __cuGraphAddHostNode + __cuGraphAddHostNode = dlfcn.dlsym(handle, 'cuGraphAddHostNode') + global __cuGraphHostNodeGetParams + __cuGraphHostNodeGetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeGetParams') + global __cuGraphHostNodeSetParams + __cuGraphHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphHostNodeSetParams') + global __cuGraphAddChildGraphNode + __cuGraphAddChildGraphNode = dlfcn.dlsym(handle, 'cuGraphAddChildGraphNode') + global __cuGraphChildGraphNodeGetGraph + __cuGraphChildGraphNodeGetGraph = dlfcn.dlsym(handle, 'cuGraphChildGraphNodeGetGraph') + global __cuGraphAddEmptyNode + __cuGraphAddEmptyNode = dlfcn.dlsym(handle, 'cuGraphAddEmptyNode') + global __cuGraphAddEventRecordNode + __cuGraphAddEventRecordNode = dlfcn.dlsym(handle, 'cuGraphAddEventRecordNode') + global __cuGraphEventRecordNodeGetEvent + __cuGraphEventRecordNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeGetEvent') + global __cuGraphEventRecordNodeSetEvent + __cuGraphEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventRecordNodeSetEvent') + global __cuGraphAddEventWaitNode + __cuGraphAddEventWaitNode = dlfcn.dlsym(handle, 'cuGraphAddEventWaitNode') + global __cuGraphEventWaitNodeGetEvent + __cuGraphEventWaitNodeGetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeGetEvent') + global __cuGraphEventWaitNodeSetEvent + __cuGraphEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphEventWaitNodeSetEvent') + global __cuGraphAddExternalSemaphoresSignalNode + __cuGraphAddExternalSemaphoresSignalNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresSignalNode') + global __cuGraphExternalSemaphoresSignalNodeGetParams + __cuGraphExternalSemaphoresSignalNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeGetParams') + global __cuGraphExternalSemaphoresSignalNodeSetParams + __cuGraphExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresSignalNodeSetParams') + global __cuGraphAddExternalSemaphoresWaitNode + __cuGraphAddExternalSemaphoresWaitNode = dlfcn.dlsym(handle, 'cuGraphAddExternalSemaphoresWaitNode') + global __cuGraphExternalSemaphoresWaitNodeGetParams + __cuGraphExternalSemaphoresWaitNodeGetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeGetParams') + global __cuGraphExternalSemaphoresWaitNodeSetParams + __cuGraphExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExternalSemaphoresWaitNodeSetParams') + global __cuGraphAddBatchMemOpNode + __cuGraphAddBatchMemOpNode = dlfcn.dlsym(handle, 'cuGraphAddBatchMemOpNode') + global __cuGraphBatchMemOpNodeGetParams + __cuGraphBatchMemOpNodeGetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeGetParams') + global __cuGraphBatchMemOpNodeSetParams + __cuGraphBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphBatchMemOpNodeSetParams') + global __cuGraphExecBatchMemOpNodeSetParams + __cuGraphExecBatchMemOpNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecBatchMemOpNodeSetParams') + global __cuGraphAddMemAllocNode + __cuGraphAddMemAllocNode = dlfcn.dlsym(handle, 'cuGraphAddMemAllocNode') + global __cuGraphMemAllocNodeGetParams + __cuGraphMemAllocNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemAllocNodeGetParams') + global __cuGraphAddMemFreeNode + __cuGraphAddMemFreeNode = dlfcn.dlsym(handle, 'cuGraphAddMemFreeNode') + global __cuGraphMemFreeNodeGetParams + __cuGraphMemFreeNodeGetParams = dlfcn.dlsym(handle, 'cuGraphMemFreeNodeGetParams') + global __cuDeviceGraphMemTrim + __cuDeviceGraphMemTrim = dlfcn.dlsym(handle, 'cuDeviceGraphMemTrim') + global __cuDeviceGetGraphMemAttribute + __cuDeviceGetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceGetGraphMemAttribute') + global __cuDeviceSetGraphMemAttribute + __cuDeviceSetGraphMemAttribute = dlfcn.dlsym(handle, 'cuDeviceSetGraphMemAttribute') + global __cuGraphClone + __cuGraphClone = dlfcn.dlsym(handle, 'cuGraphClone') + global __cuGraphNodeFindInClone + __cuGraphNodeFindInClone = dlfcn.dlsym(handle, 'cuGraphNodeFindInClone') + global __cuGraphNodeGetType + __cuGraphNodeGetType = dlfcn.dlsym(handle, 'cuGraphNodeGetType') + global __cuGraphGetNodes + __cuGraphGetNodes = dlfcn.dlsym(handle, 'cuGraphGetNodes') + global __cuGraphGetRootNodes + __cuGraphGetRootNodes = dlfcn.dlsym(handle, 'cuGraphGetRootNodes') + global __cuGraphGetEdges + __cuGraphGetEdges = dlfcn.dlsym(handle, 'cuGraphGetEdges') + global __cuGraphGetEdges_v2 + __cuGraphGetEdges_v2 = dlfcn.dlsym(handle, 'cuGraphGetEdges_v2') + global __cuGraphNodeGetDependencies + __cuGraphNodeGetDependencies = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies') + global __cuGraphNodeGetDependencies_v2 + __cuGraphNodeGetDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependencies_v2') + global __cuGraphNodeGetDependentNodes + __cuGraphNodeGetDependentNodes = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes') + global __cuGraphNodeGetDependentNodes_v2 + __cuGraphNodeGetDependentNodes_v2 = dlfcn.dlsym(handle, 'cuGraphNodeGetDependentNodes_v2') + global __cuGraphAddDependencies + __cuGraphAddDependencies = dlfcn.dlsym(handle, 'cuGraphAddDependencies') + global __cuGraphAddDependencies_v2 + __cuGraphAddDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphAddDependencies_v2') + global __cuGraphRemoveDependencies + __cuGraphRemoveDependencies = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies') + global __cuGraphRemoveDependencies_v2 + __cuGraphRemoveDependencies_v2 = dlfcn.dlsym(handle, 'cuGraphRemoveDependencies_v2') + global __cuGraphDestroyNode + __cuGraphDestroyNode = dlfcn.dlsym(handle, 'cuGraphDestroyNode') + global __cuGraphInstantiateWithFlags + __cuGraphInstantiateWithFlags = dlfcn.dlsym(handle, 'cuGraphInstantiateWithFlags') + global __cuGraphExecGetFlags + __cuGraphExecGetFlags = dlfcn.dlsym(handle, 'cuGraphExecGetFlags') + global __cuGraphExecKernelNodeSetParams_v2 + __cuGraphExecKernelNodeSetParams_v2 = dlfcn.dlsym(handle, 'cuGraphExecKernelNodeSetParams_v2') + global __cuGraphExecMemcpyNodeSetParams + __cuGraphExecMemcpyNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemcpyNodeSetParams') + global __cuGraphExecMemsetNodeSetParams + __cuGraphExecMemsetNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecMemsetNodeSetParams') + global __cuGraphExecHostNodeSetParams + __cuGraphExecHostNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecHostNodeSetParams') + global __cuGraphExecChildGraphNodeSetParams + __cuGraphExecChildGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecChildGraphNodeSetParams') + global __cuGraphExecEventRecordNodeSetEvent + __cuGraphExecEventRecordNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventRecordNodeSetEvent') + global __cuGraphExecEventWaitNodeSetEvent + __cuGraphExecEventWaitNodeSetEvent = dlfcn.dlsym(handle, 'cuGraphExecEventWaitNodeSetEvent') + global __cuGraphExecExternalSemaphoresSignalNodeSetParams + __cuGraphExecExternalSemaphoresSignalNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresSignalNodeSetParams') + global __cuGraphExecExternalSemaphoresWaitNodeSetParams + __cuGraphExecExternalSemaphoresWaitNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecExternalSemaphoresWaitNodeSetParams') + global __cuGraphNodeSetEnabled + __cuGraphNodeSetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeSetEnabled') + global __cuGraphNodeGetEnabled + __cuGraphNodeGetEnabled = dlfcn.dlsym(handle, 'cuGraphNodeGetEnabled') + global __cuGraphExecDestroy + __cuGraphExecDestroy = dlfcn.dlsym(handle, 'cuGraphExecDestroy') + global __cuGraphDestroy + __cuGraphDestroy = dlfcn.dlsym(handle, 'cuGraphDestroy') + global __cuGraphExecUpdate_v2 + __cuGraphExecUpdate_v2 = dlfcn.dlsym(handle, 'cuGraphExecUpdate_v2') + global __cuGraphKernelNodeCopyAttributes + __cuGraphKernelNodeCopyAttributes = dlfcn.dlsym(handle, 'cuGraphKernelNodeCopyAttributes') + global __cuGraphKernelNodeGetAttribute + __cuGraphKernelNodeGetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeGetAttribute') + global __cuGraphKernelNodeSetAttribute + __cuGraphKernelNodeSetAttribute = dlfcn.dlsym(handle, 'cuGraphKernelNodeSetAttribute') + global __cuGraphDebugDotPrint + __cuGraphDebugDotPrint = dlfcn.dlsym(handle, 'cuGraphDebugDotPrint') + global __cuUserObjectCreate + __cuUserObjectCreate = dlfcn.dlsym(handle, 'cuUserObjectCreate') + global __cuUserObjectRetain + __cuUserObjectRetain = dlfcn.dlsym(handle, 'cuUserObjectRetain') + global __cuUserObjectRelease + __cuUserObjectRelease = dlfcn.dlsym(handle, 'cuUserObjectRelease') + global __cuGraphRetainUserObject + __cuGraphRetainUserObject = dlfcn.dlsym(handle, 'cuGraphRetainUserObject') + global __cuGraphReleaseUserObject + __cuGraphReleaseUserObject = dlfcn.dlsym(handle, 'cuGraphReleaseUserObject') + global __cuGraphAddNode + __cuGraphAddNode = dlfcn.dlsym(handle, 'cuGraphAddNode') + global __cuGraphAddNode_v2 + __cuGraphAddNode_v2 = dlfcn.dlsym(handle, 'cuGraphAddNode_v2') + global __cuGraphNodeSetParams + __cuGraphNodeSetParams = dlfcn.dlsym(handle, 'cuGraphNodeSetParams') + global __cuGraphExecNodeSetParams + __cuGraphExecNodeSetParams = dlfcn.dlsym(handle, 'cuGraphExecNodeSetParams') + global __cuGraphConditionalHandleCreate + __cuGraphConditionalHandleCreate = dlfcn.dlsym(handle, 'cuGraphConditionalHandleCreate') + global __cuOccupancyMaxActiveBlocksPerMultiprocessor + __cuOccupancyMaxActiveBlocksPerMultiprocessor = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessor') + global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags') + global __cuOccupancyMaxPotentialBlockSize + __cuOccupancyMaxPotentialBlockSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSize') + global __cuOccupancyMaxPotentialBlockSizeWithFlags + __cuOccupancyMaxPotentialBlockSizeWithFlags = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialBlockSizeWithFlags') + global __cuOccupancyAvailableDynamicSMemPerBlock + __cuOccupancyAvailableDynamicSMemPerBlock = dlfcn.dlsym(handle, 'cuOccupancyAvailableDynamicSMemPerBlock') + global __cuOccupancyMaxPotentialClusterSize + __cuOccupancyMaxPotentialClusterSize = dlfcn.dlsym(handle, 'cuOccupancyMaxPotentialClusterSize') + global __cuOccupancyMaxActiveClusters + __cuOccupancyMaxActiveClusters = dlfcn.dlsym(handle, 'cuOccupancyMaxActiveClusters') + global __cuTexRefSetArray + __cuTexRefSetArray = dlfcn.dlsym(handle, 'cuTexRefSetArray') + global __cuTexRefSetMipmappedArray + __cuTexRefSetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefSetMipmappedArray') + global __cuTexRefSetAddress_v2 + __cuTexRefSetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefSetAddress_v2') + global __cuTexRefSetAddress2D_v3 + __cuTexRefSetAddress2D_v3 = dlfcn.dlsym(handle, 'cuTexRefSetAddress2D_v3') + global __cuTexRefSetFormat + __cuTexRefSetFormat = dlfcn.dlsym(handle, 'cuTexRefSetFormat') + global __cuTexRefSetAddressMode + __cuTexRefSetAddressMode = dlfcn.dlsym(handle, 'cuTexRefSetAddressMode') + global __cuTexRefSetFilterMode + __cuTexRefSetFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetFilterMode') + global __cuTexRefSetMipmapFilterMode + __cuTexRefSetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefSetMipmapFilterMode') + global __cuTexRefSetMipmapLevelBias + __cuTexRefSetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelBias') + global __cuTexRefSetMipmapLevelClamp + __cuTexRefSetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefSetMipmapLevelClamp') + global __cuTexRefSetMaxAnisotropy + __cuTexRefSetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefSetMaxAnisotropy') + global __cuTexRefSetBorderColor + __cuTexRefSetBorderColor = dlfcn.dlsym(handle, 'cuTexRefSetBorderColor') + global __cuTexRefSetFlags + __cuTexRefSetFlags = dlfcn.dlsym(handle, 'cuTexRefSetFlags') + global __cuTexRefGetAddress_v2 + __cuTexRefGetAddress_v2 = dlfcn.dlsym(handle, 'cuTexRefGetAddress_v2') + global __cuTexRefGetArray + __cuTexRefGetArray = dlfcn.dlsym(handle, 'cuTexRefGetArray') + global __cuTexRefGetMipmappedArray + __cuTexRefGetMipmappedArray = dlfcn.dlsym(handle, 'cuTexRefGetMipmappedArray') + global __cuTexRefGetAddressMode + __cuTexRefGetAddressMode = dlfcn.dlsym(handle, 'cuTexRefGetAddressMode') + global __cuTexRefGetFilterMode + __cuTexRefGetFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetFilterMode') + global __cuTexRefGetFormat + __cuTexRefGetFormat = dlfcn.dlsym(handle, 'cuTexRefGetFormat') + global __cuTexRefGetMipmapFilterMode + __cuTexRefGetMipmapFilterMode = dlfcn.dlsym(handle, 'cuTexRefGetMipmapFilterMode') + global __cuTexRefGetMipmapLevelBias + __cuTexRefGetMipmapLevelBias = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelBias') + global __cuTexRefGetMipmapLevelClamp + __cuTexRefGetMipmapLevelClamp = dlfcn.dlsym(handle, 'cuTexRefGetMipmapLevelClamp') + global __cuTexRefGetMaxAnisotropy + __cuTexRefGetMaxAnisotropy = dlfcn.dlsym(handle, 'cuTexRefGetMaxAnisotropy') + global __cuTexRefGetBorderColor + __cuTexRefGetBorderColor = dlfcn.dlsym(handle, 'cuTexRefGetBorderColor') + global __cuTexRefGetFlags + __cuTexRefGetFlags = dlfcn.dlsym(handle, 'cuTexRefGetFlags') + global __cuTexRefCreate + __cuTexRefCreate = dlfcn.dlsym(handle, 'cuTexRefCreate') + global __cuTexRefDestroy + __cuTexRefDestroy = dlfcn.dlsym(handle, 'cuTexRefDestroy') + global __cuSurfRefSetArray + __cuSurfRefSetArray = dlfcn.dlsym(handle, 'cuSurfRefSetArray') + global __cuSurfRefGetArray + __cuSurfRefGetArray = dlfcn.dlsym(handle, 'cuSurfRefGetArray') + global __cuTexObjectCreate + __cuTexObjectCreate = dlfcn.dlsym(handle, 'cuTexObjectCreate') + global __cuTexObjectDestroy + __cuTexObjectDestroy = dlfcn.dlsym(handle, 'cuTexObjectDestroy') + global __cuTexObjectGetResourceDesc + __cuTexObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceDesc') + global __cuTexObjectGetTextureDesc + __cuTexObjectGetTextureDesc = dlfcn.dlsym(handle, 'cuTexObjectGetTextureDesc') + global __cuTexObjectGetResourceViewDesc + __cuTexObjectGetResourceViewDesc = dlfcn.dlsym(handle, 'cuTexObjectGetResourceViewDesc') + global __cuSurfObjectCreate + __cuSurfObjectCreate = dlfcn.dlsym(handle, 'cuSurfObjectCreate') + global __cuSurfObjectDestroy + __cuSurfObjectDestroy = dlfcn.dlsym(handle, 'cuSurfObjectDestroy') + global __cuSurfObjectGetResourceDesc + __cuSurfObjectGetResourceDesc = dlfcn.dlsym(handle, 'cuSurfObjectGetResourceDesc') + global __cuTensorMapEncodeTiled + __cuTensorMapEncodeTiled = dlfcn.dlsym(handle, 'cuTensorMapEncodeTiled') + global __cuTensorMapEncodeIm2col + __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') + global __cuTensorMapEncodeIm2colWide + __cuTensorMapEncodeIm2colWide = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2colWide') + global __cuTensorMapReplaceAddress + __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') + global __cuDeviceCanAccessPeer + __cuDeviceCanAccessPeer = dlfcn.dlsym(handle, 'cuDeviceCanAccessPeer') + global __cuCtxEnablePeerAccess + __cuCtxEnablePeerAccess = dlfcn.dlsym(handle, 'cuCtxEnablePeerAccess') + global __cuCtxDisablePeerAccess + __cuCtxDisablePeerAccess = dlfcn.dlsym(handle, 'cuCtxDisablePeerAccess') + global __cuDeviceGetP2PAttribute + __cuDeviceGetP2PAttribute = dlfcn.dlsym(handle, 'cuDeviceGetP2PAttribute') + global __cuGraphicsUnregisterResource + __cuGraphicsUnregisterResource = dlfcn.dlsym(handle, 'cuGraphicsUnregisterResource') + global __cuGraphicsSubResourceGetMappedArray + __cuGraphicsSubResourceGetMappedArray = dlfcn.dlsym(handle, 'cuGraphicsSubResourceGetMappedArray') + global __cuGraphicsResourceGetMappedMipmappedArray + __cuGraphicsResourceGetMappedMipmappedArray = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedMipmappedArray') + global __cuGraphicsResourceGetMappedPointer_v2 + __cuGraphicsResourceGetMappedPointer_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedPointer_v2') + global __cuGraphicsResourceSetMapFlags_v2 + __cuGraphicsResourceSetMapFlags_v2 = dlfcn.dlsym(handle, 'cuGraphicsResourceSetMapFlags_v2') + global __cuGetProcAddress_v2 + __cuGetProcAddress_v2 = dlfcn.dlsym(handle, 'cuGetProcAddress_v2') + global __cuCoredumpGetAttribute + __cuCoredumpGetAttribute = dlfcn.dlsym(handle, 'cuCoredumpGetAttribute') + global __cuCoredumpGetAttributeGlobal + __cuCoredumpGetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpGetAttributeGlobal') + global __cuCoredumpSetAttribute + __cuCoredumpSetAttribute = dlfcn.dlsym(handle, 'cuCoredumpSetAttribute') + global __cuCoredumpSetAttributeGlobal + __cuCoredumpSetAttributeGlobal = dlfcn.dlsym(handle, 'cuCoredumpSetAttributeGlobal') + global __cuGetExportTable + __cuGetExportTable = dlfcn.dlsym(handle, 'cuGetExportTable') + global __cuGreenCtxCreate + __cuGreenCtxCreate = dlfcn.dlsym(handle, 'cuGreenCtxCreate') + global __cuGreenCtxDestroy + __cuGreenCtxDestroy = dlfcn.dlsym(handle, 'cuGreenCtxDestroy') + global __cuCtxFromGreenCtx + __cuCtxFromGreenCtx = dlfcn.dlsym(handle, 'cuCtxFromGreenCtx') + global __cuDeviceGetDevResource + __cuDeviceGetDevResource = dlfcn.dlsym(handle, 'cuDeviceGetDevResource') + global __cuCtxGetDevResource + __cuCtxGetDevResource = dlfcn.dlsym(handle, 'cuCtxGetDevResource') + global __cuGreenCtxGetDevResource + __cuGreenCtxGetDevResource = dlfcn.dlsym(handle, 'cuGreenCtxGetDevResource') + global __cuDevSmResourceSplitByCount + __cuDevSmResourceSplitByCount = dlfcn.dlsym(handle, 'cuDevSmResourceSplitByCount') + global __cuDevResourceGenerateDesc + __cuDevResourceGenerateDesc = dlfcn.dlsym(handle, 'cuDevResourceGenerateDesc') + global __cuGreenCtxRecordEvent + __cuGreenCtxRecordEvent = dlfcn.dlsym(handle, 'cuGreenCtxRecordEvent') + global __cuGreenCtxWaitEvent + __cuGreenCtxWaitEvent = dlfcn.dlsym(handle, 'cuGreenCtxWaitEvent') + global __cuStreamGetGreenCtx + __cuStreamGetGreenCtx = dlfcn.dlsym(handle, 'cuStreamGetGreenCtx') + global __cuGreenCtxStreamCreate + __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') + global __cuLogsRegisterCallback + __cuLogsRegisterCallback = dlfcn.dlsym(handle, 'cuLogsRegisterCallback') + global __cuLogsUnregisterCallback + __cuLogsUnregisterCallback = dlfcn.dlsym(handle, 'cuLogsUnregisterCallback') + global __cuLogsCurrent + __cuLogsCurrent = dlfcn.dlsym(handle, 'cuLogsCurrent') + global __cuLogsDumpToFile + __cuLogsDumpToFile = dlfcn.dlsym(handle, 'cuLogsDumpToFile') + global __cuLogsDumpToMemory + __cuLogsDumpToMemory = dlfcn.dlsym(handle, 'cuLogsDumpToMemory') + global __cuCheckpointProcessGetRestoreThreadId + __cuCheckpointProcessGetRestoreThreadId = dlfcn.dlsym(handle, 'cuCheckpointProcessGetRestoreThreadId') + global __cuCheckpointProcessGetState + __cuCheckpointProcessGetState = dlfcn.dlsym(handle, 'cuCheckpointProcessGetState') + global __cuCheckpointProcessLock + __cuCheckpointProcessLock = dlfcn.dlsym(handle, 'cuCheckpointProcessLock') + global __cuCheckpointProcessCheckpoint + __cuCheckpointProcessCheckpoint = dlfcn.dlsym(handle, 'cuCheckpointProcessCheckpoint') + global __cuCheckpointProcessRestore + __cuCheckpointProcessRestore = dlfcn.dlsym(handle, 'cuCheckpointProcessRestore') + global __cuCheckpointProcessUnlock + __cuCheckpointProcessUnlock = dlfcn.dlsym(handle, 'cuCheckpointProcessUnlock') + global __cuProfilerStart + __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') + global __cuProfilerStop + __cuProfilerStop = dlfcn.dlsym(handle, 'cuProfilerStop') + global __cuGraphicsEGLRegisterImage + __cuGraphicsEGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsEGLRegisterImage') + global __cuEGLStreamConsumerConnect + __cuEGLStreamConsumerConnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnect') + global __cuEGLStreamConsumerConnectWithFlags + __cuEGLStreamConsumerConnectWithFlags = dlfcn.dlsym(handle, 'cuEGLStreamConsumerConnectWithFlags') + global __cuEGLStreamConsumerDisconnect + __cuEGLStreamConsumerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamConsumerDisconnect') + global __cuEGLStreamConsumerAcquireFrame + __cuEGLStreamConsumerAcquireFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerAcquireFrame') + global __cuEGLStreamConsumerReleaseFrame + __cuEGLStreamConsumerReleaseFrame = dlfcn.dlsym(handle, 'cuEGLStreamConsumerReleaseFrame') + global __cuEGLStreamProducerConnect + __cuEGLStreamProducerConnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerConnect') + global __cuEGLStreamProducerDisconnect + __cuEGLStreamProducerDisconnect = dlfcn.dlsym(handle, 'cuEGLStreamProducerDisconnect') + global __cuEGLStreamProducerPresentFrame + __cuEGLStreamProducerPresentFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerPresentFrame') + global __cuEGLStreamProducerReturnFrame + __cuEGLStreamProducerReturnFrame = dlfcn.dlsym(handle, 'cuEGLStreamProducerReturnFrame') + global __cuGraphicsResourceGetMappedEglFrame + __cuGraphicsResourceGetMappedEglFrame = dlfcn.dlsym(handle, 'cuGraphicsResourceGetMappedEglFrame') + global __cuEventCreateFromEGLSync + __cuEventCreateFromEGLSync = dlfcn.dlsym(handle, 'cuEventCreateFromEGLSync') + global __cuGraphicsGLRegisterBuffer + __cuGraphicsGLRegisterBuffer = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterBuffer') + global __cuGraphicsGLRegisterImage + __cuGraphicsGLRegisterImage = dlfcn.dlsym(handle, 'cuGraphicsGLRegisterImage') + global __cuGLGetDevices_v2 + __cuGLGetDevices_v2 = dlfcn.dlsym(handle, 'cuGLGetDevices_v2') + global __cuVDPAUGetDevice + __cuVDPAUGetDevice = dlfcn.dlsym(handle, 'cuVDPAUGetDevice') + global __cuVDPAUCtxCreate_v2 + __cuVDPAUCtxCreate_v2 = dlfcn.dlsym(handle, 'cuVDPAUCtxCreate_v2') + global __cuGraphicsVDPAURegisterVideoSurface + __cuGraphicsVDPAURegisterVideoSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterVideoSurface') + global __cuGraphicsVDPAURegisterOutputSurface + __cuGraphicsVDPAURegisterOutputSurface = dlfcn.dlsym(handle, 'cuGraphicsVDPAURegisterOutputSurface') + __cuPythonInit = True + return 0 + +# Create a very small function to check whether we are init'ed, so the C +# compiler can inline it. +cdef inline int cuPythonInit() except -1 nogil: + if __cuPythonInit: + return 0 + return _cuPythonInit() + +cdef CUresult _cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGetErrorString + cuPythonInit() + if __cuGetErrorString == NULL: + with gil: + raise RuntimeError('Function "cuGetErrorString" not found') + err = ( __cuGetErrorString)(error, pStr) + return err + +cdef CUresult _cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGetErrorName + cuPythonInit() + if __cuGetErrorName == NULL: + with gil: + raise RuntimeError('Function "cuGetErrorName" not found') + err = ( __cuGetErrorName)(error, pStr) + return err + +cdef CUresult _cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuInit + cuPythonInit() + if __cuInit == NULL: + with gil: + raise RuntimeError('Function "cuInit" not found') + err = ( __cuInit)(Flags) + return err + +cdef CUresult _cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDriverGetVersion + cuPythonInit() + if __cuDriverGetVersion == NULL: + with gil: + raise RuntimeError('Function "cuDriverGetVersion" not found') + err = ( __cuDriverGetVersion)(driverVersion) + return err + +cdef CUresult _cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGet + cuPythonInit() + if __cuDeviceGet == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGet" not found') + err = ( __cuDeviceGet)(device, ordinal) + return err + +cdef CUresult _cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetCount + cuPythonInit() + if __cuDeviceGetCount == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetCount" not found') + err = ( __cuDeviceGetCount)(count) + return err + +cdef CUresult _cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetName + cuPythonInit() + if __cuDeviceGetName == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetName" not found') + err = ( __cuDeviceGetName)(name, length, dev) + return err + +cdef CUresult _cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetUuid + cuPythonInit() + if __cuDeviceGetUuid == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetUuid" not found') + err = ( __cuDeviceGetUuid)(uuid, dev) + return err + +cdef CUresult _cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetUuid_v2 + cuPythonInit() + if __cuDeviceGetUuid_v2 == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetUuid_v2" not found') + err = ( __cuDeviceGetUuid_v2)(uuid, dev) + return err + +cdef CUresult _cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetLuid + cuPythonInit() + if __cuDeviceGetLuid == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetLuid" not found') + err = ( __cuDeviceGetLuid)(luid, deviceNodeMask, dev) + return err + +cdef CUresult _cuDeviceTotalMem_v2(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceTotalMem_v2 + cuPythonInit() + if __cuDeviceTotalMem_v2 == NULL: + with gil: + raise RuntimeError('Function "cuDeviceTotalMem_v2" not found') + err = ( __cuDeviceTotalMem_v2)(numbytes, dev) + return err + +cdef CUresult _cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetTexture1DLinearMaxWidth + cuPythonInit() + if __cuDeviceGetTexture1DLinearMaxWidth == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetTexture1DLinearMaxWidth" not found') + err = ( __cuDeviceGetTexture1DLinearMaxWidth)(maxWidthInElements, pformat, numChannels, dev) + return err + +cdef CUresult _cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetAttribute + cuPythonInit() + if __cuDeviceGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetAttribute" not found') + err = ( __cuDeviceGetAttribute)(pi, attrib, dev) + return err + +cdef CUresult _cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetNvSciSyncAttributes + cuPythonInit() + if __cuDeviceGetNvSciSyncAttributes == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetNvSciSyncAttributes" not found') + err = ( __cuDeviceGetNvSciSyncAttributes)(nvSciSyncAttrList, dev, flags) + return err + +cdef CUresult _cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceSetMemPool + cuPythonInit() + if __cuDeviceSetMemPool == NULL: + with gil: + raise RuntimeError('Function "cuDeviceSetMemPool" not found') + err = ( __cuDeviceSetMemPool)(dev, pool) + return err + +cdef CUresult _cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetMemPool + cuPythonInit() + if __cuDeviceGetMemPool == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetMemPool" not found') + err = ( __cuDeviceGetMemPool)(pool, dev) + return err + +cdef CUresult _cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetDefaultMemPool + cuPythonInit() + if __cuDeviceGetDefaultMemPool == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetDefaultMemPool" not found') + err = ( __cuDeviceGetDefaultMemPool)(pool_out, dev) + return err + +cdef CUresult _cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetExecAffinitySupport + cuPythonInit() + if __cuDeviceGetExecAffinitySupport == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetExecAffinitySupport" not found') + err = ( __cuDeviceGetExecAffinitySupport)(pi, typename, dev) + return err + +cdef CUresult _cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFlushGPUDirectRDMAWrites + cuPythonInit() + if __cuFlushGPUDirectRDMAWrites == NULL: + with gil: + raise RuntimeError('Function "cuFlushGPUDirectRDMAWrites" not found') + err = ( __cuFlushGPUDirectRDMAWrites)(target, scope) + return err + +cdef CUresult _cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetProperties + cuPythonInit() + if __cuDeviceGetProperties == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetProperties" not found') + err = ( __cuDeviceGetProperties)(prop, dev) + return err + +cdef CUresult _cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceComputeCapability + cuPythonInit() + if __cuDeviceComputeCapability == NULL: + with gil: + raise RuntimeError('Function "cuDeviceComputeCapability" not found') + err = ( __cuDeviceComputeCapability)(major, minor, dev) + return err + +cdef CUresult _cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevicePrimaryCtxRetain + cuPythonInit() + if __cuDevicePrimaryCtxRetain == NULL: + with gil: + raise RuntimeError('Function "cuDevicePrimaryCtxRetain" not found') + err = ( __cuDevicePrimaryCtxRetain)(pctx, dev) + return err + +cdef CUresult _cuDevicePrimaryCtxRelease_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevicePrimaryCtxRelease_v2 + cuPythonInit() + if __cuDevicePrimaryCtxRelease_v2 == NULL: + with gil: + raise RuntimeError('Function "cuDevicePrimaryCtxRelease_v2" not found') + err = ( __cuDevicePrimaryCtxRelease_v2)(dev) + return err + +cdef CUresult _cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevicePrimaryCtxSetFlags_v2 + cuPythonInit() + if __cuDevicePrimaryCtxSetFlags_v2 == NULL: + with gil: + raise RuntimeError('Function "cuDevicePrimaryCtxSetFlags_v2" not found') + err = ( __cuDevicePrimaryCtxSetFlags_v2)(dev, flags) + return err + +cdef CUresult _cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevicePrimaryCtxGetState + cuPythonInit() + if __cuDevicePrimaryCtxGetState == NULL: + with gil: + raise RuntimeError('Function "cuDevicePrimaryCtxGetState" not found') + err = ( __cuDevicePrimaryCtxGetState)(dev, flags, active) + return err + +cdef CUresult _cuDevicePrimaryCtxReset_v2(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevicePrimaryCtxReset_v2 + cuPythonInit() + if __cuDevicePrimaryCtxReset_v2 == NULL: + with gil: + raise RuntimeError('Function "cuDevicePrimaryCtxReset_v2" not found') + err = ( __cuDevicePrimaryCtxReset_v2)(dev) + return err + +cdef CUresult _cuCtxCreate_v2(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v2 + cuPythonInit() + if __cuCtxCreate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuCtxCreate_v2" not found') + err = ( __cuCtxCreate_v2)(pctx, flags, dev) + return err + +cdef CUresult _cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v3 + cuPythonInit() + if __cuCtxCreate_v3 == NULL: + with gil: + raise RuntimeError('Function "cuCtxCreate_v3" not found') + err = ( __cuCtxCreate_v3)(pctx, paramsArray, numParams, flags, dev) + return err + +cdef CUresult _cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxCreate_v4 + cuPythonInit() + if __cuCtxCreate_v4 == NULL: + with gil: + raise RuntimeError('Function "cuCtxCreate_v4" not found') + err = ( __cuCtxCreate_v4)(pctx, ctxCreateParams, flags, dev) + return err + +cdef CUresult _cuCtxDestroy_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxDestroy_v2 + cuPythonInit() + if __cuCtxDestroy_v2 == NULL: + with gil: + raise RuntimeError('Function "cuCtxDestroy_v2" not found') + err = ( __cuCtxDestroy_v2)(ctx) + return err + +cdef CUresult _cuCtxPushCurrent_v2(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxPushCurrent_v2 + cuPythonInit() + if __cuCtxPushCurrent_v2 == NULL: + with gil: + raise RuntimeError('Function "cuCtxPushCurrent_v2" not found') + err = ( __cuCtxPushCurrent_v2)(ctx) + return err + +cdef CUresult _cuCtxPopCurrent_v2(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxPopCurrent_v2 + cuPythonInit() + if __cuCtxPopCurrent_v2 == NULL: + with gil: + raise RuntimeError('Function "cuCtxPopCurrent_v2" not found') + err = ( __cuCtxPopCurrent_v2)(pctx) + return err + +cdef CUresult _cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSetCurrent + cuPythonInit() + if __cuCtxSetCurrent == NULL: + with gil: + raise RuntimeError('Function "cuCtxSetCurrent" not found') + err = ( __cuCtxSetCurrent)(ctx) + return err + +cdef CUresult _cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetCurrent + cuPythonInit() + if __cuCtxGetCurrent == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetCurrent" not found') + err = ( __cuCtxGetCurrent)(pctx) + return err + +cdef CUresult _cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetDevice + cuPythonInit() + if __cuCtxGetDevice == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetDevice" not found') + err = ( __cuCtxGetDevice)(device) + return err + +cdef CUresult _cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetFlags + cuPythonInit() + if __cuCtxGetFlags == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetFlags" not found') + err = ( __cuCtxGetFlags)(flags) + return err + +cdef CUresult _cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSetFlags + cuPythonInit() + if __cuCtxSetFlags == NULL: + with gil: + raise RuntimeError('Function "cuCtxSetFlags" not found') + err = ( __cuCtxSetFlags)(flags) + return err + +cdef CUresult _cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetId + cuPythonInit() + if __cuCtxGetId == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetId" not found') + err = ( __cuCtxGetId)(ctx, ctxId) + return err + +cdef CUresult _cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSynchronize + cuPythonInit() + if __cuCtxSynchronize == NULL: + with gil: + raise RuntimeError('Function "cuCtxSynchronize" not found') + err = ( __cuCtxSynchronize)() + return err + +cdef CUresult _cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSetLimit + cuPythonInit() + if __cuCtxSetLimit == NULL: + with gil: + raise RuntimeError('Function "cuCtxSetLimit" not found') + err = ( __cuCtxSetLimit)(limit, value) + return err + +cdef CUresult _cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetLimit + cuPythonInit() + if __cuCtxGetLimit == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetLimit" not found') + err = ( __cuCtxGetLimit)(pvalue, limit) + return err + +cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetCacheConfig + cuPythonInit() + if __cuCtxGetCacheConfig == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetCacheConfig" not found') + err = ( __cuCtxGetCacheConfig)(pconfig) + return err + +cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSetCacheConfig + cuPythonInit() + if __cuCtxSetCacheConfig == NULL: + with gil: + raise RuntimeError('Function "cuCtxSetCacheConfig" not found') + err = ( __cuCtxSetCacheConfig)(config) + return err + +cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetApiVersion + cuPythonInit() + if __cuCtxGetApiVersion == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetApiVersion" not found') + err = ( __cuCtxGetApiVersion)(ctx, version) + return err + +cdef CUresult _cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetStreamPriorityRange + cuPythonInit() + if __cuCtxGetStreamPriorityRange == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetStreamPriorityRange" not found') + err = ( __cuCtxGetStreamPriorityRange)(leastPriority, greatestPriority) + return err + +cdef CUresult _cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxResetPersistingL2Cache + cuPythonInit() + if __cuCtxResetPersistingL2Cache == NULL: + with gil: + raise RuntimeError('Function "cuCtxResetPersistingL2Cache" not found') + err = ( __cuCtxResetPersistingL2Cache)() + return err + +cdef CUresult _cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetExecAffinity + cuPythonInit() + if __cuCtxGetExecAffinity == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetExecAffinity" not found') + err = ( __cuCtxGetExecAffinity)(pExecAffinity, typename) + return err + +cdef CUresult _cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxRecordEvent + cuPythonInit() + if __cuCtxRecordEvent == NULL: + with gil: + raise RuntimeError('Function "cuCtxRecordEvent" not found') + err = ( __cuCtxRecordEvent)(hCtx, hEvent) + return err + +cdef CUresult _cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxWaitEvent + cuPythonInit() + if __cuCtxWaitEvent == NULL: + with gil: + raise RuntimeError('Function "cuCtxWaitEvent" not found') + err = ( __cuCtxWaitEvent)(hCtx, hEvent) + return err + +cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxAttach + cuPythonInit() + if __cuCtxAttach == NULL: + with gil: + raise RuntimeError('Function "cuCtxAttach" not found') + err = ( __cuCtxAttach)(pctx, flags) + return err + +cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxDetach + cuPythonInit() + if __cuCtxDetach == NULL: + with gil: + raise RuntimeError('Function "cuCtxDetach" not found') + err = ( __cuCtxDetach)(ctx) + return err + +cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetSharedMemConfig + cuPythonInit() + if __cuCtxGetSharedMemConfig == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetSharedMemConfig" not found') + err = ( __cuCtxGetSharedMemConfig)(pConfig) + return err + +cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxSetSharedMemConfig + cuPythonInit() + if __cuCtxSetSharedMemConfig == NULL: + with gil: + raise RuntimeError('Function "cuCtxSetSharedMemConfig" not found') + err = ( __cuCtxSetSharedMemConfig)(config) + return err + +cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleLoad + cuPythonInit() + if __cuModuleLoad == NULL: + with gil: + raise RuntimeError('Function "cuModuleLoad" not found') + err = ( __cuModuleLoad)(module, fname) + return err + +cdef CUresult _cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleLoadData + cuPythonInit() + if __cuModuleLoadData == NULL: + with gil: + raise RuntimeError('Function "cuModuleLoadData" not found') + err = ( __cuModuleLoadData)(module, image) + return err + +cdef CUresult _cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleLoadDataEx + cuPythonInit() + if __cuModuleLoadDataEx == NULL: + with gil: + raise RuntimeError('Function "cuModuleLoadDataEx" not found') + err = ( __cuModuleLoadDataEx)(module, image, numOptions, options, optionValues) + return err + +cdef CUresult _cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleLoadFatBinary + cuPythonInit() + if __cuModuleLoadFatBinary == NULL: + with gil: + raise RuntimeError('Function "cuModuleLoadFatBinary" not found') + err = ( __cuModuleLoadFatBinary)(module, fatCubin) + return err + +cdef CUresult _cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleUnload + cuPythonInit() + if __cuModuleUnload == NULL: + with gil: + raise RuntimeError('Function "cuModuleUnload" not found') + err = ( __cuModuleUnload)(hmod) + return err + +cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetLoadingMode + cuPythonInit() + if __cuModuleGetLoadingMode == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetLoadingMode" not found') + err = ( __cuModuleGetLoadingMode)(mode) + return err + +cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetFunction + cuPythonInit() + if __cuModuleGetFunction == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetFunction" not found') + err = ( __cuModuleGetFunction)(hfunc, hmod, name) + return err + +cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetFunctionCount + cuPythonInit() + if __cuModuleGetFunctionCount == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetFunctionCount" not found') + err = ( __cuModuleGetFunctionCount)(count, mod) + return err + +cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleEnumerateFunctions + cuPythonInit() + if __cuModuleEnumerateFunctions == NULL: + with gil: + raise RuntimeError('Function "cuModuleEnumerateFunctions" not found') + err = ( __cuModuleEnumerateFunctions)(functions, numFunctions, mod) + return err + +cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetGlobal_v2 + cuPythonInit() + if __cuModuleGetGlobal_v2 == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetGlobal_v2" not found') + err = ( __cuModuleGetGlobal_v2)(dptr, numbytes, hmod, name) + return err + +cdef CUresult _cuLinkCreate_v2(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLinkCreate_v2 + cuPythonInit() + if __cuLinkCreate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuLinkCreate_v2" not found') + err = ( __cuLinkCreate_v2)(numOptions, options, optionValues, stateOut) + return err + +cdef CUresult _cuLinkAddData_v2(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLinkAddData_v2 + cuPythonInit() + if __cuLinkAddData_v2 == NULL: + with gil: + raise RuntimeError('Function "cuLinkAddData_v2" not found') + err = ( __cuLinkAddData_v2)(state, typename, data, size, name, numOptions, options, optionValues) + return err + +cdef CUresult _cuLinkAddFile_v2(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLinkAddFile_v2 + cuPythonInit() + if __cuLinkAddFile_v2 == NULL: + with gil: + raise RuntimeError('Function "cuLinkAddFile_v2" not found') + err = ( __cuLinkAddFile_v2)(state, typename, path, numOptions, options, optionValues) + return err + +cdef CUresult _cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLinkComplete + cuPythonInit() + if __cuLinkComplete == NULL: + with gil: + raise RuntimeError('Function "cuLinkComplete" not found') + err = ( __cuLinkComplete)(state, cubinOut, sizeOut) + return err + +cdef CUresult _cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLinkDestroy + cuPythonInit() + if __cuLinkDestroy == NULL: + with gil: + raise RuntimeError('Function "cuLinkDestroy" not found') + err = ( __cuLinkDestroy)(state) + return err + +cdef CUresult _cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetTexRef + cuPythonInit() + if __cuModuleGetTexRef == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetTexRef" not found') + err = ( __cuModuleGetTexRef)(pTexRef, hmod, name) + return err + +cdef CUresult _cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuModuleGetSurfRef + cuPythonInit() + if __cuModuleGetSurfRef == NULL: + with gil: + raise RuntimeError('Function "cuModuleGetSurfRef" not found') + err = ( __cuModuleGetSurfRef)(pSurfRef, hmod, name) + return err + +cdef CUresult _cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryLoadData + cuPythonInit() + if __cuLibraryLoadData == NULL: + with gil: + raise RuntimeError('Function "cuLibraryLoadData" not found') + err = ( __cuLibraryLoadData)(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + return err + +cdef CUresult _cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryLoadFromFile + cuPythonInit() + if __cuLibraryLoadFromFile == NULL: + with gil: + raise RuntimeError('Function "cuLibraryLoadFromFile" not found') + err = ( __cuLibraryLoadFromFile)(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + return err + +cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryUnload + cuPythonInit() + if __cuLibraryUnload == NULL: + with gil: + raise RuntimeError('Function "cuLibraryUnload" not found') + err = ( __cuLibraryUnload)(library) + return err + +cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetKernel + cuPythonInit() + if __cuLibraryGetKernel == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetKernel" not found') + err = ( __cuLibraryGetKernel)(pKernel, library, name) + return err + +cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetKernelCount + cuPythonInit() + if __cuLibraryGetKernelCount == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetKernelCount" not found') + err = ( __cuLibraryGetKernelCount)(count, lib) + return err + +cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryEnumerateKernels + cuPythonInit() + if __cuLibraryEnumerateKernels == NULL: + with gil: + raise RuntimeError('Function "cuLibraryEnumerateKernels" not found') + err = ( __cuLibraryEnumerateKernels)(kernels, numKernels, lib) + return err + +cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetModule + cuPythonInit() + if __cuLibraryGetModule == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetModule" not found') + err = ( __cuLibraryGetModule)(pMod, library) + return err + +cdef CUresult _cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelGetFunction + cuPythonInit() + if __cuKernelGetFunction == NULL: + with gil: + raise RuntimeError('Function "cuKernelGetFunction" not found') + err = ( __cuKernelGetFunction)(pFunc, kernel) + return err + +cdef CUresult _cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelGetLibrary + cuPythonInit() + if __cuKernelGetLibrary == NULL: + with gil: + raise RuntimeError('Function "cuKernelGetLibrary" not found') + err = ( __cuKernelGetLibrary)(pLib, kernel) + return err + +cdef CUresult _cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetGlobal + cuPythonInit() + if __cuLibraryGetGlobal == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetGlobal" not found') + err = ( __cuLibraryGetGlobal)(dptr, numbytes, library, name) + return err + +cdef CUresult _cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetManaged + cuPythonInit() + if __cuLibraryGetManaged == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetManaged" not found') + err = ( __cuLibraryGetManaged)(dptr, numbytes, library, name) + return err + +cdef CUresult _cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLibraryGetUnifiedFunction + cuPythonInit() + if __cuLibraryGetUnifiedFunction == NULL: + with gil: + raise RuntimeError('Function "cuLibraryGetUnifiedFunction" not found') + err = ( __cuLibraryGetUnifiedFunction)(fptr, library, symbol) + return err + +cdef CUresult _cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelGetAttribute + cuPythonInit() + if __cuKernelGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuKernelGetAttribute" not found') + err = ( __cuKernelGetAttribute)(pi, attrib, kernel, dev) + return err + +cdef CUresult _cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelSetAttribute + cuPythonInit() + if __cuKernelSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuKernelSetAttribute" not found') + err = ( __cuKernelSetAttribute)(attrib, val, kernel, dev) + return err + +cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelSetCacheConfig + cuPythonInit() + if __cuKernelSetCacheConfig == NULL: + with gil: + raise RuntimeError('Function "cuKernelSetCacheConfig" not found') + err = ( __cuKernelSetCacheConfig)(kernel, config, dev) + return err + +cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelGetName + cuPythonInit() + if __cuKernelGetName == NULL: + with gil: + raise RuntimeError('Function "cuKernelGetName" not found') + err = ( __cuKernelGetName)(name, hfunc) + return err + +cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuKernelGetParamInfo + cuPythonInit() + if __cuKernelGetParamInfo == NULL: + with gil: + raise RuntimeError('Function "cuKernelGetParamInfo" not found') + err = ( __cuKernelGetParamInfo)(kernel, paramIndex, paramOffset, paramSize) + return err + +cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetInfo_v2 + cuPythonInit() + if __cuMemGetInfo_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemGetInfo_v2" not found') + err = ( __cuMemGetInfo_v2)(free, total) + return err + +cdef CUresult _cuMemAlloc_v2(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAlloc_v2 + cuPythonInit() + if __cuMemAlloc_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemAlloc_v2" not found') + err = ( __cuMemAlloc_v2)(dptr, bytesize) + return err + +cdef CUresult _cuMemAllocPitch_v2(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAllocPitch_v2 + cuPythonInit() + if __cuMemAllocPitch_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemAllocPitch_v2" not found') + err = ( __cuMemAllocPitch_v2)(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + return err + +cdef CUresult _cuMemFree_v2(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemFree_v2 + cuPythonInit() + if __cuMemFree_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemFree_v2" not found') + err = ( __cuMemFree_v2)(dptr) + return err + +cdef CUresult _cuMemGetAddressRange_v2(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetAddressRange_v2 + cuPythonInit() + if __cuMemGetAddressRange_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemGetAddressRange_v2" not found') + err = ( __cuMemGetAddressRange_v2)(pbase, psize, dptr) + return err + +cdef CUresult _cuMemAllocHost_v2(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAllocHost_v2 + cuPythonInit() + if __cuMemAllocHost_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemAllocHost_v2" not found') + err = ( __cuMemAllocHost_v2)(pp, bytesize) + return err + +cdef CUresult _cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemFreeHost + cuPythonInit() + if __cuMemFreeHost == NULL: + with gil: + raise RuntimeError('Function "cuMemFreeHost" not found') + err = ( __cuMemFreeHost)(p) + return err + +cdef CUresult _cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemHostAlloc + cuPythonInit() + if __cuMemHostAlloc == NULL: + with gil: + raise RuntimeError('Function "cuMemHostAlloc" not found') + err = ( __cuMemHostAlloc)(pp, bytesize, Flags) + return err + +cdef CUresult _cuMemHostGetDevicePointer_v2(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemHostGetDevicePointer_v2 + cuPythonInit() + if __cuMemHostGetDevicePointer_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemHostGetDevicePointer_v2" not found') + err = ( __cuMemHostGetDevicePointer_v2)(pdptr, p, Flags) + return err + +cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemHostGetFlags + cuPythonInit() + if __cuMemHostGetFlags == NULL: + with gil: + raise RuntimeError('Function "cuMemHostGetFlags" not found') + err = ( __cuMemHostGetFlags)(pFlags, p) + return err + +cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAllocManaged + cuPythonInit() + if __cuMemAllocManaged == NULL: + with gil: + raise RuntimeError('Function "cuMemAllocManaged" not found') + err = ( __cuMemAllocManaged)(dptr, bytesize, flags) + return err + +cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceRegisterAsyncNotification + cuPythonInit() + if __cuDeviceRegisterAsyncNotification == NULL: + with gil: + raise RuntimeError('Function "cuDeviceRegisterAsyncNotification" not found') + err = ( __cuDeviceRegisterAsyncNotification)(device, callbackFunc, userData, callback) + return err + +cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceUnregisterAsyncNotification + cuPythonInit() + if __cuDeviceUnregisterAsyncNotification == NULL: + with gil: + raise RuntimeError('Function "cuDeviceUnregisterAsyncNotification" not found') + err = ( __cuDeviceUnregisterAsyncNotification)(device, callback) + return err + +cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetByPCIBusId + cuPythonInit() + if __cuDeviceGetByPCIBusId == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetByPCIBusId" not found') + err = ( __cuDeviceGetByPCIBusId)(dev, pciBusId) + return err + +cdef CUresult _cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetPCIBusId + cuPythonInit() + if __cuDeviceGetPCIBusId == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetPCIBusId" not found') + err = ( __cuDeviceGetPCIBusId)(pciBusId, length, dev) + return err + +cdef CUresult _cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuIpcGetEventHandle + cuPythonInit() + if __cuIpcGetEventHandle == NULL: + with gil: + raise RuntimeError('Function "cuIpcGetEventHandle" not found') + err = ( __cuIpcGetEventHandle)(pHandle, event) + return err + +cdef CUresult _cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuIpcOpenEventHandle + cuPythonInit() + if __cuIpcOpenEventHandle == NULL: + with gil: + raise RuntimeError('Function "cuIpcOpenEventHandle" not found') + err = ( __cuIpcOpenEventHandle)(phEvent, handle) + return err + +cdef CUresult _cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuIpcGetMemHandle + cuPythonInit() + if __cuIpcGetMemHandle == NULL: + with gil: + raise RuntimeError('Function "cuIpcGetMemHandle" not found') + err = ( __cuIpcGetMemHandle)(pHandle, dptr) + return err + +cdef CUresult _cuIpcOpenMemHandle_v2(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuIpcOpenMemHandle_v2 + cuPythonInit() + if __cuIpcOpenMemHandle_v2 == NULL: + with gil: + raise RuntimeError('Function "cuIpcOpenMemHandle_v2" not found') + err = ( __cuIpcOpenMemHandle_v2)(pdptr, handle, Flags) + return err + +cdef CUresult _cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuIpcCloseMemHandle + cuPythonInit() + if __cuIpcCloseMemHandle == NULL: + with gil: + raise RuntimeError('Function "cuIpcCloseMemHandle" not found') + err = ( __cuIpcCloseMemHandle)(dptr) + return err + +cdef CUresult _cuMemHostRegister_v2(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemHostRegister_v2 + cuPythonInit() + if __cuMemHostRegister_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemHostRegister_v2" not found') + err = ( __cuMemHostRegister_v2)(p, bytesize, Flags) + return err + +cdef CUresult _cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemHostUnregister + cuPythonInit() + if __cuMemHostUnregister == NULL: + with gil: + raise RuntimeError('Function "cuMemHostUnregister" not found') + err = ( __cuMemHostUnregister)(p) + return err + +cdef CUresult _cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy + cuPythonInit() + if __cuMemcpy == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy" not found') + err = ( __cuMemcpy)(dst, src, ByteCount) + return err + +cdef CUresult _cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyPeer + cuPythonInit() + if __cuMemcpyPeer == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyPeer" not found') + err = ( __cuMemcpyPeer)(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + return err + +cdef CUresult _cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyHtoD_v2 + cuPythonInit() + if __cuMemcpyHtoD_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyHtoD_v2" not found') + err = ( __cuMemcpyHtoD_v2)(dstDevice, srcHost, ByteCount) + return err + +cdef CUresult _cuMemcpyDtoH_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyDtoH_v2 + cuPythonInit() + if __cuMemcpyDtoH_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyDtoH_v2" not found') + err = ( __cuMemcpyDtoH_v2)(dstHost, srcDevice, ByteCount) + return err + +cdef CUresult _cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyDtoD_v2 + cuPythonInit() + if __cuMemcpyDtoD_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyDtoD_v2" not found') + err = ( __cuMemcpyDtoD_v2)(dstDevice, srcDevice, ByteCount) + return err + +cdef CUresult _cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyDtoA_v2 + cuPythonInit() + if __cuMemcpyDtoA_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyDtoA_v2" not found') + err = ( __cuMemcpyDtoA_v2)(dstArray, dstOffset, srcDevice, ByteCount) + return err + +cdef CUresult _cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyAtoD_v2 + cuPythonInit() + if __cuMemcpyAtoD_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyAtoD_v2" not found') + err = ( __cuMemcpyAtoD_v2)(dstDevice, srcArray, srcOffset, ByteCount) + return err + +cdef CUresult _cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyHtoA_v2 + cuPythonInit() + if __cuMemcpyHtoA_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyHtoA_v2" not found') + err = ( __cuMemcpyHtoA_v2)(dstArray, dstOffset, srcHost, ByteCount) + return err + +cdef CUresult _cuMemcpyAtoH_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyAtoH_v2 + cuPythonInit() + if __cuMemcpyAtoH_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyAtoH_v2" not found') + err = ( __cuMemcpyAtoH_v2)(dstHost, srcArray, srcOffset, ByteCount) + return err + +cdef CUresult _cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyAtoA_v2 + cuPythonInit() + if __cuMemcpyAtoA_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyAtoA_v2" not found') + err = ( __cuMemcpyAtoA_v2)(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + return err + +cdef CUresult _cuMemcpy2D_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy2D_v2 + cuPythonInit() + if __cuMemcpy2D_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy2D_v2" not found') + err = ( __cuMemcpy2D_v2)(pCopy) + return err + +cdef CUresult _cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy2DUnaligned_v2 + cuPythonInit() + if __cuMemcpy2DUnaligned_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy2DUnaligned_v2" not found') + err = ( __cuMemcpy2DUnaligned_v2)(pCopy) + return err + +cdef CUresult _cuMemcpy3D_v2(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3D_v2 + cuPythonInit() + if __cuMemcpy3D_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3D_v2" not found') + err = ( __cuMemcpy3D_v2)(pCopy) + return err + +cdef CUresult _cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3DPeer + cuPythonInit() + if __cuMemcpy3DPeer == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3DPeer" not found') + err = ( __cuMemcpy3DPeer)(pCopy) + return err + +cdef CUresult _cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyAsync + cuPythonInit() + if __cuMemcpyAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyAsync" not found') + err = ( __cuMemcpyAsync)(dst, src, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyPeerAsync + cuPythonInit() + if __cuMemcpyPeerAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyPeerAsync" not found') + err = ( __cuMemcpyPeerAsync)(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyHtoDAsync_v2 + cuPythonInit() + if __cuMemcpyHtoDAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyHtoDAsync_v2" not found') + err = ( __cuMemcpyHtoDAsync_v2)(dstDevice, srcHost, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyDtoHAsync_v2(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyDtoHAsync_v2 + cuPythonInit() + if __cuMemcpyDtoHAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyDtoHAsync_v2" not found') + err = ( __cuMemcpyDtoHAsync_v2)(dstHost, srcDevice, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyDtoDAsync_v2 + cuPythonInit() + if __cuMemcpyDtoDAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyDtoDAsync_v2" not found') + err = ( __cuMemcpyDtoDAsync_v2)(dstDevice, srcDevice, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyHtoAAsync_v2 + cuPythonInit() + if __cuMemcpyHtoAAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyHtoAAsync_v2" not found') + err = ( __cuMemcpyHtoAAsync_v2)(dstArray, dstOffset, srcHost, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpyAtoHAsync_v2(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyAtoHAsync_v2 + cuPythonInit() + if __cuMemcpyAtoHAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyAtoHAsync_v2" not found') + err = ( __cuMemcpyAtoHAsync_v2)(dstHost, srcArray, srcOffset, ByteCount, hStream) + return err + +cdef CUresult _cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy2DAsync_v2 + cuPythonInit() + if __cuMemcpy2DAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy2DAsync_v2" not found') + err = ( __cuMemcpy2DAsync_v2)(pCopy, hStream) + return err + +cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3DAsync_v2 + cuPythonInit() + if __cuMemcpy3DAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3DAsync_v2" not found') + err = ( __cuMemcpy3DAsync_v2)(pCopy, hStream) + return err + +cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3DPeerAsync + cuPythonInit() + if __cuMemcpy3DPeerAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3DPeerAsync" not found') + err = ( __cuMemcpy3DPeerAsync)(pCopy, hStream) + return err + +cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyBatchAsync + cuPythonInit() + if __cuMemcpyBatchAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + return err + +cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3DBatchAsync + cuPythonInit() + if __cuMemcpy3DBatchAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) + return err + +cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD8_v2 + cuPythonInit() + if __cuMemsetD8_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD8_v2" not found') + err = ( __cuMemsetD8_v2)(dstDevice, uc, N) + return err + +cdef CUresult _cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD16_v2 + cuPythonInit() + if __cuMemsetD16_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD16_v2" not found') + err = ( __cuMemsetD16_v2)(dstDevice, us, N) + return err + +cdef CUresult _cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD32_v2 + cuPythonInit() + if __cuMemsetD32_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD32_v2" not found') + err = ( __cuMemsetD32_v2)(dstDevice, ui, N) + return err + +cdef CUresult _cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D8_v2 + cuPythonInit() + if __cuMemsetD2D8_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D8_v2" not found') + err = ( __cuMemsetD2D8_v2)(dstDevice, dstPitch, uc, Width, Height) + return err + +cdef CUresult _cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D16_v2 + cuPythonInit() + if __cuMemsetD2D16_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D16_v2" not found') + err = ( __cuMemsetD2D16_v2)(dstDevice, dstPitch, us, Width, Height) + return err + +cdef CUresult _cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D32_v2 + cuPythonInit() + if __cuMemsetD2D32_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D32_v2" not found') + err = ( __cuMemsetD2D32_v2)(dstDevice, dstPitch, ui, Width, Height) + return err + +cdef CUresult _cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD8Async + cuPythonInit() + if __cuMemsetD8Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD8Async" not found') + err = ( __cuMemsetD8Async)(dstDevice, uc, N, hStream) + return err + +cdef CUresult _cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD16Async + cuPythonInit() + if __cuMemsetD16Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD16Async" not found') + err = ( __cuMemsetD16Async)(dstDevice, us, N, hStream) + return err + +cdef CUresult _cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD32Async + cuPythonInit() + if __cuMemsetD32Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD32Async" not found') + err = ( __cuMemsetD32Async)(dstDevice, ui, N, hStream) + return err + +cdef CUresult _cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D8Async + cuPythonInit() + if __cuMemsetD2D8Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D8Async" not found') + err = ( __cuMemsetD2D8Async)(dstDevice, dstPitch, uc, Width, Height, hStream) + return err + +cdef CUresult _cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D16Async + cuPythonInit() + if __cuMemsetD2D16Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D16Async" not found') + err = ( __cuMemsetD2D16Async)(dstDevice, dstPitch, us, Width, Height, hStream) + return err + +cdef CUresult _cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemsetD2D32Async + cuPythonInit() + if __cuMemsetD2D32Async == NULL: + with gil: + raise RuntimeError('Function "cuMemsetD2D32Async" not found') + err = ( __cuMemsetD2D32Async)(dstDevice, dstPitch, ui, Width, Height, hStream) + return err + +cdef CUresult _cuArrayCreate_v2(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayCreate_v2 + cuPythonInit() + if __cuArrayCreate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuArrayCreate_v2" not found') + err = ( __cuArrayCreate_v2)(pHandle, pAllocateArray) + return err + +cdef CUresult _cuArrayGetDescriptor_v2(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayGetDescriptor_v2 + cuPythonInit() + if __cuArrayGetDescriptor_v2 == NULL: + with gil: + raise RuntimeError('Function "cuArrayGetDescriptor_v2" not found') + err = ( __cuArrayGetDescriptor_v2)(pArrayDescriptor, hArray) + return err + +cdef CUresult _cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayGetSparseProperties + cuPythonInit() + if __cuArrayGetSparseProperties == NULL: + with gil: + raise RuntimeError('Function "cuArrayGetSparseProperties" not found') + err = ( __cuArrayGetSparseProperties)(sparseProperties, array) + return err + +cdef CUresult _cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMipmappedArrayGetSparseProperties + cuPythonInit() + if __cuMipmappedArrayGetSparseProperties == NULL: + with gil: + raise RuntimeError('Function "cuMipmappedArrayGetSparseProperties" not found') + err = ( __cuMipmappedArrayGetSparseProperties)(sparseProperties, mipmap) + return err + +cdef CUresult _cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayGetMemoryRequirements + cuPythonInit() + if __cuArrayGetMemoryRequirements == NULL: + with gil: + raise RuntimeError('Function "cuArrayGetMemoryRequirements" not found') + err = ( __cuArrayGetMemoryRequirements)(memoryRequirements, array, device) + return err + +cdef CUresult _cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMipmappedArrayGetMemoryRequirements + cuPythonInit() + if __cuMipmappedArrayGetMemoryRequirements == NULL: + with gil: + raise RuntimeError('Function "cuMipmappedArrayGetMemoryRequirements" not found') + err = ( __cuMipmappedArrayGetMemoryRequirements)(memoryRequirements, mipmap, device) + return err + +cdef CUresult _cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayGetPlane + cuPythonInit() + if __cuArrayGetPlane == NULL: + with gil: + raise RuntimeError('Function "cuArrayGetPlane" not found') + err = ( __cuArrayGetPlane)(pPlaneArray, hArray, planeIdx) + return err + +cdef CUresult _cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArrayDestroy + cuPythonInit() + if __cuArrayDestroy == NULL: + with gil: + raise RuntimeError('Function "cuArrayDestroy" not found') + err = ( __cuArrayDestroy)(hArray) + return err + +cdef CUresult _cuArray3DCreate_v2(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArray3DCreate_v2 + cuPythonInit() + if __cuArray3DCreate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuArray3DCreate_v2" not found') + err = ( __cuArray3DCreate_v2)(pHandle, pAllocateArray) + return err + +cdef CUresult _cuArray3DGetDescriptor_v2(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuArray3DGetDescriptor_v2 + cuPythonInit() + if __cuArray3DGetDescriptor_v2 == NULL: + with gil: + raise RuntimeError('Function "cuArray3DGetDescriptor_v2" not found') + err = ( __cuArray3DGetDescriptor_v2)(pArrayDescriptor, hArray) + return err + +cdef CUresult _cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMipmappedArrayCreate + cuPythonInit() + if __cuMipmappedArrayCreate == NULL: + with gil: + raise RuntimeError('Function "cuMipmappedArrayCreate" not found') + err = ( __cuMipmappedArrayCreate)(pHandle, pMipmappedArrayDesc, numMipmapLevels) + return err + +cdef CUresult _cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMipmappedArrayGetLevel + cuPythonInit() + if __cuMipmappedArrayGetLevel == NULL: + with gil: + raise RuntimeError('Function "cuMipmappedArrayGetLevel" not found') + err = ( __cuMipmappedArrayGetLevel)(pLevelArray, hMipmappedArray, level) + return err + +cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMipmappedArrayDestroy + cuPythonInit() + if __cuMipmappedArrayDestroy == NULL: + with gil: + raise RuntimeError('Function "cuMipmappedArrayDestroy" not found') + err = ( __cuMipmappedArrayDestroy)(hMipmappedArray) + return err + +cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetHandleForAddressRange + cuPythonInit() + if __cuMemGetHandleForAddressRange == NULL: + with gil: + raise RuntimeError('Function "cuMemGetHandleForAddressRange" not found') + err = ( __cuMemGetHandleForAddressRange)(handle, dptr, size, handleType, flags) + return err + +cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemBatchDecompressAsync + cuPythonInit() + if __cuMemBatchDecompressAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) + return err + +cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAddressReserve + cuPythonInit() + if __cuMemAddressReserve == NULL: + with gil: + raise RuntimeError('Function "cuMemAddressReserve" not found') + err = ( __cuMemAddressReserve)(ptr, size, alignment, addr, flags) + return err + +cdef CUresult _cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAddressFree + cuPythonInit() + if __cuMemAddressFree == NULL: + with gil: + raise RuntimeError('Function "cuMemAddressFree" not found') + err = ( __cuMemAddressFree)(ptr, size) + return err + +cdef CUresult _cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemCreate + cuPythonInit() + if __cuMemCreate == NULL: + with gil: + raise RuntimeError('Function "cuMemCreate" not found') + err = ( __cuMemCreate)(handle, size, prop, flags) + return err + +cdef CUresult _cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemRelease + cuPythonInit() + if __cuMemRelease == NULL: + with gil: + raise RuntimeError('Function "cuMemRelease" not found') + err = ( __cuMemRelease)(handle) + return err + +cdef CUresult _cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemMap + cuPythonInit() + if __cuMemMap == NULL: + with gil: + raise RuntimeError('Function "cuMemMap" not found') + err = ( __cuMemMap)(ptr, size, offset, handle, flags) + return err + +cdef CUresult _cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemMapArrayAsync + cuPythonInit() + if __cuMemMapArrayAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemMapArrayAsync" not found') + err = ( __cuMemMapArrayAsync)(mapInfoList, count, hStream) + return err + +cdef CUresult _cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemUnmap + cuPythonInit() + if __cuMemUnmap == NULL: + with gil: + raise RuntimeError('Function "cuMemUnmap" not found') + err = ( __cuMemUnmap)(ptr, size) + return err + +cdef CUresult _cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemSetAccess + cuPythonInit() + if __cuMemSetAccess == NULL: + with gil: + raise RuntimeError('Function "cuMemSetAccess" not found') + err = ( __cuMemSetAccess)(ptr, size, desc, count) + return err + +cdef CUresult _cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetAccess + cuPythonInit() + if __cuMemGetAccess == NULL: + with gil: + raise RuntimeError('Function "cuMemGetAccess" not found') + err = ( __cuMemGetAccess)(flags, location, ptr) + return err + +cdef CUresult _cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemExportToShareableHandle + cuPythonInit() + if __cuMemExportToShareableHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemExportToShareableHandle" not found') + err = ( __cuMemExportToShareableHandle)(shareableHandle, handle, handleType, flags) + return err + +cdef CUresult _cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemImportFromShareableHandle + cuPythonInit() + if __cuMemImportFromShareableHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemImportFromShareableHandle" not found') + err = ( __cuMemImportFromShareableHandle)(handle, osHandle, shHandleType) + return err + +cdef CUresult _cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetAllocationGranularity + cuPythonInit() + if __cuMemGetAllocationGranularity == NULL: + with gil: + raise RuntimeError('Function "cuMemGetAllocationGranularity" not found') + err = ( __cuMemGetAllocationGranularity)(granularity, prop, option) + return err + +cdef CUresult _cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetAllocationPropertiesFromHandle + cuPythonInit() + if __cuMemGetAllocationPropertiesFromHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemGetAllocationPropertiesFromHandle" not found') + err = ( __cuMemGetAllocationPropertiesFromHandle)(prop, handle) + return err + +cdef CUresult _cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemRetainAllocationHandle + cuPythonInit() + if __cuMemRetainAllocationHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemRetainAllocationHandle" not found') + err = ( __cuMemRetainAllocationHandle)(handle, addr) + return err + +cdef CUresult _cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemFreeAsync + cuPythonInit() + if __cuMemFreeAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemFreeAsync" not found') + err = ( __cuMemFreeAsync)(dptr, hStream) + return err + +cdef CUresult _cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAllocAsync + cuPythonInit() + if __cuMemAllocAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemAllocAsync" not found') + err = ( __cuMemAllocAsync)(dptr, bytesize, hStream) + return err + +cdef CUresult _cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolTrimTo + cuPythonInit() + if __cuMemPoolTrimTo == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolTrimTo" not found') + err = ( __cuMemPoolTrimTo)(pool, minBytesToKeep) + return err + +cdef CUresult _cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolSetAttribute + cuPythonInit() + if __cuMemPoolSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolSetAttribute" not found') + err = ( __cuMemPoolSetAttribute)(pool, attr, value) + return err + +cdef CUresult _cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolGetAttribute + cuPythonInit() + if __cuMemPoolGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolGetAttribute" not found') + err = ( __cuMemPoolGetAttribute)(pool, attr, value) + return err + +cdef CUresult _cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolSetAccess + cuPythonInit() + if __cuMemPoolSetAccess == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolSetAccess" not found') + err = ( __cuMemPoolSetAccess)(pool, map, count) + return err + +cdef CUresult _cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolGetAccess + cuPythonInit() + if __cuMemPoolGetAccess == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolGetAccess" not found') + err = ( __cuMemPoolGetAccess)(flags, memPool, location) + return err + +cdef CUresult _cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolCreate + cuPythonInit() + if __cuMemPoolCreate == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolCreate" not found') + err = ( __cuMemPoolCreate)(pool, poolProps) + return err + +cdef CUresult _cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolDestroy + cuPythonInit() + if __cuMemPoolDestroy == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolDestroy" not found') + err = ( __cuMemPoolDestroy)(pool) + return err + +cdef CUresult _cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAllocFromPoolAsync + cuPythonInit() + if __cuMemAllocFromPoolAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemAllocFromPoolAsync" not found') + err = ( __cuMemAllocFromPoolAsync)(dptr, bytesize, pool, hStream) + return err + +cdef CUresult _cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolExportToShareableHandle + cuPythonInit() + if __cuMemPoolExportToShareableHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolExportToShareableHandle" not found') + err = ( __cuMemPoolExportToShareableHandle)(handle_out, pool, handleType, flags) + return err + +cdef CUresult _cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolImportFromShareableHandle + cuPythonInit() + if __cuMemPoolImportFromShareableHandle == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolImportFromShareableHandle" not found') + err = ( __cuMemPoolImportFromShareableHandle)(pool_out, handle, handleType, flags) + return err + +cdef CUresult _cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolExportPointer + cuPythonInit() + if __cuMemPoolExportPointer == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolExportPointer" not found') + err = ( __cuMemPoolExportPointer)(shareData_out, ptr) + return err + +cdef CUresult _cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPoolImportPointer + cuPythonInit() + if __cuMemPoolImportPointer == NULL: + with gil: + raise RuntimeError('Function "cuMemPoolImportPointer" not found') + err = ( __cuMemPoolImportPointer)(ptr_out, pool, shareData) + return err + +cdef CUresult _cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastCreate + cuPythonInit() + if __cuMulticastCreate == NULL: + with gil: + raise RuntimeError('Function "cuMulticastCreate" not found') + err = ( __cuMulticastCreate)(mcHandle, prop) + return err + +cdef CUresult _cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastAddDevice + cuPythonInit() + if __cuMulticastAddDevice == NULL: + with gil: + raise RuntimeError('Function "cuMulticastAddDevice" not found') + err = ( __cuMulticastAddDevice)(mcHandle, dev) + return err + +cdef CUresult _cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastBindMem + cuPythonInit() + if __cuMulticastBindMem == NULL: + with gil: + raise RuntimeError('Function "cuMulticastBindMem" not found') + err = ( __cuMulticastBindMem)(mcHandle, mcOffset, memHandle, memOffset, size, flags) + return err + +cdef CUresult _cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastBindAddr + cuPythonInit() + if __cuMulticastBindAddr == NULL: + with gil: + raise RuntimeError('Function "cuMulticastBindAddr" not found') + err = ( __cuMulticastBindAddr)(mcHandle, mcOffset, memptr, size, flags) + return err + +cdef CUresult _cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastUnbind + cuPythonInit() + if __cuMulticastUnbind == NULL: + with gil: + raise RuntimeError('Function "cuMulticastUnbind" not found') + err = ( __cuMulticastUnbind)(mcHandle, dev, mcOffset, size) + return err + +cdef CUresult _cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMulticastGetGranularity + cuPythonInit() + if __cuMulticastGetGranularity == NULL: + with gil: + raise RuntimeError('Function "cuMulticastGetGranularity" not found') + err = ( __cuMulticastGetGranularity)(granularity, prop, option) + return err + +cdef CUresult _cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuPointerGetAttribute + cuPythonInit() + if __cuPointerGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuPointerGetAttribute" not found') + err = ( __cuPointerGetAttribute)(data, attribute, ptr) + return err + +cdef CUresult _cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPrefetchAsync + cuPythonInit() + if __cuMemPrefetchAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemPrefetchAsync" not found') + err = ( __cuMemPrefetchAsync)(devPtr, count, dstDevice, hStream) + return err + +cdef CUresult _cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemPrefetchAsync_v2 + cuPythonInit() + if __cuMemPrefetchAsync_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemPrefetchAsync_v2" not found') + err = ( __cuMemPrefetchAsync_v2)(devPtr, count, location, flags, hStream) + return err + +cdef CUresult _cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAdvise + cuPythonInit() + if __cuMemAdvise == NULL: + with gil: + raise RuntimeError('Function "cuMemAdvise" not found') + err = ( __cuMemAdvise)(devPtr, count, advice, device) + return err + +cdef CUresult _cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemAdvise_v2 + cuPythonInit() + if __cuMemAdvise_v2 == NULL: + with gil: + raise RuntimeError('Function "cuMemAdvise_v2" not found') + err = ( __cuMemAdvise_v2)(devPtr, count, advice, location) + return err + +cdef CUresult _cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemRangeGetAttribute + cuPythonInit() + if __cuMemRangeGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuMemRangeGetAttribute" not found') + err = ( __cuMemRangeGetAttribute)(data, dataSize, attribute, devPtr, count) + return err + +cdef CUresult _cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemRangeGetAttributes + cuPythonInit() + if __cuMemRangeGetAttributes == NULL: + with gil: + raise RuntimeError('Function "cuMemRangeGetAttributes" not found') + err = ( __cuMemRangeGetAttributes)(data, dataSizes, attributes, numAttributes, devPtr, count) + return err + +cdef CUresult _cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuPointerSetAttribute + cuPythonInit() + if __cuPointerSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuPointerSetAttribute" not found') + err = ( __cuPointerSetAttribute)(value, attribute, ptr) + return err + +cdef CUresult _cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuPointerGetAttributes + cuPythonInit() + if __cuPointerGetAttributes == NULL: + with gil: + raise RuntimeError('Function "cuPointerGetAttributes" not found') + err = ( __cuPointerGetAttributes)(numAttributes, attributes, data, ptr) + return err + +cdef CUresult _cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamCreate + cuPythonInit() + if __cuStreamCreate == NULL: + with gil: + raise RuntimeError('Function "cuStreamCreate" not found') + err = ( __cuStreamCreate)(phStream, Flags) + return err + +cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamCreateWithPriority + cuPythonInit() + if __cuStreamCreateWithPriority == NULL: + with gil: + raise RuntimeError('Function "cuStreamCreateWithPriority" not found') + err = ( __cuStreamCreateWithPriority)(phStream, flags, priority) + return err + +cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetPriority + cuPythonInit() + if __cuStreamGetPriority == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetPriority" not found') + err = ( __cuStreamGetPriority)(hStream, priority) + return err + +cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetDevice + cuPythonInit() + if __cuStreamGetDevice == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetDevice" not found') + err = ( __cuStreamGetDevice)(hStream, device) + return err + +cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetFlags + cuPythonInit() + if __cuStreamGetFlags == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetFlags" not found') + err = ( __cuStreamGetFlags)(hStream, flags) + return err + +cdef CUresult _cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetId + cuPythonInit() + if __cuStreamGetId == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetId" not found') + err = ( __cuStreamGetId)(hStream, streamId) + return err + +cdef CUresult _cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCtx + cuPythonInit() + if __cuStreamGetCtx == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetCtx" not found') + err = ( __cuStreamGetCtx)(hStream, pctx) + return err + +cdef CUresult _cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCtx_v2 + cuPythonInit() + if __cuStreamGetCtx_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetCtx_v2" not found') + err = ( __cuStreamGetCtx_v2)(hStream, pCtx, pGreenCtx) + return err + +cdef CUresult _cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamWaitEvent + cuPythonInit() + if __cuStreamWaitEvent == NULL: + with gil: + raise RuntimeError('Function "cuStreamWaitEvent" not found') + err = ( __cuStreamWaitEvent)(hStream, hEvent, Flags) + return err + +cdef CUresult _cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamAddCallback + cuPythonInit() + if __cuStreamAddCallback == NULL: + with gil: + raise RuntimeError('Function "cuStreamAddCallback" not found') + err = ( __cuStreamAddCallback)(hStream, callback, userData, flags) + return err + +cdef CUresult _cuStreamBeginCapture_v2(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamBeginCapture_v2 + cuPythonInit() + if __cuStreamBeginCapture_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamBeginCapture_v2" not found') + err = ( __cuStreamBeginCapture_v2)(hStream, mode) + return err + +cdef CUresult _cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamBeginCaptureToGraph + cuPythonInit() + if __cuStreamBeginCaptureToGraph == NULL: + with gil: + raise RuntimeError('Function "cuStreamBeginCaptureToGraph" not found') + err = ( __cuStreamBeginCaptureToGraph)(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + return err + +cdef CUresult _cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuThreadExchangeStreamCaptureMode + cuPythonInit() + if __cuThreadExchangeStreamCaptureMode == NULL: + with gil: + raise RuntimeError('Function "cuThreadExchangeStreamCaptureMode" not found') + err = ( __cuThreadExchangeStreamCaptureMode)(mode) + return err + +cdef CUresult _cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamEndCapture + cuPythonInit() + if __cuStreamEndCapture == NULL: + with gil: + raise RuntimeError('Function "cuStreamEndCapture" not found') + err = ( __cuStreamEndCapture)(hStream, phGraph) + return err + +cdef CUresult _cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamIsCapturing + cuPythonInit() + if __cuStreamIsCapturing == NULL: + with gil: + raise RuntimeError('Function "cuStreamIsCapturing" not found') + err = ( __cuStreamIsCapturing)(hStream, captureStatus) + return err + +cdef CUresult _cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCaptureInfo_v2 + cuPythonInit() + if __cuStreamGetCaptureInfo_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetCaptureInfo_v2" not found') + err = ( __cuStreamGetCaptureInfo_v2)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + return err + +cdef CUresult _cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetCaptureInfo_v3 + cuPythonInit() + if __cuStreamGetCaptureInfo_v3 == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetCaptureInfo_v3" not found') + err = ( __cuStreamGetCaptureInfo_v3)(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + return err + +cdef CUresult _cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamUpdateCaptureDependencies + cuPythonInit() + if __cuStreamUpdateCaptureDependencies == NULL: + with gil: + raise RuntimeError('Function "cuStreamUpdateCaptureDependencies" not found') + err = ( __cuStreamUpdateCaptureDependencies)(hStream, dependencies, numDependencies, flags) + return err + +cdef CUresult _cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamUpdateCaptureDependencies_v2 + cuPythonInit() + if __cuStreamUpdateCaptureDependencies_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamUpdateCaptureDependencies_v2" not found') + err = ( __cuStreamUpdateCaptureDependencies_v2)(hStream, dependencies, dependencyData, numDependencies, flags) + return err + +cdef CUresult _cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamAttachMemAsync + cuPythonInit() + if __cuStreamAttachMemAsync == NULL: + with gil: + raise RuntimeError('Function "cuStreamAttachMemAsync" not found') + err = ( __cuStreamAttachMemAsync)(hStream, dptr, length, flags) + return err + +cdef CUresult _cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamQuery + cuPythonInit() + if __cuStreamQuery == NULL: + with gil: + raise RuntimeError('Function "cuStreamQuery" not found') + err = ( __cuStreamQuery)(hStream) + return err + +cdef CUresult _cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamSynchronize + cuPythonInit() + if __cuStreamSynchronize == NULL: + with gil: + raise RuntimeError('Function "cuStreamSynchronize" not found') + err = ( __cuStreamSynchronize)(hStream) + return err + +cdef CUresult _cuStreamDestroy_v2(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamDestroy_v2 + cuPythonInit() + if __cuStreamDestroy_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamDestroy_v2" not found') + err = ( __cuStreamDestroy_v2)(hStream) + return err + +cdef CUresult _cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamCopyAttributes + cuPythonInit() + if __cuStreamCopyAttributes == NULL: + with gil: + raise RuntimeError('Function "cuStreamCopyAttributes" not found') + err = ( __cuStreamCopyAttributes)(dst, src) + return err + +cdef CUresult _cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetAttribute + cuPythonInit() + if __cuStreamGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetAttribute" not found') + err = ( __cuStreamGetAttribute)(hStream, attr, value_out) + return err + +cdef CUresult _cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamSetAttribute + cuPythonInit() + if __cuStreamSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuStreamSetAttribute" not found') + err = ( __cuStreamSetAttribute)(hStream, attr, value) + return err + +cdef CUresult _cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventCreate + cuPythonInit() + if __cuEventCreate == NULL: + with gil: + raise RuntimeError('Function "cuEventCreate" not found') + err = ( __cuEventCreate)(phEvent, Flags) + return err + +cdef CUresult _cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventRecord + cuPythonInit() + if __cuEventRecord == NULL: + with gil: + raise RuntimeError('Function "cuEventRecord" not found') + err = ( __cuEventRecord)(hEvent, hStream) + return err + +cdef CUresult _cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventRecordWithFlags + cuPythonInit() + if __cuEventRecordWithFlags == NULL: + with gil: + raise RuntimeError('Function "cuEventRecordWithFlags" not found') + err = ( __cuEventRecordWithFlags)(hEvent, hStream, flags) + return err + +cdef CUresult _cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventQuery + cuPythonInit() + if __cuEventQuery == NULL: + with gil: + raise RuntimeError('Function "cuEventQuery" not found') + err = ( __cuEventQuery)(hEvent) + return err + +cdef CUresult _cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventSynchronize + cuPythonInit() + if __cuEventSynchronize == NULL: + with gil: + raise RuntimeError('Function "cuEventSynchronize" not found') + err = ( __cuEventSynchronize)(hEvent) + return err + +cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventDestroy_v2 + cuPythonInit() + if __cuEventDestroy_v2 == NULL: + with gil: + raise RuntimeError('Function "cuEventDestroy_v2" not found') + err = ( __cuEventDestroy_v2)(hEvent) + return err + +cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventElapsedTime + cuPythonInit() + if __cuEventElapsedTime == NULL: + with gil: + raise RuntimeError('Function "cuEventElapsedTime" not found') + err = ( __cuEventElapsedTime)(pMilliseconds, hStart, hEnd) + return err + +cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventElapsedTime_v2 + cuPythonInit() + if __cuEventElapsedTime_v2 == NULL: + with gil: + raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) + return err + +cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuImportExternalMemory + cuPythonInit() + if __cuImportExternalMemory == NULL: + with gil: + raise RuntimeError('Function "cuImportExternalMemory" not found') + err = ( __cuImportExternalMemory)(extMem_out, memHandleDesc) + return err + +cdef CUresult _cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuExternalMemoryGetMappedBuffer + cuPythonInit() + if __cuExternalMemoryGetMappedBuffer == NULL: + with gil: + raise RuntimeError('Function "cuExternalMemoryGetMappedBuffer" not found') + err = ( __cuExternalMemoryGetMappedBuffer)(devPtr, extMem, bufferDesc) + return err + +cdef CUresult _cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuExternalMemoryGetMappedMipmappedArray + cuPythonInit() + if __cuExternalMemoryGetMappedMipmappedArray == NULL: + with gil: + raise RuntimeError('Function "cuExternalMemoryGetMappedMipmappedArray" not found') + err = ( __cuExternalMemoryGetMappedMipmappedArray)(mipmap, extMem, mipmapDesc) + return err + +cdef CUresult _cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDestroyExternalMemory + cuPythonInit() + if __cuDestroyExternalMemory == NULL: + with gil: + raise RuntimeError('Function "cuDestroyExternalMemory" not found') + err = ( __cuDestroyExternalMemory)(extMem) + return err + +cdef CUresult _cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuImportExternalSemaphore + cuPythonInit() + if __cuImportExternalSemaphore == NULL: + with gil: + raise RuntimeError('Function "cuImportExternalSemaphore" not found') + err = ( __cuImportExternalSemaphore)(extSem_out, semHandleDesc) + return err + +cdef CUresult _cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSignalExternalSemaphoresAsync + cuPythonInit() + if __cuSignalExternalSemaphoresAsync == NULL: + with gil: + raise RuntimeError('Function "cuSignalExternalSemaphoresAsync" not found') + err = ( __cuSignalExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + return err + +cdef CUresult _cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuWaitExternalSemaphoresAsync + cuPythonInit() + if __cuWaitExternalSemaphoresAsync == NULL: + with gil: + raise RuntimeError('Function "cuWaitExternalSemaphoresAsync" not found') + err = ( __cuWaitExternalSemaphoresAsync)(extSemArray, paramsArray, numExtSems, stream) + return err + +cdef CUresult _cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDestroyExternalSemaphore + cuPythonInit() + if __cuDestroyExternalSemaphore == NULL: + with gil: + raise RuntimeError('Function "cuDestroyExternalSemaphore" not found') + err = ( __cuDestroyExternalSemaphore)(extSem) + return err + +cdef CUresult _cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamWaitValue32_v2 + cuPythonInit() + if __cuStreamWaitValue32_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamWaitValue32_v2" not found') + err = ( __cuStreamWaitValue32_v2)(stream, addr, value, flags) + return err + +cdef CUresult _cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamWaitValue64_v2 + cuPythonInit() + if __cuStreamWaitValue64_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamWaitValue64_v2" not found') + err = ( __cuStreamWaitValue64_v2)(stream, addr, value, flags) + return err + +cdef CUresult _cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamWriteValue32_v2 + cuPythonInit() + if __cuStreamWriteValue32_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamWriteValue32_v2" not found') + err = ( __cuStreamWriteValue32_v2)(stream, addr, value, flags) + return err + +cdef CUresult _cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamWriteValue64_v2 + cuPythonInit() + if __cuStreamWriteValue64_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamWriteValue64_v2" not found') + err = ( __cuStreamWriteValue64_v2)(stream, addr, value, flags) + return err + +cdef CUresult _cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamBatchMemOp_v2 + cuPythonInit() + if __cuStreamBatchMemOp_v2 == NULL: + with gil: + raise RuntimeError('Function "cuStreamBatchMemOp_v2" not found') + err = ( __cuStreamBatchMemOp_v2)(stream, count, paramArray, flags) + return err + +cdef CUresult _cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncGetAttribute + cuPythonInit() + if __cuFuncGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuFuncGetAttribute" not found') + err = ( __cuFuncGetAttribute)(pi, attrib, hfunc) + return err + +cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncSetAttribute + cuPythonInit() + if __cuFuncSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuFuncSetAttribute" not found') + err = ( __cuFuncSetAttribute)(hfunc, attrib, value) + return err + +cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncSetCacheConfig + cuPythonInit() + if __cuFuncSetCacheConfig == NULL: + with gil: + raise RuntimeError('Function "cuFuncSetCacheConfig" not found') + err = ( __cuFuncSetCacheConfig)(hfunc, config) + return err + +cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncGetModule + cuPythonInit() + if __cuFuncGetModule == NULL: + with gil: + raise RuntimeError('Function "cuFuncGetModule" not found') + err = ( __cuFuncGetModule)(hmod, hfunc) + return err + +cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncGetName + cuPythonInit() + if __cuFuncGetName == NULL: + with gil: + raise RuntimeError('Function "cuFuncGetName" not found') + err = ( __cuFuncGetName)(name, hfunc) + return err + +cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncGetParamInfo + cuPythonInit() + if __cuFuncGetParamInfo == NULL: + with gil: + raise RuntimeError('Function "cuFuncGetParamInfo" not found') + err = ( __cuFuncGetParamInfo)(func, paramIndex, paramOffset, paramSize) + return err + +cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncIsLoaded + cuPythonInit() + if __cuFuncIsLoaded == NULL: + with gil: + raise RuntimeError('Function "cuFuncIsLoaded" not found') + err = ( __cuFuncIsLoaded)(state, function) + return err + +cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncLoad + cuPythonInit() + if __cuFuncLoad == NULL: + with gil: + raise RuntimeError('Function "cuFuncLoad" not found') + err = ( __cuFuncLoad)(function) + return err + +cdef CUresult _cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchKernel + cuPythonInit() + if __cuLaunchKernel == NULL: + with gil: + raise RuntimeError('Function "cuLaunchKernel" not found') + err = ( __cuLaunchKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + return err + +cdef CUresult _cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchKernelEx + cuPythonInit() + if __cuLaunchKernelEx == NULL: + with gil: + raise RuntimeError('Function "cuLaunchKernelEx" not found') + err = ( __cuLaunchKernelEx)(config, f, kernelParams, extra) + return err + +cdef CUresult _cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchCooperativeKernel + cuPythonInit() + if __cuLaunchCooperativeKernel == NULL: + with gil: + raise RuntimeError('Function "cuLaunchCooperativeKernel" not found') + err = ( __cuLaunchCooperativeKernel)(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + return err + +cdef CUresult _cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchCooperativeKernelMultiDevice + cuPythonInit() + if __cuLaunchCooperativeKernelMultiDevice == NULL: + with gil: + raise RuntimeError('Function "cuLaunchCooperativeKernelMultiDevice" not found') + err = ( __cuLaunchCooperativeKernelMultiDevice)(launchParamsList, numDevices, flags) + return err + +cdef CUresult _cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchHostFunc + cuPythonInit() + if __cuLaunchHostFunc == NULL: + with gil: + raise RuntimeError('Function "cuLaunchHostFunc" not found') + err = ( __cuLaunchHostFunc)(hStream, fn, userData) + return err + +cdef CUresult _cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncSetBlockShape + cuPythonInit() + if __cuFuncSetBlockShape == NULL: + with gil: + raise RuntimeError('Function "cuFuncSetBlockShape" not found') + err = ( __cuFuncSetBlockShape)(hfunc, x, y, z) + return err + +cdef CUresult _cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncSetSharedSize + cuPythonInit() + if __cuFuncSetSharedSize == NULL: + with gil: + raise RuntimeError('Function "cuFuncSetSharedSize" not found') + err = ( __cuFuncSetSharedSize)(hfunc, numbytes) + return err + +cdef CUresult _cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuParamSetSize + cuPythonInit() + if __cuParamSetSize == NULL: + with gil: + raise RuntimeError('Function "cuParamSetSize" not found') + err = ( __cuParamSetSize)(hfunc, numbytes) + return err + +cdef CUresult _cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuParamSeti + cuPythonInit() + if __cuParamSeti == NULL: + with gil: + raise RuntimeError('Function "cuParamSeti" not found') + err = ( __cuParamSeti)(hfunc, offset, value) + return err + +cdef CUresult _cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuParamSetf + cuPythonInit() + if __cuParamSetf == NULL: + with gil: + raise RuntimeError('Function "cuParamSetf" not found') + err = ( __cuParamSetf)(hfunc, offset, value) + return err + +cdef CUresult _cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuParamSetv + cuPythonInit() + if __cuParamSetv == NULL: + with gil: + raise RuntimeError('Function "cuParamSetv" not found') + err = ( __cuParamSetv)(hfunc, offset, ptr, numbytes) + return err + +cdef CUresult _cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunch + cuPythonInit() + if __cuLaunch == NULL: + with gil: + raise RuntimeError('Function "cuLaunch" not found') + err = ( __cuLaunch)(f) + return err + +cdef CUresult _cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchGrid + cuPythonInit() + if __cuLaunchGrid == NULL: + with gil: + raise RuntimeError('Function "cuLaunchGrid" not found') + err = ( __cuLaunchGrid)(f, grid_width, grid_height) + return err + +cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLaunchGridAsync + cuPythonInit() + if __cuLaunchGridAsync == NULL: + with gil: + raise RuntimeError('Function "cuLaunchGridAsync" not found') + err = ( __cuLaunchGridAsync)(f, grid_width, grid_height, hStream) + return err + +cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuParamSetTexRef + cuPythonInit() + if __cuParamSetTexRef == NULL: + with gil: + raise RuntimeError('Function "cuParamSetTexRef" not found') + err = ( __cuParamSetTexRef)(hfunc, texunit, hTexRef) + return err + +cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuFuncSetSharedMemConfig + cuPythonInit() + if __cuFuncSetSharedMemConfig == NULL: + with gil: + raise RuntimeError('Function "cuFuncSetSharedMemConfig" not found') + err = ( __cuFuncSetSharedMemConfig)(hfunc, config) + return err + +cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphCreate + cuPythonInit() + if __cuGraphCreate == NULL: + with gil: + raise RuntimeError('Function "cuGraphCreate" not found') + err = ( __cuGraphCreate)(phGraph, flags) + return err + +cdef CUresult _cuGraphAddKernelNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddKernelNode_v2 + cuPythonInit() + if __cuGraphAddKernelNode_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddKernelNode_v2" not found') + err = ( __cuGraphAddKernelNode_v2)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphKernelNodeGetParams_v2(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphKernelNodeGetParams_v2 + cuPythonInit() + if __cuGraphKernelNodeGetParams_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphKernelNodeGetParams_v2" not found') + err = ( __cuGraphKernelNodeGetParams_v2)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphKernelNodeSetParams_v2(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphKernelNodeSetParams_v2 + cuPythonInit() + if __cuGraphKernelNodeSetParams_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphKernelNodeSetParams_v2" not found') + err = ( __cuGraphKernelNodeSetParams_v2)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddMemcpyNode + cuPythonInit() + if __cuGraphAddMemcpyNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddMemcpyNode" not found') + err = ( __cuGraphAddMemcpyNode)(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + return err + +cdef CUresult _cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemcpyNodeGetParams + cuPythonInit() + if __cuGraphMemcpyNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemcpyNodeGetParams" not found') + err = ( __cuGraphMemcpyNodeGetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemcpyNodeSetParams + cuPythonInit() + if __cuGraphMemcpyNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemcpyNodeSetParams" not found') + err = ( __cuGraphMemcpyNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddMemsetNode + cuPythonInit() + if __cuGraphAddMemsetNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddMemsetNode" not found') + err = ( __cuGraphAddMemsetNode)(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + return err + +cdef CUresult _cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemsetNodeGetParams + cuPythonInit() + if __cuGraphMemsetNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemsetNodeGetParams" not found') + err = ( __cuGraphMemsetNodeGetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemsetNodeSetParams + cuPythonInit() + if __cuGraphMemsetNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemsetNodeSetParams" not found') + err = ( __cuGraphMemsetNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddHostNode + cuPythonInit() + if __cuGraphAddHostNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddHostNode" not found') + err = ( __cuGraphAddHostNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphHostNodeGetParams + cuPythonInit() + if __cuGraphHostNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphHostNodeGetParams" not found') + err = ( __cuGraphHostNodeGetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphHostNodeSetParams + cuPythonInit() + if __cuGraphHostNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphHostNodeSetParams" not found') + err = ( __cuGraphHostNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddChildGraphNode + cuPythonInit() + if __cuGraphAddChildGraphNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddChildGraphNode" not found') + err = ( __cuGraphAddChildGraphNode)(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + return err + +cdef CUresult _cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphChildGraphNodeGetGraph + cuPythonInit() + if __cuGraphChildGraphNodeGetGraph == NULL: + with gil: + raise RuntimeError('Function "cuGraphChildGraphNodeGetGraph" not found') + err = ( __cuGraphChildGraphNodeGetGraph)(hNode, phGraph) + return err + +cdef CUresult _cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddEmptyNode + cuPythonInit() + if __cuGraphAddEmptyNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddEmptyNode" not found') + err = ( __cuGraphAddEmptyNode)(phGraphNode, hGraph, dependencies, numDependencies) + return err + +cdef CUresult _cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddEventRecordNode + cuPythonInit() + if __cuGraphAddEventRecordNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddEventRecordNode" not found') + err = ( __cuGraphAddEventRecordNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + return err + +cdef CUresult _cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphEventRecordNodeGetEvent + cuPythonInit() + if __cuGraphEventRecordNodeGetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphEventRecordNodeGetEvent" not found') + err = ( __cuGraphEventRecordNodeGetEvent)(hNode, event_out) + return err + +cdef CUresult _cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphEventRecordNodeSetEvent + cuPythonInit() + if __cuGraphEventRecordNodeSetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphEventRecordNodeSetEvent" not found') + err = ( __cuGraphEventRecordNodeSetEvent)(hNode, event) + return err + +cdef CUresult _cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddEventWaitNode + cuPythonInit() + if __cuGraphAddEventWaitNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddEventWaitNode" not found') + err = ( __cuGraphAddEventWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, event) + return err + +cdef CUresult _cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphEventWaitNodeGetEvent + cuPythonInit() + if __cuGraphEventWaitNodeGetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphEventWaitNodeGetEvent" not found') + err = ( __cuGraphEventWaitNodeGetEvent)(hNode, event_out) + return err + +cdef CUresult _cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphEventWaitNodeSetEvent + cuPythonInit() + if __cuGraphEventWaitNodeSetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphEventWaitNodeSetEvent" not found') + err = ( __cuGraphEventWaitNodeSetEvent)(hNode, event) + return err + +cdef CUresult _cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddExternalSemaphoresSignalNode + cuPythonInit() + if __cuGraphAddExternalSemaphoresSignalNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddExternalSemaphoresSignalNode" not found') + err = ( __cuGraphAddExternalSemaphoresSignalNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExternalSemaphoresSignalNodeGetParams + cuPythonInit() + if __cuGraphExternalSemaphoresSignalNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeGetParams" not found') + err = ( __cuGraphExternalSemaphoresSignalNodeGetParams)(hNode, params_out) + return err + +cdef CUresult _cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExternalSemaphoresSignalNodeSetParams + cuPythonInit() + if __cuGraphExternalSemaphoresSignalNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExternalSemaphoresSignalNodeSetParams" not found') + err = ( __cuGraphExternalSemaphoresSignalNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddExternalSemaphoresWaitNode + cuPythonInit() + if __cuGraphAddExternalSemaphoresWaitNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddExternalSemaphoresWaitNode" not found') + err = ( __cuGraphAddExternalSemaphoresWaitNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExternalSemaphoresWaitNodeGetParams + cuPythonInit() + if __cuGraphExternalSemaphoresWaitNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeGetParams" not found') + err = ( __cuGraphExternalSemaphoresWaitNodeGetParams)(hNode, params_out) + return err + +cdef CUresult _cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExternalSemaphoresWaitNodeSetParams + cuPythonInit() + if __cuGraphExternalSemaphoresWaitNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExternalSemaphoresWaitNodeSetParams" not found') + err = ( __cuGraphExternalSemaphoresWaitNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddBatchMemOpNode + cuPythonInit() + if __cuGraphAddBatchMemOpNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddBatchMemOpNode" not found') + err = ( __cuGraphAddBatchMemOpNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphBatchMemOpNodeGetParams + cuPythonInit() + if __cuGraphBatchMemOpNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphBatchMemOpNodeGetParams" not found') + err = ( __cuGraphBatchMemOpNodeGetParams)(hNode, nodeParams_out) + return err + +cdef CUresult _cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphBatchMemOpNodeSetParams + cuPythonInit() + if __cuGraphBatchMemOpNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphBatchMemOpNodeSetParams" not found') + err = ( __cuGraphBatchMemOpNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecBatchMemOpNodeSetParams + cuPythonInit() + if __cuGraphExecBatchMemOpNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecBatchMemOpNodeSetParams" not found') + err = ( __cuGraphExecBatchMemOpNodeSetParams)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddMemAllocNode + cuPythonInit() + if __cuGraphAddMemAllocNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddMemAllocNode" not found') + err = ( __cuGraphAddMemAllocNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemAllocNodeGetParams + cuPythonInit() + if __cuGraphMemAllocNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemAllocNodeGetParams" not found') + err = ( __cuGraphMemAllocNodeGetParams)(hNode, params_out) + return err + +cdef CUresult _cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddMemFreeNode + cuPythonInit() + if __cuGraphAddMemFreeNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddMemFreeNode" not found') + err = ( __cuGraphAddMemFreeNode)(phGraphNode, hGraph, dependencies, numDependencies, dptr) + return err + +cdef CUresult _cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphMemFreeNodeGetParams + cuPythonInit() + if __cuGraphMemFreeNodeGetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphMemFreeNodeGetParams" not found') + err = ( __cuGraphMemFreeNodeGetParams)(hNode, dptr_out) + return err + +cdef CUresult _cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGraphMemTrim + cuPythonInit() + if __cuDeviceGraphMemTrim == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGraphMemTrim" not found') + err = ( __cuDeviceGraphMemTrim)(device) + return err + +cdef CUresult _cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetGraphMemAttribute + cuPythonInit() + if __cuDeviceGetGraphMemAttribute == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetGraphMemAttribute" not found') + err = ( __cuDeviceGetGraphMemAttribute)(device, attr, value) + return err + +cdef CUresult _cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceSetGraphMemAttribute + cuPythonInit() + if __cuDeviceSetGraphMemAttribute == NULL: + with gil: + raise RuntimeError('Function "cuDeviceSetGraphMemAttribute" not found') + err = ( __cuDeviceSetGraphMemAttribute)(device, attr, value) + return err + +cdef CUresult _cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphClone + cuPythonInit() + if __cuGraphClone == NULL: + with gil: + raise RuntimeError('Function "cuGraphClone" not found') + err = ( __cuGraphClone)(phGraphClone, originalGraph) + return err + +cdef CUresult _cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeFindInClone + cuPythonInit() + if __cuGraphNodeFindInClone == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeFindInClone" not found') + err = ( __cuGraphNodeFindInClone)(phNode, hOriginalNode, hClonedGraph) + return err + +cdef CUresult _cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetType + cuPythonInit() + if __cuGraphNodeGetType == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetType" not found') + err = ( __cuGraphNodeGetType)(hNode, typename) + return err + +cdef CUresult _cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphGetNodes + cuPythonInit() + if __cuGraphGetNodes == NULL: + with gil: + raise RuntimeError('Function "cuGraphGetNodes" not found') + err = ( __cuGraphGetNodes)(hGraph, nodes, numNodes) + return err + +cdef CUresult _cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphGetRootNodes + cuPythonInit() + if __cuGraphGetRootNodes == NULL: + with gil: + raise RuntimeError('Function "cuGraphGetRootNodes" not found') + err = ( __cuGraphGetRootNodes)(hGraph, rootNodes, numRootNodes) + return err + +cdef CUresult _cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphGetEdges + cuPythonInit() + if __cuGraphGetEdges == NULL: + with gil: + raise RuntimeError('Function "cuGraphGetEdges" not found') + err = ( __cuGraphGetEdges)(hGraph, from_, to, numEdges) + return err + +cdef CUresult _cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphGetEdges_v2 + cuPythonInit() + if __cuGraphGetEdges_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphGetEdges_v2" not found') + err = ( __cuGraphGetEdges_v2)(hGraph, from_, to, edgeData, numEdges) + return err + +cdef CUresult _cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetDependencies + cuPythonInit() + if __cuGraphNodeGetDependencies == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetDependencies" not found') + err = ( __cuGraphNodeGetDependencies)(hNode, dependencies, numDependencies) + return err + +cdef CUresult _cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetDependencies_v2 + cuPythonInit() + if __cuGraphNodeGetDependencies_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetDependencies_v2" not found') + err = ( __cuGraphNodeGetDependencies_v2)(hNode, dependencies, edgeData, numDependencies) + return err + +cdef CUresult _cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetDependentNodes + cuPythonInit() + if __cuGraphNodeGetDependentNodes == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetDependentNodes" not found') + err = ( __cuGraphNodeGetDependentNodes)(hNode, dependentNodes, numDependentNodes) + return err + +cdef CUresult _cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetDependentNodes_v2 + cuPythonInit() + if __cuGraphNodeGetDependentNodes_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetDependentNodes_v2" not found') + err = ( __cuGraphNodeGetDependentNodes_v2)(hNode, dependentNodes, edgeData, numDependentNodes) + return err + +cdef CUresult _cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddDependencies + cuPythonInit() + if __cuGraphAddDependencies == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddDependencies" not found') + err = ( __cuGraphAddDependencies)(hGraph, from_, to, numDependencies) + return err + +cdef CUresult _cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddDependencies_v2 + cuPythonInit() + if __cuGraphAddDependencies_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddDependencies_v2" not found') + err = ( __cuGraphAddDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + return err + +cdef CUresult _cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphRemoveDependencies + cuPythonInit() + if __cuGraphRemoveDependencies == NULL: + with gil: + raise RuntimeError('Function "cuGraphRemoveDependencies" not found') + err = ( __cuGraphRemoveDependencies)(hGraph, from_, to, numDependencies) + return err + +cdef CUresult _cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphRemoveDependencies_v2 + cuPythonInit() + if __cuGraphRemoveDependencies_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphRemoveDependencies_v2" not found') + err = ( __cuGraphRemoveDependencies_v2)(hGraph, from_, to, edgeData, numDependencies) + return err + +cdef CUresult _cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphDestroyNode + cuPythonInit() + if __cuGraphDestroyNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphDestroyNode" not found') + err = ( __cuGraphDestroyNode)(hNode) + return err + +cdef CUresult _cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphInstantiateWithFlags + cuPythonInit() + if __cuGraphInstantiateWithFlags == NULL: + with gil: + raise RuntimeError('Function "cuGraphInstantiateWithFlags" not found') + err = ( __cuGraphInstantiateWithFlags)(phGraphExec, hGraph, flags) + return err + +cdef CUresult _cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphInstantiateWithParams + cuPythonInit() + if __cuGraphInstantiateWithParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphInstantiateWithParams" not found') + err = ( __cuGraphInstantiateWithParams)(phGraphExec, hGraph, instantiateParams) + return err + +cdef CUresult _cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecGetFlags + cuPythonInit() + if __cuGraphExecGetFlags == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecGetFlags" not found') + err = ( __cuGraphExecGetFlags)(hGraphExec, flags) + return err + +cdef CUresult _cuGraphExecKernelNodeSetParams_v2(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecKernelNodeSetParams_v2 + cuPythonInit() + if __cuGraphExecKernelNodeSetParams_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecKernelNodeSetParams_v2" not found') + err = ( __cuGraphExecKernelNodeSetParams_v2)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecMemcpyNodeSetParams + cuPythonInit() + if __cuGraphExecMemcpyNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecMemcpyNodeSetParams" not found') + err = ( __cuGraphExecMemcpyNodeSetParams)(hGraphExec, hNode, copyParams, ctx) + return err + +cdef CUresult _cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecMemsetNodeSetParams + cuPythonInit() + if __cuGraphExecMemsetNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecMemsetNodeSetParams" not found') + err = ( __cuGraphExecMemsetNodeSetParams)(hGraphExec, hNode, memsetParams, ctx) + return err + +cdef CUresult _cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecHostNodeSetParams + cuPythonInit() + if __cuGraphExecHostNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecHostNodeSetParams" not found') + err = ( __cuGraphExecHostNodeSetParams)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecChildGraphNodeSetParams + cuPythonInit() + if __cuGraphExecChildGraphNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecChildGraphNodeSetParams" not found') + err = ( __cuGraphExecChildGraphNodeSetParams)(hGraphExec, hNode, childGraph) + return err + +cdef CUresult _cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecEventRecordNodeSetEvent + cuPythonInit() + if __cuGraphExecEventRecordNodeSetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecEventRecordNodeSetEvent" not found') + err = ( __cuGraphExecEventRecordNodeSetEvent)(hGraphExec, hNode, event) + return err + +cdef CUresult _cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecEventWaitNodeSetEvent + cuPythonInit() + if __cuGraphExecEventWaitNodeSetEvent == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecEventWaitNodeSetEvent" not found') + err = ( __cuGraphExecEventWaitNodeSetEvent)(hGraphExec, hNode, event) + return err + +cdef CUresult _cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecExternalSemaphoresSignalNodeSetParams + cuPythonInit() + if __cuGraphExecExternalSemaphoresSignalNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecExternalSemaphoresSignalNodeSetParams" not found') + err = ( __cuGraphExecExternalSemaphoresSignalNodeSetParams)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecExternalSemaphoresWaitNodeSetParams + cuPythonInit() + if __cuGraphExecExternalSemaphoresWaitNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecExternalSemaphoresWaitNodeSetParams" not found') + err = ( __cuGraphExecExternalSemaphoresWaitNodeSetParams)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeSetEnabled + cuPythonInit() + if __cuGraphNodeSetEnabled == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeSetEnabled" not found') + err = ( __cuGraphNodeSetEnabled)(hGraphExec, hNode, isEnabled) + return err + +cdef CUresult _cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeGetEnabled + cuPythonInit() + if __cuGraphNodeGetEnabled == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeGetEnabled" not found') + err = ( __cuGraphNodeGetEnabled)(hGraphExec, hNode, isEnabled) + return err + +cdef CUresult _cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphUpload + cuPythonInit() + if __cuGraphUpload == NULL: + with gil: + raise RuntimeError('Function "cuGraphUpload" not found') + err = ( __cuGraphUpload)(hGraphExec, hStream) + return err + +cdef CUresult _cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphLaunch + cuPythonInit() + if __cuGraphLaunch == NULL: + with gil: + raise RuntimeError('Function "cuGraphLaunch" not found') + err = ( __cuGraphLaunch)(hGraphExec, hStream) + return err + +cdef CUresult _cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecDestroy + cuPythonInit() + if __cuGraphExecDestroy == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecDestroy" not found') + err = ( __cuGraphExecDestroy)(hGraphExec) + return err + +cdef CUresult _cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphDestroy + cuPythonInit() + if __cuGraphDestroy == NULL: + with gil: + raise RuntimeError('Function "cuGraphDestroy" not found') + err = ( __cuGraphDestroy)(hGraph) + return err + +cdef CUresult _cuGraphExecUpdate_v2(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecUpdate_v2 + cuPythonInit() + if __cuGraphExecUpdate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecUpdate_v2" not found') + err = ( __cuGraphExecUpdate_v2)(hGraphExec, hGraph, resultInfo) + return err + +cdef CUresult _cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphKernelNodeCopyAttributes + cuPythonInit() + if __cuGraphKernelNodeCopyAttributes == NULL: + with gil: + raise RuntimeError('Function "cuGraphKernelNodeCopyAttributes" not found') + err = ( __cuGraphKernelNodeCopyAttributes)(dst, src) + return err + +cdef CUresult _cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphKernelNodeGetAttribute + cuPythonInit() + if __cuGraphKernelNodeGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuGraphKernelNodeGetAttribute" not found') + err = ( __cuGraphKernelNodeGetAttribute)(hNode, attr, value_out) + return err + +cdef CUresult _cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphKernelNodeSetAttribute + cuPythonInit() + if __cuGraphKernelNodeSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuGraphKernelNodeSetAttribute" not found') + err = ( __cuGraphKernelNodeSetAttribute)(hNode, attr, value) + return err + +cdef CUresult _cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphDebugDotPrint + cuPythonInit() + if __cuGraphDebugDotPrint == NULL: + with gil: + raise RuntimeError('Function "cuGraphDebugDotPrint" not found') + err = ( __cuGraphDebugDotPrint)(hGraph, path, flags) + return err + +cdef CUresult _cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuUserObjectCreate + cuPythonInit() + if __cuUserObjectCreate == NULL: + with gil: + raise RuntimeError('Function "cuUserObjectCreate" not found') + err = ( __cuUserObjectCreate)(object_out, ptr, destroy, initialRefcount, flags) + return err + +cdef CUresult _cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuUserObjectRetain + cuPythonInit() + if __cuUserObjectRetain == NULL: + with gil: + raise RuntimeError('Function "cuUserObjectRetain" not found') + err = ( __cuUserObjectRetain)(object, count) + return err + +cdef CUresult _cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuUserObjectRelease + cuPythonInit() + if __cuUserObjectRelease == NULL: + with gil: + raise RuntimeError('Function "cuUserObjectRelease" not found') + err = ( __cuUserObjectRelease)(object, count) + return err + +cdef CUresult _cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphRetainUserObject + cuPythonInit() + if __cuGraphRetainUserObject == NULL: + with gil: + raise RuntimeError('Function "cuGraphRetainUserObject" not found') + err = ( __cuGraphRetainUserObject)(graph, object, count, flags) + return err + +cdef CUresult _cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphReleaseUserObject + cuPythonInit() + if __cuGraphReleaseUserObject == NULL: + with gil: + raise RuntimeError('Function "cuGraphReleaseUserObject" not found') + err = ( __cuGraphReleaseUserObject)(graph, object, count) + return err + +cdef CUresult _cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddNode + cuPythonInit() + if __cuGraphAddNode == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddNode" not found') + err = ( __cuGraphAddNode)(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddNode_v2 + cuPythonInit() + if __cuGraphAddNode_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphAddNode_v2" not found') + err = ( __cuGraphAddNode_v2)(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + return err + +cdef CUresult _cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeSetParams + cuPythonInit() + if __cuGraphNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphNodeSetParams" not found') + err = ( __cuGraphNodeSetParams)(hNode, nodeParams) + return err + +cdef CUresult _cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphExecNodeSetParams + cuPythonInit() + if __cuGraphExecNodeSetParams == NULL: + with gil: + raise RuntimeError('Function "cuGraphExecNodeSetParams" not found') + err = ( __cuGraphExecNodeSetParams)(hGraphExec, hNode, nodeParams) + return err + +cdef CUresult _cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphConditionalHandleCreate + cuPythonInit() + if __cuGraphConditionalHandleCreate == NULL: + with gil: + raise RuntimeError('Function "cuGraphConditionalHandleCreate" not found') + err = ( __cuGraphConditionalHandleCreate)(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + return err + +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxActiveBlocksPerMultiprocessor + cuPythonInit() + if __cuOccupancyMaxActiveBlocksPerMultiprocessor == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessor" not found') + err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessor)(numBlocks, func, blockSize, dynamicSMemSize) + return err + +cdef CUresult _cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + cuPythonInit() + if __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags" not found') + err = ( __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(numBlocks, func, blockSize, dynamicSMemSize, flags) + return err + +cdef CUresult _cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxPotentialBlockSize + cuPythonInit() + if __cuOccupancyMaxPotentialBlockSize == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSize" not found') + err = ( __cuOccupancyMaxPotentialBlockSize)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + return err + +cdef CUresult _cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxPotentialBlockSizeWithFlags + cuPythonInit() + if __cuOccupancyMaxPotentialBlockSizeWithFlags == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxPotentialBlockSizeWithFlags" not found') + err = ( __cuOccupancyMaxPotentialBlockSizeWithFlags)(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + return err + +cdef CUresult _cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyAvailableDynamicSMemPerBlock + cuPythonInit() + if __cuOccupancyAvailableDynamicSMemPerBlock == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyAvailableDynamicSMemPerBlock" not found') + err = ( __cuOccupancyAvailableDynamicSMemPerBlock)(dynamicSmemSize, func, numBlocks, blockSize) + return err + +cdef CUresult _cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxPotentialClusterSize + cuPythonInit() + if __cuOccupancyMaxPotentialClusterSize == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxPotentialClusterSize" not found') + err = ( __cuOccupancyMaxPotentialClusterSize)(clusterSize, func, config) + return err + +cdef CUresult _cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuOccupancyMaxActiveClusters + cuPythonInit() + if __cuOccupancyMaxActiveClusters == NULL: + with gil: + raise RuntimeError('Function "cuOccupancyMaxActiveClusters" not found') + err = ( __cuOccupancyMaxActiveClusters)(numClusters, func, config) + return err + +cdef CUresult _cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetArray + cuPythonInit() + if __cuTexRefSetArray == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetArray" not found') + err = ( __cuTexRefSetArray)(hTexRef, hArray, Flags) + return err + +cdef CUresult _cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetMipmappedArray + cuPythonInit() + if __cuTexRefSetMipmappedArray == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetMipmappedArray" not found') + err = ( __cuTexRefSetMipmappedArray)(hTexRef, hMipmappedArray, Flags) + return err + +cdef CUresult _cuTexRefSetAddress_v2(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetAddress_v2 + cuPythonInit() + if __cuTexRefSetAddress_v2 == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetAddress_v2" not found') + err = ( __cuTexRefSetAddress_v2)(ByteOffset, hTexRef, dptr, numbytes) + return err + +cdef CUresult _cuTexRefSetAddress2D_v3(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetAddress2D_v3 + cuPythonInit() + if __cuTexRefSetAddress2D_v3 == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetAddress2D_v3" not found') + err = ( __cuTexRefSetAddress2D_v3)(hTexRef, desc, dptr, Pitch) + return err + +cdef CUresult _cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetFormat + cuPythonInit() + if __cuTexRefSetFormat == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetFormat" not found') + err = ( __cuTexRefSetFormat)(hTexRef, fmt, NumPackedComponents) + return err + +cdef CUresult _cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetAddressMode + cuPythonInit() + if __cuTexRefSetAddressMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetAddressMode" not found') + err = ( __cuTexRefSetAddressMode)(hTexRef, dim, am) + return err + +cdef CUresult _cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetFilterMode + cuPythonInit() + if __cuTexRefSetFilterMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetFilterMode" not found') + err = ( __cuTexRefSetFilterMode)(hTexRef, fm) + return err + +cdef CUresult _cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetMipmapFilterMode + cuPythonInit() + if __cuTexRefSetMipmapFilterMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetMipmapFilterMode" not found') + err = ( __cuTexRefSetMipmapFilterMode)(hTexRef, fm) + return err + +cdef CUresult _cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetMipmapLevelBias + cuPythonInit() + if __cuTexRefSetMipmapLevelBias == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetMipmapLevelBias" not found') + err = ( __cuTexRefSetMipmapLevelBias)(hTexRef, bias) + return err + +cdef CUresult _cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetMipmapLevelClamp + cuPythonInit() + if __cuTexRefSetMipmapLevelClamp == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetMipmapLevelClamp" not found') + err = ( __cuTexRefSetMipmapLevelClamp)(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + return err + +cdef CUresult _cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetMaxAnisotropy + cuPythonInit() + if __cuTexRefSetMaxAnisotropy == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetMaxAnisotropy" not found') + err = ( __cuTexRefSetMaxAnisotropy)(hTexRef, maxAniso) + return err + +cdef CUresult _cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetBorderColor + cuPythonInit() + if __cuTexRefSetBorderColor == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetBorderColor" not found') + err = ( __cuTexRefSetBorderColor)(hTexRef, pBorderColor) + return err + +cdef CUresult _cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefSetFlags + cuPythonInit() + if __cuTexRefSetFlags == NULL: + with gil: + raise RuntimeError('Function "cuTexRefSetFlags" not found') + err = ( __cuTexRefSetFlags)(hTexRef, Flags) + return err + +cdef CUresult _cuTexRefGetAddress_v2(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetAddress_v2 + cuPythonInit() + if __cuTexRefGetAddress_v2 == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetAddress_v2" not found') + err = ( __cuTexRefGetAddress_v2)(pdptr, hTexRef) + return err + +cdef CUresult _cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetArray + cuPythonInit() + if __cuTexRefGetArray == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetArray" not found') + err = ( __cuTexRefGetArray)(phArray, hTexRef) + return err + +cdef CUresult _cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetMipmappedArray + cuPythonInit() + if __cuTexRefGetMipmappedArray == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetMipmappedArray" not found') + err = ( __cuTexRefGetMipmappedArray)(phMipmappedArray, hTexRef) + return err + +cdef CUresult _cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetAddressMode + cuPythonInit() + if __cuTexRefGetAddressMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetAddressMode" not found') + err = ( __cuTexRefGetAddressMode)(pam, hTexRef, dim) + return err + +cdef CUresult _cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetFilterMode + cuPythonInit() + if __cuTexRefGetFilterMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetFilterMode" not found') + err = ( __cuTexRefGetFilterMode)(pfm, hTexRef) + return err + +cdef CUresult _cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetFormat + cuPythonInit() + if __cuTexRefGetFormat == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetFormat" not found') + err = ( __cuTexRefGetFormat)(pFormat, pNumChannels, hTexRef) + return err + +cdef CUresult _cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetMipmapFilterMode + cuPythonInit() + if __cuTexRefGetMipmapFilterMode == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetMipmapFilterMode" not found') + err = ( __cuTexRefGetMipmapFilterMode)(pfm, hTexRef) + return err + +cdef CUresult _cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetMipmapLevelBias + cuPythonInit() + if __cuTexRefGetMipmapLevelBias == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetMipmapLevelBias" not found') + err = ( __cuTexRefGetMipmapLevelBias)(pbias, hTexRef) + return err + +cdef CUresult _cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetMipmapLevelClamp + cuPythonInit() + if __cuTexRefGetMipmapLevelClamp == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetMipmapLevelClamp" not found') + err = ( __cuTexRefGetMipmapLevelClamp)(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + return err + +cdef CUresult _cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetMaxAnisotropy + cuPythonInit() + if __cuTexRefGetMaxAnisotropy == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetMaxAnisotropy" not found') + err = ( __cuTexRefGetMaxAnisotropy)(pmaxAniso, hTexRef) + return err + +cdef CUresult _cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetBorderColor + cuPythonInit() + if __cuTexRefGetBorderColor == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetBorderColor" not found') + err = ( __cuTexRefGetBorderColor)(pBorderColor, hTexRef) + return err + +cdef CUresult _cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefGetFlags + cuPythonInit() + if __cuTexRefGetFlags == NULL: + with gil: + raise RuntimeError('Function "cuTexRefGetFlags" not found') + err = ( __cuTexRefGetFlags)(pFlags, hTexRef) + return err + +cdef CUresult _cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefCreate + cuPythonInit() + if __cuTexRefCreate == NULL: + with gil: + raise RuntimeError('Function "cuTexRefCreate" not found') + err = ( __cuTexRefCreate)(pTexRef) + return err + +cdef CUresult _cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexRefDestroy + cuPythonInit() + if __cuTexRefDestroy == NULL: + with gil: + raise RuntimeError('Function "cuTexRefDestroy" not found') + err = ( __cuTexRefDestroy)(hTexRef) + return err + +cdef CUresult _cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSurfRefSetArray + cuPythonInit() + if __cuSurfRefSetArray == NULL: + with gil: + raise RuntimeError('Function "cuSurfRefSetArray" not found') + err = ( __cuSurfRefSetArray)(hSurfRef, hArray, Flags) + return err + +cdef CUresult _cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSurfRefGetArray + cuPythonInit() + if __cuSurfRefGetArray == NULL: + with gil: + raise RuntimeError('Function "cuSurfRefGetArray" not found') + err = ( __cuSurfRefGetArray)(phArray, hSurfRef) + return err + +cdef CUresult _cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexObjectCreate + cuPythonInit() + if __cuTexObjectCreate == NULL: + with gil: + raise RuntimeError('Function "cuTexObjectCreate" not found') + err = ( __cuTexObjectCreate)(pTexObject, pResDesc, pTexDesc, pResViewDesc) + return err + +cdef CUresult _cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexObjectDestroy + cuPythonInit() + if __cuTexObjectDestroy == NULL: + with gil: + raise RuntimeError('Function "cuTexObjectDestroy" not found') + err = ( __cuTexObjectDestroy)(texObject) + return err + +cdef CUresult _cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexObjectGetResourceDesc + cuPythonInit() + if __cuTexObjectGetResourceDesc == NULL: + with gil: + raise RuntimeError('Function "cuTexObjectGetResourceDesc" not found') + err = ( __cuTexObjectGetResourceDesc)(pResDesc, texObject) + return err + +cdef CUresult _cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexObjectGetTextureDesc + cuPythonInit() + if __cuTexObjectGetTextureDesc == NULL: + with gil: + raise RuntimeError('Function "cuTexObjectGetTextureDesc" not found') + err = ( __cuTexObjectGetTextureDesc)(pTexDesc, texObject) + return err + +cdef CUresult _cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTexObjectGetResourceViewDesc + cuPythonInit() + if __cuTexObjectGetResourceViewDesc == NULL: + with gil: + raise RuntimeError('Function "cuTexObjectGetResourceViewDesc" not found') + err = ( __cuTexObjectGetResourceViewDesc)(pResViewDesc, texObject) + return err + +cdef CUresult _cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSurfObjectCreate + cuPythonInit() + if __cuSurfObjectCreate == NULL: + with gil: + raise RuntimeError('Function "cuSurfObjectCreate" not found') + err = ( __cuSurfObjectCreate)(pSurfObject, pResDesc) + return err + +cdef CUresult _cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSurfObjectDestroy + cuPythonInit() + if __cuSurfObjectDestroy == NULL: + with gil: + raise RuntimeError('Function "cuSurfObjectDestroy" not found') + err = ( __cuSurfObjectDestroy)(surfObject) + return err + +cdef CUresult _cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuSurfObjectGetResourceDesc + cuPythonInit() + if __cuSurfObjectGetResourceDesc == NULL: + with gil: + raise RuntimeError('Function "cuSurfObjectGetResourceDesc" not found') + err = ( __cuSurfObjectGetResourceDesc)(pResDesc, surfObject) + return err + +cdef CUresult _cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTensorMapEncodeTiled + cuPythonInit() + if __cuTensorMapEncodeTiled == NULL: + with gil: + raise RuntimeError('Function "cuTensorMapEncodeTiled" not found') + err = ( __cuTensorMapEncodeTiled)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + return err + +cdef CUresult _cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTensorMapEncodeIm2col + cuPythonInit() + if __cuTensorMapEncodeIm2col == NULL: + with gil: + raise RuntimeError('Function "cuTensorMapEncodeIm2col" not found') + err = ( __cuTensorMapEncodeIm2col)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + return err + +cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTensorMapEncodeIm2colWide + cuPythonInit() + if __cuTensorMapEncodeIm2colWide == NULL: + with gil: + raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + return err + +cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTensorMapReplaceAddress + cuPythonInit() + if __cuTensorMapReplaceAddress == NULL: + with gil: + raise RuntimeError('Function "cuTensorMapReplaceAddress" not found') + err = ( __cuTensorMapReplaceAddress)(tensorMap, globalAddress) + return err + +cdef CUresult _cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceCanAccessPeer + cuPythonInit() + if __cuDeviceCanAccessPeer == NULL: + with gil: + raise RuntimeError('Function "cuDeviceCanAccessPeer" not found') + err = ( __cuDeviceCanAccessPeer)(canAccessPeer, dev, peerDev) + return err + +cdef CUresult _cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxEnablePeerAccess + cuPythonInit() + if __cuCtxEnablePeerAccess == NULL: + with gil: + raise RuntimeError('Function "cuCtxEnablePeerAccess" not found') + err = ( __cuCtxEnablePeerAccess)(peerContext, Flags) + return err + +cdef CUresult _cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxDisablePeerAccess + cuPythonInit() + if __cuCtxDisablePeerAccess == NULL: + with gil: + raise RuntimeError('Function "cuCtxDisablePeerAccess" not found') + err = ( __cuCtxDisablePeerAccess)(peerContext) + return err + +cdef CUresult _cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetP2PAttribute + cuPythonInit() + if __cuDeviceGetP2PAttribute == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetP2PAttribute" not found') + err = ( __cuDeviceGetP2PAttribute)(value, attrib, srcDevice, dstDevice) + return err + +cdef CUresult _cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsUnregisterResource + cuPythonInit() + if __cuGraphicsUnregisterResource == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsUnregisterResource" not found') + err = ( __cuGraphicsUnregisterResource)(resource) + return err + +cdef CUresult _cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsSubResourceGetMappedArray + cuPythonInit() + if __cuGraphicsSubResourceGetMappedArray == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsSubResourceGetMappedArray" not found') + err = ( __cuGraphicsSubResourceGetMappedArray)(pArray, resource, arrayIndex, mipLevel) + return err + +cdef CUresult _cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsResourceGetMappedMipmappedArray + cuPythonInit() + if __cuGraphicsResourceGetMappedMipmappedArray == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsResourceGetMappedMipmappedArray" not found') + err = ( __cuGraphicsResourceGetMappedMipmappedArray)(pMipmappedArray, resource) + return err + +cdef CUresult _cuGraphicsResourceGetMappedPointer_v2(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsResourceGetMappedPointer_v2 + cuPythonInit() + if __cuGraphicsResourceGetMappedPointer_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsResourceGetMappedPointer_v2" not found') + err = ( __cuGraphicsResourceGetMappedPointer_v2)(pDevPtr, pSize, resource) + return err + +cdef CUresult _cuGraphicsResourceSetMapFlags_v2(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsResourceSetMapFlags_v2 + cuPythonInit() + if __cuGraphicsResourceSetMapFlags_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsResourceSetMapFlags_v2" not found') + err = ( __cuGraphicsResourceSetMapFlags_v2)(resource, flags) + return err + +cdef CUresult _cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsMapResources + cuPythonInit() + if __cuGraphicsMapResources == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsMapResources" not found') + err = ( __cuGraphicsMapResources)(count, resources, hStream) + return err + +cdef CUresult _cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsUnmapResources + cuPythonInit() + if __cuGraphicsUnmapResources == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsUnmapResources" not found') + err = ( __cuGraphicsUnmapResources)(count, resources, hStream) + return err + +cdef CUresult _cuGetProcAddress_v2(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGetProcAddress_v2 + cuPythonInit() + if __cuGetProcAddress_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGetProcAddress_v2" not found') + err = ( __cuGetProcAddress_v2)(symbol, pfn, cudaVersion, flags, symbolStatus) + return err + +cdef CUresult _cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCoredumpGetAttribute + cuPythonInit() + if __cuCoredumpGetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuCoredumpGetAttribute" not found') + err = ( __cuCoredumpGetAttribute)(attrib, value, size) + return err + +cdef CUresult _cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCoredumpGetAttributeGlobal + cuPythonInit() + if __cuCoredumpGetAttributeGlobal == NULL: + with gil: + raise RuntimeError('Function "cuCoredumpGetAttributeGlobal" not found') + err = ( __cuCoredumpGetAttributeGlobal)(attrib, value, size) + return err + +cdef CUresult _cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCoredumpSetAttribute + cuPythonInit() + if __cuCoredumpSetAttribute == NULL: + with gil: + raise RuntimeError('Function "cuCoredumpSetAttribute" not found') + err = ( __cuCoredumpSetAttribute)(attrib, value, size) + return err + +cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCoredumpSetAttributeGlobal + cuPythonInit() + if __cuCoredumpSetAttributeGlobal == NULL: + with gil: + raise RuntimeError('Function "cuCoredumpSetAttributeGlobal" not found') + err = ( __cuCoredumpSetAttributeGlobal)(attrib, value, size) + return err + +cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGetExportTable + cuPythonInit() + if __cuGetExportTable == NULL: + with gil: + raise RuntimeError('Function "cuGetExportTable" not found') + err = ( __cuGetExportTable)(ppExportTable, pExportTableId) + return err + +cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxCreate + cuPythonInit() + if __cuGreenCtxCreate == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxCreate" not found') + err = ( __cuGreenCtxCreate)(phCtx, desc, dev, flags) + return err + +cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxDestroy + cuPythonInit() + if __cuGreenCtxDestroy == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxDestroy" not found') + err = ( __cuGreenCtxDestroy)(hCtx) + return err + +cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxFromGreenCtx + cuPythonInit() + if __cuCtxFromGreenCtx == NULL: + with gil: + raise RuntimeError('Function "cuCtxFromGreenCtx" not found') + err = ( __cuCtxFromGreenCtx)(pContext, hCtx) + return err + +cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetDevResource + cuPythonInit() + if __cuDeviceGetDevResource == NULL: + with gil: + raise RuntimeError('Function "cuDeviceGetDevResource" not found') + err = ( __cuDeviceGetDevResource)(device, resource, typename) + return err + +cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCtxGetDevResource + cuPythonInit() + if __cuCtxGetDevResource == NULL: + with gil: + raise RuntimeError('Function "cuCtxGetDevResource" not found') + err = ( __cuCtxGetDevResource)(hCtx, resource, typename) + return err + +cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxGetDevResource + cuPythonInit() + if __cuGreenCtxGetDevResource == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxGetDevResource" not found') + err = ( __cuGreenCtxGetDevResource)(hCtx, resource, typename) + return err + +cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevSmResourceSplitByCount + cuPythonInit() + if __cuDevSmResourceSplitByCount == NULL: + with gil: + raise RuntimeError('Function "cuDevSmResourceSplitByCount" not found') + err = ( __cuDevSmResourceSplitByCount)(result, nbGroups, input, remaining, useFlags, minCount) + return err + +cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDevResourceGenerateDesc + cuPythonInit() + if __cuDevResourceGenerateDesc == NULL: + with gil: + raise RuntimeError('Function "cuDevResourceGenerateDesc" not found') + err = ( __cuDevResourceGenerateDesc)(phDesc, resources, nbResources) + return err + +cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxRecordEvent + cuPythonInit() + if __cuGreenCtxRecordEvent == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxRecordEvent" not found') + err = ( __cuGreenCtxRecordEvent)(hCtx, hEvent) + return err + +cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxWaitEvent + cuPythonInit() + if __cuGreenCtxWaitEvent == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxWaitEvent" not found') + err = ( __cuGreenCtxWaitEvent)(hCtx, hEvent) + return err + +cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetGreenCtx + cuPythonInit() + if __cuStreamGetGreenCtx == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetGreenCtx" not found') + err = ( __cuStreamGetGreenCtx)(hStream, phCtx) + return err + +cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGreenCtxStreamCreate + cuPythonInit() + if __cuGreenCtxStreamCreate == NULL: + with gil: + raise RuntimeError('Function "cuGreenCtxStreamCreate" not found') + err = ( __cuGreenCtxStreamCreate)(phStream, greenCtx, flags, priority) + return err + +cdef CUresult _cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLogsRegisterCallback + cuPythonInit() + if __cuLogsRegisterCallback == NULL: + with gil: + raise RuntimeError('Function "cuLogsRegisterCallback" not found') + err = ( __cuLogsRegisterCallback)(callbackFunc, userData, callback_out) + return err + +cdef CUresult _cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLogsUnregisterCallback + cuPythonInit() + if __cuLogsUnregisterCallback == NULL: + with gil: + raise RuntimeError('Function "cuLogsUnregisterCallback" not found') + err = ( __cuLogsUnregisterCallback)(callback) + return err + +cdef CUresult _cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLogsCurrent + cuPythonInit() + if __cuLogsCurrent == NULL: + with gil: + raise RuntimeError('Function "cuLogsCurrent" not found') + err = ( __cuLogsCurrent)(iterator_out, flags) + return err + +cdef CUresult _cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLogsDumpToFile + cuPythonInit() + if __cuLogsDumpToFile == NULL: + with gil: + raise RuntimeError('Function "cuLogsDumpToFile" not found') + err = ( __cuLogsDumpToFile)(iterator, pathToFile, flags) + return err + +cdef CUresult _cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuLogsDumpToMemory + cuPythonInit() + if __cuLogsDumpToMemory == NULL: + with gil: + raise RuntimeError('Function "cuLogsDumpToMemory" not found') + err = ( __cuLogsDumpToMemory)(iterator, buffer, size, flags) + return err + +cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessGetRestoreThreadId + cuPythonInit() + if __cuCheckpointProcessGetRestoreThreadId == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) + return err + +cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessGetState + cuPythonInit() + if __cuCheckpointProcessGetState == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + err = ( __cuCheckpointProcessGetState)(pid, state) + return err + +cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessLock + cuPythonInit() + if __cuCheckpointProcessLock == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessLock" not found') + err = ( __cuCheckpointProcessLock)(pid, args) + return err + +cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessCheckpoint + cuPythonInit() + if __cuCheckpointProcessCheckpoint == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + err = ( __cuCheckpointProcessCheckpoint)(pid, args) + return err + +cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessRestore + cuPythonInit() + if __cuCheckpointProcessRestore == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + err = ( __cuCheckpointProcessRestore)(pid, args) + return err + +cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessUnlock + cuPythonInit() + if __cuCheckpointProcessUnlock == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + err = ( __cuCheckpointProcessUnlock)(pid, args) + return err + +cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuProfilerStart + cuPythonInit() + if __cuProfilerStart == NULL: + with gil: + raise RuntimeError('Function "cuProfilerStart" not found') + err = ( __cuProfilerStart)() + return err + +cdef CUresult _cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuProfilerStop + cuPythonInit() + if __cuProfilerStop == NULL: + with gil: + raise RuntimeError('Function "cuProfilerStop" not found') + err = ( __cuProfilerStop)() + return err + +cdef CUresult _cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsEGLRegisterImage + cuPythonInit() + if __cuGraphicsEGLRegisterImage == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsEGLRegisterImage" not found') + err = ( __cuGraphicsEGLRegisterImage)(pCudaResource, image, flags) + return err + +cdef CUresult _cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamConsumerConnect + cuPythonInit() + if __cuEGLStreamConsumerConnect == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamConsumerConnect" not found') + err = ( __cuEGLStreamConsumerConnect)(conn, stream) + return err + +cdef CUresult _cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamConsumerConnectWithFlags + cuPythonInit() + if __cuEGLStreamConsumerConnectWithFlags == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamConsumerConnectWithFlags" not found') + err = ( __cuEGLStreamConsumerConnectWithFlags)(conn, stream, flags) + return err + +cdef CUresult _cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamConsumerDisconnect + cuPythonInit() + if __cuEGLStreamConsumerDisconnect == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamConsumerDisconnect" not found') + err = ( __cuEGLStreamConsumerDisconnect)(conn) + return err + +cdef CUresult _cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamConsumerAcquireFrame + cuPythonInit() + if __cuEGLStreamConsumerAcquireFrame == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamConsumerAcquireFrame" not found') + err = ( __cuEGLStreamConsumerAcquireFrame)(conn, pCudaResource, pStream, timeout) + return err + +cdef CUresult _cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamConsumerReleaseFrame + cuPythonInit() + if __cuEGLStreamConsumerReleaseFrame == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamConsumerReleaseFrame" not found') + err = ( __cuEGLStreamConsumerReleaseFrame)(conn, pCudaResource, pStream) + return err + +cdef CUresult _cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamProducerConnect + cuPythonInit() + if __cuEGLStreamProducerConnect == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamProducerConnect" not found') + err = ( __cuEGLStreamProducerConnect)(conn, stream, width, height) + return err + +cdef CUresult _cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamProducerDisconnect + cuPythonInit() + if __cuEGLStreamProducerDisconnect == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamProducerDisconnect" not found') + err = ( __cuEGLStreamProducerDisconnect)(conn) + return err + +cdef CUresult _cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamProducerPresentFrame + cuPythonInit() + if __cuEGLStreamProducerPresentFrame == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamProducerPresentFrame" not found') + err = ( __cuEGLStreamProducerPresentFrame)(conn, eglframe, pStream) + return err + +cdef CUresult _cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEGLStreamProducerReturnFrame + cuPythonInit() + if __cuEGLStreamProducerReturnFrame == NULL: + with gil: + raise RuntimeError('Function "cuEGLStreamProducerReturnFrame" not found') + err = ( __cuEGLStreamProducerReturnFrame)(conn, eglframe, pStream) + return err + +cdef CUresult _cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsResourceGetMappedEglFrame + cuPythonInit() + if __cuGraphicsResourceGetMappedEglFrame == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsResourceGetMappedEglFrame" not found') + err = ( __cuGraphicsResourceGetMappedEglFrame)(eglFrame, resource, index, mipLevel) + return err + +cdef CUresult _cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventCreateFromEGLSync + cuPythonInit() + if __cuEventCreateFromEGLSync == NULL: + with gil: + raise RuntimeError('Function "cuEventCreateFromEGLSync" not found') + err = ( __cuEventCreateFromEGLSync)(phEvent, eglSync, flags) + return err + +cdef CUresult _cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsGLRegisterBuffer + cuPythonInit() + if __cuGraphicsGLRegisterBuffer == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsGLRegisterBuffer" not found') + err = ( __cuGraphicsGLRegisterBuffer)(pCudaResource, buffer, Flags) + return err + +cdef CUresult _cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsGLRegisterImage + cuPythonInit() + if __cuGraphicsGLRegisterImage == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsGLRegisterImage" not found') + err = ( __cuGraphicsGLRegisterImage)(pCudaResource, image, target, Flags) + return err + +cdef CUresult _cuGLGetDevices_v2(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGLGetDevices_v2 + cuPythonInit() + if __cuGLGetDevices_v2 == NULL: + with gil: + raise RuntimeError('Function "cuGLGetDevices_v2" not found') + err = ( __cuGLGetDevices_v2)(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + return err + +cdef CUresult _cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuVDPAUGetDevice + cuPythonInit() + if __cuVDPAUGetDevice == NULL: + with gil: + raise RuntimeError('Function "cuVDPAUGetDevice" not found') + err = ( __cuVDPAUGetDevice)(pDevice, vdpDevice, vdpGetProcAddress) + return err + +cdef CUresult _cuVDPAUCtxCreate_v2(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuVDPAUCtxCreate_v2 + cuPythonInit() + if __cuVDPAUCtxCreate_v2 == NULL: + with gil: + raise RuntimeError('Function "cuVDPAUCtxCreate_v2" not found') + err = ( __cuVDPAUCtxCreate_v2)(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + return err + +cdef CUresult _cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsVDPAURegisterVideoSurface + cuPythonInit() + if __cuGraphicsVDPAURegisterVideoSurface == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsVDPAURegisterVideoSurface" not found') + err = ( __cuGraphicsVDPAURegisterVideoSurface)(pCudaResource, vdpSurface, flags) + return err + +cdef CUresult _cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphicsVDPAURegisterOutputSurface + cuPythonInit() + if __cuGraphicsVDPAURegisterOutputSurface == NULL: + with gil: + raise RuntimeError('Function "cuGraphicsVDPAURegisterOutputSurface" not found') + err = ( __cuGraphicsVDPAURegisterOutputSurface)(pCudaResource, vdpSurface, flags) + return err + +cdef dict func_ptrs = None + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + cuPythonInit() + cdef dict data = {} + + global __cuGetErrorString + data["__cuGetErrorString"] = __cuGetErrorString + global __cuGetErrorName + data["__cuGetErrorName"] = __cuGetErrorName + global __cuInit + data["__cuInit"] = __cuInit + global __cuDriverGetVersion + data["__cuDriverGetVersion"] = __cuDriverGetVersion + global __cuDeviceGet + data["__cuDeviceGet"] = __cuDeviceGet + global __cuDeviceGetCount + data["__cuDeviceGetCount"] = __cuDeviceGetCount + global __cuDeviceGetName + data["__cuDeviceGetName"] = __cuDeviceGetName + global __cuDeviceGetUuid + data["__cuDeviceGetUuid"] = __cuDeviceGetUuid + global __cuDeviceGetUuid_v2 + data["__cuDeviceGetUuid_v2"] = __cuDeviceGetUuid_v2 + global __cuDeviceGetLuid + data["__cuDeviceGetLuid"] = __cuDeviceGetLuid + global __cuDeviceTotalMem_v2 + data["__cuDeviceTotalMem_v2"] = __cuDeviceTotalMem_v2 + global __cuDeviceGetTexture1DLinearMaxWidth + data["__cuDeviceGetTexture1DLinearMaxWidth"] = __cuDeviceGetTexture1DLinearMaxWidth + global __cuDeviceGetAttribute + data["__cuDeviceGetAttribute"] = __cuDeviceGetAttribute + global __cuDeviceGetNvSciSyncAttributes + data["__cuDeviceGetNvSciSyncAttributes"] = __cuDeviceGetNvSciSyncAttributes + global __cuDeviceSetMemPool + data["__cuDeviceSetMemPool"] = __cuDeviceSetMemPool + global __cuDeviceGetMemPool + data["__cuDeviceGetMemPool"] = __cuDeviceGetMemPool + global __cuDeviceGetDefaultMemPool + data["__cuDeviceGetDefaultMemPool"] = __cuDeviceGetDefaultMemPool + global __cuDeviceGetExecAffinitySupport + data["__cuDeviceGetExecAffinitySupport"] = __cuDeviceGetExecAffinitySupport + global __cuFlushGPUDirectRDMAWrites + data["__cuFlushGPUDirectRDMAWrites"] = __cuFlushGPUDirectRDMAWrites + global __cuDeviceGetProperties + data["__cuDeviceGetProperties"] = __cuDeviceGetProperties + global __cuDeviceComputeCapability + data["__cuDeviceComputeCapability"] = __cuDeviceComputeCapability + global __cuDevicePrimaryCtxRetain + data["__cuDevicePrimaryCtxRetain"] = __cuDevicePrimaryCtxRetain + global __cuDevicePrimaryCtxRelease_v2 + data["__cuDevicePrimaryCtxRelease_v2"] = __cuDevicePrimaryCtxRelease_v2 + global __cuDevicePrimaryCtxSetFlags_v2 + data["__cuDevicePrimaryCtxSetFlags_v2"] = __cuDevicePrimaryCtxSetFlags_v2 + global __cuDevicePrimaryCtxGetState + data["__cuDevicePrimaryCtxGetState"] = __cuDevicePrimaryCtxGetState + global __cuDevicePrimaryCtxReset_v2 + data["__cuDevicePrimaryCtxReset_v2"] = __cuDevicePrimaryCtxReset_v2 + global __cuCtxCreate_v2 + data["__cuCtxCreate_v2"] = __cuCtxCreate_v2 + global __cuCtxCreate_v3 + data["__cuCtxCreate_v3"] = __cuCtxCreate_v3 + global __cuCtxCreate_v4 + data["__cuCtxCreate_v4"] = __cuCtxCreate_v4 + global __cuCtxDestroy_v2 + data["__cuCtxDestroy_v2"] = __cuCtxDestroy_v2 + global __cuCtxPushCurrent_v2 + data["__cuCtxPushCurrent_v2"] = __cuCtxPushCurrent_v2 + global __cuCtxPopCurrent_v2 + data["__cuCtxPopCurrent_v2"] = __cuCtxPopCurrent_v2 + global __cuCtxSetCurrent + data["__cuCtxSetCurrent"] = __cuCtxSetCurrent + global __cuCtxGetCurrent + data["__cuCtxGetCurrent"] = __cuCtxGetCurrent + global __cuCtxGetDevice + data["__cuCtxGetDevice"] = __cuCtxGetDevice + global __cuCtxGetFlags + data["__cuCtxGetFlags"] = __cuCtxGetFlags + global __cuCtxSetFlags + data["__cuCtxSetFlags"] = __cuCtxSetFlags + global __cuCtxGetId + data["__cuCtxGetId"] = __cuCtxGetId + global __cuCtxSynchronize + data["__cuCtxSynchronize"] = __cuCtxSynchronize + global __cuCtxSetLimit + data["__cuCtxSetLimit"] = __cuCtxSetLimit + global __cuCtxGetLimit + data["__cuCtxGetLimit"] = __cuCtxGetLimit + global __cuCtxGetCacheConfig + data["__cuCtxGetCacheConfig"] = __cuCtxGetCacheConfig + global __cuCtxSetCacheConfig + data["__cuCtxSetCacheConfig"] = __cuCtxSetCacheConfig + global __cuCtxGetApiVersion + data["__cuCtxGetApiVersion"] = __cuCtxGetApiVersion + global __cuCtxGetStreamPriorityRange + data["__cuCtxGetStreamPriorityRange"] = __cuCtxGetStreamPriorityRange + global __cuCtxResetPersistingL2Cache + data["__cuCtxResetPersistingL2Cache"] = __cuCtxResetPersistingL2Cache + global __cuCtxGetExecAffinity + data["__cuCtxGetExecAffinity"] = __cuCtxGetExecAffinity + global __cuCtxRecordEvent + data["__cuCtxRecordEvent"] = __cuCtxRecordEvent + global __cuCtxWaitEvent + data["__cuCtxWaitEvent"] = __cuCtxWaitEvent + global __cuCtxAttach + data["__cuCtxAttach"] = __cuCtxAttach + global __cuCtxDetach + data["__cuCtxDetach"] = __cuCtxDetach + global __cuCtxGetSharedMemConfig + data["__cuCtxGetSharedMemConfig"] = __cuCtxGetSharedMemConfig + global __cuCtxSetSharedMemConfig + data["__cuCtxSetSharedMemConfig"] = __cuCtxSetSharedMemConfig + global __cuModuleLoad + data["__cuModuleLoad"] = __cuModuleLoad + global __cuModuleLoadData + data["__cuModuleLoadData"] = __cuModuleLoadData + global __cuModuleLoadDataEx + data["__cuModuleLoadDataEx"] = __cuModuleLoadDataEx + global __cuModuleLoadFatBinary + data["__cuModuleLoadFatBinary"] = __cuModuleLoadFatBinary + global __cuModuleUnload + data["__cuModuleUnload"] = __cuModuleUnload + global __cuModuleGetLoadingMode + data["__cuModuleGetLoadingMode"] = __cuModuleGetLoadingMode + global __cuModuleGetFunction + data["__cuModuleGetFunction"] = __cuModuleGetFunction + global __cuModuleGetFunctionCount + data["__cuModuleGetFunctionCount"] = __cuModuleGetFunctionCount + global __cuModuleEnumerateFunctions + data["__cuModuleEnumerateFunctions"] = __cuModuleEnumerateFunctions + global __cuModuleGetGlobal_v2 + data["__cuModuleGetGlobal_v2"] = __cuModuleGetGlobal_v2 + global __cuLinkCreate_v2 + data["__cuLinkCreate_v2"] = __cuLinkCreate_v2 + global __cuLinkAddData_v2 + data["__cuLinkAddData_v2"] = __cuLinkAddData_v2 + global __cuLinkAddFile_v2 + data["__cuLinkAddFile_v2"] = __cuLinkAddFile_v2 + global __cuLinkComplete + data["__cuLinkComplete"] = __cuLinkComplete + global __cuLinkDestroy + data["__cuLinkDestroy"] = __cuLinkDestroy + global __cuModuleGetTexRef + data["__cuModuleGetTexRef"] = __cuModuleGetTexRef + global __cuModuleGetSurfRef + data["__cuModuleGetSurfRef"] = __cuModuleGetSurfRef + global __cuLibraryLoadData + data["__cuLibraryLoadData"] = __cuLibraryLoadData + global __cuLibraryLoadFromFile + data["__cuLibraryLoadFromFile"] = __cuLibraryLoadFromFile + global __cuLibraryUnload + data["__cuLibraryUnload"] = __cuLibraryUnload + global __cuLibraryGetKernel + data["__cuLibraryGetKernel"] = __cuLibraryGetKernel + global __cuLibraryGetKernelCount + data["__cuLibraryGetKernelCount"] = __cuLibraryGetKernelCount + global __cuLibraryEnumerateKernels + data["__cuLibraryEnumerateKernels"] = __cuLibraryEnumerateKernels + global __cuLibraryGetModule + data["__cuLibraryGetModule"] = __cuLibraryGetModule + global __cuKernelGetFunction + data["__cuKernelGetFunction"] = __cuKernelGetFunction + global __cuKernelGetLibrary + data["__cuKernelGetLibrary"] = __cuKernelGetLibrary + global __cuLibraryGetGlobal + data["__cuLibraryGetGlobal"] = __cuLibraryGetGlobal + global __cuLibraryGetManaged + data["__cuLibraryGetManaged"] = __cuLibraryGetManaged + global __cuLibraryGetUnifiedFunction + data["__cuLibraryGetUnifiedFunction"] = __cuLibraryGetUnifiedFunction + global __cuKernelGetAttribute + data["__cuKernelGetAttribute"] = __cuKernelGetAttribute + global __cuKernelSetAttribute + data["__cuKernelSetAttribute"] = __cuKernelSetAttribute + global __cuKernelSetCacheConfig + data["__cuKernelSetCacheConfig"] = __cuKernelSetCacheConfig + global __cuKernelGetName + data["__cuKernelGetName"] = __cuKernelGetName + global __cuKernelGetParamInfo + data["__cuKernelGetParamInfo"] = __cuKernelGetParamInfo + global __cuMemGetInfo_v2 + data["__cuMemGetInfo_v2"] = __cuMemGetInfo_v2 + global __cuMemAlloc_v2 + data["__cuMemAlloc_v2"] = __cuMemAlloc_v2 + global __cuMemAllocPitch_v2 + data["__cuMemAllocPitch_v2"] = __cuMemAllocPitch_v2 + global __cuMemFree_v2 + data["__cuMemFree_v2"] = __cuMemFree_v2 + global __cuMemGetAddressRange_v2 + data["__cuMemGetAddressRange_v2"] = __cuMemGetAddressRange_v2 + global __cuMemAllocHost_v2 + data["__cuMemAllocHost_v2"] = __cuMemAllocHost_v2 + global __cuMemFreeHost + data["__cuMemFreeHost"] = __cuMemFreeHost + global __cuMemHostAlloc + data["__cuMemHostAlloc"] = __cuMemHostAlloc + global __cuMemHostGetDevicePointer_v2 + data["__cuMemHostGetDevicePointer_v2"] = __cuMemHostGetDevicePointer_v2 + global __cuMemHostGetFlags + data["__cuMemHostGetFlags"] = __cuMemHostGetFlags + global __cuMemAllocManaged + data["__cuMemAllocManaged"] = __cuMemAllocManaged + global __cuDeviceRegisterAsyncNotification + data["__cuDeviceRegisterAsyncNotification"] = __cuDeviceRegisterAsyncNotification + global __cuDeviceUnregisterAsyncNotification + data["__cuDeviceUnregisterAsyncNotification"] = __cuDeviceUnregisterAsyncNotification + global __cuDeviceGetByPCIBusId + data["__cuDeviceGetByPCIBusId"] = __cuDeviceGetByPCIBusId + global __cuDeviceGetPCIBusId + data["__cuDeviceGetPCIBusId"] = __cuDeviceGetPCIBusId + global __cuIpcGetEventHandle + data["__cuIpcGetEventHandle"] = __cuIpcGetEventHandle + global __cuIpcOpenEventHandle + data["__cuIpcOpenEventHandle"] = __cuIpcOpenEventHandle + global __cuIpcGetMemHandle + data["__cuIpcGetMemHandle"] = __cuIpcGetMemHandle + global __cuIpcOpenMemHandle_v2 + data["__cuIpcOpenMemHandle_v2"] = __cuIpcOpenMemHandle_v2 + global __cuIpcCloseMemHandle + data["__cuIpcCloseMemHandle"] = __cuIpcCloseMemHandle + global __cuMemHostRegister_v2 + data["__cuMemHostRegister_v2"] = __cuMemHostRegister_v2 + global __cuMemHostUnregister + data["__cuMemHostUnregister"] = __cuMemHostUnregister + global __cuMemcpy + data["__cuMemcpy"] = __cuMemcpy + global __cuMemcpyPeer + data["__cuMemcpyPeer"] = __cuMemcpyPeer + global __cuMemcpyHtoD_v2 + data["__cuMemcpyHtoD_v2"] = __cuMemcpyHtoD_v2 + global __cuMemcpyDtoH_v2 + data["__cuMemcpyDtoH_v2"] = __cuMemcpyDtoH_v2 + global __cuMemcpyDtoD_v2 + data["__cuMemcpyDtoD_v2"] = __cuMemcpyDtoD_v2 + global __cuMemcpyDtoA_v2 + data["__cuMemcpyDtoA_v2"] = __cuMemcpyDtoA_v2 + global __cuMemcpyAtoD_v2 + data["__cuMemcpyAtoD_v2"] = __cuMemcpyAtoD_v2 + global __cuMemcpyHtoA_v2 + data["__cuMemcpyHtoA_v2"] = __cuMemcpyHtoA_v2 + global __cuMemcpyAtoH_v2 + data["__cuMemcpyAtoH_v2"] = __cuMemcpyAtoH_v2 + global __cuMemcpyAtoA_v2 + data["__cuMemcpyAtoA_v2"] = __cuMemcpyAtoA_v2 + global __cuMemcpy2D_v2 + data["__cuMemcpy2D_v2"] = __cuMemcpy2D_v2 + global __cuMemcpy2DUnaligned_v2 + data["__cuMemcpy2DUnaligned_v2"] = __cuMemcpy2DUnaligned_v2 + global __cuMemcpy3D_v2 + data["__cuMemcpy3D_v2"] = __cuMemcpy3D_v2 + global __cuMemcpy3DPeer + data["__cuMemcpy3DPeer"] = __cuMemcpy3DPeer + global __cuMemcpyAsync + data["__cuMemcpyAsync"] = __cuMemcpyAsync + global __cuMemcpyPeerAsync + data["__cuMemcpyPeerAsync"] = __cuMemcpyPeerAsync + global __cuMemcpyHtoDAsync_v2 + data["__cuMemcpyHtoDAsync_v2"] = __cuMemcpyHtoDAsync_v2 + global __cuMemcpyDtoHAsync_v2 + data["__cuMemcpyDtoHAsync_v2"] = __cuMemcpyDtoHAsync_v2 + global __cuMemcpyDtoDAsync_v2 + data["__cuMemcpyDtoDAsync_v2"] = __cuMemcpyDtoDAsync_v2 + global __cuMemcpyHtoAAsync_v2 + data["__cuMemcpyHtoAAsync_v2"] = __cuMemcpyHtoAAsync_v2 + global __cuMemcpyAtoHAsync_v2 + data["__cuMemcpyAtoHAsync_v2"] = __cuMemcpyAtoHAsync_v2 + global __cuMemcpy2DAsync_v2 + data["__cuMemcpy2DAsync_v2"] = __cuMemcpy2DAsync_v2 + global __cuMemcpy3DAsync_v2 + data["__cuMemcpy3DAsync_v2"] = __cuMemcpy3DAsync_v2 + global __cuMemcpy3DPeerAsync + data["__cuMemcpy3DPeerAsync"] = __cuMemcpy3DPeerAsync + global __cuMemcpyBatchAsync + data["__cuMemcpyBatchAsync"] = __cuMemcpyBatchAsync + global __cuMemcpy3DBatchAsync + data["__cuMemcpy3DBatchAsync"] = __cuMemcpy3DBatchAsync + global __cuMemsetD8_v2 + data["__cuMemsetD8_v2"] = __cuMemsetD8_v2 + global __cuMemsetD16_v2 + data["__cuMemsetD16_v2"] = __cuMemsetD16_v2 + global __cuMemsetD32_v2 + data["__cuMemsetD32_v2"] = __cuMemsetD32_v2 + global __cuMemsetD2D8_v2 + data["__cuMemsetD2D8_v2"] = __cuMemsetD2D8_v2 + global __cuMemsetD2D16_v2 + data["__cuMemsetD2D16_v2"] = __cuMemsetD2D16_v2 + global __cuMemsetD2D32_v2 + data["__cuMemsetD2D32_v2"] = __cuMemsetD2D32_v2 + global __cuMemsetD8Async + data["__cuMemsetD8Async"] = __cuMemsetD8Async + global __cuMemsetD16Async + data["__cuMemsetD16Async"] = __cuMemsetD16Async + global __cuMemsetD32Async + data["__cuMemsetD32Async"] = __cuMemsetD32Async + global __cuMemsetD2D8Async + data["__cuMemsetD2D8Async"] = __cuMemsetD2D8Async + global __cuMemsetD2D16Async + data["__cuMemsetD2D16Async"] = __cuMemsetD2D16Async + global __cuMemsetD2D32Async + data["__cuMemsetD2D32Async"] = __cuMemsetD2D32Async + global __cuArrayCreate_v2 + data["__cuArrayCreate_v2"] = __cuArrayCreate_v2 + global __cuArrayGetDescriptor_v2 + data["__cuArrayGetDescriptor_v2"] = __cuArrayGetDescriptor_v2 + global __cuArrayGetSparseProperties + data["__cuArrayGetSparseProperties"] = __cuArrayGetSparseProperties + global __cuMipmappedArrayGetSparseProperties + data["__cuMipmappedArrayGetSparseProperties"] = __cuMipmappedArrayGetSparseProperties + global __cuArrayGetMemoryRequirements + data["__cuArrayGetMemoryRequirements"] = __cuArrayGetMemoryRequirements + global __cuMipmappedArrayGetMemoryRequirements + data["__cuMipmappedArrayGetMemoryRequirements"] = __cuMipmappedArrayGetMemoryRequirements + global __cuArrayGetPlane + data["__cuArrayGetPlane"] = __cuArrayGetPlane + global __cuArrayDestroy + data["__cuArrayDestroy"] = __cuArrayDestroy + global __cuArray3DCreate_v2 + data["__cuArray3DCreate_v2"] = __cuArray3DCreate_v2 + global __cuArray3DGetDescriptor_v2 + data["__cuArray3DGetDescriptor_v2"] = __cuArray3DGetDescriptor_v2 + global __cuMipmappedArrayCreate + data["__cuMipmappedArrayCreate"] = __cuMipmappedArrayCreate + global __cuMipmappedArrayGetLevel + data["__cuMipmappedArrayGetLevel"] = __cuMipmappedArrayGetLevel + global __cuMipmappedArrayDestroy + data["__cuMipmappedArrayDestroy"] = __cuMipmappedArrayDestroy + global __cuMemGetHandleForAddressRange + data["__cuMemGetHandleForAddressRange"] = __cuMemGetHandleForAddressRange + global __cuMemBatchDecompressAsync + data["__cuMemBatchDecompressAsync"] = __cuMemBatchDecompressAsync + global __cuMemAddressReserve + data["__cuMemAddressReserve"] = __cuMemAddressReserve + global __cuMemAddressFree + data["__cuMemAddressFree"] = __cuMemAddressFree + global __cuMemCreate + data["__cuMemCreate"] = __cuMemCreate + global __cuMemRelease + data["__cuMemRelease"] = __cuMemRelease + global __cuMemMap + data["__cuMemMap"] = __cuMemMap + global __cuMemMapArrayAsync + data["__cuMemMapArrayAsync"] = __cuMemMapArrayAsync + global __cuMemUnmap + data["__cuMemUnmap"] = __cuMemUnmap + global __cuMemSetAccess + data["__cuMemSetAccess"] = __cuMemSetAccess + global __cuMemGetAccess + data["__cuMemGetAccess"] = __cuMemGetAccess + global __cuMemExportToShareableHandle + data["__cuMemExportToShareableHandle"] = __cuMemExportToShareableHandle + global __cuMemImportFromShareableHandle + data["__cuMemImportFromShareableHandle"] = __cuMemImportFromShareableHandle + global __cuMemGetAllocationGranularity + data["__cuMemGetAllocationGranularity"] = __cuMemGetAllocationGranularity + global __cuMemGetAllocationPropertiesFromHandle + data["__cuMemGetAllocationPropertiesFromHandle"] = __cuMemGetAllocationPropertiesFromHandle + global __cuMemRetainAllocationHandle + data["__cuMemRetainAllocationHandle"] = __cuMemRetainAllocationHandle + global __cuMemFreeAsync + data["__cuMemFreeAsync"] = __cuMemFreeAsync + global __cuMemAllocAsync + data["__cuMemAllocAsync"] = __cuMemAllocAsync + global __cuMemPoolTrimTo + data["__cuMemPoolTrimTo"] = __cuMemPoolTrimTo + global __cuMemPoolSetAttribute + data["__cuMemPoolSetAttribute"] = __cuMemPoolSetAttribute + global __cuMemPoolGetAttribute + data["__cuMemPoolGetAttribute"] = __cuMemPoolGetAttribute + global __cuMemPoolSetAccess + data["__cuMemPoolSetAccess"] = __cuMemPoolSetAccess + global __cuMemPoolGetAccess + data["__cuMemPoolGetAccess"] = __cuMemPoolGetAccess + global __cuMemPoolCreate + data["__cuMemPoolCreate"] = __cuMemPoolCreate + global __cuMemPoolDestroy + data["__cuMemPoolDestroy"] = __cuMemPoolDestroy + global __cuMemAllocFromPoolAsync + data["__cuMemAllocFromPoolAsync"] = __cuMemAllocFromPoolAsync + global __cuMemPoolExportToShareableHandle + data["__cuMemPoolExportToShareableHandle"] = __cuMemPoolExportToShareableHandle + global __cuMemPoolImportFromShareableHandle + data["__cuMemPoolImportFromShareableHandle"] = __cuMemPoolImportFromShareableHandle + global __cuMemPoolExportPointer + data["__cuMemPoolExportPointer"] = __cuMemPoolExportPointer + global __cuMemPoolImportPointer + data["__cuMemPoolImportPointer"] = __cuMemPoolImportPointer + global __cuMulticastCreate + data["__cuMulticastCreate"] = __cuMulticastCreate + global __cuMulticastAddDevice + data["__cuMulticastAddDevice"] = __cuMulticastAddDevice + global __cuMulticastBindMem + data["__cuMulticastBindMem"] = __cuMulticastBindMem + global __cuMulticastBindAddr + data["__cuMulticastBindAddr"] = __cuMulticastBindAddr + global __cuMulticastUnbind + data["__cuMulticastUnbind"] = __cuMulticastUnbind + global __cuMulticastGetGranularity + data["__cuMulticastGetGranularity"] = __cuMulticastGetGranularity + global __cuPointerGetAttribute + data["__cuPointerGetAttribute"] = __cuPointerGetAttribute + global __cuMemPrefetchAsync + data["__cuMemPrefetchAsync"] = __cuMemPrefetchAsync + global __cuMemPrefetchAsync_v2 + data["__cuMemPrefetchAsync_v2"] = __cuMemPrefetchAsync_v2 + global __cuMemAdvise + data["__cuMemAdvise"] = __cuMemAdvise + global __cuMemAdvise_v2 + data["__cuMemAdvise_v2"] = __cuMemAdvise_v2 + global __cuMemRangeGetAttribute + data["__cuMemRangeGetAttribute"] = __cuMemRangeGetAttribute + global __cuMemRangeGetAttributes + data["__cuMemRangeGetAttributes"] = __cuMemRangeGetAttributes + global __cuPointerSetAttribute + data["__cuPointerSetAttribute"] = __cuPointerSetAttribute + global __cuPointerGetAttributes + data["__cuPointerGetAttributes"] = __cuPointerGetAttributes + global __cuStreamCreate + data["__cuStreamCreate"] = __cuStreamCreate + global __cuStreamCreateWithPriority + data["__cuStreamCreateWithPriority"] = __cuStreamCreateWithPriority + global __cuStreamGetPriority + data["__cuStreamGetPriority"] = __cuStreamGetPriority + global __cuStreamGetDevice + data["__cuStreamGetDevice"] = __cuStreamGetDevice + global __cuStreamGetFlags + data["__cuStreamGetFlags"] = __cuStreamGetFlags + global __cuStreamGetId + data["__cuStreamGetId"] = __cuStreamGetId + global __cuStreamGetCtx + data["__cuStreamGetCtx"] = __cuStreamGetCtx + global __cuStreamGetCtx_v2 + data["__cuStreamGetCtx_v2"] = __cuStreamGetCtx_v2 + global __cuStreamWaitEvent + data["__cuStreamWaitEvent"] = __cuStreamWaitEvent + global __cuStreamAddCallback + data["__cuStreamAddCallback"] = __cuStreamAddCallback + global __cuStreamBeginCapture_v2 + data["__cuStreamBeginCapture_v2"] = __cuStreamBeginCapture_v2 + global __cuStreamBeginCaptureToGraph + data["__cuStreamBeginCaptureToGraph"] = __cuStreamBeginCaptureToGraph + global __cuThreadExchangeStreamCaptureMode + data["__cuThreadExchangeStreamCaptureMode"] = __cuThreadExchangeStreamCaptureMode + global __cuStreamEndCapture + data["__cuStreamEndCapture"] = __cuStreamEndCapture + global __cuStreamIsCapturing + data["__cuStreamIsCapturing"] = __cuStreamIsCapturing + global __cuStreamGetCaptureInfo_v2 + data["__cuStreamGetCaptureInfo_v2"] = __cuStreamGetCaptureInfo_v2 + global __cuStreamGetCaptureInfo_v3 + data["__cuStreamGetCaptureInfo_v3"] = __cuStreamGetCaptureInfo_v3 + global __cuStreamUpdateCaptureDependencies + data["__cuStreamUpdateCaptureDependencies"] = __cuStreamUpdateCaptureDependencies + global __cuStreamUpdateCaptureDependencies_v2 + data["__cuStreamUpdateCaptureDependencies_v2"] = __cuStreamUpdateCaptureDependencies_v2 + global __cuStreamAttachMemAsync + data["__cuStreamAttachMemAsync"] = __cuStreamAttachMemAsync + global __cuStreamQuery + data["__cuStreamQuery"] = __cuStreamQuery + global __cuStreamSynchronize + data["__cuStreamSynchronize"] = __cuStreamSynchronize + global __cuStreamDestroy_v2 + data["__cuStreamDestroy_v2"] = __cuStreamDestroy_v2 + global __cuStreamCopyAttributes + data["__cuStreamCopyAttributes"] = __cuStreamCopyAttributes + global __cuStreamGetAttribute + data["__cuStreamGetAttribute"] = __cuStreamGetAttribute + global __cuStreamSetAttribute + data["__cuStreamSetAttribute"] = __cuStreamSetAttribute + global __cuEventCreate + data["__cuEventCreate"] = __cuEventCreate + global __cuEventRecord + data["__cuEventRecord"] = __cuEventRecord + global __cuEventRecordWithFlags + data["__cuEventRecordWithFlags"] = __cuEventRecordWithFlags + global __cuEventQuery + data["__cuEventQuery"] = __cuEventQuery + global __cuEventSynchronize + data["__cuEventSynchronize"] = __cuEventSynchronize + global __cuEventDestroy_v2 + data["__cuEventDestroy_v2"] = __cuEventDestroy_v2 + global __cuEventElapsedTime + data["__cuEventElapsedTime"] = __cuEventElapsedTime + global __cuEventElapsedTime_v2 + data["__cuEventElapsedTime_v2"] = __cuEventElapsedTime_v2 + global __cuImportExternalMemory + data["__cuImportExternalMemory"] = __cuImportExternalMemory + global __cuExternalMemoryGetMappedBuffer + data["__cuExternalMemoryGetMappedBuffer"] = __cuExternalMemoryGetMappedBuffer + global __cuExternalMemoryGetMappedMipmappedArray + data["__cuExternalMemoryGetMappedMipmappedArray"] = __cuExternalMemoryGetMappedMipmappedArray + global __cuDestroyExternalMemory + data["__cuDestroyExternalMemory"] = __cuDestroyExternalMemory + global __cuImportExternalSemaphore + data["__cuImportExternalSemaphore"] = __cuImportExternalSemaphore + global __cuSignalExternalSemaphoresAsync + data["__cuSignalExternalSemaphoresAsync"] = __cuSignalExternalSemaphoresAsync + global __cuWaitExternalSemaphoresAsync + data["__cuWaitExternalSemaphoresAsync"] = __cuWaitExternalSemaphoresAsync + global __cuDestroyExternalSemaphore + data["__cuDestroyExternalSemaphore"] = __cuDestroyExternalSemaphore + global __cuStreamWaitValue32_v2 + data["__cuStreamWaitValue32_v2"] = __cuStreamWaitValue32_v2 + global __cuStreamWaitValue64_v2 + data["__cuStreamWaitValue64_v2"] = __cuStreamWaitValue64_v2 + global __cuStreamWriteValue32_v2 + data["__cuStreamWriteValue32_v2"] = __cuStreamWriteValue32_v2 + global __cuStreamWriteValue64_v2 + data["__cuStreamWriteValue64_v2"] = __cuStreamWriteValue64_v2 + global __cuStreamBatchMemOp_v2 + data["__cuStreamBatchMemOp_v2"] = __cuStreamBatchMemOp_v2 + global __cuFuncGetAttribute + data["__cuFuncGetAttribute"] = __cuFuncGetAttribute + global __cuFuncSetAttribute + data["__cuFuncSetAttribute"] = __cuFuncSetAttribute + global __cuFuncSetCacheConfig + data["__cuFuncSetCacheConfig"] = __cuFuncSetCacheConfig + global __cuFuncGetModule + data["__cuFuncGetModule"] = __cuFuncGetModule + global __cuFuncGetName + data["__cuFuncGetName"] = __cuFuncGetName + global __cuFuncGetParamInfo + data["__cuFuncGetParamInfo"] = __cuFuncGetParamInfo + global __cuFuncIsLoaded + data["__cuFuncIsLoaded"] = __cuFuncIsLoaded + global __cuFuncLoad + data["__cuFuncLoad"] = __cuFuncLoad + global __cuLaunchKernel + data["__cuLaunchKernel"] = __cuLaunchKernel + global __cuLaunchKernelEx + data["__cuLaunchKernelEx"] = __cuLaunchKernelEx + global __cuLaunchCooperativeKernel + data["__cuLaunchCooperativeKernel"] = __cuLaunchCooperativeKernel + global __cuLaunchCooperativeKernelMultiDevice + data["__cuLaunchCooperativeKernelMultiDevice"] = __cuLaunchCooperativeKernelMultiDevice + global __cuLaunchHostFunc + data["__cuLaunchHostFunc"] = __cuLaunchHostFunc + global __cuFuncSetBlockShape + data["__cuFuncSetBlockShape"] = __cuFuncSetBlockShape + global __cuFuncSetSharedSize + data["__cuFuncSetSharedSize"] = __cuFuncSetSharedSize + global __cuParamSetSize + data["__cuParamSetSize"] = __cuParamSetSize + global __cuParamSeti + data["__cuParamSeti"] = __cuParamSeti + global __cuParamSetf + data["__cuParamSetf"] = __cuParamSetf + global __cuParamSetv + data["__cuParamSetv"] = __cuParamSetv + global __cuLaunch + data["__cuLaunch"] = __cuLaunch + global __cuLaunchGrid + data["__cuLaunchGrid"] = __cuLaunchGrid + global __cuLaunchGridAsync + data["__cuLaunchGridAsync"] = __cuLaunchGridAsync + global __cuParamSetTexRef + data["__cuParamSetTexRef"] = __cuParamSetTexRef + global __cuFuncSetSharedMemConfig + data["__cuFuncSetSharedMemConfig"] = __cuFuncSetSharedMemConfig + global __cuGraphCreate + data["__cuGraphCreate"] = __cuGraphCreate + global __cuGraphAddKernelNode_v2 + data["__cuGraphAddKernelNode_v2"] = __cuGraphAddKernelNode_v2 + global __cuGraphKernelNodeGetParams_v2 + data["__cuGraphKernelNodeGetParams_v2"] = __cuGraphKernelNodeGetParams_v2 + global __cuGraphKernelNodeSetParams_v2 + data["__cuGraphKernelNodeSetParams_v2"] = __cuGraphKernelNodeSetParams_v2 + global __cuGraphAddMemcpyNode + data["__cuGraphAddMemcpyNode"] = __cuGraphAddMemcpyNode + global __cuGraphMemcpyNodeGetParams + data["__cuGraphMemcpyNodeGetParams"] = __cuGraphMemcpyNodeGetParams + global __cuGraphMemcpyNodeSetParams + data["__cuGraphMemcpyNodeSetParams"] = __cuGraphMemcpyNodeSetParams + global __cuGraphAddMemsetNode + data["__cuGraphAddMemsetNode"] = __cuGraphAddMemsetNode + global __cuGraphMemsetNodeGetParams + data["__cuGraphMemsetNodeGetParams"] = __cuGraphMemsetNodeGetParams + global __cuGraphMemsetNodeSetParams + data["__cuGraphMemsetNodeSetParams"] = __cuGraphMemsetNodeSetParams + global __cuGraphAddHostNode + data["__cuGraphAddHostNode"] = __cuGraphAddHostNode + global __cuGraphHostNodeGetParams + data["__cuGraphHostNodeGetParams"] = __cuGraphHostNodeGetParams + global __cuGraphHostNodeSetParams + data["__cuGraphHostNodeSetParams"] = __cuGraphHostNodeSetParams + global __cuGraphAddChildGraphNode + data["__cuGraphAddChildGraphNode"] = __cuGraphAddChildGraphNode + global __cuGraphChildGraphNodeGetGraph + data["__cuGraphChildGraphNodeGetGraph"] = __cuGraphChildGraphNodeGetGraph + global __cuGraphAddEmptyNode + data["__cuGraphAddEmptyNode"] = __cuGraphAddEmptyNode + global __cuGraphAddEventRecordNode + data["__cuGraphAddEventRecordNode"] = __cuGraphAddEventRecordNode + global __cuGraphEventRecordNodeGetEvent + data["__cuGraphEventRecordNodeGetEvent"] = __cuGraphEventRecordNodeGetEvent + global __cuGraphEventRecordNodeSetEvent + data["__cuGraphEventRecordNodeSetEvent"] = __cuGraphEventRecordNodeSetEvent + global __cuGraphAddEventWaitNode + data["__cuGraphAddEventWaitNode"] = __cuGraphAddEventWaitNode + global __cuGraphEventWaitNodeGetEvent + data["__cuGraphEventWaitNodeGetEvent"] = __cuGraphEventWaitNodeGetEvent + global __cuGraphEventWaitNodeSetEvent + data["__cuGraphEventWaitNodeSetEvent"] = __cuGraphEventWaitNodeSetEvent + global __cuGraphAddExternalSemaphoresSignalNode + data["__cuGraphAddExternalSemaphoresSignalNode"] = __cuGraphAddExternalSemaphoresSignalNode + global __cuGraphExternalSemaphoresSignalNodeGetParams + data["__cuGraphExternalSemaphoresSignalNodeGetParams"] = __cuGraphExternalSemaphoresSignalNodeGetParams + global __cuGraphExternalSemaphoresSignalNodeSetParams + data["__cuGraphExternalSemaphoresSignalNodeSetParams"] = __cuGraphExternalSemaphoresSignalNodeSetParams + global __cuGraphAddExternalSemaphoresWaitNode + data["__cuGraphAddExternalSemaphoresWaitNode"] = __cuGraphAddExternalSemaphoresWaitNode + global __cuGraphExternalSemaphoresWaitNodeGetParams + data["__cuGraphExternalSemaphoresWaitNodeGetParams"] = __cuGraphExternalSemaphoresWaitNodeGetParams + global __cuGraphExternalSemaphoresWaitNodeSetParams + data["__cuGraphExternalSemaphoresWaitNodeSetParams"] = __cuGraphExternalSemaphoresWaitNodeSetParams + global __cuGraphAddBatchMemOpNode + data["__cuGraphAddBatchMemOpNode"] = __cuGraphAddBatchMemOpNode + global __cuGraphBatchMemOpNodeGetParams + data["__cuGraphBatchMemOpNodeGetParams"] = __cuGraphBatchMemOpNodeGetParams + global __cuGraphBatchMemOpNodeSetParams + data["__cuGraphBatchMemOpNodeSetParams"] = __cuGraphBatchMemOpNodeSetParams + global __cuGraphExecBatchMemOpNodeSetParams + data["__cuGraphExecBatchMemOpNodeSetParams"] = __cuGraphExecBatchMemOpNodeSetParams + global __cuGraphAddMemAllocNode + data["__cuGraphAddMemAllocNode"] = __cuGraphAddMemAllocNode + global __cuGraphMemAllocNodeGetParams + data["__cuGraphMemAllocNodeGetParams"] = __cuGraphMemAllocNodeGetParams + global __cuGraphAddMemFreeNode + data["__cuGraphAddMemFreeNode"] = __cuGraphAddMemFreeNode + global __cuGraphMemFreeNodeGetParams + data["__cuGraphMemFreeNodeGetParams"] = __cuGraphMemFreeNodeGetParams + global __cuDeviceGraphMemTrim + data["__cuDeviceGraphMemTrim"] = __cuDeviceGraphMemTrim + global __cuDeviceGetGraphMemAttribute + data["__cuDeviceGetGraphMemAttribute"] = __cuDeviceGetGraphMemAttribute + global __cuDeviceSetGraphMemAttribute + data["__cuDeviceSetGraphMemAttribute"] = __cuDeviceSetGraphMemAttribute + global __cuGraphClone + data["__cuGraphClone"] = __cuGraphClone + global __cuGraphNodeFindInClone + data["__cuGraphNodeFindInClone"] = __cuGraphNodeFindInClone + global __cuGraphNodeGetType + data["__cuGraphNodeGetType"] = __cuGraphNodeGetType + global __cuGraphGetNodes + data["__cuGraphGetNodes"] = __cuGraphGetNodes + global __cuGraphGetRootNodes + data["__cuGraphGetRootNodes"] = __cuGraphGetRootNodes + global __cuGraphGetEdges + data["__cuGraphGetEdges"] = __cuGraphGetEdges + global __cuGraphGetEdges_v2 + data["__cuGraphGetEdges_v2"] = __cuGraphGetEdges_v2 + global __cuGraphNodeGetDependencies + data["__cuGraphNodeGetDependencies"] = __cuGraphNodeGetDependencies + global __cuGraphNodeGetDependencies_v2 + data["__cuGraphNodeGetDependencies_v2"] = __cuGraphNodeGetDependencies_v2 + global __cuGraphNodeGetDependentNodes + data["__cuGraphNodeGetDependentNodes"] = __cuGraphNodeGetDependentNodes + global __cuGraphNodeGetDependentNodes_v2 + data["__cuGraphNodeGetDependentNodes_v2"] = __cuGraphNodeGetDependentNodes_v2 + global __cuGraphAddDependencies + data["__cuGraphAddDependencies"] = __cuGraphAddDependencies + global __cuGraphAddDependencies_v2 + data["__cuGraphAddDependencies_v2"] = __cuGraphAddDependencies_v2 + global __cuGraphRemoveDependencies + data["__cuGraphRemoveDependencies"] = __cuGraphRemoveDependencies + global __cuGraphRemoveDependencies_v2 + data["__cuGraphRemoveDependencies_v2"] = __cuGraphRemoveDependencies_v2 + global __cuGraphDestroyNode + data["__cuGraphDestroyNode"] = __cuGraphDestroyNode + global __cuGraphInstantiateWithFlags + data["__cuGraphInstantiateWithFlags"] = __cuGraphInstantiateWithFlags + global __cuGraphInstantiateWithParams + data["__cuGraphInstantiateWithParams"] = __cuGraphInstantiateWithParams + global __cuGraphExecGetFlags + data["__cuGraphExecGetFlags"] = __cuGraphExecGetFlags + global __cuGraphExecKernelNodeSetParams_v2 + data["__cuGraphExecKernelNodeSetParams_v2"] = __cuGraphExecKernelNodeSetParams_v2 + global __cuGraphExecMemcpyNodeSetParams + data["__cuGraphExecMemcpyNodeSetParams"] = __cuGraphExecMemcpyNodeSetParams + global __cuGraphExecMemsetNodeSetParams + data["__cuGraphExecMemsetNodeSetParams"] = __cuGraphExecMemsetNodeSetParams + global __cuGraphExecHostNodeSetParams + data["__cuGraphExecHostNodeSetParams"] = __cuGraphExecHostNodeSetParams + global __cuGraphExecChildGraphNodeSetParams + data["__cuGraphExecChildGraphNodeSetParams"] = __cuGraphExecChildGraphNodeSetParams + global __cuGraphExecEventRecordNodeSetEvent + data["__cuGraphExecEventRecordNodeSetEvent"] = __cuGraphExecEventRecordNodeSetEvent + global __cuGraphExecEventWaitNodeSetEvent + data["__cuGraphExecEventWaitNodeSetEvent"] = __cuGraphExecEventWaitNodeSetEvent + global __cuGraphExecExternalSemaphoresSignalNodeSetParams + data["__cuGraphExecExternalSemaphoresSignalNodeSetParams"] = __cuGraphExecExternalSemaphoresSignalNodeSetParams + global __cuGraphExecExternalSemaphoresWaitNodeSetParams + data["__cuGraphExecExternalSemaphoresWaitNodeSetParams"] = __cuGraphExecExternalSemaphoresWaitNodeSetParams + global __cuGraphNodeSetEnabled + data["__cuGraphNodeSetEnabled"] = __cuGraphNodeSetEnabled + global __cuGraphNodeGetEnabled + data["__cuGraphNodeGetEnabled"] = __cuGraphNodeGetEnabled + global __cuGraphUpload + data["__cuGraphUpload"] = __cuGraphUpload + global __cuGraphLaunch + data["__cuGraphLaunch"] = __cuGraphLaunch + global __cuGraphExecDestroy + data["__cuGraphExecDestroy"] = __cuGraphExecDestroy + global __cuGraphDestroy + data["__cuGraphDestroy"] = __cuGraphDestroy + global __cuGraphExecUpdate_v2 + data["__cuGraphExecUpdate_v2"] = __cuGraphExecUpdate_v2 + global __cuGraphKernelNodeCopyAttributes + data["__cuGraphKernelNodeCopyAttributes"] = __cuGraphKernelNodeCopyAttributes + global __cuGraphKernelNodeGetAttribute + data["__cuGraphKernelNodeGetAttribute"] = __cuGraphKernelNodeGetAttribute + global __cuGraphKernelNodeSetAttribute + data["__cuGraphKernelNodeSetAttribute"] = __cuGraphKernelNodeSetAttribute + global __cuGraphDebugDotPrint + data["__cuGraphDebugDotPrint"] = __cuGraphDebugDotPrint + global __cuUserObjectCreate + data["__cuUserObjectCreate"] = __cuUserObjectCreate + global __cuUserObjectRetain + data["__cuUserObjectRetain"] = __cuUserObjectRetain + global __cuUserObjectRelease + data["__cuUserObjectRelease"] = __cuUserObjectRelease + global __cuGraphRetainUserObject + data["__cuGraphRetainUserObject"] = __cuGraphRetainUserObject + global __cuGraphReleaseUserObject + data["__cuGraphReleaseUserObject"] = __cuGraphReleaseUserObject + global __cuGraphAddNode + data["__cuGraphAddNode"] = __cuGraphAddNode + global __cuGraphAddNode_v2 + data["__cuGraphAddNode_v2"] = __cuGraphAddNode_v2 + global __cuGraphNodeSetParams + data["__cuGraphNodeSetParams"] = __cuGraphNodeSetParams + global __cuGraphExecNodeSetParams + data["__cuGraphExecNodeSetParams"] = __cuGraphExecNodeSetParams + global __cuGraphConditionalHandleCreate + data["__cuGraphConditionalHandleCreate"] = __cuGraphConditionalHandleCreate + global __cuOccupancyMaxActiveBlocksPerMultiprocessor + data["__cuOccupancyMaxActiveBlocksPerMultiprocessor"] = __cuOccupancyMaxActiveBlocksPerMultiprocessor + global __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + data["__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"] = __cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags + global __cuOccupancyMaxPotentialBlockSize + data["__cuOccupancyMaxPotentialBlockSize"] = __cuOccupancyMaxPotentialBlockSize + global __cuOccupancyMaxPotentialBlockSizeWithFlags + data["__cuOccupancyMaxPotentialBlockSizeWithFlags"] = __cuOccupancyMaxPotentialBlockSizeWithFlags + global __cuOccupancyAvailableDynamicSMemPerBlock + data["__cuOccupancyAvailableDynamicSMemPerBlock"] = __cuOccupancyAvailableDynamicSMemPerBlock + global __cuOccupancyMaxPotentialClusterSize + data["__cuOccupancyMaxPotentialClusterSize"] = __cuOccupancyMaxPotentialClusterSize + global __cuOccupancyMaxActiveClusters + data["__cuOccupancyMaxActiveClusters"] = __cuOccupancyMaxActiveClusters + global __cuTexRefSetArray + data["__cuTexRefSetArray"] = __cuTexRefSetArray + global __cuTexRefSetMipmappedArray + data["__cuTexRefSetMipmappedArray"] = __cuTexRefSetMipmappedArray + global __cuTexRefSetAddress_v2 + data["__cuTexRefSetAddress_v2"] = __cuTexRefSetAddress_v2 + global __cuTexRefSetAddress2D_v3 + data["__cuTexRefSetAddress2D_v3"] = __cuTexRefSetAddress2D_v3 + global __cuTexRefSetFormat + data["__cuTexRefSetFormat"] = __cuTexRefSetFormat + global __cuTexRefSetAddressMode + data["__cuTexRefSetAddressMode"] = __cuTexRefSetAddressMode + global __cuTexRefSetFilterMode + data["__cuTexRefSetFilterMode"] = __cuTexRefSetFilterMode + global __cuTexRefSetMipmapFilterMode + data["__cuTexRefSetMipmapFilterMode"] = __cuTexRefSetMipmapFilterMode + global __cuTexRefSetMipmapLevelBias + data["__cuTexRefSetMipmapLevelBias"] = __cuTexRefSetMipmapLevelBias + global __cuTexRefSetMipmapLevelClamp + data["__cuTexRefSetMipmapLevelClamp"] = __cuTexRefSetMipmapLevelClamp + global __cuTexRefSetMaxAnisotropy + data["__cuTexRefSetMaxAnisotropy"] = __cuTexRefSetMaxAnisotropy + global __cuTexRefSetBorderColor + data["__cuTexRefSetBorderColor"] = __cuTexRefSetBorderColor + global __cuTexRefSetFlags + data["__cuTexRefSetFlags"] = __cuTexRefSetFlags + global __cuTexRefGetAddress_v2 + data["__cuTexRefGetAddress_v2"] = __cuTexRefGetAddress_v2 + global __cuTexRefGetArray + data["__cuTexRefGetArray"] = __cuTexRefGetArray + global __cuTexRefGetMipmappedArray + data["__cuTexRefGetMipmappedArray"] = __cuTexRefGetMipmappedArray + global __cuTexRefGetAddressMode + data["__cuTexRefGetAddressMode"] = __cuTexRefGetAddressMode + global __cuTexRefGetFilterMode + data["__cuTexRefGetFilterMode"] = __cuTexRefGetFilterMode + global __cuTexRefGetFormat + data["__cuTexRefGetFormat"] = __cuTexRefGetFormat + global __cuTexRefGetMipmapFilterMode + data["__cuTexRefGetMipmapFilterMode"] = __cuTexRefGetMipmapFilterMode + global __cuTexRefGetMipmapLevelBias + data["__cuTexRefGetMipmapLevelBias"] = __cuTexRefGetMipmapLevelBias + global __cuTexRefGetMipmapLevelClamp + data["__cuTexRefGetMipmapLevelClamp"] = __cuTexRefGetMipmapLevelClamp + global __cuTexRefGetMaxAnisotropy + data["__cuTexRefGetMaxAnisotropy"] = __cuTexRefGetMaxAnisotropy + global __cuTexRefGetBorderColor + data["__cuTexRefGetBorderColor"] = __cuTexRefGetBorderColor + global __cuTexRefGetFlags + data["__cuTexRefGetFlags"] = __cuTexRefGetFlags + global __cuTexRefCreate + data["__cuTexRefCreate"] = __cuTexRefCreate + global __cuTexRefDestroy + data["__cuTexRefDestroy"] = __cuTexRefDestroy + global __cuSurfRefSetArray + data["__cuSurfRefSetArray"] = __cuSurfRefSetArray + global __cuSurfRefGetArray + data["__cuSurfRefGetArray"] = __cuSurfRefGetArray + global __cuTexObjectCreate + data["__cuTexObjectCreate"] = __cuTexObjectCreate + global __cuTexObjectDestroy + data["__cuTexObjectDestroy"] = __cuTexObjectDestroy + global __cuTexObjectGetResourceDesc + data["__cuTexObjectGetResourceDesc"] = __cuTexObjectGetResourceDesc + global __cuTexObjectGetTextureDesc + data["__cuTexObjectGetTextureDesc"] = __cuTexObjectGetTextureDesc + global __cuTexObjectGetResourceViewDesc + data["__cuTexObjectGetResourceViewDesc"] = __cuTexObjectGetResourceViewDesc + global __cuSurfObjectCreate + data["__cuSurfObjectCreate"] = __cuSurfObjectCreate + global __cuSurfObjectDestroy + data["__cuSurfObjectDestroy"] = __cuSurfObjectDestroy + global __cuSurfObjectGetResourceDesc + data["__cuSurfObjectGetResourceDesc"] = __cuSurfObjectGetResourceDesc + global __cuTensorMapEncodeTiled + data["__cuTensorMapEncodeTiled"] = __cuTensorMapEncodeTiled + global __cuTensorMapEncodeIm2col + data["__cuTensorMapEncodeIm2col"] = __cuTensorMapEncodeIm2col + global __cuTensorMapEncodeIm2colWide + data["__cuTensorMapEncodeIm2colWide"] = __cuTensorMapEncodeIm2colWide + global __cuTensorMapReplaceAddress + data["__cuTensorMapReplaceAddress"] = __cuTensorMapReplaceAddress + global __cuDeviceCanAccessPeer + data["__cuDeviceCanAccessPeer"] = __cuDeviceCanAccessPeer + global __cuCtxEnablePeerAccess + data["__cuCtxEnablePeerAccess"] = __cuCtxEnablePeerAccess + global __cuCtxDisablePeerAccess + data["__cuCtxDisablePeerAccess"] = __cuCtxDisablePeerAccess + global __cuDeviceGetP2PAttribute + data["__cuDeviceGetP2PAttribute"] = __cuDeviceGetP2PAttribute + global __cuGraphicsUnregisterResource + data["__cuGraphicsUnregisterResource"] = __cuGraphicsUnregisterResource + global __cuGraphicsSubResourceGetMappedArray + data["__cuGraphicsSubResourceGetMappedArray"] = __cuGraphicsSubResourceGetMappedArray + global __cuGraphicsResourceGetMappedMipmappedArray + data["__cuGraphicsResourceGetMappedMipmappedArray"] = __cuGraphicsResourceGetMappedMipmappedArray + global __cuGraphicsResourceGetMappedPointer_v2 + data["__cuGraphicsResourceGetMappedPointer_v2"] = __cuGraphicsResourceGetMappedPointer_v2 + global __cuGraphicsResourceSetMapFlags_v2 + data["__cuGraphicsResourceSetMapFlags_v2"] = __cuGraphicsResourceSetMapFlags_v2 + global __cuGraphicsMapResources + data["__cuGraphicsMapResources"] = __cuGraphicsMapResources + global __cuGraphicsUnmapResources + data["__cuGraphicsUnmapResources"] = __cuGraphicsUnmapResources + global __cuGetProcAddress_v2 + data["__cuGetProcAddress_v2"] = __cuGetProcAddress_v2 + global __cuCoredumpGetAttribute + data["__cuCoredumpGetAttribute"] = __cuCoredumpGetAttribute + global __cuCoredumpGetAttributeGlobal + data["__cuCoredumpGetAttributeGlobal"] = __cuCoredumpGetAttributeGlobal + global __cuCoredumpSetAttribute + data["__cuCoredumpSetAttribute"] = __cuCoredumpSetAttribute + global __cuCoredumpSetAttributeGlobal + data["__cuCoredumpSetAttributeGlobal"] = __cuCoredumpSetAttributeGlobal + global __cuGetExportTable + data["__cuGetExportTable"] = __cuGetExportTable + global __cuGreenCtxCreate + data["__cuGreenCtxCreate"] = __cuGreenCtxCreate + global __cuGreenCtxDestroy + data["__cuGreenCtxDestroy"] = __cuGreenCtxDestroy + global __cuCtxFromGreenCtx + data["__cuCtxFromGreenCtx"] = __cuCtxFromGreenCtx + global __cuDeviceGetDevResource + data["__cuDeviceGetDevResource"] = __cuDeviceGetDevResource + global __cuCtxGetDevResource + data["__cuCtxGetDevResource"] = __cuCtxGetDevResource + global __cuGreenCtxGetDevResource + data["__cuGreenCtxGetDevResource"] = __cuGreenCtxGetDevResource + global __cuDevSmResourceSplitByCount + data["__cuDevSmResourceSplitByCount"] = __cuDevSmResourceSplitByCount + global __cuDevResourceGenerateDesc + data["__cuDevResourceGenerateDesc"] = __cuDevResourceGenerateDesc + global __cuGreenCtxRecordEvent + data["__cuGreenCtxRecordEvent"] = __cuGreenCtxRecordEvent + global __cuGreenCtxWaitEvent + data["__cuGreenCtxWaitEvent"] = __cuGreenCtxWaitEvent + global __cuStreamGetGreenCtx + data["__cuStreamGetGreenCtx"] = __cuStreamGetGreenCtx + global __cuGreenCtxStreamCreate + data["__cuGreenCtxStreamCreate"] = __cuGreenCtxStreamCreate + global __cuLogsRegisterCallback + data["__cuLogsRegisterCallback"] = __cuLogsRegisterCallback + global __cuLogsUnregisterCallback + data["__cuLogsUnregisterCallback"] = __cuLogsUnregisterCallback + global __cuLogsCurrent + data["__cuLogsCurrent"] = __cuLogsCurrent + global __cuLogsDumpToFile + data["__cuLogsDumpToFile"] = __cuLogsDumpToFile + global __cuLogsDumpToMemory + data["__cuLogsDumpToMemory"] = __cuLogsDumpToMemory + global __cuCheckpointProcessGetRestoreThreadId + data["__cuCheckpointProcessGetRestoreThreadId"] = __cuCheckpointProcessGetRestoreThreadId + global __cuCheckpointProcessGetState + data["__cuCheckpointProcessGetState"] = __cuCheckpointProcessGetState + global __cuCheckpointProcessLock + data["__cuCheckpointProcessLock"] = __cuCheckpointProcessLock + global __cuCheckpointProcessCheckpoint + data["__cuCheckpointProcessCheckpoint"] = __cuCheckpointProcessCheckpoint + global __cuCheckpointProcessRestore + data["__cuCheckpointProcessRestore"] = __cuCheckpointProcessRestore + global __cuCheckpointProcessUnlock + data["__cuCheckpointProcessUnlock"] = __cuCheckpointProcessUnlock + global __cuProfilerStart + data["__cuProfilerStart"] = __cuProfilerStart + global __cuProfilerStop + data["__cuProfilerStop"] = __cuProfilerStop + global __cuGraphicsEGLRegisterImage + data["__cuGraphicsEGLRegisterImage"] = __cuGraphicsEGLRegisterImage + global __cuEGLStreamConsumerConnect + data["__cuEGLStreamConsumerConnect"] = __cuEGLStreamConsumerConnect + global __cuEGLStreamConsumerConnectWithFlags + data["__cuEGLStreamConsumerConnectWithFlags"] = __cuEGLStreamConsumerConnectWithFlags + global __cuEGLStreamConsumerDisconnect + data["__cuEGLStreamConsumerDisconnect"] = __cuEGLStreamConsumerDisconnect + global __cuEGLStreamConsumerAcquireFrame + data["__cuEGLStreamConsumerAcquireFrame"] = __cuEGLStreamConsumerAcquireFrame + global __cuEGLStreamConsumerReleaseFrame + data["__cuEGLStreamConsumerReleaseFrame"] = __cuEGLStreamConsumerReleaseFrame + global __cuEGLStreamProducerConnect + data["__cuEGLStreamProducerConnect"] = __cuEGLStreamProducerConnect + global __cuEGLStreamProducerDisconnect + data["__cuEGLStreamProducerDisconnect"] = __cuEGLStreamProducerDisconnect + global __cuEGLStreamProducerPresentFrame + data["__cuEGLStreamProducerPresentFrame"] = __cuEGLStreamProducerPresentFrame + global __cuEGLStreamProducerReturnFrame + data["__cuEGLStreamProducerReturnFrame"] = __cuEGLStreamProducerReturnFrame + global __cuGraphicsResourceGetMappedEglFrame + data["__cuGraphicsResourceGetMappedEglFrame"] = __cuGraphicsResourceGetMappedEglFrame + global __cuEventCreateFromEGLSync + data["__cuEventCreateFromEGLSync"] = __cuEventCreateFromEGLSync + global __cuGraphicsGLRegisterBuffer + data["__cuGraphicsGLRegisterBuffer"] = __cuGraphicsGLRegisterBuffer + global __cuGraphicsGLRegisterImage + data["__cuGraphicsGLRegisterImage"] = __cuGraphicsGLRegisterImage + global __cuGLGetDevices_v2 + data["__cuGLGetDevices_v2"] = __cuGLGetDevices_v2 + global __cuVDPAUGetDevice + data["__cuVDPAUGetDevice"] = __cuVDPAUGetDevice + global __cuVDPAUCtxCreate_v2 + data["__cuVDPAUCtxCreate_v2"] = __cuVDPAUCtxCreate_v2 + global __cuGraphicsVDPAURegisterVideoSurface + data["__cuGraphicsVDPAURegisterVideoSurface"] = __cuGraphicsVDPAURegisterVideoSurface + global __cuGraphicsVDPAURegisterOutputSurface + data["__cuGraphicsVDPAURegisterOutputSurface"] = __cuGraphicsVDPAURegisterOutputSurface + + func_ptrs = data + return data + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e52312d880b00cc34bf83fdc89021299885064dc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpp @@ -0,0 +1,14159 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/nvrtc.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._bindings.cynvrtc", + "sources": [ + "cuda/bindings/_bindings/cynvrtc.pyx" + ] + }, + "module_name": "cuda.bindings._bindings.cynvrtc" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___bindings__cynvrtc +#define __PYX_HAVE_API__cuda__bindings___bindings__cynvrtc +/* Early includes */ +#include +#include "nvrtc.h" +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_bindings/cynvrtc.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cynvrtc" */ + +/* Module declarations from "cuda.bindings._lib.dlfcn" */ + +/* Module declarations from "cuda.bindings._bindings.cynvrtc" */ +static PyObject *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock = 0; +static int __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___cuPythonInit; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired; +static void *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback; +static PyObject *__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs = 0; +static int __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__cuPythonInit(void); /*proto*/ +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(void); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointer(PyObject *, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._bindings.cynvrtc" +extern int __pyx_module_is_main_cuda__bindings___bindings__cynvrtc; +int __pyx_module_is_main_cuda__bindings___bindings__cynvrtc = 0; + +/* Implementation of "cuda.bindings._bindings.cynvrtc" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_RuntimeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "."; +static const char __pyx_k__2[] = "?"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_Lock[] = "Lock"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_nvrtc[] = "nvrtc"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_add_note[] = "add_note"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_z_A_a_9AQ[] = "\200\001\330\004\005\330\004\007\200z\220\023\220A\330\010\024\320\024.\250a\330\004\013\2109\220A\220Q"; +static const char __pyx_k_handle_uint[] = "_handle_uint"; +static const char __pyx_k_nvrtcGetPTX[] = "__nvrtcGetPTX"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_nvrtcGetNVVM[] = "__nvrtcGetNVVM"; +static const char __pyx_k_nvrtcVersion[] = "__nvrtcVersion"; +static const char __pyx_k_nvrtcGetCUBIN[] = "__nvrtcGetCUBIN"; +static const char __pyx_k_nvrtcGetLTOIR[] = "__nvrtcGetLTOIR"; +static const char __pyx_k_cuda_pathfinder[] = "cuda.pathfinder"; +static const char __pyx_k_nvrtcGetOptiXIR[] = "__nvrtcGetOptiXIR"; +static const char __pyx_k_nvrtcGetPTXSize[] = "__nvrtcGetPTXSize"; +static const char __pyx_k_nvrtcGetNVVMSize[] = "__nvrtcGetNVVMSize"; +static const char __pyx_k_nvrtcGetCUBINSize[] = "__nvrtcGetCUBINSize"; +static const char __pyx_k_nvrtcGetLTOIRSize[] = "__nvrtcGetLTOIRSize"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_nvrtcCreateProgram[] = "__nvrtcCreateProgram"; +static const char __pyx_k_nvrtcGetProgramLog[] = "__nvrtcGetProgramLog"; +static const char __pyx_k_nvrtcCompileProgram[] = "__nvrtcCompileProgram"; +static const char __pyx_k_nvrtcDestroyProgram[] = "__nvrtcDestroyProgram"; +static const char __pyx_k_nvrtcGetErrorString[] = "__nvrtcGetErrorString"; +static const char __pyx_k_nvrtcGetLoweredName[] = "__nvrtcGetLoweredName"; +static const char __pyx_k_nvrtcGetOptiXIRSize[] = "__nvrtcGetOptiXIRSize"; +static const char __pyx_k_nvrtcGetPCHHeapSize[] = "__nvrtcGetPCHHeapSize"; +static const char __pyx_k_nvrtcSetPCHHeapSize[] = "__nvrtcSetPCHHeapSize"; +static const char __pyx_k_nvrtcSetFlowCallback[] = "__nvrtcSetFlowCallback"; +static const char __pyx_k_nvrtcAddNameExpression[] = "__nvrtcAddNameExpression"; +static const char __pyx_k_nvrtcGetProgramLogSize[] = "__nvrtcGetProgramLogSize"; +static const char __pyx_k_nvrtcGetSupportedArchs[] = "__nvrtcGetSupportedArchs"; +static const char __pyx_k_load_nvidia_dynamic_lib[] = "load_nvidia_dynamic_lib"; +static const char __pyx_k_nvrtcGetPCHCreateStatus[] = "__nvrtcGetPCHCreateStatus"; +static const char __pyx_k_inspect_function_pointer[] = "_inspect_function_pointer"; +static const char __pyx_k_inspect_function_pointers[] = "_inspect_function_pointers"; +static const char __pyx_k_nvrtcGetNumSupportedArchs[] = "__nvrtcGetNumSupportedArchs"; +static const char __pyx_k_nvrtcGetPCHHeapSizeRequired[] = "__nvrtcGetPCHHeapSizeRequired"; +static const char __pyx_k_Function_nvrtcGetPTX_not_found[] = "Function \"nvrtcGetPTX\" not found"; +static const char __pyx_k_z_q_Q_Ja_Zq_A_z_Q_Ja_Ja_Ja_A_j[] = "\200\001\330\004\005\330\004\007\200z\220\027\230\001\330\010\017\210q\340\004\020\220\001\330\004\025\220Q\340\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t*\250*\260A\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t\034\230J\240a\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t!\240\032\2501\330\004\005\330\004\010\210\001\320\t\035\230Z\240q\330\004\005\330\004\010\210\001\320\t\"\240*\250A\330\004\005\330\004\010\210\001\320\t\036\230j\250\001\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t \240\n\250!\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t#\240:\250Q\330\004\005\330\004\010\210\001\320\t'\240z\260\021\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t$\240J\250a\330\004\005\330\004\010\210\001\320\t(\250\n\260!\330\004\005\330\004\010\210\001\320\t,\250J\260a\330\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\020\220\001\330\004\013\2101"; +static const char __pyx_k_Function_nvrtcAddNameExpression[] = "Function \"nvrtcAddNameExpression\" not found"; +static const char __pyx_k_Function_nvrtcCreateProgram_not[] = "Function \"nvrtcCreateProgram\" not found"; +static const char __pyx_k_Function_nvrtcGetNVVM_not_found[] = "Function \"nvrtcGetNVVM\" not found"; +static const char __pyx_k_Function_nvrtcGetProgramLogSize[] = "Function \"nvrtcGetProgramLogSize\" not found"; +static const char __pyx_k_Function_nvrtcGetProgramLog_not[] = "Function \"nvrtcGetProgramLog\" not found"; +static const char __pyx_k_Function_nvrtcGetSupportedArchs[] = "Function \"nvrtcGetSupportedArchs\" not found"; +static const char __pyx_k_Function_nvrtcVersion_not_found[] = "Function \"nvrtcVersion\" not found"; +static const char __pyx_k_cuda_bindings__bindings_cynvrtc[] = "cuda.bindings._bindings.cynvrtc"; +static const char __pyx_k_Function_nvrtcCompileProgram_not[] = "Function \"nvrtcCompileProgram\" not found"; +static const char __pyx_k_Function_nvrtcDestroyProgram_not[] = "Function \"nvrtcDestroyProgram\" not found"; +static const char __pyx_k_Function_nvrtcGetCUBINSize_not_f[] = "Function \"nvrtcGetCUBINSize\" not found"; +static const char __pyx_k_Function_nvrtcGetCUBIN_not_found[] = "Function \"nvrtcGetCUBIN\" not found"; +static const char __pyx_k_Function_nvrtcGetErrorString_not[] = "Function \"nvrtcGetErrorString\" not found"; +static const char __pyx_k_Function_nvrtcGetLTOIRSize_not_f[] = "Function \"nvrtcGetLTOIRSize\" not found"; +static const char __pyx_k_Function_nvrtcGetLTOIR_not_found[] = "Function \"nvrtcGetLTOIR\" not found"; +static const char __pyx_k_Function_nvrtcGetLoweredName_not[] = "Function \"nvrtcGetLoweredName\" not found"; +static const char __pyx_k_Function_nvrtcGetNVVMSize_not_fo[] = "Function \"nvrtcGetNVVMSize\" not found"; +static const char __pyx_k_Function_nvrtcGetNumSupportedArc[] = "Function \"nvrtcGetNumSupportedArchs\" not found"; +static const char __pyx_k_Function_nvrtcGetOptiXIRSize_not[] = "Function \"nvrtcGetOptiXIRSize\" not found"; +static const char __pyx_k_Function_nvrtcGetOptiXIR_not_fou[] = "Function \"nvrtcGetOptiXIR\" not found"; +static const char __pyx_k_Function_nvrtcGetPCHCreateStatus[] = "Function \"nvrtcGetPCHCreateStatus\" not found"; +static const char __pyx_k_Function_nvrtcGetPCHHeapSizeRequ[] = "Function \"nvrtcGetPCHHeapSizeRequired\" not found"; +static const char __pyx_k_Function_nvrtcGetPCHHeapSize_not[] = "Function \"nvrtcGetPCHHeapSize\" not found"; +static const char __pyx_k_Function_nvrtcGetPTXSize_not_fou[] = "Function \"nvrtcGetPTXSize\" not found"; +static const char __pyx_k_Function_nvrtcSetFlowCallback_no[] = "Function \"nvrtcSetFlowCallback\" not found"; +static const char __pyx_k_Function_nvrtcSetPCHHeapSize_not[] = "Function \"nvrtcSetPCHHeapSize\" not found"; +static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; +static const char __pyx_k_cuda_bindings__bindings_cynvrtc_2[] = "cuda/bindings/_bindings/cynvrtc.pyx"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[2]; + PyObject *__pyx_string_tab[83]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Function_nvrtcAddNameExpression __pyx_string_tab[1] +#define __pyx_kp_u_Function_nvrtcCompileProgram_not __pyx_string_tab[2] +#define __pyx_kp_u_Function_nvrtcCreateProgram_not __pyx_string_tab[3] +#define __pyx_kp_u_Function_nvrtcDestroyProgram_not __pyx_string_tab[4] +#define __pyx_kp_u_Function_nvrtcGetCUBINSize_not_f __pyx_string_tab[5] +#define __pyx_kp_u_Function_nvrtcGetCUBIN_not_found __pyx_string_tab[6] +#define __pyx_kp_u_Function_nvrtcGetErrorString_not __pyx_string_tab[7] +#define __pyx_kp_u_Function_nvrtcGetLTOIRSize_not_f __pyx_string_tab[8] +#define __pyx_kp_u_Function_nvrtcGetLTOIR_not_found __pyx_string_tab[9] +#define __pyx_kp_u_Function_nvrtcGetLoweredName_not __pyx_string_tab[10] +#define __pyx_kp_u_Function_nvrtcGetNVVMSize_not_fo __pyx_string_tab[11] +#define __pyx_kp_u_Function_nvrtcGetNVVM_not_found __pyx_string_tab[12] +#define __pyx_kp_u_Function_nvrtcGetNumSupportedArc __pyx_string_tab[13] +#define __pyx_kp_u_Function_nvrtcGetOptiXIRSize_not __pyx_string_tab[14] +#define __pyx_kp_u_Function_nvrtcGetOptiXIR_not_fou __pyx_string_tab[15] +#define __pyx_kp_u_Function_nvrtcGetPCHCreateStatus __pyx_string_tab[16] +#define __pyx_kp_u_Function_nvrtcGetPCHHeapSizeRequ __pyx_string_tab[17] +#define __pyx_kp_u_Function_nvrtcGetPCHHeapSize_not __pyx_string_tab[18] +#define __pyx_kp_u_Function_nvrtcGetPTXSize_not_fou __pyx_string_tab[19] +#define __pyx_kp_u_Function_nvrtcGetPTX_not_found __pyx_string_tab[20] +#define __pyx_kp_u_Function_nvrtcGetProgramLogSize __pyx_string_tab[21] +#define __pyx_kp_u_Function_nvrtcGetProgramLog_not __pyx_string_tab[22] +#define __pyx_kp_u_Function_nvrtcGetSupportedArchs __pyx_string_tab[23] +#define __pyx_kp_u_Function_nvrtcSetFlowCallback_no __pyx_string_tab[24] +#define __pyx_kp_u_Function_nvrtcSetPCHHeapSize_not __pyx_string_tab[25] +#define __pyx_kp_u_Function_nvrtcVersion_not_found __pyx_string_tab[26] +#define __pyx_n_u_Lock __pyx_string_tab[27] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[28] +#define __pyx_n_u_RuntimeError __pyx_string_tab[29] +#define __pyx_kp_u__2 __pyx_string_tab[30] +#define __pyx_kp_u_add_note __pyx_string_tab[31] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[32] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[33] +#define __pyx_n_u_cuda_bindings__bindings_cynvrtc __pyx_string_tab[34] +#define __pyx_kp_u_cuda_bindings__bindings_cynvrtc_2 __pyx_string_tab[35] +#define __pyx_n_u_cuda_pathfinder __pyx_string_tab[36] +#define __pyx_n_u_enter __pyx_string_tab[37] +#define __pyx_n_u_exit __pyx_string_tab[38] +#define __pyx_n_u_func __pyx_string_tab[39] +#define __pyx_n_u_handle_uint __pyx_string_tab[40] +#define __pyx_n_u_initializing __pyx_string_tab[41] +#define __pyx_n_u_inspect_function_pointer __pyx_string_tab[42] +#define __pyx_n_u_inspect_function_pointers __pyx_string_tab[43] +#define __pyx_n_u_is_coroutine __pyx_string_tab[44] +#define __pyx_n_u_load_nvidia_dynamic_lib __pyx_string_tab[45] +#define __pyx_n_u_main __pyx_string_tab[46] +#define __pyx_n_u_module __pyx_string_tab[47] +#define __pyx_n_u_name __pyx_string_tab[48] +#define __pyx_n_u_name_2 __pyx_string_tab[49] +#define __pyx_n_u_nvrtc __pyx_string_tab[50] +#define __pyx_n_u_nvrtcAddNameExpression __pyx_string_tab[51] +#define __pyx_n_u_nvrtcCompileProgram __pyx_string_tab[52] +#define __pyx_n_u_nvrtcCreateProgram __pyx_string_tab[53] +#define __pyx_n_u_nvrtcDestroyProgram __pyx_string_tab[54] +#define __pyx_n_u_nvrtcGetCUBIN __pyx_string_tab[55] +#define __pyx_n_u_nvrtcGetCUBINSize __pyx_string_tab[56] +#define __pyx_n_u_nvrtcGetErrorString __pyx_string_tab[57] +#define __pyx_n_u_nvrtcGetLTOIR __pyx_string_tab[58] +#define __pyx_n_u_nvrtcGetLTOIRSize __pyx_string_tab[59] +#define __pyx_n_u_nvrtcGetLoweredName __pyx_string_tab[60] +#define __pyx_n_u_nvrtcGetNVVM __pyx_string_tab[61] +#define __pyx_n_u_nvrtcGetNVVMSize __pyx_string_tab[62] +#define __pyx_n_u_nvrtcGetNumSupportedArchs __pyx_string_tab[63] +#define __pyx_n_u_nvrtcGetOptiXIR __pyx_string_tab[64] +#define __pyx_n_u_nvrtcGetOptiXIRSize __pyx_string_tab[65] +#define __pyx_n_u_nvrtcGetPCHCreateStatus __pyx_string_tab[66] +#define __pyx_n_u_nvrtcGetPCHHeapSize __pyx_string_tab[67] +#define __pyx_n_u_nvrtcGetPCHHeapSizeRequired __pyx_string_tab[68] +#define __pyx_n_u_nvrtcGetPTX __pyx_string_tab[69] +#define __pyx_n_u_nvrtcGetPTXSize __pyx_string_tab[70] +#define __pyx_n_u_nvrtcGetProgramLog __pyx_string_tab[71] +#define __pyx_n_u_nvrtcGetProgramLogSize __pyx_string_tab[72] +#define __pyx_n_u_nvrtcGetSupportedArchs __pyx_string_tab[73] +#define __pyx_n_u_nvrtcSetFlowCallback __pyx_string_tab[74] +#define __pyx_n_u_nvrtcSetPCHHeapSize __pyx_string_tab[75] +#define __pyx_n_u_nvrtcVersion __pyx_string_tab[76] +#define __pyx_n_u_pop __pyx_string_tab[77] +#define __pyx_n_u_qualname __pyx_string_tab[78] +#define __pyx_n_u_set_name __pyx_string_tab[79] +#define __pyx_n_u_spec __pyx_string_tab[80] +#define __pyx_n_u_test __pyx_string_tab[81] +#define __pyx_n_u_threading __pyx_string_tab[82] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<83; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<83; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_bindings/cynvrtc.pyx":39 + * cdef void *__nvrtcSetFlowCallback = NULL + * + * cdef int _cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cuPythonInit + * +*/ + +static int __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__cuPythonInit(void) { + void *__pyx_v_handle; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + uintptr_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + int __pyx_t_13; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuPythonInit", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":43 + * + * # Load library + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * handle = (load_nvidia_dynamic_lib("nvrtc")._handle_uint) + * +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":44 + * # Load library + * with gil, __symbol_lock: + * handle = (load_nvidia_dynamic_lib("nvrtc")._handle_uint) # <<<<<<<<<<<<<< + * + * # Load function +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nvrtc}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_handle_uint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L10_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_9 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 44, __pyx_L10_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_handle = ((void *)((uintptr_t)__pyx_t_9)); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":48 + * # Load function + * global __nvrtcGetErrorString + * __nvrtcGetErrorString = dlfcn.dlsym(handle, 'nvrtcGetErrorString') # <<<<<<<<<<<<<< + * global __nvrtcVersion + * __nvrtcVersion = dlfcn.dlsym(handle, 'nvrtcVersion') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetErrorString")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":50 + * __nvrtcGetErrorString = dlfcn.dlsym(handle, 'nvrtcGetErrorString') + * global __nvrtcVersion + * __nvrtcVersion = dlfcn.dlsym(handle, 'nvrtcVersion') # <<<<<<<<<<<<<< + * global __nvrtcGetNumSupportedArchs + * __nvrtcGetNumSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetNumSupportedArchs') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion = dlsym(__pyx_v_handle, ((char const *)"nvrtcVersion")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":52 + * __nvrtcVersion = dlfcn.dlsym(handle, 'nvrtcVersion') + * global __nvrtcGetNumSupportedArchs + * __nvrtcGetNumSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetNumSupportedArchs') # <<<<<<<<<<<<<< + * global __nvrtcGetSupportedArchs + * __nvrtcGetSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetSupportedArchs') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetNumSupportedArchs")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":54 + * __nvrtcGetNumSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetNumSupportedArchs') + * global __nvrtcGetSupportedArchs + * __nvrtcGetSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetSupportedArchs') # <<<<<<<<<<<<<< + * global __nvrtcCreateProgram + * __nvrtcCreateProgram = dlfcn.dlsym(handle, 'nvrtcCreateProgram') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetSupportedArchs")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":56 + * __nvrtcGetSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetSupportedArchs') + * global __nvrtcCreateProgram + * __nvrtcCreateProgram = dlfcn.dlsym(handle, 'nvrtcCreateProgram') # <<<<<<<<<<<<<< + * global __nvrtcDestroyProgram + * __nvrtcDestroyProgram = dlfcn.dlsym(handle, 'nvrtcDestroyProgram') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram = dlsym(__pyx_v_handle, ((char const *)"nvrtcCreateProgram")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":58 + * __nvrtcCreateProgram = dlfcn.dlsym(handle, 'nvrtcCreateProgram') + * global __nvrtcDestroyProgram + * __nvrtcDestroyProgram = dlfcn.dlsym(handle, 'nvrtcDestroyProgram') # <<<<<<<<<<<<<< + * global __nvrtcCompileProgram + * __nvrtcCompileProgram = dlfcn.dlsym(handle, 'nvrtcCompileProgram') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram = dlsym(__pyx_v_handle, ((char const *)"nvrtcDestroyProgram")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":60 + * __nvrtcDestroyProgram = dlfcn.dlsym(handle, 'nvrtcDestroyProgram') + * global __nvrtcCompileProgram + * __nvrtcCompileProgram = dlfcn.dlsym(handle, 'nvrtcCompileProgram') # <<<<<<<<<<<<<< + * global __nvrtcGetPTXSize + * __nvrtcGetPTXSize = dlfcn.dlsym(handle, 'nvrtcGetPTXSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram = dlsym(__pyx_v_handle, ((char const *)"nvrtcCompileProgram")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":62 + * __nvrtcCompileProgram = dlfcn.dlsym(handle, 'nvrtcCompileProgram') + * global __nvrtcGetPTXSize + * __nvrtcGetPTXSize = dlfcn.dlsym(handle, 'nvrtcGetPTXSize') # <<<<<<<<<<<<<< + * global __nvrtcGetPTX + * __nvrtcGetPTX = dlfcn.dlsym(handle, 'nvrtcGetPTX') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetPTXSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":64 + * __nvrtcGetPTXSize = dlfcn.dlsym(handle, 'nvrtcGetPTXSize') + * global __nvrtcGetPTX + * __nvrtcGetPTX = dlfcn.dlsym(handle, 'nvrtcGetPTX') # <<<<<<<<<<<<<< + * global __nvrtcGetCUBINSize + * __nvrtcGetCUBINSize = dlfcn.dlsym(handle, 'nvrtcGetCUBINSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetPTX")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":66 + * __nvrtcGetPTX = dlfcn.dlsym(handle, 'nvrtcGetPTX') + * global __nvrtcGetCUBINSize + * __nvrtcGetCUBINSize = dlfcn.dlsym(handle, 'nvrtcGetCUBINSize') # <<<<<<<<<<<<<< + * global __nvrtcGetCUBIN + * __nvrtcGetCUBIN = dlfcn.dlsym(handle, 'nvrtcGetCUBIN') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetCUBINSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":68 + * __nvrtcGetCUBINSize = dlfcn.dlsym(handle, 'nvrtcGetCUBINSize') + * global __nvrtcGetCUBIN + * __nvrtcGetCUBIN = dlfcn.dlsym(handle, 'nvrtcGetCUBIN') # <<<<<<<<<<<<<< + * global __nvrtcGetNVVMSize + * __nvrtcGetNVVMSize = dlfcn.dlsym(handle, 'nvrtcGetNVVMSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetCUBIN")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":70 + * __nvrtcGetCUBIN = dlfcn.dlsym(handle, 'nvrtcGetCUBIN') + * global __nvrtcGetNVVMSize + * __nvrtcGetNVVMSize = dlfcn.dlsym(handle, 'nvrtcGetNVVMSize') # <<<<<<<<<<<<<< + * global __nvrtcGetNVVM + * __nvrtcGetNVVM = dlfcn.dlsym(handle, 'nvrtcGetNVVM') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetNVVMSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":72 + * __nvrtcGetNVVMSize = dlfcn.dlsym(handle, 'nvrtcGetNVVMSize') + * global __nvrtcGetNVVM + * __nvrtcGetNVVM = dlfcn.dlsym(handle, 'nvrtcGetNVVM') # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIRSize + * __nvrtcGetLTOIRSize = dlfcn.dlsym(handle, 'nvrtcGetLTOIRSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetNVVM")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":74 + * __nvrtcGetNVVM = dlfcn.dlsym(handle, 'nvrtcGetNVVM') + * global __nvrtcGetLTOIRSize + * __nvrtcGetLTOIRSize = dlfcn.dlsym(handle, 'nvrtcGetLTOIRSize') # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIR + * __nvrtcGetLTOIR = dlfcn.dlsym(handle, 'nvrtcGetLTOIR') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetLTOIRSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":76 + * __nvrtcGetLTOIRSize = dlfcn.dlsym(handle, 'nvrtcGetLTOIRSize') + * global __nvrtcGetLTOIR + * __nvrtcGetLTOIR = dlfcn.dlsym(handle, 'nvrtcGetLTOIR') # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIRSize + * __nvrtcGetOptiXIRSize = dlfcn.dlsym(handle, 'nvrtcGetOptiXIRSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetLTOIR")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":78 + * __nvrtcGetLTOIR = dlfcn.dlsym(handle, 'nvrtcGetLTOIR') + * global __nvrtcGetOptiXIRSize + * __nvrtcGetOptiXIRSize = dlfcn.dlsym(handle, 'nvrtcGetOptiXIRSize') # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIR + * __nvrtcGetOptiXIR = dlfcn.dlsym(handle, 'nvrtcGetOptiXIR') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetOptiXIRSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":80 + * __nvrtcGetOptiXIRSize = dlfcn.dlsym(handle, 'nvrtcGetOptiXIRSize') + * global __nvrtcGetOptiXIR + * __nvrtcGetOptiXIR = dlfcn.dlsym(handle, 'nvrtcGetOptiXIR') # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLogSize + * __nvrtcGetProgramLogSize = dlfcn.dlsym(handle, 'nvrtcGetProgramLogSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetOptiXIR")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":82 + * __nvrtcGetOptiXIR = dlfcn.dlsym(handle, 'nvrtcGetOptiXIR') + * global __nvrtcGetProgramLogSize + * __nvrtcGetProgramLogSize = dlfcn.dlsym(handle, 'nvrtcGetProgramLogSize') # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLog + * __nvrtcGetProgramLog = dlfcn.dlsym(handle, 'nvrtcGetProgramLog') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetProgramLogSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":84 + * __nvrtcGetProgramLogSize = dlfcn.dlsym(handle, 'nvrtcGetProgramLogSize') + * global __nvrtcGetProgramLog + * __nvrtcGetProgramLog = dlfcn.dlsym(handle, 'nvrtcGetProgramLog') # <<<<<<<<<<<<<< + * global __nvrtcAddNameExpression + * __nvrtcAddNameExpression = dlfcn.dlsym(handle, 'nvrtcAddNameExpression') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetProgramLog")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":86 + * __nvrtcGetProgramLog = dlfcn.dlsym(handle, 'nvrtcGetProgramLog') + * global __nvrtcAddNameExpression + * __nvrtcAddNameExpression = dlfcn.dlsym(handle, 'nvrtcAddNameExpression') # <<<<<<<<<<<<<< + * global __nvrtcGetLoweredName + * __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression = dlsym(__pyx_v_handle, ((char const *)"nvrtcAddNameExpression")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":88 + * __nvrtcAddNameExpression = dlfcn.dlsym(handle, 'nvrtcAddNameExpression') + * global __nvrtcGetLoweredName + * __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSize + * __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetLoweredName")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":90 + * __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') + * global __nvrtcGetPCHHeapSize + * __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') # <<<<<<<<<<<<<< + * global __nvrtcSetPCHHeapSize + * __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetPCHHeapSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":92 + * __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') + * global __nvrtcSetPCHHeapSize + * __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') # <<<<<<<<<<<<<< + * global __nvrtcGetPCHCreateStatus + * __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize = dlsym(__pyx_v_handle, ((char const *)"nvrtcSetPCHHeapSize")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":94 + * __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') + * global __nvrtcGetPCHCreateStatus + * __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSizeRequired + * __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetPCHCreateStatus")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":96 + * __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') + * global __nvrtcGetPCHHeapSizeRequired + * __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') # <<<<<<<<<<<<<< + * global __nvrtcSetFlowCallback + * __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired = dlsym(__pyx_v_handle, ((char const *)"nvrtcGetPCHHeapSizeRequired")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":98 + * __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') + * global __nvrtcSetFlowCallback + * __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') # <<<<<<<<<<<<<< + * __cuPythonInit = True + * return 0 +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback = dlsym(__pyx_v_handle, ((char const *)"nvrtcSetFlowCallback")); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":99 + * global __nvrtcSetFlowCallback + * __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') + * __cuPythonInit = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___cuPythonInit = 1; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":100 + * __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') + * __cuPythonInit = True + * return 0 # <<<<<<<<<<<<<< + * + * # Create a very small function to check whether we are init'ed, so the C +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":43 + * + * # Load library + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * handle = (load_nvidia_dynamic_lib("nvrtc")._handle_uint) + * +*/ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 43, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __pyx_t_10 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 43, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (__pyx_t_12 < (0)) __PYX_ERR(0, 43, __pyx_L12_except_error) + __pyx_t_13 = (!__pyx_t_12); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_4); + __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; + __PYX_ERR(0, 43, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_14 = __pyx_r; + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 43, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_14; + goto __pyx_L3_return; + } + __pyx_L9:; + } + goto __pyx_L19; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_error; + __pyx_L19:; + } + } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L3_return: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L0; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":39 + * cdef void *__nvrtcSetFlowCallback = NULL + * + * cdef int _cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cuPythonInit + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":104 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cuPythonInit: + * return 0 +*/ + +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":105 + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: # <<<<<<<<<<<<<< + * return 0 + * return _cuPythonInit() +*/ + if (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___cuPythonInit) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":106 + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: + * return 0 # <<<<<<<<<<<<<< + * return _cuPythonInit() + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":105 + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: + * if __cuPythonInit: # <<<<<<<<<<<<<< + * return 0 + * return _cuPythonInit() +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":107 + * if __cuPythonInit: + * return 0 + * return _cuPythonInit() # <<<<<<<<<<<<<< + * + * cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":104 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cuPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cuPythonInit: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc.cuPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":109 + * return _cuPythonInit() + * + * cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetErrorString + * cuPythonInit() +*/ + +static char const *__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetErrorString(nvrtcResult __pyx_v_result) { + char const *__pyx_v_err; + char const *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + char const *__pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetErrorString", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":111 + * cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: + * global __nvrtcGetErrorString + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetErrorString == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":112 + * global __nvrtcGetErrorString + * cuPythonInit() + * if __nvrtcGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetErrorString" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":113 + * cuPythonInit() + * if __nvrtcGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetErrorString" not found') + * err = ( __nvrtcGetErrorString)(result) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":114 + * if __nvrtcGetErrorString == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetErrorString" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetErrorString)(result) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetErrorString_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 114, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":113 + * cuPythonInit() + * if __nvrtcGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetErrorString" not found') + * err = ( __nvrtcGetErrorString)(result) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":112 + * global __nvrtcGetErrorString + * cuPythonInit() + * if __nvrtcGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetErrorString" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":115 + * with gil: + * raise RuntimeError('Function "nvrtcGetErrorString" not found') + * err = ( __nvrtcGetErrorString)(result) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((char const *(*)(nvrtcResult))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString)(__pyx_v_result); if (unlikely(__pyx_t_7 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":116 + * raise RuntimeError('Function "nvrtcGetErrorString" not found') + * err = ( __nvrtcGetErrorString)(result) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":109 + * return _cuPythonInit() + * + * cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetErrorString + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":118 + * return err + * + * cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcVersion + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcVersion(int *__pyx_v_major, int *__pyx_v_minor) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcVersion", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":120 + * cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcVersion + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 120, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":121 + * global __nvrtcVersion + * cuPythonInit() + * if __nvrtcVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcVersion" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":122 + * cuPythonInit() + * if __nvrtcVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcVersion" not found') + * err = ( __nvrtcVersion)(major, minor) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":123 + * if __nvrtcVersion == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcVersion" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcVersion)(major, minor) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcVersion_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 123, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":122 + * cuPythonInit() + * if __nvrtcVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcVersion" not found') + * err = ( __nvrtcVersion)(major, minor) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":121 + * global __nvrtcVersion + * cuPythonInit() + * if __nvrtcVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcVersion" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":124 + * with gil: + * raise RuntimeError('Function "nvrtcVersion" not found') + * err = ( __nvrtcVersion)(major, minor) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(int *, int *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion)(__pyx_v_major, __pyx_v_minor); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":125 + * raise RuntimeError('Function "nvrtcVersion" not found') + * err = ( __nvrtcVersion)(major, minor) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":118 + * return err + * + * cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcVersion + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":127 + * return err + * + * cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNumSupportedArchs + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNumSupportedArchs(int *__pyx_v_numArchs) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetNumSupportedArchs", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":129 + * cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetNumSupportedArchs + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetNumSupportedArchs == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":130 + * global __nvrtcGetNumSupportedArchs + * cuPythonInit() + * if __nvrtcGetNumSupportedArchs == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":131 + * cuPythonInit() + * if __nvrtcGetNumSupportedArchs == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') + * err = ( __nvrtcGetNumSupportedArchs)(numArchs) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":132 + * if __nvrtcGetNumSupportedArchs == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetNumSupportedArchs)(numArchs) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetNumSupportedArc}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 132, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":131 + * cuPythonInit() + * if __nvrtcGetNumSupportedArchs == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') + * err = ( __nvrtcGetNumSupportedArchs)(numArchs) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":130 + * global __nvrtcGetNumSupportedArchs + * cuPythonInit() + * if __nvrtcGetNumSupportedArchs == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":133 + * with gil: + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') + * err = ( __nvrtcGetNumSupportedArchs)(numArchs) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(int *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs)(__pyx_v_numArchs); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":134 + * raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') + * err = ( __nvrtcGetNumSupportedArchs)(numArchs) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":127 + * return err + * + * cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNumSupportedArchs + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetNumSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":136 + * return err + * + * cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetSupportedArchs + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetSupportedArchs(int *__pyx_v_supportedArchs) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetSupportedArchs", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":138 + * cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetSupportedArchs + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetSupportedArchs == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 138, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":139 + * global __nvrtcGetSupportedArchs + * cuPythonInit() + * if __nvrtcGetSupportedArchs == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":140 + * cuPythonInit() + * if __nvrtcGetSupportedArchs == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') + * err = ( __nvrtcGetSupportedArchs)(supportedArchs) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":141 + * if __nvrtcGetSupportedArchs == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetSupportedArchs)(supportedArchs) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetSupportedArchs}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 141, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":140 + * cuPythonInit() + * if __nvrtcGetSupportedArchs == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') + * err = ( __nvrtcGetSupportedArchs)(supportedArchs) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":139 + * global __nvrtcGetSupportedArchs + * cuPythonInit() + * if __nvrtcGetSupportedArchs == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":142 + * with gil: + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') + * err = ( __nvrtcGetSupportedArchs)(supportedArchs) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(int *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs)(__pyx_v_supportedArchs); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":143 + * raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') + * err = ( __nvrtcGetSupportedArchs)(supportedArchs) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":136 + * return err + * + * cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetSupportedArchs + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":145 + * return err + * + * cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcCreateProgram + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCreateProgram(nvrtcProgram *__pyx_v_prog, char const *__pyx_v_src, char const *__pyx_v_name, int __pyx_v_numHeaders, char const **__pyx_v_headers, char const **__pyx_v_includeNames) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcCreateProgram", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":147 + * cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcCreateProgram + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcCreateProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 147, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":148 + * global __nvrtcCreateProgram + * cuPythonInit() + * if __nvrtcCreateProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcCreateProgram" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":149 + * cuPythonInit() + * if __nvrtcCreateProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcCreateProgram" not found') + * err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":150 + * if __nvrtcCreateProgram == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcCreateProgram" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcCreateProgram_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 150, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":149 + * cuPythonInit() + * if __nvrtcCreateProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcCreateProgram" not found') + * err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":148 + * global __nvrtcCreateProgram + * cuPythonInit() + * if __nvrtcCreateProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcCreateProgram" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":151 + * with gil: + * raise RuntimeError('Function "nvrtcCreateProgram" not found') + * err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram *, char const *, char const *, int, char const **, char const **))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram)(__pyx_v_prog, __pyx_v_src, __pyx_v_name, __pyx_v_numHeaders, __pyx_v_headers, __pyx_v_includeNames); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":152 + * raise RuntimeError('Function "nvrtcCreateProgram" not found') + * err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":145 + * return err + * + * cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcCreateProgram + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":154 + * return err + * + * cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcDestroyProgram + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcDestroyProgram(nvrtcProgram *__pyx_v_prog) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcDestroyProgram", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":156 + * cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcDestroyProgram + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcDestroyProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 156, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":157 + * global __nvrtcDestroyProgram + * cuPythonInit() + * if __nvrtcDestroyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":158 + * cuPythonInit() + * if __nvrtcDestroyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') + * err = ( __nvrtcDestroyProgram)(prog) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":159 + * if __nvrtcDestroyProgram == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcDestroyProgram)(prog) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcDestroyProgram_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 159, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":158 + * cuPythonInit() + * if __nvrtcDestroyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') + * err = ( __nvrtcDestroyProgram)(prog) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":157 + * global __nvrtcDestroyProgram + * cuPythonInit() + * if __nvrtcDestroyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":160 + * with gil: + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') + * err = ( __nvrtcDestroyProgram)(prog) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram)(__pyx_v_prog); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":161 + * raise RuntimeError('Function "nvrtcDestroyProgram" not found') + * err = ( __nvrtcDestroyProgram)(prog) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":154 + * return err + * + * cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcDestroyProgram + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":163 + * return err + * + * cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcCompileProgram + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCompileProgram(nvrtcProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcCompileProgram", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":165 + * cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcCompileProgram + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcCompileProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 165, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":166 + * global __nvrtcCompileProgram + * cuPythonInit() + * if __nvrtcCompileProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcCompileProgram" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":167 + * cuPythonInit() + * if __nvrtcCompileProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcCompileProgram" not found') + * err = ( __nvrtcCompileProgram)(prog, numOptions, options) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":168 + * if __nvrtcCompileProgram == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcCompileProgram" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcCompileProgram)(prog, numOptions, options) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcCompileProgram_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 168, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":167 + * cuPythonInit() + * if __nvrtcCompileProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcCompileProgram" not found') + * err = ( __nvrtcCompileProgram)(prog, numOptions, options) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":166 + * global __nvrtcCompileProgram + * cuPythonInit() + * if __nvrtcCompileProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcCompileProgram" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":169 + * with gil: + * raise RuntimeError('Function "nvrtcCompileProgram" not found') + * err = ( __nvrtcCompileProgram)(prog, numOptions, options) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, int, char const **))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram)(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":170 + * raise RuntimeError('Function "nvrtcCompileProgram" not found') + * err = ( __nvrtcCompileProgram)(prog, numOptions, options) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":163 + * return err + * + * cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcCompileProgram + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":172 + * return err + * + * cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPTXSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTXSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_ptxSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetPTXSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":174 + * cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetPTXSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetPTXSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":175 + * global __nvrtcGetPTXSize + * cuPythonInit() + * if __nvrtcGetPTXSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":176 + * cuPythonInit() + * if __nvrtcGetPTXSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') + * err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":177 + * if __nvrtcGetPTXSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetPTXSize_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 177, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":176 + * cuPythonInit() + * if __nvrtcGetPTXSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') + * err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":175 + * global __nvrtcGetPTXSize + * cuPythonInit() + * if __nvrtcGetPTXSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":178 + * with gil: + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') + * err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize)(__pyx_v_prog, __pyx_v_ptxSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":179 + * raise RuntimeError('Function "nvrtcGetPTXSize" not found') + * err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":172 + * return err + * + * cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPTXSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetPTXSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":181 + * return err + * + * cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPTX + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTX(nvrtcProgram __pyx_v_prog, char *__pyx_v_ptx) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetPTX", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":183 + * cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetPTX + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetPTX == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 183, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":184 + * global __nvrtcGetPTX + * cuPythonInit() + * if __nvrtcGetPTX == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPTX" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":185 + * cuPythonInit() + * if __nvrtcGetPTX == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPTX" not found') + * err = ( __nvrtcGetPTX)(prog, ptx) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":186 + * if __nvrtcGetPTX == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetPTX" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetPTX)(prog, ptx) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetPTX_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 186, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":185 + * cuPythonInit() + * if __nvrtcGetPTX == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPTX" not found') + * err = ( __nvrtcGetPTX)(prog, ptx) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":184 + * global __nvrtcGetPTX + * cuPythonInit() + * if __nvrtcGetPTX == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPTX" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":187 + * with gil: + * raise RuntimeError('Function "nvrtcGetPTX" not found') + * err = ( __nvrtcGetPTX)(prog, ptx) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX)(__pyx_v_prog, __pyx_v_ptx); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":188 + * raise RuntimeError('Function "nvrtcGetPTX" not found') + * err = ( __nvrtcGetPTX)(prog, ptx) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":181 + * return err + * + * cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPTX + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetPTX", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":190 + * return err + * + * cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetCUBINSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBINSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_cubinSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetCUBINSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":192 + * cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetCUBINSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetCUBINSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":193 + * global __nvrtcGetCUBINSize + * cuPythonInit() + * if __nvrtcGetCUBINSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":194 + * cuPythonInit() + * if __nvrtcGetCUBINSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') + * err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":195 + * if __nvrtcGetCUBINSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetCUBINSize_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 195, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":194 + * cuPythonInit() + * if __nvrtcGetCUBINSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') + * err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":193 + * global __nvrtcGetCUBINSize + * cuPythonInit() + * if __nvrtcGetCUBINSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":196 + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') + * err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize)(__pyx_v_prog, __pyx_v_cubinSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":197 + * raise RuntimeError('Function "nvrtcGetCUBINSize" not found') + * err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":190 + * return err + * + * cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetCUBINSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetCUBINSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":199 + * return err + * + * cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetCUBIN + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBIN(nvrtcProgram __pyx_v_prog, char *__pyx_v_cubin) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetCUBIN", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":201 + * cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetCUBIN + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetCUBIN == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 201, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":202 + * global __nvrtcGetCUBIN + * cuPythonInit() + * if __nvrtcGetCUBIN == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":203 + * cuPythonInit() + * if __nvrtcGetCUBIN == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') + * err = ( __nvrtcGetCUBIN)(prog, cubin) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":204 + * if __nvrtcGetCUBIN == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetCUBIN)(prog, cubin) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetCUBIN_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 204, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":203 + * cuPythonInit() + * if __nvrtcGetCUBIN == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') + * err = ( __nvrtcGetCUBIN)(prog, cubin) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":202 + * global __nvrtcGetCUBIN + * cuPythonInit() + * if __nvrtcGetCUBIN == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":205 + * with gil: + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') + * err = ( __nvrtcGetCUBIN)(prog, cubin) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN)(__pyx_v_prog, __pyx_v_cubin); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":206 + * raise RuntimeError('Function "nvrtcGetCUBIN" not found') + * err = ( __nvrtcGetCUBIN)(prog, cubin) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":199 + * return err + * + * cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetCUBIN + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetCUBIN", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":208 + * return err + * + * cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNVVMSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVMSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_nvvmSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetNVVMSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":210 + * cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetNVVMSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetNVVMSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":211 + * global __nvrtcGetNVVMSize + * cuPythonInit() + * if __nvrtcGetNVVMSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":212 + * cuPythonInit() + * if __nvrtcGetNVVMSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') + * err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":213 + * if __nvrtcGetNVVMSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetNVVMSize_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 213, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":212 + * cuPythonInit() + * if __nvrtcGetNVVMSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') + * err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":211 + * global __nvrtcGetNVVMSize + * cuPythonInit() + * if __nvrtcGetNVVMSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":214 + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') + * err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize)(__pyx_v_prog, __pyx_v_nvvmSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":215 + * raise RuntimeError('Function "nvrtcGetNVVMSize" not found') + * err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":208 + * return err + * + * cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNVVMSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetNVVMSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":217 + * return err + * + * cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNVVM + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVM(nvrtcProgram __pyx_v_prog, char *__pyx_v_nvvm) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetNVVM", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":219 + * cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetNVVM + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetNVVM == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":220 + * global __nvrtcGetNVVM + * cuPythonInit() + * if __nvrtcGetNVVM == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVM" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":221 + * cuPythonInit() + * if __nvrtcGetNVVM == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNVVM" not found') + * err = ( __nvrtcGetNVVM)(prog, nvvm) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":222 + * if __nvrtcGetNVVM == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVM" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetNVVM)(prog, nvvm) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetNVVM_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 222, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":221 + * cuPythonInit() + * if __nvrtcGetNVVM == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetNVVM" not found') + * err = ( __nvrtcGetNVVM)(prog, nvvm) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":220 + * global __nvrtcGetNVVM + * cuPythonInit() + * if __nvrtcGetNVVM == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVM" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":223 + * with gil: + * raise RuntimeError('Function "nvrtcGetNVVM" not found') + * err = ( __nvrtcGetNVVM)(prog, nvvm) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM)(__pyx_v_prog, __pyx_v_nvvm); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":224 + * raise RuntimeError('Function "nvrtcGetNVVM" not found') + * err = ( __nvrtcGetNVVM)(prog, nvvm) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":217 + * return err + * + * cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetNVVM + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetNVVM", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":226 + * return err + * + * cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIRSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIRSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_LTOIRSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetLTOIRSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":228 + * cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetLTOIRSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetLTOIRSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 228, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":229 + * global __nvrtcGetLTOIRSize + * cuPythonInit() + * if __nvrtcGetLTOIRSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":230 + * cuPythonInit() + * if __nvrtcGetLTOIRSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') + * err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":231 + * if __nvrtcGetLTOIRSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetLTOIRSize_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 231, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":230 + * cuPythonInit() + * if __nvrtcGetLTOIRSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') + * err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":229 + * global __nvrtcGetLTOIRSize + * cuPythonInit() + * if __nvrtcGetLTOIRSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":232 + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') + * err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize)(__pyx_v_prog, __pyx_v_LTOIRSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":233 + * raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') + * err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":226 + * return err + * + * cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIRSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetLTOIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":235 + * return err + * + * cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIR + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIR(nvrtcProgram __pyx_v_prog, char *__pyx_v_LTOIR) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetLTOIR", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":237 + * cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetLTOIR + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetLTOIR == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 237, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":238 + * global __nvrtcGetLTOIR + * cuPythonInit() + * if __nvrtcGetLTOIR == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":239 + * cuPythonInit() + * if __nvrtcGetLTOIR == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') + * err = ( __nvrtcGetLTOIR)(prog, LTOIR) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":240 + * if __nvrtcGetLTOIR == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetLTOIR)(prog, LTOIR) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetLTOIR_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 240, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":239 + * cuPythonInit() + * if __nvrtcGetLTOIR == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') + * err = ( __nvrtcGetLTOIR)(prog, LTOIR) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":238 + * global __nvrtcGetLTOIR + * cuPythonInit() + * if __nvrtcGetLTOIR == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":241 + * with gil: + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') + * err = ( __nvrtcGetLTOIR)(prog, LTOIR) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR)(__pyx_v_prog, __pyx_v_LTOIR); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":242 + * raise RuntimeError('Function "nvrtcGetLTOIR" not found') + * err = ( __nvrtcGetLTOIR)(prog, LTOIR) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":235 + * return err + * + * cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIR + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetLTOIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":244 + * return err + * + * cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIRSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIRSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_optixirSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetOptiXIRSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":246 + * cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetOptiXIRSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetOptiXIRSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 246, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":247 + * global __nvrtcGetOptiXIRSize + * cuPythonInit() + * if __nvrtcGetOptiXIRSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":248 + * cuPythonInit() + * if __nvrtcGetOptiXIRSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') + * err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":249 + * if __nvrtcGetOptiXIRSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetOptiXIRSize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 249, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":248 + * cuPythonInit() + * if __nvrtcGetOptiXIRSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') + * err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":247 + * global __nvrtcGetOptiXIRSize + * cuPythonInit() + * if __nvrtcGetOptiXIRSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":250 + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') + * err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize)(__pyx_v_prog, __pyx_v_optixirSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":251 + * raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') + * err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":244 + * return err + * + * cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIRSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetOptiXIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":253 + * return err + * + * cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIR + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIR(nvrtcProgram __pyx_v_prog, char *__pyx_v_optixir) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetOptiXIR", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":255 + * cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetOptiXIR + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetOptiXIR == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 255, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":256 + * global __nvrtcGetOptiXIR + * cuPythonInit() + * if __nvrtcGetOptiXIR == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":257 + * cuPythonInit() + * if __nvrtcGetOptiXIR == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') + * err = ( __nvrtcGetOptiXIR)(prog, optixir) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":258 + * if __nvrtcGetOptiXIR == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetOptiXIR)(prog, optixir) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetOptiXIR_not_fou}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 258, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":257 + * cuPythonInit() + * if __nvrtcGetOptiXIR == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') + * err = ( __nvrtcGetOptiXIR)(prog, optixir) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":256 + * global __nvrtcGetOptiXIR + * cuPythonInit() + * if __nvrtcGetOptiXIR == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":259 + * with gil: + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') + * err = ( __nvrtcGetOptiXIR)(prog, optixir) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR)(__pyx_v_prog, __pyx_v_optixir); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":260 + * raise RuntimeError('Function "nvrtcGetOptiXIR" not found') + * err = ( __nvrtcGetOptiXIR)(prog, optixir) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":253 + * return err + * + * cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIR + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetOptiXIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":262 + * return err + * + * cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLogSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLogSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_logSizeRet) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetProgramLogSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":264 + * cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetProgramLogSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetProgramLogSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 264, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":265 + * global __nvrtcGetProgramLogSize + * cuPythonInit() + * if __nvrtcGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":266 + * cuPythonInit() + * if __nvrtcGetProgramLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') + * err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":267 + * if __nvrtcGetProgramLogSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetProgramLogSize}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 267, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":266 + * cuPythonInit() + * if __nvrtcGetProgramLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') + * err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":265 + * global __nvrtcGetProgramLogSize + * cuPythonInit() + * if __nvrtcGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":268 + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') + * err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize)(__pyx_v_prog, __pyx_v_logSizeRet); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":269 + * raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') + * err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":262 + * return err + * + * cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLogSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":271 + * return err + * + * cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLog + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLog(nvrtcProgram __pyx_v_prog, char *__pyx_v_log) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetProgramLog", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":273 + * cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetProgramLog + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetProgramLog == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 273, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":274 + * global __nvrtcGetProgramLog + * cuPythonInit() + * if __nvrtcGetProgramLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":275 + * cuPythonInit() + * if __nvrtcGetProgramLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') + * err = ( __nvrtcGetProgramLog)(prog, log) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":276 + * if __nvrtcGetProgramLog == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetProgramLog)(prog, log) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetProgramLog_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 276, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":275 + * cuPythonInit() + * if __nvrtcGetProgramLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') + * err = ( __nvrtcGetProgramLog)(prog, log) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":274 + * global __nvrtcGetProgramLog + * cuPythonInit() + * if __nvrtcGetProgramLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":277 + * with gil: + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') + * err = ( __nvrtcGetProgramLog)(prog, log) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog)(__pyx_v_prog, __pyx_v_log); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":278 + * raise RuntimeError('Function "nvrtcGetProgramLog" not found') + * err = ( __nvrtcGetProgramLog)(prog, log) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":271 + * return err + * + * cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLog + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":280 + * return err + * + * cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcAddNameExpression + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcAddNameExpression(nvrtcProgram __pyx_v_prog, char const *__pyx_v_name_expression) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcAddNameExpression", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":282 + * cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcAddNameExpression + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcAddNameExpression == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 282, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":283 + * global __nvrtcAddNameExpression + * cuPythonInit() + * if __nvrtcAddNameExpression == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":284 + * cuPythonInit() + * if __nvrtcAddNameExpression == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') + * err = ( __nvrtcAddNameExpression)(prog, name_expression) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":285 + * if __nvrtcAddNameExpression == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcAddNameExpression)(prog, name_expression) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcAddNameExpression}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 285, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":284 + * cuPythonInit() + * if __nvrtcAddNameExpression == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') + * err = ( __nvrtcAddNameExpression)(prog, name_expression) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":283 + * global __nvrtcAddNameExpression + * cuPythonInit() + * if __nvrtcAddNameExpression == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":286 + * with gil: + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') + * err = ( __nvrtcAddNameExpression)(prog, name_expression) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char const *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression)(__pyx_v_prog, __pyx_v_name_expression); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":287 + * raise RuntimeError('Function "nvrtcAddNameExpression" not found') + * err = ( __nvrtcAddNameExpression)(prog, name_expression) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":280 + * return err + * + * cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcAddNameExpression + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcAddNameExpression", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":289 + * return err + * + * cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLoweredName + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLoweredName(nvrtcProgram __pyx_v_prog, char const *__pyx_v_name_expression, char const **__pyx_v_lowered_name) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetLoweredName", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":291 + * cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetLoweredName + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetLoweredName == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 291, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":292 + * global __nvrtcGetLoweredName + * cuPythonInit() + * if __nvrtcGetLoweredName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":293 + * cuPythonInit() + * if __nvrtcGetLoweredName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') + * err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":294 + * if __nvrtcGetLoweredName == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetLoweredName_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 294, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":293 + * cuPythonInit() + * if __nvrtcGetLoweredName == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') + * err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":292 + * global __nvrtcGetLoweredName + * cuPythonInit() + * if __nvrtcGetLoweredName == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":295 + * with gil: + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') + * err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, char const *, char const **))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName)(__pyx_v_prog, __pyx_v_name_expression, __pyx_v_lowered_name); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":296 + * raise RuntimeError('Function "nvrtcGetLoweredName" not found') + * err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":289 + * return err + * + * cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetLoweredName + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetLoweredName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":298 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSize(size_t *__pyx_v_ret) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetPCHHeapSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":300 + * cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetPCHHeapSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetPCHHeapSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 300, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":301 + * global __nvrtcGetPCHHeapSize + * cuPythonInit() + * if __nvrtcGetPCHHeapSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":302 + * cuPythonInit() + * if __nvrtcGetPCHHeapSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + * err = ( __nvrtcGetPCHHeapSize)(ret) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":303 + * if __nvrtcGetPCHHeapSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetPCHHeapSize)(ret) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetPCHHeapSize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 303, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":302 + * cuPythonInit() + * if __nvrtcGetPCHHeapSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + * err = ( __nvrtcGetPCHHeapSize)(ret) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":301 + * global __nvrtcGetPCHHeapSize + * cuPythonInit() + * if __nvrtcGetPCHHeapSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":304 + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + * err = ( __nvrtcGetPCHHeapSize)(ret) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize)(__pyx_v_ret); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":305 + * raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + * err = ( __nvrtcGetPCHHeapSize)(ret) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":298 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":307 + * return err + * + * cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcSetPCHHeapSize + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetPCHHeapSize(size_t __pyx_v_size) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcSetPCHHeapSize", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":309 + * cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcSetPCHHeapSize + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcSetPCHHeapSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 309, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":310 + * global __nvrtcSetPCHHeapSize + * cuPythonInit() + * if __nvrtcSetPCHHeapSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":311 + * cuPythonInit() + * if __nvrtcSetPCHHeapSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + * err = ( __nvrtcSetPCHHeapSize)(size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":312 + * if __nvrtcSetPCHHeapSize == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcSetPCHHeapSize)(size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcSetPCHHeapSize_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 312, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":311 + * cuPythonInit() + * if __nvrtcSetPCHHeapSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + * err = ( __nvrtcSetPCHHeapSize)(size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":310 + * global __nvrtcSetPCHHeapSize + * cuPythonInit() + * if __nvrtcSetPCHHeapSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":313 + * with gil: + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + * err = ( __nvrtcSetPCHHeapSize)(size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(size_t))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize)(__pyx_v_size); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":314 + * raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + * err = ( __nvrtcSetPCHHeapSize)(size) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":307 + * return err + * + * cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcSetPCHHeapSize + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcSetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":316 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHCreateStatus + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHCreateStatus(nvrtcProgram __pyx_v_prog) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetPCHCreateStatus", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":318 + * cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetPCHCreateStatus + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetPCHCreateStatus == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":319 + * global __nvrtcGetPCHCreateStatus + * cuPythonInit() + * if __nvrtcGetPCHCreateStatus == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":320 + * cuPythonInit() + * if __nvrtcGetPCHCreateStatus == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + * err = ( __nvrtcGetPCHCreateStatus)(prog) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":321 + * if __nvrtcGetPCHCreateStatus == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetPCHCreateStatus)(prog) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetPCHCreateStatus}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 321, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":320 + * cuPythonInit() + * if __nvrtcGetPCHCreateStatus == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + * err = ( __nvrtcGetPCHCreateStatus)(prog) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":319 + * global __nvrtcGetPCHCreateStatus + * cuPythonInit() + * if __nvrtcGetPCHCreateStatus == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":322 + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + * err = ( __nvrtcGetPCHCreateStatus)(prog) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus)(__pyx_v_prog); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":323 + * raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + * err = ( __nvrtcGetPCHCreateStatus)(prog) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":316 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHCreateStatus + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetPCHCreateStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":325 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSizeRequired + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSizeRequired(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_size) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcGetPCHHeapSizeRequired", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":327 + * cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcGetPCHHeapSizeRequired + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcGetPCHHeapSizeRequired == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 327, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":328 + * global __nvrtcGetPCHHeapSizeRequired + * cuPythonInit() + * if __nvrtcGetPCHHeapSizeRequired == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":329 + * cuPythonInit() + * if __nvrtcGetPCHHeapSizeRequired == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + * err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":330 + * if __nvrtcGetPCHHeapSizeRequired == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcGetPCHHeapSizeRequ}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 330, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":329 + * cuPythonInit() + * if __nvrtcGetPCHHeapSizeRequired == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + * err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":328 + * global __nvrtcGetPCHHeapSizeRequired + * cuPythonInit() + * if __nvrtcGetPCHHeapSizeRequired == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":331 + * with gil: + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + * err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, size_t *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired)(__pyx_v_prog, __pyx_v_size); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":332 + * raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + * err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) + * return err # <<<<<<<<<<<<<< + * + * cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":325 + * return err + * + * cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSizeRequired + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcGetPCHHeapSizeRequired", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":334 + * return err + * + * cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcSetFlowCallback + * cuPythonInit() +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetFlowCallback(nvrtcProgram __pyx_v_prog, void *__pyx_v_callback, void *__pyx_v_payload) { + nvrtcResult __pyx_v_err; + nvrtcResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvrtcSetFlowCallback", 1); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":336 + * cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * global __nvrtcSetFlowCallback + * cuPythonInit() # <<<<<<<<<<<<<< + * if __nvrtcSetFlowCallback == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 336, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":337 + * global __nvrtcSetFlowCallback + * cuPythonInit() + * if __nvrtcSetFlowCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":338 + * cuPythonInit() + * if __nvrtcSetFlowCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + * err = ( __nvrtcSetFlowCallback)(prog, callback, payload) +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":339 + * if __nvrtcSetFlowCallback == NULL: + * with gil: + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') # <<<<<<<<<<<<<< + * err = ( __nvrtcSetFlowCallback)(prog, callback, payload) + * return err +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Function_nvrtcSetFlowCallback_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 339, __pyx_L5_error) + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":338 + * cuPythonInit() + * if __nvrtcSetFlowCallback == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + * err = ( __nvrtcSetFlowCallback)(prog, callback, payload) +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":337 + * global __nvrtcSetFlowCallback + * cuPythonInit() + * if __nvrtcSetFlowCallback == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":340 + * with gil: + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + * err = ( __nvrtcSetFlowCallback)(prog, callback, payload) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = ((nvrtcResult (*)(nvrtcProgram, void *, void *))__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback)(__pyx_v_prog, __pyx_v_callback, __pyx_v_payload); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_v_err = __pyx_t_7; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":341 + * raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + * err = ( __nvrtcSetFlowCallback)(prog, callback, payload) + * return err # <<<<<<<<<<<<<< + * + * cdef dict func_ptrs = None +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":334 + * return err + * + * cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * global __nvrtcSetFlowCallback + * cuPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._nvrtcSetFlowCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":345 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_data = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":347 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs != ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":348 + * global func_ptrs + * if func_ptrs is not None: + * return func_ptrs # <<<<<<<<<<<<<< + * + * cuPythonInit() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs); + __pyx_r = __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":347 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":350 + * return func_ptrs + * + * cuPythonInit() # <<<<<<<<<<<<<< + * cdef dict data = {} + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc_cuPythonInit(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 350, __pyx_L1_error) + + /* "cuda/bindings/_bindings/cynvrtc.pyx":351 + * + * cuPythonInit() + * cdef dict data = {} # <<<<<<<<<<<<<< + * + * global __nvrtcGetErrorString +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_data = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":354 + * + * global __nvrtcGetErrorString + * data["__nvrtcGetErrorString"] = __nvrtcGetErrorString # <<<<<<<<<<<<<< + * global __nvrtcVersion + * data["__nvrtcVersion"] = __nvrtcVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetErrorString, __pyx_t_3) < 0))) __PYX_ERR(0, 354, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":356 + * data["__nvrtcGetErrorString"] = __nvrtcGetErrorString + * global __nvrtcVersion + * data["__nvrtcVersion"] = __nvrtcVersion # <<<<<<<<<<<<<< + * global __nvrtcGetNumSupportedArchs + * data["__nvrtcGetNumSupportedArchs"] = __nvrtcGetNumSupportedArchs +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":358 + * data["__nvrtcVersion"] = __nvrtcVersion + * global __nvrtcGetNumSupportedArchs + * data["__nvrtcGetNumSupportedArchs"] = __nvrtcGetNumSupportedArchs # <<<<<<<<<<<<<< + * global __nvrtcGetSupportedArchs + * data["__nvrtcGetSupportedArchs"] = __nvrtcGetSupportedArchs +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetNumSupportedArchs, __pyx_t_3) < 0))) __PYX_ERR(0, 358, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":360 + * data["__nvrtcGetNumSupportedArchs"] = __nvrtcGetNumSupportedArchs + * global __nvrtcGetSupportedArchs + * data["__nvrtcGetSupportedArchs"] = __nvrtcGetSupportedArchs # <<<<<<<<<<<<<< + * global __nvrtcCreateProgram + * data["__nvrtcCreateProgram"] = __nvrtcCreateProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetSupportedArchs, __pyx_t_3) < 0))) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":362 + * data["__nvrtcGetSupportedArchs"] = __nvrtcGetSupportedArchs + * global __nvrtcCreateProgram + * data["__nvrtcCreateProgram"] = __nvrtcCreateProgram # <<<<<<<<<<<<<< + * global __nvrtcDestroyProgram + * data["__nvrtcDestroyProgram"] = __nvrtcDestroyProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcCreateProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":364 + * data["__nvrtcCreateProgram"] = __nvrtcCreateProgram + * global __nvrtcDestroyProgram + * data["__nvrtcDestroyProgram"] = __nvrtcDestroyProgram # <<<<<<<<<<<<<< + * global __nvrtcCompileProgram + * data["__nvrtcCompileProgram"] = __nvrtcCompileProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcDestroyProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":366 + * data["__nvrtcDestroyProgram"] = __nvrtcDestroyProgram + * global __nvrtcCompileProgram + * data["__nvrtcCompileProgram"] = __nvrtcCompileProgram # <<<<<<<<<<<<<< + * global __nvrtcGetPTXSize + * data["__nvrtcGetPTXSize"] = __nvrtcGetPTXSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcCompileProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":368 + * data["__nvrtcCompileProgram"] = __nvrtcCompileProgram + * global __nvrtcGetPTXSize + * data["__nvrtcGetPTXSize"] = __nvrtcGetPTXSize # <<<<<<<<<<<<<< + * global __nvrtcGetPTX + * data["__nvrtcGetPTX"] = __nvrtcGetPTX +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTXSize, __pyx_t_3) < 0))) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":370 + * data["__nvrtcGetPTXSize"] = __nvrtcGetPTXSize + * global __nvrtcGetPTX + * data["__nvrtcGetPTX"] = __nvrtcGetPTX # <<<<<<<<<<<<<< + * global __nvrtcGetCUBINSize + * data["__nvrtcGetCUBINSize"] = __nvrtcGetCUBINSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTX, __pyx_t_3) < 0))) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":372 + * data["__nvrtcGetPTX"] = __nvrtcGetPTX + * global __nvrtcGetCUBINSize + * data["__nvrtcGetCUBINSize"] = __nvrtcGetCUBINSize # <<<<<<<<<<<<<< + * global __nvrtcGetCUBIN + * data["__nvrtcGetCUBIN"] = __nvrtcGetCUBIN +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBINSize, __pyx_t_3) < 0))) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":374 + * data["__nvrtcGetCUBINSize"] = __nvrtcGetCUBINSize + * global __nvrtcGetCUBIN + * data["__nvrtcGetCUBIN"] = __nvrtcGetCUBIN # <<<<<<<<<<<<<< + * global __nvrtcGetNVVMSize + * data["__nvrtcGetNVVMSize"] = __nvrtcGetNVVMSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBIN, __pyx_t_3) < 0))) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":376 + * data["__nvrtcGetCUBIN"] = __nvrtcGetCUBIN + * global __nvrtcGetNVVMSize + * data["__nvrtcGetNVVMSize"] = __nvrtcGetNVVMSize # <<<<<<<<<<<<<< + * global __nvrtcGetNVVM + * data["__nvrtcGetNVVM"] = __nvrtcGetNVVM +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVMSize, __pyx_t_3) < 0))) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":378 + * data["__nvrtcGetNVVMSize"] = __nvrtcGetNVVMSize + * global __nvrtcGetNVVM + * data["__nvrtcGetNVVM"] = __nvrtcGetNVVM # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIRSize + * data["__nvrtcGetLTOIRSize"] = __nvrtcGetLTOIRSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVM, __pyx_t_3) < 0))) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":380 + * data["__nvrtcGetNVVM"] = __nvrtcGetNVVM + * global __nvrtcGetLTOIRSize + * data["__nvrtcGetLTOIRSize"] = __nvrtcGetLTOIRSize # <<<<<<<<<<<<<< + * global __nvrtcGetLTOIR + * data["__nvrtcGetLTOIR"] = __nvrtcGetLTOIR +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIRSize, __pyx_t_3) < 0))) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":382 + * data["__nvrtcGetLTOIRSize"] = __nvrtcGetLTOIRSize + * global __nvrtcGetLTOIR + * data["__nvrtcGetLTOIR"] = __nvrtcGetLTOIR # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIRSize + * data["__nvrtcGetOptiXIRSize"] = __nvrtcGetOptiXIRSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIR, __pyx_t_3) < 0))) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":384 + * data["__nvrtcGetLTOIR"] = __nvrtcGetLTOIR + * global __nvrtcGetOptiXIRSize + * data["__nvrtcGetOptiXIRSize"] = __nvrtcGetOptiXIRSize # <<<<<<<<<<<<<< + * global __nvrtcGetOptiXIR + * data["__nvrtcGetOptiXIR"] = __nvrtcGetOptiXIR +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIRSize, __pyx_t_3) < 0))) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":386 + * data["__nvrtcGetOptiXIRSize"] = __nvrtcGetOptiXIRSize + * global __nvrtcGetOptiXIR + * data["__nvrtcGetOptiXIR"] = __nvrtcGetOptiXIR # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLogSize + * data["__nvrtcGetProgramLogSize"] = __nvrtcGetProgramLogSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIR, __pyx_t_3) < 0))) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":388 + * data["__nvrtcGetOptiXIR"] = __nvrtcGetOptiXIR + * global __nvrtcGetProgramLogSize + * data["__nvrtcGetProgramLogSize"] = __nvrtcGetProgramLogSize # <<<<<<<<<<<<<< + * global __nvrtcGetProgramLog + * data["__nvrtcGetProgramLog"] = __nvrtcGetProgramLog +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLogSize, __pyx_t_3) < 0))) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":390 + * data["__nvrtcGetProgramLogSize"] = __nvrtcGetProgramLogSize + * global __nvrtcGetProgramLog + * data["__nvrtcGetProgramLog"] = __nvrtcGetProgramLog # <<<<<<<<<<<<<< + * global __nvrtcAddNameExpression + * data["__nvrtcAddNameExpression"] = __nvrtcAddNameExpression +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLog, __pyx_t_3) < 0))) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":392 + * data["__nvrtcGetProgramLog"] = __nvrtcGetProgramLog + * global __nvrtcAddNameExpression + * data["__nvrtcAddNameExpression"] = __nvrtcAddNameExpression # <<<<<<<<<<<<<< + * global __nvrtcGetLoweredName + * data["__nvrtcGetLoweredName"] = __nvrtcGetLoweredName +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcAddNameExpression, __pyx_t_3) < 0))) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":394 + * data["__nvrtcAddNameExpression"] = __nvrtcAddNameExpression + * global __nvrtcGetLoweredName + * data["__nvrtcGetLoweredName"] = __nvrtcGetLoweredName # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSize + * data["__nvrtcGetPCHHeapSize"] = __nvrtcGetPCHHeapSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetLoweredName, __pyx_t_3) < 0))) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":396 + * data["__nvrtcGetLoweredName"] = __nvrtcGetLoweredName + * global __nvrtcGetPCHHeapSize + * data["__nvrtcGetPCHHeapSize"] = __nvrtcGetPCHHeapSize # <<<<<<<<<<<<<< + * global __nvrtcSetPCHHeapSize + * data["__nvrtcSetPCHHeapSize"] = __nvrtcSetPCHHeapSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSize, __pyx_t_3) < 0))) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":398 + * data["__nvrtcGetPCHHeapSize"] = __nvrtcGetPCHHeapSize + * global __nvrtcSetPCHHeapSize + * data["__nvrtcSetPCHHeapSize"] = __nvrtcSetPCHHeapSize # <<<<<<<<<<<<<< + * global __nvrtcGetPCHCreateStatus + * data["__nvrtcGetPCHCreateStatus"] = __nvrtcGetPCHCreateStatus +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcSetPCHHeapSize, __pyx_t_3) < 0))) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":400 + * data["__nvrtcSetPCHHeapSize"] = __nvrtcSetPCHHeapSize + * global __nvrtcGetPCHCreateStatus + * data["__nvrtcGetPCHCreateStatus"] = __nvrtcGetPCHCreateStatus # <<<<<<<<<<<<<< + * global __nvrtcGetPCHHeapSizeRequired + * data["__nvrtcGetPCHHeapSizeRequired"] = __nvrtcGetPCHHeapSizeRequired +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHCreateStatus, __pyx_t_3) < 0))) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":402 + * data["__nvrtcGetPCHCreateStatus"] = __nvrtcGetPCHCreateStatus + * global __nvrtcGetPCHHeapSizeRequired + * data["__nvrtcGetPCHHeapSizeRequired"] = __nvrtcGetPCHHeapSizeRequired # <<<<<<<<<<<<<< + * global __nvrtcSetFlowCallback + * data["__nvrtcSetFlowCallback"] = __nvrtcSetFlowCallback +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSizeRequired, __pyx_t_3) < 0))) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":404 + * data["__nvrtcGetPCHHeapSizeRequired"] = __nvrtcGetPCHHeapSizeRequired + * global __nvrtcSetFlowCallback + * data["__nvrtcSetFlowCallback"] = __nvrtcSetFlowCallback # <<<<<<<<<<<<<< + * + * func_ptrs = data +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvrtcSetFlowCallback, __pyx_t_3) < 0))) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":406 + * data["__nvrtcSetFlowCallback"] = __nvrtcSetFlowCallback + * + * func_ptrs = data # <<<<<<<<<<<<<< + * return data + * +*/ + __Pyx_INCREF(__pyx_v_data); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":407 + * + * func_ptrs = data + * return data # <<<<<<<<<<<<<< + * + * cpdef _inspect_function_pointer(str name): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":345 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers, "_inspect_function_pointers() -> dict"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers = {"_inspect_function_pointers", (PyCFunction)__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers, METH_NOARGS, __pyx_doc_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers}; +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointers (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cynvrtc.pyx":409 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointer(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":411 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs == ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_bindings/cynvrtc.pyx":412 + * global func_ptrs + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() # <<<<<<<<<<<<<< + * return func_ptrs[name] +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointers(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":411 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + } + + /* "cuda/bindings/_bindings/cynvrtc.pyx":413 + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 413, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":409 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_bindings_7cynvrtc_2_inspect_function_pointer, "_inspect_function_pointer(str name)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer = {"_inspect_function_pointer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9_bindings_7cynvrtc_2_inspect_function_pointer}; +static PyObject *__pyx_pw_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 409, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_inspect_function_pointer", 0) < (0)) __PYX_ERR(0, 409, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, i); __PYX_ERR(0, 409, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error) + } + __pyx_v_name = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 409, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_r = __pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc_2_inspect_function_pointer(__pyx_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_bindings_7cynvrtc_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__inspect_function_pointer(__pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._bindings.cynvrtc._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_nvrtcGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetErrorString, "char const *(nvrtcResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcVersion, "nvrtcResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetNumSupportedArchs", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNumSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetSupportedArchs", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcCreateProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCreateProgram, "nvrtcResult (nvrtcProgram *, char const *, char const *, int, char const **, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcDestroyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcDestroyProgram, "nvrtcResult (nvrtcProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcCompileProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCompileProgram, "nvrtcResult (nvrtcProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetPTXSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTXSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetPTX", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTX, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetCUBINSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBINSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetCUBIN", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBIN, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetNVVMSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVMSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetNVVM", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVM, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetLTOIRSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetLTOIR", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetOptiXIRSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetOptiXIR", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetProgramLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLogSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetProgramLog", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLog, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcAddNameExpression", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcAddNameExpression, "nvrtcResult (nvrtcProgram, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetLoweredName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLoweredName, "nvrtcResult (nvrtcProgram, char const *, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetPCHHeapSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSize, "nvrtcResult (size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcSetPCHHeapSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetPCHHeapSize, "nvrtcResult (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetPCHCreateStatus", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHCreateStatus, "nvrtcResult (nvrtcProgram)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcGetPCHHeapSizeRequired", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSizeRequired, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvrtcSetFlowCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetFlowCallback, "nvrtcResult (nvrtcProgram, void *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cynvrtc(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cynvrtc}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cynvrtc", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cynvrtc(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cynvrtc(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cynvrtc(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cynvrtc' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cynvrtc" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cynvrtc", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___bindings__cynvrtc) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._bindings.cynvrtc")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._bindings.cynvrtc", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_bindings/cynvrtc.pyx":6 + * # This code was automatically generated with version 12.9.0. Do not modify it directly. + * cimport cuda.bindings._lib.dlfcn as dlfcn + * from cuda.pathfinder import load_nvidia_dynamic_lib # <<<<<<<<<<<<<< + * from libc.stdint cimport intptr_t, uintptr_t + * import threading +*/ + __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_pathfinder, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib, __pyx_t_2) < (0)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":8 + * from cuda.pathfinder import load_nvidia_dynamic_lib + * from libc.stdint cimport intptr_t, uintptr_t + * import threading # <<<<<<<<<<<<<< + * + * cdef object __symbol_lock = threading.Lock() +*/ + __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_threading, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_3) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":10 + * import threading + * + * cdef object __symbol_lock = threading.Lock() # <<<<<<<<<<<<<< + * cdef bint __cuPythonInit = False + * cdef void *__nvrtcGetErrorString = NULL +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___symbol_lock, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":11 + * + * cdef object __symbol_lock = threading.Lock() + * cdef bint __cuPythonInit = False # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetErrorString = NULL + * cdef void *__nvrtcVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___cuPythonInit = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":12 + * cdef object __symbol_lock = threading.Lock() + * cdef bint __cuPythonInit = False + * cdef void *__nvrtcGetErrorString = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcVersion = NULL + * cdef void *__nvrtcGetNumSupportedArchs = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetErrorString = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":13 + * cdef bint __cuPythonInit = False + * cdef void *__nvrtcGetErrorString = NULL + * cdef void *__nvrtcVersion = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetNumSupportedArchs = NULL + * cdef void *__nvrtcGetSupportedArchs = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcVersion = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":14 + * cdef void *__nvrtcGetErrorString = NULL + * cdef void *__nvrtcVersion = NULL + * cdef void *__nvrtcGetNumSupportedArchs = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetSupportedArchs = NULL + * cdef void *__nvrtcCreateProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNumSupportedArchs = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":15 + * cdef void *__nvrtcVersion = NULL + * cdef void *__nvrtcGetNumSupportedArchs = NULL + * cdef void *__nvrtcGetSupportedArchs = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcCreateProgram = NULL + * cdef void *__nvrtcDestroyProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetSupportedArchs = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":16 + * cdef void *__nvrtcGetNumSupportedArchs = NULL + * cdef void *__nvrtcGetSupportedArchs = NULL + * cdef void *__nvrtcCreateProgram = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcDestroyProgram = NULL + * cdef void *__nvrtcCompileProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCreateProgram = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":17 + * cdef void *__nvrtcGetSupportedArchs = NULL + * cdef void *__nvrtcCreateProgram = NULL + * cdef void *__nvrtcDestroyProgram = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcCompileProgram = NULL + * cdef void *__nvrtcGetPTXSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcDestroyProgram = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":18 + * cdef void *__nvrtcCreateProgram = NULL + * cdef void *__nvrtcDestroyProgram = NULL + * cdef void *__nvrtcCompileProgram = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetPTXSize = NULL + * cdef void *__nvrtcGetPTX = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcCompileProgram = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":19 + * cdef void *__nvrtcDestroyProgram = NULL + * cdef void *__nvrtcCompileProgram = NULL + * cdef void *__nvrtcGetPTXSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetPTX = NULL + * cdef void *__nvrtcGetCUBINSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTXSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":20 + * cdef void *__nvrtcCompileProgram = NULL + * cdef void *__nvrtcGetPTXSize = NULL + * cdef void *__nvrtcGetPTX = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetCUBINSize = NULL + * cdef void *__nvrtcGetCUBIN = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPTX = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":21 + * cdef void *__nvrtcGetPTXSize = NULL + * cdef void *__nvrtcGetPTX = NULL + * cdef void *__nvrtcGetCUBINSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetCUBIN = NULL + * cdef void *__nvrtcGetNVVMSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBINSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":22 + * cdef void *__nvrtcGetPTX = NULL + * cdef void *__nvrtcGetCUBINSize = NULL + * cdef void *__nvrtcGetCUBIN = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetNVVMSize = NULL + * cdef void *__nvrtcGetNVVM = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetCUBIN = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":23 + * cdef void *__nvrtcGetCUBINSize = NULL + * cdef void *__nvrtcGetCUBIN = NULL + * cdef void *__nvrtcGetNVVMSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetNVVM = NULL + * cdef void *__nvrtcGetLTOIRSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVMSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":24 + * cdef void *__nvrtcGetCUBIN = NULL + * cdef void *__nvrtcGetNVVMSize = NULL + * cdef void *__nvrtcGetNVVM = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetLTOIRSize = NULL + * cdef void *__nvrtcGetLTOIR = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetNVVM = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":25 + * cdef void *__nvrtcGetNVVMSize = NULL + * cdef void *__nvrtcGetNVVM = NULL + * cdef void *__nvrtcGetLTOIRSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetLTOIR = NULL + * cdef void *__nvrtcGetOptiXIRSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIRSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":26 + * cdef void *__nvrtcGetNVVM = NULL + * cdef void *__nvrtcGetLTOIRSize = NULL + * cdef void *__nvrtcGetLTOIR = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetOptiXIRSize = NULL + * cdef void *__nvrtcGetOptiXIR = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLTOIR = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":27 + * cdef void *__nvrtcGetLTOIRSize = NULL + * cdef void *__nvrtcGetLTOIR = NULL + * cdef void *__nvrtcGetOptiXIRSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetOptiXIR = NULL + * cdef void *__nvrtcGetProgramLogSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIRSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":28 + * cdef void *__nvrtcGetLTOIR = NULL + * cdef void *__nvrtcGetOptiXIRSize = NULL + * cdef void *__nvrtcGetOptiXIR = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetProgramLogSize = NULL + * cdef void *__nvrtcGetProgramLog = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetOptiXIR = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":29 + * cdef void *__nvrtcGetOptiXIRSize = NULL + * cdef void *__nvrtcGetOptiXIR = NULL + * cdef void *__nvrtcGetProgramLogSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetProgramLog = NULL + * cdef void *__nvrtcAddNameExpression = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLogSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":30 + * cdef void *__nvrtcGetOptiXIR = NULL + * cdef void *__nvrtcGetProgramLogSize = NULL + * cdef void *__nvrtcGetProgramLog = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcAddNameExpression = NULL + * cdef void *__nvrtcGetLoweredName = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetProgramLog = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":31 + * cdef void *__nvrtcGetProgramLogSize = NULL + * cdef void *__nvrtcGetProgramLog = NULL + * cdef void *__nvrtcAddNameExpression = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetLoweredName = NULL + * cdef void *__nvrtcGetPCHHeapSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcAddNameExpression = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":32 + * cdef void *__nvrtcGetProgramLog = NULL + * cdef void *__nvrtcAddNameExpression = NULL + * cdef void *__nvrtcGetLoweredName = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetPCHHeapSize = NULL + * cdef void *__nvrtcSetPCHHeapSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetLoweredName = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":33 + * cdef void *__nvrtcAddNameExpression = NULL + * cdef void *__nvrtcGetLoweredName = NULL + * cdef void *__nvrtcGetPCHHeapSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcSetPCHHeapSize = NULL + * cdef void *__nvrtcGetPCHCreateStatus = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":34 + * cdef void *__nvrtcGetLoweredName = NULL + * cdef void *__nvrtcGetPCHHeapSize = NULL + * cdef void *__nvrtcSetPCHHeapSize = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetPCHCreateStatus = NULL + * cdef void *__nvrtcGetPCHHeapSizeRequired = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetPCHHeapSize = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":35 + * cdef void *__nvrtcGetPCHHeapSize = NULL + * cdef void *__nvrtcSetPCHHeapSize = NULL + * cdef void *__nvrtcGetPCHCreateStatus = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcGetPCHHeapSizeRequired = NULL + * cdef void *__nvrtcSetFlowCallback = NULL +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHCreateStatus = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":36 + * cdef void *__nvrtcSetPCHHeapSize = NULL + * cdef void *__nvrtcGetPCHCreateStatus = NULL + * cdef void *__nvrtcGetPCHHeapSizeRequired = NULL # <<<<<<<<<<<<<< + * cdef void *__nvrtcSetFlowCallback = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcGetPCHHeapSizeRequired = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":37 + * cdef void *__nvrtcGetPCHCreateStatus = NULL + * cdef void *__nvrtcGetPCHHeapSizeRequired = NULL + * cdef void *__nvrtcSetFlowCallback = NULL # <<<<<<<<<<<<<< + * + * cdef int _cuPythonInit() except -1 nogil: +*/ + __pyx_v_4cuda_8bindings_9_bindings_7cynvrtc___nvrtcSetFlowCallback = NULL; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":343 + * return err + * + * cdef dict func_ptrs = None # <<<<<<<<<<<<<< + * + * cpdef dict _inspect_function_pointers(): +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_bindings_7cynvrtc_func_ptrs, ((PyObject*)Py_None)); + __Pyx_GIVEREF(Py_None); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":345 + * cdef dict func_ptrs = None + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_bindings_7cynvrtc_1_inspect_function_pointers, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__bindings_cynvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, __pyx_t_3) < (0)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":409 + * return data + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_bindings_7cynvrtc_3_inspect_function_pointer, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__bindings_cynvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, __pyx_t_3) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_bindings/cynvrtc.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._bindings.cynvrtc", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._bindings.cynvrtc"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 179 <= 65535 + const unsigned short n; +#elif 179 / 2 < INT_MAX + const unsigned int n; +#elif 179 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_Function_nvrtcAddNameExpression, sizeof(__pyx_k_Function_nvrtcAddNameExpression), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcAddNameExpression */ + {__pyx_k_Function_nvrtcCompileProgram_not, sizeof(__pyx_k_Function_nvrtcCompileProgram_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcCompileProgram_not */ + {__pyx_k_Function_nvrtcCreateProgram_not, sizeof(__pyx_k_Function_nvrtcCreateProgram_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcCreateProgram_not */ + {__pyx_k_Function_nvrtcDestroyProgram_not, sizeof(__pyx_k_Function_nvrtcDestroyProgram_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcDestroyProgram_not */ + {__pyx_k_Function_nvrtcGetCUBINSize_not_f, sizeof(__pyx_k_Function_nvrtcGetCUBINSize_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetCUBINSize_not_f */ + {__pyx_k_Function_nvrtcGetCUBIN_not_found, sizeof(__pyx_k_Function_nvrtcGetCUBIN_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetCUBIN_not_found */ + {__pyx_k_Function_nvrtcGetErrorString_not, sizeof(__pyx_k_Function_nvrtcGetErrorString_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetErrorString_not */ + {__pyx_k_Function_nvrtcGetLTOIRSize_not_f, sizeof(__pyx_k_Function_nvrtcGetLTOIRSize_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetLTOIRSize_not_f */ + {__pyx_k_Function_nvrtcGetLTOIR_not_found, sizeof(__pyx_k_Function_nvrtcGetLTOIR_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetLTOIR_not_found */ + {__pyx_k_Function_nvrtcGetLoweredName_not, sizeof(__pyx_k_Function_nvrtcGetLoweredName_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetLoweredName_not */ + {__pyx_k_Function_nvrtcGetNVVMSize_not_fo, sizeof(__pyx_k_Function_nvrtcGetNVVMSize_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetNVVMSize_not_fo */ + {__pyx_k_Function_nvrtcGetNVVM_not_found, sizeof(__pyx_k_Function_nvrtcGetNVVM_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetNVVM_not_found */ + {__pyx_k_Function_nvrtcGetNumSupportedArc, sizeof(__pyx_k_Function_nvrtcGetNumSupportedArc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetNumSupportedArc */ + {__pyx_k_Function_nvrtcGetOptiXIRSize_not, sizeof(__pyx_k_Function_nvrtcGetOptiXIRSize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetOptiXIRSize_not */ + {__pyx_k_Function_nvrtcGetOptiXIR_not_fou, sizeof(__pyx_k_Function_nvrtcGetOptiXIR_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetOptiXIR_not_fou */ + {__pyx_k_Function_nvrtcGetPCHCreateStatus, sizeof(__pyx_k_Function_nvrtcGetPCHCreateStatus), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetPCHCreateStatus */ + {__pyx_k_Function_nvrtcGetPCHHeapSizeRequ, sizeof(__pyx_k_Function_nvrtcGetPCHHeapSizeRequ), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetPCHHeapSizeRequ */ + {__pyx_k_Function_nvrtcGetPCHHeapSize_not, sizeof(__pyx_k_Function_nvrtcGetPCHHeapSize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetPCHHeapSize_not */ + {__pyx_k_Function_nvrtcGetPTXSize_not_fou, sizeof(__pyx_k_Function_nvrtcGetPTXSize_not_fou), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetPTXSize_not_fou */ + {__pyx_k_Function_nvrtcGetPTX_not_found, sizeof(__pyx_k_Function_nvrtcGetPTX_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetPTX_not_found */ + {__pyx_k_Function_nvrtcGetProgramLogSize, sizeof(__pyx_k_Function_nvrtcGetProgramLogSize), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetProgramLogSize */ + {__pyx_k_Function_nvrtcGetProgramLog_not, sizeof(__pyx_k_Function_nvrtcGetProgramLog_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetProgramLog_not */ + {__pyx_k_Function_nvrtcGetSupportedArchs, sizeof(__pyx_k_Function_nvrtcGetSupportedArchs), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcGetSupportedArchs */ + {__pyx_k_Function_nvrtcSetFlowCallback_no, sizeof(__pyx_k_Function_nvrtcSetFlowCallback_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcSetFlowCallback_no */ + {__pyx_k_Function_nvrtcSetPCHHeapSize_not, sizeof(__pyx_k_Function_nvrtcSetPCHHeapSize_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcSetPCHHeapSize_not */ + {__pyx_k_Function_nvrtcVersion_not_found, sizeof(__pyx_k_Function_nvrtcVersion_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_nvrtcVersion_not_found */ + {__pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Lock */ + {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuda_bindings__bindings_cynvrtc, sizeof(__pyx_k_cuda_bindings__bindings_cynvrtc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__bindings_cynvrtc */ + {__pyx_k_cuda_bindings__bindings_cynvrtc_2, sizeof(__pyx_k_cuda_bindings__bindings_cynvrtc_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__bindings_cynvrtc_2 */ + {__pyx_k_cuda_pathfinder, sizeof(__pyx_k_cuda_pathfinder), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_pathfinder */ + {__pyx_k_enter, sizeof(__pyx_k_enter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enter */ + {__pyx_k_exit, sizeof(__pyx_k_exit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_exit */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_handle_uint, sizeof(__pyx_k_handle_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_uint */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_inspect_function_pointer, sizeof(__pyx_k_inspect_function_pointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointer */ + {__pyx_k_inspect_function_pointers, sizeof(__pyx_k_inspect_function_pointers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointers */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_load_nvidia_dynamic_lib, sizeof(__pyx_k_load_nvidia_dynamic_lib), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_nvidia_dynamic_lib */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_nvrtc, sizeof(__pyx_k_nvrtc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtc */ + {__pyx_k_nvrtcAddNameExpression, sizeof(__pyx_k_nvrtcAddNameExpression), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcAddNameExpression */ + {__pyx_k_nvrtcCompileProgram, sizeof(__pyx_k_nvrtcCompileProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCompileProgram */ + {__pyx_k_nvrtcCreateProgram, sizeof(__pyx_k_nvrtcCreateProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCreateProgram */ + {__pyx_k_nvrtcDestroyProgram, sizeof(__pyx_k_nvrtcDestroyProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcDestroyProgram */ + {__pyx_k_nvrtcGetCUBIN, sizeof(__pyx_k_nvrtcGetCUBIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetCUBIN */ + {__pyx_k_nvrtcGetCUBINSize, sizeof(__pyx_k_nvrtcGetCUBINSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetCUBINSize */ + {__pyx_k_nvrtcGetErrorString, sizeof(__pyx_k_nvrtcGetErrorString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetErrorString */ + {__pyx_k_nvrtcGetLTOIR, sizeof(__pyx_k_nvrtcGetLTOIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLTOIR */ + {__pyx_k_nvrtcGetLTOIRSize, sizeof(__pyx_k_nvrtcGetLTOIRSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLTOIRSize */ + {__pyx_k_nvrtcGetLoweredName, sizeof(__pyx_k_nvrtcGetLoweredName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLoweredName */ + {__pyx_k_nvrtcGetNVVM, sizeof(__pyx_k_nvrtcGetNVVM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNVVM */ + {__pyx_k_nvrtcGetNVVMSize, sizeof(__pyx_k_nvrtcGetNVVMSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNVVMSize */ + {__pyx_k_nvrtcGetNumSupportedArchs, sizeof(__pyx_k_nvrtcGetNumSupportedArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNumSupportedArchs */ + {__pyx_k_nvrtcGetOptiXIR, sizeof(__pyx_k_nvrtcGetOptiXIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetOptiXIR */ + {__pyx_k_nvrtcGetOptiXIRSize, sizeof(__pyx_k_nvrtcGetOptiXIRSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetOptiXIRSize */ + {__pyx_k_nvrtcGetPCHCreateStatus, sizeof(__pyx_k_nvrtcGetPCHCreateStatus), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHCreateStatus */ + {__pyx_k_nvrtcGetPCHHeapSize, sizeof(__pyx_k_nvrtcGetPCHHeapSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHHeapSize */ + {__pyx_k_nvrtcGetPCHHeapSizeRequired, sizeof(__pyx_k_nvrtcGetPCHHeapSizeRequired), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHHeapSizeRequired */ + {__pyx_k_nvrtcGetPTX, sizeof(__pyx_k_nvrtcGetPTX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPTX */ + {__pyx_k_nvrtcGetPTXSize, sizeof(__pyx_k_nvrtcGetPTXSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPTXSize */ + {__pyx_k_nvrtcGetProgramLog, sizeof(__pyx_k_nvrtcGetProgramLog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetProgramLog */ + {__pyx_k_nvrtcGetProgramLogSize, sizeof(__pyx_k_nvrtcGetProgramLogSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetProgramLogSize */ + {__pyx_k_nvrtcGetSupportedArchs, sizeof(__pyx_k_nvrtcGetSupportedArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetSupportedArchs */ + {__pyx_k_nvrtcSetFlowCallback, sizeof(__pyx_k_nvrtcSetFlowCallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcSetFlowCallback */ + {__pyx_k_nvrtcSetPCHHeapSize, sizeof(__pyx_k_nvrtcSetPCHHeapSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcSetPCHHeapSize */ + {__pyx_k_nvrtcVersion, sizeof(__pyx_k_nvrtcVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcVersion */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_threading, sizeof(__pyx_k_threading), 0, 1, 1}, /* PyObject cname: __pyx_n_u_threading */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 114, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_bindings/cynvrtc.pyx":43 + * + * # Load library + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * handle = (load_nvidia_dynamic_lib("nvrtc")._handle_uint) + * +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 1; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 1; + unsigned int flags : 10; + unsigned int first_line : 9; + unsigned int line_table_length : 13; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 345, 429}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__bindings_cynvrtc_2, __pyx_mstate->__pyx_n_u_inspect_function_pointers, __pyx_k_z_q_Q_Ja_Zq_A_z_Q_Ja_Ja_Ja_A_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 409, 31}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__bindings_cynvrtc_2, __pyx_mstate->__pyx_n_u_inspect_function_pointer, __pyx_k_z_A_a_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..03b1e95274a60ba626ac7508b0387496ff1e4db9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..a592a3b4cb090b93a8cd5e2d94392eec5c21de64 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pxd @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +from cuda.bindings.cynvrtc cimport * + +cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil + +cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pyx new file mode 100644 index 0000000000000000000000000000000000000000..af07a2b4daaaae854171555a7a87952299b1e052 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cynvrtc.pyx @@ -0,0 +1,413 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings._lib.dlfcn as dlfcn +from cuda.pathfinder import load_nvidia_dynamic_lib +from libc.stdint cimport intptr_t, uintptr_t +import threading + +cdef object __symbol_lock = threading.Lock() +cdef bint __cuPythonInit = False +cdef void *__nvrtcGetErrorString = NULL +cdef void *__nvrtcVersion = NULL +cdef void *__nvrtcGetNumSupportedArchs = NULL +cdef void *__nvrtcGetSupportedArchs = NULL +cdef void *__nvrtcCreateProgram = NULL +cdef void *__nvrtcDestroyProgram = NULL +cdef void *__nvrtcCompileProgram = NULL +cdef void *__nvrtcGetPTXSize = NULL +cdef void *__nvrtcGetPTX = NULL +cdef void *__nvrtcGetCUBINSize = NULL +cdef void *__nvrtcGetCUBIN = NULL +cdef void *__nvrtcGetNVVMSize = NULL +cdef void *__nvrtcGetNVVM = NULL +cdef void *__nvrtcGetLTOIRSize = NULL +cdef void *__nvrtcGetLTOIR = NULL +cdef void *__nvrtcGetOptiXIRSize = NULL +cdef void *__nvrtcGetOptiXIR = NULL +cdef void *__nvrtcGetProgramLogSize = NULL +cdef void *__nvrtcGetProgramLog = NULL +cdef void *__nvrtcAddNameExpression = NULL +cdef void *__nvrtcGetLoweredName = NULL +cdef void *__nvrtcGetPCHHeapSize = NULL +cdef void *__nvrtcSetPCHHeapSize = NULL +cdef void *__nvrtcGetPCHCreateStatus = NULL +cdef void *__nvrtcGetPCHHeapSizeRequired = NULL +cdef void *__nvrtcSetFlowCallback = NULL + +cdef int _cuPythonInit() except -1 nogil: + global __cuPythonInit + + # Load library + with gil, __symbol_lock: + handle = (load_nvidia_dynamic_lib("nvrtc")._handle_uint) + + # Load function + global __nvrtcGetErrorString + __nvrtcGetErrorString = dlfcn.dlsym(handle, 'nvrtcGetErrorString') + global __nvrtcVersion + __nvrtcVersion = dlfcn.dlsym(handle, 'nvrtcVersion') + global __nvrtcGetNumSupportedArchs + __nvrtcGetNumSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetNumSupportedArchs') + global __nvrtcGetSupportedArchs + __nvrtcGetSupportedArchs = dlfcn.dlsym(handle, 'nvrtcGetSupportedArchs') + global __nvrtcCreateProgram + __nvrtcCreateProgram = dlfcn.dlsym(handle, 'nvrtcCreateProgram') + global __nvrtcDestroyProgram + __nvrtcDestroyProgram = dlfcn.dlsym(handle, 'nvrtcDestroyProgram') + global __nvrtcCompileProgram + __nvrtcCompileProgram = dlfcn.dlsym(handle, 'nvrtcCompileProgram') + global __nvrtcGetPTXSize + __nvrtcGetPTXSize = dlfcn.dlsym(handle, 'nvrtcGetPTXSize') + global __nvrtcGetPTX + __nvrtcGetPTX = dlfcn.dlsym(handle, 'nvrtcGetPTX') + global __nvrtcGetCUBINSize + __nvrtcGetCUBINSize = dlfcn.dlsym(handle, 'nvrtcGetCUBINSize') + global __nvrtcGetCUBIN + __nvrtcGetCUBIN = dlfcn.dlsym(handle, 'nvrtcGetCUBIN') + global __nvrtcGetNVVMSize + __nvrtcGetNVVMSize = dlfcn.dlsym(handle, 'nvrtcGetNVVMSize') + global __nvrtcGetNVVM + __nvrtcGetNVVM = dlfcn.dlsym(handle, 'nvrtcGetNVVM') + global __nvrtcGetLTOIRSize + __nvrtcGetLTOIRSize = dlfcn.dlsym(handle, 'nvrtcGetLTOIRSize') + global __nvrtcGetLTOIR + __nvrtcGetLTOIR = dlfcn.dlsym(handle, 'nvrtcGetLTOIR') + global __nvrtcGetOptiXIRSize + __nvrtcGetOptiXIRSize = dlfcn.dlsym(handle, 'nvrtcGetOptiXIRSize') + global __nvrtcGetOptiXIR + __nvrtcGetOptiXIR = dlfcn.dlsym(handle, 'nvrtcGetOptiXIR') + global __nvrtcGetProgramLogSize + __nvrtcGetProgramLogSize = dlfcn.dlsym(handle, 'nvrtcGetProgramLogSize') + global __nvrtcGetProgramLog + __nvrtcGetProgramLog = dlfcn.dlsym(handle, 'nvrtcGetProgramLog') + global __nvrtcAddNameExpression + __nvrtcAddNameExpression = dlfcn.dlsym(handle, 'nvrtcAddNameExpression') + global __nvrtcGetLoweredName + __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') + global __nvrtcGetPCHHeapSize + __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') + global __nvrtcSetPCHHeapSize + __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') + global __nvrtcGetPCHCreateStatus + __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') + global __nvrtcGetPCHHeapSizeRequired + __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') + global __nvrtcSetFlowCallback + __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') + __cuPythonInit = True + return 0 + +# Create a very small function to check whether we are init'ed, so the C +# compiler can inline it. +cdef inline int cuPythonInit() except -1 nogil: + if __cuPythonInit: + return 0 + return _cuPythonInit() + +cdef const char* _nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: + global __nvrtcGetErrorString + cuPythonInit() + if __nvrtcGetErrorString == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetErrorString" not found') + err = ( __nvrtcGetErrorString)(result) + return err + +cdef nvrtcResult _nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcVersion + cuPythonInit() + if __nvrtcVersion == NULL: + with gil: + raise RuntimeError('Function "nvrtcVersion" not found') + err = ( __nvrtcVersion)(major, minor) + return err + +cdef nvrtcResult _nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetNumSupportedArchs + cuPythonInit() + if __nvrtcGetNumSupportedArchs == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetNumSupportedArchs" not found') + err = ( __nvrtcGetNumSupportedArchs)(numArchs) + return err + +cdef nvrtcResult _nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetSupportedArchs + cuPythonInit() + if __nvrtcGetSupportedArchs == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetSupportedArchs" not found') + err = ( __nvrtcGetSupportedArchs)(supportedArchs) + return err + +cdef nvrtcResult _nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcCreateProgram + cuPythonInit() + if __nvrtcCreateProgram == NULL: + with gil: + raise RuntimeError('Function "nvrtcCreateProgram" not found') + err = ( __nvrtcCreateProgram)(prog, src, name, numHeaders, headers, includeNames) + return err + +cdef nvrtcResult _nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcDestroyProgram + cuPythonInit() + if __nvrtcDestroyProgram == NULL: + with gil: + raise RuntimeError('Function "nvrtcDestroyProgram" not found') + err = ( __nvrtcDestroyProgram)(prog) + return err + +cdef nvrtcResult _nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcCompileProgram + cuPythonInit() + if __nvrtcCompileProgram == NULL: + with gil: + raise RuntimeError('Function "nvrtcCompileProgram" not found') + err = ( __nvrtcCompileProgram)(prog, numOptions, options) + return err + +cdef nvrtcResult _nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPTXSize + cuPythonInit() + if __nvrtcGetPTXSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPTXSize" not found') + err = ( __nvrtcGetPTXSize)(prog, ptxSizeRet) + return err + +cdef nvrtcResult _nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPTX + cuPythonInit() + if __nvrtcGetPTX == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPTX" not found') + err = ( __nvrtcGetPTX)(prog, ptx) + return err + +cdef nvrtcResult _nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetCUBINSize + cuPythonInit() + if __nvrtcGetCUBINSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetCUBINSize" not found') + err = ( __nvrtcGetCUBINSize)(prog, cubinSizeRet) + return err + +cdef nvrtcResult _nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetCUBIN + cuPythonInit() + if __nvrtcGetCUBIN == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetCUBIN" not found') + err = ( __nvrtcGetCUBIN)(prog, cubin) + return err + +cdef nvrtcResult _nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetNVVMSize + cuPythonInit() + if __nvrtcGetNVVMSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetNVVMSize" not found') + err = ( __nvrtcGetNVVMSize)(prog, nvvmSizeRet) + return err + +cdef nvrtcResult _nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetNVVM + cuPythonInit() + if __nvrtcGetNVVM == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetNVVM" not found') + err = ( __nvrtcGetNVVM)(prog, nvvm) + return err + +cdef nvrtcResult _nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetLTOIRSize + cuPythonInit() + if __nvrtcGetLTOIRSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetLTOIRSize" not found') + err = ( __nvrtcGetLTOIRSize)(prog, LTOIRSizeRet) + return err + +cdef nvrtcResult _nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetLTOIR + cuPythonInit() + if __nvrtcGetLTOIR == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetLTOIR" not found') + err = ( __nvrtcGetLTOIR)(prog, LTOIR) + return err + +cdef nvrtcResult _nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetOptiXIRSize + cuPythonInit() + if __nvrtcGetOptiXIRSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetOptiXIRSize" not found') + err = ( __nvrtcGetOptiXIRSize)(prog, optixirSizeRet) + return err + +cdef nvrtcResult _nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetOptiXIR + cuPythonInit() + if __nvrtcGetOptiXIR == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetOptiXIR" not found') + err = ( __nvrtcGetOptiXIR)(prog, optixir) + return err + +cdef nvrtcResult _nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetProgramLogSize + cuPythonInit() + if __nvrtcGetProgramLogSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetProgramLogSize" not found') + err = ( __nvrtcGetProgramLogSize)(prog, logSizeRet) + return err + +cdef nvrtcResult _nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetProgramLog + cuPythonInit() + if __nvrtcGetProgramLog == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetProgramLog" not found') + err = ( __nvrtcGetProgramLog)(prog, log) + return err + +cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcAddNameExpression + cuPythonInit() + if __nvrtcAddNameExpression == NULL: + with gil: + raise RuntimeError('Function "nvrtcAddNameExpression" not found') + err = ( __nvrtcAddNameExpression)(prog, name_expression) + return err + +cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetLoweredName + cuPythonInit() + if __nvrtcGetLoweredName == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetLoweredName" not found') + err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) + return err + +cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHHeapSize + cuPythonInit() + if __nvrtcGetPCHHeapSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + err = ( __nvrtcGetPCHHeapSize)(ret) + return err + +cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcSetPCHHeapSize + cuPythonInit() + if __nvrtcSetPCHHeapSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + err = ( __nvrtcSetPCHHeapSize)(size) + return err + +cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHCreateStatus + cuPythonInit() + if __nvrtcGetPCHCreateStatus == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + err = ( __nvrtcGetPCHCreateStatus)(prog) + return err + +cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHHeapSizeRequired + cuPythonInit() + if __nvrtcGetPCHHeapSizeRequired == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) + return err + +cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcSetFlowCallback + cuPythonInit() + if __nvrtcSetFlowCallback == NULL: + with gil: + raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + err = ( __nvrtcSetFlowCallback)(prog, callback, payload) + return err + +cdef dict func_ptrs = None + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + cuPythonInit() + cdef dict data = {} + + global __nvrtcGetErrorString + data["__nvrtcGetErrorString"] = __nvrtcGetErrorString + global __nvrtcVersion + data["__nvrtcVersion"] = __nvrtcVersion + global __nvrtcGetNumSupportedArchs + data["__nvrtcGetNumSupportedArchs"] = __nvrtcGetNumSupportedArchs + global __nvrtcGetSupportedArchs + data["__nvrtcGetSupportedArchs"] = __nvrtcGetSupportedArchs + global __nvrtcCreateProgram + data["__nvrtcCreateProgram"] = __nvrtcCreateProgram + global __nvrtcDestroyProgram + data["__nvrtcDestroyProgram"] = __nvrtcDestroyProgram + global __nvrtcCompileProgram + data["__nvrtcCompileProgram"] = __nvrtcCompileProgram + global __nvrtcGetPTXSize + data["__nvrtcGetPTXSize"] = __nvrtcGetPTXSize + global __nvrtcGetPTX + data["__nvrtcGetPTX"] = __nvrtcGetPTX + global __nvrtcGetCUBINSize + data["__nvrtcGetCUBINSize"] = __nvrtcGetCUBINSize + global __nvrtcGetCUBIN + data["__nvrtcGetCUBIN"] = __nvrtcGetCUBIN + global __nvrtcGetNVVMSize + data["__nvrtcGetNVVMSize"] = __nvrtcGetNVVMSize + global __nvrtcGetNVVM + data["__nvrtcGetNVVM"] = __nvrtcGetNVVM + global __nvrtcGetLTOIRSize + data["__nvrtcGetLTOIRSize"] = __nvrtcGetLTOIRSize + global __nvrtcGetLTOIR + data["__nvrtcGetLTOIR"] = __nvrtcGetLTOIR + global __nvrtcGetOptiXIRSize + data["__nvrtcGetOptiXIRSize"] = __nvrtcGetOptiXIRSize + global __nvrtcGetOptiXIR + data["__nvrtcGetOptiXIR"] = __nvrtcGetOptiXIR + global __nvrtcGetProgramLogSize + data["__nvrtcGetProgramLogSize"] = __nvrtcGetProgramLogSize + global __nvrtcGetProgramLog + data["__nvrtcGetProgramLog"] = __nvrtcGetProgramLog + global __nvrtcAddNameExpression + data["__nvrtcAddNameExpression"] = __nvrtcAddNameExpression + global __nvrtcGetLoweredName + data["__nvrtcGetLoweredName"] = __nvrtcGetLoweredName + global __nvrtcGetPCHHeapSize + data["__nvrtcGetPCHHeapSize"] = __nvrtcGetPCHHeapSize + global __nvrtcSetPCHHeapSize + data["__nvrtcSetPCHHeapSize"] = __nvrtcSetPCHHeapSize + global __nvrtcGetPCHCreateStatus + data["__nvrtcGetPCHCreateStatus"] = __nvrtcGetPCHCreateStatus + global __nvrtcGetPCHHeapSizeRequired + data["__nvrtcGetPCHHeapSizeRequired"] = __nvrtcGetPCHHeapSizeRequired + global __nvrtcSetFlowCallback + data["__nvrtcSetFlowCallback"] = __nvrtcSetFlowCallback + + func_ptrs = data + return data + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7f5aa9732026b67c9143c603c2c58f66f85db9aa --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.cpp @@ -0,0 +1,46963 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_profiler_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/device_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/driver_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/library_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/surface_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/texture_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/vector_types.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "libraries": [ + "cudart_static", + "rt" + ], + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._bindings.cyruntime", + "sources": [ + "cuda/bindings/_bindings/cyruntime.pyx" + ] + }, + "module_name": "cuda.bindings._bindings.cyruntime" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___bindings__cyruntime +#define __PYX_HAVE_API__cuda__bindings___bindings__cyruntime +/* Early includes */ +#include "vector_types.h" +#include "driver_types.h" +#include "surface_types.h" +#include "texture_types.h" +#include "library_types.h" +#include "cuda_runtime_api.h" +#include "device_types.h" +#include +#include "cuda.h" +#include "cudaProfiler.h" +#include "cuda_runtime.h" +#include "cuda_profiler_api.h" + + #define CUDA_API_PER_THREAD_DEFAULT_STREAM + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_bindings/cyruntime.pyx", + "cuda/bindings/_bindings/../_lib/cyruntime/cyruntime.pxi", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cyruntime.pxd":10 + * include "cyruntime_types.pxi" + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLenum; + +/* "cuda/bindings/cyruntime.pxd":12 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLuint; + +/* "cuda/bindings/cyruntime.pxd":24 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_EGLint; + +/* "cuda/bindings/cyruntime.pxd":31 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice; + +/* "cuda/bindings/cyruntime.pxd":33 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress; + +/* "cuda/bindings/cyruntime.pxd":35 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface; + +/* "cuda/bindings/cyruntime.pxd":37 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef enum cudaEglFrameType_enum: +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface; + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st; +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11; +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st; + +/* "cuda/bindings/cyruntime.pxd":39 + * ctypedef uint32_t VdpOutputSurface + * + * cdef enum cudaEglFrameType_enum: # <<<<<<<<<<<<<< + * cudaEglFrameTypeArray = 0 + * cudaEglFrameTypePitch = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypePitch = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":45 + * ctypedef cudaEglFrameType_enum cudaEglFrameType + * + * cdef enum cudaEglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * cudaEglResourceLocationSysmem = 0 + * cudaEglResourceLocationVidmem = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationSysmem = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationVidmem = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":51 + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags + * + * cdef enum cudaEglColorFormat_enum: # <<<<<<<<<<<<<< + * cudaEglColorFormatYUV420Planar = 0 + * cudaEglColorFormatYUV420SemiPlanar = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar = 3, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatARGB = 6, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRGBA = 7, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatL = 8, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatR = 9, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar = 10, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar = 11, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV422 = 12, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY422 = 13, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatABGR = 14, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBGRA = 15, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatA = 16, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRG = 17, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV = 18, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar = 19, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar = 20, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar = 21, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar = 22, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar = 23, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar = 24, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar = 25, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY_ER = 26, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY_ER = 27, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV_ER = 28, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU_ER = 29, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA_ER = 31, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV_ER = 32, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar_ER = 33, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar_ER = 34, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_ER = 35, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar_ER = 36, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar_ER = 37, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_ER = 38, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar_ER = 39, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar_ER = 40, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_ER = 41, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar_ER = 42, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar_ER = 43, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_ER = 44, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRGGB = 45, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBGGR = 46, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGRBG = 47, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGBRG = 48, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10RGGB = 49, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10BGGR = 50, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GRBG = 51, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GBRG = 52, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RGGB = 53, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BGGR = 54, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GRBG = 55, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GBRG = 56, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14RGGB = 57, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14BGGR = 58, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GRBG = 59, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GBRG = 60, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20RGGB = 61, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20BGGR = 62, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GRBG = 63, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GBRG = 64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar = 65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar = 66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar = 67, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspRGGB = 68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspBGGR = 69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGRBG = 70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGBRG = 71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBCCR = 72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRCCB = 73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCRBC = 74, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCBRC = 75, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10CCCC = 76, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BCCR = 77, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RCCB = 78, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CRBC = 79, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CBRC = 80, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CCCC = 81, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY = 82, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_2020 = 83, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_2020 = 84, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_2020 = 85, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_2020 = 86, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_709 = 87, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_709 = 88, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_709 = 89, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_709 = 90, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar = 94, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_ER = 96, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_709_ER = 97, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_ER = 98, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_709_ER = 99, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_ER = 0x64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA = 0x66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU = 0x68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY = 0x69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 0x6A, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 0x6C, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 0x6E, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 0x70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 0x71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709 = 0x72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709_ER = 0x73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY2020 = 0x74 +}; + +/* "cuda/bindings/cyruntime.pxd":197 + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection + * + * cdef enum cudaGLDeviceList: # <<<<<<<<<<<<<< + * cudaGLDeviceListAll = 1 + * cudaGLDeviceListCurrentFrame = 2 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListAll = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListCurrentFrame = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListNextFrame = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":202 + * cudaGLDeviceListNextFrame = 3 + * + * cdef enum cudaGLMapFlags: # <<<<<<<<<<<<<< + * cudaGLMapFlagsNone = 0 + * cudaGLMapFlagsReadOnly = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLMapFlags { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsNone = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsReadOnly = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsWriteDiscard = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":831 + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + * + * cdef enum: cudaHostAllocDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":833 + * cdef enum: cudaHostAllocDefault = 0 + * + * cdef enum: cudaHostAllocPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":835 + * cdef enum: cudaHostAllocPortable = 1 + * + * cdef enum: cudaHostAllocMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocWriteCombined = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":837 + * cdef enum: cudaHostAllocMapped = 2 + * + * cdef enum: cudaHostAllocWriteCombined = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocWriteCombined = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":839 + * cdef enum: cudaHostAllocWriteCombined = 4 + * + * cdef enum: cudaHostRegisterDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":841 + * cdef enum: cudaHostRegisterDefault = 0 + * + * cdef enum: cudaHostRegisterPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":843 + * cdef enum: cudaHostRegisterPortable = 1 + * + * cdef enum: cudaHostRegisterMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterIoMemory = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":845 + * cdef enum: cudaHostRegisterMapped = 2 + * + * cdef enum: cudaHostRegisterIoMemory = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterReadOnly = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterIoMemory = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":847 + * cdef enum: cudaHostRegisterIoMemory = 4 + * + * cdef enum: cudaHostRegisterReadOnly = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaPeerAccessDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterReadOnly = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":849 + * cdef enum: cudaHostRegisterReadOnly = 8 + * + * cdef enum: cudaPeerAccessDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaPeerAccessDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":851 + * cdef enum: cudaPeerAccessDefault = 0 + * + * cdef enum: cudaStreamDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamNonBlocking = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":853 + * cdef enum: cudaStreamDefault = 0 + * + * cdef enum: cudaStreamNonBlocking = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamLegacy = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamNonBlocking = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":855 + * cdef enum: cudaStreamNonBlocking = 1 + * + * cdef enum: cudaStreamLegacy = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamPerThread = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamLegacy = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":857 + * cdef enum: cudaStreamLegacy = 1 + * + * cdef enum: cudaStreamPerThread = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamPerThread = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":859 + * cdef enum: cudaStreamPerThread = 2 + * + * cdef enum: cudaEventDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventBlockingSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":861 + * cdef enum: cudaEventDefault = 0 + * + * cdef enum: cudaEventBlockingSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDisableTiming = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventBlockingSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":863 + * cdef enum: cudaEventBlockingSync = 1 + * + * cdef enum: cudaEventDisableTiming = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventInterprocess = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDisableTiming = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":865 + * cdef enum: cudaEventDisableTiming = 2 + * + * cdef enum: cudaEventInterprocess = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventInterprocess = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":867 + * cdef enum: cudaEventInterprocess = 4 + * + * cdef enum: cudaEventRecordDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":869 + * cdef enum: cudaEventRecordDefault = 0 + * + * cdef enum: cudaEventRecordExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":871 + * cdef enum: cudaEventRecordExternal = 1 + * + * cdef enum: cudaEventWaitDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":873 + * cdef enum: cudaEventWaitDefault = 0 + * + * cdef enum: cudaEventWaitExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleAuto = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":875 + * cdef enum: cudaEventWaitExternal = 1 + * + * cdef enum: cudaDeviceScheduleAuto = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleSpin = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleAuto = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":877 + * cdef enum: cudaDeviceScheduleAuto = 0 + * + * cdef enum: cudaDeviceScheduleSpin = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleYield = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleSpin = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":879 + * cdef enum: cudaDeviceScheduleSpin = 1 + * + * cdef enum: cudaDeviceScheduleYield = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleYield = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":881 + * cdef enum: cudaDeviceScheduleYield = 2 + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":883 + * cdef enum: cudaDeviceScheduleBlockingSync = 4 + * + * cdef enum: cudaDeviceBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleMask = 7 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":885 + * cdef enum: cudaDeviceBlockingSync = 4 + * + * cdef enum: cudaDeviceScheduleMask = 7 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMapHost = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleMask = 7 +}; + +/* "cuda/bindings/cyruntime.pxd":887 + * cdef enum: cudaDeviceScheduleMask = 7 + * + * cdef enum: cudaDeviceMapHost = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMapHost = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":889 + * cdef enum: cudaDeviceMapHost = 8 + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceSyncMemops = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceLmemResizeToMax = 16 +}; + +/* "cuda/bindings/cyruntime.pxd":891 + * cdef enum: cudaDeviceLmemResizeToMax = 16 + * + * cdef enum: cudaDeviceSyncMemops = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMask = 255 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceSyncMemops = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":893 + * cdef enum: cudaDeviceSyncMemops = 128 + * + * cdef enum: cudaDeviceMask = 255 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMask = 0xFF +}; + +/* "cuda/bindings/cyruntime.pxd":895 + * cdef enum: cudaDeviceMask = 255 + * + * cdef enum: cudaArrayDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayLayered = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":897 + * cdef enum: cudaArrayDefault = 0 + * + * cdef enum: cudaArrayLayered = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySurfaceLoadStore = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayLayered = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":899 + * cdef enum: cudaArrayLayered = 1 + * + * cdef enum: cudaArraySurfaceLoadStore = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayCubemap = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySurfaceLoadStore = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":901 + * cdef enum: cudaArraySurfaceLoadStore = 2 + * + * cdef enum: cudaArrayCubemap = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayTextureGather = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayCubemap = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":903 + * cdef enum: cudaArrayCubemap = 4 + * + * cdef enum: cudaArrayTextureGather = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayColorAttachment = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayTextureGather = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":905 + * cdef enum: cudaArrayTextureGather = 8 + * + * cdef enum: cudaArrayColorAttachment = 32 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparse = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayColorAttachment = 32 +}; + +/* "cuda/bindings/cyruntime.pxd":907 + * cdef enum: cudaArrayColorAttachment = 32 + * + * cdef enum: cudaArraySparse = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDeferredMapping = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparse = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":909 + * cdef enum: cudaArraySparse = 64 + * + * cdef enum: cudaArrayDeferredMapping = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDeferredMapping = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":911 + * cdef enum: cudaArrayDeferredMapping = 128 + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachGlobal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaIpcMemLazyEnablePeerAccess = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":913 + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 + * + * cdef enum: cudaMemAttachGlobal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachHost = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachGlobal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":915 + * cdef enum: cudaMemAttachGlobal = 1 + * + * cdef enum: cudaMemAttachHost = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachSingle = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachHost = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":917 + * cdef enum: cudaMemAttachHost = 2 + * + * cdef enum: cudaMemAttachSingle = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachSingle = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":919 + * cdef enum: cudaMemAttachSingle = 4 + * + * cdef enum: cudaOccupancyDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":921 + * cdef enum: cudaOccupancyDefault = 0 + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCpuDeviceId = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDisableCachingOverride = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":923 + * cdef enum: cudaOccupancyDisableCachingOverride = 1 + * + * cdef enum: cudaCpuDeviceId = -1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInvalidDeviceId = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCpuDeviceId = -1L +}; + +/* "cuda/bindings/cyruntime.pxd":925 + * cdef enum: cudaCpuDeviceId = -1 + * + * cdef enum: cudaInvalidDeviceId = -2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInvalidDeviceId = -2L +}; + +/* "cuda/bindings/cyruntime.pxd":927 + * cdef enum: cudaInvalidDeviceId = -2 + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInitDeviceFlagsAreValid = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":929 + * cdef enum: cudaInitDeviceFlagsAreValid = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":931 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":933 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparsePropertiesSingleMipTail = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":935 + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemPoolCreateUsageHwDecompress = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":937 + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalMemoryDedicated = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":939 + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 + * + * cdef enum: cudaExternalMemoryDedicated = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalMemoryDedicated = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":941 + * cdef enum: cudaExternalMemoryDedicated = 1 + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":943 + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":945 + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrWait = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrSignal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":947 + * cdef enum: cudaNvSciSyncAttrSignal = 1 + * + * cdef enum: cudaNvSciSyncAttrWait = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrWait = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":949 + * cdef enum: cudaNvSciSyncAttrWait = 2 + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":951 + * cdef enum: cudaGraphKernelNodePortDefault = 0 + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortProgrammatic = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":953 + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortLaunchCompletion = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":955 + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":957 + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeSynchronizationPolicy = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":959 + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":961 + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":963 + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 + * + * cdef enum: cudaStreamAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":965 + * cdef enum: cudaStreamAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":967 + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeCooperative = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":969 + * cdef enum: cudaKernelNodeAttributeCooperative = 2 + * + * cdef enum: cudaKernelNodeAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":971 + * cdef enum: cudaKernelNodeAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterDimension = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":973 + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +}; + +/* "cuda/bindings/cyruntime.pxd":975 + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":977 + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":979 + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +}; + +/* "cuda/bindings/cyruntime.pxd":981 + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +}; + +/* "cuda/bindings/cyruntime.pxd":983 + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 + * + * cdef enum: cudaSurfaceType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":985 + * cdef enum: cudaSurfaceType1D = 1 + * + * cdef enum: cudaSurfaceType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":987 + * cdef enum: cudaSurfaceType2D = 2 + * + * cdef enum: cudaSurfaceType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":989 + * cdef enum: cudaSurfaceType3D = 3 + * + * cdef enum: cudaSurfaceTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":991 + * cdef enum: cudaSurfaceTypeCubemap = 12 + * + * cdef enum: cudaSurfaceType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":993 + * cdef enum: cudaSurfaceType1DLayered = 241 + * + * cdef enum: cudaSurfaceType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":995 + * cdef enum: cudaSurfaceType2DLayered = 242 + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":997 + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 + * + * cdef enum: cudaTextureType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":999 + * cdef enum: cudaTextureType1D = 1 + * + * cdef enum: cudaTextureType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":1001 + * cdef enum: cudaTextureType2D = 2 + * + * cdef enum: cudaTextureType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":1003 + * cdef enum: cudaTextureType3D = 3 + * + * cdef enum: cudaTextureTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":1005 + * cdef enum: cudaTextureTypeCubemap = 12 + * + * cdef enum: cudaTextureType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":1007 + * cdef enum: cudaTextureType1DLayered = 241 + * + * cdef enum: cudaTextureType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":1009 + * cdef enum: cudaTextureType2DLayered = 242 + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: CUDART_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":1011 + * cdef enum: cudaTextureTypeCubemapLayered = 252 + * + * cdef enum: CUDART_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: __CUDART_API_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDART_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1013 + * cdef enum: CUDART_VERSION = 12090 + * + * cdef enum: __CUDART_API_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime___CUDART_API_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1015 + * cdef enum: __CUDART_API_VERSION = 12090 + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_EGL_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue; + +/* "cuda/bindings/cyruntime.pxd":17 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR; + +/* "cuda/bindings/cyruntime.pxd":22 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR; + +/* "cuda/bindings/cyruntime.pxd":29 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR; + +/* "cuda/bindings/cyruntime.pxd":43 + * cudaEglFrameTypePitch = 1 + * + * ctypedef cudaEglFrameType_enum cudaEglFrameType # <<<<<<<<<<<<<< + * + * cdef enum cudaEglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType; + +/* "cuda/bindings/cyruntime.pxd":49 + * cudaEglResourceLocationVidmem = 1 + * + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum cudaEglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags; + +/* "cuda/bindings/cyruntime.pxd":166 + * cudaEglColorFormatUYVY2020 = 116 + * + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat # <<<<<<<<<<<<<< + * + * cdef struct cudaEglPlaneDesc_st: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat; + +/* "cuda/bindings/cyruntime.pxd":168 + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat + * + * cdef struct cudaEglPlaneDesc_st: # <<<<<<<<<<<<<< + * unsigned int width + * unsigned int height +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st { + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int numChannels; + struct cudaChannelFormatDesc channelDesc; + unsigned int reserved[4]; +}; + +/* "cuda/bindings/cyruntime.pxd":177 + * unsigned int reserved[4] + * + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc # <<<<<<<<<<<<<< + * + * cdef union anon_union11: +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc; + +/* "cuda/bindings/cyruntime.pxd":179 + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc + * + * cdef union anon_union11: # <<<<<<<<<<<<<< + * cudaArray_t pArray[3] + * cudaPitchedPtr pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 { + cudaArray_t pArray[3]; + struct cudaPitchedPtr pPitch[3]; +}; + +/* "cuda/bindings/cyruntime.pxd":183 + * cudaPitchedPtr pPitch[3] + * + * cdef struct cudaEglFrame_st: # <<<<<<<<<<<<<< + * anon_union11 frame + * cudaEglPlaneDesc planeDesc[3] +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st { + union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 frame; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc planeDesc[3]; + unsigned int planeCount; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType frameType; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat eglColorFormat; +}; + +/* "cuda/bindings/cyruntime.pxd":190 + * cudaEglColorFormat eglColorFormat + * + * ctypedef cudaEglFrame_st cudaEglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame; + +/* "cuda/bindings/cyruntime.pxd":195 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum cudaGLDeviceList: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection; +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* IncludeStringH.proto */ +#include + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cyruntime" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings._bindings.cydriver" */ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync)(CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice)(CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int); /*proto*/ + +/* Module declarations from "cuda.bindings._bindings.cyruntime_ptds" */ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceReset)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSynchronize)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetLimit)(enum cudaLimit, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetLimit)(size_t *, enum cudaLimit); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetTexture1DLinearMaxWidth)(size_t *, struct cudaChannelFormatDesc const *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetCacheConfig)(enum cudaFuncCache *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetStreamPriorityRange)(int *, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetCacheConfig)(enum cudaFuncCache); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetByPCIBusId)(int *, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetPCIBusId)(char *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetEventHandle)(cudaIpcEventHandle_t *, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenEventHandle)(cudaEvent_t *, cudaIpcEventHandle_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetMemHandle)(cudaIpcMemHandle_t *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenMemHandle)(void **, cudaIpcMemHandle_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcCloseMemHandle)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceFlushGPUDirectRDMAWrites)(enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceRegisterAsyncNotification)(int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceUnregisterAsyncNotification)(int, cudaAsyncCallbackHandle_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetSharedMemConfig)(enum cudaSharedMemConfig *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetSharedMemConfig)(enum cudaSharedMemConfig); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetLastError)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPeekAtLastError)(void); /*proto*/ +static char const *(*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorName)(cudaError_t); /*proto*/ +static char const *(*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorString)(cudaError_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceCount)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceProperties_v2)(struct cudaDeviceProp *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetAttribute)(int *, enum cudaDeviceAttr, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetDefaultMemPool)(cudaMemPool_t *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetMemPool)(int, cudaMemPool_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetMemPool)(cudaMemPool_t *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetNvSciSyncAttributes)(void *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetP2PAttribute)(int *, enum cudaDeviceP2PAttr, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaChooseDevice)(int *, struct cudaDeviceProp const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaInitDevice)(int, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDevice)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDevice)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDeviceFlags)(unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceFlags)(unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreate)(cudaStream_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithFlags)(cudaStream_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithPriority)(cudaStream_t *, unsigned int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetPriority)(cudaStream_t, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetFlags)(cudaStream_t, unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetId)(cudaStream_t, unsigned PY_LONG_LONG *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetDevice)(cudaStream_t, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCtxResetPersistingL2Cache)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCopyAttributes)(cudaStream_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetAttribute)(cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSetAttribute)(cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamDestroy)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamWaitEvent)(cudaStream_t, cudaEvent_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAddCallback)(cudaStream_t, cudaStreamCallback_t, void *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSynchronize)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamQuery)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAttachMemAsync)(cudaStream_t, void *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCapture)(cudaStream_t, enum cudaStreamCaptureMode); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCaptureToGraph)(cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaThreadExchangeStreamCaptureMode)(enum cudaStreamCaptureMode *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamEndCapture)(cudaStream_t, cudaGraph_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamIsCapturing)(cudaStream_t, enum cudaStreamCaptureStatus *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v2)(cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v3)(cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies)(cudaStream_t, cudaGraphNode_t *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies_v2)(cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreate)(cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreateWithFlags)(cudaEvent_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecord)(cudaEvent_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecordWithFlags)(cudaEvent_t, cudaStream_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventQuery)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventSynchronize)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventDestroy)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime)(float *, cudaEvent_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime_v2)(float *, cudaEvent_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalMemory)(cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedBuffer)(void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedMipmappedArray)(cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalMemory)(cudaExternalMemory_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalSemaphore)(cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSignalExternalSemaphoresAsync_v2)(cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaWaitExternalSemaphoresAsync_v2)(cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalSemaphore)(cudaExternalSemaphore_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetCacheConfig)(void const *, enum cudaFuncCache); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncGetAttributes)(struct cudaFuncAttributes *, void const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetAttribute)(void const *, enum cudaFuncAttribute, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLaunchHostFunc)(cudaStream_t, cudaHostFn_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetSharedMemConfig)(void const *, enum cudaSharedMemConfig); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessor)(int *, void const *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyAvailableDynamicSMemPerBlock)(size_t *, void const *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(int *, void const *, int, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocManaged)(void **, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc)(void **, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocHost)(void **, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocPitch)(void **, size_t *, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocArray)(cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFree)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeHost)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeArray)(cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeMipmappedArray)(cudaMipmappedArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostAlloc)(void **, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostRegister)(void *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostUnregister)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetDevicePointer)(void **, void *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetFlags)(unsigned int *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3D)(struct cudaPitchedPtr *, struct cudaExtent); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3DArray)(cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocMipmappedArray)(cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetMipmappedArrayLevel)(cudaArray_t *, cudaMipmappedArray_const_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3D)(struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeer)(struct cudaMemcpy3DPeerParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DAsync)(struct cudaMemcpy3DParms const *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeerAsync)(struct cudaMemcpy3DPeerParms const *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemGetInfo)(size_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetInfo)(struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetPlane)(cudaArray_t *, cudaArray_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetMemoryRequirements)(struct cudaArrayMemoryRequirements *, cudaArray_t, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetMemoryRequirements)(struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetSparseProperties)(struct cudaArraySparseProperties *, cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetSparseProperties)(struct cudaArraySparseProperties *, cudaMipmappedArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy)(void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeer)(void *, int, void const *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2D)(void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArray)(cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArray)(void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DArrayToArray)(cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyAsync)(void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeerAsync)(void *, int, void const *, int, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyBatchAsync)(void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DBatchAsync)(size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DAsync)(void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArrayAsync)(cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArrayAsync)(void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset)(void *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2D)(void *, size_t, int, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3D)(struct cudaPitchedPtr, int, struct cudaExtent); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemsetAsync)(void *, int, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2DAsync)(void *, size_t, int, size_t, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3DAsync)(struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync)(void const *, size_t, int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync_v2)(void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise)(void const *, size_t, enum cudaMemoryAdvise, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise_v2)(void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttribute)(void *, size_t, enum cudaMemRangeAttribute, void const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttributes)(void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArray)(cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArray)(void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyArrayToArray)(cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArrayAsync)(cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArrayAsync)(void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocAsync)(void **, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeAsync)(void *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolTrimTo)(cudaMemPool_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAttribute)(cudaMemPool_t, enum cudaMemPoolAttr, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAttribute)(cudaMemPool_t, enum cudaMemPoolAttr, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAccess)(cudaMemPool_t, struct cudaMemAccessDesc const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAccess)(enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolCreate)(cudaMemPool_t *, struct cudaMemPoolProps const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolDestroy)(cudaMemPool_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocFromPoolAsync)(void **, size_t, cudaMemPool_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportToShareableHandle)(void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportFromShareableHandle)(cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportPointer)(struct cudaMemPoolPtrExportData *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportPointer)(void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPointerGetAttributes)(struct cudaPointerAttributes *, void const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceCanAccessPeer)(int *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceEnablePeerAccess)(int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceDisablePeerAccess)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnregisterResource)(cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceSetMapFlags)(cudaGraphicsResource_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsMapResources)(int, cudaGraphicsResource_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnmapResources)(int, cudaGraphicsResource_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedPointer)(void **, size_t *, cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsSubResourceGetMappedArray)(cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedMipmappedArray)(cudaMipmappedArray_t *, cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetChannelDesc)(struct cudaChannelFormatDesc *, cudaArray_const_t); /*proto*/ +static struct cudaChannelFormatDesc (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateChannelDesc)(int, int, int, int, enum cudaChannelFormatKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateTextureObject)(cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyTextureObject)(cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceDesc)(struct cudaResourceDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectTextureDesc)(struct cudaTextureDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceViewDesc)(struct cudaResourceViewDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateSurfaceObject)(cudaSurfaceObject_t *, struct cudaResourceDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroySurfaceObject)(cudaSurfaceObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetSurfaceObjectResourceDesc)(struct cudaResourceDesc *, cudaSurfaceObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDriverGetVersion)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaRuntimeGetVersion)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphCreate)(cudaGraph_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddKernelNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetParams)(cudaGraphNode_t, struct cudaKernelNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetParams)(cudaGraphNode_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeCopyAttributes)(cudaGraphNode_t, cudaGraphNode_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetAttribute)(cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetAttribute)(cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode1D)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeGetParams)(cudaGraphNode_t, struct cudaMemcpy3DParms *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams)(cudaGraphNode_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams1D)(cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemsetNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeGetParams)(cudaGraphNode_t, struct cudaMemsetParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeSetParams)(cudaGraphNode_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddHostNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeGetParams)(cudaGraphNode_t, struct cudaHostNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeSetParams)(cudaGraphNode_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddChildGraphNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphChildGraphNodeGetGraph)(cudaGraphNode_t, cudaGraph_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEmptyNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventRecordNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeGetEvent)(cudaGraphNode_t, cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeSetEvent)(cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventWaitNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeGetEvent)(cudaGraphNode_t, cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeSetEvent)(cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresSignalNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeGetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeSetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresWaitNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeGetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeSetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemAllocNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemAllocNodeGetParams)(cudaGraphNode_t, struct cudaMemAllocNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemFreeNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemFreeNodeGetParams)(cudaGraphNode_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGraphMemTrim)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetGraphMemAttribute)(int, enum cudaGraphMemAttributeType, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetGraphMemAttribute)(int, enum cudaGraphMemAttributeType, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphClone)(cudaGraph_t *, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeFindInClone)(cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetType)(cudaGraphNode_t, enum cudaGraphNodeType *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetNodes)(cudaGraph_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetRootNodes)(cudaGraph_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges)(cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges_v2)(cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies)(cudaGraphNode_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies_v2)(cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes)(cudaGraphNode_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes_v2)(cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies_v2)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies_v2)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroyNode)(cudaGraphNode_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiate)(cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithFlags)(cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithParams)(cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecGetFlags)(cudaGraphExec_t, unsigned PY_LONG_LONG *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecKernelNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams1D)(cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemsetNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecHostNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecChildGraphNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventRecordNodeSetEvent)(cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventWaitNodeSetEvent)(cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresSignalNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresWaitNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetEnabled)(cudaGraphExec_t, cudaGraphNode_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetEnabled)(cudaGraphExec_t, cudaGraphNode_t, unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecUpdate)(cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphUpload)(cudaGraphExec_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphLaunch)(cudaGraphExec_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecDestroy)(cudaGraphExec_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroy)(cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDebugDotPrint)(cudaGraph_t, char const *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectCreate)(cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRetain)(cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRelease)(cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRetainUserObject)(cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphReleaseUserObject)(cudaGraph_t, cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode_v2)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetParams)(cudaGraphNode_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphConditionalHandleCreate)(cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPoint)(char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPointByVersion)(char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadData)(cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadFromFile)(cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryUnload)(cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernel)(cudaKernel_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetGlobal)(void **, size_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetManaged)(void **, size_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetUnifiedFunction)(void **, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernelCount)(unsigned int *, cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryEnumerateKernels)(cudaKernel_t *, unsigned int, cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaKernelSetAttributeForDevice)(cudaKernel_t, enum cudaFuncAttribute, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetExportTable)(void const **, cudaUUID_t const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetKernel)(cudaKernel_t *, void const *); /*proto*/ +static struct cudaPitchedPtr (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPitchedPtr)(void *, size_t, size_t, size_t); /*proto*/ +static struct cudaPos (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPos)(size_t, size_t, size_t); /*proto*/ +static struct cudaExtent (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaExtent)(size_t, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStart)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStop)(void); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "cuda.bindings._bindings.cyruntime" */ +static int __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___cudaPythonInit; +static int __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___usePTDS; +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDriverEglFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame); /*proto*/ +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getRuntimeEglFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPythonInit(void); /*proto*/ +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(void); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(struct cudaChannelFormatDesc const *, int, int, int, int, int); /*proto*/ +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDescInfo(struct cudaChannelFormatDesc const *, int *, CUarray_format *); /*proto*/ +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getChannelFormatDescFromDriverDesc(struct cudaChannelFormatDesc *, size_t *, size_t *, size_t *, CUDA_ARRAY3D_DESCRIPTOR_v2 const *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._bindings.cyruntime" +extern int __pyx_module_is_main_cuda__bindings___bindings__cyruntime; +int __pyx_module_is_main_cuda__bindings___bindings__cyruntime = 0; + +/* Implementation of "cuda.bindings._bindings.cyruntime" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_range; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_os[] = "os"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_getenv[] = "getenv"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_default[] = "default"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA[] = "CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[14]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA __pyx_string_tab[1] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[2] +#define __pyx_n_u_default __pyx_string_tab[3] +#define __pyx_n_u_getenv __pyx_string_tab[4] +#define __pyx_n_u_initializing __pyx_string_tab[5] +#define __pyx_n_u_main __pyx_string_tab[6] +#define __pyx_n_u_module __pyx_string_tab[7] +#define __pyx_n_u_name __pyx_string_tab[8] +#define __pyx_n_u_os __pyx_string_tab[9] +#define __pyx_n_u_qualname __pyx_string_tab[10] +#define __pyx_n_u_range __pyx_string_tab[11] +#define __pyx_n_u_spec __pyx_string_tab[12] +#define __pyx_n_u_test __pyx_string_tab[13] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<14; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<14; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_bindings/cyruntime.pyx":13 + * cdef bint __cudaPythonInit = False + * cdef bint __usePTDS = False + * cdef int _cudaPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cudaPythonInit + * global __usePTDS +*/ + +static int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPythonInit(void) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cudaPythonInit", 1); + + /* "cuda/bindings/_bindings/cyruntime.pyx":17 + * global __usePTDS + * + * with gil: # <<<<<<<<<<<<<< + * __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) + * __cudaPythonInit = True +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_bindings/cyruntime.pyx":18 + * + * with gil: + * __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) # <<<<<<<<<<<<<< + * __cudaPythonInit = True + * return __usePTDS +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getenv); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_default, Py_False, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 18, __pyx_L4_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 18, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___usePTDS = __pyx_t_6; + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":17 + * global __usePTDS + * + * with gil: # <<<<<<<<<<<<<< + * __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) + * __cudaPythonInit = True +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":19 + * with gil: + * __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) + * __cudaPythonInit = True # <<<<<<<<<<<<<< + * return __usePTDS + * +*/ + __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___cudaPythonInit = 1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":20 + * __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) + * __cudaPythonInit = True + * return __usePTDS # <<<<<<<<<<<<<< + * + * # Create a very small function to check whether we are init'ed, so the C +*/ + __pyx_r = __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___usePTDS; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":13 + * cdef bint __cudaPythonInit = False + * cdef bint __usePTDS = False + * cdef int _cudaPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * global __cudaPythonInit + * global __usePTDS +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":24 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cudaPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cudaPythonInit: + * return __usePTDS +*/ + +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":25 + * # compiler can inline it. + * cdef inline int cudaPythonInit() except -1 nogil: + * if __cudaPythonInit: # <<<<<<<<<<<<<< + * return __usePTDS + * return _cudaPythonInit() +*/ + if (__pyx_v_4cuda_8bindings_9_bindings_9cyruntime___cudaPythonInit) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":26 + * cdef inline int cudaPythonInit() except -1 nogil: + * if __cudaPythonInit: + * return __usePTDS # <<<<<<<<<<<<<< + * return _cudaPythonInit() + * +*/ + __pyx_r = __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___usePTDS; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":25 + * # compiler can inline it. + * cdef inline int cudaPythonInit() except -1 nogil: + * if __cudaPythonInit: # <<<<<<<<<<<<<< + * return __usePTDS + * return _cudaPythonInit() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":27 + * if __cudaPythonInit: + * return __usePTDS + * return _cudaPythonInit() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":24 + * # Create a very small function to check whether we are init'ed, so the C + * # compiler can inline it. + * cdef inline int cudaPythonInit() except -1 nogil: # <<<<<<<<<<<<<< + * if __cudaPythonInit: + * return __usePTDS +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime.cudaPythonInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":29 + * return _cudaPythonInit() + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceReset(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":30 + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceReset() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":31 + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceReset() + * return cudaDeviceReset() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":32 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceReset() # <<<<<<<<<<<<<< + * return cudaDeviceReset() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceReset(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":31 + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceReset() + * return cudaDeviceReset() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":33 + * if usePTDS: + * return ptds._cudaDeviceReset() + * return cudaDeviceReset() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceReset(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":29 + * return _cudaPythonInit() + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceReset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":35 + * return cudaDeviceReset() + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSynchronize(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":36 + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSynchronize() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":37 + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSynchronize() + * return cudaDeviceSynchronize() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":38 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSynchronize() # <<<<<<<<<<<<<< + * return cudaDeviceSynchronize() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSynchronize(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":37 + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSynchronize() + * return cudaDeviceSynchronize() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":39 + * if usePTDS: + * return ptds._cudaDeviceSynchronize() + * return cudaDeviceSynchronize() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSynchronize(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":35 + * return cudaDeviceReset() + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":41 + * return cudaDeviceSynchronize() + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetLimit(enum cudaLimit __pyx_v_limit, size_t __pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":42 + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSetLimit(limit, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":43 + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetLimit(limit, value) + * return cudaDeviceSetLimit(limit, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":44 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSetLimit(limit, value) # <<<<<<<<<<<<<< + * return cudaDeviceSetLimit(limit, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetLimit(((enum cudaLimit)__pyx_v_limit), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":43 + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetLimit(limit, value) + * return cudaDeviceSetLimit(limit, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":45 + * if usePTDS: + * return ptds._cudaDeviceSetLimit(limit, value) + * return cudaDeviceSetLimit(limit, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetLimit(__pyx_v_limit, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":41 + * return cudaDeviceSynchronize() + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":47 + * return cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetLimit(size_t *__pyx_v_pValue, enum cudaLimit __pyx_v_limit) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":48 + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetLimit(pValue, limit) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":49 + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetLimit(pValue, limit) + * return cudaDeviceGetLimit(pValue, limit) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":50 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetLimit(pValue, limit) # <<<<<<<<<<<<<< + * return cudaDeviceGetLimit(pValue, limit) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetLimit(__pyx_v_pValue, ((enum cudaLimit)__pyx_v_limit)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":49 + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetLimit(pValue, limit) + * return cudaDeviceGetLimit(pValue, limit) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":51 + * if usePTDS: + * return ptds._cudaDeviceGetLimit(pValue, limit) + * return cudaDeviceGetLimit(pValue, limit) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetLimit(__pyx_v_pValue, __pyx_v_limit); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":47 + * return cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":53 + * return cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, struct cudaChannelFormatDesc const *__pyx_v_fmtDesc, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":54 + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":55 + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":56 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) # <<<<<<<<<<<<<< + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_fmtDesc, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":55 + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":57 + * if usePTDS: + * return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_fmtDesc, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":53 + * return cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":59 + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetCacheConfig(enum cudaFuncCache *__pyx_v_pCacheConfig) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":60 + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetCacheConfig(pCacheConfig) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":61 + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetCacheConfig(pCacheConfig) + * return cudaDeviceGetCacheConfig(pCacheConfig) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":62 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetCacheConfig(pCacheConfig) # <<<<<<<<<<<<<< + * return cudaDeviceGetCacheConfig(pCacheConfig) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetCacheConfig(((enum cudaFuncCache *)__pyx_v_pCacheConfig)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":61 + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetCacheConfig(pCacheConfig) + * return cudaDeviceGetCacheConfig(pCacheConfig) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":63 + * if usePTDS: + * return ptds._cudaDeviceGetCacheConfig(pCacheConfig) + * return cudaDeviceGetCacheConfig(pCacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetCacheConfig(__pyx_v_pCacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":59 + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":65 + * return cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":66 + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":67 + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":68 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":67 + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":69 + * if usePTDS: + * return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":65 + * return cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":71 + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetCacheConfig(enum cudaFuncCache __pyx_v_cacheConfig) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":72 + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSetCacheConfig(cacheConfig) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":73 + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetCacheConfig(cacheConfig) + * return cudaDeviceSetCacheConfig(cacheConfig) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":74 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSetCacheConfig(cacheConfig) # <<<<<<<<<<<<<< + * return cudaDeviceSetCacheConfig(cacheConfig) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetCacheConfig(((enum cudaFuncCache)__pyx_v_cacheConfig)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":73 + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetCacheConfig(cacheConfig) + * return cudaDeviceSetCacheConfig(cacheConfig) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":75 + * if usePTDS: + * return ptds._cudaDeviceSetCacheConfig(cacheConfig) + * return cudaDeviceSetCacheConfig(cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetCacheConfig(__pyx_v_cacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":71 + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":77 + * return cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetByPCIBusId(int *__pyx_v_device, char const *__pyx_v_pciBusId) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":78 + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":79 + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) + * return cudaDeviceGetByPCIBusId(device, pciBusId) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":80 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) # <<<<<<<<<<<<<< + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetByPCIBusId(__pyx_v_device, __pyx_v_pciBusId); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":79 + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) + * return cudaDeviceGetByPCIBusId(device, pciBusId) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":81 + * if usePTDS: + * return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) + * return cudaDeviceGetByPCIBusId(device, pciBusId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetByPCIBusId(__pyx_v_device, __pyx_v_pciBusId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":77 + * return cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":83 + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":84 + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":85 + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) + * return cudaDeviceGetPCIBusId(pciBusId, length, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":86 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) # <<<<<<<<<<<<<< + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":85 + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) + * return cudaDeviceGetPCIBusId(pciBusId, length, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":87 + * if usePTDS: + * return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) + * return cudaDeviceGetPCIBusId(pciBusId, length, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":83 + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":89 + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetEventHandle(cudaIpcEventHandle_t *__pyx_v_handle, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":90 + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaIpcGetEventHandle(handle, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":91 + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcGetEventHandle(handle, event) + * return cudaIpcGetEventHandle(handle, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":92 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaIpcGetEventHandle(handle, event) # <<<<<<<<<<<<<< + * return cudaIpcGetEventHandle(handle, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetEventHandle(__pyx_v_handle, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":91 + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcGetEventHandle(handle, event) + * return cudaIpcGetEventHandle(handle, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":93 + * if usePTDS: + * return ptds._cudaIpcGetEventHandle(handle, event) + * return cudaIpcGetEventHandle(handle, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcGetEventHandle(__pyx_v_handle, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":89 + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":95 + * return cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenEventHandle(cudaEvent_t *__pyx_v_event, cudaIpcEventHandle_t __pyx_v_handle) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":96 + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaIpcOpenEventHandle(event, handle) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":97 + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcOpenEventHandle(event, handle) + * return cudaIpcOpenEventHandle(event, handle) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":98 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaIpcOpenEventHandle(event, handle) # <<<<<<<<<<<<<< + * return cudaIpcOpenEventHandle(event, handle) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenEventHandle(__pyx_v_event, __pyx_v_handle); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":97 + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcOpenEventHandle(event, handle) + * return cudaIpcOpenEventHandle(event, handle) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":99 + * if usePTDS: + * return ptds._cudaIpcOpenEventHandle(event, handle) + * return cudaIpcOpenEventHandle(event, handle) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcOpenEventHandle(__pyx_v_event, __pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":95 + * return cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":101 + * return cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetMemHandle(cudaIpcMemHandle_t *__pyx_v_handle, void *__pyx_v_devPtr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":102 + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaIpcGetMemHandle(handle, devPtr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":103 + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcGetMemHandle(handle, devPtr) + * return cudaIpcGetMemHandle(handle, devPtr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":104 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaIpcGetMemHandle(handle, devPtr) # <<<<<<<<<<<<<< + * return cudaIpcGetMemHandle(handle, devPtr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetMemHandle(__pyx_v_handle, __pyx_v_devPtr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":103 + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcGetMemHandle(handle, devPtr) + * return cudaIpcGetMemHandle(handle, devPtr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":105 + * if usePTDS: + * return ptds._cudaIpcGetMemHandle(handle, devPtr) + * return cudaIpcGetMemHandle(handle, devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcGetMemHandle(__pyx_v_handle, __pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":101 + * return cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":107 + * return cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenMemHandle(void **__pyx_v_devPtr, cudaIpcMemHandle_t __pyx_v_handle, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":108 + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":109 + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) + * return cudaIpcOpenMemHandle(devPtr, handle, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":110 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) # <<<<<<<<<<<<<< + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenMemHandle(__pyx_v_devPtr, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":109 + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) + * return cudaIpcOpenMemHandle(devPtr, handle, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":111 + * if usePTDS: + * return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) + * return cudaIpcOpenMemHandle(devPtr, handle, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcOpenMemHandle(__pyx_v_devPtr, __pyx_v_handle, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":107 + * return cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":113 + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcCloseMemHandle(void *__pyx_v_devPtr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":114 + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaIpcCloseMemHandle(devPtr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":115 + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcCloseMemHandle(devPtr) + * return cudaIpcCloseMemHandle(devPtr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":116 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaIpcCloseMemHandle(devPtr) # <<<<<<<<<<<<<< + * return cudaIpcCloseMemHandle(devPtr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcCloseMemHandle(__pyx_v_devPtr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":115 + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaIpcCloseMemHandle(devPtr) + * return cudaIpcCloseMemHandle(devPtr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":117 + * if usePTDS: + * return ptds._cudaIpcCloseMemHandle(devPtr) + * return cudaIpcCloseMemHandle(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcCloseMemHandle(__pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":113 + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":119 + * return cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceFlushGPUDirectRDMAWrites(enum cudaFlushGPUDirectRDMAWritesTarget __pyx_v_target, enum cudaFlushGPUDirectRDMAWritesScope __pyx_v_scope) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":120 + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":121 + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":122 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) # <<<<<<<<<<<<<< + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceFlushGPUDirectRDMAWrites(((enum cudaFlushGPUDirectRDMAWritesTarget)__pyx_v_target), ((enum cudaFlushGPUDirectRDMAWritesScope)__pyx_v_scope)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":121 + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":123 + * if usePTDS: + * return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceFlushGPUDirectRDMAWrites(__pyx_v_target, __pyx_v_scope); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":119 + * return cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":125 + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceRegisterAsyncNotification(int __pyx_v_device, cudaAsyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, cudaAsyncCallbackHandle_t *__pyx_v_callback) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":126 + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":127 + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":128 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":127 + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":129 + * if usePTDS: + * return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":125 + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceRegisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":131 + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceUnregisterAsyncNotification(int __pyx_v_device, cudaAsyncCallbackHandle_t __pyx_v_callback) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":132 + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":133 + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) + * return cudaDeviceUnregisterAsyncNotification(device, callback) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":134 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) # <<<<<<<<<<<<<< + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":133 + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) + * return cudaDeviceUnregisterAsyncNotification(device, callback) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":135 + * if usePTDS: + * return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) + * return cudaDeviceUnregisterAsyncNotification(device, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":131 + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceUnregisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":137 + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *__pyx_v_pConfig) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":138 + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetSharedMemConfig(pConfig) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":139 + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetSharedMemConfig(pConfig) + * return cudaDeviceGetSharedMemConfig(pConfig) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":140 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetSharedMemConfig(pConfig) # <<<<<<<<<<<<<< + * return cudaDeviceGetSharedMemConfig(pConfig) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetSharedMemConfig(((enum cudaSharedMemConfig *)__pyx_v_pConfig)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":139 + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetSharedMemConfig(pConfig) + * return cudaDeviceGetSharedMemConfig(pConfig) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":141 + * if usePTDS: + * return ptds._cudaDeviceGetSharedMemConfig(pConfig) + * return cudaDeviceGetSharedMemConfig(pConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetSharedMemConfig(__pyx_v_pConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":137 + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":143 + * return cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetSharedMemConfig(enum cudaSharedMemConfig __pyx_v_config) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":144 + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSetSharedMemConfig(config) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":145 + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetSharedMemConfig(config) + * return cudaDeviceSetSharedMemConfig(config) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":146 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSetSharedMemConfig(config) # <<<<<<<<<<<<<< + * return cudaDeviceSetSharedMemConfig(config) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetSharedMemConfig(((enum cudaSharedMemConfig)__pyx_v_config)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":145 + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetSharedMemConfig(config) + * return cudaDeviceSetSharedMemConfig(config) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":147 + * if usePTDS: + * return ptds._cudaDeviceSetSharedMemConfig(config) + * return cudaDeviceSetSharedMemConfig(config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetSharedMemConfig(__pyx_v_config); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":143 + * return cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":149 + * return cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetLastError(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":150 + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetLastError() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":151 + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetLastError() + * return cudaGetLastError() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":152 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetLastError() # <<<<<<<<<<<<<< + * return cudaGetLastError() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetLastError(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":151 + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetLastError() + * return cudaGetLastError() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":153 + * if usePTDS: + * return ptds._cudaGetLastError() + * return cudaGetLastError() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetLastError(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":149 + * return cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":155 + * return cudaGetLastError() + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPeekAtLastError(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":156 + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaPeekAtLastError() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":157 + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaPeekAtLastError() + * return cudaPeekAtLastError() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":158 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaPeekAtLastError() # <<<<<<<<<<<<<< + * return cudaPeekAtLastError() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPeekAtLastError(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":157 + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaPeekAtLastError() + * return cudaPeekAtLastError() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":159 + * if usePTDS: + * return ptds._cudaPeekAtLastError() + * return cudaPeekAtLastError() # <<<<<<<<<<<<<< + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: +*/ + __pyx_r = cudaPeekAtLastError(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":155 + * return cudaGetLastError() + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaPeekAtLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":161 + * return cudaPeekAtLastError() + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static char const *__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorName(cudaError_t __pyx_v_error) { + int __pyx_v_usePTDS; + char const *__pyx_r; + int __pyx_t_1; + char const *__pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":162 + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetErrorName(error) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":163 + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetErrorName(error) + * return cudaGetErrorName(error) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":164 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetErrorName(error) # <<<<<<<<<<<<<< + * return cudaGetErrorName(error) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorName(((cudaError_t)__pyx_v_error)); if (unlikely(__pyx_t_2 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":163 + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetErrorName(error) + * return cudaGetErrorName(error) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":165 + * if usePTDS: + * return ptds._cudaGetErrorName(error) + * return cudaGetErrorName(error) # <<<<<<<<<<<<<< + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: +*/ + __pyx_r = cudaGetErrorName(__pyx_v_error); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":161 + * return cudaPeekAtLastError() + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":167 + * return cudaGetErrorName(error) + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static char const *__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorString(cudaError_t __pyx_v_error) { + int __pyx_v_usePTDS; + char const *__pyx_r; + int __pyx_t_1; + char const *__pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":168 + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetErrorString(error) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":169 + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetErrorString(error) + * return cudaGetErrorString(error) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":170 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetErrorString(error) # <<<<<<<<<<<<<< + * return cudaGetErrorString(error) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorString(((cudaError_t)__pyx_v_error)); if (unlikely(__pyx_t_2 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":169 + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetErrorString(error) + * return cudaGetErrorString(error) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":171 + * if usePTDS: + * return ptds._cudaGetErrorString(error) + * return cudaGetErrorString(error) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetErrorString(__pyx_v_error); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":167 + * return cudaGetErrorName(error) + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":173 + * return cudaGetErrorString(error) + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceCount(int *__pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":174 + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDeviceCount(count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":175 + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceCount(count) + * return cudaGetDeviceCount(count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":176 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDeviceCount(count) # <<<<<<<<<<<<<< + * return cudaGetDeviceCount(count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceCount(__pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":175 + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceCount(count) + * return cudaGetDeviceCount(count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":177 + * if usePTDS: + * return ptds._cudaGetDeviceCount(count) + * return cudaGetDeviceCount(count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceCount(__pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":173 + * return cudaGetErrorString(error) + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDeviceCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":179 + * return cudaGetDeviceCount(count) + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceProperties_v2(struct cudaDeviceProp *__pyx_v_prop, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":180 + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDeviceProperties_v2(prop, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":181 + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceProperties_v2(prop, device) + * return cudaGetDeviceProperties_v2(prop, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":182 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDeviceProperties_v2(prop, device) # <<<<<<<<<<<<<< + * return cudaGetDeviceProperties_v2(prop, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceProperties_v2(__pyx_v_prop, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":181 + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceProperties_v2(prop, device) + * return cudaGetDeviceProperties_v2(prop, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":183 + * if usePTDS: + * return ptds._cudaGetDeviceProperties_v2(prop, device) + * return cudaGetDeviceProperties_v2(prop, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceProperties_v2(__pyx_v_prop, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":179 + * return cudaGetDeviceCount(count) + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDeviceProperties_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":185 + * return cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetAttribute(int *__pyx_v_value, enum cudaDeviceAttr __pyx_v_attr, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":186 + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetAttribute(value, attr, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":187 + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetAttribute(value, attr, device) + * return cudaDeviceGetAttribute(value, attr, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":188 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetAttribute(value, attr, device) # <<<<<<<<<<<<<< + * return cudaDeviceGetAttribute(value, attr, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetAttribute(__pyx_v_value, ((enum cudaDeviceAttr)__pyx_v_attr), __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":187 + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetAttribute(value, attr, device) + * return cudaDeviceGetAttribute(value, attr, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":189 + * if usePTDS: + * return ptds._cudaDeviceGetAttribute(value, attr, device) + * return cudaDeviceGetAttribute(value, attr, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetAttribute(__pyx_v_value, __pyx_v_attr, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":185 + * return cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":191 + * return cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetDefaultMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":192 + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetDefaultMemPool(memPool, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":193 + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetDefaultMemPool(memPool, device) + * return cudaDeviceGetDefaultMemPool(memPool, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":194 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetDefaultMemPool(memPool, device) # <<<<<<<<<<<<<< + * return cudaDeviceGetDefaultMemPool(memPool, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetDefaultMemPool(__pyx_v_memPool, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":193 + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetDefaultMemPool(memPool, device) + * return cudaDeviceGetDefaultMemPool(memPool, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":195 + * if usePTDS: + * return ptds._cudaDeviceGetDefaultMemPool(memPool, device) + * return cudaDeviceGetDefaultMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetDefaultMemPool(__pyx_v_memPool, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":191 + * return cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":197 + * return cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetMemPool(int __pyx_v_device, cudaMemPool_t __pyx_v_memPool) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":198 + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSetMemPool(device, memPool) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":199 + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetMemPool(device, memPool) + * return cudaDeviceSetMemPool(device, memPool) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":200 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSetMemPool(device, memPool) # <<<<<<<<<<<<<< + * return cudaDeviceSetMemPool(device, memPool) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetMemPool(__pyx_v_device, __pyx_v_memPool); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":199 + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetMemPool(device, memPool) + * return cudaDeviceSetMemPool(device, memPool) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":201 + * if usePTDS: + * return ptds._cudaDeviceSetMemPool(device, memPool) + * return cudaDeviceSetMemPool(device, memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetMemPool(__pyx_v_device, __pyx_v_memPool); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":197 + * return cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":203 + * return cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":204 + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetMemPool(memPool, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":205 + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetMemPool(memPool, device) + * return cudaDeviceGetMemPool(memPool, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":206 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetMemPool(memPool, device) # <<<<<<<<<<<<<< + * return cudaDeviceGetMemPool(memPool, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetMemPool(__pyx_v_memPool, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":205 + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetMemPool(memPool, device) + * return cudaDeviceGetMemPool(memPool, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":207 + * if usePTDS: + * return ptds._cudaDeviceGetMemPool(memPool, device) + * return cudaDeviceGetMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetMemPool(__pyx_v_memPool, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":203 + * return cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":209 + * return cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, int __pyx_v_device, int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":210 + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":211 + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":212 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) # <<<<<<<<<<<<<< + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_device, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":211 + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":213 + * if usePTDS: + * return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_device, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":209 + * return cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":215 + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetP2PAttribute(int *__pyx_v_value, enum cudaDeviceP2PAttr __pyx_v_attr, int __pyx_v_srcDevice, int __pyx_v_dstDevice) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":216 + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":217 + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":218 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetP2PAttribute(__pyx_v_value, ((enum cudaDeviceP2PAttr)__pyx_v_attr), __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":217 + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":219 + * if usePTDS: + * return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetP2PAttribute(__pyx_v_value, __pyx_v_attr, __pyx_v_srcDevice, __pyx_v_dstDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":215 + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":221 + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaChooseDevice(int *__pyx_v_device, struct cudaDeviceProp const *__pyx_v_prop) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":222 + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaChooseDevice(device, prop) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":223 + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaChooseDevice(device, prop) + * return cudaChooseDevice(device, prop) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":224 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaChooseDevice(device, prop) # <<<<<<<<<<<<<< + * return cudaChooseDevice(device, prop) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaChooseDevice(__pyx_v_device, __pyx_v_prop); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":223 + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaChooseDevice(device, prop) + * return cudaChooseDevice(device, prop) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":225 + * if usePTDS: + * return ptds._cudaChooseDevice(device, prop) + * return cudaChooseDevice(device, prop) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaChooseDevice(__pyx_v_device, __pyx_v_prop); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":221 + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaChooseDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":227 + * return cudaChooseDevice(device, prop) + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaInitDevice(int __pyx_v_device, unsigned int __pyx_v_deviceFlags, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":228 + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaInitDevice(device, deviceFlags, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":229 + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaInitDevice(device, deviceFlags, flags) + * return cudaInitDevice(device, deviceFlags, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":230 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaInitDevice(device, deviceFlags, flags) # <<<<<<<<<<<<<< + * return cudaInitDevice(device, deviceFlags, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaInitDevice(__pyx_v_device, __pyx_v_deviceFlags, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":229 + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaInitDevice(device, deviceFlags, flags) + * return cudaInitDevice(device, deviceFlags, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":231 + * if usePTDS: + * return ptds._cudaInitDevice(device, deviceFlags, flags) + * return cudaInitDevice(device, deviceFlags, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaInitDevice(__pyx_v_device, __pyx_v_deviceFlags, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":227 + * return cudaChooseDevice(device, prop) + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaInitDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":233 + * return cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDevice(int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":234 + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaSetDevice(device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":235 + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSetDevice(device) + * return cudaSetDevice(device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":236 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaSetDevice(device) # <<<<<<<<<<<<<< + * return cudaSetDevice(device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDevice(__pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":235 + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSetDevice(device) + * return cudaSetDevice(device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":237 + * if usePTDS: + * return ptds._cudaSetDevice(device) + * return cudaSetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSetDevice(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":233 + * return cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaSetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":239 + * return cudaSetDevice(device) + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDevice(int *__pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":240 + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDevice(device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":241 + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDevice(device) + * return cudaGetDevice(device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":242 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDevice(device) # <<<<<<<<<<<<<< + * return cudaGetDevice(device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDevice(__pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":241 + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDevice(device) + * return cudaGetDevice(device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":243 + * if usePTDS: + * return ptds._cudaGetDevice(device) + * return cudaGetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDevice(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":239 + * return cudaSetDevice(device) + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":245 + * return cudaGetDevice(device) + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDeviceFlags(unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":246 + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaSetDeviceFlags(flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":247 + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSetDeviceFlags(flags) + * return cudaSetDeviceFlags(flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":248 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaSetDeviceFlags(flags) # <<<<<<<<<<<<<< + * return cudaSetDeviceFlags(flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDeviceFlags(__pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":247 + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSetDeviceFlags(flags) + * return cudaSetDeviceFlags(flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":249 + * if usePTDS: + * return ptds._cudaSetDeviceFlags(flags) + * return cudaSetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSetDeviceFlags(__pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":245 + * return cudaGetDevice(device) + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaSetDeviceFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":251 + * return cudaSetDeviceFlags(flags) + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceFlags(unsigned int *__pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":252 + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDeviceFlags(flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":253 + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceFlags(flags) + * return cudaGetDeviceFlags(flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":254 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDeviceFlags(flags) # <<<<<<<<<<<<<< + * return cudaGetDeviceFlags(flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceFlags(__pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":253 + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDeviceFlags(flags) + * return cudaGetDeviceFlags(flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":255 + * if usePTDS: + * return ptds._cudaGetDeviceFlags(flags) + * return cudaGetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceFlags(__pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":251 + * return cudaSetDeviceFlags(flags) + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDeviceFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":257 + * return cudaGetDeviceFlags(flags) + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreate(cudaStream_t *__pyx_v_pStream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":258 + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamCreate(pStream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":259 + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreate(pStream) + * return cudaStreamCreate(pStream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":260 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamCreate(pStream) # <<<<<<<<<<<<<< + * return cudaStreamCreate(pStream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreate(__pyx_v_pStream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":259 + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreate(pStream) + * return cudaStreamCreate(pStream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":261 + * if usePTDS: + * return ptds._cudaStreamCreate(pStream) + * return cudaStreamCreate(pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreate(__pyx_v_pStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":257 + * return cudaGetDeviceFlags(flags) + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":263 + * return cudaStreamCreate(pStream) + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithFlags(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":264 + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamCreateWithFlags(pStream, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":265 + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreateWithFlags(pStream, flags) + * return cudaStreamCreateWithFlags(pStream, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":266 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamCreateWithFlags(pStream, flags) # <<<<<<<<<<<<<< + * return cudaStreamCreateWithFlags(pStream, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithFlags(__pyx_v_pStream, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":265 + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreateWithFlags(pStream, flags) + * return cudaStreamCreateWithFlags(pStream, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":267 + * if usePTDS: + * return ptds._cudaStreamCreateWithFlags(pStream, flags) + * return cudaStreamCreateWithFlags(pStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreateWithFlags(__pyx_v_pStream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":263 + * return cudaStreamCreate(pStream) + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamCreateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":269 + * return cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithPriority(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags, int __pyx_v_priority) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":270 + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":271 + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) + * return cudaStreamCreateWithPriority(pStream, flags, priority) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":272 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) # <<<<<<<<<<<<<< + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithPriority(__pyx_v_pStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":271 + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) + * return cudaStreamCreateWithPriority(pStream, flags, priority) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":273 + * if usePTDS: + * return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) + * return cudaStreamCreateWithPriority(pStream, flags, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreateWithPriority(__pyx_v_pStream, __pyx_v_flags, __pyx_v_priority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":269 + * return cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":275 + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetPriority(cudaStream_t __pyx_v_hStream, int *__pyx_v_priority) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":276 + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetPriority(hStream, priority) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":277 + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetPriority(hStream, priority) + * return cudaStreamGetPriority(hStream, priority) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":278 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetPriority(hStream, priority) # <<<<<<<<<<<<<< + * return cudaStreamGetPriority(hStream, priority) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":277 + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetPriority(hStream, priority) + * return cudaStreamGetPriority(hStream, priority) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":279 + * if usePTDS: + * return ptds._cudaStreamGetPriority(hStream, priority) + * return cudaStreamGetPriority(hStream, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":275 + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":281 + * return cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetFlags(cudaStream_t __pyx_v_hStream, unsigned int *__pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":282 + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetFlags(hStream, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":283 + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetFlags(hStream, flags) + * return cudaStreamGetFlags(hStream, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":284 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetFlags(hStream, flags) # <<<<<<<<<<<<<< + * return cudaStreamGetFlags(hStream, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":283 + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetFlags(hStream, flags) + * return cudaStreamGetFlags(hStream, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":285 + * if usePTDS: + * return ptds._cudaStreamGetFlags(hStream, flags) + * return cudaStreamGetFlags(hStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":281 + * return cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":287 + * return cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetId(cudaStream_t __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":288 + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetId(hStream, streamId) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":289 + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetId(hStream, streamId) + * return cudaStreamGetId(hStream, streamId) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":290 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetId(hStream, streamId) # <<<<<<<<<<<<<< + * return cudaStreamGetId(hStream, streamId) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetId(__pyx_v_hStream, __pyx_v_streamId); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":289 + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetId(hStream, streamId) + * return cudaStreamGetId(hStream, streamId) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":291 + * if usePTDS: + * return ptds._cudaStreamGetId(hStream, streamId) + * return cudaStreamGetId(hStream, streamId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetId(__pyx_v_hStream, __pyx_v_streamId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":287 + * return cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":293 + * return cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetDevice(cudaStream_t __pyx_v_hStream, int *__pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":294 + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetDevice(hStream, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":295 + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetDevice(hStream, device) + * return cudaStreamGetDevice(hStream, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":296 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetDevice(hStream, device) # <<<<<<<<<<<<<< + * return cudaStreamGetDevice(hStream, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetDevice(__pyx_v_hStream, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":295 + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetDevice(hStream, device) + * return cudaStreamGetDevice(hStream, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":297 + * if usePTDS: + * return ptds._cudaStreamGetDevice(hStream, device) + * return cudaStreamGetDevice(hStream, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetDevice(__pyx_v_hStream, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":293 + * return cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":299 + * return cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCtxResetPersistingL2Cache(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":300 + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaCtxResetPersistingL2Cache() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":301 + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCtxResetPersistingL2Cache() + * return cudaCtxResetPersistingL2Cache() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":302 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaCtxResetPersistingL2Cache() # <<<<<<<<<<<<<< + * return cudaCtxResetPersistingL2Cache() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCtxResetPersistingL2Cache(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":301 + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCtxResetPersistingL2Cache() + * return cudaCtxResetPersistingL2Cache() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":303 + * if usePTDS: + * return ptds._cudaCtxResetPersistingL2Cache() + * return cudaCtxResetPersistingL2Cache() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCtxResetPersistingL2Cache(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":299 + * return cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":305 + * return cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCopyAttributes(cudaStream_t __pyx_v_dst, cudaStream_t __pyx_v_src) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":306 + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamCopyAttributes(dst, src) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":307 + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCopyAttributes(dst, src) + * return cudaStreamCopyAttributes(dst, src) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":308 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * return cudaStreamCopyAttributes(dst, src) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":307 + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamCopyAttributes(dst, src) + * return cudaStreamCopyAttributes(dst, src) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":309 + * if usePTDS: + * return ptds._cudaStreamCopyAttributes(dst, src) + * return cudaStreamCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":305 + * return cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":311 + * return cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue *__pyx_v_value_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":312 + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetAttribute(hStream, attr, value_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":313 + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetAttribute(hStream, attr, value_out) + * return cudaStreamGetAttribute(hStream, attr, value_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":314 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetAttribute(hStream, attr, value_out) # <<<<<<<<<<<<<< + * return cudaStreamGetAttribute(hStream, attr, value_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetAttribute(__pyx_v_hStream, ((__pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID)__pyx_v_attr), __pyx_v_value_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":313 + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetAttribute(hStream, attr, value_out) + * return cudaStreamGetAttribute(hStream, attr, value_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":315 + * if usePTDS: + * return ptds._cudaStreamGetAttribute(hStream, attr, value_out) + * return cudaStreamGetAttribute(hStream, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":311 + * return cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":317 + * return cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue const *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":318 + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamSetAttribute(hStream, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":319 + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamSetAttribute(hStream, attr, value) + * return cudaStreamSetAttribute(hStream, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":320 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamSetAttribute(hStream, attr, value) # <<<<<<<<<<<<<< + * return cudaStreamSetAttribute(hStream, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSetAttribute(__pyx_v_hStream, ((__pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":319 + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamSetAttribute(hStream, attr, value) + * return cudaStreamSetAttribute(hStream, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":321 + * if usePTDS: + * return ptds._cudaStreamSetAttribute(hStream, attr, value) + * return cudaStreamSetAttribute(hStream, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamSetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":317 + * return cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":323 + * return cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamDestroy(cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":324 + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamDestroy(stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":325 + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamDestroy(stream) + * return cudaStreamDestroy(stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":326 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamDestroy(stream) # <<<<<<<<<<<<<< + * return cudaStreamDestroy(stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamDestroy(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":325 + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamDestroy(stream) + * return cudaStreamDestroy(stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":327 + * if usePTDS: + * return ptds._cudaStreamDestroy(stream) + * return cudaStreamDestroy(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamDestroy(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":323 + * return cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":329 + * return cudaStreamDestroy(stream) + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamWaitEvent(cudaStream_t __pyx_v_stream, cudaEvent_t __pyx_v_event, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":330 + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamWaitEvent(stream, event, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":331 + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamWaitEvent(stream, event, flags) + * return cudaStreamWaitEvent(stream, event, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":332 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamWaitEvent(stream, event, flags) # <<<<<<<<<<<<<< + * return cudaStreamWaitEvent(stream, event, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamWaitEvent(__pyx_v_stream, __pyx_v_event, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":331 + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamWaitEvent(stream, event, flags) + * return cudaStreamWaitEvent(stream, event, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":333 + * if usePTDS: + * return ptds._cudaStreamWaitEvent(stream, event, flags) + * return cudaStreamWaitEvent(stream, event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamWaitEvent(__pyx_v_stream, __pyx_v_event, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":329 + * return cudaStreamDestroy(stream) + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":335 + * return cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAddCallback(cudaStream_t __pyx_v_stream, cudaStreamCallback_t __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":336 + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamAddCallback(stream, callback, userData, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":337 + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamAddCallback(stream, callback, userData, flags) + * return cudaStreamAddCallback(stream, callback, userData, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":338 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamAddCallback(stream, callback, userData, flags) # <<<<<<<<<<<<<< + * return cudaStreamAddCallback(stream, callback, userData, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAddCallback(__pyx_v_stream, ((cudaStreamCallback_t)__pyx_v_callback), __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":337 + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamAddCallback(stream, callback, userData, flags) + * return cudaStreamAddCallback(stream, callback, userData, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":339 + * if usePTDS: + * return ptds._cudaStreamAddCallback(stream, callback, userData, flags) + * return cudaStreamAddCallback(stream, callback, userData, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamAddCallback(__pyx_v_stream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":335 + * return cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":341 + * return cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSynchronize(cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":342 + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamSynchronize(stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":343 + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamSynchronize(stream) + * return cudaStreamSynchronize(stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":344 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamSynchronize(stream) # <<<<<<<<<<<<<< + * return cudaStreamSynchronize(stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSynchronize(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":343 + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamSynchronize(stream) + * return cudaStreamSynchronize(stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":345 + * if usePTDS: + * return ptds._cudaStreamSynchronize(stream) + * return cudaStreamSynchronize(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamSynchronize(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":341 + * return cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":347 + * return cudaStreamSynchronize(stream) + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamQuery(cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":348 + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamQuery(stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":349 + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamQuery(stream) + * return cudaStreamQuery(stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":350 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamQuery(stream) # <<<<<<<<<<<<<< + * return cudaStreamQuery(stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamQuery(__pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":349 + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamQuery(stream) + * return cudaStreamQuery(stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":351 + * if usePTDS: + * return ptds._cudaStreamQuery(stream) + * return cudaStreamQuery(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamQuery(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":347 + * return cudaStreamSynchronize(stream) + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":353 + * return cudaStreamQuery(stream) + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAttachMemAsync(cudaStream_t __pyx_v_stream, void *__pyx_v_devPtr, size_t __pyx_v_length, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":354 + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":355 + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":356 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) # <<<<<<<<<<<<<< + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAttachMemAsync(__pyx_v_stream, __pyx_v_devPtr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":355 + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":357 + * if usePTDS: + * return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamAttachMemAsync(__pyx_v_stream, __pyx_v_devPtr, __pyx_v_length, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":353 + * return cudaStreamQuery(stream) + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":359 + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCapture(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureMode __pyx_v_mode) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":360 + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamBeginCapture(stream, mode) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":361 + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamBeginCapture(stream, mode) + * return cudaStreamBeginCapture(stream, mode) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":362 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamBeginCapture(stream, mode) # <<<<<<<<<<<<<< + * return cudaStreamBeginCapture(stream, mode) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCapture(__pyx_v_stream, ((enum cudaStreamCaptureMode)__pyx_v_mode)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":361 + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamBeginCapture(stream, mode) + * return cudaStreamBeginCapture(stream, mode) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":363 + * if usePTDS: + * return ptds._cudaStreamBeginCapture(stream, mode) + * return cudaStreamBeginCapture(stream, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamBeginCapture(__pyx_v_stream, __pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":359 + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":365 + * return cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCaptureToGraph(cudaStream_t __pyx_v_stream, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, enum cudaStreamCaptureMode __pyx_v_mode) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":366 + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":367 + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":368 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCaptureToGraph(__pyx_v_stream, __pyx_v_graph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, ((enum cudaStreamCaptureMode)__pyx_v_mode)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":367 + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":369 + * if usePTDS: + * return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamBeginCaptureToGraph(__pyx_v_stream, __pyx_v_graph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":365 + * return cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamBeginCaptureToGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":371 + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *__pyx_v_mode) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":372 + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaThreadExchangeStreamCaptureMode(mode) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":373 + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaThreadExchangeStreamCaptureMode(mode) + * return cudaThreadExchangeStreamCaptureMode(mode) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":374 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaThreadExchangeStreamCaptureMode(mode) # <<<<<<<<<<<<<< + * return cudaThreadExchangeStreamCaptureMode(mode) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaThreadExchangeStreamCaptureMode(((enum cudaStreamCaptureMode *)__pyx_v_mode)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":373 + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaThreadExchangeStreamCaptureMode(mode) + * return cudaThreadExchangeStreamCaptureMode(mode) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":375 + * if usePTDS: + * return ptds._cudaThreadExchangeStreamCaptureMode(mode) + * return cudaThreadExchangeStreamCaptureMode(mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaThreadExchangeStreamCaptureMode(__pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":371 + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":377 + * return cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamEndCapture(cudaStream_t __pyx_v_stream, cudaGraph_t *__pyx_v_pGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":378 + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamEndCapture(stream, pGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":379 + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamEndCapture(stream, pGraph) + * return cudaStreamEndCapture(stream, pGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":380 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamEndCapture(stream, pGraph) # <<<<<<<<<<<<<< + * return cudaStreamEndCapture(stream, pGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamEndCapture(__pyx_v_stream, __pyx_v_pGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 380, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":379 + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamEndCapture(stream, pGraph) + * return cudaStreamEndCapture(stream, pGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":381 + * if usePTDS: + * return ptds._cudaStreamEndCapture(stream, pGraph) + * return cudaStreamEndCapture(stream, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamEndCapture(__pyx_v_stream, __pyx_v_pGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":377 + * return cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":383 + * return cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamIsCapturing(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_pCaptureStatus) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":384 + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":385 + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) + * return cudaStreamIsCapturing(stream, pCaptureStatus) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":386 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) # <<<<<<<<<<<<<< + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamIsCapturing(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_pCaptureStatus)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":385 + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) + * return cudaStreamIsCapturing(stream, pCaptureStatus) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":387 + * if usePTDS: + * return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) + * return cudaStreamIsCapturing(stream, pCaptureStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamIsCapturing(__pyx_v_stream, __pyx_v_pCaptureStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":383 + * return cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":389 + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v2(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":390 + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":391 + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":392 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v2(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_captureStatus_out), __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":391 + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":393 + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetCaptureInfo_v2(__pyx_v_stream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":389 + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetCaptureInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":395 + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v3(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, cudaGraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":396 + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":397 + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":398 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v3(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_captureStatus_out), __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":397 + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":399 + * if usePTDS: + * return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetCaptureInfo_v3(__pyx_v_stream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":395 + * return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamGetCaptureInfo_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":401 + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":402 + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":403 + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":404 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":403 + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":405 + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamUpdateCaptureDependencies(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":401 + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":407 + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies_v2(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":408 + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":409 + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":410 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies_v2(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":409 + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":411 + * if usePTDS: + * return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamUpdateCaptureDependencies_v2(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":407 + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaStreamUpdateCaptureDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":413 + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreate(cudaEvent_t *__pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":414 + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventCreate(event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":415 + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventCreate(event) + * return cudaEventCreate(event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":416 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventCreate(event) # <<<<<<<<<<<<<< + * return cudaEventCreate(event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreate(__pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":415 + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventCreate(event) + * return cudaEventCreate(event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":417 + * if usePTDS: + * return ptds._cudaEventCreate(event) + * return cudaEventCreate(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventCreate(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":413 + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":419 + * return cudaEventCreate(event) + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateWithFlags(cudaEvent_t *__pyx_v_event, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":420 + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventCreateWithFlags(event, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":421 + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventCreateWithFlags(event, flags) + * return cudaEventCreateWithFlags(event, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":422 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventCreateWithFlags(event, flags) # <<<<<<<<<<<<<< + * return cudaEventCreateWithFlags(event, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreateWithFlags(__pyx_v_event, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":421 + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventCreateWithFlags(event, flags) + * return cudaEventCreateWithFlags(event, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":423 + * if usePTDS: + * return ptds._cudaEventCreateWithFlags(event, flags) + * return cudaEventCreateWithFlags(event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventCreateWithFlags(__pyx_v_event, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":419 + * return cudaEventCreate(event) + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventCreateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":425 + * return cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecord(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":426 + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventRecord(event, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":427 + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventRecord(event, stream) + * return cudaEventRecord(event, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":428 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventRecord(event, stream) # <<<<<<<<<<<<<< + * return cudaEventRecord(event, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecord(__pyx_v_event, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":427 + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventRecord(event, stream) + * return cudaEventRecord(event, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":429 + * if usePTDS: + * return ptds._cudaEventRecord(event, stream) + * return cudaEventRecord(event, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventRecord(__pyx_v_event, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":425 + * return cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":431 + * return cudaEventRecord(event, stream) + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecordWithFlags(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":432 + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventRecordWithFlags(event, stream, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":433 + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventRecordWithFlags(event, stream, flags) + * return cudaEventRecordWithFlags(event, stream, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":434 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventRecordWithFlags(event, stream, flags) # <<<<<<<<<<<<<< + * return cudaEventRecordWithFlags(event, stream, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecordWithFlags(__pyx_v_event, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":433 + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventRecordWithFlags(event, stream, flags) + * return cudaEventRecordWithFlags(event, stream, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":435 + * if usePTDS: + * return ptds._cudaEventRecordWithFlags(event, stream, flags) + * return cudaEventRecordWithFlags(event, stream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventRecordWithFlags(__pyx_v_event, __pyx_v_stream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":431 + * return cudaEventRecord(event, stream) + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":437 + * return cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventQuery(cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":438 + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventQuery(event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":439 + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventQuery(event) + * return cudaEventQuery(event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":440 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventQuery(event) # <<<<<<<<<<<<<< + * return cudaEventQuery(event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventQuery(__pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":439 + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventQuery(event) + * return cudaEventQuery(event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":441 + * if usePTDS: + * return ptds._cudaEventQuery(event) + * return cudaEventQuery(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventQuery(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":437 + * return cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":443 + * return cudaEventQuery(event) + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventSynchronize(cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":444 + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventSynchronize(event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":445 + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventSynchronize(event) + * return cudaEventSynchronize(event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":446 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventSynchronize(event) # <<<<<<<<<<<<<< + * return cudaEventSynchronize(event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventSynchronize(__pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":445 + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventSynchronize(event) + * return cudaEventSynchronize(event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":447 + * if usePTDS: + * return ptds._cudaEventSynchronize(event) + * return cudaEventSynchronize(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventSynchronize(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":443 + * return cudaEventQuery(event) + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":449 + * return cudaEventSynchronize(event) + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventDestroy(cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":450 + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventDestroy(event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":451 + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventDestroy(event) + * return cudaEventDestroy(event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":452 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventDestroy(event) # <<<<<<<<<<<<<< + * return cudaEventDestroy(event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventDestroy(__pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":451 + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventDestroy(event) + * return cudaEventDestroy(event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":453 + * if usePTDS: + * return ptds._cudaEventDestroy(event) + * return cudaEventDestroy(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventDestroy(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":449 + * return cudaEventSynchronize(event) + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":455 + * return cudaEventDestroy(event) + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":456 + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventElapsedTime(ms, start, end) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":457 + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventElapsedTime(ms, start, end) + * return cudaEventElapsedTime(ms, start, end) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":458 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventElapsedTime(ms, start, end) # <<<<<<<<<<<<<< + * return cudaEventElapsedTime(ms, start, end) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime(__pyx_v_ms, __pyx_v_start, __pyx_v_end); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":457 + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventElapsedTime(ms, start, end) + * return cudaEventElapsedTime(ms, start, end) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":459 + * if usePTDS: + * return ptds._cudaEventElapsedTime(ms, start, end) + * return cudaEventElapsedTime(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventElapsedTime(__pyx_v_ms, __pyx_v_start, __pyx_v_end); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":455 + * return cudaEventDestroy(event) + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":461 + * return cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime_v2(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":462 + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaEventElapsedTime_v2(ms, start, end) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":463 + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventElapsedTime_v2(ms, start, end) + * return cudaEventElapsedTime_v2(ms, start, end) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":464 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaEventElapsedTime_v2(ms, start, end) # <<<<<<<<<<<<<< + * return cudaEventElapsedTime_v2(ms, start, end) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime_v2(__pyx_v_ms, __pyx_v_start, __pyx_v_end); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":463 + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaEventElapsedTime_v2(ms, start, end) + * return cudaEventElapsedTime_v2(ms, start, end) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":465 + * if usePTDS: + * return ptds._cudaEventElapsedTime_v2(ms, start, end) + * return cudaEventElapsedTime_v2(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventElapsedTime_v2(__pyx_v_ms, __pyx_v_start, __pyx_v_end); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":461 + * return cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventElapsedTime_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":467 + * return cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalMemory(cudaExternalMemory_t *__pyx_v_extMem_out, struct cudaExternalMemoryHandleDesc const *__pyx_v_memHandleDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":468 + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":469 + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) + * return cudaImportExternalMemory(extMem_out, memHandleDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":470 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":469 + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) + * return cudaImportExternalMemory(extMem_out, memHandleDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":471 + * if usePTDS: + * return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) + * return cudaImportExternalMemory(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":467 + * return cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":473 + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedBuffer(void **__pyx_v_devPtr, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryBufferDesc const *__pyx_v_bufferDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":474 + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":475 + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":476 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":475 + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":477 + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":473 + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":479 + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmap, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryMipmappedArrayDesc const *__pyx_v_mipmapDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":480 + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 480, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":481 + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":482 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":481 + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":483 + * if usePTDS: + * return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":479 + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":485 + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalMemory(cudaExternalMemory_t __pyx_v_extMem) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":486 + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDestroyExternalMemory(extMem) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":487 + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyExternalMemory(extMem) + * return cudaDestroyExternalMemory(extMem) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":488 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDestroyExternalMemory(extMem) # <<<<<<<<<<<<<< + * return cudaDestroyExternalMemory(extMem) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalMemory(__pyx_v_extMem); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":487 + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyExternalMemory(extMem) + * return cudaDestroyExternalMemory(extMem) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":489 + * if usePTDS: + * return ptds._cudaDestroyExternalMemory(extMem) + * return cudaDestroyExternalMemory(extMem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyExternalMemory(__pyx_v_extMem); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":485 + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":491 + * return cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalSemaphore(cudaExternalSemaphore_t *__pyx_v_extSem_out, struct cudaExternalSemaphoreHandleDesc const *__pyx_v_semHandleDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":492 + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":493 + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":494 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":493 + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":495 + * if usePTDS: + * return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":491 + * return cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":497 + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSignalExternalSemaphoresAsync_v2(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreSignalParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":498 + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":499 + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":500 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSignalExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":499 + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":501 + * if usePTDS: + * return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSignalExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":497 + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaSignalExternalSemaphoresAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":503 + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaWaitExternalSemaphoresAsync_v2(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreWaitParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":504 + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":505 + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":506 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaWaitExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":505 + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":507 + * if usePTDS: + * return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaWaitExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":503 + * return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaWaitExternalSemaphoresAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":509 + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalSemaphore(cudaExternalSemaphore_t __pyx_v_extSem) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":510 + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDestroyExternalSemaphore(extSem) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":511 + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyExternalSemaphore(extSem) + * return cudaDestroyExternalSemaphore(extSem) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":512 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDestroyExternalSemaphore(extSem) # <<<<<<<<<<<<<< + * return cudaDestroyExternalSemaphore(extSem) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalSemaphore(__pyx_v_extSem); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":511 + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyExternalSemaphore(extSem) + * return cudaDestroyExternalSemaphore(extSem) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":513 + * if usePTDS: + * return ptds._cudaDestroyExternalSemaphore(extSem) + * return cudaDestroyExternalSemaphore(extSem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyExternalSemaphore(__pyx_v_extSem); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":509 + * return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":515 + * return cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetCacheConfig(void const *__pyx_v_func, enum cudaFuncCache __pyx_v_cacheConfig) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":516 + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFuncSetCacheConfig(func, cacheConfig) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":517 + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetCacheConfig(func, cacheConfig) + * return cudaFuncSetCacheConfig(func, cacheConfig) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":518 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFuncSetCacheConfig(func, cacheConfig) # <<<<<<<<<<<<<< + * return cudaFuncSetCacheConfig(func, cacheConfig) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetCacheConfig(__pyx_v_func, ((enum cudaFuncCache)__pyx_v_cacheConfig)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":517 + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetCacheConfig(func, cacheConfig) + * return cudaFuncSetCacheConfig(func, cacheConfig) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":519 + * if usePTDS: + * return ptds._cudaFuncSetCacheConfig(func, cacheConfig) + * return cudaFuncSetCacheConfig(func, cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetCacheConfig(__pyx_v_func, __pyx_v_cacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":515 + * return cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":521 + * return cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncGetAttributes(struct cudaFuncAttributes *__pyx_v_attr, void const *__pyx_v_func) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":522 + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFuncGetAttributes(attr, func) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":523 + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncGetAttributes(attr, func) + * return cudaFuncGetAttributes(attr, func) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":524 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFuncGetAttributes(attr, func) # <<<<<<<<<<<<<< + * return cudaFuncGetAttributes(attr, func) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncGetAttributes(__pyx_v_attr, __pyx_v_func); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":523 + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncGetAttributes(attr, func) + * return cudaFuncGetAttributes(attr, func) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":525 + * if usePTDS: + * return ptds._cudaFuncGetAttributes(attr, func) + * return cudaFuncGetAttributes(attr, func) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncGetAttributes(__pyx_v_attr, __pyx_v_func); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":521 + * return cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFuncGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":527 + * return cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetAttribute(void const *__pyx_v_func, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":528 + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFuncSetAttribute(func, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":529 + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetAttribute(func, attr, value) + * return cudaFuncSetAttribute(func, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":530 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFuncSetAttribute(func, attr, value) # <<<<<<<<<<<<<< + * return cudaFuncSetAttribute(func, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetAttribute(__pyx_v_func, ((enum cudaFuncAttribute)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":529 + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetAttribute(func, attr, value) + * return cudaFuncSetAttribute(func, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":531 + * if usePTDS: + * return ptds._cudaFuncSetAttribute(func, attr, value) + * return cudaFuncSetAttribute(func, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetAttribute(__pyx_v_func, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":527 + * return cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":533 + * return cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLaunchHostFunc(cudaStream_t __pyx_v_stream, cudaHostFn_t __pyx_v_fn, void *__pyx_v_userData) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":534 + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLaunchHostFunc(stream, fn, userData) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":535 + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLaunchHostFunc(stream, fn, userData) + * return cudaLaunchHostFunc(stream, fn, userData) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":536 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLaunchHostFunc(stream, fn, userData) # <<<<<<<<<<<<<< + * return cudaLaunchHostFunc(stream, fn, userData) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLaunchHostFunc(__pyx_v_stream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":535 + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLaunchHostFunc(stream, fn, userData) + * return cudaLaunchHostFunc(stream, fn, userData) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":537 + * if usePTDS: + * return ptds._cudaLaunchHostFunc(stream, fn, userData) + * return cudaLaunchHostFunc(stream, fn, userData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLaunchHostFunc(__pyx_v_stream, __pyx_v_fn, __pyx_v_userData); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":533 + * return cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":539 + * return cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetSharedMemConfig(void const *__pyx_v_func, enum cudaSharedMemConfig __pyx_v_config) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":540 + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFuncSetSharedMemConfig(func, config) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":541 + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetSharedMemConfig(func, config) + * return cudaFuncSetSharedMemConfig(func, config) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":542 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFuncSetSharedMemConfig(func, config) # <<<<<<<<<<<<<< + * return cudaFuncSetSharedMemConfig(func, config) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetSharedMemConfig(__pyx_v_func, ((enum cudaSharedMemConfig)__pyx_v_config)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 542, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":541 + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFuncSetSharedMemConfig(func, config) + * return cudaFuncSetSharedMemConfig(func, config) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":543 + * if usePTDS: + * return ptds._cudaFuncSetSharedMemConfig(func, config) + * return cudaFuncSetSharedMemConfig(func, config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetSharedMemConfig(__pyx_v_func, __pyx_v_config); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":539 + * return cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":545 + * return cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":546 + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":547 + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":548 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":547 + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":549 + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":545 + * return cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":551 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, void const *__pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":552 + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":553 + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":554 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":553 + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":555 + * if usePTDS: + * return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":551 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":557 + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":558 + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":559 + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":560 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":559 + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":561 + * if usePTDS: + * return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":557 + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":563 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocManaged(void **__pyx_v_devPtr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":564 + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocManaged(devPtr, size, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":565 + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocManaged(devPtr, size, flags) + * return cudaMallocManaged(devPtr, size, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":566 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocManaged(devPtr, size, flags) # <<<<<<<<<<<<<< + * return cudaMallocManaged(devPtr, size, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocManaged(__pyx_v_devPtr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":565 + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocManaged(devPtr, size, flags) + * return cudaMallocManaged(devPtr, size, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":567 + * if usePTDS: + * return ptds._cudaMallocManaged(devPtr, size, flags) + * return cudaMallocManaged(devPtr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocManaged(__pyx_v_devPtr, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":563 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":569 + * return cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc(void **__pyx_v_devPtr, size_t __pyx_v_size) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":570 + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMalloc(devPtr, size) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":571 + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc(devPtr, size) + * return cudaMalloc(devPtr, size) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":572 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMalloc(devPtr, size) # <<<<<<<<<<<<<< + * return cudaMalloc(devPtr, size) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc(__pyx_v_devPtr, __pyx_v_size); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":571 + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc(devPtr, size) + * return cudaMalloc(devPtr, size) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":573 + * if usePTDS: + * return ptds._cudaMalloc(devPtr, size) + * return cudaMalloc(devPtr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc(__pyx_v_devPtr, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":569 + * return cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMalloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":575 + * return cudaMalloc(devPtr, size) + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocHost(void **__pyx_v_ptr, size_t __pyx_v_size) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":576 + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocHost(ptr, size) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":577 + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocHost(ptr, size) + * return cudaMallocHost(ptr, size) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":578 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocHost(ptr, size) # <<<<<<<<<<<<<< + * return cudaMallocHost(ptr, size) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocHost(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":577 + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocHost(ptr, size) + * return cudaMallocHost(ptr, size) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":579 + * if usePTDS: + * return ptds._cudaMallocHost(ptr, size) + * return cudaMallocHost(ptr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocHost(__pyx_v_ptr, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":575 + * return cudaMalloc(devPtr, size) + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":581 + * return cudaMallocHost(ptr, size) + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocPitch(void **__pyx_v_devPtr, size_t *__pyx_v_pitch, size_t __pyx_v_width, size_t __pyx_v_height) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":582 + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocPitch(devPtr, pitch, width, height) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":583 + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocPitch(devPtr, pitch, width, height) + * return cudaMallocPitch(devPtr, pitch, width, height) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":584 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocPitch(devPtr, pitch, width, height) # <<<<<<<<<<<<<< + * return cudaMallocPitch(devPtr, pitch, width, height) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocPitch(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":583 + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocPitch(devPtr, pitch, width, height) + * return cudaMallocPitch(devPtr, pitch, width, height) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":585 + * if usePTDS: + * return ptds._cudaMallocPitch(devPtr, pitch, width, height) + * return cudaMallocPitch(devPtr, pitch, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocPitch(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_width, __pyx_v_height); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":581 + * return cudaMallocHost(ptr, size) + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":587 + * return cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, size_t __pyx_v_width, size_t __pyx_v_height, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":588 + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocArray(array, desc, width, height, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":589 + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocArray(array, desc, width, height, flags) + * return cudaMallocArray(array, desc, width, height, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":590 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocArray(array, desc, width, height, flags) # <<<<<<<<<<<<<< + * return cudaMallocArray(array, desc, width, height, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocArray(__pyx_v_array, __pyx_v_desc, __pyx_v_width, __pyx_v_height, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":589 + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocArray(array, desc, width, height, flags) + * return cudaMallocArray(array, desc, width, height, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":591 + * if usePTDS: + * return ptds._cudaMallocArray(array, desc, width, height, flags) + * return cudaMallocArray(array, desc, width, height, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocArray(__pyx_v_array, __pyx_v_desc, __pyx_v_width, __pyx_v_height, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":587 + * return cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":593 + * return cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFree(void *__pyx_v_devPtr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":594 + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFree(devPtr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":595 + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFree(devPtr) + * return cudaFree(devPtr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":596 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFree(devPtr) # <<<<<<<<<<<<<< + * return cudaFree(devPtr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFree(__pyx_v_devPtr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":595 + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFree(devPtr) + * return cudaFree(devPtr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":597 + * if usePTDS: + * return ptds._cudaFree(devPtr) + * return cudaFree(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFree(__pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":593 + * return cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFree", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":599 + * return cudaFree(devPtr) + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeHost(void *__pyx_v_ptr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":600 + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFreeHost(ptr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":601 + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeHost(ptr) + * return cudaFreeHost(ptr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":602 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFreeHost(ptr) # <<<<<<<<<<<<<< + * return cudaFreeHost(ptr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeHost(__pyx_v_ptr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":601 + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeHost(ptr) + * return cudaFreeHost(ptr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":603 + * if usePTDS: + * return ptds._cudaFreeHost(ptr) + * return cudaFreeHost(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeHost(__pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":599 + * return cudaFree(devPtr) + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":605 + * return cudaFreeHost(ptr) + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeArray(cudaArray_t __pyx_v_array) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":606 + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFreeArray(array) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":607 + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeArray(array) + * return cudaFreeArray(array) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":608 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFreeArray(array) # <<<<<<<<<<<<<< + * return cudaFreeArray(array) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeArray(__pyx_v_array); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":607 + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeArray(array) + * return cudaFreeArray(array) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":609 + * if usePTDS: + * return ptds._cudaFreeArray(array) + * return cudaFreeArray(array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeArray(__pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":605 + * return cudaFreeHost(ptr) + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFreeArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":611 + * return cudaFreeArray(array) + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeMipmappedArray(cudaMipmappedArray_t __pyx_v_mipmappedArray) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":612 + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFreeMipmappedArray(mipmappedArray) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":613 + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeMipmappedArray(mipmappedArray) + * return cudaFreeMipmappedArray(mipmappedArray) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":614 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFreeMipmappedArray(mipmappedArray) # <<<<<<<<<<<<<< + * return cudaFreeMipmappedArray(mipmappedArray) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeMipmappedArray(__pyx_v_mipmappedArray); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":613 + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeMipmappedArray(mipmappedArray) + * return cudaFreeMipmappedArray(mipmappedArray) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":615 + * if usePTDS: + * return ptds._cudaFreeMipmappedArray(mipmappedArray) + * return cudaFreeMipmappedArray(mipmappedArray) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeMipmappedArray(__pyx_v_mipmappedArray); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":611 + * return cudaFreeArray(array) + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFreeMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":617 + * return cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostAlloc(void **__pyx_v_pHost, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":618 + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaHostAlloc(pHost, size, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":619 + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostAlloc(pHost, size, flags) + * return cudaHostAlloc(pHost, size, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":620 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaHostAlloc(pHost, size, flags) # <<<<<<<<<<<<<< + * return cudaHostAlloc(pHost, size, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostAlloc(__pyx_v_pHost, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":619 + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostAlloc(pHost, size, flags) + * return cudaHostAlloc(pHost, size, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":621 + * if usePTDS: + * return ptds._cudaHostAlloc(pHost, size, flags) + * return cudaHostAlloc(pHost, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostAlloc(__pyx_v_pHost, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":617 + * return cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":623 + * return cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostRegister(void *__pyx_v_ptr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":624 + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaHostRegister(ptr, size, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":625 + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostRegister(ptr, size, flags) + * return cudaHostRegister(ptr, size, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":626 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaHostRegister(ptr, size, flags) # <<<<<<<<<<<<<< + * return cudaHostRegister(ptr, size, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostRegister(__pyx_v_ptr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":625 + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostRegister(ptr, size, flags) + * return cudaHostRegister(ptr, size, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":627 + * if usePTDS: + * return ptds._cudaHostRegister(ptr, size, flags) + * return cudaHostRegister(ptr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostRegister(__pyx_v_ptr, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":623 + * return cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":629 + * return cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostUnregister(void *__pyx_v_ptr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":630 + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaHostUnregister(ptr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":631 + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostUnregister(ptr) + * return cudaHostUnregister(ptr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":632 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaHostUnregister(ptr) # <<<<<<<<<<<<<< + * return cudaHostUnregister(ptr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostUnregister(__pyx_v_ptr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":631 + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostUnregister(ptr) + * return cudaHostUnregister(ptr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":633 + * if usePTDS: + * return ptds._cudaHostUnregister(ptr) + * return cudaHostUnregister(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostUnregister(__pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":629 + * return cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":635 + * return cudaHostUnregister(ptr) + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetDevicePointer(void **__pyx_v_pDevice, void *__pyx_v_pHost, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":636 + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":637 + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) + * return cudaHostGetDevicePointer(pDevice, pHost, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":638 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) # <<<<<<<<<<<<<< + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetDevicePointer(__pyx_v_pDevice, __pyx_v_pHost, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":637 + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) + * return cudaHostGetDevicePointer(pDevice, pHost, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":639 + * if usePTDS: + * return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) + * return cudaHostGetDevicePointer(pDevice, pHost, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostGetDevicePointer(__pyx_v_pDevice, __pyx_v_pHost, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":635 + * return cudaHostUnregister(ptr) + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":641 + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_pHost) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":642 + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaHostGetFlags(pFlags, pHost) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":643 + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostGetFlags(pFlags, pHost) + * return cudaHostGetFlags(pFlags, pHost) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":644 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaHostGetFlags(pFlags, pHost) # <<<<<<<<<<<<<< + * return cudaHostGetFlags(pFlags, pHost) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetFlags(__pyx_v_pFlags, __pyx_v_pHost); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":643 + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaHostGetFlags(pFlags, pHost) + * return cudaHostGetFlags(pFlags, pHost) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":645 + * if usePTDS: + * return ptds._cudaHostGetFlags(pFlags, pHost) + * return cudaHostGetFlags(pFlags, pHost) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostGetFlags(__pyx_v_pFlags, __pyx_v_pHost); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":641 + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":647 + * return cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3D(struct cudaPitchedPtr *__pyx_v_pitchedDevPtr, struct cudaExtent __pyx_v_extent) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":648 + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMalloc3D(pitchedDevPtr, extent) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":649 + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc3D(pitchedDevPtr, extent) + * return cudaMalloc3D(pitchedDevPtr, extent) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":650 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMalloc3D(pitchedDevPtr, extent) # <<<<<<<<<<<<<< + * return cudaMalloc3D(pitchedDevPtr, extent) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3D(__pyx_v_pitchedDevPtr, __pyx_v_extent); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":649 + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc3D(pitchedDevPtr, extent) + * return cudaMalloc3D(pitchedDevPtr, extent) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":651 + * if usePTDS: + * return ptds._cudaMalloc3D(pitchedDevPtr, extent) + * return cudaMalloc3D(pitchedDevPtr, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc3D(__pyx_v_pitchedDevPtr, __pyx_v_extent); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":647 + * return cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMalloc3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":653 + * return cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3DArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":654 + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMalloc3DArray(array, desc, extent, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":655 + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc3DArray(array, desc, extent, flags) + * return cudaMalloc3DArray(array, desc, extent, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":656 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMalloc3DArray(array, desc, extent, flags) # <<<<<<<<<<<<<< + * return cudaMalloc3DArray(array, desc, extent, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3DArray(__pyx_v_array, __pyx_v_desc, __pyx_v_extent, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":655 + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMalloc3DArray(array, desc, extent, flags) + * return cudaMalloc3DArray(array, desc, extent, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":657 + * if usePTDS: + * return ptds._cudaMalloc3DArray(array, desc, extent, flags) + * return cudaMalloc3DArray(array, desc, extent, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc3DArray(__pyx_v_array, __pyx_v_desc, __pyx_v_extent, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":653 + * return cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMalloc3DArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":659 + * return cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_numLevels, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":660 + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":661 + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":662 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) # <<<<<<<<<<<<<< + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_desc, __pyx_v_extent, __pyx_v_numLevels, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":661 + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":663 + * if usePTDS: + * return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_desc, __pyx_v_extent, __pyx_v_numLevels, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":659 + * return cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":665 + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetMipmappedArrayLevel(cudaArray_t *__pyx_v_levelArray, cudaMipmappedArray_const_t __pyx_v_mipmappedArray, unsigned int __pyx_v_level) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":666 + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":667 + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":668 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) # <<<<<<<<<<<<<< + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetMipmappedArrayLevel(__pyx_v_levelArray, __pyx_v_mipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":667 + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":669 + * if usePTDS: + * return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetMipmappedArrayLevel(__pyx_v_levelArray, __pyx_v_mipmappedArray, __pyx_v_level); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":665 + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetMipmappedArrayLevel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":671 + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3D(struct cudaMemcpy3DParms const *__pyx_v_p) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":672 + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy3D(p) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":673 + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3D(p) + * return cudaMemcpy3D(p) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":674 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy3D(p) # <<<<<<<<<<<<<< + * return cudaMemcpy3D(p) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3D(__pyx_v_p); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":673 + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3D(p) + * return cudaMemcpy3D(p) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":675 + * if usePTDS: + * return ptds._cudaMemcpy3D(p) + * return cudaMemcpy3D(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3D(__pyx_v_p); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":671 + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":677 + * return cudaMemcpy3D(p) + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeer(struct cudaMemcpy3DPeerParms const *__pyx_v_p) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":678 + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy3DPeer(p) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":679 + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DPeer(p) + * return cudaMemcpy3DPeer(p) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":680 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy3DPeer(p) # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeer(p) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeer(__pyx_v_p); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":679 + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DPeer(p) + * return cudaMemcpy3DPeer(p) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":681 + * if usePTDS: + * return ptds._cudaMemcpy3DPeer(p) + * return cudaMemcpy3DPeer(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DPeer(__pyx_v_p); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":677 + * return cudaMemcpy3D(p) + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":683 + * return cudaMemcpy3DPeer(p) + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DAsync(struct cudaMemcpy3DParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":684 + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy3DAsync(p, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":685 + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DAsync(p, stream) + * return cudaMemcpy3DAsync(p, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":686 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy3DAsync(p, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy3DAsync(p, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DAsync(__pyx_v_p, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":685 + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DAsync(p, stream) + * return cudaMemcpy3DAsync(p, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":687 + * if usePTDS: + * return ptds._cudaMemcpy3DAsync(p, stream) + * return cudaMemcpy3DAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DAsync(__pyx_v_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":683 + * return cudaMemcpy3DPeer(p) + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":689 + * return cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeerAsync(struct cudaMemcpy3DPeerParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":690 + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy3DPeerAsync(p, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":691 + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DPeerAsync(p, stream) + * return cudaMemcpy3DPeerAsync(p, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":692 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy3DPeerAsync(p, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeerAsync(p, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeerAsync(__pyx_v_p, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":691 + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DPeerAsync(p, stream) + * return cudaMemcpy3DPeerAsync(p, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":693 + * if usePTDS: + * return ptds._cudaMemcpy3DPeerAsync(p, stream) + * return cudaMemcpy3DPeerAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DPeerAsync(__pyx_v_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":689 + * return cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":695 + * return cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemGetInfo(size_t *__pyx_v_free, size_t *__pyx_v_total) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":696 + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemGetInfo(free, total) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":697 + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemGetInfo(free, total) + * return cudaMemGetInfo(free, total) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":698 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemGetInfo(free, total) # <<<<<<<<<<<<<< + * return cudaMemGetInfo(free, total) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemGetInfo(__pyx_v_free, __pyx_v_total); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":697 + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemGetInfo(free, total) + * return cudaMemGetInfo(free, total) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":699 + * if usePTDS: + * return ptds._cudaMemGetInfo(free, total) + * return cudaMemGetInfo(free, total) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemGetInfo(__pyx_v_free, __pyx_v_total); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":695 + * return cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":701 + * return cudaMemGetInfo(free, total) + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetInfo(struct cudaChannelFormatDesc *__pyx_v_desc, struct cudaExtent *__pyx_v_extent, unsigned int *__pyx_v_flags, cudaArray_t __pyx_v_array) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":702 + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaArrayGetInfo(desc, extent, flags, array) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":703 + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetInfo(desc, extent, flags, array) + * return cudaArrayGetInfo(desc, extent, flags, array) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":704 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaArrayGetInfo(desc, extent, flags, array) # <<<<<<<<<<<<<< + * return cudaArrayGetInfo(desc, extent, flags, array) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetInfo(__pyx_v_desc, __pyx_v_extent, __pyx_v_flags, __pyx_v_array); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":703 + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetInfo(desc, extent, flags, array) + * return cudaArrayGetInfo(desc, extent, flags, array) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":705 + * if usePTDS: + * return ptds._cudaArrayGetInfo(desc, extent, flags, array) + * return cudaArrayGetInfo(desc, extent, flags, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetInfo(__pyx_v_desc, __pyx_v_extent, __pyx_v_flags, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":701 + * return cudaMemGetInfo(free, total) + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaArrayGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":707 + * return cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetPlane(cudaArray_t *__pyx_v_pPlaneArray, cudaArray_t __pyx_v_hArray, unsigned int __pyx_v_planeIdx) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":708 + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":709 + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":710 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 710, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":709 + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":711 + * if usePTDS: + * return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":707 + * return cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":713 + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaArray_t __pyx_v_array, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":714 + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":715 + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":716 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":715 + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":717 + * if usePTDS: + * return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":713 + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":719 + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaMipmappedArray_t __pyx_v_mipmap, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":720 + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":721 + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":722 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 722, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":721 + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":723 + * if usePTDS: + * return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":719 + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":725 + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaArray_t __pyx_v_array) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":726 + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaArrayGetSparseProperties(sparseProperties, array) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":727 + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetSparseProperties(sparseProperties, array) + * return cudaArrayGetSparseProperties(sparseProperties, array) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":728 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaArrayGetSparseProperties(sparseProperties, array) # <<<<<<<<<<<<<< + * return cudaArrayGetSparseProperties(sparseProperties, array) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":727 + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaArrayGetSparseProperties(sparseProperties, array) + * return cudaArrayGetSparseProperties(sparseProperties, array) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":729 + * if usePTDS: + * return ptds._cudaArrayGetSparseProperties(sparseProperties, array) + * return cudaArrayGetSparseProperties(sparseProperties, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":725 + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":731 + * return cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaMipmappedArray_t __pyx_v_mipmap) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":732 + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 732, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":733 + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":734 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":733 + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":735 + * if usePTDS: + * return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":731 + * return cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":737 + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":738 + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy(dst, src, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 738, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":739 + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy(dst, src, count, kind) + * return cudaMemcpy(dst, src, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":740 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy(dst, src, count, kind) # <<<<<<<<<<<<<< + * return cudaMemcpy(dst, src, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":739 + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy(dst, src, count, kind) + * return cudaMemcpy(dst, src, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":741 + * if usePTDS: + * return ptds._cudaMemcpy(dst, src, count, kind) + * return cudaMemcpy(dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":737 + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":743 + * return cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeer(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":744 + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":745 + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":746 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) # <<<<<<<<<<<<<< + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeer(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":745 + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":747 + * if usePTDS: + * return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyPeer(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":743 + * return cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":749 + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2D(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":750 + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":751 + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":752 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2D(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":751 + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":753 + * if usePTDS: + * return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2D(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":749 + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":755 + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":756 + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":757 + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":758 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":757 + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":759 + * if usePTDS: + * return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":755 + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":761 + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArray(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":762 + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":763 + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":764 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArray(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":763 + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":765 + * if usePTDS: + * return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DFromArray(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":761 + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":767 + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":768 + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":769 + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":770 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) # <<<<<<<<<<<<<< + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":769 + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":771 + * if usePTDS: + * return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":767 + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":773 + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyAsync(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":774 + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":775 + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) + * return cudaMemcpyAsync(dst, src, count, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":776 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":775 + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) + * return cudaMemcpyAsync(dst, src, count, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":777 + * if usePTDS: + * return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) + * return cudaMemcpyAsync(dst, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":773 + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":779 + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeerAsync(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":780 + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":781 + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":782 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) # <<<<<<<<<<<<<< + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeerAsync(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":781 + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":783 + * if usePTDS: + * return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyPeerAsync(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":779 + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":785 + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyBatchAsync(void **__pyx_v_dsts, void **__pyx_v_srcs, size_t *__pyx_v_sizes, size_t __pyx_v_count, struct cudaMemcpyAttributes *__pyx_v_attrs, size_t *__pyx_v_attrsIdxs, size_t __pyx_v_numAttrs, size_t *__pyx_v_failIdx, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":786 + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":787 + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":788 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) # <<<<<<<<<<<<<< + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyBatchAsync(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 788, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":787 + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":789 + * if usePTDS: + * return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyBatchAsync(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":785 + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":791 + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DBatchAsync(size_t __pyx_v_numOps, struct cudaMemcpy3DBatchOp *__pyx_v_opList, size_t *__pyx_v_failIdx, unsigned PY_LONG_LONG __pyx_v_flags, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":792 + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":793 + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":794 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DBatchAsync(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":793 + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":795 + * if usePTDS: + * return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DBatchAsync(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":791 + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy3DBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":797 + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":798 + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":799 + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":800 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":799 + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":801 + * if usePTDS: + * return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":797 + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":803 + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":804 + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":805 + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":806 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":805 + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":807 + * if usePTDS: + * return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":803 + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DToArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":809 + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArrayAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":810 + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":811 + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":812 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArrayAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":811 + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":813 + * if usePTDS: + * return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DFromArrayAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":809 + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpy2DFromArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":815 + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":816 + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemset(devPtr, value, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":817 + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset(devPtr, value, count) + * return cudaMemset(devPtr, value, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":818 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemset(devPtr, value, count) # <<<<<<<<<<<<<< + * return cudaMemset(devPtr, value, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":817 + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset(devPtr, value, count) + * return cudaMemset(devPtr, value, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":819 + * if usePTDS: + * return ptds._cudaMemset(devPtr, value, count) + * return cudaMemset(devPtr, value, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":815 + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":821 + * return cudaMemset(devPtr, value, count) + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2D(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":822 + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemset2D(devPtr, pitch, value, width, height) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":823 + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset2D(devPtr, pitch, value, width, height) + * return cudaMemset2D(devPtr, pitch, value, width, height) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":824 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemset2D(devPtr, pitch, value, width, height) # <<<<<<<<<<<<<< + * return cudaMemset2D(devPtr, pitch, value, width, height) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2D(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":823 + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset2D(devPtr, pitch, value, width, height) + * return cudaMemset2D(devPtr, pitch, value, width, height) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":825 + * if usePTDS: + * return ptds._cudaMemset2D(devPtr, pitch, value, width, height) + * return cudaMemset2D(devPtr, pitch, value, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset2D(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":821 + * return cudaMemset(devPtr, value, count) + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemset2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":827 + * return cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3D(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":828 + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemset3D(pitchedDevPtr, value, extent) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":829 + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset3D(pitchedDevPtr, value, extent) + * return cudaMemset3D(pitchedDevPtr, value, extent) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":830 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemset3D(pitchedDevPtr, value, extent) # <<<<<<<<<<<<<< + * return cudaMemset3D(pitchedDevPtr, value, extent) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3D(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":829 + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset3D(pitchedDevPtr, value, extent) + * return cudaMemset3D(pitchedDevPtr, value, extent) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":831 + * if usePTDS: + * return ptds._cudaMemset3D(pitchedDevPtr, value, extent) + * return cudaMemset3D(pitchedDevPtr, value, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset3D(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":827 + * return cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemset3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":833 + * return cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemsetAsync(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":834 + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemsetAsync(devPtr, value, count, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":835 + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemsetAsync(devPtr, value, count, stream) + * return cudaMemsetAsync(devPtr, value, count, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":836 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemsetAsync(devPtr, value, count, stream) # <<<<<<<<<<<<<< + * return cudaMemsetAsync(devPtr, value, count, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemsetAsync(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":835 + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemsetAsync(devPtr, value, count, stream) + * return cudaMemsetAsync(devPtr, value, count, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":837 + * if usePTDS: + * return ptds._cudaMemsetAsync(devPtr, value, count, stream) + * return cudaMemsetAsync(devPtr, value, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemsetAsync(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":833 + * return cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemsetAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":839 + * return cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2DAsync(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":840 + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":841 + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":842 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) # <<<<<<<<<<<<<< + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2DAsync(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":841 + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":843 + * if usePTDS: + * return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset2DAsync(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":839 + * return cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemset2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":845 + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3DAsync(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":846 + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":847 + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":848 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) # <<<<<<<<<<<<<< + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3DAsync(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":847 + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":849 + * if usePTDS: + * return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset3DAsync(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":845 + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemset3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":851 + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync(void const *__pyx_v_devPtr, size_t __pyx_v_count, int __pyx_v_dstDevice, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":852 + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":853 + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":854 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":853 + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":855 + * if usePTDS: + * return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":851 + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":857 + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, struct cudaMemLocation __pyx_v_location, unsigned int __pyx_v_flags, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":858 + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":859 + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":860 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":859 + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":861 + * if usePTDS: + * return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":857 + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPrefetchAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":863 + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":864 + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemAdvise(devPtr, count, advice, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":865 + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemAdvise(devPtr, count, advice, device) + * return cudaMemAdvise(devPtr, count, advice, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":866 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemAdvise(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * return cudaMemAdvise(devPtr, count, advice, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise(__pyx_v_devPtr, __pyx_v_count, ((enum cudaMemoryAdvise)__pyx_v_advice), __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 866, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":865 + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemAdvise(devPtr, count, advice, device) + * return cudaMemAdvise(devPtr, count, advice, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":867 + * if usePTDS: + * return ptds._cudaMemAdvise(devPtr, count, advice, device) + * return cudaMemAdvise(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemAdvise(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":863 + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":869 + * return cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, struct cudaMemLocation __pyx_v_location) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":870 + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 870, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":871 + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) + * return cudaMemAdvise_v2(devPtr, count, advice, location) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":872 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, ((enum cudaMemoryAdvise)__pyx_v_advice), __pyx_v_location); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 872, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":871 + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) + * return cudaMemAdvise_v2(devPtr, count, advice, location) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":873 + * if usePTDS: + * return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) + * return cudaMemAdvise_v2(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":869 + * return cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemAdvise_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":875 + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, enum cudaMemRangeAttribute __pyx_v_attribute, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":876 + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":877 + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":878 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, ((enum cudaMemRangeAttribute)__pyx_v_attribute), __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":877 + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":879 + * if usePTDS: + * return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":875 + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":881 + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, enum cudaMemRangeAttribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":882 + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":883 + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":884 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, ((enum cudaMemRangeAttribute *)__pyx_v_attributes), __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":883 + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":885 + * if usePTDS: + * return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":881 + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":887 + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":888 + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":889 + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":890 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) # <<<<<<<<<<<<<< + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":889 + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":891 + * if usePTDS: + * return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":887 + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":893 + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArray(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":894 + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":895 + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":896 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) # <<<<<<<<<<<<<< + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArray(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":895 + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":897 + * if usePTDS: + * return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyFromArray(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":893 + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":899 + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":900 + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":901 + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":902 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) # <<<<<<<<<<<<<< + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":901 + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":903 + * if usePTDS: + * return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":899 + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":905 + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":906 + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":907 + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":908 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":907 + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":909 + * if usePTDS: + * return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":905 + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyToArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":911 + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArrayAsync(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":912 + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":913 + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":914 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) # <<<<<<<<<<<<<< + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArrayAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":913 + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":915 + * if usePTDS: + * return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyFromArrayAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":911 + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemcpyFromArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":917 + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocAsync(void **__pyx_v_devPtr, size_t __pyx_v_size, cudaStream_t __pyx_v_hStream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":918 + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocAsync(devPtr, size, hStream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":919 + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocAsync(devPtr, size, hStream) + * return cudaMallocAsync(devPtr, size, hStream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":920 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocAsync(devPtr, size, hStream) # <<<<<<<<<<<<<< + * return cudaMallocAsync(devPtr, size, hStream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocAsync(__pyx_v_devPtr, __pyx_v_size, __pyx_v_hStream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":919 + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocAsync(devPtr, size, hStream) + * return cudaMallocAsync(devPtr, size, hStream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":921 + * if usePTDS: + * return ptds._cudaMallocAsync(devPtr, size, hStream) + * return cudaMallocAsync(devPtr, size, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocAsync(__pyx_v_devPtr, __pyx_v_size, __pyx_v_hStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":917 + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":923 + * return cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeAsync(void *__pyx_v_devPtr, cudaStream_t __pyx_v_hStream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":924 + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaFreeAsync(devPtr, hStream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":925 + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeAsync(devPtr, hStream) + * return cudaFreeAsync(devPtr, hStream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":926 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaFreeAsync(devPtr, hStream) # <<<<<<<<<<<<<< + * return cudaFreeAsync(devPtr, hStream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeAsync(__pyx_v_devPtr, __pyx_v_hStream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":925 + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaFreeAsync(devPtr, hStream) + * return cudaFreeAsync(devPtr, hStream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":927 + * if usePTDS: + * return ptds._cudaFreeAsync(devPtr, hStream) + * return cudaFreeAsync(devPtr, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeAsync(__pyx_v_devPtr, __pyx_v_hStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":923 + * return cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":929 + * return cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolTrimTo(cudaMemPool_t __pyx_v_memPool, size_t __pyx_v_minBytesToKeep) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":930 + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 930, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":931 + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":932 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) # <<<<<<<<<<<<<< + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolTrimTo(__pyx_v_memPool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":931 + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":933 + * if usePTDS: + * return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolTrimTo(__pyx_v_memPool, __pyx_v_minBytesToKeep); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":929 + * return cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":935 + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":936 + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolSetAttribute(memPool, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":937 + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolSetAttribute(memPool, attr, value) + * return cudaMemPoolSetAttribute(memPool, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":938 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolSetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * return cudaMemPoolSetAttribute(memPool, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAttribute(__pyx_v_memPool, ((enum cudaMemPoolAttr)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":937 + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolSetAttribute(memPool, attr, value) + * return cudaMemPoolSetAttribute(memPool, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":939 + * if usePTDS: + * return ptds._cudaMemPoolSetAttribute(memPool, attr, value) + * return cudaMemPoolSetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolSetAttribute(__pyx_v_memPool, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":935 + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":941 + * return cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":942 + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolGetAttribute(memPool, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":943 + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolGetAttribute(memPool, attr, value) + * return cudaMemPoolGetAttribute(memPool, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":944 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolGetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * return cudaMemPoolGetAttribute(memPool, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAttribute(__pyx_v_memPool, ((enum cudaMemPoolAttr)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":943 + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolGetAttribute(memPool, attr, value) + * return cudaMemPoolGetAttribute(memPool, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":945 + * if usePTDS: + * return ptds._cudaMemPoolGetAttribute(memPool, attr, value) + * return cudaMemPoolGetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolGetAttribute(__pyx_v_memPool, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":941 + * return cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":947 + * return cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAccess(cudaMemPool_t __pyx_v_memPool, struct cudaMemAccessDesc const *__pyx_v_descList, size_t __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":948 + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolSetAccess(memPool, descList, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 948, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":949 + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolSetAccess(memPool, descList, count) + * return cudaMemPoolSetAccess(memPool, descList, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":950 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolSetAccess(memPool, descList, count) # <<<<<<<<<<<<<< + * return cudaMemPoolSetAccess(memPool, descList, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAccess(__pyx_v_memPool, __pyx_v_descList, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":949 + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolSetAccess(memPool, descList, count) + * return cudaMemPoolSetAccess(memPool, descList, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":951 + * if usePTDS: + * return ptds._cudaMemPoolSetAccess(memPool, descList, count) + * return cudaMemPoolSetAccess(memPool, descList, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolSetAccess(__pyx_v_memPool, __pyx_v_descList, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":947 + * return cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":953 + * return cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAccess(enum cudaMemAccessFlags *__pyx_v_flags, cudaMemPool_t __pyx_v_memPool, struct cudaMemLocation *__pyx_v_location) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":954 + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolGetAccess(flags, memPool, location) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 954, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":955 + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolGetAccess(flags, memPool, location) + * return cudaMemPoolGetAccess(flags, memPool, location) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":956 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolGetAccess(flags, memPool, location) # <<<<<<<<<<<<<< + * return cudaMemPoolGetAccess(flags, memPool, location) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAccess(((enum cudaMemAccessFlags *)__pyx_v_flags), __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":955 + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolGetAccess(flags, memPool, location) + * return cudaMemPoolGetAccess(flags, memPool, location) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":957 + * if usePTDS: + * return ptds._cudaMemPoolGetAccess(flags, memPool, location) + * return cudaMemPoolGetAccess(flags, memPool, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolGetAccess(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":953 + * return cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":959 + * return cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolCreate(cudaMemPool_t *__pyx_v_memPool, struct cudaMemPoolProps const *__pyx_v_poolProps) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":960 + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolCreate(memPool, poolProps) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":961 + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolCreate(memPool, poolProps) + * return cudaMemPoolCreate(memPool, poolProps) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":962 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolCreate(memPool, poolProps) # <<<<<<<<<<<<<< + * return cudaMemPoolCreate(memPool, poolProps) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolCreate(__pyx_v_memPool, __pyx_v_poolProps); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":961 + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolCreate(memPool, poolProps) + * return cudaMemPoolCreate(memPool, poolProps) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":963 + * if usePTDS: + * return ptds._cudaMemPoolCreate(memPool, poolProps) + * return cudaMemPoolCreate(memPool, poolProps) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolCreate(__pyx_v_memPool, __pyx_v_poolProps); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":959 + * return cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":965 + * return cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolDestroy(cudaMemPool_t __pyx_v_memPool) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":966 + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolDestroy(memPool) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":967 + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolDestroy(memPool) + * return cudaMemPoolDestroy(memPool) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":968 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolDestroy(memPool) # <<<<<<<<<<<<<< + * return cudaMemPoolDestroy(memPool) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolDestroy(__pyx_v_memPool); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":967 + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolDestroy(memPool) + * return cudaMemPoolDestroy(memPool) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":969 + * if usePTDS: + * return ptds._cudaMemPoolDestroy(memPool) + * return cudaMemPoolDestroy(memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolDestroy(__pyx_v_memPool); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":965 + * return cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":971 + * return cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocFromPoolAsync(void **__pyx_v_ptr, size_t __pyx_v_size, cudaMemPool_t __pyx_v_memPool, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":972 + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":973 + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":974 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) # <<<<<<<<<<<<<< + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocFromPoolAsync(__pyx_v_ptr, __pyx_v_size, __pyx_v_memPool, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":973 + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":975 + * if usePTDS: + * return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocFromPoolAsync(__pyx_v_ptr, __pyx_v_size, __pyx_v_memPool, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":971 + * return cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMallocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":977 + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportToShareableHandle(void *__pyx_v_shareableHandle, cudaMemPool_t __pyx_v_memPool, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":978 + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":979 + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":980 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) # <<<<<<<<<<<<<< + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_memPool, ((enum cudaMemAllocationHandleType)__pyx_v_handleType), __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":979 + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":981 + * if usePTDS: + * return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_memPool, __pyx_v_handleType, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":977 + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":983 + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportFromShareableHandle(cudaMemPool_t *__pyx_v_memPool, void *__pyx_v_shareableHandle, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":984 + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":985 + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":986 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) # <<<<<<<<<<<<<< + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportFromShareableHandle(__pyx_v_memPool, __pyx_v_shareableHandle, ((enum cudaMemAllocationHandleType)__pyx_v_handleType), __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":985 + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":987 + * if usePTDS: + * return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolImportFromShareableHandle(__pyx_v_memPool, __pyx_v_shareableHandle, __pyx_v_handleType, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":983 + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":989 + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportPointer(struct cudaMemPoolPtrExportData *__pyx_v_exportData, void *__pyx_v_ptr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":990 + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolExportPointer(exportData, ptr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 990, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":991 + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolExportPointer(exportData, ptr) + * return cudaMemPoolExportPointer(exportData, ptr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":992 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolExportPointer(exportData, ptr) # <<<<<<<<<<<<<< + * return cudaMemPoolExportPointer(exportData, ptr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportPointer(__pyx_v_exportData, __pyx_v_ptr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 992, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":991 + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolExportPointer(exportData, ptr) + * return cudaMemPoolExportPointer(exportData, ptr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":993 + * if usePTDS: + * return ptds._cudaMemPoolExportPointer(exportData, ptr) + * return cudaMemPoolExportPointer(exportData, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolExportPointer(__pyx_v_exportData, __pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":989 + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":995 + * return cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportPointer(void **__pyx_v_ptr, cudaMemPool_t __pyx_v_memPool, struct cudaMemPoolPtrExportData *__pyx_v_exportData) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":996 + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":997 + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) + * return cudaMemPoolImportPointer(ptr, memPool, exportData) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":998 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) # <<<<<<<<<<<<<< + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportPointer(__pyx_v_ptr, __pyx_v_memPool, __pyx_v_exportData); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":997 + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) + * return cudaMemPoolImportPointer(ptr, memPool, exportData) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":999 + * if usePTDS: + * return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) + * return cudaMemPoolImportPointer(ptr, memPool, exportData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolImportPointer(__pyx_v_ptr, __pyx_v_memPool, __pyx_v_exportData); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":995 + * return cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1001 + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPointerGetAttributes(struct cudaPointerAttributes *__pyx_v_attributes, void const *__pyx_v_ptr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1002 + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaPointerGetAttributes(attributes, ptr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1003 + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaPointerGetAttributes(attributes, ptr) + * return cudaPointerGetAttributes(attributes, ptr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1004 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaPointerGetAttributes(attributes, ptr) # <<<<<<<<<<<<<< + * return cudaPointerGetAttributes(attributes, ptr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPointerGetAttributes(__pyx_v_attributes, __pyx_v_ptr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1004, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1003 + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaPointerGetAttributes(attributes, ptr) + * return cudaPointerGetAttributes(attributes, ptr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1005 + * if usePTDS: + * return ptds._cudaPointerGetAttributes(attributes, ptr) + * return cudaPointerGetAttributes(attributes, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaPointerGetAttributes(__pyx_v_attributes, __pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1001 + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1007 + * return cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, int __pyx_v_device, int __pyx_v_peerDevice) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1008 + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1009 + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1010 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) # <<<<<<<<<<<<<< + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_device, __pyx_v_peerDevice); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1010, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1009 + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1011 + * if usePTDS: + * return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_device, __pyx_v_peerDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1007 + * return cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1013 + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceEnablePeerAccess(int __pyx_v_peerDevice, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1014 + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1014, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1015 + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) + * return cudaDeviceEnablePeerAccess(peerDevice, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1016 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) # <<<<<<<<<<<<<< + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceEnablePeerAccess(__pyx_v_peerDevice, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1015 + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) + * return cudaDeviceEnablePeerAccess(peerDevice, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1017 + * if usePTDS: + * return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) + * return cudaDeviceEnablePeerAccess(peerDevice, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceEnablePeerAccess(__pyx_v_peerDevice, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1013 + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1019 + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceDisablePeerAccess(int __pyx_v_peerDevice) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1020 + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceDisablePeerAccess(peerDevice) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1021 + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceDisablePeerAccess(peerDevice) + * return cudaDeviceDisablePeerAccess(peerDevice) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1022 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceDisablePeerAccess(peerDevice) # <<<<<<<<<<<<<< + * return cudaDeviceDisablePeerAccess(peerDevice) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceDisablePeerAccess(__pyx_v_peerDevice); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1021 + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceDisablePeerAccess(peerDevice) + * return cudaDeviceDisablePeerAccess(peerDevice) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1023 + * if usePTDS: + * return ptds._cudaDeviceDisablePeerAccess(peerDevice) + * return cudaDeviceDisablePeerAccess(peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceDisablePeerAccess(__pyx_v_peerDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1019 + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1025 + * return cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnregisterResource(cudaGraphicsResource_t __pyx_v_resource) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1026 + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsUnregisterResource(resource) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1027 + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsUnregisterResource(resource) + * return cudaGraphicsUnregisterResource(resource) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1028 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsUnregisterResource(resource) # <<<<<<<<<<<<<< + * return cudaGraphicsUnregisterResource(resource) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnregisterResource(__pyx_v_resource); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1027 + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsUnregisterResource(resource) + * return cudaGraphicsUnregisterResource(resource) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1029 + * if usePTDS: + * return ptds._cudaGraphicsUnregisterResource(resource) + * return cudaGraphicsUnregisterResource(resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsUnregisterResource(__pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1025 + * return cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1031 + * return cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1032 + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1033 + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) + * return cudaGraphicsResourceSetMapFlags(resource, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1034 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) # <<<<<<<<<<<<<< + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceSetMapFlags(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1033 + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) + * return cudaGraphicsResourceSetMapFlags(resource, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1035 + * if usePTDS: + * return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) + * return cudaGraphicsResourceSetMapFlags(resource, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceSetMapFlags(__pyx_v_resource, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1031 + * return cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1037 + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsMapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1038 + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsMapResources(count, resources, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1039 + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsMapResources(count, resources, stream) + * return cudaGraphicsMapResources(count, resources, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1040 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsMapResources(count, resources, stream) # <<<<<<<<<<<<<< + * return cudaGraphicsMapResources(count, resources, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1039 + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsMapResources(count, resources, stream) + * return cudaGraphicsMapResources(count, resources, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1041 + * if usePTDS: + * return ptds._cudaGraphicsMapResources(count, resources, stream) + * return cudaGraphicsMapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1037 + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1043 + * return cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnmapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1044 + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsUnmapResources(count, resources, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1045 + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsUnmapResources(count, resources, stream) + * return cudaGraphicsUnmapResources(count, resources, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1046 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsUnmapResources(count, resources, stream) # <<<<<<<<<<<<<< + * return cudaGraphicsUnmapResources(count, resources, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1045 + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsUnmapResources(count, resources, stream) + * return cudaGraphicsUnmapResources(count, resources, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1047 + * if usePTDS: + * return ptds._cudaGraphicsUnmapResources(count, resources, stream) + * return cudaGraphicsUnmapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1043 + * return cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1049 + * return cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedPointer(void **__pyx_v_devPtr, size_t *__pyx_v_size, cudaGraphicsResource_t __pyx_v_resource) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1050 + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1051 + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1052 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedPointer(__pyx_v_devPtr, __pyx_v_size, __pyx_v_resource); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1051 + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1053 + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceGetMappedPointer(__pyx_v_devPtr, __pyx_v_size, __pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1049 + * return cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1055 + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsSubResourceGetMappedArray(cudaArray_t *__pyx_v_array, cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1056 + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1057 + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1058 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsSubResourceGetMappedArray(__pyx_v_array, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1057 + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1059 + * if usePTDS: + * return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsSubResourceGetMappedArray(__pyx_v_array, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1055 + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1061 + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, cudaGraphicsResource_t __pyx_v_resource) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1062 + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1063 + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1064 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1063 + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1065 + * if usePTDS: + * return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceGetMappedMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1061 + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1067 + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetChannelDesc(struct cudaChannelFormatDesc *__pyx_v_desc, cudaArray_const_t __pyx_v_array) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1068 + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetChannelDesc(desc, array) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1069 + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetChannelDesc(desc, array) + * return cudaGetChannelDesc(desc, array) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1070 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetChannelDesc(desc, array) # <<<<<<<<<<<<<< + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetChannelDesc(__pyx_v_desc, __pyx_v_array); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1069 + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetChannelDesc(desc, array) + * return cudaGetChannelDesc(desc, array) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1071 + * if usePTDS: + * return ptds._cudaGetChannelDesc(desc, array) + * return cudaGetChannelDesc(desc, array) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: +*/ + __pyx_r = cudaGetChannelDesc(__pyx_v_desc, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1067 + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetChannelDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1072 + * return ptds._cudaGetChannelDesc(desc, array) + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + +static struct cudaChannelFormatDesc __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateChannelDesc(int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_w, enum cudaChannelFormatKind __pyx_v_f) { + int __pyx_v_usePTDS; + struct cudaChannelFormatDesc __pyx_r; + int __pyx_t_1; + struct cudaChannelFormatDesc __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1074 + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaCreateChannelDesc(x, y, z, w, f) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1074, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1075 + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateChannelDesc(x, y, z, w, f) + * return cudaCreateChannelDesc(x, y, z, w, f) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1076 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaCreateChannelDesc(x, y, z, w, f) # <<<<<<<<<<<<<< + * return cudaCreateChannelDesc(x, y, z, w, f) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateChannelDesc(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w, ((enum cudaChannelFormatKind)__pyx_v_f)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1075 + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateChannelDesc(x, y, z, w, f) + * return cudaCreateChannelDesc(x, y, z, w, f) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1077 + * if usePTDS: + * return ptds._cudaCreateChannelDesc(x, y, z, w, f) + * return cudaCreateChannelDesc(x, y, z, w, f) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateChannelDesc(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w, __pyx_v_f); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1072 + * return ptds._cudaGetChannelDesc(desc, array) + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaCreateChannelDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1079 + * return cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateTextureObject(cudaTextureObject_t *__pyx_v_pTexObject, struct cudaResourceDesc const *__pyx_v_pResDesc, struct cudaTextureDesc const *__pyx_v_pTexDesc, struct cudaResourceViewDesc const *__pyx_v_pResViewDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1080 + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1081 + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1082 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateTextureObject(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1082, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1081 + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1083 + * if usePTDS: + * return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateTextureObject(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1079 + * return cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaCreateTextureObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1085 + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyTextureObject(cudaTextureObject_t __pyx_v_texObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1086 + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDestroyTextureObject(texObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1087 + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyTextureObject(texObject) + * return cudaDestroyTextureObject(texObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1088 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDestroyTextureObject(texObject) # <<<<<<<<<<<<<< + * return cudaDestroyTextureObject(texObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyTextureObject(__pyx_v_texObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1087 + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroyTextureObject(texObject) + * return cudaDestroyTextureObject(texObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1089 + * if usePTDS: + * return ptds._cudaDestroyTextureObject(texObject) + * return cudaDestroyTextureObject(texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyTextureObject(__pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1085 + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDestroyTextureObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1091 + * return cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaTextureObject_t __pyx_v_texObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1092 + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1093 + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1094 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1093 + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1095 + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1091 + * return cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetTextureObjectResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1097 + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectTextureDesc(struct cudaTextureDesc *__pyx_v_pTexDesc, cudaTextureObject_t __pyx_v_texObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1098 + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1099 + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1100 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) # <<<<<<<<<<<<<< + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1099 + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1101 + * if usePTDS: + * return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1097 + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetTextureObjectTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1103 + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceViewDesc(struct cudaResourceViewDesc *__pyx_v_pResViewDesc, cudaTextureObject_t __pyx_v_texObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1104 + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1105 + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1106 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1105 + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1107 + * if usePTDS: + * return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1103 + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetTextureObjectResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1109 + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateSurfaceObject(cudaSurfaceObject_t *__pyx_v_pSurfObject, struct cudaResourceDesc const *__pyx_v_pResDesc) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1110 + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1110, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1111 + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1112 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateSurfaceObject(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1111 + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1113 + * if usePTDS: + * return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateSurfaceObject(__pyx_v_pSurfObject, __pyx_v_pResDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1109 + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaCreateSurfaceObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1115 + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroySurfaceObject(cudaSurfaceObject_t __pyx_v_surfObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1116 + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDestroySurfaceObject(surfObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1117 + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroySurfaceObject(surfObject) + * return cudaDestroySurfaceObject(surfObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1118 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDestroySurfaceObject(surfObject) # <<<<<<<<<<<<<< + * return cudaDestroySurfaceObject(surfObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroySurfaceObject(__pyx_v_surfObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1117 + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDestroySurfaceObject(surfObject) + * return cudaDestroySurfaceObject(surfObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1119 + * if usePTDS: + * return ptds._cudaDestroySurfaceObject(surfObject) + * return cudaDestroySurfaceObject(surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroySurfaceObject(__pyx_v_surfObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1115 + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDestroySurfaceObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1121 + * return cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetSurfaceObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaSurfaceObject_t __pyx_v_surfObject) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1122 + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1123 + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1124 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) # <<<<<<<<<<<<<< + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetSurfaceObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1123 + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1125 + * if usePTDS: + * return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetSurfaceObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1121 + * return cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetSurfaceObjectResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1127 + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDriverGetVersion(int *__pyx_v_driverVersion) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1128 + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDriverGetVersion(driverVersion) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1129 + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDriverGetVersion(driverVersion) + * return cudaDriverGetVersion(driverVersion) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1130 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDriverGetVersion(driverVersion) # <<<<<<<<<<<<<< + * return cudaDriverGetVersion(driverVersion) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDriverGetVersion(__pyx_v_driverVersion); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1129 + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDriverGetVersion(driverVersion) + * return cudaDriverGetVersion(driverVersion) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1131 + * if usePTDS: + * return ptds._cudaDriverGetVersion(driverVersion) + * return cudaDriverGetVersion(driverVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDriverGetVersion(__pyx_v_driverVersion); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1127 + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1133 + * return cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaRuntimeGetVersion(int *__pyx_v_runtimeVersion) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1134 + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaRuntimeGetVersion(runtimeVersion) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1134, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1135 + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaRuntimeGetVersion(runtimeVersion) + * return cudaRuntimeGetVersion(runtimeVersion) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1136 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaRuntimeGetVersion(runtimeVersion) # <<<<<<<<<<<<<< + * return cudaRuntimeGetVersion(runtimeVersion) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaRuntimeGetVersion(__pyx_v_runtimeVersion); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1135 + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaRuntimeGetVersion(runtimeVersion) + * return cudaRuntimeGetVersion(runtimeVersion) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1137 + * if usePTDS: + * return ptds._cudaRuntimeGetVersion(runtimeVersion) + * return cudaRuntimeGetVersion(runtimeVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaRuntimeGetVersion(__pyx_v_runtimeVersion); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1133 + * return cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaRuntimeGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1139 + * return cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphCreate(cudaGraph_t *__pyx_v_pGraph, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1140 + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphCreate(pGraph, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1141 + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphCreate(pGraph, flags) + * return cudaGraphCreate(pGraph, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1142 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphCreate(pGraph, flags) # <<<<<<<<<<<<<< + * return cudaGraphCreate(pGraph, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphCreate(__pyx_v_pGraph, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1141 + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphCreate(pGraph, flags) + * return cudaGraphCreate(pGraph, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1143 + * if usePTDS: + * return ptds._cudaGraphCreate(pGraph, flags) + * return cudaGraphCreate(pGraph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphCreate(__pyx_v_pGraph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1139 + * return cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1145 + * return cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddKernelNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1146 + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1147 + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1148 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddKernelNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1147 + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1149 + * if usePTDS: + * return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddKernelNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1145 + * return cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1151 + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1152 + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1153 + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) + * return cudaGraphKernelNodeGetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1154 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1153 + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) + * return cudaGraphKernelNodeGetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1155 + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) + * return cudaGraphKernelNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1151 + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1157 + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1158 + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1159 + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) + * return cudaGraphKernelNodeSetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1160 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1159 + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) + * return cudaGraphKernelNodeSetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1161 + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) + * return cudaGraphKernelNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1157 + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1163 + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t __pyx_v_hSrc, cudaGraphNode_t __pyx_v_hDst) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1164 + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1165 + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1166 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeCopyAttributes(__pyx_v_hSrc, __pyx_v_hDst); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1165 + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1167 + * if usePTDS: + * return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeCopyAttributes(__pyx_v_hSrc, __pyx_v_hDst); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1163 + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1169 + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue *__pyx_v_value_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1170 + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1171 + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1172 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetAttribute(__pyx_v_hNode, ((__pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID)__pyx_v_attr), __pyx_v_value_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1171 + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1173 + * if usePTDS: + * return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeGetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1169 + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1175 + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue const *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1176 + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1177 + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1178 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetAttribute(__pyx_v_hNode, ((__pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1177 + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1179 + * if usePTDS: + * return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeSetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1175 + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1181 + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemcpy3DParms const *__pyx_v_pCopyParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1182 + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1183 + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1184 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pCopyParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1183 + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1185 + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemcpyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pCopyParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1181 + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1187 + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode1D(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1188 + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1189 + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1190 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode1D(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1189 + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1191 + * if usePTDS: + * return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemcpyNode1D(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1187 + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddMemcpyNode1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1193 + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1194 + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1195 + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1196 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1195 + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1197 + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1193 + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1199 + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1200 + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1201 + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1202 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1201 + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1203 + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1199 + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1205 + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1206 + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1207 + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1208 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams1D(__pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1207 + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1209 + * if usePTDS: + * return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeSetParams1D(__pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1205 + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemcpyNodeSetParams1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1211 + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemsetNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemsetParams const *__pyx_v_pMemsetParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1212 + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1213 + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1214 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) # <<<<<<<<<<<<<< + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemsetNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pMemsetParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1213 + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1215 + * if usePTDS: + * return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemsetNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pMemsetParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1211 + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1217 + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1218 + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1219 + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1220 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1219 + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1221 + * if usePTDS: + * return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemsetNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1217 + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1223 + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1224 + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1225 + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1226 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1225 + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1227 + * if usePTDS: + * return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemsetNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1223 + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1229 + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddHostNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1230 + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1230, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1231 + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1232 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddHostNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1231 + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1233 + * if usePTDS: + * return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddHostNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1229 + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1235 + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1236 + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1237 + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) + * return cudaGraphHostNodeGetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1238 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1237 + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) + * return cudaGraphHostNodeGetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1239 + * if usePTDS: + * return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) + * return cudaGraphHostNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphHostNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1235 + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1241 + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1242 + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1243 + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) + * return cudaGraphHostNodeSetParams(node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1244 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1243 + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) + * return cudaGraphHostNodeSetParams(node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1245 + * if usePTDS: + * return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) + * return cudaGraphHostNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphHostNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1241 + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1247 + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddChildGraphNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaGraph_t __pyx_v_childGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1248 + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1248, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1249 + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1250 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddChildGraphNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1249 + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1251 + * if usePTDS: + * return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddChildGraphNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_childGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1247 + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1253 + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t __pyx_v_node, cudaGraph_t *__pyx_v_pGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1254 + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1255 + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1256 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) # <<<<<<<<<<<<<< + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphChildGraphNodeGetGraph(__pyx_v_node, __pyx_v_pGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1255 + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1257 + * if usePTDS: + * return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphChildGraphNodeGetGraph(__pyx_v_node, __pyx_v_pGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1253 + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1259 + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEmptyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1260 + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1261 + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1262 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) # <<<<<<<<<<<<<< + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEmptyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1261 + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1263 + * if usePTDS: + * return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEmptyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1259 + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1265 + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventRecordNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1266 + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1267 + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1268 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventRecordNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1267 + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1269 + * if usePTDS: + * return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEventRecordNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1265 + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1271 + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1272 + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1273 + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) + * return cudaGraphEventRecordNodeGetEvent(node, event_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1274 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeGetEvent(__pyx_v_node, __pyx_v_event_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1273 + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) + * return cudaGraphEventRecordNodeGetEvent(node, event_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1275 + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) + * return cudaGraphEventRecordNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventRecordNodeGetEvent(__pyx_v_node, __pyx_v_event_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1271 + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1277 + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1278 + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeSetEvent(node, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1278, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1279 + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventRecordNodeSetEvent(node, event) + * return cudaGraphEventRecordNodeSetEvent(node, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1280 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeSetEvent(node, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeSetEvent(__pyx_v_node, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1279 + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventRecordNodeSetEvent(node, event) + * return cudaGraphEventRecordNodeSetEvent(node, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1281 + * if usePTDS: + * return ptds._cudaGraphEventRecordNodeSetEvent(node, event) + * return cudaGraphEventRecordNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventRecordNodeSetEvent(__pyx_v_node, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1277 + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1283 + * return cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1284 + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1285 + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1286 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1285 + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1287 + * if usePTDS: + * return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEventWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1283 + * return cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1289 + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1290 + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1291 + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) + * return cudaGraphEventWaitNodeGetEvent(node, event_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1292 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeGetEvent(__pyx_v_node, __pyx_v_event_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1291 + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) + * return cudaGraphEventWaitNodeGetEvent(node, event_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1293 + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) + * return cudaGraphEventWaitNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventWaitNodeGetEvent(__pyx_v_node, __pyx_v_event_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1289 + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1295 + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1296 + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeSetEvent(node, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1297 + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventWaitNodeSetEvent(node, event) + * return cudaGraphEventWaitNodeSetEvent(node, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1298 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeSetEvent(node, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeSetEvent(__pyx_v_node, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1297 + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphEventWaitNodeSetEvent(node, event) + * return cudaGraphEventWaitNodeSetEvent(node, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1299 + * if usePTDS: + * return ptds._cudaGraphEventWaitNodeSetEvent(node, event) + * return cudaGraphEventWaitNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventWaitNodeSetEvent(__pyx_v_node, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1295 + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1301 + * return cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1302 + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1303 + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1304 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresSignalNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1303 + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1305 + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddExternalSemaphoresSignalNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1301 + * return cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1307 + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams *__pyx_v_params_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1308 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1309 + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1310 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1309 + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1311 + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1307 + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1313 + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1314 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1315 + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1316 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1315 + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1317 + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1313 + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1319 + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1320 + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1321 + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1322 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1321 + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1323 + * if usePTDS: + * return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddExternalSemaphoresWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1319 + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1325 + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams *__pyx_v_params_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1326 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1327 + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1328 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1327 + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1329 + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1325 + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1331 + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1332 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1333 + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1334 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1333 + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1335 + * if usePTDS: + * return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1331 + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1337 + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemAllocNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemAllocNodeParams *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1338 + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1339 + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1340 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemAllocNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1339 + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1341 + * if usePTDS: + * return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemAllocNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1337 + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1343 + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemAllocNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemAllocNodeParams *__pyx_v_params_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1344 + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1345 + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) + * return cudaGraphMemAllocNodeGetParams(node, params_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1346 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) # <<<<<<<<<<<<<< + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemAllocNodeGetParams(__pyx_v_node, __pyx_v_params_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1345 + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) + * return cudaGraphMemAllocNodeGetParams(node, params_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1347 + * if usePTDS: + * return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) + * return cudaGraphMemAllocNodeGetParams(node, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemAllocNodeGetParams(__pyx_v_node, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1343 + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1349 + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemFreeNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dptr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1350 + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1351 + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1352 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemFreeNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1351 + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1353 + * if usePTDS: + * return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemFreeNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1349 + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1355 + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemFreeNodeGetParams(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dptr_out) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1356 + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1357 + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1358 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) # <<<<<<<<<<<<<< + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemFreeNodeGetParams(__pyx_v_node, __pyx_v_dptr_out); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1357 + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1359 + * if usePTDS: + * return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemFreeNodeGetParams(__pyx_v_node, __pyx_v_dptr_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1355 + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1361 + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGraphMemTrim(int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1362 + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGraphMemTrim(device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1363 + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGraphMemTrim(device) + * return cudaDeviceGraphMemTrim(device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1364 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGraphMemTrim(device) # <<<<<<<<<<<<<< + * return cudaDeviceGraphMemTrim(device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGraphMemTrim(__pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1363 + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGraphMemTrim(device) + * return cudaDeviceGraphMemTrim(device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1365 + * if usePTDS: + * return ptds._cudaDeviceGraphMemTrim(device) + * return cudaDeviceGraphMemTrim(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGraphMemTrim(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1361 + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1367 + * return cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1368 + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1369 + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) + * return cudaDeviceGetGraphMemAttribute(device, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1370 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetGraphMemAttribute(__pyx_v_device, ((enum cudaGraphMemAttributeType)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1369 + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) + * return cudaDeviceGetGraphMemAttribute(device, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1371 + * if usePTDS: + * return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) + * return cudaDeviceGetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1367 + * return cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1373 + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1374 + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1375 + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) + * return cudaDeviceSetGraphMemAttribute(device, attr, value) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1376 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetGraphMemAttribute(__pyx_v_device, ((enum cudaGraphMemAttributeType)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1375 + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) + * return cudaDeviceSetGraphMemAttribute(device, attr, value) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1377 + * if usePTDS: + * return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) + * return cudaDeviceSetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1373 + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1379 + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphClone(cudaGraph_t *__pyx_v_pGraphClone, cudaGraph_t __pyx_v_originalGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1380 + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphClone(pGraphClone, originalGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1381 + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphClone(pGraphClone, originalGraph) + * return cudaGraphClone(pGraphClone, originalGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1382 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphClone(pGraphClone, originalGraph) # <<<<<<<<<<<<<< + * return cudaGraphClone(pGraphClone, originalGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphClone(__pyx_v_pGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1381 + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphClone(pGraphClone, originalGraph) + * return cudaGraphClone(pGraphClone, originalGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1383 + * if usePTDS: + * return ptds._cudaGraphClone(pGraphClone, originalGraph) + * return cudaGraphClone(pGraphClone, originalGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphClone(__pyx_v_pGraphClone, __pyx_v_originalGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1379 + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1385 + * return cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeFindInClone(cudaGraphNode_t *__pyx_v_pNode, cudaGraphNode_t __pyx_v_originalNode, cudaGraph_t __pyx_v_clonedGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1386 + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1387 + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1388 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) # <<<<<<<<<<<<<< + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeFindInClone(__pyx_v_pNode, __pyx_v_originalNode, __pyx_v_clonedGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1388, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1387 + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1389 + * if usePTDS: + * return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeFindInClone(__pyx_v_pNode, __pyx_v_originalNode, __pyx_v_clonedGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1385 + * return cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1391 + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetType(cudaGraphNode_t __pyx_v_node, enum cudaGraphNodeType *__pyx_v_pType) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1392 + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetType(node, pType) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1392, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1393 + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetType(node, pType) + * return cudaGraphNodeGetType(node, pType) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1394 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetType(node, pType) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetType(node, pType) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetType(__pyx_v_node, ((enum cudaGraphNodeType *)__pyx_v_pType)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1393 + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetType(node, pType) + * return cudaGraphNodeGetType(node, pType) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1395 + * if usePTDS: + * return ptds._cudaGraphNodeGetType(node, pType) + * return cudaGraphNodeGetType(node, pType) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetType(__pyx_v_node, __pyx_v_pType); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1391 + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1397 + * return cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_nodes, size_t *__pyx_v_numNodes) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1398 + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphGetNodes(graph, nodes, numNodes) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1398, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1399 + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetNodes(graph, nodes, numNodes) + * return cudaGraphGetNodes(graph, nodes, numNodes) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1400 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphGetNodes(graph, nodes, numNodes) # <<<<<<<<<<<<<< + * return cudaGraphGetNodes(graph, nodes, numNodes) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetNodes(__pyx_v_graph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1399 + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetNodes(graph, nodes, numNodes) + * return cudaGraphGetNodes(graph, nodes, numNodes) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1401 + * if usePTDS: + * return ptds._cudaGraphGetNodes(graph, nodes, numNodes) + * return cudaGraphGetNodes(graph, nodes, numNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetNodes(__pyx_v_graph, __pyx_v_nodes, __pyx_v_numNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1397 + * return cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1403 + * return cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetRootNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_pRootNodes, size_t *__pyx_v_pNumRootNodes) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1404 + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1405 + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1406 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) # <<<<<<<<<<<<<< + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetRootNodes(__pyx_v_graph, __pyx_v_pRootNodes, __pyx_v_pNumRootNodes); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1405 + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1407 + * if usePTDS: + * return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetRootNodes(__pyx_v_graph, __pyx_v_pRootNodes, __pyx_v_pNumRootNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1403 + * return cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1409 + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, size_t *__pyx_v_numEdges) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1410 + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1411 + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) + * return cudaGraphGetEdges(graph, from_, to, numEdges) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1412 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) # <<<<<<<<<<<<<< + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1411 + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) + * return cudaGraphGetEdges(graph, from_, to, numEdges) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1413 + * if usePTDS: + * return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) + * return cudaGraphGetEdges(graph, from_, to, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetEdges(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1409 + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1415 + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1416 + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1417 + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1418 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1417 + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1419 + * if usePTDS: + * return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetEdges_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1415 + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphGetEdges_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1421 + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, size_t *__pyx_v_pNumDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1422 + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1423 + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1424 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_pNumDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1423 + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1425 + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependencies(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_pNumDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1421 + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1427 + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1428 + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1429 + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1430 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies_v2(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_edgeData, __pyx_v_pNumDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1429 + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1431 + * if usePTDS: + * return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependencies_v2(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_edgeData, __pyx_v_pNumDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1427 + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1433 + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, size_t *__pyx_v_pNumDependentNodes) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1434 + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1435 + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1436 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_pNumDependentNodes); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1435 + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1437 + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependentNodes(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_pNumDependentNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1433 + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1439 + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependentNodes) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1440 + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1441 + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1442 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes_v2(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_edgeData, __pyx_v_pNumDependentNodes); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1441 + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1443 + * if usePTDS: + * return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependentNodes_v2(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_edgeData, __pyx_v_pNumDependentNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1439 + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetDependentNodes_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1445 + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1446 + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1447 + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1448 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1447 + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1449 + * if usePTDS: + * return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1445 + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1451 + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1452 + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1453 + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1454 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1453 + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1455 + * if usePTDS: + * return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1451 + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1457 + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1458 + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1458, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1459 + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1460 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1459 + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1461 + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRemoveDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1457 + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1463 + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1464 + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1465 + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1466 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1465 + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1467 + * if usePTDS: + * return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRemoveDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1463 + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphRemoveDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1469 + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroyNode(cudaGraphNode_t __pyx_v_node) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1470 + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphDestroyNode(node) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1470, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1471 + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDestroyNode(node) + * return cudaGraphDestroyNode(node) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1472 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphDestroyNode(node) # <<<<<<<<<<<<<< + * return cudaGraphDestroyNode(node) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroyNode(__pyx_v_node); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1472, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1471 + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDestroyNode(node) + * return cudaGraphDestroyNode(node) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1473 + * if usePTDS: + * return ptds._cudaGraphDestroyNode(node) + * return cudaGraphDestroyNode(node) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDestroyNode(__pyx_v_node); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1469 + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1475 + * return cudaGraphDestroyNode(node) + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiate(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1476 + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1477 + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) + * return cudaGraphInstantiate(pGraphExec, graph, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1478 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiate(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1477 + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) + * return cudaGraphInstantiate(pGraphExec, graph, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1479 + * if usePTDS: + * return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) + * return cudaGraphInstantiate(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiate(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1475 + * return cudaGraphDestroyNode(node) + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1481 + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithFlags(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1482 + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1482, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1483 + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1484 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithFlags(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1484, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1483 + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1485 + * if usePTDS: + * return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiateWithFlags(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1481 + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1487 + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithParams(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, cudaGraphInstantiateParams *__pyx_v_instantiateParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1488 + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1489 + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1490 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithParams(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_instantiateParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1489 + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1491 + * if usePTDS: + * return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiateWithParams(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_instantiateParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1487 + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1493 + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecGetFlags(cudaGraphExec_t __pyx_v_graphExec, unsigned PY_LONG_LONG *__pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1494 + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecGetFlags(graphExec, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1494, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1495 + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecGetFlags(graphExec, flags) + * return cudaGraphExecGetFlags(graphExec, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1496 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecGetFlags(graphExec, flags) # <<<<<<<<<<<<<< + * return cudaGraphExecGetFlags(graphExec, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecGetFlags(__pyx_v_graphExec, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1496, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1495 + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecGetFlags(graphExec, flags) + * return cudaGraphExecGetFlags(graphExec, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1497 + * if usePTDS: + * return ptds._cudaGraphExecGetFlags(graphExec, flags) + * return cudaGraphExecGetFlags(graphExec, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecGetFlags(__pyx_v_graphExec, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1493 + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1499 + * return cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecKernelNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1500 + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1500, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1501 + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1502 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecKernelNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1501 + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1503 + * if usePTDS: + * return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecKernelNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1499 + * return cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1505 + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1506 + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1507 + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1508 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1508, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1507 + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1509 + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1505 + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1511 + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1512 + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1513 + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1514 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams1D(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1513 + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1515 + * if usePTDS: + * return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemcpyNodeSetParams1D(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1511 + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecMemcpyNodeSetParams1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1517 + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1518 + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1519 + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1520 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1519 + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1521 + * if usePTDS: + * return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1517 + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1523 + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecHostNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1524 + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1525 + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1526 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1525 + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1527 + * if usePTDS: + * return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1523 + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1529 + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, cudaGraph_t __pyx_v_childGraph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1530 + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1531 + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1532 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) # <<<<<<<<<<<<<< + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_childGraph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1531 + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1533 + * if usePTDS: + * return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_childGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1529 + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1535 + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1536 + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1537 + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1538 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1537 + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1539 + * if usePTDS: + * return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1535 + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1541 + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1542 + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1543 + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1544 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1543 + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1545 + * if usePTDS: + * return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1541 + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1547 + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1548 + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1548, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1549 + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1550 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1549 + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1551 + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1547 + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1553 + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1554 + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1555 + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1556 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1555 + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1557 + * if usePTDS: + * return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1553 + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1559 + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int __pyx_v_isEnabled) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1560 + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1561 + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1562 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1561 + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1563 + * if usePTDS: + * return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1559 + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1565 + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1566 + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1567 + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1568 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1567 + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1569 + * if usePTDS: + * return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1565 + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1571 + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecUpdate(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraph_t __pyx_v_hGraph, cudaGraphExecUpdateResultInfo *__pyx_v_resultInfo) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1572 + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1573 + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1574 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecUpdate(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1573 + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1575 + * if usePTDS: + * return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecUpdate(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1571 + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1577 + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphUpload(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1578 + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphUpload(graphExec, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1579 + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphUpload(graphExec, stream) + * return cudaGraphUpload(graphExec, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1580 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphUpload(graphExec, stream) # <<<<<<<<<<<<<< + * return cudaGraphUpload(graphExec, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphUpload(__pyx_v_graphExec, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1579 + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphUpload(graphExec, stream) + * return cudaGraphUpload(graphExec, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1581 + * if usePTDS: + * return ptds._cudaGraphUpload(graphExec, stream) + * return cudaGraphUpload(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphUpload(__pyx_v_graphExec, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1577 + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1583 + * return cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphLaunch(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1584 + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphLaunch(graphExec, stream) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1584, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1585 + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphLaunch(graphExec, stream) + * return cudaGraphLaunch(graphExec, stream) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1586 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphLaunch(graphExec, stream) # <<<<<<<<<<<<<< + * return cudaGraphLaunch(graphExec, stream) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphLaunch(__pyx_v_graphExec, __pyx_v_stream); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1586, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1585 + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphLaunch(graphExec, stream) + * return cudaGraphLaunch(graphExec, stream) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1587 + * if usePTDS: + * return ptds._cudaGraphLaunch(graphExec, stream) + * return cudaGraphLaunch(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphLaunch(__pyx_v_graphExec, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1583 + * return cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1589 + * return cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecDestroy(cudaGraphExec_t __pyx_v_graphExec) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1590 + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecDestroy(graphExec) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1591 + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecDestroy(graphExec) + * return cudaGraphExecDestroy(graphExec) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1592 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecDestroy(graphExec) # <<<<<<<<<<<<<< + * return cudaGraphExecDestroy(graphExec) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecDestroy(__pyx_v_graphExec); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1591 + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecDestroy(graphExec) + * return cudaGraphExecDestroy(graphExec) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1593 + * if usePTDS: + * return ptds._cudaGraphExecDestroy(graphExec) + * return cudaGraphExecDestroy(graphExec) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecDestroy(__pyx_v_graphExec); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1589 + * return cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1595 + * return cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroy(cudaGraph_t __pyx_v_graph) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1596 + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphDestroy(graph) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1597 + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDestroy(graph) + * return cudaGraphDestroy(graph) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1598 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphDestroy(graph) # <<<<<<<<<<<<<< + * return cudaGraphDestroy(graph) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroy(__pyx_v_graph); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1598, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1597 + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDestroy(graph) + * return cudaGraphDestroy(graph) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1599 + * if usePTDS: + * return ptds._cudaGraphDestroy(graph) + * return cudaGraphDestroy(graph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDestroy(__pyx_v_graph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1595 + * return cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1601 + * return cudaGraphDestroy(graph) + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDebugDotPrint(cudaGraph_t __pyx_v_graph, char const *__pyx_v_path, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1602 + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphDebugDotPrint(graph, path, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1602, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1603 + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDebugDotPrint(graph, path, flags) + * return cudaGraphDebugDotPrint(graph, path, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1604 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphDebugDotPrint(graph, path, flags) # <<<<<<<<<<<<<< + * return cudaGraphDebugDotPrint(graph, path, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDebugDotPrint(__pyx_v_graph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1604, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1603 + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphDebugDotPrint(graph, path, flags) + * return cudaGraphDebugDotPrint(graph, path, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1605 + * if usePTDS: + * return ptds._cudaGraphDebugDotPrint(graph, path, flags) + * return cudaGraphDebugDotPrint(graph, path, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDebugDotPrint(__pyx_v_graph, __pyx_v_path, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1601 + * return cudaGraphDestroy(graph) + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1607 + * return cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectCreate(cudaUserObject_t *__pyx_v_object_out, void *__pyx_v_ptr, cudaHostFn_t __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1608 + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1608, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1609 + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1610 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1610, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1609 + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1611 + * if usePTDS: + * return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1607 + * return cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1613 + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRetain(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1614 + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaUserObjectRetain(object, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1614, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1615 + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectRetain(object, count) + * return cudaUserObjectRetain(object, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1616 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaUserObjectRetain(object, count) # <<<<<<<<<<<<<< + * return cudaUserObjectRetain(object, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRetain(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1615 + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectRetain(object, count) + * return cudaUserObjectRetain(object, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1617 + * if usePTDS: + * return ptds._cudaUserObjectRetain(object, count) + * return cudaUserObjectRetain(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectRetain(__pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1613 + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1619 + * return cudaUserObjectRetain(object, count) + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRelease(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1620 + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaUserObjectRelease(object, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1620, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1621 + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectRelease(object, count) + * return cudaUserObjectRelease(object, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1622 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaUserObjectRelease(object, count) # <<<<<<<<<<<<<< + * return cudaUserObjectRelease(object, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRelease(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1621 + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaUserObjectRelease(object, count) + * return cudaUserObjectRelease(object, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1623 + * if usePTDS: + * return ptds._cudaUserObjectRelease(object, count) + * return cudaUserObjectRelease(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectRelease(__pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1619 + * return cudaUserObjectRetain(object, count) + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1625 + * return cudaUserObjectRelease(object, count) + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRetainUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1626 + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphRetainUserObject(graph, object, count, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1626, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1627 + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRetainUserObject(graph, object, count, flags) + * return cudaGraphRetainUserObject(graph, object, count, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1628 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphRetainUserObject(graph, object, count, flags) # <<<<<<<<<<<<<< + * return cudaGraphRetainUserObject(graph, object, count, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1628, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1627 + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphRetainUserObject(graph, object, count, flags) + * return cudaGraphRetainUserObject(graph, object, count, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1629 + * if usePTDS: + * return ptds._cudaGraphRetainUserObject(graph, object, count, flags) + * return cudaGraphRetainUserObject(graph, object, count, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1625 + * return cudaUserObjectRelease(object, count) + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1631 + * return cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphReleaseUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1632 + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphReleaseUserObject(graph, object, count) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1632, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1633 + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphReleaseUserObject(graph, object, count) + * return cudaGraphReleaseUserObject(graph, object, count) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1634 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphReleaseUserObject(graph, object, count) # <<<<<<<<<<<<<< + * return cudaGraphReleaseUserObject(graph, object, count) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1634, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1633 + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphReleaseUserObject(graph, object, count) + * return cudaGraphReleaseUserObject(graph, object, count) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1635 + * if usePTDS: + * return ptds._cudaGraphReleaseUserObject(graph, object, count) + * return cudaGraphReleaseUserObject(graph, object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1631 + * return cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1637 + * return cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1638 + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1638, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1639 + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1640 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1640, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1639 + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1641 + * if usePTDS: + * return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1637 + * return cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1643 + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode_v2(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1644 + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1644, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1645 + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1646 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode_v2(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1646, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1645 + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1647 + * if usePTDS: + * return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddNode_v2(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1643 + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphAddNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1649 + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1650 + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphNodeSetParams(node, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1651 + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeSetParams(node, nodeParams) + * return cudaGraphNodeSetParams(node, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1652 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphNodeSetParams(node, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphNodeSetParams(node, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetParams(__pyx_v_node, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1651 + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphNodeSetParams(node, nodeParams) + * return cudaGraphNodeSetParams(node, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1653 + * if usePTDS: + * return ptds._cudaGraphNodeSetParams(node, nodeParams) + * return cudaGraphNodeSetParams(node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeSetParams(__pyx_v_node, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1649 + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1655 + * return cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecNodeSetParams(cudaGraphExec_t __pyx_v_graphExec, cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1656 + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1656, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1657 + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1658 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) # <<<<<<<<<<<<<< + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecNodeSetParams(__pyx_v_graphExec, __pyx_v_node, __pyx_v_nodeParams); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1657 + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1659 + * if usePTDS: + * return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecNodeSetParams(__pyx_v_graphExec, __pyx_v_node, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1655 + * return cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1661 + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle *__pyx_v_pHandle_out, cudaGraph_t __pyx_v_graph, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1662 + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1662, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1663 + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1664 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_graph, __pyx_v_defaultLaunchValue, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1663 + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1665 + * if usePTDS: + * return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_graph, __pyx_v_defaultLaunchValue, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1661 + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphConditionalHandleCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1667 + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPoint(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1668 + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1669 + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1670 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPoint(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_flags, ((enum cudaDriverEntryPointQueryResult *)__pyx_v_driverStatus)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1670, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1669 + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1671 + * if usePTDS: + * return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDriverEntryPoint(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_flags, __pyx_v_driverStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1667 + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDriverEntryPoint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1673 + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPointByVersion(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned int __pyx_v_cudaVersion, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1674 + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1675 + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1676 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPointByVersion(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_cudaVersion, __pyx_v_flags, ((enum cudaDriverEntryPointQueryResult *)__pyx_v_driverStatus)); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1676, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1675 + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1677 + * if usePTDS: + * return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDriverEntryPointByVersion(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_driverStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1673 + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetDriverEntryPointByVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1679 + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadData(cudaLibrary_t *__pyx_v_library, void const *__pyx_v_code, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1680 + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1681 + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1682 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadData(__pyx_v_library, __pyx_v_code, ((enum cudaJitOption *)__pyx_v_jitOptions), __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, ((enum cudaLibraryOption *)__pyx_v_libraryOptions), __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1681 + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1683 + * if usePTDS: + * return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryLoadData(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1679 + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1685 + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadFromFile(cudaLibrary_t *__pyx_v_library, char const *__pyx_v_fileName, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1686 + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1687 + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1688 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, ((enum cudaJitOption *)__pyx_v_jitOptions), __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, ((enum cudaLibraryOption *)__pyx_v_libraryOptions), __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1687 + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1689 + * if usePTDS: + * return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1685 + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryLoadFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1691 + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryUnload(cudaLibrary_t __pyx_v_library) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1692 + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryUnload(library) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1693 + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryUnload(library) + * return cudaLibraryUnload(library) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1694 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryUnload(library) # <<<<<<<<<<<<<< + * return cudaLibraryUnload(library) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryUnload(__pyx_v_library); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1694, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1693 + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryUnload(library) + * return cudaLibraryUnload(library) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1695 + * if usePTDS: + * return ptds._cudaLibraryUnload(library) + * return cudaLibraryUnload(library) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryUnload(__pyx_v_library); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1691 + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1697 + * return cudaLibraryUnload(library) + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernel(cudaKernel_t *__pyx_v_pKernel, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1698 + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryGetKernel(pKernel, library, name) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1698, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1699 + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetKernel(pKernel, library, name) + * return cudaLibraryGetKernel(pKernel, library, name) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1700 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryGetKernel(pKernel, library, name) # <<<<<<<<<<<<<< + * return cudaLibraryGetKernel(pKernel, library, name) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1700, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1699 + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetKernel(pKernel, library, name) + * return cudaLibraryGetKernel(pKernel, library, name) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1701 + * if usePTDS: + * return ptds._cudaLibraryGetKernel(pKernel, library, name) + * return cudaLibraryGetKernel(pKernel, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1697 + * return cudaLibraryUnload(library) + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1703 + * return cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetGlobal(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1704 + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1705 + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1706 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1705 + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1707 + * if usePTDS: + * return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1703 + * return cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1709 + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetManaged(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1710 + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1710, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1711 + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) + * return cudaLibraryGetManaged(dptr, numbytes, library, name) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1712 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1712, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1711 + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) + * return cudaLibraryGetManaged(dptr, numbytes, library, name) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1713 + * if usePTDS: + * return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) + * return cudaLibraryGetManaged(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1709 + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryGetManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1715 + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetUnifiedFunction(void **__pyx_v_fptr, cudaLibrary_t __pyx_v_library, char const *__pyx_v_symbol) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1716 + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1716, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1717 + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1718 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) # <<<<<<<<<<<<<< + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1718, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1717 + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1719 + * if usePTDS: + * return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1715 + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryGetUnifiedFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1721 + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernelCount(unsigned int *__pyx_v_count, cudaLibrary_t __pyx_v_lib) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1722 + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryGetKernelCount(count, lib) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1722, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1723 + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetKernelCount(count, lib) + * return cudaLibraryGetKernelCount(count, lib) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1724 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryGetKernelCount(count, lib) # <<<<<<<<<<<<<< + * return cudaLibraryGetKernelCount(count, lib) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1724, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1723 + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryGetKernelCount(count, lib) + * return cudaLibraryGetKernelCount(count, lib) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1725 + * if usePTDS: + * return ptds._cudaLibraryGetKernelCount(count, lib) + * return cudaLibraryGetKernelCount(count, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1721 + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryGetKernelCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1727 + * return cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryEnumerateKernels(cudaKernel_t *__pyx_v_kernels, unsigned int __pyx_v_numKernels, cudaLibrary_t __pyx_v_lib) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1728 + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1728, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1729 + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1730 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1730, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1729 + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1731 + * if usePTDS: + * return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1727 + * return cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaLibraryEnumerateKernels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1733 + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaKernelSetAttributeForDevice(cudaKernel_t __pyx_v_kernel, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value, int __pyx_v_device) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1734 + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1734, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1735 + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1736 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) # <<<<<<<<<<<<<< + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaKernelSetAttributeForDevice(__pyx_v_kernel, ((enum cudaFuncAttribute)__pyx_v_attr), __pyx_v_value, __pyx_v_device); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1736, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1735 + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1737 + * if usePTDS: + * return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaKernelSetAttributeForDevice(__pyx_v_kernel, __pyx_v_attr, __pyx_v_value, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1733 + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaKernelSetAttributeForDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1739 + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetExportTable(void const **__pyx_v_ppExportTable, cudaUUID_t const *__pyx_v_pExportTableId) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1740 + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetExportTable(ppExportTable, pExportTableId) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1740, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1741 + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetExportTable(ppExportTable, pExportTableId) + * return cudaGetExportTable(ppExportTable, pExportTableId) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1742 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetExportTable(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * return cudaGetExportTable(ppExportTable, pExportTableId) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1742, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1741 + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetExportTable(ppExportTable, pExportTableId) + * return cudaGetExportTable(ppExportTable, pExportTableId) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1743 + * if usePTDS: + * return ptds._cudaGetExportTable(ppExportTable, pExportTableId) + * return cudaGetExportTable(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1739 + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1745 + * return cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetKernel(cudaKernel_t *__pyx_v_kernelPtr, void const *__pyx_v_entryFuncAddr) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1746 + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1746, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1747 + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + * return cudaGetKernel(kernelPtr, entryFuncAddr) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1748 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) # <<<<<<<<<<<<<< + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetKernel(__pyx_v_kernelPtr, __pyx_v_entryFuncAddr); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1748, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1747 + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + * return cudaGetKernel(kernelPtr, entryFuncAddr) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1749 + * if usePTDS: + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + * return cudaGetKernel(kernelPtr, entryFuncAddr) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: +*/ + __pyx_r = cudaGetKernel(__pyx_v_kernelPtr, __pyx_v_entryFuncAddr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1745 + * return cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1750 + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + +static struct cudaPitchedPtr __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPitchedPtr(void *__pyx_v_d, size_t __pyx_v_p, size_t __pyx_v_xsz, size_t __pyx_v_ysz) { + int __pyx_v_usePTDS; + struct cudaPitchedPtr __pyx_r; + int __pyx_t_1; + struct cudaPitchedPtr __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1752 + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1752, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1753 + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + * return make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1754 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) # <<<<<<<<<<<<<< + * return make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPitchedPtr(__pyx_v_d, __pyx_v_p, __pyx_v_xsz, __pyx_v_ysz); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1754, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1753 + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + * return make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1755 + * if usePTDS: + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + * return make_cudaPitchedPtr(d, p, xsz, ysz) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: +*/ + __pyx_r = make_cudaPitchedPtr(__pyx_v_d, __pyx_v_p, __pyx_v_xsz, __pyx_v_ysz); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1750 + * return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._make_cudaPitchedPtr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1756 + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + * return make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + +static struct cudaPos __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPos(size_t __pyx_v_x, size_t __pyx_v_y, size_t __pyx_v_z) { + int __pyx_v_usePTDS; + struct cudaPos __pyx_r; + int __pyx_t_1; + struct cudaPos __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1758 + * @cython.show_performance_hints(False) + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._make_cudaPos(x, y, z) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1758, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1759 + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaPos(x, y, z) + * return make_cudaPos(x, y, z) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1760 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._make_cudaPos(x, y, z) # <<<<<<<<<<<<<< + * return make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPos(__pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1760, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1759 + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaPos(x, y, z) + * return make_cudaPos(x, y, z) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1761 + * if usePTDS: + * return ptds._make_cudaPos(x, y, z) + * return make_cudaPos(x, y, z) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: +*/ + __pyx_r = make_cudaPos(__pyx_v_x, __pyx_v_y, __pyx_v_z); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1756 + * return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + * return make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._make_cudaPos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1762 + * return ptds._make_cudaPos(x, y, z) + * return make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + +static struct cudaExtent __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaExtent(size_t __pyx_v_w, size_t __pyx_v_h, size_t __pyx_v_d) { + int __pyx_v_usePTDS; + struct cudaExtent __pyx_r; + int __pyx_t_1; + struct cudaExtent __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1764 + * @cython.show_performance_hints(False) + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._make_cudaExtent(w, h, d) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1765 + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaExtent(w, h, d) + * return make_cudaExtent(w, h, d) +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1766 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._make_cudaExtent(w, h, d) # <<<<<<<<<<<<<< + * return make_cudaExtent(w, h, d) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaExtent(__pyx_v_w, __pyx_v_h, __pyx_v_d); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1766, __pyx_L1_error) + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1765 + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._make_cudaExtent(w, h, d) + * return make_cudaExtent(w, h, d) +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1767 + * if usePTDS: + * return ptds._make_cudaExtent(w, h, d) + * return make_cudaExtent(w, h, d) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = make_cudaExtent(__pyx_v_w, __pyx_v_h, __pyx_v_d); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1762 + * return ptds._make_cudaPos(x, y, z) + * return make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * cdef bint usePTDS = cudaPythonInit() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._make_cudaExtent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1769 + * return make_cudaExtent(w, h, d) + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStart(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1770 + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaProfilerStart() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1770, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1771 + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaProfilerStart() + * return cudaProfilerStart() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1772 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaProfilerStart() # <<<<<<<<<<<<<< + * return cudaProfilerStart() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStart(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1771 + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaProfilerStart() + * return cudaProfilerStart() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1773 + * if usePTDS: + * return ptds._cudaProfilerStart() + * return cudaProfilerStart() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaProfilerStart(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1769 + * return make_cudaExtent(w, h, d) + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime.pyx":1775 + * return cudaProfilerStart() + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStop(void) { + int __pyx_v_usePTDS; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1776 + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() # <<<<<<<<<<<<<< + * if usePTDS: + * return ptds._cudaProfilerStop() +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_cudaPythonInit(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_v_usePTDS = __pyx_t_1; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1777 + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaProfilerStop() + * return cudaProfilerStop() +*/ + if (__pyx_v_usePTDS) { + + /* "cuda/bindings/_bindings/cyruntime.pyx":1778 + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: + * return ptds._cudaProfilerStop() # <<<<<<<<<<<<<< + * return cudaProfilerStop() + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStop(); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1778, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_2); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1777 + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: # <<<<<<<<<<<<<< + * return ptds._cudaProfilerStop() + * return cudaProfilerStop() +*/ + } + + /* "cuda/bindings/_bindings/cyruntime.pyx":1779 + * if usePTDS: + * return ptds._cudaProfilerStop() + * return cudaProfilerStop() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = cudaProfilerStop(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1775 + * return cudaProfilerStart() + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef bint usePTDS = cudaPythonInit() + * if usePTDS: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":18 + * cimport cuda.bindings._bindings.cydriver as cydriver + * + * cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerPresentFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame __pyx_v_eglframe, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_v_err; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_cueglFrame; + cudaError_t __pyx_r; + int __pyx_t_1; + cudaError_t __pyx_t_2; + CUresult __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":19 + * + * cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":21 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":22 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * cdef cydriver.CUeglFrame cueglFrame +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":23 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * cdef cydriver.CUeglFrame cueglFrame + * err = getDriverEglFrame(&cueglFrame, eglframe) +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":22 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * cdef cydriver.CUeglFrame cueglFrame +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":25 + * return err + * cdef cydriver.CUeglFrame cueglFrame + * err = getDriverEglFrame(&cueglFrame, eglframe) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDriverEglFrame((&__pyx_v_cueglFrame), __pyx_v_eglframe); if (unlikely(__pyx_t_2 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 25, __pyx_L1_error) + __pyx_v_err = __pyx_t_2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":26 + * cdef cydriver.CUeglFrame cueglFrame + * err = getDriverEglFrame(&cueglFrame, eglframe) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":27 + * err = getDriverEglFrame(&cueglFrame, eglframe) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":26 + * cdef cydriver.CUeglFrame cueglFrame + * err = getDriverEglFrame(&cueglFrame, eglframe) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":28 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), __pyx_v_cueglFrame, __pyx_v_pStream); if (unlikely(__pyx_t_3 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 28, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_3); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":29 + * return err + * err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":18 + * cimport cuda.bindings._bindings.cydriver as cydriver + * + * cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":31 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerReturnFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *__pyx_v_eglframe, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_v_err; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_cueglFrame; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + cudaError_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":32 + * + * cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":34 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":35 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * if eglframe == NULL: +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":36 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * if eglframe == NULL: + * err = cudaErrorInvalidResourceHandle +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":35 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * if eglframe == NULL: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":37 + * if err != cudaSuccess: + * return err + * if eglframe == NULL: # <<<<<<<<<<<<<< + * err = cudaErrorInvalidResourceHandle + * return err +*/ + __pyx_t_1 = (__pyx_v_eglframe == NULL); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":38 + * return err + * if eglframe == NULL: + * err = cudaErrorInvalidResourceHandle # <<<<<<<<<<<<<< + * return err + * cdef cydriver.CUeglFrame cueglFrame +*/ + __pyx_v_err = cudaErrorInvalidResourceHandle; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":39 + * if eglframe == NULL: + * err = cudaErrorInvalidResourceHandle + * return err # <<<<<<<<<<<<<< + * cdef cydriver.CUeglFrame cueglFrame + * err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":37 + * if err != cudaSuccess: + * return err + * if eglframe == NULL: # <<<<<<<<<<<<<< + * err = cudaErrorInvalidResourceHandle + * return err +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":41 + * return err + * cdef cydriver.CUeglFrame cueglFrame + * err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), (&__pyx_v_cueglFrame), __pyx_v_pStream); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 41, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":42 + * cdef cydriver.CUeglFrame cueglFrame + * err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = getRuntimeEglFrame(eglframe, cueglFrame) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":43 + * err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = getRuntimeEglFrame(eglframe, cueglFrame) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":42 + * cdef cydriver.CUeglFrame cueglFrame + * err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = getRuntimeEglFrame(eglframe, cueglFrame) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":44 + * if err != cudaSuccess: + * return err + * err = getRuntimeEglFrame(eglframe, cueglFrame) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getRuntimeEglFrame(__pyx_v_eglframe, __pyx_v_cueglFrame); if (unlikely(__pyx_t_3 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 44, __pyx_L1_error) + __pyx_v_err = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":45 + * return err + * err = getRuntimeEglFrame(eglframe, cueglFrame) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":31 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":47 + * return err + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *__pyx_v_eglFrame, cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) { + cudaError_t __pyx_v_err; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_cueglFrame; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + cudaError_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":48 + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":50 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":51 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * cdef cydriver.CUeglFrame cueglFrame +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":52 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * cdef cydriver.CUeglFrame cueglFrame + * memset(&cueglFrame, 0, sizeof(cueglFrame)) +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":51 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * cdef cydriver.CUeglFrame cueglFrame +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":54 + * return err + * cdef cydriver.CUeglFrame cueglFrame + * memset(&cueglFrame, 0, sizeof(cueglFrame)) # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + * if err != cudaSuccess: +*/ + (void)(memset((&__pyx_v_cueglFrame), 0, (sizeof(__pyx_v_cueglFrame)))); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":55 + * cdef cydriver.CUeglFrame cueglFrame + * memset(&cueglFrame, 0, sizeof(cueglFrame)) + * err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame((&__pyx_v_cueglFrame), ((CUgraphicsResource)__pyx_v_resource), __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":56 + * memset(&cueglFrame, 0, sizeof(cueglFrame)) + * err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = getRuntimeEglFrame(eglFrame, cueglFrame) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":57 + * err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = getRuntimeEglFrame(eglFrame, cueglFrame) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":56 + * memset(&cueglFrame, 0, sizeof(cueglFrame)) + * err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = getRuntimeEglFrame(eglFrame, cueglFrame) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":58 + * if err != cudaSuccess: + * return err + * err = getRuntimeEglFrame(eglFrame, cueglFrame) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getRuntimeEglFrame(__pyx_v_eglFrame, __pyx_v_cueglFrame); if (unlikely(__pyx_t_3 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 58, __pyx_L1_error) + __pyx_v_err = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":59 + * return err + * err = getRuntimeEglFrame(eglFrame, cueglFrame) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":47 + * return err + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":61 + * return err + * + * cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaErrorNotSupported + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUSetVDPAUDevice(CYTHON_UNUSED int __pyx_v_device, CYTHON_UNUSED __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice __pyx_v_vdpDevice, CYTHON_UNUSED __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":62 + * + * cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaErrorNotSupported # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaErrorNotSupported; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":61 + * return err + * + * cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaErrorNotSupported + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":64 + * return cudaErrorNotSupported + * + * cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUGetDevice(int *__pyx_v_device, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":65 + * + * cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":67 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":68 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":69 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":68 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":70 + * if err != cudaSuccess: + * return err + * err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice(((CUdevice *)__pyx_v_device), __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 70, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":71 + * return err + * err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":64 + * return cudaErrorNotSupported + * + * cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":73 + * return err + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterVideoSurface(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":74 + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":76 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":77 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":78 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":77 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":79 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface(((CUgraphicsResource *)__pyx_v_resource), __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 79, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":80 + * return err + * err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":73 + * return err + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":82 + * return err + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterOutputSurface(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":83 + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":85 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":86 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":87 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":86 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":88 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface(((CUgraphicsResource *)__pyx_v_resource), __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 88, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":89 + * return err + * err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":82 + * return err + * + * cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":91 + * return err + * + * cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGLGetDevices(unsigned int *__pyx_v_pCudaDeviceCount, int *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList __pyx_v_deviceList) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":92 + * + * cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":94 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":95 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":96 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":95 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":97 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2(__pyx_v_pCudaDeviceCount, ((CUdevice *)__pyx_v_pCudaDevices), __pyx_v_cudaDeviceCount, ((__pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList)__pyx_v_deviceList)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 97, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":98 + * return err + * err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":91 + * return err + * + * cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":100 + * return err + * + * cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterImage(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_GLuint __pyx_v_image, __pyx_t_4cuda_8bindings_9cyruntime_GLenum __pyx_v_target, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":101 + * + * cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":103 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":104 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":105 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":104 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":106 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage(((CUgraphicsResource *)__pyx_v_resource), __pyx_v_image, __pyx_v_target, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 106, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":107 + * return err + * err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":100 + * return err + * + * cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":109 + * return err + * + * cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterBuffer(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_GLuint __pyx_v_buffer, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":110 + * + * cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":112 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":113 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":114 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":113 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":115 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer(((CUgraphicsResource *)__pyx_v_resource), __pyx_v_buffer, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 115, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":116 + * return err + * err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":109 + * return err + * + * cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":118 + * return err + * + * cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":119 + * + * cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":121 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":122 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":123 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":122 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":124 + * if err != cudaSuccess: + * return err + * err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage(((CUgraphicsResource *)__pyx_v_pCudaResource), __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 124, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":125 + * return err + * err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":118 + * return err + * + * cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":127 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":128 + * + * cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":130 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":131 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":132 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":131 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":133 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), __pyx_v_eglStream); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 133, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":134 + * return err + * err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":127 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":136 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":137 + * + * cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":139 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":140 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":141 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":140 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":142 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), __pyx_v_eglStream, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 142, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":143 + * return err + * err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":136 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":145 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerDisconnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":146 + * + * cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":148 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":149 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerDisconnect(conn) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":150 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamConsumerDisconnect(conn) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":149 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerDisconnect(conn) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":151 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamConsumerDisconnect(conn) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 151, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":152 + * return err + * err = cydriver._cuEGLStreamConsumerDisconnect(conn) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":145 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":154 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, cudaGraphicsResource_t *__pyx_v_pCudaResource, cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_timeout) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":155 + * + * cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":157 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":158 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":159 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":158 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":160 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), ((CUgraphicsResource *)__pyx_v_pCudaResource), ((CUstream *)__pyx_v_pStream), __pyx_v_timeout); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 160, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":161 + * return err + * err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":154 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":163 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, cudaGraphicsResource_t __pyx_v_pCudaResource, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":164 + * + * cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":166 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":167 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":168 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":167 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":169 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), ((CUgraphicsResource)__pyx_v_pCudaResource), ((CUstream *)__pyx_v_pStream)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 169, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":170 + * return err + * err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":163 + * return err + * + * cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":172 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerConnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream, __pyx_t_4cuda_8bindings_9cyruntime_EGLint __pyx_v_width, __pyx_t_4cuda_8bindings_9cyruntime_EGLint __pyx_v_height) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":173 + * + * cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":175 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":176 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":177 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":176 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":178 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn), __pyx_v_eglStream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 178, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":179 + * return err + * err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":172 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":181 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerDisconnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":182 + * + * cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":184 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":185 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerDisconnect(conn) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":186 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEGLStreamProducerDisconnect(conn) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":185 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEGLStreamProducerDisconnect(conn) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":187 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEGLStreamProducerDisconnect(conn) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect(((__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)__pyx_v_conn)); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":188 + * return err + * err = cydriver._cuEGLStreamProducerDisconnect(conn) + * return err # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":181 + * return err + * + * cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":190 + * return err + * + * cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateFromEGLSync(cudaEvent_t *__pyx_v_phEvent, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) { + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + int __pyx_t_1; + CUresult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":191 + * + * cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":193 + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_v_err = cudaFree(((void *)0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":194 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) +*/ + __pyx_t_1 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":195 + * err = cudaFree(0) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * return err +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":194 + * # cudaFree(0) is a NOP operations that initializes the context state + * err = cudaFree(0) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":196 + * if err != cudaSuccess: + * return err + * err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync(((CUevent *)__pyx_v_phEvent), __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 196, __pyx_L1_error) + __pyx_v_err = ((cudaError_t)__pyx_t_2); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":197 + * return err + * err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * return err # <<<<<<<<<<<<<< + * + * ## utility functions +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":190 + * return err + * + * cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * # cudaFree(0) is a NOP operations that initializes the context state +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime._cudaEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":201 + * ## utility functions + * + * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f + * +*/ + +static int __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(struct cudaChannelFormatDesc const *__pyx_v_d, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_w, int __pyx_v_f) { + int __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":202 + * + * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) except ?cudaErrorCallRequiresNewerDriver nogil: + * return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x == __pyx_v_x); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).y == __pyx_v_y); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).z == __pyx_v_z); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).w == __pyx_v_w); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L3_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).f == __pyx_v_f); + __pyx_t_1 = __pyx_t_2; + __pyx_L3_bool_binop_done:; + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":201 + * ## utility functions + * + * cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":205 + * + * + * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDescInfo(struct cudaChannelFormatDesc const *__pyx_v_d, int *__pyx_v_numberOfChannels, CUarray_format *__pyx_v_format) { + cudaError_t __pyx_r; + enum cudaChannelFormatKind __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":207 + * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindSigned); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":208 + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsigned); + __pyx_t_2 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":207 + * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): +*/ + __pyx_t_3 = __pyx_t_2; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":209 + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 8); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).x != 16); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).x != 32); + __pyx_t_3 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":210 + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + * if (d[0].x != 16) and (d[0].x != 32): +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":209 + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":207 + * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":211 + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): # <<<<<<<<<<<<<< + * if (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindFloat); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":212 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + * if (d[0].x != 16) and (d[0].x != 32): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 16); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).x != 32); + __pyx_t_3 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":213 + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + * if (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":212 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + * if (d[0].x != 16) and (d[0].x != 32): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":211 + * if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): # <<<<<<<<<<<<<< + * if (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":214 + * if (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): # <<<<<<<<<<<<<< + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindNV12); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":215 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 8); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).y != 8); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).z != 8); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L14_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).w != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L14_bool_binop_done:; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":216 + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":215 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":214 + * if (d[0].x != 16) and (d[0].x != 32): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): # <<<<<<<<<<<<<< + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":217 + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized8X1); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L18_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":218 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized8X2); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L18_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":217 + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized8X4); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L18_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":220 + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized8X1); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L18_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":217 + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized8X2); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L18_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":222 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): # <<<<<<<<<<<<<< + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized8X4); + __pyx_t_3 = __pyx_t_2; + __pyx_L18_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":217 + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, +*/ + __pyx_t_2 = __pyx_t_3; + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":223 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): + * if (d[0].x != 8): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 8); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":224 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":223 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): + * if (d[0].x != 8): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":217 + * if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":225 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized16X1); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":226 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized16X2); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":225 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindSignedNormalized16X4); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":228 + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized16X1); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":225 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized16X2); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":230 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): # <<<<<<<<<<<<<< + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized16X4); + __pyx_t_2 = __pyx_t_3; + __pyx_L25_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":225 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, +*/ + __pyx_t_3 = __pyx_t_2; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":231 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): + * if (d[0].x != 16): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, +*/ + __pyx_t_3 = ((__pyx_v_d[0]).x != 16); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":232 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":231 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): + * if (d[0].x != 16): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":225 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + * cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed1); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":234 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed1SRGB); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed2); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":236 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed2SRGB); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed3); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":238 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed3SRGB); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed4); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":240 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedBlockCompressed4); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed5); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":242 + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedBlockCompressed5); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed7); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L32_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":244 + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): # <<<<<<<<<<<<<< + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed7SRGB); + __pyx_t_3 = __pyx_t_2; + __pyx_L32_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + __pyx_t_2 = __pyx_t_3; + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":245 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): + * if (d[0].x != 8): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 8); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":246 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":245 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): + * if (d[0].x != 8): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":233 + * if (d[0].x != 16): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":247 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed6H); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L45_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":248 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): # <<<<<<<<<<<<<< + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindSignedBlockCompressed6H); + __pyx_t_2 = __pyx_t_3; + __pyx_L45_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":247 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): +*/ + __pyx_t_3 = __pyx_t_2; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":249 + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 16); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).y != 16); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).z != 16); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L48_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).w != 0); + __pyx_t_3 = __pyx_t_2; + __pyx_L48_bool_binop_done:; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":250 + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":249 + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":247 + * if (d[0].x != 8): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":251 + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): # <<<<<<<<<<<<<< + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_3 = (__pyx_t_1 == cudaChannelFormatKindUnsignedNormalized1010102); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":252 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * else: +*/ + __pyx_t_2 = ((__pyx_v_d[0]).x != 10); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L53_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).y != 10); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L53_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).z != 10); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L53_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).w != 2); + __pyx_t_3 = __pyx_t_2; + __pyx_L53_bool_binop_done:; + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":253 + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":252 + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * else: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":251 + * if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + * return cudaErrorInvalidChannelDescriptor + * elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): # <<<<<<<<<<<<<< + * if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + * return cudaErrorInvalidChannelDescriptor +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":255 + * return cudaErrorInvalidChannelDescriptor + * else: + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * + * # If Y is non-zero, it must match X +*/ + /*else*/ { + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + } + __pyx_L3:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":260 + * # If Z is non-zero, it must match Y + * # If W is non-zero, it must match Z + * if (((d[0].y != 0) and (d[0].y != d[0].x)) or # <<<<<<<<<<<<<< + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): +*/ + __pyx_t_2 = ((__pyx_v_d[0]).y != 0); + if (!__pyx_t_2) { + goto __pyx_L59_next_or; + } else { + } + __pyx_t_2 = ((__pyx_v_d[0]).y != (__pyx_v_d[0]).x); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L58_bool_binop_done; + } + __pyx_L59_next_or:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":261 + * # If W is non-zero, it must match Z + * if (((d[0].y != 0) and (d[0].y != d[0].x)) or + * ((d[0].z != 0) and (d[0].z != d[0].y)) or # <<<<<<<<<<<<<< + * ((d[0].w != 0) and (d[0].w != d[0].z))): + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: +*/ + __pyx_t_2 = ((__pyx_v_d[0]).z != 0); + if (!__pyx_t_2) { + goto __pyx_L61_next_or; + } else { + } + __pyx_t_2 = ((__pyx_v_d[0]).z != (__pyx_v_d[0]).y); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L58_bool_binop_done; + } + __pyx_L61_next_or:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":262 + * if (((d[0].y != 0) and (d[0].y != d[0].x)) or + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): # <<<<<<<<<<<<<< + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + * return cudaErrorInvalidChannelDescriptor +*/ + __pyx_t_2 = ((__pyx_v_d[0]).w != 0); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L58_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_d[0]).w != (__pyx_v_d[0]).z); + __pyx_t_3 = __pyx_t_2; + __pyx_L58_bool_binop_done:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":260 + * # If Z is non-zero, it must match Y + * # If W is non-zero, it must match Z + * if (((d[0].y != 0) and (d[0].y != d[0].x)) or # <<<<<<<<<<<<<< + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): +*/ + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":263 + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + __pyx_t_3 = ((__pyx_v_d[0]).f != cudaChannelFormatKindUnsignedNormalized1010102); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":264 + * ((d[0].w != 0) and (d[0].w != d[0].z))): + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":263 + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":260 + * # If Z is non-zero, it must match Y + * # If W is non-zero, it must match Z + * if (((d[0].y != 0) and (d[0].y != d[0].x)) or # <<<<<<<<<<<<<< + * ((d[0].z != 0) and (d[0].z != d[0].y)) or + * ((d[0].w != 0) and (d[0].w != d[0].z))): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":265 + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + * return cudaErrorInvalidChannelDescriptor + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 0, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":266 + * return cudaErrorInvalidChannelDescriptor + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":267 + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":265 + * if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + * return cudaErrorInvalidChannelDescriptor + * if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":268 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 268, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":269 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":270 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":268 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":271 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 271, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":272 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":273 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":271 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":274 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 274, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":275 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":276 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":274 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":277 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 0, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 277, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":278 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":279 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":277 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":280 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":281 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":282 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":280 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":283 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":284 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":285 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":283 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":286 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 286, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":287 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":288 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":286 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":289 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 0, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 289, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":290 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":291 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":289 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":292 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 292, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":293 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":294 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":292 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":295 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":296 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":297 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":295 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":298 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 16, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 298, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":299 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":300 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":298 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":301 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 0, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 301, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":302 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":303 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":301 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":304 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 304, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":305 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":306 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":304 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":307 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 307, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":308 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":309 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":307 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":310 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 16, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 310, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":311 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":312 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":310 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":313 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 0, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 313, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":314 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":315 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":313 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":316 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 0, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 316, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":317 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":318 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":316 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":319 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 0, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 319, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":320 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":321 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":319 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":322 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 32, cudaChannelFormatKindSigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 322, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":323 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":324 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_SIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":322 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":325 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 0, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 325, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":326 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":327 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":325 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":328 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 0, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":329 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":330 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":328 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":331 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 0, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 331, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":332 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":333 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":331 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":334 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 32, cudaChannelFormatKindUnsigned); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 334, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":335 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":336 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNSIGNED_INT32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":334 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":337 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 0, 0, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 337, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":338 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":339 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_HALF; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":337 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + * elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":340 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 0, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":341 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":342 + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_HALF; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":340 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":343 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 343, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":344 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":345 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_HALF; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":343 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":346 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 16, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 346, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":347 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":348 + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_HALF; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":346 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":349 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 0, 0, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 349, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":350 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":351 + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_FLOAT; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":349 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + * elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":352 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 0, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":353 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":354 + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_FLOAT; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":352 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":355 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 0, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":356 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":357 + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT # <<<<<<<<<<<<<< + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_FLOAT; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":355 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":358 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 32, 32, 32, 32, cudaChannelFormatKindFloat); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 358, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":359 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":360 + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_FLOAT; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":358 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":361 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 0, cudaChannelFormatKindNV12); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":362 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":363 + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_NV12; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":361 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + * elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":364 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed1); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 364, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":365 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":366 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC1_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":364 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":367 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed1SRGB); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 367, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":368 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":369 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC1_UNORM_SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":367 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":370 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed2); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 370, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":371 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":372 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC2_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":370 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":373 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed2SRGB); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 373, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":374 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":375 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC2_UNORM_SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":373 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":376 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed3); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 376, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":377 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":378 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC3_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":376 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":379 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed3SRGB); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":380 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":381 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC3_UNORM_SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":379 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":382 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 0, 0, 0, cudaChannelFormatKindUnsignedBlockCompressed4); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":383 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":384 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): + * numberOfChannels[0] = 1 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC4_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":382 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":385 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 0, 0, 0, cudaChannelFormatKindSignedBlockCompressed4); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 385, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":386 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): + * numberOfChannels[0] = 1 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): +*/ + (__pyx_v_numberOfChannels[0]) = 1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":387 + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC4_SNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":385 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + * elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":388 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 0, 0, cudaChannelFormatKindUnsignedBlockCompressed5); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 388, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":389 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":390 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): + * numberOfChannels[0] = 2 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC5_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":388 + * numberOfChannels[0] = 1 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":391 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 0, 0, cudaChannelFormatKindSignedBlockCompressed5); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 391, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":392 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): + * numberOfChannels[0] = 2 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): +*/ + (__pyx_v_numberOfChannels[0]) = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":393 + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC5_SNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":391 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + * elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":394 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 0, cudaChannelFormatKindUnsignedBlockCompressed6H); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 394, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":395 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":396 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 # <<<<<<<<<<<<<< + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): + * numberOfChannels[0] = 3 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC6H_UF16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":394 + * numberOfChannels[0] = 2 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":397 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 16, 16, 16, 0, cudaChannelFormatKindSignedBlockCompressed6H); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 397, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":398 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): + * numberOfChannels[0] = 3 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): +*/ + (__pyx_v_numberOfChannels[0]) = 3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":399 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC6H_SF16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":397 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + * elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":400 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed7); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 400, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":401 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":402 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM # <<<<<<<<<<<<<< + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC7_UNORM; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":400 + * numberOfChannels[0] = 3 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":403 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 8, 8, 8, 8, cudaChannelFormatKindUnsignedBlockCompressed7SRGB); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 403, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":404 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":405 + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB # <<<<<<<<<<<<<< + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + * numberOfChannels[0] = 4 +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_BC7_UNORM_SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":403 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + * elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":406 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_case_desc(__pyx_v_d, 10, 10, 10, 2, cudaChannelFormatKindUnsignedNormalized1010102); if (unlikely(__pyx_t_4 == ((int)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 406, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_4 != 0); + if (__pyx_t_3) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":407 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + * numberOfChannels[0] = 4 # <<<<<<<<<<<<<< + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 + * else: +*/ + (__pyx_v_numberOfChannels[0]) = 4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":408 + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidChannelDescriptor +*/ + (__pyx_v_format[0]) = CU_AD_FORMAT_UNORM_INT_101010_2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":406 + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + * elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): # <<<<<<<<<<<<<< + * numberOfChannels[0] = 4 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 +*/ + goto __pyx_L65; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":410 + * format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 + * else: + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, +*/ + /*else*/ { + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + } + __pyx_L65:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":412 + * return cudaErrorInvalidChannelDescriptor + * + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): +*/ + __pyx_t_1 = (__pyx_v_d[0]).f; + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindNV12); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L67_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":413 + * + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if numberOfChannels[0] != 3: +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindUnsignedBlockCompressed6H); + if (!__pyx_t_2) { + } else { + __pyx_t_3 = __pyx_t_2; + goto __pyx_L67_bool_binop_done; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":412 + * return cudaErrorInvalidChannelDescriptor + * + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): +*/ + __pyx_t_2 = (__pyx_t_1 == cudaChannelFormatKindSignedBlockCompressed6H); + __pyx_t_3 = __pyx_t_2; + __pyx_L67_bool_binop_done:; + __pyx_t_2 = __pyx_t_3; + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":415 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if numberOfChannels[0] != 3: # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * else: +*/ + __pyx_t_2 = ((__pyx_v_numberOfChannels[0]) != 3); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":416 + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if numberOfChannels[0] != 3: + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * else: + * if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":415 + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + * if numberOfChannels[0] != 3: # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * else: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":412 + * return cudaErrorInvalidChannelDescriptor + * + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, # <<<<<<<<<<<<<< + * cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + * cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): +*/ + goto __pyx_L66; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":418 + * return cudaErrorInvalidChannelDescriptor + * else: + * if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * return cudaSuccess +*/ + /*else*/ { + __pyx_t_3 = ((__pyx_v_numberOfChannels[0]) != 1); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_numberOfChannels[0]) != 2); + if (__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L72_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_numberOfChannels[0]) != 4); + __pyx_t_2 = __pyx_t_3; + __pyx_L72_bool_binop_done:; + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":419 + * else: + * if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * return cudaSuccess + * +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":418 + * return cudaErrorInvalidChannelDescriptor + * else: + * if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * return cudaSuccess +*/ + } + } + __pyx_L66:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":420 + * if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): + * return cudaErrorInvalidChannelDescriptor + * return cudaSuccess # <<<<<<<<<<<<<< + * + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSuccess; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":205 + * + * + * cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * # Check validity + * if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime.getDescInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":422 + * return cudaSuccess + * + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef int channel_size = 0 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getChannelFormatDescFromDriverDesc(struct cudaChannelFormatDesc *__pyx_v_pRuntimeDesc, size_t *__pyx_v_pDepth, size_t *__pyx_v_pHeight, size_t *__pyx_v_pWidth, CUDA_ARRAY3D_DESCRIPTOR_v2 const *__pyx_v_pDriverDesc) { + int __pyx_v_channel_size; + cudaError_t __pyx_r; + int __pyx_t_1; + int __pyx_t_2; + unsigned int __pyx_t_3; + size_t __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":423 + * + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef int channel_size = 0 # <<<<<<<<<<<<<< + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned +*/ + __pyx_v_channel_size = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":424 + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef int channel_size = 0 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNSIGNED_INT8); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":425 + * cdef int channel_size = 0 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":426 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":424 + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef int channel_size = 0 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":427 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNSIGNED_INT16); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":428 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":429 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":427 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":430 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 32 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNSIGNED_INT32); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":431 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned # <<<<<<<<<<<<<< + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":432 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 32 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned +*/ + __pyx_v_channel_size = 32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":430 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 32 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":433 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SIGNED_INT8); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":434 + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":435 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":433 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":436 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SIGNED_INT16); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":437 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":438 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":436 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":439 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 32 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SIGNED_INT32); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":440 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned # <<<<<<<<<<<<<< + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSigned; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":441 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 32 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat +*/ + __pyx_v_channel_size = 32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":439 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 32 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":442 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_HALF); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":443 + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindFloat; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":444 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":442 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":445 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 32 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_FLOAT); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":446 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat # <<<<<<<<<<<<<< + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindFloat; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":447 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 32 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 +*/ + __pyx_v_channel_size = 32; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":445 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 32 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":448 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_NV12); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":449 + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindNV12; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":450 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":448 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + * channel_size = 32 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":451 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT8X1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":452 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized8X1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":453 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":451 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":454 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT8X2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":455 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized8X2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":456 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":454 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":457 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT8X4); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":458 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized8X4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":459 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":457 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":460 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT8X1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":461 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized8X1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":462 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":460 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":463 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT8X2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":464 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized8X2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":465 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":463 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":466 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT8X4); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":467 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized8X4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":468 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":466 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":469 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT16X1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":470 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized16X1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":471 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":469 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":472 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT16X2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":473 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized16X2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":474 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":472 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":475 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT16X4); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":476 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized16X4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":477 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":475 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":478 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT16X1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":479 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized16X1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":480 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":478 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":481 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT16X2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":482 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized16X2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":483 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":481 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":484 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_SNORM_INT16X4); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":485 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedNormalized16X4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":486 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":484 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":487 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC1_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":488 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":489 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":487 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":490 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC1_UNORM_SRGB); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":491 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed1SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":492 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":490 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":493 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC2_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":494 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":495 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":493 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":496 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC2_UNORM_SRGB); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":497 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed2SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":498 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":496 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":499 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC3_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":500 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":501 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":499 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":502 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC3_UNORM_SRGB); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":503 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed3SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":504 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":502 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":505 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC4_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":506 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":507 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":505 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":508 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC4_SNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":509 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedBlockCompressed4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":510 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":508 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":511 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC5_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":512 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed5; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":513 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":511 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":514 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC5_SNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":515 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedBlockCompressed5; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":516 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":514 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":517 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC6H_UF16); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":518 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed6H; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":519 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":517 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":520 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + * channel_size = 16 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC6H_SF16); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":521 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H # <<<<<<<<<<<<<< + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindSignedBlockCompressed6H; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":522 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + * channel_size = 16 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 +*/ + __pyx_v_channel_size = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":520 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + * channel_size = 16 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":523 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC7_UNORM); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":524 + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed7; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":525 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":523 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + * channel_size = 16 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":526 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + * channel_size = 8 +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_BC7_UNORM_SRGB); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":527 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB # <<<<<<<<<<<<<< + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedBlockCompressed7SRGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":528 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + * channel_size = 8 # <<<<<<<<<<<<<< + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 +*/ + __pyx_v_channel_size = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":526 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + * channel_size = 8 +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":529 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + * else: +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT_101010_2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":530 + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidChannelDescriptor +*/ + (__pyx_v_pRuntimeDesc[0]).f = cudaChannelFormatKindUnsignedNormalized1010102; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":529 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + * channel_size = 8 + * elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":532 + * pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + * else: + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * + * # populate bits per channel +*/ + /*else*/ { + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + } + __pyx_L3:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":535 + * + * # populate bits per channel + * pRuntimeDesc[0].x = 0 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].y = 0 + * pRuntimeDesc[0].z = 0 +*/ + (__pyx_v_pRuntimeDesc[0]).x = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":536 + * # populate bits per channel + * pRuntimeDesc[0].x = 0 + * pRuntimeDesc[0].y = 0 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].z = 0 + * pRuntimeDesc[0].w = 0 +*/ + (__pyx_v_pRuntimeDesc[0]).y = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":537 + * pRuntimeDesc[0].x = 0 + * pRuntimeDesc[0].y = 0 + * pRuntimeDesc[0].z = 0 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].w = 0 + * +*/ + (__pyx_v_pRuntimeDesc[0]).z = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":538 + * pRuntimeDesc[0].y = 0 + * pRuntimeDesc[0].z = 0 + * pRuntimeDesc[0].w = 0 # <<<<<<<<<<<<<< + * + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: +*/ + (__pyx_v_pRuntimeDesc[0]).w = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":540 + * pRuntimeDesc[0].w = 0 + * + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].w = 2 + * pRuntimeDesc[0].z = 10 +*/ + __pyx_t_2 = ((__pyx_v_pDriverDesc[0]).Format == CU_AD_FORMAT_UNORM_INT_101010_2); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = ((__pyx_v_pDriverDesc[0]).NumChannels == 4); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":541 + * + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: + * pRuntimeDesc[0].w = 2 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].z = 10 + * pRuntimeDesc[0].y = 10 +*/ + (__pyx_v_pRuntimeDesc[0]).w = 2; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":542 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: + * pRuntimeDesc[0].w = 2 + * pRuntimeDesc[0].z = 10 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].y = 10 + * pRuntimeDesc[0].x = 10 +*/ + (__pyx_v_pRuntimeDesc[0]).z = 10; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":543 + * pRuntimeDesc[0].w = 2 + * pRuntimeDesc[0].z = 10 + * pRuntimeDesc[0].y = 10 # <<<<<<<<<<<<<< + * pRuntimeDesc[0].x = 10 + * else: +*/ + (__pyx_v_pRuntimeDesc[0]).y = 10; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":544 + * pRuntimeDesc[0].z = 10 + * pRuntimeDesc[0].y = 10 + * pRuntimeDesc[0].x = 10 # <<<<<<<<<<<<<< + * else: + * if pDriverDesc[0].NumChannels >= 4: +*/ + (__pyx_v_pRuntimeDesc[0]).x = 10; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":540 + * pRuntimeDesc[0].w = 0 + * + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].w = 2 + * pRuntimeDesc[0].z = 10 +*/ + goto __pyx_L4; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":546 + * pRuntimeDesc[0].x = 10 + * else: + * if pDriverDesc[0].NumChannels >= 4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].w = channel_size + * if pDriverDesc[0].NumChannels >= 3: +*/ + /*else*/ { + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).NumChannels >= 4); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":547 + * else: + * if pDriverDesc[0].NumChannels >= 4: + * pRuntimeDesc[0].w = channel_size # <<<<<<<<<<<<<< + * if pDriverDesc[0].NumChannels >= 3: + * pRuntimeDesc[0].z = channel_size +*/ + (__pyx_v_pRuntimeDesc[0]).w = __pyx_v_channel_size; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":546 + * pRuntimeDesc[0].x = 10 + * else: + * if pDriverDesc[0].NumChannels >= 4: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].w = channel_size + * if pDriverDesc[0].NumChannels >= 3: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":548 + * if pDriverDesc[0].NumChannels >= 4: + * pRuntimeDesc[0].w = channel_size + * if pDriverDesc[0].NumChannels >= 3: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].z = channel_size + * if pDriverDesc[0].NumChannels >= 2: +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).NumChannels >= 3); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":549 + * pRuntimeDesc[0].w = channel_size + * if pDriverDesc[0].NumChannels >= 3: + * pRuntimeDesc[0].z = channel_size # <<<<<<<<<<<<<< + * if pDriverDesc[0].NumChannels >= 2: + * pRuntimeDesc[0].y = channel_size +*/ + (__pyx_v_pRuntimeDesc[0]).z = __pyx_v_channel_size; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":548 + * if pDriverDesc[0].NumChannels >= 4: + * pRuntimeDesc[0].w = channel_size + * if pDriverDesc[0].NumChannels >= 3: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].z = channel_size + * if pDriverDesc[0].NumChannels >= 2: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":550 + * if pDriverDesc[0].NumChannels >= 3: + * pRuntimeDesc[0].z = channel_size + * if pDriverDesc[0].NumChannels >= 2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].y = channel_size + * if pDriverDesc[0].NumChannels >= 1: +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).NumChannels >= 2); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":551 + * pRuntimeDesc[0].z = channel_size + * if pDriverDesc[0].NumChannels >= 2: + * pRuntimeDesc[0].y = channel_size # <<<<<<<<<<<<<< + * if pDriverDesc[0].NumChannels >= 1: + * pRuntimeDesc[0].x = channel_size +*/ + (__pyx_v_pRuntimeDesc[0]).y = __pyx_v_channel_size; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":550 + * if pDriverDesc[0].NumChannels >= 3: + * pRuntimeDesc[0].z = channel_size + * if pDriverDesc[0].NumChannels >= 2: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].y = channel_size + * if pDriverDesc[0].NumChannels >= 1: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":552 + * if pDriverDesc[0].NumChannels >= 2: + * pRuntimeDesc[0].y = channel_size + * if pDriverDesc[0].NumChannels >= 1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].x = channel_size + * +*/ + __pyx_t_1 = ((__pyx_v_pDriverDesc[0]).NumChannels >= 1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":553 + * pRuntimeDesc[0].y = channel_size + * if pDriverDesc[0].NumChannels >= 1: + * pRuntimeDesc[0].x = channel_size # <<<<<<<<<<<<<< + * + * if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): +*/ + (__pyx_v_pRuntimeDesc[0]).x = __pyx_v_channel_size; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":552 + * if pDriverDesc[0].NumChannels >= 2: + * pRuntimeDesc[0].y = channel_size + * if pDriverDesc[0].NumChannels >= 1: # <<<<<<<<<<<<<< + * pRuntimeDesc[0].x = channel_size + * +*/ + } + } + __pyx_L4:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":555 + * pRuntimeDesc[0].x = channel_size + * + * if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * +*/ + __pyx_t_3 = (__pyx_v_pDriverDesc[0]).NumChannels; + __pyx_t_2 = (__pyx_t_3 != 4); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_2 = (__pyx_t_3 != 3); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_2 = (__pyx_t_3 != 2); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_2 = (__pyx_t_3 != 1); + __pyx_t_1 = __pyx_t_2; + __pyx_L12_bool_binop_done:; + __pyx_t_2 = __pyx_t_1; + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":556 + * + * if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): + * return cudaErrorInvalidChannelDescriptor # <<<<<<<<<<<<<< + * + * # populate dimensions +*/ + __pyx_r = cudaErrorInvalidChannelDescriptor; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":555 + * pRuntimeDesc[0].x = channel_size + * + * if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): # <<<<<<<<<<<<<< + * return cudaErrorInvalidChannelDescriptor + * +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":559 + * + * # populate dimensions + * if pDepth != NULL: # <<<<<<<<<<<<<< + * pDepth[0] = pDriverDesc[0].Depth + * if pHeight != NULL: +*/ + __pyx_t_2 = (__pyx_v_pDepth != NULL); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":560 + * # populate dimensions + * if pDepth != NULL: + * pDepth[0] = pDriverDesc[0].Depth # <<<<<<<<<<<<<< + * if pHeight != NULL: + * pHeight[0] = pDriverDesc[0].Height +*/ + __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Depth; + (__pyx_v_pDepth[0]) = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":559 + * + * # populate dimensions + * if pDepth != NULL: # <<<<<<<<<<<<<< + * pDepth[0] = pDriverDesc[0].Depth + * if pHeight != NULL: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":561 + * if pDepth != NULL: + * pDepth[0] = pDriverDesc[0].Depth + * if pHeight != NULL: # <<<<<<<<<<<<<< + * pHeight[0] = pDriverDesc[0].Height + * if pWidth != NULL: +*/ + __pyx_t_2 = (__pyx_v_pHeight != NULL); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":562 + * pDepth[0] = pDriverDesc[0].Depth + * if pHeight != NULL: + * pHeight[0] = pDriverDesc[0].Height # <<<<<<<<<<<<<< + * if pWidth != NULL: + * pWidth[0] = pDriverDesc[0].Width +*/ + __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Height; + (__pyx_v_pHeight[0]) = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":561 + * if pDepth != NULL: + * pDepth[0] = pDriverDesc[0].Depth + * if pHeight != NULL: # <<<<<<<<<<<<<< + * pHeight[0] = pDriverDesc[0].Height + * if pWidth != NULL: +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":563 + * if pHeight != NULL: + * pHeight[0] = pDriverDesc[0].Height + * if pWidth != NULL: # <<<<<<<<<<<<<< + * pWidth[0] = pDriverDesc[0].Width + * return cudaSuccess +*/ + __pyx_t_2 = (__pyx_v_pWidth != NULL); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":564 + * pHeight[0] = pDriverDesc[0].Height + * if pWidth != NULL: + * pWidth[0] = pDriverDesc[0].Width # <<<<<<<<<<<<<< + * return cudaSuccess + * +*/ + __pyx_t_4 = (__pyx_v_pDriverDesc[0]).Width; + (__pyx_v_pWidth[0]) = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":563 + * if pHeight != NULL: + * pHeight[0] = pDriverDesc[0].Height + * if pWidth != NULL: # <<<<<<<<<<<<<< + * pWidth[0] = pDriverDesc[0].Width + * return cudaSuccess +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":565 + * if pWidth != NULL: + * pWidth[0] = pDriverDesc[0].Width + * return cudaSuccess # <<<<<<<<<<<<<< + * + * cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSuccess; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":422 + * return cudaSuccess + * + * cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef int channel_size = 0 + * if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":567 + * return cudaSuccess + * + * cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * cdef unsigned int i = 0 +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDriverEglFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *__pyx_v_cuEglFrame, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame __pyx_v_eglFrame) { + cudaError_t __pyx_v_err; + unsigned int __pyx_v_i; + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_t_2; + unsigned int __pyx_t_3; + unsigned int __pyx_t_4; + unsigned int __pyx_t_5; + void *__pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":568 + * + * cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * cdef unsigned int i = 0 + * +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":569 + * cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess + * cdef unsigned int i = 0 # <<<<<<<<<<<<<< + * + * err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) +*/ + __pyx_v_i = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":571 + * cdef unsigned int i = 0 + * + * err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDescInfo((&(__pyx_v_eglFrame.planeDesc[0]).channelDesc), ((int *)(&(__pyx_v_cuEglFrame[0]).numChannels)), (&(__pyx_v_cuEglFrame[0]).cuFormat)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 571, __pyx_L1_error) + __pyx_v_err = __pyx_t_1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":572 + * + * err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * for i in range(eglFrame.planeCount): +*/ + __pyx_t_2 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":573 + * err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * for i in range(eglFrame.planeCount): + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":572 + * + * err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * for i in range(eglFrame.planeCount): +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":574 + * if err != cudaSuccess: + * return err + * for i in range(eglFrame.planeCount): # <<<<<<<<<<<<<< + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + * cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] +*/ + __pyx_t_3 = __pyx_v_eglFrame.planeCount; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":575 + * return err + * for i in range(eglFrame.planeCount): + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: # <<<<<<<<<<<<<< + * cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] + * else: +*/ + __pyx_t_2 = (__pyx_v_eglFrame.frameType == __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":576 + * for i in range(eglFrame.planeCount): + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + * cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] # <<<<<<<<<<<<<< + * else: + * cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr +*/ + ((__pyx_v_cuEglFrame[0]).frame.pArray[__pyx_v_i]) = ((CUarray)(__pyx_v_eglFrame.frame.pArray[__pyx_v_i])); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":575 + * return err + * for i in range(eglFrame.planeCount): + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: # <<<<<<<<<<<<<< + * cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] + * else: +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":578 + * cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] + * else: + * cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr # <<<<<<<<<<<<<< + * cuEglFrame[0].width = eglFrame.planeDesc[0].width + * cuEglFrame[0].height = eglFrame.planeDesc[0].height +*/ + /*else*/ { + __pyx_t_6 = (__pyx_v_eglFrame.frame.pPitch[__pyx_v_i]).ptr; + ((__pyx_v_cuEglFrame[0]).frame.pPitch[__pyx_v_i]) = __pyx_t_6; + } + __pyx_L6:; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":579 + * else: + * cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr + * cuEglFrame[0].width = eglFrame.planeDesc[0].width # <<<<<<<<<<<<<< + * cuEglFrame[0].height = eglFrame.planeDesc[0].height + * cuEglFrame[0].depth = eglFrame.planeDesc[0].depth +*/ + __pyx_t_3 = (__pyx_v_eglFrame.planeDesc[0]).width; + (__pyx_v_cuEglFrame[0]).width = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":580 + * cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr + * cuEglFrame[0].width = eglFrame.planeDesc[0].width + * cuEglFrame[0].height = eglFrame.planeDesc[0].height # <<<<<<<<<<<<<< + * cuEglFrame[0].depth = eglFrame.planeDesc[0].depth + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch +*/ + __pyx_t_3 = (__pyx_v_eglFrame.planeDesc[0]).height; + (__pyx_v_cuEglFrame[0]).height = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":581 + * cuEglFrame[0].width = eglFrame.planeDesc[0].width + * cuEglFrame[0].height = eglFrame.planeDesc[0].height + * cuEglFrame[0].depth = eglFrame.planeDesc[0].depth # <<<<<<<<<<<<<< + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + * cuEglFrame[0].planeCount = eglFrame.planeCount +*/ + __pyx_t_3 = (__pyx_v_eglFrame.planeDesc[0]).depth; + (__pyx_v_cuEglFrame[0]).depth = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":582 + * cuEglFrame[0].height = eglFrame.planeDesc[0].height + * cuEglFrame[0].depth = eglFrame.planeDesc[0].depth + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch # <<<<<<<<<<<<<< + * cuEglFrame[0].planeCount = eglFrame.planeCount + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: +*/ + __pyx_t_3 = (__pyx_v_eglFrame.planeDesc[0]).pitch; + (__pyx_v_cuEglFrame[0]).pitch = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":583 + * cuEglFrame[0].depth = eglFrame.planeDesc[0].depth + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + * cuEglFrame[0].planeCount = eglFrame.planeCount # <<<<<<<<<<<<<< + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR +*/ + __pyx_t_3 = __pyx_v_eglFrame.planeCount; + (__pyx_v_cuEglFrame[0]).planeCount = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":584 + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + * cuEglFrame[0].planeCount = eglFrame.planeCount + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: +*/ + switch (__pyx_v_eglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":585 + * cuEglFrame[0].planeCount = eglFrame.planeCount + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":584 + * cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + * cuEglFrame[0].planeCount = eglFrame.planeCount + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":587 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":586 + * if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":589 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":588 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":591 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":590 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":593 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":592 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":595 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":594 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV422: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":597 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":596 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY422: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":599 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":598 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":601 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":600 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":603 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":602 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":605 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":604 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatARGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":607 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":606 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRGBA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":609 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":608 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatABGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":611 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":610 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBGRA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":613 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":612 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatL: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":615 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":614 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":617 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":616 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":619 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":618 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":621 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":620 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":623 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":622 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":625 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":624 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":627 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":626 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":629 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":628 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":631 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":630 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":633 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":632 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":635 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":634 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":637 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":636 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":639 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":638 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":641 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":640 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":643 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":642 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":645 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":644 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":647 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":646 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":649 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":648 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":651 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":650 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":653 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":652 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":655 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":654 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":657 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":656 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":659 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":658 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":661 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":660 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":663 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":662 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":665 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":664 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":667 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":666 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":669 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":668 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":671 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":670 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":673 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":672 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":675 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":674 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":677 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":676 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":679 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":678 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":681 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":680 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":683 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":682 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":685 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":684 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":687 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":686 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":689 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":688 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":691 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":690 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":693 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":692 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":695 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":694 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":697 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":696 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":699 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":698 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":701 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":700 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":703 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":702 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":705 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":704 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":707 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":706 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":709 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":708 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":711 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":710 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":713 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":712 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspRGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":715 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":714 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspBGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":717 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":716 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":719 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":718 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":721 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":720 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":723 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":722 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":725 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":724 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":727 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":726 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBCCR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":729 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":728 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRCCB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":731 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":730 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCRBC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":733 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":732 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCBRC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":735 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":734 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10CCCC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":737 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":736 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BCCR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":739 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":738 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RCCB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":741 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":740 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CRBC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":743 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":742 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CBRC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":745 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":744 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CCCC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":747 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":746 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":749 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":748 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":751 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":750 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":753 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":752 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":755 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":754 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":757 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":756 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":759 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":758 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":761 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":760 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":763 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":762 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":765 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":764 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":767 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":766 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":769 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":768 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":771 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":770 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":773 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":772 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":775 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":774 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":777 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":776 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":779 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":778 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":781 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":780 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":783 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":782 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":785 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":784 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":787 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":786 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":789 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":788 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":791 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":790 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":793 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":792 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":795 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":794 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":797 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":796 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":799 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":798 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":801 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":800 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":803 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":802 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":805 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":804 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":807 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER # <<<<<<<<<<<<<< + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":806 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":809 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidValue +*/ + (__pyx_v_cuEglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":808 + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + * elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: # <<<<<<<<<<<<<< + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":811 + * cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER + * else: + * return cudaErrorInvalidValue # <<<<<<<<<<<<<< + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY +*/ + __pyx_r = cudaErrorInvalidValue; + goto __pyx_L0; + break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":812 + * else: + * return cudaErrorInvalidValue + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: # <<<<<<<<<<<<<< + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + * elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: +*/ + switch (__pyx_v_eglFrame.frameType) { + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":813 + * return cudaErrorInvalidValue + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY # <<<<<<<<<<<<<< + * elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH +*/ + (__pyx_v_cuEglFrame[0]).frameType = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":812 + * else: + * return cudaErrorInvalidValue + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: # <<<<<<<<<<<<<< + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + * elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: +*/ + break; + case __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypePitch: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":815 + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + * elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidValue +*/ + (__pyx_v_cuEglFrame[0]).frameType = __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":814 + * if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + * elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: # <<<<<<<<<<<<<< + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":817 + * cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH + * else: + * return cudaErrorInvalidValue # <<<<<<<<<<<<<< + * + * @cython.show_performance_hints(False) +*/ + __pyx_r = cudaErrorInvalidValue; + goto __pyx_L0; + break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":567 + * return cudaSuccess + * + * cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * cdef cudaError_t err = cudaSuccess + * cdef unsigned int i = 0 +*/ + + /* function exit code */ + __pyx_r = (enum cudaError) 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime.getDriverEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":819 + * return cudaErrorInvalidValue + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaError_t getRuntimeEglFrame(cyruntime.cudaEglFrame *eglFrame, cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getRuntimeEglFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *__pyx_v_eglFrame, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_cueglFrame) { + cudaError_t __pyx_v_err; + unsigned int __pyx_v_i; + CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_v_ad; + struct cudaPitchedPtr __pyx_v_pPtr; + cudaError_t __pyx_r; + unsigned int __pyx_t_1; + unsigned int __pyx_t_2; + unsigned int __pyx_t_3; + unsigned int __pyx_t_4; + CUarray_format __pyx_t_5; + cudaError_t __pyx_t_6; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":821 + * @cython.show_performance_hints(False) + * cdef cudaError_t getRuntimeEglFrame(cyruntime.cudaEglFrame *eglFrame, cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * cdef unsigned int i + * cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2 ad +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":825 + * cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2 ad + * cdef cudaPitchedPtr pPtr + * memset(eglFrame, 0, sizeof(eglFrame[0])) # <<<<<<<<<<<<<< + * memset(&ad, 0, sizeof(ad)) + * for i in range(cueglFrame.planeCount): +*/ + (void)(memset(__pyx_v_eglFrame, 0, (sizeof((__pyx_v_eglFrame[0]))))); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":826 + * cdef cudaPitchedPtr pPtr + * memset(eglFrame, 0, sizeof(eglFrame[0])) + * memset(&ad, 0, sizeof(ad)) # <<<<<<<<<<<<<< + * for i in range(cueglFrame.planeCount): + * ad.Depth = cueglFrame.depth +*/ + (void)(memset((&__pyx_v_ad), 0, (sizeof(__pyx_v_ad)))); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":827 + * memset(eglFrame, 0, sizeof(eglFrame[0])) + * memset(&ad, 0, sizeof(ad)) + * for i in range(cueglFrame.planeCount): # <<<<<<<<<<<<<< + * ad.Depth = cueglFrame.depth + * ad.Flags = 0 +*/ + __pyx_t_1 = __pyx_v_cueglFrame.planeCount; + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":828 + * memset(&ad, 0, sizeof(ad)) + * for i in range(cueglFrame.planeCount): + * ad.Depth = cueglFrame.depth # <<<<<<<<<<<<<< + * ad.Flags = 0 + * ad.Format = cueglFrame.cuFormat +*/ + __pyx_t_4 = __pyx_v_cueglFrame.depth; + __pyx_v_ad.Depth = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":829 + * for i in range(cueglFrame.planeCount): + * ad.Depth = cueglFrame.depth + * ad.Flags = 0 # <<<<<<<<<<<<<< + * ad.Format = cueglFrame.cuFormat + * ad.Height = cueglFrame.height +*/ + __pyx_v_ad.Flags = 0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":830 + * ad.Depth = cueglFrame.depth + * ad.Flags = 0 + * ad.Format = cueglFrame.cuFormat # <<<<<<<<<<<<<< + * ad.Height = cueglFrame.height + * ad.NumChannels = cueglFrame.numChannels +*/ + __pyx_t_5 = __pyx_v_cueglFrame.cuFormat; + __pyx_v_ad.Format = __pyx_t_5; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":831 + * ad.Flags = 0 + * ad.Format = cueglFrame.cuFormat + * ad.Height = cueglFrame.height # <<<<<<<<<<<<<< + * ad.NumChannels = cueglFrame.numChannels + * ad.Width = cueglFrame.width +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + __pyx_v_ad.Height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":832 + * ad.Format = cueglFrame.cuFormat + * ad.Height = cueglFrame.height + * ad.NumChannels = cueglFrame.numChannels # <<<<<<<<<<<<<< + * ad.Width = cueglFrame.width + * +*/ + __pyx_t_4 = __pyx_v_cueglFrame.numChannels; + __pyx_v_ad.NumChannels = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":833 + * ad.Height = cueglFrame.height + * ad.NumChannels = cueglFrame.numChannels + * ad.Width = cueglFrame.width # <<<<<<<<<<<<<< + * + * err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) +*/ + __pyx_t_4 = __pyx_v_cueglFrame.width; + __pyx_v_ad.Width = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":835 + * ad.Width = cueglFrame.width + * + * err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) # <<<<<<<<<<<<<< + * if err != cudaSuccess: + * return err +*/ + __pyx_t_6 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getChannelFormatDescFromDriverDesc((&((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).channelDesc), NULL, NULL, NULL, (&__pyx_v_ad)); if (unlikely(__pyx_t_6 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(1, 835, __pyx_L1_error) + __pyx_v_err = __pyx_t_6; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":836 + * + * err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * +*/ + __pyx_t_7 = (__pyx_v_err != cudaSuccess); + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":837 + * err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) + * if err != cudaSuccess: + * return err # <<<<<<<<<<<<<< + * + * eglFrame[0].planeDesc[i].depth = cueglFrame.depth +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":836 + * + * err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) + * if err != cudaSuccess: # <<<<<<<<<<<<<< + * return err + * +*/ + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":839 + * return err + * + * eglFrame[0].planeDesc[i].depth = cueglFrame.depth # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + * if i == 0: +*/ + __pyx_t_4 = __pyx_v_cueglFrame.depth; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).depth = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":840 + * + * eglFrame[0].planeDesc[i].depth = cueglFrame.depth + * eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels # <<<<<<<<<<<<<< + * if i == 0: + * eglFrame[0].planeDesc[i].width = cueglFrame.width +*/ + __pyx_t_4 = __pyx_v_cueglFrame.numChannels; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).numChannels = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":841 + * eglFrame[0].planeDesc[i].depth = cueglFrame.depth + * eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + * if i == 0: # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].height = cueglFrame.height +*/ + __pyx_t_7 = (__pyx_v_i == 0); + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":842 + * eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + * if i == 0: + * eglFrame[0].planeDesc[i].width = cueglFrame.width # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch +*/ + __pyx_t_4 = __pyx_v_cueglFrame.width; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":843 + * if i == 0: + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].height = cueglFrame.height # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":844 + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or +*/ + __pyx_t_4 = __pyx_v_cueglFrame.pitch; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":841 + * eglFrame[0].planeDesc[i].depth = cueglFrame.depth + * eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + * if i == 0: # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].height = cueglFrame.height +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":845 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":846 + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":847 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":848 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":849 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":850 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":851 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":845 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":853 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":854 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = ((unsigned int)(((double)__pyx_v_cueglFrame.height) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":855 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":845 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":856 + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":857 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":858 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":859 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":860 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":861 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":862 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":863 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":864 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":865 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":866 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":867 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":868 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":869 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":870 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":856 + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":872 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":873 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = ((unsigned int)(((double)__pyx_v_cueglFrame.height) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":874 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":875 + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 # <<<<<<<<<<<<<< + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":876 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":877 + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":878 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":879 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":880 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":881 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":882 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":884 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":876 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or +*/ + break; + default: break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":856 + * eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":885 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":886 + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":887 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":885 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":889 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":890 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":891 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":885 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":892 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":893 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":894 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":895 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":896 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":897 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":892 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":899 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = ((unsigned int)(((double)__pyx_v_cueglFrame.width) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":900 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = cueglFrame.height # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":901 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = ((unsigned int)(((double)__pyx_v_cueglFrame.pitch) / 2.0)); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":902 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 # <<<<<<<<<<<<<< + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":903 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":904 + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":906 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":903 + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): +*/ + break; + default: break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":892 + * eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + * eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":907 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":908 + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":909 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":907 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":911 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":912 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = cueglFrame.width # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or +*/ + __pyx_t_4 = __pyx_v_cueglFrame.width; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":913 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch # <<<<<<<<<<<<<< + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or +*/ + __pyx_t_4 = __pyx_v_cueglFrame.pitch; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":907 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":914 + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":915 + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":916 + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":917 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":918 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":919 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":920 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":921 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":922 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":914 + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or +*/ + __pyx_t_7 = 1; + break; + default: + __pyx_t_7 = 0; + break; + } + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":924 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch +*/ + __pyx_t_4 = __pyx_v_cueglFrame.height; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":925 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = cueglFrame.width # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * eglFrame[0].planeDesc[1].channelDesc.y = 8 +*/ + __pyx_t_4 = __pyx_v_cueglFrame.width; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":926 + * eglFrame[0].planeDesc[i].height = cueglFrame.height + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or +*/ + __pyx_t_4 = __pyx_v_cueglFrame.pitch; + ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch = __pyx_t_4; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":927 + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * eglFrame[0].planeDesc[1].channelDesc.y = 8 # <<<<<<<<<<<<<< + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 8; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":928 + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":929 + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":930 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":931 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":932 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 +*/ + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":934 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 # <<<<<<<<<<<<<< + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + * eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] +*/ + ((__pyx_v_eglFrame[0]).planeDesc[1]).channelDesc.y = 16; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":928 + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * eglFrame[0].planeDesc[1].channelDesc.y = 8 + * if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or +*/ + break; + default: break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":914 + * eglFrame[0].planeDesc[i].width = cueglFrame.width + * eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + * elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or # <<<<<<<<<<<<<< + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or +*/ + } + __pyx_L6:; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":935 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: # <<<<<<<<<<<<<< + * eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] + * else: +*/ + __pyx_t_7 = (__pyx_v_cueglFrame.frameType == __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY); + if (__pyx_t_7) { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":936 + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + * eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] # <<<<<<<<<<<<<< + * else: + * pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, +*/ + ((__pyx_v_eglFrame[0]).frame.pArray[__pyx_v_i]) = ((cudaArray_t)(__pyx_v_cueglFrame.frame.pArray[__pyx_v_i])); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":935 + * cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + * eglFrame[0].planeDesc[1].channelDesc.y = 16 + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: # <<<<<<<<<<<<<< + * eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] + * else: +*/ + goto __pyx_L7; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":938 + * eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] + * else: + * pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, # <<<<<<<<<<<<<< + * eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height) + * eglFrame[0].frame.pPitch[i] = pPtr +*/ + /*else*/ { + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":939 + * else: + * pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, + * eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height) # <<<<<<<<<<<<<< + * eglFrame[0].frame.pPitch[i] = pPtr + * +*/ + __pyx_v_pPtr = make_cudaPitchedPtr((__pyx_v_cueglFrame.frame.pPitch[__pyx_v_i]), ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).pitch, ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).width, ((__pyx_v_eglFrame[0]).planeDesc[__pyx_v_i]).height); + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":940 + * pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, + * eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height) + * eglFrame[0].frame.pPitch[i] = pPtr # <<<<<<<<<<<<<< + * + * eglFrame[0].planeCount = cueglFrame.planeCount +*/ + ((__pyx_v_eglFrame[0]).frame.pPitch[__pyx_v_i]) = __pyx_v_pPtr; + } + __pyx_L7:; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":942 + * eglFrame[0].frame.pPitch[i] = pPtr + * + * eglFrame[0].planeCount = cueglFrame.planeCount # <<<<<<<<<<<<<< + * if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar +*/ + __pyx_t_1 = __pyx_v_cueglFrame.planeCount; + (__pyx_v_eglFrame[0]).planeCount = __pyx_t_1; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":943 + * + * eglFrame[0].planeCount = cueglFrame.planeCount + * if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: +*/ + switch (__pyx_v_cueglFrame.eglColorFormat) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":944 + * eglFrame[0].planeCount = cueglFrame.planeCount + * if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":943 + * + * eglFrame[0].planeCount = cueglFrame.planeCount + * if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":946 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":945 + * if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":948 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":947 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":950 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":949 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":952 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":951 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":954 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":953 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":956 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV422; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":955 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":958 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY422; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":957 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":960 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":959 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":962 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":961 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":964 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":963 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":966 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatARGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":965 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":968 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRGBA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":967 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":970 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatABGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":969 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":972 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBGRA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":971 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":974 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatL; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":973 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":976 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":975 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":978 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":977 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":980 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":979 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":982 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":981 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":984 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":983 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":986 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":985 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":988 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":987 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":990 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":989 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":992 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":991 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":994 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":993 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":996 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":995 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":998 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":997 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1000 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":999 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1002 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1001 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1004 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1003 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1006 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1005 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1008 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1007 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1010 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1009 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1012 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1011 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1014 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1013 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1016 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1015 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1018 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1017 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1020 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1019 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1022 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1021 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1024 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1023 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1026 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1025 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1028 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1027 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1030 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1029 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1032 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1031 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1034 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1033 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1036 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1035 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1038 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1037 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1040 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1039 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1042 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1041 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1044 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1043 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1046 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1045 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1048 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1047 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1050 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1049 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1052 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1051 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1054 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1053 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1056 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1055 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1058 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1057 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1060 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1059 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1062 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1061 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1064 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1063 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1066 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20RGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1065 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1068 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20BGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1067 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1070 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1069 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1072 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1071 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1074 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspRGGB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1073 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1076 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspBGGR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1075 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1078 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGRBG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1077 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1080 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGBRG; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1079 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1082 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1081 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1084 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1083 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1086 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1085 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1088 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBCCR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1087 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1090 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRCCB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1089 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1092 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCRBC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1091 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1094 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCBRC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1093 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1096 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10CCCC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1095 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1098 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BCCR; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1097 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1100 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RCCB; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1099 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1102 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CRBC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1101 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1104 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CBRC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1103 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1106 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CCCC; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1105 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1108 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1107 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1110 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1109 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1112 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1111 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1114 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1113 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1116 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1115 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1118 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1117 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1120 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1119 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1122 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1121 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1124 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1123 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1126 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1125 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1128 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1127 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1130 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_2020; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1129 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1132 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1131 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1134 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_709; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1133 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1136 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1135 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1138 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1137 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1140 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1139 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1142 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1141 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1144 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1143 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1146 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1145 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1148 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1147 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1150 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1149 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1152 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1151 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1154 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1153 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1156 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1155 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1158 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1157 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1160 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1159 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1162 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1161 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1164 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1163 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1166 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER # <<<<<<<<<<<<<< + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1165 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1168 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidValue +*/ + (__pyx_v_eglFrame[0]).eglColorFormat = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1167 + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + * elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: # <<<<<<<<<<<<<< + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1170 + * eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + * else: + * return cudaErrorInvalidValue # <<<<<<<<<<<<<< + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray +*/ + __pyx_r = cudaErrorInvalidValue; + goto __pyx_L0; + break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1171 + * else: + * return cudaErrorInvalidValue + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: # <<<<<<<<<<<<<< + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray + * elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: +*/ + switch (__pyx_v_cueglFrame.frameType) { + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1172 + * return cudaErrorInvalidValue + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray # <<<<<<<<<<<<<< + * elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypePitch +*/ + (__pyx_v_eglFrame[0]).frameType = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1171 + * else: + * return cudaErrorInvalidValue + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: # <<<<<<<<<<<<<< + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray + * elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: +*/ + break; + case __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1174 + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray + * elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypePitch # <<<<<<<<<<<<<< + * else: + * return cudaErrorInvalidValue +*/ + (__pyx_v_eglFrame[0]).frameType = __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypePitch; + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1173 + * if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray + * elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: # <<<<<<<<<<<<<< + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypePitch + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":1176 + * eglFrame[0].frameType = cyruntime.cudaEglFrameTypePitch + * else: + * return cudaErrorInvalidValue # <<<<<<<<<<<<<< +*/ + __pyx_r = cudaErrorInvalidValue; + goto __pyx_L0; + break; + } + + /* "cuda/bindings/_lib/cyruntime/cyruntime.pxi":819 + * return cudaErrorInvalidValue + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaError_t getRuntimeEglFrame(cyruntime.cudaEglFrame *eglFrame, cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + * cdef cudaError_t err = cudaSuccess +*/ + + /* function exit code */ + __pyx_r = (enum cudaError) 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._bindings.cyruntime.getRuntimeEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_cudaEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerPresentFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerReturnFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaVDPAUSetVDPAUDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUSetVDPAUDevice, "cudaError_t (int, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUGetDevice, "cudaError_t (int *, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterVideoSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterOutputSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGLGetDevices", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGLGetDevices, "cudaError_t (unsigned int *, int *, unsigned int, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterImage, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, __pyx_t_4cuda_8bindings_9cyruntime_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterBuffer, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsEGLRegisterImage, "cudaError_t (cudaGraphicsResource_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnectWithFlags, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerAcquireFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t *, cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerReleaseFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, __pyx_t_4cuda_8bindings_9cyruntime_EGLint, __pyx_t_4cuda_8bindings_9cyruntime_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateFromEGLSync, "cudaError_t (cudaEvent_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("getDriverEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getDriverEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("getRuntimeEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime_getRuntimeEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceReset", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceReset, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSynchronize, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetLimit, "cudaError_t (enum cudaLimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetLimit, "cudaError_t (size_t *, enum cudaLimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetTexture1DLinearMaxWidth, "cudaError_t (size_t *, struct cudaChannelFormatDesc const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetCacheConfig, "cudaError_t (enum cudaFuncCache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetStreamPriorityRange, "cudaError_t (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetCacheConfig, "cudaError_t (enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetByPCIBusId, "cudaError_t (int *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetPCIBusId, "cudaError_t (char *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetEventHandle, "cudaError_t (cudaIpcEventHandle_t *, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenEventHandle, "cudaError_t (cudaEvent_t *, cudaIpcEventHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetMemHandle, "cudaError_t (cudaIpcMemHandle_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenMemHandle, "cudaError_t (void **, cudaIpcMemHandle_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcCloseMemHandle, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceFlushGPUDirectRDMAWrites, "cudaError_t (enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceRegisterAsyncNotification, "cudaError_t (int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceUnregisterAsyncNotification, "cudaError_t (int, cudaAsyncCallbackHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaPeekAtLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPeekAtLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetErrorName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorName, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorString, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceCount, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceProperties_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceProperties_v2, "cudaError_t (struct cudaDeviceProp *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetAttribute, "cudaError_t (int *, enum cudaDeviceAttr, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetDefaultMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetMemPool, "cudaError_t (int, cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetNvSciSyncAttributes, "cudaError_t (void *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetP2PAttribute, "cudaError_t (int *, enum cudaDeviceP2PAttr, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaChooseDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaChooseDevice, "cudaError_t (int *, struct cudaDeviceProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaInitDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaInitDevice, "cudaError_t (int, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDevice, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDevice, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDeviceFlags, "cudaError_t (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceFlags, "cudaError_t (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreate, "cudaError_t (cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithFlags, "cudaError_t (cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithPriority, "cudaError_t (cudaStream_t *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetPriority, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetFlags, "cudaError_t (cudaStream_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetId, "cudaError_t (cudaStream_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetDevice, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCtxResetPersistingL2Cache, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCopyAttributes, "cudaError_t (cudaStream_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamDestroy, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamWaitEvent, "cudaError_t (cudaStream_t, cudaEvent_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamAddCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAddCallback, "cudaError_t (cudaStream_t, cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSynchronize, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamQuery, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAttachMemAsync, "cudaError_t (cudaStream_t, void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCapture, "cudaError_t (cudaStream_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCaptureToGraph, "cudaError_t (cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaThreadExchangeStreamCaptureMode, "cudaError_t (enum cudaStreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamEndCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamEndCapture, "cudaError_t (cudaStream_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamIsCapturing, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetCaptureInfo_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v2, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v3, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies, "cudaError_t (cudaStream_t, cudaGraphNode_t *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies_v2, "cudaError_t (cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreate, "cudaError_t (cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateWithFlags, "cudaError_t (cudaEvent_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventRecord", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecord, "cudaError_t (cudaEvent_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecordWithFlags, "cudaError_t (cudaEvent_t, cudaStream_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventQuery, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventSynchronize, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventDestroy, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventElapsedTime", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventElapsedTime_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime_v2, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaImportExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalMemory, "cudaError_t (cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedBuffer, "cudaError_t (void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalMemory, "cudaError_t (cudaExternalMemory_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSignalExternalSemaphoresAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSignalExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaWaitExternalSemaphoresAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaWaitExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetCacheConfig, "cudaError_t (void const *, enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncGetAttributes, "cudaError_t (struct cudaFuncAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetAttribute, "cudaError_t (void const *, enum cudaFuncAttribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLaunchHostFunc, "cudaError_t (cudaStream_t, cudaHostFn_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetSharedMemConfig, "cudaError_t (void const *, enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessor, "cudaError_t (int *, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyAvailableDynamicSMemPerBlock, "cudaError_t (size_t *, void const *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "cudaError_t (int *, void const *, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocManaged, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocHost", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocHost, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocPitch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocPitch, "cudaError_t (void **, size_t *, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFree", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFree, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeHost", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeHost, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeArray, "cudaError_t (cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeMipmappedArray, "cudaError_t (cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostAlloc, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostRegister, "cudaError_t (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostUnregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostUnregister, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetDevicePointer, "cudaError_t (void **, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetFlags, "cudaError_t (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3D, "cudaError_t (struct cudaPitchedPtr *, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc3DArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3DArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetMipmappedArrayLevel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetMipmappedArrayLevel, "cudaError_t (cudaArray_t *, cudaMipmappedArray_const_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3D, "cudaError_t (struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeer, "cudaError_t (struct cudaMemcpy3DPeerParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DAsync, "cudaError_t (struct cudaMemcpy3DParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeerAsync, "cudaError_t (struct cudaMemcpy3DPeerParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemGetInfo, "cudaError_t (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetInfo, "cudaError_t (struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetPlane", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetPlane, "cudaError_t (cudaArray_t *, cudaArray_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeer, "cudaError_t (void *, int, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2D, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArray, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyAsync, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeerAsync, "cudaError_t (void *, int, void const *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyBatchAsync, "cudaError_t (void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DBatchAsync, "cudaError_t (size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DAsync, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArrayAsync, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset, "cudaError_t (void *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset2D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2D, "cudaError_t (void *, size_t, int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3D, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemsetAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemsetAsync, "cudaError_t (void *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2DAsync, "cudaError_t (void *, size_t, int, size_t, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3DAsync, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync, "cudaError_t (void const *, size_t, int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync_v2, "cudaError_t (void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemAdvise", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise_v2, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttribute, "cudaError_t (void *, size_t, enum cudaMemRangeAttribute, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttributes, "cudaError_t (void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArray, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArrayAsync, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocAsync, "cudaError_t (void **, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeAsync, "cudaError_t (void *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolTrimTo, "cudaError_t (cudaMemPool_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAccess, "cudaError_t (cudaMemPool_t, struct cudaMemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAccess, "cudaError_t (enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolCreate, "cudaError_t (cudaMemPool_t *, struct cudaMemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolDestroy, "cudaError_t (cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocFromPoolAsync, "cudaError_t (void **, size_t, cudaMemPool_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportToShareableHandle, "cudaError_t (void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportFromShareableHandle, "cudaError_t (cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportPointer, "cudaError_t (struct cudaMemPoolPtrExportData *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportPointer, "cudaError_t (void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPointerGetAttributes, "cudaError_t (struct cudaPointerAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceCanAccessPeer, "cudaError_t (int *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceEnablePeerAccess, "cudaError_t (int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceDisablePeerAccess, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnregisterResource, "cudaError_t (cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceSetMapFlags, "cudaError_t (cudaGraphicsResource_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsMapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnmapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedPointer, "cudaError_t (void **, size_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsSubResourceGetMappedArray, "cudaError_t (cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetChannelDesc, "cudaError_t (struct cudaChannelFormatDesc *, cudaArray_const_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateChannelDesc, "struct cudaChannelFormatDesc (int, int, int, int, enum cudaChannelFormatKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateTextureObject, "cudaError_t (cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyTextureObject, "cudaError_t (cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectTextureDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectTextureDesc, "cudaError_t (struct cudaTextureDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectResourceViewDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceViewDesc, "cudaError_t (struct cudaResourceViewDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateSurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateSurfaceObject, "cudaError_t (cudaSurfaceObject_t *, struct cudaResourceDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroySurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroySurfaceObject, "cudaError_t (cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetSurfaceObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetSurfaceObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDriverGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDriverGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaRuntimeGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaRuntimeGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphCreate, "cudaError_t (cudaGraph_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddKernelNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeCopyAttributes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemcpyNode1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode1D, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams1D, "cudaError_t (cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemsetNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddHostNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddChildGraphNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphChildGraphNodeGetGraph, "cudaError_t (cudaGraphNode_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEmptyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventRecordNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresSignalNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemAllocNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemAllocNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemFreeNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemFreeNodeGetParams, "cudaError_t (cudaGraphNode_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGraphMemTrim, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphClone, "cudaError_t (cudaGraph_t *, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeFindInClone, "cudaError_t (cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetType, "cudaError_t (cudaGraphNode_t, enum cudaGraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetRootNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetEdges", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroyNode, "cudaError_t (cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiate, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithFlags, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithParams, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecGetFlags, "cudaError_t (cudaGraphExec_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecKernelNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams1D, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemsetNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecHostNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecChildGraphNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventRecordNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventWaitNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecUpdate, "cudaError_t (cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphUpload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphUpload, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphLaunch, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecDestroy, "cudaError_t (cudaGraphExec_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroy, "cudaError_t (cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDebugDotPrint, "cudaError_t (cudaGraph_t, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectCreate, "cudaError_t (cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectRetain", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRetain, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectRelease", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRelease, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRetainUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphReleaseUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode_v2, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphConditionalHandleCreate, "cudaError_t (cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDriverEntryPoint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPoint, "cudaError_t (char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDriverEntryPointByVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPointByVersion, "cudaError_t (char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadData, "cudaError_t (cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadFromFile, "cudaError_t (cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryUnload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryUnload, "cudaError_t (cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernel, "cudaError_t (cudaKernel_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetGlobal, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetManaged, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetUnifiedFunction, "cudaError_t (void **, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernelCount, "cudaError_t (unsigned int *, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryEnumerateKernels, "cudaError_t (cudaKernel_t *, unsigned int, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaKernelSetAttributeForDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaKernelSetAttributeForDevice, "cudaError_t (cudaKernel_t, enum cudaFuncAttribute, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetExportTable", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetExportTable, "cudaError_t (void const **, cudaUUID_t const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetKernel, "cudaError_t (cudaKernel_t *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaPitchedPtr", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPitchedPtr, "struct cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaPos", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPos, "struct cudaPos (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaExtent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaExtent, "struct cudaExtent (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaProfilerStart", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStart, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaProfilerStop", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStop, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._bindings.cydriver"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsEGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerConnectWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerAcquireFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerReleaseFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerPresentFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerReturnFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsResourceGetMappedEglFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventCreateFromEGLSync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsGLRegisterBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGLGetDevices_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuVDPAUGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsVDPAURegisterVideoSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsVDPAURegisterOutputSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._bindings.cyruntime_ptds"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceReset", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceReset, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSynchronize, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetLimit, "cudaError_t (enum cudaLimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetLimit, "cudaError_t (size_t *, enum cudaLimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetTexture1DLinearMaxWidth", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetTexture1DLinearMaxWidth, "cudaError_t (size_t *, struct cudaChannelFormatDesc const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetCacheConfig, "cudaError_t (enum cudaFuncCache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetStreamPriorityRange", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetStreamPriorityRange, "cudaError_t (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetCacheConfig, "cudaError_t (enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetByPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetByPCIBusId, "cudaError_t (int *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetPCIBusId, "cudaError_t (char *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcGetEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetEventHandle, "cudaError_t (cudaIpcEventHandle_t *, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcOpenEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenEventHandle, "cudaError_t (cudaEvent_t *, cudaIpcEventHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcGetMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetMemHandle, "cudaError_t (cudaIpcMemHandle_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcOpenMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenMemHandle, "cudaError_t (void **, cudaIpcMemHandle_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcCloseMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcCloseMemHandle, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceFlushGPUDirectRDMAWrites", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceFlushGPUDirectRDMAWrites, "cudaError_t (enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceRegisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceRegisterAsyncNotification, "cudaError_t (int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceUnregisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceUnregisterAsyncNotification, "cudaError_t (int, cudaAsyncCallbackHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetLastError", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaPeekAtLastError", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPeekAtLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetErrorName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorName, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorString, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceCount, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceProperties_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceProperties_v2, "cudaError_t (struct cudaDeviceProp *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetAttribute, "cudaError_t (int *, enum cudaDeviceAttr, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetDefaultMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetDefaultMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetMemPool, "cudaError_t (int, cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetNvSciSyncAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetNvSciSyncAttributes, "cudaError_t (void *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetP2PAttribute, "cudaError_t (int *, enum cudaDeviceP2PAttr, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaChooseDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaChooseDevice, "cudaError_t (int *, struct cudaDeviceProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaInitDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaInitDevice, "cudaError_t (int, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDevice, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDevice, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSetDeviceFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDeviceFlags, "cudaError_t (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceFlags, "cudaError_t (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreate, "cudaError_t (cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithFlags, "cudaError_t (cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreateWithPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithPriority, "cudaError_t (cudaStream_t *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetPriority, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetFlags, "cudaError_t (cudaStream_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetId, "cudaError_t (cudaStream_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetDevice, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCtxResetPersistingL2Cache", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCtxResetPersistingL2Cache, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCopyAttributes, "cudaError_t (cudaStream_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamDestroy, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamWaitEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamWaitEvent, "cudaError_t (cudaStream_t, cudaEvent_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAddCallback, "cudaError_t (cudaStream_t, cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSynchronize, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamQuery, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamAttachMemAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAttachMemAsync, "cudaError_t (cudaStream_t, void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamBeginCapture", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCapture, "cudaError_t (cudaStream_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamBeginCaptureToGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCaptureToGraph, "cudaError_t (cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaThreadExchangeStreamCaptureMode, "cudaError_t (enum cudaStreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamEndCapture, "cudaError_t (cudaStream_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamIsCapturing", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamIsCapturing, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v2, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetCaptureInfo_v3", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v3, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamUpdateCaptureDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies, "cudaError_t (cudaStream_t, cudaGraphNode_t *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamUpdateCaptureDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies_v2, "cudaError_t (cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreate, "cudaError_t (cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventCreateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreateWithFlags, "cudaError_t (cudaEvent_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventRecord", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecord, "cudaError_t (cudaEvent_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventRecordWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecordWithFlags, "cudaError_t (cudaEvent_t, cudaStream_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventQuery, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventSynchronize, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventDestroy, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventElapsedTime_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime_v2, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaImportExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalMemory, "cudaError_t (cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaExternalMemoryGetMappedBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedBuffer, "cudaError_t (void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaExternalMemoryGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalMemory, "cudaError_t (cudaExternalMemory_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaImportExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSignalExternalSemaphoresAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSignalExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaWaitExternalSemaphoresAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaWaitExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetCacheConfig, "cudaError_t (void const *, enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncGetAttributes, "cudaError_t (struct cudaFuncAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetAttribute, "cudaError_t (void const *, enum cudaFuncAttribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLaunchHostFunc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLaunchHostFunc, "cudaError_t (cudaStream_t, cudaHostFn_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetSharedMemConfig, "cudaError_t (void const *, enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyMaxActiveBlocksPerMultiprocessor", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessor, "cudaError_t (int *, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyAvailableDynamicSMemPerBlock", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyAvailableDynamicSMemPerBlock, "cudaError_t (size_t *, void const *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "cudaError_t (int *, void const *, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocManaged, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocHost", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocHost, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocPitch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocPitch, "cudaError_t (void **, size_t *, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFree", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFree, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeHost", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeHost, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeArray, "cudaError_t (cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeMipmappedArray, "cudaError_t (cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostAlloc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostAlloc, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostRegister, "cudaError_t (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostUnregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostUnregister, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostGetDevicePointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetDevicePointer, "cudaError_t (void **, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetFlags, "cudaError_t (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3D, "cudaError_t (struct cudaPitchedPtr *, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc3DArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3DArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetMipmappedArrayLevel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetMipmappedArrayLevel, "cudaError_t (cudaArray_t *, cudaMipmappedArray_const_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3D, "cudaError_t (struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeer, "cudaError_t (struct cudaMemcpy3DPeerParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DAsync, "cudaError_t (struct cudaMemcpy3DParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeerAsync, "cudaError_t (struct cudaMemcpy3DPeerParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemGetInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemGetInfo, "cudaError_t (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetInfo, "cudaError_t (struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetPlane", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetPlane, "cudaError_t (cudaArray_t *, cudaArray_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMipmappedArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMipmappedArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeer, "cudaError_t (void *, int, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2D, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DFromArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArray, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DArrayToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyAsync, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeerAsync, "cudaError_t (void *, int, void const *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyBatchAsync, "cudaError_t (void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DBatchAsync, "cudaError_t (size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DAsync, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DToArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DFromArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArrayAsync, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset, "cudaError_t (void *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset2D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2D, "cudaError_t (void *, size_t, int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3D, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemsetAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemsetAsync, "cudaError_t (void *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset2DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2DAsync, "cudaError_t (void *, size_t, int, size_t, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset3DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3DAsync, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPrefetchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync, "cudaError_t (void const *, size_t, int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPrefetchAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync_v2, "cudaError_t (void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemAdvise", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemAdvise_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise_v2, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemRangeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttribute, "cudaError_t (void *, size_t, enum cudaMemRangeAttribute, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemRangeGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttributes, "cudaError_t (void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyFromArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArray, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyArrayToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyToArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyFromArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArrayAsync, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocAsync, "cudaError_t (void **, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeAsync, "cudaError_t (void *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolTrimTo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolTrimTo, "cudaError_t (cudaMemPool_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolSetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAccess, "cudaError_t (cudaMemPool_t, struct cudaMemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolGetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAccess, "cudaError_t (enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolCreate, "cudaError_t (cudaMemPool_t *, struct cudaMemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolDestroy, "cudaError_t (cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocFromPoolAsync, "cudaError_t (void **, size_t, cudaMemPool_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportToShareableHandle, "cudaError_t (void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportFromShareableHandle, "cudaError_t (cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolExportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportPointer, "cudaError_t (struct cudaMemPoolPtrExportData *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolImportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportPointer, "cudaError_t (void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaPointerGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPointerGetAttributes, "cudaError_t (struct cudaPointerAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceCanAccessPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceCanAccessPeer, "cudaError_t (int *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceEnablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceEnablePeerAccess, "cudaError_t (int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceDisablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceDisablePeerAccess, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsUnregisterResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnregisterResource, "cudaError_t (cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceSetMapFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceSetMapFlags, "cudaError_t (cudaGraphicsResource_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsMapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsUnmapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnmapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceGetMappedPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedPointer, "cudaError_t (void **, size_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsSubResourceGetMappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsSubResourceGetMappedArray, "cudaError_t (cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetChannelDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetChannelDesc, "cudaError_t (struct cudaChannelFormatDesc *, cudaArray_const_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateChannelDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateChannelDesc, "struct cudaChannelFormatDesc (int, int, int, int, enum cudaChannelFormatKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateTextureObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateTextureObject, "cudaError_t (cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyTextureObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyTextureObject, "cudaError_t (cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectTextureDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectTextureDesc, "cudaError_t (struct cudaTextureDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectResourceViewDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceViewDesc, "cudaError_t (struct cudaResourceViewDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateSurfaceObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateSurfaceObject, "cudaError_t (cudaSurfaceObject_t *, struct cudaResourceDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroySurfaceObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroySurfaceObject, "cudaError_t (cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetSurfaceObjectResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetSurfaceObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDriverGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDriverGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaRuntimeGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaRuntimeGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphCreate, "cudaError_t (cudaGraph_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddKernelNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddKernelNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeCopyAttributes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemcpyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemcpyNode1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode1D, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeSetParams1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams1D, "cudaError_t (cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemsetNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemsetNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemsetNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddHostNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddHostNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphHostNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddChildGraphNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddChildGraphNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphChildGraphNodeGetGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphChildGraphNodeGetGraph, "cudaError_t (cudaGraphNode_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEmptyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEmptyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEventRecordNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventRecordNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventRecordNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEventWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventWaitNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddExternalSemaphoresSignalNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresSignalNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresSignalNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddExternalSemaphoresWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresWaitNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemAllocNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemAllocNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemAllocNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemAllocNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemFreeNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemFreeNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemFreeNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemFreeNodeGetParams, "cudaError_t (cudaGraphNode_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGraphMemTrim", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGraphMemTrim, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphClone, "cudaError_t (cudaGraph_t *, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeFindInClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeFindInClone, "cudaError_t (cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetType", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetType, "cudaError_t (cudaGraphNode_t, enum cudaGraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetRootNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetRootNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetEdges", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetEdges_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependentNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependentNodes_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRemoveDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRemoveDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDestroyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroyNode, "cudaError_t (cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiate, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithFlags, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiateWithParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithParams, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecGetFlags, "cudaError_t (cudaGraphExec_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecKernelNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemcpyNodeSetParams1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams1D, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemsetNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecHostNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecChildGraphNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventRecordNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventWaitNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeSetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecUpdate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecUpdate, "cudaError_t (cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphUpload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphUpload, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphLaunch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphLaunch, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecDestroy, "cudaError_t (cudaGraphExec_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroy, "cudaError_t (cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDebugDotPrint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDebugDotPrint, "cudaError_t (cudaGraph_t, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectCreate, "cudaError_t (cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectRetain", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRetain, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectRelease", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRelease, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRetainUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRetainUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphReleaseUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphReleaseUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddNode_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode_v2, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphConditionalHandleCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphConditionalHandleCreate, "cudaError_t (cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDriverEntryPoint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPoint, "cudaError_t (char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDriverEntryPointByVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPointByVersion, "cudaError_t (char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryLoadData", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadData, "cudaError_t (cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryLoadFromFile", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadFromFile, "cudaError_t (cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryUnload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryUnload, "cudaError_t (cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernel, "cudaError_t (cudaKernel_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetGlobal", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetGlobal, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetManaged, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetUnifiedFunction", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetUnifiedFunction, "cudaError_t (void **, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetKernelCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernelCount, "cudaError_t (unsigned int *, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryEnumerateKernels", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryEnumerateKernels, "cudaError_t (cudaKernel_t *, unsigned int, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaKernelSetAttributeForDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaKernelSetAttributeForDevice, "cudaError_t (cudaKernel_t, enum cudaFuncAttribute, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetExportTable", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetExportTable, "cudaError_t (void const **, cudaUUID_t const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetKernel, "cudaError_t (cudaKernel_t *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaPitchedPtr", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPitchedPtr, "struct cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaPos", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPos, "struct cudaPos (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaExtent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaExtent, "struct cudaExtent (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaProfilerStart", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStart, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaProfilerStop", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStop, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cyruntime(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cyruntime}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cyruntime", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cyruntime(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cyruntime(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cyruntime(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cyruntime' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cyruntime" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cyruntime", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___bindings__cyruntime) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._bindings.cyruntime")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._bindings.cyruntime", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/_bindings/cyruntime.pyx":7 + * include "../cyruntime_functions.pxi" + * + * import os # <<<<<<<<<<<<<< + * cimport cuda.bindings._bindings.cyruntime_ptds as ptds + * cimport cython +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":11 + * cimport cython + * + * cdef bint __cudaPythonInit = False # <<<<<<<<<<<<<< + * cdef bint __usePTDS = False + * cdef int _cudaPythonInit() except -1 nogil: +*/ + __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___cudaPythonInit = 0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":12 + * + * cdef bint __cudaPythonInit = False + * cdef bint __usePTDS = False # <<<<<<<<<<<<<< + * cdef int _cudaPythonInit() except -1 nogil: + * global __cudaPythonInit +*/ + __pyx_v_4cuda_8bindings_9_bindings_9cyruntime___usePTDS = 0; + + /* "cuda/bindings/_bindings/cyruntime.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._bindings.cyruntime", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._bindings.cyruntime"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 42 <= 65535 + const unsigned short n; +#elif 42 / 2 < INT_MAX + const unsigned int n; +#elif 42 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA, sizeof(__pyx_k_CUDA_PYTHON_CUDA_PER_THREAD_DEFA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_PYTHON_CUDA_PER_THREAD_DEFA */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_default, sizeof(__pyx_k_default), 0, 1, 1}, /* PyObject cname: __pyx_n_u_default */ + {__pyx_k_getenv, sizeof(__pyx_k_getenv), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getenv */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_os, sizeof(__pyx_k_os), 0, 1, 1}, /* PyObject cname: __pyx_n_u_os */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(1, 574, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyLong_As_unsigned_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + unsigned int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned int) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned int"); + return (unsigned int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..274b480485f81e5fb8925a6881f856de2f668316 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pxd @@ -0,0 +1,591 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +include "../cyruntime_types.pxi" + +include "../_lib/cyruntime/cyruntime.pxd" + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil + +cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil + +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil + +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil + +cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil + +cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil + +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pyx new file mode 100644 index 0000000000000000000000000000000000000000..e706c2640345f6b18222a0dbe2e860105e8ac1cb --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime.pyx @@ -0,0 +1,1782 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +include "../cyruntime_functions.pxi" + +import os +cimport cuda.bindings._bindings.cyruntime_ptds as ptds +cimport cython + +cdef bint __cudaPythonInit = False +cdef bint __usePTDS = False +cdef int _cudaPythonInit() except -1 nogil: + global __cudaPythonInit + global __usePTDS + + with gil: + __usePTDS = os.getenv('CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM', default=False) + __cudaPythonInit = True + return __usePTDS + +# Create a very small function to check whether we are init'ed, so the C +# compiler can inline it. +cdef inline int cudaPythonInit() except -1 nogil: + if __cudaPythonInit: + return __usePTDS + return _cudaPythonInit() + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceReset() + return cudaDeviceReset() + +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSynchronize() + return cudaDeviceSynchronize() + +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSetLimit(limit, value) + return cudaDeviceSetLimit(limit, value) + +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetLimit(pValue, limit) + return cudaDeviceGetLimit(pValue, limit) + +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetCacheConfig(pCacheConfig) + return cudaDeviceGetCacheConfig(pCacheConfig) + +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSetCacheConfig(cacheConfig) + return cudaDeviceSetCacheConfig(cacheConfig) + +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetByPCIBusId(device, pciBusId) + return cudaDeviceGetByPCIBusId(device, pciBusId) + +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetPCIBusId(pciBusId, length, device) + return cudaDeviceGetPCIBusId(pciBusId, length, device) + +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaIpcGetEventHandle(handle, event) + return cudaIpcGetEventHandle(handle, event) + +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaIpcOpenEventHandle(event, handle) + return cudaIpcOpenEventHandle(event, handle) + +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaIpcGetMemHandle(handle, devPtr) + return cudaIpcGetMemHandle(handle, devPtr) + +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaIpcOpenMemHandle(devPtr, handle, flags) + return cudaIpcOpenMemHandle(devPtr, handle, flags) + +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaIpcCloseMemHandle(devPtr) + return cudaIpcCloseMemHandle(devPtr) + +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceUnregisterAsyncNotification(device, callback) + return cudaDeviceUnregisterAsyncNotification(device, callback) + +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetSharedMemConfig(pConfig) + return cudaDeviceGetSharedMemConfig(pConfig) + +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSetSharedMemConfig(config) + return cudaDeviceSetSharedMemConfig(config) + +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetLastError() + return cudaGetLastError() + +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaPeekAtLastError() + return cudaPeekAtLastError() + +cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetErrorName(error) + return cudaGetErrorName(error) + +cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetErrorString(error) + return cudaGetErrorString(error) + +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDeviceCount(count) + return cudaGetDeviceCount(count) + +cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDeviceProperties_v2(prop, device) + return cudaGetDeviceProperties_v2(prop, device) + +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetAttribute(value, attr, device) + return cudaDeviceGetAttribute(value, attr, device) + +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetDefaultMemPool(memPool, device) + return cudaDeviceGetDefaultMemPool(memPool, device) + +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSetMemPool(device, memPool) + return cudaDeviceSetMemPool(device, memPool) + +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetMemPool(memPool, device) + return cudaDeviceGetMemPool(memPool, device) + +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaChooseDevice(device, prop) + return cudaChooseDevice(device, prop) + +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaInitDevice(device, deviceFlags, flags) + return cudaInitDevice(device, deviceFlags, flags) + +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaSetDevice(device) + return cudaSetDevice(device) + +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDevice(device) + return cudaGetDevice(device) + +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaSetDeviceFlags(flags) + return cudaSetDeviceFlags(flags) + +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDeviceFlags(flags) + return cudaGetDeviceFlags(flags) + +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamCreate(pStream) + return cudaStreamCreate(pStream) + +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamCreateWithFlags(pStream, flags) + return cudaStreamCreateWithFlags(pStream, flags) + +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamCreateWithPriority(pStream, flags, priority) + return cudaStreamCreateWithPriority(pStream, flags, priority) + +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetPriority(hStream, priority) + return cudaStreamGetPriority(hStream, priority) + +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetFlags(hStream, flags) + return cudaStreamGetFlags(hStream, flags) + +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetId(hStream, streamId) + return cudaStreamGetId(hStream, streamId) + +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetDevice(hStream, device) + return cudaStreamGetDevice(hStream, device) + +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaCtxResetPersistingL2Cache() + return cudaCtxResetPersistingL2Cache() + +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamCopyAttributes(dst, src) + return cudaStreamCopyAttributes(dst, src) + +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetAttribute(hStream, attr, value_out) + return cudaStreamGetAttribute(hStream, attr, value_out) + +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamSetAttribute(hStream, attr, value) + return cudaStreamSetAttribute(hStream, attr, value) + +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamDestroy(stream) + return cudaStreamDestroy(stream) + +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamWaitEvent(stream, event, flags) + return cudaStreamWaitEvent(stream, event, flags) + +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamAddCallback(stream, callback, userData, flags) + return cudaStreamAddCallback(stream, callback, userData, flags) + +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamSynchronize(stream) + return cudaStreamSynchronize(stream) + +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamQuery(stream) + return cudaStreamQuery(stream) + +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamBeginCapture(stream, mode) + return cudaStreamBeginCapture(stream, mode) + +cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaThreadExchangeStreamCaptureMode(mode) + return cudaThreadExchangeStreamCaptureMode(mode) + +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamEndCapture(stream, pGraph) + return cudaStreamEndCapture(stream, pGraph) + +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamIsCapturing(stream, pCaptureStatus) + return cudaStreamIsCapturing(stream, pCaptureStatus) + +cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + return cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + +cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventCreate(event) + return cudaEventCreate(event) + +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventCreateWithFlags(event, flags) + return cudaEventCreateWithFlags(event, flags) + +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventRecord(event, stream) + return cudaEventRecord(event, stream) + +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventRecordWithFlags(event, stream, flags) + return cudaEventRecordWithFlags(event, stream, flags) + +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventQuery(event) + return cudaEventQuery(event) + +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventSynchronize(event) + return cudaEventSynchronize(event) + +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventDestroy(event) + return cudaEventDestroy(event) + +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventElapsedTime(ms, start, end) + return cudaEventElapsedTime(ms, start, end) + +cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaEventElapsedTime_v2(ms, start, end) + return cudaEventElapsedTime_v2(ms, start, end) + +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaImportExternalMemory(extMem_out, memHandleDesc) + return cudaImportExternalMemory(extMem_out, memHandleDesc) + +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDestroyExternalMemory(extMem) + return cudaDestroyExternalMemory(extMem) + +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + +cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + return cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + return cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDestroyExternalSemaphore(extSem) + return cudaDestroyExternalSemaphore(extSem) + +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFuncSetCacheConfig(func, cacheConfig) + return cudaFuncSetCacheConfig(func, cacheConfig) + +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFuncGetAttributes(attr, func) + return cudaFuncGetAttributes(attr, func) + +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFuncSetAttribute(func, attr, value) + return cudaFuncSetAttribute(func, attr, value) + +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLaunchHostFunc(stream, fn, userData) + return cudaLaunchHostFunc(stream, fn, userData) + +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFuncSetSharedMemConfig(func, config) + return cudaFuncSetSharedMemConfig(func, config) + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocManaged(devPtr, size, flags) + return cudaMallocManaged(devPtr, size, flags) + +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMalloc(devPtr, size) + return cudaMalloc(devPtr, size) + +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocHost(ptr, size) + return cudaMallocHost(ptr, size) + +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocPitch(devPtr, pitch, width, height) + return cudaMallocPitch(devPtr, pitch, width, height) + +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocArray(array, desc, width, height, flags) + return cudaMallocArray(array, desc, width, height, flags) + +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFree(devPtr) + return cudaFree(devPtr) + +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFreeHost(ptr) + return cudaFreeHost(ptr) + +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFreeArray(array) + return cudaFreeArray(array) + +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFreeMipmappedArray(mipmappedArray) + return cudaFreeMipmappedArray(mipmappedArray) + +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaHostAlloc(pHost, size, flags) + return cudaHostAlloc(pHost, size, flags) + +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaHostRegister(ptr, size, flags) + return cudaHostRegister(ptr, size, flags) + +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaHostUnregister(ptr) + return cudaHostUnregister(ptr) + +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaHostGetDevicePointer(pDevice, pHost, flags) + return cudaHostGetDevicePointer(pDevice, pHost, flags) + +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaHostGetFlags(pFlags, pHost) + return cudaHostGetFlags(pFlags, pHost) + +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMalloc3D(pitchedDevPtr, extent) + return cudaMalloc3D(pitchedDevPtr, extent) + +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMalloc3DArray(array, desc, extent, flags) + return cudaMalloc3DArray(array, desc, extent, flags) + +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy3D(p) + return cudaMemcpy3D(p) + +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy3DPeer(p) + return cudaMemcpy3DPeer(p) + +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy3DAsync(p, stream) + return cudaMemcpy3DAsync(p, stream) + +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy3DPeerAsync(p, stream) + return cudaMemcpy3DPeerAsync(p, stream) + +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemGetInfo(free, total) + return cudaMemGetInfo(free, total) + +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaArrayGetInfo(desc, extent, flags, array) + return cudaArrayGetInfo(desc, extent, flags, array) + +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaArrayGetSparseProperties(sparseProperties, array) + return cudaArrayGetSparseProperties(sparseProperties, array) + +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy(dst, src, count, kind) + return cudaMemcpy(dst, src, count, kind) + +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + +cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyAsync(dst, src, count, kind, stream) + return cudaMemcpyAsync(dst, src, count, kind, stream) + +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + +cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + +cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + +cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + +cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemset(devPtr, value, count) + return cudaMemset(devPtr, value, count) + +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemset2D(devPtr, pitch, value, width, height) + return cudaMemset2D(devPtr, pitch, value, width, height) + +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemset3D(pitchedDevPtr, value, extent) + return cudaMemset3D(pitchedDevPtr, value, extent) + +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemsetAsync(devPtr, value, count, stream) + return cudaMemsetAsync(devPtr, value, count, stream) + +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + +cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemAdvise(devPtr, count, advice, device) + return cudaMemAdvise(devPtr, count, advice, device) + +cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemAdvise_v2(devPtr, count, advice, location) + return cudaMemAdvise_v2(devPtr, count, advice, location) + +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + +cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + +cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + +cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocAsync(devPtr, size, hStream) + return cudaMallocAsync(devPtr, size, hStream) + +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaFreeAsync(devPtr, hStream) + return cudaFreeAsync(devPtr, hStream) + +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolTrimTo(memPool, minBytesToKeep) + return cudaMemPoolTrimTo(memPool, minBytesToKeep) + +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolSetAttribute(memPool, attr, value) + return cudaMemPoolSetAttribute(memPool, attr, value) + +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolGetAttribute(memPool, attr, value) + return cudaMemPoolGetAttribute(memPool, attr, value) + +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolSetAccess(memPool, descList, count) + return cudaMemPoolSetAccess(memPool, descList, count) + +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolGetAccess(flags, memPool, location) + return cudaMemPoolGetAccess(flags, memPool, location) + +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolCreate(memPool, poolProps) + return cudaMemPoolCreate(memPool, poolProps) + +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolDestroy(memPool) + return cudaMemPoolDestroy(memPool) + +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolExportPointer(exportData, ptr) + return cudaMemPoolExportPointer(exportData, ptr) + +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemPoolImportPointer(ptr, memPool, exportData) + return cudaMemPoolImportPointer(ptr, memPool, exportData) + +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaPointerGetAttributes(attributes, ptr) + return cudaPointerGetAttributes(attributes, ptr) + +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceEnablePeerAccess(peerDevice, flags) + return cudaDeviceEnablePeerAccess(peerDevice, flags) + +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceDisablePeerAccess(peerDevice) + return cudaDeviceDisablePeerAccess(peerDevice) + +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsUnregisterResource(resource) + return cudaGraphicsUnregisterResource(resource) + +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsResourceSetMapFlags(resource, flags) + return cudaGraphicsResourceSetMapFlags(resource, flags) + +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsMapResources(count, resources, stream) + return cudaGraphicsMapResources(count, resources, stream) + +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsUnmapResources(count, resources, stream) + return cudaGraphicsUnmapResources(count, resources, stream) + +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetChannelDesc(desc, array) + return cudaGetChannelDesc(desc, array) +@cython.show_performance_hints(False) +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaCreateChannelDesc(x, y, z, w, f) + return cudaCreateChannelDesc(x, y, z, w, f) + +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDestroyTextureObject(texObject) + return cudaDestroyTextureObject(texObject) + +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaCreateSurfaceObject(pSurfObject, pResDesc) + return cudaCreateSurfaceObject(pSurfObject, pResDesc) + +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDestroySurfaceObject(surfObject) + return cudaDestroySurfaceObject(surfObject) + +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDriverGetVersion(driverVersion) + return cudaDriverGetVersion(driverVersion) + +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaRuntimeGetVersion(runtimeVersion) + return cudaRuntimeGetVersion(runtimeVersion) + +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphCreate(pGraph, flags) + return cudaGraphCreate(pGraph, flags) + +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphKernelNodeGetParams(node, pNodeParams) + return cudaGraphKernelNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphKernelNodeSetParams(node, pNodeParams) + return cudaGraphKernelNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + +cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemsetNodeGetParams(node, pNodeParams) + return cudaGraphMemsetNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemsetNodeSetParams(node, pNodeParams) + return cudaGraphMemsetNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphHostNodeGetParams(node, pNodeParams) + return cudaGraphHostNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphHostNodeSetParams(node, pNodeParams) + return cudaGraphHostNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphChildGraphNodeGetGraph(node, pGraph) + return cudaGraphChildGraphNodeGetGraph(node, pGraph) + +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphEventRecordNodeGetEvent(node, event_out) + return cudaGraphEventRecordNodeGetEvent(node, event_out) + +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphEventRecordNodeSetEvent(node, event) + return cudaGraphEventRecordNodeSetEvent(node, event) + +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphEventWaitNodeGetEvent(node, event_out) + return cudaGraphEventWaitNodeGetEvent(node, event_out) + +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphEventWaitNodeSetEvent(node, event) + return cudaGraphEventWaitNodeSetEvent(node, event) + +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemAllocNodeGetParams(node, params_out) + return cudaGraphMemAllocNodeGetParams(node, params_out) + +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphMemFreeNodeGetParams(node, dptr_out) + return cudaGraphMemFreeNodeGetParams(node, dptr_out) + +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGraphMemTrim(device) + return cudaDeviceGraphMemTrim(device) + +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceGetGraphMemAttribute(device, attr, value) + return cudaDeviceGetGraphMemAttribute(device, attr, value) + +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaDeviceSetGraphMemAttribute(device, attr, value) + return cudaDeviceSetGraphMemAttribute(device, attr, value) + +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphClone(pGraphClone, originalGraph) + return cudaGraphClone(pGraphClone, originalGraph) + +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetType(node, pType) + return cudaGraphNodeGetType(node, pType) + +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphGetNodes(graph, nodes, numNodes) + return cudaGraphGetNodes(graph, nodes, numNodes) + +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphGetEdges(graph, from_, to, numEdges) + return cudaGraphGetEdges(graph, from_, to, numEdges) + +cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + +cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + +cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddDependencies(graph, from_, to, numDependencies) + return cudaGraphAddDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphDestroyNode(node) + return cudaGraphDestroyNode(node) + +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphInstantiate(pGraphExec, graph, flags) + return cudaGraphInstantiate(pGraphExec, graph, flags) + +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecGetFlags(graphExec, flags) + return cudaGraphExecGetFlags(graphExec, flags) + +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphUpload(graphExec, stream) + return cudaGraphUpload(graphExec, stream) + +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphLaunch(graphExec, stream) + return cudaGraphLaunch(graphExec, stream) + +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecDestroy(graphExec) + return cudaGraphExecDestroy(graphExec) + +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphDestroy(graph) + return cudaGraphDestroy(graph) + +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphDebugDotPrint(graph, path, flags) + return cudaGraphDebugDotPrint(graph, path, flags) + +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaUserObjectRetain(object, count) + return cudaUserObjectRetain(object, count) + +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaUserObjectRelease(object, count) + return cudaUserObjectRelease(object, count) + +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphRetainUserObject(graph, object, count, flags) + return cudaGraphRetainUserObject(graph, object, count, flags) + +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphReleaseUserObject(graph, object, count) + return cudaGraphReleaseUserObject(graph, object, count) + +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphNodeSetParams(node, nodeParams) + return cudaGraphNodeSetParams(node, nodeParams) + +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + +cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryUnload(library) + return cudaLibraryUnload(library) + +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryGetKernel(pKernel, library, name) + return cudaLibraryGetKernel(pKernel, library, name) + +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryGetGlobal(dptr, numbytes, library, name) + return cudaLibraryGetGlobal(dptr, numbytes, library, name) + +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryGetManaged(dptr, numbytes, library, name) + return cudaLibraryGetManaged(dptr, numbytes, library, name) + +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryGetKernelCount(count, lib) + return cudaLibraryGetKernelCount(count, lib) + +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetExportTable(ppExportTable, pExportTableId) + return cudaGetExportTable(ppExportTable, pExportTableId) + +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaGetKernel(kernelPtr, entryFuncAddr) + return cudaGetKernel(kernelPtr, entryFuncAddr) +@cython.show_performance_hints(False) +cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._make_cudaPitchedPtr(d, p, xsz, ysz) + return make_cudaPitchedPtr(d, p, xsz, ysz) +@cython.show_performance_hints(False) +cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._make_cudaPos(x, y, z) + return make_cudaPos(x, y, z) +@cython.show_performance_hints(False) +cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._make_cudaExtent(w, h, d) + return make_cudaExtent(w, h, d) + +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaProfilerStart() + return cudaProfilerStart() + +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaProfilerStop() + return cudaProfilerStop() + + +include "../_lib/cyruntime/cyruntime.pxi" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c936dd24a0e0746b1b23a92a729a86f3eddac93 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.cpp @@ -0,0 +1,15004 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_profiler_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/device_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/driver_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/library_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/surface_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/texture_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/vector_types.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "libraries": [ + "cudart_static", + "rt" + ], + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._bindings.cyruntime_ptds", + "sources": [ + "cuda/bindings/_bindings/cyruntime_ptds.pyx" + ] + }, + "module_name": "cuda.bindings._bindings.cyruntime_ptds" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___bindings__cyruntime_ptds +#define __PYX_HAVE_API__cuda__bindings___bindings__cyruntime_ptds +/* Early includes */ + + #define CUDA_API_PER_THREAD_DEFAULT_STREAM + +#include "vector_types.h" +#include "driver_types.h" +#include "surface_types.h" +#include "texture_types.h" +#include "library_types.h" +#include "cuda_runtime_api.h" +#include "device_types.h" + + #define CUDA_API_PER_THREAD_DEFAULT_STREAM + +#include "cuda_runtime.h" +#include "cuda_profiler_api.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_bindings/cyruntime_ptds.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "cython" */ + +/* Module declarations from "cuda.bindings._bindings.cyruntime_ptds" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._bindings.cyruntime_ptds" +extern int __pyx_module_is_main_cuda__bindings___bindings__cyruntime_ptds; +int __pyx_module_is_main_cuda__bindings___bindings__cyruntime_ptds = 0; + +/* Implementation of "cuda.bindings._bindings.cyruntime_ptds" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":14 + * cimport cython + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceReset() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceReset(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":15 + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceReset() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceReset(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":14 + * cimport cython + * + * cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceReset() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":17 + * return cudaDeviceReset() + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSynchronize() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSynchronize(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":18 + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSynchronize() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSynchronize(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":17 + * return cudaDeviceReset() + * + * cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSynchronize() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":20 + * return cudaDeviceSynchronize() + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetLimit(limit, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetLimit(enum cudaLimit __pyx_v_limit, size_t __pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":21 + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSetLimit(limit, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetLimit(__pyx_v_limit, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":20 + * return cudaDeviceSynchronize() + * + * cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetLimit(limit, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":23 + * return cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetLimit(pValue, limit) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetLimit(size_t *__pyx_v_pValue, enum cudaLimit __pyx_v_limit) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":24 + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetLimit(pValue, limit) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetLimit(__pyx_v_pValue, __pyx_v_limit); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":23 + * return cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetLimit(pValue, limit) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":26 + * return cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, struct cudaChannelFormatDesc const *__pyx_v_fmtDesc, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":27 + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_fmtDesc, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":26 + * return cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":29 + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetCacheConfig(pCacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetCacheConfig(enum cudaFuncCache *__pyx_v_pCacheConfig) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":30 + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetCacheConfig(pCacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetCacheConfig(__pyx_v_pCacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":29 + * return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetCacheConfig(pCacheConfig) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":32 + * return cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":33 + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":32 + * return cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":35 + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetCacheConfig(cacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetCacheConfig(enum cudaFuncCache __pyx_v_cacheConfig) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":36 + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSetCacheConfig(cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetCacheConfig(__pyx_v_cacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":35 + * return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetCacheConfig(cacheConfig) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":38 + * return cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetByPCIBusId(int *__pyx_v_device, char const *__pyx_v_pciBusId) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":39 + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetByPCIBusId(device, pciBusId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetByPCIBusId(__pyx_v_device, __pyx_v_pciBusId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":38 + * return cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":41 + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":42 + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetPCIBusId(pciBusId, length, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":41 + * return cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":44 + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcGetEventHandle(handle, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetEventHandle(cudaIpcEventHandle_t *__pyx_v_handle, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":45 + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaIpcGetEventHandle(handle, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcGetEventHandle(__pyx_v_handle, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":44 + * return cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcGetEventHandle(handle, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":47 + * return cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcOpenEventHandle(event, handle) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenEventHandle(cudaEvent_t *__pyx_v_event, cudaIpcEventHandle_t __pyx_v_handle) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":48 + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaIpcOpenEventHandle(event, handle) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcOpenEventHandle(__pyx_v_event, __pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":47 + * return cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcOpenEventHandle(event, handle) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":50 + * return cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcGetMemHandle(handle, devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetMemHandle(cudaIpcMemHandle_t *__pyx_v_handle, void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":51 + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaIpcGetMemHandle(handle, devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcGetMemHandle(__pyx_v_handle, __pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":50 + * return cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcGetMemHandle(handle, devPtr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":53 + * return cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenMemHandle(void **__pyx_v_devPtr, cudaIpcMemHandle_t __pyx_v_handle, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":54 + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaIpcOpenMemHandle(devPtr, handle, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcOpenMemHandle(__pyx_v_devPtr, __pyx_v_handle, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":53 + * return cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":56 + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcCloseMemHandle(devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcCloseMemHandle(void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":57 + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaIpcCloseMemHandle(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaIpcCloseMemHandle(__pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":56 + * return cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaIpcCloseMemHandle(devPtr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":59 + * return cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceFlushGPUDirectRDMAWrites(enum cudaFlushGPUDirectRDMAWritesTarget __pyx_v_target, enum cudaFlushGPUDirectRDMAWritesScope __pyx_v_scope) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":60 + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceFlushGPUDirectRDMAWrites(__pyx_v_target, __pyx_v_scope); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":59 + * return cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":62 + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceRegisterAsyncNotification(int __pyx_v_device, cudaAsyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, cudaAsyncCallbackHandle_t *__pyx_v_callback) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":63 + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":62 + * return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":65 + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceUnregisterAsyncNotification(int __pyx_v_device, cudaAsyncCallbackHandle_t __pyx_v_callback) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":66 + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceUnregisterAsyncNotification(device, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":65 + * return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":68 + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetSharedMemConfig(pConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *__pyx_v_pConfig) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":69 + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetSharedMemConfig(pConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetSharedMemConfig(__pyx_v_pConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":68 + * return cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetSharedMemConfig(pConfig) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":71 + * return cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetSharedMemConfig(config) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetSharedMemConfig(enum cudaSharedMemConfig __pyx_v_config) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":72 + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSetSharedMemConfig(config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetSharedMemConfig(__pyx_v_config); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":71 + * return cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetSharedMemConfig(config) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":74 + * return cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetLastError() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetLastError(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":75 + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetLastError() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetLastError(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":74 + * return cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetLastError() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":77 + * return cudaGetLastError() + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaPeekAtLastError() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPeekAtLastError(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":78 + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaPeekAtLastError() # <<<<<<<<<<<<<< + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: +*/ + __pyx_r = cudaPeekAtLastError(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":77 + * return cudaGetLastError() + * + * cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaPeekAtLastError() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":80 + * return cudaPeekAtLastError() + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cudaGetErrorName(error) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorName(cudaError_t __pyx_v_error) { + char const *__pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":81 + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + * return cudaGetErrorName(error) # <<<<<<<<<<<<<< + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: +*/ + __pyx_r = cudaGetErrorName(__pyx_v_error); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":80 + * return cudaPeekAtLastError() + * + * cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cudaGetErrorName(error) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":83 + * return cudaGetErrorName(error) + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cudaGetErrorString(error) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorString(cudaError_t __pyx_v_error) { + char const *__pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":84 + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + * return cudaGetErrorString(error) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetErrorString(__pyx_v_error); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":83 + * return cudaGetErrorName(error) + * + * cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cudaGetErrorString(error) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":86 + * return cudaGetErrorString(error) + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceCount(count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceCount(int *__pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":87 + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDeviceCount(count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceCount(__pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":86 + * return cudaGetErrorString(error) + * + * cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceCount(count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":89 + * return cudaGetDeviceCount(count) + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceProperties_v2(prop, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceProperties_v2(struct cudaDeviceProp *__pyx_v_prop, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":90 + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDeviceProperties_v2(prop, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceProperties_v2(__pyx_v_prop, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":89 + * return cudaGetDeviceCount(count) + * + * cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceProperties_v2(prop, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":92 + * return cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetAttribute(value, attr, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetAttribute(int *__pyx_v_value, enum cudaDeviceAttr __pyx_v_attr, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":93 + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetAttribute(value, attr, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetAttribute(__pyx_v_value, __pyx_v_attr, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":92 + * return cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetAttribute(value, attr, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":95 + * return cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetDefaultMemPool(memPool, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetDefaultMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":96 + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetDefaultMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetDefaultMemPool(__pyx_v_memPool, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":95 + * return cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetDefaultMemPool(memPool, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":98 + * return cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetMemPool(device, memPool) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetMemPool(int __pyx_v_device, cudaMemPool_t __pyx_v_memPool) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":99 + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSetMemPool(device, memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetMemPool(__pyx_v_device, __pyx_v_memPool); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":98 + * return cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetMemPool(device, memPool) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":101 + * return cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetMemPool(memPool, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":102 + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetMemPool(__pyx_v_memPool, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":101 + * return cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetMemPool(memPool, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":104 + * return cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, int __pyx_v_device, int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":105 + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_device, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":104 + * return cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":107 + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetP2PAttribute(int *__pyx_v_value, enum cudaDeviceP2PAttr __pyx_v_attr, int __pyx_v_srcDevice, int __pyx_v_dstDevice) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":108 + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetP2PAttribute(__pyx_v_value, __pyx_v_attr, __pyx_v_srcDevice, __pyx_v_dstDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":107 + * return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":110 + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaChooseDevice(device, prop) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaChooseDevice(int *__pyx_v_device, struct cudaDeviceProp const *__pyx_v_prop) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":111 + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaChooseDevice(device, prop) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaChooseDevice(__pyx_v_device, __pyx_v_prop); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":110 + * return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaChooseDevice(device, prop) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":113 + * return cudaChooseDevice(device, prop) + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaInitDevice(device, deviceFlags, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaInitDevice(int __pyx_v_device, unsigned int __pyx_v_deviceFlags, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":114 + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaInitDevice(device, deviceFlags, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaInitDevice(__pyx_v_device, __pyx_v_deviceFlags, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":113 + * return cudaChooseDevice(device, prop) + * + * cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaInitDevice(device, deviceFlags, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":116 + * return cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSetDevice(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDevice(int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":117 + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaSetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSetDevice(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":116 + * return cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSetDevice(device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":119 + * return cudaSetDevice(device) + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDevice(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDevice(int *__pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":120 + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDevice(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":119 + * return cudaSetDevice(device) + * + * cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDevice(device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":122 + * return cudaGetDevice(device) + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSetDeviceFlags(flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDeviceFlags(unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":123 + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaSetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSetDeviceFlags(__pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":122 + * return cudaGetDevice(device) + * + * cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSetDeviceFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":125 + * return cudaSetDeviceFlags(flags) + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceFlags(flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceFlags(unsigned int *__pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":126 + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDeviceFlags(__pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":125 + * return cudaSetDeviceFlags(flags) + * + * cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDeviceFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":128 + * return cudaGetDeviceFlags(flags) + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreate(pStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreate(cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":129 + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamCreate(pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreate(__pyx_v_pStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":128 + * return cudaGetDeviceFlags(flags) + * + * cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreate(pStream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":131 + * return cudaStreamCreate(pStream) + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreateWithFlags(pStream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithFlags(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":132 + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamCreateWithFlags(pStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreateWithFlags(__pyx_v_pStream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":131 + * return cudaStreamCreate(pStream) + * + * cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreateWithFlags(pStream, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":134 + * return cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithPriority(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags, int __pyx_v_priority) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":135 + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamCreateWithPriority(pStream, flags, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCreateWithPriority(__pyx_v_pStream, __pyx_v_flags, __pyx_v_priority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":134 + * return cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":137 + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetPriority(hStream, priority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetPriority(cudaStream_t __pyx_v_hStream, int *__pyx_v_priority) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":138 + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetPriority(hStream, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":137 + * return cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetPriority(hStream, priority) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":140 + * return cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetFlags(hStream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetFlags(cudaStream_t __pyx_v_hStream, unsigned int *__pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":141 + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetFlags(hStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":140 + * return cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetFlags(hStream, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":143 + * return cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetId(hStream, streamId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetId(cudaStream_t __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":144 + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetId(hStream, streamId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetId(__pyx_v_hStream, __pyx_v_streamId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":143 + * return cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetId(hStream, streamId) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":146 + * return cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetDevice(hStream, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetDevice(cudaStream_t __pyx_v_hStream, int *__pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":147 + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetDevice(hStream, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetDevice(__pyx_v_hStream, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":146 + * return cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetDevice(hStream, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":149 + * return cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCtxResetPersistingL2Cache() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCtxResetPersistingL2Cache(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":150 + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaCtxResetPersistingL2Cache() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCtxResetPersistingL2Cache(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":149 + * return cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCtxResetPersistingL2Cache() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":152 + * return cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCopyAttributes(dst, src) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCopyAttributes(cudaStream_t __pyx_v_dst, cudaStream_t __pyx_v_src) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":153 + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":152 + * return cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamCopyAttributes(dst, src) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":155 + * return cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetAttribute(hStream, attr, value_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue *__pyx_v_value_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":156 + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetAttribute(hStream, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":155 + * return cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetAttribute(hStream, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":158 + * return cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamSetAttribute(hStream, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue const *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":159 + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamSetAttribute(hStream, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamSetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":158 + * return cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamSetAttribute(hStream, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":161 + * return cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamDestroy(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamDestroy(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":162 + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamDestroy(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamDestroy(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":161 + * return cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamDestroy(stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":164 + * return cudaStreamDestroy(stream) + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamWaitEvent(stream, event, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamWaitEvent(cudaStream_t __pyx_v_stream, cudaEvent_t __pyx_v_event, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":165 + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamWaitEvent(stream, event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamWaitEvent(__pyx_v_stream, __pyx_v_event, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":164 + * return cudaStreamDestroy(stream) + * + * cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamWaitEvent(stream, event, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":167 + * return cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamAddCallback(stream, callback, userData, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAddCallback(cudaStream_t __pyx_v_stream, cudaStreamCallback_t __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":168 + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamAddCallback(stream, callback, userData, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamAddCallback(__pyx_v_stream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":167 + * return cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamAddCallback(stream, callback, userData, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":170 + * return cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamSynchronize(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSynchronize(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":171 + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamSynchronize(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamSynchronize(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":170 + * return cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamSynchronize(stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":173 + * return cudaStreamSynchronize(stream) + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamQuery(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamQuery(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":174 + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamQuery(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamQuery(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":173 + * return cudaStreamSynchronize(stream) + * + * cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamQuery(stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":176 + * return cudaStreamQuery(stream) + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAttachMemAsync(cudaStream_t __pyx_v_stream, void *__pyx_v_devPtr, size_t __pyx_v_length, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":177 + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamAttachMemAsync(__pyx_v_stream, __pyx_v_devPtr, __pyx_v_length, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":176 + * return cudaStreamQuery(stream) + * + * cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":179 + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamBeginCapture(stream, mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCapture(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureMode __pyx_v_mode) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":180 + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamBeginCapture(stream, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamBeginCapture(__pyx_v_stream, __pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":179 + * return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamBeginCapture(stream, mode) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":182 + * return cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCaptureToGraph(cudaStream_t __pyx_v_stream, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, enum cudaStreamCaptureMode __pyx_v_mode) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":183 + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamBeginCaptureToGraph(__pyx_v_stream, __pyx_v_graph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":182 + * return cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":185 + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaThreadExchangeStreamCaptureMode(mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *__pyx_v_mode) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":186 + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaThreadExchangeStreamCaptureMode(mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaThreadExchangeStreamCaptureMode(__pyx_v_mode); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":185 + * return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaThreadExchangeStreamCaptureMode(mode) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":188 + * return cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamEndCapture(stream, pGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamEndCapture(cudaStream_t __pyx_v_stream, cudaGraph_t *__pyx_v_pGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":189 + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamEndCapture(stream, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamEndCapture(__pyx_v_stream, __pyx_v_pGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":188 + * return cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamEndCapture(stream, pGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":191 + * return cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamIsCapturing(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_pCaptureStatus) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":192 + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamIsCapturing(stream, pCaptureStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamIsCapturing(__pyx_v_stream, __pyx_v_pCaptureStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":191 + * return cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":194 + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v2(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":195 + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetCaptureInfo_v2_ptsz(__pyx_v_stream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":194 + * return cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":197 + * return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v3(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, cudaGraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":198 + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamGetCaptureInfo_v3(__pyx_v_stream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":197 + * return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":200 + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":201 + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamUpdateCaptureDependencies(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":200 + * return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":203 + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies_v2(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":204 + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaStreamUpdateCaptureDependencies_v2(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":203 + * return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":206 + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventCreate(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreate(cudaEvent_t *__pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":207 + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventCreate(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventCreate(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":206 + * return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventCreate(event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":209 + * return cudaEventCreate(event) + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventCreateWithFlags(event, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreateWithFlags(cudaEvent_t *__pyx_v_event, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":210 + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventCreateWithFlags(event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventCreateWithFlags(__pyx_v_event, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":209 + * return cudaEventCreate(event) + * + * cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventCreateWithFlags(event, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":212 + * return cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventRecord(event, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecord(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":213 + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventRecord(event, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventRecord(__pyx_v_event, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":212 + * return cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventRecord(event, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":215 + * return cudaEventRecord(event, stream) + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventRecordWithFlags(event, stream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecordWithFlags(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":216 + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventRecordWithFlags(event, stream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventRecordWithFlags(__pyx_v_event, __pyx_v_stream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":215 + * return cudaEventRecord(event, stream) + * + * cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventRecordWithFlags(event, stream, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":218 + * return cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventQuery(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventQuery(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":219 + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventQuery(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventQuery(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":218 + * return cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventQuery(event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":221 + * return cudaEventQuery(event) + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventSynchronize(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventSynchronize(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":222 + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventSynchronize(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventSynchronize(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":221 + * return cudaEventQuery(event) + * + * cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventSynchronize(event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":224 + * return cudaEventSynchronize(event) + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventDestroy(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventDestroy(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":225 + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventDestroy(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventDestroy(__pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":224 + * return cudaEventSynchronize(event) + * + * cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventDestroy(event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":227 + * return cudaEventDestroy(event) + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventElapsedTime(ms, start, end) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":228 + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventElapsedTime(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventElapsedTime(__pyx_v_ms, __pyx_v_start, __pyx_v_end); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":227 + * return cudaEventDestroy(event) + * + * cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventElapsedTime(ms, start, end) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":230 + * return cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventElapsedTime_v2(ms, start, end) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime_v2(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":231 + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaEventElapsedTime_v2(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaEventElapsedTime_v2(__pyx_v_ms, __pyx_v_start, __pyx_v_end); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":230 + * return cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaEventElapsedTime_v2(ms, start, end) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":233 + * return cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalMemory(cudaExternalMemory_t *__pyx_v_extMem_out, struct cudaExternalMemoryHandleDesc const *__pyx_v_memHandleDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":234 + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaImportExternalMemory(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":233 + * return cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":236 + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedBuffer(void **__pyx_v_devPtr, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryBufferDesc const *__pyx_v_bufferDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":237 + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":236 + * return cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":239 + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmap, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryMipmappedArrayDesc const *__pyx_v_mipmapDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":240 + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":239 + * return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":242 + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyExternalMemory(extMem) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalMemory(cudaExternalMemory_t __pyx_v_extMem) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":243 + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDestroyExternalMemory(extMem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyExternalMemory(__pyx_v_extMem); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":242 + * return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyExternalMemory(extMem) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":245 + * return cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalSemaphore(cudaExternalSemaphore_t *__pyx_v_extSem_out, struct cudaExternalSemaphoreHandleDesc const *__pyx_v_semHandleDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":246 + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":245 + * return cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":248 + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSignalExternalSemaphoresAsync_v2(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreSignalParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":249 + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaSignalExternalSemaphoresAsync_v2_ptsz(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":248 + * return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":251 + * return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaWaitExternalSemaphoresAsync_v2(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreWaitParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":252 + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaWaitExternalSemaphoresAsync_v2_ptsz(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":251 + * return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":254 + * return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyExternalSemaphore(extSem) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalSemaphore(cudaExternalSemaphore_t __pyx_v_extSem) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":255 + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDestroyExternalSemaphore(extSem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyExternalSemaphore(__pyx_v_extSem); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":254 + * return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyExternalSemaphore(extSem) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":257 + * return cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetCacheConfig(func, cacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetCacheConfig(void const *__pyx_v_func, enum cudaFuncCache __pyx_v_cacheConfig) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":258 + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFuncSetCacheConfig(func, cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetCacheConfig(__pyx_v_func, __pyx_v_cacheConfig); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":257 + * return cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetCacheConfig(func, cacheConfig) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":260 + * return cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncGetAttributes(attr, func) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncGetAttributes(struct cudaFuncAttributes *__pyx_v_attr, void const *__pyx_v_func) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":261 + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFuncGetAttributes(attr, func) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncGetAttributes(__pyx_v_attr, __pyx_v_func); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":260 + * return cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncGetAttributes(attr, func) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":263 + * return cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetAttribute(func, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetAttribute(void const *__pyx_v_func, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":264 + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFuncSetAttribute(func, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetAttribute(__pyx_v_func, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":263 + * return cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetAttribute(func, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":266 + * return cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLaunchHostFunc(stream, fn, userData) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLaunchHostFunc(cudaStream_t __pyx_v_stream, cudaHostFn_t __pyx_v_fn, void *__pyx_v_userData) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":267 + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLaunchHostFunc(stream, fn, userData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLaunchHostFunc(__pyx_v_stream, __pyx_v_fn, __pyx_v_userData); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":266 + * return cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLaunchHostFunc(stream, fn, userData) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":269 + * return cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetSharedMemConfig(func, config) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetSharedMemConfig(void const *__pyx_v_func, enum cudaSharedMemConfig __pyx_v_config) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":270 + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFuncSetSharedMemConfig(func, config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFuncSetSharedMemConfig(__pyx_v_func, __pyx_v_config); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":269 + * return cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFuncSetSharedMemConfig(func, config) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":272 + * return cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":273 + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":272 + * return cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":275 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, void const *__pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":276 + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":275 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":278 + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":279 + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":278 + * return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":281 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocManaged(devPtr, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocManaged(void **__pyx_v_devPtr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":282 + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocManaged(devPtr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocManaged(__pyx_v_devPtr, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":281 + * return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocManaged(devPtr, size, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":284 + * return cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc(devPtr, size) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc(void **__pyx_v_devPtr, size_t __pyx_v_size) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":285 + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMalloc(devPtr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc(__pyx_v_devPtr, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":284 + * return cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc(devPtr, size) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":287 + * return cudaMalloc(devPtr, size) + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocHost(ptr, size) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocHost(void **__pyx_v_ptr, size_t __pyx_v_size) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":288 + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocHost(ptr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocHost(__pyx_v_ptr, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":287 + * return cudaMalloc(devPtr, size) + * + * cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocHost(ptr, size) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":290 + * return cudaMallocHost(ptr, size) + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocPitch(devPtr, pitch, width, height) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocPitch(void **__pyx_v_devPtr, size_t *__pyx_v_pitch, size_t __pyx_v_width, size_t __pyx_v_height) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":291 + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocPitch(devPtr, pitch, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocPitch(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_width, __pyx_v_height); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":290 + * return cudaMallocHost(ptr, size) + * + * cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocPitch(devPtr, pitch, width, height) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":293 + * return cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocArray(array, desc, width, height, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, size_t __pyx_v_width, size_t __pyx_v_height, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":294 + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocArray(array, desc, width, height, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocArray(__pyx_v_array, __pyx_v_desc, __pyx_v_width, __pyx_v_height, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":293 + * return cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocArray(array, desc, width, height, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":296 + * return cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFree(devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFree(void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":297 + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFree(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFree(__pyx_v_devPtr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":296 + * return cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFree(devPtr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":299 + * return cudaFree(devPtr) + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeHost(ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeHost(void *__pyx_v_ptr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":300 + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFreeHost(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeHost(__pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":299 + * return cudaFree(devPtr) + * + * cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeHost(ptr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":302 + * return cudaFreeHost(ptr) + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeArray(array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeArray(cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":303 + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFreeArray(array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeArray(__pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":302 + * return cudaFreeHost(ptr) + * + * cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeArray(array) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":305 + * return cudaFreeArray(array) + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeMipmappedArray(mipmappedArray) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeMipmappedArray(cudaMipmappedArray_t __pyx_v_mipmappedArray) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":306 + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFreeMipmappedArray(mipmappedArray) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeMipmappedArray(__pyx_v_mipmappedArray); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":305 + * return cudaFreeArray(array) + * + * cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeMipmappedArray(mipmappedArray) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":308 + * return cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostAlloc(pHost, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostAlloc(void **__pyx_v_pHost, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":309 + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaHostAlloc(pHost, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostAlloc(__pyx_v_pHost, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":308 + * return cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostAlloc(pHost, size, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":311 + * return cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostRegister(ptr, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostRegister(void *__pyx_v_ptr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":312 + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaHostRegister(ptr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostRegister(__pyx_v_ptr, __pyx_v_size, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":311 + * return cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostRegister(ptr, size, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":314 + * return cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostUnregister(ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostUnregister(void *__pyx_v_ptr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":315 + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaHostUnregister(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostUnregister(__pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":314 + * return cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostUnregister(ptr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":317 + * return cudaHostUnregister(ptr) + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetDevicePointer(void **__pyx_v_pDevice, void *__pyx_v_pHost, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":318 + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaHostGetDevicePointer(pDevice, pHost, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostGetDevicePointer(__pyx_v_pDevice, __pyx_v_pHost, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":317 + * return cudaHostUnregister(ptr) + * + * cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":320 + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostGetFlags(pFlags, pHost) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_pHost) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":321 + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaHostGetFlags(pFlags, pHost) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaHostGetFlags(__pyx_v_pFlags, __pyx_v_pHost); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":320 + * return cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaHostGetFlags(pFlags, pHost) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":323 + * return cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc3D(pitchedDevPtr, extent) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3D(struct cudaPitchedPtr *__pyx_v_pitchedDevPtr, struct cudaExtent __pyx_v_extent) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":324 + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMalloc3D(pitchedDevPtr, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc3D(__pyx_v_pitchedDevPtr, __pyx_v_extent); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":323 + * return cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc3D(pitchedDevPtr, extent) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":326 + * return cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc3DArray(array, desc, extent, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3DArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":327 + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMalloc3DArray(array, desc, extent, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMalloc3DArray(__pyx_v_array, __pyx_v_desc, __pyx_v_extent, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":326 + * return cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMalloc3DArray(array, desc, extent, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":329 + * return cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_numLevels, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":330 + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_desc, __pyx_v_extent, __pyx_v_numLevels, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":329 + * return cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":332 + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetMipmappedArrayLevel(cudaArray_t *__pyx_v_levelArray, cudaMipmappedArray_const_t __pyx_v_mipmappedArray, unsigned int __pyx_v_level) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":333 + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetMipmappedArrayLevel(__pyx_v_levelArray, __pyx_v_mipmappedArray, __pyx_v_level); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":332 + * return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":335 + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3D(p) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3D(struct cudaMemcpy3DParms const *__pyx_v_p) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":336 + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy3D(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3D(__pyx_v_p); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":335 + * return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3D(p) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":338 + * return cudaMemcpy3D(p) + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeer(p) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeer(struct cudaMemcpy3DPeerParms const *__pyx_v_p) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":339 + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy3DPeer(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DPeer(__pyx_v_p); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":338 + * return cudaMemcpy3D(p) + * + * cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeer(p) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":341 + * return cudaMemcpy3DPeer(p) + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DAsync(p, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DAsync(struct cudaMemcpy3DParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":342 + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy3DAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DAsync(__pyx_v_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":341 + * return cudaMemcpy3DPeer(p) + * + * cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DAsync(p, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":344 + * return cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeerAsync(p, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeerAsync(struct cudaMemcpy3DPeerParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":345 + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy3DPeerAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DPeerAsync(__pyx_v_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":344 + * return cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DPeerAsync(p, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":347 + * return cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemGetInfo(free, total) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemGetInfo(size_t *__pyx_v_free, size_t *__pyx_v_total) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":348 + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemGetInfo(free, total) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemGetInfo(__pyx_v_free, __pyx_v_total); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":347 + * return cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemGetInfo(free, total) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":350 + * return cudaMemGetInfo(free, total) + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetInfo(desc, extent, flags, array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetInfo(struct cudaChannelFormatDesc *__pyx_v_desc, struct cudaExtent *__pyx_v_extent, unsigned int *__pyx_v_flags, cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":351 + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaArrayGetInfo(desc, extent, flags, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetInfo(__pyx_v_desc, __pyx_v_extent, __pyx_v_flags, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":350 + * return cudaMemGetInfo(free, total) + * + * cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetInfo(desc, extent, flags, array) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":353 + * return cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetPlane(cudaArray_t *__pyx_v_pPlaneArray, cudaArray_t __pyx_v_hArray, unsigned int __pyx_v_planeIdx) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":354 + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":353 + * return cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":356 + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaArray_t __pyx_v_array, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":357 + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":356 + * return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":359 + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaMipmappedArray_t __pyx_v_mipmap, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":360 + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":359 + * return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":362 + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetSparseProperties(sparseProperties, array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":363 + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaArrayGetSparseProperties(sparseProperties, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":362 + * return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaArrayGetSparseProperties(sparseProperties, array) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":365 + * return cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaMipmappedArray_t __pyx_v_mipmap) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":366 + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":365 + * return cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":368 + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy(dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":369 + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy(dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":368 + * return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy(dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":371 + * return cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeer(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":372 + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyPeer(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":371 + * return cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":374 + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2D(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":375 + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2D(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":374 + * return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":377 + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":378 + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":377 + * return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":380 + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArray(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":381 + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DFromArray(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":380 + * return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":383 + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":384 + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_width, __pyx_v_height, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":383 + * return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":386 + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyAsync(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":387 + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyAsync(dst, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":386 + * return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":389 + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeerAsync(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":390 + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyPeerAsync(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":389 + * return cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":392 + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyBatchAsync(void **__pyx_v_dsts, void **__pyx_v_srcs, size_t *__pyx_v_sizes, size_t __pyx_v_count, struct cudaMemcpyAttributes *__pyx_v_attrs, size_t *__pyx_v_attrsIdxs, size_t __pyx_v_numAttrs, size_t *__pyx_v_failIdx, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":393 + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyBatchAsync(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":392 + * return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":395 + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DBatchAsync(size_t __pyx_v_numOps, struct cudaMemcpy3DBatchOp *__pyx_v_opList, size_t *__pyx_v_failIdx, unsigned PY_LONG_LONG __pyx_v_flags, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":396 + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy3DBatchAsync(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":395 + * return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":398 + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":399 + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":398 + * return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":401 + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":402 + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":401 + * return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":404 + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArrayAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":405 + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpy2DFromArrayAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":404 + * return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":407 + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset(devPtr, value, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":408 + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemset(devPtr, value, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":407 + * return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset(devPtr, value, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":410 + * return cudaMemset(devPtr, value, count) + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset2D(devPtr, pitch, value, width, height) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2D(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":411 + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemset2D(devPtr, pitch, value, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset2D(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":410 + * return cudaMemset(devPtr, value, count) + * + * cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset2D(devPtr, pitch, value, width, height) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":413 + * return cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset3D(pitchedDevPtr, value, extent) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3D(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":414 + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemset3D(pitchedDevPtr, value, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset3D(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":413 + * return cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset3D(pitchedDevPtr, value, extent) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":416 + * return cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemsetAsync(devPtr, value, count, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemsetAsync(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":417 + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemsetAsync(devPtr, value, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemsetAsync(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":416 + * return cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemsetAsync(devPtr, value, count, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":419 + * return cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2DAsync(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":420 + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset2DAsync(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":419 + * return cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":422 + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3DAsync(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":423 + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemset3DAsync(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":422 + * return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":425 + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync(void const *__pyx_v_devPtr, size_t __pyx_v_count, int __pyx_v_dstDevice, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":426 + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":425 + * return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":428 + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, struct cudaMemLocation __pyx_v_location, unsigned int __pyx_v_flags, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":429 + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":428 + * return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":431 + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemAdvise(devPtr, count, advice, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":432 + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemAdvise(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemAdvise(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":431 + * return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemAdvise(devPtr, count, advice, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":434 + * return cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, struct cudaMemLocation __pyx_v_location) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":435 + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemAdvise_v2(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":434 + * return cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":437 + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, enum cudaMemRangeAttribute __pyx_v_attribute, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":438 + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":437 + * return cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":440 + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, enum cudaMemRangeAttribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":441 + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":440 + * return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":443 + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":444 + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":443 + * return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":446 + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArray(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":447 + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyFromArray(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":446 + * return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":449 + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":450 + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":449 + * return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":452 + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":453 + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":452 + * return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":455 + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArrayAsync(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":456 + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemcpyFromArrayAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, __pyx_v_kind, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":455 + * return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":458 + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocAsync(devPtr, size, hStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocAsync(void **__pyx_v_devPtr, size_t __pyx_v_size, cudaStream_t __pyx_v_hStream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":459 + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocAsync(devPtr, size, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocAsync(__pyx_v_devPtr, __pyx_v_size, __pyx_v_hStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":458 + * return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocAsync(devPtr, size, hStream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":461 + * return cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeAsync(devPtr, hStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeAsync(void *__pyx_v_devPtr, cudaStream_t __pyx_v_hStream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":462 + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaFreeAsync(devPtr, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaFreeAsync(__pyx_v_devPtr, __pyx_v_hStream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":461 + * return cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaFreeAsync(devPtr, hStream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":464 + * return cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolTrimTo(cudaMemPool_t __pyx_v_memPool, size_t __pyx_v_minBytesToKeep) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":465 + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolTrimTo(__pyx_v_memPool, __pyx_v_minBytesToKeep); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":464 + * return cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":467 + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolSetAttribute(memPool, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":468 + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolSetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolSetAttribute(__pyx_v_memPool, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":467 + * return cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolSetAttribute(memPool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":470 + * return cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolGetAttribute(memPool, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":471 + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolGetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolGetAttribute(__pyx_v_memPool, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":470 + * return cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolGetAttribute(memPool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":473 + * return cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolSetAccess(memPool, descList, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAccess(cudaMemPool_t __pyx_v_memPool, struct cudaMemAccessDesc const *__pyx_v_descList, size_t __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":474 + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolSetAccess(memPool, descList, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolSetAccess(__pyx_v_memPool, __pyx_v_descList, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":473 + * return cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolSetAccess(memPool, descList, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":476 + * return cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolGetAccess(flags, memPool, location) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAccess(enum cudaMemAccessFlags *__pyx_v_flags, cudaMemPool_t __pyx_v_memPool, struct cudaMemLocation *__pyx_v_location) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":477 + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolGetAccess(flags, memPool, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolGetAccess(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":476 + * return cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolGetAccess(flags, memPool, location) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":479 + * return cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolCreate(memPool, poolProps) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolCreate(cudaMemPool_t *__pyx_v_memPool, struct cudaMemPoolProps const *__pyx_v_poolProps) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":480 + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolCreate(memPool, poolProps) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolCreate(__pyx_v_memPool, __pyx_v_poolProps); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":479 + * return cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolCreate(memPool, poolProps) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":482 + * return cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolDestroy(memPool) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolDestroy(cudaMemPool_t __pyx_v_memPool) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":483 + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolDestroy(memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolDestroy(__pyx_v_memPool); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":482 + * return cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolDestroy(memPool) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":485 + * return cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocFromPoolAsync(void **__pyx_v_ptr, size_t __pyx_v_size, cudaMemPool_t __pyx_v_memPool, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":486 + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMallocFromPoolAsync(__pyx_v_ptr, __pyx_v_size, __pyx_v_memPool, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":485 + * return cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":488 + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportToShareableHandle(void *__pyx_v_shareableHandle, cudaMemPool_t __pyx_v_memPool, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":489 + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_memPool, __pyx_v_handleType, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":488 + * return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":491 + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportFromShareableHandle(cudaMemPool_t *__pyx_v_memPool, void *__pyx_v_shareableHandle, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":492 + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolImportFromShareableHandle(__pyx_v_memPool, __pyx_v_shareableHandle, __pyx_v_handleType, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":491 + * return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":494 + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolExportPointer(exportData, ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportPointer(struct cudaMemPoolPtrExportData *__pyx_v_exportData, void *__pyx_v_ptr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":495 + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolExportPointer(exportData, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolExportPointer(__pyx_v_exportData, __pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":494 + * return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolExportPointer(exportData, ptr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":497 + * return cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportPointer(void **__pyx_v_ptr, cudaMemPool_t __pyx_v_memPool, struct cudaMemPoolPtrExportData *__pyx_v_exportData) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":498 + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaMemPoolImportPointer(ptr, memPool, exportData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaMemPoolImportPointer(__pyx_v_ptr, __pyx_v_memPool, __pyx_v_exportData); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":497 + * return cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":500 + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaPointerGetAttributes(attributes, ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPointerGetAttributes(struct cudaPointerAttributes *__pyx_v_attributes, void const *__pyx_v_ptr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":501 + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaPointerGetAttributes(attributes, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaPointerGetAttributes(__pyx_v_attributes, __pyx_v_ptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":500 + * return cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaPointerGetAttributes(attributes, ptr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":503 + * return cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, int __pyx_v_device, int __pyx_v_peerDevice) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":504 + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_device, __pyx_v_peerDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":503 + * return cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":506 + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceEnablePeerAccess(int __pyx_v_peerDevice, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":507 + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceEnablePeerAccess(peerDevice, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceEnablePeerAccess(__pyx_v_peerDevice, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":506 + * return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":509 + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceDisablePeerAccess(peerDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceDisablePeerAccess(int __pyx_v_peerDevice) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":510 + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceDisablePeerAccess(peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceDisablePeerAccess(__pyx_v_peerDevice); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":509 + * return cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceDisablePeerAccess(peerDevice) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":512 + * return cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsUnregisterResource(resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnregisterResource(cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":513 + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsUnregisterResource(resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsUnregisterResource(__pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":512 + * return cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsUnregisterResource(resource) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":515 + * return cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":516 + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsResourceSetMapFlags(resource, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceSetMapFlags(__pyx_v_resource, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":515 + * return cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":518 + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsMapResources(count, resources, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsMapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":519 + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsMapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":518 + * return cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsMapResources(count, resources, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":521 + * return cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsUnmapResources(count, resources, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnmapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":522 + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsUnmapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":521 + * return cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsUnmapResources(count, resources, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":524 + * return cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedPointer(void **__pyx_v_devPtr, size_t *__pyx_v_size, cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":525 + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceGetMappedPointer(__pyx_v_devPtr, __pyx_v_size, __pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":524 + * return cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":527 + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsSubResourceGetMappedArray(cudaArray_t *__pyx_v_array, cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":528 + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsSubResourceGetMappedArray(__pyx_v_array, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":527 + * return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":530 + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":531 + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphicsResourceGetMappedMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_resource); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":530 + * return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":533 + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetChannelDesc(struct cudaChannelFormatDesc *__pyx_v_desc, cudaArray_const_t __pyx_v_array) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":534 + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetChannelDesc(desc, array) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: +*/ + __pyx_r = cudaGetChannelDesc(__pyx_v_desc, __pyx_v_array); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":533 + * return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":535 + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cudaCreateChannelDesc(x, y, z, w, f) +*/ + +static struct cudaChannelFormatDesc __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateChannelDesc(int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_w, enum cudaChannelFormatKind __pyx_v_f) { + struct cudaChannelFormatDesc __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":537 + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cudaCreateChannelDesc(x, y, z, w, f) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateChannelDesc(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w, __pyx_v_f); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":535 + * cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cudaCreateChannelDesc(x, y, z, w, f) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":539 + * return cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateTextureObject(cudaTextureObject_t *__pyx_v_pTexObject, struct cudaResourceDesc const *__pyx_v_pResDesc, struct cudaTextureDesc const *__pyx_v_pTexDesc, struct cudaResourceViewDesc const *__pyx_v_pResViewDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":540 + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateTextureObject(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":539 + * return cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":542 + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyTextureObject(texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyTextureObject(cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":543 + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDestroyTextureObject(texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroyTextureObject(__pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":542 + * return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroyTextureObject(texObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":545 + * return cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":546 + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":545 + * return cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":548 + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectTextureDesc(struct cudaTextureDesc *__pyx_v_pTexDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":549 + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":548 + * return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":551 + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceViewDesc(struct cudaResourceViewDesc *__pyx_v_pResViewDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":552 + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetTextureObjectResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":551 + * return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":554 + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateSurfaceObject(cudaSurfaceObject_t *__pyx_v_pSurfObject, struct cudaResourceDesc const *__pyx_v_pResDesc) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":555 + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaCreateSurfaceObject(__pyx_v_pSurfObject, __pyx_v_pResDesc); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":554 + * return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":557 + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroySurfaceObject(surfObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroySurfaceObject(cudaSurfaceObject_t __pyx_v_surfObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":558 + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDestroySurfaceObject(surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDestroySurfaceObject(__pyx_v_surfObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":557 + * return cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDestroySurfaceObject(surfObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":560 + * return cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetSurfaceObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaSurfaceObject_t __pyx_v_surfObject) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":561 + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetSurfaceObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":560 + * return cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":563 + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDriverGetVersion(driverVersion) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDriverGetVersion(int *__pyx_v_driverVersion) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":564 + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDriverGetVersion(driverVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDriverGetVersion(__pyx_v_driverVersion); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":563 + * return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDriverGetVersion(driverVersion) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":566 + * return cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaRuntimeGetVersion(runtimeVersion) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaRuntimeGetVersion(int *__pyx_v_runtimeVersion) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":567 + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaRuntimeGetVersion(runtimeVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaRuntimeGetVersion(__pyx_v_runtimeVersion); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":566 + * return cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaRuntimeGetVersion(runtimeVersion) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":569 + * return cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphCreate(pGraph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphCreate(cudaGraph_t *__pyx_v_pGraph, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":570 + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphCreate(pGraph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphCreate(__pyx_v_pGraph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":569 + * return cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphCreate(pGraph, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":572 + * return cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddKernelNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":573 + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddKernelNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":572 + * return cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":575 + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":576 + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphKernelNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":575 + * return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":578 + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":579 + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphKernelNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":578 + * return cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":581 + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t __pyx_v_hSrc, cudaGraphNode_t __pyx_v_hDst) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":582 + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeCopyAttributes(__pyx_v_hSrc, __pyx_v_hDst); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":581 + * return cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":584 + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue *__pyx_v_value_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":585 + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeGetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":584 + * return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":587 + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue const *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":588 + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphKernelNodeSetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":587 + * return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":590 + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemcpy3DParms const *__pyx_v_pCopyParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":591 + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemcpyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pCopyParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":590 + * return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":593 + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode1D(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":594 + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemcpyNode1D(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":593 + * return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":596 + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":597 + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":596 + * return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":599 + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":600 + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":599 + * return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":602 + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":603 + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemcpyNodeSetParams1D(__pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":602 + * return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":605 + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemsetNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemsetParams const *__pyx_v_pMemsetParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":606 + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemsetNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pMemsetParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":605 + * return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":608 + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":609 + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemsetNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":608 + * return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":611 + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":612 + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemsetNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":611 + * return cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":614 + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddHostNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":615 + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddHostNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":614 + * return cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":617 + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":618 + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphHostNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphHostNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":617 + * return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":620 + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":621 + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphHostNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphHostNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":620 + * return cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":623 + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddChildGraphNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaGraph_t __pyx_v_childGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":624 + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddChildGraphNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_childGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":623 + * return cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":626 + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t __pyx_v_node, cudaGraph_t *__pyx_v_pGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":627 + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphChildGraphNodeGetGraph(__pyx_v_node, __pyx_v_pGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":626 + * return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":629 + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEmptyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":630 + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEmptyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":629 + * return cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":632 + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventRecordNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":633 + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEventRecordNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":632 + * return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":635 + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":636 + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphEventRecordNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventRecordNodeGetEvent(__pyx_v_node, __pyx_v_event_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":635 + * return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":638 + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeSetEvent(node, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":639 + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphEventRecordNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventRecordNodeSetEvent(__pyx_v_node, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":638 + * return cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventRecordNodeSetEvent(node, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":641 + * return cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":642 + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddEventWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":641 + * return cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":644 + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":645 + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphEventWaitNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventWaitNodeGetEvent(__pyx_v_node, __pyx_v_event_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":644 + * return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":647 + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeSetEvent(node, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":648 + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphEventWaitNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphEventWaitNodeSetEvent(__pyx_v_node, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":647 + * return cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphEventWaitNodeSetEvent(node, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":650 + * return cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":651 + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddExternalSemaphoresSignalNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":650 + * return cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":653 + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":654 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":653 + * return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":656 + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":657 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":656 + * return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":659 + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":660 + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddExternalSemaphoresWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":659 + * return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":662 + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":663 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":662 + * return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":665 + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":666 + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":665 + * return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":668 + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemAllocNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemAllocNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":669 + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemAllocNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":668 + * return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":671 + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemAllocNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemAllocNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":672 + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemAllocNodeGetParams(node, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemAllocNodeGetParams(__pyx_v_node, __pyx_v_params_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":671 + * return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":674 + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemFreeNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dptr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":675 + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddMemFreeNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dptr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":674 + * return cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":677 + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemFreeNodeGetParams(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dptr_out) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":678 + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphMemFreeNodeGetParams(__pyx_v_node, __pyx_v_dptr_out); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":677 + * return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":680 + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGraphMemTrim(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGraphMemTrim(int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":681 + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGraphMemTrim(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGraphMemTrim(__pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":680 + * return cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGraphMemTrim(device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":683 + * return cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":684 + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceGetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceGetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":683 + * return cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":686 + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":687 + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaDeviceSetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaDeviceSetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":686 + * return cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":689 + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphClone(pGraphClone, originalGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphClone(cudaGraph_t *__pyx_v_pGraphClone, cudaGraph_t __pyx_v_originalGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":690 + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphClone(pGraphClone, originalGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphClone(__pyx_v_pGraphClone, __pyx_v_originalGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":689 + * return cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphClone(pGraphClone, originalGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":692 + * return cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeFindInClone(cudaGraphNode_t *__pyx_v_pNode, cudaGraphNode_t __pyx_v_originalNode, cudaGraph_t __pyx_v_clonedGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":693 + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeFindInClone(__pyx_v_pNode, __pyx_v_originalNode, __pyx_v_clonedGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":692 + * return cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":695 + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetType(node, pType) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetType(cudaGraphNode_t __pyx_v_node, enum cudaGraphNodeType *__pyx_v_pType) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":696 + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetType(node, pType) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetType(__pyx_v_node, __pyx_v_pType); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":695 + * return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetType(node, pType) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":698 + * return cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetNodes(graph, nodes, numNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_nodes, size_t *__pyx_v_numNodes) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":699 + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphGetNodes(graph, nodes, numNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetNodes(__pyx_v_graph, __pyx_v_nodes, __pyx_v_numNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":698 + * return cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetNodes(graph, nodes, numNodes) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":701 + * return cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetRootNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_pRootNodes, size_t *__pyx_v_pNumRootNodes) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":702 + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetRootNodes(__pyx_v_graph, __pyx_v_pRootNodes, __pyx_v_pNumRootNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":701 + * return cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":704 + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, size_t *__pyx_v_numEdges) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":705 + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphGetEdges(graph, from_, to, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetEdges(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":704 + * return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":707 + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":708 + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphGetEdges_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":707 + * return cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":710 + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, size_t *__pyx_v_pNumDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":711 + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependencies(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_pNumDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":710 + * return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":713 + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":714 + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependencies_v2(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_edgeData, __pyx_v_pNumDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":713 + * return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":716 + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, size_t *__pyx_v_pNumDependentNodes) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":717 + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependentNodes(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_pNumDependentNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":716 + * return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":719 + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependentNodes) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":720 + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetDependentNodes_v2(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_edgeData, __pyx_v_pNumDependentNodes); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":719 + * return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":722 + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":723 + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":722 + * return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":725 + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":726 + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":725 + * return cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":728 + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":729 + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRemoveDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":728 + * return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":731 + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":732 + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRemoveDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":731 + * return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":734 + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDestroyNode(node) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroyNode(cudaGraphNode_t __pyx_v_node) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":735 + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphDestroyNode(node) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDestroyNode(__pyx_v_node); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":734 + * return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDestroyNode(node) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":737 + * return cudaGraphDestroyNode(node) + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiate(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":738 + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphInstantiate(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiate(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":737 + * return cudaGraphDestroyNode(node) + * + * cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":740 + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithFlags(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":741 + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiateWithFlags(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":740 + * return cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":743 + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithParams(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, cudaGraphInstantiateParams *__pyx_v_instantiateParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":744 + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphInstantiateWithParams(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_instantiateParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":743 + * return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":746 + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecGetFlags(graphExec, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecGetFlags(cudaGraphExec_t __pyx_v_graphExec, unsigned PY_LONG_LONG *__pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":747 + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecGetFlags(graphExec, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecGetFlags(__pyx_v_graphExec, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":746 + * return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecGetFlags(graphExec, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":749 + * return cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecKernelNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":750 + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecKernelNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":749 + * return cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":752 + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":753 + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":752 + * return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":755 + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":756 + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemcpyNodeSetParams1D(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, __pyx_v_kind); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":755 + * return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":758 + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":759 + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":758 + * return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":761 + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecHostNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":762 + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":761 + * return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":764 + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, cudaGraph_t __pyx_v_childGraph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":765 + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_childGraph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":764 + * return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":767 + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":768 + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":767 + * return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":770 + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":771 + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":770 + * return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":773 + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":774 + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":773 + * return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":776 + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":777 + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":776 + * return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":779 + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int __pyx_v_isEnabled) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":780 + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":779 + * return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":782 + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":783 + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":782 + * return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":785 + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecUpdate(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraph_t __pyx_v_hGraph, cudaGraphExecUpdateResultInfo *__pyx_v_resultInfo) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":786 + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecUpdate(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":785 + * return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":788 + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphUpload(graphExec, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphUpload(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":789 + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphUpload(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphUpload(__pyx_v_graphExec, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":788 + * return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphUpload(graphExec, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":791 + * return cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphLaunch(graphExec, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphLaunch(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":792 + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphLaunch(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphLaunch(__pyx_v_graphExec, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":791 + * return cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphLaunch(graphExec, stream) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":794 + * return cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecDestroy(graphExec) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecDestroy(cudaGraphExec_t __pyx_v_graphExec) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":795 + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecDestroy(graphExec) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecDestroy(__pyx_v_graphExec); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":794 + * return cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecDestroy(graphExec) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":797 + * return cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDestroy(graph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroy(cudaGraph_t __pyx_v_graph) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":798 + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphDestroy(graph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDestroy(__pyx_v_graph); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":797 + * return cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDestroy(graph) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":800 + * return cudaGraphDestroy(graph) + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDebugDotPrint(graph, path, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDebugDotPrint(cudaGraph_t __pyx_v_graph, char const *__pyx_v_path, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":801 + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphDebugDotPrint(graph, path, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphDebugDotPrint(__pyx_v_graph, __pyx_v_path, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":800 + * return cudaGraphDestroy(graph) + * + * cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphDebugDotPrint(graph, path, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":803 + * return cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectCreate(cudaUserObject_t *__pyx_v_object_out, void *__pyx_v_ptr, cudaHostFn_t __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":804 + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":803 + * return cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":806 + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectRetain(object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRetain(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":807 + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaUserObjectRetain(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectRetain(__pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":806 + * return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectRetain(object, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":809 + * return cudaUserObjectRetain(object, count) + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectRelease(object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRelease(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":810 + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaUserObjectRelease(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaUserObjectRelease(__pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":809 + * return cudaUserObjectRetain(object, count) + * + * cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaUserObjectRelease(object, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":812 + * return cudaUserObjectRelease(object, count) + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRetainUserObject(graph, object, count, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRetainUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":813 + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphRetainUserObject(graph, object, count, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":812 + * return cudaUserObjectRelease(object, count) + * + * cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphRetainUserObject(graph, object, count, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":815 + * return cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphReleaseUserObject(graph, object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphReleaseUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":816 + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphReleaseUserObject(graph, object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":815 + * return cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphReleaseUserObject(graph, object, count) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":818 + * return cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":819 + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":818 + * return cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":821 + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode_v2(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":822 + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphAddNode_v2(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":821 + * return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":824 + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeSetParams(node, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":825 + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphNodeSetParams(node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphNodeSetParams(__pyx_v_node, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":824 + * return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphNodeSetParams(node, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":827 + * return cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecNodeSetParams(cudaGraphExec_t __pyx_v_graphExec, cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":828 + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphExecNodeSetParams(__pyx_v_graphExec, __pyx_v_node, __pyx_v_nodeParams); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":827 + * return cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":830 + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle *__pyx_v_pHandle_out, cudaGraph_t __pyx_v_graph, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":831 + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_graph, __pyx_v_defaultLaunchValue, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":830 + * return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":833 + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPoint(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":834 + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDriverEntryPoint(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_flags, __pyx_v_driverStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":833 + * return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":836 + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPointByVersion(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned int __pyx_v_cudaVersion, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":837 + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetDriverEntryPointByVersion(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_driverStatus); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":836 + * return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":839 + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadData(cudaLibrary_t *__pyx_v_library, void const *__pyx_v_code, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":840 + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryLoadData(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":839 + * return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":842 + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadFromFile(cudaLibrary_t *__pyx_v_library, char const *__pyx_v_fileName, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":843 + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":842 + * return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":845 + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryUnload(library) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryUnload(cudaLibrary_t __pyx_v_library) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":846 + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryUnload(library) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryUnload(__pyx_v_library); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":845 + * return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryUnload(library) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":848 + * return cudaLibraryUnload(library) + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetKernel(pKernel, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernel(cudaKernel_t *__pyx_v_pKernel, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":849 + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryGetKernel(pKernel, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":848 + * return cudaLibraryUnload(library) + * + * cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetKernel(pKernel, library, name) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":851 + * return cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetGlobal(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":852 + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":851 + * return cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":854 + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetManaged(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":855 + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryGetManaged(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":854 + * return cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":857 + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetUnifiedFunction(void **__pyx_v_fptr, cudaLibrary_t __pyx_v_library, char const *__pyx_v_symbol) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":858 + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":857 + * return cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":860 + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetKernelCount(count, lib) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernelCount(unsigned int *__pyx_v_count, cudaLibrary_t __pyx_v_lib) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":861 + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryGetKernelCount(count, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":860 + * return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryGetKernelCount(count, lib) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":863 + * return cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryEnumerateKernels(cudaKernel_t *__pyx_v_kernels, unsigned int __pyx_v_numKernels, cudaLibrary_t __pyx_v_lib) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":864 + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":863 + * return cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":866 + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaKernelSetAttributeForDevice(cudaKernel_t __pyx_v_kernel, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value, int __pyx_v_device) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":867 + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaKernelSetAttributeForDevice(__pyx_v_kernel, __pyx_v_attr, __pyx_v_value, __pyx_v_device); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":866 + * return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":869 + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetExportTable(ppExportTable, pExportTableId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetExportTable(void const **__pyx_v_ppExportTable, cudaUUID_t const *__pyx_v_pExportTableId) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":870 + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetExportTable(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":869 + * return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetExportTable(ppExportTable, pExportTableId) + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":872 + * return cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetKernel(cudaKernel_t *__pyx_v_kernelPtr, void const *__pyx_v_entryFuncAddr) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":873 + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetKernel(kernelPtr, entryFuncAddr) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: +*/ + __pyx_r = cudaGetKernel(__pyx_v_kernelPtr, __pyx_v_entryFuncAddr); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":872 + * return cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":874 + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + +static struct cudaPitchedPtr __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPitchedPtr(void *__pyx_v_d, size_t __pyx_v_p, size_t __pyx_v_xsz, size_t __pyx_v_ysz) { + struct cudaPitchedPtr __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":876 + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return make_cudaPitchedPtr(d, p, xsz, ysz) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: +*/ + __pyx_r = make_cudaPitchedPtr(__pyx_v_d, __pyx_v_p, __pyx_v_xsz, __pyx_v_ysz); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":874 + * cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":877 + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return make_cudaPos(x, y, z) +*/ + +static struct cudaPos __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPos(size_t __pyx_v_x, size_t __pyx_v_y, size_t __pyx_v_z) { + struct cudaPos __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":879 + * @cython.show_performance_hints(False) + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return make_cudaPos(x, y, z) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: +*/ + __pyx_r = make_cudaPos(__pyx_v_x, __pyx_v_y, __pyx_v_z); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":877 + * cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return make_cudaPos(x, y, z) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":880 + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return make_cudaExtent(w, h, d) +*/ + +static struct cudaExtent __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaExtent(size_t __pyx_v_w, size_t __pyx_v_h, size_t __pyx_v_d) { + struct cudaExtent __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":882 + * @cython.show_performance_hints(False) + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return make_cudaExtent(w, h, d) # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = make_cudaExtent(__pyx_v_w, __pyx_v_h, __pyx_v_d); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":880 + * cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return make_cudaExtent(w, h, d) +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":884 + * return make_cudaExtent(w, h, d) + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaProfilerStart() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStart(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":885 + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaProfilerStart() # <<<<<<<<<<<<<< + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_r = cudaProfilerStart(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":884 + * return make_cudaExtent(w, h, d) + * + * cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaProfilerStart() + * +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_bindings/cyruntime_ptds.pyx":887 + * return cudaProfilerStart() + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaProfilerStop() +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStop(void) { + cudaError_t __pyx_r; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":888 + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cudaProfilerStop() # <<<<<<<<<<<<<< +*/ + __pyx_r = cudaProfilerStop(); + goto __pyx_L0; + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":887 + * return cudaProfilerStart() + * + * cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cudaProfilerStop() +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_cudaDeviceReset", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceReset, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSynchronize, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetLimit, "cudaError_t (enum cudaLimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetLimit, "cudaError_t (size_t *, enum cudaLimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetTexture1DLinearMaxWidth, "cudaError_t (size_t *, struct cudaChannelFormatDesc const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetCacheConfig, "cudaError_t (enum cudaFuncCache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetStreamPriorityRange, "cudaError_t (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetCacheConfig, "cudaError_t (enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetByPCIBusId, "cudaError_t (int *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetPCIBusId, "cudaError_t (char *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetEventHandle, "cudaError_t (cudaIpcEventHandle_t *, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenEventHandle, "cudaError_t (cudaEvent_t *, cudaIpcEventHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcGetMemHandle, "cudaError_t (cudaIpcMemHandle_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcOpenMemHandle, "cudaError_t (void **, cudaIpcMemHandle_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaIpcCloseMemHandle, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceFlushGPUDirectRDMAWrites, "cudaError_t (enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceRegisterAsyncNotification, "cudaError_t (int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceUnregisterAsyncNotification, "cudaError_t (int, cudaAsyncCallbackHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaPeekAtLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPeekAtLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetErrorName", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorName, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetErrorString, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceCount, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceProperties_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceProperties_v2, "cudaError_t (struct cudaDeviceProp *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetAttribute, "cudaError_t (int *, enum cudaDeviceAttr, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetDefaultMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetMemPool, "cudaError_t (int, cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetNvSciSyncAttributes, "cudaError_t (void *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetP2PAttribute, "cudaError_t (int *, enum cudaDeviceP2PAttr, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaChooseDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaChooseDevice, "cudaError_t (int *, struct cudaDeviceProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaInitDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaInitDevice, "cudaError_t (int, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDevice, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDevice, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSetDeviceFlags, "cudaError_t (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDeviceFlags, "cudaError_t (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreate, "cudaError_t (cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithFlags, "cudaError_t (cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCreateWithPriority, "cudaError_t (cudaStream_t *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetPriority, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetFlags, "cudaError_t (cudaStream_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetId", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetId, "cudaError_t (cudaStream_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetDevice, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCtxResetPersistingL2Cache, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamCopyAttributes, "cudaError_t (cudaStream_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaStreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamDestroy, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamWaitEvent, "cudaError_t (cudaStream_t, cudaEvent_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamAddCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAddCallback, "cudaError_t (cudaStream_t, cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamSynchronize, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamQuery, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamAttachMemAsync, "cudaError_t (cudaStream_t, void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCapture, "cudaError_t (cudaStream_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamBeginCaptureToGraph, "cudaError_t (cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaThreadExchangeStreamCaptureMode, "cudaError_t (enum cudaStreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamEndCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamEndCapture, "cudaError_t (cudaStream_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamIsCapturing, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetCaptureInfo_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v2, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamGetCaptureInfo_v3, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies, "cudaError_t (cudaStream_t, cudaGraphNode_t *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaStreamUpdateCaptureDependencies_v2, "cudaError_t (cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreate, "cudaError_t (cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventCreateWithFlags, "cudaError_t (cudaEvent_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventRecord", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecord, "cudaError_t (cudaEvent_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventRecordWithFlags, "cudaError_t (cudaEvent_t, cudaStream_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventQuery, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventSynchronize, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventDestroy, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventElapsedTime", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaEventElapsedTime_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaEventElapsedTime_v2, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaImportExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalMemory, "cudaError_t (cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedBuffer, "cudaError_t (void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaExternalMemoryGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalMemory, "cudaError_t (cudaExternalMemory_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaImportExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaSignalExternalSemaphoresAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaSignalExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaWaitExternalSemaphoresAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaWaitExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetCacheConfig, "cudaError_t (void const *, enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncGetAttributes, "cudaError_t (struct cudaFuncAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetAttribute, "cudaError_t (void const *, enum cudaFuncAttribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLaunchHostFunc, "cudaError_t (cudaStream_t, cudaHostFn_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFuncSetSharedMemConfig, "cudaError_t (void const *, enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessor, "cudaError_t (int *, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyAvailableDynamicSMemPerBlock, "cudaError_t (size_t *, void const *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "cudaError_t (int *, void const *, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocManaged, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocHost", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocHost, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocPitch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocPitch, "cudaError_t (void **, size_t *, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFree", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFree, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeHost", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeHost, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeArray, "cudaError_t (cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeMipmappedArray, "cudaError_t (cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostAlloc, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostRegister, "cudaError_t (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostUnregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostUnregister, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetDevicePointer, "cudaError_t (void **, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaHostGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaHostGetFlags, "cudaError_t (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3D, "cudaError_t (struct cudaPitchedPtr *, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMalloc3DArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMalloc3DArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetMipmappedArrayLevel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetMipmappedArrayLevel, "cudaError_t (cudaArray_t *, cudaMipmappedArray_const_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3D, "cudaError_t (struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeer, "cudaError_t (struct cudaMemcpy3DPeerParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DAsync, "cudaError_t (struct cudaMemcpy3DParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DPeerAsync, "cudaError_t (struct cudaMemcpy3DPeerParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemGetInfo, "cudaError_t (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetInfo, "cudaError_t (struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetPlane", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetPlane, "cudaError_t (cudaArray_t *, cudaArray_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMipmappedArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeer, "cudaError_t (void *, int, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2D, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArray, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyAsync, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyPeerAsync, "cudaError_t (void *, int, void const *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyBatchAsync, "cudaError_t (void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy3DBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy3DBatchAsync, "cudaError_t (size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DAsync, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpy2DFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpy2DFromArrayAsync, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset, "cudaError_t (void *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset2D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2D, "cudaError_t (void *, size_t, int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset3D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3D, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemsetAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemsetAsync, "cudaError_t (void *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset2DAsync, "cudaError_t (void *, size_t, int, size_t, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemset3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemset3DAsync, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync, "cudaError_t (void const *, size_t, int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPrefetchAsync_v2, "cudaError_t (void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemAdvise", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemAdvise_v2, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttribute, "cudaError_t (void *, size_t, enum cudaMemRangeAttribute, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemRangeGetAttributes, "cudaError_t (void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArray, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemcpyFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemcpyFromArrayAsync, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocAsync, "cudaError_t (void **, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaFreeAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaFreeAsync, "cudaError_t (void *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolTrimTo, "cudaError_t (cudaMemPool_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolSetAccess, "cudaError_t (cudaMemPool_t, struct cudaMemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolGetAccess, "cudaError_t (enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolCreate, "cudaError_t (cudaMemPool_t *, struct cudaMemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolDestroy, "cudaError_t (cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMallocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMallocFromPoolAsync, "cudaError_t (void **, size_t, cudaMemPool_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportToShareableHandle, "cudaError_t (void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportFromShareableHandle, "cudaError_t (cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolExportPointer, "cudaError_t (struct cudaMemPoolPtrExportData *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaMemPoolImportPointer, "cudaError_t (void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaPointerGetAttributes, "cudaError_t (struct cudaPointerAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceCanAccessPeer, "cudaError_t (int *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceEnablePeerAccess, "cudaError_t (int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceDisablePeerAccess, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnregisterResource, "cudaError_t (cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceSetMapFlags, "cudaError_t (cudaGraphicsResource_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsMapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsUnmapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedPointer, "cudaError_t (void **, size_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsSubResourceGetMappedArray, "cudaError_t (cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphicsResourceGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetChannelDesc, "cudaError_t (struct cudaChannelFormatDesc *, cudaArray_const_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateChannelDesc, "struct cudaChannelFormatDesc (int, int, int, int, enum cudaChannelFormatKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateTextureObject, "cudaError_t (cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroyTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroyTextureObject, "cudaError_t (cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectTextureDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectTextureDesc, "cudaError_t (struct cudaTextureDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetTextureObjectResourceViewDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetTextureObjectResourceViewDesc, "cudaError_t (struct cudaResourceViewDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaCreateSurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaCreateSurfaceObject, "cudaError_t (cudaSurfaceObject_t *, struct cudaResourceDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDestroySurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDestroySurfaceObject, "cudaError_t (cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetSurfaceObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetSurfaceObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDriverGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDriverGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaRuntimeGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaRuntimeGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphCreate, "cudaError_t (cudaGraph_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddKernelNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeCopyAttributes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeGetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphKernelNodeSetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_14cyruntime_ptds_cudaKernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemcpyNode1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemcpyNode1D, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemcpyNodeSetParams1D, "cudaError_t (cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemsetNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemsetNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddHostNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphHostNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddChildGraphNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphChildGraphNodeGetGraph, "cudaError_t (cudaGraphNode_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEmptyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventRecordNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventRecordNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddEventWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphEventWaitNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresSignalNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddExternalSemaphoresWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemAllocNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemAllocNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddMemFreeNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphMemFreeNodeGetParams, "cudaError_t (cudaGraphNode_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGraphMemTrim, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceGetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaDeviceSetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphClone, "cudaError_t (cudaGraph_t *, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeFindInClone, "cudaError_t (cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetType, "cudaError_t (cudaGraphNode_t, enum cudaGraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetRootNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetEdges", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphGetEdges_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependencies_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetDependentNodes_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRemoveDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroyNode, "cudaError_t (cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiate, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithFlags, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphInstantiateWithParams, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecGetFlags, "cudaError_t (cudaGraphExec_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecKernelNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemcpyNodeSetParams1D, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecMemsetNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecHostNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecChildGraphNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventRecordNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecEventWaitNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeGetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecUpdate, "cudaError_t (cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphUpload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphUpload, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphLaunch, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecDestroy, "cudaError_t (cudaGraphExec_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDestroy, "cudaError_t (cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphDebugDotPrint, "cudaError_t (cudaGraph_t, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectCreate, "cudaError_t (cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectRetain", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRetain, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaUserObjectRelease", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaUserObjectRelease, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphRetainUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphReleaseUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddNode", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphAddNode_v2, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphExecNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGraphConditionalHandleCreate, "cudaError_t (cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDriverEntryPoint", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPoint, "cudaError_t (char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetDriverEntryPointByVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetDriverEntryPointByVersion, "cudaError_t (char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadData, "cudaError_t (cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryLoadFromFile, "cudaError_t (cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryUnload", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryUnload, "cudaError_t (cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernel, "cudaError_t (cudaKernel_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetGlobal, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetManaged, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetUnifiedFunction, "cudaError_t (void **, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryGetKernelCount, "cudaError_t (unsigned int *, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaLibraryEnumerateKernels, "cudaError_t (cudaKernel_t *, unsigned int, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaKernelSetAttributeForDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaKernelSetAttributeForDevice, "cudaError_t (cudaKernel_t, enum cudaFuncAttribute, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetExportTable", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetExportTable, "cudaError_t (void const **, cudaUUID_t const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaGetKernel, "cudaError_t (cudaKernel_t *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaPitchedPtr", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPitchedPtr, "struct cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaPos", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaPos, "struct cudaPos (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_make_cudaExtent", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__make_cudaExtent, "struct cudaExtent (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaProfilerStart", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStart, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cudaProfilerStop", (void (*)(void))__pyx_f_4cuda_8bindings_9_bindings_14cyruntime_ptds__cudaProfilerStop, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cyruntime_ptds(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cyruntime_ptds}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cyruntime_ptds", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cyruntime_ptds(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cyruntime_ptds(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cyruntime_ptds(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cyruntime_ptds' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cyruntime_ptds" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cyruntime_ptds", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___bindings__cyruntime_ptds) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._bindings.cyruntime_ptds")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._bindings.cyruntime_ptds", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_bindings/cyruntime_ptds.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._bindings.cyruntime_ptds", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._bindings.cyruntime_ptds"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pxd new file mode 100644 index 0000000000000000000000000000000000000000..b16e92856bde16a82beb46a98d575f78bc0d4ad6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pxd @@ -0,0 +1,594 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cdef extern from "": + """ + #define CUDA_API_PER_THREAD_DEFAULT_STREAM + """ + +include "../cyruntime_types.pxi" + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil + +cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil + +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil + +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil + +cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil + +cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil + +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pyx new file mode 100644 index 0000000000000000000000000000000000000000..4c806962113708f065a0adc9763659f1e4edc9e2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/cyruntime_ptds.pyx @@ -0,0 +1,888 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cdef extern from "": + """ + #define CUDA_API_PER_THREAD_DEFAULT_STREAM + """ + +include "../cyruntime_functions.pxi" + +cimport cython + +cdef cudaError_t _cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceReset() + +cdef cudaError_t _cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSynchronize() + +cdef cudaError_t _cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSetLimit(limit, value) + +cdef cudaError_t _cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetLimit(pValue, limit) + +cdef cudaError_t _cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + +cdef cudaError_t _cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetCacheConfig(pCacheConfig) + +cdef cudaError_t _cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + +cdef cudaError_t _cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSetCacheConfig(cacheConfig) + +cdef cudaError_t _cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetByPCIBusId(device, pciBusId) + +cdef cudaError_t _cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetPCIBusId(pciBusId, length, device) + +cdef cudaError_t _cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaIpcGetEventHandle(handle, event) + +cdef cudaError_t _cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaIpcOpenEventHandle(event, handle) + +cdef cudaError_t _cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaIpcGetMemHandle(handle, devPtr) + +cdef cudaError_t _cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaIpcOpenMemHandle(devPtr, handle, flags) + +cdef cudaError_t _cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaIpcCloseMemHandle(devPtr) + +cdef cudaError_t _cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + +cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + +cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceUnregisterAsyncNotification(device, callback) + +cdef cudaError_t _cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetSharedMemConfig(pConfig) + +cdef cudaError_t _cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSetSharedMemConfig(config) + +cdef cudaError_t _cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetLastError() + +cdef cudaError_t _cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaPeekAtLastError() + +cdef const char* _cudaGetErrorName(cudaError_t error) except ?NULL nogil: + return cudaGetErrorName(error) + +cdef const char* _cudaGetErrorString(cudaError_t error) except ?NULL nogil: + return cudaGetErrorString(error) + +cdef cudaError_t _cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDeviceCount(count) + +cdef cudaError_t _cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDeviceProperties_v2(prop, device) + +cdef cudaError_t _cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetAttribute(value, attr, device) + +cdef cudaError_t _cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetDefaultMemPool(memPool, device) + +cdef cudaError_t _cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSetMemPool(device, memPool) + +cdef cudaError_t _cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetMemPool(memPool, device) + +cdef cudaError_t _cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + +cdef cudaError_t _cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + +cdef cudaError_t _cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaChooseDevice(device, prop) + +cdef cudaError_t _cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaInitDevice(device, deviceFlags, flags) + +cdef cudaError_t _cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaSetDevice(device) + +cdef cudaError_t _cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDevice(device) + +cdef cudaError_t _cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaSetDeviceFlags(flags) + +cdef cudaError_t _cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDeviceFlags(flags) + +cdef cudaError_t _cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamCreate(pStream) + +cdef cudaError_t _cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamCreateWithFlags(pStream, flags) + +cdef cudaError_t _cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamCreateWithPriority(pStream, flags, priority) + +cdef cudaError_t _cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetPriority(hStream, priority) + +cdef cudaError_t _cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetFlags(hStream, flags) + +cdef cudaError_t _cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetId(hStream, streamId) + +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetDevice(hStream, device) + +cdef cudaError_t _cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaCtxResetPersistingL2Cache() + +cdef cudaError_t _cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamCopyAttributes(dst, src) + +cdef cudaError_t _cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetAttribute(hStream, attr, value_out) + +cdef cudaError_t _cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamSetAttribute(hStream, attr, value) + +cdef cudaError_t _cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamDestroy(stream) + +cdef cudaError_t _cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamWaitEvent(stream, event, flags) + +cdef cudaError_t _cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamAddCallback(stream, callback, userData, flags) + +cdef cudaError_t _cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamSynchronize(stream) + +cdef cudaError_t _cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamQuery(stream) + +cdef cudaError_t _cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamAttachMemAsync(stream, devPtr, length, flags) + +cdef cudaError_t _cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamBeginCapture(stream, mode) + +cdef cudaError_t _cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + +cdef cudaError_t _cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaThreadExchangeStreamCaptureMode(mode) + +cdef cudaError_t _cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamEndCapture(stream, pGraph) + +cdef cudaError_t _cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamIsCapturing(stream, pCaptureStatus) + +cdef cudaError_t _cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetCaptureInfo_v2_ptsz(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + +cdef cudaError_t _cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + +cdef cudaError_t _cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + +cdef cudaError_t _cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventCreate(event) + +cdef cudaError_t _cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventCreateWithFlags(event, flags) + +cdef cudaError_t _cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventRecord(event, stream) + +cdef cudaError_t _cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventRecordWithFlags(event, stream, flags) + +cdef cudaError_t _cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventQuery(event) + +cdef cudaError_t _cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventSynchronize(event) + +cdef cudaError_t _cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventDestroy(event) + +cdef cudaError_t _cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventElapsedTime(ms, start, end) + +cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaEventElapsedTime_v2(ms, start, end) + +cdef cudaError_t _cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaImportExternalMemory(extMem_out, memHandleDesc) + +cdef cudaError_t _cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + +cdef cudaError_t _cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + +cdef cudaError_t _cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDestroyExternalMemory(extMem) + +cdef cudaError_t _cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaImportExternalSemaphore(extSem_out, semHandleDesc) + +cdef cudaError_t _cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaSignalExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t _cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaWaitExternalSemaphoresAsync_v2_ptsz(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t _cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDestroyExternalSemaphore(extSem) + +cdef cudaError_t _cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFuncSetCacheConfig(func, cacheConfig) + +cdef cudaError_t _cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFuncGetAttributes(attr, func) + +cdef cudaError_t _cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFuncSetAttribute(func, attr, value) + +cdef cudaError_t _cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLaunchHostFunc(stream, fn, userData) + +cdef cudaError_t _cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFuncSetSharedMemConfig(func, config) + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + +cdef cudaError_t _cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + +cdef cudaError_t _cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + +cdef cudaError_t _cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocManaged(devPtr, size, flags) + +cdef cudaError_t _cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMalloc(devPtr, size) + +cdef cudaError_t _cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocHost(ptr, size) + +cdef cudaError_t _cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocPitch(devPtr, pitch, width, height) + +cdef cudaError_t _cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocArray(array, desc, width, height, flags) + +cdef cudaError_t _cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFree(devPtr) + +cdef cudaError_t _cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFreeHost(ptr) + +cdef cudaError_t _cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFreeArray(array) + +cdef cudaError_t _cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFreeMipmappedArray(mipmappedArray) + +cdef cudaError_t _cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaHostAlloc(pHost, size, flags) + +cdef cudaError_t _cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaHostRegister(ptr, size, flags) + +cdef cudaError_t _cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaHostUnregister(ptr) + +cdef cudaError_t _cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaHostGetDevicePointer(pDevice, pHost, flags) + +cdef cudaError_t _cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaHostGetFlags(pFlags, pHost) + +cdef cudaError_t _cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMalloc3D(pitchedDevPtr, extent) + +cdef cudaError_t _cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMalloc3DArray(array, desc, extent, flags) + +cdef cudaError_t _cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + +cdef cudaError_t _cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + +cdef cudaError_t _cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy3D(p) + +cdef cudaError_t _cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy3DPeer(p) + +cdef cudaError_t _cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy3DAsync(p, stream) + +cdef cudaError_t _cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy3DPeerAsync(p, stream) + +cdef cudaError_t _cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemGetInfo(free, total) + +cdef cudaError_t _cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaArrayGetInfo(desc, extent, flags, array) + +cdef cudaError_t _cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + +cdef cudaError_t _cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + +cdef cudaError_t _cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + +cdef cudaError_t _cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaArrayGetSparseProperties(sparseProperties, array) + +cdef cudaError_t _cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + +cdef cudaError_t _cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy(dst, src, count, kind) + +cdef cudaError_t _cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + +cdef cudaError_t _cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + +cdef cudaError_t _cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + +cdef cudaError_t _cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyAsync(dst, src, count, kind, stream) + +cdef cudaError_t _cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + +cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + +cdef cudaError_t _cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + +cdef cudaError_t _cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + +cdef cudaError_t _cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + +cdef cudaError_t _cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemset(devPtr, value, count) + +cdef cudaError_t _cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemset2D(devPtr, pitch, value, width, height) + +cdef cudaError_t _cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemset3D(pitchedDevPtr, value, extent) + +cdef cudaError_t _cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemsetAsync(devPtr, value, count, stream) + +cdef cudaError_t _cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + +cdef cudaError_t _cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + +cdef cudaError_t _cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + +cdef cudaError_t _cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + +cdef cudaError_t _cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemAdvise(devPtr, count, advice, device) + +cdef cudaError_t _cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemAdvise_v2(devPtr, count, advice, location) + +cdef cudaError_t _cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + +cdef cudaError_t _cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + +cdef cudaError_t _cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + +cdef cudaError_t _cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + +cdef cudaError_t _cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + +cdef cudaError_t _cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + +cdef cudaError_t _cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + +cdef cudaError_t _cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocAsync(devPtr, size, hStream) + +cdef cudaError_t _cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaFreeAsync(devPtr, hStream) + +cdef cudaError_t _cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolTrimTo(memPool, minBytesToKeep) + +cdef cudaError_t _cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolSetAttribute(memPool, attr, value) + +cdef cudaError_t _cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolGetAttribute(memPool, attr, value) + +cdef cudaError_t _cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolSetAccess(memPool, descList, count) + +cdef cudaError_t _cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolGetAccess(flags, memPool, location) + +cdef cudaError_t _cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolCreate(memPool, poolProps) + +cdef cudaError_t _cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolDestroy(memPool) + +cdef cudaError_t _cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMallocFromPoolAsync(ptr, size, memPool, stream) + +cdef cudaError_t _cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + +cdef cudaError_t _cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + +cdef cudaError_t _cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolExportPointer(exportData, ptr) + +cdef cudaError_t _cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaMemPoolImportPointer(ptr, memPool, exportData) + +cdef cudaError_t _cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaPointerGetAttributes(attributes, ptr) + +cdef cudaError_t _cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + +cdef cudaError_t _cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceEnablePeerAccess(peerDevice, flags) + +cdef cudaError_t _cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceDisablePeerAccess(peerDevice) + +cdef cudaError_t _cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsUnregisterResource(resource) + +cdef cudaError_t _cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsResourceSetMapFlags(resource, flags) + +cdef cudaError_t _cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsMapResources(count, resources, stream) + +cdef cudaError_t _cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsUnmapResources(count, resources, stream) + +cdef cudaError_t _cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + +cdef cudaError_t _cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + +cdef cudaError_t _cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + +cdef cudaError_t _cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetChannelDesc(desc, array) +@cython.show_performance_hints(False) +cdef cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + return cudaCreateChannelDesc(x, y, z, w, f) + +cdef cudaError_t _cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + +cdef cudaError_t _cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDestroyTextureObject(texObject) + +cdef cudaError_t _cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetTextureObjectResourceDesc(pResDesc, texObject) + +cdef cudaError_t _cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + +cdef cudaError_t _cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + +cdef cudaError_t _cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaCreateSurfaceObject(pSurfObject, pResDesc) + +cdef cudaError_t _cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDestroySurfaceObject(surfObject) + +cdef cudaError_t _cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + +cdef cudaError_t _cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDriverGetVersion(driverVersion) + +cdef cudaError_t _cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaRuntimeGetVersion(runtimeVersion) + +cdef cudaError_t _cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphCreate(pGraph, flags) + +cdef cudaError_t _cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphKernelNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphKernelNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + +cdef cudaError_t _cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + +cdef cudaError_t _cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphKernelNodeSetAttribute(hNode, attr, value) + +cdef cudaError_t _cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + +cdef cudaError_t _cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + +cdef cudaError_t _cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemcpyNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemcpyNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + +cdef cudaError_t _cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + +cdef cudaError_t _cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemsetNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemsetNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t _cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphHostNodeGetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphHostNodeSetParams(node, pNodeParams) + +cdef cudaError_t _cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + +cdef cudaError_t _cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphChildGraphNodeGetGraph(node, pGraph) + +cdef cudaError_t _cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + +cdef cudaError_t _cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t _cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphEventRecordNodeGetEvent(node, event_out) + +cdef cudaError_t _cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphEventRecordNodeSetEvent(node, event) + +cdef cudaError_t _cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t _cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphEventWaitNodeGetEvent(node, event_out) + +cdef cudaError_t _cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphEventWaitNodeSetEvent(node, event) + +cdef cudaError_t _cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + +cdef cudaError_t _cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + +cdef cudaError_t _cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + +cdef cudaError_t _cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + +cdef cudaError_t _cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemAllocNodeGetParams(node, params_out) + +cdef cudaError_t _cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + +cdef cudaError_t _cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphMemFreeNodeGetParams(node, dptr_out) + +cdef cudaError_t _cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGraphMemTrim(device) + +cdef cudaError_t _cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceGetGraphMemAttribute(device, attr, value) + +cdef cudaError_t _cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaDeviceSetGraphMemAttribute(device, attr, value) + +cdef cudaError_t _cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphClone(pGraphClone, originalGraph) + +cdef cudaError_t _cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + +cdef cudaError_t _cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetType(node, pType) + +cdef cudaError_t _cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphGetNodes(graph, nodes, numNodes) + +cdef cudaError_t _cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + +cdef cudaError_t _cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphGetEdges(graph, from_, to, numEdges) + +cdef cudaError_t _cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + +cdef cudaError_t _cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + +cdef cudaError_t _cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + +cdef cudaError_t _cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + +cdef cudaError_t _cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + +cdef cudaError_t _cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t _cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t _cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t _cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t _cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphDestroyNode(node) + +cdef cudaError_t _cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphInstantiate(pGraphExec, graph, flags) + +cdef cudaError_t _cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + +cdef cudaError_t _cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + +cdef cudaError_t _cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecGetFlags(graphExec, flags) + +cdef cudaError_t _cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + +cdef cudaError_t _cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t _cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + +cdef cudaError_t _cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t _cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t _cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t _cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t _cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t _cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t _cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + +cdef cudaError_t _cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphUpload(graphExec, stream) + +cdef cudaError_t _cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphLaunch(graphExec, stream) + +cdef cudaError_t _cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecDestroy(graphExec) + +cdef cudaError_t _cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphDestroy(graph) + +cdef cudaError_t _cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphDebugDotPrint(graph, path, flags) + +cdef cudaError_t _cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + +cdef cudaError_t _cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaUserObjectRetain(object, count) + +cdef cudaError_t _cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaUserObjectRelease(object, count) + +cdef cudaError_t _cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphRetainUserObject(graph, object, count, flags) + +cdef cudaError_t _cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphReleaseUserObject(graph, object, count) + +cdef cudaError_t _cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + +cdef cudaError_t _cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphNodeSetParams(node, nodeParams) + +cdef cudaError_t _cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + +cdef cudaError_t _cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + +cdef cudaError_t _cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + +cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + +cdef cudaError_t _cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t _cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryUnload(library) + +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryGetKernel(pKernel, library, name) + +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryGetGlobal(dptr, numbytes, library, name) + +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryGetManaged(dptr, numbytes, library, name) + +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryGetUnifiedFunction(fptr, library, symbol) + +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryGetKernelCount(count, lib) + +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaLibraryEnumerateKernels(kernels, numKernels, lib) + +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaKernelSetAttributeForDevice(kernel, attr, value, device) + +cdef cudaError_t _cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetExportTable(ppExportTable, pExportTableId) + +cdef cudaError_t _cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaGetKernel(kernelPtr, entryFuncAddr) +@cython.show_performance_hints(False) +cdef cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + return make_cudaPitchedPtr(d, p, xsz, ysz) +@cython.show_performance_hints(False) +cdef cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + return make_cudaPos(x, y, z) +@cython.show_performance_hints(False) +cdef cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + return make_cudaExtent(w, h, d) + +cdef cudaError_t _cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaProfilerStart() + +cdef cudaError_t _cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaProfilerStop() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a692eddc931316c72b42e975eb9f33f3a1b7a0ea --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.cpp @@ -0,0 +1,350 @@ +// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +#include +#include +#include +#include "loader.h" + +#define DXCORE_MAX_PATH 260 + +#if defined(_WIN32) +#include "windows.h" +#define _getAddr GetProcAddress +#define _Handle HMODULE +static const size_t sysrootName64_length = (sizeof("System32") - 1); +static const char* sysrootName64 = "System32"; +static const size_t libcudaName64_length = (sizeof("\\nvcuda64.dll") - 1); +static const char* libcudaName64 = "\\nvcuda64.dll"; +static const size_t sysrootNameX86_length = (sizeof("SysWOW64") - 1); +static const char* sysrootNameX86 = "SysWOW64"; +static const size_t libcudaNameX86_length = (sizeof("\\nvcuda32.dll") - 1); +static const char* libcudaNameX86 = "\\nvcuda32.dll"; +static size_t sysrootName_length = NULL; +static const char* sysrootName = NULL; + +#else +#include +#include +#define _getAddr dlsym +#define _Handle void* +static const size_t libcudaNameLinux_length = (sizeof("/libcuda.so.1.1") - 1); +static const char* libcudaNameLinux = "/libcuda.so.1.1"; +#endif +static size_t libcudaName_length = 0; +static const char* libcudaName = NULL; + +struct dxcore_enumAdapters2; +struct dxcore_queryAdapterInfo; + +typedef int (*pfnDxcoreEnumAdapters2)(const dxcore_enumAdapters2 *pParams); +typedef int (*pfnDxcoreQueryAdapterInfo)(const dxcore_queryAdapterInfo *pParams); + +struct dxcore_lib { + _Handle hDxcoreLib; + pfnDxcoreEnumAdapters2 pDxcoreEnumAdapters2; + pfnDxcoreQueryAdapterInfo pDxcoreQueryAdapterInfo; +}; + +struct dxcore_luid +{ + unsigned int lowPart; + int highPart; +}; + +struct dxcore_adapterInfo +{ + unsigned int hAdapter; + struct dxcore_luid AdapterLuid; + unsigned int NumOfSources; + unsigned int bPresentMoveRegionsPreferred; +}; + +struct dxcore_enumAdapters2 +{ + unsigned int NumAdapters; + struct dxcore_adapterInfo *pAdapters; +}; + +enum dxcore_kmtqueryAdapterInfoType +{ + DXCORE_QUERYDRIVERVERSION = 13, + DXCORE_QUERYREGISTRY = 48, +}; + +enum dxcore_queryregistry_type { + DXCORE_QUERYREGISTRY_DRIVERSTOREPATH = 2, +}; + +enum dxcore_queryregistry_status { + DXCORE_QUERYREGISTRY_STATUS_SUCCESS = 0, + DXCORE_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW = 1, + DXCORE_QUERYREGISTRY_STATUS_FAIL = 2, +}; + +struct dxcore_queryregistry_info { + enum dxcore_queryregistry_type QueryType; + unsigned int QueryFlags; + wchar_t ValueName[DXCORE_MAX_PATH]; + unsigned int ValueType; + unsigned int PhysicalAdapterIndex; + unsigned int OutputValueSize; + enum dxcore_queryregistry_status Status; + union { + unsigned long long OutputQword; + wchar_t Output; + }; +}; + +struct dxcore_queryAdapterInfo +{ + unsigned int hAdapter; + enum dxcore_kmtqueryAdapterInfoType Type; + void *pPrivateDriverData; + unsigned int PrivateDriverDataSize; +}; + +static int dxcore_query_adapter_info_helper(struct dxcore_lib* pLib, + unsigned int hAdapter, + enum dxcore_kmtqueryAdapterInfoType type, + void* pPrivateDriverDate, + unsigned int privateDriverDataSize) +{ + struct dxcore_queryAdapterInfo queryAdapterInfo = {}; + + queryAdapterInfo.hAdapter = hAdapter; + queryAdapterInfo.Type = type; + queryAdapterInfo.pPrivateDriverData = pPrivateDriverDate; + queryAdapterInfo.PrivateDriverDataSize = privateDriverDataSize; + + return pLib->pDxcoreQueryAdapterInfo(&queryAdapterInfo); +} + +static int dxcore_query_adapter_wddm_version(struct dxcore_lib* pLib, unsigned int hAdapter, unsigned int* version) +{ + return dxcore_query_adapter_info_helper(pLib, + hAdapter, + DXCORE_QUERYDRIVERVERSION, + (void*)version, + (unsigned int)sizeof(*version)); +} + +static int dxcore_query_adapter_driverstore_path(struct dxcore_lib* pLib, unsigned int hAdapter, char** ppDriverStorePath) +{ + struct dxcore_queryregistry_info params = {}; + struct dxcore_queryregistry_info* pValue = NULL; + wchar_t* pOutput; + size_t outputSizeInBytes; + size_t outputSize; + + // 1. Fetch output size + params.QueryType = DXCORE_QUERYREGISTRY_DRIVERSTOREPATH; + + if (dxcore_query_adapter_info_helper(pLib, + hAdapter, + DXCORE_QUERYREGISTRY, + (void*)¶ms, + (unsigned int)sizeof(struct dxcore_queryregistry_info))) + { + return (-1); + } + + if (params.OutputValueSize > DXCORE_MAX_PATH * sizeof(wchar_t)) { + return (-1); + } + + outputSizeInBytes = (size_t)params.OutputValueSize; + outputSize = outputSizeInBytes / sizeof(wchar_t); + + // 2. Retrieve output + pValue = (struct dxcore_queryregistry_info*)calloc(sizeof(struct dxcore_queryregistry_info) + outputSizeInBytes + sizeof(wchar_t), 1); + if (!pValue) { + return (-1); + } + + pValue->QueryType = DXCORE_QUERYREGISTRY_DRIVERSTOREPATH; + pValue->OutputValueSize = (unsigned int)outputSizeInBytes; + + if (dxcore_query_adapter_info_helper(pLib, + hAdapter, + DXCORE_QUERYREGISTRY, + (void*)pValue, + (unsigned int)(sizeof(struct dxcore_queryregistry_info) + outputSizeInBytes))) + { + free(pValue); + return (-1); + } + pOutput = (wchar_t*)(&pValue->Output); + + // Make sure no matter what happened the wchar_t string is null terminated + pOutput[outputSize] = L'\0'; + + // Convert the output into a regular c string + *ppDriverStorePath = (char*)calloc(outputSize + 1, sizeof(char)); + if (!*ppDriverStorePath) { + free(pValue); + return (-1); + } + wcstombs(*ppDriverStorePath, pOutput, outputSize); + + free(pValue); + + return 0; +} + +static char* replaceSystemPath(char* path) +{ + char *replacedPath = (char*)calloc(DXCORE_MAX_PATH + 1, sizeof(char)); + +#if defined(_WIN32) + wchar_t *systemPath = (wchar_t*)calloc(DXCORE_MAX_PATH + 1, sizeof(wchar_t)); + // Get system root path + if (GetSystemDirectoryW(systemPath, DXCORE_MAX_PATH) == 0) { + free(replacedPath); + free(systemPath); + return NULL; + } + wcstombs(replacedPath, systemPath, DXCORE_MAX_PATH); + free(systemPath); + + // Replace the /SystemRoot/ part of the registry-obtained path with + // the actual system root path from above + char* sysrootPath = strstr(path, sysrootName); + strncat(replacedPath, sysrootPath + sysrootName_length, DXCORE_MAX_PATH - strlen(replacedPath)); +#else + strncat(replacedPath, path, DXCORE_MAX_PATH); +#endif + + // Append nvcuda dll + if (libcudaName_length < DXCORE_MAX_PATH - strlen(replacedPath)) { + strncat(replacedPath, libcudaName, libcudaName_length); + } + else { + strncat(replacedPath, libcudaName, DXCORE_MAX_PATH - strlen(replacedPath)); + } + + return replacedPath; +} + +static int dxcore_check_adapter(struct dxcore_lib *pLib, char *libPath, struct dxcore_adapterInfo *pAdapterInfo) +{ + unsigned int wddmVersion = 0; + char* driverStorePath = NULL; + + if (dxcore_query_adapter_wddm_version(pLib, pAdapterInfo->hAdapter, &wddmVersion)) { + return 1; + } + + if (wddmVersion < 2500) { + return 1; + } + + if (dxcore_query_adapter_driverstore_path(pLib, pAdapterInfo->hAdapter, &driverStorePath)) { + return 1; + } + + // Replace with valid path + char* replacedPath = replaceSystemPath(driverStorePath); + if (!replacedPath) { + free(driverStorePath); + free(replacedPath); + return 1; + } + + // Does file exist? +#if defined(_WIN32) + if (GetFileAttributes(replacedPath) == INVALID_FILE_ATTRIBUTES) { + free(driverStorePath); + free(replacedPath); + return 1; + } +#else + if (access(replacedPath, F_OK) < 0) { + free(driverStorePath); + free(replacedPath); + return 1; + } +#endif + + memcpy(libPath, replacedPath, DXCORE_MAX_PATH); + free(driverStorePath); + free(replacedPath); + + return 0; +} + +static int dxcore_enum_adapters(struct dxcore_lib *pLib, char *libPath) +{ + struct dxcore_enumAdapters2 params = {0}; + unsigned int adapterIndex = 0; + + if (pLib->pDxcoreEnumAdapters2(¶ms)) { + return 1; + } + params.pAdapters = (dxcore_adapterInfo*)calloc(params.NumAdapters, sizeof(struct dxcore_adapterInfo)); + if (pLib->pDxcoreEnumAdapters2(¶ms)) { + free(params.pAdapters); + return 1; + } + + for (adapterIndex = 0; adapterIndex < params.NumAdapters; adapterIndex++) { + if (!dxcore_check_adapter(pLib, libPath, ¶ms.pAdapters[adapterIndex])) { + free(params.pAdapters); + return 0; + } + } + + free(params.pAdapters); + return 1; +} + +int getCUDALibraryPath(char *libPath, bool isBit64) +{ + struct dxcore_lib lib = {0}; + + if (!libPath) { + return 1; + } + + // Configure paths based on app's bit configuration +#if defined(_WIN32) + if (isBit64) { + sysrootName_length = sysrootName64_length; + sysrootName = sysrootName64; + libcudaName_length = libcudaName64_length; + libcudaName = libcudaName64; + } + else { + sysrootName_length = sysrootNameX86_length; + sysrootName = sysrootNameX86; + libcudaName_length = libcudaNameX86_length; + libcudaName = libcudaNameX86; + } +#else + libcudaName_length = libcudaNameLinux_length; + libcudaName = libcudaNameLinux; +#endif + +#if defined(_WIN32) + lib.hDxcoreLib = LoadLibraryExW(L"gdi32.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32); +#else + lib.hDxcoreLib = dlopen("libdxcore.so", RTLD_LAZY); +#endif + if (!lib.hDxcoreLib) { + return 1; + } + + lib.pDxcoreEnumAdapters2 = (pfnDxcoreEnumAdapters2)_getAddr(lib.hDxcoreLib, "D3DKMTEnumAdapters2"); + if (!lib.pDxcoreEnumAdapters2) { + return 1; + } + lib.pDxcoreQueryAdapterInfo = (pfnDxcoreQueryAdapterInfo)_getAddr(lib.hDxcoreLib, "D3DKMTQueryAdapterInfo"); + if (!lib.pDxcoreQueryAdapterInfo) { + return 1; + } + + if (dxcore_enum_adapters(&lib, libPath)) { + return 1; + } + return 0; +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.h b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.h new file mode 100644 index 0000000000000000000000000000000000000000..2411037b03256b70ca6e260fc140d94b64b16e00 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.h @@ -0,0 +1,9 @@ +// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +// +// Please refer to the NVIDIA end user license agreement (EULA) associated +// with this source code for terms and conditions that govern your use of +// this software. Any use, reproduction, disclosure, or distribution of +// this software and related documentation outside the terms of the EULA +// is strictly prohibited. +int getCUDALibraryPath(char *libPath, bool isBit64); diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.pxd new file mode 100644 index 0000000000000000000000000000000000000000..805b849cc660295d97cba986c55444db5f21fc47 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_bindings/loader.pxd @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +cdef extern from "loader.h": + int getCUDALibraryPath(char *libPath, bint isBit64) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..70f22e6fe88cbb15391da1cd16015b2d7809de4a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2cfa3eb7865e0a5137c97caedfb01efd652cad0d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.cpp @@ -0,0 +1,18106 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._internal.cufile", + "sources": [ + "cuda/bindings/_internal/cufile.pyx" + ] + }, + "module_name": "cuda.bindings._internal.cufile" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___internal__cufile +#define __PYX_HAVE_API__cuda__bindings___internal__cufile +/* Early includes */ +#include +#include +#include +#include +#include "cuda.h" +#include "cudaProfiler.h" +#include +#include + + // This is the missing piece we need to supply to help Cython & C++ compilers. + inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) { + return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err); + } + static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1}; + +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_internal/cufile.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "libc.time" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "posix.types" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings" */ + +/* Module declarations from "cuda" */ + +/* Module declarations from "cuda.bindings.cycufile" */ + +/* Module declarations from "cython" */ + +/* Module declarations from "cuda.bindings._internal.cufile" */ +static PyObject *__pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock = 0; +static int __pyx_v_4cuda_8bindings_9_internal_6cufile___py_cufile_init; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuDriverGetVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString; +static void *__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose; +static PyObject *__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs = 0; +static void *__pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(void); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_internal_6cufile___check_or_init_cufile(void); /*proto*/ +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(void); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointer(PyObject *, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._internal.cufile" +extern int __pyx_module_is_main_cuda__bindings___internal__cufile; +int __pyx_module_is_main_cuda__bindings___internal__cufile = 0; + +/* Implementation of "cuda.bindings._internal.cufile" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "."; +static const char __pyx_k__2[] = "?"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_Lock[] = "Lock"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_utils[] = "utils"; +static const char __pyx_k_cufile[] = "cufile"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_add_note[] = "add_note"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_z_A_a_9AQ[] = "\200\001\330\004\005\330\004\007\200z\220\023\220A\330\010\024\320\024.\250a\330\004\013\2109\220A\220Q"; +static const char __pyx_k_cuFileRead[] = "__cuFileRead"; +static const char __pyx_k_cuFileWrite[] = "__cuFileWrite"; +static const char __pyx_k_handle_uint[] = "_handle_uint"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_cuFileUseCount[] = "__cuFileUseCount"; +static const char __pyx_k_cuFileReadAsync[] = "__cuFileReadAsync"; +static const char __pyx_k_cuda_pathfinder[] = "cuda.pathfinder"; +static const char __pyx_k_cuFileDriverOpen[] = "__cuFileDriverOpen"; +static const char __pyx_k_cuFileGetVersion[] = "__cuFileGetVersion"; +static const char __pyx_k_cuFileWriteAsync[] = "__cuFileWriteAsync"; +static const char __pyx_k_NotSupportedError[] = "NotSupportedError"; +static const char __pyx_k_cuFileBufRegister[] = "__cuFileBufRegister"; +static const char __pyx_k_cuFileDriverClose[] = "__cuFileDriverClose"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_cuFileBatchIOSetUp[] = "__cuFileBatchIOSetUp"; +static const char __pyx_k_cuFileBatchIOCancel[] = "__cuFileBatchIOCancel"; +static const char __pyx_k_cuFileBatchIOSubmit[] = "__cuFileBatchIOSubmit"; +static const char __pyx_k_cuFileBufDeregister[] = "__cuFileBufDeregister"; +static const char __pyx_k_cuFileBatchIODestroy[] = "__cuFileBatchIODestroy"; +static const char __pyx_k_cuFileDriverClose_v2[] = "__cuFileDriverClose_v2"; +static const char __pyx_k_cuFileHandleRegister[] = "__cuFileHandleRegister"; +static const char __pyx_k_cuFileStreamRegister[] = "__cuFileStreamRegister"; +static const char __pyx_k_FunctionNotFoundError[] = "FunctionNotFoundError"; +static const char __pyx_k_cuFileBatchIOGetStatus[] = "__cuFileBatchIOGetStatus"; +static const char __pyx_k_cuFileGetParameterBool[] = "__cuFileGetParameterBool"; +static const char __pyx_k_cuFileHandleDeregister[] = "__cuFileHandleDeregister"; +static const char __pyx_k_cuFileSetParameterBool[] = "__cuFileSetParameterBool"; +static const char __pyx_k_cuFileStreamDeregister[] = "__cuFileStreamDeregister"; +static const char __pyx_k_cuFileDriverSetPollMode[] = "__cuFileDriverSetPollMode"; +static const char __pyx_k_cuFileGetParameterSizeT[] = "__cuFileGetParameterSizeT"; +static const char __pyx_k_cuFileSetParameterSizeT[] = "__cuFileSetParameterSizeT"; +static const char __pyx_k_load_nvidia_dynamic_lib[] = "load_nvidia_dynamic_lib"; +static const char __pyx_k_cuFileGetParameterString[] = "__cuFileGetParameterString"; +static const char __pyx_k_cuFileSetParameterString[] = "__cuFileSetParameterString"; +static const char __pyx_k_inspect_function_pointer[] = "_inspect_function_pointer"; +static const char __pyx_k_cuFileDriverGetProperties[] = "__cuFileDriverGetProperties"; +static const char __pyx_k_inspect_function_pointers[] = "_inspect_function_pointers"; +static const char __pyx_k_cuFileDriverSetMaxCacheSize[] = "__cuFileDriverSetMaxCacheSize"; +static const char __pyx_k_cuFileDriverSetMaxDirectIOSize[] = "__cuFileDriverSetMaxDirectIOSize"; +static const char __pyx_k_cuFileDriverSetMaxPinnedMemSiz[] = "__cuFileDriverSetMaxPinnedMemSize"; +static const char __pyx_k_cuda_bindings__internal_cufile[] = "cuda.bindings._internal.cufile"; +static const char __pyx_k_function_cuFileBatchIOCancel_is[] = "function cuFileBatchIOCancel is not found"; +static const char __pyx_k_function_cuFileBatchIOGetStatus[] = "function cuFileBatchIOGetStatus is not found"; +static const char __pyx_k_function_cuFileBatchIOSubmit_is[] = "function cuFileBatchIOSubmit is not found"; +static const char __pyx_k_function_cuFileBufDeregister_is[] = "function cuFileBufDeregister is not found"; +static const char __pyx_k_function_cuFileGetParameterBool[] = "function cuFileGetParameterBool is not found"; +static const char __pyx_k_function_cuFileHandleDeregister[] = "function cuFileHandleDeregister is not found"; +static const char __pyx_k_function_cuFileReadAsync_is_not[] = "function cuFileReadAsync is not found"; +static const char __pyx_k_function_cuFileSetParameterBool[] = "function cuFileSetParameterBool is not found"; +static const char __pyx_k_function_cuFileStreamDeregister[] = "function cuFileStreamDeregister is not found"; +static const char __pyx_k_z_q_Q_Zq_z_A_Ja_Q_Ja_1_Zq_z_A_z[] = "\200\001\330\004\005\330\004\007\200z\220\027\230\001\330\010\017\210q\340\004\031\230\021\330\004\025\220Q\340\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\005\330\004\010\210\001\320\t$\240J\250a\340\004\005\330\004\010\210\001\320\t\033\230:\240Q\340\004\005\330\004\010\210\001\320\t\034\230J\240a\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\005\330\004\010\210\001\320\t\037\230z\250\021\340\004\005\330\004\010\210\001\320\t*\250*\260A\340\004\005\330\004\010\210\001\320\t(\250\n\260!\340\004\005\330\004\010\210\001\320\t/\250z\270\021\340\004\005\330\004\010\210\001\320\t,\250J\260a\340\004\005\330\004\010\210\001\320\t0\260\n\270!\340\004\005\330\004\010\210\001\320\t#\240:\250Q\340\004\005\330\004\010\210\001\320\t$\240J\250a\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t$\240J\250a\340\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\005\330\004\010\210\001\320\t \240\n\250!\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t(\250\n\260!\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t)\250\032\2601\340\004\005\330\004\010\210\001\320\t(\250\n\260!\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t)\250\032\2601\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\020\220\001\330\004\013\2101"; +static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; +static const char __pyx_k_cuda_bindings__internal_cufile_p[] = "cuda/bindings/_internal/cufile.pyx"; +static const char __pyx_k_function_cuFileBatchIODestroy_is[] = "function cuFileBatchIODestroy is not found"; +static const char __pyx_k_function_cuFileBatchIOSetUp_is_n[] = "function cuFileBatchIOSetUp is not found"; +static const char __pyx_k_function_cuFileBufRegister_is_no[] = "function cuFileBufRegister is not found"; +static const char __pyx_k_function_cuFileDriverClose_is_no[] = "function cuFileDriverClose is not found"; +static const char __pyx_k_function_cuFileDriverClose_v2_is[] = "function cuFileDriverClose_v2 is not found"; +static const char __pyx_k_function_cuFileDriverGetProperti[] = "function cuFileDriverGetProperties is not found"; +static const char __pyx_k_function_cuFileDriverOpen_is_not[] = "function cuFileDriverOpen is not found"; +static const char __pyx_k_function_cuFileDriverSetMaxCache[] = "function cuFileDriverSetMaxCacheSize is not found"; +static const char __pyx_k_function_cuFileDriverSetMaxDirec[] = "function cuFileDriverSetMaxDirectIOSize is not found"; +static const char __pyx_k_function_cuFileDriverSetMaxPinne[] = "function cuFileDriverSetMaxPinnedMemSize is not found"; +static const char __pyx_k_function_cuFileDriverSetPollMode[] = "function cuFileDriverSetPollMode is not found"; +static const char __pyx_k_function_cuFileGetParameterSizeT[] = "function cuFileGetParameterSizeT is not found"; +static const char __pyx_k_function_cuFileGetParameterStrin[] = "function cuFileGetParameterString is not found"; +static const char __pyx_k_function_cuFileGetVersion_is_not[] = "function cuFileGetVersion is not found"; +static const char __pyx_k_function_cuFileHandleRegister_is[] = "function cuFileHandleRegister is not found"; +static const char __pyx_k_function_cuFileRead_is_not_found[] = "function cuFileRead is not found"; +static const char __pyx_k_function_cuFileSetParameterSizeT[] = "function cuFileSetParameterSizeT is not found"; +static const char __pyx_k_function_cuFileSetParameterStrin[] = "function cuFileSetParameterString is not found"; +static const char __pyx_k_function_cuFileStreamRegister_is[] = "function cuFileStreamRegister is not found"; +static const char __pyx_k_function_cuFileUseCount_is_not_f[] = "function cuFileUseCount is not found"; +static const char __pyx_k_function_cuFileWriteAsync_is_not[] = "function cuFileWriteAsync is not found"; +static const char __pyx_k_function_cuFileWrite_is_not_foun[] = "function cuFileWrite is not found"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_6cufile_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[2]; + PyObject *__pyx_string_tab[95]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_FunctionNotFoundError __pyx_string_tab[1] +#define __pyx_n_u_Lock __pyx_string_tab[2] +#define __pyx_n_u_NotSupportedError __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u__2 __pyx_string_tab[5] +#define __pyx_kp_u_add_note __pyx_string_tab[6] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[7] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[8] +#define __pyx_n_u_cuFileBatchIOCancel __pyx_string_tab[9] +#define __pyx_n_u_cuFileBatchIODestroy __pyx_string_tab[10] +#define __pyx_n_u_cuFileBatchIOGetStatus __pyx_string_tab[11] +#define __pyx_n_u_cuFileBatchIOSetUp __pyx_string_tab[12] +#define __pyx_n_u_cuFileBatchIOSubmit __pyx_string_tab[13] +#define __pyx_n_u_cuFileBufDeregister __pyx_string_tab[14] +#define __pyx_n_u_cuFileBufRegister __pyx_string_tab[15] +#define __pyx_n_u_cuFileDriverClose __pyx_string_tab[16] +#define __pyx_n_u_cuFileDriverClose_v2 __pyx_string_tab[17] +#define __pyx_n_u_cuFileDriverGetProperties __pyx_string_tab[18] +#define __pyx_n_u_cuFileDriverOpen __pyx_string_tab[19] +#define __pyx_n_u_cuFileDriverSetMaxCacheSize __pyx_string_tab[20] +#define __pyx_n_u_cuFileDriverSetMaxDirectIOSize __pyx_string_tab[21] +#define __pyx_n_u_cuFileDriverSetMaxPinnedMemSiz __pyx_string_tab[22] +#define __pyx_n_u_cuFileDriverSetPollMode __pyx_string_tab[23] +#define __pyx_n_u_cuFileGetParameterBool __pyx_string_tab[24] +#define __pyx_n_u_cuFileGetParameterSizeT __pyx_string_tab[25] +#define __pyx_n_u_cuFileGetParameterString __pyx_string_tab[26] +#define __pyx_n_u_cuFileGetVersion __pyx_string_tab[27] +#define __pyx_n_u_cuFileHandleDeregister __pyx_string_tab[28] +#define __pyx_n_u_cuFileHandleRegister __pyx_string_tab[29] +#define __pyx_n_u_cuFileRead __pyx_string_tab[30] +#define __pyx_n_u_cuFileReadAsync __pyx_string_tab[31] +#define __pyx_n_u_cuFileSetParameterBool __pyx_string_tab[32] +#define __pyx_n_u_cuFileSetParameterSizeT __pyx_string_tab[33] +#define __pyx_n_u_cuFileSetParameterString __pyx_string_tab[34] +#define __pyx_n_u_cuFileStreamDeregister __pyx_string_tab[35] +#define __pyx_n_u_cuFileStreamRegister __pyx_string_tab[36] +#define __pyx_n_u_cuFileUseCount __pyx_string_tab[37] +#define __pyx_n_u_cuFileWrite __pyx_string_tab[38] +#define __pyx_n_u_cuFileWriteAsync __pyx_string_tab[39] +#define __pyx_n_u_cuda_bindings__internal_cufile __pyx_string_tab[40] +#define __pyx_kp_u_cuda_bindings__internal_cufile_p __pyx_string_tab[41] +#define __pyx_n_u_cuda_pathfinder __pyx_string_tab[42] +#define __pyx_n_u_cufile __pyx_string_tab[43] +#define __pyx_n_u_enter __pyx_string_tab[44] +#define __pyx_n_u_exit __pyx_string_tab[45] +#define __pyx_n_u_func __pyx_string_tab[46] +#define __pyx_kp_u_function_cuFileBatchIOCancel_is __pyx_string_tab[47] +#define __pyx_kp_u_function_cuFileBatchIODestroy_is __pyx_string_tab[48] +#define __pyx_kp_u_function_cuFileBatchIOGetStatus __pyx_string_tab[49] +#define __pyx_kp_u_function_cuFileBatchIOSetUp_is_n __pyx_string_tab[50] +#define __pyx_kp_u_function_cuFileBatchIOSubmit_is __pyx_string_tab[51] +#define __pyx_kp_u_function_cuFileBufDeregister_is __pyx_string_tab[52] +#define __pyx_kp_u_function_cuFileBufRegister_is_no __pyx_string_tab[53] +#define __pyx_kp_u_function_cuFileDriverClose_is_no __pyx_string_tab[54] +#define __pyx_kp_u_function_cuFileDriverClose_v2_is __pyx_string_tab[55] +#define __pyx_kp_u_function_cuFileDriverGetProperti __pyx_string_tab[56] +#define __pyx_kp_u_function_cuFileDriverOpen_is_not __pyx_string_tab[57] +#define __pyx_kp_u_function_cuFileDriverSetMaxCache __pyx_string_tab[58] +#define __pyx_kp_u_function_cuFileDriverSetMaxDirec __pyx_string_tab[59] +#define __pyx_kp_u_function_cuFileDriverSetMaxPinne __pyx_string_tab[60] +#define __pyx_kp_u_function_cuFileDriverSetPollMode __pyx_string_tab[61] +#define __pyx_kp_u_function_cuFileGetParameterBool __pyx_string_tab[62] +#define __pyx_kp_u_function_cuFileGetParameterSizeT __pyx_string_tab[63] +#define __pyx_kp_u_function_cuFileGetParameterStrin __pyx_string_tab[64] +#define __pyx_kp_u_function_cuFileGetVersion_is_not __pyx_string_tab[65] +#define __pyx_kp_u_function_cuFileHandleDeregister __pyx_string_tab[66] +#define __pyx_kp_u_function_cuFileHandleRegister_is __pyx_string_tab[67] +#define __pyx_kp_u_function_cuFileReadAsync_is_not __pyx_string_tab[68] +#define __pyx_kp_u_function_cuFileRead_is_not_found __pyx_string_tab[69] +#define __pyx_kp_u_function_cuFileSetParameterBool __pyx_string_tab[70] +#define __pyx_kp_u_function_cuFileSetParameterSizeT __pyx_string_tab[71] +#define __pyx_kp_u_function_cuFileSetParameterStrin __pyx_string_tab[72] +#define __pyx_kp_u_function_cuFileStreamDeregister __pyx_string_tab[73] +#define __pyx_kp_u_function_cuFileStreamRegister_is __pyx_string_tab[74] +#define __pyx_kp_u_function_cuFileUseCount_is_not_f __pyx_string_tab[75] +#define __pyx_kp_u_function_cuFileWriteAsync_is_not __pyx_string_tab[76] +#define __pyx_kp_u_function_cuFileWrite_is_not_foun __pyx_string_tab[77] +#define __pyx_n_u_handle_uint __pyx_string_tab[78] +#define __pyx_n_u_initializing __pyx_string_tab[79] +#define __pyx_n_u_inspect_function_pointer __pyx_string_tab[80] +#define __pyx_n_u_inspect_function_pointers __pyx_string_tab[81] +#define __pyx_n_u_is_coroutine __pyx_string_tab[82] +#define __pyx_n_u_load_nvidia_dynamic_lib __pyx_string_tab[83] +#define __pyx_n_u_main __pyx_string_tab[84] +#define __pyx_n_u_module __pyx_string_tab[85] +#define __pyx_n_u_name __pyx_string_tab[86] +#define __pyx_n_u_name_2 __pyx_string_tab[87] +#define __pyx_n_u_pop __pyx_string_tab[88] +#define __pyx_n_u_qualname __pyx_string_tab[89] +#define __pyx_n_u_set_name __pyx_string_tab[90] +#define __pyx_n_u_spec __pyx_string_tab[91] +#define __pyx_n_u_test __pyx_string_tab[92] +#define __pyx_n_u_threading __pyx_string_tab[93] +#define __pyx_n_u_utils __pyx_string_tab[94] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<95; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<95; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_internal/cufile.pyx":77 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint + * return handle +*/ + +static void *__pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(void) { + uintptr_t __pyx_v_handle; + void *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + uintptr_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("load_library", 0); + + /* "cuda/bindings/_internal/cufile.pyx":78 + * + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint # <<<<<<<<<<<<<< + * return handle + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cufile}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_handle_uint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_handle = __pyx_t_5; + + /* "cuda/bindings/_internal/cufile.pyx":79 + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint + * return handle # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((void *)__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":77 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint + * return handle +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.cufile.load_library", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":82 + * + * + * cdef int __check_or_init_cufile() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_cufile_init + * +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_6cufile___check_or_init_cufile(void) { + void *__pyx_v_handle; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + void *__pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("__check_or_init_cufile", 1); + + /* "cuda/bindings/_internal/cufile.pyx":85 + * global __py_cufile_init + * + * cdef void* handle = NULL # <<<<<<<<<<<<<< + * + * with gil, __symbol_lock: +*/ + __pyx_v_handle = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":87 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __cuFileHandleRegister +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":90 + * # Load function + * global __cuFileHandleRegister + * __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') # <<<<<<<<<<<<<< + * if __cuFileHandleRegister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileHandleRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":91 + * global __cuFileHandleRegister + * __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + * if __cuFileHandleRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":92 + * __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + * if __cuFileHandleRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":93 + * if __cuFileHandleRegister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":92 + * __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + * if __cuFileHandleRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":94 + * if handle == NULL: + * handle = load_library() + * __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') # <<<<<<<<<<<<<< + * + * global __cuFileHandleDeregister +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister = dlsym(__pyx_v_handle, ((char const *)"cuFileHandleRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":91 + * global __cuFileHandleRegister + * __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + * if __cuFileHandleRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":97 + * + * global __cuFileHandleDeregister + * __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') # <<<<<<<<<<<<<< + * if __cuFileHandleDeregister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileHandleDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":98 + * global __cuFileHandleDeregister + * __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + * if __cuFileHandleDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":99 + * __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + * if __cuFileHandleDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":100 + * if __cuFileHandleDeregister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":99 + * __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + * if __cuFileHandleDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":101 + * if handle == NULL: + * handle = load_library() + * __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') # <<<<<<<<<<<<<< + * + * global __cuFileBufRegister +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister = dlsym(__pyx_v_handle, ((char const *)"cuFileHandleDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":98 + * global __cuFileHandleDeregister + * __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + * if __cuFileHandleDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":104 + * + * global __cuFileBufRegister + * __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') # <<<<<<<<<<<<<< + * if __cuFileBufRegister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBufRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":105 + * global __cuFileBufRegister + * __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + * if __cuFileBufRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":106 + * __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + * if __cuFileBufRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":107 + * if __cuFileBufRegister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":106 + * __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + * if __cuFileBufRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":108 + * if handle == NULL: + * handle = load_library() + * __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') # <<<<<<<<<<<<<< + * + * global __cuFileBufDeregister +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister = dlsym(__pyx_v_handle, ((char const *)"cuFileBufRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":105 + * global __cuFileBufRegister + * __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + * if __cuFileBufRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":111 + * + * global __cuFileBufDeregister + * __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') # <<<<<<<<<<<<<< + * if __cuFileBufDeregister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBufDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":112 + * global __cuFileBufDeregister + * __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + * if __cuFileBufDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":113 + * __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + * if __cuFileBufDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":114 + * if __cuFileBufDeregister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":113 + * __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + * if __cuFileBufDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":115 + * if handle == NULL: + * handle = load_library() + * __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') # <<<<<<<<<<<<<< + * + * global __cuFileRead +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister = dlsym(__pyx_v_handle, ((char const *)"cuFileBufDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":112 + * global __cuFileBufDeregister + * __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + * if __cuFileBufDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":118 + * + * global __cuFileRead + * __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') # <<<<<<<<<<<<<< + * if __cuFileRead == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead = dlsym(RTLD_DEFAULT, ((char const *)"cuFileRead")); + + /* "cuda/bindings/_internal/cufile.pyx":119 + * global __cuFileRead + * __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + * if __cuFileRead == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":120 + * __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + * if __cuFileRead == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileRead = dlsym(handle, 'cuFileRead') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":121 + * if __cuFileRead == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileRead = dlsym(handle, 'cuFileRead') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":120 + * __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + * if __cuFileRead == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileRead = dlsym(handle, 'cuFileRead') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":122 + * if handle == NULL: + * handle = load_library() + * __cuFileRead = dlsym(handle, 'cuFileRead') # <<<<<<<<<<<<<< + * + * global __cuFileWrite +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead = dlsym(__pyx_v_handle, ((char const *)"cuFileRead")); + + /* "cuda/bindings/_internal/cufile.pyx":119 + * global __cuFileRead + * __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + * if __cuFileRead == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":125 + * + * global __cuFileWrite + * __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') # <<<<<<<<<<<<<< + * if __cuFileWrite == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite = dlsym(RTLD_DEFAULT, ((char const *)"cuFileWrite")); + + /* "cuda/bindings/_internal/cufile.pyx":126 + * global __cuFileWrite + * __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + * if __cuFileWrite == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":127 + * __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + * if __cuFileWrite == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileWrite = dlsym(handle, 'cuFileWrite') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":128 + * if __cuFileWrite == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileWrite = dlsym(handle, 'cuFileWrite') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":127 + * __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + * if __cuFileWrite == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileWrite = dlsym(handle, 'cuFileWrite') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":129 + * if handle == NULL: + * handle = load_library() + * __cuFileWrite = dlsym(handle, 'cuFileWrite') # <<<<<<<<<<<<<< + * + * global __cuFileDriverOpen +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite = dlsym(__pyx_v_handle, ((char const *)"cuFileWrite")); + + /* "cuda/bindings/_internal/cufile.pyx":126 + * global __cuFileWrite + * __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + * if __cuFileWrite == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":132 + * + * global __cuFileDriverOpen + * __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') # <<<<<<<<<<<<<< + * if __cuFileDriverOpen == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverOpen")); + + /* "cuda/bindings/_internal/cufile.pyx":133 + * global __cuFileDriverOpen + * __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + * if __cuFileDriverOpen == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":134 + * __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + * if __cuFileDriverOpen == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":135 + * if __cuFileDriverOpen == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":134 + * __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + * if __cuFileDriverOpen == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":136 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') # <<<<<<<<<<<<<< + * + * global __cuFileDriverClose_v2 +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverOpen")); + + /* "cuda/bindings/_internal/cufile.pyx":133 + * global __cuFileDriverOpen + * __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + * if __cuFileDriverOpen == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":139 + * + * global __cuFileDriverClose_v2 + * __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') # <<<<<<<<<<<<<< + * if __cuFileDriverClose_v2 == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverClose_v2")); + + /* "cuda/bindings/_internal/cufile.pyx":140 + * global __cuFileDriverClose_v2 + * __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + * if __cuFileDriverClose_v2 == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2 == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":141 + * __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + * if __cuFileDriverClose_v2 == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":142 + * if __cuFileDriverClose_v2 == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":141 + * __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + * if __cuFileDriverClose_v2 == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":143 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') # <<<<<<<<<<<<<< + * + * global __cuFileUseCount +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2 = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverClose_v2")); + + /* "cuda/bindings/_internal/cufile.pyx":140 + * global __cuFileDriverClose_v2 + * __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + * if __cuFileDriverClose_v2 == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":146 + * + * global __cuFileUseCount + * __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') # <<<<<<<<<<<<<< + * if __cuFileUseCount == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount = dlsym(RTLD_DEFAULT, ((char const *)"cuFileUseCount")); + + /* "cuda/bindings/_internal/cufile.pyx":147 + * global __cuFileUseCount + * __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + * if __cuFileUseCount == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":148 + * __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + * if __cuFileUseCount == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileUseCount = dlsym(handle, 'cuFileUseCount') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":149 + * if __cuFileUseCount == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileUseCount = dlsym(handle, 'cuFileUseCount') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":148 + * __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + * if __cuFileUseCount == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileUseCount = dlsym(handle, 'cuFileUseCount') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":150 + * if handle == NULL: + * handle = load_library() + * __cuFileUseCount = dlsym(handle, 'cuFileUseCount') # <<<<<<<<<<<<<< + * + * global __cuFileDriverGetProperties +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount = dlsym(__pyx_v_handle, ((char const *)"cuFileUseCount")); + + /* "cuda/bindings/_internal/cufile.pyx":147 + * global __cuFileUseCount + * __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + * if __cuFileUseCount == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":153 + * + * global __cuFileDriverGetProperties + * __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') # <<<<<<<<<<<<<< + * if __cuFileDriverGetProperties == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverGetProperties")); + + /* "cuda/bindings/_internal/cufile.pyx":154 + * global __cuFileDriverGetProperties + * __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + * if __cuFileDriverGetProperties == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":155 + * __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + * if __cuFileDriverGetProperties == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":156 + * if __cuFileDriverGetProperties == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 156, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":155 + * __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + * if __cuFileDriverGetProperties == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":157 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetPollMode +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverGetProperties")); + + /* "cuda/bindings/_internal/cufile.pyx":154 + * global __cuFileDriverGetProperties + * __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + * if __cuFileDriverGetProperties == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":160 + * + * global __cuFileDriverSetPollMode + * __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') # <<<<<<<<<<<<<< + * if __cuFileDriverSetPollMode == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverSetPollMode")); + + /* "cuda/bindings/_internal/cufile.pyx":161 + * global __cuFileDriverSetPollMode + * __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + * if __cuFileDriverSetPollMode == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":162 + * __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + * if __cuFileDriverSetPollMode == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":163 + * if __cuFileDriverSetPollMode == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":162 + * __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + * if __cuFileDriverSetPollMode == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":164 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxDirectIOSize +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverSetPollMode")); + + /* "cuda/bindings/_internal/cufile.pyx":161 + * global __cuFileDriverSetPollMode + * __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + * if __cuFileDriverSetPollMode == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":167 + * + * global __cuFileDriverSetMaxDirectIOSize + * __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverSetMaxDirectIOSize")); + + /* "cuda/bindings/_internal/cufile.pyx":168 + * global __cuFileDriverSetMaxDirectIOSize + * __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + * if __cuFileDriverSetMaxDirectIOSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":169 + * __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":170 + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":169 + * __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":171 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxCacheSize +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverSetMaxDirectIOSize")); + + /* "cuda/bindings/_internal/cufile.pyx":168 + * global __cuFileDriverSetMaxDirectIOSize + * __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + * if __cuFileDriverSetMaxDirectIOSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":174 + * + * global __cuFileDriverSetMaxCacheSize + * __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxCacheSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverSetMaxCacheSize")); + + /* "cuda/bindings/_internal/cufile.pyx":175 + * global __cuFileDriverSetMaxCacheSize + * __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + * if __cuFileDriverSetMaxCacheSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":176 + * __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + * if __cuFileDriverSetMaxCacheSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":177 + * if __cuFileDriverSetMaxCacheSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":176 + * __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + * if __cuFileDriverSetMaxCacheSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":178 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxPinnedMemSize +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverSetMaxCacheSize")); + + /* "cuda/bindings/_internal/cufile.pyx":175 + * global __cuFileDriverSetMaxCacheSize + * __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + * if __cuFileDriverSetMaxCacheSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":181 + * + * global __cuFileDriverSetMaxPinnedMemSize + * __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverSetMaxPinnedMemSize")); + + /* "cuda/bindings/_internal/cufile.pyx":182 + * global __cuFileDriverSetMaxPinnedMemSize + * __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + * if __cuFileDriverSetMaxPinnedMemSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":183 + * __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":184 + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":183 + * __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":185 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOSetUp +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverSetMaxPinnedMemSize")); + + /* "cuda/bindings/_internal/cufile.pyx":182 + * global __cuFileDriverSetMaxPinnedMemSize + * __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + * if __cuFileDriverSetMaxPinnedMemSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":188 + * + * global __cuFileBatchIOSetUp + * __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') # <<<<<<<<<<<<<< + * if __cuFileBatchIOSetUp == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBatchIOSetUp")); + + /* "cuda/bindings/_internal/cufile.pyx":189 + * global __cuFileBatchIOSetUp + * __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + * if __cuFileBatchIOSetUp == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":190 + * __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + * if __cuFileBatchIOSetUp == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":191 + * if __cuFileBatchIOSetUp == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 191, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":190 + * __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + * if __cuFileBatchIOSetUp == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":192 + * if handle == NULL: + * handle = load_library() + * __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOSubmit +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp = dlsym(__pyx_v_handle, ((char const *)"cuFileBatchIOSetUp")); + + /* "cuda/bindings/_internal/cufile.pyx":189 + * global __cuFileBatchIOSetUp + * __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + * if __cuFileBatchIOSetUp == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":195 + * + * global __cuFileBatchIOSubmit + * __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') # <<<<<<<<<<<<<< + * if __cuFileBatchIOSubmit == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBatchIOSubmit")); + + /* "cuda/bindings/_internal/cufile.pyx":196 + * global __cuFileBatchIOSubmit + * __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + * if __cuFileBatchIOSubmit == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":197 + * __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + * if __cuFileBatchIOSubmit == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":198 + * if __cuFileBatchIOSubmit == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":197 + * __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + * if __cuFileBatchIOSubmit == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":199 + * if handle == NULL: + * handle = load_library() + * __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOGetStatus +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit = dlsym(__pyx_v_handle, ((char const *)"cuFileBatchIOSubmit")); + + /* "cuda/bindings/_internal/cufile.pyx":196 + * global __cuFileBatchIOSubmit + * __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + * if __cuFileBatchIOSubmit == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":202 + * + * global __cuFileBatchIOGetStatus + * __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') # <<<<<<<<<<<<<< + * if __cuFileBatchIOGetStatus == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBatchIOGetStatus")); + + /* "cuda/bindings/_internal/cufile.pyx":203 + * global __cuFileBatchIOGetStatus + * __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + * if __cuFileBatchIOGetStatus == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":204 + * __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + * if __cuFileBatchIOGetStatus == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":205 + * if __cuFileBatchIOGetStatus == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":204 + * __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + * if __cuFileBatchIOGetStatus == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":206 + * if handle == NULL: + * handle = load_library() + * __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOCancel +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus = dlsym(__pyx_v_handle, ((char const *)"cuFileBatchIOGetStatus")); + + /* "cuda/bindings/_internal/cufile.pyx":203 + * global __cuFileBatchIOGetStatus + * __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + * if __cuFileBatchIOGetStatus == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":209 + * + * global __cuFileBatchIOCancel + * __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') # <<<<<<<<<<<<<< + * if __cuFileBatchIOCancel == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBatchIOCancel")); + + /* "cuda/bindings/_internal/cufile.pyx":210 + * global __cuFileBatchIOCancel + * __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + * if __cuFileBatchIOCancel == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":211 + * __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + * if __cuFileBatchIOCancel == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":212 + * if __cuFileBatchIOCancel == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":211 + * __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + * if __cuFileBatchIOCancel == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":213 + * if handle == NULL: + * handle = load_library() + * __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') # <<<<<<<<<<<<<< + * + * global __cuFileBatchIODestroy +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel = dlsym(__pyx_v_handle, ((char const *)"cuFileBatchIOCancel")); + + /* "cuda/bindings/_internal/cufile.pyx":210 + * global __cuFileBatchIOCancel + * __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + * if __cuFileBatchIOCancel == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":216 + * + * global __cuFileBatchIODestroy + * __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') # <<<<<<<<<<<<<< + * if __cuFileBatchIODestroy == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, ((char const *)"cuFileBatchIODestroy")); + + /* "cuda/bindings/_internal/cufile.pyx":217 + * global __cuFileBatchIODestroy + * __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + * if __cuFileBatchIODestroy == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":218 + * __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + * if __cuFileBatchIODestroy == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":219 + * if __cuFileBatchIODestroy == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":218 + * __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + * if __cuFileBatchIODestroy == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":220 + * if handle == NULL: + * handle = load_library() + * __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') # <<<<<<<<<<<<<< + * + * global __cuFileReadAsync +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy = dlsym(__pyx_v_handle, ((char const *)"cuFileBatchIODestroy")); + + /* "cuda/bindings/_internal/cufile.pyx":217 + * global __cuFileBatchIODestroy + * __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + * if __cuFileBatchIODestroy == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":223 + * + * global __cuFileReadAsync + * __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') # <<<<<<<<<<<<<< + * if __cuFileReadAsync == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync = dlsym(RTLD_DEFAULT, ((char const *)"cuFileReadAsync")); + + /* "cuda/bindings/_internal/cufile.pyx":224 + * global __cuFileReadAsync + * __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + * if __cuFileReadAsync == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":225 + * __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + * if __cuFileReadAsync == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":226 + * if __cuFileReadAsync == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":225 + * __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + * if __cuFileReadAsync == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":227 + * if handle == NULL: + * handle = load_library() + * __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') # <<<<<<<<<<<<<< + * + * global __cuFileWriteAsync +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync = dlsym(__pyx_v_handle, ((char const *)"cuFileReadAsync")); + + /* "cuda/bindings/_internal/cufile.pyx":224 + * global __cuFileReadAsync + * __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + * if __cuFileReadAsync == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":230 + * + * global __cuFileWriteAsync + * __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') # <<<<<<<<<<<<<< + * if __cuFileWriteAsync == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync = dlsym(RTLD_DEFAULT, ((char const *)"cuFileWriteAsync")); + + /* "cuda/bindings/_internal/cufile.pyx":231 + * global __cuFileWriteAsync + * __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + * if __cuFileWriteAsync == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":232 + * __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + * if __cuFileWriteAsync == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":233 + * if __cuFileWriteAsync == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":232 + * __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + * if __cuFileWriteAsync == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":234 + * if handle == NULL: + * handle = load_library() + * __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') # <<<<<<<<<<<<<< + * + * global __cuFileStreamRegister +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync = dlsym(__pyx_v_handle, ((char const *)"cuFileWriteAsync")); + + /* "cuda/bindings/_internal/cufile.pyx":231 + * global __cuFileWriteAsync + * __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + * if __cuFileWriteAsync == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":237 + * + * global __cuFileStreamRegister + * __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') # <<<<<<<<<<<<<< + * if __cuFileStreamRegister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileStreamRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":238 + * global __cuFileStreamRegister + * __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + * if __cuFileStreamRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":239 + * __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + * if __cuFileStreamRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":240 + * if __cuFileStreamRegister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":239 + * __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + * if __cuFileStreamRegister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":241 + * if handle == NULL: + * handle = load_library() + * __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') # <<<<<<<<<<<<<< + * + * global __cuFileStreamDeregister +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister = dlsym(__pyx_v_handle, ((char const *)"cuFileStreamRegister")); + + /* "cuda/bindings/_internal/cufile.pyx":238 + * global __cuFileStreamRegister + * __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + * if __cuFileStreamRegister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":244 + * + * global __cuFileStreamDeregister + * __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') # <<<<<<<<<<<<<< + * if __cuFileStreamDeregister == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister = dlsym(RTLD_DEFAULT, ((char const *)"cuFileStreamDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":245 + * global __cuFileStreamDeregister + * __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + * if __cuFileStreamDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":246 + * __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + * if __cuFileStreamDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":247 + * if __cuFileStreamDeregister == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":246 + * __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + * if __cuFileStreamDeregister == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":248 + * if handle == NULL: + * handle = load_library() + * __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') # <<<<<<<<<<<<<< + * + * global __cuFileGetVersion +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister = dlsym(__pyx_v_handle, ((char const *)"cuFileStreamDeregister")); + + /* "cuda/bindings/_internal/cufile.pyx":245 + * global __cuFileStreamDeregister + * __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + * if __cuFileStreamDeregister == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":251 + * + * global __cuFileGetVersion + * __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') # <<<<<<<<<<<<<< + * if __cuFileGetVersion == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion = dlsym(RTLD_DEFAULT, ((char const *)"cuFileGetVersion")); + + /* "cuda/bindings/_internal/cufile.pyx":252 + * global __cuFileGetVersion + * __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + * if __cuFileGetVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":253 + * __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + * if __cuFileGetVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":254 + * if __cuFileGetVersion == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":253 + * __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + * if __cuFileGetVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":255 + * if handle == NULL: + * handle = load_library() + * __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterSizeT +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion = dlsym(__pyx_v_handle, ((char const *)"cuFileGetVersion")); + + /* "cuda/bindings/_internal/cufile.pyx":252 + * global __cuFileGetVersion + * __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + * if __cuFileGetVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":258 + * + * global __cuFileGetParameterSizeT + * __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') # <<<<<<<<<<<<<< + * if __cuFileGetParameterSizeT == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, ((char const *)"cuFileGetParameterSizeT")); + + /* "cuda/bindings/_internal/cufile.pyx":259 + * global __cuFileGetParameterSizeT + * __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + * if __cuFileGetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":260 + * __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + * if __cuFileGetParameterSizeT == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":261 + * if __cuFileGetParameterSizeT == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":260 + * __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + * if __cuFileGetParameterSizeT == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":262 + * if handle == NULL: + * handle = load_library() + * __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterBool +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT = dlsym(__pyx_v_handle, ((char const *)"cuFileGetParameterSizeT")); + + /* "cuda/bindings/_internal/cufile.pyx":259 + * global __cuFileGetParameterSizeT + * __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + * if __cuFileGetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":265 + * + * global __cuFileGetParameterBool + * __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') # <<<<<<<<<<<<<< + * if __cuFileGetParameterBool == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool = dlsym(RTLD_DEFAULT, ((char const *)"cuFileGetParameterBool")); + + /* "cuda/bindings/_internal/cufile.pyx":266 + * global __cuFileGetParameterBool + * __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + * if __cuFileGetParameterBool == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":267 + * __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + * if __cuFileGetParameterBool == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":268 + * if __cuFileGetParameterBool == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 268, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":267 + * __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + * if __cuFileGetParameterBool == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":269 + * if handle == NULL: + * handle = load_library() + * __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterString +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool = dlsym(__pyx_v_handle, ((char const *)"cuFileGetParameterBool")); + + /* "cuda/bindings/_internal/cufile.pyx":266 + * global __cuFileGetParameterBool + * __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + * if __cuFileGetParameterBool == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":272 + * + * global __cuFileGetParameterString + * __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') # <<<<<<<<<<<<<< + * if __cuFileGetParameterString == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString = dlsym(RTLD_DEFAULT, ((char const *)"cuFileGetParameterString")); + + /* "cuda/bindings/_internal/cufile.pyx":273 + * global __cuFileGetParameterString + * __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + * if __cuFileGetParameterString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":274 + * __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + * if __cuFileGetParameterString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":275 + * if __cuFileGetParameterString == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":274 + * __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + * if __cuFileGetParameterString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":276 + * if handle == NULL: + * handle = load_library() + * __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterSizeT +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString = dlsym(__pyx_v_handle, ((char const *)"cuFileGetParameterString")); + + /* "cuda/bindings/_internal/cufile.pyx":273 + * global __cuFileGetParameterString + * __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + * if __cuFileGetParameterString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":279 + * + * global __cuFileSetParameterSizeT + * __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') # <<<<<<<<<<<<<< + * if __cuFileSetParameterSizeT == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, ((char const *)"cuFileSetParameterSizeT")); + + /* "cuda/bindings/_internal/cufile.pyx":280 + * global __cuFileSetParameterSizeT + * __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + * if __cuFileSetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":281 + * __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + * if __cuFileSetParameterSizeT == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":282 + * if __cuFileSetParameterSizeT == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":281 + * __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + * if __cuFileSetParameterSizeT == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":283 + * if handle == NULL: + * handle = load_library() + * __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterBool +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT = dlsym(__pyx_v_handle, ((char const *)"cuFileSetParameterSizeT")); + + /* "cuda/bindings/_internal/cufile.pyx":280 + * global __cuFileSetParameterSizeT + * __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + * if __cuFileSetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":286 + * + * global __cuFileSetParameterBool + * __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') # <<<<<<<<<<<<<< + * if __cuFileSetParameterBool == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool = dlsym(RTLD_DEFAULT, ((char const *)"cuFileSetParameterBool")); + + /* "cuda/bindings/_internal/cufile.pyx":287 + * global __cuFileSetParameterBool + * __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + * if __cuFileSetParameterBool == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":288 + * __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + * if __cuFileSetParameterBool == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":289 + * if __cuFileSetParameterBool == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 289, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":288 + * __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + * if __cuFileSetParameterBool == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":290 + * if handle == NULL: + * handle = load_library() + * __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterString +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool = dlsym(__pyx_v_handle, ((char const *)"cuFileSetParameterBool")); + + /* "cuda/bindings/_internal/cufile.pyx":287 + * global __cuFileSetParameterBool + * __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + * if __cuFileSetParameterBool == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":293 + * + * global __cuFileSetParameterString + * __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') # <<<<<<<<<<<<<< + * if __cuFileSetParameterString == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString = dlsym(RTLD_DEFAULT, ((char const *)"cuFileSetParameterString")); + + /* "cuda/bindings/_internal/cufile.pyx":294 + * global __cuFileSetParameterString + * __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + * if __cuFileSetParameterString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":295 + * __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + * if __cuFileSetParameterString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":296 + * if __cuFileSetParameterString == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":295 + * __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + * if __cuFileSetParameterString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":297 + * if handle == NULL: + * handle = load_library() + * __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') # <<<<<<<<<<<<<< + * + * global __cuFileDriverClose +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString = dlsym(__pyx_v_handle, ((char const *)"cuFileSetParameterString")); + + /* "cuda/bindings/_internal/cufile.pyx":294 + * global __cuFileSetParameterString + * __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + * if __cuFileSetParameterString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":300 + * + * global __cuFileDriverClose + * __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') # <<<<<<<<<<<<<< + * if __cuFileDriverClose == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose = dlsym(RTLD_DEFAULT, ((char const *)"cuFileDriverClose")); + + /* "cuda/bindings/_internal/cufile.pyx":301 + * global __cuFileDriverClose + * __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + * if __cuFileDriverClose == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":302 + * __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + * if __cuFileDriverClose == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/cufile.pyx":303 + * if __cuFileDriverClose == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_6cufile_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/cufile.pyx":302 + * __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + * if __cuFileDriverClose == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":304 + * if handle == NULL: + * handle = load_library() + * __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') # <<<<<<<<<<<<<< + * + * __py_cufile_init = True +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose = dlsym(__pyx_v_handle, ((char const *)"cuFileDriverClose")); + + /* "cuda/bindings/_internal/cufile.pyx":301 + * global __cuFileDriverClose + * __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + * if __cuFileDriverClose == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":306 + * __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') + * + * __py_cufile_init = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___py_cufile_init = 1; + + /* "cuda/bindings/_internal/cufile.pyx":307 + * + * __py_cufile_init = True + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_internal/cufile.pyx":87 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __cuFileHandleRegister +*/ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("cuda.bindings._internal.cufile.__check_or_init_cufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 87, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 87, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 87, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 87, __pyx_L12_except_error) + __pyx_t_13 = (!__pyx_t_9); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 87, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 87, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_14 = __pyx_r; + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 87, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_14; + goto __pyx_L3_return; + } + __pyx_L9:; + } + goto __pyx_L81; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_error; + __pyx_L81:; + } + } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L3_return: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L0; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_internal/cufile.pyx":82 + * + * + * cdef int __check_or_init_cufile() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_cufile_init + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings._internal.cufile.__check_or_init_cufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":310 + * + * + * cdef inline int _check_or_init_cufile() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_cufile_init: + * return 0 +*/ + +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_internal/cufile.pyx":311 + * + * cdef inline int _check_or_init_cufile() except -1 nogil: + * if __py_cufile_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + if (__pyx_v_4cuda_8bindings_9_internal_6cufile___py_cufile_init) { + + /* "cuda/bindings/_internal/cufile.pyx":312 + * cdef inline int _check_or_init_cufile() except -1 nogil: + * if __py_cufile_init: + * return 0 # <<<<<<<<<<<<<< + * + * return __check_or_init_cufile() +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":311 + * + * cdef inline int _check_or_init_cufile() except -1 nogil: + * if __py_cufile_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":314 + * return 0 + * + * return __check_or_init_cufile() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile___check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":310 + * + * + * cdef inline int _check_or_init_cufile() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_cufile_init: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._check_or_init_cufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":320 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_data = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + + /* "cuda/bindings/_internal/cufile.pyx":322 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs != ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/cufile.pyx":323 + * global func_ptrs + * if func_ptrs is not None: + * return func_ptrs # <<<<<<<<<<<<<< + * + * _check_or_init_cufile() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs); + __pyx_r = __pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs; + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":322 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":325 + * return func_ptrs + * + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * cdef dict data = {} + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":326 + * + * _check_or_init_cufile() + * cdef dict data = {} # <<<<<<<<<<<<<< + * + * global __cuFileHandleRegister +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_data = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":329 + * + * global __cuFileHandleRegister + * data["__cuFileHandleRegister"] = __cuFileHandleRegister # <<<<<<<<<<<<<< + * + * global __cuFileHandleDeregister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileHandleRegister, __pyx_t_3) < 0))) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":332 + * + * global __cuFileHandleDeregister + * data["__cuFileHandleDeregister"] = __cuFileHandleDeregister # <<<<<<<<<<<<<< + * + * global __cuFileBufRegister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileHandleDeregister, __pyx_t_3) < 0))) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":335 + * + * global __cuFileBufRegister + * data["__cuFileBufRegister"] = __cuFileBufRegister # <<<<<<<<<<<<<< + * + * global __cuFileBufDeregister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBufRegister, __pyx_t_3) < 0))) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":338 + * + * global __cuFileBufDeregister + * data["__cuFileBufDeregister"] = __cuFileBufDeregister # <<<<<<<<<<<<<< + * + * global __cuFileRead +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBufDeregister, __pyx_t_3) < 0))) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":341 + * + * global __cuFileRead + * data["__cuFileRead"] = __cuFileRead # <<<<<<<<<<<<<< + * + * global __cuFileWrite +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileRead, __pyx_t_3) < 0))) __PYX_ERR(0, 341, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":344 + * + * global __cuFileWrite + * data["__cuFileWrite"] = __cuFileWrite # <<<<<<<<<<<<<< + * + * global __cuFileDriverOpen +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileWrite, __pyx_t_3) < 0))) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":347 + * + * global __cuFileDriverOpen + * data["__cuFileDriverOpen"] = __cuFileDriverOpen # <<<<<<<<<<<<<< + * + * global __cuFileDriverClose_v2 +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverOpen, __pyx_t_3) < 0))) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":350 + * + * global __cuFileDriverClose_v2 + * data["__cuFileDriverClose_v2"] = __cuFileDriverClose_v2 # <<<<<<<<<<<<<< + * + * global __cuFileUseCount +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverClose_v2, __pyx_t_3) < 0))) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":353 + * + * global __cuFileUseCount + * data["__cuFileUseCount"] = __cuFileUseCount # <<<<<<<<<<<<<< + * + * global __cuFileDriverGetProperties +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileUseCount, __pyx_t_3) < 0))) __PYX_ERR(0, 353, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":356 + * + * global __cuFileDriverGetProperties + * data["__cuFileDriverGetProperties"] = __cuFileDriverGetProperties # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetPollMode +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverGetProperties, __pyx_t_3) < 0))) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":359 + * + * global __cuFileDriverSetPollMode + * data["__cuFileDriverSetPollMode"] = __cuFileDriverSetPollMode # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxDirectIOSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverSetPollMode, __pyx_t_3) < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":362 + * + * global __cuFileDriverSetMaxDirectIOSize + * data["__cuFileDriverSetMaxDirectIOSize"] = __cuFileDriverSetMaxDirectIOSize # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxCacheSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverSetMaxDirectIOSize, __pyx_t_3) < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":365 + * + * global __cuFileDriverSetMaxCacheSize + * data["__cuFileDriverSetMaxCacheSize"] = __cuFileDriverSetMaxCacheSize # <<<<<<<<<<<<<< + * + * global __cuFileDriverSetMaxPinnedMemSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverSetMaxCacheSize, __pyx_t_3) < 0))) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":368 + * + * global __cuFileDriverSetMaxPinnedMemSize + * data["__cuFileDriverSetMaxPinnedMemSize"] = __cuFileDriverSetMaxPinnedMemSize # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOSetUp +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverSetMaxPinnedMemSiz, __pyx_t_3) < 0))) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":371 + * + * global __cuFileBatchIOSetUp + * data["__cuFileBatchIOSetUp"] = __cuFileBatchIOSetUp # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOSubmit +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBatchIOSetUp, __pyx_t_3) < 0))) __PYX_ERR(0, 371, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":374 + * + * global __cuFileBatchIOSubmit + * data["__cuFileBatchIOSubmit"] = __cuFileBatchIOSubmit # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOGetStatus +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBatchIOSubmit, __pyx_t_3) < 0))) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":377 + * + * global __cuFileBatchIOGetStatus + * data["__cuFileBatchIOGetStatus"] = __cuFileBatchIOGetStatus # <<<<<<<<<<<<<< + * + * global __cuFileBatchIOCancel +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBatchIOGetStatus, __pyx_t_3) < 0))) __PYX_ERR(0, 377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":380 + * + * global __cuFileBatchIOCancel + * data["__cuFileBatchIOCancel"] = __cuFileBatchIOCancel # <<<<<<<<<<<<<< + * + * global __cuFileBatchIODestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBatchIOCancel, __pyx_t_3) < 0))) __PYX_ERR(0, 380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":383 + * + * global __cuFileBatchIODestroy + * data["__cuFileBatchIODestroy"] = __cuFileBatchIODestroy # <<<<<<<<<<<<<< + * + * global __cuFileReadAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileBatchIODestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 383, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":386 + * + * global __cuFileReadAsync + * data["__cuFileReadAsync"] = __cuFileReadAsync # <<<<<<<<<<<<<< + * + * global __cuFileWriteAsync +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileReadAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":389 + * + * global __cuFileWriteAsync + * data["__cuFileWriteAsync"] = __cuFileWriteAsync # <<<<<<<<<<<<<< + * + * global __cuFileStreamRegister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileWriteAsync, __pyx_t_3) < 0))) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":392 + * + * global __cuFileStreamRegister + * data["__cuFileStreamRegister"] = __cuFileStreamRegister # <<<<<<<<<<<<<< + * + * global __cuFileStreamDeregister +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileStreamRegister, __pyx_t_3) < 0))) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":395 + * + * global __cuFileStreamDeregister + * data["__cuFileStreamDeregister"] = __cuFileStreamDeregister # <<<<<<<<<<<<<< + * + * global __cuFileGetVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileStreamDeregister, __pyx_t_3) < 0))) __PYX_ERR(0, 395, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":398 + * + * global __cuFileGetVersion + * data["__cuFileGetVersion"] = __cuFileGetVersion # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterSizeT +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileGetVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":401 + * + * global __cuFileGetParameterSizeT + * data["__cuFileGetParameterSizeT"] = __cuFileGetParameterSizeT # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterBool +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileGetParameterSizeT, __pyx_t_3) < 0))) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":404 + * + * global __cuFileGetParameterBool + * data["__cuFileGetParameterBool"] = __cuFileGetParameterBool # <<<<<<<<<<<<<< + * + * global __cuFileGetParameterString +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileGetParameterBool, __pyx_t_3) < 0))) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":407 + * + * global __cuFileGetParameterString + * data["__cuFileGetParameterString"] = __cuFileGetParameterString # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterSizeT +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileGetParameterString, __pyx_t_3) < 0))) __PYX_ERR(0, 407, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":410 + * + * global __cuFileSetParameterSizeT + * data["__cuFileSetParameterSizeT"] = __cuFileSetParameterSizeT # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterBool +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileSetParameterSizeT, __pyx_t_3) < 0))) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":413 + * + * global __cuFileSetParameterBool + * data["__cuFileSetParameterBool"] = __cuFileSetParameterBool # <<<<<<<<<<<<<< + * + * global __cuFileSetParameterString +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileSetParameterBool, __pyx_t_3) < 0))) __PYX_ERR(0, 413, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":416 + * + * global __cuFileSetParameterString + * data["__cuFileSetParameterString"] = __cuFileSetParameterString # <<<<<<<<<<<<<< + * + * global __cuFileDriverClose +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileSetParameterString, __pyx_t_3) < 0))) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":419 + * + * global __cuFileDriverClose + * data["__cuFileDriverClose"] = __cuFileDriverClose # <<<<<<<<<<<<<< + * + * func_ptrs = data +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_cuFileDriverClose, __pyx_t_3) < 0))) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":421 + * data["__cuFileDriverClose"] = __cuFileDriverClose + * + * func_ptrs = data # <<<<<<<<<<<<<< + * return data + * +*/ + __Pyx_INCREF(__pyx_v_data); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + + /* "cuda/bindings/_internal/cufile.pyx":422 + * + * func_ptrs = data + * return data # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":320 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers, "_inspect_function_pointers() -> dict"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers = {"_inspect_function_pointers", (PyCFunction)__pyx_pw_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers, METH_NOARGS, __pyx_doc_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointers (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":425 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointer(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + + /* "cuda/bindings/_internal/cufile.pyx":427 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs == ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/cufile.pyx":428 + * global func_ptrs + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() # <<<<<<<<<<<<<< + * return func_ptrs[name] + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointers(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":427 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":429 + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 429, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":425 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_6cufile_2_inspect_function_pointer, "_inspect_function_pointer(str name)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer = {"_inspect_function_pointer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9_internal_6cufile_2_inspect_function_pointer}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 425, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 425, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_inspect_function_pointer", 0) < (0)) __PYX_ERR(0, 425, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, i); __PYX_ERR(0, 425, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 425, __pyx_L3_error) + } + __pyx_v_name = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 425, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings._internal.cufile._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_6cufile_2_inspect_function_pointer(__pyx_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_6cufile_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__inspect_function_pointer(__pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":436 + * ############################################################################### + * + * cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileHandleRegister + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleRegister(CUfileHandle_t *__pyx_v_fh, CUfileDescr_t *__pyx_v_descr) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileHandleRegister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":438 + * cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileHandleRegister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileHandleRegister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 438, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":439 + * global __cuFileHandleRegister + * _check_or_init_cufile() + * if __cuFileHandleRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":440 + * _check_or_init_cufile() + * if __cuFileHandleRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") + * return (__cuFileHandleRegister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":441 + * if __cuFileHandleRegister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") # <<<<<<<<<<<<<< + * return (__cuFileHandleRegister)( + * fh, descr) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileHandleRegister_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 441, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":440 + * _check_or_init_cufile() + * if __cuFileHandleRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") + * return (__cuFileHandleRegister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":439 + * global __cuFileHandleRegister + * _check_or_init_cufile() + * if __cuFileHandleRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":442 + * with gil: + * raise FunctionNotFoundError("function cuFileHandleRegister is not found") + * return (__cuFileHandleRegister)( # <<<<<<<<<<<<<< + * fh, descr) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileHandle_t *, CUfileDescr_t *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister)(__pyx_v_fh, __pyx_v_descr); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":436 + * ############################################################################### + * + * cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileHandleRegister + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileHandleRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":446 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * global __cuFileHandleDeregister +*/ + +static void __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleDeregister(CUfileHandle_t __pyx_v_fh) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileHandleDeregister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":449 + * cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * global __cuFileHandleDeregister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileHandleDeregister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":450 + * global __cuFileHandleDeregister + * _check_or_init_cufile() + * if __cuFileHandleDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":451 + * _check_or_init_cufile() + * if __cuFileHandleDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") + * (__cuFileHandleDeregister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":452 + * if __cuFileHandleDeregister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") # <<<<<<<<<<<<<< + * (__cuFileHandleDeregister)( + * fh) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileHandleDeregister}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 452, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":451 + * _check_or_init_cufile() + * if __cuFileHandleDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") + * (__cuFileHandleDeregister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":450 + * global __cuFileHandleDeregister + * _check_or_init_cufile() + * if __cuFileHandleDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":453 + * with gil: + * raise FunctionNotFoundError("function cuFileHandleDeregister is not found") + * (__cuFileHandleDeregister)( # <<<<<<<<<<<<<< + * fh) + * +*/ + ((void (*)(CUfileHandle_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister)(__pyx_v_fh); + + /* "cuda/bindings/_internal/cufile.pyx":446 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * global __cuFileHandleDeregister +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileHandleDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() +} + +/* "cuda/bindings/_internal/cufile.pyx":457 + * + * + * cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBufRegister + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufRegister(void const *__pyx_v_bufPtr_base, size_t __pyx_v_length, int __pyx_v_flags) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBufRegister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":459 + * cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBufRegister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBufRegister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 459, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":460 + * global __cuFileBufRegister + * _check_or_init_cufile() + * if __cuFileBufRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBufRegister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":461 + * _check_or_init_cufile() + * if __cuFileBufRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBufRegister is not found") + * return (__cuFileBufRegister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":462 + * if __cuFileBufRegister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBufRegister is not found") # <<<<<<<<<<<<<< + * return (__cuFileBufRegister)( + * bufPtr_base, length, flags) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBufRegister_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 462, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":461 + * _check_or_init_cufile() + * if __cuFileBufRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBufRegister is not found") + * return (__cuFileBufRegister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":460 + * global __cuFileBufRegister + * _check_or_init_cufile() + * if __cuFileBufRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBufRegister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":463 + * with gil: + * raise FunctionNotFoundError("function cuFileBufRegister is not found") + * return (__cuFileBufRegister)( # <<<<<<<<<<<<<< + * bufPtr_base, length, flags) + * +*/ + __pyx_r = ((CUfileError_t (*)(void const *, size_t, int))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister)(__pyx_v_bufPtr_base, __pyx_v_length, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":457 + * + * + * cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBufRegister + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBufRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":467 + * + * + * cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBufDeregister + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufDeregister(void const *__pyx_v_bufPtr_base) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBufDeregister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":469 + * cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBufDeregister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBufDeregister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 469, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":470 + * global __cuFileBufDeregister + * _check_or_init_cufile() + * if __cuFileBufDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":471 + * _check_or_init_cufile() + * if __cuFileBufDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") + * return (__cuFileBufDeregister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":472 + * if __cuFileBufDeregister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") # <<<<<<<<<<<<<< + * return (__cuFileBufDeregister)( + * bufPtr_base) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 472, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBufDeregister_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 472, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":471 + * _check_or_init_cufile() + * if __cuFileBufDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") + * return (__cuFileBufDeregister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":470 + * global __cuFileBufDeregister + * _check_or_init_cufile() + * if __cuFileBufDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":473 + * with gil: + * raise FunctionNotFoundError("function cuFileBufDeregister is not found") + * return (__cuFileBufDeregister)( # <<<<<<<<<<<<<< + * bufPtr_base) + * +*/ + __pyx_r = ((CUfileError_t (*)(void const *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister)(__pyx_v_bufPtr_base); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":467 + * + * + * cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBufDeregister + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBufDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":477 + * + * + * cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * global __cuFileRead + * _check_or_init_cufile() +*/ + +static Py_ssize_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileRead(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_bufPtr_offset) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileRead", 1); + + /* "cuda/bindings/_internal/cufile.pyx":479 + * cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + * global __cuFileRead + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileRead == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":480 + * global __cuFileRead + * _check_or_init_cufile() + * if __cuFileRead == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileRead is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":481 + * _check_or_init_cufile() + * if __cuFileRead == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileRead is not found") + * return (__cuFileRead)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":482 + * if __cuFileRead == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileRead is not found") # <<<<<<<<<<<<<< + * return (__cuFileRead)( + * fh, bufPtr_base, size, file_offset, bufPtr_offset) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileRead_is_not_found}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 482, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":481 + * _check_or_init_cufile() + * if __cuFileRead == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileRead is not found") + * return (__cuFileRead)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":480 + * global __cuFileRead + * _check_or_init_cufile() + * if __cuFileRead == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileRead is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":483 + * with gil: + * raise FunctionNotFoundError("function cuFileRead is not found") + * return (__cuFileRead)( # <<<<<<<<<<<<<< + * fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + __pyx_r = ((Py_ssize_t (*)(CUfileHandle_t, void *, size_t, off_t, off_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead)(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_bufPtr_offset); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":477 + * + * + * cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * global __cuFileRead + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileRead", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":487 + * + * + * cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * global __cuFileWrite + * _check_or_init_cufile() +*/ + +static Py_ssize_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWrite(CUfileHandle_t __pyx_v_fh, void const *__pyx_v_bufPtr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_bufPtr_offset) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileWrite", 1); + + /* "cuda/bindings/_internal/cufile.pyx":489 + * cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + * global __cuFileWrite + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileWrite == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 489, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":490 + * global __cuFileWrite + * _check_or_init_cufile() + * if __cuFileWrite == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileWrite is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":491 + * _check_or_init_cufile() + * if __cuFileWrite == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileWrite is not found") + * return (__cuFileWrite)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":492 + * if __cuFileWrite == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileWrite is not found") # <<<<<<<<<<<<<< + * return (__cuFileWrite)( + * fh, bufPtr_base, size, file_offset, bufPtr_offset) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileWrite_is_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 492, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":491 + * _check_or_init_cufile() + * if __cuFileWrite == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileWrite is not found") + * return (__cuFileWrite)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":490 + * global __cuFileWrite + * _check_or_init_cufile() + * if __cuFileWrite == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileWrite is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":493 + * with gil: + * raise FunctionNotFoundError("function cuFileWrite is not found") + * return (__cuFileWrite)( # <<<<<<<<<<<<<< + * fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + __pyx_r = ((Py_ssize_t (*)(CUfileHandle_t, void const *, size_t, off_t, off_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite)(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_bufPtr_offset); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":487 + * + * + * cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * global __cuFileWrite + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileWrite", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":497 + * + * + * cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverOpen + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverOpen(void) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverOpen", 1); + + /* "cuda/bindings/_internal/cufile.pyx":499 + * cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverOpen + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverOpen == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 499, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":500 + * global __cuFileDriverOpen + * _check_or_init_cufile() + * if __cuFileDriverOpen == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":501 + * _check_or_init_cufile() + * if __cuFileDriverOpen == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") + * return (__cuFileDriverOpen)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":502 + * if __cuFileDriverOpen == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverOpen)( + * ) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 502, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverOpen_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 502, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":501 + * _check_or_init_cufile() + * if __cuFileDriverOpen == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") + * return (__cuFileDriverOpen)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":500 + * global __cuFileDriverOpen + * _check_or_init_cufile() + * if __cuFileDriverOpen == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":503 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverOpen is not found") + * return (__cuFileDriverOpen)( # <<<<<<<<<<<<<< + * ) + * +*/ + __pyx_r = ((CUfileError_t (*)(void))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen)(); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":497 + * + * + * cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverOpen + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":507 + * + * + * cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverClose_v2 + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose_v2(void) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverClose_v2", 1); + + /* "cuda/bindings/_internal/cufile.pyx":509 + * cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverClose_v2 + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverClose_v2 == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 509, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":510 + * global __cuFileDriverClose_v2 + * _check_or_init_cufile() + * if __cuFileDriverClose_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2 == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":511 + * _check_or_init_cufile() + * if __cuFileDriverClose_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") + * return (__cuFileDriverClose_v2)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":512 + * if __cuFileDriverClose_v2 == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverClose_v2)( + * ) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverClose_v2_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 512, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":511 + * _check_or_init_cufile() + * if __cuFileDriverClose_v2 == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") + * return (__cuFileDriverClose_v2)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":510 + * global __cuFileDriverClose_v2 + * _check_or_init_cufile() + * if __cuFileDriverClose_v2 == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":513 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") + * return (__cuFileDriverClose_v2)( # <<<<<<<<<<<<<< + * ) + * +*/ + __pyx_r = ((CUfileError_t (*)(void))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2)(); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":507 + * + * + * cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverClose_v2 + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverClose_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":517 + * + * + * cdef long _cuFileUseCount() except* nogil: # <<<<<<<<<<<<<< + * global __cuFileUseCount + * _check_or_init_cufile() +*/ + +static long __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileUseCount(void) { + long __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileUseCount", 1); + + /* "cuda/bindings/_internal/cufile.pyx":519 + * cdef long _cuFileUseCount() except* nogil: + * global __cuFileUseCount + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileUseCount == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 519, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":520 + * global __cuFileUseCount + * _check_or_init_cufile() + * if __cuFileUseCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileUseCount is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":521 + * _check_or_init_cufile() + * if __cuFileUseCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileUseCount is not found") + * return (__cuFileUseCount)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":522 + * if __cuFileUseCount == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileUseCount is not found") # <<<<<<<<<<<<<< + * return (__cuFileUseCount)( + * ) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileUseCount_is_not_f}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 522, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":521 + * _check_or_init_cufile() + * if __cuFileUseCount == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileUseCount is not found") + * return (__cuFileUseCount)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":520 + * global __cuFileUseCount + * _check_or_init_cufile() + * if __cuFileUseCount == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileUseCount is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":523 + * with gil: + * raise FunctionNotFoundError("function cuFileUseCount is not found") + * return (__cuFileUseCount)( # <<<<<<<<<<<<<< + * ) + * +*/ + __pyx_r = ((long (*)(void))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount)(); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":517 + * + * + * cdef long _cuFileUseCount() except* nogil: # <<<<<<<<<<<<<< + * global __cuFileUseCount + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileUseCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":527 + * + * + * cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverGetProperties + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverGetProperties(CUfileDrvProps_t *__pyx_v_props) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverGetProperties", 1); + + /* "cuda/bindings/_internal/cufile.pyx":529 + * cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverGetProperties + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverGetProperties == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 529, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":530 + * global __cuFileDriverGetProperties + * _check_or_init_cufile() + * if __cuFileDriverGetProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":531 + * _check_or_init_cufile() + * if __cuFileDriverGetProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") + * return (__cuFileDriverGetProperties)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":532 + * if __cuFileDriverGetProperties == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverGetProperties)( + * props) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverGetProperti}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 532, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":531 + * _check_or_init_cufile() + * if __cuFileDriverGetProperties == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") + * return (__cuFileDriverGetProperties)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":530 + * global __cuFileDriverGetProperties + * _check_or_init_cufile() + * if __cuFileDriverGetProperties == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":533 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") + * return (__cuFileDriverGetProperties)( # <<<<<<<<<<<<<< + * props) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileDrvProps_t *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties)(__pyx_v_props); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":527 + * + * + * cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverGetProperties + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":537 + * + * + * cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetPollMode + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetPollMode(bool __pyx_v_poll, size_t __pyx_v_poll_threshold_size) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverSetPollMode", 1); + + /* "cuda/bindings/_internal/cufile.pyx":539 + * cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverSetPollMode + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverSetPollMode == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 539, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":540 + * global __cuFileDriverSetPollMode + * _check_or_init_cufile() + * if __cuFileDriverSetPollMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":541 + * _check_or_init_cufile() + * if __cuFileDriverSetPollMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") + * return (__cuFileDriverSetPollMode)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":542 + * if __cuFileDriverSetPollMode == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverSetPollMode)( + * poll, poll_threshold_size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverSetPollMode}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 542, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":541 + * _check_or_init_cufile() + * if __cuFileDriverSetPollMode == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") + * return (__cuFileDriverSetPollMode)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":540 + * global __cuFileDriverSetPollMode + * _check_or_init_cufile() + * if __cuFileDriverSetPollMode == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":543 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") + * return (__cuFileDriverSetPollMode)( # <<<<<<<<<<<<<< + * poll, poll_threshold_size) + * +*/ + __pyx_r = ((CUfileError_t (*)(bool, size_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode)(__pyx_v_poll, __pyx_v_poll_threshold_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":537 + * + * + * cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetPollMode + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverSetPollMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":547 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxDirectIOSize + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxDirectIOSize(size_t __pyx_v_max_direct_io_size) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverSetMaxDirectIOSize", 1); + + /* "cuda/bindings/_internal/cufile.pyx":549 + * cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverSetMaxDirectIOSize + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 549, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":550 + * global __cuFileDriverSetMaxDirectIOSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxDirectIOSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":551 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") + * return (__cuFileDriverSetMaxDirectIOSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":552 + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverSetMaxDirectIOSize)( + * max_direct_io_size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverSetMaxDirec}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 552, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":551 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxDirectIOSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") + * return (__cuFileDriverSetMaxDirectIOSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":550 + * global __cuFileDriverSetMaxDirectIOSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxDirectIOSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":553 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") + * return (__cuFileDriverSetMaxDirectIOSize)( # <<<<<<<<<<<<<< + * max_direct_io_size) + * +*/ + __pyx_r = ((CUfileError_t (*)(size_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize)(__pyx_v_max_direct_io_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":547 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxDirectIOSize + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverSetMaxDirectIOSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":557 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxCacheSize + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxCacheSize(size_t __pyx_v_max_cache_size) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverSetMaxCacheSize", 1); + + /* "cuda/bindings/_internal/cufile.pyx":559 + * cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverSetMaxCacheSize + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxCacheSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 559, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":560 + * global __cuFileDriverSetMaxCacheSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxCacheSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":561 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxCacheSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") + * return (__cuFileDriverSetMaxCacheSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":562 + * if __cuFileDriverSetMaxCacheSize == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverSetMaxCacheSize)( + * max_cache_size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 562, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverSetMaxCache}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 562, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":561 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxCacheSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") + * return (__cuFileDriverSetMaxCacheSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":560 + * global __cuFileDriverSetMaxCacheSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxCacheSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":563 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") + * return (__cuFileDriverSetMaxCacheSize)( # <<<<<<<<<<<<<< + * max_cache_size) + * +*/ + __pyx_r = ((CUfileError_t (*)(size_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize)(__pyx_v_max_cache_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":557 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxCacheSize + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverSetMaxCacheSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":567 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxPinnedMemSize + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxPinnedMemSize(size_t __pyx_v_max_pinned_size) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverSetMaxPinnedMemSize", 1); + + /* "cuda/bindings/_internal/cufile.pyx":569 + * cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverSetMaxPinnedMemSize + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 569, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":570 + * global __cuFileDriverSetMaxPinnedMemSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxPinnedMemSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":571 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") + * return (__cuFileDriverSetMaxPinnedMemSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":572 + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverSetMaxPinnedMemSize)( + * max_pinned_size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverSetMaxPinne}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 572, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":571 + * _check_or_init_cufile() + * if __cuFileDriverSetMaxPinnedMemSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") + * return (__cuFileDriverSetMaxPinnedMemSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":570 + * global __cuFileDriverSetMaxPinnedMemSize + * _check_or_init_cufile() + * if __cuFileDriverSetMaxPinnedMemSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":573 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") + * return (__cuFileDriverSetMaxPinnedMemSize)( # <<<<<<<<<<<<<< + * max_pinned_size) + * +*/ + __pyx_r = ((CUfileError_t (*)(size_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize)(__pyx_v_max_pinned_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":567 + * + * + * cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverSetMaxPinnedMemSize + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverSetMaxPinnedMemSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":577 + * + * + * cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOSetUp + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSetUp(CUfileBatchHandle_t *__pyx_v_batch_idp, unsigned int __pyx_v_nr) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBatchIOSetUp", 1); + + /* "cuda/bindings/_internal/cufile.pyx":579 + * cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBatchIOSetUp + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBatchIOSetUp == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 579, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":580 + * global __cuFileBatchIOSetUp + * _check_or_init_cufile() + * if __cuFileBatchIOSetUp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":581 + * _check_or_init_cufile() + * if __cuFileBatchIOSetUp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") + * return (__cuFileBatchIOSetUp)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":582 + * if __cuFileBatchIOSetUp == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") # <<<<<<<<<<<<<< + * return (__cuFileBatchIOSetUp)( + * batch_idp, nr) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBatchIOSetUp_is_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 582, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":581 + * _check_or_init_cufile() + * if __cuFileBatchIOSetUp == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") + * return (__cuFileBatchIOSetUp)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":580 + * global __cuFileBatchIOSetUp + * _check_or_init_cufile() + * if __cuFileBatchIOSetUp == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":583 + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") + * return (__cuFileBatchIOSetUp)( # <<<<<<<<<<<<<< + * batch_idp, nr) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileBatchHandle_t *, unsigned int))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp)(__pyx_v_batch_idp, __pyx_v_nr); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":577 + * + * + * cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOSetUp + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBatchIOSetUp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":587 + * + * + * cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOSubmit + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSubmit(CUfileBatchHandle_t __pyx_v_batch_idp, unsigned int __pyx_v_nr, CUfileIOParams_t *__pyx_v_iocbp, unsigned int __pyx_v_flags) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBatchIOSubmit", 1); + + /* "cuda/bindings/_internal/cufile.pyx":589 + * cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBatchIOSubmit + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBatchIOSubmit == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 589, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":590 + * global __cuFileBatchIOSubmit + * _check_or_init_cufile() + * if __cuFileBatchIOSubmit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":591 + * _check_or_init_cufile() + * if __cuFileBatchIOSubmit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") + * return (__cuFileBatchIOSubmit)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":592 + * if __cuFileBatchIOSubmit == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") # <<<<<<<<<<<<<< + * return (__cuFileBatchIOSubmit)( + * batch_idp, nr, iocbp, flags) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 592, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBatchIOSubmit_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 592, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":591 + * _check_or_init_cufile() + * if __cuFileBatchIOSubmit == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") + * return (__cuFileBatchIOSubmit)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":590 + * global __cuFileBatchIOSubmit + * _check_or_init_cufile() + * if __cuFileBatchIOSubmit == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":593 + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") + * return (__cuFileBatchIOSubmit)( # <<<<<<<<<<<<<< + * batch_idp, nr, iocbp, flags) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit)(__pyx_v_batch_idp, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":587 + * + * + * cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOSubmit + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBatchIOSubmit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":597 + * + * + * cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOGetStatus + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOGetStatus(CUfileBatchHandle_t __pyx_v_batch_idp, unsigned int __pyx_v_min_nr, unsigned int *__pyx_v_nr, CUfileIOEvents_t *__pyx_v_iocbp, struct timespec *__pyx_v_timeout) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBatchIOGetStatus", 1); + + /* "cuda/bindings/_internal/cufile.pyx":599 + * cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBatchIOGetStatus + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBatchIOGetStatus == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 599, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":600 + * global __cuFileBatchIOGetStatus + * _check_or_init_cufile() + * if __cuFileBatchIOGetStatus == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":601 + * _check_or_init_cufile() + * if __cuFileBatchIOGetStatus == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") + * return (__cuFileBatchIOGetStatus)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":602 + * if __cuFileBatchIOGetStatus == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") # <<<<<<<<<<<<<< + * return (__cuFileBatchIOGetStatus)( + * batch_idp, min_nr, nr, iocbp, timeout) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBatchIOGetStatus}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 602, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":601 + * _check_or_init_cufile() + * if __cuFileBatchIOGetStatus == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") + * return (__cuFileBatchIOGetStatus)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":600 + * global __cuFileBatchIOGetStatus + * _check_or_init_cufile() + * if __cuFileBatchIOGetStatus == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":603 + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") + * return (__cuFileBatchIOGetStatus)( # <<<<<<<<<<<<<< + * batch_idp, min_nr, nr, iocbp, timeout) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus)(__pyx_v_batch_idp, __pyx_v_min_nr, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_timeout); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":597 + * + * + * cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOGetStatus + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBatchIOGetStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":607 + * + * + * cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOCancel + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOCancel(CUfileBatchHandle_t __pyx_v_batch_idp) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBatchIOCancel", 1); + + /* "cuda/bindings/_internal/cufile.pyx":609 + * cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileBatchIOCancel + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBatchIOCancel == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 609, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":610 + * global __cuFileBatchIOCancel + * _check_or_init_cufile() + * if __cuFileBatchIOCancel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":611 + * _check_or_init_cufile() + * if __cuFileBatchIOCancel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") + * return (__cuFileBatchIOCancel)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":612 + * if __cuFileBatchIOCancel == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") # <<<<<<<<<<<<<< + * return (__cuFileBatchIOCancel)( + * batch_idp) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBatchIOCancel_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 612, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":611 + * _check_or_init_cufile() + * if __cuFileBatchIOCancel == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") + * return (__cuFileBatchIOCancel)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":610 + * global __cuFileBatchIOCancel + * _check_or_init_cufile() + * if __cuFileBatchIOCancel == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":613 + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") + * return (__cuFileBatchIOCancel)( # <<<<<<<<<<<<<< + * batch_idp) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileBatchHandle_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel)(__pyx_v_batch_idp); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":607 + * + * + * cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileBatchIOCancel + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBatchIOCancel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":617 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * global __cuFileBatchIODestroy +*/ + +static void __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIODestroy(CUfileBatchHandle_t __pyx_v_batch_idp) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileBatchIODestroy", 1); + + /* "cuda/bindings/_internal/cufile.pyx":620 + * cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * global __cuFileBatchIODestroy + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileBatchIODestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 620, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":621 + * global __cuFileBatchIODestroy + * _check_or_init_cufile() + * if __cuFileBatchIODestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":622 + * _check_or_init_cufile() + * if __cuFileBatchIODestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") + * (__cuFileBatchIODestroy)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":623 + * if __cuFileBatchIODestroy == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") # <<<<<<<<<<<<<< + * (__cuFileBatchIODestroy)( + * batch_idp) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileBatchIODestroy_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 623, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":622 + * _check_or_init_cufile() + * if __cuFileBatchIODestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") + * (__cuFileBatchIODestroy)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":621 + * global __cuFileBatchIODestroy + * _check_or_init_cufile() + * if __cuFileBatchIODestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":624 + * with gil: + * raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") + * (__cuFileBatchIODestroy)( # <<<<<<<<<<<<<< + * batch_idp) + * +*/ + ((void (*)(CUfileBatchHandle_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy)(__pyx_v_batch_idp); + + /* "cuda/bindings/_internal/cufile.pyx":617 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * global __cuFileBatchIODestroy +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileBatchIODestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() +} + +/* "cuda/bindings/_internal/cufile.pyx":628 + * + * + * cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileReadAsync + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileReadAsync(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t *__pyx_v_size_p, off_t *__pyx_v_file_offset_p, off_t *__pyx_v_bufPtr_offset_p, Py_ssize_t *__pyx_v_bytes_read_p, CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileReadAsync", 1); + + /* "cuda/bindings/_internal/cufile.pyx":630 + * cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileReadAsync + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileReadAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 630, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":631 + * global __cuFileReadAsync + * _check_or_init_cufile() + * if __cuFileReadAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileReadAsync is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":632 + * _check_or_init_cufile() + * if __cuFileReadAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileReadAsync is not found") + * return (__cuFileReadAsync)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":633 + * if __cuFileReadAsync == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileReadAsync is not found") # <<<<<<<<<<<<<< + * return (__cuFileReadAsync)( + * fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 633, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileReadAsync_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 633, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":632 + * _check_or_init_cufile() + * if __cuFileReadAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileReadAsync is not found") + * return (__cuFileReadAsync)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":631 + * global __cuFileReadAsync + * _check_or_init_cufile() + * if __cuFileReadAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileReadAsync is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":634 + * with gil: + * raise FunctionNotFoundError("function cuFileReadAsync is not found") + * return (__cuFileReadAsync)( # <<<<<<<<<<<<<< + * fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync)(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_bufPtr_offset_p, __pyx_v_bytes_read_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":628 + * + * + * cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileReadAsync + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileReadAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":638 + * + * + * cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileWriteAsync + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWriteAsync(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t *__pyx_v_size_p, off_t *__pyx_v_file_offset_p, off_t *__pyx_v_bufPtr_offset_p, Py_ssize_t *__pyx_v_bytes_written_p, CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileWriteAsync", 1); + + /* "cuda/bindings/_internal/cufile.pyx":640 + * cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileWriteAsync + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileWriteAsync == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 640, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":641 + * global __cuFileWriteAsync + * _check_or_init_cufile() + * if __cuFileWriteAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":642 + * _check_or_init_cufile() + * if __cuFileWriteAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") + * return (__cuFileWriteAsync)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":643 + * if __cuFileWriteAsync == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") # <<<<<<<<<<<<<< + * return (__cuFileWriteAsync)( + * fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileWriteAsync_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 643, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":642 + * _check_or_init_cufile() + * if __cuFileWriteAsync == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") + * return (__cuFileWriteAsync)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":641 + * global __cuFileWriteAsync + * _check_or_init_cufile() + * if __cuFileWriteAsync == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":644 + * with gil: + * raise FunctionNotFoundError("function cuFileWriteAsync is not found") + * return (__cuFileWriteAsync)( # <<<<<<<<<<<<<< + * fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync)(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_bufPtr_offset_p, __pyx_v_bytes_written_p, __pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":638 + * + * + * cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileWriteAsync + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileWriteAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":648 + * + * + * cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileStreamRegister + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamRegister(CUstream __pyx_v_stream, unsigned int __pyx_v_flags) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileStreamRegister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":650 + * cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileStreamRegister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileStreamRegister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 650, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":651 + * global __cuFileStreamRegister + * _check_or_init_cufile() + * if __cuFileStreamRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":652 + * _check_or_init_cufile() + * if __cuFileStreamRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") + * return (__cuFileStreamRegister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":653 + * if __cuFileStreamRegister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") # <<<<<<<<<<<<<< + * return (__cuFileStreamRegister)( + * stream, flags) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileStreamRegister_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 653, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":652 + * _check_or_init_cufile() + * if __cuFileStreamRegister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") + * return (__cuFileStreamRegister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":651 + * global __cuFileStreamRegister + * _check_or_init_cufile() + * if __cuFileStreamRegister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":654 + * with gil: + * raise FunctionNotFoundError("function cuFileStreamRegister is not found") + * return (__cuFileStreamRegister)( # <<<<<<<<<<<<<< + * stream, flags) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUstream, unsigned int))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister)(__pyx_v_stream, __pyx_v_flags); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":648 + * + * + * cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileStreamRegister + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileStreamRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":658 + * + * + * cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileStreamDeregister + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamDeregister(CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileStreamDeregister", 1); + + /* "cuda/bindings/_internal/cufile.pyx":660 + * cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileStreamDeregister + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileStreamDeregister == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 660, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":661 + * global __cuFileStreamDeregister + * _check_or_init_cufile() + * if __cuFileStreamDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":662 + * _check_or_init_cufile() + * if __cuFileStreamDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") + * return (__cuFileStreamDeregister)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":663 + * if __cuFileStreamDeregister == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") # <<<<<<<<<<<<<< + * return (__cuFileStreamDeregister)( + * stream) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileStreamDeregister}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 663, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":662 + * _check_or_init_cufile() + * if __cuFileStreamDeregister == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") + * return (__cuFileStreamDeregister)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":661 + * global __cuFileStreamDeregister + * _check_or_init_cufile() + * if __cuFileStreamDeregister == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":664 + * with gil: + * raise FunctionNotFoundError("function cuFileStreamDeregister is not found") + * return (__cuFileStreamDeregister)( # <<<<<<<<<<<<<< + * stream) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUstream))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister)(__pyx_v_stream); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":658 + * + * + * cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileStreamDeregister + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileStreamDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":668 + * + * + * cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetVersion + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetVersion(int *__pyx_v_version) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileGetVersion", 1); + + /* "cuda/bindings/_internal/cufile.pyx":670 + * cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileGetVersion + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileGetVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 670, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":671 + * global __cuFileGetVersion + * _check_or_init_cufile() + * if __cuFileGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetVersion is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":672 + * _check_or_init_cufile() + * if __cuFileGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetVersion is not found") + * return (__cuFileGetVersion)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":673 + * if __cuFileGetVersion == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileGetVersion is not found") # <<<<<<<<<<<<<< + * return (__cuFileGetVersion)( + * version) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileGetVersion_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 673, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":672 + * _check_or_init_cufile() + * if __cuFileGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetVersion is not found") + * return (__cuFileGetVersion)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":671 + * global __cuFileGetVersion + * _check_or_init_cufile() + * if __cuFileGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetVersion is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":674 + * with gil: + * raise FunctionNotFoundError("function cuFileGetVersion is not found") + * return (__cuFileGetVersion)( # <<<<<<<<<<<<<< + * version) + * +*/ + __pyx_r = ((CUfileError_t (*)(int *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion)(__pyx_v_version); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":668 + * + * + * cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetVersion + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":678 + * + * + * cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterSizeT + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t __pyx_v_param, size_t *__pyx_v_value) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileGetParameterSizeT", 1); + + /* "cuda/bindings/_internal/cufile.pyx":680 + * cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileGetParameterSizeT + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileGetParameterSizeT == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 680, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":681 + * global __cuFileGetParameterSizeT + * _check_or_init_cufile() + * if __cuFileGetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":682 + * _check_or_init_cufile() + * if __cuFileGetParameterSizeT == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") + * return (__cuFileGetParameterSizeT)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":683 + * if __cuFileGetParameterSizeT == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") # <<<<<<<<<<<<<< + * return (__cuFileGetParameterSizeT)( + * param, value) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 683, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileGetParameterSizeT}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 683, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":682 + * _check_or_init_cufile() + * if __cuFileGetParameterSizeT == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") + * return (__cuFileGetParameterSizeT)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":681 + * global __cuFileGetParameterSizeT + * _check_or_init_cufile() + * if __cuFileGetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":684 + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") + * return (__cuFileGetParameterSizeT)( # <<<<<<<<<<<<<< + * param, value) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileSizeTConfigParameter_t, size_t *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT)(__pyx_v_param, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":678 + * + * + * cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterSizeT + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileGetParameterSizeT", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":688 + * + * + * cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterBool + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterBool(CUFileBoolConfigParameter_t __pyx_v_param, bool *__pyx_v_value) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileGetParameterBool", 1); + + /* "cuda/bindings/_internal/cufile.pyx":690 + * cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileGetParameterBool + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileGetParameterBool == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 690, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":691 + * global __cuFileGetParameterBool + * _check_or_init_cufile() + * if __cuFileGetParameterBool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":692 + * _check_or_init_cufile() + * if __cuFileGetParameterBool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") + * return (__cuFileGetParameterBool)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":693 + * if __cuFileGetParameterBool == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") # <<<<<<<<<<<<<< + * return (__cuFileGetParameterBool)( + * param, value) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileGetParameterBool}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 693, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":692 + * _check_or_init_cufile() + * if __cuFileGetParameterBool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") + * return (__cuFileGetParameterBool)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":691 + * global __cuFileGetParameterBool + * _check_or_init_cufile() + * if __cuFileGetParameterBool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":694 + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterBool is not found") + * return (__cuFileGetParameterBool)( # <<<<<<<<<<<<<< + * param, value) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileBoolConfigParameter_t, bool *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool)(__pyx_v_param, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":688 + * + * + * cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterBool + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileGetParameterBool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":698 + * + * + * cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterString + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterString(CUFileStringConfigParameter_t __pyx_v_param, char *__pyx_v_desc_str, int __pyx_v_len) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileGetParameterString", 1); + + /* "cuda/bindings/_internal/cufile.pyx":700 + * cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileGetParameterString + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileGetParameterString == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 700, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":701 + * global __cuFileGetParameterString + * _check_or_init_cufile() + * if __cuFileGetParameterString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":702 + * _check_or_init_cufile() + * if __cuFileGetParameterString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") + * return (__cuFileGetParameterString)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":703 + * if __cuFileGetParameterString == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") # <<<<<<<<<<<<<< + * return (__cuFileGetParameterString)( + * param, desc_str, len) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileGetParameterStrin}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 703, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":702 + * _check_or_init_cufile() + * if __cuFileGetParameterString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") + * return (__cuFileGetParameterString)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":701 + * global __cuFileGetParameterString + * _check_or_init_cufile() + * if __cuFileGetParameterString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":704 + * with gil: + * raise FunctionNotFoundError("function cuFileGetParameterString is not found") + * return (__cuFileGetParameterString)( # <<<<<<<<<<<<<< + * param, desc_str, len) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileStringConfigParameter_t, char *, int))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString)(__pyx_v_param, __pyx_v_desc_str, __pyx_v_len); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":698 + * + * + * cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileGetParameterString + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileGetParameterString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":708 + * + * + * cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterSizeT + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t __pyx_v_param, size_t __pyx_v_value) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileSetParameterSizeT", 1); + + /* "cuda/bindings/_internal/cufile.pyx":710 + * cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileSetParameterSizeT + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileSetParameterSizeT == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 710, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":711 + * global __cuFileSetParameterSizeT + * _check_or_init_cufile() + * if __cuFileSetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":712 + * _check_or_init_cufile() + * if __cuFileSetParameterSizeT == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") + * return (__cuFileSetParameterSizeT)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":713 + * if __cuFileSetParameterSizeT == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") # <<<<<<<<<<<<<< + * return (__cuFileSetParameterSizeT)( + * param, value) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileSetParameterSizeT}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 713, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":712 + * _check_or_init_cufile() + * if __cuFileSetParameterSizeT == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") + * return (__cuFileSetParameterSizeT)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":711 + * global __cuFileSetParameterSizeT + * _check_or_init_cufile() + * if __cuFileSetParameterSizeT == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":714 + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") + * return (__cuFileSetParameterSizeT)( # <<<<<<<<<<<<<< + * param, value) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileSizeTConfigParameter_t, size_t))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT)(__pyx_v_param, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":708 + * + * + * cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterSizeT + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileSetParameterSizeT", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":718 + * + * + * cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterBool + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterBool(CUFileBoolConfigParameter_t __pyx_v_param, bool __pyx_v_value) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileSetParameterBool", 1); + + /* "cuda/bindings/_internal/cufile.pyx":720 + * cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileSetParameterBool + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileSetParameterBool == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 720, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":721 + * global __cuFileSetParameterBool + * _check_or_init_cufile() + * if __cuFileSetParameterBool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":722 + * _check_or_init_cufile() + * if __cuFileSetParameterBool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") + * return (__cuFileSetParameterBool)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":723 + * if __cuFileSetParameterBool == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") # <<<<<<<<<<<<<< + * return (__cuFileSetParameterBool)( + * param, value) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 723, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileSetParameterBool}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 723, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":722 + * _check_or_init_cufile() + * if __cuFileSetParameterBool == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") + * return (__cuFileSetParameterBool)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":721 + * global __cuFileSetParameterBool + * _check_or_init_cufile() + * if __cuFileSetParameterBool == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":724 + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterBool is not found") + * return (__cuFileSetParameterBool)( # <<<<<<<<<<<<<< + * param, value) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileBoolConfigParameter_t, bool))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool)(__pyx_v_param, __pyx_v_value); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":718 + * + * + * cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterBool + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileSetParameterBool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":728 + * + * + * cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterString + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterString(CUFileStringConfigParameter_t __pyx_v_param, char const *__pyx_v_desc_str) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileSetParameterString", 1); + + /* "cuda/bindings/_internal/cufile.pyx":730 + * cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: + * global __cuFileSetParameterString + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileSetParameterString == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 730, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":731 + * global __cuFileSetParameterString + * _check_or_init_cufile() + * if __cuFileSetParameterString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":732 + * _check_or_init_cufile() + * if __cuFileSetParameterString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") + * return (__cuFileSetParameterString)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":733 + * if __cuFileSetParameterString == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") # <<<<<<<<<<<<<< + * return (__cuFileSetParameterString)( + * param, desc_str) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileSetParameterStrin}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 733, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 733, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":732 + * _check_or_init_cufile() + * if __cuFileSetParameterString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") + * return (__cuFileSetParameterString)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":731 + * global __cuFileSetParameterString + * _check_or_init_cufile() + * if __cuFileSetParameterString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":734 + * with gil: + * raise FunctionNotFoundError("function cuFileSetParameterString is not found") + * return (__cuFileSetParameterString)( # <<<<<<<<<<<<<< + * param, desc_str) + * +*/ + __pyx_r = ((CUfileError_t (*)(CUFileStringConfigParameter_t, char const *))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString)(__pyx_v_param, __pyx_v_desc_str); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":728 + * + * + * cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileSetParameterString + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileSetParameterString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/cufile.pyx":738 + * + * + * cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverClose + * _check_or_init_cufile() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose(void) { + CUfileError_t __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_cuFileDriverClose", 1); + + /* "cuda/bindings/_internal/cufile.pyx":740 + * cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: + * global __cuFileDriverClose + * _check_or_init_cufile() # <<<<<<<<<<<<<< + * if __cuFileDriverClose == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__check_or_init_cufile(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 740, __pyx_L1_error) + + /* "cuda/bindings/_internal/cufile.pyx":741 + * global __cuFileDriverClose + * _check_or_init_cufile() + * if __cuFileDriverClose == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/cufile.pyx":742 + * _check_or_init_cufile() + * if __cuFileDriverClose == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverClose is not found") + * return (__cuFileDriverClose)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/cufile.pyx":743 + * if __cuFileDriverClose == NULL: + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose is not found") # <<<<<<<<<<<<<< + * return (__cuFileDriverClose)( + * ) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_cuFileDriverClose_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 743, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/cufile.pyx":742 + * _check_or_init_cufile() + * if __cuFileDriverClose == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function cuFileDriverClose is not found") + * return (__cuFileDriverClose)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/cufile.pyx":741 + * global __cuFileDriverClose + * _check_or_init_cufile() + * if __cuFileDriverClose == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose is not found") +*/ + } + + /* "cuda/bindings/_internal/cufile.pyx":744 + * with gil: + * raise FunctionNotFoundError("function cuFileDriverClose is not found") + * return (__cuFileDriverClose)( # <<<<<<<<<<<<<< + * ) +*/ + __pyx_r = ((CUfileError_t (*)(void))__pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose)(); + goto __pyx_L0; + + /* "cuda/bindings/_internal/cufile.pyx":738 + * + * + * cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __cuFileDriverClose + * _check_or_init_cufile() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.cufile._cuFileDriverClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_cuFileHandleRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleRegister, "CUfileError_t (CUfileHandle_t *, CUfileDescr_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileHandleDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleDeregister, "void (CUfileHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBufRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufRegister, "CUfileError_t (void const *, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBufDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufDeregister, "CUfileError_t (void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileRead", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileRead, "Py_ssize_t (CUfileHandle_t, void *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileWrite", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWrite, "Py_ssize_t (CUfileHandle_t, void const *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverOpen", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverOpen, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverClose_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose_v2, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileUseCount", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileUseCount, "long (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverGetProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverGetProperties, "CUfileError_t (CUfileDrvProps_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverSetPollMode", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetPollMode, "CUfileError_t (bool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverSetMaxDirectIOSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxDirectIOSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverSetMaxCacheSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxCacheSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverSetMaxPinnedMemSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxPinnedMemSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBatchIOSetUp", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSetUp, "CUfileError_t (CUfileBatchHandle_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBatchIOSubmit", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSubmit, "CUfileError_t (CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBatchIOGetStatus", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOGetStatus, "CUfileError_t (CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBatchIOCancel", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOCancel, "CUfileError_t (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileBatchIODestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIODestroy, "void (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileReadAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileReadAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileWriteAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWriteAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileStreamRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamRegister, "CUfileError_t (CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileStreamDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamDeregister, "CUfileError_t (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetVersion, "CUfileError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileGetParameterSizeT", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileGetParameterBool", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileGetParameterString", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileSetParameterSizeT", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileSetParameterBool", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileSetParameterString", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_cuFileDriverClose", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cufile(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cufile}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cufile", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cufile(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cufile(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cufile(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cufile' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cufile" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cufile", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___internal__cufile) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._internal.cufile")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._internal.cufile", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_internal/cufile.pyx":8 + * + * from libc.stdint cimport intptr_t, uintptr_t + * import threading # <<<<<<<<<<<<<< + * + * from .utils import FunctionNotFoundError, NotSupportedError +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_threading, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":10 + * import threading + * + * from .utils import FunctionNotFoundError, NotSupportedError # <<<<<<<<<<<<<< + * + * from cuda.pathfinder import load_nvidia_dynamic_lib +*/ + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_utils, __pyx_t_2, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":12 + * from .utils import FunctionNotFoundError, NotSupportedError + * + * from cuda.pathfinder import load_nvidia_dynamic_lib # <<<<<<<<<<<<<< + * + * import cython +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_pathfinder, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib, __pyx_t_3) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":40 + * ############################################################################### + * + * cdef object __symbol_lock = threading.Lock() # <<<<<<<<<<<<<< + * cdef bint __py_cufile_init = False + * cdef void* __cuDriverGetVersion = NULL +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_6cufile___symbol_lock, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":41 + * + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_cufile_init = False # <<<<<<<<<<<<<< + * cdef void* __cuDriverGetVersion = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___py_cufile_init = 0; + + /* "cuda/bindings/_internal/cufile.pyx":42 + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_cufile_init = False + * cdef void* __cuDriverGetVersion = NULL # <<<<<<<<<<<<<< + * + * cdef void* __cuFileHandleRegister = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuDriverGetVersion = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":44 + * cdef void* __cuDriverGetVersion = NULL + * + * cdef void* __cuFileHandleRegister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileHandleDeregister = NULL + * cdef void* __cuFileBufRegister = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleRegister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":45 + * + * cdef void* __cuFileHandleRegister = NULL + * cdef void* __cuFileHandleDeregister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBufRegister = NULL + * cdef void* __cuFileBufDeregister = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileHandleDeregister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":46 + * cdef void* __cuFileHandleRegister = NULL + * cdef void* __cuFileHandleDeregister = NULL + * cdef void* __cuFileBufRegister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBufDeregister = NULL + * cdef void* __cuFileRead = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufRegister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":47 + * cdef void* __cuFileHandleDeregister = NULL + * cdef void* __cuFileBufRegister = NULL + * cdef void* __cuFileBufDeregister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileRead = NULL + * cdef void* __cuFileWrite = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBufDeregister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":48 + * cdef void* __cuFileBufRegister = NULL + * cdef void* __cuFileBufDeregister = NULL + * cdef void* __cuFileRead = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileWrite = NULL + * cdef void* __cuFileDriverOpen = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileRead = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":49 + * cdef void* __cuFileBufDeregister = NULL + * cdef void* __cuFileRead = NULL + * cdef void* __cuFileWrite = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverOpen = NULL + * cdef void* __cuFileDriverClose_v2 = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWrite = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":50 + * cdef void* __cuFileRead = NULL + * cdef void* __cuFileWrite = NULL + * cdef void* __cuFileDriverOpen = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverClose_v2 = NULL + * cdef void* __cuFileUseCount = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverOpen = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":51 + * cdef void* __cuFileWrite = NULL + * cdef void* __cuFileDriverOpen = NULL + * cdef void* __cuFileDriverClose_v2 = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileUseCount = NULL + * cdef void* __cuFileDriverGetProperties = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose_v2 = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":52 + * cdef void* __cuFileDriverOpen = NULL + * cdef void* __cuFileDriverClose_v2 = NULL + * cdef void* __cuFileUseCount = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverGetProperties = NULL + * cdef void* __cuFileDriverSetPollMode = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileUseCount = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":53 + * cdef void* __cuFileDriverClose_v2 = NULL + * cdef void* __cuFileUseCount = NULL + * cdef void* __cuFileDriverGetProperties = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverSetPollMode = NULL + * cdef void* __cuFileDriverSetMaxDirectIOSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverGetProperties = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":54 + * cdef void* __cuFileUseCount = NULL + * cdef void* __cuFileDriverGetProperties = NULL + * cdef void* __cuFileDriverSetPollMode = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverSetMaxDirectIOSize = NULL + * cdef void* __cuFileDriverSetMaxCacheSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetPollMode = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":55 + * cdef void* __cuFileDriverGetProperties = NULL + * cdef void* __cuFileDriverSetPollMode = NULL + * cdef void* __cuFileDriverSetMaxDirectIOSize = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverSetMaxCacheSize = NULL + * cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxDirectIOSize = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":56 + * cdef void* __cuFileDriverSetPollMode = NULL + * cdef void* __cuFileDriverSetMaxDirectIOSize = NULL + * cdef void* __cuFileDriverSetMaxCacheSize = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL + * cdef void* __cuFileBatchIOSetUp = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxCacheSize = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":57 + * cdef void* __cuFileDriverSetMaxDirectIOSize = NULL + * cdef void* __cuFileDriverSetMaxCacheSize = NULL + * cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBatchIOSetUp = NULL + * cdef void* __cuFileBatchIOSubmit = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverSetMaxPinnedMemSize = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":58 + * cdef void* __cuFileDriverSetMaxCacheSize = NULL + * cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL + * cdef void* __cuFileBatchIOSetUp = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBatchIOSubmit = NULL + * cdef void* __cuFileBatchIOGetStatus = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSetUp = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":59 + * cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL + * cdef void* __cuFileBatchIOSetUp = NULL + * cdef void* __cuFileBatchIOSubmit = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBatchIOGetStatus = NULL + * cdef void* __cuFileBatchIOCancel = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOSubmit = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":60 + * cdef void* __cuFileBatchIOSetUp = NULL + * cdef void* __cuFileBatchIOSubmit = NULL + * cdef void* __cuFileBatchIOGetStatus = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBatchIOCancel = NULL + * cdef void* __cuFileBatchIODestroy = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOGetStatus = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":61 + * cdef void* __cuFileBatchIOSubmit = NULL + * cdef void* __cuFileBatchIOGetStatus = NULL + * cdef void* __cuFileBatchIOCancel = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileBatchIODestroy = NULL + * cdef void* __cuFileReadAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIOCancel = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":62 + * cdef void* __cuFileBatchIOGetStatus = NULL + * cdef void* __cuFileBatchIOCancel = NULL + * cdef void* __cuFileBatchIODestroy = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileReadAsync = NULL + * cdef void* __cuFileWriteAsync = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileBatchIODestroy = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":63 + * cdef void* __cuFileBatchIOCancel = NULL + * cdef void* __cuFileBatchIODestroy = NULL + * cdef void* __cuFileReadAsync = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileWriteAsync = NULL + * cdef void* __cuFileStreamRegister = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileReadAsync = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":64 + * cdef void* __cuFileBatchIODestroy = NULL + * cdef void* __cuFileReadAsync = NULL + * cdef void* __cuFileWriteAsync = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileStreamRegister = NULL + * cdef void* __cuFileStreamDeregister = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileWriteAsync = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":65 + * cdef void* __cuFileReadAsync = NULL + * cdef void* __cuFileWriteAsync = NULL + * cdef void* __cuFileStreamRegister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileStreamDeregister = NULL + * cdef void* __cuFileGetVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamRegister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":66 + * cdef void* __cuFileWriteAsync = NULL + * cdef void* __cuFileStreamRegister = NULL + * cdef void* __cuFileStreamDeregister = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileGetVersion = NULL + * cdef void* __cuFileGetParameterSizeT = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileStreamDeregister = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":67 + * cdef void* __cuFileStreamRegister = NULL + * cdef void* __cuFileStreamDeregister = NULL + * cdef void* __cuFileGetVersion = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileGetParameterSizeT = NULL + * cdef void* __cuFileGetParameterBool = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetVersion = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":68 + * cdef void* __cuFileStreamDeregister = NULL + * cdef void* __cuFileGetVersion = NULL + * cdef void* __cuFileGetParameterSizeT = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileGetParameterBool = NULL + * cdef void* __cuFileGetParameterString = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterSizeT = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":69 + * cdef void* __cuFileGetVersion = NULL + * cdef void* __cuFileGetParameterSizeT = NULL + * cdef void* __cuFileGetParameterBool = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileGetParameterString = NULL + * cdef void* __cuFileSetParameterSizeT = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterBool = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":70 + * cdef void* __cuFileGetParameterSizeT = NULL + * cdef void* __cuFileGetParameterBool = NULL + * cdef void* __cuFileGetParameterString = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileSetParameterSizeT = NULL + * cdef void* __cuFileSetParameterBool = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileGetParameterString = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":71 + * cdef void* __cuFileGetParameterBool = NULL + * cdef void* __cuFileGetParameterString = NULL + * cdef void* __cuFileSetParameterSizeT = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileSetParameterBool = NULL + * cdef void* __cuFileSetParameterString = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterSizeT = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":72 + * cdef void* __cuFileGetParameterString = NULL + * cdef void* __cuFileSetParameterSizeT = NULL + * cdef void* __cuFileSetParameterBool = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileSetParameterString = NULL + * cdef void* __cuFileDriverClose = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterBool = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":73 + * cdef void* __cuFileSetParameterSizeT = NULL + * cdef void* __cuFileSetParameterBool = NULL + * cdef void* __cuFileSetParameterString = NULL # <<<<<<<<<<<<<< + * cdef void* __cuFileDriverClose = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileSetParameterString = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":74 + * cdef void* __cuFileSetParameterBool = NULL + * cdef void* __cuFileSetParameterString = NULL + * cdef void* __cuFileDriverClose = NULL # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_4cuda_8bindings_9_internal_6cufile___cuFileDriverClose = NULL; + + /* "cuda/bindings/_internal/cufile.pyx":317 + * + * + * cdef dict func_ptrs = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_6cufile_func_ptrs, ((PyObject*)Py_None)); + __Pyx_GIVEREF(Py_None); + + /* "cuda/bindings/_internal/cufile.pyx":320 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_6cufile_1_inspect_function_pointers, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, __pyx_t_2) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":425 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_6cufile_3_inspect_function_pointer, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, __pyx_t_2) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/cufile.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._internal.cufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._internal.cufile"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 179 <= 65535 + const unsigned short n; +#elif 179 / 2 < INT_MAX + const unsigned int n; +#elif 179 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_FunctionNotFoundError, sizeof(__pyx_k_FunctionNotFoundError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FunctionNotFoundError */ + {__pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Lock */ + {__pyx_k_NotSupportedError, sizeof(__pyx_k_NotSupportedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NotSupportedError */ + {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuFileBatchIOCancel, sizeof(__pyx_k_cuFileBatchIOCancel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBatchIOCancel */ + {__pyx_k_cuFileBatchIODestroy, sizeof(__pyx_k_cuFileBatchIODestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBatchIODestroy */ + {__pyx_k_cuFileBatchIOGetStatus, sizeof(__pyx_k_cuFileBatchIOGetStatus), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBatchIOGetStatus */ + {__pyx_k_cuFileBatchIOSetUp, sizeof(__pyx_k_cuFileBatchIOSetUp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBatchIOSetUp */ + {__pyx_k_cuFileBatchIOSubmit, sizeof(__pyx_k_cuFileBatchIOSubmit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBatchIOSubmit */ + {__pyx_k_cuFileBufDeregister, sizeof(__pyx_k_cuFileBufDeregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBufDeregister */ + {__pyx_k_cuFileBufRegister, sizeof(__pyx_k_cuFileBufRegister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileBufRegister */ + {__pyx_k_cuFileDriverClose, sizeof(__pyx_k_cuFileDriverClose), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverClose */ + {__pyx_k_cuFileDriverClose_v2, sizeof(__pyx_k_cuFileDriverClose_v2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverClose_v2 */ + {__pyx_k_cuFileDriverGetProperties, sizeof(__pyx_k_cuFileDriverGetProperties), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverGetProperties */ + {__pyx_k_cuFileDriverOpen, sizeof(__pyx_k_cuFileDriverOpen), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverOpen */ + {__pyx_k_cuFileDriverSetMaxCacheSize, sizeof(__pyx_k_cuFileDriverSetMaxCacheSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverSetMaxCacheSize */ + {__pyx_k_cuFileDriverSetMaxDirectIOSize, sizeof(__pyx_k_cuFileDriverSetMaxDirectIOSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverSetMaxDirectIOSize */ + {__pyx_k_cuFileDriverSetMaxPinnedMemSiz, sizeof(__pyx_k_cuFileDriverSetMaxPinnedMemSiz), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverSetMaxPinnedMemSiz */ + {__pyx_k_cuFileDriverSetPollMode, sizeof(__pyx_k_cuFileDriverSetPollMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileDriverSetPollMode */ + {__pyx_k_cuFileGetParameterBool, sizeof(__pyx_k_cuFileGetParameterBool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileGetParameterBool */ + {__pyx_k_cuFileGetParameterSizeT, sizeof(__pyx_k_cuFileGetParameterSizeT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileGetParameterSizeT */ + {__pyx_k_cuFileGetParameterString, sizeof(__pyx_k_cuFileGetParameterString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileGetParameterString */ + {__pyx_k_cuFileGetVersion, sizeof(__pyx_k_cuFileGetVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileGetVersion */ + {__pyx_k_cuFileHandleDeregister, sizeof(__pyx_k_cuFileHandleDeregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileHandleDeregister */ + {__pyx_k_cuFileHandleRegister, sizeof(__pyx_k_cuFileHandleRegister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileHandleRegister */ + {__pyx_k_cuFileRead, sizeof(__pyx_k_cuFileRead), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileRead */ + {__pyx_k_cuFileReadAsync, sizeof(__pyx_k_cuFileReadAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileReadAsync */ + {__pyx_k_cuFileSetParameterBool, sizeof(__pyx_k_cuFileSetParameterBool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileSetParameterBool */ + {__pyx_k_cuFileSetParameterSizeT, sizeof(__pyx_k_cuFileSetParameterSizeT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileSetParameterSizeT */ + {__pyx_k_cuFileSetParameterString, sizeof(__pyx_k_cuFileSetParameterString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileSetParameterString */ + {__pyx_k_cuFileStreamDeregister, sizeof(__pyx_k_cuFileStreamDeregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileStreamDeregister */ + {__pyx_k_cuFileStreamRegister, sizeof(__pyx_k_cuFileStreamRegister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileStreamRegister */ + {__pyx_k_cuFileUseCount, sizeof(__pyx_k_cuFileUseCount), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileUseCount */ + {__pyx_k_cuFileWrite, sizeof(__pyx_k_cuFileWrite), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileWrite */ + {__pyx_k_cuFileWriteAsync, sizeof(__pyx_k_cuFileWriteAsync), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileWriteAsync */ + {__pyx_k_cuda_bindings__internal_cufile, sizeof(__pyx_k_cuda_bindings__internal_cufile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__internal_cufile */ + {__pyx_k_cuda_bindings__internal_cufile_p, sizeof(__pyx_k_cuda_bindings__internal_cufile_p), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__internal_cufile_p */ + {__pyx_k_cuda_pathfinder, sizeof(__pyx_k_cuda_pathfinder), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_pathfinder */ + {__pyx_k_cufile, sizeof(__pyx_k_cufile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cufile */ + {__pyx_k_enter, sizeof(__pyx_k_enter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enter */ + {__pyx_k_exit, sizeof(__pyx_k_exit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_exit */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_function_cuFileBatchIOCancel_is, sizeof(__pyx_k_function_cuFileBatchIOCancel_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBatchIOCancel_is */ + {__pyx_k_function_cuFileBatchIODestroy_is, sizeof(__pyx_k_function_cuFileBatchIODestroy_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBatchIODestroy_is */ + {__pyx_k_function_cuFileBatchIOGetStatus, sizeof(__pyx_k_function_cuFileBatchIOGetStatus), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBatchIOGetStatus */ + {__pyx_k_function_cuFileBatchIOSetUp_is_n, sizeof(__pyx_k_function_cuFileBatchIOSetUp_is_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBatchIOSetUp_is_n */ + {__pyx_k_function_cuFileBatchIOSubmit_is, sizeof(__pyx_k_function_cuFileBatchIOSubmit_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBatchIOSubmit_is */ + {__pyx_k_function_cuFileBufDeregister_is, sizeof(__pyx_k_function_cuFileBufDeregister_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBufDeregister_is */ + {__pyx_k_function_cuFileBufRegister_is_no, sizeof(__pyx_k_function_cuFileBufRegister_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileBufRegister_is_no */ + {__pyx_k_function_cuFileDriverClose_is_no, sizeof(__pyx_k_function_cuFileDriverClose_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverClose_is_no */ + {__pyx_k_function_cuFileDriverClose_v2_is, sizeof(__pyx_k_function_cuFileDriverClose_v2_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverClose_v2_is */ + {__pyx_k_function_cuFileDriverGetProperti, sizeof(__pyx_k_function_cuFileDriverGetProperti), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverGetProperti */ + {__pyx_k_function_cuFileDriverOpen_is_not, sizeof(__pyx_k_function_cuFileDriverOpen_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverOpen_is_not */ + {__pyx_k_function_cuFileDriverSetMaxCache, sizeof(__pyx_k_function_cuFileDriverSetMaxCache), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverSetMaxCache */ + {__pyx_k_function_cuFileDriverSetMaxDirec, sizeof(__pyx_k_function_cuFileDriverSetMaxDirec), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverSetMaxDirec */ + {__pyx_k_function_cuFileDriverSetMaxPinne, sizeof(__pyx_k_function_cuFileDriverSetMaxPinne), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverSetMaxPinne */ + {__pyx_k_function_cuFileDriverSetPollMode, sizeof(__pyx_k_function_cuFileDriverSetPollMode), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileDriverSetPollMode */ + {__pyx_k_function_cuFileGetParameterBool, sizeof(__pyx_k_function_cuFileGetParameterBool), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileGetParameterBool */ + {__pyx_k_function_cuFileGetParameterSizeT, sizeof(__pyx_k_function_cuFileGetParameterSizeT), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileGetParameterSizeT */ + {__pyx_k_function_cuFileGetParameterStrin, sizeof(__pyx_k_function_cuFileGetParameterStrin), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileGetParameterStrin */ + {__pyx_k_function_cuFileGetVersion_is_not, sizeof(__pyx_k_function_cuFileGetVersion_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileGetVersion_is_not */ + {__pyx_k_function_cuFileHandleDeregister, sizeof(__pyx_k_function_cuFileHandleDeregister), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileHandleDeregister */ + {__pyx_k_function_cuFileHandleRegister_is, sizeof(__pyx_k_function_cuFileHandleRegister_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileHandleRegister_is */ + {__pyx_k_function_cuFileReadAsync_is_not, sizeof(__pyx_k_function_cuFileReadAsync_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileReadAsync_is_not */ + {__pyx_k_function_cuFileRead_is_not_found, sizeof(__pyx_k_function_cuFileRead_is_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileRead_is_not_found */ + {__pyx_k_function_cuFileSetParameterBool, sizeof(__pyx_k_function_cuFileSetParameterBool), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileSetParameterBool */ + {__pyx_k_function_cuFileSetParameterSizeT, sizeof(__pyx_k_function_cuFileSetParameterSizeT), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileSetParameterSizeT */ + {__pyx_k_function_cuFileSetParameterStrin, sizeof(__pyx_k_function_cuFileSetParameterStrin), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileSetParameterStrin */ + {__pyx_k_function_cuFileStreamDeregister, sizeof(__pyx_k_function_cuFileStreamDeregister), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileStreamDeregister */ + {__pyx_k_function_cuFileStreamRegister_is, sizeof(__pyx_k_function_cuFileStreamRegister_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileStreamRegister_is */ + {__pyx_k_function_cuFileUseCount_is_not_f, sizeof(__pyx_k_function_cuFileUseCount_is_not_f), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileUseCount_is_not_f */ + {__pyx_k_function_cuFileWriteAsync_is_not, sizeof(__pyx_k_function_cuFileWriteAsync_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileWriteAsync_is_not */ + {__pyx_k_function_cuFileWrite_is_not_foun, sizeof(__pyx_k_function_cuFileWrite_is_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_cuFileWrite_is_not_foun */ + {__pyx_k_handle_uint, sizeof(__pyx_k_handle_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_uint */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_inspect_function_pointer, sizeof(__pyx_k_inspect_function_pointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointer */ + {__pyx_k_inspect_function_pointers, sizeof(__pyx_k_inspect_function_pointers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointers */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_load_nvidia_dynamic_lib, sizeof(__pyx_k_load_nvidia_dynamic_lib), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_nvidia_dynamic_lib */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_threading, sizeof(__pyx_k_threading), 0, 1, 1}, /* PyObject cname: __pyx_n_u_threading */ + {__pyx_k_utils, sizeof(__pyx_k_utils), 0, 1, 1}, /* PyObject cname: __pyx_n_u_utils */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_internal/cufile.pyx":87 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __cuFileHandleRegister +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 1; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 1; + unsigned int flags : 10; + unsigned int first_line : 9; + unsigned int line_table_length : 14; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 320, 504}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_cufile_p, __pyx_mstate->__pyx_n_u_inspect_function_pointers, __pyx_k_z_q_Q_Zq_z_A_Ja_Q_Ja_1_Zq_z_A_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 425, 31}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_cufile_p, __pyx_mstate->__pyx_n_u_inspect_function_pointer, __pyx_k_z_A_a_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..880343da3f933b0dd8e4b4cb14ab40f5d79d2cc0 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pxd @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from ..cycufile cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil +cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil +cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil +cdef long _cuFileUseCount() except* nogil +cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil +cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil +cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pyx new file mode 100644 index 0000000000000000000000000000000000000000..dafeec2816a941bafd86f8f1a135b7e4f06117d1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile.pyx @@ -0,0 +1,745 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t +import threading + +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + +import cython + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_cufile_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __cuFileHandleRegister = NULL +cdef void* __cuFileHandleDeregister = NULL +cdef void* __cuFileBufRegister = NULL +cdef void* __cuFileBufDeregister = NULL +cdef void* __cuFileRead = NULL +cdef void* __cuFileWrite = NULL +cdef void* __cuFileDriverOpen = NULL +cdef void* __cuFileDriverClose_v2 = NULL +cdef void* __cuFileUseCount = NULL +cdef void* __cuFileDriverGetProperties = NULL +cdef void* __cuFileDriverSetPollMode = NULL +cdef void* __cuFileDriverSetMaxDirectIOSize = NULL +cdef void* __cuFileDriverSetMaxCacheSize = NULL +cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL +cdef void* __cuFileBatchIOSetUp = NULL +cdef void* __cuFileBatchIOSubmit = NULL +cdef void* __cuFileBatchIOGetStatus = NULL +cdef void* __cuFileBatchIOCancel = NULL +cdef void* __cuFileBatchIODestroy = NULL +cdef void* __cuFileReadAsync = NULL +cdef void* __cuFileWriteAsync = NULL +cdef void* __cuFileStreamRegister = NULL +cdef void* __cuFileStreamDeregister = NULL +cdef void* __cuFileGetVersion = NULL +cdef void* __cuFileGetParameterSizeT = NULL +cdef void* __cuFileGetParameterBool = NULL +cdef void* __cuFileGetParameterString = NULL +cdef void* __cuFileSetParameterSizeT = NULL +cdef void* __cuFileSetParameterBool = NULL +cdef void* __cuFileSetParameterString = NULL +cdef void* __cuFileDriverClose = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint + return handle + + +cdef int __check_or_init_cufile() except -1 nogil: + global __py_cufile_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __cuFileHandleRegister + __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + if __cuFileHandleRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') + + global __cuFileHandleDeregister + __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + if __cuFileHandleDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') + + global __cuFileBufRegister + __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + if __cuFileBufRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') + + global __cuFileBufDeregister + __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + if __cuFileBufDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') + + global __cuFileRead + __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + if __cuFileRead == NULL: + if handle == NULL: + handle = load_library() + __cuFileRead = dlsym(handle, 'cuFileRead') + + global __cuFileWrite + __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + if __cuFileWrite == NULL: + if handle == NULL: + handle = load_library() + __cuFileWrite = dlsym(handle, 'cuFileWrite') + + global __cuFileDriverOpen + __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + if __cuFileDriverOpen == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') + + global __cuFileDriverClose_v2 + __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + if __cuFileDriverClose_v2 == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') + + global __cuFileUseCount + __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + if __cuFileUseCount == NULL: + if handle == NULL: + handle = load_library() + __cuFileUseCount = dlsym(handle, 'cuFileUseCount') + + global __cuFileDriverGetProperties + __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + if __cuFileDriverGetProperties == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') + + global __cuFileDriverSetPollMode + __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + if __cuFileDriverSetPollMode == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') + + global __cuFileDriverSetMaxDirectIOSize + __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + if __cuFileDriverSetMaxDirectIOSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') + + global __cuFileDriverSetMaxCacheSize + __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + if __cuFileDriverSetMaxCacheSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') + + global __cuFileDriverSetMaxPinnedMemSize + __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + if __cuFileDriverSetMaxPinnedMemSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') + + global __cuFileBatchIOSetUp + __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + if __cuFileBatchIOSetUp == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') + + global __cuFileBatchIOSubmit + __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + if __cuFileBatchIOSubmit == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') + + global __cuFileBatchIOGetStatus + __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + if __cuFileBatchIOGetStatus == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') + + global __cuFileBatchIOCancel + __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + if __cuFileBatchIOCancel == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') + + global __cuFileBatchIODestroy + __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + if __cuFileBatchIODestroy == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') + + global __cuFileReadAsync + __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + if __cuFileReadAsync == NULL: + if handle == NULL: + handle = load_library() + __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') + + global __cuFileWriteAsync + __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + if __cuFileWriteAsync == NULL: + if handle == NULL: + handle = load_library() + __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') + + global __cuFileStreamRegister + __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + if __cuFileStreamRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') + + global __cuFileStreamDeregister + __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + if __cuFileStreamDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') + + global __cuFileGetVersion + __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + if __cuFileGetVersion == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') + + global __cuFileGetParameterSizeT + __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + if __cuFileGetParameterSizeT == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') + + global __cuFileGetParameterBool + __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + if __cuFileGetParameterBool == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') + + global __cuFileGetParameterString + __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + if __cuFileGetParameterString == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') + + global __cuFileSetParameterSizeT + __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + if __cuFileSetParameterSizeT == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') + + global __cuFileSetParameterBool + __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + if __cuFileSetParameterBool == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') + + global __cuFileSetParameterString + __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + if __cuFileSetParameterString == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') + + global __cuFileDriverClose + __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + if __cuFileDriverClose == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') + + __py_cufile_init = True + return 0 + + +cdef inline int _check_or_init_cufile() except -1 nogil: + if __py_cufile_init: + return 0 + + return __check_or_init_cufile() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_cufile() + cdef dict data = {} + + global __cuFileHandleRegister + data["__cuFileHandleRegister"] = __cuFileHandleRegister + + global __cuFileHandleDeregister + data["__cuFileHandleDeregister"] = __cuFileHandleDeregister + + global __cuFileBufRegister + data["__cuFileBufRegister"] = __cuFileBufRegister + + global __cuFileBufDeregister + data["__cuFileBufDeregister"] = __cuFileBufDeregister + + global __cuFileRead + data["__cuFileRead"] = __cuFileRead + + global __cuFileWrite + data["__cuFileWrite"] = __cuFileWrite + + global __cuFileDriverOpen + data["__cuFileDriverOpen"] = __cuFileDriverOpen + + global __cuFileDriverClose_v2 + data["__cuFileDriverClose_v2"] = __cuFileDriverClose_v2 + + global __cuFileUseCount + data["__cuFileUseCount"] = __cuFileUseCount + + global __cuFileDriverGetProperties + data["__cuFileDriverGetProperties"] = __cuFileDriverGetProperties + + global __cuFileDriverSetPollMode + data["__cuFileDriverSetPollMode"] = __cuFileDriverSetPollMode + + global __cuFileDriverSetMaxDirectIOSize + data["__cuFileDriverSetMaxDirectIOSize"] = __cuFileDriverSetMaxDirectIOSize + + global __cuFileDriverSetMaxCacheSize + data["__cuFileDriverSetMaxCacheSize"] = __cuFileDriverSetMaxCacheSize + + global __cuFileDriverSetMaxPinnedMemSize + data["__cuFileDriverSetMaxPinnedMemSize"] = __cuFileDriverSetMaxPinnedMemSize + + global __cuFileBatchIOSetUp + data["__cuFileBatchIOSetUp"] = __cuFileBatchIOSetUp + + global __cuFileBatchIOSubmit + data["__cuFileBatchIOSubmit"] = __cuFileBatchIOSubmit + + global __cuFileBatchIOGetStatus + data["__cuFileBatchIOGetStatus"] = __cuFileBatchIOGetStatus + + global __cuFileBatchIOCancel + data["__cuFileBatchIOCancel"] = __cuFileBatchIOCancel + + global __cuFileBatchIODestroy + data["__cuFileBatchIODestroy"] = __cuFileBatchIODestroy + + global __cuFileReadAsync + data["__cuFileReadAsync"] = __cuFileReadAsync + + global __cuFileWriteAsync + data["__cuFileWriteAsync"] = __cuFileWriteAsync + + global __cuFileStreamRegister + data["__cuFileStreamRegister"] = __cuFileStreamRegister + + global __cuFileStreamDeregister + data["__cuFileStreamDeregister"] = __cuFileStreamDeregister + + global __cuFileGetVersion + data["__cuFileGetVersion"] = __cuFileGetVersion + + global __cuFileGetParameterSizeT + data["__cuFileGetParameterSizeT"] = __cuFileGetParameterSizeT + + global __cuFileGetParameterBool + data["__cuFileGetParameterBool"] = __cuFileGetParameterBool + + global __cuFileGetParameterString + data["__cuFileGetParameterString"] = __cuFileGetParameterString + + global __cuFileSetParameterSizeT + data["__cuFileSetParameterSizeT"] = __cuFileSetParameterSizeT + + global __cuFileSetParameterBool + data["__cuFileSetParameterBool"] = __cuFileSetParameterBool + + global __cuFileSetParameterString + data["__cuFileSetParameterString"] = __cuFileSetParameterString + + global __cuFileDriverClose + data["__cuFileDriverClose"] = __cuFileDriverClose + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: + global __cuFileHandleRegister + _check_or_init_cufile() + if __cuFileHandleRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileHandleRegister is not found") + return (__cuFileHandleRegister)( + fh, descr) + + +@cython.show_performance_hints(False) +cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + global __cuFileHandleDeregister + _check_or_init_cufile() + if __cuFileHandleDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileHandleDeregister is not found") + (__cuFileHandleDeregister)( + fh) + + +cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBufRegister + _check_or_init_cufile() + if __cuFileBufRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBufRegister is not found") + return (__cuFileBufRegister)( + bufPtr_base, length, flags) + + +cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBufDeregister + _check_or_init_cufile() + if __cuFileBufDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBufDeregister is not found") + return (__cuFileBufDeregister)( + bufPtr_base) + + +cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + global __cuFileRead + _check_or_init_cufile() + if __cuFileRead == NULL: + with gil: + raise FunctionNotFoundError("function cuFileRead is not found") + return (__cuFileRead)( + fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + global __cuFileWrite + _check_or_init_cufile() + if __cuFileWrite == NULL: + with gil: + raise FunctionNotFoundError("function cuFileWrite is not found") + return (__cuFileWrite)( + fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverOpen + _check_or_init_cufile() + if __cuFileDriverOpen == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverOpen is not found") + return (__cuFileDriverOpen)( + ) + + +cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverClose_v2 + _check_or_init_cufile() + if __cuFileDriverClose_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") + return (__cuFileDriverClose_v2)( + ) + + +cdef long _cuFileUseCount() except* nogil: + global __cuFileUseCount + _check_or_init_cufile() + if __cuFileUseCount == NULL: + with gil: + raise FunctionNotFoundError("function cuFileUseCount is not found") + return (__cuFileUseCount)( + ) + + +cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverGetProperties + _check_or_init_cufile() + if __cuFileDriverGetProperties == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") + return (__cuFileDriverGetProperties)( + props) + + +cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetPollMode + _check_or_init_cufile() + if __cuFileDriverSetPollMode == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") + return (__cuFileDriverSetPollMode)( + poll, poll_threshold_size) + + +cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxDirectIOSize + _check_or_init_cufile() + if __cuFileDriverSetMaxDirectIOSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") + return (__cuFileDriverSetMaxDirectIOSize)( + max_direct_io_size) + + +cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxCacheSize + _check_or_init_cufile() + if __cuFileDriverSetMaxCacheSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") + return (__cuFileDriverSetMaxCacheSize)( + max_cache_size) + + +cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxPinnedMemSize + _check_or_init_cufile() + if __cuFileDriverSetMaxPinnedMemSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") + return (__cuFileDriverSetMaxPinnedMemSize)( + max_pinned_size) + + +cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOSetUp + _check_or_init_cufile() + if __cuFileBatchIOSetUp == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") + return (__cuFileBatchIOSetUp)( + batch_idp, nr) + + +cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOSubmit + _check_or_init_cufile() + if __cuFileBatchIOSubmit == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") + return (__cuFileBatchIOSubmit)( + batch_idp, nr, iocbp, flags) + + +cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOGetStatus + _check_or_init_cufile() + if __cuFileBatchIOGetStatus == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") + return (__cuFileBatchIOGetStatus)( + batch_idp, min_nr, nr, iocbp, timeout) + + +cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOCancel + _check_or_init_cufile() + if __cuFileBatchIOCancel == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") + return (__cuFileBatchIOCancel)( + batch_idp) + + +@cython.show_performance_hints(False) +cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + global __cuFileBatchIODestroy + _check_or_init_cufile() + if __cuFileBatchIODestroy == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") + (__cuFileBatchIODestroy)( + batch_idp) + + +cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileReadAsync + _check_or_init_cufile() + if __cuFileReadAsync == NULL: + with gil: + raise FunctionNotFoundError("function cuFileReadAsync is not found") + return (__cuFileReadAsync)( + fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + + +cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileWriteAsync + _check_or_init_cufile() + if __cuFileWriteAsync == NULL: + with gil: + raise FunctionNotFoundError("function cuFileWriteAsync is not found") + return (__cuFileWriteAsync)( + fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + + +cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileStreamRegister + _check_or_init_cufile() + if __cuFileStreamRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileStreamRegister is not found") + return (__cuFileStreamRegister)( + stream, flags) + + +cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileStreamDeregister + _check_or_init_cufile() + if __cuFileStreamDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileStreamDeregister is not found") + return (__cuFileStreamDeregister)( + stream) + + +cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetVersion + _check_or_init_cufile() + if __cuFileGetVersion == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetVersion is not found") + return (__cuFileGetVersion)( + version) + + +cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterSizeT + _check_or_init_cufile() + if __cuFileGetParameterSizeT == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") + return (__cuFileGetParameterSizeT)( + param, value) + + +cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterBool + _check_or_init_cufile() + if __cuFileGetParameterBool == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterBool is not found") + return (__cuFileGetParameterBool)( + param, value) + + +cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterString + _check_or_init_cufile() + if __cuFileGetParameterString == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterString is not found") + return (__cuFileGetParameterString)( + param, desc_str, len) + + +cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterSizeT + _check_or_init_cufile() + if __cuFileSetParameterSizeT == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") + return (__cuFileSetParameterSizeT)( + param, value) + + +cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterBool + _check_or_init_cufile() + if __cuFileSetParameterBool == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterBool is not found") + return (__cuFileSetParameterBool)( + param, value) + + +cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterString + _check_or_init_cufile() + if __cuFileSetParameterString == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterString is not found") + return (__cuFileSetParameterString)( + param, desc_str) + + +cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverClose + _check_or_init_cufile() + if __cuFileDriverClose == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverClose is not found") + return (__cuFileDriverClose)( + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile_linux.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile_linux.pyx new file mode 100644 index 0000000000000000000000000000000000000000..dafeec2816a941bafd86f8f1a135b7e4f06117d1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/cufile_linux.pyx @@ -0,0 +1,745 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t +import threading + +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + +import cython + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_cufile_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __cuFileHandleRegister = NULL +cdef void* __cuFileHandleDeregister = NULL +cdef void* __cuFileBufRegister = NULL +cdef void* __cuFileBufDeregister = NULL +cdef void* __cuFileRead = NULL +cdef void* __cuFileWrite = NULL +cdef void* __cuFileDriverOpen = NULL +cdef void* __cuFileDriverClose_v2 = NULL +cdef void* __cuFileUseCount = NULL +cdef void* __cuFileDriverGetProperties = NULL +cdef void* __cuFileDriverSetPollMode = NULL +cdef void* __cuFileDriverSetMaxDirectIOSize = NULL +cdef void* __cuFileDriverSetMaxCacheSize = NULL +cdef void* __cuFileDriverSetMaxPinnedMemSize = NULL +cdef void* __cuFileBatchIOSetUp = NULL +cdef void* __cuFileBatchIOSubmit = NULL +cdef void* __cuFileBatchIOGetStatus = NULL +cdef void* __cuFileBatchIOCancel = NULL +cdef void* __cuFileBatchIODestroy = NULL +cdef void* __cuFileReadAsync = NULL +cdef void* __cuFileWriteAsync = NULL +cdef void* __cuFileStreamRegister = NULL +cdef void* __cuFileStreamDeregister = NULL +cdef void* __cuFileGetVersion = NULL +cdef void* __cuFileGetParameterSizeT = NULL +cdef void* __cuFileGetParameterBool = NULL +cdef void* __cuFileGetParameterString = NULL +cdef void* __cuFileSetParameterSizeT = NULL +cdef void* __cuFileSetParameterBool = NULL +cdef void* __cuFileSetParameterString = NULL +cdef void* __cuFileDriverClose = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("cufile")._handle_uint + return handle + + +cdef int __check_or_init_cufile() except -1 nogil: + global __py_cufile_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __cuFileHandleRegister + __cuFileHandleRegister = dlsym(RTLD_DEFAULT, 'cuFileHandleRegister') + if __cuFileHandleRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileHandleRegister = dlsym(handle, 'cuFileHandleRegister') + + global __cuFileHandleDeregister + __cuFileHandleDeregister = dlsym(RTLD_DEFAULT, 'cuFileHandleDeregister') + if __cuFileHandleDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileHandleDeregister = dlsym(handle, 'cuFileHandleDeregister') + + global __cuFileBufRegister + __cuFileBufRegister = dlsym(RTLD_DEFAULT, 'cuFileBufRegister') + if __cuFileBufRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileBufRegister = dlsym(handle, 'cuFileBufRegister') + + global __cuFileBufDeregister + __cuFileBufDeregister = dlsym(RTLD_DEFAULT, 'cuFileBufDeregister') + if __cuFileBufDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileBufDeregister = dlsym(handle, 'cuFileBufDeregister') + + global __cuFileRead + __cuFileRead = dlsym(RTLD_DEFAULT, 'cuFileRead') + if __cuFileRead == NULL: + if handle == NULL: + handle = load_library() + __cuFileRead = dlsym(handle, 'cuFileRead') + + global __cuFileWrite + __cuFileWrite = dlsym(RTLD_DEFAULT, 'cuFileWrite') + if __cuFileWrite == NULL: + if handle == NULL: + handle = load_library() + __cuFileWrite = dlsym(handle, 'cuFileWrite') + + global __cuFileDriverOpen + __cuFileDriverOpen = dlsym(RTLD_DEFAULT, 'cuFileDriverOpen') + if __cuFileDriverOpen == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverOpen = dlsym(handle, 'cuFileDriverOpen') + + global __cuFileDriverClose_v2 + __cuFileDriverClose_v2 = dlsym(RTLD_DEFAULT, 'cuFileDriverClose_v2') + if __cuFileDriverClose_v2 == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverClose_v2 = dlsym(handle, 'cuFileDriverClose_v2') + + global __cuFileUseCount + __cuFileUseCount = dlsym(RTLD_DEFAULT, 'cuFileUseCount') + if __cuFileUseCount == NULL: + if handle == NULL: + handle = load_library() + __cuFileUseCount = dlsym(handle, 'cuFileUseCount') + + global __cuFileDriverGetProperties + __cuFileDriverGetProperties = dlsym(RTLD_DEFAULT, 'cuFileDriverGetProperties') + if __cuFileDriverGetProperties == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverGetProperties = dlsym(handle, 'cuFileDriverGetProperties') + + global __cuFileDriverSetPollMode + __cuFileDriverSetPollMode = dlsym(RTLD_DEFAULT, 'cuFileDriverSetPollMode') + if __cuFileDriverSetPollMode == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetPollMode = dlsym(handle, 'cuFileDriverSetPollMode') + + global __cuFileDriverSetMaxDirectIOSize + __cuFileDriverSetMaxDirectIOSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxDirectIOSize') + if __cuFileDriverSetMaxDirectIOSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxDirectIOSize = dlsym(handle, 'cuFileDriverSetMaxDirectIOSize') + + global __cuFileDriverSetMaxCacheSize + __cuFileDriverSetMaxCacheSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxCacheSize') + if __cuFileDriverSetMaxCacheSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxCacheSize = dlsym(handle, 'cuFileDriverSetMaxCacheSize') + + global __cuFileDriverSetMaxPinnedMemSize + __cuFileDriverSetMaxPinnedMemSize = dlsym(RTLD_DEFAULT, 'cuFileDriverSetMaxPinnedMemSize') + if __cuFileDriverSetMaxPinnedMemSize == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverSetMaxPinnedMemSize = dlsym(handle, 'cuFileDriverSetMaxPinnedMemSize') + + global __cuFileBatchIOSetUp + __cuFileBatchIOSetUp = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSetUp') + if __cuFileBatchIOSetUp == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOSetUp = dlsym(handle, 'cuFileBatchIOSetUp') + + global __cuFileBatchIOSubmit + __cuFileBatchIOSubmit = dlsym(RTLD_DEFAULT, 'cuFileBatchIOSubmit') + if __cuFileBatchIOSubmit == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOSubmit = dlsym(handle, 'cuFileBatchIOSubmit') + + global __cuFileBatchIOGetStatus + __cuFileBatchIOGetStatus = dlsym(RTLD_DEFAULT, 'cuFileBatchIOGetStatus') + if __cuFileBatchIOGetStatus == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOGetStatus = dlsym(handle, 'cuFileBatchIOGetStatus') + + global __cuFileBatchIOCancel + __cuFileBatchIOCancel = dlsym(RTLD_DEFAULT, 'cuFileBatchIOCancel') + if __cuFileBatchIOCancel == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIOCancel = dlsym(handle, 'cuFileBatchIOCancel') + + global __cuFileBatchIODestroy + __cuFileBatchIODestroy = dlsym(RTLD_DEFAULT, 'cuFileBatchIODestroy') + if __cuFileBatchIODestroy == NULL: + if handle == NULL: + handle = load_library() + __cuFileBatchIODestroy = dlsym(handle, 'cuFileBatchIODestroy') + + global __cuFileReadAsync + __cuFileReadAsync = dlsym(RTLD_DEFAULT, 'cuFileReadAsync') + if __cuFileReadAsync == NULL: + if handle == NULL: + handle = load_library() + __cuFileReadAsync = dlsym(handle, 'cuFileReadAsync') + + global __cuFileWriteAsync + __cuFileWriteAsync = dlsym(RTLD_DEFAULT, 'cuFileWriteAsync') + if __cuFileWriteAsync == NULL: + if handle == NULL: + handle = load_library() + __cuFileWriteAsync = dlsym(handle, 'cuFileWriteAsync') + + global __cuFileStreamRegister + __cuFileStreamRegister = dlsym(RTLD_DEFAULT, 'cuFileStreamRegister') + if __cuFileStreamRegister == NULL: + if handle == NULL: + handle = load_library() + __cuFileStreamRegister = dlsym(handle, 'cuFileStreamRegister') + + global __cuFileStreamDeregister + __cuFileStreamDeregister = dlsym(RTLD_DEFAULT, 'cuFileStreamDeregister') + if __cuFileStreamDeregister == NULL: + if handle == NULL: + handle = load_library() + __cuFileStreamDeregister = dlsym(handle, 'cuFileStreamDeregister') + + global __cuFileGetVersion + __cuFileGetVersion = dlsym(RTLD_DEFAULT, 'cuFileGetVersion') + if __cuFileGetVersion == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetVersion = dlsym(handle, 'cuFileGetVersion') + + global __cuFileGetParameterSizeT + __cuFileGetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileGetParameterSizeT') + if __cuFileGetParameterSizeT == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterSizeT = dlsym(handle, 'cuFileGetParameterSizeT') + + global __cuFileGetParameterBool + __cuFileGetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileGetParameterBool') + if __cuFileGetParameterBool == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterBool = dlsym(handle, 'cuFileGetParameterBool') + + global __cuFileGetParameterString + __cuFileGetParameterString = dlsym(RTLD_DEFAULT, 'cuFileGetParameterString') + if __cuFileGetParameterString == NULL: + if handle == NULL: + handle = load_library() + __cuFileGetParameterString = dlsym(handle, 'cuFileGetParameterString') + + global __cuFileSetParameterSizeT + __cuFileSetParameterSizeT = dlsym(RTLD_DEFAULT, 'cuFileSetParameterSizeT') + if __cuFileSetParameterSizeT == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterSizeT = dlsym(handle, 'cuFileSetParameterSizeT') + + global __cuFileSetParameterBool + __cuFileSetParameterBool = dlsym(RTLD_DEFAULT, 'cuFileSetParameterBool') + if __cuFileSetParameterBool == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterBool = dlsym(handle, 'cuFileSetParameterBool') + + global __cuFileSetParameterString + __cuFileSetParameterString = dlsym(RTLD_DEFAULT, 'cuFileSetParameterString') + if __cuFileSetParameterString == NULL: + if handle == NULL: + handle = load_library() + __cuFileSetParameterString = dlsym(handle, 'cuFileSetParameterString') + + global __cuFileDriverClose + __cuFileDriverClose = dlsym(RTLD_DEFAULT, 'cuFileDriverClose') + if __cuFileDriverClose == NULL: + if handle == NULL: + handle = load_library() + __cuFileDriverClose = dlsym(handle, 'cuFileDriverClose') + + __py_cufile_init = True + return 0 + + +cdef inline int _check_or_init_cufile() except -1 nogil: + if __py_cufile_init: + return 0 + + return __check_or_init_cufile() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_cufile() + cdef dict data = {} + + global __cuFileHandleRegister + data["__cuFileHandleRegister"] = __cuFileHandleRegister + + global __cuFileHandleDeregister + data["__cuFileHandleDeregister"] = __cuFileHandleDeregister + + global __cuFileBufRegister + data["__cuFileBufRegister"] = __cuFileBufRegister + + global __cuFileBufDeregister + data["__cuFileBufDeregister"] = __cuFileBufDeregister + + global __cuFileRead + data["__cuFileRead"] = __cuFileRead + + global __cuFileWrite + data["__cuFileWrite"] = __cuFileWrite + + global __cuFileDriverOpen + data["__cuFileDriverOpen"] = __cuFileDriverOpen + + global __cuFileDriverClose_v2 + data["__cuFileDriverClose_v2"] = __cuFileDriverClose_v2 + + global __cuFileUseCount + data["__cuFileUseCount"] = __cuFileUseCount + + global __cuFileDriverGetProperties + data["__cuFileDriverGetProperties"] = __cuFileDriverGetProperties + + global __cuFileDriverSetPollMode + data["__cuFileDriverSetPollMode"] = __cuFileDriverSetPollMode + + global __cuFileDriverSetMaxDirectIOSize + data["__cuFileDriverSetMaxDirectIOSize"] = __cuFileDriverSetMaxDirectIOSize + + global __cuFileDriverSetMaxCacheSize + data["__cuFileDriverSetMaxCacheSize"] = __cuFileDriverSetMaxCacheSize + + global __cuFileDriverSetMaxPinnedMemSize + data["__cuFileDriverSetMaxPinnedMemSize"] = __cuFileDriverSetMaxPinnedMemSize + + global __cuFileBatchIOSetUp + data["__cuFileBatchIOSetUp"] = __cuFileBatchIOSetUp + + global __cuFileBatchIOSubmit + data["__cuFileBatchIOSubmit"] = __cuFileBatchIOSubmit + + global __cuFileBatchIOGetStatus + data["__cuFileBatchIOGetStatus"] = __cuFileBatchIOGetStatus + + global __cuFileBatchIOCancel + data["__cuFileBatchIOCancel"] = __cuFileBatchIOCancel + + global __cuFileBatchIODestroy + data["__cuFileBatchIODestroy"] = __cuFileBatchIODestroy + + global __cuFileReadAsync + data["__cuFileReadAsync"] = __cuFileReadAsync + + global __cuFileWriteAsync + data["__cuFileWriteAsync"] = __cuFileWriteAsync + + global __cuFileStreamRegister + data["__cuFileStreamRegister"] = __cuFileStreamRegister + + global __cuFileStreamDeregister + data["__cuFileStreamDeregister"] = __cuFileStreamDeregister + + global __cuFileGetVersion + data["__cuFileGetVersion"] = __cuFileGetVersion + + global __cuFileGetParameterSizeT + data["__cuFileGetParameterSizeT"] = __cuFileGetParameterSizeT + + global __cuFileGetParameterBool + data["__cuFileGetParameterBool"] = __cuFileGetParameterBool + + global __cuFileGetParameterString + data["__cuFileGetParameterString"] = __cuFileGetParameterString + + global __cuFileSetParameterSizeT + data["__cuFileSetParameterSizeT"] = __cuFileSetParameterSizeT + + global __cuFileSetParameterBool + data["__cuFileSetParameterBool"] = __cuFileSetParameterBool + + global __cuFileSetParameterString + data["__cuFileSetParameterString"] = __cuFileSetParameterString + + global __cuFileDriverClose + data["__cuFileDriverClose"] = __cuFileDriverClose + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUfileError_t _cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: + global __cuFileHandleRegister + _check_or_init_cufile() + if __cuFileHandleRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileHandleRegister is not found") + return (__cuFileHandleRegister)( + fh, descr) + + +@cython.show_performance_hints(False) +cdef void _cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + global __cuFileHandleDeregister + _check_or_init_cufile() + if __cuFileHandleDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileHandleDeregister is not found") + (__cuFileHandleDeregister)( + fh) + + +cdef CUfileError_t _cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBufRegister + _check_or_init_cufile() + if __cuFileBufRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBufRegister is not found") + return (__cuFileBufRegister)( + bufPtr_base, length, flags) + + +cdef CUfileError_t _cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBufDeregister + _check_or_init_cufile() + if __cuFileBufDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBufDeregister is not found") + return (__cuFileBufDeregister)( + bufPtr_base) + + +cdef ssize_t _cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + global __cuFileRead + _check_or_init_cufile() + if __cuFileRead == NULL: + with gil: + raise FunctionNotFoundError("function cuFileRead is not found") + return (__cuFileRead)( + fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef ssize_t _cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + global __cuFileWrite + _check_or_init_cufile() + if __cuFileWrite == NULL: + with gil: + raise FunctionNotFoundError("function cuFileWrite is not found") + return (__cuFileWrite)( + fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef CUfileError_t _cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverOpen + _check_or_init_cufile() + if __cuFileDriverOpen == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverOpen is not found") + return (__cuFileDriverOpen)( + ) + + +cdef CUfileError_t _cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverClose_v2 + _check_or_init_cufile() + if __cuFileDriverClose_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverClose_v2 is not found") + return (__cuFileDriverClose_v2)( + ) + + +cdef long _cuFileUseCount() except* nogil: + global __cuFileUseCount + _check_or_init_cufile() + if __cuFileUseCount == NULL: + with gil: + raise FunctionNotFoundError("function cuFileUseCount is not found") + return (__cuFileUseCount)( + ) + + +cdef CUfileError_t _cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverGetProperties + _check_or_init_cufile() + if __cuFileDriverGetProperties == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverGetProperties is not found") + return (__cuFileDriverGetProperties)( + props) + + +cdef CUfileError_t _cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetPollMode + _check_or_init_cufile() + if __cuFileDriverSetPollMode == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetPollMode is not found") + return (__cuFileDriverSetPollMode)( + poll, poll_threshold_size) + + +cdef CUfileError_t _cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxDirectIOSize + _check_or_init_cufile() + if __cuFileDriverSetMaxDirectIOSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxDirectIOSize is not found") + return (__cuFileDriverSetMaxDirectIOSize)( + max_direct_io_size) + + +cdef CUfileError_t _cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxCacheSize + _check_or_init_cufile() + if __cuFileDriverSetMaxCacheSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxCacheSize is not found") + return (__cuFileDriverSetMaxCacheSize)( + max_cache_size) + + +cdef CUfileError_t _cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverSetMaxPinnedMemSize + _check_or_init_cufile() + if __cuFileDriverSetMaxPinnedMemSize == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverSetMaxPinnedMemSize is not found") + return (__cuFileDriverSetMaxPinnedMemSize)( + max_pinned_size) + + +cdef CUfileError_t _cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOSetUp + _check_or_init_cufile() + if __cuFileBatchIOSetUp == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOSetUp is not found") + return (__cuFileBatchIOSetUp)( + batch_idp, nr) + + +cdef CUfileError_t _cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOSubmit + _check_or_init_cufile() + if __cuFileBatchIOSubmit == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOSubmit is not found") + return (__cuFileBatchIOSubmit)( + batch_idp, nr, iocbp, flags) + + +cdef CUfileError_t _cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOGetStatus + _check_or_init_cufile() + if __cuFileBatchIOGetStatus == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOGetStatus is not found") + return (__cuFileBatchIOGetStatus)( + batch_idp, min_nr, nr, iocbp, timeout) + + +cdef CUfileError_t _cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: + global __cuFileBatchIOCancel + _check_or_init_cufile() + if __cuFileBatchIOCancel == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIOCancel is not found") + return (__cuFileBatchIOCancel)( + batch_idp) + + +@cython.show_performance_hints(False) +cdef void _cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + global __cuFileBatchIODestroy + _check_or_init_cufile() + if __cuFileBatchIODestroy == NULL: + with gil: + raise FunctionNotFoundError("function cuFileBatchIODestroy is not found") + (__cuFileBatchIODestroy)( + batch_idp) + + +cdef CUfileError_t _cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileReadAsync + _check_or_init_cufile() + if __cuFileReadAsync == NULL: + with gil: + raise FunctionNotFoundError("function cuFileReadAsync is not found") + return (__cuFileReadAsync)( + fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + + +cdef CUfileError_t _cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileWriteAsync + _check_or_init_cufile() + if __cuFileWriteAsync == NULL: + with gil: + raise FunctionNotFoundError("function cuFileWriteAsync is not found") + return (__cuFileWriteAsync)( + fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + + +cdef CUfileError_t _cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: + global __cuFileStreamRegister + _check_or_init_cufile() + if __cuFileStreamRegister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileStreamRegister is not found") + return (__cuFileStreamRegister)( + stream, flags) + + +cdef CUfileError_t _cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: + global __cuFileStreamDeregister + _check_or_init_cufile() + if __cuFileStreamDeregister == NULL: + with gil: + raise FunctionNotFoundError("function cuFileStreamDeregister is not found") + return (__cuFileStreamDeregister)( + stream) + + +cdef CUfileError_t _cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetVersion + _check_or_init_cufile() + if __cuFileGetVersion == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetVersion is not found") + return (__cuFileGetVersion)( + version) + + +cdef CUfileError_t _cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterSizeT + _check_or_init_cufile() + if __cuFileGetParameterSizeT == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterSizeT is not found") + return (__cuFileGetParameterSizeT)( + param, value) + + +cdef CUfileError_t _cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterBool + _check_or_init_cufile() + if __cuFileGetParameterBool == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterBool is not found") + return (__cuFileGetParameterBool)( + param, value) + + +cdef CUfileError_t _cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: + global __cuFileGetParameterString + _check_or_init_cufile() + if __cuFileGetParameterString == NULL: + with gil: + raise FunctionNotFoundError("function cuFileGetParameterString is not found") + return (__cuFileGetParameterString)( + param, desc_str, len) + + +cdef CUfileError_t _cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterSizeT + _check_or_init_cufile() + if __cuFileSetParameterSizeT == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterSizeT is not found") + return (__cuFileSetParameterSizeT)( + param, value) + + +cdef CUfileError_t _cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterBool + _check_or_init_cufile() + if __cuFileSetParameterBool == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterBool is not found") + return (__cuFileSetParameterBool)( + param, value) + + +cdef CUfileError_t _cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: + global __cuFileSetParameterString + _check_or_init_cufile() + if __cuFileSetParameterString == NULL: + with gil: + raise FunctionNotFoundError("function cuFileSetParameterString is not found") + return (__cuFileSetParameterString)( + param, desc_str) + + +cdef CUfileError_t _cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: + global __cuFileDriverClose + _check_or_init_cufile() + if __cuFileDriverClose == NULL: + with gil: + raise FunctionNotFoundError("function cuFileDriverClose is not found") + return (__cuFileDriverClose)( + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpp new file mode 100644 index 0000000000000000000000000000000000000000..602ae1716aa80831c87ae699ac2dbb8792f13e21 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpp @@ -0,0 +1,12890 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._internal.nvjitlink", + "sources": [ + "cuda/bindings/_internal/nvjitlink.pyx" + ] + }, + "module_name": "cuda.bindings._internal.nvjitlink" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___internal__nvjitlink +#define __PYX_HAVE_API__cuda__bindings___internal__nvjitlink +/* Early includes */ +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_internal/nvjitlink.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cynvjitlink.pxd":15 + * + * # enums + * ctypedef enum nvJitLinkResult "nvJitLinkResult": # <<<<<<<<<<<<<< + * NVJITLINK_SUCCESS "NVJITLINK_SUCCESS" = 0 + * NVJITLINK_ERROR_UNRECOGNIZED_OPTION "NVJITLINK_ERROR_UNRECOGNIZED_OPTION" +*/ +enum nvJitLinkResult { + NVJITLINK_SUCCESS = 0, + NVJITLINK_ERROR_UNRECOGNIZED_OPTION, + NVJITLINK_ERROR_MISSING_ARCH, + NVJITLINK_ERROR_INVALID_INPUT, + NVJITLINK_ERROR_PTX_COMPILE, + NVJITLINK_ERROR_NVVM_COMPILE, + NVJITLINK_ERROR_INTERNAL, + NVJITLINK_ERROR_THREADPOOL, + NVJITLINK_ERROR_UNRECOGNIZED_INPUT, + NVJITLINK_ERROR_FINALIZE, + NVJITLINK_ERROR_NULL_INPUT, + NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS, + NVJITLINK_ERROR_INCORRECT_INPUT_TYPE, + NVJITLINK_ERROR_ARCH_MISMATCH, + NVJITLINK_ERROR_OUTDATED_LIBRARY, + NVJITLINK_ERROR_MISSING_FATBIN, + NVJITLINK_ERROR_UNRECOGNIZED_ARCH, + NVJITLINK_ERROR_UNSUPPORTED_ARCH, + NVJITLINK_ERROR_LTO_NOT_ENABLED, + _NVJITLINKRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvJitLinkResult nvJitLinkResult; + +/* "cynvjitlink.pxd":37 + * _NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42 + * + * ctypedef enum nvJitLinkInputType "nvJitLinkInputType": # <<<<<<<<<<<<<< + * NVJITLINK_INPUT_NONE "NVJITLINK_INPUT_NONE" = 0 + * NVJITLINK_INPUT_CUBIN "NVJITLINK_INPUT_CUBIN" = 1 +*/ +enum nvJitLinkInputType { + NVJITLINK_INPUT_NONE = 0, + NVJITLINK_INPUT_CUBIN = 1, + NVJITLINK_INPUT_PTX, + NVJITLINK_INPUT_LTOIR, + NVJITLINK_INPUT_FATBIN, + NVJITLINK_INPUT_OBJECT, + NVJITLINK_INPUT_LIBRARY, + NVJITLINK_INPUT_INDEX, + NVJITLINK_INPUT_ANY = 10 +}; +typedef enum nvJitLinkInputType nvJitLinkInputType; + +/* "cynvjitlink.pxd":50 + * + * # types + * ctypedef void* nvJitLinkHandle 'nvJitLinkHandle' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvJitLinkHandle; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cynvjitlink" */ + +/* Module declarations from "cuda.bindings._internal.nvjitlink" */ +static PyObject *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock = 0; +static int __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___py_nvjitlink_init; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___cuDriverGetVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog; +static void *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion; +static PyObject *__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs = 0; +static void *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(void); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_internal_9nvjitlink___check_or_init_nvjitlink(void); /*proto*/ +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(void); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointer(PyObject *, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._internal.nvjitlink" +extern int __pyx_module_is_main_cuda__bindings___internal__nvjitlink; +int __pyx_module_is_main_cuda__bindings___internal__nvjitlink = 0; + +/* Implementation of "cuda.bindings._internal.nvjitlink" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "."; +static const char __pyx_k__2[] = "?"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_Lock[] = "Lock"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_utils[] = "utils"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_add_note[] = "add_note"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_nvJitLink[] = "nvJitLink"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_z_A_a_9AQ[] = "\200\001\330\004\005\330\004\007\200z\220\023\220A\330\010\024\320\024.\250a\330\004\013\2109\220A\220Q"; +static const char __pyx_k_handle_uint[] = "_handle_uint"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_cuda_pathfinder[] = "cuda.pathfinder"; +static const char __pyx_k_nvJitLinkCreate[] = "__nvJitLinkCreate"; +static const char __pyx_k_nvJitLinkAddData[] = "__nvJitLinkAddData"; +static const char __pyx_k_nvJitLinkAddFile[] = "__nvJitLinkAddFile"; +static const char __pyx_k_nvJitLinkDestroy[] = "__nvJitLinkDestroy"; +static const char __pyx_k_nvJitLinkVersion[] = "__nvJitLinkVersion"; +static const char __pyx_k_NotSupportedError[] = "NotSupportedError"; +static const char __pyx_k_nvJitLinkComplete[] = "__nvJitLinkComplete"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_nvJitLinkGetInfoLog[] = "__nvJitLinkGetInfoLog"; +static const char __pyx_k_nvJitLinkGetErrorLog[] = "__nvJitLinkGetErrorLog"; +static const char __pyx_k_FunctionNotFoundError[] = "FunctionNotFoundError"; +static const char __pyx_k_nvJitLinkGetLinkedPtx[] = "__nvJitLinkGetLinkedPtx"; +static const char __pyx_k_load_nvidia_dynamic_lib[] = "load_nvidia_dynamic_lib"; +static const char __pyx_k_nvJitLinkGetInfoLogSize[] = "__nvJitLinkGetInfoLogSize"; +static const char __pyx_k_nvJitLinkGetLinkedCubin[] = "__nvJitLinkGetLinkedCubin"; +static const char __pyx_k_inspect_function_pointer[] = "_inspect_function_pointer"; +static const char __pyx_k_nvJitLinkGetErrorLogSize[] = "__nvJitLinkGetErrorLogSize"; +static const char __pyx_k_inspect_function_pointers[] = "_inspect_function_pointers"; +static const char __pyx_k_nvJitLinkGetLinkedPtxSize[] = "__nvJitLinkGetLinkedPtxSize"; +static const char __pyx_k_nvJitLinkGetLinkedCubinSize[] = "__nvJitLinkGetLinkedCubinSize"; +static const char __pyx_k_z_q_A_Q_1_1_1_A_Ja_A_j_1_Zq_Ja[] = "\200\001\330\004\005\330\004\007\200z\220\027\230\001\330\010\017\210q\340\004\034\230A\330\004\025\220Q\340\004\005\330\004\010\210\001\320\t \240\n\250!\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\005\330\004\010\210\001\320\t,\250J\260a\340\004\005\330\004\010\210\001\320\t(\250\n\260!\340\004\005\330\004\010\210\001\320\t*\250*\260A\340\004\005\330\004\010\210\001\320\t&\240j\260\001\340\004\005\330\004\010\210\001\320\t)\250\032\2601\340\004\005\330\004\010\210\001\320\t%\240Z\250q\340\004\005\330\004\010\210\001\320\t(\250\n\260!\340\004\005\330\004\010\210\001\320\t$\240J\250a\340\004\005\330\004\010\210\001\320\t!\240\032\2501\340\004\020\220\001\330\004\013\2101"; +static const char __pyx_k_function_nvJitLinkCreate_is_not[] = "function nvJitLinkCreate is not found"; +static const char __pyx_k_function_nvJitLinkGetInfoLog_is[] = "function nvJitLinkGetInfoLog is not found"; +static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; +static const char __pyx_k_cuda_bindings__internal_nvjitlin[] = "cuda.bindings._internal.nvjitlink"; +static const char __pyx_k_function_nvJitLinkAddData_is_not[] = "function nvJitLinkAddData is not found"; +static const char __pyx_k_function_nvJitLinkAddFile_is_not[] = "function nvJitLinkAddFile is not found"; +static const char __pyx_k_function_nvJitLinkComplete_is_no[] = "function nvJitLinkComplete is not found"; +static const char __pyx_k_function_nvJitLinkDestroy_is_not[] = "function nvJitLinkDestroy is not found"; +static const char __pyx_k_function_nvJitLinkGetErrorLogSiz[] = "function nvJitLinkGetErrorLogSize is not found"; +static const char __pyx_k_function_nvJitLinkGetErrorLog_is[] = "function nvJitLinkGetErrorLog is not found"; +static const char __pyx_k_function_nvJitLinkGetInfoLogSize[] = "function nvJitLinkGetInfoLogSize is not found"; +static const char __pyx_k_function_nvJitLinkGetLinkedCubin[] = "function nvJitLinkGetLinkedCubinSize is not found"; +static const char __pyx_k_function_nvJitLinkGetLinkedPtxSi[] = "function nvJitLinkGetLinkedPtxSize is not found"; +static const char __pyx_k_function_nvJitLinkGetLinkedPtx_i[] = "function nvJitLinkGetLinkedPtx is not found"; +static const char __pyx_k_function_nvJitLinkVersion_is_not[] = "function nvJitLinkVersion is not found"; +static const char __pyx_k_cuda_bindings__internal_nvjitlin_2[] = "cuda/bindings/_internal/nvjitlink.pyx"; +static const char __pyx_k_function_nvJitLinkGetLinkedCubin_2[] = "function nvJitLinkGetLinkedCubin is not found"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_9nvjitlink_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[2]; + PyObject *__pyx_string_tab[61]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_FunctionNotFoundError __pyx_string_tab[1] +#define __pyx_n_u_Lock __pyx_string_tab[2] +#define __pyx_n_u_NotSupportedError __pyx_string_tab[3] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] +#define __pyx_kp_u__2 __pyx_string_tab[5] +#define __pyx_kp_u_add_note __pyx_string_tab[6] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[7] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[8] +#define __pyx_n_u_cuda_bindings__internal_nvjitlin __pyx_string_tab[9] +#define __pyx_kp_u_cuda_bindings__internal_nvjitlin_2 __pyx_string_tab[10] +#define __pyx_n_u_cuda_pathfinder __pyx_string_tab[11] +#define __pyx_n_u_enter __pyx_string_tab[12] +#define __pyx_n_u_exit __pyx_string_tab[13] +#define __pyx_n_u_func __pyx_string_tab[14] +#define __pyx_kp_u_function_nvJitLinkAddData_is_not __pyx_string_tab[15] +#define __pyx_kp_u_function_nvJitLinkAddFile_is_not __pyx_string_tab[16] +#define __pyx_kp_u_function_nvJitLinkComplete_is_no __pyx_string_tab[17] +#define __pyx_kp_u_function_nvJitLinkCreate_is_not __pyx_string_tab[18] +#define __pyx_kp_u_function_nvJitLinkDestroy_is_not __pyx_string_tab[19] +#define __pyx_kp_u_function_nvJitLinkGetErrorLogSiz __pyx_string_tab[20] +#define __pyx_kp_u_function_nvJitLinkGetErrorLog_is __pyx_string_tab[21] +#define __pyx_kp_u_function_nvJitLinkGetInfoLogSize __pyx_string_tab[22] +#define __pyx_kp_u_function_nvJitLinkGetInfoLog_is __pyx_string_tab[23] +#define __pyx_kp_u_function_nvJitLinkGetLinkedCubin __pyx_string_tab[24] +#define __pyx_kp_u_function_nvJitLinkGetLinkedCubin_2 __pyx_string_tab[25] +#define __pyx_kp_u_function_nvJitLinkGetLinkedPtxSi __pyx_string_tab[26] +#define __pyx_kp_u_function_nvJitLinkGetLinkedPtx_i __pyx_string_tab[27] +#define __pyx_kp_u_function_nvJitLinkVersion_is_not __pyx_string_tab[28] +#define __pyx_n_u_handle_uint __pyx_string_tab[29] +#define __pyx_n_u_initializing __pyx_string_tab[30] +#define __pyx_n_u_inspect_function_pointer __pyx_string_tab[31] +#define __pyx_n_u_inspect_function_pointers __pyx_string_tab[32] +#define __pyx_n_u_is_coroutine __pyx_string_tab[33] +#define __pyx_n_u_load_nvidia_dynamic_lib __pyx_string_tab[34] +#define __pyx_n_u_main __pyx_string_tab[35] +#define __pyx_n_u_module __pyx_string_tab[36] +#define __pyx_n_u_name __pyx_string_tab[37] +#define __pyx_n_u_name_2 __pyx_string_tab[38] +#define __pyx_n_u_nvJitLink __pyx_string_tab[39] +#define __pyx_n_u_nvJitLinkAddData __pyx_string_tab[40] +#define __pyx_n_u_nvJitLinkAddFile __pyx_string_tab[41] +#define __pyx_n_u_nvJitLinkComplete __pyx_string_tab[42] +#define __pyx_n_u_nvJitLinkCreate __pyx_string_tab[43] +#define __pyx_n_u_nvJitLinkDestroy __pyx_string_tab[44] +#define __pyx_n_u_nvJitLinkGetErrorLog __pyx_string_tab[45] +#define __pyx_n_u_nvJitLinkGetErrorLogSize __pyx_string_tab[46] +#define __pyx_n_u_nvJitLinkGetInfoLog __pyx_string_tab[47] +#define __pyx_n_u_nvJitLinkGetInfoLogSize __pyx_string_tab[48] +#define __pyx_n_u_nvJitLinkGetLinkedCubin __pyx_string_tab[49] +#define __pyx_n_u_nvJitLinkGetLinkedCubinSize __pyx_string_tab[50] +#define __pyx_n_u_nvJitLinkGetLinkedPtx __pyx_string_tab[51] +#define __pyx_n_u_nvJitLinkGetLinkedPtxSize __pyx_string_tab[52] +#define __pyx_n_u_nvJitLinkVersion __pyx_string_tab[53] +#define __pyx_n_u_pop __pyx_string_tab[54] +#define __pyx_n_u_qualname __pyx_string_tab[55] +#define __pyx_n_u_set_name __pyx_string_tab[56] +#define __pyx_n_u_spec __pyx_string_tab[57] +#define __pyx_n_u_test __pyx_string_tab[58] +#define __pyx_n_u_threading __pyx_string_tab[59] +#define __pyx_n_u_utils __pyx_string_tab[60] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<61; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<61; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_internal/nvjitlink.pyx":58 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + * return handle +*/ + +static void *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(void) { + uintptr_t __pyx_v_handle; + void *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + uintptr_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("load_library", 0); + + /* "cuda/bindings/_internal/nvjitlink.pyx":59 + * + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint # <<<<<<<<<<<<<< + * return handle + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nvJitLink}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_handle_uint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_handle = __pyx_t_5; + + /* "cuda/bindings/_internal/nvjitlink.pyx":60 + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + * return handle # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((void *)__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":58 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + * return handle +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink.load_library", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":63 + * + * + * cdef int __check_or_init_nvjitlink() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_nvjitlink_init + * +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_9nvjitlink___check_or_init_nvjitlink(void) { + void *__pyx_v_handle; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + void *__pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("__check_or_init_nvjitlink", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":66 + * global __py_nvjitlink_init + * + * cdef void* handle = NULL # <<<<<<<<<<<<<< + * + * with gil, __symbol_lock: +*/ + __pyx_v_handle = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":68 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvJitLinkCreate +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":71 + * # Load function + * global __nvJitLinkCreate + * __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') # <<<<<<<<<<<<<< + * if __nvJitLinkCreate == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkCreate")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":72 + * global __nvJitLinkCreate + * __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + * if __nvJitLinkCreate == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":73 + * __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + * if __nvJitLinkCreate == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":74 + * if __nvJitLinkCreate == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":73 + * __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + * if __nvJitLinkCreate == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":75 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') # <<<<<<<<<<<<<< + * + * global __nvJitLinkDestroy +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkCreate")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":72 + * global __nvJitLinkCreate + * __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + * if __nvJitLinkCreate == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":78 + * + * global __nvJitLinkDestroy + * __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') # <<<<<<<<<<<<<< + * if __nvJitLinkDestroy == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkDestroy")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":79 + * global __nvJitLinkDestroy + * __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + * if __nvJitLinkDestroy == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":80 + * __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + * if __nvJitLinkDestroy == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":81 + * if __nvJitLinkDestroy == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 81, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":80 + * __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + * if __nvJitLinkDestroy == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":82 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') # <<<<<<<<<<<<<< + * + * global __nvJitLinkAddData +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkDestroy")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":79 + * global __nvJitLinkDestroy + * __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + * if __nvJitLinkDestroy == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":85 + * + * global __nvJitLinkAddData + * __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') # <<<<<<<<<<<<<< + * if __nvJitLinkAddData == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkAddData")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":86 + * global __nvJitLinkAddData + * __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + * if __nvJitLinkAddData == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":87 + * __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + * if __nvJitLinkAddData == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":88 + * if __nvJitLinkAddData == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":87 + * __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + * if __nvJitLinkAddData == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":89 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') # <<<<<<<<<<<<<< + * + * global __nvJitLinkAddFile +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkAddData")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":86 + * global __nvJitLinkAddData + * __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + * if __nvJitLinkAddData == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":92 + * + * global __nvJitLinkAddFile + * __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') # <<<<<<<<<<<<<< + * if __nvJitLinkAddFile == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkAddFile")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":93 + * global __nvJitLinkAddFile + * __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + * if __nvJitLinkAddFile == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":94 + * __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + * if __nvJitLinkAddFile == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":95 + * if __nvJitLinkAddFile == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":94 + * __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + * if __nvJitLinkAddFile == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":96 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') # <<<<<<<<<<<<<< + * + * global __nvJitLinkComplete +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkAddFile")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":93 + * global __nvJitLinkAddFile + * __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + * if __nvJitLinkAddFile == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":99 + * + * global __nvJitLinkComplete + * __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') # <<<<<<<<<<<<<< + * if __nvJitLinkComplete == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkComplete")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":100 + * global __nvJitLinkComplete + * __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + * if __nvJitLinkComplete == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":101 + * __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + * if __nvJitLinkComplete == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":102 + * if __nvJitLinkComplete == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":101 + * __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + * if __nvJitLinkComplete == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":103 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedCubinSize +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkComplete")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":100 + * global __nvJitLinkComplete + * __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + * if __nvJitLinkComplete == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":106 + * + * global __nvJitLinkGetLinkedCubinSize + * __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedCubinSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetLinkedCubinSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":107 + * global __nvJitLinkGetLinkedCubinSize + * __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + * if __nvJitLinkGetLinkedCubinSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":108 + * __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + * if __nvJitLinkGetLinkedCubinSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":109 + * if __nvJitLinkGetLinkedCubinSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":108 + * __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + * if __nvJitLinkGetLinkedCubinSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":110 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedCubin +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetLinkedCubinSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":107 + * global __nvJitLinkGetLinkedCubinSize + * __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + * if __nvJitLinkGetLinkedCubinSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":113 + * + * global __nvJitLinkGetLinkedCubin + * __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedCubin == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetLinkedCubin")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":114 + * global __nvJitLinkGetLinkedCubin + * __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + * if __nvJitLinkGetLinkedCubin == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":115 + * __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + * if __nvJitLinkGetLinkedCubin == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":116 + * if __nvJitLinkGetLinkedCubin == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":115 + * __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + * if __nvJitLinkGetLinkedCubin == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":117 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedPtxSize +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetLinkedCubin")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":114 + * global __nvJitLinkGetLinkedCubin + * __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + * if __nvJitLinkGetLinkedCubin == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":120 + * + * global __nvJitLinkGetLinkedPtxSize + * __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedPtxSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetLinkedPtxSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":121 + * global __nvJitLinkGetLinkedPtxSize + * __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + * if __nvJitLinkGetLinkedPtxSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":122 + * __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + * if __nvJitLinkGetLinkedPtxSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":123 + * if __nvJitLinkGetLinkedPtxSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":122 + * __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + * if __nvJitLinkGetLinkedPtxSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":124 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedPtx +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetLinkedPtxSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":121 + * global __nvJitLinkGetLinkedPtxSize + * __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + * if __nvJitLinkGetLinkedPtxSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":127 + * + * global __nvJitLinkGetLinkedPtx + * __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedPtx == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetLinkedPtx")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":128 + * global __nvJitLinkGetLinkedPtx + * __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + * if __nvJitLinkGetLinkedPtx == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":129 + * __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + * if __nvJitLinkGetLinkedPtx == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":130 + * if __nvJitLinkGetLinkedPtx == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":129 + * __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + * if __nvJitLinkGetLinkedPtx == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":131 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetErrorLogSize +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetLinkedPtx")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":128 + * global __nvJitLinkGetLinkedPtx + * __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + * if __nvJitLinkGetLinkedPtx == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":134 + * + * global __nvJitLinkGetErrorLogSize + * __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') # <<<<<<<<<<<<<< + * if __nvJitLinkGetErrorLogSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetErrorLogSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":135 + * global __nvJitLinkGetErrorLogSize + * __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + * if __nvJitLinkGetErrorLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":136 + * __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + * if __nvJitLinkGetErrorLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":137 + * if __nvJitLinkGetErrorLogSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":136 + * __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + * if __nvJitLinkGetErrorLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":138 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetErrorLog +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetErrorLogSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":135 + * global __nvJitLinkGetErrorLogSize + * __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + * if __nvJitLinkGetErrorLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":141 + * + * global __nvJitLinkGetErrorLog + * __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') # <<<<<<<<<<<<<< + * if __nvJitLinkGetErrorLog == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetErrorLog")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":142 + * global __nvJitLinkGetErrorLog + * __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + * if __nvJitLinkGetErrorLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":143 + * __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + * if __nvJitLinkGetErrorLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":144 + * if __nvJitLinkGetErrorLog == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":143 + * __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + * if __nvJitLinkGetErrorLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":145 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetInfoLogSize +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetErrorLog")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":142 + * global __nvJitLinkGetErrorLog + * __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + * if __nvJitLinkGetErrorLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":148 + * + * global __nvJitLinkGetInfoLogSize + * __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') # <<<<<<<<<<<<<< + * if __nvJitLinkGetInfoLogSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetInfoLogSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":149 + * global __nvJitLinkGetInfoLogSize + * __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + * if __nvJitLinkGetInfoLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":150 + * __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + * if __nvJitLinkGetInfoLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":151 + * if __nvJitLinkGetInfoLogSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":150 + * __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + * if __nvJitLinkGetInfoLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":152 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetInfoLog +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetInfoLogSize")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":149 + * global __nvJitLinkGetInfoLogSize + * __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + * if __nvJitLinkGetInfoLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":155 + * + * global __nvJitLinkGetInfoLog + * __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') # <<<<<<<<<<<<<< + * if __nvJitLinkGetInfoLog == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkGetInfoLog")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":156 + * global __nvJitLinkGetInfoLog + * __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + * if __nvJitLinkGetInfoLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":157 + * __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + * if __nvJitLinkGetInfoLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":158 + * if __nvJitLinkGetInfoLog == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":157 + * __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + * if __nvJitLinkGetInfoLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":159 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') # <<<<<<<<<<<<<< + * + * global __nvJitLinkVersion +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkGetInfoLog")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":156 + * global __nvJitLinkGetInfoLog + * __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + * if __nvJitLinkGetInfoLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":162 + * + * global __nvJitLinkVersion + * __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') # <<<<<<<<<<<<<< + * if __nvJitLinkVersion == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion = dlsym(RTLD_DEFAULT, ((char const *)"nvJitLinkVersion")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":163 + * global __nvJitLinkVersion + * __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + * if __nvJitLinkVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":164 + * __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + * if __nvJitLinkVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":165 + * if __nvJitLinkVersion == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvjitlink.pyx":164 + * __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + * if __nvJitLinkVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":166 + * if handle == NULL: + * handle = load_library() + * __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') # <<<<<<<<<<<<<< + * + * __py_nvjitlink_init = True +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion = dlsym(__pyx_v_handle, ((char const *)"nvJitLinkVersion")); + + /* "cuda/bindings/_internal/nvjitlink.pyx":163 + * global __nvJitLinkVersion + * __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + * if __nvJitLinkVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":168 + * __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') + * + * __py_nvjitlink_init = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___py_nvjitlink_init = 1; + + /* "cuda/bindings/_internal/nvjitlink.pyx":169 + * + * __py_nvjitlink_init = True + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_internal/nvjitlink.pyx":68 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvJitLinkCreate +*/ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink.__check_or_init_nvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 68, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 68, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 68, __pyx_L12_except_error) + __pyx_t_13 = (!__pyx_t_9); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 68, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 68, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_14 = __pyx_r; + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 68, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_14; + goto __pyx_L3_return; + } + __pyx_L9:; + } + goto __pyx_L47; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_error; + __pyx_L47:; + } + } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L3_return: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L0; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":63 + * + * + * cdef int __check_or_init_nvjitlink() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_nvjitlink_init + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink.__check_or_init_nvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":172 + * + * + * cdef inline int _check_or_init_nvjitlink() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_nvjitlink_init: + * return 0 +*/ + +static CYTHON_INLINE int __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_internal/nvjitlink.pyx":173 + * + * cdef inline int _check_or_init_nvjitlink() except -1 nogil: + * if __py_nvjitlink_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + if (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___py_nvjitlink_init) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":174 + * cdef inline int _check_or_init_nvjitlink() except -1 nogil: + * if __py_nvjitlink_init: + * return 0 # <<<<<<<<<<<<<< + * + * return __check_or_init_nvjitlink() +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":173 + * + * cdef inline int _check_or_init_nvjitlink() except -1 nogil: + * if __py_nvjitlink_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":176 + * return 0 + * + * return __check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * + * cdef dict func_ptrs = None +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink___check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":172 + * + * + * cdef inline int _check_or_init_nvjitlink() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_nvjitlink_init: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._check_or_init_nvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":181 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_data = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + + /* "cuda/bindings/_internal/nvjitlink.pyx":183 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs != ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":184 + * global func_ptrs + * if func_ptrs is not None: + * return func_ptrs # <<<<<<<<<<<<<< + * + * _check_or_init_nvjitlink() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs); + __pyx_r = __pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":183 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":186 + * return func_ptrs + * + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * cdef dict data = {} + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":187 + * + * _check_or_init_nvjitlink() + * cdef dict data = {} # <<<<<<<<<<<<<< + * + * global __nvJitLinkCreate +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_data = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":190 + * + * global __nvJitLinkCreate + * data["__nvJitLinkCreate"] = __nvJitLinkCreate # <<<<<<<<<<<<<< + * + * global __nvJitLinkDestroy +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkCreate, __pyx_t_3) < 0))) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":193 + * + * global __nvJitLinkDestroy + * data["__nvJitLinkDestroy"] = __nvJitLinkDestroy # <<<<<<<<<<<<<< + * + * global __nvJitLinkAddData +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkDestroy, __pyx_t_3) < 0))) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":196 + * + * global __nvJitLinkAddData + * data["__nvJitLinkAddData"] = __nvJitLinkAddData # <<<<<<<<<<<<<< + * + * global __nvJitLinkAddFile +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkAddData, __pyx_t_3) < 0))) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":199 + * + * global __nvJitLinkAddFile + * data["__nvJitLinkAddFile"] = __nvJitLinkAddFile # <<<<<<<<<<<<<< + * + * global __nvJitLinkComplete +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkAddFile, __pyx_t_3) < 0))) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":202 + * + * global __nvJitLinkComplete + * data["__nvJitLinkComplete"] = __nvJitLinkComplete # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedCubinSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkComplete, __pyx_t_3) < 0))) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":205 + * + * global __nvJitLinkGetLinkedCubinSize + * data["__nvJitLinkGetLinkedCubinSize"] = __nvJitLinkGetLinkedCubinSize # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedCubin +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetLinkedCubinSize, __pyx_t_3) < 0))) __PYX_ERR(0, 205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":208 + * + * global __nvJitLinkGetLinkedCubin + * data["__nvJitLinkGetLinkedCubin"] = __nvJitLinkGetLinkedCubin # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedPtxSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetLinkedCubin, __pyx_t_3) < 0))) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":211 + * + * global __nvJitLinkGetLinkedPtxSize + * data["__nvJitLinkGetLinkedPtxSize"] = __nvJitLinkGetLinkedPtxSize # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetLinkedPtx +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetLinkedPtxSize, __pyx_t_3) < 0))) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":214 + * + * global __nvJitLinkGetLinkedPtx + * data["__nvJitLinkGetLinkedPtx"] = __nvJitLinkGetLinkedPtx # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetErrorLogSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetLinkedPtx, __pyx_t_3) < 0))) __PYX_ERR(0, 214, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":217 + * + * global __nvJitLinkGetErrorLogSize + * data["__nvJitLinkGetErrorLogSize"] = __nvJitLinkGetErrorLogSize # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetErrorLog +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetErrorLogSize, __pyx_t_3) < 0))) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":220 + * + * global __nvJitLinkGetErrorLog + * data["__nvJitLinkGetErrorLog"] = __nvJitLinkGetErrorLog # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetInfoLogSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetErrorLog, __pyx_t_3) < 0))) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":223 + * + * global __nvJitLinkGetInfoLogSize + * data["__nvJitLinkGetInfoLogSize"] = __nvJitLinkGetInfoLogSize # <<<<<<<<<<<<<< + * + * global __nvJitLinkGetInfoLog +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetInfoLogSize, __pyx_t_3) < 0))) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":226 + * + * global __nvJitLinkGetInfoLog + * data["__nvJitLinkGetInfoLog"] = __nvJitLinkGetInfoLog # <<<<<<<<<<<<<< + * + * global __nvJitLinkVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkGetInfoLog, __pyx_t_3) < 0))) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":229 + * + * global __nvJitLinkVersion + * data["__nvJitLinkVersion"] = __nvJitLinkVersion # <<<<<<<<<<<<<< + * + * func_ptrs = data +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvJitLinkVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":231 + * data["__nvJitLinkVersion"] = __nvJitLinkVersion + * + * func_ptrs = data # <<<<<<<<<<<<<< + * return data + * +*/ + __Pyx_INCREF(__pyx_v_data); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + + /* "cuda/bindings/_internal/nvjitlink.pyx":232 + * + * func_ptrs = data + * return data # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":181 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers, "_inspect_function_pointers() -> dict"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers = {"_inspect_function_pointers", (PyCFunction)__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers, METH_NOARGS, __pyx_doc_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointers (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":235 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointer(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + + /* "cuda/bindings/_internal/nvjitlink.pyx":237 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs == ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":238 + * global func_ptrs + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() # <<<<<<<<<<<<<< + * return func_ptrs[name] + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointers(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":237 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":239 + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 239, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":235 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_9nvjitlink_2_inspect_function_pointer, "_inspect_function_pointer(str name)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer = {"_inspect_function_pointer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9_internal_9nvjitlink_2_inspect_function_pointer}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 235, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_inspect_function_pointer", 0) < (0)) __PYX_ERR(0, 235, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, i); __PYX_ERR(0, 235, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 235, __pyx_L3_error) + } + __pyx_v_name = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 235, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_9nvjitlink_2_inspect_function_pointer(__pyx_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_9nvjitlink_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__inspect_function_pointer(__pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":246 + * ############################################################################### + * + * cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkCreate + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkCreate(nvJitLinkHandle *__pyx_v_handle, uint32_t __pyx_v_numOptions, char const **__pyx_v_options) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkCreate", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":248 + * cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkCreate + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkCreate == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 248, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":249 + * global __nvJitLinkCreate + * _check_or_init_nvjitlink() + * if __nvJitLinkCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":250 + * _check_or_init_nvjitlink() + * if __nvJitLinkCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") + * return (__nvJitLinkCreate)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":251 + * if __nvJitLinkCreate == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkCreate)( + * handle, numOptions, options) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkCreate_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 251, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":250 + * _check_or_init_nvjitlink() + * if __nvJitLinkCreate == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") + * return (__nvJitLinkCreate)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":249 + * global __nvJitLinkCreate + * _check_or_init_nvjitlink() + * if __nvJitLinkCreate == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":252 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkCreate is not found") + * return (__nvJitLinkCreate)( # <<<<<<<<<<<<<< + * handle, numOptions, options) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle *, uint32_t, char const **))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate)(__pyx_v_handle, __pyx_v_numOptions, __pyx_v_options); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":246 + * ############################################################################### + * + * cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkCreate + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":256 + * + * + * cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkDestroy + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkDestroy(nvJitLinkHandle *__pyx_v_handle) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkDestroy", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":258 + * cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkDestroy + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkDestroy == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 258, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":259 + * global __nvJitLinkDestroy + * _check_or_init_nvjitlink() + * if __nvJitLinkDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":260 + * _check_or_init_nvjitlink() + * if __nvJitLinkDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + * return (__nvJitLinkDestroy)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":261 + * if __nvJitLinkDestroy == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkDestroy)( + * handle) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkDestroy_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 261, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":260 + * _check_or_init_nvjitlink() + * if __nvJitLinkDestroy == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + * return (__nvJitLinkDestroy)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":259 + * global __nvJitLinkDestroy + * _check_or_init_nvjitlink() + * if __nvJitLinkDestroy == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":262 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + * return (__nvJitLinkDestroy)( # <<<<<<<<<<<<<< + * handle) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy)(__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":256 + * + * + * cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkDestroy + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":266 + * + * + * cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkAddData + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddData(nvJitLinkHandle __pyx_v_handle, nvJitLinkInputType __pyx_v_inputType, void const *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkAddData", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":268 + * cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkAddData + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkAddData == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 268, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":269 + * global __nvJitLinkAddData + * _check_or_init_nvjitlink() + * if __nvJitLinkAddData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":270 + * _check_or_init_nvjitlink() + * if __nvJitLinkAddData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") + * return (__nvJitLinkAddData)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":271 + * if __nvJitLinkAddData == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkAddData)( + * handle, inputType, data, size, name) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 271, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkAddData_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 271, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":270 + * _check_or_init_nvjitlink() + * if __nvJitLinkAddData == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") + * return (__nvJitLinkAddData)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":269 + * global __nvJitLinkAddData + * _check_or_init_nvjitlink() + * if __nvJitLinkAddData == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":272 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddData is not found") + * return (__nvJitLinkAddData)( # <<<<<<<<<<<<<< + * handle, inputType, data, size, name) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData)(__pyx_v_handle, __pyx_v_inputType, __pyx_v_data, __pyx_v_size, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":266 + * + * + * cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkAddData + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":276 + * + * + * cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkAddFile + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddFile(nvJitLinkHandle __pyx_v_handle, nvJitLinkInputType __pyx_v_inputType, char const *__pyx_v_fileName) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkAddFile", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":278 + * cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkAddFile + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkAddFile == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 278, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":279 + * global __nvJitLinkAddFile + * _check_or_init_nvjitlink() + * if __nvJitLinkAddFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":280 + * _check_or_init_nvjitlink() + * if __nvJitLinkAddFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + * return (__nvJitLinkAddFile)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":281 + * if __nvJitLinkAddFile == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkAddFile)( + * handle, inputType, fileName) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkAddFile_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 281, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":280 + * _check_or_init_nvjitlink() + * if __nvJitLinkAddFile == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + * return (__nvJitLinkAddFile)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":279 + * global __nvJitLinkAddFile + * _check_or_init_nvjitlink() + * if __nvJitLinkAddFile == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":282 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + * return (__nvJitLinkAddFile)( # <<<<<<<<<<<<<< + * handle, inputType, fileName) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, nvJitLinkInputType, char const *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile)(__pyx_v_handle, __pyx_v_inputType, __pyx_v_fileName); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":276 + * + * + * cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkAddFile + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":286 + * + * + * cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkComplete + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkComplete(nvJitLinkHandle __pyx_v_handle) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkComplete", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":288 + * cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkComplete + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkComplete == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":289 + * global __nvJitLinkComplete + * _check_or_init_nvjitlink() + * if __nvJitLinkComplete == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":290 + * _check_or_init_nvjitlink() + * if __nvJitLinkComplete == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") + * return (__nvJitLinkComplete)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":291 + * if __nvJitLinkComplete == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkComplete)( + * handle) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkComplete_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 291, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":290 + * _check_or_init_nvjitlink() + * if __nvJitLinkComplete == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") + * return (__nvJitLinkComplete)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":289 + * global __nvJitLinkComplete + * _check_or_init_nvjitlink() + * if __nvJitLinkComplete == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":292 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkComplete is not found") + * return (__nvJitLinkComplete)( # <<<<<<<<<<<<<< + * handle) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete)(__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":286 + * + * + * cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkComplete + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":296 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedCubinSize + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubinSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetLinkedCubinSize", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":298 + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetLinkedCubinSize + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedCubinSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 298, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":299 + * global __nvJitLinkGetLinkedCubinSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubinSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":300 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubinSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + * return (__nvJitLinkGetLinkedCubinSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":301 + * if __nvJitLinkGetLinkedCubinSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetLinkedCubinSize)( + * handle, size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetLinkedCubin}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 301, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":300 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubinSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + * return (__nvJitLinkGetLinkedCubinSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":299 + * global __nvJitLinkGetLinkedCubinSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubinSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":302 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + * return (__nvJitLinkGetLinkedCubinSize)( # <<<<<<<<<<<<<< + * handle, size) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, size_t *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize)(__pyx_v_handle, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":296 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedCubinSize + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetLinkedCubinSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":306 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedCubin + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubin(nvJitLinkHandle __pyx_v_handle, void *__pyx_v_cubin) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetLinkedCubin", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":308 + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetLinkedCubin + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedCubin == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 308, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":309 + * global __nvJitLinkGetLinkedCubin + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubin == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":310 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubin == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + * return (__nvJitLinkGetLinkedCubin)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":311 + * if __nvJitLinkGetLinkedCubin == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetLinkedCubin)( + * handle, cubin) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetLinkedCubin_2}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 311, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":310 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubin == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + * return (__nvJitLinkGetLinkedCubin)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":309 + * global __nvJitLinkGetLinkedCubin + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedCubin == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":312 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + * return (__nvJitLinkGetLinkedCubin)( # <<<<<<<<<<<<<< + * handle, cubin) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, void *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin)(__pyx_v_handle, __pyx_v_cubin); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":306 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedCubin + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetLinkedCubin", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":316 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedPtxSize + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtxSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetLinkedPtxSize", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":318 + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetLinkedPtxSize + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedPtxSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":319 + * global __nvJitLinkGetLinkedPtxSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtxSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":320 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtxSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + * return (__nvJitLinkGetLinkedPtxSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":321 + * if __nvJitLinkGetLinkedPtxSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetLinkedPtxSize)( + * handle, size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetLinkedPtxSi}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 321, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":320 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtxSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + * return (__nvJitLinkGetLinkedPtxSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":319 + * global __nvJitLinkGetLinkedPtxSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtxSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":322 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + * return (__nvJitLinkGetLinkedPtxSize)( # <<<<<<<<<<<<<< + * handle, size) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, size_t *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize)(__pyx_v_handle, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":316 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedPtxSize + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetLinkedPtxSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":326 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedPtx + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtx(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_ptx) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetLinkedPtx", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":328 + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetLinkedPtx + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetLinkedPtx == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":329 + * global __nvJitLinkGetLinkedPtx + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":330 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + * return (__nvJitLinkGetLinkedPtx)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":331 + * if __nvJitLinkGetLinkedPtx == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetLinkedPtx)( + * handle, ptx) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetLinkedPtx_i}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 331, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":330 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtx == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + * return (__nvJitLinkGetLinkedPtx)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":329 + * global __nvJitLinkGetLinkedPtx + * _check_or_init_nvjitlink() + * if __nvJitLinkGetLinkedPtx == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":332 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + * return (__nvJitLinkGetLinkedPtx)( # <<<<<<<<<<<<<< + * handle, ptx) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, char *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx)(__pyx_v_handle, __pyx_v_ptx); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":326 + * + * + * cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetLinkedPtx + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetLinkedPtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":336 + * + * + * cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetErrorLogSize + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLogSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetErrorLogSize", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":338 + * cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetErrorLogSize + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetErrorLogSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 338, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":339 + * global __nvJitLinkGetErrorLogSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":340 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + * return (__nvJitLinkGetErrorLogSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":341 + * if __nvJitLinkGetErrorLogSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetErrorLogSize)( + * handle, size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetErrorLogSiz}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 341, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 341, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":340 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + * return (__nvJitLinkGetErrorLogSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":339 + * global __nvJitLinkGetErrorLogSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":342 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + * return (__nvJitLinkGetErrorLogSize)( # <<<<<<<<<<<<<< + * handle, size) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, size_t *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize)(__pyx_v_handle, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":336 + * + * + * cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetErrorLogSize + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetErrorLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":346 + * + * + * cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetErrorLog + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLog(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_log) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetErrorLog", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":348 + * cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetErrorLog + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetErrorLog == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 348, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":349 + * global __nvJitLinkGetErrorLog + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":350 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + * return (__nvJitLinkGetErrorLog)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":351 + * if __nvJitLinkGetErrorLog == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetErrorLog)( + * handle, log) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 351, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetErrorLog_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 351, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":350 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + * return (__nvJitLinkGetErrorLog)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":349 + * global __nvJitLinkGetErrorLog + * _check_or_init_nvjitlink() + * if __nvJitLinkGetErrorLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":352 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + * return (__nvJitLinkGetErrorLog)( # <<<<<<<<<<<<<< + * handle, log) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, char *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog)(__pyx_v_handle, __pyx_v_log); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":346 + * + * + * cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetErrorLog + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetErrorLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":356 + * + * + * cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetInfoLogSize + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLogSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetInfoLogSize", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":358 + * cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetInfoLogSize + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetInfoLogSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 358, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":359 + * global __nvJitLinkGetInfoLogSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":360 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + * return (__nvJitLinkGetInfoLogSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":361 + * if __nvJitLinkGetInfoLogSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetInfoLogSize)( + * handle, size) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetInfoLogSize}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 361, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":360 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + * return (__nvJitLinkGetInfoLogSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":359 + * global __nvJitLinkGetInfoLogSize + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":362 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + * return (__nvJitLinkGetInfoLogSize)( # <<<<<<<<<<<<<< + * handle, size) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, size_t *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize)(__pyx_v_handle, __pyx_v_size); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":356 + * + * + * cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetInfoLogSize + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetInfoLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":366 + * + * + * cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetInfoLog + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLog(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_log) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkGetInfoLog", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":368 + * cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkGetInfoLog + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkGetInfoLog == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 368, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":369 + * global __nvJitLinkGetInfoLog + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":370 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + * return (__nvJitLinkGetInfoLog)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":371 + * if __nvJitLinkGetInfoLog == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkGetInfoLog)( + * handle, log) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkGetInfoLog_is}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 371, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":370 + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + * return (__nvJitLinkGetInfoLog)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":369 + * global __nvJitLinkGetInfoLog + * _check_or_init_nvjitlink() + * if __nvJitLinkGetInfoLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":372 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + * return (__nvJitLinkGetInfoLog)( # <<<<<<<<<<<<<< + * handle, log) + * +*/ + __pyx_r = ((nvJitLinkResult (*)(nvJitLinkHandle, char *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog)(__pyx_v_handle, __pyx_v_log); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":366 + * + * + * cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkGetInfoLog + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkGetInfoLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvjitlink.pyx":376 + * + * + * cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkVersion + * _check_or_init_nvjitlink() +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkVersion(unsigned int *__pyx_v_major, unsigned int *__pyx_v_minor) { + nvJitLinkResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvJitLinkVersion", 1); + + /* "cuda/bindings/_internal/nvjitlink.pyx":378 + * cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvJitLinkVersion + * _check_or_init_nvjitlink() # <<<<<<<<<<<<<< + * if __nvJitLinkVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__check_or_init_nvjitlink(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvjitlink.pyx":379 + * global __nvJitLinkVersion + * _check_or_init_nvjitlink() + * if __nvJitLinkVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvjitlink.pyx":380 + * _check_or_init_nvjitlink() + * if __nvJitLinkVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") + * return (__nvJitLinkVersion)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvjitlink.pyx":381 + * if __nvJitLinkVersion == NULL: + * with gil: + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") # <<<<<<<<<<<<<< + * return (__nvJitLinkVersion)( + * major, minor) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 381, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvJitLinkVersion_is_not}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 381, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":380 + * _check_or_init_nvjitlink() + * if __nvJitLinkVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") + * return (__nvJitLinkVersion)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":379 + * global __nvJitLinkVersion + * _check_or_init_nvjitlink() + * if __nvJitLinkVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") +*/ + } + + /* "cuda/bindings/_internal/nvjitlink.pyx":382 + * with gil: + * raise FunctionNotFoundError("function nvJitLinkVersion is not found") + * return (__nvJitLinkVersion)( # <<<<<<<<<<<<<< + * major, minor) +*/ + __pyx_r = ((nvJitLinkResult (*)(unsigned int *, unsigned int *))__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion)(__pyx_v_major, __pyx_v_minor); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":376 + * + * + * cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvJitLinkVersion + * _check_or_init_nvjitlink() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvjitlink._nvJitLinkVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_nvJitLinkCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkCreate, "nvJitLinkResult (nvJitLinkHandle *, uint32_t, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkDestroy, "nvJitLinkResult (nvJitLinkHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkAddData", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddData, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkAddFile", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddFile, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkComplete", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkComplete, "nvJitLinkResult (nvJitLinkHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetLinkedCubinSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubinSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetLinkedCubin", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubin, "nvJitLinkResult (nvJitLinkHandle, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetLinkedPtxSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtxSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetLinkedPtx", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtx, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetErrorLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetErrorLog", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetInfoLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkGetInfoLog", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvJitLinkVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkVersion, "nvJitLinkResult (unsigned int *, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_nvjitlink(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_nvjitlink}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "nvjitlink", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_nvjitlink(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_nvjitlink(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_nvjitlink(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'nvjitlink' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "nvjitlink" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_nvjitlink", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___internal__nvjitlink) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._internal.nvjitlink")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._internal.nvjitlink", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_internal/nvjitlink.pyx":9 + * from libc.stdint cimport intptr_t, uintptr_t + * + * import threading # <<<<<<<<<<<<<< + * from .utils import FunctionNotFoundError, NotSupportedError + * +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_threading, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":10 + * + * import threading + * from .utils import FunctionNotFoundError, NotSupportedError # <<<<<<<<<<<<<< + * + * from cuda.pathfinder import load_nvidia_dynamic_lib +*/ + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_utils, __pyx_t_2, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":12 + * from .utils import FunctionNotFoundError, NotSupportedError + * + * from cuda.pathfinder import load_nvidia_dynamic_lib # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_pathfinder, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib, __pyx_t_3) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":38 + * ############################################################################### + * + * cdef object __symbol_lock = threading.Lock() # <<<<<<<<<<<<<< + * cdef bint __py_nvjitlink_init = False + * cdef void* __cuDriverGetVersion = NULL +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink___symbol_lock, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":39 + * + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_nvjitlink_init = False # <<<<<<<<<<<<<< + * cdef void* __cuDriverGetVersion = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___py_nvjitlink_init = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":40 + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_nvjitlink_init = False + * cdef void* __cuDriverGetVersion = NULL # <<<<<<<<<<<<<< + * + * cdef void* __nvJitLinkCreate = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___cuDriverGetVersion = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":42 + * cdef void* __cuDriverGetVersion = NULL + * + * cdef void* __nvJitLinkCreate = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkDestroy = NULL + * cdef void* __nvJitLinkAddData = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkCreate = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":43 + * + * cdef void* __nvJitLinkCreate = NULL + * cdef void* __nvJitLinkDestroy = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkAddData = NULL + * cdef void* __nvJitLinkAddFile = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkDestroy = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":44 + * cdef void* __nvJitLinkCreate = NULL + * cdef void* __nvJitLinkDestroy = NULL + * cdef void* __nvJitLinkAddData = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkAddFile = NULL + * cdef void* __nvJitLinkComplete = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddData = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":45 + * cdef void* __nvJitLinkDestroy = NULL + * cdef void* __nvJitLinkAddData = NULL + * cdef void* __nvJitLinkAddFile = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkComplete = NULL + * cdef void* __nvJitLinkGetLinkedCubinSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkAddFile = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":46 + * cdef void* __nvJitLinkAddData = NULL + * cdef void* __nvJitLinkAddFile = NULL + * cdef void* __nvJitLinkComplete = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetLinkedCubinSize = NULL + * cdef void* __nvJitLinkGetLinkedCubin = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkComplete = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":47 + * cdef void* __nvJitLinkAddFile = NULL + * cdef void* __nvJitLinkComplete = NULL + * cdef void* __nvJitLinkGetLinkedCubinSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetLinkedCubin = NULL + * cdef void* __nvJitLinkGetLinkedPtxSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubinSize = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":48 + * cdef void* __nvJitLinkComplete = NULL + * cdef void* __nvJitLinkGetLinkedCubinSize = NULL + * cdef void* __nvJitLinkGetLinkedCubin = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetLinkedPtxSize = NULL + * cdef void* __nvJitLinkGetLinkedPtx = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedCubin = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":49 + * cdef void* __nvJitLinkGetLinkedCubinSize = NULL + * cdef void* __nvJitLinkGetLinkedCubin = NULL + * cdef void* __nvJitLinkGetLinkedPtxSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetLinkedPtx = NULL + * cdef void* __nvJitLinkGetErrorLogSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtxSize = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":50 + * cdef void* __nvJitLinkGetLinkedCubin = NULL + * cdef void* __nvJitLinkGetLinkedPtxSize = NULL + * cdef void* __nvJitLinkGetLinkedPtx = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetErrorLogSize = NULL + * cdef void* __nvJitLinkGetErrorLog = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetLinkedPtx = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":51 + * cdef void* __nvJitLinkGetLinkedPtxSize = NULL + * cdef void* __nvJitLinkGetLinkedPtx = NULL + * cdef void* __nvJitLinkGetErrorLogSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetErrorLog = NULL + * cdef void* __nvJitLinkGetInfoLogSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLogSize = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":52 + * cdef void* __nvJitLinkGetLinkedPtx = NULL + * cdef void* __nvJitLinkGetErrorLogSize = NULL + * cdef void* __nvJitLinkGetErrorLog = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetInfoLogSize = NULL + * cdef void* __nvJitLinkGetInfoLog = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetErrorLog = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":53 + * cdef void* __nvJitLinkGetErrorLogSize = NULL + * cdef void* __nvJitLinkGetErrorLog = NULL + * cdef void* __nvJitLinkGetInfoLogSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkGetInfoLog = NULL + * cdef void* __nvJitLinkVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLogSize = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":54 + * cdef void* __nvJitLinkGetErrorLog = NULL + * cdef void* __nvJitLinkGetInfoLogSize = NULL + * cdef void* __nvJitLinkGetInfoLog = NULL # <<<<<<<<<<<<<< + * cdef void* __nvJitLinkVersion = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkGetInfoLog = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":55 + * cdef void* __nvJitLinkGetInfoLogSize = NULL + * cdef void* __nvJitLinkGetInfoLog = NULL + * cdef void* __nvJitLinkVersion = NULL # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_4cuda_8bindings_9_internal_9nvjitlink___nvJitLinkVersion = NULL; + + /* "cuda/bindings/_internal/nvjitlink.pyx":178 + * return __check_or_init_nvjitlink() + * + * cdef dict func_ptrs = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_9nvjitlink_func_ptrs, ((PyObject*)Py_None)); + __Pyx_GIVEREF(Py_None); + + /* "cuda/bindings/_internal/nvjitlink.pyx":181 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_9nvjitlink_1_inspect_function_pointers, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_nvjitlin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, __pyx_t_2) < (0)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":235 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_9nvjitlink_3_inspect_function_pointer, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_nvjitlin, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, __pyx_t_2) < (0)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvjitlink.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._internal.nvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._internal.nvjitlink"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 179 <= 65535 + const unsigned short n; +#elif 179 / 2 < INT_MAX + const unsigned int n; +#elif 179 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_FunctionNotFoundError, sizeof(__pyx_k_FunctionNotFoundError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FunctionNotFoundError */ + {__pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Lock */ + {__pyx_k_NotSupportedError, sizeof(__pyx_k_NotSupportedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NotSupportedError */ + {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuda_bindings__internal_nvjitlin, sizeof(__pyx_k_cuda_bindings__internal_nvjitlin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__internal_nvjitlin */ + {__pyx_k_cuda_bindings__internal_nvjitlin_2, sizeof(__pyx_k_cuda_bindings__internal_nvjitlin_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__internal_nvjitlin_2 */ + {__pyx_k_cuda_pathfinder, sizeof(__pyx_k_cuda_pathfinder), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_pathfinder */ + {__pyx_k_enter, sizeof(__pyx_k_enter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enter */ + {__pyx_k_exit, sizeof(__pyx_k_exit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_exit */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_function_nvJitLinkAddData_is_not, sizeof(__pyx_k_function_nvJitLinkAddData_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkAddData_is_not */ + {__pyx_k_function_nvJitLinkAddFile_is_not, sizeof(__pyx_k_function_nvJitLinkAddFile_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkAddFile_is_not */ + {__pyx_k_function_nvJitLinkComplete_is_no, sizeof(__pyx_k_function_nvJitLinkComplete_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkComplete_is_no */ + {__pyx_k_function_nvJitLinkCreate_is_not, sizeof(__pyx_k_function_nvJitLinkCreate_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkCreate_is_not */ + {__pyx_k_function_nvJitLinkDestroy_is_not, sizeof(__pyx_k_function_nvJitLinkDestroy_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkDestroy_is_not */ + {__pyx_k_function_nvJitLinkGetErrorLogSiz, sizeof(__pyx_k_function_nvJitLinkGetErrorLogSiz), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetErrorLogSiz */ + {__pyx_k_function_nvJitLinkGetErrorLog_is, sizeof(__pyx_k_function_nvJitLinkGetErrorLog_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetErrorLog_is */ + {__pyx_k_function_nvJitLinkGetInfoLogSize, sizeof(__pyx_k_function_nvJitLinkGetInfoLogSize), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetInfoLogSize */ + {__pyx_k_function_nvJitLinkGetInfoLog_is, sizeof(__pyx_k_function_nvJitLinkGetInfoLog_is), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetInfoLog_is */ + {__pyx_k_function_nvJitLinkGetLinkedCubin, sizeof(__pyx_k_function_nvJitLinkGetLinkedCubin), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetLinkedCubin */ + {__pyx_k_function_nvJitLinkGetLinkedCubin_2, sizeof(__pyx_k_function_nvJitLinkGetLinkedCubin_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetLinkedCubin_2 */ + {__pyx_k_function_nvJitLinkGetLinkedPtxSi, sizeof(__pyx_k_function_nvJitLinkGetLinkedPtxSi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetLinkedPtxSi */ + {__pyx_k_function_nvJitLinkGetLinkedPtx_i, sizeof(__pyx_k_function_nvJitLinkGetLinkedPtx_i), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkGetLinkedPtx_i */ + {__pyx_k_function_nvJitLinkVersion_is_not, sizeof(__pyx_k_function_nvJitLinkVersion_is_not), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvJitLinkVersion_is_not */ + {__pyx_k_handle_uint, sizeof(__pyx_k_handle_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_uint */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_inspect_function_pointer, sizeof(__pyx_k_inspect_function_pointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointer */ + {__pyx_k_inspect_function_pointers, sizeof(__pyx_k_inspect_function_pointers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointers */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_load_nvidia_dynamic_lib, sizeof(__pyx_k_load_nvidia_dynamic_lib), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_nvidia_dynamic_lib */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_nvJitLink, sizeof(__pyx_k_nvJitLink), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLink */ + {__pyx_k_nvJitLinkAddData, sizeof(__pyx_k_nvJitLinkAddData), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkAddData */ + {__pyx_k_nvJitLinkAddFile, sizeof(__pyx_k_nvJitLinkAddFile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkAddFile */ + {__pyx_k_nvJitLinkComplete, sizeof(__pyx_k_nvJitLinkComplete), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkComplete */ + {__pyx_k_nvJitLinkCreate, sizeof(__pyx_k_nvJitLinkCreate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkCreate */ + {__pyx_k_nvJitLinkDestroy, sizeof(__pyx_k_nvJitLinkDestroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkDestroy */ + {__pyx_k_nvJitLinkGetErrorLog, sizeof(__pyx_k_nvJitLinkGetErrorLog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetErrorLog */ + {__pyx_k_nvJitLinkGetErrorLogSize, sizeof(__pyx_k_nvJitLinkGetErrorLogSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetErrorLogSize */ + {__pyx_k_nvJitLinkGetInfoLog, sizeof(__pyx_k_nvJitLinkGetInfoLog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetInfoLog */ + {__pyx_k_nvJitLinkGetInfoLogSize, sizeof(__pyx_k_nvJitLinkGetInfoLogSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetInfoLogSize */ + {__pyx_k_nvJitLinkGetLinkedCubin, sizeof(__pyx_k_nvJitLinkGetLinkedCubin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetLinkedCubin */ + {__pyx_k_nvJitLinkGetLinkedCubinSize, sizeof(__pyx_k_nvJitLinkGetLinkedCubinSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetLinkedCubinSize */ + {__pyx_k_nvJitLinkGetLinkedPtx, sizeof(__pyx_k_nvJitLinkGetLinkedPtx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetLinkedPtx */ + {__pyx_k_nvJitLinkGetLinkedPtxSize, sizeof(__pyx_k_nvJitLinkGetLinkedPtxSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkGetLinkedPtxSize */ + {__pyx_k_nvJitLinkVersion, sizeof(__pyx_k_nvJitLinkVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkVersion */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_threading, sizeof(__pyx_k_threading), 0, 1, 1}, /* PyObject cname: __pyx_n_u_threading */ + {__pyx_k_utils, sizeof(__pyx_k_utils), 0, 1, 1}, /* PyObject cname: __pyx_n_u_utils */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_internal/nvjitlink.pyx":68 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvJitLinkCreate +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 1; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 1; + unsigned int flags : 10; + unsigned int first_line : 8; + unsigned int line_table_length : 13; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 181, 249}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_nvjitlin_2, __pyx_mstate->__pyx_n_u_inspect_function_pointers, __pyx_k_z_q_A_Q_1_1_1_A_Ja_A_j_1_Zq_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 235, 31}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_nvjitlin_2, __pyx_mstate->__pyx_n_u_inspect_function_pointer, __pyx_k_z_A_a_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..6a4d6fc26b267af7551f7b93610db3cb7452af1c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..85d7c843a683be495c39c3222b0cfe804f6aeb4a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pxd @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from ..cynvjitlink cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pyx new file mode 100644 index 0000000000000000000000000000000000000000..076df1c54456fdc22bb0d9c2a76fca2de2adfdd6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink.pyx @@ -0,0 +1,383 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvjitlink_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __nvJitLinkCreate = NULL +cdef void* __nvJitLinkDestroy = NULL +cdef void* __nvJitLinkAddData = NULL +cdef void* __nvJitLinkAddFile = NULL +cdef void* __nvJitLinkComplete = NULL +cdef void* __nvJitLinkGetLinkedCubinSize = NULL +cdef void* __nvJitLinkGetLinkedCubin = NULL +cdef void* __nvJitLinkGetLinkedPtxSize = NULL +cdef void* __nvJitLinkGetLinkedPtx = NULL +cdef void* __nvJitLinkGetErrorLogSize = NULL +cdef void* __nvJitLinkGetErrorLog = NULL +cdef void* __nvJitLinkGetInfoLogSize = NULL +cdef void* __nvJitLinkGetInfoLog = NULL +cdef void* __nvJitLinkVersion = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + return handle + + +cdef int __check_or_init_nvjitlink() except -1 nogil: + global __py_nvjitlink_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __nvJitLinkCreate + __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + if __nvJitLinkCreate == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') + + global __nvJitLinkDestroy + __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + if __nvJitLinkDestroy == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') + + global __nvJitLinkAddData + __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + if __nvJitLinkAddData == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') + + global __nvJitLinkAddFile + __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + if __nvJitLinkAddFile == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') + + global __nvJitLinkComplete + __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + if __nvJitLinkComplete == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') + + global __nvJitLinkGetLinkedCubinSize + __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + if __nvJitLinkGetLinkedCubinSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') + + global __nvJitLinkGetLinkedCubin + __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + if __nvJitLinkGetLinkedCubin == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') + + global __nvJitLinkGetLinkedPtxSize + __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + if __nvJitLinkGetLinkedPtxSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') + + global __nvJitLinkGetLinkedPtx + __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + if __nvJitLinkGetLinkedPtx == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') + + global __nvJitLinkGetErrorLogSize + __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + if __nvJitLinkGetErrorLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') + + global __nvJitLinkGetErrorLog + __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + if __nvJitLinkGetErrorLog == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') + + global __nvJitLinkGetInfoLogSize + __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + if __nvJitLinkGetInfoLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') + + global __nvJitLinkGetInfoLog + __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + if __nvJitLinkGetInfoLog == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') + + global __nvJitLinkVersion + __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + if __nvJitLinkVersion == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') + + __py_nvjitlink_init = True + return 0 + + +cdef inline int _check_or_init_nvjitlink() except -1 nogil: + if __py_nvjitlink_init: + return 0 + + return __check_or_init_nvjitlink() + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvjitlink() + cdef dict data = {} + + global __nvJitLinkCreate + data["__nvJitLinkCreate"] = __nvJitLinkCreate + + global __nvJitLinkDestroy + data["__nvJitLinkDestroy"] = __nvJitLinkDestroy + + global __nvJitLinkAddData + data["__nvJitLinkAddData"] = __nvJitLinkAddData + + global __nvJitLinkAddFile + data["__nvJitLinkAddFile"] = __nvJitLinkAddFile + + global __nvJitLinkComplete + data["__nvJitLinkComplete"] = __nvJitLinkComplete + + global __nvJitLinkGetLinkedCubinSize + data["__nvJitLinkGetLinkedCubinSize"] = __nvJitLinkGetLinkedCubinSize + + global __nvJitLinkGetLinkedCubin + data["__nvJitLinkGetLinkedCubin"] = __nvJitLinkGetLinkedCubin + + global __nvJitLinkGetLinkedPtxSize + data["__nvJitLinkGetLinkedPtxSize"] = __nvJitLinkGetLinkedPtxSize + + global __nvJitLinkGetLinkedPtx + data["__nvJitLinkGetLinkedPtx"] = __nvJitLinkGetLinkedPtx + + global __nvJitLinkGetErrorLogSize + data["__nvJitLinkGetErrorLogSize"] = __nvJitLinkGetErrorLogSize + + global __nvJitLinkGetErrorLog + data["__nvJitLinkGetErrorLog"] = __nvJitLinkGetErrorLog + + global __nvJitLinkGetInfoLogSize + data["__nvJitLinkGetInfoLogSize"] = __nvJitLinkGetInfoLogSize + + global __nvJitLinkGetInfoLog + data["__nvJitLinkGetInfoLog"] = __nvJitLinkGetInfoLog + + global __nvJitLinkVersion + data["__nvJitLinkVersion"] = __nvJitLinkVersion + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkCreate + _check_or_init_nvjitlink() + if __nvJitLinkCreate == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkCreate is not found") + return (__nvJitLinkCreate)( + handle, numOptions, options) + + +cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkDestroy + _check_or_init_nvjitlink() + if __nvJitLinkDestroy == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + return (__nvJitLinkDestroy)( + handle) + + +cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddData + _check_or_init_nvjitlink() + if __nvJitLinkAddData == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddData is not found") + return (__nvJitLinkAddData)( + handle, inputType, data, size, name) + + +cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddFile + _check_or_init_nvjitlink() + if __nvJitLinkAddFile == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + return (__nvJitLinkAddFile)( + handle, inputType, fileName) + + +cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkComplete + _check_or_init_nvjitlink() + if __nvJitLinkComplete == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkComplete is not found") + return (__nvJitLinkComplete)( + handle) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubinSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubinSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + return (__nvJitLinkGetLinkedCubinSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubin + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubin == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + return (__nvJitLinkGetLinkedCubin)( + handle, cubin) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtxSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtxSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + return (__nvJitLinkGetLinkedPtxSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtx + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtx == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + return (__nvJitLinkGetLinkedPtx)( + handle, ptx) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + return (__nvJitLinkGetErrorLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLog + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + return (__nvJitLinkGetErrorLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + return (__nvJitLinkGetInfoLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLog + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + return (__nvJitLinkGetInfoLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkVersion + _check_or_init_nvjitlink() + if __nvJitLinkVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkVersion is not found") + return (__nvJitLinkVersion)( + major, minor) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_linux.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_linux.pyx new file mode 100644 index 0000000000000000000000000000000000000000..076df1c54456fdc22bb0d9c2a76fca2de2adfdd6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -0,0 +1,383 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvjitlink_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __nvJitLinkCreate = NULL +cdef void* __nvJitLinkDestroy = NULL +cdef void* __nvJitLinkAddData = NULL +cdef void* __nvJitLinkAddFile = NULL +cdef void* __nvJitLinkComplete = NULL +cdef void* __nvJitLinkGetLinkedCubinSize = NULL +cdef void* __nvJitLinkGetLinkedCubin = NULL +cdef void* __nvJitLinkGetLinkedPtxSize = NULL +cdef void* __nvJitLinkGetLinkedPtx = NULL +cdef void* __nvJitLinkGetErrorLogSize = NULL +cdef void* __nvJitLinkGetErrorLog = NULL +cdef void* __nvJitLinkGetInfoLogSize = NULL +cdef void* __nvJitLinkGetInfoLog = NULL +cdef void* __nvJitLinkVersion = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + return handle + + +cdef int __check_or_init_nvjitlink() except -1 nogil: + global __py_nvjitlink_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __nvJitLinkCreate + __nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate') + if __nvJitLinkCreate == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkCreate = dlsym(handle, 'nvJitLinkCreate') + + global __nvJitLinkDestroy + __nvJitLinkDestroy = dlsym(RTLD_DEFAULT, 'nvJitLinkDestroy') + if __nvJitLinkDestroy == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkDestroy = dlsym(handle, 'nvJitLinkDestroy') + + global __nvJitLinkAddData + __nvJitLinkAddData = dlsym(RTLD_DEFAULT, 'nvJitLinkAddData') + if __nvJitLinkAddData == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkAddData = dlsym(handle, 'nvJitLinkAddData') + + global __nvJitLinkAddFile + __nvJitLinkAddFile = dlsym(RTLD_DEFAULT, 'nvJitLinkAddFile') + if __nvJitLinkAddFile == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkAddFile = dlsym(handle, 'nvJitLinkAddFile') + + global __nvJitLinkComplete + __nvJitLinkComplete = dlsym(RTLD_DEFAULT, 'nvJitLinkComplete') + if __nvJitLinkComplete == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkComplete = dlsym(handle, 'nvJitLinkComplete') + + global __nvJitLinkGetLinkedCubinSize + __nvJitLinkGetLinkedCubinSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubinSize') + if __nvJitLinkGetLinkedCubinSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedCubinSize = dlsym(handle, 'nvJitLinkGetLinkedCubinSize') + + global __nvJitLinkGetLinkedCubin + __nvJitLinkGetLinkedCubin = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedCubin') + if __nvJitLinkGetLinkedCubin == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedCubin = dlsym(handle, 'nvJitLinkGetLinkedCubin') + + global __nvJitLinkGetLinkedPtxSize + __nvJitLinkGetLinkedPtxSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtxSize') + if __nvJitLinkGetLinkedPtxSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedPtxSize = dlsym(handle, 'nvJitLinkGetLinkedPtxSize') + + global __nvJitLinkGetLinkedPtx + __nvJitLinkGetLinkedPtx = dlsym(RTLD_DEFAULT, 'nvJitLinkGetLinkedPtx') + if __nvJitLinkGetLinkedPtx == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetLinkedPtx = dlsym(handle, 'nvJitLinkGetLinkedPtx') + + global __nvJitLinkGetErrorLogSize + __nvJitLinkGetErrorLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLogSize') + if __nvJitLinkGetErrorLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetErrorLogSize = dlsym(handle, 'nvJitLinkGetErrorLogSize') + + global __nvJitLinkGetErrorLog + __nvJitLinkGetErrorLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetErrorLog') + if __nvJitLinkGetErrorLog == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetErrorLog = dlsym(handle, 'nvJitLinkGetErrorLog') + + global __nvJitLinkGetInfoLogSize + __nvJitLinkGetInfoLogSize = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLogSize') + if __nvJitLinkGetInfoLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetInfoLogSize = dlsym(handle, 'nvJitLinkGetInfoLogSize') + + global __nvJitLinkGetInfoLog + __nvJitLinkGetInfoLog = dlsym(RTLD_DEFAULT, 'nvJitLinkGetInfoLog') + if __nvJitLinkGetInfoLog == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkGetInfoLog = dlsym(handle, 'nvJitLinkGetInfoLog') + + global __nvJitLinkVersion + __nvJitLinkVersion = dlsym(RTLD_DEFAULT, 'nvJitLinkVersion') + if __nvJitLinkVersion == NULL: + if handle == NULL: + handle = load_library() + __nvJitLinkVersion = dlsym(handle, 'nvJitLinkVersion') + + __py_nvjitlink_init = True + return 0 + + +cdef inline int _check_or_init_nvjitlink() except -1 nogil: + if __py_nvjitlink_init: + return 0 + + return __check_or_init_nvjitlink() + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvjitlink() + cdef dict data = {} + + global __nvJitLinkCreate + data["__nvJitLinkCreate"] = __nvJitLinkCreate + + global __nvJitLinkDestroy + data["__nvJitLinkDestroy"] = __nvJitLinkDestroy + + global __nvJitLinkAddData + data["__nvJitLinkAddData"] = __nvJitLinkAddData + + global __nvJitLinkAddFile + data["__nvJitLinkAddFile"] = __nvJitLinkAddFile + + global __nvJitLinkComplete + data["__nvJitLinkComplete"] = __nvJitLinkComplete + + global __nvJitLinkGetLinkedCubinSize + data["__nvJitLinkGetLinkedCubinSize"] = __nvJitLinkGetLinkedCubinSize + + global __nvJitLinkGetLinkedCubin + data["__nvJitLinkGetLinkedCubin"] = __nvJitLinkGetLinkedCubin + + global __nvJitLinkGetLinkedPtxSize + data["__nvJitLinkGetLinkedPtxSize"] = __nvJitLinkGetLinkedPtxSize + + global __nvJitLinkGetLinkedPtx + data["__nvJitLinkGetLinkedPtx"] = __nvJitLinkGetLinkedPtx + + global __nvJitLinkGetErrorLogSize + data["__nvJitLinkGetErrorLogSize"] = __nvJitLinkGetErrorLogSize + + global __nvJitLinkGetErrorLog + data["__nvJitLinkGetErrorLog"] = __nvJitLinkGetErrorLog + + global __nvJitLinkGetInfoLogSize + data["__nvJitLinkGetInfoLogSize"] = __nvJitLinkGetInfoLogSize + + global __nvJitLinkGetInfoLog + data["__nvJitLinkGetInfoLog"] = __nvJitLinkGetInfoLog + + global __nvJitLinkVersion + data["__nvJitLinkVersion"] = __nvJitLinkVersion + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkCreate + _check_or_init_nvjitlink() + if __nvJitLinkCreate == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkCreate is not found") + return (__nvJitLinkCreate)( + handle, numOptions, options) + + +cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkDestroy + _check_or_init_nvjitlink() + if __nvJitLinkDestroy == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + return (__nvJitLinkDestroy)( + handle) + + +cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddData + _check_or_init_nvjitlink() + if __nvJitLinkAddData == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddData is not found") + return (__nvJitLinkAddData)( + handle, inputType, data, size, name) + + +cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddFile + _check_or_init_nvjitlink() + if __nvJitLinkAddFile == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + return (__nvJitLinkAddFile)( + handle, inputType, fileName) + + +cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkComplete + _check_or_init_nvjitlink() + if __nvJitLinkComplete == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkComplete is not found") + return (__nvJitLinkComplete)( + handle) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubinSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubinSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + return (__nvJitLinkGetLinkedCubinSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubin + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubin == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + return (__nvJitLinkGetLinkedCubin)( + handle, cubin) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtxSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtxSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + return (__nvJitLinkGetLinkedPtxSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtx + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtx == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + return (__nvJitLinkGetLinkedPtx)( + handle, ptx) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + return (__nvJitLinkGetErrorLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLog + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + return (__nvJitLinkGetErrorLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + return (__nvJitLinkGetInfoLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLog + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + return (__nvJitLinkGetInfoLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkVersion + _check_or_init_nvjitlink() + if __nvJitLinkVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkVersion is not found") + return (__nvJitLinkVersion)( + major, minor) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_windows.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_windows.pyx new file mode 100644 index 0000000000000000000000000000000000000000..1ad0def5ab442ec7e005dd42a9b7862dc5f48280 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -0,0 +1,362 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + +from libc.stddef cimport wchar_t +from libc.stdint cimport uintptr_t +from cpython cimport PyUnicode_AsWideCharString, PyMem_Free + +from .utils import NotSupportedError + +cdef extern from "windows.h" nogil: + ctypedef void* HMODULE + ctypedef void* HANDLE + ctypedef void* FARPROC + ctypedef unsigned long DWORD + ctypedef const wchar_t *LPCWSTR + ctypedef const char *LPCSTR + + cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + cdef DWORD LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000 + cdef DWORD LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x00000100 + + HMODULE _LoadLibraryExW "LoadLibraryExW"( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ) + + FARPROC _GetProcAddress "GetProcAddress"(HMODULE hModule, LPCSTR lpProcName) + +cdef inline uintptr_t LoadLibraryExW(str path, HANDLE hFile, DWORD dwFlags): + cdef uintptr_t result + cdef wchar_t* wpath = PyUnicode_AsWideCharString(path, NULL) + with nogil: + result = _LoadLibraryExW( + wpath, + hFile, + dwFlags + ) + PyMem_Free(wpath) + return result + +cdef inline void *GetProcAddress(uintptr_t hModule, const char* lpProcName) nogil: + return _GetProcAddress(hModule, lpProcName) + +cdef int get_cuda_version(): + cdef int err, driver_ver = 0 + + # Load driver to check version + handle = LoadLibraryExW("nvcuda.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32) + if handle == 0: + raise NotSupportedError('CUDA driver is not found') + cuDriverGetVersion = GetProcAddress(handle, 'cuDriverGetVersion') + if cuDriverGetVersion == NULL: + raise RuntimeError('something went wrong') + err = (cuDriverGetVersion)(&driver_ver) + if err != 0: + raise RuntimeError('something went wrong') + + return driver_ver + + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvjitlink_init = False + +cdef void* __nvJitLinkCreate = NULL +cdef void* __nvJitLinkDestroy = NULL +cdef void* __nvJitLinkAddData = NULL +cdef void* __nvJitLinkAddFile = NULL +cdef void* __nvJitLinkComplete = NULL +cdef void* __nvJitLinkGetLinkedCubinSize = NULL +cdef void* __nvJitLinkGetLinkedCubin = NULL +cdef void* __nvJitLinkGetLinkedPtxSize = NULL +cdef void* __nvJitLinkGetLinkedPtx = NULL +cdef void* __nvJitLinkGetErrorLogSize = NULL +cdef void* __nvJitLinkGetErrorLog = NULL +cdef void* __nvJitLinkGetInfoLogSize = NULL +cdef void* __nvJitLinkGetInfoLog = NULL +cdef void* __nvJitLinkVersion = NULL + + +cdef int __check_or_init_nvjitlink() except -1 nogil: + global __py_nvjitlink_init + + with gil, __symbol_lock: + # Load library + handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint + + # Load function + global __nvJitLinkCreate + __nvJitLinkCreate = GetProcAddress(handle, 'nvJitLinkCreate') + + global __nvJitLinkDestroy + __nvJitLinkDestroy = GetProcAddress(handle, 'nvJitLinkDestroy') + + global __nvJitLinkAddData + __nvJitLinkAddData = GetProcAddress(handle, 'nvJitLinkAddData') + + global __nvJitLinkAddFile + __nvJitLinkAddFile = GetProcAddress(handle, 'nvJitLinkAddFile') + + global __nvJitLinkComplete + __nvJitLinkComplete = GetProcAddress(handle, 'nvJitLinkComplete') + + global __nvJitLinkGetLinkedCubinSize + __nvJitLinkGetLinkedCubinSize = GetProcAddress(handle, 'nvJitLinkGetLinkedCubinSize') + + global __nvJitLinkGetLinkedCubin + __nvJitLinkGetLinkedCubin = GetProcAddress(handle, 'nvJitLinkGetLinkedCubin') + + global __nvJitLinkGetLinkedPtxSize + __nvJitLinkGetLinkedPtxSize = GetProcAddress(handle, 'nvJitLinkGetLinkedPtxSize') + + global __nvJitLinkGetLinkedPtx + __nvJitLinkGetLinkedPtx = GetProcAddress(handle, 'nvJitLinkGetLinkedPtx') + + global __nvJitLinkGetErrorLogSize + __nvJitLinkGetErrorLogSize = GetProcAddress(handle, 'nvJitLinkGetErrorLogSize') + + global __nvJitLinkGetErrorLog + __nvJitLinkGetErrorLog = GetProcAddress(handle, 'nvJitLinkGetErrorLog') + + global __nvJitLinkGetInfoLogSize + __nvJitLinkGetInfoLogSize = GetProcAddress(handle, 'nvJitLinkGetInfoLogSize') + + global __nvJitLinkGetInfoLog + __nvJitLinkGetInfoLog = GetProcAddress(handle, 'nvJitLinkGetInfoLog') + + global __nvJitLinkVersion + __nvJitLinkVersion = GetProcAddress(handle, 'nvJitLinkVersion') + + __py_nvjitlink_init = True + return 0 + + +cdef inline int _check_or_init_nvjitlink() except -1 nogil: + if __py_nvjitlink_init: + return 0 + + return __check_or_init_nvjitlink() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvjitlink() + cdef dict data = {} + + global __nvJitLinkCreate + data["__nvJitLinkCreate"] = __nvJitLinkCreate + + global __nvJitLinkDestroy + data["__nvJitLinkDestroy"] = __nvJitLinkDestroy + + global __nvJitLinkAddData + data["__nvJitLinkAddData"] = __nvJitLinkAddData + + global __nvJitLinkAddFile + data["__nvJitLinkAddFile"] = __nvJitLinkAddFile + + global __nvJitLinkComplete + data["__nvJitLinkComplete"] = __nvJitLinkComplete + + global __nvJitLinkGetLinkedCubinSize + data["__nvJitLinkGetLinkedCubinSize"] = __nvJitLinkGetLinkedCubinSize + + global __nvJitLinkGetLinkedCubin + data["__nvJitLinkGetLinkedCubin"] = __nvJitLinkGetLinkedCubin + + global __nvJitLinkGetLinkedPtxSize + data["__nvJitLinkGetLinkedPtxSize"] = __nvJitLinkGetLinkedPtxSize + + global __nvJitLinkGetLinkedPtx + data["__nvJitLinkGetLinkedPtx"] = __nvJitLinkGetLinkedPtx + + global __nvJitLinkGetErrorLogSize + data["__nvJitLinkGetErrorLogSize"] = __nvJitLinkGetErrorLogSize + + global __nvJitLinkGetErrorLog + data["__nvJitLinkGetErrorLog"] = __nvJitLinkGetErrorLog + + global __nvJitLinkGetInfoLogSize + data["__nvJitLinkGetInfoLogSize"] = __nvJitLinkGetInfoLogSize + + global __nvJitLinkGetInfoLog + data["__nvJitLinkGetInfoLog"] = __nvJitLinkGetInfoLog + + global __nvJitLinkVersion + data["__nvJitLinkVersion"] = __nvJitLinkVersion + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult _nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkCreate + _check_or_init_nvjitlink() + if __nvJitLinkCreate == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkCreate is not found") + return (__nvJitLinkCreate)( + handle, numOptions, options) + + +cdef nvJitLinkResult _nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkDestroy + _check_or_init_nvjitlink() + if __nvJitLinkDestroy == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkDestroy is not found") + return (__nvJitLinkDestroy)( + handle) + + +cdef nvJitLinkResult _nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddData + _check_or_init_nvjitlink() + if __nvJitLinkAddData == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddData is not found") + return (__nvJitLinkAddData)( + handle, inputType, data, size, name) + + +cdef nvJitLinkResult _nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkAddFile + _check_or_init_nvjitlink() + if __nvJitLinkAddFile == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkAddFile is not found") + return (__nvJitLinkAddFile)( + handle, inputType, fileName) + + +cdef nvJitLinkResult _nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkComplete + _check_or_init_nvjitlink() + if __nvJitLinkComplete == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkComplete is not found") + return (__nvJitLinkComplete)( + handle) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubinSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubinSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubinSize is not found") + return (__nvJitLinkGetLinkedCubinSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedCubin + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedCubin == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedCubin is not found") + return (__nvJitLinkGetLinkedCubin)( + handle, cubin) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtxSize + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtxSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtxSize is not found") + return (__nvJitLinkGetLinkedPtxSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetLinkedPtx + _check_or_init_nvjitlink() + if __nvJitLinkGetLinkedPtx == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetLinkedPtx is not found") + return (__nvJitLinkGetLinkedPtx)( + handle, ptx) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLogSize is not found") + return (__nvJitLinkGetErrorLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetErrorLog + _check_or_init_nvjitlink() + if __nvJitLinkGetErrorLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetErrorLog is not found") + return (__nvJitLinkGetErrorLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLogSize + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLogSize is not found") + return (__nvJitLinkGetInfoLogSize)( + handle, size) + + +cdef nvJitLinkResult _nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkGetInfoLog + _check_or_init_nvjitlink() + if __nvJitLinkGetInfoLog == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkGetInfoLog is not found") + return (__nvJitLinkGetInfoLog)( + handle, log) + + +cdef nvJitLinkResult _nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvJitLinkVersion + _check_or_init_nvjitlink() + if __nvJitLinkVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvJitLinkVersion is not found") + return (__nvJitLinkVersion)( + major, minor) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b64529a31cc80ca5b76602264d7bb08202b30b0f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpp @@ -0,0 +1,13295 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._internal.nvvm", + "sources": [ + "cuda/bindings/_internal/nvvm.pyx" + ] + }, + "module_name": "cuda.bindings._internal.nvvm" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___internal__nvvm +#define __PYX_HAVE_API__cuda__bindings___internal__nvvm +/* Early includes */ +#include +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_internal/nvvm.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cynvvm.pxd":13 + * + * # enums + * ctypedef enum nvvmResult "nvvmResult": # <<<<<<<<<<<<<< + * NVVM_SUCCESS "NVVM_SUCCESS" = 0 + * NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 +*/ +enum nvvmResult { + NVVM_SUCCESS = 0, + NVVM_ERROR_OUT_OF_MEMORY = 1, + NVVM_ERROR_PROGRAM_CREATION_FAILURE = 2, + NVVM_ERROR_IR_VERSION_MISMATCH = 3, + NVVM_ERROR_INVALID_INPUT = 4, + NVVM_ERROR_INVALID_PROGRAM = 5, + NVVM_ERROR_INVALID_IR = 6, + NVVM_ERROR_INVALID_OPTION = 7, + NVVM_ERROR_NO_MODULE_IN_PROGRAM = 8, + NVVM_ERROR_COMPILATION = 9, + NVVM_ERROR_CANCELLED = 10, + _NVVMRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvvmResult nvvmResult; + +/* "cynvvm.pxd":29 + * + * # types + * ctypedef void* nvvmProgram 'nvvmProgram' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvvmProgram; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* IncludeStringH.proto */ +#include + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_string.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* BuildPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto */ +#include + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "cuda.bindings.cynvvm" */ + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings._internal.nvvm" */ +static PyObject *__pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock = 0; +static int __pyx_v_4cuda_8bindings_9_internal_4nvvm___py_nvvm_init; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___cuDriverGetVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize; +static void *__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog; +static PyObject *__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs = 0; +static void *__pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(void); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_internal_4nvvm___check_or_init_nvvm(void); /*proto*/ +static int __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(void); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointer(PyObject *, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._internal.nvvm" +extern int __pyx_module_is_main_cuda__bindings___internal__nvvm; +int __pyx_module_is_main_cuda__bindings___internal__nvvm = 0; + +/* Implementation of "cuda.bindings._internal.nvvm" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_RuntimeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = ")"; +static const char __pyx_k__2[] = "."; +static const char __pyx_k__3[] = "?"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_Lock[] = "Lock"; +static const char __pyx_k_exit[] = "__exit__"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_nvvm[] = "nvvm"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_enter[] = "__enter__"; +static const char __pyx_k_utils[] = "utils"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_add_note[] = "add_note"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_threading[] = "threading"; +static const char __pyx_k_z_A_a_9AQ[] = "\200\001\330\004\005\330\004\007\200z\220\023\220A\330\010\024\320\024.\250a\330\004\013\2109\220A\220Q"; +static const char __pyx_k_handle_uint[] = "_handle_uint"; +static const char __pyx_k_nvvmVersion[] = "__nvvmVersion"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_nvvmIRVersion[] = "__nvvmIRVersion"; +static const char __pyx_k_cuda_pathfinder[] = "cuda.pathfinder"; +static const char __pyx_k_NotSupportedError[] = "NotSupportedError"; +static const char __pyx_k_nvvmCreateProgram[] = "__nvvmCreateProgram"; +static const char __pyx_k_nvvmGetProgramLog[] = "__nvvmGetProgramLog"; +static const char __pyx_k_nvvmVerifyProgram[] = "__nvvmVerifyProgram"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_nvvmCompileProgram[] = "__nvvmCompileProgram"; +static const char __pyx_k_nvvmDestroyProgram[] = "__nvvmDestroyProgram"; +static const char __pyx_k_nvvmGetErrorString[] = "__nvvmGetErrorString"; +static const char __pyx_k_FunctionNotFoundError[] = "FunctionNotFoundError"; +static const char __pyx_k_nvvmGetCompiledResult[] = "__nvvmGetCompiledResult"; +static const char __pyx_k_nvvmGetProgramLogSize[] = "__nvvmGetProgramLogSize"; +static const char __pyx_k_nvvmAddModuleToProgram[] = "__nvvmAddModuleToProgram"; +static const char __pyx_k_load_nvidia_dynamic_lib[] = "load_nvidia_dynamic_lib"; +static const char __pyx_k_CUDA_driver_is_not_found[] = "CUDA driver is not found ("; +static const char __pyx_k_inspect_function_pointer[] = "_inspect_function_pointer"; +static const char __pyx_k_inspect_function_pointers[] = "_inspect_function_pointers"; +static const char __pyx_k_nvvmGetCompiledResultSize[] = "__nvvmGetCompiledResultSize"; +static const char __pyx_k_nvvmLazyAddModuleToProgram[] = "__nvvmLazyAddModuleToProgram"; +static const char __pyx_k_cuda_bindings__internal_nvvm[] = "cuda.bindings._internal.nvvm"; +static const char __pyx_k_z_q_q_Q_Q_Ja_j_A_Q_z_Q_Q_A_A_j[] = "\200\001\330\004\005\330\004\007\200z\220\027\230\001\330\010\017\210q\340\004\027\220q\330\004\025\220Q\340\004\005\330\004\010\210\001\320\t#\240:\250Q\340\004\005\330\004\010\210\001\320\t\034\230J\240a\340\004\005\330\004\010\210\001\320\t\036\230j\250\001\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\005\330\004\010\210\001\320\t#\240:\250Q\340\004\005\330\004\010\210\001\320\t'\240z\260\021\340\004\005\330\004\010\210\001\320\t+\250:\260Q\340\004\005\330\004\010\210\001\320\t#\240:\250Q\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\005\330\004\010\210\001\320\t*\250*\260A\340\004\005\330\004\010\210\001\320\t&\240j\260\001\340\004\005\330\004\010\210\001\320\t&\240j\260\001\340\004\005\330\004\010\210\001\320\t\"\240*\250A\340\004\020\220\001\330\004\013\2101"; +static const char __pyx_k_Did_not_find_cuDriverGetVersion[] = "Did not find cuDriverGetVersion symbol in libcuda.so.1"; +static const char __pyx_k_function_nvvmAddModuleToProgram[] = "function nvvmAddModuleToProgram is not found"; +static const char __pyx_k_Note_that_Cython_is_deliberately[] = "Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False."; +static const char __pyx_k_cuDriverGetVersion_returned_erro[] = "cuDriverGetVersion returned error code "; +static const char __pyx_k_cuda_bindings__internal_nvvm_pyx[] = "cuda/bindings/_internal/nvvm.pyx"; +static const char __pyx_k_function_nvvmCompileProgram_is_n[] = "function nvvmCompileProgram is not found"; +static const char __pyx_k_function_nvvmCreateProgram_is_no[] = "function nvvmCreateProgram is not found"; +static const char __pyx_k_function_nvvmDestroyProgram_is_n[] = "function nvvmDestroyProgram is not found"; +static const char __pyx_k_function_nvvmGetCompiledResultSi[] = "function nvvmGetCompiledResultSize is not found"; +static const char __pyx_k_function_nvvmGetCompiledResult_i[] = "function nvvmGetCompiledResult is not found"; +static const char __pyx_k_function_nvvmGetErrorString_is_n[] = "function nvvmGetErrorString is not found"; +static const char __pyx_k_function_nvvmGetProgramLogSize_i[] = "function nvvmGetProgramLogSize is not found"; +static const char __pyx_k_function_nvvmGetProgramLog_is_no[] = "function nvvmGetProgramLog is not found"; +static const char __pyx_k_function_nvvmIRVersion_is_not_fo[] = "function nvvmIRVersion is not found"; +static const char __pyx_k_function_nvvmLazyAddModuleToProg[] = "function nvvmLazyAddModuleToProgram is not found"; +static const char __pyx_k_function_nvvmVerifyProgram_is_no[] = "function nvvmVerifyProgram is not found"; +static const char __pyx_k_function_nvvmVersion_is_not_foun[] = "function nvvmVersion is not found"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_4nvvm_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[2]; + PyObject *__pyx_string_tab[64]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_CUDA_driver_is_not_found __pyx_string_tab[1] +#define __pyx_kp_u_Did_not_find_cuDriverGetVersion __pyx_string_tab[2] +#define __pyx_n_u_FunctionNotFoundError __pyx_string_tab[3] +#define __pyx_n_u_Lock __pyx_string_tab[4] +#define __pyx_n_u_NotSupportedError __pyx_string_tab[5] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[6] +#define __pyx_n_u_RuntimeError __pyx_string_tab[7] +#define __pyx_kp_u__2 __pyx_string_tab[8] +#define __pyx_kp_u__3 __pyx_string_tab[9] +#define __pyx_kp_u_add_note __pyx_string_tab[10] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[11] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[12] +#define __pyx_kp_u_cuDriverGetVersion_returned_erro __pyx_string_tab[13] +#define __pyx_n_u_cuda_bindings__internal_nvvm __pyx_string_tab[14] +#define __pyx_kp_u_cuda_bindings__internal_nvvm_pyx __pyx_string_tab[15] +#define __pyx_n_u_cuda_pathfinder __pyx_string_tab[16] +#define __pyx_n_u_enter __pyx_string_tab[17] +#define __pyx_n_u_exit __pyx_string_tab[18] +#define __pyx_n_u_func __pyx_string_tab[19] +#define __pyx_kp_u_function_nvvmAddModuleToProgram __pyx_string_tab[20] +#define __pyx_kp_u_function_nvvmCompileProgram_is_n __pyx_string_tab[21] +#define __pyx_kp_u_function_nvvmCreateProgram_is_no __pyx_string_tab[22] +#define __pyx_kp_u_function_nvvmDestroyProgram_is_n __pyx_string_tab[23] +#define __pyx_kp_u_function_nvvmGetCompiledResultSi __pyx_string_tab[24] +#define __pyx_kp_u_function_nvvmGetCompiledResult_i __pyx_string_tab[25] +#define __pyx_kp_u_function_nvvmGetErrorString_is_n __pyx_string_tab[26] +#define __pyx_kp_u_function_nvvmGetProgramLogSize_i __pyx_string_tab[27] +#define __pyx_kp_u_function_nvvmGetProgramLog_is_no __pyx_string_tab[28] +#define __pyx_kp_u_function_nvvmIRVersion_is_not_fo __pyx_string_tab[29] +#define __pyx_kp_u_function_nvvmLazyAddModuleToProg __pyx_string_tab[30] +#define __pyx_kp_u_function_nvvmVerifyProgram_is_no __pyx_string_tab[31] +#define __pyx_kp_u_function_nvvmVersion_is_not_foun __pyx_string_tab[32] +#define __pyx_n_u_handle_uint __pyx_string_tab[33] +#define __pyx_n_u_initializing __pyx_string_tab[34] +#define __pyx_n_u_inspect_function_pointer __pyx_string_tab[35] +#define __pyx_n_u_inspect_function_pointers __pyx_string_tab[36] +#define __pyx_n_u_is_coroutine __pyx_string_tab[37] +#define __pyx_n_u_load_nvidia_dynamic_lib __pyx_string_tab[38] +#define __pyx_n_u_main __pyx_string_tab[39] +#define __pyx_n_u_module __pyx_string_tab[40] +#define __pyx_n_u_name __pyx_string_tab[41] +#define __pyx_n_u_name_2 __pyx_string_tab[42] +#define __pyx_n_u_nvvm __pyx_string_tab[43] +#define __pyx_n_u_nvvmAddModuleToProgram __pyx_string_tab[44] +#define __pyx_n_u_nvvmCompileProgram __pyx_string_tab[45] +#define __pyx_n_u_nvvmCreateProgram __pyx_string_tab[46] +#define __pyx_n_u_nvvmDestroyProgram __pyx_string_tab[47] +#define __pyx_n_u_nvvmGetCompiledResult __pyx_string_tab[48] +#define __pyx_n_u_nvvmGetCompiledResultSize __pyx_string_tab[49] +#define __pyx_n_u_nvvmGetErrorString __pyx_string_tab[50] +#define __pyx_n_u_nvvmGetProgramLog __pyx_string_tab[51] +#define __pyx_n_u_nvvmGetProgramLogSize __pyx_string_tab[52] +#define __pyx_n_u_nvvmIRVersion __pyx_string_tab[53] +#define __pyx_n_u_nvvmLazyAddModuleToProgram __pyx_string_tab[54] +#define __pyx_n_u_nvvmVerifyProgram __pyx_string_tab[55] +#define __pyx_n_u_nvvmVersion __pyx_string_tab[56] +#define __pyx_n_u_pop __pyx_string_tab[57] +#define __pyx_n_u_qualname __pyx_string_tab[58] +#define __pyx_n_u_set_name __pyx_string_tab[59] +#define __pyx_n_u_spec __pyx_string_tab[60] +#define __pyx_n_u_test __pyx_string_tab[61] +#define __pyx_n_u_threading __pyx_string_tab[62] +#define __pyx_n_u_utils __pyx_string_tab[63] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<64; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<64; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/_internal/nvvm.pyx":33 + * const void* RTLD_DEFAULT 'RTLD_DEFAULT' + * + * cdef int get_cuda_version(): # <<<<<<<<<<<<<< + * cdef void* handle = NULL + * cdef int err, driver_ver = 0 +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_4nvvm_get_cuda_version(void) { + void *__pyx_v_handle; + int __pyx_v_err; + int __pyx_v_driver_ver; + char *__pyx_v_err_msg; + void *__pyx_v_cuDriverGetVersion; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7[3]; + PyObject *__pyx_t_8 = NULL; + size_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_cuda_version", 0); + + /* "cuda/bindings/_internal/nvvm.pyx":34 + * + * cdef int get_cuda_version(): + * cdef void* handle = NULL # <<<<<<<<<<<<<< + * cdef int err, driver_ver = 0 + * +*/ + __pyx_v_handle = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":35 + * cdef int get_cuda_version(): + * cdef void* handle = NULL + * cdef int err, driver_ver = 0 # <<<<<<<<<<<<<< + * + * # Load driver to check version +*/ + __pyx_v_driver_ver = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":38 + * + * # Load driver to check version + * handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) # <<<<<<<<<<<<<< + * if handle == NULL: + * err_msg = dlerror() +*/ + __pyx_v_handle = dlopen(((char const *)"libcuda.so.1"), (RTLD_NOW | RTLD_GLOBAL)); + + /* "cuda/bindings/_internal/nvvm.pyx":39 + * # Load driver to check version + * handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) + * if handle == NULL: # <<<<<<<<<<<<<< + * err_msg = dlerror() + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') +*/ + __pyx_t_1 = (__pyx_v_handle == NULL); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_internal/nvvm.pyx":40 + * handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) + * if handle == NULL: + * err_msg = dlerror() # <<<<<<<<<<<<<< + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") +*/ + __pyx_v_err_msg = dlerror(); + + /* "cuda/bindings/_internal/nvvm.pyx":41 + * if handle == NULL: + * err_msg = dlerror() + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') # <<<<<<<<<<<<<< + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + * if cuDriverGetVersion == NULL: +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_ssize_strlen(__pyx_v_err_msg); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_v_err_msg, 0, __pyx_t_5, NULL, NULL, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_CUDA_driver_is_not_found; + __pyx_t_7[1] = __pyx_t_6; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 26 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_9 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_9 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 41, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":39 + * # Load driver to check version + * handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) + * if handle == NULL: # <<<<<<<<<<<<<< + * err_msg = dlerror() + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":42 + * err_msg = dlerror() + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") # <<<<<<<<<<<<<< + * if cuDriverGetVersion == NULL: + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') +*/ + __pyx_v_cuDriverGetVersion = dlsym(__pyx_v_handle, ((char const *)"cuDriverGetVersion")); + + /* "cuda/bindings/_internal/nvvm.pyx":43 + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + * if cuDriverGetVersion == NULL: # <<<<<<<<<<<<<< + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + * err = (cuDriverGetVersion)(&driver_ver) +*/ + __pyx_t_1 = (__pyx_v_cuDriverGetVersion == NULL); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_internal/nvvm.pyx":44 + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + * if cuDriverGetVersion == NULL: + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') # <<<<<<<<<<<<<< + * err = (cuDriverGetVersion)(&driver_ver) + * if err != 0: +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_8 = __pyx_builtin_RuntimeError; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Did_not_find_cuDriverGetVersion}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 44, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":43 + * raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + * cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + * if cuDriverGetVersion == NULL: # <<<<<<<<<<<<<< + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + * err = (cuDriverGetVersion)(&driver_ver) +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":45 + * if cuDriverGetVersion == NULL: + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + * err = (cuDriverGetVersion)(&driver_ver) # <<<<<<<<<<<<<< + * if err != 0: + * raise RuntimeError(f'cuDriverGetVersion returned error code {err}') +*/ + __pyx_v_err = ((int (*)(int *))__pyx_v_cuDriverGetVersion)((&__pyx_v_driver_ver)); + + /* "cuda/bindings/_internal/nvvm.pyx":46 + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + * err = (cuDriverGetVersion)(&driver_ver) + * if err != 0: # <<<<<<<<<<<<<< + * raise RuntimeError(f'cuDriverGetVersion returned error code {err}') + * +*/ + __pyx_t_1 = (__pyx_v_err != 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_internal/nvvm.pyx":47 + * err = (cuDriverGetVersion)(&driver_ver) + * if err != 0: + * raise RuntimeError(f'cuDriverGetVersion returned error code {err}') # <<<<<<<<<<<<<< + * + * return driver_ver +*/ + __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_4 = __pyx_builtin_RuntimeError; + __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_err, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_cuDriverGetVersion_returned_erro, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_9 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 47, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":46 + * raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + * err = (cuDriverGetVersion)(&driver_ver) + * if err != 0: # <<<<<<<<<<<<<< + * raise RuntimeError(f'cuDriverGetVersion returned error code {err}') + * +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":49 + * raise RuntimeError(f'cuDriverGetVersion returned error code {err}') + * + * return driver_ver # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_driver_ver; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":33 + * const void* RTLD_DEFAULT 'RTLD_DEFAULT' + * + * cdef int get_cuda_version(): # <<<<<<<<<<<<<< + * cdef void* handle = NULL + * cdef int err, driver_ver = 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm.get_cuda_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":75 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + * return handle +*/ + +static void *__pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(void) { + uintptr_t __pyx_v_handle; + void *__pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + uintptr_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_RefNannySetupContext("load_library", 0); + + /* "cuda/bindings/_internal/nvvm.pyx":76 + * + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint # <<<<<<<<<<<<<< + * return handle + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nvvm}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_handle_uint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_5 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_handle = __pyx_t_5; + + /* "cuda/bindings/_internal/nvvm.pyx":77 + * cdef void* load_library() except* with gil: + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + * return handle # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((void *)__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":75 + * + * + * cdef void* load_library() except* with gil: # <<<<<<<<<<<<<< + * cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + * return handle +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm.load_library", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":80 + * + * + * cdef int __check_or_init_nvvm() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_nvvm_init + * +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_4nvvm___check_or_init_nvvm(void) { + void *__pyx_v_handle; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; + void *__pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_t_13; + int __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("__check_or_init_nvvm", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":83 + * global __py_nvvm_init + * + * cdef void* handle = NULL # <<<<<<<<<<<<<< + * + * with gil, __symbol_lock: +*/ + __pyx_v_handle = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":85 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvvmGetErrorString +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + /*with:*/ { + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L6_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_7); + __Pyx_XGOTREF(__pyx_t_8); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":88 + * # Load function + * global __nvvmGetErrorString + * __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') # <<<<<<<<<<<<<< + * if __nvvmGetErrorString == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString = dlsym(RTLD_DEFAULT, ((char const *)"nvvmGetErrorString")); + + /* "cuda/bindings/_internal/nvvm.pyx":89 + * global __nvvmGetErrorString + * __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + * if __nvvmGetErrorString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":90 + * __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + * if __nvvmGetErrorString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":91 + * if __nvvmGetErrorString == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":90 + * __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + * if __nvvmGetErrorString == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":92 + * if handle == NULL: + * handle = load_library() + * __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') # <<<<<<<<<<<<<< + * + * global __nvvmVersion +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString = dlsym(__pyx_v_handle, ((char const *)"nvvmGetErrorString")); + + /* "cuda/bindings/_internal/nvvm.pyx":89 + * global __nvvmGetErrorString + * __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + * if __nvvmGetErrorString == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":95 + * + * global __nvvmVersion + * __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') # <<<<<<<<<<<<<< + * if __nvvmVersion == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion = dlsym(RTLD_DEFAULT, ((char const *)"nvvmVersion")); + + /* "cuda/bindings/_internal/nvvm.pyx":96 + * global __nvvmVersion + * __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + * if __nvvmVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":97 + * __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + * if __nvvmVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmVersion = dlsym(handle, 'nvvmVersion') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":98 + * if __nvvmVersion == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmVersion = dlsym(handle, 'nvvmVersion') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":97 + * __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + * if __nvvmVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmVersion = dlsym(handle, 'nvvmVersion') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":99 + * if handle == NULL: + * handle = load_library() + * __nvvmVersion = dlsym(handle, 'nvvmVersion') # <<<<<<<<<<<<<< + * + * global __nvvmIRVersion +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion = dlsym(__pyx_v_handle, ((char const *)"nvvmVersion")); + + /* "cuda/bindings/_internal/nvvm.pyx":96 + * global __nvvmVersion + * __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + * if __nvvmVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":102 + * + * global __nvvmIRVersion + * __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') # <<<<<<<<<<<<<< + * if __nvvmIRVersion == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion = dlsym(RTLD_DEFAULT, ((char const *)"nvvmIRVersion")); + + /* "cuda/bindings/_internal/nvvm.pyx":103 + * global __nvvmIRVersion + * __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + * if __nvvmIRVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":104 + * __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + * if __nvvmIRVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":105 + * if __nvvmIRVersion == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":104 + * __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + * if __nvvmIRVersion == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":106 + * if handle == NULL: + * handle = load_library() + * __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') # <<<<<<<<<<<<<< + * + * global __nvvmCreateProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion = dlsym(__pyx_v_handle, ((char const *)"nvvmIRVersion")); + + /* "cuda/bindings/_internal/nvvm.pyx":103 + * global __nvvmIRVersion + * __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + * if __nvvmIRVersion == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":109 + * + * global __nvvmCreateProgram + * __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') # <<<<<<<<<<<<<< + * if __nvvmCreateProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmCreateProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":110 + * global __nvvmCreateProgram + * __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + * if __nvvmCreateProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":111 + * __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + * if __nvvmCreateProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":112 + * if __nvvmCreateProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 112, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":111 + * __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + * if __nvvmCreateProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":113 + * if handle == NULL: + * handle = load_library() + * __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') # <<<<<<<<<<<<<< + * + * global __nvvmDestroyProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmCreateProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":110 + * global __nvvmCreateProgram + * __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + * if __nvvmCreateProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":116 + * + * global __nvvmDestroyProgram + * __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') # <<<<<<<<<<<<<< + * if __nvvmDestroyProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmDestroyProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":117 + * global __nvvmDestroyProgram + * __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + * if __nvvmDestroyProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":118 + * __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + * if __nvvmDestroyProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":119 + * if __nvvmDestroyProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":118 + * __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + * if __nvvmDestroyProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":120 + * if handle == NULL: + * handle = load_library() + * __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') # <<<<<<<<<<<<<< + * + * global __nvvmAddModuleToProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmDestroyProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":117 + * global __nvvmDestroyProgram + * __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + * if __nvvmDestroyProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":123 + * + * global __nvvmAddModuleToProgram + * __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') # <<<<<<<<<<<<<< + * if __nvvmAddModuleToProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmAddModuleToProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":124 + * global __nvvmAddModuleToProgram + * __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + * if __nvvmAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":125 + * __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + * if __nvvmAddModuleToProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":126 + * if __nvvmAddModuleToProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":125 + * __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + * if __nvvmAddModuleToProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":127 + * if handle == NULL: + * handle = load_library() + * __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') # <<<<<<<<<<<<<< + * + * global __nvvmLazyAddModuleToProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmAddModuleToProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":124 + * global __nvvmAddModuleToProgram + * __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + * if __nvvmAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":130 + * + * global __nvvmLazyAddModuleToProgram + * __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') # <<<<<<<<<<<<<< + * if __nvvmLazyAddModuleToProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmLazyAddModuleToProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":131 + * global __nvvmLazyAddModuleToProgram + * __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + * if __nvvmLazyAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":132 + * __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + * if __nvvmLazyAddModuleToProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":133 + * if __nvvmLazyAddModuleToProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":132 + * __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + * if __nvvmLazyAddModuleToProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":134 + * if handle == NULL: + * handle = load_library() + * __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') # <<<<<<<<<<<<<< + * + * global __nvvmCompileProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmLazyAddModuleToProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":131 + * global __nvvmLazyAddModuleToProgram + * __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + * if __nvvmLazyAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":137 + * + * global __nvvmCompileProgram + * __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') # <<<<<<<<<<<<<< + * if __nvvmCompileProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmCompileProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":138 + * global __nvvmCompileProgram + * __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + * if __nvvmCompileProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":139 + * __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + * if __nvvmCompileProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":140 + * if __nvvmCompileProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":139 + * __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + * if __nvvmCompileProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":141 + * if handle == NULL: + * handle = load_library() + * __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') # <<<<<<<<<<<<<< + * + * global __nvvmVerifyProgram +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmCompileProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":138 + * global __nvvmCompileProgram + * __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + * if __nvvmCompileProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":144 + * + * global __nvvmVerifyProgram + * __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') # <<<<<<<<<<<<<< + * if __nvvmVerifyProgram == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram = dlsym(RTLD_DEFAULT, ((char const *)"nvvmVerifyProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":145 + * global __nvvmVerifyProgram + * __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + * if __nvvmVerifyProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":146 + * __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + * if __nvvmVerifyProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":147 + * if __nvvmVerifyProgram == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":146 + * __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + * if __nvvmVerifyProgram == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":148 + * if handle == NULL: + * handle = load_library() + * __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') # <<<<<<<<<<<<<< + * + * global __nvvmGetCompiledResultSize +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram = dlsym(__pyx_v_handle, ((char const *)"nvvmVerifyProgram")); + + /* "cuda/bindings/_internal/nvvm.pyx":145 + * global __nvvmVerifyProgram + * __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + * if __nvvmVerifyProgram == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":151 + * + * global __nvvmGetCompiledResultSize + * __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') # <<<<<<<<<<<<<< + * if __nvvmGetCompiledResultSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, ((char const *)"nvvmGetCompiledResultSize")); + + /* "cuda/bindings/_internal/nvvm.pyx":152 + * global __nvvmGetCompiledResultSize + * __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + * if __nvvmGetCompiledResultSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":153 + * __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + * if __nvvmGetCompiledResultSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":154 + * if __nvvmGetCompiledResultSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":153 + * __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + * if __nvvmGetCompiledResultSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":155 + * if handle == NULL: + * handle = load_library() + * __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') # <<<<<<<<<<<<<< + * + * global __nvvmGetCompiledResult +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize = dlsym(__pyx_v_handle, ((char const *)"nvvmGetCompiledResultSize")); + + /* "cuda/bindings/_internal/nvvm.pyx":152 + * global __nvvmGetCompiledResultSize + * __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + * if __nvvmGetCompiledResultSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":158 + * + * global __nvvmGetCompiledResult + * __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') # <<<<<<<<<<<<<< + * if __nvvmGetCompiledResult == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, ((char const *)"nvvmGetCompiledResult")); + + /* "cuda/bindings/_internal/nvvm.pyx":159 + * global __nvvmGetCompiledResult + * __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + * if __nvvmGetCompiledResult == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":160 + * __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + * if __nvvmGetCompiledResult == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":161 + * if __nvvmGetCompiledResult == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":160 + * __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + * if __nvvmGetCompiledResult == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":162 + * if handle == NULL: + * handle = load_library() + * __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') # <<<<<<<<<<<<<< + * + * global __nvvmGetProgramLogSize +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult = dlsym(__pyx_v_handle, ((char const *)"nvvmGetCompiledResult")); + + /* "cuda/bindings/_internal/nvvm.pyx":159 + * global __nvvmGetCompiledResult + * __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + * if __nvvmGetCompiledResult == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":165 + * + * global __nvvmGetProgramLogSize + * __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') # <<<<<<<<<<<<<< + * if __nvvmGetProgramLogSize == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, ((char const *)"nvvmGetProgramLogSize")); + + /* "cuda/bindings/_internal/nvvm.pyx":166 + * global __nvvmGetProgramLogSize + * __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + * if __nvvmGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":167 + * __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + * if __nvvmGetProgramLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":168 + * if __nvvmGetProgramLogSize == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":167 + * __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + * if __nvvmGetProgramLogSize == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":169 + * if handle == NULL: + * handle = load_library() + * __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') # <<<<<<<<<<<<<< + * + * global __nvvmGetProgramLog +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize = dlsym(__pyx_v_handle, ((char const *)"nvvmGetProgramLogSize")); + + /* "cuda/bindings/_internal/nvvm.pyx":166 + * global __nvvmGetProgramLogSize + * __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + * if __nvvmGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":172 + * + * global __nvvmGetProgramLog + * __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') # <<<<<<<<<<<<<< + * if __nvvmGetProgramLog == NULL: + * if handle == NULL: +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog = dlsym(RTLD_DEFAULT, ((char const *)"nvvmGetProgramLog")); + + /* "cuda/bindings/_internal/nvvm.pyx":173 + * global __nvvmGetProgramLog + * __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + * if __nvvmGetProgramLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + __pyx_t_9 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":174 + * __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + * if __nvvmGetProgramLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') +*/ + __pyx_t_9 = (__pyx_v_handle == NULL); + if (__pyx_t_9) { + + /* "cuda/bindings/_internal/nvvm.pyx":175 + * if __nvvmGetProgramLog == NULL: + * if handle == NULL: + * handle = load_library() # <<<<<<<<<<<<<< + * __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_9_internal_4nvvm_load_library(); if (unlikely(__pyx_t_10 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L10_error) + __pyx_v_handle = __pyx_t_10; + + /* "cuda/bindings/_internal/nvvm.pyx":174 + * __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + * if __nvvmGetProgramLog == NULL: + * if handle == NULL: # <<<<<<<<<<<<<< + * handle = load_library() + * __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":176 + * if handle == NULL: + * handle = load_library() + * __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') # <<<<<<<<<<<<<< + * + * __py_nvvm_init = True +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog = dlsym(__pyx_v_handle, ((char const *)"nvvmGetProgramLog")); + + /* "cuda/bindings/_internal/nvvm.pyx":173 + * global __nvvmGetProgramLog + * __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + * if __nvvmGetProgramLog == NULL: # <<<<<<<<<<<<<< + * if handle == NULL: + * handle = load_library() +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":178 + * __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + * + * __py_nvvm_init = True # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___py_nvvm_init = 1; + + /* "cuda/bindings/_internal/nvvm.pyx":179 + * + * __py_nvvm_init = True + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L14_try_return; + + /* "cuda/bindings/_internal/nvvm.pyx":85 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvvmGetErrorString +*/ + } + __pyx_L10_error:; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + /*except:*/ { + __Pyx_AddTraceback("cuda.bindings._internal.nvvm.__check_or_init_nvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 85, __pyx_L12_except_error) + __Pyx_XGOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 85, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 85, __pyx_L12_except_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_9 < (0)) __PYX_ERR(0, 85, __pyx_L12_except_error) + __pyx_t_13 = (!__pyx_t_9); + if (unlikely(__pyx_t_13)) { + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_3); + __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3); + __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; + __PYX_ERR(0, 85, __pyx_L12_except_error) + } + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L11_exception_handled; + } + __pyx_L12_except_error:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L4_error; + __pyx_L14_try_return:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + goto __pyx_L7_return; + __pyx_L11_exception_handled:; + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_7); + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); + } + } + /*finally:*/ { + /*normal exit:*/{ + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + goto __pyx_L9; + } + __pyx_L7_return: { + __pyx_t_14 = __pyx_r; + if (__pyx_t_1) { + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[0], NULL); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } + __pyx_r = __pyx_t_14; + goto __pyx_L3_return; + } + __pyx_L9:; + } + goto __pyx_L45; + __pyx_L6_error:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L4_error; + __pyx_L45:; + } + } + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L3_return: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L0; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":80 + * + * + * cdef int __check_or_init_nvvm() except -1 nogil: # <<<<<<<<<<<<<< + * global __py_nvvm_init + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm.__check_or_init_nvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":182 + * + * + * cdef int _check_or_init_nvvm() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_nvvm_init: + * return 0 +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(void) { + int __pyx_r; + int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/_internal/nvvm.pyx":183 + * + * cdef int _check_or_init_nvvm() except -1 nogil: + * if __py_nvvm_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + if (__pyx_v_4cuda_8bindings_9_internal_4nvvm___py_nvvm_init) { + + /* "cuda/bindings/_internal/nvvm.pyx":184 + * cdef int _check_or_init_nvvm() except -1 nogil: + * if __py_nvvm_init: + * return 0 # <<<<<<<<<<<<<< + * + * return __check_or_init_nvvm() +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":183 + * + * cdef int _check_or_init_nvvm() except -1 nogil: + * if __py_nvvm_init: # <<<<<<<<<<<<<< + * return 0 + * +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":186 + * return 0 + * + * return __check_or_init_nvvm() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm___check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":182 + * + * + * cdef int _check_or_init_nvvm() except -1 nogil: # <<<<<<<<<<<<<< + * if __py_nvvm_init: + * return 0 +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._check_or_init_nvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":192 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v_data = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + + /* "cuda/bindings/_internal/nvvm.pyx":194 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs != ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/nvvm.pyx":195 + * global func_ptrs + * if func_ptrs is not None: + * return func_ptrs # <<<<<<<<<<<<<< + * + * _check_or_init_nvvm() +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs); + __pyx_r = __pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":194 + * cpdef dict _inspect_function_pointers(): + * global func_ptrs + * if func_ptrs is not None: # <<<<<<<<<<<<<< + * return func_ptrs + * +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":197 + * return func_ptrs + * + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * cdef dict data = {} + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 197, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":198 + * + * _check_or_init_nvvm() + * cdef dict data = {} # <<<<<<<<<<<<<< + * + * global __nvvmGetErrorString +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_data = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":201 + * + * global __nvvmGetErrorString + * data["__nvvmGetErrorString"] = __nvvmGetErrorString # <<<<<<<<<<<<<< + * + * global __nvvmVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmGetErrorString, __pyx_t_3) < 0))) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":204 + * + * global __nvvmVersion + * data["__nvvmVersion"] = __nvvmVersion # <<<<<<<<<<<<<< + * + * global __nvvmIRVersion +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":207 + * + * global __nvvmIRVersion + * data["__nvvmIRVersion"] = __nvvmIRVersion # <<<<<<<<<<<<<< + * + * global __nvvmCreateProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmIRVersion, __pyx_t_3) < 0))) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":210 + * + * global __nvvmCreateProgram + * data["__nvvmCreateProgram"] = __nvvmCreateProgram # <<<<<<<<<<<<<< + * + * global __nvvmDestroyProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmCreateProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":213 + * + * global __nvvmDestroyProgram + * data["__nvvmDestroyProgram"] = __nvvmDestroyProgram # <<<<<<<<<<<<<< + * + * global __nvvmAddModuleToProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmDestroyProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":216 + * + * global __nvvmAddModuleToProgram + * data["__nvvmAddModuleToProgram"] = __nvvmAddModuleToProgram # <<<<<<<<<<<<<< + * + * global __nvvmLazyAddModuleToProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmAddModuleToProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":219 + * + * global __nvvmLazyAddModuleToProgram + * data["__nvvmLazyAddModuleToProgram"] = __nvvmLazyAddModuleToProgram # <<<<<<<<<<<<<< + * + * global __nvvmCompileProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmLazyAddModuleToProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":222 + * + * global __nvvmCompileProgram + * data["__nvvmCompileProgram"] = __nvvmCompileProgram # <<<<<<<<<<<<<< + * + * global __nvvmVerifyProgram +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmCompileProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":225 + * + * global __nvvmVerifyProgram + * data["__nvvmVerifyProgram"] = __nvvmVerifyProgram # <<<<<<<<<<<<<< + * + * global __nvvmGetCompiledResultSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmVerifyProgram, __pyx_t_3) < 0))) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":228 + * + * global __nvvmGetCompiledResultSize + * data["__nvvmGetCompiledResultSize"] = __nvvmGetCompiledResultSize # <<<<<<<<<<<<<< + * + * global __nvvmGetCompiledResult +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmGetCompiledResultSize, __pyx_t_3) < 0))) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":231 + * + * global __nvvmGetCompiledResult + * data["__nvvmGetCompiledResult"] = __nvvmGetCompiledResult # <<<<<<<<<<<<<< + * + * global __nvvmGetProgramLogSize +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmGetCompiledResult, __pyx_t_3) < 0))) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":234 + * + * global __nvvmGetProgramLogSize + * data["__nvvmGetProgramLogSize"] = __nvvmGetProgramLogSize # <<<<<<<<<<<<<< + * + * global __nvvmGetProgramLog +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmGetProgramLogSize, __pyx_t_3) < 0))) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":237 + * + * global __nvvmGetProgramLog + * data["__nvvmGetProgramLog"] = __nvvmGetProgramLog # <<<<<<<<<<<<<< + * + * func_ptrs = data +*/ + __pyx_t_3 = PyLong_FromSsize_t(((intptr_t)__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (unlikely((PyDict_SetItem(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_nvvmGetProgramLog, __pyx_t_3) < 0))) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":239 + * data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + * + * func_ptrs = data # <<<<<<<<<<<<<< + * return data + * +*/ + __Pyx_INCREF(__pyx_v_data); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs, __pyx_v_data); + __Pyx_GIVEREF(__pyx_v_data); + + /* "cuda/bindings/_internal/nvvm.pyx":240 + * + * func_ptrs = data + * return data # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_data); + __pyx_r = __pyx_v_data; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":192 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers, "_inspect_function_pointers() -> dict"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers = {"_inspect_function_pointers", (PyCFunction)__pyx_pw_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers, METH_NOARGS, __pyx_doc_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointers (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointers", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._inspect_function_pointers", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":243 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointer(PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + + /* "cuda/bindings/_internal/nvvm.pyx":245 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + __pyx_t_1 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs == ((PyObject*)Py_None)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/nvvm.pyx":246 + * global func_ptrs + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() # <<<<<<<<<<<<<< + * return func_ptrs[name] + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointers(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":245 + * cpdef _inspect_function_pointer(str name): + * global func_ptrs + * if func_ptrs is None: # <<<<<<<<<<<<<< + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":247 + * if func_ptrs is None: + * func_ptrs = _inspect_function_pointers() + * return func_ptrs[name] # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + if (unlikely(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 247, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":243 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9_internal_4nvvm_2_inspect_function_pointer, "_inspect_function_pointer(str name)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer = {"_inspect_function_pointer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9_internal_4nvvm_2_inspect_function_pointer}; +static PyObject *__pyx_pw_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("_inspect_function_pointer (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 243, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_inspect_function_pointer", 0) < (0)) __PYX_ERR(0, 243, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, i); __PYX_ERR(0, 243, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 243, __pyx_L3_error) + } + __pyx_v_name = ((PyObject*)values[0]); + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("_inspect_function_pointer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 243, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_r = __pyx_pf_4cuda_8bindings_9_internal_4nvvm_2_inspect_function_pointer(__pyx_self, __pyx_v_name); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9_internal_4nvvm_2_inspect_function_pointer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_inspect_function_pointer", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__inspect_function_pointer(__pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._inspect_function_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":254 + * ############################################################################### + * + * cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: # <<<<<<<<<<<<<< + * global __nvvmGetErrorString + * _check_or_init_nvvm() +*/ + +static char const *__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetErrorString(nvvmResult __pyx_v_result) { + char const *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmGetErrorString", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":256 + * cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: + * global __nvvmGetErrorString + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmGetErrorString == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":257 + * global __nvvmGetErrorString + * _check_or_init_nvvm() + * if __nvvmGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":258 + * _check_or_init_nvvm() + * if __nvvmGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") + * return (__nvvmGetErrorString)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":259 + * if __nvvmGetErrorString == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") # <<<<<<<<<<<<<< + * return (__nvvmGetErrorString)( + * result) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmGetErrorString_is_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 259, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":258 + * _check_or_init_nvvm() + * if __nvvmGetErrorString == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") + * return (__nvvmGetErrorString)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":257 + * global __nvvmGetErrorString + * _check_or_init_nvvm() + * if __nvvmGetErrorString == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":260 + * with gil: + * raise FunctionNotFoundError("function nvvmGetErrorString is not found") + * return (__nvvmGetErrorString)( # <<<<<<<<<<<<<< + * result) + * +*/ + __pyx_r = ((char const *(*)(nvvmResult))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString)(__pyx_v_result); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":254 + * ############################################################################### + * + * cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: # <<<<<<<<<<<<<< + * global __nvvmGetErrorString + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":264 + * + * + * cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmVersion + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVersion(int *__pyx_v_major, int *__pyx_v_minor) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmVersion", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":266 + * cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmVersion + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 266, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":267 + * global __nvvmVersion + * _check_or_init_nvvm() + * if __nvvmVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmVersion is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":268 + * _check_or_init_nvvm() + * if __nvvmVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmVersion is not found") + * return (__nvvmVersion)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":269 + * if __nvvmVersion == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmVersion is not found") # <<<<<<<<<<<<<< + * return (__nvvmVersion)( + * major, minor) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmVersion_is_not_foun}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 269, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":268 + * _check_or_init_nvvm() + * if __nvvmVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmVersion is not found") + * return (__nvvmVersion)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":267 + * global __nvvmVersion + * _check_or_init_nvvm() + * if __nvvmVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmVersion is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":270 + * with gil: + * raise FunctionNotFoundError("function nvvmVersion is not found") + * return (__nvvmVersion)( # <<<<<<<<<<<<<< + * major, minor) + * +*/ + __pyx_r = ((nvvmResult (*)(int *, int *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion)(__pyx_v_major, __pyx_v_minor); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":264 + * + * + * cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmVersion + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":274 + * + * + * cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmIRVersion + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmIRVersion(int *__pyx_v_majorIR, int *__pyx_v_minorIR, int *__pyx_v_majorDbg, int *__pyx_v_minorDbg) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmIRVersion", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":276 + * cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmIRVersion + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmIRVersion == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":277 + * global __nvvmIRVersion + * _check_or_init_nvvm() + * if __nvvmIRVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmIRVersion is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":278 + * _check_or_init_nvvm() + * if __nvvmIRVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmIRVersion is not found") + * return (__nvvmIRVersion)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":279 + * if __nvvmIRVersion == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmIRVersion is not found") # <<<<<<<<<<<<<< + * return (__nvvmIRVersion)( + * majorIR, minorIR, majorDbg, minorDbg) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmIRVersion_is_not_fo}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 279, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":278 + * _check_or_init_nvvm() + * if __nvvmIRVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmIRVersion is not found") + * return (__nvvmIRVersion)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":277 + * global __nvvmIRVersion + * _check_or_init_nvvm() + * if __nvvmIRVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmIRVersion is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":280 + * with gil: + * raise FunctionNotFoundError("function nvvmIRVersion is not found") + * return (__nvvmIRVersion)( # <<<<<<<<<<<<<< + * majorIR, minorIR, majorDbg, minorDbg) + * +*/ + __pyx_r = ((nvvmResult (*)(int *, int *, int *, int *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion)(__pyx_v_majorIR, __pyx_v_minorIR, __pyx_v_majorDbg, __pyx_v_minorDbg); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":274 + * + * + * cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmIRVersion + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmIRVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":284 + * + * + * cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmCreateProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCreateProgram(nvvmProgram *__pyx_v_prog) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmCreateProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":286 + * cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmCreateProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmCreateProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":287 + * global __nvvmCreateProgram + * _check_or_init_nvvm() + * if __nvvmCreateProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":288 + * _check_or_init_nvvm() + * if __nvvmCreateProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") + * return (__nvvmCreateProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":289 + * if __nvvmCreateProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmCreateProgram)( + * prog) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmCreateProgram_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 289, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":288 + * _check_or_init_nvvm() + * if __nvvmCreateProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") + * return (__nvvmCreateProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":287 + * global __nvvmCreateProgram + * _check_or_init_nvvm() + * if __nvvmCreateProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":290 + * with gil: + * raise FunctionNotFoundError("function nvvmCreateProgram is not found") + * return (__nvvmCreateProgram)( # <<<<<<<<<<<<<< + * prog) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram)(__pyx_v_prog); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":284 + * + * + * cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmCreateProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":294 + * + * + * cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmDestroyProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmDestroyProgram(nvvmProgram *__pyx_v_prog) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmDestroyProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":296 + * cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmDestroyProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmDestroyProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 296, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":297 + * global __nvvmDestroyProgram + * _check_or_init_nvvm() + * if __nvvmDestroyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":298 + * _check_or_init_nvvm() + * if __nvvmDestroyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + * return (__nvvmDestroyProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":299 + * if __nvvmDestroyProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmDestroyProgram)( + * prog) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 299, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmDestroyProgram_is_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 299, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":298 + * _check_or_init_nvvm() + * if __nvvmDestroyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + * return (__nvvmDestroyProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":297 + * global __nvvmDestroyProgram + * _check_or_init_nvvm() + * if __nvvmDestroyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":300 + * with gil: + * raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + * return (__nvvmDestroyProgram)( # <<<<<<<<<<<<<< + * prog) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram)(__pyx_v_prog); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":294 + * + * + * cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmDestroyProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":304 + * + * + * cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmAddModuleToProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmAddModuleToProgram(nvvmProgram __pyx_v_prog, char const *__pyx_v_buffer, size_t __pyx_v_size, char const *__pyx_v_name) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmAddModuleToProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":306 + * cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmAddModuleToProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmAddModuleToProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 306, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":307 + * global __nvvmAddModuleToProgram + * _check_or_init_nvvm() + * if __nvvmAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":308 + * _check_or_init_nvvm() + * if __nvvmAddModuleToProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + * return (__nvvmAddModuleToProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":309 + * if __nvvmAddModuleToProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmAddModuleToProgram)( + * prog, buffer, size, name) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmAddModuleToProgram}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 309, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":308 + * _check_or_init_nvvm() + * if __nvvmAddModuleToProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + * return (__nvvmAddModuleToProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":307 + * global __nvvmAddModuleToProgram + * _check_or_init_nvvm() + * if __nvvmAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":310 + * with gil: + * raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + * return (__nvvmAddModuleToProgram)( # <<<<<<<<<<<<<< + * prog, buffer, size, name) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, char const *, size_t, char const *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram)(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":304 + * + * + * cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmAddModuleToProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmAddModuleToProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":314 + * + * + * cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmLazyAddModuleToProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmLazyAddModuleToProgram(nvvmProgram __pyx_v_prog, char const *__pyx_v_buffer, size_t __pyx_v_size, char const *__pyx_v_name) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmLazyAddModuleToProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":316 + * cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmLazyAddModuleToProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmLazyAddModuleToProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 316, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":317 + * global __nvvmLazyAddModuleToProgram + * _check_or_init_nvvm() + * if __nvvmLazyAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":318 + * _check_or_init_nvvm() + * if __nvvmLazyAddModuleToProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + * return (__nvvmLazyAddModuleToProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":319 + * if __nvvmLazyAddModuleToProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmLazyAddModuleToProgram)( + * prog, buffer, size, name) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmLazyAddModuleToProg}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 319, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":318 + * _check_or_init_nvvm() + * if __nvvmLazyAddModuleToProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + * return (__nvvmLazyAddModuleToProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":317 + * global __nvvmLazyAddModuleToProgram + * _check_or_init_nvvm() + * if __nvvmLazyAddModuleToProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":320 + * with gil: + * raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + * return (__nvvmLazyAddModuleToProgram)( # <<<<<<<<<<<<<< + * prog, buffer, size, name) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, char const *, size_t, char const *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram)(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":314 + * + * + * cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmLazyAddModuleToProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmLazyAddModuleToProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":324 + * + * + * cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmCompileProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCompileProgram(nvvmProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmCompileProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":326 + * cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmCompileProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmCompileProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":327 + * global __nvvmCompileProgram + * _check_or_init_nvvm() + * if __nvvmCompileProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":328 + * _check_or_init_nvvm() + * if __nvvmCompileProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") + * return (__nvvmCompileProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":329 + * if __nvvmCompileProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmCompileProgram)( + * prog, numOptions, options) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmCompileProgram_is_n}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 329, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":328 + * _check_or_init_nvvm() + * if __nvvmCompileProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") + * return (__nvvmCompileProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":327 + * global __nvvmCompileProgram + * _check_or_init_nvvm() + * if __nvvmCompileProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":330 + * with gil: + * raise FunctionNotFoundError("function nvvmCompileProgram is not found") + * return (__nvvmCompileProgram)( # <<<<<<<<<<<<<< + * prog, numOptions, options) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, int, char const **))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram)(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":324 + * + * + * cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmCompileProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":334 + * + * + * cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmVerifyProgram + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVerifyProgram(nvvmProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmVerifyProgram", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":336 + * cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmVerifyProgram + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmVerifyProgram == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 336, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":337 + * global __nvvmVerifyProgram + * _check_or_init_nvvm() + * if __nvvmVerifyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":338 + * _check_or_init_nvvm() + * if __nvvmVerifyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + * return (__nvvmVerifyProgram)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":339 + * if __nvvmVerifyProgram == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") # <<<<<<<<<<<<<< + * return (__nvvmVerifyProgram)( + * prog, numOptions, options) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmVerifyProgram_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 339, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":338 + * _check_or_init_nvvm() + * if __nvvmVerifyProgram == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + * return (__nvvmVerifyProgram)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":337 + * global __nvvmVerifyProgram + * _check_or_init_nvvm() + * if __nvvmVerifyProgram == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":340 + * with gil: + * raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + * return (__nvvmVerifyProgram)( # <<<<<<<<<<<<<< + * prog, numOptions, options) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, int, char const **))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram)(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":334 + * + * + * cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmVerifyProgram + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmVerifyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":344 + * + * + * cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetCompiledResultSize + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResultSize(nvvmProgram __pyx_v_prog, size_t *__pyx_v_bufferSizeRet) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmGetCompiledResultSize", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":346 + * cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmGetCompiledResultSize + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmGetCompiledResultSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 346, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":347 + * global __nvvmGetCompiledResultSize + * _check_or_init_nvvm() + * if __nvvmGetCompiledResultSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":348 + * _check_or_init_nvvm() + * if __nvvmGetCompiledResultSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + * return (__nvvmGetCompiledResultSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":349 + * if __nvvmGetCompiledResultSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") # <<<<<<<<<<<<<< + * return (__nvvmGetCompiledResultSize)( + * prog, bufferSizeRet) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmGetCompiledResultSi}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 349, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":348 + * _check_or_init_nvvm() + * if __nvvmGetCompiledResultSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + * return (__nvvmGetCompiledResultSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":347 + * global __nvvmGetCompiledResultSize + * _check_or_init_nvvm() + * if __nvvmGetCompiledResultSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":350 + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + * return (__nvvmGetCompiledResultSize)( # <<<<<<<<<<<<<< + * prog, bufferSizeRet) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, size_t *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize)(__pyx_v_prog, __pyx_v_bufferSizeRet); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":344 + * + * + * cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetCompiledResultSize + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmGetCompiledResultSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":354 + * + * + * cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetCompiledResult + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResult(nvvmProgram __pyx_v_prog, char *__pyx_v_buffer) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmGetCompiledResult", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":356 + * cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmGetCompiledResult + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmGetCompiledResult == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":357 + * global __nvvmGetCompiledResult + * _check_or_init_nvvm() + * if __nvvmGetCompiledResult == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":358 + * _check_or_init_nvvm() + * if __nvvmGetCompiledResult == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + * return (__nvvmGetCompiledResult)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":359 + * if __nvvmGetCompiledResult == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") # <<<<<<<<<<<<<< + * return (__nvvmGetCompiledResult)( + * prog, buffer) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 359, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmGetCompiledResult_i}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 359, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":358 + * _check_or_init_nvvm() + * if __nvvmGetCompiledResult == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + * return (__nvvmGetCompiledResult)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":357 + * global __nvvmGetCompiledResult + * _check_or_init_nvvm() + * if __nvvmGetCompiledResult == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":360 + * with gil: + * raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + * return (__nvvmGetCompiledResult)( # <<<<<<<<<<<<<< + * prog, buffer) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, char *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult)(__pyx_v_prog, __pyx_v_buffer); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":354 + * + * + * cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetCompiledResult + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmGetCompiledResult", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":364 + * + * + * cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetProgramLogSize + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLogSize(nvvmProgram __pyx_v_prog, size_t *__pyx_v_bufferSizeRet) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmGetProgramLogSize", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":366 + * cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmGetProgramLogSize + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmGetProgramLogSize == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":367 + * global __nvvmGetProgramLogSize + * _check_or_init_nvvm() + * if __nvvmGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":368 + * _check_or_init_nvvm() + * if __nvvmGetProgramLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + * return (__nvvmGetProgramLogSize)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":369 + * if __nvvmGetProgramLogSize == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") # <<<<<<<<<<<<<< + * return (__nvvmGetProgramLogSize)( + * prog, bufferSizeRet) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmGetProgramLogSize_i}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 369, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":368 + * _check_or_init_nvvm() + * if __nvvmGetProgramLogSize == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + * return (__nvvmGetProgramLogSize)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":367 + * global __nvvmGetProgramLogSize + * _check_or_init_nvvm() + * if __nvvmGetProgramLogSize == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":370 + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + * return (__nvvmGetProgramLogSize)( # <<<<<<<<<<<<<< + * prog, bufferSizeRet) + * +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, size_t *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize)(__pyx_v_prog, __pyx_v_bufferSizeRet); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":364 + * + * + * cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetProgramLogSize + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/_internal/nvvm.pyx":374 + * + * + * cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetProgramLog + * _check_or_init_nvvm() +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLog(nvvmProgram __pyx_v_prog, char *__pyx_v_buffer) { + nvvmResult __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("_nvvmGetProgramLog", 1); + + /* "cuda/bindings/_internal/nvvm.pyx":376 + * cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * global __nvvmGetProgramLog + * _check_or_init_nvvm() # <<<<<<<<<<<<<< + * if __nvvmGetProgramLog == NULL: + * with gil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__check_or_init_nvvm(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error) + + /* "cuda/bindings/_internal/nvvm.pyx":377 + * global __nvvmGetProgramLog + * _check_or_init_nvvm() + * if __nvvmGetProgramLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") +*/ + __pyx_t_2 = (__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog == NULL); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/_internal/nvvm.pyx":378 + * _check_or_init_nvvm() + * if __nvvmGetProgramLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + * return (__nvvmGetProgramLog)( +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/_internal/nvvm.pyx":379 + * if __nvvmGetProgramLog == NULL: + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") # <<<<<<<<<<<<<< + * return (__nvvmGetProgramLog)( + * prog, buffer) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_function_nvvmGetProgramLog_is_no}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 379, __pyx_L5_error) + } + + /* "cuda/bindings/_internal/nvvm.pyx":378 + * _check_or_init_nvvm() + * if __nvvmGetProgramLog == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + * return (__nvvmGetProgramLog)( +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/_internal/nvvm.pyx":377 + * global __nvvmGetProgramLog + * _check_or_init_nvvm() + * if __nvvmGetProgramLog == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") +*/ + } + + /* "cuda/bindings/_internal/nvvm.pyx":380 + * with gil: + * raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + * return (__nvvmGetProgramLog)( # <<<<<<<<<<<<<< + * prog, buffer) +*/ + __pyx_r = ((nvvmResult (*)(nvvmProgram, char *))__pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog)(__pyx_v_prog, __pyx_v_buffer); + goto __pyx_L0; + + /* "cuda/bindings/_internal/nvvm.pyx":374 + * + * + * cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * global __nvvmGetProgramLog + * _check_or_init_nvvm() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.nvvm._nvvmGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock = Py_None; Py_INCREF(Py_None); + __pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs = ((PyObject*)Py_None); Py_INCREF(Py_None); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("_nvvmGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetErrorString, "char const *(nvvmResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVersion, "nvvmResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmIRVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmIRVersion, "nvvmResult (int *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmCreateProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCreateProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmDestroyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmDestroyProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmAddModuleToProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmLazyAddModuleToProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmLazyAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmCompileProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCompileProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmVerifyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVerifyProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmGetCompiledResultSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResultSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmGetCompiledResult", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResult, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmGetProgramLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLogSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("_nvvmGetProgramLog", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLog, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_nvvm(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_nvvm}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "nvvm", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_nvvm(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_nvvm(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_nvvm(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'nvvm' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "nvvm" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_nvvm", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___internal__nvvm) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._internal.nvvm")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._internal.nvvm", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_internal/nvvm.pyx":9 + * from libc.stdint cimport intptr_t, uintptr_t + * + * import threading # <<<<<<<<<<<<<< + * from .utils import FunctionNotFoundError, NotSupportedError + * +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_threading, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_threading, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":10 + * + * import threading + * from .utils import FunctionNotFoundError, NotSupportedError # <<<<<<<<<<<<<< + * + * from cuda.pathfinder import load_nvidia_dynamic_lib +*/ + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_utils, __pyx_t_2, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_t_2) < (0)) __PYX_ERR(0, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":12 + * from .utils import FunctionNotFoundError, NotSupportedError + * + * from cuda.pathfinder import load_nvidia_dynamic_lib # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_pathfinder, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib, __pyx_t_3) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":56 + * ############################################################################### + * + * cdef object __symbol_lock = threading.Lock() # <<<<<<<<<<<<<< + * cdef bint __py_nvvm_init = False + * cdef void* __cuDriverGetVersion = NULL +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_threading); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_4nvvm___symbol_lock, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":57 + * + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_nvvm_init = False # <<<<<<<<<<<<<< + * cdef void* __cuDriverGetVersion = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___py_nvvm_init = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":58 + * cdef object __symbol_lock = threading.Lock() + * cdef bint __py_nvvm_init = False + * cdef void* __cuDriverGetVersion = NULL # <<<<<<<<<<<<<< + * + * cdef void* __nvvmGetErrorString = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___cuDriverGetVersion = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":60 + * cdef void* __cuDriverGetVersion = NULL + * + * cdef void* __nvvmGetErrorString = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmVersion = NULL + * cdef void* __nvvmIRVersion = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetErrorString = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":61 + * + * cdef void* __nvvmGetErrorString = NULL + * cdef void* __nvvmVersion = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmIRVersion = NULL + * cdef void* __nvvmCreateProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVersion = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":62 + * cdef void* __nvvmGetErrorString = NULL + * cdef void* __nvvmVersion = NULL + * cdef void* __nvvmIRVersion = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmCreateProgram = NULL + * cdef void* __nvvmDestroyProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmIRVersion = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":63 + * cdef void* __nvvmVersion = NULL + * cdef void* __nvvmIRVersion = NULL + * cdef void* __nvvmCreateProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmDestroyProgram = NULL + * cdef void* __nvvmAddModuleToProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCreateProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":64 + * cdef void* __nvvmIRVersion = NULL + * cdef void* __nvvmCreateProgram = NULL + * cdef void* __nvvmDestroyProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmAddModuleToProgram = NULL + * cdef void* __nvvmLazyAddModuleToProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmDestroyProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":65 + * cdef void* __nvvmCreateProgram = NULL + * cdef void* __nvvmDestroyProgram = NULL + * cdef void* __nvvmAddModuleToProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmLazyAddModuleToProgram = NULL + * cdef void* __nvvmCompileProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmAddModuleToProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":66 + * cdef void* __nvvmDestroyProgram = NULL + * cdef void* __nvvmAddModuleToProgram = NULL + * cdef void* __nvvmLazyAddModuleToProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmCompileProgram = NULL + * cdef void* __nvvmVerifyProgram = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmLazyAddModuleToProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":67 + * cdef void* __nvvmAddModuleToProgram = NULL + * cdef void* __nvvmLazyAddModuleToProgram = NULL + * cdef void* __nvvmCompileProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmVerifyProgram = NULL + * cdef void* __nvvmGetCompiledResultSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmCompileProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":68 + * cdef void* __nvvmLazyAddModuleToProgram = NULL + * cdef void* __nvvmCompileProgram = NULL + * cdef void* __nvvmVerifyProgram = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmGetCompiledResultSize = NULL + * cdef void* __nvvmGetCompiledResult = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmVerifyProgram = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":69 + * cdef void* __nvvmCompileProgram = NULL + * cdef void* __nvvmVerifyProgram = NULL + * cdef void* __nvvmGetCompiledResultSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmGetCompiledResult = NULL + * cdef void* __nvvmGetProgramLogSize = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResultSize = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":70 + * cdef void* __nvvmVerifyProgram = NULL + * cdef void* __nvvmGetCompiledResultSize = NULL + * cdef void* __nvvmGetCompiledResult = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmGetProgramLogSize = NULL + * cdef void* __nvvmGetProgramLog = NULL +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetCompiledResult = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":71 + * cdef void* __nvvmGetCompiledResultSize = NULL + * cdef void* __nvvmGetCompiledResult = NULL + * cdef void* __nvvmGetProgramLogSize = NULL # <<<<<<<<<<<<<< + * cdef void* __nvvmGetProgramLog = NULL + * +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLogSize = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":72 + * cdef void* __nvvmGetCompiledResult = NULL + * cdef void* __nvvmGetProgramLogSize = NULL + * cdef void* __nvvmGetProgramLog = NULL # <<<<<<<<<<<<<< + * + * +*/ + __pyx_v_4cuda_8bindings_9_internal_4nvvm___nvvmGetProgramLog = NULL; + + /* "cuda/bindings/_internal/nvvm.pyx":189 + * + * + * cdef dict func_ptrs = None # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_INCREF(Py_None); + __Pyx_XGOTREF(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs); + __Pyx_DECREF_SET(__pyx_v_4cuda_8bindings_9_internal_4nvvm_func_ptrs, ((PyObject*)Py_None)); + __Pyx_GIVEREF(Py_None); + + /* "cuda/bindings/_internal/nvvm.pyx":192 + * + * + * cpdef dict _inspect_function_pointers(): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is not None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_4nvvm_1_inspect_function_pointers, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointers, __pyx_t_2) < (0)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":243 + * + * + * cpdef _inspect_function_pointer(str name): # <<<<<<<<<<<<<< + * global func_ptrs + * if func_ptrs is None: +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9_internal_4nvvm_3_inspect_function_pointer, 0, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_inspect_function_pointer, __pyx_t_2) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/nvvm.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._internal.nvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._internal.nvvm"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 179 <= 65535 + const unsigned short n; +#elif 179 / 2 < INT_MAX + const unsigned int n; +#elif 179 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_CUDA_driver_is_not_found, sizeof(__pyx_k_CUDA_driver_is_not_found), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_CUDA_driver_is_not_found */ + {__pyx_k_Did_not_find_cuDriverGetVersion, sizeof(__pyx_k_Did_not_find_cuDriverGetVersion), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Did_not_find_cuDriverGetVersion */ + {__pyx_k_FunctionNotFoundError, sizeof(__pyx_k_FunctionNotFoundError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FunctionNotFoundError */ + {__pyx_k_Lock, sizeof(__pyx_k_Lock), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Lock */ + {__pyx_k_NotSupportedError, sizeof(__pyx_k_NotSupportedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NotSupportedError */ + {__pyx_k_Note_that_Cython_is_deliberately, sizeof(__pyx_k_Note_that_Cython_is_deliberately), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Note_that_Cython_is_deliberately */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ + {__pyx_k_add_note, sizeof(__pyx_k_add_note), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_add_note */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuDriverGetVersion_returned_erro, sizeof(__pyx_k_cuDriverGetVersion_returned_erro), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuDriverGetVersion_returned_erro */ + {__pyx_k_cuda_bindings__internal_nvvm, sizeof(__pyx_k_cuda_bindings__internal_nvvm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__internal_nvvm */ + {__pyx_k_cuda_bindings__internal_nvvm_pyx, sizeof(__pyx_k_cuda_bindings__internal_nvvm_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__internal_nvvm_pyx */ + {__pyx_k_cuda_pathfinder, sizeof(__pyx_k_cuda_pathfinder), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_pathfinder */ + {__pyx_k_enter, sizeof(__pyx_k_enter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enter */ + {__pyx_k_exit, sizeof(__pyx_k_exit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_exit */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_function_nvvmAddModuleToProgram, sizeof(__pyx_k_function_nvvmAddModuleToProgram), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmAddModuleToProgram */ + {__pyx_k_function_nvvmCompileProgram_is_n, sizeof(__pyx_k_function_nvvmCompileProgram_is_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmCompileProgram_is_n */ + {__pyx_k_function_nvvmCreateProgram_is_no, sizeof(__pyx_k_function_nvvmCreateProgram_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmCreateProgram_is_no */ + {__pyx_k_function_nvvmDestroyProgram_is_n, sizeof(__pyx_k_function_nvvmDestroyProgram_is_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmDestroyProgram_is_n */ + {__pyx_k_function_nvvmGetCompiledResultSi, sizeof(__pyx_k_function_nvvmGetCompiledResultSi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmGetCompiledResultSi */ + {__pyx_k_function_nvvmGetCompiledResult_i, sizeof(__pyx_k_function_nvvmGetCompiledResult_i), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmGetCompiledResult_i */ + {__pyx_k_function_nvvmGetErrorString_is_n, sizeof(__pyx_k_function_nvvmGetErrorString_is_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmGetErrorString_is_n */ + {__pyx_k_function_nvvmGetProgramLogSize_i, sizeof(__pyx_k_function_nvvmGetProgramLogSize_i), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmGetProgramLogSize_i */ + {__pyx_k_function_nvvmGetProgramLog_is_no, sizeof(__pyx_k_function_nvvmGetProgramLog_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmGetProgramLog_is_no */ + {__pyx_k_function_nvvmIRVersion_is_not_fo, sizeof(__pyx_k_function_nvvmIRVersion_is_not_fo), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmIRVersion_is_not_fo */ + {__pyx_k_function_nvvmLazyAddModuleToProg, sizeof(__pyx_k_function_nvvmLazyAddModuleToProg), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmLazyAddModuleToProg */ + {__pyx_k_function_nvvmVerifyProgram_is_no, sizeof(__pyx_k_function_nvvmVerifyProgram_is_no), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmVerifyProgram_is_no */ + {__pyx_k_function_nvvmVersion_is_not_foun, sizeof(__pyx_k_function_nvvmVersion_is_not_foun), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_function_nvvmVersion_is_not_foun */ + {__pyx_k_handle_uint, sizeof(__pyx_k_handle_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_uint */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_inspect_function_pointer, sizeof(__pyx_k_inspect_function_pointer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointer */ + {__pyx_k_inspect_function_pointers, sizeof(__pyx_k_inspect_function_pointers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_inspect_function_pointers */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_load_nvidia_dynamic_lib, sizeof(__pyx_k_load_nvidia_dynamic_lib), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_nvidia_dynamic_lib */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_nvvm, sizeof(__pyx_k_nvvm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvm */ + {__pyx_k_nvvmAddModuleToProgram, sizeof(__pyx_k_nvvmAddModuleToProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmAddModuleToProgram */ + {__pyx_k_nvvmCompileProgram, sizeof(__pyx_k_nvvmCompileProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmCompileProgram */ + {__pyx_k_nvvmCreateProgram, sizeof(__pyx_k_nvvmCreateProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmCreateProgram */ + {__pyx_k_nvvmDestroyProgram, sizeof(__pyx_k_nvvmDestroyProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmDestroyProgram */ + {__pyx_k_nvvmGetCompiledResult, sizeof(__pyx_k_nvvmGetCompiledResult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmGetCompiledResult */ + {__pyx_k_nvvmGetCompiledResultSize, sizeof(__pyx_k_nvvmGetCompiledResultSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmGetCompiledResultSize */ + {__pyx_k_nvvmGetErrorString, sizeof(__pyx_k_nvvmGetErrorString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmGetErrorString */ + {__pyx_k_nvvmGetProgramLog, sizeof(__pyx_k_nvvmGetProgramLog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmGetProgramLog */ + {__pyx_k_nvvmGetProgramLogSize, sizeof(__pyx_k_nvvmGetProgramLogSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmGetProgramLogSize */ + {__pyx_k_nvvmIRVersion, sizeof(__pyx_k_nvvmIRVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmIRVersion */ + {__pyx_k_nvvmLazyAddModuleToProgram, sizeof(__pyx_k_nvvmLazyAddModuleToProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmLazyAddModuleToProgram */ + {__pyx_k_nvvmVerifyProgram, sizeof(__pyx_k_nvvmVerifyProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmVerifyProgram */ + {__pyx_k_nvvmVersion, sizeof(__pyx_k_nvvmVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmVersion */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_threading, sizeof(__pyx_k_threading), 0, 1, 1}, /* PyObject cname: __pyx_n_u_threading */ + {__pyx_k_utils, sizeof(__pyx_k_utils), 0, 1, 1}, /* PyObject cname: __pyx_n_u_utils */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 44, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_internal/nvvm.pyx":85 + * cdef void* handle = NULL + * + * with gil, __symbol_lock: # <<<<<<<<<<<<<< + * # Load function + * global __nvvmGetErrorString +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 1; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 1; + unsigned int flags : 10; + unsigned int first_line : 8; + unsigned int line_table_length : 13; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 192, 234}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_nvvm_pyx, __pyx_mstate->__pyx_n_u_inspect_function_pointers, __pyx_k_z_q_q_Q_Q_Ja_j_A_Q_z_Q_Q_A_A_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 243, 31}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__internal_nvvm_pyx, __pyx_mstate->__pyx_n_u_inspect_function_pointer, __pyx_k_z_A_a_9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* decode_c_string */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* CIntToDigits */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + if (likely(ulength <= 250)) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) (ulength - 1)); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= ulength; + memset(cpos, padding_char, (size_t) (ulength - 1)); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, ulength - 1); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(int)*3+2]; + char *dpos, *end = digits + sizeof(int)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + int remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'c') { + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (int) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); + } + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (int) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (int) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (int) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + __Pyx_TypeName type_name; + __Pyx_TypeName obj_type_name; + PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; + int from_annotation_subclass = 0; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (!exact) { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } else if (exact == 2) { + if (__Pyx_TypeCheck(obj, type)) { + from_annotation_subclass = 1; + extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; + } + } + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME + ", got " __Pyx_FMT_TYPENAME ")" +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + "%s%U" +#endif + , name, type_name, obj_type_name +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 + , (from_annotation_subclass ? ". " : ""), extra_info +#endif + ); +#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + if (exact == 2 && from_annotation_subclass) { + PyObject *res; + PyObject *vargs[2]; + vargs[0] = PyErr_GetRaisedException(); + vargs[1] = extra_info; + res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); + Py_XDECREF(res); + PyErr_SetRaisedException(vargs[0]); + } +#endif + __Pyx_DECREF_TypeName(type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_kp_u__2); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__3); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..23607424d0b6b7d0e0940d3168604f11c3287deb Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..8ca17dbc4d4da532160b2ba21eed0074b1502d75 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pxd @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from ..cynvvm cimport * + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil +cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pyx new file mode 100644 index 0000000000000000000000000000000000000000..7e82d2a9aa216eb3586e7f94a0339e1d9ed6b50d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm.pyx @@ -0,0 +1,381 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + +cdef int get_cuda_version(): + cdef void* handle = NULL + cdef int err, driver_ver = 0 + + # Load driver to check version + handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) + if handle == NULL: + err_msg = dlerror() + raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + if cuDriverGetVersion == NULL: + raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + err = (cuDriverGetVersion)(&driver_ver) + if err != 0: + raise RuntimeError(f'cuDriverGetVersion returned error code {err}') + + return driver_ver + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvvm_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __nvvmGetErrorString = NULL +cdef void* __nvvmVersion = NULL +cdef void* __nvvmIRVersion = NULL +cdef void* __nvvmCreateProgram = NULL +cdef void* __nvvmDestroyProgram = NULL +cdef void* __nvvmAddModuleToProgram = NULL +cdef void* __nvvmLazyAddModuleToProgram = NULL +cdef void* __nvvmCompileProgram = NULL +cdef void* __nvvmVerifyProgram = NULL +cdef void* __nvvmGetCompiledResultSize = NULL +cdef void* __nvvmGetCompiledResult = NULL +cdef void* __nvvmGetProgramLogSize = NULL +cdef void* __nvvmGetProgramLog = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + return handle + + +cdef int __check_or_init_nvvm() except -1 nogil: + global __py_nvvm_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __nvvmGetErrorString + __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + if __nvvmGetErrorString == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') + + global __nvvmVersion + __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + if __nvvmVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmVersion = dlsym(handle, 'nvvmVersion') + + global __nvvmIRVersion + __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + if __nvvmIRVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') + + global __nvvmCreateProgram + __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + if __nvvmCreateProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') + + global __nvvmDestroyProgram + __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + if __nvvmDestroyProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') + + global __nvvmAddModuleToProgram + __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + if __nvvmAddModuleToProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') + + global __nvvmLazyAddModuleToProgram + __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + if __nvvmLazyAddModuleToProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') + + global __nvvmCompileProgram + __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + if __nvvmCompileProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') + + global __nvvmVerifyProgram + __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + if __nvvmVerifyProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') + + global __nvvmGetCompiledResultSize + __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + if __nvvmGetCompiledResultSize == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') + + global __nvvmGetCompiledResult + __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + if __nvvmGetCompiledResult == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') + + global __nvvmGetProgramLogSize + __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + if __nvvmGetProgramLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') + + global __nvvmGetProgramLog + __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + if __nvvmGetProgramLog == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + + __py_nvvm_init = True + return 0 + + +cdef int _check_or_init_nvvm() except -1 nogil: + if __py_nvvm_init: + return 0 + + return __check_or_init_nvvm() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvvm() + cdef dict data = {} + + global __nvvmGetErrorString + data["__nvvmGetErrorString"] = __nvvmGetErrorString + + global __nvvmVersion + data["__nvvmVersion"] = __nvvmVersion + + global __nvvmIRVersion + data["__nvvmIRVersion"] = __nvvmIRVersion + + global __nvvmCreateProgram + data["__nvvmCreateProgram"] = __nvvmCreateProgram + + global __nvvmDestroyProgram + data["__nvvmDestroyProgram"] = __nvvmDestroyProgram + + global __nvvmAddModuleToProgram + data["__nvvmAddModuleToProgram"] = __nvvmAddModuleToProgram + + global __nvvmLazyAddModuleToProgram + data["__nvvmLazyAddModuleToProgram"] = __nvvmLazyAddModuleToProgram + + global __nvvmCompileProgram + data["__nvvmCompileProgram"] = __nvvmCompileProgram + + global __nvvmVerifyProgram + data["__nvvmVerifyProgram"] = __nvvmVerifyProgram + + global __nvvmGetCompiledResultSize + data["__nvvmGetCompiledResultSize"] = __nvvmGetCompiledResultSize + + global __nvvmGetCompiledResult + data["__nvvmGetCompiledResult"] = __nvvmGetCompiledResult + + global __nvvmGetProgramLogSize + data["__nvvmGetProgramLogSize"] = __nvvmGetProgramLogSize + + global __nvvmGetProgramLog + data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: + global __nvvmGetErrorString + _check_or_init_nvvm() + if __nvvmGetErrorString == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetErrorString is not found") + return (__nvvmGetErrorString)( + result) + + +cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVersion + _check_or_init_nvvm() + if __nvvmVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVersion is not found") + return (__nvvmVersion)( + major, minor) + + +cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmIRVersion + _check_or_init_nvvm() + if __nvvmIRVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmIRVersion is not found") + return (__nvvmIRVersion)( + majorIR, minorIR, majorDbg, minorDbg) + + +cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCreateProgram + _check_or_init_nvvm() + if __nvvmCreateProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCreateProgram is not found") + return (__nvvmCreateProgram)( + prog) + + +cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmDestroyProgram + _check_or_init_nvvm() + if __nvvmDestroyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + return (__nvvmDestroyProgram)( + prog) + + +cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmAddModuleToProgram + _check_or_init_nvvm() + if __nvvmAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + return (__nvvmAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLazyAddModuleToProgram + _check_or_init_nvvm() + if __nvvmLazyAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + return (__nvvmLazyAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCompileProgram + _check_or_init_nvvm() + if __nvvmCompileProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCompileProgram is not found") + return (__nvvmCompileProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVerifyProgram + _check_or_init_nvvm() + if __nvvmVerifyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + return (__nvvmVerifyProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResultSize + _check_or_init_nvvm() + if __nvvmGetCompiledResultSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + return (__nvvmGetCompiledResultSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResult + _check_or_init_nvvm() + if __nvvmGetCompiledResult == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + return (__nvvmGetCompiledResult)( + prog, buffer) + + +cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLogSize + _check_or_init_nvvm() + if __nvvmGetProgramLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + return (__nvvmGetProgramLogSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLog + _check_or_init_nvvm() + if __nvvmGetProgramLog == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + return (__nvvmGetProgramLog)( + prog, buffer) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_linux.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_linux.pyx new file mode 100644 index 0000000000000000000000000000000000000000..7e82d2a9aa216eb3586e7f94a0339e1d9ed6b50d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_linux.pyx @@ -0,0 +1,381 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uintptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + + +############################################################################### +# Extern +############################################################################### + +cdef extern from "" nogil: + void* dlopen(const char*, int) + char* dlerror() + void* dlsym(void*, const char*) + int dlclose(void*) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL + + const void* RTLD_DEFAULT 'RTLD_DEFAULT' + +cdef int get_cuda_version(): + cdef void* handle = NULL + cdef int err, driver_ver = 0 + + # Load driver to check version + handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL) + if handle == NULL: + err_msg = dlerror() + raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})') + cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion") + if cuDriverGetVersion == NULL: + raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1') + err = (cuDriverGetVersion)(&driver_ver) + if err != 0: + raise RuntimeError(f'cuDriverGetVersion returned error code {err}') + + return driver_ver + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvvm_init = False +cdef void* __cuDriverGetVersion = NULL + +cdef void* __nvvmGetErrorString = NULL +cdef void* __nvvmVersion = NULL +cdef void* __nvvmIRVersion = NULL +cdef void* __nvvmCreateProgram = NULL +cdef void* __nvvmDestroyProgram = NULL +cdef void* __nvvmAddModuleToProgram = NULL +cdef void* __nvvmLazyAddModuleToProgram = NULL +cdef void* __nvvmCompileProgram = NULL +cdef void* __nvvmVerifyProgram = NULL +cdef void* __nvvmGetCompiledResultSize = NULL +cdef void* __nvvmGetCompiledResult = NULL +cdef void* __nvvmGetProgramLogSize = NULL +cdef void* __nvvmGetProgramLog = NULL + + +cdef void* load_library() except* with gil: + cdef uintptr_t handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + return handle + + +cdef int __check_or_init_nvvm() except -1 nogil: + global __py_nvvm_init + + cdef void* handle = NULL + + with gil, __symbol_lock: + # Load function + global __nvvmGetErrorString + __nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString') + if __nvvmGetErrorString == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetErrorString = dlsym(handle, 'nvvmGetErrorString') + + global __nvvmVersion + __nvvmVersion = dlsym(RTLD_DEFAULT, 'nvvmVersion') + if __nvvmVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmVersion = dlsym(handle, 'nvvmVersion') + + global __nvvmIRVersion + __nvvmIRVersion = dlsym(RTLD_DEFAULT, 'nvvmIRVersion') + if __nvvmIRVersion == NULL: + if handle == NULL: + handle = load_library() + __nvvmIRVersion = dlsym(handle, 'nvvmIRVersion') + + global __nvvmCreateProgram + __nvvmCreateProgram = dlsym(RTLD_DEFAULT, 'nvvmCreateProgram') + if __nvvmCreateProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmCreateProgram = dlsym(handle, 'nvvmCreateProgram') + + global __nvvmDestroyProgram + __nvvmDestroyProgram = dlsym(RTLD_DEFAULT, 'nvvmDestroyProgram') + if __nvvmDestroyProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmDestroyProgram = dlsym(handle, 'nvvmDestroyProgram') + + global __nvvmAddModuleToProgram + __nvvmAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmAddModuleToProgram') + if __nvvmAddModuleToProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmAddModuleToProgram = dlsym(handle, 'nvvmAddModuleToProgram') + + global __nvvmLazyAddModuleToProgram + __nvvmLazyAddModuleToProgram = dlsym(RTLD_DEFAULT, 'nvvmLazyAddModuleToProgram') + if __nvvmLazyAddModuleToProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmLazyAddModuleToProgram = dlsym(handle, 'nvvmLazyAddModuleToProgram') + + global __nvvmCompileProgram + __nvvmCompileProgram = dlsym(RTLD_DEFAULT, 'nvvmCompileProgram') + if __nvvmCompileProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmCompileProgram = dlsym(handle, 'nvvmCompileProgram') + + global __nvvmVerifyProgram + __nvvmVerifyProgram = dlsym(RTLD_DEFAULT, 'nvvmVerifyProgram') + if __nvvmVerifyProgram == NULL: + if handle == NULL: + handle = load_library() + __nvvmVerifyProgram = dlsym(handle, 'nvvmVerifyProgram') + + global __nvvmGetCompiledResultSize + __nvvmGetCompiledResultSize = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResultSize') + if __nvvmGetCompiledResultSize == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetCompiledResultSize = dlsym(handle, 'nvvmGetCompiledResultSize') + + global __nvvmGetCompiledResult + __nvvmGetCompiledResult = dlsym(RTLD_DEFAULT, 'nvvmGetCompiledResult') + if __nvvmGetCompiledResult == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetCompiledResult = dlsym(handle, 'nvvmGetCompiledResult') + + global __nvvmGetProgramLogSize + __nvvmGetProgramLogSize = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLogSize') + if __nvvmGetProgramLogSize == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetProgramLogSize = dlsym(handle, 'nvvmGetProgramLogSize') + + global __nvvmGetProgramLog + __nvvmGetProgramLog = dlsym(RTLD_DEFAULT, 'nvvmGetProgramLog') + if __nvvmGetProgramLog == NULL: + if handle == NULL: + handle = load_library() + __nvvmGetProgramLog = dlsym(handle, 'nvvmGetProgramLog') + + __py_nvvm_init = True + return 0 + + +cdef int _check_or_init_nvvm() except -1 nogil: + if __py_nvvm_init: + return 0 + + return __check_or_init_nvvm() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvvm() + cdef dict data = {} + + global __nvvmGetErrorString + data["__nvvmGetErrorString"] = __nvvmGetErrorString + + global __nvvmVersion + data["__nvvmVersion"] = __nvvmVersion + + global __nvvmIRVersion + data["__nvvmIRVersion"] = __nvvmIRVersion + + global __nvvmCreateProgram + data["__nvvmCreateProgram"] = __nvvmCreateProgram + + global __nvvmDestroyProgram + data["__nvvmDestroyProgram"] = __nvvmDestroyProgram + + global __nvvmAddModuleToProgram + data["__nvvmAddModuleToProgram"] = __nvvmAddModuleToProgram + + global __nvvmLazyAddModuleToProgram + data["__nvvmLazyAddModuleToProgram"] = __nvvmLazyAddModuleToProgram + + global __nvvmCompileProgram + data["__nvvmCompileProgram"] = __nvvmCompileProgram + + global __nvvmVerifyProgram + data["__nvvmVerifyProgram"] = __nvvmVerifyProgram + + global __nvvmGetCompiledResultSize + data["__nvvmGetCompiledResultSize"] = __nvvmGetCompiledResultSize + + global __nvvmGetCompiledResult + data["__nvvmGetCompiledResult"] = __nvvmGetCompiledResult + + global __nvvmGetProgramLogSize + data["__nvvmGetProgramLogSize"] = __nvvmGetProgramLogSize + + global __nvvmGetProgramLog + data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: + global __nvvmGetErrorString + _check_or_init_nvvm() + if __nvvmGetErrorString == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetErrorString is not found") + return (__nvvmGetErrorString)( + result) + + +cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVersion + _check_or_init_nvvm() + if __nvvmVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVersion is not found") + return (__nvvmVersion)( + major, minor) + + +cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmIRVersion + _check_or_init_nvvm() + if __nvvmIRVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmIRVersion is not found") + return (__nvvmIRVersion)( + majorIR, minorIR, majorDbg, minorDbg) + + +cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCreateProgram + _check_or_init_nvvm() + if __nvvmCreateProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCreateProgram is not found") + return (__nvvmCreateProgram)( + prog) + + +cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmDestroyProgram + _check_or_init_nvvm() + if __nvvmDestroyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + return (__nvvmDestroyProgram)( + prog) + + +cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmAddModuleToProgram + _check_or_init_nvvm() + if __nvvmAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + return (__nvvmAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLazyAddModuleToProgram + _check_or_init_nvvm() + if __nvvmLazyAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + return (__nvvmLazyAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCompileProgram + _check_or_init_nvvm() + if __nvvmCompileProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCompileProgram is not found") + return (__nvvmCompileProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVerifyProgram + _check_or_init_nvvm() + if __nvvmVerifyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + return (__nvvmVerifyProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResultSize + _check_or_init_nvvm() + if __nvvmGetCompiledResultSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + return (__nvvmGetCompiledResultSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResult + _check_or_init_nvvm() + if __nvvmGetCompiledResult == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + return (__nvvmGetCompiledResult)( + prog, buffer) + + +cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLogSize + _check_or_init_nvvm() + if __nvvmGetProgramLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + return (__nvvmGetProgramLogSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLog + _check_or_init_nvvm() + if __nvvmGetProgramLog == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + return (__nvvmGetProgramLog)( + prog, buffer) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_windows.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_windows.pyx new file mode 100644 index 0000000000000000000000000000000000000000..a667642958699d4289beff162934e98b7c1cdf8e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/nvvm_windows.pyx @@ -0,0 +1,345 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t + +import threading +from .utils import FunctionNotFoundError, NotSupportedError + +from cuda.pathfinder import load_nvidia_dynamic_lib + +from libc.stddef cimport wchar_t +from libc.stdint cimport uintptr_t +from cpython cimport PyUnicode_AsWideCharString, PyMem_Free + +from .utils import NotSupportedError + +cdef extern from "windows.h" nogil: + ctypedef void* HMODULE + ctypedef void* HANDLE + ctypedef void* FARPROC + ctypedef unsigned long DWORD + ctypedef const wchar_t *LPCWSTR + ctypedef const char *LPCSTR + + cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + cdef DWORD LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000 + cdef DWORD LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x00000100 + + HMODULE _LoadLibraryExW "LoadLibraryExW"( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ) + + FARPROC _GetProcAddress "GetProcAddress"(HMODULE hModule, LPCSTR lpProcName) + +cdef inline uintptr_t LoadLibraryExW(str path, HANDLE hFile, DWORD dwFlags): + cdef uintptr_t result + cdef wchar_t* wpath = PyUnicode_AsWideCharString(path, NULL) + with nogil: + result = _LoadLibraryExW( + wpath, + hFile, + dwFlags + ) + PyMem_Free(wpath) + return result + +cdef inline void *GetProcAddress(uintptr_t hModule, const char* lpProcName) nogil: + return _GetProcAddress(hModule, lpProcName) + +cdef int get_cuda_version(): + cdef int err, driver_ver = 0 + + # Load driver to check version + handle = LoadLibraryExW("nvcuda.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32) + if handle == 0: + raise NotSupportedError('CUDA driver is not found') + cuDriverGetVersion = GetProcAddress(handle, 'cuDriverGetVersion') + if cuDriverGetVersion == NULL: + raise RuntimeError('something went wrong') + err = (cuDriverGetVersion)(&driver_ver) + if err != 0: + raise RuntimeError('something went wrong') + + return driver_ver + + + +############################################################################### +# Wrapper init +############################################################################### + +cdef object __symbol_lock = threading.Lock() +cdef bint __py_nvvm_init = False + +cdef void* __nvvmGetErrorString = NULL +cdef void* __nvvmVersion = NULL +cdef void* __nvvmIRVersion = NULL +cdef void* __nvvmCreateProgram = NULL +cdef void* __nvvmDestroyProgram = NULL +cdef void* __nvvmAddModuleToProgram = NULL +cdef void* __nvvmLazyAddModuleToProgram = NULL +cdef void* __nvvmCompileProgram = NULL +cdef void* __nvvmVerifyProgram = NULL +cdef void* __nvvmGetCompiledResultSize = NULL +cdef void* __nvvmGetCompiledResult = NULL +cdef void* __nvvmGetProgramLogSize = NULL +cdef void* __nvvmGetProgramLog = NULL + + +cdef int __check_or_init_nvvm() except -1 nogil: + global __py_nvvm_init + + with gil, __symbol_lock: + # Load library + handle = load_nvidia_dynamic_lib("nvvm")._handle_uint + + # Load function + global __nvvmGetErrorString + __nvvmGetErrorString = GetProcAddress(handle, 'nvvmGetErrorString') + + global __nvvmVersion + __nvvmVersion = GetProcAddress(handle, 'nvvmVersion') + + global __nvvmIRVersion + __nvvmIRVersion = GetProcAddress(handle, 'nvvmIRVersion') + + global __nvvmCreateProgram + __nvvmCreateProgram = GetProcAddress(handle, 'nvvmCreateProgram') + + global __nvvmDestroyProgram + __nvvmDestroyProgram = GetProcAddress(handle, 'nvvmDestroyProgram') + + global __nvvmAddModuleToProgram + __nvvmAddModuleToProgram = GetProcAddress(handle, 'nvvmAddModuleToProgram') + + global __nvvmLazyAddModuleToProgram + __nvvmLazyAddModuleToProgram = GetProcAddress(handle, 'nvvmLazyAddModuleToProgram') + + global __nvvmCompileProgram + __nvvmCompileProgram = GetProcAddress(handle, 'nvvmCompileProgram') + + global __nvvmVerifyProgram + __nvvmVerifyProgram = GetProcAddress(handle, 'nvvmVerifyProgram') + + global __nvvmGetCompiledResultSize + __nvvmGetCompiledResultSize = GetProcAddress(handle, 'nvvmGetCompiledResultSize') + + global __nvvmGetCompiledResult + __nvvmGetCompiledResult = GetProcAddress(handle, 'nvvmGetCompiledResult') + + global __nvvmGetProgramLogSize + __nvvmGetProgramLogSize = GetProcAddress(handle, 'nvvmGetProgramLogSize') + + global __nvvmGetProgramLog + __nvvmGetProgramLog = GetProcAddress(handle, 'nvvmGetProgramLog') + + __py_nvvm_init = True + return 0 + + +cdef inline int _check_or_init_nvvm() except -1 nogil: + if __py_nvvm_init: + return 0 + + return __check_or_init_nvvm() + + +cdef dict func_ptrs = None + + +cpdef dict _inspect_function_pointers(): + global func_ptrs + if func_ptrs is not None: + return func_ptrs + + _check_or_init_nvvm() + cdef dict data = {} + + global __nvvmGetErrorString + data["__nvvmGetErrorString"] = __nvvmGetErrorString + + global __nvvmVersion + data["__nvvmVersion"] = __nvvmVersion + + global __nvvmIRVersion + data["__nvvmIRVersion"] = __nvvmIRVersion + + global __nvvmCreateProgram + data["__nvvmCreateProgram"] = __nvvmCreateProgram + + global __nvvmDestroyProgram + data["__nvvmDestroyProgram"] = __nvvmDestroyProgram + + global __nvvmAddModuleToProgram + data["__nvvmAddModuleToProgram"] = __nvvmAddModuleToProgram + + global __nvvmLazyAddModuleToProgram + data["__nvvmLazyAddModuleToProgram"] = __nvvmLazyAddModuleToProgram + + global __nvvmCompileProgram + data["__nvvmCompileProgram"] = __nvvmCompileProgram + + global __nvvmVerifyProgram + data["__nvvmVerifyProgram"] = __nvvmVerifyProgram + + global __nvvmGetCompiledResultSize + data["__nvvmGetCompiledResultSize"] = __nvvmGetCompiledResultSize + + global __nvvmGetCompiledResult + data["__nvvmGetCompiledResult"] = __nvvmGetCompiledResult + + global __nvvmGetProgramLogSize + data["__nvvmGetProgramLogSize"] = __nvvmGetProgramLogSize + + global __nvvmGetProgramLog + data["__nvvmGetProgramLog"] = __nvvmGetProgramLog + + func_ptrs = data + return data + + +cpdef _inspect_function_pointer(str name): + global func_ptrs + if func_ptrs is None: + func_ptrs = _inspect_function_pointers() + return func_ptrs[name] + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* _nvvmGetErrorString(nvvmResult result) except?NULL nogil: + global __nvvmGetErrorString + _check_or_init_nvvm() + if __nvvmGetErrorString == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetErrorString is not found") + return (__nvvmGetErrorString)( + result) + + +cdef nvvmResult _nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVersion + _check_or_init_nvvm() + if __nvvmVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVersion is not found") + return (__nvvmVersion)( + major, minor) + + +cdef nvvmResult _nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmIRVersion + _check_or_init_nvvm() + if __nvvmIRVersion == NULL: + with gil: + raise FunctionNotFoundError("function nvvmIRVersion is not found") + return (__nvvmIRVersion)( + majorIR, minorIR, majorDbg, minorDbg) + + +cdef nvvmResult _nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCreateProgram + _check_or_init_nvvm() + if __nvvmCreateProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCreateProgram is not found") + return (__nvvmCreateProgram)( + prog) + + +cdef nvvmResult _nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmDestroyProgram + _check_or_init_nvvm() + if __nvvmDestroyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmDestroyProgram is not found") + return (__nvvmDestroyProgram)( + prog) + + +cdef nvvmResult _nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmAddModuleToProgram + _check_or_init_nvvm() + if __nvvmAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmAddModuleToProgram is not found") + return (__nvvmAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmLazyAddModuleToProgram + _check_or_init_nvvm() + if __nvvmLazyAddModuleToProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmLazyAddModuleToProgram is not found") + return (__nvvmLazyAddModuleToProgram)( + prog, buffer, size, name) + + +cdef nvvmResult _nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmCompileProgram + _check_or_init_nvvm() + if __nvvmCompileProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmCompileProgram is not found") + return (__nvvmCompileProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmVerifyProgram + _check_or_init_nvvm() + if __nvvmVerifyProgram == NULL: + with gil: + raise FunctionNotFoundError("function nvvmVerifyProgram is not found") + return (__nvvmVerifyProgram)( + prog, numOptions, options) + + +cdef nvvmResult _nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResultSize + _check_or_init_nvvm() + if __nvvmGetCompiledResultSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResultSize is not found") + return (__nvvmGetCompiledResultSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetCompiledResult + _check_or_init_nvvm() + if __nvvmGetCompiledResult == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetCompiledResult is not found") + return (__nvvmGetCompiledResult)( + prog, buffer) + + +cdef nvvmResult _nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLogSize + _check_or_init_nvvm() + if __nvvmGetProgramLogSize == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLogSize is not found") + return (__nvvmGetProgramLogSize)( + prog, bufferSizeRet) + + +cdef nvvmResult _nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + global __nvvmGetProgramLog + _check_or_init_nvvm() + if __nvvmGetProgramLog == NULL: + with gil: + raise FunctionNotFoundError("function nvvmGetProgramLog is not found") + return (__nvvmGetProgramLog)( + prog, buffer) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b3861bf63b6e4e6949d317447cf9d8e41950e185 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.cpp @@ -0,0 +1,12909 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings._internal.utils", + "sources": [ + "cuda/bindings/_internal/utils.pyx" + ] + }, + "module_name": "cuda.bindings._internal.utils" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings___internal__utils +#define __PYX_HAVE_API__cuda__bindings___internal__utils +/* Early includes */ +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include + + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + +#include +#include + + #if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) + #else + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) + #endif + +#include + + #if PY_MAJOR_VERSION <= 2 + #define PyDict_GetItemWithError _PyDict_GetItemWithError + #endif + + + #if PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj) + { + PyObject *obj = PyWeakref_GetObject(ref); + if (obj == NULL) { + // SystemError if ref is NULL + *pobj = NULL; + return -1; + } + if (obj == Py_None) { + *pobj = NULL; + return 0; + } + Py_INCREF(obj); + *pobj = obj; + return 1; + } + #else + #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef + #endif + +#include "pythread.h" + + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get) + #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) + #endif + +#include + + #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600) + // move should be defined for these versions of MSVC, but __cplusplus isn't set usefully + #include + + namespace cython_std { + template typename std::remove_reference::type&& move(T& t) noexcept { return std::move(t); } + template typename std::remove_reference::type&& move(T&& t) noexcept { return std::move(t); } + } + + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/_internal/utils.pyx", + "", + "cpython/contextvars.pxd", + "cpython/type.pxd", + "cpython/bool.pxd", + "cpython/complex.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value; +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; + +/* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value { + int __pyx_n; + PyObject *default_value; +}; + +/* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { + int __pyx_n; + PyObject *default_value; +}; +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource; +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer; + +/* "cuda/bindings/_internal/utils.pxd":156 + * + * + * cdef cppclass nested_resource[T]: # <<<<<<<<<<<<<< + * nullable_unique_ptr[ vector[intptr_t] ] ptrs + * nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr +*/ +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource { + nullable_unique_ptr > ptrs; + nullable_unique_ptr > > nested_resource_ptr; +}; + +/* "cuda/bindings/_internal/utils.pxd":167 + * + * cdef bint is_nested_sequence(data) + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* # <<<<<<<<<<<<<< +*/ +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer { + int __pyx_n; + PyObject *readonly; +}; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* IncludeStringH.proto */ +#include + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_5 +#define __PYX_HAVE_RT_ImportType_proto_3_1_5 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_1_5 { + __Pyx_ImportType_CheckSize_Error_3_1_5 = 0, + __Pyx_ImportType_CheckSize_Warn_3_1_5 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_1_5 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size); +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* LengthHint.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_PyObject_LengthHint(o, defaultval) (defaultval) +#else +#define __Pyx_PyObject_LengthHint(o, defaultval) PyObject_LengthHint(o, defaultval) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ +#endif + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libcpp.vector" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "libcpp.memory" */ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "cpython.exc" */ + +/* Module declarations from "cpython.module" */ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython.list" */ + +/* Module declarations from "cpython.sequence" */ + +/* Module declarations from "cpython.mapping" */ + +/* Module declarations from "cpython.iterator" */ + +/* Module declarations from "cpython.number" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.bool" */ + +/* Module declarations from "cpython.long" */ + +/* Module declarations from "cpython.float" */ + +/* Module declarations from "cython" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.complex" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "cpython.unicode" */ + +/* Module declarations from "cpython.pyport" */ + +/* Module declarations from "cpython.dict" */ + +/* Module declarations from "cpython.instance" */ + +/* Module declarations from "cpython.function" */ + +/* Module declarations from "cpython.method" */ + +/* Module declarations from "cpython.weakref" */ + +/* Module declarations from "cpython.getargs" */ + +/* Module declarations from "cpython.pythread" */ + +/* Module declarations from "cpython.pystate" */ + +/* Module declarations from "cpython.set" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cpython.pycapsule" */ + +/* Module declarations from "cpython.contextvars" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "libcpp.utility" */ + +/* Module declarations from "cuda.bindings._internal.utils" */ +static int __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(PyObject *); /*proto*/ +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, int *); /*proto*/ +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, int32_t *); /*proto*/ +static int __pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, int64_t *); /*proto*/ +static int __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, char *); /*proto*/ +static int __pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, float *); /*proto*/ +static int __pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &, PyObject *, double *); /*proto*/ +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptrs(nullable_unique_ptr > &, PyObject *, void *); /*proto*/ +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *); /*proto*/ +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *); /*proto*/ +static int __pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *); /*proto*/ +static int __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *); /*proto*/ +static int __pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *); /*proto*/ +static int __pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_int(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_int32_t(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_int64_t(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_float(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_double(PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings._internal.utils" +extern int __pyx_module_is_main_cuda__bindings___internal__utils; +int __pyx_module_is_main_cuda__bindings___internal__utils = 0; + +/* Implementation of "cuda.bindings._internal.utils" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_AssertionError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_enumerate; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = ""; +static const char __pyx_k__2[] = "?"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_None[] = "None"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_writable[] = "writable "; +static const char __pyx_k_enumerate[] = "enumerate"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_ValueError[] = "ValueError"; +static const char __pyx_k_mro_entries[] = "__mro_entries__"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_AssertionError[] = "AssertionError"; +static const char __pyx_k_NotSupportedError[] = "NotSupportedError"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_buffer_of_size_bytes[] = "buffer, of size bytes"; +static const char __pyx_k_FunctionNotFoundError[] = "FunctionNotFoundError"; +static const char __pyx_k_cuda_bindings__internal_utils[] = "cuda.bindings._internal.utils"; +static const char __pyx_k_buf_must_be_either_a_Python_int[] = "buf must be either a Python int representing the pointer address to a valid buffer, or a 1D contiguous "; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_4bool_bool; + PyTypeObject *__pyx_ptype_7cpython_7complex_complex; + PyObject *__pyx_tuple[4]; + PyObject *__pyx_string_tab[24]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_AssertionError __pyx_string_tab[1] +#define __pyx_n_u_FunctionNotFoundError __pyx_string_tab[2] +#define __pyx_kp_u_None __pyx_string_tab[3] +#define __pyx_n_u_NotSupportedError __pyx_string_tab[4] +#define __pyx_n_u_RuntimeError __pyx_string_tab[5] +#define __pyx_n_u_ValueError __pyx_string_tab[6] +#define __pyx_kp_u__2 __pyx_string_tab[7] +#define __pyx_kp_u_buf_must_be_either_a_Python_int __pyx_string_tab[8] +#define __pyx_kp_u_buffer_of_size_bytes __pyx_string_tab[9] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[10] +#define __pyx_n_u_cuda_bindings__internal_utils __pyx_string_tab[11] +#define __pyx_n_u_doc __pyx_string_tab[12] +#define __pyx_n_u_enumerate __pyx_string_tab[13] +#define __pyx_n_u_main __pyx_string_tab[14] +#define __pyx_n_u_metaclass __pyx_string_tab[15] +#define __pyx_n_u_module __pyx_string_tab[16] +#define __pyx_n_u_mro_entries __pyx_string_tab[17] +#define __pyx_n_u_name __pyx_string_tab[18] +#define __pyx_n_u_prepare __pyx_string_tab[19] +#define __pyx_n_u_qualname __pyx_string_tab[20] +#define __pyx_n_u_range __pyx_string_tab[21] +#define __pyx_n_u_test __pyx_string_tab[22] +#define __pyx_kp_u_writable __pyx_string_tab[23] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); + for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<24; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); + for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<24; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_int") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * +*/ + +static std::vector __pyx_convert_vector_from_py_int(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_item); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((int)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_int") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_int(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_int32_t(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + int32_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int32_t", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyLong_As_int32_t(__pyx_v_item); if (unlikely((__pyx_t_6 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((int32_t)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_int32_t") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_int32_t(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int32_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_int64_t(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + int64_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_int64_t", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyLong_As_int64_t(__pyx_v_item); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((int64_t)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_int64_t") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_int64_t(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_int64_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_float(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + float __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_float", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyFloat_AsFloat(__pyx_v_item); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((float)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_float") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_float(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_float", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_double(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + double __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_double", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyFloat_AsDouble(__pyx_v_item); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((double)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_double") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_double(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_double", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":23 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: + * return self.cval.real # <<<<<<<<<<<<<< + * + * # unavailable in limited API +*/ + __pyx_r = __pyx_v_self->cval.real; + goto __pyx_L0; + + /* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":29 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: + * return self.cval.imag # <<<<<<<<<<<<<< + * + * # PyTypeObject PyComplex_Type +*/ + __pyx_r = __pyx_v_self->cval.imag; + goto __pyx_L0; + + /* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":121 + * or None if no such value or default was found. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":122 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< + * if value is NULL: + * # context variable does not have a default +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 122, __pyx_L1_error) + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + __pyx_t_2 = (__pyx_v_value == NULL); + if (__pyx_t_2) { + + /* "cpython/contextvars.pxd":125 + * if value is NULL: + * # context variable does not have a default + * pyvalue = default_value # <<<<<<<<<<<<<< + * else: + * # value or default value of context variable +*/ + __Pyx_INCREF(__pyx_v_default_value); + __pyx_v_pyvalue = __pyx_v_default_value; + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + goto __pyx_L3; + } + + /* "cpython/contextvars.pxd":128 + * else: + * # value or default value of context variable + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_pyvalue = __pyx_t_3; + __pyx_t_3 = 0; + + /* "cpython/contextvars.pxd":129 + * # value or default value of context variable + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue + * +*/ + Py_XDECREF(__pyx_v_value); + } + __pyx_L3:; + + /* "cpython/contextvars.pxd":130 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value_no_default", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":140 + * Ignores the default value of the context variable, if any. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":141 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< + * # value of context variable or 'default_value' + * pyvalue = value +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 141, __pyx_L1_error) + + /* "cpython/contextvars.pxd":143 + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_pyvalue = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cpython/contextvars.pxd":144 + * # value of context variable or 'default_value' + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue +*/ + Py_XDECREF(__pyx_v_value); + + /* "cpython/contextvars.pxd":145 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cuda/bindings/_internal/utils.pyx":11 + * + * + * cdef bint is_nested_sequence(data): # <<<<<<<<<<<<<< + * if not cpython.PySequence_Check(data): + * return False +*/ + +static int __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(PyObject *__pyx_v_data) { + PyObject *__pyx_v_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("is_nested_sequence", 0); + + /* "cuda/bindings/_internal/utils.pyx":12 + * + * cdef bint is_nested_sequence(data): + * if not cpython.PySequence_Check(data): # <<<<<<<<<<<<<< + * return False + * else: +*/ + __pyx_t_1 = (!PySequence_Check(__pyx_v_data)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":13 + * cdef bint is_nested_sequence(data): + * if not cpython.PySequence_Check(data): + * return False # <<<<<<<<<<<<<< + * else: + * for i in data: +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":12 + * + * cdef bint is_nested_sequence(data): + * if not cpython.PySequence_Check(data): # <<<<<<<<<<<<<< + * return False + * else: +*/ + } + + /* "cuda/bindings/_internal/utils.pyx":15 + * return False + * else: + * for i in data: # <<<<<<<<<<<<<< + * if not cpython.PySequence_Check(i): + * return False +*/ + /*else*/ { + if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) { + __pyx_t_2 = __pyx_v_data; __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 15, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_3); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 15, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_2); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 15, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/_internal/utils.pyx":16 + * else: + * for i in data: + * if not cpython.PySequence_Check(i): # <<<<<<<<<<<<<< + * return False + * else: +*/ + __pyx_t_1 = (!PySequence_Check(__pyx_v_i)); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":17 + * for i in data: + * if not cpython.PySequence_Check(i): + * return False # <<<<<<<<<<<<<< + * else: + * return True +*/ + __pyx_r = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":16 + * else: + * for i in data: + * if not cpython.PySequence_Check(i): # <<<<<<<<<<<<<< + * return False + * else: +*/ + } + + /* "cuda/bindings/_internal/utils.pyx":15 + * return False + * else: + * for i in data: # <<<<<<<<<<<<<< + * if not cpython.PySequence_Check(i): + * return False +*/ + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + /*else*/ { + + /* "cuda/bindings/_internal/utils.pyx":19 + * return False + * else: + * return True # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 1; + goto __pyx_L0; + } + } + + /* "cuda/bindings/_internal/utils.pyx":11 + * + * + * cdef bint is_nested_sequence(data): # <<<<<<<<<<<<<< + * if not cpython.PySequence_Check(data): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings._internal.utils.is_nested_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/utils.pyx":22 + * + * + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=True) except*: # <<<<<<<<<<<<<< + * """The caller must ensure ``buf`` is alive when the returned pointer is in use.""" + * cdef void* bufPtr +*/ + +static void *__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(PyObject *__pyx_v_buf, Py_ssize_t __pyx_v_size, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args) { + PyObject *__pyx_v_readonly = ((PyObject *)Py_True); + void *__pyx_v_bufPtr; + int __pyx_v_flags; + int __pyx_v_status; + Py_buffer __pyx_v_view; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_v_adj = NULL; + void *__pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + intptr_t __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + void *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16[3]; + PyObject *__pyx_t_17 = NULL; + size_t __pyx_t_18; + int __pyx_t_19; + char const *__pyx_t_20; + PyObject *__pyx_t_21 = NULL; + PyObject *__pyx_t_22 = NULL; + PyObject *__pyx_t_23 = NULL; + PyObject *__pyx_t_24 = NULL; + PyObject *__pyx_t_25 = NULL; + PyObject *__pyx_t_26 = NULL; + char const *__pyx_t_27; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_buffer_pointer", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_readonly = __pyx_optional_args->readonly; + } + } + + /* "cuda/bindings/_internal/utils.pyx":25 + * """The caller must ensure ``buf`` is alive when the returned pointer is in use.""" + * cdef void* bufPtr + * cdef int flags = cpython.PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< + * if not readonly: + * flags |= cpython.PyBUF_WRITABLE +*/ + __pyx_v_flags = PyBUF_ANY_CONTIGUOUS; + + /* "cuda/bindings/_internal/utils.pyx":26 + * cdef void* bufPtr + * cdef int flags = cpython.PyBUF_ANY_CONTIGUOUS + * if not readonly: # <<<<<<<<<<<<<< + * flags |= cpython.PyBUF_WRITABLE + * cdef int status = -1 +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_readonly); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/_internal/utils.pyx":27 + * cdef int flags = cpython.PyBUF_ANY_CONTIGUOUS + * if not readonly: + * flags |= cpython.PyBUF_WRITABLE # <<<<<<<<<<<<<< + * cdef int status = -1 + * cdef cpython.Py_buffer view +*/ + __pyx_v_flags = (__pyx_v_flags | PyBUF_WRITABLE); + + /* "cuda/bindings/_internal/utils.pyx":26 + * cdef void* bufPtr + * cdef int flags = cpython.PyBUF_ANY_CONTIGUOUS + * if not readonly: # <<<<<<<<<<<<<< + * flags |= cpython.PyBUF_WRITABLE + * cdef int status = -1 +*/ + } + + /* "cuda/bindings/_internal/utils.pyx":28 + * if not readonly: + * flags |= cpython.PyBUF_WRITABLE + * cdef int status = -1 # <<<<<<<<<<<<<< + * cdef cpython.Py_buffer view + * +*/ + __pyx_v_status = -1; + + /* "cuda/bindings/_internal/utils.pyx":31 + * cdef cpython.Py_buffer view + * + * if isinstance(buf, int): # <<<<<<<<<<<<<< + * bufPtr = buf + * else: # try buffer protocol +*/ + __pyx_t_2 = PyLong_Check(__pyx_v_buf); + if (__pyx_t_2) { + + /* "cuda/bindings/_internal/utils.pyx":32 + * + * if isinstance(buf, int): + * bufPtr = buf # <<<<<<<<<<<<<< + * else: # try buffer protocol + * try: +*/ + __pyx_t_3 = PyLong_AsSsize_t(__pyx_v_buf); if (unlikely((__pyx_t_3 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_v_bufPtr = ((void *)((intptr_t)__pyx_t_3)); + + /* "cuda/bindings/_internal/utils.pyx":31 + * cdef cpython.Py_buffer view + * + * if isinstance(buf, int): # <<<<<<<<<<<<<< + * bufPtr = buf + * else: # try buffer protocol +*/ + goto __pyx_L4; + } + + /* "cuda/bindings/_internal/utils.pyx":34 + * bufPtr = buf + * else: # try buffer protocol + * try: # <<<<<<<<<<<<<< + * status = cpython.PyObject_GetBuffer(buf, &view, flags) + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind +*/ + /*else*/ { + /*try:*/ { + { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_6); + /*try:*/ { + + /* "cuda/bindings/_internal/utils.pyx":35 + * else: # try buffer protocol + * try: + * status = cpython.PyObject_GetBuffer(buf, &view, flags) # <<<<<<<<<<<<<< + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind + * if size != -1: +*/ + __pyx_t_7 = PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_view), __pyx_v_flags); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 35, __pyx_L8_error) + __pyx_v_status = __pyx_t_7; + + /* "cuda/bindings/_internal/utils.pyx":37 + * status = cpython.PyObject_GetBuffer(buf, &view, flags) + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind + * if size != -1: # <<<<<<<<<<<<<< + * assert view.len == size + * assert view.ndim == 1 +*/ + __pyx_t_2 = (__pyx_v_size != -1L); + if (__pyx_t_2) { + + /* "cuda/bindings/_internal/utils.pyx":38 + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind + * if size != -1: + * assert view.len == size # <<<<<<<<<<<<<< + * assert view.ndim == 1 + * except Exception as e: +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_2 = (__pyx_v_view.len == __pyx_v_size); + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(0, 38, __pyx_L8_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 38, __pyx_L8_error) + #endif + + /* "cuda/bindings/_internal/utils.pyx":37 + * status = cpython.PyObject_GetBuffer(buf, &view, flags) + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind + * if size != -1: # <<<<<<<<<<<<<< + * assert view.len == size + * assert view.ndim == 1 +*/ + } + + /* "cuda/bindings/_internal/utils.pyx":39 + * if size != -1: + * assert view.len == size + * assert view.ndim == 1 # <<<<<<<<<<<<<< + * except Exception as e: + * adj = "writable " if not readonly else "" +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_2 = (__pyx_v_view.ndim == 1); + if (unlikely(!__pyx_t_2)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(0, 39, __pyx_L8_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 39, __pyx_L8_error) + #endif + + /* "cuda/bindings/_internal/utils.pyx":34 + * bufPtr = buf + * else: # try buffer protocol + * try: # <<<<<<<<<<<<<< + * status = cpython.PyObject_GetBuffer(buf, &view, flags) + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind +*/ + } + + /* "cuda/bindings/_internal/utils.pyx":47 + * "buffer, of size bytes") from e + * else: + * bufPtr = view.buf # <<<<<<<<<<<<<< + * finally: + * if status == 0: +*/ + /*else:*/ { + __pyx_t_8 = __pyx_v_view.buf; + __pyx_v_bufPtr = __pyx_t_8; + } + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + goto __pyx_L13_try_end; + __pyx_L8_error:; + + /* "cuda/bindings/_internal/utils.pyx":40 + * assert view.len == size + * assert view.ndim == 1 + * except Exception as e: # <<<<<<<<<<<<<< + * adj = "writable " if not readonly else "" + * raise ValueError( +*/ + __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); + if (__pyx_t_7) { + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_buffer_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 40, __pyx_L10_except_error) + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_10); + __pyx_v_e = __pyx_t_10; + /*try:*/ { + + /* "cuda/bindings/_internal/utils.pyx":41 + * assert view.ndim == 1 + * except Exception as e: + * adj = "writable " if not readonly else "" # <<<<<<<<<<<<<< + * raise ValueError( + * "buf must be either a Python int representing the pointer " +*/ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_readonly); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 41, __pyx_L20_error) + __pyx_t_1 = (!__pyx_t_2); + if (__pyx_t_1) { + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_writable); + __pyx_t_12 = __pyx_mstate_global->__pyx_kp_u_writable; + } else { + __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_); + __pyx_t_12 = __pyx_mstate_global->__pyx_kp_u_; + } + __pyx_v_adj = ((PyObject*)__pyx_t_12); + __pyx_t_12 = 0; + + /* "cuda/bindings/_internal/utils.pyx":42 + * except Exception as e: + * adj = "writable " if not readonly else "" + * raise ValueError( # <<<<<<<<<<<<<< + * "buf must be either a Python int representing the pointer " + * f"address to a valid buffer, or a 1D contiguous {adj}" +*/ + __pyx_t_13 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_14 = __pyx_builtin_ValueError; + + /* "cuda/bindings/_internal/utils.pyx":44 + * raise ValueError( + * "buf must be either a Python int representing the pointer " + * f"address to a valid buffer, or a 1D contiguous {adj}" # <<<<<<<<<<<<<< + * "buffer, of size bytes") from e + * else: +*/ + __pyx_t_15 = __Pyx_PyUnicode_Unicode(__pyx_v_adj); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 44, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_15); + __pyx_t_16[0] = __pyx_mstate_global->__pyx_kp_u_buf_must_be_either_a_Python_int; + __pyx_t_16[1] = __pyx_t_15; + __pyx_t_16[2] = __pyx_mstate_global->__pyx_kp_u_buffer_of_size_bytes; + + /* "cuda/bindings/_internal/utils.pyx":43 + * adj = "writable " if not readonly else "" + * raise ValueError( + * "buf must be either a Python int representing the pointer " # <<<<<<<<<<<<<< + * f"address to a valid buffer, or a 1D contiguous {adj}" + * "buffer, of size bytes") from e +*/ + __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, 103 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + 21, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15)); + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 43, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_18 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_17}; + __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_18, (2-__pyx_t_18) | (__pyx_t_18*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 42, __pyx_L20_error) + __Pyx_GOTREF(__pyx_t_12); + } + + /* "cuda/bindings/_internal/utils.pyx":45 + * "buf must be either a Python int representing the pointer " + * f"address to a valid buffer, or a 1D contiguous {adj}" + * "buffer, of size bytes") from e # <<<<<<<<<<<<<< + * else: + * bufPtr = view.buf +*/ + __Pyx_Raise(__pyx_t_12, 0, 0, __pyx_v_e); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __PYX_ERR(0, 42, __pyx_L20_error) + } + + /* "cuda/bindings/_internal/utils.pyx":40 + * assert view.len == size + * assert view.ndim == 1 + * except Exception as e: # <<<<<<<<<<<<<< + * adj = "writable " if not readonly else "" + * raise ValueError( +*/ + /*finally:*/ { + __pyx_L20_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); + if ( unlikely(__Pyx_GetException(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_21); + __Pyx_XGOTREF(__pyx_t_22); + __Pyx_XGOTREF(__pyx_t_23); + __Pyx_XGOTREF(__pyx_t_24); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_26); + __pyx_t_7 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; + { + __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; + } + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_21); + __Pyx_XGIVEREF(__pyx_t_22); + __Pyx_XGIVEREF(__pyx_t_23); + __Pyx_ErrRestore(__pyx_t_21, __pyx_t_22, __pyx_t_23); + __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; + __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; + goto __pyx_L10_except_error; + } + } + } + goto __pyx_L10_except_error; + + /* "cuda/bindings/_internal/utils.pyx":34 + * bufPtr = buf + * else: # try buffer protocol + * try: # <<<<<<<<<<<<<< + * status = cpython.PyObject_GetBuffer(buf, &view, flags) + * # when the caller does not provide a size, it is set to -1 at generate-time by cybind +*/ + __pyx_L10_except_error:; + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); + goto __pyx_L6_error; + __pyx_L13_try_end:; + } + } + + /* "cuda/bindings/_internal/utils.pyx":49 + * bufPtr = view.buf + * finally: + * if status == 0: # <<<<<<<<<<<<<< + * cpython.PyBuffer_Release(&view) + * +*/ + /*finally:*/ { + /*normal exit:*/{ + __pyx_t_1 = (__pyx_v_status == 0); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":50 + * finally: + * if status == 0: + * cpython.PyBuffer_Release(&view) # <<<<<<<<<<<<<< + * + * return bufPtr +*/ + PyBuffer_Release((&__pyx_v_view)); + + /* "cuda/bindings/_internal/utils.pyx":49 + * bufPtr = view.buf + * finally: + * if status == 0: # <<<<<<<<<<<<<< + * cpython.PyBuffer_Release(&view) + * +*/ + } + goto __pyx_L7; + } + __pyx_L6_error:; + /*exception exit:*/{ + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_ExceptionSwap(&__pyx_t_26, &__pyx_t_25, &__pyx_t_24); + if ( unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_t_5); + __Pyx_XGOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_t_26); + __Pyx_XGOTREF(__pyx_t_25); + __Pyx_XGOTREF(__pyx_t_24); + __pyx_t_19 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_27 = __pyx_filename; + { + __pyx_t_1 = (__pyx_v_status == 0); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":50 + * finally: + * if status == 0: + * cpython.PyBuffer_Release(&view) # <<<<<<<<<<<<<< + * + * return bufPtr +*/ + PyBuffer_Release((&__pyx_v_view)); + + /* "cuda/bindings/_internal/utils.pyx":49 + * bufPtr = view.buf + * finally: + * if status == 0: # <<<<<<<<<<<<<< + * cpython.PyBuffer_Release(&view) + * +*/ + } + } + __Pyx_XGIVEREF(__pyx_t_26); + __Pyx_XGIVEREF(__pyx_t_25); + __Pyx_XGIVEREF(__pyx_t_24); + __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_25, __pyx_t_24); + __Pyx_XGIVEREF(__pyx_t_6); + __Pyx_XGIVEREF(__pyx_t_5); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4); + __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; + __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_27; + goto __pyx_L1_error; + } + __pyx_L7:; + } + } + __pyx_L4:; + + /* "cuda/bindings/_internal/utils.pyx":52 + * cpython.PyBuffer_Release(&view) + * + * return bufPtr # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_bufPtr; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":22 + * + * + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=True) except*: # <<<<<<<<<<<<<< + * """The caller must ensure ``buf`` is alive when the returned pointer is in use.""" + * cdef void* bufPtr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_buffer_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XDECREF(__pyx_v_adj); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_0get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int32_t *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int32_t __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_1get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_As_int32_t(__pyx_t_6); if (unlikely((__pyx_t_7 == ((int32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int64_t *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int64_t __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_2get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_As_int64_t(__pyx_t_6); if (unlikely((__pyx_t_7 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED char *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + char __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_3get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_As_char(__pyx_t_6); if (unlikely((__pyx_t_7 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED float *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + float __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_4get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED double *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + double __pyx_t_7; + intptr_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_5get_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":59 + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 59, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 59, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":62 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":63 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = obj[i] + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":64 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = obj[i] # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = __pyx_t_7; + } + + /* "cuda/bindings/_internal/utils.pyx":58 + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[ResT](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":66 + * deref(vec)[i] = obj[i] + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_8 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_8 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_8)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":67 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":57 + * # Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, + * # so we need a dummy (__unused) input argument to help it + * cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[ResT](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/utils.pyx":70 + * + * + * cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[PtrT*](len(obj)) +*/ + +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptrs(nullable_unique_ptr > &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED void *__pyx_v___unused) { + std::vector *__pyx_v_vec; + Py_ssize_t __pyx_v_i; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector *__pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + intptr_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_0get_resource_ptrs", 0); + + /* "cuda/bindings/_internal/utils.pyx":71 + * + * cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[PtrT*](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":72 + * cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: + * if cpython.PySequence_Check(obj): + * vec = new vector[PtrT*](len(obj)) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 72, __pyx_L1_error) + try { + __pyx_t_3 = new std::vector (__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 72, __pyx_L1_error) + } + __pyx_v_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":75 + * # set the ownership immediately to avoid leaking the `vec` memory in + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) # <<<<<<<<<<<<<< + * for i in range(len(obj)): + * deref(vec)[i] = (obj[i]) +*/ + __pyx_v_in_out_ptr.reset(__pyx_v_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":76 + * # case of exception in the following loop + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): # <<<<<<<<<<<<<< + * deref(vec)[i] = (obj[i]) + * else: +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "cuda/bindings/_internal/utils.pyx":77 + * in_out_ptr.reset(vec, True) + * for i in range(len(obj)): + * deref(vec)[i] = (obj[i]) # <<<<<<<<<<<<<< + * else: + * in_out_ptr.reset(obj, False) +*/ + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyLong_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_7 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + ((*__pyx_v_vec)[__pyx_v_i]) = ((void *)((intptr_t)__pyx_t_7)); + } + + /* "cuda/bindings/_internal/utils.pyx":71 + * + * cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: + * if cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * vec = new vector[PtrT*](len(obj)) + * # set the ownership immediately to avoid leaking the `vec` memory in +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":79 + * deref(vec)[i] = (obj[i]) + * else: + * in_out_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * return 0 + * +*/ + /*else*/ { + __pyx_t_7 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_7 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_v_in_out_ptr.reset(((std::vector *)((intptr_t)__pyx_t_7)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":80 + * else: + * in_out_ptr.reset(obj, False) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":70 + * + * + * cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: # <<<<<<<<<<<<<< + * if cpython.PySequence_Check(obj): + * vec = new vector[PtrT*](len(obj)) +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_resource_ptrs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + std::vector __pyx_t_9; + intptr_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_0get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":108 + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + * else: + * deref(nested_res_vec)[i] = obj_i # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): +*/ + __pyx_t_9 = __pyx_convert_vector_from_py_int(__pyx_v_obj_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + ((*__pyx_v_nested_res_vec)[__pyx_v_i]) = __pyx_t_9; + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_10; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_10 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_10)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = cython_std::move > > >(__pyx_v_nested_res_ptr); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int32_t *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + std::vector __pyx_t_9; + intptr_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_1get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":108 + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + * else: + * deref(nested_res_vec)[i] = obj_i # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): +*/ + __pyx_t_9 = __pyx_convert_vector_from_py_int32_t(__pyx_v_obj_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + ((*__pyx_v_nested_res_vec)[__pyx_v_i]) = __pyx_t_9; + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_10; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_10 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_10)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = ((nullable_unique_ptr > > )cython_std::move > > >(__pyx_v_nested_res_ptr)); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED int64_t *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + std::vector __pyx_t_9; + intptr_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_2get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":108 + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + * else: + * deref(nested_res_vec)[i] = obj_i # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): +*/ + __pyx_t_9 = __pyx_convert_vector_from_py_int64_t(__pyx_v_obj_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + ((*__pyx_v_nested_res_vec)[__pyx_v_i]) = __pyx_t_9; + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_10; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_10 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_10)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = ((nullable_unique_ptr > > )cython_std::move > > >(__pyx_v_nested_res_ptr)); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED char *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + PyObject *__pyx_v_obj_i_bytes = NULL; + size_t __pyx_v_str_len; + char *__pyx_v_obj_i_ptr; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_9; + char *__pyx_t_10; + intptr_t __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_3get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":101 + * for i, obj_i in enumerate(obj): + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() # <<<<<<<<<<<<<< + * str_len = (len(obj_i_bytes)) + 1 # including null termination + * deref(nested_res_vec)[i].resize(str_len) +*/ + if (!(likely(PyUnicode_CheckExact(__pyx_v_obj_i)) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_obj_i))) __PYX_ERR(0, 101, __pyx_L1_error) + if (unlikely(__pyx_v_obj_i == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 101, __pyx_L1_error) + } + __pyx_t_8 = PyUnicode_AsEncodedString(((PyObject*)__pyx_v_obj_i), NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i_bytes, ((PyObject*)__pyx_t_8)); + __pyx_t_8 = 0; + + /* "cuda/bindings/_internal/utils.pyx":102 + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() + * str_len = (len(obj_i_bytes)) + 1 # including null termination # <<<<<<<<<<<<<< + * deref(nested_res_vec)[i].resize(str_len) + * obj_i_ptr = (obj_i_bytes) +*/ + __pyx_t_9 = __Pyx_PyBytes_GET_SIZE(__pyx_v_obj_i_bytes); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_v_str_len = (((size_t)__pyx_t_9) + 1); + + /* "cuda/bindings/_internal/utils.pyx":103 + * obj_i_bytes = ((obj_i)).encode() + * str_len = (len(obj_i_bytes)) + 1 # including null termination + * deref(nested_res_vec)[i].resize(str_len) # <<<<<<<<<<<<<< + * obj_i_ptr = (obj_i_bytes) + * # cast to size_t explicitly to work around a potentially Cython bug +*/ + try { + ((*__pyx_v_nested_res_vec)[__pyx_v_i]).resize(__pyx_v_str_len); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 103, __pyx_L1_error) + } + + /* "cuda/bindings/_internal/utils.pyx":104 + * str_len = (len(obj_i_bytes)) + 1 # including null termination + * deref(nested_res_vec)[i].resize(str_len) + * obj_i_ptr = (obj_i_bytes) # <<<<<<<<<<<<<< + * # cast to size_t explicitly to work around a potentially Cython bug + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) +*/ + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_obj_i_bytes); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_v_obj_i_ptr = ((char *)__pyx_t_10); + + /* "cuda/bindings/_internal/utils.pyx":106 + * obj_i_ptr = (obj_i_bytes) + * # cast to size_t explicitly to work around a potentially Cython bug + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) # <<<<<<<<<<<<<< + * else: + * deref(nested_res_vec)[i] = obj_i +*/ + try { + ((*__pyx_v_nested_res_vec)[__pyx_v_i]).assign(__pyx_v_obj_i_ptr, (__pyx_v_obj_i_ptr + ((size_t)__pyx_v_str_len))); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 106, __pyx_L1_error) + } + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_11; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_11 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_11 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_11)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = cython_std::move > > >(__pyx_v_nested_res_ptr); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_XDECREF(__pyx_v_obj_i_bytes); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED float *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + std::vector __pyx_t_9; + intptr_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_4get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":108 + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + * else: + * deref(nested_res_vec)[i] = obj_i # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): +*/ + __pyx_t_9 = __pyx_convert_vector_from_py_float(__pyx_v_obj_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + ((*__pyx_v_nested_res_vec)[__pyx_v_i]) = __pyx_t_9; + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_10; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_10 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_10)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = cython_std::move > > >(__pyx_v_nested_res_ptr); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &__pyx_v_in_out_ptr, PyObject *__pyx_v_obj, CYTHON_UNUSED double *__pyx_v___unused) { + nullable_unique_ptr > __pyx_v_nested_ptr; + nullable_unique_ptr > > __pyx_v_nested_res_ptr; + std::vector *__pyx_v_nested_vec; + std::vector > *__pyx_v_nested_res_vec; + size_t __pyx_v_i; + size_t __pyx_v_length; + intptr_t __pyx_v_addr; + PyObject *__pyx_v_obj_i = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + Py_ssize_t __pyx_t_2; + std::vector > *__pyx_t_3; + std::vector *__pyx_t_4; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; + std::vector __pyx_t_9; + intptr_t __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_fuse_5get_nested_resource_ptr", 0); + + /* "cuda/bindings/_internal/utils.pyx":86 + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL # <<<<<<<<<<<<<< + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 +*/ + __pyx_v_nested_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":87 + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL # <<<<<<<<<<<<<< + * cdef size_t i = 0, length = 0 + * cdef intptr_t addr +*/ + __pyx_v_nested_res_vec = NULL; + + /* "cuda/bindings/_internal/utils.pyx":88 + * cdef vector[intptr_t]* nested_vec = NULL + * cdef vector[vector[ResT]]* nested_res_vec = NULL + * cdef size_t i = 0, length = 0 # <<<<<<<<<<<<<< + * cdef intptr_t addr + * +*/ + __pyx_v_i = 0; + __pyx_v_length = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence(__pyx_v_obj); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":92 + * + * if is_nested_sequence(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":93 + * if is_nested_sequence(obj): + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * # set the ownership immediately to avoid leaking memory in case of +*/ + try { + __pyx_t_3 = new std::vector > (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 93, __pyx_L1_error) + } + __pyx_v_nested_res_vec = __pyx_t_3; + + /* "cuda/bindings/_internal/utils.pyx":94 + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 94, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":97 + * # set the ownership immediately to avoid leaking memory in case of + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): +*/ + __pyx_v_nested_res_ptr.reset(__pyx_v_nested_res_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":98 + * # exception in the following loop + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, obj_i in enumerate(obj): + * if ResT is char: +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 99, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __Pyx_XDECREF_SET(__pyx_v_obj_i, __pyx_t_8); + __pyx_t_8 = 0; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":108 + * deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + * else: + * deref(nested_res_vec)[i] = obj_i # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): +*/ + __pyx_t_9 = __pyx_convert_vector_from_py_double(__pyx_v_obj_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) + ((*__pyx_v_nested_res_vec)[__pyx_v_i]) = __pyx_t_9; + + /* "cuda/bindings/_internal/utils.pyx":109 + * else: + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) # <<<<<<<<<<<<<< + * elif cpython.PySequence_Check(obj): + * length = len(obj) +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = ((intptr_t)((*__pyx_v_nested_res_vec)[__pyx_v_i]).data()); + + /* "cuda/bindings/_internal/utils.pyx":99 + * nested_res_ptr.reset(nested_res_vec, True) + * nested_ptr.reset(nested_vec, True) + * for i, obj_i in enumerate(obj): # <<<<<<<<<<<<<< + * if ResT is char: + * obj_i_bytes = ((obj_i)).encode() +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":91 + * cdef intptr_t addr + * + * if is_nested_sequence(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_res_vec = new vector[vector[ResT]](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + __pyx_t_1 = PySequence_Check(__pyx_v_obj); + if (__pyx_t_1) { + + /* "cuda/bindings/_internal/utils.pyx":111 + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): + * length = len(obj) # <<<<<<<<<<<<<< + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) +*/ + __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_v_length = __pyx_t_2; + + /* "cuda/bindings/_internal/utils.pyx":112 + * elif cpython.PySequence_Check(obj): + * length = len(obj) + * nested_vec = new vector[intptr_t](length) # <<<<<<<<<<<<<< + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): +*/ + try { + __pyx_t_4 = new std::vector (__pyx_v_length); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 112, __pyx_L1_error) + } + __pyx_v_nested_vec = __pyx_t_4; + + /* "cuda/bindings/_internal/utils.pyx":113 + * length = len(obj) + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) # <<<<<<<<<<<<<< + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr +*/ + __pyx_v_nested_ptr.reset(__pyx_v_nested_vec, 1); + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_v_obj)) || PyTuple_CheckExact(__pyx_v_obj)) { + __pyx_t_6 = __pyx_v_obj; __Pyx_INCREF(__pyx_t_6); + __pyx_t_2 = 0; + __pyx_t_7 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obj); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_7)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2)); + #else + __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + } else { + __pyx_t_8 = __pyx_t_7(__pyx_t_6); + if (unlikely(!__pyx_t_8)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 114, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = PyLong_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_addr = __pyx_t_10; + __pyx_v_i = __pyx_t_5; + __pyx_t_5 = (__pyx_t_5 + 1); + + /* "cuda/bindings/_internal/utils.pyx":115 + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr # <<<<<<<<<<<<<< + * nested_res_ptr.reset(NULL, False) + * else: +*/ + ((*__pyx_v_nested_vec)[__pyx_v_i]) = __pyx_v_addr; + + /* "cuda/bindings/_internal/utils.pyx":114 + * nested_vec = new vector[intptr_t](length) + * nested_ptr.reset(nested_vec, True) + * for i, addr in enumerate(obj): # <<<<<<<<<<<<<< + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_internal/utils.pyx":116 + * for i, addr in enumerate(obj): + * deref(nested_vec)[i] = addr + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * else: + * # obj is an int (ResT**) +*/ + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":110 + * deref(nested_res_vec)[i] = obj_i + * deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + * elif cpython.PySequence_Check(obj): # <<<<<<<<<<<<<< + * length = len(obj) + * nested_vec = new vector[intptr_t](length) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_internal/utils.pyx":119 + * else: + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) # <<<<<<<<<<<<<< + * nested_ptr.reset(obj, False) + * +*/ + /*else*/ { + __pyx_v_nested_res_ptr.reset(NULL, 0); + + /* "cuda/bindings/_internal/utils.pyx":120 + * # obj is an int (ResT**) + * nested_res_ptr.reset(NULL, False) + * nested_ptr.reset(obj, False) # <<<<<<<<<<<<<< + * + * in_out_ptr.ptrs = move(nested_ptr) +*/ + __pyx_t_10 = PyLong_AsSsize_t(__pyx_v_obj); if (unlikely((__pyx_t_10 == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_v_nested_ptr.reset(((std::vector *)((intptr_t)__pyx_t_10)), 0); + } + __pyx_L3:; + + /* "cuda/bindings/_internal/utils.pyx":122 + * nested_ptr.reset(obj, False) + * + * in_out_ptr.ptrs = move(nested_ptr) # <<<<<<<<<<<<<< + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 +*/ + __pyx_v_in_out_ptr.ptrs = cython_std::move > >(__pyx_v_nested_ptr); + + /* "cuda/bindings/_internal/utils.pyx":123 + * + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_v_in_out_ptr.nested_resource_ptr = cython_std::move > > >(__pyx_v_nested_res_ptr); + + /* "cuda/bindings/_internal/utils.pyx":124 + * in_out_ptr.ptrs = move(nested_ptr) + * in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/_internal/utils.pyx":83 + * + * + * cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: # <<<<<<<<<<<<<< + * cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + * cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings._internal.utils.get_nested_resource_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_obj_i); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("is_nested_sequence", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_5utils_is_nested_sequence, "int (PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_buffer_pointer", (void (*)(void))__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer, "void *(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_0get_resource_ptr", (void (*)(void))__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_1get_resource_ptr", (void (*)(void))__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_2get_resource_ptr", (void (*)(void))__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_3get_resource_ptr", (void (*)(void))__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_4get_resource_ptr", (void (*)(void))__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_5get_resource_ptr", (void (*)(void))__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_0get_resource_ptrs", (void (*)(void))__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptrs, "int (nullable_unique_ptr > &, PyObject *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_0get_nested_resource_ptr", (void (*)(void))__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_1get_nested_resource_ptr", (void (*)(void))__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_2get_nested_resource_ptr", (void (*)(void))__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_3get_nested_resource_ptr", (void (*)(void))__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_4get_nested_resource_ptr", (void (*)(void))__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("__pyx_fuse_5get_nested_resource_ptr", (void (*)(void))__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyLongObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyLongObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyComplexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyComplexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_utils(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_utils}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "utils", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_utils(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_utils(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_utils(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'utils' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "utils" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_utils", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings___internal__utils) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings._internal.utils")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings._internal.utils", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + (void)__Pyx_modinit_function_import_code(__pyx_mstate); + /*--- Execution code ---*/ + + /* "cuda/bindings/_internal/utils.pyx":127 + * + * + * class FunctionNotFoundError(RuntimeError): pass # <<<<<<<<<<<<<< + * + * class NotSupportedError(RuntimeError): pass +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[1]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 127, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionNotFoundError, __pyx_t_5) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/utils.pyx":129 + * class FunctionNotFoundError(RuntimeError): pass + * + * class NotSupportedError(RuntimeError): pass # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_mstate_global->__pyx_n_u_NotSupportedError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings__internal_utils, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[3]) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[3]) < 0))) __PYX_ERR(0, 129, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotSupportedError, __pyx_t_5) < (0)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_internal/utils.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings._internal.utils", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings._internal.utils"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 103 <= 65535 + const unsigned short n; +#elif 103 / 2 < INT_MAX + const unsigned int n; +#elif 103 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AssertionError */ + {__pyx_k_FunctionNotFoundError, sizeof(__pyx_k_FunctionNotFoundError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FunctionNotFoundError */ + {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_None */ + {__pyx_k_NotSupportedError, sizeof(__pyx_k_NotSupportedError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NotSupportedError */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ValueError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k_buf_must_be_either_a_Python_int, sizeof(__pyx_k_buf_must_be_either_a_Python_int), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_buf_must_be_either_a_Python_int */ + {__pyx_k_buffer_of_size_bytes, sizeof(__pyx_k_buffer_of_size_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_buffer_of_size_bytes */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuda_bindings__internal_utils, sizeof(__pyx_k_cuda_bindings__internal_utils), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings__internal_utils */ + {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ + {__pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enumerate */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_writable, sizeof(__pyx_k_writable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_writable */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 99, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/_internal/utils.pyx":127 + * + * + * class FunctionNotFoundError(RuntimeError): pass # <<<<<<<<<<<<<< + * + * class NotSupportedError(RuntimeError): pass +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + + /* "cuda/bindings/_internal/utils.pyx":129 + * class FunctionNotFoundError(RuntimeError): pass + * + * class NotSupportedError(RuntimeError): pass # <<<<<<<<<<<<<< +*/ + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* GetTopmostException */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_PyList_GetItemRef(o, n); + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_1_5 +#define __PYX_HAVE_RT_ImportType_3_1_5 +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_5 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_5 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int32_t __Pyx_PyLong_As_int32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int32_t) -1; + val = __Pyx_PyLong_As_int32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) { + return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) { + return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) { + return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) { + return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int32_t"); + return (int32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int32_t"); + return (int32_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int64_t __Pyx_PyLong_As_int64_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int64_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int64_t) -1; + val = __Pyx_PyLong_As_int64_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) { + return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) { + return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) { + return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int64_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int64_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) { + return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int64_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int64_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int64_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int64_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int64_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (int64_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int64_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int64_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int64_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int64_t"); + return (int64_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int64_t"); + return (int64_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE char __Pyx_PyLong_As_char(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const char neg_one = (char) -1, const_zero = (char) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + char val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (char) -1; + val = __Pyx_PyLong_As_char(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(char) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(char) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + char val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (char) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (char) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (char) -1; + } else { + stepval = v; + } + v = NULL; + val = (char) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((char) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((char) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (char) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd new file mode 100644 index 0000000000000000000000000000000000000000..30f7935afb99d8bef09356bbd0ab9ee8f50e11ee --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pxd @@ -0,0 +1,167 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from libc.stdint cimport int32_t, int64_t, intptr_t +from libcpp.vector cimport vector +from libcpp cimport bool as cppbool +from libcpp cimport nullptr_t, nullptr +from libcpp.memory cimport unique_ptr + + +cdef extern from * nogil: + """ + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + """ + # xref: cython/Cython/Includes/libcpp/memory.pxd + cdef cppclass nullable_unique_ptr[T]: + nullable_unique_ptr() + nullable_unique_ptr(T*, cppbool) + nullable_unique_ptr(nullable_unique_ptr[T]&) + + # Modifiers + void reset(T*, cppbool) + void swap(nullable_unique_ptr&) + + # Observers + T* get() + T& operator*() + void* data() + + +ctypedef fused ResT: + int + int32_t + int64_t + char + float + double + + +ctypedef fused PtrT: + void + + +cdef cppclass nested_resource[T]: + nullable_unique_ptr[ vector[intptr_t] ] ptrs + nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr + + +# accepts the output pointer as input to use the return value for exception propagation +cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1 +cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1 +cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1 + +cdef bint is_nested_sequence(data) +cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pyx new file mode 100644 index 0000000000000000000000000000000000000000..aa78e6cff011015fecca0ba773763c4f5b1ccf70 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_internal/utils.pyx @@ -0,0 +1,129 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +cimport cpython +from libc.stdint cimport intptr_t +from libcpp.utility cimport move +from cython.operator cimport dereference as deref + + +cdef bint is_nested_sequence(data): + if not cpython.PySequence_Check(data): + return False + else: + for i in data: + if not cpython.PySequence_Check(i): + return False + else: + return True + + +cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=True) except*: + """The caller must ensure ``buf`` is alive when the returned pointer is in use.""" + cdef void* bufPtr + cdef int flags = cpython.PyBUF_ANY_CONTIGUOUS + if not readonly: + flags |= cpython.PyBUF_WRITABLE + cdef int status = -1 + cdef cpython.Py_buffer view + + if isinstance(buf, int): + bufPtr = buf + else: # try buffer protocol + try: + status = cpython.PyObject_GetBuffer(buf, &view, flags) + # when the caller does not provide a size, it is set to -1 at generate-time by cybind + if size != -1: + assert view.len == size + assert view.ndim == 1 + except Exception as e: + adj = "writable " if not readonly else "" + raise ValueError( + "buf must be either a Python int representing the pointer " + f"address to a valid buffer, or a 1D contiguous {adj}" + "buffer, of size bytes") from e + else: + bufPtr = view.buf + finally: + if status == 0: + cpython.PyBuffer_Release(&view) + + return bufPtr + + +# Cython can't infer the ResT overload when it is wrapped in nullable_unique_ptr, +# so we need a dummy (__unused) input argument to help it +cdef int get_resource_ptr(nullable_unique_ptr[vector[ResT]] &in_out_ptr, object obj, ResT* __unused) except 1: + if cpython.PySequence_Check(obj): + vec = new vector[ResT](len(obj)) + # set the ownership immediately to avoid leaking the `vec` memory in + # case of exception in the following loop + in_out_ptr.reset(vec, True) + for i in range(len(obj)): + deref(vec)[i] = obj[i] + else: + in_out_ptr.reset(obj, False) + return 0 + + +cdef int get_resource_ptrs(nullable_unique_ptr[ vector[PtrT*] ] &in_out_ptr, object obj, PtrT* __unused) except 1: + if cpython.PySequence_Check(obj): + vec = new vector[PtrT*](len(obj)) + # set the ownership immediately to avoid leaking the `vec` memory in + # case of exception in the following loop + in_out_ptr.reset(vec, True) + for i in range(len(obj)): + deref(vec)[i] = (obj[i]) + else: + in_out_ptr.reset(obj, False) + return 0 + + +cdef int get_nested_resource_ptr(nested_resource[ResT] &in_out_ptr, object obj, ResT* __unused) except 1: + cdef nullable_unique_ptr[ vector[intptr_t] ] nested_ptr + cdef nullable_unique_ptr[ vector[vector[ResT]] ] nested_res_ptr + cdef vector[intptr_t]* nested_vec = NULL + cdef vector[vector[ResT]]* nested_res_vec = NULL + cdef size_t i = 0, length = 0 + cdef intptr_t addr + + if is_nested_sequence(obj): + length = len(obj) + nested_res_vec = new vector[vector[ResT]](length) + nested_vec = new vector[intptr_t](length) + # set the ownership immediately to avoid leaking memory in case of + # exception in the following loop + nested_res_ptr.reset(nested_res_vec, True) + nested_ptr.reset(nested_vec, True) + for i, obj_i in enumerate(obj): + if ResT is char: + obj_i_bytes = ((obj_i)).encode() + str_len = (len(obj_i_bytes)) + 1 # including null termination + deref(nested_res_vec)[i].resize(str_len) + obj_i_ptr = (obj_i_bytes) + # cast to size_t explicitly to work around a potentially Cython bug + deref(nested_res_vec)[i].assign(obj_i_ptr, obj_i_ptr + str_len) + else: + deref(nested_res_vec)[i] = obj_i + deref(nested_vec)[i] = (deref(nested_res_vec)[i].data()) + elif cpython.PySequence_Check(obj): + length = len(obj) + nested_vec = new vector[intptr_t](length) + nested_ptr.reset(nested_vec, True) + for i, addr in enumerate(obj): + deref(nested_vec)[i] = addr + nested_res_ptr.reset(NULL, False) + else: + # obj is an int (ResT**) + nested_res_ptr.reset(NULL, False) + nested_ptr.reset(obj, False) + + in_out_ptr.ptrs = move(nested_ptr) + in_out_ptr.nested_resource_ptr = move(nested_res_ptr) + return 0 + + +class FunctionNotFoundError(RuntimeError): pass + +class NotSupportedError(RuntimeError): pass diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89a24f392d533256bccbb5e652727c93f85d1270 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..763b5cd92ef833f407d1dc446fb87aaf634f0366 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..48f87f29caf4e93aef95c2d197c48064d7f4da19 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxd @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +cimport cuda.bindings.cyruntime as cyruntime +cimport cuda.bindings._bindings.cydriver as _cydriver + +# These graphics API are the reimplemented version of what's supported by CUDA Runtime. +# Issue https://github.com/NVIDIA/cuda-python/issues/488 will remove them by letting us +# use call into the static library directly. +# +# This is an ABI breaking change which can only happen in a major version bump. + +# This file is included from cuda/bindings/_bindings/cyruntime.pxd.in but kept in a +# separate file to keep it separated from the auto-generated code there. + +# Prior to https://github.com/NVIDIA/cuda-python/pull/914, this was two +# independent modules (c.b._lib.cyruntime.cyruntime and +# c.b._lib.cyruntime.utils), but was merged into one. + +cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +# utility functions + +cdef cudaError_t getDriverEglFrame(_cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t getRuntimeEglFrame(cyruntime.cudaEglFrame *eglFrame, _cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi new file mode 100644 index 0000000000000000000000000000000000000000..c18bd1ca2ea4427e3dfc859bceae6e794b307277 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/cyruntime/cyruntime.pxi @@ -0,0 +1,1176 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# These graphics API are the reimplemented version of what's supported by CUDA Runtime. +# Issue https://github.com/NVIDIA/cuda-python/issues/488 will remove them by letting us +# use call into the static library directly. + +# This file is included from cuda/bindings/_bindings/cyruntime.pyx.in but kept in a +# separate file to keep it separated from the auto-generated code there. + +# Prior to https://github.com/NVIDIA/cuda-python/pull/914, this was two +# independent modules (c.b._lib.cyruntime.cyruntime and +# c.b._lib.cyruntime.utils), but was merged into one. + +from libc.string cimport memset +cimport cuda.bindings._bindings.cydriver as cydriver + +cdef cudaError_t _cudaEGLStreamProducerPresentFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + cdef cydriver.CUeglFrame cueglFrame + err = getDriverEglFrame(&cueglFrame, eglframe) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerPresentFrame(conn, cueglFrame, pStream) + return err + +cdef cudaError_t _cudaEGLStreamProducerReturnFrame(cyruntime.cudaEglStreamConnection* conn, cyruntime.cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + if eglframe == NULL: + err = cudaErrorInvalidResourceHandle + return err + cdef cydriver.CUeglFrame cueglFrame + err = cydriver._cuEGLStreamProducerReturnFrame(conn, &cueglFrame, pStream) + if err != cudaSuccess: + return err + err = getRuntimeEglFrame(eglframe, cueglFrame) + return err + +cdef cudaError_t _cudaGraphicsResourceGetMappedEglFrame(cyruntime.cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + cdef cydriver.CUeglFrame cueglFrame + memset(&cueglFrame, 0, sizeof(cueglFrame)) + err = cydriver._cuGraphicsResourceGetMappedEglFrame(&cueglFrame, resource, index, mipLevel) + if err != cudaSuccess: + return err + err = getRuntimeEglFrame(eglFrame, cueglFrame) + return err + +cdef cudaError_t _cudaVDPAUSetVDPAUDevice(int device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + return cudaErrorNotSupported + +cdef cudaError_t _cudaVDPAUGetDevice(int* device, cyruntime.VdpDevice vdpDevice, cyruntime.VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + return err + +cdef cudaError_t _cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, cyruntime.VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + return err + +cdef cudaError_t _cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, cyruntime.VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + return err + +cdef cudaError_t _cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cyruntime.cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + return err + +cdef cudaError_t _cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, cyruntime.GLuint image, cyruntime.GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsGLRegisterImage(resource, image, target, flags) + return err + +cdef cudaError_t _cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, cyruntime.GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsGLRegisterBuffer(resource, buffer, flags) + return err + +cdef cudaError_t _cudaGraphicsEGLRegisterImage(cudaGraphicsResource_t* pCudaResource, cyruntime.EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + return err + +cdef cudaError_t _cudaEGLStreamConsumerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerConnect(conn, eglStream) + return err + +cdef cudaError_t _cudaEGLStreamConsumerConnectWithFlags(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + return err + +cdef cudaError_t _cudaEGLStreamConsumerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerDisconnect(conn) + return err + +cdef cudaError_t _cudaEGLStreamConsumerAcquireFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + return err + +cdef cudaError_t _cudaEGLStreamConsumerReleaseFrame(cyruntime.cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + return err + +cdef cudaError_t _cudaEGLStreamProducerConnect(cyruntime.cudaEglStreamConnection* conn, cyruntime.EGLStreamKHR eglStream, cyruntime.EGLint width, cyruntime.EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerConnect(conn, eglStream, width, height) + return err + +cdef cudaError_t _cudaEGLStreamProducerDisconnect(cyruntime.cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEGLStreamProducerDisconnect(conn) + return err + +cdef cudaError_t _cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, cyruntime.EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + # cudaFree(0) is a NOP operations that initializes the context state + err = cudaFree(0) + if err != cudaSuccess: + return err + err = cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + return err + +## utility functions + +cdef int case_desc(const cudaChannelFormatDesc* d, int x, int y, int z, int w, int f) except ?cudaErrorCallRequiresNewerDriver nogil: + return d[0].x == x and d[0].y == y and d[0].z == z and d[0].w == w and d[0].f == f + + +cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChannels, cydriver.CUarray_format *format) except ?cudaErrorCallRequiresNewerDriver nogil: + # Check validity + if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSigned, + cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + if (d[0].x != 8) and (d[0].x != 16) and (d[0].x != 32): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindFloat,): + if (d[0].x != 16) and (d[0].x != 32): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12,): + if (d[0].x != 8) or (d[0].y != 8) or (d[0].z != 8) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4,): + if (d[0].x != 8): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4,): + if (d[0].x != 16): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB,): + if (d[0].x != 8): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): + return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + return cudaErrorInvalidChannelDescriptor + else: + return cudaErrorInvalidChannelDescriptor + + # If Y is non-zero, it must match X + # If Z is non-zero, it must match Y + # If W is non-zero, it must match Z + if (((d[0].y != 0) and (d[0].y != d[0].x)) or + ((d[0].z != 0) and (d[0].z != d[0].y)) or + ((d[0].w != 0) and (d[0].w != d[0].z))): + if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + return cudaErrorInvalidChannelDescriptor + if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindSigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindUnsigned): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + elif case_desc(d, 16, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 16, 16, 16, 16, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + elif case_desc(d, 32, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 32, 0, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 32, 32, 32, 32, cudaChannelFormatKind.cudaChannelFormatKindFloat): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + elif case_desc(d, 8, 8, 8, 0, cudaChannelFormatKind.cudaChannelFormatKindNV12): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + elif case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4): + numberOfChannels[0] = 1 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + elif case_desc(d, 8, 8, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5): + numberOfChannels[0] = 2 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + elif case_desc(d, 16, 16, 16, 0, cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H): + numberOfChannels[0] = 3 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 + else: + return cudaErrorInvalidChannelDescriptor + + if d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindNV12, + cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): + if numberOfChannels[0] != 3: + return cudaErrorInvalidChannelDescriptor + else: + if (numberOfChannels[0] != 1) and (numberOfChannels[0] != 2) and (numberOfChannels[0] != 4): + return cudaErrorInvalidChannelDescriptor + return cudaSuccess + +cdef cudaError_t getChannelFormatDescFromDriverDesc(cudaChannelFormatDesc* pRuntimeDesc, size_t* pDepth, size_t* pHeight, size_t* pWidth, const cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2* pDriverDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef int channel_size = 0 + if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT8: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNSIGNED_INT32: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsigned + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT8: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SIGNED_INT32: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSigned + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_HALF: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_FLOAT: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindFloat + channel_size = 32 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_NV12: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindNV12 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT8X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT8X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT16X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X1: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_SNORM_INT16X4: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC1_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC2_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC3_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC4_SNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC5_SNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_UF16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC6H_SF16: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + channel_size = 16 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + else: + return cudaErrorInvalidChannelDescriptor + + # populate bits per channel + pRuntimeDesc[0].x = 0 + pRuntimeDesc[0].y = 0 + pRuntimeDesc[0].z = 0 + pRuntimeDesc[0].w = 0 + + if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: + pRuntimeDesc[0].w = 2 + pRuntimeDesc[0].z = 10 + pRuntimeDesc[0].y = 10 + pRuntimeDesc[0].x = 10 + else: + if pDriverDesc[0].NumChannels >= 4: + pRuntimeDesc[0].w = channel_size + if pDriverDesc[0].NumChannels >= 3: + pRuntimeDesc[0].z = channel_size + if pDriverDesc[0].NumChannels >= 2: + pRuntimeDesc[0].y = channel_size + if pDriverDesc[0].NumChannels >= 1: + pRuntimeDesc[0].x = channel_size + + if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): + return cudaErrorInvalidChannelDescriptor + + # populate dimensions + if pDepth != NULL: + pDepth[0] = pDriverDesc[0].Depth + if pHeight != NULL: + pHeight[0] = pDriverDesc[0].Height + if pWidth != NULL: + pWidth[0] = pDriverDesc[0].Width + return cudaSuccess + +cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cyruntime.cudaEglFrame eglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + cdef unsigned int i = 0 + + err = getDescInfo(&eglFrame.planeDesc[0].channelDesc, &cuEglFrame[0].numChannels, &cuEglFrame[0].cuFormat) + if err != cudaSuccess: + return err + for i in range(eglFrame.planeCount): + if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + cuEglFrame[0].frame.pArray[i] = eglFrame.frame.pArray[i] + else: + cuEglFrame[0].frame.pPitch[i] = eglFrame.frame.pPitch[i].ptr + cuEglFrame[0].width = eglFrame.planeDesc[0].width + cuEglFrame[0].height = eglFrame.planeDesc[0].height + cuEglFrame[0].depth = eglFrame.planeDesc[0].depth + cuEglFrame[0].pitch = eglFrame.planeDesc[0].pitch + cuEglFrame[0].planeCount = eglFrame.planeCount + if eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV422: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY422: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatARGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRGBA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatABGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBGRA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatL: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatUYVY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUYV_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatAYUV_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerGBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer14GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20RGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20BGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer20GBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspRGGB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspBGGR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGRBG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerIspGBRG: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU444Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU422Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerBCCR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerRCCB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCRBC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayerCBRC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer10CCCC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12BCCR: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12RCCB: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CRBC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CBRC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatBayer12CCCC: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUV420Planar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVU420Planar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYUVA: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatYVYU: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatVYUY: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + elif eglFrame.eglColorFormat == cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER + else: + return cudaErrorInvalidValue + if eglFrame.frameType == cyruntime.cudaEglFrameTypeArray: + cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + elif eglFrame.frameType == cyruntime.cudaEglFrameTypePitch: + cuEglFrame[0].frameType = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH + else: + return cudaErrorInvalidValue + +@cython.show_performance_hints(False) +cdef cudaError_t getRuntimeEglFrame(cyruntime.cudaEglFrame *eglFrame, cydriver.CUeglFrame cueglFrame) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + cdef unsigned int i + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2 ad + cdef cudaPitchedPtr pPtr + memset(eglFrame, 0, sizeof(eglFrame[0])) + memset(&ad, 0, sizeof(ad)) + for i in range(cueglFrame.planeCount): + ad.Depth = cueglFrame.depth + ad.Flags = 0 + ad.Format = cueglFrame.cuFormat + ad.Height = cueglFrame.height + ad.NumChannels = cueglFrame.numChannels + ad.Width = cueglFrame.width + + err = getChannelFormatDescFromDriverDesc(&eglFrame[0].planeDesc[i].channelDesc, NULL, NULL, NULL, &ad) + if err != cudaSuccess: + return err + + eglFrame[0].planeDesc[i].depth = cueglFrame.depth + eglFrame[0].planeDesc[i].numChannels = cueglFrame.numChannels + if i == 0: + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = (cueglFrame.height / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + eglFrame[0].planeDesc[i].width = (cueglFrame.width / 2) + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].pitch = (cueglFrame.pitch / 2) + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + elif (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[i].height = cueglFrame.height + eglFrame[0].planeDesc[i].width = cueglFrame.width + eglFrame[0].planeDesc[i].pitch = cueglFrame.pitch + eglFrame[0].planeDesc[1].channelDesc.y = 8 + if (cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER or + cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER): + eglFrame[0].planeDesc[1].channelDesc.y = 16 + if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + eglFrame[0].frame.pArray[i] = cueglFrame.frame.pArray[i] + else: + pPtr = make_cudaPitchedPtr(cueglFrame.frame.pPitch[i], eglFrame[0].planeDesc[i].pitch, + eglFrame[0].planeDesc[i].width, eglFrame[0].planeDesc[i].height) + eglFrame[0].frame.pPitch[i] = pPtr + + eglFrame[0].planeCount = cueglFrame.planeCount + if cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV422 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY422 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatARGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRGBA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatABGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBGRA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatL + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatUYVY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUYV_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatAYUV_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV422SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerGBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer14GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20RGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20BGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer20GBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspRGGB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspBGGR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGRBG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerIspGBRG + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU444Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU422Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerBCCR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerRCCB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCRBC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayerCBRC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer10CCCC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12BCCR + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12RCCB + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CRBC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CBRC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatBayer12CCCC + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUV420Planar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVU420Planar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYUVA + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatYVYU + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatVYUY + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER: + eglFrame[0].eglColorFormat = cyruntime.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + else: + return cudaErrorInvalidValue + if cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY: + eglFrame[0].frameType = cyruntime.cudaEglFrameTypeArray + elif cueglFrame.frameType == cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH: + eglFrame[0].frameType = cyruntime.cudaEglFrameTypePitch + else: + return cudaErrorInvalidValue diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd new file mode 100644 index 0000000000000000000000000000000000000000..2ae95814396cab6134db80754e52e6f7b68bf979 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/dlfcn.pxd @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +cdef extern from "" nogil: + void *dlopen(const char *, int) + char *dlerror() + void *dlsym(void *, const char *) + int dlclose(void *) + + enum: + RTLD_LAZY + RTLD_NOW + RTLD_GLOBAL + RTLD_LOCAL diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h new file mode 100644 index 0000000000000000000000000000000000000000..96c56b4fe4e0f2d3ec4d7dc87d7f66b3df545d79 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.h @@ -0,0 +1,152 @@ +// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +// Please refer to the NVIDIA end user license agreement (EULA) associated +// with this source code for terms and conditions that govern your use of +// this software. Any use, reproduction, disclosure, or distribution of +// this software and related documentation outside the terms of the EULA +// is strictly prohibited. + +#include + +#include +#include +#include +#include + +static PyObject* ctypes_module = nullptr; + +static PyTypeObject* ctypes_c_char = nullptr; +static PyTypeObject* ctypes_c_bool = nullptr; +static PyTypeObject* ctypes_c_wchar = nullptr; +static PyTypeObject* ctypes_c_byte = nullptr; +static PyTypeObject* ctypes_c_ubyte = nullptr; +static PyTypeObject* ctypes_c_short = nullptr; +static PyTypeObject* ctypes_c_ushort = nullptr; +static PyTypeObject* ctypes_c_int = nullptr; +static PyTypeObject* ctypes_c_uint = nullptr; +static PyTypeObject* ctypes_c_long = nullptr; +static PyTypeObject* ctypes_c_ulong = nullptr; +static PyTypeObject* ctypes_c_longlong = nullptr; +static PyTypeObject* ctypes_c_ulonglong = nullptr; +static PyTypeObject* ctypes_c_size_t = nullptr; +static PyTypeObject* ctypes_c_float = nullptr; +static PyTypeObject* ctypes_c_double = nullptr; +static PyTypeObject* ctypes_c_void_p = nullptr; + +static void fetch_ctypes() +{ + ctypes_module = PyImport_ImportModule("ctypes"); + if (ctypes_module == nullptr) + throw std::runtime_error("Cannot import ctypes module"); + // get method addressof + PyObject* ctypes_dict = PyModule_GetDict(ctypes_module); + if (ctypes_dict == nullptr) + throw std::runtime_error(std::string("FAILURE @ ") + std::string(__FILE__) + " : " + std::to_string(__LINE__)); + // supportedtypes + ctypes_c_char = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_char"); + ctypes_c_bool = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_bool"); + ctypes_c_wchar = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_wchar"); + ctypes_c_byte = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_byte"); + ctypes_c_ubyte = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_ubyte"); + ctypes_c_short = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_short"); + ctypes_c_ushort = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_ushort"); + ctypes_c_int = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_int"); + ctypes_c_uint = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_uint"); + ctypes_c_long = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_long"); + ctypes_c_ulong = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_ulong"); + ctypes_c_longlong = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_longlong"); + ctypes_c_ulonglong = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_ulonglong"); + ctypes_c_size_t = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_size_t"); + ctypes_c_float = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_float"); + ctypes_c_double = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_double"); + ctypes_c_void_p = (PyTypeObject*) PyDict_GetItemString(ctypes_dict, "c_void_p"); // == c_voidp +} + + +// (target type, source type) +static std::map, std::function> m_feeders; + +static void populate_feeders(PyTypeObject* target_t, PyTypeObject* source_t) +{ + if (target_t == ctypes_c_int) + { + if (source_t == &PyLong_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((int*)ptr) = (int)PyLong_AsLong(value); + return sizeof(int); + }; + return; + } + } else if (target_t == ctypes_c_bool) { + if (source_t == &PyBool_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((bool*)ptr) = (value == Py_True); + return sizeof(bool); + }; + return; + } + } else if (target_t == ctypes_c_byte) { + if (source_t == &PyLong_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((int8_t*)ptr) = (int8_t)PyLong_AsLong(value); + return sizeof(int8_t); + }; + return; + } + } else if (target_t == ctypes_c_double) { + if (source_t == &PyFloat_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((double*)ptr) = (double)PyFloat_AsDouble(value); + return sizeof(double); + }; + return; + } + } else if (target_t == ctypes_c_float) { + if (source_t == &PyFloat_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((float*)ptr) = (float)PyFloat_AsDouble(value); + return sizeof(float); + }; + return; + } + } else if (target_t == ctypes_c_longlong) { + if (source_t == &PyLong_Type) + { + m_feeders[{target_t,source_t}] = [](void* ptr, PyObject* value) -> int + { + *((long long*)ptr) = (long long)PyLong_AsLongLong(value); + return sizeof(long long); + }; + return; + } + } +} + +static int feed(void* ptr, PyObject* value, PyObject* type) +{ + PyTypeObject* pto = (PyTypeObject*)type; + if (ctypes_c_int == nullptr) + fetch_ctypes(); + auto found = m_feeders.find({pto,value->ob_type}); + if (found == m_feeders.end()) + { + populate_feeders(pto, value->ob_type); + found = m_feeders.find({pto,value->ob_type}); + } + if (found != m_feeders.end()) + { + return found->second(ptr, value); + } + return 0; +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd new file mode 100644 index 0000000000000000000000000000000000000000..ad7fd95668fb3065b8ffa142ddad22970d23ed55 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/param_packer.pxd @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# Include "param_packer.h" so its contents get compiled into every +# Cython extension module that depends on param_packer.pxd. +cdef extern from "param_packer.h": + int feed(void* ptr, object o, object ct) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd new file mode 100644 index 0000000000000000000000000000000000000000..514b0658466ea975ce2cc8ceff5778633940cd82 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxd @@ -0,0 +1,126 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +cimport cuda.bindings.driver as driver +cimport cuda.bindings.cydriver as cydriver +cimport cuda.bindings.cyruntime as cyruntime +from libcpp.vector cimport vector + +cdef class _HelperKernelParams: + cdef Py_buffer _pybuffer + cdef bint _pyobj_acquired + cdef void** _ckernelParams + cdef char* _ckernelParamsData + cdef int _length + cdef bint _malloc_list_created + +cdef class _HelperInputVoidPtr: + cdef Py_buffer _pybuffer + cdef void* _cptr + cdef bint _pyobj_acquired + +cdef class _HelperCUmemPool_attribute: + cdef void* _cptr + cdef cydriver.CUmemPool_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef int _int_val + cdef driver.cuuint64_t _cuuint64_t_val + +cdef class _HelperCUmem_range_attribute: + cdef void* _cptr + cdef cydriver.CUmem_range_attribute_enum _attr + cdef size_t _data_size + + # Return values + cdef int _int_val # 32 bit integer + cdef int* _int_val_list # 32 bit integer array + +cdef class _HelperCUpointer_attribute: + cdef void* _cptr + cdef cydriver.CUpointer_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef driver.CUcontext _ctx + cdef unsigned int _uint + cdef driver.CUdeviceptr _devptr + cdef void** _void + cdef driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS _token + cdef bint _bool + cdef unsigned long long _ull + cdef size_t _size + cdef driver.CUmemoryPool _mempool + +cdef class _HelperCUgraphMem_attribute: + cdef void* _cptr + cdef cydriver.CUgraphMem_attribute_enum _attr + cdef bint _is_getter + + # Return values + cdef driver.cuuint64_t _cuuint64_t_val + +cdef class _HelperCUjit_option: + cdef void* _cptr + cdef cydriver.CUjit_option_enum _attr + + # Return values + cdef unsigned int _uint + cdef float _float + cdef char* _charstar + cdef cydriver.CUjit_target_enum _target + cdef cydriver.CUjit_fallback_enum _fallback + cdef int _int + cdef cydriver.CUjit_cacheMode_enum _cacheMode + cdef vector[char*] _charstarstar # list of names + cdef _InputVoidPtrPtrHelper _voidstarstar # list of addresses + +cdef class _HelperCudaJitOption: + cdef void* _cptr + cdef cyruntime.cudaJitOption _attr + + # Return values + cdef unsigned int _uint + cdef float _float + cdef char* _charstar + cdef cyruntime.cudaJit_Fallback _fallback + cdef int _int + cdef cyruntime.cudaJit_CacheMode _cacheMode + +cdef class _HelperCUlibraryOption: + cdef void* _cptr + cdef cydriver.CUlibraryOption_enum _attr + + # Return values + cdef unsigned int _uint + +cdef class _HelperCudaLibraryOption: + cdef void* _cptr + cdef cyruntime.cudaLibraryOption _attr + + # Return values + cdef unsigned int _uint + +cdef class _HelperCUmemAllocationHandleType: + cdef void* _cptr + cdef cydriver.CUmemAllocationHandleType_enum _type + + # Return values + cdef int _int + cdef void* _handle + cdef unsigned int _d3dkmt_handle + cdef driver.CUmemFabricHandle _mem_fabric_handle + +cdef class _InputVoidPtrPtrHelper: + cdef void** _cptr + +cdef class _HelperCUcoredumpSettings: + cdef void* _cptr + cdef cydriver.CUcoredumpSettings_enum _attrib + cdef bint _is_getter + cdef size_t _size + + # Return values + cdef bint _bool + cdef char* _charstar diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi new file mode 100644 index 0000000000000000000000000000000000000000..1084d3c948e42b9f7a88a1a49864d0a62c0afdcc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/utils.pxi @@ -0,0 +1,604 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS +from libc.stdlib cimport calloc, free +from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t +from libc.stddef cimport wchar_t +from libc.string cimport memcpy +from enum import Enum as _Enum +import ctypes as _ctypes +cimport cuda.bindings.cydriver as cydriver +import cuda.bindings.driver as _driver +cimport cuda.bindings._lib.param_packer as param_packer + +cdef void* _callocWrapper(length, size): + cdef void* out = calloc(length, size) + if out is NULL: + raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) + return out + +cdef class _HelperKernelParams: + supported_types = { # excluding void_p and None, which are handled specially + _ctypes.c_bool, + _ctypes.c_char, + _ctypes.c_wchar, + _ctypes.c_byte, + _ctypes.c_ubyte, + _ctypes.c_short, + _ctypes.c_ushort, + _ctypes.c_int, + _ctypes.c_uint, + _ctypes.c_long, + _ctypes.c_ulong, + _ctypes.c_longlong, + _ctypes.c_ulonglong, + _ctypes.c_size_t, + _ctypes.c_float, + _ctypes.c_double + } + + max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) + + def __cinit__(self, kernelParams): + self._pyobj_acquired = False + self._malloc_list_created = False + if kernelParams is None: + self._ckernelParams = NULL + elif isinstance(kernelParams, (int)): + # Easy run, user gave us an already configured void** address + self._ckernelParams = kernelParams + elif PyObject_CheckBuffer(kernelParams): + # Easy run, get address from Python Buffer Protocol + err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + if err_buffer == -1: + raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + self._pyobj_acquired = True + self._ckernelParams = self._pybuffer.buf + elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): + # Hard run, construct and fill out contigues memory using provided kernel values and types based + if len(kernelParams[0]) != len(kernelParams[1]): + raise TypeError("Argument 'kernelParams' has tuples with different length") + if len(kernelParams[0]) != 0: + self._length = len(kernelParams[0]) + self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) + self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) + self._malloc_list_created = True + + idx = 0 + data_idx = 0 + for value, ctype in zip(kernelParams[0], kernelParams[1]): + if ctype is None: + # special cases for None + if callable(getattr(value, 'getPtr', None)): + self._ckernelParams[idx] = value.getPtr() + elif isinstance(value, (_ctypes.Structure)): + self._ckernelParams[idx] = _ctypes.addressof(value) + elif isinstance(value, (_Enum)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.value + data_idx += sizeof(int) + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) + elif ctype in _HelperKernelParams.supported_types: + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + + # handle case where a float is passed as a double + if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): + value = ctype(value.value) + if not isinstance(value, ctype): # make it a ctype + size = param_packer.feed(self._ckernelParams[idx], value, ctype) + if size == 0: # feed failed + value = ctype(value) + size = _ctypes.sizeof(ctype) + addr = (_ctypes.addressof(value)) + memcpy(self._ckernelParams[idx], addr, size) + else: + size = _ctypes.sizeof(ctype) + addr = (_ctypes.addressof(value)) + memcpy(self._ckernelParams[idx], addr, size) + data_idx += size + elif ctype == _ctypes.c_void_p: + # special cases for void_p + if isinstance(value, (int, _ctypes.c_void_p)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + data_idx += sizeof(void_ptr) + elif callable(getattr(value, 'getPtr', None)): + self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + (self._ckernelParams[idx])[0] = value.getPtr() + data_idx += sizeof(void_ptr) + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(int), type(_ctypes.c_void_p))) + else: + raise TypeError("Unsupported type: " + str(type(ctype))) + idx += 1 + else: + raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") + + def __dealloc__(self): + if self._pyobj_acquired is True: + PyBuffer_Release(&self._pybuffer) + if self._malloc_list_created is True: + free(self._ckernelParams) + free(self._ckernelParamsData) + + @property + def ckernelParams(self): + return self._ckernelParams + +cdef class _HelperInputVoidPtr: + def __cinit__(self, ptr): + self._pyobj_acquired = False + if ptr is None: + self._cptr = NULL + elif isinstance(ptr, (int)): + # Easy run, user gave us an already configured void** address + self._cptr = ptr + elif isinstance(ptr, (_driver.CUdeviceptr)): + self._cptr = int(ptr) + elif PyObject_CheckBuffer(ptr): + # Easy run, get address from Python Buffer Protocol + err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + if err_buffer == -1: + raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + self._pyobj_acquired = True + self._cptr = self._pybuffer.buf + else: + raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) + + def __dealloc__(self): + if self._pyobj_acquired is True: + PyBuffer_Release(&self._pybuffer) + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCUmemPool_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + self._int_val = init_value + self._cptr = &self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + if self._is_getter: + self._cuuint64_t_val = _driver.cuuint64_t() + self._cptr = self._cuuint64_t_val.getPtr() + else: + self._cptr = init_value.getPtr() + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + return self._int_val + elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + return self._cuuint64_t_val + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + +cdef class _HelperCUmem_range_attribute: + def __cinit__(self, attr, data_size): + self._data_size = data_size + self._attr = attr.value + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + self._cptr = &self._int_val + elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + self._cptr = _callocWrapper(1, self._data_size) + self._int_val_list = self._cptr + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + free(self._cptr) + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + return self._int_val + elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + +cdef class _HelperCUpointer_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + if self._is_getter: + self._ctx = _driver.CUcontext() + self._cptr = self._ctx.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + self._uint = init_value + self._cptr = &self._uint + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + if self._is_getter: + self._devptr = _driver.CUdeviceptr() + self._cptr = self._devptr.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + self._void = init_value + self._cptr = &self._void + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + if self._is_getter: + self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() + self._cptr = self._token.getPtr() + else: + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + self._bool = init_value + self._cptr = &self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + self._ull = init_value + self._cptr = &self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + self._size = init_value + self._cptr = &self._size + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + if self._is_getter: + self._mempool = _driver.CUmemoryPool() + self._cptr = self._mempool.getPtr() + else: + self._cptr = init_value.getPtr() + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + return self._ctx + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + return self._uint + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + return self._devptr + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + return self._void + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + return self._token + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + return self._bool + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + return self._ull + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + return self._size + elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + return self._mempool + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + +cdef class _HelperCUgraphMem_attribute: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attr = attr.value + if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + if self._is_getter: + self._cuuint64_t_val = _driver.cuuint64_t() + self._cptr = self._cuuint64_t_val.getPtr() + else: + self._cptr = init_value.getPtr() + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + assert(self._is_getter == True) + if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + return self._cuuint64_t_val + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attr)) + +cdef class _HelperCUjit_option: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, + cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM,): + self._uint = init_value + self._cptr = self._uint + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): + self._float = init_value + self._cptr = self._float + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + self._charstar = init_value + self._cptr = self._charstar + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): + self._target = init_value.value + self._cptr = self._target + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): + self._fallback = init_value.value + self._cptr = self._fallback + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + cydriver.CUjit_option_enum.CU_JIT_LTO, + cydriver.CUjit_option_enum.CU_JIT_FTZ, + cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, + cydriver.CUjit_option_enum.CU_JIT_FMA, + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES,): + self._int = init_value + self._cptr = self._int + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): + self._cacheMode = init_value.value + self._cptr = self._cacheMode + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): + self._charstarstar = init_value + self._cptr = &self._charstarstar[0] + elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): + pylist = [_HelperInputVoidPtr(val) for val in init_value] + self._voidstarstar = _InputVoidPtrPtrHelper(pylist) + self._cptr = self._voidstarstar.cptr + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCudaJitOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, + cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, + cyruntime.cudaJitOption.cudaJitOptimizationLevel, + cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): + self._uint = init_value + self._cptr = self._uint + elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): + self._float = init_value + self._cptr = self._float + elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, + cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + self._charstar = init_value + self._cptr = self._charstar + elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): + self._fallback = init_value.value + self._cptr = self._fallback + elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + cyruntime.cudaJitOption.cudaJitLogVerbose, + cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + cyruntime.cudaJitOption.cudaJitPositionIndependentCode, + cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, + cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): + self._int = init_value + self._cptr = self._int + elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): + self._cacheMode = init_value.value + self._cptr = self._cacheMode + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCUlibraryOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if False: + pass + elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): + self._cptr = init_value.getPtr() + elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): + self._uint = init_value + self._cptr = self._uint + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCudaLibraryOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if False: + pass + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): + self._cptr = init_value.getPtr() + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + self._uint = init_value + self._cptr = self._uint + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCUmemAllocationHandleType: + def __cinit__(self, attr): + self._type = attr.value + if False: + pass + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + self._cptr = &self._int + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + self._cptr = &self._int + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + self._cptr = &self._handle + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + self._cptr = &self._d3dkmt_handle + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + self._mem_fabric_handle = _driver.CUmemFabricHandle() + self._cptr = self._mem_fabric_handle.getPtr() + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def pyObj(self): + if False: + pass + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + return self._int + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + return self._int + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + return self._handle + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + return self._d3dkmt_handle + elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + return self._mem_fabric_handle + else: + raise TypeError('Unsupported attribute: {}'.format(self._type)) + +cdef class _InputVoidPtrPtrHelper: + def __cinit__(self, lst): + self._cptr = _callocWrapper(len(lst), sizeof(void*)) + for idx in range(len(lst)): + self._cptr[idx] = lst[idx].cptr + + def __dealloc__(self): + free(self._cptr) + + @property + def cptr(self): + return self._cptr + +cdef class _HelperCUcoredumpSettings: + def __cinit__(self, attr, init_value, is_getter=False): + self._is_getter = is_getter + self._attrib = attr.value + if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + if self._is_getter: + self._charstar = _callocWrapper(1024, 1) + self._cptr = self._charstar + self._size = 1024 + else: + self._charstar = init_value + self._cptr = self._charstar + self._size = len(init_value) + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + if self._is_getter == False: + self._bool = init_value + + self._cptr = &self._bool + self._size = 1 + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr + + def size(self): + return self._size + + def pyObj(self): + assert(self._is_getter == True) + if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + return self._charstar + elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + return self._bool + else: + raise TypeError('Unsupported attribute value: {}'.format(self._attrib)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd new file mode 100644 index 0000000000000000000000000000000000000000..7b190f35959d98d17da3a5c7d1433dc7a8c17cc9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_lib/windll.pxd @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from libc.stddef cimport wchar_t +from libc.stdint cimport uintptr_t +from cpython cimport PyUnicode_AsWideCharString, PyMem_Free + +cdef extern from "windows.h" nogil: + ctypedef void* HMODULE + ctypedef void* HANDLE + ctypedef void* FARPROC + ctypedef unsigned long DWORD + ctypedef const wchar_t *LPCWSTR + ctypedef const char *LPCSTR + ctypedef int BOOL + + cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + + HMODULE _LoadLibraryExW "LoadLibraryExW"( + LPCWSTR lpLibFileName, + HANDLE hFile, + DWORD dwFlags + ) + + FARPROC _GetProcAddress "GetProcAddress"(HMODULE hModule, LPCSTR lpProcName) + + BOOL _FreeLibrary "FreeLibrary"(HMODULE hLibModule) + +cdef inline uintptr_t LoadLibraryExW(str path, HANDLE hFile, DWORD dwFlags): + cdef uintptr_t result + cdef wchar_t* wpath = PyUnicode_AsWideCharString(path, NULL) + with nogil: + result = _LoadLibraryExW( + wpath, + hFile, + dwFlags + ) + PyMem_Free(wpath) + return result + +cdef inline FARPROC GetProcAddress(uintptr_t hModule, const char* lpProcName) nogil: + return _GetProcAddress(hModule, lpProcName) + +cdef inline BOOL FreeLibrary(uintptr_t hLibModule) nogil: + return _FreeLibrary(hLibModule) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_version.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..4f8867693290b5b0c0c1c5cca77a73a4a0945d7b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/_version.py @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +__version__ = "12.9.4" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a8880214c6fca5e0b7be679f017017e94a49acdc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.cpp @@ -0,0 +1,46521 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cufile", + "sources": [ + "cuda/bindings/cufile.pyx" + ] + }, + "module_name": "cuda.bindings.cufile" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cufile +#define __PYX_HAVE_API__cuda__bindings__cufile +/* Early includes */ +#include +#include +#include +#include +#include "cuda.h" +#include "cudaProfiler.h" +#include +#include + + // This is the missing piece we need to supply to help Cython & C++ compilers. + inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) { + return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err); + } + static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1}; + +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include + + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + +#include +#include + + #if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj) + #else + #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL) + #endif + + + #if PY_MAJOR_VERSION <= 2 + #define PyDict_GetItemWithError _PyDict_GetItemWithError + #endif + + + #if PY_VERSION_HEX < 0x030d0000 + static CYTHON_INLINE int __Pyx_PyWeakref_GetRef(PyObject *ref, PyObject **pobj) + { + PyObject *obj = PyWeakref_GetObject(ref); + if (obj == NULL) { + // SystemError if ref is NULL + *pobj = NULL; + return -1; + } + if (obj == Py_None) { + *pobj = NULL; + return 0; + } + Py_INCREF(obj); + *pobj = obj; + return 1; + } + #else + #define __Pyx_PyWeakref_GetRef PyWeakref_GetRef + #endif + +#include "pythread.h" + + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600) && !defined(PyContextVar_Get) + #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) ) + #endif + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cufile.pyx", + "cpython/contextvars.pxd", + "", + "cpython/type.pxd", + "cpython/bool.pxd", + "cpython/complex.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1; +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3; +struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents; +struct __pyx_obj_4cuda_8bindings_6cufile_Descr; +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2; +struct __pyx_obj_4cuda_8bindings_6cufile_IOParams; +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource; +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer; + +/* "_internal/utils.pxd":156 + * + * + * cdef cppclass nested_resource[T]: # <<<<<<<<<<<<<< + * nullable_unique_ptr[ vector[intptr_t] ] ptrs + * nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr +*/ +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource { + nullable_unique_ptr > ptrs; + nullable_unique_ptr > > nested_resource_ptr; +}; + +/* "_internal/utils.pxd":167 + * + * cdef bint is_nested_sequence(data) + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* # <<<<<<<<<<<<<< +*/ +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer { + int __pyx_n; + PyObject *readonly; +}; +struct __pyx_opt_args_7cpython_11contextvars_get_value; +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default; + +/* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value { + int __pyx_n; + PyObject *default_value; +}; + +/* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ +struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { + int __pyx_n; + PyObject *default_value; +}; + +/* "cuda/bindings/cufile.pxd":16 + * ############################################################################### + * + * ctypedef CUfileHandle_t Handle # <<<<<<<<<<<<<< + * ctypedef CUfileBatchHandle_t BatchHandle + * ctypedef CUfileError_t Error +*/ +typedef CUfileHandle_t __pyx_t_4cuda_8bindings_6cufile_Handle; + +/* "cuda/bindings/cufile.pxd":17 + * + * ctypedef CUfileHandle_t Handle + * ctypedef CUfileBatchHandle_t BatchHandle # <<<<<<<<<<<<<< + * ctypedef CUfileError_t Error + * ctypedef cufileRDMAInfo_t RDMAInfo +*/ +typedef CUfileBatchHandle_t __pyx_t_4cuda_8bindings_6cufile_BatchHandle; + +/* "cuda/bindings/cufile.pxd":18 + * ctypedef CUfileHandle_t Handle + * ctypedef CUfileBatchHandle_t BatchHandle + * ctypedef CUfileError_t Error # <<<<<<<<<<<<<< + * ctypedef cufileRDMAInfo_t RDMAInfo + * ctypedef CUfileFSOps_t FSOps +*/ +typedef CUfileError_t __pyx_t_4cuda_8bindings_6cufile_Error; + +/* "cuda/bindings/cufile.pxd":19 + * ctypedef CUfileBatchHandle_t BatchHandle + * ctypedef CUfileError_t Error + * ctypedef cufileRDMAInfo_t RDMAInfo # <<<<<<<<<<<<<< + * ctypedef CUfileFSOps_t FSOps + * ctypedef CUfileDrvProps_t DrvProps +*/ +typedef cufileRDMAInfo_t __pyx_t_4cuda_8bindings_6cufile_RDMAInfo; + +/* "cuda/bindings/cufile.pxd":20 + * ctypedef CUfileError_t Error + * ctypedef cufileRDMAInfo_t RDMAInfo + * ctypedef CUfileFSOps_t FSOps # <<<<<<<<<<<<<< + * ctypedef CUfileDrvProps_t DrvProps + * +*/ +typedef CUfileFSOps_t __pyx_t_4cuda_8bindings_6cufile_FSOps; + +/* "cuda/bindings/cufile.pxd":21 + * ctypedef cufileRDMAInfo_t RDMAInfo + * ctypedef CUfileFSOps_t FSOps + * ctypedef CUfileDrvProps_t DrvProps # <<<<<<<<<<<<<< + * + * +*/ +typedef CUfileDrvProps_t __pyx_t_4cuda_8bindings_6cufile_DrvProps; + +/* "cuda/bindings/cufile.pxd":28 + * ############################################################################### + * + * ctypedef CUfileOpError _OpError # <<<<<<<<<<<<<< + * ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags + * ctypedef CUfileDriverControlFlags_t _DriverControlFlags +*/ +typedef CUfileOpError __pyx_t_4cuda_8bindings_6cufile__OpError; + +/* "cuda/bindings/cufile.pxd":29 + * + * ctypedef CUfileOpError _OpError + * ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags # <<<<<<<<<<<<<< + * ctypedef CUfileDriverControlFlags_t _DriverControlFlags + * ctypedef CUfileFeatureFlags_t _FeatureFlags +*/ +typedef CUfileDriverStatusFlags_t __pyx_t_4cuda_8bindings_6cufile__DriverStatusFlags; + +/* "cuda/bindings/cufile.pxd":30 + * ctypedef CUfileOpError _OpError + * ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags + * ctypedef CUfileDriverControlFlags_t _DriverControlFlags # <<<<<<<<<<<<<< + * ctypedef CUfileFeatureFlags_t _FeatureFlags + * ctypedef CUfileFileHandleType _FileHandleType +*/ +typedef CUfileDriverControlFlags_t __pyx_t_4cuda_8bindings_6cufile__DriverControlFlags; + +/* "cuda/bindings/cufile.pxd":31 + * ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags + * ctypedef CUfileDriverControlFlags_t _DriverControlFlags + * ctypedef CUfileFeatureFlags_t _FeatureFlags # <<<<<<<<<<<<<< + * ctypedef CUfileFileHandleType _FileHandleType + * ctypedef CUfileOpcode_t _Opcode +*/ +typedef CUfileFeatureFlags_t __pyx_t_4cuda_8bindings_6cufile__FeatureFlags; + +/* "cuda/bindings/cufile.pxd":32 + * ctypedef CUfileDriverControlFlags_t _DriverControlFlags + * ctypedef CUfileFeatureFlags_t _FeatureFlags + * ctypedef CUfileFileHandleType _FileHandleType # <<<<<<<<<<<<<< + * ctypedef CUfileOpcode_t _Opcode + * ctypedef CUfileStatus_t _Status +*/ +typedef CUfileFileHandleType __pyx_t_4cuda_8bindings_6cufile__FileHandleType; + +/* "cuda/bindings/cufile.pxd":33 + * ctypedef CUfileFeatureFlags_t _FeatureFlags + * ctypedef CUfileFileHandleType _FileHandleType + * ctypedef CUfileOpcode_t _Opcode # <<<<<<<<<<<<<< + * ctypedef CUfileStatus_t _Status + * ctypedef CUfileBatchMode_t _BatchMode +*/ +typedef CUfileOpcode_t __pyx_t_4cuda_8bindings_6cufile__Opcode; + +/* "cuda/bindings/cufile.pxd":34 + * ctypedef CUfileFileHandleType _FileHandleType + * ctypedef CUfileOpcode_t _Opcode + * ctypedef CUfileStatus_t _Status # <<<<<<<<<<<<<< + * ctypedef CUfileBatchMode_t _BatchMode + * ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter +*/ +typedef CUfileStatus_t __pyx_t_4cuda_8bindings_6cufile__Status; + +/* "cuda/bindings/cufile.pxd":35 + * ctypedef CUfileOpcode_t _Opcode + * ctypedef CUfileStatus_t _Status + * ctypedef CUfileBatchMode_t _BatchMode # <<<<<<<<<<<<<< + * ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter + * ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter +*/ +typedef CUfileBatchMode_t __pyx_t_4cuda_8bindings_6cufile__BatchMode; + +/* "cuda/bindings/cufile.pxd":36 + * ctypedef CUfileStatus_t _Status + * ctypedef CUfileBatchMode_t _BatchMode + * ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter # <<<<<<<<<<<<<< + * ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter + * ctypedef CUFileStringConfigParameter_t _StringConfigParameter +*/ +typedef CUFileSizeTConfigParameter_t __pyx_t_4cuda_8bindings_6cufile__SizeTConfigParameter; + +/* "cuda/bindings/cufile.pxd":37 + * ctypedef CUfileBatchMode_t _BatchMode + * ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter + * ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter # <<<<<<<<<<<<<< + * ctypedef CUFileStringConfigParameter_t _StringConfigParameter + * +*/ +typedef CUFileBoolConfigParameter_t __pyx_t_4cuda_8bindings_6cufile__BoolConfigParameter; + +/* "cuda/bindings/cufile.pxd":38 + * ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter + * ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter + * ctypedef CUFileStringConfigParameter_t _StringConfigParameter # <<<<<<<<<<<<<< + * + * +*/ +typedef CUFileStringConfigParameter_t __pyx_t_4cuda_8bindings_6cufile__StringConfigParameter; + +/* "cuda/bindings/cufile.pyx":34 + * + * + * cdef class _py_anon_pod1: # <<<<<<<<<<<<<< + * """Empty-initialize an instance of `_anon_pod1`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 { + PyObject_HEAD + PyObject *_data; +}; + + +/* "cuda/bindings/cufile.pyx":137 + * + * + * cdef class _py_anon_pod3: # <<<<<<<<<<<<<< + * """Empty-initialize an instance of `_anon_pod3`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 { + PyObject_HEAD + PyObject *_data; +}; + + +/* "cuda/bindings/cufile.pyx":257 + * + * + * cdef class IOEvents: # <<<<<<<<<<<<<< + * """Empty-initialize an array of `CUfileIOEvents_t`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents { + PyObject_HEAD + PyObject *_data; +}; + + +/* "cuda/bindings/cufile.pyx":403 + * + * + * cdef class Descr: # <<<<<<<<<<<<<< + * """Empty-initialize an array of `CUfileDescr_t`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile_Descr { + PyObject_HEAD + PyObject *_data; +}; + + +/* "cuda/bindings/cufile.pyx":548 + * + * + * cdef class _py_anon_pod2: # <<<<<<<<<<<<<< + * """Empty-initialize an instance of `_anon_pod2`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 { + PyObject_HEAD + PyObject *_data; + PyObject *_batch; +}; + + +/* "cuda/bindings/cufile.pyx":645 + * + * + * cdef class IOParams: # <<<<<<<<<<<<<< + * """Empty-initialize an array of `CUfileIOParams_t`. + * +*/ +struct __pyx_obj_4cuda_8bindings_6cufile_IOParams { + PyObject_HEAD + PyObject *_data; +}; + +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* RejectKeywords.proto */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* BuildPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char); + +/* COrdinalToPyUnicode.proto */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* IncludeStdlibH.proto */ +#include + +/* CIntToPyUnicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char); + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* PyObjectDelAttr.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* SliceObject.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* DictGetItem.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); +#define __Pyx_PyObject_Dict_GetItem(obj, name)\ + (likely(PyDict_CheckExact(obj)) ?\ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/* PyUnicode_Unicode.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj); + +/* UnicodeConcatInPlace.proto */ +# if CYTHON_COMPILING_IN_CPYTHON + #if CYTHON_REFNANNY + #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) + #else + #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) + #endif + static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right + #if CYTHON_REFNANNY + , void* __pyx_refnanny + #endif + ); +#else +#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat +#endif +#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* decode_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(string); + size = PyBytes_GET_SIZE(string); +#else + if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) { + return NULL; + } +#endif + return __Pyx_decode_c_bytes( + as_c_string, size, + start, stop, encoding, errors, decode_func); +} + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* HasAttr.proto */ +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) +#else +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +#endif + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* ValidateBasesTuple.proto */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* DelItemOnTypeDict.proto */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_5 +#define __PYX_HAVE_RT_ImportType_proto_3_1_5 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_1_5 { + __Pyx_ImportType_CheckSize_Error_3_1_5 = 0, + __Pyx_ImportType_CheckSize_Warn_3_1_5 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_1_5 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size); +#endif + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* GetNameInClass.proto */ +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileOpError(CUfileOpError value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CUfileDriverStatusFlags_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileDriverControlFlags_t(CUfileDriverControlFlags_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileFeatureFlags_t(CUfileFeatureFlags_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileFileHandleType(CUfileFileHandleType value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileOpcode_t(CUfileOpcode_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileStatus_t(CUfileStatus_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileBatchMode_t(CUfileBatchMode_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFileSizeTConfigParameter_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFileBoolConfigParameter_t value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileStringConfigParameter_t(CUFileStringConfigParameter_t value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE off_t __Pyx_PyLong_As_off_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__cudaError_enum(enum cudaError_enum value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/ +#endif +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/ +#endif + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "libc.time" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "posix.types" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings" */ + +/* Module declarations from "cuda" */ + +/* Module declarations from "cuda.bindings.cycufile" */ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleRegister)(CUfileHandle_t *, CUfileDescr_t *); /*proto*/ +static void (*__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleDeregister)(CUfileHandle_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBufRegister)(void const *, size_t, int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBufDeregister)(void const *); /*proto*/ +static Py_ssize_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileRead)(CUfileHandle_t, void *, size_t, off_t, off_t); /*proto*/ +static Py_ssize_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileWrite)(CUfileHandle_t, void const *, size_t, off_t, off_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverOpen)(void); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose_v2)(void); /*proto*/ +static long (*__pyx_f_4cuda_8bindings_8cycufile_cuFileUseCount)(void); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverGetProperties)(CUfileDrvProps_t *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetPollMode)(bool, size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxDirectIOSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxCacheSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxPinnedMemSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSetUp)(CUfileBatchHandle_t *, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSubmit)(CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOGetStatus)(CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOCancel)(CUfileBatchHandle_t); /*proto*/ +static void (*__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIODestroy)(CUfileBatchHandle_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileReadAsync)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileWriteAsync)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamRegister)(CUstream, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamDeregister)(CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileGetVersion)(int *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterSizeT)(CUFileSizeTConfigParameter_t, size_t *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterBool)(CUFileBoolConfigParameter_t, bool *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterString)(CUFileStringConfigParameter_t, char *, int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterSizeT)(CUFileSizeTConfigParameter_t, size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterBool)(CUFileBoolConfigParameter_t, bool); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterString)(CUFileStringConfigParameter_t, char const *); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.errno" */ + +/* Module declarations from "libcpp.vector" */ + +/* Module declarations from "libcpp.memory" */ + +/* Module declarations from "cuda.bindings._internal.utils" */ +static void *(*__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer)(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args); /*proto*/ +static int (*__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *); /*proto*/ +static int (*__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *); /*proto*/ +static int (*__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *); /*proto*/ +static int (*__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *); /*proto*/ +static int (*__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *); /*proto*/ +static int (*__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *); /*proto*/ + +/* Module declarations from "cpython.version" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.ref" */ + +/* Module declarations from "cpython.exc" */ + +/* Module declarations from "cpython.module" */ + +/* Module declarations from "cpython.mem" */ + +/* Module declarations from "cpython.tuple" */ + +/* Module declarations from "cpython.list" */ + +/* Module declarations from "cpython.sequence" */ + +/* Module declarations from "cpython.mapping" */ + +/* Module declarations from "cpython.iterator" */ + +/* Module declarations from "cpython.number" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.bool" */ + +/* Module declarations from "cpython.long" */ + +/* Module declarations from "cpython.float" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.complex" */ + +/* Module declarations from "cpython.unicode" */ + +/* Module declarations from "cpython.pyport" */ + +/* Module declarations from "cpython.dict" */ + +/* Module declarations from "cpython.instance" */ + +/* Module declarations from "cpython.function" */ + +/* Module declarations from "cpython.method" */ + +/* Module declarations from "cpython.weakref" */ + +/* Module declarations from "cpython.getargs" */ + +/* Module declarations from "cpython.pythread" */ + +/* Module declarations from "cpython.pystate" */ + +/* Module declarations from "cpython.set" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cpython.pycapsule" */ + +/* Module declarations from "cpython.contextvars" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.memoryview" */ + +/* Module declarations from "cuda.bindings.cufile" */ +static intptr_t __pyx_f_4cuda_8bindings_6cufile_handle_register(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static void __pyx_f_4cuda_8bindings_6cufile_handle_deregister(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_buf_register(intptr_t, size_t, int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_buf_deregister(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_read(intptr_t, intptr_t, size_t, off_t, off_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_write(intptr_t, intptr_t, size_t, off_t, off_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_open(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_use_count(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_get_properties(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_poll_mode(int, size_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_direct_io_size(size_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_cache_size(size_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_pinned_mem_size(size_t, int __pyx_skip_dispatch); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_6cufile_batch_io_set_up(unsigned int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_submit(intptr_t, unsigned int, intptr_t, unsigned int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_get_status(intptr_t, unsigned int, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_cancel(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static void __pyx_f_4cuda_8bindings_6cufile_batch_io_destroy(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_read_async(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_write_async(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_stream_register(intptr_t, unsigned int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_stream_deregister(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_4cuda_8bindings_6cufile_get_version(int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_6cufile_get_parameter_size_t(int, int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_4cuda_8bindings_6cufile_get_parameter_bool(int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_get_parameter_string(int, int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_size_t(int, size_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_bool(int, int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_string(int, intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_op_status_error(int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_close(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod1__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *, PyObject *); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod3__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *, PyObject *); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOEvents__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *, PyObject *); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_Descr__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *, PyObject *); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod2__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *, PyObject *); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOParams__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *, PyObject *); /*proto*/ +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(CUfileError_t); /*proto*/ +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_6cufile_check_status(Py_ssize_t); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cufile" +extern int __pyx_module_is_main_cuda__bindings__cufile; +int __pyx_module_is_main_cuda__bindings__cufile = 0; + +/* Implementation of "cuda.bindings.cufile" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_staticmethod; +static PyObject *__pyx_builtin_AssertionError; +static PyObject *__pyx_builtin_hex; +static PyObject *__pyx_builtin_id; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_ValueError; +static PyObject *__pyx_builtin_IndexError; +static PyObject *__pyx_builtin_super; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "<"; +static const char __pyx_k_0[] = "\200\001\360\020\000\n\013\330\010\021\320\0210\260\001\260\021\330\004\020\220\001\220\021"; +static const char __pyx_k_6[] = "\200\001\360\022\000\n\013\330\010\021\320\021(\250\001\250\032\2606\270\021\330\004\020\220\001\220\021"; +static const char __pyx_k_A[] = "\200\001\360\020\000\n\013\330\010\021\320\021$\240A\240]\260!\330\004\020\220\001\220\021"; +static const char __pyx_k_Q[] = "\200\001\360\006\000\n\013\330\010\021\320\021%\240Q\330\004\020\220\001\220\021"; +static const char __pyx_k_a[] = "\200\001\360\020\000\n\013\330\010\021\320\021*\250!\320+>\270a\330\004\020\220\001\220\021"; +static const char __pyx_k_e[] = "e"; +static const char __pyx_k_q[] = "\200\001\360\n\000\n\013\330\010\021\220\036\230q\330\004\020\220\001\220\021"; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k_u[] = "u"; +static const char __pyx_k_1F[] = "\200\001\330\004+\2501\250F\260!"; +static const char __pyx_k_81[] = "\200\001\360\020\000\005\033\230!\2308\2401"; +static const char __pyx_k_AQ[] = "\200\001\360\020\000\n\013\330\010\021\320\021,\250A\250Q\330\004\020\220\001\220\021"; +static const char __pyx_k__2[] = ">"; +static const char __pyx_k__3[] = " ("; +static const char __pyx_k__4[] = "): "; +static const char __pyx_k__5[] = ")"; +static const char __pyx_k__6[] = "."; +static const char __pyx_k__7[] = "?"; +static const char __pyx_k__8[] = "\200\001\360\n\000\n\013\330\010\021\320\021!\240\021\330\004\020\220\001\220\021"; +static const char __pyx_k_fd[] = "fd"; +static const char __pyx_k_fh[] = "fh"; +static const char __pyx_k_gc[] = "gc"; +static const char __pyx_k_ha[] = "\200\001\360\024\000\n\013\330\010\021\320\021\"\240!\240=\260\016\270h\300a\330\004\020\220\001\220\021"; +static const char __pyx_k_id[] = "id"; +static const char __pyx_k_nr[] = "nr"; +static const char __pyx_k_1_1[] = "\320\000 \240\001\340\t\n\330\010\021\320\021!\240\021\240!\2401\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_A_2[] = "\200\001\330\t\n\330\010\021\320\021$\240A\240]\260!\330\004\020\220\001\220\021"; +static const char __pyx_k_a_2[] = "\200\001\330\004\030\230\001\230\035\240a"; +static const char __pyx_k_all[] = "all"; +static const char __pyx_k_avQ[] = "\200\001\330\004&\240a\240v\250Q"; +static const char __pyx_k_buf[] = "buf"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_err[] = "err"; +static const char __pyx_k_hex[] = "hex"; +static const char __pyx_k_len[] = "len"; +static const char __pyx_k_new[] = "__new__"; +static const char __pyx_k_obj[] = "obj"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_ptr[] = "ptr"; +static const char __pyx_k_q_2[] = "\200\001\360\020\000\n\013\330\010\021\320\021/\250q\260\001\330\004\020\220\001\220\021"; +static const char __pyx_k_q_3[] = "\200\001\330\t\n\330\010\021\320\021(\250\001\320)@\300\007\300q\330\004\020\220\001\220\021"; +static const char __pyx_k_q_q[] = "\200\001\330\t\n\330\010\021\320\021'\240q\250\007\250q\330\004\020\220\001\220\021"; +static const char __pyx_k_ret[] = "ret"; +static const char __pyx_k_1F_2[] = "\200\001\330\004#\2401\240F\250!"; +static const char __pyx_k_B_VW[] = "\200\001\330\t\n\330\010\021\320\021)\250\021\320*B\300'\310\035\320VW\330\004\020\220\001\220\021"; +static const char __pyx_k_None[] = "None"; +static const char __pyx_k_QgXQ[] = "\200\001\330\t\n\330\010\021\320\021%\240Q\240g\250X\260Q\330\004\020\220\001\220\021"; +static const char __pyx_k_READ[] = "READ"; +static const char __pyx_k_data[] = "data"; +static const char __pyx_k_dict[] = "__dict__"; +static const char __pyx_k_enum[] = "enum"; +static const char __pyx_k_flag[] = "flag"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_init[] = "__init__"; +static const char __pyx_k_intp[] = "intp"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_mode[] = "mode"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_ndim[] = "ndim"; +static const char __pyx_k_poll[] = "poll"; +static const char __pyx_k_read[] = "read"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_type[] = "type"; +static const char __pyx_k_view[] = "view"; +static const char __pyx_k_void[] = "void"; +static const char __pyx_k_BATCH[] = "BATCH"; +static const char __pyx_k_Descr[] = "Descr"; +static const char __pyx_k_WRITE[] = "WRITE"; +static const char __pyx_k_align[] = "align"; +static const char __pyx_k_batch[] = "batch"; +static const char __pyx_k_descr[] = "descr"; +static const char __pyx_k_dtype[] = "dtype"; +static const char __pyx_k_empty[] = "empty"; +static const char __pyx_k_flags[] = "flags"; +static const char __pyx_k_int32[] = "int32"; +static const char __pyx_k_int64[] = "int64"; +static const char __pyx_k_iocbp[] = "iocbp"; +static const char __pyx_k_names[] = "names"; +static const char __pyx_k_numpy[] = "_numpy"; +static const char __pyx_k_param[] = "param"; +static const char __pyx_k_props[] = "props"; +static const char __pyx_k_q_gZq[] = "\200\001\330\t\n\330\010\021\320\021'\240q\320(>\270g\300Z\310q\330\004\020\220\001\220\021"; +static const char __pyx_k_state[] = "state"; +static const char __pyx_k_super[] = "super"; +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_write[] = "write"; +static const char __pyx_k_5Q_q_1[] = "\320\0005\260Q\340\t\n\330\010\021\320\021(\250\001\320)@\300\007\300q\310\001\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_AZq_87[] = "\200\001\360\022\000\005\020\320\017$\240A\240Z\250q\330\004\013\2108\2207\230!"; +static const char __pyx_k_A_TATT[] = "\200\001\330\t\n\330\010\021\320\021$\240A\240]\260+\270T\320AT\320T[\320[\\\330\004\020\220\001\220\021"; +static const char __pyx_k_FAILED[] = "FAILED"; +static const char __pyx_k_Opcode[] = "Opcode"; +static const char __pyx_k_Status[] = "Status"; +static const char __pyx_k_buffer[] = "buffer"; +static const char __pyx_k_cookie[] = "cookie"; +static const char __pyx_k_ctypes[] = "ctypes"; +static const char __pyx_k_cu_err[] = "cu_err"; +static const char __pyx_k_data_2[] = "_data"; +static const char __pyx_k_dict_2[] = "_dict"; +static const char __pyx_k_enable[] = "enable"; +static const char __pyx_k_fs_ops[] = "fs_ops"; +static const char __pyx_k_handle[] = "handle"; +static const char __pyx_k_length[] = "length"; +static const char __pyx_k_min_nr[] = "min_nr"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "name"; +static const char __pyx_k_opcode[] = "opcode"; +static const char __pyx_k_pickle[] = "pickle"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_size_2[] = "size_"; +static const char __pyx_k_size_p[] = "size_p"; +static const char __pyx_k_status[] = "status"; +static const char __pyx_k_stream[] = "stream"; +static const char __pyx_k_uint64[] = "uint64"; +static const char __pyx_k_update[] = "update"; +static const char __pyx_k_1_q_gQa[] = "\320\0001\260\021\340\t\n\330\010\021\320\021'\240q\320(>\270g\300Q\300a\330\004\020\220\001\220\021\330\004\021\220\021"; +static const char __pyx_k_4A_1A_Q[] = "\320\0004\260A\340\t\n\330\010\021\320\021#\2401\240A\240[\260\001\330\004\020\220\001\220\021\330\004\013\210:\220Q"; +static const char __pyx_k_A_AXT_a[] = "\200A\330\010\020\220\004\220A\220X\230T\240\031\250$\250a"; +static const char __pyx_k_INVALID[] = "INVALID"; +static const char __pyx_k_IntEnum[] = "IntEnum"; +static const char __pyx_k_LOG_DIR[] = "LOG_DIR"; +static const char __pyx_k_OpError[] = "OpError"; +static const char __pyx_k_PENDING[] = "PENDING"; +static const char __pyx_k_SUCCESS[] = "SUCCESS"; +static const char __pyx_k_TIMEOUT[] = "TIMEOUT"; +static const char __pyx_k_WAITING[] = "WAITING"; +static const char __pyx_k_disable[] = "disable"; +static const char __pyx_k_formats[] = "formats"; +static const char __pyx_k_ndarray[] = "ndarray"; +static const char __pyx_k_numpy_2[] = "numpy"; +static const char __pyx_k_offsets[] = "offsets"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_timeout[] = "timeout"; +static const char __pyx_k_1HD_V_PQ[] = "\200\001\360\030\000\n\013\330\010\021\220\032\2301\230H\240D\250\007\250~\270V\300=\320PQ\330\004\020\220\001\220\021"; +static const char __pyx_k_CANCELED[] = "CANCELED"; +static const char __pyx_k_COMPLETE[] = "COMPLETE"; +static const char __pyx_k_CUresult[] = "CUresult"; +static const char __pyx_k_IOEvents[] = "IOEvents"; +static const char __pyx_k_IOParams[] = "IOParams"; +static const char __pyx_k_desc_str[] = "desc_str"; +static const char __pyx_k_from_ptr[] = "from_ptr"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_itemsize[] = "itemsize"; +static const char __pyx_k_pyx_type[] = "__pyx_type"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_readonly[] = "readonly"; +static const char __pyx_k_recarray[] = "recarray"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_AXT_nF_WX[] = "\200\001\360\030\000\n\013\330\010\021\220\033\230A\230X\240T\250\035\260n\300F\310-\320WX\330\004\020\220\001\220\021"; +static const char __pyx_k_BatchMode[] = "BatchMode"; +static const char __pyx_k_E_B_ST_WA[] = "\200\001\330\004\034\230E\240\021\240!\330\004\032\230!\330\t\n\330\010\021\320\021)\250\021\320*B\300'\310\032\320ST\330\004\020\220\001\220\021\330\004\013\210:\220W\230A"; +static const char __pyx_k_IntEnum_2[] = "_IntEnum"; +static const char __pyx_k_OPAQUE_FD[] = "OPAQUE_FD"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_batch_idp[] = "batch_idp"; +static const char __pyx_k_from_data[] = "from_data"; +static const char __pyx_k_isenabled[] = "isenabled"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_object_at[] = " object at "; +static const char __pyx_k_pyx_state[] = "__pyx_state"; +static const char __pyx_k_q_SWWjjqq[] = "\200\001\330\t\n\330\010\021\320\021'\240q\250\r\260[\300\010\310\013\320SW\320Wj\320jq\320q|\320|}\330\004\020\220\001\220\021"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_use_count[] = "use_count"; +static const char __pyx_k_7q_Qat_1_Q[] = "\320\0007\260q\360\030\000\n\013\330\010\021\320\021%\240Q\240a\240t\320+;\2701\330\004\020\220\001\220\021\330\004\013\210:\220Q"; +static const char __pyx_k_BATCH_FULL[] = "BATCH_FULL"; +static const char __pyx_k_IndexError[] = "IndexError"; +static const char __pyx_k_ValueError[] = "ValueError"; +static const char __pyx_k_batch_addr[] = "batch_addr"; +static const char __pyx_k_cuda_error[] = "cuda_error"; +static const char __pyx_k_itemsize_2[] = "itemsize "; +static const char __pyx_k_pyCUresult[] = "pyCUresult"; +static const char __pyx_k_pyx_result[] = "__pyx_result"; +static const char __pyx_k_read_async[] = "read_async"; +static const char __pyx_k_CUDA_status[] = "; CUDA status: "; +static const char __pyx_k_DIO_NOT_SET[] = "DIO_NOT_SET"; +static const char __pyx_k_Descr_Array[] = ".Descr_Array_"; +static const char __pyx_k_IO_DISABLED[] = "IO_DISABLED"; +static const char __pyx_k_PickleError[] = "PickleError"; +static const char __pyx_k_cuFileError[] = "cuFileError"; +static const char __pyx_k_descr_dtype[] = "descr_dtype"; +static const char __pyx_k_driver_open[] = "driver_open"; +static const char __pyx_k_file_offset[] = "file_offset"; +static const char __pyx_k_get_version[] = "get_version"; +static const char __pyx_k_mro_entries[] = "__mro_entries__"; +static const char __pyx_k_write_async[] = "write_async"; +static const char __pyx_k_FeatureFlags[] = "FeatureFlags"; +static const char __pyx_k_IO_MAX_ERROR[] = "IO_MAX_ERROR"; +static const char __pyx_k_OPAQUE_WIN32[] = "OPAQUE_WIN32"; +static const char __pyx_k_PROFILE_NVTX[] = "PROFILE_NVTX"; +static const char __pyx_k_USERSPACE_FS[] = "USERSPACE_FS"; +static const char __pyx_k_buf_ptr_base[] = "buf_ptr_base"; +static const char __pyx_k_buf_register[] = "buf_register"; +static const char __pyx_k_bytes_read_p[] = "bytes_read_p"; +static const char __pyx_k_dev_ptr_base[] = "dev_ptr_base"; +static const char __pyx_k_driver_close[] = "driver_close"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_py_anon_pod1[] = "_py_anon_pod1"; +static const char __pyx_k_py_anon_pod2[] = "_py_anon_pod2"; +static const char __pyx_k_py_anon_pod3[] = "_py_anon_pod3"; +static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; +static const char __pyx_k_staticmethod[] = "staticmethod"; +static const char __pyx_k_stringsource[] = ""; +static const char __pyx_k_use_setstate[] = "use_setstate"; +static const char __pyx_k_INVALID_VALUE[] = "INVALID_VALUE"; +static const char __pyx_k_LOGGING_LEVEL[] = "LOGGING_LEVEL"; +static const char __pyx_k_NFS_SUPPORTED[] = "NFS_SUPPORTED"; +static const char __pyx_k_PROFILE_STATS[] = "PROFILE_STATS"; +static const char __pyx_k_USE_PCIP2PDMA[] = "USE_PCIP2PDMA"; +static const char __pyx_k_USE_POLL_MODE[] = "USE_POLL_MODE"; +static const char __pyx_k_class_getitem[] = "__class_getitem__"; +static const char __pyx_k_file_offset_p[] = "file_offset_p"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_AssertionError[] = "AssertionError"; +static const char __pyx_k_DRIVER_CLOSING[] = "DRIVER_CLOSING"; +static const char __pyx_k_Descr_from_ptr[] = "Descr.from_ptr"; +static const char __pyx_k_FileHandleType[] = "FileHandleType"; +static const char __pyx_k_GPFS_SUPPORTED[] = "GPFS_SUPPORTED"; +static const char __pyx_k_INTERNAL_ERROR[] = "INTERNAL_ERROR"; +static const char __pyx_k_IOEvents_Array[] = ".IOEvents_Array_"; +static const char __pyx_k_IOParams_Array[] = ".IOParams_Array_"; +static const char __pyx_k_NVME_SUPPORTED[] = "NVME_SUPPORTED"; +static const char __pyx_k_SCSI_SUPPORTED[] = "SCSI_SUPPORTED"; +static const char __pyx_k_buf_deregister[] = "buf_deregister"; +static const char __pyx_k_buf_ptr_offset[] = "buf_ptr_offset"; +static const char __pyx_k_dev_ptr_offset[] = "dev_ptr_offset"; +static const char __pyx_k_max_cache_size[] = "max_cache_size"; +static const char __pyx_k_Descr_from_data[] = "Descr.from_data"; +static const char __pyx_k_Descr_object_at[] = ".Descr object at "; +static const char __pyx_k_GETNEWFD_FAILED[] = "GETNEWFD_FAILED"; +static const char __pyx_k_PREFER_IO_URING[] = "PREFER_IO_URING"; +static const char __pyx_k_array_interface[] = "__array_interface__"; +static const char __pyx_k_batch_io_cancel[] = "batch_io_cancel"; +static const char __pyx_k_batch_io_set_up[] = "batch_io_set_up"; +static const char __pyx_k_batch_io_submit[] = "batch_io_submit"; +static const char __pyx_k_bytes_written_p[] = "bytes_written_p"; +static const char __pyx_k_handle_register[] = "handle_register"; +static const char __pyx_k_io_events_dtype[] = "io_events_dtype"; +static const char __pyx_k_io_params_dtype[] = "io_params_dtype"; +static const char __pyx_k_max_pinned_size[] = "max_pinned_size"; +static const char __pyx_k_op_status_error[] = "op_status_error"; +static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_stream_register[] = "stream_register"; +static const char __pyx_k_BEEGFS_SUPPORTED[] = "BEEGFS_SUPPORTED"; +static const char __pyx_k_DEVICE_NOT_FOUND[] = "DEVICE_NOT_FOUND"; +static const char __pyx_k_ENV_LOGFILE_PATH[] = "ENV_LOGFILE_PATH"; +static const char __pyx_k_IO_NOT_SUPPORTED[] = "IO_NOT_SUPPORTED"; +static const char __pyx_k_LUSTRE_SUPPORTED[] = "LUSTRE_SUPPORTED"; +static const char __pyx_k_NVFS_SETUP_ERROR[] = "NVFS_SETUP_ERROR"; +static const char __pyx_k_NVMEOF_SUPPORTED[] = "NVMEOF_SUPPORTED"; +static const char __pyx_k_NVMESH_SUPPORTED[] = "NVMESH_SUPPORTED"; +static const char __pyx_k_WEKAFS_SUPPORTED[] = "WEKAFS_SUPPORTED"; +static const char __pyx_k_batch_io_destroy[] = "batch_io_destroy"; +static const char __pyx_k_buf_ptr_offset_p[] = "buf_ptr_offset_p"; +static const char __pyx_k_ALLOW_COMPAT_MODE[] = "ALLOW_COMPAT_MODE"; +static const char __pyx_k_CUDA_DRIVER_ERROR[] = "CUDA_DRIVER_ERROR"; +static const char __pyx_k_DriverStatusFlags[] = "DriverStatusFlags"; +static const char __pyx_k_FORCE_COMPAT_MODE[] = "FORCE_COMPAT_MODE"; +static const char __pyx_k_INVALID_FILE_TYPE[] = "INVALID_FILE_TYPE"; +static const char __pyx_k_IOEvents_from_ptr[] = "IOEvents.from_ptr"; +static const char __pyx_k_IOParams_from_ptr[] = "IOParams.from_ptr"; +static const char __pyx_k_NVFS_DRIVER_ERROR[] = "NVFS_DRIVER_ERROR"; +static const char __pyx_k_PERMISSION_DENIED[] = "PERMISSION_DENIED"; +static const char __pyx_k_SCATEFS_SUPPORTED[] = "SCATEFS_SUPPORTED"; +static const char __pyx_k_STREAMS_SUPPORTED[] = "STREAMS_SUPPORTED"; +static const char __pyx_k_See_CUfileOpError[] = "See `CUfileOpError`."; +static const char __pyx_k_handle_deregister[] = "handle_deregister"; +static const char __pyx_k_stream_deregister[] = "stream_deregister"; +static const char __pyx_k_BATCH_IO_SUPPORTED[] = "BATCH_IO_SUPPORTED"; +static const char __pyx_k_DriverControlFlags[] = "DriverControlFlags"; +static const char __pyx_k_FORCE_ODIRECT_MODE[] = "FORCE_ODIRECT_MODE"; +static const char __pyx_k_IOEvents_from_data[] = "IOEvents.from_data"; +static const char __pyx_k_IOEvents_object_at[] = ".IOEvents object at "; +static const char __pyx_k_IOParams_from_data[] = "IOParams.from_data"; +static const char __pyx_k_IOParams_object_at[] = ".IOParams object at "; +static const char __pyx_k_NVME_P2P_SUPPORTED[] = "NVME_P2P_SUPPORTED"; +static const char __pyx_k_See_CUfileOpcode_t[] = "See `CUfileOpcode_t`."; +static const char __pyx_k_See_CUfileStatus_t[] = "See `CUfileStatus_t`."; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_cuFileError___init[] = "cuFileError.__init__"; +static const char __pyx_k_get_parameter_bool[] = "get_parameter_bool"; +static const char __pyx_k_max_direct_io_size[] = "max_direct_io_size"; +static const char __pyx_k_py_anon_pod1_dtype[] = "_py_anon_pod1_dtype"; +static const char __pyx_k_py_anon_pod2_dtype[] = "_py_anon_pod2_dtype"; +static const char __pyx_k_py_anon_pod3_dtype[] = "_py_anon_pod3_dtype"; +static const char __pyx_k_pyx_unpickle_Descr[] = "__pyx_unpickle_Descr"; +static const char __pyx_k_set_parameter_bool[] = "set_parameter_bool"; +static const char __pyx_k_ASYNC_NOT_SUPPORTED[] = "ASYNC_NOT_SUPPORTED"; +static const char __pyx_k_BATCH_SUBMIT_FAILED[] = "BATCH_SUBMIT_FAILED"; +static const char __pyx_k_BoolConfigParameter[] = "BoolConfigParameter"; +static const char __pyx_k_DRIVER_ALREADY_OPEN[] = "DRIVER_ALREADY_OPEN"; +static const char __pyx_k_batch_io_get_status[] = "batch_io_get_status"; +static const char __pyx_k_poll_threshold_size[] = "poll_threshold_size"; +static const char __pyx_k_CUDA_POINTER_INVALID[] = "CUDA_POINTER_INVALID"; +static const char __pyx_k_DEVICE_NOT_SUPPORTED[] = "DEVICE_NOT_SUPPORTED"; +static const char __pyx_k_DRIVER_INVALID_PROPS[] = "DRIVER_INVALID_PROPS"; +static const char __pyx_k_INVALID_MAPPING_SIZE[] = "INVALID_MAPPING_SIZE"; +static const char __pyx_k_STREAM_MEMOPS_BYPASS[] = "STREAM_MEMOPS_BYPASS"; +static const char __pyx_k_SizeTConfigParameter[] = "SizeTConfigParameter"; +static const char __pyx_k_cuFileError___reduce[] = "cuFileError.__reduce__"; +static const char __pyx_k_cuda_bindings_cufile[] = "cuda.bindings.cufile"; +static const char __pyx_k_cuda_bindings_driver[] = "cuda.bindings.driver"; +static const char __pyx_k_driver_set_poll_mode[] = "driver_set_poll_mode"; +static const char __pyx_k_get_parameter_size_t[] = "get_parameter_size_t"; +static const char __pyx_k_get_parameter_string[] = "get_parameter_string"; +static const char __pyx_k_hk_A_1_xxzz_7_q0_a_1[] = "\200\001\360\006\000\005\010\200\177\220h\230k\250\033\260A\330\010\r\210^\2301\330\010\016\320\016!\320!x\320xz\320z{\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101"; +static const char __pyx_k_set_parameter_size_t[] = "set_parameter_size_t"; +static const char __pyx_k_set_parameter_string[] = "set_parameter_string"; +static const char __pyx_k_CUDA_CONTEXT_MISMATCH[] = "CUDA_CONTEXT_MISMATCH"; +static const char __pyx_k_DYN_ROUTING_SUPPORTED[] = "DYN_ROUTING_SUPPORTED"; +static const char __pyx_k_Descr___reduce_cython[] = "Descr.__reduce_cython__"; +static const char __pyx_k_EXECUTION_PARALLEL_IO[] = "EXECUTION_PARALLEL_IO"; +static const char __pyx_k_HANDLE_NOT_REGISTERED[] = "HANDLE_NOT_REGISTERED"; +static const char __pyx_k_INVALID_MAPPING_RANGE[] = "INVALID_MAPPING_RANGE"; +static const char __pyx_k_MEMORY_NOT_REGISTERED[] = "MEMORY_NOT_REGISTERED"; +static const char __pyx_k_PARALLEL_IO_SUPPORTED[] = "PARALLEL_IO_SUPPORTED"; +static const char __pyx_k_POLLTHRESHOLD_SIZE_KB[] = "POLLTHRESHOLD_SIZE_KB"; +static const char __pyx_k_See_CUfileBatchMode_t[] = "See `CUfileBatchMode_t`."; +static const char __pyx_k_StringConfigParameter[] = "StringConfigParameter"; +static const char __pyx_k_data_array_must_be_1D[] = "data array must be 1D"; +static const char __pyx_k_driver_get_properties[] = "driver_get_properties"; +static const char __pyx_k_hk_A_1_pprrs_7_q0_a_1[] = "\200\001\360\006\000\005\010\200\177\220h\230k\250\033\260A\330\010\r\210^\2301\330\010\016\320\016!\320!p\320pr\320rs\330\004\023\220=\240\010\250\001\250\021\330\004\007\200|\2207\230!\330\010/\250q\3200@\300\016\310a\330\004\013\2101"; +static const char __pyx_k_mismatches_union_size[] = " mismatches union size "; +static const char __pyx_k_py_anon_pod1_from_ptr[] = "_py_anon_pod1.from_ptr"; +static const char __pyx_k_py_anon_pod2_from_ptr[] = "_py_anon_pod2.from_ptr"; +static const char __pyx_k_py_anon_pod3_from_ptr[] = "_py_anon_pod3.from_ptr"; +static const char __pyx_k_pyx_unpickle_IOEvents[] = "__pyx_unpickle_IOEvents"; +static const char __pyx_k_pyx_unpickle_IOParams[] = "__pyx_unpickle_IOParams"; +static const char __pyx_k_DRIVER_NOT_INITIALIZED[] = "DRIVER_NOT_INITIALIZED"; +static const char __pyx_k_INVALID_FILE_OPEN_FLAG[] = "INVALID_FILE_OPEN_FLAG"; +static const char __pyx_k_PLATFORM_NOT_SUPPORTED[] = "PLATFORM_NOT_SUPPORTED"; +static const char __pyx_k_hk_A_1_pprrs_5_7_q_a_1[] = "\200\001\360\006\000\005\010\200\177\220h\230k\250\033\260A\330\010\r\210^\2301\330\010\016\320\016!\320!p\320pr\320rs\330\004\023\2205\230\010\240\001\240\021\330\004\007\200|\2207\230!\330\010'\240q\250\010\260\016\270a\330\004\013\2101"; +static const char __pyx_k_index_is_out_of_bounds[] = "index is out of bounds"; +static const char __pyx_k_mismatches_struct_size[] = " mismatches struct size "; +static const char __pyx_k_ptr_must_not_be_null_0[] = "ptr must not be null (0)"; +static const char __pyx_k_py_anon_pod1_from_data[] = "_py_anon_pod1.from_data"; +static const char __pyx_k_py_anon_pod1_object_at[] = "._py_anon_pod1 object at "; +static const char __pyx_k_py_anon_pod2_from_data[] = "_py_anon_pod2.from_data"; +static const char __pyx_k_py_anon_pod2_object_at[] = "._py_anon_pod2 object at "; +static const char __pyx_k_py_anon_pod3_from_data[] = "_py_anon_pod3.from_data"; +static const char __pyx_k_py_anon_pod3_object_at[] = "._py_anon_pod3 object at "; +static const char __pyx_k_DRIVER_VERSION_MISMATCH[] = "DRIVER_VERSION_MISMATCH"; +static const char __pyx_k_Descr___setstate_cython[] = "Descr.__setstate_cython__"; +static const char __pyx_k_PROPERTIES_IO_BATCHSIZE[] = "PROPERTIES_IO_BATCHSIZE"; +static const char __pyx_k_SCALEFLUX_CSD_SUPPORTED[] = "SCALEFLUX_CSD_SUPPORTED"; +static const char __pyx_k_SKIP_TOPOLOGY_DETECTION[] = "SKIP_TOPOLOGY_DETECTION"; +static const char __pyx_k_CUDA_MEMORY_TYPE_INVALID[] = "CUDA_MEMORY_TYPE_INVALID"; +static const char __pyx_k_CUDA_POINTER_RANGE_ERROR[] = "CUDA_POINTER_RANGE_ERROR"; +static const char __pyx_k_DRIVER_UNSUPPORTED_LIMIT[] = "DRIVER_UNSUPPORTED_LIMIT"; +static const char __pyx_k_EXECUTION_MAX_IO_THREADS[] = "EXECUTION_MAX_IO_THREADS"; +static const char __pyx_k_IOEvents___reduce_cython[] = "IOEvents.__reduce_cython__"; +static const char __pyx_k_IOParams___reduce_cython[] = "IOParams.__reduce_cython__"; +static const char __pyx_k_PROPERTIES_USE_POLL_MODE[] = "PROPERTIES_USE_POLL_MODE"; +static const char __pyx_k_See_CUfileFeatureFlags_t[] = "See `CUfileFeatureFlags_t`."; +static const char __pyx_k_See_CUfileFileHandleType[] = "See `CUfileFileHandleType`."; +static const char __pyx_k_cuda_bindings_cufile_pyx[] = "cuda/bindings/cufile.pyx"; +static const char __pyx_k_hk_A_1_pprrs_881A_7_nA_1[] = "\200\001\360\006\000\005\010\200\177\220h\230k\250\033\260A\330\010\r\210^\2301\330\010\016\320\016!\320!p\320pr\320rs\330\004\023\2208\2308\2401\240A\330\004\007\200|\2207\230!\330\010*\250!\250;\260n\300A\330\004\013\2101"; +static const char __pyx_k_DRIVER_VERSION_READ_ERROR[] = "DRIVER_VERSION_READ_ERROR"; +static const char __pyx_k_GPU_MEMORY_PINNING_FAILED[] = "GPU_MEMORY_PINNING_FAILED"; +static const char __pyx_k_HANDLE_ALREADY_REGISTERED[] = "HANDLE_ALREADY_REGISTERED"; +static const char __pyx_k_MEMORY_ALREADY_REGISTERED[] = "MEMORY_ALREADY_REGISTERED"; +static const char __pyx_k_WN_8S_jjr_s_E_E_O_O_d_d_e[] = "\200\001\330\t\n\330\010\021\220\037\240\001\240\030\250\024\250W\260N\300)\3108\320S[\320[j\320jr\360\000\000s\001E\002\360\000\000E\002O\002\360\000\000O\002]\002\360\000\000]\002d\002\360\000\000d\002e\002\330\004\020\220\001\220\021"; +static const char __pyx_k_driver_set_max_cache_size[] = "driver_set_max_cache_size"; +static const char __pyx_k_IOEvents___setstate_cython[] = "IOEvents.__setstate_cython__"; +static const char __pyx_k_IOParams___setstate_cython[] = "IOParams.__setstate_cython__"; +static const char __pyx_k_T_G1F_a_vWA_q_t7_q_Qg_q_Qg[] = "\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220A\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\021\330\004\007\200q\330\010\017\320\017)\250\024\250Q\250g\260[\300\007\300q\340\010\017\320\017)\250\024\250Q\250g\260[\300\001"; +static const char __pyx_k_pyx_unpickle__py_anon_pod1[] = "__pyx_unpickle__py_anon_pod1"; +static const char __pyx_k_pyx_unpickle__py_anon_pod2[] = "__pyx_unpickle__py_anon_pod2"; +static const char __pyx_k_pyx_unpickle__py_anon_pod3[] = "__pyx_unpickle__py_anon_pod3"; +static const char __pyx_k_EXECUTION_MAX_IO_QUEUE_DEPTH[] = "EXECUTION_MAX_IO_QUEUE_DEPTH"; +static const char __pyx_k_FS_MISC_API_CHECK_AGGRESSIVE[] = "FS_MISC_API_CHECK_AGGRESSIVE"; +static const char __pyx_k_PROPERTIES_ALLOW_COMPAT_MODE[] = "PROPERTIES_ALLOW_COMPAT_MODE"; +static const char __pyx_k_py_anon_pod1___reduce_cython[] = "_py_anon_pod1.__reduce_cython__"; +static const char __pyx_k_py_anon_pod2___reduce_cython[] = "_py_anon_pod2.__reduce_cython__"; +static const char __pyx_k_py_anon_pod3___reduce_cython[] = "_py_anon_pod3.__reduce_cython__"; +static const char __pyx_k_See_CUfileDriverStatusFlags_t[] = "See `CUfileDriverStatusFlags_t`."; +static const char __pyx_k_driver_set_max_direct_io_size[] = "driver_set_max_direct_io_size"; +static const char __pyx_k_g_9HT_kks_t_F_F_P_P_a_a_h_h_i[] = "\200\001\330\t\n\330\010\021\320\021!\240\021\240(\250$\250g\260^\3009\310H\320T\\\320\\k\320ks\360\000\000t\001F\002\360\000\000F\002P\002\360\000\000P\002a\002\360\000\000a\002h\002\360\000\000h\002i\002\330\004\020\220\001\220\021"; +static const char __pyx_k_PROPERTIES_ALLOW_SYSTEM_MEMORY[] = "PROPERTIES_ALLOW_SYSTEM_MEMORY"; +static const char __pyx_k_PROPERTIES_BATCH_IO_TIMEOUT_MS[] = "PROPERTIES_BATCH_IO_TIMEOUT_MS"; +static const char __pyx_k_See_CUfileDriverControlFlags_t[] = "See `CUfileDriverControlFlags_t`."; +static const char __pyx_k_driver_set_max_pinned_mem_size[] = "driver_set_max_pinned_mem_size"; +static const char __pyx_k_py_anon_pod1___setstate_cython[] = "_py_anon_pod1.__setstate_cython__"; +static const char __pyx_k_py_anon_pod2___setstate_cython[] = "_py_anon_pod2.__setstate_cython__"; +static const char __pyx_k_py_anon_pod3___setstate_cython[] = "_py_anon_pod3.__setstate_cython__"; +static const char __pyx_k_q_Ja_N_G1A_r_Qiq_1_7_1_2_1_Qm5[] = "\320\004\037\230q\330\010\014\210J\220a\330\010\014\210N\230!\330\010\014\210G\2201\220A\330\010\027\220r\230\024\230Q\230i\240q\250\013\260?\300!\3001\330\010\013\2107\220'\230\021\330\014\020\220\n\230!\2301\330\014\023\2202\320\025(\250\001\250\031\260!\2601\330\010\r\210Q\210m\2305\240\t\250\021\250!"; +static const char __pyx_k_A_4s_AQ_haq_G_q_1_5_0_Zq_vXRuG1[] = "\200A\330-.\360\016\000\t\014\2104\210s\220!\330\014\022\220*\230A\230Q\330\010!\240\035\250h\260a\260q\330\010\024\220G\230?\320*?\270q\330\010\032\320\0321\260\021\330\014\023\2205\230\010\320 0\260\005\260Z\270q\330\010\017\210v\220X\230R\230u\240G\2501\330\036$\240A\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_4s_AQ_haq_G_q_1_5_35_1_vXRuG1[] = "\200A\330-.\360\016\000\t\014\2104\210s\220!\330\014\022\220*\230A\230Q\330\010!\240\035\250h\260a\260q\330\010\024\220G\230?\320*?\270q\330\010\032\320\0321\260\021\330\014\023\2205\230\010\320 3\2605\270\002\270)\3001\330\010\017\210v\220X\230R\230u\240G\2501\330\036$\240A\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_4s_AQ_haq_G_q_1_5_35_Q_vXRuG1[] = "\200A\330-.\360\016\000\t\014\2104\210s\220!\330\014\022\220*\230A\230Q\330\010!\240\035\250h\260a\260q\330\010\024\220G\230?\320*?\270q\330\010\032\320\0321\260\021\330\014\023\2205\230\010\320 3\2605\270\005\270Q\330\010\017\210v\220X\230R\230u\240G\2501\330\036$\240A\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\025\220S\230\006\230f\240A\240R\320';\2701\270G\3001\300A\330\010\013\210:\220]\240)\2501\250A\330\010\017\210q"; +static const char __pyx_k_EXECUTION_MIN_IO_THRESHOLD_SIZE[] = "EXECUTION_MIN_IO_THRESHOLD_SIZE_KB"; +static const char __pyx_k_See_CUFileBoolConfigParameter_t[] = "See `CUFileBoolConfigParameter_t`."; +static const char __pyx_k_See_CUFileStringConfigParameter[] = "See `CUFileStringConfigParameter_t`."; +static const char __pyx_k_T_G1F_a_vWA_q_t7_q_d_7_WA_d_7_Q[] = "\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220A\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\021\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q"; +static const char __pyx_k_T_a_G1F_a_vWA_q_t87_s_gWA_q_d_7[] = "\200\001\360\010\000\005\016\210T\220\031\230$\230a\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220A\330\010\022\220!\330\010\027\220q\340\010\027\220t\2308\2407\250%\250s\260$\260g\270W\300A\330\004\007\200q\330\010\017\320\017.\250d\260!\2607\270+\300W\310A\340\010\017\320\017.\250d\260!\2607\270+\300Q"; +static const char __pyx_k_data_array_must_be_of_dtype__py[] = "data array must be of dtype _py_anon_pod1_dtype"; +static const char __pyx_k_A_A_4s_AQ_HHAQ_G_q_1_5_1_6_vXRxw[] = "\200A\330+<\270A\360\020\000\t\014\2104\210s\220!\330\014\022\220*\230A\230Q\330\010\034\230H\240H\250A\250Q\330\010\024\220G\230?\320*?\270q\330\010\032\320\0321\260\021\330\014\023\2205\320\0301\260\022\2606\270\021\330\010\017\210v\220X\230R\230x\240w\250a\330\036$\240A\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_A_4s_AQ_haq_G_q_1_5_b_a_vXRxwa[] = "\200A\330+<\270A\360\020\000\t\014\2104\210s\220!\330\014\022\220*\230A\230Q\330\010\031\230\025\230h\240a\240q\330\010\024\220G\230?\320*?\270q\330\010\032\320\0321\260\021\330\014\023\2205\320\030.\250b\260\006\260a\330\010\017\210v\220X\230R\230x\240w\250a\330\036$\240A\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_HHAQ_4z_z_q_1A_4vS_AQ_4wc_AQ_9[] = "\200A\360\016\000\t\035\230H\240H\250A\250Q\330\010\013\2104\210z\230\021\230'\240\026\240z\260\026\260q\330\014\022\220)\2301\230A\330\010\013\2104\210v\220S\230\001\330\014\022\220*\230A\230Q\330\010\013\2104\210w\220c\230\021\330\014\022\220*\230A\230Q\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D[] = "\200A\360\016\000\t\"\240\035\250h\260a\260q\330\010\013\2104\210z\230\021\230'\240\026\240z\260\026\260q\330\014\022\220)\2301\230A\330\010\013\2104\210v\220S\230\001\330\014\022\220*\230A\230Q\330\010\013\2104\210w\220c\230\021\330\014\022\220*\230A\230Q\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_EXECUTION_MAX_REQUEST_PARALLELIS[] = "EXECUTION_MAX_REQUEST_PARALLELISM"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))"; +static const char __pyx_k_PROPERTIES_MAX_DEVICE_CACHE_SIZE[] = "PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB"; +static const char __pyx_k_PROPERTIES_MAX_DEVICE_PINNED_MEM[] = "PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB"; +static const char __pyx_k_PROPERTIES_MAX_DIRECT_IO_SIZE_KB[] = "PROPERTIES_MAX_DIRECT_IO_SIZE_KB"; +static const char __pyx_k_PROPERTIES_PER_BUFFER_CACHE_SIZE[] = "PROPERTIES_PER_BUFFER_CACHE_SIZE_KB"; +static const char __pyx_k_See_CUFileSizeTConfigParameter_t[] = "See `CUFileSizeTConfigParameter_t`."; +static const char __pyx_k_data_argument_must_be_a_NumPy_nd[] = "data argument must be a NumPy ndarray"; +static const char __pyx_k_data_array_must_be_of_dtype_desc[] = "data array must be of dtype descr_dtype"; +static const char __pyx_k_data_array_must_be_of_dtype_io_e[] = "data array must be of dtype io_events_dtype"; +static const char __pyx_k_data_array_must_be_of_dtype_io_p[] = "data array must be of dtype io_params_dtype"; +static const char __pyx_k_int_argument_must_be_a_bytes_lik[] = "int() argument must be a bytes-like object of size 1. To get the pointer address of an array, use .ptr"; +static const char __pyx_k_T_G1F_a_vWA_q_t7_q_d_7_WA_d_7_Q_2[] = "\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220A\330\010\022\220!\330\010\027\220q\340\010\027\220t\2307\240'\250\021\330\004\007\200q\330\010\017\320\017&\240d\250!\2507\260+\270W\300A\340\010\017\320\017&\240d\250!\2507\260+\270Q"; +static const char __pyx_k_data_array_must_be_of_dtype__py_2[] = "data array must be of dtype _py_anon_pod3_dtype"; +static const char __pyx_k_data_array_must_be_of_dtype__py_3[] = "data array must be of dtype _py_anon_pod2_dtype"; +static const char __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D_2[] = "\200A\360\016\000\t\032\230\025\230h\240a\240q\330\010\013\2104\210z\230\021\230'\240\026\240z\260\026\260q\330\014\022\220)\2301\230A\330\010\013\2104\210v\220S\230\001\330\014\022\220*\230A\230Q\330\010\013\2104\210w\220c\230\021\330\014\022\220*\230A\230Q\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\017\210q"; +static const char __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D_3[] = "\200A\360\016\000\t\"\240\035\250h\260a\260q\330\010\013\2104\210z\230\021\230'\240\026\240z\260\026\260q\330\014\022\220)\2301\230A\330\010\013\2104\210v\220S\230\001\330\014\022\220*\230A\230Q\330\010\013\2104\210w\220c\230\021\330\014\022\220*\230A\230Q\330\010\013\2109\220D\230\005\230Q\230f\240A\340\010\025\220S\230\006\230f\240A\240R\320';\2701\270G\3001\300A\330\010\013\210:\220]\240)\2501\250A\330\010\017\210q"; +static const char __pyx_k_Incompatible_checksums_0x_x_vs_0_2[] = "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))"; +/* #### Code section: decls ### */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size____get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents___init__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_14from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr___init__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_5Descr_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_4type___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_4type_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_14from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams___init__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_14from_data(PyObject *__pyx_v_data); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_11cuFileError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status, PyObject *__pyx_v_cu_err); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_11cuFileError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_handle_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_descr); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_2handle_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_4buf_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_length, int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_6buf_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_buf_ptr_base); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8read(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_10write(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_12driver_open(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_14use_count(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_16driver_get_properties(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_props); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_18driver_set_poll_mode(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_poll, size_t __pyx_v_poll_threshold_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_20driver_set_max_direct_io_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_direct_io_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_22driver_set_max_cache_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_cache_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_24driver_set_max_pinned_mem_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_pinned_size); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_26batch_io_set_up(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_nr); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_28batch_io_submit(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_nr, intptr_t __pyx_v_iocbp, unsigned int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_30batch_io_get_status(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_min_nr, intptr_t __pyx_v_nr, intptr_t __pyx_v_iocbp, intptr_t __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_32batch_io_cancel(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_34batch_io_destroy(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_36read_async(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_read_p, intptr_t __pyx_v_stream); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_38write_async(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_written_p, intptr_t __pyx_v_stream); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_40stream_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_stream, unsigned int __pyx_v_flags); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_42stream_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_stream); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_44get_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_46get_parameter_size_t(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_48get_parameter_bool(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_50get_parameter_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, int __pyx_v_len); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_52set_parameter_size_t(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, size_t __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_54set_parameter_bool(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, int __pyx_v_value); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_56set_parameter_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, intptr_t __pyx_v_desc_str); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_58op_status_error(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_60driver_close(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_62__pyx_unpickle__py_anon_pod1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_64__pyx_unpickle__py_anon_pod3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_66__pyx_unpickle_IOEvents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_68__pyx_unpickle_Descr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_70__pyx_unpickle__py_anon_pod2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_72__pyx_unpickle_IOParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_IOEvents(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_Descr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_IOParams(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyTypeObject *__pyx_ptype_7cpython_4bool_bool; + PyTypeObject *__pyx_ptype_7cpython_7complex_complex; + PyObject *__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1; + PyObject *__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3; + PyObject *__pyx_type_4cuda_8bindings_6cufile_IOEvents; + PyObject *__pyx_type_4cuda_8bindings_6cufile_Descr; + PyObject *__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2; + PyObject *__pyx_type_4cuda_8bindings_6cufile_IOParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile_IOEvents; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile_Descr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6cufile_IOParams; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[6]; + PyObject *__pyx_codeobj_tab[63]; + PyObject *__pyx_string_tab[370]; + PyObject *__pyx_int_0; + PyObject *__pyx_int_1; + PyObject *__pyx_int_8; + PyObject *__pyx_int_16; + PyObject *__pyx_int_40; + PyObject *__pyx_int_48; + PyObject *__pyx_int_56; + PyObject *__pyx_int_6135074; + PyObject *__pyx_int_118640979; + PyObject *__pyx_int_175497610; + PyObject *__pyx_int_201698594; + PyObject *__pyx_int_203986659; + PyObject *__pyx_int_224525342; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_ALLOW_COMPAT_MODE __pyx_string_tab[1] +#define __pyx_n_u_ASYNC_NOT_SUPPORTED __pyx_string_tab[2] +#define __pyx_n_u_AssertionError __pyx_string_tab[3] +#define __pyx_n_u_BATCH __pyx_string_tab[4] +#define __pyx_n_u_BATCH_FULL __pyx_string_tab[5] +#define __pyx_n_u_BATCH_IO_SUPPORTED __pyx_string_tab[6] +#define __pyx_n_u_BATCH_SUBMIT_FAILED __pyx_string_tab[7] +#define __pyx_n_u_BEEGFS_SUPPORTED __pyx_string_tab[8] +#define __pyx_n_u_BatchMode __pyx_string_tab[9] +#define __pyx_n_u_BoolConfigParameter __pyx_string_tab[10] +#define __pyx_n_u_CANCELED __pyx_string_tab[11] +#define __pyx_n_u_COMPLETE __pyx_string_tab[12] +#define __pyx_n_u_CUDA_CONTEXT_MISMATCH __pyx_string_tab[13] +#define __pyx_n_u_CUDA_DRIVER_ERROR __pyx_string_tab[14] +#define __pyx_n_u_CUDA_MEMORY_TYPE_INVALID __pyx_string_tab[15] +#define __pyx_n_u_CUDA_POINTER_INVALID __pyx_string_tab[16] +#define __pyx_n_u_CUDA_POINTER_RANGE_ERROR __pyx_string_tab[17] +#define __pyx_kp_u_CUDA_status __pyx_string_tab[18] +#define __pyx_n_u_CUresult __pyx_string_tab[19] +#define __pyx_n_u_DEVICE_NOT_FOUND __pyx_string_tab[20] +#define __pyx_n_u_DEVICE_NOT_SUPPORTED __pyx_string_tab[21] +#define __pyx_n_u_DIO_NOT_SET __pyx_string_tab[22] +#define __pyx_n_u_DRIVER_ALREADY_OPEN __pyx_string_tab[23] +#define __pyx_n_u_DRIVER_CLOSING __pyx_string_tab[24] +#define __pyx_n_u_DRIVER_INVALID_PROPS __pyx_string_tab[25] +#define __pyx_n_u_DRIVER_NOT_INITIALIZED __pyx_string_tab[26] +#define __pyx_n_u_DRIVER_UNSUPPORTED_LIMIT __pyx_string_tab[27] +#define __pyx_n_u_DRIVER_VERSION_MISMATCH __pyx_string_tab[28] +#define __pyx_n_u_DRIVER_VERSION_READ_ERROR __pyx_string_tab[29] +#define __pyx_n_u_DYN_ROUTING_SUPPORTED __pyx_string_tab[30] +#define __pyx_n_u_Descr __pyx_string_tab[31] +#define __pyx_kp_u_Descr_Array __pyx_string_tab[32] +#define __pyx_n_u_Descr___reduce_cython __pyx_string_tab[33] +#define __pyx_n_u_Descr___setstate_cython __pyx_string_tab[34] +#define __pyx_n_u_Descr_from_data __pyx_string_tab[35] +#define __pyx_n_u_Descr_from_ptr __pyx_string_tab[36] +#define __pyx_kp_u_Descr_object_at __pyx_string_tab[37] +#define __pyx_n_u_DriverControlFlags __pyx_string_tab[38] +#define __pyx_n_u_DriverStatusFlags __pyx_string_tab[39] +#define __pyx_n_u_ENV_LOGFILE_PATH __pyx_string_tab[40] +#define __pyx_n_u_EXECUTION_MAX_IO_QUEUE_DEPTH __pyx_string_tab[41] +#define __pyx_n_u_EXECUTION_MAX_IO_THREADS __pyx_string_tab[42] +#define __pyx_n_u_EXECUTION_MAX_REQUEST_PARALLELIS __pyx_string_tab[43] +#define __pyx_n_u_EXECUTION_MIN_IO_THRESHOLD_SIZE __pyx_string_tab[44] +#define __pyx_n_u_EXECUTION_PARALLEL_IO __pyx_string_tab[45] +#define __pyx_n_u_FAILED __pyx_string_tab[46] +#define __pyx_n_u_FORCE_COMPAT_MODE __pyx_string_tab[47] +#define __pyx_n_u_FORCE_ODIRECT_MODE __pyx_string_tab[48] +#define __pyx_n_u_FS_MISC_API_CHECK_AGGRESSIVE __pyx_string_tab[49] +#define __pyx_n_u_FeatureFlags __pyx_string_tab[50] +#define __pyx_n_u_FileHandleType __pyx_string_tab[51] +#define __pyx_n_u_GETNEWFD_FAILED __pyx_string_tab[52] +#define __pyx_n_u_GPFS_SUPPORTED __pyx_string_tab[53] +#define __pyx_n_u_GPU_MEMORY_PINNING_FAILED __pyx_string_tab[54] +#define __pyx_n_u_HANDLE_ALREADY_REGISTERED __pyx_string_tab[55] +#define __pyx_n_u_HANDLE_NOT_REGISTERED __pyx_string_tab[56] +#define __pyx_n_u_INTERNAL_ERROR __pyx_string_tab[57] +#define __pyx_n_u_INVALID __pyx_string_tab[58] +#define __pyx_n_u_INVALID_FILE_OPEN_FLAG __pyx_string_tab[59] +#define __pyx_n_u_INVALID_FILE_TYPE __pyx_string_tab[60] +#define __pyx_n_u_INVALID_MAPPING_RANGE __pyx_string_tab[61] +#define __pyx_n_u_INVALID_MAPPING_SIZE __pyx_string_tab[62] +#define __pyx_n_u_INVALID_VALUE __pyx_string_tab[63] +#define __pyx_n_u_IOEvents __pyx_string_tab[64] +#define __pyx_kp_u_IOEvents_Array __pyx_string_tab[65] +#define __pyx_n_u_IOEvents___reduce_cython __pyx_string_tab[66] +#define __pyx_n_u_IOEvents___setstate_cython __pyx_string_tab[67] +#define __pyx_n_u_IOEvents_from_data __pyx_string_tab[68] +#define __pyx_n_u_IOEvents_from_ptr __pyx_string_tab[69] +#define __pyx_kp_u_IOEvents_object_at __pyx_string_tab[70] +#define __pyx_n_u_IOParams __pyx_string_tab[71] +#define __pyx_kp_u_IOParams_Array __pyx_string_tab[72] +#define __pyx_n_u_IOParams___reduce_cython __pyx_string_tab[73] +#define __pyx_n_u_IOParams___setstate_cython __pyx_string_tab[74] +#define __pyx_n_u_IOParams_from_data __pyx_string_tab[75] +#define __pyx_n_u_IOParams_from_ptr __pyx_string_tab[76] +#define __pyx_kp_u_IOParams_object_at __pyx_string_tab[77] +#define __pyx_n_u_IO_DISABLED __pyx_string_tab[78] +#define __pyx_n_u_IO_MAX_ERROR __pyx_string_tab[79] +#define __pyx_n_u_IO_NOT_SUPPORTED __pyx_string_tab[80] +#define __pyx_kp_u_Incompatible_checksums_0x_x_vs_0 __pyx_string_tab[81] +#define __pyx_kp_u_Incompatible_checksums_0x_x_vs_0_2 __pyx_string_tab[82] +#define __pyx_n_u_IndexError __pyx_string_tab[83] +#define __pyx_n_u_IntEnum __pyx_string_tab[84] +#define __pyx_n_u_IntEnum_2 __pyx_string_tab[85] +#define __pyx_n_u_LOGGING_LEVEL __pyx_string_tab[86] +#define __pyx_n_u_LOG_DIR __pyx_string_tab[87] +#define __pyx_n_u_LUSTRE_SUPPORTED __pyx_string_tab[88] +#define __pyx_n_u_MEMORY_ALREADY_REGISTERED __pyx_string_tab[89] +#define __pyx_n_u_MEMORY_NOT_REGISTERED __pyx_string_tab[90] +#define __pyx_n_u_NFS_SUPPORTED __pyx_string_tab[91] +#define __pyx_n_u_NVFS_DRIVER_ERROR __pyx_string_tab[92] +#define __pyx_n_u_NVFS_SETUP_ERROR __pyx_string_tab[93] +#define __pyx_n_u_NVMEOF_SUPPORTED __pyx_string_tab[94] +#define __pyx_n_u_NVMESH_SUPPORTED __pyx_string_tab[95] +#define __pyx_n_u_NVME_P2P_SUPPORTED __pyx_string_tab[96] +#define __pyx_n_u_NVME_SUPPORTED __pyx_string_tab[97] +#define __pyx_kp_u_None __pyx_string_tab[98] +#define __pyx_n_u_OPAQUE_FD __pyx_string_tab[99] +#define __pyx_n_u_OPAQUE_WIN32 __pyx_string_tab[100] +#define __pyx_n_u_OpError __pyx_string_tab[101] +#define __pyx_n_u_Opcode __pyx_string_tab[102] +#define __pyx_n_u_PARALLEL_IO_SUPPORTED __pyx_string_tab[103] +#define __pyx_n_u_PENDING __pyx_string_tab[104] +#define __pyx_n_u_PERMISSION_DENIED __pyx_string_tab[105] +#define __pyx_n_u_PLATFORM_NOT_SUPPORTED __pyx_string_tab[106] +#define __pyx_n_u_POLLTHRESHOLD_SIZE_KB __pyx_string_tab[107] +#define __pyx_n_u_PREFER_IO_URING __pyx_string_tab[108] +#define __pyx_n_u_PROFILE_NVTX __pyx_string_tab[109] +#define __pyx_n_u_PROFILE_STATS __pyx_string_tab[110] +#define __pyx_n_u_PROPERTIES_ALLOW_COMPAT_MODE __pyx_string_tab[111] +#define __pyx_n_u_PROPERTIES_ALLOW_SYSTEM_MEMORY __pyx_string_tab[112] +#define __pyx_n_u_PROPERTIES_BATCH_IO_TIMEOUT_MS __pyx_string_tab[113] +#define __pyx_n_u_PROPERTIES_IO_BATCHSIZE __pyx_string_tab[114] +#define __pyx_n_u_PROPERTIES_MAX_DEVICE_CACHE_SIZE __pyx_string_tab[115] +#define __pyx_n_u_PROPERTIES_MAX_DEVICE_PINNED_MEM __pyx_string_tab[116] +#define __pyx_n_u_PROPERTIES_MAX_DIRECT_IO_SIZE_KB __pyx_string_tab[117] +#define __pyx_n_u_PROPERTIES_PER_BUFFER_CACHE_SIZE __pyx_string_tab[118] +#define __pyx_n_u_PROPERTIES_USE_POLL_MODE __pyx_string_tab[119] +#define __pyx_n_u_PickleError __pyx_string_tab[120] +#define __pyx_n_u_READ __pyx_string_tab[121] +#define __pyx_n_u_SCALEFLUX_CSD_SUPPORTED __pyx_string_tab[122] +#define __pyx_n_u_SCATEFS_SUPPORTED __pyx_string_tab[123] +#define __pyx_n_u_SCSI_SUPPORTED __pyx_string_tab[124] +#define __pyx_n_u_SKIP_TOPOLOGY_DETECTION __pyx_string_tab[125] +#define __pyx_n_u_STREAMS_SUPPORTED __pyx_string_tab[126] +#define __pyx_n_u_STREAM_MEMOPS_BYPASS __pyx_string_tab[127] +#define __pyx_n_u_SUCCESS __pyx_string_tab[128] +#define __pyx_kp_u_See_CUFileBoolConfigParameter_t __pyx_string_tab[129] +#define __pyx_kp_u_See_CUFileSizeTConfigParameter_t __pyx_string_tab[130] +#define __pyx_kp_u_See_CUFileStringConfigParameter __pyx_string_tab[131] +#define __pyx_kp_u_See_CUfileBatchMode_t __pyx_string_tab[132] +#define __pyx_kp_u_See_CUfileDriverControlFlags_t __pyx_string_tab[133] +#define __pyx_kp_u_See_CUfileDriverStatusFlags_t __pyx_string_tab[134] +#define __pyx_kp_u_See_CUfileFeatureFlags_t __pyx_string_tab[135] +#define __pyx_kp_u_See_CUfileFileHandleType __pyx_string_tab[136] +#define __pyx_kp_u_See_CUfileOpError __pyx_string_tab[137] +#define __pyx_kp_u_See_CUfileOpcode_t __pyx_string_tab[138] +#define __pyx_kp_u_See_CUfileStatus_t __pyx_string_tab[139] +#define __pyx_n_u_SizeTConfigParameter __pyx_string_tab[140] +#define __pyx_n_u_Status __pyx_string_tab[141] +#define __pyx_n_u_StringConfigParameter __pyx_string_tab[142] +#define __pyx_n_u_TIMEOUT __pyx_string_tab[143] +#define __pyx_n_u_TypeError __pyx_string_tab[144] +#define __pyx_n_u_USERSPACE_FS __pyx_string_tab[145] +#define __pyx_n_u_USE_PCIP2PDMA __pyx_string_tab[146] +#define __pyx_n_u_USE_POLL_MODE __pyx_string_tab[147] +#define __pyx_n_u_ValueError __pyx_string_tab[148] +#define __pyx_n_u_WAITING __pyx_string_tab[149] +#define __pyx_n_u_WEKAFS_SUPPORTED __pyx_string_tab[150] +#define __pyx_n_u_WRITE __pyx_string_tab[151] +#define __pyx_kp_u__2 __pyx_string_tab[152] +#define __pyx_kp_u__3 __pyx_string_tab[153] +#define __pyx_kp_u__4 __pyx_string_tab[154] +#define __pyx_kp_u__5 __pyx_string_tab[155] +#define __pyx_kp_u__6 __pyx_string_tab[156] +#define __pyx_kp_u__7 __pyx_string_tab[157] +#define __pyx_n_u_align __pyx_string_tab[158] +#define __pyx_n_u_all __pyx_string_tab[159] +#define __pyx_n_u_array_interface __pyx_string_tab[160] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[161] +#define __pyx_n_u_batch __pyx_string_tab[162] +#define __pyx_n_u_batch_addr __pyx_string_tab[163] +#define __pyx_n_u_batch_idp __pyx_string_tab[164] +#define __pyx_n_u_batch_io_cancel __pyx_string_tab[165] +#define __pyx_n_u_batch_io_destroy __pyx_string_tab[166] +#define __pyx_n_u_batch_io_get_status __pyx_string_tab[167] +#define __pyx_n_u_batch_io_set_up __pyx_string_tab[168] +#define __pyx_n_u_batch_io_submit __pyx_string_tab[169] +#define __pyx_n_u_buf __pyx_string_tab[170] +#define __pyx_n_u_buf_deregister __pyx_string_tab[171] +#define __pyx_n_u_buf_ptr_base __pyx_string_tab[172] +#define __pyx_n_u_buf_ptr_offset __pyx_string_tab[173] +#define __pyx_n_u_buf_ptr_offset_p __pyx_string_tab[174] +#define __pyx_n_u_buf_register __pyx_string_tab[175] +#define __pyx_n_u_buffer __pyx_string_tab[176] +#define __pyx_n_u_bytes_read_p __pyx_string_tab[177] +#define __pyx_n_u_bytes_written_p __pyx_string_tab[178] +#define __pyx_n_u_class_getitem __pyx_string_tab[179] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[180] +#define __pyx_n_u_cookie __pyx_string_tab[181] +#define __pyx_n_u_ctypes __pyx_string_tab[182] +#define __pyx_n_u_cuFileError __pyx_string_tab[183] +#define __pyx_n_u_cuFileError___init __pyx_string_tab[184] +#define __pyx_n_u_cuFileError___reduce __pyx_string_tab[185] +#define __pyx_n_u_cu_err __pyx_string_tab[186] +#define __pyx_n_u_cuda_bindings_cufile __pyx_string_tab[187] +#define __pyx_kp_u_cuda_bindings_cufile_pyx __pyx_string_tab[188] +#define __pyx_n_u_cuda_bindings_driver __pyx_string_tab[189] +#define __pyx_n_u_cuda_error __pyx_string_tab[190] +#define __pyx_n_u_data __pyx_string_tab[191] +#define __pyx_n_u_data_2 __pyx_string_tab[192] +#define __pyx_kp_u_data_argument_must_be_a_NumPy_nd __pyx_string_tab[193] +#define __pyx_kp_u_data_array_must_be_1D __pyx_string_tab[194] +#define __pyx_kp_u_data_array_must_be_of_dtype__py __pyx_string_tab[195] +#define __pyx_kp_u_data_array_must_be_of_dtype__py_2 __pyx_string_tab[196] +#define __pyx_kp_u_data_array_must_be_of_dtype__py_3 __pyx_string_tab[197] +#define __pyx_kp_u_data_array_must_be_of_dtype_desc __pyx_string_tab[198] +#define __pyx_kp_u_data_array_must_be_of_dtype_io_e __pyx_string_tab[199] +#define __pyx_kp_u_data_array_must_be_of_dtype_io_p __pyx_string_tab[200] +#define __pyx_n_u_desc_str __pyx_string_tab[201] +#define __pyx_n_u_descr __pyx_string_tab[202] +#define __pyx_n_u_descr_dtype __pyx_string_tab[203] +#define __pyx_n_u_dev_ptr_base __pyx_string_tab[204] +#define __pyx_n_u_dev_ptr_offset __pyx_string_tab[205] +#define __pyx_n_u_dict __pyx_string_tab[206] +#define __pyx_n_u_dict_2 __pyx_string_tab[207] +#define __pyx_kp_u_disable __pyx_string_tab[208] +#define __pyx_n_u_doc __pyx_string_tab[209] +#define __pyx_n_u_driver_close __pyx_string_tab[210] +#define __pyx_n_u_driver_get_properties __pyx_string_tab[211] +#define __pyx_n_u_driver_open __pyx_string_tab[212] +#define __pyx_n_u_driver_set_max_cache_size __pyx_string_tab[213] +#define __pyx_n_u_driver_set_max_direct_io_size __pyx_string_tab[214] +#define __pyx_n_u_driver_set_max_pinned_mem_size __pyx_string_tab[215] +#define __pyx_n_u_driver_set_poll_mode __pyx_string_tab[216] +#define __pyx_n_u_dtype __pyx_string_tab[217] +#define __pyx_n_u_e __pyx_string_tab[218] +#define __pyx_n_u_empty __pyx_string_tab[219] +#define __pyx_kp_u_enable __pyx_string_tab[220] +#define __pyx_n_u_enum __pyx_string_tab[221] +#define __pyx_n_u_err __pyx_string_tab[222] +#define __pyx_n_u_fd __pyx_string_tab[223] +#define __pyx_n_u_fh __pyx_string_tab[224] +#define __pyx_n_u_file_offset __pyx_string_tab[225] +#define __pyx_n_u_file_offset_p __pyx_string_tab[226] +#define __pyx_n_u_flag __pyx_string_tab[227] +#define __pyx_n_u_flags __pyx_string_tab[228] +#define __pyx_n_u_formats __pyx_string_tab[229] +#define __pyx_n_u_from_data __pyx_string_tab[230] +#define __pyx_n_u_from_ptr __pyx_string_tab[231] +#define __pyx_n_u_fs_ops __pyx_string_tab[232] +#define __pyx_n_u_func __pyx_string_tab[233] +#define __pyx_kp_u_gc __pyx_string_tab[234] +#define __pyx_n_u_get_parameter_bool __pyx_string_tab[235] +#define __pyx_n_u_get_parameter_size_t __pyx_string_tab[236] +#define __pyx_n_u_get_parameter_string __pyx_string_tab[237] +#define __pyx_n_u_get_version __pyx_string_tab[238] +#define __pyx_n_u_getstate __pyx_string_tab[239] +#define __pyx_n_u_handle __pyx_string_tab[240] +#define __pyx_n_u_handle_deregister __pyx_string_tab[241] +#define __pyx_n_u_handle_register __pyx_string_tab[242] +#define __pyx_n_u_hex __pyx_string_tab[243] +#define __pyx_n_u_id __pyx_string_tab[244] +#define __pyx_kp_u_index_is_out_of_bounds __pyx_string_tab[245] +#define __pyx_n_u_init __pyx_string_tab[246] +#define __pyx_n_u_initializing __pyx_string_tab[247] +#define __pyx_n_u_int32 __pyx_string_tab[248] +#define __pyx_n_u_int64 __pyx_string_tab[249] +#define __pyx_kp_u_int_argument_must_be_a_bytes_lik __pyx_string_tab[250] +#define __pyx_n_u_intp __pyx_string_tab[251] +#define __pyx_n_u_io_events_dtype __pyx_string_tab[252] +#define __pyx_n_u_io_params_dtype __pyx_string_tab[253] +#define __pyx_n_u_iocbp __pyx_string_tab[254] +#define __pyx_n_u_is_coroutine __pyx_string_tab[255] +#define __pyx_kp_u_isenabled __pyx_string_tab[256] +#define __pyx_n_u_itemsize __pyx_string_tab[257] +#define __pyx_kp_u_itemsize_2 __pyx_string_tab[258] +#define __pyx_n_u_len __pyx_string_tab[259] +#define __pyx_n_u_length __pyx_string_tab[260] +#define __pyx_n_u_main __pyx_string_tab[261] +#define __pyx_n_u_max_cache_size __pyx_string_tab[262] +#define __pyx_n_u_max_direct_io_size __pyx_string_tab[263] +#define __pyx_n_u_max_pinned_size __pyx_string_tab[264] +#define __pyx_n_u_metaclass __pyx_string_tab[265] +#define __pyx_n_u_min_nr __pyx_string_tab[266] +#define __pyx_kp_u_mismatches_struct_size __pyx_string_tab[267] +#define __pyx_kp_u_mismatches_union_size __pyx_string_tab[268] +#define __pyx_n_u_mode __pyx_string_tab[269] +#define __pyx_n_u_module __pyx_string_tab[270] +#define __pyx_n_u_mro_entries __pyx_string_tab[271] +#define __pyx_n_u_name __pyx_string_tab[272] +#define __pyx_n_u_name_2 __pyx_string_tab[273] +#define __pyx_n_u_names __pyx_string_tab[274] +#define __pyx_n_u_ndarray __pyx_string_tab[275] +#define __pyx_n_u_ndim __pyx_string_tab[276] +#define __pyx_n_u_new __pyx_string_tab[277] +#define __pyx_n_u_nr __pyx_string_tab[278] +#define __pyx_n_u_numpy __pyx_string_tab[279] +#define __pyx_n_u_numpy_2 __pyx_string_tab[280] +#define __pyx_n_u_obj __pyx_string_tab[281] +#define __pyx_kp_u_object_at __pyx_string_tab[282] +#define __pyx_n_u_offsets __pyx_string_tab[283] +#define __pyx_n_u_op_status_error __pyx_string_tab[284] +#define __pyx_n_u_opcode __pyx_string_tab[285] +#define __pyx_n_u_param __pyx_string_tab[286] +#define __pyx_n_u_pickle __pyx_string_tab[287] +#define __pyx_n_u_poll __pyx_string_tab[288] +#define __pyx_n_u_poll_threshold_size __pyx_string_tab[289] +#define __pyx_n_u_pop __pyx_string_tab[290] +#define __pyx_n_u_prepare __pyx_string_tab[291] +#define __pyx_n_u_props __pyx_string_tab[292] +#define __pyx_n_u_ptr __pyx_string_tab[293] +#define __pyx_kp_u_ptr_must_not_be_null_0 __pyx_string_tab[294] +#define __pyx_n_u_pyCUresult __pyx_string_tab[295] +#define __pyx_n_u_py_anon_pod1 __pyx_string_tab[296] +#define __pyx_n_u_py_anon_pod1___reduce_cython __pyx_string_tab[297] +#define __pyx_n_u_py_anon_pod1___setstate_cython __pyx_string_tab[298] +#define __pyx_n_u_py_anon_pod1_dtype __pyx_string_tab[299] +#define __pyx_n_u_py_anon_pod1_from_data __pyx_string_tab[300] +#define __pyx_n_u_py_anon_pod1_from_ptr __pyx_string_tab[301] +#define __pyx_kp_u_py_anon_pod1_object_at __pyx_string_tab[302] +#define __pyx_n_u_py_anon_pod2 __pyx_string_tab[303] +#define __pyx_n_u_py_anon_pod2___reduce_cython __pyx_string_tab[304] +#define __pyx_n_u_py_anon_pod2___setstate_cython __pyx_string_tab[305] +#define __pyx_n_u_py_anon_pod2_dtype __pyx_string_tab[306] +#define __pyx_n_u_py_anon_pod2_from_data __pyx_string_tab[307] +#define __pyx_n_u_py_anon_pod2_from_ptr __pyx_string_tab[308] +#define __pyx_kp_u_py_anon_pod2_object_at __pyx_string_tab[309] +#define __pyx_n_u_py_anon_pod3 __pyx_string_tab[310] +#define __pyx_n_u_py_anon_pod3___reduce_cython __pyx_string_tab[311] +#define __pyx_n_u_py_anon_pod3___setstate_cython __pyx_string_tab[312] +#define __pyx_n_u_py_anon_pod3_dtype __pyx_string_tab[313] +#define __pyx_n_u_py_anon_pod3_from_data __pyx_string_tab[314] +#define __pyx_n_u_py_anon_pod3_from_ptr __pyx_string_tab[315] +#define __pyx_kp_u_py_anon_pod3_object_at __pyx_string_tab[316] +#define __pyx_n_u_pyx_PickleError __pyx_string_tab[317] +#define __pyx_n_u_pyx_checksum __pyx_string_tab[318] +#define __pyx_n_u_pyx_result __pyx_string_tab[319] +#define __pyx_n_u_pyx_state __pyx_string_tab[320] +#define __pyx_n_u_pyx_type __pyx_string_tab[321] +#define __pyx_n_u_pyx_unpickle_Descr __pyx_string_tab[322] +#define __pyx_n_u_pyx_unpickle_IOEvents __pyx_string_tab[323] +#define __pyx_n_u_pyx_unpickle_IOParams __pyx_string_tab[324] +#define __pyx_n_u_pyx_unpickle__py_anon_pod1 __pyx_string_tab[325] +#define __pyx_n_u_pyx_unpickle__py_anon_pod2 __pyx_string_tab[326] +#define __pyx_n_u_pyx_unpickle__py_anon_pod3 __pyx_string_tab[327] +#define __pyx_n_u_qualname __pyx_string_tab[328] +#define __pyx_n_u_read __pyx_string_tab[329] +#define __pyx_n_u_read_async __pyx_string_tab[330] +#define __pyx_n_u_readonly __pyx_string_tab[331] +#define __pyx_n_u_recarray __pyx_string_tab[332] +#define __pyx_n_u_reduce __pyx_string_tab[333] +#define __pyx_n_u_reduce_cython __pyx_string_tab[334] +#define __pyx_n_u_reduce_ex __pyx_string_tab[335] +#define __pyx_n_u_ret __pyx_string_tab[336] +#define __pyx_n_u_s __pyx_string_tab[337] +#define __pyx_n_u_self __pyx_string_tab[338] +#define __pyx_n_u_set_name __pyx_string_tab[339] +#define __pyx_n_u_set_parameter_bool __pyx_string_tab[340] +#define __pyx_n_u_set_parameter_size_t __pyx_string_tab[341] +#define __pyx_n_u_set_parameter_string __pyx_string_tab[342] +#define __pyx_n_u_setstate __pyx_string_tab[343] +#define __pyx_n_u_setstate_cython __pyx_string_tab[344] +#define __pyx_n_u_size __pyx_string_tab[345] +#define __pyx_n_u_size_2 __pyx_string_tab[346] +#define __pyx_n_u_size_p __pyx_string_tab[347] +#define __pyx_n_u_spec __pyx_string_tab[348] +#define __pyx_n_u_state __pyx_string_tab[349] +#define __pyx_n_u_staticmethod __pyx_string_tab[350] +#define __pyx_n_u_status __pyx_string_tab[351] +#define __pyx_n_u_stream __pyx_string_tab[352] +#define __pyx_n_u_stream_deregister __pyx_string_tab[353] +#define __pyx_n_u_stream_register __pyx_string_tab[354] +#define __pyx_kp_u_stringsource __pyx_string_tab[355] +#define __pyx_n_u_super __pyx_string_tab[356] +#define __pyx_n_u_test __pyx_string_tab[357] +#define __pyx_n_u_timeout __pyx_string_tab[358] +#define __pyx_n_u_type __pyx_string_tab[359] +#define __pyx_n_u_u __pyx_string_tab[360] +#define __pyx_n_u_uint64 __pyx_string_tab[361] +#define __pyx_n_u_update __pyx_string_tab[362] +#define __pyx_n_u_use_count __pyx_string_tab[363] +#define __pyx_n_u_use_setstate __pyx_string_tab[364] +#define __pyx_n_u_value __pyx_string_tab[365] +#define __pyx_n_u_view __pyx_string_tab[366] +#define __pyx_n_u_void __pyx_string_tab[367] +#define __pyx_n_u_write __pyx_string_tab[368] +#define __pyx_n_u_write_async __pyx_string_tab[369] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile_IOEvents); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile_Descr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_6cufile_IOParams); + for (int i=0; i<6; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<63; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<370; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + Py_CLEAR(clear_module_state->__pyx_int_0); + Py_CLEAR(clear_module_state->__pyx_int_1); + Py_CLEAR(clear_module_state->__pyx_int_8); + Py_CLEAR(clear_module_state->__pyx_int_16); + Py_CLEAR(clear_module_state->__pyx_int_40); + Py_CLEAR(clear_module_state->__pyx_int_48); + Py_CLEAR(clear_module_state->__pyx_int_56); + Py_CLEAR(clear_module_state->__pyx_int_6135074); + Py_CLEAR(clear_module_state->__pyx_int_118640979); + Py_CLEAR(clear_module_state->__pyx_int_175497610); + Py_CLEAR(clear_module_state->__pyx_int_201698594); + Py_CLEAR(clear_module_state->__pyx_int_203986659); + Py_CLEAR(clear_module_state->__pyx_int_224525342); + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile_IOEvents); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile_Descr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_6cufile_IOParams); + for (int i=0; i<6; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<63; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<370; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_8); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_16); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_40); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_48); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_56); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_6135074); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_118640979); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_175497610); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_201698594); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_203986659); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_224525342); + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":23 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: + * return self.cval.real # <<<<<<<<<<<<<< + * + * # unavailable in limited API +*/ + __pyx_r = __pyx_v_self->cval.real; + goto __pyx_L0; + + /* "cpython/complex.pxd":20 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double real(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) { + double __pyx_r; + + /* "cpython/complex.pxd":29 + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: + * return self.cval.imag # <<<<<<<<<<<<<< + * + * # PyTypeObject PyComplex_Type +*/ + __pyx_r = __pyx_v_self->cval.imag; + goto __pyx_L0; + + /* "cpython/complex.pxd":26 + * + * # unavailable in limited API + * @property # <<<<<<<<<<<<<< + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline double imag(self) noexcept: +*/ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":116 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the default value of the context variable, +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":121 + * or None if no such value or default was found. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":122 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<< + * if value is NULL: + * # context variable does not have a default +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 122, __pyx_L1_error) + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + __pyx_t_2 = (__pyx_v_value == NULL); + if (__pyx_t_2) { + + /* "cpython/contextvars.pxd":125 + * if value is NULL: + * # context variable does not have a default + * pyvalue = default_value # <<<<<<<<<<<<<< + * else: + * # value or default value of context variable +*/ + __Pyx_INCREF(__pyx_v_default_value); + __pyx_v_pyvalue = __pyx_v_default_value; + + /* "cpython/contextvars.pxd":123 + * cdef PyObject *value = NULL + * PyContextVar_Get(var, NULL, &value) + * if value is NULL: # <<<<<<<<<<<<<< + * # context variable does not have a default + * pyvalue = default_value +*/ + goto __pyx_L3; + } + + /* "cpython/contextvars.pxd":128 + * else: + * # value or default value of context variable + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + /*else*/ { + __pyx_t_3 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_3); + __pyx_v_pyvalue = __pyx_t_3; + __pyx_t_3 = 0; + + /* "cpython/contextvars.pxd":129 + * # value or default value of context variable + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue + * +*/ + Py_XDECREF(__pyx_v_value); + } + __pyx_L3:; + + /* "cpython/contextvars.pxd":130 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":115 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + +#if !CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) { + + /* "cpython/contextvars.pxd":134 + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") + * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<< + * """Return a new reference to the value of the context variable, + * or the provided default value if no such value was found. +*/ + PyObject *__pyx_v_default_value = ((PyObject *)Py_None); + PyObject *__pyx_v_value; + PyObject *__pyx_v_pyvalue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_value_no_default", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_default_value = __pyx_optional_args->default_value; + } + } + + /* "cpython/contextvars.pxd":140 + * Ignores the default value of the context variable, if any. + * """ + * cdef PyObject *value = NULL # <<<<<<<<<<<<<< + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' +*/ + __pyx_v_value = NULL; + + /* "cpython/contextvars.pxd":141 + * """ + * cdef PyObject *value = NULL + * PyContextVar_Get(var, default_value, &value) # <<<<<<<<<<<<<< + * # value of context variable or 'default_value' + * pyvalue = value +*/ + __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 141, __pyx_L1_error) + + /* "cpython/contextvars.pxd":143 + * PyContextVar_Get(var, default_value, &value) + * # value of context variable or 'default_value' + * pyvalue = value # <<<<<<<<<<<<<< + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue +*/ + __pyx_t_2 = ((PyObject *)__pyx_v_value); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_pyvalue = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cpython/contextvars.pxd":144 + * # value of context variable or 'default_value' + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<< + * return pyvalue +*/ + Py_XDECREF(__pyx_v_value); + + /* "cpython/contextvars.pxd":145 + * pyvalue = value + * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' + * return pyvalue # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_pyvalue); + __pyx_r = __pyx_v_pyvalue; + goto __pyx_L0; + + /* "cpython/contextvars.pxd":133 + * + * + * @_cython.c_compile_guard("!CYTHON_COMPILING_IN_LIMITED_API") # <<<<<<<<<<<<<< + * cdef inline object get_value_no_default(var, default_value=None): + * """Return a new reference to the value of the context variable, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pyvalue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +#endif /*!(#if !CYTHON_COMPILING_IN_LIMITED_API)*/ + +/* "cuda/bindings/cufile.pyx":43 + * readonly object _data + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1___init__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":44 + * + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).handle), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":45 + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof((NULL).handle), \ + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":46 + * arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).handle), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(((CUfileDescr_t *)NULL)->handle))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":47 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).handle), \ + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(((CUfileDescr_t *)NULL)->handle)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_union_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 46, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 46, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":43 + * readonly object _data + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":49 + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":50 + * + * def __repr__(self): + * return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_py_anon_pod1_object_at; + __pyx_t_4[3] = __pyx_t_1; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":49 + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":52 + * return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":55 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":52 + * return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":57 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":58 + * + * def __int__(self): + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":57 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":60 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod1): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":61 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod1): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":62 + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod1): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":61 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod1): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":63 + * if not isinstance(other, _py_anon_pod1): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":64 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":63 + * if not isinstance(other, _py_anon_pod1): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":65 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":66 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":65 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":67 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":60 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod1): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":69 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def fd(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":72 + * def fd(self): + * """int: """ + * return int(self._data.fd[0]) # <<<<<<<<<<<<<< + * + * @fd.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":69 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def fd(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.fd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":74 + * return int(self._data.fd[0]) + * + * @fd.setter # <<<<<<<<<<<<<< + * def fd(self, val): + * self._data.fd = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":76 + * @fd.setter + * def fd(self, val): + * self._data.fd = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fd, __pyx_v_val) < (0)) __PYX_ERR(0, 76, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":74 + * return int(self._data.fd[0]) + * + * @fd.setter # <<<<<<<<<<<<<< + * def fd(self, val): + * self._data.fd = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.fd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":78 + * self._data.fd = val + * + * @property # <<<<<<<<<<<<<< + * def handle(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":81 + * def handle(self): + * """int: """ + * return int(self._data.handle[0]) # <<<<<<<<<<<<<< + * + * @handle.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":78 + * self._data.fd = val + * + * @property # <<<<<<<<<<<<<< + * def handle(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":83 + * return int(self._data.handle[0]) + * + * @handle.setter # <<<<<<<<<<<<<< + * def handle(self, val): + * self._data.handle = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":85 + * @handle.setter + * def handle(self, val): + * self._data.handle = val # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_handle, __pyx_v_val) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":83 + * return int(self._data.handle[0]) + * + * @handle.setter # <<<<<<<<<<<<<< + * def handle(self, val): + * self._data.handle = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":87 + * self._data.handle = val + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_8__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":88 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 88, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":87 + * self._data.handle = val + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":90 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod1 instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data, "_py_anon_pod1.from_data(data)\n\nCreate an _py_anon_pod1 instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod1_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 90, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 90, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 90, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 90, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 90, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_obj = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":97 + * data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod1_dtype` holding the data. + * """ + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":98 + * """ + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":99 + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 99, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":98 + * """ + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":100 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod1_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":101 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != _py_anon_pod1_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod1_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 101, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":100 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod1_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":102 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod1_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod1_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":103 + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod1_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod1_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype__py}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 103, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":102 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod1_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod1_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":104 + * if data.dtype != _py_anon_pod1_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod1_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":106 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":90 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod1 instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":108 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod1 instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr, "_py_anon_pod1.from_ptr(intptr_t ptr, bool readonly=False)\n\nCreate an _py_anon_pod1 instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 108, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 108, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 108, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, i); __PYX_ERR(0, 108, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 108, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 108, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error) + if (values[1]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 109, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":109 + * + * @staticmethod + * def from_ptr(intptr_t ptr, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an _py_anon_pod1 instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 108, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr(__pyx_v_ptr, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":108 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod1 instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":116 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":117 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 117, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":116 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) +*/ + } + + /* "cuda/bindings/cufile.pyx":118 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":119 + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).handle), flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":121 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).handle), flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod1_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":120 + * cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof((NULL).handle), flag) + * data = _numpy.ndarray((1,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), (sizeof(((CUfileDescr_t *)NULL)->handle)), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":122 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).handle), flag) + * data = _numpy.ndarray((1,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=_py_anon_pod1_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":123 + * ptr, sizeof((NULL).handle), flag) + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod1_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0]}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 122, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":124 + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod1_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":126 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":108 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod1 instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":41 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * def __init__(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__, "_py_anon_pod1.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._data,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_data != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._data is not None + * if use_setstate: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, None), state + * else: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod1__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod1__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__, "_py_anon_pod1.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod1__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod1__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod1__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod1.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":146 + * readonly object _data + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3___init__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":147 + * + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u.batch), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":148 + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof((NULL).u.batch), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":149 + * arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u.batch), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(((CUfileIOParams_t *)NULL)->u.batch))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":150 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u.batch), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(((CUfileIOParams_t *)NULL)->u.batch)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_struct_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 149, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 149, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":146 + * readonly object _data + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":152 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":153 + * + * def __repr__(self): + * return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_py_anon_pod3_object_at; + __pyx_t_4[3] = __pyx_t_1; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":152 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":155 + * return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":158 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":155 + * return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":160 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":161 + * + * def __int__(self): + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":160 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":163 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod3): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_6__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":164 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod3): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":165 + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod3): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":164 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod3): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":166 + * if not isinstance(other, _py_anon_pod3): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":167 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":166 + * if not isinstance(other, _py_anon_pod3): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":168 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":169 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":168 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":170 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":163 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod3): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":172 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def dev_ptr_base(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":175 + * def dev_ptr_base(self): + * """int: """ + * return int(self._data.dev_ptr_base[0]) # <<<<<<<<<<<<<< + * + * @dev_ptr_base.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dev_ptr_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":172 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def dev_ptr_base(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.dev_ptr_base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":177 + * return int(self._data.dev_ptr_base[0]) + * + * @dev_ptr_base.setter # <<<<<<<<<<<<<< + * def dev_ptr_base(self, val): + * self._data.dev_ptr_base = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":179 + * @dev_ptr_base.setter + * def dev_ptr_base(self, val): + * self._data.dev_ptr_base = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dev_ptr_base, __pyx_v_val) < (0)) __PYX_ERR(0, 179, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":177 + * return int(self._data.dev_ptr_base[0]) + * + * @dev_ptr_base.setter # <<<<<<<<<<<<<< + * def dev_ptr_base(self, val): + * self._data.dev_ptr_base = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.dev_ptr_base.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":181 + * self._data.dev_ptr_base = val + * + * @property # <<<<<<<<<<<<<< + * def file_offset(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":184 + * def file_offset(self): + * """int: """ + * return int(self._data.file_offset[0]) # <<<<<<<<<<<<<< + * + * @file_offset.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_file_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":181 + * self._data.dev_ptr_base = val + * + * @property # <<<<<<<<<<<<<< + * def file_offset(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.file_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":186 + * return int(self._data.file_offset[0]) + * + * @file_offset.setter # <<<<<<<<<<<<<< + * def file_offset(self, val): + * self._data.file_offset = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":188 + * @file_offset.setter + * def file_offset(self, val): + * self._data.file_offset = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_file_offset, __pyx_v_val) < (0)) __PYX_ERR(0, 188, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":186 + * return int(self._data.file_offset[0]) + * + * @file_offset.setter # <<<<<<<<<<<<<< + * def file_offset(self, val): + * self._data.file_offset = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.file_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":190 + * self._data.file_offset = val + * + * @property # <<<<<<<<<<<<<< + * def dev_ptr_offset(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":193 + * def dev_ptr_offset(self): + * """int: """ + * return int(self._data.dev_ptr_offset[0]) # <<<<<<<<<<<<<< + * + * @dev_ptr_offset.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dev_ptr_offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":190 + * self._data.file_offset = val + * + * @property # <<<<<<<<<<<<<< + * def dev_ptr_offset(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.dev_ptr_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":195 + * return int(self._data.dev_ptr_offset[0]) + * + * @dev_ptr_offset.setter # <<<<<<<<<<<<<< + * def dev_ptr_offset(self, val): + * self._data.dev_ptr_offset = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":197 + * @dev_ptr_offset.setter + * def dev_ptr_offset(self, val): + * self._data.dev_ptr_offset = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dev_ptr_offset, __pyx_v_val) < (0)) __PYX_ERR(0, 197, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":195 + * return int(self._data.dev_ptr_offset[0]) + * + * @dev_ptr_offset.setter # <<<<<<<<<<<<<< + * def dev_ptr_offset(self, val): + * self._data.dev_ptr_offset = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.dev_ptr_offset.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":199 + * self._data.dev_ptr_offset = val + * + * @property # <<<<<<<<<<<<<< + * def size_(self): + * """int: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size____get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size____get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":202 + * def size_(self): + * """int: """ + * return int(self._data.size_[0]) # <<<<<<<<<<<<<< + * + * @size_.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":199 + * self._data.dev_ptr_offset = val + * + * @property # <<<<<<<<<<<<<< + * def size_(self): + * """int: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.size_.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":204 + * return int(self._data.size_[0]) + * + * @size_.setter # <<<<<<<<<<<<<< + * def size_(self, val): + * self._data.size_ = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__2__set__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":206 + * @size_.setter + * def size_(self, val): + * self._data.size_ = val # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_v_val) < (0)) __PYX_ERR(0, 206, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":204 + * return int(self._data.size_[0]) + * + * @size_.setter # <<<<<<<<<<<<<< + * def size_(self, val): + * self._data.size_ = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.size_.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":208 + * self._data.size_ = val + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_8__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":209 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 209, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":208 + * self._data.size_ = val + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":211 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod3 instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data, "_py_anon_pod3.from_data(data)\n\nCreate an _py_anon_pod3 instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod3_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 211, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_obj = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":218 + * data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod3_dtype` holding the data. + * """ + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":219 + * """ + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":220 + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 220, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":219 + * """ + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":221 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod3_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":222 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != _py_anon_pod3_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod3_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 222, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":221 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod3_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":223 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod3_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod3_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 223, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":224 + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod3_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod3_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype__py_2}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 224, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":223 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod3_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod3_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":225 + * if data.dtype != _py_anon_pod3_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod3_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":227 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":211 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod3 instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":229 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod3 instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr, "_py_anon_pod3.from_ptr(intptr_t ptr, bool readonly=False)\n\nCreate an _py_anon_pod3 instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 229, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 229, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 229, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, i); __PYX_ERR(0, 229, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 229, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L3_error) + if (values[1]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":230 + * + * @staticmethod + * def from_ptr(intptr_t ptr, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an _py_anon_pod3 instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 229, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr(__pyx_v_ptr, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":229 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod3 instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":237 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":238 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 238, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":237 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) +*/ + } + + /* "cuda/bindings/cufile.pyx":239 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":240 + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u.batch), flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":242 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u.batch), flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod3_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":241 + * cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof((NULL).u.batch), flag) + * data = _numpy.ndarray((1,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), (sizeof(((CUfileIOParams_t *)NULL)->u.batch)), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":243 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u.batch), flag) + * data = _numpy.ndarray((1,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=_py_anon_pod3_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":244 + * ptr, sizeof((NULL).u.batch), flag) + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod3_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0]}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":245 + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod3_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":247 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":229 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod3 instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":144 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * def __init__(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__, "_py_anon_pod3.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._data,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_data != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._data is not None + * if use_setstate: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, None), state + * else: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod3__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod3__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__, "_py_anon_pod3.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod3__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod3__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod3__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":272 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=io_events_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_size = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 272, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 272, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } + __pyx_v_size = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 272, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents___init__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), __pyx_v_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents___init__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_size) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":273 + * + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=io_events_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOEvents_t), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_events_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_size}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":274 + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=io_events_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof(CUfileIOEvents_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":275 + * arr = _numpy.empty(size, dtype=io_events_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOEvents_t), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(CUfileIOEvents_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":276 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOEvents_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(CUfileIOEvents_t)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_struct_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 275, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 275, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":272 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=io_events_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":278 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6[7]; + PyObject *__pyx_t_7[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":279 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "cuda/bindings/cufile.pyx":280 + * def __repr__(self): + * if self._data.size > 1: + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * else: + * return f"<{__name__}.IOEvents object at {hex(id(self))}>" +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_6[1] = __pyx_t_1; + __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_IOEvents_Array; + __pyx_t_6[3] = __pyx_t_4; + __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_object_at; + __pyx_t_6[5] = __pyx_t_2; + __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":279 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + } + + /* "cuda/bindings/cufile.pyx":282 + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" + * else: + * return f"<{__name__}.IOEvents object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_7[1] = __pyx_t_2; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_IOEvents_object_at; + __pyx_t_7[3] = __pyx_t_5; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "cuda/bindings/cufile.pyx":278 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":284 + * return f"<{__name__}.IOEvents object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":287 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":284 + * return f"<{__name__}.IOEvents object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":289 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":290 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_3)) { + + /* "cuda/bindings/cufile.pyx":291 + * def __int__(self): + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " # <<<<<<<<<<<<<< + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_int_argument_must_be_a_bytes_lik}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 291, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":290 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + } + + /* "cuda/bindings/cufile.pyx":293 + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":289 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":295 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6__len__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__len__", 0); + + /* "cuda/bindings/cufile.pyx":296 + * + * def __len__(self): + * return self._data.size # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":295 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":298 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, IOEvents): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_8__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":299 + * + * def __eq__(self, other): + * if not isinstance(other, IOEvents): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":300 + * def __eq__(self, other): + * if not isinstance(other, IOEvents): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":299 + * + * def __eq__(self, other): + * if not isinstance(other, IOEvents): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":301 + * if not isinstance(other, IOEvents): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":302 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":301 + * if not isinstance(other, IOEvents): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":303 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":304 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":303 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":305 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":298 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, IOEvents): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":307 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def cookie(self): + * """Union[~_numpy.intp, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":310 + * def cookie(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.cookie[0]) + * return self._data.cookie +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":311 + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: + * return int(self._data.cookie[0]) # <<<<<<<<<<<<<< + * return self._data.cookie + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":310 + * def cookie(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.cookie[0]) + * return self._data.cookie +*/ + } + + /* "cuda/bindings/cufile.pyx":312 + * if self._data.size == 1: + * return int(self._data.cookie[0]) + * return self._data.cookie # <<<<<<<<<<<<<< + * + * @cookie.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":307 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def cookie(self): + * """Union[~_numpy.intp, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.cookie.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":314 + * return self._data.cookie + * + * @cookie.setter # <<<<<<<<<<<<<< + * def cookie(self, val): + * self._data.cookie = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6cookie_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":316 + * @cookie.setter + * def cookie(self, val): + * self._data.cookie = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie, __pyx_v_val) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":314 + * return self._data.cookie + * + * @cookie.setter # <<<<<<<<<<<<<< + * def cookie(self, val): + * self._data.cookie = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.cookie.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":318 + * self._data.cookie = val + * + * @property # <<<<<<<<<<<<<< + * def status(self): + * """Union[~_numpy.int32, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":321 + * def status(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.status[0]) + * return self._data.status +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":322 + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: + * return int(self._data.status[0]) # <<<<<<<<<<<<<< + * return self._data.status + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":321 + * def status(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.status[0]) + * return self._data.status +*/ + } + + /* "cuda/bindings/cufile.pyx":323 + * if self._data.size == 1: + * return int(self._data.status[0]) + * return self._data.status # <<<<<<<<<<<<<< + * + * @status.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":318 + * self._data.cookie = val + * + * @property # <<<<<<<<<<<<<< + * def status(self): + * """Union[~_numpy.int32, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":325 + * return self._data.status + * + * @status.setter # <<<<<<<<<<<<<< + * def status(self, val): + * self._data.status = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_6status_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":327 + * @status.setter + * def status(self, val): + * self._data.status = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_status, __pyx_v_val) < (0)) __PYX_ERR(0, 327, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":325 + * return self._data.status + * + * @status.setter # <<<<<<<<<<<<<< + * def status(self, val): + * self._data.status = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.status.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":329 + * self._data.status = val + * + * @property # <<<<<<<<<<<<<< + * def ret(self): + * """Union[~_numpy.uint64, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":332 + * def ret(self): + * """Union[~_numpy.uint64, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.ret[0]) + * return self._data.ret +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":333 + * """Union[~_numpy.uint64, int]: """ + * if self._data.size == 1: + * return int(self._data.ret[0]) # <<<<<<<<<<<<<< + * return self._data.ret + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":332 + * def ret(self): + * """Union[~_numpy.uint64, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.ret[0]) + * return self._data.ret +*/ + } + + /* "cuda/bindings/cufile.pyx":334 + * if self._data.size == 1: + * return int(self._data.ret[0]) + * return self._data.ret # <<<<<<<<<<<<<< + * + * @ret.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":329 + * self._data.status = val + * + * @property # <<<<<<<<<<<<<< + * def ret(self): + * """Union[~_numpy.uint64, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.ret.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":336 + * return self._data.ret + * + * @ret.setter # <<<<<<<<<<<<<< + * def ret(self, val): + * self._data.ret = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_3ret_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":338 + * @ret.setter + * def ret(self, val): + * self._data.ret = val # <<<<<<<<<<<<<< + * + * def __getitem__(self, key): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ret, __pyx_v_val) < (0)) __PYX_ERR(0, 338, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":336 + * return self._data.ret + * + * @ret.setter # <<<<<<<<<<<<<< + * def ret(self, val): + * self._data.ret = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.ret.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":340 + * self._data.ret = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_10__getitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_key)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_key) { + PyObject *__pyx_v_size = NULL; + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + __Pyx_INCREF(__pyx_v_key); + + /* "cuda/bindings/cufile.pyx":341 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_key); + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":342 + * def __getitem__(self, key): + * if isinstance(key, int): + * size = self._data.size # <<<<<<<<<<<<<< + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_size = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":343 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_v_size, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 343, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":344 + * size = self._data.size + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") # <<<<<<<<<<<<<< + * if key < 0: + * key += size +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_IndexError); + __pyx_t_5 = __pyx_builtin_IndexError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_index_is_out_of_bounds}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 344, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":343 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + } + + /* "cuda/bindings/cufile.pyx":345 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return IOEvents.from_data(self._data[key:key+1]) +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":346 + * raise IndexError("index is out of bounds") + * if key < 0: + * key += size # <<<<<<<<<<<<<< + * return IOEvents.from_data(self._data[key:key+1]) + * out = self._data[key] +*/ + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_key, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":345 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return IOEvents.from_data(self._data[key:key+1]) +*/ + } + + /* "cuda/bindings/cufile.pyx":347 + * if key < 0: + * key += size + * return IOEvents.from_data(self._data[key:key+1]) # <<<<<<<<<<<<<< + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_key, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_self->_data, 0, 0, &__pyx_v_key, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":341 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + } + + /* "cuda/bindings/cufile.pyx":348 + * key += size + * return IOEvents.from_data(self._data[key:key+1]) + * out = self._data[key] # <<<<<<<<<<<<<< + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: + * return IOEvents.from_data(out) +*/ + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->_data, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_out = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":349 + * return IOEvents.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: # <<<<<<<<<<<<<< + * return IOEvents.from_data(out) + * return out +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_io_events_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":350 + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: + * return IOEvents.from_data(out) # <<<<<<<<<<<<<< + * return out + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_out}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":349 + * return IOEvents.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: # <<<<<<<<<<<<<< + * return IOEvents.from_data(out) + * return out +*/ + } + + /* "cuda/bindings/cufile.pyx":351 + * if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: + * return IOEvents.from_data(out) + * return out # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_out); + __pyx_r = __pyx_v_out; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":340 + * self._data.ret = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":353 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_12__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":354 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 354, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":353 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":356 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOEvents instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOEvents_14from_data, "IOEvents.from_data(data)\n\nCreate an IOEvents instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `io_events_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_15from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_14from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 356, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 356, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 356, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 356, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 356, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 356, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_14from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_14from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_obj = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":363 + * data (_numpy.ndarray): a 1D array of dtype `io_events_dtype` holding the data. + * """ + * cdef IOEvents obj = IOEvents.__new__(IOEvents) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_IOEvents(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":364 + * """ + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":365 + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 365, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":364 + * """ + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":366 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != io_events_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":367 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != io_events_dtype: + * raise ValueError("data array must be of dtype io_events_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 367, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":366 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != io_events_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":368 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != io_events_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype io_events_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_events_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":369 + * raise ValueError("data array must be 1D") + * if data.dtype != io_events_dtype: + * raise ValueError("data array must be of dtype io_events_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype_io_e}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 369, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":368 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != io_events_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype io_events_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":370 + * if data.dtype != io_events_dtype: + * raise ValueError("data array must be of dtype io_events_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":372 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":356 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOEvents instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":374 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOEvents instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOEvents_16from_ptr, "IOEvents.from_ptr(intptr_t ptr, size_t size=1, bool readonly=False)\n\nCreate an IOEvents instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n size (int): number of structs, default=1.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_17from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_16from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + size_t __pyx_v_size; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 374, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 374, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, i); __PYX_ERR(0, 374, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 374, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 374, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error) + if (values[1]) { + __pyx_v_size = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error) + } else { + __pyx_v_size = ((size_t)1); + } + if (values[2]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 375, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":375 + * + * @staticmethod + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an IOEvents instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 374, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_16from_ptr(__pyx_v_ptr, __pyx_v_size, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":374 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOEvents instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":383 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef IOEvents obj = IOEvents.__new__(IOEvents) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":384 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 384, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":383 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef IOEvents obj = IOEvents.__new__(IOEvents) +*/ + } + + /* "cuda/bindings/cufile.pyx":385 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef IOEvents obj = IOEvents.__new__(IOEvents) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_IOEvents(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":386 + * raise ValueError("ptr must not be null (0)") + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOEvents_t) * size, flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":388 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOEvents_t) * size, flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_events_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 388, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":387 + * cdef IOEvents obj = IOEvents.__new__(IOEvents) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof(CUfileIOEvents_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), ((sizeof(CUfileIOEvents_t)) * __pyx_v_size), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":389 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOEvents_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=io_events_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 389, __pyx_L1_error); + __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":390 + * ptr, sizeof(CUfileIOEvents_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_events_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_events_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_t_8}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":391 + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_events_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":393 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":374 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOEvents instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":270 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * def __init__(self, size=1): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__, "IOEvents.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._data,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_data != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._data is not None + * if use_setstate: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOEvents); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, None), state + * else: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IOEvents__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOEvents); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOEvents__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__, "IOEvents.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IOEvents__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOEvents__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOEvents__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.IOEvents.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":418 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=descr_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_size = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 418, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 418, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 418, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } + __pyx_v_size = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 418, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr___init__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), __pyx_v_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr___init__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_size) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":419 + * + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=descr_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileDescr_t), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_descr_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_size}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":420 + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=descr_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof(CUfileDescr_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":421 + * arr = _numpy.empty(size, dtype=descr_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileDescr_t), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(CUfileDescr_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":422 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileDescr_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(CUfileDescr_t)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_struct_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 421, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 421, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":418 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=descr_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":424 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6[7]; + PyObject *__pyx_t_7[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":425 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 425, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "cuda/bindings/cufile.pyx":426 + * def __repr__(self): + * if self._data.size > 1: + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * else: + * return f"<{__name__}.Descr object at {hex(id(self))}>" +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_6[1] = __pyx_t_1; + __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_Descr_Array; + __pyx_t_6[3] = __pyx_t_4; + __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_object_at; + __pyx_t_6[5] = __pyx_t_2; + __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":425 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + } + + /* "cuda/bindings/cufile.pyx":428 + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" + * else: + * return f"<{__name__}.Descr object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_7[1] = __pyx_t_2; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_Descr_object_at; + __pyx_t_7[3] = __pyx_t_5; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 17 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "cuda/bindings/cufile.pyx":424 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":430 + * return f"<{__name__}.Descr object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":433 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":430 + * return f"<{__name__}.Descr object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":435 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":436 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_3)) { + + /* "cuda/bindings/cufile.pyx":437 + * def __int__(self): + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " # <<<<<<<<<<<<<< + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_int_argument_must_be_a_bytes_lik}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 437, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":436 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + } + + /* "cuda/bindings/cufile.pyx":439 + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":435 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":441 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_6__len__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_5Descr_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__len__", 0); + + /* "cuda/bindings/cufile.pyx":442 + * + * def __len__(self): + * return self._data.size # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":441 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":444 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, Descr): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_8__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":445 + * + * def __eq__(self, other): + * if not isinstance(other, Descr): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":446 + * def __eq__(self, other): + * if not isinstance(other, Descr): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":445 + * + * def __eq__(self, other): + * if not isinstance(other, Descr): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":447 + * if not isinstance(other, Descr): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 447, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":448 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":447 + * if not isinstance(other, Descr): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":449 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 449, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":450 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":449 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":451 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":444 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, Descr): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":453 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def type(self): + * """Union[~_numpy.int32, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_4type___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_4type___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":456 + * def type(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.type[0]) + * return self._data.type +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":457 + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: + * return int(self._data.type[0]) # <<<<<<<<<<<<<< + * return self._data.type + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":456 + * def type(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.type[0]) + * return self._data.type +*/ + } + + /* "cuda/bindings/cufile.pyx":458 + * if self._data.size == 1: + * return int(self._data.type[0]) + * return self._data.type # <<<<<<<<<<<<<< + * + * @type.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":453 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def type(self): + * """Union[~_numpy.int32, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":460 + * return self._data.type + * + * @type.setter # <<<<<<<<<<<<<< + * def type(self, val): + * self._data.type = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_4type_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_4type_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":462 + * @type.setter + * def type(self, val): + * self._data.type = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_type, __pyx_v_val) < (0)) __PYX_ERR(0, 462, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":460 + * return self._data.type + * + * @type.setter # <<<<<<<<<<<<<< + * def type(self, val): + * self._data.type = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":464 + * self._data.type = val + * + * @property # <<<<<<<<<<<<<< + * def handle(self): + * """_py_anon_pod1_dtype: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":467 + * def handle(self): + * """_py_anon_pod1_dtype: """ + * return self._data.handle # <<<<<<<<<<<<<< + * + * @handle.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":464 + * self._data.type = val + * + * @property # <<<<<<<<<<<<<< + * def handle(self): + * """_py_anon_pod1_dtype: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":469 + * return self._data.handle + * + * @handle.setter # <<<<<<<<<<<<<< + * def handle(self, val): + * self._data.handle = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_6handle_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":471 + * @handle.setter + * def handle(self, val): + * self._data.handle = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_handle, __pyx_v_val) < (0)) __PYX_ERR(0, 471, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":469 + * return self._data.handle + * + * @handle.setter # <<<<<<<<<<<<<< + * def handle(self, val): + * self._data.handle = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.handle.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":473 + * self._data.handle = val + * + * @property # <<<<<<<<<<<<<< + * def fs_ops(self): + * """Union[~_numpy.intp, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":476 + * def fs_ops(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.fs_ops[0]) + * return self._data.fs_ops +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 476, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":477 + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: + * return int(self._data.fs_ops[0]) # <<<<<<<<<<<<<< + * return self._data.fs_ops + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fs_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":476 + * def fs_ops(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.fs_ops[0]) + * return self._data.fs_ops +*/ + } + + /* "cuda/bindings/cufile.pyx":478 + * if self._data.size == 1: + * return int(self._data.fs_ops[0]) + * return self._data.fs_ops # <<<<<<<<<<<<<< + * + * @fs_ops.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fs_ops); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":473 + * self._data.handle = val + * + * @property # <<<<<<<<<<<<<< + * def fs_ops(self): + * """Union[~_numpy.intp, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.fs_ops.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":480 + * return self._data.fs_ops + * + * @fs_ops.setter # <<<<<<<<<<<<<< + * def fs_ops(self, val): + * self._data.fs_ops = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_6fs_ops_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":482 + * @fs_ops.setter + * def fs_ops(self, val): + * self._data.fs_ops = val # <<<<<<<<<<<<<< + * + * def __getitem__(self, key): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fs_ops, __pyx_v_val) < (0)) __PYX_ERR(0, 482, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":480 + * return self._data.fs_ops + * + * @fs_ops.setter # <<<<<<<<<<<<<< + * def fs_ops(self, val): + * self._data.fs_ops = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.fs_ops.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":484 + * self._data.fs_ops = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_10__getitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_key)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_key) { + PyObject *__pyx_v_size = NULL; + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + __Pyx_INCREF(__pyx_v_key); + + /* "cuda/bindings/cufile.pyx":485 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_key); + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":486 + * def __getitem__(self, key): + * if isinstance(key, int): + * size = self._data.size # <<<<<<<<<<<<<< + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_size = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":487 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_v_size, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 487, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":488 + * size = self._data.size + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") # <<<<<<<<<<<<<< + * if key < 0: + * key += size +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_IndexError); + __pyx_t_5 = __pyx_builtin_IndexError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_index_is_out_of_bounds}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 488, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":487 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + } + + /* "cuda/bindings/cufile.pyx":489 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return Descr.from_data(self._data[key:key+1]) +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 489, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":490 + * raise IndexError("index is out of bounds") + * if key < 0: + * key += size # <<<<<<<<<<<<<< + * return Descr.from_data(self._data[key:key+1]) + * out = self._data[key] +*/ + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_key, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":489 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return Descr.from_data(self._data[key:key+1]) +*/ + } + + /* "cuda/bindings/cufile.pyx":491 + * if key < 0: + * key += size + * return Descr.from_data(self._data[key:key+1]) # <<<<<<<<<<<<<< + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_key, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_self->_data, 0, 0, &__pyx_v_key, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":485 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + } + + /* "cuda/bindings/cufile.pyx":492 + * key += size + * return Descr.from_data(self._data[key:key+1]) + * out = self._data[key] # <<<<<<<<<<<<<< + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: + * return Descr.from_data(out) +*/ + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->_data, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_out = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":493 + * return Descr.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: # <<<<<<<<<<<<<< + * return Descr.from_data(out) + * return out +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_descr_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":494 + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: + * return Descr.from_data(out) # <<<<<<<<<<<<<< + * return out + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_out}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":493 + * return Descr.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: # <<<<<<<<<<<<<< + * return Descr.from_data(out) + * return out +*/ + } + + /* "cuda/bindings/cufile.pyx":495 + * if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: + * return Descr.from_data(out) + * return out # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_out); + __pyx_r = __pyx_v_out; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":484 + * self._data.fs_ops = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":497 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_5Descr_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_12__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_5Descr_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":498 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 498, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":497 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":500 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an Descr instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_5Descr_14from_data, "Descr.from_data(data)\n\nCreate an Descr instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `descr_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_5Descr_15from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_14from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 500, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 500, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 500, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 500, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 500, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 500, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_14from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_14from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_obj = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":507 + * data (_numpy.ndarray): a 1D array of dtype `descr_dtype` holding the data. + * """ + * cdef Descr obj = Descr.__new__(Descr) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_Descr(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":508 + * """ + * cdef Descr obj = Descr.__new__(Descr) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":509 + * cdef Descr obj = Descr.__new__(Descr) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 509, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":508 + * """ + * cdef Descr obj = Descr.__new__(Descr) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":510 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != descr_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 510, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":511 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != descr_dtype: + * raise ValueError("data array must be of dtype descr_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 511, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":510 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != descr_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":512 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != descr_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype descr_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_descr_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":513 + * raise ValueError("data array must be 1D") + * if data.dtype != descr_dtype: + * raise ValueError("data array must be of dtype descr_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype_desc}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 513, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":512 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != descr_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype descr_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":514 + * if data.dtype != descr_dtype: + * raise ValueError("data array must be of dtype descr_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":516 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":500 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an Descr instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":518 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an Descr instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_5Descr_16from_ptr, "Descr.from_ptr(intptr_t ptr, size_t size=1, bool readonly=False)\n\nCreate an Descr instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n size (int): number of structs, default=1.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_5Descr_17from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_16from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + size_t __pyx_v_size; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 518, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 518, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 518, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 518, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 518, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, i); __PYX_ERR(0, 518, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 518, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 518, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 518, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L3_error) + if (values[1]) { + __pyx_v_size = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L3_error) + } else { + __pyx_v_size = ((size_t)1); + } + if (values[2]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":519 + * + * @staticmethod + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an Descr instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 518, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_16from_ptr(__pyx_v_ptr, __pyx_v_size, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":518 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an Descr instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":527 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef Descr obj = Descr.__new__(Descr) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":528 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef Descr obj = Descr.__new__(Descr) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 528, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":527 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef Descr obj = Descr.__new__(Descr) +*/ + } + + /* "cuda/bindings/cufile.pyx":529 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef Descr obj = Descr.__new__(Descr) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_Descr(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":530 + * raise ValueError("ptr must not be null (0)") + * cdef Descr obj = Descr.__new__(Descr) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileDescr_t) * size, flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":532 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileDescr_t) * size, flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=descr_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":531 + * cdef Descr obj = Descr.__new__(Descr) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof(CUfileDescr_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), ((sizeof(CUfileDescr_t)) * __pyx_v_size), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":533 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileDescr_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=descr_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 533, __pyx_L1_error); + __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":534 + * ptr, sizeof(CUfileDescr_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=descr_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_descr_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_t_8}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 533, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":535 + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=descr_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":537 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":518 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an Descr instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":416 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * def __init__(self, size=1): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__, "Descr.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._data,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_data != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._data is not None + * if use_setstate: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Descr); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, None), state + * else: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Descr__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Descr); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Descr__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__, "Descr.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Descr__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_Descr__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Descr__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.Descr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":559 + * readonly object _batch + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2___init__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2___init__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":560 + * + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_1}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":561 + * def __init__(self): + * arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof((NULL).u), \ + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":562 + * arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(((CUfileIOParams_t *)NULL)->u))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":563 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof((NULL).u), \ + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(((CUfileIOParams_t *)NULL)->u)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_union_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 23 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 562, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 562, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":559 + * readonly object _batch + * + * def __init__(self): # <<<<<<<<<<<<<< + * arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":565 + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":566 + * + * def __repr__(self): + * return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_4[1] = __pyx_t_2; + __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u_py_anon_pod2_object_at; + __pyx_t_4[3] = __pyx_t_1; + __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 25 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":565 + * f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":568 + * return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":571 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":568 + * return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":573 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":574 + * + * def __int__(self): + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":573 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * return self._data.ctypes.data + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":576 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod2): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6__eq__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":577 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod2): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":578 + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod2): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":577 + * + * def __eq__(self, other): + * if not isinstance(other, _py_anon_pod2): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":579 + * if not isinstance(other, _py_anon_pod2): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 579, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":580 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":579 + * if not isinstance(other, _py_anon_pod2): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":581 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 581, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":582 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":581 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":583 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 583, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":576 + * return self._data.ctypes.data + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, _py_anon_pod2): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":585 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def batch(self): + * """_py_anon_pod3: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":588 + * def batch(self): + * """_py_anon_pod3: """ + * return self._batch # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_batch); + __pyx_r = __pyx_v_self->_batch; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":585 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def batch(self): + * """_py_anon_pod3: """ +*/ + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":590 + * return self._batch + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_8__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_8__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":591 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 591, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":590 + * return self._batch + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":593 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod2 instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data, "_py_anon_pod2.from_data(data)\n\nCreate an _py_anon_pod2 instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod2_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 593, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 593, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 593, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 593, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 593, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 593, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_obj = 0; + PyObject *__pyx_v_batch_addr = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":600 + * data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod2_dtype` holding the data. + * """ + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":601 + * """ + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":602 + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 602, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":601 + * """ + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":603 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod2_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":604 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != _py_anon_pod2_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod2_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 604, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":603 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod2_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":605 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod2_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod2_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 605, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":606 + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod2_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod2_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype__py_3}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 606, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":605 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != _py_anon_pod2_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype _py_anon_pod2_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":607 + * if data.dtype != _py_anon_pod2_dtype: + * raise ValueError("data array must be of dtype _py_anon_pod2_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":609 + * obj._data = data.view(_numpy.recarray) + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] # <<<<<<<<<<<<<< + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) + * return obj +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj->_data, __pyx_mstate_global->__pyx_n_u_batch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_array_interface); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_batch_addr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":610 + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) # <<<<<<<<<<<<<< + * return obj + * +*/ + __pyx_t_7 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_batch_addr}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_batch); + __Pyx_DECREF(__pyx_v_obj->_batch); + __pyx_v_obj->_batch = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":611 + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":593 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod2 instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_batch_addr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":613 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod2 instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr, "_py_anon_pod2.from_ptr(intptr_t ptr, bool readonly=False)\n\nCreate an _py_anon_pod2 instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 613, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 613, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, i); __PYX_ERR(0, 613, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 613, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 613, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error) + if (values[1]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":614 + * + * @staticmethod + * def from_ptr(intptr_t ptr, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an _py_anon_pod2 instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 613, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr(__pyx_v_ptr, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":613 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod2 instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr(intptr_t __pyx_v_ptr, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_v_batch_addr = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":621 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":622 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 622, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":621 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) +*/ + } + + /* "cuda/bindings/cufile.pyx":623 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":624 + * raise ValueError("ptr must not be null (0)") + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u), flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":626 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u), flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod2_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 626, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":625 + * cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof((NULL).u), flag) + * data = _numpy.ndarray((1,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), (sizeof(((CUfileIOParams_t *)NULL)->u)), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":627 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).u), flag) + * data = _numpy.ndarray((1,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=_py_anon_pod2_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":628 + * ptr, sizeof((NULL).u), flag) + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod2_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_tuple[0]}; + __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 627, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_8, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":629 + * data = _numpy.ndarray((1,), buffer=buf, + * dtype=_py_anon_pod2_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":631 + * obj._data = data.view(_numpy.recarray) + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] # <<<<<<<<<<<<<< + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) + * return obj +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj->_data, __pyx_mstate_global->__pyx_n_u_batch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_array_interface); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_batch_addr = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":632 + * + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) # <<<<<<<<<<<<<< + * return obj + * +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_batch_addr}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_batch); + __Pyx_DECREF(__pyx_v_obj->_batch); + __pyx_v_obj->_batch = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":633 + * batch_addr = obj._data.batch[0].__array_interface__['data'][0] + * obj._batch = _py_anon_pod3.from_ptr(batch_addr) + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":613 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod2 instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XDECREF(__pyx_v_batch_addr); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":555 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * readonly object _batch +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":557 + * readonly object _data + * + * readonly object _batch # <<<<<<<<<<<<<< + * + * def __init__(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch___get__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch___get__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_batch); + __pyx_r = __pyx_v_self->_batch; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__, "_py_anon_pod2.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._batch, self._data) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_batch); + __Pyx_GIVEREF(__pyx_v_self->_batch); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_batch) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._batch, self._data) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._batch, self._data) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._batch is not None or self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._batch, self._data) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._batch is not None or self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, None), state +*/ + /*else*/ { + __pyx_t_4 = (__pyx_v_self->_batch != Py_None); + if (!__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->_data != Py_None); + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._batch is not None or self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._batch is not None or self._data is not None + * if use_setstate: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_203986659); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_203986659); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_203986659) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._batch is not None or self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, None), state + * else: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod2__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_203986659); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_203986659); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_203986659) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod2__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__, "_py_anon_pod2.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle__py_anon_pod2__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod2__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod2__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile._py_anon_pod2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":660 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=io_params_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_size = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 660, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 660, __pyx_L3_error) + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } else { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 660, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_int_1)); + } + __pyx_v_size = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 660, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams___init__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), __pyx_v_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams___init__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_size) { + PyObject *__pyx_v_arr = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + PyObject *__pyx_t_8[4]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":661 + * + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=io_params_dtype) # <<<<<<<<<<<<<< + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOParams_t), \ +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_params_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_size}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 661, __pyx_L1_error) + __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_arr = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":662 + * def __init__(self, size=1): + * arr = _numpy.empty(size, dtype=io_params_dtype) + * self._data = arr.view(_numpy.recarray) # <<<<<<<<<<<<<< + * assert self._data.itemsize == sizeof(CUfileIOParams_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" +*/ + __pyx_t_4 = __pyx_v_arr; + __Pyx_INCREF(__pyx_t_4); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_data); + __Pyx_DECREF(__pyx_v_self->_data); + __pyx_v_self->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":663 + * arr = _numpy.empty(size, dtype=io_params_dtype) + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOParams_t), \ # <<<<<<<<<<<<<< + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" + * +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(CUfileIOParams_t))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) { + + /* "cuda/bindings/cufile.pyx":664 + * self._data = arr.view(_numpy.recarray) + * assert self._data.itemsize == sizeof(CUfileIOParams_t), \ + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" # <<<<<<<<<<<<<< + * + * def __repr__(self): +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyUnicode_From_size_t((sizeof(CUfileIOParams_t)), 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_itemsize_2; + __pyx_t_8[1] = __pyx_t_3; + __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_mismatches_struct_size; + __pyx_t_8[3] = __pyx_t_4; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 4, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 663, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(0, 663, __pyx_L1_error) + #endif + + /* "cuda/bindings/cufile.pyx":660 + * readonly object _data + * + * def __init__(self, size=1): # <<<<<<<<<<<<<< + * arr = _numpy.empty(size, dtype=io_params_dtype) + * self._data = arr.view(_numpy.recarray) +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_arr); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":666 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_3__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_3__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_2__repr__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_2__repr__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6[7]; + PyObject *__pyx_t_7[5]; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/cufile.pyx":667 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "cuda/bindings/cufile.pyx":668 + * def __repr__(self): + * if self._data.size > 1: + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * else: + * return f"<{__name__}.IOParams object at {hex(id(self))}>" +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_6[1] = __pyx_t_1; + __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u_IOParams_Array; + __pyx_t_6[3] = __pyx_t_4; + __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_object_at; + __pyx_t_6[5] = __pyx_t_2; + __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 16 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":667 + * + * def __repr__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" + * else: +*/ + } + + /* "cuda/bindings/cufile.pyx":670 + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" + * else: + * return f"<{__name__}.IOParams object at {hex(id(self))}>" # <<<<<<<<<<<<<< + * + * @property +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_7[1] = __pyx_t_2; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_IOParams_object_at; + __pyx_t_7[3] = __pyx_t_5; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "cuda/bindings/cufile.pyx":666 + * f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" + * + * def __repr__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":672 + * return f"<{__name__}.IOParams object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_3ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_3ptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_3ptr___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_3ptr___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":675 + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __int__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":672 + * return f"<{__name__}.IOParams object at {hex(id(self))}>" + * + * @property # <<<<<<<<<<<<<< + * def ptr(self): + * """Get the pointer address to the data as Python :class:`int`.""" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":677 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_5__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_5__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_4__int__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_4__int__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/cufile.pyx":678 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 678, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_3)) { + + /* "cuda/bindings/cufile.pyx":679 + * def __int__(self): + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " # <<<<<<<<<<<<<< + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_int_argument_must_be_a_bytes_lik}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 679, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":678 + * + * def __int__(self): + * if self._data.size > 1: # <<<<<<<<<<<<<< + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") +*/ + } + + /* "cuda/bindings/cufile.pyx":681 + * raise TypeError("int() argument must be a bytes-like object of size 1. " + * "To get the pointer address of an array, use .ptr") + * return self._data.ctypes.data # <<<<<<<<<<<<<< + * + * def __len__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":677 + * return self._data.ctypes.data + * + * def __int__(self): # <<<<<<<<<<<<<< + * if self._data.size > 1: + * raise TypeError("int() argument must be a bytes-like object of size 1. " +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":683 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + +/* Python wrapper */ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__(PyObject *__pyx_v_self); /*proto*/ +static Py_ssize_t __pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6__len__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_ssize_t __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6__len__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__len__", 0); + + /* "cuda/bindings/cufile.pyx":684 + * + * def __len__(self): + * return self._data.size # <<<<<<<<<<<<<< + * + * def __eq__(self, other): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":683 + * return self._data.ctypes.data + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self._data.size + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":686 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, IOParams): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_8__eq__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_8__eq__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/cufile.pyx":687 + * + * def __eq__(self, other): + * if not isinstance(other, IOParams): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":688 + * def __eq__(self, other): + * if not isinstance(other, IOParams): + * return False # <<<<<<<<<<<<<< + * if self._data.size != other._data.size: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":687 + * + * def __eq__(self, other): + * if not isinstance(other, IOParams): # <<<<<<<<<<<<<< + * return False + * if self._data.size != other._data.size: +*/ + } + + /* "cuda/bindings/cufile.pyx":689 + * if not isinstance(other, IOParams): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":690 + * return False + * if self._data.size != other._data.size: + * return False # <<<<<<<<<<<<<< + * if self._data.dtype != other._data.dtype: + * return False +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":689 + * if not isinstance(other, IOParams): + * return False + * if self._data.size != other._data.size: # <<<<<<<<<<<<<< + * return False + * if self._data.dtype != other._data.dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":691 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 691, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":692 + * return False + * if self._data.dtype != other._data.dtype: + * return False # <<<<<<<<<<<<<< + * return bool((self._data == other._data).all()) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":691 + * if self._data.size != other._data.size: + * return False + * if self._data.dtype != other._data.dtype: # <<<<<<<<<<<<<< + * return False + * return bool((self._data == other._data).all()) +*/ + } + + /* "cuda/bindings/cufile.pyx":693 + * if self._data.dtype != other._data.dtype: + * return False + * return bool((self._data == other._data).all()) # <<<<<<<<<<<<<< + * + * @property +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_data_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyObject_RichCompare(__pyx_v_self->_data, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_all, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":686 + * return self._data.size + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, IOParams): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":695 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def mode(self): + * """Union[~_numpy.int32, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":698 + * def mode(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.mode[0]) + * return self._data.mode +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":699 + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: + * return int(self._data.mode[0]) # <<<<<<<<<<<<<< + * return self._data.mode + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":698 + * def mode(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.mode[0]) + * return self._data.mode +*/ + } + + /* "cuda/bindings/cufile.pyx":700 + * if self._data.size == 1: + * return int(self._data.mode[0]) + * return self._data.mode # <<<<<<<<<<<<<< + * + * @mode.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":695 + * return bool((self._data == other._data).all()) + * + * @property # <<<<<<<<<<<<<< + * def mode(self): + * """Union[~_numpy.int32, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":702 + * return self._data.mode + * + * @mode.setter # <<<<<<<<<<<<<< + * def mode(self, val): + * self._data.mode = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_4mode_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":704 + * @mode.setter + * def mode(self, val): + * self._data.mode = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_mode, __pyx_v_val) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":702 + * return self._data.mode + * + * @mode.setter # <<<<<<<<<<<<<< + * def mode(self, val): + * self._data.mode = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":706 + * self._data.mode = val + * + * @property # <<<<<<<<<<<<<< + * def u(self): + * """_py_anon_pod2_dtype: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":709 + * def u(self): + * """_py_anon_pod2_dtype: """ + * return self._data.u # <<<<<<<<<<<<<< + * + * @u.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_u); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":706 + * self._data.mode = val + * + * @property # <<<<<<<<<<<<<< + * def u(self): + * """_py_anon_pod2_dtype: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.u.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":711 + * return self._data.u + * + * @u.setter # <<<<<<<<<<<<<< + * def u(self, val): + * self._data.u = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_1u_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":713 + * @u.setter + * def u(self, val): + * self._data.u = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_u, __pyx_v_val) < (0)) __PYX_ERR(0, 713, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":711 + * return self._data.u + * + * @u.setter # <<<<<<<<<<<<<< + * def u(self, val): + * self._data.u = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.u.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":715 + * self._data.u = val + * + * @property # <<<<<<<<<<<<<< + * def fh(self): + * """Union[~_numpy.intp, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":718 + * def fh(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.fh[0]) + * return self._data.fh +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":719 + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: + * return int(self._data.fh[0]) # <<<<<<<<<<<<<< + * return self._data.fh + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":718 + * def fh(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.fh[0]) + * return self._data.fh +*/ + } + + /* "cuda/bindings/cufile.pyx":720 + * if self._data.size == 1: + * return int(self._data.fh[0]) + * return self._data.fh # <<<<<<<<<<<<<< + * + * @fh.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":715 + * self._data.u = val + * + * @property # <<<<<<<<<<<<<< + * def fh(self): + * """Union[~_numpy.intp, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.fh.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":722 + * return self._data.fh + * + * @fh.setter # <<<<<<<<<<<<<< + * def fh(self, val): + * self._data.fh = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_2fh_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":724 + * @fh.setter + * def fh(self, val): + * self._data.fh = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_fh, __pyx_v_val) < (0)) __PYX_ERR(0, 724, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":722 + * return self._data.fh + * + * @fh.setter # <<<<<<<<<<<<<< + * def fh(self, val): + * self._data.fh = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.fh.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":726 + * self._data.fh = val + * + * @property # <<<<<<<<<<<<<< + * def opcode(self): + * """Union[~_numpy.int32, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":729 + * def opcode(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.opcode[0]) + * return self._data.opcode +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 729, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":730 + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: + * return int(self._data.opcode[0]) # <<<<<<<<<<<<<< + * return self._data.opcode + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_opcode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":729 + * def opcode(self): + * """Union[~_numpy.int32, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.opcode[0]) + * return self._data.opcode +*/ + } + + /* "cuda/bindings/cufile.pyx":731 + * if self._data.size == 1: + * return int(self._data.opcode[0]) + * return self._data.opcode # <<<<<<<<<<<<<< + * + * @opcode.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_opcode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":726 + * self._data.fh = val + * + * @property # <<<<<<<<<<<<<< + * def opcode(self): + * """Union[~_numpy.int32, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.opcode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":733 + * return self._data.opcode + * + * @opcode.setter # <<<<<<<<<<<<<< + * def opcode(self, val): + * self._data.opcode = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6opcode_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":735 + * @opcode.setter + * def opcode(self, val): + * self._data.opcode = val # <<<<<<<<<<<<<< + * + * @property +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_opcode, __pyx_v_val) < (0)) __PYX_ERR(0, 735, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":733 + * return self._data.opcode + * + * @opcode.setter # <<<<<<<<<<<<<< + * def opcode(self, val): + * self._data.opcode = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.opcode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":737 + * self._data.opcode = val + * + * @property # <<<<<<<<<<<<<< + * def cookie(self): + * """Union[~_numpy.intp, int]: """ +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/cufile.pyx":740 + * def cookie(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.cookie[0]) + * return self._data.cookie +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/cufile.pyx":741 + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: + * return int(self._data.cookie[0]) # <<<<<<<<<<<<<< + * return self._data.cookie + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":740 + * def cookie(self): + * """Union[~_numpy.intp, int]: """ + * if self._data.size == 1: # <<<<<<<<<<<<<< + * return int(self._data.cookie[0]) + * return self._data.cookie +*/ + } + + /* "cuda/bindings/cufile.pyx":742 + * if self._data.size == 1: + * return int(self._data.cookie[0]) + * return self._data.cookie # <<<<<<<<<<<<<< + * + * @cookie.setter +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":737 + * self._data.opcode = val + * + * @property # <<<<<<<<<<<<<< + * def cookie(self): + * """Union[~_numpy.intp, int]: """ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.cookie.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":744 + * return self._data.cookie + * + * @cookie.setter # <<<<<<<<<<<<<< + * def cookie(self, val): + * self._data.cookie = val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie_2__set__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_6cookie_2__set__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":746 + * @cookie.setter + * def cookie(self, val): + * self._data.cookie = val # <<<<<<<<<<<<<< + * + * def __getitem__(self, key): +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_cookie, __pyx_v_val) < (0)) __PYX_ERR(0, 746, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":744 + * return self._data.cookie + * + * @cookie.setter # <<<<<<<<<<<<<< + * def cookie(self, val): + * self._data.cookie = val +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.cookie.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":748 + * self._data.cookie = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_10__getitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_key)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_10__getitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_key) { + PyObject *__pyx_v_size = NULL; + PyObject *__pyx_v_out = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__getitem__", 0); + __Pyx_INCREF(__pyx_v_key); + + /* "cuda/bindings/cufile.pyx":749 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_key); + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":750 + * def __getitem__(self, key): + * if isinstance(key, int): + * size = self._data.size # <<<<<<<<<<<<<< + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_data, __pyx_mstate_global->__pyx_n_u_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_size = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":751 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_v_size, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_v_size, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 751, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L5_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":752 + * size = self._data.size + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") # <<<<<<<<<<<<<< + * if key < 0: + * key += size +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_IndexError); + __pyx_t_5 = __pyx_builtin_IndexError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_index_is_out_of_bounds}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 752, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":751 + * if isinstance(key, int): + * size = self._data.size + * if key >= size or key <= -(size+1): # <<<<<<<<<<<<<< + * raise IndexError("index is out of bounds") + * if key < 0: +*/ + } + + /* "cuda/bindings/cufile.pyx":753 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return IOParams.from_data(self._data[key:key+1]) +*/ + __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 753, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":754 + * raise IndexError("index is out of bounds") + * if key < 0: + * key += size # <<<<<<<<<<<<<< + * return IOParams.from_data(self._data[key:key+1]) + * out = self._data[key] +*/ + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_key, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":753 + * if key >= size or key <= -(size+1): + * raise IndexError("index is out of bounds") + * if key < 0: # <<<<<<<<<<<<<< + * key += size + * return IOParams.from_data(self._data[key:key+1]) +*/ + } + + /* "cuda/bindings/cufile.pyx":755 + * if key < 0: + * key += size + * return IOParams.from_data(self._data[key:key+1]) # <<<<<<<<<<<<<< + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_key, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_self->_data, 0, 0, &__pyx_v_key, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":749 + * + * def __getitem__(self, key): + * if isinstance(key, int): # <<<<<<<<<<<<<< + * size = self._data.size + * if key >= size or key <= -(size+1): +*/ + } + + /* "cuda/bindings/cufile.pyx":756 + * key += size + * return IOParams.from_data(self._data[key:key+1]) + * out = self._data[key] # <<<<<<<<<<<<<< + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: + * return IOParams.from_data(out) +*/ + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->_data, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_out = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":757 + * return IOParams.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: # <<<<<<<<<<<<<< + * return IOParams.from_data(out) + * return out +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = PyObject_IsInstance(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L9_bool_binop_done; + } + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_out, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_io_params_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_7, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 757, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L9_bool_binop_done:; + if (__pyx_t_1) { + + /* "cuda/bindings/cufile.pyx":758 + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: + * return IOParams.from_data(out) # <<<<<<<<<<<<<< + * return out + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_out}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_from_data, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":757 + * return IOParams.from_data(self._data[key:key+1]) + * out = self._data[key] + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: # <<<<<<<<<<<<<< + * return IOParams.from_data(out) + * return out +*/ + } + + /* "cuda/bindings/cufile.pyx":759 + * if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: + * return IOParams.from_data(out) + * return out # <<<<<<<<<<<<<< + * + * def __setitem__(self, key, val): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_out); + __pyx_r = __pyx_v_out; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":748 + * self._data.cookie = val + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if isinstance(key, int): + * size = self._data.size +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_size); + __Pyx_XDECREF(__pyx_v_out); + __Pyx_XDECREF(__pyx_v_key); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":761 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val); /*proto*/ +static int __pyx_pw_4cuda_8bindings_6cufile_8IOParams_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_12__setitem__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_val)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_6cufile_8IOParams_12__setitem__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val) { + int __pyx_r; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":762 + * + * def __setitem__(self, key, val): + * self._data[key] = val # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + if (unlikely((PyObject_SetItem(__pyx_v_self->_data, __pyx_v_key, __pyx_v_val) < 0))) __PYX_ERR(0, 762, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":761 + * return out + * + * def __setitem__(self, key, val): # <<<<<<<<<<<<<< + * self._data[key] = val + * +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":764 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOParams instance wrapping the given NumPy array. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOParams_14from_data, "IOParams.from_data(data)\n\nCreate an IOParams instance wrapping the given NumPy array.\n\nArgs:\n data (_numpy.ndarray): a 1D array of dtype `io_params_dtype` holding the data."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOParams_15from_data = {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_14from_data}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_15from_data(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_data = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 764, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 764, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_data", 0) < (0)) __PYX_ERR(0, 764, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, i); __PYX_ERR(0, 764, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 764, __pyx_L3_error) + } + __pyx_v_data = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 764, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_14from_data(__pyx_v_data); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_14from_data(PyObject *__pyx_v_data) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_obj = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + size_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_data", 0); + + /* "cuda/bindings/cufile.pyx":771 + * data (_numpy.ndarray): a 1D array of dtype `io_params_dtype` holding the data. + * """ + * cdef IOParams obj = IOParams.__new__(IOParams) # <<<<<<<<<<<<<< + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") +*/ + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_IOParams(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":772 + * """ + * cdef IOParams obj = IOParams.__new__(IOParams) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_2); + if (!__pyx_t_5) { + } else { + __pyx_t_4 = __pyx_t_5; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_5 = PyObject_IsInstance(__pyx_v_data, __pyx_t_3); + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = (!__pyx_t_4); + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":773 + * cdef IOParams obj = IOParams.__new__(IOParams) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") # <<<<<<<<<<<<<< + * if data.ndim != 1: + * raise ValueError("data array must be 1D") +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_argument_must_be_a_NumPy_nd}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 773, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":772 + * """ + * cdef IOParams obj = IOParams.__new__(IOParams) + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): # <<<<<<<<<<<<<< + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: +*/ + } + + /* "cuda/bindings/cufile.pyx":774 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != io_params_dtype: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":775 + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: + * raise ValueError("data array must be 1D") # <<<<<<<<<<<<<< + * if data.dtype != io_params_dtype: + * raise ValueError("data array must be of dtype io_params_dtype") +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_3 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_1D}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 775, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":774 + * if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + * raise TypeError("data argument must be a NumPy ndarray") + * if data.ndim != 1: # <<<<<<<<<<<<<< + * raise ValueError("data array must be 1D") + * if data.dtype != io_params_dtype: +*/ + } + + /* "cuda/bindings/cufile.pyx":776 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != io_params_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype io_params_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_params_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 776, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(__pyx_t_5)) { + + /* "cuda/bindings/cufile.pyx":777 + * raise ValueError("data array must be 1D") + * if data.dtype != io_params_dtype: + * raise ValueError("data array must be of dtype io_params_dtype") # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_2 = __pyx_builtin_ValueError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_data_array_must_be_of_dtype_io_p}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 777, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":776 + * if data.ndim != 1: + * raise ValueError("data array must be 1D") + * if data.dtype != io_params_dtype: # <<<<<<<<<<<<<< + * raise ValueError("data array must be of dtype io_params_dtype") + * obj._data = data.view(_numpy.recarray) +*/ + } + + /* "cuda/bindings/cufile.pyx":778 + * if data.dtype != io_params_dtype: + * raise ValueError("data array must be of dtype io_params_dtype") + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_2 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":780 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * @staticmethod +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":764 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOParams instance wrapping the given NumPy array. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.from_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":782 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOParams instance wrapping the given pointer. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOParams_16from_ptr, "IOParams.from_ptr(intptr_t ptr, size_t size=1, bool readonly=False)\n\nCreate an IOParams instance wrapping the given pointer.\n\nArgs:\n ptr (intptr_t): pointer address as Python :class:`int` to the data.\n size (int): number of structs, default=1.\n readonly (bool): whether the data is read-only (to the user). default is `False`."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOParams_17from_ptr = {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_16from_ptr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_17from_ptr(CYTHON_UNUSED PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_ptr; + size_t __pyx_v_size; + int __pyx_v_readonly; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("from_ptr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_readonly,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 782, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 782, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 782, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 782, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_ptr", 0) < (0)) __PYX_ERR(0, 782, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, i); __PYX_ERR(0, 782, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 782, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 782, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 782, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_ptr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_ptr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L3_error) + if (values[1]) { + __pyx_v_size = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L3_error) + } else { + __pyx_v_size = ((size_t)1); + } + if (values[2]) { + __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L3_error) + } else { + + /* "cuda/bindings/cufile.pyx":783 + * + * @staticmethod + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): # <<<<<<<<<<<<<< + * """Create an IOParams instance wrapping the given pointer. + * +*/ + __pyx_v_readonly = ((int)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("from_ptr", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 782, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_16from_ptr(__pyx_v_ptr, __pyx_v_size, __pyx_v_readonly); + + /* "cuda/bindings/cufile.pyx":782 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOParams instance wrapping the given pointer. +*/ + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_16from_ptr(intptr_t __pyx_v_ptr, size_t __pyx_v_size, int __pyx_v_readonly) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_obj = 0; + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_buf = 0; + PyObject *__pyx_v_data = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + + /* "cuda/bindings/cufile.pyx":791 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef IOParams obj = IOParams.__new__(IOParams) +*/ + __pyx_t_1 = (__pyx_v_ptr == 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":792 + * """ + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") # <<<<<<<<<<<<<< + * cdef IOParams obj = IOParams.__new__(IOParams) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_ValueError); + __pyx_t_4 = __pyx_builtin_ValueError; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ptr_must_not_be_null_0}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 792, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":791 + * readonly (bool): whether the data is read-only (to the user). default is `False`. + * """ + * if ptr == 0: # <<<<<<<<<<<<<< + * raise ValueError("ptr must not be null (0)") + * cdef IOParams obj = IOParams.__new__(IOParams) +*/ + } + + /* "cuda/bindings/cufile.pyx":793 + * if ptr == 0: + * raise ValueError("ptr must not be null (0)") + * cdef IOParams obj = IOParams.__new__(IOParams) # <<<<<<<<<<<<<< + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( +*/ + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4cuda_8bindings_6cufile_IOParams(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + __pyx_v_obj = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":794 + * raise ValueError("ptr must not be null (0)") + * cdef IOParams obj = IOParams.__new__(IOParams) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE # <<<<<<<<<<<<<< + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOParams_t) * size, flag) +*/ + if (__pyx_v_readonly) { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_READ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __pyx_t_4 = __Pyx_PyLong_From___pyx_anon_enum(PyBUF_WRITE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __pyx_v_flag = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":796 + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOParams_t) * size, flag) # <<<<<<<<<<<<<< + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_params_dtype) +*/ + __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_v_flag); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":795 + * cdef IOParams obj = IOParams.__new__(IOParams) + * cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + * cdef object buf = PyMemoryView_FromMemory( # <<<<<<<<<<<<<< + * ptr, sizeof(CUfileIOParams_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, +*/ + __pyx_t_2 = PyMemoryView_FromMemory(((char *)__pyx_v_ptr), ((sizeof(CUfileIOParams_t)) * __pyx_v_size), __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_buf = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":797 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof(CUfileIOParams_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=io_params_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ndarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 797, __pyx_L1_error); + __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":798 + * ptr, sizeof(CUfileIOParams_t) * size, flag) + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_params_dtype) # <<<<<<<<<<<<<< + * obj._data = data.view(_numpy.recarray) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_io_params_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_t_8}; + __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_buffer, __pyx_v_buf, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_t_3, __pyx_t_9, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":799 + * data = _numpy.ndarray((size,), buffer=buf, + * dtype=io_params_dtype) + * obj._data = data.view(_numpy.recarray) # <<<<<<<<<<<<<< + * + * return obj +*/ + __pyx_t_7 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_7); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_recarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_5 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_view, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_obj->_data); + __Pyx_DECREF(__pyx_v_obj->_data); + __pyx_v_obj->_data = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":801 + * obj._data = data.view(_numpy.recarray) + * + * return obj # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_obj); + __pyx_r = ((PyObject *)__pyx_v_obj); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":782 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOParams instance wrapping the given pointer. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_obj); + __Pyx_XDECREF(__pyx_v_flag); + __Pyx_XDECREF(__pyx_v_buf); + __Pyx_XDECREF(__pyx_v_data); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":658 + * """ + * cdef: + * readonly object _data # <<<<<<<<<<<<<< + * + * def __init__(self, size=1): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_5_data_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_5_data_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_5_data___get__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_5_data___get__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_data); + __pyx_r = __pyx_v_self->_data; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__, "IOParams.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._data,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->_data); + __Pyx_GIVEREF(__pyx_v_self->_data); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->_data) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) +*/ + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + __pyx_t_2 = (__pyx_v__dict != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: +*/ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self._data is not None +*/ + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self._data,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True +*/ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self._data is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, None), state +*/ + /*else*/ { + __pyx_t_2 = (__pyx_v_self->_data != Py_None); + __pyx_v_use_setstate = __pyx_t_2; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, None), state + * else: +*/ + if (__pyx_v_use_setstate) { + + /* "(tree fragment)":13 + * use_setstate = self._data is not None + * if use_setstate: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOParams); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self._data is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, None), state + * else: +*/ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, None), state + * else: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IOParams__set_state(self, __pyx_state) +*/ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOParams); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_175497610); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_175497610); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_175497610) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOParams__set_state(self, __pyx_state) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__, "IOParams.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 16, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 16, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 16, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 16, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 16, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":17 + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_IOParams__set_state(self, __pyx_state) # <<<<<<<<<<<<<< +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOParams__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOParams__set_state(self, __pyx_state) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.IOParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":964 + * class cuFileError(Exception): + * + * def __init__(self, status, cu_err=None): # <<<<<<<<<<<<<< + * self.status = status + * self.cuda_error = cu_err +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_11cuFileError___init__, "cuFileError.__init__(self, status, cu_err=None)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_11cuFileError_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_11cuFileError___init__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_status = 0; + PyObject *__pyx_v_cu_err = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_status,&__pyx_mstate_global->__pyx_n_u_cu_err,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 964, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 964, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 964, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 964, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 964, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 964, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 964, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 964, __pyx_L3_error) + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 964, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); + } + __pyx_v_self = values[0]; + __pyx_v_status = values[1]; + __pyx_v_cu_err = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 964, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.cuFileError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_11cuFileError___init__(__pyx_self, __pyx_v_self, __pyx_v_status, __pyx_v_cu_err); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_11cuFileError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status, PyObject *__pyx_v_cu_err) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_v_err = 0; + PyObject *__pyx_v_e = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7[5]; + int __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/cufile.pyx":965 + * + * def __init__(self, status, cu_err=None): + * self.status = status # <<<<<<<<<<<<<< + * self.cuda_error = cu_err + * s = OpError(status) +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status, __pyx_v_status) < (0)) __PYX_ERR(0, 965, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":966 + * def __init__(self, status, cu_err=None): + * self.status = status + * self.cuda_error = cu_err # <<<<<<<<<<<<<< + * s = OpError(status) + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cuda_error, __pyx_v_cu_err) < (0)) __PYX_ERR(0, 966, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":967 + * self.status = status + * self.cuda_error = cu_err + * s = OpError(status) # <<<<<<<<<<<<<< + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" + * if cu_err is not None: +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OpError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_status}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_s = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":968 + * self.cuda_error = cu_err + * s = OpError(status) + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" # <<<<<<<<<<<<<< + * if cu_err is not None: + * e = pyCUresult(cu_err) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyLong_As_int(__pyx_v_status); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_op_status_error(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7[0] = __pyx_t_3; + __pyx_t_7[1] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_7[2] = __pyx_t_2; + __pyx_t_7[3] = __pyx_mstate_global->__pyx_kp_u__4; + __pyx_t_7[4] = __pyx_t_6; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_err = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":969 + * s = OpError(status) + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" + * if cu_err is not None: # <<<<<<<<<<<<<< + * e = pyCUresult(cu_err) + * err += f"; CUDA status: {e.name} ({e.value})" +*/ + __pyx_t_8 = (__pyx_v_cu_err != Py_None); + if (__pyx_t_8) { + + /* "cuda/bindings/cufile.pyx":970 + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" + * if cu_err is not None: + * e = pyCUresult(cu_err) # <<<<<<<<<<<<<< + * err += f"; CUDA status: {e.name} ({e.value})" + * super(cuFileError, self).__init__(err) +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pyCUresult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_cu_err}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_e = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":971 + * if cu_err is not None: + * e = pyCUresult(cu_err) + * err += f"; CUDA status: {e.name} ({e.value})" # <<<<<<<<<<<<<< + * super(cuFileError, self).__init__(err) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_CUDA_status; + __pyx_t_7[1] = __pyx_t_2; + __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__3; + __pyx_t_7[3] = __pyx_t_6; + __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u__5; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 15 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_err, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_err, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":969 + * s = OpError(status) + * cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" + * if cu_err is not None: # <<<<<<<<<<<<<< + * e = pyCUresult(cu_err) + * err += f"; CUDA status: {e.name} ({e.value})" +*/ + } + + /* "cuda/bindings/cufile.pyx":972 + * e = pyCUresult(cu_err) + * err += f"; CUDA status: {e.name} ({e.value})" + * super(cuFileError, self).__init__(err) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_super); + __pyx_t_9 = __pyx_builtin_super; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_cuFileError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_10, __pyx_v_self}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_1 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_err}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 972, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":964 + * class cuFileError(Exception): + * + * def __init__(self, status, cu_err=None): # <<<<<<<<<<<<<< + * self.status = status + * self.cuda_error = cu_err +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.cufile.cuFileError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XDECREF(__pyx_v_err); + __Pyx_XDECREF(__pyx_v_e); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":974 + * super(cuFileError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status, self.cuda_error)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_11cuFileError_2__reduce__, "cuFileError.__reduce__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_11cuFileError_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_11cuFileError_2__reduce__}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11cuFileError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 974, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 974, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce__", 0) < (0)) __PYX_ERR(0, 974, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, i); __PYX_ERR(0, 974, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 974, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 974, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.cuFileError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_11cuFileError_2__reduce__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_11cuFileError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "cuda/bindings/cufile.pyx":975 + * + * def __reduce__(self): + * return (type(self), (self.status, self.cuda_error)) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cuda_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 975, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 975, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(__pyx_v_self))) != (0)) __PYX_ERR(0, 975, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 975, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":974 + * super(cuFileError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status, self.cuda_error)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.cuFileError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":978 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(ReturnT status) except 1 nogil: + * if ReturnT is CUfileError_t: +*/ + +static int __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(CUfileError_t __pyx_v_status) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("__pyx_fuse_0check_status", 1); + + /* "cuda/bindings/cufile.pyx":981 + * cdef int check_status(ReturnT status) except 1 nogil: + * if ReturnT is CUfileError_t: + * if status.err != 0 or status.cu_err != 0: # <<<<<<<<<<<<<< + * with gil: + * raise cuFileError(status.err, status.cu_err) +*/ + __pyx_t_2 = (__pyx_v_status.err != 0); + if (!__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = (__pyx_v_status.cu_err != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":982 + * if ReturnT is CUfileError_t: + * if status.err != 0 or status.cu_err != 0: + * with gil: # <<<<<<<<<<<<<< + * raise cuFileError(status.err, status.cu_err) + * elif ReturnT is ssize_t: +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":983 + * if status.err != 0 or status.cu_err != 0: + * with gil: + * raise cuFileError(status.err, status.cu_err) # <<<<<<<<<<<<<< + * elif ReturnT is ssize_t: + * if status == -1: +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cuFileError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_CUfileOpError(__pyx_v_status.err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 983, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_From_enum__cudaError_enum(__pyx_v_status.cu_err); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_7}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 983, __pyx_L7_error) + } + + /* "cuda/bindings/cufile.pyx":982 + * if ReturnT is CUfileError_t: + * if status.err != 0 or status.cu_err != 0: + * with gil: # <<<<<<<<<<<<<< + * raise cuFileError(status.err, status.cu_err) + * elif ReturnT is ssize_t: +*/ + /*finally:*/ { + __pyx_L7_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/cufile.pyx":981 + * cdef int check_status(ReturnT status) except 1 nogil: + * if ReturnT is CUfileError_t: + * if status.err != 0 or status.cu_err != 0: # <<<<<<<<<<<<<< + * with gil: + * raise cuFileError(status.err, status.cu_err) +*/ + } + + /* "cuda/bindings/cufile.pyx":989 + * with gil: + * raise cuFileError(errno.errno) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":978 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(ReturnT status) except 1 nogil: + * if ReturnT is CUfileError_t: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.check_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +static int __pyx_fuse_1__pyx_f_4cuda_8bindings_6cufile_check_status(Py_ssize_t __pyx_v_status) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("__pyx_fuse_1check_status", 1); + + /* "cuda/bindings/cufile.pyx":985 + * raise cuFileError(status.err, status.cu_err) + * elif ReturnT is ssize_t: + * if status == -1: # <<<<<<<<<<<<<< + * # note: this assumes cuFile already properly resets errno in each API + * with gil: +*/ + __pyx_t_1 = (__pyx_v_status == -1L); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/cufile.pyx":987 + * if status == -1: + * # note: this assumes cuFile already properly resets errno in each API + * with gil: # <<<<<<<<<<<<<< + * raise cuFileError(errno.errno) + * return 0 +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":988 + * # note: this assumes cuFile already properly resets errno in each API + * with gil: + * raise cuFileError(errno.errno) # <<<<<<<<<<<<<< + * return 0 + * +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_cuFileError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 988, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 988, __pyx_L5_error) + } + + /* "cuda/bindings/cufile.pyx":987 + * if status == -1: + * # note: this assumes cuFile already properly resets errno in each API + * with gil: # <<<<<<<<<<<<<< + * raise cuFileError(errno.errno) + * return 0 +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/cufile.pyx":985 + * raise cuFileError(status.err, status.cu_err) + * elif ReturnT is ssize_t: + * if status == -1: # <<<<<<<<<<<<<< + * # note: this assumes cuFile already properly resets errno in each API + * with gil: +*/ + } + + /* "cuda/bindings/cufile.pyx":989 + * with gil: + * raise cuFileError(errno.errno) + * return 0 # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":978 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(ReturnT status) except 1 nogil: + * if ReturnT is CUfileError_t: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.cufile.check_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":996 + * ############################################################################### + * + * cpdef intptr_t handle_register(intptr_t descr) except? 0: # <<<<<<<<<<<<<< + * """cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_1handle_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_6cufile_handle_register(intptr_t __pyx_v_descr, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_6cufile_Handle __pyx_v_fh; + CUfileError_t __pyx_v_status; + intptr_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1008 + * """ + * cdef Handle fh + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileHandleRegister(&fh, descr) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1009 + * cdef Handle fh + * with nogil: + * status = cuFileHandleRegister(&fh, descr) # <<<<<<<<<<<<<< + * check_status(status) + * return fh +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileHandleRegister((&__pyx_v_fh), ((CUfileDescr_t *)__pyx_v_descr)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1009, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1008 + * """ + * cdef Handle fh + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileHandleRegister(&fh, descr) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1010 + * with nogil: + * status = cuFileHandleRegister(&fh, descr) + * check_status(status) # <<<<<<<<<<<<<< + * return fh + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1010, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1011 + * status = cuFileHandleRegister(&fh, descr) + * check_status(status) + * return fh # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((intptr_t)__pyx_v_fh); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":996 + * ############################################################################### + * + * cpdef intptr_t handle_register(intptr_t descr) except? 0: # <<<<<<<<<<<<<< + * """cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.handle_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_1handle_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_handle_register, "handle_register(intptr_t descr) -> intptr_t\n\ncuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations.\n\nArgs:\n descr (intptr_t): ``CUfileDescr_t`` file descriptor (OS agnostic).\n\nReturns:\n intptr_t: ``CUfileHandle_t`` opaque file handle for IO operations.\n\n.. seealso:: `cuFileHandleRegister`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_1handle_register = {"handle_register", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_1handle_register, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_handle_register}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_1handle_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_descr; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_register (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_descr,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 996, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 996, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_register", 0) < (0)) __PYX_ERR(0, 996, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_register", 1, 1, 1, i); __PYX_ERR(0, 996, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 996, __pyx_L3_error) + } + __pyx_v_descr = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_descr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_register", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 996, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.handle_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_handle_register(__pyx_self, __pyx_v_descr); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_handle_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_descr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + intptr_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_register", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_handle_register(__pyx_v_descr, 1); if (unlikely(__pyx_t_1 == ((intptr_t)0) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.handle_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1014 + * + * + * cpdef void handle_deregister(intptr_t fh) except*: # <<<<<<<<<<<<<< + * """releases a registered filehandle from cuFile. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_3handle_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static void __pyx_f_4cuda_8bindings_6cufile_handle_deregister(intptr_t __pyx_v_fh, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1022 + * .. seealso:: `cuFileHandleDeregister` + * """ + * cuFileHandleDeregister(fh) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_f_4cuda_8bindings_8cycufile_cuFileHandleDeregister(((__pyx_t_4cuda_8bindings_6cufile_Handle)__pyx_v_fh)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1022, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1014 + * + * + * cpdef void handle_deregister(intptr_t fh) except*: # <<<<<<<<<<<<<< + * """releases a registered filehandle from cuFile. + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.handle_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_3handle_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_2handle_deregister, "handle_deregister(intptr_t fh) -> void\n\nreleases a registered filehandle from cuFile.\n\nArgs:\n fh (intptr_t): ``CUfileHandle_t`` file handle.\n\n.. seealso:: `cuFileHandleDeregister`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_3handle_deregister = {"handle_deregister", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_3handle_deregister, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_2handle_deregister}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_3handle_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_fh; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("handle_deregister (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fh,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1014, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1014, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_deregister", 0) < (0)) __PYX_ERR(0, 1014, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_deregister", 1, 1, 1, i); __PYX_ERR(0, 1014, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1014, __pyx_L3_error) + } + __pyx_v_fh = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_fh == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("handle_deregister", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1014, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.handle_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_2handle_deregister(__pyx_self, __pyx_v_fh); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_2handle_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("handle_deregister", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_f_4cuda_8bindings_6cufile_handle_deregister(__pyx_v_fh, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1014, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.handle_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1025 + * + * + * cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags): # <<<<<<<<<<<<<< + * """register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5buf_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_buf_register(intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_length, int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("buf_register", 0); + + /* "cuda/bindings/cufile.pyx":1035 + * .. seealso:: `cuFileBufRegister` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBufRegister(buf_ptr_base, length, flags) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1036 + * """ + * with nogil: + * status = cuFileBufRegister(buf_ptr_base, length, flags) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBufRegister(((void const *)__pyx_v_buf_ptr_base), __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1036, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1035 + * .. seealso:: `cuFileBufRegister` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBufRegister(buf_ptr_base, length, flags) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1037 + * with nogil: + * status = cuFileBufRegister(buf_ptr_base, length, flags) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1037, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1025 + * + * + * cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags): # <<<<<<<<<<<<<< + * """register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.buf_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5buf_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_4buf_register, "buf_register(intptr_t buf_ptr_base, size_t length, int flags)\n\nregister an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile.\n\nArgs:\n buf_ptr_base (intptr_t): buffer pointer allocated.\n length (size_t): size of memory region from the above specified bufPtr.\n flags (int): CU_FILE_RDMA_REGISTER.\n\n.. seealso:: `cuFileBufRegister`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_5buf_register = {"buf_register", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5buf_register, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_4buf_register}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_5buf_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_buf_ptr_base; + size_t __pyx_v_length; + int __pyx_v_flags; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("buf_register (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,&__pyx_mstate_global->__pyx_n_u_length,&__pyx_mstate_global->__pyx_n_u_flags,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1025, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1025, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1025, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1025, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "buf_register", 0) < (0)) __PYX_ERR(0, 1025, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("buf_register", 1, 3, 3, i); __PYX_ERR(0, 1025, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1025, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1025, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1025, __pyx_L3_error) + } + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error) + __pyx_v_length = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_length == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("buf_register", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1025, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.buf_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_4buf_register(__pyx_self, __pyx_v_buf_ptr_base, __pyx_v_length, __pyx_v_flags); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_4buf_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_length, int __pyx_v_flags) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("buf_register", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_buf_register(__pyx_v_buf_ptr_base, __pyx_v_length, __pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.buf_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1040 + * + * + * cpdef buf_deregister(intptr_t buf_ptr_base): # <<<<<<<<<<<<<< + * """deregister an already registered device or host memory from cuFile. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_7buf_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_buf_deregister(intptr_t __pyx_v_buf_ptr_base, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("buf_deregister", 0); + + /* "cuda/bindings/cufile.pyx":1048 + * .. seealso:: `cuFileBufDeregister` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBufDeregister(buf_ptr_base) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1049 + * """ + * with nogil: + * status = cuFileBufDeregister(buf_ptr_base) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBufDeregister(((void const *)__pyx_v_buf_ptr_base)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1048 + * .. seealso:: `cuFileBufDeregister` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBufDeregister(buf_ptr_base) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1050 + * with nogil: + * status = cuFileBufDeregister(buf_ptr_base) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1050, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1040 + * + * + * cpdef buf_deregister(intptr_t buf_ptr_base): # <<<<<<<<<<<<<< + * """deregister an already registered device or host memory from cuFile. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.buf_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_7buf_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_6buf_deregister, "buf_deregister(intptr_t buf_ptr_base)\n\nderegister an already registered device or host memory from cuFile.\n\nArgs:\n buf_ptr_base (intptr_t): buffer pointer to deregister.\n\n.. seealso:: `cuFileBufDeregister`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_7buf_deregister = {"buf_deregister", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_7buf_deregister, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_6buf_deregister}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_7buf_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_buf_ptr_base; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("buf_deregister (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1040, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1040, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "buf_deregister", 0) < (0)) __PYX_ERR(0, 1040, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("buf_deregister", 1, 1, 1, i); __PYX_ERR(0, 1040, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1040, __pyx_L3_error) + } + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("buf_deregister", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1040, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.buf_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_6buf_deregister(__pyx_self, __pyx_v_buf_ptr_base); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_6buf_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_buf_ptr_base) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("buf_deregister", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_buf_deregister(__pyx_v_buf_ptr_base, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.buf_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1053 + * + * + * cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """read data from a registered file handle to a specified device or host memory. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_9read(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_read(intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset, CYTHON_UNUSED int __pyx_skip_dispatch) { + Py_ssize_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read", 0); + + /* "cuda/bindings/cufile.pyx":1065 + * .. seealso:: `cuFileRead` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileRead(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1066 + * """ + * with nogil: + * status = cuFileRead(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileRead(((__pyx_t_4cuda_8bindings_6cufile_Handle)__pyx_v_fh), ((void *)__pyx_v_buf_ptr_base), __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1066, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1065 + * .. seealso:: `cuFileRead` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileRead(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1067 + * with nogil: + * status = cuFileRead(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_1__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1067, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1053 + * + * + * cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """read data from a registered file handle to a specified device or host memory. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_9read(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_8read, "read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset)\n\nread data from a registered file handle to a specified device or host memory.\n\nArgs:\n fh (intptr_t): ``CUfileHandle_t`` opaque file handle.\n buf_ptr_base (intptr_t): base address of buffer in device or host memory.\n size (size_t): size bytes to read.\n file_offset (off_t): file-offset from begining of the file.\n buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to read into.\n\n.. seealso:: `cuFileRead`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_9read = {"read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_9read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8read}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_9read(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_fh; + intptr_t __pyx_v_buf_ptr_base; + size_t __pyx_v_size; + off_t __pyx_v_file_offset; + off_t __pyx_v_buf_ptr_offset; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fh,&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_file_offset,&__pyx_mstate_global->__pyx_n_u_buf_ptr_offset,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1053, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1053, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1053, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1053, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1053, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read", 0) < (0)) __PYX_ERR(0, 1053, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read", 1, 5, 5, i); __PYX_ERR(0, 1053, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1053, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1053, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1053, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1053, __pyx_L3_error) + } + __pyx_v_fh = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_fh == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error) + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[1]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error) + __pyx_v_size = __Pyx_PyLong_As_size_t(values[2]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error) + __pyx_v_file_offset = __Pyx_PyLong_As_off_t(values[3]); if (unlikely((__pyx_v_file_offset == ((off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error) + __pyx_v_buf_ptr_offset = __Pyx_PyLong_As_off_t(values[4]); if (unlikely((__pyx_v_buf_ptr_offset == ((off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1053, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("read", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1053, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_8read(__pyx_self, __pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_8read(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_read(__pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1070 + * + * + * cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """write data from a specified device or host memory to a registered file handle. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11write(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_write(intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset, CYTHON_UNUSED int __pyx_skip_dispatch) { + Py_ssize_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + + /* "cuda/bindings/cufile.pyx":1082 + * .. seealso:: `cuFileWrite` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1083 + * """ + * with nogil: + * status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileWrite(((__pyx_t_4cuda_8bindings_6cufile_Handle)__pyx_v_fh), ((void const *)__pyx_v_buf_ptr_base), __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1083, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1082 + * .. seealso:: `cuFileWrite` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1084 + * with nogil: + * status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_1__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1084, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1070 + * + * + * cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """write data from a specified device or host memory to a registered file handle. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11write(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_10write, "write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset)\n\nwrite data from a specified device or host memory to a registered file handle.\n\nArgs:\n fh (intptr_t): ``CUfileHandle_t`` opaque file handle.\n buf_ptr_base (intptr_t): base address of buffer in device or host memory.\n size (size_t): size bytes to write.\n file_offset (off_t): file-offset from begining of the file.\n buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to write from.\n\n.. seealso:: `cuFileWrite`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_11write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_11write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_10write}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_11write(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_fh; + intptr_t __pyx_v_buf_ptr_base; + size_t __pyx_v_size; + off_t __pyx_v_file_offset; + off_t __pyx_v_buf_ptr_offset; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fh,&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_file_offset,&__pyx_mstate_global->__pyx_n_u_buf_ptr_offset,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1070, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1070, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1070, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1070, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1070, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1070, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < (0)) __PYX_ERR(0, 1070, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 1, 5, 5, i); __PYX_ERR(0, 1070, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1070, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1070, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1070, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1070, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1070, __pyx_L3_error) + } + __pyx_v_fh = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_fh == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L3_error) + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[1]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L3_error) + __pyx_v_size = __Pyx_PyLong_As_size_t(values[2]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L3_error) + __pyx_v_file_offset = __Pyx_PyLong_As_off_t(values[3]); if (unlikely((__pyx_v_file_offset == ((off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L3_error) + __pyx_v_buf_ptr_offset = __Pyx_PyLong_As_off_t(values[4]); if (unlikely((__pyx_v_buf_ptr_offset == ((off_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1070, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1070, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_10write(__pyx_self, __pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_10write(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_buf_ptr_offset) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_write(__pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_buf_ptr_offset, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.write", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1087 + * + * + * cpdef driver_open(): # <<<<<<<<<<<<<< + * """Initialize the cuFile library and open the nvidia-fs driver. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13driver_open(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_open(CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_open", 0); + + /* "cuda/bindings/cufile.pyx":1092 + * .. seealso:: `cuFileDriverOpen` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverOpen() + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1093 + * """ + * with nogil: + * status = cuFileDriverOpen() # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverOpen(); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1093, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1092 + * .. seealso:: `cuFileDriverOpen` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverOpen() + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1094 + * with nogil: + * status = cuFileDriverOpen() + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1094, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1087 + * + * + * cpdef driver_open(): # <<<<<<<<<<<<<< + * """Initialize the cuFile library and open the nvidia-fs driver. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13driver_open(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_12driver_open, "driver_open()\n\nInitialize the cuFile library and open the nvidia-fs driver.\n\n.. seealso:: `cuFileDriverOpen`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_13driver_open = {"driver_open", (PyCFunction)__pyx_pw_4cuda_8bindings_6cufile_13driver_open, METH_NOARGS, __pyx_doc_4cuda_8bindings_6cufile_12driver_open}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_13driver_open(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_open (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_12driver_open(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_12driver_open(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_open", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_open(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1097 + * + * + * cpdef use_count(): # <<<<<<<<<<<<<< + * """returns use count of cufile drivers at that moment by the process. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_15use_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_use_count(CYTHON_UNUSED int __pyx_skip_dispatch) { + long __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + long __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("use_count", 0); + + /* "cuda/bindings/cufile.pyx":1102 + * .. seealso:: `cuFileUseCount` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileUseCount() + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1103 + * """ + * with nogil: + * status = cuFileUseCount() # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileUseCount(); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1102 + * .. seealso:: `cuFileUseCount` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileUseCount() + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1104 + * with nogil: + * status = cuFileUseCount() + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_1__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1104, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1097 + * + * + * cpdef use_count(): # <<<<<<<<<<<<<< + * """returns use count of cufile drivers at that moment by the process. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.use_count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_15use_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_14use_count, "use_count()\n\nreturns use count of cufile drivers at that moment by the process.\n\n.. seealso:: `cuFileUseCount`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_15use_count = {"use_count", (PyCFunction)__pyx_pw_4cuda_8bindings_6cufile_15use_count, METH_NOARGS, __pyx_doc_4cuda_8bindings_6cufile_14use_count}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_15use_count(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("use_count (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_14use_count(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_14use_count(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("use_count", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_use_count(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.use_count", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1107 + * + * + * cpdef driver_get_properties(intptr_t props): # <<<<<<<<<<<<<< + * """Gets the Driver session properties. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_17driver_get_properties(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_get_properties(intptr_t __pyx_v_props, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_get_properties", 0); + + /* "cuda/bindings/cufile.pyx":1115 + * .. seealso:: `cuFileDriverGetProperties` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverGetProperties(props) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1116 + * """ + * with nogil: + * status = cuFileDriverGetProperties(props) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverGetProperties(((CUfileDrvProps_t *)__pyx_v_props)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1116, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1115 + * .. seealso:: `cuFileDriverGetProperties` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverGetProperties(props) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1117 + * with nogil: + * status = cuFileDriverGetProperties(props) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1117, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1107 + * + * + * cpdef driver_get_properties(intptr_t props): # <<<<<<<<<<<<<< + * """Gets the Driver session properties. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_get_properties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_17driver_get_properties(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_16driver_get_properties, "driver_get_properties(intptr_t props)\n\nGets the Driver session properties.\n\nArgs:\n props (intptr_t): to set.\n\n.. seealso:: `cuFileDriverGetProperties`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_17driver_get_properties = {"driver_get_properties", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_17driver_get_properties, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_16driver_get_properties}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_17driver_get_properties(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_props; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_get_properties (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_props,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1107, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1107, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "driver_get_properties", 0) < (0)) __PYX_ERR(0, 1107, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("driver_get_properties", 1, 1, 1, i); __PYX_ERR(0, 1107, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1107, __pyx_L3_error) + } + __pyx_v_props = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_props == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1107, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("driver_get_properties", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1107, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.driver_get_properties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_16driver_get_properties(__pyx_self, __pyx_v_props); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_16driver_get_properties(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_props) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_get_properties", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_get_properties(__pyx_v_props, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_get_properties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1120 + * + * + * cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size): # <<<<<<<<<<<<<< + * """Sets whether the Read/Write APIs use polling to do IO operations. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_19driver_set_poll_mode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_poll_mode(int __pyx_v_poll, size_t __pyx_v_poll_threshold_size, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_poll_mode", 0); + + /* "cuda/bindings/cufile.pyx":1129 + * .. seealso:: `cuFileDriverSetPollMode` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetPollMode(poll, poll_threshold_size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1130 + * """ + * with nogil: + * status = cuFileDriverSetPollMode(poll, poll_threshold_size) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetPollMode(((bool)__pyx_v_poll), __pyx_v_poll_threshold_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1129 + * .. seealso:: `cuFileDriverSetPollMode` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetPollMode(poll, poll_threshold_size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1131 + * with nogil: + * status = cuFileDriverSetPollMode(poll, poll_threshold_size) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1131, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1120 + * + * + * cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size): # <<<<<<<<<<<<<< + * """Sets whether the Read/Write APIs use polling to do IO operations. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_poll_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_19driver_set_poll_mode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_18driver_set_poll_mode, "driver_set_poll_mode(bool poll, size_t poll_threshold_size)\n\nSets whether the Read/Write APIs use polling to do IO operations.\n\nArgs:\n poll (bint): boolean to indicate whether to use poll mode or not.\n poll_threshold_size (size_t): max IO size to use for POLLING mode in KB.\n\n.. seealso:: `cuFileDriverSetPollMode`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_19driver_set_poll_mode = {"driver_set_poll_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_19driver_set_poll_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_18driver_set_poll_mode}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_19driver_set_poll_mode(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_poll; + size_t __pyx_v_poll_threshold_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_set_poll_mode (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_poll,&__pyx_mstate_global->__pyx_n_u_poll_threshold_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1120, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "driver_set_poll_mode", 0) < (0)) __PYX_ERR(0, 1120, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("driver_set_poll_mode", 1, 2, 2, i); __PYX_ERR(0, 1120, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1120, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1120, __pyx_L3_error) + } + __pyx_v_poll = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_poll == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L3_error) + __pyx_v_poll_threshold_size = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_poll_threshold_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("driver_set_poll_mode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1120, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_poll_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_18driver_set_poll_mode(__pyx_self, __pyx_v_poll, __pyx_v_poll_threshold_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_18driver_set_poll_mode(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_poll, size_t __pyx_v_poll_threshold_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_poll_mode", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_set_poll_mode(__pyx_v_poll, __pyx_v_poll_threshold_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_poll_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1134 + * + * + * cpdef driver_set_max_direct_io_size(size_t max_direct_io_size): # <<<<<<<<<<<<<< + * """Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_direct_io_size(size_t __pyx_v_max_direct_io_size, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_direct_io_size", 0); + + /* "cuda/bindings/cufile.pyx":1142 + * .. seealso:: `cuFileDriverSetMaxDirectIOSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1143 + * """ + * with nogil: + * status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxDirectIOSize(__pyx_v_max_direct_io_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1143, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1142 + * .. seealso:: `cuFileDriverSetMaxDirectIOSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1144 + * with nogil: + * status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1144, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1134 + * + * + * cpdef driver_set_max_direct_io_size(size_t max_direct_io_size): # <<<<<<<<<<<<<< + * """Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_direct_io_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_20driver_set_max_direct_io_size, "driver_set_max_direct_io_size(size_t max_direct_io_size)\n\nControl parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver.\n\nArgs:\n max_direct_io_size (size_t): maximum allowed direct io size in KB.\n\n.. seealso:: `cuFileDriverSetMaxDirectIOSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size = {"driver_set_max_direct_io_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_20driver_set_max_direct_io_size}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + size_t __pyx_v_max_direct_io_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_set_max_direct_io_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_direct_io_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1134, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1134, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "driver_set_max_direct_io_size", 0) < (0)) __PYX_ERR(0, 1134, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("driver_set_max_direct_io_size", 1, 1, 1, i); __PYX_ERR(0, 1134, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1134, __pyx_L3_error) + } + __pyx_v_max_direct_io_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_max_direct_io_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1134, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("driver_set_max_direct_io_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1134, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_direct_io_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_20driver_set_max_direct_io_size(__pyx_self, __pyx_v_max_direct_io_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_20driver_set_max_direct_io_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_direct_io_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_direct_io_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_set_max_direct_io_size(__pyx_v_max_direct_io_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_direct_io_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1147 + * + * + * cpdef driver_set_max_cache_size(size_t max_cache_size): # <<<<<<<<<<<<<< + * """Control parameter to set maximum GPU memory reserved per device by the library for internal buffering. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_23driver_set_max_cache_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_cache_size(size_t __pyx_v_max_cache_size, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_cache_size", 0); + + /* "cuda/bindings/cufile.pyx":1155 + * .. seealso:: `cuFileDriverSetMaxCacheSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxCacheSize(max_cache_size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1156 + * """ + * with nogil: + * status = cuFileDriverSetMaxCacheSize(max_cache_size) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxCacheSize(__pyx_v_max_cache_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1156, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1155 + * .. seealso:: `cuFileDriverSetMaxCacheSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxCacheSize(max_cache_size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1157 + * with nogil: + * status = cuFileDriverSetMaxCacheSize(max_cache_size) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1157, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1147 + * + * + * cpdef driver_set_max_cache_size(size_t max_cache_size): # <<<<<<<<<<<<<< + * """Control parameter to set maximum GPU memory reserved per device by the library for internal buffering. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_cache_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_23driver_set_max_cache_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_22driver_set_max_cache_size, "driver_set_max_cache_size(size_t max_cache_size)\n\nControl parameter to set maximum GPU memory reserved per device by the library for internal buffering.\n\nArgs:\n max_cache_size (size_t): The maximum GPU buffer space per device used for internal use in KB.\n\n.. seealso:: `cuFileDriverSetMaxCacheSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_23driver_set_max_cache_size = {"driver_set_max_cache_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_23driver_set_max_cache_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_22driver_set_max_cache_size}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_23driver_set_max_cache_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + size_t __pyx_v_max_cache_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_set_max_cache_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_cache_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1147, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1147, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "driver_set_max_cache_size", 0) < (0)) __PYX_ERR(0, 1147, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("driver_set_max_cache_size", 1, 1, 1, i); __PYX_ERR(0, 1147, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1147, __pyx_L3_error) + } + __pyx_v_max_cache_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_max_cache_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1147, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("driver_set_max_cache_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1147, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_cache_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_22driver_set_max_cache_size(__pyx_self, __pyx_v_max_cache_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_22driver_set_max_cache_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_cache_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_cache_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_set_max_cache_size(__pyx_v_max_cache_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_cache_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1160 + * + * + * cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size): # <<<<<<<<<<<<<< + * """Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_set_max_pinned_mem_size(size_t __pyx_v_max_pinned_size, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_pinned_mem_size", 0); + + /* "cuda/bindings/cufile.pyx":1168 + * .. seealso:: `cuFileDriverSetMaxPinnedMemSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1169 + * """ + * with nogil: + * status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxPinnedMemSize(__pyx_v_max_pinned_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1168 + * .. seealso:: `cuFileDriverSetMaxPinnedMemSize` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1170 + * with nogil: + * status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1170, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1160 + * + * + * cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size): # <<<<<<<<<<<<<< + * """Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_pinned_mem_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_24driver_set_max_pinned_mem_size, "driver_set_max_pinned_mem_size(size_t max_pinned_size)\n\nSets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``.\n\nArgs:\n max_pinned_size (size_t): maximum buffer space that is pinned in KB.\n\n.. seealso:: `cuFileDriverSetMaxPinnedMemSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size = {"driver_set_max_pinned_mem_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_24driver_set_max_pinned_mem_size}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + size_t __pyx_v_max_pinned_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_set_max_pinned_mem_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_max_pinned_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1160, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1160, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "driver_set_max_pinned_mem_size", 0) < (0)) __PYX_ERR(0, 1160, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("driver_set_max_pinned_mem_size", 1, 1, 1, i); __PYX_ERR(0, 1160, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1160, __pyx_L3_error) + } + __pyx_v_max_pinned_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_max_pinned_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("driver_set_max_pinned_mem_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1160, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_pinned_mem_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_24driver_set_max_pinned_mem_size(__pyx_self, __pyx_v_max_pinned_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_24driver_set_max_pinned_mem_size(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_max_pinned_size) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_set_max_pinned_mem_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_set_max_pinned_mem_size(__pyx_v_max_pinned_size, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_set_max_pinned_mem_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1173 + * + * + * cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: # <<<<<<<<<<<<<< + * cdef BatchHandle batch_idp + * with nogil: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_27batch_io_set_up(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_6cufile_batch_io_set_up(unsigned int __pyx_v_nr, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_6cufile_BatchHandle __pyx_v_batch_idp; + CUfileError_t __pyx_v_status; + intptr_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1175 + * cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: + * cdef BatchHandle batch_idp + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOSetUp(&batch_idp, nr) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1176 + * cdef BatchHandle batch_idp + * with nogil: + * status = cuFileBatchIOSetUp(&batch_idp, nr) # <<<<<<<<<<<<<< + * check_status(status) + * return batch_idp +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSetUp((&__pyx_v_batch_idp), __pyx_v_nr); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1176, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1175 + * cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: + * cdef BatchHandle batch_idp + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOSetUp(&batch_idp, nr) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1177 + * with nogil: + * status = cuFileBatchIOSetUp(&batch_idp, nr) + * check_status(status) # <<<<<<<<<<<<<< + * return batch_idp + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1177, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1178 + * status = cuFileBatchIOSetUp(&batch_idp, nr) + * check_status(status) + * return batch_idp # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((intptr_t)__pyx_v_batch_idp); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1173 + * + * + * cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: # <<<<<<<<<<<<<< + * cdef BatchHandle batch_idp + * with nogil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_set_up", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_27batch_io_set_up(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_26batch_io_set_up, "batch_io_set_up(unsigned int nr) -> intptr_t"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_27batch_io_set_up = {"batch_io_set_up", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_27batch_io_set_up, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_26batch_io_set_up}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_27batch_io_set_up(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + unsigned int __pyx_v_nr; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("batch_io_set_up (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_nr,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1173, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1173, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "batch_io_set_up", 0) < (0)) __PYX_ERR(0, 1173, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("batch_io_set_up", 1, 1, 1, i); __PYX_ERR(0, 1173, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1173, __pyx_L3_error) + } + __pyx_v_nr = __Pyx_PyLong_As_unsigned_int(values[0]); if (unlikely((__pyx_v_nr == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("batch_io_set_up", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1173, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_set_up", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_26batch_io_set_up(__pyx_self, __pyx_v_nr); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_26batch_io_set_up(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_nr) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + intptr_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_set_up", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_batch_io_set_up(__pyx_v_nr, 1); if (unlikely(__pyx_t_1 == ((intptr_t)0) && PyErr_Occurred())) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_set_up", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1181 + * + * + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_29batch_io_submit(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_submit(intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_nr, intptr_t __pyx_v_iocbp, unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_submit", 0); + + /* "cuda/bindings/cufile.pyx":1182 + * + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1183 + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): + * with nogil: + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSubmit(((__pyx_t_4cuda_8bindings_6cufile_BatchHandle)__pyx_v_batch_idp), __pyx_v_nr, ((CUfileIOParams_t *)__pyx_v_iocbp), __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1183, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1182 + * + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1184 + * with nogil: + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1184, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1181 + * + * + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_submit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_29batch_io_submit(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_28batch_io_submit, "batch_io_submit(intptr_t batch_idp, unsigned int nr, intptr_t iocbp, unsigned int flags)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_29batch_io_submit = {"batch_io_submit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_29batch_io_submit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_28batch_io_submit}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_29batch_io_submit(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_batch_idp; + unsigned int __pyx_v_nr; + intptr_t __pyx_v_iocbp; + unsigned int __pyx_v_flags; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("batch_io_submit (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch_idp,&__pyx_mstate_global->__pyx_n_u_nr,&__pyx_mstate_global->__pyx_n_u_iocbp,&__pyx_mstate_global->__pyx_n_u_flags,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1181, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1181, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "batch_io_submit", 0) < (0)) __PYX_ERR(0, 1181, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("batch_io_submit", 1, 4, 4, i); __PYX_ERR(0, 1181, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1181, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1181, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1181, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1181, __pyx_L3_error) + } + __pyx_v_batch_idp = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_batch_idp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L3_error) + __pyx_v_nr = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_nr == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L3_error) + __pyx_v_iocbp = PyLong_AsSsize_t(values[2]); if (unlikely((__pyx_v_iocbp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyLong_As_unsigned_int(values[3]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("batch_io_submit", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1181, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_submit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_28batch_io_submit(__pyx_self, __pyx_v_batch_idp, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_flags); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_28batch_io_submit(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_nr, intptr_t __pyx_v_iocbp, unsigned int __pyx_v_flags) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_submit", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_batch_io_submit(__pyx_v_batch_idp, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_submit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1187 + * + * + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_31batch_io_get_status(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_get_status(intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_min_nr, intptr_t __pyx_v_nr, intptr_t __pyx_v_iocbp, intptr_t __pyx_v_timeout, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_get_status", 0); + + /* "cuda/bindings/cufile.pyx":1188 + * + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1189 + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): + * with nogil: + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOGetStatus(((__pyx_t_4cuda_8bindings_6cufile_BatchHandle)__pyx_v_batch_idp), __pyx_v_min_nr, ((unsigned int *)__pyx_v_nr), ((CUfileIOEvents_t *)__pyx_v_iocbp), ((struct timespec *)__pyx_v_timeout)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1189, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1188 + * + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1190 + * with nogil: + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1190, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1187 + * + * + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_get_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_31batch_io_get_status(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_30batch_io_get_status, "batch_io_get_status(intptr_t batch_idp, unsigned int min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_31batch_io_get_status = {"batch_io_get_status", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_31batch_io_get_status, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_30batch_io_get_status}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_31batch_io_get_status(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_batch_idp; + unsigned int __pyx_v_min_nr; + intptr_t __pyx_v_nr; + intptr_t __pyx_v_iocbp; + intptr_t __pyx_v_timeout; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("batch_io_get_status (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch_idp,&__pyx_mstate_global->__pyx_n_u_min_nr,&__pyx_mstate_global->__pyx_n_u_nr,&__pyx_mstate_global->__pyx_n_u_iocbp,&__pyx_mstate_global->__pyx_n_u_timeout,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1187, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1187, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "batch_io_get_status", 0) < (0)) __PYX_ERR(0, 1187, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("batch_io_get_status", 1, 5, 5, i); __PYX_ERR(0, 1187, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1187, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1187, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1187, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1187, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1187, __pyx_L3_error) + } + __pyx_v_batch_idp = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_batch_idp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) + __pyx_v_min_nr = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_min_nr == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) + __pyx_v_nr = PyLong_AsSsize_t(values[2]); if (unlikely((__pyx_v_nr == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) + __pyx_v_iocbp = PyLong_AsSsize_t(values[3]); if (unlikely((__pyx_v_iocbp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) + __pyx_v_timeout = PyLong_AsSsize_t(values[4]); if (unlikely((__pyx_v_timeout == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1187, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("batch_io_get_status", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1187, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_get_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_30batch_io_get_status(__pyx_self, __pyx_v_batch_idp, __pyx_v_min_nr, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_timeout); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_30batch_io_get_status(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp, unsigned int __pyx_v_min_nr, intptr_t __pyx_v_nr, intptr_t __pyx_v_iocbp, intptr_t __pyx_v_timeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_get_status", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_batch_io_get_status(__pyx_v_batch_idp, __pyx_v_min_nr, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_timeout, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_get_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1193 + * + * + * cpdef batch_io_cancel(intptr_t batch_idp): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOCancel(batch_idp) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_33batch_io_cancel(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_batch_io_cancel(intptr_t __pyx_v_batch_idp, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_cancel", 0); + + /* "cuda/bindings/cufile.pyx":1194 + * + * cpdef batch_io_cancel(intptr_t batch_idp): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOCancel(batch_idp) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1195 + * cpdef batch_io_cancel(intptr_t batch_idp): + * with nogil: + * status = cuFileBatchIOCancel(batch_idp) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOCancel(((__pyx_t_4cuda_8bindings_6cufile_BatchHandle)__pyx_v_batch_idp)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1195, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1194 + * + * cpdef batch_io_cancel(intptr_t batch_idp): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileBatchIOCancel(batch_idp) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1196 + * with nogil: + * status = cuFileBatchIOCancel(batch_idp) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1196, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1193 + * + * + * cpdef batch_io_cancel(intptr_t batch_idp): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOCancel(batch_idp) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_33batch_io_cancel(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_32batch_io_cancel, "batch_io_cancel(intptr_t batch_idp)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_33batch_io_cancel = {"batch_io_cancel", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_33batch_io_cancel, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_32batch_io_cancel}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_33batch_io_cancel(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_batch_idp; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("batch_io_cancel (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch_idp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1193, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1193, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "batch_io_cancel", 0) < (0)) __PYX_ERR(0, 1193, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("batch_io_cancel", 1, 1, 1, i); __PYX_ERR(0, 1193, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1193, __pyx_L3_error) + } + __pyx_v_batch_idp = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_batch_idp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("batch_io_cancel", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1193, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_32batch_io_cancel(__pyx_self, __pyx_v_batch_idp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_32batch_io_cancel(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_cancel", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_batch_io_cancel(__pyx_v_batch_idp, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1199 + * + * + * cpdef void batch_io_destroy(intptr_t batch_idp) except*: # <<<<<<<<<<<<<< + * cuFileBatchIODestroy(batch_idp) + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_35batch_io_destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static void __pyx_f_4cuda_8bindings_6cufile_batch_io_destroy(intptr_t __pyx_v_batch_idp, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1200 + * + * cpdef void batch_io_destroy(intptr_t batch_idp) except*: + * cuFileBatchIODestroy(batch_idp) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIODestroy(((__pyx_t_4cuda_8bindings_6cufile_BatchHandle)__pyx_v_batch_idp)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1200, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1199 + * + * + * cpdef void batch_io_destroy(intptr_t batch_idp) except*: # <<<<<<<<<<<<<< + * cuFileBatchIODestroy(batch_idp) + * +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_35batch_io_destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_34batch_io_destroy, "batch_io_destroy(intptr_t batch_idp) -> void"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_35batch_io_destroy = {"batch_io_destroy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_35batch_io_destroy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_34batch_io_destroy}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_35batch_io_destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_batch_idp; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("batch_io_destroy (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_batch_idp,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1199, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1199, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "batch_io_destroy", 0) < (0)) __PYX_ERR(0, 1199, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("batch_io_destroy", 1, 1, 1, i); __PYX_ERR(0, 1199, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1199, __pyx_L3_error) + } + __pyx_v_batch_idp = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_batch_idp == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1199, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("batch_io_destroy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1199, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_34batch_io_destroy(__pyx_self, __pyx_v_batch_idp); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_34batch_io_destroy(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_batch_idp) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("batch_io_destroy", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_f_4cuda_8bindings_6cufile_batch_io_destroy(__pyx_v_batch_idp, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_1 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.batch_io_destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1203 + * + * + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_37read_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_read_async(intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_read_p, intptr_t __pyx_v_stream, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_async", 0); + + /* "cuda/bindings/cufile.pyx":1204 + * + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1205 + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): + * with nogil: + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileReadAsync(((__pyx_t_4cuda_8bindings_6cufile_Handle)__pyx_v_fh), ((void *)__pyx_v_buf_ptr_base), ((size_t *)__pyx_v_size_p), ((off_t *)__pyx_v_file_offset_p), ((off_t *)__pyx_v_buf_ptr_offset_p), ((Py_ssize_t *)__pyx_v_bytes_read_p), ((void *)__pyx_v_stream)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1205, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1204 + * + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1206 + * with nogil: + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1206, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1203 + * + * + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.read_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_37read_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_36read_async, "read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_37read_async = {"read_async", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_37read_async, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_36read_async}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_37read_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_fh; + intptr_t __pyx_v_buf_ptr_base; + intptr_t __pyx_v_size_p; + intptr_t __pyx_v_file_offset_p; + intptr_t __pyx_v_buf_ptr_offset_p; + intptr_t __pyx_v_bytes_read_p; + intptr_t __pyx_v_stream; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("read_async (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fh,&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,&__pyx_mstate_global->__pyx_n_u_size_p,&__pyx_mstate_global->__pyx_n_u_file_offset_p,&__pyx_mstate_global->__pyx_n_u_buf_ptr_offset_p,&__pyx_mstate_global->__pyx_n_u_bytes_read_p,&__pyx_mstate_global->__pyx_n_u_stream,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1203, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_async", 0) < (0)) __PYX_ERR(0, 1203, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 7; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_async", 1, 7, 7, i); __PYX_ERR(0, 1203, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 7)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1203, __pyx_L3_error) + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1203, __pyx_L3_error) + } + __pyx_v_fh = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_fh == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[1]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_size_p = PyLong_AsSsize_t(values[2]); if (unlikely((__pyx_v_size_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_file_offset_p = PyLong_AsSsize_t(values[3]); if (unlikely((__pyx_v_file_offset_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_buf_ptr_offset_p = PyLong_AsSsize_t(values[4]); if (unlikely((__pyx_v_buf_ptr_offset_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_bytes_read_p = PyLong_AsSsize_t(values[5]); if (unlikely((__pyx_v_bytes_read_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_v_stream = PyLong_AsSsize_t(values[6]); if (unlikely((__pyx_v_stream == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("read_async", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 1203, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.read_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_36read_async(__pyx_self, __pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_buf_ptr_offset_p, __pyx_v_bytes_read_p, __pyx_v_stream); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_36read_async(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_read_p, intptr_t __pyx_v_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("read_async", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_read_async(__pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_buf_ptr_offset_p, __pyx_v_bytes_read_p, __pyx_v_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.read_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1209 + * + * + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_39write_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_write_async(intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_written_p, intptr_t __pyx_v_stream, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_async", 0); + + /* "cuda/bindings/cufile.pyx":1210 + * + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1211 + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): + * with nogil: + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileWriteAsync(((__pyx_t_4cuda_8bindings_6cufile_Handle)__pyx_v_fh), ((void *)__pyx_v_buf_ptr_base), ((size_t *)__pyx_v_size_p), ((off_t *)__pyx_v_file_offset_p), ((off_t *)__pyx_v_buf_ptr_offset_p), ((Py_ssize_t *)__pyx_v_bytes_written_p), ((void *)__pyx_v_stream)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1211, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1210 + * + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1212 + * with nogil: + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1212, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1209 + * + * + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.write_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_39write_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_38write_async, "write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_39write_async = {"write_async", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_39write_async, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_38write_async}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_39write_async(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_fh; + intptr_t __pyx_v_buf_ptr_base; + intptr_t __pyx_v_size_p; + intptr_t __pyx_v_file_offset_p; + intptr_t __pyx_v_buf_ptr_offset_p; + intptr_t __pyx_v_bytes_written_p; + intptr_t __pyx_v_stream; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[7] = {0,0,0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("write_async (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_fh,&__pyx_mstate_global->__pyx_n_u_buf_ptr_base,&__pyx_mstate_global->__pyx_n_u_size_p,&__pyx_mstate_global->__pyx_n_u_file_offset_p,&__pyx_mstate_global->__pyx_n_u_buf_ptr_offset_p,&__pyx_mstate_global->__pyx_n_u_bytes_written_p,&__pyx_mstate_global->__pyx_n_u_stream,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1209, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 7: + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 6: + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1209, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_async", 0) < (0)) __PYX_ERR(0, 1209, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 7; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_async", 1, 7, 7, i); __PYX_ERR(0, 1209, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 7)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1209, __pyx_L3_error) + values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1209, __pyx_L3_error) + } + __pyx_v_fh = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_fh == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_buf_ptr_base = PyLong_AsSsize_t(values[1]); if (unlikely((__pyx_v_buf_ptr_base == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_size_p = PyLong_AsSsize_t(values[2]); if (unlikely((__pyx_v_size_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_file_offset_p = PyLong_AsSsize_t(values[3]); if (unlikely((__pyx_v_file_offset_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_buf_ptr_offset_p = PyLong_AsSsize_t(values[4]); if (unlikely((__pyx_v_buf_ptr_offset_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_bytes_written_p = PyLong_AsSsize_t(values[5]); if (unlikely((__pyx_v_bytes_written_p == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_v_stream = PyLong_AsSsize_t(values[6]); if (unlikely((__pyx_v_stream == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1209, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("write_async", 1, 7, 7, __pyx_nargs); __PYX_ERR(0, 1209, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.write_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_38write_async(__pyx_self, __pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_buf_ptr_offset_p, __pyx_v_bytes_written_p, __pyx_v_stream); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_38write_async(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_fh, intptr_t __pyx_v_buf_ptr_base, intptr_t __pyx_v_size_p, intptr_t __pyx_v_file_offset_p, intptr_t __pyx_v_buf_ptr_offset_p, intptr_t __pyx_v_bytes_written_p, intptr_t __pyx_v_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("write_async", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_write_async(__pyx_v_fh, __pyx_v_buf_ptr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_buf_ptr_offset_p, __pyx_v_bytes_written_p, __pyx_v_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.write_async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1215 + * + * + * cpdef stream_register(intptr_t stream, unsigned flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamRegister(stream, flags) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_41stream_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_stream_register(intptr_t __pyx_v_stream, unsigned int __pyx_v_flags, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("stream_register", 0); + + /* "cuda/bindings/cufile.pyx":1216 + * + * cpdef stream_register(intptr_t stream, unsigned flags): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileStreamRegister(stream, flags) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1217 + * cpdef stream_register(intptr_t stream, unsigned flags): + * with nogil: + * status = cuFileStreamRegister(stream, flags) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileStreamRegister(((void *)__pyx_v_stream), __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1217, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1216 + * + * cpdef stream_register(intptr_t stream, unsigned flags): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileStreamRegister(stream, flags) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1218 + * with nogil: + * status = cuFileStreamRegister(stream, flags) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1218, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1215 + * + * + * cpdef stream_register(intptr_t stream, unsigned flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamRegister(stream, flags) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.stream_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_41stream_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_40stream_register, "stream_register(intptr_t stream, unsigned int flags)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_41stream_register = {"stream_register", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_41stream_register, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_40stream_register}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_41stream_register(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_stream; + unsigned int __pyx_v_flags; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("stream_register (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,&__pyx_mstate_global->__pyx_n_u_flags,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1215, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1215, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1215, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "stream_register", 0) < (0)) __PYX_ERR(0, 1215, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("stream_register", 1, 2, 2, i); __PYX_ERR(0, 1215, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1215, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1215, __pyx_L3_error) + } + __pyx_v_stream = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_stream == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L3_error) + __pyx_v_flags = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_flags == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1215, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("stream_register", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1215, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.stream_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_40stream_register(__pyx_self, __pyx_v_stream, __pyx_v_flags); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_40stream_register(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_stream, unsigned int __pyx_v_flags) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("stream_register", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_stream_register(__pyx_v_stream, __pyx_v_flags, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.stream_register", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1221 + * + * + * cpdef stream_deregister(intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamDeregister(stream) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_43stream_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_stream_deregister(intptr_t __pyx_v_stream, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("stream_deregister", 0); + + /* "cuda/bindings/cufile.pyx":1222 + * + * cpdef stream_deregister(intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileStreamDeregister(stream) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1223 + * cpdef stream_deregister(intptr_t stream): + * with nogil: + * status = cuFileStreamDeregister(stream) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileStreamDeregister(((void *)__pyx_v_stream)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1223, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1222 + * + * cpdef stream_deregister(intptr_t stream): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileStreamDeregister(stream) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1224 + * with nogil: + * status = cuFileStreamDeregister(stream) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1224, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1221 + * + * + * cpdef stream_deregister(intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamDeregister(stream) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.stream_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_43stream_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_42stream_deregister, "stream_deregister(intptr_t stream)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_43stream_deregister = {"stream_deregister", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_43stream_deregister, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_42stream_deregister}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_43stream_deregister(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_stream; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("stream_deregister (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1221, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "stream_deregister", 0) < (0)) __PYX_ERR(0, 1221, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("stream_deregister", 1, 1, 1, i); __PYX_ERR(0, 1221, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1221, __pyx_L3_error) + } + __pyx_v_stream = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_stream == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1221, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("stream_deregister", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1221, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.stream_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_42stream_deregister(__pyx_self, __pyx_v_stream); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_42stream_deregister(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_stream) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("stream_deregister", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_stream_deregister(__pyx_v_stream, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.stream_deregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1227 + * + * + * cpdef int get_version() except? 0: # <<<<<<<<<<<<<< + * cdef int version + * with nogil: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_45get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static int __pyx_f_4cuda_8bindings_6cufile_get_version(CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_version; + CUfileError_t __pyx_v_status; + int __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1229 + * cpdef int get_version() except? 0: + * cdef int version + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetVersion(&version) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1230 + * cdef int version + * with nogil: + * status = cuFileGetVersion(&version) # <<<<<<<<<<<<<< + * check_status(status) + * return version +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileGetVersion((&__pyx_v_version)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1230, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1229 + * cpdef int get_version() except? 0: + * cdef int version + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetVersion(&version) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1231 + * with nogil: + * status = cuFileGetVersion(&version) + * check_status(status) # <<<<<<<<<<<<<< + * return version + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1231, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1232 + * status = cuFileGetVersion(&version) + * check_status(status) + * return version # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_version; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1227 + * + * + * cpdef int get_version() except? 0: # <<<<<<<<<<<<<< + * cdef int version + * with nogil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.get_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_45get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_44get_version, "get_version() -> int"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_45get_version = {"get_version", (PyCFunction)__pyx_pw_4cuda_8bindings_6cufile_45get_version, METH_NOARGS, __pyx_doc_4cuda_8bindings_6cufile_44get_version}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_45get_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_version (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_44get_version(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_44get_version(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_version", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_get_version(1); if (unlikely(__pyx_t_1 == ((int)0) && PyErr_Occurred())) __PYX_ERR(0, 1227, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.get_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1235 + * + * + * cpdef size_t get_parameter_size_t(int param) except? 0: # <<<<<<<<<<<<<< + * cdef size_t value + * with nogil: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_47get_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_6cufile_get_parameter_size_t(int __pyx_v_param, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_value; + CUfileError_t __pyx_v_status; + size_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1237 + * cpdef size_t get_parameter_size_t(int param) except? 0: + * cdef size_t value + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1238 + * cdef size_t value + * with nogil: + * status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) # <<<<<<<<<<<<<< + * check_status(status) + * return value +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterSizeT(((__pyx_t_4cuda_8bindings_6cufile__SizeTConfigParameter)__pyx_v_param), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1238, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1237 + * cpdef size_t get_parameter_size_t(int param) except? 0: + * cdef size_t value + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1239 + * with nogil: + * status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) + * check_status(status) # <<<<<<<<<<<<<< + * return value + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1239, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1240 + * status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) + * check_status(status) + * return value # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_value; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1235 + * + * + * cpdef size_t get_parameter_size_t(int param) except? 0: # <<<<<<<<<<<<<< + * cdef size_t value + * with nogil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_47get_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_46get_parameter_size_t, "get_parameter_size_t(int param) -> size_t"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_47get_parameter_size_t = {"get_parameter_size_t", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_47get_parameter_size_t, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_46get_parameter_size_t}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_47get_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_parameter_size_t (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1235, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_parameter_size_t", 0) < (0)) __PYX_ERR(0, 1235, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_parameter_size_t", 1, 1, 1, i); __PYX_ERR(0, 1235, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1235, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1235, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_parameter_size_t", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1235, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_46get_parameter_size_t(__pyx_self, __pyx_v_param); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_46get_parameter_size_t(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_parameter_size_t", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_get_parameter_size_t(__pyx_v_param, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1243 + * + * + * cpdef bint get_parameter_bool(int param) except? 0: # <<<<<<<<<<<<<< + * cdef cpp_bool value + * with nogil: +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_49get_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static int __pyx_f_4cuda_8bindings_6cufile_get_parameter_bool(int __pyx_v_param, CYTHON_UNUSED int __pyx_skip_dispatch) { + bool __pyx_v_value; + CUfileError_t __pyx_v_status; + int __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/cufile.pyx":1245 + * cpdef bint get_parameter_bool(int param) except? 0: + * cdef cpp_bool value + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1246 + * cdef cpp_bool value + * with nogil: + * status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) # <<<<<<<<<<<<<< + * check_status(status) + * return value +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterBool(((__pyx_t_4cuda_8bindings_6cufile__BoolConfigParameter)__pyx_v_param), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1246, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1245 + * cpdef bint get_parameter_bool(int param) except? 0: + * cdef cpp_bool value + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1247 + * with nogil: + * status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) + * check_status(status) # <<<<<<<<<<<<<< + * return value + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1247, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1248 + * status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) + * check_status(status) + * return value # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = (__pyx_v_value != 0); + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1243 + * + * + * cpdef bint get_parameter_bool(int param) except? 0: # <<<<<<<<<<<<<< + * cdef cpp_bool value + * with nogil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_49get_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_48get_parameter_bool, "get_parameter_bool(int param) -> bool"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_49get_parameter_bool = {"get_parameter_bool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_49get_parameter_bool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_48get_parameter_bool}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_49get_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_parameter_bool (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1243, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1243, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_parameter_bool", 0) < (0)) __PYX_ERR(0, 1243, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_parameter_bool", 1, 1, 1, i); __PYX_ERR(0, 1243, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1243, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_parameter_bool", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1243, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_48get_parameter_bool(__pyx_self, __pyx_v_param); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_48get_parameter_bool(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_parameter_bool", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_get_parameter_bool(__pyx_v_param, 1); if (unlikely(__pyx_t_1 == ((int)0) && PyErr_Occurred())) __PYX_ERR(0, 1243, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1251 + * + * + * cpdef str get_parameter_string(int param, int len): # <<<<<<<<<<<<<< + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_51get_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_get_parameter_string(int __pyx_v_param, int __pyx_v_len, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v__desc_str_ = 0; + char *__pyx_v_desc_str; + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + char *__pyx_t_6; + CUfileError_t __pyx_t_7; + int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_parameter_string", 0); + + /* "cuda/bindings/cufile.pyx":1252 + * + * cpdef str get_parameter_string(int param, int len): + * cdef bytes _desc_str_ = bytes(len) # <<<<<<<<<<<<<< + * cdef char* desc_str = _desc_str_ + * with nogil: +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF((PyObject *)(&PyBytes_Type)); + __pyx_t_3 = ((PyObject *)(&PyBytes_Type)); + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v__desc_str_ = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":1253 + * cpdef str get_parameter_string(int param, int len): + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) +*/ + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v__desc_str_); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_v_desc_str = __pyx_t_6; + + /* "cuda/bindings/cufile.pyx":1254 + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1255 + * cdef char* desc_str = _desc_str_ + * with nogil: + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) # <<<<<<<<<<<<<< + * check_status(status) + * return _desc_str_.decode() +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterString(((__pyx_t_4cuda_8bindings_6cufile__StringConfigParameter)__pyx_v_param), __pyx_v_desc_str, __pyx_v_len); if (unlikely(__pyx_t_7 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1255, __pyx_L4_error) + __pyx_v_status = __pyx_t_7; + } + + /* "cuda/bindings/cufile.pyx":1254 + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1256 + * with nogil: + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) + * check_status(status) # <<<<<<<<<<<<<< + * return _desc_str_.decode() + * +*/ + __pyx_t_8 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_8 == ((int)1))) __PYX_ERR(0, 1256, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1257 + * status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) + * check_status(status) + * return _desc_str_.decode() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v__desc_str_, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1251 + * + * + * cpdef str get_parameter_string(int param, int len): # <<<<<<<<<<<<<< + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__desc_str_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_51get_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_50get_parameter_string, "get_parameter_string(int param, int len) -> str"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_51get_parameter_string = {"get_parameter_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_51get_parameter_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_50get_parameter_string}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_51get_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + int __pyx_v_len; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_parameter_string (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_len,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1251, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1251, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1251, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_parameter_string", 0) < (0)) __PYX_ERR(0, 1251, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_parameter_string", 1, 2, 2, i); __PYX_ERR(0, 1251, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1251, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1251, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L3_error) + __pyx_v_len = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_parameter_string", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1251, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_50get_parameter_string(__pyx_self, __pyx_v_param, __pyx_v_len); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_50get_parameter_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, int __pyx_v_len) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_parameter_string", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_get_parameter_string(__pyx_v_param, __pyx_v_len, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.get_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1260 + * + * + * cpdef set_parameter_size_t(int param, size_t value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_53set_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_size_t(int __pyx_v_param, size_t __pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_size_t", 0); + + /* "cuda/bindings/cufile.pyx":1261 + * + * cpdef set_parameter_size_t(int param, size_t value): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1262 + * cpdef set_parameter_size_t(int param, size_t value): + * with nogil: + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterSizeT(((__pyx_t_4cuda_8bindings_6cufile__SizeTConfigParameter)__pyx_v_param), __pyx_v_value); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1262, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1261 + * + * cpdef set_parameter_size_t(int param, size_t value): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1263 + * with nogil: + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1263, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1260 + * + * + * cpdef set_parameter_size_t(int param, size_t value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_53set_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_52set_parameter_size_t, "set_parameter_size_t(int param, size_t value)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_53set_parameter_size_t = {"set_parameter_size_t", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_53set_parameter_size_t, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_52set_parameter_size_t}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_53set_parameter_size_t(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + size_t __pyx_v_value; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_parameter_size_t (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1260, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1260, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1260, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_parameter_size_t", 0) < (0)) __PYX_ERR(0, 1260, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_parameter_size_t", 1, 2, 2, i); __PYX_ERR(0, 1260, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1260, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1260, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error) + __pyx_v_value = __Pyx_PyLong_As_size_t(values[1]); if (unlikely((__pyx_v_value == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1260, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set_parameter_size_t", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1260, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_52set_parameter_size_t(__pyx_self, __pyx_v_param, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_52set_parameter_size_t(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, size_t __pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_size_t", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_set_parameter_size_t(__pyx_v_param, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_size_t", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1266 + * + * + * cpdef set_parameter_bool(int param, bint value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_55set_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_bool(int __pyx_v_param, int __pyx_v_value, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_bool", 0); + + /* "cuda/bindings/cufile.pyx":1267 + * + * cpdef set_parameter_bool(int param, bint value): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1268 + * cpdef set_parameter_bool(int param, bint value): + * with nogil: + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterBool(((__pyx_t_4cuda_8bindings_6cufile__BoolConfigParameter)__pyx_v_param), ((bool)__pyx_v_value)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1268, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1267 + * + * cpdef set_parameter_bool(int param, bint value): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1269 + * with nogil: + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1269, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1266 + * + * + * cpdef set_parameter_bool(int param, bint value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_55set_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_54set_parameter_bool, "set_parameter_bool(int param, bool value)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_55set_parameter_bool = {"set_parameter_bool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_55set_parameter_bool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_54set_parameter_bool}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_55set_parameter_bool(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + int __pyx_v_value; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_parameter_bool (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1266, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1266, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_parameter_bool", 0) < (0)) __PYX_ERR(0, 1266, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_parameter_bool", 1, 2, 2, i); __PYX_ERR(0, 1266, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1266, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1266, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L3_error) + __pyx_v_value = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set_parameter_bool", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1266, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_54set_parameter_bool(__pyx_self, __pyx_v_param, __pyx_v_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_54set_parameter_bool(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, int __pyx_v_value) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_bool", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_set_parameter_bool(__pyx_v_param, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_bool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1272 + * + * + * cpdef set_parameter_string(int param, intptr_t desc_str): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_57set_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_set_parameter_string(int __pyx_v_param, intptr_t __pyx_v_desc_str, CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_string", 0); + + /* "cuda/bindings/cufile.pyx":1273 + * + * cpdef set_parameter_string(int param, intptr_t desc_str): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1274 + * cpdef set_parameter_string(int param, intptr_t desc_str): + * with nogil: + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterString(((__pyx_t_4cuda_8bindings_6cufile__StringConfigParameter)__pyx_v_param), ((char const *)__pyx_v_desc_str)); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1274, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1273 + * + * cpdef set_parameter_string(int param, intptr_t desc_str): + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1275 + * with nogil: + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1275, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1272 + * + * + * cpdef set_parameter_string(int param, intptr_t desc_str): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_57set_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_56set_parameter_string, "set_parameter_string(int param, intptr_t desc_str)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_57set_parameter_string = {"set_parameter_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_57set_parameter_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_56set_parameter_string}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_57set_parameter_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_param; + intptr_t __pyx_v_desc_str; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_parameter_string (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_param,&__pyx_mstate_global->__pyx_n_u_desc_str,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1272, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_parameter_string", 0) < (0)) __PYX_ERR(0, 1272, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_parameter_string", 1, 2, 2, i); __PYX_ERR(0, 1272, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error) + } + __pyx_v_param = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_param == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L3_error) + __pyx_v_desc_str = PyLong_AsSsize_t(values[1]); if (unlikely((__pyx_v_desc_str == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("set_parameter_string", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1272, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_56set_parameter_string(__pyx_self, __pyx_v_param, __pyx_v_desc_str); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_56set_parameter_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_param, intptr_t __pyx_v_desc_str) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("set_parameter_string", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_set_parameter_string(__pyx_v_param, __pyx_v_desc_str, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.set_parameter_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1278 + * + * + * cpdef str op_status_error(int status): # <<<<<<<<<<<<<< + * """cufileop status string. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_59op_status_error(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_op_status_error(int __pyx_v_status, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v__output_ = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("op_status_error", 0); + + /* "cuda/bindings/cufile.pyx":1287 + * """ + * cdef bytes _output_ + * _output_ = cufileop_status_error(<_OpError>status) # <<<<<<<<<<<<<< + * return _output_.decode() + * +*/ + __pyx_t_1 = __Pyx_PyBytes_FromString(cufileop_status_error(((__pyx_t_4cuda_8bindings_6cufile__OpError)__pyx_v_status))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__output_ = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/cufile.pyx":1288 + * cdef bytes _output_ + * _output_ = cufileop_status_error(<_OpError>status) + * return _output_.decode() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v__output_, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/cufile.pyx":1278 + * + * + * cpdef str op_status_error(int status): # <<<<<<<<<<<<<< + * """cufileop status string. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.op_status_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__output_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_59op_status_error(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_58op_status_error, "op_status_error(int status) -> str\n\ncufileop status string.\n\nArgs:\n status (OpError): the error status to query.\n\n.. seealso:: `cufileop_status_error`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_59op_status_error = {"op_status_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_59op_status_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_58op_status_error}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_59op_status_error(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_status; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("op_status_error (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_status,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1278, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1278, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "op_status_error", 0) < (0)) __PYX_ERR(0, 1278, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("op_status_error", 1, 1, 1, i); __PYX_ERR(0, 1278, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1278, __pyx_L3_error) + } + __pyx_v_status = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1278, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("op_status_error", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1278, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.op_status_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_58op_status_error(__pyx_self, __pyx_v_status); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_58op_status_error(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_status) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("op_status_error", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_op_status_error(__pyx_v_status, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.op_status_error", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/cufile.pyx":1291 + * + * + * cpdef driver_close(): # <<<<<<<<<<<<<< + * """reset the cuFile library and release the nvidia-fs driver + * """ +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_61driver_close(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_6cufile_driver_close(CYTHON_UNUSED int __pyx_skip_dispatch) { + CUfileError_t __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + CUfileError_t __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_close", 0); + + /* "cuda/bindings/cufile.pyx":1294 + * """reset the cuFile library and release the nvidia-fs driver + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverClose_v2() + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/cufile.pyx":1295 + * """ + * with nogil: + * status = cuFileDriverClose_v2() # <<<<<<<<<<<<<< + * check_status(status) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose_v2(); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1295, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/cufile.pyx":1294 + * """reset the cuFile library and release the nvidia-fs driver + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = cuFileDriverClose_v2() + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cufile.pyx":1296 + * with nogil: + * status = cuFileDriverClose_v2() + * check_status(status) # <<<<<<<<<<<<<< +*/ + __pyx_t_2 = __pyx_fuse_0__pyx_f_4cuda_8bindings_6cufile_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 1296, __pyx_L1_error) + + /* "cuda/bindings/cufile.pyx":1291 + * + * + * cpdef driver_close(): # <<<<<<<<<<<<<< + * """reset the cuFile library and release the nvidia-fs driver + * """ +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.cufile.driver_close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_61driver_close(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_60driver_close, "driver_close()\n\nreset the cuFile library and release the nvidia-fs driver\n "); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_61driver_close = {"driver_close", (PyCFunction)__pyx_pw_4cuda_8bindings_6cufile_61driver_close, METH_NOARGS, __pyx_doc_4cuda_8bindings_6cufile_60driver_close}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_61driver_close(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("driver_close (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_60driver_close(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_60driver_close(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("driver_close", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile_driver_close(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.cufile.driver_close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod1(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_63__pyx_unpickle__py_anon_pod1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_62__pyx_unpickle__py_anon_pod1, "__pyx_unpickle__py_anon_pod1(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_63__pyx_unpickle__py_anon_pod1 = {"__pyx_unpickle__py_anon_pod1", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_63__pyx_unpickle__py_anon_pod1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_62__pyx_unpickle__py_anon_pod1}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_63__pyx_unpickle__py_anon_pod1(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod1 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__py_anon_pod1", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod1", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod1", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_62__pyx_unpickle__py_anon_pod1(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_62__pyx_unpickle__py_anon_pod1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod1", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod1__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod1.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod1(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod1__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod1__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod1__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_65__pyx_unpickle__py_anon_pod3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_64__pyx_unpickle__py_anon_pod3, "__pyx_unpickle__py_anon_pod3(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_65__pyx_unpickle__py_anon_pod3 = {"__pyx_unpickle__py_anon_pod3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_65__pyx_unpickle__py_anon_pod3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_64__pyx_unpickle__py_anon_pod3}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_65__pyx_unpickle__py_anon_pod3(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod3 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__py_anon_pod3", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod3", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod3", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_64__pyx_unpickle__py_anon_pod3(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_64__pyx_unpickle__py_anon_pod3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod3", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod3__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = _py_anon_pod3.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod3__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod3__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod3__set_state(<_py_anon_pod3> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod3__set_state(_py_anon_pod3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod3__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_IOEvents(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_67__pyx_unpickle_IOEvents(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_66__pyx_unpickle_IOEvents, "__pyx_unpickle_IOEvents(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_67__pyx_unpickle_IOEvents = {"__pyx_unpickle_IOEvents", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_67__pyx_unpickle_IOEvents, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_66__pyx_unpickle_IOEvents}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_67__pyx_unpickle_IOEvents(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_IOEvents (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_IOEvents", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IOEvents", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IOEvents", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOEvents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_66__pyx_unpickle_IOEvents(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_66__pyx_unpickle_IOEvents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IOEvents", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOEvents.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = IOEvents.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOEvents.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOEvents.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = IOEvents.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOEvents__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOEvents.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_IOEvents(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOEvents", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOEvents__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IOEvents__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOEvents__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_Descr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_69__pyx_unpickle_Descr(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_68__pyx_unpickle_Descr, "__pyx_unpickle_Descr(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_69__pyx_unpickle_Descr = {"__pyx_unpickle_Descr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_69__pyx_unpickle_Descr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_68__pyx_unpickle_Descr}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_69__pyx_unpickle_Descr(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Descr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Descr", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Descr", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Descr", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_Descr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_68__pyx_unpickle_Descr(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_68__pyx_unpickle_Descr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Descr", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = Descr.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = Descr.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = Descr.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = Descr.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = Descr.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_Descr__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = Descr.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_Descr(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_Descr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_Descr__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_Descr *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_Descr__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_Descr__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Descr__set_state(Descr __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_Descr__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod2(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_71__pyx_unpickle__py_anon_pod2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_70__pyx_unpickle__py_anon_pod2, "__pyx_unpickle__py_anon_pod2(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_71__pyx_unpickle__py_anon_pod2 = {"__pyx_unpickle__py_anon_pod2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_71__pyx_unpickle__py_anon_pod2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_70__pyx_unpickle__py_anon_pod2}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_71__pyx_unpickle__py_anon_pod2(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod2 (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle__py_anon_pod2", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod2", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle__py_anon_pod2", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_70__pyx_unpickle__py_anon_pod2(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_70__pyx_unpickle__py_anon_pod2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod2", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xc2896e3, 0xd61fc1e, 0x05d9d22): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[2], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xc2896e3, 0xd61fc1e, 0x05d9d22): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xc2896e3, 0xd61fc1e, 0x05d9d22): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xc2896e3, 0xd61fc1e, 0x05d9d22): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod2__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xc2896e3, 0xd61fc1e, 0x05d9d22) = (_batch, _data))" % __pyx_checksum + * __pyx_result = _py_anon_pod2.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod2(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle__py_anon_pod2__set_state(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle__py_anon_pod2__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[2]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_batch); + __Pyx_DECREF(__pyx_v___pyx_result->_batch); + __pyx_v___pyx_result->_batch = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[2]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 2); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[2]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle__py_anon_pod2__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_IOParams(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_73__pyx_unpickle_IOParams(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_6cufile_72__pyx_unpickle_IOParams, "__pyx_unpickle_IOParams(__pyx_type, long __pyx_checksum, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_6cufile_73__pyx_unpickle_IOParams = {"__pyx_unpickle_IOParams", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_73__pyx_unpickle_IOParams, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_72__pyx_unpickle_IOParams}; +static PyObject *__pyx_pw_4cuda_8bindings_6cufile_73__pyx_unpickle_IOParams(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_IOParams (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 1, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_IOParams", 0) < (0)) __PYX_ERR(2, 1, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IOParams", 1, 3, 3, i); __PYX_ERR(2, 1, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 1, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 1, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 1, __pyx_L3_error) + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_IOParams", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_6cufile_72__pyx_unpickle_IOParams(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_6cufile_72__pyx_unpickle_IOParams(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IOParams", 0); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOParams.__new__(__pyx_type) +*/ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_PickleError); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_PickleError); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_n_u_PickleError) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __pyx_v___pyx_PickleError = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum # <<<<<<<<<<<<<< + * __pyx_result = IOParams.__new__(__pyx_type) + * if __pyx_state is not None: +*/ + __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOParams.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) +*/ + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v___pyx_result = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOParams.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + __pyx_t_2 = (__pyx_v___pyx_state != Py_None); + if (__pyx_t_2) { + + /* "(tree fragment)":9 + * __pyx_result = IOParams.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): +*/ + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOParams__set_state(((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum + * __pyx_result = IOParams.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) + * return __pyx_result +*/ + } + + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_IOParams(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + +static PyObject *__pyx_f_4cuda_8bindings_6cufile___pyx_unpickle_IOParams__set_state(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_unpickle_IOParams__set_state", 0); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_data); + __Pyx_DECREF(__pyx_v___pyx_result->_data); + __pyx_v___pyx_result->_data = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) + } + __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_3 > 1); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_2 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { + + /* "(tree fragment)":14 + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __pyx_t_6; + __Pyx_INCREF(__pyx_t_5); + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) +*/ + } + + /* "(tree fragment)":11 + * __pyx_unpickle_IOParams__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IOParams__set_state(IOParams __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.cufile.__pyx_unpickle_IOParams__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)o); + p->_data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod1(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod1) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod1(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod1(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1 *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod1(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_9__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod1(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_7__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_7__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_fd(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod1_fd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_2fd_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod1_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_6handle_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5_data_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod1[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_10from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_12from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_14__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod1_16__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod1[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"fd", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_fd, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod1_fd, PyDoc_STR("int: "), 0}, + {"handle", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1_handle, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod1_handle, PyDoc_STR("int: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod1__data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile__py_anon_pod1_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5__int__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_doc, (void *)PyDoc_STR("_py_anon_pod1()\n\nEmpty-initialize an instance of `_anon_pod1`.\n\n\n.. seealso:: `_anon_pod1`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod1}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile__py_anon_pod1_spec = { + "cuda.bindings.cufile._py_anon_pod1", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile__py_anon_pod1_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number__py_anon_pod1 = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping__py_anon_pod1 = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod1, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile__py_anon_pod1 = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""_py_anon_pod1", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod1), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number__py_anon_pod1, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + &__pyx_tp_as_mapping__py_anon_pod1, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("_py_anon_pod1()\n\nEmpty-initialize an instance of `_anon_pod1`.\n\n\n.. seealso:: `_anon_pod1`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod1_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod1, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)o); + p->_data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod3(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod3) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod3(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod3(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3 *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod3(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_9__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod3(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_7__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_7__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_base(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_base(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_12dev_ptr_base_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_file_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_file_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11file_offset_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_offset(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_offset(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_14dev_ptr_offset_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_size_(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_size_(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5size__3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5_data_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod3[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_10from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_12from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_14__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod3_16__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod3[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"dev_ptr_base", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_base, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_base, PyDoc_STR("int: "), 0}, + {"file_offset", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_file_offset, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_file_offset, PyDoc_STR("int: "), 0}, + {"dev_ptr_offset", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_offset, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_dev_ptr_offset, PyDoc_STR("int: "), 0}, + {"size_", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3_size_, __pyx_setprop_4cuda_8bindings_6cufile_13_py_anon_pod3_size_, PyDoc_STR("int: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod3__data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile__py_anon_pod3_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5__int__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_doc, (void *)PyDoc_STR("_py_anon_pod3()\n\nEmpty-initialize an instance of `_anon_pod3`.\n\n\n.. seealso:: `_anon_pod3`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod3}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile__py_anon_pod3_spec = { + "cuda.bindings.cufile._py_anon_pod3", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile__py_anon_pod3_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number__py_anon_pod3 = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping__py_anon_pod3 = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod3, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile__py_anon_pod3 = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""_py_anon_pod3", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod3), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number__py_anon_pod3, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + &__pyx_tp_as_mapping__py_anon_pod3, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("_py_anon_pod3()\n\nEmpty-initialize an instance of `_anon_pod3`.\n\n\n.. seealso:: `_anon_pod3`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod3_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod3, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_IOEvents(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)o); + p->_data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOEvents(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOEvents) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile_IOEvents(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile_IOEvents(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_sq_item_4cuda_8bindings_6cufile_IOEvents(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOEvents(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_13__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile_IOEvents(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_9__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_9__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_cookie(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_cookie(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6cookie_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_status(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_status(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_6status_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_ret(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_ret(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3ret_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOEvents__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5_data_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile_IOEvents[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_14from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_16from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_18__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOEvents_20__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile_IOEvents[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"cookie", __pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_cookie, __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_cookie, PyDoc_STR("Union[~_numpy.intp, int]: "), 0}, + {"status", __pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_status, __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_status, PyDoc_STR("Union[~_numpy.int32, int]: "), 0}, + {"ret", __pyx_getprop_4cuda_8bindings_6cufile_8IOEvents_ret, __pyx_setprop_4cuda_8bindings_6cufile_8IOEvents_ret, PyDoc_STR("Union[~_numpy.uint64, int]: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_8IOEvents__data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile_IOEvents_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5__int__}, + {Py_sq_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__}, + {Py_sq_item, (void *)__pyx_sq_item_4cuda_8bindings_6cufile_IOEvents}, + {Py_mp_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__}, + {Py_mp_subscript, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_11__getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_doc, (void *)PyDoc_STR("IOEvents(size=1)\n\nEmpty-initialize an array of `CUfileIOEvents_t`.\n\nThe resulting object is of length `size` and of dtype `io_events_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileIOEvents_t`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile_IOEvents}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOEvents_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile_IOEvents}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile_IOEvents_spec = { + "cuda.bindings.cufile.IOEvents", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile_IOEvents_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number_IOEvents = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PySequenceMethods __pyx_tp_as_sequence_IOEvents = { + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cuda_8bindings_6cufile_IOEvents, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_IOEvents = { + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_7__len__, /*mp_length*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_11__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOEvents, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile_IOEvents = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""IOEvents", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_IOEvents), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOEvents, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number_IOEvents, /*tp_as_number*/ + &__pyx_tp_as_sequence_IOEvents, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_IOEvents, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("IOEvents(size=1)\n\nEmpty-initialize an array of `CUfileIOEvents_t`.\n\nThe resulting object is of length `size` and of dtype `io_events_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileIOEvents_t`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile_IOEvents, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile_IOEvents, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile_IOEvents, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile_IOEvents, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile_IOEvents, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_8IOEvents_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile_IOEvents, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_Descr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)o); + p->_data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile_Descr(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *p = (struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile_Descr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile_Descr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *p = (struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile_Descr(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile_Descr *p = (struct __pyx_obj_4cuda_8bindings_6cufile_Descr *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_sq_item_4cuda_8bindings_6cufile_Descr(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_Descr(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_13__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile_Descr(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_9__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_5Descr_9__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_5Descr_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_5Descr_type(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_5Descr_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_4type_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_5Descr_handle(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_5Descr_handle(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_6handle_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_5Descr_fs_ops(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_5Descr_fs_ops(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_6fs_ops_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_5Descr__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_5Descr_5_data_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile_Descr[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_14from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_16from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_18__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_5Descr_20__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile_Descr[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_5Descr_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"type", __pyx_getprop_4cuda_8bindings_6cufile_5Descr_type, __pyx_setprop_4cuda_8bindings_6cufile_5Descr_type, PyDoc_STR("Union[~_numpy.int32, int]: "), 0}, + {"handle", __pyx_getprop_4cuda_8bindings_6cufile_5Descr_handle, __pyx_setprop_4cuda_8bindings_6cufile_5Descr_handle, PyDoc_STR("_py_anon_pod1_dtype: "), 0}, + {"fs_ops", __pyx_getprop_4cuda_8bindings_6cufile_5Descr_fs_ops, __pyx_setprop_4cuda_8bindings_6cufile_5Descr_fs_ops, PyDoc_STR("Union[~_numpy.intp, int]: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_5Descr__data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile_Descr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile_Descr}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_5__int__}, + {Py_sq_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__}, + {Py_sq_item, (void *)__pyx_sq_item_4cuda_8bindings_6cufile_Descr}, + {Py_mp_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__}, + {Py_mp_subscript, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_11__getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile_Descr}, + {Py_tp_doc, (void *)PyDoc_STR("Descr(size=1)\n\nEmpty-initialize an array of `CUfileDescr_t`.\n\nThe resulting object is of length `size` and of dtype `descr_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileDescr_t`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile_Descr}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile_Descr}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile_Descr}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile_Descr}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile_Descr}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_5Descr_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile_Descr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile_Descr_spec = { + "cuda.bindings.cufile.Descr", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_Descr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile_Descr_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number_Descr = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_5Descr_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PySequenceMethods __pyx_tp_as_sequence_Descr = { + __pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cuda_8bindings_6cufile_Descr, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_Descr = { + __pyx_pw_4cuda_8bindings_6cufile_5Descr_7__len__, /*mp_length*/ + __pyx_pw_4cuda_8bindings_6cufile_5Descr_11__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_Descr, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile_Descr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""Descr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_Descr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile_Descr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_5Descr_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number_Descr, /*tp_as_number*/ + &__pyx_tp_as_sequence_Descr, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Descr, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Descr(size=1)\n\nEmpty-initialize an array of `CUfileDescr_t`.\n\nThe resulting object is of length `size` and of dtype `descr_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileDescr_t`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile_Descr, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile_Descr, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile_Descr, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile_Descr, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile_Descr, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_5Descr_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile_Descr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)o); + p->_data = Py_None; Py_INCREF(Py_None); + p->_batch = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod2(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod2) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + Py_CLEAR(p->_batch); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod2(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + if (p->_batch) { + e = (*v)(p->_batch, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod2(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *p = (struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2 *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_batch); + p->_batch = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod2(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_9__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod2(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_7__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_7__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2_batch(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5batch_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5_data_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2__batch(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_6_batch_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod2[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_10from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_12from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_14__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_13_py_anon_pod2_16__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod2[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"batch", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2_batch, 0, PyDoc_STR("_py_anon_pod3: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2__data, 0, 0, 0}, + {"_batch", __pyx_getprop_4cuda_8bindings_6cufile_13_py_anon_pod2__batch, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile__py_anon_pod2_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5__int__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_doc, (void *)PyDoc_STR("_py_anon_pod2()\n\nEmpty-initialize an instance of `_anon_pod2`.\n\n\n.. seealso:: `_anon_pod2`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod2}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile__py_anon_pod2_spec = { + "cuda.bindings.cufile._py_anon_pod2", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile__py_anon_pod2_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number__py_anon_pod2 = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping__py_anon_pod2 = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile__py_anon_pod2, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile__py_anon_pod2 = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""_py_anon_pod2", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile__py_anon_pod2), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number__py_anon_pod2, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + &__pyx_tp_as_mapping__py_anon_pod2, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("_py_anon_pod2()\n\nEmpty-initialize an instance of `_anon_pod2`.\n\n\n.. seealso:: `_anon_pod2`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_13_py_anon_pod2_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile__py_anon_pod2, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_6cufile_IOParams(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)o); + p->_data = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOParams(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOParams) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->_data); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_6cufile_IOParams(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_data) { + e = (*v)(p->_data, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_6cufile_IOParams(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *p = (struct __pyx_obj_4cuda_8bindings_6cufile_IOParams *)o; + tmp = ((PyObject*)p->_data); + p->_data = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_sq_item_4cuda_8bindings_6cufile_IOParams(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyLong_FromSsize_t(i); if(!x) return 0; + #if CYTHON_USE_TYPE_SLOTS || (!CYTHON_USE_TYPE_SPECS && __PYX_LIMITED_VERSION_HEX < 0x030A0000) + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + #else + r = ((binaryfunc)PyType_GetSlot(Py_TYPE(o), Py_mp_subscript))(o, x); + #endif + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOParams(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_13__setitem__(o, i, v); + } + else { + __Pyx_TypeName o_type_name; + o_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(o)); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name); + __Pyx_DECREF_TypeName(o_type_name); + return -1; + } +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_6cufile_IOParams(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_9__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_6cufile_8IOParams_9__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_ptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_3ptr_1__get__(o); +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_mode(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_4mode_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_u(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_u(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1u_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_fh(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_fh(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_2fh_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_opcode(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_opcode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6opcode_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams_cookie(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_1__get__(o); +} + +static int __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_cookie(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_6cookie_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cuda_8bindings_6cufile_8IOParams__data(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_6cufile_8IOParams_5_data_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_6cufile_IOParams[] = { + {"from_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_15from_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_14from_data}, + {"from_ptr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_17from_ptr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_16from_ptr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_18__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_6cufile_8IOParams_20__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_6cufile_IOParams[] = { + {"ptr", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_ptr, 0, PyDoc_STR("Get the pointer address to the data as Python :class:`int`."), 0}, + {"mode", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_mode, __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_mode, PyDoc_STR("Union[~_numpy.int32, int]: "), 0}, + {"u", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_u, __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_u, PyDoc_STR("_py_anon_pod2_dtype: "), 0}, + {"fh", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_fh, __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_fh, PyDoc_STR("Union[~_numpy.intp, int]: "), 0}, + {"opcode", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_opcode, __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_opcode, PyDoc_STR("Union[~_numpy.int32, int]: "), 0}, + {"cookie", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams_cookie, __pyx_setprop_4cuda_8bindings_6cufile_8IOParams_cookie, PyDoc_STR("Union[~_numpy.intp, int]: "), 0}, + {"_data", __pyx_getprop_4cuda_8bindings_6cufile_8IOParams__data, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_6cufile_IOParams_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_3__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_5__int__}, + {Py_sq_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__}, + {Py_sq_item, (void *)__pyx_sq_item_4cuda_8bindings_6cufile_IOParams}, + {Py_mp_length, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__}, + {Py_mp_subscript, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_11__getitem__}, + {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_doc, (void *)PyDoc_STR("IOParams(size=1)\n\nEmpty-initialize an array of `CUfileIOParams_t`.\n\nThe resulting object is of length `size` and of dtype `io_params_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileIOParams_t`")}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_6cufile_IOParams}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_6cufile_8IOParams_1__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_6cufile_IOParams}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_6cufile_IOParams_spec = { + "cuda.bindings.cufile.IOParams", + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_6cufile_IOParams_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number_IOParams = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_5__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PySequenceMethods __pyx_tp_as_sequence_IOParams = { + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cuda_8bindings_6cufile_IOParams, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_IOParams = { + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_7__len__, /*mp_length*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_11__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cuda_8bindings_6cufile_IOParams, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_6cufile_IOParams = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.cufile.""IOParams", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_6cufile_IOParams), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_6cufile_IOParams, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_3__repr__, /*tp_repr*/ + &__pyx_tp_as_number_IOParams, /*tp_as_number*/ + &__pyx_tp_as_sequence_IOParams, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_IOParams, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("IOParams(size=1)\n\nEmpty-initialize an array of `CUfileIOParams_t`.\n\nThe resulting object is of length `size` and of dtype `io_params_dtype`.\nIf default-constructed, the instance represents a single struct.\n\nArgs:\n size (int): number of structs, default=1.\n\n\n.. seealso:: `CUfileIOParams_t`"), /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_6cufile_IOParams, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_6cufile_IOParams, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_6cufile_IOParams, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_6cufile_IOParams, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_6cufile_IOParams, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_6cufile_8IOParams_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_6cufile_IOParams, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("handle_register", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_handle_register, "intptr_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("handle_deregister", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_handle_deregister, "void (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("buf_register", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_buf_register, "PyObject *(intptr_t, size_t, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("buf_deregister", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_buf_deregister, "PyObject *(intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("read", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_read, "PyObject *(intptr_t, intptr_t, size_t, off_t, off_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("write", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_write, "PyObject *(intptr_t, intptr_t, size_t, off_t, off_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_open", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_open, "PyObject *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("use_count", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_use_count, "PyObject *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_get_properties", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_get_properties, "PyObject *(intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_set_poll_mode", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_set_poll_mode, "PyObject *(int, size_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_set_max_direct_io_size", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_set_max_direct_io_size, "PyObject *(size_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_set_max_cache_size", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_set_max_cache_size, "PyObject *(size_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("driver_set_max_pinned_mem_size", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_driver_set_max_pinned_mem_size, "PyObject *(size_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("batch_io_set_up", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_batch_io_set_up, "intptr_t (unsigned int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("batch_io_submit", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_batch_io_submit, "PyObject *(intptr_t, unsigned int, intptr_t, unsigned int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("batch_io_get_status", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_batch_io_get_status, "PyObject *(intptr_t, unsigned int, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("batch_io_cancel", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_batch_io_cancel, "PyObject *(intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("batch_io_destroy", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_batch_io_destroy, "void (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("read_async", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_read_async, "PyObject *(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("write_async", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_write_async, "PyObject *(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("stream_register", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_stream_register, "PyObject *(intptr_t, unsigned int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("stream_deregister", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_stream_deregister, "PyObject *(intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_version", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_get_version, "int (int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_parameter_size_t", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_get_parameter_size_t, "size_t (int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_parameter_bool", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_get_parameter_bool, "int (int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_parameter_string", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_get_parameter_string, "PyObject *(int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("set_parameter_size_t", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_set_parameter_size_t, "PyObject *(int, size_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("set_parameter_bool", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_set_parameter_bool, "PyObject *(int, int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("set_parameter_string", (void (*)(void))__pyx_f_4cuda_8bindings_6cufile_set_parameter_string, "PyObject *(int, intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1)) __PYX_ERR(0, 34, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1 = &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod1; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_py_anon_pod1, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3)) __PYX_ERR(0, 137, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3) < (0)) __PYX_ERR(0, 137, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3 = &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod3; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3) < (0)) __PYX_ERR(0, 137, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_py_anon_pod3, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3) < (0)) __PYX_ERR(0, 137, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3) < (0)) __PYX_ERR(0, 137, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile_IOEvents_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents)) __PYX_ERR(0, 257, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile_IOEvents_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents) < (0)) __PYX_ERR(0, 257, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents = &__pyx_type_4cuda_8bindings_6cufile_IOEvents; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents) < (0)) __PYX_ERR(0, 257, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IOEvents, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents) < (0)) __PYX_ERR(0, 257, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents) < (0)) __PYX_ERR(0, 257, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile_Descr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr)) __PYX_ERR(0, 403, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile_Descr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr) < (0)) __PYX_ERR(0, 403, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr = &__pyx_type_4cuda_8bindings_6cufile_Descr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr) < (0)) __PYX_ERR(0, 403, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Descr, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr) < (0)) __PYX_ERR(0, 403, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_Descr) < (0)) __PYX_ERR(0, 403, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2)) __PYX_ERR(0, 548, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2) < (0)) __PYX_ERR(0, 548, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2 = &__pyx_type_4cuda_8bindings_6cufile__py_anon_pod2; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2) < (0)) __PYX_ERR(0, 548, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_py_anon_pod2, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2) < (0)) __PYX_ERR(0, 548, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2) < (0)) __PYX_ERR(0, 548, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_6cufile_IOParams_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams)) __PYX_ERR(0, 645, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_6cufile_IOParams_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams) < (0)) __PYX_ERR(0, 645, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams = &__pyx_type_4cuda_8bindings_6cufile_IOParams; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams) < (0)) __PYX_ERR(0, 645, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_IOParams, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams) < (0)) __PYX_ERR(0, 645, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_6cufile_IOParams) < (0)) __PYX_ERR(0, 645, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyLongObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyLongObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyLongObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyComplexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyComplexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings.cycufile"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileHandleRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleRegister, "CUfileError_t (CUfileHandle_t *, CUfileDescr_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileHandleDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleDeregister, "void (CUfileHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBufRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBufRegister, "CUfileError_t (void const *, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBufDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBufDeregister, "CUfileError_t (void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileRead", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileRead, "Py_ssize_t (CUfileHandle_t, void *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileWrite", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileWrite, "Py_ssize_t (CUfileHandle_t, void const *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverOpen", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverOpen, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverClose_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose_v2, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileUseCount", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileUseCount, "long (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverGetProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverGetProperties, "CUfileError_t (CUfileDrvProps_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverSetPollMode", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetPollMode, "CUfileError_t (bool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverSetMaxDirectIOSize", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxDirectIOSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverSetMaxCacheSize", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxCacheSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileDriverSetMaxPinnedMemSize", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxPinnedMemSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBatchIOSetUp", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSetUp, "CUfileError_t (CUfileBatchHandle_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBatchIOSubmit", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSubmit, "CUfileError_t (CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBatchIOGetStatus", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOGetStatus, "CUfileError_t (CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBatchIOCancel", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOCancel, "CUfileError_t (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileBatchIODestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIODestroy, "void (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileReadAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileReadAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileWriteAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileWriteAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileStreamRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamRegister, "CUfileError_t (CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileStreamDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamDeregister, "CUfileError_t (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileGetVersion, "CUfileError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileGetParameterSizeT", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileGetParameterBool", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileGetParameterString", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileSetParameterSizeT", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileSetParameterBool", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "cuFileSetParameterString", (void (**)(void))&__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "get_buffer_pointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer, "void *(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_0get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_1get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_2get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_3get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_4get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_5get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cufile(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cufile}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cufile", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cufile(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cufile(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cufile(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + size_t __pyx_t_11; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cufile' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cufile" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cufile", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cufile) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cufile")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cufile", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cufile.pyx":11 + * from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + * nested_resource) + * import numpy as _numpy # <<<<<<<<<<<<<< + * from cpython cimport buffer as _buffer + * from cpython.memoryview cimport PyMemoryView_FromMemory +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_numpy_2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_numpy, __pyx_t_2) < (0)) __PYX_ERR(0, 11, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":14 + * from cpython cimport buffer as _buffer + * from cpython.memoryview cimport PyMemoryView_FromMemory + * from enum import IntEnum as _IntEnum # <<<<<<<<<<<<<< + * + * import cython +*/ + __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IntEnum_2, __pyx_t_2) < (0)) __PYX_ERR(0, 14, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":18 + * import cython + * + * from cuda.bindings.driver import CUresult as pyCUresult # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_bindings_driver, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CUresult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyCUresult, __pyx_t_3) < (0)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":25 + * ############################################################################### + * + * _py_anon_pod1_dtype = _numpy.dtype(( # <<<<<<<<<<<<<< + * _numpy.dtype((_numpy.void, sizeof((NULL).handle))), + * { +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/cufile.pyx":26 + * + * _py_anon_pod1_dtype = _numpy.dtype(( + * _numpy.dtype((_numpy.void, sizeof((NULL).handle))), # <<<<<<<<<<<<<< + * { + * "fd": (_numpy.int32, 0), +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_void); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyLong_FromSize_t((sizeof(((CUfileDescr_t *)NULL)->handle))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = PyTuple_Pack(2, __pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "cuda/bindings/cufile.pyx":28 + * _numpy.dtype((_numpy.void, sizeof((NULL).handle))), + * { + * "fd": (_numpy.int32, 0), # <<<<<<<<<<<<<< + * "handle": (_numpy.intp, 0), + * } +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_Pack(2, __pyx_t_6, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fd, __pyx_t_10) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":29 + * { + * "fd": (_numpy.int32, 0), + * "handle": (_numpy.intp, 0), # <<<<<<<<<<<<<< + * } + * )) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_Pack(2, __pyx_t_6, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_handle, __pyx_t_10) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":26 + * + * _py_anon_pod1_dtype = _numpy.dtype(( + * _numpy.dtype((_numpy.void, sizeof((NULL).handle))), # <<<<<<<<<<<<<< + * { + * "fd": (_numpy.int32, 0), +*/ + __pyx_t_10 = PyTuple_Pack(2, __pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":90 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod1 instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_11from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_10 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_3, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 90, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":108 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod1 instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_13from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_10 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_3 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod1___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod1, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod1__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod1_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod1___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod1, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":129 + * + * + * _py_anon_pod3_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("dev_ptr_base", _numpy.intp, ), + * ("file_offset", _numpy.int64, ), +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/cufile.pyx":130 + * + * _py_anon_pod3_dtype = _numpy.dtype([ + * ("dev_ptr_base", _numpy.intp, ), # <<<<<<<<<<<<<< + * ("file_offset", _numpy.int64, ), + * ("dev_ptr_offset", _numpy.int64, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_dev_ptr_base, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":131 + * _py_anon_pod3_dtype = _numpy.dtype([ + * ("dev_ptr_base", _numpy.intp, ), + * ("file_offset", _numpy.int64, ), # <<<<<<<<<<<<<< + * ("dev_ptr_offset", _numpy.int64, ), + * ("size_", _numpy.uint64, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_file_offset, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/cufile.pyx":132 + * ("dev_ptr_base", _numpy.intp, ), + * ("file_offset", _numpy.int64, ), + * ("dev_ptr_offset", _numpy.int64, ), # <<<<<<<<<<<<<< + * ("size_", _numpy.uint64, ), + * ], align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_dev_ptr_offset, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":133 + * ("file_offset", _numpy.int64, ), + * ("dev_ptr_offset", _numpy.int64, ), + * ("size_", _numpy.uint64, ), # <<<<<<<<<<<<<< + * ], align=True) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uint64); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_size_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "cuda/bindings/cufile.pyx":129 + * + * + * _py_anon_pod3_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("dev_ptr_base", _numpy.intp, ), + * ("file_offset", _numpy.int64, ), +*/ + __pyx_t_7 = __Pyx_PyList_Pack(4, __pyx_t_5, __pyx_t_8, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":134 + * ("dev_ptr_offset", _numpy.int64, ), + * ("size_", _numpy.uint64, ), + * ], align=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_7}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":211 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod3 instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_11from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_10 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_6 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":229 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod3 instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_13from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_7 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_10, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod3___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod3, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod3__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod3_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod3___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod3, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":250 + * + * + * io_events_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("cookie", _numpy.intp, ), + * ("status", _numpy.int32, ), +*/ + __pyx_t_7 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":251 + * + * io_events_dtype = _numpy.dtype([ + * ("cookie", _numpy.intp, ), # <<<<<<<<<<<<<< + * ("status", _numpy.int32, ), + * ("ret", _numpy.uint64, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_cookie, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":252 + * io_events_dtype = _numpy.dtype([ + * ("cookie", _numpy.intp, ), + * ("status", _numpy.int32, ), # <<<<<<<<<<<<<< + * ("ret", _numpy.uint64, ), + * ], align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_status, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/cufile.pyx":253 + * ("cookie", _numpy.intp, ), + * ("status", _numpy.int32, ), + * ("ret", _numpy.uint64, ), # <<<<<<<<<<<<<< + * ], align=True) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_uint64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_ret, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":250 + * + * + * io_events_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("cookie", _numpy.intp, ), + * ("status", _numpy.int32, ), +*/ + __pyx_t_8 = __Pyx_PyList_Pack(3, __pyx_t_10, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/cufile.pyx":254 + * ("status", _numpy.int32, ), + * ("ret", _numpy.uint64, ), + * ], align=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_8}; + __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_io_events_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":356 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOEvents instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_15from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOEvents_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_4 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":374 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOEvents instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_17from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOEvents_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_8 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOEvents___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOEvents, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOEvents__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOEvents_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOEvents___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOEvents, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":396 + * + * + * descr_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("type", _numpy.int32, ), + * ("handle", _py_anon_pod1_dtype, ), +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":397 + * + * descr_dtype = _numpy.dtype([ + * ("type", _numpy.int32, ), # <<<<<<<<<<<<<< + * ("handle", _py_anon_pod1_dtype, ), + * ("fs_ops", _numpy.intp, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_type, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "cuda/bindings/cufile.pyx":398 + * descr_dtype = _numpy.dtype([ + * ("type", _numpy.int32, ), + * ("handle", _py_anon_pod1_dtype, ), # <<<<<<<<<<<<<< + * ("fs_ops", _numpy.intp, ), + * ], align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_handle, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "cuda/bindings/cufile.pyx":399 + * ("type", _numpy.int32, ), + * ("handle", _py_anon_pod1_dtype, ), + * ("fs_ops", _numpy.intp, ), # <<<<<<<<<<<<<< + * ], align=True) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_fs_ops, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":396 + * + * + * descr_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("type", _numpy.int32, ), + * ("handle", _py_anon_pod1_dtype, ), +*/ + __pyx_t_10 = __Pyx_PyList_Pack(3, __pyx_t_6, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "cuda/bindings/cufile.pyx":400 + * ("handle", _py_anon_pod1_dtype, ), + * ("fs_ops", _numpy.intp, ), + * ], align=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_t_10}; + __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_descr_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 396, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":500 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an Descr instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_5Descr_15from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Descr_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_7 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_10, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":518 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an Descr instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_5Descr_17from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Descr_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_10 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_4, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_5Descr_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Descr___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Descr, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Descr__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_5Descr_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Descr___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_Descr, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":540 + * + * + * _py_anon_pod2_dtype = _numpy.dtype(( # <<<<<<<<<<<<<< + * _numpy.dtype((_numpy.void, sizeof((NULL).u))), + * { +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/cufile.pyx":541 + * + * _py_anon_pod2_dtype = _numpy.dtype(( + * _numpy.dtype((_numpy.void, sizeof((NULL).u))), # <<<<<<<<<<<<<< + * { + * "batch": (_py_anon_pod3_dtype, 0), +*/ + __pyx_t_8 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_void); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(((CUfileIOParams_t *)NULL)->u))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = PyTuple_Pack(2, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + + /* "cuda/bindings/cufile.pyx":543 + * _numpy.dtype((_numpy.void, sizeof((NULL).u))), + * { + * "batch": (_py_anon_pod3_dtype, 0), # <<<<<<<<<<<<<< + * } + * )) +*/ + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_py_anon_pod3_dtype); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyTuple_Pack(2, __pyx_t_9, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_batch, __pyx_t_8) < (0)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":541 + * + * _py_anon_pod2_dtype = _numpy.dtype(( + * _numpy.dtype((_numpy.void, sizeof((NULL).u))), # <<<<<<<<<<<<<< + * { + * "batch": (_py_anon_pod3_dtype, 0), +*/ + __pyx_t_8 = PyTuple_Pack(2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 540, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":593 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an _py_anon_pod2 instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_11from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_8 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_10, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":613 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod2 instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_13from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_10 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 613, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_15__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod2___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle__py_anon_pod2, (type(self), 0xc2896e3, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle__py_anon_pod2__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13_py_anon_pod2_17__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_py_anon_pod2___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile__py_anon_pod2, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":636 + * + * + * io_params_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("mode", _numpy.int32, ), + * ("u", _py_anon_pod2_dtype, ), +*/ + __pyx_t_10 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "cuda/bindings/cufile.pyx":637 + * + * io_params_dtype = _numpy.dtype([ + * ("mode", _numpy.int32, ), # <<<<<<<<<<<<<< + * ("u", _py_anon_pod2_dtype, ), + * ("fh", _numpy.intp, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":638 + * io_params_dtype = _numpy.dtype([ + * ("mode", _numpy.int32, ), + * ("u", _py_anon_pod2_dtype, ), # <<<<<<<<<<<<<< + * ("fh", _numpy.intp, ), + * ("opcode", _numpy.int32, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_u, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":639 + * ("mode", _numpy.int32, ), + * ("u", _py_anon_pod2_dtype, ), + * ("fh", _numpy.intp, ), # <<<<<<<<<<<<<< + * ("opcode", _numpy.int32, ), + * ("cookie", _numpy.intp, ), +*/ + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_fh, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + + /* "cuda/bindings/cufile.pyx":640 + * ("u", _py_anon_pod2_dtype, ), + * ("fh", _numpy.intp, ), + * ("opcode", _numpy.int32, ), # <<<<<<<<<<<<<< + * ("cookie", _numpy.intp, ), + * ], align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_opcode, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 640, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":641 + * ("fh", _numpy.intp, ), + * ("opcode", _numpy.int32, ), + * ("cookie", _numpy.intp, ), # <<<<<<<<<<<<<< + * ], align=True) + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_cookie, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/cufile.pyx":636 + * + * + * io_params_dtype = _numpy.dtype([ # <<<<<<<<<<<<<< + * ("mode", _numpy.int32, ), + * ("u", _py_anon_pod2_dtype, ), +*/ + __pyx_t_5 = __Pyx_PyList_Pack(5, __pyx_t_7, __pyx_t_4, __pyx_t_6, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cufile.pyx":642 + * ("opcode", _numpy.int32, ), + * ("cookie", _numpy.intp, ), + * ], align=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_10, __pyx_t_5}; + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_io_params_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":764 + * self._data[key] = val + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_data(data): + * """Create an IOParams instance wrapping the given NumPy array. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOParams_15from_data, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOParams_from_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_3 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_data, __pyx_t_2) < (0)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":782 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOParams instance wrapping the given pointer. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOParams_17from_ptr, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOParams_from_ptr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_staticmethod); + __pyx_t_5 = __pyx_builtin_staticmethod; + __Pyx_GetNameInClass(__pyx_t_8, (PyObject*)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_ptr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_from_ptr, __pyx_t_2) < (0)) __PYX_ERR(0, 782, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOParams_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOParams___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_IOParams, (type(self), 0xa75e18a, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_IOParams__set_state(self, __pyx_state) +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_8IOParams_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_IOParams___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6cufile_IOParams, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":805 + * + * # Hack: Overwrite the generated descr_dtype, which NumPy deduced the offset wrong. + * descr_dtype = _numpy.dtype({ # <<<<<<<<<<<<<< + * "names": ['type', 'handle', 'fs_ops'], + * "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":806 + * # Hack: Overwrite the generated descr_dtype, which NumPy deduced the offset wrong. + * descr_dtype = _numpy.dtype({ + * "names": ['type', 'handle', 'fs_ops'], # <<<<<<<<<<<<<< + * "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], + * "offsets": [0, 8, 16], +*/ + __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_type, __pyx_mstate_global->__pyx_n_u_handle, __pyx_mstate_global->__pyx_n_u_fs_ops); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_names, __pyx_t_10) < (0)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":807 + * descr_dtype = _numpy.dtype({ + * "names": ['type', 'handle', 'fs_ops'], + * "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], # <<<<<<<<<<<<<< + * "offsets": [0, 8, 16], + * }, align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_py_anon_pod1_dtype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyList_Pack(3, __pyx_t_9, __pyx_t_10, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 807, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_formats, __pyx_t_6) < (0)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":808 + * "names": ['type', 'handle', 'fs_ops'], + * "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], + * "offsets": [0, 8, 16], # <<<<<<<<<<<<<< + * }, align=True) + * +*/ + __pyx_t_6 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_8, __pyx_mstate_global->__pyx_int_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_offsets, __pyx_t_6) < (0)) __PYX_ERR(0, 806, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":809 + * "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], + * "offsets": [0, 8, 16], + * }, align=True) # <<<<<<<<<<<<<< + * + * # Hack: Overwrite the generated io_params_dtype, which NumPy deduced the offset wrong. +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_8}; + __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_3, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_descr_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":812 + * + * # Hack: Overwrite the generated io_params_dtype, which NumPy deduced the offset wrong. + * io_params_dtype = _numpy.dtype({ # <<<<<<<<<<<<<< + * "names": ['mode', 'u', 'fh', 'opcode', 'cookie'], + * "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":813 + * # Hack: Overwrite the generated io_params_dtype, which NumPy deduced the offset wrong. + * io_params_dtype = _numpy.dtype({ + * "names": ['mode', 'u', 'fh', 'opcode', 'cookie'], # <<<<<<<<<<<<<< + * "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], + * "offsets": [0, 8, 40, 48, 56], +*/ + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_n_u_mode, __pyx_mstate_global->__pyx_n_u_u, __pyx_mstate_global->__pyx_n_u_fh, __pyx_mstate_global->__pyx_n_u_opcode, __pyx_mstate_global->__pyx_n_u_cookie); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_names, __pyx_t_5) < (0)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/cufile.pyx":814 + * io_params_dtype = _numpy.dtype({ + * "names": ['mode', 'u', 'fh', 'opcode', 'cookie'], + * "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], # <<<<<<<<<<<<<< + * "offsets": [0, 8, 40, 48, 56], + * }, align=True) +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_py_anon_pod2_dtype); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_numpy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_intp); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyList_Pack(5, __pyx_t_4, __pyx_t_5, __pyx_t_9, __pyx_t_7, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 814, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_formats, __pyx_t_10) < (0)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":815 + * "names": ['mode', 'u', 'fh', 'opcode', 'cookie'], + * "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], + * "offsets": [0, 8, 40, 48, 56], # <<<<<<<<<<<<<< + * }, align=True) + * +*/ + __pyx_t_10 = __Pyx_PyList_Pack(5, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_8, __pyx_mstate_global->__pyx_int_40, __pyx_mstate_global->__pyx_int_48, __pyx_mstate_global->__pyx_int_56); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 815, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_offsets, __pyx_t_10) < (0)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":816 + * "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], + * "offsets": [0, 8, 40, 48, 56], + * }, align=True) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_t_6}; + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_align, Py_True, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_io_params_dtype, __pyx_t_2) < (0)) __PYX_ERR(0, 812, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":823 + * ############################################################################### + * + * class OpError(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileOpError`.""" + * SUCCESS = CU_FILE_SUCCESS +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_OpError, __pyx_mstate_global->__pyx_n_u_OpError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileOpError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_t_8) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 823, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":825 + * class OpError(_IntEnum): + * """See `CUfileOpError`.""" + * SUCCESS = CU_FILE_SUCCESS # <<<<<<<<<<<<<< + * DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED + * DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_SUCCESS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SUCCESS, __pyx_t_8) < (0)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":826 + * """See `CUfileOpError`.""" + * SUCCESS = CU_FILE_SUCCESS + * DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED # <<<<<<<<<<<<<< + * DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS + * DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_NOT_INITIALIZED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_NOT_INITIALIZED, __pyx_t_8) < (0)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":827 + * SUCCESS = CU_FILE_SUCCESS + * DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED + * DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS # <<<<<<<<<<<<<< + * DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT + * DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_INVALID_PROPS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_INVALID_PROPS, __pyx_t_8) < (0)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":828 + * DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED + * DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS + * DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT # <<<<<<<<<<<<<< + * DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH + * DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_UNSUPPORTED_LIMIT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_UNSUPPORTED_LIMIT, __pyx_t_8) < (0)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":829 + * DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS + * DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT + * DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH # <<<<<<<<<<<<<< + * DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR + * DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_VERSION_MISMATCH); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 829, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_VERSION_MISMATCH, __pyx_t_8) < (0)) __PYX_ERR(0, 829, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":830 + * DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT + * DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH + * DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR # <<<<<<<<<<<<<< + * DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING + * PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_VERSION_READ_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_VERSION_READ_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":831 + * DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH + * DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR + * DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING # <<<<<<<<<<<<<< + * PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED + * IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_CLOSING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_CLOSING, __pyx_t_8) < (0)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":832 + * DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR + * DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING + * PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED # <<<<<<<<<<<<<< + * IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED + * DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_PLATFORM_NOT_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 832, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PLATFORM_NOT_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 832, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":833 + * DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING + * PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED + * IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED # <<<<<<<<<<<<<< + * DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED + * NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_IO_NOT_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IO_NOT_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":834 + * PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED + * IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED + * DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED # <<<<<<<<<<<<<< + * NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR + * CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DEVICE_NOT_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 834, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DEVICE_NOT_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 834, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":835 + * IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED + * DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED + * NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR # <<<<<<<<<<<<<< + * CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR + * CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_NVFS_DRIVER_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_NVFS_DRIVER_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 835, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":836 + * DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED + * NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR + * CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR # <<<<<<<<<<<<<< + * CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID + * CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_CUDA_DRIVER_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 836, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_DRIVER_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 836, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":837 + * NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR + * CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR + * CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID # <<<<<<<<<<<<<< + * CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID + * CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_CUDA_POINTER_INVALID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_POINTER_INVALID, __pyx_t_8) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":838 + * CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR + * CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID + * CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID # <<<<<<<<<<<<<< + * CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR + * CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_CUDA_MEMORY_TYPE_INVALID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 838, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_MEMORY_TYPE_INVALID, __pyx_t_8) < (0)) __PYX_ERR(0, 838, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":839 + * CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID + * CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID + * CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR # <<<<<<<<<<<<<< + * CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH + * INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_CUDA_POINTER_RANGE_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_POINTER_RANGE_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":840 + * CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID + * CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR + * CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH # <<<<<<<<<<<<<< + * INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE + * INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_CUDA_CONTEXT_MISMATCH); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_CONTEXT_MISMATCH, __pyx_t_8) < (0)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":841 + * CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR + * CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH + * INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE # <<<<<<<<<<<<<< + * INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE + * INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INVALID_MAPPING_SIZE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID_MAPPING_SIZE, __pyx_t_8) < (0)) __PYX_ERR(0, 841, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":842 + * CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH + * INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE + * INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE # <<<<<<<<<<<<<< + * INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE + * INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INVALID_MAPPING_RANGE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 842, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID_MAPPING_RANGE, __pyx_t_8) < (0)) __PYX_ERR(0, 842, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":843 + * INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE + * INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE + * INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE # <<<<<<<<<<<<<< + * INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG + * DIO_NOT_SET = CU_FILE_DIO_NOT_SET +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INVALID_FILE_TYPE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID_FILE_TYPE, __pyx_t_8) < (0)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":844 + * INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE + * INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE + * INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG # <<<<<<<<<<<<<< + * DIO_NOT_SET = CU_FILE_DIO_NOT_SET + * INVALID_VALUE = CU_FILE_INVALID_VALUE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INVALID_FILE_OPEN_FLAG); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID_FILE_OPEN_FLAG, __pyx_t_8) < (0)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":845 + * INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE + * INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG + * DIO_NOT_SET = CU_FILE_DIO_NOT_SET # <<<<<<<<<<<<<< + * INVALID_VALUE = CU_FILE_INVALID_VALUE + * MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DIO_NOT_SET); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DIO_NOT_SET, __pyx_t_8) < (0)) __PYX_ERR(0, 845, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":846 + * INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG + * DIO_NOT_SET = CU_FILE_DIO_NOT_SET + * INVALID_VALUE = CU_FILE_INVALID_VALUE # <<<<<<<<<<<<<< + * MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED + * MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INVALID_VALUE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID_VALUE, __pyx_t_8) < (0)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":847 + * DIO_NOT_SET = CU_FILE_DIO_NOT_SET + * INVALID_VALUE = CU_FILE_INVALID_VALUE + * MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED # <<<<<<<<<<<<<< + * MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED + * PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_MEMORY_ALREADY_REGISTERED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MEMORY_ALREADY_REGISTERED, __pyx_t_8) < (0)) __PYX_ERR(0, 847, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":848 + * INVALID_VALUE = CU_FILE_INVALID_VALUE + * MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED + * MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED # <<<<<<<<<<<<<< + * PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED + * DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_MEMORY_NOT_REGISTERED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MEMORY_NOT_REGISTERED, __pyx_t_8) < (0)) __PYX_ERR(0, 848, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":849 + * MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED + * MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED + * PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED # <<<<<<<<<<<<<< + * DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN + * HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_PERMISSION_DENIED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 849, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PERMISSION_DENIED, __pyx_t_8) < (0)) __PYX_ERR(0, 849, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":850 + * MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED + * PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED + * DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN # <<<<<<<<<<<<<< + * HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED + * HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DRIVER_ALREADY_OPEN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 850, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DRIVER_ALREADY_OPEN, __pyx_t_8) < (0)) __PYX_ERR(0, 850, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":851 + * PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED + * DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN + * HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED # <<<<<<<<<<<<<< + * HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED + * DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_HANDLE_NOT_REGISTERED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 851, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_HANDLE_NOT_REGISTERED, __pyx_t_8) < (0)) __PYX_ERR(0, 851, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":852 + * DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN + * HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED + * HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED # <<<<<<<<<<<<<< + * DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND + * INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_HANDLE_ALREADY_REGISTERED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_HANDLE_ALREADY_REGISTERED, __pyx_t_8) < (0)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":853 + * HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED + * HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED + * DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND # <<<<<<<<<<<<<< + * INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR + * GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_DEVICE_NOT_FOUND); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DEVICE_NOT_FOUND, __pyx_t_8) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":854 + * HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED + * DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND + * INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR # <<<<<<<<<<<<<< + * GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED + * NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_INTERNAL_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 854, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INTERNAL_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 854, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":855 + * DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND + * INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR + * GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED # <<<<<<<<<<<<<< + * NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR + * IO_DISABLED = CU_FILE_IO_DISABLED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_GETNEWFD_FAILED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_GETNEWFD_FAILED, __pyx_t_8) < (0)) __PYX_ERR(0, 855, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":856 + * INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR + * GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED + * NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR # <<<<<<<<<<<<<< + * IO_DISABLED = CU_FILE_IO_DISABLED + * BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_NVFS_SETUP_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_NVFS_SETUP_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 856, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":857 + * GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED + * NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR + * IO_DISABLED = CU_FILE_IO_DISABLED # <<<<<<<<<<<<<< + * BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED + * GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_IO_DISABLED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IO_DISABLED, __pyx_t_8) < (0)) __PYX_ERR(0, 857, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":858 + * NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR + * IO_DISABLED = CU_FILE_IO_DISABLED + * BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED # <<<<<<<<<<<<<< + * GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED + * BATCH_FULL = CU_FILE_BATCH_FULL +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_BATCH_SUBMIT_FAILED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BATCH_SUBMIT_FAILED, __pyx_t_8) < (0)) __PYX_ERR(0, 858, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":859 + * IO_DISABLED = CU_FILE_IO_DISABLED + * BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED + * GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED # <<<<<<<<<<<<<< + * BATCH_FULL = CU_FILE_BATCH_FULL + * ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_GPU_MEMORY_PINNING_FAILED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_GPU_MEMORY_PINNING_FAILED, __pyx_t_8) < (0)) __PYX_ERR(0, 859, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":860 + * BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED + * GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED + * BATCH_FULL = CU_FILE_BATCH_FULL # <<<<<<<<<<<<<< + * ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED + * IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_BATCH_FULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BATCH_FULL, __pyx_t_8) < (0)) __PYX_ERR(0, 860, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":861 + * GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED + * BATCH_FULL = CU_FILE_BATCH_FULL + * ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED # <<<<<<<<<<<<<< + * IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR + * +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_ASYNC_NOT_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ASYNC_NOT_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 861, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":862 + * BATCH_FULL = CU_FILE_BATCH_FULL + * ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED + * IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR # <<<<<<<<<<<<<< + * + * class DriverStatusFlags(_IntEnum): +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileOpError(CU_FILE_IO_MAX_ERROR); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IO_MAX_ERROR, __pyx_t_8) < (0)) __PYX_ERR(0, 862, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":823 + * ############################################################################### + * + * class OpError(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileOpError`.""" + * SUCCESS = CU_FILE_SUCCESS +*/ + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OpError, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_OpError, __pyx_t_8) < (0)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":864 + * IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR + * + * class DriverStatusFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileDriverStatusFlags_t`.""" + * LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_DriverStatusFlags, __pyx_mstate_global->__pyx_n_u_DriverStatusFlags, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileDriverStatusFlags_t); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 864, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":866 + * class DriverStatusFlags(_IntEnum): + * """See `CUfileDriverStatusFlags_t`.""" + * LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED # <<<<<<<<<<<<<< + * WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED + * NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_LUSTRE_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_LUSTRE_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":867 + * """See `CUfileDriverStatusFlags_t`.""" + * LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED + * WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED # <<<<<<<<<<<<<< + * NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED + * GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_WEKAFS_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_WEKAFS_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 867, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":868 + * LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED + * WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED + * NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED # <<<<<<<<<<<<<< + * GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED + * NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_NFS_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NFS_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":869 + * WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED + * NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED + * GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED # <<<<<<<<<<<<<< + * NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED + * NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_GPFS_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_GPFS_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":870 + * NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED + * GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED + * NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED # <<<<<<<<<<<<<< + * NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED + * SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_NVME_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 870, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NVME_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 870, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":871 + * GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED + * NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED + * NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED # <<<<<<<<<<<<<< + * SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED + * SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_NVMEOF_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NVMEOF_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 871, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":872 + * NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED + * NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED + * SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED # <<<<<<<<<<<<<< + * SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED + * NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_SCSI_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 872, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SCSI_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 872, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":873 + * NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED + * SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED + * SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED # <<<<<<<<<<<<<< + * NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED + * BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_SCALEFLUX_CSD_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SCALEFLUX_CSD_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 873, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":874 + * SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED + * SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED + * NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED # <<<<<<<<<<<<<< + * BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED + * NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_NVMESH_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NVMESH_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 874, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":875 + * SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED + * NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED + * BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED # <<<<<<<<<<<<<< + * NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED + * SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_BEEGFS_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_BEEGFS_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 875, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":876 + * NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED + * BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED + * NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED # <<<<<<<<<<<<<< + * SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED + * +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_NVME_P2P_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NVME_P2P_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":877 + * BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED + * NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED + * SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED # <<<<<<<<<<<<<< + * + * class DriverControlFlags(_IntEnum): +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CU_FILE_SCATEFS_SUPPORTED); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 877, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SCATEFS_SUPPORTED, __pyx_t_10) < (0)) __PYX_ERR(0, 877, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":864 + * IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR + * + * class DriverStatusFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileDriverStatusFlags_t`.""" + * LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DriverStatusFlags, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DriverStatusFlags, __pyx_t_10) < (0)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":879 + * SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED + * + * class DriverControlFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileDriverControlFlags_t`.""" + * USE_POLL_MODE = CU_FILE_USE_POLL_MODE +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_DriverControlFlags, __pyx_mstate_global->__pyx_n_u_DriverControlFlags, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileDriverControlFlags_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_2 != __pyx_t_6) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 879, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":881 + * class DriverControlFlags(_IntEnum): + * """See `CUfileDriverControlFlags_t`.""" + * USE_POLL_MODE = CU_FILE_USE_POLL_MODE # <<<<<<<<<<<<<< + * ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE + * +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUfileDriverControlFlags_t(CU_FILE_USE_POLL_MODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 881, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_USE_POLL_MODE, __pyx_t_6) < (0)) __PYX_ERR(0, 881, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":882 + * """See `CUfileDriverControlFlags_t`.""" + * USE_POLL_MODE = CU_FILE_USE_POLL_MODE + * ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE # <<<<<<<<<<<<<< + * + * class FeatureFlags(_IntEnum): +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUfileDriverControlFlags_t(CU_FILE_ALLOW_COMPAT_MODE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 882, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ALLOW_COMPAT_MODE, __pyx_t_6) < (0)) __PYX_ERR(0, 882, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":879 + * SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED + * + * class DriverControlFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileDriverControlFlags_t`.""" + * USE_POLL_MODE = CU_FILE_USE_POLL_MODE +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_DriverControlFlags, __pyx_t_2, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DriverControlFlags, __pyx_t_6) < (0)) __PYX_ERR(0, 879, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":884 + * ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE + * + * class FeatureFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileFeatureFlags_t`.""" + * DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_FeatureFlags, __pyx_mstate_global->__pyx_n_u_FeatureFlags, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileFeatureFlags_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_t_8) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 884, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":886 + * class FeatureFlags(_IntEnum): + * """See `CUfileFeatureFlags_t`.""" + * DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED # <<<<<<<<<<<<<< + * BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED + * STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileFeatureFlags_t(CU_FILE_DYN_ROUTING_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DYN_ROUTING_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 886, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":887 + * """See `CUfileFeatureFlags_t`.""" + * DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED + * BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED # <<<<<<<<<<<<<< + * STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED + * PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileFeatureFlags_t(CU_FILE_BATCH_IO_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BATCH_IO_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 887, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":888 + * DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED + * BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED + * STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED # <<<<<<<<<<<<<< + * PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED + * +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileFeatureFlags_t(CU_FILE_STREAMS_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_STREAMS_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 888, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":889 + * BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED + * STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED + * PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED # <<<<<<<<<<<<<< + * + * class FileHandleType(_IntEnum): +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileFeatureFlags_t(CU_FILE_PARALLEL_IO_SUPPORTED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PARALLEL_IO_SUPPORTED, __pyx_t_8) < (0)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":884 + * ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE + * + * class FeatureFlags(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileFeatureFlags_t`.""" + * DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED +*/ + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_FeatureFlags, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FeatureFlags, __pyx_t_8) < (0)) __PYX_ERR(0, 884, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":891 + * PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED + * + * class FileHandleType(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileFileHandleType`.""" + * OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_FileHandleType, __pyx_mstate_global->__pyx_n_u_FileHandleType, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileFileHandleType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 891, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":893 + * class FileHandleType(_IntEnum): + * """See `CUfileFileHandleType`.""" + * OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD # <<<<<<<<<<<<<< + * OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + * USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileFileHandleType(CU_FILE_HANDLE_TYPE_OPAQUE_FD); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OPAQUE_FD, __pyx_t_10) < (0)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":894 + * """See `CUfileFileHandleType`.""" + * OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD + * OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 # <<<<<<<<<<<<<< + * USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS + * +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileFileHandleType(CU_FILE_HANDLE_TYPE_OPAQUE_WIN32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_OPAQUE_WIN32, __pyx_t_10) < (0)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":895 + * OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD + * OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + * USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS # <<<<<<<<<<<<<< + * + * class Opcode(_IntEnum): +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileFileHandleType(CU_FILE_HANDLE_TYPE_USERSPACE_FS); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 895, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_USERSPACE_FS, __pyx_t_10) < (0)) __PYX_ERR(0, 895, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":891 + * PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED + * + * class FileHandleType(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileFileHandleType`.""" + * OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FileHandleType, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FileHandleType, __pyx_t_10) < (0)) __PYX_ERR(0, 891, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":897 + * USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS + * + * class Opcode(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileOpcode_t`.""" + * READ = CUFILE_READ +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Opcode, __pyx_mstate_global->__pyx_n_u_Opcode, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileOpcode_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_2 != __pyx_t_6) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 897, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":899 + * class Opcode(_IntEnum): + * """See `CUfileOpcode_t`.""" + * READ = CUFILE_READ # <<<<<<<<<<<<<< + * WRITE = CUFILE_WRITE + * +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUfileOpcode_t(CUFILE_READ); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_READ, __pyx_t_6) < (0)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":900 + * """See `CUfileOpcode_t`.""" + * READ = CUFILE_READ + * WRITE = CUFILE_WRITE # <<<<<<<<<<<<<< + * + * class Status(_IntEnum): +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUfileOpcode_t(CUFILE_WRITE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_WRITE, __pyx_t_6) < (0)) __PYX_ERR(0, 900, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":897 + * USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS + * + * class Opcode(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileOpcode_t`.""" + * READ = CUFILE_READ +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Opcode, __pyx_t_2, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Opcode, __pyx_t_6) < (0)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":902 + * WRITE = CUFILE_WRITE + * + * class Status(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileStatus_t`.""" + * WAITING = CUFILE_WAITING +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Status, __pyx_mstate_global->__pyx_n_u_Status, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileStatus_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_t_8) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 902, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":904 + * class Status(_IntEnum): + * """See `CUfileStatus_t`.""" + * WAITING = CUFILE_WAITING # <<<<<<<<<<<<<< + * PENDING = CUFILE_PENDING + * INVALID = CUFILE_INVALID +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_WAITING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_WAITING, __pyx_t_8) < (0)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":905 + * """See `CUfileStatus_t`.""" + * WAITING = CUFILE_WAITING + * PENDING = CUFILE_PENDING # <<<<<<<<<<<<<< + * INVALID = CUFILE_INVALID + * CANCELED = CUFILE_CANCELED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_PENDING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PENDING, __pyx_t_8) < (0)) __PYX_ERR(0, 905, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":906 + * WAITING = CUFILE_WAITING + * PENDING = CUFILE_PENDING + * INVALID = CUFILE_INVALID # <<<<<<<<<<<<<< + * CANCELED = CUFILE_CANCELED + * COMPLETE = CUFILE_COMPLETE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_INVALID); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_INVALID, __pyx_t_8) < (0)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":907 + * PENDING = CUFILE_PENDING + * INVALID = CUFILE_INVALID + * CANCELED = CUFILE_CANCELED # <<<<<<<<<<<<<< + * COMPLETE = CUFILE_COMPLETE + * TIMEOUT = CUFILE_TIMEOUT +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_CANCELED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CANCELED, __pyx_t_8) < (0)) __PYX_ERR(0, 907, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":908 + * INVALID = CUFILE_INVALID + * CANCELED = CUFILE_CANCELED + * COMPLETE = CUFILE_COMPLETE # <<<<<<<<<<<<<< + * TIMEOUT = CUFILE_TIMEOUT + * FAILED = CUFILE_FAILED +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_COMPLETE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_COMPLETE, __pyx_t_8) < (0)) __PYX_ERR(0, 908, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":909 + * CANCELED = CUFILE_CANCELED + * COMPLETE = CUFILE_COMPLETE + * TIMEOUT = CUFILE_TIMEOUT # <<<<<<<<<<<<<< + * FAILED = CUFILE_FAILED + * +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_TIMEOUT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TIMEOUT, __pyx_t_8) < (0)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":910 + * COMPLETE = CUFILE_COMPLETE + * TIMEOUT = CUFILE_TIMEOUT + * FAILED = CUFILE_FAILED # <<<<<<<<<<<<<< + * + * class BatchMode(_IntEnum): +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUfileStatus_t(CUFILE_FAILED); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FAILED, __pyx_t_8) < (0)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":902 + * WRITE = CUFILE_WRITE + * + * class Status(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileStatus_t`.""" + * WAITING = CUFILE_WAITING +*/ + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Status, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Status, __pyx_t_8) < (0)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":912 + * FAILED = CUFILE_FAILED + * + * class BatchMode(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileBatchMode_t`.""" + * BATCH = CUFILE_BATCH +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_BatchMode, __pyx_mstate_global->__pyx_n_u_BatchMode, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUfileBatchMode_t); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 912, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":914 + * class BatchMode(_IntEnum): + * """See `CUfileBatchMode_t`.""" + * BATCH = CUFILE_BATCH # <<<<<<<<<<<<<< + * + * class SizeTConfigParameter(_IntEnum): +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUfileBatchMode_t(CUFILE_BATCH); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_BATCH, __pyx_t_10) < (0)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":912 + * FAILED = CUFILE_FAILED + * + * class BatchMode(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUfileBatchMode_t`.""" + * BATCH = CUFILE_BATCH +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_BatchMode, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BatchMode, __pyx_t_10) < (0)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":916 + * BATCH = CUFILE_BATCH + * + * class SizeTConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileSizeTConfigParameter_t`.""" + * PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_SizeTConfigParameter, __pyx_mstate_global->__pyx_n_u_SizeTConfigParameter, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUFileSizeTConfigParameter_t); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_2 != __pyx_t_6) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 916, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":918 + * class SizeTConfigParameter(_IntEnum): + * """See `CUFileSizeTConfigParameter_t`.""" + * PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS # <<<<<<<<<<<<<< + * EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + * EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROFILE_STATS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROFILE_STATS, __pyx_t_6) < (0)) __PYX_ERR(0, 918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":919 + * """See `CUFileSizeTConfigParameter_t`.""" + * PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS + * EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH # <<<<<<<<<<<<<< + * EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + * EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 919, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_EXECUTION_MAX_IO_QUEUE_DEPTH, __pyx_t_6) < (0)) __PYX_ERR(0, 919, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":920 + * PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS + * EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + * EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS # <<<<<<<<<<<<<< + * EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + * EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_EXECUTION_MAX_IO_THREADS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_EXECUTION_MAX_IO_THREADS, __pyx_t_6) < (0)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":921 + * EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + * EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + * EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB # <<<<<<<<<<<<<< + * EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + * PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_EXECUTION_MIN_IO_THRESHOLD_SIZE, __pyx_t_6) < (0)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":922 + * EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + * EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + * EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM # <<<<<<<<<<<<<< + * PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + * PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_EXECUTION_MAX_REQUEST_PARALLELIS, __pyx_t_6) < (0)) __PYX_ERR(0, 922, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":923 + * EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + * EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + * PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB # <<<<<<<<<<<<<< + * PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + * PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_MAX_DIRECT_IO_SIZE_KB, __pyx_t_6) < (0)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":924 + * EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + * PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + * PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB # <<<<<<<<<<<<<< + * PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + * PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_MAX_DEVICE_CACHE_SIZE, __pyx_t_6) < (0)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":925 + * PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + * PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + * PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB # <<<<<<<<<<<<<< + * PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + * PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_PER_BUFFER_CACHE_SIZE, __pyx_t_6) < (0)) __PYX_ERR(0, 925, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":926 + * PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + * PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + * PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB # <<<<<<<<<<<<<< + * PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + * POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_MAX_DEVICE_PINNED_MEM, __pyx_t_6) < (0)) __PYX_ERR(0, 926, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":927 + * PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + * PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + * PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE # <<<<<<<<<<<<<< + * POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB + * PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_IO_BATCHSIZE, __pyx_t_6) < (0)) __PYX_ERR(0, 927, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":928 + * PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + * PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + * POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB # <<<<<<<<<<<<<< + * PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + * +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_POLLTHRESHOLD_SIZE_KB, __pyx_t_6) < (0)) __PYX_ERR(0, 928, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":929 + * PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + * POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB + * PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS # <<<<<<<<<<<<<< + * + * class BoolConfigParameter(_IntEnum): +*/ + __pyx_t_6 = __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PROPERTIES_BATCH_IO_TIMEOUT_MS, __pyx_t_6) < (0)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":916 + * BATCH = CUFILE_BATCH + * + * class SizeTConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileSizeTConfigParameter_t`.""" + * PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS +*/ + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_SizeTConfigParameter, __pyx_t_2, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SizeTConfigParameter, __pyx_t_6) < (0)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":931 + * PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + * + * class BoolConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileBoolConfigParameter_t`.""" + * PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_BoolConfigParameter, __pyx_mstate_global->__pyx_n_u_BoolConfigParameter, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUFileBoolConfigParameter_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_2 != __pyx_t_8) { + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_8) < 0))) __PYX_ERR(0, 931, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":933 + * class BoolConfigParameter(_IntEnum): + * """See `CUFileBoolConfigParameter_t`.""" + * PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE # <<<<<<<<<<<<<< + * PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + * FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_PROPERTIES_USE_POLL_MODE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PROPERTIES_USE_POLL_MODE, __pyx_t_8) < (0)) __PYX_ERR(0, 933, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":934 + * """See `CUFileBoolConfigParameter_t`.""" + * PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE + * PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE # <<<<<<<<<<<<<< + * FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE + * FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PROPERTIES_ALLOW_COMPAT_MODE, __pyx_t_8) < (0)) __PYX_ERR(0, 934, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":935 + * PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE + * PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + * FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE # <<<<<<<<<<<<<< + * FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + * EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_FORCE_COMPAT_MODE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FORCE_COMPAT_MODE, __pyx_t_8) < (0)) __PYX_ERR(0, 935, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":936 + * PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + * FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE + * FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE # <<<<<<<<<<<<<< + * EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO + * PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FS_MISC_API_CHECK_AGGRESSIVE, __pyx_t_8) < (0)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":937 + * FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE + * FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + * EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO # <<<<<<<<<<<<<< + * PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX + * PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_EXECUTION_PARALLEL_IO); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_EXECUTION_PARALLEL_IO, __pyx_t_8) < (0)) __PYX_ERR(0, 937, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":938 + * FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + * EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO + * PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX # <<<<<<<<<<<<<< + * PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + * USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_PROFILE_NVTX); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PROFILE_NVTX, __pyx_t_8) < (0)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":939 + * EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO + * PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX + * PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY # <<<<<<<<<<<<<< + * USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA + * PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 939, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PROPERTIES_ALLOW_SYSTEM_MEMORY, __pyx_t_8) < (0)) __PYX_ERR(0, 939, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":940 + * PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX + * PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + * USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA # <<<<<<<<<<<<<< + * PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING + * FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_USE_PCIP2PDMA); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_USE_PCIP2PDMA, __pyx_t_8) < (0)) __PYX_ERR(0, 940, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":941 + * PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + * USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA + * PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING # <<<<<<<<<<<<<< + * FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE + * SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_PREFER_IO_URING); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 941, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PREFER_IO_URING, __pyx_t_8) < (0)) __PYX_ERR(0, 941, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":942 + * USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA + * PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING + * FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE # <<<<<<<<<<<<<< + * SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION + * STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_FORCE_ODIRECT_MODE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FORCE_ODIRECT_MODE, __pyx_t_8) < (0)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":943 + * PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING + * FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE + * SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION # <<<<<<<<<<<<<< + * STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + * +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SKIP_TOPOLOGY_DETECTION, __pyx_t_8) < (0)) __PYX_ERR(0, 943, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":944 + * FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE + * SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION + * STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS # <<<<<<<<<<<<<< + * + * class StringConfigParameter(_IntEnum): +*/ + __pyx_t_8 = __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFILE_PARAM_STREAM_MEMOPS_BYPASS); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_STREAM_MEMOPS_BYPASS, __pyx_t_8) < (0)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + + /* "cuda/bindings/cufile.pyx":931 + * PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + * + * class BoolConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileBoolConfigParameter_t`.""" + * PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE +*/ + __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_BoolConfigParameter, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_BoolConfigParameter, __pyx_t_8) < (0)) __PYX_ERR(0, 931, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":946 + * STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + * + * class StringConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileStringConfigParameter_t`.""" + * LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_StringConfigParameter, __pyx_mstate_global->__pyx_n_u_StringConfigParameter, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_kp_u_See_CUFileStringConfigParameter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + if (__pyx_t_2 != __pyx_t_10) { + if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_10) < 0))) __PYX_ERR(0, 946, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":948 + * class StringConfigParameter(_IntEnum): + * """See `CUFileStringConfigParameter_t`.""" + * LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL # <<<<<<<<<<<<<< + * ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH + * LOG_DIR = CUFILE_PARAM_LOG_DIR +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUFileStringConfigParameter_t(CUFILE_PARAM_LOGGING_LEVEL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_LOGGING_LEVEL, __pyx_t_10) < (0)) __PYX_ERR(0, 948, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":949 + * """See `CUFileStringConfigParameter_t`.""" + * LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL + * ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH # <<<<<<<<<<<<<< + * LOG_DIR = CUFILE_PARAM_LOG_DIR + * +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUFileStringConfigParameter_t(CUFILE_PARAM_ENV_LOGFILE_PATH); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ENV_LOGFILE_PATH, __pyx_t_10) < (0)) __PYX_ERR(0, 949, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":950 + * LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL + * ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH + * LOG_DIR = CUFILE_PARAM_LOG_DIR # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_10 = __Pyx_PyLong_From_CUFileStringConfigParameter_t(CUFILE_PARAM_LOG_DIR); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_LOG_DIR, __pyx_t_10) < (0)) __PYX_ERR(0, 950, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + + /* "cuda/bindings/cufile.pyx":946 + * STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + * + * class StringConfigParameter(_IntEnum): # <<<<<<<<<<<<<< + * """See `CUFileStringConfigParameter_t`.""" + * LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL +*/ + __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_StringConfigParameter, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_StringConfigParameter, __pyx_t_10) < (0)) __PYX_ERR(0, 946, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":962 + * + * + * class cuFileError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status, cu_err=None): +*/ + __pyx_t_2 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_CalculateMetaclass(NULL, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_Py3MetaclassPrepare(__pyx_t_8, __pyx_t_6, __pyx_mstate_global->__pyx_n_u_cuFileError, __pyx_mstate_global->__pyx_n_u_cuFileError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, (PyObject *) NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + if (__pyx_t_6 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_10, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 962, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":964 + * class cuFileError(Exception): + * + * def __init__(self, status, cu_err=None): # <<<<<<<<<<<<<< + * self.status = status + * self.cuda_error = cu_err +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_11cuFileError_1__init__, 0, __pyx_mstate_global->__pyx_n_u_cuFileError___init, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[5]); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":974 + * super(cuFileError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status, self.cuda_error)) + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_11cuFileError_3__reduce__, 0, __pyx_mstate_global->__pyx_n_u_cuFileError___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/cufile.pyx":962 + * + * + * class cuFileError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status, cu_err=None): +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_cuFileError, __pyx_t_6, __pyx_t_10, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_cuFileError, __pyx_t_2) < (0)) __PYX_ERR(0, 962, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":996 + * ############################################################################### + * + * cpdef intptr_t handle_register(intptr_t descr) except? 0: # <<<<<<<<<<<<<< + * """cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_1handle_register, 0, __pyx_mstate_global->__pyx_n_u_handle_register, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_handle_register, __pyx_t_6) < (0)) __PYX_ERR(0, 996, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1014 + * + * + * cpdef void handle_deregister(intptr_t fh) except*: # <<<<<<<<<<<<<< + * """releases a registered filehandle from cuFile. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_3handle_deregister, 0, __pyx_mstate_global->__pyx_n_u_handle_deregister, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1014, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_handle_deregister, __pyx_t_6) < (0)) __PYX_ERR(0, 1014, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1025 + * + * + * cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags): # <<<<<<<<<<<<<< + * """register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_5buf_register, 0, __pyx_mstate_global->__pyx_n_u_buf_register, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1025, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_buf_register, __pyx_t_6) < (0)) __PYX_ERR(0, 1025, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1040 + * + * + * cpdef buf_deregister(intptr_t buf_ptr_base): # <<<<<<<<<<<<<< + * """deregister an already registered device or host memory from cuFile. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_7buf_deregister, 0, __pyx_mstate_global->__pyx_n_u_buf_deregister, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_buf_deregister, __pyx_t_6) < (0)) __PYX_ERR(0, 1040, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1053 + * + * + * cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """read data from a registered file handle to a specified device or host memory. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_9read, 0, __pyx_mstate_global->__pyx_n_u_read, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read, __pyx_t_6) < (0)) __PYX_ERR(0, 1053, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1070 + * + * + * cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): # <<<<<<<<<<<<<< + * """write data from a specified device or host memory to a registered file handle. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_11write, 0, __pyx_mstate_global->__pyx_n_u_write, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1070, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_6) < (0)) __PYX_ERR(0, 1070, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1087 + * + * + * cpdef driver_open(): # <<<<<<<<<<<<<< + * """Initialize the cuFile library and open the nvidia-fs driver. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_13driver_open, 0, __pyx_mstate_global->__pyx_n_u_driver_open, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_open, __pyx_t_6) < (0)) __PYX_ERR(0, 1087, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1097 + * + * + * cpdef use_count(): # <<<<<<<<<<<<<< + * """returns use count of cufile drivers at that moment by the process. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_15use_count, 0, __pyx_mstate_global->__pyx_n_u_use_count, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_use_count, __pyx_t_6) < (0)) __PYX_ERR(0, 1097, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1107 + * + * + * cpdef driver_get_properties(intptr_t props): # <<<<<<<<<<<<<< + * """Gets the Driver session properties. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_17driver_get_properties, 0, __pyx_mstate_global->__pyx_n_u_driver_get_properties, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_get_properties, __pyx_t_6) < (0)) __PYX_ERR(0, 1107, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1120 + * + * + * cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size): # <<<<<<<<<<<<<< + * """Sets whether the Read/Write APIs use polling to do IO operations. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_19driver_set_poll_mode, 0, __pyx_mstate_global->__pyx_n_u_driver_set_poll_mode, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_set_poll_mode, __pyx_t_6) < (0)) __PYX_ERR(0, 1120, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1134 + * + * + * cpdef driver_set_max_direct_io_size(size_t max_direct_io_size): # <<<<<<<<<<<<<< + * """Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_21driver_set_max_direct_io_size, 0, __pyx_mstate_global->__pyx_n_u_driver_set_max_direct_io_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_set_max_direct_io_size, __pyx_t_6) < (0)) __PYX_ERR(0, 1134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1147 + * + * + * cpdef driver_set_max_cache_size(size_t max_cache_size): # <<<<<<<<<<<<<< + * """Control parameter to set maximum GPU memory reserved per device by the library for internal buffering. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_23driver_set_max_cache_size, 0, __pyx_mstate_global->__pyx_n_u_driver_set_max_cache_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_set_max_cache_size, __pyx_t_6) < (0)) __PYX_ERR(0, 1147, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1160 + * + * + * cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size): # <<<<<<<<<<<<<< + * """Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_25driver_set_max_pinned_mem_size, 0, __pyx_mstate_global->__pyx_n_u_driver_set_max_pinned_mem_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_set_max_pinned_mem_size, __pyx_t_6) < (0)) __PYX_ERR(0, 1160, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1173 + * + * + * cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: # <<<<<<<<<<<<<< + * cdef BatchHandle batch_idp + * with nogil: +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_27batch_io_set_up, 0, __pyx_mstate_global->__pyx_n_u_batch_io_set_up, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_batch_io_set_up, __pyx_t_6) < (0)) __PYX_ERR(0, 1173, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1181 + * + * + * cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_29batch_io_submit, 0, __pyx_mstate_global->__pyx_n_u_batch_io_submit, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_batch_io_submit, __pyx_t_6) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1187 + * + * + * cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_31batch_io_get_status, 0, __pyx_mstate_global->__pyx_n_u_batch_io_get_status, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_batch_io_get_status, __pyx_t_6) < (0)) __PYX_ERR(0, 1187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1193 + * + * + * cpdef batch_io_cancel(intptr_t batch_idp): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileBatchIOCancel(batch_idp) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_33batch_io_cancel, 0, __pyx_mstate_global->__pyx_n_u_batch_io_cancel, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_batch_io_cancel, __pyx_t_6) < (0)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1199 + * + * + * cpdef void batch_io_destroy(intptr_t batch_idp) except*: # <<<<<<<<<<<<<< + * cuFileBatchIODestroy(batch_idp) + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_35batch_io_destroy, 0, __pyx_mstate_global->__pyx_n_u_batch_io_destroy, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_batch_io_destroy, __pyx_t_6) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1203 + * + * + * cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_37read_async, 0, __pyx_mstate_global->__pyx_n_u_read_async, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_async, __pyx_t_6) < (0)) __PYX_ERR(0, 1203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1209 + * + * + * cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_39write_async, 0, __pyx_mstate_global->__pyx_n_u_write_async, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_write_async, __pyx_t_6) < (0)) __PYX_ERR(0, 1209, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1215 + * + * + * cpdef stream_register(intptr_t stream, unsigned flags): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamRegister(stream, flags) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_41stream_register, 0, __pyx_mstate_global->__pyx_n_u_stream_register, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_stream_register, __pyx_t_6) < (0)) __PYX_ERR(0, 1215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1221 + * + * + * cpdef stream_deregister(intptr_t stream): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileStreamDeregister(stream) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_43stream_deregister, 0, __pyx_mstate_global->__pyx_n_u_stream_deregister, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_stream_deregister, __pyx_t_6) < (0)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1227 + * + * + * cpdef int get_version() except? 0: # <<<<<<<<<<<<<< + * cdef int version + * with nogil: +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_45get_version, 0, __pyx_mstate_global->__pyx_n_u_get_version, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_version, __pyx_t_6) < (0)) __PYX_ERR(0, 1227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1235 + * + * + * cpdef size_t get_parameter_size_t(int param) except? 0: # <<<<<<<<<<<<<< + * cdef size_t value + * with nogil: +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_47get_parameter_size_t, 0, __pyx_mstate_global->__pyx_n_u_get_parameter_size_t, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_parameter_size_t, __pyx_t_6) < (0)) __PYX_ERR(0, 1235, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1243 + * + * + * cpdef bint get_parameter_bool(int param) except? 0: # <<<<<<<<<<<<<< + * cdef cpp_bool value + * with nogil: +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_49get_parameter_bool, 0, __pyx_mstate_global->__pyx_n_u_get_parameter_bool, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_parameter_bool, __pyx_t_6) < (0)) __PYX_ERR(0, 1243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1251 + * + * + * cpdef str get_parameter_string(int param, int len): # <<<<<<<<<<<<<< + * cdef bytes _desc_str_ = bytes(len) + * cdef char* desc_str = _desc_str_ +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_51get_parameter_string, 0, __pyx_mstate_global->__pyx_n_u_get_parameter_string, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_parameter_string, __pyx_t_6) < (0)) __PYX_ERR(0, 1251, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1260 + * + * + * cpdef set_parameter_size_t(int param, size_t value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_53set_parameter_size_t, 0, __pyx_mstate_global->__pyx_n_u_set_parameter_size_t, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_parameter_size_t, __pyx_t_6) < (0)) __PYX_ERR(0, 1260, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1266 + * + * + * cpdef set_parameter_bool(int param, bint value): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_55set_parameter_bool, 0, __pyx_mstate_global->__pyx_n_u_set_parameter_bool, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_parameter_bool, __pyx_t_6) < (0)) __PYX_ERR(0, 1266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1272 + * + * + * cpdef set_parameter_string(int param, intptr_t desc_str): # <<<<<<<<<<<<<< + * with nogil: + * status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_57set_parameter_string, 0, __pyx_mstate_global->__pyx_n_u_set_parameter_string, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_set_parameter_string, __pyx_t_6) < (0)) __PYX_ERR(0, 1272, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1278 + * + * + * cpdef str op_status_error(int status): # <<<<<<<<<<<<<< + * """cufileop status string. + * +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_59op_status_error, 0, __pyx_mstate_global->__pyx_n_u_op_status_error, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_op_status_error, __pyx_t_6) < (0)) __PYX_ERR(0, 1278, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1291 + * + * + * cpdef driver_close(): # <<<<<<<<<<<<<< + * """reset the cuFile library and release the nvidia-fs driver + * """ +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_61driver_close, 0, __pyx_mstate_global->__pyx_n_u_driver_close, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver_close, __pyx_t_6) < (0)) __PYX_ERR(0, 1291, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod1(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_63__pyx_unpickle__py_anon_pod1, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod1, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod1, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod1__set_state(<_py_anon_pod1> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod1__set_state(_py_anon_pod1 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_65__pyx_unpickle__py_anon_pod3, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod3, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod3, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle_IOEvents(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_67__pyx_unpickle_IOEvents, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOEvents, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOEvents, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_IOEvents__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_IOEvents__set_state(IOEvents __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._data = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_69__pyx_unpickle_Descr, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Descr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Descr, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":1 + * def __pyx_unpickle__py_anon_pod2(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_71__pyx_unpickle__py_anon_pod2, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod2, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle__py_anon_pod2, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle__py_anon_pod2__set_state(<_py_anon_pod2> __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle__py_anon_pod2__set_state(_py_anon_pod2 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._batch = __pyx_state[0]; __pyx_result._data = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): +*/ + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_6cufile_73__pyx_unpickle_IOParams, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOParams, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_cufile, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_IOParams, __pyx_t_6) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/cufile.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_6) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_12); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cufile"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 102 <= 65535 + const unsigned short n; +#elif 102 / 2 < INT_MAX + const unsigned int n; +#elif 102 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_ALLOW_COMPAT_MODE, sizeof(__pyx_k_ALLOW_COMPAT_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ALLOW_COMPAT_MODE */ + {__pyx_k_ASYNC_NOT_SUPPORTED, sizeof(__pyx_k_ASYNC_NOT_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ASYNC_NOT_SUPPORTED */ + {__pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AssertionError */ + {__pyx_k_BATCH, sizeof(__pyx_k_BATCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BATCH */ + {__pyx_k_BATCH_FULL, sizeof(__pyx_k_BATCH_FULL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BATCH_FULL */ + {__pyx_k_BATCH_IO_SUPPORTED, sizeof(__pyx_k_BATCH_IO_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BATCH_IO_SUPPORTED */ + {__pyx_k_BATCH_SUBMIT_FAILED, sizeof(__pyx_k_BATCH_SUBMIT_FAILED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BATCH_SUBMIT_FAILED */ + {__pyx_k_BEEGFS_SUPPORTED, sizeof(__pyx_k_BEEGFS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BEEGFS_SUPPORTED */ + {__pyx_k_BatchMode, sizeof(__pyx_k_BatchMode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BatchMode */ + {__pyx_k_BoolConfigParameter, sizeof(__pyx_k_BoolConfigParameter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_BoolConfigParameter */ + {__pyx_k_CANCELED, sizeof(__pyx_k_CANCELED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CANCELED */ + {__pyx_k_COMPLETE, sizeof(__pyx_k_COMPLETE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_COMPLETE */ + {__pyx_k_CUDA_CONTEXT_MISMATCH, sizeof(__pyx_k_CUDA_CONTEXT_MISMATCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_CONTEXT_MISMATCH */ + {__pyx_k_CUDA_DRIVER_ERROR, sizeof(__pyx_k_CUDA_DRIVER_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_DRIVER_ERROR */ + {__pyx_k_CUDA_MEMORY_TYPE_INVALID, sizeof(__pyx_k_CUDA_MEMORY_TYPE_INVALID), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_MEMORY_TYPE_INVALID */ + {__pyx_k_CUDA_POINTER_INVALID, sizeof(__pyx_k_CUDA_POINTER_INVALID), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_POINTER_INVALID */ + {__pyx_k_CUDA_POINTER_RANGE_ERROR, sizeof(__pyx_k_CUDA_POINTER_RANGE_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_POINTER_RANGE_ERROR */ + {__pyx_k_CUDA_status, sizeof(__pyx_k_CUDA_status), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_CUDA_status */ + {__pyx_k_CUresult, sizeof(__pyx_k_CUresult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUresult */ + {__pyx_k_DEVICE_NOT_FOUND, sizeof(__pyx_k_DEVICE_NOT_FOUND), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DEVICE_NOT_FOUND */ + {__pyx_k_DEVICE_NOT_SUPPORTED, sizeof(__pyx_k_DEVICE_NOT_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DEVICE_NOT_SUPPORTED */ + {__pyx_k_DIO_NOT_SET, sizeof(__pyx_k_DIO_NOT_SET), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DIO_NOT_SET */ + {__pyx_k_DRIVER_ALREADY_OPEN, sizeof(__pyx_k_DRIVER_ALREADY_OPEN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_ALREADY_OPEN */ + {__pyx_k_DRIVER_CLOSING, sizeof(__pyx_k_DRIVER_CLOSING), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_CLOSING */ + {__pyx_k_DRIVER_INVALID_PROPS, sizeof(__pyx_k_DRIVER_INVALID_PROPS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_INVALID_PROPS */ + {__pyx_k_DRIVER_NOT_INITIALIZED, sizeof(__pyx_k_DRIVER_NOT_INITIALIZED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_NOT_INITIALIZED */ + {__pyx_k_DRIVER_UNSUPPORTED_LIMIT, sizeof(__pyx_k_DRIVER_UNSUPPORTED_LIMIT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_UNSUPPORTED_LIMIT */ + {__pyx_k_DRIVER_VERSION_MISMATCH, sizeof(__pyx_k_DRIVER_VERSION_MISMATCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_VERSION_MISMATCH */ + {__pyx_k_DRIVER_VERSION_READ_ERROR, sizeof(__pyx_k_DRIVER_VERSION_READ_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DRIVER_VERSION_READ_ERROR */ + {__pyx_k_DYN_ROUTING_SUPPORTED, sizeof(__pyx_k_DYN_ROUTING_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DYN_ROUTING_SUPPORTED */ + {__pyx_k_Descr, sizeof(__pyx_k_Descr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Descr */ + {__pyx_k_Descr_Array, sizeof(__pyx_k_Descr_Array), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Descr_Array */ + {__pyx_k_Descr___reduce_cython, sizeof(__pyx_k_Descr___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Descr___reduce_cython */ + {__pyx_k_Descr___setstate_cython, sizeof(__pyx_k_Descr___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Descr___setstate_cython */ + {__pyx_k_Descr_from_data, sizeof(__pyx_k_Descr_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Descr_from_data */ + {__pyx_k_Descr_from_ptr, sizeof(__pyx_k_Descr_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Descr_from_ptr */ + {__pyx_k_Descr_object_at, sizeof(__pyx_k_Descr_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Descr_object_at */ + {__pyx_k_DriverControlFlags, sizeof(__pyx_k_DriverControlFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DriverControlFlags */ + {__pyx_k_DriverStatusFlags, sizeof(__pyx_k_DriverStatusFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_DriverStatusFlags */ + {__pyx_k_ENV_LOGFILE_PATH, sizeof(__pyx_k_ENV_LOGFILE_PATH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ENV_LOGFILE_PATH */ + {__pyx_k_EXECUTION_MAX_IO_QUEUE_DEPTH, sizeof(__pyx_k_EXECUTION_MAX_IO_QUEUE_DEPTH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EXECUTION_MAX_IO_QUEUE_DEPTH */ + {__pyx_k_EXECUTION_MAX_IO_THREADS, sizeof(__pyx_k_EXECUTION_MAX_IO_THREADS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EXECUTION_MAX_IO_THREADS */ + {__pyx_k_EXECUTION_MAX_REQUEST_PARALLELIS, sizeof(__pyx_k_EXECUTION_MAX_REQUEST_PARALLELIS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EXECUTION_MAX_REQUEST_PARALLELIS */ + {__pyx_k_EXECUTION_MIN_IO_THRESHOLD_SIZE, sizeof(__pyx_k_EXECUTION_MIN_IO_THRESHOLD_SIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EXECUTION_MIN_IO_THRESHOLD_SIZE */ + {__pyx_k_EXECUTION_PARALLEL_IO, sizeof(__pyx_k_EXECUTION_PARALLEL_IO), 0, 1, 1}, /* PyObject cname: __pyx_n_u_EXECUTION_PARALLEL_IO */ + {__pyx_k_FAILED, sizeof(__pyx_k_FAILED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FAILED */ + {__pyx_k_FORCE_COMPAT_MODE, sizeof(__pyx_k_FORCE_COMPAT_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FORCE_COMPAT_MODE */ + {__pyx_k_FORCE_ODIRECT_MODE, sizeof(__pyx_k_FORCE_ODIRECT_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FORCE_ODIRECT_MODE */ + {__pyx_k_FS_MISC_API_CHECK_AGGRESSIVE, sizeof(__pyx_k_FS_MISC_API_CHECK_AGGRESSIVE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FS_MISC_API_CHECK_AGGRESSIVE */ + {__pyx_k_FeatureFlags, sizeof(__pyx_k_FeatureFlags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FeatureFlags */ + {__pyx_k_FileHandleType, sizeof(__pyx_k_FileHandleType), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FileHandleType */ + {__pyx_k_GETNEWFD_FAILED, sizeof(__pyx_k_GETNEWFD_FAILED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_GETNEWFD_FAILED */ + {__pyx_k_GPFS_SUPPORTED, sizeof(__pyx_k_GPFS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_GPFS_SUPPORTED */ + {__pyx_k_GPU_MEMORY_PINNING_FAILED, sizeof(__pyx_k_GPU_MEMORY_PINNING_FAILED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_GPU_MEMORY_PINNING_FAILED */ + {__pyx_k_HANDLE_ALREADY_REGISTERED, sizeof(__pyx_k_HANDLE_ALREADY_REGISTERED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HANDLE_ALREADY_REGISTERED */ + {__pyx_k_HANDLE_NOT_REGISTERED, sizeof(__pyx_k_HANDLE_NOT_REGISTERED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HANDLE_NOT_REGISTERED */ + {__pyx_k_INTERNAL_ERROR, sizeof(__pyx_k_INTERNAL_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INTERNAL_ERROR */ + {__pyx_k_INVALID, sizeof(__pyx_k_INVALID), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID */ + {__pyx_k_INVALID_FILE_OPEN_FLAG, sizeof(__pyx_k_INVALID_FILE_OPEN_FLAG), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID_FILE_OPEN_FLAG */ + {__pyx_k_INVALID_FILE_TYPE, sizeof(__pyx_k_INVALID_FILE_TYPE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID_FILE_TYPE */ + {__pyx_k_INVALID_MAPPING_RANGE, sizeof(__pyx_k_INVALID_MAPPING_RANGE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID_MAPPING_RANGE */ + {__pyx_k_INVALID_MAPPING_SIZE, sizeof(__pyx_k_INVALID_MAPPING_SIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID_MAPPING_SIZE */ + {__pyx_k_INVALID_VALUE, sizeof(__pyx_k_INVALID_VALUE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INVALID_VALUE */ + {__pyx_k_IOEvents, sizeof(__pyx_k_IOEvents), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOEvents */ + {__pyx_k_IOEvents_Array, sizeof(__pyx_k_IOEvents_Array), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_IOEvents_Array */ + {__pyx_k_IOEvents___reduce_cython, sizeof(__pyx_k_IOEvents___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOEvents___reduce_cython */ + {__pyx_k_IOEvents___setstate_cython, sizeof(__pyx_k_IOEvents___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOEvents___setstate_cython */ + {__pyx_k_IOEvents_from_data, sizeof(__pyx_k_IOEvents_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOEvents_from_data */ + {__pyx_k_IOEvents_from_ptr, sizeof(__pyx_k_IOEvents_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOEvents_from_ptr */ + {__pyx_k_IOEvents_object_at, sizeof(__pyx_k_IOEvents_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_IOEvents_object_at */ + {__pyx_k_IOParams, sizeof(__pyx_k_IOParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOParams */ + {__pyx_k_IOParams_Array, sizeof(__pyx_k_IOParams_Array), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_IOParams_Array */ + {__pyx_k_IOParams___reduce_cython, sizeof(__pyx_k_IOParams___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOParams___reduce_cython */ + {__pyx_k_IOParams___setstate_cython, sizeof(__pyx_k_IOParams___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOParams___setstate_cython */ + {__pyx_k_IOParams_from_data, sizeof(__pyx_k_IOParams_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOParams_from_data */ + {__pyx_k_IOParams_from_ptr, sizeof(__pyx_k_IOParams_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IOParams_from_ptr */ + {__pyx_k_IOParams_object_at, sizeof(__pyx_k_IOParams_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_IOParams_object_at */ + {__pyx_k_IO_DISABLED, sizeof(__pyx_k_IO_DISABLED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IO_DISABLED */ + {__pyx_k_IO_MAX_ERROR, sizeof(__pyx_k_IO_MAX_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IO_MAX_ERROR */ + {__pyx_k_IO_NOT_SUPPORTED, sizeof(__pyx_k_IO_NOT_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IO_NOT_SUPPORTED */ + {__pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Incompatible_checksums_0x_x_vs_0 */ + {__pyx_k_Incompatible_checksums_0x_x_vs_0_2, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Incompatible_checksums_0x_x_vs_0_2 */ + {__pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IndexError */ + {__pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum */ + {__pyx_k_IntEnum_2, sizeof(__pyx_k_IntEnum_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum_2 */ + {__pyx_k_LOGGING_LEVEL, sizeof(__pyx_k_LOGGING_LEVEL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LOGGING_LEVEL */ + {__pyx_k_LOG_DIR, sizeof(__pyx_k_LOG_DIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LOG_DIR */ + {__pyx_k_LUSTRE_SUPPORTED, sizeof(__pyx_k_LUSTRE_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LUSTRE_SUPPORTED */ + {__pyx_k_MEMORY_ALREADY_REGISTERED, sizeof(__pyx_k_MEMORY_ALREADY_REGISTERED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MEMORY_ALREADY_REGISTERED */ + {__pyx_k_MEMORY_NOT_REGISTERED, sizeof(__pyx_k_MEMORY_NOT_REGISTERED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MEMORY_NOT_REGISTERED */ + {__pyx_k_NFS_SUPPORTED, sizeof(__pyx_k_NFS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NFS_SUPPORTED */ + {__pyx_k_NVFS_DRIVER_ERROR, sizeof(__pyx_k_NVFS_DRIVER_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVFS_DRIVER_ERROR */ + {__pyx_k_NVFS_SETUP_ERROR, sizeof(__pyx_k_NVFS_SETUP_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVFS_SETUP_ERROR */ + {__pyx_k_NVMEOF_SUPPORTED, sizeof(__pyx_k_NVMEOF_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVMEOF_SUPPORTED */ + {__pyx_k_NVMESH_SUPPORTED, sizeof(__pyx_k_NVMESH_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVMESH_SUPPORTED */ + {__pyx_k_NVME_P2P_SUPPORTED, sizeof(__pyx_k_NVME_P2P_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVME_P2P_SUPPORTED */ + {__pyx_k_NVME_SUPPORTED, sizeof(__pyx_k_NVME_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVME_SUPPORTED */ + {__pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_None */ + {__pyx_k_OPAQUE_FD, sizeof(__pyx_k_OPAQUE_FD), 0, 1, 1}, /* PyObject cname: __pyx_n_u_OPAQUE_FD */ + {__pyx_k_OPAQUE_WIN32, sizeof(__pyx_k_OPAQUE_WIN32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_OPAQUE_WIN32 */ + {__pyx_k_OpError, sizeof(__pyx_k_OpError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_OpError */ + {__pyx_k_Opcode, sizeof(__pyx_k_Opcode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Opcode */ + {__pyx_k_PARALLEL_IO_SUPPORTED, sizeof(__pyx_k_PARALLEL_IO_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PARALLEL_IO_SUPPORTED */ + {__pyx_k_PENDING, sizeof(__pyx_k_PENDING), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PENDING */ + {__pyx_k_PERMISSION_DENIED, sizeof(__pyx_k_PERMISSION_DENIED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PERMISSION_DENIED */ + {__pyx_k_PLATFORM_NOT_SUPPORTED, sizeof(__pyx_k_PLATFORM_NOT_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PLATFORM_NOT_SUPPORTED */ + {__pyx_k_POLLTHRESHOLD_SIZE_KB, sizeof(__pyx_k_POLLTHRESHOLD_SIZE_KB), 0, 1, 1}, /* PyObject cname: __pyx_n_u_POLLTHRESHOLD_SIZE_KB */ + {__pyx_k_PREFER_IO_URING, sizeof(__pyx_k_PREFER_IO_URING), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PREFER_IO_URING */ + {__pyx_k_PROFILE_NVTX, sizeof(__pyx_k_PROFILE_NVTX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROFILE_NVTX */ + {__pyx_k_PROFILE_STATS, sizeof(__pyx_k_PROFILE_STATS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROFILE_STATS */ + {__pyx_k_PROPERTIES_ALLOW_COMPAT_MODE, sizeof(__pyx_k_PROPERTIES_ALLOW_COMPAT_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_ALLOW_COMPAT_MODE */ + {__pyx_k_PROPERTIES_ALLOW_SYSTEM_MEMORY, sizeof(__pyx_k_PROPERTIES_ALLOW_SYSTEM_MEMORY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_ALLOW_SYSTEM_MEMORY */ + {__pyx_k_PROPERTIES_BATCH_IO_TIMEOUT_MS, sizeof(__pyx_k_PROPERTIES_BATCH_IO_TIMEOUT_MS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_BATCH_IO_TIMEOUT_MS */ + {__pyx_k_PROPERTIES_IO_BATCHSIZE, sizeof(__pyx_k_PROPERTIES_IO_BATCHSIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_IO_BATCHSIZE */ + {__pyx_k_PROPERTIES_MAX_DEVICE_CACHE_SIZE, sizeof(__pyx_k_PROPERTIES_MAX_DEVICE_CACHE_SIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_MAX_DEVICE_CACHE_SIZE */ + {__pyx_k_PROPERTIES_MAX_DEVICE_PINNED_MEM, sizeof(__pyx_k_PROPERTIES_MAX_DEVICE_PINNED_MEM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_MAX_DEVICE_PINNED_MEM */ + {__pyx_k_PROPERTIES_MAX_DIRECT_IO_SIZE_KB, sizeof(__pyx_k_PROPERTIES_MAX_DIRECT_IO_SIZE_KB), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_MAX_DIRECT_IO_SIZE_KB */ + {__pyx_k_PROPERTIES_PER_BUFFER_CACHE_SIZE, sizeof(__pyx_k_PROPERTIES_PER_BUFFER_CACHE_SIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_PER_BUFFER_CACHE_SIZE */ + {__pyx_k_PROPERTIES_USE_POLL_MODE, sizeof(__pyx_k_PROPERTIES_USE_POLL_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PROPERTIES_USE_POLL_MODE */ + {__pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PickleError */ + {__pyx_k_READ, sizeof(__pyx_k_READ), 0, 1, 1}, /* PyObject cname: __pyx_n_u_READ */ + {__pyx_k_SCALEFLUX_CSD_SUPPORTED, sizeof(__pyx_k_SCALEFLUX_CSD_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SCALEFLUX_CSD_SUPPORTED */ + {__pyx_k_SCATEFS_SUPPORTED, sizeof(__pyx_k_SCATEFS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SCATEFS_SUPPORTED */ + {__pyx_k_SCSI_SUPPORTED, sizeof(__pyx_k_SCSI_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SCSI_SUPPORTED */ + {__pyx_k_SKIP_TOPOLOGY_DETECTION, sizeof(__pyx_k_SKIP_TOPOLOGY_DETECTION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SKIP_TOPOLOGY_DETECTION */ + {__pyx_k_STREAMS_SUPPORTED, sizeof(__pyx_k_STREAMS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_STREAMS_SUPPORTED */ + {__pyx_k_STREAM_MEMOPS_BYPASS, sizeof(__pyx_k_STREAM_MEMOPS_BYPASS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_STREAM_MEMOPS_BYPASS */ + {__pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SUCCESS */ + {__pyx_k_See_CUFileBoolConfigParameter_t, sizeof(__pyx_k_See_CUFileBoolConfigParameter_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUFileBoolConfigParameter_t */ + {__pyx_k_See_CUFileSizeTConfigParameter_t, sizeof(__pyx_k_See_CUFileSizeTConfigParameter_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUFileSizeTConfigParameter_t */ + {__pyx_k_See_CUFileStringConfigParameter, sizeof(__pyx_k_See_CUFileStringConfigParameter), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUFileStringConfigParameter */ + {__pyx_k_See_CUfileBatchMode_t, sizeof(__pyx_k_See_CUfileBatchMode_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileBatchMode_t */ + {__pyx_k_See_CUfileDriverControlFlags_t, sizeof(__pyx_k_See_CUfileDriverControlFlags_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileDriverControlFlags_t */ + {__pyx_k_See_CUfileDriverStatusFlags_t, sizeof(__pyx_k_See_CUfileDriverStatusFlags_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileDriverStatusFlags_t */ + {__pyx_k_See_CUfileFeatureFlags_t, sizeof(__pyx_k_See_CUfileFeatureFlags_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileFeatureFlags_t */ + {__pyx_k_See_CUfileFileHandleType, sizeof(__pyx_k_See_CUfileFileHandleType), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileFileHandleType */ + {__pyx_k_See_CUfileOpError, sizeof(__pyx_k_See_CUfileOpError), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileOpError */ + {__pyx_k_See_CUfileOpcode_t, sizeof(__pyx_k_See_CUfileOpcode_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileOpcode_t */ + {__pyx_k_See_CUfileStatus_t, sizeof(__pyx_k_See_CUfileStatus_t), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_CUfileStatus_t */ + {__pyx_k_SizeTConfigParameter, sizeof(__pyx_k_SizeTConfigParameter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SizeTConfigParameter */ + {__pyx_k_Status, sizeof(__pyx_k_Status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Status */ + {__pyx_k_StringConfigParameter, sizeof(__pyx_k_StringConfigParameter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_StringConfigParameter */ + {__pyx_k_TIMEOUT, sizeof(__pyx_k_TIMEOUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TIMEOUT */ + {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */ + {__pyx_k_USERSPACE_FS, sizeof(__pyx_k_USERSPACE_FS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_USERSPACE_FS */ + {__pyx_k_USE_PCIP2PDMA, sizeof(__pyx_k_USE_PCIP2PDMA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_USE_PCIP2PDMA */ + {__pyx_k_USE_POLL_MODE, sizeof(__pyx_k_USE_POLL_MODE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_USE_POLL_MODE */ + {__pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ValueError */ + {__pyx_k_WAITING, sizeof(__pyx_k_WAITING), 0, 1, 1}, /* PyObject cname: __pyx_n_u_WAITING */ + {__pyx_k_WEKAFS_SUPPORTED, sizeof(__pyx_k_WEKAFS_SUPPORTED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_WEKAFS_SUPPORTED */ + {__pyx_k_WRITE, sizeof(__pyx_k_WRITE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_WRITE */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ + {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ + {__pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__5 */ + {__pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__6 */ + {__pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__7 */ + {__pyx_k_align, sizeof(__pyx_k_align), 0, 1, 1}, /* PyObject cname: __pyx_n_u_align */ + {__pyx_k_all, sizeof(__pyx_k_all), 0, 1, 1}, /* PyObject cname: __pyx_n_u_all */ + {__pyx_k_array_interface, sizeof(__pyx_k_array_interface), 0, 1, 1}, /* PyObject cname: __pyx_n_u_array_interface */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_batch, sizeof(__pyx_k_batch), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch */ + {__pyx_k_batch_addr, sizeof(__pyx_k_batch_addr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_addr */ + {__pyx_k_batch_idp, sizeof(__pyx_k_batch_idp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_idp */ + {__pyx_k_batch_io_cancel, sizeof(__pyx_k_batch_io_cancel), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_io_cancel */ + {__pyx_k_batch_io_destroy, sizeof(__pyx_k_batch_io_destroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_io_destroy */ + {__pyx_k_batch_io_get_status, sizeof(__pyx_k_batch_io_get_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_io_get_status */ + {__pyx_k_batch_io_set_up, sizeof(__pyx_k_batch_io_set_up), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_io_set_up */ + {__pyx_k_batch_io_submit, sizeof(__pyx_k_batch_io_submit), 0, 1, 1}, /* PyObject cname: __pyx_n_u_batch_io_submit */ + {__pyx_k_buf, sizeof(__pyx_k_buf), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf */ + {__pyx_k_buf_deregister, sizeof(__pyx_k_buf_deregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf_deregister */ + {__pyx_k_buf_ptr_base, sizeof(__pyx_k_buf_ptr_base), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf_ptr_base */ + {__pyx_k_buf_ptr_offset, sizeof(__pyx_k_buf_ptr_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf_ptr_offset */ + {__pyx_k_buf_ptr_offset_p, sizeof(__pyx_k_buf_ptr_offset_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf_ptr_offset_p */ + {__pyx_k_buf_register, sizeof(__pyx_k_buf_register), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buf_register */ + {__pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer */ + {__pyx_k_bytes_read_p, sizeof(__pyx_k_bytes_read_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes_read_p */ + {__pyx_k_bytes_written_p, sizeof(__pyx_k_bytes_written_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bytes_written_p */ + {__pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 1, 1}, /* PyObject cname: __pyx_n_u_class_getitem */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cookie, sizeof(__pyx_k_cookie), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cookie */ + {__pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ctypes */ + {__pyx_k_cuFileError, sizeof(__pyx_k_cuFileError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileError */ + {__pyx_k_cuFileError___init, sizeof(__pyx_k_cuFileError___init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileError___init */ + {__pyx_k_cuFileError___reduce, sizeof(__pyx_k_cuFileError___reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuFileError___reduce */ + {__pyx_k_cu_err, sizeof(__pyx_k_cu_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cu_err */ + {__pyx_k_cuda_bindings_cufile, sizeof(__pyx_k_cuda_bindings_cufile), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_cufile */ + {__pyx_k_cuda_bindings_cufile_pyx, sizeof(__pyx_k_cuda_bindings_cufile_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings_cufile_pyx */ + {__pyx_k_cuda_bindings_driver, sizeof(__pyx_k_cuda_bindings_driver), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_driver */ + {__pyx_k_cuda_error, sizeof(__pyx_k_cuda_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_error */ + {__pyx_k_data, sizeof(__pyx_k_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data */ + {__pyx_k_data_2, sizeof(__pyx_k_data_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_2 */ + {__pyx_k_data_argument_must_be_a_NumPy_nd, sizeof(__pyx_k_data_argument_must_be_a_NumPy_nd), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_argument_must_be_a_NumPy_nd */ + {__pyx_k_data_array_must_be_1D, sizeof(__pyx_k_data_array_must_be_1D), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_1D */ + {__pyx_k_data_array_must_be_of_dtype__py, sizeof(__pyx_k_data_array_must_be_of_dtype__py), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype__py */ + {__pyx_k_data_array_must_be_of_dtype__py_2, sizeof(__pyx_k_data_array_must_be_of_dtype__py_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype__py_2 */ + {__pyx_k_data_array_must_be_of_dtype__py_3, sizeof(__pyx_k_data_array_must_be_of_dtype__py_3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype__py_3 */ + {__pyx_k_data_array_must_be_of_dtype_desc, sizeof(__pyx_k_data_array_must_be_of_dtype_desc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype_desc */ + {__pyx_k_data_array_must_be_of_dtype_io_e, sizeof(__pyx_k_data_array_must_be_of_dtype_io_e), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype_io_e */ + {__pyx_k_data_array_must_be_of_dtype_io_p, sizeof(__pyx_k_data_array_must_be_of_dtype_io_p), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_data_array_must_be_of_dtype_io_p */ + {__pyx_k_desc_str, sizeof(__pyx_k_desc_str), 0, 1, 1}, /* PyObject cname: __pyx_n_u_desc_str */ + {__pyx_k_descr, sizeof(__pyx_k_descr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_descr */ + {__pyx_k_descr_dtype, sizeof(__pyx_k_descr_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_descr_dtype */ + {__pyx_k_dev_ptr_base, sizeof(__pyx_k_dev_ptr_base), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dev_ptr_base */ + {__pyx_k_dev_ptr_offset, sizeof(__pyx_k_dev_ptr_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dev_ptr_offset */ + {__pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict */ + {__pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict_2 */ + {__pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_disable */ + {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ + {__pyx_k_driver_close, sizeof(__pyx_k_driver_close), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_close */ + {__pyx_k_driver_get_properties, sizeof(__pyx_k_driver_get_properties), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_get_properties */ + {__pyx_k_driver_open, sizeof(__pyx_k_driver_open), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_open */ + {__pyx_k_driver_set_max_cache_size, sizeof(__pyx_k_driver_set_max_cache_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_set_max_cache_size */ + {__pyx_k_driver_set_max_direct_io_size, sizeof(__pyx_k_driver_set_max_direct_io_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_set_max_direct_io_size */ + {__pyx_k_driver_set_max_pinned_mem_size, sizeof(__pyx_k_driver_set_max_pinned_mem_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_set_max_pinned_mem_size */ + {__pyx_k_driver_set_poll_mode, sizeof(__pyx_k_driver_set_poll_mode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_set_poll_mode */ + {__pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dtype */ + {__pyx_k_e, sizeof(__pyx_k_e), 0, 1, 1}, /* PyObject cname: __pyx_n_u_e */ + {__pyx_k_empty, sizeof(__pyx_k_empty), 0, 1, 1}, /* PyObject cname: __pyx_n_u_empty */ + {__pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_enable */ + {__pyx_k_enum, sizeof(__pyx_k_enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enum */ + {__pyx_k_err, sizeof(__pyx_k_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_err */ + {__pyx_k_fd, sizeof(__pyx_k_fd), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fd */ + {__pyx_k_fh, sizeof(__pyx_k_fh), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fh */ + {__pyx_k_file_offset, sizeof(__pyx_k_file_offset), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_offset */ + {__pyx_k_file_offset_p, sizeof(__pyx_k_file_offset_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_offset_p */ + {__pyx_k_flag, sizeof(__pyx_k_flag), 0, 1, 1}, /* PyObject cname: __pyx_n_u_flag */ + {__pyx_k_flags, sizeof(__pyx_k_flags), 0, 1, 1}, /* PyObject cname: __pyx_n_u_flags */ + {__pyx_k_formats, sizeof(__pyx_k_formats), 0, 1, 1}, /* PyObject cname: __pyx_n_u_formats */ + {__pyx_k_from_data, sizeof(__pyx_k_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_from_data */ + {__pyx_k_from_ptr, sizeof(__pyx_k_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_from_ptr */ + {__pyx_k_fs_ops, sizeof(__pyx_k_fs_ops), 0, 1, 1}, /* PyObject cname: __pyx_n_u_fs_ops */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_gc */ + {__pyx_k_get_parameter_bool, sizeof(__pyx_k_get_parameter_bool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_parameter_bool */ + {__pyx_k_get_parameter_size_t, sizeof(__pyx_k_get_parameter_size_t), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_parameter_size_t */ + {__pyx_k_get_parameter_string, sizeof(__pyx_k_get_parameter_string), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_parameter_string */ + {__pyx_k_get_version, sizeof(__pyx_k_get_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_version */ + {__pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getstate */ + {__pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle */ + {__pyx_k_handle_deregister, sizeof(__pyx_k_handle_deregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_deregister */ + {__pyx_k_handle_register, sizeof(__pyx_k_handle_register), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_register */ + {__pyx_k_hex, sizeof(__pyx_k_hex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_hex */ + {__pyx_k_id, sizeof(__pyx_k_id), 0, 1, 1}, /* PyObject cname: __pyx_n_u_id */ + {__pyx_k_index_is_out_of_bounds, sizeof(__pyx_k_index_is_out_of_bounds), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_index_is_out_of_bounds */ + {__pyx_k_init, sizeof(__pyx_k_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_init */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_int32, sizeof(__pyx_k_int32), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int32 */ + {__pyx_k_int64, sizeof(__pyx_k_int64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int64 */ + {__pyx_k_int_argument_must_be_a_bytes_lik, sizeof(__pyx_k_int_argument_must_be_a_bytes_lik), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_int_argument_must_be_a_bytes_lik */ + {__pyx_k_intp, sizeof(__pyx_k_intp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_intp */ + {__pyx_k_io_events_dtype, sizeof(__pyx_k_io_events_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_io_events_dtype */ + {__pyx_k_io_params_dtype, sizeof(__pyx_k_io_params_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_io_params_dtype */ + {__pyx_k_iocbp, sizeof(__pyx_k_iocbp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_iocbp */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_isenabled */ + {__pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_itemsize */ + {__pyx_k_itemsize_2, sizeof(__pyx_k_itemsize_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_itemsize_2 */ + {__pyx_k_len, sizeof(__pyx_k_len), 0, 1, 1}, /* PyObject cname: __pyx_n_u_len */ + {__pyx_k_length, sizeof(__pyx_k_length), 0, 1, 1}, /* PyObject cname: __pyx_n_u_length */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_max_cache_size, sizeof(__pyx_k_max_cache_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_cache_size */ + {__pyx_k_max_direct_io_size, sizeof(__pyx_k_max_direct_io_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_direct_io_size */ + {__pyx_k_max_pinned_size, sizeof(__pyx_k_max_pinned_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_pinned_size */ + {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ + {__pyx_k_min_nr, sizeof(__pyx_k_min_nr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_min_nr */ + {__pyx_k_mismatches_struct_size, sizeof(__pyx_k_mismatches_struct_size), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_mismatches_struct_size */ + {__pyx_k_mismatches_union_size, sizeof(__pyx_k_mismatches_union_size), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_mismatches_union_size */ + {__pyx_k_mode, sizeof(__pyx_k_mode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mode */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_names, sizeof(__pyx_k_names), 0, 1, 1}, /* PyObject cname: __pyx_n_u_names */ + {__pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ndarray */ + {__pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ndim */ + {__pyx_k_new, sizeof(__pyx_k_new), 0, 1, 1}, /* PyObject cname: __pyx_n_u_new */ + {__pyx_k_nr, sizeof(__pyx_k_nr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nr */ + {__pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numpy */ + {__pyx_k_numpy_2, sizeof(__pyx_k_numpy_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numpy_2 */ + {__pyx_k_obj, sizeof(__pyx_k_obj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_obj */ + {__pyx_k_object_at, sizeof(__pyx_k_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_object_at */ + {__pyx_k_offsets, sizeof(__pyx_k_offsets), 0, 1, 1}, /* PyObject cname: __pyx_n_u_offsets */ + {__pyx_k_op_status_error, sizeof(__pyx_k_op_status_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_op_status_error */ + {__pyx_k_opcode, sizeof(__pyx_k_opcode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_opcode */ + {__pyx_k_param, sizeof(__pyx_k_param), 0, 1, 1}, /* PyObject cname: __pyx_n_u_param */ + {__pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pickle */ + {__pyx_k_poll, sizeof(__pyx_k_poll), 0, 1, 1}, /* PyObject cname: __pyx_n_u_poll */ + {__pyx_k_poll_threshold_size, sizeof(__pyx_k_poll_threshold_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_poll_threshold_size */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ + {__pyx_k_props, sizeof(__pyx_k_props), 0, 1, 1}, /* PyObject cname: __pyx_n_u_props */ + {__pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptr */ + {__pyx_k_ptr_must_not_be_null_0, sizeof(__pyx_k_ptr_must_not_be_null_0), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ptr_must_not_be_null_0 */ + {__pyx_k_pyCUresult, sizeof(__pyx_k_pyCUresult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyCUresult */ + {__pyx_k_py_anon_pod1, sizeof(__pyx_k_py_anon_pod1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1 */ + {__pyx_k_py_anon_pod1___reduce_cython, sizeof(__pyx_k_py_anon_pod1___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1___reduce_cython */ + {__pyx_k_py_anon_pod1___setstate_cython, sizeof(__pyx_k_py_anon_pod1___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1___setstate_cython */ + {__pyx_k_py_anon_pod1_dtype, sizeof(__pyx_k_py_anon_pod1_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1_dtype */ + {__pyx_k_py_anon_pod1_from_data, sizeof(__pyx_k_py_anon_pod1_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1_from_data */ + {__pyx_k_py_anon_pod1_from_ptr, sizeof(__pyx_k_py_anon_pod1_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod1_from_ptr */ + {__pyx_k_py_anon_pod1_object_at, sizeof(__pyx_k_py_anon_pod1_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_py_anon_pod1_object_at */ + {__pyx_k_py_anon_pod2, sizeof(__pyx_k_py_anon_pod2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2 */ + {__pyx_k_py_anon_pod2___reduce_cython, sizeof(__pyx_k_py_anon_pod2___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2___reduce_cython */ + {__pyx_k_py_anon_pod2___setstate_cython, sizeof(__pyx_k_py_anon_pod2___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2___setstate_cython */ + {__pyx_k_py_anon_pod2_dtype, sizeof(__pyx_k_py_anon_pod2_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2_dtype */ + {__pyx_k_py_anon_pod2_from_data, sizeof(__pyx_k_py_anon_pod2_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2_from_data */ + {__pyx_k_py_anon_pod2_from_ptr, sizeof(__pyx_k_py_anon_pod2_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod2_from_ptr */ + {__pyx_k_py_anon_pod2_object_at, sizeof(__pyx_k_py_anon_pod2_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_py_anon_pod2_object_at */ + {__pyx_k_py_anon_pod3, sizeof(__pyx_k_py_anon_pod3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3 */ + {__pyx_k_py_anon_pod3___reduce_cython, sizeof(__pyx_k_py_anon_pod3___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3___reduce_cython */ + {__pyx_k_py_anon_pod3___setstate_cython, sizeof(__pyx_k_py_anon_pod3___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3___setstate_cython */ + {__pyx_k_py_anon_pod3_dtype, sizeof(__pyx_k_py_anon_pod3_dtype), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3_dtype */ + {__pyx_k_py_anon_pod3_from_data, sizeof(__pyx_k_py_anon_pod3_from_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3_from_data */ + {__pyx_k_py_anon_pod3_from_ptr, sizeof(__pyx_k_py_anon_pod3_from_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_py_anon_pod3_from_ptr */ + {__pyx_k_py_anon_pod3_object_at, sizeof(__pyx_k_py_anon_pod3_object_at), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_py_anon_pod3_object_at */ + {__pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_PickleError */ + {__pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_checksum */ + {__pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_result */ + {__pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_state */ + {__pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_type */ + {__pyx_k_pyx_unpickle_Descr, sizeof(__pyx_k_pyx_unpickle_Descr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle_Descr */ + {__pyx_k_pyx_unpickle_IOEvents, sizeof(__pyx_k_pyx_unpickle_IOEvents), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle_IOEvents */ + {__pyx_k_pyx_unpickle_IOParams, sizeof(__pyx_k_pyx_unpickle_IOParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle_IOParams */ + {__pyx_k_pyx_unpickle__py_anon_pod1, sizeof(__pyx_k_pyx_unpickle__py_anon_pod1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle__py_anon_pod1 */ + {__pyx_k_pyx_unpickle__py_anon_pod2, sizeof(__pyx_k_pyx_unpickle__py_anon_pod2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle__py_anon_pod2 */ + {__pyx_k_pyx_unpickle__py_anon_pod3, sizeof(__pyx_k_pyx_unpickle__py_anon_pod3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_unpickle__py_anon_pod3 */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_read, sizeof(__pyx_k_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read */ + {__pyx_k_read_async, sizeof(__pyx_k_read_async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read_async */ + {__pyx_k_readonly, sizeof(__pyx_k_readonly), 0, 1, 1}, /* PyObject cname: __pyx_n_u_readonly */ + {__pyx_k_recarray, sizeof(__pyx_k_recarray), 0, 1, 1}, /* PyObject cname: __pyx_n_u_recarray */ + {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ + {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */ + {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */ + {__pyx_k_ret, sizeof(__pyx_k_ret), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ret */ + {__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */ + {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_set_parameter_bool, sizeof(__pyx_k_set_parameter_bool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_parameter_bool */ + {__pyx_k_set_parameter_size_t, sizeof(__pyx_k_set_parameter_size_t), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_parameter_size_t */ + {__pyx_k_set_parameter_string, sizeof(__pyx_k_set_parameter_string), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_parameter_string */ + {__pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate */ + {__pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate_cython */ + {__pyx_k_size, sizeof(__pyx_k_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size */ + {__pyx_k_size_2, sizeof(__pyx_k_size_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size_2 */ + {__pyx_k_size_p, sizeof(__pyx_k_size_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size_p */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_state, sizeof(__pyx_k_state), 0, 1, 1}, /* PyObject cname: __pyx_n_u_state */ + {__pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 1, 1}, /* PyObject cname: __pyx_n_u_staticmethod */ + {__pyx_k_status, sizeof(__pyx_k_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_status */ + {__pyx_k_stream, sizeof(__pyx_k_stream), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stream */ + {__pyx_k_stream_deregister, sizeof(__pyx_k_stream_deregister), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stream_deregister */ + {__pyx_k_stream_register, sizeof(__pyx_k_stream_register), 0, 1, 1}, /* PyObject cname: __pyx_n_u_stream_register */ + {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */ + {__pyx_k_super, sizeof(__pyx_k_super), 0, 1, 1}, /* PyObject cname: __pyx_n_u_super */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 1, 1}, /* PyObject cname: __pyx_n_u_timeout */ + {__pyx_k_type, sizeof(__pyx_k_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_type */ + {__pyx_k_u, sizeof(__pyx_k_u), 0, 1, 1}, /* PyObject cname: __pyx_n_u_u */ + {__pyx_k_uint64, sizeof(__pyx_k_uint64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_uint64 */ + {__pyx_k_update, sizeof(__pyx_k_update), 0, 1, 1}, /* PyObject cname: __pyx_n_u_update */ + {__pyx_k_use_count, sizeof(__pyx_k_use_count), 0, 1, 1}, /* PyObject cname: __pyx_n_u_use_count */ + {__pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_use_setstate */ + {__pyx_k_value, sizeof(__pyx_k_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value */ + {__pyx_k_view, sizeof(__pyx_k_view), 0, 1, 1}, /* PyObject cname: __pyx_n_u_view */ + {__pyx_k_void, sizeof(__pyx_k_void), 0, 1, 1}, /* PyObject cname: __pyx_n_u_void */ + {__pyx_k_write, sizeof(__pyx_k_write), 0, 1, 1}, /* PyObject cname: __pyx_n_u_write */ + {__pyx_k_write_async, sizeof(__pyx_k_write_async), 0, 1, 1}, /* PyObject cname: __pyx_n_u_write_async */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 972, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/cufile.pyx":122 + * cdef object buf = PyMemoryView_FromMemory( + * ptr, sizeof((NULL).handle), flag) + * data = _numpy.ndarray((1,), buffer=buf, # <<<<<<<<<<<<<< + * dtype=_py_anon_pod1_dtype) + * obj._data = data.view(_numpy.recarray) +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum not in (0xa75e18a, 0xc05ad22, 0x7125153): # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xa75e18a, 0xc05ad22, 0x7125153) = (_data))" % __pyx_checksum +*/ + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_175497610, __pyx_mstate_global->__pyx_int_201698594, __pyx_mstate_global->__pyx_int_118640979); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_203986659, __pyx_mstate_global->__pyx_int_224525342, __pyx_mstate_global->__pyx_int_6135074); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(2, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); + + /* "cuda/bindings/cufile.pyx":108 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, bint readonly=False): + * """Create an _py_anon_pod1 instance wrapping the given pointer. +*/ + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); + + /* "cuda/bindings/cufile.pyx":374 + * return obj + * + * @staticmethod # <<<<<<<<<<<<<< + * def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + * """Create an IOEvents instance wrapping the given pointer. +*/ + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); + + /* "cuda/bindings/cufile.pyx":964 + * class cuFileError(Exception): + * + * def __init__(self, status, cu_err=None): # <<<<<<<<<<<<<< + * self.status = status + * self.cuda_error = cu_err +*/ + __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_8 = PyLong_FromLong(8); if (unlikely(!__pyx_mstate->__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_16 = PyLong_FromLong(16); if (unlikely(!__pyx_mstate->__pyx_int_16)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_40 = PyLong_FromLong(40); if (unlikely(!__pyx_mstate->__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_48 = PyLong_FromLong(48); if (unlikely(!__pyx_mstate->__pyx_int_48)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_56 = PyLong_FromLong(56); if (unlikely(!__pyx_mstate->__pyx_int_56)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_6135074 = PyLong_FromLong(6135074L); if (unlikely(!__pyx_mstate->__pyx_int_6135074)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_118640979 = PyLong_FromLong(118640979L); if (unlikely(!__pyx_mstate->__pyx_int_118640979)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_175497610 = PyLong_FromLong(175497610L); if (unlikely(!__pyx_mstate->__pyx_int_175497610)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_201698594 = PyLong_FromLong(201698594L); if (unlikely(!__pyx_mstate->__pyx_int_201698594)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_203986659 = PyLong_FromLong(203986659L); if (unlikely(!__pyx_mstate->__pyx_int_203986659)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_224525342 = PyLong_FromLong(224525342L); if (unlikely(!__pyx_mstate->__pyx_int_224525342)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 11; + unsigned int line_table_length : 12; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90, 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 108, 112}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_4s_AQ_haq_G_q_1_5_0_Zq_vXRuG1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_G1F_a_vWA_q_t7_q_d_7_WA_d_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211, 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 229, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_4s_AQ_haq_G_q_1_5_35_1_vXRuG1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_G1F_a_vWA_q_t7_q_d_7_WA_d_7_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 356, 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_HHAQ_4z_z_q_1A_4vS_AQ_4wc_AQ_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 374, 112}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_A_4s_AQ_HHAQ_G_q_1_5_1_6_vXRxw, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_G1F_a_vWA_q_t7_q_Qg_q_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 500, 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 518, 112}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_A_4s_AQ_haq_G_q_1_5_b_a_vXRxwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_G1F_a_vWA_q_t7_q_d_7_WA_d_7_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_1F_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 593, 140}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_batch_addr}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_haq_4z_z_q_1A_4vS_AQ_4wc_AQ_9D_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 613, 149}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_batch_addr}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_4s_AQ_haq_G_q_1_5_35_Q_vXRuG1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 107}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_a_G1F_a_vWA_q_t87_s_gWA_q_d_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_1F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 764, 103}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_obj}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_data, __pyx_k_A_HHAQ_4z_z_q_1A_4vS_AQ_4wc_AQ_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 782, 112}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ptr, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_readonly, __pyx_mstate->__pyx_n_u_obj, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_data}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_from_ptr, __pyx_k_A_A_4s_AQ_HHAQ_G_q_1_5_1_6_vXRxw, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 93}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_T_G1F_a_vWA_q_t7_q_Qg_q_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 964, 98}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_cu_err, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_e}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_k_q_Ja_N_G1A_r_Qiq_1_7_1_2_1_Qm5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 974, 19}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_k_A_AXT_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 996, 41}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_descr}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_handle_register, __pyx_k_7q_Qat_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1014, 13}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fh}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_handle_deregister, __pyx_k_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1025, 30}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf_ptr_base, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_flags}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_buf_register, __pyx_k_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1040, 26}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_buf_ptr_base}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_buf_deregister, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1053, 36}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fh, __pyx_mstate->__pyx_n_u_buf_ptr_base, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_file_offset, __pyx_mstate->__pyx_n_u_buf_ptr_offset}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_read, __pyx_k_1HD_V_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1070, 36}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fh, __pyx_mstate->__pyx_n_u_buf_ptr_base, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_file_offset, __pyx_mstate->__pyx_n_u_buf_ptr_offset}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_k_AXT_nF_WX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1087, 22}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_open, __pyx_k__8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1097, 21}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_use_count, __pyx_k_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1107, 27}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_props}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_get_properties, __pyx_k_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1120, 28}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_poll, __pyx_mstate->__pyx_n_u_poll_threshold_size}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_set_poll_mode, __pyx_k_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1134, 24}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_max_direct_io_size}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_set_max_direct_io_size, __pyx_k_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1147, 24}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_max_cache_size}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_set_max_cache_size, __pyx_k_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1160, 24}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_max_pinned_size}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_set_max_pinned_mem_size, __pyx_k_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1173, 36}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_nr}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_batch_io_set_up, __pyx_k_4A_1A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1181, 35}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch_idp, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_iocbp, __pyx_mstate->__pyx_n_u_flags}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_batch_io_submit, __pyx_k_A_TATT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1187, 43}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch_idp, __pyx_mstate->__pyx_n_u_min_nr, __pyx_mstate->__pyx_n_u_nr, __pyx_mstate->__pyx_n_u_iocbp, __pyx_mstate->__pyx_n_u_timeout}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_batch_io_get_status, __pyx_k_q_SWWjjqq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1193, 24}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch_idp}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_batch_io_cancel, __pyx_k_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1199, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_batch_idp}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_batch_io_destroy, __pyx_k_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1203, 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fh, __pyx_mstate->__pyx_n_u_buf_ptr_base, __pyx_mstate->__pyx_n_u_size_p, __pyx_mstate->__pyx_n_u_file_offset_p, __pyx_mstate->__pyx_n_u_buf_ptr_offset_p, __pyx_mstate->__pyx_n_u_bytes_read_p, __pyx_mstate->__pyx_n_u_stream}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_read_async, __pyx_k_WN_8S_jjr_s_E_E_O_O_d_d_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1209, 76}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fh, __pyx_mstate->__pyx_n_u_buf_ptr_base, __pyx_mstate->__pyx_n_u_size_p, __pyx_mstate->__pyx_n_u_file_offset_p, __pyx_mstate->__pyx_n_u_buf_ptr_offset_p, __pyx_mstate->__pyx_n_u_bytes_written_p, __pyx_mstate->__pyx_n_u_stream}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_write_async, __pyx_k_g_9HT_kks_t_F_F_P_P_a_a_h_h_i, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1215, 26}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream, __pyx_mstate->__pyx_n_u_flags}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_stream_register, __pyx_k_QgXQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1221, 24}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_stream}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_stream_deregister, __pyx_k_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1227, 32}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_get_version, __pyx_k_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1235, 37}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_get_parameter_size_t, __pyx_k_5Q_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1243, 37}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_get_parameter_bool, __pyx_k_1_q_gQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1251, 53}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_len}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_get_parameter_string, __pyx_k_E_B_ST_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1260, 27}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_set_parameter_size_t, __pyx_k_q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1266, 29}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_set_parameter_bool, __pyx_k_q_gZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1272, 30}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_param, __pyx_mstate->__pyx_n_u_desc_str}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_set_parameter_string, __pyx_k_B_VW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1278, 25}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_status}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_op_status_error, __pyx_k_AZq_87, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1291, 22}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_cufile_pyx, __pyx_mstate->__pyx_n_u_driver_close, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 76}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__py_anon_pod1, __pyx_k_hk_A_1_pprrs_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 76}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__py_anon_pod3, __pyx_k_hk_A_1_pprrs_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_IOEvents, __pyx_k_hk_A_1_pprrs_881A_7_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Descr, __pyx_k_hk_A_1_pprrs_5_7_q_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 76}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle__py_anon_pod2, __pyx_k_hk_A_1_xxzz_7_q0_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 75}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_PickleError, __pyx_mstate->__pyx_n_u_pyx_result}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_IOParams, __pyx_k_hk_A_1_pprrs_881A_7_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* CIntToDigits */ +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + +/* BuildPyUnicode */ +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } +#else + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyUnicode_Concat(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyUnicode_Concat(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + return uval; +} + +/* COrdinalToPyUnicode */ +static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { + return value <= 1114111; +} +static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { + if (likely(ulength <= 250)) { + char chars[256]; + if (value <= 255) { + memset(chars, padding_char, (size_t) (ulength - 1)); + chars[ulength-1] = (char) value; + return PyUnicode_DecodeLatin1(chars, ulength, NULL); + } + char *cpos = chars + sizeof(chars); + if (value < 0x800) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xc0 | (value & 0x1f)); + } else if (value < 0x10000) { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xe0 | (value & 0x0f)); + } else { + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0x80 | (value & 0x3f)); + value >>= 6; + *--cpos = (char) (0xf0 | (value & 0x07)); + } + cpos -= ulength; + memset(cpos, padding_char, (size_t) (ulength - 1)); + return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); + } + if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { + const char chars[1] = {(char) value}; + return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); + } + { + PyObject *uchar, *padding_uchar, *padding, *result; + padding_uchar = PyUnicode_FromOrdinal(padding_char); + if (unlikely(!padding_uchar)) return NULL; + padding = PySequence_Repeat(padding_uchar, ulength - 1); + Py_DECREF(padding_uchar); + if (unlikely(!padding)) return NULL; + uchar = PyUnicode_FromOrdinal(value); + if (unlikely(!uchar)) { + Py_DECREF(padding); + return NULL; + } + result = PyUnicode_Concat(padding, uchar); + Py_DECREF(padding); + Py_DECREF(uchar); + return result; + } +} + +/* CIntToPyUnicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_size_t(size_t value, Py_ssize_t width, char padding_char, char format_char) { + char digits[sizeof(size_t)*3+2]; + char *dpos, *end = digits + sizeof(size_t)*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + size_t remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (format_char == 'c') { + if (unlikely(!(is_unsigned || value == 0 || value > 0) || + !(sizeof(value) <= 2 || value & ~ (size_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { + PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); + return NULL; + } + if (width <= 1) { + return PyUnicode_FromOrdinal((int) value); + } + return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); + } + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + remaining = value; + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = (size_t) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = (size_t) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = (size_t) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + assert(!last_one_off || *dpos == '0'); + dpos += last_one_off; + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_PyList_GetItemRef(o, n); + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); +} + +/* UnpackUnboundCMethod */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 0; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) != 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 1; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 1; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal != 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a != (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_NE)); +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + if (unlikely(!__Pyx_PyLong_CompactAsLong(op1, &a))) { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); + + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* SliceObject */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { + __Pyx_TypeName obj_type_name; +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif + { + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyLong_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyLong_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); +bad: + return NULL; +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* DictGetItem */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } + } + return value; +} +#endif + +/* PyUnicode_Unicode */ +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = __pyx_mstate_global->__pyx_kp_u_None; + return __Pyx_NewRef(obj); +} + +/* UnicodeConcatInPlace */ +# if CYTHON_COMPILING_IN_CPYTHON +static int +__Pyx_unicode_modifiable(PyObject *unicode) +{ + if (Py_REFCNT(unicode) != 1) + return 0; + if (!PyUnicode_CheckExact(unicode)) + return 0; + if (PyUnicode_CHECK_INTERNED(unicode)) + return 0; + return 1; +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right + #if CYTHON_REFNANNY + , void* __pyx_refnanny + #endif + ) { + PyObject *left = *p_left; + Py_ssize_t left_len, right_len, new_len; + if (unlikely(__Pyx_PyUnicode_READY(left) == -1)) + return NULL; + if (unlikely(__Pyx_PyUnicode_READY(right) == -1)) + return NULL; + left_len = PyUnicode_GET_LENGTH(left); + if (left_len == 0) { + Py_INCREF(right); + return right; + } + right_len = PyUnicode_GET_LENGTH(right); + if (right_len == 0) { + Py_INCREF(left); + return left; + } + if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) { + PyErr_SetString(PyExc_OverflowError, + "strings are too large to concat"); + return NULL; + } + new_len = left_len + right_len; + if (__Pyx_unicode_modifiable(left) + && PyUnicode_CheckExact(right) + && PyUnicode_KIND(right) <= PyUnicode_KIND(left) + && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { + int ret; + __Pyx_GIVEREF(*p_left); + ret = PyUnicode_Resize(p_left, new_len); + __Pyx_GOTREF(*p_left); + if (unlikely(ret != 0)) + return NULL; + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL; + #else + _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len); + #endif + __Pyx_INCREF(*p_left); + __Pyx_GIVEREF(*p_left); + return *p_left; + } else { + return __Pyx_PyUnicode_Concat(left, right); + } + } +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* decode_c_bytes */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *module = 0; + PyObject *empty_dict = 0; + PyObject *empty_list = 0; + empty_dict = PyDict_New(); + if (unlikely(!empty_dict)) + goto bad; + if (level == -1) { + const char* package_sep = strchr(__Pyx_MODULE_NAME, '.'); + if (package_sep != (0)) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__6); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* HasAttr */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!PyUnicode_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (!r) { + return (unlikely(PyErr_Occurred())) ? -1 : 0; + } else { + Py_DECREF(r); + return 1; + } +} +#endif + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* ValidateBasesTuple */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* DelItemOnTypeDict */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_1_5 +#define __PYX_HAVE_RT_ImportType_3_1_5 +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_5 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_5 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* GetNameInClass */ +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + PyObject *dict; + assert(PyType_Check(nmspace)); +#if CYTHON_USE_TYPE_SLOTS + dict = ((PyTypeObject*)nmspace)->tp_dict; + Py_XINCREF(dict); +#else + dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); +#endif + if (likely(dict)) { + result = PyObject_GetItem(dict, name); + Py_DECREF(dict); + if (result) { + return result; + } + } + PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileOpError(CUfileOpError value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileOpError neg_one = (CUfileOpError) -1, const_zero = (CUfileOpError) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileOpError) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileOpError) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileOpError) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileOpError) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileOpError) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileOpError), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileOpError)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileDriverStatusFlags_t(CUfileDriverStatusFlags_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileDriverStatusFlags_t neg_one = (CUfileDriverStatusFlags_t) -1, const_zero = (CUfileDriverStatusFlags_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileDriverStatusFlags_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileDriverStatusFlags_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileDriverStatusFlags_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileDriverStatusFlags_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileDriverStatusFlags_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileDriverStatusFlags_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileDriverStatusFlags_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileDriverControlFlags_t(CUfileDriverControlFlags_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileDriverControlFlags_t neg_one = (CUfileDriverControlFlags_t) -1, const_zero = (CUfileDriverControlFlags_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileDriverControlFlags_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileDriverControlFlags_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileDriverControlFlags_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileDriverControlFlags_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileDriverControlFlags_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileDriverControlFlags_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileDriverControlFlags_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileFeatureFlags_t(CUfileFeatureFlags_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileFeatureFlags_t neg_one = (CUfileFeatureFlags_t) -1, const_zero = (CUfileFeatureFlags_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileFeatureFlags_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileFeatureFlags_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileFeatureFlags_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileFeatureFlags_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileFeatureFlags_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileFeatureFlags_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileFeatureFlags_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileFileHandleType(CUfileFileHandleType value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileFileHandleType neg_one = (CUfileFileHandleType) -1, const_zero = (CUfileFileHandleType) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileFileHandleType) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileFileHandleType) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileFileHandleType) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileFileHandleType) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileFileHandleType) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileFileHandleType), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileFileHandleType)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileOpcode_t(CUfileOpcode_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileOpcode_t neg_one = (CUfileOpcode_t) -1, const_zero = (CUfileOpcode_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileOpcode_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileOpcode_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileOpcode_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileOpcode_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileOpcode_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileOpcode_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileOpcode_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileStatus_t(CUfileStatus_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileStatus_t neg_one = (CUfileStatus_t) -1, const_zero = (CUfileStatus_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileStatus_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileStatus_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileStatus_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileStatus_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileStatus_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileStatus_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileStatus_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUfileBatchMode_t(CUfileBatchMode_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUfileBatchMode_t neg_one = (CUfileBatchMode_t) -1, const_zero = (CUfileBatchMode_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUfileBatchMode_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUfileBatchMode_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUfileBatchMode_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUfileBatchMode_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUfileBatchMode_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUfileBatchMode_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUfileBatchMode_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileSizeTConfigParameter_t(CUFileSizeTConfigParameter_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUFileSizeTConfigParameter_t neg_one = (CUFileSizeTConfigParameter_t) -1, const_zero = (CUFileSizeTConfigParameter_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUFileSizeTConfigParameter_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUFileSizeTConfigParameter_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUFileSizeTConfigParameter_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUFileSizeTConfigParameter_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUFileSizeTConfigParameter_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUFileSizeTConfigParameter_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUFileSizeTConfigParameter_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileBoolConfigParameter_t(CUFileBoolConfigParameter_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUFileBoolConfigParameter_t neg_one = (CUFileBoolConfigParameter_t) -1, const_zero = (CUFileBoolConfigParameter_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUFileBoolConfigParameter_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUFileBoolConfigParameter_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUFileBoolConfigParameter_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUFileBoolConfigParameter_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUFileBoolConfigParameter_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUFileBoolConfigParameter_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUFileBoolConfigParameter_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_CUFileStringConfigParameter_t(CUFileStringConfigParameter_t value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const CUFileStringConfigParameter_t neg_one = (CUFileStringConfigParameter_t) -1, const_zero = (CUFileStringConfigParameter_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(CUFileStringConfigParameter_t) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(CUFileStringConfigParameter_t) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(CUFileStringConfigParameter_t) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(CUFileStringConfigParameter_t) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(CUFileStringConfigParameter_t) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(CUFileStringConfigParameter_t), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(CUFileStringConfigParameter_t)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE off_t __Pyx_PyLong_As_off_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const off_t neg_one = (off_t) -1, const_zero = (off_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + off_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (off_t) -1; + val = __Pyx_PyLong_As_off_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(off_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(off_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) >= 2 * PyLong_SHIFT)) { + return (off_t) (((((off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(off_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) >= 3 * PyLong_SHIFT)) { + return (off_t) (((((((off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(off_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) >= 4 * PyLong_SHIFT)) { + return (off_t) (((((((((off_t)digits[3]) << PyLong_SHIFT) | (off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (off_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(off_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(off_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(off_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(off_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(off_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(off_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 2 * PyLong_SHIFT)) { + return (off_t) (((off_t)-1)*(((((off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(off_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 2 * PyLong_SHIFT)) { + return (off_t) ((((((off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(off_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 3 * PyLong_SHIFT)) { + return (off_t) (((off_t)-1)*(((((((off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(off_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 3 * PyLong_SHIFT)) { + return (off_t) ((((((((off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(off_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 4 * PyLong_SHIFT)) { + return (off_t) (((off_t)-1)*(((((((((off_t)digits[3]) << PyLong_SHIFT) | (off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(off_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(off_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(off_t) - 1 > 4 * PyLong_SHIFT)) { + return (off_t) ((((((((((off_t)digits[3]) << PyLong_SHIFT) | (off_t)digits[2]) << PyLong_SHIFT) | (off_t)digits[1]) << PyLong_SHIFT) | (off_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(off_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(off_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(off_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(off_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + off_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (off_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (off_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (off_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (off_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(off_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((off_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(off_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((off_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((off_t) 1) << (sizeof(off_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (off_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to off_t"); + return (off_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to off_t"); + return (off_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyLong_As_unsigned_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + unsigned int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned int) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned int"); + return (unsigned int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From___pyx_anon_enum(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__cudaError_enum(enum cudaError_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum cudaError_enum neg_one = (enum cudaError_enum) -1, const_zero = (enum cudaError_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum cudaError_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum cudaError_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum cudaError_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum cudaError_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum cudaError_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum cudaError_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum cudaError_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__7); + } + goto done; +} +#endif + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..a0cc3016dcbec74ac1861e36dd25a7f639b83450 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pxd @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t + +from .cycufile cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef CUfileHandle_t Handle +ctypedef CUfileBatchHandle_t BatchHandle +ctypedef CUfileError_t Error +ctypedef cufileRDMAInfo_t RDMAInfo +ctypedef CUfileFSOps_t FSOps +ctypedef CUfileDrvProps_t DrvProps + + +############################################################################### +# Enum +############################################################################### + +ctypedef CUfileOpError _OpError +ctypedef CUfileDriverStatusFlags_t _DriverStatusFlags +ctypedef CUfileDriverControlFlags_t _DriverControlFlags +ctypedef CUfileFeatureFlags_t _FeatureFlags +ctypedef CUfileFileHandleType _FileHandleType +ctypedef CUfileOpcode_t _Opcode +ctypedef CUfileStatus_t _Status +ctypedef CUfileBatchMode_t _BatchMode +ctypedef CUFileSizeTConfigParameter_t _SizeTConfigParameter +ctypedef CUFileBoolConfigParameter_t _BoolConfigParameter +ctypedef CUFileStringConfigParameter_t _StringConfigParameter + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t handle_register(intptr_t descr) except? 0 +cpdef void handle_deregister(intptr_t fh) except* +cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags) +cpdef buf_deregister(intptr_t buf_ptr_base) +cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset) +cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset) +cpdef driver_open() +cpdef use_count() +cpdef driver_get_properties(intptr_t props) +cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size) +cpdef driver_set_max_direct_io_size(size_t max_direct_io_size) +cpdef driver_set_max_cache_size(size_t max_cache_size) +cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size) +cpdef intptr_t batch_io_set_up(unsigned nr) except? 0 +cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags) +cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout) +cpdef batch_io_cancel(intptr_t batch_idp) +cpdef void batch_io_destroy(intptr_t batch_idp) except* +cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream) +cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream) +cpdef stream_register(intptr_t stream, unsigned flags) +cpdef stream_deregister(intptr_t stream) +cpdef int get_version() except? 0 +cpdef size_t get_parameter_size_t(int param) except? 0 +cpdef bint get_parameter_bool(int param) except? 0 +cpdef str get_parameter_string(int param, int len) +cpdef set_parameter_size_t(int param, size_t value) +cpdef set_parameter_bool(int param, bint value) +cpdef set_parameter_string(int param, intptr_t desc_str) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pyx new file mode 100644 index 0000000000000000000000000000000000000000..176149a6e36b5fe2413b07c6f1d91d2c2ce661e9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cufile.pyx @@ -0,0 +1,1296 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +cimport cython # NOQA +from libc cimport errno +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) +import numpy as _numpy +from cpython cimport buffer as _buffer +from cpython.memoryview cimport PyMemoryView_FromMemory +from enum import IntEnum as _IntEnum + +import cython + +from cuda.bindings.driver import CUresult as pyCUresult + + +############################################################################### +# POD +############################################################################### + +_py_anon_pod1_dtype = _numpy.dtype(( + _numpy.dtype((_numpy.void, sizeof((NULL).handle))), + { + "fd": (_numpy.int32, 0), + "handle": (_numpy.intp, 0), + } + )) + + +cdef class _py_anon_pod1: + """Empty-initialize an instance of `_anon_pod1`. + + + .. seealso:: `_anon_pod1` + """ + cdef: + readonly object _data + + def __init__(self): + arr = _numpy.empty(1, dtype=_py_anon_pod1_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof((NULL).handle), \ + f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).handle)}" + + def __repr__(self): + return f"<{__name__}._py_anon_pod1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + return self._data.ctypes.data + + def __eq__(self, other): + if not isinstance(other, _py_anon_pod1): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def fd(self): + """int: """ + return int(self._data.fd[0]) + + @fd.setter + def fd(self, val): + self._data.fd = val + + @property + def handle(self): + """int: """ + return int(self._data.handle[0]) + + @handle.setter + def handle(self, val): + self._data.handle = val + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an _py_anon_pod1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod1_dtype` holding the data. + """ + cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != _py_anon_pod1_dtype: + raise ValueError("data array must be of dtype _py_anon_pod1_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False): + """Create an _py_anon_pod1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef _py_anon_pod1 obj = _py_anon_pod1.__new__(_py_anon_pod1) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof((NULL).handle), flag) + data = _numpy.ndarray((1,), buffer=buf, + dtype=_py_anon_pod1_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +_py_anon_pod3_dtype = _numpy.dtype([ + ("dev_ptr_base", _numpy.intp, ), + ("file_offset", _numpy.int64, ), + ("dev_ptr_offset", _numpy.int64, ), + ("size_", _numpy.uint64, ), + ], align=True) + + +cdef class _py_anon_pod3: + """Empty-initialize an instance of `_anon_pod3`. + + + .. seealso:: `_anon_pod3` + """ + cdef: + readonly object _data + + def __init__(self): + arr = _numpy.empty(1, dtype=_py_anon_pod3_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof((NULL).u.batch), \ + f"itemsize {self._data.itemsize} mismatches struct size {sizeof((NULL).u.batch)}" + + def __repr__(self): + return f"<{__name__}._py_anon_pod3 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + return self._data.ctypes.data + + def __eq__(self, other): + if not isinstance(other, _py_anon_pod3): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def dev_ptr_base(self): + """int: """ + return int(self._data.dev_ptr_base[0]) + + @dev_ptr_base.setter + def dev_ptr_base(self, val): + self._data.dev_ptr_base = val + + @property + def file_offset(self): + """int: """ + return int(self._data.file_offset[0]) + + @file_offset.setter + def file_offset(self, val): + self._data.file_offset = val + + @property + def dev_ptr_offset(self): + """int: """ + return int(self._data.dev_ptr_offset[0]) + + @dev_ptr_offset.setter + def dev_ptr_offset(self, val): + self._data.dev_ptr_offset = val + + @property + def size_(self): + """int: """ + return int(self._data.size_[0]) + + @size_.setter + def size_(self, val): + self._data.size_ = val + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an _py_anon_pod3 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod3_dtype` holding the data. + """ + cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != _py_anon_pod3_dtype: + raise ValueError("data array must be of dtype _py_anon_pod3_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False): + """Create an _py_anon_pod3 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef _py_anon_pod3 obj = _py_anon_pod3.__new__(_py_anon_pod3) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof((NULL).u.batch), flag) + data = _numpy.ndarray((1,), buffer=buf, + dtype=_py_anon_pod3_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +io_events_dtype = _numpy.dtype([ + ("cookie", _numpy.intp, ), + ("status", _numpy.int32, ), + ("ret", _numpy.uint64, ), + ], align=True) + + +cdef class IOEvents: + """Empty-initialize an array of `CUfileIOEvents_t`. + + The resulting object is of length `size` and of dtype `io_events_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + + .. seealso:: `CUfileIOEvents_t` + """ + cdef: + readonly object _data + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=io_events_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(CUfileIOEvents_t), \ + f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOEvents_t)}" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.IOEvents_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.IOEvents object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + if not isinstance(other, IOEvents): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def cookie(self): + """Union[~_numpy.intp, int]: """ + if self._data.size == 1: + return int(self._data.cookie[0]) + return self._data.cookie + + @cookie.setter + def cookie(self, val): + self._data.cookie = val + + @property + def status(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.status[0]) + return self._data.status + + @status.setter + def status(self, val): + self._data.status = val + + @property + def ret(self): + """Union[~_numpy.uint64, int]: """ + if self._data.size == 1: + return int(self._data.ret[0]) + return self._data.ret + + @ret.setter + def ret(self, val): + self._data.ret = val + + def __getitem__(self, key): + if isinstance(key, int): + size = self._data.size + if key >= size or key <= -(size+1): + raise IndexError("index is out of bounds") + if key < 0: + key += size + return IOEvents.from_data(self._data[key:key+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == io_events_dtype: + return IOEvents.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an IOEvents instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `io_events_dtype` holding the data. + """ + cdef IOEvents obj = IOEvents.__new__(IOEvents) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != io_events_dtype: + raise ValueError("data array must be of dtype io_events_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + """Create an IOEvents instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef IOEvents obj = IOEvents.__new__(IOEvents) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof(CUfileIOEvents_t) * size, flag) + data = _numpy.ndarray((size,), buffer=buf, + dtype=io_events_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +descr_dtype = _numpy.dtype([ + ("type", _numpy.int32, ), + ("handle", _py_anon_pod1_dtype, ), + ("fs_ops", _numpy.intp, ), + ], align=True) + + +cdef class Descr: + """Empty-initialize an array of `CUfileDescr_t`. + + The resulting object is of length `size` and of dtype `descr_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + + .. seealso:: `CUfileDescr_t` + """ + cdef: + readonly object _data + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=descr_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(CUfileDescr_t), \ + f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileDescr_t)}" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.Descr_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.Descr object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + if not isinstance(other, Descr): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def type(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.type[0]) + return self._data.type + + @type.setter + def type(self, val): + self._data.type = val + + @property + def handle(self): + """_py_anon_pod1_dtype: """ + return self._data.handle + + @handle.setter + def handle(self, val): + self._data.handle = val + + @property + def fs_ops(self): + """Union[~_numpy.intp, int]: """ + if self._data.size == 1: + return int(self._data.fs_ops[0]) + return self._data.fs_ops + + @fs_ops.setter + def fs_ops(self, val): + self._data.fs_ops = val + + def __getitem__(self, key): + if isinstance(key, int): + size = self._data.size + if key >= size or key <= -(size+1): + raise IndexError("index is out of bounds") + if key < 0: + key += size + return Descr.from_data(self._data[key:key+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == descr_dtype: + return Descr.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an Descr instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `descr_dtype` holding the data. + """ + cdef Descr obj = Descr.__new__(Descr) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != descr_dtype: + raise ValueError("data array must be of dtype descr_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + """Create an Descr instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef Descr obj = Descr.__new__(Descr) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof(CUfileDescr_t) * size, flag) + data = _numpy.ndarray((size,), buffer=buf, + dtype=descr_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +_py_anon_pod2_dtype = _numpy.dtype(( + _numpy.dtype((_numpy.void, sizeof((NULL).u))), + { + "batch": (_py_anon_pod3_dtype, 0), + } + )) + + +cdef class _py_anon_pod2: + """Empty-initialize an instance of `_anon_pod2`. + + + .. seealso:: `_anon_pod2` + """ + cdef: + readonly object _data + + readonly object _batch + + def __init__(self): + arr = _numpy.empty(1, dtype=_py_anon_pod2_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof((NULL).u), \ + f"itemsize {self._data.itemsize} mismatches union size {sizeof((NULL).u)}" + + def __repr__(self): + return f"<{__name__}._py_anon_pod2 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + return self._data.ctypes.data + + def __eq__(self, other): + if not isinstance(other, _py_anon_pod2): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def batch(self): + """_py_anon_pod3: """ + return self._batch + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an _py_anon_pod2 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `_py_anon_pod2_dtype` holding the data. + """ + cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != _py_anon_pod2_dtype: + raise ValueError("data array must be of dtype _py_anon_pod2_dtype") + obj._data = data.view(_numpy.recarray) + + batch_addr = obj._data.batch[0].__array_interface__['data'][0] + obj._batch = _py_anon_pod3.from_ptr(batch_addr) + return obj + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False): + """Create an _py_anon_pod2 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef _py_anon_pod2 obj = _py_anon_pod2.__new__(_py_anon_pod2) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof((NULL).u), flag) + data = _numpy.ndarray((1,), buffer=buf, + dtype=_py_anon_pod2_dtype) + obj._data = data.view(_numpy.recarray) + + batch_addr = obj._data.batch[0].__array_interface__['data'][0] + obj._batch = _py_anon_pod3.from_ptr(batch_addr) + return obj + + +io_params_dtype = _numpy.dtype([ + ("mode", _numpy.int32, ), + ("u", _py_anon_pod2_dtype, ), + ("fh", _numpy.intp, ), + ("opcode", _numpy.int32, ), + ("cookie", _numpy.intp, ), + ], align=True) + + +cdef class IOParams: + """Empty-initialize an array of `CUfileIOParams_t`. + + The resulting object is of length `size` and of dtype `io_params_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + + .. seealso:: `CUfileIOParams_t` + """ + cdef: + readonly object _data + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=io_params_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(CUfileIOParams_t), \ + f"itemsize {self._data.itemsize} mismatches struct size {sizeof(CUfileIOParams_t)}" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.IOParams_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.IOParams object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + if not isinstance(other, IOParams): + return False + if self._data.size != other._data.size: + return False + if self._data.dtype != other._data.dtype: + return False + return bool((self._data == other._data).all()) + + @property + def mode(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.mode[0]) + return self._data.mode + + @mode.setter + def mode(self, val): + self._data.mode = val + + @property + def u(self): + """_py_anon_pod2_dtype: """ + return self._data.u + + @u.setter + def u(self, val): + self._data.u = val + + @property + def fh(self): + """Union[~_numpy.intp, int]: """ + if self._data.size == 1: + return int(self._data.fh[0]) + return self._data.fh + + @fh.setter + def fh(self, val): + self._data.fh = val + + @property + def opcode(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.opcode[0]) + return self._data.opcode + + @opcode.setter + def opcode(self, val): + self._data.opcode = val + + @property + def cookie(self): + """Union[~_numpy.intp, int]: """ + if self._data.size == 1: + return int(self._data.cookie[0]) + return self._data.cookie + + @cookie.setter + def cookie(self, val): + self._data.cookie = val + + def __getitem__(self, key): + if isinstance(key, int): + size = self._data.size + if key >= size or key <= -(size+1): + raise IndexError("index is out of bounds") + if key < 0: + key += size + return IOParams.from_data(self._data[key:key+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == io_params_dtype: + return IOParams.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_data(data): + """Create an IOParams instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `io_params_dtype` holding the data. + """ + cdef IOParams obj = IOParams.__new__(IOParams) + if not isinstance(data, (_numpy.ndarray, _numpy.recarray)): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != io_params_dtype: + raise ValueError("data array must be of dtype io_params_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False): + """Create an IOParams instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef IOParams obj = IOParams.__new__(IOParams) + cdef flag = _buffer.PyBUF_READ if readonly else _buffer.PyBUF_WRITE + cdef object buf = PyMemoryView_FromMemory( + ptr, sizeof(CUfileIOParams_t) * size, flag) + data = _numpy.ndarray((size,), buffer=buf, + dtype=io_params_dtype) + obj._data = data.view(_numpy.recarray) + + return obj + + +# Hack: Overwrite the generated descr_dtype, which NumPy deduced the offset wrong. +descr_dtype = _numpy.dtype({ + "names": ['type', 'handle', 'fs_ops'], + "formats": [_numpy.int32, _py_anon_pod1_dtype, _numpy.intp], + "offsets": [0, 8, 16], +}, align=True) + +# Hack: Overwrite the generated io_params_dtype, which NumPy deduced the offset wrong. +io_params_dtype = _numpy.dtype({ + "names": ['mode', 'u', 'fh', 'opcode', 'cookie'], + "formats": [_numpy.int32, _py_anon_pod2_dtype, _numpy.intp, _numpy.int32, _numpy.intp], + "offsets": [0, 8, 40, 48, 56], +}, align=True) + + +############################################################################### +# Enum +############################################################################### + +class OpError(_IntEnum): + """See `CUfileOpError`.""" + SUCCESS = CU_FILE_SUCCESS + DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED + DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS + DRIVER_UNSUPPORTED_LIMIT = CU_FILE_DRIVER_UNSUPPORTED_LIMIT + DRIVER_VERSION_MISMATCH = CU_FILE_DRIVER_VERSION_MISMATCH + DRIVER_VERSION_READ_ERROR = CU_FILE_DRIVER_VERSION_READ_ERROR + DRIVER_CLOSING = CU_FILE_DRIVER_CLOSING + PLATFORM_NOT_SUPPORTED = CU_FILE_PLATFORM_NOT_SUPPORTED + IO_NOT_SUPPORTED = CU_FILE_IO_NOT_SUPPORTED + DEVICE_NOT_SUPPORTED = CU_FILE_DEVICE_NOT_SUPPORTED + NVFS_DRIVER_ERROR = CU_FILE_NVFS_DRIVER_ERROR + CUDA_DRIVER_ERROR = CU_FILE_CUDA_DRIVER_ERROR + CUDA_POINTER_INVALID = CU_FILE_CUDA_POINTER_INVALID + CUDA_MEMORY_TYPE_INVALID = CU_FILE_CUDA_MEMORY_TYPE_INVALID + CUDA_POINTER_RANGE_ERROR = CU_FILE_CUDA_POINTER_RANGE_ERROR + CUDA_CONTEXT_MISMATCH = CU_FILE_CUDA_CONTEXT_MISMATCH + INVALID_MAPPING_SIZE = CU_FILE_INVALID_MAPPING_SIZE + INVALID_MAPPING_RANGE = CU_FILE_INVALID_MAPPING_RANGE + INVALID_FILE_TYPE = CU_FILE_INVALID_FILE_TYPE + INVALID_FILE_OPEN_FLAG = CU_FILE_INVALID_FILE_OPEN_FLAG + DIO_NOT_SET = CU_FILE_DIO_NOT_SET + INVALID_VALUE = CU_FILE_INVALID_VALUE + MEMORY_ALREADY_REGISTERED = CU_FILE_MEMORY_ALREADY_REGISTERED + MEMORY_NOT_REGISTERED = CU_FILE_MEMORY_NOT_REGISTERED + PERMISSION_DENIED = CU_FILE_PERMISSION_DENIED + DRIVER_ALREADY_OPEN = CU_FILE_DRIVER_ALREADY_OPEN + HANDLE_NOT_REGISTERED = CU_FILE_HANDLE_NOT_REGISTERED + HANDLE_ALREADY_REGISTERED = CU_FILE_HANDLE_ALREADY_REGISTERED + DEVICE_NOT_FOUND = CU_FILE_DEVICE_NOT_FOUND + INTERNAL_ERROR = CU_FILE_INTERNAL_ERROR + GETNEWFD_FAILED = CU_FILE_GETNEWFD_FAILED + NVFS_SETUP_ERROR = CU_FILE_NVFS_SETUP_ERROR + IO_DISABLED = CU_FILE_IO_DISABLED + BATCH_SUBMIT_FAILED = CU_FILE_BATCH_SUBMIT_FAILED + GPU_MEMORY_PINNING_FAILED = CU_FILE_GPU_MEMORY_PINNING_FAILED + BATCH_FULL = CU_FILE_BATCH_FULL + ASYNC_NOT_SUPPORTED = CU_FILE_ASYNC_NOT_SUPPORTED + IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR + +class DriverStatusFlags(_IntEnum): + """See `CUfileDriverStatusFlags_t`.""" + LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED + WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED + NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED + GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED + NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED + NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED + SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED + SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED + NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED + BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED + NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED + SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED + +class DriverControlFlags(_IntEnum): + """See `CUfileDriverControlFlags_t`.""" + USE_POLL_MODE = CU_FILE_USE_POLL_MODE + ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE + +class FeatureFlags(_IntEnum): + """See `CUfileFeatureFlags_t`.""" + DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED + BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED + STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED + PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED + +class FileHandleType(_IntEnum): + """See `CUfileFileHandleType`.""" + OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD + OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS + +class Opcode(_IntEnum): + """See `CUfileOpcode_t`.""" + READ = CUFILE_READ + WRITE = CUFILE_WRITE + +class Status(_IntEnum): + """See `CUfileStatus_t`.""" + WAITING = CUFILE_WAITING + PENDING = CUFILE_PENDING + INVALID = CUFILE_INVALID + CANCELED = CUFILE_CANCELED + COMPLETE = CUFILE_COMPLETE + TIMEOUT = CUFILE_TIMEOUT + FAILED = CUFILE_FAILED + +class BatchMode(_IntEnum): + """See `CUfileBatchMode_t`.""" + BATCH = CUFILE_BATCH + +class SizeTConfigParameter(_IntEnum): + """See `CUFileSizeTConfigParameter_t`.""" + PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS + EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + EXECUTION_MIN_IO_THRESHOLD_SIZE_KB = CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + EXECUTION_MAX_REQUEST_PARALLELISM = CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + PROPERTIES_MAX_DIRECT_IO_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + PROPERTIES_PER_BUFFER_CACHE_SIZE_KB = CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB = CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + PROPERTIES_IO_BATCHSIZE = CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB + PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + +class BoolConfigParameter(_IntEnum): + """See `CUFileBoolConfigParameter_t`.""" + PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE + PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE + FS_MISC_API_CHECK_AGGRESSIVE = CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + EXECUTION_PARALLEL_IO = CUFILE_PARAM_EXECUTION_PARALLEL_IO + PROFILE_NVTX = CUFILE_PARAM_PROFILE_NVTX + PROPERTIES_ALLOW_SYSTEM_MEMORY = CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + USE_PCIP2PDMA = CUFILE_PARAM_USE_PCIP2PDMA + PREFER_IO_URING = CUFILE_PARAM_PREFER_IO_URING + FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE + SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION + STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + +class StringConfigParameter(_IntEnum): + """See `CUFileStringConfigParameter_t`.""" + LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL + ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH + LOG_DIR = CUFILE_PARAM_LOG_DIR + + +############################################################################### +# Error handling +############################################################################### + +ctypedef fused ReturnT: + CUfileError_t + ssize_t + + +class cuFileError(Exception): + + def __init__(self, status, cu_err=None): + self.status = status + self.cuda_error = cu_err + s = OpError(status) + cdef str err = f"{s.name} ({s.value}): {op_status_error(status)}" + if cu_err is not None: + e = pyCUresult(cu_err) + err += f"; CUDA status: {e.name} ({e.value})" + super(cuFileError, self).__init__(err) + + def __reduce__(self): + return (type(self), (self.status, self.cuda_error)) + + +@cython.profile(False) +cdef int check_status(ReturnT status) except 1 nogil: + if ReturnT is CUfileError_t: + if status.err != 0 or status.cu_err != 0: + with gil: + raise cuFileError(status.err, status.cu_err) + elif ReturnT is ssize_t: + if status == -1: + # note: this assumes cuFile already properly resets errno in each API + with gil: + raise cuFileError(errno.errno) + return 0 + + +############################################################################### +# Wrapper functions +############################################################################### + +cpdef intptr_t handle_register(intptr_t descr) except? 0: + """cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations. + + Args: + descr (intptr_t): ``CUfileDescr_t`` file descriptor (OS agnostic). + + Returns: + intptr_t: ``CUfileHandle_t`` opaque file handle for IO operations. + + .. seealso:: `cuFileHandleRegister` + """ + cdef Handle fh + with nogil: + status = cuFileHandleRegister(&fh, descr) + check_status(status) + return fh + + +cpdef void handle_deregister(intptr_t fh) except*: + """releases a registered filehandle from cuFile. + + Args: + fh (intptr_t): ``CUfileHandle_t`` file handle. + + .. seealso:: `cuFileHandleDeregister` + """ + cuFileHandleDeregister(fh) + + +cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags): + """register an existing cudaMalloced memory with cuFile to pin for GPUDirect Storage access or register host allocated memory with cuFile. + + Args: + buf_ptr_base (intptr_t): buffer pointer allocated. + length (size_t): size of memory region from the above specified bufPtr. + flags (int): CU_FILE_RDMA_REGISTER. + + .. seealso:: `cuFileBufRegister` + """ + with nogil: + status = cuFileBufRegister(buf_ptr_base, length, flags) + check_status(status) + + +cpdef buf_deregister(intptr_t buf_ptr_base): + """deregister an already registered device or host memory from cuFile. + + Args: + buf_ptr_base (intptr_t): buffer pointer to deregister. + + .. seealso:: `cuFileBufDeregister` + """ + with nogil: + status = cuFileBufDeregister(buf_ptr_base) + check_status(status) + + +cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): + """read data from a registered file handle to a specified device or host memory. + + Args: + fh (intptr_t): ``CUfileHandle_t`` opaque file handle. + buf_ptr_base (intptr_t): base address of buffer in device or host memory. + size (size_t): size bytes to read. + file_offset (off_t): file-offset from begining of the file. + buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to read into. + + .. seealso:: `cuFileRead` + """ + with nogil: + status = cuFileRead(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + check_status(status) + + +cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset): + """write data from a specified device or host memory to a registered file handle. + + Args: + fh (intptr_t): ``CUfileHandle_t`` opaque file handle. + buf_ptr_base (intptr_t): base address of buffer in device or host memory. + size (size_t): size bytes to write. + file_offset (off_t): file-offset from begining of the file. + buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to write from. + + .. seealso:: `cuFileWrite` + """ + with nogil: + status = cuFileWrite(fh, buf_ptr_base, size, file_offset, buf_ptr_offset) + check_status(status) + + +cpdef driver_open(): + """Initialize the cuFile library and open the nvidia-fs driver. + + .. seealso:: `cuFileDriverOpen` + """ + with nogil: + status = cuFileDriverOpen() + check_status(status) + + +cpdef use_count(): + """returns use count of cufile drivers at that moment by the process. + + .. seealso:: `cuFileUseCount` + """ + with nogil: + status = cuFileUseCount() + check_status(status) + + +cpdef driver_get_properties(intptr_t props): + """Gets the Driver session properties. + + Args: + props (intptr_t): to set. + + .. seealso:: `cuFileDriverGetProperties` + """ + with nogil: + status = cuFileDriverGetProperties(props) + check_status(status) + + +cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size): + """Sets whether the Read/Write APIs use polling to do IO operations. + + Args: + poll (bint): boolean to indicate whether to use poll mode or not. + poll_threshold_size (size_t): max IO size to use for POLLING mode in KB. + + .. seealso:: `cuFileDriverSetPollMode` + """ + with nogil: + status = cuFileDriverSetPollMode(poll, poll_threshold_size) + check_status(status) + + +cpdef driver_set_max_direct_io_size(size_t max_direct_io_size): + """Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver. + + Args: + max_direct_io_size (size_t): maximum allowed direct io size in KB. + + .. seealso:: `cuFileDriverSetMaxDirectIOSize` + """ + with nogil: + status = cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + check_status(status) + + +cpdef driver_set_max_cache_size(size_t max_cache_size): + """Control parameter to set maximum GPU memory reserved per device by the library for internal buffering. + + Args: + max_cache_size (size_t): The maximum GPU buffer space per device used for internal use in KB. + + .. seealso:: `cuFileDriverSetMaxCacheSize` + """ + with nogil: + status = cuFileDriverSetMaxCacheSize(max_cache_size) + check_status(status) + + +cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size): + """Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister``. + + Args: + max_pinned_size (size_t): maximum buffer space that is pinned in KB. + + .. seealso:: `cuFileDriverSetMaxPinnedMemSize` + """ + with nogil: + status = cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + check_status(status) + + +cpdef intptr_t batch_io_set_up(unsigned nr) except? 0: + cdef BatchHandle batch_idp + with nogil: + status = cuFileBatchIOSetUp(&batch_idp, nr) + check_status(status) + return batch_idp + + +cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags): + with nogil: + status = cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + check_status(status) + + +cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout): + with nogil: + status = cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + check_status(status) + + +cpdef batch_io_cancel(intptr_t batch_idp): + with nogil: + status = cuFileBatchIOCancel(batch_idp) + check_status(status) + + +cpdef void batch_io_destroy(intptr_t batch_idp) except*: + cuFileBatchIODestroy(batch_idp) + + +cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream): + with nogil: + status = cuFileReadAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_read_p, stream) + check_status(status) + + +cpdef write_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_written_p, intptr_t stream): + with nogil: + status = cuFileWriteAsync(fh, buf_ptr_base, size_p, file_offset_p, buf_ptr_offset_p, bytes_written_p, stream) + check_status(status) + + +cpdef stream_register(intptr_t stream, unsigned flags): + with nogil: + status = cuFileStreamRegister(stream, flags) + check_status(status) + + +cpdef stream_deregister(intptr_t stream): + with nogil: + status = cuFileStreamDeregister(stream) + check_status(status) + + +cpdef int get_version() except? 0: + cdef int version + with nogil: + status = cuFileGetVersion(&version) + check_status(status) + return version + + +cpdef size_t get_parameter_size_t(int param) except? 0: + cdef size_t value + with nogil: + status = cuFileGetParameterSizeT(<_SizeTConfigParameter>param, &value) + check_status(status) + return value + + +cpdef bint get_parameter_bool(int param) except? 0: + cdef cpp_bool value + with nogil: + status = cuFileGetParameterBool(<_BoolConfigParameter>param, &value) + check_status(status) + return value + + +cpdef str get_parameter_string(int param, int len): + cdef bytes _desc_str_ = bytes(len) + cdef char* desc_str = _desc_str_ + with nogil: + status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len) + check_status(status) + return _desc_str_.decode() + + +cpdef set_parameter_size_t(int param, size_t value): + with nogil: + status = cuFileSetParameterSizeT(<_SizeTConfigParameter>param, value) + check_status(status) + + +cpdef set_parameter_bool(int param, bint value): + with nogil: + status = cuFileSetParameterBool(<_BoolConfigParameter>param, value) + check_status(status) + + +cpdef set_parameter_string(int param, intptr_t desc_str): + with nogil: + status = cuFileSetParameterString(<_StringConfigParameter>param, desc_str) + check_status(status) + + +cpdef str op_status_error(int status): + """cufileop status string. + + Args: + status (OpError): the error status to query. + + .. seealso:: `cufileop_status_error` + """ + cdef bytes _output_ + _output_ = cufileop_status_error(<_OpError>status) + return _output_.decode() + + +cpdef driver_close(): + """reset the cuFile library and release the nvidia-fs driver + """ + with nogil: + status = cuFileDriverClose_v2() + check_status(status) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpp new file mode 100644 index 0000000000000000000000000000000000000000..92fdd97d6212e9e87cfcf38ca2f9ba97f82b93e6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpp @@ -0,0 +1,7506 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cycufile", + "sources": [ + "cuda/bindings/cycufile.pyx" + ] + }, + "module_name": "cuda.bindings.cycufile" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cycufile +#define __PYX_HAVE_API__cuda__bindings__cycufile +/* Early includes */ +#include +#include +#include +#include +#include "cuda.h" +#include "cudaProfiler.h" +#include +#include + + // This is the missing piece we need to supply to help Cython & C++ compilers. + inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) { + return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err); + } + static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1}; + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cycufile.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "libc.time" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "posix.types" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings" */ + +/* Module declarations from "cuda" */ + +/* Module declarations from "cuda.bindings._internal" */ + +/* Module declarations from "cuda.bindings._internal.cufile" */ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleRegister)(CUfileHandle_t *, CUfileDescr_t *); /*proto*/ +static void (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleDeregister)(CUfileHandle_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufRegister)(void const *, size_t, int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufDeregister)(void const *); /*proto*/ +static Py_ssize_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileRead)(CUfileHandle_t, void *, size_t, off_t, off_t); /*proto*/ +static Py_ssize_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWrite)(CUfileHandle_t, void const *, size_t, off_t, off_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverOpen)(void); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose_v2)(void); /*proto*/ +static long (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileUseCount)(void); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverGetProperties)(CUfileDrvProps_t *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetPollMode)(bool, size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxDirectIOSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxCacheSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxPinnedMemSize)(size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSetUp)(CUfileBatchHandle_t *, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSubmit)(CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOGetStatus)(CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOCancel)(CUfileBatchHandle_t); /*proto*/ +static void (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIODestroy)(CUfileBatchHandle_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileReadAsync)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWriteAsync)(CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamRegister)(CUstream, unsigned int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamDeregister)(CUstream); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetVersion)(int *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterSizeT)(CUFileSizeTConfigParameter_t, size_t *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterBool)(CUFileBoolConfigParameter_t, bool *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterString)(CUFileStringConfigParameter_t, char *, int); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterSizeT)(CUFileSizeTConfigParameter_t, size_t); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterBool)(CUFileBoolConfigParameter_t, bool); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterString)(CUFileStringConfigParameter_t, char const *); /*proto*/ +static CUfileError_t (*__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose)(void); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "cuda.bindings.cycufile" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cycufile" +extern int __pyx_module_is_main_cuda__bindings__cycufile; +int __pyx_module_is_main_cuda__bindings__cycufile = 0; + +/* Implementation of "cuda.bindings.cycufile" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cycufile.pyx":15 + * ############################################################################### + * + * cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileHandleRegister(fh, descr) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileHandleRegister(CUfileHandle_t *__pyx_v_fh, CUfileDescr_t *__pyx_v_descr) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":16 + * + * cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileHandleRegister(fh, descr) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleRegister(__pyx_v_fh, __pyx_v_descr); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 16, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":15 + * ############################################################################### + * + * cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileHandleRegister(fh, descr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileHandleRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":19 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * _cufile._cuFileHandleDeregister(fh) +*/ + +static void __pyx_f_4cuda_8bindings_8cycufile_cuFileHandleDeregister(CUfileHandle_t __pyx_v_fh) { + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":21 + * @cython.show_performance_hints(False) + * cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * _cufile._cuFileHandleDeregister(fh) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleDeregister(__pyx_v_fh); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 21, __pyx_L1_error) + + /* "cuda/bindings/cycufile.pyx":19 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + * _cufile._cuFileHandleDeregister(fh) +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileHandleDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; +} + +/* "cuda/bindings/cycufile.pyx":24 + * + * + * cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBufRegister(bufPtr_base, length, flags) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBufRegister(void const *__pyx_v_bufPtr_base, size_t __pyx_v_length, int __pyx_v_flags) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":25 + * + * cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBufRegister(bufPtr_base, length, flags) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufRegister(__pyx_v_bufPtr_base, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":24 + * + * + * cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBufRegister(bufPtr_base, length, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBufRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":28 + * + * + * cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBufDeregister(bufPtr_base) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBufDeregister(void const *__pyx_v_bufPtr_base) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":29 + * + * cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBufDeregister(bufPtr_base) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufDeregister(__pyx_v_bufPtr_base); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":28 + * + * + * cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBufDeregister(bufPtr_base) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBufDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":32 + * + * + * cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileRead(fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + +static Py_ssize_t __pyx_f_4cuda_8bindings_8cycufile_cuFileRead(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_bufPtr_offset) { + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":33 + * + * cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + * return _cufile._cuFileRead(fh, bufPtr_base, size, file_offset, bufPtr_offset) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileRead(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_bufPtr_offset); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":32 + * + * + * cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileRead(fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileRead", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":36 + * + * + * cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileWrite(fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + +static Py_ssize_t __pyx_f_4cuda_8bindings_8cycufile_cuFileWrite(CUfileHandle_t __pyx_v_fh, void const *__pyx_v_bufPtr_base, size_t __pyx_v_size, off_t __pyx_v_file_offset, off_t __pyx_v_bufPtr_offset) { + Py_ssize_t __pyx_r; + Py_ssize_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":37 + * + * cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + * return _cufile._cuFileWrite(fh, bufPtr_base, size, file_offset, bufPtr_offset) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWrite(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size, __pyx_v_file_offset, __pyx_v_bufPtr_offset); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 37, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":36 + * + * + * cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileWrite(fh, bufPtr_base, size, file_offset, bufPtr_offset) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileWrite", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":40 + * + * + * cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverOpen() + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverOpen(void) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":41 + * + * cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverOpen() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverOpen(); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":40 + * + * + * cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverOpen() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverOpen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":44 + * + * + * cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverClose_v2() + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose_v2(void) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":45 + * + * cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverClose_v2() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose_v2(); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 45, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":44 + * + * + * cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverClose_v2() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverClose_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":48 + * + * + * cdef long cuFileUseCount() except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileUseCount() + * +*/ + +static long __pyx_f_4cuda_8bindings_8cycufile_cuFileUseCount(void) { + long __pyx_r; + long __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":49 + * + * cdef long cuFileUseCount() except* nogil: + * return _cufile._cuFileUseCount() # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileUseCount(); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 49, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":48 + * + * + * cdef long cuFileUseCount() except* nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileUseCount() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileUseCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":52 + * + * + * cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverGetProperties(props) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverGetProperties(CUfileDrvProps_t *__pyx_v_props) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":53 + * + * cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverGetProperties(props) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverGetProperties(__pyx_v_props); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":52 + * + * + * cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverGetProperties(props) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":56 + * + * + * cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetPollMode(poll, poll_threshold_size) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetPollMode(bool __pyx_v_poll, size_t __pyx_v_poll_threshold_size) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":57 + * + * cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverSetPollMode(poll, poll_threshold_size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetPollMode(__pyx_v_poll, __pyx_v_poll_threshold_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":56 + * + * + * cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetPollMode(poll, poll_threshold_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverSetPollMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":60 + * + * + * cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxDirectIOSize(size_t __pyx_v_max_direct_io_size) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":61 + * + * cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverSetMaxDirectIOSize(max_direct_io_size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxDirectIOSize(__pyx_v_max_direct_io_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":60 + * + * + * cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverSetMaxDirectIOSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":64 + * + * + * cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxCacheSize(max_cache_size) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxCacheSize(size_t __pyx_v_max_cache_size) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":65 + * + * cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverSetMaxCacheSize(max_cache_size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxCacheSize(__pyx_v_max_cache_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":64 + * + * + * cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxCacheSize(max_cache_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverSetMaxCacheSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":68 + * + * + * cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxPinnedMemSize(size_t __pyx_v_max_pinned_size) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":69 + * + * cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverSetMaxPinnedMemSize(max_pinned_size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxPinnedMemSize(__pyx_v_max_pinned_size); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":68 + * + * + * cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverSetMaxPinnedMemSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":72 + * + * + * cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOSetUp(batch_idp, nr) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSetUp(CUfileBatchHandle_t *__pyx_v_batch_idp, unsigned int __pyx_v_nr) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":73 + * + * cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBatchIOSetUp(batch_idp, nr) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSetUp(__pyx_v_batch_idp, __pyx_v_nr); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 73, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":72 + * + * + * cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOSetUp(batch_idp, nr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBatchIOSetUp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":76 + * + * + * cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSubmit(CUfileBatchHandle_t __pyx_v_batch_idp, unsigned int __pyx_v_nr, CUfileIOParams_t *__pyx_v_iocbp, unsigned int __pyx_v_flags) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":77 + * + * cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSubmit(__pyx_v_batch_idp, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":76 + * + * + * cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBatchIOSubmit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":80 + * + * + * cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOGetStatus(CUfileBatchHandle_t __pyx_v_batch_idp, unsigned int __pyx_v_min_nr, unsigned int *__pyx_v_nr, CUfileIOEvents_t *__pyx_v_iocbp, struct timespec *__pyx_v_timeout) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":81 + * + * cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOGetStatus(__pyx_v_batch_idp, __pyx_v_min_nr, __pyx_v_nr, __pyx_v_iocbp, __pyx_v_timeout); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":80 + * + * + * cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBatchIOGetStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":84 + * + * + * cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOCancel(batch_idp) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOCancel(CUfileBatchHandle_t __pyx_v_batch_idp) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":85 + * + * cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileBatchIOCancel(batch_idp) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOCancel(__pyx_v_batch_idp); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":84 + * + * + * cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileBatchIOCancel(batch_idp) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBatchIOCancel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":88 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * _cufile._cuFileBatchIODestroy(batch_idp) +*/ + +static void __pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIODestroy(CUfileBatchHandle_t __pyx_v_batch_idp) { + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":90 + * @cython.show_performance_hints(False) + * cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * _cufile._cuFileBatchIODestroy(batch_idp) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIODestroy(__pyx_v_batch_idp); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 90, __pyx_L1_error) + + /* "cuda/bindings/cycufile.pyx":88 + * + * + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + * _cufile._cuFileBatchIODestroy(batch_idp) +*/ + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileBatchIODestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; +} + +/* "cuda/bindings/cycufile.pyx":93 + * + * + * cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileReadAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileReadAsync(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t *__pyx_v_size_p, off_t *__pyx_v_file_offset_p, off_t *__pyx_v_bufPtr_offset_p, Py_ssize_t *__pyx_v_bytes_read_p, CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":94 + * + * cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileReadAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileReadAsync(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_bufPtr_offset_p, __pyx_v_bytes_read_p, __pyx_v_stream); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":93 + * + * + * cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileReadAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileReadAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":97 + * + * + * cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileWriteAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileWriteAsync(CUfileHandle_t __pyx_v_fh, void *__pyx_v_bufPtr_base, size_t *__pyx_v_size_p, off_t *__pyx_v_file_offset_p, off_t *__pyx_v_bufPtr_offset_p, Py_ssize_t *__pyx_v_bytes_written_p, CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":98 + * + * cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileWriteAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWriteAsync(__pyx_v_fh, __pyx_v_bufPtr_base, __pyx_v_size_p, __pyx_v_file_offset_p, __pyx_v_bufPtr_offset_p, __pyx_v_bytes_written_p, __pyx_v_stream); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":97 + * + * + * cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileWriteAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileWriteAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":101 + * + * + * cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileStreamRegister(stream, flags) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileStreamRegister(CUstream __pyx_v_stream, unsigned int __pyx_v_flags) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":102 + * + * cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileStreamRegister(stream, flags) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamRegister(__pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":101 + * + * + * cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileStreamRegister(stream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileStreamRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":105 + * + * + * cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileStreamDeregister(stream) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileStreamDeregister(CUstream __pyx_v_stream) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":106 + * + * cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileStreamDeregister(stream) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamDeregister(__pyx_v_stream); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":105 + * + * + * cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileStreamDeregister(stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileStreamDeregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":109 + * + * + * cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetVersion(version) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileGetVersion(int *__pyx_v_version) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":110 + * + * cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileGetVersion(version) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetVersion(__pyx_v_version); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":109 + * + * + * cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetVersion(version) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":113 + * + * + * cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterSizeT(param, value) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t __pyx_v_param, size_t *__pyx_v_value) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":114 + * + * cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileGetParameterSizeT(param, value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterSizeT(__pyx_v_param, __pyx_v_value); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":113 + * + * + * cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterSizeT(param, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileGetParameterSizeT", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":117 + * + * + * cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterBool(param, value) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterBool(CUFileBoolConfigParameter_t __pyx_v_param, bool *__pyx_v_value) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":118 + * + * cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileGetParameterBool(param, value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterBool(__pyx_v_param, __pyx_v_value); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":117 + * + * + * cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterBool(param, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileGetParameterBool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":121 + * + * + * cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterString(param, desc_str, len) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterString(CUFileStringConfigParameter_t __pyx_v_param, char *__pyx_v_desc_str, int __pyx_v_len) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":122 + * + * cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileGetParameterString(param, desc_str, len) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterString(__pyx_v_param, __pyx_v_desc_str, __pyx_v_len); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":121 + * + * + * cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileGetParameterString(param, desc_str, len) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileGetParameterString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":125 + * + * + * cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterSizeT(param, value) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t __pyx_v_param, size_t __pyx_v_value) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":126 + * + * cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileSetParameterSizeT(param, value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterSizeT(__pyx_v_param, __pyx_v_value); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":125 + * + * + * cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterSizeT(param, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileSetParameterSizeT", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":129 + * + * + * cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterBool(param, value) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterBool(CUFileBoolConfigParameter_t __pyx_v_param, bool __pyx_v_value) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":130 + * + * cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileSetParameterBool(param, value) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterBool(__pyx_v_param, __pyx_v_value); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":129 + * + * + * cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterBool(param, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileSetParameterBool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":133 + * + * + * cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterString(param, desc_str) + * +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterString(CUFileStringConfigParameter_t __pyx_v_param, char const *__pyx_v_desc_str) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":134 + * + * cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileSetParameterString(param, desc_str) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterString(__pyx_v_param, __pyx_v_desc_str); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":133 + * + * + * cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileSetParameterString(param, desc_str) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileSetParameterString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cycufile.pyx":137 + * + * + * cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverClose() +*/ + +static CUfileError_t __pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose(void) { + CUfileError_t __pyx_r; + CUfileError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cycufile.pyx":138 + * + * cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: + * return _cufile._cuFileDriverClose() # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose(); if (unlikely(__pyx_t_1 == CUFILE_LOADING_ERROR && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cycufile.pyx":137 + * + * + * cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _cufile._cuFileDriverClose() +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cycufile.cuFileDriverClose", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUFILE_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("cuFileHandleRegister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleRegister, "CUfileError_t (CUfileHandle_t *, CUfileDescr_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileHandleDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileHandleDeregister, "void (CUfileHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBufRegister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBufRegister, "CUfileError_t (void const *, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBufDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBufDeregister, "CUfileError_t (void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileRead", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileRead, "Py_ssize_t (CUfileHandle_t, void *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileWrite", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileWrite, "Py_ssize_t (CUfileHandle_t, void const *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverOpen", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverOpen, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverClose_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose_v2, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileUseCount", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileUseCount, "long (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverGetProperties", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverGetProperties, "CUfileError_t (CUfileDrvProps_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverSetPollMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetPollMode, "CUfileError_t (bool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverSetMaxDirectIOSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxDirectIOSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverSetMaxCacheSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxCacheSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverSetMaxPinnedMemSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverSetMaxPinnedMemSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBatchIOSetUp", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSetUp, "CUfileError_t (CUfileBatchHandle_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBatchIOSubmit", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOSubmit, "CUfileError_t (CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBatchIOGetStatus", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOGetStatus, "CUfileError_t (CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBatchIOCancel", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIOCancel, "CUfileError_t (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileBatchIODestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileBatchIODestroy, "void (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileReadAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileReadAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileWriteAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileWriteAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileStreamRegister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamRegister, "CUfileError_t (CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileStreamDeregister", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileStreamDeregister, "CUfileError_t (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileGetVersion, "CUfileError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileGetParameterSizeT", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileGetParameterBool", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileGetParameterString", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileGetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileSetParameterSizeT", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileSetParameterBool", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileSetParameterString", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileSetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFileDriverClose", (void (*)(void))__pyx_f_4cuda_8bindings_8cycufile_cuFileDriverClose, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.cufile"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileHandleRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleRegister, "CUfileError_t (CUfileHandle_t *, CUfileDescr_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileHandleDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileHandleDeregister, "void (CUfileHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBufRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufRegister, "CUfileError_t (void const *, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBufDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBufDeregister, "CUfileError_t (void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileRead", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileRead, "Py_ssize_t (CUfileHandle_t, void *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileWrite", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWrite, "Py_ssize_t (CUfileHandle_t, void const *, size_t, off_t, off_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverOpen", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverOpen, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverClose_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose_v2, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileUseCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileUseCount, "long (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverGetProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverGetProperties, "CUfileError_t (CUfileDrvProps_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverSetPollMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetPollMode, "CUfileError_t (bool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverSetMaxDirectIOSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxDirectIOSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverSetMaxCacheSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxCacheSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverSetMaxPinnedMemSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverSetMaxPinnedMemSize, "CUfileError_t (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBatchIOSetUp", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSetUp, "CUfileError_t (CUfileBatchHandle_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBatchIOSubmit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOSubmit, "CUfileError_t (CUfileBatchHandle_t, unsigned int, CUfileIOParams_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBatchIOGetStatus", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOGetStatus, "CUfileError_t (CUfileBatchHandle_t, unsigned int, unsigned int *, CUfileIOEvents_t *, struct timespec *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBatchIOCancel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIOCancel, "CUfileError_t (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileBatchIODestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileBatchIODestroy, "void (CUfileBatchHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileReadAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileReadAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileWriteAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileWriteAsync, "CUfileError_t (CUfileHandle_t, void *, size_t *, off_t *, off_t *, Py_ssize_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileStreamRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamRegister, "CUfileError_t (CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileStreamDeregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileStreamDeregister, "CUfileError_t (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetVersion, "CUfileError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileGetParameterSizeT", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileGetParameterBool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileGetParameterString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileGetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileSetParameterSizeT", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterSizeT, "CUfileError_t (CUFileSizeTConfigParameter_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileSetParameterBool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterBool, "CUfileError_t (CUFileBoolConfigParameter_t, bool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileSetParameterString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileSetParameterString, "CUfileError_t (CUFileStringConfigParameter_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFileDriverClose", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_6cufile__cuFileDriverClose, "CUfileError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cycufile(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cycufile}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cycufile", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cycufile(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cycufile(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cycufile(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cycufile' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cycufile" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cycufile", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cycufile) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cycufile")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cycufile", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cycufile.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cycufile", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cycufile"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..9e783f6b20957b6d56af5b04d908b967bc98c9a5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd new file mode 100644 index 0000000000000000000000000000000000000000..65f5568bf6cb12794ead0b92004512c1d21b7057 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pxd @@ -0,0 +1,258 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport uint32_t, uint64_t +from libc.time cimport time_t +from libcpp cimport bool as cpp_bool +from posix.types cimport off_t + +cimport cuda.bindings.cydriver +from cuda.bindings.cydriver cimport CUresult + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# TODO: switch to "from libc.time cimport timespec" once we can use recent +# Cython to build +cdef extern from "": + cdef struct timespec: + time_t tv_sec + long tv_nsec +cdef extern from "": + cdef struct sockaddr: + unsigned short sa_family + char sa_data[14] + ctypedef sockaddr sockaddr_t + + +cdef extern from '': + # enums + ctypedef enum CUfileOpError: + CU_FILE_SUCCESS + CU_FILE_DRIVER_NOT_INITIALIZED + CU_FILE_DRIVER_INVALID_PROPS + CU_FILE_DRIVER_UNSUPPORTED_LIMIT + CU_FILE_DRIVER_VERSION_MISMATCH + CU_FILE_DRIVER_VERSION_READ_ERROR + CU_FILE_DRIVER_CLOSING + CU_FILE_PLATFORM_NOT_SUPPORTED + CU_FILE_IO_NOT_SUPPORTED + CU_FILE_DEVICE_NOT_SUPPORTED + CU_FILE_NVFS_DRIVER_ERROR + CU_FILE_CUDA_DRIVER_ERROR + CU_FILE_CUDA_POINTER_INVALID + CU_FILE_CUDA_MEMORY_TYPE_INVALID + CU_FILE_CUDA_POINTER_RANGE_ERROR + CU_FILE_CUDA_CONTEXT_MISMATCH + CU_FILE_INVALID_MAPPING_SIZE + CU_FILE_INVALID_MAPPING_RANGE + CU_FILE_INVALID_FILE_TYPE + CU_FILE_INVALID_FILE_OPEN_FLAG + CU_FILE_DIO_NOT_SET + CU_FILE_INVALID_VALUE + CU_FILE_MEMORY_ALREADY_REGISTERED + CU_FILE_MEMORY_NOT_REGISTERED + CU_FILE_PERMISSION_DENIED + CU_FILE_DRIVER_ALREADY_OPEN + CU_FILE_HANDLE_NOT_REGISTERED + CU_FILE_HANDLE_ALREADY_REGISTERED + CU_FILE_DEVICE_NOT_FOUND + CU_FILE_INTERNAL_ERROR + CU_FILE_GETNEWFD_FAILED + CU_FILE_NVFS_SETUP_ERROR + CU_FILE_IO_DISABLED + CU_FILE_BATCH_SUBMIT_FAILED + CU_FILE_GPU_MEMORY_PINNING_FAILED + CU_FILE_BATCH_FULL + CU_FILE_ASYNC_NOT_SUPPORTED + CU_FILE_IO_MAX_ERROR + + ctypedef enum CUfileDriverStatusFlags_t: + CU_FILE_LUSTRE_SUPPORTED + CU_FILE_WEKAFS_SUPPORTED + CU_FILE_NFS_SUPPORTED + CU_FILE_GPFS_SUPPORTED + CU_FILE_NVME_SUPPORTED + CU_FILE_NVMEOF_SUPPORTED + CU_FILE_SCSI_SUPPORTED + CU_FILE_SCALEFLUX_CSD_SUPPORTED + CU_FILE_NVMESH_SUPPORTED + CU_FILE_BEEGFS_SUPPORTED + CU_FILE_NVME_P2P_SUPPORTED + CU_FILE_SCATEFS_SUPPORTED + + ctypedef enum CUfileDriverControlFlags_t: + CU_FILE_USE_POLL_MODE + CU_FILE_ALLOW_COMPAT_MODE + + ctypedef enum CUfileFeatureFlags_t: + CU_FILE_DYN_ROUTING_SUPPORTED + CU_FILE_BATCH_IO_SUPPORTED + CU_FILE_STREAMS_SUPPORTED + CU_FILE_PARALLEL_IO_SUPPORTED + + ctypedef enum CUfileFileHandleType: + CU_FILE_HANDLE_TYPE_OPAQUE_FD + CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + CU_FILE_HANDLE_TYPE_USERSPACE_FS + + ctypedef enum CUfileOpcode_t: + CUFILE_READ + CUFILE_WRITE + + ctypedef enum CUfileStatus_t: + CUFILE_WAITING + CUFILE_PENDING + CUFILE_INVALID + CUFILE_CANCELED + CUFILE_COMPLETE + CUFILE_TIMEOUT + CUFILE_FAILED + + ctypedef enum CUfileBatchMode_t: + CUFILE_BATCH + + ctypedef enum CUFileSizeTConfigParameter_t: + CUFILE_PARAM_PROFILE_STATS + CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH + CUFILE_PARAM_EXECUTION_MAX_IO_THREADS + CUFILE_PARAM_EXECUTION_MIN_IO_THRESHOLD_SIZE_KB + CUFILE_PARAM_EXECUTION_MAX_REQUEST_PARALLELISM + CUFILE_PARAM_PROPERTIES_MAX_DIRECT_IO_SIZE_KB + CUFILE_PARAM_PROPERTIES_MAX_DEVICE_CACHE_SIZE_KB + CUFILE_PARAM_PROPERTIES_PER_BUFFER_CACHE_SIZE_KB + CUFILE_PARAM_PROPERTIES_MAX_DEVICE_PINNED_MEM_SIZE_KB + CUFILE_PARAM_PROPERTIES_IO_BATCHSIZE + CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB + CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS + + ctypedef enum CUFileBoolConfigParameter_t: + CUFILE_PARAM_PROPERTIES_USE_POLL_MODE + CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE + CUFILE_PARAM_FORCE_COMPAT_MODE + CUFILE_PARAM_FS_MISC_API_CHECK_AGGRESSIVE + CUFILE_PARAM_EXECUTION_PARALLEL_IO + CUFILE_PARAM_PROFILE_NVTX + CUFILE_PARAM_PROPERTIES_ALLOW_SYSTEM_MEMORY + CUFILE_PARAM_USE_PCIP2PDMA + CUFILE_PARAM_PREFER_IO_URING + CUFILE_PARAM_FORCE_ODIRECT_MODE + CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION + CUFILE_PARAM_STREAM_MEMOPS_BYPASS + + ctypedef enum CUFileStringConfigParameter_t: + CUFILE_PARAM_LOGGING_LEVEL + CUFILE_PARAM_ENV_LOGFILE_PATH + CUFILE_PARAM_LOG_DIR + + # types + ctypedef void* CUfileHandle_t 'CUfileHandle_t' + ctypedef void* CUfileBatchHandle_t 'CUfileBatchHandle_t' + ctypedef struct CUfileError_t 'CUfileError_t': + CUfileOpError err + CUresult cu_err + cdef struct _anon_pod0 '_anon_pod0': + unsigned int major_version + unsigned int minor_version + size_t poll_thresh_size + size_t max_direct_io_size + unsigned int dstatusflags + unsigned int dcontrolflags + ctypedef struct cufileRDMAInfo_t 'cufileRDMAInfo_t': + int version + int desc_len + char* desc_str + ctypedef struct CUfileFSOps_t 'CUfileFSOps_t': + char* (*fs_type)(void*) + int (*getRDMADeviceList)(void*, sockaddr_t**) + int (*getRDMADevicePriority)(void*, char*, size_t, loff_t, sockaddr_t*) + ssize_t (*read)(void*, char*, size_t, loff_t, cufileRDMAInfo_t*) + ssize_t (*write)(void*, const char*, size_t, loff_t, cufileRDMAInfo_t*) + cdef union _anon_pod1 '_anon_pod1': + int fd + void* handle + cdef struct _anon_pod3 '_anon_pod3': + void* devPtr_base + off_t file_offset + off_t devPtr_offset + size_t size + ctypedef struct CUfileIOEvents_t 'CUfileIOEvents_t': + void* cookie + CUfileStatus_t status + size_t ret + ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': + _anon_pod0 nvfs + unsigned int fflags + unsigned int max_device_cache_size + unsigned int per_buffer_cache_size + unsigned int max_device_pinned_mem_size + unsigned int max_batch_io_size + unsigned int max_batch_io_timeout_msecs + ctypedef struct CUfileDescr_t 'CUfileDescr_t': + CUfileFileHandleType type + _anon_pod1 handle + CUfileFSOps_t* fs_ops + cdef union _anon_pod2 '_anon_pod2': + _anon_pod3 batch + ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': + CUfileBatchMode_t mode + _anon_pod2 u + CUfileHandle_t fh + CUfileOpcode_t opcode + void* cookie + + +cdef extern from *: + """ + // This is the missing piece we need to supply to help Cython & C++ compilers. + inline bool operator==(const CUfileError_t& lhs, const CUfileError_t& rhs) { + return (lhs.err == rhs.err) && (lhs.cu_err == rhs.cu_err); + } + static CUfileError_t CUFILE_LOADING_ERROR{(CUfileOpError)-1, (CUresult)-1}; + """ + const CUfileError_t CUFILE_LOADING_ERROR + ctypedef void* CUstream "CUstream" + + const char* cufileop_status_error(CUfileOpError) + + +############################################################################### +# Functions +############################################################################### + +cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil +cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil +cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil +cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil +cdef long cuFileUseCount() except* nogil +cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil +cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil +cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil +cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pyx new file mode 100644 index 0000000000000000000000000000000000000000..743792460993e17a93f8be5b846db9e1cceb7051 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cycufile.pyx @@ -0,0 +1,138 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.9.0 to 12.9.1. Do not modify it directly. + +from ._internal cimport cufile as _cufile + +import cython + +############################################################################### +# Wrapper functions +############################################################################### + +cdef CUfileError_t cuFileHandleRegister(CUfileHandle_t* fh, CUfileDescr_t* descr) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileHandleRegister(fh, descr) + + +@cython.show_performance_hints(False) +cdef void cuFileHandleDeregister(CUfileHandle_t fh) except* nogil: + _cufile._cuFileHandleDeregister(fh) + + +cdef CUfileError_t cuFileBufRegister(const void* bufPtr_base, size_t length, int flags) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBufRegister(bufPtr_base, length, flags) + + +cdef CUfileError_t cuFileBufDeregister(const void* bufPtr_base) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBufDeregister(bufPtr_base) + + +cdef ssize_t cuFileRead(CUfileHandle_t fh, void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + return _cufile._cuFileRead(fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef ssize_t cuFileWrite(CUfileHandle_t fh, const void* bufPtr_base, size_t size, off_t file_offset, off_t bufPtr_offset) except* nogil: + return _cufile._cuFileWrite(fh, bufPtr_base, size, file_offset, bufPtr_offset) + + +cdef CUfileError_t cuFileDriverOpen() except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverOpen() + + +cdef CUfileError_t cuFileDriverClose_v2() except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverClose_v2() + + +cdef long cuFileUseCount() except* nogil: + return _cufile._cuFileUseCount() + + +cdef CUfileError_t cuFileDriverGetProperties(CUfileDrvProps_t* props) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverGetProperties(props) + + +cdef CUfileError_t cuFileDriverSetPollMode(cpp_bool poll, size_t poll_threshold_size) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverSetPollMode(poll, poll_threshold_size) + + +cdef CUfileError_t cuFileDriverSetMaxDirectIOSize(size_t max_direct_io_size) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverSetMaxDirectIOSize(max_direct_io_size) + + +cdef CUfileError_t cuFileDriverSetMaxCacheSize(size_t max_cache_size) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverSetMaxCacheSize(max_cache_size) + + +cdef CUfileError_t cuFileDriverSetMaxPinnedMemSize(size_t max_pinned_size) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverSetMaxPinnedMemSize(max_pinned_size) + + +cdef CUfileError_t cuFileBatchIOSetUp(CUfileBatchHandle_t* batch_idp, unsigned nr) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBatchIOSetUp(batch_idp, nr) + + +cdef CUfileError_t cuFileBatchIOSubmit(CUfileBatchHandle_t batch_idp, unsigned nr, CUfileIOParams_t* iocbp, unsigned int flags) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBatchIOSubmit(batch_idp, nr, iocbp, flags) + + +cdef CUfileError_t cuFileBatchIOGetStatus(CUfileBatchHandle_t batch_idp, unsigned min_nr, unsigned* nr, CUfileIOEvents_t* iocbp, timespec* timeout) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBatchIOGetStatus(batch_idp, min_nr, nr, iocbp, timeout) + + +cdef CUfileError_t cuFileBatchIOCancel(CUfileBatchHandle_t batch_idp) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileBatchIOCancel(batch_idp) + + +@cython.show_performance_hints(False) +cdef void cuFileBatchIODestroy(CUfileBatchHandle_t batch_idp) except* nogil: + _cufile._cuFileBatchIODestroy(batch_idp) + + +cdef CUfileError_t cuFileReadAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_read_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileReadAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_read_p, stream) + + +cdef CUfileError_t cuFileWriteAsync(CUfileHandle_t fh, void* bufPtr_base, size_t* size_p, off_t* file_offset_p, off_t* bufPtr_offset_p, ssize_t* bytes_written_p, CUstream stream) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileWriteAsync(fh, bufPtr_base, size_p, file_offset_p, bufPtr_offset_p, bytes_written_p, stream) + + +cdef CUfileError_t cuFileStreamRegister(CUstream stream, unsigned flags) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileStreamRegister(stream, flags) + + +cdef CUfileError_t cuFileStreamDeregister(CUstream stream) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileStreamDeregister(stream) + + +cdef CUfileError_t cuFileGetVersion(int* version) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileGetVersion(version) + + +cdef CUfileError_t cuFileGetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t* value) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileGetParameterSizeT(param, value) + + +cdef CUfileError_t cuFileGetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool* value) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileGetParameterBool(param, value) + + +cdef CUfileError_t cuFileGetParameterString(CUFileStringConfigParameter_t param, char* desc_str, int len) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileGetParameterString(param, desc_str, len) + + +cdef CUfileError_t cuFileSetParameterSizeT(CUFileSizeTConfigParameter_t param, size_t value) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileSetParameterSizeT(param, value) + + +cdef CUfileError_t cuFileSetParameterBool(CUFileBoolConfigParameter_t param, cpp_bool value) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileSetParameterBool(param, value) + + +cdef CUfileError_t cuFileSetParameterString(CUFileStringConfigParameter_t param, const char* desc_str) except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileSetParameterString(param, desc_str) + + +cdef CUfileError_t cuFileDriverClose() except?CUFILE_LOADING_ERROR nogil: + return _cufile._cuFileDriverClose() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.cpp new file mode 100644 index 0000000000000000000000000000000000000000..57f1a99a9e68d4b9b6a269ab9486adca04eece85 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.cpp @@ -0,0 +1,28702 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cydriver", + "sources": [ + "cuda/bindings/cydriver.pyx" + ] + }, + "module_name": "cuda.bindings.cydriver" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cydriver +#define __PYX_HAVE_API__cuda__bindings__cydriver +/* Early includes */ +#include +#include "cuda.h" +#include "cudaProfiler.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cydriver.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings._bindings.cydriver" */ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorString)(CUresult, char const **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorName)(CUresult, char const **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuInit)(unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDriverGetVersion)(int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGet)(CUdevice *, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetCount)(int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetName)(char *, int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid)(CUuuid *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid_v2)(CUuuid *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetLuid)(char *, unsigned int *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceTotalMem_v2)(size_t *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetTexture1DLinearMaxWidth)(size_t *, CUarray_format, unsigned int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetNvSciSyncAttributes)(void *, CUdevice, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetMemPool)(CUdevice, CUmemoryPool); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetMemPool)(CUmemoryPool *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDefaultMemPool)(CUmemoryPool *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetExecAffinitySupport)(int *, CUexecAffinityType, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFlushGPUDirectRDMAWrites)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetProperties)(CUdevprop *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceComputeCapability)(int *, int *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRetain)(CUcontext *, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRelease_v2)(CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxSetFlags_v2)(CUdevice, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxGetState)(CUdevice, unsigned int *, int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxReset_v2)(CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v2)(CUcontext *, unsigned int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v3)(CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v4)(CUcontext *, CUctxCreateParams *, unsigned int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDestroy_v2)(CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPushCurrent_v2)(CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPopCurrent_v2)(CUcontext *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCurrent)(CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCurrent)(CUcontext *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevice)(CUdevice *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetFlags)(unsigned int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetFlags)(unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetId)(CUcontext, unsigned PY_LONG_LONG *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSynchronize)(void); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetLimit)(CUlimit, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetLimit)(size_t *, CUlimit); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCacheConfig)(CUfunc_cache *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCacheConfig)(CUfunc_cache); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetApiVersion)(CUcontext, unsigned int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetStreamPriorityRange)(int *, int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxResetPersistingL2Cache)(void); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetExecAffinity)(CUexecAffinityParam *, CUexecAffinityType); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxRecordEvent)(CUcontext, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxWaitEvent)(CUcontext, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxAttach)(CUcontext *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDetach)(CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetSharedMemConfig)(CUsharedconfig *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetSharedMemConfig)(CUsharedconfig); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoad)(CUmodule *, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadData)(CUmodule *, void const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadDataEx)(CUmodule *, void const *, unsigned int, CUjit_option *, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadFatBinary)(CUmodule *, void const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleUnload)(CUmodule); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetLoadingMode)(CUmoduleLoadingMode *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunction)(CUfunction *, CUmodule, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunctionCount)(unsigned int *, CUmodule); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleEnumerateFunctions)(CUfunction *, unsigned int, CUmodule); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetGlobal_v2)(CUdeviceptr *, size_t *, CUmodule, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkCreate_v2)(unsigned int, CUjit_option *, void **, CUlinkState *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddData_v2)(CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddFile_v2)(CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkComplete)(CUlinkState, void **, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkDestroy)(CUlinkState); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetTexRef)(CUtexref *, CUmodule, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetSurfRef)(CUsurfref *, CUmodule, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadData)(CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadFromFile)(CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryUnload)(CUlibrary); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernel)(CUkernel *, CUlibrary, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernelCount)(unsigned int *, CUlibrary); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryEnumerateKernels)(CUkernel *, unsigned int, CUlibrary); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetModule)(CUmodule *, CUlibrary); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetFunction)(CUfunction *, CUkernel); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetLibrary)(CUlibrary *, CUkernel); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetGlobal)(CUdeviceptr *, size_t *, CUlibrary, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetManaged)(CUdeviceptr *, size_t *, CUlibrary, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetUnifiedFunction)(void **, CUlibrary, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetAttribute)(int *, CUfunction_attribute, CUkernel, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetAttribute)(CUfunction_attribute, int, CUkernel, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetCacheConfig)(CUkernel, CUfunc_cache, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetName)(char const **, CUkernel); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetParamInfo)(CUkernel, size_t, size_t *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetInfo_v2)(size_t *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAlloc_v2)(CUdeviceptr *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocPitch_v2)(CUdeviceptr *, size_t *, size_t, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFree_v2)(CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAddressRange_v2)(CUdeviceptr *, size_t *, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocHost_v2)(void **, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeHost)(void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostAlloc)(void **, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetDevicePointer_v2)(CUdeviceptr *, void *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetFlags)(unsigned int *, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocManaged)(CUdeviceptr *, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceRegisterAsyncNotification)(CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceUnregisterAsyncNotification)(CUdevice, CUasyncCallbackHandle); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetByPCIBusId)(CUdevice *, char const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetPCIBusId)(char *, int, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetEventHandle)(CUipcEventHandle *, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenEventHandle)(CUevent *, CUipcEventHandle); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetMemHandle)(CUipcMemHandle *, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenMemHandle_v2)(CUdeviceptr *, CUipcMemHandle, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcCloseMemHandle)(CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostRegister_v2)(void *, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostUnregister)(void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeer)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoD_v2)(CUdeviceptr, void const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoH_v2)(void *, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoD_v2)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoA_v2)(CUarray, size_t, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoD_v2)(CUdeviceptr, CUarray, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoA_v2)(CUarray, size_t, void const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoH_v2)(void *, CUarray, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoA_v2)(CUarray, size_t, CUarray, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2D_v2)(CUDA_MEMCPY2D const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DUnaligned_v2)(CUDA_MEMCPY2D const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3D_v2)(CUDA_MEMCPY3D const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeer)(CUDA_MEMCPY3D_PEER const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAsync)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeerAsync)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoDAsync_v2)(CUdeviceptr, void const *, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoHAsync_v2)(void *, CUdeviceptr, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoDAsync_v2)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoAAsync_v2)(CUarray, size_t, void const *, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoHAsync_v2)(void *, CUarray, size_t, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DAsync_v2)(CUDA_MEMCPY2D const *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DAsync_v2)(CUDA_MEMCPY3D const *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeerAsync)(CUDA_MEMCPY3D_PEER const *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyBatchAsync)(CUdeviceptr *, CUdeviceptr *, size_t *, size_t, CUmemcpyAttributes *, size_t *, size_t, size_t *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DBatchAsync)(size_t, CUDA_MEMCPY3D_BATCH_OP *, size_t *, unsigned PY_LONG_LONG, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8_v2)(CUdeviceptr, unsigned char, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16_v2)(CUdeviceptr, unsigned short, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32_v2)(CUdeviceptr, unsigned int, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8_v2)(CUdeviceptr, size_t, unsigned char, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16_v2)(CUdeviceptr, size_t, unsigned short, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32_v2)(CUdeviceptr, size_t, unsigned int, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8Async)(CUdeviceptr, unsigned char, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16Async)(CUdeviceptr, unsigned short, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32Async)(CUdeviceptr, unsigned int, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8Async)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16Async)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32Async)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayCreate_v2)(CUarray *, CUDA_ARRAY_DESCRIPTOR const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetDescriptor_v2)(CUDA_ARRAY_DESCRIPTOR *, CUarray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetPlane)(CUarray *, CUarray, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayDestroy)(CUarray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DCreate_v2)(CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DGetDescriptor_v2)(CUDA_ARRAY3D_DESCRIPTOR *, CUarray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayCreate)(CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetLevel)(CUarray *, CUmipmappedArray, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayDestroy)(CUmipmappedArray); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetHandleForAddressRange)(void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemBatchDecompressAsync)(CUmemDecompressParams *, size_t, unsigned int, size_t *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressReserve)(CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressFree)(CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemCreate)(CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRelease)(CUmemGenericAllocationHandle); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMap)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMapArrayAsync)(CUarrayMapInfo *, unsigned int, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemUnmap)(CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemSetAccess)(CUdeviceptr, size_t, CUmemAccessDesc const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAccess)(unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemExportToShareableHandle)(void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemImportFromShareableHandle)(CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationGranularity)(size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationPropertiesFromHandle)(CUmemAllocationProp *, CUmemGenericAllocationHandle); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRetainAllocationHandle)(CUmemGenericAllocationHandle *, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeAsync)(CUdeviceptr, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocAsync)(CUdeviceptr *, size_t, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolTrimTo)(CUmemoryPool, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAccess)(CUmemoryPool, CUmemAccessDesc const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAccess)(CUmemAccess_flags *, CUmemoryPool, CUmemLocation *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolCreate)(CUmemoryPool *, CUmemPoolProps const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolDestroy)(CUmemoryPool); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocFromPoolAsync)(CUdeviceptr *, size_t, CUmemoryPool, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportToShareableHandle)(void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportFromShareableHandle)(CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportPointer)(CUmemPoolPtrExportData *, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportPointer)(CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastCreate)(CUmemGenericAllocationHandle *, CUmulticastObjectProp const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastAddDevice)(CUmemGenericAllocationHandle, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindMem)(CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindAddr)(CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastUnbind)(CUmemGenericAllocationHandle, CUdevice, size_t, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastGetGranularity)(size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttribute)(void *, CUpointer_attribute, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync)(CUdeviceptr, size_t, CUdevice, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync_v2)(CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise)(CUdeviceptr, size_t, CUmem_advise, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise_v2)(CUdeviceptr, size_t, CUmem_advise, CUmemLocation); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttribute)(void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttributes)(void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerSetAttribute)(void const *, CUpointer_attribute, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttributes)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreate)(CUstream *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreateWithPriority)(CUstream *, unsigned int, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetPriority)(CUstream, int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetDevice)(CUstream, CUdevice *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetFlags)(CUstream, unsigned int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetId)(CUstream, unsigned PY_LONG_LONG *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx)(CUstream, CUcontext *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx_v2)(CUstream, CUcontext *, CUgreenCtx *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitEvent)(CUstream, CUevent, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAddCallback)(CUstream, CUstreamCallback, void *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCapture_v2)(CUstream, CUstreamCaptureMode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCaptureToGraph)(CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuThreadExchangeStreamCaptureMode)(CUstreamCaptureMode *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamEndCapture)(CUstream, CUgraph *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamIsCapturing)(CUstream, CUstreamCaptureStatus *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v2)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v3)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies)(CUstream, CUgraphNode *, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies_v2)(CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAttachMemAsync)(CUstream, CUdeviceptr, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamQuery)(CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSynchronize)(CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamDestroy_v2)(CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCopyAttributes)(CUstream, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreate)(CUevent *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecord)(CUevent, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecordWithFlags)(CUevent, CUstream, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventQuery)(CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventSynchronize)(CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventDestroy_v2)(CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime)(float *, CUevent, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime_v2)(float *, CUevent, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalMemory)(CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedBuffer)(CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedMipmappedArray)(CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalMemory)(CUexternalMemory); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalSemaphore)(CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSignalExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuWaitExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalSemaphore)(CUexternalSemaphore); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBatchMemOp_v2)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetAttribute)(int *, CUfunction_attribute, CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetAttribute)(CUfunction, CUfunction_attribute, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetCacheConfig)(CUfunction, CUfunc_cache); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetModule)(CUmodule *, CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetName)(char const **, CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetParamInfo)(CUfunction, size_t, size_t *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncIsLoaded)(CUfunctionLoadingState *, CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncLoad)(CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernel)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernelEx)(CUlaunchConfig const *, CUfunction, void **, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernel)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernelMultiDevice)(CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchHostFunc)(CUstream, CUhostFn, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetBlockShape)(CUfunction, int, int, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedSize)(CUfunction, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetSize)(CUfunction, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSeti)(CUfunction, int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetf)(CUfunction, int, float); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetv)(CUfunction, int, void *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunch)(CUfunction); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGrid)(CUfunction, int, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGridAsync)(CUfunction, int, int, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetTexRef)(CUfunction, int, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedMemConfig)(CUfunction, CUsharedconfig); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphCreate)(CUgraph *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddKernelNode_v2)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetParams_v2)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetParams_v2)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemcpyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeGetParams)(CUgraphNode, CUDA_MEMCPY3D *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeSetParams)(CUgraphNode, CUDA_MEMCPY3D const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemsetNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeGetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeSetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddHostNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeGetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeSetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddChildGraphNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphChildGraphNodeGetGraph)(CUgraphNode, CUgraph *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEmptyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventRecordNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeSetEvent)(CUgraphNode, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeSetEvent)(CUgraphNode, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresSignalNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddBatchMemOpNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeGetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeSetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecBatchMemOpNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemAllocNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemAllocNodeGetParams)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemFreeNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemFreeNodeGetParams)(CUgraphNode, CUdeviceptr *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGraphMemTrim)(CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphClone)(CUgraph *, CUgraph); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeFindInClone)(CUgraphNode *, CUgraphNode, CUgraph); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetType)(CUgraphNode, CUgraphNodeType *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetRootNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges)(CUgraph, CUgraphNode *, CUgraphNode *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges_v2)(CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies_v2)(CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes_v2)(CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies_v2)(CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies_v2)(CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroyNode)(CUgraphNode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithFlags)(CUgraphExec *, CUgraph, unsigned PY_LONG_LONG); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithParams)(CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecGetFlags)(CUgraphExec, cuuint64_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecKernelNodeSetParams_v2)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemcpyNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemsetNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecHostNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecChildGraphNodeSetParams)(CUgraphExec, CUgraphNode, CUgraph); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventRecordNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventWaitNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresSignalNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresWaitNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetEnabled)(CUgraphExec, CUgraphNode, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetEnabled)(CUgraphExec, CUgraphNode, unsigned int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphUpload)(CUgraphExec, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphLaunch)(CUgraphExec, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecDestroy)(CUgraphExec); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroy)(CUgraph); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecUpdate_v2)(CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeCopyAttributes)(CUgraphNode, CUgraphNode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDebugDotPrint)(CUgraph, char const *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectCreate)(CUuserObject *, void *, CUhostFn, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRetain)(CUuserObject, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRelease)(CUuserObject, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRetainUserObject)(CUgraph, CUuserObject, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphReleaseUserObject)(CUgraph, CUuserObject, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode_v2)(CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetParams)(CUgraphNode, CUgraphNodeParams *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecNodeSetParams)(CUgraphExec, CUgraphNode, CUgraphNodeParams *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphConditionalHandleCreate)(CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessor)(int *, CUfunction, int, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(int *, CUfunction, int, size_t, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSize)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSizeWithFlags)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyAvailableDynamicSMemPerBlock)(size_t *, CUfunction, int, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialClusterSize)(int *, CUfunction, CUlaunchConfig const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveClusters)(int *, CUfunction, CUlaunchConfig const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetArray)(CUtexref, CUarray, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmappedArray)(CUtexref, CUmipmappedArray, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress_v2)(size_t *, CUtexref, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress2D_v3)(CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFormat)(CUtexref, CUarray_format, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddressMode)(CUtexref, int, CUaddress_mode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFilterMode)(CUtexref, CUfilter_mode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapFilterMode)(CUtexref, CUfilter_mode); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelBias)(CUtexref, float); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelClamp)(CUtexref, float, float); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMaxAnisotropy)(CUtexref, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetBorderColor)(CUtexref, float *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFlags)(CUtexref, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddress_v2)(CUdeviceptr *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetArray)(CUarray *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmappedArray)(CUmipmappedArray *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddressMode)(CUaddress_mode *, CUtexref, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFilterMode)(CUfilter_mode *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFormat)(CUarray_format *, int *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapFilterMode)(CUfilter_mode *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelBias)(float *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelClamp)(float *, float *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMaxAnisotropy)(int *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetBorderColor)(float *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFlags)(unsigned int *, CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefCreate)(CUtexref *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefDestroy)(CUtexref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefSetArray)(CUsurfref, CUarray, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefGetArray)(CUarray *, CUsurfref); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectCreate)(CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectDestroy)(CUtexObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUtexObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetTextureDesc)(CUDA_TEXTURE_DESC *, CUtexObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceViewDesc)(CUDA_RESOURCE_VIEW_DESC *, CUtexObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectCreate)(CUsurfObject *, CUDA_RESOURCE_DESC const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectDestroy)(CUsurfObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUsurfObject); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeTiled)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2col)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2colWide)(CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int, int, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapIm2ColWideMode, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapReplaceAddress)(CUtensorMap *, void *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceCanAccessPeer)(int *, CUdevice, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxEnablePeerAccess)(CUcontext, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDisablePeerAccess)(CUcontext); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetP2PAttribute)(int *, CUdevice_P2PAttribute, CUdevice, CUdevice); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnregisterResource)(CUgraphicsResource); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsSubResourceGetMappedArray)(CUarray *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedMipmappedArray)(CUmipmappedArray *, CUgraphicsResource); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedPointer_v2)(CUdeviceptr *, size_t *, CUgraphicsResource); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceSetMapFlags_v2)(CUgraphicsResource, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsMapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnmapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetProcAddress_v2)(char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttribute)(CUcoredumpSettings, void *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttributeGlobal)(CUcoredumpSettings, void *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttribute)(CUcoredumpSettings, void *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttributeGlobal)(CUcoredumpSettings, void *, size_t *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetExportTable)(void const **, CUuuid const *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxCreate)(CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxDestroy)(CUgreenCtx); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxFromGreenCtx)(CUcontext *, CUgreenCtx); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDevResource)(CUdevice, CUdevResource *, CUdevResourceType); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevResource)(CUcontext, CUdevResource *, CUdevResourceType); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxGetDevResource)(CUgreenCtx, CUdevResource *, CUdevResourceType); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevSmResourceSplitByCount)(CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevResourceGenerateDesc)(CUdevResourceDesc *, CUdevResource *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxRecordEvent)(CUgreenCtx, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxWaitEvent)(CUgreenCtx, CUevent); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetGreenCtx)(CUstream, CUgreenCtx *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxStreamCreate)(CUstream *, CUgreenCtx, unsigned int, int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsRegisterCallback)(CUlogsCallback, void *, CUlogsCallbackHandle *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsUnregisterCallback)(CUlogsCallbackHandle); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsCurrent)(CUlogIterator *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToFile)(CUlogIterator *, char const *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToMemory)(CUlogIterator *, char *, size_t *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetRestoreThreadId)(int, int *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetState)(int, CUprocessState *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessLock)(int, CUcheckpointLockArgs *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessCheckpoint)(int, CUcheckpointCheckpointArgs *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessRestore)(int, CUcheckpointRestoreArgs *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessUnlock)(int, CUcheckpointUnlockArgs *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStart)(void); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStop)(void); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame)(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync)(CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice)(CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUCtxCreate_v2)(CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int); /*proto*/ +static CUresult (*__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface)(CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int); /*proto*/ + +/* Module declarations from "cuda.bindings.cydriver" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cydriver" +extern int __pyx_module_is_main_cuda__bindings__cydriver; +int __pyx_module_is_main_cuda__bindings__cydriver = 0; + +/* Implementation of "cuda.bindings.cydriver" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cydriver.pyx":7 + * cimport cuda.bindings._bindings.cydriver as cydriver + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetErrorString(error, pStr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGetErrorString(CUresult __pyx_v_error, char const **__pyx_v_pStr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":8 + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGetErrorString(error, pStr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorString(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":7 + * cimport cuda.bindings._bindings.cydriver as cydriver + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetErrorString(error, pStr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":10 + * return cydriver._cuGetErrorString(error, pStr) + * + * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetErrorName(error, pStr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGetErrorName(CUresult __pyx_v_error, char const **__pyx_v_pStr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":11 + * + * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGetErrorName(error, pStr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorName(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":10 + * return cydriver._cuGetErrorString(error, pStr) + * + * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetErrorName(error, pStr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":13 + * return cydriver._cuGetErrorName(error, pStr) + * + * cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuInit(Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuInit(unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":14 + * + * cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuInit(Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuInit(__pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 14, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":13 + * return cydriver._cuGetErrorName(error, pStr) + * + * cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuInit(Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":16 + * return cydriver._cuInit(Flags) + * + * cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDriverGetVersion(driverVersion) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDriverGetVersion(int *__pyx_v_driverVersion) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":17 + * + * cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDriverGetVersion(driverVersion) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDriverGetVersion(__pyx_v_driverVersion); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":16 + * return cydriver._cuInit(Flags) + * + * cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDriverGetVersion(driverVersion) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":19 + * return cydriver._cuDriverGetVersion(driverVersion) + * + * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGet(device, ordinal) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGet(CUdevice *__pyx_v_device, int __pyx_v_ordinal) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":20 + * + * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGet(device, ordinal) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGet(__pyx_v_device, __pyx_v_ordinal); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":19 + * return cydriver._cuDriverGetVersion(driverVersion) + * + * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGet(device, ordinal) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":22 + * return cydriver._cuDeviceGet(device, ordinal) + * + * cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetCount(count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetCount(int *__pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":23 + * + * cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetCount(count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetCount(__pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":22 + * return cydriver._cuDeviceGet(device, ordinal) + * + * cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetCount(count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":25 + * return cydriver._cuDeviceGetCount(count) + * + * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetName(name, length, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetName(char *__pyx_v_name, int __pyx_v_length, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":26 + * + * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetName(name, length, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetName(__pyx_v_name, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":25 + * return cydriver._cuDeviceGetCount(count) + * + * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetName(name, length, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":28 + * return cydriver._cuDeviceGetName(name, length, dev) + * + * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetUuid(uuid, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetUuid(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":29 + * + * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetUuid(uuid, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":28 + * return cydriver._cuDeviceGetName(name, length, dev) + * + * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetUuid(uuid, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetUuid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":31 + * return cydriver._cuDeviceGetUuid(uuid, dev) + * + * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetUuid_v2(uuid, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetUuid_v2(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":32 + * + * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetUuid_v2(uuid, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid_v2(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":31 + * return cydriver._cuDeviceGetUuid(uuid, dev) + * + * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetUuid_v2(uuid, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetUuid_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":34 + * return cydriver._cuDeviceGetUuid_v2(uuid, dev) + * + * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetLuid(char *__pyx_v_luid, unsigned int *__pyx_v_deviceNodeMask, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":35 + * + * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetLuid(__pyx_v_luid, __pyx_v_deviceNodeMask, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":34 + * return cydriver._cuDeviceGetUuid_v2(uuid, dev) + * + * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetLuid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":37 + * return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) + * + * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceTotalMem_v2(numbytes, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceTotalMem(size_t *__pyx_v_numbytes, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":38 + * + * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceTotalMem_v2(numbytes, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceTotalMem_v2(__pyx_v_numbytes, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":37 + * return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) + * + * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceTotalMem_v2(numbytes, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceTotalMem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":40 + * return cydriver._cuDeviceTotalMem_v2(numbytes, dev) + * + * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, CUarray_format __pyx_v_pformat, unsigned int __pyx_v_numChannels, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":41 + * + * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":40 + * return cydriver._cuDeviceTotalMem_v2(numbytes, dev) + * + * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":43 + * return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) + * + * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetAttribute(pi, attrib, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetAttribute(int *__pyx_v_pi, CUdevice_attribute __pyx_v_attrib, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":44 + * + * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetAttribute(pi, attrib, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":43 + * return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) + * + * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetAttribute(pi, attrib, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":46 + * return cydriver._cuDeviceGetAttribute(pi, attrib, dev) + * + * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, CUdevice __pyx_v_dev, int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":47 + * + * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":46 + * return cydriver._cuDeviceGetAttribute(pi, attrib, dev) + * + * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":49 + * return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) + * + * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceSetMemPool(dev, pool) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceSetMemPool(CUdevice __pyx_v_dev, CUmemoryPool __pyx_v_pool) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":50 + * + * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceSetMemPool(dev, pool) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetMemPool(__pyx_v_dev, __pyx_v_pool); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":49 + * return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) + * + * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceSetMemPool(dev, pool) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":52 + * return cydriver._cuDeviceSetMemPool(dev, pool) + * + * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetMemPool(pool, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetMemPool(CUmemoryPool *__pyx_v_pool, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":53 + * + * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetMemPool(pool, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetMemPool(__pyx_v_pool, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":52 + * return cydriver._cuDeviceSetMemPool(dev, pool) + * + * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetMemPool(pool, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":55 + * return cydriver._cuDeviceGetMemPool(pool, dev) + * + * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetDefaultMemPool(CUmemoryPool *__pyx_v_pool_out, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":56 + * + * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDefaultMemPool(__pyx_v_pool_out, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":55 + * return cydriver._cuDeviceGetMemPool(pool, dev) + * + * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":58 + * return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) + * + * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetExecAffinitySupport(int *__pyx_v_pi, CUexecAffinityType __pyx_v_typename, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":59 + * + * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetExecAffinitySupport(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":58 + * return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) + * + * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":61 + * return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) + * + * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget __pyx_v_target, CUflushGPUDirectRDMAWritesScope __pyx_v_scope) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":62 + * + * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFlushGPUDirectRDMAWrites(__pyx_v_target, __pyx_v_scope); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":61 + * return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) + * + * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":64 + * return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) + * + * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetProperties(prop, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetProperties(CUdevprop *__pyx_v_prop, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":65 + * + * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetProperties(prop, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetProperties(__pyx_v_prop, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":64 + * return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) + * + * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetProperties(prop, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":67 + * return cydriver._cuDeviceGetProperties(prop, dev) + * + * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceComputeCapability(major, minor, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceComputeCapability(int *__pyx_v_major, int *__pyx_v_minor, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":68 + * + * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceComputeCapability(major, minor, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceComputeCapability(__pyx_v_major, __pyx_v_minor, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":67 + * return cydriver._cuDeviceGetProperties(prop, dev) + * + * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceComputeCapability(major, minor, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceComputeCapability", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":70 + * return cydriver._cuDeviceComputeCapability(major, minor, dev) + * + * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxRetain(CUcontext *__pyx_v_pctx, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":71 + * + * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRetain(__pyx_v_pctx, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":70 + * return cydriver._cuDeviceComputeCapability(major, minor, dev) + * + * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevicePrimaryCtxRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":73 + * return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) + * + * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxRelease_v2(dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxRelease(CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":74 + * + * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevicePrimaryCtxRelease_v2(dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRelease_v2(__pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":73 + * return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) + * + * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxRelease_v2(dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevicePrimaryCtxRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":76 + * return cydriver._cuDevicePrimaryCtxRelease_v2(dev) + * + * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxSetFlags(CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":77 + * + * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxSetFlags_v2(__pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":76 + * return cydriver._cuDevicePrimaryCtxRelease_v2(dev) + * + * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevicePrimaryCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":79 + * return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) + * + * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxGetState(CUdevice __pyx_v_dev, unsigned int *__pyx_v_flags, int *__pyx_v_active) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":80 + * + * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxGetState(__pyx_v_dev, __pyx_v_flags, __pyx_v_active); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":79 + * return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) + * + * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevicePrimaryCtxGetState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":82 + * return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) + * + * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxReset_v2(dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxReset(CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":83 + * + * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevicePrimaryCtxReset_v2(dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxReset_v2(__pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":82 + * return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) + * + * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevicePrimaryCtxReset_v2(dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevicePrimaryCtxReset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":85 + * return cydriver._cuDevicePrimaryCtxReset_v2(dev) + * + * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v2(pctx, flags, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":86 + * + * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxCreate_v2(pctx, flags, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v2(__pyx_v_pctx, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":85 + * return cydriver._cuDevicePrimaryCtxReset_v2(dev) + * + * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v2(pctx, flags, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":88 + * return cydriver._cuCtxCreate_v2(pctx, flags, dev) + * + * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate_v3(CUcontext *__pyx_v_pctx, CUexecAffinityParam *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":89 + * + * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v3(__pyx_v_pctx, __pyx_v_paramsArray, __pyx_v_numParams, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":88 + * return cydriver._cuCtxCreate_v2(pctx, flags, dev) + * + * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":91 + * return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + * + * cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate_v4(CUcontext *__pyx_v_pctx, CUctxCreateParams *__pyx_v_ctxCreateParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":92 + * + * cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v4(__pyx_v_pctx, __pyx_v_ctxCreateParams, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":91 + * return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + * + * cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxCreate_v4", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":94 + * return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) + * + * cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDestroy_v2(ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxDestroy(CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":95 + * + * cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxDestroy_v2(ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDestroy_v2(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":94 + * return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) + * + * cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDestroy_v2(ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":97 + * return cydriver._cuCtxDestroy_v2(ctx) + * + * cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxPushCurrent_v2(ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxPushCurrent(CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":98 + * + * cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxPushCurrent_v2(ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPushCurrent_v2(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":97 + * return cydriver._cuCtxDestroy_v2(ctx) + * + * cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxPushCurrent_v2(ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxPushCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":100 + * return cydriver._cuCtxPushCurrent_v2(ctx) + * + * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxPopCurrent_v2(pctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxPopCurrent(CUcontext *__pyx_v_pctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":101 + * + * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxPopCurrent_v2(pctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPopCurrent_v2(__pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":100 + * return cydriver._cuCtxPushCurrent_v2(ctx) + * + * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxPopCurrent_v2(pctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxPopCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":103 + * return cydriver._cuCtxPopCurrent_v2(pctx) + * + * cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetCurrent(ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSetCurrent(CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":104 + * + * cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSetCurrent(ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCurrent(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":103 + * return cydriver._cuCtxPopCurrent_v2(pctx) + * + * cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetCurrent(ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":106 + * return cydriver._cuCtxSetCurrent(ctx) + * + * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetCurrent(pctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetCurrent(CUcontext *__pyx_v_pctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":107 + * + * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetCurrent(pctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCurrent(__pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":106 + * return cydriver._cuCtxSetCurrent(ctx) + * + * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetCurrent(pctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":109 + * return cydriver._cuCtxGetCurrent(pctx) + * + * cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetDevice(device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetDevice(CUdevice *__pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":110 + * + * cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetDevice(device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevice(__pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":109 + * return cydriver._cuCtxGetCurrent(pctx) + * + * cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetDevice(device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":112 + * return cydriver._cuCtxGetDevice(device) + * + * cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetFlags(flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetFlags(unsigned int *__pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":113 + * + * cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetFlags(flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":112 + * return cydriver._cuCtxGetDevice(device) + * + * cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":115 + * return cydriver._cuCtxGetFlags(flags) + * + * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetFlags(flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSetFlags(unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":116 + * + * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSetFlags(flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":115 + * return cydriver._cuCtxGetFlags(flags) + * + * cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":118 + * return cydriver._cuCtxSetFlags(flags) + * + * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetId(ctx, ctxId) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetId(CUcontext __pyx_v_ctx, unsigned PY_LONG_LONG *__pyx_v_ctxId) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":119 + * + * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetId(ctx, ctxId) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetId(__pyx_v_ctx, __pyx_v_ctxId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":118 + * return cydriver._cuCtxSetFlags(flags) + * + * cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetId(ctx, ctxId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":121 + * return cydriver._cuCtxGetId(ctx, ctxId) + * + * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSynchronize() + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSynchronize(void) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":122 + * + * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSynchronize() # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSynchronize(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":121 + * return cydriver._cuCtxGetId(ctx, ctxId) + * + * cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSynchronize() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":124 + * return cydriver._cuCtxSynchronize() + * + * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetLimit(limit, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSetLimit(CUlimit __pyx_v_limit, size_t __pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":125 + * + * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSetLimit(limit, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetLimit(__pyx_v_limit, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 125, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":124 + * return cydriver._cuCtxSynchronize() + * + * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetLimit(limit, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":127 + * return cydriver._cuCtxSetLimit(limit, value) + * + * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetLimit(pvalue, limit) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetLimit(size_t *__pyx_v_pvalue, CUlimit __pyx_v_limit) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":128 + * + * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetLimit(pvalue, limit) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetLimit(__pyx_v_pvalue, __pyx_v_limit); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":127 + * return cydriver._cuCtxSetLimit(limit, value) + * + * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetLimit(pvalue, limit) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":130 + * return cydriver._cuCtxGetLimit(pvalue, limit) + * + * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetCacheConfig(pconfig) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetCacheConfig(CUfunc_cache *__pyx_v_pconfig) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":131 + * + * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetCacheConfig(pconfig) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCacheConfig(__pyx_v_pconfig); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":130 + * return cydriver._cuCtxGetLimit(pvalue, limit) + * + * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetCacheConfig(pconfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":133 + * return cydriver._cuCtxGetCacheConfig(pconfig) + * + * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetCacheConfig(config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSetCacheConfig(CUfunc_cache __pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":134 + * + * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSetCacheConfig(config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCacheConfig(__pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":133 + * return cydriver._cuCtxGetCacheConfig(pconfig) + * + * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetCacheConfig(config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":136 + * return cydriver._cuCtxSetCacheConfig(config) + * + * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetApiVersion(ctx, version) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetApiVersion(CUcontext __pyx_v_ctx, unsigned int *__pyx_v_version) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":137 + * + * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetApiVersion(ctx, version) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetApiVersion(__pyx_v_ctx, __pyx_v_version); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":136 + * return cydriver._cuCtxSetCacheConfig(config) + * + * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetApiVersion(ctx, version) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetApiVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":139 + * return cydriver._cuCtxGetApiVersion(ctx, version) + * + * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":140 + * + * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":139 + * return cydriver._cuCtxGetApiVersion(ctx, version) + * + * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":142 + * return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxResetPersistingL2Cache() + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxResetPersistingL2Cache(void) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":143 + * + * cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxResetPersistingL2Cache() # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxResetPersistingL2Cache(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":142 + * return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxResetPersistingL2Cache() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":145 + * return cydriver._cuCtxResetPersistingL2Cache() + * + * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetExecAffinity(CUexecAffinityParam *__pyx_v_pExecAffinity, CUexecAffinityType __pyx_v_typename) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":146 + * + * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetExecAffinity(__pyx_v_pExecAffinity, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":145 + * return cydriver._cuCtxResetPersistingL2Cache() + * + * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetExecAffinity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":148 + * return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) + * + * cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxRecordEvent(hCtx, hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxRecordEvent(CUcontext __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":149 + * + * cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxRecordEvent(hCtx, hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxRecordEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":148 + * return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) + * + * cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxRecordEvent(hCtx, hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxRecordEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":151 + * return cydriver._cuCtxRecordEvent(hCtx, hEvent) + * + * cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxWaitEvent(hCtx, hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxWaitEvent(CUcontext __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":152 + * + * cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxWaitEvent(hCtx, hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxWaitEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":151 + * return cydriver._cuCtxRecordEvent(hCtx, hEvent) + * + * cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxWaitEvent(hCtx, hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":154 + * return cydriver._cuCtxWaitEvent(hCtx, hEvent) + * + * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxAttach(pctx, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxAttach(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":155 + * + * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxAttach(pctx, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxAttach(__pyx_v_pctx, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":154 + * return cydriver._cuCtxWaitEvent(hCtx, hEvent) + * + * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxAttach(pctx, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":157 + * return cydriver._cuCtxAttach(pctx, flags) + * + * cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDetach(ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxDetach(CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":158 + * + * cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxDetach(ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDetach(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":157 + * return cydriver._cuCtxAttach(pctx, flags) + * + * cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDetach(ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxDetach", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":160 + * return cydriver._cuCtxDetach(ctx) + * + * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetSharedMemConfig(pConfig) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetSharedMemConfig(CUsharedconfig *__pyx_v_pConfig) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":161 + * + * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetSharedMemConfig(pConfig) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetSharedMemConfig(__pyx_v_pConfig); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":160 + * return cydriver._cuCtxDetach(ctx) + * + * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetSharedMemConfig(pConfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":163 + * return cydriver._cuCtxGetSharedMemConfig(pConfig) + * + * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetSharedMemConfig(config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxSetSharedMemConfig(CUsharedconfig __pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":164 + * + * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxSetSharedMemConfig(config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetSharedMemConfig(__pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":163 + * return cydriver._cuCtxGetSharedMemConfig(pConfig) + * + * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxSetSharedMemConfig(config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":166 + * return cydriver._cuCtxSetSharedMemConfig(config) + * + * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoad(module, fname) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleLoad(CUmodule *__pyx_v_module, char const *__pyx_v_fname) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":167 + * + * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleLoad(module, fname) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoad(__pyx_v_module, __pyx_v_fname); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 167, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":166 + * return cydriver._cuCtxSetSharedMemConfig(config) + * + * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoad(module, fname) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":169 + * return cydriver._cuModuleLoad(module, fname) + * + * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadData(module, image) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadData(CUmodule *__pyx_v_module, void const *__pyx_v_image) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":170 + * + * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleLoadData(module, image) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadData(__pyx_v_module, __pyx_v_image); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":169 + * return cydriver._cuModuleLoad(module, fname) + * + * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadData(module, image) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":172 + * return cydriver._cuModuleLoadData(module, image) + * + * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadDataEx(CUmodule *__pyx_v_module, void const *__pyx_v_image, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":173 + * + * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadDataEx(__pyx_v_module, __pyx_v_image, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":172 + * return cydriver._cuModuleLoadData(module, image) + * + * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":175 + * return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) + * + * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadFatBinary(module, fatCubin) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadFatBinary(CUmodule *__pyx_v_module, void const *__pyx_v_fatCubin) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":176 + * + * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleLoadFatBinary(module, fatCubin) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadFatBinary(__pyx_v_module, __pyx_v_fatCubin); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":175 + * return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) + * + * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleLoadFatBinary(module, fatCubin) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleLoadFatBinary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":178 + * return cydriver._cuModuleLoadFatBinary(module, fatCubin) + * + * cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleUnload(hmod) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleUnload(CUmodule __pyx_v_hmod) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":179 + * + * cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleUnload(hmod) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleUnload(__pyx_v_hmod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":178 + * return cydriver._cuModuleLoadFatBinary(module, fatCubin) + * + * cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleUnload(hmod) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":181 + * return cydriver._cuModuleUnload(hmod) + * + * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetLoadingMode(mode) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetLoadingMode(CUmoduleLoadingMode *__pyx_v_mode) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":182 + * + * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetLoadingMode(mode) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetLoadingMode(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":181 + * return cydriver._cuModuleUnload(hmod) + * + * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetLoadingMode(mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetLoadingMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":184 + * return cydriver._cuModuleGetLoadingMode(mode) + * + * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetFunction(hfunc, hmod, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetFunction(CUfunction *__pyx_v_hfunc, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":185 + * + * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetFunction(hfunc, hmod, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunction(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":184 + * return cydriver._cuModuleGetLoadingMode(mode) + * + * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetFunction(hfunc, hmod, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":187 + * return cydriver._cuModuleGetFunction(hfunc, hmod, name) + * + * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetFunctionCount(count, mod) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetFunctionCount(unsigned int *__pyx_v_count, CUmodule __pyx_v_mod) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":188 + * + * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetFunctionCount(count, mod) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunctionCount(__pyx_v_count, __pyx_v_mod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":187 + * return cydriver._cuModuleGetFunction(hfunc, hmod, name) + * + * cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetFunctionCount(count, mod) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetFunctionCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":190 + * return cydriver._cuModuleGetFunctionCount(count, mod) + * + * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleEnumerateFunctions(CUfunction *__pyx_v_functions, unsigned int __pyx_v_numFunctions, CUmodule __pyx_v_mod) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":191 + * + * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleEnumerateFunctions(__pyx_v_functions, __pyx_v_numFunctions, __pyx_v_mod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":190 + * return cydriver._cuModuleGetFunctionCount(count, mod) + * + * cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleEnumerateFunctions", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":193 + * return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) + * + * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":194 + * + * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetGlobal_v2(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":193 + * return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) + * + * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":196 + * return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) + * + * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLinkCreate(unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues, CUlinkState *__pyx_v_stateOut) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":197 + * + * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkCreate_v2(__pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues, __pyx_v_stateOut); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":196 + * return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) + * + * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":199 + * return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) + * + * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLinkAddData(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, void *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":200 + * + * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddData_v2(__pyx_v_state, __pyx_v_typename, __pyx_v_data, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":199 + * return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) + * + * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":202 + * return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) + * + * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLinkAddFile(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, char const *__pyx_v_path, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":203 + * + * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddFile_v2(__pyx_v_state, __pyx_v_typename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":202 + * return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) + * + * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":205 + * return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) + * + * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkComplete(state, cubinOut, sizeOut) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLinkComplete(CUlinkState __pyx_v_state, void **__pyx_v_cubinOut, size_t *__pyx_v_sizeOut) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":206 + * + * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLinkComplete(state, cubinOut, sizeOut) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkComplete(__pyx_v_state, __pyx_v_cubinOut, __pyx_v_sizeOut); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":205 + * return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) + * + * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkComplete(state, cubinOut, sizeOut) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":208 + * return cydriver._cuLinkComplete(state, cubinOut, sizeOut) + * + * cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkDestroy(state) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLinkDestroy(CUlinkState __pyx_v_state) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":209 + * + * cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLinkDestroy(state) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkDestroy(__pyx_v_state); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":208 + * return cydriver._cuLinkComplete(state, cubinOut, sizeOut) + * + * cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLinkDestroy(state) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":211 + * return cydriver._cuLinkDestroy(state) + * + * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetTexRef(CUtexref *__pyx_v_pTexRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":212 + * + * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetTexRef(__pyx_v_pTexRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":211 + * return cydriver._cuLinkDestroy(state) + * + * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":214 + * return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) + * + * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuModuleGetSurfRef(CUsurfref *__pyx_v_pSurfRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":215 + * + * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetSurfRef(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":214 + * return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) + * + * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":217 + * return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) + * + * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryLoadData(CUlibrary *__pyx_v_library, void const *__pyx_v_code, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":218 + * + * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadData(__pyx_v_library, __pyx_v_code, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":217 + * return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) + * + * cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":220 + * return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryLoadFromFile(CUlibrary *__pyx_v_library, char const *__pyx_v_fileName, CUjit_option *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, CUlibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":221 + * + * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, __pyx_v_jitOptions, __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, __pyx_v_libraryOptions, __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":220 + * return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryLoadFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":223 + * return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryUnload(library) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryUnload(CUlibrary __pyx_v_library) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":224 + * + * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryUnload(library) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryUnload(__pyx_v_library); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":223 + * return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryUnload(library) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":226 + * return cydriver._cuLibraryUnload(library) + * + * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetKernel(pKernel, library, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetKernel(CUkernel *__pyx_v_pKernel, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":227 + * + * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetKernel(pKernel, library, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":226 + * return cydriver._cuLibraryUnload(library) + * + * cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetKernel(pKernel, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":229 + * return cydriver._cuLibraryGetKernel(pKernel, library, name) + * + * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetKernelCount(count, lib) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetKernelCount(unsigned int *__pyx_v_count, CUlibrary __pyx_v_lib) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":230 + * + * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetKernelCount(count, lib) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":229 + * return cydriver._cuLibraryGetKernel(pKernel, library, name) + * + * cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetKernelCount(count, lib) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetKernelCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":232 + * return cydriver._cuLibraryGetKernelCount(count, lib) + * + * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryEnumerateKernels(CUkernel *__pyx_v_kernels, unsigned int __pyx_v_numKernels, CUlibrary __pyx_v_lib) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":233 + * + * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":232 + * return cydriver._cuLibraryGetKernelCount(count, lib) + * + * cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryEnumerateKernels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":235 + * return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetModule(pMod, library) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetModule(CUmodule *__pyx_v_pMod, CUlibrary __pyx_v_library) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":236 + * + * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetModule(pMod, library) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetModule(__pyx_v_pMod, __pyx_v_library); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":235 + * return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetModule(pMod, library) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":238 + * return cydriver._cuLibraryGetModule(pMod, library) + * + * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetFunction(pFunc, kernel) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelGetFunction(CUfunction *__pyx_v_pFunc, CUkernel __pyx_v_kernel) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":239 + * + * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelGetFunction(pFunc, kernel) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetFunction(__pyx_v_pFunc, __pyx_v_kernel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":238 + * return cydriver._cuLibraryGetModule(pMod, library) + * + * cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetFunction(pFunc, kernel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":241 + * return cydriver._cuKernelGetFunction(pFunc, kernel) + * + * cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetLibrary(pLib, kernel) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelGetLibrary(CUlibrary *__pyx_v_pLib, CUkernel __pyx_v_kernel) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":242 + * + * cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelGetLibrary(pLib, kernel) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetLibrary(__pyx_v_pLib, __pyx_v_kernel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":241 + * return cydriver._cuKernelGetFunction(pFunc, kernel) + * + * cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetLibrary(pLib, kernel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelGetLibrary", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":244 + * return cydriver._cuKernelGetLibrary(pLib, kernel) + * + * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":245 + * + * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":244 + * return cydriver._cuKernelGetLibrary(pLib, kernel) + * + * cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":247 + * return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetManaged(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUlibrary __pyx_v_library, char const *__pyx_v_name) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":248 + * + * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":247 + * return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":250 + * return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetUnifiedFunction(void **__pyx_v_fptr, CUlibrary __pyx_v_library, char const *__pyx_v_symbol) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":251 + * + * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":250 + * return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLibraryGetUnifiedFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":253 + * return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":254 + * + * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":253 + * return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":256 + * return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) + * + * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelSetAttribute(CUfunction_attribute __pyx_v_attrib, int __pyx_v_val, CUkernel __pyx_v_kernel, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":257 + * + * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetAttribute(__pyx_v_attrib, __pyx_v_val, __pyx_v_kernel, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":256 + * return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) + * + * cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":259 + * return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) + * + * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelSetCacheConfig(kernel, config, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelSetCacheConfig(CUkernel __pyx_v_kernel, CUfunc_cache __pyx_v_config, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":260 + * + * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelSetCacheConfig(kernel, config, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetCacheConfig(__pyx_v_kernel, __pyx_v_config, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":259 + * return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) + * + * cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelSetCacheConfig(kernel, config, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":262 + * return cydriver._cuKernelSetCacheConfig(kernel, config, dev) + * + * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetName(name, hfunc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelGetName(char const **__pyx_v_name, CUkernel __pyx_v_hfunc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":263 + * + * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelGetName(name, hfunc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetName(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":262 + * return cydriver._cuKernelSetCacheConfig(kernel, config, dev) + * + * cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetName(name, hfunc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":265 + * return cydriver._cuKernelGetName(name, hfunc) + * + * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuKernelGetParamInfo(CUkernel __pyx_v_kernel, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":266 + * + * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetParamInfo(__pyx_v_kernel, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":265 + * return cydriver._cuKernelGetName(name, hfunc) + * + * cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuKernelGetParamInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":268 + * return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) + * + * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetInfo_v2(free, total) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetInfo(size_t *__pyx_v_free, size_t *__pyx_v_total) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":269 + * + * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetInfo_v2(free, total) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetInfo_v2(__pyx_v_free, __pyx_v_total); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":268 + * return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) + * + * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetInfo_v2(free, total) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":271 + * return cydriver._cuMemGetInfo_v2(free, total) + * + * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAlloc_v2(dptr, bytesize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAlloc(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":272 + * + * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAlloc_v2(dptr, bytesize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAlloc_v2(__pyx_v_dptr, __pyx_v_bytesize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":271 + * return cydriver._cuMemGetInfo_v2(free, total) + * + * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAlloc_v2(dptr, bytesize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":274 + * return cydriver._cuMemAlloc_v2(dptr, bytesize) + * + * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAllocPitch(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_pPitch, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":275 + * + * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocPitch_v2(__pyx_v_dptr, __pyx_v_pPitch, __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":274 + * return cydriver._cuMemAlloc_v2(dptr, bytesize) + * + * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAllocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":277 + * return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * + * cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFree_v2(dptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemFree(CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":278 + * + * cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemFree_v2(dptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFree_v2(__pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":277 + * return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + * + * cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFree_v2(dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemFree", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":280 + * return cydriver._cuMemFree_v2(dptr) + * + * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetAddressRange(CUdeviceptr *__pyx_v_pbase, size_t *__pyx_v_psize, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":281 + * + * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAddressRange_v2(__pyx_v_pbase, __pyx_v_psize, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":280 + * return cydriver._cuMemFree_v2(dptr) + * + * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":283 + * return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) + * + * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocHost_v2(pp, bytesize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAllocHost(void **__pyx_v_pp, size_t __pyx_v_bytesize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":284 + * + * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAllocHost_v2(pp, bytesize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocHost_v2(__pyx_v_pp, __pyx_v_bytesize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":283 + * return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) + * + * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocHost_v2(pp, bytesize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAllocHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":286 + * return cydriver._cuMemAllocHost_v2(pp, bytesize) + * + * cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFreeHost(p) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemFreeHost(void *__pyx_v_p) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":287 + * + * cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemFreeHost(p) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeHost(__pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":286 + * return cydriver._cuMemAllocHost_v2(pp, bytesize) + * + * cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFreeHost(p) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":289 + * return cydriver._cuMemFreeHost(p) + * + * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostAlloc(pp, bytesize, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemHostAlloc(void **__pyx_v_pp, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":290 + * + * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemHostAlloc(pp, bytesize, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostAlloc(__pyx_v_pp, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":289 + * return cydriver._cuMemFreeHost(p) + * + * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostAlloc(pp, bytesize, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":292 + * return cydriver._cuMemHostAlloc(pp, bytesize, Flags) + * + * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemHostGetDevicePointer(CUdeviceptr *__pyx_v_pdptr, void *__pyx_v_p, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":293 + * + * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetDevicePointer_v2(__pyx_v_pdptr, __pyx_v_p, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":292 + * return cydriver._cuMemHostAlloc(pp, bytesize, Flags) + * + * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":295 + * return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) + * + * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostGetFlags(pFlags, p) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_p) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":296 + * + * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemHostGetFlags(pFlags, p) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetFlags(__pyx_v_pFlags, __pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":295 + * return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) + * + * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostGetFlags(pFlags, p) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":298 + * return cydriver._cuMemHostGetFlags(pFlags, p) + * + * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocManaged(dptr, bytesize, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAllocManaged(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":299 + * + * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAllocManaged(dptr, bytesize, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocManaged(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":298 + * return cydriver._cuMemHostGetFlags(pFlags, p) + * + * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocManaged(dptr, bytesize, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":301 + * return cydriver._cuMemAllocManaged(dptr, bytesize, flags) + * + * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceRegisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, CUasyncCallbackHandle *__pyx_v_callback) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":302 + * + * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":301 + * return cydriver._cuMemAllocManaged(dptr, bytesize, flags) + * + * cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceRegisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":304 + * return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceUnregisterAsyncNotification(CUdevice __pyx_v_device, CUasyncCallbackHandle __pyx_v_callback) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":305 + * + * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":304 + * return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceUnregisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":307 + * return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) + * + * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetByPCIBusId(CUdevice *__pyx_v_dev, char const *__pyx_v_pciBusId) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":308 + * + * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetByPCIBusId(__pyx_v_dev, __pyx_v_pciBusId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":307 + * return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) + * + * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":310 + * return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) + * + * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":311 + * + * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":310 + * return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) + * + * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":313 + * return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) + * + * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcGetEventHandle(pHandle, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuIpcGetEventHandle(CUipcEventHandle *__pyx_v_pHandle, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":314 + * + * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuIpcGetEventHandle(pHandle, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetEventHandle(__pyx_v_pHandle, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":313 + * return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) + * + * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcGetEventHandle(pHandle, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":316 + * return cydriver._cuIpcGetEventHandle(pHandle, event) + * + * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcOpenEventHandle(phEvent, handle) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuIpcOpenEventHandle(CUevent *__pyx_v_phEvent, CUipcEventHandle __pyx_v_handle) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":317 + * + * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuIpcOpenEventHandle(phEvent, handle) # <<<<<<<<<<<<<< + * + * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenEventHandle(__pyx_v_phEvent, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":316 + * return cydriver._cuIpcGetEventHandle(pHandle, event) + * + * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcOpenEventHandle(phEvent, handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":319 + * return cydriver._cuIpcOpenEventHandle(phEvent, handle) + * + * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcGetMemHandle(pHandle, dptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuIpcGetMemHandle(CUipcMemHandle *__pyx_v_pHandle, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":320 + * + * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuIpcGetMemHandle(pHandle, dptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetMemHandle(__pyx_v_pHandle, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":319 + * return cydriver._cuIpcOpenEventHandle(phEvent, handle) + * + * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcGetMemHandle(pHandle, dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":322 + * return cydriver._cuIpcGetMemHandle(pHandle, dptr) + * + * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuIpcOpenMemHandle(CUdeviceptr *__pyx_v_pdptr, CUipcMemHandle __pyx_v_handle, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":323 + * + * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenMemHandle_v2(__pyx_v_pdptr, __pyx_v_handle, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":322 + * return cydriver._cuIpcGetMemHandle(pHandle, dptr) + * + * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":325 + * return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) + * + * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcCloseMemHandle(dptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuIpcCloseMemHandle(CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":326 + * + * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuIpcCloseMemHandle(dptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcCloseMemHandle(__pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":325 + * return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) + * + * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuIpcCloseMemHandle(dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":328 + * return cydriver._cuIpcCloseMemHandle(dptr) + * + * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemHostRegister(void *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":329 + * + * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostRegister_v2(__pyx_v_p, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":328 + * return cydriver._cuIpcCloseMemHandle(dptr) + * + * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":331 + * return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) + * + * cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostUnregister(p) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemHostUnregister(void *__pyx_v_p) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":332 + * + * cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemHostUnregister(p) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostUnregister(__pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":331 + * return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) + * + * cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemHostUnregister(p) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":334 + * return cydriver._cuMemHostUnregister(p) + * + * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy(dst, src, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":335 + * + * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy(dst, src, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":334 + * return cydriver._cuMemHostUnregister(p) + * + * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy(dst, src, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":337 + * return cydriver._cuMemcpy(dst, src, ByteCount) + * + * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyPeer(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":338 + * + * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeer(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":337 + * return cydriver._cuMemcpy(dst, src, ByteCount) + * + * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":340 + * return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * + * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoD(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":341 + * + * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoD_v2(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":340 + * return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + * + * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyHtoD", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":343 + * return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) + * + * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoH(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":344 + * + * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoH_v2(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":343 + * return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) + * + * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyDtoH", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":346 + * return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoD(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":347 + * + * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoD_v2(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":346 + * return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyDtoD", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":349 + * return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":350 + * + * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":349 + * return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyDtoA", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":352 + * return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoD(CUdeviceptr __pyx_v_dstDevice, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":353 + * + * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoD_v2(__pyx_v_dstDevice, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":352 + * return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) + * + * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyAtoD", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":355 + * return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":356 + * + * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":355 + * return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyHtoA", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":358 + * return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) + * + * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoH(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":359 + * + * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoH_v2(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":358 + * return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) + * + * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyAtoH", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":361 + * return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":362 + * + * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":361 + * return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyAtoA", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":364 + * return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2D_v2(pCopy) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2D(CUDA_MEMCPY2D const *__pyx_v_pCopy) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":365 + * + * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy2D_v2(pCopy) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2D_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":364 + * return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + * + * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2D_v2(pCopy) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":367 + * return cydriver._cuMemcpy2D_v2(pCopy) + * + * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2DUnaligned_v2(pCopy) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2DUnaligned(CUDA_MEMCPY2D const *__pyx_v_pCopy) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":368 + * + * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy2DUnaligned_v2(pCopy) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DUnaligned_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":367 + * return cydriver._cuMemcpy2D_v2(pCopy) + * + * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2DUnaligned_v2(pCopy) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy2DUnaligned", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":370 + * return cydriver._cuMemcpy2DUnaligned_v2(pCopy) + * + * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3D_v2(pCopy) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3D(CUDA_MEMCPY3D const *__pyx_v_pCopy) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":371 + * + * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy3D_v2(pCopy) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3D_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":370 + * return cydriver._cuMemcpy2DUnaligned_v2(pCopy) + * + * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3D_v2(pCopy) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":373 + * return cydriver._cuMemcpy3D_v2(pCopy) + * + * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DPeer(pCopy) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":374 + * + * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy3DPeer(pCopy) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeer(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":373 + * return cydriver._cuMemcpy3D_v2(pCopy) + * + * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DPeer(pCopy) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":376 + * return cydriver._cuMemcpy3DPeer(pCopy) + * + * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAsync(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":377 + * + * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":376 + * return cydriver._cuMemcpy3DPeer(pCopy) + * + * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":379 + * return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) + * + * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyPeerAsync(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":380 + * + * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeerAsync(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 380, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":379 + * return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) + * + * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":382 + * return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * + * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoDAsync(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":383 + * + * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoDAsync_v2(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":382 + * return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + * + * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyHtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":385 + * return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) + * + * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoHAsync(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":386 + * + * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoHAsync_v2(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":385 + * return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) + * + * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyDtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":388 + * return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) + * + * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoDAsync(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":389 + * + * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoDAsync_v2(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":388 + * return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) + * + * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyDtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":391 + * return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) + * + * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoAAsync(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":392 + * + * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoAAsync_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 392, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":391 + * return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) + * + * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyHtoAAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":394 + * return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) + * + * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoHAsync(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":395 + * + * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoHAsync_v2(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":394 + * return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) + * + * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyAtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":397 + * return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) + * + * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2DAsync(CUDA_MEMCPY2D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":398 + * + * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DAsync_v2(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":397 + * return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) + * + * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":400 + * return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) + * + * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DAsync(CUDA_MEMCPY3D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":401 + * + * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DAsync_v2(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":400 + * return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) + * + * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":403 + * return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) + * + * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":404 + * + * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeerAsync(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":403 + * return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) + * + * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":406 + * return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) + * + * cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpyBatchAsync(CUdeviceptr *__pyx_v_dsts, CUdeviceptr *__pyx_v_srcs, size_t *__pyx_v_sizes, size_t __pyx_v_count, CUmemcpyAttributes *__pyx_v_attrs, size_t *__pyx_v_attrsIdxs, size_t __pyx_v_numAttrs, size_t *__pyx_v_failIdx, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":407 + * + * cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyBatchAsync(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":406 + * return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) + * + * cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpyBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":409 + * return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * + * cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DBatchAsync(size_t __pyx_v_numOps, CUDA_MEMCPY3D_BATCH_OP *__pyx_v_opList, size_t *__pyx_v_failIdx, unsigned PY_LONG_LONG __pyx_v_flags, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":410 + * + * cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DBatchAsync(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":409 + * return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + * + * cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemcpy3DBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":412 + * return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) + * + * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD8_v2(dstDevice, uc, N) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD8(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":413 + * + * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD8_v2(dstDevice, uc, N) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8_v2(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 413, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":412 + * return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) + * + * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD8_v2(dstDevice, uc, N) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD8", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":415 + * return cydriver._cuMemsetD8_v2(dstDevice, uc, N) + * + * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD16_v2(dstDevice, us, N) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD16(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":416 + * + * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD16_v2(dstDevice, us, N) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16_v2(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":415 + * return cydriver._cuMemsetD8_v2(dstDevice, uc, N) + * + * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD16_v2(dstDevice, us, N) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":418 + * return cydriver._cuMemsetD16_v2(dstDevice, us, N) + * + * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD32_v2(dstDevice, ui, N) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD32(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":419 + * + * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD32_v2(dstDevice, ui, N) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32_v2(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":418 + * return cydriver._cuMemsetD16_v2(dstDevice, us, N) + * + * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD32_v2(dstDevice, ui, N) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":421 + * return cydriver._cuMemsetD32_v2(dstDevice, ui, N) + * + * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D8(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":422 + * + * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":421 + * return cydriver._cuMemsetD32_v2(dstDevice, ui, N) + * + * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D8", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":424 + * return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) + * + * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D16(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":425 + * + * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":424 + * return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) + * + * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D16", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":427 + * return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) + * + * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D32(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":428 + * + * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":427 + * return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) + * + * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":430 + * return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) + * + * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD8Async(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":431 + * + * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8Async(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":430 + * return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) + * + * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":433 + * return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) + * + * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD16Async(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":434 + * + * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16Async(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":433 + * return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) + * + * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":436 + * return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) + * + * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD32Async(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":437 + * + * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32Async(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":436 + * return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) + * + * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":439 + * return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) + * + * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D8Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":440 + * + * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":439 + * return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) + * + * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":442 + * return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) + * + * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D16Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":443 + * + * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":442 + * return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) + * + * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":445 + * return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) + * + * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D32Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":446 + * + * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":445 + * return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) + * + * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":448 + * return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) + * + * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayCreate(CUarray *__pyx_v_pHandle, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_pAllocateArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":449 + * + * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayCreate_v2(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":448 + * return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) + * + * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":451 + * return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) + * + * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":452 + * + * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetDescriptor_v2(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":451 + * return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) + * + * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":454 + * return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) + * + * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetSparseProperties(sparseProperties, array) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUarray __pyx_v_array) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":455 + * + * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayGetSparseProperties(sparseProperties, array) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":454 + * return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) + * + * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetSparseProperties(sparseProperties, array) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":457 + * return cydriver._cuArrayGetSparseProperties(sparseProperties, array) + * + * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUmipmappedArray __pyx_v_mipmap) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":458 + * + * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":457 + * return cydriver._cuArrayGetSparseProperties(sparseProperties, array) + * + * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":460 + * return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUarray __pyx_v_array, CUdevice __pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":461 + * + * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 461, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":460 + * return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":463 + * return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUmipmappedArray __pyx_v_mipmap, CUdevice __pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":464 + * + * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":463 + * return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":466 + * return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayGetPlane(CUarray *__pyx_v_pPlaneArray, CUarray __pyx_v_hArray, unsigned int __pyx_v_planeIdx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":467 + * + * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":466 + * return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":469 + * return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayDestroy(hArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArrayDestroy(CUarray __pyx_v_hArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":470 + * + * cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArrayDestroy(hArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayDestroy(__pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":469 + * return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArrayDestroy(hArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":472 + * return cydriver._cuArrayDestroy(hArray) + * + * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArray3DCreate(CUarray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pAllocateArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":473 + * + * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DCreate_v2(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":472 + * return cydriver._cuArrayDestroy(hArray) + * + * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArray3DCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":475 + * return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) + * + * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":476 + * + * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DGetDescriptor_v2(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":475 + * return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) + * + * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuArray3DGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":478 + * return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) + * + * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayCreate(CUmipmappedArray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":479 + * + * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayCreate(__pyx_v_pHandle, __pyx_v_pMipmappedArrayDesc, __pyx_v_numMipmapLevels); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":478 + * return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) + * + * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":481 + * return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * + * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetLevel(CUarray *__pyx_v_pLevelArray, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_level) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":482 + * + * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetLevel(__pyx_v_pLevelArray, __pyx_v_hMipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":481 + * return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) + * + * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":484 + * return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) + * + * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayDestroy(CUmipmappedArray __pyx_v_hMipmappedArray) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":485 + * + * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayDestroy(__pyx_v_hMipmappedArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":484 + * return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) + * + * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMipmappedArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":487 + * return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) + * + * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetHandleForAddressRange(void *__pyx_v_handle, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_size, CUmemRangeHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":488 + * + * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetHandleForAddressRange(__pyx_v_handle, __pyx_v_dptr, __pyx_v_size, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":487 + * return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) + * + * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":490 + * return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) + * + * cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemBatchDecompressAsync(CUmemDecompressParams *__pyx_v_paramsArray, size_t __pyx_v_count, unsigned int __pyx_v_flags, size_t *__pyx_v_errorIndex, CUstream __pyx_v_stream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":491 + * + * cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemBatchDecompressAsync(__pyx_v_paramsArray, __pyx_v_count, __pyx_v_flags, __pyx_v_errorIndex, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":490 + * return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) + * + * cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemBatchDecompressAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":493 + * return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) + * + * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAddressReserve(CUdeviceptr *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_alignment, CUdeviceptr __pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":494 + * + * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressReserve(__pyx_v_ptr, __pyx_v_size, __pyx_v_alignment, __pyx_v_addr, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":493 + * return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) + * + * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":496 + * return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) + * + * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAddressFree(ptr, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAddressFree(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":497 + * + * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAddressFree(ptr, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressFree(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 497, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":496 + * return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) + * + * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAddressFree(ptr, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":499 + * return cydriver._cuMemAddressFree(ptr, size) + * + * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemCreate(handle, size, prop, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemCreate(CUmemGenericAllocationHandle *__pyx_v_handle, size_t __pyx_v_size, CUmemAllocationProp const *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":500 + * + * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemCreate(handle, size, prop, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemCreate(__pyx_v_handle, __pyx_v_size, __pyx_v_prop, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":499 + * return cydriver._cuMemAddressFree(ptr, size) + * + * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemCreate(handle, size, prop, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":502 + * return cydriver._cuMemCreate(handle, size, prop, flags) + * + * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRelease(handle) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemRelease(CUmemGenericAllocationHandle __pyx_v_handle) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":503 + * + * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemRelease(handle) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRelease(__pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":502 + * return cydriver._cuMemCreate(handle, size, prop, flags) + * + * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRelease(handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":505 + * return cydriver._cuMemRelease(handle) + * + * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemMap(ptr, size, offset, handle, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemMap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":506 + * + * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemMap(ptr, size, offset, handle, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMap(__pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":505 + * return cydriver._cuMemRelease(handle) + * + * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemMap(ptr, size, offset, handle, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":508 + * return cydriver._cuMemMap(ptr, size, offset, handle, flags) + * + * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemMapArrayAsync(CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":509 + * + * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMapArrayAsync(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":508 + * return cydriver._cuMemMap(ptr, size, offset, handle, flags) + * + * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":511 + * return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) + * + * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemUnmap(ptr, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemUnmap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":512 + * + * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemUnmap(ptr, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemUnmap(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":511 + * return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) + * + * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemUnmap(ptr, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":514 + * return cydriver._cuMemUnmap(ptr, size) + * + * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemSetAccess(ptr, size, desc, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemSetAccess(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":515 + * + * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemSetAccess(ptr, size, desc, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemSetAccess(__pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":514 + * return cydriver._cuMemUnmap(ptr, size) + * + * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemSetAccess(ptr, size, desc, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":517 + * return cydriver._cuMemSetAccess(ptr, size, desc, count) + * + * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAccess(flags, location, ptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, CUmemLocation const *__pyx_v_location, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":518 + * + * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetAccess(flags, location, ptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAccess(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":517 + * return cydriver._cuMemSetAccess(ptr, size, desc, count) + * + * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAccess(flags, location, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":520 + * return cydriver._cuMemGetAccess(flags, location, ptr) + * + * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, CUmemGenericAllocationHandle __pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":521 + * + * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":520 + * return cydriver._cuMemGetAccess(flags, location, ptr) + * + * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":523 + * return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) + * + * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, CUmemAllocationHandleType __pyx_v_shHandleType) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":524 + * + * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemImportFromShareableHandle(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":523 + * return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) + * + * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":526 + * return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) + * + * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, CUmemAllocationProp const *__pyx_v_prop, CUmemAllocationGranularity_flags __pyx_v_option) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":527 + * + * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationGranularity(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":526 + * return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) + * + * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":529 + * return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) + * + * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *__pyx_v_prop, CUmemGenericAllocationHandle __pyx_v_handle) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":530 + * + * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationPropertiesFromHandle(__pyx_v_prop, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":529 + * return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) + * + * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemGetAllocationPropertiesFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":532 + * return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) + * + * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRetainAllocationHandle(handle, addr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":533 + * + * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemRetainAllocationHandle(handle, addr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRetainAllocationHandle(__pyx_v_handle, __pyx_v_addr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":532 + * return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) + * + * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRetainAllocationHandle(handle, addr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemRetainAllocationHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":535 + * return cydriver._cuMemRetainAllocationHandle(handle, addr) + * + * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFreeAsync(dptr, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemFreeAsync(CUdeviceptr __pyx_v_dptr, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":536 + * + * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemFreeAsync(dptr, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeAsync(__pyx_v_dptr, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":535 + * return cydriver._cuMemRetainAllocationHandle(handle, addr) + * + * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemFreeAsync(dptr, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":538 + * return cydriver._cuMemFreeAsync(dptr, hStream) + * + * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAllocAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":539 + * + * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":538 + * return cydriver._cuMemFreeAsync(dptr, hStream) + * + * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":541 + * return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) + * + * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolTrimTo(CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":542 + * + * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolTrimTo(__pyx_v_pool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 542, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":541 + * return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) + * + * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":544 + * return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) + * + * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolSetAttribute(pool, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolSetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":545 + * + * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolSetAttribute(pool, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":544 + * return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) + * + * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolSetAttribute(pool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":547 + * return cydriver._cuMemPoolSetAttribute(pool, attr, value) + * + * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolGetAttribute(pool, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolGetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":548 + * + * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolGetAttribute(pool, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":547 + * return cydriver._cuMemPoolSetAttribute(pool, attr, value) + * + * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolGetAttribute(pool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":550 + * return cydriver._cuMemPoolGetAttribute(pool, attr, value) + * + * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolSetAccess(pool, map, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolSetAccess(CUmemoryPool __pyx_v_pool, CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":551 + * + * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolSetAccess(pool, map, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAccess(__pyx_v_pool, __pyx_v_map, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":550 + * return cydriver._cuMemPoolGetAttribute(pool, attr, value) + * + * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolSetAccess(pool, map, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":553 + * return cydriver._cuMemPoolSetAccess(pool, map, count) + * + * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolGetAccess(flags, memPool, location) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolGetAccess(CUmemAccess_flags *__pyx_v_flags, CUmemoryPool __pyx_v_memPool, CUmemLocation *__pyx_v_location) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":554 + * + * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolGetAccess(flags, memPool, location) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAccess(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":553 + * return cydriver._cuMemPoolSetAccess(pool, map, count) + * + * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolGetAccess(flags, memPool, location) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":556 + * return cydriver._cuMemPoolGetAccess(flags, memPool, location) + * + * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolCreate(pool, poolProps) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolCreate(CUmemoryPool *__pyx_v_pool, CUmemPoolProps const *__pyx_v_poolProps) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":557 + * + * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolCreate(pool, poolProps) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolCreate(__pyx_v_pool, __pyx_v_poolProps); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 557, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":556 + * return cydriver._cuMemPoolGetAccess(flags, memPool, location) + * + * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolCreate(pool, poolProps) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":559 + * return cydriver._cuMemPoolCreate(pool, poolProps) + * + * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolDestroy(pool) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolDestroy(CUmemoryPool __pyx_v_pool) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":560 + * + * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolDestroy(pool) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolDestroy(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":559 + * return cydriver._cuMemPoolCreate(pool, poolProps) + * + * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolDestroy(pool) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":562 + * return cydriver._cuMemPoolDestroy(pool) + * + * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAllocFromPoolAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUmemoryPool __pyx_v_pool, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":563 + * + * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocFromPoolAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":562 + * return cydriver._cuMemPoolDestroy(pool) + * + * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":565 + * return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) + * + * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, CUmemoryPool __pyx_v_pool, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":566 + * + * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportToShareableHandle(__pyx_v_handle_out, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":565 + * return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) + * + * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":568 + * return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) + * + * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolImportFromShareableHandle(CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":569 + * + * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportFromShareableHandle(__pyx_v_pool_out, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 569, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":568 + * return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) + * + * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":571 + * return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) + * + * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolExportPointer(shareData_out, ptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolExportPointer(CUmemPoolPtrExportData *__pyx_v_shareData_out, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":572 + * + * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolExportPointer(shareData_out, ptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportPointer(__pyx_v_shareData_out, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":571 + * return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) + * + * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolExportPointer(shareData_out, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":574 + * return cydriver._cuMemPoolExportPointer(shareData_out, ptr) + * + * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPoolImportPointer(CUdeviceptr *__pyx_v_ptr_out, CUmemoryPool __pyx_v_pool, CUmemPoolPtrExportData *__pyx_v_shareData) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":575 + * + * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportPointer(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":574 + * return cydriver._cuMemPoolExportPointer(shareData_out, ptr) + * + * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":577 + * return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) + * + * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastCreate(mcHandle, prop) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastCreate(CUmemGenericAllocationHandle *__pyx_v_mcHandle, CUmulticastObjectProp const *__pyx_v_prop) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":578 + * + * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastCreate(mcHandle, prop) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastCreate(__pyx_v_mcHandle, __pyx_v_prop); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":577 + * return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) + * + * cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastCreate(mcHandle, prop) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":580 + * return cydriver._cuMulticastCreate(mcHandle, prop) + * + * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastAddDevice(mcHandle, dev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastAddDevice(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":581 + * + * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastAddDevice(mcHandle, dev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastAddDevice(__pyx_v_mcHandle, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":580 + * return cydriver._cuMulticastCreate(mcHandle, prop) + * + * cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastAddDevice(mcHandle, dev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastAddDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":583 + * return cydriver._cuMulticastAddDevice(mcHandle, dev) + * + * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastBindMem(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUmemGenericAllocationHandle __pyx_v_memHandle, size_t __pyx_v_memOffset, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":584 + * + * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindMem(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memHandle, __pyx_v_memOffset, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 584, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":583 + * return cydriver._cuMulticastAddDevice(mcHandle, dev) + * + * cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastBindMem", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":586 + * return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * + * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastBindAddr(CUmemGenericAllocationHandle __pyx_v_mcHandle, size_t __pyx_v_mcOffset, CUdeviceptr __pyx_v_memptr, size_t __pyx_v_size, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":587 + * + * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindAddr(__pyx_v_mcHandle, __pyx_v_mcOffset, __pyx_v_memptr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":586 + * return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) + * + * cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastBindAddr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":589 + * return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) + * + * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastUnbind(CUmemGenericAllocationHandle __pyx_v_mcHandle, CUdevice __pyx_v_dev, size_t __pyx_v_mcOffset, size_t __pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":590 + * + * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastUnbind(__pyx_v_mcHandle, __pyx_v_dev, __pyx_v_mcOffset, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":589 + * return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) + * + * cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastUnbind", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":592 + * return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) + * + * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastGetGranularity(granularity, prop, option) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMulticastGetGranularity(size_t *__pyx_v_granularity, CUmulticastObjectProp const *__pyx_v_prop, CUmulticastGranularity_flags __pyx_v_option) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":593 + * + * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMulticastGetGranularity(granularity, prop, option) # <<<<<<<<<<<<<< + * + * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastGetGranularity(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 593, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":592 + * return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) + * + * cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMulticastGetGranularity(granularity, prop, option) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMulticastGetGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":595 + * return cydriver._cuMulticastGetGranularity(granularity, prop, option) + * + * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerGetAttribute(data, attribute, ptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuPointerGetAttribute(void *__pyx_v_data, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":596 + * + * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuPointerGetAttribute(data, attribute, ptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttribute(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":595 + * return cydriver._cuMulticastGetGranularity(granularity, prop, option) + * + * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerGetAttribute(data, attribute, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":598 + * return cydriver._cuPointerGetAttribute(data, attribute, ptr) + * + * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPrefetchAsync(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUdevice __pyx_v_dstDevice, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":599 + * + * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":598 + * return cydriver._cuPointerGetAttribute(data, attribute, ptr) + * + * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":601 + * return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) + * + * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemPrefetchAsync_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmemLocation __pyx_v_location, unsigned int __pyx_v_flags, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":602 + * + * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":601 + * return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) + * + * cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemPrefetchAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":604 + * return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) + * + * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAdvise(devPtr, count, advice, device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAdvise(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUdevice __pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":605 + * + * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAdvise(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":604 + * return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) + * + * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAdvise(devPtr, count, advice, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":607 + * return cydriver._cuMemAdvise(devPtr, count, advice, device) + * + * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemAdvise_v2(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUmemLocation __pyx_v_location) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":608 + * + * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_location); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":607 + * return cydriver._cuMemAdvise(devPtr, count, advice, device) + * + * cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemAdvise_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":610 + * return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) + * + * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, CUmem_range_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":611 + * + * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":610 + * return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) + * + * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":613 + * return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":614 + * + * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":613 + * return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":616 + * return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerSetAttribute(value, attribute, ptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuPointerSetAttribute(void const *__pyx_v_value, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":617 + * + * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuPointerSetAttribute(value, attribute, ptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerSetAttribute(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":616 + * return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerSetAttribute(value, attribute, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":619 + * return cydriver._cuPointerSetAttribute(value, attribute, ptr) + * + * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, CUdeviceptr __pyx_v_ptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":620 + * + * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttributes(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":619 + * return cydriver._cuPointerSetAttribute(value, attribute, ptr) + * + * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":622 + * return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) + * + * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCreate(phStream, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamCreate(CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":623 + * + * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamCreate(phStream, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreate(__pyx_v_phStream, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":622 + * return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) + * + * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCreate(phStream, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":625 + * return cydriver._cuStreamCreate(phStream, Flags) + * + * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamCreateWithPriority(CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":626 + * + * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreateWithPriority(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":625 + * return cydriver._cuStreamCreate(phStream, Flags) + * + * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":628 + * return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) + * + * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetPriority(hStream, priority) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetPriority(CUstream __pyx_v_hStream, int *__pyx_v_priority) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":629 + * + * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetPriority(hStream, priority) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":628 + * return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) + * + * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetPriority(hStream, priority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":631 + * return cydriver._cuStreamGetPriority(hStream, priority) + * + * cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetDevice(hStream, device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetDevice(CUstream __pyx_v_hStream, CUdevice *__pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":632 + * + * cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetDevice(hStream, device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetDevice(__pyx_v_hStream, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":631 + * return cydriver._cuStreamGetPriority(hStream, priority) + * + * cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetDevice(hStream, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":634 + * return cydriver._cuStreamGetDevice(hStream, device) + * + * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetFlags(hStream, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetFlags(CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":635 + * + * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetFlags(hStream, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":634 + * return cydriver._cuStreamGetDevice(hStream, device) + * + * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetFlags(hStream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":637 + * return cydriver._cuStreamGetFlags(hStream, flags) + * + * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetId(hStream, streamId) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetId(CUstream __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":638 + * + * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetId(hStream, streamId) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetId(__pyx_v_hStream, __pyx_v_streamId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":637 + * return cydriver._cuStreamGetFlags(hStream, flags) + * + * cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetId(hStream, streamId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":640 + * return cydriver._cuStreamGetId(hStream, streamId) + * + * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCtx(hStream, pctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCtx(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":641 + * + * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetCtx(hStream, pctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx(__pyx_v_hStream, __pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":640 + * return cydriver._cuStreamGetId(hStream, streamId) + * + * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCtx(hStream, pctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":643 + * return cydriver._cuStreamGetCtx(hStream, pctx) + * + * cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCtx_v2(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pCtx, CUgreenCtx *__pyx_v_pGreenCtx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":644 + * + * cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx_v2(__pyx_v_hStream, __pyx_v_pCtx, __pyx_v_pGreenCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":643 + * return cydriver._cuStreamGetCtx(hStream, pctx) + * + * cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetCtx_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":646 + * return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) + * + * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitEvent(CUstream __pyx_v_hStream, CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":647 + * + * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitEvent(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":646 + * return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) + * + * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":649 + * return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) + * + * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamAddCallback(CUstream __pyx_v_hStream, CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":650 + * + * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAddCallback(__pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":649 + * return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) + * + * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":652 + * return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) + * + * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBeginCapture_v2(hStream, mode) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamBeginCapture(CUstream __pyx_v_hStream, CUstreamCaptureMode __pyx_v_mode) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":653 + * + * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamBeginCapture_v2(hStream, mode) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCapture_v2(__pyx_v_hStream, __pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 653, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":652 + * return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) + * + * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBeginCapture_v2(hStream, mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":655 + * return cydriver._cuStreamBeginCapture_v2(hStream, mode) + * + * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamBeginCaptureToGraph(CUstream __pyx_v_hStream, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUstreamCaptureMode __pyx_v_mode) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":656 + * + * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * + * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCaptureToGraph(__pyx_v_hStream, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 656, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":655 + * return cydriver._cuStreamBeginCapture_v2(hStream, mode) + * + * cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamBeginCaptureToGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":658 + * return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * + * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuThreadExchangeStreamCaptureMode(mode) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *__pyx_v_mode) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":659 + * + * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuThreadExchangeStreamCaptureMode(mode) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuThreadExchangeStreamCaptureMode(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 659, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":658 + * return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + * + * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuThreadExchangeStreamCaptureMode(mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":661 + * return cydriver._cuThreadExchangeStreamCaptureMode(mode) + * + * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamEndCapture(hStream, phGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamEndCapture(CUstream __pyx_v_hStream, CUgraph *__pyx_v_phGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":662 + * + * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamEndCapture(hStream, phGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamEndCapture(__pyx_v_hStream, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":661 + * return cydriver._cuThreadExchangeStreamCaptureMode(mode) + * + * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamEndCapture(hStream, phGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":664 + * return cydriver._cuStreamEndCapture(hStream, phGraph) + * + * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamIsCapturing(hStream, captureStatus) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamIsCapturing(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":665 + * + * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamIsCapturing(hStream, captureStatus) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamIsCapturing(__pyx_v_hStream, __pyx_v_captureStatus); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":664 + * return cydriver._cuStreamEndCapture(hStream, phGraph) + * + * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamIsCapturing(hStream, captureStatus) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":667 + * return cydriver._cuStreamIsCapturing(hStream, captureStatus) + * + * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCaptureInfo(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":668 + * + * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v2(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":667 + * return cydriver._cuStreamIsCapturing(hStream, captureStatus) + * + * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetCaptureInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":670 + * return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCaptureInfo_v3(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, CUgraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":671 + * + * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v3(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 671, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":670 + * return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetCaptureInfo_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":673 + * return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamUpdateCaptureDependencies(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":674 + * + * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":673 + * return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":676 + * return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) + * + * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamUpdateCaptureDependencies_v2(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":677 + * + * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies_v2(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":676 + * return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) + * + * cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamUpdateCaptureDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":679 + * return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) + * + * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamAttachMemAsync(CUstream __pyx_v_hStream, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":680 + * + * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAttachMemAsync(__pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 680, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":679 + * return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) + * + * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":682 + * return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) + * + * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamQuery(hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamQuery(CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":683 + * + * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamQuery(hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamQuery(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":682 + * return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) + * + * cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamQuery(hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":685 + * return cydriver._cuStreamQuery(hStream) + * + * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamSynchronize(hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamSynchronize(CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":686 + * + * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamSynchronize(hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSynchronize(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":685 + * return cydriver._cuStreamQuery(hStream) + * + * cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamSynchronize(hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":688 + * return cydriver._cuStreamSynchronize(hStream) + * + * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamDestroy_v2(hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamDestroy(CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":689 + * + * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamDestroy_v2(hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamDestroy_v2(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":688 + * return cydriver._cuStreamSynchronize(hStream) + * + * cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamDestroy_v2(hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":691 + * return cydriver._cuStreamDestroy_v2(hStream) + * + * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCopyAttributes(dst, src) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamCopyAttributes(CUstream __pyx_v_dst, CUstream __pyx_v_src) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":692 + * + * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":691 + * return cydriver._cuStreamDestroy_v2(hStream) + * + * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamCopyAttributes(dst, src) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":694 + * return cydriver._cuStreamCopyAttributes(dst, src) + * + * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetAttribute(hStream, attr, value_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue *__pyx_v_value_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":695 + * + * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetAttribute(hStream, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":694 + * return cydriver._cuStreamCopyAttributes(dst, src) + * + * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetAttribute(hStream, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":697 + * return cydriver._cuStreamGetAttribute(hStream, attr, value_out) + * + * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamSetAttribute(hStream, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamSetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue const *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":698 + * + * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamSetAttribute(hStream, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":697 + * return cydriver._cuStreamGetAttribute(hStream, attr, value_out) + * + * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamSetAttribute(hStream, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":700 + * return cydriver._cuStreamSetAttribute(hStream, attr, value) + * + * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventCreate(phEvent, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventCreate(CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":701 + * + * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventCreate(phEvent, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreate(__pyx_v_phEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":700 + * return cydriver._cuStreamSetAttribute(hStream, attr, value) + * + * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventCreate(phEvent, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":703 + * return cydriver._cuEventCreate(phEvent, Flags) + * + * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventRecord(hEvent, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventRecord(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":704 + * + * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventRecord(hEvent, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecord(__pyx_v_hEvent, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":703 + * return cydriver._cuEventCreate(phEvent, Flags) + * + * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventRecord(hEvent, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":706 + * return cydriver._cuEventRecord(hEvent, hStream) + * + * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventRecordWithFlags(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":707 + * + * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecordWithFlags(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":706 + * return cydriver._cuEventRecord(hEvent, hStream) + * + * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":709 + * return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) + * + * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventQuery(hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventQuery(CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":710 + * + * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventQuery(hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventQuery(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 710, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":709 + * return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) + * + * cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventQuery(hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":712 + * return cydriver._cuEventQuery(hEvent) + * + * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventSynchronize(hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventSynchronize(CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":713 + * + * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventSynchronize(hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventSynchronize(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":712 + * return cydriver._cuEventQuery(hEvent) + * + * cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventSynchronize(hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":715 + * return cydriver._cuEventSynchronize(hEvent) + * + * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventDestroy_v2(hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventDestroy(CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":716 + * + * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventDestroy_v2(hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventDestroy_v2(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":715 + * return cydriver._cuEventSynchronize(hEvent) + * + * cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventDestroy_v2(hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":718 + * return cydriver._cuEventDestroy_v2(hEvent) + * + * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventElapsedTime(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":719 + * + * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":718 + * return cydriver._cuEventDestroy_v2(hEvent) + * + * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":721 + * return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) + * + * cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventElapsedTime_v2(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":722 + * + * cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) # <<<<<<<<<<<<<< + * + * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime_v2(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 722, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":721 + * return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) + * + * cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventElapsedTime_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":724 + * return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) + * + * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuImportExternalMemory(CUexternalMemory *__pyx_v_extMem_out, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":725 + * + * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":724 + * return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) + * + * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":727 + * return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuExternalMemoryGetMappedBuffer(CUdeviceptr *__pyx_v_devPtr, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":728 + * + * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":727 + * return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":730 + * return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_mipmap, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":731 + * + * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":730 + * return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":733 + * return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDestroyExternalMemory(extMem) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDestroyExternalMemory(CUexternalMemory __pyx_v_extMem) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":734 + * + * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDestroyExternalMemory(extMem) # <<<<<<<<<<<<<< + * + * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalMemory(__pyx_v_extMem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":733 + * return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDestroyExternalMemory(extMem) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":736 + * return cydriver._cuDestroyExternalMemory(extMem) + * + * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuImportExternalSemaphore(CUexternalSemaphore *__pyx_v_extSem_out, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":737 + * + * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":736 + * return cydriver._cuDestroyExternalMemory(extMem) + * + * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":739 + * return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSignalExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":740 + * + * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSignalExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":739 + * return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":742 + * return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * + * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuWaitExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":743 + * + * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuWaitExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 743, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":742 + * return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * + * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":745 + * return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * + * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDestroyExternalSemaphore(extSem) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDestroyExternalSemaphore(CUexternalSemaphore __pyx_v_extSem) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":746 + * + * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDestroyExternalSemaphore(extSem) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalSemaphore(__pyx_v_extSem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":745 + * return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + * + * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDestroyExternalSemaphore(extSem) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":748 + * return cydriver._cuDestroyExternalSemaphore(extSem) + * + * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":749 + * + * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":748 + * return cydriver._cuDestroyExternalSemaphore(extSem) + * + * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamWaitValue32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":751 + * return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":752 + * + * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":751 + * return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamWaitValue64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":754 + * return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamWriteValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":755 + * + * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":754 + * return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamWriteValue32", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":757 + * return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamWriteValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":758 + * + * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":757 + * return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamWriteValue64", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":760 + * return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamBatchMemOp(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":761 + * + * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBatchMemOp_v2(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":760 + * return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) + * + * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamBatchMemOp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":763 + * return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) + * + * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUfunction __pyx_v_hfunc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":764 + * + * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":763 + * return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) + * + * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":766 + * return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) + * + * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetAttribute(hfunc, attrib, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncSetAttribute(CUfunction __pyx_v_hfunc, CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":767 + * + * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncSetAttribute(hfunc, attrib, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetAttribute(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":766 + * return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) + * + * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetAttribute(hfunc, attrib, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":769 + * return cydriver._cuFuncSetAttribute(hfunc, attrib, value) + * + * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetCacheConfig(hfunc, config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncSetCacheConfig(CUfunction __pyx_v_hfunc, CUfunc_cache __pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":770 + * + * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncSetCacheConfig(hfunc, config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetCacheConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":769 + * return cydriver._cuFuncSetAttribute(hfunc, attrib, value) + * + * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetCacheConfig(hfunc, config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":772 + * return cydriver._cuFuncSetCacheConfig(hfunc, config) + * + * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetModule(hmod, hfunc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncGetModule(CUmodule *__pyx_v_hmod, CUfunction __pyx_v_hfunc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":773 + * + * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncGetModule(hmod, hfunc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetModule(__pyx_v_hmod, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":772 + * return cydriver._cuFuncSetCacheConfig(hfunc, config) + * + * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetModule(hmod, hfunc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":775 + * return cydriver._cuFuncGetModule(hmod, hfunc) + * + * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetName(name, hfunc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncGetName(char const **__pyx_v_name, CUfunction __pyx_v_hfunc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":776 + * + * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncGetName(name, hfunc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetName(__pyx_v_name, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":775 + * return cydriver._cuFuncGetModule(hmod, hfunc) + * + * cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetName(name, hfunc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncGetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":778 + * return cydriver._cuFuncGetName(name, hfunc) + * + * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncGetParamInfo(CUfunction __pyx_v_func, size_t __pyx_v_paramIndex, size_t *__pyx_v_paramOffset, size_t *__pyx_v_paramSize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":779 + * + * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetParamInfo(__pyx_v_func, __pyx_v_paramIndex, __pyx_v_paramOffset, __pyx_v_paramSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":778 + * return cydriver._cuFuncGetName(name, hfunc) + * + * cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncGetParamInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":781 + * return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) + * + * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncIsLoaded(state, function) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncIsLoaded(CUfunctionLoadingState *__pyx_v_state, CUfunction __pyx_v_function) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":782 + * + * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncIsLoaded(state, function) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncIsLoaded(__pyx_v_state, __pyx_v_function); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":781 + * return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) + * + * cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncIsLoaded(state, function) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncIsLoaded", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":784 + * return cydriver._cuFuncIsLoaded(state, function) + * + * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncLoad(function) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncLoad(CUfunction __pyx_v_function) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":785 + * + * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncLoad(function) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncLoad(__pyx_v_function); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 785, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":784 + * return cydriver._cuFuncIsLoaded(state, function) + * + * cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncLoad(function) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":787 + * return cydriver._cuFuncLoad(function) + * + * cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":788 + * + * cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 788, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":787 + * return cydriver._cuFuncLoad(function) + * + * cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":790 + * return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * + * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchKernelEx(CUlaunchConfig const *__pyx_v_config, CUfunction __pyx_v_f, void **__pyx_v_kernelParams, void **__pyx_v_extra) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":791 + * + * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernelEx(__pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":790 + * return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + * + * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":793 + * return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) + * + * cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchCooperativeKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":794 + * + * cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":793 + * return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) + * + * cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":796 + * return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * + * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":797 + * + * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernelMultiDevice(__pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":796 + * return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + * + * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":799 + * return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) + * + * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchHostFunc(hStream, fn, userData) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchHostFunc(CUstream __pyx_v_hStream, CUhostFn __pyx_v_fn, void *__pyx_v_userData) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":800 + * + * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchHostFunc(hStream, fn, userData) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchHostFunc(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":799 + * return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) + * + * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchHostFunc(hStream, fn, userData) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":802 + * return cydriver._cuLaunchHostFunc(hStream, fn, userData) + * + * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncSetBlockShape(CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":803 + * + * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetBlockShape(__pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":802 + * return cydriver._cuLaunchHostFunc(hStream, fn, userData) + * + * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":805 + * return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) + * + * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetSharedSize(hfunc, numbytes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncSetSharedSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":806 + * + * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncSetSharedSize(hfunc, numbytes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":805 + * return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) + * + * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetSharedSize(hfunc, numbytes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":808 + * return cydriver._cuFuncSetSharedSize(hfunc, numbytes) + * + * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetSize(hfunc, numbytes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuParamSetSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":809 + * + * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuParamSetSize(hfunc, numbytes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":808 + * return cydriver._cuFuncSetSharedSize(hfunc, numbytes) + * + * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetSize(hfunc, numbytes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":811 + * return cydriver._cuParamSetSize(hfunc, numbytes) + * + * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSeti(hfunc, offset, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuParamSeti(CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":812 + * + * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuParamSeti(hfunc, offset, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSeti(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":811 + * return cydriver._cuParamSetSize(hfunc, numbytes) + * + * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSeti(hfunc, offset, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":814 + * return cydriver._cuParamSeti(hfunc, offset, value) + * + * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetf(hfunc, offset, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuParamSetf(CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":815 + * + * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuParamSetf(hfunc, offset, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetf(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":814 + * return cydriver._cuParamSeti(hfunc, offset, value) + * + * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetf(hfunc, offset, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":817 + * return cydriver._cuParamSetf(hfunc, offset, value) + * + * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuParamSetv(CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":818 + * + * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetv(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":817 + * return cydriver._cuParamSetf(hfunc, offset, value) + * + * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":820 + * return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) + * + * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunch(f) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunch(CUfunction __pyx_v_f) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":821 + * + * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunch(f) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunch(__pyx_v_f); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":820 + * return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) + * + * cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunch(f) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":823 + * return cydriver._cuLaunch(f) + * + * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchGrid(f, grid_width, grid_height) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchGrid(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":824 + * + * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchGrid(f, grid_width, grid_height) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGrid(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":823 + * return cydriver._cuLaunch(f) + * + * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchGrid(f, grid_width, grid_height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":826 + * return cydriver._cuLaunchGrid(f, grid_width, grid_height) + * + * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLaunchGridAsync(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":827 + * + * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGridAsync(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":826 + * return cydriver._cuLaunchGrid(f, grid_width, grid_height) + * + * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":829 + * return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) + * + * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuParamSetTexRef(CUfunction __pyx_v_hfunc, int __pyx_v_texunit, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":830 + * + * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetTexRef(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":829 + * return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) + * + * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":832 + * return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) + * + * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetSharedMemConfig(hfunc, config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuFuncSetSharedMemConfig(CUfunction __pyx_v_hfunc, CUsharedconfig __pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":833 + * + * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuFuncSetSharedMemConfig(hfunc, config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedMemConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":832 + * return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) + * + * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuFuncSetSharedMemConfig(hfunc, config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":835 + * return cydriver._cuFuncSetSharedMemConfig(hfunc, config) + * + * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphCreate(phGraph, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphCreate(CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":836 + * + * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphCreate(phGraph, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphCreate(__pyx_v_phGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":835 + * return cydriver._cuFuncSetSharedMemConfig(hfunc, config) + * + * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphCreate(phGraph, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":838 + * return cydriver._cuGraphCreate(phGraph, flags) + * + * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddKernelNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":839 + * + * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddKernelNode_v2(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":838 + * return cydriver._cuGraphCreate(phGraph, flags) + * + * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":841 + * return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":842 + * + * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetParams_v2(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":841 + * return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":844 + * return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) + * + * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":845 + * + * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetParams_v2(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":844 + * return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) + * + * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":847 + * return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemcpyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":848 + * + * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemcpyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":847 + * return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":850 + * return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * + * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemcpyNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":851 + * + * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":850 + * return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + * + * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":853 + * return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemcpyNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":854 + * + * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":853 + * return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":856 + * return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemsetNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":857 + * + * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemsetNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":856 + * return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":859 + * return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * + * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemsetNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":860 + * + * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":859 + * return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + * + * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":862 + * return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemsetNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":863 + * + * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":862 + * return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":865 + * return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddHostNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":866 + * + * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddHostNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 866, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":865 + * return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":868 + * return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphHostNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":869 + * + * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":868 + * return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":871 + * return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphHostNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":872 + * + * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 872, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":871 + * return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":874 + * return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddChildGraphNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraph __pyx_v_childGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":875 + * + * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddChildGraphNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":874 + * return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":877 + * return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * + * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphChildGraphNodeGetGraph(CUgraphNode __pyx_v_hNode, CUgraph *__pyx_v_phGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":878 + * + * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphChildGraphNodeGetGraph(__pyx_v_hNode, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":877 + * return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + * + * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":880 + * return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) + * + * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEmptyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":881 + * + * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEmptyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":880 + * return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) + * + * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":883 + * return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) + * + * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEventRecordNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":884 + * + * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventRecordNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":883 + * return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) + * + * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":886 + * return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * + * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphEventRecordNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":887 + * + * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":886 + * return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * + * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":889 + * return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) + * + * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphEventRecordNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":890 + * + * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":889 + * return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) + * + * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":892 + * return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) + * + * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEventWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":893 + * + * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":892 + * return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) + * + * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":895 + * return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * + * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphEventWaitNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":896 + * + * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":895 + * return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) + * + * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":898 + * return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) + * + * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphEventWaitNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":899 + * + * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":898 + * return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) + * + * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":901 + * return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) + * + * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddExternalSemaphoresSignalNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":902 + * + * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresSignalNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":901 + * return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) + * + * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":904 + * return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":905 + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 905, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":904 + * return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":907 + * return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":908 + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":907 + * return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":910 + * return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddExternalSemaphoresWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":911 + * + * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 911, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":910 + * return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":913 + * return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":914 + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":913 + * return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":916 + * return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":917 + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":916 + * return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":919 + * return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddBatchMemOpNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":920 + * + * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddBatchMemOpNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":919 + * return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":922 + * return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphBatchMemOpNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":923 + * + * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 923, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":922 + * return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":925 + * return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) + * + * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphBatchMemOpNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":926 + * + * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":925 + * return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) + * + * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":928 + * return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecBatchMemOpNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":929 + * + * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecBatchMemOpNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":928 + * return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":931 + * return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemAllocNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":932 + * + * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemAllocNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":931 + * return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":934 + * return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemAllocNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":935 + * + * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemAllocNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 935, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":934 + * return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":937 + * return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemFreeNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUdeviceptr __pyx_v_dptr) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":938 + * + * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemFreeNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":937 + * return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) + * + * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":940 + * return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * + * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphMemFreeNodeGetParams(CUgraphNode __pyx_v_hNode, CUdeviceptr *__pyx_v_dptr_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":941 + * + * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemFreeNodeGetParams(__pyx_v_hNode, __pyx_v_dptr_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 941, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":940 + * return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) + * + * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":943 + * return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) + * + * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGraphMemTrim(device) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGraphMemTrim(CUdevice __pyx_v_device) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":944 + * + * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGraphMemTrim(device) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGraphMemTrim(__pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":943 + * return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) + * + * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGraphMemTrim(device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":946 + * return cydriver._cuDeviceGraphMemTrim(device) + * + * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":947 + * + * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":946 + * return cydriver._cuDeviceGraphMemTrim(device) + * + * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":949 + * return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceSetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":950 + * + * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":949 + * return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":952 + * return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphClone(phGraphClone, originalGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphClone(CUgraph *__pyx_v_phGraphClone, CUgraph __pyx_v_originalGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":953 + * + * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphClone(phGraphClone, originalGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphClone(__pyx_v_phGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 953, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":952 + * return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphClone(phGraphClone, originalGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":955 + * return cydriver._cuGraphClone(phGraphClone, originalGraph) + * + * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeFindInClone(CUgraphNode *__pyx_v_phNode, CUgraphNode __pyx_v_hOriginalNode, CUgraph __pyx_v_hClonedGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":956 + * + * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeFindInClone(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":955 + * return cydriver._cuGraphClone(phGraphClone, originalGraph) + * + * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":958 + * return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) + * + * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetType(hNode, typename) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetType(CUgraphNode __pyx_v_hNode, CUgraphNodeType *__pyx_v_typename) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":959 + * + * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetType(hNode, typename) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetType(__pyx_v_hNode, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":958 + * return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) + * + * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetType(hNode, typename) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":961 + * return cydriver._cuGraphNodeGetType(hNode, typename) + * + * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphGetNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":962 + * + * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetNodes(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":961 + * return cydriver._cuGraphNodeGetType(hNode, typename) + * + * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":964 + * return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) + * + * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphGetRootNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":965 + * + * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetRootNodes(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":964 + * return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) + * + * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":967 + * return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) + * + * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphGetEdges(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":968 + * + * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":967 + * return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) + * + * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":970 + * return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) + * + * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphGetEdges_v2(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":971 + * + * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":970 + * return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) + * + * cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphGetEdges_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":973 + * return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) + * + * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependencies(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":974 + * + * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":973 + * return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) + * + * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":976 + * return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) + * + * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependencies_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":977 + * + * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies_v2(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":976 + * return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) + * + * cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":979 + * return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) + * + * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependentNodes(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":980 + * + * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":979 + * return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) + * + * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":982 + * return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) + * + * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependentNodes_v2(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, CUgraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numDependentNodes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":983 + * + * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes_v2(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_edgeData, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":982 + * return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) + * + * cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetDependentNodes_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":985 + * return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) + * + * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":986 + * + * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":985 + * return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) + * + * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":988 + * return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) + * + * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":989 + * + * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":988 + * return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) + * + * cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":991 + * return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * + * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphRemoveDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":992 + * + * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 992, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":991 + * return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * + * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":994 + * return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) + * + * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphRemoveDependencies_v2(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, CUgraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":995 + * + * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies_v2(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":994 + * return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) + * + * cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphRemoveDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":997 + * return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * + * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDestroyNode(hNode) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphDestroyNode(CUgraphNode __pyx_v_hNode) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":998 + * + * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphDestroyNode(hNode) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroyNode(__pyx_v_hNode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":997 + * return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + * + * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDestroyNode(hNode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1000 + * return cydriver._cuGraphDestroyNode(hNode) + * + * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphInstantiate(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1001 + * + * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithFlags(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1001, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1000 + * return cydriver._cuGraphDestroyNode(hNode) + * + * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1003 + * return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) + * + * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphInstantiateWithParams(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS *__pyx_v_instantiateParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1004 + * + * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithParams(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_instantiateParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1004, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1003 + * return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) + * + * cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1006 + * return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) + * + * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecGetFlags(hGraphExec, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecGetFlags(CUgraphExec __pyx_v_hGraphExec, cuuint64_t *__pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1007 + * + * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecGetFlags(hGraphExec, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecGetFlags(__pyx_v_hGraphExec, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1007, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1006 + * return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) + * + * cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecGetFlags(hGraphExec, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1009 + * return cydriver._cuGraphExecGetFlags(hGraphExec, flags) + * + * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecKernelNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1010 + * + * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecKernelNodeSetParams_v2(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1010, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1009 + * return cydriver._cuGraphExecGetFlags(hGraphExec, flags) + * + * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1012 + * return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecMemcpyNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1013 + * + * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1012 + * return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1015 + * return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) + * + * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecMemsetNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1016 + * + * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1015 + * return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) + * + * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1018 + * return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) + * + * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecHostNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1019 + * + * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1018 + * return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) + * + * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1021 + * return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecChildGraphNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraph __pyx_v_childGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1022 + * + * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1021 + * return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1024 + * return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) + * + * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecEventRecordNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1025 + * + * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1024 + * return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) + * + * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1027 + * return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecEventWaitNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1028 + * + * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1027 + * return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1030 + * return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1031 + * + * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1030 + * return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1033 + * return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1034 + * + * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1033 + * return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1036 + * return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeSetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1037 + * + * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1036 + * return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1039 + * return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1040 + * + * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1039 + * return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1042 + * return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphUpload(hGraphExec, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphUpload(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1043 + * + * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphUpload(hGraphExec, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphUpload(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1042 + * return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphUpload(hGraphExec, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1045 + * return cydriver._cuGraphUpload(hGraphExec, hStream) + * + * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphLaunch(hGraphExec, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphLaunch(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1046 + * + * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphLaunch(hGraphExec, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphLaunch(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1045 + * return cydriver._cuGraphUpload(hGraphExec, hStream) + * + * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphLaunch(hGraphExec, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1048 + * return cydriver._cuGraphLaunch(hGraphExec, hStream) + * + * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecDestroy(hGraphExec) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecDestroy(CUgraphExec __pyx_v_hGraphExec) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1049 + * + * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecDestroy(hGraphExec) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecDestroy(__pyx_v_hGraphExec); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1048 + * return cydriver._cuGraphLaunch(hGraphExec, hStream) + * + * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecDestroy(hGraphExec) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1051 + * return cydriver._cuGraphExecDestroy(hGraphExec) + * + * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDestroy(hGraph) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphDestroy(CUgraph __pyx_v_hGraph) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1052 + * + * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphDestroy(hGraph) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroy(__pyx_v_hGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1051 + * return cydriver._cuGraphExecDestroy(hGraphExec) + * + * cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDestroy(hGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1054 + * return cydriver._cuGraphDestroy(hGraph) + * + * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecUpdate(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphExecUpdateResultInfo *__pyx_v_resultInfo) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1055 + * + * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecUpdate_v2(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1054 + * return cydriver._cuGraphDestroy(hGraph) + * + * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1057 + * return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) + * + * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeCopyAttributes(CUgraphNode __pyx_v_dst, CUgraphNode __pyx_v_src) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1058 + * + * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1057 + * return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) + * + * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1060 + * return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) + * + * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeGetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue *__pyx_v_value_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1061 + * + * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1060 + * return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) + * + * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1063 + * return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeSetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue const *__pyx_v_value) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1064 + * + * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1063 + * return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1066 + * return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphDebugDotPrint(CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1067 + * + * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDebugDotPrint(__pyx_v_hGraph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1066 + * return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1069 + * return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) + * + * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuUserObjectCreate(CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1070 + * + * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1069 + * return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) + * + * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1072 + * return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectRetain(object, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuUserObjectRetain(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1073 + * + * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuUserObjectRetain(object, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRetain(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1072 + * return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectRetain(object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1075 + * return cydriver._cuUserObjectRetain(object, count) + * + * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectRelease(object, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuUserObjectRelease(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1076 + * + * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuUserObjectRelease(object, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRelease(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1076, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1075 + * return cydriver._cuUserObjectRetain(object, count) + * + * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuUserObjectRelease(object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1078 + * return cydriver._cuUserObjectRelease(object, count) + * + * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRetainUserObject(graph, object, count, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphRetainUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1079 + * + * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphRetainUserObject(graph, object, count, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1078 + * return cydriver._cuUserObjectRelease(object, count) + * + * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphRetainUserObject(graph, object, count, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1081 + * return cydriver._cuGraphRetainUserObject(graph, object, count, flags) + * + * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphReleaseUserObject(graph, object, count) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphReleaseUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1082 + * + * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphReleaseUserObject(graph, object, count) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1082, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1081 + * return cydriver._cuGraphRetainUserObject(graph, object, count, flags) + * + * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphReleaseUserObject(graph, object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1084 + * return cydriver._cuGraphReleaseUserObject(graph, object, count) + * + * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1085 + * + * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1084 + * return cydriver._cuGraphReleaseUserObject(graph, object, count) + * + * cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1087 + * return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphAddNode_v2(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, CUgraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1088 + * + * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode_v2(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1087 + * return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + * + * cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphAddNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1090 + * return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * + * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeSetParams(hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeSetParams(CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1091 + * + * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1091, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1090 + * return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + * + * cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1093 + * return cydriver._cuGraphNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphExecNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraphNodeParams *__pyx_v_nodeParams) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1094 + * + * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1093 + * return cydriver._cuGraphNodeSetParams(hNode, nodeParams) + * + * cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1096 + * return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphConditionalHandleCreate(CUgraphConditionalHandle *__pyx_v_pHandle_out, CUgraph __pyx_v_hGraph, CUcontext __pyx_v_ctx, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1097 + * + * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_hGraph, __pyx_v_ctx, __pyx_v_defaultLaunchValue, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1096 + * return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphConditionalHandleCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1099 + * return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1100 + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1100, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1099 + * return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1102 + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1103 + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1102 + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1105 + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1106 + * + * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSize(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1105 + * return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1108 + * return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * + * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1109 + * + * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSizeWithFlags(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1108 + * return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + * + * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1111 + * return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * + * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1112 + * + * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1111 + * return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + * + * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1114 + * return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialClusterSize(int *__pyx_v_clusterSize, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1115 + * + * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialClusterSize(__pyx_v_clusterSize, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1114 + * return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1117 + * return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) + * + * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveClusters(int *__pyx_v_numClusters, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1118 + * + * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveClusters(__pyx_v_numClusters, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1117 + * return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) + * + * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1120 + * return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) + * + * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetArray(CUtexref __pyx_v_hTexRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1121 + * + * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetArray(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1121, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1120 + * return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) + * + * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1123 + * return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) + * + * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmappedArray(CUtexref __pyx_v_hTexRef, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1124 + * + * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmappedArray(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1123 + * return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) + * + * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1126 + * return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) + * + * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddress(size_t *__pyx_v_ByteOffset, CUtexref __pyx_v_hTexRef, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1127 + * + * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress_v2(__pyx_v_ByteOffset, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1126 + * return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) + * + * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1129 + * return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) + * + * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddress2D(CUtexref __pyx_v_hTexRef, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1130 + * + * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress2D_v3(__pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1129 + * return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) + * + * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetAddress2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1132 + * return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) + * + * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFormat(CUtexref __pyx_v_hTexRef, CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1133 + * + * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFormat(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1133, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1132 + * return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) + * + * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1135 + * return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) + * + * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddressMode(CUtexref __pyx_v_hTexRef, int __pyx_v_dim, CUaddress_mode __pyx_v_am) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1136 + * + * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddressMode(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1135 + * return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) + * + * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1138 + * return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) + * + * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFilterMode(hTexRef, fm) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1139 + * + * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetFilterMode(hTexRef, fm) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1138 + * return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) + * + * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFilterMode(hTexRef, fm) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1141 + * return cydriver._cuTexRefSetFilterMode(hTexRef, fm) + * + * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1142 + * + * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1141 + * return cydriver._cuTexRefSetFilterMode(hTexRef, fm) + * + * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1144 + * return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) + * + * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapLevelBias(CUtexref __pyx_v_hTexRef, float __pyx_v_bias) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1145 + * + * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelBias(__pyx_v_hTexRef, __pyx_v_bias); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1144 + * return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) + * + * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1147 + * return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) + * + * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapLevelClamp(CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1148 + * + * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelClamp(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1147 + * return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) + * + * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1150 + * return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * + * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMaxAnisotropy(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1151 + * + * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMaxAnisotropy(__pyx_v_hTexRef, __pyx_v_maxAniso); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1151, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1150 + * return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + * + * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1153 + * return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) + * + * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetBorderColor(CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1154 + * + * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetBorderColor(__pyx_v_hTexRef, __pyx_v_pBorderColor); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1153 + * return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) + * + * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1156 + * return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) + * + * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFlags(hTexRef, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFlags(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1157 + * + * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefSetFlags(hTexRef, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFlags(__pyx_v_hTexRef, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1156 + * return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) + * + * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefSetFlags(hTexRef, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1159 + * return cydriver._cuTexRefSetFlags(hTexRef, Flags) + * + * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetAddress(CUdeviceptr *__pyx_v_pdptr, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1160 + * + * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddress_v2(__pyx_v_pdptr, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1159 + * return cydriver._cuTexRefSetFlags(hTexRef, Flags) + * + * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1162 + * return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) + * + * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetArray(phArray, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetArray(CUarray *__pyx_v_phArray, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1163 + * + * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetArray(phArray, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetArray(__pyx_v_phArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1162 + * return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) + * + * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetArray(phArray, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1165 + * return cydriver._cuTexRefGetArray(phArray, hTexRef) + * + * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmappedArray(CUmipmappedArray *__pyx_v_phMipmappedArray, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1166 + * + * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmappedArray(__pyx_v_phMipmappedArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1165 + * return cydriver._cuTexRefGetArray(phArray, hTexRef) + * + * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1168 + * return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) + * + * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetAddressMode(CUaddress_mode *__pyx_v_pam, CUtexref __pyx_v_hTexRef, int __pyx_v_dim) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1169 + * + * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddressMode(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1168 + * return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) + * + * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1171 + * return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) + * + * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1172 + * + * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1171 + * return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) + * + * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1174 + * return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) + * + * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFormat(CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1175 + * + * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFormat(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1174 + * return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) + * + * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1177 + * return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1178 + * + * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1177 + * return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1180 + * return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1181 + * + * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelBias(__pyx_v_pbias, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1180 + * return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1183 + * return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1184 + * + * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelClamp(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1183 + * return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) + * + * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1186 + * return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * + * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1187 + * + * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMaxAnisotropy(__pyx_v_pmaxAniso, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1186 + * return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + * + * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1189 + * return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) + * + * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1190 + * + * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetBorderColor(__pyx_v_pBorderColor, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1189 + * return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) + * + * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1192 + * return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) + * + * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFlags(pFlags, hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1193 + * + * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefGetFlags(pFlags, hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFlags(__pyx_v_pFlags, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1192 + * return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) + * + * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefGetFlags(pFlags, hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1195 + * return cydriver._cuTexRefGetFlags(pFlags, hTexRef) + * + * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefCreate(pTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefCreate(CUtexref *__pyx_v_pTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1196 + * + * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefCreate(pTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefCreate(__pyx_v_pTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1195 + * return cydriver._cuTexRefGetFlags(pFlags, hTexRef) + * + * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefCreate(pTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1198 + * return cydriver._cuTexRefCreate(pTexRef) + * + * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefDestroy(hTexRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexRefDestroy(CUtexref __pyx_v_hTexRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1199 + * + * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexRefDestroy(hTexRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefDestroy(__pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1198 + * return cydriver._cuTexRefCreate(pTexRef) + * + * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexRefDestroy(hTexRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1201 + * return cydriver._cuTexRefDestroy(hTexRef) + * + * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSurfRefSetArray(CUsurfref __pyx_v_hSurfRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1202 + * + * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefSetArray(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1201 + * return cydriver._cuTexRefDestroy(hTexRef) + * + * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1204 + * return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) + * + * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfRefGetArray(phArray, hSurfRef) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSurfRefGetArray(CUarray *__pyx_v_phArray, CUsurfref __pyx_v_hSurfRef) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1205 + * + * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSurfRefGetArray(phArray, hSurfRef) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefGetArray(__pyx_v_phArray, __pyx_v_hSurfRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1204 + * return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) + * + * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfRefGetArray(phArray, hSurfRef) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1207 + * return cydriver._cuSurfRefGetArray(phArray, hSurfRef) + * + * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexObjectCreate(CUtexObject *__pyx_v_pTexObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1208 + * + * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectCreate(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1207 + * return cydriver._cuSurfRefGetArray(phArray, hSurfRef) + * + * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1210 + * return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectDestroy(texObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexObjectDestroy(CUtexObject __pyx_v_texObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1211 + * + * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexObjectDestroy(texObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectDestroy(__pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1211, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1210 + * return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectDestroy(texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1213 + * return cydriver._cuTexObjectDestroy(texObject) + * + * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1214 + * + * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1213 + * return cydriver._cuTexObjectDestroy(texObject) + * + * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1216 + * return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) + * + * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1217 + * + * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1216 + * return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) + * + * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1219 + * return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) + * + * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, CUtexObject __pyx_v_texObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1220 + * + * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1219 + * return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) + * + * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1222 + * return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) + * + * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectCreate(CUsurfObject *__pyx_v_pSurfObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1223 + * + * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectCreate(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1222 + * return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) + * + * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1225 + * return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) + * + * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectDestroy(surfObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectDestroy(CUsurfObject __pyx_v_surfObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1226 + * + * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSurfObjectDestroy(surfObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectDestroy(__pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1225 + * return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) + * + * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectDestroy(surfObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1228 + * return cydriver._cuSurfObjectDestroy(surfObject) + * + * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUsurfObject __pyx_v_surfObject) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1229 + * + * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1229, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1228 + * return cydriver._cuSurfObjectDestroy(surfObject) + * + * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1231 + * return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) + * + * cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeTiled(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, cuuint32_t const *__pyx_v_boxDim, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1232 + * + * cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeTiled(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_boxDim, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1231 + * return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) + * + * cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTensorMapEncodeTiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1234 + * return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeIm2col(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int const *__pyx_v_pixelBoxLowerCorner, int const *__pyx_v_pixelBoxUpperCorner, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1235 + * + * cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2col(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCorner, __pyx_v_pixelBoxUpperCorner, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1234 + * return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTensorMapEncodeIm2col", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1237 + * return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeIm2colWide(CUtensorMap *__pyx_v_tensorMap, CUtensorMapDataType __pyx_v_tensorDataType, cuuint32_t __pyx_v_tensorRank, void *__pyx_v_globalAddress, cuuint64_t const *__pyx_v_globalDim, cuuint64_t const *__pyx_v_globalStrides, int __pyx_v_pixelBoxLowerCornerWidth, int __pyx_v_pixelBoxUpperCornerWidth, cuuint32_t __pyx_v_channelsPerPixel, cuuint32_t __pyx_v_pixelsPerColumn, cuuint32_t const *__pyx_v_elementStrides, CUtensorMapInterleave __pyx_v_interleave, CUtensorMapIm2ColWideMode __pyx_v_mode, CUtensorMapSwizzle __pyx_v_swizzle, CUtensorMapL2promotion __pyx_v_l2Promotion, CUtensorMapFloatOOBfill __pyx_v_oobFill) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1238 + * + * cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) # <<<<<<<<<<<<<< + * + * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2colWide(__pyx_v_tensorMap, __pyx_v_tensorDataType, __pyx_v_tensorRank, __pyx_v_globalAddress, __pyx_v_globalDim, __pyx_v_globalStrides, __pyx_v_pixelBoxLowerCornerWidth, __pyx_v_pixelBoxUpperCornerWidth, __pyx_v_channelsPerPixel, __pyx_v_pixelsPerColumn, __pyx_v_elementStrides, __pyx_v_interleave, __pyx_v_mode, __pyx_v_swizzle, __pyx_v_l2Promotion, __pyx_v_oobFill); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1237 + * return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTensorMapEncodeIm2colWide", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1240 + * return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuTensorMapReplaceAddress(CUtensorMap *__pyx_v_tensorMap, void *__pyx_v_globalAddress) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1241 + * + * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapReplaceAddress(__pyx_v_tensorMap, __pyx_v_globalAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1240 + * return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + * + * cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuTensorMapReplaceAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1243 + * return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) + * + * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, CUdevice __pyx_v_dev, CUdevice __pyx_v_peerDev) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1244 + * + * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1243 + * return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) + * + * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1246 + * return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) + * + * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxEnablePeerAccess(CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1247 + * + * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxEnablePeerAccess(__pyx_v_peerContext, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1246 + * return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) + * + * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1249 + * return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) + * + * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDisablePeerAccess(peerContext) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxDisablePeerAccess(CUcontext __pyx_v_peerContext) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1250 + * + * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxDisablePeerAccess(peerContext) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDisablePeerAccess(__pyx_v_peerContext); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1249 + * return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) + * + * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxDisablePeerAccess(peerContext) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1252 + * return cydriver._cuCtxDisablePeerAccess(peerContext) + * + * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetP2PAttribute(int *__pyx_v_value, CUdevice_P2PAttribute __pyx_v_attrib, CUdevice __pyx_v_srcDevice, CUdevice __pyx_v_dstDevice) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1253 + * + * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetP2PAttribute(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1252 + * return cydriver._cuCtxDisablePeerAccess(peerContext) + * + * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1255 + * return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) + * + * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsUnregisterResource(resource) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsUnregisterResource(CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1256 + * + * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsUnregisterResource(resource) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnregisterResource(__pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1255 + * return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) + * + * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsUnregisterResource(resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1258 + * return cydriver._cuGraphicsUnregisterResource(resource) + * + * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsSubResourceGetMappedArray(CUarray *__pyx_v_pArray, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1259 + * + * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsSubResourceGetMappedArray(__pyx_v_pArray, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1258 + * return cydriver._cuGraphicsUnregisterResource(resource) + * + * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1261 + * return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) + * + * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_pMipmappedArray, CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1262 + * + * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedMipmappedArray(__pyx_v_pMipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1261 + * return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) + * + * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1264 + * return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) + * + * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedPointer(CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, CUgraphicsResource __pyx_v_resource) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1265 + * + * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedPointer_v2(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1264 + * return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) + * + * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1267 + * return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) + * + * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceSetMapFlags(CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1268 + * + * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceSetMapFlags_v2(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1267 + * return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) + * + * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1270 + * return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) + * + * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsMapResources(count, resources, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsMapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1271 + * + * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsMapResources(count, resources, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1270 + * return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) + * + * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsMapResources(count, resources, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1273 + * return cydriver._cuGraphicsMapResources(count, resources, hStream) + * + * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsUnmapResources(count, resources, hStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsUnmapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1274 + * + * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsUnmapResources(count, resources, hStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1273 + * return cydriver._cuGraphicsMapResources(count, resources, hStream) + * + * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsUnmapResources(count, resources, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1276 + * return cydriver._cuGraphicsUnmapResources(count, resources, hStream) + * + * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGetProcAddress(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, cuuint64_t __pyx_v_flags, CUdriverProcAddressQueryResult *__pyx_v_symbolStatus) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1277 + * + * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetProcAddress_v2(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags, __pyx_v_symbolStatus); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1277, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1276 + * return cydriver._cuGraphicsUnmapResources(count, resources, hStream) + * + * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGetProcAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1279 + * return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) + * + * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpGetAttribute(attrib, value, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCoredumpGetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1280 + * + * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCoredumpGetAttribute(attrib, value, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttribute(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1279 + * return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) + * + * cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpGetAttribute(attrib, value, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCoredumpGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1282 + * return cydriver._cuCoredumpGetAttribute(attrib, value, size) + * + * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCoredumpGetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1283 + * + * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttributeGlobal(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1282 + * return cydriver._cuCoredumpGetAttribute(attrib, value, size) + * + * cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCoredumpGetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1285 + * return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) + * + * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpSetAttribute(attrib, value, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCoredumpSetAttribute(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1286 + * + * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCoredumpSetAttribute(attrib, value, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttribute(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1285 + * return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) + * + * cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpSetAttribute(attrib, value, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCoredumpSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1288 + * return cydriver._cuCoredumpSetAttribute(attrib, value, size) + * + * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCoredumpSetAttributeGlobal(CUcoredumpSettings __pyx_v_attrib, void *__pyx_v_value, size_t *__pyx_v_size) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1289 + * + * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttributeGlobal(__pyx_v_attrib, __pyx_v_value, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1288 + * return cydriver._cuCoredumpSetAttribute(attrib, value, size) + * + * cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCoredumpSetAttributeGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1291 + * return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) + * + * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetExportTable(ppExportTable, pExportTableId) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGetExportTable(void const **__pyx_v_ppExportTable, CUuuid const *__pyx_v_pExportTableId) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1292 + * + * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGetExportTable(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1291 + * return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) + * + * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGetExportTable(ppExportTable, pExportTableId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1294 + * return cydriver._cuGetExportTable(ppExportTable, pExportTableId) + * + * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxCreate(CUgreenCtx *__pyx_v_phCtx, CUdevResourceDesc __pyx_v_desc, CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1295 + * + * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxCreate(__pyx_v_phCtx, __pyx_v_desc, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1294 + * return cydriver._cuGetExportTable(ppExportTable, pExportTableId) + * + * cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1297 + * return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) + * + * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxDestroy(hCtx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxDestroy(CUgreenCtx __pyx_v_hCtx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1298 + * + * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxDestroy(hCtx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxDestroy(__pyx_v_hCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1297 + * return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) + * + * cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxDestroy(hCtx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1300 + * return cydriver._cuGreenCtxDestroy(hCtx) + * + * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxFromGreenCtx(pContext, hCtx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxFromGreenCtx(CUcontext *__pyx_v_pContext, CUgreenCtx __pyx_v_hCtx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1301 + * + * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxFromGreenCtx(pContext, hCtx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxFromGreenCtx(__pyx_v_pContext, __pyx_v_hCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1300 + * return cydriver._cuGreenCtxDestroy(hCtx) + * + * cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxFromGreenCtx(pContext, hCtx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxFromGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1303 + * return cydriver._cuCtxFromGreenCtx(pContext, hCtx) + * + * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetDevResource(device, resource, typename) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetDevResource(CUdevice __pyx_v_device, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1304 + * + * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDeviceGetDevResource(device, resource, typename) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDevResource(__pyx_v_device, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1303 + * return cydriver._cuCtxFromGreenCtx(pContext, hCtx) + * + * cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDeviceGetDevResource(device, resource, typename) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDeviceGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1306 + * return cydriver._cuDeviceGetDevResource(device, resource, typename) + * + * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetDevResource(hCtx, resource, typename) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCtxGetDevResource(CUcontext __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1307 + * + * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCtxGetDevResource(hCtx, resource, typename) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevResource(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1306 + * return cydriver._cuDeviceGetDevResource(device, resource, typename) + * + * cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCtxGetDevResource(hCtx, resource, typename) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1309 + * return cydriver._cuCtxGetDevResource(hCtx, resource, typename) + * + * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxGetDevResource(CUgreenCtx __pyx_v_hCtx, CUdevResource *__pyx_v_resource, CUdevResourceType __pyx_v_typename) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1310 + * + * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxGetDevResource(__pyx_v_hCtx, __pyx_v_resource, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1309 + * return cydriver._cuCtxGetDevResource(hCtx, resource, typename) + * + * cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxGetDevResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1312 + * return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) + * + * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevSmResourceSplitByCount(CUdevResource *__pyx_v_result, unsigned int *__pyx_v_nbGroups, CUdevResource const *__pyx_v_input, CUdevResource *__pyx_v_remaining, unsigned int __pyx_v_useFlags, unsigned int __pyx_v_minCount) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1313 + * + * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) # <<<<<<<<<<<<<< + * + * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevSmResourceSplitByCount(__pyx_v_result, __pyx_v_nbGroups, __pyx_v_input, __pyx_v_remaining, __pyx_v_useFlags, __pyx_v_minCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1312 + * return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) + * + * cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevSmResourceSplitByCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1315 + * return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) + * + * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuDevResourceGenerateDesc(CUdevResourceDesc *__pyx_v_phDesc, CUdevResource *__pyx_v_resources, unsigned int __pyx_v_nbResources) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1316 + * + * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevResourceGenerateDesc(__pyx_v_phDesc, __pyx_v_resources, __pyx_v_nbResources); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1315 + * return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) + * + * cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuDevResourceGenerateDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1318 + * return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) + * + * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxRecordEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1319 + * + * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxRecordEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1318 + * return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) + * + * cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxRecordEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1321 + * return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) + * + * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxWaitEvent(CUgreenCtx __pyx_v_hCtx, CUevent __pyx_v_hEvent) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1322 + * + * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) # <<<<<<<<<<<<<< + * + * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxWaitEvent(__pyx_v_hCtx, __pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1321 + * return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) + * + * cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1324 + * return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) + * + * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetGreenCtx(hStream, phCtx) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuStreamGetGreenCtx(CUstream __pyx_v_hStream, CUgreenCtx *__pyx_v_phCtx) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1325 + * + * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuStreamGetGreenCtx(hStream, phCtx) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetGreenCtx(__pyx_v_hStream, __pyx_v_phCtx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1324 + * return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) + * + * cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuStreamGetGreenCtx(hStream, phCtx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuStreamGetGreenCtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1327 + * return cydriver._cuStreamGetGreenCtx(hStream, phCtx) + * + * cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxStreamCreate(CUstream *__pyx_v_phStream, CUgreenCtx __pyx_v_greenCtx, unsigned int __pyx_v_flags, int __pyx_v_priority) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1328 + * + * cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxStreamCreate(__pyx_v_phStream, __pyx_v_greenCtx, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1327 + * return cydriver._cuStreamGetGreenCtx(hStream, phCtx) + * + * cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGreenCtxStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1330 + * return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) + * + * cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLogsRegisterCallback(CUlogsCallback __pyx_v_callbackFunc, void *__pyx_v_userData, CUlogsCallbackHandle *__pyx_v_callback_out) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1331 + * + * cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsRegisterCallback(__pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1330 + * return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) + * + * cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLogsRegisterCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1333 + * return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) + * + * cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsUnregisterCallback(callback) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLogsUnregisterCallback(CUlogsCallbackHandle __pyx_v_callback) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1334 + * + * cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLogsUnregisterCallback(callback) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsUnregisterCallback(__pyx_v_callback); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1333 + * return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) + * + * cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsUnregisterCallback(callback) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLogsUnregisterCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1336 + * return cydriver._cuLogsUnregisterCallback(callback) + * + * cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsCurrent(iterator_out, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLogsCurrent(CUlogIterator *__pyx_v_iterator_out, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1337 + * + * cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLogsCurrent(iterator_out, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsCurrent(__pyx_v_iterator_out, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1336 + * return cydriver._cuLogsUnregisterCallback(callback) + * + * cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsCurrent(iterator_out, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLogsCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1339 + * return cydriver._cuLogsCurrent(iterator_out, flags) + * + * cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLogsDumpToFile(CUlogIterator *__pyx_v_iterator, char const *__pyx_v_pathToFile, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1340 + * + * cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToFile(__pyx_v_iterator, __pyx_v_pathToFile, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1339 + * return cydriver._cuLogsCurrent(iterator_out, flags) + * + * cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLogsDumpToFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1342 + * return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) + * + * cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuLogsDumpToMemory(CUlogIterator *__pyx_v_iterator, char *__pyx_v_buffer, size_t *__pyx_v_size, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1343 + * + * cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToMemory(__pyx_v_iterator, __pyx_v_buffer, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1342 + * return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) + * + * cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuLogsDumpToMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1345 + * return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) + * + * cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessGetRestoreThreadId(int __pyx_v_pid, int *__pyx_v_tid) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1346 + * + * cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetRestoreThreadId(__pyx_v_pid, __pyx_v_tid); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1345 + * return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) + * + * cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessGetRestoreThreadId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1348 + * return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) + * + * cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessGetState(pid, state) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessGetState(int __pyx_v_pid, CUprocessState *__pyx_v_state) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1349 + * + * cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessGetState(pid, state) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetState(__pyx_v_pid, __pyx_v_state); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1348 + * return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) + * + * cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessGetState(pid, state) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessGetState", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1351 + * return cydriver._cuCheckpointProcessGetState(pid, state) + * + * cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessLock(pid, args) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessLock(int __pyx_v_pid, CUcheckpointLockArgs *__pyx_v_args) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1352 + * + * cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessLock(pid, args) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessLock(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1351 + * return cydriver._cuCheckpointProcessGetState(pid, state) + * + * cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessLock(pid, args) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessLock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1354 + * return cydriver._cuCheckpointProcessLock(pid, args) + * + * cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessCheckpoint(pid, args) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessCheckpoint(int __pyx_v_pid, CUcheckpointCheckpointArgs *__pyx_v_args) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1355 + * + * cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessCheckpoint(pid, args) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessCheckpoint(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1354 + * return cydriver._cuCheckpointProcessLock(pid, args) + * + * cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessCheckpoint(pid, args) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessCheckpoint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1357 + * return cydriver._cuCheckpointProcessCheckpoint(pid, args) + * + * cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessRestore(pid, args) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessRestore(int __pyx_v_pid, CUcheckpointRestoreArgs *__pyx_v_args) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1358 + * + * cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessRestore(pid, args) # <<<<<<<<<<<<<< + * + * cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessRestore(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1357 + * return cydriver._cuCheckpointProcessCheckpoint(pid, args) + * + * cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessRestore(pid, args) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessRestore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1360 + * return cydriver._cuCheckpointProcessRestore(pid, args) + * + * cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessUnlock(pid, args) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessUnlock(int __pyx_v_pid, CUcheckpointUnlockArgs *__pyx_v_args) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1361 + * + * cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuCheckpointProcessUnlock(pid, args) # <<<<<<<<<<<<<< + * + * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessUnlock(__pyx_v_pid, __pyx_v_args); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1360 + * return cydriver._cuCheckpointProcessRestore(pid, args) + * + * cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuCheckpointProcessUnlock(pid, args) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuCheckpointProcessUnlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1363 + * return cydriver._cuCheckpointProcessUnlock(pid, args) + * + * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuProfilerStart() + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuProfilerStart(void) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1364 + * + * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuProfilerStart() # <<<<<<<<<<<<<< + * + * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStart(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1363 + * return cydriver._cuCheckpointProcessUnlock(pid, args) + * + * cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuProfilerStart() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1366 + * return cydriver._cuProfilerStart() + * + * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuProfilerStop() + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuProfilerStop(void) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1367 + * + * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuProfilerStop() # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStop(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1366 + * return cydriver._cuProfilerStart() + * + * cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuProfilerStop() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1369 + * return cydriver._cuProfilerStop() + * + * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsEGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1370 + * + * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1369 + * return cydriver._cuProfilerStop() + * + * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1372 + * return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * + * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerConnect(conn, stream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerConnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1373 + * + * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamConsumerConnect(conn, stream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect(__pyx_v_conn, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1372 + * return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + * + * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerConnect(conn, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1375 + * return cydriver._cuEGLStreamConsumerConnect(conn, stream) + * + * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1376 + * + * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags(__pyx_v_conn, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1375 + * return cydriver._cuEGLStreamConsumerConnect(conn, stream) + * + * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1378 + * return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) + * + * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerDisconnect(conn) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1379 + * + * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamConsumerDisconnect(conn) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1378 + * return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) + * + * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerDisconnect(conn) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1381 + * return cydriver._cuEGLStreamConsumerDisconnect(conn) + * + * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource *__pyx_v_pCudaResource, CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1382 + * + * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1381 + * return cydriver._cuEGLStreamConsumerDisconnect(conn) + * + * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1384 + * return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * + * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource __pyx_v_pCudaResource, CUstream *__pyx_v_pStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1385 + * + * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1384 + * return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * + * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1387 + * return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * + * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerConnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR __pyx_v_stream, __pyx_t_4cuda_8bindings_8cydriver_EGLint __pyx_v_width, __pyx_t_4cuda_8bindings_8cydriver_EGLint __pyx_v_height) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1388 + * + * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect(__pyx_v_conn, __pyx_v_stream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1388, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1387 + * return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * + * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1390 + * return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) + * + * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerDisconnect(conn) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerDisconnect(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1391 + * + * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamProducerDisconnect(conn) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1390 + * return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) + * + * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerDisconnect(conn) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1393 + * return cydriver._cuEGLStreamProducerDisconnect(conn) + * + * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame __pyx_v_eglframe, CUstream *__pyx_v_pStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1394 + * + * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1393 + * return cydriver._cuEGLStreamProducerDisconnect(conn) + * + * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1396 + * return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * + * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *__pyx_v_eglframe, CUstream *__pyx_v_pStream) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1397 + * + * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1397, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1396 + * return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * + * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1399 + * return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * + * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *__pyx_v_eglFrame, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1400 + * + * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) # <<<<<<<<<<<<<< + * + * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1399 + * return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * + * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1402 + * return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * + * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuEventCreateFromEGLSync(CUevent *__pyx_v_phEvent, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1403 + * + * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1402 + * return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * + * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1405 + * return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * + * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsGLRegisterBuffer(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1406 + * + * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer(__pyx_v_pCudaResource, __pyx_v_buffer, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1405 + * return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + * + * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1408 + * return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) + * + * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_GLuint __pyx_v_image, __pyx_t_4cuda_8bindings_8cydriver_GLenum __pyx_v_target, unsigned int __pyx_v_Flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1409 + * + * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_target, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1408 + * return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) + * + * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1411 + * return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) + * + * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGLGetDevices(unsigned int *__pyx_v_pCudaDeviceCount, CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList __pyx_v_deviceList) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1412 + * + * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) # <<<<<<<<<<<<<< + * + * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1411 + * return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) + * + * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1414 + * return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * + * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuVDPAUGetDevice(CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1415 + * + * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * + * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice(__pyx_v_pDevice, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1414 + * return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * + * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1417 + * return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) + * + * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuVDPAUCtxCreate(CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, CUdevice __pyx_v_device, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1418 + * + * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUCtxCreate_v2(__pyx_v_pCtx, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1417 + * return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) + * + * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuVDPAUCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1420 + * return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * + * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) + * +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1421 + * + * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) # <<<<<<<<<<<<<< + * + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1420 + * return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + * + * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cydriver.pyx":1423 + * return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) + * + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags) +*/ + +static CUresult __pyx_f_4cuda_8bindings_8cydriver_cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + CUresult __pyx_r; + CUresult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cydriver.pyx":1424 + * + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + * return cydriver._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cydriver.pyx":1423 + * return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) + * + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: # <<<<<<<<<<<<<< + * return cydriver._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cydriver.cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = CUDA_ERROR_NOT_FOUND; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("cuGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGetErrorName", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuInit", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGet", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceTotalMem", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceTotalMem, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevicePrimaryCtxRelease", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxRelease, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevicePrimaryCtxSetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxSetFlags, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevicePrimaryCtxReset", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevicePrimaryCtxReset, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxCreate_v4", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxCreate_v4, "CUresult (CUcontext *, CUctxCreateParams *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxDestroy, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxPushCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxPushCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxPopCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxPopCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetId", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxRecordEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxRecordEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxWaitEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxAttach", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxDetach", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleLoad", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleUnload", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetLoadingMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetFunctionCount", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetFunctionCount, "CUresult (unsigned int *, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleEnumerateFunctions", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleEnumerateFunctions, "CUresult (CUfunction *, unsigned int, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLinkCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLinkCreate, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLinkAddData", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLinkAddData, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLinkAddFile", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLinkAddFile, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLinkComplete", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLinkDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryUnload", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetKernelCount, "CUresult (unsigned int *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryEnumerateKernels, "CUresult (CUkernel *, unsigned int, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetModule", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelGetFunction", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelGetLibrary", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelGetLibrary, "CUresult (CUlibrary *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelGetName", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelGetName, "CUresult (char const **, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuKernelGetParamInfo", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuKernelGetParamInfo, "CUresult (CUkernel, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetInfo, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAlloc, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAllocPitch", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAllocPitch, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemFree", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemFree, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetAddressRange", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetAddressRange, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAllocHost", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAllocHost, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemFreeHost", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemHostGetDevicePointer, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemHostGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAllocManaged", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceRegisterAsyncNotification, "CUresult (CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceUnregisterAsyncNotification, "CUresult (CUdevice, CUasyncCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuIpcOpenMemHandle, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemHostRegister", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemHostRegister, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemHostUnregister", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyHtoD", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoD, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyDtoH", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoH, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyDtoD", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoD, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyDtoA", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoA, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyAtoD", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoD, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyHtoA", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoA, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyAtoH", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoH, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyAtoA", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoA, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy2D", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2D, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy2DUnaligned", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2DUnaligned, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy3D", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3D, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyHtoDAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoDAsync, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyDtoHAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoHAsync, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyDtoDAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyDtoDAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyHtoAAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyHtoAAsync, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyAtoHAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyAtoHAsync, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy2DAsync, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DAsync, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpyBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpyBatchAsync, "CUresult (CUdeviceptr *, CUdeviceptr *, size_t *, size_t, CUmemcpyAttributes *, size_t *, size_t, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemcpy3DBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemcpy3DBatchAsync, "CUresult (size_t, CUDA_MEMCPY3D_BATCH_OP *, size_t *, unsigned PY_LONG_LONG, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD8", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD8, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD16", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD16, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD32", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD32, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D8", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D8, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D16", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D16, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D32", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D32, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD8Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayCreate, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayGetDescriptor", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayGetDescriptor, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArray3DCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArray3DCreate, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuArray3DGetDescriptor", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuArray3DGetDescriptor, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMipmappedArrayGetLevel", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetHandleForAddressRange", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemBatchDecompressAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemBatchDecompressAsync, "CUresult (CUmemDecompressParams *, size_t, unsigned int, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAddressFree", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemRelease", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemMap", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemMapArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemUnmap", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastAddDevice", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastBindMem", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastBindAddr", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastUnbind", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMulticastGetGranularity", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAdvise", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetPriority", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetDevice, "CUresult (CUstream, CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetId", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetCtx_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCtx_v2, "CUresult (CUstream, CUcontext *, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamBeginCapture, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamBeginCaptureToGraph, "CUresult (CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetCaptureInfo", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCaptureInfo, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetCaptureInfo_v3, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamUpdateCaptureDependencies_v2, "CUresult (CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamQuery", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamDestroy, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventRecord", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventQuery", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventDestroy, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventElapsedTime_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventElapsedTime_v2, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamWaitValue32", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamWaitValue64", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamWaitValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamWriteValue32", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamWriteValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamWriteValue64", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamWriteValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamBatchMemOp", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamBatchMemOp, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncGetName", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncGetName, "CUresult (char const **, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncGetParamInfo", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncGetParamInfo, "CUresult (CUfunction, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncIsLoaded", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncIsLoaded, "CUresult (CUfunctionLoadingState *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncLoad", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncLoad, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchKernelEx", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncSetSharedSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuParamSetSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuParamSeti", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuParamSetf", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuParamSetv", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddKernelNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeGetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeSetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddBatchMemOpNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphClone", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphGetEdges_v2, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependencies_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetDependentNodes_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphRemoveDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphInstantiate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphInstantiate, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecKernelNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphUpload", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecUpdate, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuUserObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuUserObjectRetain", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddNode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphAddNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphConditionalHandleCreate, "CUresult (CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSizeWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxPotentialClusterSize", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuOccupancyMaxActiveClusters", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetAddress", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddress, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetAddress2D", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddress2D, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetAddress", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetAddress, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexObjectDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSurfObjectDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTensorMapEncodeTiled", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTensorMapEncodeIm2col", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTensorMapEncodeIm2colWide", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTensorMapEncodeIm2colWide, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int, int, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapIm2ColWideMode, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuTensorMapReplaceAddress", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedPointer, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceSetMapFlags, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGetProcAddress", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCoredumpGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCoredumpGetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCoredumpSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCoredumpSetAttributeGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGetExportTable", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxCreate, "CUresult (CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxDestroy, "CUresult (CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxFromGreenCtx", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxFromGreenCtx, "CUresult (CUcontext *, CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDeviceGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDeviceGetDevResource, "CUresult (CUdevice, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCtxGetDevResource, "CUresult (CUcontext, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxGetDevResource", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxGetDevResource, "CUresult (CUgreenCtx, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevSmResourceSplitByCount", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevSmResourceSplitByCount, "CUresult (CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuDevResourceGenerateDesc", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuDevResourceGenerateDesc, "CUresult (CUdevResourceDesc *, CUdevResource *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxRecordEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxRecordEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxWaitEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuStreamGetGreenCtx", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuStreamGetGreenCtx, "CUresult (CUstream, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGreenCtxStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGreenCtxStreamCreate, "CUresult (CUstream *, CUgreenCtx, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLogsRegisterCallback", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLogsRegisterCallback, "CUresult (CUlogsCallback, void *, CUlogsCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLogsUnregisterCallback", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLogsUnregisterCallback, "CUresult (CUlogsCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLogsCurrent", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLogsCurrent, "CUresult (CUlogIterator *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLogsDumpToFile", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLogsDumpToFile, "CUresult (CUlogIterator *, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuLogsDumpToMemory", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuLogsDumpToMemory, "CUresult (CUlogIterator *, char *, size_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessGetRestoreThreadId", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessGetRestoreThreadId, "CUresult (int, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessGetState", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessGetState, "CUresult (int, CUprocessState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessLock", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessLock, "CUresult (int, CUcheckpointLockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessCheckpoint", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessCheckpoint, "CUresult (int, CUcheckpointCheckpointArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessRestore", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessRestore, "CUresult (int, CUcheckpointRestoreArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuCheckpointProcessUnlock", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuCheckpointProcessUnlock, "CUresult (int, CUcheckpointUnlockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuProfilerStart", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuProfilerStop", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGLGetDevices", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGLGetDevices, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuVDPAUCtxCreate", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuVDPAUCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_8bindings_8cydriver_cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._bindings.cydriver"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGetErrorName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuInit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDriverGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGet", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetUuid", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetUuid_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetLuid", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceTotalMem_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceTotalMem_v2, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetTexture1DLinearMaxWidth", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetNvSciSyncAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceSetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetDefaultMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetExecAffinitySupport", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFlushGPUDirectRDMAWrites", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceComputeCapability", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevicePrimaryCtxRetain", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevicePrimaryCtxRelease_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxRelease_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevicePrimaryCtxSetFlags_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxSetFlags_v2, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevicePrimaryCtxGetState", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevicePrimaryCtxReset_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevicePrimaryCtxReset_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxCreate_v3", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxCreate_v4", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxCreate_v4, "CUresult (CUcontext *, CUctxCreateParams *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxDestroy_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDestroy_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxPushCurrent_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPushCurrent_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxPopCurrent_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxPopCurrent_v2, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSetCurrent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetCurrent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetFlags, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetId, "CUresult (CUcontext, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetApiVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetStreamPriorityRange", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxResetPersistingL2Cache", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetExecAffinity", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxRecordEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxRecordEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxWaitEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxWaitEvent, "CUresult (CUcontext, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxAttach", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxDetach", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleLoad", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleLoadData", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleLoadDataEx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleLoadFatBinary", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleUnload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetLoadingMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetFunction", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetFunctionCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetFunctionCount, "CUresult (unsigned int *, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleEnumerateFunctions", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleEnumerateFunctions, "CUresult (CUfunction *, unsigned int, CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetGlobal_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetGlobal_v2, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLinkCreate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkCreate_v2, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLinkAddData_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddData_v2, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLinkAddFile_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkAddFile_v2, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLinkComplete", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLinkDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetTexRef", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuModuleGetSurfRef", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryLoadData", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadData, "CUresult (CUlibrary *, void const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryLoadFromFile", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryLoadFromFile, "CUresult (CUlibrary *, char const *, CUjit_option *, void **, unsigned int, CUlibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryUnload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryUnload, "CUresult (CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernel, "CUresult (CUkernel *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetKernelCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetKernelCount, "CUresult (unsigned int *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryEnumerateKernels", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryEnumerateKernels, "CUresult (CUkernel *, unsigned int, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetModule", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetModule, "CUresult (CUmodule *, CUlibrary)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelGetFunction", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetFunction, "CUresult (CUfunction *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelGetLibrary", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetLibrary, "CUresult (CUlibrary *, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetGlobal", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetManaged, "CUresult (CUdeviceptr *, size_t *, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLibraryGetUnifiedFunction", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLibraryGetUnifiedFunction, "CUresult (void **, CUlibrary, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetAttribute, "CUresult (int *, CUfunction_attribute, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetAttribute, "CUresult (CUfunction_attribute, int, CUkernel, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelSetCacheConfig, "CUresult (CUkernel, CUfunc_cache, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelGetName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetName, "CUresult (char const **, CUkernel)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuKernelGetParamInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuKernelGetParamInfo, "CUresult (CUkernel, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetInfo_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetInfo_v2, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAlloc_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAlloc_v2, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAllocPitch_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocPitch_v2, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemFree_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFree_v2, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetAddressRange_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAddressRange_v2, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAllocHost_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocHost_v2, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemFreeHost", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemHostAlloc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemHostGetDevicePointer_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetDevicePointer_v2, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemHostGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAllocManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceRegisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceRegisterAsyncNotification, "CUresult (CUdevice, CUasyncCallback, void *, CUasyncCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceUnregisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceUnregisterAsyncNotification, "CUresult (CUdevice, CUasyncCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetByPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuIpcGetEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuIpcOpenEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuIpcGetMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuIpcOpenMemHandle_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcOpenMemHandle_v2, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuIpcCloseMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemHostRegister_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostRegister_v2, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemHostUnregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyHtoD_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoD_v2, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyDtoH_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoH_v2, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyDtoD_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoD_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyDtoA_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoA_v2, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyAtoD_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoD_v2, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyHtoA_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoA_v2, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyAtoH_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoH_v2, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyAtoA_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoA_v2, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy2D_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2D_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy2DUnaligned_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DUnaligned_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy3D_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3D_v2, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyHtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoDAsync_v2, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyDtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoHAsync_v2, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyDtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyDtoDAsync_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyHtoAAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyHtoAAsync_v2, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyAtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyAtoHAsync_v2, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy2DAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy2DAsync_v2, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy3DAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DAsync_v2, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpyBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpyBatchAsync, "CUresult (CUdeviceptr *, CUdeviceptr *, size_t *, size_t, CUmemcpyAttributes *, size_t *, size_t, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemcpy3DBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemcpy3DBatchAsync, "CUresult (size_t, CUDA_MEMCPY3D_BATCH_OP *, size_t *, unsigned PY_LONG_LONG, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD8_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8_v2, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD16_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16_v2, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD32_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32_v2, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D8_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8_v2, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D16_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16_v2, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D32_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32_v2, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD8Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD16Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD32Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D8Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D16Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemsetD2D32Async", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayCreate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayCreate_v2, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetDescriptor_v2, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMipmappedArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMipmappedArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayGetPlane", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArrayDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArray3DCreate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DCreate_v2, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuArray3DGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuArray3DGetDescriptor_v2, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMipmappedArrayCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMipmappedArrayGetLevel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMipmappedArrayDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetHandleForAddressRange", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemBatchDecompressAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemBatchDecompressAsync, "CUresult (CUmemDecompressParams *, size_t, unsigned int, size_t *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAddressReserve", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAddressFree", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemRelease", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemMap", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemMapArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemUnmap", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemSetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetAllocationGranularity", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemGetAllocationPropertiesFromHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemRetainAllocationHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemFreeAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAllocAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolTrimTo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolSetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolGetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAllocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolExportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPoolImportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastCreate, "CUresult (CUmemGenericAllocationHandle *, CUmulticastObjectProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastAddDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastAddDevice, "CUresult (CUmemGenericAllocationHandle, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastBindMem", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindMem, "CUresult (CUmemGenericAllocationHandle, size_t, CUmemGenericAllocationHandle, size_t, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastBindAddr", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastBindAddr, "CUresult (CUmemGenericAllocationHandle, size_t, CUdeviceptr, size_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastUnbind", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastUnbind, "CUresult (CUmemGenericAllocationHandle, CUdevice, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMulticastGetGranularity", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMulticastGetGranularity, "CUresult (size_t *, CUmulticastObjectProp const *, CUmulticastGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuPointerGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPrefetchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemPrefetchAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemPrefetchAsync_v2, "CUresult (CUdeviceptr, size_t, CUmemLocation, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAdvise", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemAdvise_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemAdvise_v2, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUmemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemRangeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuMemRangeGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuPointerSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuPointerGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamCreateWithPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetDevice, "CUresult (CUstream, CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetId, "CUresult (CUstream, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetCtx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetCtx_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCtx_v2, "CUresult (CUstream, CUcontext *, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamWaitEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamBeginCapture_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCapture_v2, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamBeginCaptureToGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBeginCaptureToGraph, "CUresult (CUstream, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamIsCapturing", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetCaptureInfo_v3", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetCaptureInfo_v3, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, CUgraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamUpdateCaptureDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamUpdateCaptureDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamUpdateCaptureDependencies_v2, "CUresult (CUstream, CUgraphNode *, CUgraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamAttachMemAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamDestroy_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamDestroy_v2, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventRecord", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventRecordWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventDestroy_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventDestroy_v2, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventElapsedTime_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventElapsedTime_v2, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuImportExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuExternalMemoryGetMappedBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuExternalMemoryGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDestroyExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuImportExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSignalExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuWaitExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamWaitValue32_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamWaitValue64_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamWriteValue32_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamWriteValue64_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamBatchMemOp_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncGetModule", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncGetName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetName, "CUresult (char const **, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncGetParamInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncGetParamInfo, "CUresult (CUfunction, size_t, size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncIsLoaded", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncIsLoaded, "CUresult (CUfunctionLoadingState *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncLoad", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncLoad, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchKernelEx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchCooperativeKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchCooperativeKernelMultiDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchHostFunc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncSetBlockShape", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncSetSharedSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuParamSetSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuParamSeti", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuParamSetf", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuParamSetv", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchGrid", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLaunchGridAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuParamSetTexRef", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuFuncSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddKernelNode_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddKernelNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphKernelNodeGetParams_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphKernelNodeSetParams_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetParams_v2, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddMemcpyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemcpyNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddMemsetNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemsetNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddHostNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphHostNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddChildGraphNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphChildGraphNodeGetGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddEmptyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddEventRecordNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphEventRecordNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddEventWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphEventWaitNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddExternalSemaphoresSignalNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddExternalSemaphoresWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddBatchMemOpNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphBatchMemOpNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddMemAllocNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemAllocNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddMemFreeNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphMemFreeNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGraphMemTrim", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceSetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeFindInClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetType", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphGetNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphGetRootNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphGetEdges", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphGetEdges_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphGetEdges_v2, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependencies_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetDependentNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetDependentNodes_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetDependentNodes_v2, "CUresult (CUgraphNode, CUgraphNode *, CUgraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphRemoveDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphRemoveDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRemoveDependencies_v2, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, CUgraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphDestroyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphInstantiateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphInstantiateWithParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphInstantiateWithParams, "CUresult (CUgraphExec *, CUgraph, CUDA_GRAPH_INSTANTIATE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecGetFlags, "CUresult (CUgraphExec, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecKernelNodeSetParams_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecKernelNodeSetParams_v2, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeSetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeGetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphUpload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphLaunch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecUpdate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecUpdate_v2, "CUresult (CUgraphExec, CUgraph, CUgraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphKernelNodeCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphKernelNodeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphKernelNodeSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphDebugDotPrint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuUserObjectCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuUserObjectRetain", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuUserObjectRelease", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphRetainUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphReleaseUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphAddNode_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphAddNode_v2, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, CUgraphEdgeData const *, size_t, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphNodeSetParams, "CUresult (CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphExecNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphExecNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphConditionalHandleCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphConditionalHandleCreate, "CUresult (CUgraphConditionalHandle *, CUgraph, CUcontext, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSizeWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyAvailableDynamicSMemPerBlock", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxPotentialClusterSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuOccupancyMaxActiveClusters", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetAddress_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress_v2, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetAddress2D_v3", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddress2D_v3, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetFormat", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetAddressMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetFilterMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetBorderColor", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefSetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetAddress_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddress_v2, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetAddressMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetFilterMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetFormat", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetBorderColor", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexRefDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSurfRefSetArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSurfRefGetArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexObjectCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexObjectDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexObjectGetTextureDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTexObjectGetResourceViewDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSurfObjectCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSurfObjectDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuSurfObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTensorMapEncodeTiled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeTiled, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, cuuint32_t const *, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTensorMapEncodeIm2col", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2col, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int const *, int const *, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTensorMapEncodeIm2colWide", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapEncodeIm2colWide, "CUresult (CUtensorMap *, CUtensorMapDataType, cuuint32_t, void *, cuuint64_t const *, cuuint64_t const *, int, int, cuuint32_t, cuuint32_t, cuuint32_t const *, CUtensorMapInterleave, CUtensorMapIm2ColWideMode, CUtensorMapSwizzle, CUtensorMapL2promotion, CUtensorMapFloatOOBfill)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuTensorMapReplaceAddress", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuTensorMapReplaceAddress, "CUresult (CUtensorMap *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceCanAccessPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxEnablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxDisablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsUnregisterResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsSubResourceGetMappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsResourceGetMappedPointer_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedPointer_v2, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsResourceSetMapFlags_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceSetMapFlags_v2, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsUnmapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGetProcAddress_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetProcAddress_v2, "CUresult (char const *, void **, int, cuuint64_t, CUdriverProcAddressQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCoredumpGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCoredumpGetAttributeGlobal", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpGetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCoredumpSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttribute, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCoredumpSetAttributeGlobal", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCoredumpSetAttributeGlobal, "CUresult (CUcoredumpSettings, void *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGetExportTable", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxCreate, "CUresult (CUgreenCtx *, CUdevResourceDesc, CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxDestroy, "CUresult (CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxFromGreenCtx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxFromGreenCtx, "CUresult (CUcontext *, CUgreenCtx)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDeviceGetDevResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDeviceGetDevResource, "CUresult (CUdevice, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCtxGetDevResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCtxGetDevResource, "CUresult (CUcontext, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxGetDevResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxGetDevResource, "CUresult (CUgreenCtx, CUdevResource *, CUdevResourceType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevSmResourceSplitByCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevSmResourceSplitByCount, "CUresult (CUdevResource *, unsigned int *, CUdevResource const *, CUdevResource *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuDevResourceGenerateDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuDevResourceGenerateDesc, "CUresult (CUdevResourceDesc *, CUdevResource *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxRecordEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxRecordEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxWaitEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxWaitEvent, "CUresult (CUgreenCtx, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuStreamGetGreenCtx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuStreamGetGreenCtx, "CUresult (CUstream, CUgreenCtx *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGreenCtxStreamCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGreenCtxStreamCreate, "CUresult (CUstream *, CUgreenCtx, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLogsRegisterCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsRegisterCallback, "CUresult (CUlogsCallback, void *, CUlogsCallbackHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLogsUnregisterCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsUnregisterCallback, "CUresult (CUlogsCallbackHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLogsCurrent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsCurrent, "CUresult (CUlogIterator *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLogsDumpToFile", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToFile, "CUresult (CUlogIterator *, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuLogsDumpToMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuLogsDumpToMemory, "CUresult (CUlogIterator *, char *, size_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessGetRestoreThreadId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetRestoreThreadId, "CUresult (int, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessGetState", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessGetState, "CUresult (int, CUprocessState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessLock", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessLock, "CUresult (int, CUcheckpointLockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessCheckpoint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessCheckpoint, "CUresult (int, CUcheckpointCheckpointArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessRestore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessRestore, "CUresult (int, CUcheckpointRestoreArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuCheckpointProcessUnlock", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuCheckpointProcessUnlock, "CUresult (int, CUcheckpointUnlockArgs *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuProfilerStart", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuProfilerStop", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsEGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerConnectWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerAcquireFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamConsumerReleaseFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR, __pyx_t_4cuda_8bindings_8cydriver_EGLint, __pyx_t_4cuda_8bindings_8cydriver_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerPresentFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEGLStreamProducerReturnFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *, __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsResourceGetMappedEglFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_8bindings_8cydriver_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuEventCreateFromEGLSync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsGLRegisterBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_GLuint, __pyx_t_4cuda_8bindings_8cydriver_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGLGetDevices_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuVDPAUGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuVDPAUCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuVDPAUCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_8bindings_8cydriver_VdpDevice, __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsVDPAURegisterVideoSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cuGraphicsVDPAURegisterOutputSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_8cydriver__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cydriver(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cydriver}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cydriver", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cydriver(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cydriver(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cydriver(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cydriver' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cydriver" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cydriver", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cydriver) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cydriver")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cydriver", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cydriver.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cydriver", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cydriver"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..27fa11cab065556afa8bf339d092258f354985dd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pxd @@ -0,0 +1,3723 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. + +from libc.stdint cimport uint32_t, uint64_t + +cdef extern from "cuda.h": + + ctypedef uint32_t cuuint32_t + + ctypedef uint64_t cuuint64_t + + ctypedef unsigned long long CUdeviceptr_v2 + + ctypedef CUdeviceptr_v2 CUdeviceptr + + ctypedef int CUdevice_v1 + + ctypedef CUdevice_v1 CUdevice + + cdef struct CUctx_st: + pass + ctypedef CUctx_st* CUcontext + + cdef struct CUmod_st: + pass + ctypedef CUmod_st* CUmodule + + cdef struct CUfunc_st: + pass + ctypedef CUfunc_st* CUfunction + + cdef struct CUlib_st: + pass + ctypedef CUlib_st* CUlibrary + + cdef struct CUkern_st: + pass + ctypedef CUkern_st* CUkernel + + cdef struct CUarray_st: + pass + ctypedef CUarray_st* CUarray + + cdef struct CUmipmappedArray_st: + pass + ctypedef CUmipmappedArray_st* CUmipmappedArray + + cdef struct CUtexref_st: + pass + ctypedef CUtexref_st* CUtexref + + cdef struct CUsurfref_st: + pass + ctypedef CUsurfref_st* CUsurfref + + cdef struct CUevent_st: + pass + ctypedef CUevent_st* CUevent + + cdef struct CUstream_st: + pass + ctypedef CUstream_st* CUstream + + cdef struct CUgraphicsResource_st: + pass + ctypedef CUgraphicsResource_st* CUgraphicsResource + + ctypedef unsigned long long CUtexObject_v1 + + ctypedef CUtexObject_v1 CUtexObject + + ctypedef unsigned long long CUsurfObject_v1 + + ctypedef CUsurfObject_v1 CUsurfObject + + cdef struct CUextMemory_st: + pass + ctypedef CUextMemory_st* CUexternalMemory + + cdef struct CUextSemaphore_st: + pass + ctypedef CUextSemaphore_st* CUexternalSemaphore + + cdef struct CUgraph_st: + pass + ctypedef CUgraph_st* CUgraph + + cdef struct CUgraphNode_st: + pass + ctypedef CUgraphNode_st* CUgraphNode + + cdef struct CUgraphExec_st: + pass + ctypedef CUgraphExec_st* CUgraphExec + + cdef struct CUmemPoolHandle_st: + pass + ctypedef CUmemPoolHandle_st* CUmemoryPool + + cdef struct CUuserObject_st: + pass + ctypedef CUuserObject_st* CUuserObject + + ctypedef cuuint64_t CUgraphConditionalHandle + + cdef struct CUgraphDeviceUpdatableNode_st: + pass + ctypedef CUgraphDeviceUpdatableNode_st* CUgraphDeviceNode + + cdef struct CUasyncCallbackEntry_st: + pass + ctypedef CUasyncCallbackEntry_st* CUasyncCallbackHandle + + cdef struct CUgreenCtx_st: + pass + ctypedef CUgreenCtx_st* CUgreenCtx + + cdef struct CUuuid_st: + char bytes[16] + + ctypedef CUuuid_st CUuuid + + cdef struct CUmemFabricHandle_st: + unsigned char data[64] + + ctypedef CUmemFabricHandle_st CUmemFabricHandle_v1 + + ctypedef CUmemFabricHandle_v1 CUmemFabricHandle + + cdef struct CUipcEventHandle_st: + char reserved[64] + + ctypedef CUipcEventHandle_st CUipcEventHandle_v1 + + ctypedef CUipcEventHandle_v1 CUipcEventHandle + + cdef struct CUipcMemHandle_st: + char reserved[64] + + ctypedef CUipcMemHandle_st CUipcMemHandle_v1 + + ctypedef CUipcMemHandle_v1 CUipcMemHandle + + cdef enum CUipcMem_flags_enum: + CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1 + + ctypedef CUipcMem_flags_enum CUipcMem_flags + + cdef enum CUmemAttach_flags_enum: + CU_MEM_ATTACH_GLOBAL = 1 + CU_MEM_ATTACH_HOST = 2 + CU_MEM_ATTACH_SINGLE = 4 + + ctypedef CUmemAttach_flags_enum CUmemAttach_flags + + cdef enum CUctx_flags_enum: + CU_CTX_SCHED_AUTO = 0 + CU_CTX_SCHED_SPIN = 1 + CU_CTX_SCHED_YIELD = 2 + CU_CTX_SCHED_BLOCKING_SYNC = 4 + CU_CTX_BLOCKING_SYNC = 4 + CU_CTX_SCHED_MASK = 7 + CU_CTX_MAP_HOST = 8 + CU_CTX_LMEM_RESIZE_TO_MAX = 16 + CU_CTX_COREDUMP_ENABLE = 32 + CU_CTX_USER_COREDUMP_ENABLE = 64 + CU_CTX_SYNC_MEMOPS = 128 + CU_CTX_FLAGS_MASK = 255 + + ctypedef CUctx_flags_enum CUctx_flags + + cdef enum CUevent_sched_flags_enum: + CU_EVENT_SCHED_AUTO = 0 + CU_EVENT_SCHED_SPIN = 1 + CU_EVENT_SCHED_YIELD = 2 + CU_EVENT_SCHED_BLOCKING_SYNC = 4 + + ctypedef CUevent_sched_flags_enum CUevent_sched_flags + + cdef enum cl_event_flags_enum: + NVCL_EVENT_SCHED_AUTO = 0 + NVCL_EVENT_SCHED_SPIN = 1 + NVCL_EVENT_SCHED_YIELD = 2 + NVCL_EVENT_SCHED_BLOCKING_SYNC = 4 + + ctypedef cl_event_flags_enum cl_event_flags + + cdef enum cl_context_flags_enum: + NVCL_CTX_SCHED_AUTO = 0 + NVCL_CTX_SCHED_SPIN = 1 + NVCL_CTX_SCHED_YIELD = 2 + NVCL_CTX_SCHED_BLOCKING_SYNC = 4 + + ctypedef cl_context_flags_enum cl_context_flags + + cdef enum CUstream_flags_enum: + CU_STREAM_DEFAULT = 0 + CU_STREAM_NON_BLOCKING = 1 + + ctypedef CUstream_flags_enum CUstream_flags + + cdef enum CUevent_flags_enum: + CU_EVENT_DEFAULT = 0 + CU_EVENT_BLOCKING_SYNC = 1 + CU_EVENT_DISABLE_TIMING = 2 + CU_EVENT_INTERPROCESS = 4 + + ctypedef CUevent_flags_enum CUevent_flags + + cdef enum CUevent_record_flags_enum: + CU_EVENT_RECORD_DEFAULT = 0 + CU_EVENT_RECORD_EXTERNAL = 1 + + ctypedef CUevent_record_flags_enum CUevent_record_flags + + cdef enum CUevent_wait_flags_enum: + CU_EVENT_WAIT_DEFAULT = 0 + CU_EVENT_WAIT_EXTERNAL = 1 + + ctypedef CUevent_wait_flags_enum CUevent_wait_flags + + cdef enum CUstreamWaitValue_flags_enum: + CU_STREAM_WAIT_VALUE_GEQ = 0 + CU_STREAM_WAIT_VALUE_EQ = 1 + CU_STREAM_WAIT_VALUE_AND = 2 + CU_STREAM_WAIT_VALUE_NOR = 3 + CU_STREAM_WAIT_VALUE_FLUSH = 1073741824 + + ctypedef CUstreamWaitValue_flags_enum CUstreamWaitValue_flags + + cdef enum CUstreamWriteValue_flags_enum: + CU_STREAM_WRITE_VALUE_DEFAULT = 0 + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1 + + ctypedef CUstreamWriteValue_flags_enum CUstreamWriteValue_flags + + cdef enum CUstreamBatchMemOpType_enum: + CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1 + CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2 + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3 + CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4 + CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5 + CU_STREAM_MEM_OP_BARRIER = 6 + + ctypedef CUstreamBatchMemOpType_enum CUstreamBatchMemOpType + + cdef enum CUstreamMemoryBarrier_flags_enum: + CU_STREAM_MEMORY_BARRIER_TYPE_SYS = 0 + CU_STREAM_MEMORY_BARRIER_TYPE_GPU = 1 + + ctypedef CUstreamMemoryBarrier_flags_enum CUstreamMemoryBarrier_flags + + cdef struct CUstreamMemOpWaitValueParams_st: + CUstreamBatchMemOpType operation + CUdeviceptr address + cuuint32_t value + cuuint64_t value64 + unsigned int flags + CUdeviceptr alias + + cdef struct CUstreamMemOpWriteValueParams_st: + CUstreamBatchMemOpType operation + CUdeviceptr address + cuuint32_t value + cuuint64_t value64 + unsigned int flags + CUdeviceptr alias + + cdef struct CUstreamMemOpFlushRemoteWritesParams_st: + CUstreamBatchMemOpType operation + unsigned int flags + + cdef struct CUstreamMemOpMemoryBarrierParams_st: + CUstreamBatchMemOpType operation + unsigned int flags + + cdef union CUstreamBatchMemOpParams_union: + CUstreamBatchMemOpType operation + CUstreamMemOpWaitValueParams_st waitValue + CUstreamMemOpWriteValueParams_st writeValue + CUstreamMemOpFlushRemoteWritesParams_st flushRemoteWrites + CUstreamMemOpMemoryBarrierParams_st memoryBarrier + cuuint64_t pad[6] + + ctypedef CUstreamBatchMemOpParams_union CUstreamBatchMemOpParams_v1 + + ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams + + cdef struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + CUcontext ctx + unsigned int count + CUstreamBatchMemOpParams* paramArray + unsigned int flags + + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 + + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 CUDA_BATCH_MEM_OP_NODE_PARAMS + + cdef struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + CUcontext ctx + unsigned int count + CUstreamBatchMemOpParams* paramArray + unsigned int flags + + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + + cdef enum CUoccupancy_flags_enum: + CU_OCCUPANCY_DEFAULT = 0 + CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1 + + ctypedef CUoccupancy_flags_enum CUoccupancy_flags + + cdef enum CUstreamUpdateCaptureDependencies_flags_enum: + CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0 + CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1 + + ctypedef CUstreamUpdateCaptureDependencies_flags_enum CUstreamUpdateCaptureDependencies_flags + + cdef enum CUasyncNotificationType_enum: + CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET = 1 + + ctypedef CUasyncNotificationType_enum CUasyncNotificationType + + cdef struct anon_struct0: + unsigned long long bytesOverBudget + + cdef union anon_union2: + anon_struct0 overBudget + + cdef struct CUasyncNotificationInfo_st: + CUasyncNotificationType type + anon_union2 info + + ctypedef CUasyncNotificationInfo_st CUasyncNotificationInfo + + ctypedef void (*CUasyncCallback)(CUasyncNotificationInfo* info, void* userData, CUasyncCallbackHandle callback) + + cdef enum CUarray_format_enum: + CU_AD_FORMAT_UNSIGNED_INT8 = 1 + CU_AD_FORMAT_UNSIGNED_INT16 = 2 + CU_AD_FORMAT_UNSIGNED_INT32 = 3 + CU_AD_FORMAT_SIGNED_INT8 = 8 + CU_AD_FORMAT_SIGNED_INT16 = 9 + CU_AD_FORMAT_SIGNED_INT32 = 10 + CU_AD_FORMAT_HALF = 16 + CU_AD_FORMAT_FLOAT = 32 + CU_AD_FORMAT_UNORM_INT_101010_2 = 80 + CU_AD_FORMAT_BC1_UNORM = 145 + CU_AD_FORMAT_BC1_UNORM_SRGB = 146 + CU_AD_FORMAT_BC2_UNORM = 147 + CU_AD_FORMAT_BC2_UNORM_SRGB = 148 + CU_AD_FORMAT_BC3_UNORM = 149 + CU_AD_FORMAT_BC3_UNORM_SRGB = 150 + CU_AD_FORMAT_BC4_UNORM = 151 + CU_AD_FORMAT_BC4_SNORM = 152 + CU_AD_FORMAT_BC5_UNORM = 153 + CU_AD_FORMAT_BC5_SNORM = 154 + CU_AD_FORMAT_BC6H_UF16 = 155 + CU_AD_FORMAT_BC6H_SF16 = 156 + CU_AD_FORMAT_BC7_UNORM = 157 + CU_AD_FORMAT_BC7_UNORM_SRGB = 158 + CU_AD_FORMAT_P010 = 159 + CU_AD_FORMAT_P016 = 161 + CU_AD_FORMAT_NV16 = 162 + CU_AD_FORMAT_P210 = 163 + CU_AD_FORMAT_P216 = 164 + CU_AD_FORMAT_YUY2 = 165 + CU_AD_FORMAT_Y210 = 166 + CU_AD_FORMAT_Y216 = 167 + CU_AD_FORMAT_AYUV = 168 + CU_AD_FORMAT_Y410 = 169 + CU_AD_FORMAT_NV12 = 176 + CU_AD_FORMAT_Y416 = 177 + CU_AD_FORMAT_Y444_PLANAR8 = 178 + CU_AD_FORMAT_Y444_PLANAR10 = 179 + CU_AD_FORMAT_YUV444_8bit_SemiPlanar = 180 + CU_AD_FORMAT_YUV444_16bit_SemiPlanar = 181 + CU_AD_FORMAT_UNORM_INT8X1 = 192 + CU_AD_FORMAT_UNORM_INT8X2 = 193 + CU_AD_FORMAT_UNORM_INT8X4 = 194 + CU_AD_FORMAT_UNORM_INT16X1 = 195 + CU_AD_FORMAT_UNORM_INT16X2 = 196 + CU_AD_FORMAT_UNORM_INT16X4 = 197 + CU_AD_FORMAT_SNORM_INT8X1 = 198 + CU_AD_FORMAT_SNORM_INT8X2 = 199 + CU_AD_FORMAT_SNORM_INT8X4 = 200 + CU_AD_FORMAT_SNORM_INT16X1 = 201 + CU_AD_FORMAT_SNORM_INT16X2 = 202 + CU_AD_FORMAT_SNORM_INT16X4 = 203 + CU_AD_FORMAT_MAX = 2147483647 + + ctypedef CUarray_format_enum CUarray_format + + cdef enum CUaddress_mode_enum: + CU_TR_ADDRESS_MODE_WRAP = 0 + CU_TR_ADDRESS_MODE_CLAMP = 1 + CU_TR_ADDRESS_MODE_MIRROR = 2 + CU_TR_ADDRESS_MODE_BORDER = 3 + + ctypedef CUaddress_mode_enum CUaddress_mode + + cdef enum CUfilter_mode_enum: + CU_TR_FILTER_MODE_POINT = 0 + CU_TR_FILTER_MODE_LINEAR = 1 + + ctypedef CUfilter_mode_enum CUfilter_mode + + cdef enum CUdevice_attribute_enum: + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1 + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2 + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3 + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4 + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5 + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6 + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7 + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8 + CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8 + CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9 + CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10 + CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11 + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12 + CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12 + CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13 + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14 + CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15 + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16 + CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17 + CU_DEVICE_ATTRIBUTE_INTEGRATED = 18 + CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19 + CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = 28 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = 29 + CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30 + CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31 + CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32 + CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33 + CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34 + CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35 + CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36 + CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37 + CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38 + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39 + CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40 + CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43 + CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49 + CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50 + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67 + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74 + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75 + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76 + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77 + CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78 + CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79 + CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80 + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81 + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82 + CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83 + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84 + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85 + CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86 + CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87 + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88 + CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89 + CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90 + CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91 + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = 92 + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = 93 + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = 94 + CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95 + CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96 + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97 + CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98 + CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99 + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 100 + CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 101 + CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 102 + CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = 102 + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 103 + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 104 + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 105 + CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 106 + CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 107 + CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 108 + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 109 + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 110 + CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 111 + CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = 112 + CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = 113 + CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = 114 + CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = 115 + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = 116 + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = 117 + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = 118 + CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = 119 + CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = 120 + CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = 121 + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 122 + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 123 + CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = 124 + CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = 125 + CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = 126 + CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = 127 + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED = 128 + CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = 129 + CU_DEVICE_ATTRIBUTE_NUMA_CONFIG = 130 + CU_DEVICE_ATTRIBUTE_NUMA_ID = 131 + CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = 132 + CU_DEVICE_ATTRIBUTE_MPS_ENABLED = 133 + CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = 134 + CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = 135 + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = 136 + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = 137 + CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED = 138 + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = 139 + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = 140 + CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = 141 + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED = 142 + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = 143 + CU_DEVICE_ATTRIBUTE_MAX = 144 + + ctypedef CUdevice_attribute_enum CUdevice_attribute + + cdef struct CUdevprop_st: + int maxThreadsPerBlock + int maxThreadsDim[3] + int maxGridSize[3] + int sharedMemPerBlock + int totalConstantMemory + int SIMDWidth + int memPitch + int regsPerBlock + int clockRate + int textureAlign + + ctypedef CUdevprop_st CUdevprop_v1 + + ctypedef CUdevprop_v1 CUdevprop + + cdef enum CUpointer_attribute_enum: + CU_POINTER_ATTRIBUTE_CONTEXT = 1 + CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2 + CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3 + CU_POINTER_ATTRIBUTE_HOST_POINTER = 4 + CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5 + CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6 + CU_POINTER_ATTRIBUTE_BUFFER_ID = 7 + CU_POINTER_ATTRIBUTE_IS_MANAGED = 8 + CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9 + CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10 + CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11 + CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12 + CU_POINTER_ATTRIBUTE_MAPPED = 13 + CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14 + CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15 + CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16 + CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17 + CU_POINTER_ATTRIBUTE_MAPPING_SIZE = 18 + CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = 19 + CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = 20 + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = 21 + + ctypedef CUpointer_attribute_enum CUpointer_attribute + + cdef enum CUfunction_attribute_enum: + CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0 + CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1 + CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2 + CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3 + CU_FUNC_ATTRIBUTE_NUM_REGS = 4 + CU_FUNC_ATTRIBUTE_PTX_VERSION = 5 + CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6 + CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7 + CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8 + CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9 + CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = 10 + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = 11 + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = 12 + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = 13 + CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = 14 + CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 15 + CU_FUNC_ATTRIBUTE_MAX = 16 + + ctypedef CUfunction_attribute_enum CUfunction_attribute + + cdef enum CUfunc_cache_enum: + CU_FUNC_CACHE_PREFER_NONE = 0 + CU_FUNC_CACHE_PREFER_SHARED = 1 + CU_FUNC_CACHE_PREFER_L1 = 2 + CU_FUNC_CACHE_PREFER_EQUAL = 3 + + ctypedef CUfunc_cache_enum CUfunc_cache + + cdef enum CUsharedconfig_enum: + CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0 + CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1 + CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2 + + ctypedef CUsharedconfig_enum CUsharedconfig + + cdef enum CUshared_carveout_enum: + CU_SHAREDMEM_CARVEOUT_DEFAULT = -1 + CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0 + CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100 + + ctypedef CUshared_carveout_enum CUshared_carveout + + cdef enum CUmemorytype_enum: + CU_MEMORYTYPE_HOST = 1 + CU_MEMORYTYPE_DEVICE = 2 + CU_MEMORYTYPE_ARRAY = 3 + CU_MEMORYTYPE_UNIFIED = 4 + + ctypedef CUmemorytype_enum CUmemorytype + + cdef enum CUcomputemode_enum: + CU_COMPUTEMODE_DEFAULT = 0 + CU_COMPUTEMODE_PROHIBITED = 2 + CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3 + + ctypedef CUcomputemode_enum CUcomputemode + + cdef enum CUmem_advise_enum: + CU_MEM_ADVISE_SET_READ_MOSTLY = 1 + CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2 + CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3 + CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4 + CU_MEM_ADVISE_SET_ACCESSED_BY = 5 + CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6 + + ctypedef CUmem_advise_enum CUmem_advise + + cdef enum CUmem_range_attribute_enum: + CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1 + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2 + CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3 + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4 + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE = 5 + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID = 6 + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE = 7 + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID = 8 + + ctypedef CUmem_range_attribute_enum CUmem_range_attribute + + cdef enum CUjit_option_enum: + CU_JIT_MAX_REGISTERS = 0 + CU_JIT_THREADS_PER_BLOCK = 1 + CU_JIT_WALL_TIME = 2 + CU_JIT_INFO_LOG_BUFFER = 3 + CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4 + CU_JIT_ERROR_LOG_BUFFER = 5 + CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6 + CU_JIT_OPTIMIZATION_LEVEL = 7 + CU_JIT_TARGET_FROM_CUCONTEXT = 8 + CU_JIT_TARGET = 9 + CU_JIT_FALLBACK_STRATEGY = 10 + CU_JIT_GENERATE_DEBUG_INFO = 11 + CU_JIT_LOG_VERBOSE = 12 + CU_JIT_GENERATE_LINE_INFO = 13 + CU_JIT_CACHE_MODE = 14 + CU_JIT_NEW_SM3X_OPT = 15 + CU_JIT_FAST_COMPILE = 16 + CU_JIT_GLOBAL_SYMBOL_NAMES = 17 + CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18 + CU_JIT_GLOBAL_SYMBOL_COUNT = 19 + CU_JIT_LTO = 20 + CU_JIT_FTZ = 21 + CU_JIT_PREC_DIV = 22 + CU_JIT_PREC_SQRT = 23 + CU_JIT_FMA = 24 + CU_JIT_REFERENCED_KERNEL_NAMES = 25 + CU_JIT_REFERENCED_KERNEL_COUNT = 26 + CU_JIT_REFERENCED_VARIABLE_NAMES = 27 + CU_JIT_REFERENCED_VARIABLE_COUNT = 28 + CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = 29 + CU_JIT_POSITION_INDEPENDENT_CODE = 30 + CU_JIT_MIN_CTA_PER_SM = 31 + CU_JIT_MAX_THREADS_PER_BLOCK = 32 + CU_JIT_OVERRIDE_DIRECTIVE_VALUES = 33 + CU_JIT_NUM_OPTIONS = 34 + + ctypedef CUjit_option_enum CUjit_option + + cdef enum CUjit_target_enum: + CU_TARGET_COMPUTE_30 = 30 + CU_TARGET_COMPUTE_32 = 32 + CU_TARGET_COMPUTE_35 = 35 + CU_TARGET_COMPUTE_37 = 37 + CU_TARGET_COMPUTE_50 = 50 + CU_TARGET_COMPUTE_52 = 52 + CU_TARGET_COMPUTE_53 = 53 + CU_TARGET_COMPUTE_60 = 60 + CU_TARGET_COMPUTE_61 = 61 + CU_TARGET_COMPUTE_62 = 62 + CU_TARGET_COMPUTE_70 = 70 + CU_TARGET_COMPUTE_72 = 72 + CU_TARGET_COMPUTE_75 = 75 + CU_TARGET_COMPUTE_80 = 80 + CU_TARGET_COMPUTE_86 = 86 + CU_TARGET_COMPUTE_87 = 87 + CU_TARGET_COMPUTE_89 = 89 + CU_TARGET_COMPUTE_90 = 90 + CU_TARGET_COMPUTE_100 = 100 + CU_TARGET_COMPUTE_101 = 101 + CU_TARGET_COMPUTE_103 = 103 + CU_TARGET_COMPUTE_120 = 120 + CU_TARGET_COMPUTE_121 = 121 + CU_TARGET_COMPUTE_90A = 65626 + CU_TARGET_COMPUTE_100A = 65636 + CU_TARGET_COMPUTE_101A = 65637 + CU_TARGET_COMPUTE_103A = 65639 + CU_TARGET_COMPUTE_120A = 65656 + CU_TARGET_COMPUTE_121A = 65657 + CU_TARGET_COMPUTE_100F = 131172 + CU_TARGET_COMPUTE_101F = 131173 + CU_TARGET_COMPUTE_103F = 131175 + CU_TARGET_COMPUTE_120F = 131192 + CU_TARGET_COMPUTE_121F = 131193 + + ctypedef CUjit_target_enum CUjit_target + + cdef enum CUjit_fallback_enum: + CU_PREFER_PTX = 0 + CU_PREFER_BINARY = 1 + + ctypedef CUjit_fallback_enum CUjit_fallback + + cdef enum CUjit_cacheMode_enum: + CU_JIT_CACHE_OPTION_NONE = 0 + CU_JIT_CACHE_OPTION_CG = 1 + CU_JIT_CACHE_OPTION_CA = 2 + + ctypedef CUjit_cacheMode_enum CUjit_cacheMode + + cdef enum CUjitInputType_enum: + CU_JIT_INPUT_CUBIN = 0 + CU_JIT_INPUT_PTX = 1 + CU_JIT_INPUT_FATBINARY = 2 + CU_JIT_INPUT_OBJECT = 3 + CU_JIT_INPUT_LIBRARY = 4 + CU_JIT_INPUT_NVVM = 5 + CU_JIT_NUM_INPUT_TYPES = 6 + + ctypedef CUjitInputType_enum CUjitInputType + + cdef struct CUlinkState_st: + pass + ctypedef CUlinkState_st* CUlinkState + + cdef enum CUgraphicsRegisterFlags_enum: + CU_GRAPHICS_REGISTER_FLAGS_NONE = 0 + CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1 + CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2 + CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4 + CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8 + + ctypedef CUgraphicsRegisterFlags_enum CUgraphicsRegisterFlags + + cdef enum CUgraphicsMapResourceFlags_enum: + CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0 + CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1 + CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + + ctypedef CUgraphicsMapResourceFlags_enum CUgraphicsMapResourceFlags + + cdef enum CUarray_cubemap_face_enum: + CU_CUBEMAP_FACE_POSITIVE_X = 0 + CU_CUBEMAP_FACE_NEGATIVE_X = 1 + CU_CUBEMAP_FACE_POSITIVE_Y = 2 + CU_CUBEMAP_FACE_NEGATIVE_Y = 3 + CU_CUBEMAP_FACE_POSITIVE_Z = 4 + CU_CUBEMAP_FACE_NEGATIVE_Z = 5 + + ctypedef CUarray_cubemap_face_enum CUarray_cubemap_face + + cdef enum CUlimit_enum: + CU_LIMIT_STACK_SIZE = 0 + CU_LIMIT_PRINTF_FIFO_SIZE = 1 + CU_LIMIT_MALLOC_HEAP_SIZE = 2 + CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3 + CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4 + CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5 + CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6 + CU_LIMIT_SHMEM_SIZE = 7 + CU_LIMIT_CIG_ENABLED = 8 + CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = 9 + CU_LIMIT_MAX = 10 + + ctypedef CUlimit_enum CUlimit + + cdef enum CUresourcetype_enum: + CU_RESOURCE_TYPE_ARRAY = 0 + CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1 + CU_RESOURCE_TYPE_LINEAR = 2 + CU_RESOURCE_TYPE_PITCH2D = 3 + + ctypedef CUresourcetype_enum CUresourcetype + + ctypedef void (*CUhostFn)(void* userData) + + cdef enum CUaccessProperty_enum: + CU_ACCESS_PROPERTY_NORMAL = 0 + CU_ACCESS_PROPERTY_STREAMING = 1 + CU_ACCESS_PROPERTY_PERSISTING = 2 + + ctypedef CUaccessProperty_enum CUaccessProperty + + cdef struct CUaccessPolicyWindow_st: + void* base_ptr + size_t num_bytes + float hitRatio + CUaccessProperty hitProp + CUaccessProperty missProp + + ctypedef CUaccessPolicyWindow_st CUaccessPolicyWindow_v1 + + ctypedef CUaccessPolicyWindow_v1 CUaccessPolicyWindow + + cdef struct CUDA_KERNEL_NODE_PARAMS_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + + ctypedef CUDA_KERNEL_NODE_PARAMS_st CUDA_KERNEL_NODE_PARAMS_v1 + + cdef struct CUDA_KERNEL_NODE_PARAMS_v2_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + CUkernel kern + CUcontext ctx + + ctypedef CUDA_KERNEL_NODE_PARAMS_v2_st CUDA_KERNEL_NODE_PARAMS_v2 + + ctypedef CUDA_KERNEL_NODE_PARAMS_v2 CUDA_KERNEL_NODE_PARAMS + + cdef struct CUDA_KERNEL_NODE_PARAMS_v3_st: + CUfunction func + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + void** kernelParams + void** extra + CUkernel kern + CUcontext ctx + + ctypedef CUDA_KERNEL_NODE_PARAMS_v3_st CUDA_KERNEL_NODE_PARAMS_v3 + + cdef struct CUDA_MEMSET_NODE_PARAMS_st: + CUdeviceptr dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + + ctypedef CUDA_MEMSET_NODE_PARAMS_st CUDA_MEMSET_NODE_PARAMS_v1 + + ctypedef CUDA_MEMSET_NODE_PARAMS_v1 CUDA_MEMSET_NODE_PARAMS + + cdef struct CUDA_MEMSET_NODE_PARAMS_v2_st: + CUdeviceptr dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + CUcontext ctx + + ctypedef CUDA_MEMSET_NODE_PARAMS_v2_st CUDA_MEMSET_NODE_PARAMS_v2 + + cdef struct CUDA_HOST_NODE_PARAMS_st: + CUhostFn fn + void* userData + + ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1 + + ctypedef CUDA_HOST_NODE_PARAMS_v1 CUDA_HOST_NODE_PARAMS + + cdef struct CUDA_HOST_NODE_PARAMS_v2_st: + CUhostFn fn + void* userData + + ctypedef CUDA_HOST_NODE_PARAMS_v2_st CUDA_HOST_NODE_PARAMS_v2 + + cdef enum CUgraphConditionalNodeType_enum: + CU_GRAPH_COND_TYPE_IF = 0 + CU_GRAPH_COND_TYPE_WHILE = 1 + CU_GRAPH_COND_TYPE_SWITCH = 2 + + ctypedef CUgraphConditionalNodeType_enum CUgraphConditionalNodeType + + cdef struct CUDA_CONDITIONAL_NODE_PARAMS: + CUgraphConditionalHandle handle + CUgraphConditionalNodeType type + unsigned int size + CUgraph* phGraph_out + CUcontext ctx + + cdef enum CUgraphNodeType_enum: + CU_GRAPH_NODE_TYPE_KERNEL = 0 + CU_GRAPH_NODE_TYPE_MEMCPY = 1 + CU_GRAPH_NODE_TYPE_MEMSET = 2 + CU_GRAPH_NODE_TYPE_HOST = 3 + CU_GRAPH_NODE_TYPE_GRAPH = 4 + CU_GRAPH_NODE_TYPE_EMPTY = 5 + CU_GRAPH_NODE_TYPE_WAIT_EVENT = 6 + CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7 + CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8 + CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9 + CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10 + CU_GRAPH_NODE_TYPE_MEM_FREE = 11 + CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = 12 + CU_GRAPH_NODE_TYPE_CONDITIONAL = 13 + + ctypedef CUgraphNodeType_enum CUgraphNodeType + + cdef enum CUgraphDependencyType_enum: + CU_GRAPH_DEPENDENCY_TYPE_DEFAULT = 0 + CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = 1 + + ctypedef CUgraphDependencyType_enum CUgraphDependencyType + + cdef struct CUgraphEdgeData_st: + unsigned char from_port + unsigned char to_port + unsigned char type + unsigned char reserved[5] + + ctypedef CUgraphEdgeData_st CUgraphEdgeData + + cdef enum CUgraphInstantiateResult_enum: + CUDA_GRAPH_INSTANTIATE_SUCCESS = 0 + CUDA_GRAPH_INSTANTIATE_ERROR = 1 + CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = 2 + CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = 3 + CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = 4 + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = 5 + + ctypedef CUgraphInstantiateResult_enum CUgraphInstantiateResult + + cdef struct CUDA_GRAPH_INSTANTIATE_PARAMS_st: + cuuint64_t flags + CUstream hUploadStream + CUgraphNode hErrNode_out + CUgraphInstantiateResult result_out + + ctypedef CUDA_GRAPH_INSTANTIATE_PARAMS_st CUDA_GRAPH_INSTANTIATE_PARAMS + + cdef enum CUsynchronizationPolicy_enum: + CU_SYNC_POLICY_AUTO = 1 + CU_SYNC_POLICY_SPIN = 2 + CU_SYNC_POLICY_YIELD = 3 + CU_SYNC_POLICY_BLOCKING_SYNC = 4 + + ctypedef CUsynchronizationPolicy_enum CUsynchronizationPolicy + + cdef enum CUclusterSchedulingPolicy_enum: + CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = 0 + CU_CLUSTER_SCHEDULING_POLICY_SPREAD = 1 + CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = 2 + + ctypedef CUclusterSchedulingPolicy_enum CUclusterSchedulingPolicy + + cdef enum CUlaunchMemSyncDomain_enum: + CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = 0 + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = 1 + + ctypedef CUlaunchMemSyncDomain_enum CUlaunchMemSyncDomain + + cdef struct CUlaunchMemSyncDomainMap_st: + unsigned char default_ + unsigned char remote + + ctypedef CUlaunchMemSyncDomainMap_st CUlaunchMemSyncDomainMap + + cdef enum CUlaunchAttributeID_enum: + CU_LAUNCH_ATTRIBUTE_IGNORE = 0 + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = 2 + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = 4 + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = 6 + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = 7 + CU_LAUNCH_ATTRIBUTE_PRIORITY = 8 + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = 12 + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + + ctypedef CUlaunchAttributeID_enum CUlaunchAttributeID + + cdef struct anon_struct1: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct2: + CUevent event + int flags + int triggerAtBlockStart + + cdef struct anon_struct3: + CUevent event + int flags + + cdef struct anon_struct4: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct5: + int deviceUpdatable + CUgraphDeviceNode devNode + + cdef union CUlaunchAttributeValue_union: + char pad[64] + CUaccessPolicyWindow accessPolicyWindow + int cooperative + CUsynchronizationPolicy syncPolicy + anon_struct1 clusterDim + CUclusterSchedulingPolicy clusterSchedulingPolicyPreference + int programmaticStreamSerializationAllowed + anon_struct2 programmaticEvent + anon_struct3 launchCompletionEvent + int priority + CUlaunchMemSyncDomainMap memSyncDomainMap + CUlaunchMemSyncDomain memSyncDomain + anon_struct4 preferredClusterDim + anon_struct5 deviceUpdatableKernelNode + unsigned int sharedMemCarveout + + ctypedef CUlaunchAttributeValue_union CUlaunchAttributeValue + + cdef struct CUlaunchAttribute_st: + CUlaunchAttributeID id + CUlaunchAttributeValue value + + ctypedef CUlaunchAttribute_st CUlaunchAttribute + + cdef struct CUlaunchConfig_st: + unsigned int gridDimX + unsigned int gridDimY + unsigned int gridDimZ + unsigned int blockDimX + unsigned int blockDimY + unsigned int blockDimZ + unsigned int sharedMemBytes + CUstream hStream + CUlaunchAttribute* attrs + unsigned int numAttrs + + ctypedef CUlaunchConfig_st CUlaunchConfig + + ctypedef CUlaunchAttributeID CUkernelNodeAttrID + + ctypedef CUlaunchAttributeValue CUkernelNodeAttrValue_v1 + + ctypedef CUkernelNodeAttrValue_v1 CUkernelNodeAttrValue + + cdef enum CUstreamCaptureStatus_enum: + CU_STREAM_CAPTURE_STATUS_NONE = 0 + CU_STREAM_CAPTURE_STATUS_ACTIVE = 1 + CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2 + + ctypedef CUstreamCaptureStatus_enum CUstreamCaptureStatus + + cdef enum CUstreamCaptureMode_enum: + CU_STREAM_CAPTURE_MODE_GLOBAL = 0 + CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1 + CU_STREAM_CAPTURE_MODE_RELAXED = 2 + + ctypedef CUstreamCaptureMode_enum CUstreamCaptureMode + + ctypedef CUlaunchAttributeID CUstreamAttrID + + ctypedef CUlaunchAttributeValue CUstreamAttrValue_v1 + + ctypedef CUstreamAttrValue_v1 CUstreamAttrValue + + cdef enum CUdriverProcAddress_flags_enum: + CU_GET_PROC_ADDRESS_DEFAULT = 0 + CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1 + CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2 + + ctypedef CUdriverProcAddress_flags_enum CUdriverProcAddress_flags + + cdef enum CUdriverProcAddressQueryResult_enum: + CU_GET_PROC_ADDRESS_SUCCESS = 0 + CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = 1 + CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = 2 + + ctypedef CUdriverProcAddressQueryResult_enum CUdriverProcAddressQueryResult + + cdef enum CUexecAffinityType_enum: + CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0 + CU_EXEC_AFFINITY_TYPE_MAX = 1 + + ctypedef CUexecAffinityType_enum CUexecAffinityType + + cdef struct CUexecAffinitySmCount_st: + unsigned int val + + ctypedef CUexecAffinitySmCount_st CUexecAffinitySmCount_v1 + + ctypedef CUexecAffinitySmCount_v1 CUexecAffinitySmCount + + cdef union anon_union3: + CUexecAffinitySmCount smCount + + cdef struct CUexecAffinityParam_st: + CUexecAffinityType type + anon_union3 param + + ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1 + + ctypedef CUexecAffinityParam_v1 CUexecAffinityParam + + cdef enum CUcigDataType_enum: + CIG_DATA_TYPE_D3D12_COMMAND_QUEUE = 1 + CIG_DATA_TYPE_NV_BLOB = 2 + + ctypedef CUcigDataType_enum CUcigDataType + + cdef struct CUctxCigParam_st: + CUcigDataType sharedDataType + void* sharedData + + ctypedef CUctxCigParam_st CUctxCigParam + + cdef struct CUctxCreateParams_st: + CUexecAffinityParam* execAffinityParams + int numExecAffinityParams + CUctxCigParam* cigParams + + ctypedef CUctxCreateParams_st CUctxCreateParams + + cdef enum CUlibraryOption_enum: + CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE = 0 + CU_LIBRARY_BINARY_IS_PRESERVED = 1 + CU_LIBRARY_NUM_OPTIONS = 2 + + ctypedef CUlibraryOption_enum CUlibraryOption + + cdef struct CUlibraryHostUniversalFunctionAndDataTable_st: + void* functionTable + size_t functionWindowSize + void* dataTable + size_t dataWindowSize + + ctypedef CUlibraryHostUniversalFunctionAndDataTable_st CUlibraryHostUniversalFunctionAndDataTable + + cdef enum cudaError_enum: + CUDA_SUCCESS = 0 + CUDA_ERROR_INVALID_VALUE = 1 + CUDA_ERROR_OUT_OF_MEMORY = 2 + CUDA_ERROR_NOT_INITIALIZED = 3 + CUDA_ERROR_DEINITIALIZED = 4 + CUDA_ERROR_PROFILER_DISABLED = 5 + CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6 + CUDA_ERROR_PROFILER_ALREADY_STARTED = 7 + CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8 + CUDA_ERROR_STUB_LIBRARY = 34 + CUDA_ERROR_DEVICE_UNAVAILABLE = 46 + CUDA_ERROR_NO_DEVICE = 100 + CUDA_ERROR_INVALID_DEVICE = 101 + CUDA_ERROR_DEVICE_NOT_LICENSED = 102 + CUDA_ERROR_INVALID_IMAGE = 200 + CUDA_ERROR_INVALID_CONTEXT = 201 + CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202 + CUDA_ERROR_MAP_FAILED = 205 + CUDA_ERROR_UNMAP_FAILED = 206 + CUDA_ERROR_ARRAY_IS_MAPPED = 207 + CUDA_ERROR_ALREADY_MAPPED = 208 + CUDA_ERROR_NO_BINARY_FOR_GPU = 209 + CUDA_ERROR_ALREADY_ACQUIRED = 210 + CUDA_ERROR_NOT_MAPPED = 211 + CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212 + CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213 + CUDA_ERROR_ECC_UNCORRECTABLE = 214 + CUDA_ERROR_UNSUPPORTED_LIMIT = 215 + CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 216 + CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217 + CUDA_ERROR_INVALID_PTX = 218 + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219 + CUDA_ERROR_NVLINK_UNCORRECTABLE = 220 + CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221 + CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 222 + CUDA_ERROR_JIT_COMPILATION_DISABLED = 223 + CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 224 + CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = 225 + CUDA_ERROR_CONTAINED = 226 + CUDA_ERROR_INVALID_SOURCE = 300 + CUDA_ERROR_FILE_NOT_FOUND = 301 + CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302 + CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303 + CUDA_ERROR_OPERATING_SYSTEM = 304 + CUDA_ERROR_INVALID_HANDLE = 400 + CUDA_ERROR_ILLEGAL_STATE = 401 + CUDA_ERROR_LOSSY_QUERY = 402 + CUDA_ERROR_NOT_FOUND = 500 + CUDA_ERROR_NOT_READY = 600 + CUDA_ERROR_ILLEGAL_ADDRESS = 700 + CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701 + CUDA_ERROR_LAUNCH_TIMEOUT = 702 + CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703 + CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 704 + CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 705 + CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708 + CUDA_ERROR_CONTEXT_IS_DESTROYED = 709 + CUDA_ERROR_ASSERT = 710 + CUDA_ERROR_TOO_MANY_PEERS = 711 + CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 712 + CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 713 + CUDA_ERROR_HARDWARE_STACK_ERROR = 714 + CUDA_ERROR_ILLEGAL_INSTRUCTION = 715 + CUDA_ERROR_MISALIGNED_ADDRESS = 716 + CUDA_ERROR_INVALID_ADDRESS_SPACE = 717 + CUDA_ERROR_INVALID_PC = 718 + CUDA_ERROR_LAUNCH_FAILED = 719 + CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720 + CUDA_ERROR_TENSOR_MEMORY_LEAK = 721 + CUDA_ERROR_NOT_PERMITTED = 800 + CUDA_ERROR_NOT_SUPPORTED = 801 + CUDA_ERROR_SYSTEM_NOT_READY = 802 + CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 803 + CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 804 + CUDA_ERROR_MPS_CONNECTION_FAILED = 805 + CUDA_ERROR_MPS_RPC_FAILURE = 806 + CUDA_ERROR_MPS_SERVER_NOT_READY = 807 + CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = 808 + CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = 809 + CUDA_ERROR_MPS_CLIENT_TERMINATED = 810 + CUDA_ERROR_CDP_NOT_SUPPORTED = 811 + CUDA_ERROR_CDP_VERSION_MISMATCH = 812 + CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900 + CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 901 + CUDA_ERROR_STREAM_CAPTURE_MERGE = 902 + CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 903 + CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 904 + CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 905 + CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 906 + CUDA_ERROR_CAPTURED_EVENT = 907 + CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908 + CUDA_ERROR_TIMEOUT = 909 + CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 910 + CUDA_ERROR_EXTERNAL_DEVICE = 911 + CUDA_ERROR_INVALID_CLUSTER_SIZE = 912 + CUDA_ERROR_FUNCTION_NOT_LOADED = 913 + CUDA_ERROR_INVALID_RESOURCE_TYPE = 914 + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = 915 + CUDA_ERROR_KEY_ROTATION = 916 + CUDA_ERROR_UNKNOWN = 999 + + ctypedef cudaError_enum CUresult + + cdef enum CUdevice_P2PAttribute_enum: + CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1 + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2 + CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3 + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4 + CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4 + + ctypedef CUdevice_P2PAttribute_enum CUdevice_P2PAttribute + + ctypedef void (*CUstreamCallback)(CUstream hStream, CUresult status, void* userData) + + ctypedef size_t (*CUoccupancyB2DSize)(int blockSize) + + cdef struct CUDA_MEMCPY2D_st: + size_t srcXInBytes + size_t srcY + CUmemorytype srcMemoryType + const void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + size_t srcPitch + size_t dstXInBytes + size_t dstY + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + size_t dstPitch + size_t WidthInBytes + size_t Height + + ctypedef CUDA_MEMCPY2D_st CUDA_MEMCPY2D_v2 + + ctypedef CUDA_MEMCPY2D_v2 CUDA_MEMCPY2D + + cdef struct CUDA_MEMCPY3D_st: + size_t srcXInBytes + size_t srcY + size_t srcZ + size_t srcLOD + CUmemorytype srcMemoryType + const void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + void* reserved0 + size_t srcPitch + size_t srcHeight + size_t dstXInBytes + size_t dstY + size_t dstZ + size_t dstLOD + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + void* reserved1 + size_t dstPitch + size_t dstHeight + size_t WidthInBytes + size_t Height + size_t Depth + + ctypedef CUDA_MEMCPY3D_st CUDA_MEMCPY3D_v2 + + ctypedef CUDA_MEMCPY3D_v2 CUDA_MEMCPY3D + + cdef struct CUDA_MEMCPY3D_PEER_st: + size_t srcXInBytes + size_t srcY + size_t srcZ + size_t srcLOD + CUmemorytype srcMemoryType + const void* srcHost + CUdeviceptr srcDevice + CUarray srcArray + CUcontext srcContext + size_t srcPitch + size_t srcHeight + size_t dstXInBytes + size_t dstY + size_t dstZ + size_t dstLOD + CUmemorytype dstMemoryType + void* dstHost + CUdeviceptr dstDevice + CUarray dstArray + CUcontext dstContext + size_t dstPitch + size_t dstHeight + size_t WidthInBytes + size_t Height + size_t Depth + + ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1 + + ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER + + cdef struct CUDA_MEMCPY_NODE_PARAMS_st: + int flags + int reserved + CUcontext copyCtx + CUDA_MEMCPY3D copyParams + + ctypedef CUDA_MEMCPY_NODE_PARAMS_st CUDA_MEMCPY_NODE_PARAMS + + cdef struct CUDA_ARRAY_DESCRIPTOR_st: + size_t Width + size_t Height + CUarray_format Format + unsigned int NumChannels + + ctypedef CUDA_ARRAY_DESCRIPTOR_st CUDA_ARRAY_DESCRIPTOR_v2 + + ctypedef CUDA_ARRAY_DESCRIPTOR_v2 CUDA_ARRAY_DESCRIPTOR + + cdef struct CUDA_ARRAY3D_DESCRIPTOR_st: + size_t Width + size_t Height + size_t Depth + CUarray_format Format + unsigned int NumChannels + unsigned int Flags + + ctypedef CUDA_ARRAY3D_DESCRIPTOR_st CUDA_ARRAY3D_DESCRIPTOR_v2 + + ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR + + cdef struct anon_struct6: + unsigned int width + unsigned int height + unsigned int depth + + cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st: + anon_struct6 tileExtent + unsigned int miptailFirstLevel + unsigned long long miptailSize + unsigned int flags + unsigned int reserved[4] + + ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1 + + ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_v1 CUDA_ARRAY_SPARSE_PROPERTIES + + cdef struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + size_t size + size_t alignment + unsigned int reserved[4] + + ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_st CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 + + ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS + + cdef struct anon_struct7: + CUarray hArray + + cdef struct anon_struct8: + CUmipmappedArray hMipmappedArray + + cdef struct anon_struct9: + CUdeviceptr devPtr + CUarray_format format + unsigned int numChannels + size_t sizeInBytes + + cdef struct anon_struct10: + CUdeviceptr devPtr + CUarray_format format + unsigned int numChannels + size_t width + size_t height + size_t pitchInBytes + + cdef struct anon_struct11: + int reserved[32] + + cdef union anon_union4: + anon_struct7 array + anon_struct8 mipmap + anon_struct9 linear + anon_struct10 pitch2D + anon_struct11 reserved + + cdef struct CUDA_RESOURCE_DESC_st: + CUresourcetype resType + anon_union4 res + unsigned int flags + + ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1 + + ctypedef CUDA_RESOURCE_DESC_v1 CUDA_RESOURCE_DESC + + cdef struct CUDA_TEXTURE_DESC_st: + CUaddress_mode addressMode[3] + CUfilter_mode filterMode + unsigned int flags + unsigned int maxAnisotropy + CUfilter_mode mipmapFilterMode + float mipmapLevelBias + float minMipmapLevelClamp + float maxMipmapLevelClamp + float borderColor[4] + int reserved[12] + + ctypedef CUDA_TEXTURE_DESC_st CUDA_TEXTURE_DESC_v1 + + ctypedef CUDA_TEXTURE_DESC_v1 CUDA_TEXTURE_DESC + + cdef enum CUresourceViewFormat_enum: + CU_RES_VIEW_FORMAT_NONE = 0 + CU_RES_VIEW_FORMAT_UINT_1X8 = 1 + CU_RES_VIEW_FORMAT_UINT_2X8 = 2 + CU_RES_VIEW_FORMAT_UINT_4X8 = 3 + CU_RES_VIEW_FORMAT_SINT_1X8 = 4 + CU_RES_VIEW_FORMAT_SINT_2X8 = 5 + CU_RES_VIEW_FORMAT_SINT_4X8 = 6 + CU_RES_VIEW_FORMAT_UINT_1X16 = 7 + CU_RES_VIEW_FORMAT_UINT_2X16 = 8 + CU_RES_VIEW_FORMAT_UINT_4X16 = 9 + CU_RES_VIEW_FORMAT_SINT_1X16 = 10 + CU_RES_VIEW_FORMAT_SINT_2X16 = 11 + CU_RES_VIEW_FORMAT_SINT_4X16 = 12 + CU_RES_VIEW_FORMAT_UINT_1X32 = 13 + CU_RES_VIEW_FORMAT_UINT_2X32 = 14 + CU_RES_VIEW_FORMAT_UINT_4X32 = 15 + CU_RES_VIEW_FORMAT_SINT_1X32 = 16 + CU_RES_VIEW_FORMAT_SINT_2X32 = 17 + CU_RES_VIEW_FORMAT_SINT_4X32 = 18 + CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19 + CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20 + CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21 + CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22 + CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23 + CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24 + CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25 + CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26 + CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27 + CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28 + CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29 + CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30 + CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31 + CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32 + CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33 + CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34 + + ctypedef CUresourceViewFormat_enum CUresourceViewFormat + + cdef struct CUDA_RESOURCE_VIEW_DESC_st: + CUresourceViewFormat format + size_t width + size_t height + size_t depth + unsigned int firstMipmapLevel + unsigned int lastMipmapLevel + unsigned int firstLayer + unsigned int lastLayer + unsigned int reserved[16] + + ctypedef CUDA_RESOURCE_VIEW_DESC_st CUDA_RESOURCE_VIEW_DESC_v1 + + ctypedef CUDA_RESOURCE_VIEW_DESC_v1 CUDA_RESOURCE_VIEW_DESC + + cdef struct CUtensorMap_st: + cuuint64_t opaque[16] + + ctypedef CUtensorMap_st CUtensorMap + + cdef enum CUtensorMapDataType_enum: + CU_TENSOR_MAP_DATA_TYPE_UINT8 = 0 + CU_TENSOR_MAP_DATA_TYPE_UINT16 = 1 + CU_TENSOR_MAP_DATA_TYPE_UINT32 = 2 + CU_TENSOR_MAP_DATA_TYPE_INT32 = 3 + CU_TENSOR_MAP_DATA_TYPE_UINT64 = 4 + CU_TENSOR_MAP_DATA_TYPE_INT64 = 5 + CU_TENSOR_MAP_DATA_TYPE_FLOAT16 = 6 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32 = 7 + CU_TENSOR_MAP_DATA_TYPE_FLOAT64 = 8 + CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 = 9 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ = 10 + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = 11 + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = 12 + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B = 13 + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B = 14 + CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B = 15 + + ctypedef CUtensorMapDataType_enum CUtensorMapDataType + + cdef enum CUtensorMapInterleave_enum: + CU_TENSOR_MAP_INTERLEAVE_NONE = 0 + CU_TENSOR_MAP_INTERLEAVE_16B = 1 + CU_TENSOR_MAP_INTERLEAVE_32B = 2 + + ctypedef CUtensorMapInterleave_enum CUtensorMapInterleave + + cdef enum CUtensorMapSwizzle_enum: + CU_TENSOR_MAP_SWIZZLE_NONE = 0 + CU_TENSOR_MAP_SWIZZLE_32B = 1 + CU_TENSOR_MAP_SWIZZLE_64B = 2 + CU_TENSOR_MAP_SWIZZLE_128B = 3 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B = 4 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B = 5 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B = 6 + + ctypedef CUtensorMapSwizzle_enum CUtensorMapSwizzle + + cdef enum CUtensorMapL2promotion_enum: + CU_TENSOR_MAP_L2_PROMOTION_NONE = 0 + CU_TENSOR_MAP_L2_PROMOTION_L2_64B = 1 + CU_TENSOR_MAP_L2_PROMOTION_L2_128B = 2 + CU_TENSOR_MAP_L2_PROMOTION_L2_256B = 3 + + ctypedef CUtensorMapL2promotion_enum CUtensorMapL2promotion + + cdef enum CUtensorMapFloatOOBfill_enum: + CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = 0 + CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = 1 + + ctypedef CUtensorMapFloatOOBfill_enum CUtensorMapFloatOOBfill + + cdef enum CUtensorMapIm2ColWideMode_enum: + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W = 0 + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 = 1 + + ctypedef CUtensorMapIm2ColWideMode_enum CUtensorMapIm2ColWideMode + + cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + unsigned long long p2pToken + unsigned int vaSpaceToken + + ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 + + ctypedef CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 CUDA_POINTER_ATTRIBUTE_P2P_TOKENS + + cdef enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum: + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0 + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1 + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3 + + ctypedef CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS + + cdef struct CUDA_LAUNCH_PARAMS_st: + CUfunction function + 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 + + ctypedef CUDA_LAUNCH_PARAMS_st CUDA_LAUNCH_PARAMS_v1 + + ctypedef CUDA_LAUNCH_PARAMS_v1 CUDA_LAUNCH_PARAMS + + cdef enum CUexternalMemoryHandleType_enum: + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7 + CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8 + + ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType + + cdef struct anon_struct12: + void* handle + const void* name + + cdef union anon_union5: + int fd + anon_struct12 win32 + const void* nvSciBufObject + + cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + CUexternalMemoryHandleType type + anon_union5 handle + unsigned long long size + unsigned int flags + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 + + ctypedef CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 CUDA_EXTERNAL_MEMORY_HANDLE_DESC + + cdef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + unsigned long long offset + unsigned long long size + unsigned int flags + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 + + ctypedef CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 CUDA_EXTERNAL_MEMORY_BUFFER_DESC + + cdef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + unsigned long long offset + CUDA_ARRAY3D_DESCRIPTOR arrayDesc + unsigned int numLevels + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 + + ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC + + cdef enum CUexternalSemaphoreHandleType_enum: + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = 9 + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10 + + ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType + + cdef struct anon_struct13: + void* handle + const void* name + + cdef union anon_union6: + int fd + anon_struct13 win32 + const void* nvSciSyncObj + + cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + CUexternalSemaphoreHandleType type + anon_union6 handle + unsigned int flags + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 + + ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC + + cdef struct anon_struct14: + unsigned long long value + + cdef union anon_union7: + void* fence + unsigned long long reserved + + cdef struct anon_struct15: + unsigned long long key + + cdef struct anon_struct16: + anon_struct14 fence + anon_union7 nvSciSync + anon_struct15 keyedMutex + unsigned int reserved[12] + + cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + anon_struct16 params + unsigned int flags + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 + + ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + + cdef struct anon_struct17: + unsigned long long value + + cdef union anon_union8: + void* fence + unsigned long long reserved + + cdef struct anon_struct18: + unsigned long long key + unsigned int timeoutMs + + cdef struct anon_struct19: + anon_struct17 fence + anon_union8 nvSciSync + anon_struct18 keyedMutex + unsigned int reserved[10] + + cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + anon_struct19 params + unsigned int flags + unsigned int reserved[16] + + ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 + + ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + + cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + CUexternalSemaphore* extSemArray + const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray + unsigned int numExtSems + + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 + + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 CUDA_EXT_SEM_SIGNAL_NODE_PARAMS + + cdef struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + CUexternalSemaphore* extSemArray + const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray + unsigned int numExtSems + + ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + + cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + CUexternalSemaphore* extSemArray + const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray + unsigned int numExtSems + + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 + + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS + + cdef struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + CUexternalSemaphore* extSemArray + const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray + unsigned int numExtSems + + ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + + ctypedef unsigned long long CUmemGenericAllocationHandle_v1 + + ctypedef CUmemGenericAllocationHandle_v1 CUmemGenericAllocationHandle + + cdef enum CUmemAllocationHandleType_enum: + CU_MEM_HANDLE_TYPE_NONE = 0 + CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1 + CU_MEM_HANDLE_TYPE_WIN32 = 2 + CU_MEM_HANDLE_TYPE_WIN32_KMT = 4 + CU_MEM_HANDLE_TYPE_FABRIC = 8 + CU_MEM_HANDLE_TYPE_MAX = 2147483647 + + ctypedef CUmemAllocationHandleType_enum CUmemAllocationHandleType + + cdef enum CUmemAccess_flags_enum: + CU_MEM_ACCESS_FLAGS_PROT_NONE = 0 + CU_MEM_ACCESS_FLAGS_PROT_READ = 1 + CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3 + CU_MEM_ACCESS_FLAGS_PROT_MAX = 2147483647 + + ctypedef CUmemAccess_flags_enum CUmemAccess_flags + + cdef enum CUmemLocationType_enum: + CU_MEM_LOCATION_TYPE_INVALID = 0 + CU_MEM_LOCATION_TYPE_DEVICE = 1 + CU_MEM_LOCATION_TYPE_HOST = 2 + CU_MEM_LOCATION_TYPE_HOST_NUMA = 3 + CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = 4 + CU_MEM_LOCATION_TYPE_MAX = 2147483647 + + ctypedef CUmemLocationType_enum CUmemLocationType + + cdef enum CUmemAllocationType_enum: + CU_MEM_ALLOCATION_TYPE_INVALID = 0 + CU_MEM_ALLOCATION_TYPE_PINNED = 1 + CU_MEM_ALLOCATION_TYPE_MAX = 2147483647 + + ctypedef CUmemAllocationType_enum CUmemAllocationType + + cdef enum CUmemAllocationGranularity_flags_enum: + CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0 + CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1 + + ctypedef CUmemAllocationGranularity_flags_enum CUmemAllocationGranularity_flags + + cdef enum CUmemRangeHandleType_enum: + CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = 1 + CU_MEM_RANGE_HANDLE_TYPE_MAX = 2147483647 + + ctypedef CUmemRangeHandleType_enum CUmemRangeHandleType + + cdef enum CUmemRangeFlags_enum: + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = 1 + + ctypedef CUmemRangeFlags_enum CUmemRangeFlags + + cdef enum CUarraySparseSubresourceType_enum: + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0 + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1 + + ctypedef CUarraySparseSubresourceType_enum CUarraySparseSubresourceType + + cdef enum CUmemOperationType_enum: + CU_MEM_OPERATION_TYPE_MAP = 1 + CU_MEM_OPERATION_TYPE_UNMAP = 2 + + ctypedef CUmemOperationType_enum CUmemOperationType + + cdef enum CUmemHandleType_enum: + CU_MEM_HANDLE_TYPE_GENERIC = 0 + + ctypedef CUmemHandleType_enum CUmemHandleType + + cdef union anon_union9: + CUmipmappedArray mipmap + CUarray array + + cdef struct anon_struct20: + unsigned int level + unsigned int layer + unsigned int offsetX + unsigned int offsetY + unsigned int offsetZ + unsigned int extentWidth + unsigned int extentHeight + unsigned int extentDepth + + cdef struct anon_struct21: + unsigned int layer + unsigned long long offset + unsigned long long size + + cdef union anon_union10: + anon_struct20 sparseLevel + anon_struct21 miptail + + cdef union anon_union11: + CUmemGenericAllocationHandle memHandle + + cdef struct CUarrayMapInfo_st: + CUresourcetype resourceType + anon_union9 resource + CUarraySparseSubresourceType subresourceType + anon_union10 subresource + CUmemOperationType memOperationType + CUmemHandleType memHandleType + anon_union11 memHandle + unsigned long long offset + unsigned int deviceBitMask + unsigned int flags + unsigned int reserved[2] + + ctypedef CUarrayMapInfo_st CUarrayMapInfo_v1 + + ctypedef CUarrayMapInfo_v1 CUarrayMapInfo + + cdef struct CUmemLocation_st: + CUmemLocationType type + int id + + ctypedef CUmemLocation_st CUmemLocation_v1 + + ctypedef CUmemLocation_v1 CUmemLocation + + cdef enum CUmemAllocationCompType_enum: + CU_MEM_ALLOCATION_COMP_NONE = 0 + CU_MEM_ALLOCATION_COMP_GENERIC = 1 + + ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType + + cdef struct anon_struct22: + unsigned char compressionType + unsigned char gpuDirectRDMACapable + unsigned short usage + unsigned char reserved[4] + + cdef struct CUmemAllocationProp_st: + CUmemAllocationType type + CUmemAllocationHandleType requestedHandleTypes + CUmemLocation location + void* win32HandleMetaData + anon_struct22 allocFlags + + ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1 + + ctypedef CUmemAllocationProp_v1 CUmemAllocationProp + + cdef enum CUmulticastGranularity_flags_enum: + CU_MULTICAST_GRANULARITY_MINIMUM = 0 + CU_MULTICAST_GRANULARITY_RECOMMENDED = 1 + + ctypedef CUmulticastGranularity_flags_enum CUmulticastGranularity_flags + + cdef struct CUmulticastObjectProp_st: + unsigned int numDevices + size_t size + unsigned long long handleTypes + unsigned long long flags + + ctypedef CUmulticastObjectProp_st CUmulticastObjectProp_v1 + + ctypedef CUmulticastObjectProp_v1 CUmulticastObjectProp + + cdef struct CUmemAccessDesc_st: + CUmemLocation location + CUmemAccess_flags flags + + ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1 + + ctypedef CUmemAccessDesc_v1 CUmemAccessDesc + + cdef enum CUgraphExecUpdateResult_enum: + CU_GRAPH_EXEC_UPDATE_SUCCESS = 0 + CU_GRAPH_EXEC_UPDATE_ERROR = 1 + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2 + CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3 + CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4 + CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5 + CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6 + CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 7 + CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8 + + ctypedef CUgraphExecUpdateResult_enum CUgraphExecUpdateResult + + cdef struct CUgraphExecUpdateResultInfo_st: + CUgraphExecUpdateResult result + CUgraphNode errorNode + CUgraphNode errorFromNode + + ctypedef CUgraphExecUpdateResultInfo_st CUgraphExecUpdateResultInfo_v1 + + ctypedef CUgraphExecUpdateResultInfo_v1 CUgraphExecUpdateResultInfo + + cdef enum CUmemPool_attribute_enum: + CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1 + CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2 + CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = 3 + CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = 4 + CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = 5 + CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = 6 + CU_MEMPOOL_ATTR_USED_MEM_CURRENT = 7 + CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8 + + ctypedef CUmemPool_attribute_enum CUmemPool_attribute + + cdef struct CUmemPoolProps_st: + CUmemAllocationType allocType + CUmemAllocationHandleType handleTypes + CUmemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char reserved[54] + + ctypedef CUmemPoolProps_st CUmemPoolProps_v1 + + ctypedef CUmemPoolProps_v1 CUmemPoolProps + + cdef struct CUmemPoolPtrExportData_st: + unsigned char reserved[64] + + ctypedef CUmemPoolPtrExportData_st CUmemPoolPtrExportData_v1 + + ctypedef CUmemPoolPtrExportData_v1 CUmemPoolPtrExportData + + cdef enum CUmemcpyFlags_enum: + CU_MEMCPY_FLAG_DEFAULT = 0 + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = 1 + + ctypedef CUmemcpyFlags_enum CUmemcpyFlags + + cdef enum CUmemcpySrcAccessOrder_enum: + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = 0 + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = 1 + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = 2 + CU_MEMCPY_SRC_ACCESS_ORDER_ANY = 3 + CU_MEMCPY_SRC_ACCESS_ORDER_MAX = 2147483647 + + ctypedef CUmemcpySrcAccessOrder_enum CUmemcpySrcAccessOrder + + cdef struct CUmemcpyAttributes_st: + CUmemcpySrcAccessOrder srcAccessOrder + CUmemLocation srcLocHint + CUmemLocation dstLocHint + unsigned int flags + + ctypedef CUmemcpyAttributes_st CUmemcpyAttributes_v1 + + ctypedef CUmemcpyAttributes_v1 CUmemcpyAttributes + + cdef enum CUmemcpy3DOperandType_enum: + CU_MEMCPY_OPERAND_TYPE_POINTER = 1 + CU_MEMCPY_OPERAND_TYPE_ARRAY = 2 + CU_MEMCPY_OPERAND_TYPE_MAX = 2147483647 + + ctypedef CUmemcpy3DOperandType_enum CUmemcpy3DOperandType + + cdef struct CUoffset3D_st: + size_t x + size_t y + size_t z + + ctypedef CUoffset3D_st CUoffset3D_v1 + + ctypedef CUoffset3D_v1 CUoffset3D + + cdef struct CUextent3D_st: + size_t width + size_t height + size_t depth + + ctypedef CUextent3D_st CUextent3D_v1 + + ctypedef CUextent3D_v1 CUextent3D + + cdef struct anon_struct23: + CUdeviceptr ptr + size_t rowLength + size_t layerHeight + CUmemLocation locHint + + cdef struct anon_struct24: + CUarray array + CUoffset3D offset + + cdef union anon_union12: + anon_struct23 ptr + anon_struct24 array + + cdef struct CUmemcpy3DOperand_st: + CUmemcpy3DOperandType type + anon_union12 op + + ctypedef CUmemcpy3DOperand_st CUmemcpy3DOperand_v1 + + ctypedef CUmemcpy3DOperand_v1 CUmemcpy3DOperand + + cdef struct CUDA_MEMCPY3D_BATCH_OP_st: + CUmemcpy3DOperand src + CUmemcpy3DOperand dst + CUextent3D extent + CUmemcpySrcAccessOrder srcAccessOrder + unsigned int flags + + ctypedef CUDA_MEMCPY3D_BATCH_OP_st CUDA_MEMCPY3D_BATCH_OP_v1 + + ctypedef CUDA_MEMCPY3D_BATCH_OP_v1 CUDA_MEMCPY3D_BATCH_OP + + cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + CUmemPoolProps poolProps + const CUmemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + CUdeviceptr dptr + + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v1_st CUDA_MEM_ALLOC_NODE_PARAMS_v1 + + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v1 CUDA_MEM_ALLOC_NODE_PARAMS + + cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + CUmemPoolProps poolProps + const CUmemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + CUdeviceptr dptr + + ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v2_st CUDA_MEM_ALLOC_NODE_PARAMS_v2 + + cdef struct CUDA_MEM_FREE_NODE_PARAMS_st: + CUdeviceptr dptr + + ctypedef CUDA_MEM_FREE_NODE_PARAMS_st CUDA_MEM_FREE_NODE_PARAMS + + cdef enum CUgraphMem_attribute_enum: + CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0 + CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1 + CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = 2 + CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3 + + ctypedef CUgraphMem_attribute_enum CUgraphMem_attribute + + cdef enum CUgraphChildGraphNodeOwnership_enum: + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE = 0 + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE = 1 + + ctypedef CUgraphChildGraphNodeOwnership_enum CUgraphChildGraphNodeOwnership + + cdef struct CUDA_CHILD_GRAPH_NODE_PARAMS_st: + CUgraph graph + CUgraphChildGraphNodeOwnership ownership + + ctypedef CUDA_CHILD_GRAPH_NODE_PARAMS_st CUDA_CHILD_GRAPH_NODE_PARAMS + + cdef struct CUDA_EVENT_RECORD_NODE_PARAMS_st: + CUevent event + + ctypedef CUDA_EVENT_RECORD_NODE_PARAMS_st CUDA_EVENT_RECORD_NODE_PARAMS + + cdef struct CUDA_EVENT_WAIT_NODE_PARAMS_st: + CUevent event + + ctypedef CUDA_EVENT_WAIT_NODE_PARAMS_st CUDA_EVENT_WAIT_NODE_PARAMS + + cdef struct CUgraphNodeParams_st: + CUgraphNodeType type + int reserved0[3] + long long reserved1[29] + CUDA_KERNEL_NODE_PARAMS_v3 kernel + CUDA_MEMCPY_NODE_PARAMS memcpy + CUDA_MEMSET_NODE_PARAMS_v2 memset + CUDA_HOST_NODE_PARAMS_v2 host + CUDA_CHILD_GRAPH_NODE_PARAMS graph + CUDA_EVENT_WAIT_NODE_PARAMS eventWait + CUDA_EVENT_RECORD_NODE_PARAMS eventRecord + CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 extSemSignal + CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 extSemWait + CUDA_MEM_ALLOC_NODE_PARAMS_v2 alloc + CUDA_MEM_FREE_NODE_PARAMS free + CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 memOp + CUDA_CONDITIONAL_NODE_PARAMS conditional + long long reserved2 + + ctypedef CUgraphNodeParams_st CUgraphNodeParams + + cdef enum CUflushGPUDirectRDMAWritesOptions_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1 + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2 + + ctypedef CUflushGPUDirectRDMAWritesOptions_enum CUflushGPUDirectRDMAWritesOptions + + cdef enum CUGPUDirectRDMAWritesOrdering_enum: + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0 + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 100 + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 200 + + ctypedef CUGPUDirectRDMAWritesOrdering_enum CUGPUDirectRDMAWritesOrdering + + cdef enum CUflushGPUDirectRDMAWritesScope_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 100 + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200 + + ctypedef CUflushGPUDirectRDMAWritesScope_enum CUflushGPUDirectRDMAWritesScope + + cdef enum CUflushGPUDirectRDMAWritesTarget_enum: + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0 + + ctypedef CUflushGPUDirectRDMAWritesTarget_enum CUflushGPUDirectRDMAWritesTarget + + cdef enum CUgraphDebugDot_flags_enum: + CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1 + CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2 + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = 4 + CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = 8 + CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = 16 + CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = 32 + CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = 64 + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = 128 + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = 256 + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = 512 + CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = 1024 + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = 2048 + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 4096 + CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = 8192 + CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO = 16384 + CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS = 32768 + + ctypedef CUgraphDebugDot_flags_enum CUgraphDebugDot_flags + + cdef enum CUuserObject_flags_enum: + CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1 + + ctypedef CUuserObject_flags_enum CUuserObject_flags + + cdef enum CUuserObjectRetain_flags_enum: + CU_GRAPH_USER_OBJECT_MOVE = 1 + + ctypedef CUuserObjectRetain_flags_enum CUuserObjectRetain_flags + + cdef enum CUgraphInstantiate_flags_enum: + CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1 + CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD = 2 + CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH = 4 + CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = 8 + + ctypedef CUgraphInstantiate_flags_enum CUgraphInstantiate_flags + + cdef enum CUdeviceNumaConfig_enum: + CU_DEVICE_NUMA_CONFIG_NONE = 0 + CU_DEVICE_NUMA_CONFIG_NUMA_NODE = 1 + + ctypedef CUdeviceNumaConfig_enum CUdeviceNumaConfig + + cdef enum CUprocessState_enum: + CU_PROCESS_STATE_RUNNING = 0 + CU_PROCESS_STATE_LOCKED = 1 + CU_PROCESS_STATE_CHECKPOINTED = 2 + CU_PROCESS_STATE_FAILED = 3 + + ctypedef CUprocessState_enum CUprocessState + + cdef struct CUcheckpointLockArgs_st: + unsigned int timeoutMs + unsigned int reserved0 + cuuint64_t reserved1[7] + + ctypedef CUcheckpointLockArgs_st CUcheckpointLockArgs + + cdef struct CUcheckpointCheckpointArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointCheckpointArgs_st CUcheckpointCheckpointArgs + + cdef struct CUcheckpointRestoreArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointRestoreArgs_st CUcheckpointRestoreArgs + + cdef struct CUcheckpointUnlockArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointUnlockArgs_st CUcheckpointUnlockArgs + + cdef enum CUmoduleLoadingMode_enum: + CU_MODULE_EAGER_LOADING = 1 + CU_MODULE_LAZY_LOADING = 2 + + ctypedef CUmoduleLoadingMode_enum CUmoduleLoadingMode + + cdef enum CUmemDecompressAlgorithm_enum: + CU_MEM_DECOMPRESS_UNSUPPORTED = 0 + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = 1 + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = 2 + CU_MEM_DECOMPRESS_ALGORITHM_LZ4 = 4 + + ctypedef CUmemDecompressAlgorithm_enum CUmemDecompressAlgorithm + + cdef struct CUmemDecompressParams_st: + size_t srcNumBytes + size_t dstNumBytes + cuuint32_t* dstActBytes + const void* src + void* dst + CUmemDecompressAlgorithm algo + unsigned char padding[20] + + ctypedef CUmemDecompressParams_st CUmemDecompressParams + + cdef enum CUfunctionLoadingState_enum: + CU_FUNCTION_LOADING_STATE_UNLOADED = 0 + CU_FUNCTION_LOADING_STATE_LOADED = 1 + CU_FUNCTION_LOADING_STATE_MAX = 2 + + ctypedef CUfunctionLoadingState_enum CUfunctionLoadingState + + cdef enum CUcoredumpSettings_enum: + CU_COREDUMP_ENABLE_ON_EXCEPTION = 1 + CU_COREDUMP_TRIGGER_HOST = 2 + CU_COREDUMP_LIGHTWEIGHT = 3 + CU_COREDUMP_ENABLE_USER_TRIGGER = 4 + CU_COREDUMP_FILE = 5 + CU_COREDUMP_PIPE = 6 + CU_COREDUMP_GENERATION_FLAGS = 7 + CU_COREDUMP_MAX = 8 + + ctypedef CUcoredumpSettings_enum CUcoredumpSettings + + cdef enum CUCoredumpGenerationFlags: + CU_COREDUMP_DEFAULT_FLAGS = 0 + CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES = 1 + CU_COREDUMP_SKIP_GLOBAL_MEMORY = 2 + CU_COREDUMP_SKIP_SHARED_MEMORY = 4 + CU_COREDUMP_SKIP_LOCAL_MEMORY = 8 + CU_COREDUMP_SKIP_ABORT = 16 + CU_COREDUMP_SKIP_CONSTBANK_MEMORY = 32 + CU_COREDUMP_LIGHTWEIGHT_FLAGS = 47 + + cdef struct CUdevResourceDesc_st: + pass + ctypedef CUdevResourceDesc_st* CUdevResourceDesc + + ctypedef enum CUgreenCtxCreate_flags: + CU_GREEN_CTX_DEFAULT_STREAM = 1 + + ctypedef enum CUdevSmResourceSplit_flags: + CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING = 1 + CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE = 2 + + ctypedef enum CUdevResourceType: + CU_DEV_RESOURCE_TYPE_INVALID = 0 + CU_DEV_RESOURCE_TYPE_SM = 1 + + cdef struct CUdevSmResource_st: + unsigned int smCount + + ctypedef CUdevSmResource_st CUdevSmResource + + cdef struct CUdevResource_st: + CUdevResourceType type + unsigned char _internal_padding[92] + CUdevSmResource sm + unsigned char _oversize[48] + + ctypedef CUdevResource_st CUdevResource_v1 + + ctypedef CUdevResource_v1 CUdevResource + + cdef enum CUlogLevel_enum: + CU_LOG_LEVEL_ERROR = 0 + CU_LOG_LEVEL_WARNING = 1 + + ctypedef CUlogLevel_enum CUlogLevel + + cdef struct CUlogsCallbackEntry_st: + pass + ctypedef CUlogsCallbackEntry_st* CUlogsCallbackHandle + + ctypedef void (*CUlogsCallback)(void* data, CUlogLevel logLevel, char* message, size_t length) + + ctypedef unsigned int CUlogIterator + +cdef extern from "cudaProfiler.h": + + cdef enum CUoutput_mode_enum: + CU_OUT_KEY_VALUE_PAIR = 0 + CU_OUT_CSV = 1 + + ctypedef CUoutput_mode_enum CUoutput_mode + +cdef enum CUeglFrameType_enum: + CU_EGL_FRAME_TYPE_ARRAY = 0 + CU_EGL_FRAME_TYPE_PITCH = 1 + +ctypedef CUeglFrameType_enum CUeglFrameType + +cdef enum CUeglResourceLocationFlags_enum: + CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + +ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + +cdef enum CUeglColorFormat_enum: + CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 + CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2 + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3 + CU_EGL_COLOR_FORMAT_RGB = 4 + CU_EGL_COLOR_FORMAT_BGR = 5 + CU_EGL_COLOR_FORMAT_ARGB = 6 + CU_EGL_COLOR_FORMAT_RGBA = 7 + CU_EGL_COLOR_FORMAT_L = 8 + CU_EGL_COLOR_FORMAT_R = 9 + CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10 + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11 + CU_EGL_COLOR_FORMAT_YUYV_422 = 12 + CU_EGL_COLOR_FORMAT_UYVY_422 = 13 + CU_EGL_COLOR_FORMAT_ABGR = 14 + CU_EGL_COLOR_FORMAT_BGRA = 15 + CU_EGL_COLOR_FORMAT_A = 16 + CU_EGL_COLOR_FORMAT_RG = 17 + CU_EGL_COLOR_FORMAT_AYUV = 18 + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19 + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21 + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23 + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24 + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25 + CU_EGL_COLOR_FORMAT_VYUY_ER = 26 + CU_EGL_COLOR_FORMAT_UYVY_ER = 27 + CU_EGL_COLOR_FORMAT_YUYV_ER = 28 + CU_EGL_COLOR_FORMAT_YVYU_ER = 29 + CU_EGL_COLOR_FORMAT_YUV_ER = 30 + CU_EGL_COLOR_FORMAT_YUVA_ER = 31 + CU_EGL_COLOR_FORMAT_AYUV_ER = 32 + CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33 + CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35 + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36 + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38 + CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39 + CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41 + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42 + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44 + CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45 + CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46 + CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47 + CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48 + CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49 + CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50 + CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51 + CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52 + CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53 + CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54 + CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55 + CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56 + CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57 + CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58 + CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59 + CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60 + CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61 + CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62 + CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63 + CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64 + CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65 + CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67 + CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68 + CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69 + CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70 + CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71 + CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72 + CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73 + CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74 + CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75 + CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76 + CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77 + CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78 + CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79 + CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80 + CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81 + CU_EGL_COLOR_FORMAT_Y = 82 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86 + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87 + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88 + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89 + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92 + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93 + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94 + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95 + CU_EGL_COLOR_FORMAT_Y_ER = 96 + CU_EGL_COLOR_FORMAT_Y_709_ER = 97 + CU_EGL_COLOR_FORMAT_Y10_ER = 98 + CU_EGL_COLOR_FORMAT_Y10_709_ER = 99 + CU_EGL_COLOR_FORMAT_Y12_ER = 100 + CU_EGL_COLOR_FORMAT_Y12_709_ER = 101 + CU_EGL_COLOR_FORMAT_YUVA = 102 + CU_EGL_COLOR_FORMAT_YUV = 103 + CU_EGL_COLOR_FORMAT_YVYU = 104 + CU_EGL_COLOR_FORMAT_VYUY = 105 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 106 + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 107 + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 108 + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 109 + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 110 + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 111 + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 112 + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 113 + CU_EGL_COLOR_FORMAT_UYVY_709 = 114 + CU_EGL_COLOR_FORMAT_UYVY_709_ER = 115 + CU_EGL_COLOR_FORMAT_UYVY_2020 = 116 + CU_EGL_COLOR_FORMAT_MAX = 117 + +ctypedef CUeglColorFormat_enum CUeglColorFormat + +cdef union anon_union15: + CUarray pArray[3] + void* pPitch[3] + +cdef struct CUeglFrame_st: + anon_union15 frame + unsigned int width + unsigned int height + unsigned int depth + unsigned int pitch + unsigned int planeCount + unsigned int numChannels + CUeglFrameType frameType + CUeglColorFormat eglColorFormat + CUarray_format cuFormat + +ctypedef CUeglFrame_st CUeglFrame_v1 + +ctypedef CUeglFrame_v1 CUeglFrame + +cdef extern from "": + cdef struct CUeglStreamConnection_st: + pass +ctypedef CUeglStreamConnection_st* CUeglStreamConnection + +cdef enum CUGLDeviceList_enum: + CU_GL_DEVICE_LIST_ALL = 1 + CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 + CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + +ctypedef CUGLDeviceList_enum CUGLDeviceList + +cdef enum CUGLmap_flags_enum: + CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 + CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + +ctypedef CUGLmap_flags_enum CUGLmap_flags + +ctypedef unsigned int GLenum + +ctypedef unsigned int GLuint + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLImageKHR + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLStreamKHR + +ctypedef unsigned int EGLint + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLSyncKHR + +ctypedef uint32_t VdpDevice + +ctypedef unsigned long long VdpGetProcAddress + +ctypedef uint32_t VdpVideoSurface + +ctypedef uint32_t VdpOutputSurface + +cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + +cdef enum: CUDA_VERSION = 12090 + +cdef enum: CU_IPC_HANDLE_SIZE = 64 + +cdef enum: CU_STREAM_LEGACY = 1 + +cdef enum: CU_STREAM_PER_THREAD = 2 + +cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + +cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + +cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + +cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + +cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + +cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + +cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + +cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + +cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + +cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + +cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + +cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + +cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + +cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + +cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + +cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + +cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + +cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + +cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + +cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + +cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + +cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + +cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + +cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + +cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + +cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + +cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + +cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + +cdef enum: CUDA_ARRAY3D_LAYERED = 1 + +cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + +cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + +cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + +cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + +cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + +cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + +cdef enum: CUDA_ARRAY3D_SPARSE = 64 + +cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + +cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + +cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + +cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + +cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + +cdef enum: CU_TRSF_SRGB = 16 + +cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + +cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + +cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + +cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + +cdef enum: CU_LAUNCH_PARAM_END = 0 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + +cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + +cdef enum: CU_PARAM_TR_DEFAULT = -1 + +cdef enum: CU_DEVICE_CPU = -1 + +cdef enum: CU_DEVICE_INVALID = -2 + +cdef enum: RESOURCE_ABI_VERSION = 1 + +cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + +cdef enum: MAX_PLANES = 3 + +cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 \ No newline at end of file diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pyx new file mode 100644 index 0000000000000000000000000000000000000000..66100a260300926b3c3ed30fe108b812b75b805e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cydriver.pyx @@ -0,0 +1,1424 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings._bindings.cydriver as cydriver + +cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGetErrorString(error, pStr) + +cdef CUresult cuGetErrorName(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGetErrorName(error, pStr) + +cdef CUresult cuInit(unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuInit(Flags) + +cdef CUresult cuDriverGetVersion(int* driverVersion) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDriverGetVersion(driverVersion) + +cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGet(device, ordinal) + +cdef CUresult cuDeviceGetCount(int* count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetCount(count) + +cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetName(name, length, dev) + +cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetUuid(uuid, dev) + +cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetUuid_v2(uuid, dev) + +cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetLuid(luid, deviceNodeMask, dev) + +cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceTotalMem_v2(numbytes, dev) + +cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev) + +cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetAttribute(pi, attrib, dev) + +cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags) + +cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceSetMemPool(dev, pool) + +cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetMemPool(pool, dev) + +cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetDefaultMemPool(pool_out, dev) + +cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetExecAffinitySupport(pi, typename, dev) + +cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFlushGPUDirectRDMAWrites(target, scope) + +cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetProperties(prop, dev) + +cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceComputeCapability(major, minor, dev) + +cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevicePrimaryCtxRetain(pctx, dev) + +cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevicePrimaryCtxRelease_v2(dev) + +cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevicePrimaryCtxSetFlags_v2(dev, flags) + +cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevicePrimaryCtxGetState(dev, flags, active) + +cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevicePrimaryCtxReset_v2(dev) + +cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxCreate_v2(pctx, flags, dev) + +cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev) + +cdef CUresult cuCtxCreate_v4(CUcontext* pctx, CUctxCreateParams* ctxCreateParams, unsigned int flags, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxCreate_v4(pctx, ctxCreateParams, flags, dev) + +cdef CUresult cuCtxDestroy(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxDestroy_v2(ctx) + +cdef CUresult cuCtxPushCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxPushCurrent_v2(ctx) + +cdef CUresult cuCtxPopCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxPopCurrent_v2(pctx) + +cdef CUresult cuCtxSetCurrent(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSetCurrent(ctx) + +cdef CUresult cuCtxGetCurrent(CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetCurrent(pctx) + +cdef CUresult cuCtxGetDevice(CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetDevice(device) + +cdef CUresult cuCtxGetFlags(unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetFlags(flags) + +cdef CUresult cuCtxSetFlags(unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSetFlags(flags) + +cdef CUresult cuCtxGetId(CUcontext ctx, unsigned long long* ctxId) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetId(ctx, ctxId) + +cdef CUresult cuCtxSynchronize() except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSynchronize() + +cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSetLimit(limit, value) + +cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetLimit(pvalue, limit) + +cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetCacheConfig(pconfig) + +cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSetCacheConfig(config) + +cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetApiVersion(ctx, version) + +cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority) + +cdef CUresult cuCtxResetPersistingL2Cache() except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxResetPersistingL2Cache() + +cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetExecAffinity(pExecAffinity, typename) + +cdef CUresult cuCtxRecordEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxRecordEvent(hCtx, hEvent) + +cdef CUresult cuCtxWaitEvent(CUcontext hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxWaitEvent(hCtx, hEvent) + +cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxAttach(pctx, flags) + +cdef CUresult cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxDetach(ctx) + +cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetSharedMemConfig(pConfig) + +cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxSetSharedMemConfig(config) + +cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleLoad(module, fname) + +cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleLoadData(module, image) + +cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleLoadDataEx(module, image, numOptions, options, optionValues) + +cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleLoadFatBinary(module, fatCubin) + +cdef CUresult cuModuleUnload(CUmodule hmod) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleUnload(hmod) + +cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetLoadingMode(mode) + +cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetFunction(hfunc, hmod, name) + +cdef CUresult cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetFunctionCount(count, mod) + +cdef CUresult cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleEnumerateFunctions(functions, numFunctions, mod) + +cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name) + +cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLinkCreate_v2(numOptions, options, optionValues, stateOut) + +cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues) + +cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues) + +cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLinkComplete(state, cubinOut, sizeOut) + +cdef CUresult cuLinkDestroy(CUlinkState state) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLinkDestroy(state) + +cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetTexRef(pTexRef, hmod, name) + +cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuModuleGetSurfRef(pSurfRef, hmod, name) + +cdef CUresult cuLibraryLoadData(CUlibrary* library, const void* code, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef CUresult cuLibraryLoadFromFile(CUlibrary* library, const char* fileName, CUjit_option* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, CUlibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef CUresult cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryUnload(library) + +cdef CUresult cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetKernel(pKernel, library, name) + +cdef CUresult cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetKernelCount(count, lib) + +cdef CUresult cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + +cdef CUresult cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetModule(pMod, library) + +cdef CUresult cuKernelGetFunction(CUfunction* pFunc, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelGetFunction(pFunc, kernel) + +cdef CUresult cuKernelGetLibrary(CUlibrary* pLib, CUkernel kernel) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelGetLibrary(pLib, kernel) + +cdef CUresult cuLibraryGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + +cdef CUresult cuLibraryGetManaged(CUdeviceptr* dptr, size_t* numbytes, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + +cdef CUresult cuLibraryGetUnifiedFunction(void** fptr, CUlibrary library, const char* symbol) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + +cdef CUresult cuKernelGetAttribute(int* pi, CUfunction_attribute attrib, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelGetAttribute(pi, attrib, kernel, dev) + +cdef CUresult cuKernelSetAttribute(CUfunction_attribute attrib, int val, CUkernel kernel, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelSetAttribute(attrib, val, kernel, dev) + +cdef CUresult cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelSetCacheConfig(kernel, config, dev) + +cdef CUresult cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelGetName(name, hfunc) + +cdef CUresult cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuKernelGetParamInfo(kernel, paramIndex, paramOffset, paramSize) + +cdef CUresult cuMemGetInfo(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetInfo_v2(free, total) + +cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAlloc_v2(dptr, bytesize) + +cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes) + +cdef CUresult cuMemFree(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemFree_v2(dptr) + +cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetAddressRange_v2(pbase, psize, dptr) + +cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAllocHost_v2(pp, bytesize) + +cdef CUresult cuMemFreeHost(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemFreeHost(p) + +cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemHostAlloc(pp, bytesize, Flags) + +cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemHostGetDevicePointer_v2(pdptr, p, Flags) + +cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemHostGetFlags(pFlags, p) + +cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAllocManaged(dptr, bytesize, flags) + +cdef CUresult cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + +cdef CUresult cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceUnregisterAsyncNotification(device, callback) + +cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetByPCIBusId(dev, pciBusId) + +cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetPCIBusId(pciBusId, length, dev) + +cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuIpcGetEventHandle(pHandle, event) + +cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuIpcOpenEventHandle(phEvent, handle) + +cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuIpcGetMemHandle(pHandle, dptr) + +cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuIpcOpenMemHandle_v2(pdptr, handle, Flags) + +cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuIpcCloseMemHandle(dptr) + +cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemHostRegister_v2(p, bytesize, Flags) + +cdef CUresult cuMemHostUnregister(void* p) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemHostUnregister(p) + +cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy(dst, src, ByteCount) + +cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount) + +cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount) + +cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount) + +cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount) + +cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount) + +cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount) + +cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount) + +cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount) + +cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount) + +cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy2D_v2(pCopy) + +cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy2DUnaligned_v2(pCopy) + +cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3D_v2(pCopy) + +cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3DPeer(pCopy) + +cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyAsync(dst, src, ByteCount, hStream) + +cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream) + +cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream) + +cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream) + +cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream) + +cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream) + +cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream) + +cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy2DAsync_v2(pCopy, hStream) + +cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3DAsync_v2(pCopy, hStream) + +cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) + +cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + +cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) + +cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD8_v2(dstDevice, uc, N) + +cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD16_v2(dstDevice, us, N) + +cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD32_v2(dstDevice, ui, N) + +cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height) + +cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height) + +cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height) + +cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD8Async(dstDevice, uc, N, hStream) + +cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD16Async(dstDevice, us, N, hStream) + +cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD32Async(dstDevice, ui, N, hStream) + +cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream) + +cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream) + +cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream) + +cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayCreate_v2(pHandle, pAllocateArray) + +cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray) + +cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayGetSparseProperties(sparseProperties, array) + +cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + +cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayGetMemoryRequirements(memoryRequirements, array, device) + +cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + +cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayGetPlane(pPlaneArray, hArray, planeIdx) + +cdef CUresult cuArrayDestroy(CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArrayDestroy(hArray) + +cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArray3DCreate_v2(pHandle, pAllocateArray) + +cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray) + +cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels) + +cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level) + +cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMipmappedArrayDestroy(hMipmappedArray) + +cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) + +cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) + +cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAddressReserve(ptr, size, alignment, addr, flags) + +cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAddressFree(ptr, size) + +cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemCreate(handle, size, prop, flags) + +cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemRelease(handle) + +cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemMap(ptr, size, offset, handle, flags) + +cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemMapArrayAsync(mapInfoList, count, hStream) + +cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemUnmap(ptr, size) + +cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemSetAccess(ptr, size, desc, count) + +cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetAccess(flags, location, ptr) + +cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags) + +cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemImportFromShareableHandle(handle, osHandle, shHandleType) + +cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetAllocationGranularity(granularity, prop, option) + +cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemGetAllocationPropertiesFromHandle(prop, handle) + +cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemRetainAllocationHandle(handle, addr) + +cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemFreeAsync(dptr, hStream) + +cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAllocAsync(dptr, bytesize, hStream) + +cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolTrimTo(pool, minBytesToKeep) + +cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolSetAttribute(pool, attr, value) + +cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolGetAttribute(pool, attr, value) + +cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolSetAccess(pool, map, count) + +cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolGetAccess(flags, memPool, location) + +cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolCreate(pool, poolProps) + +cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolDestroy(pool) + +cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream) + +cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags) + +cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags) + +cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolExportPointer(shareData_out, ptr) + +cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPoolImportPointer(ptr_out, pool, shareData) + +cdef CUresult cuMulticastCreate(CUmemGenericAllocationHandle* mcHandle, const CUmulticastObjectProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastCreate(mcHandle, prop) + +cdef CUresult cuMulticastAddDevice(CUmemGenericAllocationHandle mcHandle, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastAddDevice(mcHandle, dev) + +cdef CUresult cuMulticastBindMem(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUmemGenericAllocationHandle memHandle, size_t memOffset, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastBindMem(mcHandle, mcOffset, memHandle, memOffset, size, flags) + +cdef CUresult cuMulticastBindAddr(CUmemGenericAllocationHandle mcHandle, size_t mcOffset, CUdeviceptr memptr, size_t size, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastBindAddr(mcHandle, mcOffset, memptr, size, flags) + +cdef CUresult cuMulticastUnbind(CUmemGenericAllocationHandle mcHandle, CUdevice dev, size_t mcOffset, size_t size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastUnbind(mcHandle, dev, mcOffset, size) + +cdef CUresult cuMulticastGetGranularity(size_t* granularity, const CUmulticastObjectProp* prop, CUmulticastGranularity_flags option) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMulticastGetGranularity(granularity, prop, option) + +cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuPointerGetAttribute(data, attribute, ptr) + +cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream) + +cdef CUresult cuMemPrefetchAsync_v2(CUdeviceptr devPtr, size_t count, CUmemLocation location, unsigned int flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemPrefetchAsync_v2(devPtr, count, location, flags, hStream) + +cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAdvise(devPtr, count, advice, device) + +cdef CUresult cuMemAdvise_v2(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUmemLocation location) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemAdvise_v2(devPtr, count, advice, location) + +cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + +cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + +cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuPointerSetAttribute(value, attribute, ptr) + +cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuPointerGetAttributes(numAttributes, attributes, data, ptr) + +cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamCreate(phStream, Flags) + +cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamCreateWithPriority(phStream, flags, priority) + +cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetPriority(hStream, priority) + +cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetDevice(hStream, device) + +cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetFlags(hStream, flags) + +cdef CUresult cuStreamGetId(CUstream hStream, unsigned long long* streamId) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetId(hStream, streamId) + +cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetCtx(hStream, pctx) + +cdef CUresult cuStreamGetCtx_v2(CUstream hStream, CUcontext* pCtx, CUgreenCtx* pGreenCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetCtx_v2(hStream, pCtx, pGreenCtx) + +cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamWaitEvent(hStream, hEvent, Flags) + +cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamAddCallback(hStream, callback, userData, flags) + +cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamBeginCapture_v2(hStream, mode) + +cdef CUresult cuStreamBeginCaptureToGraph(CUstream hStream, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUstreamCaptureMode mode) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies, dependencyData, numDependencies, mode) + +cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuThreadExchangeStreamCaptureMode(mode) + +cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamEndCapture(hStream, phGraph) + +cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamIsCapturing(hStream, captureStatus) + +cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + +cdef CUresult cuStreamGetCaptureInfo_v3(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, const CUgraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetCaptureInfo_v3(hStream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + +cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags) + +cdef CUresult cuStreamUpdateCaptureDependencies_v2(CUstream hStream, CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamUpdateCaptureDependencies_v2(hStream, dependencies, dependencyData, numDependencies, flags) + +cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamAttachMemAsync(hStream, dptr, length, flags) + +cdef CUresult cuStreamQuery(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamQuery(hStream) + +cdef CUresult cuStreamSynchronize(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamSynchronize(hStream) + +cdef CUresult cuStreamDestroy(CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamDestroy_v2(hStream) + +cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamCopyAttributes(dst, src) + +cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetAttribute(hStream, attr, value_out) + +cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamSetAttribute(hStream, attr, value) + +cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventCreate(phEvent, Flags) + +cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventRecord(hEvent, hStream) + +cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventRecordWithFlags(hEvent, hStream, flags) + +cdef CUresult cuEventQuery(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventQuery(hEvent) + +cdef CUresult cuEventSynchronize(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventSynchronize(hEvent) + +cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventDestroy_v2(hEvent) + +cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) + +cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) + +cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuImportExternalMemory(extMem_out, memHandleDesc) + +cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + +cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + +cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDestroyExternalMemory(extMem) + +cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuImportExternalSemaphore(extSem_out, semHandleDesc) + +cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + +cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream) + +cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDestroyExternalSemaphore(extSem) + +cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamWaitValue32_v2(stream, addr, value, flags) + +cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamWaitValue64_v2(stream, addr, value, flags) + +cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamWriteValue32_v2(stream, addr, value, flags) + +cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamWriteValue64_v2(stream, addr, value, flags) + +cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamBatchMemOp_v2(stream, count, paramArray, flags) + +cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncGetAttribute(pi, attrib, hfunc) + +cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncSetAttribute(hfunc, attrib, value) + +cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncSetCacheConfig(hfunc, config) + +cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncGetModule(hmod, hfunc) + +cdef CUresult cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncGetName(name, hfunc) + +cdef CUresult cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncGetParamInfo(func, paramIndex, paramOffset, paramSize) + +cdef CUresult cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncIsLoaded(state, function) + +cdef CUresult cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncLoad(function) + +cdef CUresult cuLaunchKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra) + +cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchKernelEx(config, f, kernelParams, extra) + +cdef CUresult cuLaunchCooperativeKernel(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) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams) + +cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags) + +cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchHostFunc(hStream, fn, userData) + +cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncSetBlockShape(hfunc, x, y, z) + +cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncSetSharedSize(hfunc, numbytes) + +cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuParamSetSize(hfunc, numbytes) + +cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuParamSeti(hfunc, offset, value) + +cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuParamSetf(hfunc, offset, value) + +cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuParamSetv(hfunc, offset, ptr, numbytes) + +cdef CUresult cuLaunch(CUfunction f) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunch(f) + +cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchGrid(f, grid_width, grid_height) + +cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLaunchGridAsync(f, grid_width, grid_height, hStream) + +cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuParamSetTexRef(hfunc, texunit, hTexRef) + +cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuFuncSetSharedMemConfig(hfunc, config) + +cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphCreate(phGraph, flags) + +cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddKernelNode_v2(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphKernelNodeGetParams_v2(hNode, nodeParams) + +cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphKernelNodeSetParams_v2(hNode, nodeParams) + +cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx) + +cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemcpyNodeGetParams(hNode, nodeParams) + +cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemcpyNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx) + +cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemsetNodeGetParams(hNode, nodeParams) + +cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemsetNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphHostNodeGetParams(hNode, nodeParams) + +cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphHostNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph) + +cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphChildGraphNodeGetGraph(hNode, phGraph) + +cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies) + +cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event) + +cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphEventRecordNodeGetEvent(hNode, event_out) + +cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphEventRecordNodeSetEvent(hNode, event) + +cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event) + +cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphEventWaitNodeGetEvent(hNode, event_out) + +cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphEventWaitNodeSetEvent(hNode, event) + +cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + +cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + +cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out) + +cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemAllocNodeGetParams(hNode, params_out) + +cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr) + +cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphMemFreeNodeGetParams(hNode, dptr_out) + +cdef CUresult cuDeviceGraphMemTrim(CUdevice device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGraphMemTrim(device) + +cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetGraphMemAttribute(device, attr, value) + +cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceSetGraphMemAttribute(device, attr, value) + +cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphClone(phGraphClone, originalGraph) + +cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph) + +cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetType(hNode, typename) + +cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphGetNodes(hGraph, nodes, numNodes) + +cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes) + +cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphGetEdges(hGraph, from_, to, numEdges) + +cdef CUresult cuGraphGetEdges_v2(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, CUgraphEdgeData* edgeData, size_t* numEdges) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphGetEdges_v2(hGraph, from_, to, edgeData, numEdges) + +cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies) + +cdef CUresult cuGraphNodeGetDependencies_v2(CUgraphNode hNode, CUgraphNode* dependencies, CUgraphEdgeData* edgeData, size_t* numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetDependencies_v2(hNode, dependencies, edgeData, numDependencies) + +cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes) + +cdef CUresult cuGraphNodeGetDependentNodes_v2(CUgraphNode hNode, CUgraphNode* dependentNodes, CUgraphEdgeData* edgeData, size_t* numDependentNodes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetDependentNodes_v2(hNode, dependentNodes, edgeData, numDependentNodes) + +cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddDependencies(hGraph, from_, to, numDependencies) + +cdef CUresult cuGraphAddDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + +cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies) + +cdef CUresult cuGraphRemoveDependencies_v2(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, const CUgraphEdgeData* edgeData, size_t numDependencies) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphRemoveDependencies_v2(hGraph, from_, to, edgeData, numDependencies) + +cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphDestroyNode(hNode) + +cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags) + +cdef CUresult cuGraphInstantiateWithParams(CUgraphExec* phGraphExec, CUgraph hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS* instantiateParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphInstantiateWithParams(phGraphExec, hGraph, instantiateParams) + +cdef CUresult cuGraphExecGetFlags(CUgraphExec hGraphExec, cuuint64_t* flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecGetFlags(hGraphExec, flags) + +cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecKernelNodeSetParams_v2(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx) + +cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx) + +cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph) + +cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + +cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + +cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + +cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + +cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphUpload(hGraphExec, hStream) + +cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphLaunch(hGraphExec, hStream) + +cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecDestroy(hGraphExec) + +cdef CUresult cuGraphDestroy(CUgraph hGraph) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphDestroy(hGraph) + +cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphExecUpdateResultInfo* resultInfo) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecUpdate_v2(hGraphExec, hGraph, resultInfo) + +cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphKernelNodeCopyAttributes(dst, src) + +cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphKernelNodeGetAttribute(hNode, attr, value_out) + +cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphKernelNodeSetAttribute(hNode, attr, value) + +cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphDebugDotPrint(hGraph, path, flags) + +cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + +cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuUserObjectRetain(object, count) + +cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuUserObjectRelease(object, count) + +cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphRetainUserObject(graph, object, count, flags) + +cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphReleaseUserObject(graph, object, count) + +cdef CUresult cuGraphAddNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams) + +cdef CUresult cuGraphAddNode_v2(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphAddNode_v2(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + +cdef CUresult cuGraphNodeSetParams(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphNodeSetParams(hNode, nodeParams) + +cdef CUresult cuGraphExecNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef CUresult cuGraphConditionalHandleCreate(CUgraphConditionalHandle* pHandle_out, CUgraph hGraph, CUcontext ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphConditionalHandleCreate(pHandle_out, hGraph, ctx, defaultLaunchValue, flags) + +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + +cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + +cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + +cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + +cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + +cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config) + +cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuOccupancyMaxActiveClusters(numClusters, func, config) + +cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetArray(hTexRef, hArray, Flags) + +cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags) + +cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes) + +cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch) + +cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents) + +cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetAddressMode(hTexRef, dim, am) + +cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetFilterMode(hTexRef, fm) + +cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetMipmapFilterMode(hTexRef, fm) + +cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetMipmapLevelBias(hTexRef, bias) + +cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + +cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso) + +cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetBorderColor(hTexRef, pBorderColor) + +cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefSetFlags(hTexRef, Flags) + +cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetAddress_v2(pdptr, hTexRef) + +cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetArray(phArray, hTexRef) + +cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef) + +cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetAddressMode(pam, hTexRef, dim) + +cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetFilterMode(pfm, hTexRef) + +cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef) + +cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetMipmapFilterMode(pfm, hTexRef) + +cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetMipmapLevelBias(pbias, hTexRef) + +cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef) + +cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef) + +cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetBorderColor(pBorderColor, hTexRef) + +cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefGetFlags(pFlags, hTexRef) + +cdef CUresult cuTexRefCreate(CUtexref* pTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefCreate(pTexRef) + +cdef CUresult cuTexRefDestroy(CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexRefDestroy(hTexRef) + +cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSurfRefSetArray(hSurfRef, hArray, Flags) + +cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSurfRefGetArray(phArray, hSurfRef) + +cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc) + +cdef CUresult cuTexObjectDestroy(CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexObjectDestroy(texObject) + +cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexObjectGetResourceDesc(pResDesc, texObject) + +cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexObjectGetTextureDesc(pTexDesc, texObject) + +cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject) + +cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSurfObjectCreate(pSurfObject, pResDesc) + +cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSurfObjectDestroy(surfObject) + +cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuSurfObjectGetResourceDesc(pResDesc, surfObject) + +cdef CUresult cuTensorMapEncodeTiled(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) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTensorMapEncodeTiled(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, boxDim, elementStrides, interleave, swizzle, l2Promotion, oobFill) + +cdef CUresult cuTensorMapEncodeIm2col(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) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) + +cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + +cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTensorMapReplaceAddress(tensorMap, globalAddress) + +cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev) + +cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxEnablePeerAccess(peerContext, Flags) + +cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxDisablePeerAccess(peerContext) + +cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice) + +cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsUnregisterResource(resource) + +cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel) + +cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource) + +cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource) + +cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsResourceSetMapFlags_v2(resource, flags) + +cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsMapResources(count, resources, hStream) + +cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsUnmapResources(count, resources, hStream) + +cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags, CUdriverProcAddressQueryResult* symbolStatus) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGetProcAddress_v2(symbol, pfn, cudaVersion, flags, symbolStatus) + +cdef CUresult cuCoredumpGetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCoredumpGetAttribute(attrib, value, size) + +cdef CUresult cuCoredumpGetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCoredumpGetAttributeGlobal(attrib, value, size) + +cdef CUresult cuCoredumpSetAttribute(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCoredumpSetAttribute(attrib, value, size) + +cdef CUresult cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* value, size_t* size) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCoredumpSetAttributeGlobal(attrib, value, size) + +cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGetExportTable(ppExportTable, pExportTableId) + +cdef CUresult cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxCreate(phCtx, desc, dev, flags) + +cdef CUresult cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxDestroy(hCtx) + +cdef CUresult cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxFromGreenCtx(pContext, hCtx) + +cdef CUresult cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDeviceGetDevResource(device, resource, typename) + +cdef CUresult cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCtxGetDevResource(hCtx, resource, typename) + +cdef CUresult cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxGetDevResource(hCtx, resource, typename) + +cdef CUresult cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevSmResourceSplitByCount(result, nbGroups, input, remaining, useFlags, minCount) + +cdef CUresult cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuDevResourceGenerateDesc(phDesc, resources, nbResources) + +cdef CUresult cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxRecordEvent(hCtx, hEvent) + +cdef CUresult cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxWaitEvent(hCtx, hEvent) + +cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetGreenCtx(hStream, phCtx) + +cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) + +cdef CUresult cuLogsRegisterCallback(CUlogsCallback callbackFunc, void* userData, CUlogsCallbackHandle* callback_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLogsRegisterCallback(callbackFunc, userData, callback_out) + +cdef CUresult cuLogsUnregisterCallback(CUlogsCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLogsUnregisterCallback(callback) + +cdef CUresult cuLogsCurrent(CUlogIterator* iterator_out, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLogsCurrent(iterator_out, flags) + +cdef CUresult cuLogsDumpToFile(CUlogIterator* iterator, const char* pathToFile, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLogsDumpToFile(iterator, pathToFile, flags) + +cdef CUresult cuLogsDumpToMemory(CUlogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuLogsDumpToMemory(iterator, buffer, size, flags) + +cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) + +cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessGetState(pid, state) + +cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessLock(pid, args) + +cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessCheckpoint(pid, args) + +cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessRestore(pid, args) + +cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessUnlock(pid, args) + +cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuProfilerStart() + +cdef CUresult cuProfilerStop() except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuProfilerStop() + +cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsEGLRegisterImage(pCudaResource, image, flags) + +cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamConsumerConnect(conn, stream) + +cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags) + +cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamConsumerDisconnect(conn) + +cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + +cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + +cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamProducerConnect(conn, stream, width, height) + +cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamProducerDisconnect(conn) + +cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream) + +cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream) + +cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + +cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventCreateFromEGLSync(phEvent, eglSync, flags) + +cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags) + +cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags) + +cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + +cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress) + +cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress) + +cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags) + +cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpp new file mode 100644 index 0000000000000000000000000000000000000000..476219deb6172e7aeed1d06d1590cd79146303c4 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpp @@ -0,0 +1,5541 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cynvjitlink", + "sources": [ + "cuda/bindings/cynvjitlink.pyx" + ] + }, + "module_name": "cuda.bindings.cynvjitlink" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cynvjitlink +#define __PYX_HAVE_API__cuda__bindings__cynvjitlink +/* Early includes */ +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cynvjitlink.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cuda/bindings/cynvjitlink.pxd":15 + * + * # enums + * ctypedef enum nvJitLinkResult "nvJitLinkResult": # <<<<<<<<<<<<<< + * NVJITLINK_SUCCESS "NVJITLINK_SUCCESS" = 0 + * NVJITLINK_ERROR_UNRECOGNIZED_OPTION "NVJITLINK_ERROR_UNRECOGNIZED_OPTION" +*/ +enum nvJitLinkResult { + NVJITLINK_SUCCESS = 0, + NVJITLINK_ERROR_UNRECOGNIZED_OPTION, + NVJITLINK_ERROR_MISSING_ARCH, + NVJITLINK_ERROR_INVALID_INPUT, + NVJITLINK_ERROR_PTX_COMPILE, + NVJITLINK_ERROR_NVVM_COMPILE, + NVJITLINK_ERROR_INTERNAL, + NVJITLINK_ERROR_THREADPOOL, + NVJITLINK_ERROR_UNRECOGNIZED_INPUT, + NVJITLINK_ERROR_FINALIZE, + NVJITLINK_ERROR_NULL_INPUT, + NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS, + NVJITLINK_ERROR_INCORRECT_INPUT_TYPE, + NVJITLINK_ERROR_ARCH_MISMATCH, + NVJITLINK_ERROR_OUTDATED_LIBRARY, + NVJITLINK_ERROR_MISSING_FATBIN, + NVJITLINK_ERROR_UNRECOGNIZED_ARCH, + NVJITLINK_ERROR_UNSUPPORTED_ARCH, + NVJITLINK_ERROR_LTO_NOT_ENABLED, + _NVJITLINKRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvJitLinkResult nvJitLinkResult; + +/* "cuda/bindings/cynvjitlink.pxd":37 + * _NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42 + * + * ctypedef enum nvJitLinkInputType "nvJitLinkInputType": # <<<<<<<<<<<<<< + * NVJITLINK_INPUT_NONE "NVJITLINK_INPUT_NONE" = 0 + * NVJITLINK_INPUT_CUBIN "NVJITLINK_INPUT_CUBIN" = 1 +*/ +enum nvJitLinkInputType { + NVJITLINK_INPUT_NONE = 0, + NVJITLINK_INPUT_CUBIN = 1, + NVJITLINK_INPUT_PTX, + NVJITLINK_INPUT_LTOIR, + NVJITLINK_INPUT_FATBIN, + NVJITLINK_INPUT_OBJECT, + NVJITLINK_INPUT_LIBRARY, + NVJITLINK_INPUT_INDEX, + NVJITLINK_INPUT_ANY = 10 +}; +typedef enum nvJitLinkInputType nvJitLinkInputType; + +/* "cuda/bindings/cynvjitlink.pxd":50 + * + * # types + * ctypedef void* nvJitLinkHandle 'nvJitLinkHandle' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvJitLinkHandle; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings._internal" */ + +/* Module declarations from "cuda.bindings._internal.nvjitlink" */ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkCreate)(nvJitLinkHandle *, uint32_t, char const **); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkDestroy)(nvJitLinkHandle *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddData)(nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddFile)(nvJitLinkHandle, nvJitLinkInputType, char const *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkComplete)(nvJitLinkHandle); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubinSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubin)(nvJitLinkHandle, void *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtxSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtx)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLogSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLog)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLogSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLog)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkVersion)(unsigned int *, unsigned int *); /*proto*/ + +/* Module declarations from "cuda.bindings.cynvjitlink" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cynvjitlink" +extern int __pyx_module_is_main_cuda__bindings__cynvjitlink; +int __pyx_module_is_main_cuda__bindings__cynvjitlink = 0; + +/* Implementation of "cuda.bindings.cynvjitlink" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cynvjitlink.pyx":14 + * ############################################################################### + * + * cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkCreate(handle, numOptions, options) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkCreate(nvJitLinkHandle *__pyx_v_handle, uint32_t __pyx_v_numOptions, char const **__pyx_v_options) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":15 + * + * cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkCreate(handle, numOptions, options) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkCreate(__pyx_v_handle, __pyx_v_numOptions, __pyx_v_options); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":14 + * ############################################################################### + * + * cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkCreate(handle, numOptions, options) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":18 + * + * + * cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkDestroy(handle) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkDestroy(nvJitLinkHandle *__pyx_v_handle) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":19 + * + * cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkDestroy(handle) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkDestroy(__pyx_v_handle); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":18 + * + * + * cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkDestroy(handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":22 + * + * + * cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkAddData(handle, inputType, data, size, name) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddData(nvJitLinkHandle __pyx_v_handle, nvJitLinkInputType __pyx_v_inputType, void const *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":23 + * + * cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkAddData(handle, inputType, data, size, name) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddData(__pyx_v_handle, __pyx_v_inputType, __pyx_v_data, __pyx_v_size, __pyx_v_name); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":22 + * + * + * cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkAddData(handle, inputType, data, size, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":26 + * + * + * cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkAddFile(handle, inputType, fileName) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddFile(nvJitLinkHandle __pyx_v_handle, nvJitLinkInputType __pyx_v_inputType, char const *__pyx_v_fileName) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":27 + * + * cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkAddFile(handle, inputType, fileName) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddFile(__pyx_v_handle, __pyx_v_inputType, __pyx_v_fileName); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":26 + * + * + * cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkAddFile(handle, inputType, fileName) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":30 + * + * + * cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkComplete(handle) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkComplete(nvJitLinkHandle __pyx_v_handle) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":31 + * + * cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkComplete(handle) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkComplete(__pyx_v_handle); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":30 + * + * + * cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkComplete(handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":34 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedCubinSize(handle, size) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubinSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":35 + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetLinkedCubinSize(handle, size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubinSize(__pyx_v_handle, __pyx_v_size); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":34 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedCubinSize(handle, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetLinkedCubinSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":38 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedCubin(handle, cubin) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubin(nvJitLinkHandle __pyx_v_handle, void *__pyx_v_cubin) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":39 + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetLinkedCubin(handle, cubin) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubin(__pyx_v_handle, __pyx_v_cubin); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":38 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedCubin(handle, cubin) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetLinkedCubin", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":42 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedPtxSize(handle, size) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtxSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":43 + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetLinkedPtxSize(handle, size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtxSize(__pyx_v_handle, __pyx_v_size); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":42 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedPtxSize(handle, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetLinkedPtxSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":46 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedPtx(handle, ptx) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtx(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_ptx) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":47 + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetLinkedPtx(handle, ptx) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtx(__pyx_v_handle, __pyx_v_ptx); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":46 + * + * + * cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetLinkedPtx(handle, ptx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetLinkedPtx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":50 + * + * + * cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetErrorLogSize(handle, size) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLogSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":51 + * + * cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetErrorLogSize(handle, size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLogSize(__pyx_v_handle, __pyx_v_size); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":50 + * + * + * cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetErrorLogSize(handle, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetErrorLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":54 + * + * + * cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetErrorLog(handle, log) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLog(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_log) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":55 + * + * cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetErrorLog(handle, log) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLog(__pyx_v_handle, __pyx_v_log); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":54 + * + * + * cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetErrorLog(handle, log) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetErrorLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":58 + * + * + * cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetInfoLogSize(handle, size) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLogSize(nvJitLinkHandle __pyx_v_handle, size_t *__pyx_v_size) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":59 + * + * cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetInfoLogSize(handle, size) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLogSize(__pyx_v_handle, __pyx_v_size); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":58 + * + * + * cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetInfoLogSize(handle, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetInfoLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":62 + * + * + * cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetInfoLog(handle, log) + * +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLog(nvJitLinkHandle __pyx_v_handle, char *__pyx_v_log) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":63 + * + * cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkGetInfoLog(handle, log) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLog(__pyx_v_handle, __pyx_v_log); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":62 + * + * + * cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkGetInfoLog(handle, log) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkGetInfoLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvjitlink.pyx":66 + * + * + * cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkVersion(major, minor) +*/ + +static nvJitLinkResult __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkVersion(unsigned int *__pyx_v_major, unsigned int *__pyx_v_minor) { + nvJitLinkResult __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvjitlink.pyx":67 + * + * cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvjitlink._nvJitLinkVersion(major, minor) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkVersion(__pyx_v_major, __pyx_v_minor); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvjitlink.pyx":66 + * + * + * cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvjitlink._nvJitLinkVersion(major, minor) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvjitlink.nvJitLinkVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVJITLINKRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("nvJitLinkCreate", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkCreate, "nvJitLinkResult (nvJitLinkHandle *, uint32_t, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkDestroy, "nvJitLinkResult (nvJitLinkHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkAddData", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddData, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkAddFile", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddFile, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkComplete", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkComplete, "nvJitLinkResult (nvJitLinkHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetLinkedCubinSize", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubinSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetLinkedCubin", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubin, "nvJitLinkResult (nvJitLinkHandle, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetLinkedPtxSize", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtxSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetLinkedPtx", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtx, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetErrorLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetErrorLog", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetInfoLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkGetInfoLog", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvJitLinkVersion", (void (*)(void))__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkVersion, "nvJitLinkResult (unsigned int *, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.nvjitlink"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkCreate, "nvJitLinkResult (nvJitLinkHandle *, uint32_t, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkDestroy, "nvJitLinkResult (nvJitLinkHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkAddData", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddData, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkAddFile", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkAddFile, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkComplete", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkComplete, "nvJitLinkResult (nvJitLinkHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetLinkedCubinSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubinSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetLinkedCubin", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedCubin, "nvJitLinkResult (nvJitLinkHandle, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetLinkedPtxSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtxSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetLinkedPtx", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetLinkedPtx, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetErrorLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetErrorLog", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetErrorLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetInfoLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkGetInfoLog", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkGetInfoLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvJitLinkVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_9nvjitlink__nvJitLinkVersion, "nvJitLinkResult (unsigned int *, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cynvjitlink(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cynvjitlink}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cynvjitlink", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cynvjitlink(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cynvjitlink(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cynvjitlink(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cynvjitlink' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cynvjitlink" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cynvjitlink", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cynvjitlink) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cynvjitlink")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cynvjitlink", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cynvjitlink.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cynvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cynvjitlink"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..f5ee335f2bc175f34a82e173ea6719f482c54ace Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..c1ba67a51700b8b32667a016184ac24370578f1a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pxd @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uint32_t + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +ctypedef enum nvJitLinkResult "nvJitLinkResult": + NVJITLINK_SUCCESS "NVJITLINK_SUCCESS" = 0 + NVJITLINK_ERROR_UNRECOGNIZED_OPTION "NVJITLINK_ERROR_UNRECOGNIZED_OPTION" + NVJITLINK_ERROR_MISSING_ARCH "NVJITLINK_ERROR_MISSING_ARCH" + NVJITLINK_ERROR_INVALID_INPUT "NVJITLINK_ERROR_INVALID_INPUT" + NVJITLINK_ERROR_PTX_COMPILE "NVJITLINK_ERROR_PTX_COMPILE" + NVJITLINK_ERROR_NVVM_COMPILE "NVJITLINK_ERROR_NVVM_COMPILE" + NVJITLINK_ERROR_INTERNAL "NVJITLINK_ERROR_INTERNAL" + NVJITLINK_ERROR_THREADPOOL "NVJITLINK_ERROR_THREADPOOL" + NVJITLINK_ERROR_UNRECOGNIZED_INPUT "NVJITLINK_ERROR_UNRECOGNIZED_INPUT" + NVJITLINK_ERROR_FINALIZE "NVJITLINK_ERROR_FINALIZE" + NVJITLINK_ERROR_NULL_INPUT "NVJITLINK_ERROR_NULL_INPUT" + NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS "NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS" + NVJITLINK_ERROR_INCORRECT_INPUT_TYPE "NVJITLINK_ERROR_INCORRECT_INPUT_TYPE" + NVJITLINK_ERROR_ARCH_MISMATCH "NVJITLINK_ERROR_ARCH_MISMATCH" + NVJITLINK_ERROR_OUTDATED_LIBRARY "NVJITLINK_ERROR_OUTDATED_LIBRARY" + NVJITLINK_ERROR_MISSING_FATBIN "NVJITLINK_ERROR_MISSING_FATBIN" + NVJITLINK_ERROR_UNRECOGNIZED_ARCH "NVJITLINK_ERROR_UNRECOGNIZED_ARCH" + NVJITLINK_ERROR_UNSUPPORTED_ARCH "NVJITLINK_ERROR_UNSUPPORTED_ARCH" + NVJITLINK_ERROR_LTO_NOT_ENABLED "NVJITLINK_ERROR_LTO_NOT_ENABLED" + _NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42 + +ctypedef enum nvJitLinkInputType "nvJitLinkInputType": + NVJITLINK_INPUT_NONE "NVJITLINK_INPUT_NONE" = 0 + NVJITLINK_INPUT_CUBIN "NVJITLINK_INPUT_CUBIN" = 1 + NVJITLINK_INPUT_PTX "NVJITLINK_INPUT_PTX" + NVJITLINK_INPUT_LTOIR "NVJITLINK_INPUT_LTOIR" + NVJITLINK_INPUT_FATBIN "NVJITLINK_INPUT_FATBIN" + NVJITLINK_INPUT_OBJECT "NVJITLINK_INPUT_OBJECT" + NVJITLINK_INPUT_LIBRARY "NVJITLINK_INPUT_LIBRARY" + NVJITLINK_INPUT_INDEX "NVJITLINK_INPUT_INDEX" + NVJITLINK_INPUT_ANY "NVJITLINK_INPUT_ANY" = 10 + + +# types +ctypedef void* nvJitLinkHandle 'nvJitLinkHandle' + + +############################################################################### +# Functions +############################################################################### + +cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pyx new file mode 100644 index 0000000000000000000000000000000000000000..cfaeff2dc45008154a97dff64cd41c3aa14ea56f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvjitlink.pyx @@ -0,0 +1,67 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from ._internal cimport nvjitlink as _nvjitlink + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef nvJitLinkResult nvJitLinkCreate(nvJitLinkHandle* handle, uint32_t numOptions, const char** options) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkCreate(handle, numOptions, options) + + +cdef nvJitLinkResult nvJitLinkDestroy(nvJitLinkHandle* handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkDestroy(handle) + + +cdef nvJitLinkResult nvJitLinkAddData(nvJitLinkHandle handle, nvJitLinkInputType inputType, const void* data, size_t size, const char* name) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkAddData(handle, inputType, data, size, name) + + +cdef nvJitLinkResult nvJitLinkAddFile(nvJitLinkHandle handle, nvJitLinkInputType inputType, const char* fileName) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkAddFile(handle, inputType, fileName) + + +cdef nvJitLinkResult nvJitLinkComplete(nvJitLinkHandle handle) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkComplete(handle) + + +cdef nvJitLinkResult nvJitLinkGetLinkedCubinSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetLinkedCubinSize(handle, size) + + +cdef nvJitLinkResult nvJitLinkGetLinkedCubin(nvJitLinkHandle handle, void* cubin) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetLinkedCubin(handle, cubin) + + +cdef nvJitLinkResult nvJitLinkGetLinkedPtxSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetLinkedPtxSize(handle, size) + + +cdef nvJitLinkResult nvJitLinkGetLinkedPtx(nvJitLinkHandle handle, char* ptx) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetLinkedPtx(handle, ptx) + + +cdef nvJitLinkResult nvJitLinkGetErrorLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetErrorLogSize(handle, size) + + +cdef nvJitLinkResult nvJitLinkGetErrorLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetErrorLog(handle, log) + + +cdef nvJitLinkResult nvJitLinkGetInfoLogSize(nvJitLinkHandle handle, size_t* size) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetInfoLogSize(handle, size) + + +cdef nvJitLinkResult nvJitLinkGetInfoLog(nvJitLinkHandle handle, char* log) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkGetInfoLog(handle, log) + + +cdef nvJitLinkResult nvJitLinkVersion(unsigned int* major, unsigned int* minor) except?_NVJITLINKRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvjitlink._nvJitLinkVersion(major, minor) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..43aaec3da0d74df1d434def92e6b634fd02cf07a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpp @@ -0,0 +1,6058 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/nvrtc.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cynvrtc", + "sources": [ + "cuda/bindings/cynvrtc.pyx" + ] + }, + "module_name": "cuda.bindings.cynvrtc" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cynvrtc +#define __PYX_HAVE_API__cuda__bindings__cynvrtc +/* Early includes */ +#include +#include "nvrtc.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cynvrtc.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings._bindings.cynvrtc" */ +static char const *(*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetErrorString)(nvrtcResult); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcVersion)(int *, int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNumSupportedArchs)(int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetSupportedArchs)(int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCreateProgram)(nvrtcProgram *, char const *, char const *, int, char const **, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcDestroyProgram)(nvrtcProgram *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCompileProgram)(nvrtcProgram, int, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTXSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTX)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBINSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBIN)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVMSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVM)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIRSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIR)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIRSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIR)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLogSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLog)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcAddNameExpression)(nvrtcProgram, char const *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLoweredName)(nvrtcProgram, char const *, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSize)(size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetPCHHeapSize)(size_t); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHCreateStatus)(nvrtcProgram); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSizeRequired)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetFlowCallback)(nvrtcProgram, void *, void *); /*proto*/ + +/* Module declarations from "cuda.bindings.cynvrtc" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cynvrtc" +extern int __pyx_module_is_main_cuda__bindings__cynvrtc; +int __pyx_module_is_main_cuda__bindings__cynvrtc = 0; + +/* Implementation of "cuda.bindings.cynvrtc" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cynvrtc.pyx":7 + * cimport cuda.bindings._bindings.cynvrtc as cynvrtc + * + * cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetErrorString(result) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetErrorString(nvrtcResult __pyx_v_result) { + char const *__pyx_r; + char const *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":8 + * + * cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: + * return cynvrtc._nvrtcGetErrorString(result) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetErrorString(__pyx_v_result); if (unlikely(__pyx_t_1 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":7 + * cimport cuda.bindings._bindings.cynvrtc as cynvrtc + * + * cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetErrorString(result) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":10 + * return cynvrtc._nvrtcGetErrorString(result) + * + * cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcVersion(major, minor) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcVersion(int *__pyx_v_major, int *__pyx_v_minor) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":11 + * + * cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcVersion(major, minor) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcVersion(__pyx_v_major, __pyx_v_minor); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":10 + * return cynvrtc._nvrtcGetErrorString(result) + * + * cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcVersion(major, minor) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":13 + * return cynvrtc._nvrtcVersion(major, minor) + * + * cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNumSupportedArchs(int *__pyx_v_numArchs) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":14 + * + * cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNumSupportedArchs(__pyx_v_numArchs); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 14, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":13 + * return cynvrtc._nvrtcVersion(major, minor) + * + * cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetNumSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":16 + * return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) + * + * cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetSupportedArchs(int *__pyx_v_supportedArchs) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":17 + * + * cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetSupportedArchs(__pyx_v_supportedArchs); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":16 + * return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) + * + * cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":19 + * return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) + * + * cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCreateProgram(nvrtcProgram *__pyx_v_prog, char const *__pyx_v_src, char const *__pyx_v_name, int __pyx_v_numHeaders, char const **__pyx_v_headers, char const **__pyx_v_includeNames) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":20 + * + * cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCreateProgram(__pyx_v_prog, __pyx_v_src, __pyx_v_name, __pyx_v_numHeaders, __pyx_v_headers, __pyx_v_includeNames); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":19 + * return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) + * + * cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":22 + * return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) + * + * cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcDestroyProgram(prog) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcDestroyProgram(nvrtcProgram *__pyx_v_prog) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":23 + * + * cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcDestroyProgram(prog) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcDestroyProgram(__pyx_v_prog); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":22 + * return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) + * + * cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcDestroyProgram(prog) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":25 + * return cynvrtc._nvrtcDestroyProgram(prog) + * + * cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCompileProgram(nvrtcProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":26 + * + * cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCompileProgram(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":25 + * return cynvrtc._nvrtcDestroyProgram(prog) + * + * cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":28 + * return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) + * + * cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTXSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_ptxSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":29 + * + * cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTXSize(__pyx_v_prog, __pyx_v_ptxSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 29, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":28 + * return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) + * + * cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetPTXSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":31 + * return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) + * + * cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPTX(prog, ptx) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTX(nvrtcProgram __pyx_v_prog, char *__pyx_v_ptx) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":32 + * + * cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetPTX(prog, ptx) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTX(__pyx_v_prog, __pyx_v_ptx); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":31 + * return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) + * + * cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPTX(prog, ptx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetPTX", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":34 + * return cynvrtc._nvrtcGetPTX(prog, ptx) + * + * cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBINSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_cubinSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":35 + * + * cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBINSize(__pyx_v_prog, __pyx_v_cubinSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":34 + * return cynvrtc._nvrtcGetPTX(prog, ptx) + * + * cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetCUBINSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":37 + * return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) + * + * cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetCUBIN(prog, cubin) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBIN(nvrtcProgram __pyx_v_prog, char *__pyx_v_cubin) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":38 + * + * cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetCUBIN(prog, cubin) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBIN(__pyx_v_prog, __pyx_v_cubin); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":37 + * return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) + * + * cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetCUBIN(prog, cubin) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetCUBIN", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":40 + * return cynvrtc._nvrtcGetCUBIN(prog, cubin) + * + * cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVMSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_nvvmSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":41 + * + * cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVMSize(__pyx_v_prog, __pyx_v_nvvmSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":40 + * return cynvrtc._nvrtcGetCUBIN(prog, cubin) + * + * cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetNVVMSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":43 + * return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) + * + * cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNVVM(prog, nvvm) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVM(nvrtcProgram __pyx_v_prog, char *__pyx_v_nvvm) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":44 + * + * cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetNVVM(prog, nvvm) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVM(__pyx_v_prog, __pyx_v_nvvm); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":43 + * return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) + * + * cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetNVVM(prog, nvvm) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetNVVM", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":46 + * return cynvrtc._nvrtcGetNVVM(prog, nvvm) + * + * cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIRSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_LTOIRSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":47 + * + * cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIRSize(__pyx_v_prog, __pyx_v_LTOIRSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":46 + * return cynvrtc._nvrtcGetNVVM(prog, nvvm) + * + * cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetLTOIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":49 + * return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) + * + * cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIR(nvrtcProgram __pyx_v_prog, char *__pyx_v_LTOIR) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":50 + * + * cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIR(__pyx_v_prog, __pyx_v_LTOIR); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":49 + * return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) + * + * cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetLTOIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":52 + * return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) + * + * cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIRSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_optixirSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":53 + * + * cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIRSize(__pyx_v_prog, __pyx_v_optixirSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":52 + * return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) + * + * cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetOptiXIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":55 + * return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) + * + * cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetOptiXIR(prog, optixir) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIR(nvrtcProgram __pyx_v_prog, char *__pyx_v_optixir) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":56 + * + * cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetOptiXIR(prog, optixir) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIR(__pyx_v_prog, __pyx_v_optixir); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":55 + * return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) + * + * cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetOptiXIR(prog, optixir) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetOptiXIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":58 + * return cynvrtc._nvrtcGetOptiXIR(prog, optixir) + * + * cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLogSize(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_logSizeRet) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":59 + * + * cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLogSize(__pyx_v_prog, __pyx_v_logSizeRet); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":58 + * return cynvrtc._nvrtcGetOptiXIR(prog, optixir) + * + * cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":61 + * return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) + * + * cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetProgramLog(prog, log) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLog(nvrtcProgram __pyx_v_prog, char *__pyx_v_log) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":62 + * + * cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetProgramLog(prog, log) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLog(__pyx_v_prog, __pyx_v_log); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":61 + * return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) + * + * cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetProgramLog(prog, log) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":64 + * return cynvrtc._nvrtcGetProgramLog(prog, log) + * + * cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcAddNameExpression(prog, name_expression) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcAddNameExpression(nvrtcProgram __pyx_v_prog, char const *__pyx_v_name_expression) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":65 + * + * cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcAddNameExpression(prog, name_expression) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcAddNameExpression(__pyx_v_prog, __pyx_v_name_expression); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":64 + * return cynvrtc._nvrtcGetProgramLog(prog, log) + * + * cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcAddNameExpression(prog, name_expression) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcAddNameExpression", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":67 + * return cynvrtc._nvrtcAddNameExpression(prog, name_expression) + * + * cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLoweredName(nvrtcProgram __pyx_v_prog, char const *__pyx_v_name_expression, char const **__pyx_v_lowered_name) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":68 + * + * cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLoweredName(__pyx_v_prog, __pyx_v_name_expression, __pyx_v_lowered_name); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":67 + * return cynvrtc._nvrtcAddNameExpression(prog, name_expression) + * + * cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetLoweredName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":70 + * return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) + * + * cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHHeapSize(ret) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSize(size_t *__pyx_v_ret) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":71 + * + * cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetPCHHeapSize(ret) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSize(__pyx_v_ret); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":70 + * return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) + * + * cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHHeapSize(ret) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":73 + * return cynvrtc._nvrtcGetPCHHeapSize(ret) + * + * cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcSetPCHHeapSize(size) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetPCHHeapSize(size_t __pyx_v_size) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":74 + * + * cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcSetPCHHeapSize(size) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetPCHHeapSize(__pyx_v_size); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":73 + * return cynvrtc._nvrtcGetPCHHeapSize(ret) + * + * cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcSetPCHHeapSize(size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcSetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":76 + * return cynvrtc._nvrtcSetPCHHeapSize(size) + * + * cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHCreateStatus(prog) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHCreateStatus(nvrtcProgram __pyx_v_prog) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":77 + * + * cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetPCHCreateStatus(prog) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHCreateStatus(__pyx_v_prog); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 77, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":76 + * return cynvrtc._nvrtcSetPCHHeapSize(size) + * + * cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHCreateStatus(prog) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetPCHCreateStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":79 + * return cynvrtc._nvrtcGetPCHCreateStatus(prog) + * + * cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) + * +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSizeRequired(nvrtcProgram __pyx_v_prog, size_t *__pyx_v_size) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":80 + * + * cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) # <<<<<<<<<<<<<< + * + * cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSizeRequired(__pyx_v_prog, __pyx_v_size); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 80, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":79 + * return cynvrtc._nvrtcGetPCHCreateStatus(prog) + * + * cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcGetPCHHeapSizeRequired", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvrtc.pyx":82 + * return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) + * + * cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload) +*/ + +static nvrtcResult __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetFlowCallback(nvrtcProgram __pyx_v_prog, void *__pyx_v_callback, void *__pyx_v_payload) { + nvrtcResult __pyx_r; + nvrtcResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvrtc.pyx":83 + * + * cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + * return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetFlowCallback(__pyx_v_prog, __pyx_v_callback, __pyx_v_payload); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvrtc.pyx":82 + * return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) + * + * cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: # <<<<<<<<<<<<<< + * return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvrtc.nvrtcSetFlowCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NVRTC_ERROR_INVALID_INPUT; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("nvrtcGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetErrorString, "char const *(nvrtcResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcVersion", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcVersion, "nvrtcResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetNumSupportedArchs", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNumSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetSupportedArchs", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcCreateProgram", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCreateProgram, "nvrtcResult (nvrtcProgram *, char const *, char const *, int, char const **, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcDestroyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcDestroyProgram, "nvrtcResult (nvrtcProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcCompileProgram", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCompileProgram, "nvrtcResult (nvrtcProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetPTXSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTXSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetPTX", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTX, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetCUBINSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBINSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetCUBIN", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBIN, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetNVVMSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVMSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetNVVM", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVM, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetLTOIRSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetLTOIR", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetOptiXIRSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetOptiXIR", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetProgramLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLogSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetProgramLog", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLog, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcAddNameExpression", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcAddNameExpression, "nvrtcResult (nvrtcProgram, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetLoweredName", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLoweredName, "nvrtcResult (nvrtcProgram, char const *, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetPCHHeapSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSize, "nvrtcResult (size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcSetPCHHeapSize", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetPCHHeapSize, "nvrtcResult (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetPCHCreateStatus", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHCreateStatus, "nvrtcResult (nvrtcProgram)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcGetPCHHeapSizeRequired", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSizeRequired, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvrtcSetFlowCallback", (void (*)(void))__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetFlowCallback, "nvrtcResult (nvrtcProgram, void *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._bindings.cynvrtc"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetErrorString, "char const *(nvrtcResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcVersion, "nvrtcResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetNumSupportedArchs", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNumSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetSupportedArchs", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcCreateProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCreateProgram, "nvrtcResult (nvrtcProgram *, char const *, char const *, int, char const **, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcDestroyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcDestroyProgram, "nvrtcResult (nvrtcProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcCompileProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcCompileProgram, "nvrtcResult (nvrtcProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetPTXSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTXSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetPTX", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPTX, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetCUBINSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBINSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetCUBIN", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetCUBIN, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetNVVMSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVMSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetNVVM", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetNVVM, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetLTOIRSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetLTOIR", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLTOIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetOptiXIRSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetOptiXIR", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetOptiXIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetProgramLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLogSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetProgramLog", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetProgramLog, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcAddNameExpression", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcAddNameExpression, "nvrtcResult (nvrtcProgram, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetLoweredName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetLoweredName, "nvrtcResult (nvrtcProgram, char const *, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetPCHHeapSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSize, "nvrtcResult (size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcSetPCHHeapSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetPCHHeapSize, "nvrtcResult (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetPCHCreateStatus", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHCreateStatus, "nvrtcResult (nvrtcProgram)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcGetPCHHeapSizeRequired", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcGetPCHHeapSizeRequired, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvrtcSetFlowCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_7cynvrtc__nvrtcSetFlowCallback, "nvrtcResult (nvrtcProgram, void *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cynvrtc(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cynvrtc}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cynvrtc", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cynvrtc(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cynvrtc(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cynvrtc(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cynvrtc' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cynvrtc" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cynvrtc", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cynvrtc) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cynvrtc")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cynvrtc", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cynvrtc.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cynvrtc", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cynvrtc"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..fe759956b601b50143ea6d07f2ac57fcf2044511 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..36ee6d1210e58487e4e10f2f9f48bd82168acedc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pxd @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. + +from libc.stdint cimport uint32_t, uint64_t + +cdef extern from "nvrtc.h": + + ctypedef enum nvrtcResult: + 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 + + cdef struct _nvrtcProgram: + pass + ctypedef _nvrtcProgram* nvrtcProgram + +cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil + +cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil + +cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pyx new file mode 100644 index 0000000000000000000000000000000000000000..8a050b1e91bb1421c0c7b0573c0a6d85e2260db1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvrtc.pyx @@ -0,0 +1,83 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings._bindings.cynvrtc as cynvrtc + +cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil: + return cynvrtc._nvrtcGetErrorString(result) + +cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcVersion(major, minor) + +cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetNumSupportedArchs(numArchs) + +cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetSupportedArchs(supportedArchs) + +cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames) + +cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcDestroyProgram(prog) + +cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcCompileProgram(prog, numOptions, options) + +cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet) + +cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPTX(prog, ptx) + +cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet) + +cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetCUBIN(prog, cubin) + +cdef nvrtcResult nvrtcGetNVVMSize(nvrtcProgram prog, size_t* nvvmSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetNVVMSize(prog, nvvmSizeRet) + +cdef nvrtcResult nvrtcGetNVVM(nvrtcProgram prog, char* nvvm) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetNVVM(prog, nvvm) + +cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet) + +cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetLTOIR(prog, LTOIR) + +cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet) + +cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetOptiXIR(prog, optixir) + +cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet) + +cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetProgramLog(prog, log) + +cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcAddNameExpression(prog, name_expression) + +cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) + +cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHHeapSize(ret) + +cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcSetPCHHeapSize(size) + +cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHCreateStatus(prog) + +cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) + +cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..51bf51fbd16e9614fdc34ddb2c4c0d27ff134911 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpp @@ -0,0 +1,5461 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cynvvm", + "sources": [ + "cuda/bindings/cynvvm.pyx" + ] + }, + "module_name": "cuda.bindings.cynvvm" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cynvvm +#define __PYX_HAVE_API__cuda__bindings__cynvvm +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cynvvm.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cuda/bindings/cynvvm.pxd":13 + * + * # enums + * ctypedef enum nvvmResult "nvvmResult": # <<<<<<<<<<<<<< + * NVVM_SUCCESS "NVVM_SUCCESS" = 0 + * NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 +*/ +enum nvvmResult { + NVVM_SUCCESS = 0, + NVVM_ERROR_OUT_OF_MEMORY = 1, + NVVM_ERROR_PROGRAM_CREATION_FAILURE = 2, + NVVM_ERROR_IR_VERSION_MISMATCH = 3, + NVVM_ERROR_INVALID_INPUT = 4, + NVVM_ERROR_INVALID_PROGRAM = 5, + NVVM_ERROR_INVALID_IR = 6, + NVVM_ERROR_INVALID_OPTION = 7, + NVVM_ERROR_NO_MODULE_IN_PROGRAM = 8, + NVVM_ERROR_COMPILATION = 9, + NVVM_ERROR_CANCELLED = 10, + _NVVMRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvvmResult nvvmResult; + +/* "cuda/bindings/cynvvm.pxd":29 + * + * # types + * ctypedef void* nvvmProgram 'nvvmProgram' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvvmProgram; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "cuda.bindings._internal" */ + +/* Module declarations from "cuda.bindings._internal.nvvm" */ +static char const *(*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetErrorString)(nvvmResult); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVersion)(int *, int *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmIRVersion)(int *, int *, int *, int *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCreateProgram)(nvvmProgram *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmDestroyProgram)(nvvmProgram *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmAddModuleToProgram)(nvvmProgram, char const *, size_t, char const *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmLazyAddModuleToProgram)(nvvmProgram, char const *, size_t, char const *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCompileProgram)(nvvmProgram, int, char const **); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVerifyProgram)(nvvmProgram, int, char const **); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResultSize)(nvvmProgram, size_t *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResult)(nvvmProgram, char *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLogSize)(nvvmProgram, size_t *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLog)(nvvmProgram, char *); /*proto*/ + +/* Module declarations from "cuda.bindings.cynvvm" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cynvvm" +extern int __pyx_module_is_main_cuda__bindings__cynvvm; +int __pyx_module_is_main_cuda__bindings__cynvvm = 0; + +/* Implementation of "cuda.bindings.cynvvm" */ +/* #### Code section: global_var ### */ +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[7]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[1] +#define __pyx_n_u_main __pyx_string_tab[2] +#define __pyx_n_u_module __pyx_string_tab[3] +#define __pyx_n_u_name __pyx_string_tab[4] +#define __pyx_n_u_qualname __pyx_string_tab[5] +#define __pyx_n_u_test __pyx_string_tab[6] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<7; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<7; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cynvvm.pyx":14 + * ############################################################################### + * + * cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetErrorString(result) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetErrorString(nvvmResult __pyx_v_result) { + char const *__pyx_r; + char const *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":15 + * + * cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil: + * return _nvvm._nvvmGetErrorString(result) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetErrorString(__pyx_v_result); if (unlikely(__pyx_t_1 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":14 + * ############################################################################### + * + * cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetErrorString(result) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":18 + * + * + * cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmVersion(major, minor) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmVersion(int *__pyx_v_major, int *__pyx_v_minor) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":19 + * + * cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmVersion(major, minor) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVersion(__pyx_v_major, __pyx_v_minor); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":18 + * + * + * cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmVersion(major, minor) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":22 + * + * + * cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmIRVersion(majorIR, minorIR, majorDbg, minorDbg) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmIRVersion(int *__pyx_v_majorIR, int *__pyx_v_minorIR, int *__pyx_v_majorDbg, int *__pyx_v_minorDbg) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":23 + * + * cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmIRVersion(majorIR, minorIR, majorDbg, minorDbg) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmIRVersion(__pyx_v_majorIR, __pyx_v_minorIR, __pyx_v_majorDbg, __pyx_v_minorDbg); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":22 + * + * + * cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmIRVersion(majorIR, minorIR, majorDbg, minorDbg) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmIRVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":26 + * + * + * cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmCreateProgram(prog) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmCreateProgram(nvvmProgram *__pyx_v_prog) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":27 + * + * cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmCreateProgram(prog) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCreateProgram(__pyx_v_prog); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":26 + * + * + * cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmCreateProgram(prog) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":30 + * + * + * cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmDestroyProgram(prog) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmDestroyProgram(nvvmProgram *__pyx_v_prog) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":31 + * + * cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmDestroyProgram(prog) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmDestroyProgram(__pyx_v_prog); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":30 + * + * + * cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmDestroyProgram(prog) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":34 + * + * + * cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmAddModuleToProgram(prog, buffer, size, name) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmAddModuleToProgram(nvvmProgram __pyx_v_prog, char const *__pyx_v_buffer, size_t __pyx_v_size, char const *__pyx_v_name) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":35 + * + * cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmAddModuleToProgram(prog, buffer, size, name) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmAddModuleToProgram(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":34 + * + * + * cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmAddModuleToProgram(prog, buffer, size, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmAddModuleToProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":38 + * + * + * cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmLazyAddModuleToProgram(prog, buffer, size, name) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmLazyAddModuleToProgram(nvvmProgram __pyx_v_prog, char const *__pyx_v_buffer, size_t __pyx_v_size, char const *__pyx_v_name) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":39 + * + * cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmLazyAddModuleToProgram(prog, buffer, size, name) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmLazyAddModuleToProgram(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":38 + * + * + * cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmLazyAddModuleToProgram(prog, buffer, size, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmLazyAddModuleToProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":42 + * + * + * cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmCompileProgram(prog, numOptions, options) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmCompileProgram(nvvmProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":43 + * + * cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmCompileProgram(prog, numOptions, options) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCompileProgram(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 43, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":42 + * + * + * cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmCompileProgram(prog, numOptions, options) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":46 + * + * + * cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmVerifyProgram(prog, numOptions, options) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmVerifyProgram(nvvmProgram __pyx_v_prog, int __pyx_v_numOptions, char const **__pyx_v_options) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":47 + * + * cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmVerifyProgram(prog, numOptions, options) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVerifyProgram(__pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 47, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":46 + * + * + * cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmVerifyProgram(prog, numOptions, options) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmVerifyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":50 + * + * + * cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetCompiledResultSize(prog, bufferSizeRet) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResultSize(nvvmProgram __pyx_v_prog, size_t *__pyx_v_bufferSizeRet) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":51 + * + * cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmGetCompiledResultSize(prog, bufferSizeRet) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResultSize(__pyx_v_prog, __pyx_v_bufferSizeRet); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":50 + * + * + * cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetCompiledResultSize(prog, bufferSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmGetCompiledResultSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":54 + * + * + * cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetCompiledResult(prog, buffer) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResult(nvvmProgram __pyx_v_prog, char *__pyx_v_buffer) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":55 + * + * cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmGetCompiledResult(prog, buffer) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResult(__pyx_v_prog, __pyx_v_buffer); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":54 + * + * + * cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetCompiledResult(prog, buffer) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmGetCompiledResult", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":58 + * + * + * cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetProgramLogSize(prog, bufferSizeRet) + * +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLogSize(nvvmProgram __pyx_v_prog, size_t *__pyx_v_bufferSizeRet) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":59 + * + * cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmGetProgramLogSize(prog, bufferSizeRet) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLogSize(__pyx_v_prog, __pyx_v_bufferSizeRet); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":58 + * + * + * cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetProgramLogSize(prog, bufferSizeRet) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cynvvm.pyx":62 + * + * + * cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetProgramLog(prog, buffer) +*/ + +static nvvmResult __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLog(nvvmProgram __pyx_v_prog, char *__pyx_v_buffer) { + nvvmResult __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cynvvm.pyx":63 + * + * cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + * return _nvvm._nvvmGetProgramLog(prog, buffer) # <<<<<<<<<<<<<< +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLog(__pyx_v_prog, __pyx_v_buffer); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cynvvm.pyx":62 + * + * + * cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: # <<<<<<<<<<<<<< + * return _nvvm._nvvmGetProgramLog(prog, buffer) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cynvvm.nvvmGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = _NVVMRESULT_INTERNAL_LOADING_ERROR; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("nvvmGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetErrorString, "char const *(nvvmResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmVersion", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmVersion, "nvvmResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmIRVersion", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmIRVersion, "nvvmResult (int *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmCreateProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmCreateProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmDestroyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmDestroyProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmAddModuleToProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmLazyAddModuleToProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmLazyAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmCompileProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmCompileProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmVerifyProgram", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmVerifyProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmGetCompiledResultSize", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResultSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmGetCompiledResult", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResult, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmGetProgramLogSize", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLogSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("nvvmGetProgramLog", (void (*)(void))__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLog, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.nvvm"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetErrorString, "char const *(nvvmResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVersion, "nvvmResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmIRVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmIRVersion, "nvvmResult (int *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmCreateProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCreateProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmDestroyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmDestroyProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmAddModuleToProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmLazyAddModuleToProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmLazyAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmCompileProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmCompileProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmVerifyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmVerifyProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmGetCompiledResultSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResultSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmGetCompiledResult", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetCompiledResult, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmGetProgramLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLogSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_nvvmGetProgramLog", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_4nvvm__nvvmGetProgramLog, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cynvvm(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cynvvm}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cynvvm", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cynvvm(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cynvvm(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cynvvm(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cynvvm' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cynvvm" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cynvvm", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cynvvm) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cynvvm")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cynvvm", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cynvvm.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cynvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cynvvm"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 18 <= 65535 + const unsigned short n; +#elif 18 / 2 < INT_MAX + const unsigned int n; +#elif 18 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); + } + goto done; +} +#endif + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..3ee9eb5a08b655b5fe414eff05edca32dc5a8494 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.cpython-312-x86_64-linux-gnu.so differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..5453b092193b2abb36ddc7942abda3a62ea65d76 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pxd @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + + +############################################################################### +# Types (structs, enums, ...) +############################################################################### + +# enums +ctypedef enum nvvmResult "nvvmResult": + NVVM_SUCCESS "NVVM_SUCCESS" = 0 + NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 + NVVM_ERROR_PROGRAM_CREATION_FAILURE "NVVM_ERROR_PROGRAM_CREATION_FAILURE" = 2 + NVVM_ERROR_IR_VERSION_MISMATCH "NVVM_ERROR_IR_VERSION_MISMATCH" = 3 + NVVM_ERROR_INVALID_INPUT "NVVM_ERROR_INVALID_INPUT" = 4 + NVVM_ERROR_INVALID_PROGRAM "NVVM_ERROR_INVALID_PROGRAM" = 5 + NVVM_ERROR_INVALID_IR "NVVM_ERROR_INVALID_IR" = 6 + NVVM_ERROR_INVALID_OPTION "NVVM_ERROR_INVALID_OPTION" = 7 + NVVM_ERROR_NO_MODULE_IN_PROGRAM "NVVM_ERROR_NO_MODULE_IN_PROGRAM" = 8 + NVVM_ERROR_COMPILATION "NVVM_ERROR_COMPILATION" = 9 + NVVM_ERROR_CANCELLED "NVVM_ERROR_CANCELLED" = 10 + _NVVMRESULT_INTERNAL_LOADING_ERROR "_NVVMRESULT_INTERNAL_LOADING_ERROR" = -42 + + +# types +ctypedef void* nvvmProgram 'nvvmProgram' + + +############################################################################### +# Functions +############################################################################### + +cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil +cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil +cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pyx new file mode 100644 index 0000000000000000000000000000000000000000..bb5b5b4c05c423545436eb34581a77f7fa986d04 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cynvvm.pyx @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from ._internal cimport nvvm as _nvvm + + +############################################################################### +# Wrapper functions +############################################################################### + +cdef const char* nvvmGetErrorString(nvvmResult result) except?NULL nogil: + return _nvvm._nvvmGetErrorString(result) + + +cdef nvvmResult nvvmVersion(int* major, int* minor) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmVersion(major, minor) + + +cdef nvvmResult nvvmIRVersion(int* majorIR, int* minorIR, int* majorDbg, int* minorDbg) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmIRVersion(majorIR, minorIR, majorDbg, minorDbg) + + +cdef nvvmResult nvvmCreateProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmCreateProgram(prog) + + +cdef nvvmResult nvvmDestroyProgram(nvvmProgram* prog) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmDestroyProgram(prog) + + +cdef nvvmResult nvvmAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmAddModuleToProgram(prog, buffer, size, name) + + +cdef nvvmResult nvvmLazyAddModuleToProgram(nvvmProgram prog, const char* buffer, size_t size, const char* name) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmLazyAddModuleToProgram(prog, buffer, size, name) + + +cdef nvvmResult nvvmCompileProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmCompileProgram(prog, numOptions, options) + + +cdef nvvmResult nvvmVerifyProgram(nvvmProgram prog, int numOptions, const char** options) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmVerifyProgram(prog, numOptions, options) + + +cdef nvvmResult nvvmGetCompiledResultSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmGetCompiledResultSize(prog, bufferSizeRet) + + +cdef nvvmResult nvvmGetCompiledResult(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmGetCompiledResult(prog, buffer) + + +cdef nvvmResult nvvmGetProgramLogSize(nvvmProgram prog, size_t* bufferSizeRet) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmGetProgramLogSize(prog, bufferSizeRet) + + +cdef nvvmResult nvvmGetProgramLog(nvvmProgram prog, char* buffer) except?_NVVMRESULT_INTERNAL_LOADING_ERROR nogil: + return _nvvm._nvvmGetProgramLog(prog, buffer) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0824ce780a10249460dbde6b8d980b1103827b6a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.cpp @@ -0,0 +1,23260 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/device_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/driver_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/library_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/surface_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/texture_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/vector_types.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.cyruntime", + "sources": [ + "cuda/bindings/cyruntime.pyx" + ] + }, + "module_name": "cuda.bindings.cyruntime" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__cyruntime +#define __PYX_HAVE_API__cuda__bindings__cyruntime +/* Early includes */ +#include +#include "vector_types.h" +#include "driver_types.h" +#include "surface_types.h" +#include "texture_types.h" +#include "library_types.h" +#include "cuda_runtime_api.h" +#include "device_types.h" +#include "cuda.h" +#include "cudaProfiler.h" +#include +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/cyruntime.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; + +/* "cuda/bindings/cyruntime.pxd":10 + * include "cyruntime_types.pxi" + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLenum; + +/* "cuda/bindings/cyruntime.pxd":12 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLuint; + +/* "cuda/bindings/cyruntime.pxd":24 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_EGLint; + +/* "cuda/bindings/cyruntime.pxd":31 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice; + +/* "cuda/bindings/cyruntime.pxd":33 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress; + +/* "cuda/bindings/cyruntime.pxd":35 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface; + +/* "cuda/bindings/cyruntime.pxd":37 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef enum cudaEglFrameType_enum: +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue; +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st; +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11; +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st; + +/* "cuda/bindings/cyruntime.pxd":39 + * ctypedef uint32_t VdpOutputSurface + * + * cdef enum cudaEglFrameType_enum: # <<<<<<<<<<<<<< + * cudaEglFrameTypeArray = 0 + * cudaEglFrameTypePitch = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypePitch = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":45 + * ctypedef cudaEglFrameType_enum cudaEglFrameType + * + * cdef enum cudaEglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * cudaEglResourceLocationSysmem = 0 + * cudaEglResourceLocationVidmem = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationSysmem = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationVidmem = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":51 + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags + * + * cdef enum cudaEglColorFormat_enum: # <<<<<<<<<<<<<< + * cudaEglColorFormatYUV420Planar = 0 + * cudaEglColorFormatYUV420SemiPlanar = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar = 3, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatARGB = 6, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRGBA = 7, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatL = 8, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatR = 9, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar = 10, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar = 11, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV422 = 12, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY422 = 13, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatABGR = 14, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBGRA = 15, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatA = 16, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRG = 17, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV = 18, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar = 19, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar = 20, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar = 21, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar = 22, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar = 23, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar = 24, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar = 25, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY_ER = 26, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY_ER = 27, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV_ER = 28, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU_ER = 29, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA_ER = 31, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV_ER = 32, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar_ER = 33, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar_ER = 34, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_ER = 35, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar_ER = 36, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar_ER = 37, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_ER = 38, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar_ER = 39, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar_ER = 40, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_ER = 41, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar_ER = 42, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar_ER = 43, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_ER = 44, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRGGB = 45, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBGGR = 46, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGRBG = 47, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGBRG = 48, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10RGGB = 49, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10BGGR = 50, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GRBG = 51, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GBRG = 52, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RGGB = 53, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BGGR = 54, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GRBG = 55, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GBRG = 56, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14RGGB = 57, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14BGGR = 58, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GRBG = 59, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GBRG = 60, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20RGGB = 61, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20BGGR = 62, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GRBG = 63, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GBRG = 64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar = 65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar = 66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar = 67, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspRGGB = 68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspBGGR = 69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGRBG = 70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGBRG = 71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBCCR = 72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRCCB = 73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCRBC = 74, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCBRC = 75, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10CCCC = 76, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BCCR = 77, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RCCB = 78, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CRBC = 79, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CBRC = 80, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CCCC = 81, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY = 82, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_2020 = 83, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_2020 = 84, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_2020 = 85, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_2020 = 86, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_709 = 87, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_709 = 88, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_709 = 89, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_709 = 90, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar = 94, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_ER = 96, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_709_ER = 97, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_ER = 98, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_709_ER = 99, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_ER = 0x64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA = 0x66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU = 0x68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY = 0x69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 0x6A, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 0x6C, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 0x6E, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 0x70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 0x71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709 = 0x72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709_ER = 0x73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY2020 = 0x74 +}; + +/* "cuda/bindings/cyruntime.pxd":197 + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection + * + * cdef enum cudaGLDeviceList: # <<<<<<<<<<<<<< + * cudaGLDeviceListAll = 1 + * cudaGLDeviceListCurrentFrame = 2 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListAll = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListCurrentFrame = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListNextFrame = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":202 + * cudaGLDeviceListNextFrame = 3 + * + * cdef enum cudaGLMapFlags: # <<<<<<<<<<<<<< + * cudaGLMapFlagsNone = 0 + * cudaGLMapFlagsReadOnly = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLMapFlags { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsNone = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsReadOnly = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsWriteDiscard = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":831 + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + * + * cdef enum: cudaHostAllocDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":833 + * cdef enum: cudaHostAllocDefault = 0 + * + * cdef enum: cudaHostAllocPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":835 + * cdef enum: cudaHostAllocPortable = 1 + * + * cdef enum: cudaHostAllocMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocWriteCombined = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":837 + * cdef enum: cudaHostAllocMapped = 2 + * + * cdef enum: cudaHostAllocWriteCombined = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocWriteCombined = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":839 + * cdef enum: cudaHostAllocWriteCombined = 4 + * + * cdef enum: cudaHostRegisterDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":841 + * cdef enum: cudaHostRegisterDefault = 0 + * + * cdef enum: cudaHostRegisterPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":843 + * cdef enum: cudaHostRegisterPortable = 1 + * + * cdef enum: cudaHostRegisterMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterIoMemory = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":845 + * cdef enum: cudaHostRegisterMapped = 2 + * + * cdef enum: cudaHostRegisterIoMemory = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterReadOnly = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterIoMemory = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":847 + * cdef enum: cudaHostRegisterIoMemory = 4 + * + * cdef enum: cudaHostRegisterReadOnly = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaPeerAccessDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterReadOnly = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":849 + * cdef enum: cudaHostRegisterReadOnly = 8 + * + * cdef enum: cudaPeerAccessDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaPeerAccessDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":851 + * cdef enum: cudaPeerAccessDefault = 0 + * + * cdef enum: cudaStreamDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamNonBlocking = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":853 + * cdef enum: cudaStreamDefault = 0 + * + * cdef enum: cudaStreamNonBlocking = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamLegacy = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamNonBlocking = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":855 + * cdef enum: cudaStreamNonBlocking = 1 + * + * cdef enum: cudaStreamLegacy = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamPerThread = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamLegacy = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":857 + * cdef enum: cudaStreamLegacy = 1 + * + * cdef enum: cudaStreamPerThread = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamPerThread = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":859 + * cdef enum: cudaStreamPerThread = 2 + * + * cdef enum: cudaEventDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventBlockingSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":861 + * cdef enum: cudaEventDefault = 0 + * + * cdef enum: cudaEventBlockingSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDisableTiming = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventBlockingSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":863 + * cdef enum: cudaEventBlockingSync = 1 + * + * cdef enum: cudaEventDisableTiming = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventInterprocess = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDisableTiming = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":865 + * cdef enum: cudaEventDisableTiming = 2 + * + * cdef enum: cudaEventInterprocess = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventInterprocess = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":867 + * cdef enum: cudaEventInterprocess = 4 + * + * cdef enum: cudaEventRecordDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":869 + * cdef enum: cudaEventRecordDefault = 0 + * + * cdef enum: cudaEventRecordExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":871 + * cdef enum: cudaEventRecordExternal = 1 + * + * cdef enum: cudaEventWaitDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":873 + * cdef enum: cudaEventWaitDefault = 0 + * + * cdef enum: cudaEventWaitExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleAuto = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":875 + * cdef enum: cudaEventWaitExternal = 1 + * + * cdef enum: cudaDeviceScheduleAuto = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleSpin = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleAuto = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":877 + * cdef enum: cudaDeviceScheduleAuto = 0 + * + * cdef enum: cudaDeviceScheduleSpin = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleYield = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleSpin = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":879 + * cdef enum: cudaDeviceScheduleSpin = 1 + * + * cdef enum: cudaDeviceScheduleYield = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleYield = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":881 + * cdef enum: cudaDeviceScheduleYield = 2 + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":883 + * cdef enum: cudaDeviceScheduleBlockingSync = 4 + * + * cdef enum: cudaDeviceBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleMask = 7 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":885 + * cdef enum: cudaDeviceBlockingSync = 4 + * + * cdef enum: cudaDeviceScheduleMask = 7 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMapHost = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleMask = 7 +}; + +/* "cuda/bindings/cyruntime.pxd":887 + * cdef enum: cudaDeviceScheduleMask = 7 + * + * cdef enum: cudaDeviceMapHost = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMapHost = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":889 + * cdef enum: cudaDeviceMapHost = 8 + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceSyncMemops = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceLmemResizeToMax = 16 +}; + +/* "cuda/bindings/cyruntime.pxd":891 + * cdef enum: cudaDeviceLmemResizeToMax = 16 + * + * cdef enum: cudaDeviceSyncMemops = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMask = 255 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceSyncMemops = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":893 + * cdef enum: cudaDeviceSyncMemops = 128 + * + * cdef enum: cudaDeviceMask = 255 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMask = 0xFF +}; + +/* "cuda/bindings/cyruntime.pxd":895 + * cdef enum: cudaDeviceMask = 255 + * + * cdef enum: cudaArrayDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayLayered = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":897 + * cdef enum: cudaArrayDefault = 0 + * + * cdef enum: cudaArrayLayered = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySurfaceLoadStore = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayLayered = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":899 + * cdef enum: cudaArrayLayered = 1 + * + * cdef enum: cudaArraySurfaceLoadStore = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayCubemap = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySurfaceLoadStore = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":901 + * cdef enum: cudaArraySurfaceLoadStore = 2 + * + * cdef enum: cudaArrayCubemap = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayTextureGather = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayCubemap = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":903 + * cdef enum: cudaArrayCubemap = 4 + * + * cdef enum: cudaArrayTextureGather = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayColorAttachment = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayTextureGather = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":905 + * cdef enum: cudaArrayTextureGather = 8 + * + * cdef enum: cudaArrayColorAttachment = 32 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparse = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayColorAttachment = 32 +}; + +/* "cuda/bindings/cyruntime.pxd":907 + * cdef enum: cudaArrayColorAttachment = 32 + * + * cdef enum: cudaArraySparse = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDeferredMapping = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparse = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":909 + * cdef enum: cudaArraySparse = 64 + * + * cdef enum: cudaArrayDeferredMapping = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDeferredMapping = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":911 + * cdef enum: cudaArrayDeferredMapping = 128 + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachGlobal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaIpcMemLazyEnablePeerAccess = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":913 + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 + * + * cdef enum: cudaMemAttachGlobal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachHost = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachGlobal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":915 + * cdef enum: cudaMemAttachGlobal = 1 + * + * cdef enum: cudaMemAttachHost = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachSingle = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachHost = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":917 + * cdef enum: cudaMemAttachHost = 2 + * + * cdef enum: cudaMemAttachSingle = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachSingle = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":919 + * cdef enum: cudaMemAttachSingle = 4 + * + * cdef enum: cudaOccupancyDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":921 + * cdef enum: cudaOccupancyDefault = 0 + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCpuDeviceId = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDisableCachingOverride = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":923 + * cdef enum: cudaOccupancyDisableCachingOverride = 1 + * + * cdef enum: cudaCpuDeviceId = -1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInvalidDeviceId = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCpuDeviceId = -1L +}; + +/* "cuda/bindings/cyruntime.pxd":925 + * cdef enum: cudaCpuDeviceId = -1 + * + * cdef enum: cudaInvalidDeviceId = -2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInvalidDeviceId = -2L +}; + +/* "cuda/bindings/cyruntime.pxd":927 + * cdef enum: cudaInvalidDeviceId = -2 + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInitDeviceFlagsAreValid = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":929 + * cdef enum: cudaInitDeviceFlagsAreValid = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":931 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":933 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparsePropertiesSingleMipTail = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":935 + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemPoolCreateUsageHwDecompress = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":937 + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalMemoryDedicated = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":939 + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 + * + * cdef enum: cudaExternalMemoryDedicated = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalMemoryDedicated = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":941 + * cdef enum: cudaExternalMemoryDedicated = 1 + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":943 + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":945 + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrWait = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrSignal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":947 + * cdef enum: cudaNvSciSyncAttrSignal = 1 + * + * cdef enum: cudaNvSciSyncAttrWait = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrWait = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":949 + * cdef enum: cudaNvSciSyncAttrWait = 2 + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":951 + * cdef enum: cudaGraphKernelNodePortDefault = 0 + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortProgrammatic = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":953 + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortLaunchCompletion = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":955 + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":957 + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeSynchronizationPolicy = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":959 + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":961 + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":963 + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 + * + * cdef enum: cudaStreamAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":965 + * cdef enum: cudaStreamAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":967 + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeCooperative = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":969 + * cdef enum: cudaKernelNodeAttributeCooperative = 2 + * + * cdef enum: cudaKernelNodeAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":971 + * cdef enum: cudaKernelNodeAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterDimension = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":973 + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +}; + +/* "cuda/bindings/cyruntime.pxd":975 + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":977 + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":979 + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +}; + +/* "cuda/bindings/cyruntime.pxd":981 + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +}; + +/* "cuda/bindings/cyruntime.pxd":983 + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 + * + * cdef enum: cudaSurfaceType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":985 + * cdef enum: cudaSurfaceType1D = 1 + * + * cdef enum: cudaSurfaceType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":987 + * cdef enum: cudaSurfaceType2D = 2 + * + * cdef enum: cudaSurfaceType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":989 + * cdef enum: cudaSurfaceType3D = 3 + * + * cdef enum: cudaSurfaceTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":991 + * cdef enum: cudaSurfaceTypeCubemap = 12 + * + * cdef enum: cudaSurfaceType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":993 + * cdef enum: cudaSurfaceType1DLayered = 241 + * + * cdef enum: cudaSurfaceType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":995 + * cdef enum: cudaSurfaceType2DLayered = 242 + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":997 + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 + * + * cdef enum: cudaTextureType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":999 + * cdef enum: cudaTextureType1D = 1 + * + * cdef enum: cudaTextureType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":1001 + * cdef enum: cudaTextureType2D = 2 + * + * cdef enum: cudaTextureType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":1003 + * cdef enum: cudaTextureType3D = 3 + * + * cdef enum: cudaTextureTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":1005 + * cdef enum: cudaTextureTypeCubemap = 12 + * + * cdef enum: cudaTextureType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":1007 + * cdef enum: cudaTextureType1DLayered = 241 + * + * cdef enum: cudaTextureType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":1009 + * cdef enum: cudaTextureType2DLayered = 242 + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: CUDART_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":1011 + * cdef enum: cudaTextureTypeCubemapLayered = 252 + * + * cdef enum: CUDART_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: __CUDART_API_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDART_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1013 + * cdef enum: CUDART_VERSION = 12090 + * + * cdef enum: __CUDART_API_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime___CUDART_API_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1015 + * cdef enum: __CUDART_API_VERSION = 12090 + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_EGL_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue; + +/* "cuda/bindings/cyruntime.pxd":17 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR; + +/* "cuda/bindings/cyruntime.pxd":22 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR; + +/* "cuda/bindings/cyruntime.pxd":29 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR; + +/* "cuda/bindings/cyruntime.pxd":43 + * cudaEglFrameTypePitch = 1 + * + * ctypedef cudaEglFrameType_enum cudaEglFrameType # <<<<<<<<<<<<<< + * + * cdef enum cudaEglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType; + +/* "cuda/bindings/cyruntime.pxd":49 + * cudaEglResourceLocationVidmem = 1 + * + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum cudaEglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags; + +/* "cuda/bindings/cyruntime.pxd":166 + * cudaEglColorFormatUYVY2020 = 116 + * + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat # <<<<<<<<<<<<<< + * + * cdef struct cudaEglPlaneDesc_st: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat; + +/* "cuda/bindings/cyruntime.pxd":168 + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat + * + * cdef struct cudaEglPlaneDesc_st: # <<<<<<<<<<<<<< + * unsigned int width + * unsigned int height +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st { + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int numChannels; + struct cudaChannelFormatDesc channelDesc; + unsigned int reserved[4]; +}; + +/* "cuda/bindings/cyruntime.pxd":177 + * unsigned int reserved[4] + * + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc # <<<<<<<<<<<<<< + * + * cdef union anon_union11: +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc; + +/* "cuda/bindings/cyruntime.pxd":179 + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc + * + * cdef union anon_union11: # <<<<<<<<<<<<<< + * cudaArray_t pArray[3] + * cudaPitchedPtr pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 { + cudaArray_t pArray[3]; + struct cudaPitchedPtr pPitch[3]; +}; + +/* "cuda/bindings/cyruntime.pxd":183 + * cudaPitchedPtr pPitch[3] + * + * cdef struct cudaEglFrame_st: # <<<<<<<<<<<<<< + * anon_union11 frame + * cudaEglPlaneDesc planeDesc[3] +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st { + union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 frame; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc planeDesc[3]; + unsigned int planeCount; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType frameType; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat eglColorFormat; +}; + +/* "cuda/bindings/cyruntime.pxd":190 + * cudaEglColorFormat eglColorFormat + * + * ctypedef cudaEglFrame_st cudaEglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame; + +/* "cuda/bindings/cyruntime.pxd":195 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum cudaGLDeviceList: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* IncludeStringH.proto */ +#include + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings._bindings.cydriver" */ + +/* Module declarations from "cuda.bindings._bindings.cyruntime" */ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerPresentFrame)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame, cudaStream_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerReturnFrame)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaStream_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedEglFrame)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaGraphicsResource_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUSetVDPAUDevice)(int, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUGetDevice)(int *, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterVideoSurface)(struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterOutputSurface)(struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGLGetDevices)(unsigned int *, int *, unsigned int, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterImage)(struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, __pyx_t_4cuda_8bindings_9cyruntime_GLenum, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterBuffer)(struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsEGLRegisterImage)(cudaGraphicsResource_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnect)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnectWithFlags)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerDisconnect)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerAcquireFrame)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t *, cudaStream_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerReleaseFrame)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t, cudaStream_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerConnect)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, __pyx_t_4cuda_8bindings_9cyruntime_EGLint, __pyx_t_4cuda_8bindings_9cyruntime_EGLint); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerDisconnect)(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateFromEGLSync)(cudaEvent_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceReset)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSynchronize)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetLimit)(enum cudaLimit, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetLimit)(size_t *, enum cudaLimit); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetTexture1DLinearMaxWidth)(size_t *, struct cudaChannelFormatDesc const *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetCacheConfig)(enum cudaFuncCache *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetStreamPriorityRange)(int *, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetCacheConfig)(enum cudaFuncCache); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetByPCIBusId)(int *, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetPCIBusId)(char *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetEventHandle)(cudaIpcEventHandle_t *, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenEventHandle)(cudaEvent_t *, cudaIpcEventHandle_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetMemHandle)(cudaIpcMemHandle_t *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenMemHandle)(void **, cudaIpcMemHandle_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcCloseMemHandle)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceFlushGPUDirectRDMAWrites)(enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceRegisterAsyncNotification)(int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceUnregisterAsyncNotification)(int, cudaAsyncCallbackHandle_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetSharedMemConfig)(enum cudaSharedMemConfig *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetSharedMemConfig)(enum cudaSharedMemConfig); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetLastError)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPeekAtLastError)(void); /*proto*/ +static char const *(*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorName)(cudaError_t); /*proto*/ +static char const *(*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorString)(cudaError_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceCount)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceProperties_v2)(struct cudaDeviceProp *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetAttribute)(int *, enum cudaDeviceAttr, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetDefaultMemPool)(cudaMemPool_t *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetMemPool)(int, cudaMemPool_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetMemPool)(cudaMemPool_t *, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetNvSciSyncAttributes)(void *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetP2PAttribute)(int *, enum cudaDeviceP2PAttr, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaChooseDevice)(int *, struct cudaDeviceProp const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaInitDevice)(int, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDevice)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDevice)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDeviceFlags)(unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceFlags)(unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreate)(cudaStream_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithFlags)(cudaStream_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithPriority)(cudaStream_t *, unsigned int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetPriority)(cudaStream_t, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetFlags)(cudaStream_t, unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetId)(cudaStream_t, unsigned PY_LONG_LONG *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetDevice)(cudaStream_t, int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCtxResetPersistingL2Cache)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCopyAttributes)(cudaStream_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetAttribute)(cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSetAttribute)(cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamDestroy)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamWaitEvent)(cudaStream_t, cudaEvent_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAddCallback)(cudaStream_t, cudaStreamCallback_t, void *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSynchronize)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamQuery)(cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAttachMemAsync)(cudaStream_t, void *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCapture)(cudaStream_t, enum cudaStreamCaptureMode); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCaptureToGraph)(cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaThreadExchangeStreamCaptureMode)(enum cudaStreamCaptureMode *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamEndCapture)(cudaStream_t, cudaGraph_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamIsCapturing)(cudaStream_t, enum cudaStreamCaptureStatus *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v2)(cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v3)(cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies)(cudaStream_t, cudaGraphNode_t *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies_v2)(cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreate)(cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateWithFlags)(cudaEvent_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecord)(cudaEvent_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecordWithFlags)(cudaEvent_t, cudaStream_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventQuery)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventSynchronize)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventDestroy)(cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime)(float *, cudaEvent_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime_v2)(float *, cudaEvent_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalMemory)(cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedBuffer)(void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedMipmappedArray)(cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalMemory)(cudaExternalMemory_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalSemaphore)(cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSignalExternalSemaphoresAsync_v2)(cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaWaitExternalSemaphoresAsync_v2)(cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalSemaphore)(cudaExternalSemaphore_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetCacheConfig)(void const *, enum cudaFuncCache); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncGetAttributes)(struct cudaFuncAttributes *, void const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetAttribute)(void const *, enum cudaFuncAttribute, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLaunchHostFunc)(cudaStream_t, cudaHostFn_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetSharedMemConfig)(void const *, enum cudaSharedMemConfig); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessor)(int *, void const *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyAvailableDynamicSMemPerBlock)(size_t *, void const *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(int *, void const *, int, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocManaged)(void **, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc)(void **, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocHost)(void **, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocPitch)(void **, size_t *, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocArray)(cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFree)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeHost)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeArray)(cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeMipmappedArray)(cudaMipmappedArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostAlloc)(void **, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostRegister)(void *, size_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostUnregister)(void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetDevicePointer)(void **, void *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetFlags)(unsigned int *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3D)(struct cudaPitchedPtr *, struct cudaExtent); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3DArray)(cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocMipmappedArray)(cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetMipmappedArrayLevel)(cudaArray_t *, cudaMipmappedArray_const_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3D)(struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeer)(struct cudaMemcpy3DPeerParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DAsync)(struct cudaMemcpy3DParms const *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeerAsync)(struct cudaMemcpy3DPeerParms const *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemGetInfo)(size_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetInfo)(struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetPlane)(cudaArray_t *, cudaArray_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetMemoryRequirements)(struct cudaArrayMemoryRequirements *, cudaArray_t, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetMemoryRequirements)(struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetSparseProperties)(struct cudaArraySparseProperties *, cudaArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetSparseProperties)(struct cudaArraySparseProperties *, cudaMipmappedArray_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy)(void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeer)(void *, int, void const *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2D)(void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArray)(cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArray)(void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DArrayToArray)(cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyAsync)(void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeerAsync)(void *, int, void const *, int, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyBatchAsync)(void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DBatchAsync)(size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DAsync)(void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArrayAsync)(cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArrayAsync)(void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset)(void *, int, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2D)(void *, size_t, int, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3D)(struct cudaPitchedPtr, int, struct cudaExtent); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemsetAsync)(void *, int, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2DAsync)(void *, size_t, int, size_t, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3DAsync)(struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync)(void const *, size_t, int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync_v2)(void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise)(void const *, size_t, enum cudaMemoryAdvise, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise_v2)(void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttribute)(void *, size_t, enum cudaMemRangeAttribute, void const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttributes)(void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArray)(cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArray)(void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyArrayToArray)(cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArrayAsync)(cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArrayAsync)(void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocAsync)(void **, size_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeAsync)(void *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolTrimTo)(cudaMemPool_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAttribute)(cudaMemPool_t, enum cudaMemPoolAttr, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAttribute)(cudaMemPool_t, enum cudaMemPoolAttr, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAccess)(cudaMemPool_t, struct cudaMemAccessDesc const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAccess)(enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolCreate)(cudaMemPool_t *, struct cudaMemPoolProps const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolDestroy)(cudaMemPool_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocFromPoolAsync)(void **, size_t, cudaMemPool_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportToShareableHandle)(void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportFromShareableHandle)(cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportPointer)(struct cudaMemPoolPtrExportData *, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportPointer)(void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPointerGetAttributes)(struct cudaPointerAttributes *, void const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceCanAccessPeer)(int *, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceEnablePeerAccess)(int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceDisablePeerAccess)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnregisterResource)(cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceSetMapFlags)(cudaGraphicsResource_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsMapResources)(int, cudaGraphicsResource_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnmapResources)(int, cudaGraphicsResource_t *, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedPointer)(void **, size_t *, cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsSubResourceGetMappedArray)(cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedMipmappedArray)(cudaMipmappedArray_t *, cudaGraphicsResource_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetChannelDesc)(struct cudaChannelFormatDesc *, cudaArray_const_t); /*proto*/ +static struct cudaChannelFormatDesc (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateChannelDesc)(int, int, int, int, enum cudaChannelFormatKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateTextureObject)(cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyTextureObject)(cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceDesc)(struct cudaResourceDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectTextureDesc)(struct cudaTextureDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceViewDesc)(struct cudaResourceViewDesc *, cudaTextureObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateSurfaceObject)(cudaSurfaceObject_t *, struct cudaResourceDesc const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroySurfaceObject)(cudaSurfaceObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetSurfaceObjectResourceDesc)(struct cudaResourceDesc *, cudaSurfaceObject_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDriverGetVersion)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaRuntimeGetVersion)(int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphCreate)(cudaGraph_t *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddKernelNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetParams)(cudaGraphNode_t, struct cudaKernelNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetParams)(cudaGraphNode_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeCopyAttributes)(cudaGraphNode_t, cudaGraphNode_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetAttribute)(cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetAttribute)(cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode1D)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeGetParams)(cudaGraphNode_t, struct cudaMemcpy3DParms *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams)(cudaGraphNode_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams1D)(cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemsetNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeGetParams)(cudaGraphNode_t, struct cudaMemsetParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeSetParams)(cudaGraphNode_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddHostNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeGetParams)(cudaGraphNode_t, struct cudaHostNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeSetParams)(cudaGraphNode_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddChildGraphNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphChildGraphNodeGetGraph)(cudaGraphNode_t, cudaGraph_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEmptyNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventRecordNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeGetEvent)(cudaGraphNode_t, cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeSetEvent)(cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventWaitNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeGetEvent)(cudaGraphNode_t, cudaEvent_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeSetEvent)(cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresSignalNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeGetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeSetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresWaitNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeGetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeSetParams)(cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemAllocNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemAllocNodeGetParams)(cudaGraphNode_t, struct cudaMemAllocNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemFreeNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemFreeNodeGetParams)(cudaGraphNode_t, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGraphMemTrim)(int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetGraphMemAttribute)(int, enum cudaGraphMemAttributeType, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetGraphMemAttribute)(int, enum cudaGraphMemAttributeType, void *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphClone)(cudaGraph_t *, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeFindInClone)(cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetType)(cudaGraphNode_t, enum cudaGraphNodeType *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetNodes)(cudaGraph_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetRootNodes)(cudaGraph_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges)(cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges_v2)(cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies)(cudaGraphNode_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies_v2)(cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes)(cudaGraphNode_t, cudaGraphNode_t *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes_v2)(cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies_v2)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies_v2)(cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroyNode)(cudaGraphNode_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiate)(cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithFlags)(cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithParams)(cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecGetFlags)(cudaGraphExec_t, unsigned PY_LONG_LONG *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecKernelNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams1D)(cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemsetNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecHostNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecChildGraphNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventRecordNodeSetEvent)(cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventWaitNodeSetEvent)(cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresSignalNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresWaitNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetEnabled)(cudaGraphExec_t, cudaGraphNode_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetEnabled)(cudaGraphExec_t, cudaGraphNode_t, unsigned int *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecUpdate)(cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphUpload)(cudaGraphExec_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphLaunch)(cudaGraphExec_t, cudaStream_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecDestroy)(cudaGraphExec_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroy)(cudaGraph_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDebugDotPrint)(cudaGraph_t, char const *, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectCreate)(cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRetain)(cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRelease)(cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRetainUserObject)(cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphReleaseUserObject)(cudaGraph_t, cudaUserObject_t, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode_v2)(cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetParams)(cudaGraphNode_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecNodeSetParams)(cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphConditionalHandleCreate)(cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPoint)(char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPointByVersion)(char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadData)(cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadFromFile)(cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryUnload)(cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernel)(cudaKernel_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetGlobal)(void **, size_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetManaged)(void **, size_t *, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetUnifiedFunction)(void **, cudaLibrary_t, char const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernelCount)(unsigned int *, cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryEnumerateKernels)(cudaKernel_t *, unsigned int, cudaLibrary_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaKernelSetAttributeForDevice)(cudaKernel_t, enum cudaFuncAttribute, int, int); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetExportTable)(void const **, cudaUUID_t const *); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetKernel)(cudaKernel_t *, void const *); /*proto*/ +static struct cudaPitchedPtr (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPitchedPtr)(void *, size_t, size_t, size_t); /*proto*/ +static struct cudaPos (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPos)(size_t, size_t, size_t); /*proto*/ +static struct cudaExtent (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaExtent)(size_t, size_t, size_t); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStart)(void); /*proto*/ +static cudaError_t (*__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStop)(void); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "cuda.bindings._lib.dlfcn" */ + +/* Module declarations from "cuda.bindings.cyruntime" */ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.cyruntime" +extern int __pyx_module_is_main_cuda__bindings__cyruntime; +int __pyx_module_is_main_cuda__bindings__cyruntime = 0; + +/* Implementation of "cuda.bindings.cyruntime" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_RuntimeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = "."; +static const char __pyx_k__2[] = "?"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_cudart[] = "cudart"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_abs_path[] = "abs_path"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_handle_uint[] = "_handle_uint"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_cuda_pathfinder[] = "cuda.pathfinder"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_load_nvidia_dynamic_lib[] = "load_nvidia_dynamic_lib"; +static const char __pyx_k_Function_cudaRuntimeGetVersion_n[] = "Function \"cudaRuntimeGetVersion\" not found in "; +/* #### Code section: decls ### */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyObject *__pyx_string_tab[15]; +/* #### Code section: module_state_contents ### */ +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_kp_u_Function_cudaRuntimeGetVersion_n __pyx_string_tab[1] +#define __pyx_n_u_RuntimeError __pyx_string_tab[2] +#define __pyx_kp_u__2 __pyx_string_tab[3] +#define __pyx_n_u_abs_path __pyx_string_tab[4] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[5] +#define __pyx_n_u_cuda_pathfinder __pyx_string_tab[6] +#define __pyx_n_u_cudart __pyx_string_tab[7] +#define __pyx_n_u_handle_uint __pyx_string_tab[8] +#define __pyx_n_u_load_nvidia_dynamic_lib __pyx_string_tab[9] +#define __pyx_n_u_main __pyx_string_tab[10] +#define __pyx_n_u_module __pyx_string_tab[11] +#define __pyx_n_u_name __pyx_string_tab[12] +#define __pyx_n_u_qualname __pyx_string_tab[13] +#define __pyx_n_u_test __pyx_string_tab[14] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<15; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<15; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/cyruntime.pyx":8 + * cimport cython + * + * cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceReset() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceReset(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":9 + * + * cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceReset() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceReset(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":8 + * cimport cython + * + * cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceReset() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceReset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":11 + * return cyruntime._cudaDeviceReset() + * + * cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSynchronize() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSynchronize(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":12 + * + * cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSynchronize() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSynchronize(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 12, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":11 + * return cyruntime._cudaDeviceReset() + * + * cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSynchronize() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":14 + * return cyruntime._cudaDeviceSynchronize() + * + * cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetLimit(limit, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetLimit(enum cudaLimit __pyx_v_limit, size_t __pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":15 + * + * cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSetLimit(limit, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetLimit(((enum cudaLimit)__pyx_v_limit), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 15, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":14 + * return cyruntime._cudaDeviceSynchronize() + * + * cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetLimit(limit, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":17 + * return cyruntime._cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetLimit(pValue, limit) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetLimit(size_t *__pyx_v_pValue, enum cudaLimit __pyx_v_limit) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":18 + * + * cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetLimit(pValue, limit) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetLimit(__pyx_v_pValue, ((enum cudaLimit)__pyx_v_limit)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 18, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":17 + * return cyruntime._cudaDeviceSetLimit(limit, value) + * + * cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetLimit(pValue, limit) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":20 + * return cyruntime._cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, struct cudaChannelFormatDesc const *__pyx_v_fmtDesc, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":21 + * + * cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_fmtDesc, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":20 + * return cyruntime._cudaDeviceGetLimit(pValue, limit) + * + * cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":23 + * return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetCacheConfig(enum cudaFuncCache *__pyx_v_pCacheConfig) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":24 + * + * cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetCacheConfig(((enum cudaFuncCache *)__pyx_v_pCacheConfig)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":23 + * return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + * + * cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":26 + * return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":27 + * + * cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":26 + * return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) + * + * cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":29 + * return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetCacheConfig(enum cudaFuncCache __pyx_v_cacheConfig) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":30 + * + * cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetCacheConfig(((enum cudaFuncCache)__pyx_v_cacheConfig)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":29 + * return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + * + * cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":32 + * return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetByPCIBusId(int *__pyx_v_device, char const *__pyx_v_pciBusId) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":33 + * + * cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetByPCIBusId(__pyx_v_device, __pyx_v_pciBusId); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":32 + * return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) + * + * cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":35 + * return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":36 + * + * cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":35 + * return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) + * + * cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":38 + * return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcGetEventHandle(handle, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaIpcGetEventHandle(cudaIpcEventHandle_t *__pyx_v_handle, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":39 + * + * cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaIpcGetEventHandle(handle, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetEventHandle(__pyx_v_handle, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":38 + * return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) + * + * cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcGetEventHandle(handle, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":41 + * return cyruntime._cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcOpenEventHandle(event, handle) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaIpcOpenEventHandle(cudaEvent_t *__pyx_v_event, cudaIpcEventHandle_t __pyx_v_handle) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":42 + * + * cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaIpcOpenEventHandle(event, handle) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenEventHandle(__pyx_v_event, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 42, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":41 + * return cyruntime._cudaIpcGetEventHandle(handle, event) + * + * cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcOpenEventHandle(event, handle) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":44 + * return cyruntime._cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcGetMemHandle(handle, devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaIpcGetMemHandle(cudaIpcMemHandle_t *__pyx_v_handle, void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":45 + * + * cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaIpcGetMemHandle(handle, devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetMemHandle(__pyx_v_handle, __pyx_v_devPtr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 45, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":44 + * return cyruntime._cudaIpcOpenEventHandle(event, handle) + * + * cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcGetMemHandle(handle, devPtr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":47 + * return cyruntime._cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaIpcOpenMemHandle(void **__pyx_v_devPtr, cudaIpcMemHandle_t __pyx_v_handle, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":48 + * + * cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenMemHandle(__pyx_v_devPtr, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 48, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":47 + * return cyruntime._cudaIpcGetMemHandle(handle, devPtr) + * + * cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":50 + * return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcCloseMemHandle(devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaIpcCloseMemHandle(void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":51 + * + * cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaIpcCloseMemHandle(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcCloseMemHandle(__pyx_v_devPtr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":50 + * return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) + * + * cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaIpcCloseMemHandle(devPtr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":53 + * return cyruntime._cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceFlushGPUDirectRDMAWrites(enum cudaFlushGPUDirectRDMAWritesTarget __pyx_v_target, enum cudaFlushGPUDirectRDMAWritesScope __pyx_v_scope) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":54 + * + * cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceFlushGPUDirectRDMAWrites(((enum cudaFlushGPUDirectRDMAWritesTarget)__pyx_v_target), ((enum cudaFlushGPUDirectRDMAWritesScope)__pyx_v_scope)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":53 + * return cyruntime._cudaIpcCloseMemHandle(devPtr) + * + * cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":56 + * return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceRegisterAsyncNotification(int __pyx_v_device, cudaAsyncCallback __pyx_v_callbackFunc, void *__pyx_v_userData, cudaAsyncCallbackHandle_t *__pyx_v_callback) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":57 + * + * cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceRegisterAsyncNotification(__pyx_v_device, __pyx_v_callbackFunc, __pyx_v_userData, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":56 + * return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + * + * cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceRegisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":59 + * return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceUnregisterAsyncNotification(int __pyx_v_device, cudaAsyncCallbackHandle_t __pyx_v_callback) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":60 + * + * cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceUnregisterAsyncNotification(__pyx_v_device, __pyx_v_callback); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 60, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":59 + * return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + * + * cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceUnregisterAsyncNotification", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":62 + * return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetSharedMemConfig(enum cudaSharedMemConfig *__pyx_v_pConfig) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":63 + * + * cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetSharedMemConfig(((enum cudaSharedMemConfig *)__pyx_v_pConfig)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":62 + * return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) + * + * cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":65 + * return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetSharedMemConfig(config) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetSharedMemConfig(enum cudaSharedMemConfig __pyx_v_config) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":66 + * + * cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSetSharedMemConfig(config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetSharedMemConfig(((enum cudaSharedMemConfig)__pyx_v_config)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":65 + * return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) + * + * cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetSharedMemConfig(config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":68 + * return cyruntime._cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetLastError() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetLastError(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":69 + * + * cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetLastError() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetLastError(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 69, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":68 + * return cyruntime._cudaDeviceSetSharedMemConfig(config) + * + * cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetLastError() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":71 + * return cyruntime._cudaGetLastError() + * + * cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaPeekAtLastError() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaPeekAtLastError(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":72 + * + * cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaPeekAtLastError() # <<<<<<<<<<<<<< + * + * cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPeekAtLastError(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":71 + * return cyruntime._cudaGetLastError() + * + * cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaPeekAtLastError() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaPeekAtLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":74 + * return cyruntime._cudaPeekAtLastError() + * + * cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetErrorName(error) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_9cyruntime_cudaGetErrorName(cudaError_t __pyx_v_error) { + char const *__pyx_r; + char const *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":75 + * + * cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: + * return cyruntime._cudaGetErrorName(error) # <<<<<<<<<<<<<< + * + * cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorName(((cudaError_t)__pyx_v_error)); if (unlikely(__pyx_t_1 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":74 + * return cyruntime._cudaPeekAtLastError() + * + * cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetErrorName(error) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":77 + * return cyruntime._cudaGetErrorName(error) + * + * cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetErrorString(error) + * +*/ + +static char const *__pyx_f_4cuda_8bindings_9cyruntime_cudaGetErrorString(cudaError_t __pyx_v_error) { + char const *__pyx_r; + char const *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":78 + * + * cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil: + * return cyruntime._cudaGetErrorString(error) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorString(((cudaError_t)__pyx_v_error)); if (unlikely(__pyx_t_1 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":77 + * return cyruntime._cudaGetErrorName(error) + * + * cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetErrorString(error) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":80 + * return cyruntime._cudaGetErrorString(error) + * + * cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceCount(count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceCount(int *__pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":81 + * + * cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDeviceCount(count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceCount(__pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":80 + * return cyruntime._cudaGetErrorString(error) + * + * cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceCount(count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDeviceCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":83 + * return cyruntime._cudaGetDeviceCount(count) + * + * cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceProperties_v2(prop, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceProperties(struct cudaDeviceProp *__pyx_v_prop, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":84 + * + * cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDeviceProperties_v2(prop, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceProperties_v2(__pyx_v_prop, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":83 + * return cyruntime._cudaGetDeviceCount(count) + * + * cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceProperties_v2(prop, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDeviceProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":86 + * return cyruntime._cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetAttribute(value, attr, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetAttribute(int *__pyx_v_value, enum cudaDeviceAttr __pyx_v_attr, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":87 + * + * cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetAttribute(value, attr, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetAttribute(__pyx_v_value, ((enum cudaDeviceAttr)__pyx_v_attr), __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":86 + * return cyruntime._cudaGetDeviceProperties_v2(prop, device) + * + * cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetAttribute(value, attr, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":89 + * return cyruntime._cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetDefaultMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":90 + * + * cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetDefaultMemPool(__pyx_v_memPool, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":89 + * return cyruntime._cudaDeviceGetAttribute(value, attr, device) + * + * cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":92 + * return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetMemPool(device, memPool) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetMemPool(int __pyx_v_device, cudaMemPool_t __pyx_v_memPool) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":93 + * + * cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSetMemPool(device, memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetMemPool(__pyx_v_device, __pyx_v_memPool); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":92 + * return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) + * + * cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetMemPool(device, memPool) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":95 + * return cyruntime._cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetMemPool(memPool, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetMemPool(cudaMemPool_t *__pyx_v_memPool, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":96 + * + * cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetMemPool(memPool, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetMemPool(__pyx_v_memPool, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":95 + * return cyruntime._cudaDeviceSetMemPool(device, memPool) + * + * cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetMemPool(memPool, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":98 + * return cyruntime._cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, int __pyx_v_device, int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":99 + * + * cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_device, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":98 + * return cyruntime._cudaDeviceGetMemPool(memPool, device) + * + * cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":101 + * return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetP2PAttribute(int *__pyx_v_value, enum cudaDeviceP2PAttr __pyx_v_attr, int __pyx_v_srcDevice, int __pyx_v_dstDevice) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":102 + * + * cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetP2PAttribute(__pyx_v_value, ((enum cudaDeviceP2PAttr)__pyx_v_attr), __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":101 + * return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + * + * cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":104 + * return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaChooseDevice(device, prop) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaChooseDevice(int *__pyx_v_device, struct cudaDeviceProp const *__pyx_v_prop) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":105 + * + * cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaChooseDevice(device, prop) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaChooseDevice(__pyx_v_device, __pyx_v_prop); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":104 + * return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + * + * cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaChooseDevice(device, prop) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaChooseDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":107 + * return cyruntime._cudaChooseDevice(device, prop) + * + * cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaInitDevice(device, deviceFlags, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaInitDevice(int __pyx_v_device, unsigned int __pyx_v_deviceFlags, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":108 + * + * cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaInitDevice(device, deviceFlags, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaInitDevice(__pyx_v_device, __pyx_v_deviceFlags, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":107 + * return cyruntime._cudaChooseDevice(device, prop) + * + * cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaInitDevice(device, deviceFlags, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaInitDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":110 + * return cyruntime._cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSetDevice(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaSetDevice(int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":111 + * + * cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaSetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDevice(__pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":110 + * return cyruntime._cudaInitDevice(device, deviceFlags, flags) + * + * cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSetDevice(device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaSetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":113 + * return cyruntime._cudaSetDevice(device) + * + * cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDevice(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDevice(int *__pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":114 + * + * cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDevice(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDevice(__pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":113 + * return cyruntime._cudaSetDevice(device) + * + * cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDevice(device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":116 + * return cyruntime._cudaGetDevice(device) + * + * cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSetDeviceFlags(flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaSetDeviceFlags(unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":117 + * + * cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaSetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDeviceFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":116 + * return cyruntime._cudaGetDevice(device) + * + * cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSetDeviceFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaSetDeviceFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":119 + * return cyruntime._cudaSetDeviceFlags(flags) + * + * cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceFlags(flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceFlags(unsigned int *__pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":120 + * + * cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDeviceFlags(flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":119 + * return cyruntime._cudaSetDeviceFlags(flags) + * + * cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDeviceFlags(flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDeviceFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":122 + * return cyruntime._cudaGetDeviceFlags(flags) + * + * cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreate(pStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreate(cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":123 + * + * cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamCreate(pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreate(__pyx_v_pStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":122 + * return cyruntime._cudaGetDeviceFlags(flags) + * + * cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreate(pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":125 + * return cyruntime._cudaStreamCreate(pStream) + * + * cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreateWithFlags(pStream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreateWithFlags(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":126 + * + * cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamCreateWithFlags(pStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithFlags(__pyx_v_pStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":125 + * return cyruntime._cudaStreamCreate(pStream) + * + * cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreateWithFlags(pStream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamCreateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":128 + * return cyruntime._cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreateWithPriority(cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_flags, int __pyx_v_priority) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":129 + * + * cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithPriority(__pyx_v_pStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":128 + * return cyruntime._cudaStreamCreateWithFlags(pStream, flags) + * + * cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":131 + * return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetPriority(hStream, priority) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetPriority(cudaStream_t __pyx_v_hStream, int *__pyx_v_priority) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":132 + * + * cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetPriority(hStream, priority) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":131 + * return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) + * + * cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetPriority(hStream, priority) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":134 + * return cyruntime._cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetFlags(hStream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetFlags(cudaStream_t __pyx_v_hStream, unsigned int *__pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":135 + * + * cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetFlags(hStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":134 + * return cyruntime._cudaStreamGetPriority(hStream, priority) + * + * cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetFlags(hStream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":137 + * return cyruntime._cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetId(hStream, streamId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetId(cudaStream_t __pyx_v_hStream, unsigned PY_LONG_LONG *__pyx_v_streamId) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":138 + * + * cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetId(hStream, streamId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetId(__pyx_v_hStream, __pyx_v_streamId); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":137 + * return cyruntime._cudaStreamGetFlags(hStream, flags) + * + * cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetId(hStream, streamId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":140 + * return cyruntime._cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetDevice(hStream, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetDevice(cudaStream_t __pyx_v_hStream, int *__pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":141 + * + * cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetDevice(hStream, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetDevice(__pyx_v_hStream, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":140 + * return cyruntime._cudaStreamGetId(hStream, streamId) + * + * cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetDevice(hStream, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":143 + * return cyruntime._cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCtxResetPersistingL2Cache() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaCtxResetPersistingL2Cache(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":144 + * + * cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaCtxResetPersistingL2Cache() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCtxResetPersistingL2Cache(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":143 + * return cyruntime._cudaStreamGetDevice(hStream, device) + * + * cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCtxResetPersistingL2Cache() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":146 + * return cyruntime._cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCopyAttributes(dst, src) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCopyAttributes(cudaStream_t __pyx_v_dst, cudaStream_t __pyx_v_src) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":147 + * + * cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamCopyAttributes(dst, src) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":146 + * return cyruntime._cudaCtxResetPersistingL2Cache() + * + * cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamCopyAttributes(dst, src) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":149 + * return cyruntime._cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue *__pyx_v_value_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":150 + * + * cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetAttribute(__pyx_v_hStream, ((__pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID)__pyx_v_attr), __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":149 + * return cyruntime._cudaStreamCopyAttributes(dst, src) + * + * cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":152 + * return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamSetAttribute(hStream, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamSetAttribute(cudaStream_t __pyx_v_hStream, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue const *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":153 + * + * cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamSetAttribute(hStream, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSetAttribute(__pyx_v_hStream, ((__pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 153, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":152 + * return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) + * + * cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamSetAttribute(hStream, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":155 + * return cyruntime._cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamDestroy(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamDestroy(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":156 + * + * cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamDestroy(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamDestroy(__pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 156, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":155 + * return cyruntime._cudaStreamSetAttribute(hStream, attr, value) + * + * cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamDestroy(stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":158 + * return cyruntime._cudaStreamDestroy(stream) + * + * cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamWaitEvent(stream, event, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamWaitEvent(cudaStream_t __pyx_v_stream, cudaEvent_t __pyx_v_event, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":159 + * + * cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamWaitEvent(stream, event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamWaitEvent(__pyx_v_stream, __pyx_v_event, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":158 + * return cyruntime._cudaStreamDestroy(stream) + * + * cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamWaitEvent(stream, event, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":161 + * return cyruntime._cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamAddCallback(cudaStream_t __pyx_v_stream, cudaStreamCallback_t __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":162 + * + * cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAddCallback(__pyx_v_stream, ((cudaStreamCallback_t)__pyx_v_callback), __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":161 + * return cyruntime._cudaStreamWaitEvent(stream, event, flags) + * + * cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":164 + * return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamSynchronize(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamSynchronize(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":165 + * + * cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamSynchronize(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSynchronize(__pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":164 + * return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) + * + * cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamSynchronize(stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":167 + * return cyruntime._cudaStreamSynchronize(stream) + * + * cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamQuery(stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamQuery(cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":168 + * + * cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamQuery(stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamQuery(__pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":167 + * return cyruntime._cudaStreamSynchronize(stream) + * + * cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamQuery(stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":170 + * return cyruntime._cudaStreamQuery(stream) + * + * cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamAttachMemAsync(cudaStream_t __pyx_v_stream, void *__pyx_v_devPtr, size_t __pyx_v_length, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":171 + * + * cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAttachMemAsync(__pyx_v_stream, __pyx_v_devPtr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":170 + * return cyruntime._cudaStreamQuery(stream) + * + * cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":173 + * return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamBeginCapture(stream, mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamBeginCapture(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureMode __pyx_v_mode) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":174 + * + * cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamBeginCapture(stream, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCapture(__pyx_v_stream, ((enum cudaStreamCaptureMode)__pyx_v_mode)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 174, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":173 + * return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + * + * cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamBeginCapture(stream, mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":176 + * return cyruntime._cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamBeginCaptureToGraph(cudaStream_t __pyx_v_stream, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, enum cudaStreamCaptureMode __pyx_v_mode) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":177 + * + * cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCaptureToGraph(__pyx_v_stream, __pyx_v_graph, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, ((enum cudaStreamCaptureMode)__pyx_v_mode)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":176 + * return cyruntime._cudaStreamBeginCapture(stream, mode) + * + * cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamBeginCaptureToGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":179 + * return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaThreadExchangeStreamCaptureMode(enum cudaStreamCaptureMode *__pyx_v_mode) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":180 + * + * cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaThreadExchangeStreamCaptureMode(((enum cudaStreamCaptureMode *)__pyx_v_mode)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":179 + * return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + * + * cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":182 + * return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamEndCapture(stream, pGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamEndCapture(cudaStream_t __pyx_v_stream, cudaGraph_t *__pyx_v_pGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":183 + * + * cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamEndCapture(stream, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamEndCapture(__pyx_v_stream, __pyx_v_pGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":182 + * return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) + * + * cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamEndCapture(stream, pGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":185 + * return cyruntime._cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamIsCapturing(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_pCaptureStatus) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":186 + * + * cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamIsCapturing(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_pCaptureStatus)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":185 + * return cyruntime._cudaStreamEndCapture(stream, pGraph) + * + * cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":188 + * return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetCaptureInfo(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":189 + * + * cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v2(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_captureStatus_out), __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":188 + * return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) + * + * cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetCaptureInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":191 + * return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetCaptureInfo_v3(cudaStream_t __pyx_v_stream, enum cudaStreamCaptureStatus *__pyx_v_captureStatus_out, unsigned PY_LONG_LONG *__pyx_v_id_out, cudaGraph_t *__pyx_v_graph_out, cudaGraphNode_t const **__pyx_v_dependencies_out, cudaGraphEdgeData const **__pyx_v_edgeData_out, size_t *__pyx_v_numDependencies_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":192 + * + * cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v3(__pyx_v_stream, ((enum cudaStreamCaptureStatus *)__pyx_v_captureStatus_out), __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_edgeData_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":191 + * return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + * + * cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamGetCaptureInfo_v3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":194 + * return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamUpdateCaptureDependencies(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":195 + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":194 + * return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":197 + * return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaStreamUpdateCaptureDependencies_v2(cudaStream_t __pyx_v_stream, cudaGraphNode_t *__pyx_v_dependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":198 + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies_v2(__pyx_v_stream, __pyx_v_dependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":197 + * return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + * + * cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaStreamUpdateCaptureDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":200 + * return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreate(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreate(cudaEvent_t *__pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":201 + * + * cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventCreate(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreate(__pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":200 + * return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + * + * cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreate(event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":203 + * return cyruntime._cudaEventCreate(event) + * + * cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreateWithFlags(event, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreateWithFlags(cudaEvent_t *__pyx_v_event, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":204 + * + * cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventCreateWithFlags(event, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateWithFlags(__pyx_v_event, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":203 + * return cyruntime._cudaEventCreate(event) + * + * cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreateWithFlags(event, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventCreateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":206 + * return cyruntime._cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventRecord(event, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventRecord(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":207 + * + * cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventRecord(event, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecord(__pyx_v_event, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":206 + * return cyruntime._cudaEventCreateWithFlags(event, flags) + * + * cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventRecord(event, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":209 + * return cyruntime._cudaEventRecord(event, stream) + * + * cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventRecordWithFlags(event, stream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventRecordWithFlags(cudaEvent_t __pyx_v_event, cudaStream_t __pyx_v_stream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":210 + * + * cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventRecordWithFlags(event, stream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecordWithFlags(__pyx_v_event, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":209 + * return cyruntime._cudaEventRecord(event, stream) + * + * cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventRecordWithFlags(event, stream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":212 + * return cyruntime._cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventQuery(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventQuery(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":213 + * + * cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventQuery(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventQuery(__pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":212 + * return cyruntime._cudaEventRecordWithFlags(event, stream, flags) + * + * cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventQuery(event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":215 + * return cyruntime._cudaEventQuery(event) + * + * cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventSynchronize(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventSynchronize(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":216 + * + * cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventSynchronize(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventSynchronize(__pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":215 + * return cyruntime._cudaEventQuery(event) + * + * cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventSynchronize(event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":218 + * return cyruntime._cudaEventSynchronize(event) + * + * cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventDestroy(event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventDestroy(cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":219 + * + * cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventDestroy(event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventDestroy(__pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":218 + * return cyruntime._cudaEventSynchronize(event) + * + * cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventDestroy(event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":221 + * return cyruntime._cudaEventDestroy(event) + * + * cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventElapsedTime(ms, start, end) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventElapsedTime(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":222 + * + * cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventElapsedTime(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime(__pyx_v_ms, __pyx_v_start, __pyx_v_end); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":221 + * return cyruntime._cudaEventDestroy(event) + * + * cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventElapsedTime(ms, start, end) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":224 + * return cyruntime._cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventElapsedTime_v2(ms, start, end) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventElapsedTime_v2(float *__pyx_v_ms, cudaEvent_t __pyx_v_start, cudaEvent_t __pyx_v_end) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":225 + * + * cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventElapsedTime_v2(ms, start, end) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime_v2(__pyx_v_ms, __pyx_v_start, __pyx_v_end); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":224 + * return cyruntime._cudaEventElapsedTime(ms, start, end) + * + * cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventElapsedTime_v2(ms, start, end) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventElapsedTime_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":227 + * return cyruntime._cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaImportExternalMemory(cudaExternalMemory_t *__pyx_v_extMem_out, struct cudaExternalMemoryHandleDesc const *__pyx_v_memHandleDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":228 + * + * cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":227 + * return cyruntime._cudaEventElapsedTime_v2(ms, start, end) + * + * cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":230 + * return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaExternalMemoryGetMappedBuffer(void **__pyx_v_devPtr, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryBufferDesc const *__pyx_v_bufferDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":231 + * + * cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":230 + * return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) + * + * cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":233 + * return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmap, cudaExternalMemory_t __pyx_v_extMem, struct cudaExternalMemoryMipmappedArrayDesc const *__pyx_v_mipmapDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":234 + * + * cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":233 + * return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + * + * cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":236 + * return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyExternalMemory(extMem) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyExternalMemory(cudaExternalMemory_t __pyx_v_extMem) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":237 + * + * cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDestroyExternalMemory(extMem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalMemory(__pyx_v_extMem); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":236 + * return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + * + * cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyExternalMemory(extMem) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":239 + * return cyruntime._cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaImportExternalSemaphore(cudaExternalSemaphore_t *__pyx_v_extSem_out, struct cudaExternalSemaphoreHandleDesc const *__pyx_v_semHandleDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":240 + * + * cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":239 + * return cyruntime._cudaDestroyExternalMemory(extMem) + * + * cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":242 + * return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaSignalExternalSemaphoresAsync(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreSignalParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":243 + * + * cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSignalExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":242 + * return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + * + * cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":245 + * return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaWaitExternalSemaphoresAsync(cudaExternalSemaphore_t const *__pyx_v_extSemArray, struct cudaExternalSemaphoreWaitParams const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":246 + * + * cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaWaitExternalSemaphoresAsync_v2(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":245 + * return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":248 + * return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyExternalSemaphore(extSem) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyExternalSemaphore(cudaExternalSemaphore_t __pyx_v_extSem) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":249 + * + * cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDestroyExternalSemaphore(extSem) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalSemaphore(__pyx_v_extSem); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":248 + * return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + * + * cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyExternalSemaphore(extSem) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":251 + * return cyruntime._cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetCacheConfig(void const *__pyx_v_func, enum cudaFuncCache __pyx_v_cacheConfig) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":252 + * + * cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetCacheConfig(__pyx_v_func, ((enum cudaFuncCache)__pyx_v_cacheConfig)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":251 + * return cyruntime._cudaDestroyExternalSemaphore(extSem) + * + * cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":254 + * return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncGetAttributes(attr, func) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFuncGetAttributes(struct cudaFuncAttributes *__pyx_v_attr, void const *__pyx_v_func) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":255 + * + * cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFuncGetAttributes(attr, func) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncGetAttributes(__pyx_v_attr, __pyx_v_func); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":254 + * return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) + * + * cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncGetAttributes(attr, func) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFuncGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":257 + * return cyruntime._cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetAttribute(func, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetAttribute(void const *__pyx_v_func, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":258 + * + * cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFuncSetAttribute(func, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetAttribute(__pyx_v_func, ((enum cudaFuncAttribute)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":257 + * return cyruntime._cudaFuncGetAttributes(attr, func) + * + * cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetAttribute(func, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":260 + * return cyruntime._cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLaunchHostFunc(stream, fn, userData) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLaunchHostFunc(cudaStream_t __pyx_v_stream, cudaHostFn_t __pyx_v_fn, void *__pyx_v_userData) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":261 + * + * cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLaunchHostFunc(stream, fn, userData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLaunchHostFunc(__pyx_v_stream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":260 + * return cyruntime._cudaFuncSetAttribute(func, attr, value) + * + * cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLaunchHostFunc(stream, fn, userData) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":263 + * return cyruntime._cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetSharedMemConfig(func, config) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetSharedMemConfig(void const *__pyx_v_func, enum cudaSharedMemConfig __pyx_v_config) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":264 + * + * cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFuncSetSharedMemConfig(func, config) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetSharedMemConfig(__pyx_v_func, ((enum cudaSharedMemConfig)__pyx_v_config)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":263 + * return cyruntime._cudaLaunchHostFunc(stream, fn, userData) + * + * cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFuncSetSharedMemConfig(func, config) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":266 + * return cyruntime._cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":267 + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":266 + * return cyruntime._cudaFuncSetSharedMemConfig(func, config) + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":269 + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, void const *__pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":270 + * + * cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":269 + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + * + * cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":272 + * return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, void const *__pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":273 + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":272 + * return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + * + * cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":275 + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocManaged(devPtr, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocManaged(void **__pyx_v_devPtr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":276 + * + * cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocManaged(devPtr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocManaged(__pyx_v_devPtr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":275 + * return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + * + * cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocManaged(devPtr, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":278 + * return cyruntime._cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc(devPtr, size) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc(void **__pyx_v_devPtr, size_t __pyx_v_size) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":279 + * + * cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMalloc(devPtr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc(__pyx_v_devPtr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":278 + * return cyruntime._cudaMallocManaged(devPtr, size, flags) + * + * cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc(devPtr, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMalloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":281 + * return cyruntime._cudaMalloc(devPtr, size) + * + * cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocHost(ptr, size) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocHost(void **__pyx_v_ptr, size_t __pyx_v_size) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":282 + * + * cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocHost(ptr, size) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocHost(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":281 + * return cyruntime._cudaMalloc(devPtr, size) + * + * cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocHost(ptr, size) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":284 + * return cyruntime._cudaMallocHost(ptr, size) + * + * cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocPitch(void **__pyx_v_devPtr, size_t *__pyx_v_pitch, size_t __pyx_v_width, size_t __pyx_v_height) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":285 + * + * cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocPitch(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":284 + * return cyruntime._cudaMallocHost(ptr, size) + * + * cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":287 + * return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocArray(array, desc, width, height, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, size_t __pyx_v_width, size_t __pyx_v_height, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":288 + * + * cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocArray(array, desc, width, height, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocArray(__pyx_v_array, __pyx_v_desc, __pyx_v_width, __pyx_v_height, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":287 + * return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) + * + * cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocArray(array, desc, width, height, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":290 + * return cyruntime._cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFree(devPtr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFree(void *__pyx_v_devPtr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":291 + * + * cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFree(devPtr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFree(__pyx_v_devPtr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":290 + * return cyruntime._cudaMallocArray(array, desc, width, height, flags) + * + * cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFree(devPtr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFree", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":293 + * return cyruntime._cudaFree(devPtr) + * + * cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeHost(ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFreeHost(void *__pyx_v_ptr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":294 + * + * cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFreeHost(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeHost(__pyx_v_ptr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":293 + * return cyruntime._cudaFree(devPtr) + * + * cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeHost(ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":296 + * return cyruntime._cudaFreeHost(ptr) + * + * cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeArray(array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFreeArray(cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":297 + * + * cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFreeArray(array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeArray(__pyx_v_array); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":296 + * return cyruntime._cudaFreeHost(ptr) + * + * cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeArray(array) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFreeArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":299 + * return cyruntime._cudaFreeArray(array) + * + * cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeMipmappedArray(mipmappedArray) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFreeMipmappedArray(cudaMipmappedArray_t __pyx_v_mipmappedArray) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":300 + * + * cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFreeMipmappedArray(mipmappedArray) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeMipmappedArray(__pyx_v_mipmappedArray); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":299 + * return cyruntime._cudaFreeArray(array) + * + * cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeMipmappedArray(mipmappedArray) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFreeMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":302 + * return cyruntime._cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostAlloc(pHost, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaHostAlloc(void **__pyx_v_pHost, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":303 + * + * cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaHostAlloc(pHost, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostAlloc(__pyx_v_pHost, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":302 + * return cyruntime._cudaFreeMipmappedArray(mipmappedArray) + * + * cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostAlloc(pHost, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":305 + * return cyruntime._cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostRegister(ptr, size, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaHostRegister(void *__pyx_v_ptr, size_t __pyx_v_size, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":306 + * + * cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaHostRegister(ptr, size, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostRegister(__pyx_v_ptr, __pyx_v_size, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":305 + * return cyruntime._cudaHostAlloc(pHost, size, flags) + * + * cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostRegister(ptr, size, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":308 + * return cyruntime._cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostUnregister(ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaHostUnregister(void *__pyx_v_ptr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":309 + * + * cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaHostUnregister(ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostUnregister(__pyx_v_ptr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":308 + * return cyruntime._cudaHostRegister(ptr, size, flags) + * + * cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostUnregister(ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":311 + * return cyruntime._cudaHostUnregister(ptr) + * + * cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaHostGetDevicePointer(void **__pyx_v_pDevice, void *__pyx_v_pHost, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":312 + * + * cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetDevicePointer(__pyx_v_pDevice, __pyx_v_pHost, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":311 + * return cyruntime._cudaHostUnregister(ptr) + * + * cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":314 + * return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostGetFlags(pFlags, pHost) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_pHost) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":315 + * + * cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaHostGetFlags(pFlags, pHost) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetFlags(__pyx_v_pFlags, __pyx_v_pHost); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":314 + * return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) + * + * cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaHostGetFlags(pFlags, pHost) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":317 + * return cyruntime._cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc3D(struct cudaPitchedPtr *__pyx_v_pitchedDevPtr, struct cudaExtent __pyx_v_extent) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":318 + * + * cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3D(__pyx_v_pitchedDevPtr, __pyx_v_extent); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":317 + * return cyruntime._cudaHostGetFlags(pFlags, pHost) + * + * cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMalloc3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":320 + * return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc3DArray(cudaArray_t *__pyx_v_array, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":321 + * + * cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3DArray(__pyx_v_array, __pyx_v_desc, __pyx_v_extent, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":320 + * return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) + * + * cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMalloc3DArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":323 + * return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, struct cudaChannelFormatDesc const *__pyx_v_desc, struct cudaExtent __pyx_v_extent, unsigned int __pyx_v_numLevels, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":324 + * + * cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_desc, __pyx_v_extent, __pyx_v_numLevels, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":323 + * return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) + * + * cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":326 + * return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetMipmappedArrayLevel(cudaArray_t *__pyx_v_levelArray, cudaMipmappedArray_const_t __pyx_v_mipmappedArray, unsigned int __pyx_v_level) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":327 + * + * cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetMipmappedArrayLevel(__pyx_v_levelArray, __pyx_v_mipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":326 + * return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + * + * cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetMipmappedArrayLevel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":329 + * return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3D(p) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3D(struct cudaMemcpy3DParms const *__pyx_v_p) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":330 + * + * cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy3D(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3D(__pyx_v_p); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":329 + * return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + * + * cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3D(p) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":332 + * return cyruntime._cudaMemcpy3D(p) + * + * cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DPeer(p) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DPeer(struct cudaMemcpy3DPeerParms const *__pyx_v_p) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":333 + * + * cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy3DPeer(p) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeer(__pyx_v_p); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":332 + * return cyruntime._cudaMemcpy3D(p) + * + * cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DPeer(p) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":335 + * return cyruntime._cudaMemcpy3DPeer(p) + * + * cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DAsync(p, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DAsync(struct cudaMemcpy3DParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":336 + * + * cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy3DAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DAsync(__pyx_v_p, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":335 + * return cyruntime._cudaMemcpy3DPeer(p) + * + * cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DAsync(p, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":338 + * return cyruntime._cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DPeerAsync(p, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DPeerAsync(struct cudaMemcpy3DPeerParms const *__pyx_v_p, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":339 + * + * cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy3DPeerAsync(p, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeerAsync(__pyx_v_p, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":338 + * return cyruntime._cudaMemcpy3DAsync(p, stream) + * + * cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DPeerAsync(p, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":341 + * return cyruntime._cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemGetInfo(free, total) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemGetInfo(size_t *__pyx_v_free, size_t *__pyx_v_total) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":342 + * + * cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemGetInfo(free, total) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemGetInfo(__pyx_v_free, __pyx_v_total); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":341 + * return cyruntime._cudaMemcpy3DPeerAsync(p, stream) + * + * cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemGetInfo(free, total) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":344 + * return cyruntime._cudaMemGetInfo(free, total) + * + * cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetInfo(struct cudaChannelFormatDesc *__pyx_v_desc, struct cudaExtent *__pyx_v_extent, unsigned int *__pyx_v_flags, cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":345 + * + * cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetInfo(__pyx_v_desc, __pyx_v_extent, __pyx_v_flags, __pyx_v_array); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":344 + * return cyruntime._cudaMemGetInfo(free, total) + * + * cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaArrayGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":347 + * return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetPlane(cudaArray_t *__pyx_v_pPlaneArray, cudaArray_t __pyx_v_hArray, unsigned int __pyx_v_planeIdx) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":348 + * + * cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":347 + * return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) + * + * cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":350 + * return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaArray_t __pyx_v_array, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":351 + * + * cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":350 + * return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + * + * cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":353 + * return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMipmappedArrayGetMemoryRequirements(struct cudaArrayMemoryRequirements *__pyx_v_memoryRequirements, cudaMipmappedArray_t __pyx_v_mipmap, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":354 + * + * cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":353 + * return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + * + * cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":356 + * return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaArray_t __pyx_v_array) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":357 + * + * cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":356 + * return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + * + * cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":359 + * return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMipmappedArrayGetSparseProperties(struct cudaArraySparseProperties *__pyx_v_sparseProperties, cudaMipmappedArray_t __pyx_v_mipmap) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":360 + * + * cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":359 + * return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) + * + * cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":362 + * return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy(dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":363 + * + * cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy(dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":362 + * return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + * + * cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy(dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":365 + * return cyruntime._cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyPeer(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":366 + * + * cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeer(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":365 + * return cyruntime._cudaMemcpy(dst, src, count, kind) + * + * cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":368 + * return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2D(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":369 + * + * cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2D(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":368 + * return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + * + * cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":371 + * return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":372 + * + * cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":371 + * return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":374 + * return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DFromArray(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":375 + * + * cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArray(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":374 + * return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":377 + * return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":378 + * + * cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":377 + * return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + * + * cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":380 + * return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyAsync(void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":381 + * + * cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 381, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":380 + * return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + * + * cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":383 + * return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyPeerAsync(void *__pyx_v_dst, int __pyx_v_dstDevice, void const *__pyx_v_src, int __pyx_v_srcDevice, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":384 + * + * cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeerAsync(__pyx_v_dst, __pyx_v_dstDevice, __pyx_v_src, __pyx_v_srcDevice, __pyx_v_count, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":383 + * return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) + * + * cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":386 + * return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyBatchAsync(void **__pyx_v_dsts, void **__pyx_v_srcs, size_t *__pyx_v_sizes, size_t __pyx_v_count, struct cudaMemcpyAttributes *__pyx_v_attrs, size_t *__pyx_v_attrsIdxs, size_t __pyx_v_numAttrs, size_t *__pyx_v_failIdx, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":387 + * + * cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyBatchAsync(__pyx_v_dsts, __pyx_v_srcs, __pyx_v_sizes, __pyx_v_count, __pyx_v_attrs, __pyx_v_attrsIdxs, __pyx_v_numAttrs, __pyx_v_failIdx, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":386 + * return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + * + * cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":389 + * return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DBatchAsync(size_t __pyx_v_numOps, struct cudaMemcpy3DBatchOp *__pyx_v_opList, size_t *__pyx_v_failIdx, unsigned PY_LONG_LONG __pyx_v_flags, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":390 + * + * cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DBatchAsync(__pyx_v_numOps, __pyx_v_opList, __pyx_v_failIdx, __pyx_v_flags, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 390, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":389 + * return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + * + * cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy3DBatchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":392 + * return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":393 + * + * cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":392 + * return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + * + * cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":395 + * return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_spitch, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":396 + * + * cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_spitch, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":395 + * return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DToArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":398 + * return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DFromArrayAsync(void *__pyx_v_dst, size_t __pyx_v_dpitch, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_width, size_t __pyx_v_height, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":399 + * + * cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArrayAsync(__pyx_v_dst, __pyx_v_dpitch, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_width, __pyx_v_height, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":398 + * return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + * + * cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpy2DFromArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":401 + * return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset(devPtr, value, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemset(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":402 + * + * cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemset(devPtr, value, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":401 + * return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + * + * cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset(devPtr, value, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":404 + * return cyruntime._cudaMemset(devPtr, value, count) + * + * cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemset2D(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":405 + * + * cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2D(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":404 + * return cyruntime._cudaMemset(devPtr, value, count) + * + * cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemset2D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":407 + * return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemset3D(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":408 + * + * cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3D(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":407 + * return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) + * + * cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemset3D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":410 + * return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemsetAsync(void *__pyx_v_devPtr, int __pyx_v_value, size_t __pyx_v_count, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":411 + * + * cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemsetAsync(__pyx_v_devPtr, __pyx_v_value, __pyx_v_count, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":410 + * return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) + * + * cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemsetAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":413 + * return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemset2DAsync(void *__pyx_v_devPtr, size_t __pyx_v_pitch, int __pyx_v_value, size_t __pyx_v_width, size_t __pyx_v_height, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":414 + * + * cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2DAsync(__pyx_v_devPtr, __pyx_v_pitch, __pyx_v_value, __pyx_v_width, __pyx_v_height, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":413 + * return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) + * + * cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemset2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":416 + * return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemset3DAsync(struct cudaPitchedPtr __pyx_v_pitchedDevPtr, int __pyx_v_value, struct cudaExtent __pyx_v_extent, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":417 + * + * cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3DAsync(__pyx_v_pitchedDevPtr, __pyx_v_value, __pyx_v_extent, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":416 + * return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + * + * cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemset3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":419 + * return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPrefetchAsync(void const *__pyx_v_devPtr, size_t __pyx_v_count, int __pyx_v_dstDevice, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":420 + * + * cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":419 + * return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + * + * cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":422 + * return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPrefetchAsync_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, struct cudaMemLocation __pyx_v_location, unsigned int __pyx_v_flags, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":423 + * + * cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync_v2(__pyx_v_devPtr, __pyx_v_count, __pyx_v_location, __pyx_v_flags, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":422 + * return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + * + * cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPrefetchAsync_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":425 + * return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemAdvise(devPtr, count, advice, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemAdvise(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":426 + * + * cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemAdvise(devPtr, count, advice, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise(__pyx_v_devPtr, __pyx_v_count, ((enum cudaMemoryAdvise)__pyx_v_advice), __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":425 + * return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + * + * cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemAdvise(devPtr, count, advice, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":428 + * return cyruntime._cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemAdvise_v2(void const *__pyx_v_devPtr, size_t __pyx_v_count, enum cudaMemoryAdvise __pyx_v_advice, struct cudaMemLocation __pyx_v_location) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":429 + * + * cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise_v2(__pyx_v_devPtr, __pyx_v_count, ((enum cudaMemoryAdvise)__pyx_v_advice), __pyx_v_location); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":428 + * return cyruntime._cudaMemAdvise(devPtr, count, advice, device) + * + * cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemAdvise_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":431 + * return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, enum cudaMemRangeAttribute __pyx_v_attribute, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":432 + * + * cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, ((enum cudaMemRangeAttribute)__pyx_v_attribute), __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":431 + * return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) + * + * cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":434 + * return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, enum cudaMemRangeAttribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, void const *__pyx_v_devPtr, size_t __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":435 + * + * cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, ((enum cudaMemRangeAttribute *)__pyx_v_attributes), __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":434 + * return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + * + * cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":437 + * return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":438 + * + * cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArray(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":437 + * return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + * + * cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":440 + * return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyFromArray(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":441 + * + * cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArray(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":440 + * return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + * + * cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyFromArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":443 + * return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyArrayToArray(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffsetDst, size_t __pyx_v_hOffsetDst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffsetSrc, size_t __pyx_v_hOffsetSrc, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":444 + * + * cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyArrayToArray(__pyx_v_dst, __pyx_v_wOffsetDst, __pyx_v_hOffsetDst, __pyx_v_src, __pyx_v_wOffsetSrc, __pyx_v_hOffsetSrc, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":443 + * return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + * + * cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyArrayToArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":446 + * return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyToArrayAsync(cudaArray_t __pyx_v_dst, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":447 + * + * cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArrayAsync(__pyx_v_dst, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":446 + * return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + * + * cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyToArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":449 + * return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyFromArrayAsync(void *__pyx_v_dst, cudaArray_const_t __pyx_v_src, size_t __pyx_v_wOffset, size_t __pyx_v_hOffset, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":450 + * + * cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArrayAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_wOffset, __pyx_v_hOffset, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind), __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":449 + * return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + * + * cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemcpyFromArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":452 + * return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocAsync(devPtr, size, hStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocAsync(void **__pyx_v_devPtr, size_t __pyx_v_size, cudaStream_t __pyx_v_hStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":453 + * + * cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocAsync(devPtr, size, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocAsync(__pyx_v_devPtr, __pyx_v_size, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 453, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":452 + * return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + * + * cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocAsync(devPtr, size, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":455 + * return cyruntime._cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeAsync(devPtr, hStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaFreeAsync(void *__pyx_v_devPtr, cudaStream_t __pyx_v_hStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":456 + * + * cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaFreeAsync(devPtr, hStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeAsync(__pyx_v_devPtr, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":455 + * return cyruntime._cudaMallocAsync(devPtr, size, hStream) + * + * cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaFreeAsync(devPtr, hStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":458 + * return cyruntime._cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolTrimTo(cudaMemPool_t __pyx_v_memPool, size_t __pyx_v_minBytesToKeep) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":459 + * + * cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolTrimTo(__pyx_v_memPool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 459, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":458 + * return cyruntime._cudaFreeAsync(devPtr, hStream) + * + * cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":461 + * return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolSetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":462 + * + * cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAttribute(__pyx_v_memPool, ((enum cudaMemPoolAttr)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":461 + * return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) + * + * cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":464 + * return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolGetAttribute(cudaMemPool_t __pyx_v_memPool, enum cudaMemPoolAttr __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":465 + * + * cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAttribute(__pyx_v_memPool, ((enum cudaMemPoolAttr)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":464 + * return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) + * + * cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":467 + * return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolSetAccess(cudaMemPool_t __pyx_v_memPool, struct cudaMemAccessDesc const *__pyx_v_descList, size_t __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":468 + * + * cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAccess(__pyx_v_memPool, __pyx_v_descList, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":467 + * return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) + * + * cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":470 + * return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolGetAccess(enum cudaMemAccessFlags *__pyx_v_flags, cudaMemPool_t __pyx_v_memPool, struct cudaMemLocation *__pyx_v_location) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":471 + * + * cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAccess(((enum cudaMemAccessFlags *)__pyx_v_flags), __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 471, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":470 + * return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) + * + * cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":473 + * return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolCreate(memPool, poolProps) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolCreate(cudaMemPool_t *__pyx_v_memPool, struct cudaMemPoolProps const *__pyx_v_poolProps) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":474 + * + * cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolCreate(memPool, poolProps) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolCreate(__pyx_v_memPool, __pyx_v_poolProps); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":473 + * return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) + * + * cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolCreate(memPool, poolProps) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":476 + * return cyruntime._cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolDestroy(memPool) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolDestroy(cudaMemPool_t __pyx_v_memPool) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":477 + * + * cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolDestroy(memPool) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolDestroy(__pyx_v_memPool); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":476 + * return cyruntime._cudaMemPoolCreate(memPool, poolProps) + * + * cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolDestroy(memPool) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":479 + * return cyruntime._cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMallocFromPoolAsync(void **__pyx_v_ptr, size_t __pyx_v_size, cudaMemPool_t __pyx_v_memPool, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":480 + * + * cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocFromPoolAsync(__pyx_v_ptr, __pyx_v_size, __pyx_v_memPool, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 480, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":479 + * return cyruntime._cudaMemPoolDestroy(memPool) + * + * cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMallocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":482 + * return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolExportToShareableHandle(void *__pyx_v_shareableHandle, cudaMemPool_t __pyx_v_memPool, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":483 + * + * cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_memPool, ((enum cudaMemAllocationHandleType)__pyx_v_handleType), __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":482 + * return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + * + * cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":485 + * return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolImportFromShareableHandle(cudaMemPool_t *__pyx_v_memPool, void *__pyx_v_shareableHandle, enum cudaMemAllocationHandleType __pyx_v_handleType, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":486 + * + * cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportFromShareableHandle(__pyx_v_memPool, __pyx_v_shareableHandle, ((enum cudaMemAllocationHandleType)__pyx_v_handleType), __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":485 + * return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + * + * cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":488 + * return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolExportPointer(exportData, ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolExportPointer(struct cudaMemPoolPtrExportData *__pyx_v_exportData, void *__pyx_v_ptr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":489 + * + * cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolExportPointer(exportData, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportPointer(__pyx_v_exportData, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":488 + * return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + * + * cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolExportPointer(exportData, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":491 + * return cyruntime._cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolImportPointer(void **__pyx_v_ptr, cudaMemPool_t __pyx_v_memPool, struct cudaMemPoolPtrExportData *__pyx_v_exportData) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":492 + * + * cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportPointer(__pyx_v_ptr, __pyx_v_memPool, __pyx_v_exportData); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":491 + * return cyruntime._cudaMemPoolExportPointer(exportData, ptr) + * + * cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":494 + * return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaPointerGetAttributes(attributes, ptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaPointerGetAttributes(struct cudaPointerAttributes *__pyx_v_attributes, void const *__pyx_v_ptr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":495 + * + * cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaPointerGetAttributes(attributes, ptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPointerGetAttributes(__pyx_v_attributes, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":494 + * return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) + * + * cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaPointerGetAttributes(attributes, ptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":497 + * return cyruntime._cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, int __pyx_v_device, int __pyx_v_peerDevice) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":498 + * + * cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_device, __pyx_v_peerDevice); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":497 + * return cyruntime._cudaPointerGetAttributes(attributes, ptr) + * + * cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":500 + * return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceEnablePeerAccess(int __pyx_v_peerDevice, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":501 + * + * cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceEnablePeerAccess(__pyx_v_peerDevice, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":500 + * return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + * + * cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":503 + * return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceDisablePeerAccess(int __pyx_v_peerDevice) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":504 + * + * cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceDisablePeerAccess(__pyx_v_peerDevice); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":503 + * return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) + * + * cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":506 + * return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsUnregisterResource(resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsUnregisterResource(cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":507 + * + * cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsUnregisterResource(resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnregisterResource(__pyx_v_resource); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":506 + * return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) + * + * cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsUnregisterResource(resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":509 + * return cyruntime._cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":510 + * + * cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceSetMapFlags(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":509 + * return cyruntime._cudaGraphicsUnregisterResource(resource) + * + * cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":512 + * return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsMapResources(count, resources, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsMapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":513 + * + * cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsMapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":512 + * return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) + * + * cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsMapResources(count, resources, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":515 + * return cyruntime._cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsUnmapResources(int __pyx_v_count, cudaGraphicsResource_t *__pyx_v_resources, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":516 + * + * cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":515 + * return cyruntime._cudaGraphicsMapResources(count, resources, stream) + * + * cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":518 + * return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedPointer(void **__pyx_v_devPtr, size_t *__pyx_v_size, cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":519 + * + * cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedPointer(__pyx_v_devPtr, __pyx_v_size, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":518 + * return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":521 + * return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsSubResourceGetMappedArray(cudaArray_t *__pyx_v_array, cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":522 + * + * cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsSubResourceGetMappedArray(__pyx_v_array, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":521 + * return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + * + * cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":524 + * return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t *__pyx_v_mipmappedArray, cudaGraphicsResource_t __pyx_v_resource) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":525 + * + * cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedMipmappedArray(__pyx_v_mipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":524 + * return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":527 + * return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetChannelDesc(struct cudaChannelFormatDesc *__pyx_v_desc, cudaArray_const_t __pyx_v_array) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":528 + * + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetChannelDesc(desc, array) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetChannelDesc(__pyx_v_desc, __pyx_v_array); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":527 + * return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + * + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetChannelDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":529 + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) +*/ + +static struct cudaChannelFormatDesc __pyx_f_4cuda_8bindings_9cyruntime_cudaCreateChannelDesc(int __pyx_v_x, int __pyx_v_y, int __pyx_v_z, int __pyx_v_w, enum cudaChannelFormatKind __pyx_v_f) { + struct cudaChannelFormatDesc __pyx_r; + struct cudaChannelFormatDesc __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":531 + * @cython.show_performance_hints(False) + * cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateChannelDesc(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w, ((enum cudaChannelFormatKind)__pyx_v_f)); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":529 + * cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetChannelDesc(desc, array) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + * return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaCreateChannelDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":533 + * return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaCreateTextureObject(cudaTextureObject_t *__pyx_v_pTexObject, struct cudaResourceDesc const *__pyx_v_pResDesc, struct cudaTextureDesc const *__pyx_v_pTexDesc, struct cudaResourceViewDesc const *__pyx_v_pResViewDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":534 + * + * cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateTextureObject(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":533 + * return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) + * + * cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaCreateTextureObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":536 + * return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyTextureObject(texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyTextureObject(cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":537 + * + * cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDestroyTextureObject(texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyTextureObject(__pyx_v_texObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":536 + * return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + * + * cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroyTextureObject(texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDestroyTextureObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":539 + * return cyruntime._cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":540 + * + * cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":539 + * return cyruntime._cudaDestroyTextureObject(texObject) + * + * cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetTextureObjectResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":542 + * return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectTextureDesc(struct cudaTextureDesc *__pyx_v_pTexDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":543 + * + * cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":542 + * return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + * + * cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetTextureObjectTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":545 + * return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectResourceViewDesc(struct cudaResourceViewDesc *__pyx_v_pResViewDesc, cudaTextureObject_t __pyx_v_texObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":546 + * + * cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":545 + * return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + * + * cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetTextureObjectResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":548 + * return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaCreateSurfaceObject(cudaSurfaceObject_t *__pyx_v_pSurfObject, struct cudaResourceDesc const *__pyx_v_pResDesc) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":549 + * + * cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateSurfaceObject(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 549, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":548 + * return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + * + * cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaCreateSurfaceObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":551 + * return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroySurfaceObject(surfObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDestroySurfaceObject(cudaSurfaceObject_t __pyx_v_surfObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":552 + * + * cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDestroySurfaceObject(surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroySurfaceObject(__pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":551 + * return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) + * + * cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDestroySurfaceObject(surfObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDestroySurfaceObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":554 + * return cyruntime._cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetSurfaceObjectResourceDesc(struct cudaResourceDesc *__pyx_v_pResDesc, cudaSurfaceObject_t __pyx_v_surfObject) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":555 + * + * cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetSurfaceObjectResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":554 + * return cyruntime._cudaDestroySurfaceObject(surfObject) + * + * cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetSurfaceObjectResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":557 + * return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDriverGetVersion(driverVersion) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDriverGetVersion(int *__pyx_v_driverVersion) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":558 + * + * cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDriverGetVersion(driverVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDriverGetVersion(__pyx_v_driverVersion); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":557 + * return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + * + * cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDriverGetVersion(driverVersion) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":560 + * return cyruntime._cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaRuntimeGetVersion(runtimeVersion) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaRuntimeGetVersion(int *__pyx_v_runtimeVersion) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":561 + * + * cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaRuntimeGetVersion(runtimeVersion) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaRuntimeGetVersion(__pyx_v_runtimeVersion); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":560 + * return cyruntime._cudaDriverGetVersion(driverVersion) + * + * cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaRuntimeGetVersion(runtimeVersion) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaRuntimeGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":563 + * return cyruntime._cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphCreate(pGraph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphCreate(cudaGraph_t *__pyx_v_pGraph, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":564 + * + * cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphCreate(pGraph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphCreate(__pyx_v_pGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":563 + * return cyruntime._cudaRuntimeGetVersion(runtimeVersion) + * + * cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphCreate(pGraph, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":566 + * return cyruntime._cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddKernelNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":567 + * + * cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddKernelNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":566 + * return cyruntime._cudaGraphCreate(pGraph, flags) + * + * cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":569 + * return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":570 + * + * cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":569 + * return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":572 + * return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":573 + * + * cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 573, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":572 + * return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":575 + * return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t __pyx_v_hSrc, cudaGraphNode_t __pyx_v_hDst) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":576 + * + * cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeCopyAttributes(__pyx_v_hSrc, __pyx_v_hDst); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":575 + * return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":578 + * return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeGetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue *__pyx_v_value_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":579 + * + * cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetAttribute(__pyx_v_hNode, ((__pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID)__pyx_v_attr), __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":578 + * return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + * + * cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":581 + * return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeSetAttribute(cudaGraphNode_t __pyx_v_hNode, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID __pyx_v_attr, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue const *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":582 + * + * cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetAttribute(__pyx_v_hNode, ((__pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":581 + * return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + * + * cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":584 + * return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemcpyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemcpy3DParms const *__pyx_v_pCopyParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":585 + * + * cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pCopyParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":584 + * return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + * + * cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":587 + * return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemcpyNode1D(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":588 + * + * cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode1D(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":587 + * return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + * + * cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddMemcpyNode1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":590 + * return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":591 + * + * cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":590 + * return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":593 + * return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":594 + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 594, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":593 + * return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":596 + * return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":597 + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams1D(__pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":596 + * return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemcpyNodeSetParams1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":599 + * return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemsetNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemsetParams const *__pyx_v_pMemsetParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":600 + * + * cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemsetNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pMemsetParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":599 + * return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":602 + * return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemsetNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":603 + * + * cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":602 + * return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + * + * cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":605 + * return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemsetNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":606 + * + * cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":605 + * return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":608 + * return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddHostNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":609 + * + * cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddHostNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":608 + * return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":611 + * return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphHostNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":612 + * + * cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeGetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":611 + * return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + * + * cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":614 + * return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphHostNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":615 + * + * cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeSetParams(__pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":614 + * return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":617 + * return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddChildGraphNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaGraph_t __pyx_v_childGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":618 + * + * cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddChildGraphNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 618, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":617 + * return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) + * + * cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":620 + * return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t __pyx_v_node, cudaGraph_t *__pyx_v_pGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":621 + * + * cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphChildGraphNodeGetGraph(__pyx_v_node, __pyx_v_pGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 621, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":620 + * return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + * + * cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":623 + * return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEmptyNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":624 + * + * cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEmptyNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":623 + * return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) + * + * cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":626 + * return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEventRecordNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":627 + * + * cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventRecordNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":626 + * return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + * + * cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":629 + * return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":630 + * + * cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeGetEvent(__pyx_v_node, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":629 + * return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":632 + * return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":633 + * + * cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeSetEvent(__pyx_v_node, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":632 + * return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) + * + * cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":635 + * return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEventWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":636 + * + * cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":635 + * return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) + * + * cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":638 + * return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t *__pyx_v_event_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":639 + * + * cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeGetEvent(__pyx_v_node, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":638 + * return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + * + * cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":641 + * return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t __pyx_v_node, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":642 + * + * cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeSetEvent(__pyx_v_node, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":641 + * return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) + * + * cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":644 + * return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":645 + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresSignalNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":644 + * return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":647 + * return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":648 + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":647 + * return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":650 + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":651 + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 651, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":650 + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + * + * cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":653 + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":654 + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresWaitNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":653 + * return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":656 + * return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":657 + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":656 + * return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":659 + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":660 + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":659 + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + * + * cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":662 + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemAllocNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaMemAllocNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":663 + * + * cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemAllocNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":662 + * return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + * + * cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":665 + * return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemAllocNodeGetParams(cudaGraphNode_t __pyx_v_node, struct cudaMemAllocNodeParams *__pyx_v_params_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":666 + * + * cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemAllocNodeGetParams(__pyx_v_node, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":665 + * return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":668 + * return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemFreeNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, void *__pyx_v_dptr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":669 + * + * cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemFreeNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":668 + * return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) + * + * cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":671 + * return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemFreeNodeGetParams(cudaGraphNode_t __pyx_v_node, void *__pyx_v_dptr_out) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":672 + * + * cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemFreeNodeGetParams(__pyx_v_node, __pyx_v_dptr_out); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":671 + * return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + * + * cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":674 + * return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGraphMemTrim(device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGraphMemTrim(int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":675 + * + * cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGraphMemTrim(device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGraphMemTrim(__pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":674 + * return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) + * + * cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGraphMemTrim(device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":677 + * return cyruntime._cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":678 + * + * cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetGraphMemAttribute(__pyx_v_device, ((enum cudaGraphMemAttributeType)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":677 + * return cyruntime._cudaDeviceGraphMemTrim(device) + * + * cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":680 + * return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetGraphMemAttribute(int __pyx_v_device, enum cudaGraphMemAttributeType __pyx_v_attr, void *__pyx_v_value) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":681 + * + * cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetGraphMemAttribute(__pyx_v_device, ((enum cudaGraphMemAttributeType)__pyx_v_attr), __pyx_v_value); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":680 + * return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":683 + * return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphClone(pGraphClone, originalGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphClone(cudaGraph_t *__pyx_v_pGraphClone, cudaGraph_t __pyx_v_originalGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":684 + * + * cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphClone(pGraphClone, originalGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphClone(__pyx_v_pGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":683 + * return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) + * + * cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphClone(pGraphClone, originalGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":686 + * return cyruntime._cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeFindInClone(cudaGraphNode_t *__pyx_v_pNode, cudaGraphNode_t __pyx_v_originalNode, cudaGraph_t __pyx_v_clonedGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":687 + * + * cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeFindInClone(__pyx_v_pNode, __pyx_v_originalNode, __pyx_v_clonedGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":686 + * return cyruntime._cudaGraphClone(pGraphClone, originalGraph) + * + * cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":689 + * return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetType(node, pType) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetType(cudaGraphNode_t __pyx_v_node, enum cudaGraphNodeType *__pyx_v_pType) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":690 + * + * cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetType(node, pType) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetType(__pyx_v_node, ((enum cudaGraphNodeType *)__pyx_v_pType)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":689 + * return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + * + * cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetType(node, pType) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":692 + * return cyruntime._cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_nodes, size_t *__pyx_v_numNodes) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":693 + * + * cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetNodes(__pyx_v_graph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 693, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":692 + * return cyruntime._cudaGraphNodeGetType(node, pType) + * + * cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":695 + * return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetRootNodes(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_pRootNodes, size_t *__pyx_v_pNumRootNodes) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":696 + * + * cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetRootNodes(__pyx_v_graph, __pyx_v_pRootNodes, __pyx_v_pNumRootNodes); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":695 + * return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) + * + * cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":698 + * return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetEdges(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, size_t *__pyx_v_numEdges) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":699 + * + * cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":698 + * return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + * + * cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":701 + * return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetEdges_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t *__pyx_v_from_, cudaGraphNode_t *__pyx_v_to, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_numEdges) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":702 + * + * cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":701 + * return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) + * + * cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphGetEdges_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":704 + * return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependencies(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, size_t *__pyx_v_pNumDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":705 + * + * cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_pNumDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":704 + * return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + * + * cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":707 + * return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependencies_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependencies, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":708 + * + * cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies_v2(__pyx_v_node, __pyx_v_pDependencies, __pyx_v_edgeData, __pyx_v_pNumDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":707 + * return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + * + * cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":710 + * return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependentNodes(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, size_t *__pyx_v_pNumDependentNodes) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":711 + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_pNumDependentNodes); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":710 + * return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":713 + * return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t __pyx_v_node, cudaGraphNode_t *__pyx_v_pDependentNodes, cudaGraphEdgeData *__pyx_v_edgeData, size_t *__pyx_v_pNumDependentNodes) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":714 + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes_v2(__pyx_v_node, __pyx_v_pDependentNodes, __pyx_v_edgeData, __pyx_v_pNumDependentNodes); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":713 + * return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + * + * cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetDependentNodes_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":716 + * return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":717 + * + * cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 717, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":716 + * return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + * + * cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":719 + * return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":720 + * + * cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":719 + * return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":722 + * return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRemoveDependencies(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":723 + * + * cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":722 + * return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":725 + * return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRemoveDependencies_v2(cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_from_, cudaGraphNode_t const *__pyx_v_to, cudaGraphEdgeData const *__pyx_v_edgeData, size_t __pyx_v_numDependencies) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":726 + * + * cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies_v2(__pyx_v_graph, __pyx_v_from_, __pyx_v_to, __pyx_v_edgeData, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":725 + * return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + * + * cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphRemoveDependencies_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":728 + * return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDestroyNode(node) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDestroyNode(cudaGraphNode_t __pyx_v_node) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":729 + * + * cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphDestroyNode(node) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroyNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":728 + * return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + * + * cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDestroyNode(node) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":731 + * return cyruntime._cudaGraphDestroyNode(node) + * + * cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiate(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":732 + * + * cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiate(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 732, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":731 + * return cyruntime._cudaGraphDestroyNode(node) + * + * cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":734 + * return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiateWithFlags(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, unsigned PY_LONG_LONG __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":735 + * + * cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithFlags(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":734 + * return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) + * + * cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":737 + * return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiateWithParams(cudaGraphExec_t *__pyx_v_pGraphExec, cudaGraph_t __pyx_v_graph, cudaGraphInstantiateParams *__pyx_v_instantiateParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":738 + * + * cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithParams(__pyx_v_pGraphExec, __pyx_v_graph, __pyx_v_instantiateParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 738, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":737 + * return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + * + * cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphInstantiateWithParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":740 + * return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecGetFlags(graphExec, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecGetFlags(cudaGraphExec_t __pyx_v_graphExec, unsigned PY_LONG_LONG *__pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":741 + * + * cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecGetFlags(graphExec, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecGetFlags(__pyx_v_graphExec, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":740 + * return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + * + * cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecGetFlags(graphExec, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":743 + * return cyruntime._cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecKernelNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaKernelNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":744 + * + * cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecKernelNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":743 + * return cyruntime._cudaGraphExecGetFlags(graphExec, flags) + * + * cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":746 + * return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemcpy3DParms const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":747 + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 747, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":746 + * return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":749 + * return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, void *__pyx_v_dst, void const *__pyx_v_src, size_t __pyx_v_count, enum cudaMemcpyKind __pyx_v_kind) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":750 + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams1D(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_dst, __pyx_v_src, __pyx_v_count, ((enum cudaMemcpyKind)__pyx_v_kind)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":749 + * return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecMemcpyNodeSetParams1D", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":752 + * return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaMemsetParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":753 + * + * cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":752 + * return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + * + * cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":755 + * return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecHostNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, struct cudaHostNodeParams const *__pyx_v_pNodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":756 + * + * cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_pNodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":755 + * return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":758 + * return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_node, cudaGraph_t __pyx_v_childGraph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":759 + * + * cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_node, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":758 + * return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + * + * cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":761 + * return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":762 + * + * cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":761 + * return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + * + * cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":764 + * return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, cudaEvent_t __pyx_v_event) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":765 + * + * cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":764 + * return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":767 + * return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreSignalNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":768 + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":767 + * return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":770 + * return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, struct cudaExternalSemaphoreWaitNodeParams const *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":771 + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":770 + * return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":773 + * return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeSetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int __pyx_v_isEnabled) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":774 + * + * cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":773 + * return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + * + * cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":776 + * return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetEnabled(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraphNode_t __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":777 + * + * cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":776 + * return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":779 + * return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecUpdate(cudaGraphExec_t __pyx_v_hGraphExec, cudaGraph_t __pyx_v_hGraph, cudaGraphExecUpdateResultInfo *__pyx_v_resultInfo) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":780 + * + * cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecUpdate(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_resultInfo); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":779 + * return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + * + * cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":782 + * return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphUpload(graphExec, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphUpload(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":783 + * + * cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphUpload(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphUpload(__pyx_v_graphExec, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":782 + * return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + * + * cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphUpload(graphExec, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":785 + * return cyruntime._cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphLaunch(graphExec, stream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphLaunch(cudaGraphExec_t __pyx_v_graphExec, cudaStream_t __pyx_v_stream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":786 + * + * cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphLaunch(graphExec, stream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphLaunch(__pyx_v_graphExec, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":785 + * return cyruntime._cudaGraphUpload(graphExec, stream) + * + * cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphLaunch(graphExec, stream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":788 + * return cyruntime._cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecDestroy(graphExec) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecDestroy(cudaGraphExec_t __pyx_v_graphExec) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":789 + * + * cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecDestroy(graphExec) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecDestroy(__pyx_v_graphExec); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 789, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":788 + * return cyruntime._cudaGraphLaunch(graphExec, stream) + * + * cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecDestroy(graphExec) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":791 + * return cyruntime._cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDestroy(graph) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDestroy(cudaGraph_t __pyx_v_graph) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":792 + * + * cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphDestroy(graph) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroy(__pyx_v_graph); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":791 + * return cyruntime._cudaGraphExecDestroy(graphExec) + * + * cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDestroy(graph) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":794 + * return cyruntime._cudaGraphDestroy(graph) + * + * cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDebugDotPrint(cudaGraph_t __pyx_v_graph, char const *__pyx_v_path, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":795 + * + * cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDebugDotPrint(__pyx_v_graph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":794 + * return cyruntime._cudaGraphDestroy(graph) + * + * cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":797 + * return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectCreate(cudaUserObject_t *__pyx_v_object_out, void *__pyx_v_ptr, cudaHostFn_t __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":798 + * + * cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":797 + * return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) + * + * cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":800 + * return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectRetain(object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectRetain(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":801 + * + * cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaUserObjectRetain(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRetain(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":800 + * return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + * + * cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectRetain(object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":803 + * return cyruntime._cudaUserObjectRetain(object, count) + * + * cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectRelease(object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectRelease(cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":804 + * + * cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaUserObjectRelease(object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRelease(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":803 + * return cyruntime._cudaUserObjectRetain(object, count) + * + * cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaUserObjectRelease(object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":806 + * return cyruntime._cudaUserObjectRelease(object, count) + * + * cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRetainUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":807 + * + * cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":806 + * return cyruntime._cudaUserObjectRelease(object, count) + * + * cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":809 + * return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphReleaseUserObject(graph, object, count) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphReleaseUserObject(cudaGraph_t __pyx_v_graph, cudaUserObject_t __pyx_v_object, unsigned int __pyx_v_count) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":810 + * + * cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphReleaseUserObject(graph, object, count) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":809 + * return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) + * + * cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphReleaseUserObject(graph, object, count) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":812 + * return cyruntime._cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddNode(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":813 + * + * cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":812 + * return cyruntime._cudaGraphReleaseUserObject(graph, object, count) + * + * cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddNode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":815 + * return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddNode_v2(cudaGraphNode_t *__pyx_v_pGraphNode, cudaGraph_t __pyx_v_graph, cudaGraphNode_t const *__pyx_v_pDependencies, cudaGraphEdgeData const *__pyx_v_dependencyData, size_t __pyx_v_numDependencies, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":816 + * + * cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode_v2(__pyx_v_pGraphNode, __pyx_v_graph, __pyx_v_pDependencies, __pyx_v_dependencyData, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":815 + * return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphAddNode_v2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":818 + * return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeSetParams(node, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeSetParams(cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":819 + * + * cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphNodeSetParams(node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetParams(__pyx_v_node, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":818 + * return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + * + * cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphNodeSetParams(node, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":821 + * return cyruntime._cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecNodeSetParams(cudaGraphExec_t __pyx_v_graphExec, cudaGraphNode_t __pyx_v_node, struct cudaGraphNodeParams *__pyx_v_nodeParams) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":822 + * + * cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecNodeSetParams(__pyx_v_graphExec, __pyx_v_node, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":821 + * return cyruntime._cudaGraphNodeSetParams(node, nodeParams) + * + * cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphExecNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":824 + * return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle *__pyx_v_pHandle_out, cudaGraph_t __pyx_v_graph, unsigned int __pyx_v_defaultLaunchValue, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":825 + * + * cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphConditionalHandleCreate(__pyx_v_pHandle_out, __pyx_v_graph, __pyx_v_defaultLaunchValue, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":824 + * return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + * + * cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphConditionalHandleCreate", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":827 + * return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDriverEntryPoint(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":828 + * + * cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPoint(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_flags, ((enum cudaDriverEntryPointQueryResult *)__pyx_v_driverStatus)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":827 + * return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + * + * cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDriverEntryPoint", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":830 + * return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetDriverEntryPointByVersion(char const *__pyx_v_symbol, void **__pyx_v_funcPtr, unsigned int __pyx_v_cudaVersion, unsigned PY_LONG_LONG __pyx_v_flags, enum cudaDriverEntryPointQueryResult *__pyx_v_driverStatus) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":831 + * + * cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPointByVersion(__pyx_v_symbol, __pyx_v_funcPtr, __pyx_v_cudaVersion, __pyx_v_flags, ((enum cudaDriverEntryPointQueryResult *)__pyx_v_driverStatus)); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":830 + * return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + * + * cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetDriverEntryPointByVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":833 + * return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryLoadData(cudaLibrary_t *__pyx_v_library, void const *__pyx_v_code, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":834 + * + * cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadData(__pyx_v_library, __pyx_v_code, ((enum cudaJitOption *)__pyx_v_jitOptions), __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, ((enum cudaLibraryOption *)__pyx_v_libraryOptions), __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":833 + * return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + * + * cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":836 + * return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryLoadFromFile(cudaLibrary_t *__pyx_v_library, char const *__pyx_v_fileName, enum cudaJitOption *__pyx_v_jitOptions, void **__pyx_v_jitOptionsValues, unsigned int __pyx_v_numJitOptions, enum cudaLibraryOption *__pyx_v_libraryOptions, void **__pyx_v_libraryOptionValues, unsigned int __pyx_v_numLibraryOptions) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":837 + * + * cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadFromFile(__pyx_v_library, __pyx_v_fileName, ((enum cudaJitOption *)__pyx_v_jitOptions), __pyx_v_jitOptionsValues, __pyx_v_numJitOptions, ((enum cudaLibraryOption *)__pyx_v_libraryOptions), __pyx_v_libraryOptionValues, __pyx_v_numLibraryOptions); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":836 + * return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryLoadFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":839 + * return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryUnload(library) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryUnload(cudaLibrary_t __pyx_v_library) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":840 + * + * cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryUnload(library) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryUnload(__pyx_v_library); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":839 + * return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + * + * cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryUnload(library) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryUnload", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":842 + * return cyruntime._cudaLibraryUnload(library) + * + * cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetKernel(pKernel, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetKernel(cudaKernel_t *__pyx_v_pKernel, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":843 + * + * cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryGetKernel(pKernel, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernel(__pyx_v_pKernel, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":842 + * return cyruntime._cudaLibraryUnload(library) + * + * cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetKernel(pKernel, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":845 + * return cyruntime._cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetGlobal(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":846 + * + * cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetGlobal(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":845 + * return cyruntime._cudaLibraryGetKernel(pKernel, library, name) + * + * cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":848 + * return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetManaged(void **__pyx_v_dptr, size_t *__pyx_v_numbytes, cudaLibrary_t __pyx_v_library, char const *__pyx_v_name) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":849 + * + * cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetManaged(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_library, __pyx_v_name); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":848 + * return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) + * + * cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryGetManaged", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":851 + * return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetUnifiedFunction(void **__pyx_v_fptr, cudaLibrary_t __pyx_v_library, char const *__pyx_v_symbol) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":852 + * + * cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetUnifiedFunction(__pyx_v_fptr, __pyx_v_library, __pyx_v_symbol); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":851 + * return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) + * + * cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryGetUnifiedFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":854 + * return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetKernelCount(count, lib) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetKernelCount(unsigned int *__pyx_v_count, cudaLibrary_t __pyx_v_lib) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":855 + * + * cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryGetKernelCount(count, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernelCount(__pyx_v_count, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":854 + * return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + * + * cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryGetKernelCount(count, lib) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryGetKernelCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":857 + * return cyruntime._cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryEnumerateKernels(cudaKernel_t *__pyx_v_kernels, unsigned int __pyx_v_numKernels, cudaLibrary_t __pyx_v_lib) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":858 + * + * cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryEnumerateKernels(__pyx_v_kernels, __pyx_v_numKernels, __pyx_v_lib); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":857 + * return cyruntime._cudaLibraryGetKernelCount(count, lib) + * + * cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaLibraryEnumerateKernels", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":860 + * return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaKernelSetAttributeForDevice(cudaKernel_t __pyx_v_kernel, enum cudaFuncAttribute __pyx_v_attr, int __pyx_v_value, int __pyx_v_device) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":861 + * + * cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaKernelSetAttributeForDevice(__pyx_v_kernel, ((enum cudaFuncAttribute)__pyx_v_attr), __pyx_v_value, __pyx_v_device); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":860 + * return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + * + * cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaKernelSetAttributeForDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":863 + * return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetExportTable(void const **__pyx_v_ppExportTable, cudaUUID_t const *__pyx_v_pExportTableId) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":864 + * + * cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":863 + * return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + * + * cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":866 + * return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGetKernel(cudaKernel_t *__pyx_v_kernelPtr, void const *__pyx_v_entryFuncAddr) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":867 + * + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetKernel(__pyx_v_kernelPtr, __pyx_v_entryFuncAddr); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":866 + * return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) + * + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGetKernel", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":868 + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + +static struct cudaPitchedPtr __pyx_f_4cuda_8bindings_9cyruntime_make_cudaPitchedPtr(void *__pyx_v_d, size_t __pyx_v_p, size_t __pyx_v_xsz, size_t __pyx_v_ysz) { + struct cudaPitchedPtr __pyx_r; + struct cudaPitchedPtr __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":870 + * @cython.show_performance_hints(False) + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPitchedPtr(__pyx_v_d, __pyx_v_p, __pyx_v_xsz, __pyx_v_ysz); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 870, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":868 + * cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.make_cudaPitchedPtr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":871 + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return cyruntime._make_cudaPos(x, y, z) +*/ + +static struct cudaPos __pyx_f_4cuda_8bindings_9cyruntime_make_cudaPos(size_t __pyx_v_x, size_t __pyx_v_y, size_t __pyx_v_z) { + struct cudaPos __pyx_r; + struct cudaPos __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":873 + * @cython.show_performance_hints(False) + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return cyruntime._make_cudaPos(x, y, z) # <<<<<<<<<<<<<< + * @cython.show_performance_hints(False) + * cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPos(__pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":871 + * cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + * return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return cyruntime._make_cudaPos(x, y, z) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.make_cudaPos", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":874 + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return cyruntime._make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return cyruntime._make_cudaExtent(w, h, d) +*/ + +static struct cudaExtent __pyx_f_4cuda_8bindings_9cyruntime_make_cudaExtent(size_t __pyx_v_w, size_t __pyx_v_h, size_t __pyx_v_d) { + struct cudaExtent __pyx_r; + struct cudaExtent __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":876 + * @cython.show_performance_hints(False) + * cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return cyruntime._make_cudaExtent(w, h, d) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaExtent(__pyx_v_w, __pyx_v_h, __pyx_v_d); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":874 + * cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + * return cyruntime._make_cudaPos(x, y, z) + * @cython.show_performance_hints(False) # <<<<<<<<<<<<<< + * cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + * return cyruntime._make_cudaExtent(w, h, d) +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.make_cudaExtent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":878 + * return cyruntime._make_cudaExtent(w, h, d) + * + * cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsEGLRegisterImage(struct cudaGraphicsResource **__pyx_v_pCudaResource, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":879 + * + * cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsEGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":878 + * return cyruntime._make_cudaExtent(w, h, d) + * + * cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":881 + * return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) + * + * cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerConnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":882 + * + * cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnect(__pyx_v_conn, __pyx_v_eglStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":881 + * return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) + * + * cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":884 + * return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) + * + * cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":885 + * + * cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnectWithFlags(__pyx_v_conn, __pyx_v_eglStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":884 + * return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) + * + * cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":887 + * return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * + * cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerDisconnect(conn) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerDisconnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":888 + * + * cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamConsumerDisconnect(conn) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":887 + * return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + * + * cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerDisconnect(conn) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":890 + * return cyruntime._cudaEGLStreamConsumerDisconnect(conn) + * + * cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, cudaGraphicsResource_t *__pyx_v_pCudaResource, cudaStream_t *__pyx_v_pStream, unsigned int __pyx_v_timeout) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":891 + * + * cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerAcquireFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":890 + * return cyruntime._cudaEGLStreamConsumerDisconnect(conn) + * + * cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":893 + * return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * + * cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, cudaGraphicsResource_t __pyx_v_pCudaResource, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":894 + * + * cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerReleaseFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":893 + * return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + * + * cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":896 + * return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * + * cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerConnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR __pyx_v_eglStream, __pyx_t_4cuda_8bindings_9cyruntime_EGLint __pyx_v_width, __pyx_t_4cuda_8bindings_9cyruntime_EGLint __pyx_v_height) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":897 + * + * cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerConnect(__pyx_v_conn, __pyx_v_eglStream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":896 + * return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + * + * cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":899 + * return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) + * + * cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerDisconnect(conn) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerDisconnect(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":900 + * + * cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamProducerDisconnect(conn) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":899 + * return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) + * + * cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerDisconnect(conn) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":902 + * return cyruntime._cudaEGLStreamProducerDisconnect(conn) + * + * cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerPresentFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame __pyx_v_eglframe, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":903 + * + * cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerPresentFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":902 + * return cyruntime._cudaEGLStreamProducerDisconnect(conn) + * + * cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":905 + * return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * + * cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerReturnFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *__pyx_v_eglframe, cudaStream_t *__pyx_v_pStream) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":906 + * + * cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerReturnFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":905 + * return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) + * + * cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":908 + * return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *__pyx_v_eglFrame, cudaGraphicsResource_t __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":909 + * + * cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedEglFrame(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":908 + * return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) + * + * cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":911 + * return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * + * cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreateFromEGLSync(cudaEvent_t *__pyx_v_phEvent, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":912 + * + * cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateFromEGLSync(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":911 + * return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + * + * cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":914 + * return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) + * + * cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaProfilerStart() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaProfilerStart(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":915 + * + * cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaProfilerStart() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStart(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":914 + * return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) + * + * cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaProfilerStart() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":917 + * return cyruntime._cudaProfilerStart() + * + * cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaProfilerStop() + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaProfilerStop(void) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":918 + * + * cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaProfilerStop() # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStop(); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":917 + * return cyruntime._cudaProfilerStart() + * + * cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaProfilerStop() + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":920 + * return cyruntime._cudaProfilerStop() + * + * cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGLGetDevices(unsigned int *__pyx_v_pCudaDeviceCount, int *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList __pyx_v_deviceList) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":921 + * + * cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGLGetDevices(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":920 + * return cyruntime._cudaProfilerStop() + * + * cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":923 + * return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * + * cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsGLRegisterImage(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_GLuint __pyx_v_image, __pyx_t_4cuda_8bindings_9cyruntime_GLenum __pyx_v_target, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":924 + * + * cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterImage(__pyx_v_resource, __pyx_v_image, __pyx_v_target, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 924, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":923 + * return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + * + * cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":926 + * return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) + * + * cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsGLRegisterBuffer(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_GLuint __pyx_v_buffer, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":927 + * + * cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterBuffer(__pyx_v_resource, __pyx_v_buffer, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":926 + * return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) + * + * cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":929 + * return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) + * + * cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaVDPAUGetDevice(int *__pyx_v_device, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":930 + * + * cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUGetDevice(__pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 930, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":929 + * return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) + * + * cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":932 + * return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * + * cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaVDPAUSetVDPAUDevice(int __pyx_v_device, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":933 + * + * cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUSetVDPAUDevice(__pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":932 + * return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + * + * cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaVDPAUSetVDPAUDevice", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":935 + * return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) + * + * cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsVDPAURegisterVideoSurface(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":936 + * + * cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) # <<<<<<<<<<<<<< + * + * cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterVideoSurface(__pyx_v_resource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":935 + * return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) + * + * cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":938 + * return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * + * cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + * +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsVDPAURegisterOutputSurface(struct cudaGraphicsResource **__pyx_v_resource, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) { + cudaError_t __pyx_r; + cudaError_t __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + + /* "cuda/bindings/cyruntime.pyx":939 + * + * cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + * return cyruntime._cudaGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) # <<<<<<<<<<<<<< + * + * from libc.stdint cimport uintptr_t +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterOutputSurface(__pyx_v_resource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_r = ((cudaError_t)__pyx_t_1); + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":938 + * return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + * + * cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * return cyruntime._cudaGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_AddTraceback("cuda.bindings.cyruntime.cudaGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + return __pyx_r; +} + +/* "cuda/bindings/cyruntime.pyx":945 + * cimport cuda.bindings._lib.dlfcn as dlfcn + * + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * # Load + * with gil: +*/ + +static cudaError_t __pyx_f_4cuda_8bindings_9cyruntime_getLocalRuntimeVersion(int *__pyx_v_runtimeVersion) { + PyObject *__pyx_v_loaded_dl = NULL; + void *__pyx_v_handle; + void *__pyx_v___cudaRuntimeGetVersion; + cudaError_t __pyx_v_err; + cudaError_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + uintptr_t __pyx_t_5; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + cudaError_t __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("getLocalRuntimeVersion", 1); + + /* "cuda/bindings/cyruntime.pyx":947 + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * # Load + * with gil: # <<<<<<<<<<<<<< + * loaded_dl = load_nvidia_dynamic_lib("cudart") + * handle = loaded_dl._handle_uint +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/cyruntime.pyx":948 + * # Load + * with gil: + * loaded_dl = load_nvidia_dynamic_lib("cudart") # <<<<<<<<<<<<<< + * handle = loaded_dl._handle_uint + * __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cudart}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_loaded_dl = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/cyruntime.pyx":949 + * with gil: + * loaded_dl = load_nvidia_dynamic_lib("cudart") + * handle = loaded_dl._handle_uint # <<<<<<<<<<<<<< + * __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_loaded_dl, __pyx_mstate_global->__pyx_n_u_handle_uint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 949, __pyx_L4_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyLong_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L4_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_handle = ((void *)((uintptr_t)__pyx_t_5)); + } + + /* "cuda/bindings/cyruntime.pyx":947 + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + * # Load + * with gil: # <<<<<<<<<<<<<< + * loaded_dl = load_nvidia_dynamic_lib("cudart") + * handle = loaded_dl._handle_uint +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/cyruntime.pyx":950 + * loaded_dl = load_nvidia_dynamic_lib("cudart") + * handle = loaded_dl._handle_uint + * __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') # <<<<<<<<<<<<<< + * + * if __cudaRuntimeGetVersion == NULL: +*/ + __pyx_v___cudaRuntimeGetVersion = dlsym(__pyx_v_handle, ((char const *)"cudaRuntimeGetVersion")); + + /* "cuda/bindings/cyruntime.pyx":952 + * __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') + * + * if __cudaRuntimeGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') +*/ + __pyx_t_6 = (__pyx_v___cudaRuntimeGetVersion == NULL); + if (unlikely(__pyx_t_6)) { + + /* "cuda/bindings/cyruntime.pyx":953 + * + * if __cudaRuntimeGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') + * +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/cyruntime.pyx":954 + * if __cudaRuntimeGetVersion == NULL: + * with gil: + * raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') # <<<<<<<<<<<<<< + * + * # Call +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_2 = __pyx_builtin_RuntimeError; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_loaded_dl, __pyx_mstate_global->__pyx_n_u_abs_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 954, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Function_cudaRuntimeGetVersion_n, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 954, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 954, __pyx_L8_error) + } + + /* "cuda/bindings/cyruntime.pyx":953 + * + * if __cudaRuntimeGetVersion == NULL: + * with gil: # <<<<<<<<<<<<<< + * raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') + * +*/ + /*finally:*/ { + __pyx_L8_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/cyruntime.pyx":952 + * __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') + * + * if __cudaRuntimeGetVersion == NULL: # <<<<<<<<<<<<<< + * with gil: + * raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') +*/ + } + + /* "cuda/bindings/cyruntime.pyx":957 + * + * # Call + * cdef cudaError_t err = cudaSuccess # <<<<<<<<<<<<<< + * err = ( __cudaRuntimeGetVersion)(runtimeVersion) + * +*/ + __pyx_v_err = cudaSuccess; + + /* "cuda/bindings/cyruntime.pyx":958 + * # Call + * cdef cudaError_t err = cudaSuccess + * err = ( __cudaRuntimeGetVersion)(runtimeVersion) # <<<<<<<<<<<<<< + * + * # We explicitly do *NOT* cleanup the library handle here, acknowledging +*/ + __pyx_t_9 = ((cudaError_t (*)(int *))__pyx_v___cudaRuntimeGetVersion)(__pyx_v_runtimeVersion); if (unlikely(__pyx_t_9 == ((cudaError_t)cudaErrorCallRequiresNewerDriver) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 958, __pyx_L1_error) + __pyx_v_err = __pyx_t_9; + + /* "cuda/bindings/cyruntime.pyx":974 + * # Python mechanisms, like `__del__` or `weakref.finalizer`s. + * + * return err # <<<<<<<<<<<<<< +*/ + __pyx_r = __pyx_v_err; + goto __pyx_L0; + + /* "cuda/bindings/cyruntime.pyx":945 + * cimport cuda.bindings._lib.dlfcn as dlfcn + * + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: # <<<<<<<<<<<<<< + * # Load + * with gil: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.cyruntime.getLocalRuntimeVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = cudaErrorCallRequiresNewerDriver; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_v_loaded_dl); + __Pyx_RefNannyFinishContext(); + __Pyx_PyGILState_Release(__pyx_gilstate_save); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("cudaDeviceReset", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceReset, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSynchronize, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetLimit, "cudaError_t (enum cudaLimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetLimit", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetLimit, "cudaError_t (size_t *, enum cudaLimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetTexture1DLinearMaxWidth, "cudaError_t (size_t *, struct cudaChannelFormatDesc const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetCacheConfig, "cudaError_t (enum cudaFuncCache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetStreamPriorityRange, "cudaError_t (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetCacheConfig, "cudaError_t (enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetByPCIBusId, "cudaError_t (int *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetPCIBusId, "cudaError_t (char *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaIpcGetEventHandle, "cudaError_t (cudaIpcEventHandle_t *, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaIpcOpenEventHandle, "cudaError_t (cudaEvent_t *, cudaIpcEventHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaIpcGetMemHandle, "cudaError_t (cudaIpcMemHandle_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaIpcOpenMemHandle, "cudaError_t (void **, cudaIpcMemHandle_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaIpcCloseMemHandle, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceFlushGPUDirectRDMAWrites, "cudaError_t (enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceRegisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceRegisterAsyncNotification, "cudaError_t (int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceUnregisterAsyncNotification", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceUnregisterAsyncNotification, "cudaError_t (int, cudaAsyncCallbackHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaPeekAtLastError", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaPeekAtLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetErrorName", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetErrorName, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetErrorString", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetErrorString, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDeviceCount", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceCount, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDeviceProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceProperties, "cudaError_t (struct cudaDeviceProp *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetAttribute, "cudaError_t (int *, enum cudaDeviceAttr, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetDefaultMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetMemPool, "cudaError_t (int, cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetNvSciSyncAttributes, "cudaError_t (void *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetP2PAttribute, "cudaError_t (int *, enum cudaDeviceP2PAttr, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaChooseDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaChooseDevice, "cudaError_t (int *, struct cudaDeviceProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaInitDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaInitDevice, "cudaError_t (int, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaSetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaSetDevice, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDevice, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaSetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaSetDeviceFlags, "cudaError_t (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDeviceFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDeviceFlags, "cudaError_t (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreate, "cudaError_t (cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreateWithFlags, "cudaError_t (cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCreateWithPriority, "cudaError_t (cudaStream_t *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetPriority", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetPriority, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetFlags, "cudaError_t (cudaStream_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetId", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetId, "cudaError_t (cudaStream_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetDevice, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaCtxResetPersistingL2Cache, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamCopyAttributes, "cudaError_t (cudaStream_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamSetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamDestroy, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamWaitEvent, "cudaError_t (cudaStream_t, cudaEvent_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamAddCallback", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamAddCallback, "cudaError_t (cudaStream_t, cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamSynchronize, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamQuery, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamAttachMemAsync, "cudaError_t (cudaStream_t, void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamBeginCapture, "cudaError_t (cudaStream_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamBeginCaptureToGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamBeginCaptureToGraph, "cudaError_t (cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaThreadExchangeStreamCaptureMode, "cudaError_t (enum cudaStreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamEndCapture", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamEndCapture, "cudaError_t (cudaStream_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamIsCapturing, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetCaptureInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetCaptureInfo, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamGetCaptureInfo_v3", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamGetCaptureInfo_v3, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamUpdateCaptureDependencies, "cudaError_t (cudaStream_t, cudaGraphNode_t *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaStreamUpdateCaptureDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaStreamUpdateCaptureDependencies_v2, "cudaError_t (cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreate, "cudaError_t (cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventCreateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreateWithFlags, "cudaError_t (cudaEvent_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventRecord", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventRecord, "cudaError_t (cudaEvent_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventRecordWithFlags, "cudaError_t (cudaEvent_t, cudaStream_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventQuery", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventQuery, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventSynchronize", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventSynchronize, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventDestroy, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventElapsedTime", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventElapsedTime, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventElapsedTime_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventElapsedTime_v2, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaImportExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaImportExternalMemory, "cudaError_t (cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaExternalMemoryGetMappedBuffer, "cudaError_t (void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaExternalMemoryGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyExternalMemory, "cudaError_t (cudaExternalMemory_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaImportExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaSignalExternalSemaphoresAsync, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaWaitExternalSemaphoresAsync, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetCacheConfig, "cudaError_t (void const *, enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFuncGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFuncGetAttributes, "cudaError_t (struct cudaFuncAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetAttribute, "cudaError_t (void const *, enum cudaFuncAttribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLaunchHostFunc, "cudaError_t (cudaStream_t, cudaHostFn_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFuncSetSharedMemConfig, "cudaError_t (void const *, enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyMaxActiveBlocksPerMultiprocessor, "cudaError_t (int *, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyAvailableDynamicSMemPerBlock, "cudaError_t (size_t *, void const *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "cudaError_t (int *, void const *, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocManaged, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMalloc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocHost", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocHost, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocPitch", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocPitch, "cudaError_t (void **, size_t *, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFree", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFree, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFreeHost", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFreeHost, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFreeArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFreeArray, "cudaError_t (cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFreeMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFreeMipmappedArray, "cudaError_t (cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaHostAlloc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaHostAlloc, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaHostRegister", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaHostRegister, "cudaError_t (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaHostUnregister", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaHostUnregister, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaHostGetDevicePointer, "cudaError_t (void **, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaHostGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaHostGetFlags, "cudaError_t (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMalloc3D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc3D, "cudaError_t (struct cudaPitchedPtr *, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMalloc3DArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMalloc3DArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetMipmappedArrayLevel", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetMipmappedArrayLevel, "cudaError_t (cudaArray_t *, cudaMipmappedArray_const_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy3D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3D, "cudaError_t (struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DPeer, "cudaError_t (struct cudaMemcpy3DPeerParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DAsync, "cudaError_t (struct cudaMemcpy3DParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DPeerAsync, "cudaError_t (struct cudaMemcpy3DPeerParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemGetInfo, "cudaError_t (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaArrayGetInfo", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetInfo, "cudaError_t (struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaArrayGetPlane", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetPlane, "cudaError_t (cudaArray_t *, cudaArray_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMipmappedArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMipmappedArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyPeer, "cudaError_t (void *, int, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2D, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DFromArray, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyAsync, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyPeerAsync, "cudaError_t (void *, int, void const *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyBatchAsync, "cudaError_t (void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy3DBatchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy3DBatchAsync, "cudaError_t (size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DAsync, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpy2DFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpy2DFromArrayAsync, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemset", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemset, "cudaError_t (void *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemset2D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemset2D, "cudaError_t (void *, size_t, int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemset3D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemset3D, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemsetAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemsetAsync, "cudaError_t (void *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemset2DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemset2DAsync, "cudaError_t (void *, size_t, int, size_t, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemset3DAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemset3DAsync, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPrefetchAsync, "cudaError_t (void const *, size_t, int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPrefetchAsync_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPrefetchAsync_v2, "cudaError_t (void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemAdvise", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemAdvise, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemAdvise_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemAdvise_v2, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemRangeGetAttribute, "cudaError_t (void *, size_t, enum cudaMemRangeAttribute, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemRangeGetAttributes, "cudaError_t (void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyFromArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyFromArray, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyArrayToArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyToArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemcpyFromArrayAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemcpyFromArrayAsync, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocAsync, "cudaError_t (void **, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaFreeAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaFreeAsync, "cudaError_t (void *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolTrimTo, "cudaError_t (cudaMemPool_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolSetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolGetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolSetAccess, "cudaError_t (cudaMemPool_t, struct cudaMemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolGetAccess, "cudaError_t (enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolCreate, "cudaError_t (cudaMemPool_t *, struct cudaMemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolDestroy, "cudaError_t (cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMallocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMallocFromPoolAsync, "cudaError_t (void **, size_t, cudaMemPool_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolExportToShareableHandle, "cudaError_t (void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolImportFromShareableHandle, "cudaError_t (cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolExportPointer, "cudaError_t (struct cudaMemPoolPtrExportData *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaMemPoolImportPointer, "cudaError_t (void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaPointerGetAttributes, "cudaError_t (struct cudaPointerAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceCanAccessPeer, "cudaError_t (int *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceEnablePeerAccess, "cudaError_t (int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceDisablePeerAccess, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsUnregisterResource, "cudaError_t (cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceSetMapFlags, "cudaError_t (cudaGraphicsResource_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsMapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsUnmapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedPointer, "cudaError_t (void **, size_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsSubResourceGetMappedArray, "cudaError_t (cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetChannelDesc, "cudaError_t (struct cudaChannelFormatDesc *, cudaArray_const_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaCreateChannelDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaCreateChannelDesc, "struct cudaChannelFormatDesc (int, int, int, int, enum cudaChannelFormatKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaCreateTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaCreateTextureObject, "cudaError_t (cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDestroyTextureObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDestroyTextureObject, "cudaError_t (cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetTextureObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetTextureObjectTextureDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectTextureDesc, "cudaError_t (struct cudaTextureDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetTextureObjectResourceViewDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetTextureObjectResourceViewDesc, "cudaError_t (struct cudaResourceViewDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaCreateSurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaCreateSurfaceObject, "cudaError_t (cudaSurfaceObject_t *, struct cudaResourceDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDestroySurfaceObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDestroySurfaceObject, "cudaError_t (cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetSurfaceObjectResourceDesc", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetSurfaceObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDriverGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDriverGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaRuntimeGetVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaRuntimeGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphCreate, "cudaError_t (cudaGraph_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddKernelNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeCopyAttributes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeGetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphKernelNodeSetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemcpyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddMemcpyNode1D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemcpyNode1D, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemcpyNodeSetParams1D, "cudaError_t (cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemsetNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemsetNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemsetNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddHostNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphHostNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphHostNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddChildGraphNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphChildGraphNodeGetGraph, "cudaError_t (cudaGraphNode_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEmptyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEventRecordNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventRecordNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventRecordNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddEventWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventWaitNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphEventWaitNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddExternalSemaphoresSignalNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresSignalNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddExternalSemaphoresWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresWaitNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemAllocNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemAllocNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddMemFreeNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphMemFreeNodeGetParams, "cudaError_t (cudaGraphNode_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGraphMemTrim, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceGetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaDeviceSetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphClone", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphClone, "cudaError_t (cudaGraph_t *, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeFindInClone, "cudaError_t (cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetType, "cudaError_t (cudaGraphNode_t, enum cudaGraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphGetNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetRootNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphGetEdges", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetEdges, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphGetEdges_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphGetEdges_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependencies, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependencies_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependentNodes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetDependentNodes_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetDependentNodes_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRemoveDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphRemoveDependencies_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRemoveDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDestroyNode, "cudaError_t (cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphInstantiate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiate, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiateWithFlags, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphInstantiateWithParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphInstantiateWithParams, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecGetFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecGetFlags, "cudaError_t (cudaGraphExec_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecKernelNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemcpyNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecMemcpyNodeSetParams1D", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemcpyNodeSetParams1D, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecMemsetNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecHostNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecChildGraphNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecEventRecordNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecEventWaitNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeSetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeGetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecUpdate, "cudaError_t (cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphUpload", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphUpload, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphLaunch", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphLaunch, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecDestroy, "cudaError_t (cudaGraphExec_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphDestroy", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDestroy, "cudaError_t (cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphDebugDotPrint, "cudaError_t (cudaGraph_t, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaUserObjectCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectCreate, "cudaError_t (cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaUserObjectRetain", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectRetain, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaUserObjectRelease", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaUserObjectRelease, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphRetainUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphReleaseUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddNode", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphAddNode_v2", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphAddNode_v2, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphExecNodeSetParams", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphExecNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphConditionalHandleCreate", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphConditionalHandleCreate, "cudaError_t (cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDriverEntryPoint", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDriverEntryPoint, "cudaError_t (char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetDriverEntryPointByVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetDriverEntryPointByVersion, "cudaError_t (char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryLoadData", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryLoadData, "cudaError_t (cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryLoadFromFile", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryLoadFromFile, "cudaError_t (cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryUnload", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryUnload, "cudaError_t (cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetKernel, "cudaError_t (cudaKernel_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryGetGlobal", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetGlobal, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryGetManaged", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetManaged, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryGetUnifiedFunction", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetUnifiedFunction, "cudaError_t (void **, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryGetKernelCount", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryGetKernelCount, "cudaError_t (unsigned int *, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaLibraryEnumerateKernels", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaLibraryEnumerateKernels, "cudaError_t (cudaKernel_t *, unsigned int, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaKernelSetAttributeForDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaKernelSetAttributeForDevice, "cudaError_t (cudaKernel_t, enum cudaFuncAttribute, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetExportTable", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetExportTable, "cudaError_t (void const **, cudaUUID_t const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGetKernel", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGetKernel, "cudaError_t (cudaKernel_t *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("make_cudaPitchedPtr", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_make_cudaPitchedPtr, "struct cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("make_cudaPos", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_make_cudaPos, "struct cudaPos (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("make_cudaExtent", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_make_cudaExtent, "struct cudaExtent (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsEGLRegisterImage, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerConnectWithFlags, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerAcquireFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t *, cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamConsumerReleaseFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, __pyx_t_4cuda_8bindings_9cyruntime_EGLint, __pyx_t_4cuda_8bindings_9cyruntime_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerPresentFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEGLStreamProducerReturnFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsResourceGetMappedEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaEventCreateFromEGLSync, "cudaError_t (cudaEvent_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaProfilerStart", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaProfilerStart, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaProfilerStop", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaProfilerStop, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGLGetDevices", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGLGetDevices, "cudaError_t (unsigned int *, int *, unsigned int, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsGLRegisterImage, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, __pyx_t_4cuda_8bindings_9cyruntime_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsGLRegisterBuffer, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaVDPAUGetDevice, "cudaError_t (int *, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaVDPAUSetVDPAUDevice", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaVDPAUSetVDPAUDevice, "cudaError_t (int, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsVDPAURegisterVideoSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("cudaGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_cudaGraphicsVDPAURegisterOutputSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("getLocalRuntimeVersion", (void (*)(void))__pyx_f_4cuda_8bindings_9cyruntime_getLocalRuntimeVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._bindings.cyruntime"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamProducerPresentFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerPresentFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamProducerReturnFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerReturnFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceGetMappedEglFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedEglFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaVDPAUSetVDPAUDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUSetVDPAUDevice, "cudaError_t (int, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaVDPAUGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaVDPAUGetDevice, "cudaError_t (int *, __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice, __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsVDPAURegisterVideoSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterVideoSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsVDPAURegisterOutputSurface", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsVDPAURegisterOutputSurface, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGLGetDevices", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGLGetDevices, "cudaError_t (unsigned int *, int *, unsigned int, enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterImage, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, __pyx_t_4cuda_8bindings_9cyruntime_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsGLRegisterBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsGLRegisterBuffer, "cudaError_t (struct cudaGraphicsResource **, __pyx_t_4cuda_8bindings_9cyruntime_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsEGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsEGLRegisterImage, "cudaError_t (cudaGraphicsResource_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamConsumerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamConsumerConnectWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerConnectWithFlags, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamConsumerAcquireFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerAcquireFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t *, cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamConsumerReleaseFrame", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamConsumerReleaseFrame, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, cudaGraphicsResource_t, cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamProducerConnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerConnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *, __pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR, __pyx_t_4cuda_8bindings_9cyruntime_EGLint, __pyx_t_4cuda_8bindings_9cyruntime_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEGLStreamProducerDisconnect", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEGLStreamProducerDisconnect, "cudaError_t (__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventCreateFromEGLSync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateFromEGLSync, "cudaError_t (cudaEvent_t *, __pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceReset", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceReset, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSynchronize, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetLimit, "cudaError_t (enum cudaLimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetLimit", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetLimit, "cudaError_t (size_t *, enum cudaLimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetTexture1DLinearMaxWidth", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetTexture1DLinearMaxWidth, "cudaError_t (size_t *, struct cudaChannelFormatDesc const *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetCacheConfig, "cudaError_t (enum cudaFuncCache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetStreamPriorityRange", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetStreamPriorityRange, "cudaError_t (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetCacheConfig, "cudaError_t (enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetByPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetByPCIBusId, "cudaError_t (int *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetPCIBusId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetPCIBusId, "cudaError_t (char *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcGetEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetEventHandle, "cudaError_t (cudaIpcEventHandle_t *, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcOpenEventHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenEventHandle, "cudaError_t (cudaEvent_t *, cudaIpcEventHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcGetMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcGetMemHandle, "cudaError_t (cudaIpcMemHandle_t *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcOpenMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcOpenMemHandle, "cudaError_t (void **, cudaIpcMemHandle_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaIpcCloseMemHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaIpcCloseMemHandle, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceFlushGPUDirectRDMAWrites", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceFlushGPUDirectRDMAWrites, "cudaError_t (enum cudaFlushGPUDirectRDMAWritesTarget, enum cudaFlushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceRegisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceRegisterAsyncNotification, "cudaError_t (int, cudaAsyncCallback, void *, cudaAsyncCallbackHandle_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceUnregisterAsyncNotification", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceUnregisterAsyncNotification, "cudaError_t (int, cudaAsyncCallbackHandle_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetSharedMemConfig, "cudaError_t (enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetLastError", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaPeekAtLastError", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPeekAtLastError, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetErrorName", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorName, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetErrorString, "char const *(cudaError_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceCount, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceProperties_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceProperties_v2, "cudaError_t (struct cudaDeviceProp *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetAttribute, "cudaError_t (int *, enum cudaDeviceAttr, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetDefaultMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetDefaultMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetMemPool, "cudaError_t (int, cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetMemPool", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetMemPool, "cudaError_t (cudaMemPool_t *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetNvSciSyncAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetNvSciSyncAttributes, "cudaError_t (void *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetP2PAttribute, "cudaError_t (int *, enum cudaDeviceP2PAttr, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaChooseDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaChooseDevice, "cudaError_t (int *, struct cudaDeviceProp const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaInitDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaInitDevice, "cudaError_t (int, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDevice, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDevice, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSetDeviceFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSetDeviceFlags, "cudaError_t (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDeviceFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDeviceFlags, "cudaError_t (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreate, "cudaError_t (cudaStream_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithFlags, "cudaError_t (cudaStream_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCreateWithPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCreateWithPriority, "cudaError_t (cudaStream_t *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetPriority", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetPriority, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetFlags, "cudaError_t (cudaStream_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetId", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetId, "cudaError_t (cudaStream_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetDevice, "cudaError_t (cudaStream_t, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCtxResetPersistingL2Cache", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCtxResetPersistingL2Cache, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamCopyAttributes, "cudaError_t (cudaStream_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSetAttribute, "cudaError_t (cudaStream_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaStreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamDestroy, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamWaitEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamWaitEvent, "cudaError_t (cudaStream_t, cudaEvent_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAddCallback, "cudaError_t (cudaStream_t, cudaStreamCallback_t, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamSynchronize, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamQuery, "cudaError_t (cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamAttachMemAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamAttachMemAsync, "cudaError_t (cudaStream_t, void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamBeginCapture", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCapture, "cudaError_t (cudaStream_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamBeginCaptureToGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamBeginCaptureToGraph, "cudaError_t (cudaStream_t, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, enum cudaStreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaThreadExchangeStreamCaptureMode, "cudaError_t (enum cudaStreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamEndCapture, "cudaError_t (cudaStream_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamIsCapturing", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamIsCapturing, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v2, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamGetCaptureInfo_v3", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamGetCaptureInfo_v3, "cudaError_t (cudaStream_t, enum cudaStreamCaptureStatus *, unsigned PY_LONG_LONG *, cudaGraph_t *, cudaGraphNode_t const **, cudaGraphEdgeData const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamUpdateCaptureDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies, "cudaError_t (cudaStream_t, cudaGraphNode_t *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaStreamUpdateCaptureDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaStreamUpdateCaptureDependencies_v2, "cudaError_t (cudaStream_t, cudaGraphNode_t *, cudaGraphEdgeData const *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreate, "cudaError_t (cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventCreateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventCreateWithFlags, "cudaError_t (cudaEvent_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventRecord", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecord, "cudaError_t (cudaEvent_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventRecordWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventRecordWithFlags, "cudaError_t (cudaEvent_t, cudaStream_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventQuery", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventQuery, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventSynchronize", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventSynchronize, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventDestroy, "cudaError_t (cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaEventElapsedTime_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaEventElapsedTime_v2, "cudaError_t (float *, cudaEvent_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaImportExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalMemory, "cudaError_t (cudaExternalMemory_t *, struct cudaExternalMemoryHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaExternalMemoryGetMappedBuffer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedBuffer, "cudaError_t (void **, cudaExternalMemory_t, struct cudaExternalMemoryBufferDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaExternalMemoryGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaExternalMemoryGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaExternalMemory_t, struct cudaExternalMemoryMipmappedArrayDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyExternalMemory", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalMemory, "cudaError_t (cudaExternalMemory_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaImportExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaImportExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t *, struct cudaExternalSemaphoreHandleDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaSignalExternalSemaphoresAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaSignalExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreSignalParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaWaitExternalSemaphoresAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaWaitExternalSemaphoresAsync_v2, "cudaError_t (cudaExternalSemaphore_t const *, struct cudaExternalSemaphoreWaitParams const *, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyExternalSemaphore, "cudaError_t (cudaExternalSemaphore_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetCacheConfig, "cudaError_t (void const *, enum cudaFuncCache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncGetAttributes, "cudaError_t (struct cudaFuncAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetAttribute, "cudaError_t (void const *, enum cudaFuncAttribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLaunchHostFunc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLaunchHostFunc, "cudaError_t (cudaStream_t, cudaHostFn_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFuncSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFuncSetSharedMemConfig, "cudaError_t (void const *, enum cudaSharedMemConfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyMaxActiveBlocksPerMultiprocessor", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessor, "cudaError_t (int *, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyAvailableDynamicSMemPerBlock", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyAvailableDynamicSMemPerBlock, "cudaError_t (size_t *, void const *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "cudaError_t (int *, void const *, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocManaged, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocHost", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocHost, "cudaError_t (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocPitch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocPitch, "cudaError_t (void **, size_t *, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFree", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFree, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeHost", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeHost, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeArray, "cudaError_t (cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeMipmappedArray, "cudaError_t (cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostAlloc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostAlloc, "cudaError_t (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostRegister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostRegister, "cudaError_t (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostUnregister", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostUnregister, "cudaError_t (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostGetDevicePointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetDevicePointer, "cudaError_t (void **, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaHostGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaHostGetFlags, "cudaError_t (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3D, "cudaError_t (struct cudaPitchedPtr *, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMalloc3DArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMalloc3DArray, "cudaError_t (cudaArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, struct cudaChannelFormatDesc const *, struct cudaExtent, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetMipmappedArrayLevel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetMipmappedArrayLevel, "cudaError_t (cudaArray_t *, cudaMipmappedArray_const_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3D, "cudaError_t (struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeer, "cudaError_t (struct cudaMemcpy3DPeerParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DAsync, "cudaError_t (struct cudaMemcpy3DParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DPeerAsync, "cudaError_t (struct cudaMemcpy3DPeerParms const *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemGetInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemGetInfo, "cudaError_t (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetInfo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetInfo, "cudaError_t (struct cudaChannelFormatDesc *, struct cudaExtent *, unsigned int *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetPlane", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetPlane, "cudaError_t (cudaArray_t *, cudaArray_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMipmappedArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetMemoryRequirements, "cudaError_t (struct cudaArrayMemoryRequirements *, cudaMipmappedArray_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMipmappedArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMipmappedArrayGetSparseProperties, "cudaError_t (struct cudaArraySparseProperties *, cudaMipmappedArray_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeer, "cudaError_t (void *, int, void const *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2D, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DFromArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArray, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DArrayToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyAsync, "cudaError_t (void *, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyPeerAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyPeerAsync, "cudaError_t (void *, int, void const *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyBatchAsync, "cudaError_t (void **, void **, size_t *, size_t, struct cudaMemcpyAttributes *, size_t *, size_t, size_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy3DBatchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy3DBatchAsync, "cudaError_t (size_t, struct cudaMemcpy3DBatchOp *, size_t *, unsigned PY_LONG_LONG, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DAsync, "cudaError_t (void *, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DToArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpy2DFromArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpy2DFromArrayAsync, "cudaError_t (void *, size_t, cudaArray_const_t, size_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset, "cudaError_t (void *, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset2D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2D, "cudaError_t (void *, size_t, int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset3D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3D, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemsetAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemsetAsync, "cudaError_t (void *, int, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset2DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset2DAsync, "cudaError_t (void *, size_t, int, size_t, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemset3DAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemset3DAsync, "cudaError_t (struct cudaPitchedPtr, int, struct cudaExtent, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPrefetchAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync, "cudaError_t (void const *, size_t, int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPrefetchAsync_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPrefetchAsync_v2, "cudaError_t (void const *, size_t, struct cudaMemLocation, unsigned int, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemAdvise", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemAdvise_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemAdvise_v2, "cudaError_t (void const *, size_t, enum cudaMemoryAdvise, struct cudaMemLocation)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemRangeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttribute, "cudaError_t (void *, size_t, enum cudaMemRangeAttribute, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemRangeGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemRangeGetAttributes, "cudaError_t (void **, size_t *, enum cudaMemRangeAttribute *, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArray, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyFromArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArray, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyArrayToArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyArrayToArray, "cudaError_t (cudaArray_t, size_t, size_t, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyToArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyToArrayAsync, "cudaError_t (cudaArray_t, size_t, size_t, void const *, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemcpyFromArrayAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemcpyFromArrayAsync, "cudaError_t (void *, cudaArray_const_t, size_t, size_t, size_t, enum cudaMemcpyKind, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocAsync, "cudaError_t (void **, size_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaFreeAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaFreeAsync, "cudaError_t (void *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolTrimTo", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolTrimTo, "cudaError_t (cudaMemPool_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAttribute, "cudaError_t (cudaMemPool_t, enum cudaMemPoolAttr, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolSetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolSetAccess, "cudaError_t (cudaMemPool_t, struct cudaMemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolGetAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolGetAccess, "cudaError_t (enum cudaMemAccessFlags *, cudaMemPool_t, struct cudaMemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolCreate, "cudaError_t (cudaMemPool_t *, struct cudaMemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolDestroy, "cudaError_t (cudaMemPool_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMallocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMallocFromPoolAsync, "cudaError_t (void **, size_t, cudaMemPool_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportToShareableHandle, "cudaError_t (void *, cudaMemPool_t, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportFromShareableHandle, "cudaError_t (cudaMemPool_t *, void *, enum cudaMemAllocationHandleType, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolExportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolExportPointer, "cudaError_t (struct cudaMemPoolPtrExportData *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaMemPoolImportPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaMemPoolImportPointer, "cudaError_t (void **, cudaMemPool_t, struct cudaMemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaPointerGetAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaPointerGetAttributes, "cudaError_t (struct cudaPointerAttributes *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceCanAccessPeer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceCanAccessPeer, "cudaError_t (int *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceEnablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceEnablePeerAccess, "cudaError_t (int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceDisablePeerAccess", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceDisablePeerAccess, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsUnregisterResource", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnregisterResource, "cudaError_t (cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceSetMapFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceSetMapFlags, "cudaError_t (cudaGraphicsResource_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsMapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsUnmapResources", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsUnmapResources, "cudaError_t (int, cudaGraphicsResource_t *, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceGetMappedPointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedPointer, "cudaError_t (void **, size_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsSubResourceGetMappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsSubResourceGetMappedArray, "cudaError_t (cudaArray_t *, cudaGraphicsResource_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphicsResourceGetMappedMipmappedArray, "cudaError_t (cudaMipmappedArray_t *, cudaGraphicsResource_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetChannelDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetChannelDesc, "cudaError_t (struct cudaChannelFormatDesc *, cudaArray_const_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateChannelDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateChannelDesc, "struct cudaChannelFormatDesc (int, int, int, int, enum cudaChannelFormatKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateTextureObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateTextureObject, "cudaError_t (cudaTextureObject_t *, struct cudaResourceDesc const *, struct cudaTextureDesc const *, struct cudaResourceViewDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroyTextureObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroyTextureObject, "cudaError_t (cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectTextureDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectTextureDesc, "cudaError_t (struct cudaTextureDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetTextureObjectResourceViewDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetTextureObjectResourceViewDesc, "cudaError_t (struct cudaResourceViewDesc *, cudaTextureObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaCreateSurfaceObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaCreateSurfaceObject, "cudaError_t (cudaSurfaceObject_t *, struct cudaResourceDesc const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDestroySurfaceObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDestroySurfaceObject, "cudaError_t (cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetSurfaceObjectResourceDesc", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetSurfaceObjectResourceDesc, "cudaError_t (struct cudaResourceDesc *, cudaSurfaceObject_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDriverGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDriverGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaRuntimeGetVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaRuntimeGetVersion, "cudaError_t (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphCreate, "cudaError_t (cudaGraph_t *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddKernelNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddKernelNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeCopyAttributes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeCopyAttributes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeGetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeGetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphKernelNodeSetAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphKernelNodeSetAttribute, "cudaError_t (cudaGraphNode_t, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrID, __pyx_t_4cuda_8bindings_9_bindings_9cyruntime_cudaKernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemcpyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemcpyNode1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemcpyNode1D, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemcpyNodeSetParams1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemcpyNodeSetParams1D, "cudaError_t (cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemsetNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemsetNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemsetNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemsetNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddHostNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddHostNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphHostNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphHostNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddChildGraphNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddChildGraphNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphChildGraphNodeGetGraph", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphChildGraphNodeGetGraph, "cudaError_t (cudaGraphNode_t, cudaGraph_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEmptyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEmptyNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEventRecordNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventRecordNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventRecordNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventRecordNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddEventWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddEventWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventWaitNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeGetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphEventWaitNodeSetEvent, "cudaError_t (cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddExternalSemaphoresSignalNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresSignalNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresSignalNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddExternalSemaphoresWaitNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddExternalSemaphoresWaitNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresWaitNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemAllocNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemAllocNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemAllocNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemAllocNodeGetParams, "cudaError_t (cudaGraphNode_t, struct cudaMemAllocNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddMemFreeNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddMemFreeNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphMemFreeNodeGetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphMemFreeNodeGetParams, "cudaError_t (cudaGraphNode_t, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGraphMemTrim", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGraphMemTrim, "cudaError_t (int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceGetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaDeviceSetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaDeviceSetGraphMemAttribute, "cudaError_t (int, enum cudaGraphMemAttributeType, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphClone, "cudaError_t (cudaGraph_t *, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeFindInClone", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeFindInClone, "cudaError_t (cudaGraphNode_t *, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetType", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetType, "cudaError_t (cudaGraphNode_t, enum cudaGraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetRootNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetRootNodes, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetEdges", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphGetEdges_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphGetEdges_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t *, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependencies_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependentNodes", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetDependentNodes_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetDependentNodes_v2, "cudaError_t (cudaGraphNode_t, cudaGraphNode_t *, cudaGraphEdgeData *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRemoveDependencies", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRemoveDependencies_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRemoveDependencies_v2, "cudaError_t (cudaGraph_t, cudaGraphNode_t const *, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDestroyNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroyNode, "cudaError_t (cudaGraphNode_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiate, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiateWithFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithFlags, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphInstantiateWithParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphInstantiateWithParams, "cudaError_t (cudaGraphExec_t *, cudaGraph_t, cudaGraphInstantiateParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecGetFlags", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecGetFlags, "cudaError_t (cudaGraphExec_t, unsigned PY_LONG_LONG *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecKernelNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaKernelNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemcpy3DParms const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemcpyNodeSetParams1D", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemcpyNodeSetParams1D, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, void *, void const *, size_t, enum cudaMemcpyKind)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecMemsetNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaMemsetParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecHostNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaHostNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecChildGraphNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventRecordNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecEventWaitNodeSetEvent, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, cudaEvent_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresSignalNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreSignalNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecExternalSemaphoresWaitNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaExternalSemaphoreWaitNodeParams const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeSetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeGetEnabled", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeGetEnabled, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecUpdate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecUpdate, "cudaError_t (cudaGraphExec_t, cudaGraph_t, cudaGraphExecUpdateResultInfo *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphUpload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphUpload, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphLaunch", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphLaunch, "cudaError_t (cudaGraphExec_t, cudaStream_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecDestroy, "cudaError_t (cudaGraphExec_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDestroy, "cudaError_t (cudaGraph_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphDebugDotPrint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphDebugDotPrint, "cudaError_t (cudaGraph_t, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectCreate, "cudaError_t (cudaUserObject_t *, void *, cudaHostFn_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectRetain", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRetain, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaUserObjectRelease", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaUserObjectRelease, "cudaError_t (cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphRetainUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphRetainUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphReleaseUserObject", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphReleaseUserObject, "cudaError_t (cudaGraph_t, cudaUserObject_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddNode", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphAddNode_v2", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphAddNode_v2, "cudaError_t (cudaGraphNode_t *, cudaGraph_t, cudaGraphNode_t const *, cudaGraphEdgeData const *, size_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphNodeSetParams, "cudaError_t (cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphExecNodeSetParams", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphExecNodeSetParams, "cudaError_t (cudaGraphExec_t, cudaGraphNode_t, struct cudaGraphNodeParams *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGraphConditionalHandleCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGraphConditionalHandleCreate, "cudaError_t (cudaGraphConditionalHandle *, cudaGraph_t, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDriverEntryPoint", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPoint, "cudaError_t (char const *, void **, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetDriverEntryPointByVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetDriverEntryPointByVersion, "cudaError_t (char const *, void **, unsigned int, unsigned PY_LONG_LONG, enum cudaDriverEntryPointQueryResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryLoadData", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadData, "cudaError_t (cudaLibrary_t *, void const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryLoadFromFile", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryLoadFromFile, "cudaError_t (cudaLibrary_t *, char const *, enum cudaJitOption *, void **, unsigned int, enum cudaLibraryOption *, void **, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryUnload", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryUnload, "cudaError_t (cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernel, "cudaError_t (cudaKernel_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetGlobal", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetGlobal, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetManaged", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetManaged, "cudaError_t (void **, size_t *, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetUnifiedFunction", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetUnifiedFunction, "cudaError_t (void **, cudaLibrary_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryGetKernelCount", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryGetKernelCount, "cudaError_t (unsigned int *, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaLibraryEnumerateKernels", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaLibraryEnumerateKernels, "cudaError_t (cudaKernel_t *, unsigned int, cudaLibrary_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaKernelSetAttributeForDevice", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaKernelSetAttributeForDevice, "cudaError_t (cudaKernel_t, enum cudaFuncAttribute, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetExportTable", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetExportTable, "cudaError_t (void const **, cudaUUID_t const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaGetKernel", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaGetKernel, "cudaError_t (cudaKernel_t *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaPitchedPtr", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPitchedPtr, "struct cudaPitchedPtr (void *, size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaPos", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaPos, "struct cudaPos (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_make_cudaExtent", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__make_cudaExtent, "struct cudaExtent (size_t, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaProfilerStart", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStart, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "_cudaProfilerStop", (void (**)(void))&__pyx_f_4cuda_8bindings_9_bindings_9cyruntime__cudaProfilerStop, "cudaError_t (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_cyruntime(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_cyruntime}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "cyruntime", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_cyruntime(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_cyruntime(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_cyruntime(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'cyruntime' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cyruntime" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_cyruntime", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__cyruntime) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.cyruntime")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.cyruntime", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/cyruntime.pyx":942 + * + * from libc.stdint cimport uintptr_t + * from cuda.pathfinder import load_nvidia_dynamic_lib # <<<<<<<<<<<<<< + * cimport cuda.bindings._lib.dlfcn as dlfcn + * +*/ + __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cuda_pathfinder, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_load_nvidia_dynamic_lib, __pyx_t_2) < (0)) __PYX_ERR(0, 942, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/cyruntime.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.cyruntime", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.cyruntime"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 48 <= 65535 + const unsigned short n; +#elif 48 / 2 < INT_MAX + const unsigned int n; +#elif 48 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_Function_cudaRuntimeGetVersion_n, sizeof(__pyx_k_Function_cudaRuntimeGetVersion_n), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Function_cudaRuntimeGetVersion_n */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k_abs_path, sizeof(__pyx_k_abs_path), 0, 1, 1}, /* PyObject cname: __pyx_n_u_abs_path */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_cuda_pathfinder, sizeof(__pyx_k_cuda_pathfinder), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_pathfinder */ + {__pyx_k_cudart, sizeof(__pyx_k_cudart), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cudart */ + {__pyx_k_handle_uint, sizeof(__pyx_k_handle_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_uint */ + {__pyx_k_load_nvidia_dynamic_lib, sizeof(__pyx_k_load_nvidia_dynamic_lib), 0, 1, 1}, /* PyObject cname: __pyx_n_u_load_nvidia_dynamic_lib */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 954, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + return 0; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__2); + } + goto done; +} +#endif + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1cd99043939c6bb7b217e87d4a0ba2841786c578 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pxd @@ -0,0 +1,1015 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. + +from libc.stdint cimport uint32_t, uint64_t + +include "cyruntime_types.pxi" + +ctypedef unsigned int GLenum + +ctypedef unsigned int GLuint + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLImageKHR + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLStreamKHR + +ctypedef unsigned int EGLint + +cdef extern from "": + cdef struct void: + pass +ctypedef void* EGLSyncKHR + +ctypedef uint32_t VdpDevice + +ctypedef unsigned long long VdpGetProcAddress + +ctypedef uint32_t VdpVideoSurface + +ctypedef uint32_t VdpOutputSurface + +cdef enum cudaEglFrameType_enum: + cudaEglFrameTypeArray = 0 + cudaEglFrameTypePitch = 1 + +ctypedef cudaEglFrameType_enum cudaEglFrameType + +cdef enum cudaEglResourceLocationFlags_enum: + cudaEglResourceLocationSysmem = 0 + cudaEglResourceLocationVidmem = 1 + +ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags + +cdef enum cudaEglColorFormat_enum: + cudaEglColorFormatYUV420Planar = 0 + cudaEglColorFormatYUV420SemiPlanar = 1 + cudaEglColorFormatYUV422Planar = 2 + cudaEglColorFormatYUV422SemiPlanar = 3 + cudaEglColorFormatARGB = 6 + cudaEglColorFormatRGBA = 7 + cudaEglColorFormatL = 8 + cudaEglColorFormatR = 9 + cudaEglColorFormatYUV444Planar = 10 + cudaEglColorFormatYUV444SemiPlanar = 11 + cudaEglColorFormatYUYV422 = 12 + cudaEglColorFormatUYVY422 = 13 + cudaEglColorFormatABGR = 14 + cudaEglColorFormatBGRA = 15 + cudaEglColorFormatA = 16 + cudaEglColorFormatRG = 17 + cudaEglColorFormatAYUV = 18 + cudaEglColorFormatYVU444SemiPlanar = 19 + cudaEglColorFormatYVU422SemiPlanar = 20 + cudaEglColorFormatYVU420SemiPlanar = 21 + cudaEglColorFormatY10V10U10_444SemiPlanar = 22 + cudaEglColorFormatY10V10U10_420SemiPlanar = 23 + cudaEglColorFormatY12V12U12_444SemiPlanar = 24 + cudaEglColorFormatY12V12U12_420SemiPlanar = 25 + cudaEglColorFormatVYUY_ER = 26 + cudaEglColorFormatUYVY_ER = 27 + cudaEglColorFormatYUYV_ER = 28 + cudaEglColorFormatYVYU_ER = 29 + cudaEglColorFormatYUVA_ER = 31 + cudaEglColorFormatAYUV_ER = 32 + cudaEglColorFormatYUV444Planar_ER = 33 + cudaEglColorFormatYUV422Planar_ER = 34 + cudaEglColorFormatYUV420Planar_ER = 35 + cudaEglColorFormatYUV444SemiPlanar_ER = 36 + cudaEglColorFormatYUV422SemiPlanar_ER = 37 + cudaEglColorFormatYUV420SemiPlanar_ER = 38 + cudaEglColorFormatYVU444Planar_ER = 39 + cudaEglColorFormatYVU422Planar_ER = 40 + cudaEglColorFormatYVU420Planar_ER = 41 + cudaEglColorFormatYVU444SemiPlanar_ER = 42 + cudaEglColorFormatYVU422SemiPlanar_ER = 43 + cudaEglColorFormatYVU420SemiPlanar_ER = 44 + cudaEglColorFormatBayerRGGB = 45 + cudaEglColorFormatBayerBGGR = 46 + cudaEglColorFormatBayerGRBG = 47 + cudaEglColorFormatBayerGBRG = 48 + cudaEglColorFormatBayer10RGGB = 49 + cudaEglColorFormatBayer10BGGR = 50 + cudaEglColorFormatBayer10GRBG = 51 + cudaEglColorFormatBayer10GBRG = 52 + cudaEglColorFormatBayer12RGGB = 53 + cudaEglColorFormatBayer12BGGR = 54 + cudaEglColorFormatBayer12GRBG = 55 + cudaEglColorFormatBayer12GBRG = 56 + cudaEglColorFormatBayer14RGGB = 57 + cudaEglColorFormatBayer14BGGR = 58 + cudaEglColorFormatBayer14GRBG = 59 + cudaEglColorFormatBayer14GBRG = 60 + cudaEglColorFormatBayer20RGGB = 61 + cudaEglColorFormatBayer20BGGR = 62 + cudaEglColorFormatBayer20GRBG = 63 + cudaEglColorFormatBayer20GBRG = 64 + cudaEglColorFormatYVU444Planar = 65 + cudaEglColorFormatYVU422Planar = 66 + cudaEglColorFormatYVU420Planar = 67 + cudaEglColorFormatBayerIspRGGB = 68 + cudaEglColorFormatBayerIspBGGR = 69 + cudaEglColorFormatBayerIspGRBG = 70 + cudaEglColorFormatBayerIspGBRG = 71 + cudaEglColorFormatBayerBCCR = 72 + cudaEglColorFormatBayerRCCB = 73 + cudaEglColorFormatBayerCRBC = 74 + cudaEglColorFormatBayerCBRC = 75 + cudaEglColorFormatBayer10CCCC = 76 + cudaEglColorFormatBayer12BCCR = 77 + cudaEglColorFormatBayer12RCCB = 78 + cudaEglColorFormatBayer12CRBC = 79 + cudaEglColorFormatBayer12CBRC = 80 + cudaEglColorFormatBayer12CCCC = 81 + cudaEglColorFormatY = 82 + cudaEglColorFormatYUV420SemiPlanar_2020 = 83 + cudaEglColorFormatYVU420SemiPlanar_2020 = 84 + cudaEglColorFormatYUV420Planar_2020 = 85 + cudaEglColorFormatYVU420Planar_2020 = 86 + cudaEglColorFormatYUV420SemiPlanar_709 = 87 + cudaEglColorFormatYVU420SemiPlanar_709 = 88 + cudaEglColorFormatYUV420Planar_709 = 89 + cudaEglColorFormatYVU420Planar_709 = 90 + cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91 + cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92 + cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93 + cudaEglColorFormatY10V10U10_422SemiPlanar = 94 + cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95 + cudaEglColorFormatY_ER = 96 + cudaEglColorFormatY_709_ER = 97 + cudaEglColorFormatY10_ER = 98 + cudaEglColorFormatY10_709_ER = 99 + cudaEglColorFormatY12_ER = 100 + cudaEglColorFormatY12_709_ER = 101 + cudaEglColorFormatYUVA = 102 + cudaEglColorFormatYVYU = 104 + cudaEglColorFormatVYUY = 105 + cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106 + cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107 + cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108 + cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109 + cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110 + cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111 + cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112 + cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113 + cudaEglColorFormatUYVY709 = 114 + cudaEglColorFormatUYVY709_ER = 115 + cudaEglColorFormatUYVY2020 = 116 + +ctypedef cudaEglColorFormat_enum cudaEglColorFormat + +cdef struct cudaEglPlaneDesc_st: + unsigned int width + unsigned int height + unsigned int depth + unsigned int pitch + unsigned int numChannels + cudaChannelFormatDesc channelDesc + unsigned int reserved[4] + +ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc + +cdef union anon_union11: + cudaArray_t pArray[3] + cudaPitchedPtr pPitch[3] + +cdef struct cudaEglFrame_st: + anon_union11 frame + cudaEglPlaneDesc planeDesc[3] + unsigned int planeCount + cudaEglFrameType frameType + cudaEglColorFormat eglColorFormat + +ctypedef cudaEglFrame_st cudaEglFrame + +cdef extern from "": + cdef struct CUeglStreamConnection_st: + pass +ctypedef CUeglStreamConnection_st* cudaEglStreamConnection + +cdef enum cudaGLDeviceList: + cudaGLDeviceListAll = 1 + cudaGLDeviceListCurrentFrame = 2 + cudaGLDeviceListNextFrame = 3 + +cdef enum cudaGLMapFlags: + cudaGLMapFlagsNone = 0 + cudaGLMapFlagsReadOnly = 1 + cudaGLMapFlagsWriteDiscard = 2 + +cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil + +cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil + +cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil + +cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil + +cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil + +cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil + +cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + +cdef enum: cudaHostAllocDefault = 0 + +cdef enum: cudaHostAllocPortable = 1 + +cdef enum: cudaHostAllocMapped = 2 + +cdef enum: cudaHostAllocWriteCombined = 4 + +cdef enum: cudaHostRegisterDefault = 0 + +cdef enum: cudaHostRegisterPortable = 1 + +cdef enum: cudaHostRegisterMapped = 2 + +cdef enum: cudaHostRegisterIoMemory = 4 + +cdef enum: cudaHostRegisterReadOnly = 8 + +cdef enum: cudaPeerAccessDefault = 0 + +cdef enum: cudaStreamDefault = 0 + +cdef enum: cudaStreamNonBlocking = 1 + +cdef enum: cudaStreamLegacy = 1 + +cdef enum: cudaStreamPerThread = 2 + +cdef enum: cudaEventDefault = 0 + +cdef enum: cudaEventBlockingSync = 1 + +cdef enum: cudaEventDisableTiming = 2 + +cdef enum: cudaEventInterprocess = 4 + +cdef enum: cudaEventRecordDefault = 0 + +cdef enum: cudaEventRecordExternal = 1 + +cdef enum: cudaEventWaitDefault = 0 + +cdef enum: cudaEventWaitExternal = 1 + +cdef enum: cudaDeviceScheduleAuto = 0 + +cdef enum: cudaDeviceScheduleSpin = 1 + +cdef enum: cudaDeviceScheduleYield = 2 + +cdef enum: cudaDeviceScheduleBlockingSync = 4 + +cdef enum: cudaDeviceBlockingSync = 4 + +cdef enum: cudaDeviceScheduleMask = 7 + +cdef enum: cudaDeviceMapHost = 8 + +cdef enum: cudaDeviceLmemResizeToMax = 16 + +cdef enum: cudaDeviceSyncMemops = 128 + +cdef enum: cudaDeviceMask = 255 + +cdef enum: cudaArrayDefault = 0 + +cdef enum: cudaArrayLayered = 1 + +cdef enum: cudaArraySurfaceLoadStore = 2 + +cdef enum: cudaArrayCubemap = 4 + +cdef enum: cudaArrayTextureGather = 8 + +cdef enum: cudaArrayColorAttachment = 32 + +cdef enum: cudaArraySparse = 64 + +cdef enum: cudaArrayDeferredMapping = 128 + +cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 + +cdef enum: cudaMemAttachGlobal = 1 + +cdef enum: cudaMemAttachHost = 2 + +cdef enum: cudaMemAttachSingle = 4 + +cdef enum: cudaOccupancyDefault = 0 + +cdef enum: cudaOccupancyDisableCachingOverride = 1 + +cdef enum: cudaCpuDeviceId = -1 + +cdef enum: cudaInvalidDeviceId = -2 + +cdef enum: cudaInitDeviceFlagsAreValid = 1 + +cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 + +cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 + +cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 + +cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 + +cdef enum: CUDA_IPC_HANDLE_SIZE = 64 + +cdef enum: cudaExternalMemoryDedicated = 1 + +cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 + +cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 + +cdef enum: cudaNvSciSyncAttrSignal = 1 + +cdef enum: cudaNvSciSyncAttrWait = 2 + +cdef enum: cudaGraphKernelNodePortDefault = 0 + +cdef enum: cudaGraphKernelNodePortProgrammatic = 1 + +cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 + +cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 + +cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 + +cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 + +cdef enum: cudaStreamAttributeMemSyncDomain = 10 + +cdef enum: cudaStreamAttributePriority = 8 + +cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 + +cdef enum: cudaKernelNodeAttributeCooperative = 2 + +cdef enum: cudaKernelNodeAttributePriority = 8 + +cdef enum: cudaKernelNodeAttributeClusterDimension = 4 + +cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 + +cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 + +cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 + +cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 + +cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 + +cdef enum: cudaSurfaceType1D = 1 + +cdef enum: cudaSurfaceType2D = 2 + +cdef enum: cudaSurfaceType3D = 3 + +cdef enum: cudaSurfaceTypeCubemap = 12 + +cdef enum: cudaSurfaceType1DLayered = 241 + +cdef enum: cudaSurfaceType2DLayered = 242 + +cdef enum: cudaSurfaceTypeCubemapLayered = 252 + +cdef enum: cudaTextureType1D = 1 + +cdef enum: cudaTextureType2D = 2 + +cdef enum: cudaTextureType3D = 3 + +cdef enum: cudaTextureTypeCubemap = 12 + +cdef enum: cudaTextureType1DLayered = 241 + +cdef enum: cudaTextureType2DLayered = 242 + +cdef enum: cudaTextureTypeCubemapLayered = 252 + +cdef enum: CUDART_VERSION = 12090 + +cdef enum: __CUDART_API_VERSION = 12090 + +cdef enum: CUDA_EGL_MAX_PLANES = 3 \ No newline at end of file diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pyx new file mode 100644 index 0000000000000000000000000000000000000000..cad7e89a2fbc9cf9d5e0e313bf264803e2fc4ec0 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime.pyx @@ -0,0 +1,974 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings._bindings.cyruntime as cyruntime +cimport cython + +cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceReset() + +cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSynchronize() + +cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSetLimit(limit, value) + +cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetLimit(pValue, limit) + +cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, fmtDesc, device) + +cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetCacheConfig(pCacheConfig) + +cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetStreamPriorityRange(leastPriority, greatestPriority) + +cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSetCacheConfig(cacheConfig) + +cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetByPCIBusId(device, pciBusId) + +cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetPCIBusId(pciBusId, length, device) + +cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaIpcGetEventHandle(handle, event) + +cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaIpcOpenEventHandle(event, handle) + +cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaIpcGetMemHandle(handle, devPtr) + +cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaIpcOpenMemHandle(devPtr, handle, flags) + +cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaIpcCloseMemHandle(devPtr) + +cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceFlushGPUDirectRDMAWrites(target, scope) + +cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceRegisterAsyncNotification(device, callbackFunc, userData, callback) + +cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceUnregisterAsyncNotification(device, callback) + +cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetSharedMemConfig(pConfig) + +cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSetSharedMemConfig(config) + +cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetLastError() + +cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaPeekAtLastError() + +cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: + return cyruntime._cudaGetErrorName(error) + +cdef const char* cudaGetErrorString(cudaError_t error) except ?NULL nogil: + return cyruntime._cudaGetErrorString(error) + +cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDeviceCount(count) + +cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDeviceProperties_v2(prop, device) + +cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetAttribute(value, attr, device) + +cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetDefaultMemPool(memPool, device) + +cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSetMemPool(device, memPool) + +cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetMemPool(memPool, device) + +cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, device, flags) + +cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetP2PAttribute(value, attr, srcDevice, dstDevice) + +cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaChooseDevice(device, prop) + +cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaInitDevice(device, deviceFlags, flags) + +cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaSetDevice(device) + +cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDevice(device) + +cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaSetDeviceFlags(flags) + +cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDeviceFlags(flags) + +cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamCreate(pStream) + +cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamCreateWithFlags(pStream, flags) + +cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamCreateWithPriority(pStream, flags, priority) + +cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetPriority(hStream, priority) + +cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetFlags(hStream, flags) + +cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetId(hStream, streamId) + +cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetDevice(hStream, device) + +cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaCtxResetPersistingL2Cache() + +cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamCopyAttributes(dst, src) + +cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetAttribute(hStream, attr, value_out) + +cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamSetAttribute(hStream, attr, value) + +cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamDestroy(stream) + +cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamWaitEvent(stream, event, flags) + +cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamAddCallback(stream, callback, userData, flags) + +cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamSynchronize(stream) + +cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamQuery(stream) + +cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamAttachMemAsync(stream, devPtr, length, flags) + +cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamBeginCapture(stream, mode) + +cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamBeginCaptureToGraph(stream, graph, dependencies, dependencyData, numDependencies, mode) + +cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaThreadExchangeStreamCaptureMode(mode) + +cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamEndCapture(stream, pGraph) + +cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamIsCapturing(stream, pCaptureStatus) + +cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetCaptureInfo_v2(stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out) + +cdef cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamGetCaptureInfo_v3(stream, captureStatus_out, id_out, graph_out, dependencies_out, edgeData_out, numDependencies_out) + +cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamUpdateCaptureDependencies(stream, dependencies, numDependencies, flags) + +cdef cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaStreamUpdateCaptureDependencies_v2(stream, dependencies, dependencyData, numDependencies, flags) + +cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventCreate(event) + +cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventCreateWithFlags(event, flags) + +cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventRecord(event, stream) + +cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventRecordWithFlags(event, stream, flags) + +cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventQuery(event) + +cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventSynchronize(event) + +cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventDestroy(event) + +cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventElapsedTime(ms, start, end) + +cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventElapsedTime_v2(ms, start, end) + +cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaImportExternalMemory(extMem_out, memHandleDesc) + +cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc) + +cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc) + +cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDestroyExternalMemory(extMem) + +cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaImportExternalSemaphore(extSem_out, semHandleDesc) + +cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaSignalExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaWaitExternalSemaphoresAsync_v2(extSemArray, paramsArray, numExtSems, stream) + +cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDestroyExternalSemaphore(extSem) + +cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFuncSetCacheConfig(func, cacheConfig) + +cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFuncGetAttributes(attr, func) + +cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFuncSetAttribute(func, attr, value) + +cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLaunchHostFunc(stream, fn, userData) + +cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFuncSetSharedMemConfig(func, config) + +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize) + +cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize) + +cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags) + +cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocManaged(devPtr, size, flags) + +cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMalloc(devPtr, size) + +cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocHost(ptr, size) + +cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocPitch(devPtr, pitch, width, height) + +cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocArray(array, desc, width, height, flags) + +cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFree(devPtr) + +cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFreeHost(ptr) + +cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFreeArray(array) + +cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFreeMipmappedArray(mipmappedArray) + +cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaHostAlloc(pHost, size, flags) + +cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaHostRegister(ptr, size, flags) + +cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaHostUnregister(ptr) + +cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaHostGetDevicePointer(pDevice, pHost, flags) + +cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaHostGetFlags(pFlags, pHost) + +cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMalloc3D(pitchedDevPtr, extent) + +cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMalloc3DArray(array, desc, extent, flags) + +cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocMipmappedArray(mipmappedArray, desc, extent, numLevels, flags) + +cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetMipmappedArrayLevel(levelArray, mipmappedArray, level) + +cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy3D(p) + +cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy3DPeer(p) + +cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy3DAsync(p, stream) + +cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy3DPeerAsync(p, stream) + +cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemGetInfo(free, total) + +cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaArrayGetInfo(desc, extent, flags, array) + +cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaArrayGetPlane(pPlaneArray, hArray, planeIdx) + +cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaArrayGetMemoryRequirements(memoryRequirements, array, device) + +cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device) + +cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaArrayGetSparseProperties(sparseProperties, array) + +cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMipmappedArrayGetSparseProperties(sparseProperties, mipmap) + +cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy(dst, src, count, kind) + +cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyPeer(dst, dstDevice, src, srcDevice, count) + +cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2D(dst, dpitch, src, spitch, width, height, kind) + +cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DToArray(dst, wOffset, hOffset, src, spitch, width, height, kind) + +cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DFromArray(dst, dpitch, src, wOffset, hOffset, width, height, kind) + +cdef cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, width, height, kind) + +cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyAsync(dst, src, count, kind, stream) + +cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream) + +cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + +cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + +cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream) + +cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DToArrayAsync(dst, wOffset, hOffset, src, spitch, width, height, kind, stream) + +cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpy2DFromArrayAsync(dst, dpitch, src, wOffset, hOffset, width, height, kind, stream) + +cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemset(devPtr, value, count) + +cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemset2D(devPtr, pitch, value, width, height) + +cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemset3D(pitchedDevPtr, value, extent) + +cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemsetAsync(devPtr, value, count, stream) + +cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemset2DAsync(devPtr, pitch, value, width, height, stream) + +cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemset3DAsync(pitchedDevPtr, value, extent, stream) + +cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPrefetchAsync(devPtr, count, dstDevice, stream) + +cdef cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPrefetchAsync_v2(devPtr, count, location, flags, stream) + +cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemAdvise(devPtr, count, advice, device) + +cdef cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemAdvise_v2(devPtr, count, advice, location) + +cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemRangeGetAttribute(data, dataSize, attribute, devPtr, count) + +cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count) + +cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyToArray(dst, wOffset, hOffset, src, count, kind) + +cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyFromArray(dst, src, wOffset, hOffset, count, kind) + +cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyArrayToArray(dst, wOffsetDst, hOffsetDst, src, wOffsetSrc, hOffsetSrc, count, kind) + +cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyToArrayAsync(dst, wOffset, hOffset, src, count, kind, stream) + +cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemcpyFromArrayAsync(dst, src, wOffset, hOffset, count, kind, stream) + +cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocAsync(devPtr, size, hStream) + +cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaFreeAsync(devPtr, hStream) + +cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolTrimTo(memPool, minBytesToKeep) + +cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolSetAttribute(memPool, attr, value) + +cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolGetAttribute(memPool, attr, value) + +cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolSetAccess(memPool, descList, count) + +cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolGetAccess(flags, memPool, location) + +cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolCreate(memPool, poolProps) + +cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolDestroy(memPool) + +cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMallocFromPoolAsync(ptr, size, memPool, stream) + +cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolExportToShareableHandle(shareableHandle, memPool, handleType, flags) + +cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolImportFromShareableHandle(memPool, shareableHandle, handleType, flags) + +cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolExportPointer(exportData, ptr) + +cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaMemPoolImportPointer(ptr, memPool, exportData) + +cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaPointerGetAttributes(attributes, ptr) + +cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceCanAccessPeer(canAccessPeer, device, peerDevice) + +cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceEnablePeerAccess(peerDevice, flags) + +cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceDisablePeerAccess(peerDevice) + +cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsUnregisterResource(resource) + +cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsResourceSetMapFlags(resource, flags) + +cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsMapResources(count, resources, stream) + +cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsUnmapResources(count, resources, stream) + +cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsResourceGetMappedPointer(devPtr, size, resource) + +cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsSubResourceGetMappedArray(array, resource, arrayIndex, mipLevel) + +cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray, resource) + +cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetChannelDesc(desc, array) +@cython.show_performance_hints(False) +cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil: + return cyruntime._cudaCreateChannelDesc(x, y, z, w, f) + +cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaCreateTextureObject(pTexObject, pResDesc, pTexDesc, pResViewDesc) + +cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDestroyTextureObject(texObject) + +cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetTextureObjectResourceDesc(pResDesc, texObject) + +cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetTextureObjectTextureDesc(pTexDesc, texObject) + +cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetTextureObjectResourceViewDesc(pResViewDesc, texObject) + +cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaCreateSurfaceObject(pSurfObject, pResDesc) + +cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDestroySurfaceObject(surfObject) + +cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetSurfaceObjectResourceDesc(pResDesc, surfObject) + +cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDriverGetVersion(driverVersion) + +cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaRuntimeGetVersion(runtimeVersion) + +cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphCreate(pGraph, flags) + +cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddKernelNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphKernelNodeGetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphKernelNodeSetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphKernelNodeCopyAttributes(hSrc, hDst) + +cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphKernelNodeGetAttribute(hNode, attr, value_out) + +cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphKernelNodeSetAttribute(hNode, attr, value) + +cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddMemcpyNode(pGraphNode, graph, pDependencies, numDependencies, pCopyParams) + +cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddMemcpyNode1D(pGraphNode, graph, pDependencies, numDependencies, dst, src, count, kind) + +cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemcpyNodeGetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemcpyNodeSetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemcpyNodeSetParams1D(node, dst, src, count, kind) + +cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddMemsetNode(pGraphNode, graph, pDependencies, numDependencies, pMemsetParams) + +cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemsetNodeGetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemsetNodeSetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddHostNode(pGraphNode, graph, pDependencies, numDependencies, pNodeParams) + +cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphHostNodeGetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphHostNodeSetParams(node, pNodeParams) + +cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddChildGraphNode(pGraphNode, graph, pDependencies, numDependencies, childGraph) + +cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphChildGraphNodeGetGraph(node, pGraph) + +cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddEmptyNode(pGraphNode, graph, pDependencies, numDependencies) + +cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddEventRecordNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphEventRecordNodeGetEvent(node, event_out) + +cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphEventRecordNodeSetEvent(node, event) + +cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddEventWaitNode(pGraphNode, graph, pDependencies, numDependencies, event) + +cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphEventWaitNodeGetEvent(node, event_out) + +cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphEventWaitNodeSetEvent(node, event) + +cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddExternalSemaphoresSignalNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out) + +cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams) + +cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddExternalSemaphoresWaitNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out) + +cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams) + +cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddMemAllocNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemAllocNodeGetParams(node, params_out) + +cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddMemFreeNode(pGraphNode, graph, pDependencies, numDependencies, dptr) + +cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphMemFreeNodeGetParams(node, dptr_out) + +cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGraphMemTrim(device) + +cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceGetGraphMemAttribute(device, attr, value) + +cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaDeviceSetGraphMemAttribute(device, attr, value) + +cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphClone(pGraphClone, originalGraph) + +cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeFindInClone(pNode, originalNode, clonedGraph) + +cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetType(node, pType) + +cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphGetNodes(graph, nodes, numNodes) + +cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphGetRootNodes(graph, pRootNodes, pNumRootNodes) + +cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphGetEdges(graph, from_, to, numEdges) + +cdef cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphGetEdges_v2(graph, from_, to, edgeData, numEdges) + +cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetDependencies(node, pDependencies, pNumDependencies) + +cdef cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetDependencies_v2(node, pDependencies, edgeData, pNumDependencies) + +cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetDependentNodes(node, pDependentNodes, pNumDependentNodes) + +cdef cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetDependentNodes_v2(node, pDependentNodes, edgeData, pNumDependentNodes) + +cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphRemoveDependencies(graph, from_, to, numDependencies) + +cdef cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphRemoveDependencies_v2(graph, from_, to, edgeData, numDependencies) + +cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphDestroyNode(node) + +cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphInstantiate(pGraphExec, graph, flags) + +cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphInstantiateWithFlags(pGraphExec, graph, flags) + +cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphInstantiateWithParams(pGraphExec, graph, instantiateParams) + +cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecGetFlags(graphExec, flags) + +cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, count, kind) + +cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams) + +cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph) + +cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event) + +cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams) + +cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeSetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeGetEnabled(hGraphExec, hNode, isEnabled) + +cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecUpdate(hGraphExec, hGraph, resultInfo) + +cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphUpload(graphExec, stream) + +cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphLaunch(graphExec, stream) + +cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecDestroy(graphExec) + +cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphDestroy(graph) + +cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphDebugDotPrint(graph, path, flags) + +cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags) + +cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaUserObjectRetain(object, count) + +cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaUserObjectRelease(object, count) + +cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphRetainUserObject(graph, object, count, flags) + +cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphReleaseUserObject(graph, object, count) + +cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddNode(pGraphNode, graph, pDependencies, numDependencies, nodeParams) + +cdef cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphAddNode_v2(pGraphNode, graph, pDependencies, dependencyData, numDependencies, nodeParams) + +cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphNodeSetParams(node, nodeParams) + +cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphExecNodeSetParams(graphExec, node, nodeParams) + +cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphConditionalHandleCreate(pHandle_out, graph, defaultLaunchValue, flags) + +cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDriverEntryPoint(symbol, funcPtr, flags, driverStatus) + +cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetDriverEntryPointByVersion(symbol, funcPtr, cudaVersion, flags, driverStatus) + +cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryUnload(library) + +cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryGetKernel(pKernel, library, name) + +cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryGetGlobal(dptr, numbytes, library, name) + +cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryGetManaged(dptr, numbytes, library, name) + +cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryGetUnifiedFunction(fptr, library, symbol) + +cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryGetKernelCount(count, lib) + +cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaLibraryEnumerateKernels(kernels, numKernels, lib) + +cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaKernelSetAttributeForDevice(kernel, attr, value, device) + +cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetExportTable(ppExportTable, pExportTableId) + +cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGetKernel(kernelPtr, entryFuncAddr) +@cython.show_performance_hints(False) +cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil: + return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz) +@cython.show_performance_hints(False) +cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil: + return cyruntime._make_cudaPos(x, y, z) +@cython.show_performance_hints(False) +cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil: + return cyruntime._make_cudaExtent(w, h, d) + +cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsEGLRegisterImage(pCudaResource, image, flags) + +cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamConsumerConnect(conn, eglStream) + +cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamConsumerConnectWithFlags(conn, eglStream, flags) + +cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamConsumerDisconnect(conn) + +cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout) + +cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream) + +cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamProducerConnect(conn, eglStream, width, height) + +cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamProducerDisconnect(conn) + +cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamProducerPresentFrame(conn, eglframe, pStream) + +cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEGLStreamProducerReturnFrame(conn, eglframe, pStream) + +cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel) + +cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaEventCreateFromEGLSync(phEvent, eglSync, flags) + +cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaProfilerStart() + +cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaProfilerStop() + +cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGLGetDevices(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList) + +cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsGLRegisterImage(resource, image, target, flags) + +cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsGLRegisterBuffer(resource, buffer, flags) + +cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaVDPAUGetDevice(device, vdpDevice, vdpGetProcAddress) + +cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaVDPAUSetVDPAUDevice(device, vdpDevice, vdpGetProcAddress) + +cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsVDPAURegisterVideoSurface(resource, vdpSurface, flags) + +cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil: + return cyruntime._cudaGraphicsVDPAURegisterOutputSurface(resource, vdpSurface, flags) + +from libc.stdint cimport uintptr_t +from cuda.pathfinder import load_nvidia_dynamic_lib +cimport cuda.bindings._lib.dlfcn as dlfcn + +cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil: + # Load + with gil: + loaded_dl = load_nvidia_dynamic_lib("cudart") + handle = loaded_dl._handle_uint + __cudaRuntimeGetVersion = dlfcn.dlsym(handle, 'cudaRuntimeGetVersion') + + if __cudaRuntimeGetVersion == NULL: + with gil: + raise RuntimeError(f'Function "cudaRuntimeGetVersion" not found in {loaded_dl.abs_path}') + + # Call + cdef cudaError_t err = cudaSuccess + err = ( __cudaRuntimeGetVersion)(runtimeVersion) + + # We explicitly do *NOT* cleanup the library handle here, acknowledging + # that, yes, the handle leaks. The reason is that there's a + # `functools.cache` on the top-level caller of this function. + # + # This means this library would be opened once and then immediately closed, + # all the while remaining in the cache lurking there for people to call. + # + # Since we open the library one time (technically once per unique library name), + # there's not a ton of leakage, which we deem acceptable for the 1000x speedup + # achieved by caching (ultimately) `ctypes.CDLL` calls. + # + # Long(er)-term we can explore cleaning up the library using higher-level + # Python mechanisms, like `__del__` or `weakref.finalizer`s. + + return err diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_functions.pxi b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_functions.pxi new file mode 100644 index 0000000000000000000000000000000000000000..2c8390ab907714abfa32412c8c51acf5ec1c2bde --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_functions.pxi @@ -0,0 +1,897 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cdef extern from "cuda_runtime_api.h": + + + cudaError_t cudaDeviceReset() nogil + + + cudaError_t cudaDeviceSynchronize() nogil + + + cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) nogil + + + cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) nogil + + + cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) nogil + + + cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) nogil + + + cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil + + + cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) nogil + + + cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) nogil + + + cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int length, int device) nogil + + + cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) nogil + + + cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) nogil + + + cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) nogil + + + cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) nogil + + + cudaError_t cudaIpcCloseMemHandle(void* devPtr) nogil + + + cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) nogil + + + cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) nogil + + + cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) nogil + + + cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) nogil + + + cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) nogil + + + cudaError_t cudaGetLastError() nogil + + + cudaError_t cudaPeekAtLastError() nogil + + + const char* cudaGetErrorName(cudaError_t error) nogil + + + const char* cudaGetErrorString(cudaError_t error) nogil + + + cudaError_t cudaGetDeviceCount(int* count) nogil + + + cudaError_t cudaGetDeviceProperties_v2(cudaDeviceProp* prop, int device) nogil + + + cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) nogil + + + cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) nogil + + + cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) nogil + + + cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) nogil + + + cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) nogil + + + cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) nogil + + + cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) nogil + + + cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) nogil + + + cudaError_t cudaSetDevice(int device) nogil + + + cudaError_t cudaGetDevice(int* device) nogil + + + cudaError_t cudaSetDeviceFlags(unsigned int flags) nogil + + + cudaError_t cudaGetDeviceFlags(unsigned int* flags) nogil + + + cudaError_t cudaStreamCreate(cudaStream_t* pStream) nogil + + + cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) nogil + + + cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) nogil + + + cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) nogil + + + cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) nogil + + + cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) nogil + + + cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) nogil + + + cudaError_t cudaCtxResetPersistingL2Cache() nogil + + + cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) nogil + + + cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) nogil + + + cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) nogil + + + cudaError_t cudaStreamDestroy(cudaStream_t stream) nogil + + + cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) nogil + + + cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) nogil + + + cudaError_t cudaStreamSynchronize(cudaStream_t stream) nogil + + + cudaError_t cudaStreamQuery(cudaStream_t stream) nogil + + + cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) nogil + + + cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) nogil + + + cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) nogil + + + cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) nogil + + + cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) nogil + + + cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) nogil + + + cudaError_t cudaStreamGetCaptureInfo_v2_ptsz(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) nogil + + + cudaError_t cudaStreamGetCaptureInfo_v2(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, size_t* numDependencies_out) nogil + + + cudaError_t cudaStreamGetCaptureInfo_v3(cudaStream_t stream, 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) nogil + + + cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, size_t numDependencies, unsigned int flags) nogil + + + cudaError_t cudaStreamUpdateCaptureDependencies_v2(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) nogil + + + cudaError_t cudaEventCreate(cudaEvent_t* event) nogil + + + cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) nogil + + + cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) nogil + + + cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) nogil + + + cudaError_t cudaEventQuery(cudaEvent_t event) nogil + + + cudaError_t cudaEventSynchronize(cudaEvent_t event) nogil + + + cudaError_t cudaEventDestroy(cudaEvent_t event) nogil + + + cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) nogil + + + cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) nogil + + + cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) nogil + + + cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) nogil + + + cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) nogil + + + cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) nogil + + + cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) nogil + + + cudaError_t cudaSignalExternalSemaphoresAsync_v2_ptsz(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil + + + cudaError_t cudaSignalExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil + + + cudaError_t cudaWaitExternalSemaphoresAsync_v2_ptsz(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil + + + cudaError_t cudaWaitExternalSemaphoresAsync_v2(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) nogil + + + cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) nogil + + + cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) nogil + + + cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) nogil + + + cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) nogil + + + cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) nogil + + + cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) nogil + + + cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) nogil + + + cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) nogil + + + cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil + + + cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) nogil + + + cudaError_t cudaMalloc(void** devPtr, size_t size) nogil + + + cudaError_t cudaMallocHost(void** ptr, size_t size) nogil + + + cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) nogil + + + cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) nogil + + + cudaError_t cudaFree(void* devPtr) nogil + + + cudaError_t cudaFreeHost(void* ptr) nogil + + + cudaError_t cudaFreeArray(cudaArray_t array) nogil + + + cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) nogil + + + cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) nogil + + + cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) nogil + + + cudaError_t cudaHostUnregister(void* ptr) nogil + + + cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) nogil + + + cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) nogil + + + cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) nogil + + + cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) nogil + + + cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) nogil + + + cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) nogil + + + cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) nogil + + + cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) nogil + + + cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) nogil + + + cudaError_t cudaMemGetInfo(size_t* free, size_t* total) nogil + + + cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) nogil + + + cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) nogil + + + cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) nogil + + + cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) nogil + + + cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) nogil + + + cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) nogil + + + cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) nogil + + + cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpy2DArrayToArray(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, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMemset(void* devPtr, int value, size_t count) nogil + + + cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) nogil + + + cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) nogil + + + cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) nogil + + + cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) nogil + + + cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) nogil + + + cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, int dstDevice, cudaStream_t stream) nogil + + + cudaError_t cudaMemPrefetchAsync_v2(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) nogil + + + cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, int device) nogil + + + cudaError_t cudaMemAdvise_v2(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) nogil + + + cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) nogil + + + cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) nogil + + + cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) nogil + + + cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) nogil + + + cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) nogil + + + cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) nogil + + + cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) nogil + + + cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) nogil + + + cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) nogil + + + cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) nogil + + + cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) nogil + + + cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) nogil + + + cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) nogil + + + cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) nogil + + + cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) nogil + + + cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) nogil + + + cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) nogil + + + cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) nogil + + + cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) nogil + + + cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) nogil + + + cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) nogil + + + cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) nogil + + + cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) nogil + + + cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) nogil + + + cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) nogil + + + cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) nogil + + + cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) nogil + + + cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) nogil + + + cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) nogil + + + cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) nogil + + + cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) nogil + + + cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) nogil + + + cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) nogil + + + cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) nogil + + + cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) nogil + + + cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) nogil + + + cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) nogil + + + cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) nogil + + + cudaError_t cudaDriverGetVersion(int* driverVersion) nogil + + + cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) nogil + + + cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) nogil + + + cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hSrc, cudaGraphNode_t hDst) nogil + + + cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) nogil + + + cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) nogil + + + cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) nogil + + + cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) nogil + + + cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) nogil + + + cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) nogil + + + cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) nogil + + + cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) nogil + + + cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) nogil + + + cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) nogil + + + cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) nogil + + + cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) nogil + + + cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) nogil + + + cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) nogil + + + cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) nogil + + + cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) nogil + + + cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) nogil + + + cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) nogil + + + cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) nogil + + + cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) nogil + + + cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) nogil + + + cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) nogil + + + cudaError_t cudaDeviceGraphMemTrim(int device) nogil + + + cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) nogil + + + cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) nogil + + + cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) nogil + + + cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) nogil + + + cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) nogil + + + cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) nogil + + + cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) nogil + + + cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, size_t* numEdges) nogil + + + cudaError_t cudaGraphGetEdges_v2(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) nogil + + + cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, size_t* pNumDependencies) nogil + + + cudaError_t cudaGraphNodeGetDependencies_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) nogil + + + cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, size_t* pNumDependentNodes) nogil + + + cudaError_t cudaGraphNodeGetDependentNodes_v2(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) nogil + + + cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) nogil + + + cudaError_t cudaGraphAddDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) nogil + + + cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, size_t numDependencies) nogil + + + cudaError_t cudaGraphRemoveDependencies_v2(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) nogil + + + cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) nogil + + + cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) nogil + + + cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) nogil + + + cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) nogil + + + cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) nogil + + + cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) nogil + + + cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) nogil + + + cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) nogil + + + cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) nogil + + + cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) nogil + + + cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) nogil + + + cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) nogil + + + cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) nogil + + + cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) nogil + + + cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) nogil + + + cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) nogil + + + cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) nogil + + + cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) nogil + + + cudaError_t cudaGraphDestroy(cudaGraph_t graph) nogil + + + cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) nogil + + + cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) nogil + + + cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) nogil + + + cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) nogil + + + cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) nogil + + + cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) nogil + + + cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraphNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphAddNode_v2(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) nogil + + + cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) nogil + + + cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) nogil + + + cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) nogil + + + cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) nogil + + + cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) nogil + + + cudaError_t cudaLibraryUnload(cudaLibrary_t library) nogil + + + cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) nogil + + + cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) nogil + + + cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) nogil + + + cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) nogil + + + cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) nogil + + + cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) nogil + + + cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) nogil + + + cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) nogil + + + cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) nogil + + +cdef extern from "cuda_runtime.h": + + + cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil + + + cudaPos make_cudaPos(size_t x, size_t y, size_t z) nogil + + + cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil + + +cdef extern from "cuda_profiler_api.h": + + + cudaError_t cudaProfilerStart() nogil + + + cudaError_t cudaProfilerStop() nogil + diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_types.pxi b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_types.pxi new file mode 100644 index 0000000000000000000000000000000000000000..d4e612ef29c15d6b1ef3bd659142ad0ce5423c22 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/cyruntime_types.pxi @@ -0,0 +1,1559 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. + +cdef extern from "vector_types.h": + + cdef struct dim3: + unsigned int x + unsigned int y + unsigned int z + +cdef extern from "driver_types.h": + + cdef enum cudaError: + cudaSuccess = 0 + cudaErrorInvalidValue = 1 + cudaErrorMemoryAllocation = 2 + cudaErrorInitializationError = 3 + cudaErrorCudartUnloading = 4 + cudaErrorProfilerDisabled = 5 + cudaErrorProfilerNotInitialized = 6 + cudaErrorProfilerAlreadyStarted = 7 + cudaErrorProfilerAlreadyStopped = 8 + cudaErrorInvalidConfiguration = 9 + cudaErrorInvalidPitchValue = 12 + cudaErrorInvalidSymbol = 13 + cudaErrorInvalidHostPointer = 16 + cudaErrorInvalidDevicePointer = 17 + cudaErrorInvalidTexture = 18 + cudaErrorInvalidTextureBinding = 19 + cudaErrorInvalidChannelDescriptor = 20 + cudaErrorInvalidMemcpyDirection = 21 + cudaErrorAddressOfConstant = 22 + cudaErrorTextureFetchFailed = 23 + cudaErrorTextureNotBound = 24 + cudaErrorSynchronizationError = 25 + cudaErrorInvalidFilterSetting = 26 + cudaErrorInvalidNormSetting = 27 + cudaErrorMixedDeviceExecution = 28 + cudaErrorNotYetImplemented = 31 + cudaErrorMemoryValueTooLarge = 32 + cudaErrorStubLibrary = 34 + cudaErrorInsufficientDriver = 35 + cudaErrorCallRequiresNewerDriver = 36 + cudaErrorInvalidSurface = 37 + cudaErrorDuplicateVariableName = 43 + cudaErrorDuplicateTextureName = 44 + cudaErrorDuplicateSurfaceName = 45 + cudaErrorDevicesUnavailable = 46 + cudaErrorIncompatibleDriverContext = 49 + cudaErrorMissingConfiguration = 52 + cudaErrorPriorLaunchFailure = 53 + cudaErrorLaunchMaxDepthExceeded = 65 + cudaErrorLaunchFileScopedTex = 66 + cudaErrorLaunchFileScopedSurf = 67 + cudaErrorSyncDepthExceeded = 68 + cudaErrorLaunchPendingCountExceeded = 69 + cudaErrorInvalidDeviceFunction = 98 + cudaErrorNoDevice = 100 + cudaErrorInvalidDevice = 101 + cudaErrorDeviceNotLicensed = 102 + cudaErrorSoftwareValidityNotEstablished = 103 + cudaErrorStartupFailure = 127 + cudaErrorInvalidKernelImage = 200 + cudaErrorDeviceUninitialized = 201 + cudaErrorMapBufferObjectFailed = 205 + cudaErrorUnmapBufferObjectFailed = 206 + cudaErrorArrayIsMapped = 207 + cudaErrorAlreadyMapped = 208 + cudaErrorNoKernelImageForDevice = 209 + cudaErrorAlreadyAcquired = 210 + cudaErrorNotMapped = 211 + cudaErrorNotMappedAsArray = 212 + cudaErrorNotMappedAsPointer = 213 + cudaErrorECCUncorrectable = 214 + cudaErrorUnsupportedLimit = 215 + cudaErrorDeviceAlreadyInUse = 216 + cudaErrorPeerAccessUnsupported = 217 + cudaErrorInvalidPtx = 218 + cudaErrorInvalidGraphicsContext = 219 + cudaErrorNvlinkUncorrectable = 220 + cudaErrorJitCompilerNotFound = 221 + cudaErrorUnsupportedPtxVersion = 222 + cudaErrorJitCompilationDisabled = 223 + cudaErrorUnsupportedExecAffinity = 224 + cudaErrorUnsupportedDevSideSync = 225 + cudaErrorContained = 226 + cudaErrorInvalidSource = 300 + cudaErrorFileNotFound = 301 + cudaErrorSharedObjectSymbolNotFound = 302 + cudaErrorSharedObjectInitFailed = 303 + cudaErrorOperatingSystem = 304 + cudaErrorInvalidResourceHandle = 400 + cudaErrorIllegalState = 401 + cudaErrorLossyQuery = 402 + cudaErrorSymbolNotFound = 500 + cudaErrorNotReady = 600 + cudaErrorIllegalAddress = 700 + cudaErrorLaunchOutOfResources = 701 + cudaErrorLaunchTimeout = 702 + cudaErrorLaunchIncompatibleTexturing = 703 + cudaErrorPeerAccessAlreadyEnabled = 704 + cudaErrorPeerAccessNotEnabled = 705 + cudaErrorSetOnActiveProcess = 708 + cudaErrorContextIsDestroyed = 709 + cudaErrorAssert = 710 + cudaErrorTooManyPeers = 711 + cudaErrorHostMemoryAlreadyRegistered = 712 + cudaErrorHostMemoryNotRegistered = 713 + cudaErrorHardwareStackError = 714 + cudaErrorIllegalInstruction = 715 + cudaErrorMisalignedAddress = 716 + cudaErrorInvalidAddressSpace = 717 + cudaErrorInvalidPc = 718 + cudaErrorLaunchFailure = 719 + cudaErrorCooperativeLaunchTooLarge = 720 + cudaErrorTensorMemoryLeak = 721 + cudaErrorNotPermitted = 800 + cudaErrorNotSupported = 801 + cudaErrorSystemNotReady = 802 + cudaErrorSystemDriverMismatch = 803 + cudaErrorCompatNotSupportedOnDevice = 804 + cudaErrorMpsConnectionFailed = 805 + cudaErrorMpsRpcFailure = 806 + cudaErrorMpsServerNotReady = 807 + cudaErrorMpsMaxClientsReached = 808 + cudaErrorMpsMaxConnectionsReached = 809 + cudaErrorMpsClientTerminated = 810 + cudaErrorCdpNotSupported = 811 + cudaErrorCdpVersionMismatch = 812 + cudaErrorStreamCaptureUnsupported = 900 + cudaErrorStreamCaptureInvalidated = 901 + cudaErrorStreamCaptureMerge = 902 + cudaErrorStreamCaptureUnmatched = 903 + cudaErrorStreamCaptureUnjoined = 904 + cudaErrorStreamCaptureIsolation = 905 + cudaErrorStreamCaptureImplicit = 906 + cudaErrorCapturedEvent = 907 + cudaErrorStreamCaptureWrongThread = 908 + cudaErrorTimeout = 909 + cudaErrorGraphExecUpdateFailure = 910 + cudaErrorExternalDevice = 911 + cudaErrorInvalidClusterSize = 912 + cudaErrorFunctionNotLoaded = 913 + cudaErrorInvalidResourceType = 914 + cudaErrorInvalidResourceConfiguration = 915 + cudaErrorUnknown = 999 + cudaErrorApiFailureBase = 10000 + + ctypedef cudaError cudaError_t + + cdef struct cudaChannelFormatDesc: + int x + int y + int z + int w + cudaChannelFormatKind f + + cdef struct cudaArray: + pass + ctypedef cudaArray* cudaArray_t + + cdef struct cudaArray: + pass + ctypedef cudaArray* cudaArray_const_t + + cdef struct cudaMipmappedArray: + pass + ctypedef cudaMipmappedArray* cudaMipmappedArray_t + + cdef struct cudaMipmappedArray: + pass + ctypedef cudaMipmappedArray* cudaMipmappedArray_const_t + + cdef struct anon_struct0: + unsigned int width + unsigned int height + unsigned int depth + + cdef struct cudaArraySparseProperties: + anon_struct0 tileExtent + unsigned int miptailFirstLevel + unsigned long long miptailSize + unsigned int flags + unsigned int reserved[4] + + cdef struct cudaArrayMemoryRequirements: + size_t size + size_t alignment + unsigned int reserved[4] + + cdef struct cudaPitchedPtr: + void* ptr + size_t pitch + size_t xsize + size_t ysize + + cdef struct cudaExtent: + size_t width + size_t height + size_t depth + + cdef struct cudaPos: + size_t x + size_t y + size_t z + + cdef struct cudaMemcpy3DParms: + cudaArray_t srcArray + cudaPos srcPos + cudaPitchedPtr srcPtr + cudaArray_t dstArray + cudaPos dstPos + cudaPitchedPtr dstPtr + cudaExtent extent + cudaMemcpyKind kind + + cdef struct cudaMemcpyNodeParams: + int flags + int reserved[3] + cudaMemcpy3DParms copyParams + + cdef struct cudaMemcpy3DPeerParms: + cudaArray_t srcArray + cudaPos srcPos + cudaPitchedPtr srcPtr + int srcDevice + cudaArray_t dstArray + cudaPos dstPos + cudaPitchedPtr dstPtr + int dstDevice + cudaExtent extent + + cdef struct cudaMemsetParams: + void* dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + + cdef struct cudaMemsetParamsV2: + void* dst + size_t pitch + unsigned int value + unsigned int elementSize + size_t width + size_t height + + cdef struct cudaAccessPolicyWindow: + void* base_ptr + size_t num_bytes + float hitRatio + cudaAccessProperty hitProp + cudaAccessProperty missProp + + ctypedef void (*cudaHostFn_t)(void* userData) + + cdef struct cudaHostNodeParams: + cudaHostFn_t fn + void* userData + + cdef struct cudaHostNodeParamsV2: + cudaHostFn_t fn + void* userData + + cdef struct anon_struct1: + cudaArray_t array + + cdef struct anon_struct2: + cudaMipmappedArray_t mipmap + + cdef struct anon_struct3: + void* devPtr + cudaChannelFormatDesc desc + size_t sizeInBytes + + cdef struct anon_struct4: + void* devPtr + cudaChannelFormatDesc desc + size_t width + size_t height + size_t pitchInBytes + + cdef union anon_union0: + anon_struct1 array + anon_struct2 mipmap + anon_struct3 linear + anon_struct4 pitch2D + + cdef struct cudaResourceDesc: + cudaResourceType resType + anon_union0 res + + cdef struct cudaResourceViewDesc: + cudaResourceViewFormat format + size_t width + size_t height + size_t depth + unsigned int firstMipmapLevel + unsigned int lastMipmapLevel + unsigned int firstLayer + unsigned int lastLayer + + cdef struct cudaPointerAttributes: + cudaMemoryType type + int device + void* devicePointer + void* hostPointer + + cdef struct cudaFuncAttributes: + size_t sharedSizeBytes + size_t constSizeBytes + size_t localSizeBytes + int maxThreadsPerBlock + int numRegs + int ptxVersion + int binaryVersion + int cacheModeCA + int maxDynamicSharedSizeBytes + int preferredShmemCarveout + int clusterDimMustBeSet + int requiredClusterWidth + int requiredClusterHeight + int requiredClusterDepth + int clusterSchedulingPolicyPreference + int nonPortableClusterSizeAllowed + int reserved[16] + + cdef struct cudaMemLocation: + cudaMemLocationType type + int id + + cdef struct cudaMemAccessDesc: + cudaMemLocation location + cudaMemAccessFlags flags + + cdef struct cudaMemPoolProps: + cudaMemAllocationType allocType + cudaMemAllocationHandleType handleTypes + cudaMemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char reserved[54] + + cdef struct cudaMemPoolPtrExportData: + unsigned char reserved[64] + + cdef struct cudaMemAllocNodeParams: + cudaMemPoolProps poolProps + const cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr + + cdef struct cudaMemAllocNodeParamsV2: + cudaMemPoolProps poolProps + const cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr + + cdef struct cudaMemFreeNodeParams: + void* dptr + + cdef struct cudaMemcpyAttributes: + cudaMemcpySrcAccessOrder srcAccessOrder + cudaMemLocation srcLocHint + cudaMemLocation dstLocHint + unsigned int flags + + cdef struct cudaOffset3D: + size_t x + size_t y + size_t z + + cdef struct anon_struct5: + void* ptr + size_t rowLength + size_t layerHeight + cudaMemLocation locHint + + cdef struct anon_struct6: + cudaArray_t array + cudaOffset3D offset + + cdef union anon_union1: + anon_struct5 ptr + anon_struct6 array + + cdef struct cudaMemcpy3DOperand: + cudaMemcpy3DOperandType type + anon_union1 op + + cdef struct cudaMemcpy3DBatchOp: + cudaMemcpy3DOperand src + cudaMemcpy3DOperand dst + cudaExtent extent + cudaMemcpySrcAccessOrder srcAccessOrder + unsigned int flags + + cdef struct CUuuid_st: + char bytes[16] + + ctypedef CUuuid_st CUuuid + + ctypedef CUuuid_st cudaUUID_t + + cdef struct cudaDeviceProp: + char name[256] + cudaUUID_t uuid + char luid[8] + unsigned int luidDeviceNodeMask + size_t totalGlobalMem + size_t sharedMemPerBlock + int regsPerBlock + int warpSize + size_t memPitch + int maxThreadsPerBlock + int maxThreadsDim[3] + int maxGridSize[3] + int clockRate + size_t totalConstMem + int major + int minor + size_t textureAlignment + size_t texturePitchAlignment + int deviceOverlap + int multiProcessorCount + int kernelExecTimeoutEnabled + int integrated + int canMapHostMemory + int computeMode + int maxTexture1D + int maxTexture1DMipmap + int maxTexture1DLinear + int maxTexture2D[2] + int maxTexture2DMipmap[2] + int maxTexture2DLinear[3] + int maxTexture2DGather[2] + int maxTexture3D[3] + int maxTexture3DAlt[3] + int maxTextureCubemap + int maxTexture1DLayered[2] + int maxTexture2DLayered[3] + int maxTextureCubemapLayered[2] + int maxSurface1D + int maxSurface2D[2] + int maxSurface3D[3] + int maxSurface1DLayered[2] + int maxSurface2DLayered[3] + int maxSurfaceCubemap + int maxSurfaceCubemapLayered[2] + size_t surfaceAlignment + int concurrentKernels + int ECCEnabled + int pciBusID + int pciDeviceID + int pciDomainID + int tccDriver + int asyncEngineCount + int unifiedAddressing + int memoryClockRate + int memoryBusWidth + int l2CacheSize + int persistingL2CacheMaxSize + int maxThreadsPerMultiProcessor + int streamPrioritiesSupported + int globalL1CacheSupported + int localL1CacheSupported + size_t sharedMemPerMultiprocessor + int regsPerMultiprocessor + int managedMemory + int isMultiGpuBoard + int multiGpuBoardGroupID + int hostNativeAtomicSupported + int singleToDoublePrecisionPerfRatio + int pageableMemoryAccess + int concurrentManagedAccess + int computePreemptionSupported + int canUseHostPointerForRegisteredMem + int cooperativeLaunch + int cooperativeMultiDeviceLaunch + size_t sharedMemPerBlockOptin + int pageableMemoryAccessUsesHostPageTables + int directManagedMemAccessFromHost + int maxBlocksPerMultiProcessor + int accessPolicyMaxWindowSize + size_t reservedSharedMemPerBlock + int hostRegisterSupported + int sparseCudaArraySupported + int hostRegisterReadOnlySupported + int timelineSemaphoreInteropSupported + int memoryPoolsSupported + int gpuDirectRDMASupported + unsigned int gpuDirectRDMAFlushWritesOptions + int gpuDirectRDMAWritesOrdering + unsigned int memoryPoolSupportedHandleTypes + int deferredMappingCudaArraySupported + int ipcEventSupported + int clusterLaunch + int unifiedFunctionPointers + int reserved[63] + + cdef struct cudaIpcEventHandle_st: + char reserved[64] + + ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t + + cdef struct cudaIpcMemHandle_st: + char reserved[64] + + ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t + + cdef struct cudaMemFabricHandle_st: + char reserved[64] + + ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t + + cdef struct anon_struct7: + void* handle + const void* name + + cdef union anon_union2: + int fd + anon_struct7 win32 + const void* nvSciBufObject + + cdef struct cudaExternalMemoryHandleDesc: + cudaExternalMemoryHandleType type + anon_union2 handle + unsigned long long size + unsigned int flags + + cdef struct cudaExternalMemoryBufferDesc: + unsigned long long offset + unsigned long long size + unsigned int flags + + cdef struct cudaExternalMemoryMipmappedArrayDesc: + unsigned long long offset + cudaChannelFormatDesc formatDesc + cudaExtent extent + unsigned int flags + unsigned int numLevels + + cdef struct anon_struct8: + void* handle + const void* name + + cdef union anon_union3: + int fd + anon_struct8 win32 + const void* nvSciSyncObj + + cdef struct cudaExternalSemaphoreHandleDesc: + cudaExternalSemaphoreHandleType type + anon_union3 handle + unsigned int flags + + cdef struct anon_struct15: + unsigned long long value + + cdef union anon_union6: + void* fence + unsigned long long reserved + + cdef struct anon_struct16: + unsigned long long key + + cdef struct anon_struct17: + anon_struct15 fence + anon_union6 nvSciSync + anon_struct16 keyedMutex + unsigned int reserved[12] + + cdef struct cudaExternalSemaphoreSignalParams: + anon_struct17 params + unsigned int flags + unsigned int reserved[16] + + cdef struct anon_struct18: + unsigned long long value + + cdef union anon_union7: + void* fence + unsigned long long reserved + + cdef struct anon_struct19: + unsigned long long key + unsigned int timeoutMs + + cdef struct anon_struct20: + anon_struct18 fence + anon_union7 nvSciSync + anon_struct19 keyedMutex + unsigned int reserved[10] + + cdef struct cudaExternalSemaphoreWaitParams: + anon_struct20 params + unsigned int flags + unsigned int reserved[16] + + cdef struct CUstream_st: + pass + ctypedef CUstream_st* cudaStream_t + + cdef struct CUevent_st: + pass + ctypedef CUevent_st* cudaEvent_t + + cdef struct cudaGraphicsResource: + pass + ctypedef cudaGraphicsResource* cudaGraphicsResource_t + + cdef struct CUexternalMemory_st: + pass + ctypedef CUexternalMemory_st* cudaExternalMemory_t + + cdef struct CUexternalSemaphore_st: + pass + ctypedef CUexternalSemaphore_st* cudaExternalSemaphore_t + + cdef struct CUgraph_st: + pass + ctypedef CUgraph_st* cudaGraph_t + + cdef struct CUgraphNode_st: + pass + ctypedef CUgraphNode_st* cudaGraphNode_t + + cdef struct CUuserObject_st: + pass + ctypedef CUuserObject_st* cudaUserObject_t + + ctypedef unsigned long long cudaGraphConditionalHandle + + cdef struct CUfunc_st: + pass + ctypedef CUfunc_st* cudaFunction_t + + cdef struct CUkern_st: + pass + ctypedef CUkern_st* cudaKernel_t + + cdef struct cudalibraryHostUniversalFunctionAndDataTable: + void* functionTable + size_t functionWindowSize + void* dataTable + size_t dataWindowSize + + cdef struct CUlib_st: + pass + ctypedef CUlib_st* cudaLibrary_t + + cdef struct CUmemPoolHandle_st: + pass + ctypedef CUmemPoolHandle_st* cudaMemPool_t + + cdef struct cudaKernelNodeParams: + void* func + dim3 gridDim + dim3 blockDim + unsigned int sharedMemBytes + void** kernelParams + void** extra + + cdef struct cudaKernelNodeParamsV2: + void* func + dim3 gridDim + dim3 blockDim + unsigned int sharedMemBytes + void** kernelParams + void** extra + + cdef struct cudaExternalSemaphoreSignalNodeParams: + cudaExternalSemaphore_t* extSemArray + const cudaExternalSemaphoreSignalParams* paramsArray + unsigned int numExtSems + + cdef struct cudaExternalSemaphoreSignalNodeParamsV2: + cudaExternalSemaphore_t* extSemArray + const cudaExternalSemaphoreSignalParams* paramsArray + unsigned int numExtSems + + cdef struct cudaExternalSemaphoreWaitNodeParams: + cudaExternalSemaphore_t* extSemArray + const cudaExternalSemaphoreWaitParams* paramsArray + unsigned int numExtSems + + cdef struct cudaExternalSemaphoreWaitNodeParamsV2: + cudaExternalSemaphore_t* extSemArray + const cudaExternalSemaphoreWaitParams* paramsArray + unsigned int numExtSems + + cdef struct cudaConditionalNodeParams: + cudaGraphConditionalHandle handle + cudaGraphConditionalNodeType type + unsigned int size + cudaGraph_t* phGraph_out + + cdef struct cudaChildGraphNodeParams: + cudaGraph_t graph + cudaGraphChildGraphNodeOwnership ownership + + cdef struct cudaEventRecordNodeParams: + cudaEvent_t event + + cdef struct cudaEventWaitNodeParams: + cudaEvent_t event + + cdef struct cudaGraphNodeParams: + cudaGraphNodeType type + int reserved0[3] + long long reserved1[29] + cudaKernelNodeParamsV2 kernel + cudaMemcpyNodeParams memcpy + cudaMemsetParamsV2 memset + cudaHostNodeParamsV2 host + cudaChildGraphNodeParams graph + cudaEventWaitNodeParams eventWait + cudaEventRecordNodeParams eventRecord + cudaExternalSemaphoreSignalNodeParamsV2 extSemSignal + cudaExternalSemaphoreWaitNodeParamsV2 extSemWait + cudaMemAllocNodeParamsV2 alloc + cudaMemFreeNodeParams free + cudaConditionalNodeParams conditional + long long reserved2 + + cdef enum cudaGraphDependencyType_enum: + cudaGraphDependencyTypeDefault = 0 + cudaGraphDependencyTypeProgrammatic = 1 + + ctypedef cudaGraphDependencyType_enum cudaGraphDependencyType + + cdef struct cudaGraphEdgeData_st: + unsigned char from_port + unsigned char to_port + unsigned char type + unsigned char reserved[5] + + ctypedef cudaGraphEdgeData_st cudaGraphEdgeData + + cdef struct CUgraphExec_st: + pass + ctypedef CUgraphExec_st* cudaGraphExec_t + + cdef enum cudaGraphInstantiateResult: + cudaGraphInstantiateSuccess = 0 + cudaGraphInstantiateError = 1 + cudaGraphInstantiateInvalidStructure = 2 + cudaGraphInstantiateNodeOperationNotSupported = 3 + cudaGraphInstantiateMultipleDevicesNotSupported = 4 + cudaGraphInstantiateConditionalHandleUnused = 5 + + cdef struct cudaGraphInstantiateParams_st: + unsigned long long flags + cudaStream_t uploadStream + cudaGraphNode_t errNode_out + cudaGraphInstantiateResult result_out + + ctypedef cudaGraphInstantiateParams_st cudaGraphInstantiateParams + + cdef struct cudaGraphExecUpdateResultInfo_st: + cudaGraphExecUpdateResult result + cudaGraphNode_t errorNode + cudaGraphNode_t errorFromNode + + ctypedef cudaGraphExecUpdateResultInfo_st cudaGraphExecUpdateResultInfo + + cdef struct CUgraphDeviceUpdatableNode_st: + pass + ctypedef CUgraphDeviceUpdatableNode_st* cudaGraphDeviceNode_t + + cdef struct anon_struct21: + const void* pValue + size_t offset + size_t size + + cdef union anon_union9: + dim3 gridDim + anon_struct21 param + unsigned int isEnabled + + cdef struct cudaGraphKernelNodeUpdate: + cudaGraphDeviceNode_t node + cudaGraphKernelNodeField field + anon_union9 updateData + + cdef enum cudaLaunchMemSyncDomain: + cudaLaunchMemSyncDomainDefault = 0 + cudaLaunchMemSyncDomainRemote = 1 + + cdef struct cudaLaunchMemSyncDomainMap_st: + unsigned char default_ + unsigned char remote + + ctypedef cudaLaunchMemSyncDomainMap_st cudaLaunchMemSyncDomainMap + + cdef enum cudaLaunchAttributeID: + cudaLaunchAttributeIgnore = 0 + cudaLaunchAttributeAccessPolicyWindow = 1 + cudaLaunchAttributeCooperative = 2 + cudaLaunchAttributeSynchronizationPolicy = 3 + cudaLaunchAttributeClusterDimension = 4 + cudaLaunchAttributeClusterSchedulingPolicyPreference = 5 + cudaLaunchAttributeProgrammaticStreamSerialization = 6 + cudaLaunchAttributeProgrammaticEvent = 7 + cudaLaunchAttributePriority = 8 + cudaLaunchAttributeMemSyncDomainMap = 9 + cudaLaunchAttributeMemSyncDomain = 10 + cudaLaunchAttributePreferredClusterDimension = 11 + cudaLaunchAttributeLaunchCompletionEvent = 12 + cudaLaunchAttributeDeviceUpdatableKernelNode = 13 + cudaLaunchAttributePreferredSharedMemoryCarveout = 14 + + cdef struct anon_struct22: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct23: + cudaEvent_t event + int flags + int triggerAtBlockStart + + cdef struct anon_struct24: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct25: + cudaEvent_t event + int flags + + cdef struct anon_struct26: + int deviceUpdatable + cudaGraphDeviceNode_t devNode + + cdef union cudaLaunchAttributeValue: + char pad[64] + cudaAccessPolicyWindow accessPolicyWindow + int cooperative + cudaSynchronizationPolicy syncPolicy + anon_struct22 clusterDim + cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference + int programmaticStreamSerializationAllowed + anon_struct23 programmaticEvent + int priority + cudaLaunchMemSyncDomainMap memSyncDomainMap + cudaLaunchMemSyncDomain memSyncDomain + anon_struct24 preferredClusterDim + anon_struct25 launchCompletionEvent + anon_struct26 deviceUpdatableKernelNode + unsigned int sharedMemCarveout + + cdef struct cudaLaunchAttribute_st: + cudaLaunchAttributeID id + cudaLaunchAttributeValue val + + ctypedef cudaLaunchAttribute_st cudaLaunchAttribute + + cdef struct cudaAsyncCallbackEntry: + pass + ctypedef cudaAsyncCallbackEntry* cudaAsyncCallbackHandle_t + + cdef enum cudaAsyncNotificationType_enum: + cudaAsyncNotificationTypeOverBudget = 1 + + ctypedef cudaAsyncNotificationType_enum cudaAsyncNotificationType + + cdef struct anon_struct27: + unsigned long long bytesOverBudget + + cdef union anon_union10: + anon_struct27 overBudget + + cdef struct cudaAsyncNotificationInfo: + cudaAsyncNotificationType type + anon_union10 info + + ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t + + ctypedef void (*cudaAsyncCallback)(cudaAsyncNotificationInfo_t* , void* , cudaAsyncCallbackHandle_t ) + + cdef enum cudaChannelFormatKind: + cudaChannelFormatKindSigned = 0 + cudaChannelFormatKindUnsigned = 1 + cudaChannelFormatKindFloat = 2 + cudaChannelFormatKindNone = 3 + cudaChannelFormatKindNV12 = 4 + cudaChannelFormatKindUnsignedNormalized8X1 = 5 + cudaChannelFormatKindUnsignedNormalized8X2 = 6 + cudaChannelFormatKindUnsignedNormalized8X4 = 7 + cudaChannelFormatKindUnsignedNormalized16X1 = 8 + cudaChannelFormatKindUnsignedNormalized16X2 = 9 + cudaChannelFormatKindUnsignedNormalized16X4 = 10 + cudaChannelFormatKindSignedNormalized8X1 = 11 + cudaChannelFormatKindSignedNormalized8X2 = 12 + cudaChannelFormatKindSignedNormalized8X4 = 13 + cudaChannelFormatKindSignedNormalized16X1 = 14 + cudaChannelFormatKindSignedNormalized16X2 = 15 + cudaChannelFormatKindSignedNormalized16X4 = 16 + cudaChannelFormatKindUnsignedBlockCompressed1 = 17 + cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18 + cudaChannelFormatKindUnsignedBlockCompressed2 = 19 + cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20 + cudaChannelFormatKindUnsignedBlockCompressed3 = 21 + cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22 + cudaChannelFormatKindUnsignedBlockCompressed4 = 23 + cudaChannelFormatKindSignedBlockCompressed4 = 24 + cudaChannelFormatKindUnsignedBlockCompressed5 = 25 + cudaChannelFormatKindSignedBlockCompressed5 = 26 + cudaChannelFormatKindUnsignedBlockCompressed6H = 27 + cudaChannelFormatKindSignedBlockCompressed6H = 28 + cudaChannelFormatKindUnsignedBlockCompressed7 = 29 + cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30 + cudaChannelFormatKindUnsignedNormalized1010102 = 31 + + cdef enum cudaMemoryType: + cudaMemoryTypeUnregistered = 0 + cudaMemoryTypeHost = 1 + cudaMemoryTypeDevice = 2 + cudaMemoryTypeManaged = 3 + + cdef enum cudaMemcpyKind: + cudaMemcpyHostToHost = 0 + cudaMemcpyHostToDevice = 1 + cudaMemcpyDeviceToHost = 2 + cudaMemcpyDeviceToDevice = 3 + cudaMemcpyDefault = 4 + + cdef enum cudaAccessProperty: + cudaAccessPropertyNormal = 0 + cudaAccessPropertyStreaming = 1 + cudaAccessPropertyPersisting = 2 + + cdef enum cudaStreamCaptureStatus: + cudaStreamCaptureStatusNone = 0 + cudaStreamCaptureStatusActive = 1 + cudaStreamCaptureStatusInvalidated = 2 + + cdef enum cudaStreamCaptureMode: + cudaStreamCaptureModeGlobal = 0 + cudaStreamCaptureModeThreadLocal = 1 + cudaStreamCaptureModeRelaxed = 2 + + cdef enum cudaSynchronizationPolicy: + cudaSyncPolicyAuto = 1 + cudaSyncPolicySpin = 2 + cudaSyncPolicyYield = 3 + cudaSyncPolicyBlockingSync = 4 + + cdef enum cudaClusterSchedulingPolicy: + cudaClusterSchedulingPolicyDefault = 0 + cudaClusterSchedulingPolicySpread = 1 + cudaClusterSchedulingPolicyLoadBalancing = 2 + + cdef enum cudaStreamUpdateCaptureDependenciesFlags: + cudaStreamAddCaptureDependencies = 0 + cudaStreamSetCaptureDependencies = 1 + + cdef enum cudaUserObjectFlags: + cudaUserObjectNoDestructorSync = 1 + + cdef enum cudaUserObjectRetainFlags: + cudaGraphUserObjectMove = 1 + + cdef enum cudaGraphicsRegisterFlags: + cudaGraphicsRegisterFlagsNone = 0 + cudaGraphicsRegisterFlagsReadOnly = 1 + cudaGraphicsRegisterFlagsWriteDiscard = 2 + cudaGraphicsRegisterFlagsSurfaceLoadStore = 4 + cudaGraphicsRegisterFlagsTextureGather = 8 + + cdef enum cudaGraphicsMapFlags: + cudaGraphicsMapFlagsNone = 0 + cudaGraphicsMapFlagsReadOnly = 1 + cudaGraphicsMapFlagsWriteDiscard = 2 + + cdef enum cudaGraphicsCubeFace: + cudaGraphicsCubeFacePositiveX = 0 + cudaGraphicsCubeFaceNegativeX = 1 + cudaGraphicsCubeFacePositiveY = 2 + cudaGraphicsCubeFaceNegativeY = 3 + cudaGraphicsCubeFacePositiveZ = 4 + cudaGraphicsCubeFaceNegativeZ = 5 + + cdef enum cudaResourceType: + cudaResourceTypeArray = 0 + cudaResourceTypeMipmappedArray = 1 + cudaResourceTypeLinear = 2 + cudaResourceTypePitch2D = 3 + + cdef enum cudaResourceViewFormat: + cudaResViewFormatNone = 0 + cudaResViewFormatUnsignedChar1 = 1 + cudaResViewFormatUnsignedChar2 = 2 + cudaResViewFormatUnsignedChar4 = 3 + cudaResViewFormatSignedChar1 = 4 + cudaResViewFormatSignedChar2 = 5 + cudaResViewFormatSignedChar4 = 6 + cudaResViewFormatUnsignedShort1 = 7 + cudaResViewFormatUnsignedShort2 = 8 + cudaResViewFormatUnsignedShort4 = 9 + cudaResViewFormatSignedShort1 = 10 + cudaResViewFormatSignedShort2 = 11 + cudaResViewFormatSignedShort4 = 12 + cudaResViewFormatUnsignedInt1 = 13 + cudaResViewFormatUnsignedInt2 = 14 + cudaResViewFormatUnsignedInt4 = 15 + cudaResViewFormatSignedInt1 = 16 + cudaResViewFormatSignedInt2 = 17 + cudaResViewFormatSignedInt4 = 18 + cudaResViewFormatHalf1 = 19 + cudaResViewFormatHalf2 = 20 + cudaResViewFormatHalf4 = 21 + cudaResViewFormatFloat1 = 22 + cudaResViewFormatFloat2 = 23 + cudaResViewFormatFloat4 = 24 + cudaResViewFormatUnsignedBlockCompressed1 = 25 + cudaResViewFormatUnsignedBlockCompressed2 = 26 + cudaResViewFormatUnsignedBlockCompressed3 = 27 + cudaResViewFormatUnsignedBlockCompressed4 = 28 + cudaResViewFormatSignedBlockCompressed4 = 29 + cudaResViewFormatUnsignedBlockCompressed5 = 30 + cudaResViewFormatSignedBlockCompressed5 = 31 + cudaResViewFormatUnsignedBlockCompressed6H = 32 + cudaResViewFormatSignedBlockCompressed6H = 33 + cudaResViewFormatUnsignedBlockCompressed7 = 34 + + cdef enum cudaFuncAttribute: + cudaFuncAttributeMaxDynamicSharedMemorySize = 8 + cudaFuncAttributePreferredSharedMemoryCarveout = 9 + cudaFuncAttributeClusterDimMustBeSet = 10 + cudaFuncAttributeRequiredClusterWidth = 11 + cudaFuncAttributeRequiredClusterHeight = 12 + cudaFuncAttributeRequiredClusterDepth = 13 + cudaFuncAttributeNonPortableClusterSizeAllowed = 14 + cudaFuncAttributeClusterSchedulingPolicyPreference = 15 + cudaFuncAttributeMax = 16 + + cdef enum cudaFuncCache: + cudaFuncCachePreferNone = 0 + cudaFuncCachePreferShared = 1 + cudaFuncCachePreferL1 = 2 + cudaFuncCachePreferEqual = 3 + + cdef enum cudaSharedMemConfig: + cudaSharedMemBankSizeDefault = 0 + cudaSharedMemBankSizeFourByte = 1 + cudaSharedMemBankSizeEightByte = 2 + + cdef enum cudaSharedCarveout: + cudaSharedmemCarveoutDefault = -1 + cudaSharedmemCarveoutMaxL1 = 0 + cudaSharedmemCarveoutMaxShared = 100 + + cdef enum cudaComputeMode: + cudaComputeModeDefault = 0 + cudaComputeModeExclusive = 1 + cudaComputeModeProhibited = 2 + cudaComputeModeExclusiveProcess = 3 + + cdef enum cudaLimit: + cudaLimitStackSize = 0 + cudaLimitPrintfFifoSize = 1 + cudaLimitMallocHeapSize = 2 + cudaLimitDevRuntimeSyncDepth = 3 + cudaLimitDevRuntimePendingLaunchCount = 4 + cudaLimitMaxL2FetchGranularity = 5 + cudaLimitPersistingL2CacheSize = 6 + + cdef enum cudaMemoryAdvise: + cudaMemAdviseSetReadMostly = 1 + cudaMemAdviseUnsetReadMostly = 2 + cudaMemAdviseSetPreferredLocation = 3 + cudaMemAdviseUnsetPreferredLocation = 4 + cudaMemAdviseSetAccessedBy = 5 + cudaMemAdviseUnsetAccessedBy = 6 + + cdef enum cudaMemRangeAttribute: + cudaMemRangeAttributeReadMostly = 1 + cudaMemRangeAttributePreferredLocation = 2 + cudaMemRangeAttributeAccessedBy = 3 + cudaMemRangeAttributeLastPrefetchLocation = 4 + cudaMemRangeAttributePreferredLocationType = 5 + cudaMemRangeAttributePreferredLocationId = 6 + cudaMemRangeAttributeLastPrefetchLocationType = 7 + cudaMemRangeAttributeLastPrefetchLocationId = 8 + + cdef enum cudaFlushGPUDirectRDMAWritesOptions: + cudaFlushGPUDirectRDMAWritesOptionHost = 1 + cudaFlushGPUDirectRDMAWritesOptionMemOps = 2 + + cdef enum cudaGPUDirectRDMAWritesOrdering: + cudaGPUDirectRDMAWritesOrderingNone = 0 + cudaGPUDirectRDMAWritesOrderingOwner = 100 + cudaGPUDirectRDMAWritesOrderingAllDevices = 200 + + cdef enum cudaFlushGPUDirectRDMAWritesScope: + cudaFlushGPUDirectRDMAWritesToOwner = 100 + cudaFlushGPUDirectRDMAWritesToAllDevices = 200 + + cdef enum cudaFlushGPUDirectRDMAWritesTarget: + cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0 + + cdef enum cudaDeviceAttr: + cudaDevAttrMaxThreadsPerBlock = 1 + cudaDevAttrMaxBlockDimX = 2 + cudaDevAttrMaxBlockDimY = 3 + cudaDevAttrMaxBlockDimZ = 4 + cudaDevAttrMaxGridDimX = 5 + cudaDevAttrMaxGridDimY = 6 + cudaDevAttrMaxGridDimZ = 7 + cudaDevAttrMaxSharedMemoryPerBlock = 8 + cudaDevAttrTotalConstantMemory = 9 + cudaDevAttrWarpSize = 10 + cudaDevAttrMaxPitch = 11 + cudaDevAttrMaxRegistersPerBlock = 12 + cudaDevAttrClockRate = 13 + cudaDevAttrTextureAlignment = 14 + cudaDevAttrGpuOverlap = 15 + cudaDevAttrMultiProcessorCount = 16 + cudaDevAttrKernelExecTimeout = 17 + cudaDevAttrIntegrated = 18 + cudaDevAttrCanMapHostMemory = 19 + cudaDevAttrComputeMode = 20 + cudaDevAttrMaxTexture1DWidth = 21 + cudaDevAttrMaxTexture2DWidth = 22 + cudaDevAttrMaxTexture2DHeight = 23 + cudaDevAttrMaxTexture3DWidth = 24 + cudaDevAttrMaxTexture3DHeight = 25 + cudaDevAttrMaxTexture3DDepth = 26 + cudaDevAttrMaxTexture2DLayeredWidth = 27 + cudaDevAttrMaxTexture2DLayeredHeight = 28 + cudaDevAttrMaxTexture2DLayeredLayers = 29 + cudaDevAttrSurfaceAlignment = 30 + cudaDevAttrConcurrentKernels = 31 + cudaDevAttrEccEnabled = 32 + cudaDevAttrPciBusId = 33 + cudaDevAttrPciDeviceId = 34 + cudaDevAttrTccDriver = 35 + cudaDevAttrMemoryClockRate = 36 + cudaDevAttrGlobalMemoryBusWidth = 37 + cudaDevAttrL2CacheSize = 38 + cudaDevAttrMaxThreadsPerMultiProcessor = 39 + cudaDevAttrAsyncEngineCount = 40 + cudaDevAttrUnifiedAddressing = 41 + cudaDevAttrMaxTexture1DLayeredWidth = 42 + cudaDevAttrMaxTexture1DLayeredLayers = 43 + cudaDevAttrMaxTexture2DGatherWidth = 45 + cudaDevAttrMaxTexture2DGatherHeight = 46 + cudaDevAttrMaxTexture3DWidthAlt = 47 + cudaDevAttrMaxTexture3DHeightAlt = 48 + cudaDevAttrMaxTexture3DDepthAlt = 49 + cudaDevAttrPciDomainId = 50 + cudaDevAttrTexturePitchAlignment = 51 + cudaDevAttrMaxTextureCubemapWidth = 52 + cudaDevAttrMaxTextureCubemapLayeredWidth = 53 + cudaDevAttrMaxTextureCubemapLayeredLayers = 54 + cudaDevAttrMaxSurface1DWidth = 55 + cudaDevAttrMaxSurface2DWidth = 56 + cudaDevAttrMaxSurface2DHeight = 57 + cudaDevAttrMaxSurface3DWidth = 58 + cudaDevAttrMaxSurface3DHeight = 59 + cudaDevAttrMaxSurface3DDepth = 60 + cudaDevAttrMaxSurface1DLayeredWidth = 61 + cudaDevAttrMaxSurface1DLayeredLayers = 62 + cudaDevAttrMaxSurface2DLayeredWidth = 63 + cudaDevAttrMaxSurface2DLayeredHeight = 64 + cudaDevAttrMaxSurface2DLayeredLayers = 65 + cudaDevAttrMaxSurfaceCubemapWidth = 66 + cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67 + cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68 + cudaDevAttrMaxTexture1DLinearWidth = 69 + cudaDevAttrMaxTexture2DLinearWidth = 70 + cudaDevAttrMaxTexture2DLinearHeight = 71 + cudaDevAttrMaxTexture2DLinearPitch = 72 + cudaDevAttrMaxTexture2DMipmappedWidth = 73 + cudaDevAttrMaxTexture2DMipmappedHeight = 74 + cudaDevAttrComputeCapabilityMajor = 75 + cudaDevAttrComputeCapabilityMinor = 76 + cudaDevAttrMaxTexture1DMipmappedWidth = 77 + cudaDevAttrStreamPrioritiesSupported = 78 + cudaDevAttrGlobalL1CacheSupported = 79 + cudaDevAttrLocalL1CacheSupported = 80 + cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81 + cudaDevAttrMaxRegistersPerMultiprocessor = 82 + cudaDevAttrManagedMemory = 83 + cudaDevAttrIsMultiGpuBoard = 84 + cudaDevAttrMultiGpuBoardGroupID = 85 + cudaDevAttrHostNativeAtomicSupported = 86 + cudaDevAttrSingleToDoublePrecisionPerfRatio = 87 + cudaDevAttrPageableMemoryAccess = 88 + cudaDevAttrConcurrentManagedAccess = 89 + cudaDevAttrComputePreemptionSupported = 90 + cudaDevAttrCanUseHostPointerForRegisteredMem = 91 + cudaDevAttrReserved92 = 92 + cudaDevAttrReserved93 = 93 + cudaDevAttrReserved94 = 94 + cudaDevAttrCooperativeLaunch = 95 + cudaDevAttrCooperativeMultiDeviceLaunch = 96 + cudaDevAttrMaxSharedMemoryPerBlockOptin = 97 + cudaDevAttrCanFlushRemoteWrites = 98 + cudaDevAttrHostRegisterSupported = 99 + cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100 + cudaDevAttrDirectManagedMemAccessFromHost = 101 + cudaDevAttrMaxBlocksPerMultiprocessor = 106 + cudaDevAttrMaxPersistingL2CacheSize = 108 + cudaDevAttrMaxAccessPolicyWindowSize = 109 + cudaDevAttrReservedSharedMemoryPerBlock = 111 + cudaDevAttrSparseCudaArraySupported = 112 + cudaDevAttrHostRegisterReadOnlySupported = 113 + cudaDevAttrTimelineSemaphoreInteropSupported = 114 + cudaDevAttrMaxTimelineSemaphoreInteropSupported = 114 + cudaDevAttrMemoryPoolsSupported = 115 + cudaDevAttrGPUDirectRDMASupported = 116 + cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117 + cudaDevAttrGPUDirectRDMAWritesOrdering = 118 + cudaDevAttrMemoryPoolSupportedHandleTypes = 119 + cudaDevAttrClusterLaunch = 120 + cudaDevAttrDeferredMappingCudaArraySupported = 121 + cudaDevAttrReserved122 = 122 + cudaDevAttrReserved123 = 123 + cudaDevAttrReserved124 = 124 + cudaDevAttrIpcEventSupport = 125 + cudaDevAttrMemSyncDomainCount = 126 + cudaDevAttrReserved127 = 127 + cudaDevAttrReserved128 = 128 + cudaDevAttrReserved129 = 129 + cudaDevAttrNumaConfig = 130 + cudaDevAttrNumaId = 131 + cudaDevAttrReserved132 = 132 + cudaDevAttrMpsEnabled = 133 + cudaDevAttrHostNumaId = 134 + cudaDevAttrD3D12CigSupported = 135 + cudaDevAttrVulkanCigSupported = 138 + cudaDevAttrGpuPciDeviceId = 139 + cudaDevAttrGpuPciSubsystemId = 140 + cudaDevAttrReserved141 = 141 + cudaDevAttrHostNumaMemoryPoolsSupported = 142 + cudaDevAttrHostNumaMultinodeIpcSupported = 143 + cudaDevAttrMax = 144 + + cdef enum cudaMemPoolAttr: + cudaMemPoolReuseFollowEventDependencies = 1 + cudaMemPoolReuseAllowOpportunistic = 2 + cudaMemPoolReuseAllowInternalDependencies = 3 + cudaMemPoolAttrReleaseThreshold = 4 + cudaMemPoolAttrReservedMemCurrent = 5 + cudaMemPoolAttrReservedMemHigh = 6 + cudaMemPoolAttrUsedMemCurrent = 7 + cudaMemPoolAttrUsedMemHigh = 8 + + cdef enum cudaMemLocationType: + cudaMemLocationTypeInvalid = 0 + cudaMemLocationTypeDevice = 1 + cudaMemLocationTypeHost = 2 + cudaMemLocationTypeHostNuma = 3 + cudaMemLocationTypeHostNumaCurrent = 4 + + cdef enum cudaMemAccessFlags: + cudaMemAccessFlagsProtNone = 0 + cudaMemAccessFlagsProtRead = 1 + cudaMemAccessFlagsProtReadWrite = 3 + + cdef enum cudaMemAllocationType: + cudaMemAllocationTypeInvalid = 0 + cudaMemAllocationTypePinned = 1 + cudaMemAllocationTypeMax = 2147483647 + + cdef enum cudaMemAllocationHandleType: + cudaMemHandleTypeNone = 0 + cudaMemHandleTypePosixFileDescriptor = 1 + cudaMemHandleTypeWin32 = 2 + cudaMemHandleTypeWin32Kmt = 4 + cudaMemHandleTypeFabric = 8 + + cdef enum cudaGraphMemAttributeType: + cudaGraphMemAttrUsedMemCurrent = 0 + cudaGraphMemAttrUsedMemHigh = 1 + cudaGraphMemAttrReservedMemCurrent = 2 + cudaGraphMemAttrReservedMemHigh = 3 + + cdef enum cudaMemcpyFlags: + cudaMemcpyFlagDefault = 0 + cudaMemcpyFlagPreferOverlapWithCompute = 1 + + cdef enum cudaMemcpySrcAccessOrder: + cudaMemcpySrcAccessOrderInvalid = 0 + cudaMemcpySrcAccessOrderStream = 1 + cudaMemcpySrcAccessOrderDuringApiCall = 2 + cudaMemcpySrcAccessOrderAny = 3 + cudaMemcpySrcAccessOrderMax = 2147483647 + + cdef enum cudaMemcpy3DOperandType: + cudaMemcpyOperandTypePointer = 1 + cudaMemcpyOperandTypeArray = 2 + cudaMemcpyOperandTypeMax = 2147483647 + + cdef enum cudaDeviceP2PAttr: + cudaDevP2PAttrPerformanceRank = 1 + cudaDevP2PAttrAccessSupported = 2 + cudaDevP2PAttrNativeAtomicSupported = 3 + cudaDevP2PAttrCudaArrayAccessSupported = 4 + + cdef enum cudaExternalMemoryHandleType: + cudaExternalMemoryHandleTypeOpaqueFd = 1 + cudaExternalMemoryHandleTypeOpaqueWin32 = 2 + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3 + cudaExternalMemoryHandleTypeD3D12Heap = 4 + cudaExternalMemoryHandleTypeD3D12Resource = 5 + cudaExternalMemoryHandleTypeD3D11Resource = 6 + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7 + cudaExternalMemoryHandleTypeNvSciBuf = 8 + + cdef enum cudaExternalSemaphoreHandleType: + cudaExternalSemaphoreHandleTypeOpaqueFd = 1 + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2 + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3 + cudaExternalSemaphoreHandleTypeD3D12Fence = 4 + cudaExternalSemaphoreHandleTypeD3D11Fence = 5 + cudaExternalSemaphoreHandleTypeNvSciSync = 6 + cudaExternalSemaphoreHandleTypeKeyedMutex = 7 + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8 + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9 + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10 + + cdef enum cudaJitOption: + cudaJitMaxRegisters = 0 + cudaJitThreadsPerBlock = 1 + cudaJitWallTime = 2 + cudaJitInfoLogBuffer = 3 + cudaJitInfoLogBufferSizeBytes = 4 + cudaJitErrorLogBuffer = 5 + cudaJitErrorLogBufferSizeBytes = 6 + cudaJitOptimizationLevel = 7 + cudaJitFallbackStrategy = 10 + cudaJitGenerateDebugInfo = 11 + cudaJitLogVerbose = 12 + cudaJitGenerateLineInfo = 13 + cudaJitCacheMode = 14 + cudaJitPositionIndependentCode = 30 + cudaJitMinCtaPerSm = 31 + cudaJitMaxThreadsPerBlock = 32 + cudaJitOverrideDirectiveValues = 33 + + cdef enum cudaLibraryOption: + cudaLibraryHostUniversalFunctionAndDataTable = 0 + cudaLibraryBinaryIsPreserved = 1 + + cdef enum cudaJit_CacheMode: + cudaJitCacheOptionNone = 0 + cudaJitCacheOptionCG = 1 + cudaJitCacheOptionCA = 2 + + cdef enum cudaJit_Fallback: + cudaPreferPtx = 0 + cudaPreferBinary = 1 + + cdef enum cudaCGScope: + cudaCGScopeInvalid = 0 + cudaCGScopeGrid = 1 + cudaCGScopeMultiGrid = 2 + + cdef enum cudaGraphConditionalHandleFlags: + cudaGraphCondAssignDefault = 1 + + cdef enum cudaGraphConditionalNodeType: + cudaGraphCondTypeIf = 0 + cudaGraphCondTypeWhile = 1 + cudaGraphCondTypeSwitch = 2 + + cdef enum cudaGraphNodeType: + cudaGraphNodeTypeKernel = 0 + cudaGraphNodeTypeMemcpy = 1 + cudaGraphNodeTypeMemset = 2 + cudaGraphNodeTypeHost = 3 + cudaGraphNodeTypeGraph = 4 + cudaGraphNodeTypeEmpty = 5 + cudaGraphNodeTypeWaitEvent = 6 + cudaGraphNodeTypeEventRecord = 7 + cudaGraphNodeTypeExtSemaphoreSignal = 8 + cudaGraphNodeTypeExtSemaphoreWait = 9 + cudaGraphNodeTypeMemAlloc = 10 + cudaGraphNodeTypeMemFree = 11 + cudaGraphNodeTypeConditional = 13 + cudaGraphNodeTypeCount = 14 + + cdef enum cudaGraphChildGraphNodeOwnership: + cudaGraphChildGraphOwnershipClone = 0 + cudaGraphChildGraphOwnershipMove = 1 + + cdef enum cudaGraphExecUpdateResult: + cudaGraphExecUpdateSuccess = 0 + cudaGraphExecUpdateError = 1 + cudaGraphExecUpdateErrorTopologyChanged = 2 + cudaGraphExecUpdateErrorNodeTypeChanged = 3 + cudaGraphExecUpdateErrorFunctionChanged = 4 + cudaGraphExecUpdateErrorParametersChanged = 5 + cudaGraphExecUpdateErrorNotSupported = 6 + cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7 + cudaGraphExecUpdateErrorAttributesChanged = 8 + + cdef enum cudaGraphKernelNodeField: + cudaGraphKernelNodeFieldInvalid = 0 + cudaGraphKernelNodeFieldGridDim = 1 + cudaGraphKernelNodeFieldParam = 2 + cudaGraphKernelNodeFieldEnabled = 3 + + cdef enum cudaGetDriverEntryPointFlags: + cudaEnableDefault = 0 + cudaEnableLegacyStream = 1 + cudaEnablePerThreadDefaultStream = 2 + + cdef enum cudaDriverEntryPointQueryResult: + cudaDriverEntryPointSuccess = 0 + cudaDriverEntryPointSymbolNotFound = 1 + cudaDriverEntryPointVersionNotSufficent = 2 + + cdef enum cudaGraphDebugDotFlags: + cudaGraphDebugDotFlagsVerbose = 1 + cudaGraphDebugDotFlagsKernelNodeParams = 4 + cudaGraphDebugDotFlagsMemcpyNodeParams = 8 + cudaGraphDebugDotFlagsMemsetNodeParams = 16 + cudaGraphDebugDotFlagsHostNodeParams = 32 + cudaGraphDebugDotFlagsEventNodeParams = 64 + cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128 + cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256 + cudaGraphDebugDotFlagsKernelNodeAttributes = 512 + cudaGraphDebugDotFlagsHandles = 1024 + cudaGraphDebugDotFlagsConditionalNodeParams = 32768 + + cdef enum cudaGraphInstantiateFlags: + cudaGraphInstantiateFlagAutoFreeOnLaunch = 1 + cudaGraphInstantiateFlagUpload = 2 + cudaGraphInstantiateFlagDeviceLaunch = 4 + cudaGraphInstantiateFlagUseNodePriority = 8 + + cdef enum cudaDeviceNumaConfig: + cudaDeviceNumaConfigNone = 0 + cudaDeviceNumaConfigNumaNode = 1 + +cdef extern from "surface_types.h": + + ctypedef unsigned long long cudaSurfaceObject_t + + cdef enum cudaSurfaceBoundaryMode: + cudaBoundaryModeZero = 0 + cudaBoundaryModeClamp = 1 + cudaBoundaryModeTrap = 2 + + cdef enum cudaSurfaceFormatMode: + cudaFormatModeForced = 0 + cudaFormatModeAuto = 1 + +cdef extern from "texture_types.h": + + cdef struct cudaTextureDesc: + cudaTextureAddressMode addressMode[3] + cudaTextureFilterMode filterMode + cudaTextureReadMode readMode + int sRGB + float borderColor[4] + int normalizedCoords + unsigned int maxAnisotropy + cudaTextureFilterMode mipmapFilterMode + float mipmapLevelBias + float minMipmapLevelClamp + float maxMipmapLevelClamp + int disableTrilinearOptimization + int seamlessCubemap + + ctypedef unsigned long long cudaTextureObject_t + + cdef enum cudaTextureAddressMode: + cudaAddressModeWrap = 0 + cudaAddressModeClamp = 1 + cudaAddressModeMirror = 2 + cudaAddressModeBorder = 3 + + cdef enum cudaTextureFilterMode: + cudaFilterModePoint = 0 + cudaFilterModeLinear = 1 + + cdef enum cudaTextureReadMode: + cudaReadModeElementType = 0 + cudaReadModeNormalizedFloat = 1 + +cdef extern from "library_types.h": + + cdef enum cudaDataType_t: + CUDA_R_32F = 0 + CUDA_R_64F = 1 + CUDA_R_16F = 2 + CUDA_R_8I = 3 + CUDA_C_32F = 4 + CUDA_C_64F = 5 + CUDA_C_16F = 6 + CUDA_C_8I = 7 + CUDA_R_8U = 8 + CUDA_C_8U = 9 + CUDA_R_32I = 10 + CUDA_C_32I = 11 + CUDA_R_32U = 12 + CUDA_C_32U = 13 + CUDA_R_16BF = 14 + CUDA_C_16BF = 15 + CUDA_R_4I = 16 + CUDA_C_4I = 17 + CUDA_R_4U = 18 + CUDA_C_4U = 19 + CUDA_R_16I = 20 + CUDA_C_16I = 21 + CUDA_R_16U = 22 + CUDA_C_16U = 23 + CUDA_R_64I = 24 + CUDA_C_64I = 25 + CUDA_R_64U = 26 + CUDA_C_64U = 27 + CUDA_R_8F_E4M3 = 28 + CUDA_R_8F_UE4M3 = 28 + CUDA_R_8F_E5M2 = 29 + CUDA_R_8F_UE8M0 = 30 + CUDA_R_6F_E2M3 = 31 + CUDA_R_6F_E3M2 = 32 + CUDA_R_4F_E2M1 = 33 + + ctypedef cudaDataType_t cudaDataType + + cdef enum libraryPropertyType_t: + MAJOR_VERSION = 0 + MINOR_VERSION = 1 + PATCH_LEVEL = 2 + + ctypedef libraryPropertyType_t libraryPropertyType + +cdef extern from "cuda_runtime_api.h": + + ctypedef void (*cudaStreamCallback_t)(cudaStream_t stream, cudaError_t status, void* userData) + +cdef extern from "device_types.h": + + cdef enum cudaRoundMode: + cudaRoundNearest = 0 + cudaRoundZero = 1 + cudaRoundPosInf = 2 + cudaRoundMinInf = 3 + +ctypedef cudaLaunchAttributeID cudaStreamAttrID + +ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + +ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + +ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pxd new file mode 100644 index 0000000000000000000000000000000000000000..dbb1190edc4811ce97805b6cefb5c9abd4a181f5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pxd @@ -0,0 +1,7506 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings.cydriver as cydriver + +include "_lib/utils.pxd" + +cdef class CUcontext: + """ + + A regular context handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcontext _pvt_val + cdef cydriver.CUcontext* _pvt_ptr + +cdef class CUmodule: + """ + + CUDA module + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmodule _pvt_val + cdef cydriver.CUmodule* _pvt_ptr + +cdef class CUfunction: + """ + + CUDA function + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUfunction _pvt_val + cdef cydriver.CUfunction* _pvt_ptr + +cdef class CUlibrary: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlibrary _pvt_val + cdef cydriver.CUlibrary* _pvt_ptr + +cdef class CUkernel: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUkernel _pvt_val + cdef cydriver.CUkernel* _pvt_ptr + +cdef class CUarray: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUarray _pvt_val + cdef cydriver.CUarray* _pvt_ptr + +cdef class CUmipmappedArray: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmipmappedArray _pvt_val + cdef cydriver.CUmipmappedArray* _pvt_ptr + +cdef class CUtexref: + """ + + CUDA texture reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexref _pvt_val + cdef cydriver.CUtexref* _pvt_ptr + +cdef class CUsurfref: + """ + + CUDA surface reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfref _pvt_val + cdef cydriver.CUsurfref* _pvt_ptr + +cdef class CUevent: + """ + + CUDA event + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUevent _pvt_val + cdef cydriver.CUevent* _pvt_ptr + +cdef class CUstream: + """ + + CUDA stream + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUstream _pvt_val + cdef cydriver.CUstream* _pvt_ptr + +cdef class CUgraphicsResource: + """ + + CUDA graphics interop resource + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphicsResource _pvt_val + cdef cydriver.CUgraphicsResource* _pvt_ptr + +cdef class CUexternalMemory: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUexternalMemory _pvt_val + cdef cydriver.CUexternalMemory* _pvt_ptr + +cdef class CUexternalSemaphore: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUexternalSemaphore _pvt_val + cdef cydriver.CUexternalSemaphore* _pvt_ptr + +cdef class CUgraph: + """ + + CUDA graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraph _pvt_val + cdef cydriver.CUgraph* _pvt_ptr + +cdef class CUgraphNode: + """ + + CUDA graph node + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphNode _pvt_val + cdef cydriver.CUgraphNode* _pvt_ptr + +cdef class CUgraphExec: + """ + + CUDA executable graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphExec _pvt_val + cdef cydriver.CUgraphExec* _pvt_ptr + +cdef class CUmemoryPool: + """ + + CUDA memory pool + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemoryPool _pvt_val + cdef cydriver.CUmemoryPool* _pvt_ptr + +cdef class CUuserObject: + """ + + CUDA user object for graphs + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUuserObject _pvt_val + cdef cydriver.CUuserObject* _pvt_ptr + +cdef class CUgraphDeviceNode: + """ + + CUDA graph device node handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphDeviceNode _pvt_val + cdef cydriver.CUgraphDeviceNode* _pvt_ptr + +cdef class CUasyncCallbackHandle: + """ + + CUDA async notification callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUasyncCallbackHandle _pvt_val + cdef cydriver.CUasyncCallbackHandle* _pvt_ptr + +cdef class CUgreenCtx: + """ + + A green context handle. This handle can be used safely from only one CPU thread at a time. Created via cuGreenCtxCreate + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgreenCtx _pvt_val + cdef cydriver.CUgreenCtx* _pvt_ptr + +cdef class CUlinkState: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlinkState _pvt_val + cdef cydriver.CUlinkState* _pvt_ptr + cdef list _keepalive + +cdef class CUdevResourceDesc: + """ + + An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via cuDevResourceGenerateDesc + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevResourceDesc _pvt_val + cdef cydriver.CUdevResourceDesc* _pvt_ptr + +cdef class CUlogsCallbackHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogsCallbackHandle _pvt_val + cdef cydriver.CUlogsCallbackHandle* _pvt_ptr + +cdef class CUeglStreamConnection: + """ + + CUDA EGLSream Connection + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUeglStreamConnection _pvt_val + cdef cydriver.CUeglStreamConnection* _pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLImageKHR _pvt_val + cdef cydriver.EGLImageKHR* _pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLStreamKHR _pvt_val + cdef cydriver.EGLStreamKHR* _pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLSyncKHR _pvt_val + cdef cydriver.EGLSyncKHR* _pvt_ptr + +cdef class CUasyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUasyncCallback _pvt_val + cdef cydriver.CUasyncCallback* _pvt_ptr + +cdef class CUhostFn: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUhostFn _pvt_val + cdef cydriver.CUhostFn* _pvt_ptr + +cdef class CUstreamCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUstreamCallback _pvt_val + cdef cydriver.CUstreamCallback* _pvt_ptr + +cdef class CUoccupancyB2DSize: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUoccupancyB2DSize _pvt_val + cdef cydriver.CUoccupancyB2DSize* _pvt_ptr + +cdef class CUlogsCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogsCallback _pvt_val + cdef cydriver.CUlogsCallback* _pvt_ptr + +cdef class CUuuid_st: + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUuuid_st _pvt_val + cdef cydriver.CUuuid_st* _pvt_ptr + +cdef class CUmemFabricHandle_st: + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + data : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemFabricHandle_st _pvt_val + cdef cydriver.CUmemFabricHandle_st* _pvt_ptr + +cdef class CUipcEventHandle_st: + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUipcEventHandle_st _pvt_val + cdef cydriver.CUipcEventHandle_st* _pvt_ptr + +cdef class CUipcMemHandle_st: + """ + CUDA IPC mem handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUipcMemHandle_st _pvt_val + cdef cydriver.CUipcMemHandle_st* _pvt_ptr + +cdef class CUstreamMemOpWaitValueParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + address : CUdeviceptr + + value : cuuint32_t + + value64 : cuuint64_t + + flags : unsigned int + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + cdef CUdeviceptr _address + cdef cuuint32_t _value + cdef cuuint64_t _value64 + cdef CUdeviceptr _alias + +cdef class CUstreamMemOpWriteValueParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + address : CUdeviceptr + + value : cuuint32_t + + value64 : cuuint64_t + + flags : unsigned int + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + cdef CUdeviceptr _address + cdef cuuint32_t _value + cdef cuuint64_t _value64 + cdef CUdeviceptr _alias + +cdef class CUstreamMemOpFlushRemoteWritesParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + +cdef class CUstreamMemOpMemoryBarrierParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + < Only supported in the _v2 API + flags : unsigned int + See CUstreamMemoryBarrier_flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + +cdef class CUstreamBatchMemOpParams_union: + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + operation : CUstreamBatchMemOpType + + waitValue : CUstreamMemOpWaitValueParams_st + + writeValue : CUstreamMemOpWriteValueParams_st + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + + pad : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUstreamBatchMemOpParams_union _pvt_val + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + cdef CUstreamMemOpWaitValueParams_st _waitValue + cdef CUstreamMemOpWriteValueParams_st _writeValue + cdef CUstreamMemOpFlushRemoteWritesParams_st _flushRemoteWrites + cdef CUstreamMemOpMemoryBarrierParams_st _memoryBarrier + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + """ + Attributes + ---------- + ctx : CUcontext + + count : unsigned int + + paramArray : CUstreamBatchMemOpParams + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st* _pvt_ptr + cdef CUcontext _ctx + cdef size_t _paramArray_length + cdef cydriver.CUstreamBatchMemOpParams* _paramArray + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + """ + Batch memory operation node parameters + + Attributes + ---------- + ctx : CUcontext + Context to use for the operations. + count : unsigned int + Number of operations in paramArray. + paramArray : CUstreamBatchMemOpParams + Array of batch memory operations. + flags : unsigned int + Flags to control the node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st* _pvt_ptr + cdef CUcontext _ctx + cdef size_t _paramArray_length + cdef cydriver.CUstreamBatchMemOpParams* _paramArray + +cdef class anon_struct0: + """ + Attributes + ---------- + bytesOverBudget : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + +cdef class anon_union2: + """ + Attributes + ---------- + overBudget : anon_struct0 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + cdef anon_struct0 _overBudget + +cdef class CUasyncNotificationInfo_st: + """ + Information passed to the user via the async notification callback + + Attributes + ---------- + type : CUasyncNotificationType + The type of notification being sent + info : anon_union2 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUasyncNotificationInfo_st* _val_ptr + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + cdef anon_union2 _info + +cdef class CUdevprop_st: + """ + Legacy device properties + + Attributes + ---------- + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + sharedMemPerBlock : int + Shared memory available per block in bytes + totalConstantMemory : int + Constant memory available on device in bytes + SIMDWidth : int + Warp size in threads + memPitch : int + Maximum pitch in bytes allowed by memory copies + regsPerBlock : int + 32-bit registers available per block + clockRate : int + Clock frequency in kilohertz + textureAlign : int + Alignment requirement for textures + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevprop_st _pvt_val + cdef cydriver.CUdevprop_st* _pvt_ptr + +cdef class CUaccessPolicyWindow_st: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : CUaccessProperty + CUaccessProperty set for hit. + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUaccessPolicyWindow_st _pvt_val + cdef cydriver.CUaccessPolicyWindow_st* _pvt_ptr + +cdef class CUDA_KERNEL_NODE_PARAMS_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st* _pvt_ptr + cdef CUfunction _func + cdef _HelperKernelParams _cykernelParams + +cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st* _pvt_ptr + cdef CUfunction _func + cdef _HelperKernelParams _cykernelParams + cdef CUkernel _kern + cdef CUcontext _ctx + +cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st* _pvt_ptr + cdef CUfunction _func + cdef _HelperKernelParams _cykernelParams + cdef CUkernel _kern + cdef CUcontext _ctx + +cdef class CUDA_MEMSET_NODE_PARAMS_st: + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st* _pvt_ptr + cdef CUdeviceptr _dst + +cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + ctx : CUcontext + Context on which to run the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st* _pvt_ptr + cdef CUdeviceptr _dst + cdef CUcontext _ctx + +cdef class CUDA_HOST_NODE_PARAMS_st: + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_HOST_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_st* _pvt_ptr + cdef CUhostFn _fn + +cdef class CUDA_HOST_NODE_PARAMS_v2_st: + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _pvt_ptr + cdef CUhostFn _fn + +cdef class CUDA_CONDITIONAL_NODE_PARAMS: + """ + Conditional node parameters + + Attributes + ---------- + handle : CUgraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cuGraphConditionalHandleCreate. + type : CUgraphConditionalNodeType + Type of conditional node. + size : unsigned int + Size of graph output array. Allowed values are 1 for + CU_GRAPH_COND_TYPE_WHILE, 1 or 2 for CU_GRAPH_COND_TYPE_IF, or any + value greater than zero for CU_GRAPH_COND_TYPE_SWITCH. + phGraph_out : CUgraph + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same CUDA context. + These graphs may be populated using graph node creation APIs or + cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + CU_GRAPH_COND_TYPE_WHILE: phGraph_out[0] is executed as long as the + condition is non-zero. CU_GRAPH_COND_TYPE_SWITCH: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + ctx : CUcontext + Context on which to run the node. Must match context used to create + the handle and all body nodes. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS _pvt_val + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS* _pvt_ptr + cdef CUgraphConditionalHandle _handle + cdef size_t _phGraph_out_length + cdef cydriver.CUgraph* _phGraph_out + cdef CUcontext _ctx + +cdef class CUgraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, + CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or + CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from CUgraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See CUgraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphEdgeData_st _pvt_val + cdef cydriver.CUgraphEdgeData_st* _pvt_ptr + +cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: + """ + Graph instantiation parameters + + Attributes + ---------- + flags : cuuint64_t + Instantiation flags + hUploadStream : CUstream + Upload stream + hErrNode_out : CUgraphNode + The node which caused instantiation to fail, if any + result_out : CUgraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st _pvt_val + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st* _pvt_ptr + cdef cuuint64_t _flags + cdef CUstream _hUploadStream + cdef CUgraphNode _hErrNode_out + +cdef class CUlaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. + By default, kernels are launched in domain 0. Kernel launched with + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. + User may also alter the domain ID with CUlaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is + available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchMemSyncDomainMap_st _pvt_val + cdef cydriver.CUlaunchMemSyncDomainMap_st* _pvt_ptr + +cdef class anon_struct1: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + +cdef class anon_struct2: + """ + Attributes + ---------- + event : CUevent + + flags : int + + triggerAtBlockStart : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + cdef CUevent _event + +cdef class anon_struct3: + """ + Attributes + ---------- + event : CUevent + + flags : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + cdef CUevent _event + +cdef class anon_struct4: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + +cdef class anon_struct5: + """ + Attributes + ---------- + deviceUpdatable : int + + devNode : CUgraphDeviceNode + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + cdef CUgraphDeviceNode _devNode + +cdef class CUlaunchAttributeValue_union: + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union _pvt_val + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + cdef CUaccessPolicyWindow _accessPolicyWindow + cdef anon_struct1 _clusterDim + cdef anon_struct2 _programmaticEvent + cdef anon_struct3 _launchCompletionEvent + cdef CUlaunchMemSyncDomainMap _memSyncDomainMap + cdef anon_struct4 _preferredClusterDim + cdef anon_struct5 _deviceUpdatableKernelNode + +cdef class CUlaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + id : CUlaunchAttributeID + Attribute to set + value : CUlaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttribute_st _pvt_val + cdef cydriver.CUlaunchAttribute_st* _pvt_ptr + cdef CUlaunchAttributeValue _value + +cdef class CUlaunchConfig_st: + """ + CUDA extensible launch configuration + + Attributes + ---------- + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + attrs : CUlaunchAttribute + List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + numAttrs : unsigned int + Number of attributes populated in CUlaunchConfig::attrs + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchConfig_st _pvt_val + cdef cydriver.CUlaunchConfig_st* _pvt_ptr + cdef CUstream _hStream + cdef size_t _attrs_length + cdef cydriver.CUlaunchAttribute* _attrs + +cdef class CUexecAffinitySmCount_st: + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + val : unsigned int + The number of SMs the context is limited to use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinitySmCount_st _pvt_val + cdef cydriver.CUexecAffinitySmCount_st* _pvt_ptr + +cdef class anon_union3: + """ + Attributes + ---------- + smCount : CUexecAffinitySmCount + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + cdef CUexecAffinitySmCount _smCount + +cdef class CUexecAffinityParam_st: + """ + Execution Affinity Parameters + + Attributes + ---------- + type : CUexecAffinityType + + param : anon_union3 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUexecAffinityParam_st* _val_ptr + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + cdef anon_union3 _param + +cdef class CUctxCigParam_st: + """ + CIG Context Create Params + + Attributes + ---------- + sharedDataType : CUcigDataType + + sharedData : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUctxCigParam_st _pvt_val + cdef cydriver.CUctxCigParam_st* _pvt_ptr + +cdef class CUctxCreateParams_st: + """ + Params for creating CUDA context Exactly one of execAffinityParams + and cigParams must be non-NULL. + + Attributes + ---------- + execAffinityParams : CUexecAffinityParam + + numExecAffinityParams : int + + cigParams : CUctxCigParam + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUctxCreateParams_st _pvt_val + cdef cydriver.CUctxCreateParams_st* _pvt_ptr + cdef size_t _execAffinityParams_length + cdef cydriver.CUexecAffinityParam* _execAffinityParams + cdef size_t _cigParams_length + cdef cydriver.CUctxCigParam* _cigParams + +cdef class CUlibraryHostUniversalFunctionAndDataTable_st: + """ + Attributes + ---------- + functionTable : Any + + functionWindowSize : size_t + + dataTable : Any + + dataWindowSize : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st _pvt_val + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st* _pvt_ptr + +cdef class CUDA_MEMCPY2D_st: + """ + 2D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcPitch : size_t + Source pitch (ignored when src is array) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstPitch : size_t + Destination pitch (ignored when dst is array) + WidthInBytes : size_t + Width of 2D memory copy in bytes + Height : size_t + Height of 2D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY2D_st _pvt_val + cdef cydriver.CUDA_MEMCPY2D_st* _pvt_ptr + cdef CUdeviceptr _srcDevice + cdef CUarray _srcArray + cdef CUdeviceptr _dstDevice + cdef CUarray _dstArray + +cdef class CUDA_MEMCPY3D_st: + """ + 3D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + reserved0 : Any + Must be NULL + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + reserved1 : Any + Must be NULL + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_st* _pvt_ptr + cdef CUdeviceptr _srcDevice + cdef CUarray _srcArray + cdef CUdeviceptr _dstDevice + cdef CUarray _dstArray + +cdef class CUDA_MEMCPY3D_PEER_st: + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_PEER_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_PEER_st* _pvt_ptr + cdef CUdeviceptr _srcDevice + cdef CUarray _srcArray + cdef CUcontext _srcContext + cdef CUdeviceptr _dstDevice + cdef CUarray _dstArray + cdef CUcontext _dstContext + +cdef class CUDA_MEMCPY_NODE_PARAMS_st: + """ + Memcpy node parameters + + Attributes + ---------- + flags : int + Must be zero + reserved : int + Must be zero + copyCtx : CUcontext + Context on which to run the node + copyParams : CUDA_MEMCPY3D + Parameters for the memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st* _pvt_ptr + cdef CUcontext _copyCtx + cdef CUDA_MEMCPY3D _copyParams + +cdef class CUDA_ARRAY_DESCRIPTOR_st: + """ + Array descriptor + + Attributes + ---------- + Width : size_t + Width of array + Height : size_t + Height of array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st* _pvt_ptr + +cdef class CUDA_ARRAY3D_DESCRIPTOR_st: + """ + 3D array descriptor + + Attributes + ---------- + Width : size_t + Width of 3D array + Height : size_t + Height of 3D array + Depth : size_t + Depth of 3D array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + Flags : unsigned int + Flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st* _pvt_ptr + +cdef class anon_struct6: + """ + Attributes + ---------- + width : unsigned int + + height : unsigned int + + depth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: + """ + CUDA array sparse properties + + Attributes + ---------- + tileExtent : anon_struct6 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st _pvt_val + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + cdef anon_struct6 _tileExtent + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + """ + CUDA array memory requirements + + Attributes + ---------- + size : size_t + Total required memory size + alignment : size_t + alignment requirement + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st _pvt_val + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _pvt_ptr + +cdef class anon_struct7: + """ + Attributes + ---------- + hArray : CUarray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef CUarray _hArray + +cdef class anon_struct8: + """ + Attributes + ---------- + hMipmappedArray : CUmipmappedArray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef CUmipmappedArray _hMipmappedArray + +cdef class anon_struct9: + """ + Attributes + ---------- + devPtr : CUdeviceptr + + format : CUarray_format + + numChannels : unsigned int + + sizeInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef CUdeviceptr _devPtr + +cdef class anon_struct10: + """ + Attributes + ---------- + devPtr : CUdeviceptr + + format : CUarray_format + + numChannels : unsigned int + + width : size_t + + height : size_t + + pitchInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef CUdeviceptr _devPtr + +cdef class anon_struct11: + """ + Attributes + ---------- + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + +cdef class anon_union4: + """ + Attributes + ---------- + array : anon_struct7 + + mipmap : anon_struct8 + + linear : anon_struct9 + + pitch2D : anon_struct10 + + reserved : anon_struct11 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef anon_struct7 _array + cdef anon_struct8 _mipmap + cdef anon_struct9 _linear + cdef anon_struct10 _pitch2D + cdef anon_struct11 _reserved + +cdef class CUDA_RESOURCE_DESC_st: + """ + CUDA Resource descriptor + + Attributes + ---------- + resType : CUresourcetype + Resource type + res : anon_union4 + + flags : unsigned int + Flags (must be zero) + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_DESC_st* _val_ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + cdef anon_union4 _res + +cdef class CUDA_TEXTURE_DESC_st: + """ + Texture descriptor + + Attributes + ---------- + addressMode : list[CUaddress_mode] + Address modes + filterMode : CUfilter_mode + Filter mode + flags : unsigned int + Flags + maxAnisotropy : unsigned int + Maximum anisotropy ratio + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + mipmapLevelBias : float + Mipmap level bias + minMipmapLevelClamp : float + Mipmap minimum level clamp + maxMipmapLevelClamp : float + Mipmap maximum level clamp + borderColor : list[float] + Border Color + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_TEXTURE_DESC_st _pvt_val + cdef cydriver.CUDA_TEXTURE_DESC_st* _pvt_ptr + +cdef class CUDA_RESOURCE_VIEW_DESC_st: + """ + Resource view descriptor + + Attributes + ---------- + format : CUresourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st _pvt_val + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st* _pvt_ptr + +cdef class CUtensorMap_st: + """ + Tensor map descriptor. Requires compiler support for aligning to 64 + bytes. + + Attributes + ---------- + opaque : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUtensorMap_st _pvt_val + cdef cydriver.CUtensorMap_st* _pvt_ptr + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + """ + GPU Direct v3 tokens + + Attributes + ---------- + p2pToken : unsigned long long + + vaSpaceToken : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st _pvt_val + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _pvt_ptr + +cdef class CUDA_LAUNCH_PARAMS_st: + """ + Kernel launch parameters + + Attributes + ---------- + function : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_LAUNCH_PARAMS_st _pvt_val + cdef cydriver.CUDA_LAUNCH_PARAMS_st* _pvt_ptr + cdef CUfunction _function + cdef CUstream _hStream + cdef _HelperKernelParams _cykernelParams + +cdef class anon_struct12: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + +cdef class anon_union5: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct12 + + nvSciBufObject : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + cdef anon_struct12 _win32 + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + """ + External memory handle descriptor + + Attributes + ---------- + type : CUexternalMemoryHandleType + Type of the handle + handle : anon_union5 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _val_ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + cdef anon_union5 _handle + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _pvt_ptr + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + numLevels : unsigned int + Total number of levels in the mipmap chain + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st* _pvt_ptr + cdef CUDA_ARRAY3D_DESCRIPTOR _arrayDesc + +cdef class anon_struct13: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + +cdef class anon_union6: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct13 + + nvSciSyncObj : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + cdef anon_struct13 _win32 + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + """ + External semaphore handle descriptor + + Attributes + ---------- + type : CUexternalSemaphoreHandleType + Type of the handle + handle : anon_union6 + + flags : unsigned int + Flags reserved for the future. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _val_ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + cdef anon_union6 _handle + +cdef class anon_struct14: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + +cdef class anon_union7: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + +cdef class anon_struct15: + """ + Attributes + ---------- + key : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + +cdef class anon_struct16: + """ + Attributes + ---------- + fence : anon_struct14 + + nvSciSync : anon_union7 + + keyedMutex : anon_struct15 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + cdef anon_struct14 _fence + cdef anon_union7 _nvSciSync + cdef anon_struct15 _keyedMutex + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + """ + External semaphore signal parameters + + Attributes + ---------- + params : anon_struct16 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + cdef anon_struct16 _params + +cdef class anon_struct17: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + +cdef class anon_union8: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + +cdef class anon_struct18: + """ + Attributes + ---------- + key : unsigned long long + + timeoutMs : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + +cdef class anon_struct19: + """ + Attributes + ---------- + fence : anon_struct17 + + nvSciSync : anon_union8 + + keyedMutex : anon_struct18 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + cdef anon_struct17 _fence + cdef anon_union8 _nvSciSync + cdef anon_struct18 _keyedMutex + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + """ + External semaphore wait parameters + + Attributes + ---------- + params : anon_struct19 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + cdef anon_struct19 _params + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st* _pvt_ptr + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _pvt_ptr + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st* _pvt_ptr + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _pvt_ptr + cdef size_t _extSemArray_length + cdef cydriver.CUexternalSemaphore* _extSemArray + cdef size_t _paramsArray_length + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + +cdef class anon_union9: + """ + Attributes + ---------- + mipmap : CUmipmappedArray + + array : CUarray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + cdef CUmipmappedArray _mipmap + cdef CUarray _array + +cdef class anon_struct20: + """ + Attributes + ---------- + level : unsigned int + + layer : unsigned int + + offsetX : unsigned int + + offsetY : unsigned int + + offsetZ : unsigned int + + extentWidth : unsigned int + + extentHeight : unsigned int + + extentDepth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + +cdef class anon_struct21: + """ + Attributes + ---------- + layer : unsigned int + + offset : unsigned long long + + size : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + +cdef class anon_union10: + """ + Attributes + ---------- + sparseLevel : anon_struct20 + + miptail : anon_struct21 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + cdef anon_struct20 _sparseLevel + cdef anon_struct21 _miptail + +cdef class anon_union11: + """ + Attributes + ---------- + memHandle : CUmemGenericAllocationHandle + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + cdef CUmemGenericAllocationHandle _memHandle + +cdef class CUarrayMapInfo_st: + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + resourceType : CUresourcetype + Resource type + resource : anon_union9 + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + subresource : anon_union10 + + memOperationType : CUmemOperationType + Memory operation type + memHandleType : CUmemHandleType + Memory handle type + memHandle : anon_union11 + + offset : unsigned long long + Offset within mip tail Offset within the memory + deviceBitMask : unsigned int + Device ordinal bit mask + flags : unsigned int + flags for future use, must be zero now. + reserved : list[unsigned int] + Reserved for future use, must be zero now. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUarrayMapInfo_st* _val_ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + cdef anon_union9 _resource + cdef anon_union10 _subresource + cdef anon_union11 _memHandle + +cdef class CUmemLocation_st: + """ + Specifies a memory location. + + Attributes + ---------- + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemLocation_st _pvt_val + cdef cydriver.CUmemLocation_st* _pvt_ptr + +cdef class anon_struct22: + """ + Attributes + ---------- + compressionType : bytes + + gpuDirectRDMACapable : bytes + + usage : unsigned short + + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + +cdef class CUmemAllocationProp_st: + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + type : CUmemAllocationType + Allocation type + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + location : CUmemLocation + Location of allocation + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + allocFlags : anon_struct22 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAllocationProp_st _pvt_val + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + cdef CUmemLocation _location + cdef anon_struct22 _allocFlags + +cdef class CUmulticastObjectProp_st: + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + flags : unsigned long long + Flags for future use, must be zero now + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmulticastObjectProp_st _pvt_val + cdef cydriver.CUmulticastObjectProp_st* _pvt_ptr + +cdef class CUmemAccessDesc_st: + """ + Memory access descriptor + + Attributes + ---------- + location : CUmemLocation + Location on which the request is to change it's accessibility + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemAccessDesc_st _pvt_val + cdef cydriver.CUmemAccessDesc_st* _pvt_ptr + cdef CUmemLocation _location + +cdef class CUgraphExecUpdateResultInfo_st: + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphExecUpdateResultInfo_st _pvt_val + cdef cydriver.CUgraphExecUpdateResultInfo_st* _pvt_ptr + cdef CUgraphNode _errorNode + cdef CUgraphNode _errorFromNode + +cdef class CUmemPoolProps_st: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : CUmemLocation + Location where allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemPoolProps_st _pvt_val + cdef cydriver.CUmemPoolProps_st* _pvt_ptr + cdef CUmemLocation _location + +cdef class CUmemPoolPtrExportData_st: + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemPoolPtrExportData_st _pvt_val + cdef cydriver.CUmemPoolPtrExportData_st* _pvt_ptr + +cdef class CUmemcpyAttributes_st: + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpyAttributes_st _pvt_val + cdef cydriver.CUmemcpyAttributes_st* _pvt_ptr + cdef CUmemLocation _srcLocHint + cdef CUmemLocation _dstLocHint + +cdef class CUoffset3D_st: + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUoffset3D_st _pvt_val + cdef cydriver.CUoffset3D_st* _pvt_ptr + +cdef class CUextent3D_st: + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + width : size_t + + height : size_t + + depth : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUextent3D_st _pvt_val + cdef cydriver.CUextent3D_st* _pvt_ptr + +cdef class anon_struct23: + """ + Attributes + ---------- + ptr : CUdeviceptr + + rowLength : size_t + + layerHeight : size_t + + locHint : CUmemLocation + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + cdef CUdeviceptr _ptr + cdef CUmemLocation _locHint + +cdef class anon_struct24: + """ + Attributes + ---------- + array : CUarray + + offset : CUoffset3D + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + cdef CUarray _array + cdef CUoffset3D _offset + +cdef class anon_union12: + """ + Attributes + ---------- + ptr : anon_struct23 + + array : anon_struct24 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + cdef anon_struct23 _ptr + cdef anon_struct24 _array + +cdef class CUmemcpy3DOperand_st: + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + type : CUmemcpy3DOperandType + + op : anon_union12 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _val_ptr + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + cdef anon_union12 _op + +cdef class CUDA_MEMCPY3D_BATCH_OP_st: + """ + Attributes + ---------- + src : CUmemcpy3DOperand + Source memcpy operand. + dst : CUmemcpy3DOperand + Destination memcpy operand. + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st* _pvt_ptr + cdef CUmemcpy3DOperand _src + cdef CUmemcpy3DOperand _dst + cdef CUextent3D _extent + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st* _pvt_ptr + cdef CUmemPoolProps _poolProps + cdef size_t _accessDescs_length + cdef cydriver.CUmemAccessDesc* _accessDescs + cdef CUdeviceptr _dptr + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st* _pvt_ptr + cdef CUmemPoolProps _poolProps + cdef size_t _accessDescs_length + cdef cydriver.CUmemAccessDesc* _accessDescs + cdef CUdeviceptr _dptr + +cdef class CUDA_MEM_FREE_NODE_PARAMS_st: + """ + Memory free node parameters + + Attributes + ---------- + dptr : CUdeviceptr + in: the pointer to free + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st* _pvt_ptr + cdef CUdeviceptr _dptr + +cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: + """ + Child graph node parameters + + Attributes + ---------- + graph : CUgraph + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + ownership : CUgraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st* _pvt_ptr + cdef CUgraph _graph + +cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: + """ + Event record node parameters + + Attributes + ---------- + event : CUevent + The event to record when the node executes + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _pvt_ptr + cdef CUevent _event + +cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: + """ + Event wait node parameters + + Attributes + ---------- + event : CUevent + The event to wait on from the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st* _pvt_ptr + cdef CUevent _event + +cdef class CUgraphNodeParams_st: + """ + Graph node parameters. See cuGraphAddNode. + + Attributes + ---------- + type : CUgraphNodeType + Type of the node + reserved0 : list[int] + Reserved. Must be zero. + reserved1 : list[long long] + Padding. Unused bytes must be zero. + kernel : CUDA_KERNEL_NODE_PARAMS_v3 + Kernel node parameters. + memcpy : CUDA_MEMCPY_NODE_PARAMS + Memcpy node parameters. + memset : CUDA_MEMSET_NODE_PARAMS_v2 + Memset node parameters. + host : CUDA_HOST_NODE_PARAMS_v2 + Host node parameters. + graph : CUDA_CHILD_GRAPH_NODE_PARAMS + Child graph node parameters. + eventWait : CUDA_EVENT_WAIT_NODE_PARAMS + Event wait node parameters. + eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS + Event record node parameters. + extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + External semaphore signal node parameters. + extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + External semaphore wait node parameters. + alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 + Memory allocation node parameters. + free : CUDA_MEM_FREE_NODE_PARAMS + Memory free node parameters. + memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + MemOp node parameters. + conditional : CUDA_CONDITIONAL_NODE_PARAMS + Conditional node parameters. + reserved2 : long long + Reserved bytes. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUgraphNodeParams_st* _val_ptr + cdef cydriver.CUgraphNodeParams_st* _pvt_ptr + cdef CUDA_KERNEL_NODE_PARAMS_v3 _kernel + cdef CUDA_MEMCPY_NODE_PARAMS _memcpy + cdef CUDA_MEMSET_NODE_PARAMS_v2 _memset + cdef CUDA_HOST_NODE_PARAMS_v2 _host + cdef CUDA_CHILD_GRAPH_NODE_PARAMS _graph + cdef CUDA_EVENT_WAIT_NODE_PARAMS _eventWait + cdef CUDA_EVENT_RECORD_NODE_PARAMS _eventRecord + cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 _extSemSignal + cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 _extSemWait + cdef CUDA_MEM_ALLOC_NODE_PARAMS_v2 _alloc + cdef CUDA_MEM_FREE_NODE_PARAMS _free + cdef CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 _memOp + cdef CUDA_CONDITIONAL_NODE_PARAMS _conditional + +cdef class CUcheckpointLockArgs_st: + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + reserved0 : unsigned int + Reserved for future use, must be zero + reserved1 : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointLockArgs_st _pvt_val + cdef cydriver.CUcheckpointLockArgs_st* _pvt_ptr + +cdef class CUcheckpointCheckpointArgs_st: + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCheckpointArgs_st _pvt_val + cdef cydriver.CUcheckpointCheckpointArgs_st* _pvt_ptr + +cdef class CUcheckpointRestoreArgs_st: + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointRestoreArgs_st _pvt_val + cdef cydriver.CUcheckpointRestoreArgs_st* _pvt_ptr + +cdef class CUcheckpointUnlockArgs_st: + """ + CUDA checkpoint optional unlock arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointUnlockArgs_st _pvt_val + cdef cydriver.CUcheckpointUnlockArgs_st* _pvt_ptr + +cdef class CUmemDecompressParams_st: + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + padding : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemDecompressParams_st _pvt_val + cdef cydriver.CUmemDecompressParams_st* _pvt_ptr + +cdef class CUdevSmResource_st: + """ + Attributes + ---------- + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + This is an output parameter only, do not write to this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevSmResource_st _pvt_val + cdef cydriver.CUdevSmResource_st* _pvt_ptr + +cdef class CUdevResource_st: + """ + Attributes + ---------- + type : CUdevResourceType + Type of resource, dictates which union field was last set + _internal_padding : bytes + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + _oversize : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevResource_st* _val_ptr + cdef cydriver.CUdevResource_st* _pvt_ptr + cdef CUdevSmResource _sm + +cdef class anon_union15: + """ + Attributes + ---------- + pArray : list[CUarray] + + pPitch : list[Any] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _pvt_ptr + +cdef class CUeglFrame_st: + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + frame : anon_union15 + + width : unsigned int + Width of first plane + height : unsigned int + Height of first plane + depth : unsigned int + Depth of first plane + pitch : unsigned int + Pitch of first plane + planeCount : unsigned int + Number of planes + numChannels : unsigned int + Number of channels for the plane + frameType : CUeglFrameType + Array or Pitch + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + cuFormat : CUarray_format + CUDA Array Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _val_ptr + cdef cydriver.CUeglFrame_st* _pvt_ptr + cdef anon_union15 _frame + +cdef class CUdeviceptr: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdeviceptr _pvt_val + cdef cydriver.CUdeviceptr* _pvt_ptr + +cdef class CUdevice: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevice _pvt_val + cdef cydriver.CUdevice* _pvt_ptr + +cdef class CUtexObject: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexObject _pvt_val + cdef cydriver.CUtexObject* _pvt_ptr + +cdef class CUsurfObject: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfObject _pvt_val + cdef cydriver.CUsurfObject* _pvt_ptr + +cdef class CUgraphConditionalHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUgraphConditionalHandle _pvt_val + cdef cydriver.CUgraphConditionalHandle* _pvt_ptr + +cdef class CUuuid(CUuuid_st): + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemFabricHandle_v1(CUmemFabricHandle_st): + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + data : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemFabricHandle(CUmemFabricHandle_v1): + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + data : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcEventHandle_v1(CUipcEventHandle_st): + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcEventHandle(CUipcEventHandle_v1): + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcMemHandle_v1(CUipcMemHandle_st): + """ + CUDA IPC mem handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUipcMemHandle(CUipcMemHandle_v1): + """ + CUDA IPC mem handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamBatchMemOpParams_v1(CUstreamBatchMemOpParams_union): + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + operation : CUstreamBatchMemOpType + + waitValue : CUstreamMemOpWaitValueParams_st + + writeValue : CUstreamMemOpWriteValueParams_st + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + + pad : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamBatchMemOpParams(CUstreamBatchMemOpParams_v1): + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + operation : CUstreamBatchMemOpType + + waitValue : CUstreamMemOpWaitValueParams_st + + writeValue : CUstreamMemOpWriteValueParams_st + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + + pad : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st): + """ + Attributes + ---------- + ctx : CUcontext + + count : unsigned int + + paramArray : CUstreamBatchMemOpParams + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1): + """ + Attributes + ---------- + ctx : CUcontext + + count : unsigned int + + paramArray : CUstreamBatchMemOpParams + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st): + """ + Batch memory operation node parameters + + Attributes + ---------- + ctx : CUcontext + Context to use for the operations. + count : unsigned int + Number of operations in paramArray. + paramArray : CUstreamBatchMemOpParams + Array of batch memory operations. + flags : unsigned int + Flags to control the node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUasyncNotificationInfo(CUasyncNotificationInfo_st): + """ + Information passed to the user via the async notification callback + + Attributes + ---------- + type : CUasyncNotificationType + The type of notification being sent + info : anon_union2 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevprop_v1(CUdevprop_st): + """ + Legacy device properties + + Attributes + ---------- + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + sharedMemPerBlock : int + Shared memory available per block in bytes + totalConstantMemory : int + Constant memory available on device in bytes + SIMDWidth : int + Warp size in threads + memPitch : int + Maximum pitch in bytes allowed by memory copies + regsPerBlock : int + 32-bit registers available per block + clockRate : int + Clock frequency in kilohertz + textureAlign : int + Alignment requirement for textures + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevprop(CUdevprop_v1): + """ + Legacy device properties + + Attributes + ---------- + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + sharedMemPerBlock : int + Shared memory available per block in bytes + totalConstantMemory : int + Constant memory available on device in bytes + SIMDWidth : int + Warp size in threads + memPitch : int + Maximum pitch in bytes allowed by memory copies + regsPerBlock : int + 32-bit registers available per block + clockRate : int + Clock frequency in kilohertz + textureAlign : int + Alignment requirement for textures + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUaccessPolicyWindow_v1(CUaccessPolicyWindow_st): + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : CUaccessProperty + CUaccessProperty set for hit. + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUaccessPolicyWindow(CUaccessPolicyWindow_v1): + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : CUaccessProperty + CUaccessProperty set for hit. + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v1(CUDA_KERNEL_NODE_PARAMS_st): + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v2(CUDA_KERNEL_NODE_PARAMS_v2_st): + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS(CUDA_KERNEL_NODE_PARAMS_v2): + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_KERNEL_NODE_PARAMS_v3(CUDA_KERNEL_NODE_PARAMS_v3_st): + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS_v1(CUDA_MEMSET_NODE_PARAMS_st): + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS(CUDA_MEMSET_NODE_PARAMS_v1): + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMSET_NODE_PARAMS_v2(CUDA_MEMSET_NODE_PARAMS_v2_st): + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + ctx : CUcontext + Context on which to run the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS_v1(CUDA_HOST_NODE_PARAMS_st): + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS(CUDA_HOST_NODE_PARAMS_v1): + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_HOST_NODE_PARAMS_v2(CUDA_HOST_NODE_PARAMS_v2_st): + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphEdgeData(CUgraphEdgeData_st): + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, + CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or + CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from CUgraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See CUgraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_GRAPH_INSTANTIATE_PARAMS(CUDA_GRAPH_INSTANTIATE_PARAMS_st): + """ + Graph instantiation parameters + + Attributes + ---------- + flags : cuuint64_t + Instantiation flags + hUploadStream : CUstream + Upload stream + hErrNode_out : CUgraphNode + The node which caused instantiation to fail, if any + result_out : CUgraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchMemSyncDomainMap(CUlaunchMemSyncDomainMap_st): + """ + Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. + By default, kernels are launched in domain 0. Kernel launched with + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. + User may also alter the domain ID with CUlaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is + available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchAttribute(CUlaunchAttribute_st): + """ + Launch attribute + + Attributes + ---------- + id : CUlaunchAttributeID + Attribute to set + value : CUlaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlaunchConfig(CUlaunchConfig_st): + """ + CUDA extensible launch configuration + + Attributes + ---------- + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + attrs : CUlaunchAttribute + List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + numAttrs : unsigned int + Number of attributes populated in CUlaunchConfig::attrs + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUstreamAttrValue(CUstreamAttrValue_v1): + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinitySmCount_v1(CUexecAffinitySmCount_st): + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + val : unsigned int + The number of SMs the context is limited to use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinitySmCount(CUexecAffinitySmCount_v1): + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + val : unsigned int + The number of SMs the context is limited to use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st): + """ + Execution Affinity Parameters + + Attributes + ---------- + type : CUexecAffinityType + + param : anon_union3 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUexecAffinityParam(CUexecAffinityParam_v1): + """ + Execution Affinity Parameters + + Attributes + ---------- + type : CUexecAffinityType + + param : anon_union3 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUctxCigParam(CUctxCigParam_st): + """ + CIG Context Create Params + + Attributes + ---------- + sharedDataType : CUcigDataType + + sharedData : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUctxCreateParams(CUctxCreateParams_st): + """ + Params for creating CUDA context Exactly one of execAffinityParams + and cigParams must be non-NULL. + + Attributes + ---------- + execAffinityParams : CUexecAffinityParam + + numExecAffinityParams : int + + cigParams : CUctxCigParam + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUlibraryHostUniversalFunctionAndDataTable(CUlibraryHostUniversalFunctionAndDataTable_st): + """ + Attributes + ---------- + functionTable : Any + + functionWindowSize : size_t + + dataTable : Any + + dataWindowSize : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY2D_v2(CUDA_MEMCPY2D_st): + """ + 2D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcPitch : size_t + Source pitch (ignored when src is array) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstPitch : size_t + Destination pitch (ignored when dst is array) + WidthInBytes : size_t + Width of 2D memory copy in bytes + Height : size_t + Height of 2D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY2D(CUDA_MEMCPY2D_v2): + """ + 2D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcPitch : size_t + Source pitch (ignored when src is array) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstPitch : size_t + Destination pitch (ignored when dst is array) + WidthInBytes : size_t + Width of 2D memory copy in bytes + Height : size_t + Height of 2D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_v2(CUDA_MEMCPY3D_st): + """ + 3D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + reserved0 : Any + Must be NULL + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + reserved1 : Any + Must be NULL + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D(CUDA_MEMCPY3D_v2): + """ + 3D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + reserved0 : Any + Must be NULL + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + reserved1 : Any + Must be NULL + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_PEER_v1(CUDA_MEMCPY3D_PEER_st): + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_PEER(CUDA_MEMCPY3D_PEER_v1): + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY_NODE_PARAMS(CUDA_MEMCPY_NODE_PARAMS_st): + """ + Memcpy node parameters + + Attributes + ---------- + flags : int + Must be zero + reserved : int + Must be zero + copyCtx : CUcontext + Context on which to run the node + copyParams : CUDA_MEMCPY3D + Parameters for the memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_DESCRIPTOR_v2(CUDA_ARRAY_DESCRIPTOR_st): + """ + Array descriptor + + Attributes + ---------- + Width : size_t + Width of array + Height : size_t + Height of array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_DESCRIPTOR(CUDA_ARRAY_DESCRIPTOR_v2): + """ + Array descriptor + + Attributes + ---------- + Width : size_t + Width of array + Height : size_t + Height of array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY3D_DESCRIPTOR_v2(CUDA_ARRAY3D_DESCRIPTOR_st): + """ + 3D array descriptor + + Attributes + ---------- + Width : size_t + Width of 3D array + Height : size_t + Height of 3D array + Depth : size_t + Depth of 3D array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + Flags : unsigned int + Flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY3D_DESCRIPTOR(CUDA_ARRAY3D_DESCRIPTOR_v2): + """ + 3D array descriptor + + Attributes + ---------- + Width : size_t + Width of 3D array + Height : size_t + Height of 3D array + Depth : size_t + Depth of 3D array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + Flags : unsigned int + Flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES_v1(CUDA_ARRAY_SPARSE_PROPERTIES_st): + """ + CUDA array sparse properties + + Attributes + ---------- + tileExtent : anon_struct6 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES(CUDA_ARRAY_SPARSE_PROPERTIES_v1): + """ + CUDA array sparse properties + + Attributes + ---------- + tileExtent : anon_struct6 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(CUDA_ARRAY_MEMORY_REQUIREMENTS_st): + """ + CUDA array memory requirements + + Attributes + ---------- + size : size_t + Total required memory size + alignment : size_t + alignment requirement + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS(CUDA_ARRAY_MEMORY_REQUIREMENTS_v1): + """ + CUDA array memory requirements + + Attributes + ---------- + size : size_t + Total required memory size + alignment : size_t + alignment requirement + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st): + """ + CUDA Resource descriptor + + Attributes + ---------- + resType : CUresourcetype + Resource type + res : anon_union4 + + flags : unsigned int + Flags (must be zero) + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_v1): + """ + CUDA Resource descriptor + + Attributes + ---------- + resType : CUresourcetype + Resource type + res : anon_union4 + + flags : unsigned int + Flags (must be zero) + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_TEXTURE_DESC_v1(CUDA_TEXTURE_DESC_st): + """ + Texture descriptor + + Attributes + ---------- + addressMode : list[CUaddress_mode] + Address modes + filterMode : CUfilter_mode + Filter mode + flags : unsigned int + Flags + maxAnisotropy : unsigned int + Maximum anisotropy ratio + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + mipmapLevelBias : float + Mipmap level bias + minMipmapLevelClamp : float + Mipmap minimum level clamp + maxMipmapLevelClamp : float + Mipmap maximum level clamp + borderColor : list[float] + Border Color + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_TEXTURE_DESC(CUDA_TEXTURE_DESC_v1): + """ + Texture descriptor + + Attributes + ---------- + addressMode : list[CUaddress_mode] + Address modes + filterMode : CUfilter_mode + Filter mode + flags : unsigned int + Flags + maxAnisotropy : unsigned int + Maximum anisotropy ratio + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + mipmapLevelBias : float + Mipmap level bias + minMipmapLevelClamp : float + Mipmap minimum level clamp + maxMipmapLevelClamp : float + Mipmap maximum level clamp + borderColor : list[float] + Border Color + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_VIEW_DESC_v1(CUDA_RESOURCE_VIEW_DESC_st): + """ + Resource view descriptor + + Attributes + ---------- + format : CUresourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_RESOURCE_VIEW_DESC(CUDA_RESOURCE_VIEW_DESC_v1): + """ + Resource view descriptor + + Attributes + ---------- + format : CUresourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUtensorMap(CUtensorMap_st): + """ + Tensor map descriptor. Requires compiler support for aligning to 64 + bytes. + + Attributes + ---------- + opaque : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st): + """ + GPU Direct v3 tokens + + Attributes + ---------- + p2pToken : unsigned long long + + vaSpaceToken : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1): + """ + GPU Direct v3 tokens + + Attributes + ---------- + p2pToken : unsigned long long + + vaSpaceToken : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_LAUNCH_PARAMS_v1(CUDA_LAUNCH_PARAMS_st): + """ + Kernel launch parameters + + Attributes + ---------- + function : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_LAUNCH_PARAMS(CUDA_LAUNCH_PARAMS_v1): + """ + Kernel launch parameters + + Attributes + ---------- + function : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st): + """ + External memory handle descriptor + + Attributes + ---------- + type : CUexternalMemoryHandleType + Type of the handle + handle : anon_union5 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1): + """ + External memory handle descriptor + + Attributes + ---------- + type : CUexternalMemoryHandleType + Type of the handle + handle : anon_union5 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st): + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1): + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st): + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + numLevels : unsigned int + Total number of levels in the mipmap chain + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1): + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + numLevels : unsigned int + Total number of levels in the mipmap chain + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st): + """ + External semaphore handle descriptor + + Attributes + ---------- + type : CUexternalSemaphoreHandleType + Type of the handle + handle : anon_union6 + + flags : unsigned int + Flags reserved for the future. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1): + """ + External semaphore handle descriptor + + Attributes + ---------- + type : CUexternalSemaphoreHandleType + Type of the handle + handle : anon_union6 + + flags : unsigned int + Flags reserved for the future. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st): + """ + External semaphore signal parameters + + Attributes + ---------- + params : anon_struct16 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1): + """ + External semaphore signal parameters + + Attributes + ---------- + params : anon_struct16 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st): + """ + External semaphore wait parameters + + Attributes + ---------- + params : anon_struct19 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1): + """ + External semaphore wait parameters + + Attributes + ---------- + params : anon_struct19 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st): + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1): + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st): + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st): + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1): + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st): + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemGenericAllocationHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemGenericAllocationHandle _pvt_val + cdef cydriver.CUmemGenericAllocationHandle* _pvt_ptr + +cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + resourceType : CUresourcetype + Resource type + resource : anon_union9 + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + subresource : anon_union10 + + memOperationType : CUmemOperationType + Memory operation type + memHandleType : CUmemHandleType + Memory handle type + memHandle : anon_union11 + + offset : unsigned long long + Offset within mip tail Offset within the memory + deviceBitMask : unsigned int + Device ordinal bit mask + flags : unsigned int + flags for future use, must be zero now. + reserved : list[unsigned int] + Reserved for future use, must be zero now. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUarrayMapInfo(CUarrayMapInfo_v1): + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + resourceType : CUresourcetype + Resource type + resource : anon_union9 + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + subresource : anon_union10 + + memOperationType : CUmemOperationType + Memory operation type + memHandleType : CUmemHandleType + Memory handle type + memHandle : anon_union11 + + offset : unsigned long long + Offset within mip tail Offset within the memory + deviceBitMask : unsigned int + Device ordinal bit mask + flags : unsigned int + flags for future use, must be zero now. + reserved : list[unsigned int] + Reserved for future use, must be zero now. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemLocation_v1(CUmemLocation_st): + """ + Specifies a memory location. + + Attributes + ---------- + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemLocation(CUmemLocation_v1): + """ + Specifies a memory location. + + Attributes + ---------- + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st): + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + type : CUmemAllocationType + Allocation type + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + location : CUmemLocation + Location of allocation + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + allocFlags : anon_struct22 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAllocationProp(CUmemAllocationProp_v1): + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + type : CUmemAllocationType + Allocation type + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + location : CUmemLocation + Location of allocation + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + allocFlags : anon_struct22 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmulticastObjectProp_v1(CUmulticastObjectProp_st): + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + flags : unsigned long long + Flags for future use, must be zero now + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmulticastObjectProp(CUmulticastObjectProp_v1): + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + flags : unsigned long long + Flags for future use, must be zero now + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAccessDesc_v1(CUmemAccessDesc_st): + """ + Memory access descriptor + + Attributes + ---------- + location : CUmemLocation + Location on which the request is to change it's accessibility + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemAccessDesc(CUmemAccessDesc_v1): + """ + Memory access descriptor + + Attributes + ---------- + location : CUmemLocation + Location on which the request is to change it's accessibility + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphExecUpdateResultInfo_v1(CUgraphExecUpdateResultInfo_st): + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphExecUpdateResultInfo(CUgraphExecUpdateResultInfo_v1): + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolProps_v1(CUmemPoolProps_st): + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : CUmemLocation + Location where allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolProps(CUmemPoolProps_v1): + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : CUmemLocation + Location where allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolPtrExportData_v1(CUmemPoolPtrExportData_st): + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemPoolPtrExportData(CUmemPoolPtrExportData_v1): + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpyAttributes_v1(CUmemcpyAttributes_st): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpyAttributes(CUmemcpyAttributes_v1): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUoffset3D_v1(CUoffset3D_st): + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUoffset3D(CUoffset3D_v1): + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUextent3D_v1(CUextent3D_st): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + width : size_t + + height : size_t + + depth : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUextent3D(CUextent3D_v1): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + width : size_t + + height : size_t + + depth : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpy3DOperand_v1(CUmemcpy3DOperand_st): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + type : CUmemcpy3DOperandType + + op : anon_union12 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemcpy3DOperand(CUmemcpy3DOperand_v1): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + type : CUmemcpy3DOperandType + + op : anon_union12 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_BATCH_OP_v1(CUDA_MEMCPY3D_BATCH_OP_st): + """ + Attributes + ---------- + src : CUmemcpy3DOperand + Source memcpy operand. + dst : CUmemcpy3DOperand + Destination memcpy operand. + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEMCPY3D_BATCH_OP(CUDA_MEMCPY3D_BATCH_OP_v1): + """ + Attributes + ---------- + src : CUmemcpy3DOperand + Source memcpy operand. + dst : CUmemcpy3DOperand + Destination memcpy operand. + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st): + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS(CUDA_MEM_ALLOC_NODE_PARAMS_v1): + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st): + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_MEM_FREE_NODE_PARAMS(CUDA_MEM_FREE_NODE_PARAMS_st): + """ + Memory free node parameters + + Attributes + ---------- + dptr : CUdeviceptr + in: the pointer to free + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_CHILD_GRAPH_NODE_PARAMS(CUDA_CHILD_GRAPH_NODE_PARAMS_st): + """ + Child graph node parameters + + Attributes + ---------- + graph : CUgraph + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + ownership : CUgraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EVENT_RECORD_NODE_PARAMS(CUDA_EVENT_RECORD_NODE_PARAMS_st): + """ + Event record node parameters + + Attributes + ---------- + event : CUevent + The event to record when the node executes + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUDA_EVENT_WAIT_NODE_PARAMS(CUDA_EVENT_WAIT_NODE_PARAMS_st): + """ + Event wait node parameters + + Attributes + ---------- + event : CUevent + The event to wait on from the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUgraphNodeParams(CUgraphNodeParams_st): + """ + Graph node parameters. See cuGraphAddNode. + + Attributes + ---------- + type : CUgraphNodeType + Type of the node + reserved0 : list[int] + Reserved. Must be zero. + reserved1 : list[long long] + Padding. Unused bytes must be zero. + kernel : CUDA_KERNEL_NODE_PARAMS_v3 + Kernel node parameters. + memcpy : CUDA_MEMCPY_NODE_PARAMS + Memcpy node parameters. + memset : CUDA_MEMSET_NODE_PARAMS_v2 + Memset node parameters. + host : CUDA_HOST_NODE_PARAMS_v2 + Host node parameters. + graph : CUDA_CHILD_GRAPH_NODE_PARAMS + Child graph node parameters. + eventWait : CUDA_EVENT_WAIT_NODE_PARAMS + Event wait node parameters. + eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS + Event record node parameters. + extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + External semaphore signal node parameters. + extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + External semaphore wait node parameters. + alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 + Memory allocation node parameters. + free : CUDA_MEM_FREE_NODE_PARAMS + Memory free node parameters. + memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + MemOp node parameters. + conditional : CUDA_CONDITIONAL_NODE_PARAMS + Conditional node parameters. + reserved2 : long long + Reserved bytes. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointLockArgs(CUcheckpointLockArgs_st): + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + reserved0 : unsigned int + Reserved for future use, must be zero + reserved1 : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointCheckpointArgs(CUcheckpointCheckpointArgs_st): + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointUnlockArgs(CUcheckpointUnlockArgs_st): + """ + CUDA checkpoint optional unlock arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUmemDecompressParams(CUmemDecompressParams_st): + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + padding : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevSmResource(CUdevSmResource_st): + """ + Attributes + ---------- + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + This is an output parameter only, do not write to this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevResource_v1(CUdevResource_st): + """ + Attributes + ---------- + type : CUdevResourceType + Type of resource, dictates which union field was last set + _internal_padding : bytes + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + _oversize : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUdevResource(CUdevResource_v1): + """ + Attributes + ---------- + type : CUdevResourceType + Type of resource, dictates which union field was last set + _internal_padding : bytes + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + _oversize : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUeglFrame_v1(CUeglFrame_st): + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + frame : anon_union15 + + width : unsigned int + Width of first plane + height : unsigned int + Height of first plane + depth : unsigned int + Depth of first plane + pitch : unsigned int + Pitch of first plane + planeCount : unsigned int + Number of planes + numChannels : unsigned int + Number of channels for the plane + frameType : CUeglFrameType + Array or Pitch + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + cuFormat : CUarray_format + CUDA Array Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUeglFrame(CUeglFrame_v1): + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + frame : anon_union15 + + width : unsigned int + Width of first plane + height : unsigned int + Height of first plane + depth : unsigned int + Depth of first plane + pitch : unsigned int + Pitch of first plane + planeCount : unsigned int + Number of planes + numChannels : unsigned int + Number of channels for the plane + frameType : CUeglFrameType + Array or Pitch + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + cuFormat : CUarray_format + CUDA Array Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cuuint32_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.cuuint32_t _pvt_val + cdef cydriver.cuuint32_t* _pvt_ptr + +cdef class cuuint64_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.cuuint64_t _pvt_val + cdef cydriver.cuuint64_t* _pvt_ptr + +cdef class CUdeviceptr_v2: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdeviceptr_v2 _pvt_val + cdef cydriver.CUdeviceptr_v2* _pvt_ptr + +cdef class CUdevice_v1: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevice_v1 _pvt_val + cdef cydriver.CUdevice_v1* _pvt_ptr + +cdef class CUtexObject_v1: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexObject_v1 _pvt_val + cdef cydriver.CUtexObject_v1* _pvt_ptr + +cdef class CUsurfObject_v1: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUsurfObject_v1 _pvt_val + cdef cydriver.CUsurfObject_v1* _pvt_ptr + +cdef class CUmemGenericAllocationHandle_v1: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUmemGenericAllocationHandle_v1 _pvt_val + cdef cydriver.CUmemGenericAllocationHandle_v1* _pvt_ptr + +cdef class CUlogIterator: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUlogIterator _pvt_val + cdef cydriver.CUlogIterator* _pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.GLenum _pvt_val + cdef cydriver.GLenum* _pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.GLuint _pvt_val + cdef cydriver.GLuint* _pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.EGLint _pvt_val + cdef cydriver.EGLint* _pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpDevice _pvt_val + cdef cydriver.VdpDevice* _pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpGetProcAddress _pvt_val + cdef cydriver.VdpGetProcAddress* _pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpVideoSurface _pvt_val + cdef cydriver.VdpVideoSurface* _pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.VdpOutputSurface _pvt_val + cdef cydriver.VdpOutputSurface* _pvt_ptr diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pyx new file mode 100644 index 0000000000000000000000000000000000000000..133878e6bb0776ef6ec476b2b358d8fd217e2011 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/driver.pyx @@ -0,0 +1,47915 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +from typing import Any, Optional +from enum import IntEnum +import cython +import ctypes +from libc.stdlib cimport calloc, malloc, free +from libc cimport string +from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t, uintptr_t +from libc.stddef cimport wchar_t +from libc.limits cimport CHAR_MIN +from libcpp.vector cimport vector +from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS +from cpython.bytes cimport PyBytes_FromStringAndSize +import cuda.bindings.driver +from libcpp.map cimport map + +_driver = globals() +include "_lib/utils.pxi" + +ctypedef unsigned long long signed_char_ptr +ctypedef unsigned long long unsigned_char_ptr +ctypedef unsigned long long char_ptr +ctypedef unsigned long long short_ptr +ctypedef unsigned long long unsigned_short_ptr +ctypedef unsigned long long int_ptr +ctypedef unsigned long long long_int_ptr +ctypedef unsigned long long long_long_int_ptr +ctypedef unsigned long long unsigned_int_ptr +ctypedef unsigned long long unsigned_long_int_ptr +ctypedef unsigned long long unsigned_long_long_int_ptr +ctypedef unsigned long long uint32_t_ptr +ctypedef unsigned long long uint64_t_ptr +ctypedef unsigned long long int32_t_ptr +ctypedef unsigned long long int64_t_ptr +ctypedef unsigned long long unsigned_ptr +ctypedef unsigned long long unsigned_long_long_ptr +ctypedef unsigned long long long_long_ptr +ctypedef unsigned long long size_t_ptr +ctypedef unsigned long long long_ptr +ctypedef unsigned long long float_ptr +ctypedef unsigned long long double_ptr +ctypedef unsigned long long void_ptr + +#: CUDA API version number +CUDA_VERSION = cydriver.CUDA_VERSION + +#: CUDA IPC handle size +CU_IPC_HANDLE_SIZE = cydriver.CU_IPC_HANDLE_SIZE + +#: Legacy stream handle +#: +#: Stream handle that can be passed as a CUstream to use an implicit stream +#: with legacy synchronization behavior. +#: +#: See details of the \link_sync_behavior +CU_STREAM_LEGACY = cydriver.CU_STREAM_LEGACY + +#: Per-thread stream handle +#: +#: Stream handle that can be passed as a CUstream to use an implicit stream +#: with per-thread synchronization behavior. +#: +#: See details of the \link_sync_behavior +CU_STREAM_PER_THREAD = cydriver.CU_STREAM_PER_THREAD + +CU_COMPUTE_ACCELERATED_TARGET_BASE = cydriver.CU_COMPUTE_ACCELERATED_TARGET_BASE + +CU_COMPUTE_FAMILY_TARGET_BASE = cydriver.CU_COMPUTE_FAMILY_TARGET_BASE + +#: Conditional node handle flags Default value is applied when graph is +#: launched. +CU_GRAPH_COND_ASSIGN_DEFAULT = cydriver.CU_GRAPH_COND_ASSIGN_DEFAULT + +#: This port activates when the kernel has finished executing. +CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = cydriver.CU_GRAPH_KERNEL_NODE_PORT_DEFAULT + +#: This port activates when all blocks of the kernel have performed +#: cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be +#: used with edge type :py:obj:`~.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC`. +#: See also :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT`. +CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = cydriver.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC + +#: This port activates when all blocks of the kernel have begun execution. +#: See also :py:obj:`~.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT`. +CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = cydriver.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER + +CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW + +CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = cydriver.CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE + +CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION + +CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + +CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = cydriver.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY + +CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + +CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN + +CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + +CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE + +CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + +CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW + +CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY + +CU_STREAM_ATTRIBUTE_PRIORITY = cydriver.CU_STREAM_ATTRIBUTE_PRIORITY + +CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + +CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN + +#: If set, host memory is portable between CUDA contexts. Flag for +#: :py:obj:`~.cuMemHostAlloc()` +CU_MEMHOSTALLOC_PORTABLE = cydriver.CU_MEMHOSTALLOC_PORTABLE + +#: If set, host memory is mapped into CUDA address space and +#: :py:obj:`~.cuMemHostGetDevicePointer()` may be called on the host +#: pointer. Flag for :py:obj:`~.cuMemHostAlloc()` +CU_MEMHOSTALLOC_DEVICEMAP = cydriver.CU_MEMHOSTALLOC_DEVICEMAP + +#: If set, host memory is allocated as write-combined - fast to write, +#: faster to DMA, slow to read except via SSE4 streaming load instruction +#: (MOVNTDQA). Flag for :py:obj:`~.cuMemHostAlloc()` +CU_MEMHOSTALLOC_WRITECOMBINED = cydriver.CU_MEMHOSTALLOC_WRITECOMBINED + +#: If set, host memory is portable between CUDA contexts. Flag for +#: :py:obj:`~.cuMemHostRegister()` +CU_MEMHOSTREGISTER_PORTABLE = cydriver.CU_MEMHOSTREGISTER_PORTABLE + +#: If set, host memory is mapped into CUDA address space and +#: :py:obj:`~.cuMemHostGetDevicePointer()` may be called on the host +#: pointer. Flag for :py:obj:`~.cuMemHostRegister()` +CU_MEMHOSTREGISTER_DEVICEMAP = cydriver.CU_MEMHOSTREGISTER_DEVICEMAP + +#: If set, the passed memory pointer is treated as pointing to some memory- +#: mapped I/O space, e.g. belonging to a third-party PCIe device. On +#: Windows the flag is a no-op. On Linux that memory is marked as non +#: cache-coherent for the GPU and is expected to be physically contiguous. +#: It may return :py:obj:`~.CUDA_ERROR_NOT_PERMITTED` if run as an +#: unprivileged user, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` on older Linux +#: kernel versions. On all other platforms, it is not supported and +#: :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` is returned. Flag for +#: :py:obj:`~.cuMemHostRegister()` +CU_MEMHOSTREGISTER_IOMEMORY = cydriver.CU_MEMHOSTREGISTER_IOMEMORY + +#: If set, the passed memory pointer is treated as pointing to memory that +#: is considered read-only by the device. On platforms without +#: :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, +#: this flag is required in order to register memory mapped to the CPU as +#: read-only. Support for the use of this flag can be queried from the +#: device attribute +#: :py:obj:`~.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`. Using +#: this flag with a current context associated with a device that does not +#: have this attribute set will cause :py:obj:`~.cuMemHostRegister` to +#: error with :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`. +CU_MEMHOSTREGISTER_READ_ONLY = cydriver.CU_MEMHOSTREGISTER_READ_ONLY + +#: Indicates that the layered sparse CUDA array or CUDA mipmapped array has +#: a single mip tail region for all layers +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = cydriver.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + +#: Size of tensor map descriptor +CU_TENSOR_MAP_NUM_QWORDS = cydriver.CU_TENSOR_MAP_NUM_QWORDS + +#: Indicates that the external memory object is a dedicated resource +CUDA_EXTERNAL_MEMORY_DEDICATED = cydriver.CUDA_EXTERNAL_MEMORY_DEDICATED + +#: When the `flags` parameter of +#: :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS` contains this flag, it +#: indicates that signaling an external semaphore object should skip +#: performing appropriate memory synchronization operations over all the +#: external memory objects that are imported as +#: :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are +#: performed by default to ensure data coherency with other importers of +#: the same NvSciBuf memory objects. +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC + +#: When the `flags` parameter of +#: :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS` contains this flag, it +#: indicates that waiting on an external semaphore object should skip +#: performing appropriate memory synchronization operations over all the +#: external memory objects that are imported as +#: :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, which otherwise are +#: performed by default to ensure data coherency with other importers of +#: the same NvSciBuf memory objects. +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC + +#: When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to +#: this, it indicates that application needs signaler specific +#: NvSciSyncAttr to be filled by +#: :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. +CUDA_NVSCISYNC_ATTR_SIGNAL = cydriver.CUDA_NVSCISYNC_ATTR_SIGNAL + +#: When `flags` of :py:obj:`~.cuDeviceGetNvSciSyncAttributes` is set to +#: this, it indicates that application needs waiter specific NvSciSyncAttr +#: to be filled by :py:obj:`~.cuDeviceGetNvSciSyncAttributes`. +CUDA_NVSCISYNC_ATTR_WAIT = cydriver.CUDA_NVSCISYNC_ATTR_WAIT + +#: This flag if set indicates that the memory will be used as a tile pool. +CU_MEM_CREATE_USAGE_TILE_POOL = cydriver.CU_MEM_CREATE_USAGE_TILE_POOL + +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +CU_MEM_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_CREATE_USAGE_HW_DECOMPRESS + +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS + +#: If set, each kernel launched as part of +#: :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` only waits for prior +#: work in the stream corresponding to that GPU to complete before the +#: kernel begins execution. +CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = cydriver.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC + +#: If set, any subsequent work pushed in a stream that participated in a +#: call to :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` will only wait +#: for the kernel launched on the GPU corresponding to that stream to +#: complete before it begins execution. +CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = cydriver.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC + +#: If set, the CUDA array is a collection of layers, where each layer is +#: either a 1D or a 2D array and the Depth member of +#: CUDA_ARRAY3D_DESCRIPTOR specifies the number of layers, not the depth of +#: a 3D array. +CUDA_ARRAY3D_LAYERED = cydriver.CUDA_ARRAY3D_LAYERED + +#: Deprecated, use CUDA_ARRAY3D_LAYERED +CUDA_ARRAY3D_2DARRAY = cydriver.CUDA_ARRAY3D_2DARRAY + +#: This flag must be set in order to bind a surface reference to the CUDA +#: array +CUDA_ARRAY3D_SURFACE_LDST = cydriver.CUDA_ARRAY3D_SURFACE_LDST + +#: If set, the CUDA array is a collection of six 2D arrays, representing +#: faces of a cube. The width of such a CUDA array must be equal to its +#: height, and Depth must be six. If :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag +#: is also set, then the CUDA array is a collection of cubemaps and Depth +#: must be a multiple of six. +CUDA_ARRAY3D_CUBEMAP = cydriver.CUDA_ARRAY3D_CUBEMAP + +#: This flag must be set in order to perform texture gather operations on a +#: CUDA array. +CUDA_ARRAY3D_TEXTURE_GATHER = cydriver.CUDA_ARRAY3D_TEXTURE_GATHER + +#: This flag if set indicates that the CUDA array is a DEPTH_TEXTURE. +CUDA_ARRAY3D_DEPTH_TEXTURE = cydriver.CUDA_ARRAY3D_DEPTH_TEXTURE + +#: This flag indicates that the CUDA array may be bound as a color target +#: in an external graphics API +CUDA_ARRAY3D_COLOR_ATTACHMENT = cydriver.CUDA_ARRAY3D_COLOR_ATTACHMENT + +#: This flag if set indicates that the CUDA array or CUDA mipmapped array +#: is a sparse CUDA array or CUDA mipmapped array respectively +CUDA_ARRAY3D_SPARSE = cydriver.CUDA_ARRAY3D_SPARSE + +#: This flag if set indicates that the CUDA array or CUDA mipmapped array +#: will allow deferred memory mapping +CUDA_ARRAY3D_DEFERRED_MAPPING = cydriver.CUDA_ARRAY3D_DEFERRED_MAPPING + +#: This flag indicates that the CUDA array will be used for hardware +#: accelerated video encode/decode operations. +CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = cydriver.CUDA_ARRAY3D_VIDEO_ENCODE_DECODE + +#: Override the texref format with a format inferred from the array. Flag +#: for :py:obj:`~.cuTexRefSetArray()` +CU_TRSA_OVERRIDE_FORMAT = cydriver.CU_TRSA_OVERRIDE_FORMAT + +#: Read the texture as integers rather than promoting the values to floats +#: in the range [0,1]. Flag for :py:obj:`~.cuTexRefSetFlags()` and +#: :py:obj:`~.cuTexObjectCreate()` +CU_TRSF_READ_AS_INTEGER = cydriver.CU_TRSF_READ_AS_INTEGER + +#: Use normalized texture coordinates in the range [0,1) instead of +#: [0,dim). Flag for :py:obj:`~.cuTexRefSetFlags()` and +#: :py:obj:`~.cuTexObjectCreate()` +CU_TRSF_NORMALIZED_COORDINATES = cydriver.CU_TRSF_NORMALIZED_COORDINATES + +#: Perform sRGB->linear conversion during texture read. Flag for +#: :py:obj:`~.cuTexRefSetFlags()` and :py:obj:`~.cuTexObjectCreate()` +CU_TRSF_SRGB = cydriver.CU_TRSF_SRGB + +#: Disable any trilinear filtering optimizations. Flag for +#: :py:obj:`~.cuTexRefSetFlags()` and :py:obj:`~.cuTexObjectCreate()` +CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = cydriver.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION + +#: Enable seamless cube map filtering. Flag for +#: :py:obj:`~.cuTexObjectCreate()` +CU_TRSF_SEAMLESS_CUBEMAP = cydriver.CU_TRSF_SEAMLESS_CUBEMAP + +#: Launch with the required block dimension. +CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = cydriver.CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM + +#: C++ compile time constant for CU_LAUNCH_PARAM_END +CU_LAUNCH_PARAM_END_AS_INT = cydriver.CU_LAUNCH_PARAM_END_AS_INT + +#: End of array terminator for the `extra` parameter to +#: :py:obj:`~.cuLaunchKernel` +CU_LAUNCH_PARAM_END = cydriver.CU_LAUNCH_PARAM_END + +#: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_POINTER +CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = cydriver.CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT + +#: Indicator that the next value in the `extra` parameter to +#: :py:obj:`~.cuLaunchKernel` will be a pointer to a buffer containing all +#: kernel parameters used for launching kernel `f`. This buffer needs to +#: honor all alignment/padding requirements of the individual parameters. +#: If :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not also specified in the +#: `extra` array, then :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` will have +#: no effect. +CU_LAUNCH_PARAM_BUFFER_POINTER = cydriver.CU_LAUNCH_PARAM_BUFFER_POINTER + +#: C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_SIZE +CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = cydriver.CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT + +#: Indicator that the next value in the `extra` parameter to +#: :py:obj:`~.cuLaunchKernel` will be a pointer to a size_t which contains +#: the size of the buffer specified with +#: :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`. It is required that +#: :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER` also be specified in the +#: `extra` array if the value associated with +#: :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE` is not zero. +CU_LAUNCH_PARAM_BUFFER_SIZE = cydriver.CU_LAUNCH_PARAM_BUFFER_SIZE + +#: For texture references loaded into the module, use default texunit from +#: texture reference. +CU_PARAM_TR_DEFAULT = cydriver.CU_PARAM_TR_DEFAULT + +#: Device that represents the CPU +CU_DEVICE_CPU = cydriver.CU_DEVICE_CPU + +#: Device that represents an invalid device +CU_DEVICE_INVALID = cydriver.CU_DEVICE_INVALID + +RESOURCE_ABI_VERSION = cydriver.RESOURCE_ABI_VERSION + +RESOURCE_ABI_EXTERNAL_BYTES = cydriver.RESOURCE_ABI_EXTERNAL_BYTES + +#: Maximum number of planes per frame +MAX_PLANES = cydriver.MAX_PLANES + +#: Indicates that timeout for :py:obj:`~.cuEGLStreamConsumerAcquireFrame` +#: is infinite. +CUDA_EGL_INFINITE_TIMEOUT = cydriver.CUDA_EGL_INFINITE_TIMEOUT + +class CUipcMem_flags(IntEnum): + """ + CUDA Ipc Mem Flags + """ + + #: Automatically enable peer access between remote devices as needed + CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = cydriver.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS + +_dict_CUipcMem_flags = dict(((int(v), v) for k, v in CUipcMem_flags.__members__.items())) + +class CUmemAttach_flags(IntEnum): + """ + CUDA Mem Attach Flags + """ + + #: Memory can be accessed by any stream on any device + CU_MEM_ATTACH_GLOBAL = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_GLOBAL + + #: Memory cannot be accessed by any stream on any device + CU_MEM_ATTACH_HOST = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_HOST + + #: Memory can only be accessed by a single stream on the associated + #: device + CU_MEM_ATTACH_SINGLE = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE + +_dict_CUmemAttach_flags = dict(((int(v), v) for k, v in CUmemAttach_flags.__members__.items())) + +class CUctx_flags(IntEnum): + """ + Context creation flags + """ + + #: Automatic scheduling + CU_CTX_SCHED_AUTO = cydriver.CUctx_flags_enum.CU_CTX_SCHED_AUTO + + #: Set spin as default scheduling + CU_CTX_SCHED_SPIN = cydriver.CUctx_flags_enum.CU_CTX_SCHED_SPIN + + #: Set yield as default scheduling + CU_CTX_SCHED_YIELD = cydriver.CUctx_flags_enum.CU_CTX_SCHED_YIELD + + #: Set blocking synchronization as default scheduling + CU_CTX_SCHED_BLOCKING_SYNC = cydriver.CUctx_flags_enum.CU_CTX_SCHED_BLOCKING_SYNC + + #: Set blocking synchronization as default scheduling [Deprecated] + CU_CTX_BLOCKING_SYNC = cydriver.CUctx_flags_enum.CU_CTX_BLOCKING_SYNC + CU_CTX_SCHED_MASK = cydriver.CUctx_flags_enum.CU_CTX_SCHED_MASK + + #: [Deprecated] + CU_CTX_MAP_HOST = cydriver.CUctx_flags_enum.CU_CTX_MAP_HOST + + #: Keep local memory allocation after launch + CU_CTX_LMEM_RESIZE_TO_MAX = cydriver.CUctx_flags_enum.CU_CTX_LMEM_RESIZE_TO_MAX + + #: Trigger coredumps from exceptions in this context + CU_CTX_COREDUMP_ENABLE = cydriver.CUctx_flags_enum.CU_CTX_COREDUMP_ENABLE + + #: Enable user pipe to trigger coredumps in this context + CU_CTX_USER_COREDUMP_ENABLE = cydriver.CUctx_flags_enum.CU_CTX_USER_COREDUMP_ENABLE + + #: Ensure synchronous memory operations on this context will + #: synchronize + CU_CTX_SYNC_MEMOPS = cydriver.CUctx_flags_enum.CU_CTX_SYNC_MEMOPS + CU_CTX_FLAGS_MASK = cydriver.CUctx_flags_enum.CU_CTX_FLAGS_MASK + +_dict_CUctx_flags = dict(((int(v), v) for k, v in CUctx_flags.__members__.items())) + +class CUevent_sched_flags(IntEnum): + """ + Event sched flags + """ + + #: Automatic scheduling + CU_EVENT_SCHED_AUTO = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_AUTO + + #: Set spin as default scheduling + CU_EVENT_SCHED_SPIN = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_SPIN + + #: Set yield as default scheduling + CU_EVENT_SCHED_YIELD = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_YIELD + + #: Set blocking synchronization as default scheduling + CU_EVENT_SCHED_BLOCKING_SYNC = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC + +_dict_CUevent_sched_flags = dict(((int(v), v) for k, v in CUevent_sched_flags.__members__.items())) + +class cl_event_flags(IntEnum): + """ + NVCL event scheduling flags + """ + + #: Automatic scheduling + NVCL_EVENT_SCHED_AUTO = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_AUTO + + #: Set spin as default scheduling + NVCL_EVENT_SCHED_SPIN = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_SPIN + + #: Set yield as default scheduling + NVCL_EVENT_SCHED_YIELD = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_YIELD + + #: Set blocking synchronization as default scheduling + NVCL_EVENT_SCHED_BLOCKING_SYNC = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC + +_dict_cl_event_flags = dict(((int(v), v) for k, v in cl_event_flags.__members__.items())) + +class cl_context_flags(IntEnum): + """ + NVCL context scheduling flags + """ + + #: Automatic scheduling + NVCL_CTX_SCHED_AUTO = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_AUTO + + #: Set spin as default scheduling + NVCL_CTX_SCHED_SPIN = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_SPIN + + #: Set yield as default scheduling + NVCL_CTX_SCHED_YIELD = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_YIELD + + #: Set blocking synchronization as default scheduling + NVCL_CTX_SCHED_BLOCKING_SYNC = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC + +_dict_cl_context_flags = dict(((int(v), v) for k, v in cl_context_flags.__members__.items())) + +class CUstream_flags(IntEnum): + """ + Stream creation flags + """ + + #: Default stream flag + CU_STREAM_DEFAULT = cydriver.CUstream_flags_enum.CU_STREAM_DEFAULT + + #: Stream does not synchronize with stream 0 (the NULL stream) + CU_STREAM_NON_BLOCKING = cydriver.CUstream_flags_enum.CU_STREAM_NON_BLOCKING + +_dict_CUstream_flags = dict(((int(v), v) for k, v in CUstream_flags.__members__.items())) + +class CUevent_flags(IntEnum): + """ + Event creation flags + """ + + #: Default event flag + CU_EVENT_DEFAULT = cydriver.CUevent_flags_enum.CU_EVENT_DEFAULT + + #: Event uses blocking synchronization + CU_EVENT_BLOCKING_SYNC = cydriver.CUevent_flags_enum.CU_EVENT_BLOCKING_SYNC + + #: Event will not record timing data + CU_EVENT_DISABLE_TIMING = cydriver.CUevent_flags_enum.CU_EVENT_DISABLE_TIMING + + #: Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must + #: be set + CU_EVENT_INTERPROCESS = cydriver.CUevent_flags_enum.CU_EVENT_INTERPROCESS + +_dict_CUevent_flags = dict(((int(v), v) for k, v in CUevent_flags.__members__.items())) + +class CUevent_record_flags(IntEnum): + """ + Event record flags + """ + + #: Default event record flag + CU_EVENT_RECORD_DEFAULT = cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_DEFAULT + + #: When using stream capture, create an event record node instead of + #: the default behavior. This flag is invalid when used outside of + #: capture. + CU_EVENT_RECORD_EXTERNAL = cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL + +_dict_CUevent_record_flags = dict(((int(v), v) for k, v in CUevent_record_flags.__members__.items())) + +class CUevent_wait_flags(IntEnum): + """ + Event wait flags + """ + + #: Default event wait flag + CU_EVENT_WAIT_DEFAULT = cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_DEFAULT + + #: When using stream capture, create an event wait node instead of the + #: default behavior. This flag is invalid when used outside of capture. + CU_EVENT_WAIT_EXTERNAL = cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL + +_dict_CUevent_wait_flags = dict(((int(v), v) for k, v in CUevent_wait_flags.__members__.items())) + +class CUstreamWaitValue_flags(IntEnum): + """ + Flags for :py:obj:`~.cuStreamWaitValue32` and + :py:obj:`~.cuStreamWaitValue64` + """ + + #: Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit + #: values). Note this is a cyclic comparison which ignores wraparound. + #: (Default behavior.) + CU_STREAM_WAIT_VALUE_GEQ = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_GEQ + + #: Wait until *addr == value. + CU_STREAM_WAIT_VALUE_EQ = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_EQ + + #: Wait until (*addr & value) != 0. + CU_STREAM_WAIT_VALUE_AND = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_AND + + #: Wait until ~(*addr | value) != 0. Support for this operation can be + #: queried with :py:obj:`~.cuDeviceGetAttribute()` and + #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`. + CU_STREAM_WAIT_VALUE_NOR = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_NOR + + #: Follow the wait operation with a flush of outstanding remote writes. + #: This means that, if a remote write operation is guaranteed to have + #: reached the device before the wait can be satisfied, that write is + #: guaranteed to be visible to downstream device work. The device is + #: permitted to reorder remote writes internally. For example, this + #: flag would be required if two remote writes arrive in a defined + #: order, the wait is satisfied by the second write, and downstream + #: work needs to observe the first write. Support for this operation is + #: restricted to selected platforms and can be queried with + #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES`. + CU_STREAM_WAIT_VALUE_FLUSH = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH + +_dict_CUstreamWaitValue_flags = dict(((int(v), v) for k, v in CUstreamWaitValue_flags.__members__.items())) + +class CUstreamWriteValue_flags(IntEnum): + """ + Flags for :py:obj:`~.cuStreamWriteValue32` + """ + + #: Default behavior + CU_STREAM_WRITE_VALUE_DEFAULT = cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_DEFAULT + + #: Permits the write to be reordered with writes which were issued + #: before it, as a performance optimization. Normally, + #: :py:obj:`~.cuStreamWriteValue32` will provide a memory fence before + #: the write, which has similar semantics to __threadfence_system() but + #: is scoped to the stream rather than a CUDA thread. This flag is not + #: supported in the v2 API. + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER + +_dict_CUstreamWriteValue_flags = dict(((int(v), v) for k, v in CUstreamWriteValue_flags.__members__.items())) + +class CUstreamBatchMemOpType(IntEnum): + """ + Operations for :py:obj:`~.cuStreamBatchMemOp` + """ + + #: Represents a :py:obj:`~.cuStreamWaitValue32` operation + CU_STREAM_MEM_OP_WAIT_VALUE_32 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_32 + + #: Represents a :py:obj:`~.cuStreamWriteValue32` operation + CU_STREAM_MEM_OP_WRITE_VALUE_32 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_32 + + #: This has the same effect as :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH`, + #: but as a standalone operation. + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES + + #: Represents a :py:obj:`~.cuStreamWaitValue64` operation + CU_STREAM_MEM_OP_WAIT_VALUE_64 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_64 + + #: Represents a :py:obj:`~.cuStreamWriteValue64` operation + CU_STREAM_MEM_OP_WRITE_VALUE_64 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_64 + + #: Insert a memory barrier of the specified type + CU_STREAM_MEM_OP_BARRIER = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_BARRIER + +_dict_CUstreamBatchMemOpType = dict(((int(v), v) for k, v in CUstreamBatchMemOpType.__members__.items())) + +class CUstreamMemoryBarrier_flags(IntEnum): + """ + Flags for :py:obj:`~.CUstreamBatchMemOpParams`::memoryBarrier + """ + + #: System-wide memory barrier. + CU_STREAM_MEMORY_BARRIER_TYPE_SYS = cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_SYS + + #: Limit memory barrier scope to the GPU. + CU_STREAM_MEMORY_BARRIER_TYPE_GPU = cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU + +_dict_CUstreamMemoryBarrier_flags = dict(((int(v), v) for k, v in CUstreamMemoryBarrier_flags.__members__.items())) + +class CUoccupancy_flags(IntEnum): + """ + Occupancy calculator flag + """ + + #: Default behavior + CU_OCCUPANCY_DEFAULT = cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DEFAULT + + #: Assume global caching is enabled and cannot be automatically turned + #: off + CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE + +_dict_CUoccupancy_flags = dict(((int(v), v) for k, v in CUoccupancy_flags.__members__.items())) + +class CUstreamUpdateCaptureDependencies_flags(IntEnum): + """ + Flags for :py:obj:`~.cuStreamUpdateCaptureDependencies` + """ + + #: Add new nodes to the dependency set + CU_STREAM_ADD_CAPTURE_DEPENDENCIES = cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_ADD_CAPTURE_DEPENDENCIES + + #: Replace the dependency set with the new nodes + CU_STREAM_SET_CAPTURE_DEPENDENCIES = cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES + +_dict_CUstreamUpdateCaptureDependencies_flags = dict(((int(v), v) for k, v in CUstreamUpdateCaptureDependencies_flags.__members__.items())) + +class CUasyncNotificationType(IntEnum): + """ + Types of async notification that can be sent + """ + + #: Sent when the process has exceeded its device memory budget + CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET = cydriver.CUasyncNotificationType_enum.CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET + +_dict_CUasyncNotificationType = dict(((int(v), v) for k, v in CUasyncNotificationType.__members__.items())) + +class CUarray_format(IntEnum): + """ + Array formats + """ + + #: Unsigned 8-bit integers + CU_AD_FORMAT_UNSIGNED_INT8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8 + + #: Unsigned 16-bit integers + CU_AD_FORMAT_UNSIGNED_INT16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16 + + #: Unsigned 32-bit integers + CU_AD_FORMAT_UNSIGNED_INT32 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32 + + #: Signed 8-bit integers + CU_AD_FORMAT_SIGNED_INT8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 + + #: Signed 16-bit integers + CU_AD_FORMAT_SIGNED_INT16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16 + + #: Signed 32-bit integers + CU_AD_FORMAT_SIGNED_INT32 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32 + + #: 16-bit floating point + CU_AD_FORMAT_HALF = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF + + #: 32-bit floating point + CU_AD_FORMAT_FLOAT = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT + + #: 4 channel unorm R10G10B10A2 RGB format + CU_AD_FORMAT_UNORM_INT_101010_2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 + + #: 4 channel unsigned normalized block-compressed (BC1 compression) + #: format + CU_AD_FORMAT_BC1_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM + + #: 4 channel unsigned normalized block-compressed (BC1 compression) + #: format with sRGB encoding + CU_AD_FORMAT_BC1_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB + + #: 4 channel unsigned normalized block-compressed (BC2 compression) + #: format + CU_AD_FORMAT_BC2_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM + + #: 4 channel unsigned normalized block-compressed (BC2 compression) + #: format with sRGB encoding + CU_AD_FORMAT_BC2_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB + + #: 4 channel unsigned normalized block-compressed (BC3 compression) + #: format + CU_AD_FORMAT_BC3_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM + + #: 4 channel unsigned normalized block-compressed (BC3 compression) + #: format with sRGB encoding + CU_AD_FORMAT_BC3_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB + + #: 1 channel unsigned normalized block-compressed (BC4 compression) + #: format + CU_AD_FORMAT_BC4_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM + + #: 1 channel signed normalized block-compressed (BC4 compression) + #: format + CU_AD_FORMAT_BC4_SNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM + + #: 2 channel unsigned normalized block-compressed (BC5 compression) + #: format + CU_AD_FORMAT_BC5_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM + + #: 2 channel signed normalized block-compressed (BC5 compression) + #: format + CU_AD_FORMAT_BC5_SNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM + + #: 3 channel unsigned half-float block-compressed (BC6H compression) + #: format + CU_AD_FORMAT_BC6H_UF16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16 + + #: 3 channel signed half-float block-compressed (BC6H compression) + #: format + CU_AD_FORMAT_BC6H_SF16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16 + + #: 4 channel unsigned normalized block-compressed (BC7 compression) + #: format + CU_AD_FORMAT_BC7_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM + + #: 4 channel unsigned normalized block-compressed (BC7 compression) + #: format with sRGB encoding + CU_AD_FORMAT_BC7_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + + #: 10-bit YUV planar format, with 4:2:0 sampling + CU_AD_FORMAT_P010 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P010 + + #: 16-bit YUV planar format, with 4:2:0 sampling + CU_AD_FORMAT_P016 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P016 + + #: 8-bit YUV planar format, with 4:2:2 sampling + CU_AD_FORMAT_NV16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV16 + + #: 10-bit YUV planar format, with 4:2:2 sampling + CU_AD_FORMAT_P210 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P210 + + #: 16-bit YUV planar format, with 4:2:2 sampling + CU_AD_FORMAT_P216 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P216 + + #: 2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling + CU_AD_FORMAT_YUY2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUY2 + + #: 2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling + CU_AD_FORMAT_Y210 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y210 + + #: 2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling + CU_AD_FORMAT_Y216 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y216 + + #: 4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling + CU_AD_FORMAT_AYUV = cydriver.CUarray_format_enum.CU_AD_FORMAT_AYUV + + #: 10-bit YUV packed planar format, with 4:4:4 sampling + CU_AD_FORMAT_Y410 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y410 + + #: 8-bit YUV planar format, with 4:2:0 sampling + CU_AD_FORMAT_NV12 = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12 + + #: 4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling + CU_AD_FORMAT_Y416 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y416 + + #: 3 channel 8-bit YUV planar format, with 4:4:4 sampling + CU_AD_FORMAT_Y444_PLANAR8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR8 + + #: 3 channel 10-bit YUV planar format, with 4:4:4 sampling + CU_AD_FORMAT_Y444_PLANAR10 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR10 + + #: 3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling + CU_AD_FORMAT_YUV444_8bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_8bit_SemiPlanar + + #: 3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling + CU_AD_FORMAT_YUV444_16bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_16bit_SemiPlanar + + #: 1 channel unsigned 8-bit normalized integer + CU_AD_FORMAT_UNORM_INT8X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X1 + + #: 2 channel unsigned 8-bit normalized integer + CU_AD_FORMAT_UNORM_INT8X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X2 + + #: 4 channel unsigned 8-bit normalized integer + CU_AD_FORMAT_UNORM_INT8X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X4 + + #: 1 channel unsigned 16-bit normalized integer + CU_AD_FORMAT_UNORM_INT16X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X1 + + #: 2 channel unsigned 16-bit normalized integer + CU_AD_FORMAT_UNORM_INT16X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X2 + + #: 4 channel unsigned 16-bit normalized integer + CU_AD_FORMAT_UNORM_INT16X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X4 + + #: 1 channel signed 8-bit normalized integer + CU_AD_FORMAT_SNORM_INT8X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X1 + + #: 2 channel signed 8-bit normalized integer + CU_AD_FORMAT_SNORM_INT8X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X2 + + #: 4 channel signed 8-bit normalized integer + CU_AD_FORMAT_SNORM_INT8X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X4 + + #: 1 channel signed 16-bit normalized integer + CU_AD_FORMAT_SNORM_INT16X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X1 + + #: 2 channel signed 16-bit normalized integer + CU_AD_FORMAT_SNORM_INT16X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X2 + + #: 4 channel signed 16-bit normalized integer + CU_AD_FORMAT_SNORM_INT16X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X4 + CU_AD_FORMAT_MAX = cydriver.CUarray_format_enum.CU_AD_FORMAT_MAX + +_dict_CUarray_format = dict(((int(v), v) for k, v in CUarray_format.__members__.items())) + +class CUaddress_mode(IntEnum): + """ + Texture reference addressing modes + """ + + #: Wrapping address mode + CU_TR_ADDRESS_MODE_WRAP = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_WRAP + + #: Clamp to edge address mode + CU_TR_ADDRESS_MODE_CLAMP = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_CLAMP + + #: Mirror address mode + CU_TR_ADDRESS_MODE_MIRROR = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_MIRROR + + #: Border address mode + CU_TR_ADDRESS_MODE_BORDER = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER + +_dict_CUaddress_mode = dict(((int(v), v) for k, v in CUaddress_mode.__members__.items())) + +class CUfilter_mode(IntEnum): + """ + Texture reference filtering modes + """ + + #: Point filter mode + CU_TR_FILTER_MODE_POINT = cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_POINT + + #: Linear filter mode + CU_TR_FILTER_MODE_LINEAR = cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR + +_dict_CUfilter_mode = dict(((int(v), v) for k, v in CUfilter_mode.__members__.items())) + +class CUdevice_attribute(IntEnum): + """ + Device properties + """ + + #: Maximum number of threads per block + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK + + #: Maximum block dimension X + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X + + #: Maximum block dimension Y + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y + + #: Maximum block dimension Z + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z + + #: Maximum grid dimension X + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X + + #: Maximum grid dimension Y + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y + + #: Maximum grid dimension Z + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z + + #: Maximum shared memory available per block in bytes + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK + + #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK + CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK + + #: Memory available on device for constant variables in a CUDA C kernel + #: in bytes + CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY + + #: Warp size in threads + CU_DEVICE_ATTRIBUTE_WARP_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_WARP_SIZE + + #: Maximum pitch in bytes allowed by memory copies + CU_DEVICE_ATTRIBUTE_MAX_PITCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PITCH + + #: Maximum number of 32-bit registers available per block + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK + + #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK + CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK + + #: Typical clock frequency in kilohertz + CU_DEVICE_ATTRIBUTE_CLOCK_RATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLOCK_RATE + + #: Alignment requirement for textures + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT + + #: Device can possibly copy memory and execute a kernel concurrently. + #: Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT. + CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP + + #: Number of multiprocessors on device + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT + + #: Specifies whether there is a run time limit on kernels + CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT + + #: Device is integrated with host memory + CU_DEVICE_ATTRIBUTE_INTEGRATED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_INTEGRATED + + #: Device can map host memory into CUDA address space + CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY + + #: Compute mode (See :py:obj:`~.CUcomputemode` for details) + CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE + + #: Maximum 1D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH + + #: Maximum 2D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH + + #: Maximum 2D texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT + + #: Maximum 3D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH + + #: Maximum 3D texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT + + #: Maximum 3D texture depth + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH + + #: Maximum 2D layered texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH + + #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH + + #: Maximum 2D layered texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT + + #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT + + #: Maximum layers in a 2D layered texture + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS + + #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES + + #: Alignment requirement for surfaces + CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT + + #: Device can possibly execute multiple kernels concurrently + CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS + + #: Device has ECC support enabled + CU_DEVICE_ATTRIBUTE_ECC_ENABLED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ECC_ENABLED + + #: PCI bus ID of the device + CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID + + #: PCI device ID of the device + CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID + + #: Device is using TCC driver model + CU_DEVICE_ATTRIBUTE_TCC_DRIVER = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TCC_DRIVER + + #: Peak memory clock frequency in kilohertz + CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE + + #: Global memory bus width in bits + CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH + + #: Size of L2 cache in bytes + CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE + + #: Maximum resident threads per multiprocessor + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR + + #: Number of asynchronous engines + CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT + + #: Device shares a unified address space with the host + CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING + + #: Maximum 1D layered texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH + + #: Maximum layers in a 1D layered texture + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS + + #: Deprecated, do not use. + CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER + + #: Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH + + #: Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT + + #: Alternate maximum 3D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE + + #: Alternate maximum 3D texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE + + #: Alternate maximum 3D texture depth + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE + + #: PCI domain ID of the device + CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID + + #: Pitch alignment requirement for textures + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT + + #: Maximum cubemap texture width/height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH + + #: Maximum cubemap layered texture width/height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH + + #: Maximum layers in a cubemap layered texture + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS + + #: Maximum 1D surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH + + #: Maximum 2D surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH + + #: Maximum 2D surface height + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT + + #: Maximum 3D surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH + + #: Maximum 3D surface height + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT + + #: Maximum 3D surface depth + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH + + #: Maximum 1D layered surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH + + #: Maximum layers in a 1D layered surface + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS + + #: Maximum 2D layered surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH + + #: Maximum 2D layered surface height + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT + + #: Maximum layers in a 2D layered surface + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS + + #: Maximum cubemap surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH + + #: Maximum cubemap layered surface width + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH + + #: Maximum layers in a cubemap layered surface + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS + + #: Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() + #: or :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth()` instead. + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH + + #: Maximum 2D linear texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH + + #: Maximum 2D linear texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT + + #: Maximum 2D linear texture pitch in bytes + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH + + #: Maximum mipmapped 2D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH + + #: Maximum mipmapped 2D texture height + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT + + #: Major compute capability version number + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR + + #: Minor compute capability version number + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR + + #: Maximum mipmapped 1D texture width + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH + + #: Device supports stream priorities + CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED + + #: Device supports caching globals in L1 + CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED + + #: Device supports caching locals in L1 + CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED + + #: Maximum shared memory available per multiprocessor in bytes + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR + + #: Maximum number of 32-bit registers available per multiprocessor + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR + + #: Device can allocate managed memory on this system + CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY + + #: Device is on a multi-GPU board + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD + + #: Unique id for a group of devices on the same multi-GPU board + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID + + #: Link between the device and the host supports native atomic + #: operations + CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED + + #: Ratio of single precision performance (in floating-point operations + #: per second) to double precision performance + CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO + + #: Device supports coherently accessing pageable memory without calling + #: cudaHostRegister on it + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS + + #: Device can coherently access managed memory concurrently with the + #: CPU + CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS + + #: Device supports compute preemption. + CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED + + #: Device can access host registered memory at the same virtual address + #: as the CPU + CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM + + #: Deprecated, along with v1 MemOps API, :py:obj:`~.cuStreamBatchMemOp` + #: and related APIs are supported. + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 + + #: Deprecated, along with v1 MemOps API, 64-bit operations are + #: supported in :py:obj:`~.cuStreamBatchMemOp` and related APIs. + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 + + #: Deprecated, along with v1 MemOps API, + #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported. + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 + + #: Device supports launching cooperative kernels via + #: :py:obj:`~.cuLaunchCooperativeKernel` + CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH + + #: Deprecated, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` is + #: deprecated. + CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH + + #: Maximum optin shared memory per block + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN + + #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the + #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported + #: on the device. See :py:obj:`~.Stream Memory Operations` for + #: additional details. + CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES + + #: Device supports host memory registration via + #: :py:obj:`~.cudaHostRegister`. + CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED + + #: Device accesses pageable memory via the host's page tables. + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES + + #: The host can directly access managed memory on the device without + #: migration. + CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST + + #: Deprecated, Use + #: CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED + + #: Device supports virtual memory management APIs like + #: :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`, + #: :py:obj:`~.cuMemMap` and related APIs + CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + + #: Device supports exporting memory to a posix file descriptor with + #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via + #: :py:obj:`~.cuMemCreate` + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED + + #: Device supports exporting memory to a Win32 NT handle with + #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via + #: :py:obj:`~.cuMemCreate` + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED + + #: Device supports exporting memory to a Win32 KMT handle with + #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via + #: :py:obj:`~.cuMemCreate` + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED + + #: Maximum number of blocks per multiprocessor + CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR + + #: Device supports compression of memory + CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED + + #: Maximum L2 persisting lines capacity setting in bytes. + CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE + + #: Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`. + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE + + #: Device supports specifying the GPUDirect RDMA flag with + #: :py:obj:`~.cuMemCreate` + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED + + #: Shared memory reserved by CUDA driver per block in bytes + CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK + + #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays + CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED + + #: Device supports using the :py:obj:`~.cuMemHostRegister` flag + #: :py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that + #: must be mapped as read-only to the GPU + CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED + + #: External timeline semaphore interop is supported on the device + CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED + + #: Device supports using the :py:obj:`~.cuMemAllocAsync` and + #: :py:obj:`~.cuMemPool` family of APIs + CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED + + #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see + #: https://docs.nvidia.com/cuda/gpudirect-rdma for more information) + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED + + #: The returned attribute shall be interpreted as a bitmask, where the + #: individual bits are described by the + #: :py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS + + #: GPUDirect RDMA writes to the device do not need to be flushed for + #: consumers within the scope indicated by the returned attribute. See + #: :py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values + #: returned here. + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING + + #: Handle types supported with mempool based IPC + CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES + + #: Indicates device supports cluster launch + CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH + + #: Device supports deferred mapping CUDA arrays and CUDA mipmapped + #: arrays + CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED + + #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp` + #: and related MemOp APIs. + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS + + #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported by MemOp APIs. + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR + + #: Device supports buffer sharing with dma_buf mechanism. + CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED + + #: Device supports IPC Events. + CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED + + #: Number of memory domains the device supports. + CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT + + #: Device supports accessing memory using Tensor Map. + CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED + + #: Device supports exporting memory to a fabric handle with + #: :py:obj:`~.cuMemExportToShareableHandle()` or requested with + #: :py:obj:`~.cuMemCreate()` + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED + + #: Device supports unified function pointers. + CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS + + #: NUMA configuration of a device: value is of type + #: :py:obj:`~.CUdeviceNumaConfig` enum + CU_DEVICE_ATTRIBUTE_NUMA_CONFIG = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_CONFIG + + #: NUMA node ID of the GPU memory + CU_DEVICE_ATTRIBUTE_NUMA_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_ID + + #: Device supports switch multicast and reduction operations. + CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED + + #: Indicates if contexts created on this device will be shared via MPS + CU_DEVICE_ATTRIBUTE_MPS_ENABLED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MPS_ENABLED + + #: NUMA ID of the host node closest to the device. Returns -1 when + #: system does not support NUMA. + CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID + + #: Device supports CIG with D3D12. + CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED + + #: The returned valued shall be interpreted as a bitmask, where the + #: individual bits are described by the + #: :py:obj:`~.CUmemDecompressAlgorithm` enum. + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK + + #: The returned valued is the maximum length in bytes of a single + #: decompress operation that is allowed. + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH + + #: Device supports CIG with Vulkan. + CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED + + #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID + + #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor + #: ID. + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID + + #: Device supports HOST_NUMA location with the virtual memory + #: management APIs like :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` + #: and related APIs + CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED + + #: Device supports HOST_NUMA location with the + #: :py:obj:`~.cuMemAllocAsync` and :py:obj:`~.cuMemPool` family of APIs + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED + + #: Device supports HOST_NUMA location IPC between nodes in a multi-node + #: system. + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED + CU_DEVICE_ATTRIBUTE_MAX = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX + +_dict_CUdevice_attribute = dict(((int(v), v) for k, v in CUdevice_attribute.__members__.items())) + +class CUpointer_attribute(IntEnum): + """ + Pointer information + """ + + #: The :py:obj:`~.CUcontext` on which a pointer was allocated or + #: registered + CU_POINTER_ATTRIBUTE_CONTEXT = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT + + #: The :py:obj:`~.CUmemorytype` describing the physical location of a + #: pointer + CU_POINTER_ATTRIBUTE_MEMORY_TYPE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE + + #: The address at which a pointer's memory may be accessed on the + #: device + CU_POINTER_ATTRIBUTE_DEVICE_POINTER = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER + + #: The address at which a pointer's memory may be accessed on the host + CU_POINTER_ATTRIBUTE_HOST_POINTER = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER + + #: A pair of tokens for use with the nv-p2p.h Linux kernel interface + CU_POINTER_ATTRIBUTE_P2P_TOKENS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS + + #: Synchronize every synchronous memory operation initiated on this + #: region + CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS + + #: A process-wide unique ID for an allocated memory region + CU_POINTER_ATTRIBUTE_BUFFER_ID = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID + + #: Indicates if the pointer points to managed memory + CU_POINTER_ATTRIBUTE_IS_MANAGED = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED + + #: A device ordinal of a device on which a pointer was allocated or + #: registered + CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL + + #: 1 if this pointer maps to an allocation that is suitable for + #: :py:obj:`~.cudaIpcGetMemHandle`, 0 otherwise + CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE + + #: Starting address for this requested pointer + CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR + + #: Size of the address range for this requested pointer + CU_POINTER_ATTRIBUTE_RANGE_SIZE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE + + #: 1 if this pointer is in a valid address range that is mapped to a + #: backing allocation, 0 otherwise + CU_POINTER_ATTRIBUTE_MAPPED = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED + + #: Bitmask of allowed :py:obj:`~.CUmemAllocationHandleType` for this + #: allocation + CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES + + #: 1 if the memory this pointer is referencing can be used with the + #: GPUDirect RDMA API + CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE + + #: Returns the access flags the device associated with the current + #: context has on the corresponding memory referenced by the pointer + #: given + CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS + + #: Returns the mempool handle for the allocation if it was allocated + #: from a mempool. Otherwise returns NULL. + CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE + + #: Size of the actual underlying mapping that the pointer belongs to + CU_POINTER_ATTRIBUTE_MAPPING_SIZE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE + + #: The start address of the mapping that the pointer belongs to + CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR + + #: A process-wide unique id corresponding to the physical allocation + #: the pointer belongs to + CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID + + #: Returns in `*data` a boolean that indicates whether the pointer + #: points to memory that is capable to be used for hardware accelerated + #: decompression. + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE + +_dict_CUpointer_attribute = dict(((int(v), v) for k, v in CUpointer_attribute.__members__.items())) + +class CUfunction_attribute(IntEnum): + """ + Function properties + """ + + #: The maximum number of threads per block, beyond which a launch of + #: the function would fail. This number depends on both the function + #: and the device on which the function is currently loaded. + CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK + + #: The size in bytes of statically-allocated shared memory required by + #: this function. This does not include dynamically-allocated shared + #: memory requested by the user at runtime. + CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES + + #: The size in bytes of user-allocated constant memory required by this + #: function. + CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES + + #: The size in bytes of local memory used by each thread of this + #: function. + CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES + + #: The number of registers used by each thread of this function. + CU_FUNC_ATTRIBUTE_NUM_REGS = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NUM_REGS + + #: The PTX virtual architecture version for which the function was + #: compiled. This value is the major PTX version * 10 + the minor PTX + #: version, so a PTX version 1.3 function would return the value 13. + #: Note that this may return the undefined value of 0 for cubins + #: compiled prior to CUDA 3.0. + CU_FUNC_ATTRIBUTE_PTX_VERSION = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PTX_VERSION + + #: The binary architecture version for which the function was compiled. + #: This value is the major binary version * 10 + the minor binary + #: version, so a binary version 1.3 function would return the value 13. + #: Note that this will return a value of 10 for legacy cubins that do + #: not have a properly-encoded binary architecture version. + CU_FUNC_ATTRIBUTE_BINARY_VERSION = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_BINARY_VERSION + + #: The attribute to indicate whether the function has been compiled + #: with user specified option "-Xptxas --dlcm=ca" set . + CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CACHE_MODE_CA + + #: The maximum size in bytes of dynamically-allocated shared memory + #: that can be used by this function. If the user-specified dynamic + #: shared memory size is larger than this value, the launch will fail. + #: See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES + + #: On devices where the L1 cache and shared memory use the same + #: hardware resources, this sets the shared memory carveout preference, + #: in percent of the total shared memory. Refer to + #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. + #: This is only a hint, and the driver can choose a different ratio if + #: required to execute the function. See + #: :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + + #: If this attribute is set, the kernel must launch with a valid + #: cluster size specified. See :py:obj:`~.cuFuncSetAttribute`, + #: :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET + + #: The required cluster width in blocks. The values must either all be + #: 0 or all be positive. The validity of the cluster dimensions is + #: otherwise checked at launch time. + #: + #: If the value is set during compile time, it cannot be set at + #: runtime. Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. + #: See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH + + #: The required cluster height in blocks. The values must either all be + #: 0 or all be positive. The validity of the cluster dimensions is + #: otherwise checked at launch time. + #: + #: If the value is set during compile time, it cannot be set at + #: runtime. Setting it at runtime should return + #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, + #: :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT + + #: The required cluster depth in blocks. The values must either all be + #: 0 or all be positive. The validity of the cluster dimensions is + #: otherwise checked at launch time. + #: + #: If the value is set during compile time, it cannot be set at + #: runtime. Setting it at runtime should return + #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, + #: :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH + + #: Whether the function can be launched with non-portable cluster size. + #: 1 is allowed, 0 is disallowed. A non-portable cluster size may only + #: function on the specific SKUs the program is tested on. The launch + #: might fail if the program is run on a different hardware platform. + #: + #: CUDA API provides cudaOccupancyMaxActiveClusters to assist with + #: checking whether the desired size can be launched on the current + #: device. + #: + #: Portable Cluster Size + #: + #: A portable cluster size is guaranteed to be functional on all + #: compute capabilities higher than the target compute capability. The + #: portable cluster size for sm_90 is 8 blocks per cluster. This value + #: may increase for future compute capabilities. + #: + #: The specific hardware unit may support higher cluster sizes that’s + #: not guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`, + #: :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED + + #: The block scheduling policy of a function. The value type is + #: CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See + #: :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + CU_FUNC_ATTRIBUTE_MAX = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX + +_dict_CUfunction_attribute = dict(((int(v), v) for k, v in CUfunction_attribute.__members__.items())) + +class CUfunc_cache(IntEnum): + """ + Function cache configurations + """ + + #: no preference for shared memory or L1 (default) + CU_FUNC_CACHE_PREFER_NONE = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_NONE + + #: prefer larger shared memory and smaller L1 cache + CU_FUNC_CACHE_PREFER_SHARED = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_SHARED + + #: prefer larger L1 cache and smaller shared memory + CU_FUNC_CACHE_PREFER_L1 = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_L1 + + #: prefer equal sized L1 cache and shared memory + CU_FUNC_CACHE_PREFER_EQUAL = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL + +_dict_CUfunc_cache = dict(((int(v), v) for k, v in CUfunc_cache.__members__.items())) + +class CUsharedconfig(IntEnum): + """ + [Deprecated] Shared memory configurations + """ + + #: set default shared memory bank size + CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE + + #: set shared memory bank width to four bytes + CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE + + #: set shared memory bank width to eight bytes + CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE + +_dict_CUsharedconfig = dict(((int(v), v) for k, v in CUsharedconfig.__members__.items())) + +class CUshared_carveout(IntEnum): + """ + Shared memory carveout configurations. These may be passed to + :py:obj:`~.cuFuncSetAttribute` or :py:obj:`~.cuKernelSetAttribute` + """ + + #: No preference for shared memory or L1 (default) + CU_SHAREDMEM_CARVEOUT_DEFAULT = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_DEFAULT + + #: Prefer maximum available L1 cache, minimum shared memory + CU_SHAREDMEM_CARVEOUT_MAX_L1 = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1 + + #: Prefer maximum available shared memory, minimum L1 cache + CU_SHAREDMEM_CARVEOUT_MAX_SHARED = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_SHARED + +_dict_CUshared_carveout = dict(((int(v), v) for k, v in CUshared_carveout.__members__.items())) + +class CUmemorytype(IntEnum): + """ + Memory types + """ + + #: Host memory + CU_MEMORYTYPE_HOST = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_HOST + + #: Device memory + CU_MEMORYTYPE_DEVICE = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE + + #: Array memory + CU_MEMORYTYPE_ARRAY = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY + + #: Unified device or host memory + CU_MEMORYTYPE_UNIFIED = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED + +_dict_CUmemorytype = dict(((int(v), v) for k, v in CUmemorytype.__members__.items())) + +class CUcomputemode(IntEnum): + """ + Compute Modes + """ + + #: Default compute mode (Multiple contexts allowed per device) + CU_COMPUTEMODE_DEFAULT = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_DEFAULT + + #: Compute-prohibited mode (No contexts can be created on this device + #: at this time) + CU_COMPUTEMODE_PROHIBITED = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_PROHIBITED + + #: Compute-exclusive-process mode (Only one context used by a single + #: process can be present on this device at a time) + CU_COMPUTEMODE_EXCLUSIVE_PROCESS = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS + +_dict_CUcomputemode = dict(((int(v), v) for k, v in CUcomputemode.__members__.items())) + +class CUmem_advise(IntEnum): + """ + Memory advise values + """ + + #: Data will mostly be read and only occasionally be written to + CU_MEM_ADVISE_SET_READ_MOSTLY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_READ_MOSTLY + + #: Undo the effect of :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` + CU_MEM_ADVISE_UNSET_READ_MOSTLY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_READ_MOSTLY + + #: Set the preferred location for the data as the specified device + CU_MEM_ADVISE_SET_PREFERRED_LOCATION = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_PREFERRED_LOCATION + + #: Clear the preferred location for the data + CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION + + #: Data will be accessed by the specified device, so prevent page + #: faults as much as possible + CU_MEM_ADVISE_SET_ACCESSED_BY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_ACCESSED_BY + + #: Let the Unified Memory subsystem decide on the page faulting policy + #: for the specified device + CU_MEM_ADVISE_UNSET_ACCESSED_BY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY + +_dict_CUmem_advise = dict(((int(v), v) for k, v in CUmem_advise.__members__.items())) + +class CUmem_range_attribute(IntEnum): + """ + + """ + + #: Whether the range will mostly be read and only occasionally be + #: written to + CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY + + #: The preferred location of the range + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION + + #: Memory range has :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for + #: specified device + CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY + + #: The last location to which the range was prefetched + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION + + #: The preferred location type of the range + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE + + #: The preferred location id of the range + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID + + #: The last location type to which the range was prefetched + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE + + #: The last location id to which the range was prefetched + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID + +_dict_CUmem_range_attribute = dict(((int(v), v) for k, v in CUmem_range_attribute.__members__.items())) + +class CUjit_option(IntEnum): + """ + Online compiler and linker options + """ + + #: Max number of registers that a thread may use. + #: Option type: unsigned int + #: Applies to: compiler only + CU_JIT_MAX_REGISTERS = cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS + + #: IN: Specifies minimum number of threads per block to target + #: compilation for + #: OUT: Returns the number of threads the compiler actually targeted. + #: This restricts the resource utilization of the compiler (e.g. max + #: registers) such that a block with the given number of threads should + #: be able to launch based on register limitations. Note, this option + #: does not currently take into account any other resource limitations, + #: such as shared memory utilization. + #: Cannot be combined with :py:obj:`~.CU_JIT_TARGET`. + #: Option type: unsigned int + #: Applies to: compiler only + CU_JIT_THREADS_PER_BLOCK = cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK + + #: Overwrites the option value with the total wall clock time, in + #: milliseconds, spent in the compiler and linker + #: Option type: float + #: Applies to: compiler and linker + CU_JIT_WALL_TIME = cydriver.CUjit_option_enum.CU_JIT_WALL_TIME + + #: Pointer to a buffer in which to print any log messages that are + #: informational in nature (the buffer size is specified via option + #: :py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`) + #: Option type: char * + #: Applies to: compiler and linker + CU_JIT_INFO_LOG_BUFFER = cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES + + #: Pointer to a buffer in which to print any log messages that reflect + #: errors (the buffer size is specified via option + #: :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES`) + #: Option type: char * + #: Applies to: compiler and linker + CU_JIT_ERROR_LOG_BUFFER = cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES + + #: Level of optimizations to apply to generated code (0 - 4), with 4 + #: being the default and highest level of optimizations. + #: Option type: unsigned int + #: Applies to: compiler only + CU_JIT_OPTIMIZATION_LEVEL = cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL + + #: No option value required. Determines the target based on the current + #: attached context (default) + #: Option type: No option value needed + #: Applies to: compiler and linker + CU_JIT_TARGET_FROM_CUCONTEXT = cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT + + #: Target is chosen based on supplied :py:obj:`~.CUjit_target`. Cannot + #: be combined with :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.CUjit_target` + #: Applies to: compiler and linker + CU_JIT_TARGET = cydriver.CUjit_option_enum.CU_JIT_TARGET + + #: Specifies choice of fallback strategy if matching cubin is not + #: found. Choice is based on supplied :py:obj:`~.CUjit_fallback`. This + #: option cannot be used with cuLink* APIs as the linker requires exact + #: matches. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.CUjit_fallback` + #: Applies to: compiler only + CU_JIT_FALLBACK_STRATEGY = cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY + + #: Specifies whether to create debug information in output (-g) (0: + #: false, default) + #: Option type: int + #: Applies to: compiler and linker + CU_JIT_GENERATE_DEBUG_INFO = cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO + + #: Generate verbose log messages (0: false, default) + #: Option type: int + #: Applies to: compiler and linker + CU_JIT_LOG_VERBOSE = cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE + + #: Generate line number information (-lineinfo) (0: false, default) + #: Option type: int + #: Applies to: compiler only + CU_JIT_GENERATE_LINE_INFO = cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO + + #: Specifies whether to enable caching explicitly (-dlcm) + #: Choice is based on supplied :py:obj:`~.CUjit_cacheMode_enum`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.CUjit_cacheMode_enum` + #: Applies to: compiler only + CU_JIT_CACHE_MODE = cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE + + #: [Deprecated] + CU_JIT_NEW_SM3X_OPT = cydriver.CUjit_option_enum.CU_JIT_NEW_SM3X_OPT + + #: This jit option is used for internal purpose only. + CU_JIT_FAST_COMPILE = cydriver.CUjit_option_enum.CU_JIT_FAST_COMPILE + + #: Array of device symbol names that will be relocated to the + #: corresponding host addresses stored in + #: :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES`. + #: Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries. + #: When loading a device module, driver will relocate all encountered + #: unresolved symbols to the host addresses. + #: It is only allowed to register symbols that correspond to unresolved + #: global variables. + #: It is illegal to register the same device symbol at multiple + #: addresses. + #: Option type: const char ** + #: Applies to: dynamic linker only + CU_JIT_GLOBAL_SYMBOL_NAMES = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES + + #: Array of host addresses that will be used to relocate corresponding + #: device symbols stored in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES`. + #: Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries. + #: Option type: void ** + #: Applies to: dynamic linker only + CU_JIT_GLOBAL_SYMBOL_ADDRESSES = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES + + #: Number of entries in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES` and + #: :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES` arrays. + #: Option type: unsigned int + #: Applies to: dynamic linker only + CU_JIT_GLOBAL_SYMBOL_COUNT = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_LTO = cydriver.CUjit_option_enum.CU_JIT_LTO + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_FTZ = cydriver.CUjit_option_enum.CU_JIT_FTZ + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_PREC_DIV = cydriver.CUjit_option_enum.CU_JIT_PREC_DIV + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_PREC_SQRT = cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_FMA = cydriver.CUjit_option_enum.CU_JIT_FMA + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_REFERENCED_KERNEL_NAMES = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_REFERENCED_KERNEL_COUNT = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_REFERENCED_VARIABLE_NAMES = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_REFERENCED_VARIABLE_COUNT = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES + + #: Generate position independent code (0: false) + #: Option type: int + #: Applies to: compiler only + CU_JIT_POSITION_INDEPENDENT_CODE = cydriver.CUjit_option_enum.CU_JIT_POSITION_INDEPENDENT_CODE + + #: This option hints to the JIT compiler the minimum number of CTAs + #: from the kernel’s grid to be mapped to a SM. This option is ignored + #: when used together with :py:obj:`~.CU_JIT_MAX_REGISTERS` or + #: :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`. Optimizations based on this + #: option need :py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` to be specified + #: as well. For kernels already using PTX directive .minnctapersm, this + #: option will be ignored by default. Use + #: :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to let this option take + #: precedence over the PTX directive. Option type: unsigned int + #: Applies to: compiler only + CU_JIT_MIN_CTA_PER_SM = cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM + + #: Maximum number threads in a thread block, computed as the product of + #: the maximum extent specifed for each dimension of the block. This + #: limit is guaranteed not to be exeeded in any invocation of the + #: kernel. Exceeding the the maximum number of threads results in + #: runtime error or kernel launch failure. For kernels already using + #: PTX directive .maxntid, this option will be ignored by default. Use + #: :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to let this option take + #: precedence over the PTX directive. Option type: int + #: Applies to: compiler only + CU_JIT_MAX_THREADS_PER_BLOCK = cydriver.CUjit_option_enum.CU_JIT_MAX_THREADS_PER_BLOCK + + #: This option lets the values specified using + #: :py:obj:`~.CU_JIT_MAX_REGISTERS`, + #: :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`, + #: :py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` and + #: :py:obj:`~.CU_JIT_MIN_CTA_PER_SM` take precedence over any PTX + #: directives. (0: Disable, default; 1: Enable) Option type: int + #: Applies to: compiler only + CU_JIT_OVERRIDE_DIRECTIVE_VALUES = cydriver.CUjit_option_enum.CU_JIT_OVERRIDE_DIRECTIVE_VALUES + CU_JIT_NUM_OPTIONS = cydriver.CUjit_option_enum.CU_JIT_NUM_OPTIONS + +_dict_CUjit_option = dict(((int(v), v) for k, v in CUjit_option.__members__.items())) + +class CUjit_target(IntEnum): + """ + Online compilation targets + """ + + #: Compute device class 3.0 + CU_TARGET_COMPUTE_30 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_30 + + #: Compute device class 3.2 + CU_TARGET_COMPUTE_32 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_32 + + #: Compute device class 3.5 + CU_TARGET_COMPUTE_35 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_35 + + #: Compute device class 3.7 + CU_TARGET_COMPUTE_37 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_37 + + #: Compute device class 5.0 + CU_TARGET_COMPUTE_50 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_50 + + #: Compute device class 5.2 + CU_TARGET_COMPUTE_52 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_52 + + #: Compute device class 5.3 + CU_TARGET_COMPUTE_53 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_53 + + #: Compute device class 6.0. + CU_TARGET_COMPUTE_60 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_60 + + #: Compute device class 6.1. + CU_TARGET_COMPUTE_61 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_61 + + #: Compute device class 6.2. + CU_TARGET_COMPUTE_62 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_62 + + #: Compute device class 7.0. + CU_TARGET_COMPUTE_70 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_70 + + #: Compute device class 7.2. + CU_TARGET_COMPUTE_72 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_72 + + #: Compute device class 7.5. + CU_TARGET_COMPUTE_75 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_75 + + #: Compute device class 8.0. + CU_TARGET_COMPUTE_80 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_80 + + #: Compute device class 8.6. + CU_TARGET_COMPUTE_86 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_86 + + #: Compute device class 8.7. + CU_TARGET_COMPUTE_87 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_87 + + #: Compute device class 8.9. + CU_TARGET_COMPUTE_89 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_89 + + #: Compute device class 9.0. + CU_TARGET_COMPUTE_90 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90 + + #: Compute device class 10.0. + CU_TARGET_COMPUTE_100 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100 + + #: Compute device class 10.1. + CU_TARGET_COMPUTE_101 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_101 + + #: Compute device class 10.3. + CU_TARGET_COMPUTE_103 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103 + + #: Compute device class 12.0. + CU_TARGET_COMPUTE_120 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120 + + #: Compute device class 12.1. Compute device class 9.0. with + #: accelerated features. + CU_TARGET_COMPUTE_121 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121 + + #: Compute device class 10.0. with accelerated features. + CU_TARGET_COMPUTE_90A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90A + + #: Compute device class 10.1 with accelerated features. + CU_TARGET_COMPUTE_100A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100A + + #: Compute device class 10.3. with accelerated features. + CU_TARGET_COMPUTE_101A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_101A + + #: Compute device class 12.0. with accelerated features. + CU_TARGET_COMPUTE_103A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103A + + #: Compute device class 12.1. with accelerated features. + CU_TARGET_COMPUTE_120A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120A + + #: Compute device class 10.x with family features. + CU_TARGET_COMPUTE_121A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121A + + #: Compute device class 10.1 with family features. + CU_TARGET_COMPUTE_100F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100F + + #: Compute device class 10.3. with family features. + CU_TARGET_COMPUTE_101F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_101F + + #: Compute device class 12.0. with family features. + CU_TARGET_COMPUTE_103F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103F + + #: Compute device class 12.1. with family features. + CU_TARGET_COMPUTE_120F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120F + CU_TARGET_COMPUTE_121F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121F + +_dict_CUjit_target = dict(((int(v), v) for k, v in CUjit_target.__members__.items())) + +class CUjit_fallback(IntEnum): + """ + Cubin matching fallback strategies + """ + + #: Prefer to compile ptx if exact binary match not found + CU_PREFER_PTX = cydriver.CUjit_fallback_enum.CU_PREFER_PTX + + #: Prefer to fall back to compatible binary code if exact match not + #: found + CU_PREFER_BINARY = cydriver.CUjit_fallback_enum.CU_PREFER_BINARY + +_dict_CUjit_fallback = dict(((int(v), v) for k, v in CUjit_fallback.__members__.items())) + +class CUjit_cacheMode(IntEnum): + """ + Caching modes for dlcm + """ + + #: Compile with no -dlcm flag specified + CU_JIT_CACHE_OPTION_NONE = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_NONE + + #: Compile with L1 cache disabled + CU_JIT_CACHE_OPTION_CG = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CG + + #: Compile with L1 cache enabled + CU_JIT_CACHE_OPTION_CA = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA + +_dict_CUjit_cacheMode = dict(((int(v), v) for k, v in CUjit_cacheMode.__members__.items())) + +class CUjitInputType(IntEnum): + """ + Device code formats + """ + + #: Compiled device-class-specific device code + #: Applicable options: none + CU_JIT_INPUT_CUBIN = cydriver.CUjitInputType_enum.CU_JIT_INPUT_CUBIN + + #: PTX source code + #: Applicable options: PTX compiler options + CU_JIT_INPUT_PTX = cydriver.CUjitInputType_enum.CU_JIT_INPUT_PTX + + #: Bundle of multiple cubins and/or PTX of some device code + #: Applicable options: PTX compiler options, + #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` + CU_JIT_INPUT_FATBINARY = cydriver.CUjitInputType_enum.CU_JIT_INPUT_FATBINARY + + #: Host object with embedded device code + #: Applicable options: PTX compiler options, + #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` + CU_JIT_INPUT_OBJECT = cydriver.CUjitInputType_enum.CU_JIT_INPUT_OBJECT + + #: Archive of host objects with embedded device code + #: Applicable options: PTX compiler options, + #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` + CU_JIT_INPUT_LIBRARY = cydriver.CUjitInputType_enum.CU_JIT_INPUT_LIBRARY + + #: [Deprecated] + #: + #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 + CU_JIT_INPUT_NVVM = cydriver.CUjitInputType_enum.CU_JIT_INPUT_NVVM + CU_JIT_NUM_INPUT_TYPES = cydriver.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES + +_dict_CUjitInputType = dict(((int(v), v) for k, v in CUjitInputType.__members__.items())) + +class CUgraphicsRegisterFlags(IntEnum): + """ + Flags to register a graphics resource + """ + CU_GRAPHICS_REGISTER_FLAGS_NONE = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_NONE + CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY + CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD + CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST + CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER + +_dict_CUgraphicsRegisterFlags = dict(((int(v), v) for k, v in CUgraphicsRegisterFlags.__members__.items())) + +class CUgraphicsMapResourceFlags(IntEnum): + """ + Flags for mapping and unmapping interop resources + """ + CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = cydriver.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE + CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = cydriver.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY + CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = cydriver.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD + +_dict_CUgraphicsMapResourceFlags = dict(((int(v), v) for k, v in CUgraphicsMapResourceFlags.__members__.items())) + +class CUarray_cubemap_face(IntEnum): + """ + Array indices for cube faces + """ + + #: Positive X face of cubemap + CU_CUBEMAP_FACE_POSITIVE_X = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_X + + #: Negative X face of cubemap + CU_CUBEMAP_FACE_NEGATIVE_X = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_X + + #: Positive Y face of cubemap + CU_CUBEMAP_FACE_POSITIVE_Y = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Y + + #: Negative Y face of cubemap + CU_CUBEMAP_FACE_NEGATIVE_Y = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Y + + #: Positive Z face of cubemap + CU_CUBEMAP_FACE_POSITIVE_Z = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Z + + #: Negative Z face of cubemap + CU_CUBEMAP_FACE_NEGATIVE_Z = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z + +_dict_CUarray_cubemap_face = dict(((int(v), v) for k, v in CUarray_cubemap_face.__members__.items())) + +class CUlimit(IntEnum): + """ + Limits + """ + + #: GPU thread stack size + CU_LIMIT_STACK_SIZE = cydriver.CUlimit_enum.CU_LIMIT_STACK_SIZE + + #: GPU printf FIFO size + CU_LIMIT_PRINTF_FIFO_SIZE = cydriver.CUlimit_enum.CU_LIMIT_PRINTF_FIFO_SIZE + + #: GPU malloc heap size + CU_LIMIT_MALLOC_HEAP_SIZE = cydriver.CUlimit_enum.CU_LIMIT_MALLOC_HEAP_SIZE + + #: GPU device runtime launch synchronize depth + CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH + + #: GPU device runtime pending launch count + CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT + + #: A value between 0 and 128 that indicates the maximum fetch + #: granularity of L2 (in Bytes). This is a hint + CU_LIMIT_MAX_L2_FETCH_GRANULARITY = cydriver.CUlimit_enum.CU_LIMIT_MAX_L2_FETCH_GRANULARITY + + #: A size in bytes for L2 persisting lines cache size + CU_LIMIT_PERSISTING_L2_CACHE_SIZE = cydriver.CUlimit_enum.CU_LIMIT_PERSISTING_L2_CACHE_SIZE + + #: A maximum size in bytes of shared memory available to CUDA kernels + #: on a CIG context. Can only be queried, cannot be set + CU_LIMIT_SHMEM_SIZE = cydriver.CUlimit_enum.CU_LIMIT_SHMEM_SIZE + + #: A non-zero value indicates this CUDA context is a CIG-enabled + #: context. Can only be queried, cannot be set + CU_LIMIT_CIG_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_ENABLED + + #: When set to zero, CUDA will fail to launch a kernel on a CIG + #: context, instead of using the fallback path, if the kernel uses more + #: shared memory than available + CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED + CU_LIMIT_MAX = cydriver.CUlimit_enum.CU_LIMIT_MAX + +_dict_CUlimit = dict(((int(v), v) for k, v in CUlimit.__members__.items())) + +class CUresourcetype(IntEnum): + """ + Resource types + """ + + #: Array resource + CU_RESOURCE_TYPE_ARRAY = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY + + #: Mipmapped array resource + CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY + + #: Linear resource + CU_RESOURCE_TYPE_LINEAR = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR + + #: Pitch 2D resource + CU_RESOURCE_TYPE_PITCH2D = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D + +_dict_CUresourcetype = dict(((int(v), v) for k, v in CUresourcetype.__members__.items())) + +class CUaccessProperty(IntEnum): + """ + Specifies performance hint with :py:obj:`~.CUaccessPolicyWindow` + for hitProp and missProp members. + """ + + #: Normal cache persistence. + CU_ACCESS_PROPERTY_NORMAL = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_NORMAL + + #: Streaming access is less likely to persit from cache. + CU_ACCESS_PROPERTY_STREAMING = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_STREAMING + + #: Persisting access is more likely to persist in cache. + CU_ACCESS_PROPERTY_PERSISTING = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING + +_dict_CUaccessProperty = dict(((int(v), v) for k, v in CUaccessProperty.__members__.items())) + +class CUgraphConditionalNodeType(IntEnum): + """ + Conditional node types + """ + + #: Conditional 'if/else' Node. Body[0] executed if condition is non- + #: zero. If `size` == 2, an optional ELSE graph is created and this is + #: executed if the condition is zero. + CU_GRAPH_COND_TYPE_IF = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_IF + + #: Conditional 'while' Node. Body executed repeatedly while condition + #: value is non-zero. + CU_GRAPH_COND_TYPE_WHILE = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_WHILE + + #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is + #: the value of the condition. If the condition does not match a body + #: index, no body is launched. + CU_GRAPH_COND_TYPE_SWITCH = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_SWITCH + +_dict_CUgraphConditionalNodeType = dict(((int(v), v) for k, v in CUgraphConditionalNodeType.__members__.items())) + +class CUgraphNodeType(IntEnum): + """ + Graph node types + """ + + #: GPU kernel node + CU_GRAPH_NODE_TYPE_KERNEL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_KERNEL + + #: Memcpy node + CU_GRAPH_NODE_TYPE_MEMCPY = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMCPY + + #: Memset node + CU_GRAPH_NODE_TYPE_MEMSET = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMSET + + #: Host (executable) node + CU_GRAPH_NODE_TYPE_HOST = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_HOST + + #: Node which executes an embedded graph + CU_GRAPH_NODE_TYPE_GRAPH = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_GRAPH + + #: Empty (no-op) node + CU_GRAPH_NODE_TYPE_EMPTY = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EMPTY + + #: External event wait node + CU_GRAPH_NODE_TYPE_WAIT_EVENT = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_WAIT_EVENT + + #: External event record node + CU_GRAPH_NODE_TYPE_EVENT_RECORD = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EVENT_RECORD + + #: External semaphore signal node + CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL + + #: External semaphore wait node + CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT + + #: Memory Allocation Node + CU_GRAPH_NODE_TYPE_MEM_ALLOC = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_ALLOC + + #: Memory Free Node + CU_GRAPH_NODE_TYPE_MEM_FREE = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_FREE + + #: Batch MemOp Node + CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP + + #: Conditional Node May be used + #: to implement a conditional execution path or loop + #: inside of a graph. The + #: graph(s) contained within the body of the conditional node + #: can be selectively executed + #: or iterated upon based on the value of a conditional + #: variable. + #: + #: Handles must be created in + #: advance of creating the node + #: using + #: :py:obj:`~.cuGraphConditionalHandleCreate`. + #: + #: The following restrictions + #: apply to graphs which contain conditional nodes: + #: The graph cannot be used in + #: a child node. + #: Only one instantiation of + #: the graph may exist at any point in time. + #: The graph cannot be cloned. + #: + #: To set the control value, + #: supply a default value when creating the handle and/or + #: call + #: :py:obj:`~.cudaGraphSetConditional` from device code. + CU_GRAPH_NODE_TYPE_CONDITIONAL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_CONDITIONAL + +_dict_CUgraphNodeType = dict(((int(v), v) for k, v in CUgraphNodeType.__members__.items())) + +class CUgraphDependencyType(IntEnum): + """ + Type annotations that can be applied to graph edges as part of + :py:obj:`~.CUgraphEdgeData`. + """ + + #: This is an ordinary dependency. + CU_GRAPH_DEPENDENCY_TYPE_DEFAULT = cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_DEFAULT + + #: This dependency type allows the downstream node to use + #: `cudaGridDependencySynchronize()`. It may only be used between + #: kernel nodes, and must be used with either the + #: :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or + #: :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. + CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC + +_dict_CUgraphDependencyType = dict(((int(v), v) for k, v in CUgraphDependencyType.__members__.items())) + +class CUgraphInstantiateResult(IntEnum): + """ + Graph instantiation results + """ + + #: Instantiation succeeded + CUDA_GRAPH_INSTANTIATE_SUCCESS = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_SUCCESS + + #: Instantiation failed for an unexpected reason which is described in + #: the return value of the function + CUDA_GRAPH_INSTANTIATE_ERROR = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_ERROR + + #: Instantiation failed due to invalid structure, such as cycles + CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE + + #: Instantiation for device launch failed because the graph contained + #: an unsupported operation + CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED + + #: Instantiation for device launch failed due to the nodes belonging to + #: different contexts + CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED + + #: One or more conditional handles are not associated with conditional + #: nodes + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED + +_dict_CUgraphInstantiateResult = dict(((int(v), v) for k, v in CUgraphInstantiateResult.__members__.items())) + +class CUsynchronizationPolicy(IntEnum): + """ + + """ + CU_SYNC_POLICY_AUTO = cydriver.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_AUTO + CU_SYNC_POLICY_SPIN = cydriver.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_SPIN + CU_SYNC_POLICY_YIELD = cydriver.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_YIELD + CU_SYNC_POLICY_BLOCKING_SYNC = cydriver.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC + +_dict_CUsynchronizationPolicy = dict(((int(v), v) for k, v in CUsynchronizationPolicy.__members__.items())) + +class CUclusterSchedulingPolicy(IntEnum): + """ + Cluster scheduling policies. These may be passed to + :py:obj:`~.cuFuncSetAttribute` or :py:obj:`~.cuKernelSetAttribute` + """ + + #: the default policy + CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_DEFAULT + + #: spread the blocks within a cluster to the SMs + CU_CLUSTER_SCHEDULING_POLICY_SPREAD = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_SPREAD + + #: allow the hardware to load-balance the blocks in a cluster to the + #: SMs + CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING + +_dict_CUclusterSchedulingPolicy = dict(((int(v), v) for k, v in CUclusterSchedulingPolicy.__members__.items())) + +class CUlaunchMemSyncDomain(IntEnum): + """ + Memory Synchronization Domain A kernel can be launched in a + specified memory synchronization domain that affects all memory + operations issued by that kernel. A memory barrier issued in one + domain will only order memory operations in that domain, thus + eliminating latency increase from memory barriers ordering + unrelated traffic. By default, kernels are launched in domain 0. + Kernel launched with :py:obj:`~.CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE` + will have a different domain ID. User may also alter the domain ID + with :py:obj:`~.CUlaunchMemSyncDomainMap` for a specific stream / + graph node / kernel launch. See + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN`, + :py:obj:`~.cuStreamSetAttribute`, :py:obj:`~.cuLaunchKernelEx`, + :py:obj:`~.cuGraphKernelNodeSetAttribute`. Memory operations done + in kernels launched in different domains are considered system- + scope distanced. In other words, a GPU scoped memory + synchronization is not sufficient for memory order to be observed + by kernels in another memory synchronization domain even if they + are on the same GPU. + """ + + #: Launch kernels in the default domain + CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT + + #: Launch kernels in the remote domain + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE + +_dict_CUlaunchMemSyncDomain = dict(((int(v), v) for k, v in CUlaunchMemSyncDomain.__members__.items())) + +class CUlaunchAttributeID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.CUlaunchAttribute` + """ + + #: Ignored entry, for convenient composition + CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE + + #: Valid for streams. See + #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + + #: Valid for launches. Setting + #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event through PTX launchdep.release + #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). + #: A trigger can also be inserted at the beginning of each block's + #: execution if triggerAtBlockStart is set to non-0. The dependent + #: launches can choose to wait on the dependency using the programmatic + #: sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger + #: long after the associated kernel has completed. This recording type + #: is primarily meant for establishing programmatic dependency between + #: device tasks. Note also this type of dependency allows, but does not + #: guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.priority`. + CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this + #: functionality, a node cannot opt out, and any attempt to set the + #: deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cuGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage + #: between 0-100 signals the CUDA driver to set the shared memory + #: carveout preference, in percent of the total shared memory for that + #: kernel launch. This attribute takes precedence over + #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This + #: is only a hint, and the CUDA driver can choose a different + #: configuration if required for the launch. + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + +_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + +class CUstreamCaptureStatus(IntEnum): + """ + Possible stream capture statuses returned by + :py:obj:`~.cuStreamIsCapturing` + """ + + #: Stream is not capturing + CU_STREAM_CAPTURE_STATUS_NONE = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE + + #: Stream is actively capturing + CU_STREAM_CAPTURE_STATUS_ACTIVE = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE + + #: Stream is part of a capture sequence that has been invalidated, but + #: not terminated + CU_STREAM_CAPTURE_STATUS_INVALIDATED = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED + +_dict_CUstreamCaptureStatus = dict(((int(v), v) for k, v in CUstreamCaptureStatus.__members__.items())) + +class CUstreamCaptureMode(IntEnum): + """ + Possible modes for stream capture thread interactions. For more + details see :py:obj:`~.cuStreamBeginCapture` and + :py:obj:`~.cuThreadExchangeStreamCaptureMode` + """ + CU_STREAM_CAPTURE_MODE_GLOBAL = cydriver.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_GLOBAL + CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = cydriver.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_THREAD_LOCAL + CU_STREAM_CAPTURE_MODE_RELAXED = cydriver.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED + +_dict_CUstreamCaptureMode = dict(((int(v), v) for k, v in CUstreamCaptureMode.__members__.items())) + +class CUdriverProcAddress_flags(IntEnum): + """ + Flags to specify search options. For more details see + :py:obj:`~.cuGetProcAddress` + """ + + #: Default search mode for driver symbols. + CU_GET_PROC_ADDRESS_DEFAULT = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_DEFAULT + + #: Search for legacy versions of driver symbols. + CU_GET_PROC_ADDRESS_LEGACY_STREAM = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_LEGACY_STREAM + + #: Search for per-thread versions of driver symbols. + CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM + +_dict_CUdriverProcAddress_flags = dict(((int(v), v) for k, v in CUdriverProcAddress_flags.__members__.items())) + +class CUdriverProcAddressQueryResult(IntEnum): + """ + Flags to indicate search status. For more details see + :py:obj:`~.cuGetProcAddress` + """ + + #: Symbol was succesfully found + CU_GET_PROC_ADDRESS_SUCCESS = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SUCCESS + + #: Symbol was not found in search + CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND + + #: Symbol was found but version supplied was not sufficient + CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT + +_dict_CUdriverProcAddressQueryResult = dict(((int(v), v) for k, v in CUdriverProcAddressQueryResult.__members__.items())) + +class CUexecAffinityType(IntEnum): + """ + Execution Affinity Types + """ + + #: Create a context with limited SMs. + CU_EXEC_AFFINITY_TYPE_SM_COUNT = cydriver.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_SM_COUNT + CU_EXEC_AFFINITY_TYPE_MAX = cydriver.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX + +_dict_CUexecAffinityType = dict(((int(v), v) for k, v in CUexecAffinityType.__members__.items())) + +class CUcigDataType(IntEnum): + """ + + """ + CIG_DATA_TYPE_D3D12_COMMAND_QUEUE = cydriver.CUcigDataType_enum.CIG_DATA_TYPE_D3D12_COMMAND_QUEUE + + #: D3D12 Command Queue Handle + CIG_DATA_TYPE_NV_BLOB = cydriver.CUcigDataType_enum.CIG_DATA_TYPE_NV_BLOB + +_dict_CUcigDataType = dict(((int(v), v) for k, v in CUcigDataType.__members__.items())) + +class CUlibraryOption(IntEnum): + """ + Library options to be specified with + :py:obj:`~.cuLibraryLoadData()` or + :py:obj:`~.cuLibraryLoadFromFile()` + """ + CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE = cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE + + #: Specifes that the argument `code` passed to + #: :py:obj:`~.cuLibraryLoadData()` will be preserved. Specifying this + #: option will let the driver know that `code` can be accessed at any + #: point until :py:obj:`~.cuLibraryUnload()`. The default behavior is + #: for the driver to allocate and maintain its own copy of `code`. Note + #: that this is only a memory usage optimization hint and the driver + #: can choose to ignore it if required. Specifying this option with + #: :py:obj:`~.cuLibraryLoadFromFile()` is invalid and will return + #: :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + CU_LIBRARY_BINARY_IS_PRESERVED = cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED + CU_LIBRARY_NUM_OPTIONS = cydriver.CUlibraryOption_enum.CU_LIBRARY_NUM_OPTIONS + +_dict_CUlibraryOption = dict(((int(v), v) for k, v in CUlibraryOption.__members__.items())) + +class CUresult(IntEnum): + """ + Error codes + """ + + #: The API call returned with no errors. In the case of query calls, + #: this also means that the operation being queried is complete (see + #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`). + CUDA_SUCCESS = cydriver.cudaError_enum.CUDA_SUCCESS + + #: This indicates that one or more of the parameters passed to the API + #: call is not within an acceptable range of values. + CUDA_ERROR_INVALID_VALUE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_VALUE + + #: The API call failed because it was unable to allocate enough memory + #: or other resources to perform the requested operation. + CUDA_ERROR_OUT_OF_MEMORY = cydriver.cudaError_enum.CUDA_ERROR_OUT_OF_MEMORY + + #: This indicates that the CUDA driver has not been initialized with + #: :py:obj:`~.cuInit()` or that initialization has failed. + CUDA_ERROR_NOT_INITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_NOT_INITIALIZED + + #: This indicates that the CUDA driver is in the process of shutting + #: down. + CUDA_ERROR_DEINITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_DEINITIALIZED + + #: This indicates profiler is not initialized for this run. This can + #: happen when the application is running with external profiling tools + #: like visual profiler. + CUDA_ERROR_PROFILER_DISABLED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_DISABLED + + #: [Deprecated] + CUDA_ERROR_PROFILER_NOT_INITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_NOT_INITIALIZED + + #: [Deprecated] + CUDA_ERROR_PROFILER_ALREADY_STARTED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STARTED + + #: [Deprecated] + CUDA_ERROR_PROFILER_ALREADY_STOPPED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STOPPED + + #: This indicates that the CUDA driver that the application has loaded + #: is a stub library. Applications that run with the stub rather than a + #: real driver loaded will result in CUDA API returning this error. + CUDA_ERROR_STUB_LIBRARY = cydriver.cudaError_enum.CUDA_ERROR_STUB_LIBRARY + + #: This indicates that requested CUDA device is unavailable at the + #: current time. Devices are often unavailable due to use of + #: :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS` or + #: :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. + CUDA_ERROR_DEVICE_UNAVAILABLE = cydriver.cudaError_enum.CUDA_ERROR_DEVICE_UNAVAILABLE + + #: This indicates that no CUDA-capable devices were detected by the + #: installed CUDA driver. + CUDA_ERROR_NO_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_NO_DEVICE + + #: This indicates that the device ordinal supplied by the user does not + #: correspond to a valid CUDA device or that the action requested is + #: invalid for the specified device. + CUDA_ERROR_INVALID_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_DEVICE + + #: This error indicates that the Grid license is not applied. + CUDA_ERROR_DEVICE_NOT_LICENSED = cydriver.cudaError_enum.CUDA_ERROR_DEVICE_NOT_LICENSED + + #: This indicates that the device kernel image is invalid. This can + #: also indicate an invalid CUDA module. + CUDA_ERROR_INVALID_IMAGE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_IMAGE + + #: This most frequently indicates that there is no context bound to the + #: current thread. This can also be returned if the context passed to + #: an API call is not a valid handle (such as a context that has had + #: :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned + #: if a user mixes different API versions (i.e. 3010 context with 3020 + #: API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. + #: This can also be returned if the green context passed to an API call + #: was not converted to a :py:obj:`~.CUcontext` using + #: :py:obj:`~.cuCtxFromGreenCtx` API. + CUDA_ERROR_INVALID_CONTEXT = cydriver.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT + + #: This indicated that the context being supplied as a parameter to the + #: API call was already the active context. [Deprecated] + CUDA_ERROR_CONTEXT_ALREADY_CURRENT = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_CURRENT + + #: This indicates that a map or register operation has failed. + CUDA_ERROR_MAP_FAILED = cydriver.cudaError_enum.CUDA_ERROR_MAP_FAILED + + #: This indicates that an unmap or unregister operation has failed. + CUDA_ERROR_UNMAP_FAILED = cydriver.cudaError_enum.CUDA_ERROR_UNMAP_FAILED + + #: This indicates that the specified array is currently mapped and thus + #: cannot be destroyed. + CUDA_ERROR_ARRAY_IS_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_ARRAY_IS_MAPPED + + #: This indicates that the resource is already mapped. + CUDA_ERROR_ALREADY_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_ALREADY_MAPPED + + #: This indicates that there is no kernel image available that is + #: suitable for the device. This can occur when a user specifies code + #: generation options for a particular CUDA source file that do not + #: include the corresponding device configuration. + CUDA_ERROR_NO_BINARY_FOR_GPU = cydriver.cudaError_enum.CUDA_ERROR_NO_BINARY_FOR_GPU + + #: This indicates that a resource has already been acquired. + CUDA_ERROR_ALREADY_ACQUIRED = cydriver.cudaError_enum.CUDA_ERROR_ALREADY_ACQUIRED + + #: This indicates that a resource is not mapped. + CUDA_ERROR_NOT_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED + + #: This indicates that a mapped resource is not available for access as + #: an array. + CUDA_ERROR_NOT_MAPPED_AS_ARRAY = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_ARRAY + + #: This indicates that a mapped resource is not available for access as + #: a pointer. + CUDA_ERROR_NOT_MAPPED_AS_POINTER = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_POINTER + + #: This indicates that an uncorrectable ECC error was detected during + #: execution. + CUDA_ERROR_ECC_UNCORRECTABLE = cydriver.cudaError_enum.CUDA_ERROR_ECC_UNCORRECTABLE + + #: This indicates that the :py:obj:`~.CUlimit` passed to the API call + #: is not supported by the active device. + CUDA_ERROR_UNSUPPORTED_LIMIT = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_LIMIT + + #: This indicates that the :py:obj:`~.CUcontext` passed to the API call + #: can only be bound to a single CPU thread at a time but is already + #: bound to a CPU thread. + CUDA_ERROR_CONTEXT_ALREADY_IN_USE = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_IN_USE + + #: This indicates that peer access is not supported across the given + #: devices. + CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED + + #: This indicates that a PTX JIT compilation failed. + CUDA_ERROR_INVALID_PTX = cydriver.cudaError_enum.CUDA_ERROR_INVALID_PTX + + #: This indicates an error with OpenGL or DirectX context. + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = cydriver.cudaError_enum.CUDA_ERROR_INVALID_GRAPHICS_CONTEXT + + #: This indicates that an uncorrectable NVLink error was detected + #: during the execution. + CUDA_ERROR_NVLINK_UNCORRECTABLE = cydriver.cudaError_enum.CUDA_ERROR_NVLINK_UNCORRECTABLE + + #: This indicates that the PTX JIT compiler library was not found. + CUDA_ERROR_JIT_COMPILER_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILER_NOT_FOUND + + #: This indicates that the provided PTX was compiled with an + #: unsupported toolchain. + CUDA_ERROR_UNSUPPORTED_PTX_VERSION = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_PTX_VERSION + + #: This indicates that the PTX JIT compilation was disabled. + CUDA_ERROR_JIT_COMPILATION_DISABLED = cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILATION_DISABLED + + #: This indicates that the :py:obj:`~.CUexecAffinityType` passed to the + #: API call is not supported by the active device. + CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY + + #: This indicates that the code to be compiled by the PTX JIT contains + #: unsupported call to cudaDeviceSynchronize. + CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC + + #: This indicates that an exception occurred on the device that is now + #: contained by the GPU's error containment capability. Common causes + #: are - a. Certain types of invalid accesses of peer GPU memory over + #: nvlink b. Certain classes of hardware errors This leaves the process + #: in an inconsistent state and any further CUDA work will return the + #: same error. To continue using CUDA, the process must be terminated + #: and relaunched. + CUDA_ERROR_CONTAINED = cydriver.cudaError_enum.CUDA_ERROR_CONTAINED + + #: This indicates that the device kernel source is invalid. This + #: includes compilation/linker errors encountered in device code or + #: user error. + CUDA_ERROR_INVALID_SOURCE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_SOURCE + + #: This indicates that the file specified was not found. + CUDA_ERROR_FILE_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_FILE_NOT_FOUND + + #: This indicates that a link to a shared object failed to resolve. + CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND + + #: This indicates that initialization of a shared object failed. + CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED + + #: This indicates that an OS call failed. + CUDA_ERROR_OPERATING_SYSTEM = cydriver.cudaError_enum.CUDA_ERROR_OPERATING_SYSTEM + + #: This indicates that a resource handle passed to the API call was not + #: valid. Resource handles are opaque types like :py:obj:`~.CUstream` + #: and :py:obj:`~.CUevent`. + CUDA_ERROR_INVALID_HANDLE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_HANDLE + + #: This indicates that a resource required by the API call is not in a + #: valid state to perform the requested operation. + CUDA_ERROR_ILLEGAL_STATE = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_STATE + + #: This indicates an attempt was made to introspect an object in a way + #: that would discard semantically important information. This is + #: either due to the object using funtionality newer than the API + #: version used to introspect it or omission of optional return + #: arguments. + CUDA_ERROR_LOSSY_QUERY = cydriver.cudaError_enum.CUDA_ERROR_LOSSY_QUERY + + #: This indicates that a named symbol was not found. Examples of + #: symbols are global/constant variable names, driver function names, + #: texture names, and surface names. + CUDA_ERROR_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_NOT_FOUND + + #: This indicates that asynchronous operations issued previously have + #: not completed yet. This result is not actually an error, but must be + #: indicated differently than :py:obj:`~.CUDA_SUCCESS` (which indicates + #: completion). Calls that may return this value include + #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`. + CUDA_ERROR_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_NOT_READY + + #: While executing a kernel, the device encountered a load or store + #: instruction on an invalid memory address. This leaves the process in + #: an inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + CUDA_ERROR_ILLEGAL_ADDRESS = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_ADDRESS + + #: This indicates that a launch did not occur because it did not have + #: appropriate resources. This error usually indicates that the user + #: has attempted to pass too many arguments to the device kernel, or + #: the kernel launch specifies too many threads for the kernel's + #: register count. Passing arguments of the wrong size (i.e. a 64-bit + #: pointer when a 32-bit int is expected) is equivalent to passing too + #: many arguments and can also result in this error. + CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES + + #: This indicates that the device kernel took too long to execute. This + #: can only occur if timeouts are enabled - see the device attribute + #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT` for more + #: information. This leaves the process in an inconsistent state and + #: any further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + CUDA_ERROR_LAUNCH_TIMEOUT = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_TIMEOUT + + #: This error indicates a kernel launch that uses an incompatible + #: texturing mode. + CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING + + #: This error indicates that a call to + #: :py:obj:`~.cuCtxEnablePeerAccess()` is trying to re-enable peer + #: access to a context which has already had peer access to it enabled. + CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED + + #: This error indicates that :py:obj:`~.cuCtxDisablePeerAccess()` is + #: trying to disable peer access which has not been enabled yet via + #: :py:obj:`~.cuCtxEnablePeerAccess()`. + CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED + + #: This error indicates that the primary context for the specified + #: device has already been initialized. + CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = cydriver.cudaError_enum.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE + + #: This error indicates that the context current to the calling thread + #: has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary + #: context which has not yet been initialized. + CUDA_ERROR_CONTEXT_IS_DESTROYED = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_IS_DESTROYED + + #: A device-side assert triggered during kernel execution. The context + #: cannot be used anymore, and must be destroyed. All existing device + #: memory allocations from this context are invalid and must be + #: reconstructed if the program is to continue using CUDA. + CUDA_ERROR_ASSERT = cydriver.cudaError_enum.CUDA_ERROR_ASSERT + + #: This error indicates that the hardware resources required to enable + #: peer access have been exhausted for one or more of the devices + #: passed to :py:obj:`~.cuCtxEnablePeerAccess()`. + CUDA_ERROR_TOO_MANY_PEERS = cydriver.cudaError_enum.CUDA_ERROR_TOO_MANY_PEERS + + #: This error indicates that the memory range passed to + #: :py:obj:`~.cuMemHostRegister()` has already been registered. + CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED + + #: This error indicates that the pointer passed to + #: :py:obj:`~.cuMemHostUnregister()` does not correspond to any + #: currently registered memory region. + CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED + + #: While executing a kernel, the device encountered a stack error. This + #: can be due to stack corruption or exceeding the stack size limit. + #: This leaves the process in an inconsistent state and any further + #: CUDA work will return the same error. To continue using CUDA, the + #: process must be terminated and relaunched. + CUDA_ERROR_HARDWARE_STACK_ERROR = cydriver.cudaError_enum.CUDA_ERROR_HARDWARE_STACK_ERROR + + #: While executing a kernel, the device encountered an illegal + #: instruction. This leaves the process in an inconsistent state and + #: any further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + CUDA_ERROR_ILLEGAL_INSTRUCTION = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_INSTRUCTION + + #: While executing a kernel, the device encountered a load or store + #: instruction on a memory address which is not aligned. This leaves + #: the process in an inconsistent state and any further CUDA work will + #: return the same error. To continue using CUDA, the process must be + #: terminated and relaunched. + CUDA_ERROR_MISALIGNED_ADDRESS = cydriver.cudaError_enum.CUDA_ERROR_MISALIGNED_ADDRESS + + #: While executing a kernel, the device encountered an instruction + #: which can only operate on memory locations in certain address spaces + #: (global, shared, or local), but was supplied a memory address not + #: belonging to an allowed address space. This leaves the process in an + #: inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + CUDA_ERROR_INVALID_ADDRESS_SPACE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_ADDRESS_SPACE + + #: While executing a kernel, the device program counter wrapped its + #: address space. This leaves the process in an inconsistent state and + #: any further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + CUDA_ERROR_INVALID_PC = cydriver.cudaError_enum.CUDA_ERROR_INVALID_PC + + #: An exception occurred on the device while executing a kernel. Common + #: causes include dereferencing an invalid device pointer and accessing + #: out of bounds shared memory. Less common cases can be system + #: specific - more information about these cases can be found in the + #: system specific user guide. This leaves the process in an + #: inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + CUDA_ERROR_LAUNCH_FAILED = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_FAILED + + #: This error indicates that the number of blocks launched per grid for + #: a kernel that was launched via either + #: :py:obj:`~.cuLaunchCooperativeKernel` or + #: :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` exceeds the maximum + #: number of blocks as allowed by + #: :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` or + #: :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` + #: times the number of multiprocessors as specified by the device + #: attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. + CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = cydriver.cudaError_enum.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE + + #: An exception occurred on the device while exiting a kernel using + #: tensor memory: the tensor memory was not completely deallocated. + #: This leaves the process in an inconsistent state and any further + #: CUDA work will return the same error. To continue using CUDA, the + #: process must be terminated and relaunched. + CUDA_ERROR_TENSOR_MEMORY_LEAK = cydriver.cudaError_enum.CUDA_ERROR_TENSOR_MEMORY_LEAK + + #: This error indicates that the attempted operation is not permitted. + CUDA_ERROR_NOT_PERMITTED = cydriver.cudaError_enum.CUDA_ERROR_NOT_PERMITTED + + #: This error indicates that the attempted operation is not supported + #: on the current system or device. + CUDA_ERROR_NOT_SUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_NOT_SUPPORTED + + #: This error indicates that the system is not yet ready to start any + #: CUDA work. To continue using CUDA, verify the system configuration + #: is in a valid state and all required driver daemons are actively + #: running. More information about this error can be found in the + #: system specific user guide. + CUDA_ERROR_SYSTEM_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_NOT_READY + + #: This error indicates that there is a mismatch between the versions + #: of the display driver and the CUDA driver. Refer to the + #: compatibility documentation for supported versions. + CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH + + #: This error indicates that the system was upgraded to run with + #: forward compatibility but the visible hardware detected by CUDA does + #: not support this configuration. Refer to the compatibility + #: documentation for the supported hardware matrix or ensure that only + #: supported hardware is visible during initialization via the + #: CUDA_VISIBLE_DEVICES environment variable. + CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE + + #: This error indicates that the MPS client failed to connect to the + #: MPS control daemon or the MPS server. + CUDA_ERROR_MPS_CONNECTION_FAILED = cydriver.cudaError_enum.CUDA_ERROR_MPS_CONNECTION_FAILED + + #: This error indicates that the remote procedural call between the MPS + #: server and the MPS client failed. + CUDA_ERROR_MPS_RPC_FAILURE = cydriver.cudaError_enum.CUDA_ERROR_MPS_RPC_FAILURE + + #: This error indicates that the MPS server is not ready to accept new + #: MPS client requests. This error can be returned when the MPS server + #: is in the process of recovering from a fatal failure. + CUDA_ERROR_MPS_SERVER_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_MPS_SERVER_NOT_READY + + #: This error indicates that the hardware resources required to create + #: MPS client have been exhausted. + CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CLIENTS_REACHED + + #: This error indicates the the hardware resources required to support + #: device connections have been exhausted. + CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED + + #: This error indicates that the MPS client has been terminated by the + #: server. To continue using CUDA, the process must be terminated and + #: relaunched. + CUDA_ERROR_MPS_CLIENT_TERMINATED = cydriver.cudaError_enum.CUDA_ERROR_MPS_CLIENT_TERMINATED + + #: This error indicates that the module is using CUDA Dynamic + #: Parallelism, but the current configuration, like MPS, does not + #: support it. + CUDA_ERROR_CDP_NOT_SUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_CDP_NOT_SUPPORTED + + #: This error indicates that a module contains an unsupported + #: interaction between different versions of CUDA Dynamic Parallelism. + CUDA_ERROR_CDP_VERSION_MISMATCH = cydriver.cudaError_enum.CUDA_ERROR_CDP_VERSION_MISMATCH + + #: This error indicates that the operation is not permitted when the + #: stream is capturing. + CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED + + #: This error indicates that the current capture sequence on the stream + #: has been invalidated due to a previous error. + CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_INVALIDATED + + #: This error indicates that the operation would have resulted in a + #: merge of two independent capture sequences. + CUDA_ERROR_STREAM_CAPTURE_MERGE = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_MERGE + + #: This error indicates that the capture was not initiated in this + #: stream. + CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNMATCHED + + #: This error indicates that the capture sequence contains a fork that + #: was not joined to the primary stream. + CUDA_ERROR_STREAM_CAPTURE_UNJOINED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNJOINED + + #: This error indicates that a dependency would have been created which + #: crosses the capture sequence boundary. Only implicit in-stream + #: ordering dependencies are allowed to cross the boundary. + CUDA_ERROR_STREAM_CAPTURE_ISOLATION = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_ISOLATION + + #: This error indicates a disallowed implicit dependency on a current + #: capture sequence from cudaStreamLegacy. + CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT + + #: This error indicates that the operation is not permitted on an event + #: which was last recorded in a capturing stream. + CUDA_ERROR_CAPTURED_EVENT = cydriver.cudaError_enum.CUDA_ERROR_CAPTURED_EVENT + + #: A stream capture sequence not initiated with the + #: :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED` argument to + #: :py:obj:`~.cuStreamBeginCapture` was passed to + #: :py:obj:`~.cuStreamEndCapture` in a different thread. + CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD + + #: This error indicates that the timeout specified for the wait + #: operation has lapsed. + CUDA_ERROR_TIMEOUT = cydriver.cudaError_enum.CUDA_ERROR_TIMEOUT + + #: This error indicates that the graph update was not performed because + #: it included changes which violated constraints specific to + #: instantiated graph update. + CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = cydriver.cudaError_enum.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE + + #: This indicates that an async error has occurred in a device outside + #: of CUDA. If CUDA was waiting for an external device's signal before + #: consuming shared data, the external device signaled an error + #: indicating that the data is not valid for consumption. This leaves + #: the process in an inconsistent state and any further CUDA work will + #: return the same error. To continue using CUDA, the process must be + #: terminated and relaunched. + CUDA_ERROR_EXTERNAL_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_EXTERNAL_DEVICE + + #: Indicates a kernel launch error due to cluster misconfiguration. + CUDA_ERROR_INVALID_CLUSTER_SIZE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_CLUSTER_SIZE + + #: Indiciates a function handle is not loaded when calling an API that + #: requires a loaded function. + CUDA_ERROR_FUNCTION_NOT_LOADED = cydriver.cudaError_enum.CUDA_ERROR_FUNCTION_NOT_LOADED + + #: This error indicates one or more resources passed in are not valid + #: resource types for the operation. + CUDA_ERROR_INVALID_RESOURCE_TYPE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_TYPE + + #: This error indicates one or more resources are insufficient or non- + #: applicable for the operation. + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION + + #: This error indicates that an error happened during the key rotation + #: sequence. + CUDA_ERROR_KEY_ROTATION = cydriver.cudaError_enum.CUDA_ERROR_KEY_ROTATION + + #: This indicates that an unknown internal error has occurred. + CUDA_ERROR_UNKNOWN = cydriver.cudaError_enum.CUDA_ERROR_UNKNOWN + +_dict_CUresult = dict(((int(v), v) for k, v in CUresult.__members__.items())) + +class CUdevice_P2PAttribute(IntEnum): + """ + P2P Attributes + """ + + #: A relative value indicating the performance of the link between two + #: devices + CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK + + #: P2P Access is enable + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED + + #: Atomic operation over the link supported + CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED + + #: [Deprecated] + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED + + #: Accessing CUDA arrays over the link supported + CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED + +_dict_CUdevice_P2PAttribute = dict(((int(v), v) for k, v in CUdevice_P2PAttribute.__members__.items())) + +class CUresourceViewFormat(IntEnum): + """ + Resource view format + """ + + #: No resource view format (use underlying resource format) + CU_RES_VIEW_FORMAT_NONE = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_NONE + + #: 1 channel unsigned 8-bit integers + CU_RES_VIEW_FORMAT_UINT_1X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X8 + + #: 2 channel unsigned 8-bit integers + CU_RES_VIEW_FORMAT_UINT_2X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X8 + + #: 4 channel unsigned 8-bit integers + CU_RES_VIEW_FORMAT_UINT_4X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X8 + + #: 1 channel signed 8-bit integers + CU_RES_VIEW_FORMAT_SINT_1X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X8 + + #: 2 channel signed 8-bit integers + CU_RES_VIEW_FORMAT_SINT_2X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X8 + + #: 4 channel signed 8-bit integers + CU_RES_VIEW_FORMAT_SINT_4X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X8 + + #: 1 channel unsigned 16-bit integers + CU_RES_VIEW_FORMAT_UINT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X16 + + #: 2 channel unsigned 16-bit integers + CU_RES_VIEW_FORMAT_UINT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X16 + + #: 4 channel unsigned 16-bit integers + CU_RES_VIEW_FORMAT_UINT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X16 + + #: 1 channel signed 16-bit integers + CU_RES_VIEW_FORMAT_SINT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X16 + + #: 2 channel signed 16-bit integers + CU_RES_VIEW_FORMAT_SINT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X16 + + #: 4 channel signed 16-bit integers + CU_RES_VIEW_FORMAT_SINT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X16 + + #: 1 channel unsigned 32-bit integers + CU_RES_VIEW_FORMAT_UINT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X32 + + #: 2 channel unsigned 32-bit integers + CU_RES_VIEW_FORMAT_UINT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X32 + + #: 4 channel unsigned 32-bit integers + CU_RES_VIEW_FORMAT_UINT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X32 + + #: 1 channel signed 32-bit integers + CU_RES_VIEW_FORMAT_SINT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X32 + + #: 2 channel signed 32-bit integers + CU_RES_VIEW_FORMAT_SINT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X32 + + #: 4 channel signed 32-bit integers + CU_RES_VIEW_FORMAT_SINT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X32 + + #: 1 channel 16-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X16 + + #: 2 channel 16-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X16 + + #: 4 channel 16-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X16 + + #: 1 channel 32-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X32 + + #: 2 channel 32-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X32 + + #: 4 channel 32-bit floating point + CU_RES_VIEW_FORMAT_FLOAT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X32 + + #: Block compressed 1 + CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC1 + + #: Block compressed 2 + CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC2 + + #: Block compressed 3 + CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC3 + + #: Block compressed 4 unsigned + CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC4 + + #: Block compressed 4 signed + CU_RES_VIEW_FORMAT_SIGNED_BC4 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC4 + + #: Block compressed 5 unsigned + CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC5 + + #: Block compressed 5 signed + CU_RES_VIEW_FORMAT_SIGNED_BC5 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC5 + + #: Block compressed 6 unsigned half-float + CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC6H + + #: Block compressed 6 signed half-float + CU_RES_VIEW_FORMAT_SIGNED_BC6H = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC6H + + #: Block compressed 7 + CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7 + +_dict_CUresourceViewFormat = dict(((int(v), v) for k, v in CUresourceViewFormat.__members__.items())) + +class CUtensorMapDataType(IntEnum): + """ + Tensor map data type + """ + CU_TENSOR_MAP_DATA_TYPE_UINT8 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_UINT8 + CU_TENSOR_MAP_DATA_TYPE_UINT16 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_UINT16 + CU_TENSOR_MAP_DATA_TYPE_UINT32 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_UINT32 + CU_TENSOR_MAP_DATA_TYPE_INT32 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_INT32 + CU_TENSOR_MAP_DATA_TYPE_UINT64 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_UINT64 + CU_TENSOR_MAP_DATA_TYPE_INT64 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_INT64 + CU_TENSOR_MAP_DATA_TYPE_FLOAT16 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_FLOAT16 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_FLOAT32 + CU_TENSOR_MAP_DATA_TYPE_FLOAT64 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_FLOAT64 + CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 + CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 + CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B + CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B + +_dict_CUtensorMapDataType = dict(((int(v), v) for k, v in CUtensorMapDataType.__members__.items())) + +class CUtensorMapInterleave(IntEnum): + """ + Tensor map interleave layout type + """ + CU_TENSOR_MAP_INTERLEAVE_NONE = cydriver.CUtensorMapInterleave_enum.CU_TENSOR_MAP_INTERLEAVE_NONE + CU_TENSOR_MAP_INTERLEAVE_16B = cydriver.CUtensorMapInterleave_enum.CU_TENSOR_MAP_INTERLEAVE_16B + CU_TENSOR_MAP_INTERLEAVE_32B = cydriver.CUtensorMapInterleave_enum.CU_TENSOR_MAP_INTERLEAVE_32B + +_dict_CUtensorMapInterleave = dict(((int(v), v) for k, v in CUtensorMapInterleave.__members__.items())) + +class CUtensorMapSwizzle(IntEnum): + """ + Tensor map swizzling mode of shared memory banks + """ + CU_TENSOR_MAP_SWIZZLE_NONE = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_NONE + CU_TENSOR_MAP_SWIZZLE_32B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_32B + CU_TENSOR_MAP_SWIZZLE_64B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_64B + CU_TENSOR_MAP_SWIZZLE_128B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B + +_dict_CUtensorMapSwizzle = dict(((int(v), v) for k, v in CUtensorMapSwizzle.__members__.items())) + +class CUtensorMapL2promotion(IntEnum): + """ + Tensor map L2 promotion type + """ + CU_TENSOR_MAP_L2_PROMOTION_NONE = cydriver.CUtensorMapL2promotion_enum.CU_TENSOR_MAP_L2_PROMOTION_NONE + CU_TENSOR_MAP_L2_PROMOTION_L2_64B = cydriver.CUtensorMapL2promotion_enum.CU_TENSOR_MAP_L2_PROMOTION_L2_64B + CU_TENSOR_MAP_L2_PROMOTION_L2_128B = cydriver.CUtensorMapL2promotion_enum.CU_TENSOR_MAP_L2_PROMOTION_L2_128B + CU_TENSOR_MAP_L2_PROMOTION_L2_256B = cydriver.CUtensorMapL2promotion_enum.CU_TENSOR_MAP_L2_PROMOTION_L2_256B + +_dict_CUtensorMapL2promotion = dict(((int(v), v) for k, v in CUtensorMapL2promotion.__members__.items())) + +class CUtensorMapFloatOOBfill(IntEnum): + """ + Tensor map out-of-bounds fill type + """ + CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = cydriver.CUtensorMapFloatOOBfill_enum.CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE + CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = cydriver.CUtensorMapFloatOOBfill_enum.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA + +_dict_CUtensorMapFloatOOBfill = dict(((int(v), v) for k, v in CUtensorMapFloatOOBfill.__members__.items())) + +class CUtensorMapIm2ColWideMode(IntEnum): + """ + Tensor map Im2Col wide mode + """ + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W = cydriver.CUtensorMapIm2ColWideMode_enum.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 = cydriver.CUtensorMapIm2ColWideMode_enum.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 + +_dict_CUtensorMapIm2ColWideMode = dict(((int(v), v) for k, v in CUtensorMapIm2ColWideMode.__members__.items())) + +class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum): + """ + Access flags that specify the level of access the current context's + device has on the memory referenced. + """ + + #: No access, meaning the device cannot access this memory at all, thus + #: must be staged through accessible memory in order to complete + #: certain operations + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE + + #: Read-only access, meaning writes to this memory are considered + #: invalid accesses and thus return error in that case. + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ + + #: Read-write access, the device has full read-write access to the + #: memory + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE + +_dict_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS = dict(((int(v), v) for k, v in CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS.__members__.items())) + +class CUexternalMemoryHandleType(IntEnum): + """ + External memory handle types + """ + + #: Handle is an opaque file descriptor + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD + + #: Handle is an opaque shared NT handle + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 + + #: Handle is an opaque, globally shared handle + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT + + #: Handle is a D3D12 heap object + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP + + #: Handle is a D3D12 committed resource + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE + + #: Handle is a shared NT handle to a D3D11 resource + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE + + #: Handle is a globally shared handle to a D3D11 resource + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT + + #: Handle is an NvSciBuf object + CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF + +_dict_CUexternalMemoryHandleType = dict(((int(v), v) for k, v in CUexternalMemoryHandleType.__members__.items())) + +class CUexternalSemaphoreHandleType(IntEnum): + """ + External semaphore handle types + """ + + #: Handle is an opaque file descriptor + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD + + #: Handle is an opaque shared NT handle + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 + + #: Handle is an opaque, globally shared handle + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT + + #: Handle is a shared NT handle referencing a D3D12 fence object + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE + + #: Handle is a shared NT handle referencing a D3D11 fence object + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE + + #: Opaque handle to NvSciSync Object + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC + + #: Handle is a shared NT handle referencing a D3D11 keyed mutex object + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX + + #: Handle is a globally shared handle referencing a D3D11 keyed mutex + #: object + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT + + #: Handle is an opaque file descriptor referencing a timeline semaphore + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD + + #: Handle is an opaque shared NT handle referencing a timeline + #: semaphore + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 + +_dict_CUexternalSemaphoreHandleType = dict(((int(v), v) for k, v in CUexternalSemaphoreHandleType.__members__.items())) + +class CUmemAllocationHandleType(IntEnum): + """ + Flags for specifying particular handle types + """ + + #: Does not allow any export mechanism. > + CU_MEM_HANDLE_TYPE_NONE = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE + + #: Allows a file descriptor to be used for exporting. Permitted only on + #: POSIX systems. (int) + CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR + + #: Allows a Win32 NT handle to be used for exporting. (HANDLE) + CU_MEM_HANDLE_TYPE_WIN32 = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32 + + #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) + CU_MEM_HANDLE_TYPE_WIN32_KMT = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT + + #: Allows a fabric handle to be used for exporting. (CUmemFabricHandle) + CU_MEM_HANDLE_TYPE_FABRIC = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC + CU_MEM_HANDLE_TYPE_MAX = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX + +_dict_CUmemAllocationHandleType = dict(((int(v), v) for k, v in CUmemAllocationHandleType.__members__.items())) + +class CUmemAccess_flags(IntEnum): + """ + Specifies the memory protection flags for mapping. + """ + + #: Default, make the address range not accessible + CU_MEM_ACCESS_FLAGS_PROT_NONE = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_NONE + + #: Make the address range read accessible + CU_MEM_ACCESS_FLAGS_PROT_READ = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READ + + #: Make the address range read-write accessible + CU_MEM_ACCESS_FLAGS_PROT_READWRITE = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READWRITE + CU_MEM_ACCESS_FLAGS_PROT_MAX = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX + +_dict_CUmemAccess_flags = dict(((int(v), v) for k, v in CUmemAccess_flags.__members__.items())) + +class CUmemLocationType(IntEnum): + """ + Specifies the type of location + """ + CU_MEM_LOCATION_TYPE_INVALID = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_INVALID + + #: Location is a device location, thus id is a device ordinal + CU_MEM_LOCATION_TYPE_DEVICE = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE + + #: Location is host, id is ignored + CU_MEM_LOCATION_TYPE_HOST = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST + + #: Location is a host NUMA node, thus id is a host NUMA node id + CU_MEM_LOCATION_TYPE_HOST_NUMA = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA + + #: Location is a host NUMA node of the current thread, id is ignored + CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT + CU_MEM_LOCATION_TYPE_MAX = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX + +_dict_CUmemLocationType = dict(((int(v), v) for k, v in CUmemLocationType.__members__.items())) + +class CUmemAllocationType(IntEnum): + """ + Defines the allocation types available + """ + CU_MEM_ALLOCATION_TYPE_INVALID = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_INVALID + + #: This allocation type is 'pinned', i.e. cannot migrate from its + #: current location while the application is actively using it + CU_MEM_ALLOCATION_TYPE_PINNED = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_PINNED + CU_MEM_ALLOCATION_TYPE_MAX = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX + +_dict_CUmemAllocationType = dict(((int(v), v) for k, v in CUmemAllocationType.__members__.items())) + +class CUmemAllocationGranularity_flags(IntEnum): + """ + Flag for requesting different optimal and required granularities + for an allocation. + """ + + #: Minimum required granularity for allocation + CU_MEM_ALLOC_GRANULARITY_MINIMUM = cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_MINIMUM + + #: Recommended granularity for allocation for best performance + CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED + +_dict_CUmemAllocationGranularity_flags = dict(((int(v), v) for k, v in CUmemAllocationGranularity_flags.__members__.items())) + +class CUmemRangeHandleType(IntEnum): + """ + Specifies the handle type for address range + """ + CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = cydriver.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD + CU_MEM_RANGE_HANDLE_TYPE_MAX = cydriver.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX + +_dict_CUmemRangeHandleType = dict(((int(v), v) for k, v in CUmemRangeHandleType.__members__.items())) + +class CUmemRangeFlags(IntEnum): + """ + Flag for requesting handle type for address range. + """ + + #: Indicates that DMA_BUF handle should be mapped via PCIe BAR1 + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = cydriver.CUmemRangeFlags_enum.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE + +_dict_CUmemRangeFlags = dict(((int(v), v) for k, v in CUmemRangeFlags.__members__.items())) + +class CUarraySparseSubresourceType(IntEnum): + """ + Sparse subresource types + """ + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = cydriver.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL + CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = cydriver.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL + +_dict_CUarraySparseSubresourceType = dict(((int(v), v) for k, v in CUarraySparseSubresourceType.__members__.items())) + +class CUmemOperationType(IntEnum): + """ + Memory operation types + """ + CU_MEM_OPERATION_TYPE_MAP = cydriver.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_MAP + CU_MEM_OPERATION_TYPE_UNMAP = cydriver.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP + +_dict_CUmemOperationType = dict(((int(v), v) for k, v in CUmemOperationType.__members__.items())) + +class CUmemHandleType(IntEnum): + """ + Memory handle types + """ + CU_MEM_HANDLE_TYPE_GENERIC = cydriver.CUmemHandleType_enum.CU_MEM_HANDLE_TYPE_GENERIC + +_dict_CUmemHandleType = dict(((int(v), v) for k, v in CUmemHandleType.__members__.items())) + +class CUmemAllocationCompType(IntEnum): + """ + Specifies compression attribute for an allocation. + """ + + #: Allocating non-compressible memory + CU_MEM_ALLOCATION_COMP_NONE = cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_NONE + + #: Allocating compressible memory + CU_MEM_ALLOCATION_COMP_GENERIC = cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC + +_dict_CUmemAllocationCompType = dict(((int(v), v) for k, v in CUmemAllocationCompType.__members__.items())) + +class CUmulticastGranularity_flags(IntEnum): + """ + Flags for querying different granularities for a multicast object + """ + + #: Minimum required granularity + CU_MULTICAST_GRANULARITY_MINIMUM = cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_MINIMUM + + #: Recommended granularity for best performance + CU_MULTICAST_GRANULARITY_RECOMMENDED = cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_RECOMMENDED + +_dict_CUmulticastGranularity_flags = dict(((int(v), v) for k, v in CUmulticastGranularity_flags.__members__.items())) + +class CUgraphExecUpdateResult(IntEnum): + """ + CUDA Graph Update error types + """ + + #: The update succeeded + CU_GRAPH_EXEC_UPDATE_SUCCESS = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_SUCCESS + + #: The update failed for an unexpected reason which is described in the + #: return value of the function + CU_GRAPH_EXEC_UPDATE_ERROR = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR + + #: The update failed because the topology changed + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED + + #: The update failed because a node type changed + CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED + + #: The update failed because the function of a kernel node changed + #: (CUDA driver < 11.2) + CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED + + #: The update failed because the parameters changed in a way that is + #: not supported + CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED + + #: The update failed because something about the node is not supported + CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED + + #: The update failed because the function of a kernel node changed in + #: an unsupported way + CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE + + #: The update failed because the node attributes changed in a way that + #: is not supported + CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED + +_dict_CUgraphExecUpdateResult = dict(((int(v), v) for k, v in CUgraphExecUpdateResult.__members__.items())) + +class CUmemPool_attribute(IntEnum): + """ + CUDA memory pool attributes + """ + + #: (value type = int) Allow cuMemAllocAsync to use memory + #: asynchronously freed in another streams as long as a stream ordering + #: dependency of the allocating stream on the free action exists. Cuda + #: events and null stream interactions can create the required stream + #: ordered dependencies. (default enabled) + CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES + + #: (value type = int) Allow reuse of already completed frees when there + #: is no dependency between the free and allocation. (default enabled) + CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC + + #: (value type = int) Allow cuMemAllocAsync to insert new stream + #: dependencies in order to establish the stream ordering required to + #: reuse a piece of memory released by cuFreeAsync (default enabled). + CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES + + #: (value type = cuuint64_t) Amount of reserved memory in bytes to hold + #: onto before trying to release memory back to the OS. When more than + #: the release threshold bytes of memory are held by the memory pool, + #: the allocator will try to release memory back to the OS on the next + #: call to stream, event or context synchronize. (default 0) + CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD + + #: (value type = cuuint64_t) Amount of backing memory currently + #: allocated for the mempool. + CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT + + #: (value type = cuuint64_t) High watermark of backing memory allocated + #: for the mempool since the last time it was reset. High watermark can + #: only be reset to zero. + CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH + + #: (value type = cuuint64_t) Amount of memory from the pool that is + #: currently in use by the application. + CU_MEMPOOL_ATTR_USED_MEM_CURRENT = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT + + #: (value type = cuuint64_t) High watermark of the amount of memory + #: from the pool that was in use by the application since the last time + #: it was reset. High watermark can only be reset to zero. + CU_MEMPOOL_ATTR_USED_MEM_HIGH = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH + +_dict_CUmemPool_attribute = dict(((int(v), v) for k, v in CUmemPool_attribute.__members__.items())) + +class CUmemcpyFlags(IntEnum): + """ + Flags to specify for copies within a batch. For more details see + :py:obj:`~.cuMemcpyBatchAsync`. + """ + CU_MEMCPY_FLAG_DEFAULT = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_DEFAULT + + #: Hint to the driver to try and overlap the copy with compute work on + #: the SMs. + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE + +_dict_CUmemcpyFlags = dict(((int(v), v) for k, v in CUmemcpyFlags.__members__.items())) + +class CUmemcpySrcAccessOrder(IntEnum): + """ + These flags allow applications to convey the source access ordering + CUDA must maintain. The destination will always be accessed in + stream order. + """ + + #: Default invalid. + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_INVALID + + #: Indicates that access to the source pointer must be in stream order. + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM + + #: Indicates that access to the source pointer can be out of stream + #: order and all accesses must be complete before the API call returns. + #: This flag is suited for ephemeral sources (ex., stack variables) + #: when it's known that no prior operations in the stream can be + #: accessing the memory and also that the lifetime of the memory is + #: limited to the scope that the source variable was declared in. + #: Specifying this flag allows the driver to optimize the copy and + #: removes the need for the user to synchronize the stream after the + #: API call. + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL + + #: Indicates that access to the source pointer can be out of stream + #: order and the accesses can happen even after the API call returns. + #: This flag is suited for host pointers allocated outside CUDA (ex., + #: via malloc) when it's known that no prior operations in the stream + #: can be accessing the memory. Specifying this flag allows the driver + #: to optimize the copy on certain platforms. + CU_MEMCPY_SRC_ACCESS_ORDER_ANY = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_ANY + CU_MEMCPY_SRC_ACCESS_ORDER_MAX = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_MAX + +_dict_CUmemcpySrcAccessOrder = dict(((int(v), v) for k, v in CUmemcpySrcAccessOrder.__members__.items())) + +class CUmemcpy3DOperandType(IntEnum): + """ + These flags allow applications to convey the operand type for + individual copies specified in :py:obj:`~.cuMemcpy3DBatchAsync`. + """ + + #: Memcpy operand is a valid pointer. + CU_MEMCPY_OPERAND_TYPE_POINTER = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_POINTER + + #: Memcpy operand is a CUarray. + CU_MEMCPY_OPERAND_TYPE_ARRAY = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_ARRAY + CU_MEMCPY_OPERAND_TYPE_MAX = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_MAX + +_dict_CUmemcpy3DOperandType = dict(((int(v), v) for k, v in CUmemcpy3DOperandType.__members__.items())) + +class CUgraphMem_attribute(IntEnum): + """ + + """ + + #: (value type = cuuint64_t) Amount of memory, in bytes, currently + #: associated with graphs + CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT + + #: (value type = cuuint64_t) High watermark of memory, in bytes, + #: associated with graphs since the last time it was reset. High + #: watermark can only be reset to zero. + CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH + + #: (value type = cuuint64_t) Amount of memory, in bytes, currently + #: allocated for use by the CUDA graphs asynchronous allocator. + CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT + + #: (value type = cuuint64_t) High watermark of memory, in bytes, + #: currently allocated for use by the CUDA graphs asynchronous + #: allocator. + CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH + +_dict_CUgraphMem_attribute = dict(((int(v), v) for k, v in CUgraphMem_attribute.__members__.items())) + +class CUgraphChildGraphNodeOwnership(IntEnum): + """ + Child graph node ownership + """ + + #: Default behavior for a child graph node. Child graph is cloned into + #: the parent and memory allocation/free nodes can't be present in the + #: child graph. + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE = cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE + + #: The child graph is moved to the parent. The handle to the child + #: graph is owned by the parent and will be destroyed when the parent + #: is destroyed. + #: + #: The following restrictions apply to child graphs after they have + #: been moved: Cannot be independently instantiated or destroyed; + #: Cannot be added as a child graph of a separate parent graph; Cannot + #: be used as an argument to cuGraphExecUpdate; Cannot have additional + #: memory allocation or free nodes added. + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE = cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE + +_dict_CUgraphChildGraphNodeOwnership = dict(((int(v), v) for k, v in CUgraphChildGraphNodeOwnership.__members__.items())) + +class CUflushGPUDirectRDMAWritesOptions(IntEnum): + """ + Bitmasks for + :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS` + """ + + #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` and its CUDA Runtime API + #: counterpart are supported on the device. + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST + + #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the + #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported + #: on the device. + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS + +_dict_CUflushGPUDirectRDMAWritesOptions = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesOptions.__members__.items())) + +class CUGPUDirectRDMAWritesOrdering(IntEnum): + """ + Platform native ordering for GPUDirect RDMA writes + """ + + #: The device does not natively support ordering of remote writes. + #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` can be leveraged if + #: supported. + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE + + #: Natively, the device can consistently consume remote writes, + #: although other CUDA devices may not. + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER + + #: Any CUDA device in the system can consistently consume remote writes + #: to this device. + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES + +_dict_CUGPUDirectRDMAWritesOrdering = dict(((int(v), v) for k, v in CUGPUDirectRDMAWritesOrdering.__members__.items())) + +class CUflushGPUDirectRDMAWritesScope(IntEnum): + """ + The scopes for :py:obj:`~.cuFlushGPUDirectRDMAWrites` + """ + + #: Blocks until remote writes are visible to the CUDA device context + #: owning the data. + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER + + #: Blocks until remote writes are visible to all CUDA device contexts. + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES + +_dict_CUflushGPUDirectRDMAWritesScope = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesScope.__members__.items())) + +class CUflushGPUDirectRDMAWritesTarget(IntEnum): + """ + The targets for :py:obj:`~.cuFlushGPUDirectRDMAWrites` + """ + + #: Sets the target for :py:obj:`~.cuFlushGPUDirectRDMAWrites()` to the + #: currently active CUDA device context. + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = cydriver.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX + +_dict_CUflushGPUDirectRDMAWritesTarget = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesTarget.__members__.items())) + +class CUgraphDebugDot_flags(IntEnum): + """ + The additional write options for :py:obj:`~.cuGraphDebugDotPrint` + """ + + #: Output all debug data as if every debug flag is enabled + CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE + + #: Use CUDA Runtime structures for output + CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES + + #: Adds CUDA_KERNEL_NODE_PARAMS values to output + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS + + #: Adds CUDA_MEMCPY3D values to output + CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS + + #: Adds CUDA_MEMSET_NODE_PARAMS values to output + CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS + + #: Adds CUDA_HOST_NODE_PARAMS values to output + CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS + + #: Adds CUevent handle from record and wait nodes to output + CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS + + #: Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS + + #: Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS + + #: Adds CUkernelNodeAttrValue values to output + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES + + #: Adds node handles and every kernel function handle to output + CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES + + #: Adds memory alloc node parameters to output + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS + + #: Adds memory free node parameters to output + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS + + #: Adds batch mem op node parameters to output + CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS + + #: Adds edge numbering information + CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO + + #: Adds conditional node parameters to output + CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS + +_dict_CUgraphDebugDot_flags = dict(((int(v), v) for k, v in CUgraphDebugDot_flags.__members__.items())) + +class CUuserObject_flags(IntEnum): + """ + Flags for user objects for graphs + """ + + #: Indicates the destructor execution is not synchronized by any CUDA + #: handle. + CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = cydriver.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC + +_dict_CUuserObject_flags = dict(((int(v), v) for k, v in CUuserObject_flags.__members__.items())) + +class CUuserObjectRetain_flags(IntEnum): + """ + Flags for retaining user object references for graphs + """ + + #: Transfer references from the caller rather than creating new + #: references. + CU_GRAPH_USER_OBJECT_MOVE = cydriver.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE + +_dict_CUuserObjectRetain_flags = dict(((int(v), v) for k, v in CUuserObjectRetain_flags.__members__.items())) + +class CUgraphInstantiate_flags(IntEnum): + """ + Flags for instantiating a graph + """ + + #: Automatically free memory allocated in a graph before relaunching. + CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH + + #: Automatically upload the graph after instantiation. Only supported + #: by :py:obj:`~.cuGraphInstantiateWithParams`. The upload will be + #: performed using the stream provided in `instantiateParams`. + CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD + + #: Instantiate the graph to be launchable from the device. This flag + #: can only be used on platforms which support unified addressing. This + #: flag cannot be used in conjunction with + #: CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH. + CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH + + #: Run the graph using the per-node priority attributes rather than the + #: priority of the stream it is launched into. + CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY + +_dict_CUgraphInstantiate_flags = dict(((int(v), v) for k, v in CUgraphInstantiate_flags.__members__.items())) + +class CUdeviceNumaConfig(IntEnum): + """ + CUDA device NUMA configuration + """ + + #: The GPU is not a NUMA node + CU_DEVICE_NUMA_CONFIG_NONE = cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NONE + + #: The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its + #: NUMA ID + CU_DEVICE_NUMA_CONFIG_NUMA_NODE = cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NUMA_NODE + +_dict_CUdeviceNumaConfig = dict(((int(v), v) for k, v in CUdeviceNumaConfig.__members__.items())) + +class CUprocessState(IntEnum): + """ + CUDA Process States + """ + + #: Default process state + CU_PROCESS_STATE_RUNNING = cydriver.CUprocessState_enum.CU_PROCESS_STATE_RUNNING + + #: CUDA API locks are taken so further CUDA API calls will block + CU_PROCESS_STATE_LOCKED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_LOCKED + + #: Application memory contents have been checkpointed and underlying + #: allocations and device handles have been released + CU_PROCESS_STATE_CHECKPOINTED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_CHECKPOINTED + + #: Application entered an uncorrectable error during the + #: checkpoint/restore process + CU_PROCESS_STATE_FAILED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_FAILED + +_dict_CUprocessState = dict(((int(v), v) for k, v in CUprocessState.__members__.items())) + +class CUmoduleLoadingMode(IntEnum): + """ + CUDA Lazy Loading status + """ + + #: Lazy Kernel Loading is not enabled + CU_MODULE_EAGER_LOADING = cydriver.CUmoduleLoadingMode_enum.CU_MODULE_EAGER_LOADING + + #: Lazy Kernel Loading is enabled + CU_MODULE_LAZY_LOADING = cydriver.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING + +_dict_CUmoduleLoadingMode = dict(((int(v), v) for k, v in CUmoduleLoadingMode.__members__.items())) + +class CUmemDecompressAlgorithm(IntEnum): + """ + Bitmasks for CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK. + """ + + #: Decompression is unsupported. + CU_MEM_DECOMPRESS_UNSUPPORTED = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_UNSUPPORTED + + #: Deflate is supported. + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE + + #: Snappy is supported. + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY + + #: LZ4 is supported. + CU_MEM_DECOMPRESS_ALGORITHM_LZ4 = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_LZ4 + +_dict_CUmemDecompressAlgorithm = dict(((int(v), v) for k, v in CUmemDecompressAlgorithm.__members__.items())) + +class CUfunctionLoadingState(IntEnum): + """ + + """ + CU_FUNCTION_LOADING_STATE_UNLOADED = cydriver.CUfunctionLoadingState_enum.CU_FUNCTION_LOADING_STATE_UNLOADED + CU_FUNCTION_LOADING_STATE_LOADED = cydriver.CUfunctionLoadingState_enum.CU_FUNCTION_LOADING_STATE_LOADED + CU_FUNCTION_LOADING_STATE_MAX = cydriver.CUfunctionLoadingState_enum.CU_FUNCTION_LOADING_STATE_MAX + +_dict_CUfunctionLoadingState = dict(((int(v), v) for k, v in CUfunctionLoadingState.__members__.items())) + +class CUcoredumpSettings(IntEnum): + """ + Flags for choosing a coredump attribute to get/set + """ + CU_COREDUMP_ENABLE_ON_EXCEPTION = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION + CU_COREDUMP_TRIGGER_HOST = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST + CU_COREDUMP_LIGHTWEIGHT = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT + CU_COREDUMP_ENABLE_USER_TRIGGER = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER + CU_COREDUMP_FILE = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE + CU_COREDUMP_PIPE = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE + CU_COREDUMP_GENERATION_FLAGS = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_GENERATION_FLAGS + CU_COREDUMP_MAX = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_MAX + +_dict_CUcoredumpSettings = dict(((int(v), v) for k, v in CUcoredumpSettings.__members__.items())) + +class CUCoredumpGenerationFlags(IntEnum): + """ + Flags for controlling coredump contents + """ + CU_COREDUMP_DEFAULT_FLAGS = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_DEFAULT_FLAGS + CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES + CU_COREDUMP_SKIP_GLOBAL_MEMORY = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_GLOBAL_MEMORY + CU_COREDUMP_SKIP_SHARED_MEMORY = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_SHARED_MEMORY + CU_COREDUMP_SKIP_LOCAL_MEMORY = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_LOCAL_MEMORY + CU_COREDUMP_SKIP_ABORT = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_ABORT + CU_COREDUMP_SKIP_CONSTBANK_MEMORY = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_SKIP_CONSTBANK_MEMORY + CU_COREDUMP_LIGHTWEIGHT_FLAGS = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_LIGHTWEIGHT_FLAGS + +_dict_CUCoredumpGenerationFlags = dict(((int(v), v) for k, v in CUCoredumpGenerationFlags.__members__.items())) + +class CUgreenCtxCreate_flags(IntEnum): + """ + + """ + + #: Required. Creates a default stream to use inside the green context + CU_GREEN_CTX_DEFAULT_STREAM = cydriver.CUgreenCtxCreate_flags.CU_GREEN_CTX_DEFAULT_STREAM + +_dict_CUgreenCtxCreate_flags = dict(((int(v), v) for k, v in CUgreenCtxCreate_flags.__members__.items())) + +class CUdevSmResourceSplit_flags(IntEnum): + """ + + """ + CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING = cydriver.CUdevSmResourceSplit_flags.CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING + CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE = cydriver.CUdevSmResourceSplit_flags.CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE + +_dict_CUdevSmResourceSplit_flags = dict(((int(v), v) for k, v in CUdevSmResourceSplit_flags.__members__.items())) + +class CUdevResourceType(IntEnum): + """ + Type of resource + """ + CU_DEV_RESOURCE_TYPE_INVALID = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_INVALID + + #: Streaming multiprocessors related information + CU_DEV_RESOURCE_TYPE_SM = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_SM + +_dict_CUdevResourceType = dict(((int(v), v) for k, v in CUdevResourceType.__members__.items())) + +class CUlogLevel(IntEnum): + """ + + """ + CU_LOG_LEVEL_ERROR = cydriver.CUlogLevel_enum.CU_LOG_LEVEL_ERROR + CU_LOG_LEVEL_WARNING = cydriver.CUlogLevel_enum.CU_LOG_LEVEL_WARNING + +_dict_CUlogLevel = dict(((int(v), v) for k, v in CUlogLevel.__members__.items())) + +class CUoutput_mode(IntEnum): + """ + Profiler Output Modes + """ + + #: Output mode Key-Value pair format. + CU_OUT_KEY_VALUE_PAIR = cydriver.CUoutput_mode_enum.CU_OUT_KEY_VALUE_PAIR + + #: Output mode Comma separated values format. + CU_OUT_CSV = cydriver.CUoutput_mode_enum.CU_OUT_CSV + +_dict_CUoutput_mode = dict(((int(v), v) for k, v in CUoutput_mode.__members__.items())) + +class CUeglFrameType(IntEnum): + """ + CUDA EglFrame type - array or pointer + """ + + #: Frame type CUDA array + CU_EGL_FRAME_TYPE_ARRAY = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY + + #: Frame type pointer + CU_EGL_FRAME_TYPE_PITCH = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH + +_dict_CUeglFrameType = dict(((int(v), v) for k, v in CUeglFrameType.__members__.items())) + +class CUeglResourceLocationFlags(IntEnum): + """ + Resource location flags- sysmem or vidmem For CUDA context on + iGPU, since video and system memory are equivalent - these flags + will not have an effect on the execution. For CUDA context on + dGPU, applications can use the flag + :py:obj:`~.CUeglResourceLocationFlags` to give a hint about the + desired location. :py:obj:`~.CU_EGL_RESOURCE_LOCATION_SYSMEM` - + the frame data is made resident on the system memory to be accessed + by CUDA. :py:obj:`~.CU_EGL_RESOURCE_LOCATION_VIDMEM` - the frame + data is made resident on the dedicated video memory to be accessed + by CUDA. There may be an additional latency due to new allocation + and data migration, if the frame is produced on a different memory. + """ + + #: Resource location sysmem + CU_EGL_RESOURCE_LOCATION_SYSMEM = cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_SYSMEM + + #: Resource location vidmem + CU_EGL_RESOURCE_LOCATION_VIDMEM = cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM + +_dict_CUeglResourceLocationFlags = dict(((int(v), v) for k, v in CUeglResourceLocationFlags.__members__.items())) + +class CUeglColorFormat(IntEnum): + """ + CUDA EGL Color Format - The different planar and multiplanar + formats currently supported for CUDA_EGL interops. Three channel + formats are currently not supported for + :py:obj:`~.CU_EGL_FRAME_TYPE_ARRAY` + """ + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR + + #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, + #: width, height ratio same as YUV420Planar. + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR + + #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V + #: height = Y height. + CU_EGL_COLOR_FORMAT_YUV422_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR + + #: Y, UV in two surfaces with VU byte ordering, width, height ratio + #: same as YUV422Planar. + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR + + #: R/G/B three channels in one surface with BGR byte ordering. Only + #: pitch linear format supported. + CU_EGL_COLOR_FORMAT_RGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGB + + #: R/G/B three channels in one surface with RGB byte ordering. Only + #: pitch linear format supported. + CU_EGL_COLOR_FORMAT_BGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGR + + #: R/G/B/A four channels in one surface with BGRA byte ordering. + CU_EGL_COLOR_FORMAT_ARGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB + + #: R/G/B/A four channels in one surface with ABGR byte ordering. + CU_EGL_COLOR_FORMAT_RGBA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA + + #: single luminance channel in one surface. + CU_EGL_COLOR_FORMAT_L = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L + + #: single color channel in one surface. + CU_EGL_COLOR_FORMAT_R = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y + #: width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YUV444_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR + + #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, + #: width, height ratio same as YUV444Planar. + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + CU_EGL_COLOR_FORMAT_YUYV_422 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 + + #: Y, U, V in one surface, interleaved as YUYV in one channel. + CU_EGL_COLOR_FORMAT_UYVY_422 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + + #: R/G/B/A four channels in one surface with RGBA byte ordering. + CU_EGL_COLOR_FORMAT_ABGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR + + #: R/G/B/A four channels in one surface with ARGB byte ordering. + CU_EGL_COLOR_FORMAT_BGRA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA + + #: Alpha color format - one channel in one surface. + CU_EGL_COLOR_FORMAT_A = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A + + #: R/G color format - two channels in one surface with GR byte ordering + CU_EGL_COLOR_FORMAT_RG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG + + #: Y, U, V, A four channels in one surface, interleaved as VUYA. + CU_EGL_COLOR_FORMAT_AYUV = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = 1/2 Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR + + #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR + + #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR + + #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR + + #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR + + #: Extended Range Y, U, V in one surface, interleaved as YVYU in one + #: channel. + CU_EGL_COLOR_FORMAT_VYUY_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER + + #: Extended Range Y, U, V in one surface, interleaved as YUYV in one + #: channel. + CU_EGL_COLOR_FORMAT_UYVY_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + CU_EGL_COLOR_FORMAT_YUYV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER + + #: Extended Range Y, U, V in one surface, interleaved as VYUY in one + #: channel. + CU_EGL_COLOR_FORMAT_YVYU_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER + + #: Extended Range Y, U, V three channels in one surface, interleaved as + #: VUY. Only pitch linear format supported. + CU_EGL_COLOR_FORMAT_YUV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV_ER + + #: Extended Range Y, U, V, A four channels in one surface, interleaved + #: as AVUY. + CU_EGL_COLOR_FORMAT_YUVA_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER + + #: Extended Range Y, U, V, A four channels in one surface, interleaved + #: as VUYA. + CU_EGL_COLOR_FORMAT_AYUV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V + #: height = Y height. + CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, + #: U/V height = Y height. + CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V + #: height = Y height. + CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, + #: U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER + + #: Bayer format - one channel in one surface with interleaved RGGB + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB + + #: Bayer format - one channel in one surface with interleaved BGGR + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR + + #: Bayer format - one channel in one surface with interleaved GRBG + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG + + #: Bayer format - one channel in one surface with interleaved GBRG + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG + + #: Bayer10 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER10_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB + + #: Bayer10 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER10_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR + + #: Bayer10 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER10_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG + + #: Bayer10 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER10_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG + + #: Bayer12 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB + + #: Bayer12 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR + + #: Bayer12 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG + + #: Bayer12 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG + + #: Bayer14 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER14_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB + + #: Bayer14 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER14_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR + + #: Bayer14 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER14_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG + + #: Bayer14 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER14_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG + + #: Bayer20 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER20_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB + + #: Bayer20 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER20_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR + + #: Bayer20 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER20_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG + + #: Bayer20 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER20_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y + #: width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU444_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_YVU422_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved RGGB ordering and mapped to opaque integer + #: datatype. + CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved BGGR ordering and mapped to opaque integer + #: datatype. + CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved GRBG ordering and mapped to opaque integer + #: datatype. + CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved GBRG ordering and mapped to opaque integer + #: datatype. + CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG + + #: Bayer format - one channel in one surface with interleaved BCCR + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_BCCR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR + + #: Bayer format - one channel in one surface with interleaved RCCB + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_RCCB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB + + #: Bayer format - one channel in one surface with interleaved CRBC + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_CRBC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC + + #: Bayer format - one channel in one surface with interleaved CBRC + #: ordering. + CU_EGL_COLOR_FORMAT_BAYER_CBRC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC + + #: Bayer10 format - one channel in one surface with interleaved CCCC + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER10_CCCC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC + + #: Bayer12 format - one channel in one surface with interleaved BCCR + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_BCCR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR + + #: Bayer12 format - one channel in one surface with interleaved RCCB + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_RCCB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB + + #: Bayer12 format - one channel in one surface with interleaved CRBC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_CRBC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC + + #: Bayer12 format - one channel in one surface with interleaved CBRC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_CBRC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC + + #: Bayer12 format - one channel in one surface with interleaved CCCC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + CU_EGL_COLOR_FORMAT_BAYER12_CCCC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC + + #: Color format for single Y plane. + CU_EGL_COLOR_FORMAT_Y = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y + + #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 + + #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 + + #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V + #: height= 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 + + #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V + #: height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 + + #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 + + #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 + + #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V + #: height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 + + #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V + #: height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 + + #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y + #: width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 + + #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y + #: width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 + + #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 + + #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR + + #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 + + #: Extended Range Color format for single Y plane. + CU_EGL_COLOR_FORMAT_Y_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER + + #: Extended Range Color format for single Y plane. + CU_EGL_COLOR_FORMAT_Y_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER + + #: Extended Range Color format for single Y10 plane. + CU_EGL_COLOR_FORMAT_Y10_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER + + #: Extended Range Color format for single Y10 plane. + CU_EGL_COLOR_FORMAT_Y10_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER + + #: Extended Range Color format for single Y12 plane. + CU_EGL_COLOR_FORMAT_Y12_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER + + #: Extended Range Color format for single Y12 plane. + CU_EGL_COLOR_FORMAT_Y12_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER + + #: Y, U, V, A four channels in one surface, interleaved as AVUY. + CU_EGL_COLOR_FORMAT_YUVA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA + + #: Y, U, V three channels in one surface, interleaved as VUY. Only + #: pitch linear format supported. + CU_EGL_COLOR_FORMAT_YUV = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV + + #: Y, U, V in one surface, interleaved as YVYU in one channel. + CU_EGL_COLOR_FORMAT_YVYU = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU + + #: Y, U, V in one surface, interleaved as VYUY in one channel. + CU_EGL_COLOR_FORMAT_VYUY = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY + + #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER + + #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + CU_EGL_COLOR_FORMAT_UYVY_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + CU_EGL_COLOR_FORMAT_UYVY_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + CU_EGL_COLOR_FORMAT_UYVY_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 + CU_EGL_COLOR_FORMAT_MAX = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX + +_dict_CUeglColorFormat = dict(((int(v), v) for k, v in CUeglColorFormat.__members__.items())) + +class CUGLDeviceList(IntEnum): + """ + CUDA devices corresponding to an OpenGL device + """ + + #: The CUDA devices for all GPUs used by the current OpenGL context + CU_GL_DEVICE_LIST_ALL = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_ALL + + #: The CUDA devices for the GPUs used by the current OpenGL context in + #: its currently rendering frame + CU_GL_DEVICE_LIST_CURRENT_FRAME = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_CURRENT_FRAME + + #: The CUDA devices for the GPUs to be used by the current OpenGL + #: context in the next frame + CU_GL_DEVICE_LIST_NEXT_FRAME = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME + +_dict_CUGLDeviceList = dict(((int(v), v) for k, v in CUGLDeviceList.__members__.items())) + +class CUGLmap_flags(IntEnum): + """ + Flags to map or unmap a resource + """ + CU_GL_MAP_RESOURCE_FLAGS_NONE = cydriver.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_NONE + CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = cydriver.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY + CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = cydriver.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD + +_dict_CUGLmap_flags = dict(((int(v), v) for k, v in CUGLmap_flags.__members__.items())) + +cdef class CUdeviceptr: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUdevice: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUtexObject: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUsurfObject: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraphConditionalHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +class CUkernelNodeAttrID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.CUlaunchAttribute` + """ + + #: Ignored entry, for convenient composition + CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE + + #: Valid for streams. See + #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + + #: Valid for launches. Setting + #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event through PTX launchdep.release + #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). + #: A trigger can also be inserted at the beginning of each block's + #: execution if triggerAtBlockStart is set to non-0. The dependent + #: launches can choose to wait on the dependency using the programmatic + #: sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger + #: long after the associated kernel has completed. This recording type + #: is primarily meant for establishing programmatic dependency between + #: device tasks. Note also this type of dependency allows, but does not + #: guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.priority`. + CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this + #: functionality, a node cannot opt out, and any attempt to set the + #: deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cuGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage + #: between 0-100 signals the CUDA driver to set the shared memory + #: carveout preference, in percent of the total shared memory for that + #: kernel launch. This attribute takes precedence over + #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This + #: is only a hint, and the CUDA driver can choose a different + #: configuration if required for the launch. + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + +_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + +class CUstreamAttrID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.CUlaunchAttribute` + """ + + #: Ignored entry, for convenient composition + CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE + + #: Valid for streams. See + #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE + + #: Valid for launches. Setting + #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event through PTX launchdep.release + #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). + #: A trigger can also be inserted at the beginning of each block's + #: execution if triggerAtBlockStart is set to non-0. The dependent + #: launches can choose to wait on the dependency using the programmatic + #: sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger + #: long after the associated kernel has completed. This recording type + #: is primarily meant for establishing programmatic dependency between + #: device tasks. Note also this type of dependency allows, but does not + #: guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.priority`. + CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + + #: Valid for launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this + #: functionality, a node cannot opt out, and any attempt to set the + #: deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cuGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage + #: between 0-100 signals the CUDA driver to set the shared memory + #: carveout preference, in percent of the total shared memory for that + #: kernel launch. This attribute takes precedence over + #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This + #: is only a hint, and the CUDA driver can choose a different + #: configuration if required for the launch. + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT + +_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + +cdef class CUmemGenericAllocationHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUcontext: + """ + + A regular context handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUcontext): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUmodule: + """ + + CUDA module + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUmodule): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUfunction: + """ + + CUDA function + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUfunction): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUlibrary: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUlibrary): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUkernel: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUkernel): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUarray: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUarray): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUmipmappedArray: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUmipmappedArray): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUtexref: + """ + + CUDA texture reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUtexref): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUsurfref: + """ + + CUDA surface reference + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUsurfref): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUevent: + """ + + CUDA event + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUevent): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUstream: + """ + + CUDA stream + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUstream): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraphicsResource: + """ + + CUDA graphics interop resource + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgraphicsResource): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUexternalMemory: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUexternalMemory): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUexternalSemaphore: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUexternalSemaphore): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraph: + """ + + CUDA graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgraph): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraphNode: + """ + + CUDA graph node + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgraphNode): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraphExec: + """ + + CUDA executable graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgraphExec): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUmemoryPool: + """ + + CUDA memory pool + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUmemoryPool): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUuserObject: + """ + + CUDA user object for graphs + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUuserObject): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgraphDeviceNode: + """ + + CUDA graph device node handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgraphDeviceNode): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUasyncCallbackHandle: + """ + + CUDA async notification callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUasyncCallbackHandle): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUgreenCtx: + """ + + A green context handle. This handle can be used safely from only one CPU thread at a time. Created via cuGreenCtxCreate + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUgreenCtx): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUlinkState: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + self._keepalive = [] + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUlinkState): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUdevResourceDesc: + """ + + An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via cuDevResourceGenerateDesc + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUdevResourceDesc): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUlogsCallbackHandle: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUlogsCallbackHandle): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUeglStreamConnection: + """ + + CUDA EGLSream Connection + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUeglStreamConnection): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLImageKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLStreamKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLSyncKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUasyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUhostFn: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUstreamCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUoccupancyB2DSize: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUlogsCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUuuid_st: + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['bytes : ' + str(self.bytes.hex())] + except ValueError: + str_list += ['bytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def bytes(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].bytes, 16) + +cdef class CUmemFabricHandle_st: + """ + Fabric handle - An opaque handle representing a memory allocation + that can be exported to processes in same or different nodes. For + IPC between processes on different nodes they must be connected via + the NVSwitch fabric. + + Attributes + ---------- + data : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['data : ' + str(self.data)] + except ValueError: + str_list += ['data : '] + return '\n'.join(str_list) + else: + return '' + @property + def data(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].data, 64) + @data.setter + def data(self, data): + if len(data) != 64: + raise ValueError("data length must be 64, is " + str(len(data))) + for i, b in enumerate(data): + self._pvt_ptr[0].data[i] = b + +cdef class CUipcEventHandle_st: + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + if CHAR_MIN == 0: + for i, b in enumerate(reserved): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].reserved[i] = b + else: + for i, b in enumerate(reserved): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].reserved[i] = b + +cdef class CUipcMemHandle_st: + """ + CUDA IPC mem handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + if CHAR_MIN == 0: + for i, b in enumerate(reserved): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].reserved[i] = b + else: + for i, b in enumerate(reserved): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].reserved[i] = b + +cdef class CUstreamMemOpWaitValueParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + address : CUdeviceptr + + value : cuuint32_t + + value64 : cuuint64_t + + flags : unsigned int + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._address = CUdeviceptr(_ptr=&self._pvt_ptr[0].waitValue.address) + self._value = cuuint32_t(_ptr=&self._pvt_ptr[0].waitValue.value) + self._value64 = cuuint64_t(_ptr=&self._pvt_ptr[0].waitValue.value64) + self._alias = CUdeviceptr(_ptr=&self._pvt_ptr[0].waitValue.alias) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].waitValue + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['operation : ' + str(self.operation)] + except ValueError: + str_list += ['operation : '] + try: + str_list += ['address : ' + str(self.address)] + except ValueError: + str_list += ['address : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['value64 : ' + str(self.value64)] + except ValueError: + str_list += ['value64 : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['alias : ' + str(self.alias)] + except ValueError: + str_list += ['alias : '] + return '\n'.join(str_list) + else: + return '' + @property + def operation(self): + if self._pvt_ptr[0].waitValue.operation not in _dict_CUstreamBatchMemOpType: + return None + return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].waitValue.operation] + @operation.setter + def operation(self, operation not None : CUstreamBatchMemOpType): + self._pvt_ptr[0].waitValue.operation = operation.value + @property + def address(self): + return self._address + @address.setter + def address(self, address): + cdef cydriver.CUdeviceptr cyaddress + if address is None: + cyaddress = 0 + elif isinstance(address, (CUdeviceptr)): + paddress = int(address) + cyaddress = paddress + else: + paddress = int(CUdeviceptr(address)) + cyaddress = paddress + self._address._pvt_ptr[0] = cyaddress + + @property + def value(self): + return self._value + @value.setter + def value(self, value): + cdef cydriver.cuuint32_t cyvalue + if value is None: + cyvalue = 0 + elif isinstance(value, (cuuint32_t)): + pvalue = int(value) + cyvalue = pvalue + else: + pvalue = int(cuuint32_t(value)) + cyvalue = pvalue + self._value._pvt_ptr[0] = cyvalue + + @property + def value64(self): + return self._value64 + @value64.setter + def value64(self, value64): + cdef cydriver.cuuint64_t cyvalue64 + if value64 is None: + cyvalue64 = 0 + elif isinstance(value64, (cuuint64_t)): + pvalue64 = int(value64) + cyvalue64 = pvalue64 + else: + pvalue64 = int(cuuint64_t(value64)) + cyvalue64 = pvalue64 + self._value64._pvt_ptr[0] = cyvalue64 + + @property + def flags(self): + return self._pvt_ptr[0].waitValue.flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].waitValue.flags = flags + @property + def alias(self): + return self._alias + @alias.setter + def alias(self, alias): + cdef cydriver.CUdeviceptr cyalias + if alias is None: + cyalias = 0 + elif isinstance(alias, (CUdeviceptr)): + palias = int(alias) + cyalias = palias + else: + palias = int(CUdeviceptr(alias)) + cyalias = palias + self._alias._pvt_ptr[0] = cyalias + + +cdef class CUstreamMemOpWriteValueParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + address : CUdeviceptr + + value : cuuint32_t + + value64 : cuuint64_t + + flags : unsigned int + + alias : CUdeviceptr + For driver internal use. Initial value is unimportant. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._address = CUdeviceptr(_ptr=&self._pvt_ptr[0].writeValue.address) + self._value = cuuint32_t(_ptr=&self._pvt_ptr[0].writeValue.value) + self._value64 = cuuint64_t(_ptr=&self._pvt_ptr[0].writeValue.value64) + self._alias = CUdeviceptr(_ptr=&self._pvt_ptr[0].writeValue.alias) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].writeValue + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['operation : ' + str(self.operation)] + except ValueError: + str_list += ['operation : '] + try: + str_list += ['address : ' + str(self.address)] + except ValueError: + str_list += ['address : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['value64 : ' + str(self.value64)] + except ValueError: + str_list += ['value64 : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['alias : ' + str(self.alias)] + except ValueError: + str_list += ['alias : '] + return '\n'.join(str_list) + else: + return '' + @property + def operation(self): + if self._pvt_ptr[0].writeValue.operation not in _dict_CUstreamBatchMemOpType: + return None + return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].writeValue.operation] + @operation.setter + def operation(self, operation not None : CUstreamBatchMemOpType): + self._pvt_ptr[0].writeValue.operation = operation.value + @property + def address(self): + return self._address + @address.setter + def address(self, address): + cdef cydriver.CUdeviceptr cyaddress + if address is None: + cyaddress = 0 + elif isinstance(address, (CUdeviceptr)): + paddress = int(address) + cyaddress = paddress + else: + paddress = int(CUdeviceptr(address)) + cyaddress = paddress + self._address._pvt_ptr[0] = cyaddress + + @property + def value(self): + return self._value + @value.setter + def value(self, value): + cdef cydriver.cuuint32_t cyvalue + if value is None: + cyvalue = 0 + elif isinstance(value, (cuuint32_t)): + pvalue = int(value) + cyvalue = pvalue + else: + pvalue = int(cuuint32_t(value)) + cyvalue = pvalue + self._value._pvt_ptr[0] = cyvalue + + @property + def value64(self): + return self._value64 + @value64.setter + def value64(self, value64): + cdef cydriver.cuuint64_t cyvalue64 + if value64 is None: + cyvalue64 = 0 + elif isinstance(value64, (cuuint64_t)): + pvalue64 = int(value64) + cyvalue64 = pvalue64 + else: + pvalue64 = int(cuuint64_t(value64)) + cyvalue64 = pvalue64 + self._value64._pvt_ptr[0] = cyvalue64 + + @property + def flags(self): + return self._pvt_ptr[0].writeValue.flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].writeValue.flags = flags + @property + def alias(self): + return self._alias + @alias.setter + def alias(self, alias): + cdef cydriver.CUdeviceptr cyalias + if alias is None: + cyalias = 0 + elif isinstance(alias, (CUdeviceptr)): + palias = int(alias) + cyalias = palias + else: + palias = int(CUdeviceptr(alias)) + cyalias = palias + self._alias._pvt_ptr[0] = cyalias + + +cdef class CUstreamMemOpFlushRemoteWritesParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].flushRemoteWrites + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['operation : ' + str(self.operation)] + except ValueError: + str_list += ['operation : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def operation(self): + if self._pvt_ptr[0].flushRemoteWrites.operation not in _dict_CUstreamBatchMemOpType: + return None + return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].flushRemoteWrites.operation] + @operation.setter + def operation(self, operation not None : CUstreamBatchMemOpType): + self._pvt_ptr[0].flushRemoteWrites.operation = operation.value + @property + def flags(self): + return self._pvt_ptr[0].flushRemoteWrites.flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flushRemoteWrites.flags = flags + +cdef class CUstreamMemOpMemoryBarrierParams_st: + """ + Attributes + ---------- + operation : CUstreamBatchMemOpType + < Only supported in the _v2 API + flags : unsigned int + See CUstreamMemoryBarrier_flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].memoryBarrier + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['operation : ' + str(self.operation)] + except ValueError: + str_list += ['operation : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def operation(self): + if self._pvt_ptr[0].memoryBarrier.operation not in _dict_CUstreamBatchMemOpType: + return None + return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].memoryBarrier.operation] + @operation.setter + def operation(self, operation not None : CUstreamBatchMemOpType): + self._pvt_ptr[0].memoryBarrier.operation = operation.value + @property + def flags(self): + return self._pvt_ptr[0].memoryBarrier.flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].memoryBarrier.flags = flags + +cdef class CUstreamBatchMemOpParams_union: + """ + Per-operation parameters for cuStreamBatchMemOp + + Attributes + ---------- + operation : CUstreamBatchMemOpType + + waitValue : CUstreamMemOpWaitValueParams_st + + writeValue : CUstreamMemOpWriteValueParams_st + + flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + + memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + + pad : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=self._pvt_ptr) + self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=self._pvt_ptr) + self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=self._pvt_ptr) + self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['operation : ' + str(self.operation)] + except ValueError: + str_list += ['operation : '] + try: + str_list += ['waitValue :\n' + '\n'.join([' ' + line for line in str(self.waitValue).splitlines()])] + except ValueError: + str_list += ['waitValue : '] + try: + str_list += ['writeValue :\n' + '\n'.join([' ' + line for line in str(self.writeValue).splitlines()])] + except ValueError: + str_list += ['writeValue : '] + try: + str_list += ['flushRemoteWrites :\n' + '\n'.join([' ' + line for line in str(self.flushRemoteWrites).splitlines()])] + except ValueError: + str_list += ['flushRemoteWrites : '] + try: + str_list += ['memoryBarrier :\n' + '\n'.join([' ' + line for line in str(self.memoryBarrier).splitlines()])] + except ValueError: + str_list += ['memoryBarrier : '] + try: + str_list += ['pad : ' + str(self.pad)] + except ValueError: + str_list += ['pad : '] + return '\n'.join(str_list) + else: + return '' + @property + def operation(self): + if self._pvt_ptr[0].operation not in _dict_CUstreamBatchMemOpType: + return None + return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].operation] + @operation.setter + def operation(self, operation not None : CUstreamBatchMemOpType): + self._pvt_ptr[0].operation = operation.value + @property + def waitValue(self): + return self._waitValue + @waitValue.setter + def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st): + string.memcpy(&self._pvt_ptr[0].waitValue, waitValue.getPtr(), sizeof(self._pvt_ptr[0].waitValue)) + @property + def writeValue(self): + return self._writeValue + @writeValue.setter + def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st): + string.memcpy(&self._pvt_ptr[0].writeValue, writeValue.getPtr(), sizeof(self._pvt_ptr[0].writeValue)) + @property + def flushRemoteWrites(self): + return self._flushRemoteWrites + @flushRemoteWrites.setter + def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st): + string.memcpy(&self._pvt_ptr[0].flushRemoteWrites, flushRemoteWrites.getPtr(), sizeof(self._pvt_ptr[0].flushRemoteWrites)) + @property + def memoryBarrier(self): + return self._memoryBarrier + @memoryBarrier.setter + def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st): + string.memcpy(&self._pvt_ptr[0].memoryBarrier, memoryBarrier.getPtr(), sizeof(self._pvt_ptr[0].memoryBarrier)) + @property + def pad(self): + return [cuuint64_t(init_value=_pad) for _pad in self._pvt_ptr[0].pad] + @pad.setter + def pad(self, pad): + self._pvt_ptr[0].pad = pad + + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + """ + Attributes + ---------- + ctx : CUcontext + + count : unsigned int + + paramArray : CUstreamBatchMemOpParams + + flags : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + if self._paramArray is not NULL: + free(self._paramArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + try: + str_list += ['count : ' + str(self.count)] + except ValueError: + str_list += ['count : '] + try: + str_list += ['paramArray : ' + str(self.paramArray)] + except ValueError: + str_list += ['paramArray : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + @property + def count(self): + return self._pvt_ptr[0].count + @count.setter + def count(self, unsigned int count): + self._pvt_ptr[0].count = count + @property + def paramArray(self): + arrs = [self._pvt_ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] + return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs] + @paramArray.setter + def paramArray(self, val): + if len(val) == 0: + free(self._paramArray) + self._paramArray_length = 0 + self._pvt_ptr[0].paramArray = NULL + else: + if self._paramArray_length != len(val): + free(self._paramArray) + self._paramArray = calloc(len(val), sizeof(cydriver.CUstreamBatchMemOpParams)) + if self._paramArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) + self._paramArray_length = len(val) + self._pvt_ptr[0].paramArray = self._paramArray + for idx in range(len(val)): + string.memcpy(&self._paramArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + """ + Batch memory operation node parameters + + Attributes + ---------- + ctx : CUcontext + Context to use for the operations. + count : unsigned int + Number of operations in paramArray. + paramArray : CUstreamBatchMemOpParams + Array of batch memory operations. + flags : unsigned int + Flags to control the node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + if self._paramArray is not NULL: + free(self._paramArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + try: + str_list += ['count : ' + str(self.count)] + except ValueError: + str_list += ['count : '] + try: + str_list += ['paramArray : ' + str(self.paramArray)] + except ValueError: + str_list += ['paramArray : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + @property + def count(self): + return self._pvt_ptr[0].count + @count.setter + def count(self, unsigned int count): + self._pvt_ptr[0].count = count + @property + def paramArray(self): + arrs = [self._pvt_ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] + return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs] + @paramArray.setter + def paramArray(self, val): + if len(val) == 0: + free(self._paramArray) + self._paramArray_length = 0 + self._pvt_ptr[0].paramArray = NULL + else: + if self._paramArray_length != len(val): + free(self._paramArray) + self._paramArray = calloc(len(val), sizeof(cydriver.CUstreamBatchMemOpParams)) + if self._paramArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) + self._paramArray_length = len(val) + self._pvt_ptr[0].paramArray = self._paramArray + for idx in range(len(val)): + string.memcpy(&self._paramArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class anon_struct0: + """ + Attributes + ---------- + bytesOverBudget : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].info.overBudget + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['bytesOverBudget : ' + str(self.bytesOverBudget)] + except ValueError: + str_list += ['bytesOverBudget : '] + return '\n'.join(str_list) + else: + return '' + @property + def bytesOverBudget(self): + return self._pvt_ptr[0].info.overBudget.bytesOverBudget + @bytesOverBudget.setter + def bytesOverBudget(self, unsigned long long bytesOverBudget): + self._pvt_ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + +cdef class anon_union2: + """ + Attributes + ---------- + overBudget : anon_struct0 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._overBudget = anon_struct0(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].info + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['overBudget :\n' + '\n'.join([' ' + line for line in str(self.overBudget).splitlines()])] + except ValueError: + str_list += ['overBudget : '] + return '\n'.join(str_list) + else: + return '' + @property + def overBudget(self): + return self._overBudget + @overBudget.setter + def overBudget(self, overBudget not None : anon_struct0): + string.memcpy(&self._pvt_ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._pvt_ptr[0].info.overBudget)) + +cdef class CUasyncNotificationInfo_st: + """ + Information passed to the user via the async notification callback + + Attributes + ---------- + type : CUasyncNotificationType + The type of notification being sent + info : anon_union2 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUasyncNotificationInfo_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._info = anon_union2(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['info :\n' + '\n'.join([' ' + line for line in str(self.info).splitlines()])] + except ValueError: + str_list += ['info : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUasyncNotificationType: + return None + return _dict_CUasyncNotificationType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUasyncNotificationType): + self._pvt_ptr[0].type = type.value + @property + def info(self): + return self._info + @info.setter + def info(self, info not None : anon_union2): + string.memcpy(&self._pvt_ptr[0].info, info.getPtr(), sizeof(self._pvt_ptr[0].info)) + +cdef class CUdevprop_st: + """ + Legacy device properties + + Attributes + ---------- + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + sharedMemPerBlock : int + Shared memory available per block in bytes + totalConstantMemory : int + Constant memory available on device in bytes + SIMDWidth : int + Warp size in threads + memPitch : int + Maximum pitch in bytes allowed by memory copies + regsPerBlock : int + 32-bit registers available per block + clockRate : int + Clock frequency in kilohertz + textureAlign : int + Alignment requirement for textures + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] + except ValueError: + str_list += ['maxThreadsPerBlock : '] + try: + str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)] + except ValueError: + str_list += ['maxThreadsDim : '] + try: + str_list += ['maxGridSize : ' + str(self.maxGridSize)] + except ValueError: + str_list += ['maxGridSize : '] + try: + str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)] + except ValueError: + str_list += ['sharedMemPerBlock : '] + try: + str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)] + except ValueError: + str_list += ['totalConstantMemory : '] + try: + str_list += ['SIMDWidth : ' + str(self.SIMDWidth)] + except ValueError: + str_list += ['SIMDWidth : '] + try: + str_list += ['memPitch : ' + str(self.memPitch)] + except ValueError: + str_list += ['memPitch : '] + try: + str_list += ['regsPerBlock : ' + str(self.regsPerBlock)] + except ValueError: + str_list += ['regsPerBlock : '] + try: + str_list += ['clockRate : ' + str(self.clockRate)] + except ValueError: + str_list += ['clockRate : '] + try: + str_list += ['textureAlign : ' + str(self.textureAlign)] + except ValueError: + str_list += ['textureAlign : '] + return '\n'.join(str_list) + else: + return '' + @property + def maxThreadsPerBlock(self): + return self._pvt_ptr[0].maxThreadsPerBlock + @maxThreadsPerBlock.setter + def maxThreadsPerBlock(self, int maxThreadsPerBlock): + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + @property + def maxThreadsDim(self): + return self._pvt_ptr[0].maxThreadsDim + @maxThreadsDim.setter + def maxThreadsDim(self, maxThreadsDim): + self._pvt_ptr[0].maxThreadsDim = maxThreadsDim + @property + def maxGridSize(self): + return self._pvt_ptr[0].maxGridSize + @maxGridSize.setter + def maxGridSize(self, maxGridSize): + self._pvt_ptr[0].maxGridSize = maxGridSize + @property + def sharedMemPerBlock(self): + return self._pvt_ptr[0].sharedMemPerBlock + @sharedMemPerBlock.setter + def sharedMemPerBlock(self, int sharedMemPerBlock): + self._pvt_ptr[0].sharedMemPerBlock = sharedMemPerBlock + @property + def totalConstantMemory(self): + return self._pvt_ptr[0].totalConstantMemory + @totalConstantMemory.setter + def totalConstantMemory(self, int totalConstantMemory): + self._pvt_ptr[0].totalConstantMemory = totalConstantMemory + @property + def SIMDWidth(self): + return self._pvt_ptr[0].SIMDWidth + @SIMDWidth.setter + def SIMDWidth(self, int SIMDWidth): + self._pvt_ptr[0].SIMDWidth = SIMDWidth + @property + def memPitch(self): + return self._pvt_ptr[0].memPitch + @memPitch.setter + def memPitch(self, int memPitch): + self._pvt_ptr[0].memPitch = memPitch + @property + def regsPerBlock(self): + return self._pvt_ptr[0].regsPerBlock + @regsPerBlock.setter + def regsPerBlock(self, int regsPerBlock): + self._pvt_ptr[0].regsPerBlock = regsPerBlock + @property + def clockRate(self): + return self._pvt_ptr[0].clockRate + @clockRate.setter + def clockRate(self, int clockRate): + self._pvt_ptr[0].clockRate = clockRate + @property + def textureAlign(self): + return self._pvt_ptr[0].textureAlign + @textureAlign.setter + def textureAlign(self, int textureAlign): + self._pvt_ptr[0].textureAlign = textureAlign + +cdef class CUaccessPolicyWindow_st: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + num_bytes is limited by + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into + many segments and assign segments such that: sum of "hit segments" + / window == approx. ratio. sum of "miss segments" / window == + approx 1-ratio. Segments and ratio specifications are fitted to the + capabilities of the architecture. Accesses in a hit segment apply + the hitProp access policy. Accesses in a miss segment apply the + missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : CUaccessProperty + CUaccessProperty set for hit. + missProp : CUaccessProperty + CUaccessProperty set for miss. Must be either NORMAL or STREAMING + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['base_ptr : ' + hex(self.base_ptr)] + except ValueError: + str_list += ['base_ptr : '] + try: + str_list += ['num_bytes : ' + str(self.num_bytes)] + except ValueError: + str_list += ['num_bytes : '] + try: + str_list += ['hitRatio : ' + str(self.hitRatio)] + except ValueError: + str_list += ['hitRatio : '] + try: + str_list += ['hitProp : ' + str(self.hitProp)] + except ValueError: + str_list += ['hitProp : '] + try: + str_list += ['missProp : ' + str(self.missProp)] + except ValueError: + str_list += ['missProp : '] + return '\n'.join(str_list) + else: + return '' + @property + def base_ptr(self): + return self._pvt_ptr[0].base_ptr + @base_ptr.setter + def base_ptr(self, base_ptr): + _cbase_ptr = _HelperInputVoidPtr(base_ptr) + self._pvt_ptr[0].base_ptr = _cbase_ptr.cptr + @property + def num_bytes(self): + return self._pvt_ptr[0].num_bytes + @num_bytes.setter + def num_bytes(self, size_t num_bytes): + self._pvt_ptr[0].num_bytes = num_bytes + @property + def hitRatio(self): + return self._pvt_ptr[0].hitRatio + @hitRatio.setter + def hitRatio(self, float hitRatio): + self._pvt_ptr[0].hitRatio = hitRatio + @property + def hitProp(self): + if self._pvt_ptr[0].hitProp not in _dict_CUaccessProperty: + return None + return _dict_CUaccessProperty[self._pvt_ptr[0].hitProp] + @hitProp.setter + def hitProp(self, hitProp not None : CUaccessProperty): + self._pvt_ptr[0].hitProp = hitProp.value + @property + def missProp(self): + if self._pvt_ptr[0].missProp not in _dict_CUaccessProperty: + return None + return _dict_CUaccessProperty[self._pvt_ptr[0].missProp] + @missProp.setter + def missProp(self, missProp not None : CUaccessProperty): + self._pvt_ptr[0].missProp = missProp.value + +cdef class CUDA_KERNEL_NODE_PARAMS_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['func : ' + str(self.func)] + except ValueError: + str_list += ['func : '] + try: + str_list += ['gridDimX : ' + str(self.gridDimX)] + except ValueError: + str_list += ['gridDimX : '] + try: + str_list += ['gridDimY : ' + str(self.gridDimY)] + except ValueError: + str_list += ['gridDimY : '] + try: + str_list += ['gridDimZ : ' + str(self.gridDimZ)] + except ValueError: + str_list += ['gridDimZ : '] + try: + str_list += ['blockDimX : ' + str(self.blockDimX)] + except ValueError: + str_list += ['blockDimX : '] + try: + str_list += ['blockDimY : ' + str(self.blockDimY)] + except ValueError: + str_list += ['blockDimY : '] + try: + str_list += ['blockDimZ : ' + str(self.blockDimZ)] + except ValueError: + str_list += ['blockDimZ : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + try: + str_list += ['extra : ' + str(self.extra)] + except ValueError: + str_list += ['extra : '] + return '\n'.join(str_list) + else: + return '' + @property + def func(self): + return self._func + @func.setter + def func(self, func): + cdef cydriver.CUfunction cyfunc + if func is None: + cyfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + cyfunc = pfunc + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + self._func._pvt_ptr[0] = cyfunc + @property + def gridDimX(self): + return self._pvt_ptr[0].gridDimX + @gridDimX.setter + def gridDimX(self, unsigned int gridDimX): + self._pvt_ptr[0].gridDimX = gridDimX + @property + def gridDimY(self): + return self._pvt_ptr[0].gridDimY + @gridDimY.setter + def gridDimY(self, unsigned int gridDimY): + self._pvt_ptr[0].gridDimY = gridDimY + @property + def gridDimZ(self): + return self._pvt_ptr[0].gridDimZ + @gridDimZ.setter + def gridDimZ(self, unsigned int gridDimZ): + self._pvt_ptr[0].gridDimZ = gridDimZ + @property + def blockDimX(self): + return self._pvt_ptr[0].blockDimX + @blockDimX.setter + def blockDimX(self, unsigned int blockDimX): + self._pvt_ptr[0].blockDimX = blockDimX + @property + def blockDimY(self): + return self._pvt_ptr[0].blockDimY + @blockDimY.setter + def blockDimY(self, unsigned int blockDimY): + self._pvt_ptr[0].blockDimY = blockDimY + @property + def blockDimZ(self): + return self._pvt_ptr[0].blockDimZ + @blockDimZ.setter + def blockDimZ(self, unsigned int blockDimZ): + self._pvt_ptr[0].blockDimZ = blockDimZ + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + @property + def extra(self): + return self._pvt_ptr[0].extra + @extra.setter + def extra(self, void_ptr extra): + self._pvt_ptr[0].extra = extra + +cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + self._kern = CUkernel(_ptr=&self._pvt_ptr[0].kern) + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['func : ' + str(self.func)] + except ValueError: + str_list += ['func : '] + try: + str_list += ['gridDimX : ' + str(self.gridDimX)] + except ValueError: + str_list += ['gridDimX : '] + try: + str_list += ['gridDimY : ' + str(self.gridDimY)] + except ValueError: + str_list += ['gridDimY : '] + try: + str_list += ['gridDimZ : ' + str(self.gridDimZ)] + except ValueError: + str_list += ['gridDimZ : '] + try: + str_list += ['blockDimX : ' + str(self.blockDimX)] + except ValueError: + str_list += ['blockDimX : '] + try: + str_list += ['blockDimY : ' + str(self.blockDimY)] + except ValueError: + str_list += ['blockDimY : '] + try: + str_list += ['blockDimZ : ' + str(self.blockDimZ)] + except ValueError: + str_list += ['blockDimZ : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + try: + str_list += ['extra : ' + str(self.extra)] + except ValueError: + str_list += ['extra : '] + try: + str_list += ['kern : ' + str(self.kern)] + except ValueError: + str_list += ['kern : '] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) + else: + return '' + @property + def func(self): + return self._func + @func.setter + def func(self, func): + cdef cydriver.CUfunction cyfunc + if func is None: + cyfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + cyfunc = pfunc + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + self._func._pvt_ptr[0] = cyfunc + @property + def gridDimX(self): + return self._pvt_ptr[0].gridDimX + @gridDimX.setter + def gridDimX(self, unsigned int gridDimX): + self._pvt_ptr[0].gridDimX = gridDimX + @property + def gridDimY(self): + return self._pvt_ptr[0].gridDimY + @gridDimY.setter + def gridDimY(self, unsigned int gridDimY): + self._pvt_ptr[0].gridDimY = gridDimY + @property + def gridDimZ(self): + return self._pvt_ptr[0].gridDimZ + @gridDimZ.setter + def gridDimZ(self, unsigned int gridDimZ): + self._pvt_ptr[0].gridDimZ = gridDimZ + @property + def blockDimX(self): + return self._pvt_ptr[0].blockDimX + @blockDimX.setter + def blockDimX(self, unsigned int blockDimX): + self._pvt_ptr[0].blockDimX = blockDimX + @property + def blockDimY(self): + return self._pvt_ptr[0].blockDimY + @blockDimY.setter + def blockDimY(self, unsigned int blockDimY): + self._pvt_ptr[0].blockDimY = blockDimY + @property + def blockDimZ(self): + return self._pvt_ptr[0].blockDimZ + @blockDimZ.setter + def blockDimZ(self, unsigned int blockDimZ): + self._pvt_ptr[0].blockDimZ = blockDimZ + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + @property + def extra(self): + return self._pvt_ptr[0].extra + @extra.setter + def extra(self, void_ptr extra): + self._pvt_ptr[0].extra = extra + @property + def kern(self): + return self._kern + @kern.setter + def kern(self, kern): + cdef cydriver.CUkernel cykern + if kern is None: + cykern = 0 + elif isinstance(kern, (CUkernel,)): + pkern = int(kern) + cykern = pkern + else: + pkern = int(CUkernel(kern)) + cykern = pkern + self._kern._pvt_ptr[0] = cykern + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + +cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: + """ + GPU kernel node parameters + + Attributes + ---------- + func : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to kernel parameters + extra : Any + Extra options + kern : CUkernel + Kernel to launch, will only be referenced if func is NULL + ctx : CUcontext + Context for the kernel task to run in. The value NULL will indicate + the current context should be used by the api. This field is + ignored if func is set. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + self._kern = CUkernel(_ptr=&self._pvt_ptr[0].kern) + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['func : ' + str(self.func)] + except ValueError: + str_list += ['func : '] + try: + str_list += ['gridDimX : ' + str(self.gridDimX)] + except ValueError: + str_list += ['gridDimX : '] + try: + str_list += ['gridDimY : ' + str(self.gridDimY)] + except ValueError: + str_list += ['gridDimY : '] + try: + str_list += ['gridDimZ : ' + str(self.gridDimZ)] + except ValueError: + str_list += ['gridDimZ : '] + try: + str_list += ['blockDimX : ' + str(self.blockDimX)] + except ValueError: + str_list += ['blockDimX : '] + try: + str_list += ['blockDimY : ' + str(self.blockDimY)] + except ValueError: + str_list += ['blockDimY : '] + try: + str_list += ['blockDimZ : ' + str(self.blockDimZ)] + except ValueError: + str_list += ['blockDimZ : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + try: + str_list += ['extra : ' + str(self.extra)] + except ValueError: + str_list += ['extra : '] + try: + str_list += ['kern : ' + str(self.kern)] + except ValueError: + str_list += ['kern : '] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) + else: + return '' + @property + def func(self): + return self._func + @func.setter + def func(self, func): + cdef cydriver.CUfunction cyfunc + if func is None: + cyfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + cyfunc = pfunc + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + self._func._pvt_ptr[0] = cyfunc + @property + def gridDimX(self): + return self._pvt_ptr[0].gridDimX + @gridDimX.setter + def gridDimX(self, unsigned int gridDimX): + self._pvt_ptr[0].gridDimX = gridDimX + @property + def gridDimY(self): + return self._pvt_ptr[0].gridDimY + @gridDimY.setter + def gridDimY(self, unsigned int gridDimY): + self._pvt_ptr[0].gridDimY = gridDimY + @property + def gridDimZ(self): + return self._pvt_ptr[0].gridDimZ + @gridDimZ.setter + def gridDimZ(self, unsigned int gridDimZ): + self._pvt_ptr[0].gridDimZ = gridDimZ + @property + def blockDimX(self): + return self._pvt_ptr[0].blockDimX + @blockDimX.setter + def blockDimX(self, unsigned int blockDimX): + self._pvt_ptr[0].blockDimX = blockDimX + @property + def blockDimY(self): + return self._pvt_ptr[0].blockDimY + @blockDimY.setter + def blockDimY(self, unsigned int blockDimY): + self._pvt_ptr[0].blockDimY = blockDimY + @property + def blockDimZ(self): + return self._pvt_ptr[0].blockDimZ + @blockDimZ.setter + def blockDimZ(self, unsigned int blockDimZ): + self._pvt_ptr[0].blockDimZ = blockDimZ + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + @property + def extra(self): + return self._pvt_ptr[0].extra + @extra.setter + def extra(self, void_ptr extra): + self._pvt_ptr[0].extra = extra + @property + def kern(self): + return self._kern + @kern.setter + def kern(self, kern): + cdef cydriver.CUkernel cykern + if kern is None: + cykern = 0 + elif isinstance(kern, (CUkernel,)): + pkern = int(kern) + cykern = pkern + else: + pkern = int(CUkernel(kern)) + cykern = pkern + self._kern._pvt_ptr[0] = cykern + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + +cdef class CUDA_MEMSET_NODE_PARAMS_st: + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._dst = CUdeviceptr(_ptr=&self._pvt_ptr[0].dst) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dst : ' + str(self.dst)] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['elementSize : ' + str(self.elementSize)] + except ValueError: + str_list += ['elementSize : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + return '\n'.join(str_list) + else: + return '' + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst): + cdef cydriver.CUdeviceptr cydst + if dst is None: + cydst = 0 + elif isinstance(dst, (CUdeviceptr)): + pdst = int(dst) + cydst = pdst + else: + pdst = int(CUdeviceptr(dst)) + cydst = pdst + self._dst._pvt_ptr[0] = cydst + + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, size_t pitch): + self._pvt_ptr[0].pitch = pitch + @property + def value(self): + return self._pvt_ptr[0].value + @value.setter + def value(self, unsigned int value): + self._pvt_ptr[0].value = value + @property + def elementSize(self): + return self._pvt_ptr[0].elementSize + @elementSize.setter + def elementSize(self, unsigned int elementSize): + self._pvt_ptr[0].elementSize = elementSize + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + +cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: + """ + Memset node parameters + + Attributes + ---------- + dst : CUdeviceptr + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + ctx : CUcontext + Context on which to run the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._dst = CUdeviceptr(_ptr=&self._pvt_ptr[0].dst) + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dst : ' + str(self.dst)] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['elementSize : ' + str(self.elementSize)] + except ValueError: + str_list += ['elementSize : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) + else: + return '' + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst): + cdef cydriver.CUdeviceptr cydst + if dst is None: + cydst = 0 + elif isinstance(dst, (CUdeviceptr)): + pdst = int(dst) + cydst = pdst + else: + pdst = int(CUdeviceptr(dst)) + cydst = pdst + self._dst._pvt_ptr[0] = cydst + + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, size_t pitch): + self._pvt_ptr[0].pitch = pitch + @property + def value(self): + return self._pvt_ptr[0].value + @value.setter + def value(self, unsigned int value): + self._pvt_ptr[0].value = value + @property + def elementSize(self): + return self._pvt_ptr[0].elementSize + @elementSize.setter + def elementSize(self, unsigned int elementSize): + self._pvt_ptr[0].elementSize = elementSize + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + +cdef class CUDA_HOST_NODE_PARAMS_st: + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._fn = CUhostFn(_ptr=&self._pvt_ptr[0].fn) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fn : ' + str(self.fn)] + except ValueError: + str_list += ['fn : '] + try: + str_list += ['userData : ' + hex(self.userData)] + except ValueError: + str_list += ['userData : '] + return '\n'.join(str_list) + else: + return '' + @property + def fn(self): + return self._fn + @fn.setter + def fn(self, fn): + cdef cydriver.CUhostFn cyfn + if fn is None: + cyfn = 0 + elif isinstance(fn, (CUhostFn)): + pfn = int(fn) + cyfn = pfn + else: + pfn = int(CUhostFn(fn)) + cyfn = pfn + self._fn._pvt_ptr[0] = cyfn + @property + def userData(self): + return self._pvt_ptr[0].userData + @userData.setter + def userData(self, userData): + _cuserData = _HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + +cdef class CUDA_HOST_NODE_PARAMS_v2_st: + """ + Host node parameters + + Attributes + ---------- + fn : CUhostFn + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._fn = CUhostFn(_ptr=&self._pvt_ptr[0].fn) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fn : ' + str(self.fn)] + except ValueError: + str_list += ['fn : '] + try: + str_list += ['userData : ' + hex(self.userData)] + except ValueError: + str_list += ['userData : '] + return '\n'.join(str_list) + else: + return '' + @property + def fn(self): + return self._fn + @fn.setter + def fn(self, fn): + cdef cydriver.CUhostFn cyfn + if fn is None: + cyfn = 0 + elif isinstance(fn, (CUhostFn)): + pfn = int(fn) + cyfn = pfn + else: + pfn = int(CUhostFn(fn)) + cyfn = pfn + self._fn._pvt_ptr[0] = cyfn + @property + def userData(self): + return self._pvt_ptr[0].userData + @userData.setter + def userData(self, userData): + _cuserData = _HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + +cdef class CUDA_CONDITIONAL_NODE_PARAMS: + """ + Conditional node parameters + + Attributes + ---------- + handle : CUgraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cuGraphConditionalHandleCreate. + type : CUgraphConditionalNodeType + Type of conditional node. + size : unsigned int + Size of graph output array. Allowed values are 1 for + CU_GRAPH_COND_TYPE_WHILE, 1 or 2 for CU_GRAPH_COND_TYPE_IF, or any + value greater than zero for CU_GRAPH_COND_TYPE_SWITCH. + phGraph_out : CUgraph + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same CUDA context. + These graphs may be populated using graph node creation APIs or + cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + CU_GRAPH_COND_TYPE_WHILE: phGraph_out[0] is executed as long as the + condition is non-zero. CU_GRAPH_COND_TYPE_SWITCH: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + ctx : CUcontext + Context on which to run the node. Must match context used to create + the handle and all body nodes. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = CUgraphConditionalHandle(_ptr=&self._pvt_ptr[0].handle) + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + str(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['phGraph_out : ' + str(self.phGraph_out)] + except ValueError: + str_list += ['phGraph_out : '] + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle): + cdef cydriver.CUgraphConditionalHandle cyhandle + if handle is None: + cyhandle = 0 + elif isinstance(handle, (CUgraphConditionalHandle)): + phandle = int(handle) + cyhandle = phandle + else: + phandle = int(CUgraphConditionalHandle(handle)) + cyhandle = phandle + self._handle._pvt_ptr[0] = cyhandle + + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUgraphConditionalNodeType: + return None + return _dict_CUgraphConditionalNodeType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUgraphConditionalNodeType): + self._pvt_ptr[0].type = type.value + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned int size): + self._pvt_ptr[0].size = size + @property + def phGraph_out(self): + arrs = [self._pvt_ptr[0].phGraph_out + x*sizeof(cydriver.CUgraph) for x in range(self.size)] + return [CUgraph(_ptr=arr) for arr in arrs] + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + +cdef class CUgraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, + CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or + CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from CUgraphDependencyType. + (It is typed as char due to compiler-specific layout of bitfields.) + See CUgraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['from_port : ' + str(self.from_port)] + except ValueError: + str_list += ['from_port : '] + try: + str_list += ['to_port : ' + str(self.to_port)] + except ValueError: + str_list += ['to_port : '] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def from_port(self): + return self._pvt_ptr[0].from_port + @from_port.setter + def from_port(self, unsigned char from_port): + self._pvt_ptr[0].from_port = from_port + @property + def to_port(self): + return self._pvt_ptr[0].to_port + @to_port.setter + def to_port(self, unsigned char to_port): + self._pvt_ptr[0].to_port = to_port + @property + def type(self): + return self._pvt_ptr[0].type + @type.setter + def type(self, unsigned char type): + self._pvt_ptr[0].type = type + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 5) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 5: + raise ValueError("reserved length must be 5, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: + """ + Graph instantiation parameters + + Attributes + ---------- + flags : cuuint64_t + Instantiation flags + hUploadStream : CUstream + Upload stream + hErrNode_out : CUgraphNode + The node which caused instantiation to fail, if any + result_out : CUgraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._flags = cuuint64_t(_ptr=&self._pvt_ptr[0].flags) + self._hUploadStream = CUstream(_ptr=&self._pvt_ptr[0].hUploadStream) + self._hErrNode_out = CUgraphNode(_ptr=&self._pvt_ptr[0].hErrNode_out) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['hUploadStream : ' + str(self.hUploadStream)] + except ValueError: + str_list += ['hUploadStream : '] + try: + str_list += ['hErrNode_out : ' + str(self.hErrNode_out)] + except ValueError: + str_list += ['hErrNode_out : '] + try: + str_list += ['result_out : ' + str(self.result_out)] + except ValueError: + str_list += ['result_out : '] + return '\n'.join(str_list) + else: + return '' + @property + def flags(self): + return self._flags + @flags.setter + def flags(self, flags): + cdef cydriver.cuuint64_t cyflags + if flags is None: + cyflags = 0 + elif isinstance(flags, (cuuint64_t)): + pflags = int(flags) + cyflags = pflags + else: + pflags = int(cuuint64_t(flags)) + cyflags = pflags + self._flags._pvt_ptr[0] = cyflags + + @property + def hUploadStream(self): + return self._hUploadStream + @hUploadStream.setter + def hUploadStream(self, hUploadStream): + cdef cydriver.CUstream cyhUploadStream + if hUploadStream is None: + cyhUploadStream = 0 + elif isinstance(hUploadStream, (CUstream,)): + phUploadStream = int(hUploadStream) + cyhUploadStream = phUploadStream + else: + phUploadStream = int(CUstream(hUploadStream)) + cyhUploadStream = phUploadStream + self._hUploadStream._pvt_ptr[0] = cyhUploadStream + @property + def hErrNode_out(self): + return self._hErrNode_out + @hErrNode_out.setter + def hErrNode_out(self, hErrNode_out): + cdef cydriver.CUgraphNode cyhErrNode_out + if hErrNode_out is None: + cyhErrNode_out = 0 + elif isinstance(hErrNode_out, (CUgraphNode,)): + phErrNode_out = int(hErrNode_out) + cyhErrNode_out = phErrNode_out + else: + phErrNode_out = int(CUgraphNode(hErrNode_out)) + cyhErrNode_out = phErrNode_out + self._hErrNode_out._pvt_ptr[0] = cyhErrNode_out + @property + def result_out(self): + if self._pvt_ptr[0].result_out not in _dict_CUgraphInstantiateResult: + return None + return _dict_CUgraphInstantiateResult[self._pvt_ptr[0].result_out] + @result_out.setter + def result_out(self, result_out not None : CUgraphInstantiateResult): + self._pvt_ptr[0].result_out = result_out.value + +cdef class CUlaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. + By default, kernels are launched in domain 0. Kernel launched with + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. + User may also alter the domain ID with CUlaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is + available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['default_ : ' + str(self.default_)] + except ValueError: + str_list += ['default_ : '] + try: + str_list += ['remote : ' + str(self.remote)] + except ValueError: + str_list += ['remote : '] + return '\n'.join(str_list) + else: + return '' + @property + def default_(self): + return self._pvt_ptr[0].default_ + @default_.setter + def default_(self, unsigned char default_): + self._pvt_ptr[0].default_ = default_ + @property + def remote(self): + return self._pvt_ptr[0].remote + @remote.setter + def remote(self, unsigned char remote): + self._pvt_ptr[0].remote = remote + +cdef class anon_struct1: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].clusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].clusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].clusterDim.x = x + @property + def y(self): + return self._pvt_ptr[0].clusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].clusterDim.y = y + @property + def z(self): + return self._pvt_ptr[0].clusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].clusterDim.z = z + +cdef class anon_struct2: + """ + Attributes + ---------- + event : CUevent + + flags : int + + triggerAtBlockStart : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._event = CUevent(_ptr=&self._pvt_ptr[0].programmaticEvent.event) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].programmaticEvent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)] + except ValueError: + str_list += ['triggerAtBlockStart : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cydriver.CUevent cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(CUevent(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + @property + def flags(self): + return self._pvt_ptr[0].programmaticEvent.flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].programmaticEvent.flags = flags + @property + def triggerAtBlockStart(self): + return self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart + @triggerAtBlockStart.setter + def triggerAtBlockStart(self, int triggerAtBlockStart): + self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + +cdef class anon_struct3: + """ + Attributes + ---------- + event : CUevent + + flags : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._event = CUevent(_ptr=&self._pvt_ptr[0].launchCompletionEvent.event) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].launchCompletionEvent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cydriver.CUevent cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(CUevent(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + @property + def flags(self): + return self._pvt_ptr[0].launchCompletionEvent.flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].launchCompletionEvent.flags = flags + +cdef class anon_struct4: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].preferredClusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].preferredClusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].preferredClusterDim.x = x + @property + def y(self): + return self._pvt_ptr[0].preferredClusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].preferredClusterDim.y = y + @property + def z(self): + return self._pvt_ptr[0].preferredClusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].preferredClusterDim.z = z + +cdef class anon_struct5: + """ + Attributes + ---------- + deviceUpdatable : int + + devNode : CUgraphDeviceNode + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._devNode = CUgraphDeviceNode(_ptr=&self._pvt_ptr[0].deviceUpdatableKernelNode.devNode) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].deviceUpdatableKernelNode + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['deviceUpdatable : ' + str(self.deviceUpdatable)] + except ValueError: + str_list += ['deviceUpdatable : '] + try: + str_list += ['devNode : ' + str(self.devNode)] + except ValueError: + str_list += ['devNode : '] + return '\n'.join(str_list) + else: + return '' + @property + def deviceUpdatable(self): + return self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable + @deviceUpdatable.setter + def deviceUpdatable(self, int deviceUpdatable): + self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + @property + def devNode(self): + return self._devNode + @devNode.setter + def devNode(self, devNode): + cdef cydriver.CUgraphDeviceNode cydevNode + if devNode is None: + cydevNode = 0 + elif isinstance(devNode, (CUgraphDeviceNode,)): + pdevNode = int(devNode) + cydevNode = pdevNode + else: + pdevNode = int(CUgraphDeviceNode(devNode)) + cydevNode = pdevNode + self._devNode._pvt_ptr[0] = cydevNode + +cdef class CUlaunchAttributeValue_union: + """ + Launch attributes union; used as value field of CUlaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : CUaccessPolicyWindow + Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + cooperative : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero + indicates a cooperative kernel (see cuLaunchCooperativeKernel). + syncPolicy : CUsynchronizationPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. + ::CUsynchronizationPolicy for work queued up in this stream + clusterDim : anon_struct1 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION + that represents the desired cluster dimensions for the kernel. + Opaque type with the following fields: - `x` - The X dimension of + the cluster, in blocks. Must be a divisor of the grid X dimension. + - `y` - The Y dimension of the cluster, in blocks. Must be a + divisor of the grid Y dimension. - `z` - The Z dimension of the + cluster, in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + programmaticEvent : anon_struct2 + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT + with the following fields: - `CUevent` event - Event to fire when + all blocks trigger it. - `Event` record flags, see + cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. + - `triggerAtBlockStart` - If this is set to non-0, each block + launch will automatically trigger the event. + launchCompletionEvent : anon_struct3 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following + fields: - `CUevent` event - Event to fire when the last block + launches - `int` flags; - Event record flags, see + cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + priority : int + Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution + priority of the kernel. + memSyncDomainMap : CUlaunchMemSyncDomainMap + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. + See CUlaunchMemSyncDomainMap. + memSyncDomain : CUlaunchMemSyncDomain + Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. + See::CUlaunchMemSyncDomain + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + deviceUpdatableKernelNode : anon_struct5 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the + following fields: - `int` deviceUpdatable - Whether or not the + resulting kernel node should be device-updatable. - + `CUgraphDeviceNode` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=&self._pvt_ptr[0].accessPolicyWindow) + self._clusterDim = anon_struct1(_ptr=self._pvt_ptr) + self._programmaticEvent = anon_struct2(_ptr=self._pvt_ptr) + self._launchCompletionEvent = anon_struct3(_ptr=self._pvt_ptr) + self._memSyncDomainMap = CUlaunchMemSyncDomainMap(_ptr=&self._pvt_ptr[0].memSyncDomainMap) + self._preferredClusterDim = anon_struct4(_ptr=self._pvt_ptr) + self._deviceUpdatableKernelNode = anon_struct5(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['pad : ' + str(self.pad)] + except ValueError: + str_list += ['pad : '] + try: + str_list += ['accessPolicyWindow :\n' + '\n'.join([' ' + line for line in str(self.accessPolicyWindow).splitlines()])] + except ValueError: + str_list += ['accessPolicyWindow : '] + try: + str_list += ['cooperative : ' + str(self.cooperative)] + except ValueError: + str_list += ['cooperative : '] + try: + str_list += ['syncPolicy : ' + str(self.syncPolicy)] + except ValueError: + str_list += ['syncPolicy : '] + try: + str_list += ['clusterDim :\n' + '\n'.join([' ' + line for line in str(self.clusterDim).splitlines()])] + except ValueError: + str_list += ['clusterDim : '] + try: + str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] + except ValueError: + str_list += ['clusterSchedulingPolicyPreference : '] + try: + str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)] + except ValueError: + str_list += ['programmaticStreamSerializationAllowed : '] + try: + str_list += ['programmaticEvent :\n' + '\n'.join([' ' + line for line in str(self.programmaticEvent).splitlines()])] + except ValueError: + str_list += ['programmaticEvent : '] + try: + str_list += ['launchCompletionEvent :\n' + '\n'.join([' ' + line for line in str(self.launchCompletionEvent).splitlines()])] + except ValueError: + str_list += ['launchCompletionEvent : '] + try: + str_list += ['priority : ' + str(self.priority)] + except ValueError: + str_list += ['priority : '] + try: + str_list += ['memSyncDomainMap :\n' + '\n'.join([' ' + line for line in str(self.memSyncDomainMap).splitlines()])] + except ValueError: + str_list += ['memSyncDomainMap : '] + try: + str_list += ['memSyncDomain : ' + str(self.memSyncDomain)] + except ValueError: + str_list += ['memSyncDomain : '] + try: + str_list += ['preferredClusterDim :\n' + '\n'.join([' ' + line for line in str(self.preferredClusterDim).splitlines()])] + except ValueError: + str_list += ['preferredClusterDim : '] + try: + str_list += ['deviceUpdatableKernelNode :\n' + '\n'.join([' ' + line for line in str(self.deviceUpdatableKernelNode).splitlines()])] + except ValueError: + str_list += ['deviceUpdatableKernelNode : '] + try: + str_list += ['sharedMemCarveout : ' + str(self.sharedMemCarveout)] + except ValueError: + str_list += ['sharedMemCarveout : '] + return '\n'.join(str_list) + else: + return '' + @property + def pad(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].pad, 64) + @pad.setter + def pad(self, pad): + if len(pad) != 64: + raise ValueError("pad length must be 64, is " + str(len(pad))) + if CHAR_MIN == 0: + for i, b in enumerate(pad): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].pad[i] = b + else: + for i, b in enumerate(pad): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].pad[i] = b + @property + def accessPolicyWindow(self): + return self._accessPolicyWindow + @accessPolicyWindow.setter + def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow): + string.memcpy(&self._pvt_ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._pvt_ptr[0].accessPolicyWindow)) + @property + def cooperative(self): + return self._pvt_ptr[0].cooperative + @cooperative.setter + def cooperative(self, int cooperative): + self._pvt_ptr[0].cooperative = cooperative + @property + def syncPolicy(self): + if self._pvt_ptr[0].syncPolicy not in _dict_CUsynchronizationPolicy: + return None + return _dict_CUsynchronizationPolicy[self._pvt_ptr[0].syncPolicy] + @syncPolicy.setter + def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy): + self._pvt_ptr[0].syncPolicy = syncPolicy.value + @property + def clusterDim(self): + return self._clusterDim + @clusterDim.setter + def clusterDim(self, clusterDim not None : anon_struct1): + string.memcpy(&self._pvt_ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._pvt_ptr[0].clusterDim)) + @property + def clusterSchedulingPolicyPreference(self): + if self._pvt_ptr[0].clusterSchedulingPolicyPreference not in _dict_CUclusterSchedulingPolicy: + return None + return _dict_CUclusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] + @clusterSchedulingPolicyPreference.setter + def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy): + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + @property + def programmaticStreamSerializationAllowed(self): + return self._pvt_ptr[0].programmaticStreamSerializationAllowed + @programmaticStreamSerializationAllowed.setter + def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed): + self._pvt_ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + @property + def programmaticEvent(self): + return self._programmaticEvent + @programmaticEvent.setter + def programmaticEvent(self, programmaticEvent not None : anon_struct2): + string.memcpy(&self._pvt_ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._pvt_ptr[0].programmaticEvent)) + @property + def launchCompletionEvent(self): + return self._launchCompletionEvent + @launchCompletionEvent.setter + def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct3): + string.memcpy(&self._pvt_ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._pvt_ptr[0].launchCompletionEvent)) + @property + def priority(self): + return self._pvt_ptr[0].priority + @priority.setter + def priority(self, int priority): + self._pvt_ptr[0].priority = priority + @property + def memSyncDomainMap(self): + return self._memSyncDomainMap + @memSyncDomainMap.setter + def memSyncDomainMap(self, memSyncDomainMap not None : CUlaunchMemSyncDomainMap): + string.memcpy(&self._pvt_ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._pvt_ptr[0].memSyncDomainMap)) + @property + def memSyncDomain(self): + if self._pvt_ptr[0].memSyncDomain not in _dict_CUlaunchMemSyncDomain: + return None + return _dict_CUlaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] + @memSyncDomain.setter + def memSyncDomain(self, memSyncDomain not None : CUlaunchMemSyncDomain): + self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + @property + def preferredClusterDim(self): + return self._preferredClusterDim + @preferredClusterDim.setter + def preferredClusterDim(self, preferredClusterDim not None : anon_struct4): + string.memcpy(&self._pvt_ptr[0].preferredClusterDim, preferredClusterDim.getPtr(), sizeof(self._pvt_ptr[0].preferredClusterDim)) + @property + def deviceUpdatableKernelNode(self): + return self._deviceUpdatableKernelNode + @deviceUpdatableKernelNode.setter + def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct5): + string.memcpy(&self._pvt_ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._pvt_ptr[0].deviceUpdatableKernelNode)) + @property + def sharedMemCarveout(self): + return self._pvt_ptr[0].sharedMemCarveout + @sharedMemCarveout.setter + def sharedMemCarveout(self, unsigned int sharedMemCarveout): + self._pvt_ptr[0].sharedMemCarveout = sharedMemCarveout + +cdef class CUlaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + id : CUlaunchAttributeID + Attribute to set + value : CUlaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._value = CUlaunchAttributeValue(_ptr=&self._pvt_ptr[0].value) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['id : ' + str(self.id)] + except ValueError: + str_list += ['id : '] + try: + str_list += ['value :\n' + '\n'.join([' ' + line for line in str(self.value).splitlines()])] + except ValueError: + str_list += ['value : '] + return '\n'.join(str_list) + else: + return '' + @property + def id(self): + if self._pvt_ptr[0].id not in _dict_CUlaunchAttributeID: + return None + return _dict_CUlaunchAttributeID[self._pvt_ptr[0].id] + @id.setter + def id(self, id not None : CUlaunchAttributeID): + self._pvt_ptr[0].id = id.value + @property + def value(self): + return self._value + @value.setter + def value(self, value not None : CUlaunchAttributeValue): + string.memcpy(&self._pvt_ptr[0].value, value.getPtr(), sizeof(self._pvt_ptr[0].value)) + +cdef class CUlaunchConfig_st: + """ + CUDA extensible launch configuration + + Attributes + ---------- + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + attrs : CUlaunchAttribute + List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + numAttrs : unsigned int + Number of attributes populated in CUlaunchConfig::attrs + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._hStream = CUstream(_ptr=&self._pvt_ptr[0].hStream) + def __dealloc__(self): + pass + if self._attrs is not NULL: + free(self._attrs) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['gridDimX : ' + str(self.gridDimX)] + except ValueError: + str_list += ['gridDimX : '] + try: + str_list += ['gridDimY : ' + str(self.gridDimY)] + except ValueError: + str_list += ['gridDimY : '] + try: + str_list += ['gridDimZ : ' + str(self.gridDimZ)] + except ValueError: + str_list += ['gridDimZ : '] + try: + str_list += ['blockDimX : ' + str(self.blockDimX)] + except ValueError: + str_list += ['blockDimX : '] + try: + str_list += ['blockDimY : ' + str(self.blockDimY)] + except ValueError: + str_list += ['blockDimY : '] + try: + str_list += ['blockDimZ : ' + str(self.blockDimZ)] + except ValueError: + str_list += ['blockDimZ : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['hStream : ' + str(self.hStream)] + except ValueError: + str_list += ['hStream : '] + try: + str_list += ['attrs : ' + str(self.attrs)] + except ValueError: + str_list += ['attrs : '] + try: + str_list += ['numAttrs : ' + str(self.numAttrs)] + except ValueError: + str_list += ['numAttrs : '] + return '\n'.join(str_list) + else: + return '' + @property + def gridDimX(self): + return self._pvt_ptr[0].gridDimX + @gridDimX.setter + def gridDimX(self, unsigned int gridDimX): + self._pvt_ptr[0].gridDimX = gridDimX + @property + def gridDimY(self): + return self._pvt_ptr[0].gridDimY + @gridDimY.setter + def gridDimY(self, unsigned int gridDimY): + self._pvt_ptr[0].gridDimY = gridDimY + @property + def gridDimZ(self): + return self._pvt_ptr[0].gridDimZ + @gridDimZ.setter + def gridDimZ(self, unsigned int gridDimZ): + self._pvt_ptr[0].gridDimZ = gridDimZ + @property + def blockDimX(self): + return self._pvt_ptr[0].blockDimX + @blockDimX.setter + def blockDimX(self, unsigned int blockDimX): + self._pvt_ptr[0].blockDimX = blockDimX + @property + def blockDimY(self): + return self._pvt_ptr[0].blockDimY + @blockDimY.setter + def blockDimY(self, unsigned int blockDimY): + self._pvt_ptr[0].blockDimY = blockDimY + @property + def blockDimZ(self): + return self._pvt_ptr[0].blockDimZ + @blockDimZ.setter + def blockDimZ(self, unsigned int blockDimZ): + self._pvt_ptr[0].blockDimZ = blockDimZ + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def hStream(self): + return self._hStream + @hStream.setter + def hStream(self, hStream): + cdef cydriver.CUstream cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + self._hStream._pvt_ptr[0] = cyhStream + @property + def attrs(self): + arrs = [self._pvt_ptr[0].attrs + x*sizeof(cydriver.CUlaunchAttribute) for x in range(self._attrs_length)] + return [CUlaunchAttribute(_ptr=arr) for arr in arrs] + @attrs.setter + def attrs(self, val): + if len(val) == 0: + free(self._attrs) + self._attrs_length = 0 + self._pvt_ptr[0].attrs = NULL + else: + if self._attrs_length != len(val): + free(self._attrs) + self._attrs = calloc(len(val), sizeof(cydriver.CUlaunchAttribute)) + if self._attrs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUlaunchAttribute))) + self._attrs_length = len(val) + self._pvt_ptr[0].attrs = self._attrs + for idx in range(len(val)): + string.memcpy(&self._attrs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUlaunchAttribute)) + + @property + def numAttrs(self): + return self._pvt_ptr[0].numAttrs + @numAttrs.setter + def numAttrs(self, unsigned int numAttrs): + self._pvt_ptr[0].numAttrs = numAttrs + +cdef class CUexecAffinitySmCount_st: + """ + Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT + + Attributes + ---------- + val : unsigned int + The number of SMs the context is limited to use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['val : ' + str(self.val)] + except ValueError: + str_list += ['val : '] + return '\n'.join(str_list) + else: + return '' + @property + def val(self): + return self._pvt_ptr[0].val + @val.setter + def val(self, unsigned int val): + self._pvt_ptr[0].val = val + +cdef class anon_union3: + """ + Attributes + ---------- + smCount : CUexecAffinitySmCount + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._smCount = CUexecAffinitySmCount(_ptr=&self._pvt_ptr[0].param.smCount) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].param + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['smCount :\n' + '\n'.join([' ' + line for line in str(self.smCount).splitlines()])] + except ValueError: + str_list += ['smCount : '] + return '\n'.join(str_list) + else: + return '' + @property + def smCount(self): + return self._smCount + @smCount.setter + def smCount(self, smCount not None : CUexecAffinitySmCount): + string.memcpy(&self._pvt_ptr[0].param.smCount, smCount.getPtr(), sizeof(self._pvt_ptr[0].param.smCount)) + +cdef class CUexecAffinityParam_st: + """ + Execution Affinity Parameters + + Attributes + ---------- + type : CUexecAffinityType + + param : anon_union3 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUexecAffinityParam_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._param = anon_union3(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['param :\n' + '\n'.join([' ' + line for line in str(self.param).splitlines()])] + except ValueError: + str_list += ['param : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUexecAffinityType: + return None + return _dict_CUexecAffinityType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUexecAffinityType): + self._pvt_ptr[0].type = type.value + @property + def param(self): + return self._param + @param.setter + def param(self, param not None : anon_union3): + string.memcpy(&self._pvt_ptr[0].param, param.getPtr(), sizeof(self._pvt_ptr[0].param)) + +cdef class CUctxCigParam_st: + """ + CIG Context Create Params + + Attributes + ---------- + sharedDataType : CUcigDataType + + sharedData : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['sharedDataType : ' + str(self.sharedDataType)] + except ValueError: + str_list += ['sharedDataType : '] + try: + str_list += ['sharedData : ' + hex(self.sharedData)] + except ValueError: + str_list += ['sharedData : '] + return '\n'.join(str_list) + else: + return '' + @property + def sharedDataType(self): + if self._pvt_ptr[0].sharedDataType not in _dict_CUcigDataType: + return None + return _dict_CUcigDataType[self._pvt_ptr[0].sharedDataType] + @sharedDataType.setter + def sharedDataType(self, sharedDataType not None : CUcigDataType): + self._pvt_ptr[0].sharedDataType = sharedDataType.value + @property + def sharedData(self): + return self._pvt_ptr[0].sharedData + @sharedData.setter + def sharedData(self, sharedData): + _csharedData = _HelperInputVoidPtr(sharedData) + self._pvt_ptr[0].sharedData = _csharedData.cptr + +cdef class CUctxCreateParams_st: + """ + Params for creating CUDA context Exactly one of execAffinityParams + and cigParams must be non-NULL. + + Attributes + ---------- + execAffinityParams : CUexecAffinityParam + + numExecAffinityParams : int + + cigParams : CUctxCigParam + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._execAffinityParams is not NULL: + free(self._execAffinityParams) + if self._cigParams is not NULL: + free(self._cigParams) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['execAffinityParams : ' + str(self.execAffinityParams)] + except ValueError: + str_list += ['execAffinityParams : '] + try: + str_list += ['numExecAffinityParams : ' + str(self.numExecAffinityParams)] + except ValueError: + str_list += ['numExecAffinityParams : '] + try: + str_list += ['cigParams : ' + str(self.cigParams)] + except ValueError: + str_list += ['cigParams : '] + return '\n'.join(str_list) + else: + return '' + @property + def execAffinityParams(self): + arrs = [self._pvt_ptr[0].execAffinityParams + x*sizeof(cydriver.CUexecAffinityParam) for x in range(self._execAffinityParams_length)] + return [CUexecAffinityParam(_ptr=arr) for arr in arrs] + @execAffinityParams.setter + def execAffinityParams(self, val): + if len(val) == 0: + free(self._execAffinityParams) + self._execAffinityParams_length = 0 + self._pvt_ptr[0].execAffinityParams = NULL + else: + if self._execAffinityParams_length != len(val): + free(self._execAffinityParams) + self._execAffinityParams = calloc(len(val), sizeof(cydriver.CUexecAffinityParam)) + if self._execAffinityParams is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexecAffinityParam))) + self._execAffinityParams_length = len(val) + self._pvt_ptr[0].execAffinityParams = self._execAffinityParams + for idx in range(len(val)): + string.memcpy(&self._execAffinityParams[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUexecAffinityParam)) + + @property + def numExecAffinityParams(self): + return self._pvt_ptr[0].numExecAffinityParams + @numExecAffinityParams.setter + def numExecAffinityParams(self, int numExecAffinityParams): + self._pvt_ptr[0].numExecAffinityParams = numExecAffinityParams + @property + def cigParams(self): + arrs = [self._pvt_ptr[0].cigParams + x*sizeof(cydriver.CUctxCigParam) for x in range(self._cigParams_length)] + return [CUctxCigParam(_ptr=arr) for arr in arrs] + @cigParams.setter + def cigParams(self, val): + if len(val) == 0: + free(self._cigParams) + self._cigParams_length = 0 + self._pvt_ptr[0].cigParams = NULL + else: + if self._cigParams_length != len(val): + free(self._cigParams) + self._cigParams = calloc(len(val), sizeof(cydriver.CUctxCigParam)) + if self._cigParams is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUctxCigParam))) + self._cigParams_length = len(val) + self._pvt_ptr[0].cigParams = self._cigParams + for idx in range(len(val)): + string.memcpy(&self._cigParams[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUctxCigParam)) + + +cdef class CUlibraryHostUniversalFunctionAndDataTable_st: + """ + Attributes + ---------- + functionTable : Any + + functionWindowSize : size_t + + dataTable : Any + + dataWindowSize : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['functionTable : ' + hex(self.functionTable)] + except ValueError: + str_list += ['functionTable : '] + try: + str_list += ['functionWindowSize : ' + str(self.functionWindowSize)] + except ValueError: + str_list += ['functionWindowSize : '] + try: + str_list += ['dataTable : ' + hex(self.dataTable)] + except ValueError: + str_list += ['dataTable : '] + try: + str_list += ['dataWindowSize : ' + str(self.dataWindowSize)] + except ValueError: + str_list += ['dataWindowSize : '] + return '\n'.join(str_list) + else: + return '' + @property + def functionTable(self): + return self._pvt_ptr[0].functionTable + @functionTable.setter + def functionTable(self, functionTable): + _cfunctionTable = _HelperInputVoidPtr(functionTable) + self._pvt_ptr[0].functionTable = _cfunctionTable.cptr + @property + def functionWindowSize(self): + return self._pvt_ptr[0].functionWindowSize + @functionWindowSize.setter + def functionWindowSize(self, size_t functionWindowSize): + self._pvt_ptr[0].functionWindowSize = functionWindowSize + @property + def dataTable(self): + return self._pvt_ptr[0].dataTable + @dataTable.setter + def dataTable(self, dataTable): + _cdataTable = _HelperInputVoidPtr(dataTable) + self._pvt_ptr[0].dataTable = _cdataTable.cptr + @property + def dataWindowSize(self): + return self._pvt_ptr[0].dataWindowSize + @dataWindowSize.setter + def dataWindowSize(self, size_t dataWindowSize): + self._pvt_ptr[0].dataWindowSize = dataWindowSize + +cdef class CUDA_MEMCPY2D_st: + """ + 2D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcPitch : size_t + Source pitch (ignored when src is array) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstPitch : size_t + Destination pitch (ignored when dst is array) + WidthInBytes : size_t + Width of 2D memory copy in bytes + Height : size_t + Height of 2D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] + except ValueError: + str_list += ['srcXInBytes : '] + try: + str_list += ['srcY : ' + str(self.srcY)] + except ValueError: + str_list += ['srcY : '] + try: + str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] + except ValueError: + str_list += ['srcMemoryType : '] + try: + str_list += ['srcHost : ' + hex(self.srcHost)] + except ValueError: + str_list += ['srcHost : '] + try: + str_list += ['srcDevice : ' + str(self.srcDevice)] + except ValueError: + str_list += ['srcDevice : '] + try: + str_list += ['srcArray : ' + str(self.srcArray)] + except ValueError: + str_list += ['srcArray : '] + try: + str_list += ['srcPitch : ' + str(self.srcPitch)] + except ValueError: + str_list += ['srcPitch : '] + try: + str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] + except ValueError: + str_list += ['dstXInBytes : '] + try: + str_list += ['dstY : ' + str(self.dstY)] + except ValueError: + str_list += ['dstY : '] + try: + str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] + except ValueError: + str_list += ['dstMemoryType : '] + try: + str_list += ['dstHost : ' + hex(self.dstHost)] + except ValueError: + str_list += ['dstHost : '] + try: + str_list += ['dstDevice : ' + str(self.dstDevice)] + except ValueError: + str_list += ['dstDevice : '] + try: + str_list += ['dstArray : ' + str(self.dstArray)] + except ValueError: + str_list += ['dstArray : '] + try: + str_list += ['dstPitch : ' + str(self.dstPitch)] + except ValueError: + str_list += ['dstPitch : '] + try: + str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] + except ValueError: + str_list += ['WidthInBytes : '] + try: + str_list += ['Height : ' + str(self.Height)] + except ValueError: + str_list += ['Height : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcXInBytes(self): + return self._pvt_ptr[0].srcXInBytes + @srcXInBytes.setter + def srcXInBytes(self, size_t srcXInBytes): + self._pvt_ptr[0].srcXInBytes = srcXInBytes + @property + def srcY(self): + return self._pvt_ptr[0].srcY + @srcY.setter + def srcY(self, size_t srcY): + self._pvt_ptr[0].srcY = srcY + @property + def srcMemoryType(self): + if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + @srcMemoryType.setter + def srcMemoryType(self, srcMemoryType not None : CUmemorytype): + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + @property + def srcHost(self): + return self._pvt_ptr[0].srcHost + @srcHost.setter + def srcHost(self, srcHost): + _csrcHost = _HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + @property + def srcDevice(self): + return self._srcDevice + @srcDevice.setter + def srcDevice(self, srcDevice): + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + cysrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr)): + psrcDevice = int(srcDevice) + cysrcDevice = psrcDevice + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + + @property + def srcArray(self): + return self._srcArray + @srcArray.setter + def srcArray(self, srcArray): + cdef cydriver.CUarray cysrcArray + if srcArray is None: + cysrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + cysrcArray = psrcArray + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + @property + def srcPitch(self): + return self._pvt_ptr[0].srcPitch + @srcPitch.setter + def srcPitch(self, size_t srcPitch): + self._pvt_ptr[0].srcPitch = srcPitch + @property + def dstXInBytes(self): + return self._pvt_ptr[0].dstXInBytes + @dstXInBytes.setter + def dstXInBytes(self, size_t dstXInBytes): + self._pvt_ptr[0].dstXInBytes = dstXInBytes + @property + def dstY(self): + return self._pvt_ptr[0].dstY + @dstY.setter + def dstY(self, size_t dstY): + self._pvt_ptr[0].dstY = dstY + @property + def dstMemoryType(self): + if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + @dstMemoryType.setter + def dstMemoryType(self, dstMemoryType not None : CUmemorytype): + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + @property + def dstHost(self): + return self._pvt_ptr[0].dstHost + @dstHost.setter + def dstHost(self, dstHost): + _cdstHost = _HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + @property + def dstDevice(self): + return self._dstDevice + @dstDevice.setter + def dstDevice(self, dstDevice): + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + cydstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr)): + pdstDevice = int(dstDevice) + cydstDevice = pdstDevice + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + + @property + def dstArray(self): + return self._dstArray + @dstArray.setter + def dstArray(self, dstArray): + cdef cydriver.CUarray cydstArray + if dstArray is None: + cydstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + cydstArray = pdstArray + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + self._dstArray._pvt_ptr[0] = cydstArray + @property + def dstPitch(self): + return self._pvt_ptr[0].dstPitch + @dstPitch.setter + def dstPitch(self, size_t dstPitch): + self._pvt_ptr[0].dstPitch = dstPitch + @property + def WidthInBytes(self): + return self._pvt_ptr[0].WidthInBytes + @WidthInBytes.setter + def WidthInBytes(self, size_t WidthInBytes): + self._pvt_ptr[0].WidthInBytes = WidthInBytes + @property + def Height(self): + return self._pvt_ptr[0].Height + @Height.setter + def Height(self, size_t Height): + self._pvt_ptr[0].Height = Height + +cdef class CUDA_MEMCPY3D_st: + """ + 3D memory copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + reserved0 : Any + Must be NULL + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + reserved1 : Any + Must be NULL + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] + except ValueError: + str_list += ['srcXInBytes : '] + try: + str_list += ['srcY : ' + str(self.srcY)] + except ValueError: + str_list += ['srcY : '] + try: + str_list += ['srcZ : ' + str(self.srcZ)] + except ValueError: + str_list += ['srcZ : '] + try: + str_list += ['srcLOD : ' + str(self.srcLOD)] + except ValueError: + str_list += ['srcLOD : '] + try: + str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] + except ValueError: + str_list += ['srcMemoryType : '] + try: + str_list += ['srcHost : ' + hex(self.srcHost)] + except ValueError: + str_list += ['srcHost : '] + try: + str_list += ['srcDevice : ' + str(self.srcDevice)] + except ValueError: + str_list += ['srcDevice : '] + try: + str_list += ['srcArray : ' + str(self.srcArray)] + except ValueError: + str_list += ['srcArray : '] + try: + str_list += ['reserved0 : ' + hex(self.reserved0)] + except ValueError: + str_list += ['reserved0 : '] + try: + str_list += ['srcPitch : ' + str(self.srcPitch)] + except ValueError: + str_list += ['srcPitch : '] + try: + str_list += ['srcHeight : ' + str(self.srcHeight)] + except ValueError: + str_list += ['srcHeight : '] + try: + str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] + except ValueError: + str_list += ['dstXInBytes : '] + try: + str_list += ['dstY : ' + str(self.dstY)] + except ValueError: + str_list += ['dstY : '] + try: + str_list += ['dstZ : ' + str(self.dstZ)] + except ValueError: + str_list += ['dstZ : '] + try: + str_list += ['dstLOD : ' + str(self.dstLOD)] + except ValueError: + str_list += ['dstLOD : '] + try: + str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] + except ValueError: + str_list += ['dstMemoryType : '] + try: + str_list += ['dstHost : ' + hex(self.dstHost)] + except ValueError: + str_list += ['dstHost : '] + try: + str_list += ['dstDevice : ' + str(self.dstDevice)] + except ValueError: + str_list += ['dstDevice : '] + try: + str_list += ['dstArray : ' + str(self.dstArray)] + except ValueError: + str_list += ['dstArray : '] + try: + str_list += ['reserved1 : ' + hex(self.reserved1)] + except ValueError: + str_list += ['reserved1 : '] + try: + str_list += ['dstPitch : ' + str(self.dstPitch)] + except ValueError: + str_list += ['dstPitch : '] + try: + str_list += ['dstHeight : ' + str(self.dstHeight)] + except ValueError: + str_list += ['dstHeight : '] + try: + str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] + except ValueError: + str_list += ['WidthInBytes : '] + try: + str_list += ['Height : ' + str(self.Height)] + except ValueError: + str_list += ['Height : '] + try: + str_list += ['Depth : ' + str(self.Depth)] + except ValueError: + str_list += ['Depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcXInBytes(self): + return self._pvt_ptr[0].srcXInBytes + @srcXInBytes.setter + def srcXInBytes(self, size_t srcXInBytes): + self._pvt_ptr[0].srcXInBytes = srcXInBytes + @property + def srcY(self): + return self._pvt_ptr[0].srcY + @srcY.setter + def srcY(self, size_t srcY): + self._pvt_ptr[0].srcY = srcY + @property + def srcZ(self): + return self._pvt_ptr[0].srcZ + @srcZ.setter + def srcZ(self, size_t srcZ): + self._pvt_ptr[0].srcZ = srcZ + @property + def srcLOD(self): + return self._pvt_ptr[0].srcLOD + @srcLOD.setter + def srcLOD(self, size_t srcLOD): + self._pvt_ptr[0].srcLOD = srcLOD + @property + def srcMemoryType(self): + if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + @srcMemoryType.setter + def srcMemoryType(self, srcMemoryType not None : CUmemorytype): + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + @property + def srcHost(self): + return self._pvt_ptr[0].srcHost + @srcHost.setter + def srcHost(self, srcHost): + _csrcHost = _HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + @property + def srcDevice(self): + return self._srcDevice + @srcDevice.setter + def srcDevice(self, srcDevice): + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + cysrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr)): + psrcDevice = int(srcDevice) + cysrcDevice = psrcDevice + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + + @property + def srcArray(self): + return self._srcArray + @srcArray.setter + def srcArray(self, srcArray): + cdef cydriver.CUarray cysrcArray + if srcArray is None: + cysrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + cysrcArray = psrcArray + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + @property + def reserved0(self): + return self._pvt_ptr[0].reserved0 + @reserved0.setter + def reserved0(self, reserved0): + _creserved0 = _HelperInputVoidPtr(reserved0) + self._pvt_ptr[0].reserved0 = _creserved0.cptr + @property + def srcPitch(self): + return self._pvt_ptr[0].srcPitch + @srcPitch.setter + def srcPitch(self, size_t srcPitch): + self._pvt_ptr[0].srcPitch = srcPitch + @property + def srcHeight(self): + return self._pvt_ptr[0].srcHeight + @srcHeight.setter + def srcHeight(self, size_t srcHeight): + self._pvt_ptr[0].srcHeight = srcHeight + @property + def dstXInBytes(self): + return self._pvt_ptr[0].dstXInBytes + @dstXInBytes.setter + def dstXInBytes(self, size_t dstXInBytes): + self._pvt_ptr[0].dstXInBytes = dstXInBytes + @property + def dstY(self): + return self._pvt_ptr[0].dstY + @dstY.setter + def dstY(self, size_t dstY): + self._pvt_ptr[0].dstY = dstY + @property + def dstZ(self): + return self._pvt_ptr[0].dstZ + @dstZ.setter + def dstZ(self, size_t dstZ): + self._pvt_ptr[0].dstZ = dstZ + @property + def dstLOD(self): + return self._pvt_ptr[0].dstLOD + @dstLOD.setter + def dstLOD(self, size_t dstLOD): + self._pvt_ptr[0].dstLOD = dstLOD + @property + def dstMemoryType(self): + if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + @dstMemoryType.setter + def dstMemoryType(self, dstMemoryType not None : CUmemorytype): + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + @property + def dstHost(self): + return self._pvt_ptr[0].dstHost + @dstHost.setter + def dstHost(self, dstHost): + _cdstHost = _HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + @property + def dstDevice(self): + return self._dstDevice + @dstDevice.setter + def dstDevice(self, dstDevice): + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + cydstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr)): + pdstDevice = int(dstDevice) + cydstDevice = pdstDevice + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + + @property + def dstArray(self): + return self._dstArray + @dstArray.setter + def dstArray(self, dstArray): + cdef cydriver.CUarray cydstArray + if dstArray is None: + cydstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + cydstArray = pdstArray + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + self._dstArray._pvt_ptr[0] = cydstArray + @property + def reserved1(self): + return self._pvt_ptr[0].reserved1 + @reserved1.setter + def reserved1(self, reserved1): + _creserved1 = _HelperInputVoidPtr(reserved1) + self._pvt_ptr[0].reserved1 = _creserved1.cptr + @property + def dstPitch(self): + return self._pvt_ptr[0].dstPitch + @dstPitch.setter + def dstPitch(self, size_t dstPitch): + self._pvt_ptr[0].dstPitch = dstPitch + @property + def dstHeight(self): + return self._pvt_ptr[0].dstHeight + @dstHeight.setter + def dstHeight(self, size_t dstHeight): + self._pvt_ptr[0].dstHeight = dstHeight + @property + def WidthInBytes(self): + return self._pvt_ptr[0].WidthInBytes + @WidthInBytes.setter + def WidthInBytes(self, size_t WidthInBytes): + self._pvt_ptr[0].WidthInBytes = WidthInBytes + @property + def Height(self): + return self._pvt_ptr[0].Height + @Height.setter + def Height(self, size_t Height): + self._pvt_ptr[0].Height = Height + @property + def Depth(self): + return self._pvt_ptr[0].Depth + @Depth.setter + def Depth(self, size_t Depth): + self._pvt_ptr[0].Depth = Depth + +cdef class CUDA_MEMCPY3D_PEER_st: + """ + 3D memory cross-context copy parameters + + Attributes + ---------- + srcXInBytes : size_t + Source X in bytes + srcY : size_t + Source Y + srcZ : size_t + Source Z + srcLOD : size_t + Source LOD + srcMemoryType : CUmemorytype + Source memory type (host, device, array) + srcHost : Any + Source host pointer + srcDevice : CUdeviceptr + Source device pointer + srcArray : CUarray + Source array reference + srcContext : CUcontext + Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + srcPitch : size_t + Source pitch (ignored when src is array) + srcHeight : size_t + Source height (ignored when src is array; may be 0 if Depth==1) + dstXInBytes : size_t + Destination X in bytes + dstY : size_t + Destination Y + dstZ : size_t + Destination Z + dstLOD : size_t + Destination LOD + dstMemoryType : CUmemorytype + Destination memory type (host, device, array) + dstHost : Any + Destination host pointer + dstDevice : CUdeviceptr + Destination device pointer + dstArray : CUarray + Destination array reference + dstContext : CUcontext + Destination context (ignored with dstMemoryType is + CU_MEMORYTYPE_ARRAY) + dstPitch : size_t + Destination pitch (ignored when dst is array) + dstHeight : size_t + Destination height (ignored when dst is array; may be 0 if + Depth==1) + WidthInBytes : size_t + Width of 3D memory copy in bytes + Height : size_t + Height of 3D memory copy + Depth : size_t + Depth of 3D memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + self._srcContext = CUcontext(_ptr=&self._pvt_ptr[0].srcContext) + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + self._dstContext = CUcontext(_ptr=&self._pvt_ptr[0].dstContext) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] + except ValueError: + str_list += ['srcXInBytes : '] + try: + str_list += ['srcY : ' + str(self.srcY)] + except ValueError: + str_list += ['srcY : '] + try: + str_list += ['srcZ : ' + str(self.srcZ)] + except ValueError: + str_list += ['srcZ : '] + try: + str_list += ['srcLOD : ' + str(self.srcLOD)] + except ValueError: + str_list += ['srcLOD : '] + try: + str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] + except ValueError: + str_list += ['srcMemoryType : '] + try: + str_list += ['srcHost : ' + hex(self.srcHost)] + except ValueError: + str_list += ['srcHost : '] + try: + str_list += ['srcDevice : ' + str(self.srcDevice)] + except ValueError: + str_list += ['srcDevice : '] + try: + str_list += ['srcArray : ' + str(self.srcArray)] + except ValueError: + str_list += ['srcArray : '] + try: + str_list += ['srcContext : ' + str(self.srcContext)] + except ValueError: + str_list += ['srcContext : '] + try: + str_list += ['srcPitch : ' + str(self.srcPitch)] + except ValueError: + str_list += ['srcPitch : '] + try: + str_list += ['srcHeight : ' + str(self.srcHeight)] + except ValueError: + str_list += ['srcHeight : '] + try: + str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] + except ValueError: + str_list += ['dstXInBytes : '] + try: + str_list += ['dstY : ' + str(self.dstY)] + except ValueError: + str_list += ['dstY : '] + try: + str_list += ['dstZ : ' + str(self.dstZ)] + except ValueError: + str_list += ['dstZ : '] + try: + str_list += ['dstLOD : ' + str(self.dstLOD)] + except ValueError: + str_list += ['dstLOD : '] + try: + str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] + except ValueError: + str_list += ['dstMemoryType : '] + try: + str_list += ['dstHost : ' + hex(self.dstHost)] + except ValueError: + str_list += ['dstHost : '] + try: + str_list += ['dstDevice : ' + str(self.dstDevice)] + except ValueError: + str_list += ['dstDevice : '] + try: + str_list += ['dstArray : ' + str(self.dstArray)] + except ValueError: + str_list += ['dstArray : '] + try: + str_list += ['dstContext : ' + str(self.dstContext)] + except ValueError: + str_list += ['dstContext : '] + try: + str_list += ['dstPitch : ' + str(self.dstPitch)] + except ValueError: + str_list += ['dstPitch : '] + try: + str_list += ['dstHeight : ' + str(self.dstHeight)] + except ValueError: + str_list += ['dstHeight : '] + try: + str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] + except ValueError: + str_list += ['WidthInBytes : '] + try: + str_list += ['Height : ' + str(self.Height)] + except ValueError: + str_list += ['Height : '] + try: + str_list += ['Depth : ' + str(self.Depth)] + except ValueError: + str_list += ['Depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcXInBytes(self): + return self._pvt_ptr[0].srcXInBytes + @srcXInBytes.setter + def srcXInBytes(self, size_t srcXInBytes): + self._pvt_ptr[0].srcXInBytes = srcXInBytes + @property + def srcY(self): + return self._pvt_ptr[0].srcY + @srcY.setter + def srcY(self, size_t srcY): + self._pvt_ptr[0].srcY = srcY + @property + def srcZ(self): + return self._pvt_ptr[0].srcZ + @srcZ.setter + def srcZ(self, size_t srcZ): + self._pvt_ptr[0].srcZ = srcZ + @property + def srcLOD(self): + return self._pvt_ptr[0].srcLOD + @srcLOD.setter + def srcLOD(self, size_t srcLOD): + self._pvt_ptr[0].srcLOD = srcLOD + @property + def srcMemoryType(self): + if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + @srcMemoryType.setter + def srcMemoryType(self, srcMemoryType not None : CUmemorytype): + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + @property + def srcHost(self): + return self._pvt_ptr[0].srcHost + @srcHost.setter + def srcHost(self, srcHost): + _csrcHost = _HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + @property + def srcDevice(self): + return self._srcDevice + @srcDevice.setter + def srcDevice(self, srcDevice): + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + cysrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr)): + psrcDevice = int(srcDevice) + cysrcDevice = psrcDevice + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + + @property + def srcArray(self): + return self._srcArray + @srcArray.setter + def srcArray(self, srcArray): + cdef cydriver.CUarray cysrcArray + if srcArray is None: + cysrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + cysrcArray = psrcArray + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + @property + def srcContext(self): + return self._srcContext + @srcContext.setter + def srcContext(self, srcContext): + cdef cydriver.CUcontext cysrcContext + if srcContext is None: + cysrcContext = 0 + elif isinstance(srcContext, (CUcontext,)): + psrcContext = int(srcContext) + cysrcContext = psrcContext + else: + psrcContext = int(CUcontext(srcContext)) + cysrcContext = psrcContext + self._srcContext._pvt_ptr[0] = cysrcContext + @property + def srcPitch(self): + return self._pvt_ptr[0].srcPitch + @srcPitch.setter + def srcPitch(self, size_t srcPitch): + self._pvt_ptr[0].srcPitch = srcPitch + @property + def srcHeight(self): + return self._pvt_ptr[0].srcHeight + @srcHeight.setter + def srcHeight(self, size_t srcHeight): + self._pvt_ptr[0].srcHeight = srcHeight + @property + def dstXInBytes(self): + return self._pvt_ptr[0].dstXInBytes + @dstXInBytes.setter + def dstXInBytes(self, size_t dstXInBytes): + self._pvt_ptr[0].dstXInBytes = dstXInBytes + @property + def dstY(self): + return self._pvt_ptr[0].dstY + @dstY.setter + def dstY(self, size_t dstY): + self._pvt_ptr[0].dstY = dstY + @property + def dstZ(self): + return self._pvt_ptr[0].dstZ + @dstZ.setter + def dstZ(self, size_t dstZ): + self._pvt_ptr[0].dstZ = dstZ + @property + def dstLOD(self): + return self._pvt_ptr[0].dstLOD + @dstLOD.setter + def dstLOD(self, size_t dstLOD): + self._pvt_ptr[0].dstLOD = dstLOD + @property + def dstMemoryType(self): + if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: + return None + return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + @dstMemoryType.setter + def dstMemoryType(self, dstMemoryType not None : CUmemorytype): + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + @property + def dstHost(self): + return self._pvt_ptr[0].dstHost + @dstHost.setter + def dstHost(self, dstHost): + _cdstHost = _HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + @property + def dstDevice(self): + return self._dstDevice + @dstDevice.setter + def dstDevice(self, dstDevice): + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + cydstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr)): + pdstDevice = int(dstDevice) + cydstDevice = pdstDevice + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + + @property + def dstArray(self): + return self._dstArray + @dstArray.setter + def dstArray(self, dstArray): + cdef cydriver.CUarray cydstArray + if dstArray is None: + cydstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + cydstArray = pdstArray + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + self._dstArray._pvt_ptr[0] = cydstArray + @property + def dstContext(self): + return self._dstContext + @dstContext.setter + def dstContext(self, dstContext): + cdef cydriver.CUcontext cydstContext + if dstContext is None: + cydstContext = 0 + elif isinstance(dstContext, (CUcontext,)): + pdstContext = int(dstContext) + cydstContext = pdstContext + else: + pdstContext = int(CUcontext(dstContext)) + cydstContext = pdstContext + self._dstContext._pvt_ptr[0] = cydstContext + @property + def dstPitch(self): + return self._pvt_ptr[0].dstPitch + @dstPitch.setter + def dstPitch(self, size_t dstPitch): + self._pvt_ptr[0].dstPitch = dstPitch + @property + def dstHeight(self): + return self._pvt_ptr[0].dstHeight + @dstHeight.setter + def dstHeight(self, size_t dstHeight): + self._pvt_ptr[0].dstHeight = dstHeight + @property + def WidthInBytes(self): + return self._pvt_ptr[0].WidthInBytes + @WidthInBytes.setter + def WidthInBytes(self, size_t WidthInBytes): + self._pvt_ptr[0].WidthInBytes = WidthInBytes + @property + def Height(self): + return self._pvt_ptr[0].Height + @Height.setter + def Height(self, size_t Height): + self._pvt_ptr[0].Height = Height + @property + def Depth(self): + return self._pvt_ptr[0].Depth + @Depth.setter + def Depth(self, size_t Depth): + self._pvt_ptr[0].Depth = Depth + +cdef class CUDA_MEMCPY_NODE_PARAMS_st: + """ + Memcpy node parameters + + Attributes + ---------- + flags : int + Must be zero + reserved : int + Must be zero + copyCtx : CUcontext + Context on which to run the node + copyParams : CUDA_MEMCPY3D + Parameters for the memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._copyCtx = CUcontext(_ptr=&self._pvt_ptr[0].copyCtx) + self._copyParams = CUDA_MEMCPY3D(_ptr=&self._pvt_ptr[0].copyParams) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + try: + str_list += ['copyCtx : ' + str(self.copyCtx)] + except ValueError: + str_list += ['copyCtx : '] + try: + str_list += ['copyParams :\n' + '\n'.join([' ' + line for line in str(self.copyParams).splitlines()])] + except ValueError: + str_list += ['copyParams : '] + return '\n'.join(str_list) + else: + return '' + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, int reserved): + self._pvt_ptr[0].reserved = reserved + @property + def copyCtx(self): + return self._copyCtx + @copyCtx.setter + def copyCtx(self, copyCtx): + cdef cydriver.CUcontext cycopyCtx + if copyCtx is None: + cycopyCtx = 0 + elif isinstance(copyCtx, (CUcontext,)): + pcopyCtx = int(copyCtx) + cycopyCtx = pcopyCtx + else: + pcopyCtx = int(CUcontext(copyCtx)) + cycopyCtx = pcopyCtx + self._copyCtx._pvt_ptr[0] = cycopyCtx + @property + def copyParams(self): + return self._copyParams + @copyParams.setter + def copyParams(self, copyParams not None : CUDA_MEMCPY3D): + string.memcpy(&self._pvt_ptr[0].copyParams, copyParams.getPtr(), sizeof(self._pvt_ptr[0].copyParams)) + +cdef class CUDA_ARRAY_DESCRIPTOR_st: + """ + Array descriptor + + Attributes + ---------- + Width : size_t + Width of array + Height : size_t + Height of array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['Width : ' + str(self.Width)] + except ValueError: + str_list += ['Width : '] + try: + str_list += ['Height : ' + str(self.Height)] + except ValueError: + str_list += ['Height : '] + try: + str_list += ['Format : ' + str(self.Format)] + except ValueError: + str_list += ['Format : '] + try: + str_list += ['NumChannels : ' + str(self.NumChannels)] + except ValueError: + str_list += ['NumChannels : '] + return '\n'.join(str_list) + else: + return '' + @property + def Width(self): + return self._pvt_ptr[0].Width + @Width.setter + def Width(self, size_t Width): + self._pvt_ptr[0].Width = Width + @property + def Height(self): + return self._pvt_ptr[0].Height + @Height.setter + def Height(self, size_t Height): + self._pvt_ptr[0].Height = Height + @property + def Format(self): + if self._pvt_ptr[0].Format not in _dict_CUarray_format: + return None + return _dict_CUarray_format[self._pvt_ptr[0].Format] + @Format.setter + def Format(self, Format not None : CUarray_format): + self._pvt_ptr[0].Format = Format.value + @property + def NumChannels(self): + return self._pvt_ptr[0].NumChannels + @NumChannels.setter + def NumChannels(self, unsigned int NumChannels): + self._pvt_ptr[0].NumChannels = NumChannels + +cdef class CUDA_ARRAY3D_DESCRIPTOR_st: + """ + 3D array descriptor + + Attributes + ---------- + Width : size_t + Width of 3D array + Height : size_t + Height of 3D array + Depth : size_t + Depth of 3D array + Format : CUarray_format + Array format + NumChannels : unsigned int + Channels per array element + Flags : unsigned int + Flags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['Width : ' + str(self.Width)] + except ValueError: + str_list += ['Width : '] + try: + str_list += ['Height : ' + str(self.Height)] + except ValueError: + str_list += ['Height : '] + try: + str_list += ['Depth : ' + str(self.Depth)] + except ValueError: + str_list += ['Depth : '] + try: + str_list += ['Format : ' + str(self.Format)] + except ValueError: + str_list += ['Format : '] + try: + str_list += ['NumChannels : ' + str(self.NumChannels)] + except ValueError: + str_list += ['NumChannels : '] + try: + str_list += ['Flags : ' + str(self.Flags)] + except ValueError: + str_list += ['Flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def Width(self): + return self._pvt_ptr[0].Width + @Width.setter + def Width(self, size_t Width): + self._pvt_ptr[0].Width = Width + @property + def Height(self): + return self._pvt_ptr[0].Height + @Height.setter + def Height(self, size_t Height): + self._pvt_ptr[0].Height = Height + @property + def Depth(self): + return self._pvt_ptr[0].Depth + @Depth.setter + def Depth(self, size_t Depth): + self._pvt_ptr[0].Depth = Depth + @property + def Format(self): + if self._pvt_ptr[0].Format not in _dict_CUarray_format: + return None + return _dict_CUarray_format[self._pvt_ptr[0].Format] + @Format.setter + def Format(self, Format not None : CUarray_format): + self._pvt_ptr[0].Format = Format.value + @property + def NumChannels(self): + return self._pvt_ptr[0].NumChannels + @NumChannels.setter + def NumChannels(self, unsigned int NumChannels): + self._pvt_ptr[0].NumChannels = NumChannels + @property + def Flags(self): + return self._pvt_ptr[0].Flags + @Flags.setter + def Flags(self, unsigned int Flags): + self._pvt_ptr[0].Flags = Flags + +cdef class anon_struct6: + """ + Attributes + ---------- + width : unsigned int + + height : unsigned int + + depth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].tileExtent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def width(self): + return self._pvt_ptr[0].tileExtent.width + @width.setter + def width(self, unsigned int width): + self._pvt_ptr[0].tileExtent.width = width + @property + def height(self): + return self._pvt_ptr[0].tileExtent.height + @height.setter + def height(self, unsigned int height): + self._pvt_ptr[0].tileExtent.height = height + @property + def depth(self): + return self._pvt_ptr[0].tileExtent.depth + @depth.setter + def depth(self, unsigned int depth): + self._pvt_ptr[0].tileExtent.depth = depth + +cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: + """ + CUDA array sparse properties + + Attributes + ---------- + tileExtent : anon_struct6 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins. + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or + CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._tileExtent = anon_struct6(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['tileExtent :\n' + '\n'.join([' ' + line for line in str(self.tileExtent).splitlines()])] + except ValueError: + str_list += ['tileExtent : '] + try: + str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)] + except ValueError: + str_list += ['miptailFirstLevel : '] + try: + str_list += ['miptailSize : ' + str(self.miptailSize)] + except ValueError: + str_list += ['miptailSize : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def tileExtent(self): + return self._tileExtent + @tileExtent.setter + def tileExtent(self, tileExtent not None : anon_struct6): + string.memcpy(&self._pvt_ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._pvt_ptr[0].tileExtent)) + @property + def miptailFirstLevel(self): + return self._pvt_ptr[0].miptailFirstLevel + @miptailFirstLevel.setter + def miptailFirstLevel(self, unsigned int miptailFirstLevel): + self._pvt_ptr[0].miptailFirstLevel = miptailFirstLevel + @property + def miptailSize(self): + return self._pvt_ptr[0].miptailSize + @miptailSize.setter + def miptailSize(self, unsigned long long miptailSize): + self._pvt_ptr[0].miptailSize = miptailSize + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + """ + CUDA array memory requirements + + Attributes + ---------- + size : size_t + Total required memory size + alignment : size_t + alignment requirement + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['alignment : ' + str(self.alignment)] + except ValueError: + str_list += ['alignment : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, size_t size): + self._pvt_ptr[0].size = size + @property + def alignment(self): + return self._pvt_ptr[0].alignment + @alignment.setter + def alignment(self, size_t alignment): + self._pvt_ptr[0].alignment = alignment + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_struct7: + """ + Attributes + ---------- + hArray : CUarray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._hArray = CUarray(_ptr=&self._pvt_ptr[0].res.array.hArray) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['hArray : ' + str(self.hArray)] + except ValueError: + str_list += ['hArray : '] + return '\n'.join(str_list) + else: + return '' + @property + def hArray(self): + return self._hArray + @hArray.setter + def hArray(self, hArray): + cdef cydriver.CUarray cyhArray + if hArray is None: + cyhArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + cyhArray = phArray + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + self._hArray._pvt_ptr[0] = cyhArray + +cdef class anon_struct8: + """ + Attributes + ---------- + hMipmappedArray : CUmipmappedArray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._hMipmappedArray = CUmipmappedArray(_ptr=&self._pvt_ptr[0].res.mipmap.hMipmappedArray) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.mipmap + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)] + except ValueError: + str_list += ['hMipmappedArray : '] + return '\n'.join(str_list) + else: + return '' + @property + def hMipmappedArray(self): + return self._hMipmappedArray + @hMipmappedArray.setter + def hMipmappedArray(self, hMipmappedArray): + cdef cydriver.CUmipmappedArray cyhMipmappedArray + if hMipmappedArray is None: + cyhMipmappedArray = 0 + elif isinstance(hMipmappedArray, (CUmipmappedArray,)): + phMipmappedArray = int(hMipmappedArray) + cyhMipmappedArray = phMipmappedArray + else: + phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) + cyhMipmappedArray = phMipmappedArray + self._hMipmappedArray._pvt_ptr[0] = cyhMipmappedArray + +cdef class anon_struct9: + """ + Attributes + ---------- + devPtr : CUdeviceptr + + format : CUarray_format + + numChannels : unsigned int + + sizeInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._devPtr = CUdeviceptr(_ptr=&self._pvt_ptr[0].res.linear.devPtr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.linear + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['devPtr : ' + str(self.devPtr)] + except ValueError: + str_list += ['devPtr : '] + try: + str_list += ['format : ' + str(self.format)] + except ValueError: + str_list += ['format : '] + try: + str_list += ['numChannels : ' + str(self.numChannels)] + except ValueError: + str_list += ['numChannels : '] + try: + str_list += ['sizeInBytes : ' + str(self.sizeInBytes)] + except ValueError: + str_list += ['sizeInBytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def devPtr(self): + return self._devPtr + @devPtr.setter + def devPtr(self, devPtr): + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + cydevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr)): + pdevPtr = int(devPtr) + cydevPtr = pdevPtr + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + self._devPtr._pvt_ptr[0] = cydevPtr + + @property + def format(self): + if self._pvt_ptr[0].res.linear.format not in _dict_CUarray_format: + return None + return _dict_CUarray_format[self._pvt_ptr[0].res.linear.format] + @format.setter + def format(self, format not None : CUarray_format): + self._pvt_ptr[0].res.linear.format = format.value + @property + def numChannels(self): + return self._pvt_ptr[0].res.linear.numChannels + @numChannels.setter + def numChannels(self, unsigned int numChannels): + self._pvt_ptr[0].res.linear.numChannels = numChannels + @property + def sizeInBytes(self): + return self._pvt_ptr[0].res.linear.sizeInBytes + @sizeInBytes.setter + def sizeInBytes(self, size_t sizeInBytes): + self._pvt_ptr[0].res.linear.sizeInBytes = sizeInBytes + +cdef class anon_struct10: + """ + Attributes + ---------- + devPtr : CUdeviceptr + + format : CUarray_format + + numChannels : unsigned int + + width : size_t + + height : size_t + + pitchInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._devPtr = CUdeviceptr(_ptr=&self._pvt_ptr[0].res.pitch2D.devPtr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.pitch2D + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['devPtr : ' + str(self.devPtr)] + except ValueError: + str_list += ['devPtr : '] + try: + str_list += ['format : ' + str(self.format)] + except ValueError: + str_list += ['format : '] + try: + str_list += ['numChannels : ' + str(self.numChannels)] + except ValueError: + str_list += ['numChannels : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['pitchInBytes : ' + str(self.pitchInBytes)] + except ValueError: + str_list += ['pitchInBytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def devPtr(self): + return self._devPtr + @devPtr.setter + def devPtr(self, devPtr): + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + cydevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr)): + pdevPtr = int(devPtr) + cydevPtr = pdevPtr + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + self._devPtr._pvt_ptr[0] = cydevPtr + + @property + def format(self): + if self._pvt_ptr[0].res.pitch2D.format not in _dict_CUarray_format: + return None + return _dict_CUarray_format[self._pvt_ptr[0].res.pitch2D.format] + @format.setter + def format(self, format not None : CUarray_format): + self._pvt_ptr[0].res.pitch2D.format = format.value + @property + def numChannels(self): + return self._pvt_ptr[0].res.pitch2D.numChannels + @numChannels.setter + def numChannels(self, unsigned int numChannels): + self._pvt_ptr[0].res.pitch2D.numChannels = numChannels + @property + def width(self): + return self._pvt_ptr[0].res.pitch2D.width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].res.pitch2D.width = width + @property + def height(self): + return self._pvt_ptr[0].res.pitch2D.height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].res.pitch2D.height = height + @property + def pitchInBytes(self): + return self._pvt_ptr[0].res.pitch2D.pitchInBytes + @pitchInBytes.setter + def pitchInBytes(self, size_t pitchInBytes): + self._pvt_ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + +cdef class anon_struct11: + """ + Attributes + ---------- + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.reserved + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return self._pvt_ptr[0].res.reserved.reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].res.reserved.reserved = reserved + +cdef class anon_union4: + """ + Attributes + ---------- + array : anon_struct7 + + mipmap : anon_struct8 + + linear : anon_struct9 + + pitch2D : anon_struct10 + + reserved : anon_struct11 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._array = anon_struct7(_ptr=self._pvt_ptr) + self._mipmap = anon_struct8(_ptr=self._pvt_ptr) + self._linear = anon_struct9(_ptr=self._pvt_ptr) + self._pitch2D = anon_struct10(_ptr=self._pvt_ptr) + self._reserved = anon_struct11(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + try: + str_list += ['mipmap :\n' + '\n'.join([' ' + line for line in str(self.mipmap).splitlines()])] + except ValueError: + str_list += ['mipmap : '] + try: + str_list += ['linear :\n' + '\n'.join([' ' + line for line in str(self.linear).splitlines()])] + except ValueError: + str_list += ['linear : '] + try: + str_list += ['pitch2D :\n' + '\n'.join([' ' + line for line in str(self.pitch2D).splitlines()])] + except ValueError: + str_list += ['pitch2D : '] + try: + str_list += ['reserved :\n' + '\n'.join([' ' + line for line in str(self.reserved).splitlines()])] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct7): + string.memcpy(&self._pvt_ptr[0].res.array, array.getPtr(), sizeof(self._pvt_ptr[0].res.array)) + @property + def mipmap(self): + return self._mipmap + @mipmap.setter + def mipmap(self, mipmap not None : anon_struct8): + string.memcpy(&self._pvt_ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._pvt_ptr[0].res.mipmap)) + @property + def linear(self): + return self._linear + @linear.setter + def linear(self, linear not None : anon_struct9): + string.memcpy(&self._pvt_ptr[0].res.linear, linear.getPtr(), sizeof(self._pvt_ptr[0].res.linear)) + @property + def pitch2D(self): + return self._pitch2D + @pitch2D.setter + def pitch2D(self, pitch2D not None : anon_struct10): + string.memcpy(&self._pvt_ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D)) + @property + def reserved(self): + return self._reserved + @reserved.setter + def reserved(self, reserved not None : anon_struct11): + string.memcpy(&self._pvt_ptr[0].res.reserved, reserved.getPtr(), sizeof(self._pvt_ptr[0].res.reserved)) + +cdef class CUDA_RESOURCE_DESC_st: + """ + CUDA Resource descriptor + + Attributes + ---------- + resType : CUresourcetype + Resource type + res : anon_union4 + + flags : unsigned int + Flags (must be zero) + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_RESOURCE_DESC_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._res = anon_union4(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['resType : ' + str(self.resType)] + except ValueError: + str_list += ['resType : '] + try: + str_list += ['res :\n' + '\n'.join([' ' + line for line in str(self.res).splitlines()])] + except ValueError: + str_list += ['res : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def resType(self): + if self._pvt_ptr[0].resType not in _dict_CUresourcetype: + return None + return _dict_CUresourcetype[self._pvt_ptr[0].resType] + @resType.setter + def resType(self, resType not None : CUresourcetype): + self._pvt_ptr[0].resType = resType.value + @property + def res(self): + return self._res + @res.setter + def res(self, res not None : anon_union4): + string.memcpy(&self._pvt_ptr[0].res, res.getPtr(), sizeof(self._pvt_ptr[0].res)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class CUDA_TEXTURE_DESC_st: + """ + Texture descriptor + + Attributes + ---------- + addressMode : list[CUaddress_mode] + Address modes + filterMode : CUfilter_mode + Filter mode + flags : unsigned int + Flags + maxAnisotropy : unsigned int + Maximum anisotropy ratio + mipmapFilterMode : CUfilter_mode + Mipmap filter mode + mipmapLevelBias : float + Mipmap level bias + minMipmapLevelClamp : float + Mipmap minimum level clamp + maxMipmapLevelClamp : float + Mipmap maximum level clamp + borderColor : list[float] + Border Color + reserved : list[int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['addressMode : ' + str(self.addressMode)] + except ValueError: + str_list += ['addressMode : '] + try: + str_list += ['filterMode : ' + str(self.filterMode)] + except ValueError: + str_list += ['filterMode : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)] + except ValueError: + str_list += ['maxAnisotropy : '] + try: + str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)] + except ValueError: + str_list += ['mipmapFilterMode : '] + try: + str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)] + except ValueError: + str_list += ['mipmapLevelBias : '] + try: + str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)] + except ValueError: + str_list += ['minMipmapLevelClamp : '] + try: + str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)] + except ValueError: + str_list += ['maxMipmapLevelClamp : '] + try: + str_list += ['borderColor : ' + str(self.borderColor)] + except ValueError: + str_list += ['borderColor : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def addressMode(self): + return [_dict_CUaddress_mode[_x] if _x in _dict_CUaddress_mode else None for _x in list(self._pvt_ptr[0].addressMode)] + @addressMode.setter + def addressMode(self, addressMode): + self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + @property + def filterMode(self): + if self._pvt_ptr[0].filterMode not in _dict_CUfilter_mode: + return None + return _dict_CUfilter_mode[self._pvt_ptr[0].filterMode] + @filterMode.setter + def filterMode(self, filterMode not None : CUfilter_mode): + self._pvt_ptr[0].filterMode = filterMode.value + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def maxAnisotropy(self): + return self._pvt_ptr[0].maxAnisotropy + @maxAnisotropy.setter + def maxAnisotropy(self, unsigned int maxAnisotropy): + self._pvt_ptr[0].maxAnisotropy = maxAnisotropy + @property + def mipmapFilterMode(self): + if self._pvt_ptr[0].mipmapFilterMode not in _dict_CUfilter_mode: + return None + return _dict_CUfilter_mode[self._pvt_ptr[0].mipmapFilterMode] + @mipmapFilterMode.setter + def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode): + self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + @property + def mipmapLevelBias(self): + return self._pvt_ptr[0].mipmapLevelBias + @mipmapLevelBias.setter + def mipmapLevelBias(self, float mipmapLevelBias): + self._pvt_ptr[0].mipmapLevelBias = mipmapLevelBias + @property + def minMipmapLevelClamp(self): + return self._pvt_ptr[0].minMipmapLevelClamp + @minMipmapLevelClamp.setter + def minMipmapLevelClamp(self, float minMipmapLevelClamp): + self._pvt_ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + @property + def maxMipmapLevelClamp(self): + return self._pvt_ptr[0].maxMipmapLevelClamp + @maxMipmapLevelClamp.setter + def maxMipmapLevelClamp(self, float maxMipmapLevelClamp): + self._pvt_ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + @property + def borderColor(self): + return self._pvt_ptr[0].borderColor + @borderColor.setter + def borderColor(self, borderColor): + self._pvt_ptr[0].borderColor = borderColor + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUDA_RESOURCE_VIEW_DESC_st: + """ + Resource view descriptor + + Attributes + ---------- + format : CUresourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['format : ' + str(self.format)] + except ValueError: + str_list += ['format : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + try: + str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)] + except ValueError: + str_list += ['firstMipmapLevel : '] + try: + str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)] + except ValueError: + str_list += ['lastMipmapLevel : '] + try: + str_list += ['firstLayer : ' + str(self.firstLayer)] + except ValueError: + str_list += ['firstLayer : '] + try: + str_list += ['lastLayer : ' + str(self.lastLayer)] + except ValueError: + str_list += ['lastLayer : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def format(self): + if self._pvt_ptr[0].format not in _dict_CUresourceViewFormat: + return None + return _dict_CUresourceViewFormat[self._pvt_ptr[0].format] + @format.setter + def format(self, format not None : CUresourceViewFormat): + self._pvt_ptr[0].format = format.value + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, size_t depth): + self._pvt_ptr[0].depth = depth + @property + def firstMipmapLevel(self): + return self._pvt_ptr[0].firstMipmapLevel + @firstMipmapLevel.setter + def firstMipmapLevel(self, unsigned int firstMipmapLevel): + self._pvt_ptr[0].firstMipmapLevel = firstMipmapLevel + @property + def lastMipmapLevel(self): + return self._pvt_ptr[0].lastMipmapLevel + @lastMipmapLevel.setter + def lastMipmapLevel(self, unsigned int lastMipmapLevel): + self._pvt_ptr[0].lastMipmapLevel = lastMipmapLevel + @property + def firstLayer(self): + return self._pvt_ptr[0].firstLayer + @firstLayer.setter + def firstLayer(self, unsigned int firstLayer): + self._pvt_ptr[0].firstLayer = firstLayer + @property + def lastLayer(self): + return self._pvt_ptr[0].lastLayer + @lastLayer.setter + def lastLayer(self, unsigned int lastLayer): + self._pvt_ptr[0].lastLayer = lastLayer + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUtensorMap_st: + """ + Tensor map descriptor. Requires compiler support for aligning to 64 + bytes. + + Attributes + ---------- + opaque : list[cuuint64_t] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['opaque : ' + str(self.opaque)] + except ValueError: + str_list += ['opaque : '] + return '\n'.join(str_list) + else: + return '' + @property + def opaque(self): + return [cuuint64_t(init_value=_opaque) for _opaque in self._pvt_ptr[0].opaque] + @opaque.setter + def opaque(self, opaque): + self._pvt_ptr[0].opaque = opaque + + +cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + """ + GPU Direct v3 tokens + + Attributes + ---------- + p2pToken : unsigned long long + + vaSpaceToken : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['p2pToken : ' + str(self.p2pToken)] + except ValueError: + str_list += ['p2pToken : '] + try: + str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)] + except ValueError: + str_list += ['vaSpaceToken : '] + return '\n'.join(str_list) + else: + return '' + @property + def p2pToken(self): + return self._pvt_ptr[0].p2pToken + @p2pToken.setter + def p2pToken(self, unsigned long long p2pToken): + self._pvt_ptr[0].p2pToken = p2pToken + @property + def vaSpaceToken(self): + return self._pvt_ptr[0].vaSpaceToken + @vaSpaceToken.setter + def vaSpaceToken(self, unsigned int vaSpaceToken): + self._pvt_ptr[0].vaSpaceToken = vaSpaceToken + +cdef class CUDA_LAUNCH_PARAMS_st: + """ + Kernel launch parameters + + Attributes + ---------- + function : CUfunction + Kernel to launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : CUstream + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._function = CUfunction(_ptr=&self._pvt_ptr[0].function) + self._hStream = CUstream(_ptr=&self._pvt_ptr[0].hStream) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['function : ' + str(self.function)] + except ValueError: + str_list += ['function : '] + try: + str_list += ['gridDimX : ' + str(self.gridDimX)] + except ValueError: + str_list += ['gridDimX : '] + try: + str_list += ['gridDimY : ' + str(self.gridDimY)] + except ValueError: + str_list += ['gridDimY : '] + try: + str_list += ['gridDimZ : ' + str(self.gridDimZ)] + except ValueError: + str_list += ['gridDimZ : '] + try: + str_list += ['blockDimX : ' + str(self.blockDimX)] + except ValueError: + str_list += ['blockDimX : '] + try: + str_list += ['blockDimY : ' + str(self.blockDimY)] + except ValueError: + str_list += ['blockDimY : '] + try: + str_list += ['blockDimZ : ' + str(self.blockDimZ)] + except ValueError: + str_list += ['blockDimZ : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['hStream : ' + str(self.hStream)] + except ValueError: + str_list += ['hStream : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + return '\n'.join(str_list) + else: + return '' + @property + def function(self): + return self._function + @function.setter + def function(self, function): + cdef cydriver.CUfunction cyfunction + if function is None: + cyfunction = 0 + elif isinstance(function, (CUfunction,)): + pfunction = int(function) + cyfunction = pfunction + else: + pfunction = int(CUfunction(function)) + cyfunction = pfunction + self._function._pvt_ptr[0] = cyfunction + @property + def gridDimX(self): + return self._pvt_ptr[0].gridDimX + @gridDimX.setter + def gridDimX(self, unsigned int gridDimX): + self._pvt_ptr[0].gridDimX = gridDimX + @property + def gridDimY(self): + return self._pvt_ptr[0].gridDimY + @gridDimY.setter + def gridDimY(self, unsigned int gridDimY): + self._pvt_ptr[0].gridDimY = gridDimY + @property + def gridDimZ(self): + return self._pvt_ptr[0].gridDimZ + @gridDimZ.setter + def gridDimZ(self, unsigned int gridDimZ): + self._pvt_ptr[0].gridDimZ = gridDimZ + @property + def blockDimX(self): + return self._pvt_ptr[0].blockDimX + @blockDimX.setter + def blockDimX(self, unsigned int blockDimX): + self._pvt_ptr[0].blockDimX = blockDimX + @property + def blockDimY(self): + return self._pvt_ptr[0].blockDimY + @blockDimY.setter + def blockDimY(self, unsigned int blockDimY): + self._pvt_ptr[0].blockDimY = blockDimY + @property + def blockDimZ(self): + return self._pvt_ptr[0].blockDimZ + @blockDimZ.setter + def blockDimZ(self, unsigned int blockDimZ): + self._pvt_ptr[0].blockDimZ = blockDimZ + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def hStream(self): + return self._hStream + @hStream.setter + def hStream(self, hStream): + cdef cydriver.CUstream cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + self._hStream._pvt_ptr[0] = cyhStream + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + +cdef class anon_struct12: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle.win32 + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + hex(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['name : ' + hex(self.name)] + except ValueError: + str_list += ['name : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._pvt_ptr[0].handle.win32.handle + @handle.setter + def handle(self, handle): + _chandle = _HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + @property + def name(self): + return self._pvt_ptr[0].handle.win32.name + @name.setter + def name(self, name): + _cname = _HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + +cdef class anon_union5: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct12 + + nvSciBufObject : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._win32 = anon_struct12(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fd : ' + str(self.fd)] + except ValueError: + str_list += ['fd : '] + try: + str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] + except ValueError: + str_list += ['win32 : '] + try: + str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)] + except ValueError: + str_list += ['nvSciBufObject : '] + return '\n'.join(str_list) + else: + return '' + @property + def fd(self): + return self._pvt_ptr[0].handle.fd + @fd.setter + def fd(self, int fd): + self._pvt_ptr[0].handle.fd = fd + @property + def win32(self): + return self._win32 + @win32.setter + def win32(self, win32 not None : anon_struct12): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + @property + def nvSciBufObject(self): + return self._pvt_ptr[0].handle.nvSciBufObject + @nvSciBufObject.setter + def nvSciBufObject(self, nvSciBufObject): + _cnvSciBufObject = _HelperInputVoidPtr(nvSciBufObject) + self._pvt_ptr[0].handle.nvSciBufObject = _cnvSciBufObject.cptr + +cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + """ + External memory handle descriptor + + Attributes + ---------- + type : CUexternalMemoryHandleType + Type of the handle + handle : anon_union5 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = anon_union5(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUexternalMemoryHandleType: + return None + return _dict_CUexternalMemoryHandleType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUexternalMemoryHandleType): + self._pvt_ptr[0].type = type.value + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle not None : anon_union5): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned long long size): + self._pvt_ptr[0].size = size + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def offset(self): + return self._pvt_ptr[0].offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].offset = offset + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned long long size): + self._pvt_ptr[0].size = size + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + arrayDesc : CUDA_ARRAY3D_DESCRIPTOR + Format, dimension and type of base level of the mipmap chain + numLevels : unsigned int + Total number of levels in the mipmap chain + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=&self._pvt_ptr[0].arrayDesc) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['arrayDesc :\n' + '\n'.join([' ' + line for line in str(self.arrayDesc).splitlines()])] + except ValueError: + str_list += ['arrayDesc : '] + try: + str_list += ['numLevels : ' + str(self.numLevels)] + except ValueError: + str_list += ['numLevels : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def offset(self): + return self._pvt_ptr[0].offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].offset = offset + @property + def arrayDesc(self): + return self._arrayDesc + @arrayDesc.setter + def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR): + string.memcpy(&self._pvt_ptr[0].arrayDesc, arrayDesc.getPtr(), sizeof(self._pvt_ptr[0].arrayDesc)) + @property + def numLevels(self): + return self._pvt_ptr[0].numLevels + @numLevels.setter + def numLevels(self, unsigned int numLevels): + self._pvt_ptr[0].numLevels = numLevels + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_struct13: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle.win32 + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + hex(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['name : ' + hex(self.name)] + except ValueError: + str_list += ['name : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._pvt_ptr[0].handle.win32.handle + @handle.setter + def handle(self, handle): + _chandle = _HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + @property + def name(self): + return self._pvt_ptr[0].handle.win32.name + @name.setter + def name(self, name): + _cname = _HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + +cdef class anon_union6: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct13 + + nvSciSyncObj : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._win32 = anon_struct13(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fd : ' + str(self.fd)] + except ValueError: + str_list += ['fd : '] + try: + str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] + except ValueError: + str_list += ['win32 : '] + try: + str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)] + except ValueError: + str_list += ['nvSciSyncObj : '] + return '\n'.join(str_list) + else: + return '' + @property + def fd(self): + return self._pvt_ptr[0].handle.fd + @fd.setter + def fd(self, int fd): + self._pvt_ptr[0].handle.fd = fd + @property + def win32(self): + return self._win32 + @win32.setter + def win32(self, win32 not None : anon_struct13): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + @property + def nvSciSyncObj(self): + return self._pvt_ptr[0].handle.nvSciSyncObj + @nvSciSyncObj.setter + def nvSciSyncObj(self, nvSciSyncObj): + _cnvSciSyncObj = _HelperInputVoidPtr(nvSciSyncObj) + self._pvt_ptr[0].handle.nvSciSyncObj = _cnvSciSyncObj.cptr + +cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + """ + External semaphore handle descriptor + + Attributes + ---------- + type : CUexternalSemaphoreHandleType + Type of the handle + handle : anon_union6 + + flags : unsigned int + Flags reserved for the future. Must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = anon_union6(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUexternalSemaphoreHandleType: + return None + return _dict_CUexternalSemaphoreHandleType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUexternalSemaphoreHandleType): + self._pvt_ptr[0].type = type.value + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle not None : anon_union6): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_struct14: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.fence + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + return '\n'.join(str_list) + else: + return '' + @property + def value(self): + return self._pvt_ptr[0].params.fence.value + @value.setter + def value(self, unsigned long long value): + self._pvt_ptr[0].params.fence.value = value + +cdef class anon_union7: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.nvSciSync + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence : ' + hex(self.fence)] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._pvt_ptr[0].params.nvSciSync.fence + @fence.setter + def fence(self, fence): + _cfence = _HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + @property + def reserved(self): + return self._pvt_ptr[0].params.nvSciSync.reserved + @reserved.setter + def reserved(self, unsigned long long reserved): + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + +cdef class anon_struct15: + """ + Attributes + ---------- + key : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.keyedMutex + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['key : ' + str(self.key)] + except ValueError: + str_list += ['key : '] + return '\n'.join(str_list) + else: + return '' + @property + def key(self): + return self._pvt_ptr[0].params.keyedMutex.key + @key.setter + def key(self, unsigned long long key): + self._pvt_ptr[0].params.keyedMutex.key = key + +cdef class anon_struct16: + """ + Attributes + ---------- + fence : anon_struct14 + + nvSciSync : anon_union7 + + keyedMutex : anon_struct15 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._fence = anon_struct14(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct15(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] + except ValueError: + str_list += ['nvSciSync : '] + try: + str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] + except ValueError: + str_list += ['keyedMutex : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._fence + @fence.setter + def fence(self, fence not None : anon_struct14): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + @property + def nvSciSync(self): + return self._nvSciSync + @nvSciSync.setter + def nvSciSync(self, nvSciSync not None : anon_union7): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + @property + def keyedMutex(self): + return self._keyedMutex + @keyedMutex.setter + def keyedMutex(self, keyedMutex not None : anon_struct15): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + @property + def reserved(self): + return self._pvt_ptr[0].params.reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].params.reserved = reserved + +cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + """ + External semaphore signal parameters + + Attributes + ---------- + params : anon_struct16 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which + indicates that while signaling the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._params = anon_struct16(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] + except ValueError: + str_list += ['params : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def params(self): + return self._params + @params.setter + def params(self, params not None : anon_struct16): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_struct17: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.fence + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + return '\n'.join(str_list) + else: + return '' + @property + def value(self): + return self._pvt_ptr[0].params.fence.value + @value.setter + def value(self, unsigned long long value): + self._pvt_ptr[0].params.fence.value = value + +cdef class anon_union8: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.nvSciSync + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence : ' + hex(self.fence)] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._pvt_ptr[0].params.nvSciSync.fence + @fence.setter + def fence(self, fence): + _cfence = _HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + @property + def reserved(self): + return self._pvt_ptr[0].params.nvSciSync.reserved + @reserved.setter + def reserved(self, unsigned long long reserved): + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + +cdef class anon_struct18: + """ + Attributes + ---------- + key : unsigned long long + + timeoutMs : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.keyedMutex + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['key : ' + str(self.key)] + except ValueError: + str_list += ['key : '] + try: + str_list += ['timeoutMs : ' + str(self.timeoutMs)] + except ValueError: + str_list += ['timeoutMs : '] + return '\n'.join(str_list) + else: + return '' + @property + def key(self): + return self._pvt_ptr[0].params.keyedMutex.key + @key.setter + def key(self, unsigned long long key): + self._pvt_ptr[0].params.keyedMutex.key = key + @property + def timeoutMs(self): + return self._pvt_ptr[0].params.keyedMutex.timeoutMs + @timeoutMs.setter + def timeoutMs(self, unsigned int timeoutMs): + self._pvt_ptr[0].params.keyedMutex.timeoutMs = timeoutMs + +cdef class anon_struct19: + """ + Attributes + ---------- + fence : anon_struct17 + + nvSciSync : anon_union8 + + keyedMutex : anon_struct18 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._fence = anon_struct17(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union8(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct18(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] + except ValueError: + str_list += ['nvSciSync : '] + try: + str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] + except ValueError: + str_list += ['keyedMutex : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._fence + @fence.setter + def fence(self, fence not None : anon_struct17): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + @property + def nvSciSync(self): + return self._nvSciSync + @nvSciSync.setter + def nvSciSync(self, nvSciSync not None : anon_union8): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + @property + def keyedMutex(self): + return self._keyedMutex + @keyedMutex.setter + def keyedMutex(self, keyedMutex not None : anon_struct18): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + @property + def reserved(self): + return self._pvt_ptr[0].params.reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].params.reserved = reserved + +cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + """ + External semaphore wait parameters + + Attributes + ---------- + params : anon_struct19 + + flags : unsigned int + Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on + a CUexternalSemaphore of type + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is + CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates + that while waiting for the CUexternalSemaphore, no memory + synchronization operations should be performed for any external + memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. + For all other types of CUexternalSemaphore, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._params = anon_struct19(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] + except ValueError: + str_list += ['params : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def params(self): + return self._params + @params.setter + def params(self, params not None : anon_struct19): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + return [CUexternalSemaphore(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cydriver.CUexternalSemaphore)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] + return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + """ + Semaphore signal node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + return [CUexternalSemaphore(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cydriver.CUexternalSemaphore)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] + return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + return [CUexternalSemaphore(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cydriver.CUexternalSemaphore)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] + return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + """ + Semaphore wait node parameters + + Attributes + ---------- + extSemArray : CUexternalSemaphore + Array of external semaphore handles. + paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + return [CUexternalSemaphore(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cydriver.CUexternalSemaphore)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] + return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class anon_union9: + """ + Attributes + ---------- + mipmap : CUmipmappedArray + + array : CUarray + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._mipmap = CUmipmappedArray(_ptr=&self._pvt_ptr[0].resource.mipmap) + self._array = CUarray(_ptr=&self._pvt_ptr[0].resource.array) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].resource + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['mipmap : ' + str(self.mipmap)] + except ValueError: + str_list += ['mipmap : '] + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + return '\n'.join(str_list) + else: + return '' + @property + def mipmap(self): + return self._mipmap + @mipmap.setter + def mipmap(self, mipmap): + cdef cydriver.CUmipmappedArray cymipmap + if mipmap is None: + cymipmap = 0 + elif isinstance(mipmap, (CUmipmappedArray,)): + pmipmap = int(mipmap) + cymipmap = pmipmap + else: + pmipmap = int(CUmipmappedArray(mipmap)) + cymipmap = pmipmap + self._mipmap._pvt_ptr[0] = cymipmap + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cydriver.CUarray cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (CUarray,)): + parray = int(array) + cyarray = parray + else: + parray = int(CUarray(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + +cdef class anon_struct20: + """ + Attributes + ---------- + level : unsigned int + + layer : unsigned int + + offsetX : unsigned int + + offsetY : unsigned int + + offsetZ : unsigned int + + extentWidth : unsigned int + + extentHeight : unsigned int + + extentDepth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].subresource.sparseLevel + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['level : ' + str(self.level)] + except ValueError: + str_list += ['level : '] + try: + str_list += ['layer : ' + str(self.layer)] + except ValueError: + str_list += ['layer : '] + try: + str_list += ['offsetX : ' + str(self.offsetX)] + except ValueError: + str_list += ['offsetX : '] + try: + str_list += ['offsetY : ' + str(self.offsetY)] + except ValueError: + str_list += ['offsetY : '] + try: + str_list += ['offsetZ : ' + str(self.offsetZ)] + except ValueError: + str_list += ['offsetZ : '] + try: + str_list += ['extentWidth : ' + str(self.extentWidth)] + except ValueError: + str_list += ['extentWidth : '] + try: + str_list += ['extentHeight : ' + str(self.extentHeight)] + except ValueError: + str_list += ['extentHeight : '] + try: + str_list += ['extentDepth : ' + str(self.extentDepth)] + except ValueError: + str_list += ['extentDepth : '] + return '\n'.join(str_list) + else: + return '' + @property + def level(self): + return self._pvt_ptr[0].subresource.sparseLevel.level + @level.setter + def level(self, unsigned int level): + self._pvt_ptr[0].subresource.sparseLevel.level = level + @property + def layer(self): + return self._pvt_ptr[0].subresource.sparseLevel.layer + @layer.setter + def layer(self, unsigned int layer): + self._pvt_ptr[0].subresource.sparseLevel.layer = layer + @property + def offsetX(self): + return self._pvt_ptr[0].subresource.sparseLevel.offsetX + @offsetX.setter + def offsetX(self, unsigned int offsetX): + self._pvt_ptr[0].subresource.sparseLevel.offsetX = offsetX + @property + def offsetY(self): + return self._pvt_ptr[0].subresource.sparseLevel.offsetY + @offsetY.setter + def offsetY(self, unsigned int offsetY): + self._pvt_ptr[0].subresource.sparseLevel.offsetY = offsetY + @property + def offsetZ(self): + return self._pvt_ptr[0].subresource.sparseLevel.offsetZ + @offsetZ.setter + def offsetZ(self, unsigned int offsetZ): + self._pvt_ptr[0].subresource.sparseLevel.offsetZ = offsetZ + @property + def extentWidth(self): + return self._pvt_ptr[0].subresource.sparseLevel.extentWidth + @extentWidth.setter + def extentWidth(self, unsigned int extentWidth): + self._pvt_ptr[0].subresource.sparseLevel.extentWidth = extentWidth + @property + def extentHeight(self): + return self._pvt_ptr[0].subresource.sparseLevel.extentHeight + @extentHeight.setter + def extentHeight(self, unsigned int extentHeight): + self._pvt_ptr[0].subresource.sparseLevel.extentHeight = extentHeight + @property + def extentDepth(self): + return self._pvt_ptr[0].subresource.sparseLevel.extentDepth + @extentDepth.setter + def extentDepth(self, unsigned int extentDepth): + self._pvt_ptr[0].subresource.sparseLevel.extentDepth = extentDepth + +cdef class anon_struct21: + """ + Attributes + ---------- + layer : unsigned int + + offset : unsigned long long + + size : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].subresource.miptail + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['layer : ' + str(self.layer)] + except ValueError: + str_list += ['layer : '] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + return '\n'.join(str_list) + else: + return '' + @property + def layer(self): + return self._pvt_ptr[0].subresource.miptail.layer + @layer.setter + def layer(self, unsigned int layer): + self._pvt_ptr[0].subresource.miptail.layer = layer + @property + def offset(self): + return self._pvt_ptr[0].subresource.miptail.offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].subresource.miptail.offset = offset + @property + def size(self): + return self._pvt_ptr[0].subresource.miptail.size + @size.setter + def size(self, unsigned long long size): + self._pvt_ptr[0].subresource.miptail.size = size + +cdef class anon_union10: + """ + Attributes + ---------- + sparseLevel : anon_struct20 + + miptail : anon_struct21 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._sparseLevel = anon_struct20(_ptr=self._pvt_ptr) + self._miptail = anon_struct21(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].subresource + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['sparseLevel :\n' + '\n'.join([' ' + line for line in str(self.sparseLevel).splitlines()])] + except ValueError: + str_list += ['sparseLevel : '] + try: + str_list += ['miptail :\n' + '\n'.join([' ' + line for line in str(self.miptail).splitlines()])] + except ValueError: + str_list += ['miptail : '] + return '\n'.join(str_list) + else: + return '' + @property + def sparseLevel(self): + return self._sparseLevel + @sparseLevel.setter + def sparseLevel(self, sparseLevel not None : anon_struct20): + string.memcpy(&self._pvt_ptr[0].subresource.sparseLevel, sparseLevel.getPtr(), sizeof(self._pvt_ptr[0].subresource.sparseLevel)) + @property + def miptail(self): + return self._miptail + @miptail.setter + def miptail(self, miptail not None : anon_struct21): + string.memcpy(&self._pvt_ptr[0].subresource.miptail, miptail.getPtr(), sizeof(self._pvt_ptr[0].subresource.miptail)) + +cdef class anon_union11: + """ + Attributes + ---------- + memHandle : CUmemGenericAllocationHandle + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._memHandle = CUmemGenericAllocationHandle(_ptr=&self._pvt_ptr[0].memHandle.memHandle) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].memHandle + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['memHandle : ' + str(self.memHandle)] + except ValueError: + str_list += ['memHandle : '] + return '\n'.join(str_list) + else: + return '' + @property + def memHandle(self): + return self._memHandle + @memHandle.setter + def memHandle(self, memHandle): + cdef cydriver.CUmemGenericAllocationHandle cymemHandle + if memHandle is None: + cymemHandle = 0 + elif isinstance(memHandle, (CUmemGenericAllocationHandle)): + pmemHandle = int(memHandle) + cymemHandle = pmemHandle + else: + pmemHandle = int(CUmemGenericAllocationHandle(memHandle)) + cymemHandle = pmemHandle + self._memHandle._pvt_ptr[0] = cymemHandle + + +cdef class CUarrayMapInfo_st: + """ + Specifies the CUDA array or CUDA mipmapped array memory mapping + information + + Attributes + ---------- + resourceType : CUresourcetype + Resource type + resource : anon_union9 + + subresourceType : CUarraySparseSubresourceType + Sparse subresource type + subresource : anon_union10 + + memOperationType : CUmemOperationType + Memory operation type + memHandleType : CUmemHandleType + Memory handle type + memHandle : anon_union11 + + offset : unsigned long long + Offset within mip tail Offset within the memory + deviceBitMask : unsigned int + Device ordinal bit mask + flags : unsigned int + flags for future use, must be zero now. + reserved : list[unsigned int] + Reserved for future use, must be zero now. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUarrayMapInfo_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._resource = anon_union9(_ptr=self._pvt_ptr) + self._subresource = anon_union10(_ptr=self._pvt_ptr) + self._memHandle = anon_union11(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['resourceType : ' + str(self.resourceType)] + except ValueError: + str_list += ['resourceType : '] + try: + str_list += ['resource :\n' + '\n'.join([' ' + line for line in str(self.resource).splitlines()])] + except ValueError: + str_list += ['resource : '] + try: + str_list += ['subresourceType : ' + str(self.subresourceType)] + except ValueError: + str_list += ['subresourceType : '] + try: + str_list += ['subresource :\n' + '\n'.join([' ' + line for line in str(self.subresource).splitlines()])] + except ValueError: + str_list += ['subresource : '] + try: + str_list += ['memOperationType : ' + str(self.memOperationType)] + except ValueError: + str_list += ['memOperationType : '] + try: + str_list += ['memHandleType : ' + str(self.memHandleType)] + except ValueError: + str_list += ['memHandleType : '] + try: + str_list += ['memHandle :\n' + '\n'.join([' ' + line for line in str(self.memHandle).splitlines()])] + except ValueError: + str_list += ['memHandle : '] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['deviceBitMask : ' + str(self.deviceBitMask)] + except ValueError: + str_list += ['deviceBitMask : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def resourceType(self): + if self._pvt_ptr[0].resourceType not in _dict_CUresourcetype: + return None + return _dict_CUresourcetype[self._pvt_ptr[0].resourceType] + @resourceType.setter + def resourceType(self, resourceType not None : CUresourcetype): + self._pvt_ptr[0].resourceType = resourceType.value + @property + def resource(self): + return self._resource + @resource.setter + def resource(self, resource not None : anon_union9): + string.memcpy(&self._pvt_ptr[0].resource, resource.getPtr(), sizeof(self._pvt_ptr[0].resource)) + @property + def subresourceType(self): + if self._pvt_ptr[0].subresourceType not in _dict_CUarraySparseSubresourceType: + return None + return _dict_CUarraySparseSubresourceType[self._pvt_ptr[0].subresourceType] + @subresourceType.setter + def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType): + self._pvt_ptr[0].subresourceType = subresourceType.value + @property + def subresource(self): + return self._subresource + @subresource.setter + def subresource(self, subresource not None : anon_union10): + string.memcpy(&self._pvt_ptr[0].subresource, subresource.getPtr(), sizeof(self._pvt_ptr[0].subresource)) + @property + def memOperationType(self): + if self._pvt_ptr[0].memOperationType not in _dict_CUmemOperationType: + return None + return _dict_CUmemOperationType[self._pvt_ptr[0].memOperationType] + @memOperationType.setter + def memOperationType(self, memOperationType not None : CUmemOperationType): + self._pvt_ptr[0].memOperationType = memOperationType.value + @property + def memHandleType(self): + if self._pvt_ptr[0].memHandleType not in _dict_CUmemHandleType: + return None + return _dict_CUmemHandleType[self._pvt_ptr[0].memHandleType] + @memHandleType.setter + def memHandleType(self, memHandleType not None : CUmemHandleType): + self._pvt_ptr[0].memHandleType = memHandleType.value + @property + def memHandle(self): + return self._memHandle + @memHandle.setter + def memHandle(self, memHandle not None : anon_union11): + string.memcpy(&self._pvt_ptr[0].memHandle, memHandle.getPtr(), sizeof(self._pvt_ptr[0].memHandle)) + @property + def offset(self): + return self._pvt_ptr[0].offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].offset = offset + @property + def deviceBitMask(self): + return self._pvt_ptr[0].deviceBitMask + @deviceBitMask.setter + def deviceBitMask(self, unsigned int deviceBitMask): + self._pvt_ptr[0].deviceBitMask = deviceBitMask + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class CUmemLocation_st: + """ + Specifies a memory location. + + Attributes + ---------- + type : CUmemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['id : ' + str(self.id)] + except ValueError: + str_list += ['id : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUmemLocationType: + return None + return _dict_CUmemLocationType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUmemLocationType): + self._pvt_ptr[0].type = type.value + @property + def id(self): + return self._pvt_ptr[0].id + @id.setter + def id(self, int id): + self._pvt_ptr[0].id = id + +cdef class anon_struct22: + """ + Attributes + ---------- + compressionType : bytes + + gpuDirectRDMACapable : bytes + + usage : unsigned short + + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].allocFlags + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['compressionType : ' + str(self.compressionType)] + except ValueError: + str_list += ['compressionType : '] + try: + str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)] + except ValueError: + str_list += ['gpuDirectRDMACapable : '] + try: + str_list += ['usage : ' + str(self.usage)] + except ValueError: + str_list += ['usage : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def compressionType(self): + return self._pvt_ptr[0].allocFlags.compressionType + @compressionType.setter + def compressionType(self, unsigned char compressionType): + self._pvt_ptr[0].allocFlags.compressionType = compressionType + @property + def gpuDirectRDMACapable(self): + return self._pvt_ptr[0].allocFlags.gpuDirectRDMACapable + @gpuDirectRDMACapable.setter + def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable): + self._pvt_ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable + @property + def usage(self): + return self._pvt_ptr[0].allocFlags.usage + @usage.setter + def usage(self, unsigned short usage): + self._pvt_ptr[0].allocFlags.usage = usage + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].allocFlags.reserved, 4) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 4: + raise ValueError("reserved length must be 4, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].allocFlags.reserved[i] = b + +cdef class CUmemAllocationProp_st: + """ + Specifies the allocation properties for a allocation. + + Attributes + ---------- + type : CUmemAllocationType + Allocation type + requestedHandleTypes : CUmemAllocationHandleType + requested CUmemAllocationHandleType + location : CUmemLocation + Location of allocation + win32HandleMetaData : Any + Windows-specific POBJECT_ATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes + structure includes security attributes that define the scope of + which exported allocations may be transferred to other processes. + In all other cases, this field is required to be zero. + allocFlags : anon_struct22 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + self._allocFlags = anon_struct22(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)] + except ValueError: + str_list += ['requestedHandleTypes : '] + try: + str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] + except ValueError: + str_list += ['location : '] + try: + str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)] + except ValueError: + str_list += ['win32HandleMetaData : '] + try: + str_list += ['allocFlags :\n' + '\n'.join([' ' + line for line in str(self.allocFlags).splitlines()])] + except ValueError: + str_list += ['allocFlags : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUmemAllocationType: + return None + return _dict_CUmemAllocationType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUmemAllocationType): + self._pvt_ptr[0].type = type.value + @property + def requestedHandleTypes(self): + if self._pvt_ptr[0].requestedHandleTypes not in _dict_CUmemAllocationHandleType: + return None + return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].requestedHandleTypes] + @requestedHandleTypes.setter + def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType): + self._pvt_ptr[0].requestedHandleTypes = requestedHandleTypes.value + @property + def location(self): + return self._location + @location.setter + def location(self, location not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + @property + def win32HandleMetaData(self): + return self._pvt_ptr[0].win32HandleMetaData + @win32HandleMetaData.setter + def win32HandleMetaData(self, win32HandleMetaData): + _cwin32HandleMetaData = _HelperInputVoidPtr(win32HandleMetaData) + self._pvt_ptr[0].win32HandleMetaData = _cwin32HandleMetaData.cptr + @property + def allocFlags(self): + return self._allocFlags + @allocFlags.setter + def allocFlags(self, allocFlags not None : anon_struct22): + string.memcpy(&self._pvt_ptr[0].allocFlags, allocFlags.getPtr(), sizeof(self._pvt_ptr[0].allocFlags)) + +cdef class CUmulticastObjectProp_st: + """ + Specifies the properties for a multicast object. + + Attributes + ---------- + numDevices : unsigned int + The number of devices in the multicast team that will bind memory + to this object + size : size_t + The maximum amount of memory that can be bound to this multicast + object per device + handleTypes : unsigned long long + Bitmask of exportable handle types (see CUmemAllocationHandleType) + for this object + flags : unsigned long long + Flags for future use, must be zero now + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['numDevices : ' + str(self.numDevices)] + except ValueError: + str_list += ['numDevices : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['handleTypes : ' + str(self.handleTypes)] + except ValueError: + str_list += ['handleTypes : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def numDevices(self): + return self._pvt_ptr[0].numDevices + @numDevices.setter + def numDevices(self, unsigned int numDevices): + self._pvt_ptr[0].numDevices = numDevices + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, size_t size): + self._pvt_ptr[0].size = size + @property + def handleTypes(self): + return self._pvt_ptr[0].handleTypes + @handleTypes.setter + def handleTypes(self, unsigned long long handleTypes): + self._pvt_ptr[0].handleTypes = handleTypes + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned long long flags): + self._pvt_ptr[0].flags = flags + +cdef class CUmemAccessDesc_st: + """ + Memory access descriptor + + Attributes + ---------- + location : CUmemLocation + Location on which the request is to change it's accessibility + flags : CUmemAccess_flags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] + except ValueError: + str_list += ['location : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def location(self): + return self._location + @location.setter + def location(self, location not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + @property + def flags(self): + if self._pvt_ptr[0].flags not in _dict_CUmemAccess_flags: + return None + return _dict_CUmemAccess_flags[self._pvt_ptr[0].flags] + @flags.setter + def flags(self, flags not None : CUmemAccess_flags): + self._pvt_ptr[0].flags = flags.value + +cdef class CUgraphExecUpdateResultInfo_st: + """ + Result information returned by cuGraphExecUpdate + + Attributes + ---------- + result : CUgraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : CUgraphNode + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : CUgraphNode + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._errorNode = CUgraphNode(_ptr=&self._pvt_ptr[0].errorNode) + self._errorFromNode = CUgraphNode(_ptr=&self._pvt_ptr[0].errorFromNode) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['result : ' + str(self.result)] + except ValueError: + str_list += ['result : '] + try: + str_list += ['errorNode : ' + str(self.errorNode)] + except ValueError: + str_list += ['errorNode : '] + try: + str_list += ['errorFromNode : ' + str(self.errorFromNode)] + except ValueError: + str_list += ['errorFromNode : '] + return '\n'.join(str_list) + else: + return '' + @property + def result(self): + if self._pvt_ptr[0].result not in _dict_CUgraphExecUpdateResult: + return None + return _dict_CUgraphExecUpdateResult[self._pvt_ptr[0].result] + @result.setter + def result(self, result not None : CUgraphExecUpdateResult): + self._pvt_ptr[0].result = result.value + @property + def errorNode(self): + return self._errorNode + @errorNode.setter + def errorNode(self, errorNode): + cdef cydriver.CUgraphNode cyerrorNode + if errorNode is None: + cyerrorNode = 0 + elif isinstance(errorNode, (CUgraphNode,)): + perrorNode = int(errorNode) + cyerrorNode = perrorNode + else: + perrorNode = int(CUgraphNode(errorNode)) + cyerrorNode = perrorNode + self._errorNode._pvt_ptr[0] = cyerrorNode + @property + def errorFromNode(self): + return self._errorFromNode + @errorFromNode.setter + def errorFromNode(self, errorFromNode): + cdef cydriver.CUgraphNode cyerrorFromNode + if errorFromNode is None: + cyerrorFromNode = 0 + elif isinstance(errorFromNode, (CUgraphNode,)): + perrorFromNode = int(errorFromNode) + cyerrorFromNode = perrorFromNode + else: + perrorFromNode = int(CUgraphNode(errorFromNode)) + cyerrorFromNode = perrorFromNode + self._errorFromNode._pvt_ptr[0] = cyerrorFromNode + +cdef class CUmemPoolProps_st: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : CUmemAllocationType + Allocation type. Currently must be specified as + CU_MEM_ALLOCATION_TYPE_PINNED + handleTypes : CUmemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : CUmemLocation + Location where allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute + defines the scope of which exported allocations may be transferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['allocType : ' + str(self.allocType)] + except ValueError: + str_list += ['allocType : '] + try: + str_list += ['handleTypes : ' + str(self.handleTypes)] + except ValueError: + str_list += ['handleTypes : '] + try: + str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] + except ValueError: + str_list += ['location : '] + try: + str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)] + except ValueError: + str_list += ['win32SecurityAttributes : '] + try: + str_list += ['maxSize : ' + str(self.maxSize)] + except ValueError: + str_list += ['maxSize : '] + try: + str_list += ['usage : ' + str(self.usage)] + except ValueError: + str_list += ['usage : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def allocType(self): + if self._pvt_ptr[0].allocType not in _dict_CUmemAllocationType: + return None + return _dict_CUmemAllocationType[self._pvt_ptr[0].allocType] + @allocType.setter + def allocType(self, allocType not None : CUmemAllocationType): + self._pvt_ptr[0].allocType = allocType.value + @property + def handleTypes(self): + if self._pvt_ptr[0].handleTypes not in _dict_CUmemAllocationHandleType: + return None + return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].handleTypes] + @handleTypes.setter + def handleTypes(self, handleTypes not None : CUmemAllocationHandleType): + self._pvt_ptr[0].handleTypes = handleTypes.value + @property + def location(self): + return self._location + @location.setter + def location(self, location not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + @property + def win32SecurityAttributes(self): + return self._pvt_ptr[0].win32SecurityAttributes + @win32SecurityAttributes.setter + def win32SecurityAttributes(self, win32SecurityAttributes): + _cwin32SecurityAttributes = _HelperInputVoidPtr(win32SecurityAttributes) + self._pvt_ptr[0].win32SecurityAttributes = _cwin32SecurityAttributes.cptr + @property + def maxSize(self): + return self._pvt_ptr[0].maxSize + @maxSize.setter + def maxSize(self, size_t maxSize): + self._pvt_ptr[0].maxSize = maxSize + @property + def usage(self): + return self._pvt_ptr[0].usage + @usage.setter + def usage(self, unsigned short usage): + self._pvt_ptr[0].usage = usage + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 54) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 54: + raise ValueError("reserved length must be 54, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class CUmemPoolPtrExportData_st: + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class CUmemcpyAttributes_st: + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcLocHint = CUmemLocation(_ptr=&self._pvt_ptr[0].srcLocHint) + self._dstLocHint = CUmemLocation(_ptr=&self._pvt_ptr[0].dstLocHint) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + try: + str_list += ['srcLocHint :\n' + '\n'.join([' ' + line for line in str(self.srcLocHint).splitlines()])] + except ValueError: + str_list += ['srcLocHint : '] + try: + str_list += ['dstLocHint :\n' + '\n'.join([' ' + line for line in str(self.dstLocHint).splitlines()])] + except ValueError: + str_list += ['dstLocHint : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcAccessOrder(self): + if self._pvt_ptr[0].srcAccessOrder not in _dict_CUmemcpySrcAccessOrder: + return None + return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + @property + def srcLocHint(self): + return self._srcLocHint + @srcLocHint.setter + def srcLocHint(self, srcLocHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].srcLocHint, srcLocHint.getPtr(), sizeof(self._pvt_ptr[0].srcLocHint)) + @property + def dstLocHint(self): + return self._dstLocHint + @dstLocHint.setter + def dstLocHint(self, dstLocHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].dstLocHint, dstLocHint.getPtr(), sizeof(self._pvt_ptr[0].dstLocHint)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class CUoffset3D_st: + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, size_t x): + self._pvt_ptr[0].x = x + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, size_t y): + self._pvt_ptr[0].y = y + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, size_t z): + self._pvt_ptr[0].z = z + +cdef class CUextent3D_st: + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + width : size_t + + height : size_t + + depth : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, size_t depth): + self._pvt_ptr[0].depth = depth + +cdef class anon_struct23: + """ + Attributes + ---------- + ptr : CUdeviceptr + + rowLength : size_t + + layerHeight : size_t + + locHint : CUmemLocation + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._ptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].op.ptr.ptr) + self._locHint = CUmemLocation(_ptr=&self._pvt_ptr[0].op.ptr.locHint) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ptr : ' + str(self.ptr)] + except ValueError: + str_list += ['ptr : '] + try: + str_list += ['rowLength : ' + str(self.rowLength)] + except ValueError: + str_list += ['rowLength : '] + try: + str_list += ['layerHeight : ' + str(self.layerHeight)] + except ValueError: + str_list += ['layerHeight : '] + try: + str_list += ['locHint :\n' + '\n'.join([' ' + line for line in str(self.locHint).splitlines()])] + except ValueError: + str_list += ['locHint : '] + return '\n'.join(str_list) + else: + return '' + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr): + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + cyptr = 0 + elif isinstance(ptr, (CUdeviceptr)): + pptr = int(ptr) + cyptr = pptr + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + self._ptr._pvt_ptr[0] = cyptr + + @property + def rowLength(self): + return self._pvt_ptr[0].op.ptr.rowLength + @rowLength.setter + def rowLength(self, size_t rowLength): + self._pvt_ptr[0].op.ptr.rowLength = rowLength + @property + def layerHeight(self): + return self._pvt_ptr[0].op.ptr.layerHeight + @layerHeight.setter + def layerHeight(self, size_t layerHeight): + self._pvt_ptr[0].op.ptr.layerHeight = layerHeight + @property + def locHint(self): + return self._locHint + @locHint.setter + def locHint(self, locHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) + +cdef class anon_struct24: + """ + Attributes + ---------- + array : CUarray + + offset : CUoffset3D + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._array = CUarray(_ptr=&self._pvt_ptr[0].op.array.array) + self._offset = CUoffset3D(_ptr=&self._pvt_ptr[0].op.array.offset) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + try: + str_list += ['offset :\n' + '\n'.join([' ' + line for line in str(self.offset).splitlines()])] + except ValueError: + str_list += ['offset : '] + return '\n'.join(str_list) + else: + return '' + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cydriver.CUarray cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (CUarray,)): + parray = int(array) + cyarray = parray + else: + parray = int(CUarray(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + @property + def offset(self): + return self._offset + @offset.setter + def offset(self, offset not None : CUoffset3D): + string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) + +cdef class anon_union12: + """ + Attributes + ---------- + ptr : anon_struct23 + + array : anon_struct24 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._ptr = anon_struct23(_ptr=self._pvt_ptr) + self._array = anon_struct24(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ptr :\n' + '\n'.join([' ' + line for line in str(self.ptr).splitlines()])] + except ValueError: + str_list += ['ptr : '] + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + return '\n'.join(str_list) + else: + return '' + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr not None : anon_struct23): + string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct24): + string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) + +cdef class CUmemcpy3DOperand_st: + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + type : CUmemcpy3DOperandType + + op : anon_union12 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUmemcpy3DOperand_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._op = anon_union12(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['op :\n' + '\n'.join([' ' + line for line in str(self.op).splitlines()])] + except ValueError: + str_list += ['op : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUmemcpy3DOperandType: + return None + return _dict_CUmemcpy3DOperandType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUmemcpy3DOperandType): + self._pvt_ptr[0].type = type.value + @property + def op(self): + return self._op + @op.setter + def op(self, op not None : anon_union12): + string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) + +cdef class CUDA_MEMCPY3D_BATCH_OP_st: + """ + Attributes + ---------- + src : CUmemcpy3DOperand + Source memcpy operand. + dst : CUmemcpy3DOperand + Destination memcpy operand. + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._src = CUmemcpy3DOperand(_ptr=&self._pvt_ptr[0].src) + self._dst = CUmemcpy3DOperand(_ptr=&self._pvt_ptr[0].dst) + self._extent = CUextent3D(_ptr=&self._pvt_ptr[0].extent) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['src :\n' + '\n'.join([' ' + line for line in str(self.src).splitlines()])] + except ValueError: + str_list += ['src : '] + try: + str_list += ['dst :\n' + '\n'.join([' ' + line for line in str(self.dst).splitlines()])] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def src(self): + return self._src + @src.setter + def src(self, src not None : CUmemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].src, src.getPtr(), sizeof(self._pvt_ptr[0].src)) + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst not None : CUmemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].dst, dst.getPtr(), sizeof(self._pvt_ptr[0].dst)) + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : CUextent3D): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + @property + def srcAccessOrder(self): + if self._pvt_ptr[0].srcAccessOrder not in _dict_CUmemcpySrcAccessOrder: + return None + return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._poolProps = CUmemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + def __dealloc__(self): + pass + if self._accessDescs is not NULL: + free(self._accessDescs) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] + except ValueError: + str_list += ['poolProps : '] + try: + str_list += ['accessDescs : ' + str(self.accessDescs)] + except ValueError: + str_list += ['accessDescs : '] + try: + str_list += ['accessDescCount : ' + str(self.accessDescCount)] + except ValueError: + str_list += ['accessDescCount : '] + try: + str_list += ['bytesize : ' + str(self.bytesize)] + except ValueError: + str_list += ['bytesize : '] + try: + str_list += ['dptr : ' + str(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def poolProps(self): + return self._poolProps + @poolProps.setter + def poolProps(self, poolProps not None : CUmemPoolProps): + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + @property + def accessDescs(self): + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] + return [CUmemAccessDesc(_ptr=arr) for arr in arrs] + @accessDescs.setter + def accessDescs(self, val): + if len(val) == 0: + free(self._accessDescs) + self._accessDescs_length = 0 + self._pvt_ptr[0].accessDescs = NULL + else: + if self._accessDescs_length != len(val): + free(self._accessDescs) + self._accessDescs = calloc(len(val), sizeof(cydriver.CUmemAccessDesc)) + if self._accessDescs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) + self._accessDescs_length = len(val) + self._pvt_ptr[0].accessDescs = self._accessDescs + for idx in range(len(val)): + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + + @property + def accessDescCount(self): + return self._pvt_ptr[0].accessDescCount + @accessDescCount.setter + def accessDescCount(self, size_t accessDescCount): + self._pvt_ptr[0].accessDescCount = accessDescCount + @property + def bytesize(self): + return self._pvt_ptr[0].bytesize + @bytesize.setter + def bytesize(self, size_t bytesize): + self._pvt_ptr[0].bytesize = bytesize + @property + def dptr(self): + return self._dptr + @dptr.setter + def dptr(self, dptr): + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + cydptr = 0 + elif isinstance(dptr, (CUdeviceptr)): + pdptr = int(dptr) + cydptr = pdptr + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + self._dptr._pvt_ptr[0] = cydptr + + +cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : CUmemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is + not supported. + accessDescs : CUmemAccessDesc + in: array of memory access descriptors. Used to describe peer GPU + access + accessDescCount : size_t + in: number of memory access descriptors. Must not exceed the number + of GPUs. + bytesize : size_t + in: size in bytes of the requested allocation + dptr : CUdeviceptr + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._poolProps = CUmemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + def __dealloc__(self): + pass + if self._accessDescs is not NULL: + free(self._accessDescs) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] + except ValueError: + str_list += ['poolProps : '] + try: + str_list += ['accessDescs : ' + str(self.accessDescs)] + except ValueError: + str_list += ['accessDescs : '] + try: + str_list += ['accessDescCount : ' + str(self.accessDescCount)] + except ValueError: + str_list += ['accessDescCount : '] + try: + str_list += ['bytesize : ' + str(self.bytesize)] + except ValueError: + str_list += ['bytesize : '] + try: + str_list += ['dptr : ' + str(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def poolProps(self): + return self._poolProps + @poolProps.setter + def poolProps(self, poolProps not None : CUmemPoolProps): + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + @property + def accessDescs(self): + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] + return [CUmemAccessDesc(_ptr=arr) for arr in arrs] + @accessDescs.setter + def accessDescs(self, val): + if len(val) == 0: + free(self._accessDescs) + self._accessDescs_length = 0 + self._pvt_ptr[0].accessDescs = NULL + else: + if self._accessDescs_length != len(val): + free(self._accessDescs) + self._accessDescs = calloc(len(val), sizeof(cydriver.CUmemAccessDesc)) + if self._accessDescs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) + self._accessDescs_length = len(val) + self._pvt_ptr[0].accessDescs = self._accessDescs + for idx in range(len(val)): + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + + @property + def accessDescCount(self): + return self._pvt_ptr[0].accessDescCount + @accessDescCount.setter + def accessDescCount(self, size_t accessDescCount): + self._pvt_ptr[0].accessDescCount = accessDescCount + @property + def bytesize(self): + return self._pvt_ptr[0].bytesize + @bytesize.setter + def bytesize(self, size_t bytesize): + self._pvt_ptr[0].bytesize = bytesize + @property + def dptr(self): + return self._dptr + @dptr.setter + def dptr(self, dptr): + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + cydptr = 0 + elif isinstance(dptr, (CUdeviceptr)): + pdptr = int(dptr) + cydptr = pdptr + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + self._dptr._pvt_ptr[0] = cydptr + + +cdef class CUDA_MEM_FREE_NODE_PARAMS_st: + """ + Memory free node parameters + + Attributes + ---------- + dptr : CUdeviceptr + in: the pointer to free + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dptr : ' + str(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def dptr(self): + return self._dptr + @dptr.setter + def dptr(self, dptr): + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + cydptr = 0 + elif isinstance(dptr, (CUdeviceptr)): + pdptr = int(dptr) + cydptr = pdptr + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + self._dptr._pvt_ptr[0] = cydptr + + +cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: + """ + Child graph node parameters + + Attributes + ---------- + graph : CUgraph + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + ownership : CUgraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._graph = CUgraph(_ptr=&self._pvt_ptr[0].graph) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['graph : ' + str(self.graph)] + except ValueError: + str_list += ['graph : '] + try: + str_list += ['ownership : ' + str(self.ownership)] + except ValueError: + str_list += ['ownership : '] + return '\n'.join(str_list) + else: + return '' + @property + def graph(self): + return self._graph + @graph.setter + def graph(self, graph): + cdef cydriver.CUgraph cygraph + if graph is None: + cygraph = 0 + elif isinstance(graph, (CUgraph,)): + pgraph = int(graph) + cygraph = pgraph + else: + pgraph = int(CUgraph(graph)) + cygraph = pgraph + self._graph._pvt_ptr[0] = cygraph + @property + def ownership(self): + if self._pvt_ptr[0].ownership not in _dict_CUgraphChildGraphNodeOwnership: + return None + return _dict_CUgraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] + @ownership.setter + def ownership(self, ownership not None : CUgraphChildGraphNodeOwnership): + self._pvt_ptr[0].ownership = ownership.value + +cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: + """ + Event record node parameters + + Attributes + ---------- + event : CUevent + The event to record when the node executes + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._event = CUevent(_ptr=&self._pvt_ptr[0].event) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cydriver.CUevent cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(CUevent(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + +cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: + """ + Event wait node parameters + + Attributes + ---------- + event : CUevent + The event to wait on from the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._event = CUevent(_ptr=&self._pvt_ptr[0].event) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cydriver.CUevent cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(CUevent(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + +cdef class CUgraphNodeParams_st: + """ + Graph node parameters. See cuGraphAddNode. + + Attributes + ---------- + type : CUgraphNodeType + Type of the node + reserved0 : list[int] + Reserved. Must be zero. + reserved1 : list[long long] + Padding. Unused bytes must be zero. + kernel : CUDA_KERNEL_NODE_PARAMS_v3 + Kernel node parameters. + memcpy : CUDA_MEMCPY_NODE_PARAMS + Memcpy node parameters. + memset : CUDA_MEMSET_NODE_PARAMS_v2 + Memset node parameters. + host : CUDA_HOST_NODE_PARAMS_v2 + Host node parameters. + graph : CUDA_CHILD_GRAPH_NODE_PARAMS + Child graph node parameters. + eventWait : CUDA_EVENT_WAIT_NODE_PARAMS + Event wait node parameters. + eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS + Event record node parameters. + extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 + External semaphore signal node parameters. + extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 + External semaphore wait node parameters. + alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 + Memory allocation node parameters. + free : CUDA_MEM_FREE_NODE_PARAMS + Memory free node parameters. + memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 + MemOp node parameters. + conditional : CUDA_CONDITIONAL_NODE_PARAMS + Conditional node parameters. + reserved2 : long long + Reserved bytes. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUgraphNodeParams_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._kernel = CUDA_KERNEL_NODE_PARAMS_v3(_ptr=&self._pvt_ptr[0].kernel) + self._memcpy = CUDA_MEMCPY_NODE_PARAMS(_ptr=&self._pvt_ptr[0].memcpy) + self._memset = CUDA_MEMSET_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].memset) + self._host = CUDA_HOST_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].host) + self._graph = CUDA_CHILD_GRAPH_NODE_PARAMS(_ptr=&self._pvt_ptr[0].graph) + self._eventWait = CUDA_EVENT_WAIT_NODE_PARAMS(_ptr=&self._pvt_ptr[0].eventWait) + self._eventRecord = CUDA_EVENT_RECORD_NODE_PARAMS(_ptr=&self._pvt_ptr[0].eventRecord) + self._extSemSignal = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].extSemSignal) + self._extSemWait = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].extSemWait) + self._alloc = CUDA_MEM_ALLOC_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].alloc) + self._free = CUDA_MEM_FREE_NODE_PARAMS(_ptr=&self._pvt_ptr[0].free) + self._memOp = CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].memOp) + self._conditional = CUDA_CONDITIONAL_NODE_PARAMS(_ptr=&self._pvt_ptr[0].conditional) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['reserved0 : ' + str(self.reserved0)] + except ValueError: + str_list += ['reserved0 : '] + try: + str_list += ['reserved1 : ' + str(self.reserved1)] + except ValueError: + str_list += ['reserved1 : '] + try: + str_list += ['kernel :\n' + '\n'.join([' ' + line for line in str(self.kernel).splitlines()])] + except ValueError: + str_list += ['kernel : '] + try: + str_list += ['memcpy :\n' + '\n'.join([' ' + line for line in str(self.memcpy).splitlines()])] + except ValueError: + str_list += ['memcpy : '] + try: + str_list += ['memset :\n' + '\n'.join([' ' + line for line in str(self.memset).splitlines()])] + except ValueError: + str_list += ['memset : '] + try: + str_list += ['host :\n' + '\n'.join([' ' + line for line in str(self.host).splitlines()])] + except ValueError: + str_list += ['host : '] + try: + str_list += ['graph :\n' + '\n'.join([' ' + line for line in str(self.graph).splitlines()])] + except ValueError: + str_list += ['graph : '] + try: + str_list += ['eventWait :\n' + '\n'.join([' ' + line for line in str(self.eventWait).splitlines()])] + except ValueError: + str_list += ['eventWait : '] + try: + str_list += ['eventRecord :\n' + '\n'.join([' ' + line for line in str(self.eventRecord).splitlines()])] + except ValueError: + str_list += ['eventRecord : '] + try: + str_list += ['extSemSignal :\n' + '\n'.join([' ' + line for line in str(self.extSemSignal).splitlines()])] + except ValueError: + str_list += ['extSemSignal : '] + try: + str_list += ['extSemWait :\n' + '\n'.join([' ' + line for line in str(self.extSemWait).splitlines()])] + except ValueError: + str_list += ['extSemWait : '] + try: + str_list += ['alloc :\n' + '\n'.join([' ' + line for line in str(self.alloc).splitlines()])] + except ValueError: + str_list += ['alloc : '] + try: + str_list += ['free :\n' + '\n'.join([' ' + line for line in str(self.free).splitlines()])] + except ValueError: + str_list += ['free : '] + try: + str_list += ['memOp :\n' + '\n'.join([' ' + line for line in str(self.memOp).splitlines()])] + except ValueError: + str_list += ['memOp : '] + try: + str_list += ['conditional :\n' + '\n'.join([' ' + line for line in str(self.conditional).splitlines()])] + except ValueError: + str_list += ['conditional : '] + try: + str_list += ['reserved2 : ' + str(self.reserved2)] + except ValueError: + str_list += ['reserved2 : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUgraphNodeType: + return None + return _dict_CUgraphNodeType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUgraphNodeType): + self._pvt_ptr[0].type = type.value + @property + def reserved0(self): + return self._pvt_ptr[0].reserved0 + @reserved0.setter + def reserved0(self, reserved0): + self._pvt_ptr[0].reserved0 = reserved0 + @property + def reserved1(self): + return self._pvt_ptr[0].reserved1 + @reserved1.setter + def reserved1(self, reserved1): + self._pvt_ptr[0].reserved1 = reserved1 + @property + def kernel(self): + return self._kernel + @kernel.setter + def kernel(self, kernel not None : CUDA_KERNEL_NODE_PARAMS_v3): + string.memcpy(&self._pvt_ptr[0].kernel, kernel.getPtr(), sizeof(self._pvt_ptr[0].kernel)) + @property + def memcpy(self): + return self._memcpy + @memcpy.setter + def memcpy(self, memcpy not None : CUDA_MEMCPY_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].memcpy, memcpy.getPtr(), sizeof(self._pvt_ptr[0].memcpy)) + @property + def memset(self): + return self._memset + @memset.setter + def memset(self, memset not None : CUDA_MEMSET_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].memset, memset.getPtr(), sizeof(self._pvt_ptr[0].memset)) + @property + def host(self): + return self._host + @host.setter + def host(self, host not None : CUDA_HOST_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].host, host.getPtr(), sizeof(self._pvt_ptr[0].host)) + @property + def graph(self): + return self._graph + @graph.setter + def graph(self, graph not None : CUDA_CHILD_GRAPH_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].graph, graph.getPtr(), sizeof(self._pvt_ptr[0].graph)) + @property + def eventWait(self): + return self._eventWait + @eventWait.setter + def eventWait(self, eventWait not None : CUDA_EVENT_WAIT_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].eventWait, eventWait.getPtr(), sizeof(self._pvt_ptr[0].eventWait)) + @property + def eventRecord(self): + return self._eventRecord + @eventRecord.setter + def eventRecord(self, eventRecord not None : CUDA_EVENT_RECORD_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._pvt_ptr[0].eventRecord)) + @property + def extSemSignal(self): + return self._extSemSignal + @extSemSignal.setter + def extSemSignal(self, extSemSignal not None : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._pvt_ptr[0].extSemSignal)) + @property + def extSemWait(self): + return self._extSemWait + @extSemWait.setter + def extSemWait(self, extSemWait not None : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._pvt_ptr[0].extSemWait)) + @property + def alloc(self): + return self._alloc + @alloc.setter + def alloc(self, alloc not None : CUDA_MEM_ALLOC_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].alloc, alloc.getPtr(), sizeof(self._pvt_ptr[0].alloc)) + @property + def free(self): + return self._free + @free.setter + def free(self, free not None : CUDA_MEM_FREE_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].free, free.getPtr(), sizeof(self._pvt_ptr[0].free)) + @property + def memOp(self): + return self._memOp + @memOp.setter + def memOp(self, memOp not None : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2): + string.memcpy(&self._pvt_ptr[0].memOp, memOp.getPtr(), sizeof(self._pvt_ptr[0].memOp)) + @property + def conditional(self): + return self._conditional + @conditional.setter + def conditional(self, conditional not None : CUDA_CONDITIONAL_NODE_PARAMS): + string.memcpy(&self._pvt_ptr[0].conditional, conditional.getPtr(), sizeof(self._pvt_ptr[0].conditional)) + @property + def reserved2(self): + return self._pvt_ptr[0].reserved2 + @reserved2.setter + def reserved2(self, long long reserved2): + self._pvt_ptr[0].reserved2 = reserved2 + +cdef class CUcheckpointLockArgs_st: + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + reserved0 : unsigned int + Reserved for future use, must be zero + reserved1 : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['timeoutMs : ' + str(self.timeoutMs)] + except ValueError: + str_list += ['timeoutMs : '] + try: + str_list += ['reserved0 : ' + str(self.reserved0)] + except ValueError: + str_list += ['reserved0 : '] + try: + str_list += ['reserved1 : ' + str(self.reserved1)] + except ValueError: + str_list += ['reserved1 : '] + return '\n'.join(str_list) + else: + return '' + @property + def timeoutMs(self): + return self._pvt_ptr[0].timeoutMs + @timeoutMs.setter + def timeoutMs(self, unsigned int timeoutMs): + self._pvt_ptr[0].timeoutMs = timeoutMs + @property + def reserved0(self): + return self._pvt_ptr[0].reserved0 + @reserved0.setter + def reserved0(self, unsigned int reserved0): + self._pvt_ptr[0].reserved0 = reserved0 + @property + def reserved1(self): + return [cuuint64_t(init_value=_reserved1) for _reserved1 in self._pvt_ptr[0].reserved1] + @reserved1.setter + def reserved1(self, reserved1): + self._pvt_ptr[0].reserved1 = reserved1 + + +cdef class CUcheckpointCheckpointArgs_st: + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + +cdef class CUcheckpointRestoreArgs_st: + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + +cdef class CUcheckpointUnlockArgs_st: + """ + CUDA checkpoint optional unlock arguments + + Attributes + ---------- + reserved : list[cuuint64_t] + Reserved for future use, must be zeroed + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + +cdef class CUmemDecompressParams_st: + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + padding : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcNumBytes : ' + str(self.srcNumBytes)] + except ValueError: + str_list += ['srcNumBytes : '] + try: + str_list += ['dstNumBytes : ' + str(self.dstNumBytes)] + except ValueError: + str_list += ['dstNumBytes : '] + try: + str_list += ['dstActBytes : ' + str(self.dstActBytes)] + except ValueError: + str_list += ['dstActBytes : '] + try: + str_list += ['src : ' + hex(self.src)] + except ValueError: + str_list += ['src : '] + try: + str_list += ['dst : ' + hex(self.dst)] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['algo : ' + str(self.algo)] + except ValueError: + str_list += ['algo : '] + try: + str_list += ['padding : ' + str(self.padding)] + except ValueError: + str_list += ['padding : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcNumBytes(self): + return self._pvt_ptr[0].srcNumBytes + @srcNumBytes.setter + def srcNumBytes(self, size_t srcNumBytes): + self._pvt_ptr[0].srcNumBytes = srcNumBytes + @property + def dstNumBytes(self): + return self._pvt_ptr[0].dstNumBytes + @dstNumBytes.setter + def dstNumBytes(self, size_t dstNumBytes): + self._pvt_ptr[0].dstNumBytes = dstNumBytes + @property + def dstActBytes(self): + return cuuint32_t(_ptr=self._pvt_ptr[0].dstActBytes) + @property + def src(self): + return self._pvt_ptr[0].src + @src.setter + def src(self, src): + _csrc = _HelperInputVoidPtr(src) + self._pvt_ptr[0].src = _csrc.cptr + @property + def dst(self): + return self._pvt_ptr[0].dst + @dst.setter + def dst(self, dst): + _cdst = _HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + @property + def algo(self): + if self._pvt_ptr[0].algo not in _dict_CUmemDecompressAlgorithm: + return None + return _dict_CUmemDecompressAlgorithm[self._pvt_ptr[0].algo] + @algo.setter + def algo(self, algo not None : CUmemDecompressAlgorithm): + self._pvt_ptr[0].algo = algo.value + @property + def padding(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].padding, 20) + @padding.setter + def padding(self, padding): + if len(padding) != 20: + raise ValueError("padding length must be 20, is " + str(len(padding))) + for i, b in enumerate(padding): + self._pvt_ptr[0].padding[i] = b + +cdef class CUdevSmResource_st: + """ + Attributes + ---------- + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + This is an output parameter only, do not write to this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['smCount : ' + str(self.smCount)] + except ValueError: + str_list += ['smCount : '] + return '\n'.join(str_list) + else: + return '' + @property + def smCount(self): + return self._pvt_ptr[0].smCount + @smCount.setter + def smCount(self, unsigned int smCount): + self._pvt_ptr[0].smCount = smCount + +cdef class CUdevResource_st: + """ + Attributes + ---------- + type : CUdevResourceType + Type of resource, dictates which union field was last set + _internal_padding : bytes + + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM `typename`. + _oversize : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUdevResource_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._sm = CUdevSmResource(_ptr=&self._pvt_ptr[0].sm) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['_internal_padding : ' + str(self._internal_padding)] + except ValueError: + str_list += ['_internal_padding : '] + try: + str_list += ['sm :\n' + '\n'.join([' ' + line for line in str(self.sm).splitlines()])] + except ValueError: + str_list += ['sm : '] + try: + str_list += ['_oversize : ' + str(self._oversize)] + except ValueError: + str_list += ['_oversize : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_CUdevResourceType: + return None + return _dict_CUdevResourceType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : CUdevResourceType): + self._pvt_ptr[0].type = type.value + @property + def _internal_padding(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0]._internal_padding, 92) + @_internal_padding.setter + def _internal_padding(self, _internal_padding): + if len(_internal_padding) != 92: + raise ValueError("_internal_padding length must be 92, is " + str(len(_internal_padding))) + for i, b in enumerate(_internal_padding): + self._pvt_ptr[0]._internal_padding[i] = b + @property + def sm(self): + return self._sm + @sm.setter + def sm(self, sm not None : CUdevSmResource): + string.memcpy(&self._pvt_ptr[0].sm, sm.getPtr(), sizeof(self._pvt_ptr[0].sm)) + @property + def _oversize(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0]._oversize, 48) + @_oversize.setter + def _oversize(self, _oversize): + if len(_oversize) != 48: + raise ValueError("_oversize length must be 48, is " + str(len(_oversize))) + for i, b in enumerate(_oversize): + self._pvt_ptr[0]._oversize[i] = b + +cdef class anon_union15: + """ + Attributes + ---------- + pArray : list[CUarray] + + pPitch : list[Any] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].frame + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['pArray : ' + str(self.pArray)] + except ValueError: + str_list += ['pArray : '] + try: + str_list += ['pPitch : ' + hex(self.pPitch)] + except ValueError: + str_list += ['pPitch : '] + return '\n'.join(str_list) + else: + return '' + @property + def pArray(self): + return [CUarray(init_value=_pArray) for _pArray in self._pvt_ptr[0].frame.pArray] + @pArray.setter + def pArray(self, pArray : list[CUarray]): + if len(pArray) != 3: + raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray)) + pArray = [int(_pArray) for _pArray in pArray] + for _idx, _pArray in enumerate(pArray): + self._pvt_ptr[0].frame.pArray[_idx] = _pArray + + @property + def pPitch(self): + return [_pPitch for _pPitch in self._pvt_ptr[0].frame.pPitch] + @pPitch.setter + def pPitch(self, pPitch : list[int]): + if len(pPitch) != 3: + raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch)) + pPitch = [_pPitch for _pPitch in pPitch] + for _idx, _pPitch in enumerate(pPitch): + self._pvt_ptr[0].frame.pPitch[_idx] = _pPitch + +cdef class CUeglFrame_st: + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + frame : anon_union15 + + width : unsigned int + Width of first plane + height : unsigned int + Height of first plane + depth : unsigned int + Depth of first plane + pitch : unsigned int + Pitch of first plane + planeCount : unsigned int + Number of planes + numChannels : unsigned int + Number of channels for the plane + frameType : CUeglFrameType + Array or Pitch + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + cuFormat : CUarray_format + CUDA Array Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUeglFrame_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._frame = anon_union15(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['frame :\n' + '\n'.join([' ' + line for line in str(self.frame).splitlines()])] + except ValueError: + str_list += ['frame : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['planeCount : ' + str(self.planeCount)] + except ValueError: + str_list += ['planeCount : '] + try: + str_list += ['numChannels : ' + str(self.numChannels)] + except ValueError: + str_list += ['numChannels : '] + try: + str_list += ['frameType : ' + str(self.frameType)] + except ValueError: + str_list += ['frameType : '] + try: + str_list += ['eglColorFormat : ' + str(self.eglColorFormat)] + except ValueError: + str_list += ['eglColorFormat : '] + try: + str_list += ['cuFormat : ' + str(self.cuFormat)] + except ValueError: + str_list += ['cuFormat : '] + return '\n'.join(str_list) + else: + return '' + @property + def frame(self): + return self._frame + @frame.setter + def frame(self, frame not None : anon_union15): + string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, unsigned int width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, unsigned int height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, unsigned int depth): + self._pvt_ptr[0].depth = depth + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, unsigned int pitch): + self._pvt_ptr[0].pitch = pitch + @property + def planeCount(self): + return self._pvt_ptr[0].planeCount + @planeCount.setter + def planeCount(self, unsigned int planeCount): + self._pvt_ptr[0].planeCount = planeCount + @property + def numChannels(self): + return self._pvt_ptr[0].numChannels + @numChannels.setter + def numChannels(self, unsigned int numChannels): + self._pvt_ptr[0].numChannels = numChannels + @property + def frameType(self): + if self._pvt_ptr[0].frameType not in _dict_CUeglFrameType: + return None + return _dict_CUeglFrameType[self._pvt_ptr[0].frameType] + @frameType.setter + def frameType(self, frameType not None : CUeglFrameType): + self._pvt_ptr[0].frameType = frameType.value + @property + def eglColorFormat(self): + if self._pvt_ptr[0].eglColorFormat not in _dict_CUeglColorFormat: + return None + return _dict_CUeglColorFormat[self._pvt_ptr[0].eglColorFormat] + @eglColorFormat.setter + def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat): + self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + @property + def cuFormat(self): + if self._pvt_ptr[0].cuFormat not in _dict_CUarray_format: + return None + return _dict_CUarray_format[self._pvt_ptr[0].cuFormat] + @cuFormat.setter + def cuFormat(self, cuFormat not None : CUarray_format): + self._pvt_ptr[0].cuFormat = cuFormat.value + +cdef class cuuint32_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cuuint64_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUdeviceptr_v2: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUdevice_v1: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUtexObject_v1: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUsurfObject_v1: + """ + + An opaque value that represents a CUDA surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUmemGenericAllocationHandle_v1: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class CUlogIterator: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +@cython.embedsignature(True) +def cuGetErrorString(error not None : CUresult): + """ Gets the string description of an error code. + + Sets `*pStr` to the address of a NULL-terminated string description of + the error code `error`. If the error code is not recognized, + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned and `*pStr` will + be set to the NULL address. + + Parameters + ---------- + error : :py:obj:`~.CUresult` + Error code to convert to string + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pStr : bytes + Address of the string pointer. + + See Also + -------- + :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorString` + """ + cdef cydriver.CUresult cyerror = error.value + cdef const char* pStr = NULL + with nogil: + err = cydriver.cuGetErrorString(cyerror, &pStr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pStr if pStr != NULL else None) + +@cython.embedsignature(True) +def cuGetErrorName(error not None : CUresult): + """ Gets the string representation of an error code enum name. + + Sets `*pStr` to the address of a NULL-terminated string representation + of the name of the enum error code `error`. If the error code is not + recognized, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned and + `*pStr` will be set to the NULL address. + + Parameters + ---------- + error : :py:obj:`~.CUresult` + Error code to convert to string + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pStr : bytes + Address of the string pointer. + + See Also + -------- + :py:obj:`~.CUresult`, :py:obj:`~.cudaGetErrorName` + """ + cdef cydriver.CUresult cyerror = error.value + cdef const char* pStr = NULL + with nogil: + err = cydriver.cuGetErrorName(cyerror, &pStr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pStr if pStr != NULL else None) + +@cython.embedsignature(True) +def cuInit(unsigned int Flags): + """ Initialize the CUDA driver API Initializes the driver API and must be called before any other function from the driver API in the current process. Currently, the `Flags` parameter must be 0. If :py:obj:`~.cuInit()` has not been called, any function from the driver API will return :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`. + + Parameters + ---------- + Flags : unsigned int + Initialization flag for CUDA. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH`, :py:obj:`~.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE` + """ + with nogil: + err = cydriver.cuInit(Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDriverGetVersion(): + """ Returns the latest CUDA version supported by driver. + + Returns in `*driverVersion` the version of CUDA supported by the + driver. The version is returned as (1000 * major + 10 * minor). For + example, CUDA 9.2 would be represented by 9020. + + This function automatically returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `driverVersion` is NULL. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + driverVersion : int + Returns the CUDA driver version + + See Also + -------- + :py:obj:`~.cudaDriverGetVersion`, :py:obj:`~.cudaRuntimeGetVersion` + """ + cdef int driverVersion = 0 + with nogil: + err = cydriver.cuDriverGetVersion(&driverVersion) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], driverVersion) + +@cython.embedsignature(True) +def cuDeviceGet(int ordinal): + """ Returns a handle to a compute device. + + Returns in `*device` a device handle given an ordinal in the range [0, + :py:obj:`~.cuDeviceGetCount()`-1]. + + Parameters + ---------- + ordinal : int + Device number to get handle for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + device : :py:obj:`~.CUdevice` + Returned device handle + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport` + """ + cdef CUdevice device = CUdevice() + with nogil: + err = cydriver.cuDeviceGet(device._pvt_ptr, ordinal) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], device) + +@cython.embedsignature(True) +def cuDeviceGetCount(): + """ Returns the number of compute-capable devices. + + Returns in `*count` the number of devices with compute capability + greater than or equal to 2.0 that are available for execution. If there + is no such device, :py:obj:`~.cuDeviceGetCount()` returns 0. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + count : int + Returned number of compute-capable devices + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceCount` + """ + cdef int count = 0 + with nogil: + err = cydriver.cuDeviceGetCount(&count) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], count) + +@cython.embedsignature(True) +def cuDeviceGetName(int length, dev): + """ Returns an identifier string for the device. + + Returns an ASCII string identifying the device `dev` in the NULL- + terminated string pointed to by `name`. `length` specifies the maximum + length of the string that may be returned. `name` is shortened to the + specified `length`, if `length` is less than the device name + + Parameters + ---------- + length : int + Maximum length of string to store in `name` + dev : :py:obj:`~.CUdevice` + Device to get identifier string for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + name : bytes + Returned identifier string for the device + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + pyname = b" " * length + cdef char* name = pyname + with nogil: + err = cydriver.cuDeviceGetName(name, length, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pyname) + +@cython.embedsignature(True) +def cuDeviceGetUuid(dev): + """ Return an UUID for the device. + + Note there is a later version of this API, + :py:obj:`~.cuDeviceGetUuid_v2`. It will supplant this version in 12.0, + which is retained for minor version compatibility. + + Returns 16-octets identifying the device `dev` in the structure pointed + by the `uuid`. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device to get identifier string for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + uuid : :py:obj:`~.CUuuid` + Returned UUID + + See Also + -------- + :py:obj:`~.cuDeviceGetUuid_v2` :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUuuid uuid = CUuuid() + with nogil: + err = cydriver.cuDeviceGetUuid(uuid._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], uuid) + +@cython.embedsignature(True) +def cuDeviceGetUuid_v2(dev): + """ Return an UUID for the device (11.4+) + + Returns 16-octets identifying the device `dev` in the structure pointed + by the `uuid`. If the device is in MIG mode, returns its MIG UUID which + uniquely identifies the subscribed MIG compute instance. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device to get identifier string for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + uuid : :py:obj:`~.CUuuid` + Returned UUID + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cudaGetDeviceProperties` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUuuid uuid = CUuuid() + with nogil: + err = cydriver.cuDeviceGetUuid_v2(uuid._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], uuid) + +@cython.embedsignature(True) +def cuDeviceGetLuid(dev): + """ Return an LUID and device node mask for the device. + + Return identifying information (`luid` and `deviceNodeMask`) to allow + matching device with graphics APIs. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device to get identifier string for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + luid : bytes + Returned LUID + deviceNodeMask : unsigned int + Returned device node mask + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaGetDeviceProperties` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef char luid[8] + cdef unsigned int deviceNodeMask = 0 + with nogil: + err = cydriver.cuDeviceGetLuid(luid, &deviceNodeMask, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], luid, deviceNodeMask) + +@cython.embedsignature(True) +def cuDeviceTotalMem(dev): + """ Returns the total amount of memory on the device. + + Returns in `*bytes` the total amount of memory available on the device + `dev` in bytes. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + numbytes : int + Returned memory available on device in bytes + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaMemGetInfo` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef size_t numbytes = 0 + with nogil: + err = cydriver.cuDeviceTotalMem(&numbytes, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], numbytes) + +@cython.embedsignature(True) +def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsigned numChannels, dev): + """ Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size. + + Returns in `maxWidthInElements` the maximum number of texture elements + allocatable in a 1D linear texture for given `pformat` and + `numChannels`. + + Parameters + ---------- + pformat : :py:obj:`~.CUarray_format` + Texture format. + numChannels : unsigned + Number of channels per texture element. + dev : :py:obj:`~.CUdevice` + Device handle. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + maxWidthInElements : int + Returned maximum number of texture elements allocatable for given + `pformat` and `numChannels`. + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cudaMemGetInfo`, :py:obj:`~.cuDeviceTotalMem` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef size_t maxWidthInElements = 0 + cdef cydriver.CUarray_format cypformat = pformat.value + with nogil: + err = cydriver.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cypformat, numChannels, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], maxWidthInElements) + +@cython.embedsignature(True) +def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev): + """ Returns information about the device. + + Returns in `*pi` the integer value of the attribute `attrib` on device + `dev`. The supported attributes are: + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK`: Maximum number + of threads per block; + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X`: Maximum x-dimension + of a block + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y`: Maximum y-dimension + of a block + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z`: Maximum z-dimension + of a block + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X`: Maximum x-dimension + of a grid + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y`: Maximum y-dimension + of a grid + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z`: Maximum z-dimension + of a grid + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`: Maximum + amount of shared memory available to a thread block in bytes + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY`: Memory + available on device for constant variables in a CUDA C kernel in + bytes + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_WARP_SIZE`: Warp size in threads + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`: Maximum pitch in bytes + allowed by the memory copy functions that involve memory regions + allocated through :py:obj:`~.cuMemAllocPitch()` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH`: Maximum 1D + texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`: + Maximum width for a 1D texture bound to linear memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH`: + Maximum mipmapped 1D texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH`: Maximum 2D + texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT`: Maximum 2D + texture height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH`: + Maximum width for a 2D texture bound to linear memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT`: + Maximum height for a 2D texture bound to linear memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`: + Maximum pitch in bytes for a 2D texture bound to linear memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH`: + Maximum mipmapped 2D texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT`: + Maximum mipmapped 2D texture height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH`: Maximum 3D + texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT`: Maximum 3D + texture height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH`: Maximum 3D + texture depth + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE`: + Alternate maximum 3D texture width, 0 if no alternate maximum 3D + texture size is supported + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE`: + Alternate maximum 3D texture height, 0 if no alternate maximum 3D + texture size is supported + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE`: + Alternate maximum 3D texture depth, 0 if no alternate maximum 3D + texture size is supported + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH`: Maximum + cubemap texture width or height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH`: + Maximum 1D layered texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS`: + Maximum layers in a 1D layered texture + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH`: + Maximum 2D layered texture width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT`: + Maximum 2D layered texture height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS`: + Maximum layers in a 2D layered texture + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH`: + Maximum cubemap layered texture width or height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS`: + Maximum layers in a cubemap layered texture + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH`: Maximum 1D + surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH`: Maximum 2D + surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT`: Maximum 2D + surface height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH`: Maximum 3D + surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT`: Maximum 3D + surface height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH`: Maximum 3D + surface depth + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH`: + Maximum 1D layered surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS`: + Maximum layers in a 1D layered surface + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH`: + Maximum 2D layered surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT`: + Maximum 2D layered surface height + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS`: + Maximum layers in a 2D layered surface + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH`: Maximum + cubemap surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH`: + Maximum cubemap layered surface width + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS`: + Maximum layers in a cubemap layered surface + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK`: Maximum + number of 32-bit registers available to a thread block + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CLOCK_RATE`: The typical clock + frequency in kilohertz + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`: Alignment + requirement; texture base addresses aligned to + :py:obj:`~.textureAlign` bytes do not need an offset applied to + texture fetches + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`: Pitch + alignment requirement for 2D texture references bound to pitched + memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP`: 1 if the device can + concurrently copy memory between host and device while executing a + kernel, or 0 if not + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`: Number of + multiprocessors on the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT`: 1 if there is a + run time limit for kernels executed on the device, or 0 if not + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_INTEGRATED`: 1 if the device is + integrated with the memory subsystem, or 0 if not + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY`: 1 if the device + can map host memory into the CUDA address space, or 0 if not + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE`: Compute mode that + device is currently in. Available modes are as follows: + + - :py:obj:`~.CU_COMPUTEMODE_DEFAULT`: Default mode - Device is not + restricted and can have multiple CUDA contexts present at a single + time. + + - :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`: Compute-prohibited mode - + Device is prohibited from creating new CUDA contexts. + + - :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS`: Compute-exclusive- + process mode - Device can have only one context used by a single + process at a time. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS`: 1 if the device + supports executing multiple kernels within the same context + simultaneously, or 0 if not. It is not guaranteed that multiple + kernels will be resident on the device concurrently so this feature + should not be relied upon for correctness. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_ECC_ENABLED`: 1 if error correction is + enabled on the device, 0 if error correction is disabled or not + supported by the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID`: PCI bus identifier of the + device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID`: PCI device (also known + as slot) identifier of the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID`: PCI domain identifier + of the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_TCC_DRIVER`: 1 if the device is using + a TCC driver. TCC is only available on Tesla hardware running Windows + Vista or later + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE`: Peak memory clock + frequency in kilohertz + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH`: Global + memory bus width in bits + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE`: Size of L2 cache in + bytes. 0 if the device doesn't have L2 cache + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR`: + Maximum resident threads per multiprocessor + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`: 1 if the device + shares a unified address space with the host, or 0 if not + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR`: Major + compute capability version number + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR`: Minor + compute capability version number + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED`: 1 if + device supports caching globals in L1 cache, 0 if caching globals in + L1 cache is not supported by the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED`: 1 if device + supports caching locals in L1 cache, 0 if caching locals in L1 cache + is not supported by the device + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`: + Maximum amount of shared memory available to a multiprocessor in + bytes; this amount is shared by all thread blocks simultaneously + resident on a multiprocessor + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR`: + Maximum number of 32-bit registers available to a multiprocessor; + this number is shared by all thread blocks simultaneously resident on + a multiprocessor + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY`: 1 if device supports + allocating managed memory on this system, 0 if allocating managed + memory is not supported by the device on this system. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD`: 1 if device is on a + multi-GPU board, 0 if not. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID`: Unique + identifier for a group of devices associated with the same board. + Devices on the same multi-GPU board will share the same identifier. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED`: 1 if + Link between the device and the host supports native atomic + operations. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO`: + Ratio of single precision performance (in floating-point operations + per second) to double precision performance. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`: Device + supports coherently accessing pageable memory without calling + cudaHostRegister on it. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`: Device can + coherently access managed memory concurrently with the CPU. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED`: Device + supports Compute Preemption. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`: + Device can access host registered memory at the same virtual address + as the CPU. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`: + The maximum per block shared memory size supported on this device. + This is the maximum value that can be opted into when using the + :py:obj:`~.cuFuncSetAttribute()` or + :py:obj:`~.cuKernelSetAttribute()` call. For more details see + :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`: + Device accesses pageable memory via the host's page tables. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST`: + The host can directly access managed memory on the device without + migration. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`: + Device supports virtual memory management APIs like + :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`, + :py:obj:`~.cuMemMap` and related APIs + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED`: + Device supports exporting memory to a posix file descriptor with + :py:obj:`~.cuMemExportToShareableHandle`, if requested via + :py:obj:`~.cuMemCreate` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED`: + Device supports exporting memory to a Win32 NT handle with + :py:obj:`~.cuMemExportToShareableHandle`, if requested via + :py:obj:`~.cuMemCreate` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED`: + Device supports exporting memory to a Win32 KMT handle with + :py:obj:`~.cuMemExportToShareableHandle`, if requested via + :py:obj:`~.cuMemCreate` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR`: + Maximum number of thread blocks that can reside on a multiprocessor + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED`: Device + supports compressible memory allocation via :py:obj:`~.cuMemCreate` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE`: Maximum + L2 persisting lines capacity setting in bytes + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE`: + Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes` + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED`: + Device supports specifying the GPUDirect RDMA flag with + :py:obj:`~.cuMemCreate`. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK`: + Amount of shared memory per block reserved by CUDA driver in bytes + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED`: Device + supports sparse CUDA arrays and sparse CUDA mipmapped arrays. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`: + Device supports using the :py:obj:`~.cuMemHostRegister` flag + :py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that must + be mapped as read-only to the GPU + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED`: Device + supports using the :py:obj:`~.cuMemAllocAsync` and + :py:obj:`~.cuMemPool` family of APIs + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED`: Device + supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see + https://docs.nvidia.com/cuda/gpudirect-rdma for more information) + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS`: + The returned attribute shall be interpreted as a bitmask, where the + individual bits are described by the + :py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING`: + GPUDirect RDMA writes to the device do not need to be flushed for + consumers within the scope indicated by the returned attribute. See + :py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values + returned here. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES`: + Bitmask of handle types supported with mempool based IPC + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED`: + Device supports deferred mapping CUDA arrays and CUDA mipmapped + arrays. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_NUMA_CONFIG`: NUMA configuration of a + device: value is of type :py:obj:`~.CUdeviceNumaConfig` enum + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_NUMA_ID`: NUMA node ID of the GPU + memory + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED`: Device supports + switch multicast and reduction operations. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID`: The combined + 16-bit PCI device ID and 16-bit PCI vendor ID. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID`: The combined + 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. ID. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED`: + Device supports HOST_NUMA location with the virtual memory management + APIs like :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` and related + APIs + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED`: + Device supports HOST_NUMA location with the + :py:obj:`~.cuMemAllocAsync` and :py:obj:`~.cuMemPool` family of APIs + + Parameters + ---------- + attrib : :py:obj:`~.CUdevice_attribute` + Device attribute to query + dev : :py:obj:`~.CUdevice` + Device handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + pi : int + Returned device attribute value + + See Also + -------- + :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport`, :py:obj:`~.cudaDeviceGetAttribute`, :py:obj:`~.cudaGetDeviceProperties` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef int pi = 0 + cdef cydriver.CUdevice_attribute cyattrib = attrib.value + with nogil: + err = cydriver.cuDeviceGetAttribute(&pi, cyattrib, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pi) + +@cython.embedsignature(True) +def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags): + """ Return NvSciSync attributes that this device can support. + + Returns in `nvSciSyncAttrList`, the properties of NvSciSync that this + CUDA device, `dev` can support. The returned `nvSciSyncAttrList` can be + used to create an NvSciSync object that matches this device's + capabilities. + + If NvSciSyncAttrKey_RequiredPerm field in `nvSciSyncAttrList` is + already set this API will return :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + The applications should set `nvSciSyncAttrList` to a valid + NvSciSyncAttrList failing which this API will return + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`. + + The `flags` controls how applications intends to use the NvSciSync + created from the `nvSciSyncAttrList`. The valid flags are: + + - :py:obj:`~.CUDA_NVSCISYNC_ATTR_SIGNAL`, specifies that the + applications intends to signal an NvSciSync on this CUDA device. + + - :py:obj:`~.CUDA_NVSCISYNC_ATTR_WAIT`, specifies that the applications + intends to wait on an NvSciSync on this CUDA device. + + At least one of these flags must be set, failing which the API returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. Both the flags are orthogonal to + one another: a developer may set both these flags that allows to set + both wait and signal specific attributes in the same + `nvSciSyncAttrList`. + + Note that this API updates the input `nvSciSyncAttrList` with values + equivalent to the following public attribute key-values: + NvSciSyncAttrKey_RequiredPerm is set to + + - NvSciSyncAccessPerm_SignalOnly if + :py:obj:`~.CUDA_NVSCISYNC_ATTR_SIGNAL` is set in `flags`. + + - NvSciSyncAccessPerm_WaitOnly if :py:obj:`~.CUDA_NVSCISYNC_ATTR_WAIT` + is set in `flags`. + + - NvSciSyncAccessPerm_WaitSignal if both + :py:obj:`~.CUDA_NVSCISYNC_ATTR_WAIT` and + :py:obj:`~.CUDA_NVSCISYNC_ATTR_SIGNAL` are set in `flags`. + NvSciSyncAttrKey_PrimitiveInfo is set to + + - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid `device`. + + - NvSciSyncAttrValPrimitiveType_Syncpoint if `device` is a Tegra + device. + + - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if `device` + is GA10X+. NvSciSyncAttrKey_GpuId is set to the same UUID that is + returned for this `device` from :py:obj:`~.cuDeviceGetUuid`. + + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, + :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, + :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, + :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, + :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + Parameters + ---------- + nvSciSyncAttrList : Any + Return NvSciSync attributes supported. + dev : :py:obj:`~.CUdevice` + Valid Cuda Device to get NvSciSync attributes for. + flags : int + flags describing NvSciSync usage. + + Returns + ------- + CUresult + + + See Also + -------- + :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cynvSciSyncAttrList = _HelperInputVoidPtr(nvSciSyncAttrList) + cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr + with nogil: + err = cydriver.cuDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, cydev, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceSetMemPool(dev, pool): + """ Sets the current memory pool of a device. + + The memory pool must be local to the specified device. + :py:obj:`~.cuMemAllocAsync` allocates from the current mempool of the + provided stream's device. By default, a device's current memory pool is + its default memory pool. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + None + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + None + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolDestroy`, :py:obj:`~.cuMemAllocFromPoolAsync` + + Notes + ----- + Use :py:obj:`~.cuMemAllocFromPoolAsync` to specify asynchronous allocations from a device different than the one the stream runs on. + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + with nogil: + err = cydriver.cuDeviceSetMemPool(cydev, cypool) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceGetMemPool(dev): + """ Gets the current mempool for a device. + + Returns the last pool provided to :py:obj:`~.cuDeviceSetMemPool` for + this device or the device's default memory pool if + :py:obj:`~.cuDeviceSetMemPool` has never been called. By default the + current mempool is the default mempool for a device. Otherwise the + returned pool must have been set with :py:obj:`~.cuDeviceSetMemPool`. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + None + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pool : :py:obj:`~.CUmemoryPool` + None + + See Also + -------- + :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuDeviceSetMemPool` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUmemoryPool pool = CUmemoryPool() + with nogil: + err = cydriver.cuDeviceGetMemPool(pool._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pool) + +@cython.embedsignature(True) +def cuDeviceGetDefaultMemPool(dev): + """ Returns the default mempool of a device. + + The default mempool of a device contains device memory from that + device. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + None + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pool_out : :py:obj:`~.CUmemoryPool` + None + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemPoolTrimTo`, :py:obj:`~.cuMemPoolGetAttribute`, :py:obj:`~.cuMemPoolSetAttribute`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUmemoryPool pool_out = CUmemoryPool() + with nogil: + err = cydriver.cuDeviceGetDefaultMemPool(pool_out._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pool_out) + +@cython.embedsignature(True) +def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev): + """ Returns information about the execution affinity support of the device. + + Returns in `*pi` whether execution affinity type `typename` is + supported by device `dev`. The supported types are: + + - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT`: 1 if context with limited + SMs is supported by the device, or 0 if not; + + Parameters + ---------- + typename : :py:obj:`~.CUexecAffinityType` + Execution affinity type to query + dev : :py:obj:`~.CUdevice` + Device handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + pi : int + 1 if the execution affinity type `typename` is supported by the + device, or 0 if not + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef int pi = 0 + cdef cydriver.CUexecAffinityType cytypename = typename.value + with nogil: + err = cydriver.cuDeviceGetExecAffinitySupport(&pi, cytypename, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pi) + +@cython.embedsignature(True) +def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarget, scope not None : CUflushGPUDirectRDMAWritesScope): + """ Blocks until remote writes are visible to the specified scope. + + Blocks until GPUDirect RDMA writes to the target context via mappings + created through APIs like nvidia_p2p_get_pages (see + https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are + visible to the specified scope. + + If the scope equals or lies within the scope indicated by + :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING`, the + call will be a no-op and can be safely omitted for performance. This + can be determined by comparing the numerical values between the two + enums, with smaller scopes having smaller values. + + On platforms that support GPUDirect RDMA writes via more than one path + in hardware (see + :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`), the user + should consider those paths as belonging to separate ordering domains. + Note that in such cases CUDA driver will report both RDMA writes + ordering and RDMA write scope as ALL_DEVICES and a call to + cuFlushGPUDirectRDMA will be a no-op, but when these multiple paths are + used simultaneously, it is the user's responsibility to ensure ordering + by using mechanisms outside the scope of CUDA. + + Users may query support for this API via + :py:obj:`~.CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS`. + + Parameters + ---------- + target : :py:obj:`~.CUflushGPUDirectRDMAWritesTarget` + The target of the operation, see + :py:obj:`~.CUflushGPUDirectRDMAWritesTarget` + scope : :py:obj:`~.CUflushGPUDirectRDMAWritesScope` + The scope of the operation, see + :py:obj:`~.CUflushGPUDirectRDMAWritesScope` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + """ + cdef cydriver.CUflushGPUDirectRDMAWritesTarget cytarget = target.value + cdef cydriver.CUflushGPUDirectRDMAWritesScope cyscope = scope.value + with nogil: + err = cydriver.cuFlushGPUDirectRDMAWrites(cytarget, cyscope) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceGetProperties(dev): + """ Returns properties for a selected device. + + [Deprecated] + + This function was deprecated as of CUDA 5.0 and replaced by + :py:obj:`~.cuDeviceGetAttribute()`. + + Returns in `*prop` the properties of device `dev`. The + :py:obj:`~.CUdevprop` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.maxThreadsPerBlock` is the maximum number of threads per + block; + + - :py:obj:`~.maxThreadsDim`[3] is the maximum sizes of each dimension + of a block; + + - :py:obj:`~.maxGridSize`[3] is the maximum sizes of each dimension of + a grid; + + - :py:obj:`~.sharedMemPerBlock` is the total amount of shared memory + available per block in bytes; + + - :py:obj:`~.totalConstantMemory` is the total amount of constant + memory available on the device in bytes; + + - :py:obj:`~.SIMDWidth` is the warp size; + + - :py:obj:`~.memPitch` is the maximum pitch allowed by the memory copy + functions that involve memory regions allocated through + :py:obj:`~.cuMemAllocPitch()`; + + - :py:obj:`~.regsPerBlock` is the total number of registers available + per block; + + - :py:obj:`~.clockRate` is the clock frequency in kilohertz; + + - :py:obj:`~.textureAlign` is the alignment requirement; texture base + addresses that are aligned to :py:obj:`~.textureAlign` bytes do not + need an offset applied to texture fetches. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device to get properties for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + prop : :py:obj:`~.CUdevprop` + Returned properties of device + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUdevprop prop = CUdevprop() + with nogil: + err = cydriver.cuDeviceGetProperties(prop._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], prop) + +@cython.embedsignature(True) +def cuDeviceComputeCapability(dev): + """ Returns the compute capability of the device. + + [Deprecated] + + This function was deprecated as of CUDA 5.0 and its functionality + superseded by :py:obj:`~.cuDeviceGetAttribute()`. + + Returns in `*major` and `*minor` the major and minor revision numbers + that define the compute capability of the device `dev`. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + major : int + Major revision number + minor : int + Minor revision number + + See Also + -------- + :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceTotalMem` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef int major = 0 + cdef int minor = 0 + with nogil: + err = cydriver.cuDeviceComputeCapability(&major, &minor, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], major, minor) + +@cython.embedsignature(True) +def cuDevicePrimaryCtxRetain(dev): + """ Retain the primary context on the GPU. + + Retains the primary context on the device. Once the user successfully + retains the primary context, the primary context will be active and + available to the user until the user releases it with + :py:obj:`~.cuDevicePrimaryCtxRelease()` or resets it with + :py:obj:`~.cuDevicePrimaryCtxReset()`. Unlike :py:obj:`~.cuCtxCreate()` + the newly retained context is not pushed onto the stack. + + Retaining the primary context for the first time will fail with + :py:obj:`~.CUDA_ERROR_UNKNOWN` if the compute mode of the device is + :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. The function + :py:obj:`~.cuDeviceGetAttribute()` can be used with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute + mode of the device. The `nvidia-smi` tool can be used to set the + compute mode for devices. Documentation for `nvidia-smi` can be + obtained by passing a -h option to it. + + Please note that the primary context always supports pinned + allocations. Other flags can be specified by + :py:obj:`~.cuDevicePrimaryCtxSetFlags()`. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device for which primary context is requested + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pctx : :py:obj:`~.CUcontext` + Returned context handle of the new context + + See Also + -------- + :py:obj:`~.cuDevicePrimaryCtxRelease`, :py:obj:`~.cuDevicePrimaryCtxSetFlags`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuDevicePrimaryCtxRetain(pctx._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuDevicePrimaryCtxRelease(dev): + """ Release the primary context on the GPU. + + Releases the primary context interop on the device. A retained context + should always be released once the user is done using it. The context + is automatically reset once the last reference to it is released. This + behavior is different when the primary context was retained by the CUDA + runtime from CUDA 4.0 and earlier. In this case, the primary context + remains always active. + + Releasing a primary context that has not been previously retained will + fail with :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. + + Please note that unlike :py:obj:`~.cuCtxDestroy()` this method does not + pop the context from stack in any circumstances. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device which primary context is released + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + with nogil: + err = cydriver.cuDevicePrimaryCtxRelease(cydev) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags): + """ Set flags for the primary context. + + Sets the flags for the primary context on the device overwriting + perviously set ones. + + The three LSBs of the `flags` parameter can be used to control how the + OS thread, which owns the CUDA context at the time of an API call, + interacts with the OS scheduler when waiting for results from the GPU. + Only one of the scheduling flags can be set when creating a context. + + - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when + waiting for results from the GPU. This can decrease latency when + waiting for the GPU, but may lower the performance of CPU threads if + they are performing work in parallel with the CUDA thread. + + - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread + when waiting for results from the GPU. This can increase latency when + waiting for the GPU, but can increase the performance of CPU threads + performing work in parallel with the GPU. + + - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the + CPU thread on a synchronization primitive when waiting for the GPU to + finish work. + + - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU + thread on a synchronization primitive when waiting for the GPU to + finish work. Deprecated: This flag was deprecated as of CUDA 4.0 + and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`. + + - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags` + parameter is zero, uses a heuristic based on the number of active + CUDA contexts in the process `C` and the number of logical processors + in the system `P`. If `C` > `P`, then CUDA will yield to other OS + threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`), + otherwise CUDA will not yield while waiting for results and actively + spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally, + on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic + based on the power profile of the platform and may choose + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices. + + - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce + local memory after resizing local memory for a kernel. This can + prevent thrashing by local memory allocations when launching many + kernels with high local memory usage at the cost of potentially + increased memory usage. Deprecated: This flag is deprecated and the + behavior enabled by this flag is now the default and cannot be + disabled. + + - :py:obj:`~.CU_CTX_COREDUMP_ENABLE`: If GPU coredumps have not been + enabled globally with :py:obj:`~.cuCoredumpSetAttributeGlobal` or + environment variables, this flag can be set during context creation + to instruct CUDA to create a coredump if this context raises an + exception during execution. These environment variables are described + in the CUDA-GDB user guide under the "GPU core dump support" section. + The initial settings will be taken from the global settings at the + time of context creation. The other settings that control coredump + output can be modified by calling :py:obj:`~.cuCoredumpSetAttribute` + from the created context after it becomes current. + + - :py:obj:`~.CU_CTX_USER_COREDUMP_ENABLE`: If user-triggered GPU + coredumps have not been enabled globally with + :py:obj:`~.cuCoredumpSetAttributeGlobal` or environment variables, + this flag can be set during context creation to instruct CUDA to + create a coredump if data is written to a certain pipe that is + present in the OS space. These environment variables are described in + the CUDA-GDB user guide under the "GPU core dump support" section. It + is important to note that the pipe name `must` be set with + :py:obj:`~.cuCoredumpSetAttributeGlobal` before creating the context + if this flag is used. Setting this flag implies that + :py:obj:`~.CU_CTX_COREDUMP_ENABLE` is set. The initial settings will + be taken from the global settings at the time of context creation. + The other settings that control coredump output can be modified by + calling :py:obj:`~.cuCoredumpSetAttribute` from the created context + after it becomes current. + + - :py:obj:`~.CU_CTX_SYNC_MEMOPS`: Ensures that synchronous memory + operations initiated on this context will always synchronize. See + further documentation in the section titled "API Synchronization + behavior" to learn more about cases when synchronous memory + operations can exhibit asynchronous behavior. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device for which the primary context flags are set + flags : unsigned int + New flags for the device + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuDevicePrimaryCtxGetState`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxSetFlags`, :py:obj:`~.cudaSetDeviceFlags` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + with nogil: + err = cydriver.cuDevicePrimaryCtxSetFlags(cydev, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDevicePrimaryCtxGetState(dev): + """ Get the state of the primary context. + + Returns in `*flags` the flags for the primary context of `dev`, and in + `*active` whether it is active. See + :py:obj:`~.cuDevicePrimaryCtxSetFlags` for flag values. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device to get primary context flags for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + flags : unsigned int + Pointer to store flags + active : int + Pointer to store context state; 0 = inactive, 1 = active + + See Also + -------- + :py:obj:`~.cuDevicePrimaryCtxSetFlags`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxSetFlags`, :py:obj:`~.cudaGetDeviceFlags` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef unsigned int flags = 0 + cdef int active = 0 + with nogil: + err = cydriver.cuDevicePrimaryCtxGetState(cydev, &flags, &active) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], flags, active) + +@cython.embedsignature(True) +def cuDevicePrimaryCtxReset(dev): + """ Destroy all allocations and reset all state on the primary context. + + Explicitly destroys and cleans up all resources associated with the + current device in the current process. + + Note that it is responsibility of the calling function to ensure that + no other module in the process is using the device any more. For that + reason it is recommended to use :py:obj:`~.cuDevicePrimaryCtxRelease()` + in most cases. However it is safe for other modules to call + :py:obj:`~.cuDevicePrimaryCtxRelease()` even after resetting the + device. Resetting the primary context does not release it, an + application that has retained the primary context should explicitly + release its usage. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device for which primary context is destroyed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE` + + See Also + -------- + :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuDevicePrimaryCtxRelease`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceReset` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + with nogil: + err = cydriver.cuDevicePrimaryCtxReset(cydev) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxCreate(unsigned int flags, dev): + """ Create a CUDA context. + + Creates a new CUDA context and associates it with the calling thread. + The `flags` parameter is described below. The context is created with a + usage count of 1 and the caller of :py:obj:`~.cuCtxCreate()` must call + :py:obj:`~.cuCtxDestroy()` when done using the context. If a context is + already current to the thread, it is supplanted by the newly created + context and may be restored by a subsequent call to + :py:obj:`~.cuCtxPopCurrent()`. + + The three LSBs of the `flags` parameter can be used to control how the + OS thread, which owns the CUDA context at the time of an API call, + interacts with the OS scheduler when waiting for results from the GPU. + Only one of the scheduling flags can be set when creating a context. + + - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when + waiting for results from the GPU. This can decrease latency when + waiting for the GPU, but may lower the performance of CPU threads if + they are performing work in parallel with the CUDA thread. + + - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread + when waiting for results from the GPU. This can increase latency when + waiting for the GPU, but can increase the performance of CPU threads + performing work in parallel with the GPU. + + - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the + CPU thread on a synchronization primitive when waiting for the GPU to + finish work. + + - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU + thread on a synchronization primitive when waiting for the GPU to + finish work. Deprecated: This flag was deprecated as of CUDA 4.0 + and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`. + + - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags` + parameter is zero, uses a heuristic based on the number of active + CUDA contexts in the process `C` and the number of logical processors + in the system `P`. If `C` > `P`, then CUDA will yield to other OS + threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`), + otherwise CUDA will not yield while waiting for results and actively + spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally, + on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic + based on the power profile of the platform and may choose + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices. + + - :py:obj:`~.CU_CTX_MAP_HOST`: Instruct CUDA to support mapped pinned + allocations. This flag must be set in order to allocate pinned host + memory that is accessible to the GPU. + + - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce + local memory after resizing local memory for a kernel. This can + prevent thrashing by local memory allocations when launching many + kernels with high local memory usage at the cost of potentially + increased memory usage. Deprecated: This flag is deprecated and the + behavior enabled by this flag is now the default and cannot be + disabled. Instead, the per-thread stack size can be controlled with + :py:obj:`~.cuCtxSetLimit()`. + + - :py:obj:`~.CU_CTX_COREDUMP_ENABLE`: If GPU coredumps have not been + enabled globally with :py:obj:`~.cuCoredumpSetAttributeGlobal` or + environment variables, this flag can be set during context creation + to instruct CUDA to create a coredump if this context raises an + exception during execution. These environment variables are described + in the CUDA-GDB user guide under the "GPU core dump support" section. + The initial attributes will be taken from the global attributes at + the time of context creation. The other attributes that control + coredump output can be modified by calling + :py:obj:`~.cuCoredumpSetAttribute` from the created context after it + becomes current. + + - :py:obj:`~.CU_CTX_USER_COREDUMP_ENABLE`: If user-triggered GPU + coredumps have not been enabled globally with + :py:obj:`~.cuCoredumpSetAttributeGlobal` or environment variables, + this flag can be set during context creation to instruct CUDA to + create a coredump if data is written to a certain pipe that is + present in the OS space. These environment variables are described in + the CUDA-GDB user guide under the "GPU core dump support" section. It + is important to note that the pipe name `must` be set with + :py:obj:`~.cuCoredumpSetAttributeGlobal` before creating the context + if this flag is used. Setting this flag implies that + :py:obj:`~.CU_CTX_COREDUMP_ENABLE` is set. The initial attributes + will be taken from the global attributes at the time of context + creation. The other attributes that control coredump output can be + modified by calling :py:obj:`~.cuCoredumpSetAttribute` from the + created context after it becomes current. Setting this flag on any + context creation is equivalent to setting the + :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER` attribute to `true` + globally. + + - :py:obj:`~.CU_CTX_SYNC_MEMOPS`: Ensures that synchronous memory + operations initiated on this context will always synchronize. See + further documentation in the section titled "API Synchronization + behavior" to learn more about cases when synchronous memory + operations can exhibit asynchronous behavior. + + Context creation will fail with :py:obj:`~.CUDA_ERROR_UNKNOWN` if the + compute mode of the device is :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. + The function :py:obj:`~.cuDeviceGetAttribute()` can be used with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute + mode of the device. The `nvidia-smi` tool can be used to set the + compute mode for * devices. Documentation for `nvidia-smi` can be + obtained by passing a -h option to it. + + Parameters + ---------- + flags : unsigned int + Context creation flags + dev : :py:obj:`~.CUdevice` + Device to create context on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pctx : :py:obj:`~.CUcontext` + Returned context handle of the new context + + See Also + -------- + :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCoredumpSetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCtxSynchronize` + + Notes + ----- + In most cases it is recommended to use :py:obj:`~.cuDevicePrimaryCtxRetain`. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuCtxCreate(pctx._pvt_ptr, flags, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxCreate_v3(paramsArray : Optional[tuple[CUexecAffinityParam] | list[CUexecAffinityParam]], int numParams, unsigned int flags, dev): + """ Create a CUDA context with execution affinity. + + Creates a new CUDA context with execution affinity and associates it + with the calling thread. The `paramsArray` and `flags` parameter are + described below. The context is created with a usage count of 1 and the + caller of :py:obj:`~.cuCtxCreate()` must call + :py:obj:`~.cuCtxDestroy()` when done using the context. If a context is + already current to the thread, it is supplanted by the newly created + context and may be restored by a subsequent call to + :py:obj:`~.cuCtxPopCurrent()`. + + The type and the amount of execution resource the context can use is + limited by `paramsArray` and `numParams`. The `paramsArray` is an array + of `CUexecAffinityParam` and the `numParams` describes the size of the + array. If two `CUexecAffinityParam` in the array have the same type, + the latter execution affinity parameter overrides the former execution + affinity parameter. The supported execution affinity types are: + + - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT` limits the portion of SMs + that the context can use. The portion of SMs is specified as the + number of SMs via `CUexecAffinitySmCount`. This limit will be + internally rounded up to the next hardware-supported amount. Hence, + it is imperative to query the actual execution affinity of the + context via `cuCtxGetExecAffinity` after context creation. Currently, + this attribute is only supported under Volta+ MPS. + + The three LSBs of the `flags` parameter can be used to control how the + OS thread, which owns the CUDA context at the time of an API call, + interacts with the OS scheduler when waiting for results from the GPU. + Only one of the scheduling flags can be set when creating a context. + + - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when + waiting for results from the GPU. This can decrease latency when + waiting for the GPU, but may lower the performance of CPU threads if + they are performing work in parallel with the CUDA thread. + + - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread + when waiting for results from the GPU. This can increase latency when + waiting for the GPU, but can increase the performance of CPU threads + performing work in parallel with the GPU. + + - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the + CPU thread on a synchronization primitive when waiting for the GPU to + finish work. + + - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU + thread on a synchronization primitive when waiting for the GPU to + finish work. Deprecated: This flag was deprecated as of CUDA 4.0 + and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`. + + - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags` + parameter is zero, uses a heuristic based on the number of active + CUDA contexts in the process `C` and the number of logical processors + in the system `P`. If `C` > `P`, then CUDA will yield to other OS + threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`), + otherwise CUDA will not yield while waiting for results and actively + spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally, + on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic + based on the power profile of the platform and may choose + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices. + + - :py:obj:`~.CU_CTX_MAP_HOST`: Instruct CUDA to support mapped pinned + allocations. This flag must be set in order to allocate pinned host + memory that is accessible to the GPU. + + - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce + local memory after resizing local memory for a kernel. This can + prevent thrashing by local memory allocations when launching many + kernels with high local memory usage at the cost of potentially + increased memory usage. Deprecated: This flag is deprecated and the + behavior enabled by this flag is now the default and cannot be + disabled. Instead, the per-thread stack size can be controlled with + :py:obj:`~.cuCtxSetLimit()`. + + - :py:obj:`~.CU_CTX_COREDUMP_ENABLE`: If GPU coredumps have not been + enabled globally with :py:obj:`~.cuCoredumpSetAttributeGlobal` or + environment variables, this flag can be set during context creation + to instruct CUDA to create a coredump if this context raises an + exception during execution. These environment variables are described + in the CUDA-GDB user guide under the "GPU core dump support" section. + The initial attributes will be taken from the global attributes at + the time of context creation. The other attributes that control + coredump output can be modified by calling + :py:obj:`~.cuCoredumpSetAttribute` from the created context after it + becomes current. + + - :py:obj:`~.CU_CTX_USER_COREDUMP_ENABLE`: If user-triggered GPU + coredumps have not been enabled globally with + :py:obj:`~.cuCoredumpSetAttributeGlobal` or environment variables, + this flag can be set during context creation to instruct CUDA to + create a coredump if data is written to a certain pipe that is + present in the OS space. These environment variables are described in + the CUDA-GDB user guide under the "GPU core dump support" section. It + is important to note that the pipe name `must` be set with + :py:obj:`~.cuCoredumpSetAttributeGlobal` before creating the context + if this flag is used. Setting this flag implies that + :py:obj:`~.CU_CTX_COREDUMP_ENABLE` is set. The initial attributes + will be taken from the global attributes at the time of context + creation. The other attributes that control coredump output can be + modified by calling :py:obj:`~.cuCoredumpSetAttribute` from the + created context after it becomes current. Setting this flag on any + context creation is equivalent to setting the + :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER` attribute to `true` + globally. + + Context creation will fail with :py:obj:`~.CUDA_ERROR_UNKNOWN` if the + compute mode of the device is :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. + The function :py:obj:`~.cuDeviceGetAttribute()` can be used with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute + mode of the device. The `nvidia-smi` tool can be used to set the + compute mode for * devices. Documentation for `nvidia-smi` can be + obtained by passing a -h option to it. + + Parameters + ---------- + paramsArray : list[:py:obj:`~.CUexecAffinityParam`] + Execution affinity parameters + numParams : int + Number of execution affinity parameters + flags : unsigned int + Context creation flags + dev : :py:obj:`~.CUdevice` + Device to create context on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pctx : :py:obj:`~.CUcontext` + Returned context handle of the new context + + See Also + -------- + :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCoredumpSetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.CUexecAffinityParam` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + paramsArray = [] if paramsArray is None else paramsArray + if not all(isinstance(_x, (CUexecAffinityParam,)) for _x in paramsArray): + raise TypeError("Argument 'paramsArray' is not instance of type (expected tuple[cydriver.CUexecAffinityParam,] or list[cydriver.CUexecAffinityParam,]") + cdef CUcontext pctx = CUcontext() + cdef cydriver.CUexecAffinityParam* cyparamsArray = NULL + if len(paramsArray) > 1: + cyparamsArray = calloc(len(paramsArray), sizeof(cydriver.CUexecAffinityParam)) + if cyparamsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUexecAffinityParam))) + for idx in range(len(paramsArray)): + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUexecAffinityParam)) + elif len(paramsArray) == 1: + cyparamsArray = (paramsArray[0])._pvt_ptr + with nogil: + err = cydriver.cuCtxCreate_v3(pctx._pvt_ptr, cyparamsArray, numParams, flags, cydev) + if len(paramsArray) > 1 and cyparamsArray is not NULL: + free(cyparamsArray) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxCreate_v4(ctxCreateParams : Optional[CUctxCreateParams], unsigned int flags, dev): + """ Create a CUDA context. + + Creates a new CUDA context and associates it with the calling thread. + The `flags` parameter is described below. The context is created with a + usage count of 1 and the caller of :py:obj:`~.cuCtxCreate()` must call + :py:obj:`~.cuCtxDestroy()` when done using the context. If a context is + already current to the thread, it is supplanted by the newly created + context and may be restored by a subsequent call to + :py:obj:`~.cuCtxPopCurrent()`. + + CUDA context can be created with execution affinity. The type and the + amount of execution resource the context can use is limited by + `paramsArray` and `numExecAffinityParams` in `execAffinity`. The + `paramsArray` is an array of `CUexecAffinityParam` and the + `numExecAffinityParams` describes the size of the paramsArray. If two + `CUexecAffinityParam` in the array have the same type, the latter + execution affinity parameter overrides the former execution affinity + parameter. The supported execution affinity types are: + + - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT` limits the portion of SMs + that the context can use. The portion of SMs is specified as the + number of SMs via `CUexecAffinitySmCount`. This limit will be + internally rounded up to the next hardware-supported amount. Hence, + it is imperative to query the actual execution affinity of the + context via `cuCtxGetExecAffinity` after context creation. Currently, + this attribute is only supported under Volta+ MPS. + + CUDA context can be created in CIG(CUDA in Graphics) mode by setting + `cigParams`. Data from graphics client is shared with CUDA via the + `sharedData` in `cigParams`. Support for D3D12 graphics client can be + determined using :py:obj:`~.cuDeviceGetAttribute()` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED`. `sharedData` is a + ID3D12CommandQueue handle. Support for Vulkan graphics client can be + determined using :py:obj:`~.cuDeviceGetAttribute()` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED`. `sharedData` is a + Nvidia specific data blob populated by calling + vkGetExternalComputeQueueDataNV(). Either `execAffinityParams` or + `cigParams` can be set to a non-null value. Setting both to a non-null + value will result in an undefined behavior. + + The three LSBs of the `flags` parameter can be used to control how the + OS thread, which owns the CUDA context at the time of an API call, + interacts with the OS scheduler when waiting for results from the GPU. + Only one of the scheduling flags can be set when creating a context. + + - :py:obj:`~.CU_CTX_SCHED_SPIN`: Instruct CUDA to actively spin when + waiting for results from the GPU. This can decrease latency when + waiting for the GPU, but may lower the performance of CPU threads if + they are performing work in parallel with the CUDA thread. + + - :py:obj:`~.CU_CTX_SCHED_YIELD`: Instruct CUDA to yield its thread + when waiting for results from the GPU. This can increase latency when + waiting for the GPU, but can increase the performance of CPU threads + performing work in parallel with the GPU. + + - :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`: Instruct CUDA to block the + CPU thread on a synchronization primitive when waiting for the GPU to + finish work. + + - :py:obj:`~.CU_CTX_BLOCKING_SYNC`: Instruct CUDA to block the CPU + thread on a synchronization primitive when waiting for the GPU to + finish work. Deprecated: This flag was deprecated as of CUDA 4.0 + and was replaced with :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC`. + + - :py:obj:`~.CU_CTX_SCHED_AUTO`: The default value if the `flags` + parameter is zero, uses a heuristic based on the number of active + CUDA contexts in the process `C` and the number of logical processors + in the system `P`. If `C` > `P`, then CUDA will yield to other OS + threads when waiting for the GPU (:py:obj:`~.CU_CTX_SCHED_YIELD`), + otherwise CUDA will not yield while waiting for results and actively + spin on the processor (:py:obj:`~.CU_CTX_SCHED_SPIN`). Additionally, + on Tegra devices, :py:obj:`~.CU_CTX_SCHED_AUTO` uses a heuristic + based on the power profile of the platform and may choose + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` for low-powered devices. + + - :py:obj:`~.CU_CTX_MAP_HOST`: Instruct CUDA to support mapped pinned + allocations. This flag must be set in order to allocate pinned host + memory that is accessible to the GPU. + + - :py:obj:`~.CU_CTX_LMEM_RESIZE_TO_MAX`: Instruct CUDA to not reduce + local memory after resizing local memory for a kernel. This can + prevent thrashing by local memory allocations when launching many + kernels with high local memory usage at the cost of potentially + increased memory usage. Deprecated: This flag is deprecated and the + behavior enabled by this flag is now the default and cannot be + disabled. Instead, the per-thread stack size can be controlled with + :py:obj:`~.cuCtxSetLimit()`. + + - :py:obj:`~.CU_CTX_COREDUMP_ENABLE`: If GPU coredumps have not been + enabled globally with :py:obj:`~.cuCoredumpSetAttributeGlobal` or + environment variables, this flag can be set during context creation + to instruct CUDA to create a coredump if this context raises an + exception during execution. These environment variables are described + in the CUDA-GDB user guide under the "GPU core dump support" section. + The initial attributes will be taken from the global attributes at + the time of context creation. The other attributes that control + coredump output can be modified by calling + :py:obj:`~.cuCoredumpSetAttribute` from the created context after it + becomes current. This flag is not supported when CUDA context is + created in CIG(CUDA in Graphics) mode. + + - :py:obj:`~.CU_CTX_USER_COREDUMP_ENABLE`: If user-triggered GPU + coredumps have not been enabled globally with + :py:obj:`~.cuCoredumpSetAttributeGlobal` or environment variables, + this flag can be set during context creation to instruct CUDA to + create a coredump if data is written to a certain pipe that is + present in the OS space. These environment variables are described in + the CUDA-GDB user guide under the "GPU core dump support" section. It + is important to note that the pipe name `must` be set with + :py:obj:`~.cuCoredumpSetAttributeGlobal` before creating the context + if this flag is used. Setting this flag implies that + :py:obj:`~.CU_CTX_COREDUMP_ENABLE` is set. The initial attributes + will be taken from the global attributes at the time of context + creation. The other attributes that control coredump output can be + modified by calling :py:obj:`~.cuCoredumpSetAttribute` from the + created context after it becomes current. Setting this flag on any + context creation is equivalent to setting the + :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER` attribute to `true` + globally. This flag is not supported when CUDA context is created in + CIG(CUDA in Graphics) mode. + + - :py:obj:`~.CU_CTX_SYNC_MEMOPS`: Ensures that synchronous memory + operations initiated on this context will always synchronize. See + further documentation in the section titled "API Synchronization + behavior" to learn more about cases when synchronous memory + operations can exhibit asynchronous behavior. + + Context creation will fail with :py:obj:`~.CUDA_ERROR_UNKNOWN` if the + compute mode of the device is :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. + The function :py:obj:`~.cuDeviceGetAttribute()` can be used with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE` to determine the compute + mode of the device. The `nvidia-smi` tool can be used to set the + compute mode for * devices. Documentation for `nvidia-smi` can be + obtained by passing a -h option to it. + + Context creation will fail with :: CUDA_ERROR_INVALID_VALUE if invalid + parameter was passed by client to create the CUDA context. + + Context creation in CIG mode will fail with + :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` if CIG is not supported by the + device or the driver. + + Parameters + ---------- + ctxCreateParams : :py:obj:`~.CUctxCreateParams` + Context creation parameters + flags : unsigned int + Context creation flags + dev : :py:obj:`~.CUdevice` + Device to create context on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pctx : :py:obj:`~.CUcontext` + Returned context handle of the new context + + See Also + -------- + :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCoredumpSetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUcontext pctx = CUcontext() + cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams is not None else NULL + with nogil: + err = cydriver.cuCtxCreate_v4(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxDestroy(ctx): + """ Destroy a CUDA context. + + Destroys the CUDA context specified by `ctx`. The context `ctx` will be + destroyed regardless of how many threads it is current to. It is the + responsibility of the calling function to ensure that no API call + issues using `ctx` while :py:obj:`~.cuCtxDestroy()` is executing. + + Destroys and cleans up all resources associated with the context. It is + the caller's responsibility to ensure that the context or its resources + are not accessed or passed in subsequent API calls and doing so will + result in undefined behavior. These resources include CUDA types + :py:obj:`~.CUmodule`, :py:obj:`~.CUfunction`, :py:obj:`~.CUstream`, + :py:obj:`~.CUevent`, :py:obj:`~.CUarray`, :py:obj:`~.CUmipmappedArray`, + :py:obj:`~.CUtexObject`, :py:obj:`~.CUsurfObject`, + :py:obj:`~.CUtexref`, :py:obj:`~.CUsurfref`, + :py:obj:`~.CUgraphicsResource`, :py:obj:`~.CUlinkState`, + :py:obj:`~.CUexternalMemory` and :py:obj:`~.CUexternalSemaphore`. These + resources also include memory allocations by :py:obj:`~.cuMemAlloc()`, + :py:obj:`~.cuMemAllocHost()`, :py:obj:`~.cuMemAllocManaged()` and + :py:obj:`~.cuMemAllocPitch()`. + + If `ctx` is current to the calling thread then `ctx` will also be + popped from the current thread's context stack (as though + :py:obj:`~.cuCtxPopCurrent()` were called). If `ctx` is current to + other threads, then `ctx` will remain current to those threads, and + attempting to access `ctx` from those threads will result in the error + :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`. + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + + Notes + ----- + :py:obj:`~.cuCtxDestroy()` will not destroy memory allocations by :py:obj:`~.cuMemCreate()`, :py:obj:`~.cuMemAllocAsync()` and :py:obj:`~.cuMemAllocFromPoolAsync()`. These memory allocations are not associated with any CUDA context and need to be destroyed explicitly. + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + with nogil: + err = cydriver.cuCtxDestroy(cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxPushCurrent(ctx): + """ Pushes a context on the current CPU thread. + + Pushes the given context `ctx` onto the CPU thread's stack of current + contexts. The specified context becomes the CPU thread's current + context, so all CUDA functions that operate on the current context are + affected. + + The previous current context may be made current again by calling + :py:obj:`~.cuCtxDestroy()` or :py:obj:`~.cuCtxPopCurrent()`. + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context to push + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + with nogil: + err = cydriver.cuCtxPushCurrent(cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxPopCurrent(): + """ Pops the current CUDA context from the current CPU thread. + + Pops the current CUDA context from the CPU thread and passes back the + old context handle in `*pctx`. That context may then be made current to + a different CPU thread by calling :py:obj:`~.cuCtxPushCurrent()`. + + If a context was current to the CPU thread before + :py:obj:`~.cuCtxCreate()` or :py:obj:`~.cuCtxPushCurrent()` was called, + this function makes that context current to the CPU thread again. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + pctx : :py:obj:`~.CUcontext` + Returned popped context handle + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuCtxPopCurrent(pctx._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxSetCurrent(ctx): + """ Binds the specified CUDA context to the calling CPU thread. + + Binds the specified CUDA context to the calling CPU thread. If `ctx` is + NULL then the CUDA context previously bound to the calling CPU thread + is unbound and :py:obj:`~.CUDA_SUCCESS` is returned. + + If there exists a CUDA context stack on the calling CPU thread, this + will replace the top of that stack with `ctx`. If `ctx` is NULL then + this will be equivalent to popping the top of the calling CPU thread's + CUDA context stack (or a no-op if the calling CPU thread's CUDA context + stack is empty). + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context to bind to the calling CPU thread + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaSetDevice` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + with nogil: + err = cydriver.cuCtxSetCurrent(cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetCurrent(): + """ Returns the CUDA context bound to the calling CPU thread. + + Returns in `*pctx` the CUDA context bound to the calling CPU thread. If + no context is bound to the calling CPU thread then `*pctx` is set to + NULL and :py:obj:`~.CUDA_SUCCESS` is returned. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, + pctx : :py:obj:`~.CUcontext` + Returned context handle + + See Also + -------- + :py:obj:`~.cuCtxSetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaGetDevice` + """ + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuCtxGetCurrent(pctx._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxGetDevice(): + """ Returns the device handle for the current context. + + Returns in `*device` the handle of the current context's device. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + device : :py:obj:`~.CUdevice` + Returned device handle for the current context + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaGetDevice` + """ + cdef CUdevice device = CUdevice() + with nogil: + err = cydriver.cuCtxGetDevice(device._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], device) + +@cython.embedsignature(True) +def cuCtxGetFlags(): + """ Returns the flags for the current context. + + Returns in `*flags` the flags of the current context. See + :py:obj:`~.cuCtxCreate` for flag values. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + flags : unsigned int + Pointer to store flags of current context + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuCtxSetFlags`, :py:obj:`~.cudaGetDeviceFlags` + """ + cdef unsigned int flags = 0 + with nogil: + err = cydriver.cuCtxGetFlags(&flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], flags) + +@cython.embedsignature(True) +def cuCtxSetFlags(unsigned int flags): + """ Sets the flags for the current context. + + Sets the flags for the current context overwriting previously set ones. + See :py:obj:`~.cuDevicePrimaryCtxSetFlags` for flag values. + + Parameters + ---------- + flags : unsigned int + Flags to set on the current context + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetCurrent`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cudaGetDeviceFlags`, :py:obj:`~.cuDevicePrimaryCtxSetFlags`, + """ + with nogil: + err = cydriver.cuCtxSetFlags(flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetId(ctx): + """ Returns the unique Id associated with the context supplied. + + Returns in `ctxId` the unique Id which is associated with a given + context. The Id is unique for the life of the program for this instance + of CUDA. If context is supplied as NULL and there is one current, the + Id of the current context is returned. + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context for which to obtain the Id + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + ctxId : unsigned long long + Pointer to store the Id of the context + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPushCurrent` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + cdef unsigned long long ctxId = 0 + with nogil: + err = cydriver.cuCtxGetId(cyctx, &ctxId) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], ctxId) + +@cython.embedsignature(True) +def cuCtxSynchronize(): + """ Block for the current context's tasks to complete. + + Blocks until the current context has completed all preceding requested + tasks. If the current context is the primary context, green contexts + that have been created will also be synchronized. + :py:obj:`~.cuCtxSynchronize()` returns an error if one of the preceding + tasks failed. If the context was created with the + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` flag, the CPU thread will block + until the GPU context has finished its work. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cudaDeviceSynchronize` + """ + with nogil: + err = cydriver.cuCtxSynchronize() + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxSetLimit(limit not None : CUlimit, size_t value): + """ Set resource limits. + + Setting `limit` to `value` is a request by the application to update + the current limit maintained by the context. The driver is free to + modify the requested value to meet h/w requirements (this could be + clamping to minimum or maximum values, rounding up to nearest element + size, etc). The application can use :py:obj:`~.cuCtxGetLimit()` to find + out exactly what the limit has been set to. + + Setting each :py:obj:`~.CUlimit` has its own specific restrictions, so + each is discussed here. + + - :py:obj:`~.CU_LIMIT_STACK_SIZE` controls the stack size in bytes of + each GPU thread. The driver automatically increases the per-thread + stack size for each kernel launch as needed. This size isn't reset + back to the original value after each launch. Setting this value will + take effect immediately, and if necessary, the device will block + until all preceding requested tasks are complete. + + - :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE` controls the size in bytes of + the FIFO used by the :py:obj:`~.printf()` device system call. Setting + :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE` must be performed before + launching any kernel that uses the :py:obj:`~.printf()` device system + call, otherwise :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be + returned. + + - :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE` controls the size in bytes of + the heap used by the :py:obj:`~.malloc()` and :py:obj:`~.free()` + device system calls. Setting :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE` + must be performed before launching any kernel that uses the + :py:obj:`~.malloc()` or :py:obj:`~.free()` device system calls, + otherwise :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. + + - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH` controls the maximum + nesting depth of a grid at which a thread can safely call + :py:obj:`~.cudaDeviceSynchronize()`. Setting this limit must be + performed before any launch of a kernel that uses the device runtime + and calls :py:obj:`~.cudaDeviceSynchronize()` above the default sync + depth, two levels of grids. Calls to + :py:obj:`~.cudaDeviceSynchronize()` will fail with error code + :py:obj:`~.cudaErrorSyncDepthExceeded` if the limitation is violated. + This limit can be set smaller than the default or up the maximum + launch depth of 24. When setting this limit, keep in mind that + additional levels of sync depth require the driver to reserve large + amounts of device memory which can no longer be used for user + allocations. If these reservations of device memory fail, + :py:obj:`~.cuCtxSetLimit()` will return + :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, and the limit can be reset to a + lower value. This limit is only applicable to devices of compute + capability < 9.0. Attempting to set this limit on devices of other + compute capability versions will result in the error + :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` being returned. + + - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT` controls the + maximum number of outstanding device runtime launches that can be + made from the current context. A grid is outstanding from the point + of launch up until the grid is known to have been completed. Device + runtime launches which violate this limitation fail and return + :py:obj:`~.cudaErrorLaunchPendingCountExceeded` when + :py:obj:`~.cudaGetLastError()` is called after launch. If more + pending launches than the default (2048 launches) are needed for a + module using the device runtime, this limit can be increased. Keep in + mind that being able to sustain additional pending launches will + require the driver to reserve larger amounts of device memory upfront + which can no longer be used for allocations. If these reservations + fail, :py:obj:`~.cuCtxSetLimit()` will return + :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, and the limit can be reset to a + lower value. This limit is only applicable to devices of compute + capability 3.5 and higher. Attempting to set this limit on devices of + compute capability less than 3.5 will result in the error + :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` being returned. + + - :py:obj:`~.CU_LIMIT_MAX_L2_FETCH_GRANULARITY` controls the L2 cache + fetch granularity. Values can range from 0B to 128B. This is purely a + performance hint and it can be ignored or clamped depending on the + platform. + + - :py:obj:`~.CU_LIMIT_PERSISTING_L2_CACHE_SIZE` controls size in bytes + available for persisting L2 cache. This is purely a performance hint + and it can be ignored or clamped depending on the platform. + + Parameters + ---------- + limit : :py:obj:`~.CUlimit` + Limit to set + value : size_t + Size of limit + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceSetLimit` + """ + cdef cydriver.CUlimit cylimit = limit.value + with nogil: + err = cydriver.cuCtxSetLimit(cylimit, value) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetLimit(limit not None : CUlimit): + """ Returns resource limits. + + Returns in `*pvalue` the current size of `limit`. The supported + :py:obj:`~.CUlimit` values are: + + - :py:obj:`~.CU_LIMIT_STACK_SIZE`: stack size in bytes of each GPU + thread. + + - :py:obj:`~.CU_LIMIT_PRINTF_FIFO_SIZE`: size in bytes of the FIFO used + by the :py:obj:`~.printf()` device system call. + + - :py:obj:`~.CU_LIMIT_MALLOC_HEAP_SIZE`: size in bytes of the heap used + by the :py:obj:`~.malloc()` and :py:obj:`~.free()` device system + calls. + + - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH`: maximum grid depth at + which a thread can issue the device runtime call + :py:obj:`~.cudaDeviceSynchronize()` to wait on child grid launches to + complete. + + - :py:obj:`~.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT`: maximum number + of outstanding device runtime launches that can be made from this + context. + + - :py:obj:`~.CU_LIMIT_MAX_L2_FETCH_GRANULARITY`: L2 cache fetch + granularity. + + - :py:obj:`~.CU_LIMIT_PERSISTING_L2_CACHE_SIZE`: Persisting L2 cache + size in bytes + + Parameters + ---------- + limit : :py:obj:`~.CUlimit` + Limit to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` + pvalue : int + Returned size of limit + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetLimit` + """ + cdef size_t pvalue = 0 + cdef cydriver.CUlimit cylimit = limit.value + with nogil: + err = cydriver.cuCtxGetLimit(&pvalue, cylimit) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pvalue) + +@cython.embedsignature(True) +def cuCtxGetCacheConfig(): + """ Returns the preferred cache configuration for the current context. + + On devices where the L1 cache and shared memory use the same hardware + resources, this function returns through `pconfig` the preferred cache + configuration for the current context. This is only a preference. The + driver will use the requested configuration if possible, but it is free + to choose a different configuration if required to execute functions. + + This will return a `pconfig` of :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE` + on devices where the size of the L1 cache and shared memory are fixed. + + The supported cache configurations are: + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared + memory or L1 (default) + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and + smaller shared memory + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache + and shared memory + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pconfig : :py:obj:`~.CUfunc_cache` + Returned cache configuration + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig` + """ + cdef cydriver.CUfunc_cache pconfig + with nogil: + err = cydriver.cuCtxGetCacheConfig(&pconfig) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUfunc_cache(pconfig)) + +@cython.embedsignature(True) +def cuCtxSetCacheConfig(config not None : CUfunc_cache): + """ Sets the preferred cache configuration for the current context. + + On devices where the L1 cache and shared memory use the same hardware + resources, this sets through `config` the preferred cache configuration + for the current context. This is only a preference. The driver will use + the requested configuration if possible, but it is free to choose a + different configuration if required to execute the function. Any + function preference set via :py:obj:`~.cuFuncSetCacheConfig()` or + :py:obj:`~.cuKernelSetCacheConfig()` will be preferred over this + context-wide setting. Setting the context-wide cache configuration to + :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE` will cause subsequent kernel + launches to prefer to not change the cache configuration unless + required to launch the kernel. + + This setting does nothing on devices where the size of the L1 cache and + shared memory are fixed. + + Launching a kernel with a different preference than the most recent + preference setting may insert a device-side synchronization point. + + The supported cache configurations are: + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared + memory or L1 (default) + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and + smaller shared memory + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache + and shared memory + + Parameters + ---------- + config : :py:obj:`~.CUfunc_cache` + Requested cache configuration + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cuKernelSetCacheConfig` + """ + cdef cydriver.CUfunc_cache cyconfig = config.value + with nogil: + err = cydriver.cuCtxSetCacheConfig(cyconfig) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetApiVersion(ctx): + """ Gets the context's API version. + + Returns a version number in `version` corresponding to the capabilities + of the context (e.g. 3010 or 3020), which library developers can use to + direct callers to a specific API version. If `ctx` is NULL, returns the + API version used to create the currently bound context. + + Note that new API versions are only introduced when context + capabilities are changed that break binary compatibility, so the API + version and driver version may be different. For example, it is valid + for the API version to be 3020 while the driver version is 4020. + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context to check + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + version : unsigned int + Pointer to version + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + cdef unsigned int version = 0 + with nogil: + err = cydriver.cuCtxGetApiVersion(cyctx, &version) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], version) + +@cython.embedsignature(True) +def cuCtxGetStreamPriorityRange(): + """ Returns numerical values that correspond to the least and greatest stream priorities. + + Returns in `*leastPriority` and `*greatestPriority` the numerical + values that correspond to the least and greatest stream priorities + respectively. Stream priorities follow a convention where lower numbers + imply greater priorities. The range of meaningful stream priorities is + given by [`*greatestPriority`, `*leastPriority`]. If the user attempts + to create a stream with a priority value that is outside the meaningful + range as specified by this API, the priority is automatically clamped + down or up to either `*leastPriority` or `*greatestPriority` + respectively. See :py:obj:`~.cuStreamCreateWithPriority` for details on + creating a priority stream. A NULL may be passed in for + `*leastPriority` or `*greatestPriority` if the value is not desired. + + This function will return '0' in both `*leastPriority` and + `*greatestPriority` if the current context's device does not support + stream priorities (see :py:obj:`~.cuDeviceGetAttribute`). + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + leastPriority : int + Pointer to an int in which the numerical value for least stream + priority is returned + greatestPriority : int + Pointer to an int in which the numerical value for greatest stream + priority is returned + + See Also + -------- + :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetStreamPriorityRange` + """ + cdef int leastPriority = 0 + cdef int greatestPriority = 0 + with nogil: + err = cydriver.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], leastPriority, greatestPriority) + +@cython.embedsignature(True) +def cuCtxResetPersistingL2Cache(): + """ Resets all persisting lines in cache to normal status. + + :py:obj:`~.cuCtxResetPersistingL2Cache` Resets all persisting lines in + cache to normal status. Takes effect on function return. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + with nogil: + err = cydriver.cuCtxResetPersistingL2Cache() + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetExecAffinity(typename not None : CUexecAffinityType): + """ Returns the execution affinity setting for the current context. + + Returns in `*pExecAffinity` the current value of `typename`. The + supported :py:obj:`~.CUexecAffinityType` values are: + + - :py:obj:`~.CU_EXEC_AFFINITY_TYPE_SM_COUNT`: number of SMs the context + is limited to use. + + Parameters + ---------- + typename : :py:obj:`~.CUexecAffinityType` + Execution affinity type to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY` + pExecAffinity : :py:obj:`~.CUexecAffinityParam` + Returned execution affinity + + See Also + -------- + :py:obj:`~.CUexecAffinityParam` + """ + cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam() + cdef cydriver.CUexecAffinityType cytypename = typename.value + with nogil: + err = cydriver.cuCtxGetExecAffinity(pExecAffinity._pvt_ptr, cytypename) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pExecAffinity) + +@cython.embedsignature(True) +def cuCtxRecordEvent(hCtx, hEvent): + """ Records an event. + + Captures in `hEvent` all the activities of the context `hCtx` at the + time of this call. `hEvent` and `hCtx` must be from the same CUDA + context, otherwise :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` will be + returned. Calls such as :py:obj:`~.cuEventQuery()` or + :py:obj:`~.cuCtxWaitEvent()` will then examine or wait for completion + of the work that was captured. Uses of `hCtx` after this call do not + modify `hEvent`. If the context passed to `hCtx` is the primary + context, `hEvent` will capture all the activities of the primary + context and its green contexts. If the context passed to `hCtx` is a + context converted from green context via + :py:obj:`~.cuCtxFromGreenCtx()`, `hEvent` will capture only the + activities of the green context. + + Parameters + ---------- + hCtx : :py:obj:`~.CUcontext` + Context to record event for + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` + + See Also + -------- + :py:obj:`~.cuCtxWaitEvent`, :py:obj:`~.cuGreenCtxRecordEvent`, :py:obj:`~.cuGreenCtxWaitEvent`, :py:obj:`~.cuEventRecord` + + Notes + ----- + The API will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` if the specified context `hCtx` has a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures. + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + cdef cydriver.CUcontext cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUcontext,)): + phCtx = int(hCtx) + else: + phCtx = int(CUcontext(hCtx)) + cyhCtx = phCtx + with nogil: + err = cydriver.cuCtxRecordEvent(cyhCtx, cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxWaitEvent(hCtx, hEvent): + """ Make a context wait on an event. + + Makes all future work submitted to context `hCtx` wait for all work + captured in `hEvent`. The synchronization will be performed on the + device and will not block the calling CPU thread. See + :py:obj:`~.cuCtxRecordEvent()` for details on what is captured by an + event. If the context passed to `hCtx` is the primary context, the + primary context and its green contexts will wait for `hEvent`. If the + context passed to `hCtx` is a context converted from green context via + :py:obj:`~.cuCtxFromGreenCtx()`, the green context will wait for + `hEvent`. + + Parameters + ---------- + hCtx : :py:obj:`~.CUcontext` + Context to wait + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` + + See Also + -------- + :py:obj:`~.cuCtxRecordEvent`, :py:obj:`~.cuGreenCtxRecordEvent`, :py:obj:`~.cuGreenCtxWaitEvent`, :py:obj:`~.cuStreamWaitEvent` + + Notes + ----- + `hEvent` may be from a different context or device than `hCtx`. + + The API will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` and invalidate the capture if the specified event `hEvent` is part of an ongoing capture sequence or if the specified context `hCtx` has a stream in the capture mode. + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + cdef cydriver.CUcontext cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUcontext,)): + phCtx = int(hCtx) + else: + phCtx = int(CUcontext(hCtx)) + cyhCtx = phCtx + with nogil: + err = cydriver.cuCtxWaitEvent(cyhCtx, cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxAttach(unsigned int flags): + """ Increment a context's usage-count. + + [Deprecated] + + Note that this function is deprecated and should not be used. + + Increments the usage count of the context and passes back a context + handle in `*pctx` that must be passed to :py:obj:`~.cuCtxDetach()` when + the application is done with the context. :py:obj:`~.cuCtxAttach()` + fails if there is no context current to the thread. + + Currently, the `flags` parameter must be 0. + + Parameters + ---------- + flags : unsigned int + Context attach flags (must be 0) + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pctx : :py:obj:`~.CUcontext` + Returned context handle of the current context + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxDetach`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuCtxAttach(pctx._pvt_ptr, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuCtxDetach(ctx): + """ Decrement a context's usage-count. + + [Deprecated] + + Note that this function is deprecated and should not be used. + + Decrements the usage count of the context `ctx`, and destroys the + context if the usage count goes to 0. The context must be a handle that + was passed back by :py:obj:`~.cuCtxCreate()` or + :py:obj:`~.cuCtxAttach()`, and must be current to the calling thread. + + Parameters + ---------- + ctx : :py:obj:`~.CUcontext` + Context to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + with nogil: + err = cydriver.cuCtxDetach(cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxGetSharedMemConfig(): + """ Returns the current shared memory configuration for the current context. + + [Deprecated] + + This function will return in `pConfig` the current size of shared + memory banks in the current context. On devices with configurable + shared memory banks, :py:obj:`~.cuCtxSetSharedMemConfig` can be used to + change this setting, so that all subsequent kernel launches will by + default use the new bank size. When :py:obj:`~.cuCtxGetSharedMemConfig` + is called on devices without configurable shared memory, it will return + the fixed bank size of the hardware. + + The returned bank configurations can be either: + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: shared memory + bank width is four bytes. + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: shared memory + bank width will eight bytes. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pConfig : :py:obj:`~.CUsharedconfig` + returned shared memory configuration + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceGetSharedMemConfig` + """ + cdef cydriver.CUsharedconfig pConfig + with nogil: + err = cydriver.cuCtxGetSharedMemConfig(&pConfig) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUsharedconfig(pConfig)) + +@cython.embedsignature(True) +def cuCtxSetSharedMemConfig(config not None : CUsharedconfig): + """ Sets the shared memory configuration for the current context. + + [Deprecated] + + On devices with configurable shared memory banks, this function will + set the context's shared memory bank size which is used for subsequent + kernel launches. + + Changed the shared memory configuration between launches may insert a + device side synchronization point between those launches. + + Changing the shared memory bank size will not increase shared memory + usage or affect occupancy of kernels, but may have major effects on + performance. Larger bank sizes will allow for greater potential + bandwidth to shared memory, but will change what kinds of accesses to + shared memory will result in bank conflicts. + + This function will do nothing on devices with fixed shared memory bank + size. + + The supported bank configurations are: + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE`: set bank width to + the default initial setting (currently, four bytes). + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: set shared + memory bank width to be natively four bytes. + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: set shared + memory bank width to be natively eight bytes. + + Parameters + ---------- + config : :py:obj:`~.CUsharedconfig` + requested shared memory configuration + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cudaDeviceSetSharedMemConfig` + """ + cdef cydriver.CUsharedconfig cyconfig = config.value + with nogil: + err = cydriver.cuCtxSetSharedMemConfig(cyconfig) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuModuleLoad(char* fname): + """ Loads a compute module. + + Takes a filename `fname` and loads the corresponding module `module` + into the current context. The CUDA driver API does not attempt to + lazily allocate the resources needed by a module; if the memory for + functions and data (constant and global) needed by the module cannot be + allocated, :py:obj:`~.cuModuleLoad()` fails. The file should be a + `cubin` file as output by nvcc, or a `PTX` file either as output by + nvcc or handwritten, or a `fatbin` file as output by nvcc from + toolchain 4.0 or later. + + Parameters + ---------- + fname : bytes + Filename of module to load + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_FILE_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND` + module : :py:obj:`~.CUmodule` + Returned module + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + cdef CUmodule module = CUmodule() + with nogil: + err = cydriver.cuModuleLoad(module._pvt_ptr, fname) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], module) + +@cython.embedsignature(True) +def cuModuleLoadData(image): + """ Load a module's data. + + Takes a pointer `image` and loads the corresponding module `module` + into the current context. The `image` may be a `cubin` or `fatbin` as + output by nvcc, or a NULL-terminated `PTX`, either as output by nvcc or + hand-written. + + Parameters + ---------- + image : Any + Module data to load + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND` + module : :py:obj:`~.CUmodule` + Returned module + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + cdef CUmodule module = CUmodule() + cyimage = _HelperInputVoidPtr(image) + cdef void* cyimage_ptr = cyimage.cptr + with nogil: + err = cydriver.cuModuleLoadData(module._pvt_ptr, cyimage_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], module) + +@cython.embedsignature(True) +def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[CUjit_option] | list[CUjit_option]], optionValues : Optional[tuple[Any] | list[Any]]): + """ Load a module's data with options. + + Takes a pointer `image` and loads the corresponding module `module` + into the current context. The `image` may be a `cubin` or `fatbin` as + output by nvcc, or a NULL-terminated `PTX`, either as output by nvcc or + hand-written. + + Parameters + ---------- + image : Any + Module data to load + numOptions : unsigned int + Number of options + options : list[:py:obj:`~.CUjit_option`] + Options for JIT + optionValues : list[Any] + Option values for JIT + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND` + module : :py:obj:`~.CUmodule` + Returned module + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + optionValues = [] if optionValues is None else optionValues + options = [] if options is None else options + if not all(isinstance(_x, (CUjit_option)) for _x in options): + raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + cdef CUmodule module = CUmodule() + cyimage = _HelperInputVoidPtr(image) + cdef void* cyimage_ptr = cyimage.cptr + if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) + cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr + with nogil: + err = cydriver.cuModuleLoadDataEx(module._pvt_ptr, cyimage_ptr, numOptions, cyoptions.data(), cyoptionValues_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], module) + +@cython.embedsignature(True) +def cuModuleLoadFatBinary(fatCubin): + """ Load a module's data. + + Takes a pointer `fatCubin` and loads the corresponding module `module` + into the current context. The pointer represents a `fat binary` object, + which is a collection of different `cubin` and/or `PTX` files, all + representing the same device code, but compiled and optimized for + different architectures. + + Prior to CUDA 4.0, there was no documented API for constructing and + using fat binary objects by programmers. Starting with CUDA 4.0, fat + binary objects can be constructed by providing the `-fatbin option` to + nvcc. More information can be found in the nvcc document. + + Parameters + ---------- + fatCubin : Any + Fat binary to load + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND` + module : :py:obj:`~.CUmodule` + Returned module + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleUnload` + """ + cdef CUmodule module = CUmodule() + cyfatCubin = _HelperInputVoidPtr(fatCubin) + cdef void* cyfatCubin_ptr = cyfatCubin.cptr + with nogil: + err = cydriver.cuModuleLoadFatBinary(module._pvt_ptr, cyfatCubin_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], module) + +@cython.embedsignature(True) +def cuModuleUnload(hmod): + """ Unloads a module. + + Unloads a module `hmod` from the current context. Attempting to unload + a module which was obtained from the Library Management API such as + :py:obj:`~.cuLibraryGetModule` will return + :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. + + Parameters + ---------- + hmod : :py:obj:`~.CUmodule` + Module to unload + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED` + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary` + """ + cdef cydriver.CUmodule cyhmod + if hmod is None: + phmod = 0 + elif isinstance(hmod, (CUmodule,)): + phmod = int(hmod) + else: + phmod = int(CUmodule(hmod)) + cyhmod = phmod + with nogil: + err = cydriver.cuModuleUnload(cyhmod) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuModuleGetLoadingMode(): + """ Query lazy loading mode. + + Returns lazy loading mode Module loading mode is controlled by + CUDA_MODULE_LOADING env variable + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + mode : :py:obj:`~.CUmoduleLoadingMode` + Returns the lazy loading mode + + See Also + -------- + :py:obj:`~.cuModuleLoad`, + """ + cdef cydriver.CUmoduleLoadingMode mode + with nogil: + err = cydriver.cuModuleGetLoadingMode(&mode) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUmoduleLoadingMode(mode)) + +@cython.embedsignature(True) +def cuModuleGetFunction(hmod, char* name): + """ Returns a function handle. + + Returns in `*hfunc` the handle of the function of name `name` located + in module `hmod`. If no function of that name exists, + :py:obj:`~.cuModuleGetFunction()` returns + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + hmod : :py:obj:`~.CUmodule` + Module to retrieve function from + name : bytes + Name of function to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + hfunc : :py:obj:`~.CUfunction` + Returned function handle + + See Also + -------- + :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + cdef cydriver.CUmodule cyhmod + if hmod is None: + phmod = 0 + elif isinstance(hmod, (CUmodule,)): + phmod = int(hmod) + else: + phmod = int(CUmodule(hmod)) + cyhmod = phmod + cdef CUfunction hfunc = CUfunction() + with nogil: + err = cydriver.cuModuleGetFunction(hfunc._pvt_ptr, cyhmod, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], hfunc) + +@cython.embedsignature(True) +def cuModuleGetFunctionCount(mod): + """ Returns the number of functions within a module. + + Returns in `count` the number of functions in `mod`. + + Parameters + ---------- + mod : :py:obj:`~.CUmodule` + Module to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + count : unsigned int + Number of functions found within the module + """ + cdef cydriver.CUmodule cymod + if mod is None: + pmod = 0 + elif isinstance(mod, (CUmodule,)): + pmod = int(mod) + else: + pmod = int(CUmodule(mod)) + cymod = pmod + cdef unsigned int count = 0 + with nogil: + err = cydriver.cuModuleGetFunctionCount(&count, cymod) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], count) + +@cython.embedsignature(True) +def cuModuleEnumerateFunctions(unsigned int numFunctions, mod): + """ Returns the function handles within a module. + + Returns in `functions` a maximum number of `numFunctions` function + handles within `mod`. When function loading mode is set to LAZY the + function retrieved may be partially loaded. The loading state of a + function can be queried using :py:obj:`~.cuFunctionIsLoaded`. CUDA APIs + may load the function automatically when called with partially loaded + function handle which may incur additional latency. Alternatively, + :py:obj:`~.cuFunctionLoad` can be used to explicitly load a function. + The returned function handles become invalid when the module is + unloaded. + + Parameters + ---------- + numFunctions : unsigned int + Maximum number of function handles may be returned to the buffer + mod : :py:obj:`~.CUmodule` + Module to query from + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + functions : list[:py:obj:`~.CUfunction`] + Buffer where the function handles are returned to + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetFunctionCount`, :py:obj:`~.cuFuncIsLoaded`, :py:obj:`~.cuFuncLoad` + """ + cdef cydriver.CUmodule cymod + if mod is None: + pmod = 0 + elif isinstance(mod, (CUmodule,)): + pmod = int(mod) + else: + pmod = int(CUmodule(mod)) + cymod = pmod + cdef cydriver.CUfunction* cyfunctions = NULL + pyfunctions = [] + if numFunctions != 0: + cyfunctions = calloc(numFunctions, sizeof(cydriver.CUfunction)) + if cyfunctions is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(numFunctions) + 'x' + str(sizeof(cydriver.CUfunction))) + with nogil: + err = cydriver.cuModuleEnumerateFunctions(cyfunctions, numFunctions, cymod) + if CUresult(err) == CUresult(0): + pyfunctions = [CUfunction(init_value=cyfunctions[idx]) for idx in range(numFunctions)] + if cyfunctions is not NULL: + free(cyfunctions) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pyfunctions) + +@cython.embedsignature(True) +def cuModuleGetGlobal(hmod, char* name): + """ Returns a global pointer from a module. + + Returns in `*dptr` and `*bytes` the base pointer and size of the global + of name `name` located in module `hmod`. If no variable of that name + exists, :py:obj:`~.cuModuleGetGlobal()` returns + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. One of the parameters `dptr` or + `numbytes` (not both) can be NULL in which case it is ignored. + + Parameters + ---------- + hmod : :py:obj:`~.CUmodule` + Module to retrieve global from + name : bytes + Name of global to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + dptr : :py:obj:`~.CUdeviceptr` + Returned global device pointer + numbytes : int + Returned global size in bytes + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload`, :py:obj:`~.cudaGetSymbolAddress`, :py:obj:`~.cudaGetSymbolSize` + """ + cdef cydriver.CUmodule cyhmod + if hmod is None: + phmod = 0 + elif isinstance(hmod, (CUmodule,)): + phmod = int(hmod) + else: + phmod = int(CUmodule(hmod)) + cyhmod = phmod + cdef CUdeviceptr dptr = CUdeviceptr() + cdef size_t numbytes = 0 + with nogil: + err = cydriver.cuModuleGetGlobal(dptr._pvt_ptr, &numbytes, cyhmod, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], dptr, numbytes) + +@cython.embedsignature(True) +def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option] | list[CUjit_option]], optionValues : Optional[tuple[Any] | list[Any]]): + """ Creates a pending JIT linker invocation. + + If the call is successful, the caller owns the returned CUlinkState, + which should eventually be destroyed with :py:obj:`~.cuLinkDestroy`. + The device code machine size (32 or 64 bit) will match the calling + application. + + Both linker and compiler options may be specified. Compiler options + will be applied to inputs to this linker action which must be compiled + from PTX. The options :py:obj:`~.CU_JIT_WALL_TIME`, + :py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`, and + :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES` will accumulate data + until the CUlinkState is destroyed. + + The data passed in via :py:obj:`~.cuLinkAddData` and + :py:obj:`~.cuLinkAddFile` will be treated as relocatable (-rdc=true to + nvcc) when linking the final cubin during :py:obj:`~.cuLinkComplete` + and will have similar consequences as offline relocatable device code + linking. + + `optionValues` must remain valid for the life of the CUlinkState if + output options are used. No other references to inputs are maintained + after this call returns. + + Parameters + ---------- + numOptions : unsigned int + Size of options arrays + options : list[:py:obj:`~.CUjit_option`] + Array of linker and compiler options + optionValues : list[Any] + Array of option values, each cast to void * + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND` + stateOut : :py:obj:`~.CUlinkState` + On success, this will contain a CUlinkState to specify and complete + this action + + See Also + -------- + :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy` + + Notes + ----- + For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted + """ + optionValues = [] if optionValues is None else optionValues + options = [] if options is None else options + if not all(isinstance(_x, (CUjit_option)) for _x in options): + raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) + cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr + cdef CUlinkState stateOut = CUlinkState() + with nogil: + err = cydriver.cuLinkCreate(numOptions, cyoptions.data(), cyoptionValues_ptr, stateOut._pvt_ptr) + stateOut._keepalive.append(voidStarHelperoptionValues) + for option in pylist: + stateOut._keepalive.append(option) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], stateOut) + +@cython.embedsignature(True) +def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, char* name, unsigned int numOptions, options : Optional[tuple[CUjit_option] | list[CUjit_option]], optionValues : Optional[tuple[Any] | list[Any]]): + """ Add an input to a pending linker invocation. + + Ownership of `data` is retained by the caller. No reference is retained + to any inputs after this call returns. + + This method accepts only compiler options, which are used if the data + must be compiled from PTX, and does not accept any of + :py:obj:`~.CU_JIT_WALL_TIME`, :py:obj:`~.CU_JIT_INFO_LOG_BUFFER`, + :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER`, + :py:obj:`~.CU_JIT_TARGET_FROM_CUCONTEXT`, or :py:obj:`~.CU_JIT_TARGET`. + + Parameters + ---------- + state : :py:obj:`~.CUlinkState` + A pending linker action. + typename : :py:obj:`~.CUjitInputType` + The type of the input data. + data : Any + The input data. PTX must be NULL-terminated. + size : size_t + The length of the input data. + name : bytes + An optional name for this input in log messages. + numOptions : unsigned int + Size of options. + options : list[:py:obj:`~.CUjit_option`] + Options to be applied only for this input (overrides options from + :py:obj:`~.cuLinkCreate`). + optionValues : list[Any] + Array of option values, each cast to void *. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU` + + See Also + -------- + :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy` + + Notes + ----- + For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted + """ + optionValues = [] if optionValues is None else optionValues + options = [] if options is None else options + if not all(isinstance(_x, (CUjit_option)) for _x in options): + raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + cdef cydriver.CUlinkState cystate + if state is None: + pstate = 0 + elif isinstance(state, (CUlinkState,)): + pstate = int(state) + else: + pstate = int(CUlinkState(state)) + cystate = pstate + cdef cydriver.CUjitInputType cytypename = typename.value + cydata = _HelperInputVoidPtr(data) + cdef void* cydata_ptr = cydata.cptr + if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) + cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr + with nogil: + err = cydriver.cuLinkAddData(cystate, cytypename, cydata_ptr, size, name, numOptions, cyoptions.data(), cyoptionValues_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigned int numOptions, options : Optional[tuple[CUjit_option] | list[CUjit_option]], optionValues : Optional[tuple[Any] | list[Any]]): + """ Add a file input to a pending linker invocation. + + No reference is retained to any inputs after this call returns. + + This method accepts only compiler options, which are used if the input + must be compiled from PTX, and does not accept any of + :py:obj:`~.CU_JIT_WALL_TIME`, :py:obj:`~.CU_JIT_INFO_LOG_BUFFER`, + :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER`, + :py:obj:`~.CU_JIT_TARGET_FROM_CUCONTEXT`, or :py:obj:`~.CU_JIT_TARGET`. + + This method is equivalent to invoking :py:obj:`~.cuLinkAddData` on the + contents of the file. + + Parameters + ---------- + state : :py:obj:`~.CUlinkState` + A pending linker action + typename : :py:obj:`~.CUjitInputType` + The type of the input data + path : bytes + Path to the input file + numOptions : unsigned int + Size of options + options : list[:py:obj:`~.CUjit_option`] + Options to be applied only for this input (overrides options from + :py:obj:`~.cuLinkCreate`) + optionValues : list[Any] + Array of option values, each cast to void * + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_FILE_NOT_FOUND` :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU` + + See Also + -------- + :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkComplete`, :py:obj:`~.cuLinkDestroy` + + Notes + ----- + For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted + """ + optionValues = [] if optionValues is None else optionValues + options = [] if options is None else options + if not all(isinstance(_x, (CUjit_option)) for _x in options): + raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + cdef cydriver.CUlinkState cystate + if state is None: + pstate = 0 + elif isinstance(state, (CUlinkState,)): + pstate = int(state) + else: + pstate = int(CUlinkState(state)) + cystate = pstate + cdef cydriver.CUjitInputType cytypename = typename.value + if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) + cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr + with nogil: + err = cydriver.cuLinkAddFile(cystate, cytypename, path, numOptions, cyoptions.data(), cyoptionValues_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLinkComplete(state): + """ Complete a pending linker invocation. + + Completes the pending linker action and returns the cubin image for the + linked device code, which can be used with + :py:obj:`~.cuModuleLoadData`. The cubin is owned by `state`, so it + should be loaded before `state` is destroyed via + :py:obj:`~.cuLinkDestroy`. This call does not destroy `state`. + + Parameters + ---------- + state : :py:obj:`~.CUlinkState` + A pending linker invocation + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + cubinOut : Any + On success, this will point to the output image + sizeOut : int + Optional parameter to receive the size of the generated image + + See Also + -------- + :py:obj:`~.cuLinkCreate`, :py:obj:`~.cuLinkAddData`, :py:obj:`~.cuLinkAddFile`, :py:obj:`~.cuLinkDestroy`, :py:obj:`~.cuModuleLoadData` + """ + cdef cydriver.CUlinkState cystate + if state is None: + pstate = 0 + elif isinstance(state, (CUlinkState,)): + pstate = int(state) + else: + pstate = int(CUlinkState(state)) + cystate = pstate + cdef void_ptr cubinOut = 0 + cdef size_t sizeOut = 0 + with nogil: + err = cydriver.cuLinkComplete(cystate, &cubinOut, &sizeOut) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], cubinOut, sizeOut) + +@cython.embedsignature(True) +def cuLinkDestroy(state): + """ Destroys state for a JIT linker invocation. + + Parameters + ---------- + state : :py:obj:`~.CUlinkState` + State object for the linker invocation + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuLinkCreate` + """ + cdef cydriver.CUlinkState cystate + if state is None: + pstate = 0 + elif isinstance(state, (CUlinkState,)): + pstate = int(state) + else: + pstate = int(CUlinkState(state)) + cystate = pstate + with nogil: + err = cydriver.cuLinkDestroy(cystate) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuModuleGetTexRef(hmod, char* name): + """ Returns a handle to a texture reference. + + [Deprecated] + + Returns in `*pTexRef` the handle of the texture reference of name + `name` in the module `hmod`. If no texture reference of that name + exists, :py:obj:`~.cuModuleGetTexRef()` returns + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. This texture reference handle should + not be destroyed, since it will be destroyed when the module is + unloaded. + + Parameters + ---------- + hmod : :py:obj:`~.CUmodule` + Module to retrieve texture reference from + name : bytes + Name of texture reference to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + pTexRef : :py:obj:`~.CUtexref` + Returned texture reference + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + cdef cydriver.CUmodule cyhmod + if hmod is None: + phmod = 0 + elif isinstance(hmod, (CUmodule,)): + phmod = int(hmod) + else: + phmod = int(CUmodule(hmod)) + cyhmod = phmod + cdef CUtexref pTexRef = CUtexref() + with nogil: + err = cydriver.cuModuleGetTexRef(pTexRef._pvt_ptr, cyhmod, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pTexRef) + +@cython.embedsignature(True) +def cuModuleGetSurfRef(hmod, char* name): + """ Returns a handle to a surface reference. + + [Deprecated] + + Returns in `*pSurfRef` the handle of the surface reference of name + `name` in the module `hmod`. If no surface reference of that name + exists, :py:obj:`~.cuModuleGetSurfRef()` returns + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + hmod : :py:obj:`~.CUmodule` + Module to retrieve surface reference from + name : bytes + Name of surface reference to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + pSurfRef : :py:obj:`~.CUsurfref` + Returned surface reference + + See Also + -------- + :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` + """ + cdef cydriver.CUmodule cyhmod + if hmod is None: + phmod = 0 + elif isinstance(hmod, (CUmodule,)): + phmod = int(hmod) + else: + phmod = int(CUmodule(hmod)) + cyhmod = phmod + cdef CUsurfref pSurfRef = CUsurfref() + with nogil: + err = cydriver.cuModuleGetSurfRef(pSurfRef._pvt_ptr, cyhmod, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pSurfRef) + +@cython.embedsignature(True) +def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUjit_option]], jitOptionsValues : Optional[tuple[Any] | list[Any]], unsigned int numJitOptions, libraryOptions : Optional[tuple[CUlibraryOption] | list[CUlibraryOption]], libraryOptionValues : Optional[tuple[Any] | list[Any]], unsigned int numLibraryOptions): + """ Load a library with specified code and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cuLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The `code` may be a `cubin` or `fatbin` as output by nvcc, or a NULL- + terminated `PTX`, either as output by nvcc or hand-written. A fatbin + should also contain relocatable code when doing separate compilation. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total JIT + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + code : Any + Code to load + jitOptions : list[:py:obj:`~.CUjit_option`] + Options for JIT + jitOptionsValues : list[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : list[:py:obj:`~.CUlibraryOption`] + Options for loading + libraryOptionValues : list[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + library : :py:obj:`~.CUlibrary` + Returned library + + See Also + -------- + :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx` + + Notes + ----- + If the library contains managed variables and no device in the system supports managed variables this call is expected to return :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (CUlibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected tuple[cydriver.CUlibraryOption] or list[cydriver.CUlibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (CUjit_option)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + cdef CUlibrary library = CUlibrary() + cycode = _HelperInputVoidPtr(code) + cdef void* cycode_ptr = cycode.cptr + cdef vector[cydriver.CUjit_option] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + with nogil: + err = cydriver.cuLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], library) + +@cython.embedsignature(True) +def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_option] | list[CUjit_option]], jitOptionsValues : Optional[tuple[Any] | list[Any]], unsigned int numJitOptions, libraryOptions : Optional[tuple[CUlibraryOption] | list[CUlibraryOption]], libraryOptionValues : Optional[tuple[Any] | list[Any]], unsigned int numLibraryOptions): + """ Load a library with specified file and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cuLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The file should be a `cubin` file as output by nvcc, or a `PTX` file + either as output by nvcc or handwritten, or a `fatbin` file as output + by nvcc. A fatbin should also contain relocatable code when doing + separate compilation. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + fileName : bytes + File to load from + jitOptions : list[:py:obj:`~.CUjit_option`] + Options for JIT + jitOptionsValues : list[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : list[:py:obj:`~.CUlibraryOption`] + Options for loading + libraryOptionValues : list[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_PTX`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_PTX_VERSION`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NO_BINARY_FOR_GPU`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_JIT_COMPILER_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + library : :py:obj:`~.CUlibrary` + Returned library + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuModuleLoad`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx` + + Notes + ----- + If the library contains managed variables and no device in the system supports managed variables this call is expected to return :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (CUlibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected tuple[cydriver.CUlibraryOption] or list[cydriver.CUlibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (CUjit_option)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") + cdef CUlibrary library = CUlibrary() + cdef vector[cydriver.CUjit_option] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + with nogil: + err = cydriver.cuLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], library) + +@cython.embedsignature(True) +def cuLibraryUnload(library): + """ Unloads a library. + + Unloads the library specified with `library` + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to unload + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuModuleUnload` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + with nogil: + err = cydriver.cuLibraryUnload(cylibrary) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLibraryGetKernel(library, char* name): + """ Returns a kernel handle. + + Returns in `pKernel` the handle of the kernel with name `name` located + in library `library`. If kernel handle is not found, the call returns + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to retrieve kernel from + name : bytes + Name of kernel to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + pKernel : :py:obj:`~.CUkernel` + Returned kernel handle + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuKernelGetFunction`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetFunction` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + cdef CUkernel pKernel = CUkernel() + with nogil: + err = cydriver.cuLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pKernel) + +@cython.embedsignature(True) +def cuLibraryGetKernelCount(lib): + """ Returns the number of kernels within a library. + + Returns in `count` the number of kernels in `lib`. + + Parameters + ---------- + lib : :py:obj:`~.CUlibrary` + Library to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + count : unsigned int + Number of kernels found within the library + """ + cdef cydriver.CUlibrary cylib + if lib is None: + plib = 0 + elif isinstance(lib, (CUlibrary,)): + plib = int(lib) + else: + plib = int(CUlibrary(lib)) + cylib = plib + cdef unsigned int count = 0 + with nogil: + err = cydriver.cuLibraryGetKernelCount(&count, cylib) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], count) + +@cython.embedsignature(True) +def cuLibraryEnumerateKernels(unsigned int numKernels, lib): + """ Retrieve the kernel handles within a library. + + Returns in `kernels` a maximum number of `numKernels` kernel handles + within `lib`. The returned kernel handle becomes invalid when the + library is unloaded. + + Parameters + ---------- + numKernels : unsigned int + Maximum number of kernel handles may be returned to the buffer + lib : :py:obj:`~.CUlibrary` + Library to query from + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + kernels : list[:py:obj:`~.CUkernel`] + Buffer where the kernel handles are returned to + + See Also + -------- + :py:obj:`~.cuLibraryGetKernelCount` + """ + cdef cydriver.CUlibrary cylib + if lib is None: + plib = 0 + elif isinstance(lib, (CUlibrary,)): + plib = int(lib) + else: + plib = int(CUlibrary(lib)) + cylib = plib + cdef cydriver.CUkernel* cykernels = NULL + pykernels = [] + if numKernels != 0: + cykernels = calloc(numKernels, sizeof(cydriver.CUkernel)) + if cykernels is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(numKernels) + 'x' + str(sizeof(cydriver.CUkernel))) + with nogil: + err = cydriver.cuLibraryEnumerateKernels(cykernels, numKernels, cylib) + if CUresult(err) == CUresult(0): + pykernels = [CUkernel(init_value=cykernels[idx]) for idx in range(numKernels)] + if cykernels is not NULL: + free(cykernels) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pykernels) + +@cython.embedsignature(True) +def cuLibraryGetModule(library): + """ Returns a module handle. + + Returns in `pMod` the module handle associated with the current context + located in library `library`. If module handle is not found, the call + returns :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to retrieve module from + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + pMod : :py:obj:`~.CUmodule` + Returned module handle + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuModuleGetFunction` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + cdef CUmodule pMod = CUmodule() + with nogil: + err = cydriver.cuLibraryGetModule(pMod._pvt_ptr, cylibrary) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pMod) + +@cython.embedsignature(True) +def cuKernelGetFunction(kernel): + """ Returns a function handle. + + Returns in `pFunc` the handle of the function for the requested kernel + `kernel` and the current context. If function handle is not found, the + call returns :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + kernel : :py:obj:`~.CUkernel` + Kernel to retrieve function for the requested context + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + pFunc : :py:obj:`~.CUfunction` + Returned function handle + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetFunction` + """ + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef CUfunction pFunc = CUfunction() + with nogil: + err = cydriver.cuKernelGetFunction(pFunc._pvt_ptr, cykernel) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pFunc) + +@cython.embedsignature(True) +def cuKernelGetLibrary(kernel): + """ Returns a library handle. + + Returns in `pLib` the handle of the library for the requested kernel + `kernel` + + Parameters + ---------- + kernel : :py:obj:`~.CUkernel` + Kernel to retrieve library handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + pLib : :py:obj:`~.CUlibrary` + Returned library handle + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuLibraryGetKernel` + """ + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef CUlibrary pLib = CUlibrary() + with nogil: + err = cydriver.cuKernelGetLibrary(pLib._pvt_ptr, cykernel) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pLib) + +@cython.embedsignature(True) +def cuLibraryGetGlobal(library, char* name): + """ Returns a global device pointer. + + Returns in `*dptr` and `*bytes` the base pointer and size of the global + with name `name` for the requested library `library` and the current + context. If no global for the requested name `name` exists, the call + returns :py:obj:`~.CUDA_ERROR_NOT_FOUND`. One of the parameters `dptr` + or `numbytes` (not both) can be NULL in which case it is ignored. + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to retrieve global from + name : bytes + Name of global to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + dptr : :py:obj:`~.CUdeviceptr` + Returned global device pointer for the requested context + numbytes : int + Returned global size in bytes + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetGlobal` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + cdef CUdeviceptr dptr = CUdeviceptr() + cdef size_t numbytes = 0 + with nogil: + err = cydriver.cuLibraryGetGlobal(dptr._pvt_ptr, &numbytes, cylibrary, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], dptr, numbytes) + +@cython.embedsignature(True) +def cuLibraryGetManaged(library, char* name): + """ Returns a pointer to managed memory. + + Returns in `*dptr` and `*bytes` the base pointer and size of the + managed memory with name `name` for the requested library `library`. If + no managed memory with the requested name `name` exists, the call + returns :py:obj:`~.CUDA_ERROR_NOT_FOUND`. One of the parameters `dptr` + or `numbytes` (not both) can be NULL in which case it is ignored. Note + that managed memory for library `library` is shared across devices and + is registered when the library is loaded into atleast one context. + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to retrieve managed memory from + name : bytes + Name of managed memory to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + dptr : :py:obj:`~.CUdeviceptr` + Returned pointer to the managed memory + numbytes : int + Returned memory size in bytes + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + cdef CUdeviceptr dptr = CUdeviceptr() + cdef size_t numbytes = 0 + with nogil: + err = cydriver.cuLibraryGetManaged(dptr._pvt_ptr, &numbytes, cylibrary, name) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], dptr, numbytes) + +@cython.embedsignature(True) +def cuLibraryGetUnifiedFunction(library, char* symbol): + """ Returns a pointer to a unified function. + + Returns in `*fptr` the function pointer to a unified function denoted + by `symbol`. If no unified function with name `symbol` exists, the call + returns :py:obj:`~.CUDA_ERROR_NOT_FOUND`. If there is no device with + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS` + present in the system, the call may return + :py:obj:`~.CUDA_ERROR_NOT_FOUND`. + + Parameters + ---------- + library : :py:obj:`~.CUlibrary` + Library to retrieve function pointer memory from + symbol : bytes + Name of function pointer to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + fptr : Any + Returned pointer to a unified function + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload` + """ + cdef cydriver.CUlibrary cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (CUlibrary,)): + plibrary = int(library) + else: + plibrary = int(CUlibrary(library)) + cylibrary = plibrary + cdef void_ptr fptr = 0 + with nogil: + err = cydriver.cuLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], fptr) + +@cython.embedsignature(True) +def cuKernelGetAttribute(attrib not None : CUfunction_attribute, kernel, dev): + """ Returns information about a kernel. + + Returns in `*pi` the integer value of the attribute `attrib` for the + kernel `kernel` for the requested device `dev`. The supported + attributes are: + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK`: The maximum + number of threads per block, beyond which a launch of the kernel + would fail. This number depends on both the kernel and the requested + device. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`: The size in bytes of + statically-allocated shared memory per block required by this kernel. + This does not include dynamically-allocated shared memory requested + by the user at runtime. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES`: The size in bytes of + user-allocated constant memory required by this kernel. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES`: The size in bytes of + local memory used by each thread of this kernel. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NUM_REGS`: The number of registers used + by each thread of this kernel. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PTX_VERSION`: The PTX virtual + architecture version for which the kernel was compiled. This value is + the major PTX version * 10 + + - the minor PTX version, so a PTX version 1.3 function would return + the value 13. Note that this may return the undefined value of 0 + for cubins compiled prior to CUDA 3.0. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_BINARY_VERSION`: The binary architecture + version for which the kernel was compiled. This value is the major + binary version * 10 + the minor binary version, so a binary version + 1.3 function would return the value 13. Note that this will return a + value of 10 for legacy cubins that do not have a properly-encoded + binary architecture version. + + - :py:obj:`~.CU_FUNC_CACHE_MODE_CA`: The attribute to indicate whether + the kernel has been compiled with user specified option "-Xptxas + --dlcm=ca" set. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: The + maximum size in bytes of dynamically-allocated shared memory. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`: + Preferred shared memory-L1 cache split ratio in percent of total + shared memory. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET`: If this + attribute is set, the kernel must launch with a valid cluster size + specified. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required + cluster width in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required + cluster height in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required + cluster depth in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`: + Indicates whether the function can be launched with non-portable + cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster + size may only function on the specific SKUs the program is tested on. + The launch might fail if the program is run on a different hardware + platform. CUDA API provides cudaOccupancyMaxActiveClusters to assist + with checking whether the desired size can be launched on the current + device. A portable cluster size is guaranteed to be functional on all + compute capabilities higher than the target compute capability. The + portable cluster size for sm_90 is 8 blocks per cluster. This value + may increase for future compute capabilities. The specific hardware + unit may support higher cluster sizes that’s not guaranteed to be + portable. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`: + The block scheduling policy of a function. The value type is + CUclusterSchedulingPolicy. + + Parameters + ---------- + attrib : :py:obj:`~.CUfunction_attribute` + Attribute requested + kernel : :py:obj:`~.CUkernel` + Kernel to query attribute of + dev : :py:obj:`~.CUdevice` + Device to query attribute of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + pi : int + Returned attribute value + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuKernelSetAttribute`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuKernelGetFunction`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuFuncGetAttribute` + + Notes + ----- + If another thread is trying to set the same attribute on the same device using :py:obj:`~.cuKernelSetAttribute()` simultaneously, the attribute query will give the old or new value depending on the interleavings chosen by the OS scheduler and memory consistency. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef int pi = 0 + cdef cydriver.CUfunction_attribute cyattrib = attrib.value + with nogil: + err = cydriver.cuKernelGetAttribute(&pi, cyattrib, cykernel, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pi) + +@cython.embedsignature(True) +def cuKernelSetAttribute(attrib not None : CUfunction_attribute, int val, kernel, dev): + """ Sets information about a kernel. + + This call sets the value of a specified attribute `attrib` on the + kernel `kernel` for the requested device `dev` to an integer value + specified by `val`. This function returns CUDA_SUCCESS if the new value + of the attribute could be successfully set. If the set fails, this call + will return an error. Not all attributes can have values set. + Attempting to set a value on a read-only attribute will result in an + error (CUDA_ERROR_INVALID_VALUE) + + Note that attributes set using :py:obj:`~.cuFuncSetAttribute()` will + override the attribute set by this API irrespective of whether the call + to :py:obj:`~.cuFuncSetAttribute()` is made before or after this API + call. However, :py:obj:`~.cuKernelGetAttribute()` will always return + the attribute value set by this API. + + Supported attributes are: + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: This is + the maximum size in bytes of dynamically-allocated shared memory. The + value should contain the requested maximum size of dynamically- + allocated shared memory. The sum of this value and the function + attribute :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` cannot + exceed the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`. + The maximal size of requestable dynamic shared memory may differ by + GPU architecture. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`: On + devices where the L1 cache and shared memory use the same hardware + resources, this sets the shared memory carveout preference, in + percent of the total shared memory. See + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR` + This is only a hint, and the driver can choose a different ratio if + required to execute the function. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required + cluster width in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required + cluster height in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required + cluster depth in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`: + Indicates whether the function can be launched with non-portable + cluster size. 1 is allowed, 0 is disallowed. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`: + The block scheduling policy of a function. The value type is + CUclusterSchedulingPolicy. + + Parameters + ---------- + attrib : :py:obj:`~.CUfunction_attribute` + Attribute requested + val : int + Value to set + kernel : :py:obj:`~.CUkernel` + Kernel to set attribute of + dev : :py:obj:`~.CUdevice` + Device to set attribute of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuKernelGetAttribute`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuKernelGetFunction`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuFuncSetAttribute` + + Notes + ----- + The API has stricter locking requirements in comparison to its legacy counterpart :py:obj:`~.cuFuncSetAttribute()` due to device-wide semantics. If multiple threads are trying to set the same attribute on the same device simultaneously, the attribute setting will depend on the interleavings chosen by the OS scheduler and memory consistency. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef cydriver.CUfunction_attribute cyattrib = attrib.value + with nogil: + err = cydriver.cuKernelSetAttribute(cyattrib, val, cykernel, cydev) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuKernelSetCacheConfig(kernel, config not None : CUfunc_cache, dev): + """ Sets the preferred cache configuration for a device kernel. + + On devices where the L1 cache and shared memory use the same hardware + resources, this sets through `config` the preferred cache configuration + for the device kernel `kernel` on the requested device `dev`. This is + only a preference. The driver will use the requested configuration if + possible, but it is free to choose a different configuration if + required to execute `kernel`. Any context-wide preference set via + :py:obj:`~.cuCtxSetCacheConfig()` will be overridden by this per-kernel + setting. + + Note that attributes set using :py:obj:`~.cuFuncSetCacheConfig()` will + override the attribute set by this API irrespective of whether the call + to :py:obj:`~.cuFuncSetCacheConfig()` is made before or after this API + call. + + This setting does nothing on devices where the size of the L1 cache and + shared memory are fixed. + + Launching a kernel with a different preference than the most recent + preference setting may insert a device-side synchronization point. + + The supported cache configurations are: + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared + memory or L1 (default) + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and + smaller shared memory + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache + and shared memory + + Parameters + ---------- + kernel : :py:obj:`~.CUkernel` + Kernel to configure cache for + config : :py:obj:`~.CUfunc_cache` + Requested cache configuration + dev : :py:obj:`~.CUdevice` + Device to set attribute of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuLibraryLoadData`, :py:obj:`~.cuLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuKernelGetFunction`, :py:obj:`~.cuLibraryGetModule`, :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuLaunchKernel` + + Notes + ----- + The API has stricter locking requirements in comparison to its legacy counterpart :py:obj:`~.cuFuncSetCacheConfig()` due to device-wide semantics. If multiple threads are trying to set a config on the same device simultaneously, the cache config setting will depend on the interleavings chosen by the OS scheduler and memory consistency. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef cydriver.CUfunc_cache cyconfig = config.value + with nogil: + err = cydriver.cuKernelSetCacheConfig(cykernel, cyconfig, cydev) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuKernelGetName(hfunc): + """ Returns the function name for a :py:obj:`~.CUkernel` handle. + + Returns in `**name` the function name associated with the kernel handle + `hfunc` . The function name is returned as a null-terminated string. + The returned name is only valid when the kernel handle is valid. If the + library is unloaded or reloaded, one must call the API again to get the + updated name. This API may return a mangled name if the function is not + declared as having C linkage. If either `**name` or `hfunc` is NULL, + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + Parameters + ---------- + hfunc : :py:obj:`~.CUkernel` + The function handle to retrieve the name for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + name : bytes + The returned name of the function + """ + cdef cydriver.CUkernel cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUkernel,)): + phfunc = int(hfunc) + else: + phfunc = int(CUkernel(hfunc)) + cyhfunc = phfunc + cdef const char* name = NULL + with nogil: + err = cydriver.cuKernelGetName(&name, cyhfunc) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], name if name != NULL else None) + +@cython.embedsignature(True) +def cuKernelGetParamInfo(kernel, size_t paramIndex): + """ Returns the offset and size of a kernel parameter in the device-side parameter layout. + + Queries the kernel parameter at `paramIndex` into `kernel's` list of + parameters, and returns in `paramOffset` and `paramSize` the offset and + size, respectively, where the parameter will reside in the device-side + parameter layout. This information can be used to update kernel node + parameters from the device via + :py:obj:`~.cudaGraphKernelNodeSetParam()` and + :py:obj:`~.cudaGraphKernelNodeUpdatesApply()`. `paramIndex` must be + less than the number of parameters that `kernel` takes. `paramSize` can + be set to NULL if only the parameter offset is desired. + + Parameters + ---------- + kernel : :py:obj:`~.CUkernel` + The kernel to query + paramIndex : size_t + The parameter index to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + paramOffset : int + Returns the offset into the device-side parameter layout at which + the parameter resides + paramSize : int + Optionally returns the size of the parameter in the device-side + parameter layout + + See Also + -------- + :py:obj:`~.cuFuncGetParamInfo` + """ + cdef cydriver.CUkernel cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (CUkernel,)): + pkernel = int(kernel) + else: + pkernel = int(CUkernel(kernel)) + cykernel = pkernel + cdef size_t paramOffset = 0 + cdef size_t paramSize = 0 + with nogil: + err = cydriver.cuKernelGetParamInfo(cykernel, paramIndex, ¶mOffset, ¶mSize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], paramOffset, paramSize) + +@cython.embedsignature(True) +def cuMemGetInfo(): + """ Gets free and total memory. + + Returns in `*total` the total amount of memory available to the the + current context. Returns in `*free` the amount of memory on the device + that is free according to the OS. CUDA is not guaranteed to be able to + allocate all of the memory that the OS reports as free. In a multi- + tenet situation, free estimate returned is prone to race condition + where a new allocation/free done by a different process or a different + thread in the same process between the time when free memory was + estimated and reported, will result in deviation in free value reported + and actual free memory. + + The integrated GPU on Tegra shares memory with CPU and other component + of the SoC. The free and total values returned by the API excludes the + SWAP memory space maintained by the OS on some platforms. The OS may + move some of the memory pages into swap area as the GPU or CPU allocate + or access memory. See Tegra app note on how to calculate total and free + memory on Tegra. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + free : int + Returned free memory in bytes + total : int + Returned total memory in bytes + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemGetInfo` + """ + cdef size_t free = 0 + cdef size_t total = 0 + with nogil: + err = cydriver.cuMemGetInfo(&free, &total) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], free, total) + +@cython.embedsignature(True) +def cuMemAlloc(size_t bytesize): + """ Allocates device memory. + + Allocates `bytesize` bytes of linear memory on the device and returns + in `*dptr` a pointer to the allocated memory. The allocated memory is + suitably aligned for any kind of variable. The memory is not cleared. + If `bytesize` is 0, :py:obj:`~.cuMemAlloc()` returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + Parameters + ---------- + bytesize : size_t + Requested allocation size in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + dptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc` + """ + cdef CUdeviceptr dptr = CUdeviceptr() + with nogil: + err = cydriver.cuMemAlloc(dptr._pvt_ptr, bytesize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dptr) + +@cython.embedsignature(True) +def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes): + """ Allocates pitched device memory. + + Allocates at least `WidthInBytes` * `Height` bytes of linear memory on + the device and returns in `*dptr` a pointer to the allocated memory. + The function may pad the allocation to ensure that corresponding + pointers in any given row will continue to meet the alignment + requirements for coalescing as the address is updated from row to row. + `ElementSizeBytes` specifies the size of the largest reads and writes + that will be performed on the memory range. `ElementSizeBytes` may be + 4, 8 or 16 (since coalesced memory transactions are not possible on + other data sizes). If `ElementSizeBytes` is smaller than the actual + read/write size of a kernel, the kernel will run correctly, but + possibly at reduced speed. The pitch returned in `*pPitch` by + :py:obj:`~.cuMemAllocPitch()` is the width in bytes of the allocation. + The intended usage of pitch is as a separate parameter of the + allocation, used to compute addresses within the 2D array. Given the + row and column of an array element of type T, the address is computed + as: + + **View CUDA Toolkit Documentation for a C++ code example** + + The pitch returned by :py:obj:`~.cuMemAllocPitch()` is guaranteed to + work with :py:obj:`~.cuMemcpy2D()` under all circumstances. For + allocations of 2D arrays, it is recommended that programmers consider + performing pitch allocations using :py:obj:`~.cuMemAllocPitch()`. Due + to alignment restrictions in the hardware, this is especially true if + the application will be performing 2D memory copies between different + regions of device memory (whether linear memory or CUDA arrays). + + The byte alignment of the pitch returned by + :py:obj:`~.cuMemAllocPitch()` is guaranteed to match or exceed the + alignment requirement for texture binding with + :py:obj:`~.cuTexRefSetAddress2D()`. + + Parameters + ---------- + WidthInBytes : size_t + Requested allocation width in bytes + Height : size_t + Requested allocation height in rows + ElementSizeBytes : unsigned int + Size of largest reads/writes for range + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + dptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + pPitch : int + Returned pitch of allocation in bytes + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocPitch` + """ + cdef CUdeviceptr dptr = CUdeviceptr() + cdef size_t pPitch = 0 + with nogil: + err = cydriver.cuMemAllocPitch(dptr._pvt_ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], dptr, pPitch) + +@cython.embedsignature(True) +def cuMemFree(dptr): + """ Frees device memory. + + Frees the memory space pointed to by `dptr`, which must have been + returned by a previous call to one of the following memory allocation + APIs - :py:obj:`~.cuMemAlloc()`, :py:obj:`~.cuMemAllocPitch()`, + :py:obj:`~.cuMemAllocManaged()`, :py:obj:`~.cuMemAllocAsync()`, + :py:obj:`~.cuMemAllocFromPoolAsync()` + + Note - This API will not perform any implict synchronization when the + pointer was allocated with :py:obj:`~.cuMemAllocAsync` or + :py:obj:`~.cuMemAllocFromPoolAsync`. Callers must ensure that all + accesses to these pointer have completed before invoking + :py:obj:`~.cuMemFree`. For best performance and memory reuse, users + should use :py:obj:`~.cuMemFreeAsync` to free memory allocated via the + stream ordered memory allocator. For all other pointers, this API may + perform implicit synchronization. + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + Pointer to memory to free + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFree` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + with nogil: + err = cydriver.cuMemFree(cydptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemGetAddressRange(dptr): + """ Get information on memory allocations. + + Returns the base address in `*pbase` and size in `*psize` of the + allocation by :py:obj:`~.cuMemAlloc()` or :py:obj:`~.cuMemAllocPitch()` + that contains the input pointer `dptr`. Both parameters `pbase` and + `psize` are optional. If one of them is NULL, it is ignored. + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + Device pointer to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_FOUND`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pbase : :py:obj:`~.CUdeviceptr` + Returned base address + psize : int + Returned size of device memory allocation + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef CUdeviceptr pbase = CUdeviceptr() + cdef size_t psize = 0 + with nogil: + err = cydriver.cuMemGetAddressRange(pbase._pvt_ptr, &psize, cydptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pbase, psize) + +@cython.embedsignature(True) +def cuMemAllocHost(size_t bytesize): + """ Allocates page-locked host memory. + + Allocates `bytesize` bytes of host memory that is page-locked and + accessible to the device. The driver tracks the virtual memory ranges + allocated with this function and automatically accelerates calls to + functions such as :py:obj:`~.cuMemcpy()`. Since the memory can be + accessed directly by the device, it can be read or written with much + higher bandwidth than pageable memory obtained with functions such as + :py:obj:`~.malloc()`. + + On systems where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES` + is true, :py:obj:`~.cuMemAllocHost` may not page-lock the allocated + memory. + + Page-locking excessive amounts of memory with + :py:obj:`~.cuMemAllocHost()` may degrade system performance, since it + reduces the amount of memory available to the system for paging. As a + result, this function is best used sparingly to allocate staging areas + for data exchange between host and device. + + Note all host memory allocated using :py:obj:`~.cuMemAllocHost()` will + automatically be immediately accessible to all contexts on all devices + which support unified addressing (as may be queried using + :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`). The device pointer + that may be used to access this host memory from those contexts is + always equal to the returned host pointer `*pp`. See :py:obj:`~.Unified + Addressing` for additional details. + + Parameters + ---------- + bytesize : size_t + Requested allocation size in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + pp : Any + Returned pointer to host memory + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocHost` + """ + cdef void_ptr pp = 0 + with nogil: + err = cydriver.cuMemAllocHost(&pp, bytesize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pp) + +@cython.embedsignature(True) +def cuMemFreeHost(p): + """ Frees page-locked host memory. + + Frees the memory space pointed to by `p`, which must have been returned + by a previous call to :py:obj:`~.cuMemAllocHost()`. + + Parameters + ---------- + p : Any + Pointer to memory to free + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFreeHost` + """ + cyp = _HelperInputVoidPtr(p) + cdef void* cyp_ptr = cyp.cptr + with nogil: + err = cydriver.cuMemFreeHost(cyp_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemHostAlloc(size_t bytesize, unsigned int Flags): + """ Allocates page-locked host memory. + + Allocates `bytesize` bytes of host memory that is page-locked and + accessible to the device. The driver tracks the virtual memory ranges + allocated with this function and automatically accelerates calls to + functions such as :py:obj:`~.cuMemcpyHtoD()`. Since the memory can be + accessed directly by the device, it can be read or written with much + higher bandwidth than pageable memory obtained with functions such as + :py:obj:`~.malloc()`. + + On systems where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES` + is true, :py:obj:`~.cuMemHostAlloc` may not page-lock the allocated + memory. + + Page-locking excessive amounts of memory may degrade system + performance, since it reduces the amount of memory available to the + system for paging. As a result, this function is best used sparingly to + allocate staging areas for data exchange between host and device. + + The `Flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.CU_MEMHOSTALLOC_PORTABLE`: The memory returned by this + call will be considered as pinned memory by all CUDA contexts, not + just the one that performed the allocation. + + - :py:obj:`~.CU_MEMHOSTALLOC_DEVICEMAP`: Maps the allocation into the + CUDA address space. The device pointer to the memory may be obtained + by calling :py:obj:`~.cuMemHostGetDevicePointer()`. + + - :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED`: Allocates the memory as + write-combined (WC). WC memory can be transferred across the PCI + Express bus more quickly on some system configurations, but cannot be + read efficiently by most CPUs. WC memory is a good option for buffers + that will be written by the CPU and read by the GPU via mapped pinned + memory or host->device transfers. + + All of these flags are orthogonal to one another: a developer may + allocate memory that is portable, mapped and/or write-combined with no + restrictions. + + The :py:obj:`~.CU_MEMHOSTALLOC_DEVICEMAP` flag may be specified on CUDA + contexts for devices that do not support mapped pinned memory. The + failure is deferred to :py:obj:`~.cuMemHostGetDevicePointer()` because + the memory may be mapped into other CUDA contexts via the + :py:obj:`~.CU_MEMHOSTALLOC_PORTABLE` flag. + + The memory allocated by this function must be freed with + :py:obj:`~.cuMemFreeHost()`. + + Note all host memory allocated using :py:obj:`~.cuMemHostAlloc()` will + automatically be immediately accessible to all contexts on all devices + which support unified addressing (as may be queried using + :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`). Unless the flag + :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` is specified, the device + pointer that may be used to access this host memory from those contexts + is always equal to the returned host pointer `*pp`. If the flag + :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` is specified, then the + function :py:obj:`~.cuMemHostGetDevicePointer()` must be used to query + the device pointer, even if the context supports unified addressing. + See :py:obj:`~.Unified Addressing` for additional details. + + Parameters + ---------- + bytesize : size_t + Requested allocation size in bytes + Flags : unsigned int + Flags for allocation request + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + pp : Any + Returned pointer to host memory + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostAlloc` + """ + cdef void_ptr pp = 0 + with nogil: + err = cydriver.cuMemHostAlloc(&pp, bytesize, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pp) + +@cython.embedsignature(True) +def cuMemHostGetDevicePointer(p, unsigned int Flags): + """ Passes back device pointer of mapped pinned memory. + + Passes back the device pointer `pdptr` corresponding to the mapped, + pinned host buffer `p` allocated by :py:obj:`~.cuMemHostAlloc`. + + :py:obj:`~.cuMemHostGetDevicePointer()` will fail if the + :py:obj:`~.CU_MEMHOSTALLOC_DEVICEMAP` flag was not specified at the + time the memory was allocated, or if the function is called on a GPU + that does not support mapped pinned memory. + + For devices that have a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`, + the memory can also be accessed from the device using the host pointer + `p`. The device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` may or may not match the + original host pointer `p` and depends on the devices visible to the + application. If all devices visible to the application have a non-zero + value for the device attribute, the device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` will match the original pointer + `p`. If any device visible to the application has a zero value for the + device attribute, the device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` will not match the original + host pointer `p`, but it will be suitable for use on all devices + provided Unified Virtual Addressing is enabled. In such systems, it is + valid to access the memory using either pointer on devices that have a + non-zero value for the device attribute. Note however that such devices + should access the memory using only one of the two pointers and not + both. + + `Flags` provides for future releases. For now, it must be set to 0. + + Parameters + ---------- + p : Any + Host pointer + Flags : unsigned int + Options (must be 0) + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pdptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaHostGetDevicePointer` + """ + cdef CUdeviceptr pdptr = CUdeviceptr() + cyp = _HelperInputVoidPtr(p) + cdef void* cyp_ptr = cyp.cptr + with nogil: + err = cydriver.cuMemHostGetDevicePointer(pdptr._pvt_ptr, cyp_ptr, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pdptr) + +@cython.embedsignature(True) +def cuMemHostGetFlags(p): + """ Passes back flags that were used for a pinned allocation. + + Passes back the flags `pFlags` that were specified when allocating the + pinned host buffer `p` allocated by :py:obj:`~.cuMemHostAlloc`. + + :py:obj:`~.cuMemHostGetFlags()` will fail if the pointer does not + reside in an allocation performed by :py:obj:`~.cuMemAllocHost()` or + :py:obj:`~.cuMemHostAlloc()`. + + Parameters + ---------- + p : Any + Host pointer + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pFlags : unsigned int + Returned flags word + + See Also + -------- + :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cudaHostGetFlags` + """ + cdef unsigned int pFlags = 0 + cyp = _HelperInputVoidPtr(p) + cdef void* cyp_ptr = cyp.cptr + with nogil: + err = cydriver.cuMemHostGetFlags(&pFlags, cyp_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pFlags) + +@cython.embedsignature(True) +def cuMemAllocManaged(size_t bytesize, unsigned int flags): + """ Allocates memory that will be automatically managed by the Unified Memory system. + + Allocates `bytesize` bytes of managed memory on the device and returns + in `*dptr` a pointer to the allocated memory. If the device doesn't + support allocating managed memory, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + is returned. Support for managed memory can be queried using the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY`. The allocated + memory is suitably aligned for any kind of variable. The memory is not + cleared. If `bytesize` is 0, :py:obj:`~.cuMemAllocManaged` returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. The pointer is valid on the CPU + and on all GPUs in the system that support managed memory. All accesses + to this pointer must obey the Unified Memory programming model. + + `flags` specifies the default stream association for this allocation. + `flags` must be one of :py:obj:`~.CU_MEM_ATTACH_GLOBAL` or + :py:obj:`~.CU_MEM_ATTACH_HOST`. If :py:obj:`~.CU_MEM_ATTACH_GLOBAL` is + specified, then this memory is accessible from any stream on any + device. If :py:obj:`~.CU_MEM_ATTACH_HOST` is specified, then the + allocation should not be accessed from devices that have a zero value + for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`; an explicit + call to :py:obj:`~.cuStreamAttachMemAsync` will be required to enable + access on such devices. + + If the association is later changed via + :py:obj:`~.cuStreamAttachMemAsync` to a single stream, the default + association as specified during :py:obj:`~.cuMemAllocManaged` is + restored when that stream is destroyed. For managed variables, the + default association is always :py:obj:`~.CU_MEM_ATTACH_GLOBAL`. Note + that destroying a stream is an asynchronous operation, and as a result, + the change to default association won't happen until all work in the + stream has completed. + + Memory allocated with :py:obj:`~.cuMemAllocManaged` should be released + with :py:obj:`~.cuMemFree`. + + Device memory oversubscription is possible for GPUs that have a non- + zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Managed + memory on such GPUs may be evicted from device memory to host memory at + any time by the Unified Memory driver in order to make room for other + allocations. + + In a system where all GPUs have a non-zero value for the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`, + managed memory may not be populated when this API returns and instead + may be populated on access. In such systems, managed memory can migrate + to any processor's memory at any time. The Unified Memory driver will + employ heuristics to maintain data locality and prevent excessive page + faults to the extent possible. The application can also guide the + driver about memory usage patterns via :py:obj:`~.cuMemAdvise`. The + application can also explicitly migrate memory to a desired processor's + memory via :py:obj:`~.cuMemPrefetchAsync`. + + In a multi-GPU system where all of the GPUs have a zero value for the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` and all the + GPUs have peer-to-peer support with each other, the physical storage + for managed memory is created on the GPU which is active at the time + :py:obj:`~.cuMemAllocManaged` is called. All other GPUs will reference + the data at reduced bandwidth via peer mappings over the PCIe bus. The + Unified Memory driver does not migrate memory among such GPUs. + + In a multi-GPU system where not all GPUs have peer-to-peer support with + each other and where the value of the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is zero for + at least one of those GPUs, the location chosen for physical storage of + managed memory is system-dependent. + + - On Linux, the location chosen will be device memory as long as the + current set of active contexts are on devices that either have peer- + to-peer support with each other or have a non-zero value for the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If there + is an active context on a GPU that does not have a non-zero value for + that device attribute and it does not have peer-to-peer support with + the other devices that have active contexts on them, then the + location for physical storage will be 'zero-copy' or host memory. + Note that this means that managed memory that is located in device + memory is migrated to host memory if a new context is created on a + GPU that doesn't have a non-zero value for the device attribute and + does not support peer-to-peer with at least one of the other devices + that has an active context. This in turn implies that context + creation may fail if there is insufficient host memory to migrate all + managed allocations. + + - On Windows, the physical storage is always created in 'zero-copy' or + host memory. All GPUs will reference the data at reduced bandwidth + over the PCIe bus. In these circumstances, use of the environment + variable CUDA_VISIBLE_DEVICES is recommended to restrict CUDA to only + use those GPUs that have peer-to-peer support. Alternatively, users + can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero value to + force the driver to always use device memory for physical storage. + When this environment variable is set to a non-zero value, all + contexts created in that process on devices that support managed + memory have to be peer-to-peer compatible with each other. Context + creation will fail if a context is created on a device that supports + managed memory and is not peer-to-peer compatible with any of the + other managed memory supporting devices on which contexts were + previously created, even if those contexts have been destroyed. These + environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + - On ARM, managed memory is not available on discrete gpu with Drive + PX-2. + + Parameters + ---------- + bytesize : size_t + Requested allocation size in bytes + flags : unsigned int + Must be one of :py:obj:`~.CU_MEM_ATTACH_GLOBAL` or + :py:obj:`~.CU_MEM_ATTACH_HOST` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + dptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cudaMallocManaged` + """ + cdef CUdeviceptr dptr = CUdeviceptr() + with nogil: + err = cydriver.cuMemAllocManaged(dptr._pvt_ptr, bytesize, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dptr) + +ctypedef struct cuAsyncCallbackData_st: + cydriver.CUasyncCallback callback + void *userData + +ctypedef cuAsyncCallbackData_st cuAsyncCallbackData + +@cython.show_performance_hints(False) +cdef void cuAsyncNotificationCallbackWrapper(cydriver.CUasyncNotificationInfo *info, void *data, cydriver.CUasyncCallbackHandle handle) nogil: + cdef cuAsyncCallbackData *cbData = data + with gil: + cbData.callback(info, cbData.userData, handle) + +@cython.embedsignature(True) +def cuDeviceRegisterAsyncNotification(device, callbackFunc, userData): + """ Registers a callback function to receive async notifications. + + Registers `callbackFunc` to receive async notifications. + + The `userData` parameter is passed to the callback function at async + notification time. Likewise, `callback` is also passed to the + callback function to distinguish between multiple registered callbacks. + + The callback function being registered should be designed to return + quickly (~10ms). Any long running tasks should be queued for + execution on an application thread. + + Callbacks may not call cuDeviceRegisterAsyncNotification or + cuDeviceUnregisterAsyncNotification. Doing so will result in + :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. Async notification callbacks + execute in an undefined order and may be serialized. + + Returns in `*callback` a handle representing the registered callback + instance. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + The device on which to register the callback + callbackFunc : :py:obj:`~.CUasyncCallback` + The function to register as a callback + userData : Any + A generic pointer to user data. This is passed into the callback + function. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + callback : :py:obj:`~.CUasyncCallbackHandle` + A handle representing the registered callback instance + + See Also + -------- + :py:obj:`~.cuDeviceUnregisterAsyncNotification` + """ + cdef cydriver.CUasyncCallback cycallbackFunc + if callbackFunc is None: + pcallbackFunc = 0 + elif isinstance(callbackFunc, (CUasyncCallback,)): + pcallbackFunc = int(callbackFunc) + else: + pcallbackFunc = int(CUasyncCallback(callbackFunc)) + cycallbackFunc = pcallbackFunc + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cuAsyncCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (CUresult.CUDA_ERROR_OUT_OF_MEMORY, None) + cbData.callback = cycallbackFunc + cbData.userData = cyuserData_ptr + + cdef CUasyncCallbackHandle callback = CUasyncCallbackHandle() + with nogil: + err = cydriver.cuDeviceRegisterAsyncNotification(cydevice, cuAsyncNotificationCallbackWrapper, cbData, callback._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + free(cbData) + else: + m_global._allocated[int(callback)] = cbData + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], callback) + +@cython.embedsignature(True) +def cuDeviceUnregisterAsyncNotification(device, callback): + """ Unregisters an async notification callback. + + Unregisters `callback` so that the corresponding callback function will + stop receiving async notifications. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + The device from which to remove `callback`. + callback : :py:obj:`~.CUasyncCallbackHandle` + The callback instance to unregister from receiving async + notifications. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + + See Also + -------- + :py:obj:`~.cuDeviceRegisterAsyncNotification` + """ + cdef cydriver.CUasyncCallbackHandle cycallback + if callback is None: + pcallback = 0 + elif isinstance(callback, (CUasyncCallbackHandle,)): + pcallback = int(callback) + else: + pcallback = int(CUasyncCallbackHandle(callback)) + cycallback = pcallback + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + with nogil: + err = cydriver.cuDeviceUnregisterAsyncNotification(cydevice, cycallback) + if err == cydriver.CUDA_SUCCESS: + free(m_global._allocated[pcallback]) + m_global._allocated.erase(pcallback) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceGetByPCIBusId(char* pciBusId): + """ Returns a handle to a compute device. + + Returns in `*device` a device handle given a PCI bus ID string. + + where `domain`, `bus`, `device`, and `function` are all hexadecimal + values + + Parameters + ---------- + pciBusId : bytes + String in one of the following forms: + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + dev : :py:obj:`~.CUdevice` + Returned device handle + + See Also + -------- + :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetPCIBusId`, :py:obj:`~.cudaDeviceGetByPCIBusId` + """ + cdef CUdevice dev = CUdevice() + with nogil: + err = cydriver.cuDeviceGetByPCIBusId(dev._pvt_ptr, pciBusId) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dev) + +@cython.embedsignature(True) +def cuDeviceGetPCIBusId(int length, dev): + """ Returns a PCI Bus Id string for the device. + + Returns an ASCII string identifying the device `dev` in the NULL- + terminated string pointed to by `pciBusId`. `length` specifies the + maximum length of the string that may be returned. + + where `domain`, `bus`, `device`, and `function` are all hexadecimal + values. pciBusId should be large enough to store 13 characters + including the NULL-terminator. + + Parameters + ---------- + length : int + Maximum length of string to store in `name` + dev : :py:obj:`~.CUdevice` + Device to get identifier string for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + pciBusId : bytes + Returned identifier string for the device in the following format + + See Also + -------- + :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetByPCIBusId`, :py:obj:`~.cudaDeviceGetPCIBusId` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + pypciBusId = b" " * length + cdef char* pciBusId = pypciBusId + with nogil: + err = cydriver.cuDeviceGetPCIBusId(pciBusId, length, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pypciBusId) + +@cython.embedsignature(True) +def cuIpcGetEventHandle(event): + """ Gets an interprocess handle for a previously allocated event. + + Takes as input a previously allocated event. This event must have been + created with the :py:obj:`~.CU_EVENT_INTERPROCESS` and + :py:obj:`~.CU_EVENT_DISABLE_TIMING` flags set. This opaque handle may + be copied into other processes and opened with + :py:obj:`~.cuIpcOpenEventHandle` to allow efficient hardware + synchronization between GPU work in different processes. + + After the event has been opened in the importing process, + :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventSynchronize`, + :py:obj:`~.cuStreamWaitEvent` and :py:obj:`~.cuEventQuery` may be used + in either process. Performing operations on the imported event after + the exported event has been freed with :py:obj:`~.cuEventDestroy` will + result in undefined behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cuDeviceGetAttribute` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED` + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event allocated with :py:obj:`~.CU_EVENT_INTERPROCESS` and + :py:obj:`~.CU_EVENT_DISABLE_TIMING` flags. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pHandle : :py:obj:`~.CUipcEventHandle` + Pointer to a user allocated CUipcEventHandle in which to return the + opaque event handle + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcGetEventHandle` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + cdef CUipcEventHandle pHandle = CUipcEventHandle() + with nogil: + err = cydriver.cuIpcGetEventHandle(pHandle._pvt_ptr, cyevent) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle) + +@cython.embedsignature(True) +def cuIpcOpenEventHandle(handle not None : CUipcEventHandle): + """ Opens an interprocess event handle for use in the current process. + + Opens an interprocess event handle exported from another process with + :py:obj:`~.cuIpcGetEventHandle`. This function returns a + :py:obj:`~.CUevent` that behaves like a locally created event with the + :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag specified. This event must be + freed with :py:obj:`~.cuEventDestroy`. + + Performing operations on the imported event after the exported event + has been freed with :py:obj:`~.cuEventDestroy` will result in undefined + behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cuapiDeviceGetAttribute` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED` + + Parameters + ---------- + handle : :py:obj:`~.CUipcEventHandle` + Interprocess handle to open + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phEvent : :py:obj:`~.CUevent` + Returns the imported event + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcOpenEventHandle` + """ + cdef CUevent phEvent = CUevent() + with nogil: + err = cydriver.cuIpcOpenEventHandle(phEvent._pvt_ptr, handle._pvt_ptr[0]) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phEvent) + +@cython.embedsignature(True) +def cuIpcGetMemHandle(dptr): + """ Gets an interprocess memory handle for an existing device memory allocation. + + Takes a pointer to the base of an existing device memory allocation + created with :py:obj:`~.cuMemAlloc` and exports it for use in another + process. This is a lightweight operation and may be called multiple + times on an allocation without adverse effects. + + If a region of memory is freed with :py:obj:`~.cuMemFree` and a + subsequent call to :py:obj:`~.cuMemAlloc` returns memory with the same + device address, :py:obj:`~.cuIpcGetMemHandle` will return a unique + handle for the new memory. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cuapiDeviceGetAttribute` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED` + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + Base pointer to previously allocated device memory + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pHandle : :py:obj:`~.CUipcMemHandle` + Pointer to user allocated :py:obj:`~.CUipcMemHandle` to return the + handle in. + + See Also + -------- + :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcGetMemHandle` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef CUipcMemHandle pHandle = CUipcMemHandle() + with nogil: + err = cydriver.cuIpcGetMemHandle(pHandle._pvt_ptr, cydptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle) + +@cython.embedsignature(True) +def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags): + """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process. + + Maps memory exported from another process with + :py:obj:`~.cuIpcGetMemHandle` into the current device address space. + For contexts on different devices :py:obj:`~.cuIpcOpenMemHandle` can + attempt to enable peer access between the devices as if the user called + :py:obj:`~.cuCtxEnablePeerAccess`. This behavior is controlled by the + :py:obj:`~.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS` flag. + :py:obj:`~.cuDeviceCanAccessPeer` can determine if a mapping is + possible. + + Contexts that may open :py:obj:`~.CUipcMemHandles` are restricted in + the following way. :py:obj:`~.CUipcMemHandles` from each + :py:obj:`~.CUdevice` in a given process may only be opened by one + :py:obj:`~.CUcontext` per :py:obj:`~.CUdevice` per other process. + + If the memory handle has already been opened by the current context, + the reference count on the handle is incremented by 1 and the existing + device pointer is returned. + + Memory returned from :py:obj:`~.cuIpcOpenMemHandle` must be freed with + :py:obj:`~.cuIpcCloseMemHandle`. + + Calling :py:obj:`~.cuMemFree` on an exported memory region before + calling :py:obj:`~.cuIpcCloseMemHandle` in the importing context will + result in undefined behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cuapiDeviceGetAttribute` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED` + + Parameters + ---------- + handle : :py:obj:`~.CUipcMemHandle` + :py:obj:`~.CUipcMemHandle` to open + Flags : unsigned int + Flags for this operation. Must be specified as + :py:obj:`~.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pdptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cudaIpcOpenMemHandle` + + Notes + ----- + No guarantees are made about the address returned in `*pdptr`. In particular, multiple processes may not receive the same address for the same `handle`. + """ + cdef CUdeviceptr pdptr = CUdeviceptr() + with nogil: + err = cydriver.cuIpcOpenMemHandle(pdptr._pvt_ptr, handle._pvt_ptr[0], Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pdptr) + +@cython.embedsignature(True) +def cuIpcCloseMemHandle(dptr): + """ Attempts to close memory mapped with :py:obj:`~.cuIpcOpenMemHandle`. + + Decrements the reference count of the memory returned by + :py:obj:`~.cuIpcOpenMemHandle` by 1. When the reference count reaches + 0, this API unmaps the memory. The original allocation in the exporting + process as well as imported mappings in other processes will be + unaffected. + + Any resources used to enable peer access will be freed if this is the + last mapping using them. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cuapiDeviceGetAttribute` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED` + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + Device pointer returned by :py:obj:`~.cuIpcOpenMemHandle` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_MAP_FAILED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcOpenEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + with nogil: + err = cydriver.cuIpcCloseMemHandle(cydptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemHostRegister(p, size_t bytesize, unsigned int Flags): + """ Registers an existing host memory range for use by CUDA. + + Page-locks the memory range specified by `p` and `bytesize` and maps it + for the device(s) as specified by `Flags`. This memory range also is + added to the same tracking mechanism as :py:obj:`~.cuMemHostAlloc` to + automatically accelerate calls to functions such as + :py:obj:`~.cuMemcpyHtoD()`. Since the memory can be accessed directly + by the device, it can be read or written with much higher bandwidth + than pageable memory that has not been registered. Page-locking + excessive amounts of memory may degrade system performance, since it + reduces the amount of memory available to the system for paging. As a + result, this function is best used sparingly to register staging areas + for data exchange between host and device. + + On systems where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES` + is true, :py:obj:`~.cuMemHostRegister` will not page-lock the memory + range specified by `ptr` but only populate unpopulated pages. + + The `Flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.CU_MEMHOSTREGISTER_PORTABLE`: The memory returned by this + call will be considered as pinned memory by all CUDA contexts, not + just the one that performed the allocation. + + - :py:obj:`~.CU_MEMHOSTREGISTER_DEVICEMAP`: Maps the allocation into + the CUDA address space. The device pointer to the memory may be + obtained by calling :py:obj:`~.cuMemHostGetDevicePointer()`. + + - :py:obj:`~.CU_MEMHOSTREGISTER_IOMEMORY`: The pointer is treated as + pointing to some I/O memory space, e.g. the PCI Express resource of a + 3rd party device. + + - :py:obj:`~.CU_MEMHOSTREGISTER_READ_ONLY`: The pointer is treated as + pointing to memory that is considered read-only by the device. On + platforms without + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + this flag is required in order to register memory mapped to the CPU + as read-only. Support for the use of this flag can be queried from + the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED`. + Using this flag with a current context associated with a device that + does not have this attribute set will cause + :py:obj:`~.cuMemHostRegister` to error with CUDA_ERROR_NOT_SUPPORTED. + + All of these flags are orthogonal to one another: a developer may page- + lock memory that is portable or mapped with no restrictions. + + The :py:obj:`~.CU_MEMHOSTREGISTER_DEVICEMAP` flag may be specified on + CUDA contexts for devices that do not support mapped pinned memory. The + failure is deferred to :py:obj:`~.cuMemHostGetDevicePointer()` because + the memory may be mapped into other CUDA contexts via the + :py:obj:`~.CU_MEMHOSTREGISTER_PORTABLE` flag. + + For devices that have a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`, + the memory can also be accessed from the device using the host pointer + `p`. The device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` may or may not match the + original host pointer `ptr` and depends on the devices visible to the + application. If all devices visible to the application have a non-zero + value for the device attribute, the device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` will match the original pointer + `ptr`. If any device visible to the application has a zero value for + the device attribute, the device pointer returned by + :py:obj:`~.cuMemHostGetDevicePointer()` will not match the original + host pointer `ptr`, but it will be suitable for use on all devices + provided Unified Virtual Addressing is enabled. In such systems, it is + valid to access the memory using either pointer on devices that have a + non-zero value for the device attribute. Note however that such devices + should access the memory using only of the two pointers and not both. + + The memory page-locked by this function must be unregistered with + :py:obj:`~.cuMemHostUnregister()`. + + Parameters + ---------- + p : Any + Host pointer to memory to page-lock + bytesize : size_t + Size in bytes of the address range to page-lock + Flags : unsigned int + Flags for allocation request + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMemHostUnregister`, :py:obj:`~.cuMemHostGetFlags`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cudaHostRegister` + """ + cyp = _HelperInputVoidPtr(p) + cdef void* cyp_ptr = cyp.cptr + with nogil: + err = cydriver.cuMemHostRegister(cyp_ptr, bytesize, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemHostUnregister(p): + """ Unregisters a memory range that was registered with cuMemHostRegister. + + Unmaps the memory range whose base address is specified by `p`, and + makes it pageable again. + + The base address must be the same one specified to + :py:obj:`~.cuMemHostRegister()`. + + Parameters + ---------- + p : Any + Host pointer to memory to unregister + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED`, + + See Also + -------- + :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cudaHostUnregister` + """ + cyp = _HelperInputVoidPtr(p) + cdef void* cyp_ptr = cyp.cptr + with nogil: + err = cydriver.cuMemHostUnregister(cyp_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy(dst, src, size_t ByteCount): + """ Copies memory. + + Copies data between two pointers. `dst` and `src` are base pointers of + the destination and source, respectively. `ByteCount` specifies the + number of bytes to copy. Note that this function infers the type of the + transfer (host to host, host to device, device to device, or device to + host) from the pointer values. This function is only allowed in + contexts which support unified addressing. + + Parameters + ---------- + dst : :py:obj:`~.CUdeviceptr` + Destination unified virtual address space pointer + src : :py:obj:`~.CUdeviceptr` + Source unified virtual address space pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol` + """ + cdef cydriver.CUdeviceptr cysrc + if src is None: + psrc = 0 + elif isinstance(src, (CUdeviceptr,)): + psrc = int(src) + else: + psrc = int(CUdeviceptr(src)) + cysrc = psrc + cdef cydriver.CUdeviceptr cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (CUdeviceptr,)): + pdst = int(dst) + else: + pdst = int(CUdeviceptr(dst)) + cydst = pdst + with nogil: + err = cydriver.cuMemcpy(cydst, cysrc, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount): + """ Copies device memory between two contexts. + + Copies from device memory in one context to device memory in another + context. `dstDevice` is the base device pointer of the destination + memory and `dstContext` is the destination context. `srcDevice` is the + base device pointer of the source memory and `srcContext` is the source + pointer. `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstContext : :py:obj:`~.CUcontext` + Destination context + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + srcContext : :py:obj:`~.CUcontext` + Source context + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpy3DPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpyPeer` + """ + cdef cydriver.CUcontext cysrcContext + if srcContext is None: + psrcContext = 0 + elif isinstance(srcContext, (CUcontext,)): + psrcContext = int(srcContext) + else: + psrcContext = int(CUcontext(srcContext)) + cysrcContext = psrcContext + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cdef cydriver.CUcontext cydstContext + if dstContext is None: + pdstContext = 0 + elif isinstance(dstContext, (CUcontext,)): + pdstContext = int(dstContext) + else: + pdstContext = int(CUcontext(dstContext)) + cydstContext = pdstContext + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemcpyPeer(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount): + """ Copies memory from Host to Device. + + Copies from host memory to device memory. `dstDevice` and `srcHost` are + the base addresses of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + srcHost : Any + Source host pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + cysrcHost = _HelperInputVoidPtr(srcHost) + cdef void* cysrcHost_ptr = cysrcHost.cptr + with nogil: + err = cydriver.cuMemcpyHtoD(cydstDevice, cysrcHost_ptr, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount): + """ Copies memory from Device to Host. + + Copies from device to host memory. `dstHost` and `srcDevice` specify + the base pointers of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstHost : Any + Destination host pointer + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyFromSymbol` + """ + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cydstHost = _HelperInputVoidPtr(dstHost) + cdef void* cydstHost_ptr = cydstHost.cptr + with nogil: + err = cydriver.cuMemcpyDtoH(cydstHost_ptr, cysrcDevice, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount): + """ Copies memory from Device to Device. + + Copies from device memory to device memory. `dstDevice` and `srcDevice` + are the base pointers of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol` + """ + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemcpyDtoD(cydstDevice, cysrcDevice, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount): + """ Copies memory from Device to Array. + + Copies from device memory to a 1D CUDA array. `dstArray` and + `dstOffset` specify the CUDA array handle and starting index of the + destination data. `srcDevice` specifies the base pointer of the source. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstArray : :py:obj:`~.CUarray` + Destination array + dstOffset : size_t + Offset in bytes of destination array + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyToArray` + """ + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cdef cydriver.CUarray cydstArray + if dstArray is None: + pdstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + with nogil: + err = cydriver.cuMemcpyDtoA(cydstArray, dstOffset, cysrcDevice, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount): + """ Copies memory from Array to Device. + + Copies from one 1D CUDA array to device memory. `dstDevice` specifies + the base pointer of the destination and must be naturally aligned with + the CUDA array elements. `srcArray` and `srcOffset` specify the CUDA + array handle and the offset in bytes into the array where the copy is + to begin. `ByteCount` specifies the number of bytes to copy and must be + evenly divisible by the array element size. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + srcArray : :py:obj:`~.CUarray` + Source array + srcOffset : size_t + Offset in bytes of source array + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyFromArray` + """ + cdef cydriver.CUarray cysrcArray + if srcArray is None: + psrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemcpyAtoD(cydstDevice, cysrcArray, srcOffset, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount): + """ Copies memory from Host to Array. + + Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset` + specify the CUDA array handle and starting offset in bytes of the + destination data. `pSrc` specifies the base address of the source. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstArray : :py:obj:`~.CUarray` + Destination array + dstOffset : size_t + Offset in bytes of destination array + srcHost : Any + Source host pointer + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyToArray` + """ + cdef cydriver.CUarray cydstArray + if dstArray is None: + pdstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + cysrcHost = _HelperInputVoidPtr(srcHost) + cdef void* cysrcHost_ptr = cysrcHost.cptr + with nogil: + err = cydriver.cuMemcpyHtoA(cydstArray, dstOffset, cysrcHost_ptr, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount): + """ Copies memory from Array to Host. + + Copies from one 1D CUDA array to host memory. `dstHost` specifies the + base pointer of the destination. `srcArray` and `srcOffset` specify the + CUDA array handle and starting offset in bytes of the source data. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstHost : Any + Destination device pointer + srcArray : :py:obj:`~.CUarray` + Source array + srcOffset : size_t + Offset in bytes of source array + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyFromArray` + """ + cdef cydriver.CUarray cysrcArray + if srcArray is None: + psrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + cydstHost = _HelperInputVoidPtr(dstHost) + cdef void* cydstHost_ptr = cydstHost.cptr + with nogil: + err = cydriver.cuMemcpyAtoH(cydstHost_ptr, cysrcArray, srcOffset, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount): + """ Copies memory from Array to Array. + + Copies from one 1D CUDA array to another. `dstArray` and `srcArray` + specify the handles of the destination and source CUDA arrays for the + copy, respectively. `dstOffset` and `srcOffset` specify the destination + and source offsets in bytes into the CUDA arrays. `ByteCount` is the + number of bytes to be copied. The size of the elements in the CUDA + arrays need not be the same format, but the elements must be the same + size; and count must be evenly divisible by that size. + + Parameters + ---------- + dstArray : :py:obj:`~.CUarray` + Destination array + dstOffset : size_t + Offset in bytes of destination array + srcArray : :py:obj:`~.CUarray` + Source array + srcOffset : size_t + Offset in bytes of source array + ByteCount : size_t + Size of memory copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpyArrayToArray` + """ + cdef cydriver.CUarray cysrcArray + if srcArray is None: + psrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + cdef cydriver.CUarray cydstArray + if dstArray is None: + pdstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + with nogil: + err = cydriver.cuMemcpyAtoA(cydstArray, dstOffset, cysrcArray, srcOffset, ByteCount) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): + """ Copies memory for 2D arrays. + + Perform a 2D memory copy according to the parameters specified in + `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the + type of memory of the source and destination, respectively; + :py:obj:`~.CUmemorytype_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.srcArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base + address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device) + base address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.srcArray` specifies the handle of the source data. + :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are + ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base + address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.dstArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device) + base address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.dstArray` specifies the handle of the destination data. + :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are + ignored. + + - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address + of the source data for the copy. + + For host pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address + of the destination data for the copy. + + For host pointers, the base address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in + bytes) and height of the 2D copy being performed. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + :py:obj:`~.cuMemcpy2D()` returns an error if any pitch is greater than + the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`). + :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with + :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to + device, CUDA array to device, CUDA array to CUDA array), + :py:obj:`~.cuMemcpy2D()` may fail for pitches not computed by + :py:obj:`~.cuMemAllocPitch()`. :py:obj:`~.cuMemcpy2DUnaligned()` does + not have this restriction, but may run significantly slower in the + cases where :py:obj:`~.cuMemcpy2D()` would have returned an error code. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY2D` + Parameters for the memory copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` + """ + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy2D(cypCopy_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): + """ Copies memory for 2D arrays. + + Perform a 2D memory copy according to the parameters specified in + `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the + type of memory of the source and destination, respectively; + :py:obj:`~.CUmemorytype_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.srcArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base + address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device) + base address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.srcArray` specifies the handle of the source data. + :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are + ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.dstArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base + address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device) + base address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.dstArray` specifies the handle of the destination data. + :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are + ignored. + + - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address + of the source data for the copy. + + For host pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address + of the destination data for the copy. + + For host pointers, the base address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in + bytes) and height of the 2D copy being performed. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + :py:obj:`~.cuMemcpy2D()` returns an error if any pitch is greater than + the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`). + :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with + :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to + device, CUDA array to device, CUDA array to CUDA array), + :py:obj:`~.cuMemcpy2D()` may fail for pitches not computed by + :py:obj:`~.cuMemAllocPitch()`. :py:obj:`~.cuMemcpy2DUnaligned()` does + not have this restriction, but may run significantly slower in the + cases where :py:obj:`~.cuMemcpy2D()` would have returned an error code. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY2D` + Parameters for the memory copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` + """ + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): + """ Copies memory for 3D arrays. + + Perform a 3D memory copy according to the parameters specified in + `pCopy`. The :py:obj:`~.CUDA_MEMCPY3D` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the + type of memory of the source and destination, respectively; + :py:obj:`~.CUmemorytype_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.srcArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.srcHost`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight` + specify the (host) base address of the source data, the bytes per row, + and the height of each 2D slice of the 3D array. :py:obj:`~.srcArray` + is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight` + specify the (device) base address of the source data, the bytes per + row, and the height of each 2D slice of the 3D array. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.srcArray` specifies the handle of the source data. + :py:obj:`~.srcHost`, :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and + :py:obj:`~.srcHeight` are ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.dstArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base + address of the destination data, the bytes per row, and the height of + each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device) + base address of the destination data, the bytes per row, and the height + of each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.dstArray` specifies the handle of the destination data. + :py:obj:`~.dstHost`, :py:obj:`~.dstDevice`, :py:obj:`~.dstPitch` and + :py:obj:`~.dstHeight` are ignored. + + - :py:obj:`~.srcXInBytes`, :py:obj:`~.srcY` and :py:obj:`~.srcZ` + specify the base address of the source data for the copy. + + For host pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by + the array element size. + + - dstXInBytes, :py:obj:`~.dstY` and :py:obj:`~.dstZ` specify the base + address of the destination data for the copy. + + For host pointers, the base address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.WidthInBytes`, :py:obj:`~.Height` and :py:obj:`~.Depth` + specify the width (in bytes), height and depth of the 3D copy being + performed. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + - If specified, :py:obj:`~.srcHeight` must be greater than or equal to + :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must + be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`. + + :py:obj:`~.cuMemcpy3D()` returns an error if any pitch is greater than + the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`). + + The :py:obj:`~.srcLOD` and :py:obj:`~.dstLOD` members of the + :py:obj:`~.CUDA_MEMCPY3D` structure must be set to 0. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY3D` + Parameters for the memory copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D` + """ + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy3D(cypCopy_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): + """ Copies memory between contexts. + + Perform a 3D memory copy according to the parameters specified in + `pCopy`. See the definition of the :py:obj:`~.CUDA_MEMCPY3D_PEER` + structure for documentation of its parameters. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY3D_PEER` + Parameters for the memory copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer` + """ + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyAsync(dst, src, size_t ByteCount, hStream): + """ Copies memory asynchronously. + + Copies data between two pointers. `dst` and `src` are base pointers of + the destination and source, respectively. `ByteCount` specifies the + number of bytes to copy. Note that this function infers the type of the + transfer (host to host, host to device, device to device, or device to + host) from the pointer values. This function is only allowed in + contexts which support unified addressing. + + Parameters + ---------- + dst : :py:obj:`~.CUdeviceptr` + Destination unified virtual address space pointer + src : :py:obj:`~.CUdeviceptr` + Source unified virtual address space pointer + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cysrc + if src is None: + psrc = 0 + elif isinstance(src, (CUdeviceptr,)): + psrc = int(src) + else: + psrc = int(CUdeviceptr(src)) + cysrc = psrc + cdef cydriver.CUdeviceptr cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (CUdeviceptr,)): + pdst = int(dst) + else: + pdst = int(CUdeviceptr(dst)) + cydst = pdst + with nogil: + err = cydriver.cuMemcpyAsync(cydst, cysrc, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream): + """ Copies device memory between two contexts asynchronously. + + Copies from device memory in one context to device memory in another + context. `dstDevice` is the base device pointer of the destination + memory and `dstContext` is the destination context. `srcDevice` is the + base device pointer of the source memory and `srcContext` is the source + pointer. `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstContext : :py:obj:`~.CUcontext` + Destination context + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + srcContext : :py:obj:`~.CUcontext` + Source context + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpy3DPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpyPeerAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUcontext cysrcContext + if srcContext is None: + psrcContext = 0 + elif isinstance(srcContext, (CUcontext,)): + psrcContext = int(srcContext) + else: + psrcContext = int(CUcontext(srcContext)) + cysrcContext = psrcContext + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cdef cydriver.CUcontext cydstContext + if dstContext is None: + pdstContext = 0 + elif isinstance(dstContext, (CUcontext,)): + pdstContext = int(dstContext) + else: + pdstContext = int(CUcontext(dstContext)) + cydstContext = pdstContext + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemcpyPeerAsync(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream): + """ Copies memory from Host to Device. + + Copies from host memory to device memory. `dstDevice` and `srcHost` are + the base addresses of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + srcHost : Any + Source host pointer + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + cysrcHost = _HelperInputVoidPtr(srcHost) + cdef void* cysrcHost_ptr = cysrcHost.cptr + with nogil: + err = cydriver.cuMemcpyHtoDAsync(cydstDevice, cysrcHost_ptr, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream): + """ Copies memory from Device to Host. + + Copies from device to host memory. `dstHost` and `srcDevice` specify + the base pointers of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstHost : Any + Destination host pointer + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cydstHost = _HelperInputVoidPtr(dstHost) + cdef void* cydstHost_ptr = cydstHost.cptr + with nogil: + err = cydriver.cuMemcpyDtoHAsync(cydstHost_ptr, cysrcDevice, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream): + """ Copies memory from Device to Device. + + Copies from device memory to device memory. `dstDevice` and `srcDevice` + are the base pointers of the destination and source, respectively. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + srcDevice : :py:obj:`~.CUdeviceptr` + Source device pointer + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdeviceptr,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdeviceptr(srcDevice)) + cysrcDevice = psrcDevice + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemcpyDtoDAsync(cydstDevice, cysrcDevice, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream): + """ Copies memory from Host to Array. + + Copies from host memory to a 1D CUDA array. `dstArray` and `dstOffset` + specify the CUDA array handle and starting offset in bytes of the + destination data. `srcHost` specifies the base address of the source. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstArray : :py:obj:`~.CUarray` + Destination array + dstOffset : size_t + Offset in bytes of destination array + srcHost : Any + Source host pointer + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyToArrayAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUarray cydstArray + if dstArray is None: + pdstArray = 0 + elif isinstance(dstArray, (CUarray,)): + pdstArray = int(dstArray) + else: + pdstArray = int(CUarray(dstArray)) + cydstArray = pdstArray + cysrcHost = _HelperInputVoidPtr(srcHost) + cdef void* cysrcHost_ptr = cysrcHost.cptr + with nogil: + err = cydriver.cuMemcpyHtoAAsync(cydstArray, dstOffset, cysrcHost_ptr, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream): + """ Copies memory from Array to Host. + + Copies from one 1D CUDA array to host memory. `dstHost` specifies the + base pointer of the destination. `srcArray` and `srcOffset` specify the + CUDA array handle and starting offset in bytes of the source data. + `ByteCount` specifies the number of bytes to copy. + + Parameters + ---------- + dstHost : Any + Destination pointer + srcArray : :py:obj:`~.CUarray` + Source array + srcOffset : size_t + Offset in bytes of source array + ByteCount : size_t + Size of memory copy in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpyFromArrayAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUarray cysrcArray + if srcArray is None: + psrcArray = 0 + elif isinstance(srcArray, (CUarray,)): + psrcArray = int(srcArray) + else: + psrcArray = int(CUarray(srcArray)) + cysrcArray = psrcArray + cydstHost = _HelperInputVoidPtr(dstHost) + cdef void* cydstHost_ptr = cydstHost.cptr + with nogil: + err = cydriver.cuMemcpyAtoHAsync(cydstHost_ptr, cysrcArray, srcOffset, ByteCount, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): + """ Copies memory for 2D arrays. + + Perform a 2D memory copy according to the parameters specified in + `pCopy`. The :py:obj:`~.CUDA_MEMCPY2D` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the + type of memory of the source and destination, respectively; + :py:obj:`~.CUmemorytype_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.srcHost` and :py:obj:`~.srcPitch` specify the (host) base + address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.srcArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (device) + base address of the source data and the bytes per row to apply. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.srcArray` specifies the handle of the source data. + :py:obj:`~.srcHost`, :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` are + ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.dstArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base + address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device) + base address of the destination data and the bytes per row to apply. + :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.dstArray` specifies the handle of the destination data. + :py:obj:`~.dstHost`, :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` are + ignored. + + - :py:obj:`~.srcXInBytes` and :py:obj:`~.srcY` specify the base address + of the source data for the copy. + + For host pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.dstXInBytes` and :py:obj:`~.dstY` specify the base address + of the destination data for the copy. + + For host pointers, the base address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.WidthInBytes` and :py:obj:`~.Height` specify the width (in + bytes) and height of the 2D copy being performed. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + - If specified, :py:obj:`~.srcHeight` must be greater than or equal to + :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must + be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`. + + :py:obj:`~.cuMemcpy2DAsync()` returns an error if any pitch is greater + than the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`). + :py:obj:`~.cuMemAllocPitch()` passes back pitches that always work with + :py:obj:`~.cuMemcpy2D()`. On intra-device memory copies (device to + device, CUDA array to device, CUDA array to CUDA array), + :py:obj:`~.cuMemcpy2DAsync()` may fail for pitches not computed by + :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY2D` + Parameters for the memory copy + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): + """ Copies memory for 3D arrays. + + Perform a 3D memory copy according to the parameters specified in + `pCopy`. The :py:obj:`~.CUDA_MEMCPY3D` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.srcMemoryType` and :py:obj:`~.dstMemoryType` specify the + type of memory of the source and destination, respectively; + :py:obj:`~.CUmemorytype_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.srcDevice` and :py:obj:`~.srcPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.srcArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.srcHost`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight` + specify the (host) base address of the source data, the bytes per row, + and the height of each 2D slice of the 3D array. :py:obj:`~.srcArray` + is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and :py:obj:`~.srcHeight` + specify the (device) base address of the source data, the bytes per + row, and the height of each 2D slice of the 3D array. + :py:obj:`~.srcArray` is ignored. + + If :py:obj:`~.srcMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.srcArray` specifies the handle of the source data. + :py:obj:`~.srcHost`, :py:obj:`~.srcDevice`, :py:obj:`~.srcPitch` and + :py:obj:`~.srcHeight` are ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_UNIFIED`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (unified + virtual address space) base address of the source data and the bytes + per row to apply. :py:obj:`~.dstArray` is ignored. This value may be + used only if unified addressing is supported in the calling context. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_HOST`, + :py:obj:`~.dstHost` and :py:obj:`~.dstPitch` specify the (host) base + address of the destination data, the bytes per row, and the height of + each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_DEVICE`, + :py:obj:`~.dstDevice` and :py:obj:`~.dstPitch` specify the (device) + base address of the destination data, the bytes per row, and the height + of each 2D slice of the 3D array. :py:obj:`~.dstArray` is ignored. + + If :py:obj:`~.dstMemoryType` is :py:obj:`~.CU_MEMORYTYPE_ARRAY`, + :py:obj:`~.dstArray` specifies the handle of the destination data. + :py:obj:`~.dstHost`, :py:obj:`~.dstDevice`, :py:obj:`~.dstPitch` and + :py:obj:`~.dstHeight` are ignored. + + - :py:obj:`~.srcXInBytes`, :py:obj:`~.srcY` and :py:obj:`~.srcZ` + specify the base address of the source data for the copy. + + For host pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.srcXInBytes` must be evenly divisible by + the array element size. + + - dstXInBytes, :py:obj:`~.dstY` and :py:obj:`~.dstZ` specify the base + address of the destination data for the copy. + + For host pointers, the base address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For device pointers, the starting address is + + **View CUDA Toolkit Documentation for a C++ code example** + + For CUDA arrays, :py:obj:`~.dstXInBytes` must be evenly divisible by + the array element size. + + - :py:obj:`~.WidthInBytes`, :py:obj:`~.Height` and :py:obj:`~.Depth` + specify the width (in bytes), height and depth of the 3D copy being + performed. + + - If specified, :py:obj:`~.srcPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + :py:obj:`~.srcXInBytes`, and + :py:obj:`~.dstPitch` must be greater than or equal to + :py:obj:`~.WidthInBytes` + dstXInBytes. + + - If specified, :py:obj:`~.srcHeight` must be greater than or equal to + :py:obj:`~.Height` + :py:obj:`~.srcY`, and :py:obj:`~.dstHeight` must + be greater than or equal to :py:obj:`~.Height` + :py:obj:`~.dstY`. + + :py:obj:`~.cuMemcpy3DAsync()` returns an error if any pitch is greater + than the maximum allowed (:py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_PITCH`). + + The :py:obj:`~.srcLOD` and :py:obj:`~.dstLOD` members of the + :py:obj:`~.CUDA_MEMCPY3D` structure must be set to 0. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY3D` + Parameters for the memory copy + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemcpy3DAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): + """ Copies memory between contexts asynchronously. + + Perform a 3D memory copy according to the parameters specified in + `pCopy`. See the definition of the :py:obj:`~.CUDA_MEMCPY3D_PEER` + structure for documentation of its parameters. + + Parameters + ---------- + pCopy : :py:obj:`~.CUDA_MEMCPY3D_PEER` + Parameters for the memory copy + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL + with nogil: + err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemcpyBatchAsync(dsts : Optional[tuple[CUdeviceptr] | list[CUdeviceptr]], srcs : Optional[tuple[CUdeviceptr] | list[CUdeviceptr]], sizes : tuple[int] | list[int], size_t count, attrs : Optional[tuple[CUmemcpyAttributes] | list[CUmemcpyAttributes]], attrsIdxs : tuple[int] | list[int], size_t numAttrs, hStream): + """ Performs a batch of memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. This API only supports pointer-to-pointer copies. + For copies involving CUDA arrays, please see + :py:obj:`~.cuMemcpy3DBatchAsync`. + + Performs memory copies from source buffers specified in `srcs` to + destination buffers specified in `dsts`. The size of each copy is + specified in `sizes`. All three arrays must be of the same length as + specified by `count`. Since there are no ordering guarantees for copies + within a batch, specifying any dependent copies within a batch will + result in undefined behavior. + + Every copy in the batch has to be associated with a set of attributes + specified in the `attrs` array. Each entry in this array can apply to + more than one copy. This can be done by specifying in the `attrsIdxs` + array, the index of the first copy that the corresponding entry in the + `attrs` array applies to. Both `attrs` and `attrsIdxs` must be of the + same length as specified by `numAttrs`. For example, if a batch has 10 + copies listed in dst/src/sizes, the first 6 of which have one set of + attributes and the remaining 4 another, then `numAttrs` will be 2, + `attrsIdxs` will be {0, 6} and `attrs` will contains the two sets of + attributes. Note that the first entry in `attrsIdxs` must always be 0. + Also, each entry must be greater than the previous entry and the last + entry should be less than `count`. Furthermore, `numAttrs` must be + lesser than or equal to `count`. + + The :py:obj:`~.CUmemcpyAttributes.srcAccessOrder` indicates the source + access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL` then it + indicates that access to the source pointer can be out of stream order + and all accesses must be complete before the API call returns. This + flag is suited for ephemeral sources (ex., stack variables) when it's + known that no prior operations in the stream can be accessing the + memory and also that the lifetime of the memory is limited to the scope + that the source variable was declared in. Specifying this flag allows + the driver to optimize the copy and removes the need for the user to + synchronize the stream after the API call. If the source access order + is set to :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_ANY` then it indicates + that access to the source pointer can be out of stream order and the + accesses can happen even after the API call returns. This flag is + suited for host pointers allocated outside CUDA (ex., via malloc) when + it's known that no prior operations in the stream can be accessing the + memory. Specifying this flag allows the driver to optimize the copy on + certain platforms. Each memcpy operation in the batch must have a valid + :py:obj:`~.CUmemcpyAttributes` corresponding to it including the + appropriate srcAccessOrder setting, otherwise the API will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + The :py:obj:`~.CUmemcpyAttributes.srcLocHint` and + :py:obj:`~.CUmemcpyAttributes.dstLocHint` allows applications to + specify hint locations for operands of a copy when the operand doesn't + have a fixed location. That is, these hints are only applicable for + managed memory pointers on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is true or + system-allocated pageable memory on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` is true. For + other cases, these hints are ignored. + + The :py:obj:`~.CUmemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE` flag indicates + that the associated copies should preferably overlap with any compute + work. Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + dsts : list[:py:obj:`~.CUdeviceptr`] + Array of destination pointers. + srcs : list[:py:obj:`~.CUdeviceptr`] + Array of memcpy source pointers. + sizes : list[int] + Array of sizes for memcpy operations. + count : size_t + Size of `dsts`, `srcs` and `sizes` arrays + attrs : list[:py:obj:`~.CUmemcpyAttributes`] + Array of memcpy attributes. + attrsIdxs : list[int] + Array of indices to specify which copies each entry in the `attrs` + array applies to. The attributes specified in attrs[k] will be + applied to copies starting from attrsIdxs[k] through attrsIdxs[k+1] + - 1. Also attrs[numAttrs-1] will apply to copies starting from + attrsIdxs[numAttrs-1] through count - 1. + numAttrs : size_t + Size of `attrs` and `attrsIdxs` arrays. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be legacy NULL + stream. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + if not all(isinstance(_x, (int)) for _x in attrsIdxs): + raise TypeError("Argument 'attrsIdxs' is not instance of type (expected tuple[int] or list[int]") + attrs = [] if attrs is None else attrs + if not all(isinstance(_x, (CUmemcpyAttributes,)) for _x in attrs): + raise TypeError("Argument 'attrs' is not instance of type (expected tuple[cydriver.CUmemcpyAttributes,] or list[cydriver.CUmemcpyAttributes,]") + if not all(isinstance(_x, (int)) for _x in sizes): + raise TypeError("Argument 'sizes' is not instance of type (expected tuple[int] or list[int]") + srcs = [] if srcs is None else srcs + if not all(isinstance(_x, (CUdeviceptr,)) for _x in srcs): + raise TypeError("Argument 'srcs' is not instance of type (expected tuple[cydriver.CUdeviceptr,] or list[cydriver.CUdeviceptr,]") + dsts = [] if dsts is None else dsts + if not all(isinstance(_x, (CUdeviceptr,)) for _x in dsts): + raise TypeError("Argument 'dsts' is not instance of type (expected tuple[cydriver.CUdeviceptr,] or list[cydriver.CUdeviceptr,]") + cdef cydriver.CUdeviceptr* cydsts = NULL + if len(dsts) > 1: + cydsts = calloc(len(dsts), sizeof(cydriver.CUdeviceptr)) + if cydsts is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dsts)) + 'x' + str(sizeof(cydriver.CUdeviceptr))) + else: + for idx in range(len(dsts)): + cydsts[idx] = (dsts[idx])._pvt_ptr[0] + elif len(dsts) == 1: + cydsts = (dsts[0])._pvt_ptr + cdef cydriver.CUdeviceptr* cysrcs = NULL + if len(srcs) > 1: + cysrcs = calloc(len(srcs), sizeof(cydriver.CUdeviceptr)) + if cysrcs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(srcs)) + 'x' + str(sizeof(cydriver.CUdeviceptr))) + else: + for idx in range(len(srcs)): + cysrcs[idx] = (srcs[idx])._pvt_ptr[0] + elif len(srcs) == 1: + cysrcs = (srcs[0])._pvt_ptr + cdef vector[size_t] cysizes = sizes + if count > len(dsts): raise RuntimeError("List is too small: " + str(len(dsts)) + " < " + str(count)) + if count > len(srcs): raise RuntimeError("List is too small: " + str(len(srcs)) + " < " + str(count)) + if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) + cdef cydriver.CUmemcpyAttributes* cyattrs = NULL + if len(attrs) > 1: + cyattrs = calloc(len(attrs), sizeof(cydriver.CUmemcpyAttributes)) + if cyattrs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(attrs)) + 'x' + str(sizeof(cydriver.CUmemcpyAttributes))) + for idx in range(len(attrs)): + string.memcpy(&cyattrs[idx], (attrs[idx])._pvt_ptr, sizeof(cydriver.CUmemcpyAttributes)) + elif len(attrs) == 1: + cyattrs = (attrs[0])._pvt_ptr + cdef vector[size_t] cyattrsIdxs = attrsIdxs + if numAttrs > len(attrs): raise RuntimeError("List is too small: " + str(len(attrs)) + " < " + str(numAttrs)) + if numAttrs > len(attrsIdxs): raise RuntimeError("List is too small: " + str(len(attrsIdxs)) + " < " + str(numAttrs)) + cdef size_t failIdx = 0 + with nogil: + err = cydriver.cuMemcpyBatchAsync(cydsts, cysrcs, cysizes.data(), count, cyattrs, cyattrsIdxs.data(), numAttrs, &failIdx, cyhStream) + if len(dsts) > 1 and cydsts is not NULL: + free(cydsts) + if len(srcs) > 1 and cysrcs is not NULL: + free(cysrcs) + if len(attrs) > 1 and cyattrs is not NULL: + free(cyattrs) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], failIdx) + +@cython.embedsignature(True) +def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[CUDA_MEMCPY3D_BATCH_OP] | list[CUDA_MEMCPY3D_BATCH_OP]], unsigned long long flags, hStream): + """ Performs a batch of 3D memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. Note that this means specifying any dependent + copies within a batch will result in undefined behavior. + + Performs memory copies as specified in the `opList` array. The length + of this array is specified in `numOps`. Each entry in this array + describes a copy operation. This includes among other things, the + source and destination operands for the copy as specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.src` and + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.dst` respectively. The source and + destination operands of a copy can either be a pointer or a CUDA array. + The width, height and depth of a copy is specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.extent`. The width, height and depth + of a copy are specified in elements and must not be zero. For pointer- + to-pointer copies, the element size is considered to be 1. For pointer + to CUDA array or vice versa copies, the element size is determined by + the CUDA array. For CUDA array to CUDA array copies, the element size + of the two CUDA arrays must match. + + For a given operand, if :py:obj:`~.CUmemcpy3DOperand`::type is + specified as :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_POINTER`, then + :py:obj:`~.CUmemcpy3DOperand`::op::ptr will be used. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::ptr field must contain the + pointer where the copy should begin. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::rowLength field specifies the + length of each row in elements and must either be zero or be greater + than or equal to the width of the copy specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::width. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::layerHeight field specifies the + height of each layer and must either be zero or be greater than or + equal to the height of the copy specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::height. When either of + these values is zero, that aspect of the operand is considered to be + tightly packed according to the copy extent. For managed memory + pointers on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is true or + system-allocated pageable memory on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` is true, the + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::locHint field can be used to + hint the location of the operand. + + If an operand's type is specified as + :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_ARRAY`, then + :py:obj:`~.CUmemcpy3DOperand`::op::array will be used. The + :py:obj:`~.CUmemcpy3DOperand`::op::array::array field specifies the + CUDA array and :py:obj:`~.CUmemcpy3DOperand`::op::array::offset + specifies the 3D offset into that array where the copy begins. + + The :py:obj:`~.CUmemcpyAttributes.srcAccessOrder` indicates the source + access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL` then it + indicates that access to the source pointer can be out of stream order + and all accesses must be complete before the API call returns. This + flag is suited for ephemeral sources (ex., stack variables) when it's + known that no prior operations in the stream can be accessing the + memory and also that the lifetime of the memory is limited to the scope + that the source variable was declared in. Specifying this flag allows + the driver to optimize the copy and removes the need for the user to + synchronize the stream after the API call. If the source access order + is set to :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_ANY` then it indicates + that access to the source pointer can be out of stream order and the + accesses can happen even after the API call returns. This flag is + suited for host pointers allocated outside CUDA (ex., via malloc) when + it's known that no prior operations in the stream can be accessing the + memory. Specifying this flag allows the driver to optimize the copy on + certain platforms. Each memcopy operation in `opList` must have a valid + srcAccessOrder setting, otherwise this API will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + The :py:obj:`~.CUmemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE` flag indicates + that the associated copies should preferably overlap with any compute + work. Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + numOps : size_t + Total number of memcpy operations. + opList : list[:py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`] + Array of size `numOps` containing the actual memcpy operations. + flags : unsigned long long + Flags for future use, must be zero now. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be default NULL + stream. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + opList = [] if opList is None else opList + if not all(isinstance(_x, (CUDA_MEMCPY3D_BATCH_OP,)) for _x in opList): + raise TypeError("Argument 'opList' is not instance of type (expected tuple[cydriver.CUDA_MEMCPY3D_BATCH_OP,] or list[cydriver.CUDA_MEMCPY3D_BATCH_OP,]") + if numOps > len(opList): raise RuntimeError("List is too small: " + str(len(opList)) + " < " + str(numOps)) + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP* cyopList = NULL + if len(opList) > 1: + cyopList = calloc(len(opList), sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP)) + if cyopList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(opList)) + 'x' + str(sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP))) + for idx in range(len(opList)): + string.memcpy(&cyopList[idx], (opList[idx])._pvt_ptr, sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP)) + elif len(opList) == 1: + cyopList = (opList[0])._pvt_ptr + cdef size_t failIdx = 0 + with nogil: + err = cydriver.cuMemcpy3DBatchAsync(numOps, cyopList, &failIdx, flags, cyhStream) + if len(opList) > 1 and cyopList is not NULL: + free(cyopList) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], failIdx) + +@cython.embedsignature(True) +def cuMemsetD8(dstDevice, unsigned char uc, size_t N): + """ Initializes device memory. + + Sets the memory range of `N` 8-bit values to the specified value `uc`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + uc : unsigned char + Value to set + N : size_t + Number of elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD8(cydstDevice, uc, N) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD16(dstDevice, unsigned short us, size_t N): + """ Initializes device memory. + + Sets the memory range of `N` 16-bit values to the specified value `us`. + The `dstDevice` pointer must be two byte aligned. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + us : unsigned short + Value to set + N : size_t + Number of elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD16(cydstDevice, us, N) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD32(dstDevice, unsigned int ui, size_t N): + """ Initializes device memory. + + Sets the memory range of `N` 32-bit values to the specified value `ui`. + The `dstDevice` pointer must be four byte aligned. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + ui : unsigned int + Value to set + N : size_t + Number of elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD32(cydstDevice, ui, N) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height): + """ Initializes device memory. + + Sets the 2D memory range of `Width` 8-bit values to the specified value + `uc`. `Height` specifies the number of rows to set, and `dstPitch` + specifies the number of bytes between each row. This function performs + fastest when the pitch is one that has been passed back by + :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + uc : unsigned char + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D8(cydstDevice, dstPitch, uc, Width, Height) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height): + """ Initializes device memory. + + Sets the 2D memory range of `Width` 16-bit values to the specified + value `us`. `Height` specifies the number of rows to set, and + `dstPitch` specifies the number of bytes between each row. The + `dstDevice` pointer and `dstPitch` offset must be two byte aligned. + This function performs fastest when the pitch is one that has been + passed back by :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + us : unsigned short + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D16(cydstDevice, dstPitch, us, Width, Height) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height): + """ Initializes device memory. + + Sets the 2D memory range of `Width` 32-bit values to the specified + value `ui`. `Height` specifies the number of rows to set, and + `dstPitch` specifies the number of bytes between each row. The + `dstDevice` pointer and `dstPitch` offset must be four byte aligned. + This function performs fastest when the pitch is one that has been + passed back by :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + ui : unsigned int + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2D` + """ + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D32(cydstDevice, dstPitch, ui, Width, Height) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream): + """ Sets device memory. + + Sets the memory range of `N` 8-bit values to the specified value `uc`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + uc : unsigned char + Value to set + N : size_t + Number of elements + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemsetAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD8Async(cydstDevice, uc, N, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream): + """ Sets device memory. + + Sets the memory range of `N` 16-bit values to the specified value `us`. + The `dstDevice` pointer must be two byte aligned. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + us : unsigned short + Value to set + N : size_t + Number of elements + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemsetAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD16Async(cydstDevice, us, N, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream): + """ Sets device memory. + + Sets the memory range of `N` 32-bit values to the specified value `ui`. + The `dstDevice` pointer must be four byte aligned. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + ui : unsigned int + Value to set + N : size_t + Number of elements + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemsetAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD32Async(cydstDevice, ui, N, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream): + """ Sets device memory. + + Sets the 2D memory range of `Width` 8-bit values to the specified value + `uc`. `Height` specifies the number of rows to set, and `dstPitch` + specifies the number of bytes between each row. This function performs + fastest when the pitch is one that has been passed back by + :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + uc : unsigned char + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D8Async(cydstDevice, dstPitch, uc, Width, Height, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream): + """ Sets device memory. + + Sets the 2D memory range of `Width` 16-bit values to the specified + value `us`. `Height` specifies the number of rows to set, and + `dstPitch` specifies the number of bytes between each row. The + `dstDevice` pointer and `dstPitch` offset must be two byte aligned. + This function performs fastest when the pitch is one that has been + passed back by :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + us : unsigned short + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD2D32Async`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D16Async(cydstDevice, dstPitch, us, Width, Height, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream): + """ Sets device memory. + + Sets the 2D memory range of `Width` 32-bit values to the specified + value `ui`. `Height` specifies the number of rows to set, and + `dstPitch` specifies the number of bytes between each row. The + `dstDevice` pointer and `dstPitch` offset must be four byte aligned. + This function performs fastest when the pitch is one that has been + passed back by :py:obj:`~.cuMemAllocPitch()`. + + Parameters + ---------- + dstDevice : :py:obj:`~.CUdeviceptr` + Destination device pointer + dstPitch : size_t + Pitch of destination device pointer(Unused if `Height` is 1) + ui : unsigned int + Value to set + Width : size_t + Width of row + Height : size_t + Number of rows + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuMemsetD32Async`, :py:obj:`~.cudaMemset2DAsync` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdeviceptr,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdeviceptr(dstDevice)) + cydstDevice = pdstDevice + with nogil: + err = cydriver.cuMemsetD2D32Async(cydstDevice, dstPitch, ui, Width, Height, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): + """ Creates a 1D or 2D CUDA array. + + Creates a CUDA array according to the :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` + structure `pAllocateArray` and returns a handle to the new CUDA array + in `*pHandle`. The :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - `Width`, and `Height` are the width, and height of the CUDA array (in + elements); the CUDA array is one-dimensional if height is 0, two- + dimensional otherwise; + + - :py:obj:`~.Format` specifies the format of the elements; + :py:obj:`~.CUarray_format` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `NumChannels` specifies the number of packed components per CUDA + array element; it may be 1, 2, or 4; + + Here are examples of CUDA array descriptions: + + Description for a CUDA array of 2048 floats: + + **View CUDA Toolkit Documentation for a C++ code example** + + Description for a 64 x 64 CUDA array of floats: + + **View CUDA Toolkit Documentation for a C++ code example** + + Description for a `width` x `height` CUDA array of 64-bit, 4x16-bit + float16's: + + **View CUDA Toolkit Documentation for a C++ code example** + + Description for a `width` x `height` CUDA array of 16-bit elements, + each of which is two 8-bit unsigned chars: + + **View CUDA Toolkit Documentation for a C++ code example** + + Parameters + ---------- + pAllocateArray : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` + Array descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pHandle : :py:obj:`~.CUarray` + Returned array + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray` + """ + cdef CUarray pHandle = CUarray() + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + with nogil: + err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle) + +@cython.embedsignature(True) +def cuArrayGetDescriptor(hArray): + """ Get a 1D or 2D CUDA array descriptor. + + Returns in `*pArrayDescriptor` a descriptor containing information on + the format and dimensions of the CUDA array `hArray`. It is useful for + subroutines that have been passed a CUDA array, but need to know the + CUDA array parameters for validation or other purposes. + + Parameters + ---------- + hArray : :py:obj:`~.CUarray` + Array to get descriptor of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + pArrayDescriptor : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` + Returned array descriptor + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaArrayGetInfo` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR() + with nogil: + err = cydriver.cuArrayGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pArrayDescriptor) + +@cython.embedsignature(True) +def cuArrayGetSparseProperties(array): + """ Returns the layout properties of a sparse CUDA array. + + Returns the layout properties of a sparse CUDA array in + `sparseProperties` If the CUDA array is not allocated with flag + :py:obj:`~.CUDA_ARRAY3D_SPARSE` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + will be returned. + + If the returned value in :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` + contains :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`, then + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` represents the + total size of the array. Otherwise, it will be zero. Also, the returned + value in :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailFirstLevel` is + always zero. Note that the `array` must have been allocated using + :py:obj:`~.cuArrayCreate` or :py:obj:`~.cuArray3DCreate`. For CUDA + arrays obtained using :py:obj:`~.cuMipmappedArrayGetLevel`, + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. Instead, + :py:obj:`~.cuMipmappedArrayGetSparseProperties` must be used to obtain + the sparse properties of the entire CUDA mipmapped array to which + `array` belongs to. + + Parameters + ---------- + array : :py:obj:`~.CUarray` + CUDA array to get the sparse properties of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + sparseProperties : :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES` + Pointer to :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES` + + See Also + -------- + :py:obj:`~.cuMipmappedArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cydriver.CUarray cyarray + if array is None: + parray = 0 + elif isinstance(array, (CUarray,)): + parray = int(array) + else: + parray = int(CUarray(array)) + cyarray = parray + cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES() + with nogil: + err = cydriver.cuArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], sparseProperties) + +@cython.embedsignature(True) +def cuMipmappedArrayGetSparseProperties(mipmap): + """ Returns the layout properties of a sparse CUDA mipmapped array. + + Returns the sparse array layout properties in `sparseProperties` If the + CUDA mipmapped array is not allocated with flag + :py:obj:`~.CUDA_ARRAY3D_SPARSE` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + will be returned. + + For non-layered CUDA mipmapped arrays, + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` returns the size + of the mip tail region. The mip tail region includes all mip levels + whose width, height or depth is less than that of the tile. For layered + CUDA mipmapped arrays, if + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` contains + :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL`, then + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` specifies the size + of the mip tail of all layers combined. Otherwise, + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` specifies mip tail + size per layer. The returned value of + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailFirstLevel` is valid + only if :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.miptailSize` is non- + zero. + + Parameters + ---------- + mipmap : :py:obj:`~.CUmipmappedArray` + CUDA mipmapped array to get the sparse properties of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + sparseProperties : :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES` + Pointer to :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES` + + See Also + -------- + :py:obj:`~.cuArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cydriver.CUmipmappedArray cymipmap + if mipmap is None: + pmipmap = 0 + elif isinstance(mipmap, (CUmipmappedArray,)): + pmipmap = int(mipmap) + else: + pmipmap = int(CUmipmappedArray(mipmap)) + cymipmap = pmipmap + cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES() + with nogil: + err = cydriver.cuMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], sparseProperties) + +@cython.embedsignature(True) +def cuArrayGetMemoryRequirements(array, device): + """ Returns the memory requirements of a CUDA array. + + Returns the memory requirements of a CUDA array in `memoryRequirements` + If the CUDA array is not allocated with flag + :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING` + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. + + The returned value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.size` + represents the total size of the CUDA array. The returned value in + :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.alignment` represents the + alignment necessary for mapping the CUDA array. + + Parameters + ---------- + array : :py:obj:`~.CUarray` + CUDA array to get the memory requirements of + device : :py:obj:`~.CUdevice` + Device to get the memory requirements for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + memoryRequirements : :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS` + Pointer to :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS` + + See Also + -------- + :py:obj:`~.cuMipmappedArrayGetMemoryRequirements`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef cydriver.CUarray cyarray + if array is None: + parray = 0 + elif isinstance(array, (CUarray,)): + parray = int(array) + else: + parray = int(CUarray(array)) + cyarray = parray + cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS() + with nogil: + err = cydriver.cuArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, cydevice) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], memoryRequirements) + +@cython.embedsignature(True) +def cuMipmappedArrayGetMemoryRequirements(mipmap, device): + """ Returns the memory requirements of a CUDA mipmapped array. + + Returns the memory requirements of a CUDA mipmapped array in + `memoryRequirements` If the CUDA mipmapped array is not allocated with + flag :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING` + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. + + The returned value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.size` + represents the total size of the CUDA mipmapped array. The returned + value in :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS.alignment` + represents the alignment necessary for mapping the CUDA mipmapped + array. + + Parameters + ---------- + mipmap : :py:obj:`~.CUmipmappedArray` + CUDA mipmapped array to get the memory requirements of + device : :py:obj:`~.CUdevice` + Device to get the memory requirements for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + memoryRequirements : :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS` + Pointer to :py:obj:`~.CUDA_ARRAY_MEMORY_REQUIREMENTS` + + See Also + -------- + :py:obj:`~.cuArrayGetMemoryRequirements`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef cydriver.CUmipmappedArray cymipmap + if mipmap is None: + pmipmap = 0 + elif isinstance(mipmap, (CUmipmappedArray,)): + pmipmap = int(mipmap) + else: + pmipmap = int(CUmipmappedArray(mipmap)) + cymipmap = pmipmap + cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS() + with nogil: + err = cydriver.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, cydevice) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], memoryRequirements) + +@cython.embedsignature(True) +def cuArrayGetPlane(hArray, unsigned int planeIdx): + """ Gets a CUDA array plane from a CUDA array. + + Returns in `pPlaneArray` a CUDA array that represents a single format + plane of the CUDA array `hArray`. + + If `planeIdx` is greater than the maximum number of planes in this + array or if the array does not have a multi-planar format e.g: + :py:obj:`~.CU_AD_FORMAT_NV12`, then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + Note that if the `hArray` has format :py:obj:`~.CU_AD_FORMAT_NV12`, + then passing in 0 for `planeIdx` returns a CUDA array of the same size + as `hArray` but with one channel and + :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT8` as its format. If 1 is passed + for `planeIdx`, then the returned CUDA array has half the height and + width of `hArray` with two channels and + :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT8` as its format. + + Parameters + ---------- + hArray : :py:obj:`~.CUarray` + Multiplanar CUDA array + planeIdx : unsigned int + Plane index + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + pPlaneArray : :py:obj:`~.CUarray` + Returned CUDA array referenced by the `planeIdx` + + See Also + -------- + :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaArrayGetPlane` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + cdef CUarray pPlaneArray = CUarray() + with nogil: + err = cydriver.cuArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pPlaneArray) + +@cython.embedsignature(True) +def cuArrayDestroy(hArray): + """ Destroys a CUDA array. + + Destroys the CUDA array `hArray`. + + Parameters + ---------- + hArray : :py:obj:`~.CUarray` + Array to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ARRAY_IS_MAPPED`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaFreeArray` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + with nogil: + err = cydriver.cuArrayDestroy(cyhArray) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): + """ Creates a 3D CUDA array. + + Creates a CUDA array according to the + :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` structure `pAllocateArray` and + returns a handle to the new CUDA array in `*pHandle`. The + :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - `Width`, `Height`, and `Depth` are the width, height, and depth of + the CUDA array (in elements); the following types of CUDA arrays can + be allocated: + + - A 1D array is allocated if `Height` and `Depth` extents are both + zero. + + - A 2D array is allocated if only `Depth` extent is zero. + + - A 3D array is allocated if all three extents are non-zero. + + - A 1D layered CUDA array is allocated if only `Height` is zero and + the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each layer is a + 1D array. The number of layers is determined by the depth extent. + + - A 2D layered CUDA array is allocated if all three extents are non- + zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each + layer is a 2D array. The number of layers is determined by the + depth extent. + + - A cubemap CUDA array is allocated if all three extents are non-zero + and the :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` flag is set. `Width` must + be equal to `Height`, and `Depth` must be six. A cubemap is a + special type of 2D layered CUDA array, where the six layers + represent the six faces of a cube. The order of the six layers in + memory is the same as that listed in + :py:obj:`~.CUarray_cubemap_face`. + + - A cubemap layered CUDA array is allocated if all three extents are + non-zero, and both, :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` and + :py:obj:`~.CUDA_ARRAY3D_LAYERED` flags are set. `Width` must be + equal to `Height`, and `Depth` must be a multiple of six. A cubemap + layered CUDA array is a special type of 2D layered CUDA array that + consists of a collection of cubemaps. The first six layers + represent the first cubemap, the next six layers form the second + cubemap, and so on. + + - :py:obj:`~.Format` specifies the format of the elements; + :py:obj:`~.CUarray_format` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `NumChannels` specifies the number of packed components per CUDA + array element; it may be 1, 2, or 4; + + - :py:obj:`~.Flags` may be set to + + - :py:obj:`~.CUDA_ARRAY3D_LAYERED` to enable creation of layered CUDA + arrays. If this flag is set, `Depth` specifies the number of + layers, not the depth of a 3D array. + + - :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` to enable surface references + to be bound to the CUDA array. If this flag is not set, + :py:obj:`~.cuSurfRefSetArray` will fail when attempting to bind the + CUDA array to a surface reference. + + - :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` to enable creation of cubemaps. If + this flag is set, `Width` must be equal to `Height`, and `Depth` + must be six. If the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is also + set, then `Depth` must be a multiple of six. + + - :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` to indicate that the CUDA + array will be used for texture gather. Texture gather can only be + performed on 2D CUDA arrays. + + `Width`, `Height` and `Depth` must meet certain size requirements as + listed in the following table. All values are specified in elements. + Note that for brevity's sake, the full name of the device attribute is + not specified. For ex., TEXTURE1D_WIDTH refers to the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH`. + + Note that 2D CUDA arrays have different size requirements if the + :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` flag is set. `Width` and + `Height` must not be greater than + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH` and + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT` + respectively, in that case. + + **View CUDA Toolkit Documentation for a table example** + + Here are examples of CUDA array descriptions: + + Description for a CUDA array of 2048 floats: + + **View CUDA Toolkit Documentation for a C++ code example** + + Description for a 64 x 64 CUDA array of floats: + + **View CUDA Toolkit Documentation for a C++ code example** + + Description for a `width` x `height` x `depth` CUDA array of 64-bit, + 4x16-bit float16's: + + **View CUDA Toolkit Documentation for a C++ code example** + + Parameters + ---------- + pAllocateArray : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` + 3D array descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pHandle : :py:obj:`~.CUarray` + Returned array + + See Also + -------- + :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray` + """ + cdef CUarray pHandle = CUarray() + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray is not None else NULL + with nogil: + err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle) + +@cython.embedsignature(True) +def cuArray3DGetDescriptor(hArray): + """ Get a 3D CUDA array descriptor. + + Returns in `*pArrayDescriptor` a descriptor containing information on + the format and dimensions of the CUDA array `hArray`. It is useful for + subroutines that have been passed a CUDA array, but need to know the + CUDA array parameters for validation or other purposes. + + This function may be called on 1D and 2D arrays, in which case the + `Height` and/or `Depth` members of the descriptor struct will be set to + 0. + + Parameters + ---------- + hArray : :py:obj:`~.CUarray` + 3D array to get descriptor of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + pArrayDescriptor : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` + Returned 3D array descriptor + + See Also + -------- + :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaArrayGetInfo` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR() + with nogil: + err = cydriver.cuArray3DGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pArrayDescriptor) + +@cython.embedsignature(True) +def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTOR], unsigned int numMipmapLevels): + """ Creates a CUDA mipmapped array. + + Creates a CUDA mipmapped array according to the + :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` structure `pMipmappedArrayDesc` and + returns a handle to the new CUDA mipmapped array in `*pHandle`. + `numMipmapLevels` specifies the number of mipmap levels to be + allocated. This value is clamped to the range [1, 1 + + floor(log2(max(width, height, depth)))]. + + The :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - `Width`, `Height`, and `Depth` are the width, height, and depth of + the CUDA array (in elements); the following types of CUDA arrays can + be allocated: + + - A 1D mipmapped array is allocated if `Height` and `Depth` extents + are both zero. + + - A 2D mipmapped array is allocated if only `Depth` extent is zero. + + - A 3D mipmapped array is allocated if all three extents are non- + zero. + + - A 1D layered CUDA mipmapped array is allocated if only `Height` is + zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. Each + layer is a 1D array. The number of layers is determined by the + depth extent. + + - A 2D layered CUDA mipmapped array is allocated if all three extents + are non-zero and the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is set. + Each layer is a 2D array. The number of layers is determined by the + depth extent. + + - A cubemap CUDA mipmapped array is allocated if all three extents + are non-zero and the :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` flag is set. + `Width` must be equal to `Height`, and `Depth` must be six. A + cubemap is a special type of 2D layered CUDA array, where the six + layers represent the six faces of a cube. The order of the six + layers in memory is the same as that listed in + :py:obj:`~.CUarray_cubemap_face`. + + - A cubemap layered CUDA mipmapped array is allocated if all three + extents are non-zero, and both, :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` + and :py:obj:`~.CUDA_ARRAY3D_LAYERED` flags are set. `Width` must be + equal to `Height`, and `Depth` must be a multiple of six. A cubemap + layered CUDA array is a special type of 2D layered CUDA array that + consists of a collection of cubemaps. The first six layers + represent the first cubemap, the next six layers form the second + cubemap, and so on. + + - :py:obj:`~.Format` specifies the format of the elements; + :py:obj:`~.CUarray_format` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `NumChannels` specifies the number of packed components per CUDA + array element; it may be 1, 2, or 4; + + - :py:obj:`~.Flags` may be set to + + - :py:obj:`~.CUDA_ARRAY3D_LAYERED` to enable creation of layered CUDA + mipmapped arrays. If this flag is set, `Depth` specifies the number + of layers, not the depth of a 3D array. + + - :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` to enable surface references + to be bound to individual mipmap levels of the CUDA mipmapped + array. If this flag is not set, :py:obj:`~.cuSurfRefSetArray` will + fail when attempting to bind a mipmap level of the CUDA mipmapped + array to a surface reference. + + - :py:obj:`~.CUDA_ARRAY3D_CUBEMAP` to enable creation of mipmapped + cubemaps. If this flag is set, `Width` must be equal to `Height`, and + `Depth` must be six. If the :py:obj:`~.CUDA_ARRAY3D_LAYERED` flag is + also set, then `Depth` must be a multiple of six. + + - :py:obj:`~.CUDA_ARRAY3D_TEXTURE_GATHER` to indicate that the CUDA + mipmapped array will be used for texture gather. Texture gather can + only be performed on 2D CUDA mipmapped arrays. + + `Width`, `Height` and `Depth` must meet certain size requirements as + listed in the following table. All values are specified in elements. + Note that for brevity's sake, the full name of the device attribute is + not specified. For ex., TEXTURE1D_MIPMAPPED_WIDTH refers to the device + attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH`. + + **View CUDA Toolkit Documentation for a table example** + + Parameters + ---------- + pMipmappedArrayDesc : :py:obj:`~.CUDA_ARRAY3D_DESCRIPTOR` + mipmapped array descriptor + numMipmapLevels : unsigned int + Number of mipmap levels + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pHandle : :py:obj:`~.CUmipmappedArray` + Returned mipmapped array + + See Also + -------- + :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray` + """ + cdef CUmipmappedArray pHandle = CUmipmappedArray() + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc is not None else NULL + with nogil: + err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle) + +@cython.embedsignature(True) +def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level): + """ Gets a mipmap level of a CUDA mipmapped array. + + Returns in `*pLevelArray` a CUDA array that represents a single mipmap + level of the CUDA mipmapped array `hMipmappedArray`. + + If `level` is greater than the maximum number of levels in this + mipmapped array, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + Parameters + ---------- + hMipmappedArray : :py:obj:`~.CUmipmappedArray` + CUDA mipmapped array + level : unsigned int + Mipmap level + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + pLevelArray : :py:obj:`~.CUarray` + Returned mipmap level CUDA array + + See Also + -------- + :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaGetMipmappedArrayLevel` + """ + cdef cydriver.CUmipmappedArray cyhMipmappedArray + if hMipmappedArray is None: + phMipmappedArray = 0 + elif isinstance(hMipmappedArray, (CUmipmappedArray,)): + phMipmappedArray = int(hMipmappedArray) + else: + phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) + cyhMipmappedArray = phMipmappedArray + cdef CUarray pLevelArray = CUarray() + with nogil: + err = cydriver.cuMipmappedArrayGetLevel(pLevelArray._pvt_ptr, cyhMipmappedArray, level) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pLevelArray) + +@cython.embedsignature(True) +def cuMipmappedArrayDestroy(hMipmappedArray): + """ Destroys a CUDA mipmapped array. + + Destroys the CUDA mipmapped array `hMipmappedArray`. + + Parameters + ---------- + hMipmappedArray : :py:obj:`~.CUmipmappedArray` + Mipmapped array to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ARRAY_IS_MAPPED`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + + See Also + -------- + :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaFreeMipmappedArray` + """ + cdef cydriver.CUmipmappedArray cyhMipmappedArray + if hMipmappedArray is None: + phMipmappedArray = 0 + elif isinstance(hMipmappedArray, (CUmipmappedArray,)): + phMipmappedArray = int(hMipmappedArray) + else: + phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) + cyhMipmappedArray = phMipmappedArray + with nogil: + err = cydriver.cuMipmappedArrayDestroy(cyhMipmappedArray) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmemRangeHandleType, unsigned long long flags): + """ Retrieve handle for an address range. + + Get a handle of the specified type to an address range. The address + range must have been obtained by a prior call to either + :py:obj:`~.cuMemAlloc` or :py:obj:`~.cuMemAddressReserve`. If the + address range was obtained via :py:obj:`~.cuMemAddressReserve`, it must + also be fully mapped via :py:obj:`~.cuMemMap`. The address range must + have been obtained by a prior call to either :py:obj:`~.cuMemAllocHost` + or :py:obj:`~.cuMemHostAlloc` on Tegra. + + Users must ensure the `dptr` and `size` are aligned to the host page + size. + + When requesting + CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users are + expected to query for dma_buf support for the platform by using + :py:obj:`~.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED` device attribute + before calling this API. The `handle` will be interpreted as a pointer + to an integer to store the dma_buf file descriptor. Users must ensure + the entire address range is backed and mapped when the address range is + allocated by :py:obj:`~.cuMemAddressReserve`. All the physical + allocations backing the address range must be resident on the same + device and have identical allocation properties. Users are also + expected to retrieve a new handle every time the underlying physical + allocation(s) corresponding to a previously queried VA range are + changed. + + For CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users + may set flags to + :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`. Which when set + on a supported platform, will give a DMA_BUF handle mapped via PCIE + BAR1 or will return an error otherwise. + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + Pointer to a valid CUDA device allocation. Must be aligned to host + page size. + size : size_t + Length of the address range. Must be aligned to host page size. + handleType : :py:obj:`~.CUmemRangeHandleType` + Type of handle requested (defines type and size of the `handle` + output parameter) + flags : unsigned long long + When requesting + CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD the value + could be :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`, + otherwise 0. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + handle : Any + Pointer to the location where the returned handle will be stored. + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef int handle = 0 + cdef void* cyhandle_ptr = &handle + cdef cydriver.CUmemRangeHandleType cyhandleType = handleType.value + with nogil: + err = cydriver.cuMemGetHandleForAddressRange(cyhandle_ptr, cydptr, size, cyhandleType, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], handle) + +@cython.embedsignature(True) +def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], size_t count, unsigned int flags, stream): + """ Submit a batch of `count` independent decompression operations. + + Each of the `count` decompression operations is described by a single + entry in the `paramsArray` array. Once the batch has been submitted, + the function will return, and decompression will happen asynchronously + w.r.t. the CPU. To the work completion tracking mechanisms in the CUDA + driver, the batch will be considered a single unit of work and + processed according to stream semantics, i.e., it is not possible to + query the completion of individual decompression operations within a + batch. + + The memory pointed to by each of :py:obj:`~.CUmemDecompressParams.src`, + :py:obj:`~.CUmemDecompressParams.dst`, and + :py:obj:`~.CUmemDecompressParams.dstActBytes`, must be capable of usage + with the hardware decompress feature. That is, for each of said + pointers, the pointer attribute + :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MEM_DECOMPRESS_CAPABLE` should give + a non-zero value. To ensure this, the memory backing the pointers + should have been allocated using one of the following CUDA memory + allocators: + + - :py:obj:`~.cuMemAlloc()` + + - :py:obj:`~.cuMemCreate()` with the usage flag + :py:obj:`~.CU_MEM_CREATE_USAGE_HW_DECOMPRESS` + + - :py:obj:`~.cuMemAllocFromPoolAsync()` from a pool that was created + with the usage flag + :py:obj:`~.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS` Additionally, + :py:obj:`~.CUmemDecompressParams.src`, + :py:obj:`~.CUmemDecompressParams.dst`, and + :py:obj:`~.CUmemDecompressParams.dstActBytes`, must all be accessible + from the device associated with the context where `stream` was + created. For information on how to ensure this, see the documentation + for the allocator of interest. + + Parameters + ---------- + paramsArray : :py:obj:`~.CUmemDecompressParams` + The array of structures describing the independent decompression + operations. + count : size_t + The number of entries in `paramsArray` array. + flags : unsigned int + Must be 0. + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream where the work will be enqueued. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + errorIndex : int + The index into `paramsArray` of the decompression operation for + which the error returned by this function pertains to. If `index` + is SIZE_MAX and the value returned is not :py:obj:`~.CUDA_SUCCESS`, + then the error returned by this function should be considered a + general error that does not pertain to a particular decompression + operation. May be `NULL`, in which case, no index will be recorded + in the event of error. + + See Also + -------- + :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemAllocFromPoolAsync` + """ + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray is not None else NULL + cdef size_t errorIndex = 0 + with nogil: + err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], errorIndex) + +@cython.embedsignature(True) +def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags): + """ Allocate an address range reservation. + + Reserves a virtual address range based on the given parameters, giving + the starting address of the range in `ptr`. This API requires a system + that supports UVA. The size and address parameters must be a multiple + of the host page size and the alignment must be a power of two or zero + for default alignment. If `addr` is 0, then the driver chooses the + address at which to place the start of the reservation whereas when it + is non-zero then the driver treats it as a hint about where to place + the reservation. + + Parameters + ---------- + size : size_t + Size of the reserved virtual address range requested + alignment : size_t + Alignment of the reserved virtual address range requested + addr : :py:obj:`~.CUdeviceptr` + Hint address for the start of the address range + flags : unsigned long long + Currently unused, must be zero + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + ptr : :py:obj:`~.CUdeviceptr` + Resulting pointer to start of virtual address range allocated + + See Also + -------- + :py:obj:`~.cuMemAddressFree` + """ + cdef cydriver.CUdeviceptr cyaddr + if addr is None: + paddr = 0 + elif isinstance(addr, (CUdeviceptr,)): + paddr = int(addr) + else: + paddr = int(CUdeviceptr(addr)) + cyaddr = paddr + cdef CUdeviceptr ptr = CUdeviceptr() + with nogil: + err = cydriver.cuMemAddressReserve(ptr._pvt_ptr, size, alignment, cyaddr, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], ptr) + +@cython.embedsignature(True) +def cuMemAddressFree(ptr, size_t size): + """ Free an address range reservation. + + Frees a virtual address range reserved by cuMemAddressReserve. The size + must match what was given to memAddressReserve and the ptr given must + match what was returned from memAddressReserve. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + Starting address of the virtual address range to free + size : size_t + Size of the virtual address region to free + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMemAddressReserve` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + with nogil: + err = cydriver.cuMemAddressFree(cyptr, size) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long long flags): + """ Create a CUDA memory handle representing a memory allocation of a given size described by the given properties. + + This creates a memory allocation on the target device specified through + the `prop` structure. The created allocation will not have any device + or host mappings. The generic memory `handle` for the allocation can be + mapped to the address space of calling process via + :py:obj:`~.cuMemMap`. This handle cannot be transmitted directly to + other processes (see :py:obj:`~.cuMemExportToShareableHandle`). On + Windows, the caller must also pass an LPSECURITYATTRIBUTE in `prop` to + be associated with this handle which limits or allows access to this + handle for a recipient process (see + :py:obj:`~.CUmemAllocationProp.win32HandleMetaData` for more). The + `size` of this allocation must be a multiple of the the value given via + :py:obj:`~.cuMemGetAllocationGranularity` with the + :py:obj:`~.CU_MEM_ALLOC_GRANULARITY_MINIMUM` flag. To create a CPU + allocation targeting a specific host NUMA node, applications must set + :py:obj:`~.CUmemAllocationProp`::CUmemLocation::type to + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` and + :py:obj:`~.CUmemAllocationProp`::CUmemLocation::id must specify the + NUMA ID of the CPU. On systems where NUMA is not available + :py:obj:`~.CUmemAllocationProp`::CUmemLocation::id must be set to 0. + Specifying :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` as the + :py:obj:`~.CUmemLocation.type` will result in + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` + + If :py:obj:`~.CUmemAllocationProp`::allocFlags::usage contains + :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` flag then the memory + allocation is intended only to be used as backing tile pool for sparse + CUDA arrays and sparse CUDA mipmapped arrays. (see + :py:obj:`~.cuMemMapArrayAsync`). + + Parameters + ---------- + size : size_t + Size of the allocation requested + prop : :py:obj:`~.CUmemAllocationProp` + Properties of the allocation to create. + flags : unsigned long long + flags for future use, must be zero now. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + handle : :py:obj:`~.CUmemGenericAllocationHandle` + Value of handle returned. All operations on this allocation are to + be performed using this handle. + + See Also + -------- + :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` + """ + cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + with nogil: + err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], handle) + +@cython.embedsignature(True) +def cuMemRelease(handle): + """ Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate. + + Frees the memory that was allocated on a device through cuMemCreate. + + The memory allocation will be freed when all outstanding mappings to + the memory are unmapped and when all outstanding references to the + handle (including it's shareable counterparts) are also released. The + generic memory handle can be freed when there are still outstanding + mappings made with this handle. Each time a recipient process imports a + shareable handle, it needs to pair it with :py:obj:`~.cuMemRelease` for + the handle to be freed. If `handle` is not a valid handle the behavior + is undefined. + + Parameters + ---------- + handle : :py:obj:`~.CUmemGenericAllocationHandle` + Value of handle which was returned previously by cuMemCreate. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMemCreate` + """ + cdef cydriver.CUmemGenericAllocationHandle cyhandle + if handle is None: + phandle = 0 + elif isinstance(handle, (CUmemGenericAllocationHandle,)): + phandle = int(handle) + else: + phandle = int(CUmemGenericAllocationHandle(handle)) + cyhandle = phandle + with nogil: + err = cydriver.cuMemRelease(cyhandle) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags): + """ Maps an allocation handle to a reserved virtual address range. + + Maps bytes of memory represented by `handle` starting from byte + `offset` to `size` to address range [`addr`, `addr` + `size`]. This + range must be an address reservation previously reserved with + :py:obj:`~.cuMemAddressReserve`, and `offset` + `size` must be less + than the size of the memory allocation. Both `ptr`, `size`, and + `offset` must be a multiple of the value given via + :py:obj:`~.cuMemGetAllocationGranularity` with the + :py:obj:`~.CU_MEM_ALLOC_GRANULARITY_MINIMUM` flag. If `handle` + represents a multicast object, `ptr`, `size` and `offset` must be + aligned to the value returned by :py:obj:`~.cuMulticastGetGranularity` + with the flag :py:obj:`~.CU_MULTICAST_MINIMUM_GRANULARITY`. For best + performance however, it is recommended that `ptr`, `size` and `offset` + be aligned to the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_RECOMMENDED_GRANULARITY`. + + When `handle` represents a multicast object, this call may return + CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal + state. In such cases, to continue using multicast, verify that the + system configuration is in a valid state and all required driver + daemons are running properly. + + Please note calling :py:obj:`~.cuMemMap` does not make the address + accessible, the caller needs to update accessibility of a contiguous + mapped VA range by calling :py:obj:`~.cuMemSetAccess`. + + Once a recipient process obtains a shareable memory handle from + :py:obj:`~.cuMemImportFromShareableHandle`, the process must use + :py:obj:`~.cuMemMap` to map the memory into its address ranges before + setting accessibility with :py:obj:`~.cuMemSetAccess`. + + :py:obj:`~.cuMemMap` can only create mappings on VA range reservations + that are not currently mapped. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + Address where memory will be mapped. + size : size_t + Size of the memory mapping. + offset : size_t + Offset into the memory represented by + handle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle to a shareable memory + flags : unsigned long long + flags for future use, must be zero now. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` + + See Also + -------- + :py:obj:`~.cuMemUnmap`, :py:obj:`~.cuMemSetAccess`, :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemImportFromShareableHandle` + """ + cdef cydriver.CUmemGenericAllocationHandle cyhandle + if handle is None: + phandle = 0 + elif isinstance(handle, (CUmemGenericAllocationHandle,)): + phandle = int(handle) + else: + phandle = int(CUmemGenericAllocationHandle(handle)) + cyhandle = phandle + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + with nogil: + err = cydriver.cuMemMap(cyptr, size, offset, cyhandle, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarrayMapInfo]], unsigned int count, hStream): + """ Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays. + + Performs map or unmap operations on subregions of sparse CUDA arrays + and sparse CUDA mipmapped arrays. Each operation is specified by a + :py:obj:`~.CUarrayMapInfo` entry in the `mapInfoList` array of size + `count`. The structure :py:obj:`~.CUarrayMapInfo` is defined as follow: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.CUarrayMapInfo.resourceType` specifies the type of + resource to be operated on. If :py:obj:`~.CUarrayMapInfo.resourceType` + is set to :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_ARRAY then + :py:obj:`~.CUarrayMapInfo`::resource::array must be set to a valid + sparse CUDA array handle. The CUDA array must be either a 2D, 2D + layered or 3D CUDA array and must have been allocated using + :py:obj:`~.cuArrayCreate` or :py:obj:`~.cuArray3DCreate` with the flag + :py:obj:`~.CUDA_ARRAY3D_SPARSE` or + :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`. For CUDA arrays obtained + using :py:obj:`~.cuMipmappedArrayGetLevel`, + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned. If + :py:obj:`~.CUarrayMapInfo.resourceType` is set to + :py:obj:`~.CUresourcetype`::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY then + :py:obj:`~.CUarrayMapInfo`::resource::mipmap must be set to a valid + sparse CUDA mipmapped array handle. The CUDA mipmapped array must be + either a 2D, 2D layered or 3D CUDA mipmapped array and must have been + allocated using :py:obj:`~.cuMipmappedArrayCreate` with the flag + :py:obj:`~.CUDA_ARRAY3D_SPARSE` or + :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING`. + + :py:obj:`~.CUarrayMapInfo.subresourceType` specifies the type of + subresource within the resource. + :py:obj:`~.CUarraySparseSubresourceType_enum` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where + :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL + indicates a sparse-miplevel which spans at least one tile in every + dimension. The remaining miplevels which are too small to span at least + one tile in any dimension constitute the mip tail region as indicated + by + :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL + subresource type. + + If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to + :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL + then :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel struct must + contain valid array subregion offsets and extents. The + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetX, + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetY and + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must + specify valid X, Y and Z offsets respectively. The + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentWidth, + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentHeight and + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must + specify valid width, height and depth extents respectively. These + offsets and extents must be aligned to the corresponding tile + dimension. For CUDA mipmapped arrays + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::level must + specify a valid mip level index. Otherwise, must be zero. For layered + CUDA arrays and layered CUDA mipmapped arrays + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::layer must + specify a valid layer index. Otherwise, must be zero. + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::offsetZ must be + zero and + :py:obj:`~.CUarrayMapInfo`::subresource::sparseLevel::extentDepth must + be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped + arrays. Tile extents can be obtained by calling + :py:obj:`~.cuArrayGetSparseProperties` and + :py:obj:`~.cuMipmappedArrayGetSparseProperties` + + If :py:obj:`~.CUarrayMapInfo.subresourceType` is set to + :py:obj:`~.CUarraySparseSubresourceType`::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL + then :py:obj:`~.CUarrayMapInfo`::subresource::miptail struct must + contain valid mip tail offset in + :py:obj:`~.CUarrayMapInfo`::subresource::miptail::offset and size in + :py:obj:`~.CUarrayMapInfo`::subresource::miptail::size. Both, mip tail + offset and mip tail size must be aligned to the tile size. For layered + CUDA mipmapped arrays which don't have the flag + :py:obj:`~.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL` set in + :py:obj:`~.CUDA_ARRAY_SPARSE_PROPERTIES.flags` as returned by + :py:obj:`~.cuMipmappedArrayGetSparseProperties`, + :py:obj:`~.CUarrayMapInfo`::subresource::miptail::layer must specify a + valid layer index. Otherwise, must be zero. + + If :py:obj:`~.CUarrayMapInfo`::resource::array or + :py:obj:`~.CUarrayMapInfo`::resource::mipmap was created with + :py:obj:`~.CUDA_ARRAY3D_DEFERRED_MAPPING` flag set the + :py:obj:`~.CUarrayMapInfo.subresourceType` and the contents of + :py:obj:`~.CUarrayMapInfo`::subresource will be ignored. + + :py:obj:`~.CUarrayMapInfo.memOperationType` specifies the type of + operation. :py:obj:`~.CUmemOperationType` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to + :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP then the + subresource will be mapped onto the tile pool memory specified by + :py:obj:`~.CUarrayMapInfo`::memHandle at offset + :py:obj:`~.CUarrayMapInfo.offset`. The tile pool allocation has to be + created by specifying the :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` + flag when calling :py:obj:`~.cuMemCreate`. Also, + :py:obj:`~.CUarrayMapInfo.memHandleType` must be set to + :py:obj:`~.CUmemHandleType`::CU_MEM_HANDLE_TYPE_GENERIC. + + If :py:obj:`~.CUarrayMapInfo.memOperationType` is set to + :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_UNMAP then an + unmapping operation is performed. :py:obj:`~.CUarrayMapInfo`::memHandle + must be NULL. + + :py:obj:`~.CUarrayMapInfo.deviceBitMask` specifies the list of devices + that must map or unmap physical memory. Currently, this mask must have + exactly one bit set, and the corresponding device must match the device + associated with the stream. If + :py:obj:`~.CUarrayMapInfo.memOperationType` is set to + :py:obj:`~.CUmemOperationType`::CU_MEM_OPERATION_TYPE_MAP, the device + must also match the device associated with the tile pool memory + allocation as specified by :py:obj:`~.CUarrayMapInfo`::memHandle. + + :py:obj:`~.CUarrayMapInfo.flags` and + :py:obj:`~.CUarrayMapInfo.reserved`[] are unused and must be set to + zero. + + Parameters + ---------- + mapInfoList : list[:py:obj:`~.CUarrayMapInfo`] + List of :py:obj:`~.CUarrayMapInfo` + count : unsigned int + Count of :py:obj:`~.CUarrayMapInfo` in `mapInfoList` + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier for the stream to use for map or unmap operations + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuMipmappedArrayCreate`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuMemCreate`, :py:obj:`~.cuArrayGetSparseProperties`, :py:obj:`~.cuMipmappedArrayGetSparseProperties` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + mapInfoList = [] if mapInfoList is None else mapInfoList + if not all(isinstance(_x, (CUarrayMapInfo,)) for _x in mapInfoList): + raise TypeError("Argument 'mapInfoList' is not instance of type (expected tuple[cydriver.CUarrayMapInfo,] or list[cydriver.CUarrayMapInfo,]") + cdef cydriver.CUarrayMapInfo* cymapInfoList = NULL + if len(mapInfoList) > 1: + cymapInfoList = calloc(len(mapInfoList), sizeof(cydriver.CUarrayMapInfo)) + if cymapInfoList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(cydriver.CUarrayMapInfo))) + for idx in range(len(mapInfoList)): + string.memcpy(&cymapInfoList[idx], (mapInfoList[idx])._pvt_ptr, sizeof(cydriver.CUarrayMapInfo)) + elif len(mapInfoList) == 1: + cymapInfoList = (mapInfoList[0])._pvt_ptr + if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count)) + with nogil: + err = cydriver.cuMemMapArrayAsync(cymapInfoList, count, cyhStream) + if len(mapInfoList) > 1 and cymapInfoList is not NULL: + free(cymapInfoList) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemUnmap(ptr, size_t size): + """ Unmap the backing memory of a given address range. + + The range must be the entire contiguous address range that was mapped + to. In other words, :py:obj:`~.cuMemUnmap` cannot unmap a sub-range of + an address range mapped by :py:obj:`~.cuMemCreate` / + :py:obj:`~.cuMemMap`. Any backing memory allocations will be freed if + there are no existing mappings and there are no unreleased memory + handles. + + When :py:obj:`~.cuMemUnmap` returns successfully the address range is + converted to an address reservation and can be used for a future calls + to :py:obj:`~.cuMemMap`. Any new mapping to this virtual address will + need to have access granted through :py:obj:`~.cuMemSetAccess`, as all + mappings start with no accessibility setup. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + Starting address for the virtual address range to unmap + size : size_t + Size of the virtual address range to unmap + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemAddressReserve` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + with nogil: + err = cydriver.cuMemUnmap(cyptr, size) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemSetAccess(ptr, size_t size, desc : Optional[tuple[CUmemAccessDesc] | list[CUmemAccessDesc]], size_t count): + """ Set the access flags for each location specified in `desc` for the given virtual address range. + + Given the virtual address range via `ptr` and `size`, and the locations + in the array given by `desc` and `count`, set the access flags for the + target locations. The range must be a fully mapped address range + containing all allocations created by :py:obj:`~.cuMemMap` / + :py:obj:`~.cuMemCreate`. Users cannot specify + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` accessibility for + allocations created on with other location types. Note: When + :py:obj:`~.CUmemAccessDesc`::CUmemLocation::type is + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, + :py:obj:`~.CUmemAccessDesc`::CUmemLocation::id is ignored. When setting + the access flags for a virtual address range mapping a multicast + object, `ptr` and `size` must be aligned to the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_MINIMUM_GRANULARITY`. For best performance + however, it is recommended that `ptr` and `size` be aligned to the + value returned by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_RECOMMENDED_GRANULARITY`. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + Starting address for the virtual address range + size : size_t + Length of the virtual address range + desc : list[:py:obj:`~.CUmemAccessDesc`] + Array of :py:obj:`~.CUmemAccessDesc` that describe how to change + the + count : size_t + Number of :py:obj:`~.CUmemAccessDesc` in `desc` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMemSetAccess`, :py:obj:`~.cuMemCreate`, :py:obj:`~.py`:obj:`~.cuMemMap` + """ + desc = [] if desc is None else desc + if not all(isinstance(_x, (CUmemAccessDesc,)) for _x in desc): + raise TypeError("Argument 'desc' is not instance of type (expected tuple[cydriver.CUmemAccessDesc,] or list[cydriver.CUmemAccessDesc,]") + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef cydriver.CUmemAccessDesc* cydesc = NULL + if len(desc) > 1: + cydesc = calloc(len(desc), sizeof(cydriver.CUmemAccessDesc)) + if cydesc is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) + for idx in range(len(desc)): + string.memcpy(&cydesc[idx], (desc[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + elif len(desc) == 1: + cydesc = (desc[0])._pvt_ptr + if count > len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count)) + with nogil: + err = cydriver.cuMemSetAccess(cyptr, size, cydesc, count) + if len(desc) > 1 and cydesc is not NULL: + free(cydesc) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemGetAccess(location : Optional[CUmemLocation], ptr): + """ Get the access `flags` set for the given `location` and `ptr`. + + Parameters + ---------- + location : :py:obj:`~.CUmemLocation` + Location in which to check the flags for + ptr : :py:obj:`~.CUdeviceptr` + Address in which to check the access flags for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + flags : unsigned long long + Flags set for this location + + See Also + -------- + :py:obj:`~.cuMemSetAccess` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef unsigned long long flags = 0 + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + with nogil: + err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], flags) + +@cython.embedsignature(True) +def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags): + """ Exports an allocation to a requested shareable handle type. + + Given a CUDA memory handle, create a shareable memory allocation handle + that can be used to share the memory with other processes. The + recipient process can convert the shareable handle back into a CUDA + memory handle using :py:obj:`~.cuMemImportFromShareableHandle` and map + it with :py:obj:`~.cuMemMap`. The implementation of what this handle is + and how it can be transferred is defined by the requested handle type + in `handleType` + + Once all shareable handles are closed and the allocation is released, + the allocated memory referenced will be released back to the OS and + uses of the CUDA handle afterward will lead to undefined behavior. + + This API can also be used in conjunction with other APIs (e.g. Vulkan, + OpenGL) that support importing memory from the shareable type + + Parameters + ---------- + handle : :py:obj:`~.CUmemGenericAllocationHandle` + CUDA handle for the memory allocation + handleType : :py:obj:`~.CUmemAllocationHandleType` + Type of shareable handle requested (defines type and size of the + `shareableHandle` output parameter) + flags : unsigned long long + Reserved, must be zero + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + shareableHandle : Any + Pointer to the location in which to store the requested handle type + + See Also + -------- + :py:obj:`~.cuMemImportFromShareableHandle` + """ + cdef cydriver.CUmemGenericAllocationHandle cyhandle + if handle is None: + phandle = 0 + elif isinstance(handle, (CUmemGenericAllocationHandle,)): + phandle = int(handle) + else: + phandle = int(CUmemGenericAllocationHandle(handle)) + cyhandle = phandle + cdef _HelperCUmemAllocationHandleType cyshareableHandle = _HelperCUmemAllocationHandleType(handleType) + cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr + cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + with nogil: + err = cydriver.cuMemExportToShareableHandle(cyshareableHandle_ptr, cyhandle, cyhandleType, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyshareableHandle.pyObj()) + +@cython.embedsignature(True) +def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAllocationHandleType): + """ Imports an allocation from a requested shareable handle type. + + If the current process cannot support the memory described by this + shareable handle, this API will error as + :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`. + + If `shHandleType` is :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` and the + importer process has not been granted access to the same IMEX channel + as the exporter process, this API will error as + :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. + + Parameters + ---------- + osHandle : Any + Shareable Handle representing the memory allocation that is to be + imported. + shHandleType : :py:obj:`~.CUmemAllocationHandleType` + handle type of the exported handle + :py:obj:`~.CUmemAllocationHandleType`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + handle : :py:obj:`~.CUmemGenericAllocationHandle` + CUDA Memory handle for the memory allocation. + + See Also + -------- + :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemMap`, :py:obj:`~.cuMemRelease` + + Notes + ----- + Importing shareable handles exported from some graphics APIs(VUlkan, OpenGL, etc) created on devices under an SLI group may not be supported, and thus this API will return CUDA_ERROR_NOT_SUPPORTED. There is no guarantee that the contents of `handle` will be the same CUDA memory handle for the same given OS shareable handle, or the same underlying allocation. + """ + cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() + cyosHandle = _HelperInputVoidPtr(osHandle) + cdef void* cyosHandle_ptr = cyosHandle.cptr + cdef cydriver.CUmemAllocationHandleType cyshHandleType = shHandleType.value + with nogil: + err = cydriver.cuMemImportFromShareableHandle(handle._pvt_ptr, cyosHandle_ptr, cyshHandleType) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], handle) + +@cython.embedsignature(True) +def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option not None : CUmemAllocationGranularity_flags): + """ Calculates either the minimal or recommended granularity. + + Calculates either the minimal or recommended granularity for a given + allocation specification and returns it in granularity. This + granularity can be used as a multiple for alignment, size, or address + mapping. + + Parameters + ---------- + prop : :py:obj:`~.CUmemAllocationProp` + Property for which to determine the granularity for + option : :py:obj:`~.CUmemAllocationGranularity_flags` + Determines which granularity to return + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + granularity : int + Returned granularity. + + See Also + -------- + :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` + """ + cdef size_t granularity = 0 + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmemAllocationGranularity_flags cyoption = option.value + with nogil: + err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], granularity) + +@cython.embedsignature(True) +def cuMemGetAllocationPropertiesFromHandle(handle): + """ Retrieve the contents of the property structure defining properties for this handle. + + Parameters + ---------- + handle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle which to perform the query on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + prop : :py:obj:`~.CUmemAllocationProp` + Pointer to a properties structure which will hold the information + about this handle + + See Also + -------- + :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemImportFromShareableHandle` + """ + cdef cydriver.CUmemGenericAllocationHandle cyhandle + if handle is None: + phandle = 0 + elif isinstance(handle, (CUmemGenericAllocationHandle,)): + phandle = int(handle) + else: + phandle = int(CUmemGenericAllocationHandle(handle)) + cyhandle = phandle + cdef CUmemAllocationProp prop = CUmemAllocationProp() + with nogil: + err = cydriver.cuMemGetAllocationPropertiesFromHandle(prop._pvt_ptr, cyhandle) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], prop) + +@cython.embedsignature(True) +def cuMemRetainAllocationHandle(addr): + """ Given an address `addr`, returns the allocation handle of the backing memory allocation. + + The handle is guaranteed to be the same handle value used to map the + memory. If the address requested is not mapped, the function will fail. + The returned handle must be released with corresponding number of calls + to :py:obj:`~.cuMemRelease`. + + Parameters + ---------- + addr : Any + Memory address to query, that has been mapped previously. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + handle : :py:obj:`~.CUmemGenericAllocationHandle` + CUDA Memory handle for the backing memory allocation. + + See Also + -------- + :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemMap` + + Notes + ----- + The address `addr`, can be any address in a range previously mapped by :py:obj:`~.cuMemMap`, and not necessarily the start address. + """ + cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() + cyaddr = _HelperInputVoidPtr(addr) + cdef void* cyaddr_ptr = cyaddr.cptr + with nogil: + err = cydriver.cuMemRetainAllocationHandle(handle._pvt_ptr, cyaddr_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], handle) + +@cython.embedsignature(True) +def cuMemFreeAsync(dptr, hStream): + """ Frees memory with stream ordered semantics. + + Inserts a free operation into `hStream`. The allocation must not be + accessed after stream execution reaches the free. After this API + returns, accessing the memory from any subsequent work launched on the + GPU or querying its pointer attributes results in undefined behavior. + + Parameters + ---------- + dptr : :py:obj:`~.CUdeviceptr` + memory to free + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering contract. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + Notes + ----- + During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + with nogil: + err = cydriver.cuMemFreeAsync(cydptr, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemAllocAsync(size_t bytesize, hStream): + """ Allocates memory with stream ordered semantics. + + Inserts an allocation operation into `hStream`. A pointer to the + allocated memory is returned immediately in *dptr. The allocation must + not be accessed until the the allocation operation completes. The + allocation comes from the memory pool current to the stream's device. + + Parameters + ---------- + bytesize : size_t + Number of bytes to allocate + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering contract and the memory + pool to allocate from + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + dptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute` + + Notes + ----- + The default memory pool of a device contains device memory from that device. + + Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs. + + During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUdeviceptr dptr = CUdeviceptr() + with nogil: + err = cydriver.cuMemAllocAsync(dptr._pvt_ptr, bytesize, cyhStream) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dptr) + +@cython.embedsignature(True) +def cuMemPoolTrimTo(pool, size_t minBytesToKeep): + """ Tries to release memory back to the OS. + + Releases memory back to the OS until the pool contains fewer than + minBytesToKeep reserved bytes, or there is no more memory that the + allocator can safely release. The allocator cannot release OS + allocations that back outstanding asynchronous allocations. The OS + allocations may happen at different granularity from the user + allocations. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to trim + minBytesToKeep : size_t + If the pool has less than minBytesToKeep reserved, the TrimTo + operation is a no-op. Otherwise the pool will be guaranteed to have + at least minBytesToKeep bytes reserved after the operation. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + + Notes + ----- + : Allocations that have not been freed count as outstanding. + + : Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding. + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + with nogil: + err = cydriver.cuMemPoolTrimTo(cypool, minBytesToKeep) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value): + """ Sets attributes of a memory pool. + + Supported attributes are: + + - :py:obj:`~.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`: (value type = + cuuint64_t) Amount of reserved memory in bytes to hold onto before + trying to release memory back to the OS. When more than the release + threshold bytes of memory are held by the memory pool, the allocator + will try to release memory back to the OS on the next call to stream, + event or context synchronize. (default 0) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`: (value + type = int) Allow :py:obj:`~.cuMemAllocAsync` to use memory + asynchronously freed in another stream as long as a stream ordering + dependency of the allocating stream on the free action exists. Cuda + events and null stream interactions can create the required stream + ordered dependencies. (default enabled) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`: (value type = + int) Allow reuse of already completed frees when there is no + dependency between the free and allocation. (default enabled) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`: (value + type = int) Allow :py:obj:`~.cuMemAllocAsync` to insert new stream + dependencies in order to establish the stream ordering required to + reuse a piece of memory released by :py:obj:`~.cuMemFreeAsync` + (default enabled). + + - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`: (value type = + cuuint64_t) Reset the high watermark that tracks the amount of + backing memory that was allocated for the memory pool. It is illegal + to set this attribute to a non-zero value. + + - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_HIGH`: (value type = cuuint64_t) + Reset the high watermark that tracks the amount of used memory that + was allocated for the memory pool. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to modify + attr : :py:obj:`~.CUmemPool_attribute` + The attribute to modify + value : Any + Pointer to the value to assign + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef cydriver.CUmemPool_attribute cyattr = attr.value + cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cydriver.cuMemPoolSetAttribute(cypool, cyattr, cyvalue_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute): + """ Gets attributes of a memory pool. + + Supported attributes are: + + - :py:obj:`~.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD`: (value type = + cuuint64_t) Amount of reserved memory in bytes to hold onto before + trying to release memory back to the OS. When more than the release + threshold bytes of memory are held by the memory pool, the allocator + will try to release memory back to the OS on the next call to stream, + event or context synchronize. (default 0) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES`: (value + type = int) Allow :py:obj:`~.cuMemAllocAsync` to use memory + asynchronously freed in another stream as long as a stream ordering + dependency of the allocating stream on the free action exists. Cuda + events and null stream interactions can create the required stream + ordered dependencies. (default enabled) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC`: (value type = + int) Allow reuse of already completed frees when there is no + dependency between the free and allocation. (default enabled) + + - :py:obj:`~.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES`: (value + type = int) Allow :py:obj:`~.cuMemAllocAsync` to insert new stream + dependencies in order to establish the stream ordering required to + reuse a piece of memory released by :py:obj:`~.cuMemFreeAsync` + (default enabled). + + - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT`: (value type = + cuuint64_t) Amount of backing memory currently allocated for the + mempool + + - :py:obj:`~.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH`: (value type = + cuuint64_t) High watermark of backing memory allocated for the + mempool since the last time it was reset. + + - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_CURRENT`: (value type = + cuuint64_t) Amount of memory from the pool that is currently in use + by the application. + + - :py:obj:`~.CU_MEMPOOL_ATTR_USED_MEM_HIGH`: (value type = cuuint64_t) + High watermark of the amount of memory from the pool that was in use + by the application. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to get attributes of + attr : :py:obj:`~.CUmemPool_attribute` + The attribute to get + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + value : Any + Retrieved value + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef cydriver.CUmemPool_attribute cyattr = attr.value + cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cydriver.cuMemPoolGetAttribute(cypool, cyattr, cyvalue_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cuMemPoolSetAccess(pool, map : Optional[tuple[CUmemAccessDesc] | list[CUmemAccessDesc]], size_t count): + """ Controls visibility of pools between devices. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The pool being modified + map : list[:py:obj:`~.CUmemAccessDesc`] + Array of access descriptors. Each descriptor instructs the access + to enable for a single gpu. + count : size_t + Number of descriptors in the map array. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + """ + map = [] if map is None else map + if not all(isinstance(_x, (CUmemAccessDesc,)) for _x in map): + raise TypeError("Argument 'map' is not instance of type (expected tuple[cydriver.CUmemAccessDesc,] or list[cydriver.CUmemAccessDesc,]") + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef cydriver.CUmemAccessDesc* cymap = NULL + if len(map) > 1: + cymap = calloc(len(map), sizeof(cydriver.CUmemAccessDesc)) + if cymap is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) + for idx in range(len(map)): + string.memcpy(&cymap[idx], (map[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + elif len(map) == 1: + cymap = (map[0])._pvt_ptr + if count > len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count)) + with nogil: + err = cydriver.cuMemPoolSetAccess(cypool, cymap, count) + if len(map) > 1 and cymap is not NULL: + free(cymap) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): + """ Returns the accessibility of a pool from a device. + + Returns the accessibility of the pool's memory from the specified + location. + + Parameters + ---------- + memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + the pool being queried + location : :py:obj:`~.CUmemLocation` + the location accessing the pool + + Returns + ------- + CUresult + + flags : :py:obj:`~.CUmemAccess_flags` + the accessibility of the pool from the specified location + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate` + """ + cdef cydriver.CUmemoryPool cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (CUmemoryPool,)): + pmemPool = int(memPool) + else: + pmemPool = int(CUmemoryPool(memPool)) + cymemPool = pmemPool + cdef cydriver.CUmemAccess_flags flags + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + with nogil: + err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUmemAccess_flags(flags)) + +@cython.embedsignature(True) +def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): + """ Creates a memory pool. + + Creates a CUDA memory pool and returns the handle in `pool`. The + `poolProps` determines the properties of the pool such as the backing + device and IPC capabilities. + + To create a memory pool targeting a specific host NUMA node, + applications must set :py:obj:`~.CUmemPoolProps`::CUmemLocation::type + to :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` and + :py:obj:`~.CUmemPoolProps`::CUmemLocation::id must specify the NUMA ID + of the host memory node. Specifying + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` as the + :py:obj:`~.CUmemPoolProps`::CUmemLocation::type will result in + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. By default, the pool's memory + will be accessible from the device it is allocated on. In the case of + pools created with :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, their + default accessibility will be from the host CPU. Applications can + control the maximum size of the pool by specifying a non-zero value for + :py:obj:`~.CUmemPoolProps.maxSize`. If set to 0, the maximum size of + the pool will default to a system dependent value. + + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` + + Parameters + ---------- + poolProps : :py:obj:`~.CUmemPoolProps` + None + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pool : :py:obj:`~.CUmemoryPool` + None + + See Also + -------- + :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemAllocFromPoolAsync`, :py:obj:`~.cuMemPoolExportToShareableHandle` + + Notes + ----- + Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC. + """ + cdef CUmemoryPool pool = CUmemoryPool() + cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL + with nogil: + err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pool) + +@cython.embedsignature(True) +def cuMemPoolDestroy(pool): + """ Destroys the specified memory pool. + + If any pointers obtained from this pool haven't been freed or the pool + has free operations that haven't completed when + :py:obj:`~.cuMemPoolDestroy` is invoked, the function will return + immediately and the resources associated with the pool will be released + automatically once there are no more outstanding allocations. + + Destroying the current mempool of a device sets the default mempool of + that device as the current mempool for that device. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + None + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuMemPoolCreate` + + Notes + ----- + A device's default memory pool cannot be destroyed. + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + with nogil: + err = cydriver.cuMemPoolDestroy(cypool) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream): + """ Allocates memory from a specified pool with stream ordered semantics. + + Inserts an allocation operation into `hStream`. A pointer to the + allocated memory is returned immediately in *dptr. The allocation must + not be accessed until the the allocation operation completes. The + allocation comes from the specified memory pool. + + Parameters + ---------- + bytesize : size_t + Number of bytes to allocate + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The pool to allocate from + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering semantic + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` (default stream specified with no current context), :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + dptr : :py:obj:`~.CUdeviceptr` + Returned device pointer + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute` + + Notes + ----- + During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef CUdeviceptr dptr = CUdeviceptr() + with nogil: + err = cydriver.cuMemAllocFromPoolAsync(dptr._pvt_ptr, bytesize, cypool, cyhStream) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dptr) + +@cython.embedsignature(True) +def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocationHandleType, unsigned long long flags): + """ Exports a memory pool to the requested handle type. + + Given an IPC capable mempool, create an OS handle to share the pool + with another process. A recipient process can convert the shareable + handle into a mempool with + :py:obj:`~.cuMemPoolImportFromShareableHandle`. Individual pointers can + then be shared with the :py:obj:`~.cuMemPoolExportPointer` and + :py:obj:`~.cuMemPoolImportPointer` APIs. The implementation of what the + shareable handle is and how it can be transferred is defined by the + requested handle type. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + pool to export + handleType : :py:obj:`~.CUmemAllocationHandleType` + the type of handle to create + flags : unsigned long long + must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + handle_out : Any + Returned OS handle + + See Also + -------- + :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolExportPointer`, :py:obj:`~.cuMemPoolImportPointer`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cuMemPoolSetAttribute` + + Notes + ----- + : To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than CU_MEM_HANDLE_TYPE_NONE. + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef _HelperCUmemAllocationHandleType cyhandle_out = _HelperCUmemAllocationHandleType(handleType) + cdef void* cyhandle_out_ptr = cyhandle_out.cptr + cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + with nogil: + err = cydriver.cuMemPoolExportToShareableHandle(cyhandle_out_ptr, cypool, cyhandleType, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyhandle_out.pyObj()) + +@cython.embedsignature(True) +def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAllocationHandleType, unsigned long long flags): + """ imports a memory pool from a shared handle. + + Specific allocations can be imported from the imported pool with + cuMemPoolImportPointer. + + If `handleType` is :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` and the + importer process has not been granted access to the same IMEX channel + as the exporter process, this API will error as + :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. + + Parameters + ---------- + handle : Any + OS handle of the pool to open + handleType : :py:obj:`~.CUmemAllocationHandleType` + The type of handle being imported + flags : unsigned long long + must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + pool_out : :py:obj:`~.CUmemoryPool` + Returned memory pool + + See Also + -------- + :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolExportPointer`, :py:obj:`~.cuMemPoolImportPointer` + + Notes + ----- + Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in cuDeviceSetMemPool or :py:obj:`~.cuMemAllocFromPoolAsync` calls. + """ + cdef CUmemoryPool pool_out = CUmemoryPool() + cyhandle = _HelperInputVoidPtr(handle) + cdef void* cyhandle_ptr = cyhandle.cptr + cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value + with nogil: + err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._pvt_ptr, cyhandle_ptr, cyhandleType, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pool_out) + +@cython.embedsignature(True) +def cuMemPoolExportPointer(ptr): + """ Export data to share a memory pool allocation between processes. + + Constructs `shareData_out` for sharing a specific allocation from an + already shared memory pool. The recipient process can import the + allocation with the :py:obj:`~.cuMemPoolImportPointer` api. The data is + not a handle and may be shared through any IPC mechanism. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + pointer to memory being exported + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + shareData_out : :py:obj:`~.CUmemPoolPtrExportData` + Returned export data + + See Also + -------- + :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolImportPointer` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData() + with nogil: + err = cydriver.cuMemPoolExportPointer(shareData_out._pvt_ptr, cyptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], shareData_out) + +@cython.embedsignature(True) +def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): + """ Import a memory pool allocation from another process. + + Returns in `ptr_out` a pointer to the imported memory. The imported + memory must not be accessed before the allocation operation completes + in the exporting process. The imported memory must be freed from all + importing processes before being freed in the exporting process. The + pointer may be freed with cuMemFree or cuMemFreeAsync. If + cuMemFreeAsync is used, the free must be completed on the importing + process before the free operation on the exporting process. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + pool from which to import + shareData : :py:obj:`~.CUmemPoolPtrExportData` + data specifying the memory to import + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + ptr_out : :py:obj:`~.CUdeviceptr` + pointer to imported memory + + See Also + -------- + :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cuMemPoolExportPointer` + + Notes + ----- + The cuMemFreeAsync api may be used in the exporting process before the cuMemFreeAsync operation completes in its stream as long as the cuMemFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process's cuMemFreeAsync. + """ + cdef cydriver.CUmemoryPool cypool + if pool is None: + ppool = 0 + elif isinstance(pool, (CUmemoryPool,)): + ppool = int(pool) + else: + ppool = int(CUmemoryPool(pool)) + cypool = ppool + cdef CUdeviceptr ptr_out = CUdeviceptr() + cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData is not None else NULL + with nogil: + err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], ptr_out) + +@cython.embedsignature(True) +def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): + """ Create a generic allocation handle representing a multicast object described by the given properties. + + This creates a multicast object as described by `prop`. The number of + participating devices is specified by + :py:obj:`~.CUmulticastObjectProp.numDevices`. Devices can be added to + the multicast object via :py:obj:`~.cuMulticastAddDevice`. All + participating devices must be added to the multicast object before + memory can be bound to it. Memory is bound to the multicast object via + either :py:obj:`~.cuMulticastBindMem` or + :py:obj:`~.cuMulticastBindAddr`, and can be unbound via + :py:obj:`~.cuMulticastUnbind`. The total amount of memory that can be + bound per device is specified by + :py:obj:`~.py`:obj:`~.CUmulticastObjectProp.size`. This size must be a + multiple of the value returned by :py:obj:`~.cuMulticastGetGranularity` + with the flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. For best + performance however, the size should be aligned to the value returned + by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. + + After all participating devices have been added, multicast objects can + also be mapped to a device's virtual address space using the virtual + memory management APIs (see :py:obj:`~.cuMemMap` and + :py:obj:`~.cuMemSetAccess`). Multicast objects can also be shared with + other processes by requesting a shareable handle via + :py:obj:`~.cuMemExportToShareableHandle`. Note that the desired types + of shareable handles must be specified in the bitmask + :py:obj:`~.CUmulticastObjectProp.handleTypes`. Multicast objects can be + released using the virtual memory management API + :py:obj:`~.cuMemRelease`. + + Parameters + ---------- + prop : :py:obj:`~.CUmulticastObjectProp` + Properties of the multicast object to create. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Value of handle returned. + + See Also + -------- + :py:obj:`~.cuMulticastAddDevice`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr`, :py:obj:`~.cuMulticastUnbind` + + :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` + """ + cdef CUmemGenericAllocationHandle mcHandle = CUmemGenericAllocationHandle() + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + with nogil: + err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], mcHandle) + +@cython.embedsignature(True) +def cuMulticastAddDevice(mcHandle, dev): + """ Associate a device to a multicast object. + + Associates a device to a multicast object. The added device will be a + part of the multicast team of size specified by + :py:obj:`~.CUmulticastObjectProp.numDevices` during + :py:obj:`~.cuMulticastCreate`. The association of the device to the + multicast object is permanent during the life time of the multicast + object. All devices must be added to the multicast team before any + memory can be bound to any device in the team. Any calls to + :py:obj:`~.cuMulticastBindMem` or :py:obj:`~.cuMulticastBindAddr` will + block until all devices have been added. Similarly all devices must be + added to the multicast team before a virtual address range can be + mapped to the multicast object. A call to :py:obj:`~.cuMemMap` will + block until all devices have been added. + + Parameters + ---------- + mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle representing a multicast object. + dev : :py:obj:`~.CUdevice` + Device that will be associated to the multicast object. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUmemGenericAllocationHandle cymcHandle + if mcHandle is None: + pmcHandle = 0 + elif isinstance(mcHandle, (CUmemGenericAllocationHandle,)): + pmcHandle = int(mcHandle) + else: + pmcHandle = int(CUmemGenericAllocationHandle(mcHandle)) + cymcHandle = pmcHandle + with nogil: + err = cydriver.cuMulticastAddDevice(cymcHandle, cydev) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, size_t size, unsigned long long flags): + """ Bind a memory allocation represented by a handle to a multicast object. + + Binds a memory allocation specified by `memHandle` and created via + :py:obj:`~.cuMemCreate` to a multicast object represented by `mcHandle` + and created via :py:obj:`~.cuMulticastCreate`. The intended `size` of + the bind, the offset in the multicast range `mcOffset` as well as the + offset in the memory `memOffset` must be a multiple of the value + returned by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. For best performance + however, `size`, `mcOffset` and `memOffset` should be aligned to the + granularity of the memory allocation(see + :py:obj:`~.cuMemGetAllocationGranularity`) or to the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. + + The `size` + `memOffset` cannot be larger than the size of the + allocated memory. Similarly the `size` + `mcOffset` cannot be larger + than the size of the multicast object. The memory allocation must have + beeen created on one of the devices that was added to the multicast + team via :py:obj:`~.cuMulticastAddDevice`. Externally shareable as well + as imported multicast objects can be bound only to externally shareable + memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if + there are insufficient resources required to perform the bind. This + call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary + system software is not initialized or running. + + This call may return CUDA_ERROR_ILLEGAL_STATE if the system + configuration is in an illegal state. In such cases, to continue using + multicast, verify that the system configuration is in a valid state and + all required driver daemons are running properly. + + Parameters + ---------- + mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle representing a multicast object. + mcOffset : size_t + Offset into the multicast object for attachment. + memHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle representing a memory allocation. + memOffset : size_t + Offset into the memory for attachment. + size : size_t + Size of the memory that will be bound to the multicast object. + flags : unsigned long long + Flags for future use, must be zero for now. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` + + See Also + -------- + :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastAddDevice`, :py:obj:`~.cuMemCreate` + """ + cdef cydriver.CUmemGenericAllocationHandle cymemHandle + if memHandle is None: + pmemHandle = 0 + elif isinstance(memHandle, (CUmemGenericAllocationHandle,)): + pmemHandle = int(memHandle) + else: + pmemHandle = int(CUmemGenericAllocationHandle(memHandle)) + cymemHandle = pmemHandle + cdef cydriver.CUmemGenericAllocationHandle cymcHandle + if mcHandle is None: + pmcHandle = 0 + elif isinstance(mcHandle, (CUmemGenericAllocationHandle,)): + pmcHandle = int(mcHandle) + else: + pmcHandle = int(CUmemGenericAllocationHandle(mcHandle)) + cymcHandle = pmcHandle + with nogil: + err = cydriver.cuMulticastBindMem(cymcHandle, mcOffset, cymemHandle, memOffset, size, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned long long flags): + """ Bind a memory allocation represented by a virtual address to a multicast object. + + Binds a memory allocation specified by its mapped address `memptr` to a + multicast object represented by `mcHandle`. The memory must have been + allocated via :py:obj:`~.cuMemCreate` or :py:obj:`~.cudaMallocAsync`. + The intended `size` of the bind, the offset in the multicast range + `mcOffset` and `memptr` must be a multiple of the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. For best performance + however, `size`, `mcOffset` and `memptr` should be aligned to the value + returned by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. + + The `size` cannot be larger than the size of the allocated memory. + Similarly the `size` + `mcOffset` cannot be larger than the total size + of the multicast object. The memory allocation must have beeen created + on one of the devices that was added to the multicast team via + :py:obj:`~.cuMulticastAddDevice`. Externally shareable as well as + imported multicast objects can be bound only to externally shareable + memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if + there are insufficient resources required to perform the bind. This + call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary + system software is not initialized or running. + + This call may return CUDA_ERROR_ILLEGAL_STATE if the system + configuration is in an illegal state. In such cases, to continue using + multicast, verify that the system configuration is in a valid state and + all required driver daemons are running properly. + + Parameters + ---------- + mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle representing a multicast object. + mcOffset : size_t + Offset into multicast va range for attachment. + memptr : :py:obj:`~.CUdeviceptr` + Virtual address of the memory allocation. + size : size_t + Size of memory that will be bound to the multicast object. + flags : unsigned long long + Flags for future use, must be zero now. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` + + See Also + -------- + :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastAddDevice`, :py:obj:`~.cuMemCreate` + """ + cdef cydriver.CUdeviceptr cymemptr + if memptr is None: + pmemptr = 0 + elif isinstance(memptr, (CUdeviceptr,)): + pmemptr = int(memptr) + else: + pmemptr = int(CUdeviceptr(memptr)) + cymemptr = pmemptr + cdef cydriver.CUmemGenericAllocationHandle cymcHandle + if mcHandle is None: + pmcHandle = 0 + elif isinstance(mcHandle, (CUmemGenericAllocationHandle,)): + pmcHandle = int(mcHandle) + else: + pmcHandle = int(CUmemGenericAllocationHandle(mcHandle)) + cymcHandle = pmcHandle + with nogil: + err = cydriver.cuMulticastBindAddr(cymcHandle, mcOffset, cymemptr, size, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMulticastUnbind(mcHandle, dev, size_t mcOffset, size_t size): + """ Unbind any memory allocations bound to a multicast object at a given offset and upto a given size. + + Unbinds any memory allocations hosted on `dev` and bound to a multicast + object at `mcOffset` and upto a given `size`. The intended `size` of + the unbind and the offset in the multicast range ( `mcOffset` ) must be + a multiple of the value returned by + :py:obj:`~.cuMulticastGetGranularity` flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. The `size` + `mcOffset` + cannot be larger than the total size of the multicast object. + + Parameters + ---------- + mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` + Handle representing a multicast object. + dev : :py:obj:`~.CUdevice` + Device that hosts the memory allocation. + mcOffset : size_t + Offset into the multicast object. + size : size_t + Desired size to unbind. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr` + + Notes + ----- + Warning: The `mcOffset` and the `size` must match the corresponding values specified during the bind call. Any other values may result in undefined behavior. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUmemGenericAllocationHandle cymcHandle + if mcHandle is None: + pmcHandle = 0 + elif isinstance(mcHandle, (CUmemGenericAllocationHandle,)): + pmcHandle = int(mcHandle) + else: + pmcHandle = int(CUmemGenericAllocationHandle(mcHandle)) + cymcHandle = pmcHandle + with nogil: + err = cydriver.cuMulticastUnbind(cymcHandle, cydev, mcOffset, size) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not None : CUmulticastGranularity_flags): + """ Calculates either the minimal or recommended granularity for multicast object. + + Calculates either the minimal or recommended granularity for a given + set of multicast object properties and returns it in granularity. This + granularity can be used as a multiple for size, bind offsets and + address mappings of the multicast object. + + Parameters + ---------- + prop : :py:obj:`~.CUmulticastObjectProp` + Properties of the multicast object. + option : :py:obj:`~.CUmulticastGranularity_flags` + Determines which granularity to return. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + granularity : int + Returned granularity. + + See Also + -------- + :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr`, :py:obj:`~.cuMulticastUnbind` + """ + cdef size_t granularity = 0 + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + cdef cydriver.CUmulticastGranularity_flags cyoption = option.value + with nogil: + err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], granularity) + +@cython.embedsignature(True) +def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): + """ Returns information about a pointer. + + The supported attributes are: + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT`: + + - Returns in `*data` the :py:obj:`~.CUcontext` in which `ptr` was + allocated or registered. The type of `data` must be + :py:obj:`~.CUcontext` *. + + - If `ptr` was not allocated by, mapped by, or registered with a + :py:obj:`~.CUcontext` which uses unified virtual addressing then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMORY_TYPE`: + + - Returns in `*data` the physical memory type of the memory that `ptr` + addresses as a :py:obj:`~.CUmemorytype` enumerated value. The type of + `data` must be unsigned int. + + - If `ptr` addresses device memory then `*data` is set to + :py:obj:`~.CU_MEMORYTYPE_DEVICE`. The particular :py:obj:`~.CUdevice` + on which the memory resides is the :py:obj:`~.CUdevice` of the + :py:obj:`~.CUcontext` returned by the + :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT` attribute of `ptr`. + + - If `ptr` addresses host memory then `*data` is set to + :py:obj:`~.CU_MEMORYTYPE_HOST`. + + - If `ptr` was not allocated by, mapped by, or registered with a + :py:obj:`~.CUcontext` which uses unified virtual addressing then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + - If the current :py:obj:`~.CUcontext` does not support unified virtual + addressing then :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER`: + + - Returns in `*data` the device pointer value through which `ptr` may + be accessed by kernels running in the current :py:obj:`~.CUcontext`. + The type of `data` must be CUdeviceptr *. + + - If there exists no device pointer value through which kernels running + in the current :py:obj:`~.CUcontext` may access `ptr` then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + - If there is no current :py:obj:`~.CUcontext` then + :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned. + + - Except in the exceptional disjoint addressing cases discussed below, + the value returned in `*data` will equal the input value `ptr`. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER`: + + - Returns in `*data` the host pointer value through which `ptr` may be + accessed by by the host program. The type of `data` must be void **. + If there exists no host pointer value through which the host program + may directly access `ptr` then :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + is returned. + + - Except in the exceptional disjoint addressing cases discussed below, + the value returned in `*data` will equal the input value `ptr`. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_P2P_TOKENS`: + + - Returns in `*data` two tokens for use with the nv-p2p.h Linux kernel + interface. `data` must be a struct of type + CUDA_POINTER_ATTRIBUTE_P2P_TOKENS. + + - `ptr` must be a pointer to memory obtained from + :py:obj:`~.py`:obj:`~.cuMemAlloc()`. Note that p2pToken and + vaSpaceToken are only valid for the lifetime of the source + allocation. A subsequent allocation at the same address may return + completely different tokens. Querying this attribute has a side + effect of setting the attribute + :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS` for the region of memory + that `ptr` points to. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS`: + + - A boolean attribute which when set, ensures that synchronous memory + operations initiated on the region of memory that `ptr` points to + will always synchronize. See further documentation in the section + titled "API synchronization behavior" to learn more about cases when + synchronous memory operations can exhibit asynchronous behavior. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_BUFFER_ID`: + + - Returns in `*data` a buffer ID which is guaranteed to be unique + within the process. `data` must point to an unsigned long long. + + - `ptr` must be a pointer to memory obtained from a CUDA memory + allocation API. Every memory allocation from any of the CUDA memory + allocation APIs will have a unique ID over a process lifetime. + Subsequent allocations do not reuse IDs from previous freed + allocations. IDs are only unique within a single process. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MANAGED`: + + - Returns in `*data` a boolean that indicates whether the pointer + points to managed memory or not. + + - If `ptr` is not a valid CUDA pointer then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL`: + + - Returns in `*data` an integer representing a device ordinal of a + device against which the memory was allocated or registered. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE`: + + - Returns in `*data` a boolean that indicates if this pointer maps to + an allocation that is suitable for :py:obj:`~.cudaIpcGetMemHandle`. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR`: + + - Returns in `*data` the starting address for the allocation referenced + by the device pointer `ptr`. Note that this is not necessarily the + address of the mapped region, but the address of the mappable address + range `ptr` references (e.g. from :py:obj:`~.cuMemAddressReserve`). + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_SIZE`: + + - Returns in `*data` the size for the allocation referenced by the + device pointer `ptr`. Note that this is not necessarily the size of + the mapped region, but the size of the mappable address range `ptr` + references (e.g. from :py:obj:`~.cuMemAddressReserve`). To retrieve + the size of the mapped region, see :py:obj:`~.cuMemGetAddressRange` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MAPPED`: + + - Returns in `*data` a boolean that indicates if this pointer is in a + valid address range that is mapped to a backing allocation. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES`: + + - Returns a bitmask of the allowed handle types for an allocation that + may be passed to :py:obj:`~.cuMemExportToShareableHandle`. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE`: + + - Returns in `*data` the handle to the mempool that the allocation was + obtained from. + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE`: + + - Returns in `*data` a boolean that indicates whether the pointer + points to memory that is capable to be used for hardware accelerated + decompression. + + Note that for most allocations in the unified virtual address space the + host and device pointer for accessing the allocation will be the same. + The exceptions to this are + + - user memory registered using :py:obj:`~.cuMemHostRegister` + + - host memory allocated using :py:obj:`~.cuMemHostAlloc` with the + :py:obj:`~.CU_MEMHOSTALLOC_WRITECOMBINED` flag For these types of + allocation there will exist separate, disjoint host and device + addresses for accessing the allocation. In particular + + - The host address will correspond to an invalid unmapped device + address (which will result in an exception if accessed from the + device) + + - The device address will correspond to an invalid unmapped host + address (which will result in an exception if accessed from the + host). For these types of allocations, querying + :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER` and + :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER` may be used to + retrieve the host and device addresses from either address. + + Parameters + ---------- + attribute : :py:obj:`~.CUpointer_attribute` + Pointer attribute to query + ptr : :py:obj:`~.CUdeviceptr` + Pointer + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + data : Any + Returned pointer attribute value + + See Also + -------- + :py:obj:`~.cuPointerSetAttribute`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuMemHostUnregister`, :py:obj:`~.cudaPointerGetAttributes` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef _HelperCUpointer_attribute cydata = _HelperCUpointer_attribute(attribute, 0, is_getter=True) + cdef void* cydata_ptr = cydata.cptr + cdef cydriver.CUpointer_attribute cyattribute = attribute.value + with nogil: + err = cydriver.cuPointerGetAttribute(cydata_ptr, cyattribute, cyptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cydata.pyObj()) + +@cython.embedsignature(True) +def cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream): + """ Prefetches memory to the specified destination device. + + Note there is a later version of this API, + :py:obj:`~.cuMemPrefetchAsync_v2`. It will supplant this version in + 13.0, which is retained for minor version compatibility. + + Prefetches memory to the specified destination device. `devPtr` is the + base device pointer of the memory to be prefetched and `dstDevice` is + the destination device. `count` specifies the number of bytes to copy. + `hStream` is the stream in which the operation is enqueued. The memory + range must refer to managed memory allocated via + :py:obj:`~.cuMemAllocManaged` or declared via managed variables or it + may also refer to system-allocated memory on systems with non-zero + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. + + Passing in CU_DEVICE_CPU for `dstDevice` will prefetch the data to host + memory. If `dstDevice` is a GPU, then the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` must be non- + zero. Additionally, `hStream` must be associated with a device that has + a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. + + The start address and end address of the memory range will be rounded + down and rounded up respectively to be aligned to CPU page size before + the prefetch operation is enqueued in the stream. + + If no physical memory has been allocated for this region, then this + memory region will be populated and mapped on the destination device. + If there's insufficient memory to prefetch the desired region, the + Unified Memory driver may evict pages from other + :py:obj:`~.cuMemAllocManaged` allocations to host memory in order to + make room. Device memory allocated using :py:obj:`~.cuMemAlloc` or + :py:obj:`~.cuArrayCreate` will not be evicted. + + By default, any mappings to the previous location of the migrated pages + are removed and mappings for the new location are only setup on + `dstDevice`. The exact behavior however also depends on the settings + applied to this memory range via :py:obj:`~.cuMemAdvise` as described + below: + + If :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` was set on any subset of + this memory range, then that subset will create a read-only copy of the + pages on `dstDevice`. + + If :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` was called on any + subset of this memory range, then the pages will be migrated to + `dstDevice` even if `dstDevice` is not the preferred location of any + pages in the memory range. + + If :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` was called on any subset + of this memory range, then mappings to those pages from all the + appropriate processors are updated to refer to the new location if + establishing such a mapping is possible. Otherwise, those mappings are + cleared. + + Note that this API is not required for functionality and only serves to + improve performance by allowing the application to migrate data to a + suitable location before it is accessed. Memory accesses to this range + are always coherent and are allowed even when the data is actively + being migrated. + + Note that this function is asynchronous with respect to the host and + all work on other devices. + + Parameters + ---------- + devPtr : :py:obj:`~.CUdeviceptr` + Pointer to be prefetched + count : size_t + Size in bytes + dstDevice : :py:obj:`~.CUdevice` + Destination device to prefetch to + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue prefetch operation + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cuMemPrefetchAsync` :py:obj:`~.cudaMemPrefetchAsync_v2` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdevice cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdevice,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdevice(dstDevice)) + cydstDevice = pdstDevice + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + with nogil: + err = cydriver.cuMemPrefetchAsync(cydevPtr, count, cydstDevice, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemPrefetchAsync_v2(devPtr, size_t count, location not None : CUmemLocation, unsigned int flags, hStream): + """ Prefetches memory to the specified destination location. + + Prefetches memory to the specified destination location. `devPtr` is + the base device pointer of the memory to be prefetched and `location` + specifies the destination location. `count` specifies the number of + bytes to copy. `hStream` is the stream in which the operation is + enqueued. The memory range must refer to managed memory allocated via + :py:obj:`~.cuMemAllocManaged` or declared via managed variables. + + Specifying :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` for + :py:obj:`~.CUmemLocation.type` will prefetch memory to GPU specified by + device ordinal :py:obj:`~.CUmemLocation.id` which must have non-zero + value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. + Additionally, `hStream` must be associated with a device that has a + non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Specifying + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` as :py:obj:`~.CUmemLocation.type` + will prefetch data to host memory. Applications can request prefetching + memory to a specific host NUMA node by specifying + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` for + :py:obj:`~.CUmemLocation.type` and a valid host NUMA node id in + :py:obj:`~.CUmemLocation.id` Users can also request prefetching memory + to the host NUMA node closest to the current thread's CPU by specifying + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` for + :py:obj:`~.CUmemLocation.type`. Note when + :py:obj:`~.CUmemLocation.type` is etiher + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` OR + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`, + :py:obj:`~.CUmemLocation.id` will be ignored. + + The start address and end address of the memory range will be rounded + down and rounded up respectively to be aligned to CPU page size before + the prefetch operation is enqueued in the stream. + + If no physical memory has been allocated for this region, then this + memory region will be populated and mapped on the destination device. + If there's insufficient memory to prefetch the desired region, the + Unified Memory driver may evict pages from other + :py:obj:`~.cuMemAllocManaged` allocations to host memory in order to + make room. Device memory allocated using :py:obj:`~.cuMemAlloc` or + :py:obj:`~.cuArrayCreate` will not be evicted. + + By default, any mappings to the previous location of the migrated pages + are removed and mappings for the new location are only setup on the + destination location. The exact behavior however also depends on the + settings applied to this memory range via :py:obj:`~.cuMemAdvise` as + described below: + + If :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` was set on any subset of + this memory range, then that subset will create a read-only copy of the + pages on destination location. If however the destination location is a + host NUMA node, then any pages of that subset that are already in + another host NUMA node will be transferred to the destination. + + If :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` was called on any + subset of this memory range, then the pages will be migrated to + `location` even if `location` is not the preferred location of any + pages in the memory range. + + If :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` was called on any subset + of this memory range, then mappings to those pages from all the + appropriate processors are updated to refer to the new location if + establishing such a mapping is possible. Otherwise, those mappings are + cleared. + + Note that this API is not required for functionality and only serves to + improve performance by allowing the application to migrate data to a + suitable location before it is accessed. Memory accesses to this range + are always coherent and are allowed even when the data is actively + being migrated. + + Note that this function is asynchronous with respect to the host and + all work on other devices. + + Parameters + ---------- + devPtr : :py:obj:`~.CUdeviceptr` + Pointer to be prefetched + count : size_t + Size in bytes + location : :py:obj:`~.CUmemLocation` + Location to prefetch to + flags : unsigned int + flags for future use, must be zero now. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue prefetch operation + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cudaMemPrefetchAsync_v2` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + with nogil: + err = cydriver.cuMemPrefetchAsync_v2(cydevPtr, count, location._pvt_ptr[0], flags, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, device): + """ Advise about the usage of a given memory range. + + Note there is a later version of this API, :py:obj:`~.cuMemAdvise_v2`. + It will supplant this version in 13.0, which is retained for minor + version compatibility. + + Advise the Unified Memory subsystem about the usage pattern for the + memory range starting at `devPtr` with a size of `count` bytes. The + start address and end address of the memory range will be rounded down + and rounded up respectively to be aligned to CPU page size before the + advice is applied. The memory range must refer to managed memory + allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed + variables. The memory range could also refer to system-allocated + pageable memory provided it represents a valid, host-accessible region + of memory and all additional constraints imposed by `advice` as + outlined below are also satisfied. Specifying an invalid system- + allocated pageable memory range results in an error being returned. + + The `advice` parameter can take the following values: + + - :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`: This implies that the data + is mostly going to be read from and only occasionally written to. Any + read accesses from any processor to this region will create a read- + only copy of at least the accessed pages in that processor's memory. + Additionally, if :py:obj:`~.cuMemPrefetchAsync` is called on this + region, it will create a read-only copy of the data on the + destination processor. If any processor writes to this region, all + copies of the corresponding page will be invalidated except for the + one where the write occurred. The `device` argument is ignored for + this advice. Note that for a page to be read-duplicated, the + accessing processor must either be the CPU or a GPU that has a non- + zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Also, if a + context is created on a device that does not have the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` + set, then read-duplication will not occur until all such contexts are + destroyed. If the memory region refers to valid system-allocated + pageable memory, then the accessing device must have a non-zero value + for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` for a read- + only copy to be created on that device. Note however that if the + accessing device also has a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then setting this advice will not create a read-only copy when that + device accesses this memory region. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_READ_MOSTLY`: Undoes the effect of + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` and also prevents the + Unified Memory driver from attempting heuristic read-duplication on + the memory range. Any read-duplicated copies of the data will be + collapsed into a single copy. The location for the collapsed copy + will be the preferred location if the page has a preferred location + and one of the read-duplicated copies was resident at that location. + Otherwise, the location chosen is arbitrary. + + - :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION`: This advice sets + the preferred location for the data to be the memory belonging to + `device`. Passing in CU_DEVICE_CPU for `device` sets the preferred + location as host memory. If `device` is a GPU, then it must have a + non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Setting + the preferred location does not cause data to migrate to that + location immediately. Instead, it guides the migration policy when a + fault occurs on that memory region. If the data is already in its + preferred location and the faulting processor can establish a mapping + without requiring the data to be migrated, then data migration will + be avoided. On the other hand, if the data is not in its preferred + location or if a direct mapping cannot be established, then it will + be migrated to the processor accessing it. It is important to note + that setting the preferred location does not prevent data prefetching + done using :py:obj:`~.cuMemPrefetchAsync`. Having a preferred + location can override the page thrash detection and resolution logic + in the Unified Memory driver. Normally, if a page is detected to be + constantly thrashing between for example host and device memory, the + page may eventually be pinned to host memory by the Unified Memory + driver. But if the preferred location is set as device memory, then + the page will continue to thrash indefinitely. If + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice, unless read + accesses from `device` will not result in a read-only copy being + created on that device as outlined in description for the advice + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`. If the memory region + refers to valid system-allocated pageable memory, then `device` must + have a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION`: Undoes the effect + of :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` and changes the + preferred location to none. + + - :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY`: This advice implies that + the data will be accessed by `device`. Passing in + :py:obj:`~.CU_DEVICE_CPU` for `device` will set the advice for the + CPU. If `device` is a GPU, then the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` must be + non-zero. This advice does not cause data migration and has no impact + on the location of the data per se. Instead, it causes the data to + always be mapped in the specified processor's page tables, as long as + the location of the data permits a mapping to be established. If the + data gets migrated for any reason, the mappings are updated + accordingly. This advice is recommended in scenarios where data + locality is not important, but avoiding faults is. Consider for + example a system containing multiple GPUs with peer-to-peer access + enabled, where the data located on one GPU is occasionally accessed + by peer GPUs. In such scenarios, migrating data over to the other + GPUs is not as important because the accesses are infrequent and the + overhead of migration may be too high. But preventing faults can + still help improve performance, and so having a mapping set up in + advance is useful. Note that on CPU access of this data, the data may + be migrated to host memory because the CPU typically cannot access + device memory directly. Any GPU that had the + :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` flag set for this data will + now have its mapping updated to point to the page in host memory. If + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice. Additionally, if + the preferred location of this memory region or any subset of it is + also `device`, then the policies associated with + :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` will override the + policies of this advice. If the memory region refers to valid system- + allocated pageable memory, then `device` must have a non-zero value + for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally, + if `device` has a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then this call has no effect. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_ACCESSED_BY`: Undoes the effect of + :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY`. Any mappings to the data + from `device` may be removed at any time causing accesses to result + in non-fatal page faults. If the memory region refers to valid + system-allocated pageable memory, then `device` must have a non-zero + value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally, + if `device` has a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then this call has no effect. + + Parameters + ---------- + devPtr : :py:obj:`~.CUdeviceptr` + Pointer to memory to set the advice for + count : size_t + Size in bytes of the memory range + advice : :py:obj:`~.CUmem_advise` + Advice to be applied for the specified memory range + device : :py:obj:`~.CUdevice` + Device to apply the advice for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cuMemAdvise_v2`, :py:obj:`~.cudaMemAdvise` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + cdef cydriver.CUmem_advise cyadvice = advice.value + with nogil: + err = cydriver.cuMemAdvise(cydevPtr, count, cyadvice, cydevice) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemAdvise_v2(devPtr, size_t count, advice not None : CUmem_advise, location not None : CUmemLocation): + """ Advise about the usage of a given memory range. + + Advise the Unified Memory subsystem about the usage pattern for the + memory range starting at `devPtr` with a size of `count` bytes. The + start address and end address of the memory range will be rounded down + and rounded up respectively to be aligned to CPU page size before the + advice is applied. The memory range must refer to managed memory + allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed + variables. The memory range could also refer to system-allocated + pageable memory provided it represents a valid, host-accessible region + of memory and all additional constraints imposed by `advice` as + outlined below are also satisfied. Specifying an invalid system- + allocated pageable memory range results in an error being returned. + + The `advice` parameter can take the following values: + + - :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`: This implies that the data + is mostly going to be read from and only occasionally written to. Any + read accesses from any processor to this region will create a read- + only copy of at least the accessed pages in that processor's memory. + Additionally, if :py:obj:`~.cuMemPrefetchAsync` or + :py:obj:`~.cuMemPrefetchAsync_v2` is called on this region, it will + create a read-only copy of the data on the destination processor. If + the target location for :py:obj:`~.cuMemPrefetchAsync_v2` is a host + NUMA node and a read-only copy already exists on another host NUMA + node, that copy will be migrated to the targeted host NUMA node. If + any processor writes to this region, all copies of the corresponding + page will be invalidated except for the one where the write occurred. + If the writing processor is the CPU and the preferred location of the + page is a host NUMA node, then the page will also be migrated to that + host NUMA node. The `location` argument is ignored for this advice. + Note that for a page to be read-duplicated, the accessing processor + must either be the CPU or a GPU that has a non-zero value for the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Also, if a + context is created on a device that does not have the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` + set, then read-duplication will not occur until all such contexts are + destroyed. If the memory region refers to valid system-allocated + pageable memory, then the accessing device must have a non-zero value + for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` for a read- + only copy to be created on that device. Note however that if the + accessing device also has a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then setting this advice will not create a read-only copy when that + device accesses this memory region. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_READ_MOSTLY`: Undoes the effect of + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` and also prevents the + Unified Memory driver from attempting heuristic read-duplication on + the memory range. Any read-duplicated copies of the data will be + collapsed into a single copy. The location for the collapsed copy + will be the preferred location if the page has a preferred location + and one of the read-duplicated copies was resident at that location. + Otherwise, the location chosen is arbitrary. Note: The `location` + argument is ignored for this advice. + + - :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION`: This advice sets + the preferred location for the data to be the memory belonging to + `location`. When :py:obj:`~.CUmemLocation.type` is + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST`, :py:obj:`~.CUmemLocation.id` + is ignored and the preferred location is set to be host memory. To + set the preferred location to a specific host NUMA node, applications + must set :py:obj:`~.CUmemLocation.type` to + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` and + :py:obj:`~.CUmemLocation.id` must specify the NUMA ID of the host + NUMA node. If :py:obj:`~.CUmemLocation.type` is set to + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`, + :py:obj:`~.CUmemLocation.id` will be ignored and the the host NUMA + node closest to the calling thread's CPU will be used as the + preferred location. If :py:obj:`~.CUmemLocation.type` is a + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, then + :py:obj:`~.CUmemLocation.id` must be a valid device ordinal and the + device must have a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Setting + the preferred location does not cause data to migrate to that + location immediately. Instead, it guides the migration policy when a + fault occurs on that memory region. If the data is already in its + preferred location and the faulting processor can establish a mapping + without requiring the data to be migrated, then data migration will + be avoided. On the other hand, if the data is not in its preferred + location or if a direct mapping cannot be established, then it will + be migrated to the processor accessing it. It is important to note + that setting the preferred location does not prevent data prefetching + done using :py:obj:`~.cuMemPrefetchAsync`. Having a preferred + location can override the page thrash detection and resolution logic + in the Unified Memory driver. Normally, if a page is detected to be + constantly thrashing between for example host and device memory, the + page may eventually be pinned to host memory by the Unified Memory + driver. But if the preferred location is set as device memory, then + the page will continue to thrash indefinitely. If + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice, unless read + accesses from `location` will not result in a read-only copy being + created on that procesor as outlined in description for the advice + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`. If the memory region + refers to valid system-allocated pageable memory, and + :py:obj:`~.CUmemLocation.type` is CU_MEM_LOCATION_TYPE_DEVICE then + :py:obj:`~.CUmemLocation.id` must be a valid device that has a non- + zero alue for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION`: Undoes the effect + of :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` and changes the + preferred location to none. The `location` argument is ignored for + this advice. + + - :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY`: This advice implies that + the data will be accessed by processor `location`. The + :py:obj:`~.CUmemLocation.type` must be either + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` with + :py:obj:`~.CUmemLocation.id` representing a valid device ordinal or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` and + :py:obj:`~.CUmemLocation.id` will be ignored. All other location + types are invalid. If :py:obj:`~.CUmemLocation.id` is a GPU, then the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` must be + non-zero. This advice does not cause data migration and has no impact + on the location of the data per se. Instead, it causes the data to + always be mapped in the specified processor's page tables, as long as + the location of the data permits a mapping to be established. If the + data gets migrated for any reason, the mappings are updated + accordingly. This advice is recommended in scenarios where data + locality is not important, but avoiding faults is. Consider for + example a system containing multiple GPUs with peer-to-peer access + enabled, where the data located on one GPU is occasionally accessed + by peer GPUs. In such scenarios, migrating data over to the other + GPUs is not as important because the accesses are infrequent and the + overhead of migration may be too high. But preventing faults can + still help improve performance, and so having a mapping set up in + advance is useful. Note that on CPU access of this data, the data may + be migrated to host memory because the CPU typically cannot access + device memory directly. Any GPU that had the + :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` flag set for this data will + now have its mapping updated to point to the page in host memory. If + :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice. Additionally, if + the preferred location of this memory region or any subset of it is + also `location`, then the policies associated with + :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` will override the + policies of this advice. If the memory region refers to valid system- + allocated pageable memory, and :py:obj:`~.CUmemLocation.type` is + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` then device in + :py:obj:`~.CUmemLocation.id` must have a non-zero value for the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally, + if :py:obj:`~.CUmemLocation.id` has a non-zero value for the device + attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then this call has no effect. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_ACCESSED_BY`: Undoes the effect of + :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY`. Any mappings to the data + from `location` may be removed at any time causing accesses to result + in non-fatal page faults. If the memory region refers to valid + system-allocated pageable memory, and :py:obj:`~.CUmemLocation.type` + is :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` then device in + :py:obj:`~.CUmemLocation.id` must have a non-zero value for the + device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. Additionally, + if :py:obj:`~.CUmemLocation.id` has a non-zero value for the device + attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES`, + then this call has no effect. + + Parameters + ---------- + devPtr : :py:obj:`~.CUdeviceptr` + Pointer to memory to set the advice for + count : size_t + Size in bytes of the memory range + advice : :py:obj:`~.CUmem_advise` + Advice to be applied for the specified memory range + location : :py:obj:`~.CUmemLocation` + location to apply the advice for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuMemcpy`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cudaMemAdvise` + """ + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + cdef cydriver.CUmem_advise cyadvice = advice.value + with nogil: + err = cydriver.cuMemAdvise_v2(cydevPtr, count, cyadvice, location._pvt_ptr[0]) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count): + """ Query an attribute of a given memory range. + + Query an attribute about the memory range starting at `devPtr` with a + size of `count` bytes. The memory range must refer to managed memory + allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed + variables. + + The `attribute` parameter can take the following values: + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY`: If this attribute is + specified, `data` will be interpreted as a 32-bit integer, and + `dataSize` must be 4. The result returned will be 1 if all pages in + the given memory range have read-duplication enabled, or 0 otherwise. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. The result returned will be a GPU + device id if all pages in the memory range have that GPU as their + preferred location, or it will be CU_DEVICE_CPU if all pages in the + memory range have the CPU as their preferred location, or it will be + CU_DEVICE_INVALID if either all the pages don't have the same + preferred location or some of the pages don't have a preferred + location at all. Note that the actual location of the pages in the + memory range at the time of the query may be different from the + preferred location. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY`: If this attribute is + specified, `data` will be interpreted as an array of 32-bit integers, + and `dataSize` must be a non-zero multiple of 4. The result returned + will be a list of device ids that had + :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for that entire memory + range. If any device does not have that advice set for the entire + memory range, that device will not be included. If `data` is larger + than the number of devices that have that advice set for that memory + range, CU_DEVICE_INVALID will be returned in all the extra space + provided. For ex., if `dataSize` is 12 (i.e. `data` has 3 elements) + and only device 0 has the advice set, then the result returned will + be { 0, CU_DEVICE_INVALID, CU_DEVICE_INVALID }. If `data` is smaller + than the number of devices that have that advice set, then only as + many devices will be returned as can fit in the array. There is no + guarantee on which specific devices will be returned, however. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. The result returned will be the + last location to which all pages in the memory range were prefetched + explicitly via :py:obj:`~.cuMemPrefetchAsync`. This will either be a + GPU id or CU_DEVICE_CPU depending on whether the last location for + prefetch was a GPU or the CPU respectively. If any page in the memory + range was never explicitly prefetched or if all pages were not + prefetched to the same location, CU_DEVICE_INVALID will be returned. + Note that this simply returns the last location that the application + requested to prefetch the memory range to. It gives no indication as + to whether the prefetch operation to that location has completed or + even begun. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE`: If this + attribute is specified, `data` will be interpreted as a + :py:obj:`~.CUmemLocationType`, and `dataSize` must be + sizeof(CUmemLocationType). The :py:obj:`~.CUmemLocationType` returned + will be :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` if all pages in the + memory range have the same GPU as their preferred location, or + :py:obj:`~.CUmemLocationType` will be + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` if all pages in the memory + range have the CPU as their preferred location, or it will be + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` if all the pages in the + memory range have the same host NUMA node ID as their preferred + location or it will be :py:obj:`~.CU_MEM_LOCATION_TYPE_INVALID` if + either all the pages don't have the same preferred location or some + of the pages don't have a preferred location at all. Note that the + actual location type of the pages in the memory range at the time of + the query may be different from the preferred location type. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. If the + :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE` query + for the same address range returns + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, it will be a valid device + ordinal or if it returns + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, it will be a valid host + NUMA node ID or if it returns any other location type, the id + should be ignored. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE`: If + this attribute is specified, `data` will be interpreted as a + :py:obj:`~.CUmemLocationType`, and `dataSize` must be + sizeof(CUmemLocationType). The result returned will be the last + location to which all pages in the memory range were prefetched + explicitly via :py:obj:`~.cuMemPrefetchAsync`. The + :py:obj:`~.CUmemLocationType` returned will be + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` if the last prefetch location + was a GPU or :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` if it was the CPU + or :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA` if the last prefetch + location was a specific host NUMA node. If any page in the memory + range was never explicitly prefetched or if all pages were not + prefetched to the same location, :py:obj:`~.CUmemLocationType` will + be :py:obj:`~.CU_MEM_LOCATION_TYPE_INVALID`. Note that this simply + returns the last location type that the application requested to + prefetch the memory range to. It gives no indication as to whether + the prefetch operation to that location has completed or even begun. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID`: If + this attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. If the + :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE` + query for the same address range returns + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, it will be a valid device + ordinal or if it returns + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, it will be a valid host + NUMA node ID or if it returns any other location type, the id + should be ignored. + + Parameters + ---------- + dataSize : size_t + Array containing the size of data + attribute : :py:obj:`~.CUmem_range_attribute` + The attribute to query + devPtr : :py:obj:`~.CUdeviceptr` + Start of the range to query + count : size_t + Size of the range to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + data : Any + A pointers to a memory location where the result of each attribute + query will be written to. + + See Also + -------- + :py:obj:`~.cuMemRangeGetAttributes`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cudaMemRangeGetAttribute` + """ + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + cdef _HelperCUmem_range_attribute cydata = _HelperCUmem_range_attribute(attribute, dataSize) + cdef void* cydata_ptr = cydata.cptr + cdef cydriver.CUmem_range_attribute cyattribute = attribute.value + with nogil: + err = cydriver.cuMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr, count) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cydata.pyObj()) + +@cython.embedsignature(True) +def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Optional[tuple[CUmem_range_attribute] | list[CUmem_range_attribute]], size_t numAttributes, devPtr, size_t count): + """ Query attributes of a given memory range. + + Query attributes of the memory range starting at `devPtr` with a size + of `count` bytes. The memory range must refer to managed memory + allocated via :py:obj:`~.cuMemAllocManaged` or declared via managed + variables. The `attributes` array will be interpreted to have + `numAttributes` entries. The `dataSizes` array will also be interpreted + to have `numAttributes` entries. The results of the query will be + stored in `data`. + + The list of supported attributes are given below. Please refer to + :py:obj:`~.cuMemRangeGetAttribute` for attribute descriptions and + restrictions. + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE` + + - :py:obj:`~.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID` + + Parameters + ---------- + dataSizes : list[int] + Array containing the sizes of each result + attributes : list[:py:obj:`~.CUmem_range_attribute`] + An array of attributes to query (numAttributes and the number of + attributes in this array should match) + numAttributes : size_t + Number of attributes to query + devPtr : :py:obj:`~.CUdeviceptr` + Start of the range to query + count : size_t + Size of the range to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + data : list[Any] + A two-dimensional array containing pointers to memory locations + where the result of each attribute query will be written to. + + See Also + -------- + :py:obj:`~.cuMemRangeGetAttribute`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cuMemPrefetchAsync`, :py:obj:`~.cudaMemRangeGetAttributes` + """ + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + pdevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr,)): + pdevPtr = int(devPtr) + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + attributes = [] if attributes is None else attributes + if not all(isinstance(_x, (CUmem_range_attribute)) for _x in attributes): + raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cydriver.CUmem_range_attribute] or list[cydriver.CUmem_range_attribute]") + if not all(isinstance(_x, (int)) for _x in dataSizes): + raise TypeError("Argument 'dataSizes' is not instance of type (expected tuple[int] or list[int]") + pylist = [_HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)] + cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) + cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr + cdef vector[size_t] cydataSizes = dataSizes + cdef vector[cydriver.CUmem_range_attribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + if numAttributes > len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes)) + if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) + with nogil: + err = cydriver.cuMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr, count) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], [obj.pyObj() for obj in pylist]) + +@cython.embedsignature(True) +def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr): + """ Set attributes on a previously allocated memory region. + + The supported attributes are: + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS`: + + - A boolean attribute that can either be set (1) or unset (0). When + set, the region of memory that `ptr` points to is guaranteed to + always synchronize memory operations that are synchronous. If there + are some previously initiated synchronous memory operations that are + pending when this attribute is set, the function does not return + until those memory operations are complete. See further documentation + in the section titled "API synchronization behavior" to learn more + about cases when synchronous memory operations can exhibit + asynchronous behavior. `value` will be considered as a pointer to an + unsigned integer to which this attribute is to be set. + + Parameters + ---------- + value : Any + Pointer to memory containing the value to be set + attribute : :py:obj:`~.CUpointer_attribute` + Pointer attribute to set + ptr : :py:obj:`~.CUdeviceptr` + Pointer to a memory region allocated using CUDA memory allocation + APIs + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuPointerGetAttribute`, :py:obj:`~.cuPointerGetAttributes`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuMemHostUnregister` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef _HelperCUpointer_attribute cyvalue = _HelperCUpointer_attribute(attribute, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + cdef cydriver.CUpointer_attribute cyattribute = attribute.value + with nogil: + err = cydriver.cuPointerSetAttribute(cyvalue_ptr, cyattribute, cyptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tuple[CUpointer_attribute] | list[CUpointer_attribute]], ptr): + """ Returns information about a pointer. + + The supported attributes are (refer to + :py:obj:`~.cuPointerGetAttribute` for attribute descriptions and + restrictions): + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_CONTEXT` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMORY_TYPE` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_POINTER` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_HOST_POINTER` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_BUFFER_ID` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MANAGED` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_RANGE_SIZE` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MAPPED` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE` + + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE` + + Unlike :py:obj:`~.cuPointerGetAttribute`, this function will not return + an error when the `ptr` encountered is not a valid CUDA pointer. + Instead, the attributes are assigned default NULL values and + CUDA_SUCCESS is returned. + + If `ptr` was not allocated by, mapped by, or registered with a + :py:obj:`~.CUcontext` which uses UVA (Unified Virtual Addressing), + :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned. + + Parameters + ---------- + numAttributes : unsigned int + Number of attributes to query + attributes : list[:py:obj:`~.CUpointer_attribute`] + An array of attributes to query (numAttributes and the number of + attributes in this array should match) + ptr : :py:obj:`~.CUdeviceptr` + Pointer to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + data : list[Any] + A two-dimensional array containing pointers to memory locations + where the result of each attribute query will be written to. + + See Also + -------- + :py:obj:`~.cuPointerGetAttribute`, :py:obj:`~.cuPointerSetAttribute`, :py:obj:`~.cudaPointerGetAttributes` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + attributes = [] if attributes is None else attributes + if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes): + raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cydriver.CUpointer_attribute] or list[cydriver.CUpointer_attribute]") + if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) + cdef vector[cydriver.CUpointer_attribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + pylist = [_HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes] + cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) + cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr + with nogil: + err = cydriver.cuPointerGetAttributes(numAttributes, cyattributes.data(), cyvoidStarHelper_ptr, cyptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], [obj.pyObj() for obj in pylist]) + +@cython.embedsignature(True) +def cuStreamCreate(unsigned int Flags): + """ Create a stream. + + Creates a stream and returns a handle in `phStream`. The `Flags` + argument determines behaviors of the stream. + + Valid values for `Flags` are: + + - :py:obj:`~.CU_STREAM_DEFAULT`: Default stream creation flag. + + - :py:obj:`~.CU_STREAM_NON_BLOCKING`: Specifies that work running in + the created stream may run concurrently with work in stream 0 (the + NULL stream), and that the created stream should perform no implicit + synchronization with stream 0. + + Parameters + ---------- + Flags : unsigned int + Parameters for stream creation + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phStream : :py:obj:`~.CUstream` + Returned newly created stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` + """ + cdef CUstream phStream = CUstream() + with nogil: + err = cydriver.cuStreamCreate(phStream._pvt_ptr, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phStream) + +@cython.embedsignature(True) +def cuStreamCreateWithPriority(unsigned int flags, int priority): + """ Create a stream with the given priority. + + Creates a stream with the specified priority and returns a handle in + `phStream`. This affects the scheduling priority of work in the stream. + Priorities provide a hint to preferentially run work with higher + priority when possible, but do not preempt already-running work or + provide any other functional guarantee on execution order. + + `priority` follows a convention where lower numbers represent higher + priorities. '0' represents default priority. The range of meaningful + numerical priorities can be queried using + :py:obj:`~.cuCtxGetStreamPriorityRange`. If the specified priority is + outside the numerical range returned by + :py:obj:`~.cuCtxGetStreamPriorityRange`, it will automatically be + clamped to the lowest or the highest number in the range. + + Parameters + ---------- + flags : unsigned int + Flags for stream creation. See :py:obj:`~.cuStreamCreate` for a + list of valid flags + priority : int + Stream priority. Lower numbers represent higher priorities. See + :py:obj:`~.cuCtxGetStreamPriorityRange` for more information about + meaningful stream priorities that can be passed. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phStream : :py:obj:`~.CUstream` + Returned newly created stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` + + Notes + ----- + Stream priorities are supported only on GPUs with compute capability 3.5 or higher. + + In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations. + """ + cdef CUstream phStream = CUstream() + with nogil: + err = cydriver.cuStreamCreateWithPriority(phStream._pvt_ptr, flags, priority) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phStream) + +@cython.embedsignature(True) +def cuStreamGetPriority(hStream): + """ Query the priority of a given stream. + + Query the priority of a stream created using + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority` or + :py:obj:`~.cuGreenCtxStreamCreate` and return the priority in + `priority`. Note that if the stream was created with a priority outside + the numerical range returned by + :py:obj:`~.cuCtxGetStreamPriorityRange`, this function returns the + clamped priority. See :py:obj:`~.cuStreamCreateWithPriority` for + details about priority clamping. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + priority : int + Pointer to a signed integer in which the stream's priority is + returned + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice`, :py:obj:`~.cudaStreamGetPriority` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef int priority = 0 + with nogil: + err = cydriver.cuStreamGetPriority(cyhStream, &priority) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], priority) + +@cython.embedsignature(True) +def cuStreamGetDevice(hStream): + """ Returns the device handle of the stream. + + Returns in `*device` the device handle of the stream + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + device : :py:obj:`~.CUdevice` + Returns the device to which a stream belongs + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetFlags` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUdevice device = CUdevice() + with nogil: + err = cydriver.cuStreamGetDevice(cyhStream, device._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], device) + +@cython.embedsignature(True) +def cuStreamGetFlags(hStream): + """ Query the flags of a given stream. + + Query the flags of a stream created using :py:obj:`~.cuStreamCreate`, + :py:obj:`~.cuStreamCreateWithPriority` or + :py:obj:`~.cuGreenCtxStreamCreate` and return the flags in `flags`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + flags : unsigned int + Pointer to an unsigned integer in which the stream's flags are + returned The value returned in `flags` is a logical 'OR' of all + flags that were used while creating this stream. See + :py:obj:`~.cuStreamCreate` for the list of valid flags + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef unsigned int flags = 0 + with nogil: + err = cydriver.cuStreamGetFlags(cyhStream, &flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], flags) + +@cython.embedsignature(True) +def cuStreamGetId(hStream): + """ Returns the unique Id associated with the stream handle supplied. + + Returns in `streamId` the unique Id which is associated with the given + stream handle. The Id is unique for the life of the program. + + The stream handle `hStream` can refer to any of the following: + + - a stream created via any of the CUDA driver APIs such as + :py:obj:`~.cuStreamCreate` and + :py:obj:`~.cuStreamCreateWithPriority`, or their runtime API + equivalents such as :py:obj:`~.cudaStreamCreate`, + :py:obj:`~.cudaStreamCreateWithFlags` and + :py:obj:`~.cudaStreamCreateWithPriority`. Passing an invalid handle + will result in undefined behavior. + + - any of the special streams such as the NULL stream, + :py:obj:`~.CU_STREAM_LEGACY` and :py:obj:`~.CU_STREAM_PER_THREAD`. + The runtime API equivalents of these are also accepted, which are + NULL, :py:obj:`~.cudaStreamLegacy` and + :py:obj:`~.cudaStreamPerThread` respectively. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + streamId : unsigned long long + Pointer to store the Id of the stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cudaStreamGetId` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef unsigned long long streamId = 0 + with nogil: + err = cydriver.cuStreamGetId(cyhStream, &streamId) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], streamId) + +@cython.embedsignature(True) +def cuStreamGetCtx(hStream): + """ Query the context associated with a stream. + + Returns the CUDA context that the stream is associated with. + + Note there is a later version of this API, + :py:obj:`~.cuStreamGetCtx_v2`. It will supplant this version in CUDA + 13.0. It is recommended to use :py:obj:`~.cuStreamGetCtx_v2` till then + as this version will return :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` for + streams created via the API :py:obj:`~.cuGreenCtxStreamCreate`. + + The stream handle `hStream` can refer to any of the following: + + - a stream created via any of the CUDA driver APIs such as + :py:obj:`~.cuStreamCreate` and + :py:obj:`~.cuStreamCreateWithPriority`, or their runtime API + equivalents such as :py:obj:`~.cudaStreamCreate`, + :py:obj:`~.cudaStreamCreateWithFlags` and + :py:obj:`~.cudaStreamCreateWithPriority`. The returned context is the + context that was active in the calling thread when the stream was + created. Passing an invalid handle will result in undefined behavior. + + - any of the special streams such as the NULL stream, + :py:obj:`~.CU_STREAM_LEGACY` and :py:obj:`~.CU_STREAM_PER_THREAD`. + The runtime API equivalents of these are also accepted, which are + NULL, :py:obj:`~.cudaStreamLegacy` and + :py:obj:`~.cudaStreamPerThread` respectively. Specifying any of the + special handles will return the context current to the calling + thread. If no context is current to the calling thread, + :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pctx : :py:obj:`~.CUcontext` + Returned context associated with the stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cudaStreamCreateWithFlags` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUcontext pctx = CUcontext() + with nogil: + err = cydriver.cuStreamGetCtx(cyhStream, pctx._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pctx) + +@cython.embedsignature(True) +def cuStreamGetCtx_v2(hStream): + """ Query the contexts associated with a stream. + + Returns the contexts that the stream is associated with. + + If the stream is associated with a green context, the API returns the + green context in `pGreenCtx` and the primary context of the associated + device in `pCtx`. + + If the stream is associated with a regular context, the API returns the + regular context in `pCtx` and NULL in `pGreenCtx`. + + The stream handle `hStream` can refer to any of the following: + + - a stream created via any of the CUDA driver APIs such as + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority` + and :py:obj:`~.cuGreenCtxStreamCreate`, or their runtime API + equivalents such as :py:obj:`~.cudaStreamCreate`, + :py:obj:`~.cudaStreamCreateWithFlags` and + :py:obj:`~.cudaStreamCreateWithPriority`. Passing an invalid handle + will result in undefined behavior. + + - any of the special streams such as the NULL stream, + :py:obj:`~.CU_STREAM_LEGACY` and :py:obj:`~.CU_STREAM_PER_THREAD`. + The runtime API equivalents of these are also accepted, which are + NULL, :py:obj:`~.cudaStreamLegacy` and + :py:obj:`~.cudaStreamPerThread` respectively. If any of the special + handles are specified, the API will operate on the context current to + the calling thread. If a green context (that was converted via + :py:obj:`~.cuCtxFromGreenCtx()` before setting it current) is current + to the calling thread, the API will return the green context in + `pGreenCtx` and the primary context of the associated device in + `pCtx`. If a regular context is current, the API returns the regular + context in `pCtx` and NULL in `pGreenCtx`. Note that specifying + :py:obj:`~.CU_STREAM_PER_THREAD` or :py:obj:`~.cudaStreamPerThread` + will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` if a green context + is current to the calling thread. If no context is current to the + calling thread, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` is returned. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + pCtx : :py:obj:`~.CUcontext` + Returned regular context associated with the stream + pGreenCtx : :py:obj:`~.CUgreenCtx` + Returned green context if the stream is associated with a green + context or NULL if not + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate` :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUcontext pCtx = CUcontext() + cdef CUgreenCtx pGreenCtx = CUgreenCtx() + with nogil: + err = cydriver.cuStreamGetCtx_v2(cyhStream, pCtx._pvt_ptr, pGreenCtx._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pCtx, pGreenCtx) + +@cython.embedsignature(True) +def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags): + """ Make a compute stream wait on an event. + + Makes all future work submitted to `hStream` wait for all work captured + in `hEvent`. See :py:obj:`~.cuEventRecord()` for details on what is + captured by an event. The synchronization will be performed efficiently + on the device when applicable. `hEvent` may be from a different context + or device than `hStream`. + + flags include: + + - :py:obj:`~.CU_EVENT_WAIT_DEFAULT`: Default event creation flag. + + - :py:obj:`~.CU_EVENT_WAIT_EXTERNAL`: Event is captured in the graph as + an external event node when performing stream capture. This flag is + invalid outside of stream capture. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to wait + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait on (may not be NULL) + Flags : unsigned int + See :py:obj:`~.CUevent_capture_flags` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cudaStreamWaitEvent` + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + with nogil: + err = cydriver.cuStreamWaitEvent(cyhStream, cyhEvent, Flags) + return (_dict_CUresult[err],) + +ctypedef struct cuStreamCallbackData_st: + cydriver.CUstreamCallback callback + void *userData + +ctypedef cuStreamCallbackData_st cuStreamCallbackData + +@cython.show_performance_hints(False) +cdef void cuStreamCallbackWrapper(cydriver.CUstream stream, cydriver.CUresult status, void *data) nogil: + cdef cuStreamCallbackData *cbData = data + with gil: + cbData.callback(stream, status, cbData.userData) + free(cbData) + +@cython.embedsignature(True) +def cuStreamAddCallback(hStream, callback, userData, unsigned int flags): + """ Add a callback to a compute stream. + + Adds a callback to be called on the host after all currently enqueued + items in the stream have completed. For each cuStreamAddCallback call, + the callback will be executed exactly once. The callback will block + later work in the stream until it is finished. + + The callback may be passed :py:obj:`~.CUDA_SUCCESS` or an error code. + In the event of a device error, all subsequently executed callbacks + will receive an appropriate :py:obj:`~.CUresult`. + + Callbacks must not make any CUDA API calls. Attempting to use a CUDA + API will result in :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. Callbacks must + not perform any synchronization that may depend on outstanding device + work or other callbacks that are not mandated to run earlier. Callbacks + without a mandated order (in independent streams) execute in undefined + order and may be serialized. + + For the purposes of Unified Memory, callback execution makes a number + of guarantees: + + - The callback stream is considered idle for the duration of the + callback. Thus, for example, a callback may always use memory + attached to the callback stream. + + - The start of execution of a callback has the same effect as + synchronizing an event recorded in the same stream immediately prior + to the callback. It thus synchronizes streams which have been + "joined" prior to the callback. + + - Adding device work to any stream does not have the effect of making + the stream active until all preceding host functions and stream + callbacks have executed. Thus, for example, a callback might use + global attached memory even if work has been added to another stream, + if the work has been ordered behind the callback with an event. + + - Completion of a callback does not cause a stream to become active + except as described above. The callback stream will remain idle if no + device work follows the callback, and will remain idle across + consecutive callbacks without device work in between. Thus, for + example, stream synchronization can be done by signaling from a + callback at the end of the stream. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to add callback to + callback : :py:obj:`~.CUstreamCallback` + The function to call once preceding stream operations are complete + userData : Any + User specified data to be passed to the callback function + flags : unsigned int + Reserved for future use, must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cudaStreamAddCallback` + + Notes + ----- + This function is slated for eventual deprecation and removal. If you do not require the callback to execute in case of a device error, consider using :py:obj:`~.cuLaunchHostFunc`. Additionally, this function is not supported with :py:obj:`~.cuStreamBeginCapture` and :py:obj:`~.cuStreamEndCapture`, unlike :py:obj:`~.cuLaunchHostFunc`. + """ + cdef cydriver.CUstreamCallback cycallback + if callback is None: + pcallback = 0 + elif isinstance(callback, (CUstreamCallback,)): + pcallback = int(callback) + else: + pcallback = int(CUstreamCallback(callback)) + cycallback = pcallback + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cuStreamCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (CUresult.CUDA_ERROR_OUT_OF_MEMORY,) + cbData.callback = cycallback + cbData.userData = cyuserData_ptr + + with nogil: + err = cydriver.cuStreamAddCallback(cyhStream, cuStreamCallbackWrapper, cbData, flags) + if err != cydriver.CUDA_SUCCESS: + free(cbData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode): + """ Begins graph capture on a stream. + + Begin graph capture on `hStream`. When a stream is in capture mode, all + operations pushed into the stream will not be executed, but will + instead be captured into a graph, which will be returned via + :py:obj:`~.cuStreamEndCapture`. Capture may not be initiated if + `stream` is CU_STREAM_LEGACY. Capture must be ended on the same stream + in which it was initiated, and it may only be initiated if the stream + is not already in capture mode. The capture mode may be queried via + :py:obj:`~.cuStreamIsCapturing`. A unique id representing the capture + sequence may be queried via :py:obj:`~.cuStreamGetCaptureInfo`. + + If `mode` is not :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED`, + :py:obj:`~.cuStreamEndCapture` must be called on this stream from the + same thread. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to initiate capture + mode : :py:obj:`~.CUstreamCaptureMode` + Controls the interaction of this capture sequence with other API + calls that are potentially unsafe. For more details see + :py:obj:`~.cuThreadExchangeStreamCaptureMode`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamEndCapture`, :py:obj:`~.cuThreadExchangeStreamCaptureMode` + + Notes + ----- + Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamCaptureMode cymode = mode.value + with nogil: + err = cydriver.cuStreamBeginCapture(cyhStream, cymode) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], dependencyData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies, mode not None : CUstreamCaptureMode): + """ Begins graph capture on a stream to an existing graph. + + Begin graph capture on `hStream`, placing new nodes into an existing + graph. When a stream is in capture mode, all operations pushed into the + stream will not be executed, but will instead be captured into + `hGraph`. The graph will not be instantiable until the user calls + :py:obj:`~.cuStreamEndCapture`. + + Capture may not be initiated if `stream` is CU_STREAM_LEGACY. Capture + must be ended on the same stream in which it was initiated, and it may + only be initiated if the stream is not already in capture mode. The + capture mode may be queried via :py:obj:`~.cuStreamIsCapturing`. A + unique id representing the capture sequence may be queried via + :py:obj:`~.cuStreamGetCaptureInfo`. + + If `mode` is not :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED`, + :py:obj:`~.cuStreamEndCapture` must be called on this stream from the + same thread. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to initiate capture. + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to capture into. + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the first node captured in the stream. Can be NULL + if numDependencies is 0. + dependencyData : list[:py:obj:`~.CUgraphEdgeData`] + Optional array of data associated with each dependency. + numDependencies : size_t + Number of dependencies. + mode : :py:obj:`~.CUstreamCaptureMode` + Controls the interaction of this capture sequence with other API + calls that are potentially unsafe. For more details see + :py:obj:`~.cuThreadExchangeStreamCaptureMode`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamEndCapture`, :py:obj:`~.cuThreadExchangeStreamCaptureMode`, :py:obj:`~.cuGraphAddNode` + + Notes + ----- + Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) + cdef cydriver.CUstreamCaptureMode cymode = mode.value + with nogil: + err = cydriver.cuStreamBeginCaptureToGraph(cyhStream, cyhGraph, cydependencies, cydependencyData, numDependencies, cymode) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode): + """ Swaps the stream capture interaction mode for a thread. + + Sets the calling thread's stream capture interaction mode to the value + contained in `*mode`, and overwrites `*mode` with the previous mode for + the thread. To facilitate deterministic behavior across function or + module boundaries, callers are encouraged to use this API in a push-pop + fashion: + + **View CUDA Toolkit Documentation for a C++ code example** + + During stream capture (see :py:obj:`~.cuStreamBeginCapture`), some + actions, such as a call to :py:obj:`~.cudaMalloc`, may be unsafe. In + the case of :py:obj:`~.cudaMalloc`, the operation is not enqueued + asynchronously to a stream, and is not observed by stream capture. + Therefore, if the sequence of operations captured via + :py:obj:`~.cuStreamBeginCapture` depended on the allocation being + replayed whenever the graph is launched, the captured graph would be + invalid. + + Therefore, stream capture places restrictions on API calls that can be + made within or concurrently to a + :py:obj:`~.cuStreamBeginCapture`-:py:obj:`~.cuStreamEndCapture` + sequence. This behavior can be controlled via this API and flags to + :py:obj:`~.cuStreamBeginCapture`. + + A thread's mode is one of the following: + + - `CU_STREAM_CAPTURE_MODE_GLOBAL:` This is the default mode. If the + local thread has an ongoing capture sequence that was not initiated + with `CU_STREAM_CAPTURE_MODE_RELAXED` at `cuStreamBeginCapture`, or + if any other thread has a concurrent capture sequence initiated with + `CU_STREAM_CAPTURE_MODE_GLOBAL`, this thread is prohibited from + potentially unsafe API calls. + + - `CU_STREAM_CAPTURE_MODE_THREAD_LOCAL:` If the local thread has an + ongoing capture sequence not initiated with + `CU_STREAM_CAPTURE_MODE_RELAXED`, it is prohibited from potentially + unsafe API calls. Concurrent capture sequences in other threads are + ignored. + + - `CU_STREAM_CAPTURE_MODE_RELAXED:` The local thread is not prohibited + from potentially unsafe API calls. Note that the thread is still + prohibited from API calls which necessarily conflict with stream + capture, for example, attempting :py:obj:`~.cuEventQuery` on an event + that was last recorded inside a capture sequence. + + Parameters + ---------- + mode : :py:obj:`~.CUstreamCaptureMode` + Pointer to mode value to swap with the current mode + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + mode : :py:obj:`~.CUstreamCaptureMode` + Pointer to mode value to swap with the current mode + + See Also + -------- + :py:obj:`~.cuStreamBeginCapture` + """ + cdef cydriver.CUstreamCaptureMode cymode = mode.value + with nogil: + err = cydriver.cuThreadExchangeStreamCaptureMode(&cymode) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUstreamCaptureMode(cymode)) + +@cython.embedsignature(True) +def cuStreamEndCapture(hStream): + """ Ends capture on a stream, returning the captured graph. + + End capture on `hStream`, returning the captured graph via `phGraph`. + Capture must have been initiated on `hStream` via a call to + :py:obj:`~.cuStreamBeginCapture`. If capture was invalidated, due to a + violation of the rules of stream capture, then a NULL graph will be + returned. + + If the `mode` argument to :py:obj:`~.cuStreamBeginCapture` was not + :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED`, this call must be from the + same thread as :py:obj:`~.cuStreamBeginCapture`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD` + phGraph : :py:obj:`~.CUgraph` + The captured graph + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuGraphDestroy` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUgraph phGraph = CUgraph() + with nogil: + err = cydriver.cuStreamEndCapture(cyhStream, phGraph._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraph) + +@cython.embedsignature(True) +def cuStreamIsCapturing(hStream): + """ Returns a stream's capture status. + + Return the capture status of `hStream` via `captureStatus`. After a + successful call, `*captureStatus` will contain one of the following: + + - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_NONE`: The stream is not + capturing. + + - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE`: The stream is capturing. + + - :py:obj:`~.CU_STREAM_CAPTURE_STATUS_INVALIDATED`: The stream was + capturing but an error has invalidated the capture sequence. The + capture sequence must be terminated with + :py:obj:`~.cuStreamEndCapture` on the stream where it was initiated + in order to continue using `hStream`. + + Note that, if this is called on :py:obj:`~.CU_STREAM_LEGACY` (the "null + stream") while a blocking stream in the same context is capturing, it + will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT` and + `*captureStatus` is unspecified after the call. The blocking stream + capture is not invalidated. + + When a blocking stream is capturing, the legacy stream is in an + unusable state until the blocking stream capture is terminated. The + legacy stream is not supported for stream capture, but attempted use + would have an implicit dependency on the capturing stream(s). + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT` + captureStatus : :py:obj:`~.CUstreamCaptureStatus` + Returns the stream's capture status + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamEndCapture` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamCaptureStatus captureStatus + with nogil: + err = cydriver.cuStreamIsCapturing(cyhStream, &captureStatus) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUstreamCaptureStatus(captureStatus)) + +@cython.embedsignature(True) +def cuStreamGetCaptureInfo(hStream): + """ Query a stream's capture state. + + Query stream state related to stream capture. + + If called on :py:obj:`~.CU_STREAM_LEGACY` (the "null stream") while a + stream not created with :py:obj:`~.CU_STREAM_NON_BLOCKING` is + capturing, returns :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`. + + Valid data (other than capture status) is returned only if both of the + following are true: + + - the call returns CUDA_SUCCESS + + - the returned capture status is + :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE` + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT` + captureStatus_out : :py:obj:`~.CUstreamCaptureStatus` + Location to return the capture status of the stream; required + id_out : :py:obj:`~.cuuint64_t` + Optional location to return an id for the capture sequence, which + is unique over the lifetime of the process + graph_out : :py:obj:`~.CUgraph` + Optional location to return the graph being captured into. All + operations other than destroy and node removal are permitted on the + graph while the capture sequence is in progress. This API does not + transfer ownership of the graph, which is transferred or destroyed + at :py:obj:`~.cuStreamEndCapture`. Note that the graph handle may + be invalidated before end of capture for certain errors. Nodes that + are or become unreachable from the original stream at + :py:obj:`~.cuStreamEndCapture` due to direct actions on the graph + do not trigger :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED`. + dependencies_out : list[:py:obj:`~.CUgraphNode`] + Optional location to store a pointer to an array of nodes. The next + node to be captured in the stream will depend on this set of nodes, + absent operations such as event wait which modify this set. The + array pointer is valid until the next API call which operates on + the stream or until the capture is terminated. The node handles may + be copied out and are valid until they or the graph is destroyed. + The driver-owned array may also be passed directly to APIs that + operate on the graph (not the stream) without copying. + numDependencies_out : int + Optional location to store the size of the array returned in + dependencies_out. + + See Also + -------- + :py:obj:`~.cuStreamGetCaptureInfo_v3` :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamUpdateCaptureDependencies` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamCaptureStatus captureStatus_out + cdef cuuint64_t id_out = cuuint64_t() + cdef CUgraph graph_out = CUgraph() + cdef const cydriver.CUgraphNode* cydependencies_out = NULL + pydependencies_out = [] + cdef size_t numDependencies_out = 0 + with nogil: + err = cydriver.cuStreamGetCaptureInfo(cyhStream, &captureStatus_out, id_out._pvt_ptr, graph_out._pvt_ptr, &cydependencies_out, &numDependencies_out) + if CUresult(err) == CUresult(0): + pydependencies_out = [CUgraphNode(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None, None, None) + return (_dict_CUresult[err], CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out) + +@cython.embedsignature(True) +def cuStreamGetCaptureInfo_v3(hStream): + """ Query a stream's capture state (12.3+) + + Query stream state related to stream capture. + + If called on :py:obj:`~.CU_STREAM_LEGACY` (the "null stream") while a + stream not created with :py:obj:`~.CU_STREAM_NON_BLOCKING` is + capturing, returns :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`. + + Valid data (other than capture status) is returned only if both of the + following are true: + + - the call returns CUDA_SUCCESS + + - the returned capture status is + :py:obj:`~.CU_STREAM_CAPTURE_STATUS_ACTIVE` + + If `edgeData_out` is non-NULL then `dependencies_out` must be as well. + If `dependencies_out` is non-NULL and `edgeData_out` is NULL, but there + is non-zero edge data for one or more of the current stream + dependencies, the call will return :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT`, :py:obj:`~.CUDA_ERROR_LOSSY_QUERY` + captureStatus_out : :py:obj:`~.CUstreamCaptureStatus` + Location to return the capture status of the stream; required + id_out : :py:obj:`~.cuuint64_t` + Optional location to return an id for the capture sequence, which + is unique over the lifetime of the process + graph_out : :py:obj:`~.CUgraph` + Optional location to return the graph being captured into. All + operations other than destroy and node removal are permitted on the + graph while the capture sequence is in progress. This API does not + transfer ownership of the graph, which is transferred or destroyed + at :py:obj:`~.cuStreamEndCapture`. Note that the graph handle may + be invalidated before end of capture for certain errors. Nodes that + are or become unreachable from the original stream at + :py:obj:`~.cuStreamEndCapture` due to direct actions on the graph + do not trigger :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED`. + dependencies_out : list[:py:obj:`~.CUgraphNode`] + Optional location to store a pointer to an array of nodes. The next + node to be captured in the stream will depend on this set of nodes, + absent operations such as event wait which modify this set. The + array pointer is valid until the next API call which operates on + the stream or until the capture is terminated. The node handles may + be copied out and are valid until they or the graph is destroyed. + The driver-owned array may also be passed directly to APIs that + operate on the graph (not the stream) without copying. + edgeData_out : list[:py:obj:`~.CUgraphEdgeData`] + Optional location to store a pointer to an array of graph edge + data. This array parallels `dependencies_out`; the next node to be + added has an edge to `dependencies_out`[i] with annotation + `edgeData_out`[i] for each `i`. The array pointer is valid until + the next API call which operates on the stream or until the capture + is terminated. + numDependencies_out : int + Optional location to store the size of the array returned in + dependencies_out. + + See Also + -------- + :py:obj:`~.cuStreamGetCaptureInfo`, :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamIsCapturing`, :py:obj:`~.cuStreamUpdateCaptureDependencies` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamCaptureStatus captureStatus_out + cdef cuuint64_t id_out = cuuint64_t() + cdef CUgraph graph_out = CUgraph() + cdef const cydriver.CUgraphNode* cydependencies_out = NULL + pydependencies_out = [] + cdef const cydriver.CUgraphEdgeData* cyedgeData_out = NULL + pyedgeData_out = [] + cdef size_t numDependencies_out = 0 + with nogil: + err = cydriver.cuStreamGetCaptureInfo_v3(cyhStream, &captureStatus_out, id_out._pvt_ptr, graph_out._pvt_ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) + if CUresult(err) == CUresult(0): + pydependencies_out = [CUgraphNode(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] + if CUresult(err) == CUresult(0): + pyedgeData_out = [CUgraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None, None, None, None) + return (_dict_CUresult[err], CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + +@cython.embedsignature(True) +def cuStreamUpdateCaptureDependencies(hStream, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, unsigned int flags): + """ Update the set of dependencies in a capturing stream (11.3+) + + Modifies the dependency set of a capturing stream. The dependency set + is the set of nodes that the next captured node in the stream will + depend on. + + Valid flags are :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES` and + :py:obj:`~.CU_STREAM_SET_CAPTURE_DEPENDENCIES`. These control whether + the set passed to the API is added to the existing set or replaces it. + A flags value of 0 defaults to + :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES`. + + Nodes that are removed from the dependency set via this API do not + result in :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED` if they are + unreachable from the stream at :py:obj:`~.cuStreamEndCapture`. + + Returns :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` if the stream is not + capturing. + + This API is new in CUDA 11.3. Developers requiring compatibility across + minor versions to CUDA 11.0 should not use this API or provide a + fallback. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to update + dependencies : list[:py:obj:`~.CUgraphNode`] + The set of dependencies to add + numDependencies : size_t + The size of the dependencies array + flags : unsigned int + See above + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` + + See Also + -------- + :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamGetCaptureInfo`, + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuStreamUpdateCaptureDependencies(cyhStream, cydependencies, numDependencies, flags) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamUpdateCaptureDependencies_v2(hStream, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], dependencyData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies, unsigned int flags): + """ Update the set of dependencies in a capturing stream (12.3+) + + Modifies the dependency set of a capturing stream. The dependency set + is the set of nodes that the next captured node in the stream will + depend on along with the edge data for those dependencies. + + Valid flags are :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES` and + :py:obj:`~.CU_STREAM_SET_CAPTURE_DEPENDENCIES`. These control whether + the set passed to the API is added to the existing set or replaces it. + A flags value of 0 defaults to + :py:obj:`~.CU_STREAM_ADD_CAPTURE_DEPENDENCIES`. + + Nodes that are removed from the dependency set via this API do not + result in :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNJOINED` if they are + unreachable from the stream at :py:obj:`~.cuStreamEndCapture`. + + Returns :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` if the stream is not + capturing. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to update + dependencies : list[:py:obj:`~.CUgraphNode`] + The set of dependencies to add + dependencyData : list[:py:obj:`~.CUgraphEdgeData`] + Optional array of data associated with each dependency. + numDependencies : size_t + The size of the dependencies array + flags : unsigned int + See above + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` + + See Also + -------- + :py:obj:`~.cuStreamBeginCapture`, :py:obj:`~.cuStreamGetCaptureInfo` + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + with nogil: + err = cydriver.cuStreamUpdateCaptureDependencies_v2(cyhStream, cydependencies, cydependencyData, numDependencies, flags) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags): + """ Attach memory to a stream asynchronously. + + Enqueues an operation in `hStream` to specify stream association of + `length` bytes of memory starting from `dptr`. This function is a + stream-ordered operation, meaning that it is dependent on, and will + only take effect when, previous work in stream has completed. Any + previous association is automatically replaced. + + `dptr` must point to one of the following types of memories: + + - managed memory declared using the managed keyword or allocated with + :py:obj:`~.cuMemAllocManaged`. + + - a valid host-accessible region of system-allocated pageable memory. + This type of memory may only be specified if the device associated + with the stream reports a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS`. + + For managed allocations, `length` must be either zero or the entire + allocation's size. Both indicate that the entire allocation's stream + association is being changed. Currently, it is not possible to change + stream association for a portion of a managed allocation. + + For pageable host allocations, `length` must be non-zero. + + The stream association is specified using `flags` which must be one of + :py:obj:`~.CUmemAttach_flags`. If the :py:obj:`~.CU_MEM_ATTACH_GLOBAL` + flag is specified, the memory can be accessed by any stream on any + device. If the :py:obj:`~.CU_MEM_ATTACH_HOST` flag is specified, the + program makes a guarantee that it won't access the memory on the device + from any stream on a device that has a zero value for the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If + the :py:obj:`~.CU_MEM_ATTACH_SINGLE` flag is specified and `hStream` is + associated with a device that has a zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`, the program + makes a guarantee that it will only access the memory on the device + from `hStream`. It is illegal to attach singly to the NULL stream, + because the NULL stream is a virtual global stream and not a specific + stream. An error will be returned in this case. + + When memory is associated with a single stream, the Unified Memory + system will allow CPU access to this memory region so long as all + operations in `hStream` have completed, regardless of whether other + streams are active. In effect, this constrains exclusive ownership of + the managed memory region by an active GPU to per-stream activity + instead of whole-GPU activity. + + Accessing memory on the device from streams that are not associated + with it will produce undefined results. No error checking is performed + by the Unified Memory system to ensure that kernels launched into other + streams do not access this region. + + It is a program's responsibility to order calls to + :py:obj:`~.cuStreamAttachMemAsync` via events, synchronization or other + means to ensure legal access to memory at all times. Data visibility + and coherency will be changed appropriately for all kernels which + follow a stream-association change. + + If `hStream` is destroyed while data is associated with it, the + association is removed and the association reverts to the default + visibility of the allocation as specified at + :py:obj:`~.cuMemAllocManaged`. For managed variables, the default + association is always :py:obj:`~.CU_MEM_ATTACH_GLOBAL`. Note that + destroying a stream is an asynchronous operation, and as a result, the + change to default association won't happen until all work in the stream + has completed. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to enqueue the attach operation + dptr : :py:obj:`~.CUdeviceptr` + Pointer to memory (must be a pointer to managed memory or to a + valid host-accessible region of system-allocated pageable memory) + length : size_t + Length of memory + flags : unsigned int + Must be one of :py:obj:`~.CUmemAttach_flags` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cudaStreamAttachMemAsync` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + with nogil: + err = cydriver.cuStreamAttachMemAsync(cyhStream, cydptr, length, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamQuery(hStream): + """ Determine status of a compute stream. + + Returns :py:obj:`~.CUDA_SUCCESS` if all operations in the stream + specified by `hStream` have completed, or + :py:obj:`~.CUDA_ERROR_NOT_READY` if not. + + For the purposes of Unified Memory, a return value of + :py:obj:`~.CUDA_SUCCESS` is equivalent to having called + :py:obj:`~.cuStreamSynchronize()`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to query status of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamQuery` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + with nogil: + err = cydriver.cuStreamQuery(cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamSynchronize(hStream): + """ Wait until a stream's tasks are completed. + + Waits until the device has completed all operations in the stream + specified by `hStream`. If the context was created with the + :py:obj:`~.CU_CTX_SCHED_BLOCKING_SYNC` flag, the CPU thread will block + until the stream is finished with all of its tasks. + + \note_null_stream + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to wait for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamSynchronize` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + with nogil: + err = cydriver.cuStreamSynchronize(cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamDestroy(hStream): + """ Destroys a stream. + + Destroys the stream specified by `hStream`. + + In case the device is still doing work in the stream `hStream` when + :py:obj:`~.cuStreamDestroy()` is called, the function will return + immediately and the resources associated with `hStream` will be + released automatically once the device has completed all work in + `hStream`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamDestroy` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + with nogil: + err = cydriver.cuStreamDestroy(cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamCopyAttributes(dst, src): + """ Copies attributes from source stream to destination stream. + + Copies attributes from source stream `src` to destination stream `dst`. + Both streams must have the same context. + + Parameters + ---------- + dst : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Destination stream + src : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Source stream For list of attributes see :py:obj:`~.CUstreamAttrID` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUstream cysrc + if src is None: + psrc = 0 + elif isinstance(src, (CUstream,)): + psrc = int(src) + else: + psrc = int(CUstream(src)) + cysrc = psrc + cdef cydriver.CUstream cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (CUstream,)): + pdst = int(dst) + else: + pdst = int(CUstream(dst)) + cydst = pdst + with nogil: + err = cydriver.cuStreamCopyAttributes(cydst, cysrc) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID): + """ Queries stream attribute. + + Queries attribute `attr` from `hStream` and stores it in corresponding + member of `value_out`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + + attr : :py:obj:`~.CUstreamAttrID` + + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + value_out : :py:obj:`~.CUstreamAttrValue` + + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamAttrID cyattr = attr.value + cdef CUstreamAttrValue value_out = CUstreamAttrValue() + with nogil: + err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], value_out) + +@cython.embedsignature(True) +def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Optional[CUstreamAttrValue]): + """ Sets stream attribute. + + Sets attribute `attr` on `hStream` from corresponding attribute of + `value`. The updated attribute will be applied to subsequent work + submitted to the stream. It will not affect previously submitted work. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + + attr : :py:obj:`~.CUstreamAttrID` + + value : :py:obj:`~.CUstreamAttrValue` + + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUstreamAttrID cyattr = attr.value + cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + with nogil: + err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventCreate(unsigned int Flags): + """ Creates an event. + + Creates an event *phEvent for the current context with the flags + specified via `Flags`. Valid flags include: + + - :py:obj:`~.CU_EVENT_DEFAULT`: Default event creation flag. + + - :py:obj:`~.CU_EVENT_BLOCKING_SYNC`: Specifies that the created event + should use blocking synchronization. A CPU thread that uses + :py:obj:`~.cuEventSynchronize()` to wait on an event created with + this flag will block until the event has actually been recorded. + + - :py:obj:`~.CU_EVENT_DISABLE_TIMING`: Specifies that the created event + does not need to record timing data. Events created with this flag + specified and the :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag not + specified will provide the best performance when used with + :py:obj:`~.cuStreamWaitEvent()` and :py:obj:`~.cuEventQuery()`. + + - :py:obj:`~.CU_EVENT_INTERPROCESS`: Specifies that the created event + may be used as an interprocess event by + :py:obj:`~.cuIpcGetEventHandle()`. :py:obj:`~.CU_EVENT_INTERPROCESS` + must be specified along with :py:obj:`~.CU_EVENT_DISABLE_TIMING`. + + Parameters + ---------- + Flags : unsigned int + Event creation flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phEvent : :py:obj:`~.CUevent` + Returns newly created event + + See Also + -------- + :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventCreateWithFlags` + """ + cdef CUevent phEvent = CUevent() + with nogil: + err = cydriver.cuEventCreate(phEvent._pvt_ptr, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phEvent) + +@cython.embedsignature(True) +def cuEventRecord(hEvent, hStream): + """ Records an event. + + Captures in `hEvent` the contents of `hStream` at the time of this + call. `hEvent` and `hStream` must be from the same context otherwise + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. Calls such as + :py:obj:`~.cuEventQuery()` or :py:obj:`~.cuStreamWaitEvent()` will then + examine or wait for completion of the work that was captured. Uses of + `hStream` after this call do not modify `hEvent`. See note on default + stream behavior for what is captured in the default case. + + :py:obj:`~.cuEventRecord()` can be called multiple times on the same + event and will overwrite the previously captured state. Other APIs such + as :py:obj:`~.cuStreamWaitEvent()` use the most recently captured state + at the time of the API call, and are not affected by later calls to + :py:obj:`~.cuEventRecord()`. Before the first call to + :py:obj:`~.cuEventRecord()`, an event represents an empty set of work, + so for example :py:obj:`~.cuEventQuery()` would return + :py:obj:`~.CUDA_SUCCESS`. + + Parameters + ---------- + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to record event for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventRecordWithFlags` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + with nogil: + err = cydriver.cuEventRecord(cyhEvent, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags): + """ Records an event. + + Captures in `hEvent` the contents of `hStream` at the time of this + call. `hEvent` and `hStream` must be from the same context otherwise + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. Calls such as + :py:obj:`~.cuEventQuery()` or :py:obj:`~.cuStreamWaitEvent()` will then + examine or wait for completion of the work that was captured. Uses of + `hStream` after this call do not modify `hEvent`. See note on default + stream behavior for what is captured in the default case. + + :py:obj:`~.cuEventRecordWithFlags()` can be called multiple times on + the same event and will overwrite the previously captured state. Other + APIs such as :py:obj:`~.cuStreamWaitEvent()` use the most recently + captured state at the time of the API call, and are not affected by + later calls to :py:obj:`~.cuEventRecordWithFlags()`. Before the first + call to :py:obj:`~.cuEventRecordWithFlags()`, an event represents an + empty set of work, so for example :py:obj:`~.cuEventQuery()` would + return :py:obj:`~.CUDA_SUCCESS`. + + flags include: + + - :py:obj:`~.CU_EVENT_RECORD_DEFAULT`: Default event creation flag. + + - :py:obj:`~.CU_EVENT_RECORD_EXTERNAL`: Event is captured in the graph + as an external event node when performing stream capture. This flag + is invalid outside of stream capture. + + Parameters + ---------- + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to record event for + flags : unsigned int + See :py:obj:`~.CUevent_capture_flags` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cudaEventRecord` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + with nogil: + err = cydriver.cuEventRecordWithFlags(cyhEvent, cyhStream, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventQuery(hEvent): + """ Queries an event's status. + + Queries the status of all work currently captured by `hEvent`. See + :py:obj:`~.cuEventRecord()` for details on what is captured by an + event. + + Returns :py:obj:`~.CUDA_SUCCESS` if all captured work has been + completed, or :py:obj:`~.CUDA_ERROR_NOT_READY` if any captured work is + incomplete. + + For the purposes of Unified Memory, a return value of + :py:obj:`~.CUDA_SUCCESS` is equivalent to having called + :py:obj:`~.cuEventSynchronize()`. + + Parameters + ---------- + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_READY` + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventQuery` + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + with nogil: + err = cydriver.cuEventQuery(cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventSynchronize(hEvent): + """ Waits for an event to complete. + + Waits until the completion of all work currently captured in `hEvent`. + See :py:obj:`~.cuEventRecord()` for details on what is captured by an + event. + + Waiting for an event that was created with the + :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag will cause the calling CPU + thread to block until the event has been completed by the device. If + the :py:obj:`~.CU_EVENT_BLOCKING_SYNC` flag has not been set, then the + CPU thread will busy-wait until the event has been completed by the + device. + + Parameters + ---------- + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventSynchronize` + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + with nogil: + err = cydriver.cuEventSynchronize(cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventDestroy(hEvent): + """ Destroys an event. + + Destroys the event specified by `hEvent`. + + An event may be destroyed before it is complete (i.e., while + :py:obj:`~.cuEventQuery()` would return + :py:obj:`~.CUDA_ERROR_NOT_READY`). In this case, the call does not + block on completion of the event, and any associated resources will + automatically be released asynchronously at completion. + + Parameters + ---------- + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventDestroy` + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + with nogil: + err = cydriver.cuEventDestroy(cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEventElapsedTime(hStart, hEnd): + """ Computes the elapsed time between two events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cuEventRecord()` operation + takes place asynchronously and there is no guarantee that the measured + latency is actually just between the two events. Any number of other + different stream operations could execute in between the two measured + events, thus altering the timing in a significant way. + + If :py:obj:`~.cuEventRecord()` has not been called on either event then + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If + :py:obj:`~.cuEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cuEventQuery()` would return + :py:obj:`~.CUDA_ERROR_NOT_READY` on at least one of the events), + :py:obj:`~.CUDA_ERROR_NOT_READY` is returned. If either event was + created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag, then this + function will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`. + + Note there is a later version of this API, + :py:obj:`~.cuEventElapsedTime_v2`. It will supplant this version in + CUDA 13.0, which is retained for minor version compatibility. + + Parameters + ---------- + hStart : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + hEnd : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pMilliseconds : float + Time between `hStart` and `hEnd` in ms + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cudaEventElapsedTime` + """ + cdef cydriver.CUevent cyhEnd + if hEnd is None: + phEnd = 0 + elif isinstance(hEnd, (CUevent,)): + phEnd = int(hEnd) + else: + phEnd = int(CUevent(hEnd)) + cyhEnd = phEnd + cdef cydriver.CUevent cyhStart + if hStart is None: + phStart = 0 + elif isinstance(hStart, (CUevent,)): + phStart = int(hStart) + else: + phStart = int(CUevent(hStart)) + cyhStart = phStart + cdef float pMilliseconds = 0 + with nogil: + err = cydriver.cuEventElapsedTime(&pMilliseconds, cyhStart, cyhEnd) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pMilliseconds) + +@cython.embedsignature(True) +def cuEventElapsedTime_v2(hStart, hEnd): + """ Computes the elapsed time between two events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). Note this API is not guaranteed + to return the latest errors for pending work. As such this API is + intended to serve as an elapsed time calculation only and any polling + for completion on the events to be compared should be done with + :py:obj:`~.cuEventQuery` instead. + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cuEventRecord()` operation + takes place asynchronously and there is no guarantee that the measured + latency is actually just between the two events. Any number of other + different stream operations could execute in between the two measured + events, thus altering the timing in a significant way. + + If :py:obj:`~.cuEventRecord()` has not been called on either event then + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If + :py:obj:`~.cuEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cuEventQuery()` would return + :py:obj:`~.CUDA_ERROR_NOT_READY` on at least one of the events), + :py:obj:`~.CUDA_ERROR_NOT_READY` is returned. If either event was + created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag, then this + function will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`. + + Parameters + ---------- + hStart : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + hEnd : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pMilliseconds : float + Time between `hStart` and `hEnd` in ms + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cudaEventElapsedTime` + """ + cdef cydriver.CUevent cyhEnd + if hEnd is None: + phEnd = 0 + elif isinstance(hEnd, (CUevent,)): + phEnd = int(hEnd) + else: + phEnd = int(CUevent(hEnd)) + cyhEnd = phEnd + cdef cydriver.CUevent cyhStart + if hStart is None: + phStart = 0 + elif isinstance(hStart, (CUevent,)): + phStart = int(hStart) + else: + phStart = int(CUevent(hStart)) + cyhStart = phStart + cdef float pMilliseconds = 0 + with nogil: + err = cydriver.cuEventElapsedTime_v2(&pMilliseconds, cyhStart, cyhEnd) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pMilliseconds) + +@cython.embedsignature(True) +def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_DESC]): + """ Imports an external memory object. + + Imports an externally allocated memory object and returns a handle to + that in `extMem_out`. + + The properties of the handle being imported must be described in + `memHandleDesc`. The :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC` + structure is defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` specifies the + type of handle being imported. :py:obj:`~.CUexternalMemoryHandleType` + is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::fd must be a + valid file descriptor referencing a memory object. Ownership of the + file descriptor is transferred to the CUDA driver when the handle is + imported successfully. Performing any operations on the file descriptor + after it is imported results in undefined behavior. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32`, then exactly + one of + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that + references a memory object. Ownership of this handle is not transferred + to CUDA after the import operation, so the application must release the + handle using the appropriate system call. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is + not NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a memory object. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle + must be non-NULL and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + be NULL. The handle specified must be a globally shared KMT handle. + This handle does not hold a reference to the underlying object, and + thus will be invalid when all references to the memory object are + destroyed. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP`, then exactly one + of :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle + and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name + must not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that is + returned by ID3D12Device::CreateSharedHandle when referring to a + ID3D12Heap object. This handle holds a reference to the underlying + object. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is + not NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D12Heap object. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE`, then exactly + one of + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that is + returned by ID3D12Device::CreateSharedHandle when referring to a + ID3D12Resource object. This handle holds a reference to the underlying + object. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is + not NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D12Resource object. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle + must represent a valid shared NT handle that is returned by + IDXGIResource1::CreateSharedHandle when referring to a ID3D11Resource + object. If + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name is + not NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D11Resource object. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::handle + must represent a valid shared KMT handle that is returned by + IDXGIResource::GetSharedHandle when referring to a ID3D11Resource + object and + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::win32::name must + be NULL. + + If :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC`::handle::nvSciBufObject + must be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf + object imported into CUDA is also mapped by other drivers, then the + application must use :py:obj:`~.cuWaitExternalSemaphoresAsync` or + :py:obj:`~.cuSignalExternalSemaphoresAsync` as appropriate barriers to + maintain coherence between CUDA and the other drivers. See + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC` and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC` for + memory synchronization. + + The size of the memory object must be specified in + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.size`. + + Specifying the flag :py:obj:`~.CUDA_EXTERNAL_MEMORY_DEDICATED` in + :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.flags` indicates that the + resource is a dedicated resource. The definition of what a dedicated + resource is outside the scope of this extension. This flag must be set + if :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.type` is one of the + following: :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE` + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE` + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT` + + Parameters + ---------- + memHandleDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC` + Memory import handle descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM` + extMem_out : :py:obj:`~.CUexternalMemory` + Returned handle to an external memory object + + See Also + -------- + :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray` + + Notes + ----- + If the Vulkan memory imported into CUDA is mapped on the CPU then the application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges as well as appropriate Vulkan pipeline barriers to maintain coherence between CPU and GPU. For more information on these APIs, please refer to "Synchronization + and Cache Control" chapter from Vulkan specification. + """ + cdef CUexternalMemory extMem_out = CUexternalMemory() + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL + with nogil: + err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], extMem_out) + +@cython.embedsignature(True) +def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_MEMORY_BUFFER_DESC]): + """ Maps a buffer onto an imported memory object. + + Maps a buffer onto an imported memory object and returns a device + pointer in `devPtr`. + + The properties of the buffer being mapped must be described in + `bufferDesc`. The :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC` + structure is defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.offset` is the offset + in the memory object where the buffer's base address is. + :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.size` is the size of the + buffer. :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC.flags` must be + zero. + + The offset and size have to be suitably aligned to match the + requirements of the external API. Mapping two buffers whose ranges + overlap may or may not result in the same virtual address being + returned for the overlapped portion. In such cases, the application + must ensure that all accesses to that region from the GPU are volatile. + Otherwise writes made via one address are not guaranteed to be visible + via the other address, even if they're issued by the same thread. It is + recommended that applications map the combined range instead of mapping + separate buffers and then apply the appropriate offsets to the returned + pointer to derive the individual buffers. + + The returned pointer `devPtr` must be freed using + :py:obj:`~.cuMemFree`. + + Parameters + ---------- + extMem : :py:obj:`~.CUexternalMemory` + Handle to external memory object + bufferDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_BUFFER_DESC` + Buffer descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + devPtr : :py:obj:`~.CUdeviceptr` + Returned device pointer to buffer + + See Also + -------- + :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray` + """ + cdef cydriver.CUexternalMemory cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (CUexternalMemory,)): + pextMem = int(extMem) + else: + pextMem = int(CUexternalMemory(extMem)) + cyextMem = pextMem + cdef CUdeviceptr devPtr = CUdeviceptr() + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL + with nogil: + err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], devPtr) + +@cython.embedsignature(True) +def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC]): + """ Maps a CUDA mipmapped array onto an external memory object. + + Maps a CUDA mipmapped array onto an external object and returns a + handle to it in `mipmap`. + + The properties of the CUDA mipmapped array being mapped must be + described in `mipmapDesc`. The structure + :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC` is defined as + follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.offset` is + the offset in the memory object where the base level of the mipmap + chain is. + :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.arrayDesc` + describes the format, dimensions and type of the base level of the + mipmap chain. For further details on these parameters, please refer to + the documentation for :py:obj:`~.cuMipmappedArrayCreate`. Note that if + the mipmapped array is bound as a color target in the graphics API, + then the flag :py:obj:`~.CUDA_ARRAY3D_COLOR_ATTACHMENT` must be + specified in + :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC`::arrayDesc::Flags. + :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.numLevels` + specifies the total number of levels in the mipmap chain. + + If `extMem` was imported from a handle of type + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`, then + :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC.numLevels` must be + equal to 1. + + The returned CUDA mipmapped array must be freed using + :py:obj:`~.cuMipmappedArrayDestroy`. + + Parameters + ---------- + extMem : :py:obj:`~.CUexternalMemory` + Handle to external memory object + mipmapDesc : :py:obj:`~.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC` + CUDA array descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + mipmap : :py:obj:`~.CUmipmappedArray` + Returned CUDA mipmapped array + + See Also + -------- + :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuDestroyExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer` + """ + cdef cydriver.CUexternalMemory cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (CUexternalMemory,)): + pextMem = int(extMem) + else: + pextMem = int(CUexternalMemory(extMem)) + cyextMem = pextMem + cdef CUmipmappedArray mipmap = CUmipmappedArray() + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL + with nogil: + err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], mipmap) + +@cython.embedsignature(True) +def cuDestroyExternalMemory(extMem): + """ Destroys an external memory object. + + Destroys the specified external memory object. Any existing buffers and + CUDA mipmapped arrays mapped onto this object must no longer be used + and must be explicitly freed using :py:obj:`~.cuMemFree` and + :py:obj:`~.cuMipmappedArrayDestroy` respectively. + + Parameters + ---------- + extMem : :py:obj:`~.CUexternalMemory` + External memory object to be destroyed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuImportExternalMemory`, :py:obj:`~.cuExternalMemoryGetMappedBuffer`, :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray` + """ + cdef cydriver.CUexternalMemory cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (CUexternalMemory,)): + pextMem = int(extMem) + else: + pextMem = int(CUexternalMemory(extMem)) + cyextMem = pextMem + with nogil: + err = cydriver.cuDestroyExternalMemory(cyextMem) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC]): + """ Imports an external semaphore. + + Imports an externally allocated synchronization object and returns a + handle to that in `extSem_out`. + + The properties of the handle being imported must be described in + `semHandleDesc`. The :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC` is + defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` specifies + the type of handle being imported. + :py:obj:`~.CUexternalSemaphoreHandleType` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`, then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must be a + valid file descriptor referencing a synchronization object. Ownership + of the file descriptor is transferred to the CUDA driver when the + handle is imported successfully. Performing any operations on the file + descriptor after it is imported results in undefined behavior. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`, then + exactly one of + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name + must not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + is not NULL, then it must represent a valid shared NT handle that + references a synchronization object. Ownership of this handle is not + transferred to CUDA after the import operation, so the application must + release the handle using the appropriate system call. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + not NULL, then it must name a valid synchronization object. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT`, then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + must be non-NULL and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name + must be NULL. The handle specified must be a globally shared KMT + handle. This handle does not hold a reference to the underlying object, + and thus will be invalid when all references to the synchronization + object are destroyed. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`, then exactly + one of + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name + must not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + is not NULL, then it must represent a valid shared NT handle that is + returned by ID3D12Device::CreateSharedHandle when referring to a + ID3D12Fence object. This handle holds a reference to the underlying + object. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + not NULL, then it must name a valid synchronization object that refers + to a valid ID3D12Fence object. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`, then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + represents a valid shared NT handle that is returned by + ID3D11Fence::CreateSharedHandle. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + not NULL, then it must name a valid synchronization object that refers + to a valid ID3D11Fence object. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::nvSciSyncObj + represents a valid NvSciSyncObj. + + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`, then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + represents a valid shared NT handle that is returned by + IDXGIResource1::CreateSharedHandle when referring to a IDXGIKeyedMutex + object. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + not NULL, then it must name a valid synchronization object that refers + to a valid IDXGIKeyedMutex object. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT`, + then + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + represents a valid shared KMT handle that is returned by + IDXGIResource::GetSharedHandle when referring to a IDXGIKeyedMutex + object and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name + must be NULL. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`, + then :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::fd must + be a valid file descriptor referencing a synchronization object. + Ownership of the file descriptor is transferred to the CUDA driver when + the handle is imported successfully. Performing any operations on the + file descriptor after it is imported results in undefined behavior. + + If :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC.type` is + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32`, + then exactly one of + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + and + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name + must not be NULL. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::handle + is not NULL, then it must represent a valid shared NT handle that + references a synchronization object. Ownership of this handle is not + transferred to CUDA after the import operation, so the application must + release the handle using the appropriate system call. If + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC`::handle::win32::name is + not NULL, then it must name a valid synchronization object. + + Parameters + ---------- + semHandleDesc : :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC` + Semaphore import handle descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM` + extSem_out : :py:obj:`~.CUexternalSemaphore` + Returned handle to an external semaphore + + See Also + -------- + :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef CUexternalSemaphore extSem_out = CUexternalSemaphore() + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL + with nogil: + err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], extSem_out) + +@cython.embedsignature(True) +def cuSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemaphore] | list[CUexternalSemaphore]], paramsArray : Optional[tuple[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS] | list[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]], unsigned int numExtSems, stream): + """ Signals a set of external semaphore objects. + + Enqueues a signal operation on a set of externally allocated semaphore + object in the specified stream. The operations will be executed when + all prior operations in the stream complete. + + The exact semantics of signaling a semaphore depends on the type of the + object. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT` then + signaling the semaphore will set it to the signaled state. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32` + then the semaphore will be set to the value specified in + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::fence::value. + + If the semaphore object is of the type + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` this API sets + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence + to a value that can be used by subsequent waiters of the same NvSciSync + object to order operations with those currently submitted in `stream`. + Such an update will overwrite previous contents of + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence. + By default, signaling such an external semaphore object causes + appropriate memory synchronization operations to be performed over all + external memory objects that are imported as + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`. This ensures that + any subsequent accesses made by other importers of the same set of + NvSciBuf memory object(s) are coherent. These operations can be skipped + by specifying the flag + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC`, which + can be used as a performance optimization when data coherency is not + required. But specifying this flag in scenarios where data coherency is + required results in undefined behavior. Also, for semaphore object of + the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, if + the NvSciSyncAttrList used to create the NvSciSyncObj had not set the + flags in :py:obj:`~.cuDeviceGetNvSciSyncAttributes` to + CUDA_NVSCISYNC_ATTR_SIGNAL, this API will return + CUDA_ERROR_NOT_SUPPORTED. NvSciSyncFence associated with semaphore + object of the type + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` can be + deterministic. For this the NvSciSyncAttrList used to create the + semaphore object must have value of + NvSciSyncAttrKey_RequireDeterministicFences key set to true. + Deterministic fences allow users to enqueue a wait over the semaphore + object even before corresponding signal is enqueued. For such a + semaphore object, CUDA guarantees that each signal operation will + increment the fence value by '1'. Users are expected to track count of + signals enqueued on the semaphore object and insert waits accordingly. + When such a semaphore object is signaled from multiple streams, due to + concurrent stream execution, it is possible that the order in which the + semaphore gets signaled is indeterministic. This could lead to waiters + of the semaphore getting unblocked incorrectly. Users are expected to + handle such situations, either by not using the same semaphore object + with deterministic fence support enabled in different streams or by + adding explicit dependency amongst such streams so that the semaphore + is signaled in order. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT` + then the keyed mutex will be released with the key specified in + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_PARAMS`::params::keyedmutex::key. + + Parameters + ---------- + extSemArray : list[:py:obj:`~.CUexternalSemaphore`] + Set of external semaphores to be signaled + paramsArray : list[:py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`] + Array of semaphore parameters + numExtSems : unsigned int + Number of semaphores to signal + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue the signal operations in + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + paramsArray = [] if paramsArray is None else paramsArray + if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,)) for _x in paramsArray): + raise TypeError("Argument 'paramsArray' is not instance of type (expected tuple[cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,] or list[cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,]") + extSemArray = [] if extSemArray is None else extSemArray + if not all(isinstance(_x, (CUexternalSemaphore,)) for _x in extSemArray): + raise TypeError("Argument 'extSemArray' is not instance of type (expected tuple[cydriver.CUexternalSemaphore,] or list[cydriver.CUexternalSemaphore,]") + cdef cydriver.CUexternalSemaphore* cyextSemArray = NULL + if len(extSemArray) > 1: + cyextSemArray = calloc(len(extSemArray), sizeof(cydriver.CUexternalSemaphore)) + if cyextSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + else: + for idx in range(len(extSemArray)): + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] + elif len(extSemArray) == 1: + cyextSemArray = (extSemArray[0])._pvt_ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cyparamsArray = NULL + if len(paramsArray) > 1: + cyparamsArray = calloc(len(paramsArray), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + if cyparamsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) + for idx in range(len(paramsArray)): + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + elif len(paramsArray) == 1: + cyparamsArray = (paramsArray[0])._pvt_ptr + if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) + if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) + with nogil: + err = cydriver.cuSignalExternalSemaphoresAsync(cyextSemArray, cyparamsArray, numExtSems, cystream) + if len(extSemArray) > 1 and cyextSemArray is not NULL: + free(cyextSemArray) + if len(paramsArray) > 1 and cyparamsArray is not NULL: + free(cyparamsArray) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemaphore] | list[CUexternalSemaphore]], paramsArray : Optional[tuple[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS] | list[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]], unsigned int numExtSems, stream): + """ Waits on a set of external semaphore objects. + + Enqueues a wait operation on a set of externally allocated semaphore + object in the specified stream. The operations will be executed when + all prior operations in the stream complete. + + The exact semantics of waiting on a semaphore depends on the type of + the object. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT` then + waiting on the semaphore will wait until the semaphore reaches the + signaled state. The semaphore will then be reset to the unsignaled + state. Therefore for every signal operation, there can only be one wait + operation. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32` + then waiting on the semaphore will wait until the value of the + semaphore is greater than or equal to + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::fence::value. + + If the semaphore object is of the type + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC` then, waiting + on the semaphore will wait until the + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS`::params::nvSciSync::fence + is signaled by the signaler of the NvSciSyncObj that was associated + with this semaphore object. By default, waiting on such an external + semaphore object causes appropriate memory synchronization operations + to be performed over all external memory objects that are imported as + :py:obj:`~.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF`. This ensures that + any subsequent accesses made by other importers of the same set of + NvSciBuf memory object(s) are coherent. These operations can be skipped + by specifying the flag + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC`, which + can be used as a performance optimization when data coherency is not + required. But specifying this flag in scenarios where data coherency is + required results in undefined behavior. Also, for semaphore object of + the type :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC`, if + the NvSciSyncAttrList used to create the NvSciSyncObj had not set the + flags in :py:obj:`~.cuDeviceGetNvSciSyncAttributes` to + CUDA_NVSCISYNC_ATTR_WAIT, this API will return + CUDA_ERROR_NOT_SUPPORTED. + + If the semaphore object is any one of the following types: + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX`, + :py:obj:`~.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT` + then the keyed mutex will be acquired when it is released with the key + specified in + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::key + or until the timeout specified by + :py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`::params::keyedmutex::timeoutMs + has lapsed. The timeout interval can either be a finite value specified + in milliseconds or an infinite value. In case an infinite value is + specified the timeout never elapses. The windows INFINITE macro must be + used to specify infinite timeout. + + Parameters + ---------- + extSemArray : list[:py:obj:`~.CUexternalSemaphore`] + External semaphores to be waited on + paramsArray : list[:py:obj:`~.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS`] + Array of semaphore parameters + numExtSems : unsigned int + Number of semaphores to wait on + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue the wait operations in + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_TIMEOUT` + + See Also + -------- + :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync` + """ + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + paramsArray = [] if paramsArray is None else paramsArray + if not all(isinstance(_x, (CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,)) for _x in paramsArray): + raise TypeError("Argument 'paramsArray' is not instance of type (expected tuple[cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,] or list[cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,]") + extSemArray = [] if extSemArray is None else extSemArray + if not all(isinstance(_x, (CUexternalSemaphore,)) for _x in extSemArray): + raise TypeError("Argument 'extSemArray' is not instance of type (expected tuple[cydriver.CUexternalSemaphore,] or list[cydriver.CUexternalSemaphore,]") + cdef cydriver.CUexternalSemaphore* cyextSemArray = NULL + if len(extSemArray) > 1: + cyextSemArray = calloc(len(extSemArray), sizeof(cydriver.CUexternalSemaphore)) + if cyextSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) + else: + for idx in range(len(extSemArray)): + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] + elif len(extSemArray) == 1: + cyextSemArray = (extSemArray[0])._pvt_ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cyparamsArray = NULL + if len(paramsArray) > 1: + cyparamsArray = calloc(len(paramsArray), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + if cyparamsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) + for idx in range(len(paramsArray)): + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + elif len(paramsArray) == 1: + cyparamsArray = (paramsArray[0])._pvt_ptr + if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) + if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) + with nogil: + err = cydriver.cuWaitExternalSemaphoresAsync(cyextSemArray, cyparamsArray, numExtSems, cystream) + if len(extSemArray) > 1 and cyextSemArray is not NULL: + free(cyextSemArray) + if len(paramsArray) > 1 and cyparamsArray is not NULL: + free(cyparamsArray) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDestroyExternalSemaphore(extSem): + """ Destroys an external semaphore. + + Destroys an external semaphore object and releases any references to + the underlying resource. Any outstanding signals or waits must have + completed before the semaphore is destroyed. + + Parameters + ---------- + extSem : :py:obj:`~.CUexternalSemaphore` + External semaphore to be destroyed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUexternalSemaphore cyextSem + if extSem is None: + pextSem = 0 + elif isinstance(extSem, (CUexternalSemaphore,)): + pextSem = int(extSem) + else: + pextSem = int(CUexternalSemaphore(extSem)) + cyextSem = pextSem + with nogil: + err = cydriver.cuDestroyExternalSemaphore(cyextSem) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamWaitValue32(stream, addr, value, unsigned int flags): + """ Wait on a memory location. + + Enqueues a synchronization of the stream on the given memory location. + Work ordered after the operation will block until the given condition + on the memory is satisfied. By default, the condition is to wait for + (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other + condition types can be specified via `flags`. + + If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the + device pointer should be obtained with + :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used + with managed memory (:py:obj:`~.cuMemAllocManaged`). + + Support for CU_STREAM_WAIT_VALUE_NOR can be queried with + :py:obj:`~.cuDeviceGetAttribute()` and + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to synchronize on the memory location. + addr : :py:obj:`~.CUdeviceptr` + The memory location to wait on. + value : Any + The value to compare with the memory location. + flags : unsigned int + See :py:obj:`~.CUstreamWaitValue_flags`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent` + + Notes + ----- + Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. + """ + cdef cydriver.cuuint32_t cyvalue + if value is None: + pvalue = 0 + elif isinstance(value, (cuuint32_t,)): + pvalue = int(value) + else: + pvalue = int(cuuint32_t(value)) + cyvalue = pvalue + cdef cydriver.CUdeviceptr cyaddr + if addr is None: + paddr = 0 + elif isinstance(addr, (CUdeviceptr,)): + paddr = int(addr) + else: + paddr = int(CUdeviceptr(addr)) + cyaddr = paddr + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + with nogil: + err = cydriver.cuStreamWaitValue32(cystream, cyaddr, cyvalue, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamWaitValue64(stream, addr, value, unsigned int flags): + """ Wait on a memory location. + + Enqueues a synchronization of the stream on the given memory location. + Work ordered after the operation will block until the given condition + on the memory is satisfied. By default, the condition is to wait for + (int64_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other + condition types can be specified via `flags`. + + If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the + device pointer should be obtained with + :py:obj:`~.cuMemHostGetDevicePointer()`. + + Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()` + and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to synchronize on the memory location. + addr : :py:obj:`~.CUdeviceptr` + The memory location to wait on. + value : Any + The value to compare with the memory location. + flags : unsigned int + See :py:obj:`~.CUstreamWaitValue_flags`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuStreamWaitEvent` + + Notes + ----- + Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. + """ + cdef cydriver.cuuint64_t cyvalue + if value is None: + pvalue = 0 + elif isinstance(value, (cuuint64_t,)): + pvalue = int(value) + else: + pvalue = int(cuuint64_t(value)) + cyvalue = pvalue + cdef cydriver.CUdeviceptr cyaddr + if addr is None: + paddr = 0 + elif isinstance(addr, (CUdeviceptr,)): + paddr = int(addr) + else: + paddr = int(CUdeviceptr(addr)) + cyaddr = paddr + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + with nogil: + err = cydriver.cuStreamWaitValue64(cystream, cyaddr, cyvalue, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamWriteValue32(stream, addr, value, unsigned int flags): + """ Write a value to memory. + + Write a value to memory. + + If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the + device pointer should be obtained with + :py:obj:`~.cuMemHostGetDevicePointer()`. This function cannot be used + with managed memory (:py:obj:`~.cuMemAllocManaged`). + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to do the write in. + addr : :py:obj:`~.CUdeviceptr` + The device address to write to. + value : Any + The value to write. + flags : unsigned int + See :py:obj:`~.CUstreamWriteValue_flags`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord` + """ + cdef cydriver.cuuint32_t cyvalue + if value is None: + pvalue = 0 + elif isinstance(value, (cuuint32_t,)): + pvalue = int(value) + else: + pvalue = int(cuuint32_t(value)) + cyvalue = pvalue + cdef cydriver.CUdeviceptr cyaddr + if addr is None: + paddr = 0 + elif isinstance(addr, (CUdeviceptr,)): + paddr = int(addr) + else: + paddr = int(CUdeviceptr(addr)) + cyaddr = paddr + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + with nogil: + err = cydriver.cuStreamWriteValue32(cystream, cyaddr, cyvalue, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamWriteValue64(stream, addr, value, unsigned int flags): + """ Write a value to memory. + + Write a value to memory. + + If the memory was registered via :py:obj:`~.cuMemHostRegister()`, the + device pointer should be obtained with + :py:obj:`~.cuMemHostGetDevicePointer()`. + + Support for this can be queried with :py:obj:`~.cuDeviceGetAttribute()` + and :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to do the write in. + addr : :py:obj:`~.CUdeviceptr` + The device address to write to. + value : Any + The value to write. + flags : unsigned int + See :py:obj:`~.CUstreamWriteValue_flags`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuMemHostRegister`, :py:obj:`~.cuEventRecord` + """ + cdef cydriver.cuuint64_t cyvalue + if value is None: + pvalue = 0 + elif isinstance(value, (cuuint64_t,)): + pvalue = int(value) + else: + pvalue = int(cuuint64_t(value)) + cyvalue = pvalue + cdef cydriver.CUdeviceptr cyaddr + if addr is None: + paddr = 0 + elif isinstance(addr, (CUdeviceptr,)): + paddr = int(addr) + else: + paddr = int(CUdeviceptr(addr)) + cyaddr = paddr + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + with nogil: + err = cydriver.cuStreamWriteValue64(cystream, cyaddr, cyvalue, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamBatchMemOp(stream, unsigned int count, paramArray : Optional[tuple[CUstreamBatchMemOpParams] | list[CUstreamBatchMemOpParams]], unsigned int flags): + """ Batch operations to synchronize the stream via memory operations. + + This is a batch version of :py:obj:`~.cuStreamWaitValue32()` and + :py:obj:`~.cuStreamWriteValue32()`. Batching operations may avoid some + performance overhead in both the API call and the device execution + versus adding them to the stream in separate API calls. The operations + are enqueued in the order they appear in the array. + + See :py:obj:`~.CUstreamBatchMemOpType` for the full set of supported + operations, and :py:obj:`~.cuStreamWaitValue32()`, + :py:obj:`~.cuStreamWaitValue64()`, :py:obj:`~.cuStreamWriteValue32()`, + and :py:obj:`~.cuStreamWriteValue64()` for details of specific + operations. + + See related APIs for details on querying support for specific + operations. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. + count : unsigned int + The number of operations in the array. Must be less than 256. + paramArray : list[:py:obj:`~.CUstreamBatchMemOpParams`] + The types and parameters of the individual operations. + flags : unsigned int + Reserved for future expansion; must be 0. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuMemHostRegister` + + Notes + ----- + Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html). + """ + paramArray = [] if paramArray is None else paramArray + if not all(isinstance(_x, (CUstreamBatchMemOpParams,)) for _x in paramArray): + raise TypeError("Argument 'paramArray' is not instance of type (expected tuple[cydriver.CUstreamBatchMemOpParams,] or list[cydriver.CUstreamBatchMemOpParams,]") + cdef cydriver.CUstream cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + else: + pstream = int(CUstream(stream)) + cystream = pstream + if count > len(paramArray): raise RuntimeError("List is too small: " + str(len(paramArray)) + " < " + str(count)) + cdef cydriver.CUstreamBatchMemOpParams* cyparamArray = NULL + if len(paramArray) > 1: + cyparamArray = calloc(len(paramArray), sizeof(cydriver.CUstreamBatchMemOpParams)) + if cyparamArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) + for idx in range(len(paramArray)): + string.memcpy(&cyparamArray[idx], (paramArray[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + elif len(paramArray) == 1: + cyparamArray = (paramArray[0])._pvt_ptr + with nogil: + err = cydriver.cuStreamBatchMemOp(cystream, count, cyparamArray, flags) + if len(paramArray) > 1 and cyparamArray is not NULL: + free(cyparamArray) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc): + """ Returns information about a function. + + Returns in `*pi` the integer value of the attribute `attrib` on the + kernel given by `hfunc`. The supported attributes are: + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK`: The maximum + number of threads per block, beyond which a launch of the function + would fail. This number depends on both the function and the device + on which the function is currently loaded. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`: The size in bytes of + statically-allocated shared memory per block required by this + function. This does not include dynamically-allocated shared memory + requested by the user at runtime. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES`: The size in bytes of + user-allocated constant memory required by this function. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES`: The size in bytes of + local memory used by each thread of this function. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NUM_REGS`: The number of registers used + by each thread of this function. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PTX_VERSION`: The PTX virtual + architecture version for which the function was compiled. This value + is the major PTX version * 10 + + - the minor PTX version, so a PTX version 1.3 function would return + the value 13. Note that this may return the undefined value of 0 + for cubins compiled prior to CUDA 3.0. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_BINARY_VERSION`: The binary architecture + version for which the function was compiled. This value is the major + binary version * 10 + the minor binary version, so a binary version + 1.3 function would return the value 13. Note that this will return a + value of 10 for legacy cubins that do not have a properly-encoded + binary architecture version. + + - :py:obj:`~.CU_FUNC_CACHE_MODE_CA`: The attribute to indicate whether + the function has been compiled with user specified option "-Xptxas + --dlcm=ca" set . + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: The + maximum size in bytes of dynamically-allocated shared memory. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`: + Preferred shared memory-L1 cache split ratio in percent of total + shared memory. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET`: If this + attribute is set, the kernel must launch with a valid cluster size + specified. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required + cluster width in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required + cluster height in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required + cluster depth in blocks. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`: + Indicates whether the function can be launched with non-portable + cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster + size may only function on the specific SKUs the program is tested on. + The launch might fail if the program is run on a different hardware + platform. CUDA API provides cudaOccupancyMaxActiveClusters to assist + with checking whether the desired size can be launched on the current + device. A portable cluster size is guaranteed to be functional on all + compute capabilities higher than the target compute capability. The + portable cluster size for sm_90 is 8 blocks per cluster. This value + may increase for future compute capabilities. The specific hardware + unit may support higher cluster sizes that’s not guaranteed to be + portable. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`: + The block scheduling policy of a function. The value type is + CUclusterSchedulingPolicy. + + With a few execeptions, function attributes may also be queried on + unloaded function handles returned from + :py:obj:`~.cuModuleEnumerateFunctions`. + :py:obj:`~.CUDA_ERROR_FUNCTION_NOT_LOADED` is returned if the attribute + requires a fully loaded function but the function is not loaded. The + loading state of a function may be queried using + :py:obj:`~.cuFuncIsloaded`. :py:obj:`~.cuFuncLoad` may be called to + explicitly load a function before querying the following attributes + that require the function to be loaded: + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK` + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES` + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES` + + Parameters + ---------- + attrib : :py:obj:`~.CUfunction_attribute` + Attribute requested + hfunc : :py:obj:`~.CUfunction` + Function to query attribute of + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_FUNCTION_NOT_LOADED` + pi : int + Returned attribute value + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cudaFuncSetAttribute`, :py:obj:`~.cuFuncIsLoaded`, :py:obj:`~.cuFuncLoad`, :py:obj:`~.cuKernelGetAttribute` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef int pi = 0 + cdef cydriver.CUfunction_attribute cyattrib = attrib.value + with nogil: + err = cydriver.cuFuncGetAttribute(&pi, cyattrib, cyhfunc) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pi) + +@cython.embedsignature(True) +def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value): + """ Sets information about a function. + + This call sets the value of a specified attribute `attrib` on the + kernel given by `hfunc` to an integer value specified by `val` This + function returns CUDA_SUCCESS if the new value of the attribute could + be successfully set. If the set fails, this call will return an error. + Not all attributes can have values set. Attempting to set a value on a + read-only attribute will result in an error (CUDA_ERROR_INVALID_VALUE) + + Supported attributes for the cuFuncSetAttribute call are: + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES`: This + maximum size in bytes of dynamically-allocated shared memory. The + value should contain the requested maximum size of dynamically- + allocated shared memory. The sum of this value and the function + attribute :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` cannot + exceed the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`. + The maximal size of requestable dynamic shared memory may differ by + GPU architecture. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`: On + devices where the L1 cache and shared memory use the same hardware + resources, this sets the shared memory carveout preference, in + percent of the total shared memory. See + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR` + This is only a hint, and the driver can choose a different ratio if + required to execute the function. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH`: The required + cluster width in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT`: The required + cluster height in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH`: The required + cluster depth in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return CUDA_ERROR_NOT_PERMITTED. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED`: + Indicates whether the function can be launched with non-portable + cluster size. 1 is allowed, 0 is disallowed. + + - :py:obj:`~.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE`: + The block scheduling policy of a function. The value type is + CUclusterSchedulingPolicy. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Function to query attribute of + attrib : :py:obj:`~.CUfunction_attribute` + Attribute requested + value : int + The value to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cudaFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef cydriver.CUfunction_attribute cyattrib = attrib.value + with nogil: + err = cydriver.cuFuncSetAttribute(cyhfunc, cyattrib, value) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache): + """ Sets the preferred cache configuration for a device function. + + On devices where the L1 cache and shared memory use the same hardware + resources, this sets through `config` the preferred cache configuration + for the device function `hfunc`. This is only a preference. The driver + will use the requested configuration if possible, but it is free to + choose a different configuration if required to execute `hfunc`. Any + context-wide preference set via :py:obj:`~.cuCtxSetCacheConfig()` will + be overridden by this per-function setting unless the per-function + setting is :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`. In that case, the + current context-wide setting will be used. + + This setting does nothing on devices where the size of the L1 cache and + shared memory are fixed. + + Launching a kernel with a different preference than the most recent + preference setting may insert a device-side synchronization point. + + The supported cache configurations are: + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_NONE`: no preference for shared + memory or L1 (default) + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_SHARED`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_L1`: prefer larger L1 cache and + smaller shared memory + + - :py:obj:`~.CU_FUNC_CACHE_PREFER_EQUAL`: prefer equal sized L1 cache + and shared memory + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to configure cache for + config : :py:obj:`~.CUfunc_cache` + Requested cache configuration + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncSetCacheConfig`, :py:obj:`~.cuKernelSetCacheConfig` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef cydriver.CUfunc_cache cyconfig = config.value + with nogil: + err = cydriver.cuFuncSetCacheConfig(cyhfunc, cyconfig) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncGetModule(hfunc): + """ Returns a module handle. + + Returns in `*hmod` the handle of the module that function `hfunc` is + located in. The lifetime of the module corresponds to the lifetime of + the context it was loaded in or until the module is explicitly + unloaded. + + The CUDA runtime manages its own modules loaded into the primary + context. If the handle returned by this API refers to a module loaded + by the CUDA runtime, calling :py:obj:`~.cuModuleUnload()` on that + module will result in undefined behavior. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Function to retrieve module for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + hmod : :py:obj:`~.CUmodule` + Returned module handle + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef CUmodule hmod = CUmodule() + with nogil: + err = cydriver.cuFuncGetModule(hmod._pvt_ptr, cyhfunc) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], hmod) + +@cython.embedsignature(True) +def cuFuncGetName(hfunc): + """ Returns the function name for a :py:obj:`~.CUfunction` handle. + + Returns in `**name` the function name associated with the function + handle `hfunc` . The function name is returned as a null-terminated + string. The returned name is only valid when the function handle is + valid. If the module is unloaded or reloaded, one must call the API + again to get the updated name. This API may return a mangled name if + the function is not declared as having C linkage. If either `**name` or + `hfunc` is NULL, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + The function handle to retrieve the name for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + name : bytes + The returned name of the function + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef const char* name = NULL + with nogil: + err = cydriver.cuFuncGetName(&name, cyhfunc) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], name if name != NULL else None) + +@cython.embedsignature(True) +def cuFuncGetParamInfo(func, size_t paramIndex): + """ Returns the offset and size of a kernel parameter in the device-side parameter layout. + + Queries the kernel parameter at `paramIndex` into `func's` list of + parameters, and returns in `paramOffset` and `paramSize` the offset and + size, respectively, where the parameter will reside in the device-side + parameter layout. This information can be used to update kernel node + parameters from the device via + :py:obj:`~.cudaGraphKernelNodeSetParam()` and + :py:obj:`~.cudaGraphKernelNodeUpdatesApply()`. `paramIndex` must be + less than the number of parameters that `func` takes. `paramSize` can + be set to NULL if only the parameter offset is desired. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + The function to query + paramIndex : size_t + The parameter index to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + paramOffset : int + Returns the offset into the device-side parameter layout at which + the parameter resides + paramSize : int + Optionally returns the size of the parameter in the device-side + parameter layout + + See Also + -------- + :py:obj:`~.cuKernelGetParamInfo` + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef size_t paramOffset = 0 + cdef size_t paramSize = 0 + with nogil: + err = cydriver.cuFuncGetParamInfo(cyfunc, paramIndex, ¶mOffset, ¶mSize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], paramOffset, paramSize) + +@cython.embedsignature(True) +def cuFuncIsLoaded(function): + """ Returns if the function is loaded. + + Returns in `state` the loading state of `function`. + + Parameters + ---------- + function : :py:obj:`~.CUfunction` + the function to check + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + state : :py:obj:`~.CUfunctionLoadingState` + returned loading state + + See Also + -------- + :py:obj:`~.cuFuncLoad`, :py:obj:`~.cuModuleEnumerateFunctions` + """ + cdef cydriver.CUfunction cyfunction + if function is None: + pfunction = 0 + elif isinstance(function, (CUfunction,)): + pfunction = int(function) + else: + pfunction = int(CUfunction(function)) + cyfunction = pfunction + cdef cydriver.CUfunctionLoadingState state + with nogil: + err = cydriver.cuFuncIsLoaded(&state, cyfunction) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUfunctionLoadingState(state)) + +@cython.embedsignature(True) +def cuFuncLoad(function): + """ Loads a function. + + Finalizes function loading for `function`. Calling this API with a + fully loaded function has no effect. + + Parameters + ---------- + function : :py:obj:`~.CUfunction` + the function to load + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuModuleEnumerateFunctions`, :py:obj:`~.cuFuncIsLoaded` + """ + cdef cydriver.CUfunction cyfunction + if function is None: + pfunction = 0 + elif isinstance(function, (CUfunction,)): + pfunction = int(function) + else: + pfunction = int(CUfunction(function)) + cyfunction = pfunction + with nogil: + err = cydriver.cuFuncLoad(cyfunction) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra): + """ Launches a CUDA function :py:obj:`~.CUfunction` or a CUDA kernel :py:obj:`~.CUkernel`. + + Invokes the function :py:obj:`~.CUfunction` or the kernel + :py:obj:`~.CUkernel` `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid + of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ` + threads. + + `sharedMemBytes` sets the amount of dynamic shared memory that will be + available to each thread block. + + Kernel parameters to `f` can be specified in one of two ways: + + 1) Kernel parameters can be specified via `kernelParams`. If `f` has N + parameters, then `kernelParams` needs to be an array of N pointers. + Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a + region of memory from which the actual kernel parameter will be copied. + The number of kernel parameters and their offsets and sizes do not need + to be specified as that information is retrieved directly from the + kernel's image. + + 2) Kernel parameters can also be packaged by the application into a + single buffer that is passed in via the `extra` parameter. This places + the burden on the application of knowing each kernel parameter's size + and alignment/padding within the buffer. Here is an example of using + the `extra` parameter in this manner: + + **View CUDA Toolkit Documentation for a C++ code example** + + The `extra` parameter exists to allow :py:obj:`~.cuLaunchKernel` to + take additional less commonly used arguments. `extra` specifies a list + of names of extra settings and their corresponding values. Each extra + setting name is immediately followed by the corresponding value. The + list must be terminated with either NULL or + :py:obj:`~.CU_LAUNCH_PARAM_END`. + + - :py:obj:`~.CU_LAUNCH_PARAM_END`, which indicates the end of the + `extra` array; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`, which specifies that the + next value in `extra` will be a pointer to a buffer containing all + the kernel parameters for launching kernel `f`; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE`, which specifies that the + next value in `extra` will be a pointer to a size_t containing the + size of the buffer specified with + :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`; + + The error :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if + kernel parameters are specified with both `kernelParams` and `extra` + (i.e. both `kernelParams` and `extra` are non-NULL). + + Calling :py:obj:`~.cuLaunchKernel()` invalidates the persistent + function state set through the following deprecated APIs: + :py:obj:`~.cuFuncSetBlockShape()`, :py:obj:`~.cuFuncSetSharedSize()`, + :py:obj:`~.cuParamSetSize()`, :py:obj:`~.cuParamSeti()`, + :py:obj:`~.cuParamSetf()`, :py:obj:`~.cuParamSetv()`. + + Note that to use :py:obj:`~.cuLaunchKernel()`, the kernel `f` must + either have been compiled with toolchain version 3.2 or later so that + it will contain kernel parameter information, or have no kernel + parameters. If either of these conditions is not met, then + :py:obj:`~.cuLaunchKernel()` will return + :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`. + + Note that the API can also be used to launch context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to launch the + kernel on will either be taken from the specified stream `hStream` or + the current context in case of NULL stream. + + Parameters + ---------- + f : :py:obj:`~.CUfunction` + Function :py:obj:`~.CUfunction` or Kernel :py:obj:`~.CUkernel` to + launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + extra : list[Any] + Extra options + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuKernelSetCacheConfig`, :py:obj:`~.cuKernelGetAttribute`, :py:obj:`~.cuKernelSetAttribute` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + cykernelParams = _HelperKernelParams(kernelParams) + cdef void** cykernelParams_ptr = cykernelParams.ckernelParams + with nogil: + err = cydriver.cuLaunchKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr, extra) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_ptr extra): + """ Launches a CUDA function :py:obj:`~.CUfunction` or a CUDA kernel :py:obj:`~.CUkernel` with launch-time configuration. + + Invokes the function :py:obj:`~.CUfunction` or the kernel + :py:obj:`~.CUkernel` `f` with the specified launch-time configuration + `config`. + + The :py:obj:`~.CUlaunchConfig` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.CUlaunchConfig.gridDimX` is the width of the grid in + blocks. + + - :py:obj:`~.CUlaunchConfig.gridDimY` is the height of the grid in + blocks. + + - :py:obj:`~.CUlaunchConfig.gridDimZ` is the depth of the grid in + blocks. + + - :py:obj:`~.CUlaunchConfig.blockDimX` is the X dimension of each + thread block. + + - :py:obj:`~.CUlaunchConfig.blockDimX` is the Y dimension of each + thread block. + + - :py:obj:`~.CUlaunchConfig.blockDimZ` is the Z dimension of each + thread block. + + - :py:obj:`~.CUlaunchConfig.sharedMemBytes` is the dynamic shared- + memory size per thread block in bytes. + + - :py:obj:`~.CUlaunchConfig.hStream` is the handle to the stream to + perform the launch in. The CUDA context associated with this stream + must match that associated with function f. + + - :py:obj:`~.CUlaunchConfig.attrs` is an array of + :py:obj:`~.CUlaunchConfig.numAttrs` continguous + :py:obj:`~.CUlaunchAttribute` elements. The value of this pointer is + not considered if :py:obj:`~.CUlaunchConfig.numAttrs` is zero. + However, in that case, it is recommended to set the pointer to NULL. + + - :py:obj:`~.CUlaunchConfig.numAttrs` is the number of attributes + populating the first :py:obj:`~.CUlaunchConfig.numAttrs` positions of + the :py:obj:`~.CUlaunchConfig.attrs` array. + + Launch-time configuration is specified by adding entries to + :py:obj:`~.CUlaunchConfig.attrs`. Each entry is an attribute ID and a + corresponding attribute value. + + The :py:obj:`~.CUlaunchAttribute` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.CUlaunchAttribute.id` is a unique enum identifying the + attribute. + + - :py:obj:`~.CUlaunchAttribute.value` is a union that hold the + attribute value. + + An example of using the `config` parameter: + + **View CUDA Toolkit Documentation for a C++ code example** + + The :py:obj:`~.CUlaunchAttributeID` enum is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + and the corresponding :py:obj:`~.CUlaunchAttributeValue` union as : + + **View CUDA Toolkit Documentation for a C++ code example** + + Setting :py:obj:`~.CU_LAUNCH_ATTRIBUTE_COOPERATIVE` to a non-zero value + causes the kernel launch to be a cooperative launch, with exactly the + same usage and semantics of :py:obj:`~.cuLaunchCooperativeKernel`. + + Setting + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION` to a + non-zero values causes the kernel to use programmatic means to resolve + its stream dependency -- enabling the CUDA runtime to opportunistically + allow the grid's execution to overlap with the previous kernel in the + stream, if that kernel requests the overlap. + + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT` records an event + along with the kernel launch. Event recorded through this launch + attribute is guaranteed to only trigger after all block in the + associated kernel trigger the event. A block can trigger the event + through PTX launchdep.release or CUDA builtin function + cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be + inserted at the beginning of each block's execution if + triggerAtBlockStart is set to non-0. Note that dependents (including + the CPU thread calling :py:obj:`~.cuEventSynchronize()`) are not + guaranteed to observe the release precisely when it is released. For + example, :py:obj:`~.cuEventSynchronize()` may only observe the event + trigger long after the associated kernel has completed. This recording + type is primarily meant for establishing programmatic dependency + between device tasks. The event supplied must not be an interprocess or + interop event. The event must disable timing (i.e. created with + :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT` records an + event along with the kernel launch. Nominally, the event is triggered + once all blocks of the kernel have begun execution. Currently this is a + best effort. If a kernel B has a launch completion dependency on a + kernel A, B may wait until A is complete. Alternatively, blocks of B + may begin before all blocks of A have begun, for example: + + - If B can claim execution resources unavailable to A, for example if + they run on different GPUs. + + - If B is a higher priority than A. + + Exercise caution if such an ordering inversion could lead to deadlock. + The event supplied must not be an interprocess or interop event. The + event must disable timing (i.e. must be created with the + :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). + + Setting :py:obj:`~.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE` to + 1 on a captured launch causes the resulting kernel node to be device- + updatable. This attribute is specific to graphs, and passing it to a + launch in a non-capturing stream results in an error. Passing a value + other than 0 or 1 is not allowed. + + On success, a handle will be returned via + :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode + which can be passed to the various device-side update functions to + update the node's kernel parameters from within another kernel. For + more information on the types of device updates that can be made, as + well as the relevant limitations thereof, see + :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + + Kernel nodes which are device-updatable have additional restrictions + compared to regular kernel nodes. Firstly, device-updatable nodes + cannot be removed from their graph via :py:obj:`~.cuGraphDestroyNode`. + Additionally, once opted-in to this functionality, a node cannot opt + out, and any attempt to set the attribute to 0 will result in an error. + Graphs containing one or more device-updatable node also do not allow + multiple instantiation. + + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION` allows the + kernel launch to specify a preferred substitute cluster dimension. + Blocks may be grouped according to either the dimensions specified with + this attribute (grouped into a "preferred substitute cluster"), or the + one specified with :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` + attribute (grouped into a "regular cluster"). The cluster dimensions of + a "preferred substitute cluster" shall be an integer multiple greater + than zero of the regular cluster dimensions. The device will attempt - + on a best-effort basis - to group thread blocks into preferred clusters + over grouping them into regular clusters. When it deems necessary + (primarily when the device temporarily runs out of physical resources + to launch the larger preferred clusters), the device may switch to + launch the regular clusters instead to attempt to utilize as much of + the physical device resources as possible. + + Each type of cluster will have its enumeration / coordinate setup as if + the grid consists solely of its type of cluster. For example, if the + preferred substitute cluster dimensions double the regular cluster + dimensions, there might be simultaneously a regular cluster indexed at + (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, + the preferred substitute cluster (1,0,0) replaces regular clusters + (2,0,0) and (3,0,0) and groups their blocks. + + This attribute will only take effect when a regular cluster dimension + has been specified. The preferred substitute The preferred substitute + cluster dimension must be an integer multiple greater than zero of the + regular cluster dimension and must divide the grid. It must also be no + more than `maxBlocksPerCluster`, if it is set in the kernel's + `__launch_bounds__`. Otherwise it must be less than the maximum value + the driver can support. Otherwise, setting this attribute to a value + physically unable to fit on any particular device is permitted. + + The effect of other attributes is consistent with their effect when set + via persistent APIs. + + See :py:obj:`~.cuStreamSetAttribute` for + + - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW` + + - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY` + + See :py:obj:`~.cuFuncSetAttribute` for + + - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` + + - :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE` + + Kernel parameters to `f` can be specified in the same ways that they + can be using :py:obj:`~.cuLaunchKernel`. + + Note that the API can also be used to launch context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to launch the + kernel on will either be taken from the specified stream + :py:obj:`~.CUlaunchConfig.hStream` or the current context in case of + NULL stream. + + Parameters + ---------- + config : :py:obj:`~.CUlaunchConfig` + Config to launch + f : :py:obj:`~.CUfunction` + Function :py:obj:`~.CUfunction` or Kernel :py:obj:`~.CUkernel` to + launch + kernelParams : Any + Array of pointers to kernel parameters + extra : list[Any] + Extra options + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaLaunchKernelEx`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuKernelSetCacheConfig`, :py:obj:`~.cuKernelGetAttribute`, :py:obj:`~.cuKernelSetAttribute` + """ + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + cykernelParams = _HelperKernelParams(kernelParams) + cdef void** cykernelParams_ptr = cykernelParams.ckernelParams + with nogil: + err = cydriver.cuLaunchKernelEx(cyconfig_ptr, cyf, cykernelParams_ptr, extra) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams): + """ Launches a CUDA function :py:obj:`~.CUfunction` or a CUDA kernel :py:obj:`~.CUkernel` where thread blocks can cooperate and synchronize as they execute. + + Invokes the function :py:obj:`~.CUfunction` or the kernel + :py:obj:`~.CUkernel` `f` on a `gridDimX` x `gridDimY` x `gridDimZ` grid + of blocks. Each block contains `blockDimX` x `blockDimY` x `blockDimZ` + threads. + + `sharedMemBytes` sets the amount of dynamic shared memory that will be + available to each thread block. + + The device on which this kernel is invoked must have a non-zero value + for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH`. + + The total number of blocks launched cannot exceed the maximum number of + blocks per multiprocessor as returned by + :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` (or + :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`) times + the number of multiprocessors as specified by the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. + + The kernel cannot make use of CUDA dynamic parallelism. + + Kernel parameters must be specified via `kernelParams`. If `f` has N + parameters, then `kernelParams` needs to be an array of N pointers. + Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a + region of memory from which the actual kernel parameter will be copied. + The number of kernel parameters and their offsets and sizes do not need + to be specified as that information is retrieved directly from the + kernel's image. + + Calling :py:obj:`~.cuLaunchCooperativeKernel()` sets persistent + function state that is the same as function state set through + :py:obj:`~.cuLaunchKernel` API + + When the kernel `f` is launched via + :py:obj:`~.cuLaunchCooperativeKernel()`, the previous block shape, + shared size and parameter info associated with `f` is overwritten. + + Note that to use :py:obj:`~.cuLaunchCooperativeKernel()`, the kernel + `f` must either have been compiled with toolchain version 3.2 or later + so that it will contain kernel parameter information, or have no kernel + parameters. If either of these conditions is not met, then + :py:obj:`~.cuLaunchCooperativeKernel()` will return + :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`. + + Note that the API can also be used to launch context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to launch the + kernel on will either be taken from the specified stream `hStream` or + the current context in case of NULL stream. + + Parameters + ---------- + f : :py:obj:`~.CUfunction` + Function :py:obj:`~.CUfunction` or Kernel :py:obj:`~.CUkernel` to + launch + gridDimX : unsigned int + Width of grid in blocks + gridDimY : unsigned int + Height of grid in blocks + gridDimZ : unsigned int + Depth of grid in blocks + blockDimX : unsigned int + X dimension of each thread block + blockDimY : unsigned int + Y dimension of each thread block + blockDimZ : unsigned int + Z dimension of each thread block + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + kernelParams : Any + Array of pointers to kernel parameters + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED`, :py:obj:`~.CUDA_ERROR_NOT_FOUND` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice`, :py:obj:`~.cudaLaunchCooperativeKernel`, :py:obj:`~.cuLibraryGetKernel`, :py:obj:`~.cuKernelSetCacheConfig`, :py:obj:`~.cuKernelGetAttribute`, :py:obj:`~.cuKernelSetAttribute` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + cykernelParams = _HelperKernelParams(kernelParams) + cdef void** cykernelParams_ptr = cykernelParams.ckernelParams + with nogil: + err = cydriver.cuLaunchCooperativeKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchCooperativeKernelMultiDevice(launchParamsList : Optional[tuple[CUDA_LAUNCH_PARAMS] | list[CUDA_LAUNCH_PARAMS]], unsigned int numDevices, unsigned int flags): + """ Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute. + + [Deprecated] + + Invokes kernels as specified in the `launchParamsList` array where each + element of the array specifies all the parameters required to perform a + single kernel launch. These kernels can cooperate and synchronize as + they execute. The size of the array is specified by `numDevices`. + + No two kernels can be launched on the same device. All the devices + targeted by this multi-device launch must be identical. All devices + must have a non-zero value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH`. + + All kernels launched must be identical with respect to the compiled + code. Note that any device, constant or managed variables present in + the module that owns the kernel launched on each device, are + independently instantiated on every device. It is the application's + responsibility to ensure these variables are initialized and used + appropriately. + + The size of the grids as specified in blocks, the size of the blocks + themselves and the amount of shared memory used by each thread block + must also match across all launched kernels. + + The streams used to launch these kernels must have been created via + either :py:obj:`~.cuStreamCreate` or + :py:obj:`~.cuStreamCreateWithPriority`. The NULL stream or + :py:obj:`~.CU_STREAM_LEGACY` or :py:obj:`~.CU_STREAM_PER_THREAD` cannot + be used. + + The total number of blocks launched per kernel cannot exceed the + maximum number of blocks per multiprocessor as returned by + :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` (or + :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`) times + the number of multiprocessors as specified by the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. Since the total + number of blocks launched per device has to match across all devices, + the maximum number of blocks that can be launched per device will be + limited by the device with the least number of multiprocessors. + + The kernels cannot make use of CUDA dynamic parallelism. + + The :py:obj:`~.CUDA_LAUNCH_PARAMS` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.function` specifies the kernel to be + launched. All functions must be identical with respect to the + compiled code. Note that you can also specify context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then casting to + :py:obj:`~.CUfunction`. In this case, the context to launch the + kernel on be taken from the specified stream + :py:obj:`~.CUDA_LAUNCH_PARAMS.hStream`. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimX` is the width of the grid in + blocks. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimY` is the height of the grid in + blocks. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.gridDimZ` is the depth of the grid in + blocks. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimX` is the X dimension of each + thread block. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimX` is the Y dimension of each + thread block. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.blockDimZ` is the Z dimension of each + thread block. This must match across all kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.sharedMemBytes` is the dynamic shared- + memory size per thread block in bytes. This must match across all + kernels launched. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.hStream` is the handle to the stream to + perform the launch in. This cannot be the NULL stream or + :py:obj:`~.CU_STREAM_LEGACY` or :py:obj:`~.CU_STREAM_PER_THREAD`. The + CUDA context associated with this stream must match that associated + with :py:obj:`~.CUDA_LAUNCH_PARAMS.function`. + + - :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams` is an array of pointers + to kernel parameters. If :py:obj:`~.CUDA_LAUNCH_PARAMS.function` has + N parameters, then :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams` needs + to be an array of N pointers. Each of + :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[0] through + :py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[N-1] must point to a + region of memory from which the actual kernel parameter will be + copied. The number of kernel parameters and their offsets and sizes + do not need to be specified as that information is retrieved directly + from the kernel's image. + + By default, the kernel won't begin execution on any GPU until all prior + work in all the specified streams has completed. This behavior can be + overridden by specifying the flag + :py:obj:`~.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC`. + When this flag is specified, each kernel will only wait for prior work + in the stream corresponding to that GPU to complete before it begins + execution. + + Similarly, by default, any subsequent work pushed in any of the + specified streams will not begin execution until the kernels on all + GPUs have completed. This behavior can be overridden by specifying the + flag + :py:obj:`~.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC`. + When this flag is specified, any subsequent work pushed in any of the + specified streams will only wait for the kernel launched on the GPU + corresponding to that stream to complete before it begins execution. + + Calling :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()` sets + persistent function state that is the same as function state set + through :py:obj:`~.cuLaunchKernel` API when called individually for + each element in `launchParamsList`. + + When kernels are launched via + :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()`, the previous block + shape, shared size and parameter info associated with each + :py:obj:`~.CUDA_LAUNCH_PARAMS.function` in `launchParamsList` is + overwritten. + + Note that to use :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()`, + the kernels must either have been compiled with toolchain version 3.2 + or later so that it will contain kernel parameter information, or have + no kernel parameters. If either of these conditions is not met, then + :py:obj:`~.cuLaunchCooperativeKernelMultiDevice()` will return + :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`. + + Parameters + ---------- + launchParamsList : list[:py:obj:`~.CUDA_LAUNCH_PARAMS`] + List of launch parameters, one per device + numDevices : unsigned int + Size of the `launchParamsList` array + flags : unsigned int + Flags to control launch behavior + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_IMAGE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchCooperativeKernel`, :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` + """ + launchParamsList = [] if launchParamsList is None else launchParamsList + if not all(isinstance(_x, (CUDA_LAUNCH_PARAMS,)) for _x in launchParamsList): + raise TypeError("Argument 'launchParamsList' is not instance of type (expected tuple[cydriver.CUDA_LAUNCH_PARAMS,] or list[cydriver.CUDA_LAUNCH_PARAMS,]") + cdef cydriver.CUDA_LAUNCH_PARAMS* cylaunchParamsList = NULL + if len(launchParamsList) > 1: + cylaunchParamsList = calloc(len(launchParamsList), sizeof(cydriver.CUDA_LAUNCH_PARAMS)) + if cylaunchParamsList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(cydriver.CUDA_LAUNCH_PARAMS))) + for idx in range(len(launchParamsList)): + string.memcpy(&cylaunchParamsList[idx], (launchParamsList[idx])._pvt_ptr, sizeof(cydriver.CUDA_LAUNCH_PARAMS)) + elif len(launchParamsList) == 1: + cylaunchParamsList = (launchParamsList[0])._pvt_ptr + if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices)) + with nogil: + err = cydriver.cuLaunchCooperativeKernelMultiDevice(cylaunchParamsList, numDevices, flags) + if len(launchParamsList) > 1 and cylaunchParamsList is not NULL: + free(cylaunchParamsList) + return (_dict_CUresult[err],) + +ctypedef struct cuHostCallbackData_st: + cydriver.CUhostFn callback + void *userData + +ctypedef cuHostCallbackData_st cuHostCallbackData + +@cython.show_performance_hints(False) +cdef void cuHostCallbackWrapper(void *data) nogil: + cdef cuHostCallbackData *cbData = data + with gil: + cbData.callback(cbData.userData) + free(cbData) + +@cython.embedsignature(True) +def cuLaunchHostFunc(hStream, fn, userData): + """ Enqueues a host function call in a stream. + + Enqueues a host function to run in a stream. The function will be + called after currently enqueued work and will block work added after + it. + + The host function must not make any CUDA API calls. Attempting to use a + CUDA API may result in :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, but this + is not required. The host function must not perform any synchronization + that may depend on outstanding CUDA work not mandated to run earlier. + Host functions without a mandated order (such as in independent + streams) execute in undefined order and may be serialized. + + For the purposes of Unified Memory, execution makes a number of + guarantees: + + - The stream is considered idle for the duration of the function's + execution. Thus, for example, the function may always use memory + attached to the stream it was enqueued in. + + - The start of execution of the function has the same effect as + synchronizing an event recorded in the same stream immediately prior + to the function. It thus synchronizes streams which have been + "joined" prior to the function. + + - Adding device work to any stream does not have the effect of making + the stream active until all preceding host functions and stream + callbacks have executed. Thus, for example, a function might use + global attached memory even if work has been added to another stream, + if the work has been ordered behind the function call with an event. + + - Completion of the function does not cause a stream to become active + except as described above. The stream will remain idle if no device + work follows the function, and will remain idle across consecutive + host functions or stream callbacks without device work in between. + Thus, for example, stream synchronization can be done by signaling + from a host function at the end of the stream. + + Note that, in contrast to :py:obj:`~.cuStreamAddCallback`, the function + will not be called in the event of an error in the CUDA context. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue function call in + fn : :py:obj:`~.CUhostFn` + The function to call once preceding stream operations are complete + userData : Any + User-specified data to be passed to the function + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuMemAllocManaged`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cuStreamAddCallback` + """ + cdef cydriver.CUhostFn cyfn + if fn is None: + pfn = 0 + elif isinstance(fn, (CUhostFn,)): + pfn = int(fn) + else: + pfn = int(CUhostFn(fn)) + cyfn = pfn + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cuHostCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (CUresult.CUDA_ERROR_OUT_OF_MEMORY,) + cbData.callback = cyfn + cbData.userData = cyuserData_ptr + + with nogil: + err = cydriver.cuLaunchHostFunc(cyhStream, cuHostCallbackWrapper, cbData) + if err != cydriver.CUDA_SUCCESS: + free(cbData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncSetBlockShape(hfunc, int x, int y, int z): + """ Sets the block-dimensions for the function. + + [Deprecated] + + Specifies the `x`, `y`, and `z` dimensions of the thread blocks that + are created when the kernel given by `hfunc` is launched. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to specify dimensions of + x : int + X dimension + y : int + Y dimension + z : int + Z dimension + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuFuncSetBlockShape(cyhfunc, x, y, z) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncSetSharedSize(hfunc, unsigned int numbytes): + """ Sets the dynamic shared-memory size for the function. + + [Deprecated] + + Sets through `numbytes` the amount of dynamic shared memory that will + be available to each thread block when the kernel given by `hfunc` is + launched. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to specify dynamic shared-memory size for + numbytes : unsigned int + Dynamic shared-memory size per thread in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetCacheConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuFuncSetSharedSize(cyhfunc, numbytes) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuParamSetSize(hfunc, unsigned int numbytes): + """ Sets the parameter size for the function. + + [Deprecated] + + Sets through `numbytes` the total size in bytes needed by the function + parameters of the kernel corresponding to `hfunc`. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to set parameter size for + numbytes : unsigned int + Size of parameter list in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuParamSetSize(cyhfunc, numbytes) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuParamSeti(hfunc, int offset, unsigned int value): + """ Adds an integer parameter to the function's argument list. + + [Deprecated] + + Sets an integer parameter that will be specified the next time the + kernel corresponding to `hfunc` will be invoked. `offset` is a byte + offset. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to add parameter to + offset : int + Offset to add parameter to argument list + value : unsigned int + Value of parameter + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuParamSeti(cyhfunc, offset, value) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuParamSetf(hfunc, int offset, float value): + """ Adds a floating-point parameter to the function's argument list. + + [Deprecated] + + Sets a floating-point parameter that will be specified the next time + the kernel corresponding to `hfunc` will be invoked. `offset` is a byte + offset. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to add parameter to + offset : int + Offset to add parameter to argument list + value : float + Value of parameter + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuParamSetf(cyhfunc, offset, value) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes): + """ Adds arbitrary data to the function's argument list. + + [Deprecated] + + Copies an arbitrary amount of data (specified in `numbytes`) from `ptr` + into the parameter space of the kernel corresponding to `hfunc`. + `offset` is a byte offset. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to add data to + offset : int + Offset to add data to argument list + ptr : Any + Pointer to arbitrary data + numbytes : unsigned int + Size of data to copy in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cydriver.cuParamSetv(cyhfunc, offset, cyptr_ptr, numbytes) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunch(f): + """ Launches a CUDA function. + + [Deprecated] + + Invokes the kernel `f` on a 1 x 1 x 1 grid of blocks. The block + contains the number of threads specified by a previous call to + :py:obj:`~.cuFuncSetBlockShape()`. + + The block shape, dynamic shared memory size, and parameter information + must be set using :py:obj:`~.cuFuncSetBlockShape()`, + :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`, + :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and + :py:obj:`~.cuParamSetv()` prior to calling this function. + + Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the + function's block shape, dynamic shared memory size, and parameter + information. After launching via cuLaunchKernel, this state must be re- + initialized prior to calling this function. Failure to do so results in + undefined behavior. + + Parameters + ---------- + f : :py:obj:`~.CUfunction` + Kernel to launch + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + with nogil: + err = cydriver.cuLaunch(cyf) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchGrid(f, int grid_width, int grid_height): + """ Launches a CUDA function. + + [Deprecated] + + Invokes the kernel `f` on a `grid_width` x `grid_height` grid of + blocks. Each block contains the number of threads specified by a + previous call to :py:obj:`~.cuFuncSetBlockShape()`. + + The block shape, dynamic shared memory size, and parameter information + must be set using :py:obj:`~.cuFuncSetBlockShape()`, + :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`, + :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and + :py:obj:`~.cuParamSetv()` prior to calling this function. + + Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the + function's block shape, dynamic shared memory size, and parameter + information. After launching via cuLaunchKernel, this state must be re- + initialized prior to calling this function. Failure to do so results in + undefined behavior. + + Parameters + ---------- + f : :py:obj:`~.CUfunction` + Kernel to launch + grid_width : int + Width of grid in blocks + grid_height : int + Height of grid in blocks + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGridAsync`, :py:obj:`~.cuLaunchKernel` + """ + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + with nogil: + err = cydriver.cuLaunchGrid(cyf, grid_width, grid_height) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream): + """ Launches a CUDA function. + + [Deprecated] + + Invokes the kernel `f` on a `grid_width` x `grid_height` grid of + blocks. Each block contains the number of threads specified by a + previous call to :py:obj:`~.cuFuncSetBlockShape()`. + + The block shape, dynamic shared memory size, and parameter information + must be set using :py:obj:`~.cuFuncSetBlockShape()`, + :py:obj:`~.cuFuncSetSharedSize()`, :py:obj:`~.cuParamSetSize()`, + :py:obj:`~.cuParamSeti()`, :py:obj:`~.cuParamSetf()`, and + :py:obj:`~.cuParamSetv()` prior to calling this function. + + Launching a function via :py:obj:`~.cuLaunchKernel()` invalidates the + function's block shape, dynamic shared memory size, and parameter + information. After launching via cuLaunchKernel, this state must be re- + initialized prior to calling this function. Failure to do so results in + undefined behavior. + + \note_null_stream + + Parameters + ---------- + f : :py:obj:`~.CUfunction` + Kernel to launch + grid_width : int + Width of grid in blocks + grid_height : int + Height of grid in blocks + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_LAUNCH_FAILED`, :py:obj:`~.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, :py:obj:`~.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING`, :py:obj:`~.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED` + + See Also + -------- + :py:obj:`~.cuFuncSetBlockShape`, :py:obj:`~.cuFuncSetSharedSize`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuParamSetSize`, :py:obj:`~.cuParamSetf`, :py:obj:`~.cuParamSeti`, :py:obj:`~.cuParamSetv`, :py:obj:`~.cuLaunch`, :py:obj:`~.cuLaunchGrid`, :py:obj:`~.cuLaunchKernel` + + Notes + ----- + In certain cases where cubins are created with no ABI (i.e., using `ptxas` `None` `no`), this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by growing the per-thread stack as needed per launch and not shrinking it afterwards. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUfunction cyf + if f is None: + pf = 0 + elif isinstance(f, (CUfunction,)): + pf = int(f) + else: + pf = int(CUfunction(f)) + cyf = pf + with nogil: + err = cydriver.cuLaunchGridAsync(cyf, grid_width, grid_height, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuParamSetTexRef(hfunc, int texunit, hTexRef): + """ Adds a texture-reference to the function's argument list. + + [Deprecated] + + Makes the CUDA array or linear memory bound to the texture reference + `hTexRef` available to a device program as a texture. In this version + of CUDA, the texture-reference must be obtained via + :py:obj:`~.cuModuleGetTexRef()` and the `texunit` parameter must be set + to :py:obj:`~.CU_PARAM_TR_DEFAULT`. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + Kernel to add texture-reference to + texunit : int + Texture unit (must be :py:obj:`~.CU_PARAM_TR_DEFAULT`) + hTexRef : :py:obj:`~.CUtexref` + Texture-reference to add to argument list + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + with nogil: + err = cydriver.cuParamSetTexRef(cyhfunc, texunit, cyhTexRef) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig): + """ Sets the shared memory configuration for a device function. + + [Deprecated] + + On devices with configurable shared memory banks, this function will + force all subsequent launches of the specified device function to have + the given shared memory bank size configuration. On any given launch of + the function, the shared memory configuration of the device will be + temporarily changed if needed to suit the function's preferred + configuration. Changes in shared memory configuration between + subsequent launches of functions, may introduce a device side + synchronization point. + + Any per-function setting of shared memory bank size set via + :py:obj:`~.cuFuncSetSharedMemConfig` will override the context wide + setting set with :py:obj:`~.cuCtxSetSharedMemConfig`. + + Changing the shared memory bank size will not increase shared memory + usage or affect occupancy of kernels, but may have major effects on + performance. Larger bank sizes will allow for greater potential + bandwidth to shared memory, but will change what kinds of accesses to + shared memory will result in bank conflicts. + + This function will do nothing on devices with fixed shared memory bank + size. + + The supported bank configurations are: + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE`: use the context's + shared memory configuration when launching this function. + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE`: set shared + memory bank width to be natively four bytes when launching this + function. + + - :py:obj:`~.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE`: set shared + memory bank width to be natively eight bytes when launching this + function. + + Parameters + ---------- + hfunc : :py:obj:`~.CUfunction` + kernel to be given a shared memory config + config : :py:obj:`~.CUsharedconfig` + requested shared memory configuration + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxGetSharedMemConfig`, :py:obj:`~.cuCtxSetSharedMemConfig`, :py:obj:`~.cuFuncGetAttribute`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cudaFuncSetSharedMemConfig` + """ + cdef cydriver.CUfunction cyhfunc + if hfunc is None: + phfunc = 0 + elif isinstance(hfunc, (CUfunction,)): + phfunc = int(hfunc) + else: + phfunc = int(CUfunction(hfunc)) + cyhfunc = phfunc + cdef cydriver.CUsharedconfig cyconfig = config.value + with nogil: + err = cydriver.cuFuncSetSharedMemConfig(cyhfunc, cyconfig) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphCreate(unsigned int flags): + """ Creates a graph. + + Creates an empty graph, which is returned via `phGraph`. + + Parameters + ---------- + flags : unsigned int + Graph creation flags, must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phGraph : :py:obj:`~.CUgraph` + Returns newly created graph + + See Also + -------- + :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphDestroy`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphClone` + """ + cdef CUgraph phGraph = CUgraph() + with nogil: + err = cydriver.cuGraphCreate(phGraph._pvt_ptr, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraph) + +@cython.embedsignature(True) +def cuGraphAddKernelNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_KERNEL_NODE_PARAMS]): + """ Creates a kernel execution node and adds it to a graph. + + Creates a new kernel execution node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + The CUDA_KERNEL_NODE_PARAMS structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + When the graph is launched, the node will invoke kernel `func` on a + (`gridDimX` x `gridDimY` x `gridDimZ`) grid of blocks. Each block + contains (`blockDimX` x `blockDimY` x `blockDimZ`) threads. + + `sharedMemBytes` sets the amount of dynamic shared memory that will be + available to each thread block. + + Kernel parameters to `func` can be specified in one of two ways: + + 1) Kernel parameters can be specified via `kernelParams`. If the kernel + has N parameters, then `kernelParams` needs to be an array of N + pointers. Each pointer, from `kernelParams`[0] to `kernelParams`[N-1], + points to the region of memory from which the actual parameter will be + copied. The number of kernel parameters and their offsets and sizes do + not need to be specified as that information is retrieved directly from + the kernel's image. + + 2) Kernel parameters for non-cooperative kernels can also be packaged + by the application into a single buffer that is passed in via `extra`. + This places the burden on the application of knowing each kernel + parameter's size and alignment/padding within the buffer. The `extra` + parameter exists to allow this function to take additional less + commonly used arguments. `extra` specifies a list of names of extra + settings and their corresponding values. Each extra setting name is + immediately followed by the corresponding value. The list must be + terminated with either NULL or CU_LAUNCH_PARAM_END. + + - :py:obj:`~.CU_LAUNCH_PARAM_END`, which indicates the end of the + `extra` array; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`, which specifies that the + next value in `extra` will be a pointer to a buffer containing all + the kernel parameters for launching kernel `func`; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE`, which specifies that the + next value in `extra` will be a pointer to a size_t containing the + size of the buffer specified with + :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`; + + The error :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if + kernel parameters are specified with both `kernelParams` and `extra` + (i.e. both `kernelParams` and `extra` are non-NULL). + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` will be returned if `extra` is + used for a cooperative kernel. + + The `kernelParams` or `extra` array, as well as the argument values it + points to, are copied during this call. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS` + Parameters for the GPU execution node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuLaunchCooperativeKernel`, :py:obj:`~.cuGraphKernelNodeGetParams`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + + Notes + ----- + Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddKernelNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphKernelNodeGetParams(hNode): + """ Returns a kernel node's parameters. + + Returns the parameters of kernel node `hNode` in `nodeParams`. The + `kernelParams` or `extra` array returned in `nodeParams`, as well as + the argument values it points to, are owned by the node. This memory + remains valid until the node is destroyed or its parameters are + modified, and should not be modified directly. Use + :py:obj:`~.cuGraphKernelNodeSetParams` to update the parameters of this + node. + + The params will contain either `kernelParams` or `extra`, according to + which of these was most recently set on the node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphKernelNodeGetParams(cyhNode, nodeParams._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], nodeParams) + +@cython.embedsignature(True) +def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PARAMS]): + """ Sets a kernel node's parameters. + + Sets the parameters of kernel node `hNode` to `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, copyParams : Optional[CUDA_MEMCPY3D], ctx): + """ Creates a memcpy node and adds it to a graph. + + Creates a new memcpy node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies`. It is + possible for `numDependencies` to be 0, in which case the node will be + placed at the root of the graph. `dependencies` may not have any + duplicate entries. A handle to the new node will be returned in + `phGraphNode`. + + When the graph is launched, the node will perform the memcpy described + by `copyParams`. See :py:obj:`~.cuMemcpy3D()` for a description of the + structure and its restrictions. + + Memcpy nodes have some additional restrictions with regards to managed + memory, if the system contains at least one device which has a zero + value for the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If one or + more of the operands refer to managed memory, then using the memory + type :py:obj:`~.CU_MEMORYTYPE_UNIFIED` is disallowed for those + operand(s). The managed memory will be treated as residing on either + the host or the device, depending on which memory type is specified. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + copyParams : :py:obj:`~.CUDA_MEMCPY3D` + Parameters for the memory copy + ctx : :py:obj:`~.CUcontext` + Context on which to run the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphMemcpyNodeGetParams`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddMemcpyNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cycopyParams_ptr, cyctx) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphMemcpyNodeGetParams(hNode): + """ Returns a memcpy node's parameters. + + Returns the parameters of memcpy node `hNode` in `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodeParams : :py:obj:`~.CUDA_MEMCPY3D` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D() + with nogil: + err = cydriver.cuGraphMemcpyNodeGetParams(cyhNode, nodeParams._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], nodeParams) + +@cython.embedsignature(True) +def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): + """ Sets a memcpy node's parameters. + + Sets the parameters of memcpy node `hNode` to `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_MEMCPY3D` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddMemsetNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, memsetParams : Optional[CUDA_MEMSET_NODE_PARAMS], ctx): + """ Creates a memset node and adds it to a graph. + + Creates a new memset node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies`. It is + possible for `numDependencies` to be 0, in which case the node will be + placed at the root of the graph. `dependencies` may not have any + duplicate entries. A handle to the new node will be returned in + `phGraphNode`. + + The element size must be 1, 2, or 4 bytes. When the graph is launched, + the node will perform the memset described by `memsetParams`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + memsetParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS` + Parameters for the memory set + ctx : :py:obj:`~.CUcontext` + Context on which to run the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphMemsetNodeGetParams`, :py:obj:`~.cuGraphMemsetNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddMemsetNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cymemsetParams_ptr, cyctx) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphMemsetNodeGetParams(hNode): + """ Returns a memset node's parameters. + + Returns the parameters of memset node `hNode` in `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodeParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphMemsetNodeGetParams(cyhNode, nodeParams._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], nodeParams) + +@cython.embedsignature(True) +def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PARAMS]): + """ Sets a memset node's parameters. + + Sets the parameters of memset node `hNode` to `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddHostNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_HOST_NODE_PARAMS]): + """ Creates a host execution node and adds it to a graph. + + Creates a new CPU execution node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + When the graph is launched, the node will invoke the specified CPU + function. Host nodes are not supported under MPS with pre-Volta GPUs. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS` + Parameters for the host node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphHostNodeGetParams`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddHostNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphHostNodeGetParams(hNode): + """ Returns a host node's parameters. + + Returns the parameters of host node `hNode` in `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphHostNodeGetParams(cyhNode, nodeParams._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], nodeParams) + +@cython.embedsignature(True) +def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS]): + """ Sets a host node's parameters. + + Sets the parameters of host node `hNode` to `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuLaunchHostFunc`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddChildGraphNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, childGraph): + """ Creates a child graph node and adds it to a graph. + + Creates a new node which executes an embedded graph, and adds it to + `hGraph` with `numDependencies` dependencies specified via + `dependencies`. It is possible for `numDependencies` to be 0, in which + case the node will be placed at the root of the graph. `dependencies` + may not have any duplicate entries. A handle to the new node will be + returned in `phGraphNode`. + + If `childGraph` contains allocation nodes, free nodes, or conditional + nodes, this call will return an error. + + The node executes an embedded child graph. The child graph is cloned in + this call. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to clone into this node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphClone` + """ + cdef cydriver.CUgraph cychildGraph + if childGraph is None: + pchildGraph = 0 + elif isinstance(childGraph, (CUgraph,)): + pchildGraph = int(childGraph) + else: + pchildGraph = int(CUgraph(childGraph)) + cychildGraph = pchildGraph + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuGraphAddChildGraphNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cychildGraph) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphChildGraphNodeGetGraph(hNode): + """ Gets a handle to the embedded graph of a child graph node. + + Gets a handle to the embedded graph in a child graph node. This call + does not clone the graph. Changes to the graph will be reflected in the + node, and the node retains ownership of the graph. + + Allocation and free nodes cannot be added to the returned graph. + Attempting to do so will return an error. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the embedded graph for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + phGraph : :py:obj:`~.CUgraph` + Location to store a handle to the graph + + See Also + -------- + :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphNodeFindInClone` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUgraph phGraph = CUgraph() + with nogil: + err = cydriver.cuGraphChildGraphNodeGetGraph(cyhNode, phGraph._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraph) + +@cython.embedsignature(True) +def cuGraphAddEmptyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies): + """ Creates an empty node and adds it to a graph. + + Creates a new node which performs no operation, and adds it to `hGraph` + with `numDependencies` dependencies specified via `dependencies`. It is + possible for `numDependencies` to be 0, in which case the node will be + placed at the root of the graph. `dependencies` may not have any + duplicate entries. A handle to the new node will be returned in + `phGraphNode`. + + An empty node performs no operation during execution, but can be used + for transitive ordering. For example, a phased execution graph with 2 + groups of n nodes with a barrier between them can be represented using + an empty node and 2*n dependency edges, rather than no empty node and + n^2 dependency edges. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuGraphAddEmptyNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphAddEventRecordNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, event): + """ Creates an event record node and adds it to a graph. + + Creates a new event record node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and event + specified in `event`. It is possible for `numDependencies` to be 0, in + which case the node will be placed at the root of the graph. + `dependencies` may not have any duplicate entries. A handle to the new + node will be returned in `phGraphNode`. + + Each launch of the graph will record `event` to capture execution of + the node's dependencies. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuGraphAddEventRecordNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cyevent) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphEventRecordNodeGetEvent(hNode): + """ Returns the event associated with an event record node. + + Returns the event of event record node `hNode` in `event_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the event for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + event_out : :py:obj:`~.CUevent` + Pointer to return the event + + See Also + -------- + :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUevent event_out = CUevent() + with nogil: + err = cydriver.cuGraphEventRecordNodeGetEvent(cyhNode, event_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], event_out) + +@cython.embedsignature(True) +def cuGraphEventRecordNodeSetEvent(hNode, event): + """ Sets an event record node's event. + + Sets the event of event record node `hNode` to `event`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the event for + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to use + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + with nogil: + err = cydriver.cuGraphEventRecordNodeSetEvent(cyhNode, cyevent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddEventWaitNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, event): + """ Creates an event wait node and adds it to a graph. + + Creates a new event wait node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and event + specified in `event`. It is possible for `numDependencies` to be 0, in + which case the node will be placed at the root of the graph. + `dependencies` may not have any duplicate entries. A handle to the new + node will be returned in `phGraphNode`. + + The graph node will wait for all work captured in `event`. See + :py:obj:`~.cuEventRecord()` for details on what is captured by an + event. `event` may be from a different context or device than the + launch stream. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuGraphAddEventWaitNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cyevent) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphEventWaitNodeGetEvent(hNode): + """ Returns the event associated with an event wait node. + + Returns the event of event wait node `hNode` in `event_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the event for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + event_out : :py:obj:`~.CUevent` + Pointer to return the event + + See Also + -------- + :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUevent event_out = CUevent() + with nogil: + err = cydriver.cuGraphEventWaitNodeGetEvent(cyhNode, event_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], event_out) + +@cython.embedsignature(True) +def cuGraphEventWaitNodeSetEvent(hNode, event): + """ Sets an event wait node's event. + + Sets the event of event wait node `hNode` to `event`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the event for + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to use + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + with nogil: + err = cydriver.cuGraphEventWaitNodeSetEvent(cyhNode, cyevent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS]): + """ Creates an external semaphore signal node and adds it to a graph. + + Creates a new external semaphore signal node and adds it to `hGraph` + with `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + Performs a signal operation on a set of externally allocated semaphore + objects when the node is launched. The operation(s) will occur after + all of the node's dependencies have completed. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS` + Parameters for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphExternalSemaphoresSignalNodeGetParams(hNode): + """ Returns an external semaphore signal node's parameters. + + Returns the parameters of an external semaphore signal node `hNode` in + `params_out`. The `extSemArray` and `paramsArray` returned in + `params_out`, are owned by the node. This memory remains valid until + the node is destroyed or its parameters are modified, and should not be + modified directly. Use + :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams` to update the + parameters of this node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + params_out : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], params_out) + +@cython.embedsignature(True) +def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS]): + """ Sets an external semaphore signal node's parameters. + + Sets the parameters of an external semaphore signal node `hNode` to + `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS]): + """ Creates an external semaphore wait node and adds it to a graph. + + Creates a new external semaphore wait node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + Performs a wait operation on a set of externally allocated semaphore + objects when the node is launched. The node's dependencies will not be + launched until the wait operation has completed. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS` + Parameters for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeGetParams`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphExternalSemaphoresWaitNodeGetParams(hNode): + """ Returns an external semaphore wait node's parameters. + + Returns the parameters of an external semaphore wait node `hNode` in + `params_out`. The `extSemArray` and `paramsArray` returned in + `params_out`, are owned by the node. This memory remains valid until + the node is destroyed or its parameters are modified, and should not be + modified directly. Use + :py:obj:`~.cuGraphExternalSemaphoresSignalNodeSetParams` to update the + parameters of this node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + params_out : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuLaunchKernel`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], params_out) + +@cython.embedsignature(True) +def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS]): + """ Sets an external semaphore wait node's parameters. + + Sets the parameters of an external semaphore wait node `hNode` to + `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS]): + """ Creates a batch memory operation node and adds it to a graph. + + Creates a new batch memory operation node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + When the node is added, the paramArray inside `nodeParams` is copied + and therefore it can be freed after the call returns. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS` + Parameters for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuStreamWaitValue32`, :py:obj:`~.cuStreamWriteValue32`, :py:obj:`~.cuStreamWaitValue64`, :py:obj:`~.cuStreamWriteValue64`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + + Notes + ----- + Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html). + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddBatchMemOpNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphBatchMemOpNodeGetParams(hNode): + """ Returns a batch mem op node's parameters. + + Returns the parameters of batch mem op node `hNode` in + `nodeParams_out`. The `paramArray` returned in `nodeParams_out` is + owned by the node. This memory remains valid until the node is + destroyed or its parameters are modified, and should not be modified + directly. Use :py:obj:`~.cuGraphBatchMemOpNodeSetParams` to update the + parameters of this node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodeParams_out : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphBatchMemOpNodeGetParams(cyhNode, nodeParams_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], nodeParams_out) + +@cython.embedsignature(True) +def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS]): + """ Sets a batch mem op node's parameters. + + Sets the parameters of batch mem op node `hNode` to `nodeParams`. + + The paramArray inside `nodeParams` is copied and therefore it can be + freed after the call returns. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + + See Also + -------- + :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS]): + """ Sets the parameters for a batch mem op node in the given graphExec. + + Sets the parameters of a batch mem op node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + The following fields on operations may be modified on an executable + graph: + + op.waitValue.address op.waitValue.value[64] op.waitValue.flags bits + corresponding to wait type (i.e. CU_STREAM_WAIT_VALUE_FLUSH bit cannot + be modified) op.writeValue.address op.writeValue.value[64] + + Other fields, such as the context, count or type of operations, and + other types of operations such as membars, may not be modified. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + The paramArray inside `nodeParams` is copied and therefore it can be + freed after the call returns. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Batch mem op node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.CUDA_BATCH_MEM_OP_NODE_PARAMS` + Updated Parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuStreamBatchMemOp`, :py:obj:`~.cuGraphAddBatchMemOpNode`, :py:obj:`~.cuGraphBatchMemOpNodeGetParams`, :py:obj:`~.cuGraphBatchMemOpNodeSetParams`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUDA_MEM_ALLOC_NODE_PARAMS]): + """ Creates an allocation node and adds it to a graph. + + Creates a new allocation node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + When :py:obj:`~.cuGraphAddMemAllocNode` creates an allocation node, it + returns the address of the allocation in `nodeParams.dptr`. The + allocation's address remains fixed across instantiations and launches. + + If the allocation is freed in the same graph, by creating a free node + using :py:obj:`~.cuGraphAddMemFreeNode`, the allocation can be accessed + by nodes ordered after the allocation node but before the free node. + These allocations cannot be freed outside the owning graph, and they + can only be freed once in the owning graph. + + If the allocation is not freed in the same graph, then it can be + accessed not only by nodes in the graph which are ordered after the + allocation node, but also by stream operations ordered after the + graph's execution but before the allocation is freed. + + Allocations which are not freed in the same graph can be freed by: + + - passing the allocation to :py:obj:`~.cuMemFreeAsync` or + :py:obj:`~.cuMemFree`; + + - launching a graph with a free node for that allocation; or + + - specifying + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH` during + instantiation, which makes each launch behave as though it called + :py:obj:`~.cuMemFreeAsync` for every unfreed allocation. + + It is not possible to free an allocation in both the owning graph and + another graph. If the allocation is freed in the same graph, a free + node cannot be added to another graph. If the allocation is freed in + another graph, a free node can no longer be added to the owning graph. + + The following restrictions apply to graphs which contain allocation + and/or memory free nodes: + + - Nodes and edges of the graph cannot be deleted. + + - The graph can only be used in a child node if the ownership is moved + to the parent. + + - Only one instantiation of the graph may exist at any point in time. + + - The graph cannot be cloned. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUDA_MEM_ALLOC_NODE_PARAMS` + Parameters for the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuGraphMemAllocNodeGetParams`, :py:obj:`~.cuDeviceGraphMemTrim`, :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddMemAllocNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphMemAllocNodeGetParams(hNode): + """ Returns a memory alloc node's parameters. + + Returns the parameters of a memory alloc node `hNode` in `params_out`. + The `poolProps` and `accessDescs` returned in `params_out`, are owned + by the node. This memory remains valid until the node is destroyed. The + returned parameters must not be modified. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + params_out : :py:obj:`~.CUDA_MEM_ALLOC_NODE_PARAMS` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphMemFreeNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS() + with nogil: + err = cydriver.cuGraphMemAllocNodeGetParams(cyhNode, params_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], params_out) + +@cython.embedsignature(True) +def cuGraphAddMemFreeNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, dptr): + """ Creates a memory free node and adds it to a graph. + + Creates a new memory free node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `phGraphNode`. + + :py:obj:`~.cuGraphAddMemFreeNode` will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the user attempts to free: + + - an allocation twice in the same graph. + + - an address that was not returned by an allocation node. + + - an invalid address. + + The following restrictions apply to graphs which contain allocation + and/or memory free nodes: + + - Nodes and edges of the graph cannot be deleted. + + - The graph can only be used in a child node if the ownership is moved + to the parent. + + - Only one instantiation of the graph may exist at any point in time. + + - The graph cannot be cloned. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + dptr : :py:obj:`~.CUdeviceptr` + Address of memory to free + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphMemFreeNodeGetParams`, :py:obj:`~.cuDeviceGraphMemTrim`, :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuMemAllocAsync`, :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphDestroyNode`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cydriver.cuGraphAddMemFreeNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cydptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphMemFreeNodeGetParams(hNode): + """ Returns a memory free node's parameters. + + Returns the address of a memory free node `hNode` in `dptr_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + dptr_out : :py:obj:`~.CUdeviceptr` + Pointer to return the device address + + See Also + -------- + :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuGraphMemAllocNodeGetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef CUdeviceptr dptr_out = CUdeviceptr() + with nogil: + err = cydriver.cuGraphMemFreeNodeGetParams(cyhNode, dptr_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dptr_out) + +@cython.embedsignature(True) +def cuDeviceGraphMemTrim(device): + """ Free unused memory that was cached on the specified device for use with graphs back to the OS. + + Blocks which are not in use by a graph that is either currently + executing or scheduled to execute are freed back to the operating + system. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + The device for which cached memory should be freed. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode`, :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuDeviceGetGraphMemAttribute` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + with nogil: + err = cydriver.cuDeviceGraphMemTrim(cydevice) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute): + """ Query asynchronous allocation attributes related to graphs. + + Valid attributes are: + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT`: Amount of memory, in + bytes, currently associated with graphs + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`: High watermark of + memory, in bytes, associated with graphs since the last time it was + reset. High watermark can only be reset to zero. + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT`: Amount of memory, + in bytes, currently allocated for use by the CUDA graphs asynchronous + allocator. + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`: High watermark of + memory, in bytes, currently allocated for use by the CUDA graphs + asynchronous allocator. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + Specifies the scope of the query + attr : :py:obj:`~.CUgraphMem_attribute` + attribute to get + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + value : Any + retrieved value + + See Also + -------- + :py:obj:`~.cuDeviceSetGraphMemAttribute`, :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef cydriver.CUgraphMem_attribute cyattr = attr.value + cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cydriver.cuDeviceGetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, value): + """ Set asynchronous allocation attributes related to graphs. + + Valid attributes are: + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH`: High watermark of + memory, in bytes, associated with graphs since the last time it was + reset. High watermark can only be reset to zero. + + - :py:obj:`~.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH`: High watermark of + memory, in bytes, currently allocated for use by the CUDA graphs + asynchronous allocator. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + Specifies the scope of the query + attr : :py:obj:`~.CUgraphMem_attribute` + attribute to get + value : Any + pointer to value to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + + See Also + -------- + :py:obj:`~.cuDeviceGetGraphMemAttribute`, :py:obj:`~.cuGraphAddMemAllocNode`, :py:obj:`~.cuGraphAddMemFreeNode` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef cydriver.CUgraphMem_attribute cyattr = attr.value + cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cydriver.cuDeviceSetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphClone(originalGraph): + """ Clones a graph. + + This function creates a copy of `originalGraph` and returns it in + `phGraphClone`. All parameters are copied into the cloned graph. The + original graph may be modified after this call without affecting the + clone. + + Child graph nodes in the original graph are recursively copied into the + clone. + + Parameters + ---------- + originalGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to clone + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phGraphClone : :py:obj:`~.CUgraph` + Returns newly created cloned graph + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphNodeFindInClone` + + Notes + ----- + : Cloning is not supported for graphs which contain memory allocation nodes, memory free nodes, or conditional nodes. + """ + cdef cydriver.CUgraph cyoriginalGraph + if originalGraph is None: + poriginalGraph = 0 + elif isinstance(originalGraph, (CUgraph,)): + poriginalGraph = int(originalGraph) + else: + poriginalGraph = int(CUgraph(originalGraph)) + cyoriginalGraph = poriginalGraph + cdef CUgraph phGraphClone = CUgraph() + with nogil: + err = cydriver.cuGraphClone(phGraphClone._pvt_ptr, cyoriginalGraph) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphClone) + +@cython.embedsignature(True) +def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph): + """ Finds a cloned version of a node. + + This function returns the node in `hClonedGraph` corresponding to + `hOriginalNode` in the original graph. + + `hClonedGraph` must have been cloned from `hOriginalGraph` via + :py:obj:`~.cuGraphClone`. `hOriginalNode` must have been in + `hOriginalGraph` at the time of the call to :py:obj:`~.cuGraphClone`, + and the corresponding cloned node in `hClonedGraph` must not have been + removed. The cloned node is then returned via `phClonedNode`. + + Parameters + ---------- + hOriginalNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Handle to the original node + hClonedGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Cloned graph to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + phNode : :py:obj:`~.CUgraphNode` + Returns handle to the cloned node + + See Also + -------- + :py:obj:`~.cuGraphClone` + """ + cdef cydriver.CUgraph cyhClonedGraph + if hClonedGraph is None: + phClonedGraph = 0 + elif isinstance(hClonedGraph, (CUgraph,)): + phClonedGraph = int(hClonedGraph) + else: + phClonedGraph = int(CUgraph(hClonedGraph)) + cyhClonedGraph = phClonedGraph + cdef cydriver.CUgraphNode cyhOriginalNode + if hOriginalNode is None: + phOriginalNode = 0 + elif isinstance(hOriginalNode, (CUgraphNode,)): + phOriginalNode = int(hOriginalNode) + else: + phOriginalNode = int(CUgraphNode(hOriginalNode)) + cyhOriginalNode = phOriginalNode + cdef CUgraphNode phNode = CUgraphNode() + with nogil: + err = cydriver.cuGraphNodeFindInClone(phNode._pvt_ptr, cyhOriginalNode, cyhClonedGraph) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phNode) + +@cython.embedsignature(True) +def cuGraphNodeGetType(hNode): + """ Returns a node's type. + + Returns the node type of `hNode` in `typename`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + typename : :py:obj:`~.CUgraphNodeType` + Pointer to return the node type + + See Also + -------- + :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphKernelNodeGetParams`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphHostNodeGetParams`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphMemcpyNodeGetParams`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphMemsetNodeGetParams`, :py:obj:`~.cuGraphMemsetNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNodeType typename + with nogil: + err = cydriver.cuGraphNodeGetType(cyhNode, &typename) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUgraphNodeType(typename)) + +@cython.embedsignature(True) +def cuGraphGetNodes(hGraph, size_t numNodes = 0): + """ Returns a graph's nodes. + + Returns a list of `hGraph's` nodes. `nodes` may be NULL, in which case + this function will return the number of nodes in `numNodes`. Otherwise, + `numNodes` entries will be filled in. If `numNodes` is higher than the + actual number of nodes, the remaining entries in `nodes` will be set to + NULL, and the number of nodes actually obtained will be returned in + `numNodes`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to query + numNodes : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + nodes : list[:py:obj:`~.CUgraphNode`] + Pointer to return the nodes + numNodes : int + See description + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numNodes + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cynodes = NULL + pynodes = [] + if _graph_length != 0: + cynodes = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cynodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + with nogil: + err = cydriver.cuGraphGetNodes(cyhGraph, cynodes, &numNodes) + if CUresult(err) == CUresult(0): + pynodes = [CUgraphNode(init_value=cynodes[idx]) for idx in range(_graph_length)] + if cynodes is not NULL: + free(cynodes) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pynodes, numNodes) + +@cython.embedsignature(True) +def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0): + """ Returns a graph's root nodes. + + Returns a list of `hGraph's` root nodes. `rootNodes` may be NULL, in + which case this function will return the number of root nodes in + `numRootNodes`. Otherwise, `numRootNodes` entries will be filled in. If + `numRootNodes` is higher than the actual number of root nodes, the + remaining entries in `rootNodes` will be set to NULL, and the number of + nodes actually obtained will be returned in `numRootNodes`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to query + numRootNodes : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + rootNodes : list[:py:obj:`~.CUgraphNode`] + Pointer to return the root nodes + numRootNodes : int + See description + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetType`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numRootNodes + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyrootNodes = NULL + pyrootNodes = [] + if _graph_length != 0: + cyrootNodes = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cyrootNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + with nogil: + err = cydriver.cuGraphGetRootNodes(cyhGraph, cyrootNodes, &numRootNodes) + if CUresult(err) == CUresult(0): + pyrootNodes = [CUgraphNode(init_value=cyrootNodes[idx]) for idx in range(_graph_length)] + if cyrootNodes is not NULL: + free(cyrootNodes) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pyrootNodes, numRootNodes) + +@cython.embedsignature(True) +def cuGraphGetEdges(hGraph, size_t numEdges = 0): + """ Returns a graph's dependency edges. + + Returns a list of `hGraph's` dependency edges. Edges are returned via + corresponding indices in `from` and `to`; that is, the node in `to`[i] + has a dependency on the node in `from`[i]. `from` and `to` may both be + NULL, in which case this function only returns the number of edges in + `numEdges`. Otherwise, `numEdges` entries will be filled in. If + `numEdges` is higher than the actual number of edges, the remaining + entries in `from` and `to` will be set to NULL, and the number of edges + actually returned will be written to `numEdges`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to get the edges from + numEdges : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + from : list[:py:obj:`~.CUgraphNode`] + Location to return edge endpoints + to : list[:py:obj:`~.CUgraphNode`] + Location to return edge endpoints + numEdges : int + See description + + See Also + -------- + :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numEdges + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + pyfrom_ = [] + if _graph_length != 0: + cyfrom_ = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + cdef cydriver.CUgraphNode* cyto = NULL + pyto = [] + if _graph_length != 0: + cyto = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + with nogil: + err = cydriver.cuGraphGetEdges(cyhGraph, cyfrom_, cyto, &numEdges) + if CUresult(err) == CUresult(0): + pyfrom_ = [CUgraphNode(init_value=cyfrom_[idx]) for idx in range(_graph_length)] + if cyfrom_ is not NULL: + free(cyfrom_) + if CUresult(err) == CUresult(0): + pyto = [CUgraphNode(init_value=cyto[idx]) for idx in range(_graph_length)] + if cyto is not NULL: + free(cyto) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None) + return (_dict_CUresult[err], pyfrom_, pyto, numEdges) + +@cython.embedsignature(True) +def cuGraphGetEdges_v2(hGraph, size_t numEdges = 0): + """ Returns a graph's dependency edges (12.3+) + + Returns a list of `hGraph's` dependency edges. Edges are returned via + corresponding indices in `from`, `to` and `edgeData`; that is, the node + in `to`[i] has a dependency on the node in `from`[i] with data + `edgeData`[i]. `from` and `to` may both be NULL, in which case this + function only returns the number of edges in `numEdges`. Otherwise, + `numEdges` entries will be filled in. If `numEdges` is higher than the + actual number of edges, the remaining entries in `from` and `to` will + be set to NULL, and the number of edges actually returned will be + written to `numEdges`. `edgeData` may alone be NULL, in which case the + edges must all have default (zeroed) edge data. Attempting a lossy + query via NULL `edgeData` will result in + :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`. If `edgeData` is non-NULL then + `from` and `to` must be as well. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to get the edges from + numEdges : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + from : list[:py:obj:`~.CUgraphNode`] + Location to return edge endpoints + to : list[:py:obj:`~.CUgraphNode`] + Location to return edge endpoints + edgeData : list[:py:obj:`~.CUgraphEdgeData`] + Optional location to return edge data + numEdges : int + See description + + See Also + -------- + :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numEdges + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + pyfrom_ = [] + if _graph_length != 0: + cyfrom_ = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + cdef cydriver.CUgraphNode* cyto = NULL + pyto = [] + if _graph_length != 0: + cyto = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + cdef cydriver.CUgraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cydriver.CUgraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + with nogil: + err = cydriver.cuGraphGetEdges_v2(cyhGraph, cyfrom_, cyto, cyedgeData, &numEdges) + if CUresult(err) == CUresult(0): + pyfrom_ = [CUgraphNode(init_value=cyfrom_[idx]) for idx in range(_graph_length)] + if cyfrom_ is not NULL: + free(cyfrom_) + if CUresult(err) == CUresult(0): + pyto = [CUgraphNode(init_value=cyto[idx]) for idx in range(_graph_length)] + if cyto is not NULL: + free(cyto) + if CUresult(err) == CUresult(0): + pyedgeData = [CUgraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None, None) + return (_dict_CUresult[err], pyfrom_, pyto, pyedgeData, numEdges) + +@cython.embedsignature(True) +def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0): + """ Returns a node's dependencies. + + Returns a list of `node's` dependencies. `dependencies` may be NULL, in + which case this function will return the number of dependencies in + `numDependencies`. Otherwise, `numDependencies` entries will be filled + in. If `numDependencies` is higher than the actual number of + dependencies, the remaining entries in `dependencies` will be set to + NULL, and the number of nodes actually obtained will be returned in + `numDependencies`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + numDependencies : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + dependencies : list[:py:obj:`~.CUgraphNode`] + Pointer to return the dependencies + numDependencies : int + See description + + See Also + -------- + :py:obj:`~.cuGraphNodeGetDependentNodes`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies` + """ + cdef size_t _graph_length = numDependencies + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNode* cydependencies = NULL + pydependencies = [] + if _graph_length != 0: + cydependencies = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + with nogil: + err = cydriver.cuGraphNodeGetDependencies(cyhNode, cydependencies, &numDependencies) + if CUresult(err) == CUresult(0): + pydependencies = [CUgraphNode(init_value=cydependencies[idx]) for idx in range(_graph_length)] + if cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pydependencies, numDependencies) + +@cython.embedsignature(True) +def cuGraphNodeGetDependencies_v2(hNode, size_t numDependencies = 0): + """ Returns a node's dependencies (12.3+) + + Returns a list of `node's` dependencies. `dependencies` may be NULL, in + which case this function will return the number of dependencies in + `numDependencies`. Otherwise, `numDependencies` entries will be filled + in. If `numDependencies` is higher than the actual number of + dependencies, the remaining entries in `dependencies` will be set to + NULL, and the number of nodes actually obtained will be returned in + `numDependencies`. + + Note that if an edge has non-zero (non-default) edge data and + `edgeData` is NULL, this API will return + :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`. If `edgeData` is non-NULL, then + `dependencies` must be as well. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + numDependencies : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + dependencies : list[:py:obj:`~.CUgraphNode`] + Pointer to return the dependencies + edgeData : list[:py:obj:`~.CUgraphEdgeData`] + Optional array to return edge data for each dependency + numDependencies : int + See description + + See Also + -------- + :py:obj:`~.cuGraphNodeGetDependentNodes`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies` + """ + cdef size_t _graph_length = numDependencies + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNode* cydependencies = NULL + pydependencies = [] + if _graph_length != 0: + cydependencies = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + cdef cydriver.CUgraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cydriver.CUgraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + with nogil: + err = cydriver.cuGraphNodeGetDependencies_v2(cyhNode, cydependencies, cyedgeData, &numDependencies) + if CUresult(err) == CUresult(0): + pydependencies = [CUgraphNode(init_value=cydependencies[idx]) for idx in range(_graph_length)] + if cydependencies is not NULL: + free(cydependencies) + if CUresult(err) == CUresult(0): + pyedgeData = [CUgraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None) + return (_dict_CUresult[err], pydependencies, pyedgeData, numDependencies) + +@cython.embedsignature(True) +def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0): + """ Returns a node's dependent nodes. + + Returns a list of `node's` dependent nodes. `dependentNodes` may be + NULL, in which case this function will return the number of dependent + nodes in `numDependentNodes`. Otherwise, `numDependentNodes` entries + will be filled in. If `numDependentNodes` is higher than the actual + number of dependent nodes, the remaining entries in `dependentNodes` + will be set to NULL, and the number of nodes actually obtained will be + returned in `numDependentNodes`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + numDependentNodes : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + dependentNodes : list[:py:obj:`~.CUgraphNode`] + Pointer to return the dependent nodes + numDependentNodes : int + See description + + See Also + -------- + :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies` + """ + cdef size_t _graph_length = numDependentNodes + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNode* cydependentNodes = NULL + pydependentNodes = [] + if _graph_length != 0: + cydependentNodes = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cydependentNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + with nogil: + err = cydriver.cuGraphNodeGetDependentNodes(cyhNode, cydependentNodes, &numDependentNodes) + if CUresult(err) == CUresult(0): + pydependentNodes = [CUgraphNode(init_value=cydependentNodes[idx]) for idx in range(_graph_length)] + if cydependentNodes is not NULL: + free(cydependentNodes) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pydependentNodes, numDependentNodes) + +@cython.embedsignature(True) +def cuGraphNodeGetDependentNodes_v2(hNode, size_t numDependentNodes = 0): + """ Returns a node's dependent nodes (12.3+) + + Returns a list of `node's` dependent nodes. `dependentNodes` may be + NULL, in which case this function will return the number of dependent + nodes in `numDependentNodes`. Otherwise, `numDependentNodes` entries + will be filled in. If `numDependentNodes` is higher than the actual + number of dependent nodes, the remaining entries in `dependentNodes` + will be set to NULL, and the number of nodes actually obtained will be + returned in `numDependentNodes`. + + Note that if an edge has non-zero (non-default) edge data and + `edgeData` is NULL, this API will return + :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`. If `edgeData` is non-NULL, then + `dependentNodes` must be as well. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + numDependentNodes : int + See description + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_LOSSY_QUERY`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + dependentNodes : list[:py:obj:`~.CUgraphNode`] + Pointer to return the dependent nodes + edgeData : list[:py:obj:`~.CUgraphEdgeData`] + Optional pointer to return edge data for dependent nodes + numDependentNodes : int + See description + + See Also + -------- + :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphRemoveDependencies` + """ + cdef size_t _graph_length = numDependentNodes + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNode* cydependentNodes = NULL + pydependentNodes = [] + if _graph_length != 0: + cydependentNodes = calloc(_graph_length, sizeof(cydriver.CUgraphNode)) + if cydependentNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphNode))) + cdef cydriver.CUgraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cydriver.CUgraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + with nogil: + err = cydriver.cuGraphNodeGetDependentNodes_v2(cyhNode, cydependentNodes, cyedgeData, &numDependentNodes) + if CUresult(err) == CUresult(0): + pydependentNodes = [CUgraphNode(init_value=cydependentNodes[idx]) for idx in range(_graph_length)] + if cydependentNodes is not NULL: + free(cydependentNodes) + if CUresult(err) == CUresult(0): + pyedgeData = [CUgraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None) + return (_dict_CUresult[err], pydependentNodes, pyedgeData, numDependentNodes) + +@cython.embedsignature(True) +def cuGraphAddDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CUgraphNode]], to : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies): + """ Adds dependency edges to a graph. + + The number of dependencies to be added is defined by `numDependencies` + Elements in `from` and `to` at corresponding indices define a + dependency. Each node in `from` and `to` must belong to `hGraph`. + + If `numDependencies` is 0, elements in `from` and `to` will be ignored. + Specifying an existing dependency will return an error. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which dependencies are added + from : list[:py:obj:`~.CUgraphNode`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.CUgraphNode`] + Array of dependent nodes + numDependencies : size_t + Number of dependencies to be added + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + to = [] if to is None else to + if not all(isinstance(_x, (CUgraphNode,)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (CUgraphNode,)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cydriver.CUgraphNode* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + with nogil: + err = cydriver.cuGraphAddDependencies(cyhGraph, cyfrom_, cyto, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddDependencies_v2(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CUgraphNode]], to : Optional[tuple[CUgraphNode] | list[CUgraphNode]], edgeData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies): + """ Adds dependency edges to a graph (12.3+) + + The number of dependencies to be added is defined by `numDependencies` + Elements in `from` and `to` at corresponding indices define a + dependency. Each node in `from` and `to` must belong to `hGraph`. + + If `numDependencies` is 0, elements in `from` and `to` will be ignored. + Specifying an existing dependency will return an error. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which dependencies are added + from : list[:py:obj:`~.CUgraphNode`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.CUgraphNode`] + Array of dependent nodes + edgeData : list[:py:obj:`~.CUgraphEdgeData`] + Optional array of edge data. If NULL, default (zeroed) edge data is + assumed. + numDependencies : size_t + Number of dependencies to be added + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphRemoveDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + edgeData = [] if edgeData is None else edgeData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in edgeData): + raise TypeError("Argument 'edgeData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + to = [] if to is None else to + if not all(isinstance(_x, (CUgraphNode,)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (CUgraphNode,)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cydriver.CUgraphNode* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cyedgeData = NULL + if len(edgeData) > 1: + cyedgeData = calloc(len(edgeData), sizeof(cydriver.CUgraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(edgeData)): + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(edgeData) == 1: + cyedgeData = (edgeData[0])._pvt_ptr + with nogil: + err = cydriver.cuGraphAddDependencies_v2(cyhGraph, cyfrom_, cyto, cyedgeData, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + if len(edgeData) > 1 and cyedgeData is not NULL: + free(cyedgeData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphRemoveDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CUgraphNode]], to : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies): + """ Removes dependency edges from a graph. + + The number of `dependencies` to be removed is defined by + `numDependencies`. Elements in `from` and `to` at corresponding indices + define a dependency. Each node in `from` and `to` must belong to + `hGraph`. + + If `numDependencies` is 0, elements in `from` and `to` will be ignored. + Specifying a non-existing dependency will return an error. + + Dependencies cannot be removed from graphs which contain allocation or + free nodes. Any attempt to do so will return an error. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph from which to remove dependencies + from : list[:py:obj:`~.CUgraphNode`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.CUgraphNode`] + Array of dependent nodes + numDependencies : size_t + Number of dependencies to be removed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + to = [] if to is None else to + if not all(isinstance(_x, (CUgraphNode,)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (CUgraphNode,)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cydriver.CUgraphNode* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + with nogil: + err = cydriver.cuGraphRemoveDependencies(cyhGraph, cyfrom_, cyto, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphRemoveDependencies_v2(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CUgraphNode]], to : Optional[tuple[CUgraphNode] | list[CUgraphNode]], edgeData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies): + """ Removes dependency edges from a graph (12.3+) + + The number of `dependencies` to be removed is defined by + `numDependencies`. Elements in `from` and `to` at corresponding indices + define a dependency. Each node in `from` and `to` must belong to + `hGraph`. + + If `numDependencies` is 0, elements in `from` and `to` will be ignored. + Specifying an edge that does not exist in the graph, with data matching + `edgeData`, results in an error. `edgeData` is nullable, which is + equivalent to passing default (zeroed) data for each edge. + + Dependencies cannot be removed from graphs which contain allocation or + free nodes. Any attempt to do so will return an error. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph from which to remove dependencies + from : list[:py:obj:`~.CUgraphNode`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.CUgraphNode`] + Array of dependent nodes + edgeData : list[:py:obj:`~.CUgraphEdgeData`] + Optional array of edge data. If NULL, edge data is assumed to be + default (zeroed). + numDependencies : size_t + Number of dependencies to be removed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphAddDependencies`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphNodeGetDependencies`, :py:obj:`~.cuGraphNodeGetDependentNodes` + """ + edgeData = [] if edgeData is None else edgeData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in edgeData): + raise TypeError("Argument 'edgeData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + to = [] if to is None else to + if not all(isinstance(_x, (CUgraphNode,)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (CUgraphNode,)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphNode* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cydriver.CUgraphNode)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cydriver.CUgraphNode* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cyedgeData = NULL + if len(edgeData) > 1: + cyedgeData = calloc(len(edgeData), sizeof(cydriver.CUgraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(edgeData)): + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(edgeData) == 1: + cyedgeData = (edgeData[0])._pvt_ptr + with nogil: + err = cydriver.cuGraphRemoveDependencies_v2(cyhGraph, cyfrom_, cyto, cyedgeData, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + if len(edgeData) > 1 and cyedgeData is not NULL: + free(cyedgeData) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphDestroyNode(hNode): + """ Remove a node from the graph. + + Removes `hNode` from its graph. This operation also severs any + dependencies of other nodes on `hNode` and vice versa. + + Nodes which belong to a graph which contains allocation or free nodes + cannot be destroyed. Any attempt to do so will return an error. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to remove + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + with nogil: + err = cydriver.cuGraphDestroyNode(cyhNode) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphInstantiate(hGraph, unsigned long long flags): + """ Creates an executable graph from a graph. + + Instantiates `hGraph` as an executable graph. The graph is validated + for any structural constraints or intra-node constraints which were not + previously validated. If instantiation is successful, a handle to the + instantiated graph is returned in `phGraphExec`. + + The `flags` parameter controls the behavior of instantiation and + subsequent graph launches. Valid flags are: + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`, which + configures a graph containing memory allocation nodes to + automatically free any unfreed memory allocations before the graph is + relaunched. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH`, which + configures the graph for launch from the device. If this flag is + passed, the executable graph handle returned can be used to launch + the graph from both the host and device. This flag can only be used + on platforms which support unified addressing. This flag cannot be + used in conjunction with + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY`, which + causes the graph to use the priorities from the per-node attributes + rather than the priority of the launch stream during execution. Note + that priorities are only available on kernel nodes, and are copied + from stream priority during stream capture. + + If `hGraph` contains any allocation or free nodes, there can be at most + one executable graph in existence for that graph at a time. An attempt + to instantiate a second executable graph before destroying the first + with :py:obj:`~.cuGraphExecDestroy` will result in an error. The same + also applies if `hGraph` contains any device-updatable kernel nodes. + + If `hGraph` contains kernels which call device-side cudaGraphLaunch() + from multiple contexts, this will result in an error. + + Graphs instantiated for launch on the device have additional + restrictions which do not apply to host graphs: + + - The graph's nodes must reside on a single context. + + - The graph can only contain kernel nodes, memcpy nodes, memset nodes, + and child graph nodes. + + - The graph cannot be empty and must contain at least one kernel, + memcpy, or memset node. Operation-specific restrictions are outlined + below. + + - Kernel nodes: + + - Use of CUDA Dynamic Parallelism is not permitted. + + - Cooperative launches are permitted as long as MPS is not in use. + + - Memcpy nodes: + + - Only copies involving device memory and/or pinned device-mapped + host memory are permitted. + + - Copies involving CUDA arrays are not permitted. + + - Both operands must be accessible from the current context, and the + current context must match the context of other nodes in the graph. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to instantiate + flags : unsigned long long + Flags to control instantiation. See + :py:obj:`~.CUgraphInstantiate_flags`. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phGraphExec : :py:obj:`~.CUgraphExec` + Returns instantiated graph + + See Also + -------- + :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphLaunch`, :py:obj:`~.cuGraphExecDestroy` + """ + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphExec phGraphExec = CUgraphExec() + with nogil: + err = cydriver.cuGraphInstantiate(phGraphExec._pvt_ptr, cyhGraph, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphExec) + +@cython.embedsignature(True) +def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH_INSTANTIATE_PARAMS]): + """ Creates an executable graph from a graph. + + Instantiates `hGraph` as an executable graph according to the + `instantiateParams` structure. The graph is validated for any + structural constraints or intra-node constraints which were not + previously validated. If instantiation is successful, a handle to the + instantiated graph is returned in `phGraphExec`. + + `instantiateParams` controls the behavior of instantiation and + subsequent graph launches, as well as returning more detailed + information in the event of an error. + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_PARAMS` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + The `flags` field controls the behavior of instantiation and subsequent + graph launches. Valid flags are: + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`, which + configures a graph containing memory allocation nodes to + automatically free any unfreed memory allocations before the graph is + relaunched. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD`, which will perform an + upload of the graph into `hUploadStream` once the graph has been + instantiated. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH`, which + configures the graph for launch from the device. If this flag is + passed, the executable graph handle returned can be used to launch + the graph from both the host and device. This flag can only be used + on platforms which support unified addressing. This flag cannot be + used in conjunction with + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY`, which + causes the graph to use the priorities from the per-node attributes + rather than the priority of the launch stream during execution. Note + that priorities are only available on kernel nodes, and are copied + from stream priority during stream capture. + + If `hGraph` contains any allocation or free nodes, there can be at most + one executable graph in existence for that graph at a time. An attempt + to instantiate a second executable graph before destroying the first + with :py:obj:`~.cuGraphExecDestroy` will result in an error. The same + also applies if `hGraph` contains any device-updatable kernel nodes. + + If `hGraph` contains kernels which call device-side cudaGraphLaunch() + from multiple contexts, this will result in an error. + + Graphs instantiated for launch on the device have additional + restrictions which do not apply to host graphs: + + - The graph's nodes must reside on a single context. + + - The graph can only contain kernel nodes, memcpy nodes, memset nodes, + and child graph nodes. + + - The graph cannot be empty and must contain at least one kernel, + memcpy, or memset node. Operation-specific restrictions are outlined + below. + + - Kernel nodes: + + - Use of CUDA Dynamic Parallelism is not permitted. + + - Cooperative launches are permitted as long as MPS is not in use. + + - Memcpy nodes: + + - Only copies involving device memory and/or pinned device-mapped + host memory are permitted. + + - Copies involving CUDA arrays are not permitted. + + - Both operands must be accessible from the current context, and the + current context must match the context of other nodes in the graph. + + In the event of an error, the `result_out` and `hErrNode_out` fields + will contain more information about the nature of the error. Possible + error reporting includes: + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_ERROR`, if passed an invalid value + or if an unexpected error occurred which is described by the return + value of the function. `hErrNode_out` will be set to NULL. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE`, if the graph + structure is invalid. `hErrNode_out` will be set to one of the + offending nodes. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED`, if + the graph is instantiated for device launch but contains a node of an + unsupported node type, or a node which performs unsupported + operations, such as use of CUDA dynamic parallelism within a kernel + node. `hErrNode_out` will be set to this node. + + - :py:obj:`~.CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED`, if + the graph is instantiated for device launch but a node’s context + differs from that of another node. This error can also be returned if + a graph is not instantiated for device launch and it contains kernels + which call device-side cudaGraphLaunch() from multiple contexts. + `hErrNode_out` will be set to this node. + + If instantiation is successful, `result_out` will be set to + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_SUCCESS`, and `hErrNode_out` will be + set to NULL. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to instantiate + instantiateParams : :py:obj:`~.CUDA_GRAPH_INSTANTIATE_PARAMS` + Instantiation parameters + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + phGraphExec : :py:obj:`~.CUgraphExec` + Returns instantiated graph + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphExecDestroy` + """ + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphExec phGraphExec = CUgraphExec() + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL + with nogil: + err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphExec) + +@cython.embedsignature(True) +def cuGraphExecGetFlags(hGraphExec): + """ Query the instantiation flags of an executable graph. + + Returns the flags that were passed to instantiation for the given + executable graph. :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD` will + not be returned by this API as it does not affect the resulting + executable graph. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph to query + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + flags : :py:obj:`~.cuuint64_t` + Returns the instantiation flags + + See Also + -------- + :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphInstantiateWithParams` + """ + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cuuint64_t flags = cuuint64_t() + with nogil: + err = cydriver.cuGraphExecGetFlags(cyhGraphExec, flags._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], flags) + +@cython.embedsignature(True) +def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PARAMS]): + """ Sets the parameters for a kernel node in the given graphExec. + + Sets the parameters of a kernel node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + `hNode` must not have been removed from the original graph. All + `nodeParams` fields may change, but the following restrictions apply to + `func` updates: + + - The owning context of the function cannot change. + + - A node whose function originally did not use CUDA dynamic parallelism + cannot be updated to a function which uses CDP + + - A node whose function originally did not make device-side update + calls cannot be updated to a function which makes device-side update + calls. + + - If `hGraphExec` was not instantiated for device launch, a node whose + function originally did not use device-side cudaGraphLaunch() cannot + be updated to a function which uses device-side cudaGraphLaunch() + unless the node resides on the same context as nodes which contained + such calls at instantiate-time. If no such calls were present at + instantiation, these updates cannot be performed at all. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + If `hNode` is a device-updatable kernel node, the next upload/launch of + `hGraphExec` will overwrite any previous device-side updates. + Additionally, applying host updates to a device-updatable kernel node + while it is being updated from the device will result in undefined + behavior. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + kernel node from the graph from which graphExec was instantiated + nodeParams : :py:obj:`~.CUDA_KERNEL_NODE_PARAMS` + Updated Parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA_MEMCPY3D], ctx): + """ Sets the parameters for a memcpy node in the given graphExec. + + Updates the work represented by `hNode` in `hGraphExec` as though + `hNode` had contained `copyParams` at instantiation. hNode must remain + in the graph which was used to instantiate `hGraphExec`. Changed edges + to and from hNode are ignored. + + The source and destination memory in `copyParams` must be allocated + from the same contexts as the original source and destination memory. + Both the instantiation-time memory operands and the memory operands in + `copyParams` must be 1-dimensional. Zero-length operations are not + supported. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. hNode is also not modified by this call. + + Returns CUDA_ERROR_INVALID_VALUE if the memory operands' mappings + changed or either the original or new memory operands are + multidimensional. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Memcpy node from the graph which was used to instantiate graphExec + copyParams : :py:obj:`~.CUDA_MEMCPY3D` + The updated parameters to set + ctx : :py:obj:`~.CUcontext` + Context on which to run the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CUDA_MEMSET_NODE_PARAMS], ctx): + """ Sets the parameters for a memset node in the given graphExec. + + Updates the work represented by `hNode` in `hGraphExec` as though + `hNode` had contained `memsetParams` at instantiation. hNode must + remain in the graph which was used to instantiate `hGraphExec`. Changed + edges to and from hNode are ignored. + + Zero sized operations are not supported. + + The new destination pointer in memsetParams must be to the same kind of + allocation as the original destination pointer and have the same + context association and device mapping as the original destination + pointer. + + Both the value and pointer address may be updated. Changing other + aspects of the memset (width, height, element size or pitch) may cause + the update to be rejected. Specifically, for 2d memsets, all dimension + changes are rejected. For 1d memsets, changes in height are explicitly + rejected and other changes are opportunistically allowed if the + resulting work maps onto the work resources already allocated for the + node. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. hNode is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Memset node from the graph which was used to instantiate graphExec + memsetParams : :py:obj:`~.CUDA_MEMSET_NODE_PARAMS` + The updated parameters to set + ctx : :py:obj:`~.CUcontext` + Context on which to run the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphMemsetNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS]): + """ Sets the parameters for a host node in the given graphExec. + + Updates the work represented by `hNode` in `hGraphExec` as though + `hNode` had contained `nodeParams` at instantiation. hNode must remain + in the graph which was used to instantiate `hGraphExec`. Changed edges + to and from hNode are ignored. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. hNode is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Host node from the graph which was used to instantiate graphExec + nodeParams : :py:obj:`~.CUDA_HOST_NODE_PARAMS` + The updated parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphHostNodeSetParams`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph): + """ Updates node parameters in the child graph node in the given graphExec. + + Updates the work represented by `hNode` in `hGraphExec` as though the + nodes contained in `hNode's` graph had the parameters contained in + `childGraph's` nodes at instantiation. `hNode` must remain in the graph + which was used to instantiate `hGraphExec`. Changed edges to and from + `hNode` are ignored. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + The topology of `childGraph`, as well as the node insertion order, must + match that of the graph contained in `hNode`. See + :py:obj:`~.cuGraphExecUpdate()` for a list of restrictions on what can + be updated in an instantiated graph. The update is recursive, so child + graph nodes contained within the top level child graph will also be + updated. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Host node from the graph which was used to instantiate graphExec + childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph supplying the updated parameters + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphChildGraphNodeGetGraph`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraph cychildGraph + if childGraph is None: + pchildGraph = 0 + elif isinstance(childGraph, (CUgraph,)): + pchildGraph = int(childGraph) + else: + pchildGraph = int(CUgraph(childGraph)) + cychildGraph = pchildGraph + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphExecChildGraphNodeSetParams(cyhGraphExec, cyhNode, cychildGraph) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): + """ Sets the event for an event record node in the given graphExec. + + Sets the event of an event record node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + event record node from the graph from which graphExec was + instantiated + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Updated event to use + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): + """ Sets the event for an event wait node in the given graphExec. + + Sets the event of an event wait node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + event wait node from the graph from which graphExec was + instantiated + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Updated event to use + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddEventWaitNode`, :py:obj:`~.cuGraphEventWaitNodeGetEvent`, :py:obj:`~.cuGraphEventRecordNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUevent cyevent + if event is None: + pevent = 0 + elif isinstance(event, (CUevent,)): + pevent = int(event) + else: + pevent = int(CUevent(event)) + cyevent = pevent + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS]): + """ Sets the parameters for an external semaphore signal node in the given graphExec. + + Sets the parameters of an external semaphore signal node in an + executable graph `hGraphExec`. The node is identified by the + corresponding node `hNode` in the non-executable graph, from which the + executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Changing `nodeParams->numExtSems` is not supported. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + semaphore signal node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS` + Updated Parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS]): + """ Sets the parameters for an external semaphore wait node in the given graphExec. + + Sets the parameters of an external semaphore wait node in an executable + graph `hGraphExec`. The node is identified by the corresponding node + `hNode` in the non-executable graph, from which the executable graph + was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Changing `nodeParams->numExtSems` is not supported. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + semaphore wait node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.CUDA_EXT_SEM_WAIT_NODE_PARAMS` + Updated Parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphExecNodeSetParams`, :py:obj:`~.cuGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cuImportExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync`, :py:obj:`~.cuGraphExecKernelNodeSetParams`, :py:obj:`~.cuGraphExecMemcpyNodeSetParams`, :py:obj:`~.cuGraphExecMemsetNodeSetParams`, :py:obj:`~.cuGraphExecHostNodeSetParams`, :py:obj:`~.cuGraphExecChildGraphNodeSetParams`, :py:obj:`~.cuGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cuGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cuGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): + """ Enables or disables the specified node in the given graphExec. + + Sets `hNode` to be either enabled or disabled. Disabled nodes are + functionally equivalent to empty nodes until they are reenabled. + Existing node parameters are not affected by disabling/enabling the + node. + + The node is identified by the corresponding node `hNode` in the non- + executable graph, from which the executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + If `hNode` is a device-updatable kernel node, the next upload/launch of + `hGraphExec` will overwrite any previous device-side updates. + Additionally, applying host updates to a device-updatable kernel node + while it is being updated from the device will result in undefined + behavior. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node from the graph from which graphExec was instantiated + isEnabled : unsigned int + Node is enabled if != 0, otherwise the node is disabled + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + + See Also + -------- + :py:obj:`~.cuGraphNodeGetEnabled`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` :py:obj:`~.cuGraphLaunch` + + Notes + ----- + Currently only kernel, memset and memcpy nodes are supported. + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphNodeGetEnabled(hGraphExec, hNode): + """ Query whether a node in the given graphExec is enabled. + + Sets isEnabled to 1 if `hNode` is enabled, or 0 if `hNode` is disabled. + + The node is identified by the corresponding node `hNode` in the non- + executable graph, from which the executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node from the graph from which graphExec was instantiated + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, + isEnabled : unsigned int + Location to return the enabled status of the node + + See Also + -------- + :py:obj:`~.cuGraphNodeSetEnabled`, :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` :py:obj:`~.cuGraphLaunch` + + Notes + ----- + Currently only kernel, memset and memcpy nodes are supported. + + This function will not reflect device-side updates for device-updatable kernel nodes. + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef unsigned int isEnabled = 0 + with nogil: + err = cydriver.cuGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], isEnabled) + +@cython.embedsignature(True) +def cuGraphUpload(hGraphExec, hStream): + """ Uploads an executable graph in a stream. + + Uploads `hGraphExec` to the device in `hStream` without executing it. + Uploads of the same `hGraphExec` will be serialized. Each upload is + ordered behind both any previous work in `hStream` and any previous + launches of `hGraphExec`. Uses memory cached by `stream` to back the + allocations owned by `hGraphExec`. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to upload + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to upload the graph + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphLaunch`, :py:obj:`~.cuGraphExecDestroy` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphUpload(cyhGraphExec, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphLaunch(hGraphExec, hStream): + """ Launches an executable graph in a stream. + + Executes `hGraphExec` in `hStream`. Only one instance of `hGraphExec` + may be executing at a time. Each launch is ordered behind both any + previous work in `hStream` and any previous launches of `hGraphExec`. + To execute a graph concurrently, it must be instantiated multiple times + into multiple executable graphs. + + If any allocations created by `hGraphExec` remain unfreed (from a + previous launch) and `hGraphExec` was not instantiated with + :py:obj:`~.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH`, the launch + will fail with :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to launch + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to launch the graph + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphExecDestroy` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphLaunch(cyhGraphExec, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecDestroy(hGraphExec): + """ Destroys an executable graph. + + Destroys the executable graph specified by `hGraphExec`, as well as all + of its executable nodes. If the executable graph is in-flight, it will + not be terminated, but rather freed asynchronously on completion. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphUpload`, :py:obj:`~.cuGraphLaunch` + """ + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cydriver.cuGraphExecDestroy(cyhGraphExec) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphDestroy(hGraph): + """ Destroys a graph. + + Destroys the graph specified by `hGraph`, as well as all of its nodes. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + with nogil: + err = cydriver.cuGraphDestroy(cyhGraph) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecUpdate(hGraphExec, hGraph): + """ Check whether an executable graph can be updated with a graph and perform the update if possible. + + Updates the node parameters in the instantiated graph specified by + `hGraphExec` with the node parameters in a topologically identical + graph specified by `hGraph`. + + Limitations: + + - Kernel nodes: + + - The owning context of the function cannot change. + + - A node whose function originally did not use CUDA dynamic + parallelism cannot be updated to a function which uses CDP. + + - A node whose function originally did not make device-side update + calls cannot be updated to a function which makes device-side + update calls. + + - A cooperative node cannot be updated to a non-cooperative node, and + vice-versa. + + - If the graph was instantiated with + CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, the priority + attribute cannot change. Equality is checked on the originally + requested priority values, before they are clamped to the device's + supported range. + + - If `hGraphExec` was not instantiated for device launch, a node + whose function originally did not use device-side cudaGraphLaunch() + cannot be updated to a function which uses device-side + cudaGraphLaunch() unless the node resides on the same context as + nodes which contained such calls at instantiate-time. If no such + calls were present at instantiation, these updates cannot be + performed at all. + + - Neither `hGraph` nor `hGraphExec` may contain device-updatable + kernel nodes. + + - Memset and memcpy nodes: + + - The CUDA device(s) to which the operand(s) was allocated/mapped + cannot change. + + - The source/destination memory must be allocated from the same + contexts as the original source/destination memory. + + - For 2d memsets, only address and assigned value may be updated. + + - For 1d memsets, updating dimensions is also allowed, but may fail + if the resulting operation doesn't map onto the work resources + already allocated for the node. + + - Additional memcpy node restrictions: + + - Changing either the source or destination memory type(i.e. + CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported. + + - External semaphore wait nodes and record nodes: + + - Changing the number of semaphores is not supported. + + - Conditional nodes: + + - Changing node parameters is not supported. + + - Changing parameters of nodes within the conditional body graph is + subject to the rules above. + + - Conditional handle flags and default values are updated as part of + the graph update. + + Note: The API may add further restrictions in future releases. The + return code should always be checked. + + cuGraphExecUpdate sets the result member of `resultInfo` to + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED under the following + conditions: + + - The count of nodes directly in `hGraphExec` and `hGraph` differ, in + which case resultInfo->errorNode is set to NULL. + + - `hGraph` has more exit nodes than `hGraph`, in which case + resultInfo->errorNode is set to one of the exit nodes in hGraph. + + - A node in `hGraph` has a different number of dependencies than the + node from `hGraphExec` it is paired with, in which case + resultInfo->errorNode is set to the node from `hGraph`. + + - A node in `hGraph` has a dependency that does not match with the + corresponding dependency of the paired node from `hGraphExec`. + resultInfo->errorNode will be set to the node from `hGraph`. + resultInfo->errorFromNode will be set to the mismatched dependency. + The dependencies are paired based on edge order and a dependency does + not match when the nodes are already paired based on other edges + examined in the graph. + + cuGraphExecUpdate sets the result member of `resultInfo` to: + + - CU_GRAPH_EXEC_UPDATE_ERROR if passed an invalid value. + + - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED if the graph topology + changed + + - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED if the type of a node + changed, in which case `hErrorNode_out` is set to the node from + `hGraph`. + + - CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE if the + function changed in an unsupported way(see note above), in which case + `hErrorNode_out` is set to the node from `hGraph` + + - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED if any parameters to a + node changed in a way that is not supported, in which case + `hErrorNode_out` is set to the node from `hGraph`. + + - CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED if any attributes of a + node changed in a way that is not supported, in which case + `hErrorNode_out` is set to the node from `hGraph`. + + - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED if something about a node is + unsupported, like the node's type or configuration, in which case + `hErrorNode_out` is set to the node from `hGraph` + + If the update fails for a reason not listed above, the result member of + `resultInfo` will be set to CU_GRAPH_EXEC_UPDATE_ERROR. If the update + succeeds, the result member will be set to + CU_GRAPH_EXEC_UPDATE_SUCCESS. + + cuGraphExecUpdate returns CUDA_SUCCESS when the updated was performed + successfully. It returns CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE if the + graph update was not performed because it included changes which + violated constraints specific to instantiated graph update. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The instantiated graph to be updated + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph containing the updated parameters + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE`, + resultInfo : :py:obj:`~.CUgraphExecUpdateResultInfo` + the error info structure + + See Also + -------- + :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef CUgraphExecUpdateResultInfo resultInfo = CUgraphExecUpdateResultInfo() + with nogil: + err = cydriver.cuGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], resultInfo) + +@cython.embedsignature(True) +def cuGraphKernelNodeCopyAttributes(dst, src): + """ Copies attributes from source node to destination node. + + Copies attributes from source node `src` to destination node `dst`. + Both node must have the same context. + + Parameters + ---------- + dst : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Destination node + src : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Source node For list of attributes see + :py:obj:`~.CUkernelNodeAttrID` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUgraphNode cysrc + if src is None: + psrc = 0 + elif isinstance(src, (CUgraphNode,)): + psrc = int(src) + else: + psrc = int(CUgraphNode(src)) + cysrc = psrc + cdef cydriver.CUgraphNode cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (CUgraphNode,)): + pdst = int(dst) + else: + pdst = int(CUgraphNode(dst)) + cydst = pdst + with nogil: + err = cydriver.cuGraphKernelNodeCopyAttributes(cydst, cysrc) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID): + """ Queries node attribute. + + Queries attribute `attr` from node `hNode` and stores it in + corresponding member of `value_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + + attr : :py:obj:`~.CUkernelNodeAttrID` + + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + value_out : :py:obj:`~.CUkernelNodeAttrValue` + + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUkernelNodeAttrID cyattr = attr.value + cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue() + with nogil: + err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], value_out) + +@cython.embedsignature(True) +def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, value : Optional[CUkernelNodeAttrValue]): + """ Sets node attribute. + + Sets attribute `attr` on node `hNode` from corresponding attribute of + `value`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + + attr : :py:obj:`~.CUkernelNodeAttrID` + + value : :py:obj:`~.CUkernelNodeAttrValue` + + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + + See Also + -------- + :py:obj:`~.CUaccessPolicyWindow` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUkernelNodeAttrID cyattr = attr.value + cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + with nogil: + err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags): + """ Write a DOT file describing graph structure. + + Using the provided `hGraph`, write to `path` a DOT formatted + description of the graph. By default this includes the graph topology, + node types, node id, kernel names and memcpy direction. `flags` can be + specified to write more detailed information about each node type such + as parameter values, kernel attributes, node and function handles. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to create a DOT file from + path : bytes + The path to write the DOT file to + flags : unsigned int + Flags from CUgraphDebugDot_flags for specifying which additional + node information to write + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM` + """ + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + with nogil: + err = cydriver.cuGraphDebugDotPrint(cyhGraph, path, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags): + """ Create a user object. + + Create a user object with the specified destructor callback and initial + reference count. The initial references are owned by the caller. + + Destructor callbacks cannot make CUDA API calls and should avoid + blocking behavior, as they are executed by a shared internal thread. + Another thread may be signaled to perform such actions, if it does not + block forward progress of tasks scheduled through CUDA. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + ptr : Any + The pointer to pass to the destroy function + destroy : :py:obj:`~.CUhostFn` + Callback to free the user object when it is no longer in use + initialRefcount : unsigned int + The initial refcount to create the object with, typically 1. The + initial references are owned by the calling thread. + flags : unsigned int + Currently it is required to pass + :py:obj:`~.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC`, which is the only + defined flag. This indicates that the destroy callback cannot be + waited on by any CUDA API. Users requiring synchronization of the + callback should signal its completion manually. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + object_out : :py:obj:`~.CUuserObject` + Location to return the user object handle + + See Also + -------- + :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUhostFn cydestroy + if destroy is None: + pdestroy = 0 + elif isinstance(destroy, (CUhostFn,)): + pdestroy = int(destroy) + else: + pdestroy = int(CUhostFn(destroy)) + cydestroy = pdestroy + cdef CUuserObject object_out = CUuserObject() + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cydriver.cuUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], object_out) + +@cython.embedsignature(True) +def cuUserObjectRetain(object, unsigned int count): + """ Retain a reference to a user object. + + Retains new references to a user object. The new references are owned + by the caller. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + object : :py:obj:`~.CUuserObject` + The object to retain + count : unsigned int + The number of references to retain, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUuserObject cyobject + if object is None: + pobject = 0 + elif isinstance(object, (CUuserObject,)): + pobject = int(object) + else: + pobject = int(CUuserObject(object)) + cyobject = pobject + with nogil: + err = cydriver.cuUserObjectRetain(cyobject, count) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuUserObjectRelease(object, unsigned int count): + """ Release a reference to a user object. + + Releases user object references owned by the caller. The object's + destructor is invoked if the reference count reaches zero. + + It is undefined behavior to release references not owned by the caller, + or to use a user object handle after all references are released. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + object : :py:obj:`~.CUuserObject` + The object to release + count : unsigned int + The number of references to release, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUuserObject cyobject + if object is None: + pobject = 0 + elif isinstance(object, (CUuserObject,)): + pobject = int(object) + else: + pobject = int(CUuserObject(object)) + cyobject = pobject + with nogil: + err = cydriver.cuUserObjectRelease(cyobject, count) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags): + """ Retain a reference to a user object from a graph. + + Creates or moves user object references that will be owned by a CUDA + graph. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to associate the reference with + object : :py:obj:`~.CUuserObject` + The user object to retain a reference for + count : unsigned int + The number of references to add to the graph, typically 1. Must be + nonzero and not larger than INT_MAX. + flags : unsigned int + The optional flag :py:obj:`~.CU_GRAPH_USER_OBJECT_MOVE` transfers + references from the calling thread, rather than create new + references. Pass 0 to create new references. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphReleaseUserObject`, :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUuserObject cyobject + if object is None: + pobject = 0 + elif isinstance(object, (CUuserObject,)): + pobject = int(object) + else: + pobject = int(CUuserObject(object)) + cyobject = pobject + cdef cydriver.CUgraph cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (CUgraph,)): + pgraph = int(graph) + else: + pgraph = int(CUgraph(graph)) + cygraph = pgraph + with nogil: + err = cydriver.cuGraphRetainUserObject(cygraph, cyobject, count, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphReleaseUserObject(graph, object, unsigned int count): + """ Release a user object reference from a graph. + + Releases user object references owned by a graph. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph that will release the reference + object : :py:obj:`~.CUuserObject` + The user object to release a reference for + count : unsigned int + The number of references to release, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuUserObjectCreate`, :py:obj:`~.cuUserObjectRetain`, :py:obj:`~.cuUserObjectRelease`, :py:obj:`~.cuGraphRetainUserObject`, :py:obj:`~.cuGraphCreate` + """ + cdef cydriver.CUuserObject cyobject + if object is None: + pobject = 0 + elif isinstance(object, (CUuserObject,)): + pobject = int(object) + else: + pobject = int(CUuserObject(object)) + cyobject = pobject + cdef cydriver.CUgraph cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (CUgraph,)): + pgraph = int(graph) + else: + pgraph = int(CUgraph(graph)) + cygraph = pgraph + with nogil: + err = cydriver.cuGraphReleaseUserObject(cygraph, cyobject, count) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], size_t numDependencies, nodeParams : Optional[CUgraphNodeParams]): + """ Adds a node of arbitrary type to a graph. + + Creates a new node in `hGraph` described by `nodeParams` with + `numDependencies` dependencies specified via `dependencies`. + `numDependencies` may be 0. `dependencies` may be null if + `numDependencies` is 0. `dependencies` may not have any duplicate + entries. + + `nodeParams` is a tagged union. The node type should be specified in + the `typename` field, and type-specific parameters in the corresponding + union member. All unused bytes - that is, `reserved0` and all bytes + past the utilized union member - must be set to zero. It is recommended + to use brace initialization or memset to ensure all bytes are + initialized. + + Note that for some node types, `nodeParams` may contain "out + parameters" which are modified during the call, such as + `nodeParams->alloc.dptr`. + + A handle to the new node will be returned in `phGraphNode`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUgraphNodeParams` + Specification of the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphExecNodeSetParams` + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddNode(phGraphNode._pvt_ptr, cyhGraph, cydependencies, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphAddNode_v2(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], dependencyData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies, nodeParams : Optional[CUgraphNodeParams]): + """ Adds a node of arbitrary type to a graph (12.3+) + + Creates a new node in `hGraph` described by `nodeParams` with + `numDependencies` dependencies specified via `dependencies`. + `numDependencies` may be 0. `dependencies` may be null if + `numDependencies` is 0. `dependencies` may not have any duplicate + entries. + + `nodeParams` is a tagged union. The node type should be specified in + the `typename` field, and type-specific parameters in the corresponding + union member. All unused bytes - that is, `reserved0` and all bytes + past the utilized union member - must be set to zero. It is recommended + to use brace initialization or memset to ensure all bytes are + initialized. + + Note that for some node types, `nodeParams` may contain "out + parameters" which are modified during the call, such as + `nodeParams->alloc.dptr`. + + A handle to the new node will be returned in `phGraphNode`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + dependencyData : list[:py:obj:`~.CUgraphEdgeData`] + Optional edge data for the dependencies. If NULL, the data is + assumed to be default (zeroed) for all dependencies. + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUgraphNodeParams` + Specification of the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphExecNodeSetParams` + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddNode_v2(phGraphNode._pvt_ptr, cyhGraph, cydependencies, cydependencyData, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phGraphNode) + +@cython.embedsignature(True) +def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): + """ Update's a graph node's parameters. + + Sets the parameters of graph node `hNode` to `nodeParams`. The node + type specified by `nodeParams->type` must match the type of `hNode`. + `nodeParams` must be fully initialized and all unused bytes (reserved, + padding) zeroed. + + Modifying parameters is not supported for node types + CU_GRAPH_NODE_TYPE_MEM_ALLOC and CU_GRAPH_NODE_TYPE_MEM_FREE. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUgraphNodeParams` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphExecNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNodeParams]): + """ Update's a graph node's parameters in an instantiated graph. + + Sets the parameters of a node in an executable graph `hGraphExec`. The + node is identified by the corresponding node `hNode` in the non- + executable graph from which the executable graph was instantiated. + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Allowed changes to parameters on executable graphs are as follows: + + **View CUDA Toolkit Documentation for a table example** + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to update the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Corresponding node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.CUgraphNodeParams` + Updated Parameters to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, :py:obj:`~.cuGraphNodeSetParams` :py:obj:`~.cuGraphExecUpdate`, :py:obj:`~.cuGraphInstantiate` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphExec cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (CUgraphExec,)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(CUgraphExec(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, unsigned int flags): + """ Create a conditional handle. + + Creates a conditional handle associated with `hGraph`. + + The conditional handle must be associated with a conditional node in + this graph or one of its children. + + Handles not associated with a conditional node may cause graph + instantiation to fail. + + Handles can only be set from the context with which they are + associated. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph which will contain the conditional node using this handle. + ctx : :py:obj:`~.CUcontext` + Context for the handle and associated conditional node. + defaultLaunchValue : unsigned int + Optional initial value for the conditional variable. Applied at the + beginning of each graph execution if CU_GRAPH_COND_ASSIGN_DEFAULT + is set in `flags`. + flags : unsigned int + Currently must be CU_GRAPH_COND_ASSIGN_DEFAULT or 0. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pHandle_out : :py:obj:`~.CUgraphConditionalHandle` + Pointer used to return the handle to the caller. + + See Also + -------- + :py:obj:`~.cuGraphAddNode` + """ + cdef cydriver.CUcontext cyctx + if ctx is None: + pctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphConditionalHandle pHandle_out = CUgraphConditionalHandle() + with nogil: + err = cydriver.cuGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cyhGraph, cyctx, defaultLaunchValue, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pHandle_out) + +@cython.embedsignature(True) +def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize): + """ Returns occupancy of a function. + + Returns in `*numBlocks` the number of the maximum active blocks per + streaming multiprocessor. + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will be the current context. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel for which occupancy is calculated + blockSize : int + Block size the kernel is intended to be launched with + dynamicSMemSize : size_t + Per-block dynamic shared memory usage intended, in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + numBlocks : int + Returned occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int numBlocks = 0 + with nogil: + err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc, blockSize, dynamicSMemSize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], numBlocks) + +@cython.embedsignature(True) +def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags): + """ Returns occupancy of a function. + + Returns in `*numBlocks` the number of the maximum active blocks per + streaming multiprocessor. + + The `Flags` parameter controls how special cases are handled. The valid + flags are: + + - :py:obj:`~.CU_OCCUPANCY_DEFAULT`, which maintains the default + behavior as :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor`; + + - :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE`, which suppresses + the default behavior on platform where global caching affects + occupancy. On such platforms, if caching is enabled, but per-block SM + resource usage would result in zero occupancy, the occupancy + calculator will calculate the occupancy as if caching is disabled. + Setting :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE` makes the + occupancy calculator to return 0 in such cases. More information can + be found about this feature in the "Unified L1/Texture Cache" section + of the Maxwell tuning guide. + + Note that the API can also be with launch context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will be the current context. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel for which occupancy is calculated + blockSize : int + Block size the kernel is intended to be launched with + dynamicSMemSize : size_t + Per-block dynamic shared memory usage intended, in bytes + flags : unsigned int + Requested behavior for the occupancy calculator + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + numBlocks : int + Returned occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int numBlocks = 0 + with nogil: + err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc, blockSize, dynamicSMemSize, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], numBlocks) + +@cython.embedsignature(True) +def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit): + """ Suggest a launch configuration with reasonable occupancy. + + Returns in `*blockSize` a reasonable block size that can achieve the + maximum occupancy (or, the maximum number of active warps with the + fewest blocks per multiprocessor), and in `*minGridSize` the minimum + grid size to achieve the maximum occupancy. + + If `blockSizeLimit` is 0, the configurator will use the maximum block + size permitted by the device / function instead. + + If per-block dynamic shared memory allocation is not needed, the user + should leave both `blockSizeToDynamicSMemSize` and `dynamicSMemSize` as + 0. + + If per-block dynamic shared memory allocation is needed, then if the + dynamic shared memory size is constant regardless of block size, the + size should be passed through `dynamicSMemSize`, and + `blockSizeToDynamicSMemSize` should be NULL. + + Otherwise, if the per-block dynamic shared memory size varies with + different block sizes, the user needs to provide a unary function + through `blockSizeToDynamicSMemSize` that computes the dynamic shared + memory needed by `func` for any given block size. `dynamicSMemSize` is + ignored. An example signature is: + + **View CUDA Toolkit Documentation for a C++ code example** + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will be the current context. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel for which launch configuration is calculated + blockSizeToDynamicSMemSize : :py:obj:`~.CUoccupancyB2DSize` + A function that calculates how much per-block dynamic shared memory + `func` uses based on the block size + dynamicSMemSize : size_t + Dynamic shared memory usage intended, in bytes + blockSizeLimit : int + The maximum block size `func` is designed to handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + minGridSize : int + Returned minimum grid size needed to achieve the maximum occupancy + blockSize : int + Returned maximum block size that can achieve the maximum occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxPotentialBlockSize` + """ + cdef cydriver.CUoccupancyB2DSize cyblockSizeToDynamicSMemSize + if blockSizeToDynamicSMemSize is None: + pblockSizeToDynamicSMemSize = 0 + elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize,)): + pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize) + else: + pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize)) + cyblockSizeToDynamicSMemSize = pblockSizeToDynamicSMemSize + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int minGridSize = 0 + cdef int blockSize = 0 + with nogil: + err = cydriver.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], minGridSize, blockSize) + +@cython.embedsignature(True) +def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags): + """ Suggest a launch configuration with reasonable occupancy. + + An extended version of :py:obj:`~.cuOccupancyMaxPotentialBlockSize`. In + addition to arguments passed to + :py:obj:`~.cuOccupancyMaxPotentialBlockSize`, + :py:obj:`~.cuOccupancyMaxPotentialBlockSizeWithFlags` also takes a + `Flags` parameter. + + The `Flags` parameter controls how special cases are handled. The valid + flags are: + + - :py:obj:`~.CU_OCCUPANCY_DEFAULT`, which maintains the default + behavior as :py:obj:`~.cuOccupancyMaxPotentialBlockSize`; + + - :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE`, which suppresses + the default behavior on platform where global caching affects + occupancy. On such platforms, the launch configurations that produces + maximal occupancy might not support global caching. Setting + :py:obj:`~.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE` guarantees that the + the produced launch configuration is global caching compatible at a + potential cost of occupancy. More information can be found about this + feature in the "Unified L1/Texture Cache" section of the Maxwell + tuning guide. + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will be the current context. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel for which launch configuration is calculated + blockSizeToDynamicSMemSize : :py:obj:`~.CUoccupancyB2DSize` + A function that calculates how much per-block dynamic shared memory + `func` uses based on the block size + dynamicSMemSize : size_t + Dynamic shared memory usage intended, in bytes + blockSizeLimit : int + The maximum block size `func` is designed to handle + flags : unsigned int + Options + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + minGridSize : int + Returned minimum grid size needed to achieve the maximum occupancy + blockSize : int + Returned maximum block size that can achieve the maximum occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxPotentialBlockSizeWithFlags` + """ + cdef cydriver.CUoccupancyB2DSize cyblockSizeToDynamicSMemSize + if blockSizeToDynamicSMemSize is None: + pblockSizeToDynamicSMemSize = 0 + elif isinstance(blockSizeToDynamicSMemSize, (CUoccupancyB2DSize,)): + pblockSizeToDynamicSMemSize = int(blockSizeToDynamicSMemSize) + else: + pblockSizeToDynamicSMemSize = int(CUoccupancyB2DSize(blockSizeToDynamicSMemSize)) + cyblockSizeToDynamicSMemSize = pblockSizeToDynamicSMemSize + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int minGridSize = 0 + cdef int blockSize = 0 + with nogil: + err = cydriver.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], minGridSize, blockSize) + +@cython.embedsignature(True) +def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize): + """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM. + + Returns in `*dynamicSmemSize` the maximum size of dynamic shared memory + to allow `numBlocks` blocks per SM. + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will be the current context. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel function for which occupancy is calculated + numBlocks : int + Number of blocks to fit on SM + blockSize : int + Size of the blocks + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + dynamicSmemSize : int + Returned maximum dynamic shared memory + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef size_t dynamicSmemSize = 0 + with nogil: + err = cydriver.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc, numBlocks, blockSize) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], dynamicSmemSize) + +@cython.embedsignature(True) +def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): + """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum cluster size in `*clusterSize`. + + The cluster dimensions in `config` are ignored. If func has a required + cluster size set (see :py:obj:`~.cudaFuncGetAttributes` / + :py:obj:`~.cuFuncGetAttribute`),`*clusterSize` will reflect the + required cluster size. + + By default this function will always return a value that's portable on + future hardware. A higher value may be returned if the kernel function + allows non-portable cluster sizes. + + This function will respect the compile time launch bounds. + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will either be taken from the specified stream + `config->hStream` or the current context in case of NULL stream. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel function for which maximum cluster size is calculated + config : :py:obj:`~.CUlaunchConfig` + Launch configuration for the given kernel function + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + clusterSize : int + Returned maximum cluster size that can be launched for the given + kernel function and launch configuration + + See Also + -------- + :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cuFuncGetAttribute` + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int clusterSize = 0 + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + with nogil: + err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], clusterSize) + +@cython.embedsignature(True) +def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): + """ Given the kernel function (`func`) and launch configuration (`config`), return the maximum number of clusters that could co-exist on the target device in `*numClusters`. + + If the function has required cluster size already set (see + :py:obj:`~.cudaFuncGetAttributes` / :py:obj:`~.cuFuncGetAttribute`), + the cluster size from config must either be unspecified or match the + required size. Without required sizes, the cluster size must be + specified in config, else the function will return an error. + + Note that various attributes of the kernel function may affect + occupancy calculation. Runtime environment may affect how the hardware + schedules the clusters, so the calculated occupancy is not guaranteed + to be achievable. + + Note that the API can also be used with context-less kernel + :py:obj:`~.CUkernel` by querying the handle using + :py:obj:`~.cuLibraryGetKernel()` and then passing it to the API by + casting to :py:obj:`~.CUfunction`. Here, the context to use for + calculations will either be taken from the specified stream + `config->hStream` or the current context in case of NULL stream. + + Parameters + ---------- + func : :py:obj:`~.CUfunction` + Kernel function for which maximum number of clusters are calculated + config : :py:obj:`~.CUlaunchConfig` + Launch configuration for the given kernel function + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CLUSTER_SIZE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + numClusters : int + Returned maximum number of clusters that could co-exist on the + target device + + See Also + -------- + :py:obj:`~.cudaFuncGetAttributes`, :py:obj:`~.cuFuncGetAttribute` + """ + cdef cydriver.CUfunction cyfunc + if func is None: + pfunc = 0 + elif isinstance(func, (CUfunction,)): + pfunc = int(func) + else: + pfunc = int(CUfunction(func)) + cyfunc = pfunc + cdef int numClusters = 0 + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config is not None else NULL + with nogil: + err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], numClusters) + +@cython.embedsignature(True) +def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags): + """ Binds an array as a texture reference. + + [Deprecated] + + Binds the CUDA array `hArray` to the texture reference `hTexRef`. Any + previous address or CUDA array state associated with the texture + reference is superseded by this function. `Flags` must be set to + :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`. Any CUDA array previously bound to + `hTexRef` is unbound. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference to bind + hArray : :py:obj:`~.CUarray` + Array to bind + Flags : unsigned int + Options (must be :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`) + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetArray(cyhTexRef, cyhArray, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags): + """ Binds a mipmapped array to a texture reference. + + [Deprecated] + + Binds the CUDA mipmapped array `hMipmappedArray` to the texture + reference `hTexRef`. Any previous address or CUDA array state + associated with the texture reference is superseded by this function. + `Flags` must be set to :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`. Any CUDA + array previously bound to `hTexRef` is unbound. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference to bind + hMipmappedArray : :py:obj:`~.CUmipmappedArray` + Mipmapped array to bind + Flags : unsigned int + Options (must be :py:obj:`~.CU_TRSA_OVERRIDE_FORMAT`) + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUmipmappedArray cyhMipmappedArray + if hMipmappedArray is None: + phMipmappedArray = 0 + elif isinstance(hMipmappedArray, (CUmipmappedArray,)): + phMipmappedArray = int(hMipmappedArray) + else: + phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) + cyhMipmappedArray = phMipmappedArray + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetMipmappedArray(cyhTexRef, cyhMipmappedArray, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes): + """ Binds an address as a texture reference. + + [Deprecated] + + Binds a linear address range to the texture reference `hTexRef`. Any + previous address or CUDA array state associated with the texture + reference is superseded by this function. Any memory previously bound + to `hTexRef` is unbound. + + Since the hardware enforces an alignment requirement on texture base + addresses, :py:obj:`~.cuTexRefSetAddress()` passes back a byte offset + in `*ByteOffset` that must be applied to texture fetches in order to + read from the desired memory. This offset must be divided by the texel + size and passed to kernels that read from the texture so they can be + applied to the :py:obj:`~.tex1Dfetch()` function. + + If the device memory pointer was returned from + :py:obj:`~.cuMemAlloc()`, the offset is guaranteed to be 0 and NULL may + be passed as the `ByteOffset` parameter. + + The total number of elements (or texels) in the linear address range + cannot exceed + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`. The + number of elements is computed as (`numbytes` / bytesPerElement), where + bytesPerElement is determined from the data format and number of + components set using :py:obj:`~.cuTexRefSetFormat()`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference to bind + dptr : :py:obj:`~.CUdeviceptr` + Device pointer to bind + numbytes : size_t + Size of memory to bind in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + ByteOffset : int + Returned byte offset + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef size_t ByteOffset = 0 + with nogil: + err = cydriver.cuTexRefSetAddress(&ByteOffset, cyhTexRef, cydptr, numbytes) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], ByteOffset) + +@cython.embedsignature(True) +def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, size_t Pitch): + """ Binds an address as a 2D texture reference. + + [Deprecated] + + Binds a linear address range to the texture reference `hTexRef`. Any + previous address or CUDA array state associated with the texture + reference is superseded by this function. Any memory previously bound + to `hTexRef` is unbound. + + Using a :py:obj:`~.tex2D()` function inside a kernel requires a call to + either :py:obj:`~.cuTexRefSetArray()` to bind the corresponding texture + reference to an array, or :py:obj:`~.cuTexRefSetAddress2D()` to bind + the texture reference to linear memory. + + Function calls to :py:obj:`~.cuTexRefSetFormat()` cannot follow calls + to :py:obj:`~.cuTexRefSetAddress2D()` for the same texture reference. + + It is required that `dptr` be aligned to the appropriate hardware- + specific texture alignment. You can query this value using the device + attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. If an + unaligned `dptr` is supplied, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is + returned. + + `Pitch` has to be aligned to the hardware-specific texture pitch + alignment. This value can be queried using the device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`. If an + unaligned `Pitch` is supplied, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is + returned. + + Width and Height, which are specified in elements (or texels), cannot + exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH` + and :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT` + respectively. `Pitch`, which is specified in bytes, cannot exceed + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference to bind + desc : :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` + Descriptor of CUDA array + dptr : :py:obj:`~.CUdeviceptr` + Device pointer to bind + Pitch : size_t + Line pitch in bytes + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUdeviceptr cydptr + if dptr is None: + pdptr = 0 + elif isinstance(dptr, (CUdeviceptr,)): + pdptr = int(dptr) + else: + pdptr = int(CUdeviceptr(dptr)) + cydptr = pdptr + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + with nogil: + err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedComponents): + """ Sets the format for a texture reference. + + [Deprecated] + + Specifies the format of the data to be read by the texture reference + `hTexRef`. `fmt` and `NumPackedComponents` are exactly analogous to the + :py:obj:`~.Format` and :py:obj:`~.NumChannels` members of the + :py:obj:`~.CUDA_ARRAY_DESCRIPTOR` structure: They specify the format of + each component and the number of components per array element. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + fmt : :py:obj:`~.CUarray_format` + Format to set + NumPackedComponents : int + Number of components per array element + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat`, :py:obj:`~.cudaCreateChannelDesc` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUarray_format cyfmt = fmt.value + with nogil: + err = cydriver.cuTexRefSetFormat(cyhTexRef, cyfmt, NumPackedComponents) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode): + """ Sets the addressing mode for a texture reference. + + [Deprecated] + + Specifies the addressing mode `am` for the given dimension `dim` of the + texture reference `hTexRef`. If `dim` is zero, the addressing mode is + applied to the first parameter of the functions used to fetch from the + texture; if `dim` is 1, the second, and so on. + :py:obj:`~.CUaddress_mode` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + Note that this call has no effect if `hTexRef` is bound to linear + memory. Also, if the flag, :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`, + is not set, the only supported address mode is + :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + dim : int + Dimension + am : :py:obj:`~.CUaddress_mode` + Addressing mode to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUaddress_mode cyam = am.value + with nogil: + err = cydriver.cuTexRefSetAddressMode(cyhTexRef, dim, cyam) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode): + """ Sets the filtering mode for a texture reference. + + [Deprecated] + + Specifies the filtering mode `fm` to be used when reading memory + through the texture reference `hTexRef`. :py:obj:`~.CUfilter_mode_enum` + is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + Note that this call has no effect if `hTexRef` is bound to linear + memory. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + fm : :py:obj:`~.CUfilter_mode` + Filtering mode to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUfilter_mode cyfm = fm.value + with nogil: + err = cydriver.cuTexRefSetFilterMode(cyhTexRef, cyfm) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode): + """ Sets the mipmap filtering mode for a texture reference. + + [Deprecated] + + Specifies the mipmap filtering mode `fm` to be used when reading memory + through the texture reference `hTexRef`. :py:obj:`~.CUfilter_mode_enum` + is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + Note that this call has no effect if `hTexRef` is not bound to a + mipmapped array. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + fm : :py:obj:`~.CUfilter_mode` + Filtering mode to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUfilter_mode cyfm = fm.value + with nogil: + err = cydriver.cuTexRefSetMipmapFilterMode(cyhTexRef, cyfm) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetMipmapLevelBias(hTexRef, float bias): + """ Sets the mipmap level bias for a texture reference. + + [Deprecated] + + Specifies the mipmap level bias `bias` to be added to the specified + mipmap level when reading memory through the texture reference + `hTexRef`. + + Note that this call has no effect if `hTexRef` is not bound to a + mipmapped array. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + bias : float + Mipmap level bias + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetMipmapLevelBias(cyhTexRef, bias) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp): + """ Sets the mipmap min/max mipmap level clamps for a texture reference. + + [Deprecated] + + Specifies the min/max mipmap level clamps, `minMipmapLevelClamp` and + `maxMipmapLevelClamp` respectively, to be used when reading memory + through the texture reference `hTexRef`. + + Note that this call has no effect if `hTexRef` is not bound to a + mipmapped array. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + minMipmapLevelClamp : float + Mipmap min level clamp + maxMipmapLevelClamp : float + Mipmap max level clamp + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetMipmapLevelClamp(cyhTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso): + """ Sets the maximum anisotropy for a texture reference. + + [Deprecated] + + Specifies the maximum anisotropy `maxAniso` to be used when reading + memory through the texture reference `hTexRef`. + + Note that this call has no effect if `hTexRef` is bound to linear + memory. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + maxAniso : unsigned int + Maximum anisotropy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetMaxAnisotropy(cyhTexRef, maxAniso) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetBorderColor(hTexRef, float pBorderColor): + """ Sets the border color for a texture reference. + + [Deprecated] + + Specifies the value of the RGBA color via the `pBorderColor` to the + texture reference `hTexRef`. The color value supports only float type + and holds color components in the following sequence: pBorderColor[0] + holds 'R' component pBorderColor[1] holds 'G' component pBorderColor[2] + holds 'B' component pBorderColor[3] holds 'A' component + + Note that the color values can be set only when the Address mode is set + to CU_TR_ADDRESS_MODE_BORDER using :py:obj:`~.cuTexRefSetAddressMode`. + Applications using integer border color values have to + "reinterpret_cast" their values to float. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + pBorderColor : float + RGBA color + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetBorderColor` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetBorderColor(cyhTexRef, &pBorderColor) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefSetFlags(hTexRef, unsigned int Flags): + """ Sets the flags for a texture reference. + + [Deprecated] + + Specifies optional flags via `Flags` to specify the behavior of data + returned through the texture reference `hTexRef`. The valid flags are: + + - :py:obj:`~.CU_TRSF_READ_AS_INTEGER`, which suppresses the default + behavior of having the texture promote integer data to floating point + data in the range [0, 1]. Note that texture with 32-bit integer + format would not be promoted, regardless of whether or not this flag + is specified; + + - :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`, which suppresses the + default behavior of having the texture coordinates range from [0, + Dim) where Dim is the width or height of the CUDA array. Instead, the + texture coordinates [0, 1.0) reference the entire breadth of the + array dimension; + + - :py:obj:`~.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION`, which disables + any trilinear filtering optimizations. Trilinear optimizations + improve texture filtering performance by allowing bilinear filtering + on textures in scenarios where it can closely approximate the + expected results. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + Flags : unsigned int + Optional flags to set + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefSetFlags(cyhTexRef, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexRefGetAddress(hTexRef): + """ Gets the address associated with a texture reference. + + [Deprecated] + + Returns in `*pdptr` the base address bound to the texture reference + `hTexRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the + texture reference is not bound to any device memory range. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pdptr : :py:obj:`~.CUdeviceptr` + Returned device address + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef CUdeviceptr pdptr = CUdeviceptr() + with nogil: + err = cydriver.cuTexRefGetAddress(pdptr._pvt_ptr, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pdptr) + +@cython.embedsignature(True) +def cuTexRefGetArray(hTexRef): + """ Gets the array bound to a texture reference. + + [Deprecated] + + Returns in `*phArray` the CUDA array bound to the texture reference + `hTexRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the + texture reference is not bound to any CUDA array. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phArray : :py:obj:`~.CUarray` + Returned array + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef CUarray phArray = CUarray() + with nogil: + err = cydriver.cuTexRefGetArray(phArray._pvt_ptr, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phArray) + +@cython.embedsignature(True) +def cuTexRefGetMipmappedArray(hTexRef): + """ Gets the mipmapped array bound to a texture reference. + + [Deprecated] + + Returns in `*phMipmappedArray` the CUDA mipmapped array bound to the + texture reference `hTexRef`, or returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the texture reference is not + bound to any CUDA mipmapped array. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phMipmappedArray : :py:obj:`~.CUmipmappedArray` + Returned mipmapped array + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray() + with nogil: + err = cydriver.cuTexRefGetMipmappedArray(phMipmappedArray._pvt_ptr, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phMipmappedArray) + +@cython.embedsignature(True) +def cuTexRefGetAddressMode(hTexRef, int dim): + """ Gets the addressing mode used by a texture reference. + + [Deprecated] + + Returns in `*pam` the addressing mode corresponding to the dimension + `dim` of the texture reference `hTexRef`. Currently, the only valid + value for `dim` are 0 and 1. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + dim : int + Dimension + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pam : :py:obj:`~.CUaddress_mode` + Returned addressing mode + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUaddress_mode pam + with nogil: + err = cydriver.cuTexRefGetAddressMode(&pam, cyhTexRef, dim) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUaddress_mode(pam)) + +@cython.embedsignature(True) +def cuTexRefGetFilterMode(hTexRef): + """ Gets the filter-mode used by a texture reference. + + [Deprecated] + + Returns in `*pfm` the filtering mode of the texture reference + `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pfm : :py:obj:`~.CUfilter_mode` + Returned filtering mode + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUfilter_mode pfm + with nogil: + err = cydriver.cuTexRefGetFilterMode(&pfm, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUfilter_mode(pfm)) + +@cython.embedsignature(True) +def cuTexRefGetFormat(hTexRef): + """ Gets the format used by a texture reference. + + [Deprecated] + + Returns in `*pFormat` and `*pNumChannels` the format and number of + components of the CUDA array bound to the texture reference `hTexRef`. + If `pFormat` or `pNumChannels` is NULL, it will be ignored. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pFormat : :py:obj:`~.CUarray_format` + Returned format + pNumChannels : int + Returned number of components + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUarray_format pFormat + cdef int pNumChannels = 0 + with nogil: + err = cydriver.cuTexRefGetFormat(&pFormat, &pNumChannels, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], CUarray_format(pFormat), pNumChannels) + +@cython.embedsignature(True) +def cuTexRefGetMipmapFilterMode(hTexRef): + """ Gets the mipmap filtering mode for a texture reference. + + [Deprecated] + + Returns the mipmap filtering mode in `pfm` that's used when reading + memory through the texture reference `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pfm : :py:obj:`~.CUfilter_mode` + Returned mipmap filtering mode + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef cydriver.CUfilter_mode pfm + with nogil: + err = cydriver.cuTexRefGetMipmapFilterMode(&pfm, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUfilter_mode(pfm)) + +@cython.embedsignature(True) +def cuTexRefGetMipmapLevelBias(hTexRef): + """ Gets the mipmap level bias for a texture reference. + + [Deprecated] + + Returns the mipmap level bias in `pBias` that's added to the specified + mipmap level when reading memory through the texture reference + `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pbias : float + Returned mipmap level bias + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef float pbias = 0 + with nogil: + err = cydriver.cuTexRefGetMipmapLevelBias(&pbias, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pbias) + +@cython.embedsignature(True) +def cuTexRefGetMipmapLevelClamp(hTexRef): + """ Gets the min/max mipmap level clamps for a texture reference. + + [Deprecated] + + Returns the min/max mipmap level clamps in `pminMipmapLevelClamp` and + `pmaxMipmapLevelClamp` that's used when reading memory through the + texture reference `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pminMipmapLevelClamp : float + Returned mipmap min level clamp + pmaxMipmapLevelClamp : float + Returned mipmap max level clamp + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef float pminMipmapLevelClamp = 0 + cdef float pmaxMipmapLevelClamp = 0 + with nogil: + err = cydriver.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pminMipmapLevelClamp, pmaxMipmapLevelClamp) + +@cython.embedsignature(True) +def cuTexRefGetMaxAnisotropy(hTexRef): + """ Gets the maximum anisotropy for a texture reference. + + [Deprecated] + + Returns the maximum anisotropy in `pmaxAniso` that's used when reading + memory through the texture reference `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pmaxAniso : int + Returned maximum anisotropy + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFlags`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef int pmaxAniso = 0 + with nogil: + err = cydriver.cuTexRefGetMaxAnisotropy(&pmaxAniso, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pmaxAniso) + +@cython.embedsignature(True) +def cuTexRefGetBorderColor(hTexRef): + """ Gets the border color used by a texture reference. + + [Deprecated] + + Returns in `pBorderColor`, values of the RGBA color used by the texture + reference `hTexRef`. The color value is of type float and holds color + components in the following sequence: pBorderColor[0] holds 'R' + component pBorderColor[1] holds 'G' component pBorderColor[2] holds 'B' + component pBorderColor[3] holds 'A' component + + Parameters + ---------- + pBorderColor : :py:obj:`~.CUtexref` + Returned Type and Value of RGBA color + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + hTexRef : float + Texture reference + + See Also + -------- + :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetBorderColor` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef float pBorderColor = 0 + with nogil: + err = cydriver.cuTexRefGetBorderColor(&pBorderColor, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pBorderColor) + +@cython.embedsignature(True) +def cuTexRefGetFlags(hTexRef): + """ Gets the flags used by a texture reference. + + [Deprecated] + + Returns in `*pFlags` the flags of the texture reference `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pFlags : unsigned int + Returned flags + + See Also + -------- + :py:obj:`~.cuTexRefSetAddress`, :py:obj:`~.cuTexRefSetAddress2D`, :py:obj:`~.cuTexRefSetAddressMode`, :py:obj:`~.cuTexRefSetArray`, :py:obj:`~.cuTexRefSetFilterMode`, :py:obj:`~.cuTexRefSetFlags`, :py:obj:`~.cuTexRefSetFormat`, :py:obj:`~.cuTexRefGetAddress`, :py:obj:`~.cuTexRefGetAddressMode`, :py:obj:`~.cuTexRefGetArray`, :py:obj:`~.cuTexRefGetFilterMode`, :py:obj:`~.cuTexRefGetFormat` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + cdef unsigned int pFlags = 0 + with nogil: + err = cydriver.cuTexRefGetFlags(&pFlags, cyhTexRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pFlags) + +@cython.embedsignature(True) +def cuTexRefCreate(): + """ Creates a texture reference. + + [Deprecated] + + Creates a texture reference and returns its handle in `*pTexRef`. Once + created, the application must call :py:obj:`~.cuTexRefSetArray()` or + :py:obj:`~.cuTexRefSetAddress()` to associate the reference with + allocated memory. Other texture reference functions are used to specify + the format and interpretation (addressing, filtering, etc.) to be used + when the memory is read through this texture reference. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pTexRef : :py:obj:`~.CUtexref` + Returned texture reference + + See Also + -------- + :py:obj:`~.cuTexRefDestroy` + """ + cdef CUtexref pTexRef = CUtexref() + with nogil: + err = cydriver.cuTexRefCreate(pTexRef._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pTexRef) + +@cython.embedsignature(True) +def cuTexRefDestroy(hTexRef): + """ Destroys a texture reference. + + [Deprecated] + + Destroys the texture reference specified by `hTexRef`. + + Parameters + ---------- + hTexRef : :py:obj:`~.CUtexref` + Texture reference to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexRefCreate` + """ + cdef cydriver.CUtexref cyhTexRef + if hTexRef is None: + phTexRef = 0 + elif isinstance(hTexRef, (CUtexref,)): + phTexRef = int(hTexRef) + else: + phTexRef = int(CUtexref(hTexRef)) + cyhTexRef = phTexRef + with nogil: + err = cydriver.cuTexRefDestroy(cyhTexRef) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags): + """ Sets the CUDA array for a surface reference. + + [Deprecated] + + Sets the CUDA array `hArray` to be read and written by the surface + reference `hSurfRef`. Any previous CUDA array state associated with the + surface reference is superseded by this function. `Flags` must be set + to 0. The :py:obj:`~.CUDA_ARRAY3D_SURFACE_LDST` flag must have been set + for the CUDA array. Any CUDA array previously bound to `hSurfRef` is + unbound. + + Parameters + ---------- + hSurfRef : :py:obj:`~.CUsurfref` + Surface reference handle + hArray : :py:obj:`~.CUarray` + CUDA array handle + Flags : unsigned int + set to 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuSurfRefGetArray` + """ + cdef cydriver.CUarray cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (CUarray,)): + phArray = int(hArray) + else: + phArray = int(CUarray(hArray)) + cyhArray = phArray + cdef cydriver.CUsurfref cyhSurfRef + if hSurfRef is None: + phSurfRef = 0 + elif isinstance(hSurfRef, (CUsurfref,)): + phSurfRef = int(hSurfRef) + else: + phSurfRef = int(CUsurfref(hSurfRef)) + cyhSurfRef = phSurfRef + with nogil: + err = cydriver.cuSurfRefSetArray(cyhSurfRef, cyhArray, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuSurfRefGetArray(hSurfRef): + """ Passes back the CUDA array bound to a surface reference. + + [Deprecated] + + Returns in `*phArray` the CUDA array bound to the surface reference + `hSurfRef`, or returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if the + surface reference is not bound to any CUDA array. + + Parameters + ---------- + hSurfRef : :py:obj:`~.CUsurfref` + Surface reference handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + phArray : :py:obj:`~.CUarray` + Surface reference handle + + See Also + -------- + :py:obj:`~.cuModuleGetSurfRef`, :py:obj:`~.cuSurfRefSetArray` + """ + cdef cydriver.CUsurfref cyhSurfRef + if hSurfRef is None: + phSurfRef = 0 + elif isinstance(hSurfRef, (CUsurfref,)): + phSurfRef = int(hSurfRef) + else: + phSurfRef = int(CUsurfref(hSurfRef)) + cyhSurfRef = phSurfRef + cdef CUarray phArray = CUarray() + with nogil: + err = cydriver.cuSurfRefGetArray(phArray._pvt_ptr, cyhSurfRef) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phArray) + +@cython.embedsignature(True) +def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Optional[CUDA_TEXTURE_DESC], pResViewDesc : Optional[CUDA_RESOURCE_VIEW_DESC]): + """ Creates a texture object. + + Creates a texture object and returns it in `pTexObject`. `pResDesc` + describes the data to texture from. `pTexDesc` describes how the data + should be sampled. `pResViewDesc` is an optional argument that + specifies an alternate format for the data described by `pResDesc`, and + also describes the subresource region to restrict access to when + texturing. `pResViewDesc` can only be specified if the type of resource + is a CUDA array or a CUDA mipmapped array not in a block compressed + format. + + Texture objects are only supported on devices of compute capability 3.0 + or higher. Additionally, a texture object is an opaque value, and, as + such, should only be accessed through CUDA API calls. + + The :py:obj:`~.CUDA_RESOURCE_DESC` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.CUDA_RESOURCE_DESC.resType` specifies the type of resource + to texture from. CUresourceType is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to + :py:obj:`~.CU_RESOURCE_TYPE_ARRAY`, + :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a + valid CUDA array handle. + + If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to + :py:obj:`~.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY`, + :py:obj:`~.CUDA_RESOURCE_DESC`::res::mipmap::hMipmappedArray must be + set to a valid CUDA mipmapped array handle. + + If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to + :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`, + :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::devPtr must be set to a + valid device pointer, that is aligned to + :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. + :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::format and + :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::numChannels describe the + format of each component and the number of components per array + element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::linear::sizeInBytes + specifies the size of the array in bytes. The total number of elements + in the linear address range cannot exceed + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH`. The + number of elements is computed as (sizeInBytes / (sizeof(format) * + numChannels)). + + If :py:obj:`~.CUDA_RESOURCE_DESC.resType` is set to + :py:obj:`~.CU_RESOURCE_TYPE_PITCH2D`, + :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::devPtr must be set to a + valid device pointer, that is aligned to + :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT`. + :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::format and + :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::numChannels describe the + format of each component and the number of components per array + element. :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::width and + :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::height specify the width + and height of the array in elements, and cannot exceed + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH` and + :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT` + respectively. + :py:obj:`~.CUDA_RESOURCE_DESC`::res::pitch2D::pitchInBytes specifies + the pitch between two rows in bytes and has to be aligned to + :py:obj:`~.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT`. Pitch cannot + exceed :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH`. + + - :py:obj:`~.flags` must be set to zero. + + The :py:obj:`~.CUDA_TEXTURE_DESC` struct is defined as + + **View CUDA Toolkit Documentation for a C++ code example** + + where + + - :py:obj:`~.CUDA_TEXTURE_DESC.addressMode` specifies the addressing + mode for each dimension of the texture data. + :py:obj:`~.CUaddress_mode` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - This is ignored if :py:obj:`~.CUDA_RESOURCE_DESC.resType` is + :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`. Also, if the flag, + :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES` is not set, the only + supported address mode is :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP`. + + - :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` specifies the filtering mode + to be used when fetching from the texture. CUfilter_mode is defined + as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - This is ignored if :py:obj:`~.CUDA_RESOURCE_DESC.resType` is + :py:obj:`~.CU_RESOURCE_TYPE_LINEAR`. + + - :py:obj:`~.CUDA_TEXTURE_DESC.flags` can be any combination of the + following: + + - :py:obj:`~.CU_TRSF_READ_AS_INTEGER`, which suppresses the default + behavior of having the texture promote integer data to floating + point data in the range [0, 1]. Note that texture with 32-bit + integer format would not be promoted, regardless of whether or not + this flag is specified. + + - :py:obj:`~.CU_TRSF_NORMALIZED_COORDINATES`, which suppresses the + default behavior of having the texture coordinates range from [0, + Dim) where Dim is the width or height of the CUDA array. Instead, + the texture coordinates [0, 1.0) reference the entire breadth of + the array dimension; Note that for CUDA mipmapped arrays, this flag + has to be set. + + - :py:obj:`~.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION`, which disables + any trilinear filtering optimizations. Trilinear optimizations + improve texture filtering performance by allowing bilinear + filtering on textures in scenarios where it can closely approximate + the expected results. + + - :py:obj:`~.CU_TRSF_SEAMLESS_CUBEMAP`, which enables seamless cube + map filtering. This flag can only be specified if the underlying + resource is a CUDA array or a CUDA mipmapped array that was created + with the flag :py:obj:`~.CUDA_ARRAY3D_CUBEMAP`. When seamless cube + map filtering is enabled, texture address modes specified by + :py:obj:`~.CUDA_TEXTURE_DESC.addressMode` are ignored. Instead, if + the :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` is set to + :py:obj:`~.CU_TR_FILTER_MODE_POINT` the address mode + :py:obj:`~.CU_TR_ADDRESS_MODE_CLAMP` will be applied for all + dimensions. If the :py:obj:`~.CUDA_TEXTURE_DESC.filterMode` is set + to :py:obj:`~.CU_TR_FILTER_MODE_LINEAR` seamless cube map filtering + will be performed when sampling along the cube face borders. + + - :py:obj:`~.CUDA_TEXTURE_DESC.maxAnisotropy` specifies the maximum + anisotropy ratio to be used when doing anisotropic filtering. This + value will be clamped to the range [1,16]. + + - :py:obj:`~.CUDA_TEXTURE_DESC.mipmapFilterMode` specifies the filter + mode when the calculated mipmap level lies between two defined mipmap + levels. + + - :py:obj:`~.CUDA_TEXTURE_DESC.mipmapLevelBias` specifies the offset to + be applied to the calculated mipmap level. + + - :py:obj:`~.CUDA_TEXTURE_DESC.minMipmapLevelClamp` specifies the lower + end of the mipmap level range to clamp access to. + + - :py:obj:`~.CUDA_TEXTURE_DESC.maxMipmapLevelClamp` specifies the upper + end of the mipmap level range to clamp access to. + + The :py:obj:`~.CUDA_RESOURCE_VIEW_DESC` struct is defined as + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.format` specifies how the data + contained in the CUDA array or CUDA mipmapped array should be + interpreted. Note that this can incur a change in size of the texture + data. If the resource view format is a block compressed format, then + the underlying CUDA array or CUDA mipmapped array has to have a base + of format :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT32`. with 2 or 4 + channels, depending on the block compressed format. For ex., BC1 and + BC4 require the underlying CUDA array to have a format of + :py:obj:`~.CU_AD_FORMAT_UNSIGNED_INT32` with 2 channels. The other BC + formats require the underlying resource to have the same base format + but with 4 channels. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.width` specifies the new width of + the texture data. If the resource view format is a block compressed + format, this value has to be 4 times the original width of the + resource. For non block compressed formats, this value has to be + equal to that of the original resource. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.height` specifies the new height + of the texture data. If the resource view format is a block + compressed format, this value has to be 4 times the original height + of the resource. For non block compressed formats, this value has to + be equal to that of the original resource. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.depth` specifies the new depth of + the texture data. This value has to be equal to that of the original + resource. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.firstMipmapLevel` specifies the + most detailed mipmap level. This will be the new mipmap level zero. + For non-mipmapped resources, this value has to be + zero.:py:obj:`~.CUDA_TEXTURE_DESC.minMipmapLevelClamp` and + :py:obj:`~.CUDA_TEXTURE_DESC.maxMipmapLevelClamp` will be relative to + this value. For ex., if the firstMipmapLevel is set to 2, and a + minMipmapLevelClamp of 1.2 is specified, then the actual minimum + mipmap level clamp will be 3.2. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.lastMipmapLevel` specifies the + least detailed mipmap level. For non-mipmapped resources, this value + has to be zero. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.firstLayer` specifies the first + layer index for layered textures. This will be the new layer zero. + For non-layered resources, this value has to be zero. + + - :py:obj:`~.CUDA_RESOURCE_VIEW_DESC.lastLayer` specifies the last + layer index for layered textures. For non-layered resources, this + value has to be zero. + + Parameters + ---------- + pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC` + Resource descriptor + pTexDesc : :py:obj:`~.CUDA_TEXTURE_DESC` + Texture descriptor + pResViewDesc : :py:obj:`~.CUDA_RESOURCE_VIEW_DESC` + Resource view descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pTexObject : :py:obj:`~.CUtexObject` + Texture object to create + + See Also + -------- + :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject` + """ + cdef CUtexObject pTexObject = CUtexObject() + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL + cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL + with nogil: + err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pTexObject) + +@cython.embedsignature(True) +def cuTexObjectDestroy(texObject): + """ Destroys a texture object. + + Destroys the texture object specified by `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.CUtexObject` + Texture object to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaDestroyTextureObject` + """ + cdef cydriver.CUtexObject cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (CUtexObject,)): + ptexObject = int(texObject) + else: + ptexObject = int(CUtexObject(texObject)) + cytexObject = ptexObject + with nogil: + err = cydriver.cuTexObjectDestroy(cytexObject) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuTexObjectGetResourceDesc(texObject): + """ Returns a texture object's resource descriptor. + + Returns the resource descriptor for the texture object specified by + `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.CUtexObject` + Texture object + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC` + Resource descriptor + + See Also + -------- + :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectResourceDesc`, + """ + cdef cydriver.CUtexObject cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (CUtexObject,)): + ptexObject = int(texObject) + else: + ptexObject = int(CUtexObject(texObject)) + cytexObject = ptexObject + cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC() + with nogil: + err = cydriver.cuTexObjectGetResourceDesc(pResDesc._pvt_ptr, cytexObject) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pResDesc) + +@cython.embedsignature(True) +def cuTexObjectGetTextureDesc(texObject): + """ Returns a texture object's texture descriptor. + + Returns the texture descriptor for the texture object specified by + `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.CUtexObject` + Texture object + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pTexDesc : :py:obj:`~.CUDA_TEXTURE_DESC` + Texture descriptor + + See Also + -------- + :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectTextureDesc` + """ + cdef cydriver.CUtexObject cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (CUtexObject,)): + ptexObject = int(texObject) + else: + ptexObject = int(CUtexObject(texObject)) + cytexObject = ptexObject + cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC() + with nogil: + err = cydriver.cuTexObjectGetTextureDesc(pTexDesc._pvt_ptr, cytexObject) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pTexDesc) + +@cython.embedsignature(True) +def cuTexObjectGetResourceViewDesc(texObject): + """ Returns a texture object's resource view descriptor. + + Returns the resource view descriptor for the texture object specified + by `texObject`. If no resource view was set for `texObject`, the + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. + + Parameters + ---------- + texObject : :py:obj:`~.CUtexObject` + Texture object + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pResViewDesc : :py:obj:`~.CUDA_RESOURCE_VIEW_DESC` + Resource view descriptor + + See Also + -------- + :py:obj:`~.cuTexObjectCreate`, :py:obj:`~.cudaGetTextureObjectResourceViewDesc` + """ + cdef cydriver.CUtexObject cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (CUtexObject,)): + ptexObject = int(texObject) + else: + ptexObject = int(CUtexObject(texObject)) + cytexObject = ptexObject + cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC() + with nogil: + err = cydriver.cuTexObjectGetResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pResViewDesc) + +@cython.embedsignature(True) +def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): + """ Creates a surface object. + + Creates a surface object and returns it in `pSurfObject`. `pResDesc` + describes the data to perform surface load/stores on. + :py:obj:`~.CUDA_RESOURCE_DESC.resType` must be + :py:obj:`~.CU_RESOURCE_TYPE_ARRAY` and + :py:obj:`~.CUDA_RESOURCE_DESC`::res::array::hArray must be set to a + valid CUDA array handle. :py:obj:`~.CUDA_RESOURCE_DESC.flags` must be + set to zero. + + Surface objects are only supported on devices of compute capability 3.0 + or higher. Additionally, a surface object is an opaque value, and, as + such, should only be accessed through CUDA API calls. + + Parameters + ---------- + pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC` + Resource descriptor + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pSurfObject : :py:obj:`~.CUsurfObject` + Surface object to create + + See Also + -------- + :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject` + """ + cdef CUsurfObject pSurfObject = CUsurfObject() + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + with nogil: + err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pSurfObject) + +@cython.embedsignature(True) +def cuSurfObjectDestroy(surfObject): + """ Destroys a surface object. + + Destroys the surface object specified by `surfObject`. + + Parameters + ---------- + surfObject : :py:obj:`~.CUsurfObject` + Surface object to destroy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuSurfObjectCreate`, :py:obj:`~.cudaDestroySurfaceObject` + """ + cdef cydriver.CUsurfObject cysurfObject + if surfObject is None: + psurfObject = 0 + elif isinstance(surfObject, (CUsurfObject,)): + psurfObject = int(surfObject) + else: + psurfObject = int(CUsurfObject(surfObject)) + cysurfObject = psurfObject + with nogil: + err = cydriver.cuSurfObjectDestroy(cysurfObject) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuSurfObjectGetResourceDesc(surfObject): + """ Returns a surface object's resource descriptor. + + Returns the resource descriptor for the surface object specified by + `surfObject`. + + Parameters + ---------- + surfObject : :py:obj:`~.CUsurfObject` + Surface object + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pResDesc : :py:obj:`~.CUDA_RESOURCE_DESC` + Resource descriptor + + See Also + -------- + :py:obj:`~.cuSurfObjectCreate`, :py:obj:`~.cudaGetSurfaceObjectResourceDesc` + """ + cdef cydriver.CUsurfObject cysurfObject + if surfObject is None: + psurfObject = 0 + elif isinstance(surfObject, (CUsurfObject,)): + psurfObject = int(surfObject) + else: + psurfObject = int(CUsurfObject(surfObject)) + cysurfObject = psurfObject + cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC() + with nogil: + err = cydriver.cuSurfObjectGetResourceDesc(pResDesc._pvt_ptr, cysurfObject) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pResDesc) + +@cython.embedsignature(True) +def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensorRank, globalAddress, globalDim : Optional[tuple[cuuint64_t] | list[cuuint64_t]], globalStrides : Optional[tuple[cuuint64_t] | list[cuuint64_t]], boxDim : Optional[tuple[cuuint32_t] | list[cuuint32_t]], elementStrides : Optional[tuple[cuuint32_t] | list[cuuint32_t]], interleave not None : CUtensorMapInterleave, swizzle not None : CUtensorMapSwizzle, l2Promotion not None : CUtensorMapL2promotion, oobFill not None : CUtensorMapFloatOOBfill): + """ Create a tensor map descriptor object representing tiled memory region. + + Creates a descriptor for Tensor Memory Access (TMA) object specified by + the parameters describing a tiled region and returns it in `tensorMap`. + + Tensor map objects are only supported on devices of compute capability + 9.0 or higher. Additionally, a tensor map object is an opaque value, + and, as such, should only be accessed through CUDA APIs and PTX. + + The parameters passed are bound to the following requirements: + + - `tensorMap` address must be aligned to 64 bytes. + + - `tensorDataType` has to be an enum from + :py:obj:`~.CUtensorMapDataType` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + + - `tensorRank` must be non-zero and less than or equal to the maximum + supported dimensionality of 5. If `interleave` is not + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, then `tensorRank` must + additionally be greater than or equal to 3. + + - `globalAddress`, which specifies the starting address of the memory + region described, must be 16 byte aligned. The following requirements + need to also be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. + + `globalDim` array, which specifies tensor size of each of the + `tensorRank` dimensions, must be non-zero and less than or equal to + 2^32. Additionally, the following requirements need to be met for the + packed data types: + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] must + be a multiple of 128. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] must + be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. + + `globalStrides` array, which specifies tensor stride of each of the + lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 + and less than 2^40. Additionally, the following requirements need to be + met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** + + `boxDim` array, which specifies number of elements to be traversed + along each of the `tensorRank` dimensions, must be non-zero and less + than or equal to 256. Additionally, the following requirements need to + be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, { + `boxDim`[0] * elementSizeInBytes( `tensorDataType` ) } must be a + multiple of 16 bytes. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, boxDim[0] must be + 128. + + `elementStrides` array, which specifies the iteration step along each + of the `tensorRank` dimensions, must be non-zero and less than or equal + to 8. Note that when `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this + array is ignored since TMA doesn’t support the stride for dimension + zero. When all elements of `elementStrides` array is one, `boxDim` + specifies the number of elements to load. However, if the + `elementStrides`[i] is not equal to one, then TMA loads ceil( + `boxDim`[i] / `elementStrides`[i]) number of elements along i-th + dimension. To load N elements along i-th dimension, `boxDim`[i] must be + set to N * `elementStrides`[i]. + + - `interleave` specifies the interleaved layout of type + :py:obj:`~.CUtensorMapInterleave`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 + bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 + uses 32 bytes. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE` and `swizzle` is not + :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_NONE`, the bounding box inner + dimension (computed as `boxDim`[0] multiplied by element size derived + from `tensorDataType`) must be less than or equal to the swizzle + size. + + - CU_TENSOR_MAP_SWIZZLE_32B requires the bounding box inner dimension + to be <= 32. + + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. + + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. + + - `swizzle`, which specifies the shared memory bank swizzling pattern, + has to be of type :py:obj:`~.CUtensorMapSwizzle` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Data are organized in a specific order in global memory; however, + this may not match the order in which the application accesses data + in shared memory. This difference in data organization may cause bank + conflicts when shared memory is accessed. In order to avoid this + problem, data can be loaded to shared memory with shuffling across + shared memory banks. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, `swizzle` must be + :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_32B`. Other interleave modes can + have any swizzling pattern. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B (Store only) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) + + - `l2Promotion` specifies L2 fetch size which indicates the byte + granurality at which L2 requests is filled from DRAM. It must be of + type :py:obj:`~.CUtensorMapL2promotion`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `oobFill`, which indicates whether zero or a special NaN constant + should be used to fill out-of-bound elements, must be of type + :py:obj:`~.CUtensorMapFloatOOBfill` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Note that + :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can + only be used when `tensorDataType` represents a floating-point data + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. + + Parameters + ---------- + tensorDataType : :py:obj:`~.CUtensorMapDataType` + Tensor data type + tensorRank : Any + Dimensionality of tensor + globalAddress : Any + Starting address of memory region described by tensor + globalDim : list[:py:obj:`~.cuuint64_t`] + Array containing tensor size (number of elements) along each of the + `tensorRank` dimensions + globalStrides : list[:py:obj:`~.cuuint64_t`] + Array containing stride size (in bytes) along each of the + `tensorRank` - 1 dimensions + boxDim : list[:py:obj:`~.cuuint32_t`] + Array containing traversal box size (number of elments) along each + of the `tensorRank` dimensions. Specifies how many elements to be + traversed along each tensor dimension. + elementStrides : list[:py:obj:`~.cuuint32_t`] + Array containing traversal stride in each of the `tensorRank` + dimensions + interleave : :py:obj:`~.CUtensorMapInterleave` + Type of interleaved layout the tensor addresses + swizzle : :py:obj:`~.CUtensorMapSwizzle` + Bank swizzling pattern inside shared memory + l2Promotion : :py:obj:`~.CUtensorMapL2promotion` + L2 promotion size + oobFill : :py:obj:`~.CUtensorMapFloatOOBfill` + Indicate whether zero or special NaN constant must be used to fill + out-of-bound elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + tensorMap : :py:obj:`~.CUtensorMap` + Tensor map object to create + + See Also + -------- + :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapEncodeIm2colWide`, :py:obj:`~.cuTensorMapReplaceAddress` + """ + elementStrides = [] if elementStrides is None else elementStrides + if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): + raise TypeError("Argument 'elementStrides' is not instance of type (expected tuple[cydriver.cuuint32_t,] or list[cydriver.cuuint32_t,]") + boxDim = [] if boxDim is None else boxDim + if not all(isinstance(_x, (cuuint32_t,)) for _x in boxDim): + raise TypeError("Argument 'boxDim' is not instance of type (expected tuple[cydriver.cuuint32_t,] or list[cydriver.cuuint32_t,]") + globalStrides = [] if globalStrides is None else globalStrides + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalStrides): + raise TypeError("Argument 'globalStrides' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + globalDim = [] if globalDim is None else globalDim + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalDim): + raise TypeError("Argument 'globalDim' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + cdef cydriver.cuuint32_t cytensorRank + if tensorRank is None: + ptensorRank = 0 + elif isinstance(tensorRank, (cuuint32_t,)): + ptensorRank = int(tensorRank) + else: + ptensorRank = int(cuuint32_t(tensorRank)) + cytensorRank = ptensorRank + cdef CUtensorMap tensorMap = CUtensorMap() + cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cyglobalAddress = _HelperInputVoidPtr(globalAddress) + cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr + cdef cydriver.cuuint64_t* cyglobalDim = NULL + if len(globalDim) > 1: + cyglobalDim = calloc(len(globalDim), sizeof(cydriver.cuuint64_t)) + if cyglobalDim is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalDim)): + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] + elif len(globalDim) == 1: + cyglobalDim = (globalDim[0])._pvt_ptr + cdef cydriver.cuuint64_t* cyglobalStrides = NULL + if len(globalStrides) > 1: + cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) + if cyglobalStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalStrides)): + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] + elif len(globalStrides) == 1: + cyglobalStrides = (globalStrides[0])._pvt_ptr + cdef cydriver.cuuint32_t* cyboxDim = NULL + if len(boxDim) > 1: + cyboxDim = calloc(len(boxDim), sizeof(cydriver.cuuint32_t)) + if cyboxDim is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(boxDim)) + 'x' + str(sizeof(cydriver.cuuint32_t))) + else: + for idx in range(len(boxDim)): + cyboxDim[idx] = (boxDim[idx])._pvt_ptr[0] + elif len(boxDim) == 1: + cyboxDim = (boxDim[0])._pvt_ptr + cdef cydriver.cuuint32_t* cyelementStrides = NULL + if len(elementStrides) > 1: + cyelementStrides = calloc(len(elementStrides), sizeof(cydriver.cuuint32_t)) + if cyelementStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) + else: + for idx in range(len(elementStrides)): + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] + elif len(elementStrides) == 1: + cyelementStrides = (elementStrides[0])._pvt_ptr + cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value + cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + with nogil: + err = cydriver.cuTensorMapEncodeTiled(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cyboxDim, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) + if len(globalDim) > 1 and cyglobalDim is not NULL: + free(cyglobalDim) + if len(globalStrides) > 1 and cyglobalStrides is not NULL: + free(cyglobalStrides) + if len(boxDim) > 1 and cyboxDim is not NULL: + free(cyboxDim) + if len(elementStrides) > 1 and cyelementStrides is not NULL: + free(cyelementStrides) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], tensorMap) + +@cython.embedsignature(True) +def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tensorRank, globalAddress, globalDim : Optional[tuple[cuuint64_t] | list[cuuint64_t]], globalStrides : Optional[tuple[cuuint64_t] | list[cuuint64_t]], pixelBoxLowerCorner : Optional[tuple[int] | list[int]], pixelBoxUpperCorner : Optional[tuple[int] | list[int]], channelsPerPixel, pixelsPerColumn, elementStrides : Optional[tuple[cuuint32_t] | list[cuuint32_t]], interleave not None : CUtensorMapInterleave, swizzle not None : CUtensorMapSwizzle, l2Promotion not None : CUtensorMapL2promotion, oobFill not None : CUtensorMapFloatOOBfill): + """ Create a tensor map descriptor object representing im2col memory region. + + Creates a descriptor for Tensor Memory Access (TMA) object specified by + the parameters describing a im2col memory layout and returns it in + `tensorMap`. + + Tensor map objects are only supported on devices of compute capability + 9.0 or higher. Additionally, a tensor map object is an opaque value, + and, as such, should only be accessed through CUDA APIs and PTX. + + The parameters passed are bound to the following requirements: + + - `tensorMap` address must be aligned to 64 bytes. + + - `tensorDataType` has to be an enum from + :py:obj:`~.CUtensorMapDataType` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + + - `tensorRank`, which specifies the number of tensor dimensions, must + be 3, 4, or 5. + + - `globalAddress`, which specifies the starting address of the memory + region described, must be 16 byte aligned. The following requirements + need to also be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. + + - `globalDim` array, which specifies tensor size of each of the + `tensorRank` dimensions, must be non-zero and less than or equal to + 2^32. Additionally, the following requirements need to be met for the + packed data types: + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] + must be a multiple of 128. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] + must be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. + + - `globalStrides` array, which specifies tensor stride of each of the + lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 + and less than 2^40. Additionally, the following requirements need to + be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `pixelBoxLowerCorner` array specifies the coordinate offsets {D, H, + W} of the bounding box from top/left/front corner. The number of + offsets and their precision depend on the tensor dimensionality: + + - When `tensorRank` is 3, one signed offset within range [-32768, + 32767] is supported. + + - When `tensorRank` is 4, two signed offsets each within range [-128, + 127] are supported. + + - When `tensorRank` is 5, three offsets each within range [-16, 15] + are supported. + + - `pixelBoxUpperCorner` array specifies the coordinate offsets {D, H, + W} of the bounding box from bottom/right/back corner. The number of + offsets and their precision depend on the tensor dimensionality: + + - When `tensorRank` is 3, one signed offset within range [-32768, + 32767] is supported. + + - When `tensorRank` is 4, two signed offsets each within range [-128, + 127] are supported. + + - When `tensorRank` is 5, three offsets each within range [-16, 15] + are supported. The bounding box specified by `pixelBoxLowerCorner` + and `pixelBoxUpperCorner` must have non-zero area. + + - `channelsPerPixel`, which specifies the number of elements which must + be accessed along C dimension, must be less than or equal to 256. + Additionally, when `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `channelsPerPixel` + must be 128. + + - `pixelsPerColumn`, which specifies the number of elements that must + be accessed along the {N, D, H, W} dimensions, must be less than or + equal to 1024. + + - `elementStrides` array, which specifies the iteration step along each + of the `tensorRank` dimensions, must be non-zero and less than or + equal to 8. Note that when `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this + array is ignored since TMA doesn’t support the stride for dimension + zero. When all elements of the `elementStrides` array are one, + `boxDim` specifies the number of elements to load. However, if + `elementStrides`[i] is not equal to one for some `i`, then TMA loads + ceil( `boxDim`[i] / `elementStrides`[i]) number of elements along + i-th dimension. To load N elements along i-th dimension, `boxDim`[i] + must be set to N * `elementStrides`[i]. + + - `interleave` specifies the interleaved layout of type + :py:obj:`~.CUtensorMapInterleave`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 + bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 + uses 32 bytes. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE` and `swizzle` is not + :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_NONE`, the bounding box inner + dimension (computed as `channelsPerPixel` multiplied by element size + in bytes derived from `tensorDataType`) must be less than or equal to + the swizzle size. + + - CU_TENSOR_MAP_SWIZZLE_32B requires the bounding box inner dimension + to be <= 32. + + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. + + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. + + - `swizzle`, which specifies the shared memory bank swizzling pattern, + has to be of type :py:obj:`~.CUtensorMapSwizzle` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Data are organized in a specific order in global memory; however, + this may not match the order in which the application accesses data + in shared memory. This difference in data organization may cause bank + conflicts when shared memory is accessed. In order to avoid this + problem, data can be loaded to shared memory with shuffling across + shared memory banks. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, `swizzle` must be + :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_32B`. Other interleave modes can + have any swizzling pattern. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B (Store only) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) + + - `l2Promotion` specifies L2 fetch size which indicates the byte + granularity at which L2 requests are filled from DRAM. It must be of + type :py:obj:`~.CUtensorMapL2promotion`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `oobFill`, which indicates whether zero or a special NaN constant + should be used to fill out-of-bound elements, must be of type + :py:obj:`~.CUtensorMapFloatOOBfill` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Note that + :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can + only be used when `tensorDataType` represents a floating-point data + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. + + Parameters + ---------- + tensorDataType : :py:obj:`~.CUtensorMapDataType` + Tensor data type + tensorRank : Any + Dimensionality of tensor; must be at least 3 + globalAddress : Any + Starting address of memory region described by tensor + globalDim : list[:py:obj:`~.cuuint64_t`] + Array containing tensor size (number of elements) along each of the + `tensorRank` dimensions + globalStrides : list[:py:obj:`~.cuuint64_t`] + Array containing stride size (in bytes) along each of the + `tensorRank` - 1 dimensions + pixelBoxLowerCorner : list[int] + Array containing DHW dimensions of lower box corner + pixelBoxUpperCorner : list[int] + Array containing DHW dimensions of upper box corner + channelsPerPixel : Any + Number of channels per pixel + pixelsPerColumn : Any + Number of pixels per column + elementStrides : list[:py:obj:`~.cuuint32_t`] + Array containing traversal stride in each of the `tensorRank` + dimensions + interleave : :py:obj:`~.CUtensorMapInterleave` + Type of interleaved layout the tensor addresses + swizzle : :py:obj:`~.CUtensorMapSwizzle` + Bank swizzling pattern inside shared memory + l2Promotion : :py:obj:`~.CUtensorMapL2promotion` + L2 promotion size + oobFill : :py:obj:`~.CUtensorMapFloatOOBfill` + Indicate whether zero or special NaN constant will be used to fill + out-of-bound elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + tensorMap : :py:obj:`~.CUtensorMap` + Tensor map object to create + + See Also + -------- + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2colWide`, :py:obj:`~.cuTensorMapReplaceAddress` + """ + elementStrides = [] if elementStrides is None else elementStrides + if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): + raise TypeError("Argument 'elementStrides' is not instance of type (expected tuple[cydriver.cuuint32_t,] or list[cydriver.cuuint32_t,]") + cdef cydriver.cuuint32_t cypixelsPerColumn + if pixelsPerColumn is None: + ppixelsPerColumn = 0 + elif isinstance(pixelsPerColumn, (cuuint32_t,)): + ppixelsPerColumn = int(pixelsPerColumn) + else: + ppixelsPerColumn = int(cuuint32_t(pixelsPerColumn)) + cypixelsPerColumn = ppixelsPerColumn + cdef cydriver.cuuint32_t cychannelsPerPixel + if channelsPerPixel is None: + pchannelsPerPixel = 0 + elif isinstance(channelsPerPixel, (cuuint32_t,)): + pchannelsPerPixel = int(channelsPerPixel) + else: + pchannelsPerPixel = int(cuuint32_t(channelsPerPixel)) + cychannelsPerPixel = pchannelsPerPixel + pixelBoxUpperCorner = [] if pixelBoxUpperCorner is None else pixelBoxUpperCorner + if not all(isinstance(_x, (int)) for _x in pixelBoxUpperCorner): + raise TypeError("Argument 'pixelBoxUpperCorner' is not instance of type (expected tuple[int] or list[int]") + pixelBoxLowerCorner = [] if pixelBoxLowerCorner is None else pixelBoxLowerCorner + if not all(isinstance(_x, (int)) for _x in pixelBoxLowerCorner): + raise TypeError("Argument 'pixelBoxLowerCorner' is not instance of type (expected tuple[int] or list[int]") + globalStrides = [] if globalStrides is None else globalStrides + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalStrides): + raise TypeError("Argument 'globalStrides' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + globalDim = [] if globalDim is None else globalDim + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalDim): + raise TypeError("Argument 'globalDim' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + cdef cydriver.cuuint32_t cytensorRank + if tensorRank is None: + ptensorRank = 0 + elif isinstance(tensorRank, (cuuint32_t,)): + ptensorRank = int(tensorRank) + else: + ptensorRank = int(cuuint32_t(tensorRank)) + cytensorRank = ptensorRank + cdef CUtensorMap tensorMap = CUtensorMap() + cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cyglobalAddress = _HelperInputVoidPtr(globalAddress) + cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr + cdef cydriver.cuuint64_t* cyglobalDim = NULL + if len(globalDim) > 1: + cyglobalDim = calloc(len(globalDim), sizeof(cydriver.cuuint64_t)) + if cyglobalDim is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalDim)): + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] + elif len(globalDim) == 1: + cyglobalDim = (globalDim[0])._pvt_ptr + cdef cydriver.cuuint64_t* cyglobalStrides = NULL + if len(globalStrides) > 1: + cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) + if cyglobalStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalStrides)): + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] + elif len(globalStrides) == 1: + cyglobalStrides = (globalStrides[0])._pvt_ptr + cdef vector[int] cypixelBoxLowerCorner = pixelBoxLowerCorner + cdef vector[int] cypixelBoxUpperCorner = pixelBoxUpperCorner + cdef cydriver.cuuint32_t* cyelementStrides = NULL + if len(elementStrides) > 1: + cyelementStrides = calloc(len(elementStrides), sizeof(cydriver.cuuint32_t)) + if cyelementStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) + else: + for idx in range(len(elementStrides)): + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] + elif len(elementStrides) == 1: + cyelementStrides = (elementStrides[0])._pvt_ptr + cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value + cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + with nogil: + err = cydriver.cuTensorMapEncodeIm2col(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) + if len(globalDim) > 1 and cyglobalDim is not NULL: + free(cyglobalDim) + if len(globalStrides) > 1 and cyglobalStrides is not NULL: + free(cyglobalStrides) + if len(elementStrides) > 1 and cyelementStrides is not NULL: + free(cyelementStrides) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], tensorMap) + +@cython.embedsignature(True) +def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, tensorRank, globalAddress, globalDim : Optional[tuple[cuuint64_t] | list[cuuint64_t]], globalStrides : Optional[tuple[cuuint64_t] | list[cuuint64_t]], int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides : Optional[tuple[cuuint32_t] | list[cuuint32_t]], interleave not None : CUtensorMapInterleave, mode not None : CUtensorMapIm2ColWideMode, swizzle not None : CUtensorMapSwizzle, l2Promotion not None : CUtensorMapL2promotion, oobFill not None : CUtensorMapFloatOOBfill): + """ Create a tensor map descriptor object representing im2col memory region, but where the elements are exclusively loaded along the W dimension. + + Creates a descriptor for Tensor Memory Access (TMA) object specified by + the parameters describing a im2col memory layout and where the row is + always loaded along the W dimensuin and returns it in `tensorMap`. This + assumes the tensor layout in memory is either NDHWC, NHWC, or NWC. + + This API is only supported on devices of compute capability 10.0 or + higher. Additionally, a tensor map object is an opaque value, and, as + such, should only be accessed through CUDA APIs and PTX. + + The parameters passed are bound to the following requirements: + + - `tensorMap` address must be aligned to 64 bytes. + + - `tensorDataType` has to be an enum from + :py:obj:`~.CUtensorMapDataType` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + + - `tensorRank`, which specifies the number of tensor dimensions, must + be 3, 4, or 5. + + - `globalAddress`, which specifies the starting address of the memory + region described, must be 16 byte aligned. The following requirements + need to also be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. + + `globalDim` array, which specifies tensor size of each of the + `tensorRank` dimensions, must be non-zero and less than or equal to + 2^32. Additionally, the following requirements need to be met for the + packed data types: + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] must + be a multiple of 128. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] must + be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. + + `globalStrides` array, which specifies tensor stride of each of the + lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 + and less than 2^40. Additionally, the following requirements need to be + met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** + + `pixelBoxLowerCornerWidth` specifies the coordinate offset W of the + bounding box from left corner. The offset must be within range [-32768, + 32767]. + + - `pixelBoxUpperCornerWidth` specifies the coordinate offset W of the + bounding box from right corner. The offset must be within range + [-32768, 32767]. + + The bounding box specified by `pixelBoxLowerCornerWidth` and + `pixelBoxUpperCornerWidth` must have non-zero area. Note that the size + of the box along D and H dimensions is always equal to one. + + - `channelsPerPixel`, which specifies the number of elements which must + be accessed along C dimension, must be less than or equal to 256. + Additionally, when `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `channelsPerPixel` + must be 128. + + - `pixelsPerColumn`, which specifies the number of elements that must + be accessed along the W dimension, must be less than or equal to + 1024. This field is ignored when `mode` is + :py:obj:`~.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128`. + + - `elementStrides` array, which specifies the iteration step along each + of the `tensorRank` dimensions, must be non-zero and less than or + equal to 8. Note that when `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this + array is ignored since TMA doesn’t support the stride for dimension + zero. When all elements of the `elementStrides` array are one, + `boxDim` specifies the number of elements to load. However, if + `elementStrides`[i] is not equal to one for some `i`, then TMA loads + ceil( `boxDim`[i] / `elementStrides`[i]) number of elements along + i-th dimension. To load N elements along i-th dimension, `boxDim`[i] + must be set to N * `elementStrides`[i]. + + - `interleave` specifies the interleaved layout of type + :py:obj:`~.CUtensorMapInterleave`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 + bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 + uses 32 bytes. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the bounding box inner + dimension (computed as `channelsPerPixel` multiplied by element size + in bytes derived from `tensorDataType`) must be less than or equal to + the swizzle size. + + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. + + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. + + - `mode`, which describes loading of elements loaded along the W + dimension, has to be one of the following + :py:obj:`~.CUtensorMapIm2ColWideMode` types: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W` allows the number of + elements loaded along the W dimension to be specified via the + `pixelsPerColumn` field. + + - `swizzle`, which specifies the shared memory bank swizzling pattern, + must be one of the following :py:obj:`~.CUtensorMapSwizzle` modes + (other swizzle modes are not supported): + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Data are organized in a specific order in global memory; however, + this may not match the order in which the application accesses data + in shared memory. This difference in data organization may cause bank + conflicts when shared memory is accessed. In order to avoid this + problem, data can be loaded to shared memory with shuffling across + shared memory banks. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) + + - `l2Promotion` specifies L2 fetch size which indicates the byte + granularity at which L2 requests are filled from DRAM. It must be of + type :py:obj:`~.CUtensorMapL2promotion`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `oobFill`, which indicates whether zero or a special NaN constant + should be used to fill out-of-bound elements, must be of type + :py:obj:`~.CUtensorMapFloatOOBfill` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Note that + :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can + only be used when `tensorDataType` represents a floating-point data + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. + + Parameters + ---------- + tensorDataType : :py:obj:`~.CUtensorMapDataType` + Tensor data type + tensorRank : Any + Dimensionality of tensor; must be at least 3 + globalAddress : Any + Starting address of memory region described by tensor + globalDim : list[:py:obj:`~.cuuint64_t`] + Array containing tensor size (number of elements) along each of the + `tensorRank` dimensions + globalStrides : list[:py:obj:`~.cuuint64_t`] + Array containing stride size (in bytes) along each of the + `tensorRank` - 1 dimensions + pixelBoxLowerCornerWidth : int + Width offset of left box corner + pixelBoxUpperCornerWidth : int + Width offset of right box corner + channelsPerPixel : Any + Number of channels per pixel + pixelsPerColumn : Any + Number of pixels per column + elementStrides : list[:py:obj:`~.cuuint32_t`] + Array containing traversal stride in each of the `tensorRank` + dimensions + interleave : :py:obj:`~.CUtensorMapInterleave` + Type of interleaved layout the tensor addresses + mode : :py:obj:`~.CUtensorMapIm2ColWideMode` + W or W128 mode + swizzle : :py:obj:`~.CUtensorMapSwizzle` + Bank swizzling pattern inside shared memory + l2Promotion : :py:obj:`~.CUtensorMapL2promotion` + L2 promotion size + oobFill : :py:obj:`~.CUtensorMapFloatOOBfill` + Indicate whether zero or special NaN constant will be used to fill + out-of-bound elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + tensorMap : :py:obj:`~.CUtensorMap` + Tensor map object to create + + See Also + -------- + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapReplaceAddress` + """ + elementStrides = [] if elementStrides is None else elementStrides + if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): + raise TypeError("Argument 'elementStrides' is not instance of type (expected tuple[cydriver.cuuint32_t,] or list[cydriver.cuuint32_t,]") + cdef cydriver.cuuint32_t cypixelsPerColumn + if pixelsPerColumn is None: + ppixelsPerColumn = 0 + elif isinstance(pixelsPerColumn, (cuuint32_t,)): + ppixelsPerColumn = int(pixelsPerColumn) + else: + ppixelsPerColumn = int(cuuint32_t(pixelsPerColumn)) + cypixelsPerColumn = ppixelsPerColumn + cdef cydriver.cuuint32_t cychannelsPerPixel + if channelsPerPixel is None: + pchannelsPerPixel = 0 + elif isinstance(channelsPerPixel, (cuuint32_t,)): + pchannelsPerPixel = int(channelsPerPixel) + else: + pchannelsPerPixel = int(cuuint32_t(channelsPerPixel)) + cychannelsPerPixel = pchannelsPerPixel + globalStrides = [] if globalStrides is None else globalStrides + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalStrides): + raise TypeError("Argument 'globalStrides' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + globalDim = [] if globalDim is None else globalDim + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalDim): + raise TypeError("Argument 'globalDim' is not instance of type (expected tuple[cydriver.cuuint64_t,] or list[cydriver.cuuint64_t,]") + cdef cydriver.cuuint32_t cytensorRank + if tensorRank is None: + ptensorRank = 0 + elif isinstance(tensorRank, (cuuint32_t,)): + ptensorRank = int(tensorRank) + else: + ptensorRank = int(cuuint32_t(tensorRank)) + cytensorRank = ptensorRank + cdef CUtensorMap tensorMap = CUtensorMap() + cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cyglobalAddress = _HelperInputVoidPtr(globalAddress) + cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr + cdef cydriver.cuuint64_t* cyglobalDim = NULL + if len(globalDim) > 1: + cyglobalDim = calloc(len(globalDim), sizeof(cydriver.cuuint64_t)) + if cyglobalDim is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalDim)): + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] + elif len(globalDim) == 1: + cyglobalDim = (globalDim[0])._pvt_ptr + cdef cydriver.cuuint64_t* cyglobalStrides = NULL + if len(globalStrides) > 1: + cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) + if cyglobalStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalStrides)): + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] + elif len(globalStrides) == 1: + cyglobalStrides = (globalStrides[0])._pvt_ptr + cdef cydriver.cuuint32_t* cyelementStrides = NULL + if len(elementStrides) > 1: + cyelementStrides = calloc(len(elementStrides), sizeof(cydriver.cuuint32_t)) + if cyelementStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) + else: + for idx in range(len(elementStrides)): + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] + elif len(elementStrides) == 1: + cyelementStrides = (elementStrides[0])._pvt_ptr + cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value + cdef cydriver.CUtensorMapIm2ColWideMode cymode = mode.value + cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + with nogil: + err = cydriver.cuTensorMapEncodeIm2colWide(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cymode, cyswizzle, cyl2Promotion, cyoobFill) + if len(globalDim) > 1 and cyglobalDim is not NULL: + free(cyglobalDim) + if len(globalStrides) > 1 and cyglobalStrides is not NULL: + free(cyglobalStrides) + if len(elementStrides) > 1 and cyelementStrides is not NULL: + free(cyelementStrides) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], tensorMap) + +@cython.embedsignature(True) +def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): + """ Modify an existing tensor map descriptor with an updated global address. + + Modifies the descriptor for Tensor Memory Access (TMA) object passed in + `tensorMap` with an updated `globalAddress`. + + Tensor map objects are only supported on devices of compute capability + 9.0 or higher. Additionally, a tensor map object is an opaque value, + and, as such, should only be accessed through CUDA API calls. + + Parameters + ---------- + tensorMap : :py:obj:`~.CUtensorMap` + Tensor map object to modify + globalAddress : Any + Starting address of memory region described by tensor, must follow + previous alignment requirements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapEncodeIm2colWide` + """ + cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap is not None else NULL + cyglobalAddress = _HelperInputVoidPtr(globalAddress) + cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr + with nogil: + err = cydriver.cuTensorMapReplaceAddress(cytensorMap_ptr, cyglobalAddress_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceCanAccessPeer(dev, peerDev): + """ Queries if a device may directly access a peer device's memory. + + Returns in `*canAccessPeer` a value of 1 if contexts on `dev` are + capable of directly accessing memory from contexts on `peerDev` and 0 + otherwise. If direct access of `peerDev` from `dev` is possible, then + access may be enabled on two specific contexts by calling + :py:obj:`~.cuCtxEnablePeerAccess()`. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device from which allocations on `peerDev` are to be directly + accessed. + peerDev : :py:obj:`~.CUdevice` + Device on which the allocations to be directly accessed by `dev` + reside. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + canAccessPeer : int + Returned access capability + + See Also + -------- + :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cudaDeviceCanAccessPeer` + """ + cdef cydriver.CUdevice cypeerDev + if peerDev is None: + ppeerDev = 0 + elif isinstance(peerDev, (CUdevice,)): + ppeerDev = int(peerDev) + else: + ppeerDev = int(CUdevice(peerDev)) + cypeerDev = ppeerDev + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef int canAccessPeer = 0 + with nogil: + err = cydriver.cuDeviceCanAccessPeer(&canAccessPeer, cydev, cypeerDev) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], canAccessPeer) + +@cython.embedsignature(True) +def cuCtxEnablePeerAccess(peerContext, unsigned int Flags): + """ Enables direct access to memory allocations in a peer context. + + If both the current context and `peerContext` are on devices which + support unified addressing (as may be queried using + :py:obj:`~.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING`) and same major + compute capability, then on success all allocations from `peerContext` + will immediately be accessible by the current context. See + :py:obj:`~.Unified Addressing` for additional details. + + Note that access granted by this call is unidirectional and that in + order to access memory from the current context in `peerContext`, a + separate symmetric call to :py:obj:`~.cuCtxEnablePeerAccess()` is + required. + + Note that there are both device-wide and system-wide limitations per + system configuration, as noted in the CUDA Programming Guide under the + section "Peer-to-Peer Memory Access". + + Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED` if + :py:obj:`~.cuDeviceCanAccessPeer()` indicates that the + :py:obj:`~.CUdevice` of the current context cannot directly access + memory from the :py:obj:`~.CUdevice` of `peerContext`. + + Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED` if direct + access of `peerContext` from the current context has already been + enabled. + + Returns :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS` if direct peer access is + not possible because hardware resources required for peer access have + been exhausted. + + Returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` if there is no current + context, `peerContext` is not a valid context, or if the current + context is `peerContext`. + + Returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `Flags` is not 0. + + Parameters + ---------- + peerContext : :py:obj:`~.CUcontext` + Peer context to enable direct access to from the current context + Flags : unsigned int + Reserved for future use and must be set to 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED`, :py:obj:`~.CUDA_ERROR_TOO_MANY_PEERS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + + See Also + -------- + :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cudaDeviceEnablePeerAccess` + """ + cdef cydriver.CUcontext cypeerContext + if peerContext is None: + ppeerContext = 0 + elif isinstance(peerContext, (CUcontext,)): + ppeerContext = int(peerContext) + else: + ppeerContext = int(CUcontext(peerContext)) + cypeerContext = ppeerContext + with nogil: + err = cydriver.cuCtxEnablePeerAccess(cypeerContext, Flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxDisablePeerAccess(peerContext): + """ Disables direct access to memory allocations in a peer context and unregisters any registered allocations. + + Returns :py:obj:`~.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED` if direct peer + access has not yet been enabled from `peerContext` to the current + context. + + Returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` if there is no current + context, or if `peerContext` is not a valid context. + + Parameters + ---------- + peerContext : :py:obj:`~.CUcontext` + Peer context to disable direct access to + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + + See Also + -------- + :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cudaDeviceDisablePeerAccess` + """ + cdef cydriver.CUcontext cypeerContext + if peerContext is None: + ppeerContext = 0 + elif isinstance(peerContext, (CUcontext,)): + ppeerContext = int(peerContext) + else: + ppeerContext = int(CUcontext(peerContext)) + cypeerContext = ppeerContext + with nogil: + err = cydriver.cuCtxDisablePeerAccess(cypeerContext) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, dstDevice): + """ Queries attributes of the link between two devices. + + Returns in `*value` the value of the requested attribute `attrib` of + the link between `srcDevice` and `dstDevice`. The supported attributes + are: + + - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK`: A relative + value indicating the performance of the link between two devices. + + - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED` P2P: 1 if P2P + Access is enable. + + - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED`: 1 if + Atomic operations over the link are supported. + + - :py:obj:`~.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED`: 1 if + cudaArray can be accessed over the link. + + Returns :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` if `srcDevice` or + `dstDevice` are not valid or if they represent the same device. + + Returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` if `attrib` is not valid + or if `value` is a null pointer. + + Parameters + ---------- + attrib : :py:obj:`~.CUdevice_P2PAttribute` + The requested attribute of the link between `srcDevice` and + `dstDevice`. + srcDevice : :py:obj:`~.CUdevice` + The source device of the target link. + dstDevice : :py:obj:`~.CUdevice` + The destination device of the target link. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + value : int + Returned value of the requested attribute + + See Also + -------- + :py:obj:`~.cuCtxEnablePeerAccess`, :py:obj:`~.cuCtxDisablePeerAccess`, :py:obj:`~.cuDeviceCanAccessPeer`, :py:obj:`~.cudaDeviceGetP2PAttribute` + """ + cdef cydriver.CUdevice cydstDevice + if dstDevice is None: + pdstDevice = 0 + elif isinstance(dstDevice, (CUdevice,)): + pdstDevice = int(dstDevice) + else: + pdstDevice = int(CUdevice(dstDevice)) + cydstDevice = pdstDevice + cdef cydriver.CUdevice cysrcDevice + if srcDevice is None: + psrcDevice = 0 + elif isinstance(srcDevice, (CUdevice,)): + psrcDevice = int(srcDevice) + else: + psrcDevice = int(CUdevice(srcDevice)) + cysrcDevice = psrcDevice + cdef int value = 0 + cdef cydriver.CUdevice_P2PAttribute cyattrib = attrib.value + with nogil: + err = cydriver.cuDeviceGetP2PAttribute(&value, cyattrib, cysrcDevice, cydstDevice) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], value) + +@cython.embedsignature(True) +def cuGraphicsUnregisterResource(resource): + """ Unregisters a graphics resource for access by CUDA. + + Unregisters the graphics resource `resource` so it is not accessible by + CUDA unless registered again. + + If `resource` is invalid then :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is + returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + Resource to unregister + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + + See Also + -------- + :py:obj:`~.cuGraphicsD3D9RegisterResource`, :py:obj:`~.cuGraphicsD3D10RegisterResource`, :py:obj:`~.cuGraphicsD3D11RegisterResource`, :py:obj:`~.cuGraphicsGLRegisterBuffer`, :py:obj:`~.cuGraphicsGLRegisterImage`, :py:obj:`~.cudaGraphicsUnregisterResource` + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + with nogil: + err = cydriver.cuGraphicsUnregisterResource(cyresource) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel): + """ Get an array through which to access a subresource of a mapped graphics resource. + + Returns in `*pArray` an array through which the subresource of the + mapped graphics resource `resource` which corresponds to array index + `arrayIndex` and mipmap level `mipLevel` may be accessed. The value set + in `*pArray` may change every time that `resource` is mapped. + + If `resource` is not a texture then it cannot be accessed via an array + and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` is returned. If + `arrayIndex` is not a valid array index for `resource` then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. If `mipLevel` is not + a valid mipmap level for `resource` then + :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is returned. If `resource` is not + mapped then :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + Mapped resource to access + arrayIndex : unsigned int + Array index for array textures or cubemap face index as defined by + :py:obj:`~.CUarray_cubemap_face` for cubemap textures for the + subresource to access + mipLevel : unsigned int + Mipmap level for the subresource to access + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` + pArray : :py:obj:`~.CUarray` + Returned array through which a subresource of `resource` may be + accessed + + See Also + -------- + :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray` + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + cdef CUarray pArray = CUarray() + with nogil: + err = cydriver.cuGraphicsSubResourceGetMappedArray(pArray._pvt_ptr, cyresource, arrayIndex, mipLevel) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pArray) + +@cython.embedsignature(True) +def cuGraphicsResourceGetMappedMipmappedArray(resource): + """ Get a mipmapped array through which to access a mapped graphics resource. + + Returns in `*pMipmappedArray` a mipmapped array through which the + mapped graphics resource `resource`. The value set in + `*pMipmappedArray` may change every time that `resource` is mapped. + + If `resource` is not a texture then it cannot be accessed via a + mipmapped array and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` is + returned. If `resource` is not mapped then + :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + Mapped resource to access + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_ARRAY` + pMipmappedArray : :py:obj:`~.CUmipmappedArray` + Returned mipmapped array through which `resource` may be accessed + + See Also + -------- + :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsResourceGetMappedMipmappedArray` + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray() + with nogil: + err = cydriver.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._pvt_ptr, cyresource) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pMipmappedArray) + +@cython.embedsignature(True) +def cuGraphicsResourceGetMappedPointer(resource): + """ Get a device pointer through which to access a mapped graphics resource. + + Returns in `*pDevPtr` a pointer through which the mapped graphics + resource `resource` may be accessed. Returns in `pSize` the size of the + memory in bytes which may be accessed from that pointer. The value set + in `pPointer` may change every time that `resource` is mapped. + + If `resource` is not a buffer then it cannot be accessed via a pointer + and :py:obj:`~.CUDA_ERROR_NOT_MAPPED_AS_POINTER` is returned. If + `resource` is not mapped then :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is + returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + None + + Returns + ------- + CUresult + + pDevPtr : :py:obj:`~.CUdeviceptr` + None + pSize : int + None + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + cdef CUdeviceptr pDevPtr = CUdeviceptr() + cdef size_t pSize = 0 + with nogil: + err = cydriver.cuGraphicsResourceGetMappedPointer(pDevPtr._pvt_ptr, &pSize, cyresource) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pDevPtr, pSize) + +@cython.embedsignature(True) +def cuGraphicsResourceSetMapFlags(resource, unsigned int flags): + """ Set usage flags for mapping a graphics resource. + + Set `flags` for mapping the graphics resource `resource`. + + Changes to `flags` will take effect the next time `resource` is mapped. + The `flags` argument may be any of the following: + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints + about how this resource will be used. It is therefore assumed that + this resource will be read from and written to by CUDA kernels. This + is the default value. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY`: Specifies that + CUDA kernels which access this resource will not write to this + resource. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD`: Specifies + that CUDA kernels which access this resource will not read from this + resource and will write over the entire contents of the resource, so + none of the data previously stored in the resource will be preserved. + + If `resource` is presently mapped for access by CUDA then + :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED` is returned. If `flags` is not + one of the above values then :py:obj:`~.CUDA_ERROR_INVALID_VALUE` is + returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + Registered resource to set flags for + flags : unsigned int + Parameters for resource mapping + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED` + + See Also + -------- + :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cudaGraphicsResourceSetMapFlags` + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + with nogil: + err = cydriver.cuGraphicsResourceSetMapFlags(cyresource, flags) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphicsMapResources(unsigned int count, resources, hStream): + """ Map graphics resources for access by CUDA. + + Maps the `count` graphics resources in `resources` for access by CUDA. + + The resources in `resources` may be accessed by CUDA until they are + unmapped. The graphics API from which `resources` were registered + should not access any resources while they are mapped by CUDA. If an + application does so, the results are undefined. + + This function provides the synchronization guarantee that any graphics + calls issued before :py:obj:`~.cuGraphicsMapResources()` will complete + before any subsequent CUDA work issued in `stream` begins. + + If `resources` includes any duplicate entries then + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If any of + `resources` are presently mapped for access by CUDA then + :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED` is returned. + + Parameters + ---------- + count : unsigned int + Number of resources to map + resources : :py:obj:`~.CUgraphicsResource` + Resources to map for CUDA usage + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream with which to synchronize + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + + See Also + -------- + :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cudaGraphicsMapResources` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphicsResource *cyresources + if resources is None: + cyresources = NULL + elif isinstance(resources, (CUgraphicsResource,)): + presources = resources.getPtr() + cyresources = presources + elif isinstance(resources, (int)): + cyresources = resources + else: + raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) + with nogil: + err = cydriver.cuGraphicsMapResources(count, cyresources, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphicsUnmapResources(unsigned int count, resources, hStream): + """ Unmap graphics resources. + + Unmaps the `count` graphics resources in `resources`. + + Once unmapped, the resources in `resources` may not be accessed by CUDA + until they are mapped again. + + This function provides the synchronization guarantee that any CUDA work + issued in `stream` before :py:obj:`~.cuGraphicsUnmapResources()` will + complete before any subsequently issued graphics work begins. + + If `resources` includes any duplicate entries then + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If any of + `resources` are not presently mapped for access by CUDA then + :py:obj:`~.CUDA_ERROR_NOT_MAPPED` is returned. + + Parameters + ---------- + count : unsigned int + Number of resources to unmap + resources : :py:obj:`~.CUgraphicsResource` + Resources to unmap + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream with which to synchronize + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_MAPPED`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + + See Also + -------- + :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cudaGraphicsUnmapResources` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef cydriver.CUgraphicsResource *cyresources + if resources is None: + cyresources = NULL + elif isinstance(resources, (CUgraphicsResource,)): + presources = resources.getPtr() + cyresources = presources + elif isinstance(resources, (int)): + cyresources = resources + else: + raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) + with nogil: + err = cydriver.cuGraphicsUnmapResources(count, cyresources, cyhStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGetProcAddress(char* symbol, int cudaVersion, flags): + """ Returns the requested driver API function pointer. + + Returns in `**pfn` the address of the CUDA driver function for the + requested CUDA version and flags. + + The CUDA version is specified as (1000 * major + 10 * minor), so CUDA + 11.2 should be specified as 11020. For a requested driver symbol, if + the specified CUDA version is greater than or equal to the CUDA version + in which the driver symbol was introduced, this API will return the + function pointer to the corresponding versioned function. + + The pointer returned by the API should be cast to a function pointer + matching the requested driver function's definition in the API header + file. The function pointer typedef can be picked up from the + corresponding typedefs header file. For example, cudaTypedefs.h + consists of function pointer typedefs for driver APIs defined in + :py:obj:`~.cuda.h`. + + The API will return :py:obj:`~.CUDA_SUCCESS` and set the returned `pfn` + to NULL if the requested driver function is not supported on the + platform, no ABI compatible driver function exists for the specified + `cudaVersion` or if the driver symbol is invalid. + + It will also set the optional `symbolStatus` to one of the values in + :py:obj:`~.CUdriverProcAddressQueryResult` with the following meanings: + + - :py:obj:`~.CU_GET_PROC_ADDRESS_SUCCESS` - The requested symbol was + succesfully found based on input arguments and `pfn` is valid + + - :py:obj:`~.CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND` - The requested + symbol was not found + + - :py:obj:`~.CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT` - The + requested symbol was found but is not supported by cudaVersion + specified + + The requested flags can be: + + - :py:obj:`~.CU_GET_PROC_ADDRESS_DEFAULT`: This is the default mode. + This is equivalent to + :py:obj:`~.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM` if the code + is compiled with --default-stream per-thread compilation flag or the + macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; + :py:obj:`~.CU_GET_PROC_ADDRESS_LEGACY_STREAM` otherwise. + + - :py:obj:`~.CU_GET_PROC_ADDRESS_LEGACY_STREAM`: This will enable the + search for all driver symbols that match the requested driver symbol + name except the corresponding per-thread versions. + + - :py:obj:`~.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM`: This will + enable the search for all driver symbols that match the requested + driver symbol name including the per-thread versions. If a per-thread + version is not found, the API will return the legacy version of the + driver function. + + Parameters + ---------- + symbol : bytes + The base name of the driver API function to look for. As an + example, for the driver API :py:obj:`~.cuMemAlloc_v2`, `symbol` + would be cuMemAlloc and `cudaVersion` would be the ABI compatible + CUDA version for the _v2 variant. + cudaVersion : int + The CUDA version to look for the requested driver symbol + flags : Any + Flags to specify search options. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pfn : Any + Location to return the function pointer to the requested driver + function + symbolStatus : :py:obj:`~.CUdriverProcAddressQueryResult` + Optional location to store the status of the search for `symbol` + based on `cudaVersion`. See + :py:obj:`~.CUdriverProcAddressQueryResult` for possible values. + + See Also + -------- + :py:obj:`~.cudaGetDriverEntryPoint` + """ + cdef cydriver.cuuint64_t cyflags + if flags is None: + pflags = 0 + elif isinstance(flags, (cuuint64_t,)): + pflags = int(flags) + else: + pflags = int(cuuint64_t(flags)) + cyflags = pflags + cdef void_ptr pfn = 0 + cdef cydriver.CUdriverProcAddressQueryResult symbolStatus + with nogil: + err = cydriver.cuGetProcAddress(symbol, &pfn, cudaVersion, cyflags, &symbolStatus) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pfn, CUdriverProcAddressQueryResult(symbolStatus)) + +@cython.embedsignature(True) +def cuCoredumpGetAttribute(attrib not None : CUcoredumpSettings): + """ Allows caller to fetch a coredump attribute value for the current context. + + Returns in `*value` the requested value specified by `attrib`. It is up + to the caller to ensure that the data type and size of `*value` matches + the request. + + If the caller calls this function with `*value` equal to NULL, the size + of the memory region (in bytes) expected for `attrib` will be placed in + `size`. + + The supported attributes are: + + - :py:obj:`~.CU_COREDUMP_ENABLE_ON_EXCEPTION`: Bool where + :py:obj:`~.true` means that GPU exceptions from this context will + create a coredump at the location specified by + :py:obj:`~.CU_COREDUMP_FILE`. The default value is :py:obj:`~.false` + unless set to :py:obj:`~.true` globally or locally, or the + CU_CTX_USER_COREDUMP_ENABLE flag was set during context creation. + + - :py:obj:`~.CU_COREDUMP_TRIGGER_HOST`: Bool where :py:obj:`~.true` + means that the host CPU will also create a coredump. The default + value is :py:obj:`~.true` unless set to :py:obj:`~.false` globally or + or locally. This value is deprecated as of CUDA 12.5 - raise the + :py:obj:`~.CU_COREDUMP_SKIP_ABORT` flag to disable host device + abort() if needed. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT`: Bool where :py:obj:`~.true` + means that any resulting coredumps will not have a dump of GPU memory + or non-reloc ELF images. The default value is :py:obj:`~.false` + unless set to :py:obj:`~.true` globally or locally. This attribute is + deprecated as of CUDA 12.5, please use + :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS` instead. + + - :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER`: Bool where + :py:obj:`~.true` means that a coredump can be created by writing to + the system pipe specified by :py:obj:`~.CU_COREDUMP_PIPE`. The + default value is :py:obj:`~.false` unless set to :py:obj:`~.true` + globally or locally. + + - :py:obj:`~.CU_COREDUMP_FILE`: String of up to 1023 characters that + defines the location where any coredumps generated by this context + will be written. The default value is + :py:obj:`~.core`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is the + host name of the machine running the CUDA applications and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_PIPE`: String of up to 1023 characters that + defines the name of the pipe that will be monitored if user-triggered + coredumps are enabled. The default value is + :py:obj:`~.corepipe`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is + the host name of the machine running the CUDA application and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS`: An integer with values to + allow granular control the data contained in a coredump specified as + a bitwise OR combination of the following values: + + - :py:obj:`~.CU_COREDUMP_DEFAULT_FLAGS` - if set by itself, coredump + generation returns to its default settings of including all memory + regions that it is able to access + + - :py:obj:`~.CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES` - Coredump + will not include the data from CUDA source modules that are not + relocated at runtime. + + - :py:obj:`~.CU_COREDUMP_SKIP_GLOBAL_MEMORY` - Coredump will not + include device-side global data that does not belong to any + context. + + - :py:obj:`~.CU_COREDUMP_SKIP_SHARED_MEMORY` - Coredump will not + include grid-scale shared memory for the warp that the dumped + kernel belonged to. + + - :py:obj:`~.CU_COREDUMP_SKIP_LOCAL_MEMORY` - Coredump will not + include local memory from the kernel. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT_FLAGS` - Enables all of the + above options. Equiavlent to setting the + :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT` attribute to :py:obj:`~.true`. + + - :py:obj:`~.CU_COREDUMP_SKIP_ABORT` - If set, GPU exceptions will + not raise an abort() in the host CPU process. Same functional goal + as :py:obj:`~.CU_COREDUMP_TRIGGER_HOST` but better reflects the + default behavior. + + Parameters + ---------- + attrib : :py:obj:`~.CUcoredumpSettings` + The enum defining which value to fetch. + size : int + The size of the memory region `value` points to. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + value : Any + void* containing the requested data. + size : int + The size of the memory region `value` points to. + + See Also + -------- + :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` + """ + cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + cdef size_t size = cyvalue.size() + with nogil: + err = cydriver.cuCoredumpGetAttribute(cyattrib, cyvalue_ptr, &size) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cuCoredumpGetAttributeGlobal(attrib not None : CUcoredumpSettings): + """ Allows caller to fetch a coredump attribute value for the entire application. + + Returns in `*value` the requested value specified by `attrib`. It is up + to the caller to ensure that the data type and size of `*value` matches + the request. + + If the caller calls this function with `*value` equal to NULL, the size + of the memory region (in bytes) expected for `attrib` will be placed in + `size`. + + The supported attributes are: + + - :py:obj:`~.CU_COREDUMP_ENABLE_ON_EXCEPTION`: Bool where + :py:obj:`~.true` means that GPU exceptions from this context will + create a coredump at the location specified by + :py:obj:`~.CU_COREDUMP_FILE`. The default value is :py:obj:`~.false`. + + - :py:obj:`~.CU_COREDUMP_TRIGGER_HOST`: Bool where :py:obj:`~.true` + means that the host CPU will also create a coredump. The default + value is :py:obj:`~.true` unless set to :py:obj:`~.false` globally or + or locally. This value is deprecated as of CUDA 12.5 - raise the + :py:obj:`~.CU_COREDUMP_SKIP_ABORT` flag to disable host device + abort() if needed. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT`: Bool where :py:obj:`~.true` + means that any resulting coredumps will not have a dump of GPU memory + or non-reloc ELF images. The default value is :py:obj:`~.false`. This + attribute is deprecated as of CUDA 12.5, please use + :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS` instead. + + - :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER`: Bool where + :py:obj:`~.true` means that a coredump can be created by writing to + the system pipe specified by :py:obj:`~.CU_COREDUMP_PIPE`. The + default value is :py:obj:`~.false`. + + - :py:obj:`~.CU_COREDUMP_FILE`: String of up to 1023 characters that + defines the location where any coredumps generated by this context + will be written. The default value is + :py:obj:`~.core`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is the + host name of the machine running the CUDA applications and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_PIPE`: String of up to 1023 characters that + defines the name of the pipe that will be monitored if user-triggered + coredumps are enabled. The default value is + :py:obj:`~.corepipe`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is + the host name of the machine running the CUDA application and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS`: An integer with values to + allow granular control the data contained in a coredump specified as + a bitwise OR combination of the following values: + + - :py:obj:`~.CU_COREDUMP_DEFAULT_FLAGS` - if set by itself, coredump + generation returns to its default settings of including all memory + regions that it is able to access + + - :py:obj:`~.CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES` - Coredump + will not include the data from CUDA source modules that are not + relocated at runtime. + + - :py:obj:`~.CU_COREDUMP_SKIP_GLOBAL_MEMORY` - Coredump will not + include device-side global data that does not belong to any + context. + + - :py:obj:`~.CU_COREDUMP_SKIP_SHARED_MEMORY` - Coredump will not + include grid-scale shared memory for the warp that the dumped + kernel belonged to. + + - :py:obj:`~.CU_COREDUMP_SKIP_LOCAL_MEMORY` - Coredump will not + include local memory from the kernel. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT_FLAGS` - Enables all of the + above options. Equiavlent to setting the + :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT` attribute to :py:obj:`~.true`. + + - :py:obj:`~.CU_COREDUMP_SKIP_ABORT` - If set, GPU exceptions will + not raise an abort() in the host CPU process. Same functional goal + as :py:obj:`~.CU_COREDUMP_TRIGGER_HOST` but better reflects the + default behavior. + + Parameters + ---------- + attrib : :py:obj:`~.CUcoredumpSettings` + The enum defining which value to fetch. + size : int + The size of the memory region `value` points to. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + value : Any + void* containing the requested data. + size : int + The size of the memory region `value` points to. + + See Also + -------- + :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpSetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` + """ + cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + cdef size_t size = cyvalue.size() + with nogil: + err = cydriver.cuCoredumpGetAttributeGlobal(cyattrib, cyvalue_ptr, &size) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cuCoredumpSetAttribute(attrib not None : CUcoredumpSettings, value): + """ Allows caller to set a coredump attribute value for the current context. + + This function should be considered an alternate interface to the CUDA- + GDB environment variables defined in this document: + https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump + + An important design decision to note is that any coredump environment + variable values set before CUDA initializes will take permanent + precedence over any values set with this function. This decision was + made to ensure no change in behavior for any users that may be + currently using these variables to get coredumps. + + `*value` shall contain the requested value specified by `set`. It is up + to the caller to ensure that the data type and size of `*value` matches + the request. + + If the caller calls this function with `*value` equal to NULL, the size + of the memory region (in bytes) expected for `set` will be placed in + `size`. + + /note This function will return :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` if + the caller attempts to set :py:obj:`~.CU_COREDUMP_ENABLE_ON_EXCEPTION` + on a GPU of with Compute Capability < 6.0. + :py:obj:`~.cuCoredumpSetAttributeGlobal` works on those platforms as an + alternative. + + /note :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER` and + :py:obj:`~.CU_COREDUMP_PIPE` cannot be set on a per-context basis. + + The supported attributes are: + + - :py:obj:`~.CU_COREDUMP_ENABLE_ON_EXCEPTION`: Bool where + :py:obj:`~.true` means that GPU exceptions from this context will + create a coredump at the location specified by + :py:obj:`~.CU_COREDUMP_FILE`. The default value is :py:obj:`~.false`. + + - :py:obj:`~.CU_COREDUMP_TRIGGER_HOST`: Bool where :py:obj:`~.true` + means that the host CPU will also create a coredump. The default + value is :py:obj:`~.true` unless set to :py:obj:`~.false` globally or + or locally. This value is deprecated as of CUDA 12.5 - raise the + :py:obj:`~.CU_COREDUMP_SKIP_ABORT` flag to disable host device + abort() if needed. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT`: Bool where :py:obj:`~.true` + means that any resulting coredumps will not have a dump of GPU memory + or non-reloc ELF images. The default value is :py:obj:`~.false`. This + attribute is deprecated as of CUDA 12.5, please use + :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS` instead. + + - :py:obj:`~.CU_COREDUMP_FILE`: String of up to 1023 characters that + defines the location where any coredumps generated by this context + will be written. The default value is + :py:obj:`~.core`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is the + host name of the machine running the CUDA applications and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS`: An integer with values to + allow granular control the data contained in a coredump specified as + a bitwise OR combination of the following values: + + - :py:obj:`~.CU_COREDUMP_DEFAULT_FLAGS` - if set by itself, coredump + generation returns to its default settings of including all memory + regions that it is able to access + + - :py:obj:`~.CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES` - Coredump + will not include the data from CUDA source modules that are not + relocated at runtime. + + - :py:obj:`~.CU_COREDUMP_SKIP_GLOBAL_MEMORY` - Coredump will not + include device-side global data that does not belong to any + context. + + - :py:obj:`~.CU_COREDUMP_SKIP_SHARED_MEMORY` - Coredump will not + include grid-scale shared memory for the warp that the dumped + kernel belonged to. + + - :py:obj:`~.CU_COREDUMP_SKIP_LOCAL_MEMORY` - Coredump will not + include local memory from the kernel. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT_FLAGS` - Enables all of the + above options. Equiavlent to setting the + :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT` attribute to :py:obj:`~.true`. + + - :py:obj:`~.CU_COREDUMP_SKIP_ABORT` - If set, GPU exceptions will + not raise an abort() in the host CPU process. Same functional goal + as :py:obj:`~.CU_COREDUMP_TRIGGER_HOST` but better reflects the + default behavior. + + Parameters + ---------- + attrib : :py:obj:`~.CUcoredumpSettings` + The enum defining which value to set. + value : Any + void* containing the requested data. + size : int + The size of the memory region `value` points to. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + size : int + The size of the memory region `value` points to. + + See Also + -------- + :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpSetAttributeGlobal` + """ + cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + cdef size_t size = cyvalue.size() + with nogil: + err = cydriver.cuCoredumpSetAttribute(cyattrib, cyvalue_ptr, &size) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCoredumpSetAttributeGlobal(attrib not None : CUcoredumpSettings, value): + """ Allows caller to set a coredump attribute value globally. + + This function should be considered an alternate interface to the CUDA- + GDB environment variables defined in this document: + https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump + + An important design decision to note is that any coredump environment + variable values set before CUDA initializes will take permanent + precedence over any values set with this function. This decision was + made to ensure no change in behavior for any users that may be + currently using these variables to get coredumps. + + `*value` shall contain the requested value specified by `set`. It is up + to the caller to ensure that the data type and size of `*value` matches + the request. + + If the caller calls this function with `*value` equal to NULL, the size + of the memory region (in bytes) expected for `set` will be placed in + `size`. + + The supported attributes are: + + - :py:obj:`~.CU_COREDUMP_ENABLE_ON_EXCEPTION`: Bool where + :py:obj:`~.true` means that GPU exceptions from this context will + create a coredump at the location specified by + :py:obj:`~.CU_COREDUMP_FILE`. The default value is :py:obj:`~.false`. + + - :py:obj:`~.CU_COREDUMP_TRIGGER_HOST`: Bool where :py:obj:`~.true` + means that the host CPU will also create a coredump. The default + value is :py:obj:`~.true` unless set to :py:obj:`~.false` globally or + or locally. This value is deprecated as of CUDA 12.5 - raise the + :py:obj:`~.CU_COREDUMP_SKIP_ABORT` flag to disable host device + abort() if needed. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT`: Bool where :py:obj:`~.true` + means that any resulting coredumps will not have a dump of GPU memory + or non-reloc ELF images. The default value is :py:obj:`~.false`. This + attribute is deprecated as of CUDA 12.5, please use + :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS` instead. + + - :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER`: Bool where + :py:obj:`~.true` means that a coredump can be created by writing to + the system pipe specified by :py:obj:`~.CU_COREDUMP_PIPE`. The + default value is :py:obj:`~.false`. + + - :py:obj:`~.CU_COREDUMP_FILE`: String of up to 1023 characters that + defines the location where any coredumps generated by this context + will be written. The default value is + :py:obj:`~.core`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is the + host name of the machine running the CUDA applications and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_PIPE`: String of up to 1023 characters that + defines the name of the pipe that will be monitored if user-triggered + coredumps are enabled. This value may not be changed after + :py:obj:`~.CU_COREDUMP_ENABLE_USER_TRIGGER` is set to + :py:obj:`~.true`. The default value is + :py:obj:`~.corepipe`.cuda.HOSTNAME.PID where :py:obj:`~.HOSTNAME` is + the host name of the machine running the CUDA application and + :py:obj:`~.PID` is the process ID of the CUDA application. + + - :py:obj:`~.CU_COREDUMP_GENERATION_FLAGS`: An integer with values to + allow granular control the data contained in a coredump specified as + a bitwise OR combination of the following values: + + - :py:obj:`~.CU_COREDUMP_DEFAULT_FLAGS` - if set by itself, coredump + generation returns to its default settings of including all memory + regions that it is able to access + + - :py:obj:`~.CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES` - Coredump + will not include the data from CUDA source modules that are not + relocated at runtime. + + - :py:obj:`~.CU_COREDUMP_SKIP_GLOBAL_MEMORY` - Coredump will not + include device-side global data that does not belong to any + context. + + - :py:obj:`~.CU_COREDUMP_SKIP_SHARED_MEMORY` - Coredump will not + include grid-scale shared memory for the warp that the dumped + kernel belonged to. + + - :py:obj:`~.CU_COREDUMP_SKIP_LOCAL_MEMORY` - Coredump will not + include local memory from the kernel. + + - :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT_FLAGS` - Enables all of the + above options. Equiavlent to setting the + :py:obj:`~.CU_COREDUMP_LIGHTWEIGHT` attribute to :py:obj:`~.true`. + + - :py:obj:`~.CU_COREDUMP_SKIP_ABORT` - If set, GPU exceptions will + not raise an abort() in the host CPU process. Same functional goal + as :py:obj:`~.CU_COREDUMP_TRIGGER_HOST` but better reflects the + default behavior. + + Parameters + ---------- + attrib : :py:obj:`~.CUcoredumpSettings` + The enum defining which value to set. + value : Any + void* containing the requested data. + size : int + The size of the memory region `value` points to. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED` + size : int + The size of the memory region `value` points to. + + See Also + -------- + :py:obj:`~.cuCoredumpGetAttribute`, :py:obj:`~.cuCoredumpGetAttributeGlobal`, :py:obj:`~.cuCoredumpSetAttribute` + """ + cdef cydriver.CUcoredumpSettings cyattrib = attrib.value + cdef _HelperCUcoredumpSettings cyvalue = _HelperCUcoredumpSettings(attrib, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + cdef size_t size = cyvalue.size() + with nogil: + err = cydriver.cuCoredumpSetAttributeGlobal(cyattrib, cyvalue_ptr, &size) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGetExportTable(pExportTableId : Optional[CUuuid]): + """ + + Parameters + ---------- + pExportTableId : :py:obj:`~.CUuuid` + None + + Returns + ------- + CUresult + + ppExportTable : Any + None + """ + cdef void_ptr ppExportTable = 0 + cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL + with nogil: + err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], ppExportTable) + +@cython.embedsignature(True) +def cuGreenCtxCreate(desc, dev, unsigned int flags): + """ Creates a green context with a specified set of resources. + + This API creates a green context with the resources specified in the + descriptor `desc` and returns it in the handle represented by `phCtx`. + This API will retain the primary context on device `dev`, which will is + released when the green context is destroyed. It is advised to have the + primary context active before calling this API to avoid the heavy cost + of triggering primary context initialization and deinitialization + multiple times. + + The API does not set the green context current. In order to set it + current, you need to explicitly set it current by first converting the + green context to a CUcontext using :py:obj:`~.cuCtxFromGreenCtx` and + subsequently calling :py:obj:`~.cuCtxSetCurrent` / + :py:obj:`~.cuCtxPushCurrent`. It should be noted that a green context + can be current to only one thread at a time. There is no internal + synchronization to make API calls accessing the same green context from + multiple threads work. + + Note: The API is not supported on 32-bit platforms. + + The supported flags are: + + - `CU_GREEN_CTX_DEFAULT_STREAM` : Creates a default stream to use + inside the green context. Required. + + Parameters + ---------- + desc : :py:obj:`~.CUdevResourceDesc` + Descriptor generated via :py:obj:`~.cuDevResourceGenerateDesc` + which contains the set of resources to be used + dev : :py:obj:`~.CUdevice` + Device on which to create the green context. + flags : unsigned int + One of the supported green context creation flags. + `CU_GREEN_CTX_DEFAULT_STREAM` is required. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phCtx : :py:obj:`~.CUgreenCtx` + Pointer for the output handle to the green context + + See Also + -------- + :py:obj:`~.cuGreenCtxDestroy`, :py:obj:`~.cuCtxFromGreenCtx`, :py:obj:`~.cuCtxSetCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuDevResourceGenerateDesc`, :py:obj:`~.cuDevicePrimaryCtxRetain`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxCreate_v3` + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef cydriver.CUdevResourceDesc cydesc + if desc is None: + pdesc = 0 + elif isinstance(desc, (CUdevResourceDesc,)): + pdesc = int(desc) + else: + pdesc = int(CUdevResourceDesc(desc)) + cydesc = pdesc + cdef CUgreenCtx phCtx = CUgreenCtx() + with nogil: + err = cydriver.cuGreenCtxCreate(phCtx._pvt_ptr, cydesc, cydev, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phCtx) + +@cython.embedsignature(True) +def cuGreenCtxDestroy(hCtx): + """ Destroys a green context. + + Destroys the green context, releasing the primary context of the device + that this green context was created for. Any resources provisioned for + this green context (that were initially available via the resource + descriptor) are released as well. + + Parameters + ---------- + hCtx : :py:obj:`~.CUgreenCtx` + Green context to be destroyed + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_CONTEXT_IS_DESTROYED` + + See Also + -------- + :py:obj:`~.cuGreenCtxCreate`, :py:obj:`~.cuCtxDestroy` + """ + cdef cydriver.CUgreenCtx cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUgreenCtx,)): + phCtx = int(hCtx) + else: + phCtx = int(CUgreenCtx(hCtx)) + cyhCtx = phCtx + with nogil: + err = cydriver.cuGreenCtxDestroy(cyhCtx) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCtxFromGreenCtx(hCtx): + """ Converts a green context into the primary context. + + The API converts a green context into the primary context returned in + `pContext`. It is important to note that the converted context + `pContext` is a normal primary context but with the resources of the + specified green context `hCtx`. Once converted, it can then be used to + set the context current with :py:obj:`~.cuCtxSetCurrent` or with any of + the CUDA APIs that accept a CUcontext parameter. + + Users are expected to call this API before calling any CUDA APIs that + accept a CUcontext. Failing to do so will result in the APIs returning + :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. + + Parameters + ---------- + hCtx : :py:obj:`~.CUgreenCtx` + Green context to convert + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pContext : :py:obj:`~.CUcontext` + Returned primary context with green context resources + + See Also + -------- + :py:obj:`~.cuGreenCtxCreate` + """ + cdef cydriver.CUgreenCtx cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUgreenCtx,)): + phCtx = int(hCtx) + else: + phCtx = int(CUgreenCtx(hCtx)) + cyhCtx = phCtx + cdef CUcontext pContext = CUcontext() + with nogil: + err = cydriver.cuCtxFromGreenCtx(pContext._pvt_ptr, cyhCtx) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pContext) + +@cython.embedsignature(True) +def cuDeviceGetDevResource(device, typename not None : CUdevResourceType): + """ Get device resources. + + Get the `typename` resources available to the `device`. This may often + be the starting point for further partitioning or configuring of + resources. + + Note: The API is not supported on 32-bit platforms. + + Parameters + ---------- + device : :py:obj:`~.CUdevice` + Device to get resource for + typename : :py:obj:`~.CUdevResourceType` + Type of resource to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + resource : :py:obj:`~.CUdevResource` + Output pointer to a :py:obj:`~.CUdevResource` structure + + See Also + -------- + :py:obj:`~.cuDevResourceGenerateDesc` + """ + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef CUdevResource resource = CUdevResource() + cdef cydriver.CUdevResourceType cytypename = typename.value + with nogil: + err = cydriver.cuDeviceGetDevResource(cydevice, resource._pvt_ptr, cytypename) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], resource) + +@cython.embedsignature(True) +def cuCtxGetDevResource(hCtx, typename not None : CUdevResourceType): + """ Get context resources. + + Get the `typename` resources available to the context represented by + `hCtx` Note: The API is not supported on 32-bit platforms. + + Parameters + ---------- + hCtx : :py:obj:`~.CUcontext` + Context to get resource for + typename : :py:obj:`~.CUdevResourceType` + Type of resource to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + resource : :py:obj:`~.CUdevResource` + Output pointer to a :py:obj:`~.CUdevResource` structure + + See Also + -------- + :py:obj:`~.cuDevResourceGenerateDesc` + """ + cdef cydriver.CUcontext cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUcontext,)): + phCtx = int(hCtx) + else: + phCtx = int(CUcontext(hCtx)) + cyhCtx = phCtx + cdef CUdevResource resource = CUdevResource() + cdef cydriver.CUdevResourceType cytypename = typename.value + with nogil: + err = cydriver.cuCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], resource) + +@cython.embedsignature(True) +def cuGreenCtxGetDevResource(hCtx, typename not None : CUdevResourceType): + """ Get green context resources. + + Get the `typename` resources available to the green context represented + by `hCtx` + + Parameters + ---------- + hCtx : :py:obj:`~.CUgreenCtx` + Green context to get resource for + typename : :py:obj:`~.CUdevResourceType` + Type of resource to retrieve + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + resource : :py:obj:`~.CUdevResource` + Output pointer to a :py:obj:`~.CUdevResource` structure + + See Also + -------- + :py:obj:`~.cuDevResourceGenerateDesc` + """ + cdef cydriver.CUgreenCtx cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUgreenCtx,)): + phCtx = int(hCtx) + else: + phCtx = int(CUgreenCtx(hCtx)) + cyhCtx = phCtx + cdef CUdevResource resource = CUdevResource() + cdef cydriver.CUdevResourceType cytypename = typename.value + with nogil: + err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], resource) + +@cython.embedsignature(True) +def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevResource], unsigned int useFlags, unsigned int minCount): + """ Splits `CU_DEV_RESOURCE_TYPE_SM` resources. + + Splits `CU_DEV_RESOURCE_TYPE_SM` resources into `nbGroups`, adhering to + the minimum SM count specified in `minCount` and the usage flags in + `useFlags`. If `result` is NULL, the API simulates a split and provides + the amount of groups that would be created in `nbGroups`. Otherwise, + `nbGroups` must point to the amount of elements in `result` and on + return, the API will overwrite `nbGroups` with the amount actually + created. The groups are written to the array in `result`. `nbGroups` + can be less than the total amount if a smaller number of groups is + needed. + + This API is used to spatially partition the input resource. The input + resource needs to come from one of :py:obj:`~.cuDeviceGetDevResource`, + :py:obj:`~.cuCtxGetDevResource`, or + :py:obj:`~.cuGreenCtxGetDevResource`. A limitation of the API is that + the output results cannot be split again without first creating a + descriptor and a green context with that descriptor. + + When creating the groups, the API will take into account the + performance and functional characteristics of the input resource, and + guarantee a split that will create a disjoint set of symmetrical + partitions. This may lead to fewer groups created than purely dividing + the total SM count by the `minCount` due to cluster requirements or + alignment and granularity requirements for the minCount. + + The `remainder` set does not have the same functional or performance + guarantees as the groups in `result`. Its use should be carefully + planned and future partitions of the `remainder` set are discouraged. + + The following flags are supported: + + - `CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING` : Lower the minimum + SM count and alignment, and treat each SM independent of its + hierarchy. This allows more fine grained partitions but at the cost + of advanced features (such as large clusters on compute capability + 9.0+). + + - `CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE` : Compute + Capability 9.0+ only. Attempt to create groups that may allow for + maximally sized thread clusters. This can be queried post green + context creation using + :py:obj:`~.cuOccupancyMaxPotentialClusterSize`. + + A successful API call must either have: + + - A valid array of `result` pointers of size passed in `nbGroups`, with + `input` of type `CU_DEV_RESOURCE_TYPE_SM`. Value of `minCount` must + be between 0 and the SM count specified in `input`. `remaining` may + be NULL. + + - NULL passed in for `result`, with a valid integer pointer in + `nbGroups` and `input` of type `CU_DEV_RESOURCE_TYPE_SM`. Value of + `minCount` must be between 0 and the SM count specified in `input`. + `remaining` may be NULL. This queries the number of groups that would + be created by the API. + + Note: The API is not supported on 32-bit platforms. + + Parameters + ---------- + nbGroups : unsigned int + This is a pointer, specifying the number of groups that would be or + should be created as described below. + input : :py:obj:`~.CUdevResource` + Input SM resource to be split. Must be a valid + `CU_DEV_RESOURCE_TYPE_SM` resource. + useFlags : unsigned int + Flags specifying how these partitions are used or which constraints + to abide by when splitting the input. Zero is valid for default + behavior. + minCount : unsigned int + Minimum number of SMs required + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION` + result : list[:py:obj:`~.CUdevResource`] + Output array of `None` resources. Can be NULL to query the number + of groups. + nbGroups : unsigned int + This is a pointer, specifying the number of groups that would be or + should be created as described below. + remaining : :py:obj:`~.CUdevResource` + If the input resource cannot be cleanly split among `nbGroups`, the + remaining is placed in here. Can be ommitted (NULL) if the user + does not need the remaining set. + + See Also + -------- + :py:obj:`~.cuGreenCtxGetDevResource`, :py:obj:`~.cuCtxGetDevResource`, :py:obj:`~.cuDeviceGetDevResource` + """ + cdef cydriver.CUdevResource* cyresult = NULL + pyresult = [CUdevResource() for idx in range(nbGroups)] + if nbGroups != 0: + cyresult = calloc(nbGroups, sizeof(cydriver.CUdevResource)) + if cyresult is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(nbGroups) + 'x' + str(sizeof(cydriver.CUdevResource))) + cdef unsigned int cynbGroups = nbGroups + cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ is not None else NULL + cdef CUdevResource remaining = CUdevResource() + with nogil: + err = cydriver.cuDevSmResourceSplitByCount(cyresult, &cynbGroups, cyinput__ptr, remaining._pvt_ptr, useFlags, minCount) + if CUresult(err) == CUresult(0): + for idx in range(nbGroups): + string.memcpy((pyresult[idx])._pvt_ptr, &cyresult[idx], sizeof(cydriver.CUdevResource)) + if cyresult is not NULL: + free(cyresult) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None, None) + return (_dict_CUresult[err], pyresult, cynbGroups, remaining) + +@cython.embedsignature(True) +def cuDevResourceGenerateDesc(resources : Optional[tuple[CUdevResource] | list[CUdevResource]], unsigned int nbResources): + """ Generate a resource descriptor. + + Generates a single resource descriptor with the set of resources + specified in `resources`. The generated resource descriptor is + necessary for the creation of green contexts via the + :py:obj:`~.cuGreenCtxCreate` API. Resources of the same type can be + passed in, provided they meet the requirements as noted below. + + A successful API call must have: + + - A valid output pointer for the `phDesc` descriptor as well as a valid + array of `resources` pointers, with the array size passed in + `nbResources`. If multiple resources are provided in `resources`, the + device they came from must be the same, otherwise + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. If multiple + resources are provided in `resources` and they are of type + :py:obj:`~.CU_DEV_RESOURCE_TYPE_SM`, they must be outputs (whether + `result` or `remaining`) from the same split API instance, otherwise + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. + + Note: The API is not supported on 32-bit platforms. + + Parameters + ---------- + resources : list[:py:obj:`~.CUdevResource`] + Array of resources to be included in the descriptor + nbResources : unsigned int + Number of resources passed in `resources` + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_TYPE`, :py:obj:`~.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION` + phDesc : :py:obj:`~.CUdevResourceDesc` + Output descriptor + + See Also + -------- + :py:obj:`~.cuDevSmResourceSplitByCount` + """ + resources = [] if resources is None else resources + if not all(isinstance(_x, (CUdevResource,)) for _x in resources): + raise TypeError("Argument 'resources' is not instance of type (expected tuple[cydriver.CUdevResource,] or list[cydriver.CUdevResource,]") + cdef CUdevResourceDesc phDesc = CUdevResourceDesc() + cdef cydriver.CUdevResource* cyresources = NULL + if len(resources) > 1: + cyresources = calloc(len(resources), sizeof(cydriver.CUdevResource)) + if cyresources is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(resources)) + 'x' + str(sizeof(cydriver.CUdevResource))) + for idx in range(len(resources)): + string.memcpy(&cyresources[idx], (resources[idx])._pvt_ptr, sizeof(cydriver.CUdevResource)) + elif len(resources) == 1: + cyresources = (resources[0])._pvt_ptr + if nbResources > len(resources): raise RuntimeError("List is too small: " + str(len(resources)) + " < " + str(nbResources)) + with nogil: + err = cydriver.cuDevResourceGenerateDesc(phDesc._pvt_ptr, cyresources, nbResources) + if len(resources) > 1 and cyresources is not NULL: + free(cyresources) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phDesc) + +@cython.embedsignature(True) +def cuGreenCtxRecordEvent(hCtx, hEvent): + """ Records an event. + + Captures in `hEvent` all the activities of the green context of `hCtx` + at the time of this call. `hEvent` and `hCtx` must be from the same + primary context otherwise :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is + returned. Calls such as :py:obj:`~.cuEventQuery()` or + :py:obj:`~.cuGreenCtxWaitEvent()` will then examine or wait for + completion of the work that was captured. Uses of `hCtx` after this + call do not modify `hEvent`. + + Parameters + ---------- + hCtx : :py:obj:`~.CUgreenCtx` + Green context to record event for + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` + + See Also + -------- + :py:obj:`~.cuGreenCtxWaitEvent`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuCtxRecordEvent`, :py:obj:`~.cuCtxWaitEvent` + + Notes + ----- + The API will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` if the specified green context `hCtx` has a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures. + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + cdef cydriver.CUgreenCtx cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUgreenCtx,)): + phCtx = int(hCtx) + else: + phCtx = int(CUgreenCtx(hCtx)) + cyhCtx = phCtx + with nogil: + err = cydriver.cuGreenCtxRecordEvent(cyhCtx, cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGreenCtxWaitEvent(hCtx, hEvent): + """ Make a green context wait on an event. + + Makes all future work submitted to green context `hCtx` wait for all + work captured in `hEvent`. The synchronization will be performed on the + device and will not block the calling CPU thread. See + :py:obj:`~.cuGreenCtxRecordEvent()` or :py:obj:`~.cuEventRecord()`, for + details on what is captured by an event. + + Parameters + ---------- + hCtx : :py:obj:`~.CUgreenCtx` + Green context to wait + hEvent : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait on + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` + + See Also + -------- + :py:obj:`~.cuGreenCtxRecordEvent`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuCtxRecordEvent`, :py:obj:`~.cuCtxWaitEvent` + + Notes + ----- + `hEvent` may be from a different context or device than `hCtx`. + + The API will return :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED` and invalidate the capture if the specified event `hEvent` is part of an ongoing capture sequence or if the specified green context `hCtx` has a stream in the capture mode. + """ + cdef cydriver.CUevent cyhEvent + if hEvent is None: + phEvent = 0 + elif isinstance(hEvent, (CUevent,)): + phEvent = int(hEvent) + else: + phEvent = int(CUevent(hEvent)) + cyhEvent = phEvent + cdef cydriver.CUgreenCtx cyhCtx + if hCtx is None: + phCtx = 0 + elif isinstance(hCtx, (CUgreenCtx,)): + phCtx = int(hCtx) + else: + phCtx = int(CUgreenCtx(hCtx)) + cyhCtx = phCtx + with nogil: + err = cydriver.cuGreenCtxWaitEvent(cyhCtx, cyhEvent) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuStreamGetGreenCtx(hStream): + """ Query the green context associated with a stream. + + Returns the CUDA green context that the stream is associated with, or + NULL if the stream is not associated with any green context. + + The stream handle `hStream` can refer to any of the following: + + - a stream created via any of the CUDA driver APIs such as + :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority` + and :py:obj:`~.cuGreenCtxStreamCreate`, or their runtime API + equivalents such as :py:obj:`~.cudaStreamCreate`, + :py:obj:`~.cudaStreamCreateWithFlags` and + :py:obj:`~.cudaStreamCreateWithPriority`. If during stream creation + the context that was active in the calling thread was obtained with + cuCtxFromGreenCtx, that green context is returned in `phCtx`. + Otherwise, `*phCtx` is set to NULL instead. + + - special stream such as the NULL stream or + :py:obj:`~.CU_STREAM_LEGACY`. In that case if context that is active + in the calling thread was obtained with cuCtxFromGreenCtx, that green + context is returned. Otherwise, `*phCtx` is set to NULL instead. + + Passing an invalid handle will result in undefined behavior. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, + phCtx : :py:obj:`~.CUgreenCtx` + Returned green context associated with the stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUgreenCtx phCtx = CUgreenCtx() + with nogil: + err = cydriver.cuStreamGetGreenCtx(cyhStream, phCtx._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phCtx) + +@cython.embedsignature(True) +def cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority): + """ Create a stream for use in the green context. + + Creates a stream for use in the specified green context `greenCtx` and + returns a handle in `phStream`. The stream can be destroyed by calling + :py:obj:`~.cuStreamDestroy()`. Note that the API ignores the context + that is current to the calling thread and creates a stream in the + specified green context `greenCtx`. + + The supported values for `flags` are: + + - :py:obj:`~.CU_STREAM_NON_BLOCKING`: This must be specified. It + indicates that work running in the created stream may run + concurrently with work in the default stream, and that the created + stream should perform no implicit synchronization with the default + stream. + + Specifying `priority` affects the scheduling priority of work in the + stream. Priorities provide a hint to preferentially run work with + higher priority when possible, but do not preempt already-running work + or provide any other functional guarantee on execution order. + `priority` follows a convention where lower numbers represent higher + priorities. '0' represents default priority. The range of meaningful + numerical priorities can be queried using + :py:obj:`~.cuCtxGetStreamPriorityRange`. If the specified priority is + outside the numerical range returned by + :py:obj:`~.cuCtxGetStreamPriorityRange`, it will automatically be + clamped to the lowest or the highest number in the range. + + Parameters + ---------- + greenCtx : :py:obj:`~.CUgreenCtx` + Green context for which to create the stream for + flags : unsigned int + Flags for stream creation. `CU_STREAM_NON_BLOCKING` must be + specified. + priority : int + Stream priority. Lower numbers represent higher priorities. See + :py:obj:`~.cuCtxGetStreamPriorityRange` for more information about + meaningful stream priorities that can be passed. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phStream : :py:obj:`~.CUstream` + Returned newly created stream + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuGreenCtxCreate` :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` + + Notes + ----- + In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations. + """ + cdef cydriver.CUgreenCtx cygreenCtx + if greenCtx is None: + pgreenCtx = 0 + elif isinstance(greenCtx, (CUgreenCtx,)): + pgreenCtx = int(greenCtx) + else: + pgreenCtx = int(CUgreenCtx(greenCtx)) + cygreenCtx = pgreenCtx + cdef CUstream phStream = CUstream() + with nogil: + err = cydriver.cuGreenCtxStreamCreate(phStream._pvt_ptr, cygreenCtx, flags, priority) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phStream) + +ctypedef struct cuLogsCallbackData_st: + cydriver.CUlogsCallback callback + void *userData + +ctypedef cuLogsCallbackData_st cuLogsCallbackData + +@cython.show_performance_hints(False) +cdef void cuLogsCallbackWrapper(void *data, cydriver.CUlogLevel logLevel, char *message, size_t length) nogil: + cdef cuLogsCallbackData *cbData = data + with gil: + cbData.callback(cbData.userData, logLevel, message, length) + +@cython.embedsignature(True) +def cuLogsRegisterCallback(callbackFunc, userData): + """ Register a callback function to receive error log messages. + + Parameters + ---------- + callbackFunc : :py:obj:`~.CUlogsCallback` + The function to register as a callback + userData : Any + A generic pointer to user data. This is passed into the callback + function. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + callback_out : :py:obj:`~.CUlogsCallbackHandle` + Optional location to store the callback handle after it is + registered + """ + cdef cydriver.CUlogsCallback cycallbackFunc + if callbackFunc is None: + pcallbackFunc = 0 + elif isinstance(callbackFunc, (CUlogsCallback,)): + pcallbackFunc = int(callbackFunc) + else: + pcallbackFunc = int(CUlogsCallback(callbackFunc)) + cycallbackFunc = pcallbackFunc + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cuLogsCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (CUresult.CUDA_ERROR_OUT_OF_MEMORY, None) + cbData.callback = cycallbackFunc + cbData.userData = cyuserData_ptr + + cdef CUlogsCallbackHandle callback_out = CUlogsCallbackHandle() + with nogil: + err = cydriver.cuLogsRegisterCallback(cuLogsCallbackWrapper, cbData, callback_out._pvt_ptr) + if err != cydriver.CUDA_SUCCESS: + free(cbData) + else: + m_global._allocated[int(callback_out)] = cbData + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], callback_out) + +@cython.embedsignature(True) +def cuLogsUnregisterCallback(callback): + """ Unregister a log message callback. + + Parameters + ---------- + callback : :py:obj:`~.CUlogsCallbackHandle` + The callback instance to unregister from receiving log messages + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + """ + cdef cydriver.CUlogsCallbackHandle cycallback + if callback is None: + pcallback = 0 + elif isinstance(callback, (CUlogsCallbackHandle,)): + pcallback = int(callback) + else: + pcallback = int(CUlogsCallbackHandle(callback)) + cycallback = pcallback + with nogil: + err = cydriver.cuLogsUnregisterCallback(cycallback) + if err == cydriver.CUDA_SUCCESS: + free(m_global._allocated[pcallback]) + m_global._allocated.erase(pcallback) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuLogsCurrent(unsigned int flags): + """ Sets log iterator to point to the end of log buffer, where the next message would be written. + + Parameters + ---------- + flags : unsigned int + Reserved for future use, must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + iterator_out : :py:obj:`~.CUlogIterator` + Location to store an iterator to the current tail of the logs + """ + cdef CUlogIterator iterator_out = CUlogIterator() + with nogil: + err = cydriver.cuLogsCurrent(iterator_out._pvt_ptr, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], iterator_out) + +@cython.embedsignature(True) +def cuLogsDumpToFile(iterator : Optional[CUlogIterator], char* pathToFile, unsigned int flags): + """ Dump accumulated driver logs into a file. + + Logs generated by the driver are stored in an internal buffer and can + be copied out using this API. This API dumps all driver logs starting + from `iterator` into `pathToFile` provided. + + Parameters + ---------- + iterator : :py:obj:`~.CUlogIterator` + Optional auto-advancing iterator specifying the starting log to + read. NULL value dumps all logs. + pathToFile : bytes + Path to output file for dumping logs + flags : unsigned int + Reserved for future use, must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + iterator : :py:obj:`~.CUlogIterator` + Optional auto-advancing iterator specifying the starting log to + read. NULL value dumps all logs. + + Notes + ----- + `iterator` is auto-advancing. Dumping logs will update the value of `iterator` to receive the next generated log. + + The driver reserves limited memory for storing logs. The oldest logs may be overwritten and become unrecoverable. An indication will appear in the destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this risk. + """ + cdef cydriver.CUlogIterator* cyiterator = NULL + if iterator is not None: + cyiterator = iterator._pvt_ptr + with nogil: + err = cydriver.cuLogsDumpToFile(cyiterator, pathToFile, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], iterator) + +@cython.embedsignature(True) +def cuLogsDumpToMemory(iterator : Optional[CUlogIterator], char* buffer, size_t size, unsigned int flags): + """ Dump accumulated driver logs into a buffer. + + Logs generated by the driver are stored in an internal buffer and can + be copied out using this API. This API dumps driver logs from + `iterator` into `buffer` up to the size specified in `*size`. The + driver will always null terminate the buffer but there will not be a + null character between log entries, only a newline \n. The driver will + then return the actual number of bytes written in `*size`, excluding + the null terminator. If there are no messages to dump, `*size` will be + set to 0 and the function will return :py:obj:`~.CUDA_SUCCESS`. If the + provided `buffer` is not large enough to hold any messages, `*size` + will be set to 0 and the function will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + Parameters + ---------- + iterator : :py:obj:`~.CUlogIterator` + Optional auto-advancing iterator specifying the starting log to + read. NULL value dumps all logs. + buffer : bytes + Pointer to dump logs + size : int + See description + flags : unsigned int + Reserved for future use, must be 0 + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + iterator : :py:obj:`~.CUlogIterator` + Optional auto-advancing iterator specifying the starting log to + read. NULL value dumps all logs. + size : int + See description + + Notes + ----- + `iterator` is auto-advancing. Dumping logs will update the value of `iterator` to receive the next generated log. + + The driver reserves limited memory for storing logs. The maximum size of the buffer is 25600 bytes. The oldest logs may be overwritten and become unrecoverable. An indication will appear in the destination outupt if the logs have been truncated. Call dump after each failed API to mitigate this risk. + + If the provided value in `*size` is not large enough to hold all buffered messages, a message will be added at the head of the buffer indicating this. The driver then computes the number of messages it is able to store in `buffer` and writes it out. The final message in `buffer` will always be the most recent log message as of when the API is called. + """ + cdef cydriver.CUlogIterator* cyiterator = NULL + if iterator is not None: + cyiterator = iterator._pvt_ptr + with nogil: + err = cydriver.cuLogsDumpToMemory(cyiterator, buffer, &size, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], iterator, size) + +@cython.embedsignature(True) +def cuCheckpointProcessGetRestoreThreadId(int pid): + """ Returns the restore thread ID for a CUDA process. + + Returns in `*tid` the thread ID of the CUDA restore thread for the + process specified by `pid`. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + tid : int + Returned restore thread ID + """ + cdef int tid = 0 + with nogil: + err = cydriver.cuCheckpointProcessGetRestoreThreadId(pid, &tid) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], tid) + +@cython.embedsignature(True) +def cuCheckpointProcessGetState(int pid): + """ Returns the process state of a CUDA process. + + Returns in `*state` the current state of the CUDA process specified by + `pid`. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + state : :py:obj:`~.CUprocessState` + Returned CUDA process state + """ + cdef cydriver.CUprocessState state + with nogil: + err = cydriver.cuCheckpointProcessGetState(pid, &state) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], CUprocessState(state)) + +@cython.embedsignature(True) +def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): + """ Lock a running CUDA process. + + Lock the CUDA process specified by `pid` which will block further CUDA + API calls. Process must be in the RUNNING state in order to lock. + + Upon successful return the process will be in the LOCKED state. + + If timeoutMs is specified and the timeout is reached the process will + be left in the RUNNING state upon return. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointLockArgs` + Optional lock operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_NOT_READY` + """ + cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + with nogil: + err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpointArgs]): + """ Checkpoint a CUDA process's GPU memory contents. + + Checkpoints a CUDA process specified by `pid` that is in the LOCKED + state. The GPU memory contents will be brought into host memory and all + underlying references will be released. Process must be in the LOCKED + state to checkpoint. + + Upon successful return the process will be in the CHECKPOINTED state. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointCheckpointArgs` + Optional checkpoint operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + with nogil: + err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs]): + """ Restore a CUDA process's GPU memory contents from its last checkpoint. + + Restores a CUDA process specified by `pid` from its last checkpoint. + Process must be in the CHECKPOINTED state to restore. + + Upon successful return the process will be in the LOCKED state. + + CUDA process restore requires persistence mode to be enabled or + :py:obj:`~.cuInit` to have been called before execution. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointRestoreArgs` + Optional restore operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuInit` + """ + cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + with nogil: + err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): + """ Unlock a CUDA process to allow CUDA API calls. + + Unlocks a process specified by `pid` allowing it to resume making CUDA + API calls. Process must be in the LOCKED state. + + Upon successful return the process will be in the RUNNING state. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointUnlockArgs` + Optional unlock operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL + with nogil: + err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuProfilerStart(): + """ Enable profiling. + + Enables profile collection by the active profiling tool for the current + context. If profiling is already enabled, then + :py:obj:`~.cuProfilerStart()` has no effect. + + cuProfilerStart and cuProfilerStop APIs are used to programmatically + control the profiling granularity by allowing profiling to be done only + on selective pieces of code. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStop`, :py:obj:`~.cudaProfilerStart` + """ + with nogil: + err = cydriver.cuProfilerStart() + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuProfilerStop(): + """ Disable profiling. + + Disables profile collection by the active profiling tool for the + current context. If profiling is already disabled, then + :py:obj:`~.cuProfilerStop()` has no effect. + + cuProfilerStart and cuProfilerStop APIs are used to programmatically + control the profiling granularity by allowing profiling to be done only + on selective pieces of code. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` + + See Also + -------- + :py:obj:`~.cuProfilerInitialize`, :py:obj:`~.cuProfilerStart`, :py:obj:`~.cudaProfilerStop` + """ + with nogil: + err = cydriver.cuProfilerStop() + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphicsEGLRegisterImage(image, unsigned int flags): + """ Registers an EGL image. + + Registers the EGLImageKHR specified by `image` for access by CUDA. A + handle to the registered object is returned as `pCudaResource`. + Additional Mapping/Unmapping is not required for the registered + resource and :py:obj:`~.cuGraphicsResourceGetMappedEglFrame` can be + directly called on the `pCudaResource`. + + The application will be responsible for synchronizing access to shared + objects. The application must ensure that any pending operation which + access the objects have completed before passing control to CUDA. This + may be accomplished by issuing and waiting for glFinish command on all + GLcontexts (for OpenGL and likewise for other APIs). The application + will be also responsible for ensuring that any pending operation on the + registered CUDA resource has completed prior to executing subsequent + commands in other APIs accesing the same memory objects. This can be + accomplished by calling cuCtxSynchronize or cuEventSynchronize + (preferably). + + The surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints + about how this resource will be used. It is therefore assumed that + this resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that + CUDA will not write to this resource. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies + that CUDA will not read from this resource and will write over the + entire contents of the resource, so none of the data previously + stored in the resource will be preserved. + + The EGLImageKHR is an object which can be used to create EGLImage + target resource. It is defined as a void pointer. typedef void* + EGLImageKHR + + Parameters + ---------- + image : :py:obj:`~.EGLImageKHR` + An EGLImageKHR image which can be used to create target resource. + flags : unsigned int + Map flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + pCudaResource : :py:obj:`~.CUgraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cuGraphicsEGLRegisterImage`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cudaGraphicsEGLRegisterImage` + """ + cdef cydriver.EGLImageKHR cyimage + if image is None: + pimage = 0 + elif isinstance(image, (EGLImageKHR,)): + pimage = int(image) + else: + pimage = int(EGLImageKHR(image)) + cyimage = pimage + cdef CUgraphicsResource pCudaResource = CUgraphicsResource() + with nogil: + err = cydriver.cuGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCudaResource) + +@cython.embedsignature(True) +def cuEGLStreamConsumerConnect(stream): + """ Connect CUDA to EGLStream as a consumer. + + Connect CUDA as a consumer to EGLStreamKHR specified by `stream`. + + The EGLStreamKHR is an EGL object that transfers a sequence of image + frames from one API to another. + + Parameters + ---------- + stream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + conn : :py:obj:`~.CUeglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerConnect` + """ + cdef cydriver.EGLStreamKHR cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (EGLStreamKHR,)): + pstream = int(stream) + else: + pstream = int(EGLStreamKHR(stream)) + cystream = pstream + cdef CUeglStreamConnection conn = CUeglStreamConnection() + with nogil: + err = cydriver.cuEGLStreamConsumerConnect(conn._pvt_ptr, cystream) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], conn) + +@cython.embedsignature(True) +def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags): + """ Connect CUDA to EGLStream as a consumer with given flags. + + Connect CUDA as a consumer to EGLStreamKHR specified by `stream` with + specified `flags` defined by CUeglResourceLocationFlags. + + The flags specify whether the consumer wants to access frames from + system memory or video memory. Default is + :py:obj:`~.CU_EGL_RESOURCE_LOCATION_VIDMEM`. + + Parameters + ---------- + stream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + flags : unsigned int + Flags denote intended location - system or video. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + conn : :py:obj:`~.CUeglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerConnectWithFlags` + """ + cdef cydriver.EGLStreamKHR cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (EGLStreamKHR,)): + pstream = int(stream) + else: + pstream = int(EGLStreamKHR(stream)) + cystream = pstream + cdef CUeglStreamConnection conn = CUeglStreamConnection() + with nogil: + err = cydriver.cuEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cystream, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], conn) + +@cython.embedsignature(True) +def cuEGLStreamConsumerDisconnect(conn): + """ Disconnect CUDA as a consumer to EGLStream . + + Disconnect CUDA as a consumer to EGLStreamKHR. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Conection to disconnect. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + + See Also + -------- + :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerDisconnect` + """ + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cydriver.cuEGLStreamConsumerDisconnect(cyconn) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout): + """ Acquire an image frame from the EGLStream with CUDA as a consumer. + + Acquire an image frame from EGLStreamKHR. This API can also acquire an + old frame presented by the producer unless explicitly disabled by + setting EGL_SUPPORT_REUSE_NV flag to EGL_FALSE during stream + initialization. By default, EGLStream is created with this flag set to + EGL_TRUE. :py:obj:`~.cuGraphicsResourceGetMappedEglFrame` can be called + on `pCudaResource` to get :py:obj:`~.CUeglFrame`. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Connection on which to acquire + pCudaResource : :py:obj:`~.CUgraphicsResource` + CUDA resource on which the stream frame will be mapped for use. + pStream : :py:obj:`~.CUstream` + CUDA stream for synchronization and any data migrations implied by + :py:obj:`~.CUeglResourceLocationFlags`. + timeout : unsigned int + Desired timeout in usec for a new frame to be acquired. If set as + :py:obj:`~.CUDA_EGL_INFINITE_TIMEOUT`, acquire waits infinitely. + After timeout occurs CUDA consumer tries to acquire an old frame if + available and EGL_SUPPORT_REUSE_NV flag is set. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT`, + + See Also + -------- + :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame` + """ + cdef cydriver.CUstream *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (CUstream,)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cydriver.CUgraphicsResource *cypCudaResource + if pCudaResource is None: + cypCudaResource = NULL + elif isinstance(pCudaResource, (CUgraphicsResource,)): + ppCudaResource = pCudaResource.getPtr() + cypCudaResource = ppCudaResource + elif isinstance(pCudaResource, (int)): + cypCudaResource = pCudaResource + else: + raise TypeError("Argument 'pCudaResource' is not instance of type (expected , found " + str(type(pCudaResource))) + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cydriver.cuEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): + """ Releases the last frame acquired from the EGLStream. + + Release the acquired image frame specified by `pCudaResource` to + EGLStreamKHR. If EGL_SUPPORT_REUSE_NV flag is set to EGL_TRUE, at the + time of EGL creation this API doesn't release the last frame acquired + on the EGLStream. By default, EGLStream is created with this flag set + to EGL_TRUE. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Connection on which to release + pCudaResource : :py:obj:`~.CUgraphicsResource` + CUDA resource whose corresponding frame is to be released + pStream : :py:obj:`~.CUstream` + CUDA stream on which release will be done. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, + + See Also + -------- + :py:obj:`~.cuEGLStreamConsumerConnect`, :py:obj:`~.cuEGLStreamConsumerDisconnect`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame` + """ + cdef cydriver.CUstream *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (CUstream,)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cydriver.CUgraphicsResource cypCudaResource + if pCudaResource is None: + ppCudaResource = 0 + elif isinstance(pCudaResource, (CUgraphicsResource,)): + ppCudaResource = int(pCudaResource) + else: + ppCudaResource = int(CUgraphicsResource(pCudaResource)) + cypCudaResource = ppCudaResource + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cydriver.cuEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEGLStreamProducerConnect(stream, width, height): + """ Connect CUDA to EGLStream as a producer. + + Connect CUDA as a producer to EGLStreamKHR specified by `stream`. + + The EGLStreamKHR is an EGL object that transfers a sequence of image + frames from one API to another. + + Parameters + ---------- + stream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + width : :py:obj:`~.EGLint` + width of the image to be submitted to the stream + height : :py:obj:`~.EGLint` + height of the image to be submitted to the stream + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + conn : :py:obj:`~.CUeglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerConnect` + """ + cdef cydriver.EGLint cyheight + if height is None: + pheight = 0 + elif isinstance(height, (EGLint,)): + pheight = int(height) + else: + pheight = int(EGLint(height)) + cyheight = pheight + cdef cydriver.EGLint cywidth + if width is None: + pwidth = 0 + elif isinstance(width, (EGLint,)): + pwidth = int(width) + else: + pwidth = int(EGLint(width)) + cywidth = pwidth + cdef cydriver.EGLStreamKHR cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (EGLStreamKHR,)): + pstream = int(stream) + else: + pstream = int(EGLStreamKHR(stream)) + cystream = pstream + cdef CUeglStreamConnection conn = CUeglStreamConnection() + with nogil: + err = cydriver.cuEGLStreamProducerConnect(conn._pvt_ptr, cystream, cywidth, cyheight) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], conn) + +@cython.embedsignature(True) +def cuEGLStreamProducerDisconnect(conn): + """ Disconnect CUDA as a producer to EGLStream . + + Disconnect CUDA as a producer to EGLStreamKHR. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Conection to disconnect. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + + See Also + -------- + :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerDisconnect` + """ + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cydriver.cuEGLStreamProducerDisconnect(cyconn) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStream): + """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer. + + When a frame is presented by the producer, it gets associated with the + EGLStream and thus it is illegal to free the frame before the producer + is disconnected. If a frame is freed and reused it may lead to + undefined behavior. + + If producer and consumer are on different GPUs (iGPU and dGPU) then + frametype :py:obj:`~.CU_EGL_FRAME_TYPE_ARRAY` is not supported. + :py:obj:`~.CU_EGL_FRAME_TYPE_PITCH` can be used for such cross-device + applications. + + The :py:obj:`~.CUeglFrame` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + For :py:obj:`~.CUeglFrame` of type :py:obj:`~.CU_EGL_FRAME_TYPE_PITCH`, + the application may present sub-region of a memory allocation. In that + case, the pitched pointer will specify the start address of the sub- + region in the allocation and corresponding :py:obj:`~.CUeglFrame` + fields will specify the dimensions of the sub-region. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Connection on which to present the CUDA array + eglframe : :py:obj:`~.CUeglFrame` + CUDA Eglstream Proucer Frame handle to be sent to the consumer over + EglStream. + pStream : :py:obj:`~.CUstream` + CUDA stream on which to present the frame. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, + + See Also + -------- + :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerReturnFrame`, :py:obj:`~.cudaEGLStreamProducerPresentFrame` + """ + cdef cydriver.CUstream *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (CUstream,)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cydriver.cuEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStream): + """ Return the CUDA eglFrame to the EGLStream released by the consumer. + + This API can potentially return CUDA_ERROR_LAUNCH_TIMEOUT if the + consumer has not returned a frame to EGL stream. If timeout is returned + the application can retry. + + Parameters + ---------- + conn : :py:obj:`~.CUeglStreamConnection` + Connection on which to return + eglframe : :py:obj:`~.CUeglFrame` + CUDA Eglstream Proucer Frame handle returned from the consumer over + EglStream. + pStream : :py:obj:`~.CUstream` + CUDA stream on which to return the frame. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_LAUNCH_TIMEOUT` + + See Also + -------- + :py:obj:`~.cuEGLStreamProducerConnect`, :py:obj:`~.cuEGLStreamProducerDisconnect`, :py:obj:`~.cuEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerReturnFrame` + """ + cdef cydriver.CUstream *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (CUstream,)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cydriver.CUeglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (CUeglStreamConnection,)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL + with nogil: + err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) + return (_dict_CUresult[err],) + +@cython.embedsignature(True) +def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel): + """ Get an eglFrame through which to access a registered EGL graphics resource. + + Returns in `*eglFrame` an eglFrame pointer through which the registered + graphics resource `resource` may be accessed. This API can only be + called for registered EGL graphics resources. + + The :py:obj:`~.CUeglFrame` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If `resource` is not registered then :py:obj:`~.CUDA_ERROR_NOT_MAPPED` + is returned. + + Parameters + ---------- + resource : :py:obj:`~.CUgraphicsResource` + None + index : unsigned int + None + mipLevel : unsigned int + None + + Returns + ------- + CUresult + + eglFrame : :py:obj:`~.CUeglFrame` + None + """ + cdef cydriver.CUgraphicsResource cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (CUgraphicsResource,)): + presource = int(resource) + else: + presource = int(CUgraphicsResource(resource)) + cyresource = presource + cdef CUeglFrame eglFrame = CUeglFrame() + with nogil: + err = cydriver.cuGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], eglFrame) + +@cython.embedsignature(True) +def cuEventCreateFromEGLSync(eglSync, unsigned int flags): + """ Creates an event from EGLSync object. + + Creates an event *phEvent from an EGLSyncKHR eglSync with the flags + specified via `flags`. Valid flags include: + + - :py:obj:`~.CU_EVENT_DEFAULT`: Default event creation flag. + + - :py:obj:`~.CU_EVENT_BLOCKING_SYNC`: Specifies that the created event + should use blocking synchronization. A CPU thread that uses + :py:obj:`~.cuEventSynchronize()` to wait on an event created with + this flag will block until the event has actually been completed. + + Once the `eglSync` gets destroyed, :py:obj:`~.cuEventDestroy` is the + only API that can be invoked on the event. + + :py:obj:`~.cuEventRecord` and TimingData are not supported for events + created from EGLSync. + + The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void* + EGLSyncKHR + + Parameters + ---------- + eglSync : :py:obj:`~.EGLSyncKHR` + Opaque handle to EGLSync object + flags : unsigned int + Event creation flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + phEvent : :py:obj:`~.CUevent` + Returns newly created event + + See Also + -------- + :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy` + """ + cdef cydriver.EGLSyncKHR cyeglSync + if eglSync is None: + peglSync = 0 + elif isinstance(eglSync, (EGLSyncKHR,)): + peglSync = int(eglSync) + else: + peglSync = int(EGLSyncKHR(eglSync)) + cyeglSync = peglSync + cdef CUevent phEvent = CUevent() + with nogil: + err = cydriver.cuEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], phEvent) + +@cython.embedsignature(True) +def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags): + """ Registers an OpenGL buffer object. + + Registers the buffer object specified by `buffer` for access by CUDA. A + handle to the registered object is returned as `pCudaResource`. The + register flags `Flags` specify the intended usage, as follows: + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_NONE`: Specifies no hints about + how this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY`: Specifies that CUDA + will not write to this resource. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD`: Specifies that + CUDA will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + Parameters + ---------- + buffer : :py:obj:`~.GLuint` + name of buffer object to be registered + Flags : unsigned int + Register flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM` + pCudaResource : :py:obj:`~.CUgraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsGLRegisterBuffer` + """ + cdef cydriver.GLuint cybuffer + if buffer is None: + pbuffer = 0 + elif isinstance(buffer, (GLuint,)): + pbuffer = int(buffer) + else: + pbuffer = int(GLuint(buffer)) + cybuffer = pbuffer + cdef CUgraphicsResource pCudaResource = CUgraphicsResource() + with nogil: + err = cydriver.cuGraphicsGLRegisterBuffer(pCudaResource._pvt_ptr, cybuffer, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCudaResource) + +@cython.embedsignature(True) +def cuGraphicsGLRegisterImage(image, target, unsigned int Flags): + """ Register an OpenGL texture or renderbuffer object. + + Registers the texture or renderbuffer object specified by `image` for + access by CUDA. A handle to the registered object is returned as + `pCudaResource`. + + `target` must match the type of the object, and must be one of + :py:obj:`~.GL_TEXTURE_2D`, :py:obj:`~.GL_TEXTURE_RECTANGLE`, + :py:obj:`~.GL_TEXTURE_CUBE_MAP`, :py:obj:`~.GL_TEXTURE_3D`, + :py:obj:`~.GL_TEXTURE_2D_ARRAY`, or :py:obj:`~.GL_RENDERBUFFER`. + + The register flags `Flags` specify the intended usage, as follows: + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_NONE`: Specifies no hints about + how this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY`: Specifies that CUDA + will not write to this resource. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD`: Specifies that + CUDA will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST`: Specifies that + CUDA will bind this resource to a surface reference. + + - :py:obj:`~.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER`: Specifies that + CUDA will perform texture gather operations on this resource. + + The following image formats are supported. For brevity's sake, the list + is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the + following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} : + + - GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, + GL_INTENSITY + + - {GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I, + 32I} + + - {GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY} X {8, 16, + 16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT, + 32I_EXT} + + The following image classes are currently disallowed: + + - Textures with borders + + - Multisampled renderbuffers + + Parameters + ---------- + image : :py:obj:`~.GLuint` + name of texture or renderbuffer object to be registered + target : :py:obj:`~.GLenum` + Identifies the type of object specified by `image` + Flags : unsigned int + Register flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_OPERATING_SYSTEM` + pCudaResource : :py:obj:`~.CUgraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaGraphicsGLRegisterImage` + """ + cdef cydriver.GLenum cytarget + if target is None: + ptarget = 0 + elif isinstance(target, (GLenum,)): + ptarget = int(target) + else: + ptarget = int(GLenum(target)) + cytarget = ptarget + cdef cydriver.GLuint cyimage + if image is None: + pimage = 0 + elif isinstance(image, (GLuint,)): + pimage = int(image) + else: + pimage = int(GLuint(image)) + cyimage = pimage + cdef CUgraphicsResource pCudaResource = CUgraphicsResource() + with nogil: + err = cydriver.cuGraphicsGLRegisterImage(pCudaResource._pvt_ptr, cyimage, cytarget, Flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCudaResource) + +@cython.embedsignature(True) +def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDeviceList): + """ Gets the CUDA devices associated with the current OpenGL context. + + Returns in `*pCudaDeviceCount` the number of CUDA-compatible devices + corresponding to the current OpenGL context. Also returns in + `*pCudaDevices` at most cudaDeviceCount of the CUDA-compatible devices + corresponding to the current OpenGL context. If any of the GPUs being + used by the current OpenGL context are not CUDA capable then the call + will return CUDA_ERROR_NO_DEVICE. + + The `deviceList` argument may be any of the following: + CU_GL_DEVICE_LIST_ALL: Query all devices used by the current OpenGL + context. CU_GL_DEVICE_LIST_CURRENT_FRAME: Query the devices used by the + current OpenGL context to render the current frame (in SLI). + CU_GL_DEVICE_LIST_NEXT_FRAME: Query the devices used by the current + OpenGL context to render the next frame (in SLI). Note that this is a + prediction, it can't be guaranteed that this is correct in all cases. + + Parameters + ---------- + cudaDeviceCount : unsigned int + The size of the output device array pCudaDevices. + deviceList : CUGLDeviceList + The set of devices to return. + + Returns + ------- + CUresult + CUDA_SUCCESS + CUDA_ERROR_NO_DEVICE + CUDA_ERROR_INVALID_VALUE + CUDA_ERROR_INVALID_CONTEXT + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT + pCudaDeviceCount : unsigned int + Returned number of CUDA devices. + pCudaDevices : list[CUdevice] + Returned CUDA devices. + + See Also + -------- + ~.cudaGLGetDevices + + Notes + ----- + This function is not supported on Mac OS X. + + """ + cdef unsigned int pCudaDeviceCount = 0 + cdef cydriver.CUdevice* cypCudaDevices = NULL + pypCudaDevices = [] + if cudaDeviceCount != 0: + cypCudaDevices = calloc(cudaDeviceCount, sizeof(cydriver.CUdevice)) + if cypCudaDevices is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(cydriver.CUdevice))) + cdef cydriver.CUGLDeviceList cydeviceList = deviceList.value + with nogil: + err = cydriver.cuGLGetDevices(&pCudaDeviceCount, cypCudaDevices, cudaDeviceCount, cydeviceList) + if CUresult(err) == CUresult(0): + pypCudaDevices = [CUdevice(init_value=cypCudaDevices[idx]) for idx in range(cudaDeviceCount)] + if cypCudaDevices is not NULL: + free(cypCudaDevices) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None, None) + return (_dict_CUresult[err], pCudaDeviceCount, pypCudaDevices) + +@cython.embedsignature(True) +def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress): + """ Gets the CUDA device associated with a VDPAU device. + + Returns in `*pDevice` the CUDA device associated with a `vdpDevice`, if + applicable. + + Parameters + ---------- + vdpDevice : :py:obj:`~.VdpDevice` + A VdpDevice handle + vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress` + VDPAU's VdpGetProcAddress function pointer + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + pDevice : :py:obj:`~.CUdevice` + Device associated with vdpDevice + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaVDPAUGetDevice` + """ + cdef cydriver.VdpGetProcAddress *cyvdpGetProcAddress + if vdpGetProcAddress is None: + cyvdpGetProcAddress = NULL + elif isinstance(vdpGetProcAddress, (VdpGetProcAddress,)): + pvdpGetProcAddress = vdpGetProcAddress.getPtr() + cyvdpGetProcAddress = pvdpGetProcAddress + elif isinstance(vdpGetProcAddress, (int)): + cyvdpGetProcAddress = vdpGetProcAddress + else: + raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected , found " + str(type(vdpGetProcAddress))) + cdef cydriver.VdpDevice cyvdpDevice + if vdpDevice is None: + pvdpDevice = 0 + elif isinstance(vdpDevice, (VdpDevice,)): + pvdpDevice = int(vdpDevice) + else: + pvdpDevice = int(VdpDevice(vdpDevice)) + cyvdpDevice = pvdpDevice + cdef CUdevice pDevice = CUdevice() + with nogil: + err = cydriver.cuVDPAUGetDevice(pDevice._pvt_ptr, cyvdpDevice, cyvdpGetProcAddress) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pDevice) + +@cython.embedsignature(True) +def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress): + """ Create a CUDA context for interoperability with VDPAU. + + Creates a new CUDA context, initializes VDPAU interoperability, and + associates the CUDA context with the calling thread. It must be called + before performing any other VDPAU interoperability operations. It may + fail if the needed VDPAU driver facilities are not available. For usage + of the `flags` parameter, see :py:obj:`~.cuCtxCreate()`. + + Parameters + ---------- + flags : unsigned int + Options for CUDA context creation + device : :py:obj:`~.CUdevice` + Device on which to create the context + vdpDevice : :py:obj:`~.VdpDevice` + The VdpDevice to interop with + vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress` + VDPAU's VdpGetProcAddress function pointer + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + pCtx : :py:obj:`~.CUcontext` + Returned CUDA context + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice` + """ + cdef cydriver.VdpGetProcAddress *cyvdpGetProcAddress + if vdpGetProcAddress is None: + cyvdpGetProcAddress = NULL + elif isinstance(vdpGetProcAddress, (VdpGetProcAddress,)): + pvdpGetProcAddress = vdpGetProcAddress.getPtr() + cyvdpGetProcAddress = pvdpGetProcAddress + elif isinstance(vdpGetProcAddress, (int)): + cyvdpGetProcAddress = vdpGetProcAddress + else: + raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected , found " + str(type(vdpGetProcAddress))) + cdef cydriver.VdpDevice cyvdpDevice + if vdpDevice is None: + pvdpDevice = 0 + elif isinstance(vdpDevice, (VdpDevice,)): + pvdpDevice = int(vdpDevice) + else: + pvdpDevice = int(VdpDevice(vdpDevice)) + cyvdpDevice = pvdpDevice + cdef cydriver.CUdevice cydevice + if device is None: + pdevice = 0 + elif isinstance(device, (CUdevice,)): + pdevice = int(device) + else: + pdevice = int(CUdevice(device)) + cydevice = pdevice + cdef CUcontext pCtx = CUcontext() + with nogil: + err = cydriver.cuVDPAUCtxCreate(pCtx._pvt_ptr, flags, cydevice, cyvdpDevice, cyvdpGetProcAddress) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCtx) + +@cython.embedsignature(True) +def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): + """ Registers a VDPAU VdpVideoSurface object. + + Registers the VdpVideoSurface specified by `vdpSurface` for access by + CUDA. A handle to the registered object is returned as `pCudaResource`. + The surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints + about how this resource will be used. It is therefore assumed that + this resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that + CUDA will not write to this resource. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies + that CUDA will not read from this resource and will write over the + entire contents of the resource, so none of the data previously + stored in the resource will be preserved. + + The VdpVideoSurface is presented as an array of subresources that may + be accessed using pointers returned by + :py:obj:`~.cuGraphicsSubResourceGetMappedArray`. The exact number of + valid `arrayIndex` values depends on the VDPAU surface format. The + mapping is shown in the table below. `mipLevel` must be 0. + + Parameters + ---------- + vdpSurface : :py:obj:`~.VdpVideoSurface` + The VdpVideoSurface to be registered + flags : unsigned int + Map flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + pCudaResource : :py:obj:`~.CUgraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice`, :py:obj:`~.cudaGraphicsVDPAURegisterVideoSurface` + """ + cdef cydriver.VdpVideoSurface cyvdpSurface + if vdpSurface is None: + pvdpSurface = 0 + elif isinstance(vdpSurface, (VdpVideoSurface,)): + pvdpSurface = int(vdpSurface) + else: + pvdpSurface = int(VdpVideoSurface(vdpSurface)) + cyvdpSurface = pvdpSurface + cdef CUgraphicsResource pCudaResource = CUgraphicsResource() + with nogil: + err = cydriver.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCudaResource) + +@cython.embedsignature(True) +def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): + """ Registers a VDPAU VdpOutputSurface object. + + Registers the VdpOutputSurface specified by `vdpSurface` for access by + CUDA. A handle to the registered object is returned as `pCudaResource`. + The surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE`: Specifies no hints + about how this resource will be used. It is therefore assumed that + this resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY`: Specifies that + CUDA will not write to this resource. + + - :py:obj:`~.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD`: Specifies + that CUDA will not read from this resource and will write over the + entire contents of the resource, so none of the data previously + stored in the resource will be preserved. + + The VdpOutputSurface is presented as an array of subresources that may + be accessed using pointers returned by + :py:obj:`~.cuGraphicsSubResourceGetMappedArray`. The exact number of + valid `arrayIndex` values depends on the VDPAU surface format. The + mapping is shown in the table below. `mipLevel` must be 0. + + Parameters + ---------- + vdpSurface : :py:obj:`~.VdpOutputSurface` + The VdpOutputSurface to be registered + flags : unsigned int + Map flags + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_ALREADY_MAPPED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, + pCudaResource : :py:obj:`~.CUgraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuVDPAUCtxCreate`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cuGraphicsUnregisterResource`, :py:obj:`~.cuGraphicsResourceSetMapFlags`, :py:obj:`~.cuGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuVDPAUGetDevice`, :py:obj:`~.cudaGraphicsVDPAURegisterOutputSurface` + """ + cdef cydriver.VdpOutputSurface cyvdpSurface + if vdpSurface is None: + pvdpSurface = 0 + elif isinstance(vdpSurface, (VdpOutputSurface,)): + pvdpSurface = int(vdpSurface) + else: + pvdpSurface = int(VdpOutputSurface(vdpSurface)) + cyvdpSurface = pvdpSurface + cdef CUgraphicsResource pCudaResource = CUgraphicsResource() + with nogil: + err = cydriver.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) + if err != cydriver.CUDA_SUCCESS: + return (_dict_CUresult[err], None) + return (_dict_CUresult[err], pCudaResource) + + +cdef class cudaBindingsDriverGlobal: + cdef map[void_ptr, void*] _allocated + + def __dealloc__(self): + for item in self._allocated: + free(item.second) + self._allocated.clear() + +cdef cudaBindingsDriverGlobal m_global = cudaBindingsDriverGlobal() + + +@cython.embedsignature(True) +def sizeof(objType): + """ Returns the size of provided CUDA Python structure in bytes + + Parameters + ---------- + objType : Any + CUDA Python object + + Returns + ------- + lowered_name : int + The size of `objType` in bytes + """ + if objType == cuuint32_t: + return sizeof(cydriver.cuuint32_t) + if objType == cuuint64_t: + return sizeof(cydriver.cuuint64_t) + if objType == CUdeviceptr_v2: + return sizeof(cydriver.CUdeviceptr_v2) + if objType == CUdeviceptr: + return sizeof(cydriver.CUdeviceptr) + if objType == CUdevice_v1: + return sizeof(cydriver.CUdevice_v1) + if objType == CUdevice: + return sizeof(cydriver.CUdevice) + if objType == CUcontext: + return sizeof(cydriver.CUcontext) + if objType == CUmodule: + return sizeof(cydriver.CUmodule) + if objType == CUfunction: + return sizeof(cydriver.CUfunction) + if objType == CUlibrary: + return sizeof(cydriver.CUlibrary) + if objType == CUkernel: + return sizeof(cydriver.CUkernel) + if objType == CUarray: + return sizeof(cydriver.CUarray) + if objType == CUmipmappedArray: + return sizeof(cydriver.CUmipmappedArray) + if objType == CUtexref: + return sizeof(cydriver.CUtexref) + if objType == CUsurfref: + return sizeof(cydriver.CUsurfref) + if objType == CUevent: + return sizeof(cydriver.CUevent) + if objType == CUstream: + return sizeof(cydriver.CUstream) + if objType == CUgraphicsResource: + return sizeof(cydriver.CUgraphicsResource) + if objType == CUtexObject_v1: + return sizeof(cydriver.CUtexObject_v1) + if objType == CUtexObject: + return sizeof(cydriver.CUtexObject) + if objType == CUsurfObject_v1: + return sizeof(cydriver.CUsurfObject_v1) + if objType == CUsurfObject: + return sizeof(cydriver.CUsurfObject) + if objType == CUexternalMemory: + return sizeof(cydriver.CUexternalMemory) + if objType == CUexternalSemaphore: + return sizeof(cydriver.CUexternalSemaphore) + if objType == CUgraph: + return sizeof(cydriver.CUgraph) + if objType == CUgraphNode: + return sizeof(cydriver.CUgraphNode) + if objType == CUgraphExec: + return sizeof(cydriver.CUgraphExec) + if objType == CUmemoryPool: + return sizeof(cydriver.CUmemoryPool) + if objType == CUuserObject: + return sizeof(cydriver.CUuserObject) + if objType == CUgraphConditionalHandle: + return sizeof(cydriver.CUgraphConditionalHandle) + if objType == CUgraphDeviceNode: + return sizeof(cydriver.CUgraphDeviceNode) + if objType == CUasyncCallbackHandle: + return sizeof(cydriver.CUasyncCallbackHandle) + if objType == CUgreenCtx: + return sizeof(cydriver.CUgreenCtx) + if objType == CUuuid_st: + return sizeof(cydriver.CUuuid_st) + if objType == CUuuid: + return sizeof(cydriver.CUuuid) + if objType == CUmemFabricHandle_st: + return sizeof(cydriver.CUmemFabricHandle_st) + if objType == CUmemFabricHandle_v1: + return sizeof(cydriver.CUmemFabricHandle_v1) + if objType == CUmemFabricHandle: + return sizeof(cydriver.CUmemFabricHandle) + if objType == CUipcEventHandle_st: + return sizeof(cydriver.CUipcEventHandle_st) + if objType == CUipcEventHandle_v1: + return sizeof(cydriver.CUipcEventHandle_v1) + if objType == CUipcEventHandle: + return sizeof(cydriver.CUipcEventHandle) + if objType == CUipcMemHandle_st: + return sizeof(cydriver.CUipcMemHandle_st) + if objType == CUipcMemHandle_v1: + return sizeof(cydriver.CUipcMemHandle_v1) + if objType == CUipcMemHandle: + return sizeof(cydriver.CUipcMemHandle) + if objType == CUstreamBatchMemOpParams_union: + return sizeof(cydriver.CUstreamBatchMemOpParams_union) + if objType == CUstreamBatchMemOpParams_v1: + return sizeof(cydriver.CUstreamBatchMemOpParams_v1) + if objType == CUstreamBatchMemOpParams: + return sizeof(cydriver.CUstreamBatchMemOpParams) + if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: + return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st) + if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1) + if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS: + return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS) + if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st) + if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2) + if objType == CUasyncNotificationInfo_st: + return sizeof(cydriver.CUasyncNotificationInfo_st) + if objType == CUasyncNotificationInfo: + return sizeof(cydriver.CUasyncNotificationInfo) + if objType == CUasyncCallback: + return sizeof(cydriver.CUasyncCallback) + if objType == CUdevprop_st: + return sizeof(cydriver.CUdevprop_st) + if objType == CUdevprop_v1: + return sizeof(cydriver.CUdevprop_v1) + if objType == CUdevprop: + return sizeof(cydriver.CUdevprop) + if objType == CUlinkState: + return sizeof(cydriver.CUlinkState) + if objType == CUhostFn: + return sizeof(cydriver.CUhostFn) + if objType == CUaccessPolicyWindow_st: + return sizeof(cydriver.CUaccessPolicyWindow_st) + if objType == CUaccessPolicyWindow_v1: + return sizeof(cydriver.CUaccessPolicyWindow_v1) + if objType == CUaccessPolicyWindow: + return sizeof(cydriver.CUaccessPolicyWindow) + if objType == CUDA_KERNEL_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_st) + if objType == CUDA_KERNEL_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v1) + if objType == CUDA_KERNEL_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st) + if objType == CUDA_KERNEL_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v2) + if objType == CUDA_KERNEL_NODE_PARAMS: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS) + if objType == CUDA_KERNEL_NODE_PARAMS_v3_st: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st) + if objType == CUDA_KERNEL_NODE_PARAMS_v3: + return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v3) + if objType == CUDA_MEMSET_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_st) + if objType == CUDA_MEMSET_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_v1) + if objType == CUDA_MEMSET_NODE_PARAMS: + return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS) + if objType == CUDA_MEMSET_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st) + if objType == CUDA_MEMSET_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_v2) + if objType == CUDA_HOST_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_st) + if objType == CUDA_HOST_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v1) + if objType == CUDA_HOST_NODE_PARAMS: + return sizeof(cydriver.CUDA_HOST_NODE_PARAMS) + if objType == CUDA_HOST_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v2_st) + if objType == CUDA_HOST_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v2) + if objType == CUDA_CONDITIONAL_NODE_PARAMS: + return sizeof(cydriver.CUDA_CONDITIONAL_NODE_PARAMS) + if objType == CUgraphEdgeData_st: + return sizeof(cydriver.CUgraphEdgeData_st) + if objType == CUgraphEdgeData: + return sizeof(cydriver.CUgraphEdgeData) + if objType == CUDA_GRAPH_INSTANTIATE_PARAMS_st: + return sizeof(cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st) + if objType == CUDA_GRAPH_INSTANTIATE_PARAMS: + return sizeof(cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS) + if objType == CUlaunchMemSyncDomainMap_st: + return sizeof(cydriver.CUlaunchMemSyncDomainMap_st) + if objType == CUlaunchMemSyncDomainMap: + return sizeof(cydriver.CUlaunchMemSyncDomainMap) + if objType == CUlaunchAttributeValue_union: + return sizeof(cydriver.CUlaunchAttributeValue_union) + if objType == CUlaunchAttributeValue: + return sizeof(cydriver.CUlaunchAttributeValue) + if objType == CUlaunchAttribute_st: + return sizeof(cydriver.CUlaunchAttribute_st) + if objType == CUlaunchAttribute: + return sizeof(cydriver.CUlaunchAttribute) + if objType == CUlaunchConfig_st: + return sizeof(cydriver.CUlaunchConfig_st) + if objType == CUlaunchConfig: + return sizeof(cydriver.CUlaunchConfig) + if objType == CUkernelNodeAttrValue_v1: + return sizeof(cydriver.CUkernelNodeAttrValue_v1) + if objType == CUkernelNodeAttrValue: + return sizeof(cydriver.CUkernelNodeAttrValue) + if objType == CUstreamAttrValue_v1: + return sizeof(cydriver.CUstreamAttrValue_v1) + if objType == CUstreamAttrValue: + return sizeof(cydriver.CUstreamAttrValue) + if objType == CUexecAffinitySmCount_st: + return sizeof(cydriver.CUexecAffinitySmCount_st) + if objType == CUexecAffinitySmCount_v1: + return sizeof(cydriver.CUexecAffinitySmCount_v1) + if objType == CUexecAffinitySmCount: + return sizeof(cydriver.CUexecAffinitySmCount) + if objType == CUexecAffinityParam_st: + return sizeof(cydriver.CUexecAffinityParam_st) + if objType == CUexecAffinityParam_v1: + return sizeof(cydriver.CUexecAffinityParam_v1) + if objType == CUexecAffinityParam: + return sizeof(cydriver.CUexecAffinityParam) + if objType == CUctxCigParam_st: + return sizeof(cydriver.CUctxCigParam_st) + if objType == CUctxCigParam: + return sizeof(cydriver.CUctxCigParam) + if objType == CUctxCreateParams_st: + return sizeof(cydriver.CUctxCreateParams_st) + if objType == CUctxCreateParams: + return sizeof(cydriver.CUctxCreateParams) + if objType == CUlibraryHostUniversalFunctionAndDataTable_st: + return sizeof(cydriver.CUlibraryHostUniversalFunctionAndDataTable_st) + if objType == CUlibraryHostUniversalFunctionAndDataTable: + return sizeof(cydriver.CUlibraryHostUniversalFunctionAndDataTable) + if objType == CUstreamCallback: + return sizeof(cydriver.CUstreamCallback) + if objType == CUoccupancyB2DSize: + return sizeof(cydriver.CUoccupancyB2DSize) + if objType == CUDA_MEMCPY2D_st: + return sizeof(cydriver.CUDA_MEMCPY2D_st) + if objType == CUDA_MEMCPY2D_v2: + return sizeof(cydriver.CUDA_MEMCPY2D_v2) + if objType == CUDA_MEMCPY2D: + return sizeof(cydriver.CUDA_MEMCPY2D) + if objType == CUDA_MEMCPY3D_st: + return sizeof(cydriver.CUDA_MEMCPY3D_st) + if objType == CUDA_MEMCPY3D_v2: + return sizeof(cydriver.CUDA_MEMCPY3D_v2) + if objType == CUDA_MEMCPY3D: + return sizeof(cydriver.CUDA_MEMCPY3D) + if objType == CUDA_MEMCPY3D_PEER_st: + return sizeof(cydriver.CUDA_MEMCPY3D_PEER_st) + if objType == CUDA_MEMCPY3D_PEER_v1: + return sizeof(cydriver.CUDA_MEMCPY3D_PEER_v1) + if objType == CUDA_MEMCPY3D_PEER: + return sizeof(cydriver.CUDA_MEMCPY3D_PEER) + if objType == CUDA_MEMCPY_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_MEMCPY_NODE_PARAMS_st) + if objType == CUDA_MEMCPY_NODE_PARAMS: + return sizeof(cydriver.CUDA_MEMCPY_NODE_PARAMS) + if objType == CUDA_ARRAY_DESCRIPTOR_st: + return sizeof(cydriver.CUDA_ARRAY_DESCRIPTOR_st) + if objType == CUDA_ARRAY_DESCRIPTOR_v2: + return sizeof(cydriver.CUDA_ARRAY_DESCRIPTOR_v2) + if objType == CUDA_ARRAY_DESCRIPTOR: + return sizeof(cydriver.CUDA_ARRAY_DESCRIPTOR) + if objType == CUDA_ARRAY3D_DESCRIPTOR_st: + return sizeof(cydriver.CUDA_ARRAY3D_DESCRIPTOR_st) + if objType == CUDA_ARRAY3D_DESCRIPTOR_v2: + return sizeof(cydriver.CUDA_ARRAY3D_DESCRIPTOR_v2) + if objType == CUDA_ARRAY3D_DESCRIPTOR: + return sizeof(cydriver.CUDA_ARRAY3D_DESCRIPTOR) + if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st: + return sizeof(cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st) + if objType == CUDA_ARRAY_SPARSE_PROPERTIES_v1: + return sizeof(cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_v1) + if objType == CUDA_ARRAY_SPARSE_PROPERTIES: + return sizeof(cydriver.CUDA_ARRAY_SPARSE_PROPERTIES) + if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st: + return sizeof(cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st) + if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_v1: + return sizeof(cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1) + if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS: + return sizeof(cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS) + if objType == CUDA_RESOURCE_DESC_st: + return sizeof(cydriver.CUDA_RESOURCE_DESC_st) + if objType == CUDA_RESOURCE_DESC_v1: + return sizeof(cydriver.CUDA_RESOURCE_DESC_v1) + if objType == CUDA_RESOURCE_DESC: + return sizeof(cydriver.CUDA_RESOURCE_DESC) + if objType == CUDA_TEXTURE_DESC_st: + return sizeof(cydriver.CUDA_TEXTURE_DESC_st) + if objType == CUDA_TEXTURE_DESC_v1: + return sizeof(cydriver.CUDA_TEXTURE_DESC_v1) + if objType == CUDA_TEXTURE_DESC: + return sizeof(cydriver.CUDA_TEXTURE_DESC) + if objType == CUDA_RESOURCE_VIEW_DESC_st: + return sizeof(cydriver.CUDA_RESOURCE_VIEW_DESC_st) + if objType == CUDA_RESOURCE_VIEW_DESC_v1: + return sizeof(cydriver.CUDA_RESOURCE_VIEW_DESC_v1) + if objType == CUDA_RESOURCE_VIEW_DESC: + return sizeof(cydriver.CUDA_RESOURCE_VIEW_DESC) + if objType == CUtensorMap_st: + return sizeof(cydriver.CUtensorMap_st) + if objType == CUtensorMap: + return sizeof(cydriver.CUtensorMap) + if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: + return sizeof(cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) + if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1: + return sizeof(cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1) + if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS: + return sizeof(cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS) + if objType == CUDA_LAUNCH_PARAMS_st: + return sizeof(cydriver.CUDA_LAUNCH_PARAMS_st) + if objType == CUDA_LAUNCH_PARAMS_v1: + return sizeof(cydriver.CUDA_LAUNCH_PARAMS_v1) + if objType == CUDA_LAUNCH_PARAMS: + return sizeof(cydriver.CUDA_LAUNCH_PARAMS) + if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) + if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) + if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC) + if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) + if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1) + if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC) + if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) + if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1) + if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC: + return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC) + if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) + if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1) + if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC) + if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) + if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1) + if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) + if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) + if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1) + if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS: + return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) + if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st) + if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1) + if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS: + return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS) + if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st) + if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2) + if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st) + if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1) + if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS: + return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS) + if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st) + if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2) + if objType == CUmemGenericAllocationHandle_v1: + return sizeof(cydriver.CUmemGenericAllocationHandle_v1) + if objType == CUmemGenericAllocationHandle: + return sizeof(cydriver.CUmemGenericAllocationHandle) + if objType == CUarrayMapInfo_st: + return sizeof(cydriver.CUarrayMapInfo_st) + if objType == CUarrayMapInfo_v1: + return sizeof(cydriver.CUarrayMapInfo_v1) + if objType == CUarrayMapInfo: + return sizeof(cydriver.CUarrayMapInfo) + if objType == CUmemLocation_st: + return sizeof(cydriver.CUmemLocation_st) + if objType == CUmemLocation_v1: + return sizeof(cydriver.CUmemLocation_v1) + if objType == CUmemLocation: + return sizeof(cydriver.CUmemLocation) + if objType == CUmemAllocationProp_st: + return sizeof(cydriver.CUmemAllocationProp_st) + if objType == CUmemAllocationProp_v1: + return sizeof(cydriver.CUmemAllocationProp_v1) + if objType == CUmemAllocationProp: + return sizeof(cydriver.CUmemAllocationProp) + if objType == CUmulticastObjectProp_st: + return sizeof(cydriver.CUmulticastObjectProp_st) + if objType == CUmulticastObjectProp_v1: + return sizeof(cydriver.CUmulticastObjectProp_v1) + if objType == CUmulticastObjectProp: + return sizeof(cydriver.CUmulticastObjectProp) + if objType == CUmemAccessDesc_st: + return sizeof(cydriver.CUmemAccessDesc_st) + if objType == CUmemAccessDesc_v1: + return sizeof(cydriver.CUmemAccessDesc_v1) + if objType == CUmemAccessDesc: + return sizeof(cydriver.CUmemAccessDesc) + if objType == CUgraphExecUpdateResultInfo_st: + return sizeof(cydriver.CUgraphExecUpdateResultInfo_st) + if objType == CUgraphExecUpdateResultInfo_v1: + return sizeof(cydriver.CUgraphExecUpdateResultInfo_v1) + if objType == CUgraphExecUpdateResultInfo: + return sizeof(cydriver.CUgraphExecUpdateResultInfo) + if objType == CUmemPoolProps_st: + return sizeof(cydriver.CUmemPoolProps_st) + if objType == CUmemPoolProps_v1: + return sizeof(cydriver.CUmemPoolProps_v1) + if objType == CUmemPoolProps: + return sizeof(cydriver.CUmemPoolProps) + if objType == CUmemPoolPtrExportData_st: + return sizeof(cydriver.CUmemPoolPtrExportData_st) + if objType == CUmemPoolPtrExportData_v1: + return sizeof(cydriver.CUmemPoolPtrExportData_v1) + if objType == CUmemPoolPtrExportData: + return sizeof(cydriver.CUmemPoolPtrExportData) + if objType == CUmemcpyAttributes_st: + return sizeof(cydriver.CUmemcpyAttributes_st) + if objType == CUmemcpyAttributes_v1: + return sizeof(cydriver.CUmemcpyAttributes_v1) + if objType == CUmemcpyAttributes: + return sizeof(cydriver.CUmemcpyAttributes) + if objType == CUoffset3D_st: + return sizeof(cydriver.CUoffset3D_st) + if objType == CUoffset3D_v1: + return sizeof(cydriver.CUoffset3D_v1) + if objType == CUoffset3D: + return sizeof(cydriver.CUoffset3D) + if objType == CUextent3D_st: + return sizeof(cydriver.CUextent3D_st) + if objType == CUextent3D_v1: + return sizeof(cydriver.CUextent3D_v1) + if objType == CUextent3D: + return sizeof(cydriver.CUextent3D) + if objType == CUmemcpy3DOperand_st: + return sizeof(cydriver.CUmemcpy3DOperand_st) + if objType == CUmemcpy3DOperand_v1: + return sizeof(cydriver.CUmemcpy3DOperand_v1) + if objType == CUmemcpy3DOperand: + return sizeof(cydriver.CUmemcpy3DOperand) + if objType == CUDA_MEMCPY3D_BATCH_OP_st: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP_st) + if objType == CUDA_MEMCPY3D_BATCH_OP_v1: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP_v1) + if objType == CUDA_MEMCPY3D_BATCH_OP: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP) + if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: + return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st) + if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v1: + return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1) + if objType == CUDA_MEM_ALLOC_NODE_PARAMS: + return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS) + if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: + return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st) + if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v2: + return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2) + if objType == CUDA_MEM_FREE_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_MEM_FREE_NODE_PARAMS_st) + if objType == CUDA_MEM_FREE_NODE_PARAMS: + return sizeof(cydriver.CUDA_MEM_FREE_NODE_PARAMS) + if objType == CUDA_CHILD_GRAPH_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st) + if objType == CUDA_CHILD_GRAPH_NODE_PARAMS: + return sizeof(cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS) + if objType == CUDA_EVENT_RECORD_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st) + if objType == CUDA_EVENT_RECORD_NODE_PARAMS: + return sizeof(cydriver.CUDA_EVENT_RECORD_NODE_PARAMS) + if objType == CUDA_EVENT_WAIT_NODE_PARAMS_st: + return sizeof(cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st) + if objType == CUDA_EVENT_WAIT_NODE_PARAMS: + return sizeof(cydriver.CUDA_EVENT_WAIT_NODE_PARAMS) + if objType == CUgraphNodeParams_st: + return sizeof(cydriver.CUgraphNodeParams_st) + if objType == CUgraphNodeParams: + return sizeof(cydriver.CUgraphNodeParams) + if objType == CUcheckpointLockArgs_st: + return sizeof(cydriver.CUcheckpointLockArgs_st) + if objType == CUcheckpointLockArgs: + return sizeof(cydriver.CUcheckpointLockArgs) + if objType == CUcheckpointCheckpointArgs_st: + return sizeof(cydriver.CUcheckpointCheckpointArgs_st) + if objType == CUcheckpointCheckpointArgs: + return sizeof(cydriver.CUcheckpointCheckpointArgs) + if objType == CUcheckpointRestoreArgs_st: + return sizeof(cydriver.CUcheckpointRestoreArgs_st) + if objType == CUcheckpointRestoreArgs: + return sizeof(cydriver.CUcheckpointRestoreArgs) + if objType == CUcheckpointUnlockArgs_st: + return sizeof(cydriver.CUcheckpointUnlockArgs_st) + if objType == CUcheckpointUnlockArgs: + return sizeof(cydriver.CUcheckpointUnlockArgs) + if objType == CUmemDecompressParams_st: + return sizeof(cydriver.CUmemDecompressParams_st) + if objType == CUmemDecompressParams: + return sizeof(cydriver.CUmemDecompressParams) + if objType == CUdevResourceDesc: + return sizeof(cydriver.CUdevResourceDesc) + if objType == CUdevSmResource_st: + return sizeof(cydriver.CUdevSmResource_st) + if objType == CUdevSmResource: + return sizeof(cydriver.CUdevSmResource) + if objType == CUdevResource_st: + return sizeof(cydriver.CUdevResource_st) + if objType == CUdevResource_v1: + return sizeof(cydriver.CUdevResource_v1) + if objType == CUdevResource: + return sizeof(cydriver.CUdevResource) + if objType == CUlogsCallbackHandle: + return sizeof(cydriver.CUlogsCallbackHandle) + if objType == CUlogsCallback: + return sizeof(cydriver.CUlogsCallback) + if objType == CUlogIterator: + return sizeof(cydriver.CUlogIterator) + if objType == CUeglFrame_st: + return sizeof(cydriver.CUeglFrame_st) + if objType == CUeglFrame_v1: + return sizeof(cydriver.CUeglFrame_v1) + if objType == CUeglFrame: + return sizeof(cydriver.CUeglFrame) + if objType == CUeglStreamConnection: + return sizeof(cydriver.CUeglStreamConnection) + if objType == GLenum: + return sizeof(cydriver.GLenum) + if objType == GLuint: + return sizeof(cydriver.GLuint) + if objType == EGLImageKHR: + return sizeof(cydriver.EGLImageKHR) + if objType == EGLStreamKHR: + return sizeof(cydriver.EGLStreamKHR) + if objType == EGLint: + return sizeof(cydriver.EGLint) + if objType == EGLSyncKHR: + return sizeof(cydriver.EGLSyncKHR) + if objType == VdpDevice: + return sizeof(cydriver.VdpDevice) + if objType == VdpGetProcAddress: + return sizeof(cydriver.VdpGetProcAddress) + if objType == VdpVideoSurface: + return sizeof(cydriver.VdpVideoSurface) + if objType == VdpOutputSurface: + return sizeof(cydriver.VdpOutputSurface) + raise TypeError("Unknown type: " + str(objType)) + +cdef int _add_native_handle_getters() except?-1: + from cuda.bindings.utils import _add_cuda_native_handle_getter + def CUcontext_getter(CUcontext x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUcontext, CUcontext_getter) + def CUmodule_getter(CUmodule x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUmodule, CUmodule_getter) + def CUfunction_getter(CUfunction x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUfunction, CUfunction_getter) + def CUlibrary_getter(CUlibrary x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUlibrary, CUlibrary_getter) + def CUkernel_getter(CUkernel x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUkernel, CUkernel_getter) + def CUarray_getter(CUarray x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUarray, CUarray_getter) + def CUmipmappedArray_getter(CUmipmappedArray x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUmipmappedArray, CUmipmappedArray_getter) + def CUtexref_getter(CUtexref x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUtexref, CUtexref_getter) + def CUsurfref_getter(CUsurfref x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUsurfref, CUsurfref_getter) + def CUevent_getter(CUevent x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUevent, CUevent_getter) + def CUstream_getter(CUstream x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUstream, CUstream_getter) + def CUgraphicsResource_getter(CUgraphicsResource x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgraphicsResource, CUgraphicsResource_getter) + def CUexternalMemory_getter(CUexternalMemory x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUexternalMemory, CUexternalMemory_getter) + def CUexternalSemaphore_getter(CUexternalSemaphore x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUexternalSemaphore, CUexternalSemaphore_getter) + def CUgraph_getter(CUgraph x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgraph, CUgraph_getter) + def CUgraphNode_getter(CUgraphNode x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgraphNode, CUgraphNode_getter) + def CUgraphExec_getter(CUgraphExec x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgraphExec, CUgraphExec_getter) + def CUmemoryPool_getter(CUmemoryPool x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUmemoryPool, CUmemoryPool_getter) + def CUuserObject_getter(CUuserObject x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUuserObject, CUuserObject_getter) + def CUgraphDeviceNode_getter(CUgraphDeviceNode x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgraphDeviceNode, CUgraphDeviceNode_getter) + def CUasyncCallbackHandle_getter(CUasyncCallbackHandle x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUasyncCallbackHandle, CUasyncCallbackHandle_getter) + def CUgreenCtx_getter(CUgreenCtx x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUgreenCtx, CUgreenCtx_getter) + def CUlinkState_getter(CUlinkState x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUlinkState, CUlinkState_getter) + def CUdevResourceDesc_getter(CUdevResourceDesc x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUdevResourceDesc, CUdevResourceDesc_getter) + def CUlogsCallbackHandle_getter(CUlogsCallbackHandle x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUlogsCallbackHandle, CUlogsCallbackHandle_getter) + def CUeglStreamConnection_getter(CUeglStreamConnection x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUeglStreamConnection, CUeglStreamConnection_getter) + def EGLImageKHR_getter(EGLImageKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLImageKHR, EGLImageKHR_getter) + def EGLStreamKHR_getter(EGLStreamKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLStreamKHR, EGLStreamKHR_getter) + def EGLSyncKHR_getter(EGLSyncKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLSyncKHR, EGLSyncKHR_getter) + return 0 +_add_native_handle_getters() + diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8fffe446a491ed6d4f4839c45a08454162edca17 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.cpp @@ -0,0 +1,14290 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.nvjitlink", + "sources": [ + "cuda/bindings/nvjitlink.pyx" + ] + }, + "module_name": "cuda.bindings.nvjitlink" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__nvjitlink +#define __PYX_HAVE_API__cuda__bindings__nvjitlink +/* Early includes */ +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include + + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/nvjitlink.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cynvjitlink.pxd":15 + * + * # enums + * ctypedef enum nvJitLinkResult "nvJitLinkResult": # <<<<<<<<<<<<<< + * NVJITLINK_SUCCESS "NVJITLINK_SUCCESS" = 0 + * NVJITLINK_ERROR_UNRECOGNIZED_OPTION "NVJITLINK_ERROR_UNRECOGNIZED_OPTION" +*/ +enum nvJitLinkResult { + NVJITLINK_SUCCESS = 0, + NVJITLINK_ERROR_UNRECOGNIZED_OPTION, + NVJITLINK_ERROR_MISSING_ARCH, + NVJITLINK_ERROR_INVALID_INPUT, + NVJITLINK_ERROR_PTX_COMPILE, + NVJITLINK_ERROR_NVVM_COMPILE, + NVJITLINK_ERROR_INTERNAL, + NVJITLINK_ERROR_THREADPOOL, + NVJITLINK_ERROR_UNRECOGNIZED_INPUT, + NVJITLINK_ERROR_FINALIZE, + NVJITLINK_ERROR_NULL_INPUT, + NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS, + NVJITLINK_ERROR_INCORRECT_INPUT_TYPE, + NVJITLINK_ERROR_ARCH_MISMATCH, + NVJITLINK_ERROR_OUTDATED_LIBRARY, + NVJITLINK_ERROR_MISSING_FATBIN, + NVJITLINK_ERROR_UNRECOGNIZED_ARCH, + NVJITLINK_ERROR_UNSUPPORTED_ARCH, + NVJITLINK_ERROR_LTO_NOT_ENABLED, + _NVJITLINKRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvJitLinkResult nvJitLinkResult; + +/* "cynvjitlink.pxd":37 + * _NVJITLINKRESULT_INTERNAL_LOADING_ERROR "_NVJITLINKRESULT_INTERNAL_LOADING_ERROR" = -42 + * + * ctypedef enum nvJitLinkInputType "nvJitLinkInputType": # <<<<<<<<<<<<<< + * NVJITLINK_INPUT_NONE "NVJITLINK_INPUT_NONE" = 0 + * NVJITLINK_INPUT_CUBIN "NVJITLINK_INPUT_CUBIN" = 1 +*/ +enum nvJitLinkInputType { + NVJITLINK_INPUT_NONE = 0, + NVJITLINK_INPUT_CUBIN = 1, + NVJITLINK_INPUT_PTX, + NVJITLINK_INPUT_LTOIR, + NVJITLINK_INPUT_FATBIN, + NVJITLINK_INPUT_OBJECT, + NVJITLINK_INPUT_LIBRARY, + NVJITLINK_INPUT_INDEX, + NVJITLINK_INPUT_ANY = 10 +}; +typedef enum nvJitLinkInputType nvJitLinkInputType; + +/* "cynvjitlink.pxd":50 + * + * # types + * ctypedef void* nvJitLinkHandle 'nvJitLinkHandle' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvJitLinkHandle; +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource; +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer; + +/* "_internal/utils.pxd":156 + * + * + * cdef cppclass nested_resource[T]: # <<<<<<<<<<<<<< + * nullable_unique_ptr[ vector[intptr_t] ] ptrs + * nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr +*/ +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource { + nullable_unique_ptr > ptrs; + nullable_unique_ptr > > nested_resource_ptr; +}; + +/* "_internal/utils.pxd":167 + * + * cdef bint is_nested_sequence(data) + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* # <<<<<<<<<<<<<< +*/ +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer { + int __pyx_n; + PyObject *readonly; +}; + +/* "cuda/bindings/nvjitlink.pxd":16 + * ############################################################################### + * + * ctypedef nvJitLinkHandle Handle # <<<<<<<<<<<<<< + * + * +*/ +typedef nvJitLinkHandle __pyx_t_4cuda_8bindings_9nvjitlink_Handle; + +/* "cuda/bindings/nvjitlink.pxd":23 + * ############################################################################### + * + * ctypedef nvJitLinkResult _Result # <<<<<<<<<<<<<< + * ctypedef nvJitLinkInputType _InputType + * +*/ +typedef nvJitLinkResult __pyx_t_4cuda_8bindings_9nvjitlink__Result; + +/* "cuda/bindings/nvjitlink.pxd":24 + * + * ctypedef nvJitLinkResult _Result + * ctypedef nvJitLinkInputType _InputType # <<<<<<<<<<<<<< + * + * +*/ +typedef nvJitLinkInputType __pyx_t_4cuda_8bindings_9nvjitlink__InputType; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectDelAttr.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvJitLinkResult(nvJitLinkResult value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvJitLinkInputType(nvJitLinkInputType value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cynvjitlink" */ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkCreate)(nvJitLinkHandle *, uint32_t, char const **); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkDestroy)(nvJitLinkHandle *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddData)(nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddFile)(nvJitLinkHandle, nvJitLinkInputType, char const *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkComplete)(nvJitLinkHandle); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubinSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubin)(nvJitLinkHandle, void *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtxSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtx)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLogSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLog)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLogSize)(nvJitLinkHandle, size_t *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLog)(nvJitLinkHandle, char *); /*proto*/ +static nvJitLinkResult (*__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkVersion)(unsigned int *, unsigned int *); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libcpp.vector" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "libcpp.memory" */ + +/* Module declarations from "cuda.bindings._internal.utils" */ +static void *(*__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer)(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args); /*proto*/ +static int (*__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, int *); /*proto*/ +static int (*__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, int32_t *); /*proto*/ +static int (*__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, int64_t *); /*proto*/ +static int (*__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, char *); /*proto*/ +static int (*__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, float *); /*proto*/ +static int (*__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr)(nullable_unique_ptr > &, PyObject *, double *); /*proto*/ +static int (*__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptrs)(nullable_unique_ptr > &, PyObject *, void *); /*proto*/ +static int (*__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *); /*proto*/ +static int (*__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *); /*proto*/ +static int (*__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *); /*proto*/ +static int (*__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *); /*proto*/ +static int (*__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *); /*proto*/ +static int (*__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *); /*proto*/ + +/* Module declarations from "cuda.bindings.nvjitlink" */ +static intptr_t __pyx_f_4cuda_8bindings_9nvjitlink_create(uint32_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_add_data(intptr_t, int, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_add_file(intptr_t, int, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_complete(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_error_log_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_error_log(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_info_log_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_info_log(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_version(int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_4cuda_8bindings_9nvjitlink_check_status(int); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_destroy(intptr_t, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.nvjitlink" +extern int __pyx_module_is_main_cuda__bindings__nvjitlink; +int __pyx_module_is_main_cuda__bindings__nvjitlink = 0; + +/* Implementation of "cuda.bindings.nvjitlink" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_TypeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = " ("; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k_81[] = "\200\001\360\020\000\n\013\330\010\021\320\021\"\240!\2408\2501\330\004\020\220\001\220\021"; +static const char __pyx_k__2[] = ")"; +static const char __pyx_k__3[] = "."; +static const char __pyx_k__4[] = "?"; +static const char __pyx_k_1HL[] = "\200\001\360\022\000\005\032\320\031+\2501\250H\260L\300\001\330\t\n\330\010\021\320\021(\250\001\250\030\260\030\270\027\300\001\330\004\020\220\001\220\021"; +static const char __pyx_k_8_1[] = "\320\0008\270\001\360\030\000\n\013\330\010\021\320\021(\250\001\250\030\260\030\270\021\270!\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_ANY[] = "ANY"; +static const char __pyx_k_PTX[] = "PTX"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_err[] = "err"; +static const char __pyx_k_log[] = "log"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_ptx[] = "ptx"; +static const char __pyx_k_HA_1[] = "\200\001\360\020\000\005\025\220H\230A\330\t\n\330\010\021\320\021!\240\021\240!\2401\330\004\020\220\001\220\021"; +static const char __pyx_k_NONE[] = "NONE"; +static const char __pyx_k_data[] = "data"; +static const char __pyx_k_enum[] = "enum"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_init[] = "__init__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_9_1_1[] = "\320\0009\270\021\360\030\000\n\013\330\010\021\320\021)\250\021\250(\260(\270!\2701\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_A_AXT[] = "\200A\330\010\020\220\004\220A\220X\230T\240\021"; +static const char __pyx_k_CUBIN[] = "CUBIN"; +static const char __pyx_k_INDEX[] = "INDEX"; +static const char __pyx_k_LTOIR[] = "LTOIR"; +static const char __pyx_k_cubin[] = "cubin"; +static const char __pyx_k_super[] = "super"; +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_7_1_G1[] = "\200\001\360\032\000\n\013\330\010\021\320\021!\240\021\240!\2407\250!\2501\330\004\020\220\001\220\021\330\004\014\210G\2201"; +static const char __pyx_k_881A_1[] = "\320\000:\270!\360\030\000\n\013\330\010\021\320\021*\250!\2508\2608\2701\270A\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_FATBIN[] = "FATBIN"; +static const char __pyx_k_OBJECT[] = "OBJECT"; +static const char __pyx_k_Result[] = "Result"; +static const char __pyx_k_create[] = "create"; +static const char __pyx_k_handle[] = "handle"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_status[] = "status"; +static const char __pyx_k_A_AXXWA[] = "\200\001\360\022\000\005\030\320\027)\250\021\250&\260\014\270A\330\t\n\330\010\021\320\021$\240A\240X\250X\260W\270A\330\004\020\220\001\220\021"; +static const char __pyx_k_A_QhhgQ[] = "\200\001\360\022\000\005\030\320\027)\250\021\250&\260\014\270A\330\t\n\330\010\021\320\021%\240Q\240h\250h\260g\270Q\330\004\020\220\001\220\021"; +static const char __pyx_k_A_axxwa[] = "\200\001\360\022\000\005\030\320\027)\250\021\250&\260\014\270A\330\t\n\330\010\021\320\021&\240a\240x\250x\260w\270a\330\004\020\220\001\220\021"; +static const char __pyx_k_IntEnum[] = "IntEnum"; +static const char __pyx_k_LIBRARY[] = "LIBRARY"; +static const char __pyx_k_SUCCESS[] = "SUCCESS"; +static const char __pyx_k_destroy[] = "destroy"; +static const char __pyx_k_options[] = "options"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_version[] = "version"; +static const char __pyx_k_add_data[] = "add_data"; +static const char __pyx_k_add_file[] = "add_file"; +static const char __pyx_k_complete[] = "complete"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_A_AXXQa_1[] = "\320\000<\270A\360\030\000\n\013\330\010\021\320\021,\250A\250X\260X\270Q\270a\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_InputType[] = "InputType"; +static const char __pyx_k_IntEnum_2[] = "_IntEnum"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_file_name[] = "file_name"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_input_type[] = "input_type"; +static const char __pyx_k_mro_entries[] = "__mro_entries__"; +static const char __pyx_k_num_options[] = "num_options"; +static const char __pyx_k_get_info_log[] = "get_info_log"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_get_error_log[] = "get_error_log"; +static const char __pyx_k_ERROR_FINALIZE[] = "ERROR_FINALIZE"; +static const char __pyx_k_ERROR_INTERNAL[] = "ERROR_INTERNAL"; +static const char __pyx_k_get_linked_ptx[] = "get_linked_ptx"; +static const char __pyx_k_nvJitLinkError[] = "nvJitLinkError"; +static const char __pyx_k_ERROR_NULL_INPUT[] = "ERROR_NULL_INPUT"; +static const char __pyx_k_ERROR_THREADPOOL[] = "ERROR_THREADPOOL"; +static const char __pyx_k_get_linked_cubin[] = "get_linked_cubin"; +static const char __pyx_k_t_Qk_iq_5_Q_l_WX[] = "\200\001\360\024\000\005\010\200t\210:\220Q\220k\240\021\330\010\016\210i\220q\230\001\330\004#\2405\250\n\260'\270\021\330\004\035\230Q\330\t\n\330\010\021\320\021!\240\021\240(\250(\260,\270l\310-\320WX\330\004\020\220\001\220\021"; +static const char __pyx_k_ERROR_PTX_COMPILE[] = "ERROR_PTX_COMPILE"; +static const char __pyx_k_Q_1E_YgQ_iuTYYZ_Q[] = "\320\000=\270Q\360&\000\005\034\2301\230E\240\021\240+\250Y\260g\270Q\340\t\n\330\010\021\220\037\240\001\240\021\240(\250-\260\177\300i\310u\320TY\320YZ\330\004\020\220\001\220\021\330\004\013\210:\220Q"; +static const char __pyx_k_get_info_log_size[] = "get_info_log_size"; +static const char __pyx_k_ERROR_MISSING_ARCH[] = "ERROR_MISSING_ARCH"; +static const char __pyx_k_ERROR_NVVM_COMPILE[] = "ERROR_NVVM_COMPILE"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_get_error_log_size[] = "get_error_log_size"; +static const char __pyx_k_ERROR_ARCH_MISMATCH[] = "ERROR_ARCH_MISMATCH"; +static const char __pyx_k_ERROR_INVALID_INPUT[] = "ERROR_INVALID_INPUT"; +static const char __pyx_k_See_nvJitLinkResult[] = "See `nvJitLinkResult`."; +static const char __pyx_k_get_linked_ptx_size[] = "get_linked_ptx_size"; +static const char __pyx_k_ERROR_MISSING_FATBIN[] = "ERROR_MISSING_FATBIN"; +static const char __pyx_k_A_Ja_F_1_r_Qiq_Q_e9AQ[] = "\200A\330\010\014\210J\220a\330\010\014\210F\220!\2201\330\010\027\220r\230\024\230Q\230i\240q\250\001\330\010\r\210Q\320\016\036\230e\2409\250A\250Q"; +static const char __pyx_k_ERROR_LTO_NOT_ENABLED[] = "ERROR_LTO_NOT_ENABLED"; +static const char __pyx_k_get_linked_cubin_size[] = "get_linked_cubin_size"; +static const char __pyx_k_nvJitLinkError___init[] = "nvJitLinkError.__init__"; +static const char __pyx_k_ERROR_OUTDATED_LIBRARY[] = "ERROR_OUTDATED_LIBRARY"; +static const char __pyx_k_ERROR_UNSUPPORTED_ARCH[] = "ERROR_UNSUPPORTED_ARCH"; +static const char __pyx_k_See_nvJitLinkInputType[] = "See `nvJitLinkInputType`."; +static const char __pyx_k_ERROR_UNRECOGNIZED_ARCH[] = "ERROR_UNRECOGNIZED_ARCH"; +static const char __pyx_k_cuda_bindings_nvjitlink[] = "cuda.bindings.nvjitlink"; +static const char __pyx_k_nvJitLinkError___reduce[] = "nvJitLinkError.__reduce__"; +static const char __pyx_k_ERROR_UNRECOGNIZED_INPUT[] = "ERROR_UNRECOGNIZED_INPUT"; +static const char __pyx_k_ERROR_UNRECOGNIZED_OPTION[] = "ERROR_UNRECOGNIZED_OPTION"; +static const char __pyx_k_name_must_be_a_Python_str[] = "name must be a Python str"; +static const char __pyx_k_6_t_QfA_iq_e5_q_l_W__eerrs[] = "\200\001\360\030\000\005\031\320\030*\250!\2506\260\037\300\001\330\004\007\200t\210:\220Q\220f\230A\330\010\016\210i\220q\230\001\330\004\036\230e\2405\250\007\250q\330\004\030\230\001\330\t\n\330\010\021\320\021!\240\021\240(\250(\260,\270l\310-\320W_\320_e\320er\320rs\330\004\020\220\001\220\021"; +static const char __pyx_k_ERROR_INCOMPATIBLE_OPTIONS[] = "ERROR_INCOMPATIBLE_OPTIONS"; +static const char __pyx_k_ERROR_INCORRECT_INPUT_TYPE[] = "ERROR_INCORRECT_INPUT_TYPE"; +static const char __pyx_k_cuda_bindings_nvjitlink_pyx[] = "cuda/bindings/nvjitlink.pyx"; +static const char __pyx_k_file_name_must_be_a_Python_str[] = "file_name must be a Python str"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_destroy(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_2create(CYTHON_UNUSED PyObject *__pyx_self, uint32_t __pyx_v_num_options, PyObject *__pyx_v_options); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_4add_data(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_data, size_t __pyx_v_size, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_6add_file(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_file_name); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_8complete(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_10get_linked_cubin_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_12get_linked_cubin(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_cubin); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14get_linked_ptx_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_16get_linked_ptx(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_ptx); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_18get_error_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_20get_error_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_log); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_22get_info_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_24get_info_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_log); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_26version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_codeobj_tab[16]; + PyObject *__pyx_string_tab[95]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_ANY __pyx_string_tab[1] +#define __pyx_n_u_CUBIN __pyx_string_tab[2] +#define __pyx_n_u_ERROR_ARCH_MISMATCH __pyx_string_tab[3] +#define __pyx_n_u_ERROR_FINALIZE __pyx_string_tab[4] +#define __pyx_n_u_ERROR_INCOMPATIBLE_OPTIONS __pyx_string_tab[5] +#define __pyx_n_u_ERROR_INCORRECT_INPUT_TYPE __pyx_string_tab[6] +#define __pyx_n_u_ERROR_INTERNAL __pyx_string_tab[7] +#define __pyx_n_u_ERROR_INVALID_INPUT __pyx_string_tab[8] +#define __pyx_n_u_ERROR_LTO_NOT_ENABLED __pyx_string_tab[9] +#define __pyx_n_u_ERROR_MISSING_ARCH __pyx_string_tab[10] +#define __pyx_n_u_ERROR_MISSING_FATBIN __pyx_string_tab[11] +#define __pyx_n_u_ERROR_NULL_INPUT __pyx_string_tab[12] +#define __pyx_n_u_ERROR_NVVM_COMPILE __pyx_string_tab[13] +#define __pyx_n_u_ERROR_OUTDATED_LIBRARY __pyx_string_tab[14] +#define __pyx_n_u_ERROR_PTX_COMPILE __pyx_string_tab[15] +#define __pyx_n_u_ERROR_THREADPOOL __pyx_string_tab[16] +#define __pyx_n_u_ERROR_UNRECOGNIZED_ARCH __pyx_string_tab[17] +#define __pyx_n_u_ERROR_UNRECOGNIZED_INPUT __pyx_string_tab[18] +#define __pyx_n_u_ERROR_UNRECOGNIZED_OPTION __pyx_string_tab[19] +#define __pyx_n_u_ERROR_UNSUPPORTED_ARCH __pyx_string_tab[20] +#define __pyx_n_u_FATBIN __pyx_string_tab[21] +#define __pyx_n_u_INDEX __pyx_string_tab[22] +#define __pyx_n_u_InputType __pyx_string_tab[23] +#define __pyx_n_u_IntEnum __pyx_string_tab[24] +#define __pyx_n_u_IntEnum_2 __pyx_string_tab[25] +#define __pyx_n_u_LIBRARY __pyx_string_tab[26] +#define __pyx_n_u_LTOIR __pyx_string_tab[27] +#define __pyx_n_u_NONE __pyx_string_tab[28] +#define __pyx_n_u_OBJECT __pyx_string_tab[29] +#define __pyx_n_u_PTX __pyx_string_tab[30] +#define __pyx_n_u_Result __pyx_string_tab[31] +#define __pyx_n_u_SUCCESS __pyx_string_tab[32] +#define __pyx_kp_u_See_nvJitLinkInputType __pyx_string_tab[33] +#define __pyx_kp_u_See_nvJitLinkResult __pyx_string_tab[34] +#define __pyx_n_u_TypeError __pyx_string_tab[35] +#define __pyx_kp_u__2 __pyx_string_tab[36] +#define __pyx_kp_u__3 __pyx_string_tab[37] +#define __pyx_kp_u__4 __pyx_string_tab[38] +#define __pyx_n_u_add_data __pyx_string_tab[39] +#define __pyx_n_u_add_file __pyx_string_tab[40] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[41] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[42] +#define __pyx_n_u_complete __pyx_string_tab[43] +#define __pyx_n_u_create __pyx_string_tab[44] +#define __pyx_n_u_cubin __pyx_string_tab[45] +#define __pyx_n_u_cuda_bindings_nvjitlink __pyx_string_tab[46] +#define __pyx_kp_u_cuda_bindings_nvjitlink_pyx __pyx_string_tab[47] +#define __pyx_n_u_data __pyx_string_tab[48] +#define __pyx_n_u_destroy __pyx_string_tab[49] +#define __pyx_n_u_doc __pyx_string_tab[50] +#define __pyx_n_u_enum __pyx_string_tab[51] +#define __pyx_n_u_err __pyx_string_tab[52] +#define __pyx_n_u_file_name __pyx_string_tab[53] +#define __pyx_kp_u_file_name_must_be_a_Python_str __pyx_string_tab[54] +#define __pyx_n_u_func __pyx_string_tab[55] +#define __pyx_n_u_get_error_log __pyx_string_tab[56] +#define __pyx_n_u_get_error_log_size __pyx_string_tab[57] +#define __pyx_n_u_get_info_log __pyx_string_tab[58] +#define __pyx_n_u_get_info_log_size __pyx_string_tab[59] +#define __pyx_n_u_get_linked_cubin __pyx_string_tab[60] +#define __pyx_n_u_get_linked_cubin_size __pyx_string_tab[61] +#define __pyx_n_u_get_linked_ptx __pyx_string_tab[62] +#define __pyx_n_u_get_linked_ptx_size __pyx_string_tab[63] +#define __pyx_n_u_handle __pyx_string_tab[64] +#define __pyx_n_u_init __pyx_string_tab[65] +#define __pyx_n_u_input_type __pyx_string_tab[66] +#define __pyx_n_u_is_coroutine __pyx_string_tab[67] +#define __pyx_n_u_log __pyx_string_tab[68] +#define __pyx_n_u_main __pyx_string_tab[69] +#define __pyx_n_u_metaclass __pyx_string_tab[70] +#define __pyx_n_u_module __pyx_string_tab[71] +#define __pyx_n_u_mro_entries __pyx_string_tab[72] +#define __pyx_n_u_name __pyx_string_tab[73] +#define __pyx_n_u_name_2 __pyx_string_tab[74] +#define __pyx_kp_u_name_must_be_a_Python_str __pyx_string_tab[75] +#define __pyx_n_u_num_options __pyx_string_tab[76] +#define __pyx_n_u_nvJitLinkError __pyx_string_tab[77] +#define __pyx_n_u_nvJitLinkError___init __pyx_string_tab[78] +#define __pyx_n_u_nvJitLinkError___reduce __pyx_string_tab[79] +#define __pyx_n_u_options __pyx_string_tab[80] +#define __pyx_n_u_pop __pyx_string_tab[81] +#define __pyx_n_u_prepare __pyx_string_tab[82] +#define __pyx_n_u_ptx __pyx_string_tab[83] +#define __pyx_n_u_qualname __pyx_string_tab[84] +#define __pyx_n_u_reduce __pyx_string_tab[85] +#define __pyx_n_u_s __pyx_string_tab[86] +#define __pyx_n_u_self __pyx_string_tab[87] +#define __pyx_n_u_set_name __pyx_string_tab[88] +#define __pyx_n_u_size __pyx_string_tab[89] +#define __pyx_n_u_status __pyx_string_tab[90] +#define __pyx_n_u_super __pyx_string_tab[91] +#define __pyx_n_u_test __pyx_string_tab[92] +#define __pyx_n_u_value __pyx_string_tab[93] +#define __pyx_n_u_version __pyx_string_tab[94] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<95; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<95; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/nvjitlink.pyx":61 + * class nvJitLinkError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_14nvJitLinkError___init__, "nvJitLinkError.__init__(self, status)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_14nvJitLinkError_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_14nvJitLinkError___init__}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_status = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_status,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 61, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 61, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 61, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 61, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 61, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 61, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 61, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_status = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 61, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.nvJitLinkError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError___init__(__pyx_self, __pyx_v_self, __pyx_v_status); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_v_err = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5[4]; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/nvjitlink.pyx":62 + * + * def __init__(self, status): + * self.status = status # <<<<<<<<<<<<<< + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status, __pyx_v_status) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":63 + * def __init__(self, status): + * self.status = status + * s = Result(status) # <<<<<<<<<<<<<< + * cdef str err = f"{s.name} ({s.value})" + * super(nvJitLinkError, self).__init__(err) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_status}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_s = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/nvjitlink.pyx":64 + * self.status = status + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" # <<<<<<<<<<<<<< + * super(nvJitLinkError, self).__init__(err) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5[0] = __pyx_t_3; + __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_5[2] = __pyx_t_2; + __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_err = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/nvjitlink.pyx":65 + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" + * super(nvJitLinkError, self).__init__(err) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_super); + __pyx_t_7 = __pyx_builtin_super; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nvJitLinkError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_err}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "cuda/bindings/nvjitlink.pyx":61 + * class nvJitLinkError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.nvJitLinkError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XDECREF(__pyx_v_err); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":67 + * super(nvJitLinkError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_14nvJitLinkError_2__reduce__, "nvJitLinkError.__reduce__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_14nvJitLinkError_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_14nvJitLinkError_2__reduce__}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_14nvJitLinkError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 67, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 67, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce__", 0) < (0)) __PYX_ERR(0, 67, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, i); __PYX_ERR(0, 67, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 67, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 67, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.nvJitLinkError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError_2__reduce__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14nvJitLinkError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "cuda/bindings/nvjitlink.pyx":68 + * + * def __reduce__(self): + * return (type(self), (self.status,)) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 68, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(__pyx_v_self))) != (0)) __PYX_ERR(0, 68, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 68, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":67 + * super(nvJitLinkError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.nvJitLinkError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":71 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(int status) except 1 nogil: + * if status != 0: +*/ + +static int __pyx_f_4cuda_8bindings_9nvjitlink_check_status(int __pyx_v_status) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("check_status", 1); + + /* "cuda/bindings/nvjitlink.pyx":73 + * @cython.profile(False) + * cdef int check_status(int status) except 1 nogil: + * if status != 0: # <<<<<<<<<<<<<< + * with gil: + * raise nvJitLinkError(status) +*/ + __pyx_t_1 = (__pyx_v_status != 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/nvjitlink.pyx":74 + * cdef int check_status(int status) except 1 nogil: + * if status != 0: + * with gil: # <<<<<<<<<<<<<< + * raise nvJitLinkError(status) + * return status +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":75 + * if status != 0: + * with gil: + * raise nvJitLinkError(status) # <<<<<<<<<<<<<< + * return status + * +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nvJitLinkError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 75, __pyx_L5_error) + } + + /* "cuda/bindings/nvjitlink.pyx":74 + * cdef int check_status(int status) except 1 nogil: + * if status != 0: + * with gil: # <<<<<<<<<<<<<< + * raise nvJitLinkError(status) + * return status +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/nvjitlink.pyx":73 + * @cython.profile(False) + * cdef int check_status(int status) except 1 nogil: + * if status != 0: # <<<<<<<<<<<<<< + * with gil: + * raise nvJitLinkError(status) +*/ + } + + /* "cuda/bindings/nvjitlink.pyx":76 + * with gil: + * raise nvJitLinkError(status) + * return status # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_status; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":71 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(int status) except 1 nogil: + * if status != 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.check_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":83 + * ############################################################################### + * + * cpdef destroy(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkDestroy frees the memory associated with the given handle. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_1destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_destroy(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_9nvjitlink_Handle __pyx_v_h; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("destroy", 0); + + /* "cuda/bindings/nvjitlink.pyx":91 + * .. seealso:: `nvJitLinkDestroy` + * """ + * cdef Handle h = handle # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkDestroy(&h) +*/ + __pyx_v_h = ((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle); + + /* "cuda/bindings/nvjitlink.pyx":92 + * """ + * cdef Handle h = handle + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkDestroy(&h) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":93 + * cdef Handle h = handle + * with nogil: + * status = nvJitLinkDestroy(&h) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkDestroy((&__pyx_v_h)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 93, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":92 + * """ + * cdef Handle h = handle + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkDestroy(&h) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":94 + * with nogil: + * status = nvJitLinkDestroy(&h) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 94, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":83 + * ############################################################################### + * + * cpdef destroy(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkDestroy frees the memory associated with the given handle. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_1destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_destroy, "destroy(intptr_t handle)\n\nnvJitLinkDestroy frees the memory associated with the given handle.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\n.. seealso:: `nvJitLinkDestroy`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_1destroy = {"destroy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_1destroy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_destroy}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_1destroy(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("destroy (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 83, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "destroy", 0) < (0)) __PYX_ERR(0, 83, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("destroy", 1, 1, 1, i); __PYX_ERR(0, 83, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("destroy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 83, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_destroy(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_destroy(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("destroy", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_destroy(__pyx_v_handle, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":97 + * + * + * cpdef intptr_t create(uint32_t num_options, options) except -1: # <<<<<<<<<<<<<< + * """nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_9nvjitlink_create(uint32_t __pyx_v_num_options, PyObject *__pyx_v_options, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource __pyx_v__options_; + __pyx_t_4cuda_8bindings_9nvjitlink_Handle __pyx_v_handle; + nvJitLinkResult __pyx_v_status; + intptr_t __pyx_r; + int __pyx_t_1; + nvJitLinkResult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvjitlink.pyx":116 + * """ + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) # <<<<<<<<<<<<<< + * cdef Handle handle + * with nogil: +*/ + __pyx_t_1 = __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_v__options_, __pyx_v_options, ((char *)NULL)); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 116, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":118 + * get_nested_resource_ptr[char](_options_, options, NULL) + * cdef Handle handle + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":119 + * cdef Handle handle + * with nogil: + * status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) # <<<<<<<<<<<<<< + * check_status(status) + * return handle +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkCreate((&__pyx_v_handle), __pyx_v_num_options, ((char const **)__pyx_v__options_.ptrs.data())); if (unlikely(__pyx_t_2 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 119, __pyx_L4_error) + __pyx_v_status = __pyx_t_2; + } + + /* "cuda/bindings/nvjitlink.pyx":118 + * get_nested_resource_ptr[char](_options_, options, NULL) + * cdef Handle handle + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":120 + * with nogil: + * status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) + * check_status(status) # <<<<<<<<<<<<<< + * return handle + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 120, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":121 + * status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) + * check_status(status) + * return handle # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((intptr_t)__pyx_v_handle); + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":97 + * + * + * cpdef intptr_t create(uint32_t num_options, options) except -1: # <<<<<<<<<<<<<< + * """nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_2create, "create(uint32_t num_options, options) -> intptr_t\n\nnvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``.\n\nArgs:\n num_options (uint32_t): Number of options passed.\n options (object): Array of size ``num_options`` of option strings. It can be:\n\n - an :class:`int` as the pointer address to the nested sequence, or\n - a Python sequence of :class:`int`\\s, each of which is a pointer address\n to a valid sequence of 'char', or\n - a nested Python sequence of ``str``.\n\n\nReturns:\n intptr_t: Address of nvJitLink handle.\n\n.. seealso:: `nvJitLinkCreate`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_3create = {"create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_3create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_2create}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_3create(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + uint32_t __pyx_v_num_options; + PyObject *__pyx_v_options = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_num_options,&__pyx_mstate_global->__pyx_n_u_options,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 97, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "create", 0) < (0)) __PYX_ERR(0, 97, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, i); __PYX_ERR(0, 97, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 97, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 97, __pyx_L3_error) + } + __pyx_v_num_options = __Pyx_PyLong_As_uint32_t(values[0]); if (unlikely((__pyx_v_num_options == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_v_options = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("create", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_2create(__pyx_self, __pyx_v_num_options, __pyx_v_options); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_2create(CYTHON_UNUSED PyObject *__pyx_self, uint32_t __pyx_v_num_options, PyObject *__pyx_v_options) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + intptr_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_create(__pyx_v_num_options, __pyx_v_options, 1); if (unlikely(__pyx_t_1 == ((intptr_t)-1))) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.create", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":124 + * + * + * cpdef add_data(intptr_t handle, int input_type, data, size_t size, name): # <<<<<<<<<<<<<< + * """nvJitLinkAddData adds data image to the link. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_5add_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_add_data(intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_data, size_t __pyx_v_size, PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__data_; + PyObject *__pyx_v__temp_name_ = 0; + char *__pyx_v__name_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + char *__pyx_t_9; + nvJitLinkResult __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_data", 0); + + /* "cuda/bindings/nvjitlink.pyx":136 + * .. seealso:: `nvJitLinkAddData` + * """ + * cdef void* _data_ = get_buffer_pointer(data, size, readonly=True) # <<<<<<<<<<<<<< + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_True; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_data, __pyx_v_size, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_v__data_ = __pyx_t_1; + + /* "cuda/bindings/nvjitlink.pyx":137 + * """ + * cdef void* _data_ = get_buffer_pointer(data, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + __pyx_t_3 = PyUnicode_Check(__pyx_v_name); + __pyx_t_4 = (!__pyx_t_3); + if (unlikely(__pyx_t_4)) { + + /* "cuda/bindings/nvjitlink.pyx":138 + * cdef void* _data_ = get_buffer_pointer(data, size, readonly=True) + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") # <<<<<<<<<<<<<< + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_7 = __pyx_builtin_TypeError; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_name_must_be_a_Python_str}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 138, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":137 + * """ + * cdef void* _data_ = get_buffer_pointer(data, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + } + + /* "cuda/bindings/nvjitlink.pyx":139 + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() # <<<<<<<<<<<<<< + * cdef char* _name_ = _temp_name_ + * with nogil: +*/ + if (unlikely(__pyx_v_name == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 139, __pyx_L1_error) + } + __pyx_t_5 = PyUnicode_AsEncodedString(((PyObject*)__pyx_v_name), NULL, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__temp_name_ = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":140 + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) +*/ + __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v__temp_name_); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_v__name_ = __pyx_t_9; + + /* "cuda/bindings/nvjitlink.pyx":141 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":142 + * cdef char* _name_ = _temp_name_ + * with nogil: + * status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddData(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((__pyx_t_4cuda_8bindings_9nvjitlink__InputType)__pyx_v_input_type), ((void const *)__pyx_v__data_), __pyx_v_size, ((char const *)__pyx_v__name_)); if (unlikely(__pyx_t_10 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 142, __pyx_L5_error) + __pyx_v_status = __pyx_t_10; + } + + /* "cuda/bindings/nvjitlink.pyx":141 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":143 + * with nogil: + * status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_11 == ((int)1))) __PYX_ERR(0, 143, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":124 + * + * + * cpdef add_data(intptr_t handle, int input_type, data, size_t size, name): # <<<<<<<<<<<<<< + * """nvJitLinkAddData adds data image to the link. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__temp_name_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_5add_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_4add_data, "add_data(intptr_t handle, int input_type, data, size_t size, name)\n\nnvJitLinkAddData adds data image to the link.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n input_type (InputType): kind of input.\n data (bytes): pointer to data image in memory.\n size (size_t): size of the data.\n name (str): name of input object.\n\n.. seealso:: `nvJitLinkAddData`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_5add_data = {"add_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_5add_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_4add_data}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_5add_data(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + int __pyx_v_input_type; + PyObject *__pyx_v_data = 0; + size_t __pyx_v_size; + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_data (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_input_type,&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 124, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_data", 0) < (0)) __PYX_ERR(0, 124, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_data", 1, 5, 5, i); __PYX_ERR(0, 124, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 124, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 124, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 124, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 124, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 124, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_v_input_type = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_input_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_v_data = values[2]; + __pyx_v_size = __Pyx_PyLong_As_size_t(values[3]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_v_name = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_data", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 124, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_4add_data(__pyx_self, __pyx_v_handle, __pyx_v_input_type, __pyx_v_data, __pyx_v_size, __pyx_v_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_4add_data(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_data, size_t __pyx_v_size, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_data", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_add_data(__pyx_v_handle, __pyx_v_input_type, __pyx_v_data, __pyx_v_size, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_data", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":146 + * + * + * cpdef add_file(intptr_t handle, int input_type, file_name): # <<<<<<<<<<<<<< + * """nvJitLinkAddFile reads data from file and links it in. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_7add_file(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_add_file(intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_file_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v__temp_file_name_ = 0; + char *__pyx_v__file_name_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + char *__pyx_t_7; + nvJitLinkResult __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_file", 0); + + /* "cuda/bindings/nvjitlink.pyx":156 + * .. seealso:: `nvJitLinkAddFile` + * """ + * if not isinstance(file_name, str): # <<<<<<<<<<<<<< + * raise TypeError("file_name must be a Python str") + * cdef bytes _temp_file_name_ = (file_name).encode() +*/ + __pyx_t_1 = PyUnicode_Check(__pyx_v_file_name); + __pyx_t_2 = (!__pyx_t_1); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/nvjitlink.pyx":157 + * """ + * if not isinstance(file_name, str): + * raise TypeError("file_name must be a Python str") # <<<<<<<<<<<<<< + * cdef bytes _temp_file_name_ = (file_name).encode() + * cdef char* _file_name_ = _temp_file_name_ +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_5 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_file_name_must_be_a_Python_str}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 157, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":156 + * .. seealso:: `nvJitLinkAddFile` + * """ + * if not isinstance(file_name, str): # <<<<<<<<<<<<<< + * raise TypeError("file_name must be a Python str") + * cdef bytes _temp_file_name_ = (file_name).encode() +*/ + } + + /* "cuda/bindings/nvjitlink.pyx":158 + * if not isinstance(file_name, str): + * raise TypeError("file_name must be a Python str") + * cdef bytes _temp_file_name_ = (file_name).encode() # <<<<<<<<<<<<<< + * cdef char* _file_name_ = _temp_file_name_ + * with nogil: +*/ + if (unlikely(__pyx_v_file_name == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 158, __pyx_L1_error) + } + __pyx_t_3 = PyUnicode_AsEncodedString(((PyObject*)__pyx_v_file_name), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__temp_file_name_ = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":159 + * raise TypeError("file_name must be a Python str") + * cdef bytes _temp_file_name_ = (file_name).encode() + * cdef char* _file_name_ = _temp_file_name_ # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) +*/ + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v__temp_file_name_); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_v__file_name_ = __pyx_t_7; + + /* "cuda/bindings/nvjitlink.pyx":160 + * cdef bytes _temp_file_name_ = (file_name).encode() + * cdef char* _file_name_ = _temp_file_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":161 + * cdef char* _file_name_ = _temp_file_name_ + * with nogil: + * status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_8 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddFile(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((__pyx_t_4cuda_8bindings_9nvjitlink__InputType)__pyx_v_input_type), ((char const *)__pyx_v__file_name_)); if (unlikely(__pyx_t_8 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 161, __pyx_L5_error) + __pyx_v_status = __pyx_t_8; + } + + /* "cuda/bindings/nvjitlink.pyx":160 + * cdef bytes _temp_file_name_ = (file_name).encode() + * cdef char* _file_name_ = _temp_file_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":162 + * with nogil: + * status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_9 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_9 == ((int)1))) __PYX_ERR(0, 162, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":146 + * + * + * cpdef add_file(intptr_t handle, int input_type, file_name): # <<<<<<<<<<<<<< + * """nvJitLinkAddFile reads data from file and links it in. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_file", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__temp_file_name_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_7add_file(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_6add_file, "add_file(intptr_t handle, int input_type, file_name)\n\nnvJitLinkAddFile reads data from file and links it in.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n input_type (InputType): kind of input.\n file_name (str): name of file.\n\n.. seealso:: `nvJitLinkAddFile`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_7add_file = {"add_file", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_7add_file, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_6add_file}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_7add_file(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + int __pyx_v_input_type; + PyObject *__pyx_v_file_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_file (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_input_type,&__pyx_mstate_global->__pyx_n_u_file_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 146, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_file", 0) < (0)) __PYX_ERR(0, 146, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_file", 1, 3, 3, i); __PYX_ERR(0, 146, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_v_input_type = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_input_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_v_file_name = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_file", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_file", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_6add_file(__pyx_self, __pyx_v_handle, __pyx_v_input_type, __pyx_v_file_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_6add_file(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, int __pyx_v_input_type, PyObject *__pyx_v_file_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_file", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_add_file(__pyx_v_handle, __pyx_v_input_type, __pyx_v_file_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.add_file", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":165 + * + * + * cpdef complete(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkComplete does the actual link. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_9complete(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_complete(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("complete", 0); + + /* "cuda/bindings/nvjitlink.pyx":173 + * .. seealso:: `nvJitLinkComplete` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkComplete(handle) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":174 + * """ + * with nogil: + * status = nvJitLinkComplete(handle) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkComplete(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 174, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":173 + * .. seealso:: `nvJitLinkComplete` + * """ + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkComplete(handle) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":175 + * with nogil: + * status = nvJitLinkComplete(handle) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 175, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":165 + * + * + * cpdef complete(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkComplete does the actual link. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.complete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_9complete(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_8complete, "complete(intptr_t handle)\n\nnvJitLinkComplete does the actual link.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\n.. seealso:: `nvJitLinkComplete`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_9complete = {"complete", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_9complete, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_8complete}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_9complete(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("complete (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 165, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "complete", 0) < (0)) __PYX_ERR(0, 165, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("complete", 1, 1, 1, i); __PYX_ERR(0, 165, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("complete", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.complete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_8complete(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_8complete(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("complete", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_complete(__pyx_v_handle, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.complete", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":178 + * + * + * cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubinSize gets the size of the linked cubin. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin_size(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_size; + nvJitLinkResult __pyx_v_status; + size_t __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvjitlink.pyx":190 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedCubinSize(handle, &size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":191 + * cdef size_t size + * with nogil: + * status = nvJitLinkGetLinkedCubinSize(handle, &size) # <<<<<<<<<<<<<< + * check_status(status) + * return size +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubinSize(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 191, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":190 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedCubinSize(handle, &size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":192 + * with nogil: + * status = nvJitLinkGetLinkedCubinSize(handle, &size) + * check_status(status) # <<<<<<<<<<<<<< + * return size + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 192, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":193 + * status = nvJitLinkGetLinkedCubinSize(handle, &size) + * check_status(status) + * return size # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":178 + * + * + * cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubinSize gets the size of the linked cubin. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_10get_linked_cubin_size, "get_linked_cubin_size(intptr_t handle) -> size_t\n\nnvJitLinkGetLinkedCubinSize gets the size of the linked cubin.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\nReturns:\n size_t: Size of the linked cubin.\n\n.. seealso:: `nvJitLinkGetLinkedCubinSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size = {"get_linked_cubin_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_10get_linked_cubin_size}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_linked_cubin_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 178, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 178, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_linked_cubin_size", 0) < (0)) __PYX_ERR(0, 178, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_linked_cubin_size", 1, 1, 1, i); __PYX_ERR(0, 178, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 178, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_linked_cubin_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 178, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_10get_linked_cubin_size(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_10get_linked_cubin_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_cubin_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin_size(__pyx_v_handle, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":196 + * + * + * cpdef get_linked_cubin(intptr_t handle, cubin): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubin gets the linked cubin. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_13get_linked_cubin(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin(intptr_t __pyx_v_handle, PyObject *__pyx_v_cubin, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__cubin_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvJitLinkResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_cubin", 0); + + /* "cuda/bindings/nvjitlink.pyx":205 + * .. seealso:: `nvJitLinkGetLinkedCubin` + * """ + * cdef void* _cubin_ = get_buffer_pointer(cubin, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkGetLinkedCubin(handle, _cubin_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_cubin, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_v__cubin_ = __pyx_t_1; + + /* "cuda/bindings/nvjitlink.pyx":206 + * """ + * cdef void* _cubin_ = get_buffer_pointer(cubin, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedCubin(handle, _cubin_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":207 + * cdef void* _cubin_ = get_buffer_pointer(cubin, -1, readonly=False) + * with nogil: + * status = nvJitLinkGetLinkedCubin(handle, _cubin_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubin(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((void *)__pyx_v__cubin_)); if (unlikely(__pyx_t_3 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 207, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvjitlink.pyx":206 + * """ + * cdef void* _cubin_ = get_buffer_pointer(cubin, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedCubin(handle, _cubin_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":208 + * with nogil: + * status = nvJitLinkGetLinkedCubin(handle, _cubin_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 208, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":196 + * + * + * cpdef get_linked_cubin(intptr_t handle, cubin): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubin gets the linked cubin. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_13get_linked_cubin(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_12get_linked_cubin, "get_linked_cubin(intptr_t handle, cubin)\n\nnvJitLinkGetLinkedCubin gets the linked cubin.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n cubin (bytes): The linked cubin.\n\n.. seealso:: `nvJitLinkGetLinkedCubin`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_13get_linked_cubin = {"get_linked_cubin", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_13get_linked_cubin, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_12get_linked_cubin}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_13get_linked_cubin(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + PyObject *__pyx_v_cubin = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_linked_cubin (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_cubin,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 196, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 196, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 196, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_linked_cubin", 0) < (0)) __PYX_ERR(0, 196, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_linked_cubin", 1, 2, 2, i); __PYX_ERR(0, 196, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 196, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 196, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error) + __pyx_v_cubin = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_linked_cubin", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 196, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_12get_linked_cubin(__pyx_self, __pyx_v_handle, __pyx_v_cubin); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_12get_linked_cubin(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_cubin) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_cubin", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin(__pyx_v_handle, __pyx_v_cubin, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_cubin", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":211 + * + * + * cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtxSize gets the size of the linked ptx. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx_size(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_size; + nvJitLinkResult __pyx_v_status; + size_t __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvjitlink.pyx":223 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedPtxSize(handle, &size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":224 + * cdef size_t size + * with nogil: + * status = nvJitLinkGetLinkedPtxSize(handle, &size) # <<<<<<<<<<<<<< + * check_status(status) + * return size +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtxSize(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 224, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":223 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedPtxSize(handle, &size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":225 + * with nogil: + * status = nvJitLinkGetLinkedPtxSize(handle, &size) + * check_status(status) # <<<<<<<<<<<<<< + * return size + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 225, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":226 + * status = nvJitLinkGetLinkedPtxSize(handle, &size) + * check_status(status) + * return size # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":211 + * + * + * cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtxSize gets the size of the linked ptx. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_14get_linked_ptx_size, "get_linked_ptx_size(intptr_t handle) -> size_t\n\nnvJitLinkGetLinkedPtxSize gets the size of the linked ptx.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\nReturns:\n size_t: Size of the linked PTX.\n\n.. seealso:: `nvJitLinkGetLinkedPtxSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size = {"get_linked_ptx_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_14get_linked_ptx_size}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_linked_ptx_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_linked_ptx_size", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_linked_ptx_size", 1, 1, 1, i); __PYX_ERR(0, 211, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_linked_ptx_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_14get_linked_ptx_size(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_14get_linked_ptx_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_ptx_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx_size(__pyx_v_handle, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":229 + * + * + * cpdef get_linked_ptx(intptr_t handle, ptx): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtx gets the linked ptx. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_17get_linked_ptx(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx(intptr_t __pyx_v_handle, PyObject *__pyx_v_ptx, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__ptx_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvJitLinkResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_ptx", 0); + + /* "cuda/bindings/nvjitlink.pyx":238 + * .. seealso:: `nvJitLinkGetLinkedPtx` + * """ + * cdef void* _ptx_ = get_buffer_pointer(ptx, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkGetLinkedPtx(handle, _ptx_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_ptx, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_v__ptx_ = __pyx_t_1; + + /* "cuda/bindings/nvjitlink.pyx":239 + * """ + * cdef void* _ptx_ = get_buffer_pointer(ptx, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedPtx(handle, _ptx_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":240 + * cdef void* _ptx_ = get_buffer_pointer(ptx, -1, readonly=False) + * with nogil: + * status = nvJitLinkGetLinkedPtx(handle, _ptx_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtx(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((char *)__pyx_v__ptx_)); if (unlikely(__pyx_t_3 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 240, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvjitlink.pyx":239 + * """ + * cdef void* _ptx_ = get_buffer_pointer(ptx, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetLinkedPtx(handle, _ptx_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":241 + * with nogil: + * status = nvJitLinkGetLinkedPtx(handle, _ptx_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 241, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":229 + * + * + * cpdef get_linked_ptx(intptr_t handle, ptx): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtx gets the linked ptx. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_17get_linked_ptx(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_16get_linked_ptx, "get_linked_ptx(intptr_t handle, ptx)\n\nnvJitLinkGetLinkedPtx gets the linked ptx.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n ptx (bytes): The linked PTX.\n\n.. seealso:: `nvJitLinkGetLinkedPtx`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_17get_linked_ptx = {"get_linked_ptx", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_17get_linked_ptx, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_16get_linked_ptx}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_17get_linked_ptx(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + PyObject *__pyx_v_ptx = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_linked_ptx (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_ptx,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 229, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 229, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_linked_ptx", 0) < (0)) __PYX_ERR(0, 229, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_linked_ptx", 1, 2, 2, i); __PYX_ERR(0, 229, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 229, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L3_error) + __pyx_v_ptx = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_linked_ptx", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 229, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_16get_linked_ptx(__pyx_self, __pyx_v_handle, __pyx_v_ptx); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_16get_linked_ptx(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_ptx) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_linked_ptx", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx(__pyx_v_handle, __pyx_v_ptx, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_linked_ptx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":244 + * + * + * cpdef size_t get_error_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLogSize gets the size of the error log. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_19get_error_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_error_log_size(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_size; + nvJitLinkResult __pyx_v_status; + size_t __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvjitlink.pyx":256 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetErrorLogSize(handle, &size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":257 + * cdef size_t size + * with nogil: + * status = nvJitLinkGetErrorLogSize(handle, &size) # <<<<<<<<<<<<<< + * check_status(status) + * return size +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLogSize(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 257, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":256 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetErrorLogSize(handle, &size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":258 + * with nogil: + * status = nvJitLinkGetErrorLogSize(handle, &size) + * check_status(status) # <<<<<<<<<<<<<< + * return size + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 258, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":259 + * status = nvJitLinkGetErrorLogSize(handle, &size) + * check_status(status) + * return size # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":244 + * + * + * cpdef size_t get_error_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLogSize gets the size of the error log. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_19get_error_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_18get_error_log_size, "get_error_log_size(intptr_t handle) -> size_t\n\nnvJitLinkGetErrorLogSize gets the size of the error log.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\nReturns:\n size_t: Size of the error log.\n\n.. seealso:: `nvJitLinkGetErrorLogSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_19get_error_log_size = {"get_error_log_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_19get_error_log_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_18get_error_log_size}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_19get_error_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_error_log_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 244, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 244, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_log_size", 0) < (0)) __PYX_ERR(0, 244, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_error_log_size", 1, 1, 1, i); __PYX_ERR(0, 244, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 244, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_error_log_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 244, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_18get_error_log_size(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_18get_error_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_error_log_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_error_log_size(__pyx_v_handle, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":262 + * + * + * cpdef get_error_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLog puts any error messages in the log. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_21get_error_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_error_log(intptr_t __pyx_v_handle, PyObject *__pyx_v_log, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__log_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvJitLinkResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_error_log", 0); + + /* "cuda/bindings/nvjitlink.pyx":271 + * .. seealso:: `nvJitLinkGetErrorLog` + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkGetErrorLog(handle, _log_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_log, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_v__log_ = __pyx_t_1; + + /* "cuda/bindings/nvjitlink.pyx":272 + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetErrorLog(handle, _log_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":273 + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: + * status = nvJitLinkGetErrorLog(handle, _log_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLog(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((char *)__pyx_v__log_)); if (unlikely(__pyx_t_3 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 273, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvjitlink.pyx":272 + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetErrorLog(handle, _log_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":274 + * with nogil: + * status = nvJitLinkGetErrorLog(handle, _log_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 274, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":262 + * + * + * cpdef get_error_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLog puts any error messages in the log. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_21get_error_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_20get_error_log, "get_error_log(intptr_t handle, log)\n\nnvJitLinkGetErrorLog puts any error messages in the log.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n log (bytes): The error log.\n\n.. seealso:: `nvJitLinkGetErrorLog`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_21get_error_log = {"get_error_log", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_21get_error_log, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_20get_error_log}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_21get_error_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + PyObject *__pyx_v_log = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_error_log (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_log,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 262, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 262, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_log", 0) < (0)) __PYX_ERR(0, 262, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_error_log", 1, 2, 2, i); __PYX_ERR(0, 262, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 262, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 262, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L3_error) + __pyx_v_log = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_error_log", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 262, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_20get_error_log(__pyx_self, __pyx_v_handle, __pyx_v_log); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_20get_error_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_log) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_error_log", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_error_log(__pyx_v_handle, __pyx_v_log, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_error_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":277 + * + * + * cpdef size_t get_info_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLogSize gets the size of the info log. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_23get_info_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_9nvjitlink_get_info_log_size(intptr_t __pyx_v_handle, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_size; + nvJitLinkResult __pyx_v_status; + size_t __pyx_r; + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvjitlink.pyx":289 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetInfoLogSize(handle, &size) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":290 + * cdef size_t size + * with nogil: + * status = nvJitLinkGetInfoLogSize(handle, &size) # <<<<<<<<<<<<<< + * check_status(status) + * return size +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLogSize(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 290, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":289 + * """ + * cdef size_t size + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetInfoLogSize(handle, &size) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":291 + * with nogil: + * status = nvJitLinkGetInfoLogSize(handle, &size) + * check_status(status) # <<<<<<<<<<<<<< + * return size + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 291, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":292 + * status = nvJitLinkGetInfoLogSize(handle, &size) + * check_status(status) + * return size # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_size; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":277 + * + * + * cpdef size_t get_info_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLogSize gets the size of the info log. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_23get_info_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_22get_info_log_size, "get_info_log_size(intptr_t handle) -> size_t\n\nnvJitLinkGetInfoLogSize gets the size of the info log.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n\nReturns:\n size_t: Size of the info log.\n\n.. seealso:: `nvJitLinkGetInfoLogSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_23get_info_log_size = {"get_info_log_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_23get_info_log_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_22get_info_log_size}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_23get_info_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_info_log_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 277, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 277, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_info_log_size", 0) < (0)) __PYX_ERR(0, 277, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_info_log_size", 1, 1, 1, i); __PYX_ERR(0, 277, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 277, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_info_log_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 277, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_22get_info_log_size(__pyx_self, __pyx_v_handle); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_22get_info_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_info_log_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_info_log_size(__pyx_v_handle, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":295 + * + * + * cpdef get_info_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLog puts any info messages in the log. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_25get_info_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_get_info_log(intptr_t __pyx_v_handle, PyObject *__pyx_v_log, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__log_; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvJitLinkResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_info_log", 0); + + /* "cuda/bindings/nvjitlink.pyx":304 + * .. seealso:: `nvJitLinkGetInfoLog` + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvJitLinkGetInfoLog(handle, _log_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_log, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_v__log_ = __pyx_t_1; + + /* "cuda/bindings/nvjitlink.pyx":305 + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetInfoLog(handle, _log_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":306 + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: + * status = nvJitLinkGetInfoLog(handle, _log_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLog(((__pyx_t_4cuda_8bindings_9nvjitlink_Handle)__pyx_v_handle), ((char *)__pyx_v__log_)); if (unlikely(__pyx_t_3 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 306, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvjitlink.pyx":305 + * """ + * cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkGetInfoLog(handle, _log_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":307 + * with nogil: + * status = nvJitLinkGetInfoLog(handle, _log_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 307, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":295 + * + * + * cpdef get_info_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLog puts any info messages in the log. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_25get_info_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_24get_info_log, "get_info_log(intptr_t handle, log)\n\nnvJitLinkGetInfoLog puts any info messages in the log.\n\nArgs:\n handle (intptr_t): nvJitLink handle.\n log (bytes): The info log.\n\n.. seealso:: `nvJitLinkGetInfoLog`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_25get_info_log = {"get_info_log", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_9nvjitlink_25get_info_log, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_9nvjitlink_24get_info_log}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_25get_info_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_handle; + PyObject *__pyx_v_log = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_info_log (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_handle,&__pyx_mstate_global->__pyx_n_u_log,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 295, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 295, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 295, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_info_log", 0) < (0)) __PYX_ERR(0, 295, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_info_log", 1, 2, 2, i); __PYX_ERR(0, 295, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 295, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 295, __pyx_L3_error) + } + __pyx_v_handle = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_handle == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L3_error) + __pyx_v_log = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_info_log", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 295, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_24get_info_log(__pyx_self, __pyx_v_handle, __pyx_v_log); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_24get_info_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_handle, PyObject *__pyx_v_log) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_info_log", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_get_info_log(__pyx_v_handle, __pyx_v_log, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.get_info_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvjitlink.pyx":310 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """nvJitLinkVersion returns the current version of nvJitLink. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_27version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_9nvjitlink_version(CYTHON_UNUSED int __pyx_skip_dispatch) { + unsigned int __pyx_v_major; + unsigned int __pyx_v_minor; + nvJitLinkResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvJitLinkResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("version", 0); + + /* "cuda/bindings/nvjitlink.pyx":323 + * cdef unsigned int major + * cdef unsigned int minor + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkVersion(&major, &minor) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvjitlink.pyx":324 + * cdef unsigned int minor + * with nogil: + * status = nvJitLinkVersion(&major, &minor) # <<<<<<<<<<<<<< + * check_status(status) + * return (major, minor) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkVersion((&__pyx_v_major), (&__pyx_v_minor)); if (unlikely(__pyx_t_1 == ((nvJitLinkResult)_NVJITLINKRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 324, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvjitlink.pyx":323 + * cdef unsigned int major + * cdef unsigned int minor + * with nogil: # <<<<<<<<<<<<<< + * status = nvJitLinkVersion(&major, &minor) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvjitlink.pyx":325 + * with nogil: + * status = nvJitLinkVersion(&major, &minor) + * check_status(status) # <<<<<<<<<<<<<< + * return (major, minor) +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_9nvjitlink_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 325, __pyx_L1_error) + + /* "cuda/bindings/nvjitlink.pyx":326 + * status = nvJitLinkVersion(&major, &minor) + * check_status(status) + * return (major, minor) # <<<<<<<<<<<<<< +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyLong_From_unsigned_int(__pyx_v_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_unsigned_int(__pyx_v_minor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 326, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 326, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvjitlink.pyx":310 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """nvJitLinkVersion returns the current version of nvJitLink. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_27version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_9nvjitlink_26version, "version() -> tuple\n\nnvJitLinkVersion returns the current version of nvJitLink.\n\nReturns:\n A 2-tuple containing:\n\n - unsigned int: The major version.\n - unsigned int: The minor version.\n\n.. seealso:: `nvJitLinkVersion`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_9nvjitlink_27version = {"version", (PyCFunction)__pyx_pw_4cuda_8bindings_9nvjitlink_27version, METH_NOARGS, __pyx_doc_4cuda_8bindings_9nvjitlink_26version}; +static PyObject *__pyx_pw_4cuda_8bindings_9nvjitlink_27version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("version (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_9nvjitlink_26version(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_9nvjitlink_26version(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("version", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_9nvjitlink_version(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvjitlink.version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("create", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_create, "intptr_t (uint32_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("add_data", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_add_data, "PyObject *(intptr_t, int, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("add_file", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_add_file, "PyObject *(intptr_t, int, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("complete", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_complete, "PyObject *(intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_linked_cubin_size", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_linked_cubin", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_cubin, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_linked_ptx_size", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_linked_ptx", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_linked_ptx, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_error_log_size", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_error_log_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_error_log", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_error_log, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_info_log_size", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_info_log_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_info_log", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_get_info_log, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("version", (void (*)(void))__pyx_f_4cuda_8bindings_9nvjitlink_version, "PyObject *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings.cynvjitlink"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkCreate", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkCreate, "nvJitLinkResult (nvJitLinkHandle *, uint32_t, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkDestroy", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkDestroy, "nvJitLinkResult (nvJitLinkHandle *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkAddData", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddData, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, void const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkAddFile", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkAddFile, "nvJitLinkResult (nvJitLinkHandle, nvJitLinkInputType, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkComplete", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkComplete, "nvJitLinkResult (nvJitLinkHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetLinkedCubinSize", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubinSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetLinkedCubin", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedCubin, "nvJitLinkResult (nvJitLinkHandle, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetLinkedPtxSize", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtxSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetLinkedPtx", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetLinkedPtx, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetErrorLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetErrorLog", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetErrorLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetInfoLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLogSize, "nvJitLinkResult (nvJitLinkHandle, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkGetInfoLog", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkGetInfoLog, "nvJitLinkResult (nvJitLinkHandle, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvJitLinkVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_11cynvjitlink_nvJitLinkVersion, "nvJitLinkResult (unsigned int *, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "get_buffer_pointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer, "void *(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_0get_resource_ptr", (void (**)(void))&__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_1get_resource_ptr", (void (**)(void))&__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_2get_resource_ptr", (void (**)(void))&__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_3get_resource_ptr", (void (**)(void))&__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_4get_resource_ptr", (void (**)(void))&__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_5get_resource_ptr", (void (**)(void))&__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptr, "int (nullable_unique_ptr > &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_0get_resource_ptrs", (void (**)(void))&__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_resource_ptrs, "int (nullable_unique_ptr > &, PyObject *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_0get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_1get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_2get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_3get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_4get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_5get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_nvjitlink(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_nvjitlink}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "nvjitlink", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_nvjitlink(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_nvjitlink(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_nvjitlink(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'nvjitlink' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "nvjitlink" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_nvjitlink", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__nvjitlink) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.nvjitlink")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.nvjitlink", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/nvjitlink.pyx":12 + * get_buffer_pointer, get_resource_ptrs) + * + * from enum import IntEnum as _IntEnum # <<<<<<<<<<<<<< + * from libcpp.vector cimport vector + * +*/ + __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IntEnum_2, __pyx_t_2) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":20 + * ############################################################################### + * + * class Result(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvJitLinkResult`.""" + * SUCCESS = NVJITLINK_SUCCESS +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_Result, __pyx_mstate_global->__pyx_n_u_Result, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_kp_u_See_nvJitLinkResult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 20, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":22 + * class Result(_IntEnum): + * """See `nvJitLinkResult`.""" + * SUCCESS = NVJITLINK_SUCCESS # <<<<<<<<<<<<<< + * ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION + * ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_SUCCESS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SUCCESS, __pyx_t_2) < (0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":23 + * """See `nvJitLinkResult`.""" + * SUCCESS = NVJITLINK_SUCCESS + * ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION # <<<<<<<<<<<<<< + * ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH + * ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_UNRECOGNIZED_OPTION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_UNRECOGNIZED_OPTION, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":24 + * SUCCESS = NVJITLINK_SUCCESS + * ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION + * ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH # <<<<<<<<<<<<<< + * ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT + * ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_MISSING_ARCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_MISSING_ARCH, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":25 + * ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION + * ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH + * ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT # <<<<<<<<<<<<<< + * ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE + * ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_INVALID_INPUT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_INPUT, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":26 + * ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH + * ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT + * ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE # <<<<<<<<<<<<<< + * ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE + * ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_PTX_COMPILE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_PTX_COMPILE, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":27 + * ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT + * ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE + * ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE # <<<<<<<<<<<<<< + * ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL + * ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_NVVM_COMPILE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_NVVM_COMPILE, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":28 + * ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE + * ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE + * ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL # <<<<<<<<<<<<<< + * ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL + * ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_INTERNAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INTERNAL, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":29 + * ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE + * ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL + * ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL # <<<<<<<<<<<<<< + * ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT + * ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_THREADPOOL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_THREADPOOL, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":30 + * ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL + * ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL + * ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT # <<<<<<<<<<<<<< + * ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE + * ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_UNRECOGNIZED_INPUT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_UNRECOGNIZED_INPUT, __pyx_t_2) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":31 + * ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL + * ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT + * ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE # <<<<<<<<<<<<<< + * ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT + * ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_FINALIZE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_FINALIZE, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":32 + * ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT + * ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE + * ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT # <<<<<<<<<<<<<< + * ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS + * ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_NULL_INPUT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_NULL_INPUT, __pyx_t_2) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":33 + * ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE + * ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT + * ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS # <<<<<<<<<<<<<< + * ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE + * ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INCOMPATIBLE_OPTIONS, __pyx_t_2) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":34 + * ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT + * ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS + * ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE # <<<<<<<<<<<<<< + * ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH + * ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_INCORRECT_INPUT_TYPE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INCORRECT_INPUT_TYPE, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":35 + * ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS + * ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE + * ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH # <<<<<<<<<<<<<< + * ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY + * ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_ARCH_MISMATCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_ARCH_MISMATCH, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":36 + * ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE + * ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH + * ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY # <<<<<<<<<<<<<< + * ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN + * ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_OUTDATED_LIBRARY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_OUTDATED_LIBRARY, __pyx_t_2) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":37 + * ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH + * ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY + * ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN # <<<<<<<<<<<<<< + * ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH + * ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_MISSING_FATBIN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_MISSING_FATBIN, __pyx_t_2) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":38 + * ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY + * ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN + * ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH # <<<<<<<<<<<<<< + * ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH + * ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_UNRECOGNIZED_ARCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_UNRECOGNIZED_ARCH, __pyx_t_2) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":39 + * ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN + * ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH + * ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH # <<<<<<<<<<<<<< + * ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED + * +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_UNSUPPORTED_ARCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_UNSUPPORTED_ARCH, __pyx_t_2) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":40 + * ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH + * ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH + * ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED # <<<<<<<<<<<<<< + * + * class InputType(_IntEnum): +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvJitLinkResult(NVJITLINK_ERROR_LTO_NOT_ENABLED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_LTO_NOT_ENABLED, __pyx_t_2) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvjitlink.pyx":20 + * ############################################################################### + * + * class Result(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvJitLinkResult`.""" + * SUCCESS = NVJITLINK_SUCCESS +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Result, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Result, __pyx_t_2) < (0)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":42 + * ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED + * + * class InputType(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvJitLinkInputType`.""" + * NONE = NVJITLINK_INPUT_NONE +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_InputType, __pyx_mstate_global->__pyx_n_u_InputType, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_kp_u_See_nvJitLinkInputType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_3 != __pyx_t_4) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 42, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":44 + * class InputType(_IntEnum): + * """See `nvJitLinkInputType`.""" + * NONE = NVJITLINK_INPUT_NONE # <<<<<<<<<<<<<< + * CUBIN = NVJITLINK_INPUT_CUBIN + * PTX = NVJITLINK_INPUT_PTX +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NONE, __pyx_t_4) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":45 + * """See `nvJitLinkInputType`.""" + * NONE = NVJITLINK_INPUT_NONE + * CUBIN = NVJITLINK_INPUT_CUBIN # <<<<<<<<<<<<<< + * PTX = NVJITLINK_INPUT_PTX + * LTOIR = NVJITLINK_INPUT_LTOIR +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_CUBIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CUBIN, __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":46 + * NONE = NVJITLINK_INPUT_NONE + * CUBIN = NVJITLINK_INPUT_CUBIN + * PTX = NVJITLINK_INPUT_PTX # <<<<<<<<<<<<<< + * LTOIR = NVJITLINK_INPUT_LTOIR + * FATBIN = NVJITLINK_INPUT_FATBIN +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_PTX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PTX, __pyx_t_4) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":47 + * CUBIN = NVJITLINK_INPUT_CUBIN + * PTX = NVJITLINK_INPUT_PTX + * LTOIR = NVJITLINK_INPUT_LTOIR # <<<<<<<<<<<<<< + * FATBIN = NVJITLINK_INPUT_FATBIN + * OBJECT = NVJITLINK_INPUT_OBJECT +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_LTOIR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LTOIR, __pyx_t_4) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":48 + * PTX = NVJITLINK_INPUT_PTX + * LTOIR = NVJITLINK_INPUT_LTOIR + * FATBIN = NVJITLINK_INPUT_FATBIN # <<<<<<<<<<<<<< + * OBJECT = NVJITLINK_INPUT_OBJECT + * LIBRARY = NVJITLINK_INPUT_LIBRARY +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_FATBIN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_FATBIN, __pyx_t_4) < (0)) __PYX_ERR(0, 48, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":49 + * LTOIR = NVJITLINK_INPUT_LTOIR + * FATBIN = NVJITLINK_INPUT_FATBIN + * OBJECT = NVJITLINK_INPUT_OBJECT # <<<<<<<<<<<<<< + * LIBRARY = NVJITLINK_INPUT_LIBRARY + * INDEX = NVJITLINK_INPUT_INDEX +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OBJECT, __pyx_t_4) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":50 + * FATBIN = NVJITLINK_INPUT_FATBIN + * OBJECT = NVJITLINK_INPUT_OBJECT + * LIBRARY = NVJITLINK_INPUT_LIBRARY # <<<<<<<<<<<<<< + * INDEX = NVJITLINK_INPUT_INDEX + * ANY = NVJITLINK_INPUT_ANY +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_LIBRARY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LIBRARY, __pyx_t_4) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":51 + * OBJECT = NVJITLINK_INPUT_OBJECT + * LIBRARY = NVJITLINK_INPUT_LIBRARY + * INDEX = NVJITLINK_INPUT_INDEX # <<<<<<<<<<<<<< + * ANY = NVJITLINK_INPUT_ANY + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_INDEX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_INDEX, __pyx_t_4) < (0)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":52 + * LIBRARY = NVJITLINK_INPUT_LIBRARY + * INDEX = NVJITLINK_INPUT_INDEX + * ANY = NVJITLINK_INPUT_ANY # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __Pyx_PyLong_From_nvJitLinkInputType(NVJITLINK_INPUT_ANY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ANY, __pyx_t_4) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvjitlink.pyx":42 + * ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED + * + * class InputType(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvJitLinkInputType`.""" + * NONE = NVJITLINK_INPUT_NONE +*/ + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_InputType, __pyx_t_3, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InputType, __pyx_t_4) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":59 + * ############################################################################### + * + * class nvJitLinkError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status): +*/ + __pyx_t_3 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_5, __pyx_mstate_global->__pyx_n_u_nvJitLinkError, __pyx_mstate_global->__pyx_n_u_nvJitLinkError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_5 != __pyx_t_3) { + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 59, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":61 + * class nvJitLinkError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_14nvJitLinkError_1__init__, 0, __pyx_mstate_global->__pyx_n_u_nvJitLinkError___init, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < (0)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":67 + * super(nvJitLinkError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_14nvJitLinkError_3__reduce__, 0, __pyx_mstate_global->__pyx_n_u_nvJitLinkError___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvjitlink.pyx":59 + * ############################################################################### + * + * class nvJitLinkError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status): +*/ + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nvJitLinkError, __pyx_t_5, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvJitLinkError, __pyx_t_3) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":83 + * ############################################################################### + * + * cpdef destroy(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkDestroy frees the memory associated with the given handle. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_1destroy, 0, __pyx_mstate_global->__pyx_n_u_destroy, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_destroy, __pyx_t_5) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":97 + * + * + * cpdef intptr_t create(uint32_t num_options, options) except -1: # <<<<<<<<<<<<<< + * """nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_3create, 0, __pyx_mstate_global->__pyx_n_u_create, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create, __pyx_t_5) < (0)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":124 + * + * + * cpdef add_data(intptr_t handle, int input_type, data, size_t size, name): # <<<<<<<<<<<<<< + * """nvJitLinkAddData adds data image to the link. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_5add_data, 0, __pyx_mstate_global->__pyx_n_u_add_data, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_add_data, __pyx_t_5) < (0)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":146 + * + * + * cpdef add_file(intptr_t handle, int input_type, file_name): # <<<<<<<<<<<<<< + * """nvJitLinkAddFile reads data from file and links it in. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_7add_file, 0, __pyx_mstate_global->__pyx_n_u_add_file, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_add_file, __pyx_t_5) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":165 + * + * + * cpdef complete(intptr_t handle): # <<<<<<<<<<<<<< + * """nvJitLinkComplete does the actual link. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_9complete, 0, __pyx_mstate_global->__pyx_n_u_complete, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_complete, __pyx_t_5) < (0)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":178 + * + * + * cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubinSize gets the size of the linked cubin. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_11get_linked_cubin_size, 0, __pyx_mstate_global->__pyx_n_u_get_linked_cubin_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linked_cubin_size, __pyx_t_5) < (0)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":196 + * + * + * cpdef get_linked_cubin(intptr_t handle, cubin): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedCubin gets the linked cubin. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_13get_linked_cubin, 0, __pyx_mstate_global->__pyx_n_u_get_linked_cubin, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linked_cubin, __pyx_t_5) < (0)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":211 + * + * + * cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtxSize gets the size of the linked ptx. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_15get_linked_ptx_size, 0, __pyx_mstate_global->__pyx_n_u_get_linked_ptx_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linked_ptx_size, __pyx_t_5) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":229 + * + * + * cpdef get_linked_ptx(intptr_t handle, ptx): # <<<<<<<<<<<<<< + * """nvJitLinkGetLinkedPtx gets the linked ptx. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_17get_linked_ptx, 0, __pyx_mstate_global->__pyx_n_u_get_linked_ptx, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_linked_ptx, __pyx_t_5) < (0)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":244 + * + * + * cpdef size_t get_error_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLogSize gets the size of the error log. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_19get_error_log_size, 0, __pyx_mstate_global->__pyx_n_u_get_error_log_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_error_log_size, __pyx_t_5) < (0)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":262 + * + * + * cpdef get_error_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetErrorLog puts any error messages in the log. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_21get_error_log, 0, __pyx_mstate_global->__pyx_n_u_get_error_log, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_error_log, __pyx_t_5) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":277 + * + * + * cpdef size_t get_info_log_size(intptr_t handle) except? 0: # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLogSize gets the size of the info log. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_23get_info_log_size, 0, __pyx_mstate_global->__pyx_n_u_get_info_log_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_info_log_size, __pyx_t_5) < (0)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":295 + * + * + * cpdef get_info_log(intptr_t handle, log): # <<<<<<<<<<<<<< + * """nvJitLinkGetInfoLog puts any info messages in the log. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_25get_info_log, 0, __pyx_mstate_global->__pyx_n_u_get_info_log, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_info_log, __pyx_t_5) < (0)) __PYX_ERR(0, 295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":310 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """nvJitLinkVersion returns the current version of nvJitLink. + * +*/ + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_9nvjitlink_27version, 0, __pyx_mstate_global->__pyx_n_u_version, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvjitlink, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_5) < (0)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "cuda/bindings/nvjitlink.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.nvjitlink", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.nvjitlink"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 30 <= 65535 + const unsigned short n; +#elif 30 / 2 < INT_MAX + const unsigned int n; +#elif 30 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_ANY, sizeof(__pyx_k_ANY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ANY */ + {__pyx_k_CUBIN, sizeof(__pyx_k_CUBIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUBIN */ + {__pyx_k_ERROR_ARCH_MISMATCH, sizeof(__pyx_k_ERROR_ARCH_MISMATCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_ARCH_MISMATCH */ + {__pyx_k_ERROR_FINALIZE, sizeof(__pyx_k_ERROR_FINALIZE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_FINALIZE */ + {__pyx_k_ERROR_INCOMPATIBLE_OPTIONS, sizeof(__pyx_k_ERROR_INCOMPATIBLE_OPTIONS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INCOMPATIBLE_OPTIONS */ + {__pyx_k_ERROR_INCORRECT_INPUT_TYPE, sizeof(__pyx_k_ERROR_INCORRECT_INPUT_TYPE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INCORRECT_INPUT_TYPE */ + {__pyx_k_ERROR_INTERNAL, sizeof(__pyx_k_ERROR_INTERNAL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INTERNAL */ + {__pyx_k_ERROR_INVALID_INPUT, sizeof(__pyx_k_ERROR_INVALID_INPUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INVALID_INPUT */ + {__pyx_k_ERROR_LTO_NOT_ENABLED, sizeof(__pyx_k_ERROR_LTO_NOT_ENABLED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_LTO_NOT_ENABLED */ + {__pyx_k_ERROR_MISSING_ARCH, sizeof(__pyx_k_ERROR_MISSING_ARCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_MISSING_ARCH */ + {__pyx_k_ERROR_MISSING_FATBIN, sizeof(__pyx_k_ERROR_MISSING_FATBIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_MISSING_FATBIN */ + {__pyx_k_ERROR_NULL_INPUT, sizeof(__pyx_k_ERROR_NULL_INPUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_NULL_INPUT */ + {__pyx_k_ERROR_NVVM_COMPILE, sizeof(__pyx_k_ERROR_NVVM_COMPILE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_NVVM_COMPILE */ + {__pyx_k_ERROR_OUTDATED_LIBRARY, sizeof(__pyx_k_ERROR_OUTDATED_LIBRARY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_OUTDATED_LIBRARY */ + {__pyx_k_ERROR_PTX_COMPILE, sizeof(__pyx_k_ERROR_PTX_COMPILE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_PTX_COMPILE */ + {__pyx_k_ERROR_THREADPOOL, sizeof(__pyx_k_ERROR_THREADPOOL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_THREADPOOL */ + {__pyx_k_ERROR_UNRECOGNIZED_ARCH, sizeof(__pyx_k_ERROR_UNRECOGNIZED_ARCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_UNRECOGNIZED_ARCH */ + {__pyx_k_ERROR_UNRECOGNIZED_INPUT, sizeof(__pyx_k_ERROR_UNRECOGNIZED_INPUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_UNRECOGNIZED_INPUT */ + {__pyx_k_ERROR_UNRECOGNIZED_OPTION, sizeof(__pyx_k_ERROR_UNRECOGNIZED_OPTION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_UNRECOGNIZED_OPTION */ + {__pyx_k_ERROR_UNSUPPORTED_ARCH, sizeof(__pyx_k_ERROR_UNSUPPORTED_ARCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_UNSUPPORTED_ARCH */ + {__pyx_k_FATBIN, sizeof(__pyx_k_FATBIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_FATBIN */ + {__pyx_k_INDEX, sizeof(__pyx_k_INDEX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_INDEX */ + {__pyx_k_InputType, sizeof(__pyx_k_InputType), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InputType */ + {__pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum */ + {__pyx_k_IntEnum_2, sizeof(__pyx_k_IntEnum_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum_2 */ + {__pyx_k_LIBRARY, sizeof(__pyx_k_LIBRARY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LIBRARY */ + {__pyx_k_LTOIR, sizeof(__pyx_k_LTOIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LTOIR */ + {__pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NONE */ + {__pyx_k_OBJECT, sizeof(__pyx_k_OBJECT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_OBJECT */ + {__pyx_k_PTX, sizeof(__pyx_k_PTX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_PTX */ + {__pyx_k_Result, sizeof(__pyx_k_Result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Result */ + {__pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SUCCESS */ + {__pyx_k_See_nvJitLinkInputType, sizeof(__pyx_k_See_nvJitLinkInputType), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_nvJitLinkInputType */ + {__pyx_k_See_nvJitLinkResult, sizeof(__pyx_k_See_nvJitLinkResult), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_nvJitLinkResult */ + {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ + {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ + {__pyx_k_add_data, sizeof(__pyx_k_add_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_add_data */ + {__pyx_k_add_file, sizeof(__pyx_k_add_file), 0, 1, 1}, /* PyObject cname: __pyx_n_u_add_file */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_complete, sizeof(__pyx_k_complete), 0, 1, 1}, /* PyObject cname: __pyx_n_u_complete */ + {__pyx_k_create, sizeof(__pyx_k_create), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create */ + {__pyx_k_cubin, sizeof(__pyx_k_cubin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cubin */ + {__pyx_k_cuda_bindings_nvjitlink, sizeof(__pyx_k_cuda_bindings_nvjitlink), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_nvjitlink */ + {__pyx_k_cuda_bindings_nvjitlink_pyx, sizeof(__pyx_k_cuda_bindings_nvjitlink_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings_nvjitlink_pyx */ + {__pyx_k_data, sizeof(__pyx_k_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data */ + {__pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_destroy */ + {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ + {__pyx_k_enum, sizeof(__pyx_k_enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enum */ + {__pyx_k_err, sizeof(__pyx_k_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_err */ + {__pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_file_name */ + {__pyx_k_file_name_must_be_a_Python_str, sizeof(__pyx_k_file_name_must_be_a_Python_str), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_file_name_must_be_a_Python_str */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_get_error_log, sizeof(__pyx_k_get_error_log), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_error_log */ + {__pyx_k_get_error_log_size, sizeof(__pyx_k_get_error_log_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_error_log_size */ + {__pyx_k_get_info_log, sizeof(__pyx_k_get_info_log), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_info_log */ + {__pyx_k_get_info_log_size, sizeof(__pyx_k_get_info_log_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_info_log_size */ + {__pyx_k_get_linked_cubin, sizeof(__pyx_k_get_linked_cubin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linked_cubin */ + {__pyx_k_get_linked_cubin_size, sizeof(__pyx_k_get_linked_cubin_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linked_cubin_size */ + {__pyx_k_get_linked_ptx, sizeof(__pyx_k_get_linked_ptx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linked_ptx */ + {__pyx_k_get_linked_ptx_size, sizeof(__pyx_k_get_linked_ptx_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_linked_ptx_size */ + {__pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle */ + {__pyx_k_init, sizeof(__pyx_k_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_init */ + {__pyx_k_input_type, sizeof(__pyx_k_input_type), 0, 1, 1}, /* PyObject cname: __pyx_n_u_input_type */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_log, sizeof(__pyx_k_log), 0, 1, 1}, /* PyObject cname: __pyx_n_u_log */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_name_must_be_a_Python_str, sizeof(__pyx_k_name_must_be_a_Python_str), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_name_must_be_a_Python_str */ + {__pyx_k_num_options, sizeof(__pyx_k_num_options), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_options */ + {__pyx_k_nvJitLinkError, sizeof(__pyx_k_nvJitLinkError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkError */ + {__pyx_k_nvJitLinkError___init, sizeof(__pyx_k_nvJitLinkError___init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkError___init */ + {__pyx_k_nvJitLinkError___reduce, sizeof(__pyx_k_nvJitLinkError___reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvJitLinkError___reduce */ + {__pyx_k_options, sizeof(__pyx_k_options), 0, 1, 1}, /* PyObject cname: __pyx_n_u_options */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ + {__pyx_k_ptx, sizeof(__pyx_k_ptx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptx */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ + {__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */ + {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_size, sizeof(__pyx_k_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size */ + {__pyx_k_status, sizeof(__pyx_k_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_status */ + {__pyx_k_super, sizeof(__pyx_k_super), 0, 1, 1}, /* PyObject cname: __pyx_n_u_super */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_value, sizeof(__pyx_k_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value */ + {__pyx_k_version, sizeof(__pyx_k_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_version */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 138, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; + unsigned int line_table_length : 11; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 61, 49}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_Ja_F_1_r_Qiq_Q_e9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 67, 15}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_k_A_AXT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 83, 33}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_destroy, __pyx_k_HA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97, 66}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_num_options, __pyx_mstate->__pyx_n_u_options}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_create, __pyx_k_Q_1E_YgQ_iuTYYZ_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 124, 96}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_input_type, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_add_data, __pyx_k_6_t_QfA_iq_e5_q_l_W__eerrs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 146, 73}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_input_type, __pyx_mstate->__pyx_n_u_file_name}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_add_file, __pyx_k_t_Qk_iq_5_Q_l_WX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165, 26}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_complete, __pyx_k_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_linked_cubin_size, __pyx_k_A_AXXQa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 196, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_cubin}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_linked_cubin, __pyx_k_1HL, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_linked_ptx_size, __pyx_k_881A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 229, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_ptx}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_linked_ptx, __pyx_k_A_axxwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 244, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_error_log_size, __pyx_k_9_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 262, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_log}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_error_log, __pyx_k_A_QhhgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 277, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_info_log_size, __pyx_k_8_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 295, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_handle, __pyx_mstate->__pyx_n_u_log}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_get_info_log, __pyx_k_A_AXXWA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 310, 37}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvjitlink_pyx, __pyx_mstate->__pyx_n_u_version, __pyx_k_7_1_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; irecursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* UnpackUnboundCMethod */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvJitLinkResult(nvJitLinkResult value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const nvJitLinkResult neg_one = (nvJitLinkResult) -1, const_zero = (nvJitLinkResult) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(nvJitLinkResult) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(nvJitLinkResult) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(nvJitLinkResult) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(nvJitLinkResult) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(nvJitLinkResult) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(nvJitLinkResult), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(nvJitLinkResult)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvJitLinkInputType(nvJitLinkInputType value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const nvJitLinkInputType neg_one = (nvJitLinkInputType) -1, const_zero = (nvJitLinkInputType) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(nvJitLinkInputType) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(nvJitLinkInputType) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(nvJitLinkInputType) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(nvJitLinkInputType) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(nvJitLinkInputType) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(nvJitLinkInputType), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(nvJitLinkInputType)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE uint32_t __Pyx_PyLong_As_uint32_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + uint32_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (uint32_t) -1; + val = __Pyx_PyLong_As_uint32_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT)) { + return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT)) { + return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT)) { + return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (uint32_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(uint32_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(uint32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(uint32_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(uint32_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(uint32_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT)) { + return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(uint32_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(uint32_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + uint32_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (uint32_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (uint32_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (uint32_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (uint32_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(uint32_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((uint32_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(uint32_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((uint32_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((uint32_t) 1) << (sizeof(uint32_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (uint32_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to uint32_t"); + return (uint32_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to uint32_t"); + return (uint32_t) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1279de9b481cbaa1075d3488e829412b9e18f72f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pxd @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t, uint32_t + +from .cynvjitlink cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvJitLinkHandle Handle + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvJitLinkResult _Result +ctypedef nvJitLinkInputType _InputType + + +############################################################################### +# Functions +############################################################################### + +cpdef intptr_t create(uint32_t num_options, options) except -1 +cpdef add_data(intptr_t handle, int input_type, data, size_t size, name) +cpdef add_file(intptr_t handle, int input_type, file_name) +cpdef complete(intptr_t handle) +cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0 +cpdef get_linked_cubin(intptr_t handle, cubin) +cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0 +cpdef get_linked_ptx(intptr_t handle, ptx) +cpdef size_t get_error_log_size(intptr_t handle) except? 0 +cpdef get_error_log(intptr_t handle, log) +cpdef size_t get_info_log_size(intptr_t handle) except? 0 +cpdef get_info_log(intptr_t handle, log) +cpdef tuple version() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pyx new file mode 100644 index 0000000000000000000000000000000000000000..6dd8770d7a3ab429f46866fae93f1775ac724c96 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvjitlink.pyx @@ -0,0 +1,326 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +cimport cython # NOQA + +from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, + get_buffer_pointer, get_resource_ptrs) + +from enum import IntEnum as _IntEnum +from libcpp.vector cimport vector + + +############################################################################### +# Enum +############################################################################### + +class Result(_IntEnum): + """See `nvJitLinkResult`.""" + SUCCESS = NVJITLINK_SUCCESS + ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION + ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH + ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT + ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE + ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE + ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL + ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL + ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT + ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE + ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT + ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS + ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE + ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH + ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY + ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN + ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH + ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH + ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED + +class InputType(_IntEnum): + """See `nvJitLinkInputType`.""" + NONE = NVJITLINK_INPUT_NONE + CUBIN = NVJITLINK_INPUT_CUBIN + PTX = NVJITLINK_INPUT_PTX + LTOIR = NVJITLINK_INPUT_LTOIR + FATBIN = NVJITLINK_INPUT_FATBIN + OBJECT = NVJITLINK_INPUT_OBJECT + LIBRARY = NVJITLINK_INPUT_LIBRARY + INDEX = NVJITLINK_INPUT_INDEX + ANY = NVJITLINK_INPUT_ANY + + +############################################################################### +# Error handling +############################################################################### + +class nvJitLinkError(Exception): + + def __init__(self, status): + self.status = status + s = Result(status) + cdef str err = f"{s.name} ({s.value})" + super(nvJitLinkError, self).__init__(err) + + def __reduce__(self): + return (type(self), (self.status,)) + + +@cython.profile(False) +cdef int check_status(int status) except 1 nogil: + if status != 0: + with gil: + raise nvJitLinkError(status) + return status + + +############################################################################### +# Wrapper functions +############################################################################### + +cpdef destroy(intptr_t handle): + """nvJitLinkDestroy frees the memory associated with the given handle. + + Args: + handle (intptr_t): nvJitLink handle. + + .. seealso:: `nvJitLinkDestroy` + """ + cdef Handle h = handle + with nogil: + status = nvJitLinkDestroy(&h) + check_status(status) + + +cpdef intptr_t create(uint32_t num_options, options) except -1: + """nvJitLinkCreate creates an instance of nvJitLinkHandle with the given input options, and sets the output parameter ``handle``. + + Args: + num_options (uint32_t): Number of options passed. + options (object): Array of size ``num_options`` of option strings. It can be: + + - an :class:`int` as the pointer address to the nested sequence, or + - a Python sequence of :class:`int`\s, each of which is a pointer address + to a valid sequence of 'char', or + - a nested Python sequence of ``str``. + + + Returns: + intptr_t: Address of nvJitLink handle. + + .. seealso:: `nvJitLinkCreate` + """ + cdef nested_resource[ char ] _options_ + get_nested_resource_ptr[char](_options_, options, NULL) + cdef Handle handle + with nogil: + status = nvJitLinkCreate(&handle, num_options, (_options_.ptrs.data())) + check_status(status) + return handle + + +cpdef add_data(intptr_t handle, int input_type, data, size_t size, name): + """nvJitLinkAddData adds data image to the link. + + Args: + handle (intptr_t): nvJitLink handle. + input_type (InputType): kind of input. + data (bytes): pointer to data image in memory. + size (size_t): size of the data. + name (str): name of input object. + + .. seealso:: `nvJitLinkAddData` + """ + cdef void* _data_ = get_buffer_pointer(data, size, readonly=True) + if not isinstance(name, str): + raise TypeError("name must be a Python str") + cdef bytes _temp_name_ = (name).encode() + cdef char* _name_ = _temp_name_ + with nogil: + status = nvJitLinkAddData(handle, <_InputType>input_type, _data_, size, _name_) + check_status(status) + + +cpdef add_file(intptr_t handle, int input_type, file_name): + """nvJitLinkAddFile reads data from file and links it in. + + Args: + handle (intptr_t): nvJitLink handle. + input_type (InputType): kind of input. + file_name (str): name of file. + + .. seealso:: `nvJitLinkAddFile` + """ + if not isinstance(file_name, str): + raise TypeError("file_name must be a Python str") + cdef bytes _temp_file_name_ = (file_name).encode() + cdef char* _file_name_ = _temp_file_name_ + with nogil: + status = nvJitLinkAddFile(handle, <_InputType>input_type, _file_name_) + check_status(status) + + +cpdef complete(intptr_t handle): + """nvJitLinkComplete does the actual link. + + Args: + handle (intptr_t): nvJitLink handle. + + .. seealso:: `nvJitLinkComplete` + """ + with nogil: + status = nvJitLinkComplete(handle) + check_status(status) + + +cpdef size_t get_linked_cubin_size(intptr_t handle) except? 0: + """nvJitLinkGetLinkedCubinSize gets the size of the linked cubin. + + Args: + handle (intptr_t): nvJitLink handle. + + Returns: + size_t: Size of the linked cubin. + + .. seealso:: `nvJitLinkGetLinkedCubinSize` + """ + cdef size_t size + with nogil: + status = nvJitLinkGetLinkedCubinSize(handle, &size) + check_status(status) + return size + + +cpdef get_linked_cubin(intptr_t handle, cubin): + """nvJitLinkGetLinkedCubin gets the linked cubin. + + Args: + handle (intptr_t): nvJitLink handle. + cubin (bytes): The linked cubin. + + .. seealso:: `nvJitLinkGetLinkedCubin` + """ + cdef void* _cubin_ = get_buffer_pointer(cubin, -1, readonly=False) + with nogil: + status = nvJitLinkGetLinkedCubin(handle, _cubin_) + check_status(status) + + +cpdef size_t get_linked_ptx_size(intptr_t handle) except? 0: + """nvJitLinkGetLinkedPtxSize gets the size of the linked ptx. + + Args: + handle (intptr_t): nvJitLink handle. + + Returns: + size_t: Size of the linked PTX. + + .. seealso:: `nvJitLinkGetLinkedPtxSize` + """ + cdef size_t size + with nogil: + status = nvJitLinkGetLinkedPtxSize(handle, &size) + check_status(status) + return size + + +cpdef get_linked_ptx(intptr_t handle, ptx): + """nvJitLinkGetLinkedPtx gets the linked ptx. + + Args: + handle (intptr_t): nvJitLink handle. + ptx (bytes): The linked PTX. + + .. seealso:: `nvJitLinkGetLinkedPtx` + """ + cdef void* _ptx_ = get_buffer_pointer(ptx, -1, readonly=False) + with nogil: + status = nvJitLinkGetLinkedPtx(handle, _ptx_) + check_status(status) + + +cpdef size_t get_error_log_size(intptr_t handle) except? 0: + """nvJitLinkGetErrorLogSize gets the size of the error log. + + Args: + handle (intptr_t): nvJitLink handle. + + Returns: + size_t: Size of the error log. + + .. seealso:: `nvJitLinkGetErrorLogSize` + """ + cdef size_t size + with nogil: + status = nvJitLinkGetErrorLogSize(handle, &size) + check_status(status) + return size + + +cpdef get_error_log(intptr_t handle, log): + """nvJitLinkGetErrorLog puts any error messages in the log. + + Args: + handle (intptr_t): nvJitLink handle. + log (bytes): The error log. + + .. seealso:: `nvJitLinkGetErrorLog` + """ + cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + with nogil: + status = nvJitLinkGetErrorLog(handle, _log_) + check_status(status) + + +cpdef size_t get_info_log_size(intptr_t handle) except? 0: + """nvJitLinkGetInfoLogSize gets the size of the info log. + + Args: + handle (intptr_t): nvJitLink handle. + + Returns: + size_t: Size of the info log. + + .. seealso:: `nvJitLinkGetInfoLogSize` + """ + cdef size_t size + with nogil: + status = nvJitLinkGetInfoLogSize(handle, &size) + check_status(status) + return size + + +cpdef get_info_log(intptr_t handle, log): + """nvJitLinkGetInfoLog puts any info messages in the log. + + Args: + handle (intptr_t): nvJitLink handle. + log (bytes): The info log. + + .. seealso:: `nvJitLinkGetInfoLog` + """ + cdef void* _log_ = get_buffer_pointer(log, -1, readonly=False) + with nogil: + status = nvJitLinkGetInfoLog(handle, _log_) + check_status(status) + + +cpdef tuple version(): + """nvJitLinkVersion returns the current version of nvJitLink. + + Returns: + A 2-tuple containing: + + - unsigned int: The major version. + - unsigned int: The minor version. + + .. seealso:: `nvJitLinkVersion` + """ + cdef unsigned int major + cdef unsigned int minor + with nogil: + status = nvJitLinkVersion(&major, &minor) + check_status(status) + return (major, minor) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c3d8bf7eab4f5d92e64339f49daa04185d577d25 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.cpp @@ -0,0 +1,57463 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cudaProfiler.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/cuda_runtime_api.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/device_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/driver_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/library_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/nvrtc.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/surface_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/texture_types.h", + "/host/home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include/vector_types.h", + "cuda/bindings/_lib/param_packer.h" + ], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "./cuda/bindings/_lib", + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.nvrtc", + "sources": [ + "cuda/bindings/nvrtc.pyx" + ] + }, + "module_name": "cuda.bindings.nvrtc" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__nvrtc +#define __PYX_HAVE_API__cuda__bindings__nvrtc +/* Early includes */ +#include +#include "nvrtc.h" +#include "cuda.h" +#include "cudaProfiler.h" +#include "vector_types.h" +#include "driver_types.h" +#include "surface_types.h" +#include "texture_types.h" +#include "library_types.h" +#include "cuda_runtime_api.h" +#include "device_types.h" +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include +#include +#include +#include +#include +#include "param_packer.h" +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/nvrtc.pyx", + "cuda/bindings/_lib/utils.pxi", + "", + "cuda/bindings/_lib/utils.pxd", + "cuda/bindings/driver.pxd", + "cpython/type.pxd", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* #### Code section: numeric_typedefs ### */ + +/* "cuda/bindings/cydriver.pxd":2602 + * ctypedef CUGLmap_flags_enum CUGLmap_flags + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLenum; + +/* "cuda/bindings/cydriver.pxd":2604 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_GLuint; + +/* "cuda/bindings/cydriver.pxd":2616 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_8cydriver_EGLint; + +/* "cuda/bindings/cydriver.pxd":2623 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpDevice; + +/* "cuda/bindings/cydriver.pxd":2625 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress; + +/* "cuda/bindings/cydriver.pxd":2627 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface; + +/* "cuda/bindings/cydriver.pxd":2629 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface; + +/* "cuda/bindings/cyruntime.pxd":10 + * include "cyruntime_types.pxi" + * + * ctypedef unsigned int GLenum # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLuint +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLenum; + +/* "cuda/bindings/cyruntime.pxd":12 + * ctypedef unsigned int GLenum + * + * ctypedef unsigned int GLuint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_GLuint; + +/* "cuda/bindings/cyruntime.pxd":24 + * ctypedef void* EGLStreamKHR + * + * ctypedef unsigned int EGLint # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef unsigned int __pyx_t_4cuda_8bindings_9cyruntime_EGLint; + +/* "cuda/bindings/cyruntime.pxd":31 + * ctypedef void* EGLSyncKHR + * + * ctypedef uint32_t VdpDevice # <<<<<<<<<<<<<< + * + * ctypedef unsigned long long VdpGetProcAddress +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpDevice; + +/* "cuda/bindings/cyruntime.pxd":33 + * ctypedef uint32_t VdpDevice + * + * ctypedef unsigned long long VdpGetProcAddress # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpVideoSurface +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_9cyruntime_VdpGetProcAddress; + +/* "cuda/bindings/cyruntime.pxd":35 + * ctypedef unsigned long long VdpGetProcAddress + * + * ctypedef uint32_t VdpVideoSurface # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpOutputSurface +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpVideoSurface; + +/* "cuda/bindings/cyruntime.pxd":37 + * ctypedef uint32_t VdpVideoSurface + * + * ctypedef uint32_t VdpOutputSurface # <<<<<<<<<<<<<< + * + * cdef enum cudaEglFrameType_enum: +*/ +typedef uint32_t __pyx_t_4cuda_8bindings_9cyruntime_VdpOutputSurface; + +/* "cuda/bindings/nvrtc.pyx":22 + * include "_lib/utils.pxi" + * + * ctypedef unsigned long long signed_char_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_char_ptr + * ctypedef unsigned long long char_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_signed_char_ptr; + +/* "cuda/bindings/nvrtc.pyx":23 + * + * ctypedef unsigned long long signed_char_ptr + * ctypedef unsigned long long unsigned_char_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long char_ptr + * ctypedef unsigned long long short_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_char_ptr; + +/* "cuda/bindings/nvrtc.pyx":24 + * ctypedef unsigned long long signed_char_ptr + * ctypedef unsigned long long unsigned_char_ptr + * ctypedef unsigned long long char_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long short_ptr + * ctypedef unsigned long long unsigned_short_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_char_ptr; + +/* "cuda/bindings/nvrtc.pyx":25 + * ctypedef unsigned long long unsigned_char_ptr + * ctypedef unsigned long long char_ptr + * ctypedef unsigned long long short_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_short_ptr + * ctypedef unsigned long long int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_short_ptr; + +/* "cuda/bindings/nvrtc.pyx":26 + * ctypedef unsigned long long char_ptr + * ctypedef unsigned long long short_ptr + * ctypedef unsigned long long unsigned_short_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long int_ptr + * ctypedef unsigned long long long_int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_short_ptr; + +/* "cuda/bindings/nvrtc.pyx":27 + * ctypedef unsigned long long short_ptr + * ctypedef unsigned long long unsigned_short_ptr + * ctypedef unsigned long long int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long long_int_ptr + * ctypedef unsigned long long long_long_int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":28 + * ctypedef unsigned long long unsigned_short_ptr + * ctypedef unsigned long long int_ptr + * ctypedef unsigned long long long_int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long long_long_int_ptr + * ctypedef unsigned long long unsigned_int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_long_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":29 + * ctypedef unsigned long long int_ptr + * ctypedef unsigned long long long_int_ptr + * ctypedef unsigned long long long_long_int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_int_ptr + * ctypedef unsigned long long unsigned_long_int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_long_long_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":30 + * ctypedef unsigned long long long_int_ptr + * ctypedef unsigned long long long_long_int_ptr + * ctypedef unsigned long long unsigned_int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_long_int_ptr + * ctypedef unsigned long long unsigned_long_long_int_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":31 + * ctypedef unsigned long long long_long_int_ptr + * ctypedef unsigned long long unsigned_int_ptr + * ctypedef unsigned long long unsigned_long_int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_long_long_int_ptr + * ctypedef unsigned long long uint32_t_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_long_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":32 + * ctypedef unsigned long long unsigned_int_ptr + * ctypedef unsigned long long unsigned_long_int_ptr + * ctypedef unsigned long long unsigned_long_long_int_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long uint32_t_ptr + * ctypedef unsigned long long uint64_t_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_long_long_int_ptr; + +/* "cuda/bindings/nvrtc.pyx":33 + * ctypedef unsigned long long unsigned_long_int_ptr + * ctypedef unsigned long long unsigned_long_long_int_ptr + * ctypedef unsigned long long uint32_t_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long uint64_t_ptr + * ctypedef unsigned long long int32_t_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_uint32_t_ptr; + +/* "cuda/bindings/nvrtc.pyx":34 + * ctypedef unsigned long long unsigned_long_long_int_ptr + * ctypedef unsigned long long uint32_t_ptr + * ctypedef unsigned long long uint64_t_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long int32_t_ptr + * ctypedef unsigned long long int64_t_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_uint64_t_ptr; + +/* "cuda/bindings/nvrtc.pyx":35 + * ctypedef unsigned long long uint32_t_ptr + * ctypedef unsigned long long uint64_t_ptr + * ctypedef unsigned long long int32_t_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long int64_t_ptr + * ctypedef unsigned long long unsigned_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_int32_t_ptr; + +/* "cuda/bindings/nvrtc.pyx":36 + * ctypedef unsigned long long uint64_t_ptr + * ctypedef unsigned long long int32_t_ptr + * ctypedef unsigned long long int64_t_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_ptr + * ctypedef unsigned long long unsigned_long_long_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_int64_t_ptr; + +/* "cuda/bindings/nvrtc.pyx":37 + * ctypedef unsigned long long int32_t_ptr + * ctypedef unsigned long long int64_t_ptr + * ctypedef unsigned long long unsigned_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long unsigned_long_long_ptr + * ctypedef unsigned long long long_long_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_ptr; + +/* "cuda/bindings/nvrtc.pyx":38 + * ctypedef unsigned long long int64_t_ptr + * ctypedef unsigned long long unsigned_ptr + * ctypedef unsigned long long unsigned_long_long_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long long_long_ptr + * ctypedef unsigned long long size_t_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_unsigned_long_long_ptr; + +/* "cuda/bindings/nvrtc.pyx":39 + * ctypedef unsigned long long unsigned_ptr + * ctypedef unsigned long long unsigned_long_long_ptr + * ctypedef unsigned long long long_long_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long size_t_ptr + * ctypedef unsigned long long long_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_long_long_ptr; + +/* "cuda/bindings/nvrtc.pyx":40 + * ctypedef unsigned long long unsigned_long_long_ptr + * ctypedef unsigned long long long_long_ptr + * ctypedef unsigned long long size_t_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long long_ptr + * ctypedef unsigned long long float_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_size_t_ptr; + +/* "cuda/bindings/nvrtc.pyx":41 + * ctypedef unsigned long long long_long_ptr + * ctypedef unsigned long long size_t_ptr + * ctypedef unsigned long long long_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long float_ptr + * ctypedef unsigned long long double_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_long_ptr; + +/* "cuda/bindings/nvrtc.pyx":42 + * ctypedef unsigned long long size_t_ptr + * ctypedef unsigned long long long_ptr + * ctypedef unsigned long long float_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long double_ptr + * ctypedef unsigned long long void_ptr +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_float_ptr; + +/* "cuda/bindings/nvrtc.pyx":43 + * ctypedef unsigned long long long_ptr + * ctypedef unsigned long long float_ptr + * ctypedef unsigned long long double_ptr # <<<<<<<<<<<<<< + * ctypedef unsigned long long void_ptr + * +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_double_ptr; + +/* "cuda/bindings/nvrtc.pyx":44 + * ctypedef unsigned long long float_ptr + * ctypedef unsigned long long double_ptr + * ctypedef unsigned long long void_ptr # <<<<<<<<<<<<<< + * + * +*/ +typedef unsigned PY_LONG_LONG __pyx_t_4cuda_8bindings_5nvrtc_void_ptr; +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams; +struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType; +struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper; +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings; +struct __pyx_obj_4cuda_8bindings_6driver_CUcontext; +struct __pyx_obj_4cuda_8bindings_6driver_CUmodule; +struct __pyx_obj_4cuda_8bindings_6driver_CUfunction; +struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary; +struct __pyx_obj_4cuda_8bindings_6driver_CUkernel; +struct __pyx_obj_4cuda_8bindings_6driver_CUarray; +struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray; +struct __pyx_obj_4cuda_8bindings_6driver_CUtexref; +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref; +struct __pyx_obj_4cuda_8bindings_6driver_CUevent; +struct __pyx_obj_4cuda_8bindings_6driver_CUstream; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource; +struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory; +struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraph; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool; +struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode; +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx; +struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc; +struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection; +struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR; +struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR; +struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR; +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback; +struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback; +struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize; +struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback; +struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union2; +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union3; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union4; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union5; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union6; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union7; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union8; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union9; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union10; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union11; +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23; +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union12; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st; +struct __pyx_obj_4cuda_8bindings_6driver_anon_union15; +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st; +struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevice; +struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject; +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUuuid; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop; +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute; +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig; +struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam; +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam; +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams; +struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle; +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp; +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes; +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D; +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS; +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs; +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource; +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame; +struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t; +struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t; +struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2; +struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1; +struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator; +struct __pyx_obj_4cuda_8bindings_6driver_GLenum; +struct __pyx_obj_4cuda_8bindings_6driver_GLuint; +struct __pyx_obj_4cuda_8bindings_6driver_EGLint; +struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice; +struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress; +struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface; +struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType; +struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper; +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings; +struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram; +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr; +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr; +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr; +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr; +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15; +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st; + +/* "cuda/bindings/cydriver.pxd":2429 + * ctypedef CUoutput_mode_enum CUoutput_mode + * + * cdef enum CUeglFrameType_enum: # <<<<<<<<<<<<<< + * CU_EGL_FRAME_TYPE_ARRAY = 0 + * CU_EGL_FRAME_TYPE_PITCH = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_ARRAY = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_FRAME_TYPE_PITCH = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2435 + * ctypedef CUeglFrameType_enum CUeglFrameType + * + * cdef enum CUeglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * CU_EGL_RESOURCE_LOCATION_SYSMEM = 0 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":2441 + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags + * + * cdef enum CUeglColorFormat_enum: # <<<<<<<<<<<<<< + * CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0 + * CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGB = 4, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGR = 5, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ARGB = 6, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RGBA = 7, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_L = 8, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_R = 9, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_422 = 12, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_422 = 13, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_ABGR = 14, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BGRA = 15, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_A = 16, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_RG = 17, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV = 18, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY_ER = 26, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_ER = 27, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUYV_ER = 28, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU_ER = 29, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV_ER = 30, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA_ER = 31, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_AYUV_ER = 32, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y = 82, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_ER = 96, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y_709_ER = 97, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_ER = 98, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUVA = 0x66, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YUV = 0x67, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_YVYU = 0x68, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_VYUY = 0x69, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709 = 0x72, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_709_ER = 0x73, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_UYVY_2020 = 0x74, + __pyx_e_4cuda_8bindings_8cydriver_CU_EGL_COLOR_FORMAT_MAX = 0x75 +}; + +/* "cuda/bindings/cydriver.pxd":2588 + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection + * + * cdef enum CUGLDeviceList_enum: # <<<<<<<<<<<<<< + * CU_GL_DEVICE_LIST_ALL = 1 + * CU_GL_DEVICE_LIST_CURRENT_FRAME = 2 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_ALL = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_DEVICE_LIST_NEXT_FRAME = 3 +}; + +/* "cuda/bindings/cydriver.pxd":2595 + * ctypedef CUGLDeviceList_enum CUGLDeviceList + * + * cdef enum CUGLmap_flags_enum: # <<<<<<<<<<<<<< + * CU_GL_MAP_RESOURCE_FLAGS_NONE = 0 + * CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1 +*/ +enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1, + __pyx_e_4cuda_8bindings_8cydriver_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3577 + * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil + * + * cdef enum: CUDA_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cydriver.pxd":3579 + * cdef enum: CUDA_VERSION = 12090 + * + * cdef enum: CU_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_LEGACY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3581 + * cdef enum: CU_IPC_HANDLE_SIZE = 64 + * + * cdef enum: CU_STREAM_LEGACY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_PER_THREAD = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_LEGACY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3583 + * cdef enum: CU_STREAM_LEGACY = 1 + * + * cdef enum: CU_STREAM_PER_THREAD = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_PER_THREAD = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3585 + * cdef enum: CU_STREAM_PER_THREAD = 2 + * + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 # <<<<<<<<<<<<<< + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_ACCELERATED_TARGET_BASE = 0x10000 +}; + +/* "cuda/bindings/cydriver.pxd":3587 + * cdef enum: CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536 + * + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_COMPUTE_FAMILY_TARGET_BASE = 0x20000 +}; + +/* "cuda/bindings/cydriver.pxd":3589 + * cdef enum: CU_COMPUTE_FAMILY_TARGET_BASE = 131072 + * + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_COND_ASSIGN_DEFAULT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3591 + * cdef enum: CU_GRAPH_COND_ASSIGN_DEFAULT = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3593 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3595 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1 + * + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3597 + * cdef enum: CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3599 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3601 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3603 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 +}; + +/* "cuda/bindings/cydriver.pxd":3605 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3607 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3609 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3611 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 +}; + +/* "cuda/bindings/cydriver.pxd":3613 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 # <<<<<<<<<<<<<< + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 +}; + +/* "cuda/bindings/cydriver.pxd":3615 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 + * + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 +}; + +/* "cuda/bindings/cydriver.pxd":3617 + * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 + * + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3619 + * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1 + * + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3621 + * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3 + * + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_PRIORITY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3623 + * cdef enum: CU_STREAM_ATTRIBUTE_PRIORITY = 8 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 # <<<<<<<<<<<<<< + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 +}; + +/* "cuda/bindings/cydriver.pxd":3625 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 + * + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +}; + +/* "cuda/bindings/cydriver.pxd":3627 + * cdef enum: CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + * + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3629 + * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3631 + * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTALLOC_WRITECOMBINED = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3633 + * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_PORTABLE = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3635 + * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1 + * + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_DEVICEMAP = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3637 + * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2 + * + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_IOMEMORY = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3639 + * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4 + * + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEMHOSTREGISTER_READ_ONLY = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3641 + * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8 + * + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3643 + * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1 + * + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TENSOR_MAP_NUM_QWORDS = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3645 + * cdef enum: CU_TENSOR_MAP_NUM_QWORDS = 16 + * + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_MEMORY_DEDICATED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3647 + * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3649 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1 + * + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3651 + * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_SIGNAL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3653 + * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1 + * + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_NVSCISYNC_ATTR_WAIT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3655 + * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 + * + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_TILE_POOL = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3657 + * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 + * + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3659 + * cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3661 + * cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3663 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 + * + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3665 + * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 + * + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_LAYERED = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3667 + * cdef enum: CUDA_ARRAY3D_LAYERED = 1 + * + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_2DARRAY = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3669 + * cdef enum: CUDA_ARRAY3D_2DARRAY = 1 + * + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SURFACE_LDST = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3671 + * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2 + * + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_CUBEMAP = 4 +}; + +/* "cuda/bindings/cydriver.pxd":3673 + * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4 + * + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_TEXTURE_GATHER = 8 +}; + +/* "cuda/bindings/cydriver.pxd":3675 + * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8 + * + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEPTH_TEXTURE = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3677 + * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16 + * + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3679 + * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32 + * + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_SPARSE = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3681 + * cdef enum: CUDA_ARRAY3D_SPARSE = 64 + * + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80 +}; + +/* "cuda/bindings/cydriver.pxd":3683 + * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128 + * + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 0x100 +}; + +/* "cuda/bindings/cydriver.pxd":3685 + * cdef enum: CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256 + * + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSA_OVERRIDE_FORMAT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3687 + * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1 + * + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_READ_AS_INTEGER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3689 + * cdef enum: CU_TRSF_READ_AS_INTEGER = 1 + * + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SRGB = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_NORMALIZED_COORDINATES = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3691 + * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2 + * + * cdef enum: CU_TRSF_SRGB = 16 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SRGB = 16 +}; + +/* "cuda/bindings/cydriver.pxd":3693 + * cdef enum: CU_TRSF_SRGB = 16 + * + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 # <<<<<<<<<<<<<< + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 +}; + +/* "cuda/bindings/cydriver.pxd":3695 + * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32 + * + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_TRSF_SEAMLESS_CUBEMAP = 64 +}; + +/* "cuda/bindings/cydriver.pxd":3697 + * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64 + * + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3699 + * cdef enum: CU_LAUNCH_KERNEL_REQUIRED_BLOCK_DIM = 1 + * + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END_AS_INT = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3701 + * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0 + * + * cdef enum: CU_LAUNCH_PARAM_END = 0 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_END = 0 +}; + +/* "cuda/bindings/cydriver.pxd":3703 + * cdef enum: CU_LAUNCH_PARAM_END = 0 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3705 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_POINTER = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3707 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3709 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2 + * + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_LAUNCH_PARAM_BUFFER_SIZE = 2 +}; + +/* "cuda/bindings/cydriver.pxd":3711 + * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2 + * + * cdef enum: CU_PARAM_TR_DEFAULT = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_CPU = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_PARAM_TR_DEFAULT = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3713 + * cdef enum: CU_PARAM_TR_DEFAULT = -1 + * + * cdef enum: CU_DEVICE_CPU = -1 # <<<<<<<<<<<<<< + * + * cdef enum: CU_DEVICE_INVALID = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_CPU = -1L +}; + +/* "cuda/bindings/cydriver.pxd":3715 + * cdef enum: CU_DEVICE_CPU = -1 + * + * cdef enum: CU_DEVICE_INVALID = -2 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_VERSION = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CU_DEVICE_INVALID = -2L +}; + +/* "cuda/bindings/cydriver.pxd":3717 + * cdef enum: CU_DEVICE_INVALID = -2 + * + * cdef enum: RESOURCE_ABI_VERSION = 1 # <<<<<<<<<<<<<< + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_VERSION = 1 +}; + +/* "cuda/bindings/cydriver.pxd":3719 + * cdef enum: RESOURCE_ABI_VERSION = 1 + * + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 # <<<<<<<<<<<<<< + * + * cdef enum: MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_RESOURCE_ABI_EXTERNAL_BYTES = 48 +}; + +/* "cuda/bindings/cydriver.pxd":3721 + * cdef enum: RESOURCE_ABI_EXTERNAL_BYTES = 48 + * + * cdef enum: MAX_PLANES = 3 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cydriver.pxd":3723 + * cdef enum: MAX_PLANES = 3 + * + * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_8cydriver_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF +}; + +/* "cuda/bindings/cydriver.pxd":2433 + * CU_EGL_FRAME_TYPE_PITCH = 1 + * + * ctypedef CUeglFrameType_enum CUeglFrameType # <<<<<<<<<<<<<< + * + * cdef enum CUeglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType; + +/* "cuda/bindings/cydriver.pxd":2439 + * CU_EGL_RESOURCE_LOCATION_VIDMEM = 1 + * + * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum CUeglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglResourceLocationFlags; + +/* "cuda/bindings/cydriver.pxd":2561 + * CU_EGL_COLOR_FORMAT_MAX = 117 + * + * ctypedef CUeglColorFormat_enum CUeglColorFormat # <<<<<<<<<<<<<< + * + * cdef union anon_union15: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat_enum __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat; + +/* "cuda/bindings/cydriver.pxd":2563 + * ctypedef CUeglColorFormat_enum CUeglColorFormat + * + * cdef union anon_union15: # <<<<<<<<<<<<<< + * CUarray pArray[3] + * void* pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 { + CUarray pArray[3]; + void *pPitch[3]; +}; + +/* "cuda/bindings/cydriver.pxd":2567 + * void* pPitch[3] + * + * cdef struct CUeglFrame_st: # <<<<<<<<<<<<<< + * anon_union15 frame + * unsigned int width +*/ +struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st { + union __pyx_t_4cuda_8bindings_8cydriver_anon_union15 frame; + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int planeCount; + unsigned int numChannels; + __pyx_t_4cuda_8bindings_8cydriver_CUeglFrameType frameType; + __pyx_t_4cuda_8bindings_8cydriver_CUeglColorFormat eglColorFormat; + CUarray_format cuFormat; +}; + +/* "cuda/bindings/cydriver.pxd":2579 + * CUarray_format cuFormat + * + * ctypedef CUeglFrame_st CUeglFrame_v1 # <<<<<<<<<<<<<< + * + * ctypedef CUeglFrame_v1 CUeglFrame +*/ +typedef struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1; + +/* "cuda/bindings/cydriver.pxd":2581 + * ctypedef CUeglFrame_st CUeglFrame_v1 + * + * ctypedef CUeglFrame_v1 CUeglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_v1 __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame; + +/* "cuda/bindings/cydriver.pxd":2586 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* CUeglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum CUGLDeviceList_enum: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection; + +/* "cuda/bindings/cydriver.pxd":2593 + * CU_GL_DEVICE_LIST_NEXT_FRAME = 3 + * + * ctypedef CUGLDeviceList_enum CUGLDeviceList # <<<<<<<<<<<<<< + * + * cdef enum CUGLmap_flags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLDeviceList; + +/* "cuda/bindings/cydriver.pxd":2600 + * CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2 + * + * ctypedef CUGLmap_flags_enum CUGLmap_flags # <<<<<<<<<<<<<< + * + * ctypedef unsigned int GLenum +*/ +typedef enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags_enum __pyx_t_4cuda_8bindings_8cydriver_CUGLmap_flags; + +/* "cuda/bindings/cydriver.pxd":2609 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR; + +/* "cuda/bindings/cydriver.pxd":2614 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR; + +/* "cuda/bindings/cydriver.pxd":2621 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR; +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st; +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11; +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st; + +/* "cuda/bindings/cyruntime.pxd":39 + * ctypedef uint32_t VdpOutputSurface + * + * cdef enum cudaEglFrameType_enum: # <<<<<<<<<<<<<< + * cudaEglFrameTypeArray = 0 + * cudaEglFrameTypePitch = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypeArray = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglFrameTypePitch = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":45 + * ctypedef cudaEglFrameType_enum cudaEglFrameType + * + * cdef enum cudaEglResourceLocationFlags_enum: # <<<<<<<<<<<<<< + * cudaEglResourceLocationSysmem = 0 + * cudaEglResourceLocationVidmem = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationSysmem = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglResourceLocationVidmem = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":51 + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags + * + * cdef enum cudaEglColorFormat_enum: # <<<<<<<<<<<<<< + * cudaEglColorFormatYUV420Planar = 0 + * cudaEglColorFormatYUV420SemiPlanar = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar = 3, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatARGB = 6, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRGBA = 7, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatL = 8, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatR = 9, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar = 10, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar = 11, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV422 = 12, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY422 = 13, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatABGR = 14, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBGRA = 15, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatA = 16, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatRG = 17, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV = 18, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar = 19, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar = 20, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar = 21, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar = 22, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar = 23, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar = 24, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar = 25, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY_ER = 26, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY_ER = 27, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUYV_ER = 28, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU_ER = 29, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA_ER = 31, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatAYUV_ER = 32, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444Planar_ER = 33, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422Planar_ER = 34, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_ER = 35, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV444SemiPlanar_ER = 36, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV422SemiPlanar_ER = 37, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_ER = 38, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar_ER = 39, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar_ER = 40, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_ER = 41, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444SemiPlanar_ER = 42, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422SemiPlanar_ER = 43, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_ER = 44, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRGGB = 45, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBGGR = 46, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGRBG = 47, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerGBRG = 48, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10RGGB = 49, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10BGGR = 50, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GRBG = 51, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10GBRG = 52, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RGGB = 53, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BGGR = 54, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GRBG = 55, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12GBRG = 56, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14RGGB = 57, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14BGGR = 58, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GRBG = 59, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer14GBRG = 60, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20RGGB = 61, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20BGGR = 62, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GRBG = 63, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer20GBRG = 64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU444Planar = 65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU422Planar = 66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar = 67, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspRGGB = 68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspBGGR = 69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGRBG = 70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerIspGBRG = 71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerBCCR = 72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerRCCB = 73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCRBC = 74, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayerCBRC = 75, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer10CCCC = 76, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12BCCR = 77, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12RCCB = 78, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CRBC = 79, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CBRC = 80, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatBayer12CCCC = 81, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY = 82, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_2020 = 83, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_2020 = 84, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_2020 = 85, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_2020 = 86, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420SemiPlanar_709 = 87, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420SemiPlanar_709 = 88, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUV420Planar_709 = 89, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVU420Planar_709 = 90, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar = 94, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_ER = 96, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY_709_ER = 97, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_ER = 98, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10_709_ER = 99, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_ER = 0x64, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12_709_ER = 0x65, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYUVA = 0x66, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatYVYU = 0x68, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatVYUY = 0x69, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 0x6A, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 0x6B, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 0x6C, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 0x6D, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 0x6E, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 0x6F, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 0x70, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 0x71, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709 = 0x72, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY709_ER = 0x73, + __pyx_e_4cuda_8bindings_9cyruntime_cudaEglColorFormatUYVY2020 = 0x74 +}; + +/* "cuda/bindings/cyruntime.pxd":197 + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection + * + * cdef enum cudaGLDeviceList: # <<<<<<<<<<<<<< + * cudaGLDeviceListAll = 1 + * cudaGLDeviceListCurrentFrame = 2 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLDeviceList { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListAll = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListCurrentFrame = 2, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLDeviceListNextFrame = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":202 + * cudaGLDeviceListNextFrame = 3 + * + * cdef enum cudaGLMapFlags: # <<<<<<<<<<<<<< + * cudaGLMapFlagsNone = 0 + * cudaGLMapFlagsReadOnly = 1 +*/ +enum __pyx_t_4cuda_8bindings_9cyruntime_cudaGLMapFlags { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsNone = 0, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsReadOnly = 1, + __pyx_e_4cuda_8bindings_9cyruntime_cudaGLMapFlagsWriteDiscard = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":831 + * cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil + * + * cdef enum: cudaHostAllocDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":833 + * cdef enum: cudaHostAllocDefault = 0 + * + * cdef enum: cudaHostAllocPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":835 + * cdef enum: cudaHostAllocPortable = 1 + * + * cdef enum: cudaHostAllocMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostAllocWriteCombined = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":837 + * cdef enum: cudaHostAllocMapped = 2 + * + * cdef enum: cudaHostAllocWriteCombined = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostAllocWriteCombined = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":839 + * cdef enum: cudaHostAllocWriteCombined = 4 + * + * cdef enum: cudaHostRegisterDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterPortable = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":841 + * cdef enum: cudaHostRegisterDefault = 0 + * + * cdef enum: cudaHostRegisterPortable = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterMapped = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterPortable = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":843 + * cdef enum: cudaHostRegisterPortable = 1 + * + * cdef enum: cudaHostRegisterMapped = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterIoMemory = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterMapped = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":845 + * cdef enum: cudaHostRegisterMapped = 2 + * + * cdef enum: cudaHostRegisterIoMemory = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaHostRegisterReadOnly = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterIoMemory = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":847 + * cdef enum: cudaHostRegisterIoMemory = 4 + * + * cdef enum: cudaHostRegisterReadOnly = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaPeerAccessDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaHostRegisterReadOnly = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":849 + * cdef enum: cudaHostRegisterReadOnly = 8 + * + * cdef enum: cudaPeerAccessDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaPeerAccessDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":851 + * cdef enum: cudaPeerAccessDefault = 0 + * + * cdef enum: cudaStreamDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamNonBlocking = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":853 + * cdef enum: cudaStreamDefault = 0 + * + * cdef enum: cudaStreamNonBlocking = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamLegacy = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamNonBlocking = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":855 + * cdef enum: cudaStreamNonBlocking = 1 + * + * cdef enum: cudaStreamLegacy = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamPerThread = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamLegacy = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":857 + * cdef enum: cudaStreamLegacy = 1 + * + * cdef enum: cudaStreamPerThread = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamPerThread = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":859 + * cdef enum: cudaStreamPerThread = 2 + * + * cdef enum: cudaEventDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventBlockingSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":861 + * cdef enum: cudaEventDefault = 0 + * + * cdef enum: cudaEventBlockingSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventDisableTiming = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventBlockingSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":863 + * cdef enum: cudaEventBlockingSync = 1 + * + * cdef enum: cudaEventDisableTiming = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventInterprocess = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventDisableTiming = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":865 + * cdef enum: cudaEventDisableTiming = 2 + * + * cdef enum: cudaEventInterprocess = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventInterprocess = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":867 + * cdef enum: cudaEventInterprocess = 4 + * + * cdef enum: cudaEventRecordDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventRecordExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":869 + * cdef enum: cudaEventRecordDefault = 0 + * + * cdef enum: cudaEventRecordExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventRecordExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":871 + * cdef enum: cudaEventRecordExternal = 1 + * + * cdef enum: cudaEventWaitDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaEventWaitExternal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":873 + * cdef enum: cudaEventWaitDefault = 0 + * + * cdef enum: cudaEventWaitExternal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleAuto = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaEventWaitExternal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":875 + * cdef enum: cudaEventWaitExternal = 1 + * + * cdef enum: cudaDeviceScheduleAuto = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleSpin = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleAuto = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":877 + * cdef enum: cudaDeviceScheduleAuto = 0 + * + * cdef enum: cudaDeviceScheduleSpin = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleYield = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleSpin = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":879 + * cdef enum: cudaDeviceScheduleSpin = 1 + * + * cdef enum: cudaDeviceScheduleYield = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleYield = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":881 + * cdef enum: cudaDeviceScheduleYield = 2 + * + * cdef enum: cudaDeviceScheduleBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceBlockingSync = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":883 + * cdef enum: cudaDeviceScheduleBlockingSync = 4 + * + * cdef enum: cudaDeviceBlockingSync = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceScheduleMask = 7 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceBlockingSync = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":885 + * cdef enum: cudaDeviceBlockingSync = 4 + * + * cdef enum: cudaDeviceScheduleMask = 7 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMapHost = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceScheduleMask = 7 +}; + +/* "cuda/bindings/cyruntime.pxd":887 + * cdef enum: cudaDeviceScheduleMask = 7 + * + * cdef enum: cudaDeviceMapHost = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMapHost = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":889 + * cdef enum: cudaDeviceMapHost = 8 + * + * cdef enum: cudaDeviceLmemResizeToMax = 16 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceSyncMemops = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceLmemResizeToMax = 16 +}; + +/* "cuda/bindings/cyruntime.pxd":891 + * cdef enum: cudaDeviceLmemResizeToMax = 16 + * + * cdef enum: cudaDeviceSyncMemops = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaDeviceMask = 255 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceSyncMemops = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":893 + * cdef enum: cudaDeviceSyncMemops = 128 + * + * cdef enum: cudaDeviceMask = 255 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaDeviceMask = 0xFF +}; + +/* "cuda/bindings/cyruntime.pxd":895 + * cdef enum: cudaDeviceMask = 255 + * + * cdef enum: cudaArrayDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayLayered = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":897 + * cdef enum: cudaArrayDefault = 0 + * + * cdef enum: cudaArrayLayered = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySurfaceLoadStore = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayLayered = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":899 + * cdef enum: cudaArrayLayered = 1 + * + * cdef enum: cudaArraySurfaceLoadStore = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayCubemap = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySurfaceLoadStore = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":901 + * cdef enum: cudaArraySurfaceLoadStore = 2 + * + * cdef enum: cudaArrayCubemap = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayTextureGather = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayCubemap = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":903 + * cdef enum: cudaArrayCubemap = 4 + * + * cdef enum: cudaArrayTextureGather = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayColorAttachment = 32 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayTextureGather = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":905 + * cdef enum: cudaArrayTextureGather = 8 + * + * cdef enum: cudaArrayColorAttachment = 32 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparse = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayColorAttachment = 32 +}; + +/* "cuda/bindings/cyruntime.pxd":907 + * cdef enum: cudaArrayColorAttachment = 32 + * + * cdef enum: cudaArraySparse = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArrayDeferredMapping = 128 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparse = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":909 + * cdef enum: cudaArraySparse = 64 + * + * cdef enum: cudaArrayDeferredMapping = 128 # <<<<<<<<<<<<<< + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArrayDeferredMapping = 0x80 +}; + +/* "cuda/bindings/cyruntime.pxd":911 + * cdef enum: cudaArrayDeferredMapping = 128 + * + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachGlobal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaIpcMemLazyEnablePeerAccess = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":913 + * cdef enum: cudaIpcMemLazyEnablePeerAccess = 1 + * + * cdef enum: cudaMemAttachGlobal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachHost = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachGlobal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":915 + * cdef enum: cudaMemAttachGlobal = 1 + * + * cdef enum: cudaMemAttachHost = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemAttachSingle = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachHost = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":917 + * cdef enum: cudaMemAttachHost = 2 + * + * cdef enum: cudaMemAttachSingle = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemAttachSingle = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":919 + * cdef enum: cudaMemAttachSingle = 4 + * + * cdef enum: cudaOccupancyDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":921 + * cdef enum: cudaOccupancyDefault = 0 + * + * cdef enum: cudaOccupancyDisableCachingOverride = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCpuDeviceId = -1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaOccupancyDisableCachingOverride = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":923 + * cdef enum: cudaOccupancyDisableCachingOverride = 1 + * + * cdef enum: cudaCpuDeviceId = -1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInvalidDeviceId = -2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCpuDeviceId = -1L +}; + +/* "cuda/bindings/cyruntime.pxd":925 + * cdef enum: cudaCpuDeviceId = -1 + * + * cdef enum: cudaInvalidDeviceId = -2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInvalidDeviceId = -2L +}; + +/* "cuda/bindings/cyruntime.pxd":927 + * cdef enum: cudaInvalidDeviceId = -2 + * + * cdef enum: cudaInitDeviceFlagsAreValid = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaInitDeviceFlagsAreValid = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":929 + * cdef enum: cudaInitDeviceFlagsAreValid = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPreSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":931 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPreSync = 1 + * + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaCooperativeLaunchMultiDeviceNoPostSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":933 + * cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 + * + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaArraySparsePropertiesSingleMipTail = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":935 + * cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 + * + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaMemPoolCreateUsageHwDecompress = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":937 + * cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 + * + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalMemoryDedicated = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_IPC_HANDLE_SIZE = 64 +}; + +/* "cuda/bindings/cyruntime.pxd":939 + * cdef enum: CUDA_IPC_HANDLE_SIZE = 64 + * + * cdef enum: cudaExternalMemoryDedicated = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalMemoryDedicated = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":941 + * cdef enum: cudaExternalMemoryDedicated = 1 + * + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":943 + * cdef enum: cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1 + * + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":945 + * cdef enum: cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2 + * + * cdef enum: cudaNvSciSyncAttrSignal = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaNvSciSyncAttrWait = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrSignal = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":947 + * cdef enum: cudaNvSciSyncAttrSignal = 1 + * + * cdef enum: cudaNvSciSyncAttrWait = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaNvSciSyncAttrWait = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":949 + * cdef enum: cudaNvSciSyncAttrWait = 2 + * + * cdef enum: cudaGraphKernelNodePortDefault = 0 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortDefault = 0 +}; + +/* "cuda/bindings/cyruntime.pxd":951 + * cdef enum: cudaGraphKernelNodePortDefault = 0 + * + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortProgrammatic = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":953 + * cdef enum: cudaGraphKernelNodePortProgrammatic = 1 + * + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaGraphKernelNodePortLaunchCompletion = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":955 + * cdef enum: cudaGraphKernelNodePortLaunchCompletion = 2 + * + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":957 + * cdef enum: cudaStreamAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeSynchronizationPolicy = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":959 + * cdef enum: cudaStreamAttributeSynchronizationPolicy = 3 + * + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":961 + * cdef enum: cudaStreamAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaStreamAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":963 + * cdef enum: cudaStreamAttributeMemSyncDomain = 10 + * + * cdef enum: cudaStreamAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaStreamAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":965 + * cdef enum: cudaStreamAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeAccessPolicyWindow = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":967 + * cdef enum: cudaKernelNodeAttributeAccessPolicyWindow = 1 + * + * cdef enum: cudaKernelNodeAttributeCooperative = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePriority = 8 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeCooperative = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":969 + * cdef enum: cudaKernelNodeAttributeCooperative = 2 + * + * cdef enum: cudaKernelNodeAttributePriority = 8 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePriority = 8 +}; + +/* "cuda/bindings/cyruntime.pxd":971 + * cdef enum: cudaKernelNodeAttributePriority = 8 + * + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterDimension = 4 +}; + +/* "cuda/bindings/cyruntime.pxd":973 + * cdef enum: cudaKernelNodeAttributeClusterDimension = 4 + * + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 +}; + +/* "cuda/bindings/cyruntime.pxd":975 + * cdef enum: cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomainMap = 9 +}; + +/* "cuda/bindings/cyruntime.pxd":977 + * cdef enum: cudaKernelNodeAttributeMemSyncDomainMap = 9 + * + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeMemSyncDomain = 10 +}; + +/* "cuda/bindings/cyruntime.pxd":979 + * cdef enum: cudaKernelNodeAttributeMemSyncDomain = 10 + * + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 # <<<<<<<<<<<<<< + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 +}; + +/* "cuda/bindings/cyruntime.pxd":981 + * cdef enum: cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14 + * + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 +}; + +/* "cuda/bindings/cyruntime.pxd":983 + * cdef enum: cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13 + * + * cdef enum: cudaSurfaceType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":985 + * cdef enum: cudaSurfaceType1D = 1 + * + * cdef enum: cudaSurfaceType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":987 + * cdef enum: cudaSurfaceType2D = 2 + * + * cdef enum: cudaSurfaceType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":989 + * cdef enum: cudaSurfaceType3D = 3 + * + * cdef enum: cudaSurfaceTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":991 + * cdef enum: cudaSurfaceTypeCubemap = 12 + * + * cdef enum: cudaSurfaceType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":993 + * cdef enum: cudaSurfaceType1DLayered = 241 + * + * cdef enum: cudaSurfaceType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":995 + * cdef enum: cudaSurfaceType2DLayered = 242 + * + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1D = 1 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaSurfaceTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":997 + * cdef enum: cudaSurfaceTypeCubemapLayered = 252 + * + * cdef enum: cudaTextureType1D = 1 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2D = 2 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1D = 1 +}; + +/* "cuda/bindings/cyruntime.pxd":999 + * cdef enum: cudaTextureType1D = 1 + * + * cdef enum: cudaTextureType2D = 2 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType3D = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2D = 2 +}; + +/* "cuda/bindings/cyruntime.pxd":1001 + * cdef enum: cudaTextureType2D = 2 + * + * cdef enum: cudaTextureType3D = 3 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemap = 12 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType3D = 3 +}; + +/* "cuda/bindings/cyruntime.pxd":1003 + * cdef enum: cudaTextureType3D = 3 + * + * cdef enum: cudaTextureTypeCubemap = 12 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType1DLayered = 241 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemap = 12 +}; + +/* "cuda/bindings/cyruntime.pxd":1005 + * cdef enum: cudaTextureTypeCubemap = 12 + * + * cdef enum: cudaTextureType1DLayered = 241 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureType2DLayered = 242 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType1DLayered = 0xF1 +}; + +/* "cuda/bindings/cyruntime.pxd":1007 + * cdef enum: cudaTextureType1DLayered = 241 + * + * cdef enum: cudaTextureType2DLayered = 242 # <<<<<<<<<<<<<< + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureType2DLayered = 0xF2 +}; + +/* "cuda/bindings/cyruntime.pxd":1009 + * cdef enum: cudaTextureType2DLayered = 242 + * + * cdef enum: cudaTextureTypeCubemapLayered = 252 # <<<<<<<<<<<<<< + * + * cdef enum: CUDART_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_cudaTextureTypeCubemapLayered = 0xFC +}; + +/* "cuda/bindings/cyruntime.pxd":1011 + * cdef enum: cudaTextureTypeCubemapLayered = 252 + * + * cdef enum: CUDART_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: __CUDART_API_VERSION = 12090 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDART_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1013 + * cdef enum: CUDART_VERSION = 12090 + * + * cdef enum: __CUDART_API_VERSION = 12090 # <<<<<<<<<<<<<< + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime___CUDART_API_VERSION = 0x2F3A +}; + +/* "cuda/bindings/cyruntime.pxd":1015 + * cdef enum: __CUDART_API_VERSION = 12090 + * + * cdef enum: CUDA_EGL_MAX_PLANES = 3 # <<<<<<<<<<<<<< +*/ +enum { + __pyx_e_4cuda_8bindings_9cyruntime_CUDA_EGL_MAX_PLANES = 3 +}; + +/* "cuda/bindings/cyruntime_types.pxi":1553 + * cudaRoundMinInf = 3 + * + * ctypedef cudaLaunchAttributeID cudaStreamAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1555 + * ctypedef cudaLaunchAttributeID cudaStreamAttrID + * + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue +*/ +typedef enum cudaLaunchAttributeID __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrID; + +/* "cuda/bindings/cyruntime_types.pxi":1557 + * ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID + * + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue # <<<<<<<<<<<<<< + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaStreamAttrValue; + +/* "cuda/bindings/cyruntime_types.pxi":1559 + * ctypedef cudaLaunchAttributeValue cudaStreamAttrValue + * + * ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue # <<<<<<<<<<<<<< +*/ +typedef union cudaLaunchAttributeValue __pyx_t_4cuda_8bindings_9cyruntime_cudaKernelNodeAttrValue; + +/* "cuda/bindings/cyruntime.pxd":17 + * cdef struct void: + * pass + * ctypedef void* EGLImageKHR # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLImageKHR; + +/* "cuda/bindings/cyruntime.pxd":22 + * cdef struct void: + * pass + * ctypedef void* EGLStreamKHR # <<<<<<<<<<<<<< + * + * ctypedef unsigned int EGLint +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLStreamKHR; + +/* "cuda/bindings/cyruntime.pxd":29 + * cdef struct void: + * pass + * ctypedef void* EGLSyncKHR # <<<<<<<<<<<<<< + * + * ctypedef uint32_t VdpDevice +*/ +typedef void *__pyx_t_4cuda_8bindings_9cyruntime_EGLSyncKHR; + +/* "cuda/bindings/cyruntime.pxd":43 + * cudaEglFrameTypePitch = 1 + * + * ctypedef cudaEglFrameType_enum cudaEglFrameType # <<<<<<<<<<<<<< + * + * cdef enum cudaEglResourceLocationFlags_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType; + +/* "cuda/bindings/cyruntime.pxd":49 + * cudaEglResourceLocationVidmem = 1 + * + * ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags # <<<<<<<<<<<<<< + * + * cdef enum cudaEglColorFormat_enum: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglResourceLocationFlags; + +/* "cuda/bindings/cyruntime.pxd":166 + * cudaEglColorFormatUYVY2020 = 116 + * + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat # <<<<<<<<<<<<<< + * + * cdef struct cudaEglPlaneDesc_st: +*/ +typedef enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat_enum __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat; + +/* "cuda/bindings/cyruntime.pxd":168 + * ctypedef cudaEglColorFormat_enum cudaEglColorFormat + * + * cdef struct cudaEglPlaneDesc_st: # <<<<<<<<<<<<<< + * unsigned int width + * unsigned int height +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st { + unsigned int width; + unsigned int height; + unsigned int depth; + unsigned int pitch; + unsigned int numChannels; + struct cudaChannelFormatDesc channelDesc; + unsigned int reserved[4]; +}; + +/* "cuda/bindings/cyruntime.pxd":177 + * unsigned int reserved[4] + * + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc # <<<<<<<<<<<<<< + * + * cdef union anon_union11: +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc; + +/* "cuda/bindings/cyruntime.pxd":179 + * ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc + * + * cdef union anon_union11: # <<<<<<<<<<<<<< + * cudaArray_t pArray[3] + * cudaPitchedPtr pPitch[3] +*/ +union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 { + cudaArray_t pArray[3]; + struct cudaPitchedPtr pPitch[3]; +}; + +/* "cuda/bindings/cyruntime.pxd":183 + * cudaPitchedPtr pPitch[3] + * + * cdef struct cudaEglFrame_st: # <<<<<<<<<<<<<< + * anon_union11 frame + * cudaEglPlaneDesc planeDesc[3] +*/ +struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st { + union __pyx_t_4cuda_8bindings_9cyruntime_anon_union11 frame; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglPlaneDesc planeDesc[3]; + unsigned int planeCount; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrameType frameType; + __pyx_t_4cuda_8bindings_9cyruntime_cudaEglColorFormat eglColorFormat; +}; + +/* "cuda/bindings/cyruntime.pxd":190 + * cudaEglColorFormat eglColorFormat + * + * ctypedef cudaEglFrame_st cudaEglFrame # <<<<<<<<<<<<<< + * + * cdef extern from "": +*/ +typedef struct __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame_st __pyx_t_4cuda_8bindings_9cyruntime_cudaEglFrame; + +/* "cuda/bindings/cyruntime.pxd":195 + * cdef struct CUeglStreamConnection_st: + * pass + * ctypedef CUeglStreamConnection_st* cudaEglStreamConnection # <<<<<<<<<<<<<< + * + * cdef enum cudaGLDeviceList: +*/ +typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_8bindings_9cyruntime_cudaEglStreamConnection; + +/* "cuda/bindings/_lib/utils.pxd":9 + * from libcpp.vector cimport vector + * + * cdef class _HelperKernelParams: # <<<<<<<<<<<<<< + * cdef Py_buffer _pybuffer + * cdef bint _pyobj_acquired +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams { + PyObject_HEAD + Py_buffer _pybuffer; + int _pyobj_acquired; + void **_ckernelParams; + char *_ckernelParamsData; + int _length; + int _malloc_list_created; +}; + + +/* "cuda/bindings/_lib/utils.pxd":17 + * cdef bint _malloc_list_created + * + * cdef class _HelperInputVoidPtr: # <<<<<<<<<<<<<< + * cdef Py_buffer _pybuffer + * cdef void* _cptr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr { + PyObject_HEAD + Py_buffer _pybuffer; + void *_cptr; + int _pyobj_acquired; +}; + + +/* "cuda/bindings/_lib/utils.pxd":22 + * cdef bint _pyobj_acquired + * + * cdef class _HelperCUmemPool_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmemPool_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute { + PyObject_HEAD + void *_cptr; + enum CUmemPool_attribute_enum _attr; + int _is_getter; + int _int_val; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_cuuint64_t_val; +}; + + +/* "cuda/bindings/_lib/utils.pxd":31 + * cdef driver.cuuint64_t _cuuint64_t_val + * + * cdef class _HelperCUmem_range_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmem_range_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute { + PyObject_HEAD + void *_cptr; + enum CUmem_range_attribute_enum _attr; + size_t _data_size; + int _int_val; + int *_int_val_list; +}; + + +/* "cuda/bindings/_lib/utils.pxd":40 + * cdef int* _int_val_list # 32 bit integer array + * + * cdef class _HelperCUpointer_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUpointer_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute { + PyObject_HEAD + void *_cptr; + enum CUpointer_attribute_enum _attr; + int _is_getter; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; + unsigned int _uint; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_devptr; + void **_void; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *_token; + int _bool; + unsigned PY_LONG_LONG _ull; + size_t _size; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool *_mempool; +}; + + +/* "cuda/bindings/_lib/utils.pxd":56 + * cdef driver.CUmemoryPool _mempool + * + * cdef class _HelperCUgraphMem_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUgraphMem_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute { + PyObject_HEAD + void *_cptr; + enum CUgraphMem_attribute_enum _attr; + int _is_getter; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_cuuint64_t_val; +}; + + +/* "cuda/bindings/_lib/utils.pxd":64 + * cdef driver.cuuint64_t _cuuint64_t_val + * + * cdef class _HelperCUjit_option: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUjit_option_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option { + PyObject_HEAD + void *_cptr; + enum CUjit_option_enum _attr; + unsigned int _uint; + float _float; + char *_charstar; + enum CUjit_target_enum _target; + enum CUjit_fallback_enum _fallback; + int _int; + enum CUjit_cacheMode_enum _cacheMode; + std::vector _charstarstar; + struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper *_voidstarstar; +}; + + +/* "cuda/bindings/_lib/utils.pxd":79 + * cdef _InputVoidPtrPtrHelper _voidstarstar # list of addresses + * + * cdef class _HelperCudaJitOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cyruntime.cudaJitOption _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption { + PyObject_HEAD + void *_cptr; + enum cudaJitOption _attr; + unsigned int _uint; + float _float; + char *_charstar; + enum cudaJit_Fallback _fallback; + int _int; + enum cudaJit_CacheMode _cacheMode; +}; + + +/* "cuda/bindings/_lib/utils.pxd":91 + * cdef cyruntime.cudaJit_CacheMode _cacheMode + * + * cdef class _HelperCUlibraryOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUlibraryOption_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption { + PyObject_HEAD + void *_cptr; + enum CUlibraryOption_enum _attr; + unsigned int _uint; +}; + + +/* "cuda/bindings/_lib/utils.pxd":98 + * cdef unsigned int _uint + * + * cdef class _HelperCudaLibraryOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cyruntime.cudaLibraryOption _attr +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption { + PyObject_HEAD + void *_cptr; + enum cudaLibraryOption _attr; + unsigned int _uint; +}; + + +/* "cuda/bindings/_lib/utils.pxd":105 + * cdef unsigned int _uint + * + * cdef class _HelperCUmemAllocationHandleType: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmemAllocationHandleType_enum _type +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType { + PyObject_HEAD + void *_cptr; + enum CUmemAllocationHandleType_enum _type; + int _int; + void *_handle; + unsigned int _d3dkmt_handle; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle *_mem_fabric_handle; +}; + + +/* "cuda/bindings/_lib/utils.pxd":115 + * cdef driver.CUmemFabricHandle _mem_fabric_handle + * + * cdef class _InputVoidPtrPtrHelper: # <<<<<<<<<<<<<< + * cdef void** _cptr + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper { + PyObject_HEAD + void **_cptr; +}; + + +/* "cuda/bindings/_lib/utils.pxd":118 + * cdef void** _cptr + * + * cdef class _HelperCUcoredumpSettings: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUcoredumpSettings_enum _attrib +*/ +struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings { + PyObject_HEAD + void *_cptr; + enum CUcoredumpSettings_enum _attrib; + int _is_getter; + size_t _size; + int _bool; + char *_charstar; +}; + + +/* "cuda/bindings/driver.pxd":9 + * include "_lib/utils.pxd" + * + * cdef class CUcontext: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcontext { + PyObject_HEAD + CUcontext _pvt_val; + CUcontext *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":23 + * cdef cydriver.CUcontext* _pvt_ptr + * + * cdef class CUmodule: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmodule { + PyObject_HEAD + CUmodule _pvt_val; + CUmodule *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":37 + * cdef cydriver.CUmodule* _pvt_ptr + * + * cdef class CUfunction: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUfunction { + PyObject_HEAD + CUfunction _pvt_val; + CUfunction *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":51 + * cdef cydriver.CUfunction* _pvt_ptr + * + * cdef class CUlibrary: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary { + PyObject_HEAD + CUlibrary _pvt_val; + CUlibrary *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":65 + * cdef cydriver.CUlibrary* _pvt_ptr + * + * cdef class CUkernel: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUkernel { + PyObject_HEAD + CUkernel _pvt_val; + CUkernel *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":79 + * cdef cydriver.CUkernel* _pvt_ptr + * + * cdef class CUarray: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUarray { + PyObject_HEAD + CUarray _pvt_val; + CUarray *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":93 + * cdef cydriver.CUarray* _pvt_ptr + * + * cdef class CUmipmappedArray: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray { + PyObject_HEAD + CUmipmappedArray _pvt_val; + CUmipmappedArray *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":107 + * cdef cydriver.CUmipmappedArray* _pvt_ptr + * + * cdef class CUtexref: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUtexref { + PyObject_HEAD + CUtexref _pvt_val; + CUtexref *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":121 + * cdef cydriver.CUtexref* _pvt_ptr + * + * cdef class CUsurfref: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref { + PyObject_HEAD + CUsurfref _pvt_val; + CUsurfref *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":135 + * cdef cydriver.CUsurfref* _pvt_ptr + * + * cdef class CUevent: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUevent { + PyObject_HEAD + CUevent _pvt_val; + CUevent *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":149 + * cdef cydriver.CUevent* _pvt_ptr + * + * cdef class CUstream: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstream { + PyObject_HEAD + CUstream _pvt_val; + CUstream *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":163 + * cdef cydriver.CUstream* _pvt_ptr + * + * cdef class CUgraphicsResource: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource { + PyObject_HEAD + CUgraphicsResource _pvt_val; + CUgraphicsResource *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":177 + * cdef cydriver.CUgraphicsResource* _pvt_ptr + * + * cdef class CUexternalMemory: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory { + PyObject_HEAD + CUexternalMemory _pvt_val; + CUexternalMemory *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":191 + * cdef cydriver.CUexternalMemory* _pvt_ptr + * + * cdef class CUexternalSemaphore: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore { + PyObject_HEAD + CUexternalSemaphore _pvt_val; + CUexternalSemaphore *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":205 + * cdef cydriver.CUexternalSemaphore* _pvt_ptr + * + * cdef class CUgraph: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraph { + PyObject_HEAD + CUgraph _pvt_val; + CUgraph *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":219 + * cdef cydriver.CUgraph* _pvt_ptr + * + * cdef class CUgraphNode: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode { + PyObject_HEAD + CUgraphNode _pvt_val; + CUgraphNode *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":233 + * cdef cydriver.CUgraphNode* _pvt_ptr + * + * cdef class CUgraphExec: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec { + PyObject_HEAD + CUgraphExec _pvt_val; + CUgraphExec *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":247 + * cdef cydriver.CUgraphExec* _pvt_ptr + * + * cdef class CUmemoryPool: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool { + PyObject_HEAD + CUmemoryPool _pvt_val; + CUmemoryPool *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":261 + * cdef cydriver.CUmemoryPool* _pvt_ptr + * + * cdef class CUuserObject: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject { + PyObject_HEAD + CUuserObject _pvt_val; + CUuserObject *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":275 + * cdef cydriver.CUuserObject* _pvt_ptr + * + * cdef class CUgraphDeviceNode: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode { + PyObject_HEAD + CUgraphDeviceNode _pvt_val; + CUgraphDeviceNode *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":289 + * cdef cydriver.CUgraphDeviceNode* _pvt_ptr + * + * cdef class CUasyncCallbackHandle: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle { + PyObject_HEAD + CUasyncCallbackHandle _pvt_val; + CUasyncCallbackHandle *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":303 + * cdef cydriver.CUasyncCallbackHandle* _pvt_ptr + * + * cdef class CUgreenCtx: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx { + PyObject_HEAD + CUgreenCtx _pvt_val; + CUgreenCtx *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":317 + * cdef cydriver.CUgreenCtx* _pvt_ptr + * + * cdef class CUlinkState: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState { + PyObject_HEAD + CUlinkState _pvt_val; + CUlinkState *_pvt_ptr; + PyObject *_keepalive; +}; + + +/* "cuda/bindings/driver.pxd":330 + * cdef list _keepalive + * + * cdef class CUdevResourceDesc: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc { + PyObject_HEAD + CUdevResourceDesc _pvt_val; + CUdevResourceDesc *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":344 + * cdef cydriver.CUdevResourceDesc* _pvt_ptr + * + * cdef class CUlogsCallbackHandle: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle { + PyObject_HEAD + CUlogsCallbackHandle _pvt_val; + CUlogsCallbackHandle *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":356 + * cdef cydriver.CUlogsCallbackHandle* _pvt_ptr + * + * cdef class CUeglStreamConnection: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_CUeglStreamConnection *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":370 + * cdef cydriver.CUeglStreamConnection* _pvt_ptr + * + * cdef class EGLImageKHR: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_EGLImageKHR *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":382 + * cdef cydriver.EGLImageKHR* _pvt_ptr + * + * cdef class EGLStreamKHR: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_EGLStreamKHR *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":394 + * cdef cydriver.EGLStreamKHR* _pvt_ptr + * + * cdef class EGLSyncKHR: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_EGLSyncKHR *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":406 + * cdef cydriver.EGLSyncKHR* _pvt_ptr + * + * cdef class CUasyncCallback: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback { + PyObject_HEAD + CUasyncCallback _pvt_val; + CUasyncCallback *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":418 + * cdef cydriver.CUasyncCallback* _pvt_ptr + * + * cdef class CUhostFn: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn { + PyObject_HEAD + CUhostFn _pvt_val; + CUhostFn *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":430 + * cdef cydriver.CUhostFn* _pvt_ptr + * + * cdef class CUstreamCallback: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback { + PyObject_HEAD + CUstreamCallback _pvt_val; + CUstreamCallback *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":442 + * cdef cydriver.CUstreamCallback* _pvt_ptr + * + * cdef class CUoccupancyB2DSize: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize { + PyObject_HEAD + CUoccupancyB2DSize _pvt_val; + CUoccupancyB2DSize *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":454 + * cdef cydriver.CUoccupancyB2DSize* _pvt_ptr + * + * cdef class CUlogsCallback: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback { + PyObject_HEAD + CUlogsCallback _pvt_val; + CUlogsCallback *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":466 + * cdef cydriver.CUlogsCallback* _pvt_ptr + * + * cdef class CUuuid_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st { + PyObject_HEAD + struct CUuuid_st _pvt_val; + struct CUuuid_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":481 + * cdef cydriver.CUuuid_st* _pvt_ptr + * + * cdef class CUmemFabricHandle_st: # <<<<<<<<<<<<<< + * """ + * Fabric handle - An opaque handle representing a memory allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st { + PyObject_HEAD + struct CUmemFabricHandle_st _pvt_val; + struct CUmemFabricHandle_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":501 + * cdef cydriver.CUmemFabricHandle_st* _pvt_ptr + * + * cdef class CUipcEventHandle_st: # <<<<<<<<<<<<<< + * """ + * CUDA IPC event handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st { + PyObject_HEAD + struct CUipcEventHandle_st _pvt_val; + struct CUipcEventHandle_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":518 + * cdef cydriver.CUipcEventHandle_st* _pvt_ptr + * + * cdef class CUipcMemHandle_st: # <<<<<<<<<<<<<< + * """ + * CUDA IPC mem handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st { + PyObject_HEAD + struct CUipcMemHandle_st _pvt_val; + struct CUipcMemHandle_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":535 + * cdef cydriver.CUipcMemHandle_st* _pvt_ptr + * + * cdef class CUstreamMemOpWaitValueParams_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st { + PyObject_HEAD + union CUstreamBatchMemOpParams_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_address; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t *_value; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_value64; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_alias; +}; + + +/* "cuda/bindings/driver.pxd":563 + * cdef CUdeviceptr _alias + * + * cdef class CUstreamMemOpWriteValueParams_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st { + PyObject_HEAD + union CUstreamBatchMemOpParams_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_address; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t *_value; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_value64; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_alias; +}; + + +/* "cuda/bindings/driver.pxd":591 + * cdef CUdeviceptr _alias + * + * cdef class CUstreamMemOpFlushRemoteWritesParams_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st { + PyObject_HEAD + union CUstreamBatchMemOpParams_union *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":607 + * cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + * + * cdef class CUstreamMemOpMemoryBarrierParams_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st { + PyObject_HEAD + union CUstreamBatchMemOpParams_union *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":623 + * cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + * + * cdef class CUstreamBatchMemOpParams_union: # <<<<<<<<<<<<<< + * """ + * Per-operation parameters for cuStreamBatchMemOp +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union { + PyObject_HEAD + union CUstreamBatchMemOpParams_union _pvt_val; + union CUstreamBatchMemOpParams_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st *_waitValue; + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st *_writeValue; + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st *_flushRemoteWrites; + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st *_memoryBarrier; +}; + + +/* "cuda/bindings/driver.pxd":654 + * cdef CUstreamMemOpMemoryBarrierParams_st _memoryBarrier + * + * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st { + PyObject_HEAD + struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st _pvt_val; + struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; + size_t _paramArray_length; + CUstreamBatchMemOpParams *_paramArray; +}; + + +/* "cuda/bindings/driver.pxd":678 + * cdef cydriver.CUstreamBatchMemOpParams* _paramArray + * + * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Batch memory operation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; + size_t _paramArray_length; + CUstreamBatchMemOpParams *_paramArray; +}; + + +/* "cuda/bindings/driver.pxd":704 + * cdef cydriver.CUstreamBatchMemOpParams* _paramArray + * + * cdef class anon_struct0: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0 { + PyObject_HEAD + struct CUasyncNotificationInfo_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":718 + * cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + * + * cdef class anon_union2: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union2 { + PyObject_HEAD + struct CUasyncNotificationInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0 *_overBudget; +}; + + +/* "cuda/bindings/driver.pxd":733 + * cdef anon_struct0 _overBudget + * + * cdef class CUasyncNotificationInfo_st: # <<<<<<<<<<<<<< + * """ + * Information passed to the user via the async notification callback +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st { + PyObject_HEAD + struct CUasyncNotificationInfo_st *_val_ptr; + struct CUasyncNotificationInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union2 *_info; +}; + + +/* "cuda/bindings/driver.pxd":754 + * cdef anon_union2 _info + * + * cdef class CUdevprop_st: # <<<<<<<<<<<<<< + * """ + * Legacy device properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st { + PyObject_HEAD + struct CUdevprop_st _pvt_val; + struct CUdevprop_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":789 + * cdef cydriver.CUdevprop_st* _pvt_ptr + * + * cdef class CUaccessPolicyWindow_st: # <<<<<<<<<<<<<< + * """ + * Specifies an access policy for a window, a contiguous extent of +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st { + PyObject_HEAD + struct CUaccessPolicyWindow_st _pvt_val; + struct CUaccessPolicyWindow_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":826 + * cdef cydriver.CUaccessPolicyWindow_st* _pvt_ptr + * + * cdef class CUDA_KERNEL_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_KERNEL_NODE_PARAMS_st _pvt_val; + struct CUDA_KERNEL_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUfunction *_func; + struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams *_cykernelParams; +}; + + +/* "cuda/bindings/driver.pxd":863 + * cdef _HelperKernelParams _cykernelParams + * + * cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_KERNEL_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_KERNEL_NODE_PARAMS_v2_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUfunction *_func; + struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams *_cykernelParams; + struct __pyx_obj_4cuda_8bindings_6driver_CUkernel *_kern; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; +}; + + +/* "cuda/bindings/driver.pxd":908 + * cdef CUcontext _ctx + * + * cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st { + PyObject_HEAD + struct CUDA_KERNEL_NODE_PARAMS_v3_st _pvt_val; + struct CUDA_KERNEL_NODE_PARAMS_v3_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUfunction *_func; + struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams *_cykernelParams; + struct __pyx_obj_4cuda_8bindings_6driver_CUkernel *_kern; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; +}; + + +/* "cuda/bindings/driver.pxd":953 + * cdef CUcontext _ctx + * + * cdef class CUDA_MEMSET_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Memset node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_MEMSET_NODE_PARAMS_st _pvt_val; + struct CUDA_MEMSET_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dst; +}; + + +/* "cuda/bindings/driver.pxd":981 + * cdef CUdeviceptr _dst + * + * cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Memset node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_MEMSET_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_MEMSET_NODE_PARAMS_v2_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dst; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; +}; + + +/* "cuda/bindings/driver.pxd":1012 + * cdef CUcontext _ctx + * + * cdef class CUDA_HOST_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Host node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_HOST_NODE_PARAMS_st _pvt_val; + struct CUDA_HOST_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn *_fn; +}; + + +/* "cuda/bindings/driver.pxd":1032 + * cdef CUhostFn _fn + * + * cdef class CUDA_HOST_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Host node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_HOST_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_HOST_NODE_PARAMS_v2_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn *_fn; +}; + + +/* "cuda/bindings/driver.pxd":1052 + * cdef CUhostFn _fn + * + * cdef class CUDA_CONDITIONAL_NODE_PARAMS: # <<<<<<<<<<<<<< + * """ + * Conditional node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS { + PyObject_HEAD + struct CUDA_CONDITIONAL_NODE_PARAMS _pvt_val; + struct CUDA_CONDITIONAL_NODE_PARAMS *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle *_handle; + size_t _phGraph_out_length; + CUgraph *_phGraph_out; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; +}; + + +/* "cuda/bindings/driver.pxd":1100 + * cdef CUcontext _ctx + * + * cdef class CUgraphEdgeData_st: # <<<<<<<<<<<<<< + * """ + * Optional annotation for edges in a CUDA graph. Note, all edges +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st { + PyObject_HEAD + struct CUgraphEdgeData_st _pvt_val; + struct CUgraphEdgeData_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1142 + * cdef cydriver.CUgraphEdgeData_st* _pvt_ptr + * + * cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Graph instantiation parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st { + PyObject_HEAD + struct CUDA_GRAPH_INSTANTIATE_PARAMS_st _pvt_val; + struct CUDA_GRAPH_INSTANTIATE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_flags; + struct __pyx_obj_4cuda_8bindings_6driver_CUstream *_hUploadStream; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode *_hErrNode_out; +}; + + +/* "cuda/bindings/driver.pxd":1168 + * cdef CUgraphNode _hErrNode_out + * + * cdef class CUlaunchMemSyncDomainMap_st: # <<<<<<<<<<<<<< + * """ + * Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st { + PyObject_HEAD + struct CUlaunchMemSyncDomainMap_st _pvt_val; + struct CUlaunchMemSyncDomainMap_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1193 + * cdef cydriver.CUlaunchMemSyncDomainMap_st* _pvt_ptr + * + * cdef class anon_struct1: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1 { + PyObject_HEAD + union CUlaunchAttributeValue_union *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1211 + * cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + * + * cdef class anon_struct2: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2 { + PyObject_HEAD + union CUlaunchAttributeValue_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUevent *_event; +}; + + +/* "cuda/bindings/driver.pxd":1230 + * cdef CUevent _event + * + * cdef class anon_struct3: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3 { + PyObject_HEAD + union CUlaunchAttributeValue_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUevent *_event; +}; + + +/* "cuda/bindings/driver.pxd":1247 + * cdef CUevent _event + * + * cdef class anon_struct4: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4 { + PyObject_HEAD + union CUlaunchAttributeValue_union *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1265 + * cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + * + * cdef class anon_struct5: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5 { + PyObject_HEAD + union CUlaunchAttributeValue_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode *_devNode; +}; + + +/* "cuda/bindings/driver.pxd":1282 + * cdef CUgraphDeviceNode _devNode + * + * cdef class CUlaunchAttributeValue_union: # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union { + PyObject_HEAD + union CUlaunchAttributeValue_union _pvt_val; + union CUlaunchAttributeValue_union *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow *_accessPolicyWindow; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1 *_clusterDim; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2 *_programmaticEvent; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3 *_launchCompletionEvent; + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap *_memSyncDomainMap; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4 *_preferredClusterDim; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5 *_deviceUpdatableKernelNode; +}; + + +/* "cuda/bindings/driver.pxd":1375 + * cdef anon_struct5 _deviceUpdatableKernelNode + * + * cdef class CUlaunchAttribute_st: # <<<<<<<<<<<<<< + * """ + * Launch attribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st { + PyObject_HEAD + struct CUlaunchAttribute_st _pvt_val; + struct CUlaunchAttribute_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue *_value; +}; + + +/* "cuda/bindings/driver.pxd":1395 + * cdef CUlaunchAttributeValue _value + * + * cdef class CUlaunchConfig_st: # <<<<<<<<<<<<<< + * """ + * CUDA extensible launch configuration +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st { + PyObject_HEAD + struct CUlaunchConfig_st _pvt_val; + struct CUlaunchConfig_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUstream *_hStream; + size_t _attrs_length; + CUlaunchAttribute *_attrs; +}; + + +/* "cuda/bindings/driver.pxd":1433 + * cdef cydriver.CUlaunchAttribute* _attrs + * + * cdef class CUexecAffinitySmCount_st: # <<<<<<<<<<<<<< + * """ + * Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st { + PyObject_HEAD + struct CUexecAffinitySmCount_st _pvt_val; + struct CUexecAffinitySmCount_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1450 + * cdef cydriver.CUexecAffinitySmCount_st* _pvt_ptr + * + * cdef class anon_union3: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union3 { + PyObject_HEAD + struct CUexecAffinityParam_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount *_smCount; +}; + + +/* "cuda/bindings/driver.pxd":1465 + * cdef CUexecAffinitySmCount _smCount + * + * cdef class CUexecAffinityParam_st: # <<<<<<<<<<<<<< + * """ + * Execution Affinity Parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st { + PyObject_HEAD + struct CUexecAffinityParam_st *_val_ptr; + struct CUexecAffinityParam_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union3 *_param; +}; + + +/* "cuda/bindings/driver.pxd":1485 + * cdef anon_union3 _param + * + * cdef class CUctxCigParam_st: # <<<<<<<<<<<<<< + * """ + * CIG Context Create Params +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st { + PyObject_HEAD + struct CUctxCigParam_st _pvt_val; + struct CUctxCigParam_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1504 + * cdef cydriver.CUctxCigParam_st* _pvt_ptr + * + * cdef class CUctxCreateParams_st: # <<<<<<<<<<<<<< + * """ + * Params for creating CUDA context Exactly one of execAffinityParams +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st { + PyObject_HEAD + struct CUctxCreateParams_st _pvt_val; + struct CUctxCreateParams_st *_pvt_ptr; + size_t _execAffinityParams_length; + CUexecAffinityParam *_execAffinityParams; + size_t _cigParams_length; + CUctxCigParam *_cigParams; +}; + + +/* "cuda/bindings/driver.pxd":1530 + * cdef cydriver.CUctxCigParam* _cigParams + * + * cdef class CUlibraryHostUniversalFunctionAndDataTable_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st { + PyObject_HEAD + struct CUlibraryHostUniversalFunctionAndDataTable_st _pvt_val; + struct CUlibraryHostUniversalFunctionAndDataTable_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1551 + * cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st* _pvt_ptr + * + * cdef class CUDA_MEMCPY2D_st: # <<<<<<<<<<<<<< + * """ + * 2D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st { + PyObject_HEAD + struct CUDA_MEMCPY2D_st _pvt_val; + struct CUDA_MEMCPY2D_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_srcDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_srcArray; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dstDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_dstArray; +}; + + +/* "cuda/bindings/driver.pxd":1602 + * cdef CUarray _dstArray + * + * cdef class CUDA_MEMCPY3D_st: # <<<<<<<<<<<<<< + * """ + * 3D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st { + PyObject_HEAD + struct CUDA_MEMCPY3D_st _pvt_val; + struct CUDA_MEMCPY3D_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_srcDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_srcArray; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dstDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_dstArray; +}; + + +/* "cuda/bindings/driver.pxd":1672 + * cdef CUarray _dstArray + * + * cdef class CUDA_MEMCPY3D_PEER_st: # <<<<<<<<<<<<<< + * """ + * 3D memory cross-context copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st { + PyObject_HEAD + struct CUDA_MEMCPY3D_PEER_st _pvt_val; + struct CUDA_MEMCPY3D_PEER_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_srcDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_srcArray; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_srcContext; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dstDevice; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_dstArray; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_dstContext; +}; + + +/* "cuda/bindings/driver.pxd":1745 + * cdef CUcontext _dstContext + * + * cdef class CUDA_MEMCPY_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Memcpy node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_MEMCPY_NODE_PARAMS_st _pvt_val; + struct CUDA_MEMCPY_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_copyCtx; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D *_copyParams; +}; + + +/* "cuda/bindings/driver.pxd":1770 + * cdef CUDA_MEMCPY3D _copyParams + * + * cdef class CUDA_ARRAY_DESCRIPTOR_st: # <<<<<<<<<<<<<< + * """ + * Array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st { + PyObject_HEAD + struct CUDA_ARRAY_DESCRIPTOR_st _pvt_val; + struct CUDA_ARRAY_DESCRIPTOR_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1793 + * cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st* _pvt_ptr + * + * cdef class CUDA_ARRAY3D_DESCRIPTOR_st: # <<<<<<<<<<<<<< + * """ + * 3D array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st { + PyObject_HEAD + struct CUDA_ARRAY3D_DESCRIPTOR_st _pvt_val; + struct CUDA_ARRAY3D_DESCRIPTOR_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1820 + * cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st* _pvt_ptr + * + * cdef class anon_struct6: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6 { + PyObject_HEAD + struct CUDA_ARRAY_SPARSE_PROPERTIES_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1838 + * cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + * + * cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: # <<<<<<<<<<<<<< + * """ + * CUDA array sparse properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st { + PyObject_HEAD + struct CUDA_ARRAY_SPARSE_PROPERTIES_st _pvt_val; + struct CUDA_ARRAY_SPARSE_PROPERTIES_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6 *_tileExtent; +}; + + +/* "cuda/bindings/driver.pxd":1865 + * cdef anon_struct6 _tileExtent + * + * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: # <<<<<<<<<<<<<< + * """ + * CUDA array memory requirements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st { + PyObject_HEAD + struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st _pvt_val; + struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1886 + * cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _pvt_ptr + * + * cdef class anon_struct7: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_hArray; +}; + + +/* "cuda/bindings/driver.pxd":1901 + * cdef CUarray _hArray + * + * cdef class anon_struct8: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray *_hMipmappedArray; +}; + + +/* "cuda/bindings/driver.pxd":1916 + * cdef CUmipmappedArray _hMipmappedArray + * + * cdef class anon_struct9: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_devPtr; +}; + + +/* "cuda/bindings/driver.pxd":1937 + * cdef CUdeviceptr _devPtr + * + * cdef class anon_struct10: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_devPtr; +}; + + +/* "cuda/bindings/driver.pxd":1962 + * cdef CUdeviceptr _devPtr + * + * cdef class anon_struct11: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":1976 + * cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + * + * cdef class anon_union4: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union4 { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7 *_array; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8 *_mipmap; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9 *_linear; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10 *_pitch2D; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11 *_reserved; +}; + + +/* "cuda/bindings/driver.pxd":2003 + * cdef anon_struct11 _reserved + * + * cdef class CUDA_RESOURCE_DESC_st: # <<<<<<<<<<<<<< + * """ + * CUDA Resource descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st { + PyObject_HEAD + struct CUDA_RESOURCE_DESC_st *_val_ptr; + struct CUDA_RESOURCE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union4 *_res; +}; + + +/* "cuda/bindings/driver.pxd":2025 + * cdef anon_union4 _res + * + * cdef class CUDA_TEXTURE_DESC_st: # <<<<<<<<<<<<<< + * """ + * Texture descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st { + PyObject_HEAD + struct CUDA_TEXTURE_DESC_st _pvt_val; + struct CUDA_TEXTURE_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2060 + * cdef cydriver.CUDA_TEXTURE_DESC_st* _pvt_ptr + * + * cdef class CUDA_RESOURCE_VIEW_DESC_st: # <<<<<<<<<<<<<< + * """ + * Resource view descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st { + PyObject_HEAD + struct CUDA_RESOURCE_VIEW_DESC_st _pvt_val; + struct CUDA_RESOURCE_VIEW_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2093 + * cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st* _pvt_ptr + * + * cdef class CUtensorMap_st: # <<<<<<<<<<<<<< + * """ + * Tensor map descriptor. Requires compiler support for aligning to 64 +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st { + PyObject_HEAD + struct CUtensorMap_st _pvt_val; + struct CUtensorMap_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2111 + * cdef cydriver.CUtensorMap_st* _pvt_ptr + * + * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: # <<<<<<<<<<<<<< + * """ + * GPU Direct v3 tokens +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st { + PyObject_HEAD + struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st _pvt_val; + struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2130 + * cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _pvt_ptr + * + * cdef class CUDA_LAUNCH_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Kernel launch parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st { + PyObject_HEAD + struct CUDA_LAUNCH_PARAMS_st _pvt_val; + struct CUDA_LAUNCH_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUfunction *_function; + struct __pyx_obj_4cuda_8bindings_6driver_CUstream *_hStream; + struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams *_cykernelParams; +}; + + +/* "cuda/bindings/driver.pxd":2168 + * cdef _HelperKernelParams _cykernelParams + * + * cdef class anon_struct12: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12 { + PyObject_HEAD + struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2184 + * cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + * + * cdef class anon_union5: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union5 { + PyObject_HEAD + struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12 *_win32; +}; + + +/* "cuda/bindings/driver.pxd":2203 + * cdef anon_struct12 _win32 + * + * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: # <<<<<<<<<<<<<< + * """ + * External memory handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st { + PyObject_HEAD + struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_val_ptr; + struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union5 *_handle; +}; + + +/* "cuda/bindings/driver.pxd":2229 + * cdef anon_union5 _handle + * + * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: # <<<<<<<<<<<<<< + * """ + * External memory buffer descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st { + PyObject_HEAD + struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st _pvt_val; + struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2252 + * cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _pvt_ptr + * + * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: # <<<<<<<<<<<<<< + * """ + * External memory mipmap descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st { + PyObject_HEAD + struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st _pvt_val; + struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR *_arrayDesc; +}; + + +/* "cuda/bindings/driver.pxd":2277 + * cdef CUDA_ARRAY3D_DESCRIPTOR _arrayDesc + * + * cdef class anon_struct13: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2293 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + * + * cdef class anon_union6: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union6 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13 *_win32; +}; + + +/* "cuda/bindings/driver.pxd":2312 + * cdef anon_struct13 _win32 + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: # <<<<<<<<<<<<<< + * """ + * External semaphore handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_val_ptr; + struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union6 *_handle; +}; + + +/* "cuda/bindings/driver.pxd":2336 + * cdef anon_union6 _handle + * + * cdef class anon_struct14: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2350 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + * + * cdef class anon_union7: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union7 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2366 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + * + * cdef class anon_struct15: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2380 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + * + * cdef class anon_struct16: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14 *_fence; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union7 *_nvSciSync; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15 *_keyedMutex; +}; + + +/* "cuda/bindings/driver.pxd":2403 + * cdef anon_struct15 _keyedMutex + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * External semaphore signal parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st _pvt_val; + struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16 *_params; +}; + + +/* "cuda/bindings/driver.pxd":2432 + * cdef anon_struct16 _params + * + * cdef class anon_struct17: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2446 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + * + * cdef class anon_union8: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union8 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2462 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + * + * cdef class anon_struct18: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2478 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + * + * cdef class anon_struct19: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19 { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17 *_fence; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union8 *_nvSciSync; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18 *_keyedMutex; +}; + + +/* "cuda/bindings/driver.pxd":2501 + * cdef anon_struct18 _keyedMutex + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * External semaphore wait parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st { + PyObject_HEAD + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st _pvt_val; + struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19 *_params; +}; + + +/* "cuda/bindings/driver.pxd":2530 + * cdef anon_struct19 _params + * + * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Semaphore signal node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st _pvt_val; + struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st *_pvt_ptr; + size_t _extSemArray_length; + CUexternalSemaphore *_extSemArray; + size_t _paramsArray_length; + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *_paramsArray; +}; + + +/* "cuda/bindings/driver.pxd":2556 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + * + * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Semaphore signal node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st *_pvt_ptr; + size_t _extSemArray_length; + CUexternalSemaphore *_extSemArray; + size_t _paramsArray_length; + CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS *_paramsArray; +}; + + +/* "cuda/bindings/driver.pxd":2582 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + * + * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Semaphore wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st _pvt_val; + struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st *_pvt_ptr; + size_t _extSemArray_length; + CUexternalSemaphore *_extSemArray; + size_t _paramsArray_length; + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *_paramsArray; +}; + + +/* "cuda/bindings/driver.pxd":2608 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + * + * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Semaphore wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st *_pvt_ptr; + size_t _extSemArray_length; + CUexternalSemaphore *_extSemArray; + size_t _paramsArray_length; + CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS *_paramsArray; +}; + + +/* "cuda/bindings/driver.pxd":2634 + * cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray + * + * cdef class anon_union9: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union9 { + PyObject_HEAD + struct CUarrayMapInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray *_mipmap; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_array; +}; + + +/* "cuda/bindings/driver.pxd":2652 + * cdef CUarray _array + * + * cdef class anon_struct20: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20 { + PyObject_HEAD + struct CUarrayMapInfo_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2680 + * cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + * + * cdef class anon_struct21: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21 { + PyObject_HEAD + struct CUarrayMapInfo_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2698 + * cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + * + * cdef class anon_union10: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union10 { + PyObject_HEAD + struct CUarrayMapInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20 *_sparseLevel; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21 *_miptail; +}; + + +/* "cuda/bindings/driver.pxd":2716 + * cdef anon_struct21 _miptail + * + * cdef class anon_union11: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union11 { + PyObject_HEAD + struct CUarrayMapInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle *_memHandle; +}; + + +/* "cuda/bindings/driver.pxd":2731 + * cdef CUmemGenericAllocationHandle _memHandle + * + * cdef class CUarrayMapInfo_st: # <<<<<<<<<<<<<< + * """ + * Specifies the CUDA array or CUDA mipmapped array memory mapping +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st { + PyObject_HEAD + struct CUarrayMapInfo_st *_val_ptr; + struct CUarrayMapInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union9 *_resource; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union10 *_subresource; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union11 *_memHandle; +}; + + +/* "cuda/bindings/driver.pxd":2772 + * cdef anon_union11 _memHandle + * + * cdef class CUmemLocation_st: # <<<<<<<<<<<<<< + * """ + * Specifies a memory location. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st { + PyObject_HEAD + struct CUmemLocation_st _pvt_val; + struct CUmemLocation_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2791 + * cdef cydriver.CUmemLocation_st* _pvt_ptr + * + * cdef class anon_struct22: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22 { + PyObject_HEAD + struct CUmemAllocationProp_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2811 + * cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + * + * cdef class CUmemAllocationProp_st: # <<<<<<<<<<<<<< + * """ + * Specifies the allocation properties for a allocation. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st { + PyObject_HEAD + struct CUmemAllocationProp_st _pvt_val; + struct CUmemAllocationProp_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_location; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22 *_allocFlags; +}; + + +/* "cuda/bindings/driver.pxd":2842 + * cdef anon_struct22 _allocFlags + * + * cdef class CUmulticastObjectProp_st: # <<<<<<<<<<<<<< + * """ + * Specifies the properties for a multicast object. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st { + PyObject_HEAD + struct CUmulticastObjectProp_st _pvt_val; + struct CUmulticastObjectProp_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2868 + * cdef cydriver.CUmulticastObjectProp_st* _pvt_ptr + * + * cdef class CUmemAccessDesc_st: # <<<<<<<<<<<<<< + * """ + * Memory access descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st { + PyObject_HEAD + struct CUmemAccessDesc_st _pvt_val; + struct CUmemAccessDesc_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_location; +}; + + +/* "cuda/bindings/driver.pxd":2888 + * cdef CUmemLocation _location + * + * cdef class CUgraphExecUpdateResultInfo_st: # <<<<<<<<<<<<<< + * """ + * Result information returned by cuGraphExecUpdate +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st { + PyObject_HEAD + struct CUgraphExecUpdateResultInfo_st _pvt_val; + struct CUgraphExecUpdateResultInfo_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode *_errorNode; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode *_errorFromNode; +}; + + +/* "cuda/bindings/driver.pxd":2914 + * cdef CUgraphNode _errorFromNode + * + * cdef class CUmemPoolProps_st: # <<<<<<<<<<<<<< + * """ + * Specifies the properties of allocations made from the pool. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st { + PyObject_HEAD + struct CUmemPoolProps_st _pvt_val; + struct CUmemPoolProps_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_location; +}; + + +/* "cuda/bindings/driver.pxd":2950 + * cdef CUmemLocation _location + * + * cdef class CUmemPoolPtrExportData_st: # <<<<<<<<<<<<<< + * """ + * Opaque data for exporting a pool allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st { + PyObject_HEAD + struct CUmemPoolPtrExportData_st _pvt_val; + struct CUmemPoolPtrExportData_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":2967 + * cdef cydriver.CUmemPoolPtrExportData_st* _pvt_ptr + * + * cdef class CUmemcpyAttributes_st: # <<<<<<<<<<<<<< + * """ + * Attributes specific to copies within a batch. For more details on +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st { + PyObject_HEAD + struct CUmemcpyAttributes_st _pvt_val; + struct CUmemcpyAttributes_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_srcLocHint; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_dstLocHint; +}; + + +/* "cuda/bindings/driver.pxd":2996 + * cdef CUmemLocation _dstLocHint + * + * cdef class CUoffset3D_st: # <<<<<<<<<<<<<< + * """ + * Struct representing offset into a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st { + PyObject_HEAD + struct CUoffset3D_st _pvt_val; + struct CUoffset3D_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3017 + * cdef cydriver.CUoffset3D_st* _pvt_ptr + * + * cdef class CUextent3D_st: # <<<<<<<<<<<<<< + * """ + * Struct representing width/height/depth of a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st { + PyObject_HEAD + struct CUextent3D_st _pvt_val; + struct CUextent3D_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3038 + * cdef cydriver.CUextent3D_st* _pvt_ptr + * + * cdef class anon_struct23: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23 { + PyObject_HEAD + struct CUmemcpy3DOperand_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation *_locHint; +}; + + +/* "cuda/bindings/driver.pxd":3060 + * cdef CUmemLocation _locHint + * + * cdef class anon_struct24: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24 { + PyObject_HEAD + struct CUmemcpy3DOperand_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUarray *_array; + struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D *_offset; +}; + + +/* "cuda/bindings/driver.pxd":3078 + * cdef CUoffset3D _offset + * + * cdef class anon_union12: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union12 { + PyObject_HEAD + struct CUmemcpy3DOperand_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23 *_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24 *_array; +}; + + +/* "cuda/bindings/driver.pxd":3096 + * cdef anon_struct24 _array + * + * cdef class CUmemcpy3DOperand_st: # <<<<<<<<<<<<<< + * """ + * Struct representing an operand for copy with cuMemcpy3DBatchAsync +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st { + PyObject_HEAD + struct CUmemcpy3DOperand_st *_val_ptr; + struct CUmemcpy3DOperand_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union12 *_op; +}; + + +/* "cuda/bindings/driver.pxd":3116 + * cdef anon_union12 _op + * + * cdef class CUDA_MEMCPY3D_BATCH_OP_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st { + PyObject_HEAD + struct CUDA_MEMCPY3D_BATCH_OP_st _pvt_val; + struct CUDA_MEMCPY3D_BATCH_OP_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand *_src; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand *_dst; + struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D *_extent; +}; + + +/* "cuda/bindings/driver.pxd":3143 + * cdef CUextent3D _extent + * + * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: # <<<<<<<<<<<<<< + * """ + * Memory allocation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st { + PyObject_HEAD + struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st _pvt_val; + struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps *_poolProps; + size_t _accessDescs_length; + CUmemAccessDesc *_accessDescs; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dptr; +}; + + +/* "cuda/bindings/driver.pxd":3176 + * cdef CUdeviceptr _dptr + * + * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: # <<<<<<<<<<<<<< + * """ + * Memory allocation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st { + PyObject_HEAD + struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st _pvt_val; + struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps *_poolProps; + size_t _accessDescs_length; + CUmemAccessDesc *_accessDescs; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dptr; +}; + + +/* "cuda/bindings/driver.pxd":3209 + * cdef CUdeviceptr _dptr + * + * cdef class CUDA_MEM_FREE_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Memory free node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_MEM_FREE_NODE_PARAMS_st _pvt_val; + struct CUDA_MEM_FREE_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_dptr; +}; + + +/* "cuda/bindings/driver.pxd":3227 + * cdef CUdeviceptr _dptr + * + * cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Child graph node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_CHILD_GRAPH_NODE_PARAMS_st _pvt_val; + struct CUDA_CHILD_GRAPH_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUgraph *_graph; +}; + + +/* "cuda/bindings/driver.pxd":3251 + * cdef CUgraph _graph + * + * cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Event record node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_EVENT_RECORD_NODE_PARAMS_st _pvt_val; + struct CUDA_EVENT_RECORD_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUevent *_event; +}; + + +/* "cuda/bindings/driver.pxd":3269 + * cdef CUevent _event + * + * cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: # <<<<<<<<<<<<<< + * """ + * Event wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st { + PyObject_HEAD + struct CUDA_EVENT_WAIT_NODE_PARAMS_st _pvt_val; + struct CUDA_EVENT_WAIT_NODE_PARAMS_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUevent *_event; +}; + + +/* "cuda/bindings/driver.pxd":3287 + * cdef CUevent _event + * + * cdef class CUgraphNodeParams_st: # <<<<<<<<<<<<<< + * """ + * Graph node parameters. See cuGraphAddNode. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st { + PyObject_HEAD + struct CUgraphNodeParams_st *_val_ptr; + struct CUgraphNodeParams_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3 *_kernel; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS *_memcpy; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2 *_memset; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2 *_host; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS *_graph; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS *_eventWait; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS *_eventRecord; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 *_extSemSignal; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 *_extSemWait; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2 *_alloc; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS *_free; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 *_memOp; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS *_conditional; +}; + + +/* "cuda/bindings/driver.pxd":3349 + * cdef CUDA_CONDITIONAL_NODE_PARAMS _conditional + * + * cdef class CUcheckpointLockArgs_st: # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional lock arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st { + PyObject_HEAD + struct CUcheckpointLockArgs_st _pvt_val; + struct CUcheckpointLockArgs_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3371 + * cdef cydriver.CUcheckpointLockArgs_st* _pvt_ptr + * + * cdef class CUcheckpointCheckpointArgs_st: # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional checkpoint arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st { + PyObject_HEAD + struct CUcheckpointCheckpointArgs_st _pvt_val; + struct CUcheckpointCheckpointArgs_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3388 + * cdef cydriver.CUcheckpointCheckpointArgs_st* _pvt_ptr + * + * cdef class CUcheckpointRestoreArgs_st: # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional restore arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st { + PyObject_HEAD + struct CUcheckpointRestoreArgs_st _pvt_val; + struct CUcheckpointRestoreArgs_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3405 + * cdef cydriver.CUcheckpointRestoreArgs_st* _pvt_ptr + * + * cdef class CUcheckpointUnlockArgs_st: # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional unlock arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st { + PyObject_HEAD + struct CUcheckpointUnlockArgs_st _pvt_val; + struct CUcheckpointUnlockArgs_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3422 + * cdef cydriver.CUcheckpointUnlockArgs_st* _pvt_ptr + * + * cdef class CUmemDecompressParams_st: # <<<<<<<<<<<<<< + * """ + * Structure describing the parameters that compose a single +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st { + PyObject_HEAD + struct CUmemDecompressParams_st _pvt_val; + struct CUmemDecompressParams_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3461 + * cdef cydriver.CUmemDecompressParams_st* _pvt_ptr + * + * cdef class CUdevSmResource_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st { + PyObject_HEAD + struct CUdevSmResource_st _pvt_val; + struct CUdevSmResource_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3477 + * cdef cydriver.CUdevSmResource_st* _pvt_ptr + * + * cdef class CUdevResource_st: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st { + PyObject_HEAD + struct CUdevResource_st *_val_ptr; + struct CUdevResource_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource *_sm; +}; + + +/* "cuda/bindings/driver.pxd":3499 + * cdef CUdevSmResource _sm + * + * cdef class anon_union15: # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_anon_union15 { + PyObject_HEAD + struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3515 + * cdef cydriver.CUeglFrame_st* _pvt_ptr + * + * cdef class CUeglFrame_st: # <<<<<<<<<<<<<< + * """ + * CUDA EGLFrame structure Descriptor - structure defining one frame +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st { + PyObject_HEAD + struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st *_val_ptr; + struct __pyx_t_4cuda_8bindings_8cydriver_CUeglFrame_st *_pvt_ptr; + struct __pyx_obj_4cuda_8bindings_6driver_anon_union15 *_frame; +}; + + +/* "cuda/bindings/driver.pxd":3553 + * cdef anon_union15 _frame + * + * cdef class CUdeviceptr: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr { + PyObject_HEAD + CUdeviceptr _pvt_val; + CUdeviceptr *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3567 + * cdef cydriver.CUdeviceptr* _pvt_ptr + * + * cdef class CUdevice: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevice { + PyObject_HEAD + CUdevice _pvt_val; + CUdevice *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3581 + * cdef cydriver.CUdevice* _pvt_ptr + * + * cdef class CUtexObject: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject { + PyObject_HEAD + CUtexObject _pvt_val; + CUtexObject *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3595 + * cdef cydriver.CUtexObject* _pvt_ptr + * + * cdef class CUsurfObject: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject { + PyObject_HEAD + CUsurfObject _pvt_val; + CUsurfObject *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3609 + * cdef cydriver.CUsurfObject* _pvt_ptr + * + * cdef class CUgraphConditionalHandle: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle { + PyObject_HEAD + CUgraphConditionalHandle _pvt_val; + CUgraphConditionalHandle *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":3621 + * cdef cydriver.CUgraphConditionalHandle* _pvt_ptr + * + * cdef class CUuuid(CUuuid_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUuuid { + struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3635 + * pass + * + * cdef class CUmemFabricHandle_v1(CUmemFabricHandle_st): # <<<<<<<<<<<<<< + * """ + * Fabric handle - An opaque handle representing a memory allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3654 + * pass + * + * cdef class CUmemFabricHandle(CUmemFabricHandle_v1): # <<<<<<<<<<<<<< + * """ + * Fabric handle - An opaque handle representing a memory allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3673 + * pass + * + * cdef class CUipcEventHandle_v1(CUipcEventHandle_st): # <<<<<<<<<<<<<< + * """ + * CUDA IPC event handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3689 + * pass + * + * cdef class CUipcEventHandle(CUipcEventHandle_v1): # <<<<<<<<<<<<<< + * """ + * CUDA IPC event handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle { + struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3705 + * pass + * + * cdef class CUipcMemHandle_v1(CUipcMemHandle_st): # <<<<<<<<<<<<<< + * """ + * CUDA IPC mem handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3721 + * pass + * + * cdef class CUipcMemHandle(CUipcMemHandle_v1): # <<<<<<<<<<<<<< + * """ + * CUDA IPC mem handle +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle { + struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3737 + * pass + * + * cdef class CUstreamBatchMemOpParams_v1(CUstreamBatchMemOpParams_union): # <<<<<<<<<<<<<< + * """ + * Per-operation parameters for cuStreamBatchMemOp +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3763 + * pass + * + * cdef class CUstreamBatchMemOpParams(CUstreamBatchMemOpParams_v1): # <<<<<<<<<<<<<< + * """ + * Per-operation parameters for cuStreamBatchMemOp +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams { + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3789 + * pass + * + * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3809 + * pass + * + * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3829 + * pass + * + * cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Batch memory operation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3851 + * pass + * + * cdef class CUasyncNotificationInfo(CUasyncNotificationInfo_st): # <<<<<<<<<<<<<< + * """ + * Information passed to the user via the async notification callback +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo { + struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3870 + * pass + * + * cdef class CUdevprop_v1(CUdevprop_st): # <<<<<<<<<<<<<< + * """ + * Legacy device properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3904 + * pass + * + * cdef class CUdevprop(CUdevprop_v1): # <<<<<<<<<<<<<< + * """ + * Legacy device properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop { + struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3938 + * pass + * + * cdef class CUaccessPolicyWindow_v1(CUaccessPolicyWindow_st): # <<<<<<<<<<<<<< + * """ + * Specifies an access policy for a window, a contiguous extent of +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":3974 + * pass + * + * cdef class CUaccessPolicyWindow(CUaccessPolicyWindow_v1): # <<<<<<<<<<<<<< + * """ + * Specifies an access policy for a window, a contiguous extent of +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow { + struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4010 + * pass + * + * cdef class CUDA_KERNEL_NODE_PARAMS_v1(CUDA_KERNEL_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4044 + * pass + * + * cdef class CUDA_KERNEL_NODE_PARAMS_v2(CUDA_KERNEL_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4084 + * pass + * + * cdef class CUDA_KERNEL_NODE_PARAMS(CUDA_KERNEL_NODE_PARAMS_v2): # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4124 + * pass + * + * cdef class CUDA_KERNEL_NODE_PARAMS_v3(CUDA_KERNEL_NODE_PARAMS_v3_st): # <<<<<<<<<<<<<< + * """ + * GPU kernel node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4164 + * pass + * + * cdef class CUDA_MEMSET_NODE_PARAMS_v1(CUDA_MEMSET_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Memset node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4190 + * pass + * + * cdef class CUDA_MEMSET_NODE_PARAMS(CUDA_MEMSET_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Memset node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4216 + * pass + * + * cdef class CUDA_MEMSET_NODE_PARAMS_v2(CUDA_MEMSET_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Memset node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4244 + * pass + * + * cdef class CUDA_HOST_NODE_PARAMS_v1(CUDA_HOST_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Host node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4262 + * pass + * + * cdef class CUDA_HOST_NODE_PARAMS(CUDA_HOST_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Host node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4280 + * pass + * + * cdef class CUDA_HOST_NODE_PARAMS_v2(CUDA_HOST_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Host node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4298 + * pass + * + * cdef class CUgraphEdgeData(CUgraphEdgeData_st): # <<<<<<<<<<<<<< + * """ + * Optional annotation for edges in a CUDA graph. Note, all edges +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData { + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4339 + * pass + * + * cdef class CUDA_GRAPH_INSTANTIATE_PARAMS(CUDA_GRAPH_INSTANTIATE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Graph instantiation parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4361 + * pass + * + * cdef class CUlaunchMemSyncDomainMap(CUlaunchMemSyncDomainMap_st): # <<<<<<<<<<<<<< + * """ + * Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4385 + * pass + * + * cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4470 + * pass + * + * cdef class CUlaunchAttribute(CUlaunchAttribute_st): # <<<<<<<<<<<<<< + * """ + * Launch attribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4488 + * pass + * + * cdef class CUlaunchConfig(CUlaunchConfig_st): # <<<<<<<<<<<<<< + * """ + * CUDA extensible launch configuration +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4522 + * pass + * + * cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4607 + * pass + * + * cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue { + struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4692 + * pass + * + * cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4777 + * pass + * + * cdef class CUstreamAttrValue(CUstreamAttrValue_v1): # <<<<<<<<<<<<<< + * """ + * Launch attributes union; used as value field of CUlaunchAttribute +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue { + struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4862 + * pass + * + * cdef class CUexecAffinitySmCount_v1(CUexecAffinitySmCount_st): # <<<<<<<<<<<<<< + * """ + * Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4878 + * pass + * + * cdef class CUexecAffinitySmCount(CUexecAffinitySmCount_v1): # <<<<<<<<<<<<<< + * """ + * Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount { + struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4894 + * pass + * + * cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st): # <<<<<<<<<<<<<< + * """ + * Execution Affinity Parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4912 + * pass + * + * cdef class CUexecAffinityParam(CUexecAffinityParam_v1): # <<<<<<<<<<<<<< + * """ + * Execution Affinity Parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam { + struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4930 + * pass + * + * cdef class CUctxCigParam(CUctxCigParam_st): # <<<<<<<<<<<<<< + * """ + * CIG Context Create Params +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam { + struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4948 + * pass + * + * cdef class CUctxCreateParams(CUctxCreateParams_st): # <<<<<<<<<<<<<< + * """ + * Params for creating CUDA context Exactly one of execAffinityParams +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams { + struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4969 + * pass + * + * cdef class CUlibraryHostUniversalFunctionAndDataTable(CUlibraryHostUniversalFunctionAndDataTable_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable { + struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":4989 + * pass + * + * cdef class CUDA_MEMCPY2D_v2(CUDA_MEMCPY2D_st): # <<<<<<<<<<<<<< + * """ + * 2D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5035 + * pass + * + * cdef class CUDA_MEMCPY2D(CUDA_MEMCPY2D_v2): # <<<<<<<<<<<<<< + * """ + * 2D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5081 + * pass + * + * cdef class CUDA_MEMCPY3D_v2(CUDA_MEMCPY3D_st): # <<<<<<<<<<<<<< + * """ + * 3D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5146 + * pass + * + * cdef class CUDA_MEMCPY3D(CUDA_MEMCPY3D_v2): # <<<<<<<<<<<<<< + * """ + * 3D memory copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5211 + * pass + * + * cdef class CUDA_MEMCPY3D_PEER_v1(CUDA_MEMCPY3D_PEER_st): # <<<<<<<<<<<<<< + * """ + * 3D memory cross-context copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5277 + * pass + * + * cdef class CUDA_MEMCPY3D_PEER(CUDA_MEMCPY3D_PEER_v1): # <<<<<<<<<<<<<< + * """ + * 3D memory cross-context copy parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5343 + * pass + * + * cdef class CUDA_MEMCPY_NODE_PARAMS(CUDA_MEMCPY_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Memcpy node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5365 + * pass + * + * cdef class CUDA_ARRAY_DESCRIPTOR_v2(CUDA_ARRAY_DESCRIPTOR_st): # <<<<<<<<<<<<<< + * """ + * Array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5387 + * pass + * + * cdef class CUDA_ARRAY_DESCRIPTOR(CUDA_ARRAY_DESCRIPTOR_v2): # <<<<<<<<<<<<<< + * """ + * Array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5409 + * pass + * + * cdef class CUDA_ARRAY3D_DESCRIPTOR_v2(CUDA_ARRAY3D_DESCRIPTOR_st): # <<<<<<<<<<<<<< + * """ + * 3D array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5435 + * pass + * + * cdef class CUDA_ARRAY3D_DESCRIPTOR(CUDA_ARRAY3D_DESCRIPTOR_v2): # <<<<<<<<<<<<<< + * """ + * 3D array descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5461 + * pass + * + * cdef class CUDA_ARRAY_SPARSE_PROPERTIES_v1(CUDA_ARRAY_SPARSE_PROPERTIES_st): # <<<<<<<<<<<<<< + * """ + * CUDA array sparse properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5486 + * pass + * + * cdef class CUDA_ARRAY_SPARSE_PROPERTIES(CUDA_ARRAY_SPARSE_PROPERTIES_v1): # <<<<<<<<<<<<<< + * """ + * CUDA array sparse properties +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5511 + * pass + * + * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(CUDA_ARRAY_MEMORY_REQUIREMENTS_st): # <<<<<<<<<<<<<< + * """ + * CUDA array memory requirements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5531 + * pass + * + * cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS(CUDA_ARRAY_MEMORY_REQUIREMENTS_v1): # <<<<<<<<<<<<<< + * """ + * CUDA array memory requirements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5551 + * pass + * + * cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st): # <<<<<<<<<<<<<< + * """ + * CUDA Resource descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5571 + * pass + * + * cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_v1): # <<<<<<<<<<<<<< + * """ + * CUDA Resource descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5591 + * pass + * + * cdef class CUDA_TEXTURE_DESC_v1(CUDA_TEXTURE_DESC_st): # <<<<<<<<<<<<<< + * """ + * Texture descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5625 + * pass + * + * cdef class CUDA_TEXTURE_DESC(CUDA_TEXTURE_DESC_v1): # <<<<<<<<<<<<<< + * """ + * Texture descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5659 + * pass + * + * cdef class CUDA_RESOURCE_VIEW_DESC_v1(CUDA_RESOURCE_VIEW_DESC_st): # <<<<<<<<<<<<<< + * """ + * Resource view descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5691 + * pass + * + * cdef class CUDA_RESOURCE_VIEW_DESC(CUDA_RESOURCE_VIEW_DESC_v1): # <<<<<<<<<<<<<< + * """ + * Resource view descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5723 + * pass + * + * cdef class CUtensorMap(CUtensorMap_st): # <<<<<<<<<<<<<< + * """ + * Tensor map descriptor. Requires compiler support for aligning to 64 +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap { + struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5740 + * pass + * + * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st): # <<<<<<<<<<<<<< + * """ + * GPU Direct v3 tokens +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5758 + * pass + * + * cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1): # <<<<<<<<<<<<<< + * """ + * GPU Direct v3 tokens +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5776 + * pass + * + * cdef class CUDA_LAUNCH_PARAMS_v1(CUDA_LAUNCH_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Kernel launch parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5810 + * pass + * + * cdef class CUDA_LAUNCH_PARAMS(CUDA_LAUNCH_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Kernel launch parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5844 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st): # <<<<<<<<<<<<<< + * """ + * External memory handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5868 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1): # <<<<<<<<<<<<<< + * """ + * External memory handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5892 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st): # <<<<<<<<<<<<<< + * """ + * External memory buffer descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5914 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1): # <<<<<<<<<<<<<< + * """ + * External memory buffer descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5936 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st): # <<<<<<<<<<<<<< + * """ + * External memory mipmap descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5959 + * pass + * + * cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1): # <<<<<<<<<<<<<< + * """ + * External memory mipmap descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":5982 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st): # <<<<<<<<<<<<<< + * """ + * External semaphore handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6004 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1): # <<<<<<<<<<<<<< + * """ + * External semaphore handle descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6026 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * External semaphore signal parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6053 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * External semaphore signal parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6080 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * External semaphore wait parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6107 + * pass + * + * cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * External semaphore wait parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6134 + * pass + * + * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Semaphore signal node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6155 + * pass + * + * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Semaphore signal node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6176 + * pass + * + * cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Semaphore signal node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6197 + * pass + * + * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Semaphore wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6218 + * pass + * + * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Semaphore wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6239 + * pass + * + * cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Semaphore wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6260 + * pass + * + * cdef class CUmemGenericAllocationHandle: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle { + PyObject_HEAD + CUmemGenericAllocationHandle _pvt_val; + CUmemGenericAllocationHandle *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":6272 + * cdef cydriver.CUmemGenericAllocationHandle* _pvt_ptr + * + * cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): # <<<<<<<<<<<<<< + * """ + * Specifies the CUDA array or CUDA mipmapped array memory mapping +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6309 + * pass + * + * cdef class CUarrayMapInfo(CUarrayMapInfo_v1): # <<<<<<<<<<<<<< + * """ + * Specifies the CUDA array or CUDA mipmapped array memory mapping +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo { + struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6346 + * pass + * + * cdef class CUmemLocation_v1(CUmemLocation_st): # <<<<<<<<<<<<<< + * """ + * Specifies a memory location. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6364 + * pass + * + * cdef class CUmemLocation(CUmemLocation_v1): # <<<<<<<<<<<<<< + * """ + * Specifies a memory location. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6382 + * pass + * + * cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st): # <<<<<<<<<<<<<< + * """ + * Specifies the allocation properties for a allocation. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6410 + * pass + * + * cdef class CUmemAllocationProp(CUmemAllocationProp_v1): # <<<<<<<<<<<<<< + * """ + * Specifies the allocation properties for a allocation. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6438 + * pass + * + * cdef class CUmulticastObjectProp_v1(CUmulticastObjectProp_st): # <<<<<<<<<<<<<< + * """ + * Specifies the properties for a multicast object. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6463 + * pass + * + * cdef class CUmulticastObjectProp(CUmulticastObjectProp_v1): # <<<<<<<<<<<<<< + * """ + * Specifies the properties for a multicast object. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp { + struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6488 + * pass + * + * cdef class CUmemAccessDesc_v1(CUmemAccessDesc_st): # <<<<<<<<<<<<<< + * """ + * Memory access descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6506 + * pass + * + * cdef class CUmemAccessDesc(CUmemAccessDesc_v1): # <<<<<<<<<<<<<< + * """ + * Memory access descriptor +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6524 + * pass + * + * cdef class CUgraphExecUpdateResultInfo_v1(CUgraphExecUpdateResultInfo_st): # <<<<<<<<<<<<<< + * """ + * Result information returned by cuGraphExecUpdate +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6547 + * pass + * + * cdef class CUgraphExecUpdateResultInfo(CUgraphExecUpdateResultInfo_v1): # <<<<<<<<<<<<<< + * """ + * Result information returned by cuGraphExecUpdate +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo { + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6570 + * pass + * + * cdef class CUmemPoolProps_v1(CUmemPoolProps_st): # <<<<<<<<<<<<<< + * """ + * Specifies the properties of allocations made from the pool. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6604 + * pass + * + * cdef class CUmemPoolProps(CUmemPoolProps_v1): # <<<<<<<<<<<<<< + * """ + * Specifies the properties of allocations made from the pool. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6638 + * pass + * + * cdef class CUmemPoolPtrExportData_v1(CUmemPoolPtrExportData_st): # <<<<<<<<<<<<<< + * """ + * Opaque data for exporting a pool allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6654 + * pass + * + * cdef class CUmemPoolPtrExportData(CUmemPoolPtrExportData_v1): # <<<<<<<<<<<<<< + * """ + * Opaque data for exporting a pool allocation +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6670 + * pass + * + * cdef class CUmemcpyAttributes_v1(CUmemcpyAttributes_st): # <<<<<<<<<<<<<< + * """ + * Attributes specific to copies within a batch. For more details on +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6696 + * pass + * + * cdef class CUmemcpyAttributes(CUmemcpyAttributes_v1): # <<<<<<<<<<<<<< + * """ + * Attributes specific to copies within a batch. For more details on +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6722 + * pass + * + * cdef class CUoffset3D_v1(CUoffset3D_st): # <<<<<<<<<<<<<< + * """ + * Struct representing offset into a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6742 + * pass + * + * cdef class CUoffset3D(CUoffset3D_v1): # <<<<<<<<<<<<<< + * """ + * Struct representing offset into a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D { + struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6762 + * pass + * + * cdef class CUextent3D_v1(CUextent3D_st): # <<<<<<<<<<<<<< + * """ + * Struct representing width/height/depth of a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6782 + * pass + * + * cdef class CUextent3D(CUextent3D_v1): # <<<<<<<<<<<<<< + * """ + * Struct representing width/height/depth of a CUarray in elements +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D { + struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6802 + * pass + * + * cdef class CUmemcpy3DOperand_v1(CUmemcpy3DOperand_st): # <<<<<<<<<<<<<< + * """ + * Struct representing an operand for copy with cuMemcpy3DBatchAsync +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6820 + * pass + * + * cdef class CUmemcpy3DOperand(CUmemcpy3DOperand_v1): # <<<<<<<<<<<<<< + * """ + * Struct representing an operand for copy with cuMemcpy3DBatchAsync +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6838 + * pass + * + * cdef class CUDA_MEMCPY3D_BATCH_OP_v1(CUDA_MEMCPY3D_BATCH_OP_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6861 + * pass + * + * cdef class CUDA_MEMCPY3D_BATCH_OP(CUDA_MEMCPY3D_BATCH_OP_v1): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6884 + * pass + * + * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st): # <<<<<<<<<<<<<< + * """ + * Memory allocation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6912 + * pass + * + * cdef class CUDA_MEM_ALLOC_NODE_PARAMS(CUDA_MEM_ALLOC_NODE_PARAMS_v1): # <<<<<<<<<<<<<< + * """ + * Memory allocation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6940 + * pass + * + * cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st): # <<<<<<<<<<<<<< + * """ + * Memory allocation node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2 { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6968 + * pass + * + * cdef class CUDA_MEM_FREE_NODE_PARAMS(CUDA_MEM_FREE_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Memory free node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":6984 + * pass + * + * cdef class CUDA_CHILD_GRAPH_NODE_PARAMS(CUDA_CHILD_GRAPH_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Child graph node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7006 + * pass + * + * cdef class CUDA_EVENT_RECORD_NODE_PARAMS(CUDA_EVENT_RECORD_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Event record node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7022 + * pass + * + * cdef class CUDA_EVENT_WAIT_NODE_PARAMS(CUDA_EVENT_WAIT_NODE_PARAMS_st): # <<<<<<<<<<<<<< + * """ + * Event wait node parameters +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS { + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7038 + * pass + * + * cdef class CUgraphNodeParams(CUgraphNodeParams_st): # <<<<<<<<<<<<<< + * """ + * Graph node parameters. See cuGraphAddNode. +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams { + struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7086 + * pass + * + * cdef class CUcheckpointLockArgs(CUcheckpointLockArgs_st): # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional lock arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs { + struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7107 + * pass + * + * cdef class CUcheckpointCheckpointArgs(CUcheckpointCheckpointArgs_st): # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional checkpoint arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs { + struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7123 + * pass + * + * cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional restore arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs { + struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7139 + * pass + * + * cdef class CUcheckpointUnlockArgs(CUcheckpointUnlockArgs_st): # <<<<<<<<<<<<<< + * """ + * CUDA checkpoint optional unlock arguments +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs { + struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7155 + * pass + * + * cdef class CUmemDecompressParams(CUmemDecompressParams_st): # <<<<<<<<<<<<<< + * """ + * Structure describing the parameters that compose a single +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams { + struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7193 + * pass + * + * cdef class CUdevSmResource(CUdevSmResource_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource { + struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7208 + * pass + * + * cdef class CUdevResource_v1(CUdevResource_st): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7228 + * pass + * + * cdef class CUdevResource(CUdevResource_v1): # <<<<<<<<<<<<<< + * """ + * Attributes +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource { + struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7248 + * pass + * + * cdef class CUeglFrame_v1(CUeglFrame_st): # <<<<<<<<<<<<<< + * """ + * CUDA EGLFrame structure Descriptor - structure defining one frame +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1 { + struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7284 + * pass + * + * cdef class CUeglFrame(CUeglFrame_v1): # <<<<<<<<<<<<<< + * """ + * CUDA EGLFrame structure Descriptor - structure defining one frame +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame { + struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1 __pyx_base; +}; + + +/* "cuda/bindings/driver.pxd":7320 + * pass + * + * cdef class cuuint32_t: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t { + PyObject_HEAD + cuuint32_t _pvt_val; + cuuint32_t *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7332 + * cdef cydriver.cuuint32_t* _pvt_ptr + * + * cdef class cuuint64_t: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t { + PyObject_HEAD + cuuint64_t _pvt_val; + cuuint64_t *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7344 + * cdef cydriver.cuuint64_t* _pvt_ptr + * + * cdef class CUdeviceptr_v2: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2 { + PyObject_HEAD + CUdeviceptr_v2 _pvt_val; + CUdeviceptr_v2 *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7358 + * cdef cydriver.CUdeviceptr_v2* _pvt_ptr + * + * cdef class CUdevice_v1: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1 { + PyObject_HEAD + CUdevice_v1 _pvt_val; + CUdevice_v1 *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7372 + * cdef cydriver.CUdevice_v1* _pvt_ptr + * + * cdef class CUtexObject_v1: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1 { + PyObject_HEAD + CUtexObject_v1 _pvt_val; + CUtexObject_v1 *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7386 + * cdef cydriver.CUtexObject_v1* _pvt_ptr + * + * cdef class CUsurfObject_v1: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1 { + PyObject_HEAD + CUsurfObject_v1 _pvt_val; + CUsurfObject_v1 *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7400 + * cdef cydriver.CUsurfObject_v1* _pvt_ptr + * + * cdef class CUmemGenericAllocationHandle_v1: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1 { + PyObject_HEAD + CUmemGenericAllocationHandle_v1 _pvt_val; + CUmemGenericAllocationHandle_v1 *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7412 + * cdef cydriver.CUmemGenericAllocationHandle_v1* _pvt_ptr + * + * cdef class CUlogIterator: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator { + PyObject_HEAD + CUlogIterator _pvt_val; + CUlogIterator *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7424 + * cdef cydriver.CUlogIterator* _pvt_ptr + * + * cdef class GLenum: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_GLenum { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_GLenum _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_GLenum *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7436 + * cdef cydriver.GLenum* _pvt_ptr + * + * cdef class GLuint: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_GLuint { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_GLuint _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_GLuint *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7448 + * cdef cydriver.GLuint* _pvt_ptr + * + * cdef class EGLint: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_EGLint { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_EGLint _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_EGLint *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7460 + * cdef cydriver.EGLint* _pvt_ptr + * + * cdef class VdpDevice: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_VdpDevice _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_VdpDevice *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7472 + * cdef cydriver.VdpDevice* _pvt_ptr + * + * cdef class VdpGetProcAddress: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_VdpGetProcAddress *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7484 + * cdef cydriver.VdpGetProcAddress* _pvt_ptr + * + * cdef class VdpVideoSurface: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_VdpVideoSurface *_pvt_ptr; +}; + + +/* "cuda/bindings/driver.pxd":7496 + * cdef cydriver.VdpVideoSurface* _pvt_ptr + * + * cdef class VdpOutputSurface: # <<<<<<<<<<<<<< + * """ + * +*/ +struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface { + PyObject_HEAD + __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface _pvt_val; + __pyx_t_4cuda_8bindings_8cydriver_VdpOutputSurface *_pvt_ptr; +}; + + +/* "cuda/bindings/_lib/utils.pxd":9 + * from libcpp.vector cimport vector + * + * cdef class _HelperKernelParams: # <<<<<<<<<<<<<< + * cdef Py_buffer _pybuffer + * cdef bint _pyobj_acquired +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams { + PyObject_HEAD + Py_buffer _pybuffer; + int _pyobj_acquired; + void **_ckernelParams; + char *_ckernelParamsData; + int _length; + int _malloc_list_created; +}; + + +/* "cuda/bindings/_lib/utils.pxd":17 + * cdef bint _malloc_list_created + * + * cdef class _HelperInputVoidPtr: # <<<<<<<<<<<<<< + * cdef Py_buffer _pybuffer + * cdef void* _cptr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr { + PyObject_HEAD + Py_buffer _pybuffer; + void *_cptr; + int _pyobj_acquired; +}; + + +/* "cuda/bindings/_lib/utils.pxd":22 + * cdef bint _pyobj_acquired + * + * cdef class _HelperCUmemPool_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmemPool_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute { + PyObject_HEAD + void *_cptr; + enum CUmemPool_attribute_enum _attr; + int _is_getter; + int _int_val; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_cuuint64_t_val; +}; + + +/* "cuda/bindings/_lib/utils.pxd":31 + * cdef driver.cuuint64_t _cuuint64_t_val + * + * cdef class _HelperCUmem_range_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmem_range_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute { + PyObject_HEAD + void *_cptr; + enum CUmem_range_attribute_enum _attr; + size_t _data_size; + int _int_val; + int *_int_val_list; +}; + + +/* "cuda/bindings/_lib/utils.pxd":40 + * cdef int* _int_val_list # 32 bit integer array + * + * cdef class _HelperCUpointer_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUpointer_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute { + PyObject_HEAD + void *_cptr; + enum CUpointer_attribute_enum _attr; + int _is_getter; + struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *_ctx; + unsigned int _uint; + struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *_devptr; + void **_void; + struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *_token; + int _bool; + unsigned PY_LONG_LONG _ull; + size_t _size; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool *_mempool; +}; + + +/* "cuda/bindings/_lib/utils.pxd":56 + * cdef driver.CUmemoryPool _mempool + * + * cdef class _HelperCUgraphMem_attribute: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUgraphMem_attribute_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute { + PyObject_HEAD + void *_cptr; + enum CUgraphMem_attribute_enum _attr; + int _is_getter; + struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *_cuuint64_t_val; +}; + + +/* "cuda/bindings/_lib/utils.pxd":64 + * cdef driver.cuuint64_t _cuuint64_t_val + * + * cdef class _HelperCUjit_option: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUjit_option_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option { + PyObject_HEAD + void *_cptr; + enum CUjit_option_enum _attr; + unsigned int _uint; + float _float; + char *_charstar; + enum CUjit_target_enum _target; + enum CUjit_fallback_enum _fallback; + int _int; + enum CUjit_cacheMode_enum _cacheMode; + std::vector _charstarstar; + struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *_voidstarstar; +}; + + +/* "cuda/bindings/_lib/utils.pxd":79 + * cdef _InputVoidPtrPtrHelper _voidstarstar # list of addresses + * + * cdef class _HelperCudaJitOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cyruntime.cudaJitOption _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption { + PyObject_HEAD + void *_cptr; + enum cudaJitOption _attr; + unsigned int _uint; + float _float; + char *_charstar; + enum cudaJit_Fallback _fallback; + int _int; + enum cudaJit_CacheMode _cacheMode; +}; + + +/* "cuda/bindings/_lib/utils.pxd":91 + * cdef cyruntime.cudaJit_CacheMode _cacheMode + * + * cdef class _HelperCUlibraryOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUlibraryOption_enum _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption { + PyObject_HEAD + void *_cptr; + enum CUlibraryOption_enum _attr; + unsigned int _uint; +}; + + +/* "cuda/bindings/_lib/utils.pxd":98 + * cdef unsigned int _uint + * + * cdef class _HelperCudaLibraryOption: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cyruntime.cudaLibraryOption _attr +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption { + PyObject_HEAD + void *_cptr; + enum cudaLibraryOption _attr; + unsigned int _uint; +}; + + +/* "cuda/bindings/_lib/utils.pxd":105 + * cdef unsigned int _uint + * + * cdef class _HelperCUmemAllocationHandleType: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUmemAllocationHandleType_enum _type +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType { + PyObject_HEAD + void *_cptr; + enum CUmemAllocationHandleType_enum _type; + int _int; + void *_handle; + unsigned int _d3dkmt_handle; + struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle *_mem_fabric_handle; +}; + + +/* "cuda/bindings/_lib/utils.pxd":115 + * cdef driver.CUmemFabricHandle _mem_fabric_handle + * + * cdef class _InputVoidPtrPtrHelper: # <<<<<<<<<<<<<< + * cdef void** _cptr + * +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper { + PyObject_HEAD + void **_cptr; +}; + + +/* "cuda/bindings/_lib/utils.pxd":118 + * cdef void** _cptr + * + * cdef class _HelperCUcoredumpSettings: # <<<<<<<<<<<<<< + * cdef void* _cptr + * cdef cydriver.CUcoredumpSettings_enum _attrib +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings { + PyObject_HEAD + void *_cptr; + enum CUcoredumpSettings_enum _attrib; + int _is_getter; + size_t _size; + int _bool; + char *_charstar; +}; + + +/* "cuda/bindings/nvrtc.pxd":9 + * include "_lib/utils.pxd" + * + * cdef class nvrtcProgram: # <<<<<<<<<<<<<< + * """ nvrtcProgram is the unit of compilation, and an opaque handle for a program. + * +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram { + PyObject_HEAD + nvrtcProgram _pvt_val; + nvrtcProgram *_pvt_ptr; +}; + + +/* "cuda/bindings/nvrtc.pyx":70 + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + * + * _dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) # <<<<<<<<<<<<<< + * + * cdef class nvrtcProgram: +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_k; + PyObject *__pyx_v_v; +}; + + +/* "cuda/bindings/nvrtc.pyx":233 + * """ + * includeNames = [] if includeNames is None else includeNames + * if not all(isinstance(_x, (bytes)) for _x in includeNames): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v__x; +}; + + +/* "cuda/bindings/nvrtc.pyx":236 + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v__x; +}; + + +/* "cuda/bindings/nvrtc.pyx":313 + * """ + * options = [] if options is None else options + * if not all(isinstance(_x, (bytes)) for _x in options): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog +*/ +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v__x; +}; + +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* IterFinish.proto */ +static CYTHON_INLINE int __Pyx_IterFinish(void); + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* PyObjectCallNoArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + +/* PyObjectCallMethod0.proto */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); + +/* RaiseNeedMoreValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/* RaiseTooManyValuesToUnpack.proto */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/* UnpackItemEndCheck.proto */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); + +/* RaiseNoneIterError.proto */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/* UnpackTupleError.proto */ +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); + +/* UnpackTuple2.proto */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/* dict_iter.proto */ +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/* RaiseUnboundLocalError.proto */ +static void __Pyx_RaiseUnboundLocalError(const char *varname); + +/* GetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* pep479.proto */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/* CallableCheck.proto */ +#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY +#define __Pyx_PyCallable_Check(obj) (Py_TYPE(obj)->tp_call != NULL) +#else +#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) +#endif + +/* GetAttr3.proto */ +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); + +/* PySequenceContains.proto */ +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/* PyLongCompare.proto */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + +/* PyObject_Unicode.proto */ +#define __Pyx_PyObject_Unicode(obj)\ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) + +/* PyLongBinop.proto */ +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); +#else +#define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ + (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) +#endif + +/* RejectKeywords.proto */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); + +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* AssertionsEnabled.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000) + static int __pyx_assertions_enabled_flag; + #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) + static int __Pyx_init_assertions_enabled(void) { + PyObject *builtins, *debug, *debug_str; + int flag; + builtins = PyEval_GetBuiltins(); + if (!builtins) goto bad; + debug_str = PyUnicode_FromStringAndSize("__debug__", 9); + if (!debug_str) goto bad; + debug = PyObject_GetItem(builtins, debug_str); + Py_DECREF(debug_str); + if (!debug) goto bad; + flag = PyObject_IsTrue(debug); + Py_DECREF(debug); + if (flag == -1) goto bad; + __pyx_assertions_enabled_flag = flag; + return 0; + bad: + __pyx_assertions_enabled_flag = 1; + return -1; + } +#else + #define __Pyx_init_assertions_enabled() (0) + #define __pyx_assertions_enabled() (!Py_OptimizeFlag) +#endif + +/* RaiseUnexpectedTypeError.proto */ +static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); + +/* ListCompAppend.proto */ +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 + L->ob_item[len] = x; + #else + PyList_SET_ITEM(list, len, x); + #endif + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +/* MoveIfSupported.proto */ +#if CYTHON_USE_CPP_STD_MOVE + #include + #define __PYX_STD_MOVE_IF_SUPPORTED(x) std::move(x) +#else + #define __PYX_STD_MOVE_IF_SUPPORTED(x) x +#endif + +/* KeywordStringCheck.proto */ +static CYTHON_INLINE int __Pyx_CheckKeywordStrings(const char* function_name, PyObject *kw); + +/* UnicodeConcatInPlace.proto */ +# if CYTHON_COMPILING_IN_CPYTHON + #if CYTHON_REFNANNY + #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) + #else + #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) + #endif + static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right + #if CYTHON_REFNANNY + , void* __pyx_refnanny + #endif + ); +#else +#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat +#endif +#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ + PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* ObjectGetItem.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* DefaultPlacementNew.proto */ +#include +template +void __Pyx_default_placement_construct(T* x) { + new (static_cast(x)) T(); +} + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* ValidateBasesTuple.proto */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); +#endif + +/* PyType_Ready.proto */ +CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); + +/* DelItemOnTypeDict.proto */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); +#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) + +/* SetupReduce.proto */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_5 +#define __PYX_HAVE_RT_ImportType_proto_3_1_5 +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#include +#endif +#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) alignof(s) +#else +#define __PYX_GET_STRUCT_ALIGNMENT_3_1_5(s) sizeof(void*) +#endif +enum __Pyx_ImportType_CheckSize_3_1_5 { + __Pyx_ImportType_CheckSize_Error_3_1_5 = 0, + __Pyx_ImportType_CheckSize_Warn_3_1_5 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_1_5 = 2 +}; +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size); +#endif + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* ImportDottedModule.proto */ +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* LengthHint.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_PyObject_LengthHint(o, defaultval) (defaultval) +#else +#define __Pyx_PyObject_LengthHint(o, defaultval) PyObject_LengthHint(o, defaultval) +#endif + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvrtcResult(nvrtcResult value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyLong_As_unsigned_PY_LONG_LONG(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUmemPool_attribute_enum __Pyx_PyLong_As_enum__CUmemPool_attribute_enum(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmemPool_attribute_enum(enum CUmemPool_attribute_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUmem_range_attribute_enum __Pyx_PyLong_As_enum__CUmem_range_attribute_enum(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmem_range_attribute_enum(enum CUmem_range_attribute_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUpointer_attribute_enum __Pyx_PyLong_As_enum__CUpointer_attribute_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUpointer_attribute_enum(enum CUpointer_attribute_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUgraphMem_attribute_enum __Pyx_PyLong_As_enum__CUgraphMem_attribute_enum(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUgraphMem_attribute_enum(enum CUgraphMem_attribute_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUjit_option_enum __Pyx_PyLong_As_enum__CUjit_option_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUjit_target_enum __Pyx_PyLong_As_enum__CUjit_target_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUjit_fallback_enum __Pyx_PyLong_As_enum__CUjit_fallback_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUjit_cacheMode_enum __Pyx_PyLong_As_enum__CUjit_cacheMode_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum cudaJitOption __Pyx_PyLong_As_enum__cudaJitOption(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum cudaJit_Fallback __Pyx_PyLong_As_enum__cudaJit_Fallback(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum cudaJit_CacheMode __Pyx_PyLong_As_enum__cudaJit_CacheMode(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUlibraryOption_enum __Pyx_PyLong_As_enum__CUlibraryOption_enum(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum cudaLibraryOption __Pyx_PyLong_As_enum__cudaLibraryOption(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUmemAllocationHandleType_enum __Pyx_PyLong_As_enum__CUmemAllocationHandleType_enum(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmemAllocationHandleType_enum(enum CUmemAllocationHandleType_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE enum CUcoredumpSettings_enum __Pyx_PyLong_As_enum__CUcoredumpSettings_enum(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUcoredumpSettings_enum(enum CUcoredumpSettings_enum value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE nvrtcResult __Pyx_PyLong_As_nvrtcResult(PyObject *); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/* SaveResetException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +#else +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/* SwapException.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); +#endif + +/* IterNextPlain.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); +#endif + +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); + +/* ReturnWithStopIteration.proto */ +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); + +/* CoroutineBase.proto */ +struct __pyx_CoroutineObject; +typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif +typedef struct __pyx_CoroutineObject { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; + PyObject *gi_weakreflist; + PyObject *classobj; + PyObject *yieldfrom; + __Pyx_pyiter_sendfunc yieldfrom_am_send; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; +#if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) + PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; + uint64_t __pyx_pymonitoring_version; +#endif + int resume_label; + char is_running; +} __pyx_CoroutineObject; +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); +static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); +static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) {\ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ + } +#define __Pyx_Coroutine_ResetAndClearException(self) {\ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ + } +#endif +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); + +/* Generator.proto */ +#define __Pyx_Generator_USED +#define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ + __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(PyObject *module); +static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cynvrtc" */ +static char const *(*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetErrorString)(nvrtcResult); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcVersion)(int *, int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNumSupportedArchs)(int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetSupportedArchs)(int *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCreateProgram)(nvrtcProgram *, char const *, char const *, int, char const **, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcDestroyProgram)(nvrtcProgram *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCompileProgram)(nvrtcProgram, int, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTXSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTX)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBINSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBIN)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVMSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVM)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIRSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIR)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIRSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIR)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLogSize)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLog)(nvrtcProgram, char *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcAddNameExpression)(nvrtcProgram, char const *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLoweredName)(nvrtcProgram, char const *, char const **); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSize)(size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetPCHHeapSize)(size_t); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHCreateStatus)(nvrtcProgram); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSizeRequired)(nvrtcProgram, size_t *); /*proto*/ +static nvrtcResult (*__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetFlowCallback)(nvrtcProgram, void *, void *); /*proto*/ + +/* Module declarations from "cuda.bindings.cydriver" */ + +/* Module declarations from "cuda.bindings.cyruntime" */ + +/* Module declarations from "libcpp.vector" */ + +/* Module declarations from "cuda.bindings.driver" */ + +/* Module declarations from "cython" */ + +/* Module declarations from "libc.string" */ + +/* Module declarations from "libc.stdlib" */ + +/* Module declarations from "libc" */ + +/* Module declarations from "libc.stddef" */ + +/* Module declarations from "libc.limits" */ + +/* Module declarations from "cpython.buffer" */ + +/* Module declarations from "libc.stdio" */ + +/* Module declarations from "__builtin__" */ + +/* Module declarations from "cpython.type" */ + +/* Module declarations from "cpython" */ + +/* Module declarations from "cpython.object" */ + +/* Module declarations from "cpython.bytes" */ + +/* Module declarations from "cuda.bindings._lib.param_packer" */ + +/* Module declarations from "cuda.bindings.nvrtc" */ +static void *__pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(PyObject *, PyObject *); /*proto*/ +static PyObject *__pyx_convert_vector_to_py_int(std::vector const &); /*proto*/ +static std::vector __pyx_convert_vector_from_py_char___2a_(PyObject *); /*proto*/ +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.nvrtc" +extern int __pyx_module_is_main_cuda__bindings__nvrtc; +int __pyx_module_is_main_cuda__bindings__nvrtc = 0; + +/* Implementation of "cuda.bindings.nvrtc" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_max; +static PyObject *__pyx_builtin_MemoryError; +static PyObject *__pyx_builtin_RuntimeError; +static PyObject *__pyx_builtin_TypeError; +static PyObject *__pyx_builtin_zip; +static PyObject *__pyx_builtin_AssertionError; +static PyObject *__pyx_builtin_range; +static PyObject *__pyx_builtin_hex; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = ">"; +static const char __pyx_k_1[] = "\2301"; +static const char __pyx_k_Q[] = "\200\001\330\004\n\210+\220Q"; +static const char __pyx_k_k[] = "k"; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k_t[] = "t"; +static const char __pyx_k_v[] = "v"; +static const char __pyx_k_x[] = "_x"; +static const char __pyx_k_Qa[] = "\200\001\360$\000\n\013\330\010\025\320\025)\250\021\250!\330\004\014\320\014\035\230Q\230a"; +static const char __pyx_k__2[] = " < "; +static const char __pyx_k__3[] = "."; +static const char __pyx_k__4[] = "?"; +static const char __pyx_k__5[] = "\230\021"; +static const char __pyx_k__6[] = "_"; +static const char __pyx_k_gc[] = "gc"; +static const char __pyx_k_Any[] = "Any"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_err[] = "err"; +static const char __pyx_k_hex[] = "hex"; +static const char __pyx_k_idx[] = "idx"; +static const char __pyx_k_int[] = "__int__"; +static const char __pyx_k_key[] = "key"; +static const char __pyx_k_log[] = "log"; +static const char __pyx_k_lst[] = "lst"; +static const char __pyx_k_max[] = "max"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_ptr[] = "ptr"; +static const char __pyx_k_ptx[] = "ptx"; +static const char __pyx_k_ret[] = "ret"; +static const char __pyx_k_src[] = "src"; +static const char __pyx_k_zip[] = "zip"; +static const char __pyx_k_A_t1[] = "\200A\330\010\017\210t\2201"; +static const char __pyx_k_Enum[] = "_Enum"; +static const char __pyx_k_attr[] = "attr"; +static const char __pyx_k_cptr[] = "cptr"; +static const char __pyx_k_cuda[] = "cuda"; +static const char __pyx_k_dict[] = "__dict__"; +static const char __pyx_k_enum[] = "enum"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_next[] = "next"; +static const char __pyx_k_nvvm[] = "nvvm"; +static const char __pyx_k_prog[] = "prog"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_send[] = "send"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_spec[] = "__spec__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_A_z_Q[] = "\200A\330\010\017\210z\230\024\230Q"; +static const char __pyx_k_LTOIR[] = "LTOIR"; +static const char __pyx_k_a_K_q[] = "\200\001\330*+\360\036\000\005)\250\006\250a\330\t\n\330\010\025\320\025)\250\021\250!\330\004\014\210K\320\027'\240q"; +static const char __pyx_k_c_int[] = "c_int"; +static const char __pyx_k_close[] = "close"; +static const char __pyx_k_cubin[] = "cubin"; +static const char __pyx_k_items[] = "items"; +static const char __pyx_k_major[] = "major"; +static const char __pyx_k_minor[] = "minor"; +static const char __pyx_k_pprog[] = "pprog"; +static const char __pyx_k_ptr_2[] = "_ptr"; +static const char __pyx_k_pyObj[] = "pyObj"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_throw[] = "throw"; +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_Enum_2[] = "Enum"; +static const char __pyx_k_c_bool[] = "c_bool"; +static const char __pyx_k_c_byte[] = "c_byte"; +static const char __pyx_k_c_char[] = "c_char"; +static const char __pyx_k_c_long[] = "c_long"; +static const char __pyx_k_c_uint[] = "c_uint"; +static const char __pyx_k_ctypes[] = "_ctypes"; +static const char __pyx_k_cyprog[] = "cyprog"; +static const char __pyx_k_driver[] = "_driver"; +static const char __pyx_k_enable[] = "enable"; +static const char __pyx_k_format[] = "format"; +static const char __pyx_k_getPtr[] = "getPtr"; +static const char __pyx_k_lambda[] = ""; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_result[] = "result"; +static const char __pyx_k_sizeof[] = "sizeof"; +static const char __pyx_k_typing[] = "typing"; +static const char __pyx_k_IntEnum[] = "IntEnum"; +static const char __pyx_k_c_float[] = "c_float"; +static const char __pyx_k_c_short[] = "c_short"; +static const char __pyx_k_c_ubyte[] = "c_ubyte"; +static const char __pyx_k_c_ulong[] = "c_ulong"; +static const char __pyx_k_c_wchar[] = "c_wchar"; +static const char __pyx_k_disable[] = "disable"; +static const char __pyx_k_genexpr[] = "genexpr"; +static const char __pyx_k_headers[] = "headers"; +static const char __pyx_k_members[] = "__members__"; +static const char __pyx_k_objType[] = "objType"; +static const char __pyx_k_options[] = "options"; +static const char __pyx_k_optixir[] = "optixir"; +static const char __pyx_k_payload[] = "payload"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_Optional[] = "Optional"; +static const char __pyx_k_bindings[] = "bindings"; +static const char __pyx_k_c_double[] = "c_double"; +static const char __pyx_k_c_size_t[] = "c_size_t"; +static const char __pyx_k_c_ushort[] = "c_ushort"; +static const char __pyx_k_c_void_p[] = "c_void_p"; +static const char __pyx_k_callback[] = "callback"; +static const char __pyx_k_ctypes_2[] = "ctypes"; +static const char __pyx_k_cyresult[] = "cyresult"; +static const char __pyx_k_driver_2[] = "driver"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_numArchs[] = "numArchs"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_CUcontext[] = "CUcontext"; +static const char __pyx_k_Structure[] = "Structure"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_U_eellmmn[] = "\320U^\320^e\320el\320lm\320mn"; +static const char __pyx_k_addressof[] = "addressof"; +static const char __pyx_k_cyheaders[] = "cyheaders"; +static const char __pyx_k_cyoptions[] = "cyoptions"; +static const char __pyx_k_cypayload[] = "cypayload"; +static const char __pyx_k_data_size[] = "data_size"; +static const char __pyx_k_is_getter[] = "is_getter"; +static const char __pyx_k_isenabled[] = "isenabled"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_pyx_state[] = "__pyx_state"; +static const char __pyx_k_q_t_Q_QfA[] = "\200\001\360\034\000\005\031\230\001\330\t\n\330\010\025\320\025/\250q\260\001\260\021\330\004\007\200t\210:\220Q\330\010\020\320\020!\240\021\240&\250\001\330\004\014\320\014\035\230Q\230f\240A"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_c_longlong[] = "c_longlong"; +static const char __pyx_k_cuuint64_t[] = "cuuint64_t"; +static const char __pyx_k_cycallback[] = "cycallback"; +static const char __pyx_k_init_value[] = "init_value"; +static const char __pyx_k_logSizeRet[] = "logSizeRet"; +static const char __pyx_k_numHeaders[] = "numHeaders"; +static const char __pyx_k_numOptions[] = "numOptions"; +static const char __pyx_k_ptxSizeRet[] = "ptxSizeRet"; +static const char __pyx_k_CUdeviceptr[] = "CUdeviceptr"; +static const char __pyx_k_MemoryError[] = "MemoryError"; +static const char __pyx_k_a_1_t_Q_QfA[] = "\200\001\360\030\000\005\027\220a\330\t\n\330\010\025\320\025)\250\021\250!\2501\330\004\007\200t\210:\220Q\330\010\020\320\020!\240\021\240&\250\001\330\004\014\320\014\035\230Q\230f\240A"; +static const char __pyx_k_c_ulonglong[] = "c_ulonglong"; +static const char __pyx_k_mro_entries[] = "__mro_entries__"; +static const char __pyx_k_nvrtcGetPTX[] = "nvrtcGetPTX"; +static const char __pyx_k_nvrtcResult[] = "nvrtcResult"; +static const char __pyx_k_nvvmSizeRet[] = "nvvmSizeRet"; +static const char __pyx_k_xs_q_1_Rs_1[] = "\200\001\360\034\000\005\010\200x\210s\220!\330\010\017\210q\330\004\n\210)\2201\320\024%\240R\240s\250!\2501"; +static const char __pyx_k_CUmemoryPool[] = "CUmemoryPool"; +static const char __pyx_k_LTOIRSizeRet[] = "LTOIRSizeRet"; +static const char __pyx_k_RuntimeError[] = "RuntimeError"; +static const char __pyx_k_Unknown_type[] = "Unknown type: "; +static const char __pyx_k_cubinSizeRet[] = "cubinSizeRet"; +static const char __pyx_k_includeNames[] = "includeNames"; +static const char __pyx_k_initializing[] = "_initializing"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_kernelParams[] = "kernelParams"; +static const char __pyx_k_lowered_name[] = "lowered_name"; +static const char __pyx_k_nvrtcGetNVVM[] = "nvrtcGetNVVM"; +static const char __pyx_k_nvrtcProgram[] = " 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperKernelParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperInputVoidPtr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemPool_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUmem_range_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUpointer_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUgraphMem_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUjit_option; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCudaJitOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUlibraryOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCudaLibraryOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__InputVoidPtrPtrHelper; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver__HelperCUcoredumpSettings; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcontext; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmodule; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUfunction; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlibrary; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUkernel; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUarray; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmipmappedArray; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUtexref; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUsurfref; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUevent; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstream; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphicsResource; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexternalMemory; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexternalSemaphore; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraph; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphNode; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphExec; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUuserObject; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphDeviceNode; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallbackHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgreenCtx; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlinkState; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevResourceDesc; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallbackHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUeglStreamConnection; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_EGLImageKHR; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_EGLStreamKHR; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_EGLSyncKHR; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallback; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUhostFn; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamCallback; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUoccupancyB2DSize; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallback; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUuuid_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct0; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct3; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct4; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct5; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue_union; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union3; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct6; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct7; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct8; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct9; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct10; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct11; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union4; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct12; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union5; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct13; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union6; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct14; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union7; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct15; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct16; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct17; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union8; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct18; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct19; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union9; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct20; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct21; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union10; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union11; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct22; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct23; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_struct24; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union12; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_anon_union15; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_st; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevice; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUtexObject; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphConditionalHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUuuid; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevprop; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUextent3D; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevResource; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_cuuint32_t; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr_v2; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUdevice_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUtexObject_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_CUlogIterator; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_GLenum; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_GLuint; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_EGLint; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_VdpDevice; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_VdpGetProcAddress; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_VdpVideoSurface; + PyTypeObject *__pyx_ptype_4cuda_8bindings_6driver_VdpOutputSurface; + PyTypeObject *__pyx_ptype_7cpython_4type_type; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr; + PyObject *__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr; + PyTypeObject *__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr; + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_tuple[1]; + PyObject *__pyx_codeobj_tab[68]; + PyObject *__pyx_string_tab[280]; + PyObject *__pyx_int_0; + PyObject *__pyx_int_1; + PyObject *__pyx_int_1024; +/* #### Code section: module_state_contents ### */ + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr[8]; +int __pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr[8]; +int __pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr[8]; +int __pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr[8]; +int __pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr; +#endif +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* IterNextPlain.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; +#endif + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_Any __pyx_string_tab[1] +#define __pyx_kp_u_Argument_headers_is_not_instance __pyx_string_tab[2] +#define __pyx_kp_u_Argument_includeNames_is_not_ins __pyx_string_tab[3] +#define __pyx_kp_u_Argument_kernelParams_failed_to __pyx_string_tab[4] +#define __pyx_kp_u_Argument_kernelParams_has_tuples __pyx_string_tab[5] +#define __pyx_kp_u_Argument_kernelParams_is_not_a_v __pyx_string_tab[6] +#define __pyx_kp_u_Argument_options_is_not_instance __pyx_string_tab[7] +#define __pyx_kp_u_Argument_prog_is_not_instance_of __pyx_string_tab[8] +#define __pyx_n_u_AssertionError __pyx_string_tab[9] +#define __pyx_n_u_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN __pyx_string_tab[10] +#define __pyx_n_u_CUcontext __pyx_string_tab[11] +#define __pyx_n_u_CUdeviceptr __pyx_string_tab[12] +#define __pyx_n_u_CUmemFabricHandle __pyx_string_tab[13] +#define __pyx_n_u_CUmemoryPool __pyx_string_tab[14] +#define __pyx_n_u_Enum __pyx_string_tab[15] +#define __pyx_n_u_Enum_2 __pyx_string_tab[16] +#define __pyx_kp_u_Failed_to_allocated_length_x_siz __pyx_string_tab[17] +#define __pyx_kp_u_Failed_to_retrieve_buffer_throug __pyx_string_tab[18] +#define __pyx_n_u_HelperCUcoredumpSettings __pyx_string_tab[19] +#define __pyx_n_u_HelperCUcoredumpSettings___redu __pyx_string_tab[20] +#define __pyx_n_u_HelperCUcoredumpSettings___sets __pyx_string_tab[21] +#define __pyx_n_u_HelperCUcoredumpSettings_pyObj __pyx_string_tab[22] +#define __pyx_n_u_HelperCUcoredumpSettings_size __pyx_string_tab[23] +#define __pyx_n_u_HelperCUgraphMem_attribute __pyx_string_tab[24] +#define __pyx_n_u_HelperCUgraphMem_attribute___re __pyx_string_tab[25] +#define __pyx_n_u_HelperCUgraphMem_attribute___se __pyx_string_tab[26] +#define __pyx_n_u_HelperCUgraphMem_attribute_pyOb __pyx_string_tab[27] +#define __pyx_n_u_HelperCUjit_option __pyx_string_tab[28] +#define __pyx_n_u_HelperCUjit_option___reduce_cyt __pyx_string_tab[29] +#define __pyx_n_u_HelperCUjit_option___setstate_c __pyx_string_tab[30] +#define __pyx_n_u_HelperCUlibraryOption __pyx_string_tab[31] +#define __pyx_n_u_HelperCUlibraryOption___reduce __pyx_string_tab[32] +#define __pyx_n_u_HelperCUlibraryOption___setstat __pyx_string_tab[33] +#define __pyx_n_u_HelperCUmemAllocationHandleType __pyx_string_tab[34] +#define __pyx_n_u_HelperCUmemAllocationHandleType_2 __pyx_string_tab[35] +#define __pyx_n_u_HelperCUmemAllocationHandleType_3 __pyx_string_tab[36] +#define __pyx_n_u_HelperCUmemAllocationHandleType_4 __pyx_string_tab[37] +#define __pyx_n_u_HelperCUmemPool_attribute __pyx_string_tab[38] +#define __pyx_n_u_HelperCUmemPool_attribute___red __pyx_string_tab[39] +#define __pyx_n_u_HelperCUmemPool_attribute___set __pyx_string_tab[40] +#define __pyx_n_u_HelperCUmemPool_attribute_pyObj __pyx_string_tab[41] +#define __pyx_n_u_HelperCUmem_range_attribute __pyx_string_tab[42] +#define __pyx_n_u_HelperCUmem_range_attribute___r __pyx_string_tab[43] +#define __pyx_n_u_HelperCUmem_range_attribute___s __pyx_string_tab[44] +#define __pyx_n_u_HelperCUmem_range_attribute_pyO __pyx_string_tab[45] +#define __pyx_n_u_HelperCUpointer_attribute __pyx_string_tab[46] +#define __pyx_n_u_HelperCUpointer_attribute___red __pyx_string_tab[47] +#define __pyx_n_u_HelperCUpointer_attribute___set __pyx_string_tab[48] +#define __pyx_n_u_HelperCUpointer_attribute_pyObj __pyx_string_tab[49] +#define __pyx_n_u_HelperCudaJitOption __pyx_string_tab[50] +#define __pyx_n_u_HelperCudaJitOption___reduce_cy __pyx_string_tab[51] +#define __pyx_n_u_HelperCudaJitOption___setstate __pyx_string_tab[52] +#define __pyx_n_u_HelperCudaLibraryOption __pyx_string_tab[53] +#define __pyx_n_u_HelperCudaLibraryOption___reduc __pyx_string_tab[54] +#define __pyx_n_u_HelperCudaLibraryOption___setst __pyx_string_tab[55] +#define __pyx_n_u_HelperInputVoidPtr __pyx_string_tab[56] +#define __pyx_n_u_HelperInputVoidPtr___reduce_cyt __pyx_string_tab[57] +#define __pyx_n_u_HelperInputVoidPtr___setstate_c __pyx_string_tab[58] +#define __pyx_n_u_HelperKernelParams __pyx_string_tab[59] +#define __pyx_n_u_HelperKernelParams___reduce_cyt __pyx_string_tab[60] +#define __pyx_n_u_HelperKernelParams___setstate_c __pyx_string_tab[61] +#define __pyx_n_u_HelperKernelParams_lambda __pyx_string_tab[62] +#define __pyx_n_u_InputVoidPtrPtrHelper __pyx_string_tab[63] +#define __pyx_n_u_InputVoidPtrPtrHelper___reduce __pyx_string_tab[64] +#define __pyx_n_u_InputVoidPtrPtrHelper___setstat __pyx_string_tab[65] +#define __pyx_n_u_IntEnum __pyx_string_tab[66] +#define __pyx_n_u_LTOIR __pyx_string_tab[67] +#define __pyx_n_u_LTOIRSizeRet __pyx_string_tab[68] +#define __pyx_kp_u_List_is_too_small __pyx_string_tab[69] +#define __pyx_n_u_MemoryError __pyx_string_tab[70] +#define __pyx_n_u_NVRTC_ERROR_BUILTIN_OPERATION_FA __pyx_string_tab[71] +#define __pyx_n_u_NVRTC_ERROR_CANCELLED __pyx_string_tab[72] +#define __pyx_n_u_NVRTC_ERROR_COMPILATION __pyx_string_tab[73] +#define __pyx_n_u_NVRTC_ERROR_INTERNAL_ERROR __pyx_string_tab[74] +#define __pyx_n_u_NVRTC_ERROR_INVALID_INPUT __pyx_string_tab[75] +#define __pyx_n_u_NVRTC_ERROR_INVALID_OPTION __pyx_string_tab[76] +#define __pyx_n_u_NVRTC_ERROR_INVALID_PROGRAM __pyx_string_tab[77] +#define __pyx_n_u_NVRTC_ERROR_NAME_EXPRESSION_NOT __pyx_string_tab[78] +#define __pyx_n_u_NVRTC_ERROR_NO_LOWERED_NAMES_BEF __pyx_string_tab[79] +#define __pyx_n_u_NVRTC_ERROR_NO_NAME_EXPRESSIONS __pyx_string_tab[80] +#define __pyx_n_u_NVRTC_ERROR_NO_PCH_CREATE_ATTEMP __pyx_string_tab[81] +#define __pyx_n_u_NVRTC_ERROR_OUT_OF_MEMORY __pyx_string_tab[82] +#define __pyx_n_u_NVRTC_ERROR_PCH_CREATE __pyx_string_tab[83] +#define __pyx_n_u_NVRTC_ERROR_PCH_CREATE_HEAP_EXHA __pyx_string_tab[84] +#define __pyx_n_u_NVRTC_ERROR_PROGRAM_CREATION_FAI __pyx_string_tab[85] +#define __pyx_n_u_NVRTC_ERROR_TIME_FILE_WRITE_FAIL __pyx_string_tab[86] +#define __pyx_n_u_NVRTC_SUCCESS __pyx_string_tab[87] +#define __pyx_n_u_Optional __pyx_string_tab[88] +#define __pyx_kp_u_Optional_tuple_bytes_list_bytes __pyx_string_tab[89] +#define __pyx_kp_u_Provided_argument_is_of_type_but __pyx_string_tab[90] +#define __pyx_kp_u_Provided_argument_is_of_type_but_2 __pyx_string_tab[91] +#define __pyx_n_u_RuntimeError __pyx_string_tab[92] +#define __pyx_n_u_Structure __pyx_string_tab[93] +#define __pyx_kp_u_The_enumerated_type_nvrtcResult __pyx_string_tab[94] +#define __pyx_n_u_TypeError __pyx_string_tab[95] +#define __pyx_kp_u_Unknown_type __pyx_string_tab[96] +#define __pyx_kp_u_Unsupported_attribute __pyx_string_tab[97] +#define __pyx_kp_u_Unsupported_attribute_value __pyx_string_tab[98] +#define __pyx_kp_u_Unsupported_type __pyx_string_tab[99] +#define __pyx_kp_u__2 __pyx_string_tab[100] +#define __pyx_kp_u__3 __pyx_string_tab[101] +#define __pyx_kp_u__4 __pyx_string_tab[102] +#define __pyx_n_u__6 __pyx_string_tab[103] +#define __pyx_n_u_addressof __pyx_string_tab[104] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[105] +#define __pyx_n_u_attr __pyx_string_tab[106] +#define __pyx_n_u_bindings __pyx_string_tab[107] +#define __pyx_n_u_c_bool __pyx_string_tab[108] +#define __pyx_n_u_c_byte __pyx_string_tab[109] +#define __pyx_n_u_c_char __pyx_string_tab[110] +#define __pyx_n_u_c_double __pyx_string_tab[111] +#define __pyx_n_u_c_float __pyx_string_tab[112] +#define __pyx_n_u_c_int __pyx_string_tab[113] +#define __pyx_n_u_c_long __pyx_string_tab[114] +#define __pyx_n_u_c_longlong __pyx_string_tab[115] +#define __pyx_n_u_c_short __pyx_string_tab[116] +#define __pyx_n_u_c_size_t __pyx_string_tab[117] +#define __pyx_n_u_c_ubyte __pyx_string_tab[118] +#define __pyx_n_u_c_uint __pyx_string_tab[119] +#define __pyx_n_u_c_ulong __pyx_string_tab[120] +#define __pyx_n_u_c_ulonglong __pyx_string_tab[121] +#define __pyx_n_u_c_ushort __pyx_string_tab[122] +#define __pyx_n_u_c_void_p __pyx_string_tab[123] +#define __pyx_n_u_c_wchar __pyx_string_tab[124] +#define __pyx_n_u_callback __pyx_string_tab[125] +#define __pyx_n_u_class_getitem __pyx_string_tab[126] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[127] +#define __pyx_n_u_close __pyx_string_tab[128] +#define __pyx_n_u_cptr __pyx_string_tab[129] +#define __pyx_n_u_ctypes __pyx_string_tab[130] +#define __pyx_n_u_ctypes_2 __pyx_string_tab[131] +#define __pyx_n_u_cubin __pyx_string_tab[132] +#define __pyx_n_u_cubinSizeRet __pyx_string_tab[133] +#define __pyx_n_u_cuda __pyx_string_tab[134] +#define __pyx_kp_u_cuda_bindings__lib_utils_pxi __pyx_string_tab[135] +#define __pyx_n_u_cuda_bindings_driver __pyx_string_tab[136] +#define __pyx_n_u_cuda_bindings_nvrtc __pyx_string_tab[137] +#define __pyx_kp_u_cuda_bindings_nvrtc_pyx __pyx_string_tab[138] +#define __pyx_n_u_cuuint64_t __pyx_string_tab[139] +#define __pyx_n_u_cycallback __pyx_string_tab[140] +#define __pyx_n_u_cycallback_ptr __pyx_string_tab[141] +#define __pyx_n_u_cyheaders __pyx_string_tab[142] +#define __pyx_n_u_cyincludeNames __pyx_string_tab[143] +#define __pyx_n_u_cyoptions __pyx_string_tab[144] +#define __pyx_n_u_cypayload __pyx_string_tab[145] +#define __pyx_n_u_cypayload_ptr __pyx_string_tab[146] +#define __pyx_n_u_cyprog __pyx_string_tab[147] +#define __pyx_n_u_cyresult __pyx_string_tab[148] +#define __pyx_n_u_data_size __pyx_string_tab[149] +#define __pyx_n_u_dict __pyx_string_tab[150] +#define __pyx_n_u_dict_nvrtcResult __pyx_string_tab[151] +#define __pyx_kp_u_disable __pyx_string_tab[152] +#define __pyx_n_u_doc __pyx_string_tab[153] +#define __pyx_n_u_driver __pyx_string_tab[154] +#define __pyx_n_u_driver_2 __pyx_string_tab[155] +#define __pyx_kp_u_enable __pyx_string_tab[156] +#define __pyx_n_u_enum __pyx_string_tab[157] +#define __pyx_n_u_err __pyx_string_tab[158] +#define __pyx_n_u_format __pyx_string_tab[159] +#define __pyx_n_u_func __pyx_string_tab[160] +#define __pyx_kp_u_gc __pyx_string_tab[161] +#define __pyx_n_u_genexpr __pyx_string_tab[162] +#define __pyx_n_u_getPtr __pyx_string_tab[163] +#define __pyx_n_u_getstate __pyx_string_tab[164] +#define __pyx_n_u_headers __pyx_string_tab[165] +#define __pyx_n_u_hex __pyx_string_tab[166] +#define __pyx_n_u_idx __pyx_string_tab[167] +#define __pyx_n_u_includeNames __pyx_string_tab[168] +#define __pyx_n_u_init_value __pyx_string_tab[169] +#define __pyx_n_u_initializing __pyx_string_tab[170] +#define __pyx_n_u_int __pyx_string_tab[171] +#define __pyx_n_u_is_coroutine __pyx_string_tab[172] +#define __pyx_n_u_is_getter __pyx_string_tab[173] +#define __pyx_kp_u_isenabled __pyx_string_tab[174] +#define __pyx_n_u_items __pyx_string_tab[175] +#define __pyx_n_u_k __pyx_string_tab[176] +#define __pyx_n_u_kernelParams __pyx_string_tab[177] +#define __pyx_n_u_key __pyx_string_tab[178] +#define __pyx_n_u_lambda __pyx_string_tab[179] +#define __pyx_n_u_log __pyx_string_tab[180] +#define __pyx_n_u_logSizeRet __pyx_string_tab[181] +#define __pyx_n_u_lowered_name __pyx_string_tab[182] +#define __pyx_n_u_lst __pyx_string_tab[183] +#define __pyx_n_u_main __pyx_string_tab[184] +#define __pyx_n_u_major __pyx_string_tab[185] +#define __pyx_n_u_max __pyx_string_tab[186] +#define __pyx_n_u_max_param_size __pyx_string_tab[187] +#define __pyx_n_u_members __pyx_string_tab[188] +#define __pyx_n_u_metaclass __pyx_string_tab[189] +#define __pyx_n_u_minor __pyx_string_tab[190] +#define __pyx_n_u_module __pyx_string_tab[191] +#define __pyx_n_u_mro_entries __pyx_string_tab[192] +#define __pyx_n_u_name __pyx_string_tab[193] +#define __pyx_n_u_name_2 __pyx_string_tab[194] +#define __pyx_n_u_name_expression __pyx_string_tab[195] +#define __pyx_n_u_next __pyx_string_tab[196] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[197] +#define __pyx_n_u_numArchs __pyx_string_tab[198] +#define __pyx_n_u_numHeaders __pyx_string_tab[199] +#define __pyx_n_u_numOptions __pyx_string_tab[200] +#define __pyx_n_u_nvrtcAddNameExpression __pyx_string_tab[201] +#define __pyx_n_u_nvrtcCompileProgram __pyx_string_tab[202] +#define __pyx_n_u_nvrtcCompileProgram_locals_genex __pyx_string_tab[203] +#define __pyx_n_u_nvrtcCreateProgram __pyx_string_tab[204] +#define __pyx_n_u_nvrtcCreateProgram_locals_genexp __pyx_string_tab[205] +#define __pyx_n_u_nvrtcDestroyProgram __pyx_string_tab[206] +#define __pyx_n_u_nvrtcGetCUBIN __pyx_string_tab[207] +#define __pyx_n_u_nvrtcGetCUBINSize __pyx_string_tab[208] +#define __pyx_n_u_nvrtcGetErrorString __pyx_string_tab[209] +#define __pyx_n_u_nvrtcGetLTOIR __pyx_string_tab[210] +#define __pyx_n_u_nvrtcGetLTOIRSize __pyx_string_tab[211] +#define __pyx_n_u_nvrtcGetLoweredName __pyx_string_tab[212] +#define __pyx_n_u_nvrtcGetNVVM __pyx_string_tab[213] +#define __pyx_n_u_nvrtcGetNVVMSize __pyx_string_tab[214] +#define __pyx_n_u_nvrtcGetNumSupportedArchs __pyx_string_tab[215] +#define __pyx_n_u_nvrtcGetOptiXIR __pyx_string_tab[216] +#define __pyx_n_u_nvrtcGetOptiXIRSize __pyx_string_tab[217] +#define __pyx_n_u_nvrtcGetPCHCreateStatus __pyx_string_tab[218] +#define __pyx_n_u_nvrtcGetPCHHeapSize __pyx_string_tab[219] +#define __pyx_n_u_nvrtcGetPCHHeapSizeRequired __pyx_string_tab[220] +#define __pyx_n_u_nvrtcGetPTX __pyx_string_tab[221] +#define __pyx_n_u_nvrtcGetPTXSize __pyx_string_tab[222] +#define __pyx_n_u_nvrtcGetProgramLog __pyx_string_tab[223] +#define __pyx_n_u_nvrtcGetProgramLogSize __pyx_string_tab[224] +#define __pyx_n_u_nvrtcGetSupportedArchs __pyx_string_tab[225] +#define __pyx_kp_u_nvrtcProgram __pyx_string_tab[226] +#define __pyx_n_u_nvrtcProgram_2 __pyx_string_tab[227] +#define __pyx_n_u_nvrtcProgram___reduce_cython __pyx_string_tab[228] +#define __pyx_n_u_nvrtcProgram___setstate_cython __pyx_string_tab[229] +#define __pyx_n_u_nvrtcProgram_getPtr __pyx_string_tab[230] +#define __pyx_n_u_nvrtcResult __pyx_string_tab[231] +#define __pyx_n_u_nvrtcSetFlowCallback __pyx_string_tab[232] +#define __pyx_n_u_nvrtcSetPCHHeapSize __pyx_string_tab[233] +#define __pyx_n_u_nvrtcVersion __pyx_string_tab[234] +#define __pyx_n_u_nvvm __pyx_string_tab[235] +#define __pyx_n_u_nvvmSizeRet __pyx_string_tab[236] +#define __pyx_n_u_objType __pyx_string_tab[237] +#define __pyx_n_u_options __pyx_string_tab[238] +#define __pyx_n_u_optixir __pyx_string_tab[239] +#define __pyx_n_u_optixirSizeRet __pyx_string_tab[240] +#define __pyx_n_u_payload __pyx_string_tab[241] +#define __pyx_n_u_pop __pyx_string_tab[242] +#define __pyx_n_u_pprog __pyx_string_tab[243] +#define __pyx_n_u_prepare __pyx_string_tab[244] +#define __pyx_n_u_prog __pyx_string_tab[245] +#define __pyx_n_u_ptr __pyx_string_tab[246] +#define __pyx_n_u_ptr_2 __pyx_string_tab[247] +#define __pyx_n_u_ptx __pyx_string_tab[248] +#define __pyx_n_u_ptxSizeRet __pyx_string_tab[249] +#define __pyx_n_u_pyObj __pyx_string_tab[250] +#define __pyx_n_u_pyx_state __pyx_string_tab[251] +#define __pyx_n_u_qualname __pyx_string_tab[252] +#define __pyx_n_u_range __pyx_string_tab[253] +#define __pyx_n_u_reduce __pyx_string_tab[254] +#define __pyx_n_u_reduce_cython __pyx_string_tab[255] +#define __pyx_n_u_reduce_ex __pyx_string_tab[256] +#define __pyx_n_u_result __pyx_string_tab[257] +#define __pyx_n_u_ret __pyx_string_tab[258] +#define __pyx_n_u_s __pyx_string_tab[259] +#define __pyx_n_u_self __pyx_string_tab[260] +#define __pyx_n_u_send __pyx_string_tab[261] +#define __pyx_n_u_set_name __pyx_string_tab[262] +#define __pyx_n_u_setstate __pyx_string_tab[263] +#define __pyx_n_u_setstate_cython __pyx_string_tab[264] +#define __pyx_n_u_size __pyx_string_tab[265] +#define __pyx_n_u_sizeof __pyx_string_tab[266] +#define __pyx_n_u_spec __pyx_string_tab[267] +#define __pyx_n_u_src __pyx_string_tab[268] +#define __pyx_kp_u_stringsource __pyx_string_tab[269] +#define __pyx_n_u_supportedArchs __pyx_string_tab[270] +#define __pyx_n_u_supported_types __pyx_string_tab[271] +#define __pyx_n_u_t __pyx_string_tab[272] +#define __pyx_n_u_test __pyx_string_tab[273] +#define __pyx_n_u_throw __pyx_string_tab[274] +#define __pyx_n_u_typing __pyx_string_tab[275] +#define __pyx_n_u_v __pyx_string_tab[276] +#define __pyx_n_u_value __pyx_string_tab[277] +#define __pyx_n_u_x __pyx_string_tab[278] +#define __pyx_n_u_zip __pyx_string_tab[279] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperKernelParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperInputVoidPtr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemPool_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmem_range_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUpointer_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUgraphMem_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUjit_option); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaJitOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUlibraryOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaLibraryOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__InputVoidPtrPtrHelper); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUcoredumpSettings); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcontext); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmodule); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUfunction); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibrary); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernel); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarray); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmipmappedArray); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexref); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfref); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUevent); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstream); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphicsResource); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexternalMemory); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexternalSemaphore); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraph); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNode); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExec); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuserObject); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphDeviceNode); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallbackHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgreenCtx); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlinkState); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResourceDesc); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallbackHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglStreamConnection); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLImageKHR); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLStreamKHR); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLSyncKHR); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallback); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUhostFn); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamCallback); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoccupancyB2DSize); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallback); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuuid_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct0); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct3); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct4); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct5); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue_union); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union3); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct6); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct7); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct8); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct9); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct10); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct11); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union4); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct12); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union5); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct13); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union6); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct14); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union7); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct15); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct16); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct17); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union8); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct18); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct19); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union9); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct20); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct21); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union10); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union11); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct22); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct23); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct24); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union12); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union15); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_st); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevice); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphConditionalHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuuid); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_cuuint32_t); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr_v2); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevice_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogIterator); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_GLenum); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_GLuint); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLint); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpDevice); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpGetProcAddress); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpVideoSurface); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpOutputSurface); + Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr); + for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } + for (int i=0; i<68; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<280; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + Py_CLEAR(clear_module_state->__pyx_int_0); + Py_CLEAR(clear_module_state->__pyx_int_1); + Py_CLEAR(clear_module_state->__pyx_int_1024); + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperKernelParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperInputVoidPtr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemPool_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmem_range_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUpointer_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUgraphMem_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUjit_option); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaJitOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUlibraryOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaLibraryOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__InputVoidPtrPtrHelper); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver__HelperCUcoredumpSettings); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcontext); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmodule); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUfunction); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibrary); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernel); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarray); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmipmappedArray); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexref); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfref); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUevent); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstream); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphicsResource); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexternalMemory); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexternalSemaphore); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraph); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNode); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExec); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuserObject); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphDeviceNode); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallbackHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgreenCtx); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlinkState); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResourceDesc); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallbackHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglStreamConnection); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLImageKHR); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLStreamKHR); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLSyncKHR); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallback); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUhostFn); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamCallback); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoccupancyB2DSize); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallback); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuuid_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct0); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct3); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct4); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct5); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue_union); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union3); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct6); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct7); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct8); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct9); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct10); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct11); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union4); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct12); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union5); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct13); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union6); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct14); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union7); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct15); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct16); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct17); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union8); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct18); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct19); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union9); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct20); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct21); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union10); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union11); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct22); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct23); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_struct24); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union12); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_anon_union15); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_st); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevice); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphConditionalHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUuuid); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_cuuint32_t); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr_v2); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUdevice_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_CUlogIterator); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_GLenum); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_GLuint); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_EGLint); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpDevice); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpGetProcAddress); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpVideoSurface); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_6driver_VdpOutputSurface); + Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr); + for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } + for (int i=0; i<68; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<280; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1024); + return 0; +} +#endif +/* #### Code section: module_code ### */ +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_56generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "cuda/bindings/nvrtc.pyx":70 + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + * + * _dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) # <<<<<<<<<<<<<< + * + * cdef class nvrtcProgram: +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_54genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 70, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_8bindings_5nvrtc_56generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc); if (unlikely(!gen)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_56generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 70, __pyx_L1_error) + __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_r); + __pyx_t_2 = 0; + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 70, __pyx_L1_error) } + if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); + __PYX_ERR(0, 70, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); + __pyx_t_1 = __pyx_t_5; + __pyx_t_5 = 0; + while (1) { + __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); + if (unlikely(__pyx_t_7 == 0)) break; + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_t_6, (PyObject*)__pyx_cur_scope->__pyx_v_v))) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.to_py":79 + * const Py_ssize_t PY_SSIZE_T_MAX + * + * @cname("__pyx_convert_vector_to_py_int") # <<<<<<<<<<<<<< + * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v): + * if v.size() > PY_SSIZE_T_MAX: +*/ + +static PyObject *__pyx_convert_vector_to_py_int(std::vector const &__pyx_v_v) { + Py_ssize_t __pyx_v_v_size_signed; + PyObject *__pyx_v_o = NULL; + Py_ssize_t __pyx_v_i; + PyObject *__pyx_v_item = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_int", 0); + + /* "vector.to_py":81 + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v): + * if v.size() > PY_SSIZE_T_MAX: # <<<<<<<<<<<<<< + * raise MemoryError() + * v_size_signed = v.size() +*/ + __pyx_t_1 = (__pyx_v_v.size() > ((size_t)PY_SSIZE_T_MAX)); + if (unlikely(__pyx_t_1)) { + + /* "vector.to_py":82 + * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v): + * if v.size() > PY_SSIZE_T_MAX: + * raise MemoryError() # <<<<<<<<<<<<<< + * v_size_signed = v.size() + * +*/ + PyErr_NoMemory(); __PYX_ERR(2, 82, __pyx_L1_error) + + /* "vector.to_py":81 + * @cname("__pyx_convert_vector_to_py_int") + * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v): + * if v.size() > PY_SSIZE_T_MAX: # <<<<<<<<<<<<<< + * raise MemoryError() + * v_size_signed = v.size() +*/ + } + + /* "vector.to_py":83 + * if v.size() > PY_SSIZE_T_MAX: + * raise MemoryError() + * v_size_signed = v.size() # <<<<<<<<<<<<<< + * + * o = PyList_New(v_size_signed) +*/ + __pyx_v_v_size_signed = ((Py_ssize_t)__pyx_v_v.size()); + + /* "vector.to_py":85 + * v_size_signed = v.size() + * + * o = PyList_New(v_size_signed) # <<<<<<<<<<<<<< + * + * cdef Py_ssize_t i +*/ + __pyx_t_2 = PyList_New(__pyx_v_v_size_signed); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_o = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "vector.to_py":90 + * cdef object item + * + * for i in range(v_size_signed): # <<<<<<<<<<<<<< + * item = v[i] + * Py_INCREF(item) +*/ + __pyx_t_3 = __pyx_v_v_size_signed; + __pyx_t_4 = __pyx_t_3; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_i = __pyx_t_5; + + /* "vector.to_py":91 + * + * for i in range(v_size_signed): + * item = v[i] # <<<<<<<<<<<<<< + * Py_INCREF(item) + * __Pyx_PyList_SET_ITEM(o, i, item) +*/ + __pyx_t_2 = __Pyx_PyLong_From_int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2); + __pyx_t_2 = 0; + + /* "vector.to_py":92 + * for i in range(v_size_signed): + * item = v[i] + * Py_INCREF(item) # <<<<<<<<<<<<<< + * __Pyx_PyList_SET_ITEM(o, i, item) + * +*/ + Py_INCREF(__pyx_v_item); + + /* "vector.to_py":93 + * item = v[i] + * Py_INCREF(item) + * __Pyx_PyList_SET_ITEM(o, i, item) # <<<<<<<<<<<<<< + * + * return o +*/ + __pyx_t_6 = __Pyx_PyList_SET_ITEM(__pyx_v_o, __pyx_v_i, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(2, 93, __pyx_L1_error) + } + + /* "vector.to_py":95 + * __Pyx_PyList_SET_ITEM(o, i, item) + * + * return o # <<<<<<<<<<<<<< + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_o); + __pyx_r = __pyx_v_o; + goto __pyx_L0; + + /* "vector.to_py":79 + * const Py_ssize_t PY_SSIZE_T_MAX + * + * @cname("__pyx_convert_vector_to_py_int") # <<<<<<<<<<<<<< + * cdef object __pyx_convert_vector_to_py_int(const vector[X]& v): + * if v.size() > PY_SSIZE_T_MAX: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("vector.to_py.__pyx_convert_vector_to_py_int", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_o); + __Pyx_XDECREF(__pyx_v_item); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_char___2a_") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_char___2a_(object o) except *: + * +*/ + +static std::vector __pyx_convert_vector_from_py_char___2a_(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + char *__pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_char___2a_", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(2, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(2, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_item); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((char *)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(2, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_char___2a_") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_char___2a_(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_char___2a_", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static std::vector __pyx_convert_vector_from_py_char__const___2a_(PyObject *__pyx_v_o) { + std::vector __pyx_v_v; + Py_ssize_t __pyx_v_s; + PyObject *__pyx_v_item = NULL; + std::vector __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); + PyObject *__pyx_t_5 = NULL; + char const *__pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__pyx_convert_vector_from_py_char__const___2a_", 0); + + /* "vector.from_py":55 + * + * cdef vector[X] v + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) # <<<<<<<<<<<<<< + * + * if s > 0: +*/ + __pyx_t_1 = __Pyx_PyObject_LengthHint(__pyx_v_o, 0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 55, __pyx_L1_error) + __pyx_v_s = __pyx_t_1; + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + __pyx_t_2 = (__pyx_v_s > 0); + if (__pyx_t_2) { + + /* "vector.from_py":58 + * + * if s > 0: + * v.reserve( s) # <<<<<<<<<<<<<< + * + * for item in o: +*/ + try { + __pyx_v_v.reserve(((size_t)__pyx_v_s)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(2, 58, __pyx_L1_error) + } + + /* "vector.from_py":57 + * cdef Py_ssize_t s = __Pyx_PyObject_LengthHint(o, 0) + * + * if s > 0: # <<<<<<<<<<<<<< + * v.reserve( s) + * +*/ + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + if (likely(PyList_CheckExact(__pyx_v_o)) || PyTuple_CheckExact(__pyx_v_o)) { + __pyx_t_3 = __pyx_v_o; __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_o); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 60, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_4)) { + if (likely(PyList_CheckExact(__pyx_t_3))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_1); + ++__pyx_t_1; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 60, __pyx_L1_error) + #endif + if (__pyx_t_1 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1)); + #else + __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); + #endif + ++__pyx_t_1; + } + if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 60, __pyx_L1_error) + } else { + __pyx_t_5 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_5)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(2, 60, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); + __pyx_t_5 = 0; + + /* "vector.from_py":61 + * + * for item in o: + * v.push_back(item) # <<<<<<<<<<<<<< + * + * return v +*/ + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_item); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(2, 61, __pyx_L1_error) + try { + __pyx_v_v.push_back(((char const *)__pyx_t_6)); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(2, 61, __pyx_L1_error) + } + + /* "vector.from_py":60 + * v.reserve( s) + * + * for item in o: # <<<<<<<<<<<<<< + * v.push_back(item) + * +*/ + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "vector.from_py":63 + * v.push_back(item) + * + * return v # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_v; + goto __pyx_L0; + + /* "vector.from_py":51 + * cdef Py_ssize_t __Pyx_PyObject_LengthHint(object o, Py_ssize_t defaultval) except -1 + * + * @cname("__pyx_convert_vector_from_py_char__const___2a_") # <<<<<<<<<<<<<< + * cdef vector[X] __pyx_convert_vector_from_py_char__const___2a_(object o) except *: + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("vector.from_py.__pyx_convert_vector_from_py_char__const___2a_", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_pretend_to_initialize(&__pyx_r); + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_item); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":15 + * cimport cuda.bindings._lib.param_packer as param_packer + * + * cdef void* _callocWrapper(length, size): # <<<<<<<<<<<<<< + * cdef void* out = calloc(length, size) + * if out is NULL: +*/ + +static void *__pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(PyObject *__pyx_v_length, PyObject *__pyx_v_size) { + void *__pyx_v_out; + void *__pyx_r; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + size_t __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_callocWrapper", 0); + + /* "cuda/bindings/_lib/utils.pxi":16 + * + * cdef void* _callocWrapper(length, size): + * cdef void* out = calloc(length, size) # <<<<<<<<<<<<<< + * if out is NULL: + * raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) +*/ + __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_length); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L1_error) + __pyx_v_out = calloc(__pyx_t_1, __pyx_t_2); + + /* "cuda/bindings/_lib/utils.pxi":17 + * cdef void* _callocWrapper(length, size): + * cdef void* out = calloc(length, size) + * if out is NULL: # <<<<<<<<<<<<<< + * raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) + * return out +*/ + __pyx_t_3 = (__pyx_v_out == NULL); + if (unlikely(__pyx_t_3)) { + + /* "cuda/bindings/_lib/utils.pxi":18 + * cdef void* out = calloc(length, size) + * if out is NULL: + * raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) # <<<<<<<<<<<<<< + * return out + * +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_MemoryError); + __pyx_t_6 = __pyx_builtin_MemoryError; + __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Failed_to_allocated_length_x_siz; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_2 = 0; + { + PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_length, __pyx_v_size}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_2, (3-__pyx_t_2) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_2 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_2, (2-__pyx_t_2) | (__pyx_t_2*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 18, __pyx_L1_error) + + /* "cuda/bindings/_lib/utils.pxi":17 + * cdef void* _callocWrapper(length, size): + * cdef void* out = calloc(length, size) + * if out is NULL: # <<<<<<<<<<<<<< + * raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) + * return out +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":19 + * if out is NULL: + * raise MemoryError('Failed to allocated length x size memory: {}x{}'.format(length, size)) + * return out # <<<<<<<<<<<<<< + * + * cdef class _HelperKernelParams: +*/ + __pyx_r = __pyx_v_out; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":15 + * cimport cuda.bindings._lib.param_packer as param_packer + * + * cdef void* _callocWrapper(length, size): # <<<<<<<<<<<<<< + * cdef void* out = calloc(length, size) + * if out is NULL: +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.nvrtc._callocWrapper", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":41 + * } + * + * max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) # <<<<<<<<<<<<<< + * + * def __cinit__(self, kernelParams): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_4lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_4lambda = {"lambda", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_4lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_4lambda(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_t = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_t,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 41, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 41, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda", 0) < (0)) __PYX_ERR(1, 41, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, i); __PYX_ERR(1, 41, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 41, __pyx_L3_error) + } + __pyx_v_t = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 41, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_lambda(__pyx_self, __pyx_v_t); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_t) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sizeof); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_5 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_t}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":43 + * max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) + * + * def __cinit__(self, kernelParams): # <<<<<<<<<<<<<< + * self._pyobj_acquired = False + * self._malloc_list_created = False +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_kernelParams = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kernelParams,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 43, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 43, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 43, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(1, 43, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 43, __pyx_L3_error) + } + __pyx_v_kernelParams = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 43, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)__pyx_v_self), __pyx_v_kernelParams); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *__pyx_v_self, PyObject *__pyx_v_kernelParams) { + int __pyx_v_err_buffer; + PyObject *__pyx_v_idx = NULL; + PyObject *__pyx_v_data_idx = NULL; + PyObject *__pyx_v_value = NULL; + PyObject *__pyx_v_ctype = NULL; + PyObject *__pyx_v_size = NULL; + void *__pyx_v_addr; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + Py_ssize_t __pyx_t_10; + void *__pyx_t_11; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *(*__pyx_t_14)(PyObject *); + PyObject *(*__pyx_t_15)(PyObject *); + Py_ssize_t __pyx_t_16; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + PyObject *__pyx_t_19 = NULL; + PyObject *__pyx_t_20 = NULL; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_21; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":44 + * + * def __cinit__(self, kernelParams): + * self._pyobj_acquired = False # <<<<<<<<<<<<<< + * self._malloc_list_created = False + * if kernelParams is None: +*/ + __pyx_v_self->_pyobj_acquired = 0; + + /* "cuda/bindings/_lib/utils.pxi":45 + * def __cinit__(self, kernelParams): + * self._pyobj_acquired = False + * self._malloc_list_created = False # <<<<<<<<<<<<<< + * if kernelParams is None: + * self._ckernelParams = NULL +*/ + __pyx_v_self->_malloc_list_created = 0; + + /* "cuda/bindings/_lib/utils.pxi":46 + * self._pyobj_acquired = False + * self._malloc_list_created = False + * if kernelParams is None: # <<<<<<<<<<<<<< + * self._ckernelParams = NULL + * elif isinstance(kernelParams, (int)): +*/ + __pyx_t_1 = (__pyx_v_kernelParams == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":47 + * self._malloc_list_created = False + * if kernelParams is None: + * self._ckernelParams = NULL # <<<<<<<<<<<<<< + * elif isinstance(kernelParams, (int)): + * # Easy run, user gave us an already configured void** address +*/ + __pyx_v_self->_ckernelParams = NULL; + + /* "cuda/bindings/_lib/utils.pxi":46 + * self._pyobj_acquired = False + * self._malloc_list_created = False + * if kernelParams is None: # <<<<<<<<<<<<<< + * self._ckernelParams = NULL + * elif isinstance(kernelParams, (int)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":48 + * if kernelParams is None: + * self._ckernelParams = NULL + * elif isinstance(kernelParams, (int)): # <<<<<<<<<<<<<< + * # Easy run, user gave us an already configured void** address + * self._ckernelParams = kernelParams +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_kernelParams); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":50 + * elif isinstance(kernelParams, (int)): + * # Easy run, user gave us an already configured void** address + * self._ckernelParams = kernelParams # <<<<<<<<<<<<<< + * elif PyObject_CheckBuffer(kernelParams): + * # Easy run, get address from Python Buffer Protocol +*/ + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_kernelParams); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 50, __pyx_L1_error) + __pyx_v_self->_ckernelParams = ((void **)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":48 + * if kernelParams is None: + * self._ckernelParams = NULL + * elif isinstance(kernelParams, (int)): # <<<<<<<<<<<<<< + * # Easy run, user gave us an already configured void** address + * self._ckernelParams = kernelParams +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":51 + * # Easy run, user gave us an already configured void** address + * self._ckernelParams = kernelParams + * elif PyObject_CheckBuffer(kernelParams): # <<<<<<<<<<<<<< + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) +*/ + __pyx_t_1 = PyObject_CheckBuffer(__pyx_v_kernelParams); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":53 + * elif PyObject_CheckBuffer(kernelParams): + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< + * if err_buffer == -1: + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") +*/ + __pyx_t_3 = PyObject_GetBuffer(__pyx_v_kernelParams, (&__pyx_v_self->_pybuffer), (PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_v_err_buffer = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":54 + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: # <<<<<<<<<<<<<< + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True +*/ + __pyx_t_1 = (__pyx_v_err_buffer == -1L); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":55 + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") # <<<<<<<<<<<<<< + * self._pyobj_acquired = True + * self._ckernelParams = self._pybuffer.buf +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_6 = __pyx_builtin_RuntimeError; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Argument_kernelParams_failed_to}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 55, __pyx_L1_error) + + /* "cuda/bindings/_lib/utils.pxi":54 + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: # <<<<<<<<<<<<<< + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":56 + * if err_buffer == -1: + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True # <<<<<<<<<<<<<< + * self._ckernelParams = self._pybuffer.buf + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): +*/ + __pyx_v_self->_pyobj_acquired = 1; + + /* "cuda/bindings/_lib/utils.pxi":57 + * raise RuntimeError("Argument 'kernelParams' failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True + * self._ckernelParams = self._pybuffer.buf # <<<<<<<<<<<<<< + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): + * # Hard run, construct and fill out contigues memory using provided kernel values and types based +*/ + __pyx_v_self->_ckernelParams = ((void **)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_pybuffer.buf)); + + /* "cuda/bindings/_lib/utils.pxi":51 + * # Easy run, user gave us an already configured void** address + * self._ckernelParams = kernelParams + * elif PyObject_CheckBuffer(kernelParams): # <<<<<<<<<<<<<< + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(kernelParams, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":58 + * self._pyobj_acquired = True + * self._ckernelParams = self._pybuffer.buf + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): # <<<<<<<<<<<<<< + * # Hard run, construct and fill out contigues memory using provided kernel values and types based + * if len(kernelParams[0]) != len(kernelParams[1]): +*/ + __pyx_t_8 = PyTuple_Check(__pyx_v_kernelParams); + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_9 = PyObject_Length(__pyx_v_kernelParams); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 58, __pyx_L1_error) + __pyx_t_8 = (__pyx_t_9 == 2); + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PyTuple_Check(__pyx_t_4); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_t_8; + __pyx_L5_bool_binop_done:; + if (likely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":60 + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): + * # Hard run, construct and fill out contigues memory using provided kernel values and types based + * if len(kernelParams[0]) != len(kernelParams[1]): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'kernelParams' has tuples with different length") + * if len(kernelParams[0]) != 0: +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_9 != __pyx_t_10); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":61 + * # Hard run, construct and fill out contigues memory using provided kernel values and types based + * if len(kernelParams[0]) != len(kernelParams[1]): + * raise TypeError("Argument 'kernelParams' has tuples with different length") # <<<<<<<<<<<<<< + * if len(kernelParams[0]) != 0: + * self._length = len(kernelParams[0]) +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_5 = __pyx_builtin_TypeError; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Argument_kernelParams_has_tuples}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 61, __pyx_L1_error) + + /* "cuda/bindings/_lib/utils.pxi":60 + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): + * # Hard run, construct and fill out contigues memory using provided kernel values and types based + * if len(kernelParams[0]) != len(kernelParams[1]): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'kernelParams' has tuples with different length") + * if len(kernelParams[0]) != 0: +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":62 + * if len(kernelParams[0]) != len(kernelParams[1]): + * raise TypeError("Argument 'kernelParams' has tuples with different length") + * if len(kernelParams[0]) != 0: # <<<<<<<<<<<<<< + * self._length = len(kernelParams[0]) + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = (__pyx_t_10 != 0); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":63 + * raise TypeError("Argument 'kernelParams' has tuples with different length") + * if len(kernelParams[0]) != 0: + * self._length = len(kernelParams[0]) # <<<<<<<<<<<<<< + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) + * self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->_length = __pyx_t_10; + + /* "cuda/bindings/_lib/utils.pxi":64 + * if len(kernelParams[0]) != 0: + * self._length = len(kernelParams[0]) + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) # <<<<<<<<<<<<<< + * self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) + * self._malloc_list_created = True +*/ + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_FromSize_t((sizeof(void *))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_11 = __pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(__pyx_t_4, __pyx_t_5); if (unlikely(__pyx_t_11 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_self->_ckernelParams = ((void **)__pyx_t_11); + + /* "cuda/bindings/_lib/utils.pxi":65 + * self._length = len(kernelParams[0]) + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) + * self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) # <<<<<<<<<<<<<< + * self._malloc_list_created = True + * +*/ + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams), __pyx_mstate_global->__pyx_n_u_max_param_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_11 = __pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(__pyx_t_5, __pyx_t_4); if (unlikely(__pyx_t_11 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->_ckernelParamsData = ((char *)__pyx_t_11); + + /* "cuda/bindings/_lib/utils.pxi":66 + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) + * self._ckernelParamsData = _callocWrapper(len(kernelParams[0]), _HelperKernelParams.max_param_size) + * self._malloc_list_created = True # <<<<<<<<<<<<<< + * + * idx = 0 +*/ + __pyx_v_self->_malloc_list_created = 1; + + /* "cuda/bindings/_lib/utils.pxi":62 + * if len(kernelParams[0]) != len(kernelParams[1]): + * raise TypeError("Argument 'kernelParams' has tuples with different length") + * if len(kernelParams[0]) != 0: # <<<<<<<<<<<<<< + * self._length = len(kernelParams[0]) + * self._ckernelParams = _callocWrapper(len(kernelParams[0]), sizeof(void*)) +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":68 + * self._malloc_list_created = True + * + * idx = 0 # <<<<<<<<<<<<<< + * data_idx = 0 + * for value, ctype in zip(kernelParams[0], kernelParams[1]): +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_idx = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/_lib/utils.pxi":69 + * + * idx = 0 + * data_idx = 0 # <<<<<<<<<<<<<< + * for value, ctype in zip(kernelParams[0], kernelParams[1]): + * if ctype is None: +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_data_idx = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/_lib/utils.pxi":70 + * idx = 0 + * data_idx = 0 + * for value, ctype in zip(kernelParams[0], kernelParams[1]): # <<<<<<<<<<<<<< + * if ctype is None: + * # special cases for None +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_zip); + __pyx_t_6 = __pyx_builtin_zip; + __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_kernelParams, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_GetItemInt(__pyx_v_kernelParams, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_12, __pyx_t_13}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); + __pyx_t_10 = 0; + __pyx_t_14 = NULL; + } else { + __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 70, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { + if (likely(!__pyx_t_14)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 70, __pyx_L1_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_10); + ++__pyx_t_10; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 70, __pyx_L1_error) + #endif + if (__pyx_t_10 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_10); + #endif + ++__pyx_t_10; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 70, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_14(__pyx_t_6); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 70, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(1, 70, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_13); + __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_12); + } else { + __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 0); + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PyList_GetItemRef(sequence, 1); + if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_12); + } + #else + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_13 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_13); + index = 1; __pyx_t_12 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed; + __Pyx_GOTREF(__pyx_t_12); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < (0)) __PYX_ERR(1, 70, __pyx_L1_error) + __pyx_t_15 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L14_unpacking_done; + __pyx_L13_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_15 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(1, 70, __pyx_L1_error) + __pyx_L14_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_13); + __pyx_t_13 = 0; + __Pyx_XDECREF_SET(__pyx_v_ctype, __pyx_t_12); + __pyx_t_12 = 0; + + /* "cuda/bindings/_lib/utils.pxi":71 + * data_idx = 0 + * for value, ctype in zip(kernelParams[0], kernelParams[1]): + * if ctype is None: # <<<<<<<<<<<<<< + * # special cases for None + * if callable(getattr(value, 'getPtr', None)): +*/ + __pyx_t_1 = (__pyx_v_ctype == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":73 + * if ctype is None: + * # special cases for None + * if callable(getattr(value, 'getPtr', None)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = value.getPtr() + * elif isinstance(value, (_ctypes.Structure)): +*/ + __pyx_t_4 = __Pyx_GetAttr3(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_getPtr, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 73, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":74 + * # special cases for None + * if callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = value.getPtr() # <<<<<<<<<<<<<< + * elif isinstance(value, (_ctypes.Structure)): + * self._ckernelParams[idx] = _ctypes.addressof(value) +*/ + __pyx_t_12 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 74, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_9]) = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":73 + * if ctype is None: + * # special cases for None + * if callable(getattr(value, 'getPtr', None)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = value.getPtr() + * elif isinstance(value, (_ctypes.Structure)): +*/ + goto __pyx_L16; + } + + /* "cuda/bindings/_lib/utils.pxi":75 + * if callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = value.getPtr() + * elif isinstance(value, (_ctypes.Structure)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = _ctypes.addressof(value) + * elif isinstance(value, (_Enum)): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Structure); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_12); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":76 + * self._ckernelParams[idx] = value.getPtr() + * elif isinstance(value, (_ctypes.Structure)): + * self._ckernelParams[idx] = _ctypes.addressof(value) # <<<<<<<<<<<<<< + * elif isinstance(value, (_Enum)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_addressof); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; + __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + } + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_12); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_9]) = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":75 + * if callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = value.getPtr() + * elif isinstance(value, (_ctypes.Structure)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = _ctypes.addressof(value) + * elif isinstance(value, (_Enum)): +*/ + goto __pyx_L16; + } + + /* "cuda/bindings/_lib/utils.pxi":77 + * elif isinstance(value, (_ctypes.Structure)): + * self._ckernelParams[idx] = _ctypes.addressof(value) + * elif isinstance(value, (_Enum)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value +*/ + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_Enum); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_12); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 77, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (likely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":78 + * self._ckernelParams[idx] = _ctypes.addressof(value) + * elif isinstance(value, (_Enum)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) # <<<<<<<<<<<<<< + * (self._ckernelParams[idx])[0] = value.value + * data_idx += sizeof(int) +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_data_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 78, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 78, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_16]) = (&(__pyx_v_self->_ckernelParamsData[__pyx_t_9])); + + /* "cuda/bindings/_lib/utils.pxi":79 + * elif isinstance(value, (_Enum)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value # <<<<<<<<<<<<<< + * data_idx += sizeof(int) + * else: +*/ + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 79, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_3 = __Pyx_PyLong_As_int(__pyx_t_12); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 79, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 79, __pyx_L1_error) + (((int *)(__pyx_v_self->_ckernelParams[__pyx_t_9]))[0]) = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":80 + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value + * data_idx += sizeof(int) # <<<<<<<<<<<<<< + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) +*/ + __pyx_t_12 = __Pyx_PyLong_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_data_idx, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF_SET(__pyx_v_data_idx, __pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/_lib/utils.pxi":77 + * elif isinstance(value, (_ctypes.Structure)): + * self._ckernelParams[idx] = _ctypes.addressof(value) + * elif isinstance(value, (_Enum)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value +*/ + goto __pyx_L16; + } + + /* "cuda/bindings/_lib/utils.pxi":82 + * data_idx += sizeof(int) + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) # <<<<<<<<<<<<<< + * elif ctype in _HelperKernelParams.supported_types: + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) +*/ + /*else*/ { + __pyx_t_12 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_17 = __pyx_mstate_global->__pyx_kp_u_Provided_argument_is_of_type_but; + __Pyx_INCREF(__pyx_t_17); + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_Structure); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_c_void_p); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_20); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_17, ((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)Py_TYPE(__pyx_t_19)), ((PyObject *)Py_TYPE(__pyx_t_20))}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(1, 82, __pyx_L1_error) + } + __pyx_L16:; + + /* "cuda/bindings/_lib/utils.pxi":71 + * data_idx = 0 + * for value, ctype in zip(kernelParams[0], kernelParams[1]): + * if ctype is None: # <<<<<<<<<<<<<< + * # special cases for None + * if callable(getattr(value, 'getPtr', None)): +*/ + goto __pyx_L15; + } + + /* "cuda/bindings/_lib/utils.pxi":83 + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) + * elif ctype in _HelperKernelParams.supported_types: # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * +*/ + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams), __pyx_mstate_global->__pyx_n_u_supported_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_ctype, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":84 + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) + * elif ctype in _HelperKernelParams.supported_types: + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) # <<<<<<<<<<<<<< + * + * # handle case where a float is passed as a double +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_data_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 84, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 84, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_16]) = (&(__pyx_v_self->_ckernelParamsData[__pyx_t_9])); + + /* "cuda/bindings/_lib/utils.pxi":87 + * + * # handle case where a float is passed as a double + * if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): # <<<<<<<<<<<<<< + * value = ctype(value.value) + * if not isinstance(value, ctype): # make it a ctype +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_c_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyObject_RichCompare(__pyx_v_ctype, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_8) { + } else { + __pyx_t_1 = __pyx_t_8; + goto __pyx_L18_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_c_float); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 87, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_t_8; + __pyx_L18_bool_binop_done:; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":88 + * # handle case where a float is passed as a double + * if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): + * value = ctype(value.value) # <<<<<<<<<<<<<< + * if not isinstance(value, ctype): # make it a ctype + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_v_ctype); + __pyx_t_13 = __pyx_v_ctype; + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_12}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 88, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":87 + * + * # handle case where a float is passed as a double + * if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): # <<<<<<<<<<<<<< + * value = ctype(value.value) + * if not isinstance(value, ctype): # make it a ctype +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":89 + * if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): + * value = ctype(value.value) + * if not isinstance(value, ctype): # make it a ctype # <<<<<<<<<<<<<< + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) + * if size == 0: # feed failed +*/ + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_v_ctype); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 89, __pyx_L1_error) + __pyx_t_8 = (!__pyx_t_1); + if (__pyx_t_8) { + + /* "cuda/bindings/_lib/utils.pxi":90 + * value = ctype(value.value) + * if not isinstance(value, ctype): # make it a ctype + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) # <<<<<<<<<<<<<< + * if size == 0: # feed failed + * value = ctype(value) +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 90, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_From_int(feed((__pyx_v_self->_ckernelParams[__pyx_t_9]), __pyx_v_value, __pyx_v_ctype)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 90, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XDECREF_SET(__pyx_v_size, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":91 + * if not isinstance(value, ctype): # make it a ctype + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) + * if size == 0: # feed failed # <<<<<<<<<<<<<< + * value = ctype(value) + * size = _ctypes.sizeof(ctype) +*/ + __pyx_t_8 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_size, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 91, __pyx_L1_error) + if (__pyx_t_8) { + + /* "cuda/bindings/_lib/utils.pxi":92 + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) + * if size == 0: # feed failed + * value = ctype(value) # <<<<<<<<<<<<<< + * size = _ctypes.sizeof(ctype) + * addr = (_ctypes.addressof(value)) +*/ + __pyx_t_13 = NULL; + __Pyx_INCREF(__pyx_v_ctype); + __pyx_t_12 = __pyx_v_ctype; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_13); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":93 + * if size == 0: # feed failed + * value = ctype(value) + * size = _ctypes.sizeof(ctype) # <<<<<<<<<<<<<< + * addr = (_ctypes.addressof(value)) + * memcpy(self._ckernelParams[idx], addr, size) +*/ + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_sizeof); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_12); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_ctype}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 93, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_DECREF_SET(__pyx_v_size, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":94 + * value = ctype(value) + * size = _ctypes.sizeof(ctype) + * addr = (_ctypes.addressof(value)) # <<<<<<<<<<<<<< + * memcpy(self._ckernelParams[idx], addr, size) + * else: +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_addressof); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_13))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 94, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_addr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":95 + * size = _ctypes.sizeof(ctype) + * addr = (_ctypes.addressof(value)) + * memcpy(self._ckernelParams[idx], addr, size) # <<<<<<<<<<<<<< + * else: + * size = _ctypes.sizeof(ctype) +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 95, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 95, __pyx_L1_error) + (void)(memcpy((__pyx_v_self->_ckernelParams[__pyx_t_9]), __pyx_v_addr, __pyx_t_7)); + + /* "cuda/bindings/_lib/utils.pxi":91 + * if not isinstance(value, ctype): # make it a ctype + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) + * if size == 0: # feed failed # <<<<<<<<<<<<<< + * value = ctype(value) + * size = _ctypes.sizeof(ctype) +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":89 + * if ctype == _ctypes.c_double and isinstance(value, _ctypes.c_float): + * value = ctype(value.value) + * if not isinstance(value, ctype): # make it a ctype # <<<<<<<<<<<<<< + * size = param_packer.feed(self._ckernelParams[idx], value, ctype) + * if size == 0: # feed failed +*/ + goto __pyx_L20; + } + + /* "cuda/bindings/_lib/utils.pxi":97 + * memcpy(self._ckernelParams[idx], addr, size) + * else: + * size = _ctypes.sizeof(ctype) # <<<<<<<<<<<<<< + * addr = (_ctypes.addressof(value)) + * memcpy(self._ckernelParams[idx], addr, size) +*/ + /*else*/ { + __pyx_t_13 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sizeof); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_12))) { + __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12); + assert(__pyx_t_13); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); + __Pyx_INCREF(__pyx_t_13); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_ctype}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_XDECREF_SET(__pyx_v_size, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":98 + * else: + * size = _ctypes.sizeof(ctype) + * addr = (_ctypes.addressof(value)) # <<<<<<<<<<<<<< + * memcpy(self._ckernelParams[idx], addr, size) + * data_idx += size +*/ + __pyx_t_12 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_addressof); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_12); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_value}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 98, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_addr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":99 + * size = _ctypes.sizeof(ctype) + * addr = (_ctypes.addressof(value)) + * memcpy(self._ckernelParams[idx], addr, size) # <<<<<<<<<<<<<< + * data_idx += size + * elif ctype == _ctypes.c_void_p: +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 99, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 99, __pyx_L1_error) + (void)(memcpy((__pyx_v_self->_ckernelParams[__pyx_t_9]), __pyx_v_addr, __pyx_t_7)); + } + __pyx_L20:; + + /* "cuda/bindings/_lib/utils.pxi":100 + * addr = (_ctypes.addressof(value)) + * memcpy(self._ckernelParams[idx], addr, size) + * data_idx += size # <<<<<<<<<<<<<< + * elif ctype == _ctypes.c_void_p: + * # special cases for void_p +*/ + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_data_idx, __pyx_v_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_data_idx, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":83 + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(_ctypes.Structure), type(_ctypes.c_void_p))) + * elif ctype in _HelperKernelParams.supported_types: # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * +*/ + goto __pyx_L15; + } + + /* "cuda/bindings/_lib/utils.pxi":101 + * memcpy(self._ckernelParams[idx], addr, size) + * data_idx += size + * elif ctype == _ctypes.c_void_p: # <<<<<<<<<<<<<< + * # special cases for void_p + * if isinstance(value, (int, _ctypes.c_void_p)): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_c_void_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_v_ctype, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(1, 101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (likely(__pyx_t_8)) { + + /* "cuda/bindings/_lib/utils.pxi":103 + * elif ctype == _ctypes.c_void_p: + * # special cases for void_p + * if isinstance(value, (int, _ctypes.c_void_p)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value +*/ + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_c_void_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = PyLong_Check(__pyx_v_value); + if (!__pyx_t_1) { + } else { + __pyx_t_8 = __pyx_t_1; + goto __pyx_L23_bool_binop_done; + } + __pyx_t_1 = PyObject_IsInstance(__pyx_v_value, __pyx_t_5); + __pyx_t_8 = __pyx_t_1; + __pyx_L23_bool_binop_done:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_8) { + + /* "cuda/bindings/_lib/utils.pxi":104 + * # special cases for void_p + * if isinstance(value, (int, _ctypes.c_void_p)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) # <<<<<<<<<<<<<< + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + * data_idx += sizeof(void_ptr) +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_data_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 104, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 104, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_16]) = (&(__pyx_v_self->_ckernelParamsData[__pyx_t_9])); + + /* "cuda/bindings/_lib/utils.pxi":105 + * if isinstance(value, (int, _ctypes.c_void_p)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value # <<<<<<<<<<<<<< + * data_idx += sizeof(void_ptr) + * elif callable(getattr(value, 'getPtr', None)): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_c_void_p); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_8 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_21 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_21; + } else { + __pyx_t_21 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_value); if (unlikely((__pyx_t_21 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error) + __pyx_t_2 = __pyx_t_21; + } + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 105, __pyx_L1_error) + (((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr *)(__pyx_v_self->_ckernelParams[__pyx_t_9]))[0]) = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":106 + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + * data_idx += sizeof(void_ptr) # <<<<<<<<<<<<<< + * elif callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) +*/ + __pyx_t_4 = __Pyx_PyLong_FromSize_t((sizeof(__pyx_t_4cuda_8bindings_5nvrtc_void_ptr))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_data_idx, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_data_idx, __pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/_lib/utils.pxi":103 + * elif ctype == _ctypes.c_void_p: + * # special cases for void_p + * if isinstance(value, (int, _ctypes.c_void_p)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value +*/ + goto __pyx_L22; + } + + /* "cuda/bindings/_lib/utils.pxi":107 + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + * data_idx += sizeof(void_ptr) + * elif callable(getattr(value, 'getPtr', None)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.getPtr() +*/ + __pyx_t_5 = __Pyx_GetAttr3(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_getPtr, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 107, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyCallable_Check(__pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 107, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(__pyx_t_8)) { + + /* "cuda/bindings/_lib/utils.pxi":108 + * data_idx += sizeof(void_ptr) + * elif callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) # <<<<<<<<<<<<<< + * (self._ckernelParams[idx])[0] = value.getPtr() + * data_idx += sizeof(void_ptr) +*/ + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_data_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 108, __pyx_L1_error) + (__pyx_v_self->_ckernelParams[__pyx_t_16]) = (&(__pyx_v_self->_ckernelParamsData[__pyx_t_9])); + + /* "cuda/bindings/_lib/utils.pxi":109 + * elif callable(getattr(value, 'getPtr', None)): + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.getPtr() # <<<<<<<<<<<<<< + * data_idx += sizeof(void_ptr) + * else: +*/ + __pyx_t_4 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_5); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L1_error) + (((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr *)(__pyx_v_self->_ckernelParams[__pyx_t_9]))[0]) = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":110 + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.getPtr() + * data_idx += sizeof(void_ptr) # <<<<<<<<<<<<<< + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(int), type(_ctypes.c_void_p))) +*/ + __pyx_t_5 = __Pyx_PyLong_FromSize_t((sizeof(__pyx_t_4cuda_8bindings_5nvrtc_void_ptr))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_data_idx, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 110, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_data_idx, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":107 + * (self._ckernelParams[idx])[0] = value.value if isinstance(value, (_ctypes.c_void_p)) else value + * data_idx += sizeof(void_ptr) + * elif callable(getattr(value, 'getPtr', None)): # <<<<<<<<<<<<<< + * self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) + * (self._ckernelParams[idx])[0] = value.getPtr() +*/ + goto __pyx_L22; + } + + /* "cuda/bindings/_lib/utils.pxi":112 + * data_idx += sizeof(void_ptr) + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(int), type(_ctypes.c_void_p))) # <<<<<<<<<<<<<< + * else: + * raise TypeError("Unsupported type: " + str(type(ctype))) +*/ + /*else*/ { + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_12 = __pyx_builtin_TypeError; + __pyx_t_20 = __pyx_mstate_global->__pyx_kp_u_Provided_argument_is_of_type_but; + __Pyx_INCREF(__pyx_t_20); + __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_c_void_p); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_20, ((PyObject *)Py_TYPE(__pyx_v_value)), ((PyObject *)Py_TYPE(((PyObject *)(&PyLong_Type)))), ((PyObject *)Py_TYPE(__pyx_t_17))}; + __pyx_t_13 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_13}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 112, __pyx_L1_error) + } + __pyx_L22:; + + /* "cuda/bindings/_lib/utils.pxi":101 + * memcpy(self._ckernelParams[idx], addr, size) + * data_idx += size + * elif ctype == _ctypes.c_void_p: # <<<<<<<<<<<<<< + * # special cases for void_p + * if isinstance(value, (int, _ctypes.c_void_p)): +*/ + goto __pyx_L15; + } + + /* "cuda/bindings/_lib/utils.pxi":114 + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or CUDA Binding structure with getPtr() attribute".format(type(value), type(int), type(_ctypes.c_void_p))) + * else: + * raise TypeError("Unsupported type: " + str(type(ctype))) # <<<<<<<<<<<<<< + * idx += 1 + * else: +*/ + /*else*/ { + __pyx_t_12 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_13 = __pyx_builtin_TypeError; + __pyx_t_5 = __Pyx_PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_ctype))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_17 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Unsupported_type, __pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_17}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 114, __pyx_L1_error) + } + __pyx_L15:; + + /* "cuda/bindings/_lib/utils.pxi":115 + * else: + * raise TypeError("Unsupported type: " + str(type(ctype))) + * idx += 1 # <<<<<<<<<<<<<< + * else: + * raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") +*/ + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_idx, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 115, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/_lib/utils.pxi":70 + * idx = 0 + * data_idx = 0 + * for value, ctype in zip(kernelParams[0], kernelParams[1]): # <<<<<<<<<<<<<< + * if ctype is None: + * # special cases for None +*/ + } + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + + /* "cuda/bindings/_lib/utils.pxi":58 + * self._pyobj_acquired = True + * self._ckernelParams = self._pybuffer.buf + * elif isinstance(kernelParams, (tuple)) and len(kernelParams) == 2 and isinstance(kernelParams[0], (tuple)) and isinstance(kernelParams[1], (tuple)): # <<<<<<<<<<<<<< + * # Hard run, construct and fill out contigues memory using provided kernel values and types based + * if len(kernelParams[0]) != len(kernelParams[1]): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":117 + * idx += 1 + * else: + * raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + /*else*/ { + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_13 = __pyx_builtin_TypeError; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Argument_kernelParams_is_not_a_v}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 117, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __Pyx_Raise(__pyx_t_6, 0, 0, 0); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __PYX_ERR(1, 117, __pyx_L1_error) + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":43 + * max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) + * + * def __cinit__(self, kernelParams): # <<<<<<<<<<<<<< + * self._pyobj_acquired = False + * self._malloc_list_created = False +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_XDECREF(__pyx_t_20); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_idx); + __Pyx_XDECREF(__pyx_v_data_idx); + __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_v_ctype); + __Pyx_XDECREF(__pyx_v_size); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":119 + * raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_2__dealloc__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *__pyx_v_self) { + int __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":120 + * + * def __dealloc__(self): + * if self._pyobj_acquired is True: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self._pybuffer) + * if self._malloc_list_created is True: +*/ + __pyx_t_1 = (__pyx_v_self->_pyobj_acquired == 1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":121 + * def __dealloc__(self): + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) # <<<<<<<<<<<<<< + * if self._malloc_list_created is True: + * free(self._ckernelParams) +*/ + PyBuffer_Release((&__pyx_v_self->_pybuffer)); + + /* "cuda/bindings/_lib/utils.pxi":120 + * + * def __dealloc__(self): + * if self._pyobj_acquired is True: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self._pybuffer) + * if self._malloc_list_created is True: +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":122 + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) + * if self._malloc_list_created is True: # <<<<<<<<<<<<<< + * free(self._ckernelParams) + * free(self._ckernelParamsData) +*/ + __pyx_t_1 = (__pyx_v_self->_malloc_list_created == 1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":123 + * PyBuffer_Release(&self._pybuffer) + * if self._malloc_list_created is True: + * free(self._ckernelParams) # <<<<<<<<<<<<<< + * free(self._ckernelParamsData) + * +*/ + free(__pyx_v_self->_ckernelParams); + + /* "cuda/bindings/_lib/utils.pxi":124 + * if self._malloc_list_created is True: + * free(self._ckernelParams) + * free(self._ckernelParamsData) # <<<<<<<<<<<<<< + * + * @property +*/ + free(__pyx_v_self->_ckernelParamsData); + + /* "cuda/bindings/_lib/utils.pxi":122 + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) + * if self._malloc_list_created is True: # <<<<<<<<<<<<<< + * free(self._ckernelParams) + * free(self._ckernelParamsData) +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":119 + * raise TypeError("Argument 'kernelParams' is not a valid type: tuple[tuple[Any, ...], tuple[Any, ...]] or PyObject implimenting Buffer Protocol or Int") + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) +*/ + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":126 + * free(self._ckernelParamsData) + * + * @property # <<<<<<<<<<<<<< + * def ckernelParams(self): + * return self._ckernelParams +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_13ckernelParams_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_13ckernelParams_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_13ckernelParams___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_13ckernelParams___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":128 + * @property + * def ckernelParams(self): + * return self._ckernelParams # <<<<<<<<<<<<<< + * + * cdef class _HelperInputVoidPtr: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_ckernelParams)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":126 + * free(self._ckernelParamsData) + * + * @property # <<<<<<<<<<<<<< + * def ckernelParams(self): + * return self._ckernelParams +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.ckernelParams.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_5__reduce_cython__, "_HelperKernelParams.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_5__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_5__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_5__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_7__setstate_cython__, "_HelperKernelParams.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_7__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_7__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperKernelParams_7__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperKernelParams.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":131 + * + * cdef class _HelperInputVoidPtr: + * def __cinit__(self, ptr): # <<<<<<<<<<<<<< + * self._pyobj_acquired = False + * if ptr is None: +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ptr = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ptr,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 131, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 131, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 131, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(1, 131, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 131, __pyx_L3_error) + } + __pyx_v_ptr = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_v_self), __pyx_v_ptr); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_self, PyObject *__pyx_v_ptr) { + int __pyx_v_err_buffer; + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":132 + * cdef class _HelperInputVoidPtr: + * def __cinit__(self, ptr): + * self._pyobj_acquired = False # <<<<<<<<<<<<<< + * if ptr is None: + * self._cptr = NULL +*/ + __pyx_v_self->_pyobj_acquired = 0; + + /* "cuda/bindings/_lib/utils.pxi":133 + * def __cinit__(self, ptr): + * self._pyobj_acquired = False + * if ptr is None: # <<<<<<<<<<<<<< + * self._cptr = NULL + * elif isinstance(ptr, (int)): +*/ + __pyx_t_1 = (__pyx_v_ptr == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":134 + * self._pyobj_acquired = False + * if ptr is None: + * self._cptr = NULL # <<<<<<<<<<<<<< + * elif isinstance(ptr, (int)): + * # Easy run, user gave us an already configured void** address +*/ + __pyx_v_self->_cptr = NULL; + + /* "cuda/bindings/_lib/utils.pxi":133 + * def __cinit__(self, ptr): + * self._pyobj_acquired = False + * if ptr is None: # <<<<<<<<<<<<<< + * self._cptr = NULL + * elif isinstance(ptr, (int)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":135 + * if ptr is None: + * self._cptr = NULL + * elif isinstance(ptr, (int)): # <<<<<<<<<<<<<< + * # Easy run, user gave us an already configured void** address + * self._cptr = ptr +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_ptr); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":137 + * elif isinstance(ptr, (int)): + * # Easy run, user gave us an already configured void** address + * self._cptr = ptr # <<<<<<<<<<<<<< + * elif isinstance(ptr, (_driver.CUdeviceptr)): + * self._cptr = int(ptr) +*/ + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_ptr); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 137, __pyx_L1_error) + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":135 + * if ptr is None: + * self._cptr = NULL + * elif isinstance(ptr, (int)): # <<<<<<<<<<<<<< + * # Easy run, user gave us an already configured void** address + * self._cptr = ptr +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":138 + * # Easy run, user gave us an already configured void** address + * self._cptr = ptr + * elif isinstance(ptr, (_driver.CUdeviceptr)): # <<<<<<<<<<<<<< + * self._cptr = int(ptr) + * elif PyObject_CheckBuffer(ptr): +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CUdeviceptr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = PyObject_IsInstance(__pyx_v_ptr, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":139 + * self._cptr = ptr + * elif isinstance(ptr, (_driver.CUdeviceptr)): + * self._cptr = int(ptr) # <<<<<<<<<<<<<< + * elif PyObject_CheckBuffer(ptr): + * # Easy run, get address from Python Buffer Protocol +*/ + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_ptr); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_2 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_2)); + + /* "cuda/bindings/_lib/utils.pxi":138 + * # Easy run, user gave us an already configured void** address + * self._cptr = ptr + * elif isinstance(ptr, (_driver.CUdeviceptr)): # <<<<<<<<<<<<<< + * self._cptr = int(ptr) + * elif PyObject_CheckBuffer(ptr): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":140 + * elif isinstance(ptr, (_driver.CUdeviceptr)): + * self._cptr = int(ptr) + * elif PyObject_CheckBuffer(ptr): # <<<<<<<<<<<<<< + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) +*/ + __pyx_t_1 = PyObject_CheckBuffer(__pyx_v_ptr); + if (likely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":142 + * elif PyObject_CheckBuffer(ptr): + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) # <<<<<<<<<<<<<< + * if err_buffer == -1: + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") +*/ + __pyx_t_5 = PyObject_GetBuffer(__pyx_v_ptr, (&__pyx_v_self->_pybuffer), (PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 142, __pyx_L1_error) + __pyx_v_err_buffer = __pyx_t_5; + + /* "cuda/bindings/_lib/utils.pxi":143 + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: # <<<<<<<<<<<<<< + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True +*/ + __pyx_t_1 = (__pyx_v_err_buffer == -1L); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/_lib/utils.pxi":144 + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") # <<<<<<<<<<<<<< + * self._pyobj_acquired = True + * self._cptr = self._pybuffer.buf +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_6 = __pyx_builtin_RuntimeError; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Failed_to_retrieve_buffer_throug}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 144, __pyx_L1_error) + + /* "cuda/bindings/_lib/utils.pxi":143 + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) + * if err_buffer == -1: # <<<<<<<<<<<<<< + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":145 + * if err_buffer == -1: + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True # <<<<<<<<<<<<<< + * self._cptr = self._pybuffer.buf + * else: +*/ + __pyx_v_self->_pyobj_acquired = 1; + + /* "cuda/bindings/_lib/utils.pxi":146 + * raise RuntimeError("Failed to retrieve buffer through Buffer Protocol") + * self._pyobj_acquired = True + * self._cptr = self._pybuffer.buf # <<<<<<<<<<<<<< + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_pybuffer.buf)); + + /* "cuda/bindings/_lib/utils.pxi":140 + * elif isinstance(ptr, (_driver.CUdeviceptr)): + * self._cptr = int(ptr) + * elif PyObject_CheckBuffer(ptr): # <<<<<<<<<<<<<< + * # Easy run, get address from Python Buffer Protocol + * err_buffer = PyObject_GetBuffer(ptr, &self._pybuffer, PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":148 + * self._cptr = self._pybuffer.buf + * else: + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + /*else*/ { + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_3 = __pyx_builtin_TypeError; + __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_Provided_argument_is_of_type_but_2; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[4] = {__pyx_t_9, ((PyObject *)Py_TYPE(__pyx_v_ptr)), ((PyObject *)Py_TYPE(Py_None)), ((PyObject *)Py_TYPE(((PyObject *)(&PyLong_Type))))}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __PYX_ERR(1, 148, __pyx_L1_error) + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":131 + * + * cdef class _HelperInputVoidPtr: + * def __cinit__(self, ptr): # <<<<<<<<<<<<<< + * self._pyobj_acquired = False + * if ptr is None: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":150 + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_2__dealloc__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_self) { + int __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":151 + * + * def __dealloc__(self): + * if self._pyobj_acquired is True: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self._pybuffer) + * +*/ + __pyx_t_1 = (__pyx_v_self->_pyobj_acquired == 1); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":152 + * def __dealloc__(self): + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) # <<<<<<<<<<<<<< + * + * @property +*/ + PyBuffer_Release((&__pyx_v_self->_pybuffer)); + + /* "cuda/bindings/_lib/utils.pxi":151 + * + * def __dealloc__(self): + * if self._pyobj_acquired is True: # <<<<<<<<<<<<<< + * PyBuffer_Release(&self._pybuffer) + * +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":150 + * raise TypeError("Provided argument is of type {} but expected Type {}, {} or object with Buffer Protocol".format(type(ptr), type(None), type(int))) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._pyobj_acquired is True: + * PyBuffer_Release(&self._pybuffer) +*/ + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":154 + * PyBuffer_Release(&self._pybuffer) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":156 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCUmemPool_attribute: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 156, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":154 + * PyBuffer_Release(&self._pybuffer) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4__reduce_cython__, "_HelperInputVoidPtr.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_6__setstate_cython__, "_HelperInputVoidPtr.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperInputVoidPtr.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":159 + * + * cdef class _HelperCUmemPool_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + PyObject *__pyx_v_is_getter = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,&__pyx_mstate_global->__pyx_n_u_is_getter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 159, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 159, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 159, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 159, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 159, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 159, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 159, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 159, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 159, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + __pyx_v_is_getter = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 159, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value, __pyx_v_is_getter); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value, PyObject *__pyx_v_is_getter) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + enum CUmemPool_attribute_enum __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":160 + * cdef class _HelperCUmemPool_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_getter); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 160, __pyx_L1_error) + __pyx_v_self->_is_getter = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":161 + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 161, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((enum CUmemPool_attribute_enum)__Pyx_PyLong_As_enum__CUmemPool_attribute_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 161, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_attr = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":162 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): +*/ + switch (__pyx_v_self->_attr) { + case CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: + case CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: + + /* "cuda/bindings/_lib/utils.pxi":163 + * self._attr = attr.value + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * self._int_val = init_value +*/ + case CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: + + /* "cuda/bindings/_lib/utils.pxi":165 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * self._int_val = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, +*/ + __pyx_t_4 = __Pyx_PyLong_As_int(__pyx_v_init_value); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 165, __pyx_L1_error) + __pyx_v_self->_int_val = __pyx_t_4; + + /* "cuda/bindings/_lib/utils.pxi":166 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * self._int_val = init_value + * self._cptr = &self._int_val # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_int_val)); + + /* "cuda/bindings/_lib/utils.pxi":162 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): +*/ + break; + case CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: + + /* "cuda/bindings/_lib/utils.pxi":167 + * self._int_val = init_value + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, +*/ + case CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":168 + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, +*/ + case CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":169 + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): +*/ + case CU_MEMPOOL_ATTR_USED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":170 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * if self._is_getter: +*/ + case CU_MEMPOOL_ATTR_USED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":172 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":173 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * if self._is_getter: + * self._cuuint64_t_val = _driver.cuuint64_t() # <<<<<<<<<<<<<< + * self._cptr = self._cuuint64_t_val.getPtr() + * else: +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cuuint64_t); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); + __pyx_t_8 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t))))) __PYX_ERR(1, 173, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __Pyx_DECREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __pyx_v_self->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":174 + * if self._is_getter: + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_7 = ((PyObject *)__pyx_v_self->_cuuint64_t_val); + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 174, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_9 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_9 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 174, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_9)); + + /* "cuda/bindings/_lib/utils.pxi":172 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":176 + * self._cptr = self._cuuint64_t_val.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + /*else*/ { + __pyx_t_7 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_9 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_9 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_9)); + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":167 + * self._int_val = init_value + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":178 + * self._cptr = init_value.getPtr() + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_5 = __pyx_builtin_TypeError; + __pyx_t_10 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 178, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":159 + * + * cdef class _HelperCUmemPool_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":180 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":183 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":185 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":183 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":187 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4pyObj, "_HelperCUmemPool_attribute.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":188 + * + * def pyObj(self): + * assert(self._is_getter == True) # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->_is_getter == 1); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(1, 188, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 188, __pyx_L1_error) + #endif + + /* "cuda/bindings/_lib/utils.pxi":189 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): +*/ + switch (__pyx_v_self->_attr) { + case CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: + case CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: + + /* "cuda/bindings/_lib/utils.pxi":190 + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * return self._int_val +*/ + case CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: + + /* "cuda/bindings/_lib/utils.pxi":192 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * return self._int_val # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_self->_int_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":189 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): +*/ + break; + case CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: + + /* "cuda/bindings/_lib/utils.pxi":193 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * return self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, +*/ + case CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":194 + * return self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, +*/ + case CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":195 + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): +*/ + case CU_MEMPOOL_ATTR_USED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":196 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * return self._cuuint64_t_val +*/ + case CU_MEMPOOL_ATTR_USED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":198 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH,): + * return self._cuuint64_t_val # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __pyx_r = ((PyObject *)__pyx_v_self->_cuuint64_t_val); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":193 + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES,): + * return self._int_val + * elif self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, # <<<<<<<<<<<<<< + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":200 + * return self._cuuint64_t_val + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) # <<<<<<<<<<<<<< + * + * cdef class _HelperCUmem_range_attribute: +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_From_enum__CUmemPool_attribute_enum(__pyx_v_self->_attr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 200, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":187 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_6__reduce_cython__, "_HelperCUmemPool_attribute.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_6__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_6__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_8__setstate_cython__, "_HelperCUmemPool_attribute.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_8__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_8__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemPool_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":203 + * + * cdef class _HelperCUmem_range_attribute: + * def __cinit__(self, attr, data_size): # <<<<<<<<<<<<<< + * self._data_size = data_size + * self._attr = attr.value +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_data_size = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_data_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 203, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 203, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 203, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(1, 203, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 203, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 203, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + __pyx_v_data_size = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 203, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self), __pyx_v_attr, __pyx_v_data_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_data_size) { + int __pyx_r; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + enum CUmem_range_attribute_enum __pyx_t_3; + void *__pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":204 + * cdef class _HelperCUmem_range_attribute: + * def __cinit__(self, attr, data_size): + * self._data_size = data_size # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, +*/ + __pyx_t_1 = __Pyx_PyLong_As_size_t(__pyx_v_data_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 204, __pyx_L1_error) + __pyx_v_self->_data_size = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":205 + * def __cinit__(self, attr, data_size): + * self._data_size = data_size + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((enum CUmem_range_attribute_enum)__Pyx_PyLong_As_enum__CUmem_range_attribute_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_attr = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":206 + * self._data_size = data_size + * self._attr = attr.value + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): +*/ + switch (__pyx_v_self->_attr) { + case CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: + case CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: + + /* "cuda/bindings/_lib/utils.pxi":207 + * self._attr = attr.value + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * self._cptr = &self._int_val +*/ + case CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: + + /* "cuda/bindings/_lib/utils.pxi":209 + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * self._cptr = &self._int_val # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * self._cptr = _callocWrapper(1, self._data_size) +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_int_val)); + + /* "cuda/bindings/_lib/utils.pxi":206 + * self._data_size = data_size + * self._attr = attr.value + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): +*/ + break; + case CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: + + /* "cuda/bindings/_lib/utils.pxi":211 + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * self._cptr = _callocWrapper(1, self._data_size) # <<<<<<<<<<<<<< + * self._int_val_list = self._cptr + * else: +*/ + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->_data_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(__pyx_mstate_global->__pyx_int_1, __pyx_t_2); if (unlikely(__pyx_t_4 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(1, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = __pyx_t_4; + + /* "cuda/bindings/_lib/utils.pxi":212 + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * self._cptr = _callocWrapper(1, self._data_size) + * self._int_val_list = self._cptr # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_v_self->_int_val_list = ((int *)__pyx_v_self->_cptr); + + /* "cuda/bindings/_lib/utils.pxi":210 + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * self._cptr = &self._int_val + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): # <<<<<<<<<<<<<< + * self._cptr = _callocWrapper(1, self._data_size) + * self._int_val_list = self._cptr +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":214 + * self._int_val_list = self._cptr + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_6 = __pyx_builtin_TypeError; + __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; + __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + } + __pyx_t_1 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_1, (2-__pyx_t_1) | (__pyx_t_1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 214, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 214, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":203 + * + * cdef class _HelperCUmem_range_attribute: + * def __cinit__(self, attr, data_size): # <<<<<<<<<<<<<< + * self._data_size = data_size + * self._attr = attr.value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":216 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * free(self._cptr) +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_2__dealloc__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self) { + enum CUmem_range_attribute_enum __pyx_t_1; + int __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":217 + * + * def __dealloc__(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): # <<<<<<<<<<<<<< + * free(self._cptr) + * +*/ + __pyx_t_1 = __pyx_v_self->_attr; + __pyx_t_2 = (__pyx_t_1 == CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY); + if (__pyx_t_2) { + + /* "cuda/bindings/_lib/utils.pxi":218 + * def __dealloc__(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * free(self._cptr) # <<<<<<<<<<<<<< + * + * @property +*/ + free(__pyx_v_self->_cptr); + + /* "cuda/bindings/_lib/utils.pxi":217 + * + * def __dealloc__(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): # <<<<<<<<<<<<<< + * free(self._cptr) + * +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":216 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * free(self._cptr) +*/ + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":220 + * free(self._cptr) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":222 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":220 + * free(self._cptr) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":224 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4pyObj, "_HelperCUmem_range_attribute.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self) { + PyObject *__pyx_7genexpr__pyx_v_idx = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":225 + * + * def pyObj(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): +*/ + switch (__pyx_v_self->_attr) { + case CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: + case CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: + + /* "cuda/bindings/_lib/utils.pxi":226 + * def pyObj(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * return self._int_val +*/ + case CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: + + /* "cuda/bindings/_lib/utils.pxi":228 + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * return self._int_val # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_int_val); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":225 + * + * def pyObj(self): + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, # <<<<<<<<<<<<<< + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): +*/ + break; + case CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: + + /* "cuda/bindings/_lib/utils.pxi":230 + * return self._int_val + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): + * return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) +*/ + __Pyx_XDECREF(__pyx_r); + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_range); + __pyx_t_4 = __pyx_builtin_range; + __pyx_t_5 = PyLong_FromDouble((((double)__pyx_v_self->_data_size) / 4.0)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + __pyx_t_8 = NULL; + } else { + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 230, __pyx_L5_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_4))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 230, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + __pyx_t_2 = __Pyx_PyList_GetItemRef(__pyx_t_4, __pyx_t_7); + ++__pyx_t_7; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 230, __pyx_L5_error) + #endif + if (__pyx_t_7 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7)); + #else + __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); + #endif + ++__pyx_t_7; + } + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __pyx_L5_error) + } else { + __pyx_t_2 = __pyx_t_8(__pyx_t_4); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 230, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyLong_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_2))) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_idx, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_7genexpr__pyx_v_idx); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L5_error) + __pyx_t_2 = __Pyx_PyLong_From_int((__pyx_v_self->_int_val_list[__pyx_t_9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 230, __pyx_L5_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_idx); __pyx_7genexpr__pyx_v_idx = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_idx); __pyx_7genexpr__pyx_v_idx = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":229 + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION,): + * return self._int_val + * elif self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY,): # <<<<<<<<<<<<<< + * return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":232 + * return [self._int_val_list[idx] for idx in range(int(self._data_size/4))] + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) # <<<<<<<<<<<<<< + * + * cdef class _HelperCUpointer_attribute: +*/ + __pyx_t_4 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_2 = __pyx_builtin_TypeError; + __pyx_t_3 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute_value; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyLong_From_enum__CUmem_range_attribute_enum(__pyx_v_self->_attr); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_10}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 232, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":224 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_7genexpr__pyx_v_idx); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_6__reduce_cython__, "_HelperCUmem_range_attribute.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_6__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_6__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_8__setstate_cython__, "_HelperCUmem_range_attribute.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_8__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_8__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmem_range_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":235 + * + * cdef class _HelperCUpointer_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + PyObject *__pyx_v_is_getter = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,&__pyx_mstate_global->__pyx_n_u_is_getter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 235, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 235, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 235, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 235, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 235, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 235, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + __pyx_v_is_getter = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 235, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value, __pyx_v_is_getter); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value, PyObject *__pyx_v_is_getter) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + enum CUpointer_attribute_enum __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_8; + unsigned int __pyx_t_9; + unsigned PY_LONG_LONG __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":236 + * cdef class _HelperCUpointer_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_getter); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error) + __pyx_v_self->_is_getter = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":237 + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * if self._is_getter: +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((enum CUpointer_attribute_enum)__Pyx_PyLong_As_enum__CUpointer_attribute_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_attr = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":238 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): # <<<<<<<<<<<<<< + * if self._is_getter: + * self._ctx = _driver.CUcontext() +*/ + switch (__pyx_v_self->_attr) { + case CU_POINTER_ATTRIBUTE_CONTEXT: + + /* "cuda/bindings/_lib/utils.pxi":239 + * self._attr = attr.value + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._ctx = _driver.CUcontext() + * self._cptr = self._ctx.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":240 + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * if self._is_getter: + * self._ctx = _driver.CUcontext() # <<<<<<<<<<<<<< + * self._cptr = self._ctx.getPtr() + * else: +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CUcontext); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_CUcontext))))) __PYX_ERR(1, 240, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_ctx); + __Pyx_DECREF((PyObject *)__pyx_v_self->_ctx); + __pyx_v_self->_ctx = ((struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":241 + * if self._is_getter: + * self._ctx = _driver.CUcontext() + * self._cptr = self._ctx.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_6 = ((PyObject *)__pyx_v_self->_ctx); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 241, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":239 + * self._attr = attr.value + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._ctx = _driver.CUcontext() + * self._cptr = self._ctx.getPtr() +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":243 + * self._cptr = self._ctx.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, +*/ + /*else*/ { + __pyx_t_6 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 243, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 243, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":238 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): # <<<<<<<<<<<<<< + * if self._is_getter: + * self._ctx = _driver.CUcontext() +*/ + break; + case CU_POINTER_ATTRIBUTE_MEMORY_TYPE: + + /* "cuda/bindings/_lib/utils.pxi":244 + * else: + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, +*/ + case CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL: + + /* "cuda/bindings/_lib/utils.pxi":245 + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, +*/ + case CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: + + /* "cuda/bindings/_lib/utils.pxi":246 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): +*/ + case CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: + + /* "cuda/bindings/_lib/utils.pxi":247 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * self._uint = init_value +*/ + case CU_POINTER_ATTRIBUTE_ACCESS_FLAGS: + + /* "cuda/bindings/_lib/utils.pxi":249 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * self._uint = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._uint + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, +*/ + __pyx_t_9 = __Pyx_PyLong_As_unsigned_int(__pyx_v_init_value); if (unlikely((__pyx_t_9 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L1_error) + __pyx_v_self->_uint = __pyx_t_9; + + /* "cuda/bindings/_lib/utils.pxi":250 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * self._uint = init_value + * self._cptr = &self._uint # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_uint)); + + /* "cuda/bindings/_lib/utils.pxi":244 + * else: + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, +*/ + break; + case CU_POINTER_ATTRIBUTE_DEVICE_POINTER: + + /* "cuda/bindings/_lib/utils.pxi":251 + * self._uint = init_value + * self._cptr = &self._uint + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * if self._is_getter: +*/ + case CU_POINTER_ATTRIBUTE_RANGE_START_ADDR: + + /* "cuda/bindings/_lib/utils.pxi":253 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._devptr = _driver.CUdeviceptr() + * self._cptr = self._devptr.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":254 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * if self._is_getter: + * self._devptr = _driver.CUdeviceptr() # <<<<<<<<<<<<<< + * self._cptr = self._devptr.getPtr() + * else: +*/ + __pyx_t_6 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CUdeviceptr); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_6); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 254, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr))))) __PYX_ERR(1, 254, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_devptr); + __Pyx_DECREF((PyObject *)__pyx_v_self->_devptr); + __pyx_v_self->_devptr = ((struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":255 + * if self._is_getter: + * self._devptr = _driver.CUdeviceptr() + * self._cptr = self._devptr.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_self->_devptr); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":253 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._devptr = _driver.CUdeviceptr() + * self._cptr = self._devptr.getPtr() +*/ + goto __pyx_L4; + } + + /* "cuda/bindings/_lib/utils.pxi":257 + * self._cptr = self._devptr.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * self._void = init_value +*/ + /*else*/ { + __pyx_t_5 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 257, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + } + __pyx_L4:; + + /* "cuda/bindings/_lib/utils.pxi":251 + * self._uint = init_value + * self._cptr = &self._uint + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * if self._is_getter: +*/ + break; + case CU_POINTER_ATTRIBUTE_HOST_POINTER: + + /* "cuda/bindings/_lib/utils.pxi":259 + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * self._void = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): +*/ + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_init_value); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 259, __pyx_L1_error) + __pyx_v_self->_void = ((void **)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":260 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * self._void = init_value + * self._cptr = &self._void # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * if self._is_getter: +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_void)); + + /* "cuda/bindings/_lib/utils.pxi":258 + * else: + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): # <<<<<<<<<<<<<< + * self._void = init_value + * self._cptr = &self._void +*/ + break; + case CU_POINTER_ATTRIBUTE_P2P_TOKENS: + + /* "cuda/bindings/_lib/utils.pxi":262 + * self._cptr = &self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() + * self._cptr = self._token.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":263 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * if self._is_getter: + * self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() # <<<<<<<<<<<<<< + * self._cptr = self._token.getPtr() + * else: +*/ + __pyx_t_5 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_5); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS))))) __PYX_ERR(1, 263, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_token); + __Pyx_DECREF((PyObject *)__pyx_v_self->_token); + __pyx_v_self->_token = ((struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":264 + * if self._is_getter: + * self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() + * self._cptr = self._token.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_4 = ((PyObject *)__pyx_v_self->_token); + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 264, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":262 + * self._cptr = &self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() + * self._cptr = self._token.getPtr() +*/ + goto __pyx_L5; + } + + /* "cuda/bindings/_lib/utils.pxi":266 + * self._cptr = self._token.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, +*/ + /*else*/ { + __pyx_t_4 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 266, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + } + __pyx_L5:; + + /* "cuda/bindings/_lib/utils.pxi":261 + * self._void = init_value + * self._cptr = &self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): # <<<<<<<<<<<<<< + * if self._is_getter: + * self._token = _driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS() +*/ + break; + case CU_POINTER_ATTRIBUTE_SYNC_MEMOPS: + + /* "cuda/bindings/_lib/utils.pxi":267 + * else: + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, +*/ + case CU_POINTER_ATTRIBUTE_IS_MANAGED: + + /* "cuda/bindings/_lib/utils.pxi":268 + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): +*/ + case CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE: + + /* "cuda/bindings/_lib/utils.pxi":269 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * self._bool = init_value +*/ + case CU_POINTER_ATTRIBUTE_MAPPED: + + /* "cuda/bindings/_lib/utils.pxi":271 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * self._bool = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._bool + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_init_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 271, __pyx_L1_error) + __pyx_v_self->_bool = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":272 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * self._bool = init_value + * self._cptr = &self._bool # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * self._ull = init_value +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_bool)); + + /* "cuda/bindings/_lib/utils.pxi":267 + * else: + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, +*/ + break; + case CU_POINTER_ATTRIBUTE_BUFFER_ID: + + /* "cuda/bindings/_lib/utils.pxi":274 + * self._cptr = &self._bool + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * self._ull = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): +*/ + __pyx_t_10 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_init_value); if (unlikely((__pyx_t_10 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 274, __pyx_L1_error) + __pyx_v_self->_ull = __pyx_t_10; + + /* "cuda/bindings/_lib/utils.pxi":275 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * self._ull = init_value + * self._cptr = &self._ull # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * self._size = init_value +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_ull)); + + /* "cuda/bindings/_lib/utils.pxi":273 + * self._bool = init_value + * self._cptr = &self._bool + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): # <<<<<<<<<<<<<< + * self._ull = init_value + * self._cptr = &self._ull +*/ + break; + case CU_POINTER_ATTRIBUTE_RANGE_SIZE: + + /* "cuda/bindings/_lib/utils.pxi":277 + * self._cptr = &self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * self._size = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): +*/ + __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_v_init_value); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L1_error) + __pyx_v_self->_size = __pyx_t_7; + + /* "cuda/bindings/_lib/utils.pxi":278 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * self._size = init_value + * self._cptr = &self._size # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * if self._is_getter: +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_size)); + + /* "cuda/bindings/_lib/utils.pxi":276 + * self._ull = init_value + * self._cptr = &self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): # <<<<<<<<<<<<<< + * self._size = init_value + * self._cptr = &self._size +*/ + break; + case CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: + + /* "cuda/bindings/_lib/utils.pxi":280 + * self._cptr = &self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._mempool = _driver.CUmemoryPool() + * self._cptr = self._mempool.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":281 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * if self._is_getter: + * self._mempool = _driver.CUmemoryPool() # <<<<<<<<<<<<<< + * self._cptr = self._mempool.getPtr() + * else: +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CUmemoryPool); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 281, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool))))) __PYX_ERR(1, 281, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_mempool); + __Pyx_DECREF((PyObject *)__pyx_v_self->_mempool); + __pyx_v_self->_mempool = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":282 + * if self._is_getter: + * self._mempool = _driver.CUmemoryPool() + * self._cptr = self._mempool.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_6 = ((PyObject *)__pyx_v_self->_mempool); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":280 + * self._cptr = &self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._mempool = _driver.CUmemoryPool() + * self._cptr = self._mempool.getPtr() +*/ + goto __pyx_L6; + } + + /* "cuda/bindings/_lib/utils.pxi":284 + * self._cptr = self._mempool.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + /*else*/ { + __pyx_t_6 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 284, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + } + __pyx_L6:; + + /* "cuda/bindings/_lib/utils.pxi":279 + * self._size = init_value + * self._cptr = &self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): # <<<<<<<<<<<<<< + * if self._is_getter: + * self._mempool = _driver.CUmemoryPool() +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":286 + * self._cptr = init_value.getPtr() + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_11 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_11); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 286, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":235 + * + * cdef class _HelperCUpointer_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":288 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":291 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":293 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 293, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":291 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":295 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4pyObj, "_HelperCUpointer_attribute.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":296 + * + * def pyObj(self): + * assert(self._is_getter == True) # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * return self._ctx +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->_is_getter == 1); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(1, 296, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 296, __pyx_L1_error) + #endif + + /* "cuda/bindings/_lib/utils.pxi":297 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): # <<<<<<<<<<<<<< + * return self._ctx + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +*/ + switch (__pyx_v_self->_attr) { + case CU_POINTER_ATTRIBUTE_CONTEXT: + + /* "cuda/bindings/_lib/utils.pxi":298 + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * return self._ctx # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_ctx); + __pyx_r = ((PyObject *)__pyx_v_self->_ctx); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":297 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): # <<<<<<<<<<<<<< + * return self._ctx + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, +*/ + break; + case CU_POINTER_ATTRIBUTE_MEMORY_TYPE: + + /* "cuda/bindings/_lib/utils.pxi":299 + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * return self._ctx + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, +*/ + case CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL: + + /* "cuda/bindings/_lib/utils.pxi":300 + * return self._ctx + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, +*/ + case CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: + + /* "cuda/bindings/_lib/utils.pxi":301 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): +*/ + case CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: + + /* "cuda/bindings/_lib/utils.pxi":302 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * return self._uint +*/ + case CU_POINTER_ATTRIBUTE_ACCESS_FLAGS: + + /* "cuda/bindings/_lib/utils.pxi":304 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * return self._uint # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->_uint); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 304, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":299 + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): + * return self._ctx + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, +*/ + break; + case CU_POINTER_ATTRIBUTE_DEVICE_POINTER: + + /* "cuda/bindings/_lib/utils.pxi":305 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * return self._uint + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * return self._devptr +*/ + case CU_POINTER_ATTRIBUTE_RANGE_START_ADDR: + + /* "cuda/bindings/_lib/utils.pxi":307 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * return self._devptr # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * return self._void +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_devptr); + __pyx_r = ((PyObject *)__pyx_v_self->_devptr); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":305 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS,): + * return self._uint + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * return self._devptr +*/ + break; + case CU_POINTER_ATTRIBUTE_HOST_POINTER: + + /* "cuda/bindings/_lib/utils.pxi":309 + * return self._devptr + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * return self._void # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * return self._token +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_void)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":308 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR,): + * return self._devptr + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): # <<<<<<<<<<<<<< + * return self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): +*/ + break; + case CU_POINTER_ATTRIBUTE_P2P_TOKENS: + + /* "cuda/bindings/_lib/utils.pxi":311 + * return self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * return self._token # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_token); + __pyx_r = ((PyObject *)__pyx_v_self->_token); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":310 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER,): + * return self._void + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): # <<<<<<<<<<<<<< + * return self._token + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, +*/ + break; + case CU_POINTER_ATTRIBUTE_SYNC_MEMOPS: + + /* "cuda/bindings/_lib/utils.pxi":312 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * return self._token + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, +*/ + case CU_POINTER_ATTRIBUTE_IS_MANAGED: + + /* "cuda/bindings/_lib/utils.pxi":313 + * return self._token + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): +*/ + case CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE: + + /* "cuda/bindings/_lib/utils.pxi":314 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * return self._bool +*/ + case CU_POINTER_ATTRIBUTE_MAPPED: + + /* "cuda/bindings/_lib/utils.pxi":316 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * return self._bool # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * return self._ull +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 316, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":312 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS,): + * return self._token + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, # <<<<<<<<<<<<<< + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, +*/ + break; + case CU_POINTER_ATTRIBUTE_BUFFER_ID: + + /* "cuda/bindings/_lib/utils.pxi":318 + * return self._bool + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * return self._ull # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * return self._size +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(__pyx_v_self->_ull); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 318, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":317 + * cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED,): + * return self._bool + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): # <<<<<<<<<<<<<< + * return self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): +*/ + break; + case CU_POINTER_ATTRIBUTE_RANGE_SIZE: + + /* "cuda/bindings/_lib/utils.pxi":320 + * return self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * return self._size # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * return self._mempool +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 320, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":319 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID,): + * return self._ull + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): # <<<<<<<<<<<<<< + * return self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): +*/ + break; + case CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: + + /* "cuda/bindings/_lib/utils.pxi":322 + * return self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): + * return self._mempool # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_mempool); + __pyx_r = ((PyObject *)__pyx_v_self->_mempool); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":321 + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE,): + * return self._size + * elif self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE,): # <<<<<<<<<<<<<< + * return self._mempool + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":324 + * return self._mempool + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) # <<<<<<<<<<<<<< + * + * cdef class _HelperCUgraphMem_attribute: +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_From_enum__CUpointer_attribute_enum(__pyx_v_self->_attr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 324, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 324, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":295 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_6__reduce_cython__, "_HelperCUpointer_attribute.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_6__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_6__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_8__setstate_cython__, "_HelperCUpointer_attribute.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_8__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_8__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUpointer_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":327 + * + * cdef class _HelperCUgraphMem_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + PyObject *__pyx_v_is_getter = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,&__pyx_mstate_global->__pyx_n_u_is_getter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 327, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 327, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 327, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 327, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 327, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 327, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 327, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 327, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 327, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + __pyx_v_is_getter = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 327, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value, __pyx_v_is_getter); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value, PyObject *__pyx_v_is_getter) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + enum CUgraphMem_attribute_enum __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":328 + * cdef class _HelperCUgraphMem_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_getter); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_v_self->_is_getter = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":329 + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((enum CUgraphMem_attribute_enum)__Pyx_PyLong_As_enum__CUgraphMem_attribute_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_attr = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":330 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, +*/ + switch (__pyx_v_self->_attr) { + case CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT: + case CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":331 + * self._attr = attr.value + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): +*/ + case CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":332 + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * if self._is_getter: +*/ + case CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":334 + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":335 + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * if self._is_getter: + * self._cuuint64_t_val = _driver.cuuint64_t() # <<<<<<<<<<<<<< + * self._cptr = self._cuuint64_t_val.getPtr() + * else: +*/ + __pyx_t_4 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cuuint64_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); + assert(__pyx_t_4); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); + __pyx_t_7 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t))))) __PYX_ERR(1, 335, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __Pyx_DECREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __pyx_v_self->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":336 + * if self._is_getter: + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() # <<<<<<<<<<<<<< + * else: + * self._cptr = init_value.getPtr() +*/ + __pyx_t_6 = ((PyObject *)__pyx_v_self->_cuuint64_t_val); + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + + /* "cuda/bindings/_lib/utils.pxi":334 + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._cuuint64_t_val = _driver.cuuint64_t() + * self._cptr = self._cuuint64_t_val.getPtr() +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":338 + * self._cptr = self._cuuint64_t_val.getPtr() + * else: + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + /*else*/ { + __pyx_t_6 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_8 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_8 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_8)); + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":330 + * self._is_getter = is_getter + * self._attr = attr.value + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":340 + * self._cptr = init_value.getPtr() + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 340, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":327 + * + * cdef class _HelperCUgraphMem_attribute: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attr = attr.value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":342 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":345 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":347 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":345 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":349 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4pyObj, "_HelperCUgraphMem_attribute.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":350 + * + * def pyObj(self): + * assert(self._is_getter == True) # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->_is_getter == 1); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(1, 350, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 350, __pyx_L1_error) + #endif + + /* "cuda/bindings/_lib/utils.pxi":351 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, +*/ + switch (__pyx_v_self->_attr) { + case CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT: + case CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":352 + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): +*/ + case CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT: + + /* "cuda/bindings/_lib/utils.pxi":353 + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * return self._cuuint64_t_val +*/ + case CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: + + /* "cuda/bindings/_lib/utils.pxi":355 + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH,): + * return self._cuuint64_t_val # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_cuuint64_t_val); + __pyx_r = ((PyObject *)__pyx_v_self->_cuuint64_t_val); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":351 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, # <<<<<<<<<<<<<< + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + * cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":357 + * return self._cuuint64_t_val + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attr)) # <<<<<<<<<<<<<< + * + * cdef class _HelperCUjit_option: +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_From_enum__CUgraphMem_attribute_enum(__pyx_v_self->_attr); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 357, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":349 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_6__reduce_cython__, "_HelperCUgraphMem_attribute.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_6__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_6__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_8__setstate_cython__, "_HelperCUgraphMem_attribute.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_8__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_8__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUgraphMem_attribute.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":360 + * + * cdef class _HelperCUjit_option: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 360, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 360, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 360, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 360, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(1, 360, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 360, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 360, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 360, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value) { + PyObject *__pyx_v_pylist = NULL; + PyObject *__pyx_8genexpr1__pyx_v_val = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + enum CUjit_option_enum __pyx_t_2; + unsigned int __pyx_t_3; + float __pyx_t_4; + char *__pyx_t_5; + enum CUjit_target_enum __pyx_t_6; + enum CUjit_fallback_enum __pyx_t_7; + int __pyx_t_8; + enum CUjit_cacheMode_enum __pyx_t_9; + std::vector __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + size_t __pyx_t_17; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_18; + PyObject *__pyx_t_19 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":361 + * cdef class _HelperCUjit_option: + * def __cinit__(self, attr, init_value): + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 361, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((enum CUjit_option_enum)__Pyx_PyLong_As_enum__CUjit_option_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 361, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_attr = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":362 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, +*/ + switch (__pyx_v_self->_attr) { + case CU_JIT_MAX_REGISTERS: + case CU_JIT_THREADS_PER_BLOCK: + + /* "cuda/bindings/_lib/utils.pxi":363 + * self._attr = attr.value + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, +*/ + case CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: + + /* "cuda/bindings/_lib/utils.pxi":364 + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, +*/ + case CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: + + /* "cuda/bindings/_lib/utils.pxi":365 + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + * cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, +*/ + case CU_JIT_OPTIMIZATION_LEVEL: + + /* "cuda/bindings/_lib/utils.pxi":366 + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, +*/ + case CU_JIT_GLOBAL_SYMBOL_COUNT: + + /* "cuda/bindings/_lib/utils.pxi":367 + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + * cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, +*/ + case CU_JIT_TARGET_FROM_CUCONTEXT: + + /* "cuda/bindings/_lib/utils.pxi":368 + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + * cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, +*/ + case CU_JIT_REFERENCED_KERNEL_COUNT: + + /* "cuda/bindings/_lib/utils.pxi":369 + * cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM,): +*/ + case CU_JIT_REFERENCED_VARIABLE_COUNT: + + /* "cuda/bindings/_lib/utils.pxi":370 + * cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM,): + * self._uint = init_value +*/ + case CU_JIT_MIN_CTA_PER_SM: + + /* "cuda/bindings/_lib/utils.pxi":372 + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, + * cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM,): + * self._uint = init_value # <<<<<<<<<<<<<< + * self._cptr = self._uint + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): +*/ + __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_init_value); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 372, __pyx_L1_error) + __pyx_v_self->_uint = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":373 + * cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM,): + * self._uint = init_value + * self._cptr = self._uint # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): + * self._float = init_value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_uint)); + + /* "cuda/bindings/_lib/utils.pxi":362 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + * cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, +*/ + break; + case CU_JIT_WALL_TIME: + + /* "cuda/bindings/_lib/utils.pxi":375 + * self._cptr = self._uint + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): + * self._float = init_value # <<<<<<<<<<<<<< + * self._cptr = self._float + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, +*/ + __pyx_t_4 = __Pyx_PyFloat_AsFloat(__pyx_v_init_value); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 375, __pyx_L1_error) + __pyx_v_self->_float = __pyx_t_4; + + /* "cuda/bindings/_lib/utils.pxi":376 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): + * self._float = init_value + * self._cptr = self._float # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_float)); + + /* "cuda/bindings/_lib/utils.pxi":374 + * self._uint = init_value + * self._cptr = self._uint + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_WALL_TIME,): # <<<<<<<<<<<<<< + * self._float = init_value + * self._cptr = self._float +*/ + break; + case CU_JIT_INFO_LOG_BUFFER: + + /* "cuda/bindings/_lib/utils.pxi":377 + * self._float = init_value + * self._cptr = self._float + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + * self._charstar = init_value +*/ + case CU_JIT_ERROR_LOG_BUFFER: + + /* "cuda/bindings/_lib/utils.pxi":379 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + * self._charstar = init_value # <<<<<<<<<<<<<< + * self._cptr = self._charstar + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): +*/ + __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_init_value); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_v_self->_charstar = __pyx_t_5; + + /* "cuda/bindings/_lib/utils.pxi":380 + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + * self._charstar = init_value + * self._cptr = self._charstar # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): + * self._target = init_value.value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_charstar)); + + /* "cuda/bindings/_lib/utils.pxi":377 + * self._float = init_value + * self._cptr = self._float + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER): + * self._charstar = init_value +*/ + break; + case CU_JIT_TARGET: + + /* "cuda/bindings/_lib/utils.pxi":382 + * self._cptr = self._charstar + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): + * self._target = init_value.value # <<<<<<<<<<<<<< + * self._cptr = self._target + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = ((enum CUjit_target_enum)__Pyx_PyLong_As_enum__CUjit_target_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_target = __pyx_t_6; + + /* "cuda/bindings/_lib/utils.pxi":383 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): + * self._target = init_value.value + * self._cptr = self._target # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): + * self._fallback = init_value.value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_target)); + + /* "cuda/bindings/_lib/utils.pxi":381 + * self._charstar = init_value + * self._cptr = self._charstar + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_TARGET,): # <<<<<<<<<<<<<< + * self._target = init_value.value + * self._cptr = self._target +*/ + break; + case CU_JIT_FALLBACK_STRATEGY: + + /* "cuda/bindings/_lib/utils.pxi":385 + * self._cptr = self._target + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): + * self._fallback = init_value.value # <<<<<<<<<<<<<< + * self._cptr = self._fallback + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 385, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = ((enum CUjit_fallback_enum)__Pyx_PyLong_As_enum__CUjit_fallback_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_fallback = __pyx_t_7; + + /* "cuda/bindings/_lib/utils.pxi":386 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): + * self._fallback = init_value.value + * self._cptr = self._fallback # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_fallback)); + + /* "cuda/bindings/_lib/utils.pxi":384 + * self._target = init_value.value + * self._cptr = self._target + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY,): # <<<<<<<<<<<<<< + * self._fallback = init_value.value + * self._cptr = self._fallback +*/ + break; + case CU_JIT_GENERATE_DEBUG_INFO: + + /* "cuda/bindings/_lib/utils.pxi":387 + * self._fallback = init_value.value + * self._cptr = self._fallback + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, +*/ + case CU_JIT_LOG_VERBOSE: + + /* "cuda/bindings/_lib/utils.pxi":388 + * self._cptr = self._fallback + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LTO, +*/ + case CU_JIT_GENERATE_LINE_INFO: + + /* "cuda/bindings/_lib/utils.pxi":389 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_LTO, + * cydriver.CUjit_option_enum.CU_JIT_FTZ, +*/ + case CU_JIT_LTO: + + /* "cuda/bindings/_lib/utils.pxi":390 + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LTO, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_FTZ, + * cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, +*/ + case CU_JIT_FTZ: + + /* "cuda/bindings/_lib/utils.pxi":391 + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + * cydriver.CUjit_option_enum.CU_JIT_LTO, + * cydriver.CUjit_option_enum.CU_JIT_FTZ, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + * cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, +*/ + case CU_JIT_PREC_DIV: + + /* "cuda/bindings/_lib/utils.pxi":392 + * cydriver.CUjit_option_enum.CU_JIT_LTO, + * cydriver.CUjit_option_enum.CU_JIT_FTZ, + * cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, + * cydriver.CUjit_option_enum.CU_JIT_FMA, +*/ + case CU_JIT_PREC_SQRT: + + /* "cuda/bindings/_lib/utils.pxi":393 + * cydriver.CUjit_option_enum.CU_JIT_FTZ, + * cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + * cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_FMA, + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES,): +*/ + case CU_JIT_FMA: + + /* "cuda/bindings/_lib/utils.pxi":394 + * cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + * cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, + * cydriver.CUjit_option_enum.CU_JIT_FMA, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES,): + * self._int = init_value +*/ + case CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES: + + /* "cuda/bindings/_lib/utils.pxi":396 + * cydriver.CUjit_option_enum.CU_JIT_FMA, + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES,): + * self._int = init_value # <<<<<<<<<<<<<< + * self._cptr = self._int + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): +*/ + __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_v_init_value); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 396, __pyx_L1_error) + __pyx_v_self->_int = __pyx_t_8; + + /* "cuda/bindings/_lib/utils.pxi":397 + * cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES,): + * self._int = init_value + * self._cptr = self._int # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): + * self._cacheMode = init_value.value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_int)); + + /* "cuda/bindings/_lib/utils.pxi":387 + * self._fallback = init_value.value + * self._cptr = self._fallback + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + * cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, +*/ + break; + case CU_JIT_CACHE_MODE: + + /* "cuda/bindings/_lib/utils.pxi":399 + * self._cptr = self._int + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): + * self._cacheMode = init_value.value # <<<<<<<<<<<<<< + * self._cptr = self._cacheMode + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = ((enum CUjit_cacheMode_enum)__Pyx_PyLong_As_enum__CUjit_cacheMode_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 399, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cacheMode = __pyx_t_9; + + /* "cuda/bindings/_lib/utils.pxi":400 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cacheMode)); + + /* "cuda/bindings/_lib/utils.pxi":398 + * self._int = init_value + * self._cptr = self._int + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE,): # <<<<<<<<<<<<<< + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode +*/ + break; + case CU_JIT_GLOBAL_SYMBOL_NAMES: + + /* "cuda/bindings/_lib/utils.pxi":401 + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): +*/ + case CU_JIT_REFERENCED_KERNEL_NAMES: + + /* "cuda/bindings/_lib/utils.pxi":402 + * self._cptr = self._cacheMode + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): + * self._charstarstar = init_value +*/ + case CU_JIT_REFERENCED_VARIABLE_NAMES: + + /* "cuda/bindings/_lib/utils.pxi":404 + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): + * self._charstarstar = init_value # <<<<<<<<<<<<<< + * self._cptr = &self._charstarstar[0] + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): +*/ + __pyx_t_10 = __pyx_convert_vector_from_py_char___2a_(__pyx_v_init_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 404, __pyx_L1_error) + __pyx_v_self->_charstarstar = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_10); + + /* "cuda/bindings/_lib/utils.pxi":405 + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): + * self._charstarstar = init_value + * self._cptr = &self._charstarstar[0] # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): + * pylist = [_HelperInputVoidPtr(val) for val in init_value] +*/ + __pyx_v_self->_cptr = ((void *)(&(__pyx_v_self->_charstarstar[0]))); + + /* "cuda/bindings/_lib/utils.pxi":401 + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, # <<<<<<<<<<<<<< + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + * cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES,): +*/ + break; + case CU_JIT_GLOBAL_SYMBOL_ADDRESSES: + + /* "cuda/bindings/_lib/utils.pxi":407 + * self._cptr = &self._charstarstar[0] + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): + * pylist = [_HelperInputVoidPtr(val) for val in init_value] # <<<<<<<<<<<<<< + * self._voidstarstar = _InputVoidPtrPtrHelper(pylist) + * self._cptr = self._voidstarstar.cptr +*/ + { /* enter inner scope */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_v_init_value)) || PyTuple_CheckExact(__pyx_v_init_value)) { + __pyx_t_11 = __pyx_v_init_value; __Pyx_INCREF(__pyx_t_11); + __pyx_t_12 = 0; + __pyx_t_13 = NULL; + } else { + __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_v_init_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 407, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 407, __pyx_L5_error) + } + for (;;) { + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_11))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 407, __pyx_L5_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + __pyx_t_14 = __Pyx_PyList_GetItemRef(__pyx_t_11, __pyx_t_12); + ++__pyx_t_12; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 407, __pyx_L5_error) + #endif + if (__pyx_t_12 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_14 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12)); + #else + __pyx_t_14 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_12); + #endif + ++__pyx_t_12; + } + if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 407, __pyx_L5_error) + } else { + __pyx_t_14 = __pyx_t_13(__pyx_t_11); + if (unlikely(!__pyx_t_14)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(1, 407, __pyx_L5_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_14); + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_val, __pyx_t_14); + __pyx_t_14 = 0; + __pyx_t_15 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_16 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_17 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_8genexpr1__pyx_v_val}; + __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 407, __pyx_L5_error) + __Pyx_GOTREF((PyObject *)__pyx_t_14); + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_14))) __PYX_ERR(1, 407, __pyx_L5_error) + __Pyx_DECREF((PyObject *)__pyx_t_14); __pyx_t_14 = 0; + } + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0; + goto __pyx_L9_exit_scope; + __pyx_L5_error:; + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); __pyx_8genexpr1__pyx_v_val = 0; + goto __pyx_L1_error; + __pyx_L9_exit_scope:; + } /* exit inner scope */ + __pyx_v_pylist = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/_lib/utils.pxi":408 + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): + * pylist = [_HelperInputVoidPtr(val) for val in init_value] + * self._voidstarstar = _InputVoidPtrPtrHelper(pylist) # <<<<<<<<<<<<<< + * self._cptr = self._voidstarstar.cptr + * else: +*/ + __pyx_t_11 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + __pyx_t_14 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper); + __pyx_t_17 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_pylist}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 408, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __Pyx_GIVEREF((PyObject *)__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_voidstarstar); + __Pyx_DECREF((PyObject *)__pyx_v_self->_voidstarstar); + __pyx_v_self->_voidstarstar = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/_lib/utils.pxi":409 + * pylist = [_HelperInputVoidPtr(val) for val in init_value] + * self._voidstarstar = _InputVoidPtrPtrHelper(pylist) + * self._cptr = self._voidstarstar.cptr # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_voidstarstar), __pyx_mstate_global->__pyx_n_u_cptr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_18 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_18 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 409, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_18)); + + /* "cuda/bindings/_lib/utils.pxi":406 + * self._charstarstar = init_value + * self._cptr = &self._charstarstar[0] + * elif self._attr in (cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES,): # <<<<<<<<<<<<<< + * pylist = [_HelperInputVoidPtr(val) for val in init_value] + * self._voidstarstar = _InputVoidPtrPtrHelper(pylist) +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":411 + * self._cptr = self._voidstarstar.cptr + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_14 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_11 = __pyx_builtin_TypeError; + __pyx_t_15 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_15); + __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_19); + __pyx_t_17 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_19}; + __pyx_t_16 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + } + __pyx_t_17 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_16}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_17, (2-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 411, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 411, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":360 + * + * cdef class _HelperCUjit_option: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_19); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pylist); + __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_val); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":413 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":416 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":418 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCudaJitOption: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 418, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":416 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4__reduce_cython__, "_HelperCUjit_option.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_6__setstate_cython__, "_HelperCUjit_option.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUjit_option.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":421 + * + * cdef class _HelperCudaJitOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 421, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 421, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 421, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 421, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(1, 421, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 421, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 421, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 421, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + enum cudaJitOption __pyx_t_2; + unsigned int __pyx_t_3; + float __pyx_t_4; + char *__pyx_t_5; + enum cudaJit_Fallback __pyx_t_6; + int __pyx_t_7; + enum cudaJit_CacheMode __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + size_t __pyx_t_14; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":422 + * cdef class _HelperCudaJitOption: + * def __cinit__(self, attr, init_value): + * self._attr = attr.value # <<<<<<<<<<<<<< + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 422, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((enum cudaJitOption)__Pyx_PyLong_As_enum__cudaJitOption(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 422, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_attr = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":423 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, +*/ + switch (__pyx_v_self->_attr) { + case cudaJitMaxRegisters: + case cudaJitThreadsPerBlock: + + /* "cuda/bindings/_lib/utils.pxi":424 + * self._attr = attr.value + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + * cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, +*/ + case cudaJitInfoLogBufferSizeBytes: + + /* "cuda/bindings/_lib/utils.pxi":425 + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, + * cyruntime.cudaJitOption.cudaJitOptimizationLevel, +*/ + case cudaJitErrorLogBufferSizeBytes: + + /* "cuda/bindings/_lib/utils.pxi":426 + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + * cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitOptimizationLevel, + * cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): +*/ + case cudaJitOptimizationLevel: + + /* "cuda/bindings/_lib/utils.pxi":427 + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + * cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, + * cyruntime.cudaJitOption.cudaJitOptimizationLevel, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): + * self._uint = init_value +*/ + case cudaJitMinCtaPerSm: + + /* "cuda/bindings/_lib/utils.pxi":429 + * cyruntime.cudaJitOption.cudaJitOptimizationLevel, + * cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): + * self._uint = init_value # <<<<<<<<<<<<<< + * self._cptr = self._uint + * elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): +*/ + __pyx_t_3 = __Pyx_PyLong_As_unsigned_int(__pyx_v_init_value); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 429, __pyx_L1_error) + __pyx_v_self->_uint = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":430 + * cyruntime.cudaJitOption.cudaJitMinCtaPerSm,): + * self._uint = init_value + * self._cptr = self._uint # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): + * self._float = init_value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_uint)); + + /* "cuda/bindings/_lib/utils.pxi":423 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, +*/ + break; + case cudaJitWallTime: + + /* "cuda/bindings/_lib/utils.pxi":432 + * self._cptr = self._uint + * elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): + * self._float = init_value # <<<<<<<<<<<<<< + * self._cptr = self._float + * elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, +*/ + __pyx_t_4 = __Pyx_PyFloat_AsFloat(__pyx_v_init_value); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 432, __pyx_L1_error) + __pyx_v_self->_float = __pyx_t_4; + + /* "cuda/bindings/_lib/utils.pxi":433 + * elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): + * self._float = init_value + * self._cptr = self._float # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, + * cyruntime.cudaJitOption.cudaJitErrorLogBuffer): +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_float)); + + /* "cuda/bindings/_lib/utils.pxi":431 + * self._uint = init_value + * self._cptr = self._uint + * elif self._attr in (cyruntime.cudaJitOption.cudaJitWallTime,): # <<<<<<<<<<<<<< + * self._float = init_value + * self._cptr = self._float +*/ + break; + case cudaJitInfoLogBuffer: + + /* "cuda/bindings/_lib/utils.pxi":434 + * self._float = init_value + * self._cptr = self._float + * elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + * self._charstar = init_value +*/ + case cudaJitErrorLogBuffer: + + /* "cuda/bindings/_lib/utils.pxi":436 + * elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, + * cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + * self._charstar = init_value # <<<<<<<<<<<<<< + * self._cptr = self._charstar + * elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): +*/ + __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_init_value); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 436, __pyx_L1_error) + __pyx_v_self->_charstar = __pyx_t_5; + + /* "cuda/bindings/_lib/utils.pxi":437 + * cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + * self._charstar = init_value + * self._cptr = self._charstar # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): + * self._fallback = init_value.value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_charstar)); + + /* "cuda/bindings/_lib/utils.pxi":434 + * self._float = init_value + * self._cptr = self._float + * elif self._attr in (cyruntime.cudaJitOption.cudaJitInfoLogBuffer, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitErrorLogBuffer): + * self._charstar = init_value +*/ + break; + case cudaJitFallbackStrategy: + + /* "cuda/bindings/_lib/utils.pxi":439 + * self._cptr = self._charstar + * elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): + * self._fallback = init_value.value # <<<<<<<<<<<<<< + * self._cptr = self._fallback + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 439, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = ((enum cudaJit_Fallback)__Pyx_PyLong_As_enum__cudaJit_Fallback(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 439, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_fallback = __pyx_t_6; + + /* "cuda/bindings/_lib/utils.pxi":440 + * elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): + * self._fallback = init_value.value + * self._cptr = self._fallback # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + * cyruntime.cudaJitOption.cudaJitLogVerbose, +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_fallback)); + + /* "cuda/bindings/_lib/utils.pxi":438 + * self._charstar = init_value + * self._cptr = self._charstar + * elif self._attr in (cyruntime.cudaJitOption.cudaJitFallbackStrategy,): # <<<<<<<<<<<<<< + * self._fallback = init_value.value + * self._cptr = self._fallback +*/ + break; + case cudaJitGenerateDebugInfo: + + /* "cuda/bindings/_lib/utils.pxi":441 + * self._fallback = init_value.value + * self._cptr = self._fallback + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitLogVerbose, + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, +*/ + case cudaJitLogVerbose: + + /* "cuda/bindings/_lib/utils.pxi":442 + * self._cptr = self._fallback + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + * cyruntime.cudaJitOption.cudaJitLogVerbose, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + * cyruntime.cudaJitOption.cudaJitPositionIndependentCode, +*/ + case cudaJitGenerateLineInfo: + + /* "cuda/bindings/_lib/utils.pxi":443 + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + * cyruntime.cudaJitOption.cudaJitLogVerbose, + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitPositionIndependentCode, + * cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, +*/ + case cudaJitPositionIndependentCode: + + /* "cuda/bindings/_lib/utils.pxi":444 + * cyruntime.cudaJitOption.cudaJitLogVerbose, + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + * cyruntime.cudaJitOption.cudaJitPositionIndependentCode, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): +*/ + case cudaJitMaxThreadsPerBlock: + + /* "cuda/bindings/_lib/utils.pxi":445 + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + * cyruntime.cudaJitOption.cudaJitPositionIndependentCode, + * cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): + * self._int = init_value +*/ + case cudaJitOverrideDirectiveValues: + + /* "cuda/bindings/_lib/utils.pxi":447 + * cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, + * cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): + * self._int = init_value # <<<<<<<<<<<<<< + * self._cptr = self._int + * elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): +*/ + __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_init_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error) + __pyx_v_self->_int = __pyx_t_7; + + /* "cuda/bindings/_lib/utils.pxi":448 + * cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,): + * self._int = init_value + * self._cptr = self._int # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): + * self._cacheMode = init_value.value +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_int)); + + /* "cuda/bindings/_lib/utils.pxi":441 + * self._fallback = init_value.value + * self._cptr = self._fallback + * elif self._attr in (cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, # <<<<<<<<<<<<<< + * cyruntime.cudaJitOption.cudaJitLogVerbose, + * cyruntime.cudaJitOption.cudaJitGenerateLineInfo, +*/ + break; + case cudaJitCacheMode: + + /* "cuda/bindings/_lib/utils.pxi":450 + * self._cptr = self._int + * elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): + * self._cacheMode = init_value.value # <<<<<<<<<<<<<< + * self._cptr = self._cacheMode + * else: +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_init_value, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = ((enum cudaJit_CacheMode)__Pyx_PyLong_As_enum__cudaJit_CacheMode(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cacheMode = __pyx_t_8; + + /* "cuda/bindings/_lib/utils.pxi":451 + * elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cacheMode)); + + /* "cuda/bindings/_lib/utils.pxi":449 + * self._int = init_value + * self._cptr = self._int + * elif self._attr in (cyruntime.cudaJitOption.cudaJitCacheMode,): # <<<<<<<<<<<<<< + * self._cacheMode = init_value.value + * self._cptr = self._cacheMode +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":453 + * self._cptr = self._cacheMode + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_9 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_10 = __pyx_builtin_TypeError; + __pyx_t_12 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_12); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_14 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_13}; + __pyx_t_11 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + } + __pyx_t_14 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_11}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 453, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":421 + * + * cdef class _HelperCudaJitOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if self._attr in (cyruntime.cudaJitOption.cudaJitMaxRegisters, +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":455 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":458 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":460 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCUlibraryOption: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":458 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4__reduce_cython__, "_HelperCudaJitOption.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_6__setstate_cython__, "_HelperCudaJitOption.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaJitOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":463 + * + * cdef class _HelperCUlibraryOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if False: +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 463, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 463, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 463, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 463, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(1, 463, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 463, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 463, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 463, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + enum CUlibraryOption_enum __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_5; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":464 + * cdef class _HelperCUlibraryOption: + * def __cinit__(self, attr, init_value): + * self._attr = attr.value # <<<<<<<<<<<<<< + * if False: + * pass +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 464, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((enum CUlibraryOption_enum)__Pyx_PyLong_As_enum__CUlibraryOption_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 464, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_attr = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":465 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if False: # <<<<<<<<<<<<<< + * pass + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): +*/ + switch (__pyx_v_self->_attr) { + case CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE: + + /* "cuda/bindings/_lib/utils.pxi":468 + * pass + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): + * self._uint = init_value +*/ + __pyx_t_3 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_5 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 468, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_5)); + + /* "cuda/bindings/_lib/utils.pxi":467 + * if False: + * pass + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): # <<<<<<<<<<<<<< + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): +*/ + break; + case CU_LIBRARY_BINARY_IS_PRESERVED: + + /* "cuda/bindings/_lib/utils.pxi":470 + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): + * self._uint = init_value # <<<<<<<<<<<<<< + * self._cptr = self._uint + * else: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_init_value); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 470, __pyx_L1_error) + __pyx_v_self->_uint = __pyx_t_6; + + /* "cuda/bindings/_lib/utils.pxi":471 + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): + * self._uint = init_value + * self._cptr = self._uint # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_uint)); + + /* "cuda/bindings/_lib/utils.pxi":469 + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE,): + * self._cptr = init_value.getPtr() + * elif self._attr in (cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED,): # <<<<<<<<<<<<<< + * self._uint = init_value + * self._cptr = self._uint +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":473 + * self._cptr = self._uint + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_7 = __pyx_builtin_TypeError; + __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 473, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":463 + * + * cdef class _HelperCUlibraryOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if False: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":475 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":478 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":480 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCudaLibraryOption: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":478 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4__reduce_cython__, "_HelperCUlibraryOption.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_6__setstate_cython__, "_HelperCUlibraryOption.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUlibraryOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":483 + * + * cdef class _HelperCudaLibraryOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if False: +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 483, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 483, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 483, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 483, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(1, 483, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 483, __pyx_L3_error) + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 483, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 483, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + enum cudaLibraryOption __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_5; + unsigned int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":484 + * cdef class _HelperCudaLibraryOption: + * def __cinit__(self, attr, init_value): + * self._attr = attr.value # <<<<<<<<<<<<<< + * if False: + * pass +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((enum cudaLibraryOption)__Pyx_PyLong_As_enum__cudaLibraryOption(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_attr = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":485 + * def __cinit__(self, attr, init_value): + * self._attr = attr.value + * if False: # <<<<<<<<<<<<<< + * pass + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): +*/ + switch (__pyx_v_self->_attr) { + case cudaLibraryHostUniversalFunctionAndDataTable: + + /* "cuda/bindings/_lib/utils.pxi":488 + * pass + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): + * self._cptr = init_value.getPtr() # <<<<<<<<<<<<<< + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + * self._uint = init_value +*/ + __pyx_t_3 = __pyx_v_init_value; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_5 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_5)); + + /* "cuda/bindings/_lib/utils.pxi":487 + * if False: + * pass + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): # <<<<<<<<<<<<<< + * self._cptr = init_value.getPtr() + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): +*/ + break; + case cudaLibraryBinaryIsPreserved: + + /* "cuda/bindings/_lib/utils.pxi":490 + * self._cptr = init_value.getPtr() + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + * self._uint = init_value # <<<<<<<<<<<<<< + * self._cptr = self._uint + * else: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_int(__pyx_v_init_value); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(1, 490, __pyx_L1_error) + __pyx_v_self->_uint = __pyx_t_6; + + /* "cuda/bindings/_lib/utils.pxi":491 + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + * self._uint = init_value + * self._cptr = self._uint # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_uint)); + + /* "cuda/bindings/_lib/utils.pxi":489 + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): + * self._cptr = init_value.getPtr() + * elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): # <<<<<<<<<<<<<< + * self._uint = init_value + * self._cptr = self._uint +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":493 + * self._cptr = self._uint + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_7 = __pyx_builtin_TypeError; + __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10}; + __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 493, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":483 + * + * cdef class _HelperCudaLibraryOption: + * def __cinit__(self, attr, init_value): # <<<<<<<<<<<<<< + * self._attr = attr.value + * if False: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":495 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":498 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":500 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCUmemAllocationHandleType: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":498 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4__reduce_cython__, "_HelperCudaLibraryOption.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_6__setstate_cython__, "_HelperCudaLibraryOption.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCudaLibraryOption.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":503 + * + * cdef class _HelperCUmemAllocationHandleType: + * def __cinit__(self, attr): # <<<<<<<<<<<<<< + * self._type = attr.value + * if False: +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 503, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 503, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 503, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(1, 503, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 503, __pyx_L3_error) + } + __pyx_v_attr = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 503, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self), __pyx_v_attr); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self, PyObject *__pyx_v_attr) { + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + enum CUmemAllocationHandleType_enum __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":504 + * cdef class _HelperCUmemAllocationHandleType: + * def __cinit__(self, attr): + * self._type = attr.value # <<<<<<<<<<<<<< + * if False: + * pass +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((enum CUmemAllocationHandleType_enum)__Pyx_PyLong_As_enum__CUmemAllocationHandleType_enum(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 504, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_type = __pyx_t_2; + + /* "cuda/bindings/_lib/utils.pxi":505 + * def __cinit__(self, attr): + * self._type = attr.value + * if False: # <<<<<<<<<<<<<< + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): +*/ + switch (__pyx_v_self->_type) { + case CU_MEM_HANDLE_TYPE_NONE: + + /* "cuda/bindings/_lib/utils.pxi":508 + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + * self._cptr = &self._int # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * self._cptr = &self._int +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_int)); + + /* "cuda/bindings/_lib/utils.pxi":507 + * if False: + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): # <<<<<<<<<<<<<< + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): +*/ + break; + case CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR: + + /* "cuda/bindings/_lib/utils.pxi":510 + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * self._cptr = &self._int # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * self._cptr = &self._handle +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_int)); + + /* "cuda/bindings/_lib/utils.pxi":509 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): # <<<<<<<<<<<<<< + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): +*/ + break; + case CU_MEM_HANDLE_TYPE_WIN32: + + /* "cuda/bindings/_lib/utils.pxi":512 + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * self._cptr = &self._handle # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * self._cptr = &self._d3dkmt_handle +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_handle)); + + /* "cuda/bindings/_lib/utils.pxi":511 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * self._cptr = &self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): # <<<<<<<<<<<<<< + * self._cptr = &self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): +*/ + break; + case CU_MEM_HANDLE_TYPE_WIN32_KMT: + + /* "cuda/bindings/_lib/utils.pxi":514 + * self._cptr = &self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * self._cptr = &self._d3dkmt_handle # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + * self._mem_fabric_handle = _driver.CUmemFabricHandle() +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_d3dkmt_handle)); + + /* "cuda/bindings/_lib/utils.pxi":513 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * self._cptr = &self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): # <<<<<<<<<<<<<< + * self._cptr = &self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): +*/ + break; + case CU_MEM_HANDLE_TYPE_FABRIC: + + /* "cuda/bindings/_lib/utils.pxi":516 + * self._cptr = &self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + * self._mem_fabric_handle = _driver.CUmemFabricHandle() # <<<<<<<<<<<<<< + * self._cptr = self._mem_fabric_handle.getPtr() + * else: +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CUmemFabricHandle); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle))))) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF((PyObject *)__pyx_v_self->_mem_fabric_handle); + __Pyx_DECREF((PyObject *)__pyx_v_self->_mem_fabric_handle); + __pyx_v_self->_mem_fabric_handle = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/_lib/utils.pxi":517 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + * self._mem_fabric_handle = _driver.CUmemFabricHandle() + * self._cptr = self._mem_fabric_handle.getPtr() # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_t_5 = ((PyObject *)__pyx_v_self->_mem_fabric_handle); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_7 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_1); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 517, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_7)); + + /* "cuda/bindings/_lib/utils.pxi":515 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * self._cptr = &self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): # <<<<<<<<<<<<<< + * self._mem_fabric_handle = _driver.CUmemFabricHandle() + * self._cptr = self._mem_fabric_handle.getPtr() +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":519 + * self._cptr = self._mem_fabric_handle.getPtr() + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_5 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_3 = __pyx_builtin_TypeError; + __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 519, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":503 + * + * cdef class _HelperCUmemAllocationHandleType: + * def __cinit__(self, attr): # <<<<<<<<<<<<<< + * self._type = attr.value + * if False: +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":521 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":524 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":526 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":524 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":528 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if False: + * pass +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4pyObj, "_HelperCUmemAllocationHandleType.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":529 + * + * def pyObj(self): + * if False: # <<<<<<<<<<<<<< + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): +*/ + switch (__pyx_v_self->_type) { + case CU_MEM_HANDLE_TYPE_NONE: + + /* "cuda/bindings/_lib/utils.pxi":532 + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + * return self._int # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * return self._int +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":531 + * if False: + * pass + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): # <<<<<<<<<<<<<< + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): +*/ + break; + case CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR: + + /* "cuda/bindings/_lib/utils.pxi":534 + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * return self._int # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * return self._handle +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_self->_int); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":533 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE,): + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): # <<<<<<<<<<<<<< + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): +*/ + break; + case CU_MEM_HANDLE_TYPE_WIN32: + + /* "cuda/bindings/_lib/utils.pxi":536 + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * return self._handle # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * return self._d3dkmt_handle +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 536, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":535 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR,): + * return self._int + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): # <<<<<<<<<<<<<< + * return self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): +*/ + break; + case CU_MEM_HANDLE_TYPE_WIN32_KMT: + + /* "cuda/bindings/_lib/utils.pxi":538 + * return self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * return self._d3dkmt_handle # <<<<<<<<<<<<<< + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + * return self._mem_fabric_handle +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(__pyx_v_self->_d3dkmt_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 538, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":537 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32,): + * return self._handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): # <<<<<<<<<<<<<< + * return self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): +*/ + break; + case CU_MEM_HANDLE_TYPE_FABRIC: + + /* "cuda/bindings/_lib/utils.pxi":540 + * return self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): + * return self._mem_fabric_handle # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(self._type)) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF((PyObject *)__pyx_v_self->_mem_fabric_handle); + __pyx_r = ((PyObject *)__pyx_v_self->_mem_fabric_handle); + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":539 + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT,): + * return self._d3dkmt_handle + * elif self._type in (cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC,): # <<<<<<<<<<<<<< + * return self._mem_fabric_handle + * else: +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":542 + * return self._mem_fabric_handle + * else: + * raise TypeError('Unsupported attribute: {}'.format(self._type)) # <<<<<<<<<<<<<< + * + * cdef class _InputVoidPtrPtrHelper: +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_3 = __pyx_builtin_TypeError; + __pyx_t_5 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_enum__CUmemAllocationHandleType_enum(__pyx_v_self->_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 542, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(1, 542, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":528 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if False: + * pass +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_6__reduce_cython__, "_HelperCUmemAllocationHandleType.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_6__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_6__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_8__setstate_cython__, "_HelperCUmemAllocationHandleType.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_8__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_8__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUmemAllocationHandleType.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":545 + * + * cdef class _InputVoidPtrPtrHelper: + * def __cinit__(self, lst): # <<<<<<<<<<<<<< + * self._cptr = _callocWrapper(len(lst), sizeof(void*)) + * for idx in range(len(lst)): +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lst = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_lst,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 545, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 545, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 545, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, i); __PYX_ERR(1, 545, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 545, __pyx_L3_error) + } + __pyx_v_lst = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 545, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_v_self), __pyx_v_lst); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *__pyx_v_self, PyObject *__pyx_v_lst) { + Py_ssize_t __pyx_v_idx; + int __pyx_r; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + void *__pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":546 + * cdef class _InputVoidPtrPtrHelper: + * def __cinit__(self, lst): + * self._cptr = _callocWrapper(len(lst), sizeof(void*)) # <<<<<<<<<<<<<< + * for idx in range(len(lst)): + * self._cptr[idx] = lst[idx].cptr +*/ + __pyx_t_1 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 546, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_FromSize_t((sizeof(void *))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(__pyx_t_2, __pyx_t_3); if (unlikely(__pyx_t_4 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(1, 546, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_self->_cptr = ((void **)__pyx_t_4); + + /* "cuda/bindings/_lib/utils.pxi":547 + * def __cinit__(self, lst): + * self._cptr = _callocWrapper(len(lst), sizeof(void*)) + * for idx in range(len(lst)): # <<<<<<<<<<<<<< + * self._cptr[idx] = lst[idx].cptr + * +*/ + __pyx_t_1 = PyObject_Length(__pyx_v_lst); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 547, __pyx_L1_error) + __pyx_t_5 = __pyx_t_1; + for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { + __pyx_v_idx = __pyx_t_6; + + /* "cuda/bindings/_lib/utils.pxi":548 + * self._cptr = _callocWrapper(len(lst), sizeof(void*)) + * for idx in range(len(lst)): + * self._cptr[idx] = lst[idx].cptr # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_lst, __pyx_v_idx, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_2); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(1, 548, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_self->_cptr[__pyx_v_idx]) = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_7)); + } + + /* "cuda/bindings/_lib/utils.pxi":545 + * + * cdef class _InputVoidPtrPtrHelper: + * def __cinit__(self, lst): # <<<<<<<<<<<<<< + * self._cptr = _callocWrapper(len(lst), sizeof(void*)) + * for idx in range(len(lst)): +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":550 + * self._cptr[idx] = lst[idx].cptr + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * free(self._cptr) + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_2__dealloc__(struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *__pyx_v_self) { + + /* "cuda/bindings/_lib/utils.pxi":551 + * + * def __dealloc__(self): + * free(self._cptr) # <<<<<<<<<<<<<< + * + * @property +*/ + free(__pyx_v_self->_cptr); + + /* "cuda/bindings/_lib/utils.pxi":550 + * self._cptr[idx] = lst[idx].cptr + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * free(self._cptr) + * +*/ + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":553 + * free(self._cptr) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":555 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * cdef class _HelperCUcoredumpSettings: +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":553 + * free(self._cptr) + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4__reduce_cython__, "_InputVoidPtrPtrHelper.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_6__setstate_cython__, "_InputVoidPtrPtrHelper.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_6__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_6__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._InputVoidPtrPtrHelper.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":558 + * + * cdef class _HelperCUcoredumpSettings: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attrib = attr.value +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_attr = 0; + PyObject *__pyx_v_init_value = 0; + PyObject *__pyx_v_is_getter = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_attr,&__pyx_mstate_global->__pyx_n_u_init_value,&__pyx_mstate_global->__pyx_n_u_is_getter,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 558, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 558, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 558, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 558, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(1, 558, __pyx_L3_error) + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, i); __PYX_ERR(1, 558, __pyx_L3_error) } + } + } else { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 558, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 558, __pyx_L3_error) + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 558, __pyx_L3_error) + break; + default: goto __pyx_L5_argtuple_error; + } + if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False)); + } + __pyx_v_attr = values[0]; + __pyx_v_init_value = values[1]; + __pyx_v_is_getter = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 558, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self), __pyx_v_attr, __pyx_v_init_value, __pyx_v_is_getter); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self, PyObject *__pyx_v_attr, PyObject *__pyx_v_init_value, PyObject *__pyx_v_is_getter) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + enum CUcoredumpSettings_enum __pyx_t_3; + void *__pyx_t_4; + char *__pyx_t_5; + Py_ssize_t __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + size_t __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "cuda/bindings/_lib/utils.pxi":559 + * cdef class _HelperCUcoredumpSettings: + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter # <<<<<<<<<<<<<< + * self._attrib = attr.value + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_is_getter); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 559, __pyx_L1_error) + __pyx_v_self->_is_getter = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":560 + * def __cinit__(self, attr, init_value, is_getter=False): + * self._is_getter = is_getter + * self._attrib = attr.value # <<<<<<<<<<<<<< + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): +*/ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = ((enum CUcoredumpSettings_enum)__Pyx_PyLong_As_enum__CUcoredumpSettings_enum(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 560, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_self->_attrib = __pyx_t_3; + + /* "cuda/bindings/_lib/utils.pxi":561 + * self._is_getter = is_getter + * self._attrib = attr.value + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * if self._is_getter: +*/ + switch (__pyx_v_self->_attrib) { + case CU_COREDUMP_FILE: + case CU_COREDUMP_PIPE: + + /* "cuda/bindings/_lib/utils.pxi":563 + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._charstar = _callocWrapper(1024, 1) + * self._cptr = self._charstar +*/ + if (__pyx_v_self->_is_getter) { + + /* "cuda/bindings/_lib/utils.pxi":564 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * if self._is_getter: + * self._charstar = _callocWrapper(1024, 1) # <<<<<<<<<<<<<< + * self._cptr = self._charstar + * self._size = 1024 +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_5nvrtc__callocWrapper(__pyx_mstate_global->__pyx_int_1024, __pyx_mstate_global->__pyx_int_1); if (unlikely(__pyx_t_4 == ((void *)0) && PyErr_Occurred())) __PYX_ERR(1, 564, __pyx_L1_error) + __pyx_v_self->_charstar = ((char *)__pyx_t_4); + + /* "cuda/bindings/_lib/utils.pxi":565 + * if self._is_getter: + * self._charstar = _callocWrapper(1024, 1) + * self._cptr = self._charstar # <<<<<<<<<<<<<< + * self._size = 1024 + * else: +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_charstar)); + + /* "cuda/bindings/_lib/utils.pxi":566 + * self._charstar = _callocWrapper(1024, 1) + * self._cptr = self._charstar + * self._size = 1024 # <<<<<<<<<<<<<< + * else: + * self._charstar = init_value +*/ + __pyx_v_self->_size = 0x400; + + /* "cuda/bindings/_lib/utils.pxi":563 + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * if self._is_getter: # <<<<<<<<<<<<<< + * self._charstar = _callocWrapper(1024, 1) + * self._cptr = self._charstar +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/_lib/utils.pxi":568 + * self._size = 1024 + * else: + * self._charstar = init_value # <<<<<<<<<<<<<< + * self._cptr = self._charstar + * self._size = len(init_value) +*/ + /*else*/ { + __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_init_value); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 568, __pyx_L1_error) + __pyx_v_self->_charstar = __pyx_t_5; + + /* "cuda/bindings/_lib/utils.pxi":569 + * else: + * self._charstar = init_value + * self._cptr = self._charstar # <<<<<<<<<<<<<< + * self._size = len(init_value) + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, +*/ + __pyx_v_self->_cptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_charstar)); + + /* "cuda/bindings/_lib/utils.pxi":570 + * self._charstar = init_value + * self._cptr = self._charstar + * self._size = len(init_value) # <<<<<<<<<<<<<< + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, +*/ + __pyx_t_6 = PyObject_Length(__pyx_v_init_value); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(1, 570, __pyx_L1_error) + __pyx_v_self->_size = __pyx_t_6; + } + __pyx_L3:; + + /* "cuda/bindings/_lib/utils.pxi":561 + * self._is_getter = is_getter + * self._attrib = attr.value + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * if self._is_getter: +*/ + break; + case CU_COREDUMP_ENABLE_ON_EXCEPTION: + + /* "cuda/bindings/_lib/utils.pxi":571 + * self._cptr = self._charstar + * self._size = len(init_value) + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, +*/ + case CU_COREDUMP_TRIGGER_HOST: + + /* "cuda/bindings/_lib/utils.pxi":572 + * self._size = len(init_value) + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): +*/ + case CU_COREDUMP_LIGHTWEIGHT: + + /* "cuda/bindings/_lib/utils.pxi":573 + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * if self._is_getter == False: +*/ + case CU_COREDUMP_ENABLE_USER_TRIGGER: + + /* "cuda/bindings/_lib/utils.pxi":575 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * if self._is_getter == False: # <<<<<<<<<<<<<< + * self._bool = init_value + * +*/ + __pyx_t_1 = (__pyx_v_self->_is_getter == 0); + if (__pyx_t_1) { + + /* "cuda/bindings/_lib/utils.pxi":576 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * if self._is_getter == False: + * self._bool = init_value # <<<<<<<<<<<<<< + * + * self._cptr = &self._bool +*/ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_init_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 576, __pyx_L1_error) + __pyx_v_self->_bool = __pyx_t_1; + + /* "cuda/bindings/_lib/utils.pxi":575 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * if self._is_getter == False: # <<<<<<<<<<<<<< + * self._bool = init_value + * +*/ + } + + /* "cuda/bindings/_lib/utils.pxi":578 + * self._bool = init_value + * + * self._cptr = &self._bool # <<<<<<<<<<<<<< + * self._size = 1 + * else: +*/ + __pyx_v_self->_cptr = ((void *)(&__pyx_v_self->_bool)); + + /* "cuda/bindings/_lib/utils.pxi":579 + * + * self._cptr = &self._bool + * self._size = 1 # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) +*/ + __pyx_v_self->_size = 1; + + /* "cuda/bindings/_lib/utils.pxi":571 + * self._cptr = self._charstar + * self._size = len(init_value) + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":581 + * self._size = 1 + * else: + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) # <<<<<<<<<<<<<< + * + * def __dealloc__(self): +*/ + __pyx_t_7 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_8 = __pyx_builtin_TypeError; + __pyx_t_10 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute; + __Pyx_INCREF(__pyx_t_10); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_attr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_12 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; + __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + } + __pyx_t_12 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 581, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":558 + * + * cdef class _HelperCUcoredumpSettings: + * def __cinit__(self, attr, init_value, is_getter=False): # <<<<<<<<<<<<<< + * self._is_getter = is_getter + * self._attrib = attr.value +*/ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":583 + * raise TypeError('Unsupported attribute: {}'.format(attr.name)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * pass + * +*/ + +/* Python wrapper */ +static void __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_3__dealloc__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_2__dealloc__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self) { + + /* function exit code */ +} + +/* "cuda/bindings/_lib/utils.pxi":586 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4cptr_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4cptr_1__get__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4cptr___get__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4cptr___get__(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + + /* "cuda/bindings/_lib/utils.pxi":588 + * @property + * def cptr(self): + * return self._cptr # <<<<<<<<<<<<<< + * + * def size(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_cptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":586 + * pass + * + * @property # <<<<<<<<<<<<<< + * def cptr(self): + * return self._cptr +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.cptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":590 + * return self._cptr + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4size, "_HelperCUcoredumpSettings.size(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size = {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4size}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("size", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("size", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4size(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4size(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("size", 0); + + /* "cuda/bindings/_lib/utils.pxi":591 + * + * def size(self): + * return self._size # <<<<<<<<<<<<<< + * + * def pyObj(self): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_FromSize_t(__pyx_v_self->_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":590 + * return self._cptr + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/_lib/utils.pxi":593 + * return self._size + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_6pyObj, "_HelperCUcoredumpSettings.pyObj(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj = {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_6pyObj}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("pyObj (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("pyObj", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("pyObj", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_6pyObj(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_6pyObj(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("pyObj", 0); + + /* "cuda/bindings/_lib/utils.pxi":594 + * + * def pyObj(self): + * assert(self._is_getter == True) # <<<<<<<<<<<<<< + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): +*/ + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(__pyx_assertions_enabled())) { + __pyx_t_1 = (__pyx_v_self->_is_getter == 1); + if (unlikely(!__pyx_t_1)) { + __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0); + __PYX_ERR(1, 594, __pyx_L1_error) + } + } + #else + if ((1)); else __PYX_ERR(1, 594, __pyx_L1_error) + #endif + + /* "cuda/bindings/_lib/utils.pxi":595 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * return self._charstar +*/ + switch (__pyx_v_self->_attrib) { + case CU_COREDUMP_FILE: + case CU_COREDUMP_PIPE: + + /* "cuda/bindings/_lib/utils.pxi":597 + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * return self._charstar # <<<<<<<<<<<<<< + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_self->_charstar); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":595 + * def pyObj(self): + * assert(self._is_getter == True) + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * return self._charstar +*/ + break; + case CU_COREDUMP_ENABLE_ON_EXCEPTION: + + /* "cuda/bindings/_lib/utils.pxi":598 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * return self._charstar + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, +*/ + case CU_COREDUMP_TRIGGER_HOST: + + /* "cuda/bindings/_lib/utils.pxi":599 + * return self._charstar + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): +*/ + case CU_COREDUMP_LIGHTWEIGHT: + + /* "cuda/bindings/_lib/utils.pxi":600 + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * return self._bool +*/ + case CU_COREDUMP_ENABLE_USER_TRIGGER: + + /* "cuda/bindings/_lib/utils.pxi":602 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_USER_TRIGGER,): + * return self._bool # <<<<<<<<<<<<<< + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attrib)) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/_lib/utils.pxi":598 + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_PIPE,): + * return self._charstar + * elif self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_ENABLE_ON_EXCEPTION, # <<<<<<<<<<<<<< + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_TRIGGER_HOST, + * cydriver.CUcoredumpSettings_enum.CU_COREDUMP_LIGHTWEIGHT, +*/ + break; + default: + + /* "cuda/bindings/_lib/utils.pxi":604 + * return self._bool + * else: + * raise TypeError('Unsupported attribute value: {}'.format(self._attrib)) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Unsupported_attribute_value; + __Pyx_INCREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyLong_From_enum__CUcoredumpSettings_enum(__pyx_v_self->_attrib); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; + __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(1, 604, __pyx_L1_error) + break; + } + + /* "cuda/bindings/_lib/utils.pxi":593 + * return self._size + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.pyObj", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_8__reduce_cython__, "_HelperCUcoredumpSettings.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_8__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_8__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_10__setstate_cython__, "_HelperCUcoredumpSettings.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_10__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_10__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc._HelperCUcoredumpSettings.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":83 + * + * """ + * def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): # <<<<<<<<<<<<<< + * if _ptr == 0: + * self._pvt_ptr = &self._pvt_val +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_v_init_value; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_v__ptr; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_init_value,&__pyx_mstate_global->__pyx_n_u_ptr_2,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 83, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 83, __pyx_L3_error) + } else { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 83, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_init_value = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(values[0]); if (unlikely((__pyx_v_init_value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L3_error) + } else { + __pyx_v_init_value = ((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)0); + } + if (values[1]) { + __pyx_v__ptr = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(values[1]); if (unlikely((__pyx_v__ptr == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L3_error) + } else { + __pyx_v__ptr = ((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)0); + } + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 83, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram___cinit__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self), __pyx_v_init_value, __pyx_v__ptr); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram___cinit__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self, __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_v_init_value, __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_v__ptr) { + int __pyx_r; + int __pyx_t_1; + + /* "cuda/bindings/nvrtc.pyx":84 + * """ + * def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + * if _ptr == 0: # <<<<<<<<<<<<<< + * self._pvt_ptr = &self._pvt_val + * self._pvt_ptr[0] = init_value +*/ + __pyx_t_1 = (__pyx_v__ptr == 0); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":85 + * def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + * if _ptr == 0: + * self._pvt_ptr = &self._pvt_val # <<<<<<<<<<<<<< + * self._pvt_ptr[0] = init_value + * else: +*/ + __pyx_v_self->_pvt_ptr = (&__pyx_v_self->_pvt_val); + + /* "cuda/bindings/nvrtc.pyx":86 + * if _ptr == 0: + * self._pvt_ptr = &self._pvt_val + * self._pvt_ptr[0] = init_value # <<<<<<<<<<<<<< + * else: + * self._pvt_ptr = _ptr +*/ + (__pyx_v_self->_pvt_ptr[0]) = ((nvrtcProgram)__pyx_v_init_value); + + /* "cuda/bindings/nvrtc.pyx":84 + * """ + * def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + * if _ptr == 0: # <<<<<<<<<<<<<< + * self._pvt_ptr = &self._pvt_val + * self._pvt_ptr[0] = init_value +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":88 + * self._pvt_ptr[0] = init_value + * else: + * self._pvt_ptr = _ptr # <<<<<<<<<<<<<< + * def __init__(self, *args, **kwargs): + * pass +*/ + /*else*/ { + __pyx_v_self->_pvt_ptr = ((nvrtcProgram *)__pyx_v__ptr); + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":83 + * + * """ + * def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): # <<<<<<<<<<<<<< + * if _ptr == 0: + * self._pvt_ptr = &self._pvt_val +*/ + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":89 + * else: + * self._pvt_ptr = _ptr + * def __init__(self, *args, **kwargs): # <<<<<<<<<<<<<< + * pass + * def __repr__(self): +*/ + +/* Python wrapper */ +static int __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + CYTHON_UNUSED PyObject *__pyx_v_args = 0; + CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; + #endif + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return -1; + if (__pyx_kwds_len > 0) { + if (unlikely(__Pyx_CheckKeywordStrings("__init__", __pyx_kwds) == -1)) return -1; + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_2__init__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); + + /* function exit code */ + __Pyx_DECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_2__init__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { + int __pyx_r; + + /* function exit code */ + __pyx_r = 0; + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":91 + * def __init__(self, *args, **kwargs): + * pass + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' + * def __index__(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_5__repr__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_4__repr__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_4__repr__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + + /* "cuda/bindings/nvrtc.pyx":92 + * pass + * def __repr__(self): + * return '' # <<<<<<<<<<<<<< + * def __index__(self): + * return self.__int__() +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = NULL; + __Pyx_INCREF(__pyx_builtin_hex); + __pyx_t_3 = __pyx_builtin_hex; + __pyx_t_5 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_5); + __pyx_t_6 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; + __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_int, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + } + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_nvrtcProgram, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":91 + * def __init__(self, *args, **kwargs): + * pass + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' + * def __index__(self): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":93 + * def __repr__(self): + * return '' + * def __index__(self): # <<<<<<<<<<<<<< + * return self.__int__() + * def __eq__(self, other): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_7__index__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_7__index__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__index__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_6__index__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_6__index__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + size_t __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__index__", 0); + + /* "cuda/bindings/nvrtc.pyx":94 + * return '' + * def __index__(self): + * return self.__int__() # <<<<<<<<<<<<<< + * def __eq__(self, other): + * if not isinstance(other, nvrtcProgram): +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = ((PyObject *)__pyx_v_self); + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_int, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":93 + * def __repr__(self): + * return '' + * def __index__(self): # <<<<<<<<<<<<<< + * return self.__int__() + * def __eq__(self, other): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":95 + * def __index__(self): + * return self.__int__() + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, nvrtcProgram): + * return False +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_8__eq__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_8__eq__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + + /* "cuda/bindings/nvrtc.pyx":96 + * return self.__int__() + * def __eq__(self, other): + * if not isinstance(other, nvrtcProgram): # <<<<<<<<<<<<<< + * return False + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_2 = (!__pyx_t_1); + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":97 + * def __eq__(self, other): + * if not isinstance(other, nvrtcProgram): + * return False # <<<<<<<<<<<<<< + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] + * def __hash__(self): +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":96 + * return self.__int__() + * def __eq__(self, other): + * if not isinstance(other, nvrtcProgram): # <<<<<<<<<<<<<< + * return False + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] +*/ + } + + /* "cuda/bindings/nvrtc.pyx":98 + * if not isinstance(other, nvrtcProgram): + * return False + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] # <<<<<<<<<<<<<< + * def __hash__(self): + * return hash((self._pvt_ptr[0])) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBool_FromLong(((__pyx_v_self->_pvt_ptr[0]) == (((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_other)->_pvt_ptr[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":95 + * def __index__(self): + * return self.__int__() + * def __eq__(self, other): # <<<<<<<<<<<<<< + * if not isinstance(other, nvrtcProgram): + * return False +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":99 + * return False + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self._pvt_ptr[0])) + * def __int__(self): +*/ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_11__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_11__hash__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_10__hash__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_10__hash__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__hash__", 0); + + /* "cuda/bindings/nvrtc.pyx":100 + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] + * def __hash__(self): + * return hash((self._pvt_ptr[0])) # <<<<<<<<<<<<<< + * def __int__(self): + * return self._pvt_ptr[0] +*/ + __pyx_t_1 = __Pyx_PyLong_FromSize_t(((uintptr_t)((void *)(__pyx_v_self->_pvt_ptr[0])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":99 + * return False + * return self._pvt_ptr[0] == (other)._pvt_ptr[0] + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash((self._pvt_ptr[0])) + * def __int__(self): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":101 + * def __hash__(self): + * return hash((self._pvt_ptr[0])) + * def __int__(self): # <<<<<<<<<<<<<< + * return self._pvt_ptr[0] + * def getPtr(self): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_13__int__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_13__int__(PyObject *__pyx_v_self) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_12__int__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_12__int__(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__int__", 0); + + /* "cuda/bindings/nvrtc.pyx":102 + * return hash((self._pvt_ptr[0])) + * def __int__(self): + * return self._pvt_ptr[0] # <<<<<<<<<<<<<< + * def getPtr(self): + * return self._pvt_ptr +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)(__pyx_v_self->_pvt_ptr[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":101 + * def __hash__(self): + * return hash((self._pvt_ptr[0])) + * def __int__(self): # <<<<<<<<<<<<<< + * return self._pvt_ptr[0] + * def getPtr(self): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":103 + * def __int__(self): + * return self._pvt_ptr[0] + * def getPtr(self): # <<<<<<<<<<<<<< + * return self._pvt_ptr + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_14getPtr, "nvrtcProgram.getPtr(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr = {"getPtr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_14getPtr}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("getPtr (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("getPtr", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("getPtr", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_14getPtr(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_14getPtr(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("getPtr", 0); + + /* "cuda/bindings/nvrtc.pyx":104 + * return self._pvt_ptr[0] + * def getPtr(self): + * return self._pvt_ptr # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_From_unsigned_PY_LONG_LONG(((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_v_self->_pvt_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":103 + * def __int__(self): + * return self._pvt_ptr[0] + * def getPtr(self): # <<<<<<<<<<<<<< + * return self._pvt_ptr + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.getPtr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_16__reduce_cython__, "nvrtcProgram.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_16__reduce_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; } + const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len < 0)) return NULL; + if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_16__reduce_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_18__setstate_cython__, "nvrtcProgram.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_18__setstate_cython__}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__(PyObject *__pyx_v_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 3, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(2, 3, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(2, 3, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 3, __pyx_L3_error) + } + __pyx_v___pyx_state = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 3, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_18__setstate_cython__(((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_v_self), __pyx_v___pyx_state); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcProgram_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< +*/ + __Pyx_Raise(__pyx_builtin_TypeError, __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); + __PYX_ERR(2, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcProgram.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":106 + * return self._pvt_ptr + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetErrorString(result not None : nvrtcResult): + * """ nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `"NVRTC_SUCCESS"`. For unrecognized enumeration values, it returns `"NVRTC_ERROR unknown"`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_1nvrtcGetErrorString(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_nvrtcGetErrorString, "nvrtcGetErrorString(result: nvrtcResult)\n\nnvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `\"NVRTC_SUCCESS\"`. For unrecognized enumeration values, it returns `\"NVRTC_ERROR unknown\"`.\n\nParameters\n----------\nresult : :py:obj:`~.nvrtcResult`\n CUDA Runtime Compilation API result code.\n\nReturns\n-------\nnvrtcResult.NVRTC_SUCCESS\n nvrtcResult.NVRTC_SUCCESS\nbytes\n Message string for the given :py:obj:`~.nvrtcResult` code."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_1nvrtcGetErrorString = {"nvrtcGetErrorString", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_1nvrtcGetErrorString, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_nvrtcGetErrorString}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_1nvrtcGetErrorString(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_result = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetErrorString (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_result,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 106, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 106, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetErrorString", 0) < (0)) __PYX_ERR(0, 106, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetErrorString", 1, 1, 1, i); __PYX_ERR(0, 106, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 106, __pyx_L3_error) + } + __pyx_v_result = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetErrorString", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 106, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(((PyObject *)__pyx_v_result) == Py_None)) { + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "result"); __PYX_ERR(0, 107, __pyx_L1_error) + } + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_nvrtcGetErrorString(__pyx_self, __pyx_v_result); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + goto __pyx_L7_cleaned_up; + __pyx_L0:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __pyx_L7_cleaned_up:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_nvrtcGetErrorString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result) { + nvrtcResult __pyx_v_cyresult; + char const *__pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + nvrtcResult __pyx_t_2; + char const *__pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetErrorString", 0); + + /* "cuda/bindings/nvrtc.pyx":122 + * Message string for the given :py:obj:`~.nvrtcResult` code. + * """ + * cdef cynvrtc.nvrtcResult cyresult = result.value # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetErrorString(cyresult) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = ((nvrtcResult)__Pyx_PyLong_As_nvrtcResult(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_cyresult = __pyx_t_2; + + /* "cuda/bindings/nvrtc.pyx":123 + * """ + * cdef cynvrtc.nvrtcResult cyresult = result.value + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetErrorString(cyresult) + * return (nvrtcResult.NVRTC_SUCCESS, err) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":124 + * cdef cynvrtc.nvrtcResult cyresult = result.value + * with nogil: + * err = cynvrtc.nvrtcGetErrorString(cyresult) # <<<<<<<<<<<<<< + * return (nvrtcResult.NVRTC_SUCCESS, err) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetErrorString(__pyx_v_cyresult); if (unlikely(__pyx_t_3 == ((char const *)0) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 124, __pyx_L4_error) + __pyx_v_err = __pyx_t_3; + } + + /* "cuda/bindings/nvrtc.pyx":123 + * """ + * cdef cynvrtc.nvrtcResult cyresult = result.value + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetErrorString(cyresult) + * return (nvrtcResult.NVRTC_SUCCESS, err) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvrtc.pyx":125 + * with nogil: + * err = cynvrtc.nvrtcGetErrorString(cyresult) + * return (nvrtcResult.NVRTC_SUCCESS, err) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_nvrtcResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NVRTC_SUCCESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 125, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 125, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":106 + * return self._pvt_ptr + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetErrorString(result not None : nvrtcResult): + * """ nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `"NVRTC_SUCCESS"`. For unrecognized enumeration values, it returns `"NVRTC_ERROR unknown"`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":127 + * return (nvrtcResult.NVRTC_SUCCESS, err) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcVersion(): + * """ nvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_3nvrtcVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_2nvrtcVersion, "nvrtcVersion()\n\nnvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\nmajor : int\n CUDA Runtime Compilation major version number.\nminor : int\n CUDA Runtime Compilation minor version number."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_3nvrtcVersion = {"nvrtcVersion", (PyCFunction)__pyx_pw_4cuda_8bindings_5nvrtc_3nvrtcVersion, METH_NOARGS, __pyx_doc_4cuda_8bindings_5nvrtc_2nvrtcVersion}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_3nvrtcVersion(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcVersion (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_2nvrtcVersion(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_2nvrtcVersion(CYTHON_UNUSED PyObject *__pyx_self) { + int __pyx_v_major; + int __pyx_v_minor; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvrtcResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcVersion", 0); + + /* "cuda/bindings/nvrtc.pyx":141 + * CUDA Runtime Compilation minor version number. + * """ + * cdef int major = 0 # <<<<<<<<<<<<<< + * cdef int minor = 0 + * with nogil: +*/ + __pyx_v_major = 0; + + /* "cuda/bindings/nvrtc.pyx":142 + * """ + * cdef int major = 0 + * cdef int minor = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcVersion(&major, &minor) +*/ + __pyx_v_minor = 0; + + /* "cuda/bindings/nvrtc.pyx":143 + * cdef int major = 0 + * cdef int minor = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcVersion(&major, &minor) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":144 + * cdef int minor = 0 + * with nogil: + * err = cynvrtc.nvrtcVersion(&major, &minor) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None, None) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcVersion((&__pyx_v_major), (&__pyx_v_minor)); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 144, __pyx_L4_error) + __pyx_v_err = __pyx_t_1; + } + + /* "cuda/bindings/nvrtc.pyx":143 + * cdef int major = 0 + * cdef int minor = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcVersion(&major, &minor) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvrtc.pyx":145 + * with nogil: + * err = cynvrtc.nvrtcVersion(&major, &minor) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None, None) + * return (_dict_nvrtcResult[err], major, minor) +*/ + __pyx_t_2 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":146 + * err = cynvrtc.nvrtcVersion(&major, &minor) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None, None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], major, minor) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":145 + * with nogil: + * err = cynvrtc.nvrtcVersion(&major, &minor) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None, None) + * return (_dict_nvrtcResult[err], major, minor) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":147 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None, None) + * return (_dict_nvrtcResult[err], major, minor) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_major); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 147, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_t_4 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":127 + * return (nvrtcResult.NVRTC_SUCCESS, err) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcVersion(): + * """ nvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":149 + * return (_dict_nvrtcResult[err], major, minor) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNumSupportedArchs(): + * """ nvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_5nvrtcGetNumSupportedArchs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_4nvrtcGetNumSupportedArchs, "nvrtcGetNumSupportedArchs()\n\nnvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures.\n\nsee :py:obj:`~.nvrtcGetSupportedArchs`\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\nnumArchs : int\n number of supported architectures."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_5nvrtcGetNumSupportedArchs = {"nvrtcGetNumSupportedArchs", (PyCFunction)__pyx_pw_4cuda_8bindings_5nvrtc_5nvrtcGetNumSupportedArchs, METH_NOARGS, __pyx_doc_4cuda_8bindings_5nvrtc_4nvrtcGetNumSupportedArchs}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_5nvrtcGetNumSupportedArchs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetNumSupportedArchs (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_4nvrtcGetNumSupportedArchs(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_4nvrtcGetNumSupportedArchs(CYTHON_UNUSED PyObject *__pyx_self) { + int __pyx_v_numArchs; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvrtcResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetNumSupportedArchs", 0); + + /* "cuda/bindings/nvrtc.pyx":163 + * number of supported architectures. + * """ + * cdef int numArchs = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) +*/ + __pyx_v_numArchs = 0; + + /* "cuda/bindings/nvrtc.pyx":164 + * """ + * cdef int numArchs = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":165 + * cdef int numArchs = 0 + * with nogil: + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNumSupportedArchs((&__pyx_v_numArchs)); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 165, __pyx_L4_error) + __pyx_v_err = __pyx_t_1; + } + + /* "cuda/bindings/nvrtc.pyx":164 + * """ + * cdef int numArchs = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvrtc.pyx":166 + * with nogil: + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], numArchs) +*/ + __pyx_t_2 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":167 + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], numArchs) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 167, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 167, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":166 + * with nogil: + * err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], numArchs) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":168 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], numArchs) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_numArchs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 168, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 168, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":149 + * return (_dict_nvrtcResult[err], major, minor) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNumSupportedArchs(): + * """ nvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetNumSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":170 + * return (_dict_nvrtcResult[err], numArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetSupportedArchs(): + * """ nvrtcGetSupportedArchs populates the array passed via the output parameter `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 :py:obj:`~.nvrtcGetNumSupportedArchs`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_7nvrtcGetSupportedArchs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_6nvrtcGetSupportedArchs, "nvrtcGetSupportedArchs()\n\nnvrtcGetSupportedArchs populates the array passed via the output parameter `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 :py:obj:`~.nvrtcGetNumSupportedArchs`.\n\nsee :py:obj:`~.nvrtcGetNumSupportedArchs`\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\nsupportedArchs : list[int]\n sorted array of supported architectures."); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_7nvrtcGetSupportedArchs = {"nvrtcGetSupportedArchs", (PyCFunction)__pyx_pw_4cuda_8bindings_5nvrtc_7nvrtcGetSupportedArchs, METH_NOARGS, __pyx_doc_4cuda_8bindings_5nvrtc_6nvrtcGetSupportedArchs}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_7nvrtcGetSupportedArchs(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetSupportedArchs (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_6nvrtcGetSupportedArchs(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_6nvrtcGetSupportedArchs(CYTHON_UNUSED PyObject *__pyx_self) { + std::vector __pyx_v_supportedArchs; + CYTHON_UNUSED PyObject *__pyx_v__ = NULL; + PyObject *__pyx_v_s = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *(*__pyx_t_6)(PyObject *); + std::vector ::size_type __pyx_t_7; + nvrtcResult __pyx_t_8; + int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetSupportedArchs", 0); + + /* "cuda/bindings/nvrtc.pyx":185 + * """ + * cdef vector[int] supportedArchs + * _, s = nvrtcGetNumSupportedArchs() # <<<<<<<<<<<<<< + * supportedArchs.resize(s) + * +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_nvrtcGetNumSupportedArchs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 185, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_2); + } else { + __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1); + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_2); + } + #else + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); + index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + goto __pyx_L4_unpacking_done; + __pyx_L3_unpacking_failed:; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_L4_unpacking_done:; + } + __pyx_v__ = __pyx_t_3; + __pyx_t_3 = 0; + __pyx_v_s = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":186 + * cdef vector[int] supportedArchs + * _, s = nvrtcGetNumSupportedArchs() + * supportedArchs.resize(s) # <<<<<<<<<<<<<< + * + * with nogil: +*/ + __pyx_t_7 = __Pyx_PyLong_As_size_t(__pyx_v_s); if (unlikely((__pyx_t_7 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L1_error) + try { + __pyx_v_supportedArchs.resize(__pyx_t_7); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(0, 186, __pyx_L1_error) + } + + /* "cuda/bindings/nvrtc.pyx":188 + * supportedArchs.resize(s) + * + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":189 + * + * with nogil: + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_8 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetSupportedArchs(__pyx_v_supportedArchs.data()); if (unlikely(__pyx_t_8 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 189, __pyx_L6_error) + __pyx_v_err = __pyx_t_8; + } + + /* "cuda/bindings/nvrtc.pyx":188 + * supportedArchs.resize(s) + * + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L7; + } + __pyx_L6_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L7:; + } + } + + /* "cuda/bindings/nvrtc.pyx":190 + * with nogil: + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], supportedArchs) +*/ + __pyx_t_9 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_9) { + + /* "cuda/bindings/nvrtc.pyx":191 + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], supportedArchs) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 191, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 191, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":190 + * with nogil: + * err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], supportedArchs) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":192 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], supportedArchs) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __pyx_convert_vector_to_py_int(__pyx_v_supportedArchs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 192, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 192, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":170 + * return (_dict_nvrtcResult[err], numArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetSupportedArchs(): + * """ nvrtcGetSupportedArchs populates the array passed via the output parameter `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 :py:obj:`~.nvrtcGetNumSupportedArchs`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetSupportedArchs", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__); + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":194 + * return (_dict_nvrtcResult[err], supportedArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_9nvrtcCreateProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_8nvrtcCreateProgram, "nvrtcCreateProgram(char *src, char *name, int numHeaders, headers: Optional[tuple[bytes] | list[bytes]], includeNames: Optional[tuple[bytes] | list[bytes]])\n\nnvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it.\n\nParameters\n----------\nsrc : bytes\n CUDA program source.\nname : bytes\n CUDA program name. `name` can be `NULL`; `\"default_program\"` is\n used when `name` is `NULL` or \"\".\nnumHeaders : int\n Number of headers used. `numHeaders` must be greater than or equal\n to 0.\nheaders : list[bytes]\n Sources of the headers. `headers` can be `NULL` when `numHeaders`\n is 0.\nincludeNames : list[bytes]\n Name of each header by which they can be included in the CUDA\n program source. `includeNames` can be `NULL` when `numHeaders` is\n 0. These headers must be included with the exact names specified\n here.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY`\n - :py:obj:`~.NVRTC_ERROR_PROGRAM_CREATION_FAILURE`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nSee Also\n--------\n:py:obj:`~.nvrtcDestroyProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_9nvrtcCreateProgram = {"nvrtcCreateProgram", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_9nvrtcCreateProgram, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_8nvrtcCreateProgram}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_9nvrtcCreateProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + char *__pyx_v_src; + char *__pyx_v_name; + int __pyx_v_numHeaders; + PyObject *__pyx_v_headers = 0; + PyObject *__pyx_v_includeNames = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[5] = {0,0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcCreateProgram (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_src,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_numHeaders,&__pyx_mstate_global->__pyx_n_u_headers,&__pyx_mstate_global->__pyx_n_u_includeNames,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 194, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 5: + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcCreateProgram", 0) < (0)) __PYX_ERR(0, 194, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcCreateProgram", 1, 5, 5, i); __PYX_ERR(0, 194, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 5)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 194, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 194, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 194, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 194, __pyx_L3_error) + values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 194, __pyx_L3_error) + } + __pyx_v_src = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_src) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) + __pyx_v_name = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) + __pyx_v_numHeaders = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_numHeaders == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) + __pyx_v_headers = values[3]; + __pyx_v_includeNames = values[4]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcCreateProgram", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 194, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_8nvrtcCreateProgram(__pyx_self, __pyx_v_src, __pyx_v_name, __pyx_v_numHeaders, __pyx_v_headers, __pyx_v_includeNames); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "cuda/bindings/nvrtc.pyx":233 + * """ + * includeNames = [] if includeNames is None else includeNames + * if not all(isinstance(_x, (bytes)) for _x in includeNames): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 233, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_nvrtcCreateProgram_locals_genexp, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc); if (unlikely(!gen)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCreateProgram.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 233, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 233, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 233, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 233, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 233, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_5 = PyBytes_Check(__pyx_cur_scope->__pyx_v__x); + __pyx_t_6 = (!__pyx_t_5); + if (__pyx_t_6) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "cuda/bindings/nvrtc.pyx":236 + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 236, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_nvrtcCreateProgram_locals_genexp, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc); if (unlikely(!gen)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCreateProgram.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 236, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 236, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 236, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 236, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_5 = PyBytes_Check(__pyx_cur_scope->__pyx_v__x); + __pyx_t_6 = (!__pyx_t_5); + if (__pyx_t_6) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":194 + * return (_dict_nvrtcResult[err], supportedArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it. +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_8nvrtcCreateProgram(CYTHON_UNUSED PyObject *__pyx_self, char *__pyx_v_src, char *__pyx_v_name, int __pyx_v_numHeaders, PyObject *__pyx_v_headers, PyObject *__pyx_v_includeNames) { + struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *__pyx_v_prog = 0; + std::vector __pyx_v_cyheaders; + std::vector __pyx_v_cyincludeNames; + nvrtcResult __pyx_v_err; + PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_2generator1 = 0; + PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_5generator2 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + Py_ssize_t __pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + std::vector __pyx_t_11; + std::vector __pyx_t_12; + nvrtcResult __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcCreateProgram", 0); + __Pyx_INCREF(__pyx_v_headers); + __Pyx_INCREF(__pyx_v_includeNames); + + /* "cuda/bindings/nvrtc.pyx":232 + * :py:obj:`~.nvrtcDestroyProgram` + * """ + * includeNames = [] if includeNames is None else includeNames # <<<<<<<<<<<<<< + * if not all(isinstance(_x, (bytes)) for _x in includeNames): + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") +*/ + __pyx_t_2 = (__pyx_v_includeNames == Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_v_includeNames); + __pyx_t_1 = __pyx_v_includeNames; + } + __Pyx_DECREF_SET(__pyx_v_includeNames, __pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/nvrtc.pyx":233 + * """ + * includeNames = [] if includeNames is None else includeNames + * if not all(isinstance(_x, (bytes)) for _x in includeNames): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers +*/ + __pyx_t_1 = __pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_genexpr(NULL, __pyx_v_includeNames); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (!__pyx_t_2); + if (unlikely(__pyx_t_4)) { + + /* "cuda/bindings/nvrtc.pyx":234 + * includeNames = [] if includeNames is None else includeNames + * if not all(isinstance(_x, (bytes)) for _x in includeNames): + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") # <<<<<<<<<<<<<< + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_5 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Argument_includeNames_is_not_ins}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 234, __pyx_L1_error) + + /* "cuda/bindings/nvrtc.pyx":233 + * """ + * includeNames = [] if includeNames is None else includeNames + * if not all(isinstance(_x, (bytes)) for _x in includeNames): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers +*/ + } + + /* "cuda/bindings/nvrtc.pyx":235 + * if not all(isinstance(_x, (bytes)) for _x in includeNames): + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers # <<<<<<<<<<<<<< + * if not all(isinstance(_x, (bytes)) for _x in headers): + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") +*/ + __pyx_t_4 = (__pyx_v_headers == Py_None); + if (__pyx_t_4) { + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __pyx_t_5; + __pyx_t_5 = 0; + } else { + __Pyx_INCREF(__pyx_v_headers); + __pyx_t_3 = __pyx_v_headers; + } + __Pyx_DECREF_SET(__pyx_v_headers, __pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/nvrtc.pyx":236 + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() +*/ + __pyx_t_3 = __pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_3genexpr(NULL, __pyx_v_headers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 236, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (!__pyx_t_4); + if (unlikely(__pyx_t_2)) { + + /* "cuda/bindings/nvrtc.pyx":237 + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") # <<<<<<<<<<<<<< + * cdef nvrtcProgram prog = nvrtcProgram() + * if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_1 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Argument_headers_is_not_instance}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 237, __pyx_L1_error) + + /* "cuda/bindings/nvrtc.pyx":236 + * raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + * headers = [] if headers is None else headers + * if not all(isinstance(_x, (bytes)) for _x in headers): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() +*/ + } + + /* "cuda/bindings/nvrtc.pyx":238 + * if not all(isinstance(_x, (bytes)) for _x in headers): + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() # <<<<<<<<<<<<<< + * if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) + * if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_5); + } + __pyx_v_prog = ((struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/nvrtc.pyx":239 + * raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef nvrtcProgram prog = nvrtcProgram() + * if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) # <<<<<<<<<<<<<< + * if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) + * cdef vector[const char*] cyheaders = headers +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_headers); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_numHeaders > __pyx_t_7); + if (unlikely(__pyx_t_2)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_1 = __pyx_builtin_RuntimeError; + __pyx_t_7 = PyObject_Length(__pyx_v_headers); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_8 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_List_is_too_small, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_8, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_numHeaders); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 239, __pyx_L1_error) + } + + /* "cuda/bindings/nvrtc.pyx":240 + * cdef nvrtcProgram prog = nvrtcProgram() + * if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) + * if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) # <<<<<<<<<<<<<< + * cdef vector[const char*] cyheaders = headers + * cdef vector[const char*] cyincludeNames = includeNames +*/ + __pyx_t_7 = PyObject_Length(__pyx_v_includeNames); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_2 = (__pyx_v_numHeaders > __pyx_t_7); + if (unlikely(__pyx_t_2)) { + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_8 = __pyx_builtin_RuntimeError; + __pyx_t_7 = PyObject_Length(__pyx_v_includeNames); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_3 = PyLong_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_List_is_too_small, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_numHeaders); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_9 = __Pyx_PyObject_Unicode(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 240, __pyx_L1_error) + } + + /* "cuda/bindings/nvrtc.pyx":241 + * if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) + * if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) + * cdef vector[const char*] cyheaders = headers # <<<<<<<<<<<<<< + * cdef vector[const char*] cyincludeNames = includeNames + * with nogil: +*/ + __pyx_t_11 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v_headers); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_v_cyheaders = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_11); + + /* "cuda/bindings/nvrtc.pyx":242 + * if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) + * cdef vector[const char*] cyheaders = headers + * cdef vector[const char*] cyincludeNames = includeNames # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) +*/ + __pyx_t_12 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v_includeNames); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_v_cyincludeNames = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12); + + /* "cuda/bindings/nvrtc.pyx":243 + * cdef vector[const char*] cyheaders = headers + * cdef vector[const char*] cyincludeNames = includeNames + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":244 + * cdef vector[const char*] cyincludeNames = includeNames + * with nogil: + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_13 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCreateProgram(((nvrtcProgram *)__pyx_v_prog->_pvt_ptr), __pyx_v_src, __pyx_v_name, __pyx_v_numHeaders, __pyx_v_cyheaders.data(), __pyx_v_cyincludeNames.data()); if (unlikely(__pyx_t_13 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 244, __pyx_L8_error) + __pyx_v_err = __pyx_t_13; + } + + /* "cuda/bindings/nvrtc.pyx":243 + * cdef vector[const char*] cyheaders = headers + * cdef vector[const char*] cyincludeNames = includeNames + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L9; + } + __pyx_L8_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L9:; + } + } + + /* "cuda/bindings/nvrtc.pyx":245 + * with nogil: + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], prog) +*/ + __pyx_t_2 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":246 + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], prog) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 246, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, Py_None) != (0)) __PYX_ERR(0, 246, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_8; + __pyx_t_8 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":245 + * with nogil: + * err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], prog) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":247 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], prog) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 247, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_prog); + __Pyx_GIVEREF((PyObject *)__pyx_v_prog); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_prog)) != (0)) __PYX_ERR(0, 247, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":194 + * return (_dict_nvrtcResult[err], supportedArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCreateProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_prog); + __Pyx_XDECREF(__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_2generator1); + __Pyx_XDECREF(__pyx_gb_4cuda_8bindings_5nvrtc_18nvrtcCreateProgram_5generator2); + __Pyx_XDECREF(__pyx_v_headers); + __Pyx_XDECREF(__pyx_v_includeNames); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":249 + * return (_dict_nvrtcResult[err], prog) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcDestroyProgram(prog): + * """ nvrtcDestroyProgram destroys the given program. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_11nvrtcDestroyProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_10nvrtcDestroyProgram, "nvrtcDestroyProgram(prog)\n\nnvrtcDestroyProgram destroys the given program.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcCreateProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_11nvrtcDestroyProgram = {"nvrtcDestroyProgram", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_11nvrtcDestroyProgram, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_10nvrtcDestroyProgram}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_11nvrtcDestroyProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcDestroyProgram (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 249, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcDestroyProgram", 0) < (0)) __PYX_ERR(0, 249, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcDestroyProgram", 1, 1, 1, i); __PYX_ERR(0, 249, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcDestroyProgram", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 249, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_10nvrtcDestroyProgram(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_10nvrtcDestroyProgram(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram *__pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + nvrtcResult __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcDestroyProgram", 0); + + /* "cuda/bindings/nvrtc.pyx":269 + * """ + * cdef cynvrtc.nvrtcProgram *cyprog + * if prog is None: # <<<<<<<<<<<<<< + * cyprog = NULL + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":270 + * cdef cynvrtc.nvrtcProgram *cyprog + * if prog is None: + * cyprog = NULL # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = prog.getPtr() +*/ + __pyx_v_cyprog = ((nvrtcProgram *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)NULL)); + + /* "cuda/bindings/nvrtc.pyx":269 + * """ + * cdef cynvrtc.nvrtcProgram *cyprog + * if prog is None: # <<<<<<<<<<<<<< + * cyprog = NULL + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":271 + * if prog is None: + * cyprog = NULL + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = prog.getPtr() + * cyprog = pprog +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":272 + * cyprog = NULL + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = prog.getPtr() # <<<<<<<<<<<<<< + * cyprog = pprog + * elif isinstance(prog, (int)): +*/ + __pyx_t_3 = __pyx_v_prog; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; + __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_getPtr, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_v_pprog = __pyx_t_2; + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":273 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = prog.getPtr() + * cyprog = pprog # <<<<<<<<<<<<<< + * elif isinstance(prog, (int)): + * cyprog = prog +*/ + __pyx_t_5 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_5)); + + /* "cuda/bindings/nvrtc.pyx":271 + * if prog is None: + * cyprog = NULL + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = prog.getPtr() + * cyprog = pprog +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":274 + * pprog = prog.getPtr() + * cyprog = pprog + * elif isinstance(prog, (int)): # <<<<<<<<<<<<<< + * cyprog = prog + * else: +*/ + __pyx_t_1 = PyLong_Check(__pyx_v_prog); + if (likely(__pyx_t_1)) { + + /* "cuda/bindings/nvrtc.pyx":275 + * cyprog = pprog + * elif isinstance(prog, (int)): + * cyprog = prog # <<<<<<<<<<<<<< + * else: + * raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) +*/ + __pyx_t_5 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_prog); if (unlikely((__pyx_t_5 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_5)); + + /* "cuda/bindings/nvrtc.pyx":274 + * pprog = prog.getPtr() + * cyprog = pprog + * elif isinstance(prog, (int)): # <<<<<<<<<<<<<< + * cyprog = prog + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":277 + * cyprog = prog + * else: + * raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcDestroyProgram(cyprog) +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_6 = __pyx_builtin_TypeError; + __pyx_t_7 = __Pyx_PyObject_Unicode(((PyObject *)Py_TYPE(__pyx_v_prog))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Argument_prog_is_not_instance_of, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 277, __pyx_L1_error) + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":278 + * else: + * raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcDestroyProgram(cyprog) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":279 + * raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) + * with nogil: + * err = cynvrtc.nvrtcDestroyProgram(cyprog) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_9 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcDestroyProgram(__pyx_v_cyprog); if (unlikely(__pyx_t_9 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 279, __pyx_L5_error) + __pyx_v_err = __pyx_t_9; + } + + /* "cuda/bindings/nvrtc.pyx":278 + * else: + * raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcDestroyProgram(cyprog) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":280 + * with nogil: + * err = cynvrtc.nvrtcDestroyProgram(cyprog) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 280, __pyx_L1_error); + __pyx_t_8 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":249 + * return (_dict_nvrtcResult[err], prog) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcDestroyProgram(prog): + * """ nvrtcDestroyProgram destroys the given program. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcDestroyProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":282 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCompileProgram compiles the given program. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_13nvrtcCompileProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcCompileProgram, "nvrtcCompileProgram(prog, int numOptions, options: Optional[tuple[bytes] | list[bytes]])\n\nnvrtcCompileProgram compiles the given program.\n\nIt supports compile options listed in :py:obj:`~.Supported Compile\nOptions`.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\nnumOptions : int\n Number of compiler options passed.\noptions : list[bytes]\n Compiler options in the form of C string array. `options` can be\n `NULL` when `numOptions` is 0.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n - :py:obj:`~.NVRTC_ERROR_INVALID_OPTION`\n - :py:obj:`~.NVRTC_ERROR_COMPILATION`\n - :py:obj:`~.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE`\n - :py:obj:`~.NVRTC_ERROR_TIME_FILE_WRITE_FAILED`\n - :py:obj:`~.NVRTC_ERROR_CANCELLED`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_13nvrtcCompileProgram = {"nvrtcCompileProgram", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_13nvrtcCompileProgram, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcCompileProgram}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_13nvrtcCompileProgram(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + int __pyx_v_numOptions; + PyObject *__pyx_v_options = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcCompileProgram (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_numOptions,&__pyx_mstate_global->__pyx_n_u_options,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 282, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 282, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcCompileProgram", 0) < (0)) __PYX_ERR(0, 282, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcCompileProgram", 1, 3, 3, i); __PYX_ERR(0, 282, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 282, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 282, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 282, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_numOptions = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_numOptions == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error) + __pyx_v_options = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcCompileProgram", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 282, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcCompileProgram(__pyx_self, __pyx_v_prog, __pyx_v_numOptions, __pyx_v_options); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "cuda/bindings/nvrtc.pyx":313 + * """ + * options = [] if options is None else options + * if not all(isinstance(_x, (bytes)) for _x in options): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 313, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_nvrtcCompileProgram_locals_genex, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc); if (unlikely(!gen)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCompileProgram.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 313, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 313, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 313, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 313, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 313, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__x); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__x, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_5 = PyBytes_Check(__pyx_cur_scope->__pyx_v__x); + __pyx_t_6 = (!__pyx_t_5); + if (__pyx_t_6) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":282 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCompileProgram compiles the given program. +*/ + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_12nvrtcCompileProgram(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, int __pyx_v_numOptions, PyObject *__pyx_v_options) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + std::vector __pyx_v_cyoptions; + nvrtcResult __pyx_v_err; + PyObject *__pyx_gb_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_2generator3 = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_7; + Py_ssize_t __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + std::vector __pyx_t_12; + nvrtcResult __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcCompileProgram", 0); + __Pyx_INCREF(__pyx_v_options); + + /* "cuda/bindings/nvrtc.pyx":312 + * - :py:obj:`~.NVRTC_ERROR_CANCELLED` + * """ + * options = [] if options is None else options # <<<<<<<<<<<<<< + * if not all(isinstance(_x, (bytes)) for _x in options): + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") +*/ + __pyx_t_2 = (__pyx_v_options == Py_None); + if (__pyx_t_2) { + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_v_options); + __pyx_t_1 = __pyx_v_options; + } + __Pyx_DECREF_SET(__pyx_v_options, __pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/nvrtc.pyx":313 + * """ + * options = [] if options is None else options + * if not all(isinstance(_x, (bytes)) for _x in options): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog +*/ + __pyx_t_1 = __pyx_pf_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_genexpr(NULL, __pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = (!__pyx_t_2); + if (unlikely(__pyx_t_4)) { + + /* "cuda/bindings/nvrtc.pyx":314 + * options = [] if options is None else options + * if not all(isinstance(_x, (bytes)) for _x in options): + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") # <<<<<<<<<<<<<< + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: +*/ + __pyx_t_1 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_5 = __pyx_builtin_TypeError; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Argument_options_is_not_instance}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(0, 314, __pyx_L1_error) + + /* "cuda/bindings/nvrtc.pyx":313 + * """ + * options = [] if options is None else options + * if not all(isinstance(_x, (bytes)) for _x in options): # <<<<<<<<<<<<<< + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog +*/ + } + + /* "cuda/bindings/nvrtc.pyx":316 + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_4 = (__pyx_v_prog == Py_None); + if (__pyx_t_4) { + + /* "cuda/bindings/nvrtc.pyx":317 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":316 + * raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L4; + } + + /* "cuda/bindings/nvrtc.pyx":318 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_4) { + + /* "cuda/bindings/nvrtc.pyx":319 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_pprog = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "cuda/bindings/nvrtc.pyx":318 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L4; + } + + /* "cuda/bindings/nvrtc.pyx":321 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) +*/ + /*else*/ { + __pyx_t_5 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_1 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_prog}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_3); + } + __pyx_t_1 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF((PyObject *)__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + } + __pyx_L4:; + + /* "cuda/bindings/nvrtc.pyx":322 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + * cdef vector[const char*] cyoptions = options +*/ + __pyx_t_7 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_7 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_7)); + + /* "cuda/bindings/nvrtc.pyx":323 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) # <<<<<<<<<<<<<< + * cdef vector[const char*] cyoptions = options + * with nogil: +*/ + __pyx_t_8 = PyObject_Length(__pyx_v_options); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_4 = (__pyx_v_numOptions > __pyx_t_8); + if (unlikely(__pyx_t_4)) { + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_RuntimeError); + __pyx_t_5 = __pyx_builtin_RuntimeError; + __pyx_t_8 = PyObject_Length(__pyx_v_options); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_9 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = __Pyx_PyObject_Unicode(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_List_is_too_small, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_numOptions); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_6 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 323, __pyx_L1_error) + } + + /* "cuda/bindings/nvrtc.pyx":324 + * cyprog = pprog + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + * cdef vector[const char*] cyoptions = options # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) +*/ + __pyx_t_12 = __pyx_convert_vector_from_py_char__const___2a_(__pyx_v_options); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_v_cyoptions = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_12); + + /* "cuda/bindings/nvrtc.pyx":325 + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + * cdef vector[const char*] cyoptions = options + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":326 + * cdef vector[const char*] cyoptions = options + * with nogil: + * err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_13 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCompileProgram(__pyx_v_cyprog, __pyx_v_numOptions, __pyx_v_cyoptions.data()); if (unlikely(__pyx_t_13 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 326, __pyx_L7_error) + __pyx_v_err = __pyx_t_13; + } + + /* "cuda/bindings/nvrtc.pyx":325 + * if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + * cdef vector[const char*] cyoptions = options + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L8; + } + __pyx_L7_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L8:; + } + } + + /* "cuda/bindings/nvrtc.pyx":327 + * with nogil: + * err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_9); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 327, __pyx_L1_error); + __pyx_t_9 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":282 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCompileProgram compiles the given program. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcCompileProgram", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XDECREF(__pyx_gb_4cuda_8bindings_5nvrtc_19nvrtcCompileProgram_2generator3); + __Pyx_XDECREF(__pyx_v_options); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":329 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTXSize(prog): + * """ nvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_15nvrtcGetPTXSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_14nvrtcGetPTXSize, "nvrtcGetPTXSize(prog)\n\nnvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`).\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\nptxSizeRet : int\n Size of the generated PTX (including the trailing `NULL`).\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetPTX`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_15nvrtcGetPTXSize = {"nvrtcGetPTXSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_15nvrtcGetPTXSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_14nvrtcGetPTXSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_15nvrtcGetPTXSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetPTXSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 329, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 329, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetPTXSize", 0) < (0)) __PYX_ERR(0, 329, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetPTXSize", 1, 1, 1, i); __PYX_ERR(0, 329, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 329, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetPTXSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 329, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPTXSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_14nvrtcGetPTXSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_14nvrtcGetPTXSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_ptxSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetPTXSize", 0); + + /* "cuda/bindings/nvrtc.pyx":352 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":353 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":352 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":354 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":355 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":354 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":357 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t ptxSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":358 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t ptxSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":359 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t ptxSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) +*/ + __pyx_v_ptxSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":360 + * cyprog = pprog + * cdef size_t ptxSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":361 + * cdef size_t ptxSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTXSize(__pyx_v_cyprog, (&__pyx_v_ptxSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 361, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":360 + * cyprog = pprog + * cdef size_t ptxSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":362 + * with nogil: + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ptxSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":363 + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], ptxSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 363, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 363, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":362 + * with nogil: + * err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ptxSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":364 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ptxSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_ptxSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 364, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 364, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":329 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTXSize(prog): + * """ nvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPTXSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":366 + * return (_dict_nvrtcResult[err], ptxSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTX(prog, char* ptx): + * """ nvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_17nvrtcGetPTX(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_16nvrtcGetPTX, "nvrtcGetPTX(prog, char *ptx)\n\nnvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\nptx : bytes\n Compiled result.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetPTXSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_17nvrtcGetPTX = {"nvrtcGetPTX", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_17nvrtcGetPTX, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_16nvrtcGetPTX}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_17nvrtcGetPTX(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_ptx; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetPTX (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_ptx,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 366, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 366, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetPTX", 0) < (0)) __PYX_ERR(0, 366, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetPTX", 1, 2, 2, i); __PYX_ERR(0, 366, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 366, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_ptx = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_ptx) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetPTX", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 366, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPTX", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_16nvrtcGetPTX(__pyx_self, __pyx_v_prog, __pyx_v_ptx); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_16nvrtcGetPTX(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_ptx) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetPTX", 0); + + /* "cuda/bindings/nvrtc.pyx":389 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":390 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":389 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":391 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":392 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":391 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":394 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":395 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetPTX(cyprog, ptx) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":396 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPTX(cyprog, ptx) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":397 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetPTX(cyprog, ptx) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTX(__pyx_v_cyprog, __pyx_v_ptx); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 397, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":396 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPTX(cyprog, ptx) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":398 + * with nogil: + * err = cynvrtc.nvrtcGetPTX(cyprog, ptx) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 398, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":366 + * return (_dict_nvrtcResult[err], ptxSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTX(prog, char* ptx): + * """ nvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPTX", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":400 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBINSize(prog): + * """ nvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19nvrtcGetCUBINSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_18nvrtcGetCUBINSize, "nvrtcGetCUBINSize(prog)\n\nnvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\ncubinSizeRet : int\n Size of the generated cubin.\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetCUBIN`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_19nvrtcGetCUBINSize = {"nvrtcGetCUBINSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19nvrtcGetCUBINSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_18nvrtcGetCUBINSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_19nvrtcGetCUBINSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetCUBINSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 400, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 400, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetCUBINSize", 0) < (0)) __PYX_ERR(0, 400, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetCUBINSize", 1, 1, 1, i); __PYX_ERR(0, 400, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 400, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetCUBINSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 400, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetCUBINSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcGetCUBINSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_18nvrtcGetCUBINSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_cubinSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetCUBINSize", 0); + + /* "cuda/bindings/nvrtc.pyx":423 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":424 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":423 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":425 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":426 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":425 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":428 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t cubinSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":429 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t cubinSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":430 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t cubinSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) +*/ + __pyx_v_cubinSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":431 + * cyprog = pprog + * cdef size_t cubinSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":432 + * cdef size_t cubinSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBINSize(__pyx_v_cyprog, (&__pyx_v_cubinSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 432, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":431 + * cyprog = pprog + * cdef size_t cubinSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":433 + * with nogil: + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], cubinSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":434 + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], cubinSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 434, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 434, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":433 + * with nogil: + * err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], cubinSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":435 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], cubinSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_cubinSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 435, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 435, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":400 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBINSize(prog): + * """ nvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetCUBINSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":437 + * return (_dict_nvrtcResult[err], cubinSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBIN(prog, char* cubin): + * """ nvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_21nvrtcGetCUBIN(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_20nvrtcGetCUBIN, "nvrtcGetCUBIN(prog, char *cubin)\n\nnvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\ncubin : bytes\n Compiled and assembled result.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetCUBINSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_21nvrtcGetCUBIN = {"nvrtcGetCUBIN", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_21nvrtcGetCUBIN, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_20nvrtcGetCUBIN}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_21nvrtcGetCUBIN(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_cubin; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetCUBIN (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_cubin,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 437, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 437, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 437, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetCUBIN", 0) < (0)) __PYX_ERR(0, 437, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetCUBIN", 1, 2, 2, i); __PYX_ERR(0, 437, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 437, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 437, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_cubin = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_cubin) && PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetCUBIN", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 437, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetCUBIN", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_20nvrtcGetCUBIN(__pyx_self, __pyx_v_prog, __pyx_v_cubin); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_20nvrtcGetCUBIN(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_cubin) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetCUBIN", 0); + + /* "cuda/bindings/nvrtc.pyx":460 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":461 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":460 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":462 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":463 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":462 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":465 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":466 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":467 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":468 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBIN(__pyx_v_cyprog, __pyx_v_cubin); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 468, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":467 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":469 + * with nogil: + * err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 469, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":437 + * return (_dict_nvrtcResult[err], cubinSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBIN(prog, char* cubin): + * """ nvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetCUBIN", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":471 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVMSize(prog): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_23nvrtcGetNVVMSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_22nvrtcGetNVVMSize, "nvrtcGetNVVMSize(prog)\n\nDEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n None\n\nReturns\n-------\nnvrtcResult\n\nnvvmSizeRet : int\n None"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_23nvrtcGetNVVMSize = {"nvrtcGetNVVMSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_23nvrtcGetNVVMSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22nvrtcGetNVVMSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_23nvrtcGetNVVMSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetNVVMSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 471, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetNVVMSize", 0) < (0)) __PYX_ERR(0, 471, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetNVVMSize", 1, 1, 1, i); __PYX_ERR(0, 471, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 471, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetNVVMSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 471, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetNVVMSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_22nvrtcGetNVVMSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_22nvrtcGetNVVMSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_nvvmSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetNVVMSize", 0); + + /* "cuda/bindings/nvrtc.pyx":488 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":489 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":488 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":490 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":491 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":490 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":493 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t nvvmSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":494 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t nvvmSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":495 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t nvvmSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) +*/ + __pyx_v_nvvmSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":496 + * cyprog = pprog + * cdef size_t nvvmSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":497 + * cdef size_t nvvmSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVMSize(__pyx_v_cyprog, (&__pyx_v_nvvmSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 497, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":496 + * cyprog = pprog + * cdef size_t nvvmSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":498 + * with nogil: + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], nvvmSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":499 + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], nvvmSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 499, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 499, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":498 + * with nogil: + * err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], nvvmSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":500 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], nvvmSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_nvvmSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 500, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 500, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":471 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVMSize(prog): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetNVVMSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":502 + * return (_dict_nvrtcResult[err], nvvmSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVM(prog, char* nvvm): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25nvrtcGetNVVM(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_24nvrtcGetNVVM, "nvrtcGetNVVM(prog, char *nvvm)\n\nDEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n None\nnvvm : bytes\n None\n\nReturns\n-------\nnvrtcResult"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_25nvrtcGetNVVM = {"nvrtcGetNVVM", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25nvrtcGetNVVM, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_24nvrtcGetNVVM}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_25nvrtcGetNVVM(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_nvvm; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetNVVM (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_nvvm,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 502, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 502, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 502, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetNVVM", 0) < (0)) __PYX_ERR(0, 502, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetNVVM", 1, 2, 2, i); __PYX_ERR(0, 502, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 502, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 502, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_nvvm = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_nvvm) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetNVVM", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 502, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetNVVM", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_24nvrtcGetNVVM(__pyx_self, __pyx_v_prog, __pyx_v_nvvm); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_24nvrtcGetNVVM(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_nvvm) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetNVVM", 0); + + /* "cuda/bindings/nvrtc.pyx":519 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":520 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":519 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":521 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":522 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":521 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":524 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":525 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":526 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":527 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVM(__pyx_v_cyprog, __pyx_v_nvvm); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 527, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":526 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":528 + * with nogil: + * err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 528, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":502 + * return (_dict_nvrtcResult[err], nvvmSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVM(prog, char* nvvm): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetNVVM", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":530 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIRSize(prog): + * """ nvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27nvrtcGetLTOIRSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_26nvrtcGetLTOIRSize, "nvrtcGetLTOIRSize(prog)\n\nnvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\nLTOIRSizeRet : int\n Size of the generated LTO IR.\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetLTOIR`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_27nvrtcGetLTOIRSize = {"nvrtcGetLTOIRSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27nvrtcGetLTOIRSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26nvrtcGetLTOIRSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_27nvrtcGetLTOIRSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetLTOIRSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 530, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 530, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetLTOIRSize", 0) < (0)) __PYX_ERR(0, 530, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetLTOIRSize", 1, 1, 1, i); __PYX_ERR(0, 530, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 530, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetLTOIRSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 530, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLTOIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_26nvrtcGetLTOIRSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_26nvrtcGetLTOIRSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_LTOIRSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetLTOIRSize", 0); + + /* "cuda/bindings/nvrtc.pyx":553 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":554 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":553 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":555 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":556 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":555 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":558 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t LTOIRSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":559 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t LTOIRSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":560 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t LTOIRSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) +*/ + __pyx_v_LTOIRSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":561 + * cyprog = pprog + * cdef size_t LTOIRSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":562 + * cdef size_t LTOIRSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIRSize(__pyx_v_cyprog, (&__pyx_v_LTOIRSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 562, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":561 + * cyprog = pprog + * cdef size_t LTOIRSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":563 + * with nogil: + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], LTOIRSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":564 + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], LTOIRSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 564, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 564, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":563 + * with nogil: + * err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], LTOIRSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":565 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], LTOIRSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_LTOIRSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 565, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 565, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":530 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIRSize(prog): + * """ nvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLTOIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":567 + * return (_dict_nvrtcResult[err], LTOIRSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIR(prog, char* LTOIR): + * """ nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_29nvrtcGetLTOIR(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_28nvrtcGetLTOIR, "nvrtcGetLTOIR(prog, char *LTOIR)\n\nnvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\nLTOIR : bytes\n Compiled result.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetLTOIRSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_29nvrtcGetLTOIR = {"nvrtcGetLTOIR", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_29nvrtcGetLTOIR, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28nvrtcGetLTOIR}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_29nvrtcGetLTOIR(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_LTOIR; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetLTOIR (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_LTOIR,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 567, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 567, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 567, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetLTOIR", 0) < (0)) __PYX_ERR(0, 567, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetLTOIR", 1, 2, 2, i); __PYX_ERR(0, 567, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 567, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 567, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_LTOIR = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_LTOIR) && PyErr_Occurred())) __PYX_ERR(0, 568, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetLTOIR", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 567, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLTOIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_28nvrtcGetLTOIR(__pyx_self, __pyx_v_prog, __pyx_v_LTOIR); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_28nvrtcGetLTOIR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_LTOIR) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetLTOIR", 0); + + /* "cuda/bindings/nvrtc.pyx":590 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":591 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":590 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":592 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":593 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":592 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":595 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":596 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":597 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":598 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIR(__pyx_v_cyprog, __pyx_v_LTOIR); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 598, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":597 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":599 + * with nogil: + * err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 599, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":567 + * return (_dict_nvrtcResult[err], LTOIRSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIR(prog, char* LTOIR): + * """ nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLTOIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":601 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIRSize(prog): + * """ nvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_31nvrtcGetOptiXIRSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_30nvrtcGetOptiXIRSize, "nvrtcGetOptiXIRSize(prog)\n\nnvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\noptixirSizeRet : int\n Size of the generated LTO IR.\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetOptiXIR`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_31nvrtcGetOptiXIRSize = {"nvrtcGetOptiXIRSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_31nvrtcGetOptiXIRSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_30nvrtcGetOptiXIRSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_31nvrtcGetOptiXIRSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetOptiXIRSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 601, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetOptiXIRSize", 0) < (0)) __PYX_ERR(0, 601, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetOptiXIRSize", 1, 1, 1, i); __PYX_ERR(0, 601, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetOptiXIRSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 601, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetOptiXIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_30nvrtcGetOptiXIRSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_30nvrtcGetOptiXIRSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_optixirSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetOptiXIRSize", 0); + + /* "cuda/bindings/nvrtc.pyx":624 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":625 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":624 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":626 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":627 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":626 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":629 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t optixirSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":630 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t optixirSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":631 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t optixirSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) +*/ + __pyx_v_optixirSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":632 + * cyprog = pprog + * cdef size_t optixirSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":633 + * cdef size_t optixirSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIRSize(__pyx_v_cyprog, (&__pyx_v_optixirSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 633, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":632 + * cyprog = pprog + * cdef size_t optixirSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":634 + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], optixirSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":635 + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], optixirSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 635, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 635, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":634 + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], optixirSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":636 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], optixirSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_optixirSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 636, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 636, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":601 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIRSize(prog): + * """ nvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetOptiXIRSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":638 + * return (_dict_nvrtcResult[err], optixirSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIR(prog, char* optixir): + * """ nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_33nvrtcGetOptiXIR(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_32nvrtcGetOptiXIR, "nvrtcGetOptiXIR(prog, char *optixir)\n\nnvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\noptixir : bytes\n Optix IR Compiled result.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetOptiXIRSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_33nvrtcGetOptiXIR = {"nvrtcGetOptiXIR", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_33nvrtcGetOptiXIR, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32nvrtcGetOptiXIR}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_33nvrtcGetOptiXIR(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_optixir; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetOptiXIR (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_optixir,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 638, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 638, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 638, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetOptiXIR", 0) < (0)) __PYX_ERR(0, 638, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetOptiXIR", 1, 2, 2, i); __PYX_ERR(0, 638, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 638, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 638, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_optixir = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_optixir) && PyErr_Occurred())) __PYX_ERR(0, 639, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetOptiXIR", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 638, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetOptiXIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_32nvrtcGetOptiXIR(__pyx_self, __pyx_v_prog, __pyx_v_optixir); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_32nvrtcGetOptiXIR(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_optixir) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetOptiXIR", 0); + + /* "cuda/bindings/nvrtc.pyx":661 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":662 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":661 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":663 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":664 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":663 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":666 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":667 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":668 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":669 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIR(__pyx_v_cyprog, __pyx_v_optixir); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 669, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":668 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":670 + * with nogil: + * err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 670, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":638 + * return (_dict_nvrtcResult[err], optixirSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIR(prog, char* optixir): + * """ nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetOptiXIR", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":672 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLogSize(prog): + * """ nvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_35nvrtcGetProgramLogSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_34nvrtcGetProgramLogSize, "nvrtcGetProgramLogSize(prog)\n\nnvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`).\n\nNote that compilation log may be generated with warnings and\ninformative messages, even when the compilation of `prog` succeeds.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\nlogSizeRet : int\n Size of the compilation log (including the trailing `NULL`).\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetProgramLog`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_35nvrtcGetProgramLogSize = {"nvrtcGetProgramLogSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_35nvrtcGetProgramLogSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_34nvrtcGetProgramLogSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_35nvrtcGetProgramLogSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetProgramLogSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 672, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 672, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetProgramLogSize", 0) < (0)) __PYX_ERR(0, 672, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetProgramLogSize", 1, 1, 1, i); __PYX_ERR(0, 672, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 672, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetProgramLogSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 672, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_34nvrtcGetProgramLogSize(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_34nvrtcGetProgramLogSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_logSizeRet; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetProgramLogSize", 0); + + /* "cuda/bindings/nvrtc.pyx":698 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":699 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":698 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":700 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":701 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":700 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":703 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t logSizeRet = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":704 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t logSizeRet = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":705 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t logSizeRet = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) +*/ + __pyx_v_logSizeRet = 0; + + /* "cuda/bindings/nvrtc.pyx":706 + * cyprog = pprog + * cdef size_t logSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":707 + * cdef size_t logSizeRet = 0 + * with nogil: + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLogSize(__pyx_v_cyprog, (&__pyx_v_logSizeRet)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 707, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":706 + * cyprog = pprog + * cdef size_t logSizeRet = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":708 + * with nogil: + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], logSizeRet) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":709 + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], logSizeRet) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 709, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 709, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":708 + * with nogil: + * err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], logSizeRet) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":710 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], logSizeRet) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_logSizeRet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 710, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 710, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":672 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLogSize(prog): + * """ nvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetProgramLogSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":712 + * return (_dict_nvrtcResult[err], logSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLog(prog, char* log): + * """ nvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_37nvrtcGetProgramLog(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_36nvrtcGetProgramLog, "nvrtcGetProgramLog(prog, char *log)\n\nnvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\nlog : bytes\n Compilation log.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetProgramLogSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_37nvrtcGetProgramLog = {"nvrtcGetProgramLog", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_37nvrtcGetProgramLog, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_36nvrtcGetProgramLog}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_37nvrtcGetProgramLog(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_log; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetProgramLog (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_log,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 712, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 712, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 712, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetProgramLog", 0) < (0)) __PYX_ERR(0, 712, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetProgramLog", 1, 2, 2, i); __PYX_ERR(0, 712, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 712, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 712, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_log = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_log) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetProgramLog", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 712, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_36nvrtcGetProgramLog(__pyx_self, __pyx_v_prog, __pyx_v_log); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_36nvrtcGetProgramLog(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_log) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetProgramLog", 0); + + /* "cuda/bindings/nvrtc.pyx":735 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":736 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":735 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":737 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":738 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":737 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":740 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":741 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetProgramLog(cyprog, log) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":742 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetProgramLog(cyprog, log) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":743 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetProgramLog(cyprog, log) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLog(__pyx_v_cyprog, __pyx_v_log); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 743, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":742 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetProgramLog(cyprog, log) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":744 + * with nogil: + * err = cynvrtc.nvrtcGetProgramLog(cyprog, log) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 744, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":712 + * return (_dict_nvrtcResult[err], logSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLog(prog, char* log): + * """ nvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetProgramLog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":746 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcAddNameExpression(prog, char* name_expression): + * """ nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_39nvrtcAddNameExpression(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_38nvrtcAddNameExpression, "nvrtcAddNameExpression(prog, char *name_expression)\n\nnvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable.\n\nThe identical name expression string must be provided on a subsequent\ncall to nvrtcGetLoweredName to extract the lowered name.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\nname_expression : bytes\n constant expression denoting the address of a global function or\n device/__constant__ variable.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\n - :py:obj:`~.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION`\n\nSee Also\n--------\n:py:obj:`~.nvrtcGetLoweredName`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_39nvrtcAddNameExpression = {"nvrtcAddNameExpression", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_39nvrtcAddNameExpression, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_38nvrtcAddNameExpression}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_39nvrtcAddNameExpression(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_name_expression; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcAddNameExpression (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_name_expression,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 746, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 746, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 746, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcAddNameExpression", 0) < (0)) __PYX_ERR(0, 746, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcAddNameExpression", 1, 2, 2, i); __PYX_ERR(0, 746, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 746, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 746, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_name_expression = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name_expression) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcAddNameExpression", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 746, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcAddNameExpression", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_38nvrtcAddNameExpression(__pyx_self, __pyx_v_prog, __pyx_v_name_expression); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_38nvrtcAddNameExpression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_name_expression) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcAddNameExpression", 0); + + /* "cuda/bindings/nvrtc.pyx":774 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":775 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":774 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":776 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":777 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":776 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":779 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":780 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":781 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":782 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcAddNameExpression(__pyx_v_cyprog, __pyx_v_name_expression); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 782, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":781 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":783 + * with nogil: + * err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 783, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":746 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcAddNameExpression(prog, char* name_expression): + * """ nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcAddNameExpression", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":785 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLoweredName(prog, char* name_expression): + * """ 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. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_41nvrtcGetLoweredName(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_40nvrtcGetLoweredName, "nvrtcGetLoweredName(prog, char *name_expression)\n\nnvrtcGetLoweredName 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.\n\nParameters\n----------\nprog : nvrtcProgram\n CUDA Runtime Compilation program.\nname_expression : bytes\n constant expression denoting the address of a global function or\n device/__constant__ variable.\n\nReturns\n-------\nnvrtcResult\n NVRTC_SUCCESS\n NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION\n NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID\nlowered_name : bytes\n initialized by the function to point to a C string containing the\n lowered (mangled) name corresponding to the provided name\n expression.\n\nSee Also\n--------\nnvrtcAddNameExpression"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_41nvrtcGetLoweredName = {"nvrtcGetLoweredName", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_41nvrtcGetLoweredName, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_40nvrtcGetLoweredName}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_41nvrtcGetLoweredName(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + char *__pyx_v_name_expression; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetLoweredName (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_name_expression,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 785, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 785, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 785, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetLoweredName", 0) < (0)) __PYX_ERR(0, 785, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetLoweredName", 1, 2, 2, i); __PYX_ERR(0, 785, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 785, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 785, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_name_expression = __Pyx_PyObject_AsWritableString(values[1]); if (unlikely((!__pyx_v_name_expression) && PyErr_Occurred())) __PYX_ERR(0, 786, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetLoweredName", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 785, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLoweredName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_40nvrtcGetLoweredName(__pyx_self, __pyx_v_prog, __pyx_v_name_expression); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_40nvrtcGetLoweredName(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, char *__pyx_v_name_expression) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + char const *__pyx_v_lowered_name; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetLoweredName", 0); + + /* "cuda/bindings/nvrtc.pyx":813 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":814 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":813 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":815 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":816 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":815 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":818 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef const char* lowered_name = NULL +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":819 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef const char* lowered_name = NULL + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":820 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef const char* lowered_name = NULL # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) +*/ + __pyx_v_lowered_name = NULL; + + /* "cuda/bindings/nvrtc.pyx":821 + * cyprog = pprog + * cdef const char* lowered_name = NULL + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":822 + * cdef const char* lowered_name = NULL + * with nogil: + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLoweredName(__pyx_v_cyprog, __pyx_v_name_expression, (&__pyx_v_lowered_name)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 822, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":821 + * cyprog = pprog + * cdef const char* lowered_name = NULL + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":823 + * with nogil: + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":824 + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 824, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 824, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":823 + * with nogil: + * err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":825 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_v_lowered_name != NULL); + if (__pyx_t_1) { + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_lowered_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(((PyObject*)__pyx_t_2)); + __pyx_t_3 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_3 = Py_None; + } + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 825, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 825, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":785 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLoweredName(prog, char* name_expression): + * """ 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. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetLoweredName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":827 + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSize(): + * """ retrieve the current size of the PCH Heap. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_43nvrtcGetPCHHeapSize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_42nvrtcGetPCHHeapSize, "nvrtcGetPCHHeapSize()\n\nretrieve the current size of the PCH Heap.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`\nret : int\n pointer to location where the size of the PCH Heap will be stored"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_43nvrtcGetPCHHeapSize = {"nvrtcGetPCHHeapSize", (PyCFunction)__pyx_pw_4cuda_8bindings_5nvrtc_43nvrtcGetPCHHeapSize, METH_NOARGS, __pyx_doc_4cuda_8bindings_5nvrtc_42nvrtcGetPCHHeapSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_43nvrtcGetPCHHeapSize(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetPCHHeapSize (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_42nvrtcGetPCHHeapSize(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_42nvrtcGetPCHHeapSize(CYTHON_UNUSED PyObject *__pyx_self) { + size_t __pyx_v_ret; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvrtcResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetPCHHeapSize", 0); + + /* "cuda/bindings/nvrtc.pyx":839 + * pointer to location where the size of the PCH Heap will be stored + * """ + * cdef size_t ret = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) +*/ + __pyx_v_ret = 0; + + /* "cuda/bindings/nvrtc.pyx":840 + * """ + * cdef size_t ret = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":841 + * cdef size_t ret = 0 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSize((&__pyx_v_ret)); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 841, __pyx_L4_error) + __pyx_v_err = __pyx_t_1; + } + + /* "cuda/bindings/nvrtc.pyx":840 + * """ + * cdef size_t ret = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvrtc.pyx":842 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ret) +*/ + __pyx_t_2 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":843 + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], ret) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 843, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 843, __pyx_L1_error); + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":842 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ret) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":844 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], ret) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyLong_FromSize_t(__pyx_v_ret); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 844, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 844, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":827 + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSize(): + * """ retrieve the current size of the PCH Heap. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":846 + * return (_dict_nvrtcResult[err], ret) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetPCHHeapSize(size_t size): + * """ set the size of the PCH Heap. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_45nvrtcSetPCHHeapSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_44nvrtcSetPCHHeapSize, "nvrtcSetPCHHeapSize(size_t size)\n\nset the size of the PCH Heap.\n\nThe requested size may be rounded up to a platform dependent alignment\n(e.g. page size). If the PCH Heap has already been allocated, the heap\nmemory will be freed and a new PCH Heap will be allocated.\n\nParameters\n----------\nsize : size_t\n requested size of the PCH Heap, in bytes\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_45nvrtcSetPCHHeapSize = {"nvrtcSetPCHHeapSize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_45nvrtcSetPCHHeapSize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_44nvrtcSetPCHHeapSize}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_45nvrtcSetPCHHeapSize(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + size_t __pyx_v_size; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcSetPCHHeapSize (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 846, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 846, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcSetPCHHeapSize", 0) < (0)) __PYX_ERR(0, 846, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcSetPCHHeapSize", 1, 1, 1, i); __PYX_ERR(0, 846, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 846, __pyx_L3_error) + } + __pyx_v_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcSetPCHHeapSize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 846, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcSetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_44nvrtcSetPCHHeapSize(__pyx_self, __pyx_v_size); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_44nvrtcSetPCHHeapSize(CYTHON_UNUSED PyObject *__pyx_self, size_t __pyx_v_size) { + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvrtcResult __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcSetPCHHeapSize", 0); + + /* "cuda/bindings/nvrtc.pyx":864 + * - :py:obj:`~.NVRTC_SUCCESS` + * """ + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcSetPCHHeapSize(size) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":865 + * """ + * with nogil: + * err = cynvrtc.nvrtcSetPCHHeapSize(size) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetPCHHeapSize(__pyx_v_size); if (unlikely(__pyx_t_1 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 865, __pyx_L4_error) + __pyx_v_err = __pyx_t_1; + } + + /* "cuda/bindings/nvrtc.pyx":864 + * - :py:obj:`~.NVRTC_SUCCESS` + * """ + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcSetPCHHeapSize(size) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvrtc.pyx":866 + * with nogil: + * err = cynvrtc.nvrtcSetPCHHeapSize(size) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 866, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":846 + * return (_dict_nvrtcResult[err], ret) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetPCHHeapSize(size_t size): + * """ set the size of the PCH Heap. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcSetPCHHeapSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":868 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHCreateStatus(prog): + * """ returns the PCH creation status. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_47nvrtcGetPCHCreateStatus(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_46nvrtcGetPCHCreateStatus, "nvrtcGetPCHCreateStatus(prog)\n\nreturns the PCH creation status.\n\nNVRTC_SUCCESS indicates that the PCH was successfully created.\nNVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation was\nattempted, either because PCH functionality was not requested during\nthe preceding nvrtcCompileProgram call, or automatic PCH processing was\nrequested, and compiler chose not to create a PCH file.\nNVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could\npotentially have been created, but the compiler ran out space in the\nPCH heap. In this scenario, the\n:py:obj:`~.nvrtcGetPCHHeapSizeRequired()` can be used to query the\nrequired heap size, the heap can be reallocated for this size with\n:py:obj:`~.nvrtcSetPCHHeapSize()` and PCH creation may be reattempted\nagain invoking :py:obj:`~.nvrtcCompileProgram()` with a new NVRTC\nprogram instance. NVRTC_ERROR_PCH_CREATE indicates that an error\ncondition prevented the PCH file from being created.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED`\n - :py:obj:`~.NVRTC_ERROR_PCH_CREATE`\n - :py:obj:`~.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_47nvrtcGetPCHCreateStatus = {"nvrtcGetPCHCreateStatus", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_47nvrtcGetPCHCreateStatus, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_46nvrtcGetPCHCreateStatus}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_47nvrtcGetPCHCreateStatus(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetPCHCreateStatus (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 868, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 868, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetPCHCreateStatus", 0) < (0)) __PYX_ERR(0, 868, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetPCHCreateStatus", 1, 1, 1, i); __PYX_ERR(0, 868, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 868, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetPCHCreateStatus", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 868, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPCHCreateStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_46nvrtcGetPCHCreateStatus(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_46nvrtcGetPCHCreateStatus(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetPCHCreateStatus", 0); + + /* "cuda/bindings/nvrtc.pyx":902 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":903 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":902 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":904 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":905 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":904 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":907 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * with nogil: +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 907, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":908 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":909 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":910 + * cyprog = pprog + * with nogil: + * err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHCreateStatus(__pyx_v_cyprog); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 910, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":909 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":911 + * with nogil: + * err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 911, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":868 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHCreateStatus(prog): + * """ returns the PCH creation status. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPCHCreateStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":913 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSizeRequired(prog): + * """ retrieve the required size of the PCH heap required to compile the given program. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_49nvrtcGetPCHHeapSizeRequired(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_48nvrtcGetPCHHeapSizeRequired, "nvrtcGetPCHHeapSizeRequired(prog)\n\nretrieve the required size of the PCH heap required to compile the given program.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` The size retrieved using this function is only valid if :py:obj:`~.nvrtcGetPCHCreateStatus()` returned NVRTC_SUCCESS or NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED\nsize : int\n pointer to location where the required size of the PCH Heap will be\n stored"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_49nvrtcGetPCHHeapSizeRequired = {"nvrtcGetPCHHeapSizeRequired", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_49nvrtcGetPCHHeapSizeRequired, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_48nvrtcGetPCHHeapSizeRequired}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_49nvrtcGetPCHHeapSizeRequired(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcGetPCHHeapSizeRequired (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 913, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 913, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcGetPCHHeapSizeRequired", 0) < (0)) __PYX_ERR(0, 913, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcGetPCHHeapSizeRequired", 1, 1, 1, i); __PYX_ERR(0, 913, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 913, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcGetPCHHeapSizeRequired", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 913, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPCHHeapSizeRequired", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_48nvrtcGetPCHHeapSizeRequired(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_48nvrtcGetPCHHeapSizeRequired(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + size_t __pyx_v_size; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcGetPCHHeapSizeRequired", 0); + + /* "cuda/bindings/nvrtc.pyx":933 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":934 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":933 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":935 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":936 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":935 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":938 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cdef size_t size = 0 +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 938, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":939 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cdef size_t size = 0 + * with nogil: +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":940 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cdef size_t size = 0 # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) +*/ + __pyx_v_size = 0; + + /* "cuda/bindings/nvrtc.pyx":941 + * cyprog = pprog + * cdef size_t size = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":942 + * cdef size_t size = 0 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) # <<<<<<<<<<<<<< + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSizeRequired(__pyx_v_cyprog, (&__pyx_v_size)); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 942, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":941 + * cyprog = pprog + * cdef size_t size = 0 + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + * if err != cynvrtc.NVRTC_SUCCESS: +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":943 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], size) +*/ + __pyx_t_1 = (__pyx_v_err != NVRTC_SUCCESS); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":944 + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], size) + * +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 944, __pyx_L1_error); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 944, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":943 + * with nogil: + * err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + * if err != cynvrtc.NVRTC_SUCCESS: # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], size) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":945 + * if err != cynvrtc.NVRTC_SUCCESS: + * return (_dict_nvrtcResult[err], None) + * return (_dict_nvrtcResult[err], size) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyLong_FromSize_t(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 945, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 945, __pyx_L1_error); + __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":913 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSizeRequired(prog): + * """ retrieve the required size of the PCH heap required to compile the given program. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcGetPCHHeapSizeRequired", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":947 + * return (_dict_nvrtcResult[err], size) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetFlowCallback(prog, callback, payload): + * """ 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. +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_51nvrtcSetFlowCallback(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_50nvrtcSetFlowCallback, "nvrtcSetFlowCallback(prog, callback, payload)\n\nnvrtcSetFlowCallback 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.\n\nThe callback function must satisfy the following constraints:\n\n(1) Its signature should be:\n\n**View CUDA Toolkit Documentation for a C++ code example**\n\nWhen invoking the callback, the compiler will always pass `payload` to\nparam1 so that the callback may make decisions based on `payload` .\nIt'll always pass NULL to param2 for now which is reserved for future\nextensions.\n\n(2) It must return 1 to cancel compilation or 0 to continue. Other\nreturn values are reserved for future use.\n\n(3) It must return consistent values. Once it returns 1 at one point,\nit must return 1 in all following invocations during the current\nnvrtcCompileProgram call in progress.\n\n(4) It must be thread-safe.\n\n(5) It must not invoke any nvrtc/libnvvm/ptx APIs.\n\nParameters\n----------\nprog : :py:obj:`~.nvrtcProgram`\n CUDA Runtime Compilation program.\ncallback : Any\n the callback that issues cancellation signal.\npayload : Any\n to be passed as a parameter when invoking the callback.\n\nReturns\n-------\nnvrtcResult\n - :py:obj:`~.NVRTC_SUCCESS`\n - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM`\n - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_51nvrtcSetFlowCallback = {"nvrtcSetFlowCallback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_51nvrtcSetFlowCallback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_50nvrtcSetFlowCallback}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_51nvrtcSetFlowCallback(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_prog = 0; + PyObject *__pyx_v_callback = 0; + PyObject *__pyx_v_payload = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("nvrtcSetFlowCallback (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_payload,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 947, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 947, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "nvrtcSetFlowCallback", 0) < (0)) __PYX_ERR(0, 947, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("nvrtcSetFlowCallback", 1, 3, 3, i); __PYX_ERR(0, 947, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 947, __pyx_L3_error) + } + __pyx_v_prog = values[0]; + __pyx_v_callback = values[1]; + __pyx_v_payload = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("nvrtcSetFlowCallback", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 947, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcSetFlowCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_50nvrtcSetFlowCallback(__pyx_self, __pyx_v_prog, __pyx_v_callback, __pyx_v_payload); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_50nvrtcSetFlowCallback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_prog, PyObject *__pyx_v_callback, PyObject *__pyx_v_payload) { + nvrtcProgram __pyx_v_cyprog; + PyObject *__pyx_v_pprog = NULL; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_cycallback = NULL; + void *__pyx_v_cycallback_ptr; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *__pyx_v_cypayload = NULL; + void *__pyx_v_cypayload_ptr; + nvrtcResult __pyx_v_err; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + size_t __pyx_t_5; + __pyx_t_4cuda_8bindings_5nvrtc_void_ptr __pyx_t_6; + nvrtcResult __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("nvrtcSetFlowCallback", 0); + + /* "cuda/bindings/nvrtc.pyx":990 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + __pyx_t_1 = (__pyx_v_prog == Py_None); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":991 + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: + * pprog = 0 # <<<<<<<<<<<<<< + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) +*/ + __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); + __pyx_v_pprog = __pyx_mstate_global->__pyx_int_0; + + /* "cuda/bindings/nvrtc.pyx":990 + * """ + * cdef cynvrtc.nvrtcProgram cyprog + * if prog is None: # <<<<<<<<<<<<<< + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":992 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_prog, __pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + if (__pyx_t_1) { + + /* "cuda/bindings/nvrtc.pyx":993 + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): + * pprog = int(prog) # <<<<<<<<<<<<<< + * else: + * pprog = int(nvrtcProgram(prog)) +*/ + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_prog); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 993, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_pprog = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":992 + * if prog is None: + * pprog = 0 + * elif isinstance(prog, (nvrtcProgram,)): # <<<<<<<<<<<<<< + * pprog = int(prog) + * else: +*/ + goto __pyx_L3; + } + + /* "cuda/bindings/nvrtc.pyx":995 + * pprog = int(prog) + * else: + * pprog = int(nvrtcProgram(prog)) # <<<<<<<<<<<<<< + * cyprog = pprog + * cycallback = _HelperInputVoidPtr(callback) +*/ + /*else*/ { + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_prog}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_2); + } + __pyx_t_4 = __Pyx_PyNumber_Int(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 995, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF((PyObject *)__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_pprog = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "cuda/bindings/nvrtc.pyx":996 + * else: + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog # <<<<<<<<<<<<<< + * cycallback = _HelperInputVoidPtr(callback) + * cdef void* cycallback_ptr = cycallback.cptr +*/ + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_v_pprog); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 996, __pyx_L1_error) + __pyx_v_cyprog = ((nvrtcProgram)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":997 + * pprog = int(nvrtcProgram(prog)) + * cyprog = pprog + * cycallback = _HelperInputVoidPtr(callback) # <<<<<<<<<<<<<< + * cdef void* cycallback_ptr = cycallback.cptr + * cypayload = _HelperInputVoidPtr(payload) +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_callback}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_v_cycallback = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/nvrtc.pyx":998 + * cyprog = pprog + * cycallback = _HelperInputVoidPtr(callback) + * cdef void* cycallback_ptr = cycallback.cptr # <<<<<<<<<<<<<< + * cypayload = _HelperInputVoidPtr(payload) + * cdef void* cypayload_ptr = cypayload.cptr +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cycallback), __pyx_mstate_global->__pyx_n_u_cptr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 998, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_cycallback_ptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":999 + * cycallback = _HelperInputVoidPtr(callback) + * cdef void* cycallback_ptr = cycallback.cptr + * cypayload = _HelperInputVoidPtr(payload) # <<<<<<<<<<<<<< + * cdef void* cypayload_ptr = cypayload.cptr + * with nogil: +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr); + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_payload}; + __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_4); + } + __pyx_v_cypayload = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "cuda/bindings/nvrtc.pyx":1000 + * cdef void* cycallback_ptr = cycallback.cptr + * cypayload = _HelperInputVoidPtr(payload) + * cdef void* cypayload_ptr = cypayload.cptr # <<<<<<<<<<<<<< + * with nogil: + * err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) +*/ + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cypayload), __pyx_mstate_global->__pyx_n_u_cptr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1000, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1000, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_cypayload_ptr = ((void *)((__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)__pyx_t_6)); + + /* "cuda/bindings/nvrtc.pyx":1001 + * cypayload = _HelperInputVoidPtr(payload) + * cdef void* cypayload_ptr = cypayload.cptr + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) + * return (_dict_nvrtcResult[err],) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvrtc.pyx":1002 + * cdef void* cypayload_ptr = cypayload.cptr + * with nogil: + * err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) # <<<<<<<<<<<<<< + * return (_dict_nvrtcResult[err],) + * +*/ + __pyx_t_7 = __pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetFlowCallback(__pyx_v_cyprog, __pyx_v_cycallback_ptr, __pyx_v_cypayload_ptr); if (unlikely(__pyx_t_7 == ((nvrtcResult)NVRTC_ERROR_INVALID_INPUT) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1002, __pyx_L5_error) + __pyx_v_err = __pyx_t_7; + } + + /* "cuda/bindings/nvrtc.pyx":1001 + * cypayload = _HelperInputVoidPtr(payload) + * cdef void* cypayload_ptr = cypayload.cptr + * with nogil: # <<<<<<<<<<<<<< + * err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) + * return (_dict_nvrtcResult[err],) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvrtc.pyx":1003 + * with nogil: + * err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) + * return (_dict_nvrtcResult[err],) # <<<<<<<<<<<<<< + * + * @cython.embedsignature(True) +*/ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyLong_From_nvrtcResult(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1003, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":947 + * return (_dict_nvrtcResult[err], size) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetFlowCallback(prog, callback, payload): + * """ 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. +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("cuda.bindings.nvrtc.nvrtcSetFlowCallback", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_pprog); + __Pyx_XDECREF((PyObject *)__pyx_v_cycallback); + __Pyx_XDECREF((PyObject *)__pyx_v_cypayload); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvrtc.pyx":1005 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def sizeof(objType): + * """ Returns the size of provided CUDA Python structure in bytes +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_53sizeof(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_5nvrtc_52sizeof, "sizeof(objType)\n\nReturns the size of provided CUDA Python structure in bytes\n\nParameters\n----------\nobjType : Any\n CUDA Python object\n\nReturns\n-------\nlowered_name : int\n The size of `objType` in bytes"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_5nvrtc_53sizeof = {"sizeof", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_53sizeof, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_52sizeof}; +static PyObject *__pyx_pw_4cuda_8bindings_5nvrtc_53sizeof(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_objType = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sizeof (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_objType,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1005, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1005, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sizeof", 0) < (0)) __PYX_ERR(0, 1005, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sizeof", 1, 1, 1, i); __PYX_ERR(0, 1005, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1005, __pyx_L3_error) + } + __pyx_v_objType = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("sizeof", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1005, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvrtc.sizeof", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_5nvrtc_52sizeof(__pyx_self, __pyx_v_objType); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_5nvrtc_52sizeof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objType) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + size_t __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sizeof", 0); + + /* "cuda/bindings/nvrtc.pyx":1019 + * The size of `objType` in bytes + * """ + * if objType == nvrtcProgram: # <<<<<<<<<<<<<< + * return sizeof(cynvrtc.nvrtcProgram) + * raise TypeError("Unknown type: " + str(objType)) +*/ + __pyx_t_1 = PyObject_RichCompare(__pyx_v_objType, ((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1019, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "cuda/bindings/nvrtc.pyx":1020 + * """ + * if objType == nvrtcProgram: + * return sizeof(cynvrtc.nvrtcProgram) # <<<<<<<<<<<<<< + * raise TypeError("Unknown type: " + str(objType)) +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyLong_FromSize_t((sizeof(nvrtcProgram))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvrtc.pyx":1019 + * The size of `objType` in bytes + * """ + * if objType == nvrtcProgram: # <<<<<<<<<<<<<< + * return sizeof(cynvrtc.nvrtcProgram) + * raise TypeError("Unknown type: " + str(objType)) +*/ + } + + /* "cuda/bindings/nvrtc.pyx":1021 + * if objType == nvrtcProgram: + * return sizeof(cynvrtc.nvrtcProgram) + * raise TypeError("Unknown type: " + str(objType)) # <<<<<<<<<<<<<< +*/ + __pyx_t_3 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_4 = __pyx_builtin_TypeError; + __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_v_objType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Unknown_type, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 1021, __pyx_L1_error) + + /* "cuda/bindings/nvrtc.pyx":1005 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def sizeof(objType): + * """ Returns the size of provided CUDA Python structure in bytes +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_AddTraceback("cuda.bindings.nvrtc.sizeof", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperKernelParams(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams *)o); + p->_pybuffer.obj = NULL; + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperKernelParams(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperKernelParams) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperKernelParams_ckernelParams(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_13ckernelParams_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperKernelParams[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_5__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperKernelParams_7__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperKernelParams[] = { + {"ckernelParams", __pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperKernelParams_ckernelParams, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperKernelParams}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperKernelParams}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperKernelParams}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperKernelParams}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams_spec = { + "cuda.bindings.nvrtc._HelperKernelParams", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperKernelParams", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperKernelParams), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperKernelParams, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperKernelParams, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperKernelParams, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperKernelParams, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperInputVoidPtr(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr *)o); + p->_pybuffer.obj = NULL; + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperInputVoidPtr(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperInputVoidPtr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperInputVoidPtr[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperInputVoidPtr[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperInputVoidPtr}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperInputVoidPtr}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperInputVoidPtr}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperInputVoidPtr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr_spec = { + "cuda.bindings.nvrtc._HelperInputVoidPtr", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperInputVoidPtr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperInputVoidPtr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperInputVoidPtr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperInputVoidPtr, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperInputVoidPtr, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperInputVoidPtr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)o); + p->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->_cuuint64_t_val); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_cuuint64_t_val) { + e = (*v)(((PyObject *)p->_cuuint64_t_val), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute *)o; + tmp = ((PyObject*)p->_cuuint64_t_val); + p->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute[] = { + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_4pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_6__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_8__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute_spec = { + "cuda.bindings.nvrtc._HelperCUmemPool_attribute", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUmemPool_attribute", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute[] = { + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_4pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_6__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_8__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute_spec = { + "cuda.bindings.nvrtc._HelperCUmem_range_attribute", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUmem_range_attribute", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)o); + p->_ctx = ((struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *)Py_None); Py_INCREF(Py_None); + p->_devptr = ((struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *)Py_None); Py_INCREF(Py_None); + p->_token = ((struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *)Py_None); Py_INCREF(Py_None); + p->_mempool = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->_ctx); + Py_CLEAR(p->_devptr); + Py_CLEAR(p->_token); + Py_CLEAR(p->_mempool); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_ctx) { + e = (*v)(((PyObject *)p->_ctx), a); if (e) return e; + } + if (p->_devptr) { + e = (*v)(((PyObject *)p->_devptr), a); if (e) return e; + } + if (p->_token) { + e = (*v)(((PyObject *)p->_token), a); if (e) return e; + } + if (p->_mempool) { + e = (*v)(((PyObject *)p->_mempool), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute *)o; + tmp = ((PyObject*)p->_ctx); + p->_ctx = ((struct __pyx_obj_4cuda_8bindings_6driver_CUcontext *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_devptr); + p->_devptr = ((struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_token); + p->_token = ((struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_mempool); + p->_mempool = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute[] = { + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_4pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_6__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_8__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute_spec = { + "cuda.bindings.nvrtc._HelperCUpointer_attribute", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUpointer_attribute", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)o); + p->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->_cuuint64_t_val); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_cuuint64_t_val) { + e = (*v)(((PyObject *)p->_cuuint64_t_val), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute *)o; + tmp = ((PyObject*)p->_cuuint64_t_val); + p->_cuuint64_t_val = ((struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute[] = { + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_4pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_6__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_8__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute_spec = { + "cuda.bindings.nvrtc._HelperCUgraphMem_attribute", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUgraphMem_attribute", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUjit_option(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)o); + __Pyx_default_placement_construct(&(p->_charstarstar)); + p->_voidstarstar = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUjit_option(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUjit_option) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + __Pyx_call_destructor(p->_charstarstar); + Py_CLEAR(p->_voidstarstar); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUjit_option(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_voidstarstar) { + e = (*v)(((PyObject *)p->_voidstarstar), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUjit_option(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option *)o; + tmp = ((PyObject*)p->_voidstarstar); + p->_voidstarstar = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUjit_option[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUjit_option[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUjit_option}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option_spec = { + "cuda.bindings.nvrtc._HelperCUjit_option", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUjit_option", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUjit_option), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUjit_option, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaJitOption(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaJitOption(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaJitOption) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaJitOption[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaJitOption[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaJitOption}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaJitOption}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaJitOption}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaJitOption}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption_spec = { + "cuda.bindings.nvrtc._HelperCudaJitOption", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCudaJitOption", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaJitOption), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaJitOption, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaJitOption, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaJitOption, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaJitOption, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUlibraryOption(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUlibraryOption(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUlibraryOption) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUlibraryOption[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUlibraryOption[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUlibraryOption}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUlibraryOption}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUlibraryOption}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUlibraryOption}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption_spec = { + "cuda.bindings.nvrtc._HelperCUlibraryOption", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUlibraryOption", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUlibraryOption), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUlibraryOption, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUlibraryOption, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUlibraryOption, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUlibraryOption, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption_spec = { + "cuda.bindings.nvrtc._HelperCudaLibraryOption", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCudaLibraryOption", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType(PyTypeObject *t, PyObject *a, PyObject *k) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *p; + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + p = ((struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)o); + p->_mem_fabric_handle = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->_mem_fabric_handle); + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->_mem_fabric_handle) { + e = (*v)(((PyObject *)p->_mem_fabric_handle), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType *)o; + tmp = ((PyObject*)p->_mem_fabric_handle); + p->_mem_fabric_handle = ((struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType[] = { + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_4pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_6__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_8__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {Py_tp_clear, (void *)__pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType_spec = { + "cuda.bindings.nvrtc._HelperCUmemAllocationHandleType", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUmemAllocationHandleType", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_traverse*/ + __pyx_tp_clear_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper[] = { + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_4__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_6__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper_spec = { + "cuda.bindings.nvrtc._InputVoidPtrPtrHelper", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_InputVoidPtrPtrHelper", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); + __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_3__dealloc__(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); + PyErr_Restore(etype, eval, etb); + } + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_getprop_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_cptr(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4cptr_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings[] = { + {"size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_4size}, + {"pyObj", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_6pyObj}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_8__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_10__setstate_cython__}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings[] = { + {"cptr", __pyx_getprop_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_cptr, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings}, + {Py_tp_getset, (void *)__pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings_spec = { + "cuda.bindings.nvrtc._HelperCUcoredumpSettings", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""_HelperCUcoredumpSettings", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc_nvrtcProgram(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + #endif + if (unlikely(__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc_nvrtcProgram(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc_nvrtcProgram) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif +} + +static PyObject *__pyx_tp_richcompare_4cuda_8bindings_5nvrtc_nvrtcProgram(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_9__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_9__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); + Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyMethodDef __pyx_methods_4cuda_8bindings_5nvrtc_nvrtcProgram[] = { + {"getPtr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_14getPtr}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_16__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_5nvrtc_12nvrtcProgram_18__setstate_cython__}, + {0, 0, 0, 0} +}; +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc_nvrtcProgram}, + {Py_tp_repr, (void *)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_5__repr__}, + {Py_nb_int, (void *)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_13__int__}, + {Py_nb_index, (void *)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_7__index__}, + {Py_tp_hash, (void *)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_11__hash__}, + {Py_tp_doc, (void *)PyDoc_STR("nvrtcProgram(*args, **kwargs)\n\nnvrtcProgram is the unit of compilation, and an opaque handle for a program.\n\nTo compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram.\n\nMethods\n-------\ngetPtr()\n Get memory address of class instance")}, + {Py_tp_richcompare, (void *)__pyx_tp_richcompare_4cuda_8bindings_5nvrtc_nvrtcProgram}, + {Py_tp_methods, (void *)__pyx_methods_4cuda_8bindings_5nvrtc_nvrtcProgram}, + {Py_tp_init, (void *)__pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_3__init__}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc_nvrtcProgram}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram_spec = { + "cuda.bindings.nvrtc.nvrtcProgram", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, + __pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram_slots, +}; +#else + +static PyNumberMethods __pyx_tp_as_number_nvrtcProgram = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_bool*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_13__int__, /*nb_int*/ + 0, /*nb_long (reserved)*/ + 0, /*nb_float*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_7__index__, /*nb_index*/ + 0, /*nb_matrix_multiply*/ + 0, /*nb_inplace_matrix_multiply*/ +}; + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""nvrtcProgram", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc_nvrtcProgram), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc_nvrtcProgram, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_5__repr__, /*tp_repr*/ + &__pyx_tp_as_number_nvrtcProgram, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_11__hash__, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + PyDoc_STR("nvrtcProgram(*args, **kwargs)\n\nnvrtcProgram is the unit of compilation, and an opaque handle for a program.\n\nTo compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram.\n\nMethods\n-------\ngetPtr()\n Get memory address of class instance"), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + __pyx_tp_richcompare_4cuda_8bindings_5nvrtc_nvrtcProgram, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cuda_8bindings_5nvrtc_nvrtcProgram, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + __pyx_pw_4cuda_8bindings_5nvrtc_12nvrtcProgram_3__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc_nvrtcProgram, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr[--__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_k); + Py_CLEAR(p->__pyx_v_v); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr)))) { + __pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr[__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_k) { + e = (*v)(p->__pyx_v_k, a); if (e) return e; + } + if (p->__pyx_v_v) { + e = (*v)(p->__pyx_v_v, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr_spec = { + "cuda.bindings.nvrtc.__pyx_scope_struct__genexpr", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""__pyx_scope_struct__genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr[--__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v__x); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr[__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v__x) { + e = (*v)(p->__pyx_v__x, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr_spec = { + "cuda.bindings.nvrtc.__pyx_scope_struct_1_genexpr", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""__pyx_scope_struct_1_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr[--__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v__x); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr[__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v__x) { + e = (*v)(p->__pyx_v__x, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr_spec = { + "cuda.bindings.nvrtc.__pyx_scope_struct_2_genexpr", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""__pyx_scope_struct_2_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr[--__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v__x); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr[__pyx_mstate_global->__pyx_freecount_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v__x) { + e = (*v)(p->__pyx_v__x, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr_spec = { + "cuda.bindings.nvrtc.__pyx_scope_struct_3_genexpr", + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "cuda.bindings.nvrtc.""__pyx_scope_struct_3_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams)) __PYX_ERR(1, 21, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams) < (0)) __PYX_ERR(1, 21, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams = &__pyx_type_4cuda_8bindings_5nvrtc__HelperKernelParams; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams) < (0)) __PYX_ERR(1, 21, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperKernelParams, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams) < (0)) __PYX_ERR(1, 21, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams) < (0)) __PYX_ERR(1, 21, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr)) __PYX_ERR(1, 130, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr) < (0)) __PYX_ERR(1, 130, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr = &__pyx_type_4cuda_8bindings_5nvrtc__HelperInputVoidPtr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr) < (0)) __PYX_ERR(1, 130, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperInputVoidPtr, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr) < (0)) __PYX_ERR(1, 130, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperInputVoidPtr) < (0)) __PYX_ERR(1, 130, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute)) __PYX_ERR(1, 158, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute) < (0)) __PYX_ERR(1, 158, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute) < (0)) __PYX_ERR(1, 158, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUmemPool_attribute, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute) < (0)) __PYX_ERR(1, 158, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute) < (0)) __PYX_ERR(1, 158, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute)) __PYX_ERR(1, 202, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute) < (0)) __PYX_ERR(1, 202, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute) < (0)) __PYX_ERR(1, 202, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUmem_range_attribute, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute) < (0)) __PYX_ERR(1, 202, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute) < (0)) __PYX_ERR(1, 202, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute)) __PYX_ERR(1, 234, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute) < (0)) __PYX_ERR(1, 234, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute) < (0)) __PYX_ERR(1, 234, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUpointer_attribute, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute) < (0)) __PYX_ERR(1, 234, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute) < (0)) __PYX_ERR(1, 234, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute)) __PYX_ERR(1, 326, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute) < (0)) __PYX_ERR(1, 326, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute) < (0)) __PYX_ERR(1, 326, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUgraphMem_attribute, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute) < (0)) __PYX_ERR(1, 326, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute) < (0)) __PYX_ERR(1, 326, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option)) __PYX_ERR(1, 359, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option) < (0)) __PYX_ERR(1, 359, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUjit_option; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option) < (0)) __PYX_ERR(1, 359, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUjit_option, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option) < (0)) __PYX_ERR(1, 359, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUjit_option) < (0)) __PYX_ERR(1, 359, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption)) __PYX_ERR(1, 420, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption) < (0)) __PYX_ERR(1, 420, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaJitOption; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption) < (0)) __PYX_ERR(1, 420, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCudaJitOption, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption) < (0)) __PYX_ERR(1, 420, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaJitOption) < (0)) __PYX_ERR(1, 420, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption)) __PYX_ERR(1, 462, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption) < (0)) __PYX_ERR(1, 462, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUlibraryOption; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption) < (0)) __PYX_ERR(1, 462, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUlibraryOption, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption) < (0)) __PYX_ERR(1, 462, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUlibraryOption) < (0)) __PYX_ERR(1, 462, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption)) __PYX_ERR(1, 482, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption) < (0)) __PYX_ERR(1, 482, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption) < (0)) __PYX_ERR(1, 482, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCudaLibraryOption, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption) < (0)) __PYX_ERR(1, 482, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCudaLibraryOption) < (0)) __PYX_ERR(1, 482, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType)) __PYX_ERR(1, 502, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType) < (0)) __PYX_ERR(1, 502, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType) < (0)) __PYX_ERR(1, 502, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUmemAllocationHandleType, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType) < (0)) __PYX_ERR(1, 502, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType) < (0)) __PYX_ERR(1, 502, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper)) __PYX_ERR(1, 544, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper) < (0)) __PYX_ERR(1, 544, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper = &__pyx_type_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper) < (0)) __PYX_ERR(1, 544, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_InputVoidPtrPtrHelper, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper) < (0)) __PYX_ERR(1, 544, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__InputVoidPtrPtrHelper) < (0)) __PYX_ERR(1, 544, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings)) __PYX_ERR(1, 557, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings) < (0)) __PYX_ERR(1, 557, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings = &__pyx_type_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings) < (0)) __PYX_ERR(1, 557, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_HelperCUcoredumpSettings, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings) < (0)) __PYX_ERR(1, 557, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings) < (0)) __PYX_ERR(1, 557, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram)) __PYX_ERR(0, 72, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram = &__pyx_type_4cuda_8bindings_5nvrtc_nvrtcProgram; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram->tp_getattro = PyObject_GenericGetAttr; + } + #endif + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_nvrtcProgram_2, (PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr)) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr = &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct__genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 233, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 233, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr = &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 233, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_1_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 236, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 236, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr = &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 236, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_2_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 313, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr = &__pyx_type_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_4cuda_8bindings_5nvrtc___pyx_scope_struct_3_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings.driver"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperKernelParams = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperKernelParams", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperKernelParams), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperKernelParams) __PYX_ERR(3, 9, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperInputVoidPtr = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperInputVoidPtr", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperInputVoidPtr), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperInputVoidPtr) __PYX_ERR(3, 17, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemPool_attribute = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUmemPool_attribute", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemPool_attribute), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemPool_attribute) __PYX_ERR(3, 22, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmem_range_attribute = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUmem_range_attribute", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmem_range_attribute), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmem_range_attribute) __PYX_ERR(3, 31, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUpointer_attribute = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUpointer_attribute", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUpointer_attribute), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUpointer_attribute) __PYX_ERR(3, 40, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUgraphMem_attribute = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUgraphMem_attribute", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUgraphMem_attribute), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUgraphMem_attribute) __PYX_ERR(3, 56, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUjit_option = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUjit_option", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUjit_option), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUjit_option) __PYX_ERR(3, 64, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaJitOption = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCudaJitOption", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaJitOption), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaJitOption) __PYX_ERR(3, 79, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUlibraryOption = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUlibraryOption", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUlibraryOption), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUlibraryOption) __PYX_ERR(3, 91, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaLibraryOption = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCudaLibraryOption", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCudaLibraryOption), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCudaLibraryOption) __PYX_ERR(3, 98, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUmemAllocationHandleType", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUmemAllocationHandleType) __PYX_ERR(3, 105, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__InputVoidPtrPtrHelper = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_InputVoidPtrPtrHelper", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__InputVoidPtrPtrHelper), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__InputVoidPtrPtrHelper) __PYX_ERR(3, 115, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUcoredumpSettings = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "_HelperCUcoredumpSettings", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver__HelperCUcoredumpSettings), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver__HelperCUcoredumpSettings) __PYX_ERR(3, 118, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcontext = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcontext", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcontext), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcontext) __PYX_ERR(4, 9, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmodule = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmodule", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmodule), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmodule) __PYX_ERR(4, 23, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUfunction = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUfunction", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUfunction), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUfunction) __PYX_ERR(4, 37, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibrary = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlibrary", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibrary), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibrary) __PYX_ERR(4, 51, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernel = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUkernel", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernel), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernel) __PYX_ERR(4, 65, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarray = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUarray", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarray), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarray) __PYX_ERR(4, 79, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmipmappedArray = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmipmappedArray", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmipmappedArray), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmipmappedArray) __PYX_ERR(4, 93, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexref = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUtexref", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexref), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexref) __PYX_ERR(4, 107, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfref = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUsurfref", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfref), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfref) __PYX_ERR(4, 121, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUevent = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUevent", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUevent), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUevent) __PYX_ERR(4, 135, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstream = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstream", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstream), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstream) __PYX_ERR(4, 149, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphicsResource = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphicsResource", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphicsResource), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphicsResource) __PYX_ERR(4, 163, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexternalMemory = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexternalMemory", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalMemory), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexternalMemory) __PYX_ERR(4, 177, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexternalSemaphore = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexternalSemaphore", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexternalSemaphore), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexternalSemaphore) __PYX_ERR(4, 191, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraph = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraph", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraph), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraph) __PYX_ERR(4, 205, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNode = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNode) __PYX_ERR(4, 219, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExec = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphExec", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExec), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExec) __PYX_ERR(4, 233, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemoryPool", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemoryPool), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemoryPool) __PYX_ERR(4, 247, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuserObject = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUuserObject", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuserObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuserObject) __PYX_ERR(4, 261, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphDeviceNode = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphDeviceNode", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphDeviceNode), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphDeviceNode) __PYX_ERR(4, 275, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallbackHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUasyncCallbackHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallbackHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallbackHandle) __PYX_ERR(4, 289, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgreenCtx = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgreenCtx", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgreenCtx), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgreenCtx) __PYX_ERR(4, 303, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlinkState = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlinkState", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlinkState), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlinkState) __PYX_ERR(4, 317, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResourceDesc = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevResourceDesc", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResourceDesc), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResourceDesc) __PYX_ERR(4, 330, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallbackHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlogsCallbackHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallbackHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallbackHandle) __PYX_ERR(4, 344, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglStreamConnection = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUeglStreamConnection", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglStreamConnection), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglStreamConnection) __PYX_ERR(4, 356, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLImageKHR = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "EGLImageKHR", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLImageKHR), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLImageKHR) __PYX_ERR(4, 370, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLStreamKHR = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "EGLStreamKHR", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLStreamKHR), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLStreamKHR) __PYX_ERR(4, 382, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLSyncKHR = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "EGLSyncKHR", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLSyncKHR), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLSyncKHR) __PYX_ERR(4, 394, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallback = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUasyncCallback", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncCallback), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncCallback) __PYX_ERR(4, 406, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUhostFn = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUhostFn", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUhostFn), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUhostFn) __PYX_ERR(4, 418, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamCallback = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamCallback", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamCallback), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamCallback) __PYX_ERR(4, 430, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoccupancyB2DSize = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUoccupancyB2DSize", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoccupancyB2DSize), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoccupancyB2DSize) __PYX_ERR(4, 442, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallback = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlogsCallback", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogsCallback), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogsCallback) __PYX_ERR(4, 454, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuuid_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUuuid_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuuid_st) __PYX_ERR(4, 466, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemFabricHandle_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_st) __PYX_ERR(4, 481, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcEventHandle_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_st) __PYX_ERR(4, 501, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcMemHandle_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_st) __PYX_ERR(4, 518, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamMemOpWaitValueParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWaitValueParams_st) __PYX_ERR(4, 535, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamMemOpWriteValueParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpWriteValueParams_st) __PYX_ERR(4, 563, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamMemOpFlushRemoteWritesParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpFlushRemoteWritesParams_st) __PYX_ERR(4, 591, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamMemOpMemoryBarrierParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamMemOpMemoryBarrierParams_st) __PYX_ERR(4, 607, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamBatchMemOpParams_union", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_union) __PYX_ERR(4, 623, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st) __PYX_ERR(4, 654, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st) __PYX_ERR(4, 678, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct0 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct0", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct0), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct0) __PYX_ERR(4, 704, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union2) __PYX_ERR(4, 718, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUasyncNotificationInfo_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo_st) __PYX_ERR(4, 733, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevprop_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_st) __PYX_ERR(4, 754, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUaccessPolicyWindow_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_st) __PYX_ERR(4, 789, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_st) __PYX_ERR(4, 826, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2_st) __PYX_ERR(4, 863, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_v3_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3_st) __PYX_ERR(4, 908, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMSET_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_st) __PYX_ERR(4, 953, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMSET_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2_st) __PYX_ERR(4, 981, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_HOST_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_st) __PYX_ERR(4, 1012, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_HOST_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2_st) __PYX_ERR(4, 1032, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_CONDITIONAL_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CONDITIONAL_NODE_PARAMS) __PYX_ERR(4, 1052, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphEdgeData_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData_st) __PYX_ERR(4, 1100, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_GRAPH_INSTANTIATE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS_st) __PYX_ERR(4, 1142, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchMemSyncDomainMap_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap_st) __PYX_ERR(4, 1168, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct1) __PYX_ERR(4, 1193, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct2) __PYX_ERR(4, 1211, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct3 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct3", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct3), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct3) __PYX_ERR(4, 1230, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct4 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct4", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct4), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct4) __PYX_ERR(4, 1247, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct5 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct5", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct5), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct5) __PYX_ERR(4, 1265, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue_union = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchAttributeValue_union", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue_union), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue_union) __PYX_ERR(4, 1282, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchAttribute_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute_st) __PYX_ERR(4, 1375, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchConfig_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig_st) __PYX_ERR(4, 1395, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinitySmCount_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_st) __PYX_ERR(4, 1433, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union3 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union3", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union3), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union3) __PYX_ERR(4, 1450, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinityParam_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_st) __PYX_ERR(4, 1465, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUctxCigParam_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam_st) __PYX_ERR(4, 1485, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUctxCreateParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams_st) __PYX_ERR(4, 1504, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlibraryHostUniversalFunctionAndDataTable_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable_st) __PYX_ERR(4, 1530, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY2D_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_st) __PYX_ERR(4, 1551, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_st) __PYX_ERR(4, 1602, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_PEER_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_st) __PYX_ERR(4, 1672, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS_st) __PYX_ERR(4, 1745, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_DESCRIPTOR_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_st) __PYX_ERR(4, 1770, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY3D_DESCRIPTOR_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_st) __PYX_ERR(4, 1793, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct6 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct6", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct6), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct6) __PYX_ERR(4, 1820, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_SPARSE_PROPERTIES_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_st) __PYX_ERR(4, 1838, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_MEMORY_REQUIREMENTS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_st) __PYX_ERR(4, 1865, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct7 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct7", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct7), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct7) __PYX_ERR(4, 1886, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct8 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct8", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct8), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct8) __PYX_ERR(4, 1901, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct9 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct9", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct9), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct9) __PYX_ERR(4, 1916, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct10 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct10", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct10), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct10) __PYX_ERR(4, 1937, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct11 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct11", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct11), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct11) __PYX_ERR(4, 1962, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union4 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union4", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union4), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union4) __PYX_ERR(4, 1976, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_st) __PYX_ERR(4, 2003, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_TEXTURE_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_st) __PYX_ERR(4, 2025, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_VIEW_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_st) __PYX_ERR(4, 2060, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUtensorMap_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap_st) __PYX_ERR(4, 2093, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st) __PYX_ERR(4, 2111, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_LAUNCH_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_st) __PYX_ERR(4, 2130, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct12 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct12", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct12), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct12) __PYX_ERR(4, 2168, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union5 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union5", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union5), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union5) __PYX_ERR(4, 2184, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st) __PYX_ERR(4, 2203, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st) __PYX_ERR(4, 2229, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st) __PYX_ERR(4, 2252, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct13 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct13", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct13), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct13) __PYX_ERR(4, 2277, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union6 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union6", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union6), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union6) __PYX_ERR(4, 2293, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st) __PYX_ERR(4, 2312, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct14 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct14", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct14), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct14) __PYX_ERR(4, 2336, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union7 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union7", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union7), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union7) __PYX_ERR(4, 2350, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct15 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct15", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct15), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct15) __PYX_ERR(4, 2366, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct16 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct16", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct16), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct16) __PYX_ERR(4, 2380, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st) __PYX_ERR(4, 2403, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct17 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct17", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct17), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct17) __PYX_ERR(4, 2432, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union8 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union8", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union8), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union8) __PYX_ERR(4, 2446, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct18 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct18", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct18), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct18) __PYX_ERR(4, 2462, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct19 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct19", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct19), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct19) __PYX_ERR(4, 2478, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st) __PYX_ERR(4, 2501, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st) __PYX_ERR(4, 2530, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st) __PYX_ERR(4, 2556, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_WAIT_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_st) __PYX_ERR(4, 2582, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st) __PYX_ERR(4, 2608, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union9 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union9", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union9), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union9) __PYX_ERR(4, 2634, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct20 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct20", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct20), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct20) __PYX_ERR(4, 2652, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct21 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct21", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct21), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct21) __PYX_ERR(4, 2680, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union10 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union10", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union10), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union10) __PYX_ERR(4, 2698, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union11 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union11", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union11), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union11) __PYX_ERR(4, 2716, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUarrayMapInfo_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_st) __PYX_ERR(4, 2731, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemLocation_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_st) __PYX_ERR(4, 2772, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct22 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct22", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct22), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct22) __PYX_ERR(4, 2791, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAllocationProp_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_st) __PYX_ERR(4, 2811, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmulticastObjectProp_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_st) __PYX_ERR(4, 2842, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAccessDesc_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_st) __PYX_ERR(4, 2868, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphExecUpdateResultInfo_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_st) __PYX_ERR(4, 2888, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolProps_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_st) __PYX_ERR(4, 2914, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolPtrExportData_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_st) __PYX_ERR(4, 2950, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpyAttributes_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_st) __PYX_ERR(4, 2967, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUoffset3D_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_st) __PYX_ERR(4, 2996, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUextent3D_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_st) __PYX_ERR(4, 3017, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct23 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct23", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct23), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct23) __PYX_ERR(4, 3038, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct24 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_struct24", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_struct24), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_struct24) __PYX_ERR(4, 3060, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union12 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union12", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union12), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union12) __PYX_ERR(4, 3078, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpy3DOperand_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_st) __PYX_ERR(4, 3096, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_BATCH_OP_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_st) __PYX_ERR(4, 3116, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_ALLOC_NODE_PARAMS_v1_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1_st) __PYX_ERR(4, 3143, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_ALLOC_NODE_PARAMS_v2_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2_st) __PYX_ERR(4, 3176, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_FREE_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS_st) __PYX_ERR(4, 3209, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_CHILD_GRAPH_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS_st) __PYX_ERR(4, 3227, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EVENT_RECORD_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS_st) __PYX_ERR(4, 3251, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EVENT_WAIT_NODE_PARAMS_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS_st) __PYX_ERR(4, 3269, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphNodeParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams_st) __PYX_ERR(4, 3287, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointLockArgs_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs_st) __PYX_ERR(4, 3349, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointCheckpointArgs_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs_st) __PYX_ERR(4, 3371, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointRestoreArgs_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs_st) __PYX_ERR(4, 3388, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointUnlockArgs_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs_st) __PYX_ERR(4, 3405, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemDecompressParams_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams_st) __PYX_ERR(4, 3422, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevSmResource_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource_st) __PYX_ERR(4, 3461, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevResource_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_st) __PYX_ERR(4, 3477, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union15 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "anon_union15", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_anon_union15), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_anon_union15) __PYX_ERR(4, 3499, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_st = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUeglFrame_st", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_st), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_st) __PYX_ERR(4, 3515, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdeviceptr", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr) __PYX_ERR(4, 3553, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevice = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevice", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevice) __PYX_ERR(4, 3567, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUtexObject", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject) __PYX_ERR(4, 3581, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUsurfObject", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject) __PYX_ERR(4, 3595, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphConditionalHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphConditionalHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphConditionalHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphConditionalHandle) __PYX_ERR(4, 3609, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuuid = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUuuid", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUuuid), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUuuid) __PYX_ERR(4, 3621, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemFabricHandle_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle_v1) __PYX_ERR(4, 3635, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemFabricHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemFabricHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemFabricHandle) __PYX_ERR(4, 3654, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcEventHandle_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle_v1) __PYX_ERR(4, 3673, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcEventHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcEventHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcEventHandle) __PYX_ERR(4, 3689, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcMemHandle_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle_v1) __PYX_ERR(4, 3705, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUipcMemHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUipcMemHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUipcMemHandle) __PYX_ERR(4, 3721, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamBatchMemOpParams_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams_v1) __PYX_ERR(4, 3737, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamBatchMemOpParams", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamBatchMemOpParams), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamBatchMemOpParams) __PYX_ERR(4, 3763, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_BATCH_MEM_OP_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v1) __PYX_ERR(4, 3789, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_BATCH_MEM_OP_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS) __PYX_ERR(4, 3809, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_BATCH_MEM_OP_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_BATCH_MEM_OP_NODE_PARAMS_v2) __PYX_ERR(4, 3829, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUasyncNotificationInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUasyncNotificationInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUasyncNotificationInfo) __PYX_ERR(4, 3851, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevprop_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop_v1) __PYX_ERR(4, 3870, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevprop", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevprop), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevprop) __PYX_ERR(4, 3904, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUaccessPolicyWindow_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow_v1) __PYX_ERR(4, 3938, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUaccessPolicyWindow", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUaccessPolicyWindow), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUaccessPolicyWindow) __PYX_ERR(4, 3974, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v1) __PYX_ERR(4, 4010, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v2) __PYX_ERR(4, 4044, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS) __PYX_ERR(4, 4084, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_KERNEL_NODE_PARAMS_v3", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_KERNEL_NODE_PARAMS_v3) __PYX_ERR(4, 4124, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMSET_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v1) __PYX_ERR(4, 4164, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMSET_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS) __PYX_ERR(4, 4190, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMSET_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMSET_NODE_PARAMS_v2) __PYX_ERR(4, 4216, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_HOST_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v1) __PYX_ERR(4, 4244, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_HOST_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS) __PYX_ERR(4, 4262, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_HOST_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_HOST_NODE_PARAMS_v2) __PYX_ERR(4, 4280, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphEdgeData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphEdgeData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphEdgeData) __PYX_ERR(4, 4298, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_GRAPH_INSTANTIATE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_GRAPH_INSTANTIATE_PARAMS) __PYX_ERR(4, 4339, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchMemSyncDomainMap", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchMemSyncDomainMap) __PYX_ERR(4, 4361, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchAttributeValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttributeValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttributeValue) __PYX_ERR(4, 4385, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchAttribute", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchAttribute), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchAttribute) __PYX_ERR(4, 4470, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlaunchConfig", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlaunchConfig), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlaunchConfig) __PYX_ERR(4, 4488, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUkernelNodeAttrValue_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue_v1) __PYX_ERR(4, 4522, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUkernelNodeAttrValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUkernelNodeAttrValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUkernelNodeAttrValue) __PYX_ERR(4, 4607, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamAttrValue_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue_v1) __PYX_ERR(4, 4692, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUstreamAttrValue", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUstreamAttrValue), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUstreamAttrValue) __PYX_ERR(4, 4777, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinitySmCount_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount_v1) __PYX_ERR(4, 4862, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinitySmCount", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinitySmCount), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinitySmCount) __PYX_ERR(4, 4878, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinityParam_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam_v1) __PYX_ERR(4, 4894, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUexecAffinityParam", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUexecAffinityParam), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUexecAffinityParam) __PYX_ERR(4, 4912, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUctxCigParam", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCigParam), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCigParam) __PYX_ERR(4, 4930, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUctxCreateParams", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUctxCreateParams), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUctxCreateParams) __PYX_ERR(4, 4948, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlibraryHostUniversalFunctionAndDataTable", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlibraryHostUniversalFunctionAndDataTable) __PYX_ERR(4, 4969, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY2D_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D_v2) __PYX_ERR(4, 4989, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY2D", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY2D), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY2D) __PYX_ERR(4, 5035, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_v2) __PYX_ERR(4, 5081, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D) __PYX_ERR(4, 5146, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_PEER_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER_v1) __PYX_ERR(4, 5211, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_PEER", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_PEER) __PYX_ERR(4, 5277, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY_NODE_PARAMS) __PYX_ERR(4, 5343, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_DESCRIPTOR_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR_v2) __PYX_ERR(4, 5365, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_DESCRIPTOR", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_DESCRIPTOR) __PYX_ERR(4, 5387, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY3D_DESCRIPTOR_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR_v2) __PYX_ERR(4, 5409, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY3D_DESCRIPTOR", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY3D_DESCRIPTOR) __PYX_ERR(4, 5435, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_SPARSE_PROPERTIES_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES_v1) __PYX_ERR(4, 5461, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_SPARSE_PROPERTIES", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_SPARSE_PROPERTIES) __PYX_ERR(4, 5486, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_MEMORY_REQUIREMENTS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS_v1) __PYX_ERR(4, 5511, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_ARRAY_MEMORY_REQUIREMENTS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_ARRAY_MEMORY_REQUIREMENTS) __PYX_ERR(4, 5531, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC_v1) __PYX_ERR(4, 5551, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_DESC) __PYX_ERR(4, 5571, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_TEXTURE_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC_v1) __PYX_ERR(4, 5591, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_TEXTURE_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_TEXTURE_DESC) __PYX_ERR(4, 5625, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_VIEW_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC_v1) __PYX_ERR(4, 5659, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_RESOURCE_VIEW_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_RESOURCE_VIEW_DESC) __PYX_ERR(4, 5691, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUtensorMap", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtensorMap), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtensorMap) __PYX_ERR(4, 5723, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1) __PYX_ERR(4, 5740, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_POINTER_ATTRIBUTE_P2P_TOKENS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_POINTER_ATTRIBUTE_P2P_TOKENS) __PYX_ERR(4, 5758, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_LAUNCH_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS_v1) __PYX_ERR(4, 5776, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_LAUNCH_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_LAUNCH_PARAMS) __PYX_ERR(4, 5810, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) __PYX_ERR(4, 5844, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_HANDLE_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_HANDLE_DESC) __PYX_ERR(4, 5868, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1) __PYX_ERR(4, 5892, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_BUFFER_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_BUFFER_DESC) __PYX_ERR(4, 5914, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1) __PYX_ERR(4, 5936, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC) __PYX_ERR(4, 5959, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1) __PYX_ERR(4, 5982, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC) __PYX_ERR(4, 6004, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1) __PYX_ERR(4, 6026, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) __PYX_ERR(4, 6053, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1) __PYX_ERR(4, 6080, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) __PYX_ERR(4, 6107, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1) __PYX_ERR(4, 6134, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS) __PYX_ERR(4, 6155, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2) __PYX_ERR(4, 6176, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1) __PYX_ERR(4, 6197, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_WAIT_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS) __PYX_ERR(4, 6218, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2) __PYX_ERR(4, 6239, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemGenericAllocationHandle", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle) __PYX_ERR(4, 6260, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUarrayMapInfo_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo_v1) __PYX_ERR(4, 6272, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUarrayMapInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUarrayMapInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUarrayMapInfo) __PYX_ERR(4, 6309, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemLocation_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation_v1) __PYX_ERR(4, 6346, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemLocation", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemLocation), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemLocation) __PYX_ERR(4, 6364, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAllocationProp_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp_v1) __PYX_ERR(4, 6382, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAllocationProp", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAllocationProp), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAllocationProp) __PYX_ERR(4, 6410, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmulticastObjectProp_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp_v1) __PYX_ERR(4, 6438, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmulticastObjectProp", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmulticastObjectProp), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmulticastObjectProp) __PYX_ERR(4, 6463, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAccessDesc_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc_v1) __PYX_ERR(4, 6488, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemAccessDesc", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemAccessDesc), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemAccessDesc) __PYX_ERR(4, 6506, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphExecUpdateResultInfo_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo_v1) __PYX_ERR(4, 6524, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphExecUpdateResultInfo", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphExecUpdateResultInfo) __PYX_ERR(4, 6547, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolProps_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps_v1) __PYX_ERR(4, 6570, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolProps", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolProps), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolProps) __PYX_ERR(4, 6604, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolPtrExportData_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData_v1) __PYX_ERR(4, 6638, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemPoolPtrExportData", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemPoolPtrExportData), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemPoolPtrExportData) __PYX_ERR(4, 6654, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpyAttributes_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes_v1) __PYX_ERR(4, 6670, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpyAttributes", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpyAttributes), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpyAttributes) __PYX_ERR(4, 6696, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUoffset3D_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D_v1) __PYX_ERR(4, 6722, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUoffset3D", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUoffset3D), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUoffset3D) __PYX_ERR(4, 6742, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUextent3D_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D_v1) __PYX_ERR(4, 6762, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUextent3D", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUextent3D), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUextent3D) __PYX_ERR(4, 6782, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpy3DOperand_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand_v1) __PYX_ERR(4, 6802, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemcpy3DOperand", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemcpy3DOperand), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemcpy3DOperand) __PYX_ERR(4, 6820, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_BATCH_OP_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP_v1) __PYX_ERR(4, 6838, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEMCPY3D_BATCH_OP", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEMCPY3D_BATCH_OP) __PYX_ERR(4, 6861, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_ALLOC_NODE_PARAMS_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v1) __PYX_ERR(4, 6884, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_ALLOC_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS) __PYX_ERR(4, 6912, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_ALLOC_NODE_PARAMS_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_ALLOC_NODE_PARAMS_v2) __PYX_ERR(4, 6940, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_MEM_FREE_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_MEM_FREE_NODE_PARAMS) __PYX_ERR(4, 6968, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_CHILD_GRAPH_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_CHILD_GRAPH_NODE_PARAMS) __PYX_ERR(4, 6984, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EVENT_RECORD_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_RECORD_NODE_PARAMS) __PYX_ERR(4, 7006, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUDA_EVENT_WAIT_NODE_PARAMS", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUDA_EVENT_WAIT_NODE_PARAMS) __PYX_ERR(4, 7022, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUgraphNodeParams", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUgraphNodeParams), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUgraphNodeParams) __PYX_ERR(4, 7038, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointLockArgs", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointLockArgs), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointLockArgs) __PYX_ERR(4, 7086, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointCheckpointArgs", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointCheckpointArgs) __PYX_ERR(4, 7107, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointRestoreArgs", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointRestoreArgs), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointRestoreArgs) __PYX_ERR(4, 7123, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUcheckpointUnlockArgs", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUcheckpointUnlockArgs), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUcheckpointUnlockArgs) __PYX_ERR(4, 7139, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemDecompressParams", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemDecompressParams), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemDecompressParams) __PYX_ERR(4, 7155, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevSmResource", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevSmResource), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevSmResource) __PYX_ERR(4, 7193, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevResource_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource_v1) __PYX_ERR(4, 7208, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevResource", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevResource), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevResource) __PYX_ERR(4, 7228, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUeglFrame_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame_v1) __PYX_ERR(4, 7248, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUeglFrame", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUeglFrame), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUeglFrame) __PYX_ERR(4, 7284, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_cuuint32_t = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "cuuint32_t", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint32_t), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_cuuint32_t) __PYX_ERR(4, 7320, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "cuuint64_t", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_cuuint64_t), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_cuuint64_t) __PYX_ERR(4, 7332, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr_v2 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdeviceptr_v2", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdeviceptr_v2), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdeviceptr_v2) __PYX_ERR(4, 7344, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevice_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUdevice_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUdevice_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUdevice_v1) __PYX_ERR(4, 7358, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUtexObject_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUtexObject_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUtexObject_v1) __PYX_ERR(4, 7372, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUsurfObject_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUsurfObject_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUsurfObject_v1) __PYX_ERR(4, 7386, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1 = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUmemGenericAllocationHandle_v1", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUmemGenericAllocationHandle_v1) __PYX_ERR(4, 7400, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogIterator = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "CUlogIterator", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_CUlogIterator), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_CUlogIterator) __PYX_ERR(4, 7412, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_GLenum = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "GLenum", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLenum), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_GLenum) __PYX_ERR(4, 7424, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_GLuint = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "GLuint", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_GLuint), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_GLuint) __PYX_ERR(4, 7436, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLint = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "EGLint", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_EGLint), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_EGLint) __PYX_ERR(4, 7448, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpDevice = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "VdpDevice", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpDevice), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpDevice) __PYX_ERR(4, 7460, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpGetProcAddress = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "VdpGetProcAddress", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpGetProcAddress), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpGetProcAddress) __PYX_ERR(4, 7472, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpVideoSurface = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "VdpVideoSurface", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpVideoSurface), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpVideoSurface) __PYX_ERR(4, 7484, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpOutputSurface = __Pyx_ImportType_3_1_5(__pyx_t_1, "cuda.bindings.driver", "VdpOutputSurface", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), + #elif CYTHON_COMPILING_IN_LIMITED_API + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), + #else + sizeof(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(struct __pyx_obj_4cuda_8bindings_6driver_VdpOutputSurface), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_4cuda_8bindings_6driver_VdpOutputSurface) __PYX_ERR(4, 7496, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_5(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyTypeObject), + #elif CYTHON_COMPILING_IN_LIMITED_API + 0, 0, + #else + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_5(PyHeapTypeObject), + #endif + __Pyx_ImportType_CheckSize_Warn_3_1_5); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings.cynvrtc"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetErrorString, "char const *(nvrtcResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcVersion, "nvrtcResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetNumSupportedArchs", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNumSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetSupportedArchs", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetSupportedArchs, "nvrtcResult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcCreateProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCreateProgram, "nvrtcResult (nvrtcProgram *, char const *, char const *, int, char const **, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcDestroyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcDestroyProgram, "nvrtcResult (nvrtcProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcCompileProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcCompileProgram, "nvrtcResult (nvrtcProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetPTXSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTXSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetPTX", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPTX, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetCUBINSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBINSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetCUBIN", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetCUBIN, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetNVVMSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVMSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetNVVM", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetNVVM, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetLTOIRSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetLTOIR", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLTOIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetOptiXIRSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIRSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetOptiXIR", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetOptiXIR, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetProgramLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLogSize, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetProgramLog", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetProgramLog, "nvrtcResult (nvrtcProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcAddNameExpression", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcAddNameExpression, "nvrtcResult (nvrtcProgram, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetLoweredName", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetLoweredName, "nvrtcResult (nvrtcProgram, char const *, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetPCHHeapSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSize, "nvrtcResult (size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcSetPCHHeapSize", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetPCHHeapSize, "nvrtcResult (size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetPCHCreateStatus", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHCreateStatus, "nvrtcResult (nvrtcProgram)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcGetPCHHeapSizeRequired", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcGetPCHHeapSizeRequired, "nvrtcResult (nvrtcProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvrtcSetFlowCallback", (void (**)(void))&__pyx_f_4cuda_8bindings_7cynvrtc_nvrtcSetFlowCallback, "nvrtcResult (nvrtcProgram, void *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_nvrtc(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_nvrtc}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "nvrtc", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_nvrtc(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_nvrtc(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_nvrtc(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; + PyObject *__pyx_t_17 = NULL; + PyObject *__pyx_t_18 = NULL; + size_t __pyx_t_19; + size_t __pyx_t_20; + int __pyx_t_21; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'nvrtc' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "nvrtc" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_nvrtc", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__nvrtc) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.nvrtc")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.nvrtc", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + (void)__Pyx_modinit_function_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/nvrtc.pyx":5 + * + * # This code was automatically generated with version 12.9.0. Do not modify it directly. + * from typing import Any, Optional # <<<<<<<<<<<<<< + * from enum import IntEnum + * import cython +*/ + __pyx_t_2 = __Pyx_PyList_Pack(2, __pyx_mstate_global->__pyx_n_u_Any, __pyx_mstate_global->__pyx_n_u_Optional); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Any, __pyx_t_2) < (0)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Optional); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Optional, __pyx_t_2) < (0)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvrtc.pyx":6 + * # This code was automatically generated with version 12.9.0. Do not modify it directly. + * from typing import Any, Optional + * from enum import IntEnum # <<<<<<<<<<<<<< + * import cython + * import ctypes +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IntEnum, __pyx_t_3) < (0)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":8 + * from enum import IntEnum + * import cython + * import ctypes # <<<<<<<<<<<<<< + * from libc.stdlib cimport calloc, malloc, free + * from libc cimport string +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_ctypes_2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ctypes_2, __pyx_t_2) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":18 + * from cpython.bytes cimport PyBytes_FromStringAndSize + * + * import cuda.bindings.driver as _driver # <<<<<<<<<<<<<< + * _driver = _driver.__dict__ + * include "_lib/utils.pxi" +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_cuda_bindings_driver, __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver, __pyx_t_2) < (0)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":19 + * + * import cuda.bindings.driver as _driver + * _driver = _driver.__dict__ # <<<<<<<<<<<<<< + * include "_lib/utils.pxi" + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_driver); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver, __pyx_t_3) < (0)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/_lib/utils.pxi":9 + * from libc.stddef cimport wchar_t + * from libc.string cimport memcpy + * from enum import Enum as _Enum # <<<<<<<<<<<<<< + * import ctypes as _ctypes + * cimport cuda.bindings.cydriver as cydriver +*/ + __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Enum_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Enum_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Enum, __pyx_t_3) < (0)) __PYX_ERR(1, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":10 + * from libc.string cimport memcpy + * from enum import Enum as _Enum + * import ctypes as _ctypes # <<<<<<<<<<<<<< + * cimport cuda.bindings.cydriver as cydriver + * import cuda.bindings.driver as _driver +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_ctypes_2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ctypes, __pyx_t_2) < (0)) __PYX_ERR(1, 10, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":12 + * import ctypes as _ctypes + * cimport cuda.bindings.cydriver as cydriver + * import cuda.bindings.driver as _driver # <<<<<<<<<<<<<< + * cimport cuda.bindings._lib.param_packer as param_packer + * +*/ + __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_cuda_bindings_driver, __pyx_mstate_global->__pyx_tuple[0]); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_driver, __pyx_t_2) < (0)) __PYX_ERR(1, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":23 + * cdef class _HelperKernelParams: + * supported_types = { # excluding void_p and None, which are handled specially + * _ctypes.c_bool, # <<<<<<<<<<<<<< + * _ctypes.c_char, + * _ctypes.c_wchar, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_bool); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":24 + * supported_types = { # excluding void_p and None, which are handled specially + * _ctypes.c_bool, + * _ctypes.c_char, # <<<<<<<<<<<<<< + * _ctypes.c_wchar, + * _ctypes.c_byte, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_char); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":25 + * _ctypes.c_bool, + * _ctypes.c_char, + * _ctypes.c_wchar, # <<<<<<<<<<<<<< + * _ctypes.c_byte, + * _ctypes.c_ubyte, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_wchar); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":26 + * _ctypes.c_char, + * _ctypes.c_wchar, + * _ctypes.c_byte, # <<<<<<<<<<<<<< + * _ctypes.c_ubyte, + * _ctypes.c_short, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_byte); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":27 + * _ctypes.c_wchar, + * _ctypes.c_byte, + * _ctypes.c_ubyte, # <<<<<<<<<<<<<< + * _ctypes.c_short, + * _ctypes.c_ushort, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_ubyte); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":28 + * _ctypes.c_byte, + * _ctypes.c_ubyte, + * _ctypes.c_short, # <<<<<<<<<<<<<< + * _ctypes.c_ushort, + * _ctypes.c_int, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_short); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":29 + * _ctypes.c_ubyte, + * _ctypes.c_short, + * _ctypes.c_ushort, # <<<<<<<<<<<<<< + * _ctypes.c_int, + * _ctypes.c_uint, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_ushort); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":30 + * _ctypes.c_short, + * _ctypes.c_ushort, + * _ctypes.c_int, # <<<<<<<<<<<<<< + * _ctypes.c_uint, + * _ctypes.c_long, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_int); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":31 + * _ctypes.c_ushort, + * _ctypes.c_int, + * _ctypes.c_uint, # <<<<<<<<<<<<<< + * _ctypes.c_long, + * _ctypes.c_ulong, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_uint); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":32 + * _ctypes.c_int, + * _ctypes.c_uint, + * _ctypes.c_long, # <<<<<<<<<<<<<< + * _ctypes.c_ulong, + * _ctypes.c_longlong, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_long); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 32, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":33 + * _ctypes.c_uint, + * _ctypes.c_long, + * _ctypes.c_ulong, # <<<<<<<<<<<<<< + * _ctypes.c_longlong, + * _ctypes.c_ulonglong, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_ulong); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":34 + * _ctypes.c_long, + * _ctypes.c_ulong, + * _ctypes.c_longlong, # <<<<<<<<<<<<<< + * _ctypes.c_ulonglong, + * _ctypes.c_size_t, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_longlong); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":35 + * _ctypes.c_ulong, + * _ctypes.c_longlong, + * _ctypes.c_ulonglong, # <<<<<<<<<<<<<< + * _ctypes.c_size_t, + * _ctypes.c_float, +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_ulonglong); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":36 + * _ctypes.c_longlong, + * _ctypes.c_ulonglong, + * _ctypes.c_size_t, # <<<<<<<<<<<<<< + * _ctypes.c_float, + * _ctypes.c_double +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_size_t); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":37 + * _ctypes.c_ulonglong, + * _ctypes.c_size_t, + * _ctypes.c_float, # <<<<<<<<<<<<<< + * _ctypes.c_double + * } +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_float); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 37, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":38 + * _ctypes.c_size_t, + * _ctypes.c_float, + * _ctypes.c_double # <<<<<<<<<<<<<< + * } + * +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_c_double); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PySet_Add(__pyx_t_2, __pyx_t_3) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_4) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_5) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_6) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_7) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_8) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_9) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_10) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_11) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_12) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_13) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_14) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_15) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_16) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_17) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (PySet_Add(__pyx_t_2, __pyx_t_18) < (0)) __PYX_ERR(1, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams, __pyx_mstate_global->__pyx_n_u_supported_types, __pyx_t_2) < (0)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":41 + * } + * + * max_param_size = max(_ctypes.sizeof(max(_HelperKernelParams.supported_types, key=lambda t:_ctypes.sizeof(t))), sizeof(void_ptr)) # <<<<<<<<<<<<<< + * + * def __cinit__(self, kernelParams): +*/ + __pyx_t_19 = (sizeof(__pyx_t_4cuda_8bindings_5nvrtc_void_ptr)); + __pyx_t_18 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_ctypes); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_sizeof); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_15 = NULL; + __Pyx_INCREF(__pyx_builtin_max); + __pyx_t_14 = __pyx_builtin_max; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams), __pyx_mstate_global->__pyx_n_u_supported_types); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_12 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_4lambda, 0, __pyx_mstate_global->__pyx_n_u_HelperKernelParams_lambda, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_20 = 1; + { + PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_15, __pyx_t_13}; + __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_key, __pyx_t_12, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(1, 41, __pyx_L1_error) + __pyx_t_17 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_14, __pyx_callargs+__pyx_t_20, (2-__pyx_t_20) | (__pyx_t_20*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); + __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + } + __pyx_t_20 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_17}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_20, (2-__pyx_t_20) | (__pyx_t_20*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_17 = __Pyx_PyLong_FromSize_t(__pyx_t_19); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + __pyx_t_18 = PyObject_RichCompare(__pyx_t_17, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (__pyx_t_21) { + __pyx_t_18 = __Pyx_PyLong_FromSize_t(__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_16 = __pyx_t_18; + __pyx_t_18 = 0; + } else { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_16 = __pyx_t_2; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __pyx_t_16; + __Pyx_INCREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperKernelParams, __pyx_mstate_global->__pyx_n_u_max_param_size, __pyx_t_2) < (0)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_6__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperKernelParams___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperKernelParams_8__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperKernelParams___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperInputVoidPtr___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperInputVoidPtr_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperInputVoidPtr___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":187 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_5pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemPool_attribute_pyObj, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemPool_attribute, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 187, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemPool_attribute___red, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUmemPool_attribute_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemPool_attribute___set, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":224 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if self._attr in (cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + * cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_5pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmem_range_attribute_pyO, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmem_range_attribute, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmem_range_attribute___r, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_28_HelperCUmem_range_attribute_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmem_range_attribute___s, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":295 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT,): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_5pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUpointer_attribute_pyObj, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUpointer_attribute, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUpointer_attribute___red, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_26_HelperCUpointer_attribute_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUpointer_attribute___set, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":349 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attr in (cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_5pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUgraphMem_attribute_pyOb, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUgraphMem_attribute, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 349, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUgraphMem_attribute___re, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_27_HelperCUgraphMem_attribute_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUgraphMem_attribute___se, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUjit_option___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19_HelperCUjit_option_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUjit_option___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCudaJitOption___reduce_cy, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_20_HelperCudaJitOption_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCudaJitOption___setstate, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUlibraryOption___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_22_HelperCUlibraryOption_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUlibraryOption___setstat, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCudaLibraryOption___reduc, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_24_HelperCudaLibraryOption_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCudaLibraryOption___setst, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":528 + * return self._cptr + * + * def pyObj(self): # <<<<<<<<<<<<<< + * if False: + * pass +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_5pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemAllocationHandleType_2, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUmemAllocationHandleType, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 528, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemAllocationHandleType_3, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_32_HelperCUmemAllocationHandleType_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUmemAllocationHandleType_4, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputVoidPtrPtrHelper___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_22_InputVoidPtrPtrHelper_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_InputVoidPtrPtrHelper___setstat, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":590 + * return self._cptr + * + * def size(self): # <<<<<<<<<<<<<< + * return self._size + * +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_5size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUcoredumpSettings_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 590, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, __pyx_mstate_global->__pyx_n_u_size, __pyx_t_2) < (0)) __PYX_ERR(1, 590, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/_lib/utils.pxi":593 + * return self._size + * + * def pyObj(self): # <<<<<<<<<<<<<< + * assert(self._is_getter == True) + * if self._attrib in (cydriver.CUcoredumpSettings_enum.CU_COREDUMP_FILE, +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_7pyObj, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUcoredumpSettings_pyObj, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc__HelperCUcoredumpSettings, __pyx_mstate_global->__pyx_n_u_pyObj, __pyx_t_2) < (0)) __PYX_ERR(1, 593, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUcoredumpSettings___redu, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_25_HelperCUcoredumpSettings_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_HelperCUcoredumpSettings___sets, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":47 + * + * + * class nvrtcResult(IntEnum): # <<<<<<<<<<<<<< + * """ + * The enumerated type nvrtcResult defines API call result codes. +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_16 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __pyx_t_17 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_nvrtcResult, __pyx_mstate_global->__pyx_n_u_nvrtcResult, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_kp_u_The_enumerated_type_nvrtcResult); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_17); + if (__pyx_t_2 != __pyx_t_16) { + if (unlikely((PyDict_SetItemString(__pyx_t_17, "__orig_bases__", __pyx_t_16) < 0))) __PYX_ERR(0, 47, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":52 + * NVRTC API functions return nvrtcResult to indicate the call result. + * """ + * NVRTC_SUCCESS = cynvrtc.nvrtcResult.NVRTC_SUCCESS # <<<<<<<<<<<<<< + * NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY + * NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_SUCCESS); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_SUCCESS, __pyx_t_16) < (0)) __PYX_ERR(0, 52, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":53 + * """ + * NVRTC_SUCCESS = cynvrtc.nvrtcResult.NVRTC_SUCCESS + * NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY # <<<<<<<<<<<<<< + * NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE + * NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_OUT_OF_MEMORY); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_OUT_OF_MEMORY, __pyx_t_16) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":54 + * NVRTC_SUCCESS = cynvrtc.nvrtcResult.NVRTC_SUCCESS + * NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY + * NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE # <<<<<<<<<<<<<< + * NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT + * NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_PROGRAM_CREATION_FAILURE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_PROGRAM_CREATION_FAI, __pyx_t_16) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":55 + * NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY + * NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE + * NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT # <<<<<<<<<<<<<< + * NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + * NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_INVALID_INPUT); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_INVALID_INPUT, __pyx_t_16) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":56 + * NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE + * NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT + * NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM # <<<<<<<<<<<<<< + * NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION + * NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_INVALID_PROGRAM); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_INVALID_PROGRAM, __pyx_t_16) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":57 + * NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT + * NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + * NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION # <<<<<<<<<<<<<< + * NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION + * NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_INVALID_OPTION); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_INVALID_OPTION, __pyx_t_16) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":58 + * NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + * NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION + * NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION # <<<<<<<<<<<<<< + * NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE + * NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_COMPILATION); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_COMPILATION, __pyx_t_16) < (0)) __PYX_ERR(0, 58, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":59 + * NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION + * NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION + * NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE # <<<<<<<<<<<<<< + * NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION + * NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_BUILTIN_OPERATION_FAILURE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_BUILTIN_OPERATION_FA, __pyx_t_16) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":60 + * NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION + * NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE + * NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION # <<<<<<<<<<<<<< + * NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + * NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_NO_NAME_EXPRESSIONS, __pyx_t_16) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":61 + * NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE + * NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION + * NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION # <<<<<<<<<<<<<< + * NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + * NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_NO_LOWERED_NAMES_BEF, __pyx_t_16) < (0)) __PYX_ERR(0, 61, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":62 + * NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION + * NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + * NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID # <<<<<<<<<<<<<< + * NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR + * NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_NAME_EXPRESSION_NOT, __pyx_t_16) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":63 + * NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + * NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + * NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR # <<<<<<<<<<<<<< + * NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED + * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_INTERNAL_ERROR); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_INTERNAL_ERROR, __pyx_t_16) < (0)) __PYX_ERR(0, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":64 + * NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + * NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR + * NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED # <<<<<<<<<<<<<< + * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_TIME_FILE_WRITE_FAILED); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_TIME_FILE_WRITE_FAIL, __pyx_t_16) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":65 + * NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR + * NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED + * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED # <<<<<<<<<<<<<< + * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + * NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_NO_PCH_CREATE_ATTEMP, __pyx_t_16) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":66 + * NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED + * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED # <<<<<<<<<<<<<< + * NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_PCH_CREATE_HEAP_EXHA, __pyx_t_16) < (0)) __PYX_ERR(0, 66, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":67 + * NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + * NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE # <<<<<<<<<<<<<< + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + * +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_PCH_CREATE); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_PCH_CREATE, __pyx_t_16) < (0)) __PYX_ERR(0, 67, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":68 + * NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + * NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED # <<<<<<<<<<<<<< + * + * _dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) +*/ + __pyx_t_16 = __Pyx_PyLong_From_nvrtcResult(NVRTC_ERROR_CANCELLED); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_NVRTC_ERROR_CANCELLED, __pyx_t_16) < (0)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + + /* "cuda/bindings/nvrtc.pyx":47 + * + * + * class nvrtcResult(IntEnum): # <<<<<<<<<<<<<< + * """ + * The enumerated type nvrtcResult defines API call result codes. +*/ + __pyx_t_16 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_nvrtcResult, __pyx_t_2, __pyx_t_17, NULL, 0, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_16); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcResult, __pyx_t_16) < (0)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":70 + * NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + * + * _dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) # <<<<<<<<<<<<<< + * + * cdef class nvrtcProgram: +*/ + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nvrtcResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_members); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __pyx_pf_4cuda_8bindings_5nvrtc_54genexpr(NULL, __pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + __pyx_t_18 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dict_nvrtcResult, __pyx_t_18) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "cuda/bindings/nvrtc.pyx":103 + * def __int__(self): + * return self._pvt_ptr[0] + * def getPtr(self): # <<<<<<<<<<<<<< + * return self._pvt_ptr + * +*/ + __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_15getPtr, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_nvrtcProgram_getPtr, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4cuda_8bindings_5nvrtc_nvrtcProgram, __pyx_mstate_global->__pyx_n_u_getPtr, __pyx_t_18) < (0)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): +*/ + __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_nvrtcProgram___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_18) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" +*/ + __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_12nvrtcProgram_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_nvrtcProgram___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_18) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "cuda/bindings/nvrtc.pyx":106 + * return self._pvt_ptr + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetErrorString(result not None : nvrtcResult): + * """ nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `"NVRTC_SUCCESS"`. For unrecognized enumeration values, it returns `"NVRTC_ERROR unknown"`. +*/ + __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_result, __pyx_mstate_global->__pyx_n_u_nvrtcResult) < (0)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_1nvrtcGetErrorString, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetErrorString, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_18); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetErrorString, __pyx_t_2) < (0)) __PYX_ERR(0, 106, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":127 + * return (nvrtcResult.NVRTC_SUCCESS, err) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcVersion(): + * """ nvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_3nvrtcVersion, 0, __pyx_mstate_global->__pyx_n_u_nvrtcVersion, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcVersion, __pyx_t_2) < (0)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":149 + * return (_dict_nvrtcResult[err], major, minor) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNumSupportedArchs(): + * """ nvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_5nvrtcGetNumSupportedArchs, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetNumSupportedArchs, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetNumSupportedArchs, __pyx_t_2) < (0)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":170 + * return (_dict_nvrtcResult[err], numArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetSupportedArchs(): + * """ nvrtcGetSupportedArchs populates the array passed via the output parameter `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 :py:obj:`~.nvrtcGetNumSupportedArchs`. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_7nvrtcGetSupportedArchs, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetSupportedArchs, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetSupportedArchs, __pyx_t_2) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":194 + * return (_dict_nvrtcResult[err], supportedArchs) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it. +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_headers, __pyx_mstate_global->__pyx_kp_u_Optional_tuple_bytes_list_bytes) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_includeNames, __pyx_mstate_global->__pyx_kp_u_Optional_tuple_bytes_list_bytes) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_9nvrtcCreateProgram, 0, __pyx_mstate_global->__pyx_n_u_nvrtcCreateProgram, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcCreateProgram, __pyx_t_18) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "cuda/bindings/nvrtc.pyx":249 + * return (_dict_nvrtcResult[err], prog) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcDestroyProgram(prog): + * """ nvrtcDestroyProgram destroys the given program. +*/ + __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_11nvrtcDestroyProgram, 0, __pyx_mstate_global->__pyx_n_u_nvrtcDestroyProgram, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcDestroyProgram, __pyx_t_18) < (0)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + + /* "cuda/bindings/nvrtc.pyx":282 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]): + * """ nvrtcCompileProgram compiles the given program. +*/ + __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_18); + if (PyDict_SetItem(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_options, __pyx_mstate_global->__pyx_kp_u_Optional_tuple_bytes_list_bytes) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_13nvrtcCompileProgram, 0, __pyx_mstate_global->__pyx_n_u_nvrtcCompileProgram, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_18); + __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcCompileProgram, __pyx_t_2) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":329 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTXSize(prog): + * """ nvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_15nvrtcGetPTXSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTXSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTXSize, __pyx_t_2) < (0)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":366 + * return (_dict_nvrtcResult[err], ptxSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPTX(prog, char* ptx): + * """ nvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_17nvrtcGetPTX, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTX, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetPTX, __pyx_t_2) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":400 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBINSize(prog): + * """ nvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_19nvrtcGetCUBINSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBINSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBINSize, __pyx_t_2) < (0)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":437 + * return (_dict_nvrtcResult[err], cubinSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetCUBIN(prog, char* cubin): + * """ nvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_21nvrtcGetCUBIN, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBIN, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetCUBIN, __pyx_t_2) < (0)) __PYX_ERR(0, 437, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":471 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVMSize(prog): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_23nvrtcGetNVVMSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVMSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVMSize, __pyx_t_2) < (0)) __PYX_ERR(0, 471, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":502 + * return (_dict_nvrtcResult[err], nvvmSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetNVVM(prog, char* nvvm): + * """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_25nvrtcGetNVVM, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVM, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetNVVM, __pyx_t_2) < (0)) __PYX_ERR(0, 502, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":530 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIRSize(prog): + * """ nvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_27nvrtcGetLTOIRSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIRSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIRSize, __pyx_t_2) < (0)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":567 + * return (_dict_nvrtcResult[err], LTOIRSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLTOIR(prog, char* LTOIR): + * """ nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_29nvrtcGetLTOIR, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIR, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetLTOIR, __pyx_t_2) < (0)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":601 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIRSize(prog): + * """ nvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_31nvrtcGetOptiXIRSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIRSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIRSize, __pyx_t_2) < (0)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":638 + * return (_dict_nvrtcResult[err], optixirSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetOptiXIR(prog, char* optixir): + * """ nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_33nvrtcGetOptiXIR, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIR, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetOptiXIR, __pyx_t_2) < (0)) __PYX_ERR(0, 638, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":672 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLogSize(prog): + * """ nvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`). +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_35nvrtcGetProgramLogSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLogSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLogSize, __pyx_t_2) < (0)) __PYX_ERR(0, 672, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":712 + * return (_dict_nvrtcResult[err], logSizeRet) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetProgramLog(prog, char* log): + * """ nvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_37nvrtcGetProgramLog, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLog, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetProgramLog, __pyx_t_2) < (0)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":746 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcAddNameExpression(prog, char* name_expression): + * """ nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_39nvrtcAddNameExpression, 0, __pyx_mstate_global->__pyx_n_u_nvrtcAddNameExpression, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcAddNameExpression, __pyx_t_2) < (0)) __PYX_ERR(0, 746, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":785 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetLoweredName(prog, char* name_expression): + * """ 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. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_41nvrtcGetLoweredName, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetLoweredName, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetLoweredName, __pyx_t_2) < (0)) __PYX_ERR(0, 785, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":827 + * return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSize(): + * """ retrieve the current size of the PCH Heap. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_43nvrtcGetPCHHeapSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSize, __pyx_t_2) < (0)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":846 + * return (_dict_nvrtcResult[err], ret) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetPCHHeapSize(size_t size): + * """ set the size of the PCH Heap. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_45nvrtcSetPCHHeapSize, 0, __pyx_mstate_global->__pyx_n_u_nvrtcSetPCHHeapSize, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcSetPCHHeapSize, __pyx_t_2) < (0)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":868 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHCreateStatus(prog): + * """ returns the PCH creation status. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_47nvrtcGetPCHCreateStatus, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHCreateStatus, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHCreateStatus, __pyx_t_2) < (0)) __PYX_ERR(0, 868, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":913 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcGetPCHHeapSizeRequired(prog): + * """ retrieve the required size of the PCH heap required to compile the given program. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_49nvrtcGetPCHHeapSizeRequired, 0, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSizeRequired, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcGetPCHHeapSizeRequired, __pyx_t_2) < (0)) __PYX_ERR(0, 913, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":947 + * return (_dict_nvrtcResult[err], size) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def nvrtcSetFlowCallback(prog, callback, payload): + * """ 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. +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_51nvrtcSetFlowCallback, 0, __pyx_mstate_global->__pyx_n_u_nvrtcSetFlowCallback, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvrtcSetFlowCallback, __pyx_t_2) < (0)) __PYX_ERR(0, 947, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":1005 + * return (_dict_nvrtcResult[err],) + * + * @cython.embedsignature(True) # <<<<<<<<<<<<<< + * def sizeof(objType): + * """ Returns the size of provided CUDA Python structure in bytes +*/ + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_5nvrtc_53sizeof, 0, __pyx_mstate_global->__pyx_n_u_sizeof, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvrtc, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sizeof, __pyx_t_2) < (0)) __PYX_ERR(0, 1005, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvrtc.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + * +*/ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __Pyx_XDECREF(__pyx_t_16); + __Pyx_XDECREF(__pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.nvrtc", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.nvrtc"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 147 <= 65535 + const unsigned short n; +#elif 147 / 2 < INT_MAX + const unsigned int n; +#elif 147 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_Any, sizeof(__pyx_k_Any), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Any */ + {__pyx_k_Argument_headers_is_not_instance, sizeof(__pyx_k_Argument_headers_is_not_instance), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_headers_is_not_instance */ + {__pyx_k_Argument_includeNames_is_not_ins, sizeof(__pyx_k_Argument_includeNames_is_not_ins), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_includeNames_is_not_ins */ + {__pyx_k_Argument_kernelParams_failed_to, sizeof(__pyx_k_Argument_kernelParams_failed_to), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_kernelParams_failed_to */ + {__pyx_k_Argument_kernelParams_has_tuples, sizeof(__pyx_k_Argument_kernelParams_has_tuples), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_kernelParams_has_tuples */ + {__pyx_k_Argument_kernelParams_is_not_a_v, sizeof(__pyx_k_Argument_kernelParams_is_not_a_v), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_kernelParams_is_not_a_v */ + {__pyx_k_Argument_options_is_not_instance, sizeof(__pyx_k_Argument_options_is_not_instance), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_options_is_not_instance */ + {__pyx_k_Argument_prog_is_not_instance_of, sizeof(__pyx_k_Argument_prog_is_not_instance_of), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Argument_prog_is_not_instance_of */ + {__pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_AssertionError */ + {__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN, sizeof(__pyx_k_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUDA_POINTER_ATTRIBUTE_P2P_TOKEN */ + {__pyx_k_CUcontext, sizeof(__pyx_k_CUcontext), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUcontext */ + {__pyx_k_CUdeviceptr, sizeof(__pyx_k_CUdeviceptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUdeviceptr */ + {__pyx_k_CUmemFabricHandle, sizeof(__pyx_k_CUmemFabricHandle), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUmemFabricHandle */ + {__pyx_k_CUmemoryPool, sizeof(__pyx_k_CUmemoryPool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_CUmemoryPool */ + {__pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Enum */ + {__pyx_k_Enum_2, sizeof(__pyx_k_Enum_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Enum_2 */ + {__pyx_k_Failed_to_allocated_length_x_siz, sizeof(__pyx_k_Failed_to_allocated_length_x_siz), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_allocated_length_x_siz */ + {__pyx_k_Failed_to_retrieve_buffer_throug, sizeof(__pyx_k_Failed_to_retrieve_buffer_throug), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Failed_to_retrieve_buffer_throug */ + {__pyx_k_HelperCUcoredumpSettings, sizeof(__pyx_k_HelperCUcoredumpSettings), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUcoredumpSettings */ + {__pyx_k_HelperCUcoredumpSettings___redu, sizeof(__pyx_k_HelperCUcoredumpSettings___redu), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUcoredumpSettings___redu */ + {__pyx_k_HelperCUcoredumpSettings___sets, sizeof(__pyx_k_HelperCUcoredumpSettings___sets), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUcoredumpSettings___sets */ + {__pyx_k_HelperCUcoredumpSettings_pyObj, sizeof(__pyx_k_HelperCUcoredumpSettings_pyObj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUcoredumpSettings_pyObj */ + {__pyx_k_HelperCUcoredumpSettings_size, sizeof(__pyx_k_HelperCUcoredumpSettings_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUcoredumpSettings_size */ + {__pyx_k_HelperCUgraphMem_attribute, sizeof(__pyx_k_HelperCUgraphMem_attribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUgraphMem_attribute */ + {__pyx_k_HelperCUgraphMem_attribute___re, sizeof(__pyx_k_HelperCUgraphMem_attribute___re), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUgraphMem_attribute___re */ + {__pyx_k_HelperCUgraphMem_attribute___se, sizeof(__pyx_k_HelperCUgraphMem_attribute___se), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUgraphMem_attribute___se */ + {__pyx_k_HelperCUgraphMem_attribute_pyOb, sizeof(__pyx_k_HelperCUgraphMem_attribute_pyOb), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUgraphMem_attribute_pyOb */ + {__pyx_k_HelperCUjit_option, sizeof(__pyx_k_HelperCUjit_option), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUjit_option */ + {__pyx_k_HelperCUjit_option___reduce_cyt, sizeof(__pyx_k_HelperCUjit_option___reduce_cyt), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUjit_option___reduce_cyt */ + {__pyx_k_HelperCUjit_option___setstate_c, sizeof(__pyx_k_HelperCUjit_option___setstate_c), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUjit_option___setstate_c */ + {__pyx_k_HelperCUlibraryOption, sizeof(__pyx_k_HelperCUlibraryOption), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUlibraryOption */ + {__pyx_k_HelperCUlibraryOption___reduce, sizeof(__pyx_k_HelperCUlibraryOption___reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUlibraryOption___reduce */ + {__pyx_k_HelperCUlibraryOption___setstat, sizeof(__pyx_k_HelperCUlibraryOption___setstat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUlibraryOption___setstat */ + {__pyx_k_HelperCUmemAllocationHandleType, sizeof(__pyx_k_HelperCUmemAllocationHandleType), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemAllocationHandleType */ + {__pyx_k_HelperCUmemAllocationHandleType_2, sizeof(__pyx_k_HelperCUmemAllocationHandleType_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemAllocationHandleType_2 */ + {__pyx_k_HelperCUmemAllocationHandleType_3, sizeof(__pyx_k_HelperCUmemAllocationHandleType_3), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemAllocationHandleType_3 */ + {__pyx_k_HelperCUmemAllocationHandleType_4, sizeof(__pyx_k_HelperCUmemAllocationHandleType_4), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemAllocationHandleType_4 */ + {__pyx_k_HelperCUmemPool_attribute, sizeof(__pyx_k_HelperCUmemPool_attribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemPool_attribute */ + {__pyx_k_HelperCUmemPool_attribute___red, sizeof(__pyx_k_HelperCUmemPool_attribute___red), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemPool_attribute___red */ + {__pyx_k_HelperCUmemPool_attribute___set, sizeof(__pyx_k_HelperCUmemPool_attribute___set), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemPool_attribute___set */ + {__pyx_k_HelperCUmemPool_attribute_pyObj, sizeof(__pyx_k_HelperCUmemPool_attribute_pyObj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmemPool_attribute_pyObj */ + {__pyx_k_HelperCUmem_range_attribute, sizeof(__pyx_k_HelperCUmem_range_attribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmem_range_attribute */ + {__pyx_k_HelperCUmem_range_attribute___r, sizeof(__pyx_k_HelperCUmem_range_attribute___r), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmem_range_attribute___r */ + {__pyx_k_HelperCUmem_range_attribute___s, sizeof(__pyx_k_HelperCUmem_range_attribute___s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmem_range_attribute___s */ + {__pyx_k_HelperCUmem_range_attribute_pyO, sizeof(__pyx_k_HelperCUmem_range_attribute_pyO), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUmem_range_attribute_pyO */ + {__pyx_k_HelperCUpointer_attribute, sizeof(__pyx_k_HelperCUpointer_attribute), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUpointer_attribute */ + {__pyx_k_HelperCUpointer_attribute___red, sizeof(__pyx_k_HelperCUpointer_attribute___red), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUpointer_attribute___red */ + {__pyx_k_HelperCUpointer_attribute___set, sizeof(__pyx_k_HelperCUpointer_attribute___set), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUpointer_attribute___set */ + {__pyx_k_HelperCUpointer_attribute_pyObj, sizeof(__pyx_k_HelperCUpointer_attribute_pyObj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCUpointer_attribute_pyObj */ + {__pyx_k_HelperCudaJitOption, sizeof(__pyx_k_HelperCudaJitOption), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaJitOption */ + {__pyx_k_HelperCudaJitOption___reduce_cy, sizeof(__pyx_k_HelperCudaJitOption___reduce_cy), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaJitOption___reduce_cy */ + {__pyx_k_HelperCudaJitOption___setstate, sizeof(__pyx_k_HelperCudaJitOption___setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaJitOption___setstate */ + {__pyx_k_HelperCudaLibraryOption, sizeof(__pyx_k_HelperCudaLibraryOption), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaLibraryOption */ + {__pyx_k_HelperCudaLibraryOption___reduc, sizeof(__pyx_k_HelperCudaLibraryOption___reduc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaLibraryOption___reduc */ + {__pyx_k_HelperCudaLibraryOption___setst, sizeof(__pyx_k_HelperCudaLibraryOption___setst), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperCudaLibraryOption___setst */ + {__pyx_k_HelperInputVoidPtr, sizeof(__pyx_k_HelperInputVoidPtr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperInputVoidPtr */ + {__pyx_k_HelperInputVoidPtr___reduce_cyt, sizeof(__pyx_k_HelperInputVoidPtr___reduce_cyt), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperInputVoidPtr___reduce_cyt */ + {__pyx_k_HelperInputVoidPtr___setstate_c, sizeof(__pyx_k_HelperInputVoidPtr___setstate_c), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperInputVoidPtr___setstate_c */ + {__pyx_k_HelperKernelParams, sizeof(__pyx_k_HelperKernelParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperKernelParams */ + {__pyx_k_HelperKernelParams___reduce_cyt, sizeof(__pyx_k_HelperKernelParams___reduce_cyt), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperKernelParams___reduce_cyt */ + {__pyx_k_HelperKernelParams___setstate_c, sizeof(__pyx_k_HelperKernelParams___setstate_c), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperKernelParams___setstate_c */ + {__pyx_k_HelperKernelParams_lambda, sizeof(__pyx_k_HelperKernelParams_lambda), 0, 1, 1}, /* PyObject cname: __pyx_n_u_HelperKernelParams_lambda */ + {__pyx_k_InputVoidPtrPtrHelper, sizeof(__pyx_k_InputVoidPtrPtrHelper), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InputVoidPtrPtrHelper */ + {__pyx_k_InputVoidPtrPtrHelper___reduce, sizeof(__pyx_k_InputVoidPtrPtrHelper___reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InputVoidPtrPtrHelper___reduce */ + {__pyx_k_InputVoidPtrPtrHelper___setstat, sizeof(__pyx_k_InputVoidPtrPtrHelper___setstat), 0, 1, 1}, /* PyObject cname: __pyx_n_u_InputVoidPtrPtrHelper___setstat */ + {__pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum */ + {__pyx_k_LTOIR, sizeof(__pyx_k_LTOIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LTOIR */ + {__pyx_k_LTOIRSizeRet, sizeof(__pyx_k_LTOIRSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_LTOIRSizeRet */ + {__pyx_k_List_is_too_small, sizeof(__pyx_k_List_is_too_small), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_List_is_too_small */ + {__pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MemoryError */ + {__pyx_k_NVRTC_ERROR_BUILTIN_OPERATION_FA, sizeof(__pyx_k_NVRTC_ERROR_BUILTIN_OPERATION_FA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_BUILTIN_OPERATION_FA */ + {__pyx_k_NVRTC_ERROR_CANCELLED, sizeof(__pyx_k_NVRTC_ERROR_CANCELLED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_CANCELLED */ + {__pyx_k_NVRTC_ERROR_COMPILATION, sizeof(__pyx_k_NVRTC_ERROR_COMPILATION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_COMPILATION */ + {__pyx_k_NVRTC_ERROR_INTERNAL_ERROR, sizeof(__pyx_k_NVRTC_ERROR_INTERNAL_ERROR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_INTERNAL_ERROR */ + {__pyx_k_NVRTC_ERROR_INVALID_INPUT, sizeof(__pyx_k_NVRTC_ERROR_INVALID_INPUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_INVALID_INPUT */ + {__pyx_k_NVRTC_ERROR_INVALID_OPTION, sizeof(__pyx_k_NVRTC_ERROR_INVALID_OPTION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_INVALID_OPTION */ + {__pyx_k_NVRTC_ERROR_INVALID_PROGRAM, sizeof(__pyx_k_NVRTC_ERROR_INVALID_PROGRAM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_INVALID_PROGRAM */ + {__pyx_k_NVRTC_ERROR_NAME_EXPRESSION_NOT, sizeof(__pyx_k_NVRTC_ERROR_NAME_EXPRESSION_NOT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_NAME_EXPRESSION_NOT */ + {__pyx_k_NVRTC_ERROR_NO_LOWERED_NAMES_BEF, sizeof(__pyx_k_NVRTC_ERROR_NO_LOWERED_NAMES_BEF), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_NO_LOWERED_NAMES_BEF */ + {__pyx_k_NVRTC_ERROR_NO_NAME_EXPRESSIONS, sizeof(__pyx_k_NVRTC_ERROR_NO_NAME_EXPRESSIONS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_NO_NAME_EXPRESSIONS */ + {__pyx_k_NVRTC_ERROR_NO_PCH_CREATE_ATTEMP, sizeof(__pyx_k_NVRTC_ERROR_NO_PCH_CREATE_ATTEMP), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_NO_PCH_CREATE_ATTEMP */ + {__pyx_k_NVRTC_ERROR_OUT_OF_MEMORY, sizeof(__pyx_k_NVRTC_ERROR_OUT_OF_MEMORY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_OUT_OF_MEMORY */ + {__pyx_k_NVRTC_ERROR_PCH_CREATE, sizeof(__pyx_k_NVRTC_ERROR_PCH_CREATE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_PCH_CREATE */ + {__pyx_k_NVRTC_ERROR_PCH_CREATE_HEAP_EXHA, sizeof(__pyx_k_NVRTC_ERROR_PCH_CREATE_HEAP_EXHA), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_PCH_CREATE_HEAP_EXHA */ + {__pyx_k_NVRTC_ERROR_PROGRAM_CREATION_FAI, sizeof(__pyx_k_NVRTC_ERROR_PROGRAM_CREATION_FAI), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_PROGRAM_CREATION_FAI */ + {__pyx_k_NVRTC_ERROR_TIME_FILE_WRITE_FAIL, sizeof(__pyx_k_NVRTC_ERROR_TIME_FILE_WRITE_FAIL), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_ERROR_TIME_FILE_WRITE_FAIL */ + {__pyx_k_NVRTC_SUCCESS, sizeof(__pyx_k_NVRTC_SUCCESS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_NVRTC_SUCCESS */ + {__pyx_k_Optional, sizeof(__pyx_k_Optional), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Optional */ + {__pyx_k_Optional_tuple_bytes_list_bytes, sizeof(__pyx_k_Optional_tuple_bytes_list_bytes), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Optional_tuple_bytes_list_bytes */ + {__pyx_k_Provided_argument_is_of_type_but, sizeof(__pyx_k_Provided_argument_is_of_type_but), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Provided_argument_is_of_type_but */ + {__pyx_k_Provided_argument_is_of_type_but_2, sizeof(__pyx_k_Provided_argument_is_of_type_but_2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Provided_argument_is_of_type_but_2 */ + {__pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_RuntimeError */ + {__pyx_k_Structure, sizeof(__pyx_k_Structure), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Structure */ + {__pyx_k_The_enumerated_type_nvrtcResult, sizeof(__pyx_k_The_enumerated_type_nvrtcResult), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_The_enumerated_type_nvrtcResult */ + {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */ + {__pyx_k_Unknown_type, sizeof(__pyx_k_Unknown_type), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unknown_type */ + {__pyx_k_Unsupported_attribute, sizeof(__pyx_k_Unsupported_attribute), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unsupported_attribute */ + {__pyx_k_Unsupported_attribute_value, sizeof(__pyx_k_Unsupported_attribute_value), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unsupported_attribute_value */ + {__pyx_k_Unsupported_type, sizeof(__pyx_k_Unsupported_type), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Unsupported_type */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ + {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ + {__pyx_k__6, sizeof(__pyx_k__6), 0, 1, 1}, /* PyObject cname: __pyx_n_u__6 */ + {__pyx_k_addressof, sizeof(__pyx_k_addressof), 0, 1, 1}, /* PyObject cname: __pyx_n_u_addressof */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_attr, sizeof(__pyx_k_attr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_attr */ + {__pyx_k_bindings, sizeof(__pyx_k_bindings), 0, 1, 1}, /* PyObject cname: __pyx_n_u_bindings */ + {__pyx_k_c_bool, sizeof(__pyx_k_c_bool), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_bool */ + {__pyx_k_c_byte, sizeof(__pyx_k_c_byte), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_byte */ + {__pyx_k_c_char, sizeof(__pyx_k_c_char), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_char */ + {__pyx_k_c_double, sizeof(__pyx_k_c_double), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_double */ + {__pyx_k_c_float, sizeof(__pyx_k_c_float), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_float */ + {__pyx_k_c_int, sizeof(__pyx_k_c_int), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_int */ + {__pyx_k_c_long, sizeof(__pyx_k_c_long), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_long */ + {__pyx_k_c_longlong, sizeof(__pyx_k_c_longlong), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_longlong */ + {__pyx_k_c_short, sizeof(__pyx_k_c_short), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_short */ + {__pyx_k_c_size_t, sizeof(__pyx_k_c_size_t), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_size_t */ + {__pyx_k_c_ubyte, sizeof(__pyx_k_c_ubyte), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_ubyte */ + {__pyx_k_c_uint, sizeof(__pyx_k_c_uint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_uint */ + {__pyx_k_c_ulong, sizeof(__pyx_k_c_ulong), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_ulong */ + {__pyx_k_c_ulonglong, sizeof(__pyx_k_c_ulonglong), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_ulonglong */ + {__pyx_k_c_ushort, sizeof(__pyx_k_c_ushort), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_ushort */ + {__pyx_k_c_void_p, sizeof(__pyx_k_c_void_p), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_void_p */ + {__pyx_k_c_wchar, sizeof(__pyx_k_c_wchar), 0, 1, 1}, /* PyObject cname: __pyx_n_u_c_wchar */ + {__pyx_k_callback, sizeof(__pyx_k_callback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_callback */ + {__pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 1, 1}, /* PyObject cname: __pyx_n_u_class_getitem */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_close, sizeof(__pyx_k_close), 0, 1, 1}, /* PyObject cname: __pyx_n_u_close */ + {__pyx_k_cptr, sizeof(__pyx_k_cptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cptr */ + {__pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ctypes */ + {__pyx_k_ctypes_2, sizeof(__pyx_k_ctypes_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ctypes_2 */ + {__pyx_k_cubin, sizeof(__pyx_k_cubin), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cubin */ + {__pyx_k_cubinSizeRet, sizeof(__pyx_k_cubinSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cubinSizeRet */ + {__pyx_k_cuda, sizeof(__pyx_k_cuda), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda */ + {__pyx_k_cuda_bindings__lib_utils_pxi, sizeof(__pyx_k_cuda_bindings__lib_utils_pxi), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings__lib_utils_pxi */ + {__pyx_k_cuda_bindings_driver, sizeof(__pyx_k_cuda_bindings_driver), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_driver */ + {__pyx_k_cuda_bindings_nvrtc, sizeof(__pyx_k_cuda_bindings_nvrtc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_nvrtc */ + {__pyx_k_cuda_bindings_nvrtc_pyx, sizeof(__pyx_k_cuda_bindings_nvrtc_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings_nvrtc_pyx */ + {__pyx_k_cuuint64_t, sizeof(__pyx_k_cuuint64_t), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuuint64_t */ + {__pyx_k_cycallback, sizeof(__pyx_k_cycallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cycallback */ + {__pyx_k_cycallback_ptr, sizeof(__pyx_k_cycallback_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cycallback_ptr */ + {__pyx_k_cyheaders, sizeof(__pyx_k_cyheaders), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cyheaders */ + {__pyx_k_cyincludeNames, sizeof(__pyx_k_cyincludeNames), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cyincludeNames */ + {__pyx_k_cyoptions, sizeof(__pyx_k_cyoptions), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cyoptions */ + {__pyx_k_cypayload, sizeof(__pyx_k_cypayload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cypayload */ + {__pyx_k_cypayload_ptr, sizeof(__pyx_k_cypayload_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cypayload_ptr */ + {__pyx_k_cyprog, sizeof(__pyx_k_cyprog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cyprog */ + {__pyx_k_cyresult, sizeof(__pyx_k_cyresult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cyresult */ + {__pyx_k_data_size, sizeof(__pyx_k_data_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_data_size */ + {__pyx_k_dict, sizeof(__pyx_k_dict), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict */ + {__pyx_k_dict_nvrtcResult, sizeof(__pyx_k_dict_nvrtcResult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_dict_nvrtcResult */ + {__pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_disable */ + {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ + {__pyx_k_driver, sizeof(__pyx_k_driver), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver */ + {__pyx_k_driver_2, sizeof(__pyx_k_driver_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_driver_2 */ + {__pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_enable */ + {__pyx_k_enum, sizeof(__pyx_k_enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enum */ + {__pyx_k_err, sizeof(__pyx_k_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_err */ + {__pyx_k_format, sizeof(__pyx_k_format), 0, 1, 1}, /* PyObject cname: __pyx_n_u_format */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_gc */ + {__pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_genexpr */ + {__pyx_k_getPtr, sizeof(__pyx_k_getPtr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getPtr */ + {__pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getstate */ + {__pyx_k_headers, sizeof(__pyx_k_headers), 0, 1, 1}, /* PyObject cname: __pyx_n_u_headers */ + {__pyx_k_hex, sizeof(__pyx_k_hex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_hex */ + {__pyx_k_idx, sizeof(__pyx_k_idx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_idx */ + {__pyx_k_includeNames, sizeof(__pyx_k_includeNames), 0, 1, 1}, /* PyObject cname: __pyx_n_u_includeNames */ + {__pyx_k_init_value, sizeof(__pyx_k_init_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_init_value */ + {__pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_initializing */ + {__pyx_k_int, sizeof(__pyx_k_int), 0, 1, 1}, /* PyObject cname: __pyx_n_u_int */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_is_getter, sizeof(__pyx_k_is_getter), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_getter */ + {__pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_isenabled */ + {__pyx_k_items, sizeof(__pyx_k_items), 0, 1, 1}, /* PyObject cname: __pyx_n_u_items */ + {__pyx_k_k, sizeof(__pyx_k_k), 0, 1, 1}, /* PyObject cname: __pyx_n_u_k */ + {__pyx_k_kernelParams, sizeof(__pyx_k_kernelParams), 0, 1, 1}, /* PyObject cname: __pyx_n_u_kernelParams */ + {__pyx_k_key, sizeof(__pyx_k_key), 0, 1, 1}, /* PyObject cname: __pyx_n_u_key */ + {__pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lambda */ + {__pyx_k_log, sizeof(__pyx_k_log), 0, 1, 1}, /* PyObject cname: __pyx_n_u_log */ + {__pyx_k_logSizeRet, sizeof(__pyx_k_logSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_logSizeRet */ + {__pyx_k_lowered_name, sizeof(__pyx_k_lowered_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lowered_name */ + {__pyx_k_lst, sizeof(__pyx_k_lst), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lst */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_major, sizeof(__pyx_k_major), 0, 1, 1}, /* PyObject cname: __pyx_n_u_major */ + {__pyx_k_max, sizeof(__pyx_k_max), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max */ + {__pyx_k_max_param_size, sizeof(__pyx_k_max_param_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_max_param_size */ + {__pyx_k_members, sizeof(__pyx_k_members), 0, 1, 1}, /* PyObject cname: __pyx_n_u_members */ + {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ + {__pyx_k_minor, sizeof(__pyx_k_minor), 0, 1, 1}, /* PyObject cname: __pyx_n_u_minor */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_name_expression, sizeof(__pyx_k_name_expression), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_expression */ + {__pyx_k_next, sizeof(__pyx_k_next), 0, 1, 1}, /* PyObject cname: __pyx_n_u_next */ + {__pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_no_default___reduce___due_to_non */ + {__pyx_k_numArchs, sizeof(__pyx_k_numArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numArchs */ + {__pyx_k_numHeaders, sizeof(__pyx_k_numHeaders), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numHeaders */ + {__pyx_k_numOptions, sizeof(__pyx_k_numOptions), 0, 1, 1}, /* PyObject cname: __pyx_n_u_numOptions */ + {__pyx_k_nvrtcAddNameExpression, sizeof(__pyx_k_nvrtcAddNameExpression), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcAddNameExpression */ + {__pyx_k_nvrtcCompileProgram, sizeof(__pyx_k_nvrtcCompileProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCompileProgram */ + {__pyx_k_nvrtcCompileProgram_locals_genex, sizeof(__pyx_k_nvrtcCompileProgram_locals_genex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCompileProgram_locals_genex */ + {__pyx_k_nvrtcCreateProgram, sizeof(__pyx_k_nvrtcCreateProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCreateProgram */ + {__pyx_k_nvrtcCreateProgram_locals_genexp, sizeof(__pyx_k_nvrtcCreateProgram_locals_genexp), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcCreateProgram_locals_genexp */ + {__pyx_k_nvrtcDestroyProgram, sizeof(__pyx_k_nvrtcDestroyProgram), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcDestroyProgram */ + {__pyx_k_nvrtcGetCUBIN, sizeof(__pyx_k_nvrtcGetCUBIN), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetCUBIN */ + {__pyx_k_nvrtcGetCUBINSize, sizeof(__pyx_k_nvrtcGetCUBINSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetCUBINSize */ + {__pyx_k_nvrtcGetErrorString, sizeof(__pyx_k_nvrtcGetErrorString), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetErrorString */ + {__pyx_k_nvrtcGetLTOIR, sizeof(__pyx_k_nvrtcGetLTOIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLTOIR */ + {__pyx_k_nvrtcGetLTOIRSize, sizeof(__pyx_k_nvrtcGetLTOIRSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLTOIRSize */ + {__pyx_k_nvrtcGetLoweredName, sizeof(__pyx_k_nvrtcGetLoweredName), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetLoweredName */ + {__pyx_k_nvrtcGetNVVM, sizeof(__pyx_k_nvrtcGetNVVM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNVVM */ + {__pyx_k_nvrtcGetNVVMSize, sizeof(__pyx_k_nvrtcGetNVVMSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNVVMSize */ + {__pyx_k_nvrtcGetNumSupportedArchs, sizeof(__pyx_k_nvrtcGetNumSupportedArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetNumSupportedArchs */ + {__pyx_k_nvrtcGetOptiXIR, sizeof(__pyx_k_nvrtcGetOptiXIR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetOptiXIR */ + {__pyx_k_nvrtcGetOptiXIRSize, sizeof(__pyx_k_nvrtcGetOptiXIRSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetOptiXIRSize */ + {__pyx_k_nvrtcGetPCHCreateStatus, sizeof(__pyx_k_nvrtcGetPCHCreateStatus), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHCreateStatus */ + {__pyx_k_nvrtcGetPCHHeapSize, sizeof(__pyx_k_nvrtcGetPCHHeapSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHHeapSize */ + {__pyx_k_nvrtcGetPCHHeapSizeRequired, sizeof(__pyx_k_nvrtcGetPCHHeapSizeRequired), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPCHHeapSizeRequired */ + {__pyx_k_nvrtcGetPTX, sizeof(__pyx_k_nvrtcGetPTX), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPTX */ + {__pyx_k_nvrtcGetPTXSize, sizeof(__pyx_k_nvrtcGetPTXSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetPTXSize */ + {__pyx_k_nvrtcGetProgramLog, sizeof(__pyx_k_nvrtcGetProgramLog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetProgramLog */ + {__pyx_k_nvrtcGetProgramLogSize, sizeof(__pyx_k_nvrtcGetProgramLogSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetProgramLogSize */ + {__pyx_k_nvrtcGetSupportedArchs, sizeof(__pyx_k_nvrtcGetSupportedArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcGetSupportedArchs */ + {__pyx_k_nvrtcProgram, sizeof(__pyx_k_nvrtcProgram), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_nvrtcProgram */ + {__pyx_k_nvrtcProgram_2, sizeof(__pyx_k_nvrtcProgram_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcProgram_2 */ + {__pyx_k_nvrtcProgram___reduce_cython, sizeof(__pyx_k_nvrtcProgram___reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcProgram___reduce_cython */ + {__pyx_k_nvrtcProgram___setstate_cython, sizeof(__pyx_k_nvrtcProgram___setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcProgram___setstate_cython */ + {__pyx_k_nvrtcProgram_getPtr, sizeof(__pyx_k_nvrtcProgram_getPtr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcProgram_getPtr */ + {__pyx_k_nvrtcResult, sizeof(__pyx_k_nvrtcResult), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcResult */ + {__pyx_k_nvrtcSetFlowCallback, sizeof(__pyx_k_nvrtcSetFlowCallback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcSetFlowCallback */ + {__pyx_k_nvrtcSetPCHHeapSize, sizeof(__pyx_k_nvrtcSetPCHHeapSize), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcSetPCHHeapSize */ + {__pyx_k_nvrtcVersion, sizeof(__pyx_k_nvrtcVersion), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvrtcVersion */ + {__pyx_k_nvvm, sizeof(__pyx_k_nvvm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvm */ + {__pyx_k_nvvmSizeRet, sizeof(__pyx_k_nvvmSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmSizeRet */ + {__pyx_k_objType, sizeof(__pyx_k_objType), 0, 1, 1}, /* PyObject cname: __pyx_n_u_objType */ + {__pyx_k_options, sizeof(__pyx_k_options), 0, 1, 1}, /* PyObject cname: __pyx_n_u_options */ + {__pyx_k_optixir, sizeof(__pyx_k_optixir), 0, 1, 1}, /* PyObject cname: __pyx_n_u_optixir */ + {__pyx_k_optixirSizeRet, sizeof(__pyx_k_optixirSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_optixirSizeRet */ + {__pyx_k_payload, sizeof(__pyx_k_payload), 0, 1, 1}, /* PyObject cname: __pyx_n_u_payload */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_pprog, sizeof(__pyx_k_pprog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pprog */ + {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ + {__pyx_k_prog, sizeof(__pyx_k_prog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prog */ + {__pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptr */ + {__pyx_k_ptr_2, sizeof(__pyx_k_ptr_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptr_2 */ + {__pyx_k_ptx, sizeof(__pyx_k_ptx), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptx */ + {__pyx_k_ptxSizeRet, sizeof(__pyx_k_ptxSizeRet), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ptxSizeRet */ + {__pyx_k_pyObj, sizeof(__pyx_k_pyObj), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyObj */ + {__pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pyx_state */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_range, sizeof(__pyx_k_range), 0, 1, 1}, /* PyObject cname: __pyx_n_u_range */ + {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ + {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */ + {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */ + {__pyx_k_result, sizeof(__pyx_k_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_result */ + {__pyx_k_ret, sizeof(__pyx_k_ret), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ret */ + {__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */ + {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ + {__pyx_k_send, sizeof(__pyx_k_send), 0, 1, 1}, /* PyObject cname: __pyx_n_u_send */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate */ + {__pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_setstate_cython */ + {__pyx_k_size, sizeof(__pyx_k_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size */ + {__pyx_k_sizeof, sizeof(__pyx_k_sizeof), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sizeof */ + {__pyx_k_spec, sizeof(__pyx_k_spec), 0, 1, 1}, /* PyObject cname: __pyx_n_u_spec */ + {__pyx_k_src, sizeof(__pyx_k_src), 0, 1, 1}, /* PyObject cname: __pyx_n_u_src */ + {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */ + {__pyx_k_supportedArchs, sizeof(__pyx_k_supportedArchs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_supportedArchs */ + {__pyx_k_supported_types, sizeof(__pyx_k_supported_types), 0, 1, 1}, /* PyObject cname: __pyx_n_u_supported_types */ + {__pyx_k_t, sizeof(__pyx_k_t), 0, 1, 1}, /* PyObject cname: __pyx_n_u_t */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_throw, sizeof(__pyx_k_throw), 0, 1, 1}, /* PyObject cname: __pyx_n_u_throw */ + {__pyx_k_typing, sizeof(__pyx_k_typing), 0, 1, 1}, /* PyObject cname: __pyx_n_u_typing */ + {__pyx_k_v, sizeof(__pyx_k_v), 0, 1, 1}, /* PyObject cname: __pyx_n_u_v */ + {__pyx_k_value, sizeof(__pyx_k_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value */ + {__pyx_k_x, sizeof(__pyx_k_x), 0, 1, 1}, /* PyObject cname: __pyx_n_u_x */ + {__pyx_k_zip, sizeof(__pyx_k_zip), 0, 1, 1}, /* PyObject cname: __pyx_n_u_zip */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(1, 41, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 18, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 55, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 61, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(1, 70, __pyx_L1_error) + __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 188, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 92, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "cuda/bindings/nvrtc.pyx":18 + * from cpython.bytes cimport PyBytes_FromStringAndSize + * + * import cuda.bindings.driver as _driver # <<<<<<<<<<<<<< + * _driver = _driver.__dict__ + * include "_lib/utils.pxi" +*/ + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_cuda, __pyx_mstate_global->__pyx_n_u_bindings, __pyx_mstate_global->__pyx_n_u_driver_2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_mstate->__pyx_int_0 = PyLong_FromLong(0); if (unlikely(!__pyx_mstate->__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_int_1024 = PyLong_FromLong(1024); if (unlikely(!__pyx_mstate->__pyx_int_1024)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 4; + unsigned int flags : 10; + unsigned int first_line : 10; + unsigned int line_table_length : 13; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 70, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_k, __pyx_mstate->__pyx_n_u_v}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 233, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 236, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 313, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_x}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 41, 15}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_t}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_lambda, __pyx_k_U_eellmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 187, 85}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_t_s_4w_1_4q_Q_4q_1_WAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224, 90}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_idx}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_4w_Q_4q_q_1D_auD_uAS_PQQR_1_WA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 295, 212}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_t_s_4w_1_4q_Q_4q_Q_4q_Q_T_Q_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 349, 59}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_t_s_4w_A_4q_1_WAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 528, 110}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_C1_4q_C1_4q_C1_T_C1_4q_C1_4q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 590, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_size, __pyx_k_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 593, 79}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings__lib_utils_pxi, __pyx_mstate->__pyx_n_u_pyObj, __pyx_k_A_t_s_4y_A_4q_a_4q_1_WAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 103, 11}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_getPtr, __pyx_k_A_z_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 106, 37}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_cyresult, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetErrorString, __pyx_k_a_K_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 127, 69}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_major, __pyx_mstate->__pyx_n_u_minor, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcVersion, __pyx_k_Q_Q_1G1A_t_Q_a_QfG1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 149, 57}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_numArchs, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetNumSupportedArchs, __pyx_k_q_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 170, 73}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_supportedArchs, __pyx_mstate->__pyx_n_u__6, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetSupportedArchs, __pyx_k_t_A_A_5_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194, 291}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_src, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_numHeaders, __pyx_mstate->__pyx_n_u_headers, __pyx_mstate->__pyx_n_u_includeNames, __pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyheaders, __pyx_mstate->__pyx_n_u_cyincludeNames, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcCreateProgram, __pyx_k_H_J_6_c_1_iq_fHCz_iq_Cq_A5K2SPQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249, 133}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcDestroyProgram, __pyx_k_uCq_1G1_G1_1G1_iq_vvxx_A_A_B_B, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 282, 184}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_numOptions, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_cyoptions, __pyx_mstate->__pyx_n_u_err, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcCompileProgram, __pyx_k_89_fHCz_iq_uCq_1G1_1A_1L_Q_Cq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 329, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_ptxSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetPTXSize, __pyx_k_uCq_1G1_1A_1L_Q_Q_Qhaq_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 366, 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_ptx, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetPTX, __pyx_k_uCq_1G1_1A_1L_Q_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 400, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_cubinSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetCUBINSize, __pyx_k_uCq_1G1_1A_1L_Q_q_q_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 437, 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cubin, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetCUBIN, __pyx_k_uCq_1G1_1A_1L_Q_1HA_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 471, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_nvvmSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetNVVMSize, __pyx_k_uCq_1G1_1A_1L_Q_a_axq_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 502, 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_nvvm, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetNVVM, __pyx_k_uCq_1G1_1A_1L_Q_81_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 530, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_LTOIRSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetLTOIRSize, __pyx_k_uCq_1G1_1A_1L_Q_q_q_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 567, 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_LTOIR, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetLTOIR, __pyx_k_uCq_1G1_1A_1L_Q_1HA_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 601, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_optixirSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetOptiXIRSize, __pyx_k_uCq_1G1_1A_1L_Q_1_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 638, 84}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_optixir, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetOptiXIR, __pyx_k_uCq_1G1_1A_1L_Q_Qha_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 672, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_logSizeRet, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetProgramLogSize, __pyx_k_4_uCq_1G1_1A_1L_Q_Q_AXQa_t_Q_Qf, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 712, 84}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_log, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetProgramLog, __pyx_k_uCq_1G1_1A_1L_Q_Qa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 746, 84}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_name_expression, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcAddNameExpression, __pyx_k_8_uCq_1G1_1A_1L_Q_AXQ_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 785, 129}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_name_expression, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_lowered_name, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetLoweredName, __pyx_k_8_uCq_1G1_1A_1L_Q_A_2C1A_t_Q_Qf, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 827, 57}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_ret, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetPCHHeapSize, __pyx_k_a_1_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 846, 27}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcSetPCHHeapSize, __pyx_k_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 868, 83}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetPCHCreateStatus, __pyx_k_D_uCq_1G1_1A_1L_Q_Qa_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 913, 114}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcGetPCHHeapSizeRequired, __pyx_k_uCq_1G1_1A_1L_Q_q_1_1_t_Q_QfA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 947, 130}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_payload, __pyx_mstate->__pyx_n_u_cyprog, __pyx_mstate->__pyx_n_u_pprog, __pyx_mstate->__pyx_n_u_cycallback, __pyx_mstate->__pyx_n_u_cycallback_ptr, __pyx_mstate->__pyx_n_u_cypayload, __pyx_mstate->__pyx_n_u_cypayload_ptr, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_nvrtcSetFlowCallback, __pyx_k_V_uCq_1G1_1A_1L_Q_AQ_z_1_1A_wj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1005, 36}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_objType}; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvrtc_pyx, __pyx_mstate->__pyx_n_u_sizeof, __pyx_k_xs_q_1_Rs_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* AssertionsEnabled.init */ + if (likely(__Pyx_init_assertions_enabled() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* IterFinish */ +static CYTHON_INLINE int __Pyx_IterFinish(void) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_CurrentExceptionType(); + if (unlikely(exc_type)) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return -1; + __Pyx_PyErr_Clear(); + return 0; + } + return 0; +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* PyObjectCallNoArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { + PyObject *arg[2] = {NULL, NULL}; + return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + __Pyx_TypeName type_name; + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR + if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (likely(descr != NULL)) { + *method = descr; + return 0; + } + type_name = __Pyx_PyType_GetFullyQualifiedName(tp); + PyErr_Format(PyExc_AttributeError, + "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", + type_name, name); + __Pyx_DECREF_TypeName(type_name); + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[1] = {obj}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_CallNoArg; + return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +#endif +} + +/* RaiseNeedMoreValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/* RaiseTooManyValuesToUnpack */ +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/* UnpackItemEndCheck */ +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } + return __Pyx_IterFinish(); +} + +/* RaiseNoneIterError */ +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/* UnpackTupleError */ +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else { + Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(size < 0)) return; + #endif + if (size < index) { + __Pyx_RaiseNeedMoreValuesError(size); + } else { + __Pyx_RaiseTooManyValuesError(index); + } + } +} + +/* UnpackTuple2 */ +static CYTHON_INLINE int __Pyx_unpack_tuple2( + PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { + if (likely(is_tuple || PyTuple_Check(tuple))) { + Py_ssize_t size; + if (has_known_size) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + size = __Pyx_PyTuple_GET_SIZE(tuple); + if (likely(size == 2)) { + return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); + } + if (size >= 0) { + __Pyx_UnpackTupleError(tuple, 2); + } + return -1; + } else { + return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); + } +} +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS + value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + iternext = __Pyx_PyObject_GetIterNextFunc(iter); + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + +/* dict_iter */ +#if CYTHON_COMPILING_IN_PYPY +#include +#endif +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#else + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} +#if !CYTHON_COMPILING_IN_PYPY +static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + #if CYTHON_ASSUME_SAFE_MACROS + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + #else + if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { + Py_DECREF(value); + Py_DECREF(tuple); + return -1; + } + if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { + Py_DECREF(tuple); + return -1; + } + #endif + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; +} +#endif +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + int result; +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(iter_obj); +#endif + result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); +#if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); +#endif + return result; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) return -1; + #endif + if (unlikely(pos >= tuple_size)) return 0; + *ppos = pos + 1; + #if CYTHON_ASSUME_SAFE_MACROS + next_item = PyTuple_GET_ITEM(iter_obj, pos); + #else + next_item = PyTuple_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #endif + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(list_size < 0)) return -1; + #endif + if (unlikely(pos >= list_size)) return 0; + *ppos = pos + 1; + #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + next_item = PyList_GetItemRef(iter_obj, pos); + if (unlikely(!next_item)) return -1; + #elif CYTHON_ASSUME_SAFE_MACROS + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + #else + next_item = PyList_GetItem(iter_obj, pos); + if (unlikely(!next_item)) return -1; + Py_INCREF(next_item); + #endif + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + +/* RaiseUnboundLocalError */ +static void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} + +/* GetException */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type = NULL, *local_value, *local_tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if PY_VERSION_HEX >= 0x030C0000 + local_value = tstate->current_exception; + tstate->current_exception = 0; + #else + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + #endif +#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 + local_value = PyErr_GetRaisedException(); +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif +#if __PYX_LIMITED_VERSION_HEX > 0x030C0000 + if (likely(local_value)) { + local_type = (PyObject*) Py_TYPE(local_value); + Py_INCREF(local_type); + local_tb = PyException_GetTraceback(local_value); + } +#else + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } +#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 + Py_XINCREF(local_tb); + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + #if PY_VERSION_HEX >= 0x030B00a4 + tmp_value = exc_info->exc_value; + exc_info->exc_value = local_value; + tmp_type = NULL; + tmp_tb = NULL; + Py_XDECREF(local_type); + Py_XDECREF(local_tb); + #else + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + #endif + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + PyErr_SetHandledException(local_value); + Py_XDECREF(local_value); + Py_XDECREF(local_type); + Py_XDECREF(local_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +#endif +} + +/* pep479 */ +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc, *new_exc; + __Pyx_PyThreadState_declare + int is_async_stopiteration = 0; + CYTHON_MAYBE_UNUSED_VAR(in_async_gen); + __Pyx_PyThreadState_assign + cur_exc = __Pyx_PyErr_CurrentExceptionType(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else { + return; + } + } + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(tb); + new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + "generator raised StopIteration"); + if (!new_exc) { + Py_XDECREF(val); + return; + } + PyException_SetCause(new_exc, val); // steals ref to val + PyErr_SetObject(PyExc_RuntimeError, new_exc); +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; itype, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (unlikely(!j)) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + return __Pyx_PyList_GetItemRef(o, n); + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; + PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; + if (mm && mm->mp_subscript) { + PyObject *r, *key = PyLong_FromSsize_t(i); + if (unlikely(!key)) return NULL; + r = mm->mp_subscript(o, key); + Py_DECREF(key); + return r; + } + if (likely(sm && sm->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { + Py_ssize_t l = sm->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return sm->sq_item(o, i); + } + } +#else + if (is_list || !PyMapping_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); +} + +/* GetAttr3 */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int res = PyObject_GetOptionalAttr(o, n, &r); + return (res != 0) ? r : __Pyx_NewRef(d); +#else + #if CYTHON_USE_TYPE_SLOTS + if (likely(PyUnicode_Check(n))) { + r = __Pyx_PyObject_GetAttrStrNoError(o, n); + if (unlikely(!r) && likely(!PyErr_Occurred())) { + r = __Pyx_NewRef(d); + } + return r; + } + #endif + r = PyObject_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +#endif +} + +/* PyLongCompare */ +static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(inplace); + if (op1 == op2) { + return 1; + } + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); + const digit* digits = __Pyx_PyLong_Digits(op1); + if (intval == 0) { + return (__Pyx_PyLong_IsZero(op1) == 1); + } else if (intval < 0) { + if (__Pyx_PyLong_IsNonNeg(op1)) + return 0; + intval = -intval; + } else { + if (__Pyx_PyLong_IsNeg(op1)) + return 0; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + return (unequal == 0); + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(op1); + return ((double)a == (double)b); + } + return __Pyx_PyObject_IsTrueAndDecref( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + +/* PyLongBinop */ +#if !CYTHON_COMPILING_IN_PYPY +static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { + return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); +} +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(inplace); + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + long a, x; +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG llb = intval; + PY_LONG_LONG lla, llx; +#endif + if (unlikely(__Pyx_PyLong_IsZero(op1))) { + return __Pyx_NewRef(op2); + } + if (unlikely(!__Pyx_PyLong_CompactAsLong(op1, &a))) { + const digit* digits = __Pyx_PyLong_Digits(op1); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); + switch (size) { + case -2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 2: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 3: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case -4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + case 4: + if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); + break; + #ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { + lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + goto long_long; + #endif + } + CYTHON_FALLTHROUGH; + default: return PyLong_Type.tp_as_number->nb_add(op1, op2); + } + } + x = a + b; + return PyLong_FromLong(x); +#ifdef HAVE_LONG_LONG + long_long: + llx = lla + llb; + return PyLong_FromLongLong(llx); +#endif + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); + + +} +#endif +static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { + CYTHON_UNUSED_VAR(zerodivision_check); + const long b = intval; + double a = __Pyx_PyFloat_AS_DOUBLE(float_val); + double result; + + result = ((double)a) + (double)b; + return PyFloat_FromDouble(result); +} +static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { + CYTHON_MAYBE_UNUSED_VAR(intval); + CYTHON_UNUSED_VAR(zerodivision_check); + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); + } + #endif + if (PyFloat_CheckExact(op1)) { + return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); + } + return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); +} +#endif + +/* RejectKeywords */ +static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { + PyObject *key = NULL; + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { + key = __Pyx_PySequence_ITEM(kwds, 0); + } else { + Py_ssize_t pos = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; +#endif + PyDict_Next(kwds, &pos, &key, NULL); + Py_INCREF(key); + } + if (likely(key)) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + Py_DECREF(key); + } +} + +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + __Pyx_TypeName obj_type_name; + __Pyx_TypeName type_name; + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + type_name = __Pyx_PyType_GetFullyQualifiedName(type); + PyErr_Format(PyExc_TypeError, + "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, + obj_type_name, type_name); + __Pyx_DECREF_TypeName(obj_type_name); + __Pyx_DECREF_TypeName(type_name); + return 0; +} + +/* RaiseUnexpectedTypeError */ +static int +__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) +{ + __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, + expected, obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return 0; +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + const char* function_name, + PyObject *kw) +{ +#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments) + CYTHON_UNUSED_VAR(function_name); + CYTHON_UNUSED_VAR(kw); + return 0; +#else + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { +#if PY_VERSION_HEX >= 0x03090000 + CYTHON_UNUSED_VAR(function_name); +#else + Py_ssize_t kwsize; + #if CYTHON_ASSUME_SAFE_SIZE + kwsize = PyTuple_GET_SIZE(kw); + #else + kwsize = PyTuple_Size(kw); + if (unlikely(kwsize < 0)) return -1; + #endif + for (Py_ssize_t pos = 0; pos < kwsize; pos++) { + PyObject* key = NULL; + #if CYTHON_ASSUME_SAFE_MACROS + key = PyTuple_GET_ITEM(kw, pos); + #else + key = PyTuple_GetItem(kw, pos); + if (unlikely(!key)) return -1; + #endif + if (unlikely(!PyUnicode_Check(key))) { + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return -1; + } + } +#endif + } else { + if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1; + } + return 0; +#endif +} + +/* UnicodeConcatInPlace */ +# if CYTHON_COMPILING_IN_CPYTHON +static int +__Pyx_unicode_modifiable(PyObject *unicode) +{ + if (Py_REFCNT(unicode) != 1) + return 0; + if (!PyUnicode_CheckExact(unicode)) + return 0; + if (PyUnicode_CHECK_INTERNED(unicode)) + return 0; + return 1; +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right + #if CYTHON_REFNANNY + , void* __pyx_refnanny + #endif + ) { + PyObject *left = *p_left; + Py_ssize_t left_len, right_len, new_len; + if (unlikely(__Pyx_PyUnicode_READY(left) == -1)) + return NULL; + if (unlikely(__Pyx_PyUnicode_READY(right) == -1)) + return NULL; + left_len = PyUnicode_GET_LENGTH(left); + if (left_len == 0) { + Py_INCREF(right); + return right; + } + right_len = PyUnicode_GET_LENGTH(right); + if (right_len == 0) { + Py_INCREF(left); + return left; + } + if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) { + PyErr_SetString(PyExc_OverflowError, + "strings are too large to concat"); + return NULL; + } + new_len = left_len + right_len; + if (__Pyx_unicode_modifiable(left) + && PyUnicode_CheckExact(right) + && PyUnicode_KIND(right) <= PyUnicode_KIND(left) + && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { + int ret; + __Pyx_GIVEREF(*p_left); + ret = PyUnicode_Resize(p_left, new_len); + __Pyx_GOTREF(*p_left); + if (unlikely(ret != 0)) + return NULL; + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL; + #else + _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len); + #endif + __Pyx_INCREF(*p_left); + __Pyx_GIVEREF(*p_left); + return *p_left; + } else { + return __Pyx_PyUnicode_Concat(left, right); + } + } +#endif + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* ObjectGetItem */ +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { + PyObject *runerr = NULL; + Py_ssize_t key_value; + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, + "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); + __Pyx_DECREF_TypeName(index_type_name); + } + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { + __Pyx_TypeName obj_type_name; + if (likely(PyType_Check(obj))) { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); + if (!meth) { + PyErr_Clear(); + } else { + PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); + Py_DECREF(meth); + return result; + } + } + obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); + PyErr_Format(PyExc_TypeError, + "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); + __Pyx_DECREF_TypeName(obj_type_name); + return NULL; +} +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { + PyTypeObject *tp = Py_TYPE(obj); + PyMappingMethods *mm = tp->tp_as_mapping; + PySequenceMethods *sm = tp->tp_as_sequence; + if (likely(mm && mm->mp_subscript)) { + return mm->mp_subscript(obj, key); + } + if (likely(sm && sm->sq_item)) { + return __Pyx_PyObject_GetIndex(obj, key); + } + return __Pyx_PyObject_GetItem_Slow(obj, key); +} +#endif + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* ValidateBasesTuple */ +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS +static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { + Py_ssize_t i, n; +#if CYTHON_ASSUME_SAFE_SIZE + n = PyTuple_GET_SIZE(bases); +#else + n = PyTuple_Size(bases); + if (unlikely(n < 0)) return -1; +#endif + for (i = 1; i < n; i++) + { + PyTypeObject *b; +#if CYTHON_AVOID_BORROWED_REFS + PyObject *b0 = PySequence_GetItem(bases, i); + if (!b0) return -1; +#elif CYTHON_ASSUME_SAFE_MACROS + PyObject *b0 = PyTuple_GET_ITEM(bases, i); +#else + PyObject *b0 = PyTuple_GetItem(bases, i); + if (!b0) return -1; +#endif + b = (PyTypeObject*) b0; + if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); + __Pyx_DECREF_TypeName(b_name); +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + if (dictoffset == 0) + { + Py_ssize_t b_dictoffset = 0; +#if CYTHON_USE_TYPE_SLOTS + b_dictoffset = b->tp_dictoffset; +#else + PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); + if (!py_b_dictoffset) goto dictoffset_return; + b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); + Py_DECREF(py_b_dictoffset); + if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; +#endif + if (b_dictoffset) { + { + __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, " + "but base type '" __Pyx_FMT_TYPENAME "' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + type_name, b_name); + __Pyx_DECREF_TypeName(b_name); + } +#if !CYTHON_USE_TYPE_SLOTS + dictoffset_return: +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + return -1; + } + } +#if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(b0); +#endif + } + return 0; +} +#endif + +/* PyType_Ready */ +CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { + while (t) { + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases) { + return 1; + } + t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); + } + return 0; +} +static int __Pyx_PyType_Ready(PyTypeObject *t) { +#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) + (void)__Pyx_PyObject_CallMethod0; +#if CYTHON_USE_TYPE_SPECS + (void)__Pyx_validate_bases_tuple; +#endif + return PyType_Ready(t); +#else + int r; + if (!__Pyx_PyType_HasMultipleInheritance(t)) { + return PyType_Ready(t); + } + PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); + if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) + return -1; +#if !defined(PYSTON_MAJOR_VERSION) + { + int gc_was_enabled; + #if PY_VERSION_HEX >= 0x030A00b1 + gc_was_enabled = PyGC_Disable(); + (void)__Pyx_PyObject_CallMethod0; + #else + PyObject *ret, *py_status; + PyObject *gc = NULL; + #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ + !CYTHON_COMPILING_IN_GRAAL + gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); + #endif + if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); + if (unlikely(!gc)) return -1; + py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + #endif + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#if PY_VERSION_HEX >= 0x030A0000 + t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; +#endif +#else + (void)__Pyx_PyObject_CallMethod0; +#endif + r = PyType_Ready(t); +#if !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + #if PY_VERSION_HEX >= 0x030A00b1 + if (gc_was_enabled) + PyGC_Enable(); + #else + if (gc_was_enabled) { + PyObject *tp, *v, *tb; + PyErr_Fetch(&tp, &v, &tb); + ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + PyErr_Restore(tp, v, tb); + } else { + Py_XDECREF(tp); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + #endif + } +#endif + return r; +#endif +} + +/* DelItemOnTypeDict */ +static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_DelItem(tp_dict, k); + if (likely(!result)) PyType_Modified(tp); + return result; +} + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + Py_XDECREF(name_attr); + return ret; +} +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); + if (likely(reduce_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } + setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); + if (likely(setstate_cython)) { + ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; +__PYX_BAD: + if (!PyErr_Occurred()) { + __Pyx_TypeName type_obj_name = + __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); + PyErr_Format(PyExc_RuntimeError, + "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); + __Pyx_DECREF_TypeName(type_obj_name); + } + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* TypeImport */ +#ifndef __PYX_HAVE_RT_ImportType_3_1_5 +#define __PYX_HAVE_RT_ImportType_3_1_5 +static PyTypeObject *__Pyx_ImportType_3_1_5(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_5 check_size) +{ + PyObject *result = 0; + Py_ssize_t basicsize; + Py_ssize_t itemsize; +#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) + PyObject *py_basicsize; + PyObject *py_itemsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) + basicsize = ((PyTypeObject *)result)->tp_basicsize; + itemsize = ((PyTypeObject *)result)->tp_itemsize; +#else + if (size == 0) { + return (PyTypeObject *)result; + } + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; + py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); + if (!py_itemsize) + goto bad; + itemsize = PyLong_AsSsize_t(py_itemsize); + Py_DECREF(py_itemsize); + py_itemsize = 0; + if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if (itemsize) { + if (size % alignment) { + alignment = size % alignment; + } + if (itemsize < (Py_ssize_t)alignment) + itemsize = (Py_ssize_t)alignment; + } + if ((size_t)(basicsize + itemsize) < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize+itemsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_5 && + ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd-%zd from PyObject", + module_name, class_name, size, basicsize, basicsize+itemsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_5 && (size_t)basicsize > size) { + if (PyErr_WarnFormat(NULL, 0, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize) < 0) { + goto bad; + } + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* ImportDottedModule */ +static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { + PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; + Py_ssize_t size; + if (unlikely(PyErr_Occurred())) { + PyErr_Clear(); + } +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(parts_tuple); +#else + size = PyTuple_Size(parts_tuple); + if (size < 0) goto bad; +#endif + if (likely(size == count)) { + partial_name = name; + } else { + slice = PySequence_GetSlice(parts_tuple, 0, count); + if (unlikely(!slice)) + goto bad; + sep = PyUnicode_FromStringAndSize(".", 1); + if (unlikely(!sep)) + goto bad; + partial_name = PyUnicode_Join(sep, slice); + } + PyErr_Format( + PyExc_ModuleNotFoundError, + "No module named '%U'", partial_name); +bad: + Py_XDECREF(sep); + Py_XDECREF(slice); + Py_XDECREF(partial_name); + return NULL; +} +static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { + PyObject *imported_module; +#if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + return NULL; + imported_module = __Pyx_PyDict_GetItemStr(modules, name); + Py_XINCREF(imported_module); +#else + imported_module = PyImport_GetModule(name); +#endif + return imported_module; +} +static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { + Py_ssize_t i, nparts; +#if CYTHON_ASSUME_SAFE_SIZE + nparts = PyTuple_GET_SIZE(parts_tuple); +#else + nparts = PyTuple_Size(parts_tuple); + if (nparts < 0) return NULL; +#endif + for (i=1; i < nparts && module; i++) { + PyObject *part, *submodule; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + part = PyTuple_GET_ITEM(parts_tuple, i); +#else + part = __Pyx_PySequence_ITEM(parts_tuple, i); + if (!part) return NULL; +#endif + submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(part); +#endif + Py_DECREF(module); + module = submodule; + } + if (unlikely(!module)) { + return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); + } + return module; +} +static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { + PyObject *imported_module; + PyObject *module = __Pyx_Import(name, NULL, 0); + if (!parts_tuple || unlikely(!module)) + return module; + imported_module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(imported_module)) { + Py_DECREF(module); + return imported_module; + } + PyErr_Clear(); + return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); +} +static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *module = __Pyx__ImportDottedModule_Lookup(name); + if (likely(module)) { + PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_mstate_global->__pyx_n_u_spec); + if (likely(spec)) { + PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_mstate_global->__pyx_n_u_initializing); + if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { + Py_DECREF(spec); + spec = NULL; + } + Py_XDECREF(unsafe); + } + if (likely(!spec)) { + PyErr_Clear(); + return module; + } + Py_DECREF(spec); + Py_DECREF(module); + } else if (PyErr_Occurred()) { + PyErr_Clear(); + } +#endif + return __Pyx__ImportDottedModule(name, parts_tuple); +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvrtcResult(nvrtcResult value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const nvrtcResult neg_one = (nvrtcResult) -1, const_zero = (nvrtcResult) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(nvrtcResult) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(nvrtcResult) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(nvrtcResult) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(nvrtcResult) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(nvrtcResult) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(nvrtcResult), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(nvrtcResult)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyLong_As_unsigned_PY_LONG_LONG(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_LONG) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned PY_LONG_LONG) -1; + val = __Pyx_PyLong_As_unsigned_PY_LONG_LONG(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) >= 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned PY_LONG_LONG) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) (((unsigned PY_LONG_LONG)-1)*(((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned PY_LONG_LONG) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned PY_LONG_LONG, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned PY_LONG_LONG) ((((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned PY_LONG_LONG, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + unsigned PY_LONG_LONG val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned PY_LONG_LONG) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned PY_LONG_LONG) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned PY_LONG_LONG) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned PY_LONG_LONG) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned PY_LONG_LONG) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned PY_LONG_LONG) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned PY_LONG_LONG) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned PY_LONG_LONG) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned PY_LONG_LONG) 1) << (sizeof(unsigned PY_LONG_LONG) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned PY_LONG_LONG) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG) -1, const_zero = (unsigned PY_LONG_LONG) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned PY_LONG_LONG) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned PY_LONG_LONG) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned PY_LONG_LONG), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned PY_LONG_LONG)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUmemPool_attribute_enum __Pyx_PyLong_As_enum__CUmemPool_attribute_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmemPool_attribute_enum neg_one = (enum CUmemPool_attribute_enum) -1, const_zero = (enum CUmemPool_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUmemPool_attribute_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUmemPool_attribute_enum) -1; + val = __Pyx_PyLong_As_enum__CUmemPool_attribute_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUmemPool_attribute_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) ((((((enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) ((((((((enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) (((enum CUmemPool_attribute_enum)-1)*(((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmemPool_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemPool_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemPool_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmemPool_attribute_enum) ((((((((((enum CUmemPool_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemPool_attribute_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUmemPool_attribute_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmemPool_attribute_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemPool_attribute_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUmemPool_attribute_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUmemPool_attribute_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUmemPool_attribute_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUmemPool_attribute_enum"); + return (enum CUmemPool_attribute_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUmemPool_attribute_enum"); + return (enum CUmemPool_attribute_enum) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmemPool_attribute_enum(enum CUmemPool_attribute_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmemPool_attribute_enum neg_one = (enum CUmemPool_attribute_enum) -1, const_zero = (enum CUmemPool_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUmemPool_attribute_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUmemPool_attribute_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUmemPool_attribute_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUmemPool_attribute_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUmem_range_attribute_enum __Pyx_PyLong_As_enum__CUmem_range_attribute_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmem_range_attribute_enum neg_one = (enum CUmem_range_attribute_enum) -1, const_zero = (enum CUmem_range_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUmem_range_attribute_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUmem_range_attribute_enum) -1; + val = __Pyx_PyLong_As_enum__CUmem_range_attribute_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUmem_range_attribute_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) ((((((enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) ((((((((enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) (((enum CUmem_range_attribute_enum)-1)*(((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmem_range_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmem_range_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmem_range_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmem_range_attribute_enum) ((((((((((enum CUmem_range_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUmem_range_attribute_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUmem_range_attribute_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmem_range_attribute_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmem_range_attribute_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUmem_range_attribute_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUmem_range_attribute_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUmem_range_attribute_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUmem_range_attribute_enum"); + return (enum CUmem_range_attribute_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUmem_range_attribute_enum"); + return (enum CUmem_range_attribute_enum) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmem_range_attribute_enum(enum CUmem_range_attribute_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmem_range_attribute_enum neg_one = (enum CUmem_range_attribute_enum) -1, const_zero = (enum CUmem_range_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUmem_range_attribute_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUmem_range_attribute_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUmem_range_attribute_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUmem_range_attribute_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUpointer_attribute_enum __Pyx_PyLong_As_enum__CUpointer_attribute_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUpointer_attribute_enum neg_one = (enum CUpointer_attribute_enum) -1, const_zero = (enum CUpointer_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUpointer_attribute_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUpointer_attribute_enum) -1; + val = __Pyx_PyLong_As_enum__CUpointer_attribute_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUpointer_attribute_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) ((((((enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) ((((((((enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) (((enum CUpointer_attribute_enum)-1)*(((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUpointer_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUpointer_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUpointer_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUpointer_attribute_enum) ((((((((((enum CUpointer_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUpointer_attribute_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUpointer_attribute_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUpointer_attribute_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUpointer_attribute_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUpointer_attribute_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUpointer_attribute_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUpointer_attribute_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUpointer_attribute_enum"); + return (enum CUpointer_attribute_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUpointer_attribute_enum"); + return (enum CUpointer_attribute_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE unsigned int __Pyx_PyLong_As_unsigned_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + unsigned int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyLong_As_unsigned_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { + return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { + return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) { + return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (unsigned int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(unsigned int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { + return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(unsigned int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(unsigned int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(unsigned int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + unsigned int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (unsigned int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (unsigned int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (unsigned int) -1; + } else { + stepval = v; + } + v = NULL; + val = (unsigned int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((unsigned int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((unsigned int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (unsigned int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to unsigned int"); + return (unsigned int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUpointer_attribute_enum(enum CUpointer_attribute_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUpointer_attribute_enum neg_one = (enum CUpointer_attribute_enum) -1, const_zero = (enum CUpointer_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUpointer_attribute_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUpointer_attribute_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUpointer_attribute_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUpointer_attribute_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUpointer_attribute_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUgraphMem_attribute_enum __Pyx_PyLong_As_enum__CUgraphMem_attribute_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUgraphMem_attribute_enum neg_one = (enum CUgraphMem_attribute_enum) -1, const_zero = (enum CUgraphMem_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUgraphMem_attribute_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUgraphMem_attribute_enum) -1; + val = __Pyx_PyLong_As_enum__CUgraphMem_attribute_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUgraphMem_attribute_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) ((((((enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) ((((((((enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) (((enum CUgraphMem_attribute_enum)-1)*(((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUgraphMem_attribute_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUgraphMem_attribute_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUgraphMem_attribute_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUgraphMem_attribute_enum) ((((((((((enum CUgraphMem_attribute_enum)digits[3]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[2]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[1]) << PyLong_SHIFT) | (enum CUgraphMem_attribute_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUgraphMem_attribute_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUgraphMem_attribute_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUgraphMem_attribute_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUgraphMem_attribute_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUgraphMem_attribute_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUgraphMem_attribute_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUgraphMem_attribute_enum"); + return (enum CUgraphMem_attribute_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUgraphMem_attribute_enum"); + return (enum CUgraphMem_attribute_enum) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUgraphMem_attribute_enum(enum CUgraphMem_attribute_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUgraphMem_attribute_enum neg_one = (enum CUgraphMem_attribute_enum) -1, const_zero = (enum CUgraphMem_attribute_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUgraphMem_attribute_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUgraphMem_attribute_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUgraphMem_attribute_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUgraphMem_attribute_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUjit_option_enum __Pyx_PyLong_As_enum__CUjit_option_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUjit_option_enum neg_one = (enum CUjit_option_enum) -1, const_zero = (enum CUjit_option_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUjit_option_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUjit_option_enum) -1; + val = __Pyx_PyLong_As_enum__CUjit_option_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUjit_option_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_option_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_option_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUjit_option_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUjit_option_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_option_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUjit_option_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUjit_option_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) ((((((enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUjit_option_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_option_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) ((((((((enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUjit_option_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) (((enum CUjit_option_enum)-1)*(((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_option_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_option_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_option_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_option_enum) ((((((((((enum CUjit_option_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_option_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUjit_option_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_option_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_option_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUjit_option_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUjit_option_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUjit_option_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUjit_option_enum"); + return (enum CUjit_option_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUjit_option_enum"); + return (enum CUjit_option_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUjit_target_enum __Pyx_PyLong_As_enum__CUjit_target_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUjit_target_enum neg_one = (enum CUjit_target_enum) -1, const_zero = (enum CUjit_target_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUjit_target_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUjit_target_enum) -1; + val = __Pyx_PyLong_As_enum__CUjit_target_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUjit_target_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((((enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_target_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((((((enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_target_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((((((((enum CUjit_target_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUjit_target_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUjit_target_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_target_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_target_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_target_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUjit_target_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((enum CUjit_target_enum)-1)*(((((enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUjit_target_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) ((((((enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUjit_target_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((enum CUjit_target_enum)-1)*(((((((enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_target_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) ((((((((enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUjit_target_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) (((enum CUjit_target_enum)-1)*(((((((((enum CUjit_target_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_target_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_target_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_target_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_target_enum) ((((((((((enum CUjit_target_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_target_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUjit_target_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_target_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_target_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_target_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUjit_target_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUjit_target_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUjit_target_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUjit_target_enum"); + return (enum CUjit_target_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUjit_target_enum"); + return (enum CUjit_target_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUjit_fallback_enum __Pyx_PyLong_As_enum__CUjit_fallback_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUjit_fallback_enum neg_one = (enum CUjit_fallback_enum) -1, const_zero = (enum CUjit_fallback_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUjit_fallback_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUjit_fallback_enum) -1; + val = __Pyx_PyLong_As_enum__CUjit_fallback_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUjit_fallback_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((((enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_fallback_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((((((enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_fallback_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((((((((enum CUjit_fallback_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUjit_fallback_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUjit_fallback_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_fallback_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_fallback_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_fallback_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((enum CUjit_fallback_enum)-1)*(((((enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUjit_fallback_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) ((((((enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((enum CUjit_fallback_enum)-1)*(((((((enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_fallback_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) ((((((((enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) (((enum CUjit_fallback_enum)-1)*(((((((((enum CUjit_fallback_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_fallback_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_fallback_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_fallback_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_fallback_enum) ((((((((((enum CUjit_fallback_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_fallback_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUjit_fallback_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_fallback_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_fallback_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_fallback_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUjit_fallback_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUjit_fallback_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUjit_fallback_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUjit_fallback_enum"); + return (enum CUjit_fallback_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUjit_fallback_enum"); + return (enum CUjit_fallback_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUjit_cacheMode_enum __Pyx_PyLong_As_enum__CUjit_cacheMode_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUjit_cacheMode_enum neg_one = (enum CUjit_cacheMode_enum) -1, const_zero = (enum CUjit_cacheMode_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUjit_cacheMode_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUjit_cacheMode_enum) -1; + val = __Pyx_PyLong_As_enum__CUjit_cacheMode_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((((enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((((((enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((((((((enum CUjit_cacheMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUjit_cacheMode_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUjit_cacheMode_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_cacheMode_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_cacheMode_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_cacheMode_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((enum CUjit_cacheMode_enum)-1)*(((((enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) ((((((enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((enum CUjit_cacheMode_enum)-1)*(((((((enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) ((((((((enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) (((enum CUjit_cacheMode_enum)-1)*(((((((((enum CUjit_cacheMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUjit_cacheMode_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUjit_cacheMode_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUjit_cacheMode_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUjit_cacheMode_enum) ((((((((((enum CUjit_cacheMode_enum)digits[3]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[2]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[1]) << PyLong_SHIFT) | (enum CUjit_cacheMode_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUjit_cacheMode_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_cacheMode_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUjit_cacheMode_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUjit_cacheMode_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUjit_cacheMode_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUjit_cacheMode_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUjit_cacheMode_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUjit_cacheMode_enum"); + return (enum CUjit_cacheMode_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUjit_cacheMode_enum"); + return (enum CUjit_cacheMode_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum cudaJitOption __Pyx_PyLong_As_enum__cudaJitOption(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum cudaJitOption neg_one = (enum cudaJitOption) -1, const_zero = (enum cudaJitOption) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum cudaJitOption val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum cudaJitOption) -1; + val = __Pyx_PyLong_As_enum__cudaJitOption(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum cudaJitOption) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) >= 2 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((((enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJitOption) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) >= 3 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((((((enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJitOption) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) >= 4 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((((((((enum cudaJitOption)digits[3]) << PyLong_SHIFT) | (enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum cudaJitOption) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum cudaJitOption) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJitOption, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJitOption) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJitOption, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum cudaJitOption) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((enum cudaJitOption)-1)*(((((enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum cudaJitOption) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJitOption) ((((((enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum cudaJitOption) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((enum cudaJitOption)-1)*(((((((enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJitOption) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJitOption) ((((((((enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum cudaJitOption) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJitOption) (((enum cudaJitOption)-1)*(((((((((enum cudaJitOption)digits[3]) << PyLong_SHIFT) | (enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJitOption) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJitOption, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJitOption) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJitOption) ((((((((((enum cudaJitOption)digits[3]) << PyLong_SHIFT) | (enum cudaJitOption)digits[2]) << PyLong_SHIFT) | (enum cudaJitOption)digits[1]) << PyLong_SHIFT) | (enum cudaJitOption)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum cudaJitOption) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJitOption, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJitOption) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJitOption, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum cudaJitOption val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum cudaJitOption) -1; +#endif + if (unlikely(ret)) + return (enum cudaJitOption) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum cudaJitOption"); + return (enum cudaJitOption) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum cudaJitOption"); + return (enum cudaJitOption) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum cudaJit_Fallback __Pyx_PyLong_As_enum__cudaJit_Fallback(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum cudaJit_Fallback neg_one = (enum cudaJit_Fallback) -1, const_zero = (enum cudaJit_Fallback) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum cudaJit_Fallback val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum cudaJit_Fallback) -1; + val = __Pyx_PyLong_As_enum__cudaJit_Fallback(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum cudaJit_Fallback) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) >= 2 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((((enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJit_Fallback) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) >= 3 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((((((enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJit_Fallback) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) >= 4 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((((((((enum cudaJit_Fallback)digits[3]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum cudaJit_Fallback) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum cudaJit_Fallback) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_Fallback, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJit_Fallback) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_Fallback, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((enum cudaJit_Fallback)-1)*(((((enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum cudaJit_Fallback) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) ((((((enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((enum cudaJit_Fallback)-1)*(((((((enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJit_Fallback) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) ((((((((enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) (((enum cudaJit_Fallback)-1)*(((((((((enum cudaJit_Fallback)digits[3]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJit_Fallback) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_Fallback, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_Fallback) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJit_Fallback) ((((((((((enum cudaJit_Fallback)digits[3]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[2]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[1]) << PyLong_SHIFT) | (enum cudaJit_Fallback)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum cudaJit_Fallback) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_Fallback, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJit_Fallback) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_Fallback, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum cudaJit_Fallback val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum cudaJit_Fallback) -1; +#endif + if (unlikely(ret)) + return (enum cudaJit_Fallback) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum cudaJit_Fallback"); + return (enum cudaJit_Fallback) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum cudaJit_Fallback"); + return (enum cudaJit_Fallback) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum cudaJit_CacheMode __Pyx_PyLong_As_enum__cudaJit_CacheMode(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum cudaJit_CacheMode neg_one = (enum cudaJit_CacheMode) -1, const_zero = (enum cudaJit_CacheMode) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum cudaJit_CacheMode val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum cudaJit_CacheMode) -1; + val = __Pyx_PyLong_As_enum__cudaJit_CacheMode(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum cudaJit_CacheMode) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) >= 2 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((((enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJit_CacheMode) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) >= 3 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((((((enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJit_CacheMode) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) >= 4 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((((((((enum cudaJit_CacheMode)digits[3]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum cudaJit_CacheMode) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum cudaJit_CacheMode) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_CacheMode, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJit_CacheMode) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_CacheMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((enum cudaJit_CacheMode)-1)*(((((enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum cudaJit_CacheMode) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) ((((((enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((enum cudaJit_CacheMode)-1)*(((((((enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaJit_CacheMode) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) ((((((((enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) (((enum cudaJit_CacheMode)-1)*(((((((((enum cudaJit_CacheMode)digits[3]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaJit_CacheMode) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaJit_CacheMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaJit_CacheMode) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaJit_CacheMode) ((((((((((enum cudaJit_CacheMode)digits[3]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[2]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[1]) << PyLong_SHIFT) | (enum cudaJit_CacheMode)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum cudaJit_CacheMode) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_CacheMode, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaJit_CacheMode) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaJit_CacheMode, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum cudaJit_CacheMode val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum cudaJit_CacheMode) -1; +#endif + if (unlikely(ret)) + return (enum cudaJit_CacheMode) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum cudaJit_CacheMode"); + return (enum cudaJit_CacheMode) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum cudaJit_CacheMode"); + return (enum cudaJit_CacheMode) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUlibraryOption_enum __Pyx_PyLong_As_enum__CUlibraryOption_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUlibraryOption_enum neg_one = (enum CUlibraryOption_enum) -1, const_zero = (enum CUlibraryOption_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUlibraryOption_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUlibraryOption_enum) -1; + val = __Pyx_PyLong_As_enum__CUlibraryOption_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUlibraryOption_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((((enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUlibraryOption_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((((((enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUlibraryOption_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((((((((enum CUlibraryOption_enum)digits[3]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUlibraryOption_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUlibraryOption_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUlibraryOption_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUlibraryOption_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUlibraryOption_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((enum CUlibraryOption_enum)-1)*(((((enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUlibraryOption_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) ((((((enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((enum CUlibraryOption_enum)-1)*(((((((enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUlibraryOption_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) ((((((((enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) (((enum CUlibraryOption_enum)-1)*(((((((((enum CUlibraryOption_enum)digits[3]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUlibraryOption_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUlibraryOption_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUlibraryOption_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUlibraryOption_enum) ((((((((((enum CUlibraryOption_enum)digits[3]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[2]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[1]) << PyLong_SHIFT) | (enum CUlibraryOption_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUlibraryOption_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUlibraryOption_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUlibraryOption_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUlibraryOption_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUlibraryOption_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUlibraryOption_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUlibraryOption_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUlibraryOption_enum"); + return (enum CUlibraryOption_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUlibraryOption_enum"); + return (enum CUlibraryOption_enum) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum cudaLibraryOption __Pyx_PyLong_As_enum__cudaLibraryOption(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum cudaLibraryOption neg_one = (enum cudaLibraryOption) -1, const_zero = (enum cudaLibraryOption) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum cudaLibraryOption val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum cudaLibraryOption) -1; + val = __Pyx_PyLong_As_enum__cudaLibraryOption(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum cudaLibraryOption) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) >= 2 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((((enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaLibraryOption) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) >= 3 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((((((enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaLibraryOption) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) >= 4 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((((((((enum cudaLibraryOption)digits[3]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum cudaLibraryOption) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum cudaLibraryOption) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaLibraryOption, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaLibraryOption) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaLibraryOption, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum cudaLibraryOption) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((enum cudaLibraryOption)-1)*(((((enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum cudaLibraryOption) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 2 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) ((((((enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum cudaLibraryOption) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((enum cudaLibraryOption)-1)*(((((((enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum cudaLibraryOption) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 3 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) ((((((((enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum cudaLibraryOption) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) (((enum cudaLibraryOption)-1)*(((((((((enum cudaLibraryOption)digits[3]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum cudaLibraryOption) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum cudaLibraryOption, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum cudaLibraryOption) - 1 > 4 * PyLong_SHIFT)) { + return (enum cudaLibraryOption) ((((((((((enum cudaLibraryOption)digits[3]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[2]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[1]) << PyLong_SHIFT) | (enum cudaLibraryOption)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum cudaLibraryOption) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaLibraryOption, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum cudaLibraryOption) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum cudaLibraryOption, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum cudaLibraryOption val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum cudaLibraryOption) -1; +#endif + if (unlikely(ret)) + return (enum cudaLibraryOption) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum cudaLibraryOption"); + return (enum cudaLibraryOption) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum cudaLibraryOption"); + return (enum cudaLibraryOption) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUmemAllocationHandleType_enum __Pyx_PyLong_As_enum__CUmemAllocationHandleType_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmemAllocationHandleType_enum neg_one = (enum CUmemAllocationHandleType_enum) -1, const_zero = (enum CUmemAllocationHandleType_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUmemAllocationHandleType_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUmemAllocationHandleType_enum) -1; + val = __Pyx_PyLong_As_enum__CUmemAllocationHandleType_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUmemAllocationHandleType_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) ((((((enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) ((((((((enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) (((enum CUmemAllocationHandleType_enum)-1)*(((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUmemAllocationHandleType_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUmemAllocationHandleType_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUmemAllocationHandleType_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUmemAllocationHandleType_enum) ((((((((((enum CUmemAllocationHandleType_enum)digits[3]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[2]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[1]) << PyLong_SHIFT) | (enum CUmemAllocationHandleType_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUmemAllocationHandleType_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUmemAllocationHandleType_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUmemAllocationHandleType_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUmemAllocationHandleType_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUmemAllocationHandleType_enum"); + return (enum CUmemAllocationHandleType_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUmemAllocationHandleType_enum"); + return (enum CUmemAllocationHandleType_enum) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUmemAllocationHandleType_enum(enum CUmemAllocationHandleType_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUmemAllocationHandleType_enum neg_one = (enum CUmemAllocationHandleType_enum) -1, const_zero = (enum CUmemAllocationHandleType_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUmemAllocationHandleType_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUmemAllocationHandleType_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUmemAllocationHandleType_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUmemAllocationHandleType_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE enum CUcoredumpSettings_enum __Pyx_PyLong_As_enum__CUcoredumpSettings_enum(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUcoredumpSettings_enum neg_one = (enum CUcoredumpSettings_enum) -1, const_zero = (enum CUcoredumpSettings_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + enum CUcoredumpSettings_enum val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (enum CUcoredumpSettings_enum) -1; + val = __Pyx_PyLong_As_enum__CUcoredumpSettings_enum(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) >= 2 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((((enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) >= 3 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((((((enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) >= 4 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((((((((enum CUcoredumpSettings_enum)digits[3]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (enum CUcoredumpSettings_enum) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(enum CUcoredumpSettings_enum) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUcoredumpSettings_enum, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUcoredumpSettings_enum) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUcoredumpSettings_enum, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((enum CUcoredumpSettings_enum)-1)*(((((enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 2 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) ((((((enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((enum CUcoredumpSettings_enum)-1)*(((((((enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 3 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) ((((((((enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) (((enum CUcoredumpSettings_enum)-1)*(((((((((enum CUcoredumpSettings_enum)digits[3]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(enum CUcoredumpSettings_enum) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(enum CUcoredumpSettings_enum, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(enum CUcoredumpSettings_enum) - 1 > 4 * PyLong_SHIFT)) { + return (enum CUcoredumpSettings_enum) ((((((((((enum CUcoredumpSettings_enum)digits[3]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[2]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[1]) << PyLong_SHIFT) | (enum CUcoredumpSettings_enum)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(enum CUcoredumpSettings_enum) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUcoredumpSettings_enum, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(enum CUcoredumpSettings_enum) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(enum CUcoredumpSettings_enum, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + enum CUcoredumpSettings_enum val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (enum CUcoredumpSettings_enum) -1; +#endif + if (unlikely(ret)) + return (enum CUcoredumpSettings_enum) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to enum CUcoredumpSettings_enum"); + return (enum CUcoredumpSettings_enum) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to enum CUcoredumpSettings_enum"); + return (enum CUcoredumpSettings_enum) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_enum__CUcoredumpSettings_enum(enum CUcoredumpSettings_enum value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const enum CUcoredumpSettings_enum neg_one = (enum CUcoredumpSettings_enum) -1, const_zero = (enum CUcoredumpSettings_enum) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(enum CUcoredumpSettings_enum) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(enum CUcoredumpSettings_enum) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(enum CUcoredumpSettings_enum) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(enum CUcoredumpSettings_enum) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(enum CUcoredumpSettings_enum) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(enum CUcoredumpSettings_enum), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(enum CUcoredumpSettings_enum)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE nvrtcResult __Pyx_PyLong_As_nvrtcResult(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const nvrtcResult neg_one = (nvrtcResult) -1, const_zero = (nvrtcResult) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + nvrtcResult val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (nvrtcResult) -1; + val = __Pyx_PyLong_As_nvrtcResult(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(nvrtcResult) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) >= 2 * PyLong_SHIFT)) { + return (nvrtcResult) (((((nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(nvrtcResult) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) >= 3 * PyLong_SHIFT)) { + return (nvrtcResult) (((((((nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(nvrtcResult) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) >= 4 * PyLong_SHIFT)) { + return (nvrtcResult) (((((((((nvrtcResult)digits[3]) << PyLong_SHIFT) | (nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (nvrtcResult) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(nvrtcResult) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(nvrtcResult, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(nvrtcResult) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(nvrtcResult, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(nvrtcResult) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 2 * PyLong_SHIFT)) { + return (nvrtcResult) (((nvrtcResult)-1)*(((((nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(nvrtcResult) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 2 * PyLong_SHIFT)) { + return (nvrtcResult) ((((((nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(nvrtcResult) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 3 * PyLong_SHIFT)) { + return (nvrtcResult) (((nvrtcResult)-1)*(((((((nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(nvrtcResult) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 3 * PyLong_SHIFT)) { + return (nvrtcResult) ((((((((nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(nvrtcResult) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 4 * PyLong_SHIFT)) { + return (nvrtcResult) (((nvrtcResult)-1)*(((((((((nvrtcResult)digits[3]) << PyLong_SHIFT) | (nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(nvrtcResult) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(nvrtcResult, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(nvrtcResult) - 1 > 4 * PyLong_SHIFT)) { + return (nvrtcResult) ((((((((((nvrtcResult)digits[3]) << PyLong_SHIFT) | (nvrtcResult)digits[2]) << PyLong_SHIFT) | (nvrtcResult)digits[1]) << PyLong_SHIFT) | (nvrtcResult)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(nvrtcResult) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(nvrtcResult, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(nvrtcResult) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(nvrtcResult, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + nvrtcResult val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums"); + val = (nvrtcResult) -1; +#endif + if (unlikely(ret)) + return (nvrtcResult) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to nvrtcResult"); + return (nvrtcResult) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to nvrtcResult"); + return (nvrtcResult) -1; +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; iexc_info; + while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + +/* SaveResetException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + PyObject *exc_value = exc_info->exc_value; + if (exc_value == NULL || exc_value == Py_None) { + *value = NULL; + *type = NULL; + *tb = NULL; + } else { + *value = exc_value; + Py_INCREF(*value); + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + *tb = PyException_GetTraceback(exc_value); + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); + #endif +} +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + PyObject *tmp_value = exc_info->exc_value; + exc_info->exc_value = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); + #else + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); + #endif +} +#endif + +/* SwapException */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_value = exc_info->exc_value; + exc_info->exc_value = *value; + if (tmp_value == NULL || tmp_value == Py_None) { + Py_XDECREF(tmp_value); + tmp_value = NULL; + tmp_type = NULL; + tmp_tb = NULL; + } else { + tmp_type = (PyObject*) Py_TYPE(tmp_value); + Py_INCREF(tmp_type); + #if CYTHON_COMPILING_IN_CPYTHON + tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; + Py_XINCREF(tmp_tb); + #else + tmp_tb = PyException_GetTraceback(tmp_value); + #endif + } + #elif CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/* IterNextPlain */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 +static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { + if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) + __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); + return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; +} +#endif +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 + PyObject *result; + PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); + if (unlikely(!next)) return NULL; + result = PyObject_CallFunctionObjArgs(next, iterator, NULL); + return result; +#else + (void)__Pyx_GetBuiltinName; // only for early limited API + iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); + assert(iternext); + return iternext(iterator); +#endif +} + +/* PyObjectCallMethod1 */ +#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +#endif +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { +#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) + PyObject *args[2] = {obj, arg}; + (void) __Pyx_PyObject_GetMethod; + (void) __Pyx_PyObject_CallOneArg; + (void) __Pyx_PyObject_Call2Args; + return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +#else + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +#endif +} + +/* ReturnWithStopIteration */ +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); +static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { + if (value == Py_None) { + if (async || !iternext) + PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); + return; + } + __Pyx__ReturnWithStopIteration(value, async); +} +static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { +#if CYTHON_COMPILING_IN_CPYTHON + __Pyx_PyThreadState_declare +#endif + PyObject *exc; + PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; +#if CYTHON_COMPILING_IN_CPYTHON + if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + if (PY_VERSION_HEX >= (0x030e00A1)) { + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + } else { + PyObject *args_tuple = PyTuple_New(1); + if (unlikely(!args_tuple)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args_tuple, 0, value); + exc = PyObject_Call(exc_type, args_tuple, NULL); + Py_DECREF(args_tuple); + } + if (unlikely(!exc)) return; + } else { + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!__pyx_tstate->exc_info->exc_value) + #else + if (!__pyx_tstate->exc_type) + #endif + { + Py_INCREF(exc_type); + __Pyx_ErrRestore(exc_type, exc, NULL); + return; + } + #endif +#else + exc = __Pyx_PyObject_CallOneArg(exc_type, value); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(exc_type, exc); + Py_DECREF(exc); +} + +/* CoroutineBase */ +#if !CYTHON_COMPILING_IN_LIMITED_API +#include +#if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#endif // CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE void +__Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { +#if CYTHON_USE_AM_SEND + gen->yieldfrom_am_send = NULL; +#endif + Py_CLEAR(gen->yieldfrom); +} +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + CYTHON_UNUSED_VAR(__pyx_tstate); + __Pyx_ErrFetch(&et, &ev, &tb); + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } + else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); + if (unlikely(!value)) goto limited_api_failure; + #else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + #endif + Py_DECREF(ev); + } + else if (unlikely(PyTuple_Check(ev))) { + Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(tuple_size < 0)) { + Py_XDECREF(tb); + Py_DECREF(ev); + Py_DECREF(et); + return -1; + } + #endif + if (tuple_size >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#elif CYTHON_ASSUME_SAFE_MACROS + value = PySequence_ITEM(ev, 0); +#else + value = PySequence_GetItem(ev, 0); + if (!value) goto limited_api_failure; +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); +#else + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); +#endif + Py_DECREF(ev); +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!value)) return -1; +#endif + *pvalue = value; + return 0; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS + limited_api_failure: + Py_XDECREF(et); + Py_XDECREF(tb); + Py_XDECREF(ev); + return -1; +#endif +} +static CYTHON_INLINE +__Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { + if (*retval) { + return PYGEN_NEXT; + } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { + return PYGEN_RETURN; + } else { + return PYGEN_ERROR; + } +} +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_CLEAR(exc_state->exc_value); +#else + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +#endif +} +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { + const char *msg; + CYTHON_MAYBE_UNUSED_VAR(gen); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} +static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { + CYTHON_MAYBE_UNUSED_VAR(gen); + CYTHON_MAYBE_UNUSED_VAR(closing); + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} +static +__Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running + if (unlikely(self->resume_label == -1)) { + __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + return PYGEN_ERROR; + } +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = __pyx_tstate; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + exc_state = &self->gi_exc_state; + if (exc_state->exc_value) { + #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + #else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #elif PY_VERSION_HEX >= 0x030B00a4 + exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; + #else + exc_tb = exc_state->exc_traceback; + #endif + if (exc_tb) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON + Py_DECREF(exc_tb); + #endif + } + #endif + } +#if CYTHON_USE_EXC_INFO_STACK + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } else { + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + retval = self->body(self, tstate, value); +#if CYTHON_USE_EXC_INFO_STACK + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + *result = retval; + if (self->resume_label == -1) { + return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; + } + return PYGEN_NEXT; +} +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED_VAR(exc_state); +#else + PyObject *exc_tb; + #if PY_VERSION_HEX >= 0x030B00a4 + if (!exc_state->exc_value) return; + exc_tb = PyException_GetTraceback(exc_state->exc_value); + #else + exc_tb = exc_state->exc_traceback; + #endif + if (likely(exc_tb)) { + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); + #if PY_VERSION_HEX >= 0x030B00a4 + Py_DECREF(exc_tb); + #endif + } +#endif +} +#define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ + ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) +static PyObject * +__Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { + CYTHON_MAYBE_UNUSED_VAR(gen); + if (likely(result == PYGEN_RETURN)) { + int is_async = 0; + #ifdef __Pyx_AsyncGen_USED + is_async = __Pyx_AsyncGen_CheckExact(gen); + #endif + __Pyx_ReturnWithStopIteration(retval, is_async, iternext); + Py_XDECREF(retval); + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { +#if PY_VERSION_HEX < 0x030d00A1 + _PyGen_SetStopIterationValue(result); +#else + if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { + PyErr_SetObject(PyExc_StopIteration, result); + } else { + PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); + if (likely(exc != NULL)) { + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); + } + } +#endif + } + Py_DECREF(result); + result = NULL; + } + return result; +#endif +} +#endif +static CYTHON_INLINE __Pyx_PySendResult +__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { + __Pyx_PySendResult result; + PyObject *val = NULL; + assert(__Pyx_Coroutine_get_is_running(gen)); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); + Py_XDECREF(val); + return result; +} +#if CYTHON_USE_AM_SEND +static __Pyx_PySendResult +__Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { + PyObject *ret = NULL; + __Pyx_PySendResult delegate_result, result; + assert(__Pyx_Coroutine_get_is_running(gen)); + delegate_result = gen_am_send(gen->yieldfrom, value, &ret); + if (delegate_result == PYGEN_NEXT) { + assert (ret != NULL); + *retval = ret; + return PYGEN_NEXT; + } + assert (delegate_result != PYGEN_ERROR || ret == NULL); + __Pyx_Coroutine_Undelegate(gen); + result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); + Py_XDECREF(ret); + return result; +} +#endif +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); +} +static __Pyx_PySendResult +__Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { + __Pyx_PySendResult result; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #if !CYTHON_USE_AM_SEND + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #endif + { + #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 + if (value == Py_None && PyIter_Check(yf)) + ret = __Pyx_PyIter_Next_Plain(yf); + else + #endif + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); + } + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + *retval = ret; + return PYGEN_NEXT; + } + result = __Pyx_Coroutine_FinishDelegation(gen, retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return result; +} +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + CYTHON_UNUSED_VAR(gen); + assert(__Pyx_Coroutine_get_is_running(gen)); + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + result = __Pyx_Coroutine_Close(yf, &retval); + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + result = PYGEN_RETURN; + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + result = PYGEN_RETURN; + } else + #endif + { + PyObject *meth; + result = PYGEN_RETURN; + meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); + if (unlikely(!meth)) { + if (unlikely(PyErr_Occurred())) { + PyErr_WriteUnraisable(yf); + } + } else { + retval = __Pyx_PyObject_CallNoArg(meth); + Py_DECREF(meth); + if (unlikely(!retval)) { + result = PYGEN_ERROR; + } + } + } + Py_XDECREF(retval); + return result == PYGEN_ERROR ? -1 : 0; +} +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __Pyx_PySendResult result; + PyObject *retval = NULL; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + #if CYTHON_USE_AM_SEND + if (gen->yieldfrom_am_send) { + result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); + } else + #endif + if (gen->yieldfrom) { + PyObject *yf = gen->yieldfrom; + PyObject *ret; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + ret = __Pyx_PyIter_Next_Plain(yf); + if (likely(ret)) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &retval); + } else { + result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + } + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); +} +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { + PyObject *retval = NULL; + __Pyx_PySendResult result; + CYTHON_UNUSED_VAR(arg); + result = __Pyx_Coroutine_Close(self, &retval); + if (unlikely(result == PYGEN_ERROR)) + return NULL; + Py_XDECREF(retval); + Py_RETURN_NONE; +} +static __Pyx_PySendResult +__Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PySendResult result; + PyObject *yf; + int err = 0; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + *retval = __Pyx_Coroutine_AlreadyRunningError(gen); + return PYGEN_ERROR; + } + yf = gen->yieldfrom; + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); + if (result == PYGEN_ERROR) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_Coroutine_unset_is_running(gen); + if (!__Pyx_PyErr_Occurred()) { + return PYGEN_RETURN; + } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { + __Pyx_PyErr_Clear(); + return PYGEN_RETURN; + } + return PYGEN_ERROR; + } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_RETURN; + } else { + const char *msg; + Py_DECREF(*retval); + *retval = NULL; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { + msg = "async generator ignored GeneratorExit"; + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + __Pyx_Coroutine_unset_is_running(gen); + return PYGEN_ERROR; + } +} +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) + return __Pyx_Coroutine_AlreadyRunningError(gen); + yf = gen->yieldfrom; + if (yf) { + __Pyx_PySendResult result; + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + goto propagate_exception; + goto throw_here; + } + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (unlikely(PyErr_Occurred())) { + __Pyx_Coroutine_unset_is_running(gen); + return NULL; + } + __Pyx_Coroutine_Undelegate(gen); + goto throw_here; + } + if (likely(args)) { + ret = __Pyx_PyObject_Call(meth, args, NULL); + } else { + PyObject *cargs[4] = {NULL, typ, val, tb}; + ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } + Py_DECREF(meth); + } + Py_DECREF(yf); + if (ret) { + __Pyx_Coroutine_unset_is_running(gen); + return ret; + } + result = __Pyx_Coroutine_FinishDelegation(gen, &ret); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); +propagate_exception: + { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); + } +} +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) + return NULL; + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { +#if PY_VERSION_HEX >= 0x030B00a4 + Py_VISIT(exc_state->exc_value); +#else + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); +#endif + return 0; +} +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + { + int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); + if (e) return e; + } + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + __Pyx_Coroutine_Undelegate(gen); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject_GC_UnTrack(gen); + if (gen->gi_weakreflist != NULL) + PyObject_ClearWeakRefs(self); + if (gen->resume_label >= 0) { + PyObject_GC_Track(self); +#if CYTHON_USE_TP_FINALIZE + if (unlikely(PyObject_CallFinalizerFromDealloc(self))) +#else + { + destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); + if (del) del(self); + } + if (unlikely(Py_REFCNT(self) > 0)) +#endif + { + return; + } + PyObject_GC_UnTrack(self); + } +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + __Pyx_PyHeapTypeObject_GC_Del(gen); +} +#if CYTHON_USE_TP_FINALIZE +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + if (gen->resume_label < 0) { + return; + } + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + PyObject_GC_UnTrack(self); + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); + PyObject_GC_Track(self); + } +#endif + } else { + PyObject *retval = NULL; + __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); + if (result == PYGEN_ERROR) { + PyErr_WriteUnraisable(self); + } else { + Py_XDECREF(retval); + } + } + __Pyx_ErrRestore(error_type, error_value, error_traceback); +} +#endif +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_name; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_name, value); + return 0; +} +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) +{ + PyObject *name = self->gi_qualname; + CYTHON_UNUSED_VAR(context); + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_Py_XDECREF_SET(self->gi_qualname, value); + return 0; +} +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + #if PY_VERSION_HEX >= 0x030d0000 + Py_BEGIN_CRITICAL_SECTION(self); + #endif + frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + Py_RETURN_NONE; + } + PyObject *globals = PyDict_New(); + if (unlikely(!globals)) return NULL; + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + Py_DECREF(globals); + if (unlikely(!frame)) + return NULL; + if (unlikely(self->gi_frame)) { + Py_DECREF(frame); + frame = self->gi_frame; + } else { + self->gi_frame = frame; + } + } + Py_INCREF(frame); + #if PY_VERSION_HEX >= 0x030d0000 + Py_END_CRITICAL_SECTION(); + #endif + return frame; +#else + CYTHON_UNUSED_VAR(self); + Py_RETURN_NONE; +#endif +} +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *frame = self->gi_frame; + if (frame) + return __Pyx_NewRef(frame); + return __Pyx__Coroutine_get_frame(self); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->yieldfrom_am_send = NULL; + #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API + gen->gi_exc_state.exc_value = NULL; + #else + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; + #endif +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif + gen->gi_weakreflist = NULL; + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + PyObject_GC_Track(gen); + return gen; +} +static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + gen->is_running = 1; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + assert(gen->is_running); + gen->is_running = 0; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif +} +static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { + char result; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_BEGIN_CRITICAL_SECTION(gen); + #endif + result = gen->is_running; + #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API + Py_END_CRITICAL_SECTION(); + #endif + return result; +} +static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { + CYTHON_UNUSED_VAR(closure); + char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); + if (result) Py_RETURN_TRUE; + else Py_RETURN_FALSE; +} +#if __PYX_HAS_PY_AM_SEND == 2 +static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { + Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; + if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { + return; + } + memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); + static_amsend_methods->am_send = am_send; + type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); +} +#endif +static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { + CYTHON_UNUSED_VAR(arg); + __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); + PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", + self_type_name); + __Pyx_DECREF_TypeName(self_type_name); + return NULL; +} + +/* Generator */ +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, + {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, + {0, 0, 0, 0} +}; +static PyMemberDef __pyx_Generator_memberlist[] = { + {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + PyDoc_STR("object being iterated by 'yield from', or None")}, + {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, + {0, 0, 0, 0, 0} +}; +static PyGetSetDef __pyx_Generator_getsets[] = { + {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + PyDoc_STR("name of the generator"), 0}, + {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + PyDoc_STR("qualified name of the generator"), 0}, + {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + PyDoc_STR("Frame of the generator"), 0}, + {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_GeneratorType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, + {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, + {Py_tp_iter, (void *)PyObject_SelfIter}, + {Py_tp_iternext, (void *)__Pyx_Generator_Next}, + {Py_tp_methods, (void *)__pyx_Generator_methods}, + {Py_tp_members, (void *)__pyx_Generator_memberlist}, + {Py_tp_getset, (void *)__pyx_Generator_getsets}, + {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, +#if CYTHON_USE_TP_FINALIZE + {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, +#endif + {0, 0}, +}; +static PyType_Spec __pyx_GeneratorType_spec = { + __PYX_TYPE_MODULE_PREFIX "generator", + sizeof(__pyx_CoroutineObject), + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE | __Pyx_TPFLAGS_HAVE_AM_SEND, + __pyx_GeneratorType_slots +}; +#if __PYX_HAS_PY_AM_SEND == 2 +static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; +#endif +static int __pyx_Generator_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); + if (unlikely(!mstate->__pyx_GeneratorType)) { + return -1; + } +#if __PYX_HAS_PY_AM_SEND == 2 + __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); +#endif + return 0; +} +static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *retval = NULL; + if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { + return __Pyx_Coroutine_AlreadyRunningError(gen); + } + __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); + __Pyx_Coroutine_unset_is_running(gen); + (void) result; + assert (result == PYGEN_RETURN || result == PYGEN_ERROR); + assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); + return retval; +} + +/* GetRuntimeVersion */ +static unsigned long __Pyx_get_runtime_version(void) { +#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd new file mode 100644 index 0000000000000000000000000000000000000000..fcdd3ba76aac35d9d27428d2812a289660370c5d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pxd @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings.cynvrtc as cynvrtc + +include "_lib/utils.pxd" + +cdef class nvrtcProgram: + """ 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. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cynvrtc.nvrtcProgram _pvt_val + cdef cynvrtc.nvrtcProgram* _pvt_ptr diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pyx new file mode 100644 index 0000000000000000000000000000000000000000..90090670f7dfbfc3f85266d9a73fc4da87e0c8bc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvrtc.pyx @@ -0,0 +1,1021 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +from typing import Any, Optional +from enum import IntEnum +import cython +import ctypes +from libc.stdlib cimport calloc, malloc, free +from libc cimport string +from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t, uintptr_t +from libc.stddef cimport wchar_t +from libc.limits cimport CHAR_MIN +from libcpp.vector cimport vector +from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS +from cpython.bytes cimport PyBytes_FromStringAndSize + +import cuda.bindings.driver as _driver +_driver = _driver.__dict__ +include "_lib/utils.pxi" + +ctypedef unsigned long long signed_char_ptr +ctypedef unsigned long long unsigned_char_ptr +ctypedef unsigned long long char_ptr +ctypedef unsigned long long short_ptr +ctypedef unsigned long long unsigned_short_ptr +ctypedef unsigned long long int_ptr +ctypedef unsigned long long long_int_ptr +ctypedef unsigned long long long_long_int_ptr +ctypedef unsigned long long unsigned_int_ptr +ctypedef unsigned long long unsigned_long_int_ptr +ctypedef unsigned long long unsigned_long_long_int_ptr +ctypedef unsigned long long uint32_t_ptr +ctypedef unsigned long long uint64_t_ptr +ctypedef unsigned long long int32_t_ptr +ctypedef unsigned long long int64_t_ptr +ctypedef unsigned long long unsigned_ptr +ctypedef unsigned long long unsigned_long_long_ptr +ctypedef unsigned long long long_long_ptr +ctypedef unsigned long long size_t_ptr +ctypedef unsigned long long long_ptr +ctypedef unsigned long long float_ptr +ctypedef unsigned long long double_ptr +ctypedef unsigned long long void_ptr + + +class nvrtcResult(IntEnum): + """ + The enumerated type nvrtcResult defines API call result codes. + NVRTC API functions return nvrtcResult to indicate the call result. + """ + NVRTC_SUCCESS = cynvrtc.nvrtcResult.NVRTC_SUCCESS + NVRTC_ERROR_OUT_OF_MEMORY = cynvrtc.nvrtcResult.NVRTC_ERROR_OUT_OF_MEMORY + NVRTC_ERROR_PROGRAM_CREATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_PROGRAM_CREATION_FAILURE + NVRTC_ERROR_INVALID_INPUT = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_INPUT + NVRTC_ERROR_INVALID_PROGRAM = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + NVRTC_ERROR_INVALID_OPTION = cynvrtc.nvrtcResult.NVRTC_ERROR_INVALID_OPTION + NVRTC_ERROR_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_COMPILATION + NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = cynvrtc.nvrtcResult.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE + NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION + NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = cynvrtc.nvrtcResult.NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR + NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED + NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE + NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + +_dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) + +cdef class nvrtcProgram: + """ 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. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, nvrtcProgram): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +@cython.embedsignature(True) +def nvrtcGetErrorString(result not None : nvrtcResult): + """ nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to `"NVRTC_SUCCESS"`. For unrecognized enumeration values, it returns `"NVRTC_ERROR unknown"`. + + Parameters + ---------- + result : :py:obj:`~.nvrtcResult` + CUDA Runtime Compilation API result code. + + Returns + ------- + nvrtcResult.NVRTC_SUCCESS + nvrtcResult.NVRTC_SUCCESS + bytes + Message string for the given :py:obj:`~.nvrtcResult` code. + """ + cdef cynvrtc.nvrtcResult cyresult = result.value + with nogil: + err = cynvrtc.nvrtcGetErrorString(cyresult) + return (nvrtcResult.NVRTC_SUCCESS, err) + +@cython.embedsignature(True) +def nvrtcVersion(): + """ nvrtcVersion sets the output parameters `major` and `minor` with the CUDA Runtime Compilation version number. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + major : int + CUDA Runtime Compilation major version number. + minor : int + CUDA Runtime Compilation minor version number. + """ + cdef int major = 0 + cdef int minor = 0 + with nogil: + err = cynvrtc.nvrtcVersion(&major, &minor) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None, None) + return (_dict_nvrtcResult[err], major, minor) + +@cython.embedsignature(True) +def nvrtcGetNumSupportedArchs(): + """ nvrtcGetNumSupportedArchs sets the output parameter `numArchs` with the number of architectures supported by NVRTC. This can then be used to pass an array to :py:obj:`~.nvrtcGetSupportedArchs` to get the supported architectures. + + see :py:obj:`~.nvrtcGetSupportedArchs` + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + numArchs : int + number of supported architectures. + """ + cdef int numArchs = 0 + with nogil: + err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], numArchs) + +@cython.embedsignature(True) +def nvrtcGetSupportedArchs(): + """ nvrtcGetSupportedArchs populates the array passed via the output parameter `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 :py:obj:`~.nvrtcGetNumSupportedArchs`. + + see :py:obj:`~.nvrtcGetNumSupportedArchs` + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + supportedArchs : list[int] + sorted array of supported architectures. + """ + cdef vector[int] supportedArchs + _, s = nvrtcGetNumSupportedArchs() + supportedArchs.resize(s) + + with nogil: + err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], supportedArchs) + +@cython.embedsignature(True) +def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional[tuple[bytes] | list[bytes]], includeNames : Optional[tuple[bytes] | list[bytes]]): + """ nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter `prog` with it. + + Parameters + ---------- + src : bytes + CUDA program source. + name : bytes + CUDA program name. `name` can be `NULL`; `"default_program"` is + used when `name` is `NULL` or "". + numHeaders : int + Number of headers used. `numHeaders` must be greater than or equal + to 0. + headers : list[bytes] + Sources of the headers. `headers` can be `NULL` when `numHeaders` + is 0. + includeNames : list[bytes] + Name of each header by which they can be included in the CUDA + program source. `includeNames` can be `NULL` when `numHeaders` is + 0. These headers must be included with the exact names specified + here. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY` + - :py:obj:`~.NVRTC_ERROR_PROGRAM_CREATION_FAILURE` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + See Also + -------- + :py:obj:`~.nvrtcDestroyProgram` + """ + includeNames = [] if includeNames is None else includeNames + if not all(isinstance(_x, (bytes)) for _x in includeNames): + raise TypeError("Argument 'includeNames' is not instance of type (expected tuple[bytes] or list[bytes]") + headers = [] if headers is None else headers + if not all(isinstance(_x, (bytes)) for _x in headers): + raise TypeError("Argument 'headers' is not instance of type (expected tuple[bytes] or list[bytes]") + cdef nvrtcProgram prog = nvrtcProgram() + if numHeaders > len(headers): raise RuntimeError("List is too small: " + str(len(headers)) + " < " + str(numHeaders)) + if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) + cdef vector[const char*] cyheaders = headers + cdef vector[const char*] cyincludeNames = includeNames + with nogil: + err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], prog) + +@cython.embedsignature(True) +def nvrtcDestroyProgram(prog): + """ nvrtcDestroyProgram destroys the given program. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcCreateProgram` + """ + cdef cynvrtc.nvrtcProgram *cyprog + if prog is None: + cyprog = NULL + elif isinstance(prog, (nvrtcProgram,)): + pprog = prog.getPtr() + cyprog = pprog + elif isinstance(prog, (int)): + cyprog = prog + else: + raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) + with nogil: + err = cynvrtc.nvrtcDestroyProgram(cyprog) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | list[bytes]]): + """ nvrtcCompileProgram compiles the given program. + + It supports compile options listed in :py:obj:`~.Supported Compile + Options`. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + numOptions : int + Number of compiler options passed. + options : list[bytes] + Compiler options in the form of C string array. `options` can be + `NULL` when `numOptions` is 0. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_OUT_OF_MEMORY` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_OPTION` + - :py:obj:`~.NVRTC_ERROR_COMPILATION` + - :py:obj:`~.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE` + - :py:obj:`~.NVRTC_ERROR_TIME_FILE_WRITE_FAILED` + - :py:obj:`~.NVRTC_ERROR_CANCELLED` + """ + options = [] if options is None else options + if not all(isinstance(_x, (bytes)) for _x in options): + raise TypeError("Argument 'options' is not instance of type (expected tuple[bytes] or list[bytes]") + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) + cdef vector[const char*] cyoptions = options + with nogil: + err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetPTXSize(prog): + """ nvrtcGetPTXSize sets the value of `ptxSizeRet` with the size of the PTX generated by the previous compilation of `prog` (including the trailing `NULL`). + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + ptxSizeRet : int + Size of the generated PTX (including the trailing `NULL`). + + See Also + -------- + :py:obj:`~.nvrtcGetPTX` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t ptxSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], ptxSizeRet) + +@cython.embedsignature(True) +def nvrtcGetPTX(prog, char* ptx): + """ nvrtcGetPTX stores the PTX generated by the previous compilation of `prog` in the memory pointed by `ptx`. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + ptx : bytes + Compiled result. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcGetPTXSize` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetPTX(cyprog, ptx) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetCUBINSize(prog): + """ nvrtcGetCUBINSize sets the value of `cubinSizeRet` with the size of the cubin generated by the previous compilation of `prog`. The value of cubinSizeRet is set to 0 if the value specified to `-arch` is a virtual architecture instead of an actual architecture. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + cubinSizeRet : int + Size of the generated cubin. + + See Also + -------- + :py:obj:`~.nvrtcGetCUBIN` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t cubinSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], cubinSizeRet) + +@cython.embedsignature(True) +def nvrtcGetCUBIN(prog, char* cubin): + """ nvrtcGetCUBIN stores the cubin generated by the previous compilation of `prog` in the memory pointed by `cubin`. No cubin is available if the value specified to `-arch` is a virtual architecture instead of an actual architecture. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + cubin : bytes + Compiled and assembled result. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcGetCUBINSize` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetNVVMSize(prog): + """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + None + + Returns + ------- + nvrtcResult + + nvvmSizeRet : int + None + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t nvvmSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetNVVMSize(cyprog, &nvvmSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], nvvmSizeRet) + +@cython.embedsignature(True) +def nvrtcGetNVVM(prog, char* nvvm): + """ DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + None + nvvm : bytes + None + + Returns + ------- + nvrtcResult + + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetNVVM(cyprog, nvvm) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetLTOIRSize(prog): + """ nvrtcGetLTOIRSize sets the value of `LTOIRSizeRet` with the size of the LTO IR generated by the previous compilation of `prog`. The value of LTOIRSizeRet is set to 0 if the program was not compiled with `-dlto`. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + LTOIRSizeRet : int + Size of the generated LTO IR. + + See Also + -------- + :py:obj:`~.nvrtcGetLTOIR` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t LTOIRSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], LTOIRSizeRet) + +@cython.embedsignature(True) +def nvrtcGetLTOIR(prog, char* LTOIR): + """ nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of `prog` in the memory pointed by `LTOIR`. No LTO IR is available if the program was compiled without `-dlto`. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + LTOIR : bytes + Compiled result. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcGetLTOIRSize` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetOptiXIRSize(prog): + """ nvrtcGetOptiXIRSize sets the value of `optixirSizeRet` with the size of the OptiX IR generated by the previous compilation of `prog`. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + optixirSizeRet : int + Size of the generated LTO IR. + + See Also + -------- + :py:obj:`~.nvrtcGetOptiXIR` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t optixirSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], optixirSizeRet) + +@cython.embedsignature(True) +def nvrtcGetOptiXIR(prog, char* optixir): + """ nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of `prog` in the memory pointed by `optixir`. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + optixir : bytes + Optix IR Compiled result. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcGetOptiXIRSize` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetProgramLogSize(prog): + """ nvrtcGetProgramLogSize sets `logSizeRet` with the size of the log generated by the previous compilation of `prog` (including the trailing `NULL`). + + Note that compilation log may be generated with warnings and + informative messages, even when the compilation of `prog` succeeds. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + logSizeRet : int + Size of the compilation log (including the trailing `NULL`). + + See Also + -------- + :py:obj:`~.nvrtcGetProgramLog` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t logSizeRet = 0 + with nogil: + err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], logSizeRet) + +@cython.embedsignature(True) +def nvrtcGetProgramLog(prog, char* log): + """ nvrtcGetProgramLog stores the log generated by the previous compilation of `prog` in the memory pointed by `log`. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + log : bytes + Compilation log. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + + See Also + -------- + :py:obj:`~.nvrtcGetProgramLogSize` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetProgramLog(cyprog, log) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcAddNameExpression(prog, char* name_expression): + """ 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. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + name_expression : bytes + constant expression denoting the address of a global function or + device/__constant__ variable. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + - :py:obj:`~.NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION` + + See Also + -------- + :py:obj:`~.nvrtcGetLoweredName` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetLoweredName(prog, char* name_expression): + """ 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. + + Parameters + ---------- + prog : nvrtcProgram + CUDA Runtime Compilation program. + name_expression : bytes + constant expression denoting the address of a global function or + device/__constant__ variable. + + Returns + ------- + nvrtcResult + NVRTC_SUCCESS + NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION + NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID + lowered_name : bytes + initialized by the function to point to a C string containing the + lowered (mangled) name corresponding to the provided name + expression. + + See Also + -------- + nvrtcAddNameExpression + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef const char* lowered_name = NULL + with nogil: + err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + +@cython.embedsignature(True) +def nvrtcGetPCHHeapSize(): + """ retrieve the current size of the PCH Heap. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + ret : int + pointer to location where the size of the PCH Heap will be stored + """ + cdef size_t ret = 0 + with nogil: + err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], ret) + +@cython.embedsignature(True) +def nvrtcSetPCHHeapSize(size_t size): + """ set the size of the PCH Heap. + + 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. + + Parameters + ---------- + size : size_t + requested size of the PCH Heap, in bytes + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + """ + with nogil: + err = cynvrtc.nvrtcSetPCHHeapSize(size) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetPCHCreateStatus(prog): + """ returns the PCH creation status. + + 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 + :py:obj:`~.nvrtcGetPCHHeapSizeRequired()` can be used to query the + required heap size, the heap can be reallocated for this size with + :py:obj:`~.nvrtcSetPCHHeapSize()` and PCH creation may be reattempted + again invoking :py:obj:`~.nvrtcCompileProgram()` with a new NVRTC + program instance. NVRTC_ERROR_PCH_CREATE indicates that an error + condition prevented the PCH file from being created. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED` + - :py:obj:`~.NVRTC_ERROR_PCH_CREATE` + - :py:obj:`~.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + with nogil: + err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def nvrtcGetPCHHeapSizeRequired(prog): + """ retrieve the required size of the PCH heap required to compile the given program. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` The size retrieved using this function is only valid if :py:obj:`~.nvrtcGetPCHCreateStatus()` returned NVRTC_SUCCESS or NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + size : int + pointer to location where the required size of the PCH Heap will be + stored + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t size = 0 + with nogil: + err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + if err != cynvrtc.NVRTC_SUCCESS: + return (_dict_nvrtcResult[err], None) + return (_dict_nvrtcResult[err], size) + +@cython.embedsignature(True) +def nvrtcSetFlowCallback(prog, callback, payload): + """ 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: + + **View CUDA Toolkit Documentation for a C++ code example** + + When invoking the callback, the compiler will always pass `payload` to + param1 so that the callback may make decisions based on `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. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + callback : Any + the callback that issues cancellation signal. + payload : Any + to be passed as a parameter when invoking the callback. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + pprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cycallback = _HelperInputVoidPtr(callback) + cdef void* cycallback_ptr = cycallback.cptr + cypayload = _HelperInputVoidPtr(payload) + cdef void* cypayload_ptr = cypayload.cptr + with nogil: + err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) + return (_dict_nvrtcResult[err],) + +@cython.embedsignature(True) +def sizeof(objType): + """ Returns the size of provided CUDA Python structure in bytes + + Parameters + ---------- + objType : Any + CUDA Python object + + Returns + ------- + lowered_name : int + The size of `objType` in bytes + """ + if objType == nvrtcProgram: + return sizeof(cynvrtc.nvrtcProgram) + raise TypeError("Unknown type: " + str(objType)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.cpp b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.cpp new file mode 100644 index 0000000000000000000000000000000000000000..066588c09808c0788e7d8cfdfee0a2d5e5103a69 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.cpp @@ -0,0 +1,13203 @@ +/* Generated by Cython 3.1.5 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [], + "extra_compile_args": [ + "-std=c++14", + "-fpermissive", + "-Wno-deprecated-declarations", + "-fno-var-tracking-assignments", + "-O3" + ], + "include_dirs": [ + "/opt/python/cp312-cp312/include", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/include" + ], + "language": "c++", + "library_dirs": [ + "/tmp/build-env-3t3_8d9r/lib/python3.12/site-packages", + "/tmp/build-env-3t3_8d9r/lib", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib64", + "/host//home/runner/_work/cuda-python/cuda-python/cuda_toolkit/lib" + ], + "name": "cuda.bindings.nvvm", + "sources": [ + "cuda/bindings/nvvm.pyx" + ] + }, + "module_name": "cuda.bindings.nvvm" +} +END: Cython Metadata */ + +#ifndef PY_SSIZE_T_CLEAN +#define PY_SSIZE_T_CLEAN +#endif /* PY_SSIZE_T_CLEAN */ +/* InitLimitedAPI */ +#if defined(Py_LIMITED_API) + #if !defined(CYTHON_LIMITED_API) + #define CYTHON_LIMITED_API 1 + #endif +#elif defined(CYTHON_LIMITED_API) + #ifdef _MSC_VER + #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") + #else + #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. + #endif +#endif + +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x03080000 + #error Cython requires Python 3.8+. +#else +#define __PYX_ABI_VERSION "3_1_5" +#define CYTHON_HEX_VERSION 0x030105F0 +#define CYTHON_FUTURE_DIVISION 1 +/* CModulePreamble */ +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX +#if defined(GRAALVM_PYTHON) + /* For very preliminary testing purposes. Most variables are set the same as PyPy. + The existence of this section does not imply that anything works or is even tested */ + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 1 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(PYPY_VERSION) + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #if PY_VERSION_HEX < 0x03090000 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #undef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) + #endif + #undef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#elif defined(CYTHON_LIMITED_API) + #ifdef Py_LIMITED_API + #undef __PYX_LIMITED_VERSION_HEX + #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API + #endif + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #define CYTHON_COMPILING_IN_LIMITED_API 1 + #define CYTHON_COMPILING_IN_GRAAL 0 + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #undef CYTHON_CLINE_IN_TRACEBACK + #define CYTHON_CLINE_IN_TRACEBACK 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #endif + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #undef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #undef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING 0 + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) + #endif + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + #undef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #define CYTHON_COMPILING_IN_LIMITED_API 0 + #define CYTHON_COMPILING_IN_GRAAL 0 + #ifdef Py_GIL_DISABLED + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 + #else + #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 + #endif + #if PY_VERSION_HEX < 0x030A0000 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #elif !defined(CYTHON_USE_TYPE_SLOTS) + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #ifndef CYTHON_USE_TYPE_SPECS + #define CYTHON_USE_TYPE_SPECS 0 + #endif + #ifndef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #ifndef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLIST_INTERNALS) + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 + #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) + #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_ASSUME_SAFE_SIZE + #define CYTHON_ASSUME_SAFE_SIZE 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_FAST_GIL + #define CYTHON_FAST_GIL 0 + #elif !defined(CYTHON_FAST_GIL) + #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) + #endif + #ifndef CYTHON_METH_FASTCALL + #define CYTHON_METH_FASTCALL 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP487_INIT_SUBCLASS + #define CYTHON_PEP487_INIT_SUBCLASS 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 1 + #endif + #ifndef CYTHON_USE_MODULE_STATE + #define CYTHON_USE_MODULE_STATE 0 + #endif + #ifndef CYTHON_USE_SYS_MONITORING + #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 1 + #endif + #ifndef CYTHON_USE_AM_SEND + #define CYTHON_USE_AM_SEND 1 + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #elif !defined(CYTHON_USE_DICT_VERSIONS) + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 1 + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif + #ifndef CYTHON_USE_FREELISTS + #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) + #endif +#endif +#ifndef CYTHON_FAST_PYCCALL +#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL +#endif +#ifndef CYTHON_VECTORCALL +#if CYTHON_COMPILING_IN_LIMITED_API +#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) +#else +#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) +#endif +#endif +#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) +#if CYTHON_USE_PYLONG_INTERNALS + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME + #define CYTHON_LOCK_AND_GIL_DEADLOCK_AVOIDANCE_TIME 100 +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(maybe_unused) + #define CYTHON_UNUSED [[maybe_unused]] + #endif + #endif + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR + #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_USE_CPP_STD_MOVE + #if defined(__cplusplus) && (\ + __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) + #define CYTHON_USE_CPP_STD_MOVE 1 + #else + #define CYTHON_USE_CPP_STD_MOVE 0 + #endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + #endif + #endif + #if _MSC_VER < 1300 + #ifdef _WIN64 + typedef unsigned long long __pyx_uintptr_t; + #else + typedef unsigned int __pyx_uintptr_t; + #endif + #else + #ifdef _WIN64 + typedef unsigned __int64 __pyx_uintptr_t; + #else + typedef unsigned __int32 __pyx_uintptr_t; + #endif + #endif +#else + #include + typedef uintptr_t __pyx_uintptr_t; +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) + /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 + * but leads to warnings with -pedantic, since it is a C++17 feature */ + #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif +#ifndef Py_UNREACHABLE + #define Py_UNREACHABLE() assert(0); abort() +#endif +#ifdef __cplusplus + template + struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; + #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) +#else + #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) +#endif +#if CYTHON_COMPILING_IN_PYPY == 1 + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) +#else + #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) +#endif +#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) + +/* CppInitCode */ +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + template bool operator ==(const U& other) const { return *ptr == other; } + template bool operator !=(const U& other) const { return *ptr != other; } + template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } + template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } + private: + T *ptr; +}; + +/* PythonCompatibility */ +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#define __Pyx_BUILTIN_MODULE_NAME "builtins" +#define __Pyx_DefaultClassType PyType_Type +#if CYTHON_COMPILING_IN_LIMITED_API + #ifndef CO_OPTIMIZED + static int CO_OPTIMIZED; + #endif + #ifndef CO_NEWLOCALS + static int CO_NEWLOCALS; + #endif + #ifndef CO_VARARGS + static int CO_VARARGS; + #endif + #ifndef CO_VARKEYWORDS + static int CO_VARKEYWORDS; + #endif + #ifndef CO_ASYNC_GENERATOR + static int CO_ASYNC_GENERATOR; + #endif + #ifndef CO_GENERATOR + static int CO_GENERATOR; + #endif + #ifndef CO_COROUTINE + static int CO_COROUTINE; + #endif +#else + #ifndef CO_COROUTINE + #define CO_COROUTINE 0x80 + #endif + #ifndef CO_ASYNC_GENERATOR + #define CO_ASYNC_GENERATOR 0x200 + #endif +#endif +static int __Pyx_init_co_variables(void); +#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) + #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) +#else + #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) + #define __Pyx_Py_Is(x, y) Py_Is(x, y) +#else + #define __Pyx_Py_Is(x, y) ((x) == (y)) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) + #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) +#else + #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) + #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) +#else + #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) +#endif +#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) + #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) +#else + #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) +#endif +#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) +#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) +#else + #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef Py_TPFLAGS_SEQUENCE + #define Py_TPFLAGS_SEQUENCE 0 +#endif +#ifndef Py_TPFLAGS_MAPPING + #define Py_TPFLAGS_MAPPING 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#ifndef METH_FASTCALL + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #if PY_VERSION_HEX >= 0x030d00A4 + # define __Pyx_PyCFunctionFast PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords + #else + # define __Pyx_PyCFunctionFast _PyCFunctionFast + # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords + #endif +#endif +#if CYTHON_METH_FASTCALL + #define __Pyx_METH_FASTCALL METH_FASTCALL + #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast + #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords +#else + #define __Pyx_METH_FASTCALL METH_VARARGS + #define __Pyx_PyCFunction_FastCall PyCFunction + #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords +#endif +#if CYTHON_VECTORCALL + #define __pyx_vectorcallfunc vectorcallfunc + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET + #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) +#elif CYTHON_BACKPORT_VECTORCALL + typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, + size_t nargsf, PyObject *kwnames); + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) +#else + #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 + #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) +#endif +#if PY_VERSION_HEX >= 0x030900B1 +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) +#else +#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) +#endif +#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) +#elif !CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) +#endif +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) +static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { + return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; +} +#endif +static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { +#if CYTHON_COMPILING_IN_LIMITED_API + return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; +#else + return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +#endif +} +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) +#if __PYX_LIMITED_VERSION_HEX < 0x03090000 + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) + typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); +#else + #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) + #define __Pyx_PyCMethod PyCMethod +#endif +#ifndef METH_METHOD + #define METH_METHOD 0x200 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) +#elif CYTHON_COMPILING_IN_GRAAL + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyThreadState_Current PyThreadState_Get() +#elif !CYTHON_FAST_THREAD_STATE + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x030d00A1 + #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#endif +#if CYTHON_USE_MODULE_STATE +static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) +{ + void *result; + result = PyModule_GetState(op); + if (!result) + Py_FatalError("Couldn't find the module state"); + return result; +} +#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) +#else +#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) +#endif +#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) +#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) +#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) + #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) + #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) +#else + #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) + #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ + ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ + (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ + __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) + #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) + #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { + PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); + if (res == NULL) PyErr_Clear(); + return res; +} +#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 +#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#else +static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { +#if CYTHON_COMPILING_IN_PYPY + return PyDict_GetItem(dict, name); +#else + PyDictEntry *ep; + PyDictObject *mp = (PyDictObject*) dict; + long hash = ((PyStringObject *) name)->ob_shash; + assert(hash != -1); + ep = (mp->ma_lookup)(mp, name, hash); + if (ep == NULL) { + return NULL; + } + return ep->me_value; +#endif +} +#define __Pyx_PyDict_GetItemStr PyDict_GetItem +#endif +#if CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) + #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) +#else + #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) + #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) +#endif +#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) +#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 +#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ + PyTypeObject *type = Py_TYPE((PyObject*)obj);\ + assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ + PyObject_GC_Del(obj);\ + Py_DECREF(type);\ +} +#else +#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) + #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) + #define __Pyx_PyUnicode_DATA(u) ((void*)u) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) +#else + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_READY(op) (0) + #else + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #endif + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) + #if PY_VERSION_HEX >= 0x030C0000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #else + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #endif +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #if !defined(PyUnicode_DecodeUnicodeEscape) + #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) + #endif + #if !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) + #endif + #if !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) + #endif + #if !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) + #endif +#endif +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if CYTHON_COMPILING_IN_CPYTHON + #define __Pyx_PySequence_ListKeepNew(obj)\ + (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) +#else + #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) +#endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif +#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) + #else + #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) + #endif +#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) + #else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) + #endif +#else + #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyObject_GetItem(dict, key); + if (*result == NULL) { + if (PyErr_ExceptionMatches(PyExc_KeyError)) { + PyErr_Clear(); + return 0; + } + return -1; + } + return 1; +} +#else +static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { + *result = PyDict_GetItemWithError(dict, key); + if (*result == NULL) { + return PyErr_Occurred() ? -1 : 0; + } + Py_INCREF(*result); + return 1; +} +#endif +#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST + #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) +#else + #define __Pyx_VISIT_CONST(obj) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) +#else + #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) + #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) + #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) + #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) + #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) +#endif +#if CYTHON_ASSUME_SAFE_SIZE + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) +#else + #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) + #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) + #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) + #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) + #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) + #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) +#endif +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) +#else + static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { + PyObject *module = PyImport_AddModule(name); + Py_XINCREF(module); + return module; + } +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) +#endif +#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t +#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t +#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 + #define __Pyx_PySendResult PySendResult +#else + typedef enum { + PYGEN_RETURN = 0, + PYGEN_ERROR = -1, + PYGEN_NEXT = 1, + } __Pyx_PySendResult; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 + typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); +#else + #define __Pyx_pyiter_sendfunc sendfunc +#endif +#if !CYTHON_USE_AM_SEND +#define __PYX_HAS_PY_AM_SEND 0 +#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 +#define __PYX_HAS_PY_AM_SEND 1 +#else +#define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation +#endif +#if __PYX_HAS_PY_AM_SEND < 2 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods +#else + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + __Pyx_pyiter_sendfunc am_send; + } __Pyx_PyAsyncMethodsStruct; + #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) +#endif +#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 + #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) +#else + #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) +#endif +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() +#else +#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp +#endif +#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 +#ifdef __cplusplus +extern "C" +#endif +PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { + int value; + PyObject *py_value = PyObject_GetAttrString(inspect, name); + if (!py_value) return 0; + value = (int) PyLong_AsLong(py_value); + Py_DECREF(py_value); + *write_to = value; + return value != -1 || !PyErr_Occurred(); +} +static int __Pyx_init_co_variables(void) { + PyObject *inspect; + int result; + inspect = PyImport_ImportModule("inspect"); + result = +#if !defined(CO_OPTIMIZED) + __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && +#endif +#if !defined(CO_NEWLOCALS) + __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && +#endif +#if !defined(CO_VARARGS) + __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && +#endif +#if !defined(CO_VARKEYWORDS) + __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && +#endif +#if !defined(CO_ASYNC_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && +#endif +#if !defined(CO_GENERATOR) + __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && +#endif +#if !defined(CO_COROUTINE) + __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && +#endif + 1; + Py_DECREF(inspect); + return result ? 0 : -1; +} +#else +static int __Pyx_init_co_variables(void) { + return 0; // It's a limited API-only feature +} +#endif + +/* MathInitCode */ +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES + #endif +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + +#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 +#endif +#ifndef CYTHON_CLINE_IN_TRACEBACK +#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME +#endif +#if CYTHON_CLINE_IN_TRACEBACK +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } +#else +#define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } +#endif +#define __PYX_ERR(f_index, lineno, Ln_error) \ + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } + +#ifdef CYTHON_EXTERN_C + #undef __PYX_EXTERN_C + #define __PYX_EXTERN_C CYTHON_EXTERN_C +#elif defined(__PYX_EXTERN_C) + #ifdef _MSC_VER + #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") + #else + #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. + #endif +#else + #define __PYX_EXTERN_C extern "C++" +#endif + +#define __PYX_HAVE__cuda__bindings__nvvm +#define __PYX_HAVE_API__cuda__bindings__nvvm +/* Early includes */ +#include +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include +#include + + template + class nullable_unique_ptr { + public: + nullable_unique_ptr() noexcept = default; + + nullable_unique_ptr(std::nullptr_t) noexcept = delete; + + explicit nullable_unique_ptr(T* data, bool own_data): + own_data_(own_data) + { + if (own_data) + manager_.reset(data); + else + raw_data_ = data; + } + + nullable_unique_ptr(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr& operator=(const nullable_unique_ptr&) = delete; + + nullable_unique_ptr(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + } + + nullable_unique_ptr& operator=(nullable_unique_ptr&& other) noexcept + { + own_data_ = other.own_data_; + other.own_data_ = false; // ownership is transferred + if (own_data_) + { + manager_ = std::move(other.manager_); + raw_data_ = nullptr; // just in case + } + else + { + manager_.reset(nullptr); // just in case + raw_data_ = other.raw_data_; + } + return *this; + } + + ~nullable_unique_ptr() = default; + + void reset(T* data, bool own_data) + { + own_data_ = own_data; + if (own_data_) + { + manager_.reset(data); + raw_data_ = nullptr; + } + else + { + manager_.reset(nullptr); + raw_data_ = data; + } + } + + void swap(nullable_unique_ptr& other) noexcept + { + std::swap(manager_, other.manager_); + std::swap(raw_data_, other.raw_data_); + std::swap(own_data_, other.own_data_); + } + + /* + * Get the pointer to the underlying object (this is different from data()!). + */ + T* get() const noexcept + { + if (own_data_) + return manager_.get(); + else + return raw_data_; + } + + /* + * Get the pointer to the underlying buffer (this is different from get()!). + */ + void* data() noexcept + { + if (own_data_) + return manager_.get()->data(); + else + return raw_data_; + } + + T& operator*() + { + if (own_data_) + return *manager_; + else + return *raw_data_; + } + + private: + std::unique_ptr manager_{}; + T* raw_data_{nullptr}; + bool own_data_{false}; + }; + +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) +#else + #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) + #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) + #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) +#endif +#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) + return Py_NewRef(obj); +#else + Py_INCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) + return Py_XNewRef(obj); +#else + Py_XINCREF(obj); + return obj; +#endif +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); +#if CYTHON_ASSUME_SAFE_MACROS +#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) +#else +#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) +#endif +#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_VERSION_HEX >= 0x030C00A7 + #ifndef _PyLong_SIGN_MASK + #define _PyLong_SIGN_MASK 3 + #endif + #ifndef _PyLong_NON_SIZE_BITS + #define _PyLong_NON_SIZE_BITS 3 + #endif + #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) + #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) + #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) + #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) + #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_SignedDigitCount(x)\ + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) + #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) + #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) + #endif + typedef Py_ssize_t __Pyx_compact_pylong; + typedef size_t __Pyx_compact_upylong; + #else + #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) + #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) + #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) + #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) + #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) + #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) + #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) + #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) + #define __Pyx_PyLong_CompactValue(x)\ + ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) + typedef sdigit __Pyx_compact_pylong; + typedef digit __Pyx_compact_upylong; + #endif + static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value); + #if PY_VERSION_HEX >= 0x030C00A5 + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) + #else + #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) + #endif +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) +#else + #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +/* PretendToInitialize */ +#ifdef __cplusplus +#if __cplusplus > 201103L +#include +#endif +template +static void __Pyx_pretend_to_initialize(T* ptr) { +#if __cplusplus > 201103L + if ((std::is_trivially_default_constructible::value)) +#endif + *ptr = T(); + (void)ptr; +} +#else +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } +#endif + + +#if !CYTHON_USE_MODULE_STATE +static PyObject *__pyx_m = NULL; +#endif +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * const __pyx_cfilenm = __FILE__; +static const char *__pyx_filename; + +/* #### Code section: filename_table ### */ + +static const char* const __pyx_f[] = { + "cuda/bindings/nvvm.pyx", +}; +/* #### Code section: utility_code_proto_before_types ### */ +/* Atomics.proto */ +#include +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif +#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS +#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __pyx_atomic_int_type int +#define __pyx_nonatomic_int_type int +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__)) + #include +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ + (defined(_MSC_VER) && _MSC_VER >= 1700))) + #include +#endif +#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ + (__STDC_VERSION__ >= 201112L) &&\ + !defined(__STDC_NO_ATOMICS__) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type atomic_int + #define __pyx_atomic_ptr_type atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) atomic_load(value) + #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C atomics" + #endif +#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ + (__cplusplus >= 201103L) ||\ +\ + (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ + ATOMIC_INT_LOCK_FREE == 2) + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type std::atomic_int + #define __pyx_atomic_ptr_type std::atomic_uintptr_t + #define __pyx_nonatomic_ptr_type uintptr_t + #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) + #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) + #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) + #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) + #define __pyx_atomic_load(value) std::atomic_load(value) + #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) + #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) + #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) + #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) + #pragma message ("Using standard C++ atomics") + #elif defined(__PYX_DEBUG_ATOMICS) + #warning "Using standard C++ atomics" + #endif +#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ + (__GNUC_MINOR__ > 1 ||\ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) + #define __pyx_atomic_ptr_type void* + #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) + #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type long + #define __pyx_atomic_ptr_type void* + #undef __pyx_nonatomic_int_type + #define __pyx_nonatomic_int_type long + #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) + #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) + #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) + #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) + static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { + __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); + int result = old == *expected; + *expected = old; + return result; + } + #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) + #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) + #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value + #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) + #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview)\ + __pyx_atomic_incr_relaxed(__pyx_get_slice_count_pointer(memview)) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_atomic_decr_acq_rel(__pyx_get_slice_count_pointer(memview)) +#else + #define __pyx_add_acquisition_count(memview)\ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview)\ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + +/* ForceInitThreads.proto */ +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/* NoFastGil.proto */ +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/* IncludeStructmemberH.proto */ +#include + +/* CriticalSections.proto */ +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +#define __Pyx_PyCriticalSection void* +#define __Pyx_PyCriticalSection2 void* +#define __Pyx_PyCriticalSection_Begin1(cs, arg) (void)cs +#define __Pyx_PyCriticalSection_Begin2(cs, arg1, arg2) (void)cs +#define __Pyx_PyCriticalSection_End1(cs) +#define __Pyx_PyCriticalSection_End2(cs) +#else +#define __Pyx_PyCriticalSection PyCriticalSection +#define __Pyx_PyCriticalSection2 PyCriticalSection2 +#define __Pyx_PyCriticalSection_Begin1 PyCriticalSection_Begin +#define __Pyx_PyCriticalSection_Begin2 PyCriticalSection2_Begin +#define __Pyx_PyCriticalSection_End1 PyCriticalSection_End +#define __Pyx_PyCriticalSection_End2 PyCriticalSection2_End +#endif +#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_BEGIN_CRITICAL_SECTION(o) { +#define __Pyx_END_CRITICAL_SECTION() } +#else +#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION +#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION +#endif + +/* #### Code section: numeric_typedefs ### */ +/* #### Code section: complex_type_declarations ### */ +/* #### Code section: type_declarations ### */ + +/*--- Type declarations ---*/ + +/* "cynvvm.pxd":13 + * + * # enums + * ctypedef enum nvvmResult "nvvmResult": # <<<<<<<<<<<<<< + * NVVM_SUCCESS "NVVM_SUCCESS" = 0 + * NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 +*/ +enum nvvmResult { + NVVM_SUCCESS = 0, + NVVM_ERROR_OUT_OF_MEMORY = 1, + NVVM_ERROR_PROGRAM_CREATION_FAILURE = 2, + NVVM_ERROR_IR_VERSION_MISMATCH = 3, + NVVM_ERROR_INVALID_INPUT = 4, + NVVM_ERROR_INVALID_PROGRAM = 5, + NVVM_ERROR_INVALID_IR = 6, + NVVM_ERROR_INVALID_OPTION = 7, + NVVM_ERROR_NO_MODULE_IN_PROGRAM = 8, + NVVM_ERROR_COMPILATION = 9, + NVVM_ERROR_CANCELLED = 10, + _NVVMRESULT_INTERNAL_LOADING_ERROR = -42L +}; +typedef enum nvvmResult nvvmResult; + +/* "cynvvm.pxd":29 + * + * # types + * ctypedef void* nvvmProgram 'nvvmProgram' # <<<<<<<<<<<<<< + * + * +*/ +typedef void *nvvmProgram; +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource; +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer; + +/* "_internal/utils.pxd":156 + * + * + * cdef cppclass nested_resource[T]: # <<<<<<<<<<<<<< + * nullable_unique_ptr[ vector[intptr_t] ] ptrs + * nullable_unique_ptr[ vector[vector[T]] ] nested_resource_ptr +*/ +template +struct __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource { + nullable_unique_ptr > ptrs; + nullable_unique_ptr > > nested_resource_ptr; +}; + +/* "_internal/utils.pxd":167 + * + * cdef bint is_nested_sequence(data) + * cdef void* get_buffer_pointer(buf, Py_ssize_t size, readonly=*) except* # <<<<<<<<<<<<<< +*/ +struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer { + int __pyx_n; + PyObject *readonly; +}; + +/* "cuda/bindings/nvvm.pxd":16 + * ############################################################################### + * + * ctypedef nvvmProgram Program # <<<<<<<<<<<<<< + * + * +*/ +typedef nvvmProgram __pyx_t_4cuda_8bindings_4nvvm_Program; + +/* "cuda/bindings/nvvm.pxd":23 + * ############################################################################### + * + * ctypedef nvvmResult _Result # <<<<<<<<<<<<<< + * + * +*/ +typedef nvvmResult __pyx_t_4cuda_8bindings_4nvvm__Result; +/* #### Code section: utility_code_proto ### */ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, Py_ssize_t); + void (*DECREF)(void*, PyObject*, Py_ssize_t); + void (*GOTREF)(void*, PyObject*, Py_ssize_t); + void (*GIVEREF)(void*, PyObject*, Py_ssize_t); + void* (*SetupContext)(const char*, Py_ssize_t, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContextNogil() {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __Pyx_RefNannyFinishContext();\ + PyGILState_Release(__pyx_gilstate_save);\ + } + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) + #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContextNogil() + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_Py_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; Py_XDECREF(tmp);\ + } while (0) +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyErrExceptionMatches.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#if PY_VERSION_HEX >= 0x030C00A6 +#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) +#else +#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) +#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) +#endif +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) +#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* TupleAndListFromArray.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); +#endif +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); +#endif + +/* IncludeStringH.proto */ +#include + +/* BytesEquals.proto */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); + +/* UnicodeEquals.proto */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); + +/* fastcall.proto */ +#if CYTHON_AVOID_BORROWED_REFS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) +#elif CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) +#else + #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) +#endif +#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) +#define __Pyx_KwValues_VARARGS(args, nargs) NULL +#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) +#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) +#if CYTHON_METH_FASTCALL + #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) + #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API + CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +#else + #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS + #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS + #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS + #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS + #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS +#endif +#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) +#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) +#else +#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) +#endif + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static CYTHON_INLINE int __Pyx_ParseKeywords( + PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], + PyObject *kwds2, PyObject *values[], + Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs +); + +/* CallCFunction.proto */ +#define __Pyx_CallCFunction(cfunc, self, args)\ + ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) +#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ + ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) +#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ + ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) +#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ + ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#if !CYTHON_VECTORCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs); +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif +#if !CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03080000 + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets() + #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) +#else + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif +#endif +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectFastCall.proto */ +#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); + +/* UnpackUnboundCMethod.proto */ +typedef struct { + PyObject *type; + PyObject **method_name; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS + __pyx_atomic_int_type initialized; +#endif + PyCFunction func; + PyObject *method; + int flag; +} __Pyx_CachedCFunction; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING +static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { +#if !CYTHON_ATOMICS + return 1; +#else + __pyx_nonatomic_int_type expected = 0; + if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { + return 0; + } + return expected; +#endif +} +static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { +#if CYTHON_ATOMICS + __pyx_atomic_store(&cfunc->initialized, 2); +#endif +} +#else +#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 +#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) +#endif + +/* CallUnboundCMethod2.proto */ +CYTHON_UNUSED +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* PyObjectDelAttr.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +#define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) +#else +#define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) +#endif + +/* PyObjectSetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); +#else +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) do {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} while(0) +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif + +/* JoinPyUnicode.proto */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/* PyObjectFastCallMethod.proto */ +#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 +#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) +#else +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* ErrOccurredWithGIL.proto */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); + +/* decode_c_string_utf16.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/* decode_c_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/* decode_bytes.proto */ +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + char* as_c_string; + Py_ssize_t size; +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + as_c_string = PyBytes_AS_STRING(string); + size = PyBytes_GET_SIZE(string); +#else + if (PyBytes_AsStringAndSize(string, &as_c_string, &size) < 0) { + return NULL; + } +#endif + return __Pyx_decode_c_bytes( + as_c_string, size, + start, stop, encoding, errors, decode_func); +} + +/* ListPack.proto */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + +/* Py3UpdateBases.proto */ +static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); + +/* CalculateMetaclass.proto */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/* SetNameInClass.proto */ +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value)\ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + +/* PyObjectLookupSpecial.proto */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) +#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); +#else +#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + +/* Py3ClassCreate.proto */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); + +/* LimitedApiGetTypeDict.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); +#endif + +/* SetItemOnTypeDict.proto */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); +#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) + +/* FixUpExtensionType.proto */ +static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); + +/* FetchSharedCythonModule.proto */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void); + +/* dict_setdefault.proto */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); + +/* FetchCommonType.proto */ +static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); + +/* CommonTypesMetaclass.proto */ +static int __pyx_CommonTypesMetaclass_init(PyObject *module); +#define __Pyx_CommonTypesMetaclass_USED + +/* CallTypeTraverse.proto */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); +#endif + +/* PyMethodNew.proto */ +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); + +/* PyVectorcallFastCallDict.proto */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); +#endif + +/* CythonFunctionShared.proto */ +#define __Pyx_CyFunction_USED +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 +#define __Pyx_CYFUNCTION_COROUTINE 0x08 +#define __Pyx_CyFunction_GetClosure(f)\ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + #define __Pyx_CyFunction_GetClassObj(f)\ + (((__pyx_CyFunctionObject *) (f))->func_classobj) +#else + #define __Pyx_CyFunction_GetClassObj(f)\ + ((PyObject*) ((PyCMethodObject *) (f))->mm_class) +#endif +#define __Pyx_CyFunction_SetClassObj(f, classobj)\ + __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) +#define __Pyx_CyFunction_Defaults(type, f)\ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) +typedef struct { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject_HEAD + PyObject *func; +#elif PY_VERSION_HEX < 0x030900B1 + PyCFunctionObject func; +#else + PyCMethodObject func; +#endif +#if CYTHON_BACKPORT_VECTORCALL ||\ + (CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) + __pyx_vectorcallfunc func_vectorcall; +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + PyObject *func_classobj; +#endif + PyObject *defaults; + int flags; + PyObject *defaults_tuple; + PyObject *defaults_kwdict; + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; + PyObject *func_is_coroutine; +} __pyx_CyFunctionObject; +#undef __Pyx_CyOrPyCFunction_Check +#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) +#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) +#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); +#undef __Pyx_IsSameCFunction +#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, + PyTypeObject *defaults_type); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); +static int __pyx_CyFunction_init(PyObject *module); +#if CYTHON_METH_FASTCALL +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) +#else +#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) +#endif +#endif + +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +/* CLineInTraceback.proto */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#else +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#endif + +/* CodeObjectCache.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject __Pyx_CachedCodeObjectType; +#else +typedef PyCodeObject __Pyx_CachedCodeObjectType; +#endif +typedef struct { + __Pyx_CachedCodeObjectType* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_int_type accessor_count; + #endif +}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* GCCDiagnostics.proto */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + +/* PyObjectVectorCallKwBuilder.proto */ +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#if CYTHON_VECTORCALL +#if PY_VERSION_HEX >= 0x03090000 +#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall +#endif +#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); +#else +#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict +#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) +#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) +#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvvmResult(nvvmResult value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); + +/* FormatTypeName.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API +typedef PyObject *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%U" +#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 +#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName +#else +static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); +#endif +#else // !LIMITED_API +typedef const char *__Pyx_TypeName; +#define __Pyx_FMT_TYPENAME "%.200s" +#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) +#define __Pyx_DECREF_TypeName(obj) +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { + return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); +} +#endif +#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) +#ifdef PyExceptionInstance_Check + #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) +#else + #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) +#endif + +/* GetRuntimeVersion.proto */ +static unsigned long __Pyx_get_runtime_version(void); + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); + +/* FunctionExport.proto */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); + +/* FunctionImport.proto */ +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig); + +/* MultiPhaseInitModuleState.proto */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +static PyObject *__Pyx_State_FindModule(void*); +static int __Pyx_State_AddModule(PyObject* module, void*); +static int __Pyx_State_RemoveModule(void*); +#elif CYTHON_USE_MODULE_STATE +#define __Pyx_State_FindModule PyState_FindModule +#define __Pyx_State_AddModule PyState_AddModule +#define __Pyx_State_RemoveModule PyState_RemoveModule +#endif + +/* #### Code section: module_declarations ### */ +/* CythonABIVersion.proto */ +#if CYTHON_COMPILING_IN_LIMITED_API + #if CYTHON_METH_FASTCALL + #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" + #else + #define __PYX_FASTCALL_ABI_SUFFIX + #endif + #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#else + #define __PYX_LIMITED_ABI_SUFFIX +#endif +#if __PYX_HAS_PY_AM_SEND == 1 + #define __PYX_AM_SEND_ABI_SUFFIX +#elif __PYX_HAS_PY_AM_SEND == 2 + #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" +#else + #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" +#endif +#ifndef __PYX_MONITORING_ABI_SUFFIX + #define __PYX_MONITORING_ABI_SUFFIX +#endif +#if CYTHON_USE_TP_FINALIZE + #define __PYX_TP_FINALIZE_ABI_SUFFIX +#else + #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" +#endif +#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) + #define __PYX_FREELISTS_ABI_SUFFIX +#else + #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" +#endif +#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX +#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI +#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." + + +/* Module declarations from "libc.stdint" */ + +/* Module declarations from "cuda.bindings.cynvvm" */ +static char const *(*__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetErrorString)(nvvmResult); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmVersion)(int *, int *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmIRVersion)(int *, int *, int *, int *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmCreateProgram)(nvvmProgram *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmDestroyProgram)(nvvmProgram *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmAddModuleToProgram)(nvvmProgram, char const *, size_t, char const *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmLazyAddModuleToProgram)(nvvmProgram, char const *, size_t, char const *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmCompileProgram)(nvvmProgram, int, char const **); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmVerifyProgram)(nvvmProgram, int, char const **); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResultSize)(nvvmProgram, size_t *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResult)(nvvmProgram, char *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLogSize)(nvvmProgram, size_t *); /*proto*/ +static nvvmResult (*__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLog)(nvvmProgram, char *); /*proto*/ + +/* Module declarations from "cython" */ + +/* Module declarations from "libcpp.vector" */ + +/* Module declarations from "libcpp" */ + +/* Module declarations from "libcpp.memory" */ + +/* Module declarations from "cuda.bindings._internal.utils" */ +static void *(*__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer)(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args); /*proto*/ +static int (*__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *); /*proto*/ +static int (*__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *); /*proto*/ +static int (*__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *); /*proto*/ +static int (*__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *); /*proto*/ +static int (*__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *); /*proto*/ +static int (*__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr)(__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *); /*proto*/ + +/* Module declarations from "cuda.bindings.nvvm" */ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_error_string(int, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_version(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_ir_version(int __pyx_skip_dispatch); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_4nvvm_create_program(int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_add_module_to_program(intptr_t, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_lazy_add_module_to_program(intptr_t, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_compile_program(intptr_t, int, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_verify_program(intptr_t, int, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_4nvvm_get_compiled_result_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_compiled_result(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_4nvvm_get_program_log_size(intptr_t, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_program_log(intptr_t, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static int __pyx_f_4cuda_8bindings_4nvvm_check_status(int); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_destroy_program(intptr_t, int __pyx_skip_dispatch); /*proto*/ +/* #### Code section: typeinfo ### */ +/* #### Code section: before_global_var ### */ +#define __Pyx_MODULE_NAME "cuda.bindings.nvvm" +extern int __pyx_module_is_main_cuda__bindings__nvvm; +int __pyx_module_is_main_cuda__bindings__nvvm = 0; + +/* Implementation of "cuda.bindings.nvvm" */ +/* #### Code section: global_var ### */ +static PyObject *__pyx_builtin_super; +static PyObject *__pyx_builtin_TypeError; +/* #### Code section: string_decls ### */ +static const char __pyx_k_[] = " ("; +static const char __pyx_k_s[] = "s"; +static const char __pyx_k__2[] = ")"; +static const char __pyx_k__3[] = "."; +static const char __pyx_k__4[] = "?"; +static const char __pyx_k_doc[] = "__doc__"; +static const char __pyx_k_err[] = "err"; +static const char __pyx_k_pop[] = "pop"; +static const char __pyx_k_1A_Q[] = "\320\000(\250\001\360\022\000\n\013\330\010\021\320\021\"\240!\2401\240A\330\004\020\220\001\220\021\330\004\013\210:\220Q"; +static const char __pyx_k_1_87[] = "\200\001\360\022\000\005\020\320\017!\240\021\240)\2501\330\004\013\2108\2207\230!"; +static const char __pyx_k_enum[] = "enum"; +static const char __pyx_k_func[] = "__func__"; +static const char __pyx_k_init[] = "__init__"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "name"; +static const char __pyx_k_prog[] = "prog"; +static const char __pyx_k_self[] = "self"; +static const char __pyx_k_size[] = "size"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_A_AXT[] = "\200A\330\010\020\220\004\220A\220X\230T\240\021"; +static const char __pyx_k_super[] = "super"; +static const char __pyx_k_value[] = "value"; +static const char __pyx_k_AYl_9F[] = "\200\001\360\022\000\005\033\320\032,\250A\250Y\260l\300!\330\t\n\330\010\021\320\021\"\240!\2409\250F\260'\270\021\330\004\020\220\001\220\021"; +static const char __pyx_k_Result[] = "Result"; +static const char __pyx_k_Ya_1AQ[] = "\200\001\360\020\000\005\026\220Y\230a\330\t\n\330\010\021\320\021#\2401\240A\240Q\330\004\020\220\001\220\021"; +static const char __pyx_k_buffer[] = "buffer"; +static const char __pyx_k_module[] = "__module__"; +static const char __pyx_k_name_2[] = "__name__"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_result[] = "result"; +static const char __pyx_k_status[] = "status"; +static const char __pyx_k_IntEnum[] = "IntEnum"; +static const char __pyx_k_SUCCESS[] = "SUCCESS"; +static const char __pyx_k_options[] = "options"; +static const char __pyx_k_prepare[] = "__prepare__"; +static const char __pyx_k_version[] = "version"; +static const char __pyx_k_AQgQa_G1[] = "\200\001\360\032\000\n\013\330\010\021\220\033\230A\230Q\230g\240Q\240a\330\004\020\220\001\220\021\330\004\014\210G\2201"; +static const char __pyx_k_Q_9F_1_1[] = "\320\000=\270Q\360\030\000\n\013\330\010\021\320\021*\250!\2509\260F\270!\2701\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_qualname[] = "__qualname__"; +static const char __pyx_k_set_name[] = "__set_name__"; +static const char __pyx_k_9_ay_aq_1[] = "\320\0009\270\021\360\030\000\n\013\330\010\021\320\021&\240a\240y\260\006\260a\260q\330\004\020\220\001\220\021\330\004\013\2101"; +static const char __pyx_k_AYl_ay_gQ[] = "\200\001\360\022\000\005\033\320\032,\250A\250Y\260l\300!\330\t\n\330\010\021\320\021&\240a\240y\260\006\260g\270Q\330\004\020\220\001\220\021"; +static const char __pyx_k_IntEnum_2[] = "_IntEnum"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_metaclass[] = "__metaclass__"; +static const char __pyx_k_nvvmError[] = "nvvmError"; +static const char __pyx_k_aq_Qk_Jj_1[] = "\200\001\360\"\000\n\013\330\010\021\220\035\230a\230q\240\n\250!\250:\260Q\260k\300\021\300!\330\004\020\220\001\220\021\330\004\014\210J\220j\240\013\2501"; +static const char __pyx_k_ir_version[] = "ir_version"; +static const char __pyx_k_mro_entries[] = "__mro_entries__"; +static const char __pyx_k_num_options[] = "num_options"; +static const char __pyx_k_is_coroutine[] = "_is_coroutine"; +static const char __pyx_k_See_nvvmResult[] = "See `nvvmResult`."; +static const char __pyx_k_create_program[] = "create_program"; +static const char __pyx_k_verify_program[] = "verify_program"; +static const char __pyx_k_ERROR_CANCELLED[] = "ERROR_CANCELLED"; +static const char __pyx_k_compile_program[] = "compile_program"; +static const char __pyx_k_destroy_program[] = "destroy_program"; +static const char __pyx_k_get_program_log[] = "get_program_log"; +static const char __pyx_k_1E_YgQ_9F_iW_aab[] = "\200\001\360\"\000\005\034\2301\230E\240\021\240+\250Y\260g\270Q\330\t\n\330\010\021\320\021\"\240!\2409\250F\260-\270\177\310i\320W\\\320\\a\320ab\330\004\020\220\001\220\021"; +static const char __pyx_k_ERROR_INVALID_IR[] = "ERROR_INVALID_IR"; +static const char __pyx_k_get_error_string[] = "get_error_string"; +static const char __pyx_k_nvvmError___init[] = "nvvmError.__init__"; +static const char __pyx_k_1E_YgQ_1IV_yX_bbc[] = "\200\001\360\"\000\005\034\2301\230E\240\021\240+\250Y\260g\270Q\330\t\n\330\010\021\320\021#\2401\240I\250V\260=\300\017\310y\320X]\320]b\320bc\330\004\020\220\001\220\021"; +static const char __pyx_k_ERROR_COMPILATION[] = "ERROR_COMPILATION"; +static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_cuda_bindings_nvvm[] = "cuda.bindings.nvvm"; +static const char __pyx_k_nvvmError___reduce[] = "nvvmError.__reduce__"; +static const char __pyx_k_ERROR_INVALID_INPUT[] = "ERROR_INVALID_INPUT"; +static const char __pyx_k_ERROR_OUT_OF_MEMORY[] = "ERROR_OUT_OF_MEMORY"; +static const char __pyx_k_get_compiled_result[] = "get_compiled_result"; +static const char __pyx_k_A_Ja_F_1_r_Qiq_Qk_iq[] = "\200A\330\010\014\210J\220a\330\010\014\210F\220!\2201\330\010\027\220r\230\024\230Q\230i\240q\250\001\330\010\r\210Q\210k\230\025\230i\240q\250\001"; +static const char __pyx_k_ERROR_INVALID_OPTION[] = "ERROR_INVALID_OPTION"; +static const char __pyx_k_get_program_log_size[] = "get_program_log_size"; +static const char __pyx_k_ERROR_INVALID_PROGRAM[] = "ERROR_INVALID_PROGRAM"; +static const char __pyx_k_add_module_to_program[] = "add_module_to_program"; +static const char __pyx_k_cuda_bindings_nvvm_pyx[] = "cuda/bindings/nvvm.pyx"; +static const char __pyx_k_get_compiled_result_size[] = "get_compiled_result_size"; +static const char __pyx_k_ERROR_IR_VERSION_MISMATCH[] = "ERROR_IR_VERSION_MISMATCH"; +static const char __pyx_k_name_must_be_a_Python_str[] = "name must be a Python str"; +static const char __pyx_k_ERROR_NO_MODULE_IN_PROGRAM[] = "ERROR_NO_MODULE_IN_PROGRAM"; +static const char __pyx_k_lazy_add_module_to_program[] = "lazy_add_module_to_program"; +static const char __pyx_k_AX_A_t_QfA_iq_e5_q_q_JfTaab[] = "\200\001\360\026\000\005\033\320\032,\250A\250X\260_\300A\330\004\007\200t\210:\220Q\220f\230A\330\010\016\210i\220q\230\001\330\004\036\230e\2405\250\007\250q\330\004\030\230\001\330\t\n\330\010\021\320\021'\240q\250\t\260\026\260}\300J\310f\320Ta\320ab\330\004\020\220\001\220\021"; +static const char __pyx_k_AX_A_t_QfA_iq_e5_q_1IV_RXXeef[] = "\200\001\360\026\000\005\033\320\032,\250A\250X\260_\300A\330\004\007\200t\210:\220Q\220f\230A\330\010\016\210i\220q\230\001\330\004\036\230e\2405\250\007\250q\330\004\030\230\001\330\t\n\330\010\021\320\021+\2501\250I\260V\270=\310\n\320RX\320Xe\320ef\330\004\020\220\001\220\021"; +static const char __pyx_k_ERROR_PROGRAM_CREATION_FAILURE[] = "ERROR_PROGRAM_CREATION_FAILURE"; +/* #### Code section: decls ### */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_9nvvmError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_9nvvmError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_destroy_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_2get_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_4version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_6ir_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_8create_program(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_10add_module_to_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_12lazy_add_module_to_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_14compile_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_16verify_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_18get_compiled_result_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_20get_compiled_result(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_22get_program_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog); /* proto */ +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_24get_program_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer); /* proto */ +/* #### Code section: late_includes ### */ +/* #### Code section: module_state ### */ +/* SmallCodeConfig */ +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +typedef struct { + PyObject *__pyx_d; + PyObject *__pyx_b; + PyObject *__pyx_cython_runtime; + PyObject *__pyx_empty_tuple; + PyObject *__pyx_empty_bytes; + PyObject *__pyx_empty_unicode; + #ifdef __Pyx_CyFunction_USED + PyTypeObject *__pyx_CyFunctionType; + #endif + #ifdef __Pyx_FusedFunction_USED + PyTypeObject *__pyx_FusedFunctionType; + #endif + #ifdef __Pyx_Generator_USED + PyTypeObject *__pyx_GeneratorType; + #endif + #ifdef __Pyx_IterableCoroutine_USED + PyTypeObject *__pyx_IterableCoroutineType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineAwaitType; + #endif + #ifdef __Pyx_Coroutine_USED + PyTypeObject *__pyx_CoroutineType; + #endif + __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; + PyObject *__pyx_codeobj_tab[15]; + PyObject *__pyx_string_tab[70]; +/* #### Code section: module_state_contents ### */ +/* CommonTypesMetaclass.module_state_decls */ +PyTypeObject *__pyx_CommonTypesMetaclassType; + +/* CachedMethodType.module_state_decls */ +#if CYTHON_COMPILING_IN_LIMITED_API +PyObject *__Pyx_CachedMethodType; +#endif + +/* CodeObjectCache.module_state_decls */ +struct __Pyx_CodeObjectCache __pyx_code_cache; + +/* #### Code section: module_state_end ### */ +} __pyx_mstatetype; + +#if CYTHON_USE_MODULE_STATE +#ifdef __cplusplus +namespace { +extern struct PyModuleDef __pyx_moduledef; +} /* anonymous namespace */ +#else +static struct PyModuleDef __pyx_moduledef; +#endif + +#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) + +#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) +#else +static __pyx_mstatetype __pyx_mstate_global_static = +#ifdef __cplusplus + {}; +#else + {0}; +#endif +static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; +#endif +/* #### Code section: constant_name_defines ### */ +#define __pyx_kp_u_ __pyx_string_tab[0] +#define __pyx_n_u_ERROR_CANCELLED __pyx_string_tab[1] +#define __pyx_n_u_ERROR_COMPILATION __pyx_string_tab[2] +#define __pyx_n_u_ERROR_INVALID_INPUT __pyx_string_tab[3] +#define __pyx_n_u_ERROR_INVALID_IR __pyx_string_tab[4] +#define __pyx_n_u_ERROR_INVALID_OPTION __pyx_string_tab[5] +#define __pyx_n_u_ERROR_INVALID_PROGRAM __pyx_string_tab[6] +#define __pyx_n_u_ERROR_IR_VERSION_MISMATCH __pyx_string_tab[7] +#define __pyx_n_u_ERROR_NO_MODULE_IN_PROGRAM __pyx_string_tab[8] +#define __pyx_n_u_ERROR_OUT_OF_MEMORY __pyx_string_tab[9] +#define __pyx_n_u_ERROR_PROGRAM_CREATION_FAILURE __pyx_string_tab[10] +#define __pyx_n_u_IntEnum __pyx_string_tab[11] +#define __pyx_n_u_IntEnum_2 __pyx_string_tab[12] +#define __pyx_n_u_Result __pyx_string_tab[13] +#define __pyx_n_u_SUCCESS __pyx_string_tab[14] +#define __pyx_kp_u_See_nvvmResult __pyx_string_tab[15] +#define __pyx_n_u_TypeError __pyx_string_tab[16] +#define __pyx_kp_u__2 __pyx_string_tab[17] +#define __pyx_kp_u__3 __pyx_string_tab[18] +#define __pyx_kp_u__4 __pyx_string_tab[19] +#define __pyx_n_u_add_module_to_program __pyx_string_tab[20] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[21] +#define __pyx_n_u_buffer __pyx_string_tab[22] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[23] +#define __pyx_n_u_compile_program __pyx_string_tab[24] +#define __pyx_n_u_create_program __pyx_string_tab[25] +#define __pyx_n_u_cuda_bindings_nvvm __pyx_string_tab[26] +#define __pyx_kp_u_cuda_bindings_nvvm_pyx __pyx_string_tab[27] +#define __pyx_n_u_destroy_program __pyx_string_tab[28] +#define __pyx_n_u_doc __pyx_string_tab[29] +#define __pyx_n_u_enum __pyx_string_tab[30] +#define __pyx_n_u_err __pyx_string_tab[31] +#define __pyx_n_u_func __pyx_string_tab[32] +#define __pyx_n_u_get_compiled_result __pyx_string_tab[33] +#define __pyx_n_u_get_compiled_result_size __pyx_string_tab[34] +#define __pyx_n_u_get_error_string __pyx_string_tab[35] +#define __pyx_n_u_get_program_log __pyx_string_tab[36] +#define __pyx_n_u_get_program_log_size __pyx_string_tab[37] +#define __pyx_n_u_init __pyx_string_tab[38] +#define __pyx_n_u_ir_version __pyx_string_tab[39] +#define __pyx_n_u_is_coroutine __pyx_string_tab[40] +#define __pyx_n_u_lazy_add_module_to_program __pyx_string_tab[41] +#define __pyx_n_u_main __pyx_string_tab[42] +#define __pyx_n_u_metaclass __pyx_string_tab[43] +#define __pyx_n_u_module __pyx_string_tab[44] +#define __pyx_n_u_mro_entries __pyx_string_tab[45] +#define __pyx_n_u_name __pyx_string_tab[46] +#define __pyx_n_u_name_2 __pyx_string_tab[47] +#define __pyx_kp_u_name_must_be_a_Python_str __pyx_string_tab[48] +#define __pyx_n_u_num_options __pyx_string_tab[49] +#define __pyx_n_u_nvvmError __pyx_string_tab[50] +#define __pyx_n_u_nvvmError___init __pyx_string_tab[51] +#define __pyx_n_u_nvvmError___reduce __pyx_string_tab[52] +#define __pyx_n_u_options __pyx_string_tab[53] +#define __pyx_n_u_pop __pyx_string_tab[54] +#define __pyx_n_u_prepare __pyx_string_tab[55] +#define __pyx_n_u_prog __pyx_string_tab[56] +#define __pyx_n_u_qualname __pyx_string_tab[57] +#define __pyx_n_u_reduce __pyx_string_tab[58] +#define __pyx_n_u_result __pyx_string_tab[59] +#define __pyx_n_u_s __pyx_string_tab[60] +#define __pyx_n_u_self __pyx_string_tab[61] +#define __pyx_n_u_set_name __pyx_string_tab[62] +#define __pyx_n_u_size __pyx_string_tab[63] +#define __pyx_n_u_status __pyx_string_tab[64] +#define __pyx_n_u_super __pyx_string_tab[65] +#define __pyx_n_u_test __pyx_string_tab[66] +#define __pyx_n_u_value __pyx_string_tab[67] +#define __pyx_n_u_verify_program __pyx_string_tab[68] +#define __pyx_n_u_version __pyx_string_tab[69] +/* #### Code section: module_state_clear ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { + __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); + if (!clear_module_state) return 0; + Py_CLEAR(clear_module_state->__pyx_d); + Py_CLEAR(clear_module_state->__pyx_b); + Py_CLEAR(clear_module_state->__pyx_cython_runtime); + Py_CLEAR(clear_module_state->__pyx_empty_tuple); + Py_CLEAR(clear_module_state->__pyx_empty_bytes); + Py_CLEAR(clear_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_CLEAR(clear_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); + #endif + #if CYTHON_PEP489_MULTI_PHASE_INIT + __Pyx_State_RemoveModule(NULL); + #endif + for (int i=0; i<15; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<70; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_state_traverse ### */ +#if CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { + __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); + if (!traverse_module_state) return 0; + Py_VISIT(traverse_module_state->__pyx_d); + Py_VISIT(traverse_module_state->__pyx_b); + Py_VISIT(traverse_module_state->__pyx_cython_runtime); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); + __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); + #ifdef __Pyx_CyFunction_USED + Py_VISIT(traverse_module_state->__pyx_CyFunctionType); + #endif + #ifdef __Pyx_FusedFunction_USED + Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); + #endif + for (int i=0; i<15; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<70; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + return 0; +} +#endif +/* #### Code section: module_code ### */ + +/* "cuda/bindings/nvvm.pyx":40 + * class nvvmError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_9nvvmError___init__, "nvvmError.__init__(self, status)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_9nvvmError_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_9nvvmError___init__}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_1__init__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + PyObject *__pyx_v_status = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_status,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 40, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 40, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 40, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 40, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 40, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 40, __pyx_L3_error) + } + __pyx_v_self = values[0]; + __pyx_v_status = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 40, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.nvvmError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_9nvvmError___init__(__pyx_self, __pyx_v_self, __pyx_v_status); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_9nvvmError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_status) { + PyObject *__pyx_v_s = NULL; + PyObject *__pyx_v_err = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + PyObject *__pyx_t_5[4]; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + + /* "cuda/bindings/nvvm.pyx":41 + * + * def __init__(self, status): + * self.status = status # <<<<<<<<<<<<<< + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status, __pyx_v_status) < (0)) __PYX_ERR(0, 41, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":42 + * def __init__(self, status): + * self.status = status + * s = Result(status) # <<<<<<<<<<<<<< + * cdef str err = f"{s.name} ({s.value})" + * super(nvvmError, self).__init__(err) +*/ + __pyx_t_2 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + assert(__pyx_t_2); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); + __pyx_t_4 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_status}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __pyx_v_s = __pyx_t_1; + __pyx_t_1 = 0; + + /* "cuda/bindings/nvvm.pyx":43 + * self.status = status + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" # <<<<<<<<<<<<<< + * super(nvvmError, self).__init__(err) + * +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5[0] = __pyx_t_3; + __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u_; + __pyx_t_5[2] = __pyx_t_2; + __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__2; + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_err = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "cuda/bindings/nvvm.pyx":44 + * s = Result(status) + * cdef str err = f"{s.name} ({s.value})" + * super(nvvmError, self).__init__(err) # <<<<<<<<<<<<<< + * + * def __reduce__(self): +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_super); + __pyx_t_7 = __pyx_builtin_super; + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_nvvmError); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_8, __pyx_v_self}; + __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + } + __pyx_t_2 = __pyx_t_3; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_4 = 0; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_err}; + __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "cuda/bindings/nvvm.pyx":40 + * class nvvmError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("cuda.bindings.nvvm.nvvmError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_s); + __Pyx_XDECREF(__pyx_v_err); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":46 + * super(nvvmError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_9nvvmError_2__reduce__, "nvvmError.__reduce__(self)"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_9nvvmError_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_9nvvmError_2__reduce__}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9nvvmError_3__reduce__(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + PyObject *__pyx_v_self = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 46, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 46, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__reduce__", 0) < (0)) __PYX_ERR(0, 46, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, i); __PYX_ERR(0, 46, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 46, __pyx_L3_error) + } + __pyx_v_self = values[0]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.nvvmError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_9nvvmError_2__reduce__(__pyx_self, __pyx_v_self); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_9nvvmError_2__reduce__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__reduce__", 0); + + /* "cuda/bindings/nvvm.pyx":47 + * + * def __reduce__(self): + * return (type(self), (self.status,)) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 47, __pyx_L1_error); + __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self))); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(__pyx_v_self))) != (0)) __PYX_ERR(0, 47, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_2); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 47, __pyx_L1_error); + __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":46 + * super(nvvmError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvvm.nvvmError.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":50 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(int status) except 1 nogil: + * if status != 0: +*/ + +static int __pyx_f_4cuda_8bindings_4nvvm_check_status(int __pyx_v_status) { + int __pyx_r; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + size_t __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyGILState_STATE __pyx_gilstate_save; + __Pyx_RefNannySetupContext("check_status", 1); + + /* "cuda/bindings/nvvm.pyx":52 + * @cython.profile(False) + * cdef int check_status(int status) except 1 nogil: + * if status != 0: # <<<<<<<<<<<<<< + * with gil: + * raise nvvmError(status) +*/ + __pyx_t_1 = (__pyx_v_status != 0); + if (unlikely(__pyx_t_1)) { + + /* "cuda/bindings/nvvm.pyx":53 + * cdef int check_status(int status) except 1 nogil: + * if status != 0: + * with gil: # <<<<<<<<<<<<<< + * raise nvvmError(status) + * return status +*/ + { + PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":54 + * if status != 0: + * with gil: + * raise nvvmError(status) # <<<<<<<<<<<<<< + * return status + * +*/ + __pyx_t_3 = NULL; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nvvmError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 1; + #if CYTHON_UNPACK_METHODS + if (unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + assert(__pyx_t_3); + PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx__function); + __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); + __pyx_t_6 = 0; + } + #endif + { + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; + __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __PYX_ERR(0, 54, __pyx_L5_error) + } + + /* "cuda/bindings/nvvm.pyx":53 + * cdef int check_status(int status) except 1 nogil: + * if status != 0: + * with gil: # <<<<<<<<<<<<<< + * raise nvvmError(status) + * return status +*/ + /*finally:*/ { + __pyx_L5_error: { + __Pyx_PyGILState_Release(__pyx_gilstate_save); + goto __pyx_L1_error; + } + } + } + + /* "cuda/bindings/nvvm.pyx":52 + * @cython.profile(False) + * cdef int check_status(int status) except 1 nogil: + * if status != 0: # <<<<<<<<<<<<<< + * with gil: + * raise nvvmError(status) +*/ + } + + /* "cuda/bindings/nvvm.pyx":55 + * with gil: + * raise nvvmError(status) + * return status # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_status; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":50 + * + * + * @cython.profile(False) # <<<<<<<<<<<<<< + * cdef int check_status(int status) except 1 nogil: + * if status != 0: +*/ + + /* function exit code */ + __pyx_L1_error:; + __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvvm.check_status", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 1; + __Pyx_PyGILState_Release(__pyx_gilstate_save); + __pyx_L0:; + __Pyx_RefNannyFinishContextNogil() + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":62 + * ############################################################################### + * + * cpdef destroy_program(intptr_t prog): # <<<<<<<<<<<<<< + * """Destroy a program. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_1destroy_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_destroy_program(intptr_t __pyx_v_prog, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_4nvvm_Program __pyx_v_p; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvvmResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("destroy_program", 0); + + /* "cuda/bindings/nvvm.pyx":70 + * .. seealso:: `nvvmDestroyProgram` + * """ + * cdef Program p = prog # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmDestroyProgram(&p) +*/ + __pyx_v_p = ((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog); + + /* "cuda/bindings/nvvm.pyx":71 + * """ + * cdef Program p = prog + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmDestroyProgram(&p) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":72 + * cdef Program p = prog + * with nogil: + * status = nvvmDestroyProgram(&p) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmDestroyProgram((&__pyx_v_p)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 72, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":71 + * """ + * cdef Program p = prog + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmDestroyProgram(&p) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":73 + * with nogil: + * status = nvvmDestroyProgram(&p) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 73, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":62 + * ############################################################################### + * + * cpdef destroy_program(intptr_t prog): # <<<<<<<<<<<<<< + * """Destroy a program. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.destroy_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_1destroy_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_destroy_program, "destroy_program(intptr_t prog)\n\nDestroy a program.\n\nArgs:\n prog (intptr_t): nvvm prog.\n\n.. seealso:: `nvvmDestroyProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_1destroy_program = {"destroy_program", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_1destroy_program, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_destroy_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_1destroy_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("destroy_program (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 62, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 62, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "destroy_program", 0) < (0)) __PYX_ERR(0, 62, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("destroy_program", 1, 1, 1, i); __PYX_ERR(0, 62, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 62, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("destroy_program", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 62, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.destroy_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_destroy_program(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_destroy_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("destroy_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_destroy_program(__pyx_v_prog, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.destroy_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":76 + * + * + * cpdef str get_error_string(int result): # <<<<<<<<<<<<<< + * """Get the message string for the given ``nvvmResult`` code. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_3get_error_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_error_string(int __pyx_v_result, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_v__output_ = 0; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char const *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_error_string", 0); + + /* "cuda/bindings/nvvm.pyx":85 + * """ + * cdef bytes _output_ + * _output_ = nvvmGetErrorString(<_Result>result) # <<<<<<<<<<<<<< + * return _output_.decode() + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetErrorString(((__pyx_t_4cuda_8bindings_4nvvm__Result)__pyx_v_result)); if (unlikely(__pyx_t_1 == ((char const *)0) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v__output_ = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":86 + * cdef bytes _output_ + * _output_ = nvvmGetErrorString(<_Result>result) + * return _output_.decode() # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_decode_bytes(__pyx_v__output_, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":76 + * + * + * cpdef str get_error_string(int result): # <<<<<<<<<<<<<< + * """Get the message string for the given ``nvvmResult`` code. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__output_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_3get_error_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_2get_error_string, "get_error_string(int result) -> str\n\nGet the message string for the given ``nvvmResult`` code.\n\nArgs:\n result (Result): NVVM API result code.\n\n.. seealso:: `nvvmGetErrorString`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_3get_error_string = {"get_error_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_3get_error_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_2get_error_string}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_3get_error_string(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + int __pyx_v_result; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_error_string (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_result,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 76, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 76, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_string", 0) < (0)) __PYX_ERR(0, 76, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_error_string", 1, 1, 1, i); __PYX_ERR(0, 76, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 76, __pyx_L3_error) + } + __pyx_v_result = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_result == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 76, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_error_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 76, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_2get_error_string(__pyx_self, __pyx_v_result); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_2get_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_result) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_error_string", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_get_error_string(__pyx_v_result, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":89 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """Get the NVVM version. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_5version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_version(CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_major; + int __pyx_v_minor; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvvmResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("version", 0); + + /* "cuda/bindings/nvvm.pyx":102 + * cdef int major + * cdef int minor + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmVersion(&major, &minor) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":103 + * cdef int minor + * with nogil: + * status = nvvmVersion(&major, &minor) # <<<<<<<<<<<<<< + * check_status(status) + * return (major, minor) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmVersion((&__pyx_v_major), (&__pyx_v_minor)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 103, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":102 + * cdef int major + * cdef int minor + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmVersion(&major, &minor) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":104 + * with nogil: + * status = nvvmVersion(&major, &minor) + * check_status(status) # <<<<<<<<<<<<<< + * return (major, minor) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 104, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":105 + * status = nvvmVersion(&major, &minor) + * check_status(status) + * return (major, minor) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 105, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 105, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_r = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":89 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """Get the NVVM version. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("cuda.bindings.nvvm.version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_5version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_4version, "version() -> tuple\n\nGet the NVVM version.\n\nReturns:\n A 2-tuple containing:\n\n - int: NVVM major version number.\n - int: NVVM minor version number.\n\n.. seealso:: `nvvmVersion`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_5version = {"version", (PyCFunction)__pyx_pw_4cuda_8bindings_4nvvm_5version, METH_NOARGS, __pyx_doc_4cuda_8bindings_4nvvm_4version}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_5version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("version (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_4version(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_4version(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("version", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_version(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":108 + * + * + * cpdef tuple ir_version(): # <<<<<<<<<<<<<< + * """Get the NVVM IR version. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_7ir_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_ir_version(CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_major_ir; + int __pyx_v_minor_ir; + int __pyx_v_major_dbg; + int __pyx_v_minor_dbg; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + nvvmResult __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("ir_version", 0); + + /* "cuda/bindings/nvvm.pyx":125 + * cdef int major_dbg + * cdef int minor_dbg + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":126 + * cdef int minor_dbg + * with nogil: + * status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) # <<<<<<<<<<<<<< + * check_status(status) + * return (major_ir, minor_ir, major_dbg, minor_dbg) +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmIRVersion((&__pyx_v_major_ir), (&__pyx_v_minor_ir), (&__pyx_v_major_dbg), (&__pyx_v_minor_dbg)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 126, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":125 + * cdef int major_dbg + * cdef int minor_dbg + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":127 + * with nogil: + * status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) + * check_status(status) # <<<<<<<<<<<<<< + * return (major_ir, minor_ir, major_dbg, minor_dbg) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 127, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":128 + * status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) + * check_status(status) + * return (major_ir, minor_ir, major_dbg, minor_dbg) # <<<<<<<<<<<<<< + * + * +*/ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_major_ir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_minor_ir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_major_dbg); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_minor_dbg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_GIVEREF(__pyx_t_3); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 128, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_4); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 128, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_5); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 128, __pyx_L1_error); + __Pyx_GIVEREF(__pyx_t_6); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 128, __pyx_L1_error); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_t_6 = 0; + __pyx_r = ((PyObject*)__pyx_t_7); + __pyx_t_7 = 0; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":108 + * + * + * cpdef tuple ir_version(): # <<<<<<<<<<<<<< + * """Get the NVVM IR version. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvvm.ir_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_7ir_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_6ir_version, "ir_version() -> tuple\n\nGet the NVVM IR version.\n\nReturns:\n A 4-tuple containing:\n\n - int: NVVM IR major version number.\n - int: NVVM IR minor version number.\n - int: NVVM IR debug metadata major version number.\n - int: NVVM IR debug metadata minor version number.\n\n.. seealso:: `nvvmIRVersion`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_7ir_version = {"ir_version", (PyCFunction)__pyx_pw_4cuda_8bindings_4nvvm_7ir_version, METH_NOARGS, __pyx_doc_4cuda_8bindings_4nvvm_6ir_version}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_7ir_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ir_version (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_6ir_version(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_6ir_version(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("ir_version", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_ir_version(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.ir_version", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":131 + * + * + * cpdef intptr_t create_program() except? 0: # <<<<<<<<<<<<<< + * """Create a program, and set the value of its handle to ``*prog``. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9create_program(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static intptr_t __pyx_f_4cuda_8bindings_4nvvm_create_program(CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_4nvvm_Program __pyx_v_prog; + nvvmResult __pyx_v_status; + intptr_t __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvvm.pyx":140 + * """ + * cdef Program prog + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmCreateProgram(&prog) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":141 + * cdef Program prog + * with nogil: + * status = nvvmCreateProgram(&prog) # <<<<<<<<<<<<<< + * check_status(status) + * return prog +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmCreateProgram((&__pyx_v_prog)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 141, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":140 + * """ + * cdef Program prog + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmCreateProgram(&prog) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":142 + * with nogil: + * status = nvvmCreateProgram(&prog) + * check_status(status) # <<<<<<<<<<<<<< + * return prog + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 142, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":143 + * status = nvvmCreateProgram(&prog) + * check_status(status) + * return prog # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = ((intptr_t)__pyx_v_prog); + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":131 + * + * + * cpdef intptr_t create_program() except? 0: # <<<<<<<<<<<<<< + * """Create a program, and set the value of its handle to ``*prog``. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.create_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9create_program(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_8create_program, "create_program() -> intptr_t\n\nCreate a program, and set the value of its handle to ``*prog``.\n\nReturns:\n intptr_t: NVVM program.\n\n.. seealso:: `nvvmCreateProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_9create_program = {"create_program", (PyCFunction)__pyx_pw_4cuda_8bindings_4nvvm_9create_program, METH_NOARGS, __pyx_doc_4cuda_8bindings_4nvvm_8create_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_9create_program(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("create_program (wrapper)", 0); + __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_8create_program(__pyx_self); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_8create_program(CYTHON_UNUSED PyObject *__pyx_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + intptr_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("create_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_create_program(1); if (unlikely(__pyx_t_1 == ((intptr_t)0) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvvm.create_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":146 + * + * + * cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_11add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_add_module_to_program(intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__buffer_; + PyObject *__pyx_v__temp_name_ = 0; + char *__pyx_v__name_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + char *__pyx_t_9; + nvvmResult __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_module_to_program", 0); + + /* "cuda/bindings/nvvm.pyx":157 + * .. seealso:: `nvvmAddModuleToProgram` + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) # <<<<<<<<<<<<<< + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_True; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_buffer, __pyx_v_size, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_v__buffer_ = __pyx_t_1; + + /* "cuda/bindings/nvvm.pyx":158 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + __pyx_t_3 = PyUnicode_Check(__pyx_v_name); + __pyx_t_4 = (!__pyx_t_3); + if (unlikely(__pyx_t_4)) { + + /* "cuda/bindings/nvvm.pyx":159 + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") # <<<<<<<<<<<<<< + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_7 = __pyx_builtin_TypeError; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_name_must_be_a_Python_str}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 159, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":158 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + } + + /* "cuda/bindings/nvvm.pyx":160 + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() # <<<<<<<<<<<<<< + * cdef char* _name_ = _temp_name_ + * with nogil: +*/ + if (unlikely(__pyx_v_name == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 160, __pyx_L1_error) + } + __pyx_t_5 = PyUnicode_AsEncodedString(((PyObject*)__pyx_v_name), NULL, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__temp_name_ = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/nvvm.pyx":161 + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) +*/ + __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v__temp_name_); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_v__name_ = __pyx_t_9; + + /* "cuda/bindings/nvvm.pyx":162 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":163 + * cdef char* _name_ = _temp_name_ + * with nogil: + * status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmAddModuleToProgram(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), ((char const *)__pyx_v__buffer_), __pyx_v_size, ((char const *)__pyx_v__name_)); if (unlikely(__pyx_t_10 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 163, __pyx_L5_error) + __pyx_v_status = __pyx_t_10; + } + + /* "cuda/bindings/nvvm.pyx":162 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvvm.pyx":164 + * with nogil: + * status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_11 == ((int)1))) __PYX_ERR(0, 164, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":146 + * + * + * cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvvm.add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__temp_name_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_11add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_10add_module_to_program, "add_module_to_program(intptr_t prog, buffer, size_t size, name)\n\nAdd a module level NVVM IR to a program.\n\nArgs:\n prog (intptr_t): NVVM program.\n buffer (bytes): NVVM IR module in the bitcode or text representation.\n size (size_t): Size of the NVVM IR module.\n name (str): Name of the NVVM IR module. If NULL, \"\" is used as the name.\n\n.. seealso:: `nvvmAddModuleToProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_11add_module_to_program = {"add_module_to_program", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_11add_module_to_program, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_10add_module_to_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_11add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + PyObject *__pyx_v_buffer = 0; + size_t __pyx_v_size; + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_module_to_program (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_buffer,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 146, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_module_to_program", 0) < (0)) __PYX_ERR(0, 146, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_module_to_program", 1, 4, 4, i); __PYX_ERR(0, 146, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 146, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_v_buffer = values[1]; + __pyx_v_size = __Pyx_PyLong_As_size_t(values[2]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_v_name = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("add_module_to_program", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 146, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_10add_module_to_program(__pyx_self, __pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_10add_module_to_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("add_module_to_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_add_module_to_program(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":167 + * + * + * cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_13lazy_add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_lazy_add_module_to_program(intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__buffer_; + PyObject *__pyx_v__temp_name_ = 0; + char *__pyx_v__name_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + size_t __pyx_t_8; + char *__pyx_t_9; + nvvmResult __pyx_t_10; + int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lazy_add_module_to_program", 0); + + /* "cuda/bindings/nvvm.pyx":178 + * .. seealso:: `nvvmLazyAddModuleToProgram` + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) # <<<<<<<<<<<<<< + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_True; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_buffer, __pyx_v_size, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_v__buffer_ = __pyx_t_1; + + /* "cuda/bindings/nvvm.pyx":179 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + __pyx_t_3 = PyUnicode_Check(__pyx_v_name); + __pyx_t_4 = (!__pyx_t_3); + if (unlikely(__pyx_t_4)) { + + /* "cuda/bindings/nvvm.pyx":180 + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") # <<<<<<<<<<<<<< + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ +*/ + __pyx_t_6 = NULL; + __Pyx_INCREF(__pyx_builtin_TypeError); + __pyx_t_7 = __pyx_builtin_TypeError; + __pyx_t_8 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_name_must_be_a_Python_str}; + __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + } + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __PYX_ERR(0, 180, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":179 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + * if not isinstance(name, str): # <<<<<<<<<<<<<< + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() +*/ + } + + /* "cuda/bindings/nvvm.pyx":181 + * if not isinstance(name, str): + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() # <<<<<<<<<<<<<< + * cdef char* _name_ = _temp_name_ + * with nogil: +*/ + if (unlikely(__pyx_v_name == Py_None)) { + PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); + __PYX_ERR(0, 181, __pyx_L1_error) + } + __pyx_t_5 = PyUnicode_AsEncodedString(((PyObject*)__pyx_v_name), NULL, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__temp_name_ = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; + + /* "cuda/bindings/nvvm.pyx":182 + * raise TypeError("name must be a Python str") + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) +*/ + __pyx_t_9 = __Pyx_PyBytes_AsWritableString(__pyx_v__temp_name_); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_v__name_ = __pyx_t_9; + + /* "cuda/bindings/nvvm.pyx":183 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":184 + * cdef char* _name_ = _temp_name_ + * with nogil: + * status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_10 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmLazyAddModuleToProgram(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), ((char const *)__pyx_v__buffer_), __pyx_v_size, ((char const *)__pyx_v__name_)); if (unlikely(__pyx_t_10 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 184, __pyx_L5_error) + __pyx_v_status = __pyx_t_10; + } + + /* "cuda/bindings/nvvm.pyx":183 + * cdef bytes _temp_name_ = (name).encode() + * cdef char* _name_ = _temp_name_ + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L6; + } + __pyx_L5_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L6:; + } + } + + /* "cuda/bindings/nvvm.pyx":185 + * with nogil: + * status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_11 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_11 == ((int)1))) __PYX_ERR(0, 185, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":167 + * + * + * cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("cuda.bindings.nvvm.lazy_add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v__temp_name_); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_13lazy_add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_12lazy_add_module_to_program, "lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name)\n\nAdd a module level NVVM IR to a program.\n\nArgs:\n prog (intptr_t): NVVM program.\n buffer (bytes): NVVM IR module in the bitcode representation.\n size (size_t): Size of the NVVM IR module.\n name (str): Name of the NVVM IR module. If NULL, \"\" is used as the name.\n\n.. seealso:: `nvvmLazyAddModuleToProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_13lazy_add_module_to_program = {"lazy_add_module_to_program", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_13lazy_add_module_to_program, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_12lazy_add_module_to_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_13lazy_add_module_to_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + PyObject *__pyx_v_buffer = 0; + size_t __pyx_v_size; + PyObject *__pyx_v_name = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[4] = {0,0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lazy_add_module_to_program (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_buffer,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_name,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 167, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 4: + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lazy_add_module_to_program", 0) < (0)) __PYX_ERR(0, 167, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lazy_add_module_to_program", 1, 4, 4, i); __PYX_ERR(0, 167, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 4)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 167, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 167, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 167, __pyx_L3_error) + values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 167, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_v_buffer = values[1]; + __pyx_v_size = __Pyx_PyLong_As_size_t(values[2]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_v_name = values[3]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lazy_add_module_to_program", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.lazy_add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_12lazy_add_module_to_program(__pyx_self, __pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_12lazy_add_module_to_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, size_t __pyx_v_size, PyObject *__pyx_v_name) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lazy_add_module_to_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_lazy_add_module_to_program(__pyx_v_prog, __pyx_v_buffer, __pyx_v_size, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.lazy_add_module_to_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":188 + * + * + * cpdef compile_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Compile the NVVM program. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_15compile_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_compile_program(intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource __pyx_v__options_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + nvvmResult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("compile_program", 0); + + /* "cuda/bindings/nvvm.pyx":205 + * """ + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) +*/ + __pyx_t_1 = __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_v__options_, __pyx_v_options, ((char *)NULL)); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 205, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":206 + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":207 + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: + * status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmCompileProgram(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), __pyx_v_num_options, ((char const **)__pyx_v__options_.ptrs.data())); if (unlikely(__pyx_t_2 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 207, __pyx_L4_error) + __pyx_v_status = __pyx_t_2; + } + + /* "cuda/bindings/nvvm.pyx":206 + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":208 + * with nogil: + * status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 208, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":188 + * + * + * cpdef compile_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Compile the NVVM program. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.compile_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_15compile_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_14compile_program, "compile_program(intptr_t prog, int num_options, options)\n\nCompile the NVVM program.\n\nArgs:\n prog (intptr_t): NVVM program.\n num_options (int): Number of compiler ``options`` passed.\n options (object): Compiler options in the form of C string array. It can be:\n\n - an :class:`int` as the pointer address to the nested sequence, or\n - a Python sequence of :class:`int`\\s, each of which is a pointer address\n to a valid sequence of 'char', or\n - a nested Python sequence of ``str``.\n\n\n.. seealso:: `nvvmCompileProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_15compile_program = {"compile_program", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_15compile_program, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_14compile_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_15compile_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + int __pyx_v_num_options; + PyObject *__pyx_v_options = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("compile_program (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_num_options,&__pyx_mstate_global->__pyx_n_u_options,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 188, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "compile_program", 0) < (0)) __PYX_ERR(0, 188, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compile_program", 1, 3, 3, i); __PYX_ERR(0, 188, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 188, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 188, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 188, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + __pyx_v_num_options = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_options == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 188, __pyx_L3_error) + __pyx_v_options = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("compile_program", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 188, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.compile_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_14compile_program(__pyx_self, __pyx_v_prog, __pyx_v_num_options, __pyx_v_options); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_14compile_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("compile_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_compile_program(__pyx_v_prog, __pyx_v_num_options, __pyx_v_options, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.compile_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":211 + * + * + * cpdef verify_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Verify the NVVM program. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_17verify_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_verify_program(intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options, CYTHON_UNUSED int __pyx_skip_dispatch) { + __pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource __pyx_v__options_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + nvvmResult __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("verify_program", 0); + + /* "cuda/bindings/nvvm.pyx":228 + * """ + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) +*/ + __pyx_t_1 = __pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr(__pyx_v__options_, __pyx_v_options, ((char *)NULL)); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 228, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":229 + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":230 + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: + * status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmVerifyProgram(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), __pyx_v_num_options, ((char const **)__pyx_v__options_.ptrs.data())); if (unlikely(__pyx_t_2 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 230, __pyx_L4_error) + __pyx_v_status = __pyx_t_2; + } + + /* "cuda/bindings/nvvm.pyx":229 + * cdef nested_resource[ char ] _options_ + * get_nested_resource_ptr[char](_options_, options, NULL) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":231 + * with nogil: + * status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_1 == ((int)1))) __PYX_ERR(0, 231, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":211 + * + * + * cpdef verify_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Verify the NVVM program. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.verify_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_17verify_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_16verify_program, "verify_program(intptr_t prog, int num_options, options)\n\nVerify the NVVM program.\n\nArgs:\n prog (intptr_t): NVVM program.\n num_options (int): Number of compiler ``options`` passed.\n options (object): Compiler options in the form of C string array. It can be:\n\n - an :class:`int` as the pointer address to the nested sequence, or\n - a Python sequence of :class:`int`\\s, each of which is a pointer address\n to a valid sequence of 'char', or\n - a nested Python sequence of ``str``.\n\n\n.. seealso:: `nvvmVerifyProgram`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_17verify_program = {"verify_program", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_17verify_program, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_16verify_program}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_17verify_program(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + int __pyx_v_num_options; + PyObject *__pyx_v_options = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[3] = {0,0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("verify_program (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_num_options,&__pyx_mstate_global->__pyx_n_u_options,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 3: + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "verify_program", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("verify_program", 1, 3, 3, i); __PYX_ERR(0, 211, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 3)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) + values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 211, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_v_num_options = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_num_options == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_v_options = values[2]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("verify_program", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.verify_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_16verify_program(__pyx_self, __pyx_v_prog, __pyx_v_num_options, __pyx_v_options); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_16verify_program(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, int __pyx_v_num_options, PyObject *__pyx_v_options) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("verify_program", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_verify_program(__pyx_v_prog, __pyx_v_num_options, __pyx_v_options, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.verify_program", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":234 + * + * + * cpdef size_t get_compiled_result_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the size of the compiled result. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_19get_compiled_result_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_4nvvm_get_compiled_result_size(intptr_t __pyx_v_prog, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_buffer_size_ret; + nvvmResult __pyx_v_status; + size_t __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvvm.pyx":246 + * """ + * cdef size_t buffer_size_ret + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":247 + * cdef size_t buffer_size_ret + * with nogil: + * status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) # <<<<<<<<<<<<<< + * check_status(status) + * return buffer_size_ret +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResultSize(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), (&__pyx_v_buffer_size_ret)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 247, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":246 + * """ + * cdef size_t buffer_size_ret + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":248 + * with nogil: + * status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) + * check_status(status) # <<<<<<<<<<<<<< + * return buffer_size_ret + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 248, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":249 + * status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) + * check_status(status) + * return buffer_size_ret # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_buffer_size_ret; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":234 + * + * + * cpdef size_t get_compiled_result_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the size of the compiled result. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_19get_compiled_result_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_18get_compiled_result_size, "get_compiled_result_size(intptr_t prog) -> size_t\n\nGet the size of the compiled result.\n\nArgs:\n prog (intptr_t): NVVM program.\n\nReturns:\n size_t: Size of the compiled result (including the trailing NULL).\n\n.. seealso:: `nvvmGetCompiledResultSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_19get_compiled_result_size = {"get_compiled_result_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_19get_compiled_result_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_18get_compiled_result_size}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_19get_compiled_result_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_compiled_result_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 234, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 234, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_compiled_result_size", 0) < (0)) __PYX_ERR(0, 234, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_compiled_result_size", 1, 1, 1, i); __PYX_ERR(0, 234, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 234, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_compiled_result_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 234, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_18get_compiled_result_size(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_18get_compiled_result_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_compiled_result_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_get_compiled_result_size(__pyx_v_prog, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":252 + * + * + * cpdef get_compiled_result(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the compiled result. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_21get_compiled_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_compiled_result(intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__buffer_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvvmResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_compiled_result", 0); + + /* "cuda/bindings/nvvm.pyx":261 + * .. seealso:: `nvvmGetCompiledResult` + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmGetCompiledResult(prog, _buffer_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_buffer, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_v__buffer_ = __pyx_t_1; + + /* "cuda/bindings/nvvm.pyx":262 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetCompiledResult(prog, _buffer_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":263 + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: + * status = nvvmGetCompiledResult(prog, _buffer_) # <<<<<<<<<<<<<< + * check_status(status) + * +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResult(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), ((char *)__pyx_v__buffer_)); if (unlikely(__pyx_t_3 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 263, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvvm.pyx":262 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetCompiledResult(prog, _buffer_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":264 + * with nogil: + * status = nvvmGetCompiledResult(prog, _buffer_) + * check_status(status) # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 264, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":252 + * + * + * cpdef get_compiled_result(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the compiled result. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_21get_compiled_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_20get_compiled_result, "get_compiled_result(intptr_t prog, buffer)\n\nGet the compiled result.\n\nArgs:\n prog (intptr_t): NVVM program.\n buffer (bytes): Compiled result.\n\n.. seealso:: `nvvmGetCompiledResult`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_21get_compiled_result = {"get_compiled_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_21get_compiled_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_20get_compiled_result}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_21get_compiled_result(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + PyObject *__pyx_v_buffer = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_compiled_result (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_buffer,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 252, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 252, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 252, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_compiled_result", 0) < (0)) __PYX_ERR(0, 252, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_compiled_result", 1, 2, 2, i); __PYX_ERR(0, 252, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 252, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 252, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L3_error) + __pyx_v_buffer = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_compiled_result", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 252, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_20get_compiled_result(__pyx_self, __pyx_v_prog, __pyx_v_buffer); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_20get_compiled_result(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_compiled_result", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_get_compiled_result(__pyx_v_prog, __pyx_v_buffer, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_compiled_result", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":267 + * + * + * cpdef size_t get_program_log_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the Size of Compiler/Verifier Message. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_23get_program_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static size_t __pyx_f_4cuda_8bindings_4nvvm_get_program_log_size(intptr_t __pyx_v_prog, CYTHON_UNUSED int __pyx_skip_dispatch) { + size_t __pyx_v_buffer_size_ret; + nvvmResult __pyx_v_status; + size_t __pyx_r; + nvvmResult __pyx_t_1; + int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + + /* "cuda/bindings/nvvm.pyx":279 + * """ + * cdef size_t buffer_size_ret + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetProgramLogSize(prog, &buffer_size_ret) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":280 + * cdef size_t buffer_size_ret + * with nogil: + * status = nvvmGetProgramLogSize(prog, &buffer_size_ret) # <<<<<<<<<<<<<< + * check_status(status) + * return buffer_size_ret +*/ + __pyx_t_1 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLogSize(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), (&__pyx_v_buffer_size_ret)); if (unlikely(__pyx_t_1 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 280, __pyx_L4_error) + __pyx_v_status = __pyx_t_1; + } + + /* "cuda/bindings/nvvm.pyx":279 + * """ + * cdef size_t buffer_size_ret + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetProgramLogSize(prog, &buffer_size_ret) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":281 + * with nogil: + * status = nvvmGetProgramLogSize(prog, &buffer_size_ret) + * check_status(status) # <<<<<<<<<<<<<< + * return buffer_size_ret + * +*/ + __pyx_t_2 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_2 == ((int)1))) __PYX_ERR(0, 281, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":282 + * status = nvvmGetProgramLogSize(prog, &buffer_size_ret) + * check_status(status) + * return buffer_size_ret # <<<<<<<<<<<<<< + * + * +*/ + __pyx_r = __pyx_v_buffer_size_ret; + goto __pyx_L0; + + /* "cuda/bindings/nvvm.pyx":267 + * + * + * cpdef size_t get_program_log_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the Size of Compiler/Verifier Message. + * +*/ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_23get_program_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_22get_program_log_size, "get_program_log_size(intptr_t prog) -> size_t\n\nGet the Size of Compiler/Verifier Message.\n\nArgs:\n prog (intptr_t): NVVM program.\n\nReturns:\n size_t: Size of the compilation/verification log (including the trailing NULL).\n\n.. seealso:: `nvvmGetProgramLogSize`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_23get_program_log_size = {"get_program_log_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_23get_program_log_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_22get_program_log_size}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_23get_program_log_size(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[1] = {0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_program_log_size (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 267, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 267, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_program_log_size", 0) < (0)) __PYX_ERR(0, 267, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_program_log_size", 1, 1, 1, i); __PYX_ERR(0, 267, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 1)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 267, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L3_error) + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_program_log_size", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 267, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_22get_program_log_size(__pyx_self, __pyx_v_prog); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_22get_program_log_size(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + size_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_program_log_size", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_get_program_log_size(__pyx_v_prog, 1); if (unlikely(__pyx_t_1 == ((size_t)0) && PyErr_Occurred())) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log_size", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "cuda/bindings/nvvm.pyx":285 + * + * + * cpdef get_program_log(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the Compiler/Verifier Message. + * +*/ + +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_25get_program_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +static PyObject *__pyx_f_4cuda_8bindings_4nvvm_get_program_log(intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer, CYTHON_UNUSED int __pyx_skip_dispatch) { + void *__pyx_v__buffer_; + nvvmResult __pyx_v_status; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + void *__pyx_t_1; + struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer __pyx_t_2; + nvvmResult __pyx_t_3; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_program_log", 0); + + /* "cuda/bindings/nvvm.pyx":294 + * .. seealso:: `nvvmGetProgramLog` + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) # <<<<<<<<<<<<<< + * with nogil: + * status = nvvmGetProgramLog(prog, _buffer_) +*/ + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.readonly = Py_False; + __pyx_t_1 = __pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer(__pyx_v_buffer, -1L, &__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_v__buffer_ = __pyx_t_1; + + /* "cuda/bindings/nvvm.pyx":295 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetProgramLog(prog, _buffer_) + * check_status(status) +*/ + { + PyThreadState *_save; + _save = NULL; + Py_UNBLOCK_THREADS + __Pyx_FastGIL_Remember(); + /*try:*/ { + + /* "cuda/bindings/nvvm.pyx":296 + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: + * status = nvvmGetProgramLog(prog, _buffer_) # <<<<<<<<<<<<<< + * check_status(status) +*/ + __pyx_t_3 = __pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLog(((__pyx_t_4cuda_8bindings_4nvvm_Program)__pyx_v_prog), ((char *)__pyx_v__buffer_)); if (unlikely(__pyx_t_3 == ((nvvmResult)_NVVMRESULT_INTERNAL_LOADING_ERROR) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 296, __pyx_L4_error) + __pyx_v_status = __pyx_t_3; + } + + /* "cuda/bindings/nvvm.pyx":295 + * """ + * cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + * with nogil: # <<<<<<<<<<<<<< + * status = nvvmGetProgramLog(prog, _buffer_) + * check_status(status) +*/ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L4_error: { + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L1_error; + } + __pyx_L5:; + } + } + + /* "cuda/bindings/nvvm.pyx":297 + * with nogil: + * status = nvvmGetProgramLog(prog, _buffer_) + * check_status(status) # <<<<<<<<<<<<<< +*/ + __pyx_t_4 = __pyx_f_4cuda_8bindings_4nvvm_check_status(__pyx_v_status); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 297, __pyx_L1_error) + + /* "cuda/bindings/nvvm.pyx":285 + * + * + * cpdef get_program_log(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the Compiler/Verifier Message. + * +*/ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_25get_program_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +); /*proto*/ +PyDoc_STRVAR(__pyx_doc_4cuda_8bindings_4nvvm_24get_program_log, "get_program_log(intptr_t prog, buffer)\n\nGet the Compiler/Verifier Message.\n\nArgs:\n prog (intptr_t): NVVM program.\n buffer (bytes): Compilation/Verification log.\n\n.. seealso:: `nvvmGetProgramLog`"); +static PyMethodDef __pyx_mdef_4cuda_8bindings_4nvvm_25get_program_log = {"get_program_log", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4cuda_8bindings_4nvvm_25get_program_log, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4cuda_8bindings_4nvvm_24get_program_log}; +static PyObject *__pyx_pw_4cuda_8bindings_4nvvm_25get_program_log(PyObject *__pyx_self, +#if CYTHON_METH_FASTCALL +PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds +#else +PyObject *__pyx_args, PyObject *__pyx_kwds +#endif +) { + intptr_t __pyx_v_prog; + PyObject *__pyx_v_buffer = 0; + #if !CYTHON_METH_FASTCALL + CYTHON_UNUSED Py_ssize_t __pyx_nargs; + #endif + CYTHON_UNUSED PyObject *const *__pyx_kwvalues; + PyObject* values[2] = {0,0}; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("get_program_log (wrapper)", 0); + #if !CYTHON_METH_FASTCALL + #if CYTHON_ASSUME_SAFE_SIZE + __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); + #else + __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; + #endif + #endif + __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); + { + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_prog,&__pyx_mstate_global->__pyx_n_u_buffer,0}; + const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 285, __pyx_L3_error) + if (__pyx_kwds_len > 0) { + switch (__pyx_nargs) { + case 2: + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 1: + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 285, __pyx_L3_error) + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + const Py_ssize_t kwd_pos_args = __pyx_nargs; + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_program_log", 0) < (0)) __PYX_ERR(0, 285, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_program_log", 1, 2, 2, i); __PYX_ERR(0, 285, __pyx_L3_error) } + } + } else if (unlikely(__pyx_nargs != 2)) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 285, __pyx_L3_error) + values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 285, __pyx_L3_error) + } + __pyx_v_prog = PyLong_AsSsize_t(values[0]); if (unlikely((__pyx_v_prog == ((intptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L3_error) + __pyx_v_buffer = values[1]; + } + goto __pyx_L6_skip; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_program_log", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 285, __pyx_L3_error) + __pyx_L6_skip:; + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cuda_8bindings_4nvvm_24get_program_log(__pyx_self, __pyx_v_prog, __pyx_v_buffer); + + /* function exit code */ + for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { + Py_XDECREF(values[__pyx_temp]); + } + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cuda_8bindings_4nvvm_24get_program_log(CYTHON_UNUSED PyObject *__pyx_self, intptr_t __pyx_v_prog, PyObject *__pyx_v_buffer) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("get_program_log", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_4cuda_8bindings_4nvvm_get_program_log(__pyx_v_prog, __pyx_v_buffer, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("cuda.bindings.nvvm.get_program_log", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +/* #### Code section: module_exttypes ### */ + +static PyMethodDef __pyx_methods[] = { + {0, 0, 0, 0} +}; +/* #### Code section: initfunc_declarations ### */ +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ +/* #### Code section: init_module ### */ + +static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + if (__Pyx_ExportFunction("get_error_string", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_get_error_string, "PyObject *(int, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("version", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_version, "PyObject *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("ir_version", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_ir_version, "PyObject *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("create_program", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_create_program, "intptr_t (int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("add_module_to_program", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_add_module_to_program, "PyObject *(intptr_t, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("lazy_add_module_to_program", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_lazy_add_module_to_program, "PyObject *(intptr_t, PyObject *, size_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("compile_program", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_compile_program, "PyObject *(intptr_t, int, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("verify_program", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_verify_program, "PyObject *(intptr_t, int, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_compiled_result_size", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_get_compiled_result_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_compiled_result", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_get_compiled_result, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_program_log_size", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_get_program_log_size, "size_t (intptr_t, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ExportFunction("get_program_log", (void (*)(void))__pyx_f_4cuda_8bindings_4nvvm_get_program_log, "PyObject *(intptr_t, PyObject *, int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __pyx_t_1 = PyImport_ImportModule("cuda.bindings.cynvvm"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmGetErrorString", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetErrorString, "char const *(nvvmResult)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmVersion, "nvvmResult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmIRVersion", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmIRVersion, "nvvmResult (int *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmCreateProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmCreateProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmDestroyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmDestroyProgram, "nvvmResult (nvvmProgram *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmAddModuleToProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmLazyAddModuleToProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmLazyAddModuleToProgram, "nvvmResult (nvvmProgram, char const *, size_t, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmCompileProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmCompileProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmVerifyProgram", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmVerifyProgram, "nvvmResult (nvvmProgram, int, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmGetCompiledResultSize", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResultSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmGetCompiledResult", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetCompiledResult, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmGetProgramLogSize", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLogSize, "nvvmResult (nvvmProgram, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "nvvmGetProgramLog", (void (**)(void))&__pyx_f_4cuda_8bindings_6cynvvm_nvvmGetProgramLog, "nvvmResult (nvvmProgram, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("cuda.bindings._internal.utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "get_buffer_pointer", (void (**)(void))&__pyx_f_4cuda_8bindings_9_internal_5utils_get_buffer_pointer, "void *(PyObject *, Py_ssize_t, struct __pyx_opt_args_4cuda_8bindings_9_internal_5utils_get_buffer_pointer *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_0get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_0__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_1get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_1__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int32_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_2get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_2__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, int64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_3get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_3__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, char *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_4get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_4__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_ImportFunction_3_1_5(__pyx_t_1, "__pyx_fuse_5get_nested_resource_ptr", (void (**)(void))&__pyx_fuse_5__pyx_f_4cuda_8bindings_9_internal_5utils_get_nested_resource_ptr, "int (__pyx_t_4cuda_8bindings_9_internal_5utils_nested_resource &, PyObject *, double *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_RefNannyFinishContext(); + return -1; +} + +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_nvvm(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_nvvm}, + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, + #endif + #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE + {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, + #endif + {0, NULL} +}; +#endif + +#ifdef __cplusplus +namespace { + struct PyModuleDef __pyx_moduledef = + #else + static struct PyModuleDef __pyx_moduledef = + #endif + { + PyModuleDef_HEAD_INIT, + "nvvm", + 0, /* m_doc */ + #if CYTHON_USE_MODULE_STATE + sizeof(__pyx_mstatetype), /* m_size */ + #else + (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + #if CYTHON_USE_MODULE_STATE + __pyx_m_traverse, /* m_traverse */ + __pyx_m_clear, /* m_clear */ + NULL /* m_free */ + #else + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ + #endif + }; + #ifdef __cplusplus +} /* anonymous namespace */ +#endif + +/* PyModInitFuncType */ +#ifndef CYTHON_NO_PYINIT_EXPORT + #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#else + #ifdef __cplusplus + #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * + #else + #define __Pyx_PyMODINIT_FUNC PyObject * + #endif +#endif + +__Pyx_PyMODINIT_FUNC PyInit_nvvm(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_nvvm(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +/* ModuleCreationPEP489 */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 +static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { + { + PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think + if (!module) { + PyErr_Clear(); // just try the 3.8-3.12 version + module = PyImport_ImportModule("_xxsubinterpreters"); + if (!module) goto bad; + } + PyObject *current = PyObject_CallMethod(module, "get_current", NULL); + Py_DECREF(module); + if (!current) goto bad; + if (PyTuple_Check(current)) { + PyObject *new_current = PySequence_GetItem(current, 0); + Py_DECREF(current); + current = new_current; + if (!new_current) goto bad; + } + long long as_c_int = PyLong_AsLongLong(current); + Py_DECREF(current); + return as_c_int; + } + bad: + PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); + return -1; +} +#endif +#if !CYTHON_USE_MODULE_STATE +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + static PY_INT64_T main_interpreter_id = -1; +#if CYTHON_COMPILING_IN_GRAAL + PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x03090000 + PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); +#elif CYTHON_COMPILING_IN_LIMITED_API + PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); +#else + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); +#endif + if (unlikely(current_id == -1)) { + return -1; + } + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return 0; + } else if (unlikely(main_interpreter_id != current_id)) { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +#endif +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) +{ + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + CYTHON_UNUSED_VAR(def); + #if !CYTHON_USE_MODULE_STATE + if (__Pyx_check_single_interpreter()) + return NULL; + #endif + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_nvvm(PyObject *__pyx_pyinit_module) +#endif +{ + int stringtab_initialized = 0; + #if CYTHON_USE_MODULE_STATE + int pystate_addmodule_run = 0; + #endif + __pyx_mstatetype *__pyx_mstate = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'nvvm' has already been imported. Re-initialisation is not supported."); + return -1; + } + #else + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_t_1 = __pyx_pyinit_module; + Py_INCREF(__pyx_t_1); + #else + __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #if CYTHON_USE_MODULE_STATE + { + int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "nvvm" pseudovariable */ + if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + pystate_addmodule_run = 1; + } + #else + __pyx_m = __pyx_t_1; + #endif + #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); + #endif + __pyx_mstate = __pyx_mstate_global; + CYTHON_UNUSED_VAR(__pyx_t_1); + __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_mstate->__pyx_d); + __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + /* ImportRefnannyAPI */ + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + +__Pyx_RefNannySetupContext("PyInit_nvvm", 0); + if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + stringtab_initialized = 1; + if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #if 0 || defined(__Pyx_CyFunction_USED) || defined(__Pyx_FusedFunction_USED) || defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED) || defined(__Pyx_AsyncGen_USED) + if (__pyx_CommonTypesMetaclass_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init(__pyx_m) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + if (__pyx_module_is_main_cuda__bindings__nvvm) { + if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "cuda.bindings.nvvm")) { + if (unlikely((PyDict_SetItemString(modules, "cuda.bindings.nvvm", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(__pyx_mstate); + (void)__Pyx_modinit_variable_export_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + (void)__Pyx_modinit_type_init_code(__pyx_mstate); + (void)__Pyx_modinit_type_import_code(__pyx_mstate); + (void)__Pyx_modinit_variable_import_code(__pyx_mstate); + if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) + /*--- Execution code ---*/ + + /* "cuda/bindings/nvvm.pyx":12 + * nested_resource) + * + * from enum import IntEnum as _IntEnum # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_enum, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IntEnum_2, __pyx_t_2) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvvm.pyx":19 + * ############################################################################### + * + * class Result(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvvmResult`.""" + * SUCCESS = NVVM_SUCCESS +*/ + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IntEnum_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_Pack(1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_Result, __pyx_mstate_global->__pyx_n_u_Result, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_kp_u_See_nvvmResult); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_3 != __pyx_t_2) { + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 19, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":21 + * class Result(_IntEnum): + * """See `nvvmResult`.""" + * SUCCESS = NVVM_SUCCESS # <<<<<<<<<<<<<< + * ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY + * ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_SUCCESS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SUCCESS, __pyx_t_2) < (0)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":22 + * """See `nvvmResult`.""" + * SUCCESS = NVVM_SUCCESS + * ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY # <<<<<<<<<<<<<< + * ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE + * ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_OUT_OF_MEMORY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_OUT_OF_MEMORY, __pyx_t_2) < (0)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":23 + * SUCCESS = NVVM_SUCCESS + * ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY + * ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE # <<<<<<<<<<<<<< + * ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH + * ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_PROGRAM_CREATION_FAILURE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_PROGRAM_CREATION_FAILURE, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":24 + * ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY + * ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE + * ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH # <<<<<<<<<<<<<< + * ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT + * ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_IR_VERSION_MISMATCH); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_IR_VERSION_MISMATCH, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":25 + * ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE + * ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH + * ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT # <<<<<<<<<<<<<< + * ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM + * ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_INVALID_INPUT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_INPUT, __pyx_t_2) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":26 + * ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH + * ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT + * ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM # <<<<<<<<<<<<<< + * ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR + * ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_INVALID_PROGRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_PROGRAM, __pyx_t_2) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":27 + * ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT + * ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM + * ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR # <<<<<<<<<<<<<< + * ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION + * ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_INVALID_IR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_IR, __pyx_t_2) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":28 + * ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM + * ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR + * ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION # <<<<<<<<<<<<<< + * ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM + * ERROR_COMPILATION = NVVM_ERROR_COMPILATION +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_INVALID_OPTION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_INVALID_OPTION, __pyx_t_2) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":29 + * ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR + * ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION + * ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM # <<<<<<<<<<<<<< + * ERROR_COMPILATION = NVVM_ERROR_COMPILATION + * ERROR_CANCELLED = NVVM_ERROR_CANCELLED +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_NO_MODULE_IN_PROGRAM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_NO_MODULE_IN_PROGRAM, __pyx_t_2) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":30 + * ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION + * ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM + * ERROR_COMPILATION = NVVM_ERROR_COMPILATION # <<<<<<<<<<<<<< + * ERROR_CANCELLED = NVVM_ERROR_CANCELLED + * +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_COMPILATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_COMPILATION, __pyx_t_2) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":31 + * ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM + * ERROR_COMPILATION = NVVM_ERROR_COMPILATION + * ERROR_CANCELLED = NVVM_ERROR_CANCELLED # <<<<<<<<<<<<<< + * + * +*/ + __pyx_t_2 = __Pyx_PyLong_From_nvvmResult(NVVM_ERROR_CANCELLED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ERROR_CANCELLED, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "cuda/bindings/nvvm.pyx":19 + * ############################################################################### + * + * class Result(_IntEnum): # <<<<<<<<<<<<<< + * """See `nvvmResult`.""" + * SUCCESS = NVVM_SUCCESS +*/ + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Result, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Result, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvvm.pyx":38 + * ############################################################################### + * + * class nvvmError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status): +*/ + __pyx_t_3 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_nvvmError, __pyx_mstate_global->__pyx_n_u_nvvmError, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4 != __pyx_t_3) { + if (unlikely((PyDict_SetItemString(__pyx_t_2, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 38, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvvm.pyx":40 + * class nvvmError(Exception): + * + * def __init__(self, status): # <<<<<<<<<<<<<< + * self.status = status + * s = Result(status) +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_9nvvmError_1__init__, 0, __pyx_mstate_global->__pyx_n_u_nvvmError___init, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvvm.pyx":46 + * super(nvvmError, self).__init__(err) + * + * def __reduce__(self): # <<<<<<<<<<<<<< + * return (type(self), (self.status,)) + * +*/ + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_9nvvmError_3__reduce__, 0, __pyx_mstate_global->__pyx_n_u_nvvmError___reduce, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_3) < (0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "cuda/bindings/nvvm.pyx":38 + * ############################################################################### + * + * class nvvmError(Exception): # <<<<<<<<<<<<<< + * + * def __init__(self, status): +*/ + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_nvvmError, __pyx_t_4, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_nvvmError, __pyx_t_3) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":62 + * ############################################################################### + * + * cpdef destroy_program(intptr_t prog): # <<<<<<<<<<<<<< + * """Destroy a program. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_1destroy_program, 0, __pyx_mstate_global->__pyx_n_u_destroy_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_destroy_program, __pyx_t_4) < (0)) __PYX_ERR(0, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":76 + * + * + * cpdef str get_error_string(int result): # <<<<<<<<<<<<<< + * """Get the message string for the given ``nvvmResult`` code. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_3get_error_string, 0, __pyx_mstate_global->__pyx_n_u_get_error_string, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_error_string, __pyx_t_4) < (0)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":89 + * + * + * cpdef tuple version(): # <<<<<<<<<<<<<< + * """Get the NVVM version. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_5version, 0, __pyx_mstate_global->__pyx_n_u_version, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_4) < (0)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":108 + * + * + * cpdef tuple ir_version(): # <<<<<<<<<<<<<< + * """Get the NVVM IR version. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_7ir_version, 0, __pyx_mstate_global->__pyx_n_u_ir_version, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ir_version, __pyx_t_4) < (0)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":131 + * + * + * cpdef intptr_t create_program() except? 0: # <<<<<<<<<<<<<< + * """Create a program, and set the value of its handle to ``*prog``. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_9create_program, 0, __pyx_mstate_global->__pyx_n_u_create_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_create_program, __pyx_t_4) < (0)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":146 + * + * + * cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_11add_module_to_program, 0, __pyx_mstate_global->__pyx_n_u_add_module_to_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_add_module_to_program, __pyx_t_4) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":167 + * + * + * cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name): # <<<<<<<<<<<<<< + * """Add a module level NVVM IR to a program. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_13lazy_add_module_to_program, 0, __pyx_mstate_global->__pyx_n_u_lazy_add_module_to_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_lazy_add_module_to_program, __pyx_t_4) < (0)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":188 + * + * + * cpdef compile_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Compile the NVVM program. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_15compile_program, 0, __pyx_mstate_global->__pyx_n_u_compile_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_compile_program, __pyx_t_4) < (0)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":211 + * + * + * cpdef verify_program(intptr_t prog, int num_options, options): # <<<<<<<<<<<<<< + * """Verify the NVVM program. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_17verify_program, 0, __pyx_mstate_global->__pyx_n_u_verify_program, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_verify_program, __pyx_t_4) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":234 + * + * + * cpdef size_t get_compiled_result_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the size of the compiled result. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_19get_compiled_result_size, 0, __pyx_mstate_global->__pyx_n_u_get_compiled_result_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_compiled_result_size, __pyx_t_4) < (0)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":252 + * + * + * cpdef get_compiled_result(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the compiled result. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_21get_compiled_result, 0, __pyx_mstate_global->__pyx_n_u_get_compiled_result, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_compiled_result, __pyx_t_4) < (0)) __PYX_ERR(0, 252, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":267 + * + * + * cpdef size_t get_program_log_size(intptr_t prog) except? 0: # <<<<<<<<<<<<<< + * """Get the Size of Compiler/Verifier Message. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_23get_program_log_size, 0, __pyx_mstate_global->__pyx_n_u_get_program_log_size, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_program_log_size, __pyx_t_4) < (0)) __PYX_ERR(0, 267, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":285 + * + * + * cpdef get_program_log(intptr_t prog, buffer): # <<<<<<<<<<<<<< + * """Get the Compiler/Verifier Message. + * +*/ + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_4cuda_8bindings_4nvvm_25get_program_log, 0, __pyx_mstate_global->__pyx_n_u_get_program_log, NULL, __pyx_mstate_global->__pyx_n_u_cuda_bindings_nvvm, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_program_log, __pyx_t_4) < (0)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "cuda/bindings/nvvm.pyx":1 + * # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # <<<<<<<<<<<<<< + * # + * # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +*/ + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + if (__pyx_m) { + if (__pyx_mstate->__pyx_d && stringtab_initialized) { + __Pyx_AddTraceback("init cuda.bindings.nvvm", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + #if !CYTHON_USE_MODULE_STATE + Py_CLEAR(__pyx_m); + #else + Py_DECREF(__pyx_m); + if (pystate_addmodule_run) { + PyObject *tp, *value, *tb; + PyErr_Fetch(&tp, &value, &tb); + PyState_RemoveModule(&__pyx_moduledef); + PyErr_Restore(tp, value, tb); + } + #endif + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init cuda.bindings.nvvm"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #else + return __pyx_m; + #endif +} +/* #### Code section: pystring_table ### */ + +typedef struct { + const char *s; +#if 30 <= 65535 + const unsigned short n; +#elif 30 / 2 < INT_MAX + const unsigned int n; +#elif 30 / 2 < LONG_MAX + const unsigned long n; +#else + const Py_ssize_t n; +#endif +#if 1 <= 31 + const unsigned int encoding : 5; +#elif 1 <= 255 + const unsigned char encoding; +#elif 1 <= 65535 + const unsigned short encoding; +#else + const Py_ssize_t encoding; +#endif + const unsigned int is_unicode : 1; + const unsigned int intern : 1; +} __Pyx_StringTabEntry; +static const char * const __pyx_string_tab_encodings[] = { 0 }; +static const __Pyx_StringTabEntry __pyx_string_tab[] = { + {__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ */ + {__pyx_k_ERROR_CANCELLED, sizeof(__pyx_k_ERROR_CANCELLED), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_CANCELLED */ + {__pyx_k_ERROR_COMPILATION, sizeof(__pyx_k_ERROR_COMPILATION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_COMPILATION */ + {__pyx_k_ERROR_INVALID_INPUT, sizeof(__pyx_k_ERROR_INVALID_INPUT), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INVALID_INPUT */ + {__pyx_k_ERROR_INVALID_IR, sizeof(__pyx_k_ERROR_INVALID_IR), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INVALID_IR */ + {__pyx_k_ERROR_INVALID_OPTION, sizeof(__pyx_k_ERROR_INVALID_OPTION), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INVALID_OPTION */ + {__pyx_k_ERROR_INVALID_PROGRAM, sizeof(__pyx_k_ERROR_INVALID_PROGRAM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_INVALID_PROGRAM */ + {__pyx_k_ERROR_IR_VERSION_MISMATCH, sizeof(__pyx_k_ERROR_IR_VERSION_MISMATCH), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_IR_VERSION_MISMATCH */ + {__pyx_k_ERROR_NO_MODULE_IN_PROGRAM, sizeof(__pyx_k_ERROR_NO_MODULE_IN_PROGRAM), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_NO_MODULE_IN_PROGRAM */ + {__pyx_k_ERROR_OUT_OF_MEMORY, sizeof(__pyx_k_ERROR_OUT_OF_MEMORY), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_OUT_OF_MEMORY */ + {__pyx_k_ERROR_PROGRAM_CREATION_FAILURE, sizeof(__pyx_k_ERROR_PROGRAM_CREATION_FAILURE), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ERROR_PROGRAM_CREATION_FAILURE */ + {__pyx_k_IntEnum, sizeof(__pyx_k_IntEnum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum */ + {__pyx_k_IntEnum_2, sizeof(__pyx_k_IntEnum_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_IntEnum_2 */ + {__pyx_k_Result, sizeof(__pyx_k_Result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Result */ + {__pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 1, 1}, /* PyObject cname: __pyx_n_u_SUCCESS */ + {__pyx_k_See_nvvmResult, sizeof(__pyx_k_See_nvvmResult), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_See_nvvmResult */ + {__pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_TypeError */ + {__pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__2 */ + {__pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__3 */ + {__pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0}, /* PyObject cname: __pyx_kp_u__4 */ + {__pyx_k_add_module_to_program, sizeof(__pyx_k_add_module_to_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_add_module_to_program */ + {__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, /* PyObject cname: __pyx_n_u_asyncio_coroutines */ + {__pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 1, 1}, /* PyObject cname: __pyx_n_u_buffer */ + {__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cline_in_traceback */ + {__pyx_k_compile_program, sizeof(__pyx_k_compile_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_compile_program */ + {__pyx_k_create_program, sizeof(__pyx_k_create_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_create_program */ + {__pyx_k_cuda_bindings_nvvm, sizeof(__pyx_k_cuda_bindings_nvvm), 0, 1, 1}, /* PyObject cname: __pyx_n_u_cuda_bindings_nvvm */ + {__pyx_k_cuda_bindings_nvvm_pyx, sizeof(__pyx_k_cuda_bindings_nvvm_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_cuda_bindings_nvvm_pyx */ + {__pyx_k_destroy_program, sizeof(__pyx_k_destroy_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_destroy_program */ + {__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_doc */ + {__pyx_k_enum, sizeof(__pyx_k_enum), 0, 1, 1}, /* PyObject cname: __pyx_n_u_enum */ + {__pyx_k_err, sizeof(__pyx_k_err), 0, 1, 1}, /* PyObject cname: __pyx_n_u_err */ + {__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, /* PyObject cname: __pyx_n_u_func */ + {__pyx_k_get_compiled_result, sizeof(__pyx_k_get_compiled_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_compiled_result */ + {__pyx_k_get_compiled_result_size, sizeof(__pyx_k_get_compiled_result_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_compiled_result_size */ + {__pyx_k_get_error_string, sizeof(__pyx_k_get_error_string), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_error_string */ + {__pyx_k_get_program_log, sizeof(__pyx_k_get_program_log), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_program_log */ + {__pyx_k_get_program_log_size, sizeof(__pyx_k_get_program_log_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_program_log_size */ + {__pyx_k_init, sizeof(__pyx_k_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_init */ + {__pyx_k_ir_version, sizeof(__pyx_k_ir_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ir_version */ + {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ + {__pyx_k_lazy_add_module_to_program, sizeof(__pyx_k_lazy_add_module_to_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_lazy_add_module_to_program */ + {__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, /* PyObject cname: __pyx_n_u_main */ + {__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, /* PyObject cname: __pyx_n_u_metaclass */ + {__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, /* PyObject cname: __pyx_n_u_module */ + {__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, /* PyObject cname: __pyx_n_u_mro_entries */ + {__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name */ + {__pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_name_2 */ + {__pyx_k_name_must_be_a_Python_str, sizeof(__pyx_k_name_must_be_a_Python_str), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_name_must_be_a_Python_str */ + {__pyx_k_num_options, sizeof(__pyx_k_num_options), 0, 1, 1}, /* PyObject cname: __pyx_n_u_num_options */ + {__pyx_k_nvvmError, sizeof(__pyx_k_nvvmError), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmError */ + {__pyx_k_nvvmError___init, sizeof(__pyx_k_nvvmError___init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmError___init */ + {__pyx_k_nvvmError___reduce, sizeof(__pyx_k_nvvmError___reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_nvvmError___reduce */ + {__pyx_k_options, sizeof(__pyx_k_options), 0, 1, 1}, /* PyObject cname: __pyx_n_u_options */ + {__pyx_k_pop, sizeof(__pyx_k_pop), 0, 1, 1}, /* PyObject cname: __pyx_n_u_pop */ + {__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prepare */ + {__pyx_k_prog, sizeof(__pyx_k_prog), 0, 1, 1}, /* PyObject cname: __pyx_n_u_prog */ + {__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, /* PyObject cname: __pyx_n_u_qualname */ + {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ + {__pyx_k_result, sizeof(__pyx_k_result), 0, 1, 1}, /* PyObject cname: __pyx_n_u_result */ + {__pyx_k_s, sizeof(__pyx_k_s), 0, 1, 1}, /* PyObject cname: __pyx_n_u_s */ + {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ + {__pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 1, 1}, /* PyObject cname: __pyx_n_u_set_name */ + {__pyx_k_size, sizeof(__pyx_k_size), 0, 1, 1}, /* PyObject cname: __pyx_n_u_size */ + {__pyx_k_status, sizeof(__pyx_k_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_status */ + {__pyx_k_super, sizeof(__pyx_k_super), 0, 1, 1}, /* PyObject cname: __pyx_n_u_super */ + {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ + {__pyx_k_value, sizeof(__pyx_k_value), 0, 1, 1}, /* PyObject cname: __pyx_n_u_value */ + {__pyx_k_verify_program, sizeof(__pyx_k_verify_program), 0, 1, 1}, /* PyObject cname: __pyx_n_u_verify_program */ + {__pyx_k_version, sizeof(__pyx_k_version), 0, 1, 1}, /* PyObject cname: __pyx_n_u_version */ + {0, 0, 0, 0, 0} +}; +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); + +/* #### Code section: cached_builtins ### */ + +static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 159, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cached_constants ### */ + +static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { + __Pyx_RefNannyDeclarations + CYTHON_UNUSED_VAR(__pyx_mstate); + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} +/* #### Code section: init_constants ### */ + +static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { + CYTHON_UNUSED_VAR(__pyx_mstate); + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; + __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; + if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: init_codeobjects ### */ +\ + typedef struct { + unsigned int argcount : 3; + unsigned int num_posonly_args : 1; + unsigned int num_kwonly_args : 1; + unsigned int nlocals : 3; + unsigned int flags : 10; + unsigned int first_line : 9; + unsigned int line_table_length : 11; + } __Pyx_PyCode_New_function_description; +/* NewCodeObj.proto */ +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +); + + +static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { + PyObject* tuple_dedup_map = PyDict_New(); + if (unlikely(!tuple_dedup_map)) return -1; + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 40, 48}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_status, __pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_err}; + __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_Ja_F_1_r_Qiq_Qk_iq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 46, 15}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; + __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_reduce, __pyx_k_A_AXT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 62, 33}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog}; + __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_destroy_program, __pyx_k_Ya_1AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 76, 25}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_result}; + __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_get_error_string, __pyx_k_1_87, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 89, 36}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_version, __pyx_k_AQgQa_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 108, 48}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_ir_version, __pyx_k_aq_Qk_Jj_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 131, 36}; + PyObject* const varnames[] = {0}; + __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_create_program, __pyx_k_1A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 146, 90}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_add_module_to_program, __pyx_k_AX_A_t_QfA_iq_e5_q_q_JfTaab, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 167, 91}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_name}; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_lazy_add_module_to_program, __pyx_k_AX_A_t_QfA_iq_e5_q_1IV_RXXeef, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 188, 58}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_num_options, __pyx_mstate->__pyx_n_u_options}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_compile_program, __pyx_k_1E_YgQ_1IV_yX_bbc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211, 58}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_num_options, __pyx_mstate->__pyx_n_u_options}; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_verify_program, __pyx_k_1E_YgQ_9F_iW_aab, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 234, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog}; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_get_compiled_result_size, __pyx_k_Q_9F_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 252, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_buffer}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_get_compiled_result, __pyx_k_AYl_ay_gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 267, 38}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog}; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_get_program_log_size, __pyx_k_9_ay_aq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 285, 44}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_prog, __pyx_mstate->__pyx_n_u_buffer}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cuda_bindings_nvvm_pyx, __pyx_mstate->__pyx_n_u_get_program_log, __pyx_k_AYl_9F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + } + Py_DECREF(tuple_dedup_map); + return 0; + bad: + Py_DECREF(tuple_dedup_map); + return -1; +} +/* #### Code section: init_globals ### */ + +static int __Pyx_InitGlobals(void) { + /* PythonCompatibility.init */ + if (likely(__Pyx_init_co_variables() == 0)); else + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + /* CachedMethodType.init */ + #if CYTHON_COMPILING_IN_LIMITED_API +{ + PyObject *typesModule=NULL; + typesModule = PyImport_ImportModule("types"); + if (typesModule) { + __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); + Py_DECREF(typesModule); + } +} // error handling follows +#endif + +if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) + + return 0; + __pyx_L1_error:; + return -1; +} +/* #### Code section: cleanup_globals ### */ +/* #### Code section: cleanup_module ### */ +/* #### Code section: main_method ### */ +/* #### Code section: utility_code_pragmas ### */ +#ifdef _MSC_VER +#pragma warning( push ) +/* Warning 4127: conditional expression is constant + * Cython uses constant conditional expressions to allow in inline functions to be optimized at + * compile-time, so this warning is not useful + */ +#pragma warning( disable : 4127 ) +#endif + + + +/* #### Code section: utility_code_def ### */ + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyErrExceptionMatches */ +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030C00A6 + PyObject *current_exception = tstate->current_exception; + if (unlikely(!current_exception)) return 0; + exc_type = (PyObject*) Py_TYPE(current_exception); + if (exc_type == err) return 1; +#else + exc_type = tstate->curexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; +#endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(exc_type); + #endif + if (unlikely(PyTuple_Check(err))) { + result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + } else { + result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(exc_type); + #endif + return result; +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject *tmp_value; + assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); + if (value) { + #if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) + #endif + PyException_SetTraceback(value, tb); + } + tmp_value = tstate->current_exception; + tstate->current_exception = value; + Py_XDECREF(tmp_value); + Py_XDECREF(type); + Py_XDECREF(tb); +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyObject* exc_value; + exc_value = tstate->current_exception; + tstate->current_exception = 0; + *value = exc_value; + *type = NULL; + *tb = NULL; + if (exc_value) { + *type = (PyObject*) Py_TYPE(exc_value); + Py_INCREF(*type); + #if CYTHON_COMPILING_IN_CPYTHON + *tb = ((PyBaseExceptionObject*) exc_value)->traceback; + Py_XINCREF(*tb); + #else + *tb = PyException_GetTraceback(exc_value); + #endif + } +#else + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#endif +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* PyObjectGetAttrStrNoError */ +#if __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + (void) PyObject_GetOptionalAttr(obj, attr_name, &result); + return result; +#else +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +#endif +} + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); + if (unlikely(!result) && !PyErr_Occurred()) { + PyErr_Format(PyExc_NameError, + "name '%U' is not defined", name); + } + return result; +} + +/* TupleAndListFromArray */ +#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + Py_ssize_t i; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + for (i = 0; i < n; i++) { + if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { + Py_DECREF(res); + return NULL; + } + Py_INCREF(src[i]); + } + return res; +} +#elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject * +__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); + } + res = PyTuple_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); + return res; +} +static CYTHON_INLINE PyObject * +__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) +{ + PyObject *res; + if (n <= 0) { + return PyList_New(0); + } + res = PyList_New(n); + if (unlikely(res == NULL)) return NULL; + __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); + return res; +} +#endif + +/* BytesEquals */ +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ + !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +/* UnicodeEquals */ +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL + return PyObject_RichCompareBool(s1, s2, equals); +#else + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length, length2; + int kind; + void *data1, *data2; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + #endif + length = __Pyx_PyUnicode_GET_LENGTH(s1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length < 0)) return -1; + #endif + length2 = __Pyx_PyUnicode_GET_LENGTH(s2); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(length2 < 0)) return -1; + #endif + if (length != length2) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + return (equals == Py_EQ); +return_ne: + return (equals == Py_NE); +#endif +} + +/* fastcall */ +#if CYTHON_METH_FASTCALL +static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) +{ + Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(n == -1)) return NULL; + #endif + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + if (s == namei) return kwvalues[i]; + } + for (i = 0; i < n; i++) + { + PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!namei)) return NULL; + #endif + int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); + if (unlikely(eq != 0)) { + if (unlikely(eq < 0)) return NULL; + return kwvalues[i]; + } + } + return NULL; +} +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API +CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs; + PyObject *dict; +#if !CYTHON_ASSUME_SAFE_SIZE + nkwargs = PyTuple_Size(kwnames); + if (unlikely(nkwargs < 0)) return NULL; +#else + nkwargs = PyTuple_GET_SIZE(kwnames); +#endif + dict = PyDict_New(); + if (unlikely(!dict)) + return NULL; + for (i=0; irecursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; + PyObject *kwdefs; + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { + return NULL; + } + if ( + co->co_kwonlyargcount == 0 && + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectCallMethO */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); + self = __Pyx_CyOrPyCFunction_GET_SELF(func); + if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* PyObjectFastCall */ +#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API +static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { + PyObject *argstuple; + PyObject *result = 0; + size_t i; + argstuple = PyTuple_New((Py_ssize_t)nargs); + if (unlikely(!argstuple)) return NULL; + for (i = 0; i < nargs; i++) { + Py_INCREF(args[i]); + if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; + } + result = __Pyx_PyObject_Call(func, argstuple, kwargs); + bad: + Py_DECREF(argstuple); + return result; +} +#endif +#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + #if PY_VERSION_HEX < 0x03090000 + #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) + #elif CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { + PyTypeObject *tp = Py_TYPE(callable); + #if defined(__Pyx_CyFunction_USED) + if (__Pyx_CyFunction_CheckExact(callable)) { + return __Pyx_CyFunction_func_vectorcall(callable); + } + #endif + if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { + return NULL; + } + assert(PyCallable_Check(callable)); + Py_ssize_t offset = tp->tp_vectorcall_offset; + assert(offset > 0); + vectorcallfunc ptr; + memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); + return ptr; +} + #else + #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) + #endif +#endif +static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { + Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); +#if CYTHON_COMPILING_IN_CPYTHON + if (nargs == 0 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) + return __Pyx_PyObject_CallMethO(func, NULL); + } + else if (nargs == 1 && kwargs == NULL) { + if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) + return __Pyx_PyObject_CallMethO(func, args[0]); + } +#endif + #if PY_VERSION_HEX < 0x030800B1 + #if CYTHON_FAST_PYCCALL + if (PyCFunction_Check(func)) { + if (kwargs) { + return _PyCFunction_FastCallDict(func, args, nargs, kwargs); + } else { + return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); + } + } + if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { + return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); + } + #endif + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); + } + #endif + #endif + if (kwargs == NULL) { + #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API + vectorcallfunc f = __Pyx_PyVectorcall_Function(func); + if (f) { + return f(func, args, _nargs, NULL); + } + #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL + if (__Pyx_CyFunction_CheckExact(func)) { + __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); + if (f) return f(func, args, _nargs, NULL); + } + #elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL + return PyObject_Vectorcall(func, args, _nargs, NULL); + #endif + } + if (nargs == 0) { + return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); + } + #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API + return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); + #else + return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); + #endif +} + +/* UnpackUnboundCMethod */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { + PyObject *result; + PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); + if (unlikely(!selfless_args)) return NULL; + result = PyObject_Call(method, selfless_args, kwargs); + Py_DECREF(selfless_args); + return result; +} +#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { + return _PyObject_Vectorcall + (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); +} +#else +static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { + return +#if PY_VERSION_HEX < 0x03090000 + _PyObject_Vectorcall +#else + PyObject_Vectorcall +#endif + (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); +} +#endif +static PyMethodDef __Pyx_UnboundCMethod_Def = { + "CythonUnboundCMethod", + __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 + METH_VARARGS | METH_KEYWORDS, +#else + METH_FASTCALL | METH_KEYWORDS, +#endif + NULL +}; +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method, *result=NULL; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + result = method; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } else +#endif +#if CYTHON_COMPILING_IN_PYPY +#else + if (PyCFunction_Check(method)) +#endif + { + PyObject *self; + int self_found; +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + self = PyObject_GetAttrString(method, "__self__"); + if (!self) { + PyErr_Clear(); + } +#else + self = PyCFunction_GET_SELF(method); +#endif + self_found = (self && self != Py_None); +#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY + Py_XDECREF(self); +#endif + if (self_found) { + PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); + if (unlikely(!unbound_method)) return -1; + Py_DECREF(method); + result = unbound_method; + } + } +#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if (unlikely(target->method)) { + Py_DECREF(result); + } else +#endif + target->method = result; + return 0; +} + +/* CallUnboundCMethod2 */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); + if (likely(was_initialized == 2 && cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + return __Pyx_CallCFunctionFast(cfunc, self, args, 2); + } + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); + } +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + else if (unlikely(was_initialized == 1)) { + __Pyx_CachedCFunction tmp_cfunc = { +#ifndef __cplusplus + 0 +#endif + }; + tmp_cfunc.type = cfunc->type; + tmp_cfunc.method_name = cfunc->method_name; + return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); + } +#endif + PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); + __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); + return result; +} +#endif +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + PyObject *result = NULL; + PyObject *args = PyTuple_New(2); + if (unlikely(!args)) return NULL; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); + else + result = __Pyx_CallCFunction(cfunc, self, args); + Py_DECREF(args); + return result; + } +#endif + { + PyObject *args[4] = {NULL, self, arg1, arg2}; + return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + } +} + +/* ParseKeywords */ +static int __Pyx_ValidateDuplicatePosArgs( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char* function_name) +{ + PyObject ** const *name = argnames; + while (name != first_kw_arg) { + PyObject *key = **name; + int found = PyDict_Contains(kwds, key); + if (unlikely(found)) { + if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; + } + name++; + } + return 0; +bad: + return -1; +} +#if CYTHON_USE_UNICODE_INTERNALS +static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { + int kind; + Py_ssize_t len = PyUnicode_GET_LENGTH(s1); + if (len != PyUnicode_GET_LENGTH(s2)) return 0; + kind = PyUnicode_KIND(s1); + if (kind != PyUnicode_KIND(s2)) return 0; + const void *data1 = PyUnicode_DATA(s1); + const void *data2 = PyUnicode_DATA(s2); + return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); +} +#endif +static int __Pyx_MatchKeywordArg_str( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + #if CYTHON_USE_UNICODE_INTERNALS + Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; + if (unlikely(key_hash == -1)) { + key_hash = PyObject_Hash(key); + if (unlikely(key_hash == -1)) + goto bad; + } + #endif + name = first_kw_arg; + while (*name) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { + *index_found = (size_t) (name - argnames); + return 1; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + *index_found = (size_t) (name - argnames); + return 1; + } + } + #endif + name++; + } + name = argnames; + while (name != first_kw_arg) { + PyObject *name_str = **name; + #if CYTHON_USE_UNICODE_INTERNALS + if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { + if (__Pyx_UnicodeKeywordsEqual(name_str, key)) + goto arg_passed_twice; + } + #else + #if CYTHON_ASSUME_SAFE_SIZE + if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) + #endif + { + if (unlikely(name_str == key)) goto arg_passed_twice; + int cmp = PyUnicode_Compare(name_str, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + } + #endif + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +bad: + return -1; +} +static int __Pyx_MatchKeywordArg_nostr( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + PyObject ** const *name; + if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; + name = first_kw_arg; + while (*name) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (cmp == 1) { + *index_found = (size_t) (name - argnames); + return 1; + } + if (unlikely(cmp == -1)) goto bad; + name++; + } + name = argnames; + while (name != first_kw_arg) { + int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); + if (unlikely(cmp != 0)) { + if (cmp == 1) goto arg_passed_twice; + else goto bad; + } + name++; + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +bad: + return -1; +} +static CYTHON_INLINE int __Pyx_MatchKeywordArg( + PyObject *key, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + size_t *index_found, + const char *function_name) +{ + return likely(PyUnicode_CheckExact(key)) ? + __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : + __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); +} +static void __Pyx_RejectUnknownKeyword( + PyObject *kwds, + PyObject ** const argnames[], + PyObject ** const *first_kw_arg, + const char *function_name) +{ + Py_ssize_t pos = 0; + PyObject *key = NULL; + __Pyx_BEGIN_CRITICAL_SECTION(kwds); + while (PyDict_Next(kwds, &pos, &key, NULL)) { + PyObject** const *name = first_kw_arg; + while (*name && (**name != key)) name++; + if (!*name) { + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(key); + #endif + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp != 1) { + if (cmp == 0) { + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + break; + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + #endif + } + } + __Pyx_END_CRITICAL_SECTION(); + assert(PyErr_Occurred()); +} +static int __Pyx_ParseKeywordDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t extracted = 0; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + name = first_kw_arg; + while (*name && num_kwargs > extracted) { + PyObject * key = **name; + PyObject *value; + int found = 0; + #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + found = PyDict_GetItemRef(kwds, key, &value); + #else + value = PyDict_GetItemWithError(kwds, key); + if (value) { + Py_INCREF(value); + found = 1; + } else { + if (unlikely(PyErr_Occurred())) goto bad; + } + #endif + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + extracted++; + } + name++; + } + if (num_kwargs > extracted) { + if (ignore_unknown_kwargs) { + if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) + goto bad; + } else { + __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); + goto bad; + } + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordDictToDict( + PyObject *kwds, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject** const *name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + Py_ssize_t len; +#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) + if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; +#endif + if (PyDict_Update(kwds2, kwds) < 0) goto bad; + name = first_kw_arg; + while (*name) { + PyObject *key = **name; + PyObject *value; +#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) + int found = PyDict_Pop(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + } +#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 + int found = PyDict_GetItemRef(kwds2, key, &value); + if (found) { + if (unlikely(found < 0)) goto bad; + values[name-argnames] = value; + if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; + } +#else + #if CYTHON_COMPILING_IN_CPYTHON + value = _PyDict_Pop(kwds2, key, kwds2); + #else + value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); + #endif + if (value == kwds2) { + Py_DECREF(value); + } else { + if (unlikely(!value)) goto bad; + values[name-argnames] = value; + } +#endif + name++; + } + len = PyDict_Size(kwds2); + if (len > 0) { + return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); + } else if (unlikely(len == -1)) { + goto bad; + } + return 0; +bad: + return -1; +} +static int __Pyx_ParseKeywordsTuple( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + PyObject *key = NULL; + PyObject** const * name; + PyObject** const *first_kw_arg = argnames + num_pos_args; + for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { +#if CYTHON_AVOID_BORROWED_REFS + key = __Pyx_PySequence_ITEM(kwds, pos); +#else + key = __Pyx_PyTuple_GET_ITEM(kwds, pos); +#endif +#if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(!key)) goto bad; +#endif + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + PyObject *value = kwvalues[pos]; + values[name-argnames] = __Pyx_NewRef(value); + } else { + size_t index_found = 0; + int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); + if (cmp == 1) { + PyObject *value = kwvalues[pos]; + values[index_found] = __Pyx_NewRef(value); + } else { + if (unlikely(cmp == -1)) goto bad; + if (kwds2) { + PyObject *value = kwvalues[pos]; + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else if (!ignore_unknown_kwargs) { + goto invalid_keyword; + } + } + } + #if CYTHON_AVOID_BORROWED_REFS + Py_DECREF(key); + key = NULL; + #endif + } + return 0; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + "%s() got an unexpected keyword argument '%U'", + function_name, key); + goto bad; +bad: + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(key); + #endif + return -1; +} +static int __Pyx_ParseKeywords( + PyObject *kwds, + PyObject * const *kwvalues, + PyObject ** const argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + Py_ssize_t num_kwargs, + const char* function_name, + int ignore_unknown_kwargs) +{ + if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) + return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); + else if (kwds2) + return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); + else + return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* PyObjectSetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if CYTHON_COMPILING_IN_LIMITED_API + if (unlikely(!__pyx_m)) { + if (!PyErr_Occurred()) + PyErr_SetNone(PyExc_NameError); + return NULL; + } + result = PyObject_GetAttr(__pyx_m, name); + if (likely(result)) { + return result; + } + PyErr_Clear(); +#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS + if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return result; + } +#else + result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* JoinPyUnicode */ +static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind, kind_shift; + Py_ssize_t i, char_pos; + void *result_udata; + if (max_char > 1114111) max_char = 1114111; + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; + result_udata = PyUnicode_DATA(result_uval); + assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) + goto overflow; + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = values[i]; + #if !CYTHON_COMPILING_IN_LIMITED_API + if (__Pyx_PyUnicode_READY(uval) == (-1)) + goto bad; + #endif + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely(ulength < 0)) goto bad; + #endif + if (unlikely(!ulength)) + continue; + if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (ukind == result_ukind) { + memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); + } else { + #if PY_VERSION_HEX >= 0x030d0000 + if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; + #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + Py_ssize_t i; + PyObject *result = NULL; + PyObject *value_tuple = PyTuple_New(value_count); + if (unlikely(!value_tuple)) return NULL; + CYTHON_UNUSED_VAR(max_char); + CYTHON_UNUSED_VAR(result_ulength); + for (i=0; i__pyx_empty_unicode, value_tuple); +bad: + Py_DECREF(value_tuple); + return result; +#endif +} + +/* PyObjectFastCallMethod */ +#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 +static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { + PyObject *result; + PyObject *attr = PyObject_GetAttr(args[0], name); + if (unlikely(!attr)) + return NULL; + result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); + Py_DECREF(attr); + return result; +} +#endif + +/* RaiseException */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if PY_VERSION_HEX >= 0x030C00A6 + PyException_SetTraceback(value, tb); +#elif CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#else + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} + +/* ErrOccurredWithGIL */ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + PyGILState_STATE _save = PyGILState_Ensure(); + err = !!PyErr_Occurred(); + PyGILState_Release(_save); + return err; +} + +/* decode_c_bytes */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + if (unlikely(stop <= start)) + return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* ListPack */ +static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { + va_list va; + PyObject *l = PyList_New(n); + va_start(va, n); + if (unlikely(!l)) goto end; + for (Py_ssize_t i=0; i__pyx_d, empty_dict, from_list, 1); + if (unlikely(!module)) { + if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError))) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + if (!module) { + module = PyImport_ImportModuleLevelObject( + name, __pyx_mstate_global->__pyx_d, empty_dict, from_list, level); + } +bad: + Py_XDECREF(empty_dict); + Py_XDECREF(empty_list); + return module; +} + +/* ImportFrom */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + const char* module_name_str = 0; + PyObject* module_name = 0; + PyObject* module_dot = 0; + PyObject* full_name = 0; + PyErr_Clear(); + module_name_str = PyModule_GetName(module); + if (unlikely(!module_name_str)) { goto modbad; } + module_name = PyUnicode_FromString(module_name_str); + if (unlikely(!module_name)) { goto modbad; } + module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3); + if (unlikely(!module_dot)) { goto modbad; } + full_name = PyUnicode_Concat(module_dot, name); + if (unlikely(!full_name)) { goto modbad; } + #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ + CYTHON_COMPILING_IN_GRAAL + { + PyObject *modules = PyImport_GetModuleDict(); + if (unlikely(!modules)) + goto modbad; + value = PyObject_GetItem(modules, full_name); + } + #else + value = PyImport_GetModule(full_name); + #endif + modbad: + Py_XDECREF(full_name); + Py_XDECREF(module_dot); + Py_XDECREF(module_name); + } + if (unlikely(!value)) { + PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + } + return value; +} + +/* PyObjectCallOneArg */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *args[2] = {NULL, arg}; + return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* Py3UpdateBases */ +static PyObject* +__Pyx_PEP560_update_bases(PyObject *bases) +{ + Py_ssize_t i, j, size_bases; + PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; +#if CYTHON_ASSUME_SAFE_SIZE + size_bases = PyTuple_GET_SIZE(bases); +#else + size_bases = PyTuple_Size(bases); + if (size_bases < 0) return NULL; +#endif + for (i = 0; i < size_bases; i++) { +#if CYTHON_AVOID_BORROWED_REFS + Py_CLEAR(base); +#endif +#if CYTHON_ASSUME_SAFE_MACROS + base = PyTuple_GET_ITEM(bases, i); +#else + base = PyTuple_GetItem(bases, i); + if (!base) goto error; +#endif +#if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(base); +#endif + if (PyType_Check(base)) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); + if (!meth && PyErr_Occurred()) { + goto error; + } + if (!meth) { + if (new_bases) { + if (PyList_Append(new_bases, base) < 0) { + goto error; + } + } + continue; + } + new_base = __Pyx_PyObject_CallOneArg(meth, bases); + Py_DECREF(meth); + if (!new_base) { + goto error; + } + if (!PyTuple_Check(new_base)) { + PyErr_SetString(PyExc_TypeError, + "__mro_entries__ must return a tuple"); + Py_DECREF(new_base); + goto error; + } + if (!new_bases) { + if (!(new_bases = PyList_New(i))) { + goto error; + } + for (j = 0; j < i; j++) { + PyObject *base_from_list; +#if CYTHON_ASSUME_SAFE_MACROS + base_from_list = PyTuple_GET_ITEM(bases, j); + PyList_SET_ITEM(new_bases, j, base_from_list); + Py_INCREF(base_from_list); +#else + base_from_list = PyTuple_GetItem(bases, j); + if (!base_from_list) goto error; + Py_INCREF(base_from_list); + if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; +#endif + } + } +#if CYTHON_ASSUME_SAFE_SIZE + j = PyList_GET_SIZE(new_bases); +#else + j = PyList_Size(new_bases); + if (j < 0) goto error; +#endif + if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { + goto error; + } + Py_DECREF(new_base); + } + if (!new_bases) { + Py_INCREF(bases); + return bases; + } + result = PyList_AsTuple(new_bases); + Py_DECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return result; +error: + Py_XDECREF(new_bases); +#if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(base); +#endif + return NULL; +} + +/* CalculateMetaclass */ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases; +#if CYTHON_ASSUME_SAFE_SIZE + nbases = PyTuple_GET_SIZE(bases); +#else + nbases = PyTuple_Size(bases); + if (nbases < 0) return NULL; +#endif + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; +#if CYTHON_ASSUME_SAFE_MACROS + PyObject *tmp = PyTuple_GET_ITEM(bases, i); +#else + PyObject *tmp = PyTuple_GetItem(bases, i); + if (!tmp) return NULL; +#endif + tmptype = Py_TYPE(tmp); + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { + metaclass = &PyType_Type; + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + +/* PyObjectCall2Args */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args[3] = {NULL, arg1, arg2}; + return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); +} + +/* PyObjectLookupSpecial */ +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else if (with_error) { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#endif + +/* Py3ClassCreate */ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); + if (prep) { + PyObject *pargs[3] = {NULL, name, bases}; + ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_DECREF(prep); + } else { + if (unlikely(PyErr_Occurred())) + return NULL; + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + if (unlikely(!ns)) + return NULL; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result; + PyObject *owned_metaclass = NULL; + PyObject *margs[4] = {NULL, name, bases, dict}; + if (allow_py2_metaclass) { + owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); + Py_XDECREF(owned_metaclass); + return result; +} + +/* LimitedApiGetTypeDict */ +#if CYTHON_COMPILING_IN_LIMITED_API +static Py_ssize_t __Pyx_GetTypeDictOffset(void) { + PyObject *tp_dictoffset_o; + Py_ssize_t tp_dictoffset; + tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); + if (unlikely(!tp_dictoffset_o)) return -1; + tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); + Py_DECREF(tp_dictoffset_o); + if (unlikely(tp_dictoffset == 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' doesn't have a dictoffset"); + return -1; + } else if (unlikely(tp_dictoffset < 0)) { + PyErr_SetString( + PyExc_TypeError, + "'type' has an unexpected negative dictoffset. " + "Please report this as Cython bug"); + return -1; + } + return tp_dictoffset; +} +static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { + static Py_ssize_t tp_dictoffset = 0; + if (unlikely(tp_dictoffset == 0)) { + tp_dictoffset = __Pyx_GetTypeDictOffset(); + if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { + tp_dictoffset = 0; // try again next time? + return NULL; + } + } + return *(PyObject**)((char*)tp + tp_dictoffset); +} +#endif + +/* SetItemOnTypeDict */ +static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { + int result; + PyObject *tp_dict; +#if CYTHON_COMPILING_IN_LIMITED_API + tp_dict = __Pyx_GetTypeDict(tp); + if (unlikely(!tp_dict)) return -1; +#else + tp_dict = tp->tp_dict; +#endif + result = PyDict_SetItem(tp_dict, k, v); + if (likely(!result)) { + PyType_Modified(tp); + if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { + PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); + if (!setNameResult) return -1; + Py_DECREF(setNameResult); + } + } + return result; +} + +/* FixUpExtensionType */ +static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { +#if __PYX_LIMITED_VERSION_HEX > 0x030900B1 + CYTHON_UNUSED_VAR(spec); + CYTHON_UNUSED_VAR(type); + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); +#else + const PyType_Slot *slot = spec->slots; + int changed = 0; +#if !CYTHON_COMPILING_IN_LIMITED_API + while (slot && slot->slot && slot->slot != Py_tp_members) + slot++; + if (slot && slot->slot == Py_tp_members) { +#if !CYTHON_COMPILING_IN_CPYTHON + const +#endif // !CYTHON_COMPILING_IN_CPYTHON) + PyMemberDef *memb = (PyMemberDef*) slot->pfunc; + while (memb && memb->name) { + if (memb->name[0] == '_' && memb->name[1] == '_') { + if (strcmp(memb->name, "__weaklistoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_weaklistoffset = memb->offset; + changed = 1; + } + else if (strcmp(memb->name, "__dictoffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); + type->tp_dictoffset = memb->offset; + changed = 1; + } +#if CYTHON_METH_FASTCALL + else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { + assert(memb->type == T_PYSSIZET); + assert(memb->flags == READONLY); +#if PY_VERSION_HEX >= 0x030800b4 + type->tp_vectorcall_offset = memb->offset; +#else + type->tp_print = (printfunc) memb->offset; +#endif + changed = 1; + } +#endif // CYTHON_METH_FASTCALL +#if !CYTHON_COMPILING_IN_PYPY + else if (strcmp(memb->name, "__module__") == 0) { + PyObject *descr; + assert(memb->type == T_OBJECT); + assert(memb->flags == 0 || memb->flags == READONLY); + descr = PyDescr_NewMember(type, memb); + if (unlikely(!descr)) + return -1; + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } +#endif // !CYTHON_COMPILING_IN_PYPY + } + memb++; + } + } +#endif // !CYTHON_COMPILING_IN_LIMITED_API +#if !CYTHON_COMPILING_IN_PYPY + slot = spec->slots; + while (slot && slot->slot && slot->slot != Py_tp_getset) + slot++; + if (slot && slot->slot == Py_tp_getset) { + PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; + while (getset && getset->name) { + if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { + PyObject *descr = PyDescr_NewGetSet(type, getset); + if (unlikely(!descr)) + return -1; + #if CYTHON_COMPILING_IN_LIMITED_API + PyObject *pyname = PyUnicode_FromString(getset->name); + if (unlikely(!pyname)) { + Py_DECREF(descr); + return -1; + } + int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); + Py_DECREF(pyname); + #else + CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); + int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); + #endif + Py_DECREF(descr); + if (unlikely(set_item_result < 0)) { + return -1; + } + changed = 1; + } + ++getset; + } + } +#endif // !CYTHON_COMPILING_IN_PYPY + if (changed) + PyType_Modified(type); +#endif // PY_VERSION_HEX > 0x030900B1 + return 0; +} + +/* FetchSharedCythonModule */ +static PyObject *__Pyx_FetchSharedCythonABIModule(void) { + return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); +} + +/* dict_setdefault */ +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + int is_safe_type) { + PyObject* value; + CYTHON_MAYBE_UNUSED_VAR(is_safe_type); +#if CYTHON_COMPILING_IN_LIMITED_API + value = PyObject_CallMethod(d, "setdefault", "OO", key, default_value); +#elif PY_VERSION_HEX >= 0x030d0000 + PyDict_SetDefaultRef(d, key, default_value, &value); +#else + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#endif + return value; +} + +/* FetchCommonType */ +#if __PYX_LIMITED_VERSION_HEX < 0x030C0000 +static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); + if (result && metaclass) { + PyObject *old_tp = (PyObject*)Py_TYPE(result); + Py_INCREF((PyObject*)metaclass); +#if __PYX_LIMITED_VERSION_HEX >= 0x03090000 + Py_SET_TYPE(result, metaclass); +#else + result->ob_type = metaclass; +#endif + Py_DECREF(old_tp); + } + return result; +} +#else +#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) +#endif +static int __Pyx_VerifyCachedType(PyObject *cached_type, + const char *name, + Py_ssize_t expected_basicsize) { + Py_ssize_t basicsize; + if (!PyType_Check(cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", name); + return -1; + } + if (expected_basicsize == 0) { + return 0; // size is inherited, nothing useful to check + } +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_basicsize; + py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); + if (unlikely(!py_basicsize)) return -1; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = NULL; + if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; +#else + basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; +#endif + if (basicsize != expected_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + name); + return -1; + } + return 0; +} +static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { + PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; + int get_item_ref_result; + const char* object_name = strrchr(spec->name, '.'); + object_name = object_name ? object_name+1 : spec->name; + py_object_name = PyUnicode_FromString(object_name); + if (!py_object_name) return NULL; + abi_module = __Pyx_FetchSharedCythonABIModule(); + if (!abi_module) goto done; + abi_module_dict = PyModule_GetDict(abi_module); + if (!abi_module_dict) goto done; + get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); + if (get_item_ref_result == 1) { + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else if (unlikely(get_item_ref_result == -1)) { + goto bad; + } + CYTHON_UNUSED_VAR(module); + cached_type = __Pyx_PyType_FromMetaclass(metaclass, abi_module, spec, bases); + if (unlikely(!cached_type)) goto bad; + if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; + new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type, 1); + if (unlikely(new_cached_type != cached_type)) { + if (unlikely(!new_cached_type)) goto bad; + Py_DECREF(cached_type); + cached_type = new_cached_type; + if (__Pyx_VerifyCachedType( + cached_type, + object_name, + spec->basicsize) < 0) { + goto bad; + } + goto done; + } else { + Py_DECREF(new_cached_type); + } +done: + Py_XDECREF(abi_module); + Py_DECREF(py_object_name); + assert(cached_type == NULL || PyType_Check(cached_type)); + return (PyTypeObject *) cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + +/* CommonTypesMetaclass */ +static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { + return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); +} +static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { + {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, + {0, 0, 0, 0, 0} +}; +static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { + {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, + {0, 0} +}; +static PyType_Spec __pyx_CommonTypesMetaclass_spec = { + __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", + 0, + 0, +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | + Py_TPFLAGS_DISALLOW_INSTANTIATION | +#endif + Py_TPFLAGS_DEFAULT, + __pyx_CommonTypesMetaclass_slots +}; +static int __pyx_CommonTypesMetaclass_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + PyObject *bases = PyTuple_Pack(1, &PyType_Type); + if (unlikely(!bases)) { + return -1; + } + mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); + Py_DECREF(bases); + if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { + return -1; + } + return 0; +} + +/* CallTypeTraverse */ +#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) +#else +static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { + #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 + if (__Pyx_get_runtime_version() < 0x03090000) return 0; + #endif + if (!always_call) { + PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); + unsigned long flags = PyType_GetFlags(base); + if (flags & Py_TPFLAGS_HEAPTYPE) { + return 0; + } + } + Py_VISIT((PyObject*)Py_TYPE(o)); + return 0; +} +#endif + +/* PyMethodNew */ +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + PyObject *result; + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 + { + PyObject *args[] = {func, self}; + result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); + } + #else + result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); + #endif + return result; +} +#else +static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { + CYTHON_UNUSED_VAR(typ); + if (!self) + return __Pyx_NewRef(func); + return PyMethod_New(func, self); +} +#endif + +/* PyVectorcallFastCallDict */ +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + PyObject *res = NULL; + PyObject *kwnames; + PyObject **newargs; + PyObject **kwvalues; + Py_ssize_t i, pos; + size_t j; + PyObject *key, *value; + unsigned long keys_are_strings; + #if !CYTHON_ASSUME_SAFE_SIZE + Py_ssize_t nkw = PyDict_Size(kw); + if (unlikely(nkw == -1)) return NULL; + #else + Py_ssize_t nkw = PyDict_GET_SIZE(kw); + #endif + newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); + if (unlikely(newargs == NULL)) { + PyErr_NoMemory(); + return NULL; + } + for (j = 0; j < nargs; j++) newargs[j] = args[j]; + kwnames = PyTuple_New(nkw); + if (unlikely(kwnames == NULL)) { + PyMem_Free(newargs); + return NULL; + } + kwvalues = newargs + nargs; + pos = i = 0; + keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; + while (PyDict_Next(kw, &pos, &key, &value)) { + keys_are_strings &= + #if CYTHON_COMPILING_IN_LIMITED_API + PyType_GetFlags(Py_TYPE(key)); + #else + Py_TYPE(key)->tp_flags; + #endif + Py_INCREF(key); + Py_INCREF(value); + #if !CYTHON_ASSUME_SAFE_MACROS + if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; + #else + PyTuple_SET_ITEM(kwnames, i, key); + #endif + kwvalues[i] = value; + i++; + } + if (unlikely(!keys_are_strings)) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + goto cleanup; + } + res = vc(func, newargs, nargs, kwnames); +cleanup: + Py_DECREF(kwnames); + for (i = 0; i < nkw; i++) + Py_DECREF(kwvalues[i]); + PyMem_Free(newargs); + return res; +} +static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) +{ + Py_ssize_t kw_size = + likely(kw == NULL) ? + 0 : +#if !CYTHON_ASSUME_SAFE_SIZE + PyDict_Size(kw); +#else + PyDict_GET_SIZE(kw); +#endif + if (kw_size == 0) { + return vc(func, args, nargs, NULL); + } +#if !CYTHON_ASSUME_SAFE_SIZE + else if (unlikely(kw_size == -1)) { + return NULL; + } +#endif + return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); +} +#endif + +/* CythonFunctionShared */ +#if CYTHON_COMPILING_IN_LIMITED_API +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { + if (__Pyx_CyFunction_Check(func)) { + return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; + } else if (PyCFunction_Check(func)) { + return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; + } + return 0; +} +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { + int result; + PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); + if (unlikely(!newFunc)) { + PyErr_Clear(); // It's only an optimization, so don't throw an error + return 0; + } + result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); + Py_DECREF(newFunc); + return result; + } + return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); +} +#else +static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { + if (PyMethod_Check(func)) { + func = PyMethod_GET_FUNCTION(func); + } + return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; +} +#endif +static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + __Pyx_Py_XDECREF_SET( + __Pyx_CyFunction_GetClassObj(f), + ((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#else + __Pyx_Py_XDECREF_SET( + ((PyCMethodObject *) (f))->mm_class, + (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); +#endif +} +static PyObject * +__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_doc == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); + if (unlikely(!op->func_doc)) return NULL; +#else + if (((PyCFunctionObject*)op)->m_ml->ml_doc) { + op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } +#endif + } + Py_INCREF(op->func_doc); + return op->func_doc; +} +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { + PyObject *result; + CYTHON_UNUSED_VAR(closure); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_doc_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + value = Py_None; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_doc, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_name == NULL)) { +#if CYTHON_COMPILING_IN_LIMITED_API + op->func_name = PyObject_GetAttrString(op->func, "__name__"); +#else + op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_name_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_name, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + Py_INCREF(op->func_qualname); + result = op->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL || !PyUnicode_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_qualname, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_dict_locked(__pyx_CyFunctionObject *op) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + PyObject *result; + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_dict_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) +{ + CYTHON_UNUSED_VAR(context); + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_dict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(context); + Py_INCREF(op->func_globals); + return op->func_globals; +} +static PyObject * +__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) +{ + CYTHON_UNUSED_VAR(op); + CYTHON_UNUSED_VAR(context); + Py_INCREF(Py_None); + return Py_None; +} +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + CYTHON_UNUSED_VAR(context); + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result = NULL; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_defaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value) { + value = Py_None; + } else if (unlikely(value != Py_None && !PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " + "currently affect the values used in function calls", 1); + Py_INCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { + PyObject* result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_kwdefaults_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (!value || value == Py_None) { + value = NULL; + } else if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + __Pyx_BEGIN_CRITICAL_SECTION(op); + __Pyx_Py_XDECREF_SET(op->func_annotations, value); + __Pyx_END_CRITICAL_SECTION(); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + __Pyx_BEGIN_CRITICAL_SECTION(op); + result = __Pyx_CyFunction_get_annotations_locked(op); + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { + int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; + if (is_coroutine) { + PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; + fromlist = PyList_New(1); + if (unlikely(!fromlist)) return NULL; + Py_INCREF(marker); +#if CYTHON_ASSUME_SAFE_MACROS + PyList_SET_ITEM(fromlist, 0, marker); +#else + if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { + Py_DECREF(marker); + Py_DECREF(fromlist); + return NULL; + } +#endif + module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); + Py_DECREF(fromlist); + if (unlikely(!module)) goto ignore; + is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); + Py_DECREF(module); + if (likely(is_coroutine_value)) { + return is_coroutine_value; + } +ignore: + PyErr_Clear(); + } + return __Pyx_PyBool_FromLong(is_coroutine); +} +static PyObject * +__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { + PyObject *result; + CYTHON_UNUSED_VAR(context); + if (op->func_is_coroutine) { + return __Pyx_NewRef(op->func_is_coroutine); + } + result = __Pyx_CyFunction_get_is_coroutine_value(op); + if (unlikely(!result)) + return NULL; + __Pyx_BEGIN_CRITICAL_SECTION(op); + if (op->func_is_coroutine) { + Py_DECREF(result); + result = __Pyx_NewRef(op->func_is_coroutine); + } else { + op->func_is_coroutine = __Pyx_NewRef(result); + } + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + py_name, message, size); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", + name, message, size); +#endif +} +static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); + if (!py_name) return; + PyErr_Format(PyExc_TypeError, + "%.200S() %s", + py_name, message); + Py_DECREF(py_name); +#else + const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; + PyErr_Format(PyExc_TypeError, + "%.200s() %s", + name, message); +#endif +} +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_GetAttrString(op->func, "__module__"); +} +static int +__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + return PyObject_SetAttrString(op->func, "__module__", value); +} +#endif +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, +#if CYTHON_COMPILING_IN_LIMITED_API + {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, +#endif + {0, 0, 0, 0, 0} +}; +static PyMemberDef __pyx_CyFunction_members[] = { +#if !CYTHON_COMPILING_IN_LIMITED_API + {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, +#endif + {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, +#if CYTHON_METH_FASTCALL +#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API + {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, +#else + {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, +#endif +#if CYTHON_COMPILING_IN_LIMITED_API + {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, +#else + {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, +#endif +#endif + {0, 0, 0, 0, 0} +}; +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) +{ + PyObject *result = NULL; + CYTHON_UNUSED_VAR(args); + __Pyx_BEGIN_CRITICAL_SECTION(m); + Py_INCREF(m->func_qualname); + result = m->func_qualname; + __Pyx_END_CRITICAL_SECTION(); + return result; +} +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; +#if CYTHON_COMPILING_IN_LIMITED_API +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) +#endif +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { +#if !CYTHON_COMPILING_IN_LIMITED_API + PyCFunctionObject *cf = (PyCFunctionObject*) op; +#endif + if (unlikely(op == NULL)) + return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); + if (unlikely(!op->func)) return NULL; +#endif + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; +#if !CYTHON_COMPILING_IN_LIMITED_API + cf->m_ml = ml; + cf->m_self = (PyObject *) op; +#endif + Py_XINCREF(closure); + op->func_closure = closure; +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_XINCREF(module); + cf->m_module = module; +#endif + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API + op->func_classobj = NULL; +#else + ((PyCMethodObject*)op)->mm_class = NULL; +#endif + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + op->func_is_coroutine = NULL; +#if CYTHON_METH_FASTCALL + switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { + case METH_NOARGS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; + break; + case METH_O: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; + break; + case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; + break; + case METH_FASTCALL | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; + break; + case METH_VARARGS | METH_KEYWORDS: + __Pyx_CyFunction_func_vectorcall(op) = NULL; + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + Py_DECREF(op); + return NULL; + } +#endif + return (PyObject *) op; +} +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_CLEAR(m->func); +#else + Py_CLEAR(((PyCFunctionObject*)m)->m_module); +#endif + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API +#if PY_VERSION_HEX < 0x030900B1 + Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); +#else + { + PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; + ((PyCMethodObject *) (m))->mm_class = NULL; + Py_XDECREF(cls); + } +#endif +#endif + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + Py_CLEAR(m->func_is_coroutine); + Py_CLEAR(m->defaults); + return 0; +} +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + __Pyx_PyHeapTypeObject_GC_Del(m); +} +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + { + int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); + if (e) return e; + } + Py_VISIT(m->func_closure); +#if CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(m->func); +#else + Py_VISIT(((PyCFunctionObject*)m)->m_module); +#endif + Py_VISIT(m->func_dict); + __Pyx_VISIT_CONST(m->func_name); + __Pyx_VISIT_CONST(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + __Pyx_VISIT_CONST(m->func_code); +#if !CYTHON_COMPILING_IN_LIMITED_API + Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); +#endif + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_is_coroutine); + Py_VISIT(m->defaults); + return 0; +} +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ + PyObject *repr; + __Pyx_BEGIN_CRITICAL_SECTION(op); + repr = PyUnicode_FromFormat("", + op->func_qualname, (void *)op); + __Pyx_END_CRITICAL_SECTION(); + return repr; +} +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { +#if CYTHON_COMPILING_IN_LIMITED_API + PyObject *f = ((__pyx_CyFunctionObject*)func)->func; + PyCFunction meth; + int flags; + meth = PyCFunction_GetFunction(f); + if (unlikely(!meth)) return NULL; + flags = PyCFunction_GetFlags(f); + if (unlikely(flags < 0)) return NULL; +#else + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + int flags = f->m_ml->ml_flags; +#endif + Py_ssize_t size; + switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 0)) + return (*meth)(self, NULL); + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes no arguments", size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { +#if CYTHON_ASSUME_SAFE_SIZE + size = PyTuple_GET_SIZE(arg); +#else + size = PyTuple_Size(arg); + if (unlikely(size < 0)) return NULL; +#endif + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + __Pyx_CyFunction_raise_argument_count_error( + (__pyx_CyFunctionObject*)func, + "takes exactly one argument", size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); + return NULL; + } + __Pyx_CyFunction_raise_type_error( + (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); + return NULL; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *self, *result; +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)func)->m_self; +#endif + result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); + return result; +} +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) + __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); + if (vc) { +#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE + return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); +#else + (void) &__Pyx_PyVectorcall_FastCallDict; + return PyVectorcall_Call(func, args, kw); +#endif + } +#endif + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; +#if CYTHON_ASSUME_SAFE_SIZE + argc = PyTuple_GET_SIZE(args); +#else + argc = PyTuple_Size(args); + if (unlikely(argc < 0)) return NULL; +#endif + new_args = PyTuple_GetSlice(args, 1, argc); + if (unlikely(!new_args)) + return NULL; + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} +#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) +static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) +{ + int ret = 0; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + if (unlikely(nargs < 1)) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "needs an argument"); + return -1; + } + ret = 1; + } + if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { + __Pyx_CyFunction_raise_type_error( + cyfunc, "takes no keyword arguments"); + return -1; + } + return ret; +} +static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 0)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes no arguments", nargs); + return NULL; + } + return meth(self, NULL); +} +static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + if (unlikely(nargs != 1)) { + __Pyx_CyFunction_raise_argument_count_error( + cyfunc, "takes exactly one argument", nargs); + return NULL; + } + return meth(self, args[0]); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); +} +static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; + PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); +#if CYTHON_BACKPORT_VECTORCALL + Py_ssize_t nargs = (Py_ssize_t)nargsf; +#else + Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); +#endif + PyObject *self; +#if CYTHON_COMPILING_IN_LIMITED_API + PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); + if (unlikely(!meth)) return NULL; +#else + PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; +#endif + switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { + case 1: + self = args[0]; + args += 1; + nargs -= 1; + break; + case 0: +#if CYTHON_COMPILING_IN_LIMITED_API + self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); + if (unlikely(!self) && PyErr_Occurred()) return NULL; +#else + self = ((PyCFunctionObject*)cyfunc)->m_self; +#endif + break; + default: + return NULL; + } + return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); +} +#endif +static PyType_Slot __pyx_CyFunctionType_slots[] = { + {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, + {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, + {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, + {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, + {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, + {Py_tp_methods, (void *)__pyx_CyFunction_methods}, + {Py_tp_members, (void *)__pyx_CyFunction_members}, + {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, + {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, + {0, 0}, +}; +static PyType_Spec __pyx_CyFunctionType_spec = { + __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", + sizeof(__pyx_CyFunctionObject), + 0, +#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR + Py_TPFLAGS_METHOD_DESCRIPTOR | +#endif +#if CYTHON_METH_FASTCALL +#if defined(Py_TPFLAGS_HAVE_VECTORCALL) + Py_TPFLAGS_HAVE_VECTORCALL | +#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) + _Py_TPFLAGS_HAVE_VECTORCALL | +#endif +#endif // CYTHON_METH_FASTCALL +#if PY_VERSION_HEX >= 0x030A0000 + Py_TPFLAGS_IMMUTABLETYPE | +#endif + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, + __pyx_CyFunctionType_slots +}; +static int __pyx_CyFunction_init(PyObject *module) { + __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); + mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( + mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); + if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} +static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); + if (unlikely(!m->defaults)) + return NULL; + return m->defaults; +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + +/* CLineInTraceback */ +#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + CYTHON_MAYBE_UNUSED_VAR(tstate); + if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __Pyx_BEGIN_CRITICAL_SECTION(*cython_runtime_dict); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) + Py_XINCREF(use_cline); + __Pyx_END_CRITICAL_SECTION(); + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_INCREF(use_cline); + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + (void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + Py_XDECREF(use_cline); + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { + __Pyx_CachedCodeObjectType* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!code_cache->entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { + return NULL; + } + code_object = code_cache->entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__find_code_object; + return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); + if (old_count < 0) { + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); + return NULL; + } +#endif + __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); +#endif + return result; +#endif +} +static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) +{ + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + code_cache->entries = entries; + code_cache->max_count = 64; + code_cache->count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); + if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { + __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_INCREF(code_object); + Py_DECREF(tmp); + return; + } + if (code_cache->count == code_cache->max_count) { + int new_max = code_cache->max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + code_cache->entries = entries; + code_cache->max_count = new_max; + } + for (i=code_cache->count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + code_cache->count++; + Py_INCREF(code_object); +} +static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS + (void)__pyx__insert_code_object; + return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. +#else + struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_nonatomic_int_type expected = 0; + if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { + return; + } +#endif + __pyx__insert_code_object(code_cache, code_line, code_object); +#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); +#endif +#endif +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif +#if CYTHON_COMPILING_IN_LIMITED_API +static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, + PyObject *firstlineno, PyObject *name) { + PyObject *replace = NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; + if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; + replace = PyObject_GetAttrString(code, "replace"); + if (likely(replace)) { + PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); + Py_DECREF(replace); + return result; + } + PyErr_Clear(); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; + PyObject *replace = NULL, *getframe = NULL, *frame = NULL; + PyObject *exc_type, *exc_value, *exc_traceback; + int success = 0; + if (c_line) { + (void) __pyx_cfilenm; + (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); + } + PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); + code_object = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!code_object) { + code_object = Py_CompileString("_getframe()", filename, Py_eval_input); + if (unlikely(!code_object)) goto bad; + py_py_line = PyLong_FromLong(py_line); + if (unlikely(!py_py_line)) goto bad; + py_funcname = PyUnicode_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + dict = PyDict_New(); + if (unlikely(!dict)) goto bad; + { + PyObject *old_code_object = code_object; + code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); + Py_DECREF(old_code_object); + } + if (unlikely(!code_object)) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); + } else { + dict = PyDict_New(); + } + getframe = PySys_GetObject("_getframe"); + if (unlikely(!getframe)) goto bad; + if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; + frame = PyEval_EvalCode(code_object, dict, dict); + if (unlikely(!frame) || frame == Py_None) goto bad; + success = 1; + bad: + PyErr_Restore(exc_type, exc_value, exc_traceback); + Py_XDECREF(code_object); + Py_XDECREF(py_py_line); + Py_XDECREF(py_funcname); + Py_XDECREF(dict); + Py_XDECREF(replace); + if (success) { + PyTraceBack_Here( + (struct _frame*)frame); + } + Py_XDECREF(frame); +} +#else +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + if (c_line) { + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + } + py_code = PyCode_NewEmpty(filename, funcname, py_line); + Py_XDECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} +#endif + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* PyObjectVectorCallKwBuilder */ +#if CYTHON_VECTORCALL +static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_PyObject_FastCallDict; + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; + Py_INCREF(key); + args[n] = value; + return 0; +} +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + (void)__Pyx_VectorcallBuilder_AddArgStr; + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); +} +static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { + PyObject *pyKey = PyUnicode_FromString(key); + if (!pyKey) return -1; + return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); +} +#else // CYTHON_VECTORCALL +CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { + if (unlikely(!PyUnicode_Check(key))) { + PyErr_SetString(PyExc_TypeError, "keywords must be strings"); + return -1; + } + return PyDict_SetItem(builder, key, value); +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_nvvmResult(nvvmResult value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const nvvmResult neg_one = (nvvmResult) -1, const_zero = (nvvmResult) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(nvvmResult) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(nvvmResult) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(nvvmResult) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(nvvmResult) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(nvvmResult) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(nvvmResult), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(nvvmResult)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + int val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (int) -1; + val = __Pyx_PyLong_As_int(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(int) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(int) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + int val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (int) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (int) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (int) -1; + } else { + stepval = v; + } + v = NULL; + val = (int) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((int) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((int) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (int) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE size_t __Pyx_PyLong_As_size_t(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + size_t val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (size_t) -1; + val = __Pyx_PyLong_As_size_t(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { + return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { + return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { + return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (size_t) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(size_t) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { + return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(size_t) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(size_t) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + size_t val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (size_t) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (size_t) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (size_t) -1; + } else { + stepval = v; + } + v = NULL; + val = (size_t) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((size_t) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((size_t) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (size_t) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const int neg_one = (int) -1, const_zero = (int) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* FormatTypeName */ +#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 +static __Pyx_TypeName +__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) +{ + PyObject *module = NULL, *name = NULL, *result = NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_qualname); + #else + name = PyType_GetQualName(tp); + #endif + if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; + module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, + __pyx_mstate_global->__pyx_n_u_module); + if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; + if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { + result = name; + name = NULL; + goto done; + } + result = PyUnicode_FromFormat("%U.%U", module, name); + if (unlikely(result == NULL)) goto bad; + done: + Py_XDECREF(name); + Py_XDECREF(module); + return result; + bad: + PyErr_Clear(); + if (name) { + result = name; + name = NULL; + } else { + result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4); + } + goto done; +} +#endif + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyLong_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#if defined(HAVE_LONG_LONG) && !CYTHON_COMPILING_IN_PYPY + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyLong_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + unsigned char *bytes = (unsigned char *)&value; +#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 + if (is_unsigned) { + return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); + } else { + return PyLong_FromNativeBytes(bytes, sizeof(value), -1); + } +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 + int one = 1; int little = (int)*(unsigned char *)&one; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); +#else + int one = 1; int little = (int)*(unsigned char *)&one; + PyObject *from_bytes, *result = NULL, *kwds = NULL; + PyObject *py_bytes = NULL, *order_str = NULL; + from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); + if (!from_bytes) return NULL; + py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); + if (!py_bytes) goto limited_bad; + order_str = PyUnicode_FromString(little ? "little" : "big"); + if (!order_str) goto limited_bad; + { + PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; + if (!is_unsigned) { + kwds = __Pyx_MakeVectorcallBuilderKwds(1); + if (!kwds) goto limited_bad; + if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; + } + result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); + } + limited_bad: + Py_XDECREF(kwds); + Py_XDECREF(order_str); + Py_XDECREF(py_bytes); + Py_XDECREF(from_bytes); + return result; +#endif + } +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const long neg_one = (long) -1, const_zero = (long) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (unlikely(!PyLong_Check(x))) { + long val; + PyObject *tmp = __Pyx_PyNumber_Long(x); + if (!tmp) return (long) -1; + val = __Pyx_PyLong_As_long(tmp); + Py_DECREF(tmp); + return val; + } + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + if (unlikely(__Pyx_PyLong_IsNeg(x))) { + goto raise_neg_overflow; + } else if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_DigitCount(x)) { + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if ((sizeof(long) <= sizeof(unsigned long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + if (__Pyx_PyLong_IsCompact(x)) { + __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) + } else { + const digit* digits = __Pyx_PyLong_Digits(x); + assert(__Pyx_PyLong_DigitCount(x) > 1); + switch (__Pyx_PyLong_SignedDigitCount(x)) { + case -2: + if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { + if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } + } +#endif + if ((sizeof(long) <= sizeof(long))) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { + long val; + int ret = -1; +#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API + Py_ssize_t bytes_copied = PyLong_AsNativeBytes( + x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); + if (unlikely(bytes_copied == -1)) { + } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { + goto raise_overflow; + } else { + ret = 0; + } +#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + ret = _PyLong_AsByteArray((PyLongObject *)x, + bytes, sizeof(val), + is_little, !is_unsigned); +#else + PyObject *v; + PyObject *stepval = NULL, *mask = NULL, *shift = NULL; + int bits, remaining_bits, is_negative = 0; + int chunk_size = (sizeof(long) < 8) ? 30 : 62; + if (likely(PyLong_CheckExact(x))) { + v = __Pyx_NewRef(x); + } else { + v = PyNumber_Long(x); + if (unlikely(!v)) return (long) -1; + assert(PyLong_CheckExact(v)); + } + { + int result = PyObject_RichCompareBool(v, Py_False, Py_LT); + if (unlikely(result < 0)) { + Py_DECREF(v); + return (long) -1; + } + is_negative = result == 1; + } + if (is_unsigned && unlikely(is_negative)) { + Py_DECREF(v); + goto raise_neg_overflow; + } else if (is_negative) { + stepval = PyNumber_Invert(v); + Py_DECREF(v); + if (unlikely(!stepval)) + return (long) -1; + } else { + stepval = v; + } + v = NULL; + val = (long) 0; + mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; + shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; + for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { + PyObject *tmp, *digit; + long idigit; + digit = PyNumber_And(stepval, mask); + if (unlikely(!digit)) goto done; + idigit = PyLong_AsLong(digit); + Py_DECREF(digit); + if (unlikely(idigit < 0)) goto done; + val |= ((long) idigit) << bits; + tmp = PyNumber_Rshift(stepval, shift); + if (unlikely(!tmp)) goto done; + Py_DECREF(stepval); stepval = tmp; + } + Py_DECREF(shift); shift = NULL; + Py_DECREF(mask); mask = NULL; + { + long idigit = PyLong_AsLong(stepval); + if (unlikely(idigit < 0)) goto done; + remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); + if (unlikely(idigit >= (1L << remaining_bits))) + goto raise_overflow; + val |= ((long) idigit) << bits; + } + if (!is_unsigned) { + if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) + goto raise_overflow; + if (is_negative) + val = ~val; + } + ret = 0; + done: + Py_XDECREF(shift); + Py_XDECREF(mask); + Py_XDECREF(stepval); +#endif + if (unlikely(ret)) + return (long) -1; + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (cls == a || cls == b) return 1; + mro = cls->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + PyObject *base = PyTuple_GET_ITEM(mro, i); + if (base == (PyObject *)a || base == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); +} +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + if (exc_type1) { + return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); + } else { + return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } +} +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); + for (i=0; i= 0x030b0000 + return Py_Version & ~0xFFUL; +#else + static unsigned long __Pyx_cached_runtime_version = 0; + if (__Pyx_cached_runtime_version == 0) { + const char* rt_version = Py_GetVersion(); + unsigned long version = 0; + unsigned long factor = 0x01000000UL; + unsigned int digit = 0; + int i = 0; + while (factor) { + while ('0' <= rt_version[i] && rt_version[i] <= '9') { + digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); + ++i; + } + version += factor * digit; + if (rt_version[i] != '.') + break; + digit = 0; + factor >>= 8; + ++i; + } + __Pyx_cached_runtime_version = version; + } + return __Pyx_cached_runtime_version; +#endif +} + +/* CheckBinaryVersion */ +static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { + const unsigned long MAJOR_MINOR = 0xFFFF0000UL; + if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) + return 0; + if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) + return 1; + { + char message[200]; + PyOS_snprintf(message, sizeof(message), + "compile time Python version %d.%d " + "of module '%.100s' " + "%s " + "runtime version %d.%d", + (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), + __Pyx_MODULE_NAME, + (allow_newer) ? "was newer than" : "does not match", + (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) + ); + return PyErr_WarnEx(NULL, message, 1); + } +} + +/* FunctionExport */ +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0) + goto bad; + } + tmp.fp = f; + cobj = PyCapsule_New(tmp.p, sig, 0); + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/* FunctionImport */ +#ifndef __PYX_HAVE_RT_ImportFunction_3_1_5 +#define __PYX_HAVE_RT_ImportFunction_3_1_5 +static int __Pyx_ImportFunction_3_1_5(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + d = PyObject_GetAttrString(module, "__pyx_capi__"); + if (!d) + goto bad; +#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) + PyDict_GetItemStringRef(d, funcname, &cobj); +#else + cobj = PyDict_GetItemString(d, funcname); + Py_XINCREF(cobj); +#endif + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + Py_DECREF(cobj); + return 0; +bad: + Py_XDECREF(d); + Py_XDECREF(cobj); + return -1; +} +#endif + +/* NewCodeObj */ +#if CYTHON_COMPILING_IN_LIMITED_API + static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyObject *exception_table = NULL; + PyObject *types_module=NULL, *code_type=NULL, *result=NULL; + #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 + PyObject *version_info; + PyObject *py_minor_version = NULL; + #endif + long minor_version = 0; + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 + minor_version = 11; + #else + if (!(version_info = PySys_GetObject("version_info"))) goto end; + if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; + minor_version = PyLong_AsLong(py_minor_version); + Py_DECREF(py_minor_version); + if (minor_version == -1 && PyErr_Occurred()) goto end; + #endif + if (!(types_module = PyImport_ImportModule("types"))) goto end; + if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; + if (minor_version <= 7) { + (void)p; + result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else if (minor_version <= 10) { + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, fline, lnos, fv, cell); + } else { + if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; + result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, + c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); + } + end: + Py_XDECREF(code_type); + Py_XDECREF(exception_table); + Py_XDECREF(types_module); + if (type) { + PyErr_Restore(type, value, traceback); + } + return result; + } +#elif PY_VERSION_HEX >= 0x030B0000 + static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + PyCodeObject *result; + result = + #if PY_VERSION_HEX >= 0x030C0000 + PyUnstable_Code_NewWithPosOnlyArgs + #else + PyCode_NewWithPosOnlyArgs + #endif + (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 + if (likely(result)) + result->_co_firsttraceable = 0; + #endif + return result; + } +#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif +static PyObject* __Pyx_PyCode_New( + const __Pyx_PyCode_New_function_description descr, + PyObject * const *varnames, + PyObject *filename, + PyObject *funcname, + const char *line_table, + PyObject *tuple_dedup_map +) { + PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; + Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; + PyObject *varnames_tuple = PyTuple_New(var_count); + if (unlikely(!varnames_tuple)) return NULL; + for (Py_ssize_t i=0; i < var_count; i++) { + Py_INCREF(varnames[i]); + if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; + } + #if CYTHON_COMPILING_IN_LIMITED_API + varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); + if (!varnames_tuple_dedup) { + if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; + varnames_tuple_dedup = varnames_tuple; + } + #else + varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); + if (unlikely(!varnames_tuple_dedup)) goto done; + #endif + #if CYTHON_AVOID_BORROWED_REFS + Py_INCREF(varnames_tuple_dedup); + #endif + if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL + && !CYTHON_COMPILING_IN_GRAAL) { + line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); + if (unlikely(!line_table_bytes)) goto done; + Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; + code_bytes = PyBytes_FromStringAndSize(NULL, code_len); + if (unlikely(!code_bytes)) goto done; + char* c_code_bytes = PyBytes_AsString(code_bytes); + if (unlikely(!c_code_bytes)) goto done; + memset(c_code_bytes, 0, (size_t) code_len); + } + code_obj = (PyObject*) __Pyx__PyCode_New( + (int) descr.argcount, + (int) descr.num_posonly_args, + (int) descr.num_kwonly_args, + (int) descr.nlocals, + 0, + (int) descr.flags, + code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + varnames_tuple_dedup, + __pyx_mstate_global->__pyx_empty_tuple, + __pyx_mstate_global->__pyx_empty_tuple, + filename, + funcname, + (int) descr.first_line, + (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table_bytes) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes + ); +done: + Py_XDECREF(code_bytes); + Py_XDECREF(line_table_bytes); + #if CYTHON_AVOID_BORROWED_REFS + Py_XDECREF(varnames_tuple_dedup); + #endif + Py_DECREF(varnames_tuple); + return code_obj; +} + +/* InitStrings */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { + while (t->s) { + PyObject *str; + if (t->is_unicode) { + if (t->intern) { + str = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); + } else { + str = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + str = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + if (!str) + return -1; + *target = str; + if (PyObject_Hash(str) == -1) + return -1; + ++t; + ++target; + } + return 0; +} + +#include +static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { + size_t len = strlen(s); + if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, "byte string is too long"); + return -1; + } + return (Py_ssize_t) len; +} +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return __Pyx_PyUnicode_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { + Py_ssize_t len = __Pyx_ssize_strlen(c_str); + if (unlikely(len < 0)) return NULL; + return PyByteArray_FromStringAndSize(c_str, len); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if CYTHON_COMPILING_IN_LIMITED_API + { + const char* result; + Py_ssize_t unicode_length; + CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 + if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; + #else + result = PyUnicode_AsUTF8AndSize(o, length); + #endif + #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + unicode_length = PyUnicode_GetLength(o); + if (unlikely(unicode_length < 0)) return NULL; + if (unlikely(unicode_length != *length)) { + PyUnicode_AsASCIIString(o); + return NULL; + } + #endif + return result; + } +#else +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +#endif +} +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 + if (PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif + if (PyByteArray_Check(o)) { +#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); +#else + *length = PyByteArray_Size(o); + if (*length == -1) return NULL; + return PyByteArray_AsString(o); +#endif + } else + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { + __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " + "The ability to return an instance of a strict subclass of int is deprecated, " + "and may be removed in a future version of Python.", + result_type_name)) { + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; + } + __Pyx_DECREF_TypeName(result_type_name); + return result; + } + PyErr_Format(PyExc_TypeError, + "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", + result_type_name); + __Pyx_DECREF_TypeName(result_type_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + PyObject *res = NULL; + if (likely(PyLong_Check(x))) + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + if (likely(m && m->nb_int)) { + res = m->nb_int(x); + } +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Long(x); + } +#endif + if (likely(res)) { + if (unlikely(!PyLong_CheckExact(res))) { + return __Pyx_PyNumber_LongWrongResultType(res); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(__Pyx_PyLong_IsCompact(b))) { + return __Pyx_PyLong_CompactValue(b); + } else { + const digit* digits = __Pyx_PyLong_Digits(b); + const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyLong_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyLong_AsLong(x); + Py_DECREF(x); + return ival; + } +} +static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { + CYTHON_UNUSED_VAR(b); + return __Pyx_NewRef(Py_None); +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { + return PyLong_FromSize_t(ival); +} +#if CYTHON_USE_PYLONG_INTERNALS +static CYTHON_INLINE int __Pyx_PyLong_CompactAsLong(PyObject *x, long *return_value) { + if (unlikely(!__Pyx_PyLong_IsCompact(x))) + return 0; + Py_ssize_t value = __Pyx_PyLong_CompactValue(x); + if ((sizeof(long) < sizeof(Py_ssize_t)) && unlikely(value != (long) value)) + return 0; + *return_value = (long) value; + return 1; +} +#endif + + +/* MultiPhaseInitModuleState */ +#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE +#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 +#else + #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 +#endif +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS +#error "Module state with PEP489 requires atomics. Currently that's one of\ + C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" +#endif +#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +#define __Pyx_ModuleStateLookup_Lock() +#define __Pyx_ModuleStateLookup_Unlock() +#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 +static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; +#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(__cplusplus) && __cplusplus >= 201103L +#include +static std::mutex __Pyx_ModuleStateLookup_mutex; +#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() +#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) +#include +static mtx_t __Pyx_ModuleStateLookup_mutex; +static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; +static void __Pyx_ModuleStateLookup_initialize_mutex(void) { + mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); +} +#define __Pyx_ModuleStateLookup_Lock()\ + call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ + mtx_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(HAVE_PTHREAD_H) +#include +static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; +#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) +#elif defined(_WIN32) +#include // synchapi.h on its own doesn't work +static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; +#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) +#else +#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ + Requires C standard >= C11, or C++ standard >= C++11,\ + or pthreads, or the Windows 32 API, or Python >= 3.13." +#endif +typedef struct { + int64_t id; + PyObject *module; +} __Pyx_InterpreterIdAndModule; +typedef struct { + char interpreter_id_as_index; + Py_ssize_t count; + Py_ssize_t allocated; + __Pyx_InterpreterIdAndModule table[1]; +} __Pyx_ModuleStateLookupData; +#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; +#endif +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; +#else +static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; +#endif +static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( + __Pyx_InterpreterIdAndModule* table, + Py_ssize_t count, + int64_t interpreterId) { + __Pyx_InterpreterIdAndModule* begin = table; + __Pyx_InterpreterIdAndModule* end = begin + count; + if (begin->id == interpreterId) { + return begin; + } + while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; + if (halfway->id == interpreterId) { + return halfway; + } + if (halfway->id < interpreterId) { + begin = halfway; + } else { + end = halfway; + } + } + for (; begin < end; ++begin) { + if (begin->id >= interpreterId) return begin; + } + return begin; +} +static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return NULL; +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + { + __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + if (likely(data)) { + __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); + if (likely(data == new_data)) { + goto read_finished; + } + } + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); + __Pyx_ModuleStateLookup_Lock(); + __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); + data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); + __Pyx_ModuleStateLookup_Unlock(); + } + read_finished:; +#else + __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_InterpreterIdAndModule* found = NULL; + if (unlikely(!data)) goto end; + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + found = data->table+interpreter_id; + } + } else { + found = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + } + end: + { + PyObject *result=NULL; + if (found && found->id == interpreter_id) { + result = found->module; + } +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); +#endif + return result; + } +} +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE +static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { + while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); +} +#else +#define __Pyx_ModuleStateLookup_wait_until_no_readers() +#endif +static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { + Py_ssize_t to_allocate = (*old_data)->allocated; + while (to_allocate <= interpreter_id) { + if (to_allocate == 0) to_allocate = 1; + else to_allocate *= 2; + } + __Pyx_ModuleStateLookupData *new_data = *old_data; + if (to_allocate != (*old_data)->allocated) { + new_data = (__Pyx_ModuleStateLookupData *)realloc( + *old_data, + sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + PyErr_NoMemory(); + return -1; + } + for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { + new_data->table[i].id = i; + new_data->table[i].module = NULL; + } + new_data->allocated = to_allocate; + } + new_data->table[interpreter_id].module = module; + if (new_data->count < interpreter_id+1) { + new_data->count = interpreter_id+1; + } + *old_data = new_data; + return 0; +} +static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { + __Pyx_InterpreterIdAndModule *read = data->table; + __Pyx_InterpreterIdAndModule *write = data->table; + __Pyx_InterpreterIdAndModule *end = read + data->count; + for (; readmodule) { + write->id = read->id; + write->module = read->module; + ++write; + } + } + data->count = write - data->table; + for (; writeid = 0; + write->module = NULL; + } + data->interpreter_id_as_index = 0; +} +static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + int result = 0; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; +#endif + __Pyx_ModuleStateLookupData *new_data = old_data; + if (!new_data) { + new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); + if (!new_data) { + result = -1; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = 1; + new_data->interpreter_id_as_index = 1; + } + __Pyx_ModuleStateLookup_wait_until_no_readers(); + if (new_data->interpreter_id_as_index) { + if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { + result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); + goto end; + } + __Pyx_State_ConvertFromInterpIdAsIndex(new_data); + } + { + Py_ssize_t insert_at = 0; + { + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + new_data->table, new_data->count, interpreter_id); + assert(lower_bound); + insert_at = lower_bound - new_data->table; + if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { + lower_bound->module = module; + goto end; // already in table, nothing more to do + } + } + if (new_data->count+1 >= new_data->allocated) { + Py_ssize_t to_allocate = (new_data->count+1)*2; + new_data = + (__Pyx_ModuleStateLookupData*)realloc( + new_data, + sizeof(__Pyx_ModuleStateLookupData) + + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); + if (!new_data) { + result = -1; + new_data = old_data; + PyErr_NoMemory(); + goto end; + } + new_data->allocated = to_allocate; + } + ++new_data->count; + int64_t last_id = interpreter_id; + PyObject *last_module = module; + for (Py_ssize_t i=insert_at; icount; ++i) { + int64_t current_id = new_data->table[i].id; + new_data->table[i].id = last_id; + last_id = current_id; + PyObject *current_module = new_data->table[i].module; + new_data->table[i].module = last_module; + last_module = current_module; + } + } + end: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); +#else + __Pyx_ModuleStateLookup_data = new_data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return result; +} +static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { + int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); + if (interpreter_id == -1) return -1; + __Pyx_ModuleStateLookup_Lock(); +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); +#else + __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; +#endif + if (data->interpreter_id_as_index) { + if (interpreter_id < data->count) { + data->table[interpreter_id].module = NULL; + } + goto done; + } + { + __Pyx_ModuleStateLookup_wait_until_no_readers(); + __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( + data->table, data->count, interpreter_id); + if (!lower_bound) goto done; + if (lower_bound->id != interpreter_id) goto done; + __Pyx_InterpreterIdAndModule *end = data->table+data->count; + for (;lower_boundid = (lower_bound+1)->id; + lower_bound->module = (lower_bound+1)->module; + } + } + --data->count; + if (data->count == 0) { + free(data); + data = NULL; + } + done: +#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE + __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); +#else + __Pyx_ModuleStateLookup_data = data; +#endif + __Pyx_ModuleStateLookup_Unlock(); + return 0; +} +#endif + +/* #### Code section: utility_code_pragmas_end ### */ +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + + + +/* #### Code section: end ### */ +#endif /* Py_PYTHON_H */ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd new file mode 100644 index 0000000000000000000000000000000000000000..1b3bb6fdf6651ff6d859bd2607e2f3e8c757fdac --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pxd @@ -0,0 +1,41 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +from libc.stdint cimport intptr_t + +from .cynvvm cimport * + + +############################################################################### +# Types +############################################################################### + +ctypedef nvvmProgram Program + + +############################################################################### +# Enum +############################################################################### + +ctypedef nvvmResult _Result + + +############################################################################### +# Functions +############################################################################### + +cpdef str get_error_string(int result) +cpdef tuple version() +cpdef tuple ir_version() +cpdef intptr_t create_program() except? 0 +cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name) +cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name) +cpdef compile_program(intptr_t prog, int num_options, options) +cpdef verify_program(intptr_t prog, int num_options, options) +cpdef size_t get_compiled_result_size(intptr_t prog) except? 0 +cpdef get_compiled_result(intptr_t prog, buffer) +cpdef size_t get_program_log_size(intptr_t prog) except? 0 +cpdef get_program_log(intptr_t prog, buffer) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pyx new file mode 100644 index 0000000000000000000000000000000000000000..5c03f2a698e4915bc8d2629008dec103ef139c86 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/nvvm.pyx @@ -0,0 +1,297 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +# +# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly. + +cimport cython # NOQA + +from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, + nested_resource) + +from enum import IntEnum as _IntEnum + + +############################################################################### +# Enum +############################################################################### + +class Result(_IntEnum): + """See `nvvmResult`.""" + SUCCESS = NVVM_SUCCESS + ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY + ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE + ERROR_IR_VERSION_MISMATCH = NVVM_ERROR_IR_VERSION_MISMATCH + ERROR_INVALID_INPUT = NVVM_ERROR_INVALID_INPUT + ERROR_INVALID_PROGRAM = NVVM_ERROR_INVALID_PROGRAM + ERROR_INVALID_IR = NVVM_ERROR_INVALID_IR + ERROR_INVALID_OPTION = NVVM_ERROR_INVALID_OPTION + ERROR_NO_MODULE_IN_PROGRAM = NVVM_ERROR_NO_MODULE_IN_PROGRAM + ERROR_COMPILATION = NVVM_ERROR_COMPILATION + ERROR_CANCELLED = NVVM_ERROR_CANCELLED + + +############################################################################### +# Error handling +############################################################################### + +class nvvmError(Exception): + + def __init__(self, status): + self.status = status + s = Result(status) + cdef str err = f"{s.name} ({s.value})" + super(nvvmError, self).__init__(err) + + def __reduce__(self): + return (type(self), (self.status,)) + + +@cython.profile(False) +cdef int check_status(int status) except 1 nogil: + if status != 0: + with gil: + raise nvvmError(status) + return status + + +############################################################################### +# Wrapper functions +############################################################################### + +cpdef destroy_program(intptr_t prog): + """Destroy a program. + + Args: + prog (intptr_t): nvvm prog. + + .. seealso:: `nvvmDestroyProgram` + """ + cdef Program p = prog + with nogil: + status = nvvmDestroyProgram(&p) + check_status(status) + + +cpdef str get_error_string(int result): + """Get the message string for the given ``nvvmResult`` code. + + Args: + result (Result): NVVM API result code. + + .. seealso:: `nvvmGetErrorString` + """ + cdef bytes _output_ + _output_ = nvvmGetErrorString(<_Result>result) + return _output_.decode() + + +cpdef tuple version(): + """Get the NVVM version. + + Returns: + A 2-tuple containing: + + - int: NVVM major version number. + - int: NVVM minor version number. + + .. seealso:: `nvvmVersion` + """ + cdef int major + cdef int minor + with nogil: + status = nvvmVersion(&major, &minor) + check_status(status) + return (major, minor) + + +cpdef tuple ir_version(): + """Get the NVVM IR version. + + Returns: + A 4-tuple containing: + + - int: NVVM IR major version number. + - int: NVVM IR minor version number. + - int: NVVM IR debug metadata major version number. + - int: NVVM IR debug metadata minor version number. + + .. seealso:: `nvvmIRVersion` + """ + cdef int major_ir + cdef int minor_ir + cdef int major_dbg + cdef int minor_dbg + with nogil: + status = nvvmIRVersion(&major_ir, &minor_ir, &major_dbg, &minor_dbg) + check_status(status) + return (major_ir, minor_ir, major_dbg, minor_dbg) + + +cpdef intptr_t create_program() except? 0: + """Create a program, and set the value of its handle to ``*prog``. + + Returns: + intptr_t: NVVM program. + + .. seealso:: `nvvmCreateProgram` + """ + cdef Program prog + with nogil: + status = nvvmCreateProgram(&prog) + check_status(status) + return prog + + +cpdef add_module_to_program(intptr_t prog, buffer, size_t size, name): + """Add a module level NVVM IR to a program. + + Args: + prog (intptr_t): NVVM program. + buffer (bytes): NVVM IR module in the bitcode or text representation. + size (size_t): Size of the NVVM IR module. + name (str): Name of the NVVM IR module. If NULL, "" is used as the name. + + .. seealso:: `nvvmAddModuleToProgram` + """ + cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + if not isinstance(name, str): + raise TypeError("name must be a Python str") + cdef bytes _temp_name_ = (name).encode() + cdef char* _name_ = _temp_name_ + with nogil: + status = nvvmAddModuleToProgram(prog, _buffer_, size, _name_) + check_status(status) + + +cpdef lazy_add_module_to_program(intptr_t prog, buffer, size_t size, name): + """Add a module level NVVM IR to a program. + + Args: + prog (intptr_t): NVVM program. + buffer (bytes): NVVM IR module in the bitcode representation. + size (size_t): Size of the NVVM IR module. + name (str): Name of the NVVM IR module. If NULL, "" is used as the name. + + .. seealso:: `nvvmLazyAddModuleToProgram` + """ + cdef void* _buffer_ = get_buffer_pointer(buffer, size, readonly=True) + if not isinstance(name, str): + raise TypeError("name must be a Python str") + cdef bytes _temp_name_ = (name).encode() + cdef char* _name_ = _temp_name_ + with nogil: + status = nvvmLazyAddModuleToProgram(prog, _buffer_, size, _name_) + check_status(status) + + +cpdef compile_program(intptr_t prog, int num_options, options): + """Compile the NVVM program. + + Args: + prog (intptr_t): NVVM program. + num_options (int): Number of compiler ``options`` passed. + options (object): Compiler options in the form of C string array. It can be: + + - an :class:`int` as the pointer address to the nested sequence, or + - a Python sequence of :class:`int`\s, each of which is a pointer address + to a valid sequence of 'char', or + - a nested Python sequence of ``str``. + + + .. seealso:: `nvvmCompileProgram` + """ + cdef nested_resource[ char ] _options_ + get_nested_resource_ptr[char](_options_, options, NULL) + with nogil: + status = nvvmCompileProgram(prog, num_options, (_options_.ptrs.data())) + check_status(status) + + +cpdef verify_program(intptr_t prog, int num_options, options): + """Verify the NVVM program. + + Args: + prog (intptr_t): NVVM program. + num_options (int): Number of compiler ``options`` passed. + options (object): Compiler options in the form of C string array. It can be: + + - an :class:`int` as the pointer address to the nested sequence, or + - a Python sequence of :class:`int`\s, each of which is a pointer address + to a valid sequence of 'char', or + - a nested Python sequence of ``str``. + + + .. seealso:: `nvvmVerifyProgram` + """ + cdef nested_resource[ char ] _options_ + get_nested_resource_ptr[char](_options_, options, NULL) + with nogil: + status = nvvmVerifyProgram(prog, num_options, (_options_.ptrs.data())) + check_status(status) + + +cpdef size_t get_compiled_result_size(intptr_t prog) except? 0: + """Get the size of the compiled result. + + Args: + prog (intptr_t): NVVM program. + + Returns: + size_t: Size of the compiled result (including the trailing NULL). + + .. seealso:: `nvvmGetCompiledResultSize` + """ + cdef size_t buffer_size_ret + with nogil: + status = nvvmGetCompiledResultSize(prog, &buffer_size_ret) + check_status(status) + return buffer_size_ret + + +cpdef get_compiled_result(intptr_t prog, buffer): + """Get the compiled result. + + Args: + prog (intptr_t): NVVM program. + buffer (bytes): Compiled result. + + .. seealso:: `nvvmGetCompiledResult` + """ + cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + with nogil: + status = nvvmGetCompiledResult(prog, _buffer_) + check_status(status) + + +cpdef size_t get_program_log_size(intptr_t prog) except? 0: + """Get the Size of Compiler/Verifier Message. + + Args: + prog (intptr_t): NVVM program. + + Returns: + size_t: Size of the compilation/verification log (including the trailing NULL). + + .. seealso:: `nvvmGetProgramLogSize` + """ + cdef size_t buffer_size_ret + with nogil: + status = nvvmGetProgramLogSize(prog, &buffer_size_ret) + check_status(status) + return buffer_size_ret + + +cpdef get_program_log(intptr_t prog, buffer): + """Get the Compiler/Verifier Message. + + Args: + prog (intptr_t): NVVM program. + buffer (bytes): Compilation/Verification log. + + .. seealso:: `nvvmGetProgramLog` + """ + cdef void* _buffer_ = get_buffer_pointer(buffer, -1, readonly=False) + with nogil: + status = nvvmGetProgramLog(prog, _buffer_) + check_status(status) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pxd b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pxd new file mode 100644 index 0000000000000000000000000000000000000000..310577f87f6bbe7af2dafb35739bd8a4c4c2773c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pxd @@ -0,0 +1,3483 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +cimport cuda.bindings.cyruntime as cyruntime + +include "_lib/utils.pxd" +cimport cuda.bindings.driver as driver + +cdef class cudaArray_t: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaArray_t _pvt_val + cdef cyruntime.cudaArray_t* _pvt_ptr + +cdef class cudaArray_const_t: + """ + + CUDA array (as source copy argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaArray_const_t _pvt_val + cdef cyruntime.cudaArray_const_t* _pvt_ptr + +cdef class cudaMipmappedArray_t: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaMipmappedArray_t _pvt_val + cdef cyruntime.cudaMipmappedArray_t* _pvt_ptr + +cdef class cudaMipmappedArray_const_t: + """ + + CUDA mipmapped array (as source argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaMipmappedArray_const_t _pvt_val + cdef cyruntime.cudaMipmappedArray_const_t* _pvt_ptr + +cdef class cudaGraphicsResource_t: + """ + + CUDA graphics resource types + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphicsResource_t _pvt_val + cdef cyruntime.cudaGraphicsResource_t* _pvt_ptr + +cdef class cudaExternalMemory_t: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaExternalMemory_t _pvt_val + cdef cyruntime.cudaExternalMemory_t* _pvt_ptr + +cdef class cudaExternalSemaphore_t: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaExternalSemaphore_t _pvt_val + cdef cyruntime.cudaExternalSemaphore_t* _pvt_ptr + +cdef class cudaKernel_t: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaKernel_t _pvt_val + cdef cyruntime.cudaKernel_t* _pvt_ptr + +cdef class cudaLibrary_t: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLibrary_t _pvt_val + cdef cyruntime.cudaLibrary_t* _pvt_ptr + +cdef class cudaGraphDeviceNode_t: + """ + + CUDA device node handle for device-side node update + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphDeviceNode_t _pvt_val + cdef cyruntime.cudaGraphDeviceNode_t* _pvt_ptr + +cdef class cudaAsyncCallbackHandle_t: + """ + + CUDA async callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaAsyncCallbackHandle_t _pvt_val + cdef cyruntime.cudaAsyncCallbackHandle_t* _pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLImageKHR _pvt_val + cdef cyruntime.EGLImageKHR* _pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLStreamKHR _pvt_val + cdef cyruntime.EGLStreamKHR* _pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLSyncKHR _pvt_val + cdef cyruntime.EGLSyncKHR* _pvt_ptr + +cdef class cudaHostFn_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaHostFn_t _pvt_val + cdef cyruntime.cudaHostFn_t* _pvt_ptr + +cdef class cudaAsyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaAsyncCallback _pvt_val + cdef cyruntime.cudaAsyncCallback* _pvt_ptr + +cdef class cudaStreamCallback_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaStreamCallback_t _pvt_val + cdef cyruntime.cudaStreamCallback_t* _pvt_ptr + +cdef class dim3: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.dim3 _pvt_val + cdef cyruntime.dim3* _pvt_ptr + +cdef class cudaChannelFormatDesc: + """ + CUDA Channel format descriptor + + Attributes + ---------- + x : int + x + y : int + y + z : int + z + w : int + w + f : cudaChannelFormatKind + Channel format kind + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaChannelFormatDesc _pvt_val + cdef cyruntime.cudaChannelFormatDesc* _pvt_ptr + +cdef class anon_struct0: + """ + Attributes + ---------- + width : unsigned int + + height : unsigned int + + depth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr + +cdef class cudaArraySparseProperties: + """ + Sparse CUDA array and CUDA mipmapped array properties + + Attributes + ---------- + tileExtent : anon_struct0 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or cudaArraySparsePropertiesSingleMipTail + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArraySparseProperties _pvt_val + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr + cdef anon_struct0 _tileExtent + +cdef class cudaArrayMemoryRequirements: + """ + CUDA array and CUDA mipmapped array memory requirements + + Attributes + ---------- + size : size_t + Total size of the array. + alignment : size_t + Alignment necessary for mapping the array. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaArrayMemoryRequirements _pvt_val + cdef cyruntime.cudaArrayMemoryRequirements* _pvt_ptr + +cdef class cudaPitchedPtr: + """ + CUDA Pitched memory pointer ::make_cudaPitchedPtr + + Attributes + ---------- + ptr : Any + Pointer to allocated memory + pitch : size_t + Pitch of allocated memory in bytes + xsize : size_t + Logical width of allocation in elements + ysize : size_t + Logical height of allocation in elements + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPitchedPtr _pvt_val + cdef cyruntime.cudaPitchedPtr* _pvt_ptr + +cdef class cudaExtent: + """ + CUDA extent ::make_cudaExtent + + Attributes + ---------- + width : size_t + Width in elements when referring to array memory, in bytes when + referring to linear memory + height : size_t + Height in elements + depth : size_t + Depth in elements + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExtent _pvt_val + cdef cyruntime.cudaExtent* _pvt_ptr + +cdef class cudaPos: + """ + CUDA 3D position ::make_cudaPos + + Attributes + ---------- + x : size_t + x + y : size_t + y + z : size_t + z + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPos _pvt_val + cdef cyruntime.cudaPos* _pvt_ptr + +cdef class cudaMemcpy3DParms: + """ + CUDA 3D memory copying parameters + + Attributes + ---------- + srcArray : cudaArray_t + Source memory address + srcPos : cudaPos + Source position offset + srcPtr : cudaPitchedPtr + Pitched source memory address + dstArray : cudaArray_t + Destination memory address + dstPos : cudaPos + Destination position offset + dstPtr : cudaPitchedPtr + Pitched destination memory address + extent : cudaExtent + Requested memory copy size + kind : cudaMemcpyKind + Type of transfer + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DParms _pvt_val + cdef cyruntime.cudaMemcpy3DParms* _pvt_ptr + cdef cudaArray_t _srcArray + cdef cudaPos _srcPos + cdef cudaPitchedPtr _srcPtr + cdef cudaArray_t _dstArray + cdef cudaPos _dstPos + cdef cudaPitchedPtr _dstPtr + cdef cudaExtent _extent + +cdef class cudaMemcpyNodeParams: + """ + Memcpy node parameters + + Attributes + ---------- + flags : int + Must be zero + reserved : list[int] + Must be zero + copyParams : cudaMemcpy3DParms + Parameters for the memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpyNodeParams _pvt_val + cdef cyruntime.cudaMemcpyNodeParams* _pvt_ptr + cdef cudaMemcpy3DParms _copyParams + +cdef class cudaMemcpy3DPeerParms: + """ + CUDA 3D cross-device memory copying parameters + + Attributes + ---------- + srcArray : cudaArray_t + Source memory address + srcPos : cudaPos + Source position offset + srcPtr : cudaPitchedPtr + Pitched source memory address + srcDevice : int + Source device + dstArray : cudaArray_t + Destination memory address + dstPos : cudaPos + Destination position offset + dstPtr : cudaPitchedPtr + Pitched destination memory address + dstDevice : int + Destination device + extent : cudaExtent + Requested memory copy size + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DPeerParms _pvt_val + cdef cyruntime.cudaMemcpy3DPeerParms* _pvt_ptr + cdef cudaArray_t _srcArray + cdef cudaPos _srcPos + cdef cudaPitchedPtr _srcPtr + cdef cudaArray_t _dstArray + cdef cudaPos _dstPos + cdef cudaPitchedPtr _dstPtr + cdef cudaExtent _extent + +cdef class cudaMemsetParams: + """ + CUDA Memset node parameters + + Attributes + ---------- + dst : Any + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemsetParams _pvt_val + cdef cyruntime.cudaMemsetParams* _pvt_ptr + +cdef class cudaMemsetParamsV2: + """ + CUDA Memset node parameters + + Attributes + ---------- + dst : Any + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemsetParamsV2 _pvt_val + cdef cyruntime.cudaMemsetParamsV2* _pvt_ptr + +cdef class cudaAccessPolicyWindow: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + Partition into many segments and assign segments such that. sum of + "hit segments" / window == approx. ratio. sum of "miss segments" / + window == approx 1-ratio. Segments and ratio specifications are + fitted to the capabilities of the architecture. Accesses in a hit + segment apply the hitProp access policy. Accesses in a miss segment + apply the missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : cudaAccessProperty + ::CUaccessProperty set for hit. + missProp : cudaAccessProperty + ::CUaccessProperty set for miss. Must be either NORMAL or + STREAMING. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAccessPolicyWindow _pvt_val + cdef cyruntime.cudaAccessPolicyWindow* _pvt_ptr + +cdef class cudaHostNodeParams: + """ + CUDA host node parameters + + Attributes + ---------- + fn : cudaHostFn_t + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaHostNodeParams _pvt_val + cdef cyruntime.cudaHostNodeParams* _pvt_ptr + cdef cudaHostFn_t _fn + +cdef class cudaHostNodeParamsV2: + """ + CUDA host node parameters + + Attributes + ---------- + fn : cudaHostFn_t + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaHostNodeParamsV2 _pvt_val + cdef cyruntime.cudaHostNodeParamsV2* _pvt_ptr + cdef cudaHostFn_t _fn + +cdef class anon_struct1: + """ + Attributes + ---------- + array : cudaArray_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef cudaArray_t _array + +cdef class anon_struct2: + """ + Attributes + ---------- + mipmap : cudaMipmappedArray_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef cudaMipmappedArray_t _mipmap + +cdef class anon_struct3: + """ + Attributes + ---------- + devPtr : Any + + desc : cudaChannelFormatDesc + + sizeInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef cudaChannelFormatDesc _desc + +cdef class anon_struct4: + """ + Attributes + ---------- + devPtr : Any + + desc : cudaChannelFormatDesc + + width : size_t + + height : size_t + + pitchInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef cudaChannelFormatDesc _desc + +cdef class anon_union0: + """ + Attributes + ---------- + array : anon_struct1 + + mipmap : anon_struct2 + + linear : anon_struct3 + + pitch2D : anon_struct4 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef anon_struct1 _array + cdef anon_struct2 _mipmap + cdef anon_struct3 _linear + cdef anon_struct4 _pitch2D + +cdef class cudaResourceDesc: + """ + CUDA resource descriptor + + Attributes + ---------- + resType : cudaResourceType + Resource type + res : anon_union0 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceDesc* _val_ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + cdef anon_union0 _res + +cdef class cudaResourceViewDesc: + """ + CUDA resource view descriptor + + Attributes + ---------- + format : cudaResourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaResourceViewDesc _pvt_val + cdef cyruntime.cudaResourceViewDesc* _pvt_ptr + +cdef class cudaPointerAttributes: + """ + CUDA pointer attributes + + Attributes + ---------- + type : cudaMemoryType + The type of memory - cudaMemoryTypeUnregistered, + cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged. + device : int + The device against which the memory was allocated or registered. If + the memory type is cudaMemoryTypeDevice then this identifies the + device on which the memory referred physically resides. If the + memory type is cudaMemoryTypeHost or::cudaMemoryTypeManaged then + this identifies the device which was current when the memory was + allocated or registered (and if that device is deinitialized then + this allocation will vanish with that device's state). + devicePointer : Any + The address which may be dereferenced on the current device to + access the memory or NULL if no such address exists. + hostPointer : Any + The address which may be dereferenced on the host to access the + memory or NULL if no such address exists. CUDA doesn't check if + unregistered memory is allocated so this field may contain invalid + pointer if an invalid pointer has been passed to CUDA. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaPointerAttributes _pvt_val + cdef cyruntime.cudaPointerAttributes* _pvt_ptr + +cdef class cudaFuncAttributes: + """ + CUDA function attributes + + Attributes + ---------- + sharedSizeBytes : size_t + The size in bytes of statically-allocated shared memory per block + required by this function. This does not include dynamically- + allocated shared memory requested by the user at runtime. + constSizeBytes : size_t + The size in bytes of user-allocated constant memory required by + this function. + localSizeBytes : size_t + The size in bytes of local memory used by each thread of this + function. + maxThreadsPerBlock : int + The maximum number of threads per block, beyond which a launch of + the function would fail. This number depends on both the function + and the device on which the function is currently loaded. + numRegs : int + The number of registers used by each thread of this function. + ptxVersion : int + The PTX virtual architecture version for which the function was + compiled. This value is the major PTX version * 10 + the minor PTX + version, so a PTX version 1.3 function would return the value 13. + binaryVersion : int + The binary architecture version for which the function was + compiled. This value is the major binary version * 10 + the minor + binary version, so a binary version 1.3 function would return the + value 13. + cacheModeCA : int + The attribute to indicate whether the function has been compiled + with user specified option "-Xptxas --dlcm=ca" set. + maxDynamicSharedSizeBytes : int + The maximum size in bytes of dynamic shared memory per block for + this function. Any launch must have a dynamic shared memory size + smaller than this value. + preferredShmemCarveout : int + On devices where the L1 cache and shared memory use the same + hardware resources, this sets the shared memory carveout + preference, in percent of the maximum shared memory. Refer to + cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, + and the driver can choose a different ratio if required to execute + the function. See cudaFuncSetAttribute + clusterDimMustBeSet : int + If this attribute is set, the kernel must launch with a valid + cluster dimension specified. + requiredClusterWidth : int + The required cluster width/height/depth in blocks. The values must + either all be 0 or all be positive. The validity of the cluster + dimensions is otherwise checked at launch time. If the value is + set during compile time, it cannot be set at runtime. Setting it at + runtime should return cudaErrorNotPermitted. See + cudaFuncSetAttribute + requiredClusterHeight : int + + requiredClusterDepth : int + + clusterSchedulingPolicyPreference : int + The block scheduling policy of a function. See cudaFuncSetAttribute + nonPortableClusterSizeAllowed : int + Whether the function can be launched with non-portable cluster + size. 1 is allowed, 0 is disallowed. A non-portable cluster size + may only function on the specific SKUs the program is tested on. + The launch might fail if the program is run on a different hardware + platform. CUDA API provides cudaOccupancyMaxActiveClusters to + assist with checking whether the desired size can be launched on + the current device. Portable Cluster Size A portable cluster size + is guaranteed to be functional on all compute capabilities higher + than the target compute capability. The portable cluster size for + sm_90 is 8 blocks per cluster. This value may increase for future + compute capabilities. The specific hardware unit may support + higher cluster sizes that’s not guaranteed to be portable. See + cudaFuncSetAttribute + reserved : list[int] + Reserved for future use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaFuncAttributes _pvt_val + cdef cyruntime.cudaFuncAttributes* _pvt_ptr + +cdef class cudaMemLocation: + """ + Specifies a memory location. To specify a gpu, set type = + cudaMemLocationTypeDevice and set id = the gpu's device ordinal. To + specify a cpu NUMA node, set type = cudaMemLocationTypeHostNuma and + set id = host NUMA node id. + + Attributes + ---------- + type : cudaMemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's ::CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemLocation _pvt_val + cdef cyruntime.cudaMemLocation* _pvt_ptr + +cdef class cudaMemAccessDesc: + """ + Memory access descriptor + + Attributes + ---------- + location : cudaMemLocation + Location on which the request is to change it's accessibility + flags : cudaMemAccessFlags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAccessDesc _pvt_val + cdef cyruntime.cudaMemAccessDesc* _pvt_ptr + cdef cudaMemLocation _location + +cdef class cudaMemPoolProps: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : cudaMemAllocationType + Allocation type. Currently must be specified as + cudaMemAllocationTypePinned + handleTypes : cudaMemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : cudaMemLocation + Location allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + cudaMemHandleTypeWin32 is specified. This security attribute + defines the scope of which exported allocations may be tranferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemPoolProps _pvt_val + cdef cyruntime.cudaMemPoolProps* _pvt_ptr + cdef cudaMemLocation _location + +cdef class cudaMemPoolPtrExportData: + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemPoolPtrExportData _pvt_val + cdef cyruntime.cudaMemPoolPtrExportData* _pvt_ptr + +cdef class cudaMemAllocNodeParams: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + accessDescCount : size_t + in: Number of `accessDescs`s + bytesize : size_t + in: size in bytes of the requested allocation + dptr : Any + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAllocNodeParams _pvt_val + cdef cyruntime.cudaMemAllocNodeParams* _pvt_ptr + cdef cudaMemPoolProps _poolProps + cdef size_t _accessDescs_length + cdef cyruntime.cudaMemAccessDesc* _accessDescs + +cdef class cudaMemAllocNodeParamsV2: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + accessDescCount : size_t + in: Number of `accessDescs`s + bytesize : size_t + in: size in bytes of the requested allocation + dptr : Any + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemAllocNodeParamsV2 _pvt_val + cdef cyruntime.cudaMemAllocNodeParamsV2* _pvt_ptr + cdef cudaMemPoolProps _poolProps + cdef size_t _accessDescs_length + cdef cyruntime.cudaMemAccessDesc* _accessDescs + +cdef class cudaMemFreeNodeParams: + """ + Memory free node parameters + + Attributes + ---------- + dptr : Any + in: the pointer to free + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemFreeNodeParams _pvt_val + cdef cyruntime.cudaMemFreeNodeParams* _pvt_ptr + +cdef class cudaMemcpyAttributes: + """ + Attributes specific to copies within a batch. For more details on + usage see cudaMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : cudaMemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : cudaMemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See + cudaMemcpyFlags. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpyAttributes _pvt_val + cdef cyruntime.cudaMemcpyAttributes* _pvt_ptr + cdef cudaMemLocation _srcLocHint + cdef cudaMemLocation _dstLocHint + +cdef class cudaOffset3D: + """ + Struct representing offset into a cudaArray_t in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaOffset3D _pvt_val + cdef cyruntime.cudaOffset3D* _pvt_ptr + +cdef class anon_struct5: + """ + Attributes + ---------- + ptr : Any + + rowLength : size_t + + layerHeight : size_t + + locHint : cudaMemLocation + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + cdef cudaMemLocation _locHint + +cdef class anon_struct6: + """ + Attributes + ---------- + array : cudaArray_t + + offset : cudaOffset3D + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + cdef cudaArray_t _array + cdef cudaOffset3D _offset + +cdef class anon_union1: + """ + Attributes + ---------- + ptr : anon_struct5 + + array : anon_struct6 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + cdef anon_struct5 _ptr + cdef anon_struct6 _array + +cdef class cudaMemcpy3DOperand: + """ + Struct representing an operand for copy with cudaMemcpy3DBatchAsync + + Attributes + ---------- + type : cudaMemcpy3DOperandType + + op : anon_union1 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _val_ptr + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + cdef anon_union1 _op + +cdef class cudaMemcpy3DBatchOp: + """ + Attributes + ---------- + src : cudaMemcpy3DOperand + Source memcpy operand. + dst : cudaMemcpy3DOperand + Destination memcpy operand. + extent : cudaExtent + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copy from src to dst. See cudaMemcpyFlags. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DBatchOp _pvt_val + cdef cyruntime.cudaMemcpy3DBatchOp* _pvt_ptr + cdef cudaMemcpy3DOperand _src + cdef cudaMemcpy3DOperand _dst + cdef cudaExtent _extent + +cdef class CUuuid_st: + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.CUuuid_st _pvt_val + cdef cyruntime.CUuuid_st* _pvt_ptr + +cdef class cudaDeviceProp: + """ + CUDA device properties + + Attributes + ---------- + name : bytes + ASCII string identifying device + uuid : cudaUUID_t + 16-byte unique identifier + luid : bytes + 8-byte locally unique identifier. Value is undefined on TCC and + non-Windows platforms + luidDeviceNodeMask : unsigned int + LUID device node mask. Value is undefined on TCC and non-Windows + platforms + totalGlobalMem : size_t + Global memory available on device in bytes + sharedMemPerBlock : size_t + Shared memory available per block in bytes + regsPerBlock : int + 32-bit registers available per block + warpSize : int + Warp size in threads + memPitch : size_t + Maximum pitch in bytes allowed by memory copies + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + clockRate : int + Deprecated, Clock frequency in kilohertz + totalConstMem : size_t + Constant memory available on device in bytes + major : int + Major compute capability + minor : int + Minor compute capability + textureAlignment : size_t + Alignment requirement for textures + texturePitchAlignment : size_t + Pitch alignment requirement for texture references bound to pitched + memory + deviceOverlap : int + Device can concurrently copy memory and execute a kernel. + Deprecated. Use instead asyncEngineCount. + multiProcessorCount : int + Number of multiprocessors on device + kernelExecTimeoutEnabled : int + Deprecated, Specified whether there is a run time limit on kernels + integrated : int + Device is integrated as opposed to discrete + canMapHostMemory : int + Device can map host memory with + cudaHostAlloc/cudaHostGetDevicePointer + computeMode : int + Deprecated, Compute mode (See cudaComputeMode) + maxTexture1D : int + Maximum 1D texture size + maxTexture1DMipmap : int + Maximum 1D mipmapped texture size + maxTexture1DLinear : int + Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() + or cuDeviceGetTexture1DLinearMaxWidth() instead. + maxTexture2D : list[int] + Maximum 2D texture dimensions + maxTexture2DMipmap : list[int] + Maximum 2D mipmapped texture dimensions + maxTexture2DLinear : list[int] + Maximum dimensions (width, height, pitch) for 2D textures bound to + pitched memory + maxTexture2DGather : list[int] + Maximum 2D texture dimensions if texture gather operations have to + be performed + maxTexture3D : list[int] + Maximum 3D texture dimensions + maxTexture3DAlt : list[int] + Maximum alternate 3D texture dimensions + maxTextureCubemap : int + Maximum Cubemap texture dimensions + maxTexture1DLayered : list[int] + Maximum 1D layered texture dimensions + maxTexture2DLayered : list[int] + Maximum 2D layered texture dimensions + maxTextureCubemapLayered : list[int] + Maximum Cubemap layered texture dimensions + maxSurface1D : int + Maximum 1D surface size + maxSurface2D : list[int] + Maximum 2D surface dimensions + maxSurface3D : list[int] + Maximum 3D surface dimensions + maxSurface1DLayered : list[int] + Maximum 1D layered surface dimensions + maxSurface2DLayered : list[int] + Maximum 2D layered surface dimensions + maxSurfaceCubemap : int + Maximum Cubemap surface dimensions + maxSurfaceCubemapLayered : list[int] + Maximum Cubemap layered surface dimensions + surfaceAlignment : size_t + Alignment requirements for surfaces + concurrentKernels : int + Device can possibly execute multiple kernels concurrently + ECCEnabled : int + Device has ECC support enabled + pciBusID : int + PCI bus ID of the device + pciDeviceID : int + PCI device ID of the device + pciDomainID : int + PCI domain ID of the device + tccDriver : int + 1 if device is a Tesla device using TCC driver, 0 otherwise + asyncEngineCount : int + Number of asynchronous engines + unifiedAddressing : int + Device shares a unified address space with the host + memoryClockRate : int + Deprecated, Peak memory clock frequency in kilohertz + memoryBusWidth : int + Global memory bus width in bits + l2CacheSize : int + Size of L2 cache in bytes + persistingL2CacheMaxSize : int + Device's maximum l2 persisting lines capacity setting in bytes + maxThreadsPerMultiProcessor : int + Maximum resident threads per multiprocessor + streamPrioritiesSupported : int + Device supports stream priorities + globalL1CacheSupported : int + Device supports caching globals in L1 + localL1CacheSupported : int + Device supports caching locals in L1 + sharedMemPerMultiprocessor : size_t + Shared memory available per multiprocessor in bytes + regsPerMultiprocessor : int + 32-bit registers available per multiprocessor + managedMemory : int + Device supports allocating managed memory on this system + isMultiGpuBoard : int + Device is on a multi-GPU board + multiGpuBoardGroupID : int + Unique identifier for a group of devices on the same multi-GPU + board + hostNativeAtomicSupported : int + Link between the device and the host supports native atomic + operations + singleToDoublePrecisionPerfRatio : int + Deprecated, Ratio of single precision performance (in floating- + point operations per second) to double precision performance + pageableMemoryAccess : int + Device supports coherently accessing pageable memory without + calling cudaHostRegister on it + concurrentManagedAccess : int + Device can coherently access managed memory concurrently with the + CPU + computePreemptionSupported : int + Device supports Compute Preemption + canUseHostPointerForRegisteredMem : int + Device can access host registered memory at the same virtual + address as the CPU + cooperativeLaunch : int + Device supports launching cooperative kernels via + cudaLaunchCooperativeKernel + cooperativeMultiDeviceLaunch : int + Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + sharedMemPerBlockOptin : size_t + Per device maximum shared memory per block usable by special opt in + pageableMemoryAccessUsesHostPageTables : int + Device accesses pageable memory via the host's page tables + directManagedMemAccessFromHost : int + Host can directly access managed memory on the device without + migration. + maxBlocksPerMultiProcessor : int + Maximum number of resident blocks per multiprocessor + accessPolicyMaxWindowSize : int + The maximum value of cudaAccessPolicyWindow::num_bytes. + reservedSharedMemPerBlock : size_t + Shared memory reserved by CUDA driver per block in bytes + hostRegisterSupported : int + Device supports host memory registration via cudaHostRegister. + sparseCudaArraySupported : int + 1 if the device supports sparse CUDA arrays and sparse CUDA + mipmapped arrays, 0 otherwise + hostRegisterReadOnlySupported : int + Device supports using the cudaHostRegister flag + cudaHostRegisterReadOnly to register memory that must be mapped as + read-only to the GPU + timelineSemaphoreInteropSupported : int + External timeline semaphore interop is supported on the device + memoryPoolsSupported : int + 1 if the device supports using the cudaMallocAsync and cudaMemPool + family of APIs, 0 otherwise + gpuDirectRDMASupported : int + 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + gpuDirectRDMAFlushWritesOptions : unsigned int + Bitmask to be interpreted according to the + cudaFlushGPUDirectRDMAWritesOptions enum + gpuDirectRDMAWritesOrdering : int + See the cudaGPUDirectRDMAWritesOrdering enum for numerical values + memoryPoolSupportedHandleTypes : unsigned int + Bitmask of handle types supported with mempool-based IPC + deferredMappingCudaArraySupported : int + 1 if the device supports deferred mapping CUDA arrays and CUDA + mipmapped arrays + ipcEventSupported : int + Device supports IPC Events. + clusterLaunch : int + Indicates device supports cluster launch + unifiedFunctionPointers : int + Indicates device supports unified pointers + reserved : list[int] + Reserved for future use + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaDeviceProp _pvt_val + cdef cyruntime.cudaDeviceProp* _pvt_ptr + cdef cudaUUID_t _uuid + +cdef class cudaIpcEventHandle_st: + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaIpcEventHandle_st _pvt_val + cdef cyruntime.cudaIpcEventHandle_st* _pvt_ptr + +cdef class cudaIpcMemHandle_st: + """ + CUDA IPC memory handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaIpcMemHandle_st _pvt_val + cdef cyruntime.cudaIpcMemHandle_st* _pvt_ptr + +cdef class cudaMemFabricHandle_st: + """ + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemFabricHandle_st _pvt_val + cdef cyruntime.cudaMemFabricHandle_st* _pvt_ptr + +cdef class anon_struct7: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + +cdef class anon_union2: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct7 + + nvSciBufObject : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + cdef anon_struct7 _win32 + +cdef class cudaExternalMemoryHandleDesc: + """ + External memory handle descriptor + + Attributes + ---------- + type : cudaExternalMemoryHandleType + Type of the handle + handle : anon_union2 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or cudaExternalMemoryDedicated + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryHandleDesc* _val_ptr + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + cdef anon_union2 _handle + +cdef class cudaExternalMemoryBufferDesc: + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryBufferDesc _pvt_val + cdef cyruntime.cudaExternalMemoryBufferDesc* _pvt_ptr + +cdef class cudaExternalMemoryMipmappedArrayDesc: + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + formatDesc : cudaChannelFormatDesc + Format of base level of the mipmap chain + extent : cudaExtent + Dimensions of base level of the mipmap chain + flags : unsigned int + Flags associated with CUDA mipmapped arrays. See + cudaMallocMipmappedArray + numLevels : unsigned int + Total number of levels in the mipmap chain + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc _pvt_val + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* _pvt_ptr + cdef cudaChannelFormatDesc _formatDesc + cdef cudaExtent _extent + +cdef class anon_struct8: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + +cdef class anon_union3: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct8 + + nvSciSyncObj : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + cdef anon_struct8 _win32 + +cdef class cudaExternalSemaphoreHandleDesc: + """ + External semaphore handle descriptor + + Attributes + ---------- + type : cudaExternalSemaphoreHandleType + Type of the handle + handle : anon_union3 + + flags : unsigned int + Flags reserved for the future. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _val_ptr + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + cdef anon_union3 _handle + +cdef class anon_struct15: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + +cdef class anon_union6: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + +cdef class anon_struct16: + """ + Attributes + ---------- + key : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + +cdef class anon_struct17: + """ + Attributes + ---------- + fence : anon_struct15 + + nvSciSync : anon_union6 + + keyedMutex : anon_struct16 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + cdef anon_struct15 _fence + cdef anon_union6 _nvSciSync + cdef anon_struct16 _keyedMutex + +cdef class cudaExternalSemaphoreSignalParams: + """ + External semaphore signal parameters, compatible with driver type + + Attributes + ---------- + params : anon_struct17 + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while signaling the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + cdef anon_struct17 _params + +cdef class anon_struct18: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + +cdef class anon_union7: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + +cdef class anon_struct19: + """ + Attributes + ---------- + key : unsigned long long + + timeoutMs : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + +cdef class anon_struct20: + """ + Attributes + ---------- + fence : anon_struct18 + + nvSciSync : anon_union7 + + keyedMutex : anon_struct19 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + cdef anon_struct18 _fence + cdef anon_union7 _nvSciSync + cdef anon_struct19 _keyedMutex + +cdef class cudaExternalSemaphoreWaitParams: + """ + External semaphore wait parameters, compatible with driver type + + Attributes + ---------- + params : anon_struct20 + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while waiting for the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + cdef anon_struct20 _params + +cdef class cudalibraryHostUniversalFunctionAndDataTable: + """ + Attributes + ---------- + functionTable : Any + + functionWindowSize : size_t + + dataTable : Any + + dataWindowSize : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable _pvt_val + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable* _pvt_ptr + +cdef class cudaKernelNodeParams: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + func : Any + Kernel to launch + gridDim : dim3 + Grid dimensions + blockDim : dim3 + Block dimensions + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to individual kernel arguments + extra : Any + Pointer to kernel arguments in the "extra" format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaKernelNodeParams _pvt_val + cdef cyruntime.cudaKernelNodeParams* _pvt_ptr + cdef dim3 _gridDim + cdef dim3 _blockDim + cdef _HelperKernelParams _cykernelParams + +cdef class cudaKernelNodeParamsV2: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + func : Any + Kernel to launch + gridDim : dim3 + Grid dimensions + blockDim : dim3 + Block dimensions + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to individual kernel arguments + extra : Any + Pointer to kernel arguments in the "extra" format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaKernelNodeParamsV2 _pvt_val + cdef cyruntime.cudaKernelNodeParamsV2* _pvt_ptr + cdef dim3 _gridDim + cdef dim3 _blockDim + cdef _HelperKernelParams _cykernelParams + +cdef class cudaExternalSemaphoreSignalNodeParams: + """ + External semaphore signal node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* _pvt_ptr + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray + +cdef class cudaExternalSemaphoreSignalNodeParamsV2: + """ + External semaphore signal node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2* _pvt_ptr + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray + +cdef class cudaExternalSemaphoreWaitNodeParams: + """ + External semaphore wait node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* _pvt_ptr + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray + +cdef class cudaExternalSemaphoreWaitNodeParamsV2: + """ + External semaphore wait node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2* _pvt_ptr + cdef size_t _extSemArray_length + cdef cyruntime.cudaExternalSemaphore_t* _extSemArray + cdef size_t _paramsArray_length + cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray + +cdef class cudaConditionalNodeParams: + """ + CUDA conditional node parameters + + Attributes + ---------- + handle : cudaGraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cudaGraphConditionalHandleCreate. + type : cudaGraphConditionalNodeType + Type of conditional node. + size : unsigned int + Size of graph output array. Allowed values are 1 for + cudaGraphCondTypeWhile, 1 or 2 for cudaGraphCondTypeWhile, or any + value greater than zero for cudaGraphCondTypeSwitch. + phGraph_out : cudaGraph_t + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same CUDA context. + These graphs may be populated using graph node creation APIs or + cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + cudaGraphCondTypeWhile: phGraph_out[0] is executed as long as the + condition is non-zero. cudaGraphCondTypeSwitch: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaConditionalNodeParams _pvt_val + cdef cyruntime.cudaConditionalNodeParams* _pvt_ptr + cdef cudaGraphConditionalHandle _handle + cdef size_t _phGraph_out_length + cdef cyruntime.cudaGraph_t* _phGraph_out + +cdef class cudaChildGraphNodeParams: + """ + Child graph node parameters + + Attributes + ---------- + graph : cudaGraph_t + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + ownership : cudaGraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaChildGraphNodeParams _pvt_val + cdef cyruntime.cudaChildGraphNodeParams* _pvt_ptr + cdef cudaGraph_t _graph + +cdef class cudaEventRecordNodeParams: + """ + Event record node parameters + + Attributes + ---------- + event : cudaEvent_t + The event to record when the node executes + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEventRecordNodeParams _pvt_val + cdef cyruntime.cudaEventRecordNodeParams* _pvt_ptr + cdef cudaEvent_t _event + +cdef class cudaEventWaitNodeParams: + """ + Event wait node parameters + + Attributes + ---------- + event : cudaEvent_t + The event to wait on from the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEventWaitNodeParams _pvt_val + cdef cyruntime.cudaEventWaitNodeParams* _pvt_ptr + cdef cudaEvent_t _event + +cdef class cudaGraphNodeParams: + """ + Graph node parameters. See cudaGraphAddNode. + + Attributes + ---------- + type : cudaGraphNodeType + Type of the node + reserved0 : list[int] + Reserved. Must be zero. + reserved1 : list[long long] + Padding. Unused bytes must be zero. + kernel : cudaKernelNodeParamsV2 + Kernel node parameters. + memcpy : cudaMemcpyNodeParams + Memcpy node parameters. + memset : cudaMemsetParamsV2 + Memset node parameters. + host : cudaHostNodeParamsV2 + Host node parameters. + graph : cudaChildGraphNodeParams + Child graph node parameters. + eventWait : cudaEventWaitNodeParams + Event wait node parameters. + eventRecord : cudaEventRecordNodeParams + Event record node parameters. + extSemSignal : cudaExternalSemaphoreSignalNodeParamsV2 + External semaphore signal node parameters. + extSemWait : cudaExternalSemaphoreWaitNodeParamsV2 + External semaphore wait node parameters. + alloc : cudaMemAllocNodeParamsV2 + Memory allocation node parameters. + free : cudaMemFreeNodeParams + Memory free node parameters. + conditional : cudaConditionalNodeParams + Conditional node parameters. + reserved2 : long long + Reserved bytes. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphNodeParams* _val_ptr + cdef cyruntime.cudaGraphNodeParams* _pvt_ptr + cdef cudaKernelNodeParamsV2 _kernel + cdef cudaMemcpyNodeParams _memcpy + cdef cudaMemsetParamsV2 _memset + cdef cudaHostNodeParamsV2 _host + cdef cudaChildGraphNodeParams _graph + cdef cudaEventWaitNodeParams _eventWait + cdef cudaEventRecordNodeParams _eventRecord + cdef cudaExternalSemaphoreSignalNodeParamsV2 _extSemSignal + cdef cudaExternalSemaphoreWaitNodeParamsV2 _extSemWait + cdef cudaMemAllocNodeParamsV2 _alloc + cdef cudaMemFreeNodeParams _free + cdef cudaConditionalNodeParams _conditional + +cdef class cudaGraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + cudaGraphKernelNodePortDefault, + cudaGraphKernelNodePortProgrammatic, or + cudaGraphKernelNodePortLaunchCompletion. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from + ::cudaGraphDependencyType. (It is typed as char due to compiler- + specific layout of bitfields.) See ::cudaGraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphEdgeData_st _pvt_val + cdef cyruntime.cudaGraphEdgeData_st* _pvt_ptr + +cdef class cudaGraphInstantiateParams_st: + """ + Graph instantiation parameters + + Attributes + ---------- + flags : unsigned long long + Instantiation flags + uploadStream : cudaStream_t + Upload stream + errNode_out : cudaGraphNode_t + The node which caused instantiation to fail, if any + result_out : cudaGraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphInstantiateParams_st _pvt_val + cdef cyruntime.cudaGraphInstantiateParams_st* _pvt_ptr + cdef cudaStream_t _uploadStream + cdef cudaGraphNode_t _errNode_out + +cdef class cudaGraphExecUpdateResultInfo_st: + """ + Result information returned by cudaGraphExecUpdate + + Attributes + ---------- + result : cudaGraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : cudaGraphNode_t + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : cudaGraphNode_t + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphExecUpdateResultInfo_st _pvt_val + cdef cyruntime.cudaGraphExecUpdateResultInfo_st* _pvt_ptr + cdef cudaGraphNode_t _errorNode + cdef cudaGraphNode_t _errorFromNode + +cdef class anon_struct21: + """ + Attributes + ---------- + pValue : Any + + offset : size_t + + size : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + +cdef class anon_union9: + """ + Attributes + ---------- + gridDim : dim3 + + param : anon_struct21 + + isEnabled : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + cdef dim3 _gridDim + cdef anon_struct21 _param + +cdef class cudaGraphKernelNodeUpdate: + """ + Struct to specify a single node update to pass as part of a larger + array to ::cudaGraphKernelNodeUpdatesApply + + Attributes + ---------- + node : cudaGraphDeviceNode_t + Node to update + field : cudaGraphKernelNodeField + Which type of update to apply. Determines how updateData is + interpreted + updateData : anon_union9 + Update data to apply. Which field is used depends on field's value + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaGraphKernelNodeUpdate* _val_ptr + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + cdef cudaGraphDeviceNode_t _node + cdef anon_union9 _updateData + +cdef class cudaLaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By + default, kernels are launched in domain 0. Kernel launched with + cudaLaunchMemSyncDomainRemote will have a different domain ID. User + may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available + through cudaDevAttrMemSyncDomainCount. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchMemSyncDomainMap_st _pvt_val + cdef cyruntime.cudaLaunchMemSyncDomainMap_st* _pvt_ptr + +cdef class anon_struct22: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + +cdef class anon_struct23: + """ + Attributes + ---------- + event : cudaEvent_t + + flags : int + + triggerAtBlockStart : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + cdef cudaEvent_t _event + +cdef class anon_struct24: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + +cdef class anon_struct25: + """ + Attributes + ---------- + event : cudaEvent_t + + flags : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + cdef cudaEvent_t _event + +cdef class anon_struct26: + """ + Attributes + ---------- + deviceUpdatable : int + + devNode : cudaGraphDeviceNode_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + cdef cudaGraphDeviceNode_t _devNode + +cdef class cudaLaunchAttributeValue: + """ + Launch attributes union; used as value field of + ::cudaLaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + ::cudaSynchronizationPolicy for work queued up in this stream. + clusterDim : anon_struct22 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + programmaticEvent : anon_struct23 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + ::cudaLaunchMemSyncDomainMap. + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + launchCompletionEvent : anon_struct25 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + deviceUpdatableKernelNode : anon_struct26 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue _pvt_val + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + cdef cudaAccessPolicyWindow _accessPolicyWindow + cdef anon_struct22 _clusterDim + cdef anon_struct23 _programmaticEvent + cdef cudaLaunchMemSyncDomainMap _memSyncDomainMap + cdef anon_struct24 _preferredClusterDim + cdef anon_struct25 _launchCompletionEvent + cdef anon_struct26 _deviceUpdatableKernelNode + +cdef class cudaLaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + id : cudaLaunchAttributeID + Attribute to set + val : cudaLaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttribute_st _pvt_val + cdef cyruntime.cudaLaunchAttribute_st* _pvt_ptr + cdef cudaLaunchAttributeValue _val + +cdef class anon_struct27: + """ + Attributes + ---------- + bytesOverBudget : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + +cdef class anon_union10: + """ + Attributes + ---------- + overBudget : anon_struct27 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + cdef anon_struct27 _overBudget + +cdef class cudaAsyncNotificationInfo: + """ + Information describing an async notification event + + Attributes + ---------- + type : cudaAsyncNotificationType + The type of notification being sent + info : anon_union10 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaAsyncNotificationInfo* _val_ptr + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + cdef anon_union10 _info + +cdef class cudaTextureDesc: + """ + CUDA texture descriptor + + Attributes + ---------- + addressMode : list[cudaTextureAddressMode] + Texture address mode for up to 3 dimensions + filterMode : cudaTextureFilterMode + Texture filter mode + readMode : cudaTextureReadMode + Texture read mode + sRGB : int + Perform sRGB->linear conversion during texture read + borderColor : list[float] + Texture Border Color + normalizedCoords : int + Indicates whether texture reads are normalized or not + maxAnisotropy : unsigned int + Limit to the anisotropy ratio + mipmapFilterMode : cudaTextureFilterMode + Mipmap filter mode + mipmapLevelBias : float + Offset applied to the supplied mipmap level + minMipmapLevelClamp : float + Lower end of the mipmap level range to clamp access to + maxMipmapLevelClamp : float + Upper end of the mipmap level range to clamp access to + disableTrilinearOptimization : int + Disable any trilinear filtering optimizations. + seamlessCubemap : int + Enable seamless cube map filtering. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaTextureDesc _pvt_val + cdef cyruntime.cudaTextureDesc* _pvt_ptr + +cdef class cudaEglPlaneDesc_st: + """ + CUDA EGL Plane Descriptor - structure defining each plane of a CUDA + EGLFrame + + Attributes + ---------- + width : unsigned int + Width of plane + height : unsigned int + Height of plane + depth : unsigned int + Depth of plane + pitch : unsigned int + Pitch of plane + numChannels : unsigned int + Number of channels for the plane + channelDesc : cudaChannelFormatDesc + Channel Format Descriptor + reserved : list[unsigned int] + Reserved for future use + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglPlaneDesc_st _pvt_val + cdef cyruntime.cudaEglPlaneDesc_st* _pvt_ptr + cdef cudaChannelFormatDesc _channelDesc + +cdef class anon_union11: + """ + Attributes + ---------- + pArray : list[cudaArray_t] + + pPitch : list[cudaPitchedPtr] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglFrame_st* _pvt_ptr + +cdef class cudaEglFrame_st: + """ + CUDA EGLFrame Descriptor - structure defining one frame of EGL. + Each frame may contain one or more planes depending on whether the + surface is Multiplanar or not. Each plane of EGLFrame is + represented by cudaEglPlaneDesc which is defined as: + typedefstructcudaEglPlaneDesc_st unsignedintwidth; + unsignedintheight; unsignedintdepth; unsignedintpitch; + unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; + unsignedintreserved[4]; cudaEglPlaneDesc; + + Attributes + ---------- + frame : anon_union11 + + planeDesc : list[cudaEglPlaneDesc] + CUDA EGL Plane Descriptor cudaEglPlaneDesc + planeCount : unsigned int + Number of planes + frameType : cudaEglFrameType + Array or Pitch + eglColorFormat : cudaEglColorFormat + CUDA EGL Color Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaEglFrame_st* _val_ptr + cdef cyruntime.cudaEglFrame_st* _pvt_ptr + cdef anon_union11 _frame + +cdef class CUuuid(CUuuid_st): + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaUUID_t(CUuuid_st): + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaIpcEventHandle_t(cudaIpcEventHandle_st): + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaIpcMemHandle_t(cudaIpcMemHandle_st): + """ + CUDA IPC memory handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaMemFabricHandle_t(cudaMemFabricHandle_st): + """ + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + cudaGraphKernelNodePortDefault, + cudaGraphKernelNodePortProgrammatic, or + cudaGraphKernelNodePortLaunchCompletion. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from + ::cudaGraphDependencyType. (It is typed as char due to compiler- + specific layout of bitfields.) See ::cudaGraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphInstantiateParams(cudaGraphInstantiateParams_st): + """ + Graph instantiation parameters + + Attributes + ---------- + flags : unsigned long long + Instantiation flags + uploadStream : cudaStream_t + Upload stream + errNode_out : cudaGraphNode_t + The node which caused instantiation to fail, if any + result_out : cudaGraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaGraphExecUpdateResultInfo(cudaGraphExecUpdateResultInfo_st): + """ + Result information returned by cudaGraphExecUpdate + + Attributes + ---------- + result : cudaGraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : cudaGraphNode_t + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : cudaGraphNode_t + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaLaunchMemSyncDomainMap(cudaLaunchMemSyncDomainMap_st): + """ + Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By + default, kernels are launched in domain 0. Kernel launched with + cudaLaunchMemSyncDomainRemote will have a different domain ID. User + may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available + through cudaDevAttrMemSyncDomainCount. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaLaunchAttribute(cudaLaunchAttribute_st): + """ + Launch attribute + + Attributes + ---------- + id : cudaLaunchAttributeID + Attribute to set + val : cudaLaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaAsyncNotificationInfo_t(cudaAsyncNotificationInfo): + """ + Information describing an async notification event + + Attributes + ---------- + type : cudaAsyncNotificationType + The type of notification being sent + info : anon_union10 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): + """ + Launch attributes union; used as value field of + ::cudaLaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + ::cudaSynchronizationPolicy for work queued up in this stream. + clusterDim : anon_struct22 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + programmaticEvent : anon_struct23 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + ::cudaLaunchMemSyncDomainMap. + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + launchCompletionEvent : anon_struct25 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + deviceUpdatableKernelNode : anon_struct26 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): + """ + Launch attributes union; used as value field of + ::cudaLaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + ::cudaSynchronizationPolicy for work queued up in this stream. + clusterDim : anon_struct22 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + programmaticEvent : anon_struct23 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + ::cudaLaunchMemSyncDomainMap. + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + launchCompletionEvent : anon_struct25 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + deviceUpdatableKernelNode : anon_struct26 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaEglPlaneDesc(cudaEglPlaneDesc_st): + """ + CUDA EGL Plane Descriptor - structure defining each plane of a CUDA + EGLFrame + + Attributes + ---------- + width : unsigned int + Width of plane + height : unsigned int + Height of plane + depth : unsigned int + Depth of plane + pitch : unsigned int + Pitch of plane + numChannels : unsigned int + Number of channels for the plane + channelDesc : cudaChannelFormatDesc + Channel Format Descriptor + reserved : list[unsigned int] + Reserved for future use + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaEglFrame(cudaEglFrame_st): + """ + CUDA EGLFrame Descriptor - structure defining one frame of EGL. + Each frame may contain one or more planes depending on whether the + surface is Multiplanar or not. Each plane of EGLFrame is + represented by cudaEglPlaneDesc which is defined as: + typedefstructcudaEglPlaneDesc_st unsignedintwidth; + unsignedintheight; unsignedintdepth; unsignedintpitch; + unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; + unsignedintreserved[4]; cudaEglPlaneDesc; + + Attributes + ---------- + frame : anon_union11 + + planeDesc : list[cudaEglPlaneDesc] + CUDA EGL Plane Descriptor cudaEglPlaneDesc + planeCount : unsigned int + Number of planes + frameType : cudaEglFrameType + Array or Pitch + eglColorFormat : cudaEglColorFormat + CUDA EGL Color Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class cudaStream_t(driver.CUstream): + """ + + CUDA stream + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaEvent_t(driver.CUevent): + """ + + CUDA event types + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraph_t(driver.CUgraph): + """ + + CUDA graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphNode_t(driver.CUgraphNode): + """ + + CUDA graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaUserObject_t(driver.CUuserObject): + """ + + CUDA user object for graphs + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaFunction_t(driver.CUfunction): + """ + + CUDA function + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaMemPool_t(driver.CUmemoryPool): + """ + + CUDA memory pool + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphExec_t(driver.CUgraphExec): + """ + + CUDA executable (launchable) graph + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaEglStreamConnection(driver.CUeglStreamConnection): + """ + + CUDA EGLSream Connection + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + pass + +cdef class cudaGraphConditionalHandle: + """ + + CUDA handle for conditional graph nodes + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaGraphConditionalHandle _pvt_val + cdef cyruntime.cudaGraphConditionalHandle* _pvt_ptr + +cdef class cudaSurfaceObject_t: + """ + + An opaque value that represents a CUDA Surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaSurfaceObject_t _pvt_val + cdef cyruntime.cudaSurfaceObject_t* _pvt_ptr + +cdef class cudaTextureObject_t: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaTextureObject_t _pvt_val + cdef cyruntime.cudaTextureObject_t* _pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.GLenum _pvt_val + cdef cyruntime.GLenum* _pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.GLuint _pvt_val + cdef cyruntime.GLuint* _pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.EGLint _pvt_val + cdef cyruntime.EGLint* _pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpDevice _pvt_val + cdef cyruntime.VdpDevice* _pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpGetProcAddress _pvt_val + cdef cyruntime.VdpGetProcAddress* _pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpVideoSurface _pvt_val + cdef cyruntime.VdpVideoSurface* _pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.VdpOutputSurface _pvt_val + cdef cyruntime.VdpOutputSurface* _pvt_ptr diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pyx b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pyx new file mode 100644 index 0000000000000000000000000000000000000000..56dd9f4abe1b0d4eaef11cfa38ccb8543d0ec300 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/runtime.pyx @@ -0,0 +1,33118 @@ +# SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +# This code was automatically generated with version 12.9.0. Do not modify it directly. +from typing import Any, Optional +from enum import IntEnum +import cython +import ctypes +from libc.stdlib cimport calloc, malloc, free +from libc cimport string +from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t, uintptr_t +from libc.stddef cimport wchar_t +from libc.limits cimport CHAR_MIN +from libcpp.vector cimport vector +from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS +from cpython.bytes cimport PyBytes_FromStringAndSize +import cuda.bindings.driver +from libcpp.map cimport map + +import cuda.bindings.driver as _driver +_driver = _driver.__dict__ +include "_lib/utils.pxi" + +ctypedef unsigned long long signed_char_ptr +ctypedef unsigned long long unsigned_char_ptr +ctypedef unsigned long long char_ptr +ctypedef unsigned long long short_ptr +ctypedef unsigned long long unsigned_short_ptr +ctypedef unsigned long long int_ptr +ctypedef unsigned long long long_int_ptr +ctypedef unsigned long long long_long_int_ptr +ctypedef unsigned long long unsigned_int_ptr +ctypedef unsigned long long unsigned_long_int_ptr +ctypedef unsigned long long unsigned_long_long_int_ptr +ctypedef unsigned long long uint32_t_ptr +ctypedef unsigned long long uint64_t_ptr +ctypedef unsigned long long int32_t_ptr +ctypedef unsigned long long int64_t_ptr +ctypedef unsigned long long unsigned_ptr +ctypedef unsigned long long unsigned_long_long_ptr +ctypedef unsigned long long long_long_ptr +ctypedef unsigned long long size_t_ptr +ctypedef unsigned long long long_ptr +ctypedef unsigned long long float_ptr +ctypedef unsigned long long double_ptr +ctypedef unsigned long long void_ptr + +#: Default page-locked allocation flag +cudaHostAllocDefault = cyruntime.cudaHostAllocDefault + +#: Pinned memory accessible by all CUDA contexts +cudaHostAllocPortable = cyruntime.cudaHostAllocPortable + +#: Map allocation into device space +cudaHostAllocMapped = cyruntime.cudaHostAllocMapped + +#: Write-combined memory +cudaHostAllocWriteCombined = cyruntime.cudaHostAllocWriteCombined + +#: Default host memory registration flag +cudaHostRegisterDefault = cyruntime.cudaHostRegisterDefault + +#: Pinned memory accessible by all CUDA contexts +cudaHostRegisterPortable = cyruntime.cudaHostRegisterPortable + +#: Map registered memory into device space +cudaHostRegisterMapped = cyruntime.cudaHostRegisterMapped + +#: Memory-mapped I/O space +cudaHostRegisterIoMemory = cyruntime.cudaHostRegisterIoMemory + +#: Memory-mapped read-only +cudaHostRegisterReadOnly = cyruntime.cudaHostRegisterReadOnly + +#: Default peer addressing enable flag +cudaPeerAccessDefault = cyruntime.cudaPeerAccessDefault + +#: Default stream flag +cudaStreamDefault = cyruntime.cudaStreamDefault + +#: Stream does not synchronize with stream 0 (the NULL stream) +cudaStreamNonBlocking = cyruntime.cudaStreamNonBlocking + +#: Legacy stream handle +#: +#: Stream handle that can be passed as a cudaStream_t to use an implicit +#: stream with legacy synchronization behavior. +#: +#: See details of the \link_sync_behavior +cudaStreamLegacy = cyruntime.cudaStreamLegacy + +#: Per-thread stream handle +#: +#: Stream handle that can be passed as a cudaStream_t to use an implicit +#: stream with per-thread synchronization behavior. +#: +#: See details of the \link_sync_behavior +cudaStreamPerThread = cyruntime.cudaStreamPerThread + +#: Default event flag +cudaEventDefault = cyruntime.cudaEventDefault + +#: Event uses blocking synchronization +cudaEventBlockingSync = cyruntime.cudaEventBlockingSync + +#: Event will not record timing data +cudaEventDisableTiming = cyruntime.cudaEventDisableTiming + +#: Event is suitable for interprocess use. cudaEventDisableTiming must be +#: set +cudaEventInterprocess = cyruntime.cudaEventInterprocess + +#: Default event record flag +cudaEventRecordDefault = cyruntime.cudaEventRecordDefault + +#: Event is captured in the graph as an external event node when performing +#: stream capture +cudaEventRecordExternal = cyruntime.cudaEventRecordExternal + +#: Default event wait flag +cudaEventWaitDefault = cyruntime.cudaEventWaitDefault + +#: Event is captured in the graph as an external event node when performing +#: stream capture +cudaEventWaitExternal = cyruntime.cudaEventWaitExternal + +#: Device flag - Automatic scheduling +cudaDeviceScheduleAuto = cyruntime.cudaDeviceScheduleAuto + +#: Device flag - Spin default scheduling +cudaDeviceScheduleSpin = cyruntime.cudaDeviceScheduleSpin + +#: Device flag - Yield default scheduling +cudaDeviceScheduleYield = cyruntime.cudaDeviceScheduleYield + +#: Device flag - Use blocking synchronization +cudaDeviceScheduleBlockingSync = cyruntime.cudaDeviceScheduleBlockingSync + +#: Device flag - Use blocking synchronization [Deprecated] +cudaDeviceBlockingSync = cyruntime.cudaDeviceBlockingSync + +#: Device schedule flags mask +cudaDeviceScheduleMask = cyruntime.cudaDeviceScheduleMask + +#: Device flag - Support mapped pinned allocations +cudaDeviceMapHost = cyruntime.cudaDeviceMapHost + +#: Device flag - Keep local memory allocation after launch +cudaDeviceLmemResizeToMax = cyruntime.cudaDeviceLmemResizeToMax + +#: Device flag - Ensure synchronous memory operations on this context will +#: synchronize +cudaDeviceSyncMemops = cyruntime.cudaDeviceSyncMemops + +#: Device flags mask +cudaDeviceMask = cyruntime.cudaDeviceMask + +#: Default CUDA array allocation flag +cudaArrayDefault = cyruntime.cudaArrayDefault + +#: Must be set in cudaMalloc3DArray to create a layered CUDA array +cudaArrayLayered = cyruntime.cudaArrayLayered + +#: Must be set in cudaMallocArray or cudaMalloc3DArray in order to bind +#: surfaces to the CUDA array +cudaArraySurfaceLoadStore = cyruntime.cudaArraySurfaceLoadStore + +#: Must be set in cudaMalloc3DArray to create a cubemap CUDA array +cudaArrayCubemap = cyruntime.cudaArrayCubemap + +#: Must be set in cudaMallocArray or cudaMalloc3DArray in order to perform +#: texture gather operations on the CUDA array +cudaArrayTextureGather = cyruntime.cudaArrayTextureGather + +#: Must be set in cudaExternalMemoryGetMappedMipmappedArray if the +#: mipmapped array is used as a color target in a graphics API +cudaArrayColorAttachment = cyruntime.cudaArrayColorAttachment + +#: Must be set in cudaMallocArray, cudaMalloc3DArray or +#: cudaMallocMipmappedArray in order to create a sparse CUDA array or CUDA +#: mipmapped array +cudaArraySparse = cyruntime.cudaArraySparse + +#: Must be set in cudaMallocArray, cudaMalloc3DArray or +#: cudaMallocMipmappedArray in order to create a deferred mapping CUDA +#: array or CUDA mipmapped array +cudaArrayDeferredMapping = cyruntime.cudaArrayDeferredMapping + +#: Automatically enable peer access between remote devices as needed +cudaIpcMemLazyEnablePeerAccess = cyruntime.cudaIpcMemLazyEnablePeerAccess + +#: Memory can be accessed by any stream on any device +cudaMemAttachGlobal = cyruntime.cudaMemAttachGlobal + +#: Memory cannot be accessed by any stream on any device +cudaMemAttachHost = cyruntime.cudaMemAttachHost + +#: Memory can only be accessed by a single stream on the associated device +cudaMemAttachSingle = cyruntime.cudaMemAttachSingle + +#: Default behavior +cudaOccupancyDefault = cyruntime.cudaOccupancyDefault + +#: Assume global caching is enabled and cannot be automatically turned off +cudaOccupancyDisableCachingOverride = cyruntime.cudaOccupancyDisableCachingOverride + +#: Device id that represents the CPU +cudaCpuDeviceId = cyruntime.cudaCpuDeviceId + +#: Device id that represents an invalid device +cudaInvalidDeviceId = cyruntime.cudaInvalidDeviceId + +#: Tell the CUDA runtime that DeviceFlags is being set in cudaInitDevice +#: call +cudaInitDeviceFlagsAreValid = cyruntime.cudaInitDeviceFlagsAreValid + +#: If set, each kernel launched as part of +#: :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` only waits for prior +#: work in the stream corresponding to that GPU to complete before the +#: kernel begins execution. +cudaCooperativeLaunchMultiDeviceNoPreSync = cyruntime.cudaCooperativeLaunchMultiDeviceNoPreSync + +#: If set, any subsequent work pushed in a stream that participated in a +#: call to :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` will only +#: wait for the kernel launched on the GPU corresponding to that stream to +#: complete before it begins execution. +cudaCooperativeLaunchMultiDeviceNoPostSync = cyruntime.cudaCooperativeLaunchMultiDeviceNoPostSync + +#: Indicates that the layered sparse CUDA array or CUDA mipmapped array has +#: a single mip tail region for all layers +cudaArraySparsePropertiesSingleMipTail = cyruntime.cudaArraySparsePropertiesSingleMipTail + +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +cudaMemPoolCreateUsageHwDecompress = cyruntime.cudaMemPoolCreateUsageHwDecompress + +#: CUDA IPC Handle Size +CUDA_IPC_HANDLE_SIZE = cyruntime.CUDA_IPC_HANDLE_SIZE + +#: Indicates that the external memory object is a dedicated resource +cudaExternalMemoryDedicated = cyruntime.cudaExternalMemoryDedicated + +#: When the /p flags parameter of +#: :py:obj:`~.cudaExternalSemaphoreSignalParams` contains this flag, it +#: indicates that signaling an external semaphore object should skip +#: performing appropriate memory synchronization operations over all the +#: external memory objects that are imported as +#: :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are +#: performed by default to ensure data coherency with other importers of +#: the same NvSciBuf memory objects. +cudaExternalSemaphoreSignalSkipNvSciBufMemSync = cyruntime.cudaExternalSemaphoreSignalSkipNvSciBufMemSync + +#: When the /p flags parameter of +#: :py:obj:`~.cudaExternalSemaphoreWaitParams` contains this flag, it +#: indicates that waiting an external semaphore object should skip +#: performing appropriate memory synchronization operations over all the +#: external memory objects that are imported as +#: :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, which otherwise are +#: performed by default to ensure data coherency with other importers of +#: the same NvSciBuf memory objects. +cudaExternalSemaphoreWaitSkipNvSciBufMemSync = cyruntime.cudaExternalSemaphoreWaitSkipNvSciBufMemSync + +#: When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to +#: this, it indicates that application need signaler specific NvSciSyncAttr +#: to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +cudaNvSciSyncAttrSignal = cyruntime.cudaNvSciSyncAttrSignal + +#: When /p flags of :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` is set to +#: this, it indicates that application need waiter specific NvSciSyncAttr +#: to be filled by :py:obj:`~.cudaDeviceGetNvSciSyncAttributes`. +cudaNvSciSyncAttrWait = cyruntime.cudaNvSciSyncAttrWait + +#: This port activates when the kernel has finished executing. +cudaGraphKernelNodePortDefault = cyruntime.cudaGraphKernelNodePortDefault + +#: This port activates when all blocks of the kernel have performed +#: cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be +#: used with edge type :py:obj:`~.cudaGraphDependencyTypeProgrammatic`. See +#: also :py:obj:`~.cudaLaunchAttributeProgrammaticEvent`. +cudaGraphKernelNodePortProgrammatic = cyruntime.cudaGraphKernelNodePortProgrammatic + +#: This port activates when all blocks of the kernel have begun execution. +#: See also :py:obj:`~.cudaLaunchAttributeLaunchCompletionEvent`. +cudaGraphKernelNodePortLaunchCompletion = cyruntime.cudaGraphKernelNodePortLaunchCompletion + +cudaStreamAttributeAccessPolicyWindow = cyruntime.cudaStreamAttributeAccessPolicyWindow + +cudaStreamAttributeSynchronizationPolicy = cyruntime.cudaStreamAttributeSynchronizationPolicy + +cudaStreamAttributeMemSyncDomainMap = cyruntime.cudaStreamAttributeMemSyncDomainMap + +cudaStreamAttributeMemSyncDomain = cyruntime.cudaStreamAttributeMemSyncDomain + +cudaStreamAttributePriority = cyruntime.cudaStreamAttributePriority + +cudaKernelNodeAttributeAccessPolicyWindow = cyruntime.cudaKernelNodeAttributeAccessPolicyWindow + +cudaKernelNodeAttributeCooperative = cyruntime.cudaKernelNodeAttributeCooperative + +cudaKernelNodeAttributePriority = cyruntime.cudaKernelNodeAttributePriority + +cudaKernelNodeAttributeClusterDimension = cyruntime.cudaKernelNodeAttributeClusterDimension + +cudaKernelNodeAttributeClusterSchedulingPolicyPreference = cyruntime.cudaKernelNodeAttributeClusterSchedulingPolicyPreference + +cudaKernelNodeAttributeMemSyncDomainMap = cyruntime.cudaKernelNodeAttributeMemSyncDomainMap + +cudaKernelNodeAttributeMemSyncDomain = cyruntime.cudaKernelNodeAttributeMemSyncDomain + +cudaKernelNodeAttributePreferredSharedMemoryCarveout = cyruntime.cudaKernelNodeAttributePreferredSharedMemoryCarveout + +cudaKernelNodeAttributeDeviceUpdatableKernelNode = cyruntime.cudaKernelNodeAttributeDeviceUpdatableKernelNode + +cudaSurfaceType1D = cyruntime.cudaSurfaceType1D + +cudaSurfaceType2D = cyruntime.cudaSurfaceType2D + +cudaSurfaceType3D = cyruntime.cudaSurfaceType3D + +cudaSurfaceTypeCubemap = cyruntime.cudaSurfaceTypeCubemap + +cudaSurfaceType1DLayered = cyruntime.cudaSurfaceType1DLayered + +cudaSurfaceType2DLayered = cyruntime.cudaSurfaceType2DLayered + +cudaSurfaceTypeCubemapLayered = cyruntime.cudaSurfaceTypeCubemapLayered + +cudaTextureType1D = cyruntime.cudaTextureType1D + +cudaTextureType2D = cyruntime.cudaTextureType2D + +cudaTextureType3D = cyruntime.cudaTextureType3D + +cudaTextureTypeCubemap = cyruntime.cudaTextureTypeCubemap + +cudaTextureType1DLayered = cyruntime.cudaTextureType1DLayered + +cudaTextureType2DLayered = cyruntime.cudaTextureType2DLayered + +cudaTextureTypeCubemapLayered = cyruntime.cudaTextureTypeCubemapLayered + +#: CUDA Runtime API Version +CUDART_VERSION = cyruntime.CUDART_VERSION + +__CUDART_API_VERSION = cyruntime.__CUDART_API_VERSION + +#: Maximum number of planes per frame +CUDA_EGL_MAX_PLANES = cyruntime.CUDA_EGL_MAX_PLANES + +class cudaError_t(IntEnum): + """ + impl_private CUDA error types + """ + + #: The API call returned with no errors. In the case of query calls, + #: this also means that the operation being queried is complete (see + #: :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`). + cudaSuccess = cyruntime.cudaError.cudaSuccess + + #: This indicates that one or more of the parameters passed to the API + #: call is not within an acceptable range of values. + cudaErrorInvalidValue = cyruntime.cudaError.cudaErrorInvalidValue + + #: The API call failed because it was unable to allocate enough memory + #: or other resources to perform the requested operation. + cudaErrorMemoryAllocation = cyruntime.cudaError.cudaErrorMemoryAllocation + + #: The API call failed because the CUDA driver and runtime could not be + #: initialized. + cudaErrorInitializationError = cyruntime.cudaError.cudaErrorInitializationError + + #: This indicates that a CUDA Runtime API call cannot be executed + #: because it is being called during process shut down, at a point in + #: time after CUDA driver has been unloaded. + cudaErrorCudartUnloading = cyruntime.cudaError.cudaErrorCudartUnloading + + #: This indicates profiler is not initialized for this run. This can + #: happen when the application is running with external profiling tools + #: like visual profiler. + cudaErrorProfilerDisabled = cyruntime.cudaError.cudaErrorProfilerDisabled + + #: [Deprecated] + cudaErrorProfilerNotInitialized = cyruntime.cudaError.cudaErrorProfilerNotInitialized + + #: [Deprecated] + cudaErrorProfilerAlreadyStarted = cyruntime.cudaError.cudaErrorProfilerAlreadyStarted + + #: [Deprecated] + cudaErrorProfilerAlreadyStopped = cyruntime.cudaError.cudaErrorProfilerAlreadyStopped + + #: This indicates that a kernel launch is requesting resources that can + #: never be satisfied by the current device. Requesting more shared + #: memory per block than the device supports will trigger this error, + #: as will requesting too many threads or blocks. See + #: :py:obj:`~.cudaDeviceProp` for more device limitations. + cudaErrorInvalidConfiguration = cyruntime.cudaError.cudaErrorInvalidConfiguration + + #: This indicates that one or more of the pitch-related parameters + #: passed to the API call is not within the acceptable range for pitch. + cudaErrorInvalidPitchValue = cyruntime.cudaError.cudaErrorInvalidPitchValue + + #: This indicates that the symbol name/identifier passed to the API + #: call is not a valid name or identifier. + cudaErrorInvalidSymbol = cyruntime.cudaError.cudaErrorInvalidSymbol + + #: This indicates that at least one host pointer passed to the API call + #: is not a valid host pointer. [Deprecated] + cudaErrorInvalidHostPointer = cyruntime.cudaError.cudaErrorInvalidHostPointer + + #: This indicates that at least one device pointer passed to the API + #: call is not a valid device pointer. [Deprecated] + cudaErrorInvalidDevicePointer = cyruntime.cudaError.cudaErrorInvalidDevicePointer + + #: This indicates that the texture passed to the API call is not a + #: valid texture. + cudaErrorInvalidTexture = cyruntime.cudaError.cudaErrorInvalidTexture + + #: This indicates that the texture binding is not valid. This occurs if + #: you call :py:obj:`~.cudaGetTextureAlignmentOffset()` with an unbound + #: texture. + cudaErrorInvalidTextureBinding = cyruntime.cudaError.cudaErrorInvalidTextureBinding + + #: This indicates that the channel descriptor passed to the API call is + #: not valid. This occurs if the format is not one of the formats + #: specified by :py:obj:`~.cudaChannelFormatKind`, or if one of the + #: dimensions is invalid. + cudaErrorInvalidChannelDescriptor = cyruntime.cudaError.cudaErrorInvalidChannelDescriptor + + #: This indicates that the direction of the memcpy passed to the API + #: call is not one of the types specified by + #: :py:obj:`~.cudaMemcpyKind`. + cudaErrorInvalidMemcpyDirection = cyruntime.cudaError.cudaErrorInvalidMemcpyDirection + + #: This indicated that the user has taken the address of a constant + #: variable, which was forbidden up until the CUDA 3.1 release. + #: [Deprecated] + cudaErrorAddressOfConstant = cyruntime.cudaError.cudaErrorAddressOfConstant + + #: This indicated that a texture fetch was not able to be performed. + #: This was previously used for device emulation of texture operations. + #: [Deprecated] + cudaErrorTextureFetchFailed = cyruntime.cudaError.cudaErrorTextureFetchFailed + + #: This indicated that a texture was not bound for access. This was + #: previously used for device emulation of texture operations. + #: [Deprecated] + cudaErrorTextureNotBound = cyruntime.cudaError.cudaErrorTextureNotBound + + #: This indicated that a synchronization operation had failed. This was + #: previously used for some device emulation functions. [Deprecated] + cudaErrorSynchronizationError = cyruntime.cudaError.cudaErrorSynchronizationError + + #: This indicates that a non-float texture was being accessed with + #: linear filtering. This is not supported by CUDA. + cudaErrorInvalidFilterSetting = cyruntime.cudaError.cudaErrorInvalidFilterSetting + + #: This indicates that an attempt was made to read an unsupported data + #: type as a normalized float. This is not supported by CUDA. + cudaErrorInvalidNormSetting = cyruntime.cudaError.cudaErrorInvalidNormSetting + + #: Mixing of device and device emulation code was not allowed. + #: [Deprecated] + cudaErrorMixedDeviceExecution = cyruntime.cudaError.cudaErrorMixedDeviceExecution + + #: This indicates that the API call is not yet implemented. Production + #: releases of CUDA will never return this error. [Deprecated] + cudaErrorNotYetImplemented = cyruntime.cudaError.cudaErrorNotYetImplemented + + #: This indicated that an emulated device pointer exceeded the 32-bit + #: address range. [Deprecated] + cudaErrorMemoryValueTooLarge = cyruntime.cudaError.cudaErrorMemoryValueTooLarge + + #: This indicates that the CUDA driver that the application has loaded + #: is a stub library. Applications that run with the stub rather than a + #: real driver loaded will result in CUDA API returning this error. + cudaErrorStubLibrary = cyruntime.cudaError.cudaErrorStubLibrary + + #: This indicates that the installed NVIDIA CUDA driver is older than + #: the CUDA runtime library. This is not a supported configuration. + #: Users should install an updated NVIDIA display driver to allow the + #: application to run. + cudaErrorInsufficientDriver = cyruntime.cudaError.cudaErrorInsufficientDriver + + #: This indicates that the API call requires a newer CUDA driver than + #: the one currently installed. Users should install an updated NVIDIA + #: CUDA driver to allow the API call to succeed. + cudaErrorCallRequiresNewerDriver = cyruntime.cudaError.cudaErrorCallRequiresNewerDriver + + #: This indicates that the surface passed to the API call is not a + #: valid surface. + cudaErrorInvalidSurface = cyruntime.cudaError.cudaErrorInvalidSurface + + #: This indicates that multiple global or constant variables (across + #: separate CUDA source files in the application) share the same string + #: name. + cudaErrorDuplicateVariableName = cyruntime.cudaError.cudaErrorDuplicateVariableName + + #: This indicates that multiple textures (across separate CUDA source + #: files in the application) share the same string name. + cudaErrorDuplicateTextureName = cyruntime.cudaError.cudaErrorDuplicateTextureName + + #: This indicates that multiple surfaces (across separate CUDA source + #: files in the application) share the same string name. + cudaErrorDuplicateSurfaceName = cyruntime.cudaError.cudaErrorDuplicateSurfaceName + + #: This indicates that all CUDA devices are busy or unavailable at the + #: current time. Devices are often busy/unavailable due to use of + #: :py:obj:`~.cudaComputeModeProhibited`, + #: :py:obj:`~.cudaComputeModeExclusiveProcess`, or when long running + #: CUDA kernels have filled up the GPU and are blocking new work from + #: starting. They can also be unavailable due to memory constraints on + #: a device that already has active CUDA work being performed. + cudaErrorDevicesUnavailable = cyruntime.cudaError.cudaErrorDevicesUnavailable + + #: This indicates that the current context is not compatible with this + #: the CUDA Runtime. This can only occur if you are using CUDA + #: Runtime/Driver interoperability and have created an existing Driver + #: context using the driver API. The Driver context may be incompatible + #: either because the Driver context was created using an older version + #: of the API, because the Runtime API call expects a primary driver + #: context and the Driver context is not primary, or because the Driver + #: context has been destroyed. Please see :py:obj:`~.Interactions`with + #: the CUDA Driver API" for more information. + cudaErrorIncompatibleDriverContext = cyruntime.cudaError.cudaErrorIncompatibleDriverContext + + #: The device function being invoked (usually via + #: :py:obj:`~.cudaLaunchKernel()`) was not previously configured via + #: the :py:obj:`~.cudaConfigureCall()` function. + cudaErrorMissingConfiguration = cyruntime.cudaError.cudaErrorMissingConfiguration + + #: This indicated that a previous kernel launch failed. This was + #: previously used for device emulation of kernel launches. + #: [Deprecated] + cudaErrorPriorLaunchFailure = cyruntime.cudaError.cudaErrorPriorLaunchFailure + + #: This error indicates that a device runtime grid launch did not occur + #: because the depth of the child grid would exceed the maximum + #: supported number of nested grid launches. + cudaErrorLaunchMaxDepthExceeded = cyruntime.cudaError.cudaErrorLaunchMaxDepthExceeded + + #: This error indicates that a grid launch did not occur because the + #: kernel uses file-scoped textures which are unsupported by the device + #: runtime. Kernels launched via the device runtime only support + #: textures created with the Texture Object API's. + cudaErrorLaunchFileScopedTex = cyruntime.cudaError.cudaErrorLaunchFileScopedTex + + #: This error indicates that a grid launch did not occur because the + #: kernel uses file-scoped surfaces which are unsupported by the device + #: runtime. Kernels launched via the device runtime only support + #: surfaces created with the Surface Object API's. + cudaErrorLaunchFileScopedSurf = cyruntime.cudaError.cudaErrorLaunchFileScopedSurf + + #: This error indicates that a call to + #: :py:obj:`~.cudaDeviceSynchronize` made from the device runtime + #: failed because the call was made at grid depth greater than than + #: either the default (2 levels of grids) or user specified device + #: limit :py:obj:`~.cudaLimitDevRuntimeSyncDepth`. To be able to + #: synchronize on launched grids at a greater depth successfully, the + #: maximum nested depth at which :py:obj:`~.cudaDeviceSynchronize` will + #: be called must be specified with the + #: :py:obj:`~.cudaLimitDevRuntimeSyncDepth` limit to the + #: :py:obj:`~.cudaDeviceSetLimit` api before the host-side launch of a + #: kernel using the device runtime. Keep in mind that additional levels + #: of sync depth require the runtime to reserve large amounts of device + #: memory that cannot be used for user allocations. Note that + #: :py:obj:`~.cudaDeviceSynchronize` made from device runtime is only + #: supported on devices of compute capability < 9.0. + cudaErrorSyncDepthExceeded = cyruntime.cudaError.cudaErrorSyncDepthExceeded + + #: This error indicates that a device runtime grid launch failed + #: because the launch would exceed the limit + #: :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount`. For this launch + #: to proceed successfully, :py:obj:`~.cudaDeviceSetLimit` must be + #: called to set the :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` + #: to be higher than the upper bound of outstanding launches that can + #: be issued to the device runtime. Keep in mind that raising the limit + #: of pending device runtime launches will require the runtime to + #: reserve device memory that cannot be used for user allocations. + cudaErrorLaunchPendingCountExceeded = cyruntime.cudaError.cudaErrorLaunchPendingCountExceeded + + #: The requested device function does not exist or is not compiled for + #: the proper device architecture. + cudaErrorInvalidDeviceFunction = cyruntime.cudaError.cudaErrorInvalidDeviceFunction + + #: This indicates that no CUDA-capable devices were detected by the + #: installed CUDA driver. + cudaErrorNoDevice = cyruntime.cudaError.cudaErrorNoDevice + + #: This indicates that the device ordinal supplied by the user does not + #: correspond to a valid CUDA device or that the action requested is + #: invalid for the specified device. + cudaErrorInvalidDevice = cyruntime.cudaError.cudaErrorInvalidDevice + + #: This indicates that the device doesn't have a valid Grid License. + cudaErrorDeviceNotLicensed = cyruntime.cudaError.cudaErrorDeviceNotLicensed + + #: By default, the CUDA runtime may perform a minimal set of self- + #: tests, as well as CUDA driver tests, to establish the validity of + #: both. Introduced in CUDA 11.2, this error return indicates that at + #: least one of these tests has failed and the validity of either the + #: runtime or the driver could not be established. + cudaErrorSoftwareValidityNotEstablished = cyruntime.cudaError.cudaErrorSoftwareValidityNotEstablished + + #: This indicates an internal startup failure in the CUDA runtime. + cudaErrorStartupFailure = cyruntime.cudaError.cudaErrorStartupFailure + + #: This indicates that the device kernel image is invalid. + cudaErrorInvalidKernelImage = cyruntime.cudaError.cudaErrorInvalidKernelImage + + #: This most frequently indicates that there is no context bound to the + #: current thread. This can also be returned if the context passed to + #: an API call is not a valid handle (such as a context that has had + #: :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned + #: if a user mixes different API versions (i.e. 3010 context with 3020 + #: API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. + cudaErrorDeviceUninitialized = cyruntime.cudaError.cudaErrorDeviceUninitialized + + #: This indicates that the buffer object could not be mapped. + cudaErrorMapBufferObjectFailed = cyruntime.cudaError.cudaErrorMapBufferObjectFailed + + #: This indicates that the buffer object could not be unmapped. + cudaErrorUnmapBufferObjectFailed = cyruntime.cudaError.cudaErrorUnmapBufferObjectFailed + + #: This indicates that the specified array is currently mapped and thus + #: cannot be destroyed. + cudaErrorArrayIsMapped = cyruntime.cudaError.cudaErrorArrayIsMapped + + #: This indicates that the resource is already mapped. + cudaErrorAlreadyMapped = cyruntime.cudaError.cudaErrorAlreadyMapped + + #: This indicates that there is no kernel image available that is + #: suitable for the device. This can occur when a user specifies code + #: generation options for a particular CUDA source file that do not + #: include the corresponding device configuration. + cudaErrorNoKernelImageForDevice = cyruntime.cudaError.cudaErrorNoKernelImageForDevice + + #: This indicates that a resource has already been acquired. + cudaErrorAlreadyAcquired = cyruntime.cudaError.cudaErrorAlreadyAcquired + + #: This indicates that a resource is not mapped. + cudaErrorNotMapped = cyruntime.cudaError.cudaErrorNotMapped + + #: This indicates that a mapped resource is not available for access as + #: an array. + cudaErrorNotMappedAsArray = cyruntime.cudaError.cudaErrorNotMappedAsArray + + #: This indicates that a mapped resource is not available for access as + #: a pointer. + cudaErrorNotMappedAsPointer = cyruntime.cudaError.cudaErrorNotMappedAsPointer + + #: This indicates that an uncorrectable ECC error was detected during + #: execution. + cudaErrorECCUncorrectable = cyruntime.cudaError.cudaErrorECCUncorrectable + + #: This indicates that the :py:obj:`~.cudaLimit` passed to the API call + #: is not supported by the active device. + cudaErrorUnsupportedLimit = cyruntime.cudaError.cudaErrorUnsupportedLimit + + #: This indicates that a call tried to access an exclusive-thread + #: device that is already in use by a different thread. + cudaErrorDeviceAlreadyInUse = cyruntime.cudaError.cudaErrorDeviceAlreadyInUse + + #: This error indicates that P2P access is not supported across the + #: given devices. + cudaErrorPeerAccessUnsupported = cyruntime.cudaError.cudaErrorPeerAccessUnsupported + + #: A PTX compilation failed. The runtime may fall back to compiling PTX + #: if an application does not contain a suitable binary for the current + #: device. + cudaErrorInvalidPtx = cyruntime.cudaError.cudaErrorInvalidPtx + + #: This indicates an error with the OpenGL or DirectX context. + cudaErrorInvalidGraphicsContext = cyruntime.cudaError.cudaErrorInvalidGraphicsContext + + #: This indicates that an uncorrectable NVLink error was detected + #: during the execution. + cudaErrorNvlinkUncorrectable = cyruntime.cudaError.cudaErrorNvlinkUncorrectable + + #: This indicates that the PTX JIT compiler library was not found. The + #: JIT Compiler library is used for PTX compilation. The runtime may + #: fall back to compiling PTX if an application does not contain a + #: suitable binary for the current device. + cudaErrorJitCompilerNotFound = cyruntime.cudaError.cudaErrorJitCompilerNotFound + + #: This indicates that the provided PTX was compiled with an + #: unsupported toolchain. The most common reason for this, is the PTX + #: was generated by a compiler newer than what is supported by the CUDA + #: driver and PTX JIT compiler. + cudaErrorUnsupportedPtxVersion = cyruntime.cudaError.cudaErrorUnsupportedPtxVersion + + #: This indicates that the JIT compilation was disabled. The JIT + #: compilation compiles PTX. The runtime may fall back to compiling PTX + #: if an application does not contain a suitable binary for the current + #: device. + cudaErrorJitCompilationDisabled = cyruntime.cudaError.cudaErrorJitCompilationDisabled + + #: This indicates that the provided execution affinity is not supported + #: by the device. + cudaErrorUnsupportedExecAffinity = cyruntime.cudaError.cudaErrorUnsupportedExecAffinity + + #: This indicates that the code to be compiled by the PTX JIT contains + #: unsupported call to cudaDeviceSynchronize. + cudaErrorUnsupportedDevSideSync = cyruntime.cudaError.cudaErrorUnsupportedDevSideSync + + #: This indicates that an exception occurred on the device that is now + #: contained by the GPU's error containment capability. Common causes + #: are - a. Certain types of invalid accesses of peer GPU memory over + #: nvlink b. Certain classes of hardware errors This leaves the process + #: in an inconsistent state and any further CUDA work will return the + #: same error. To continue using CUDA, the process must be terminated + #: and relaunched. + cudaErrorContained = cyruntime.cudaError.cudaErrorContained + + #: This indicates that the device kernel source is invalid. + cudaErrorInvalidSource = cyruntime.cudaError.cudaErrorInvalidSource + + #: This indicates that the file specified was not found. + cudaErrorFileNotFound = cyruntime.cudaError.cudaErrorFileNotFound + + #: This indicates that a link to a shared object failed to resolve. + cudaErrorSharedObjectSymbolNotFound = cyruntime.cudaError.cudaErrorSharedObjectSymbolNotFound + + #: This indicates that initialization of a shared object failed. + cudaErrorSharedObjectInitFailed = cyruntime.cudaError.cudaErrorSharedObjectInitFailed + + #: This error indicates that an OS call failed. + cudaErrorOperatingSystem = cyruntime.cudaError.cudaErrorOperatingSystem + + #: This indicates that a resource handle passed to the API call was not + #: valid. Resource handles are opaque types like + #: :py:obj:`~.cudaStream_t` and :py:obj:`~.cudaEvent_t`. + cudaErrorInvalidResourceHandle = cyruntime.cudaError.cudaErrorInvalidResourceHandle + + #: This indicates that a resource required by the API call is not in a + #: valid state to perform the requested operation. + cudaErrorIllegalState = cyruntime.cudaError.cudaErrorIllegalState + + #: This indicates an attempt was made to introspect an object in a way + #: that would discard semantically important information. This is + #: either due to the object using funtionality newer than the API + #: version used to introspect it or omission of optional return + #: arguments. + cudaErrorLossyQuery = cyruntime.cudaError.cudaErrorLossyQuery + + #: This indicates that a named symbol was not found. Examples of + #: symbols are global/constant variable names, driver function names, + #: texture names, and surface names. + cudaErrorSymbolNotFound = cyruntime.cudaError.cudaErrorSymbolNotFound + + #: This indicates that asynchronous operations issued previously have + #: not completed yet. This result is not actually an error, but must be + #: indicated differently than :py:obj:`~.cudaSuccess` (which indicates + #: completion). Calls that may return this value include + #: :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`. + cudaErrorNotReady = cyruntime.cudaError.cudaErrorNotReady + + #: The device encountered a load or store instruction on an invalid + #: memory address. This leaves the process in an inconsistent state and + #: any further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + cudaErrorIllegalAddress = cyruntime.cudaError.cudaErrorIllegalAddress + + #: This indicates that a launch did not occur because it did not have + #: appropriate resources. Although this error is similar to + #: :py:obj:`~.cudaErrorInvalidConfiguration`, this error usually + #: indicates that the user has attempted to pass too many arguments to + #: the device kernel, or the kernel launch specifies too many threads + #: for the kernel's register count. + cudaErrorLaunchOutOfResources = cyruntime.cudaError.cudaErrorLaunchOutOfResources + + #: This indicates that the device kernel took too long to execute. This + #: can only occur if timeouts are enabled - see the device property + #: :py:obj:`~.kernelExecTimeoutEnabled` for more information. This + #: leaves the process in an inconsistent state and any further CUDA + #: work will return the same error. To continue using CUDA, the process + #: must be terminated and relaunched. + cudaErrorLaunchTimeout = cyruntime.cudaError.cudaErrorLaunchTimeout + + #: This error indicates a kernel launch that uses an incompatible + #: texturing mode. + cudaErrorLaunchIncompatibleTexturing = cyruntime.cudaError.cudaErrorLaunchIncompatibleTexturing + + #: This error indicates that a call to + #: :py:obj:`~.cudaDeviceEnablePeerAccess()` is trying to re-enable peer + #: addressing on from a context which has already had peer addressing + #: enabled. + cudaErrorPeerAccessAlreadyEnabled = cyruntime.cudaError.cudaErrorPeerAccessAlreadyEnabled + + #: This error indicates that :py:obj:`~.cudaDeviceDisablePeerAccess()` + #: is trying to disable peer addressing which has not been enabled yet + #: via :py:obj:`~.cudaDeviceEnablePeerAccess()`. + cudaErrorPeerAccessNotEnabled = cyruntime.cudaError.cudaErrorPeerAccessNotEnabled + + #: This indicates that the user has called + #: :py:obj:`~.cudaSetValidDevices()`, :py:obj:`~.cudaSetDeviceFlags()`, + #: :py:obj:`~.cudaD3D9SetDirect3DDevice()`, + #: :py:obj:`~.cudaD3D10SetDirect3DDevice`, + #: :py:obj:`~.cudaD3D11SetDirect3DDevice()`, or + #: :py:obj:`~.cudaVDPAUSetVDPAUDevice()` after initializing the CUDA + #: runtime by calling non-device management operations (allocating + #: memory and launching kernels are examples of non-device management + #: operations). This error can also be returned if using runtime/driver + #: interoperability and there is an existing :py:obj:`~.CUcontext` + #: active on the host thread. + cudaErrorSetOnActiveProcess = cyruntime.cudaError.cudaErrorSetOnActiveProcess + + #: This error indicates that the context current to the calling thread + #: has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary + #: context which has not yet been initialized. + cudaErrorContextIsDestroyed = cyruntime.cudaError.cudaErrorContextIsDestroyed + + #: An assert triggered in device code during kernel execution. The + #: device cannot be used again. All existing allocations are invalid. + #: To continue using CUDA, the process must be terminated and + #: relaunched. + cudaErrorAssert = cyruntime.cudaError.cudaErrorAssert + + #: This error indicates that the hardware resources required to enable + #: peer access have been exhausted for one or more of the devices + #: passed to :py:obj:`~.cudaEnablePeerAccess()`. + cudaErrorTooManyPeers = cyruntime.cudaError.cudaErrorTooManyPeers + + #: This error indicates that the memory range passed to + #: :py:obj:`~.cudaHostRegister()` has already been registered. + cudaErrorHostMemoryAlreadyRegistered = cyruntime.cudaError.cudaErrorHostMemoryAlreadyRegistered + + #: This error indicates that the pointer passed to + #: :py:obj:`~.cudaHostUnregister()` does not correspond to any + #: currently registered memory region. + cudaErrorHostMemoryNotRegistered = cyruntime.cudaError.cudaErrorHostMemoryNotRegistered + + #: Device encountered an error in the call stack during kernel + #: execution, possibly due to stack corruption or exceeding the stack + #: size limit. This leaves the process in an inconsistent state and any + #: further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + cudaErrorHardwareStackError = cyruntime.cudaError.cudaErrorHardwareStackError + + #: The device encountered an illegal instruction during kernel + #: execution This leaves the process in an inconsistent state and any + #: further CUDA work will return the same error. To continue using + #: CUDA, the process must be terminated and relaunched. + cudaErrorIllegalInstruction = cyruntime.cudaError.cudaErrorIllegalInstruction + + #: The device encountered a load or store instruction on a memory + #: address which is not aligned. This leaves the process in an + #: inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + cudaErrorMisalignedAddress = cyruntime.cudaError.cudaErrorMisalignedAddress + + #: While executing a kernel, the device encountered an instruction + #: which can only operate on memory locations in certain address spaces + #: (global, shared, or local), but was supplied a memory address not + #: belonging to an allowed address space. This leaves the process in an + #: inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + cudaErrorInvalidAddressSpace = cyruntime.cudaError.cudaErrorInvalidAddressSpace + + #: The device encountered an invalid program counter. This leaves the + #: process in an inconsistent state and any further CUDA work will + #: return the same error. To continue using CUDA, the process must be + #: terminated and relaunched. + cudaErrorInvalidPc = cyruntime.cudaError.cudaErrorInvalidPc + + #: An exception occurred on the device while executing a kernel. Common + #: causes include dereferencing an invalid device pointer and accessing + #: out of bounds shared memory. Less common cases can be system + #: specific - more information about these cases can be found in the + #: system specific user guide. This leaves the process in an + #: inconsistent state and any further CUDA work will return the same + #: error. To continue using CUDA, the process must be terminated and + #: relaunched. + cudaErrorLaunchFailure = cyruntime.cudaError.cudaErrorLaunchFailure + + #: This error indicates that the number of blocks launched per grid for + #: a kernel that was launched via either + #: :py:obj:`~.cudaLaunchCooperativeKernel` or + #: :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` exceeds the + #: maximum number of blocks as allowed by + #: :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or + #: :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` + #: times the number of multiprocessors as specified by the device + #: attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. + cudaErrorCooperativeLaunchTooLarge = cyruntime.cudaError.cudaErrorCooperativeLaunchTooLarge + + #: An exception occurred on the device while exiting a kernel using + #: tensor memory: the tensor memory was not completely deallocated. + #: This leaves the process in an inconsistent state and any further + #: CUDA work will return the same error. To continue using CUDA, the + #: process must be terminated and relaunched. + cudaErrorTensorMemoryLeak = cyruntime.cudaError.cudaErrorTensorMemoryLeak + + #: This error indicates the attempted operation is not permitted. + cudaErrorNotPermitted = cyruntime.cudaError.cudaErrorNotPermitted + + #: This error indicates the attempted operation is not supported on the + #: current system or device. + cudaErrorNotSupported = cyruntime.cudaError.cudaErrorNotSupported + + #: This error indicates that the system is not yet ready to start any + #: CUDA work. To continue using CUDA, verify the system configuration + #: is in a valid state and all required driver daemons are actively + #: running. More information about this error can be found in the + #: system specific user guide. + cudaErrorSystemNotReady = cyruntime.cudaError.cudaErrorSystemNotReady + + #: This error indicates that there is a mismatch between the versions + #: of the display driver and the CUDA driver. Refer to the + #: compatibility documentation for supported versions. + cudaErrorSystemDriverMismatch = cyruntime.cudaError.cudaErrorSystemDriverMismatch + + #: This error indicates that the system was upgraded to run with + #: forward compatibility but the visible hardware detected by CUDA does + #: not support this configuration. Refer to the compatibility + #: documentation for the supported hardware matrix or ensure that only + #: supported hardware is visible during initialization via the + #: CUDA_VISIBLE_DEVICES environment variable. + cudaErrorCompatNotSupportedOnDevice = cyruntime.cudaError.cudaErrorCompatNotSupportedOnDevice + + #: This error indicates that the MPS client failed to connect to the + #: MPS control daemon or the MPS server. + cudaErrorMpsConnectionFailed = cyruntime.cudaError.cudaErrorMpsConnectionFailed + + #: This error indicates that the remote procedural call between the MPS + #: server and the MPS client failed. + cudaErrorMpsRpcFailure = cyruntime.cudaError.cudaErrorMpsRpcFailure + + #: This error indicates that the MPS server is not ready to accept new + #: MPS client requests. This error can be returned when the MPS server + #: is in the process of recovering from a fatal failure. + cudaErrorMpsServerNotReady = cyruntime.cudaError.cudaErrorMpsServerNotReady + + #: This error indicates that the hardware resources required to create + #: MPS client have been exhausted. + cudaErrorMpsMaxClientsReached = cyruntime.cudaError.cudaErrorMpsMaxClientsReached + + #: This error indicates the the hardware resources required to device + #: connections have been exhausted. + cudaErrorMpsMaxConnectionsReached = cyruntime.cudaError.cudaErrorMpsMaxConnectionsReached + + #: This error indicates that the MPS client has been terminated by the + #: server. To continue using CUDA, the process must be terminated and + #: relaunched. + cudaErrorMpsClientTerminated = cyruntime.cudaError.cudaErrorMpsClientTerminated + + #: This error indicates, that the program is using CUDA Dynamic + #: Parallelism, but the current configuration, like MPS, does not + #: support it. + cudaErrorCdpNotSupported = cyruntime.cudaError.cudaErrorCdpNotSupported + + #: This error indicates, that the program contains an unsupported + #: interaction between different versions of CUDA Dynamic Parallelism. + cudaErrorCdpVersionMismatch = cyruntime.cudaError.cudaErrorCdpVersionMismatch + + #: The operation is not permitted when the stream is capturing. + cudaErrorStreamCaptureUnsupported = cyruntime.cudaError.cudaErrorStreamCaptureUnsupported + + #: The current capture sequence on the stream has been invalidated due + #: to a previous error. + cudaErrorStreamCaptureInvalidated = cyruntime.cudaError.cudaErrorStreamCaptureInvalidated + + #: The operation would have resulted in a merge of two independent + #: capture sequences. + cudaErrorStreamCaptureMerge = cyruntime.cudaError.cudaErrorStreamCaptureMerge + + #: The capture was not initiated in this stream. + cudaErrorStreamCaptureUnmatched = cyruntime.cudaError.cudaErrorStreamCaptureUnmatched + + #: The capture sequence contains a fork that was not joined to the + #: primary stream. + cudaErrorStreamCaptureUnjoined = cyruntime.cudaError.cudaErrorStreamCaptureUnjoined + + #: A dependency would have been created which crosses the capture + #: sequence boundary. Only implicit in-stream ordering dependencies are + #: allowed to cross the boundary. + cudaErrorStreamCaptureIsolation = cyruntime.cudaError.cudaErrorStreamCaptureIsolation + + #: The operation would have resulted in a disallowed implicit + #: dependency on a current capture sequence from cudaStreamLegacy. + cudaErrorStreamCaptureImplicit = cyruntime.cudaError.cudaErrorStreamCaptureImplicit + + #: The operation is not permitted on an event which was last recorded + #: in a capturing stream. + cudaErrorCapturedEvent = cyruntime.cudaError.cudaErrorCapturedEvent + + #: A stream capture sequence not initiated with the + #: :py:obj:`~.cudaStreamCaptureModeRelaxed` argument to + #: :py:obj:`~.cudaStreamBeginCapture` was passed to + #: :py:obj:`~.cudaStreamEndCapture` in a different thread. + cudaErrorStreamCaptureWrongThread = cyruntime.cudaError.cudaErrorStreamCaptureWrongThread + + #: This indicates that the wait operation has timed out. + cudaErrorTimeout = cyruntime.cudaError.cudaErrorTimeout + + #: This error indicates that the graph update was not performed because + #: it included changes which violated constraints specific to + #: instantiated graph update. + cudaErrorGraphExecUpdateFailure = cyruntime.cudaError.cudaErrorGraphExecUpdateFailure + + #: This indicates that an async error has occurred in a device outside + #: of CUDA. If CUDA was waiting for an external device's signal before + #: consuming shared data, the external device signaled an error + #: indicating that the data is not valid for consumption. This leaves + #: the process in an inconsistent state and any further CUDA work will + #: return the same error. To continue using CUDA, the process must be + #: terminated and relaunched. + cudaErrorExternalDevice = cyruntime.cudaError.cudaErrorExternalDevice + + #: This indicates that a kernel launch error has occurred due to + #: cluster misconfiguration. + cudaErrorInvalidClusterSize = cyruntime.cudaError.cudaErrorInvalidClusterSize + + #: Indiciates a function handle is not loaded when calling an API that + #: requires a loaded function. + cudaErrorFunctionNotLoaded = cyruntime.cudaError.cudaErrorFunctionNotLoaded + + #: This error indicates one or more resources passed in are not valid + #: resource types for the operation. + cudaErrorInvalidResourceType = cyruntime.cudaError.cudaErrorInvalidResourceType + + #: This error indicates one or more resources are insufficient or non- + #: applicable for the operation. + cudaErrorInvalidResourceConfiguration = cyruntime.cudaError.cudaErrorInvalidResourceConfiguration + + #: This indicates that an unknown internal error has occurred. + cudaErrorUnknown = cyruntime.cudaError.cudaErrorUnknown + cudaErrorApiFailureBase = cyruntime.cudaError.cudaErrorApiFailureBase + +_dict_cudaError_t = dict(((int(v), v) for k, v in cudaError_t.__members__.items())) + +class cudaGraphDependencyType(IntEnum): + """ + Type annotations that can be applied to graph edges as part of + :py:obj:`~.cudaGraphEdgeData`. + """ + + #: This is an ordinary dependency. + cudaGraphDependencyTypeDefault = cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeDefault + + #: This dependency type allows the downstream node to use + #: `cudaGridDependencySynchronize()`. It may only be used between + #: kernel nodes, and must be used with either the + #: :py:obj:`~.cudaGraphKernelNodePortProgrammatic` or + #: :py:obj:`~.cudaGraphKernelNodePortLaunchCompletion` outgoing port. + cudaGraphDependencyTypeProgrammatic = cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeProgrammatic + +_dict_cudaGraphDependencyType = dict(((int(v), v) for k, v in cudaGraphDependencyType.__members__.items())) + +class cudaGraphInstantiateResult(IntEnum): + """ + Graph instantiation results + """ + + #: Instantiation succeeded + cudaGraphInstantiateSuccess = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateSuccess + + #: Instantiation failed for an unexpected reason which is described in + #: the return value of the function + cudaGraphInstantiateError = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateError + + #: Instantiation failed due to invalid structure, such as cycles + cudaGraphInstantiateInvalidStructure = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateInvalidStructure + + #: Instantiation for device launch failed because the graph contained + #: an unsupported operation + cudaGraphInstantiateNodeOperationNotSupported = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateNodeOperationNotSupported + + #: Instantiation for device launch failed due to the nodes belonging to + #: different contexts + cudaGraphInstantiateMultipleDevicesNotSupported = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported + + #: One or more conditional handles are not associated with conditional + #: nodes + cudaGraphInstantiateConditionalHandleUnused = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused + +_dict_cudaGraphInstantiateResult = dict(((int(v), v) for k, v in cudaGraphInstantiateResult.__members__.items())) + +class cudaLaunchMemSyncDomain(IntEnum): + """ + Memory Synchronization Domain A kernel can be launched in a + specified memory synchronization domain that affects all memory + operations issued by that kernel. A memory barrier issued in one + domain will only order memory operations in that domain, thus + eliminating latency increase from memory barriers ordering + unrelated traffic. By default, kernels are launched in domain 0. + Kernel launched with :py:obj:`~.cudaLaunchMemSyncDomainRemote` will + have a different domain ID. User may also alter the domain ID with + :py:obj:`~.cudaLaunchMemSyncDomainMap` for a specific stream / + graph node / kernel launch. See + :py:obj:`~.cudaLaunchAttributeMemSyncDomain`, + :py:obj:`~.cudaStreamSetAttribute`, :py:obj:`~.cudaLaunchKernelEx`, + :py:obj:`~.cudaGraphKernelNodeSetAttribute`. Memory operations + done in kernels launched in different domains are considered + system-scope distanced. In other words, a GPU scoped memory + synchronization is not sufficient for memory order to be observed + by kernels in another memory synchronization domain even if they + are on the same GPU. + """ + + #: Launch kernels in the default domain + cudaLaunchMemSyncDomainDefault = cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainDefault + + #: Launch kernels in the remote domain + cudaLaunchMemSyncDomainRemote = cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainRemote + +_dict_cudaLaunchMemSyncDomain = dict(((int(v), v) for k, v in cudaLaunchMemSyncDomain.__members__.items())) + +class cudaLaunchAttributeID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.cudaLaunchAttribute` + """ + + #: Ignored entry, for convenient composition + cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. + cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. + cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative + + #: Valid for streams. See + #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. + cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. + cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. + cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference + + #: Valid for launches. Setting + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event programmatically in a future + #: CUDA release. A trigger can also be inserted at the beginning of + #: each block's execution if triggerAtBlockStart is set to non-0. The + #: dependent launches can choose to wait on the dependency using the + #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cudaEventSynchronize()` may only observe the event + #: trigger long after the associated kernel has completed. This + #: recording type is primarily meant for establishing programmatic + #: dependency between device tasks. Note also this type of dependency + #: allows, but does not guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.priority`. + cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. + cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. + cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to + #: this functionality, a node cannot opt out, and any attempt to set + #: the deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a + #: percentage between 0-100 signals sets the shared memory carveout + #: preference in percent of the total shared memory for that kernel + #: launch. This attribute takes precedence over + #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is + #: only a hint, and the driver can choose a different configuration if + #: required for the launch. + cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout + +_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + +class cudaAsyncNotificationType(IntEnum): + """ + Types of async notification that can occur + """ + + #: Sent when the process has exceeded its device memory budget + cudaAsyncNotificationTypeOverBudget = cyruntime.cudaAsyncNotificationType_enum.cudaAsyncNotificationTypeOverBudget + +_dict_cudaAsyncNotificationType = dict(((int(v), v) for k, v in cudaAsyncNotificationType.__members__.items())) + +class cudaDataType(IntEnum): + """""" + CUDA_R_32F = cyruntime.cudaDataType_t.CUDA_R_32F + CUDA_R_64F = cyruntime.cudaDataType_t.CUDA_R_64F + CUDA_R_16F = cyruntime.cudaDataType_t.CUDA_R_16F + CUDA_R_8I = cyruntime.cudaDataType_t.CUDA_R_8I + CUDA_C_32F = cyruntime.cudaDataType_t.CUDA_C_32F + CUDA_C_64F = cyruntime.cudaDataType_t.CUDA_C_64F + CUDA_C_16F = cyruntime.cudaDataType_t.CUDA_C_16F + CUDA_C_8I = cyruntime.cudaDataType_t.CUDA_C_8I + CUDA_R_8U = cyruntime.cudaDataType_t.CUDA_R_8U + CUDA_C_8U = cyruntime.cudaDataType_t.CUDA_C_8U + CUDA_R_32I = cyruntime.cudaDataType_t.CUDA_R_32I + CUDA_C_32I = cyruntime.cudaDataType_t.CUDA_C_32I + CUDA_R_32U = cyruntime.cudaDataType_t.CUDA_R_32U + CUDA_C_32U = cyruntime.cudaDataType_t.CUDA_C_32U + CUDA_R_16BF = cyruntime.cudaDataType_t.CUDA_R_16BF + CUDA_C_16BF = cyruntime.cudaDataType_t.CUDA_C_16BF + CUDA_R_4I = cyruntime.cudaDataType_t.CUDA_R_4I + CUDA_C_4I = cyruntime.cudaDataType_t.CUDA_C_4I + CUDA_R_4U = cyruntime.cudaDataType_t.CUDA_R_4U + CUDA_C_4U = cyruntime.cudaDataType_t.CUDA_C_4U + CUDA_R_16I = cyruntime.cudaDataType_t.CUDA_R_16I + CUDA_C_16I = cyruntime.cudaDataType_t.CUDA_C_16I + CUDA_R_16U = cyruntime.cudaDataType_t.CUDA_R_16U + CUDA_C_16U = cyruntime.cudaDataType_t.CUDA_C_16U + CUDA_R_64I = cyruntime.cudaDataType_t.CUDA_R_64I + CUDA_C_64I = cyruntime.cudaDataType_t.CUDA_C_64I + CUDA_R_64U = cyruntime.cudaDataType_t.CUDA_R_64U + CUDA_C_64U = cyruntime.cudaDataType_t.CUDA_C_64U + CUDA_R_8F_E4M3 = cyruntime.cudaDataType_t.CUDA_R_8F_E4M3 + CUDA_R_8F_UE4M3 = cyruntime.cudaDataType_t.CUDA_R_8F_UE4M3 + CUDA_R_8F_E5M2 = cyruntime.cudaDataType_t.CUDA_R_8F_E5M2 + CUDA_R_8F_UE8M0 = cyruntime.cudaDataType_t.CUDA_R_8F_UE8M0 + CUDA_R_6F_E2M3 = cyruntime.cudaDataType_t.CUDA_R_6F_E2M3 + CUDA_R_6F_E3M2 = cyruntime.cudaDataType_t.CUDA_R_6F_E3M2 + CUDA_R_4F_E2M1 = cyruntime.cudaDataType_t.CUDA_R_4F_E2M1 + +_dict_cudaDataType = dict(((int(v), v) for k, v in cudaDataType.__members__.items())) + +class libraryPropertyType(IntEnum): + """""" + MAJOR_VERSION = cyruntime.libraryPropertyType_t.MAJOR_VERSION + MINOR_VERSION = cyruntime.libraryPropertyType_t.MINOR_VERSION + PATCH_LEVEL = cyruntime.libraryPropertyType_t.PATCH_LEVEL + +_dict_libraryPropertyType = dict(((int(v), v) for k, v in libraryPropertyType.__members__.items())) + +class cudaEglFrameType(IntEnum): + """ + CUDA EglFrame type - array or pointer + """ + + #: Frame type CUDA array + cudaEglFrameTypeArray = cyruntime.cudaEglFrameType_enum.cudaEglFrameTypeArray + + #: Frame type CUDA pointer + cudaEglFrameTypePitch = cyruntime.cudaEglFrameType_enum.cudaEglFrameTypePitch + +_dict_cudaEglFrameType = dict(((int(v), v) for k, v in cudaEglFrameType.__members__.items())) + +class cudaEglResourceLocationFlags(IntEnum): + """ + Resource location flags- sysmem or vidmem For CUDA context on + iGPU, since video and system memory are equivalent - these flags + will not have an effect on the execution. For CUDA context on + dGPU, applications can use the flag + :py:obj:`~.cudaEglResourceLocationFlags` to give a hint about the + desired location. :py:obj:`~.cudaEglResourceLocationSysmem` - the + frame data is made resident on the system memory to be accessed by + CUDA. :py:obj:`~.cudaEglResourceLocationVidmem` - the frame data + is made resident on the dedicated video memory to be accessed by + CUDA. There may be an additional latency due to new allocation and + data migration, if the frame is produced on a different memory. + """ + + #: Resource location sysmem + cudaEglResourceLocationSysmem = cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationSysmem + + #: Resource location vidmem + cudaEglResourceLocationVidmem = cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationVidmem + +_dict_cudaEglResourceLocationFlags = dict(((int(v), v) for k, v in cudaEglResourceLocationFlags.__members__.items())) + +class cudaEglColorFormat(IntEnum): + """ + CUDA EGL Color Format - The different planar and multiplanar + formats currently supported for CUDA_EGL interops. + """ + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYUV420Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar + + #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, + #: width, height ratio same as YUV420Planar. + cudaEglColorFormatYUV420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar + + #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V + #: height = Y height. + cudaEglColorFormatYUV422Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar + + #: Y, UV in two surfaces with VU byte ordering, width, height ratio + #: same as YUV422Planar. + cudaEglColorFormatYUV422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar + + #: R/G/B/A four channels in one surface with BGRA byte ordering. + cudaEglColorFormatARGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatARGB + + #: R/G/B/A four channels in one surface with ABGR byte ordering. + cudaEglColorFormatRGBA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRGBA + + #: single luminance channel in one surface. + cudaEglColorFormatL = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatL + + #: single color channel in one surface. + cudaEglColorFormatR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatR + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y + #: width, U/V height = Y height. + cudaEglColorFormatYUV444Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar + + #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, + #: width, height ratio same as YUV444Planar. + cudaEglColorFormatYUV444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + cudaEglColorFormatYUYV422 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV422 + + #: Y, U, V in one surface, interleaved as YUYV in one channel. + cudaEglColorFormatUYVY422 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY422 + + #: R/G/B/A four channels in one surface with RGBA byte ordering. + cudaEglColorFormatABGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatABGR + + #: R/G/B/A four channels in one surface with ARGB byte ordering. + cudaEglColorFormatBGRA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBGRA + + #: Alpha color format - one channel in one surface. + cudaEglColorFormatA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatA + + #: R/G color format - two channels in one surface with GR byte ordering + cudaEglColorFormatRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRG + + #: Y, U, V, A four channels in one surface, interleaved as VUYA. + cudaEglColorFormatAYUV = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = Y width, U/V height = Y height. + cudaEglColorFormatYVU444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = 1/2 Y width, U/V height = Y height. + cudaEglColorFormatYVU422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar + + #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYVU420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar + + #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = Y width, U/V height = Y height. + cudaEglColorFormatY10V10U10_444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar + + #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY10V10U10_420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar + + #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = Y width, U/V height = Y height. + cudaEglColorFormatY12V12U12_444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar + + #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte + #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY12V12U12_420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar + + #: Extended Range Y, U, V in one surface, interleaved as YVYU in one + #: channel. + cudaEglColorFormatVYUY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY_ER + + #: Extended Range Y, U, V in one surface, interleaved as YUYV in one + #: channel. + cudaEglColorFormatUYVY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY_ER + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + cudaEglColorFormatYUYV_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV_ER + + #: Extended Range Y, U, V in one surface, interleaved as VYUY in one + #: channel. + cudaEglColorFormatYVYU_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU_ER + + #: Extended Range Y, U, V, A four channels in one surface, interleaved + #: as AVUY. + cudaEglColorFormatYUVA_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA_ER + + #: Extended Range Y, U, V, A four channels in one surface, interleaved + #: as VUYA. + cudaEglColorFormatAYUV_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V + #: height = Y height. + cudaEglColorFormatYUV444Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, + #: U/V height = Y height. + cudaEglColorFormatYUV422Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar_ER + + #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYUV420Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = Y width, U/V height = Y height. + cudaEglColorFormatYUV444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + cudaEglColorFormatYUV422SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar_ER + + #: Extended Range Y, UV in two surfaces (UV as one surface) with VU + #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYUV420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V + #: height = Y height. + cudaEglColorFormatYVU444Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, + #: U/V height = Y height. + cudaEglColorFormatYVU422Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar_ER + + #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYVU420Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = Y width, U/V height = Y height. + cudaEglColorFormatYVU444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. + cudaEglColorFormatYVU422SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar_ER + + #: Extended Range Y, VU in two surfaces (VU as one surface) with UV + #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYVU420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_ER + + #: Bayer format - one channel in one surface with interleaved RGGB + #: ordering. + cudaEglColorFormatBayerRGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRGGB + + #: Bayer format - one channel in one surface with interleaved BGGR + #: ordering. + cudaEglColorFormatBayerBGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBGGR + + #: Bayer format - one channel in one surface with interleaved GRBG + #: ordering. + cudaEglColorFormatBayerGRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGRBG + + #: Bayer format - one channel in one surface with interleaved GBRG + #: ordering. + cudaEglColorFormatBayerGBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGBRG + + #: Bayer10 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + cudaEglColorFormatBayer10RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10RGGB + + #: Bayer10 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + cudaEglColorFormatBayer10BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10BGGR + + #: Bayer10 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + cudaEglColorFormatBayer10GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GRBG + + #: Bayer10 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + cudaEglColorFormatBayer10GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GBRG + + #: Bayer12 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RGGB + + #: Bayer12 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BGGR + + #: Bayer12 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GRBG + + #: Bayer12 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GBRG + + #: Bayer14 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + cudaEglColorFormatBayer14RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14RGGB + + #: Bayer14 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + cudaEglColorFormatBayer14BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14BGGR + + #: Bayer14 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + cudaEglColorFormatBayer14GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GRBG + + #: Bayer14 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. + cudaEglColorFormatBayer14GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GBRG + + #: Bayer20 format - one channel in one surface with interleaved RGGB + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + cudaEglColorFormatBayer20RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20RGGB + + #: Bayer20 format - one channel in one surface with interleaved BGGR + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + cudaEglColorFormatBayer20BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20BGGR + + #: Bayer20 format - one channel in one surface with interleaved GRBG + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + cudaEglColorFormatBayer20GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GRBG + + #: Bayer20 format - one channel in one surface with interleaved GBRG + #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. + cudaEglColorFormatBayer20GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GBRG + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y + #: width, U/V height = Y height. + cudaEglColorFormatYVU444Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = Y height. + cudaEglColorFormatYVU422Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYVU420Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved RGGB ordering and mapped to opaque integer + #: datatype. + cudaEglColorFormatBayerIspRGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspRGGB + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved BGGR ordering and mapped to opaque integer + #: datatype. + cudaEglColorFormatBayerIspBGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspBGGR + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved GRBG ordering and mapped to opaque integer + #: datatype. + cudaEglColorFormatBayerIspGRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGRBG + + #: Nvidia proprietary Bayer ISP format - one channel in one surface + #: with interleaved GBRG ordering and mapped to opaque integer + #: datatype. + cudaEglColorFormatBayerIspGBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGBRG + + #: Bayer format - one channel in one surface with interleaved BCCR + #: ordering. + cudaEglColorFormatBayerBCCR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBCCR + + #: Bayer format - one channel in one surface with interleaved RCCB + #: ordering. + cudaEglColorFormatBayerRCCB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRCCB + + #: Bayer format - one channel in one surface with interleaved CRBC + #: ordering. + cudaEglColorFormatBayerCRBC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCRBC + + #: Bayer format - one channel in one surface with interleaved CBRC + #: ordering. + cudaEglColorFormatBayerCBRC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCBRC + + #: Bayer10 format - one channel in one surface with interleaved CCCC + #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. + cudaEglColorFormatBayer10CCCC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10CCCC + + #: Bayer12 format - one channel in one surface with interleaved BCCR + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12BCCR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BCCR + + #: Bayer12 format - one channel in one surface with interleaved RCCB + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12RCCB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RCCB + + #: Bayer12 format - one channel in one surface with interleaved CRBC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12CRBC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CRBC + + #: Bayer12 format - one channel in one surface with interleaved CBRC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12CBRC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CBRC + + #: Bayer12 format - one channel in one surface with interleaved CCCC + #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. + cudaEglColorFormatBayer12CCCC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CCCC + + #: Color format for single Y plane. + cudaEglColorFormatY = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY + + #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYUV420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_2020 + + #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYVU420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_2020 + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYUV420Planar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_2020 + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYVU420Planar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_2020 + + #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYUV420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_709 + + #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, + #: U/V height = 1/2 Y height. + cudaEglColorFormatYVU420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_709 + + #: Y, U, V in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYUV420Planar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_709 + + #: Y, V, U in three surfaces, each in a separate surface, U/V width = + #: 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatYVU420Planar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_709 + + #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y + #: width, U/V height = 1/2 Y height. + cudaEglColorFormatY10V10U10_420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709 + + #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y + #: width, U/V height = 1/2 Y height. + cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_2020 + + #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_2020 + + #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + cudaEglColorFormatY10V10U10_422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar + + #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y + #: width, U/V height = Y height. + cudaEglColorFormatY10V10U10_422SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_709 + + #: Extended Range Color format for single Y plane. + cudaEglColorFormatY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_ER + + #: Extended Range Color format for single Y plane. + cudaEglColorFormatY_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_709_ER + + #: Extended Range Color format for single Y10 plane. + cudaEglColorFormatY10_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_ER + + #: Extended Range Color format for single Y10 plane. + cudaEglColorFormatY10_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_709_ER + + #: Extended Range Color format for single Y12 plane. + cudaEglColorFormatY12_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_ER + + #: Extended Range Color format for single Y12 plane. + cudaEglColorFormatY12_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_709_ER + + #: Y, U, V, A four channels in one surface, interleaved as AVUY. + cudaEglColorFormatYUVA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA + + #: Y, U, V in one surface, interleaved as YVYU in one channel. + cudaEglColorFormatYVYU = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU + + #: Y, U, V in one surface, interleaved as VYUY in one channel. + cudaEglColorFormatVYUY = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY10V10U10_420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_ER + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + cudaEglColorFormatY10V10U10_444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_ER + + #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY12V12U12_420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = 1/2 Y width, U/V height = 1/2 Y height. + cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + cudaEglColorFormatY12V12U12_444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_ER + + #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V + #: width = Y width, U/V height = Y height. + cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + cudaEglColorFormatUYVY709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709 + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + cudaEglColorFormatUYVY709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709_ER + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + cudaEglColorFormatUYVY2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY2020 + +_dict_cudaEglColorFormat = dict(((int(v), v) for k, v in cudaEglColorFormat.__members__.items())) + +class cudaChannelFormatKind(IntEnum): + """ + Channel format kind + """ + + #: Signed channel format + cudaChannelFormatKindSigned = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSigned + + #: Unsigned channel format + cudaChannelFormatKindUnsigned = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsigned + + #: Float channel format + cudaChannelFormatKindFloat = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindFloat + + #: No channel format + cudaChannelFormatKindNone = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNone + + #: Unsigned 8-bit integers, planar 4:2:0 YUV format + cudaChannelFormatKindNV12 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNV12 + + #: 1 channel unsigned 8-bit normalized integer + cudaChannelFormatKindUnsignedNormalized8X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1 + + #: 2 channel unsigned 8-bit normalized integer + cudaChannelFormatKindUnsignedNormalized8X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2 + + #: 4 channel unsigned 8-bit normalized integer + cudaChannelFormatKindUnsignedNormalized8X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4 + + #: 1 channel unsigned 16-bit normalized integer + cudaChannelFormatKindUnsignedNormalized16X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1 + + #: 2 channel unsigned 16-bit normalized integer + cudaChannelFormatKindUnsignedNormalized16X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2 + + #: 4 channel unsigned 16-bit normalized integer + cudaChannelFormatKindUnsignedNormalized16X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4 + + #: 1 channel signed 8-bit normalized integer + cudaChannelFormatKindSignedNormalized8X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1 + + #: 2 channel signed 8-bit normalized integer + cudaChannelFormatKindSignedNormalized8X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2 + + #: 4 channel signed 8-bit normalized integer + cudaChannelFormatKindSignedNormalized8X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4 + + #: 1 channel signed 16-bit normalized integer + cudaChannelFormatKindSignedNormalized16X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1 + + #: 2 channel signed 16-bit normalized integer + cudaChannelFormatKindSignedNormalized16X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2 + + #: 4 channel signed 16-bit normalized integer + cudaChannelFormatKindSignedNormalized16X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4 + + #: 4 channel unsigned normalized block-compressed (BC1 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1 + + #: 4 channel unsigned normalized block-compressed (BC1 compression) + #: format with sRGB encoding + cudaChannelFormatKindUnsignedBlockCompressed1SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB + + #: 4 channel unsigned normalized block-compressed (BC2 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2 + + #: 4 channel unsigned normalized block-compressed (BC2 compression) + #: format with sRGB encoding + cudaChannelFormatKindUnsignedBlockCompressed2SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB + + #: 4 channel unsigned normalized block-compressed (BC3 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed3 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3 + + #: 4 channel unsigned normalized block-compressed (BC3 compression) + #: format with sRGB encoding + cudaChannelFormatKindUnsignedBlockCompressed3SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB + + #: 1 channel unsigned normalized block-compressed (BC4 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4 + + #: 1 channel signed normalized block-compressed (BC4 compression) + #: format + cudaChannelFormatKindSignedBlockCompressed4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4 + + #: 2 channel unsigned normalized block-compressed (BC5 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed5 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5 + + #: 2 channel signed normalized block-compressed (BC5 compression) + #: format + cudaChannelFormatKindSignedBlockCompressed5 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5 + + #: 3 channel unsigned half-float block-compressed (BC6H compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed6H = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H + + #: 3 channel signed half-float block-compressed (BC6H compression) + #: format + cudaChannelFormatKindSignedBlockCompressed6H = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H + + #: 4 channel unsigned normalized block-compressed (BC7 compression) + #: format + cudaChannelFormatKindUnsignedBlockCompressed7 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7 + + #: 4 channel unsigned normalized block-compressed (BC7 compression) + #: format with sRGB encoding + cudaChannelFormatKindUnsignedBlockCompressed7SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB + + #: 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format + cudaChannelFormatKindUnsignedNormalized1010102 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + +_dict_cudaChannelFormatKind = dict(((int(v), v) for k, v in cudaChannelFormatKind.__members__.items())) + +class cudaMemoryType(IntEnum): + """ + CUDA memory types + """ + + #: Unregistered memory + cudaMemoryTypeUnregistered = cyruntime.cudaMemoryType.cudaMemoryTypeUnregistered + + #: Host memory + cudaMemoryTypeHost = cyruntime.cudaMemoryType.cudaMemoryTypeHost + + #: Device memory + cudaMemoryTypeDevice = cyruntime.cudaMemoryType.cudaMemoryTypeDevice + + #: Managed memory + cudaMemoryTypeManaged = cyruntime.cudaMemoryType.cudaMemoryTypeManaged + +_dict_cudaMemoryType = dict(((int(v), v) for k, v in cudaMemoryType.__members__.items())) + +class cudaMemcpyKind(IntEnum): + """ + CUDA memory copy types + """ + + #: Host -> Host + cudaMemcpyHostToHost = cyruntime.cudaMemcpyKind.cudaMemcpyHostToHost + + #: Host -> Device + cudaMemcpyHostToDevice = cyruntime.cudaMemcpyKind.cudaMemcpyHostToDevice + + #: Device -> Host + cudaMemcpyDeviceToHost = cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToHost + + #: Device -> Device + cudaMemcpyDeviceToDevice = cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToDevice + + #: Direction of the transfer is inferred from the pointer values. + #: Requires unified virtual addressing + cudaMemcpyDefault = cyruntime.cudaMemcpyKind.cudaMemcpyDefault + +_dict_cudaMemcpyKind = dict(((int(v), v) for k, v in cudaMemcpyKind.__members__.items())) + +class cudaAccessProperty(IntEnum): + """ + Specifies performance hint with :py:obj:`~.cudaAccessPolicyWindow` + for hitProp and missProp members. + """ + + #: Normal cache persistence. + cudaAccessPropertyNormal = cyruntime.cudaAccessProperty.cudaAccessPropertyNormal + + #: Streaming access is less likely to persit from cache. + cudaAccessPropertyStreaming = cyruntime.cudaAccessProperty.cudaAccessPropertyStreaming + + #: Persisting access is more likely to persist in cache. + cudaAccessPropertyPersisting = cyruntime.cudaAccessProperty.cudaAccessPropertyPersisting + +_dict_cudaAccessProperty = dict(((int(v), v) for k, v in cudaAccessProperty.__members__.items())) + +class cudaStreamCaptureStatus(IntEnum): + """ + Possible stream capture statuses returned by + :py:obj:`~.cudaStreamIsCapturing` + """ + + #: Stream is not capturing + cudaStreamCaptureStatusNone = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusNone + + #: Stream is actively capturing + cudaStreamCaptureStatusActive = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusActive + + #: Stream is part of a capture sequence that has been invalidated, but + #: not terminated + cudaStreamCaptureStatusInvalidated = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated + +_dict_cudaStreamCaptureStatus = dict(((int(v), v) for k, v in cudaStreamCaptureStatus.__members__.items())) + +class cudaStreamCaptureMode(IntEnum): + """ + Possible modes for stream capture thread interactions. For more + details see :py:obj:`~.cudaStreamBeginCapture` and + :py:obj:`~.cudaThreadExchangeStreamCaptureMode` + """ + cudaStreamCaptureModeGlobal = cyruntime.cudaStreamCaptureMode.cudaStreamCaptureModeGlobal + cudaStreamCaptureModeThreadLocal = cyruntime.cudaStreamCaptureMode.cudaStreamCaptureModeThreadLocal + cudaStreamCaptureModeRelaxed = cyruntime.cudaStreamCaptureMode.cudaStreamCaptureModeRelaxed + +_dict_cudaStreamCaptureMode = dict(((int(v), v) for k, v in cudaStreamCaptureMode.__members__.items())) + +class cudaSynchronizationPolicy(IntEnum): + """ + + """ + cudaSyncPolicyAuto = cyruntime.cudaSynchronizationPolicy.cudaSyncPolicyAuto + cudaSyncPolicySpin = cyruntime.cudaSynchronizationPolicy.cudaSyncPolicySpin + cudaSyncPolicyYield = cyruntime.cudaSynchronizationPolicy.cudaSyncPolicyYield + cudaSyncPolicyBlockingSync = cyruntime.cudaSynchronizationPolicy.cudaSyncPolicyBlockingSync + +_dict_cudaSynchronizationPolicy = dict(((int(v), v) for k, v in cudaSynchronizationPolicy.__members__.items())) + +class cudaClusterSchedulingPolicy(IntEnum): + """ + Cluster scheduling policies. These may be passed to + :py:obj:`~.cudaFuncSetAttribute` + """ + + #: the default policy + cudaClusterSchedulingPolicyDefault = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyDefault + + #: spread the blocks within a cluster to the SMs + cudaClusterSchedulingPolicySpread = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicySpread + + #: allow the hardware to load-balance the blocks in a cluster to the + #: SMs + cudaClusterSchedulingPolicyLoadBalancing = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyLoadBalancing + +_dict_cudaClusterSchedulingPolicy = dict(((int(v), v) for k, v in cudaClusterSchedulingPolicy.__members__.items())) + +class cudaStreamUpdateCaptureDependenciesFlags(IntEnum): + """ + Flags for :py:obj:`~.cudaStreamUpdateCaptureDependencies` + """ + + #: Add new nodes to the dependency set + cudaStreamAddCaptureDependencies = cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies + + #: Replace the dependency set with the new nodes + cudaStreamSetCaptureDependencies = cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamSetCaptureDependencies + +_dict_cudaStreamUpdateCaptureDependenciesFlags = dict(((int(v), v) for k, v in cudaStreamUpdateCaptureDependenciesFlags.__members__.items())) + +class cudaUserObjectFlags(IntEnum): + """ + Flags for user objects for graphs + """ + + #: Indicates the destructor execution is not synchronized by any CUDA + #: handle. + cudaUserObjectNoDestructorSync = cyruntime.cudaUserObjectFlags.cudaUserObjectNoDestructorSync + +_dict_cudaUserObjectFlags = dict(((int(v), v) for k, v in cudaUserObjectFlags.__members__.items())) + +class cudaUserObjectRetainFlags(IntEnum): + """ + Flags for retaining user object references for graphs + """ + + #: Transfer references from the caller rather than creating new + #: references. + cudaGraphUserObjectMove = cyruntime.cudaUserObjectRetainFlags.cudaGraphUserObjectMove + +_dict_cudaUserObjectRetainFlags = dict(((int(v), v) for k, v in cudaUserObjectRetainFlags.__members__.items())) + +class cudaGraphicsRegisterFlags(IntEnum): + """ + CUDA graphics interop register flags + """ + + #: Default + cudaGraphicsRegisterFlagsNone = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsNone + + #: CUDA will not write to this resource + cudaGraphicsRegisterFlagsReadOnly = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsReadOnly + + #: CUDA will only write to and will not read from this resource + cudaGraphicsRegisterFlagsWriteDiscard = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard + + #: CUDA will bind this resource to a surface reference + cudaGraphicsRegisterFlagsSurfaceLoadStore = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsSurfaceLoadStore + + #: CUDA will perform texture gather operations on this resource + cudaGraphicsRegisterFlagsTextureGather = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsTextureGather + +_dict_cudaGraphicsRegisterFlags = dict(((int(v), v) for k, v in cudaGraphicsRegisterFlags.__members__.items())) + +class cudaGraphicsMapFlags(IntEnum): + """ + CUDA graphics interop map flags + """ + + #: Default; Assume resource can be read/written + cudaGraphicsMapFlagsNone = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsNone + + #: CUDA will not write to this resource + cudaGraphicsMapFlagsReadOnly = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsReadOnly + + #: CUDA will only write to and will not read from this resource + cudaGraphicsMapFlagsWriteDiscard = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsWriteDiscard + +_dict_cudaGraphicsMapFlags = dict(((int(v), v) for k, v in cudaGraphicsMapFlags.__members__.items())) + +class cudaGraphicsCubeFace(IntEnum): + """ + CUDA graphics interop array indices for cube maps + """ + + #: Positive X face of cubemap + cudaGraphicsCubeFacePositiveX = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveX + + #: Negative X face of cubemap + cudaGraphicsCubeFaceNegativeX = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeX + + #: Positive Y face of cubemap + cudaGraphicsCubeFacePositiveY = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveY + + #: Negative Y face of cubemap + cudaGraphicsCubeFaceNegativeY = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeY + + #: Positive Z face of cubemap + cudaGraphicsCubeFacePositiveZ = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveZ + + #: Negative Z face of cubemap + cudaGraphicsCubeFaceNegativeZ = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeZ + +_dict_cudaGraphicsCubeFace = dict(((int(v), v) for k, v in cudaGraphicsCubeFace.__members__.items())) + +class cudaResourceType(IntEnum): + """ + CUDA resource types + """ + + #: Array resource + cudaResourceTypeArray = cyruntime.cudaResourceType.cudaResourceTypeArray + + #: Mipmapped array resource + cudaResourceTypeMipmappedArray = cyruntime.cudaResourceType.cudaResourceTypeMipmappedArray + + #: Linear resource + cudaResourceTypeLinear = cyruntime.cudaResourceType.cudaResourceTypeLinear + + #: Pitch 2D resource + cudaResourceTypePitch2D = cyruntime.cudaResourceType.cudaResourceTypePitch2D + +_dict_cudaResourceType = dict(((int(v), v) for k, v in cudaResourceType.__members__.items())) + +class cudaResourceViewFormat(IntEnum): + """ + CUDA texture resource view formats + """ + + #: No resource view format (use underlying resource format) + cudaResViewFormatNone = cyruntime.cudaResourceViewFormat.cudaResViewFormatNone + + #: 1 channel unsigned 8-bit integers + cudaResViewFormatUnsignedChar1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar1 + + #: 2 channel unsigned 8-bit integers + cudaResViewFormatUnsignedChar2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar2 + + #: 4 channel unsigned 8-bit integers + cudaResViewFormatUnsignedChar4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar4 + + #: 1 channel signed 8-bit integers + cudaResViewFormatSignedChar1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar1 + + #: 2 channel signed 8-bit integers + cudaResViewFormatSignedChar2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar2 + + #: 4 channel signed 8-bit integers + cudaResViewFormatSignedChar4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar4 + + #: 1 channel unsigned 16-bit integers + cudaResViewFormatUnsignedShort1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort1 + + #: 2 channel unsigned 16-bit integers + cudaResViewFormatUnsignedShort2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort2 + + #: 4 channel unsigned 16-bit integers + cudaResViewFormatUnsignedShort4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort4 + + #: 1 channel signed 16-bit integers + cudaResViewFormatSignedShort1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort1 + + #: 2 channel signed 16-bit integers + cudaResViewFormatSignedShort2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort2 + + #: 4 channel signed 16-bit integers + cudaResViewFormatSignedShort4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort4 + + #: 1 channel unsigned 32-bit integers + cudaResViewFormatUnsignedInt1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt1 + + #: 2 channel unsigned 32-bit integers + cudaResViewFormatUnsignedInt2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt2 + + #: 4 channel unsigned 32-bit integers + cudaResViewFormatUnsignedInt4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt4 + + #: 1 channel signed 32-bit integers + cudaResViewFormatSignedInt1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt1 + + #: 2 channel signed 32-bit integers + cudaResViewFormatSignedInt2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt2 + + #: 4 channel signed 32-bit integers + cudaResViewFormatSignedInt4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt4 + + #: 1 channel 16-bit floating point + cudaResViewFormatHalf1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf1 + + #: 2 channel 16-bit floating point + cudaResViewFormatHalf2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf2 + + #: 4 channel 16-bit floating point + cudaResViewFormatHalf4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf4 + + #: 1 channel 32-bit floating point + cudaResViewFormatFloat1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat1 + + #: 2 channel 32-bit floating point + cudaResViewFormatFloat2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat2 + + #: 4 channel 32-bit floating point + cudaResViewFormatFloat4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat4 + + #: Block compressed 1 + cudaResViewFormatUnsignedBlockCompressed1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed1 + + #: Block compressed 2 + cudaResViewFormatUnsignedBlockCompressed2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed2 + + #: Block compressed 3 + cudaResViewFormatUnsignedBlockCompressed3 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed3 + + #: Block compressed 4 unsigned + cudaResViewFormatUnsignedBlockCompressed4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed4 + + #: Block compressed 4 signed + cudaResViewFormatSignedBlockCompressed4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed4 + + #: Block compressed 5 unsigned + cudaResViewFormatUnsignedBlockCompressed5 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed5 + + #: Block compressed 5 signed + cudaResViewFormatSignedBlockCompressed5 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed5 + + #: Block compressed 6 unsigned half-float + cudaResViewFormatUnsignedBlockCompressed6H = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed6H + + #: Block compressed 6 signed half-float + cudaResViewFormatSignedBlockCompressed6H = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed6H + + #: Block compressed 7 + cudaResViewFormatUnsignedBlockCompressed7 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed7 + +_dict_cudaResourceViewFormat = dict(((int(v), v) for k, v in cudaResourceViewFormat.__members__.items())) + +class cudaFuncAttribute(IntEnum): + """ + CUDA function attributes that can be set using + :py:obj:`~.cudaFuncSetAttribute` + """ + + #: Maximum dynamic shared memory size + cudaFuncAttributeMaxDynamicSharedMemorySize = cyruntime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize + + #: Preferred shared memory-L1 cache split + cudaFuncAttributePreferredSharedMemoryCarveout = cyruntime.cudaFuncAttribute.cudaFuncAttributePreferredSharedMemoryCarveout + + #: Indicator to enforce valid cluster dimension specification on kernel + #: launch + cudaFuncAttributeClusterDimMustBeSet = cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterDimMustBeSet + + #: Required cluster width + cudaFuncAttributeRequiredClusterWidth = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterWidth + + #: Required cluster height + cudaFuncAttributeRequiredClusterHeight = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterHeight + + #: Required cluster depth + cudaFuncAttributeRequiredClusterDepth = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterDepth + + #: Whether non-portable cluster scheduling policy is supported + cudaFuncAttributeNonPortableClusterSizeAllowed = cyruntime.cudaFuncAttribute.cudaFuncAttributeNonPortableClusterSizeAllowed + + #: Required cluster scheduling policy preference + cudaFuncAttributeClusterSchedulingPolicyPreference = cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterSchedulingPolicyPreference + cudaFuncAttributeMax = cyruntime.cudaFuncAttribute.cudaFuncAttributeMax + +_dict_cudaFuncAttribute = dict(((int(v), v) for k, v in cudaFuncAttribute.__members__.items())) + +class cudaFuncCache(IntEnum): + """ + CUDA function cache configurations + """ + + #: Default function cache configuration, no preference + cudaFuncCachePreferNone = cyruntime.cudaFuncCache.cudaFuncCachePreferNone + + #: Prefer larger shared memory and smaller L1 cache + cudaFuncCachePreferShared = cyruntime.cudaFuncCache.cudaFuncCachePreferShared + + #: Prefer larger L1 cache and smaller shared memory + cudaFuncCachePreferL1 = cyruntime.cudaFuncCache.cudaFuncCachePreferL1 + + #: Prefer equal size L1 cache and shared memory + cudaFuncCachePreferEqual = cyruntime.cudaFuncCache.cudaFuncCachePreferEqual + +_dict_cudaFuncCache = dict(((int(v), v) for k, v in cudaFuncCache.__members__.items())) + +class cudaSharedMemConfig(IntEnum): + """ + CUDA shared memory configuration [Deprecated] + """ + cudaSharedMemBankSizeDefault = cyruntime.cudaSharedMemConfig.cudaSharedMemBankSizeDefault + cudaSharedMemBankSizeFourByte = cyruntime.cudaSharedMemConfig.cudaSharedMemBankSizeFourByte + cudaSharedMemBankSizeEightByte = cyruntime.cudaSharedMemConfig.cudaSharedMemBankSizeEightByte + +_dict_cudaSharedMemConfig = dict(((int(v), v) for k, v in cudaSharedMemConfig.__members__.items())) + +class cudaSharedCarveout(IntEnum): + """ + Shared memory carveout configurations. These may be passed to + cudaFuncSetAttribute + """ + + #: No preference for shared memory or L1 (default) + cudaSharedmemCarveoutDefault = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutDefault + + #: Prefer maximum available L1 cache, minimum shared memory + cudaSharedmemCarveoutMaxL1 = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxL1 + + #: Prefer maximum available shared memory, minimum L1 cache + cudaSharedmemCarveoutMaxShared = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxShared + +_dict_cudaSharedCarveout = dict(((int(v), v) for k, v in cudaSharedCarveout.__members__.items())) + +class cudaComputeMode(IntEnum): + """ + CUDA device compute modes + """ + + #: Default compute mode (Multiple threads can use + #: :py:obj:`~.cudaSetDevice()` with this device) + cudaComputeModeDefault = cyruntime.cudaComputeMode.cudaComputeModeDefault + + #: Compute-exclusive-thread mode (Only one thread in one process will + #: be able to use :py:obj:`~.cudaSetDevice()` with this device) + cudaComputeModeExclusive = cyruntime.cudaComputeMode.cudaComputeModeExclusive + + #: Compute-prohibited mode (No threads can use + #: :py:obj:`~.cudaSetDevice()` with this device) + cudaComputeModeProhibited = cyruntime.cudaComputeMode.cudaComputeModeProhibited + + #: Compute-exclusive-process mode (Many threads in one process will be + #: able to use :py:obj:`~.cudaSetDevice()` with this device) + cudaComputeModeExclusiveProcess = cyruntime.cudaComputeMode.cudaComputeModeExclusiveProcess + +_dict_cudaComputeMode = dict(((int(v), v) for k, v in cudaComputeMode.__members__.items())) + +class cudaLimit(IntEnum): + """ + CUDA Limits + """ + + #: GPU thread stack size + cudaLimitStackSize = cyruntime.cudaLimit.cudaLimitStackSize + + #: GPU printf FIFO size + cudaLimitPrintfFifoSize = cyruntime.cudaLimit.cudaLimitPrintfFifoSize + + #: GPU malloc heap size + cudaLimitMallocHeapSize = cyruntime.cudaLimit.cudaLimitMallocHeapSize + + #: GPU device runtime synchronize depth + cudaLimitDevRuntimeSyncDepth = cyruntime.cudaLimit.cudaLimitDevRuntimeSyncDepth + + #: GPU device runtime pending launch count + cudaLimitDevRuntimePendingLaunchCount = cyruntime.cudaLimit.cudaLimitDevRuntimePendingLaunchCount + + #: A value between 0 and 128 that indicates the maximum fetch + #: granularity of L2 (in Bytes). This is a hint + cudaLimitMaxL2FetchGranularity = cyruntime.cudaLimit.cudaLimitMaxL2FetchGranularity + + #: A size in bytes for L2 persisting lines cache size + cudaLimitPersistingL2CacheSize = cyruntime.cudaLimit.cudaLimitPersistingL2CacheSize + +_dict_cudaLimit = dict(((int(v), v) for k, v in cudaLimit.__members__.items())) + +class cudaMemoryAdvise(IntEnum): + """ + CUDA Memory Advise values + """ + + #: Data will mostly be read and only occassionally be written to + cudaMemAdviseSetReadMostly = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly + + #: Undo the effect of :py:obj:`~.cudaMemAdviseSetReadMostly` + cudaMemAdviseUnsetReadMostly = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetReadMostly + + #: Set the preferred location for the data as the specified device + cudaMemAdviseSetPreferredLocation = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetPreferredLocation + + #: Clear the preferred location for the data + cudaMemAdviseUnsetPreferredLocation = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetPreferredLocation + + #: Data will be accessed by the specified device, so prevent page + #: faults as much as possible + cudaMemAdviseSetAccessedBy = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetAccessedBy + + #: Let the Unified Memory subsystem decide on the page faulting policy + #: for the specified device + cudaMemAdviseUnsetAccessedBy = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetAccessedBy + +_dict_cudaMemoryAdvise = dict(((int(v), v) for k, v in cudaMemoryAdvise.__members__.items())) + +class cudaMemRangeAttribute(IntEnum): + """ + CUDA range attributes + """ + + #: Whether the range will mostly be read and only occassionally be + #: written to + cudaMemRangeAttributeReadMostly = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeReadMostly + + #: The preferred location of the range + cudaMemRangeAttributePreferredLocation = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocation + + #: Memory range has :py:obj:`~.cudaMemAdviseSetAccessedBy` set for + #: specified device + cudaMemRangeAttributeAccessedBy = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeAccessedBy + + #: The last location to which the range was prefetched + cudaMemRangeAttributeLastPrefetchLocation = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocation + + #: The preferred location type of the range + cudaMemRangeAttributePreferredLocationType = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationType + + #: The preferred location id of the range + cudaMemRangeAttributePreferredLocationId = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationId + + #: The last location type to which the range was prefetched + cudaMemRangeAttributeLastPrefetchLocationType = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationType + + #: The last location id to which the range was prefetched + cudaMemRangeAttributeLastPrefetchLocationId = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationId + +_dict_cudaMemRangeAttribute = dict(((int(v), v) for k, v in cudaMemRangeAttribute.__members__.items())) + +class cudaFlushGPUDirectRDMAWritesOptions(IntEnum): + """ + CUDA GPUDirect RDMA flush writes APIs supported on the device + """ + + #: :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` and its CUDA Driver + #: API counterpart are supported on the device. + cudaFlushGPUDirectRDMAWritesOptionHost = cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionHost + + #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the + #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported + #: on the CUDA device. + cudaFlushGPUDirectRDMAWritesOptionMemOps = cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionMemOps + +_dict_cudaFlushGPUDirectRDMAWritesOptions = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesOptions.__members__.items())) + +class cudaGPUDirectRDMAWritesOrdering(IntEnum): + """ + CUDA GPUDirect RDMA flush writes ordering features of the device + """ + + #: The device does not natively support ordering of GPUDirect RDMA + #: writes. :py:obj:`~.cudaFlushGPUDirectRDMAWrites()` can be leveraged + #: if supported. + cudaGPUDirectRDMAWritesOrderingNone = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingNone + + #: Natively, the device can consistently consume GPUDirect RDMA writes, + #: although other CUDA devices may not. + cudaGPUDirectRDMAWritesOrderingOwner = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingOwner + + #: Any CUDA device in the system can consistently consume GPUDirect + #: RDMA writes to this device. + cudaGPUDirectRDMAWritesOrderingAllDevices = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingAllDevices + +_dict_cudaGPUDirectRDMAWritesOrdering = dict(((int(v), v) for k, v in cudaGPUDirectRDMAWritesOrdering.__members__.items())) + +class cudaFlushGPUDirectRDMAWritesScope(IntEnum): + """ + CUDA GPUDirect RDMA flush writes scopes + """ + + #: Blocks until remote writes are visible to the CUDA device context + #: owning the data. + cudaFlushGPUDirectRDMAWritesToOwner = cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToOwner + + #: Blocks until remote writes are visible to all CUDA device contexts. + cudaFlushGPUDirectRDMAWritesToAllDevices = cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToAllDevices + +_dict_cudaFlushGPUDirectRDMAWritesScope = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesScope.__members__.items())) + +class cudaFlushGPUDirectRDMAWritesTarget(IntEnum): + """ + CUDA GPUDirect RDMA flush writes targets + """ + + #: Sets the target for :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` + #: to the currently active CUDA device context. + cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = cyruntime.cudaFlushGPUDirectRDMAWritesTarget.cudaFlushGPUDirectRDMAWritesTargetCurrentDevice + +_dict_cudaFlushGPUDirectRDMAWritesTarget = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesTarget.__members__.items())) + +class cudaDeviceAttr(IntEnum): + """ + CUDA device attributes + """ + + #: Maximum number of threads per block + cudaDevAttrMaxThreadsPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerBlock + + #: Maximum block dimension X + cudaDevAttrMaxBlockDimX = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimX + + #: Maximum block dimension Y + cudaDevAttrMaxBlockDimY = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimY + + #: Maximum block dimension Z + cudaDevAttrMaxBlockDimZ = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimZ + + #: Maximum grid dimension X + cudaDevAttrMaxGridDimX = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimX + + #: Maximum grid dimension Y + cudaDevAttrMaxGridDimY = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimY + + #: Maximum grid dimension Z + cudaDevAttrMaxGridDimZ = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimZ + + #: Maximum shared memory available per block in bytes + cudaDevAttrMaxSharedMemoryPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlock + + #: Memory available on device for constant variables in a CUDA C kernel + #: in bytes + cudaDevAttrTotalConstantMemory = cyruntime.cudaDeviceAttr.cudaDevAttrTotalConstantMemory + + #: Warp size in threads + cudaDevAttrWarpSize = cyruntime.cudaDeviceAttr.cudaDevAttrWarpSize + + #: Maximum pitch in bytes allowed by memory copies + cudaDevAttrMaxPitch = cyruntime.cudaDeviceAttr.cudaDevAttrMaxPitch + + #: Maximum number of 32-bit registers available per block + cudaDevAttrMaxRegistersPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerBlock + + #: Peak clock frequency in kilohertz + cudaDevAttrClockRate = cyruntime.cudaDeviceAttr.cudaDevAttrClockRate + + #: Alignment requirement for textures + cudaDevAttrTextureAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrTextureAlignment + + #: Device can possibly copy memory and execute a kernel concurrently + cudaDevAttrGpuOverlap = cyruntime.cudaDeviceAttr.cudaDevAttrGpuOverlap + + #: Number of multiprocessors on device + cudaDevAttrMultiProcessorCount = cyruntime.cudaDeviceAttr.cudaDevAttrMultiProcessorCount + + #: Specifies whether there is a run time limit on kernels + cudaDevAttrKernelExecTimeout = cyruntime.cudaDeviceAttr.cudaDevAttrKernelExecTimeout + + #: Device is integrated with host memory + cudaDevAttrIntegrated = cyruntime.cudaDeviceAttr.cudaDevAttrIntegrated + + #: Device can map host memory into CUDA address space + cudaDevAttrCanMapHostMemory = cyruntime.cudaDeviceAttr.cudaDevAttrCanMapHostMemory + + #: Compute mode (See :py:obj:`~.cudaComputeMode` for details) + cudaDevAttrComputeMode = cyruntime.cudaDeviceAttr.cudaDevAttrComputeMode + + #: Maximum 1D texture width + cudaDevAttrMaxTexture1DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DWidth + + #: Maximum 2D texture width + cudaDevAttrMaxTexture2DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DWidth + + #: Maximum 2D texture height + cudaDevAttrMaxTexture2DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DHeight + + #: Maximum 3D texture width + cudaDevAttrMaxTexture3DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidth + + #: Maximum 3D texture height + cudaDevAttrMaxTexture3DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeight + + #: Maximum 3D texture depth + cudaDevAttrMaxTexture3DDepth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepth + + #: Maximum 2D layered texture width + cudaDevAttrMaxTexture2DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredWidth + + #: Maximum 2D layered texture height + cudaDevAttrMaxTexture2DLayeredHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredHeight + + #: Maximum layers in a 2D layered texture + cudaDevAttrMaxTexture2DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredLayers + + #: Alignment requirement for surfaces + cudaDevAttrSurfaceAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrSurfaceAlignment + + #: Device can possibly execute multiple kernels concurrently + cudaDevAttrConcurrentKernels = cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentKernels + + #: Device has ECC support enabled + cudaDevAttrEccEnabled = cyruntime.cudaDeviceAttr.cudaDevAttrEccEnabled + + #: PCI bus ID of the device + cudaDevAttrPciBusId = cyruntime.cudaDeviceAttr.cudaDevAttrPciBusId + + #: PCI device ID of the device + cudaDevAttrPciDeviceId = cyruntime.cudaDeviceAttr.cudaDevAttrPciDeviceId + + #: Device is using TCC driver model + cudaDevAttrTccDriver = cyruntime.cudaDeviceAttr.cudaDevAttrTccDriver + + #: Peak memory clock frequency in kilohertz + cudaDevAttrMemoryClockRate = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryClockRate + + #: Global memory bus width in bits + cudaDevAttrGlobalMemoryBusWidth = cyruntime.cudaDeviceAttr.cudaDevAttrGlobalMemoryBusWidth + + #: Size of L2 cache in bytes + cudaDevAttrL2CacheSize = cyruntime.cudaDeviceAttr.cudaDevAttrL2CacheSize + + #: Maximum resident threads per multiprocessor + cudaDevAttrMaxThreadsPerMultiProcessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerMultiProcessor + + #: Number of asynchronous engines + cudaDevAttrAsyncEngineCount = cyruntime.cudaDeviceAttr.cudaDevAttrAsyncEngineCount + + #: Device shares a unified address space with the host + cudaDevAttrUnifiedAddressing = cyruntime.cudaDeviceAttr.cudaDevAttrUnifiedAddressing + + #: Maximum 1D layered texture width + cudaDevAttrMaxTexture1DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredWidth + + #: Maximum layers in a 1D layered texture + cudaDevAttrMaxTexture1DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredLayers + + #: Maximum 2D texture width if cudaArrayTextureGather is set + cudaDevAttrMaxTexture2DGatherWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherWidth + + #: Maximum 2D texture height if cudaArrayTextureGather is set + cudaDevAttrMaxTexture2DGatherHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherHeight + + #: Alternate maximum 3D texture width + cudaDevAttrMaxTexture3DWidthAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidthAlt + + #: Alternate maximum 3D texture height + cudaDevAttrMaxTexture3DHeightAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeightAlt + + #: Alternate maximum 3D texture depth + cudaDevAttrMaxTexture3DDepthAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepthAlt + + #: PCI domain ID of the device + cudaDevAttrPciDomainId = cyruntime.cudaDeviceAttr.cudaDevAttrPciDomainId + + #: Pitch alignment requirement for textures + cudaDevAttrTexturePitchAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrTexturePitchAlignment + + #: Maximum cubemap texture width/height + cudaDevAttrMaxTextureCubemapWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapWidth + + #: Maximum cubemap layered texture width/height + cudaDevAttrMaxTextureCubemapLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredWidth + + #: Maximum layers in a cubemap layered texture + cudaDevAttrMaxTextureCubemapLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredLayers + + #: Maximum 1D surface width + cudaDevAttrMaxSurface1DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DWidth + + #: Maximum 2D surface width + cudaDevAttrMaxSurface2DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DWidth + + #: Maximum 2D surface height + cudaDevAttrMaxSurface2DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DHeight + + #: Maximum 3D surface width + cudaDevAttrMaxSurface3DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DWidth + + #: Maximum 3D surface height + cudaDevAttrMaxSurface3DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DHeight + + #: Maximum 3D surface depth + cudaDevAttrMaxSurface3DDepth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DDepth + + #: Maximum 1D layered surface width + cudaDevAttrMaxSurface1DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredWidth + + #: Maximum layers in a 1D layered surface + cudaDevAttrMaxSurface1DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredLayers + + #: Maximum 2D layered surface width + cudaDevAttrMaxSurface2DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredWidth + + #: Maximum 2D layered surface height + cudaDevAttrMaxSurface2DLayeredHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredHeight + + #: Maximum layers in a 2D layered surface + cudaDevAttrMaxSurface2DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredLayers + + #: Maximum cubemap surface width + cudaDevAttrMaxSurfaceCubemapWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapWidth + + #: Maximum cubemap layered surface width + cudaDevAttrMaxSurfaceCubemapLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredWidth + + #: Maximum layers in a cubemap layered surface + cudaDevAttrMaxSurfaceCubemapLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredLayers + + #: Maximum 1D linear texture width + cudaDevAttrMaxTexture1DLinearWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLinearWidth + + #: Maximum 2D linear texture width + cudaDevAttrMaxTexture2DLinearWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearWidth + + #: Maximum 2D linear texture height + cudaDevAttrMaxTexture2DLinearHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearHeight + + #: Maximum 2D linear texture pitch in bytes + cudaDevAttrMaxTexture2DLinearPitch = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearPitch + + #: Maximum mipmapped 2D texture width + cudaDevAttrMaxTexture2DMipmappedWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedWidth + + #: Maximum mipmapped 2D texture height + cudaDevAttrMaxTexture2DMipmappedHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedHeight + + #: Major compute capability version number + cudaDevAttrComputeCapabilityMajor = cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor + + #: Minor compute capability version number + cudaDevAttrComputeCapabilityMinor = cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor + + #: Maximum mipmapped 1D texture width + cudaDevAttrMaxTexture1DMipmappedWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DMipmappedWidth + + #: Device supports stream priorities + cudaDevAttrStreamPrioritiesSupported = cyruntime.cudaDeviceAttr.cudaDevAttrStreamPrioritiesSupported + + #: Device supports caching globals in L1 + cudaDevAttrGlobalL1CacheSupported = cyruntime.cudaDeviceAttr.cudaDevAttrGlobalL1CacheSupported + + #: Device supports caching locals in L1 + cudaDevAttrLocalL1CacheSupported = cyruntime.cudaDeviceAttr.cudaDevAttrLocalL1CacheSupported + + #: Maximum shared memory available per multiprocessor in bytes + cudaDevAttrMaxSharedMemoryPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerMultiprocessor + + #: Maximum number of 32-bit registers available per multiprocessor + cudaDevAttrMaxRegistersPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerMultiprocessor + + #: Device can allocate managed memory on this system + cudaDevAttrManagedMemory = cyruntime.cudaDeviceAttr.cudaDevAttrManagedMemory + + #: Device is on a multi-GPU board + cudaDevAttrIsMultiGpuBoard = cyruntime.cudaDeviceAttr.cudaDevAttrIsMultiGpuBoard + + #: Unique identifier for a group of devices on the same multi-GPU board + cudaDevAttrMultiGpuBoardGroupID = cyruntime.cudaDeviceAttr.cudaDevAttrMultiGpuBoardGroupID + + #: Link between the device and the host supports native atomic + #: operations + cudaDevAttrHostNativeAtomicSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNativeAtomicSupported + + #: Ratio of single precision performance (in floating-point operations + #: per second) to double precision performance + cudaDevAttrSingleToDoublePrecisionPerfRatio = cyruntime.cudaDeviceAttr.cudaDevAttrSingleToDoublePrecisionPerfRatio + + #: Device supports coherently accessing pageable memory without calling + #: cudaHostRegister on it + cudaDevAttrPageableMemoryAccess = cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccess + + #: Device can coherently access managed memory concurrently with the + #: CPU + cudaDevAttrConcurrentManagedAccess = cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentManagedAccess + + #: Device supports Compute Preemption + cudaDevAttrComputePreemptionSupported = cyruntime.cudaDeviceAttr.cudaDevAttrComputePreemptionSupported + + #: Device can access host registered memory at the same virtual address + #: as the CPU + cudaDevAttrCanUseHostPointerForRegisteredMem = cyruntime.cudaDeviceAttr.cudaDevAttrCanUseHostPointerForRegisteredMem + cudaDevAttrReserved92 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved92 + cudaDevAttrReserved93 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved93 + cudaDevAttrReserved94 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved94 + + #: Device supports launching cooperative kernels via + #: :py:obj:`~.cudaLaunchCooperativeKernel` + cudaDevAttrCooperativeLaunch = cyruntime.cudaDeviceAttr.cudaDevAttrCooperativeLaunch + + #: Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + cudaDevAttrCooperativeMultiDeviceLaunch = cyruntime.cudaDeviceAttr.cudaDevAttrCooperativeMultiDeviceLaunch + + #: The maximum optin shared memory per block. This value may vary by + #: chip. See :py:obj:`~.cudaFuncSetAttribute` + cudaDevAttrMaxSharedMemoryPerBlockOptin = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlockOptin + + #: Device supports flushing of outstanding remote writes. + cudaDevAttrCanFlushRemoteWrites = cyruntime.cudaDeviceAttr.cudaDevAttrCanFlushRemoteWrites + + #: Device supports host memory registration via + #: :py:obj:`~.cudaHostRegister`. + cudaDevAttrHostRegisterSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterSupported + + #: Device accesses pageable memory via the host's page tables. + cudaDevAttrPageableMemoryAccessUsesHostPageTables = cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccessUsesHostPageTables + + #: Host can directly access managed memory on the device without + #: migration. + cudaDevAttrDirectManagedMemAccessFromHost = cyruntime.cudaDeviceAttr.cudaDevAttrDirectManagedMemAccessFromHost + + #: Maximum number of blocks per multiprocessor + cudaDevAttrMaxBlocksPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlocksPerMultiprocessor + + #: Maximum L2 persisting lines capacity setting in bytes. + cudaDevAttrMaxPersistingL2CacheSize = cyruntime.cudaDeviceAttr.cudaDevAttrMaxPersistingL2CacheSize + + #: Maximum value of :py:obj:`~.cudaAccessPolicyWindow.num_bytes`. + cudaDevAttrMaxAccessPolicyWindowSize = cyruntime.cudaDeviceAttr.cudaDevAttrMaxAccessPolicyWindowSize + + #: Shared memory reserved by CUDA driver per block in bytes + cudaDevAttrReservedSharedMemoryPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrReservedSharedMemoryPerBlock + + #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays + cudaDevAttrSparseCudaArraySupported = cyruntime.cudaDeviceAttr.cudaDevAttrSparseCudaArraySupported + + #: Device supports using the :py:obj:`~.cudaHostRegister` flag + #: cudaHostRegisterReadOnly to register memory that must be mapped as + #: read-only to the GPU + cudaDevAttrHostRegisterReadOnlySupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterReadOnlySupported + + #: External timeline semaphore interop is supported on the device + cudaDevAttrTimelineSemaphoreInteropSupported = cyruntime.cudaDeviceAttr.cudaDevAttrTimelineSemaphoreInteropSupported + + #: Deprecated, External timeline semaphore interop is supported on the + #: device + cudaDevAttrMaxTimelineSemaphoreInteropSupported = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTimelineSemaphoreInteropSupported + + #: Device supports using the :py:obj:`~.cudaMallocAsync` and + #: :py:obj:`~.cudaMemPool` family of APIs + cudaDevAttrMemoryPoolsSupported = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported + + #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see + #: https://docs.nvidia.com/cuda/gpudirect-rdma for more information) + cudaDevAttrGPUDirectRDMASupported = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMASupported + + #: The returned attribute shall be interpreted as a bitmask, where the + #: individual bits are listed in the + #: :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum + cudaDevAttrGPUDirectRDMAFlushWritesOptions = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAFlushWritesOptions + + #: GPUDirect RDMA writes to the device do not need to be flushed for + #: consumers within the scope indicated by the returned attribute. See + #: :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` for the numerical values + #: returned here. + cudaDevAttrGPUDirectRDMAWritesOrdering = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAWritesOrdering + + #: Handle types supported with mempool based IPC + cudaDevAttrMemoryPoolSupportedHandleTypes = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolSupportedHandleTypes + + #: Indicates device supports cluster launch + cudaDevAttrClusterLaunch = cyruntime.cudaDeviceAttr.cudaDevAttrClusterLaunch + + #: Device supports deferred mapping CUDA arrays and CUDA mipmapped + #: arrays + cudaDevAttrDeferredMappingCudaArraySupported = cyruntime.cudaDeviceAttr.cudaDevAttrDeferredMappingCudaArraySupported + cudaDevAttrReserved122 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved122 + cudaDevAttrReserved123 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved123 + cudaDevAttrReserved124 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved124 + + #: Device supports IPC Events. + cudaDevAttrIpcEventSupport = cyruntime.cudaDeviceAttr.cudaDevAttrIpcEventSupport + + #: Number of memory synchronization domains the device supports. + cudaDevAttrMemSyncDomainCount = cyruntime.cudaDeviceAttr.cudaDevAttrMemSyncDomainCount + cudaDevAttrReserved127 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved127 + cudaDevAttrReserved128 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved128 + cudaDevAttrReserved129 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved129 + + #: NUMA configuration of a device: value is of type + #: :py:obj:`~.cudaDeviceNumaConfig` enum + cudaDevAttrNumaConfig = cyruntime.cudaDeviceAttr.cudaDevAttrNumaConfig + + #: NUMA node ID of the GPU memory + cudaDevAttrNumaId = cyruntime.cudaDeviceAttr.cudaDevAttrNumaId + cudaDevAttrReserved132 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved132 + + #: Contexts created on this device will be shared via MPS + cudaDevAttrMpsEnabled = cyruntime.cudaDeviceAttr.cudaDevAttrMpsEnabled + + #: NUMA ID of the host node closest to the device or -1 when system + #: does not support NUMA + cudaDevAttrHostNumaId = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaId + + #: Device supports CIG with D3D12. + cudaDevAttrD3D12CigSupported = cyruntime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported + + #: Device supports CIG with Vulkan. + cudaDevAttrVulkanCigSupported = cyruntime.cudaDeviceAttr.cudaDevAttrVulkanCigSupported + + #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + cudaDevAttrGpuPciDeviceId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId + + #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor + #: ID. + cudaDevAttrGpuPciSubsystemId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId + cudaDevAttrReserved141 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved141 + + #: Device supports HOST_NUMA location with the + #: :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of + #: APIs + cudaDevAttrHostNumaMemoryPoolsSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMemoryPoolsSupported + + #: Device supports HostNuma location IPC between nodes in a multi-node + #: system. + cudaDevAttrHostNumaMultinodeIpcSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported + cudaDevAttrMax = cyruntime.cudaDeviceAttr.cudaDevAttrMax + +_dict_cudaDeviceAttr = dict(((int(v), v) for k, v in cudaDeviceAttr.__members__.items())) + +class cudaMemPoolAttr(IntEnum): + """ + CUDA memory pool attributes + """ + + #: (value type = int) Allow cuMemAllocAsync to use memory + #: asynchronously freed in another streams as long as a stream ordering + #: dependency of the allocating stream on the free action exists. Cuda + #: events and null stream interactions can create the required stream + #: ordered dependencies. (default enabled) + cudaMemPoolReuseFollowEventDependencies = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseFollowEventDependencies + + #: (value type = int) Allow reuse of already completed frees when there + #: is no dependency between the free and allocation. (default enabled) + cudaMemPoolReuseAllowOpportunistic = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowOpportunistic + + #: (value type = int) Allow cuMemAllocAsync to insert new stream + #: dependencies in order to establish the stream ordering required to + #: reuse a piece of memory released by cuFreeAsync (default enabled). + cudaMemPoolReuseAllowInternalDependencies = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowInternalDependencies + + #: (value type = cuuint64_t) Amount of reserved memory in bytes to hold + #: onto before trying to release memory back to the OS. When more than + #: the release threshold bytes of memory are held by the memory pool, + #: the allocator will try to release memory back to the OS on the next + #: call to stream, event or context synchronize. (default 0) + cudaMemPoolAttrReleaseThreshold = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReleaseThreshold + + #: (value type = cuuint64_t) Amount of backing memory currently + #: allocated for the mempool. + cudaMemPoolAttrReservedMemCurrent = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemCurrent + + #: (value type = cuuint64_t) High watermark of backing memory allocated + #: for the mempool since the last time it was reset. High watermark can + #: only be reset to zero. + cudaMemPoolAttrReservedMemHigh = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemHigh + + #: (value type = cuuint64_t) Amount of memory from the pool that is + #: currently in use by the application. + cudaMemPoolAttrUsedMemCurrent = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemCurrent + + #: (value type = cuuint64_t) High watermark of the amount of memory + #: from the pool that was in use by the application since the last time + #: it was reset. High watermark can only be reset to zero. + cudaMemPoolAttrUsedMemHigh = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemHigh + +_dict_cudaMemPoolAttr = dict(((int(v), v) for k, v in cudaMemPoolAttr.__members__.items())) + +class cudaMemLocationType(IntEnum): + """ + Specifies the type of location + """ + cudaMemLocationTypeInvalid = cyruntime.cudaMemLocationType.cudaMemLocationTypeInvalid + + #: Location is a device location, thus id is a device ordinal + cudaMemLocationTypeDevice = cyruntime.cudaMemLocationType.cudaMemLocationTypeDevice + + #: Location is host, id is ignored + cudaMemLocationTypeHost = cyruntime.cudaMemLocationType.cudaMemLocationTypeHost + + #: Location is a host NUMA node, thus id is a host NUMA node id + cudaMemLocationTypeHostNuma = cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNuma + + #: Location is the host NUMA node closest to the current thread's CPU, + #: id is ignored + cudaMemLocationTypeHostNumaCurrent = cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNumaCurrent + +_dict_cudaMemLocationType = dict(((int(v), v) for k, v in cudaMemLocationType.__members__.items())) + +class cudaMemAccessFlags(IntEnum): + """ + Specifies the memory protection flags for mapping. + """ + + #: Default, make the address range not accessible + cudaMemAccessFlagsProtNone = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone + + #: Make the address range read accessible + cudaMemAccessFlagsProtRead = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtRead + + #: Make the address range read-write accessible + cudaMemAccessFlagsProtReadWrite = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtReadWrite + +_dict_cudaMemAccessFlags = dict(((int(v), v) for k, v in cudaMemAccessFlags.__members__.items())) + +class cudaMemAllocationType(IntEnum): + """ + Defines the allocation types available + """ + cudaMemAllocationTypeInvalid = cyruntime.cudaMemAllocationType.cudaMemAllocationTypeInvalid + + #: This allocation type is 'pinned', i.e. cannot migrate from its + #: current location while the application is actively using it + cudaMemAllocationTypePinned = cyruntime.cudaMemAllocationType.cudaMemAllocationTypePinned + cudaMemAllocationTypeMax = cyruntime.cudaMemAllocationType.cudaMemAllocationTypeMax + +_dict_cudaMemAllocationType = dict(((int(v), v) for k, v in cudaMemAllocationType.__members__.items())) + +class cudaMemAllocationHandleType(IntEnum): + """ + Flags for specifying particular handle types + """ + + #: Does not allow any export mechanism. > + cudaMemHandleTypeNone = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeNone + + #: Allows a file descriptor to be used for exporting. Permitted only on + #: POSIX systems. (int) + cudaMemHandleTypePosixFileDescriptor = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypePosixFileDescriptor + + #: Allows a Win32 NT handle to be used for exporting. (HANDLE) + cudaMemHandleTypeWin32 = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32 + + #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) + cudaMemHandleTypeWin32Kmt = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32Kmt + + #: Allows a fabric handle to be used for exporting. + #: (cudaMemFabricHandle_t) + cudaMemHandleTypeFabric = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric + +_dict_cudaMemAllocationHandleType = dict(((int(v), v) for k, v in cudaMemAllocationHandleType.__members__.items())) + +class cudaGraphMemAttributeType(IntEnum): + """ + Graph memory attributes + """ + + #: (value type = cuuint64_t) Amount of memory, in bytes, currently + #: associated with graphs. + cudaGraphMemAttrUsedMemCurrent = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemCurrent + + #: (value type = cuuint64_t) High watermark of memory, in bytes, + #: associated with graphs since the last time it was reset. High + #: watermark can only be reset to zero. + cudaGraphMemAttrUsedMemHigh = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemHigh + + #: (value type = cuuint64_t) Amount of memory, in bytes, currently + #: allocated for use by the CUDA graphs asynchronous allocator. + cudaGraphMemAttrReservedMemCurrent = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemCurrent + + #: (value type = cuuint64_t) High watermark of memory, in bytes, + #: currently allocated for use by the CUDA graphs asynchronous + #: allocator. + cudaGraphMemAttrReservedMemHigh = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh + +_dict_cudaGraphMemAttributeType = dict(((int(v), v) for k, v in cudaGraphMemAttributeType.__members__.items())) + +class cudaMemcpyFlags(IntEnum): + """ + Flags to specify for copies within a batch. For more details see + :py:obj:`~.cudaMemcpyBatchAsync`. + """ + cudaMemcpyFlagDefault = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagDefault + + #: Hint to the driver to try and overlap the copy with compute work on + #: the SMs. + cudaMemcpyFlagPreferOverlapWithCompute = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute + +_dict_cudaMemcpyFlags = dict(((int(v), v) for k, v in cudaMemcpyFlags.__members__.items())) + +class cudaMemcpySrcAccessOrder(IntEnum): + """ + + """ + + #: Default invalid. + cudaMemcpySrcAccessOrderInvalid = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid + + #: Indicates that access to the source pointer must be in stream order. + cudaMemcpySrcAccessOrderStream = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream + + #: Indicates that access to the source pointer can be out of stream + #: order and all accesses must be complete before the API call returns. + #: This flag is suited for ephemeral sources (ex., stack variables) + #: when it's known that no prior operations in the stream can be + #: accessing the memory and also that the lifetime of the memory is + #: limited to the scope that the source variable was declared in. + #: Specifying this flag allows the driver to optimize the copy and + #: removes the need for the user to synchronize the stream after the + #: API call. + cudaMemcpySrcAccessOrderDuringApiCall = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall + + #: Indicates that access to the source pointer can be out of stream + #: order and the accesses can happen even after the API call returns. + #: This flag is suited for host pointers allocated outside CUDA (ex., + #: via malloc) when it's known that no prior operations in the stream + #: can be accessing the memory. Specifying this flag allows the driver + #: to optimize the copy on certain platforms. + cudaMemcpySrcAccessOrderAny = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny + cudaMemcpySrcAccessOrderMax = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax + +_dict_cudaMemcpySrcAccessOrder = dict(((int(v), v) for k, v in cudaMemcpySrcAccessOrder.__members__.items())) + +class cudaMemcpy3DOperandType(IntEnum): + """ + These flags allow applications to convey the operand type for + individual copies specified in :py:obj:`~.cudaMemcpy3DBatchAsync`. + """ + + #: Memcpy operand is a valid pointer. + cudaMemcpyOperandTypePointer = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer + + #: Memcpy operand is a CUarray. + cudaMemcpyOperandTypeArray = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray + cudaMemcpyOperandTypeMax = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax + +_dict_cudaMemcpy3DOperandType = dict(((int(v), v) for k, v in cudaMemcpy3DOperandType.__members__.items())) + +class cudaDeviceP2PAttr(IntEnum): + """ + CUDA device P2P attributes + """ + + #: A relative value indicating the performance of the link between two + #: devices + cudaDevP2PAttrPerformanceRank = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank + + #: Peer access is enabled + cudaDevP2PAttrAccessSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrAccessSupported + + #: Native atomic operation over the link supported + cudaDevP2PAttrNativeAtomicSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrNativeAtomicSupported + + #: Accessing CUDA arrays over the link supported + cudaDevP2PAttrCudaArrayAccessSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrCudaArrayAccessSupported + +_dict_cudaDeviceP2PAttr = dict(((int(v), v) for k, v in cudaDeviceP2PAttr.__members__.items())) + +class cudaExternalMemoryHandleType(IntEnum): + """ + External memory handle types + """ + + #: Handle is an opaque file descriptor + cudaExternalMemoryHandleTypeOpaqueFd = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueFd + + #: Handle is an opaque shared NT handle + cudaExternalMemoryHandleTypeOpaqueWin32 = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32 + + #: Handle is an opaque, globally shared handle + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32Kmt + + #: Handle is a D3D12 heap object + cudaExternalMemoryHandleTypeD3D12Heap = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Heap + + #: Handle is a D3D12 committed resource + cudaExternalMemoryHandleTypeD3D12Resource = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Resource + + #: Handle is a shared NT handle to a D3D11 resource + cudaExternalMemoryHandleTypeD3D11Resource = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11Resource + + #: Handle is a globally shared handle to a D3D11 resource + cudaExternalMemoryHandleTypeD3D11ResourceKmt = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11ResourceKmt + + #: Handle is an NvSciBuf object + cudaExternalMemoryHandleTypeNvSciBuf = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeNvSciBuf + +_dict_cudaExternalMemoryHandleType = dict(((int(v), v) for k, v in cudaExternalMemoryHandleType.__members__.items())) + +class cudaExternalSemaphoreHandleType(IntEnum): + """ + External semaphore handle types + """ + + #: Handle is an opaque file descriptor + cudaExternalSemaphoreHandleTypeOpaqueFd = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueFd + + #: Handle is an opaque shared NT handle + cudaExternalSemaphoreHandleTypeOpaqueWin32 = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32 + + #: Handle is an opaque, globally shared handle + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt + + #: Handle is a shared NT handle referencing a D3D12 fence object + cudaExternalSemaphoreHandleTypeD3D12Fence = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D12Fence + + #: Handle is a shared NT handle referencing a D3D11 fence object + cudaExternalSemaphoreHandleTypeD3D11Fence = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D11Fence + + #: Opaque handle to NvSciSync Object + cudaExternalSemaphoreHandleTypeNvSciSync = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeNvSciSync + + #: Handle is a shared NT handle referencing a D3D11 keyed mutex object + cudaExternalSemaphoreHandleTypeKeyedMutex = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutex + + #: Handle is a shared KMT handle referencing a D3D11 keyed mutex object + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutexKmt + + #: Handle is an opaque handle file descriptor referencing a timeline + #: semaphore + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd + + #: Handle is an opaque handle file descriptor referencing a timeline + #: semaphore + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 + +_dict_cudaExternalSemaphoreHandleType = dict(((int(v), v) for k, v in cudaExternalSemaphoreHandleType.__members__.items())) + +class cudaJitOption(IntEnum): + """ + Online compiler and linker options + """ + + #: Max number of registers that a thread may use. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitMaxRegisters = cyruntime.cudaJitOption.cudaJitMaxRegisters + + #: IN: Specifies minimum number of threads per block to target + #: compilation for + #: OUT: Returns the number of threads the compiler actually targeted. + #: This restricts the resource utilization of the compiler (e.g. max + #: registers) such that a block with the given number of threads should + #: be able to launch based on register limitations. Note, this option + #: does not currently take into account any other resource limitations, + #: such as shared memory utilization. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitThreadsPerBlock = cyruntime.cudaJitOption.cudaJitThreadsPerBlock + + #: Overwrites the option value with the total wall clock time, in + #: milliseconds, spent in the compiler and linker + #: Option type: float + #: Applies to: compiler and linker + cudaJitWallTime = cyruntime.cudaJitOption.cudaJitWallTime + + #: Pointer to a buffer in which to print any log messages that are + #: informational in nature (the buffer size is specified via option + #: :py:obj:`~.cudaJitInfoLogBufferSizeBytes`) + #: Option type: char * + #: Applies to: compiler and linker + cudaJitInfoLogBuffer = cyruntime.cudaJitOption.cudaJitInfoLogBuffer + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + cudaJitInfoLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes + + #: Pointer to a buffer in which to print any log messages that reflect + #: errors (the buffer size is specified via option + #: :py:obj:`~.cudaJitErrorLogBufferSizeBytes`) + #: Option type: char * + #: Applies to: compiler and linker + cudaJitErrorLogBuffer = cyruntime.cudaJitOption.cudaJitErrorLogBuffer + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + cudaJitErrorLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes + + #: Level of optimizations to apply to generated code (0 - 4), with 4 + #: being the default and highest level of optimizations. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitOptimizationLevel = cyruntime.cudaJitOption.cudaJitOptimizationLevel + + #: Specifies choice of fallback strategy if matching cubin is not + #: found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.cudaJit_Fallback` + #: Applies to: compiler only + cudaJitFallbackStrategy = cyruntime.cudaJitOption.cudaJitFallbackStrategy + + #: Specifies whether to create debug information in output (-g) (0: + #: false, default) + #: Option type: int + #: Applies to: compiler and linker + cudaJitGenerateDebugInfo = cyruntime.cudaJitOption.cudaJitGenerateDebugInfo + + #: Generate verbose log messages (0: false, default) + #: Option type: int + #: Applies to: compiler and linker + cudaJitLogVerbose = cyruntime.cudaJitOption.cudaJitLogVerbose + + #: Generate line number information (-lineinfo) (0: false, default) + #: Option type: int + #: Applies to: compiler only + cudaJitGenerateLineInfo = cyruntime.cudaJitOption.cudaJitGenerateLineInfo + + #: Specifies whether to enable caching explicitly (-dlcm) + #: Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.cudaJit_CacheMode` + #: Applies to: compiler only + cudaJitCacheMode = cyruntime.cudaJitOption.cudaJitCacheMode + + #: Generate position independent code (0: false) + #: Option type: int + #: Applies to: compiler only + cudaJitPositionIndependentCode = cyruntime.cudaJitOption.cudaJitPositionIndependentCode + + #: This option hints to the JIT compiler the minimum number of CTAs + #: from the kernel’s grid to be mapped to a SM. This option is ignored + #: when used together with :py:obj:`~.cudaJitMaxRegisters` or + #: :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this + #: option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as + #: well. For kernels already using PTX directive .minnctapersm, this + #: option will be ignored by default. Use + #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take + #: precedence over the PTX directive. Option type: unsigned int + #: Applies to: compiler only + cudaJitMinCtaPerSm = cyruntime.cudaJitOption.cudaJitMinCtaPerSm + + #: Maximum number threads in a thread block, computed as the product of + #: the maximum extent specifed for each dimension of the block. This + #: limit is guaranteed not to be exeeded in any invocation of the + #: kernel. Exceeding the the maximum number of threads results in + #: runtime error or kernel launch failure. For kernels already using + #: PTX directive .maxntid, this option will be ignored by default. Use + #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take + #: precedence over the PTX directive. Option type: int + #: Applies to: compiler only + cudaJitMaxThreadsPerBlock = cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock + + #: This option lets the values specified using + #: :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, + #: :py:obj:`~.cudaJitMaxThreadsPerBlock` and + #: :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX + #: directives. (0: Disable, default; 1: Enable) Option type: int + #: Applies to: compiler only + cudaJitOverrideDirectiveValues = cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues + +_dict_cudaJitOption = dict(((int(v), v) for k, v in cudaJitOption.__members__.items())) + +class cudaLibraryOption(IntEnum): + """ + Library options to be specified with + :py:obj:`~.cudaLibraryLoadData()` or + :py:obj:`~.cudaLibraryLoadFromFile()` + """ + cudaLibraryHostUniversalFunctionAndDataTable = cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable + + #: Specifes that the argument `code` passed to + #: :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this + #: option will let the driver know that `code` can be accessed at any + #: point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is + #: for the driver to allocate and maintain its own copy of `code`. Note + #: that this is only a memory usage optimization hint and the driver + #: can choose to ignore it if required. Specifying this option with + #: :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return + #: :py:obj:`~.cudaErrorInvalidValue`. + cudaLibraryBinaryIsPreserved = cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved + +_dict_cudaLibraryOption = dict(((int(v), v) for k, v in cudaLibraryOption.__members__.items())) + +class cudaJit_CacheMode(IntEnum): + """ + Caching modes for dlcm + """ + + #: Compile with no -dlcm flag specified + cudaJitCacheOptionNone = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionNone + + #: Compile with L1 cache disabled + cudaJitCacheOptionCG = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCG + + #: Compile with L1 cache enabled + cudaJitCacheOptionCA = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCA + +_dict_cudaJit_CacheMode = dict(((int(v), v) for k, v in cudaJit_CacheMode.__members__.items())) + +class cudaJit_Fallback(IntEnum): + """ + Cubin matching fallback strategies + """ + + #: Prefer to compile ptx if exact binary match not found + cudaPreferPtx = cyruntime.cudaJit_Fallback.cudaPreferPtx + + #: Prefer to fall back to compatible binary code if exact match not + #: found + cudaPreferBinary = cyruntime.cudaJit_Fallback.cudaPreferBinary + +_dict_cudaJit_Fallback = dict(((int(v), v) for k, v in cudaJit_Fallback.__members__.items())) + +class cudaCGScope(IntEnum): + """ + CUDA cooperative group scope + """ + + #: Invalid cooperative group scope + cudaCGScopeInvalid = cyruntime.cudaCGScope.cudaCGScopeInvalid + + #: Scope represented by a grid_group + cudaCGScopeGrid = cyruntime.cudaCGScope.cudaCGScopeGrid + + #: Scope represented by a multi_grid_group + cudaCGScopeMultiGrid = cyruntime.cudaCGScope.cudaCGScopeMultiGrid + +_dict_cudaCGScope = dict(((int(v), v) for k, v in cudaCGScope.__members__.items())) + +class cudaGraphConditionalHandleFlags(IntEnum): + """ + + """ + + #: Apply default handle value when graph is launched. + cudaGraphCondAssignDefault = cyruntime.cudaGraphConditionalHandleFlags.cudaGraphCondAssignDefault + +_dict_cudaGraphConditionalHandleFlags = dict(((int(v), v) for k, v in cudaGraphConditionalHandleFlags.__members__.items())) + +class cudaGraphConditionalNodeType(IntEnum): + """ + CUDA conditional node types + """ + + #: Conditional 'if/else' Node. Body[0] executed if condition is non- + #: zero. If `size` == 2, an optional ELSE graph is created and this is + #: executed if the condition is zero. + cudaGraphCondTypeIf = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf + + #: Conditional 'while' Node. Body executed repeatedly while condition + #: value is non-zero. + cudaGraphCondTypeWhile = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile + + #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is + #: the value of the condition. If the condition does not match a body + #: index, no body is launched. + cudaGraphCondTypeSwitch = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch + +_dict_cudaGraphConditionalNodeType = dict(((int(v), v) for k, v in cudaGraphConditionalNodeType.__members__.items())) + +class cudaGraphNodeType(IntEnum): + """ + CUDA Graph node types + """ + + #: GPU kernel node + cudaGraphNodeTypeKernel = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeKernel + + #: Memcpy node + cudaGraphNodeTypeMemcpy = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemcpy + + #: Memset node + cudaGraphNodeTypeMemset = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemset + + #: Host (executable) node + cudaGraphNodeTypeHost = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeHost + + #: Node which executes an embedded graph + cudaGraphNodeTypeGraph = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeGraph + + #: Empty (no-op) node + cudaGraphNodeTypeEmpty = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEmpty + + #: External event wait node + cudaGraphNodeTypeWaitEvent = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeWaitEvent + + #: External event record node + cudaGraphNodeTypeEventRecord = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEventRecord + + #: External semaphore signal node + cudaGraphNodeTypeExtSemaphoreSignal = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreSignal + + #: External semaphore wait node + cudaGraphNodeTypeExtSemaphoreWait = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreWait + + #: Memory allocation node + cudaGraphNodeTypeMemAlloc = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemAlloc + + #: Memory free node + cudaGraphNodeTypeMemFree = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemFree + + #: Conditional node May be used to + #: implement a conditional execution path or loop + #: inside of a graph. The graph(s) + #: contained within the body of the conditional node + #: can be selectively executed or + #: iterated upon based on the value of a conditional + #: variable. + #: + #: Handles must be created in + #: advance of creating the node + #: using + #: :py:obj:`~.cudaGraphConditionalHandleCreate`. + #: + #: The following restrictions apply + #: to graphs which contain conditional nodes: + #: The graph cannot be used in a + #: child node. + #: Only one instantiation of the + #: graph may exist at any point in time. + #: The graph cannot be cloned. + #: + #: To set the control value, supply + #: a default value when creating the handle and/or + #: call + #: :py:obj:`~.cudaGraphSetConditional` from device code. + cudaGraphNodeTypeConditional = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeConditional + cudaGraphNodeTypeCount = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeCount + +_dict_cudaGraphNodeType = dict(((int(v), v) for k, v in cudaGraphNodeType.__members__.items())) + +class cudaGraphChildGraphNodeOwnership(IntEnum): + """ + Child graph node ownership + """ + + #: Default behavior for a child graph node. Child graph is cloned into + #: the parent and memory allocation/free nodes can't be present in the + #: child graph. + cudaGraphChildGraphOwnershipClone = cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipClone + + #: The child graph is moved to the parent. The handle to the child + #: graph is owned by the parent and will be destroyed when the parent + #: is destroyed. + #: + #: The following restrictions apply to child graphs after they have + #: been moved: Cannot be independently instantiated or destroyed; + #: Cannot be added as a child graph of a separate parent graph; Cannot + #: be used as an argument to cudaGraphExecUpdate; Cannot have + #: additional memory allocation or free nodes added. + cudaGraphChildGraphOwnershipMove = cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipMove + +_dict_cudaGraphChildGraphNodeOwnership = dict(((int(v), v) for k, v in cudaGraphChildGraphNodeOwnership.__members__.items())) + +class cudaGraphExecUpdateResult(IntEnum): + """ + CUDA Graph Update error types + """ + + #: The update succeeded + cudaGraphExecUpdateSuccess = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateSuccess + + #: The update failed for an unexpected reason which is described in the + #: return value of the function + cudaGraphExecUpdateError = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateError + + #: The update failed because the topology changed + cudaGraphExecUpdateErrorTopologyChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorTopologyChanged + + #: The update failed because a node type changed + cudaGraphExecUpdateErrorNodeTypeChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNodeTypeChanged + + #: The update failed because the function of a kernel node changed + #: (CUDA driver < 11.2) + cudaGraphExecUpdateErrorFunctionChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorFunctionChanged + + #: The update failed because the parameters changed in a way that is + #: not supported + cudaGraphExecUpdateErrorParametersChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorParametersChanged + + #: The update failed because something about the node is not supported + cudaGraphExecUpdateErrorNotSupported = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNotSupported + + #: The update failed because the function of a kernel node changed in + #: an unsupported way + cudaGraphExecUpdateErrorUnsupportedFunctionChange = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorUnsupportedFunctionChange + + #: The update failed because the node attributes changed in a way that + #: is not supported + cudaGraphExecUpdateErrorAttributesChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorAttributesChanged + +_dict_cudaGraphExecUpdateResult = dict(((int(v), v) for k, v in cudaGraphExecUpdateResult.__members__.items())) + +class cudaGraphKernelNodeField(IntEnum): + """ + Specifies the field to update when performing multiple node updates + from the device + """ + + #: Invalid field + cudaGraphKernelNodeFieldInvalid = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid + + #: Grid dimension update + cudaGraphKernelNodeFieldGridDim = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldGridDim + + #: Kernel parameter update + cudaGraphKernelNodeFieldParam = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldParam + + #: Node enable/disable + cudaGraphKernelNodeFieldEnabled = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldEnabled + +_dict_cudaGraphKernelNodeField = dict(((int(v), v) for k, v in cudaGraphKernelNodeField.__members__.items())) + +class cudaGetDriverEntryPointFlags(IntEnum): + """ + Flags to specify search options to be used with + :py:obj:`~.cudaGetDriverEntryPoint` For more details see + :py:obj:`~.cuGetProcAddress` + """ + + #: Default search mode for driver symbols. + cudaEnableDefault = cyruntime.cudaGetDriverEntryPointFlags.cudaEnableDefault + + #: Search for legacy versions of driver symbols. + cudaEnableLegacyStream = cyruntime.cudaGetDriverEntryPointFlags.cudaEnableLegacyStream + + #: Search for per-thread versions of driver symbols. + cudaEnablePerThreadDefaultStream = cyruntime.cudaGetDriverEntryPointFlags.cudaEnablePerThreadDefaultStream + +_dict_cudaGetDriverEntryPointFlags = dict(((int(v), v) for k, v in cudaGetDriverEntryPointFlags.__members__.items())) + +class cudaDriverEntryPointQueryResult(IntEnum): + """ + Enum for status from obtaining driver entry points, used with + :py:obj:`~.cudaApiGetDriverEntryPoint` + """ + + #: Search for symbol found a match + cudaDriverEntryPointSuccess = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSuccess + + #: Search for symbol was not found + cudaDriverEntryPointSymbolNotFound = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSymbolNotFound + + #: Search for symbol was found but version wasn't great enough + cudaDriverEntryPointVersionNotSufficent = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointVersionNotSufficent + +_dict_cudaDriverEntryPointQueryResult = dict(((int(v), v) for k, v in cudaDriverEntryPointQueryResult.__members__.items())) + +class cudaGraphDebugDotFlags(IntEnum): + """ + CUDA Graph debug write options + """ + + #: Output all debug data as if every debug flag is enabled + cudaGraphDebugDotFlagsVerbose = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsVerbose + + #: Adds :py:obj:`~.cudaKernelNodeParams` to output + cudaGraphDebugDotFlagsKernelNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeParams + + #: Adds :py:obj:`~.cudaMemcpy3DParms` to output + cudaGraphDebugDotFlagsMemcpyNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemcpyNodeParams + + #: Adds :py:obj:`~.cudaMemsetParams` to output + cudaGraphDebugDotFlagsMemsetNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemsetNodeParams + + #: Adds :py:obj:`~.cudaHostNodeParams` to output + cudaGraphDebugDotFlagsHostNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHostNodeParams + + #: Adds cudaEvent_t handle from record and wait nodes to output + cudaGraphDebugDotFlagsEventNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams + + #: Adds :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` values to + #: output + cudaGraphDebugDotFlagsExtSemasSignalNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams + + #: Adds :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` to output + cudaGraphDebugDotFlagsExtSemasWaitNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasWaitNodeParams + + #: Adds cudaKernelNodeAttrID values to output + cudaGraphDebugDotFlagsKernelNodeAttributes = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeAttributes + + #: Adds node handles and every kernel function handle to output + cudaGraphDebugDotFlagsHandles = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHandles + + #: Adds :py:obj:`~.cudaConditionalNodeParams` to output + cudaGraphDebugDotFlagsConditionalNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsConditionalNodeParams + +_dict_cudaGraphDebugDotFlags = dict(((int(v), v) for k, v in cudaGraphDebugDotFlags.__members__.items())) + +class cudaGraphInstantiateFlags(IntEnum): + """ + Flags for instantiating a graph + """ + + #: Automatically free memory allocated in a graph before relaunching. + cudaGraphInstantiateFlagAutoFreeOnLaunch = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagAutoFreeOnLaunch + + #: Automatically upload the graph after instantiation. Only supported + #: by + #: :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be + #: performed using the + #: stream provided in `instantiateParams`. + cudaGraphInstantiateFlagUpload = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUpload + + #: Instantiate the graph to be launchable from the device. This flag + #: can only + #: be used on platforms which support unified addressing. This flag + #: cannot be + #: used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch. + cudaGraphInstantiateFlagDeviceLaunch = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch + + #: Run the graph using the per-node priority attributes rather than the + #: priority of the stream it is launched into. + cudaGraphInstantiateFlagUseNodePriority = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUseNodePriority + +_dict_cudaGraphInstantiateFlags = dict(((int(v), v) for k, v in cudaGraphInstantiateFlags.__members__.items())) + +class cudaDeviceNumaConfig(IntEnum): + """ + CUDA device NUMA config + """ + + #: The GPU is not a NUMA node + cudaDeviceNumaConfigNone = cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNone + + #: The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID + cudaDeviceNumaConfigNumaNode = cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNumaNode + +_dict_cudaDeviceNumaConfig = dict(((int(v), v) for k, v in cudaDeviceNumaConfig.__members__.items())) + +class cudaSurfaceBoundaryMode(IntEnum): + """ + CUDA Surface boundary modes + """ + + #: Zero boundary mode + cudaBoundaryModeZero = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeZero + + #: Clamp boundary mode + cudaBoundaryModeClamp = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeClamp + + #: Trap boundary mode + cudaBoundaryModeTrap = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeTrap + +_dict_cudaSurfaceBoundaryMode = dict(((int(v), v) for k, v in cudaSurfaceBoundaryMode.__members__.items())) + +class cudaSurfaceFormatMode(IntEnum): + """ + CUDA Surface format modes + """ + + #: Forced format mode + cudaFormatModeForced = cyruntime.cudaSurfaceFormatMode.cudaFormatModeForced + + #: Auto format mode + cudaFormatModeAuto = cyruntime.cudaSurfaceFormatMode.cudaFormatModeAuto + +_dict_cudaSurfaceFormatMode = dict(((int(v), v) for k, v in cudaSurfaceFormatMode.__members__.items())) + +class cudaTextureAddressMode(IntEnum): + """ + CUDA texture address modes + """ + + #: Wrapping address mode + cudaAddressModeWrap = cyruntime.cudaTextureAddressMode.cudaAddressModeWrap + + #: Clamp to edge address mode + cudaAddressModeClamp = cyruntime.cudaTextureAddressMode.cudaAddressModeClamp + + #: Mirror address mode + cudaAddressModeMirror = cyruntime.cudaTextureAddressMode.cudaAddressModeMirror + + #: Border address mode + cudaAddressModeBorder = cyruntime.cudaTextureAddressMode.cudaAddressModeBorder + +_dict_cudaTextureAddressMode = dict(((int(v), v) for k, v in cudaTextureAddressMode.__members__.items())) + +class cudaTextureFilterMode(IntEnum): + """ + CUDA texture filter modes + """ + + #: Point filter mode + cudaFilterModePoint = cyruntime.cudaTextureFilterMode.cudaFilterModePoint + + #: Linear filter mode + cudaFilterModeLinear = cyruntime.cudaTextureFilterMode.cudaFilterModeLinear + +_dict_cudaTextureFilterMode = dict(((int(v), v) for k, v in cudaTextureFilterMode.__members__.items())) + +class cudaTextureReadMode(IntEnum): + """ + CUDA texture read modes + """ + + #: Read texture as specified element type + cudaReadModeElementType = cyruntime.cudaTextureReadMode.cudaReadModeElementType + + #: Read texture as normalized float + cudaReadModeNormalizedFloat = cyruntime.cudaTextureReadMode.cudaReadModeNormalizedFloat + +_dict_cudaTextureReadMode = dict(((int(v), v) for k, v in cudaTextureReadMode.__members__.items())) + +class cudaRoundMode(IntEnum): + """""" + cudaRoundNearest = cyruntime.cudaRoundMode.cudaRoundNearest + cudaRoundZero = cyruntime.cudaRoundMode.cudaRoundZero + cudaRoundPosInf = cyruntime.cudaRoundMode.cudaRoundPosInf + cudaRoundMinInf = cyruntime.cudaRoundMode.cudaRoundMinInf + +_dict_cudaRoundMode = dict(((int(v), v) for k, v in cudaRoundMode.__members__.items())) + +class cudaGLDeviceList(IntEnum): + """ + CUDA devices corresponding to the current OpenGL context + """ + + #: The CUDA devices for all GPUs used by the current OpenGL context + cudaGLDeviceListAll = cyruntime.cudaGLDeviceList.cudaGLDeviceListAll + + #: The CUDA devices for the GPUs used by the current OpenGL context in + #: its currently rendering frame + cudaGLDeviceListCurrentFrame = cyruntime.cudaGLDeviceList.cudaGLDeviceListCurrentFrame + + #: The CUDA devices for the GPUs to be used by the current OpenGL + #: context in the next frame + cudaGLDeviceListNextFrame = cyruntime.cudaGLDeviceList.cudaGLDeviceListNextFrame + +_dict_cudaGLDeviceList = dict(((int(v), v) for k, v in cudaGLDeviceList.__members__.items())) + +class cudaGLMapFlags(IntEnum): + """ + CUDA GL Map Flags + """ + + #: Default; Assume resource can be read/written + cudaGLMapFlagsNone = cyruntime.cudaGLMapFlags.cudaGLMapFlagsNone + + #: CUDA kernels will not write to this resource + cudaGLMapFlagsReadOnly = cyruntime.cudaGLMapFlags.cudaGLMapFlagsReadOnly + + #: CUDA kernels will only write to and will not read from this resource + cudaGLMapFlagsWriteDiscard = cyruntime.cudaGLMapFlags.cudaGLMapFlagsWriteDiscard + +_dict_cudaGLMapFlags = dict(((int(v), v) for k, v in cudaGLMapFlags.__members__.items())) + +class cudaStreamAttrID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.cudaLaunchAttribute` + """ + + #: Ignored entry, for convenient composition + cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. + cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. + cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative + + #: Valid for streams. See + #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. + cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. + cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. + cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference + + #: Valid for launches. Setting + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event programmatically in a future + #: CUDA release. A trigger can also be inserted at the beginning of + #: each block's execution if triggerAtBlockStart is set to non-0. The + #: dependent launches can choose to wait on the dependency using the + #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cudaEventSynchronize()` may only observe the event + #: trigger long after the associated kernel has completed. This + #: recording type is primarily meant for establishing programmatic + #: dependency between device tasks. Note also this type of dependency + #: allows, but does not guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.priority`. + cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. + cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. + cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to + #: this functionality, a node cannot opt out, and any attempt to set + #: the deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a + #: percentage between 0-100 signals sets the shared memory carveout + #: preference in percent of the total shared memory for that kernel + #: launch. This attribute takes precedence over + #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is + #: only a hint, and the driver can choose a different configuration if + #: required for the launch. + cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout + +_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + +class cudaKernelNodeAttrID(IntEnum): + """ + Launch attributes enum; used as id field of + :py:obj:`~.cudaLaunchAttribute` + """ + + #: Ignored entry, for convenient composition + cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. + cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. + cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative + + #: Valid for streams. See + #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. + cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. + cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension + + #: Valid for graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. + cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference + + #: Valid for launches. Setting + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` + #: to non-0 signals that the kernel will use programmatic means to + #: resolve its stream dependency, so that the CUDA runtime should + #: opportunistically allow the grid's execution to overlap with the + #: previous kernel in the stream, if that kernel requests the overlap. + #: The dependent launches can choose to wait on the dependency using + #: the programmatic sync (cudaGridDependencySynchronize() or equivalent + #: PTX instructions). + cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the + #: event. Event recorded through this launch attribute is guaranteed to + #: only trigger after all block in the associated kernel trigger the + #: event. A block can trigger the event programmatically in a future + #: CUDA release. A trigger can also be inserted at the beginning of + #: each block's execution if triggerAtBlockStart is set to non-0. The + #: dependent launches can choose to wait on the dependency using the + #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX + #: instructions). Note that dependents (including the CPU thread + #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to + #: observe the release precisely when it is released. For example, + #: :py:obj:`~.cudaEventSynchronize()` may only observe the event + #: trigger long after the associated kernel has completed. This + #: recording type is primarily meant for establishing programmatic + #: dependency between device tasks. Note also this type of dependency + #: allows, but does not guarantee, concurrent execution of tasks. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.priority`. + cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. + cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap + + #: Valid for streams, graph nodes, launches. See + #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. + cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension + + #: Valid for launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record + #: the event. + #: Nominally, the event is triggered once all blocks of the kernel + #: have begun execution. Currently this is a best effort. If a kernel B + #: has a launch completion dependency on a kernel A, B may wait until A + #: is complete. Alternatively, blocks of B may begin before all blocks + #: of A have begun, for example if B can claim execution resources + #: unavailable to A (e.g. they run on different GPUs) or if B is a + #: higher priority than A. Exercise caution if such an ordering + #: inversion could lead to deadlock. + #: A launch completion event is nominally similar to a programmatic + #: event with `triggerAtBlockStart` set except that it is not visible + #: to `cudaGridDependencySynchronize()` and can be used with compute + #: capability less than 9.0. + #: The event supplied must not be an interprocess or interop event. + #: The event must disable timing (i.e. must be created with the + #: :py:obj:`~.cudaEventDisableTiming` flag set). + cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent + + #: Valid for graph nodes, launches. This attribute is graphs-only, and + #: passing it to a launch in a non-capturing stream will result in an + #: error. + #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable + #: can only be set to 0 or 1. Setting the field to 1 indicates that the + #: corresponding kernel node should be device-updatable. On success, a + #: handle will be returned via + #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode + #: which can be passed to the various device-side update functions to + #: update the node's kernel parameters from within another kernel. For + #: more information on the types of device updates that can be made, as + #: well as the relevant limitations thereof, see + #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. + #: Nodes which are device-updatable have additional restrictions + #: compared to regular kernel nodes. Firstly, device-updatable nodes + #: cannot be removed from their graph via + #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to + #: this functionality, a node cannot opt out, and any attempt to set + #: the deviceUpdatable attribute to 0 will result in an error. Device- + #: updatable kernel nodes also cannot have their attributes copied + #: to/from another kernel node via + #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one + #: or more device-updatable nodes also do not allow multiple + #: instantiation, and neither the graph nor its instantiated version + #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. + #: If a graph contains device-updatable nodes and updates those nodes + #: from the device from within the graph, the graph must be uploaded + #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a + #: graph, if host-side executable graph updates are made to the device- + #: updatable nodes, the graph must be uploaded before it is launched + #: again. + cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode + + #: Valid for launches. On devices where the L1 cache and shared memory + #: use the same hardware resources, setting + #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a + #: percentage between 0-100 signals sets the shared memory carveout + #: preference in percent of the total shared memory for that kernel + #: launch. This attribute takes precedence over + #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is + #: only a hint, and the driver can choose a different configuration if + #: required for the launch. + cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout + +_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + +cdef class cudaArray_t: + """ + + CUDA array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaArray_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaArray_const_t: + """ + + CUDA array (as source copy argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaArray_const_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaMipmappedArray_t: + """ + + CUDA mipmapped array + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaMipmappedArray_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaMipmappedArray_const_t: + """ + + CUDA mipmapped array (as source argument) + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaMipmappedArray_const_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaGraphicsResource_t: + """ + + CUDA graphics resource types + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaGraphicsResource_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaExternalMemory_t: + """ + + CUDA external memory + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaExternalMemory_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaExternalSemaphore_t: + """ + + CUDA external semaphore + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaExternalSemaphore_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaKernel_t: + """ + + CUDA kernel + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaKernel_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaLibrary_t: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaLibrary_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaGraphDeviceNode_t: + """ + + CUDA device node handle for device-side node update + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaGraphDeviceNode_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaAsyncCallbackHandle_t: + """ + + CUDA async callback handle + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, cudaAsyncCallbackHandle_t): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLImageKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLImageKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLStreamKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLStreamKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLSyncKHR: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, EGLSyncKHR): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaHostFn_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaAsyncCallback: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaStreamCallback_t: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class dim3: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].x = x + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].y = y + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].z = z + +cdef class cudaChannelFormatDesc: + """ + CUDA Channel format descriptor + + Attributes + ---------- + x : int + x + y : int + y + z : int + z + w : int + w + f : cudaChannelFormatKind + Channel format kind + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + try: + str_list += ['w : ' + str(self.w)] + except ValueError: + str_list += ['w : '] + try: + str_list += ['f : ' + str(self.f)] + except ValueError: + str_list += ['f : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, int x): + self._pvt_ptr[0].x = x + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, int y): + self._pvt_ptr[0].y = y + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, int z): + self._pvt_ptr[0].z = z + @property + def w(self): + return self._pvt_ptr[0].w + @w.setter + def w(self, int w): + self._pvt_ptr[0].w = w + @property + def f(self): + if self._pvt_ptr[0].f not in _dict_cudaChannelFormatKind: + return None + return _dict_cudaChannelFormatKind[self._pvt_ptr[0].f] + @f.setter + def f(self, f not None : cudaChannelFormatKind): + self._pvt_ptr[0].f = f.value + +cdef class anon_struct0: + """ + Attributes + ---------- + width : unsigned int + + height : unsigned int + + depth : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].tileExtent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def width(self): + return self._pvt_ptr[0].tileExtent.width + @width.setter + def width(self, unsigned int width): + self._pvt_ptr[0].tileExtent.width = width + @property + def height(self): + return self._pvt_ptr[0].tileExtent.height + @height.setter + def height(self, unsigned int height): + self._pvt_ptr[0].tileExtent.height = height + @property + def depth(self): + return self._pvt_ptr[0].tileExtent.depth + @depth.setter + def depth(self, unsigned int depth): + self._pvt_ptr[0].tileExtent.depth = depth + +cdef class cudaArraySparseProperties: + """ + Sparse CUDA array and CUDA mipmapped array properties + + Attributes + ---------- + tileExtent : anon_struct0 + + miptailFirstLevel : unsigned int + First mip level at which the mip tail begins + miptailSize : unsigned long long + Total size of the mip tail. + flags : unsigned int + Flags will either be zero or cudaArraySparsePropertiesSingleMipTail + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._tileExtent = anon_struct0(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['tileExtent :\n' + '\n'.join([' ' + line for line in str(self.tileExtent).splitlines()])] + except ValueError: + str_list += ['tileExtent : '] + try: + str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)] + except ValueError: + str_list += ['miptailFirstLevel : '] + try: + str_list += ['miptailSize : ' + str(self.miptailSize)] + except ValueError: + str_list += ['miptailSize : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def tileExtent(self): + return self._tileExtent + @tileExtent.setter + def tileExtent(self, tileExtent not None : anon_struct0): + string.memcpy(&self._pvt_ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._pvt_ptr[0].tileExtent)) + @property + def miptailFirstLevel(self): + return self._pvt_ptr[0].miptailFirstLevel + @miptailFirstLevel.setter + def miptailFirstLevel(self, unsigned int miptailFirstLevel): + self._pvt_ptr[0].miptailFirstLevel = miptailFirstLevel + @property + def miptailSize(self): + return self._pvt_ptr[0].miptailSize + @miptailSize.setter + def miptailSize(self, unsigned long long miptailSize): + self._pvt_ptr[0].miptailSize = miptailSize + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class cudaArrayMemoryRequirements: + """ + CUDA array and CUDA mipmapped array memory requirements + + Attributes + ---------- + size : size_t + Total size of the array. + alignment : size_t + Alignment necessary for mapping the array. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['alignment : ' + str(self.alignment)] + except ValueError: + str_list += ['alignment : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, size_t size): + self._pvt_ptr[0].size = size + @property + def alignment(self): + return self._pvt_ptr[0].alignment + @alignment.setter + def alignment(self, size_t alignment): + self._pvt_ptr[0].alignment = alignment + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class cudaPitchedPtr: + """ + CUDA Pitched memory pointer ::make_cudaPitchedPtr + + Attributes + ---------- + ptr : Any + Pointer to allocated memory + pitch : size_t + Pitch of allocated memory in bytes + xsize : size_t + Logical width of allocation in elements + ysize : size_t + Logical height of allocation in elements + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ptr : ' + hex(self.ptr)] + except ValueError: + str_list += ['ptr : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['xsize : ' + str(self.xsize)] + except ValueError: + str_list += ['xsize : '] + try: + str_list += ['ysize : ' + str(self.ysize)] + except ValueError: + str_list += ['ysize : '] + return '\n'.join(str_list) + else: + return '' + @property + def ptr(self): + return self._pvt_ptr[0].ptr + @ptr.setter + def ptr(self, ptr): + _cptr = _HelperInputVoidPtr(ptr) + self._pvt_ptr[0].ptr = _cptr.cptr + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, size_t pitch): + self._pvt_ptr[0].pitch = pitch + @property + def xsize(self): + return self._pvt_ptr[0].xsize + @xsize.setter + def xsize(self, size_t xsize): + self._pvt_ptr[0].xsize = xsize + @property + def ysize(self): + return self._pvt_ptr[0].ysize + @ysize.setter + def ysize(self, size_t ysize): + self._pvt_ptr[0].ysize = ysize + +cdef class cudaExtent: + """ + CUDA extent ::make_cudaExtent + + Attributes + ---------- + width : size_t + Width in elements when referring to array memory, in bytes when + referring to linear memory + height : size_t + Height in elements + depth : size_t + Depth in elements + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + return '\n'.join(str_list) + else: + return '' + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, size_t depth): + self._pvt_ptr[0].depth = depth + +cdef class cudaPos: + """ + CUDA 3D position ::make_cudaPos + + Attributes + ---------- + x : size_t + x + y : size_t + y + z : size_t + z + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, size_t x): + self._pvt_ptr[0].x = x + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, size_t y): + self._pvt_ptr[0].y = y + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, size_t z): + self._pvt_ptr[0].z = z + +cdef class cudaMemcpy3DParms: + """ + CUDA 3D memory copying parameters + + Attributes + ---------- + srcArray : cudaArray_t + Source memory address + srcPos : cudaPos + Source position offset + srcPtr : cudaPitchedPtr + Pitched source memory address + dstArray : cudaArray_t + Destination memory address + dstPos : cudaPos + Destination position offset + dstPtr : cudaPitchedPtr + Pitched destination memory address + extent : cudaExtent + Requested memory copy size + kind : cudaMemcpyKind + Type of transfer + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcArray = cudaArray_t(_ptr=&self._pvt_ptr[0].srcArray) + self._srcPos = cudaPos(_ptr=&self._pvt_ptr[0].srcPos) + self._srcPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].srcPtr) + self._dstArray = cudaArray_t(_ptr=&self._pvt_ptr[0].dstArray) + self._dstPos = cudaPos(_ptr=&self._pvt_ptr[0].dstPos) + self._dstPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].dstPtr) + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcArray : ' + str(self.srcArray)] + except ValueError: + str_list += ['srcArray : '] + try: + str_list += ['srcPos :\n' + '\n'.join([' ' + line for line in str(self.srcPos).splitlines()])] + except ValueError: + str_list += ['srcPos : '] + try: + str_list += ['srcPtr :\n' + '\n'.join([' ' + line for line in str(self.srcPtr).splitlines()])] + except ValueError: + str_list += ['srcPtr : '] + try: + str_list += ['dstArray : ' + str(self.dstArray)] + except ValueError: + str_list += ['dstArray : '] + try: + str_list += ['dstPos :\n' + '\n'.join([' ' + line for line in str(self.dstPos).splitlines()])] + except ValueError: + str_list += ['dstPos : '] + try: + str_list += ['dstPtr :\n' + '\n'.join([' ' + line for line in str(self.dstPtr).splitlines()])] + except ValueError: + str_list += ['dstPtr : '] + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + try: + str_list += ['kind : ' + str(self.kind)] + except ValueError: + str_list += ['kind : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcArray(self): + return self._srcArray + @srcArray.setter + def srcArray(self, srcArray): + cdef cyruntime.cudaArray_t cysrcArray + if srcArray is None: + cysrcArray = 0 + elif isinstance(srcArray, (cudaArray_t,)): + psrcArray = int(srcArray) + cysrcArray = psrcArray + else: + psrcArray = int(cudaArray_t(srcArray)) + cysrcArray = psrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + @property + def srcPos(self): + return self._srcPos + @srcPos.setter + def srcPos(self, srcPos not None : cudaPos): + string.memcpy(&self._pvt_ptr[0].srcPos, srcPos.getPtr(), sizeof(self._pvt_ptr[0].srcPos)) + @property + def srcPtr(self): + return self._srcPtr + @srcPtr.setter + def srcPtr(self, srcPtr not None : cudaPitchedPtr): + string.memcpy(&self._pvt_ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._pvt_ptr[0].srcPtr)) + @property + def dstArray(self): + return self._dstArray + @dstArray.setter + def dstArray(self, dstArray): + cdef cyruntime.cudaArray_t cydstArray + if dstArray is None: + cydstArray = 0 + elif isinstance(dstArray, (cudaArray_t,)): + pdstArray = int(dstArray) + cydstArray = pdstArray + else: + pdstArray = int(cudaArray_t(dstArray)) + cydstArray = pdstArray + self._dstArray._pvt_ptr[0] = cydstArray + @property + def dstPos(self): + return self._dstPos + @dstPos.setter + def dstPos(self, dstPos not None : cudaPos): + string.memcpy(&self._pvt_ptr[0].dstPos, dstPos.getPtr(), sizeof(self._pvt_ptr[0].dstPos)) + @property + def dstPtr(self): + return self._dstPtr + @dstPtr.setter + def dstPtr(self, dstPtr not None : cudaPitchedPtr): + string.memcpy(&self._pvt_ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._pvt_ptr[0].dstPtr)) + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : cudaExtent): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + @property + def kind(self): + if self._pvt_ptr[0].kind not in _dict_cudaMemcpyKind: + return None + return _dict_cudaMemcpyKind[self._pvt_ptr[0].kind] + @kind.setter + def kind(self, kind not None : cudaMemcpyKind): + self._pvt_ptr[0].kind = kind.value + +cdef class cudaMemcpyNodeParams: + """ + Memcpy node parameters + + Attributes + ---------- + flags : int + Must be zero + reserved : list[int] + Must be zero + copyParams : cudaMemcpy3DParms + Parameters for the memory copy + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._copyParams = cudaMemcpy3DParms(_ptr=&self._pvt_ptr[0].copyParams) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + try: + str_list += ['copyParams :\n' + '\n'.join([' ' + line for line in str(self.copyParams).splitlines()])] + except ValueError: + str_list += ['copyParams : '] + return '\n'.join(str_list) + else: + return '' + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + @property + def copyParams(self): + return self._copyParams + @copyParams.setter + def copyParams(self, copyParams not None : cudaMemcpy3DParms): + string.memcpy(&self._pvt_ptr[0].copyParams, copyParams.getPtr(), sizeof(self._pvt_ptr[0].copyParams)) + +cdef class cudaMemcpy3DPeerParms: + """ + CUDA 3D cross-device memory copying parameters + + Attributes + ---------- + srcArray : cudaArray_t + Source memory address + srcPos : cudaPos + Source position offset + srcPtr : cudaPitchedPtr + Pitched source memory address + srcDevice : int + Source device + dstArray : cudaArray_t + Destination memory address + dstPos : cudaPos + Destination position offset + dstPtr : cudaPitchedPtr + Pitched destination memory address + dstDevice : int + Destination device + extent : cudaExtent + Requested memory copy size + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcArray = cudaArray_t(_ptr=&self._pvt_ptr[0].srcArray) + self._srcPos = cudaPos(_ptr=&self._pvt_ptr[0].srcPos) + self._srcPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].srcPtr) + self._dstArray = cudaArray_t(_ptr=&self._pvt_ptr[0].dstArray) + self._dstPos = cudaPos(_ptr=&self._pvt_ptr[0].dstPos) + self._dstPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].dstPtr) + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcArray : ' + str(self.srcArray)] + except ValueError: + str_list += ['srcArray : '] + try: + str_list += ['srcPos :\n' + '\n'.join([' ' + line for line in str(self.srcPos).splitlines()])] + except ValueError: + str_list += ['srcPos : '] + try: + str_list += ['srcPtr :\n' + '\n'.join([' ' + line for line in str(self.srcPtr).splitlines()])] + except ValueError: + str_list += ['srcPtr : '] + try: + str_list += ['srcDevice : ' + str(self.srcDevice)] + except ValueError: + str_list += ['srcDevice : '] + try: + str_list += ['dstArray : ' + str(self.dstArray)] + except ValueError: + str_list += ['dstArray : '] + try: + str_list += ['dstPos :\n' + '\n'.join([' ' + line for line in str(self.dstPos).splitlines()])] + except ValueError: + str_list += ['dstPos : '] + try: + str_list += ['dstPtr :\n' + '\n'.join([' ' + line for line in str(self.dstPtr).splitlines()])] + except ValueError: + str_list += ['dstPtr : '] + try: + str_list += ['dstDevice : ' + str(self.dstDevice)] + except ValueError: + str_list += ['dstDevice : '] + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcArray(self): + return self._srcArray + @srcArray.setter + def srcArray(self, srcArray): + cdef cyruntime.cudaArray_t cysrcArray + if srcArray is None: + cysrcArray = 0 + elif isinstance(srcArray, (cudaArray_t,)): + psrcArray = int(srcArray) + cysrcArray = psrcArray + else: + psrcArray = int(cudaArray_t(srcArray)) + cysrcArray = psrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + @property + def srcPos(self): + return self._srcPos + @srcPos.setter + def srcPos(self, srcPos not None : cudaPos): + string.memcpy(&self._pvt_ptr[0].srcPos, srcPos.getPtr(), sizeof(self._pvt_ptr[0].srcPos)) + @property + def srcPtr(self): + return self._srcPtr + @srcPtr.setter + def srcPtr(self, srcPtr not None : cudaPitchedPtr): + string.memcpy(&self._pvt_ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._pvt_ptr[0].srcPtr)) + @property + def srcDevice(self): + return self._pvt_ptr[0].srcDevice + @srcDevice.setter + def srcDevice(self, int srcDevice): + self._pvt_ptr[0].srcDevice = srcDevice + @property + def dstArray(self): + return self._dstArray + @dstArray.setter + def dstArray(self, dstArray): + cdef cyruntime.cudaArray_t cydstArray + if dstArray is None: + cydstArray = 0 + elif isinstance(dstArray, (cudaArray_t,)): + pdstArray = int(dstArray) + cydstArray = pdstArray + else: + pdstArray = int(cudaArray_t(dstArray)) + cydstArray = pdstArray + self._dstArray._pvt_ptr[0] = cydstArray + @property + def dstPos(self): + return self._dstPos + @dstPos.setter + def dstPos(self, dstPos not None : cudaPos): + string.memcpy(&self._pvt_ptr[0].dstPos, dstPos.getPtr(), sizeof(self._pvt_ptr[0].dstPos)) + @property + def dstPtr(self): + return self._dstPtr + @dstPtr.setter + def dstPtr(self, dstPtr not None : cudaPitchedPtr): + string.memcpy(&self._pvt_ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._pvt_ptr[0].dstPtr)) + @property + def dstDevice(self): + return self._pvt_ptr[0].dstDevice + @dstDevice.setter + def dstDevice(self, int dstDevice): + self._pvt_ptr[0].dstDevice = dstDevice + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : cudaExtent): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + +cdef class cudaMemsetParams: + """ + CUDA Memset node parameters + + Attributes + ---------- + dst : Any + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dst : ' + hex(self.dst)] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['elementSize : ' + str(self.elementSize)] + except ValueError: + str_list += ['elementSize : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + return '\n'.join(str_list) + else: + return '' + @property + def dst(self): + return self._pvt_ptr[0].dst + @dst.setter + def dst(self, dst): + _cdst = _HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, size_t pitch): + self._pvt_ptr[0].pitch = pitch + @property + def value(self): + return self._pvt_ptr[0].value + @value.setter + def value(self, unsigned int value): + self._pvt_ptr[0].value = value + @property + def elementSize(self): + return self._pvt_ptr[0].elementSize + @elementSize.setter + def elementSize(self, unsigned int elementSize): + self._pvt_ptr[0].elementSize = elementSize + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + +cdef class cudaMemsetParamsV2: + """ + CUDA Memset node parameters + + Attributes + ---------- + dst : Any + Destination device pointer + pitch : size_t + Pitch of destination device pointer. Unused if height is 1 + value : unsigned int + Value to be set + elementSize : unsigned int + Size of each element in bytes. Must be 1, 2, or 4. + width : size_t + Width of the row in elements + height : size_t + Number of rows + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dst : ' + hex(self.dst)] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + try: + str_list += ['elementSize : ' + str(self.elementSize)] + except ValueError: + str_list += ['elementSize : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + return '\n'.join(str_list) + else: + return '' + @property + def dst(self): + return self._pvt_ptr[0].dst + @dst.setter + def dst(self, dst): + _cdst = _HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, size_t pitch): + self._pvt_ptr[0].pitch = pitch + @property + def value(self): + return self._pvt_ptr[0].value + @value.setter + def value(self, unsigned int value): + self._pvt_ptr[0].value = value + @property + def elementSize(self): + return self._pvt_ptr[0].elementSize + @elementSize.setter + def elementSize(self, unsigned int elementSize): + self._pvt_ptr[0].elementSize = elementSize + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + +cdef class cudaAccessPolicyWindow: + """ + Specifies an access policy for a window, a contiguous extent of + memory beginning at base_ptr and ending at base_ptr + num_bytes. + Partition into many segments and assign segments such that. sum of + "hit segments" / window == approx. ratio. sum of "miss segments" / + window == approx 1-ratio. Segments and ratio specifications are + fitted to the capabilities of the architecture. Accesses in a hit + segment apply the hitProp access policy. Accesses in a miss segment + apply the missProp access policy. + + Attributes + ---------- + base_ptr : Any + Starting address of the access policy window. CUDA driver may align + it. + num_bytes : size_t + Size in bytes of the window policy. CUDA driver may restrict the + maximum size and alignment. + hitRatio : float + hitRatio specifies percentage of lines assigned hitProp, rest are + assigned missProp. + hitProp : cudaAccessProperty + ::CUaccessProperty set for hit. + missProp : cudaAccessProperty + ::CUaccessProperty set for miss. Must be either NORMAL or + STREAMING. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['base_ptr : ' + hex(self.base_ptr)] + except ValueError: + str_list += ['base_ptr : '] + try: + str_list += ['num_bytes : ' + str(self.num_bytes)] + except ValueError: + str_list += ['num_bytes : '] + try: + str_list += ['hitRatio : ' + str(self.hitRatio)] + except ValueError: + str_list += ['hitRatio : '] + try: + str_list += ['hitProp : ' + str(self.hitProp)] + except ValueError: + str_list += ['hitProp : '] + try: + str_list += ['missProp : ' + str(self.missProp)] + except ValueError: + str_list += ['missProp : '] + return '\n'.join(str_list) + else: + return '' + @property + def base_ptr(self): + return self._pvt_ptr[0].base_ptr + @base_ptr.setter + def base_ptr(self, base_ptr): + _cbase_ptr = _HelperInputVoidPtr(base_ptr) + self._pvt_ptr[0].base_ptr = _cbase_ptr.cptr + @property + def num_bytes(self): + return self._pvt_ptr[0].num_bytes + @num_bytes.setter + def num_bytes(self, size_t num_bytes): + self._pvt_ptr[0].num_bytes = num_bytes + @property + def hitRatio(self): + return self._pvt_ptr[0].hitRatio + @hitRatio.setter + def hitRatio(self, float hitRatio): + self._pvt_ptr[0].hitRatio = hitRatio + @property + def hitProp(self): + if self._pvt_ptr[0].hitProp not in _dict_cudaAccessProperty: + return None + return _dict_cudaAccessProperty[self._pvt_ptr[0].hitProp] + @hitProp.setter + def hitProp(self, hitProp not None : cudaAccessProperty): + self._pvt_ptr[0].hitProp = hitProp.value + @property + def missProp(self): + if self._pvt_ptr[0].missProp not in _dict_cudaAccessProperty: + return None + return _dict_cudaAccessProperty[self._pvt_ptr[0].missProp] + @missProp.setter + def missProp(self, missProp not None : cudaAccessProperty): + self._pvt_ptr[0].missProp = missProp.value + +cdef class cudaHostNodeParams: + """ + CUDA host node parameters + + Attributes + ---------- + fn : cudaHostFn_t + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._fn = cudaHostFn_t(_ptr=&self._pvt_ptr[0].fn) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fn : ' + str(self.fn)] + except ValueError: + str_list += ['fn : '] + try: + str_list += ['userData : ' + hex(self.userData)] + except ValueError: + str_list += ['userData : '] + return '\n'.join(str_list) + else: + return '' + @property + def fn(self): + return self._fn + @fn.setter + def fn(self, fn): + cdef cyruntime.cudaHostFn_t cyfn + if fn is None: + cyfn = 0 + elif isinstance(fn, (cudaHostFn_t)): + pfn = int(fn) + cyfn = pfn + else: + pfn = int(cudaHostFn_t(fn)) + cyfn = pfn + self._fn._pvt_ptr[0] = cyfn + @property + def userData(self): + return self._pvt_ptr[0].userData + @userData.setter + def userData(self, userData): + _cuserData = _HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + +cdef class cudaHostNodeParamsV2: + """ + CUDA host node parameters + + Attributes + ---------- + fn : cudaHostFn_t + The function to call when the node executes + userData : Any + Argument to pass to the function + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._fn = cudaHostFn_t(_ptr=&self._pvt_ptr[0].fn) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fn : ' + str(self.fn)] + except ValueError: + str_list += ['fn : '] + try: + str_list += ['userData : ' + hex(self.userData)] + except ValueError: + str_list += ['userData : '] + return '\n'.join(str_list) + else: + return '' + @property + def fn(self): + return self._fn + @fn.setter + def fn(self, fn): + cdef cyruntime.cudaHostFn_t cyfn + if fn is None: + cyfn = 0 + elif isinstance(fn, (cudaHostFn_t)): + pfn = int(fn) + cyfn = pfn + else: + pfn = int(cudaHostFn_t(fn)) + cyfn = pfn + self._fn._pvt_ptr[0] = cyfn + @property + def userData(self): + return self._pvt_ptr[0].userData + @userData.setter + def userData(self, userData): + _cuserData = _HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + +cdef class anon_struct1: + """ + Attributes + ---------- + array : cudaArray_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._array = cudaArray_t(_ptr=&self._pvt_ptr[0].res.array.array) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + return '\n'.join(str_list) + else: + return '' + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cyruntime.cudaArray_t cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + cyarray = parray + else: + parray = int(cudaArray_t(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + +cdef class anon_struct2: + """ + Attributes + ---------- + mipmap : cudaMipmappedArray_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._mipmap = cudaMipmappedArray_t(_ptr=&self._pvt_ptr[0].res.mipmap.mipmap) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.mipmap + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['mipmap : ' + str(self.mipmap)] + except ValueError: + str_list += ['mipmap : '] + return '\n'.join(str_list) + else: + return '' + @property + def mipmap(self): + return self._mipmap + @mipmap.setter + def mipmap(self, mipmap): + cdef cyruntime.cudaMipmappedArray_t cymipmap + if mipmap is None: + cymipmap = 0 + elif isinstance(mipmap, (cudaMipmappedArray_t,)): + pmipmap = int(mipmap) + cymipmap = pmipmap + else: + pmipmap = int(cudaMipmappedArray_t(mipmap)) + cymipmap = pmipmap + self._mipmap._pvt_ptr[0] = cymipmap + +cdef class anon_struct3: + """ + Attributes + ---------- + devPtr : Any + + desc : cudaChannelFormatDesc + + sizeInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._desc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].res.linear.desc) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.linear + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['devPtr : ' + hex(self.devPtr)] + except ValueError: + str_list += ['devPtr : '] + try: + str_list += ['desc :\n' + '\n'.join([' ' + line for line in str(self.desc).splitlines()])] + except ValueError: + str_list += ['desc : '] + try: + str_list += ['sizeInBytes : ' + str(self.sizeInBytes)] + except ValueError: + str_list += ['sizeInBytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def devPtr(self): + return self._pvt_ptr[0].res.linear.devPtr + @devPtr.setter + def devPtr(self, devPtr): + _cdevPtr = _HelperInputVoidPtr(devPtr) + self._pvt_ptr[0].res.linear.devPtr = _cdevPtr.cptr + @property + def desc(self): + return self._desc + @desc.setter + def desc(self, desc not None : cudaChannelFormatDesc): + string.memcpy(&self._pvt_ptr[0].res.linear.desc, desc.getPtr(), sizeof(self._pvt_ptr[0].res.linear.desc)) + @property + def sizeInBytes(self): + return self._pvt_ptr[0].res.linear.sizeInBytes + @sizeInBytes.setter + def sizeInBytes(self, size_t sizeInBytes): + self._pvt_ptr[0].res.linear.sizeInBytes = sizeInBytes + +cdef class anon_struct4: + """ + Attributes + ---------- + devPtr : Any + + desc : cudaChannelFormatDesc + + width : size_t + + height : size_t + + pitchInBytes : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._desc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].res.pitch2D.desc) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res.pitch2D + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['devPtr : ' + hex(self.devPtr)] + except ValueError: + str_list += ['devPtr : '] + try: + str_list += ['desc :\n' + '\n'.join([' ' + line for line in str(self.desc).splitlines()])] + except ValueError: + str_list += ['desc : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['pitchInBytes : ' + str(self.pitchInBytes)] + except ValueError: + str_list += ['pitchInBytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def devPtr(self): + return self._pvt_ptr[0].res.pitch2D.devPtr + @devPtr.setter + def devPtr(self, devPtr): + _cdevPtr = _HelperInputVoidPtr(devPtr) + self._pvt_ptr[0].res.pitch2D.devPtr = _cdevPtr.cptr + @property + def desc(self): + return self._desc + @desc.setter + def desc(self, desc not None : cudaChannelFormatDesc): + string.memcpy(&self._pvt_ptr[0].res.pitch2D.desc, desc.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D.desc)) + @property + def width(self): + return self._pvt_ptr[0].res.pitch2D.width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].res.pitch2D.width = width + @property + def height(self): + return self._pvt_ptr[0].res.pitch2D.height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].res.pitch2D.height = height + @property + def pitchInBytes(self): + return self._pvt_ptr[0].res.pitch2D.pitchInBytes + @pitchInBytes.setter + def pitchInBytes(self, size_t pitchInBytes): + self._pvt_ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + +cdef class anon_union0: + """ + Attributes + ---------- + array : anon_struct1 + + mipmap : anon_struct2 + + linear : anon_struct3 + + pitch2D : anon_struct4 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._array = anon_struct1(_ptr=self._pvt_ptr) + self._mipmap = anon_struct2(_ptr=self._pvt_ptr) + self._linear = anon_struct3(_ptr=self._pvt_ptr) + self._pitch2D = anon_struct4(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].res + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + try: + str_list += ['mipmap :\n' + '\n'.join([' ' + line for line in str(self.mipmap).splitlines()])] + except ValueError: + str_list += ['mipmap : '] + try: + str_list += ['linear :\n' + '\n'.join([' ' + line for line in str(self.linear).splitlines()])] + except ValueError: + str_list += ['linear : '] + try: + str_list += ['pitch2D :\n' + '\n'.join([' ' + line for line in str(self.pitch2D).splitlines()])] + except ValueError: + str_list += ['pitch2D : '] + return '\n'.join(str_list) + else: + return '' + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct1): + string.memcpy(&self._pvt_ptr[0].res.array, array.getPtr(), sizeof(self._pvt_ptr[0].res.array)) + @property + def mipmap(self): + return self._mipmap + @mipmap.setter + def mipmap(self, mipmap not None : anon_struct2): + string.memcpy(&self._pvt_ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._pvt_ptr[0].res.mipmap)) + @property + def linear(self): + return self._linear + @linear.setter + def linear(self, linear not None : anon_struct3): + string.memcpy(&self._pvt_ptr[0].res.linear, linear.getPtr(), sizeof(self._pvt_ptr[0].res.linear)) + @property + def pitch2D(self): + return self._pitch2D + @pitch2D.setter + def pitch2D(self, pitch2D not None : anon_struct4): + string.memcpy(&self._pvt_ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D)) + +cdef class cudaResourceDesc: + """ + CUDA resource descriptor + + Attributes + ---------- + resType : cudaResourceType + Resource type + res : anon_union0 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaResourceDesc)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._res = anon_union0(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['resType : ' + str(self.resType)] + except ValueError: + str_list += ['resType : '] + try: + str_list += ['res :\n' + '\n'.join([' ' + line for line in str(self.res).splitlines()])] + except ValueError: + str_list += ['res : '] + return '\n'.join(str_list) + else: + return '' + @property + def resType(self): + if self._pvt_ptr[0].resType not in _dict_cudaResourceType: + return None + return _dict_cudaResourceType[self._pvt_ptr[0].resType] + @resType.setter + def resType(self, resType not None : cudaResourceType): + self._pvt_ptr[0].resType = resType.value + @property + def res(self): + return self._res + @res.setter + def res(self, res not None : anon_union0): + string.memcpy(&self._pvt_ptr[0].res, res.getPtr(), sizeof(self._pvt_ptr[0].res)) + +cdef class cudaResourceViewDesc: + """ + CUDA resource view descriptor + + Attributes + ---------- + format : cudaResourceViewFormat + Resource view format + width : size_t + Width of the resource view + height : size_t + Height of the resource view + depth : size_t + Depth of the resource view + firstMipmapLevel : unsigned int + First defined mipmap level + lastMipmapLevel : unsigned int + Last defined mipmap level + firstLayer : unsigned int + First layer index + lastLayer : unsigned int + Last layer index + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['format : ' + str(self.format)] + except ValueError: + str_list += ['format : '] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + try: + str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)] + except ValueError: + str_list += ['firstMipmapLevel : '] + try: + str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)] + except ValueError: + str_list += ['lastMipmapLevel : '] + try: + str_list += ['firstLayer : ' + str(self.firstLayer)] + except ValueError: + str_list += ['firstLayer : '] + try: + str_list += ['lastLayer : ' + str(self.lastLayer)] + except ValueError: + str_list += ['lastLayer : '] + return '\n'.join(str_list) + else: + return '' + @property + def format(self): + if self._pvt_ptr[0].format not in _dict_cudaResourceViewFormat: + return None + return _dict_cudaResourceViewFormat[self._pvt_ptr[0].format] + @format.setter + def format(self, format not None : cudaResourceViewFormat): + self._pvt_ptr[0].format = format.value + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, size_t depth): + self._pvt_ptr[0].depth = depth + @property + def firstMipmapLevel(self): + return self._pvt_ptr[0].firstMipmapLevel + @firstMipmapLevel.setter + def firstMipmapLevel(self, unsigned int firstMipmapLevel): + self._pvt_ptr[0].firstMipmapLevel = firstMipmapLevel + @property + def lastMipmapLevel(self): + return self._pvt_ptr[0].lastMipmapLevel + @lastMipmapLevel.setter + def lastMipmapLevel(self, unsigned int lastMipmapLevel): + self._pvt_ptr[0].lastMipmapLevel = lastMipmapLevel + @property + def firstLayer(self): + return self._pvt_ptr[0].firstLayer + @firstLayer.setter + def firstLayer(self, unsigned int firstLayer): + self._pvt_ptr[0].firstLayer = firstLayer + @property + def lastLayer(self): + return self._pvt_ptr[0].lastLayer + @lastLayer.setter + def lastLayer(self, unsigned int lastLayer): + self._pvt_ptr[0].lastLayer = lastLayer + +cdef class cudaPointerAttributes: + """ + CUDA pointer attributes + + Attributes + ---------- + type : cudaMemoryType + The type of memory - cudaMemoryTypeUnregistered, + cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged. + device : int + The device against which the memory was allocated or registered. If + the memory type is cudaMemoryTypeDevice then this identifies the + device on which the memory referred physically resides. If the + memory type is cudaMemoryTypeHost or::cudaMemoryTypeManaged then + this identifies the device which was current when the memory was + allocated or registered (and if that device is deinitialized then + this allocation will vanish with that device's state). + devicePointer : Any + The address which may be dereferenced on the current device to + access the memory or NULL if no such address exists. + hostPointer : Any + The address which may be dereferenced on the host to access the + memory or NULL if no such address exists. CUDA doesn't check if + unregistered memory is allocated so this field may contain invalid + pointer if an invalid pointer has been passed to CUDA. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['device : ' + str(self.device)] + except ValueError: + str_list += ['device : '] + try: + str_list += ['devicePointer : ' + hex(self.devicePointer)] + except ValueError: + str_list += ['devicePointer : '] + try: + str_list += ['hostPointer : ' + hex(self.hostPointer)] + except ValueError: + str_list += ['hostPointer : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaMemoryType: + return None + return _dict_cudaMemoryType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaMemoryType): + self._pvt_ptr[0].type = type.value + @property + def device(self): + return self._pvt_ptr[0].device + @device.setter + def device(self, int device): + self._pvt_ptr[0].device = device + @property + def devicePointer(self): + return self._pvt_ptr[0].devicePointer + @devicePointer.setter + def devicePointer(self, devicePointer): + _cdevicePointer = _HelperInputVoidPtr(devicePointer) + self._pvt_ptr[0].devicePointer = _cdevicePointer.cptr + @property + def hostPointer(self): + return self._pvt_ptr[0].hostPointer + @hostPointer.setter + def hostPointer(self, hostPointer): + _chostPointer = _HelperInputVoidPtr(hostPointer) + self._pvt_ptr[0].hostPointer = _chostPointer.cptr + +cdef class cudaFuncAttributes: + """ + CUDA function attributes + + Attributes + ---------- + sharedSizeBytes : size_t + The size in bytes of statically-allocated shared memory per block + required by this function. This does not include dynamically- + allocated shared memory requested by the user at runtime. + constSizeBytes : size_t + The size in bytes of user-allocated constant memory required by + this function. + localSizeBytes : size_t + The size in bytes of local memory used by each thread of this + function. + maxThreadsPerBlock : int + The maximum number of threads per block, beyond which a launch of + the function would fail. This number depends on both the function + and the device on which the function is currently loaded. + numRegs : int + The number of registers used by each thread of this function. + ptxVersion : int + The PTX virtual architecture version for which the function was + compiled. This value is the major PTX version * 10 + the minor PTX + version, so a PTX version 1.3 function would return the value 13. + binaryVersion : int + The binary architecture version for which the function was + compiled. This value is the major binary version * 10 + the minor + binary version, so a binary version 1.3 function would return the + value 13. + cacheModeCA : int + The attribute to indicate whether the function has been compiled + with user specified option "-Xptxas --dlcm=ca" set. + maxDynamicSharedSizeBytes : int + The maximum size in bytes of dynamic shared memory per block for + this function. Any launch must have a dynamic shared memory size + smaller than this value. + preferredShmemCarveout : int + On devices where the L1 cache and shared memory use the same + hardware resources, this sets the shared memory carveout + preference, in percent of the maximum shared memory. Refer to + cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, + and the driver can choose a different ratio if required to execute + the function. See cudaFuncSetAttribute + clusterDimMustBeSet : int + If this attribute is set, the kernel must launch with a valid + cluster dimension specified. + requiredClusterWidth : int + The required cluster width/height/depth in blocks. The values must + either all be 0 or all be positive. The validity of the cluster + dimensions is otherwise checked at launch time. If the value is + set during compile time, it cannot be set at runtime. Setting it at + runtime should return cudaErrorNotPermitted. See + cudaFuncSetAttribute + requiredClusterHeight : int + + requiredClusterDepth : int + + clusterSchedulingPolicyPreference : int + The block scheduling policy of a function. See cudaFuncSetAttribute + nonPortableClusterSizeAllowed : int + Whether the function can be launched with non-portable cluster + size. 1 is allowed, 0 is disallowed. A non-portable cluster size + may only function on the specific SKUs the program is tested on. + The launch might fail if the program is run on a different hardware + platform. CUDA API provides cudaOccupancyMaxActiveClusters to + assist with checking whether the desired size can be launched on + the current device. Portable Cluster Size A portable cluster size + is guaranteed to be functional on all compute capabilities higher + than the target compute capability. The portable cluster size for + sm_90 is 8 blocks per cluster. This value may increase for future + compute capabilities. The specific hardware unit may support + higher cluster sizes that’s not guaranteed to be portable. See + cudaFuncSetAttribute + reserved : list[int] + Reserved for future use. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['sharedSizeBytes : ' + str(self.sharedSizeBytes)] + except ValueError: + str_list += ['sharedSizeBytes : '] + try: + str_list += ['constSizeBytes : ' + str(self.constSizeBytes)] + except ValueError: + str_list += ['constSizeBytes : '] + try: + str_list += ['localSizeBytes : ' + str(self.localSizeBytes)] + except ValueError: + str_list += ['localSizeBytes : '] + try: + str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] + except ValueError: + str_list += ['maxThreadsPerBlock : '] + try: + str_list += ['numRegs : ' + str(self.numRegs)] + except ValueError: + str_list += ['numRegs : '] + try: + str_list += ['ptxVersion : ' + str(self.ptxVersion)] + except ValueError: + str_list += ['ptxVersion : '] + try: + str_list += ['binaryVersion : ' + str(self.binaryVersion)] + except ValueError: + str_list += ['binaryVersion : '] + try: + str_list += ['cacheModeCA : ' + str(self.cacheModeCA)] + except ValueError: + str_list += ['cacheModeCA : '] + try: + str_list += ['maxDynamicSharedSizeBytes : ' + str(self.maxDynamicSharedSizeBytes)] + except ValueError: + str_list += ['maxDynamicSharedSizeBytes : '] + try: + str_list += ['preferredShmemCarveout : ' + str(self.preferredShmemCarveout)] + except ValueError: + str_list += ['preferredShmemCarveout : '] + try: + str_list += ['clusterDimMustBeSet : ' + str(self.clusterDimMustBeSet)] + except ValueError: + str_list += ['clusterDimMustBeSet : '] + try: + str_list += ['requiredClusterWidth : ' + str(self.requiredClusterWidth)] + except ValueError: + str_list += ['requiredClusterWidth : '] + try: + str_list += ['requiredClusterHeight : ' + str(self.requiredClusterHeight)] + except ValueError: + str_list += ['requiredClusterHeight : '] + try: + str_list += ['requiredClusterDepth : ' + str(self.requiredClusterDepth)] + except ValueError: + str_list += ['requiredClusterDepth : '] + try: + str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] + except ValueError: + str_list += ['clusterSchedulingPolicyPreference : '] + try: + str_list += ['nonPortableClusterSizeAllowed : ' + str(self.nonPortableClusterSizeAllowed)] + except ValueError: + str_list += ['nonPortableClusterSizeAllowed : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def sharedSizeBytes(self): + return self._pvt_ptr[0].sharedSizeBytes + @sharedSizeBytes.setter + def sharedSizeBytes(self, size_t sharedSizeBytes): + self._pvt_ptr[0].sharedSizeBytes = sharedSizeBytes + @property + def constSizeBytes(self): + return self._pvt_ptr[0].constSizeBytes + @constSizeBytes.setter + def constSizeBytes(self, size_t constSizeBytes): + self._pvt_ptr[0].constSizeBytes = constSizeBytes + @property + def localSizeBytes(self): + return self._pvt_ptr[0].localSizeBytes + @localSizeBytes.setter + def localSizeBytes(self, size_t localSizeBytes): + self._pvt_ptr[0].localSizeBytes = localSizeBytes + @property + def maxThreadsPerBlock(self): + return self._pvt_ptr[0].maxThreadsPerBlock + @maxThreadsPerBlock.setter + def maxThreadsPerBlock(self, int maxThreadsPerBlock): + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + @property + def numRegs(self): + return self._pvt_ptr[0].numRegs + @numRegs.setter + def numRegs(self, int numRegs): + self._pvt_ptr[0].numRegs = numRegs + @property + def ptxVersion(self): + return self._pvt_ptr[0].ptxVersion + @ptxVersion.setter + def ptxVersion(self, int ptxVersion): + self._pvt_ptr[0].ptxVersion = ptxVersion + @property + def binaryVersion(self): + return self._pvt_ptr[0].binaryVersion + @binaryVersion.setter + def binaryVersion(self, int binaryVersion): + self._pvt_ptr[0].binaryVersion = binaryVersion + @property + def cacheModeCA(self): + return self._pvt_ptr[0].cacheModeCA + @cacheModeCA.setter + def cacheModeCA(self, int cacheModeCA): + self._pvt_ptr[0].cacheModeCA = cacheModeCA + @property + def maxDynamicSharedSizeBytes(self): + return self._pvt_ptr[0].maxDynamicSharedSizeBytes + @maxDynamicSharedSizeBytes.setter + def maxDynamicSharedSizeBytes(self, int maxDynamicSharedSizeBytes): + self._pvt_ptr[0].maxDynamicSharedSizeBytes = maxDynamicSharedSizeBytes + @property + def preferredShmemCarveout(self): + return self._pvt_ptr[0].preferredShmemCarveout + @preferredShmemCarveout.setter + def preferredShmemCarveout(self, int preferredShmemCarveout): + self._pvt_ptr[0].preferredShmemCarveout = preferredShmemCarveout + @property + def clusterDimMustBeSet(self): + return self._pvt_ptr[0].clusterDimMustBeSet + @clusterDimMustBeSet.setter + def clusterDimMustBeSet(self, int clusterDimMustBeSet): + self._pvt_ptr[0].clusterDimMustBeSet = clusterDimMustBeSet + @property + def requiredClusterWidth(self): + return self._pvt_ptr[0].requiredClusterWidth + @requiredClusterWidth.setter + def requiredClusterWidth(self, int requiredClusterWidth): + self._pvt_ptr[0].requiredClusterWidth = requiredClusterWidth + @property + def requiredClusterHeight(self): + return self._pvt_ptr[0].requiredClusterHeight + @requiredClusterHeight.setter + def requiredClusterHeight(self, int requiredClusterHeight): + self._pvt_ptr[0].requiredClusterHeight = requiredClusterHeight + @property + def requiredClusterDepth(self): + return self._pvt_ptr[0].requiredClusterDepth + @requiredClusterDepth.setter + def requiredClusterDepth(self, int requiredClusterDepth): + self._pvt_ptr[0].requiredClusterDepth = requiredClusterDepth + @property + def clusterSchedulingPolicyPreference(self): + return self._pvt_ptr[0].clusterSchedulingPolicyPreference + @clusterSchedulingPolicyPreference.setter + def clusterSchedulingPolicyPreference(self, int clusterSchedulingPolicyPreference): + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference + @property + def nonPortableClusterSizeAllowed(self): + return self._pvt_ptr[0].nonPortableClusterSizeAllowed + @nonPortableClusterSizeAllowed.setter + def nonPortableClusterSizeAllowed(self, int nonPortableClusterSizeAllowed): + self._pvt_ptr[0].nonPortableClusterSizeAllowed = nonPortableClusterSizeAllowed + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class cudaMemLocation: + """ + Specifies a memory location. To specify a gpu, set type = + cudaMemLocationTypeDevice and set id = the gpu's device ordinal. To + specify a cpu NUMA node, set type = cudaMemLocationTypeHostNuma and + set id = host NUMA node id. + + Attributes + ---------- + type : cudaMemLocationType + Specifies the location type, which modifies the meaning of id. + id : int + identifier for a given this location's ::CUmemLocationType. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['id : ' + str(self.id)] + except ValueError: + str_list += ['id : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaMemLocationType: + return None + return _dict_cudaMemLocationType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaMemLocationType): + self._pvt_ptr[0].type = type.value + @property + def id(self): + return self._pvt_ptr[0].id + @id.setter + def id(self, int id): + self._pvt_ptr[0].id = id + +cdef class cudaMemAccessDesc: + """ + Memory access descriptor + + Attributes + ---------- + location : cudaMemLocation + Location on which the request is to change it's accessibility + flags : cudaMemAccessFlags + ::CUmemProt accessibility flags to set on the request + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._location = cudaMemLocation(_ptr=&self._pvt_ptr[0].location) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] + except ValueError: + str_list += ['location : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def location(self): + return self._location + @location.setter + def location(self, location not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + @property + def flags(self): + if self._pvt_ptr[0].flags not in _dict_cudaMemAccessFlags: + return None + return _dict_cudaMemAccessFlags[self._pvt_ptr[0].flags] + @flags.setter + def flags(self, flags not None : cudaMemAccessFlags): + self._pvt_ptr[0].flags = flags.value + +cdef class cudaMemPoolProps: + """ + Specifies the properties of allocations made from the pool. + + Attributes + ---------- + allocType : cudaMemAllocationType + Allocation type. Currently must be specified as + cudaMemAllocationTypePinned + handleTypes : cudaMemAllocationHandleType + Handle types that will be supported by allocations from the pool. + location : cudaMemLocation + Location allocations should reside. + win32SecurityAttributes : Any + Windows-specific LPSECURITYATTRIBUTES required when + cudaMemHandleTypeWin32 is specified. This security attribute + defines the scope of which exported allocations may be tranferred + to other processes. In all other cases, this field is required to + be zero. + maxSize : size_t + Maximum pool size. When set to 0, defaults to a system dependent + value. + usage : unsigned short + Bitmask indicating intended usage for the pool. + reserved : bytes + reserved for future use, must be 0 + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._location = cudaMemLocation(_ptr=&self._pvt_ptr[0].location) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['allocType : ' + str(self.allocType)] + except ValueError: + str_list += ['allocType : '] + try: + str_list += ['handleTypes : ' + str(self.handleTypes)] + except ValueError: + str_list += ['handleTypes : '] + try: + str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] + except ValueError: + str_list += ['location : '] + try: + str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)] + except ValueError: + str_list += ['win32SecurityAttributes : '] + try: + str_list += ['maxSize : ' + str(self.maxSize)] + except ValueError: + str_list += ['maxSize : '] + try: + str_list += ['usage : ' + str(self.usage)] + except ValueError: + str_list += ['usage : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def allocType(self): + if self._pvt_ptr[0].allocType not in _dict_cudaMemAllocationType: + return None + return _dict_cudaMemAllocationType[self._pvt_ptr[0].allocType] + @allocType.setter + def allocType(self, allocType not None : cudaMemAllocationType): + self._pvt_ptr[0].allocType = allocType.value + @property + def handleTypes(self): + if self._pvt_ptr[0].handleTypes not in _dict_cudaMemAllocationHandleType: + return None + return _dict_cudaMemAllocationHandleType[self._pvt_ptr[0].handleTypes] + @handleTypes.setter + def handleTypes(self, handleTypes not None : cudaMemAllocationHandleType): + self._pvt_ptr[0].handleTypes = handleTypes.value + @property + def location(self): + return self._location + @location.setter + def location(self, location not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + @property + def win32SecurityAttributes(self): + return self._pvt_ptr[0].win32SecurityAttributes + @win32SecurityAttributes.setter + def win32SecurityAttributes(self, win32SecurityAttributes): + _cwin32SecurityAttributes = _HelperInputVoidPtr(win32SecurityAttributes) + self._pvt_ptr[0].win32SecurityAttributes = _cwin32SecurityAttributes.cptr + @property + def maxSize(self): + return self._pvt_ptr[0].maxSize + @maxSize.setter + def maxSize(self, size_t maxSize): + self._pvt_ptr[0].maxSize = maxSize + @property + def usage(self): + return self._pvt_ptr[0].usage + @usage.setter + def usage(self, unsigned short usage): + self._pvt_ptr[0].usage = usage + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 54) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 54: + raise ValueError("reserved length must be 54, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class cudaMemPoolPtrExportData: + """ + Opaque data for exporting a pool allocation + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class cudaMemAllocNodeParams: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + accessDescCount : size_t + in: Number of `accessDescs`s + bytesize : size_t + in: size in bytes of the requested allocation + dptr : Any + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._poolProps = cudaMemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + def __dealloc__(self): + pass + if self._accessDescs is not NULL: + free(self._accessDescs) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] + except ValueError: + str_list += ['poolProps : '] + try: + str_list += ['accessDescs : ' + str(self.accessDescs)] + except ValueError: + str_list += ['accessDescs : '] + try: + str_list += ['accessDescCount : ' + str(self.accessDescCount)] + except ValueError: + str_list += ['accessDescCount : '] + try: + str_list += ['bytesize : ' + str(self.bytesize)] + except ValueError: + str_list += ['bytesize : '] + try: + str_list += ['dptr : ' + hex(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def poolProps(self): + return self._poolProps + @poolProps.setter + def poolProps(self, poolProps not None : cudaMemPoolProps): + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + @property + def accessDescs(self): + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] + return [cudaMemAccessDesc(_ptr=arr) for arr in arrs] + @accessDescs.setter + def accessDescs(self, val): + if len(val) == 0: + free(self._accessDescs) + self._accessDescs_length = 0 + self._pvt_ptr[0].accessDescs = NULL + else: + if self._accessDescs_length != len(val): + free(self._accessDescs) + self._accessDescs = calloc(len(val), sizeof(cyruntime.cudaMemAccessDesc)) + if self._accessDescs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) + self._accessDescs_length = len(val) + self._pvt_ptr[0].accessDescs = self._accessDescs + for idx in range(len(val)): + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) + + @property + def accessDescCount(self): + return self._pvt_ptr[0].accessDescCount + @accessDescCount.setter + def accessDescCount(self, size_t accessDescCount): + self._pvt_ptr[0].accessDescCount = accessDescCount + @property + def bytesize(self): + return self._pvt_ptr[0].bytesize + @bytesize.setter + def bytesize(self, size_t bytesize): + self._pvt_ptr[0].bytesize = bytesize + @property + def dptr(self): + return self._pvt_ptr[0].dptr + @dptr.setter + def dptr(self, dptr): + _cdptr = _HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + +cdef class cudaMemAllocNodeParamsV2: + """ + Memory allocation node parameters + + Attributes + ---------- + poolProps : cudaMemPoolProps + in: location where the allocation should reside (specified in + ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is + not supported. in: array of memory access descriptors. Used to + describe peer GPU access + accessDescs : cudaMemAccessDesc + in: number of memory access descriptors. Must not exceed the number + of GPUs. + accessDescCount : size_t + in: Number of `accessDescs`s + bytesize : size_t + in: size in bytes of the requested allocation + dptr : Any + out: address of the allocation returned by CUDA + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._poolProps = cudaMemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + def __dealloc__(self): + pass + if self._accessDescs is not NULL: + free(self._accessDescs) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] + except ValueError: + str_list += ['poolProps : '] + try: + str_list += ['accessDescs : ' + str(self.accessDescs)] + except ValueError: + str_list += ['accessDescs : '] + try: + str_list += ['accessDescCount : ' + str(self.accessDescCount)] + except ValueError: + str_list += ['accessDescCount : '] + try: + str_list += ['bytesize : ' + str(self.bytesize)] + except ValueError: + str_list += ['bytesize : '] + try: + str_list += ['dptr : ' + hex(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def poolProps(self): + return self._poolProps + @poolProps.setter + def poolProps(self, poolProps not None : cudaMemPoolProps): + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + @property + def accessDescs(self): + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] + return [cudaMemAccessDesc(_ptr=arr) for arr in arrs] + @accessDescs.setter + def accessDescs(self, val): + if len(val) == 0: + free(self._accessDescs) + self._accessDescs_length = 0 + self._pvt_ptr[0].accessDescs = NULL + else: + if self._accessDescs_length != len(val): + free(self._accessDescs) + self._accessDescs = calloc(len(val), sizeof(cyruntime.cudaMemAccessDesc)) + if self._accessDescs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) + self._accessDescs_length = len(val) + self._pvt_ptr[0].accessDescs = self._accessDescs + for idx in range(len(val)): + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) + + @property + def accessDescCount(self): + return self._pvt_ptr[0].accessDescCount + @accessDescCount.setter + def accessDescCount(self, size_t accessDescCount): + self._pvt_ptr[0].accessDescCount = accessDescCount + @property + def bytesize(self): + return self._pvt_ptr[0].bytesize + @bytesize.setter + def bytesize(self, size_t bytesize): + self._pvt_ptr[0].bytesize = bytesize + @property + def dptr(self): + return self._pvt_ptr[0].dptr + @dptr.setter + def dptr(self, dptr): + _cdptr = _HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + +cdef class cudaMemFreeNodeParams: + """ + Memory free node parameters + + Attributes + ---------- + dptr : Any + in: the pointer to free + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['dptr : ' + hex(self.dptr)] + except ValueError: + str_list += ['dptr : '] + return '\n'.join(str_list) + else: + return '' + @property + def dptr(self): + return self._pvt_ptr[0].dptr + @dptr.setter + def dptr(self, dptr): + _cdptr = _HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + +cdef class cudaMemcpyAttributes: + """ + Attributes specific to copies within a batch. For more details on + usage see cudaMemcpyBatchAsync. + + Attributes + ---------- + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + srcLocHint : cudaMemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + dstLocHint : cudaMemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + flags : unsigned int + Additional flags for copies with this attribute. See + cudaMemcpyFlags. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._srcLocHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].srcLocHint) + self._dstLocHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].dstLocHint) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + try: + str_list += ['srcLocHint :\n' + '\n'.join([' ' + line for line in str(self.srcLocHint).splitlines()])] + except ValueError: + str_list += ['srcLocHint : '] + try: + str_list += ['dstLocHint :\n' + '\n'.join([' ' + line for line in str(self.dstLocHint).splitlines()])] + except ValueError: + str_list += ['dstLocHint : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def srcAccessOrder(self): + if self._pvt_ptr[0].srcAccessOrder not in _dict_cudaMemcpySrcAccessOrder: + return None + return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + @property + def srcLocHint(self): + return self._srcLocHint + @srcLocHint.setter + def srcLocHint(self, srcLocHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].srcLocHint, srcLocHint.getPtr(), sizeof(self._pvt_ptr[0].srcLocHint)) + @property + def dstLocHint(self): + return self._dstLocHint + @dstLocHint.setter + def dstLocHint(self, dstLocHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].dstLocHint, dstLocHint.getPtr(), sizeof(self._pvt_ptr[0].dstLocHint)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class cudaOffset3D: + """ + Struct representing offset into a cudaArray_t in elements + + Attributes + ---------- + x : size_t + + y : size_t + + z : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, size_t x): + self._pvt_ptr[0].x = x + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, size_t y): + self._pvt_ptr[0].y = y + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, size_t z): + self._pvt_ptr[0].z = z + +cdef class anon_struct5: + """ + Attributes + ---------- + ptr : Any + + rowLength : size_t + + layerHeight : size_t + + locHint : cudaMemLocation + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._locHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].op.ptr.locHint) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ptr : ' + hex(self.ptr)] + except ValueError: + str_list += ['ptr : '] + try: + str_list += ['rowLength : ' + str(self.rowLength)] + except ValueError: + str_list += ['rowLength : '] + try: + str_list += ['layerHeight : ' + str(self.layerHeight)] + except ValueError: + str_list += ['layerHeight : '] + try: + str_list += ['locHint :\n' + '\n'.join([' ' + line for line in str(self.locHint).splitlines()])] + except ValueError: + str_list += ['locHint : '] + return '\n'.join(str_list) + else: + return '' + @property + def ptr(self): + return self._pvt_ptr[0].op.ptr.ptr + @ptr.setter + def ptr(self, ptr): + _cptr = _HelperInputVoidPtr(ptr) + self._pvt_ptr[0].op.ptr.ptr = _cptr.cptr + @property + def rowLength(self): + return self._pvt_ptr[0].op.ptr.rowLength + @rowLength.setter + def rowLength(self, size_t rowLength): + self._pvt_ptr[0].op.ptr.rowLength = rowLength + @property + def layerHeight(self): + return self._pvt_ptr[0].op.ptr.layerHeight + @layerHeight.setter + def layerHeight(self, size_t layerHeight): + self._pvt_ptr[0].op.ptr.layerHeight = layerHeight + @property + def locHint(self): + return self._locHint + @locHint.setter + def locHint(self, locHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) + +cdef class anon_struct6: + """ + Attributes + ---------- + array : cudaArray_t + + offset : cudaOffset3D + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._array = cudaArray_t(_ptr=&self._pvt_ptr[0].op.array.array) + self._offset = cudaOffset3D(_ptr=&self._pvt_ptr[0].op.array.offset) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + try: + str_list += ['offset :\n' + '\n'.join([' ' + line for line in str(self.offset).splitlines()])] + except ValueError: + str_list += ['offset : '] + return '\n'.join(str_list) + else: + return '' + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cyruntime.cudaArray_t cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + cyarray = parray + else: + parray = int(cudaArray_t(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + @property + def offset(self): + return self._offset + @offset.setter + def offset(self, offset not None : cudaOffset3D): + string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) + +cdef class anon_union1: + """ + Attributes + ---------- + ptr : anon_struct5 + + array : anon_struct6 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._ptr = anon_struct5(_ptr=self._pvt_ptr) + self._array = anon_struct6(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['ptr :\n' + '\n'.join([' ' + line for line in str(self.ptr).splitlines()])] + except ValueError: + str_list += ['ptr : '] + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + return '\n'.join(str_list) + else: + return '' + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr not None : anon_struct5): + string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct6): + string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) + +cdef class cudaMemcpy3DOperand: + """ + Struct representing an operand for copy with cudaMemcpy3DBatchAsync + + Attributes + ---------- + type : cudaMemcpy3DOperandType + + op : anon_union1 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaMemcpy3DOperand)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._op = anon_union1(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['op :\n' + '\n'.join([' ' + line for line in str(self.op).splitlines()])] + except ValueError: + str_list += ['op : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaMemcpy3DOperandType: + return None + return _dict_cudaMemcpy3DOperandType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaMemcpy3DOperandType): + self._pvt_ptr[0].type = type.value + @property + def op(self): + return self._op + @op.setter + def op(self, op not None : anon_union1): + string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) + +cdef class cudaMemcpy3DBatchOp: + """ + Attributes + ---------- + src : cudaMemcpy3DOperand + Source memcpy operand. + dst : cudaMemcpy3DOperand + Destination memcpy operand. + extent : cudaExtent + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + flags : unsigned int + Additional flags for copy from src to dst. See cudaMemcpyFlags. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._src = cudaMemcpy3DOperand(_ptr=&self._pvt_ptr[0].src) + self._dst = cudaMemcpy3DOperand(_ptr=&self._pvt_ptr[0].dst) + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['src :\n' + '\n'.join([' ' + line for line in str(self.src).splitlines()])] + except ValueError: + str_list += ['src : '] + try: + str_list += ['dst :\n' + '\n'.join([' ' + line for line in str(self.dst).splitlines()])] + except ValueError: + str_list += ['dst : '] + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def src(self): + return self._src + @src.setter + def src(self, src not None : cudaMemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].src, src.getPtr(), sizeof(self._pvt_ptr[0].src)) + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst not None : cudaMemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].dst, dst.getPtr(), sizeof(self._pvt_ptr[0].dst)) + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : cudaExtent): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + @property + def srcAccessOrder(self): + if self._pvt_ptr[0].srcAccessOrder not in _dict_cudaMemcpySrcAccessOrder: + return None + return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class CUuuid_st: + """ + Attributes + ---------- + bytes : bytes + < CUDA definition of UUID + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['bytes : ' + str(self.bytes.hex())] + except ValueError: + str_list += ['bytes : '] + return '\n'.join(str_list) + else: + return '' + @property + def bytes(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].bytes, 16) + +cdef class cudaDeviceProp: + """ + CUDA device properties + + Attributes + ---------- + name : bytes + ASCII string identifying device + uuid : cudaUUID_t + 16-byte unique identifier + luid : bytes + 8-byte locally unique identifier. Value is undefined on TCC and + non-Windows platforms + luidDeviceNodeMask : unsigned int + LUID device node mask. Value is undefined on TCC and non-Windows + platforms + totalGlobalMem : size_t + Global memory available on device in bytes + sharedMemPerBlock : size_t + Shared memory available per block in bytes + regsPerBlock : int + 32-bit registers available per block + warpSize : int + Warp size in threads + memPitch : size_t + Maximum pitch in bytes allowed by memory copies + maxThreadsPerBlock : int + Maximum number of threads per block + maxThreadsDim : list[int] + Maximum size of each dimension of a block + maxGridSize : list[int] + Maximum size of each dimension of a grid + clockRate : int + Deprecated, Clock frequency in kilohertz + totalConstMem : size_t + Constant memory available on device in bytes + major : int + Major compute capability + minor : int + Minor compute capability + textureAlignment : size_t + Alignment requirement for textures + texturePitchAlignment : size_t + Pitch alignment requirement for texture references bound to pitched + memory + deviceOverlap : int + Device can concurrently copy memory and execute a kernel. + Deprecated. Use instead asyncEngineCount. + multiProcessorCount : int + Number of multiprocessors on device + kernelExecTimeoutEnabled : int + Deprecated, Specified whether there is a run time limit on kernels + integrated : int + Device is integrated as opposed to discrete + canMapHostMemory : int + Device can map host memory with + cudaHostAlloc/cudaHostGetDevicePointer + computeMode : int + Deprecated, Compute mode (See cudaComputeMode) + maxTexture1D : int + Maximum 1D texture size + maxTexture1DMipmap : int + Maximum 1D mipmapped texture size + maxTexture1DLinear : int + Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() + or cuDeviceGetTexture1DLinearMaxWidth() instead. + maxTexture2D : list[int] + Maximum 2D texture dimensions + maxTexture2DMipmap : list[int] + Maximum 2D mipmapped texture dimensions + maxTexture2DLinear : list[int] + Maximum dimensions (width, height, pitch) for 2D textures bound to + pitched memory + maxTexture2DGather : list[int] + Maximum 2D texture dimensions if texture gather operations have to + be performed + maxTexture3D : list[int] + Maximum 3D texture dimensions + maxTexture3DAlt : list[int] + Maximum alternate 3D texture dimensions + maxTextureCubemap : int + Maximum Cubemap texture dimensions + maxTexture1DLayered : list[int] + Maximum 1D layered texture dimensions + maxTexture2DLayered : list[int] + Maximum 2D layered texture dimensions + maxTextureCubemapLayered : list[int] + Maximum Cubemap layered texture dimensions + maxSurface1D : int + Maximum 1D surface size + maxSurface2D : list[int] + Maximum 2D surface dimensions + maxSurface3D : list[int] + Maximum 3D surface dimensions + maxSurface1DLayered : list[int] + Maximum 1D layered surface dimensions + maxSurface2DLayered : list[int] + Maximum 2D layered surface dimensions + maxSurfaceCubemap : int + Maximum Cubemap surface dimensions + maxSurfaceCubemapLayered : list[int] + Maximum Cubemap layered surface dimensions + surfaceAlignment : size_t + Alignment requirements for surfaces + concurrentKernels : int + Device can possibly execute multiple kernels concurrently + ECCEnabled : int + Device has ECC support enabled + pciBusID : int + PCI bus ID of the device + pciDeviceID : int + PCI device ID of the device + pciDomainID : int + PCI domain ID of the device + tccDriver : int + 1 if device is a Tesla device using TCC driver, 0 otherwise + asyncEngineCount : int + Number of asynchronous engines + unifiedAddressing : int + Device shares a unified address space with the host + memoryClockRate : int + Deprecated, Peak memory clock frequency in kilohertz + memoryBusWidth : int + Global memory bus width in bits + l2CacheSize : int + Size of L2 cache in bytes + persistingL2CacheMaxSize : int + Device's maximum l2 persisting lines capacity setting in bytes + maxThreadsPerMultiProcessor : int + Maximum resident threads per multiprocessor + streamPrioritiesSupported : int + Device supports stream priorities + globalL1CacheSupported : int + Device supports caching globals in L1 + localL1CacheSupported : int + Device supports caching locals in L1 + sharedMemPerMultiprocessor : size_t + Shared memory available per multiprocessor in bytes + regsPerMultiprocessor : int + 32-bit registers available per multiprocessor + managedMemory : int + Device supports allocating managed memory on this system + isMultiGpuBoard : int + Device is on a multi-GPU board + multiGpuBoardGroupID : int + Unique identifier for a group of devices on the same multi-GPU + board + hostNativeAtomicSupported : int + Link between the device and the host supports native atomic + operations + singleToDoublePrecisionPerfRatio : int + Deprecated, Ratio of single precision performance (in floating- + point operations per second) to double precision performance + pageableMemoryAccess : int + Device supports coherently accessing pageable memory without + calling cudaHostRegister on it + concurrentManagedAccess : int + Device can coherently access managed memory concurrently with the + CPU + computePreemptionSupported : int + Device supports Compute Preemption + canUseHostPointerForRegisteredMem : int + Device can access host registered memory at the same virtual + address as the CPU + cooperativeLaunch : int + Device supports launching cooperative kernels via + cudaLaunchCooperativeKernel + cooperativeMultiDeviceLaunch : int + Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + sharedMemPerBlockOptin : size_t + Per device maximum shared memory per block usable by special opt in + pageableMemoryAccessUsesHostPageTables : int + Device accesses pageable memory via the host's page tables + directManagedMemAccessFromHost : int + Host can directly access managed memory on the device without + migration. + maxBlocksPerMultiProcessor : int + Maximum number of resident blocks per multiprocessor + accessPolicyMaxWindowSize : int + The maximum value of cudaAccessPolicyWindow::num_bytes. + reservedSharedMemPerBlock : size_t + Shared memory reserved by CUDA driver per block in bytes + hostRegisterSupported : int + Device supports host memory registration via cudaHostRegister. + sparseCudaArraySupported : int + 1 if the device supports sparse CUDA arrays and sparse CUDA + mipmapped arrays, 0 otherwise + hostRegisterReadOnlySupported : int + Device supports using the cudaHostRegister flag + cudaHostRegisterReadOnly to register memory that must be mapped as + read-only to the GPU + timelineSemaphoreInteropSupported : int + External timeline semaphore interop is supported on the device + memoryPoolsSupported : int + 1 if the device supports using the cudaMallocAsync and cudaMemPool + family of APIs, 0 otherwise + gpuDirectRDMASupported : int + 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + gpuDirectRDMAFlushWritesOptions : unsigned int + Bitmask to be interpreted according to the + cudaFlushGPUDirectRDMAWritesOptions enum + gpuDirectRDMAWritesOrdering : int + See the cudaGPUDirectRDMAWritesOrdering enum for numerical values + memoryPoolSupportedHandleTypes : unsigned int + Bitmask of handle types supported with mempool-based IPC + deferredMappingCudaArraySupported : int + 1 if the device supports deferred mapping CUDA arrays and CUDA + mipmapped arrays + ipcEventSupported : int + Device supports IPC Events. + clusterLaunch : int + Indicates device supports cluster launch + unifiedFunctionPointers : int + Indicates device supports unified pointers + reserved : list[int] + Reserved for future use + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._uuid = cudaUUID_t(_ptr=&self._pvt_ptr[0].uuid) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['name : ' + self.name.decode('utf-8')] + except ValueError: + str_list += ['name : '] + try: + str_list += ['uuid :\n' + '\n'.join([' ' + line for line in str(self.uuid).splitlines()])] + except ValueError: + str_list += ['uuid : '] + try: + str_list += ['luid : ' + self.luid.hex()] + except ValueError: + str_list += ['luid : '] + try: + str_list += ['luidDeviceNodeMask : ' + str(self.luidDeviceNodeMask)] + except ValueError: + str_list += ['luidDeviceNodeMask : '] + try: + str_list += ['totalGlobalMem : ' + str(self.totalGlobalMem)] + except ValueError: + str_list += ['totalGlobalMem : '] + try: + str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)] + except ValueError: + str_list += ['sharedMemPerBlock : '] + try: + str_list += ['regsPerBlock : ' + str(self.regsPerBlock)] + except ValueError: + str_list += ['regsPerBlock : '] + try: + str_list += ['warpSize : ' + str(self.warpSize)] + except ValueError: + str_list += ['warpSize : '] + try: + str_list += ['memPitch : ' + str(self.memPitch)] + except ValueError: + str_list += ['memPitch : '] + try: + str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] + except ValueError: + str_list += ['maxThreadsPerBlock : '] + try: + str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)] + except ValueError: + str_list += ['maxThreadsDim : '] + try: + str_list += ['maxGridSize : ' + str(self.maxGridSize)] + except ValueError: + str_list += ['maxGridSize : '] + try: + str_list += ['clockRate : ' + str(self.clockRate)] + except ValueError: + str_list += ['clockRate : '] + try: + str_list += ['totalConstMem : ' + str(self.totalConstMem)] + except ValueError: + str_list += ['totalConstMem : '] + try: + str_list += ['major : ' + str(self.major)] + except ValueError: + str_list += ['major : '] + try: + str_list += ['minor : ' + str(self.minor)] + except ValueError: + str_list += ['minor : '] + try: + str_list += ['textureAlignment : ' + str(self.textureAlignment)] + except ValueError: + str_list += ['textureAlignment : '] + try: + str_list += ['texturePitchAlignment : ' + str(self.texturePitchAlignment)] + except ValueError: + str_list += ['texturePitchAlignment : '] + try: + str_list += ['deviceOverlap : ' + str(self.deviceOverlap)] + except ValueError: + str_list += ['deviceOverlap : '] + try: + str_list += ['multiProcessorCount : ' + str(self.multiProcessorCount)] + except ValueError: + str_list += ['multiProcessorCount : '] + try: + str_list += ['kernelExecTimeoutEnabled : ' + str(self.kernelExecTimeoutEnabled)] + except ValueError: + str_list += ['kernelExecTimeoutEnabled : '] + try: + str_list += ['integrated : ' + str(self.integrated)] + except ValueError: + str_list += ['integrated : '] + try: + str_list += ['canMapHostMemory : ' + str(self.canMapHostMemory)] + except ValueError: + str_list += ['canMapHostMemory : '] + try: + str_list += ['computeMode : ' + str(self.computeMode)] + except ValueError: + str_list += ['computeMode : '] + try: + str_list += ['maxTexture1D : ' + str(self.maxTexture1D)] + except ValueError: + str_list += ['maxTexture1D : '] + try: + str_list += ['maxTexture1DMipmap : ' + str(self.maxTexture1DMipmap)] + except ValueError: + str_list += ['maxTexture1DMipmap : '] + try: + str_list += ['maxTexture1DLinear : ' + str(self.maxTexture1DLinear)] + except ValueError: + str_list += ['maxTexture1DLinear : '] + try: + str_list += ['maxTexture2D : ' + str(self.maxTexture2D)] + except ValueError: + str_list += ['maxTexture2D : '] + try: + str_list += ['maxTexture2DMipmap : ' + str(self.maxTexture2DMipmap)] + except ValueError: + str_list += ['maxTexture2DMipmap : '] + try: + str_list += ['maxTexture2DLinear : ' + str(self.maxTexture2DLinear)] + except ValueError: + str_list += ['maxTexture2DLinear : '] + try: + str_list += ['maxTexture2DGather : ' + str(self.maxTexture2DGather)] + except ValueError: + str_list += ['maxTexture2DGather : '] + try: + str_list += ['maxTexture3D : ' + str(self.maxTexture3D)] + except ValueError: + str_list += ['maxTexture3D : '] + try: + str_list += ['maxTexture3DAlt : ' + str(self.maxTexture3DAlt)] + except ValueError: + str_list += ['maxTexture3DAlt : '] + try: + str_list += ['maxTextureCubemap : ' + str(self.maxTextureCubemap)] + except ValueError: + str_list += ['maxTextureCubemap : '] + try: + str_list += ['maxTexture1DLayered : ' + str(self.maxTexture1DLayered)] + except ValueError: + str_list += ['maxTexture1DLayered : '] + try: + str_list += ['maxTexture2DLayered : ' + str(self.maxTexture2DLayered)] + except ValueError: + str_list += ['maxTexture2DLayered : '] + try: + str_list += ['maxTextureCubemapLayered : ' + str(self.maxTextureCubemapLayered)] + except ValueError: + str_list += ['maxTextureCubemapLayered : '] + try: + str_list += ['maxSurface1D : ' + str(self.maxSurface1D)] + except ValueError: + str_list += ['maxSurface1D : '] + try: + str_list += ['maxSurface2D : ' + str(self.maxSurface2D)] + except ValueError: + str_list += ['maxSurface2D : '] + try: + str_list += ['maxSurface3D : ' + str(self.maxSurface3D)] + except ValueError: + str_list += ['maxSurface3D : '] + try: + str_list += ['maxSurface1DLayered : ' + str(self.maxSurface1DLayered)] + except ValueError: + str_list += ['maxSurface1DLayered : '] + try: + str_list += ['maxSurface2DLayered : ' + str(self.maxSurface2DLayered)] + except ValueError: + str_list += ['maxSurface2DLayered : '] + try: + str_list += ['maxSurfaceCubemap : ' + str(self.maxSurfaceCubemap)] + except ValueError: + str_list += ['maxSurfaceCubemap : '] + try: + str_list += ['maxSurfaceCubemapLayered : ' + str(self.maxSurfaceCubemapLayered)] + except ValueError: + str_list += ['maxSurfaceCubemapLayered : '] + try: + str_list += ['surfaceAlignment : ' + str(self.surfaceAlignment)] + except ValueError: + str_list += ['surfaceAlignment : '] + try: + str_list += ['concurrentKernels : ' + str(self.concurrentKernels)] + except ValueError: + str_list += ['concurrentKernels : '] + try: + str_list += ['ECCEnabled : ' + str(self.ECCEnabled)] + except ValueError: + str_list += ['ECCEnabled : '] + try: + str_list += ['pciBusID : ' + str(self.pciBusID)] + except ValueError: + str_list += ['pciBusID : '] + try: + str_list += ['pciDeviceID : ' + str(self.pciDeviceID)] + except ValueError: + str_list += ['pciDeviceID : '] + try: + str_list += ['pciDomainID : ' + str(self.pciDomainID)] + except ValueError: + str_list += ['pciDomainID : '] + try: + str_list += ['tccDriver : ' + str(self.tccDriver)] + except ValueError: + str_list += ['tccDriver : '] + try: + str_list += ['asyncEngineCount : ' + str(self.asyncEngineCount)] + except ValueError: + str_list += ['asyncEngineCount : '] + try: + str_list += ['unifiedAddressing : ' + str(self.unifiedAddressing)] + except ValueError: + str_list += ['unifiedAddressing : '] + try: + str_list += ['memoryClockRate : ' + str(self.memoryClockRate)] + except ValueError: + str_list += ['memoryClockRate : '] + try: + str_list += ['memoryBusWidth : ' + str(self.memoryBusWidth)] + except ValueError: + str_list += ['memoryBusWidth : '] + try: + str_list += ['l2CacheSize : ' + str(self.l2CacheSize)] + except ValueError: + str_list += ['l2CacheSize : '] + try: + str_list += ['persistingL2CacheMaxSize : ' + str(self.persistingL2CacheMaxSize)] + except ValueError: + str_list += ['persistingL2CacheMaxSize : '] + try: + str_list += ['maxThreadsPerMultiProcessor : ' + str(self.maxThreadsPerMultiProcessor)] + except ValueError: + str_list += ['maxThreadsPerMultiProcessor : '] + try: + str_list += ['streamPrioritiesSupported : ' + str(self.streamPrioritiesSupported)] + except ValueError: + str_list += ['streamPrioritiesSupported : '] + try: + str_list += ['globalL1CacheSupported : ' + str(self.globalL1CacheSupported)] + except ValueError: + str_list += ['globalL1CacheSupported : '] + try: + str_list += ['localL1CacheSupported : ' + str(self.localL1CacheSupported)] + except ValueError: + str_list += ['localL1CacheSupported : '] + try: + str_list += ['sharedMemPerMultiprocessor : ' + str(self.sharedMemPerMultiprocessor)] + except ValueError: + str_list += ['sharedMemPerMultiprocessor : '] + try: + str_list += ['regsPerMultiprocessor : ' + str(self.regsPerMultiprocessor)] + except ValueError: + str_list += ['regsPerMultiprocessor : '] + try: + str_list += ['managedMemory : ' + str(self.managedMemory)] + except ValueError: + str_list += ['managedMemory : '] + try: + str_list += ['isMultiGpuBoard : ' + str(self.isMultiGpuBoard)] + except ValueError: + str_list += ['isMultiGpuBoard : '] + try: + str_list += ['multiGpuBoardGroupID : ' + str(self.multiGpuBoardGroupID)] + except ValueError: + str_list += ['multiGpuBoardGroupID : '] + try: + str_list += ['hostNativeAtomicSupported : ' + str(self.hostNativeAtomicSupported)] + except ValueError: + str_list += ['hostNativeAtomicSupported : '] + try: + str_list += ['singleToDoublePrecisionPerfRatio : ' + str(self.singleToDoublePrecisionPerfRatio)] + except ValueError: + str_list += ['singleToDoublePrecisionPerfRatio : '] + try: + str_list += ['pageableMemoryAccess : ' + str(self.pageableMemoryAccess)] + except ValueError: + str_list += ['pageableMemoryAccess : '] + try: + str_list += ['concurrentManagedAccess : ' + str(self.concurrentManagedAccess)] + except ValueError: + str_list += ['concurrentManagedAccess : '] + try: + str_list += ['computePreemptionSupported : ' + str(self.computePreemptionSupported)] + except ValueError: + str_list += ['computePreemptionSupported : '] + try: + str_list += ['canUseHostPointerForRegisteredMem : ' + str(self.canUseHostPointerForRegisteredMem)] + except ValueError: + str_list += ['canUseHostPointerForRegisteredMem : '] + try: + str_list += ['cooperativeLaunch : ' + str(self.cooperativeLaunch)] + except ValueError: + str_list += ['cooperativeLaunch : '] + try: + str_list += ['cooperativeMultiDeviceLaunch : ' + str(self.cooperativeMultiDeviceLaunch)] + except ValueError: + str_list += ['cooperativeMultiDeviceLaunch : '] + try: + str_list += ['sharedMemPerBlockOptin : ' + str(self.sharedMemPerBlockOptin)] + except ValueError: + str_list += ['sharedMemPerBlockOptin : '] + try: + str_list += ['pageableMemoryAccessUsesHostPageTables : ' + str(self.pageableMemoryAccessUsesHostPageTables)] + except ValueError: + str_list += ['pageableMemoryAccessUsesHostPageTables : '] + try: + str_list += ['directManagedMemAccessFromHost : ' + str(self.directManagedMemAccessFromHost)] + except ValueError: + str_list += ['directManagedMemAccessFromHost : '] + try: + str_list += ['maxBlocksPerMultiProcessor : ' + str(self.maxBlocksPerMultiProcessor)] + except ValueError: + str_list += ['maxBlocksPerMultiProcessor : '] + try: + str_list += ['accessPolicyMaxWindowSize : ' + str(self.accessPolicyMaxWindowSize)] + except ValueError: + str_list += ['accessPolicyMaxWindowSize : '] + try: + str_list += ['reservedSharedMemPerBlock : ' + str(self.reservedSharedMemPerBlock)] + except ValueError: + str_list += ['reservedSharedMemPerBlock : '] + try: + str_list += ['hostRegisterSupported : ' + str(self.hostRegisterSupported)] + except ValueError: + str_list += ['hostRegisterSupported : '] + try: + str_list += ['sparseCudaArraySupported : ' + str(self.sparseCudaArraySupported)] + except ValueError: + str_list += ['sparseCudaArraySupported : '] + try: + str_list += ['hostRegisterReadOnlySupported : ' + str(self.hostRegisterReadOnlySupported)] + except ValueError: + str_list += ['hostRegisterReadOnlySupported : '] + try: + str_list += ['timelineSemaphoreInteropSupported : ' + str(self.timelineSemaphoreInteropSupported)] + except ValueError: + str_list += ['timelineSemaphoreInteropSupported : '] + try: + str_list += ['memoryPoolsSupported : ' + str(self.memoryPoolsSupported)] + except ValueError: + str_list += ['memoryPoolsSupported : '] + try: + str_list += ['gpuDirectRDMASupported : ' + str(self.gpuDirectRDMASupported)] + except ValueError: + str_list += ['gpuDirectRDMASupported : '] + try: + str_list += ['gpuDirectRDMAFlushWritesOptions : ' + str(self.gpuDirectRDMAFlushWritesOptions)] + except ValueError: + str_list += ['gpuDirectRDMAFlushWritesOptions : '] + try: + str_list += ['gpuDirectRDMAWritesOrdering : ' + str(self.gpuDirectRDMAWritesOrdering)] + except ValueError: + str_list += ['gpuDirectRDMAWritesOrdering : '] + try: + str_list += ['memoryPoolSupportedHandleTypes : ' + str(self.memoryPoolSupportedHandleTypes)] + except ValueError: + str_list += ['memoryPoolSupportedHandleTypes : '] + try: + str_list += ['deferredMappingCudaArraySupported : ' + str(self.deferredMappingCudaArraySupported)] + except ValueError: + str_list += ['deferredMappingCudaArraySupported : '] + try: + str_list += ['ipcEventSupported : ' + str(self.ipcEventSupported)] + except ValueError: + str_list += ['ipcEventSupported : '] + try: + str_list += ['clusterLaunch : ' + str(self.clusterLaunch)] + except ValueError: + str_list += ['clusterLaunch : '] + try: + str_list += ['unifiedFunctionPointers : ' + str(self.unifiedFunctionPointers)] + except ValueError: + str_list += ['unifiedFunctionPointers : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def name(self): + return self._pvt_ptr[0].name + @name.setter + def name(self, name): + pass + self._pvt_ptr[0].name = name + @property + def uuid(self): + return self._uuid + @uuid.setter + def uuid(self, uuid not None : cudaUUID_t): + string.memcpy(&self._pvt_ptr[0].uuid, uuid.getPtr(), sizeof(self._pvt_ptr[0].uuid)) + @property + def luid(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].luid, 8) + @luid.setter + def luid(self, luid): + if len(luid) != 8: + raise ValueError("luid length must be 8, is " + str(len(luid))) + if CHAR_MIN == 0: + for i, b in enumerate(luid): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].luid[i] = b + else: + for i, b in enumerate(luid): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].luid[i] = b + @property + def luidDeviceNodeMask(self): + return self._pvt_ptr[0].luidDeviceNodeMask + @luidDeviceNodeMask.setter + def luidDeviceNodeMask(self, unsigned int luidDeviceNodeMask): + self._pvt_ptr[0].luidDeviceNodeMask = luidDeviceNodeMask + @property + def totalGlobalMem(self): + return self._pvt_ptr[0].totalGlobalMem + @totalGlobalMem.setter + def totalGlobalMem(self, size_t totalGlobalMem): + self._pvt_ptr[0].totalGlobalMem = totalGlobalMem + @property + def sharedMemPerBlock(self): + return self._pvt_ptr[0].sharedMemPerBlock + @sharedMemPerBlock.setter + def sharedMemPerBlock(self, size_t sharedMemPerBlock): + self._pvt_ptr[0].sharedMemPerBlock = sharedMemPerBlock + @property + def regsPerBlock(self): + return self._pvt_ptr[0].regsPerBlock + @regsPerBlock.setter + def regsPerBlock(self, int regsPerBlock): + self._pvt_ptr[0].regsPerBlock = regsPerBlock + @property + def warpSize(self): + return self._pvt_ptr[0].warpSize + @warpSize.setter + def warpSize(self, int warpSize): + self._pvt_ptr[0].warpSize = warpSize + @property + def memPitch(self): + return self._pvt_ptr[0].memPitch + @memPitch.setter + def memPitch(self, size_t memPitch): + self._pvt_ptr[0].memPitch = memPitch + @property + def maxThreadsPerBlock(self): + return self._pvt_ptr[0].maxThreadsPerBlock + @maxThreadsPerBlock.setter + def maxThreadsPerBlock(self, int maxThreadsPerBlock): + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + @property + def maxThreadsDim(self): + return self._pvt_ptr[0].maxThreadsDim + @maxThreadsDim.setter + def maxThreadsDim(self, maxThreadsDim): + self._pvt_ptr[0].maxThreadsDim = maxThreadsDim + @property + def maxGridSize(self): + return self._pvt_ptr[0].maxGridSize + @maxGridSize.setter + def maxGridSize(self, maxGridSize): + self._pvt_ptr[0].maxGridSize = maxGridSize + @property + def clockRate(self): + return self._pvt_ptr[0].clockRate + @clockRate.setter + def clockRate(self, int clockRate): + self._pvt_ptr[0].clockRate = clockRate + @property + def totalConstMem(self): + return self._pvt_ptr[0].totalConstMem + @totalConstMem.setter + def totalConstMem(self, size_t totalConstMem): + self._pvt_ptr[0].totalConstMem = totalConstMem + @property + def major(self): + return self._pvt_ptr[0].major + @major.setter + def major(self, int major): + self._pvt_ptr[0].major = major + @property + def minor(self): + return self._pvt_ptr[0].minor + @minor.setter + def minor(self, int minor): + self._pvt_ptr[0].minor = minor + @property + def textureAlignment(self): + return self._pvt_ptr[0].textureAlignment + @textureAlignment.setter + def textureAlignment(self, size_t textureAlignment): + self._pvt_ptr[0].textureAlignment = textureAlignment + @property + def texturePitchAlignment(self): + return self._pvt_ptr[0].texturePitchAlignment + @texturePitchAlignment.setter + def texturePitchAlignment(self, size_t texturePitchAlignment): + self._pvt_ptr[0].texturePitchAlignment = texturePitchAlignment + @property + def deviceOverlap(self): + return self._pvt_ptr[0].deviceOverlap + @deviceOverlap.setter + def deviceOverlap(self, int deviceOverlap): + self._pvt_ptr[0].deviceOverlap = deviceOverlap + @property + def multiProcessorCount(self): + return self._pvt_ptr[0].multiProcessorCount + @multiProcessorCount.setter + def multiProcessorCount(self, int multiProcessorCount): + self._pvt_ptr[0].multiProcessorCount = multiProcessorCount + @property + def kernelExecTimeoutEnabled(self): + return self._pvt_ptr[0].kernelExecTimeoutEnabled + @kernelExecTimeoutEnabled.setter + def kernelExecTimeoutEnabled(self, int kernelExecTimeoutEnabled): + self._pvt_ptr[0].kernelExecTimeoutEnabled = kernelExecTimeoutEnabled + @property + def integrated(self): + return self._pvt_ptr[0].integrated + @integrated.setter + def integrated(self, int integrated): + self._pvt_ptr[0].integrated = integrated + @property + def canMapHostMemory(self): + return self._pvt_ptr[0].canMapHostMemory + @canMapHostMemory.setter + def canMapHostMemory(self, int canMapHostMemory): + self._pvt_ptr[0].canMapHostMemory = canMapHostMemory + @property + def computeMode(self): + return self._pvt_ptr[0].computeMode + @computeMode.setter + def computeMode(self, int computeMode): + self._pvt_ptr[0].computeMode = computeMode + @property + def maxTexture1D(self): + return self._pvt_ptr[0].maxTexture1D + @maxTexture1D.setter + def maxTexture1D(self, int maxTexture1D): + self._pvt_ptr[0].maxTexture1D = maxTexture1D + @property + def maxTexture1DMipmap(self): + return self._pvt_ptr[0].maxTexture1DMipmap + @maxTexture1DMipmap.setter + def maxTexture1DMipmap(self, int maxTexture1DMipmap): + self._pvt_ptr[0].maxTexture1DMipmap = maxTexture1DMipmap + @property + def maxTexture1DLinear(self): + return self._pvt_ptr[0].maxTexture1DLinear + @maxTexture1DLinear.setter + def maxTexture1DLinear(self, int maxTexture1DLinear): + self._pvt_ptr[0].maxTexture1DLinear = maxTexture1DLinear + @property + def maxTexture2D(self): + return self._pvt_ptr[0].maxTexture2D + @maxTexture2D.setter + def maxTexture2D(self, maxTexture2D): + self._pvt_ptr[0].maxTexture2D = maxTexture2D + @property + def maxTexture2DMipmap(self): + return self._pvt_ptr[0].maxTexture2DMipmap + @maxTexture2DMipmap.setter + def maxTexture2DMipmap(self, maxTexture2DMipmap): + self._pvt_ptr[0].maxTexture2DMipmap = maxTexture2DMipmap + @property + def maxTexture2DLinear(self): + return self._pvt_ptr[0].maxTexture2DLinear + @maxTexture2DLinear.setter + def maxTexture2DLinear(self, maxTexture2DLinear): + self._pvt_ptr[0].maxTexture2DLinear = maxTexture2DLinear + @property + def maxTexture2DGather(self): + return self._pvt_ptr[0].maxTexture2DGather + @maxTexture2DGather.setter + def maxTexture2DGather(self, maxTexture2DGather): + self._pvt_ptr[0].maxTexture2DGather = maxTexture2DGather + @property + def maxTexture3D(self): + return self._pvt_ptr[0].maxTexture3D + @maxTexture3D.setter + def maxTexture3D(self, maxTexture3D): + self._pvt_ptr[0].maxTexture3D = maxTexture3D + @property + def maxTexture3DAlt(self): + return self._pvt_ptr[0].maxTexture3DAlt + @maxTexture3DAlt.setter + def maxTexture3DAlt(self, maxTexture3DAlt): + self._pvt_ptr[0].maxTexture3DAlt = maxTexture3DAlt + @property + def maxTextureCubemap(self): + return self._pvt_ptr[0].maxTextureCubemap + @maxTextureCubemap.setter + def maxTextureCubemap(self, int maxTextureCubemap): + self._pvt_ptr[0].maxTextureCubemap = maxTextureCubemap + @property + def maxTexture1DLayered(self): + return self._pvt_ptr[0].maxTexture1DLayered + @maxTexture1DLayered.setter + def maxTexture1DLayered(self, maxTexture1DLayered): + self._pvt_ptr[0].maxTexture1DLayered = maxTexture1DLayered + @property + def maxTexture2DLayered(self): + return self._pvt_ptr[0].maxTexture2DLayered + @maxTexture2DLayered.setter + def maxTexture2DLayered(self, maxTexture2DLayered): + self._pvt_ptr[0].maxTexture2DLayered = maxTexture2DLayered + @property + def maxTextureCubemapLayered(self): + return self._pvt_ptr[0].maxTextureCubemapLayered + @maxTextureCubemapLayered.setter + def maxTextureCubemapLayered(self, maxTextureCubemapLayered): + self._pvt_ptr[0].maxTextureCubemapLayered = maxTextureCubemapLayered + @property + def maxSurface1D(self): + return self._pvt_ptr[0].maxSurface1D + @maxSurface1D.setter + def maxSurface1D(self, int maxSurface1D): + self._pvt_ptr[0].maxSurface1D = maxSurface1D + @property + def maxSurface2D(self): + return self._pvt_ptr[0].maxSurface2D + @maxSurface2D.setter + def maxSurface2D(self, maxSurface2D): + self._pvt_ptr[0].maxSurface2D = maxSurface2D + @property + def maxSurface3D(self): + return self._pvt_ptr[0].maxSurface3D + @maxSurface3D.setter + def maxSurface3D(self, maxSurface3D): + self._pvt_ptr[0].maxSurface3D = maxSurface3D + @property + def maxSurface1DLayered(self): + return self._pvt_ptr[0].maxSurface1DLayered + @maxSurface1DLayered.setter + def maxSurface1DLayered(self, maxSurface1DLayered): + self._pvt_ptr[0].maxSurface1DLayered = maxSurface1DLayered + @property + def maxSurface2DLayered(self): + return self._pvt_ptr[0].maxSurface2DLayered + @maxSurface2DLayered.setter + def maxSurface2DLayered(self, maxSurface2DLayered): + self._pvt_ptr[0].maxSurface2DLayered = maxSurface2DLayered + @property + def maxSurfaceCubemap(self): + return self._pvt_ptr[0].maxSurfaceCubemap + @maxSurfaceCubemap.setter + def maxSurfaceCubemap(self, int maxSurfaceCubemap): + self._pvt_ptr[0].maxSurfaceCubemap = maxSurfaceCubemap + @property + def maxSurfaceCubemapLayered(self): + return self._pvt_ptr[0].maxSurfaceCubemapLayered + @maxSurfaceCubemapLayered.setter + def maxSurfaceCubemapLayered(self, maxSurfaceCubemapLayered): + self._pvt_ptr[0].maxSurfaceCubemapLayered = maxSurfaceCubemapLayered + @property + def surfaceAlignment(self): + return self._pvt_ptr[0].surfaceAlignment + @surfaceAlignment.setter + def surfaceAlignment(self, size_t surfaceAlignment): + self._pvt_ptr[0].surfaceAlignment = surfaceAlignment + @property + def concurrentKernels(self): + return self._pvt_ptr[0].concurrentKernels + @concurrentKernels.setter + def concurrentKernels(self, int concurrentKernels): + self._pvt_ptr[0].concurrentKernels = concurrentKernels + @property + def ECCEnabled(self): + return self._pvt_ptr[0].ECCEnabled + @ECCEnabled.setter + def ECCEnabled(self, int ECCEnabled): + self._pvt_ptr[0].ECCEnabled = ECCEnabled + @property + def pciBusID(self): + return self._pvt_ptr[0].pciBusID + @pciBusID.setter + def pciBusID(self, int pciBusID): + self._pvt_ptr[0].pciBusID = pciBusID + @property + def pciDeviceID(self): + return self._pvt_ptr[0].pciDeviceID + @pciDeviceID.setter + def pciDeviceID(self, int pciDeviceID): + self._pvt_ptr[0].pciDeviceID = pciDeviceID + @property + def pciDomainID(self): + return self._pvt_ptr[0].pciDomainID + @pciDomainID.setter + def pciDomainID(self, int pciDomainID): + self._pvt_ptr[0].pciDomainID = pciDomainID + @property + def tccDriver(self): + return self._pvt_ptr[0].tccDriver + @tccDriver.setter + def tccDriver(self, int tccDriver): + self._pvt_ptr[0].tccDriver = tccDriver + @property + def asyncEngineCount(self): + return self._pvt_ptr[0].asyncEngineCount + @asyncEngineCount.setter + def asyncEngineCount(self, int asyncEngineCount): + self._pvt_ptr[0].asyncEngineCount = asyncEngineCount + @property + def unifiedAddressing(self): + return self._pvt_ptr[0].unifiedAddressing + @unifiedAddressing.setter + def unifiedAddressing(self, int unifiedAddressing): + self._pvt_ptr[0].unifiedAddressing = unifiedAddressing + @property + def memoryClockRate(self): + return self._pvt_ptr[0].memoryClockRate + @memoryClockRate.setter + def memoryClockRate(self, int memoryClockRate): + self._pvt_ptr[0].memoryClockRate = memoryClockRate + @property + def memoryBusWidth(self): + return self._pvt_ptr[0].memoryBusWidth + @memoryBusWidth.setter + def memoryBusWidth(self, int memoryBusWidth): + self._pvt_ptr[0].memoryBusWidth = memoryBusWidth + @property + def l2CacheSize(self): + return self._pvt_ptr[0].l2CacheSize + @l2CacheSize.setter + def l2CacheSize(self, int l2CacheSize): + self._pvt_ptr[0].l2CacheSize = l2CacheSize + @property + def persistingL2CacheMaxSize(self): + return self._pvt_ptr[0].persistingL2CacheMaxSize + @persistingL2CacheMaxSize.setter + def persistingL2CacheMaxSize(self, int persistingL2CacheMaxSize): + self._pvt_ptr[0].persistingL2CacheMaxSize = persistingL2CacheMaxSize + @property + def maxThreadsPerMultiProcessor(self): + return self._pvt_ptr[0].maxThreadsPerMultiProcessor + @maxThreadsPerMultiProcessor.setter + def maxThreadsPerMultiProcessor(self, int maxThreadsPerMultiProcessor): + self._pvt_ptr[0].maxThreadsPerMultiProcessor = maxThreadsPerMultiProcessor + @property + def streamPrioritiesSupported(self): + return self._pvt_ptr[0].streamPrioritiesSupported + @streamPrioritiesSupported.setter + def streamPrioritiesSupported(self, int streamPrioritiesSupported): + self._pvt_ptr[0].streamPrioritiesSupported = streamPrioritiesSupported + @property + def globalL1CacheSupported(self): + return self._pvt_ptr[0].globalL1CacheSupported + @globalL1CacheSupported.setter + def globalL1CacheSupported(self, int globalL1CacheSupported): + self._pvt_ptr[0].globalL1CacheSupported = globalL1CacheSupported + @property + def localL1CacheSupported(self): + return self._pvt_ptr[0].localL1CacheSupported + @localL1CacheSupported.setter + def localL1CacheSupported(self, int localL1CacheSupported): + self._pvt_ptr[0].localL1CacheSupported = localL1CacheSupported + @property + def sharedMemPerMultiprocessor(self): + return self._pvt_ptr[0].sharedMemPerMultiprocessor + @sharedMemPerMultiprocessor.setter + def sharedMemPerMultiprocessor(self, size_t sharedMemPerMultiprocessor): + self._pvt_ptr[0].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor + @property + def regsPerMultiprocessor(self): + return self._pvt_ptr[0].regsPerMultiprocessor + @regsPerMultiprocessor.setter + def regsPerMultiprocessor(self, int regsPerMultiprocessor): + self._pvt_ptr[0].regsPerMultiprocessor = regsPerMultiprocessor + @property + def managedMemory(self): + return self._pvt_ptr[0].managedMemory + @managedMemory.setter + def managedMemory(self, int managedMemory): + self._pvt_ptr[0].managedMemory = managedMemory + @property + def isMultiGpuBoard(self): + return self._pvt_ptr[0].isMultiGpuBoard + @isMultiGpuBoard.setter + def isMultiGpuBoard(self, int isMultiGpuBoard): + self._pvt_ptr[0].isMultiGpuBoard = isMultiGpuBoard + @property + def multiGpuBoardGroupID(self): + return self._pvt_ptr[0].multiGpuBoardGroupID + @multiGpuBoardGroupID.setter + def multiGpuBoardGroupID(self, int multiGpuBoardGroupID): + self._pvt_ptr[0].multiGpuBoardGroupID = multiGpuBoardGroupID + @property + def hostNativeAtomicSupported(self): + return self._pvt_ptr[0].hostNativeAtomicSupported + @hostNativeAtomicSupported.setter + def hostNativeAtomicSupported(self, int hostNativeAtomicSupported): + self._pvt_ptr[0].hostNativeAtomicSupported = hostNativeAtomicSupported + @property + def singleToDoublePrecisionPerfRatio(self): + return self._pvt_ptr[0].singleToDoublePrecisionPerfRatio + @singleToDoublePrecisionPerfRatio.setter + def singleToDoublePrecisionPerfRatio(self, int singleToDoublePrecisionPerfRatio): + self._pvt_ptr[0].singleToDoublePrecisionPerfRatio = singleToDoublePrecisionPerfRatio + @property + def pageableMemoryAccess(self): + return self._pvt_ptr[0].pageableMemoryAccess + @pageableMemoryAccess.setter + def pageableMemoryAccess(self, int pageableMemoryAccess): + self._pvt_ptr[0].pageableMemoryAccess = pageableMemoryAccess + @property + def concurrentManagedAccess(self): + return self._pvt_ptr[0].concurrentManagedAccess + @concurrentManagedAccess.setter + def concurrentManagedAccess(self, int concurrentManagedAccess): + self._pvt_ptr[0].concurrentManagedAccess = concurrentManagedAccess + @property + def computePreemptionSupported(self): + return self._pvt_ptr[0].computePreemptionSupported + @computePreemptionSupported.setter + def computePreemptionSupported(self, int computePreemptionSupported): + self._pvt_ptr[0].computePreemptionSupported = computePreemptionSupported + @property + def canUseHostPointerForRegisteredMem(self): + return self._pvt_ptr[0].canUseHostPointerForRegisteredMem + @canUseHostPointerForRegisteredMem.setter + def canUseHostPointerForRegisteredMem(self, int canUseHostPointerForRegisteredMem): + self._pvt_ptr[0].canUseHostPointerForRegisteredMem = canUseHostPointerForRegisteredMem + @property + def cooperativeLaunch(self): + return self._pvt_ptr[0].cooperativeLaunch + @cooperativeLaunch.setter + def cooperativeLaunch(self, int cooperativeLaunch): + self._pvt_ptr[0].cooperativeLaunch = cooperativeLaunch + @property + def cooperativeMultiDeviceLaunch(self): + return self._pvt_ptr[0].cooperativeMultiDeviceLaunch + @cooperativeMultiDeviceLaunch.setter + def cooperativeMultiDeviceLaunch(self, int cooperativeMultiDeviceLaunch): + self._pvt_ptr[0].cooperativeMultiDeviceLaunch = cooperativeMultiDeviceLaunch + @property + def sharedMemPerBlockOptin(self): + return self._pvt_ptr[0].sharedMemPerBlockOptin + @sharedMemPerBlockOptin.setter + def sharedMemPerBlockOptin(self, size_t sharedMemPerBlockOptin): + self._pvt_ptr[0].sharedMemPerBlockOptin = sharedMemPerBlockOptin + @property + def pageableMemoryAccessUsesHostPageTables(self): + return self._pvt_ptr[0].pageableMemoryAccessUsesHostPageTables + @pageableMemoryAccessUsesHostPageTables.setter + def pageableMemoryAccessUsesHostPageTables(self, int pageableMemoryAccessUsesHostPageTables): + self._pvt_ptr[0].pageableMemoryAccessUsesHostPageTables = pageableMemoryAccessUsesHostPageTables + @property + def directManagedMemAccessFromHost(self): + return self._pvt_ptr[0].directManagedMemAccessFromHost + @directManagedMemAccessFromHost.setter + def directManagedMemAccessFromHost(self, int directManagedMemAccessFromHost): + self._pvt_ptr[0].directManagedMemAccessFromHost = directManagedMemAccessFromHost + @property + def maxBlocksPerMultiProcessor(self): + return self._pvt_ptr[0].maxBlocksPerMultiProcessor + @maxBlocksPerMultiProcessor.setter + def maxBlocksPerMultiProcessor(self, int maxBlocksPerMultiProcessor): + self._pvt_ptr[0].maxBlocksPerMultiProcessor = maxBlocksPerMultiProcessor + @property + def accessPolicyMaxWindowSize(self): + return self._pvt_ptr[0].accessPolicyMaxWindowSize + @accessPolicyMaxWindowSize.setter + def accessPolicyMaxWindowSize(self, int accessPolicyMaxWindowSize): + self._pvt_ptr[0].accessPolicyMaxWindowSize = accessPolicyMaxWindowSize + @property + def reservedSharedMemPerBlock(self): + return self._pvt_ptr[0].reservedSharedMemPerBlock + @reservedSharedMemPerBlock.setter + def reservedSharedMemPerBlock(self, size_t reservedSharedMemPerBlock): + self._pvt_ptr[0].reservedSharedMemPerBlock = reservedSharedMemPerBlock + @property + def hostRegisterSupported(self): + return self._pvt_ptr[0].hostRegisterSupported + @hostRegisterSupported.setter + def hostRegisterSupported(self, int hostRegisterSupported): + self._pvt_ptr[0].hostRegisterSupported = hostRegisterSupported + @property + def sparseCudaArraySupported(self): + return self._pvt_ptr[0].sparseCudaArraySupported + @sparseCudaArraySupported.setter + def sparseCudaArraySupported(self, int sparseCudaArraySupported): + self._pvt_ptr[0].sparseCudaArraySupported = sparseCudaArraySupported + @property + def hostRegisterReadOnlySupported(self): + return self._pvt_ptr[0].hostRegisterReadOnlySupported + @hostRegisterReadOnlySupported.setter + def hostRegisterReadOnlySupported(self, int hostRegisterReadOnlySupported): + self._pvt_ptr[0].hostRegisterReadOnlySupported = hostRegisterReadOnlySupported + @property + def timelineSemaphoreInteropSupported(self): + return self._pvt_ptr[0].timelineSemaphoreInteropSupported + @timelineSemaphoreInteropSupported.setter + def timelineSemaphoreInteropSupported(self, int timelineSemaphoreInteropSupported): + self._pvt_ptr[0].timelineSemaphoreInteropSupported = timelineSemaphoreInteropSupported + @property + def memoryPoolsSupported(self): + return self._pvt_ptr[0].memoryPoolsSupported + @memoryPoolsSupported.setter + def memoryPoolsSupported(self, int memoryPoolsSupported): + self._pvt_ptr[0].memoryPoolsSupported = memoryPoolsSupported + @property + def gpuDirectRDMASupported(self): + return self._pvt_ptr[0].gpuDirectRDMASupported + @gpuDirectRDMASupported.setter + def gpuDirectRDMASupported(self, int gpuDirectRDMASupported): + self._pvt_ptr[0].gpuDirectRDMASupported = gpuDirectRDMASupported + @property + def gpuDirectRDMAFlushWritesOptions(self): + return self._pvt_ptr[0].gpuDirectRDMAFlushWritesOptions + @gpuDirectRDMAFlushWritesOptions.setter + def gpuDirectRDMAFlushWritesOptions(self, unsigned int gpuDirectRDMAFlushWritesOptions): + self._pvt_ptr[0].gpuDirectRDMAFlushWritesOptions = gpuDirectRDMAFlushWritesOptions + @property + def gpuDirectRDMAWritesOrdering(self): + return self._pvt_ptr[0].gpuDirectRDMAWritesOrdering + @gpuDirectRDMAWritesOrdering.setter + def gpuDirectRDMAWritesOrdering(self, int gpuDirectRDMAWritesOrdering): + self._pvt_ptr[0].gpuDirectRDMAWritesOrdering = gpuDirectRDMAWritesOrdering + @property + def memoryPoolSupportedHandleTypes(self): + return self._pvt_ptr[0].memoryPoolSupportedHandleTypes + @memoryPoolSupportedHandleTypes.setter + def memoryPoolSupportedHandleTypes(self, unsigned int memoryPoolSupportedHandleTypes): + self._pvt_ptr[0].memoryPoolSupportedHandleTypes = memoryPoolSupportedHandleTypes + @property + def deferredMappingCudaArraySupported(self): + return self._pvt_ptr[0].deferredMappingCudaArraySupported + @deferredMappingCudaArraySupported.setter + def deferredMappingCudaArraySupported(self, int deferredMappingCudaArraySupported): + self._pvt_ptr[0].deferredMappingCudaArraySupported = deferredMappingCudaArraySupported + @property + def ipcEventSupported(self): + return self._pvt_ptr[0].ipcEventSupported + @ipcEventSupported.setter + def ipcEventSupported(self, int ipcEventSupported): + self._pvt_ptr[0].ipcEventSupported = ipcEventSupported + @property + def clusterLaunch(self): + return self._pvt_ptr[0].clusterLaunch + @clusterLaunch.setter + def clusterLaunch(self, int clusterLaunch): + self._pvt_ptr[0].clusterLaunch = clusterLaunch + @property + def unifiedFunctionPointers(self): + return self._pvt_ptr[0].unifiedFunctionPointers + @unifiedFunctionPointers.setter + def unifiedFunctionPointers(self, int unifiedFunctionPointers): + self._pvt_ptr[0].unifiedFunctionPointers = unifiedFunctionPointers + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class cudaIpcEventHandle_st: + """ + CUDA IPC event handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + if CHAR_MIN == 0: + for i, b in enumerate(reserved): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].reserved[i] = b + else: + for i, b in enumerate(reserved): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].reserved[i] = b + +cdef class cudaIpcMemHandle_st: + """ + CUDA IPC memory handle + + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + if CHAR_MIN == 0: + for i, b in enumerate(reserved): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].reserved[i] = b + else: + for i, b in enumerate(reserved): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].reserved[i] = b + +cdef class cudaMemFabricHandle_st: + """ + Attributes + ---------- + reserved : bytes + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 64: + raise ValueError("reserved length must be 64, is " + str(len(reserved))) + if CHAR_MIN == 0: + for i, b in enumerate(reserved): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].reserved[i] = b + else: + for i, b in enumerate(reserved): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].reserved[i] = b + +cdef class anon_struct7: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle.win32 + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + hex(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['name : ' + hex(self.name)] + except ValueError: + str_list += ['name : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._pvt_ptr[0].handle.win32.handle + @handle.setter + def handle(self, handle): + _chandle = _HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + @property + def name(self): + return self._pvt_ptr[0].handle.win32.name + @name.setter + def name(self, name): + _cname = _HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + +cdef class anon_union2: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct7 + + nvSciBufObject : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._win32 = anon_struct7(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fd : ' + str(self.fd)] + except ValueError: + str_list += ['fd : '] + try: + str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] + except ValueError: + str_list += ['win32 : '] + try: + str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)] + except ValueError: + str_list += ['nvSciBufObject : '] + return '\n'.join(str_list) + else: + return '' + @property + def fd(self): + return self._pvt_ptr[0].handle.fd + @fd.setter + def fd(self, int fd): + self._pvt_ptr[0].handle.fd = fd + @property + def win32(self): + return self._win32 + @win32.setter + def win32(self, win32 not None : anon_struct7): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + @property + def nvSciBufObject(self): + return self._pvt_ptr[0].handle.nvSciBufObject + @nvSciBufObject.setter + def nvSciBufObject(self, nvSciBufObject): + _cnvSciBufObject = _HelperInputVoidPtr(nvSciBufObject) + self._pvt_ptr[0].handle.nvSciBufObject = _cnvSciBufObject.cptr + +cdef class cudaExternalMemoryHandleDesc: + """ + External memory handle descriptor + + Attributes + ---------- + type : cudaExternalMemoryHandleType + Type of the handle + handle : anon_union2 + + size : unsigned long long + Size of the memory allocation + flags : unsigned int + Flags must either be zero or cudaExternalMemoryDedicated + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaExternalMemoryHandleDesc)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = anon_union2(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaExternalMemoryHandleType: + return None + return _dict_cudaExternalMemoryHandleType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaExternalMemoryHandleType): + self._pvt_ptr[0].type = type.value + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle not None : anon_union2): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned long long size): + self._pvt_ptr[0].size = size + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class cudaExternalMemoryBufferDesc: + """ + External memory buffer descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the buffer's base is + size : unsigned long long + Size of the buffer + flags : unsigned int + Flags reserved for future use. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def offset(self): + return self._pvt_ptr[0].offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].offset = offset + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned long long size): + self._pvt_ptr[0].size = size + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class cudaExternalMemoryMipmappedArrayDesc: + """ + External memory mipmap descriptor + + Attributes + ---------- + offset : unsigned long long + Offset into the memory object where the base level of the mipmap + chain is. + formatDesc : cudaChannelFormatDesc + Format of base level of the mipmap chain + extent : cudaExtent + Dimensions of base level of the mipmap chain + flags : unsigned int + Flags associated with CUDA mipmapped arrays. See + cudaMallocMipmappedArray + numLevels : unsigned int + Total number of levels in the mipmap chain + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._formatDesc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].formatDesc) + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['formatDesc :\n' + '\n'.join([' ' + line for line in str(self.formatDesc).splitlines()])] + except ValueError: + str_list += ['formatDesc : '] + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['numLevels : ' + str(self.numLevels)] + except ValueError: + str_list += ['numLevels : '] + return '\n'.join(str_list) + else: + return '' + @property + def offset(self): + return self._pvt_ptr[0].offset + @offset.setter + def offset(self, unsigned long long offset): + self._pvt_ptr[0].offset = offset + @property + def formatDesc(self): + return self._formatDesc + @formatDesc.setter + def formatDesc(self, formatDesc not None : cudaChannelFormatDesc): + string.memcpy(&self._pvt_ptr[0].formatDesc, formatDesc.getPtr(), sizeof(self._pvt_ptr[0].formatDesc)) + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : cudaExtent): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def numLevels(self): + return self._pvt_ptr[0].numLevels + @numLevels.setter + def numLevels(self, unsigned int numLevels): + self._pvt_ptr[0].numLevels = numLevels + +cdef class anon_struct8: + """ + Attributes + ---------- + handle : Any + + name : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle.win32 + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + hex(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['name : ' + hex(self.name)] + except ValueError: + str_list += ['name : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._pvt_ptr[0].handle.win32.handle + @handle.setter + def handle(self, handle): + _chandle = _HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + @property + def name(self): + return self._pvt_ptr[0].handle.win32.name + @name.setter + def name(self, name): + _cname = _HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + +cdef class anon_union3: + """ + Attributes + ---------- + fd : int + + win32 : anon_struct8 + + nvSciSyncObj : Any + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._win32 = anon_struct8(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].handle + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fd : ' + str(self.fd)] + except ValueError: + str_list += ['fd : '] + try: + str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] + except ValueError: + str_list += ['win32 : '] + try: + str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)] + except ValueError: + str_list += ['nvSciSyncObj : '] + return '\n'.join(str_list) + else: + return '' + @property + def fd(self): + return self._pvt_ptr[0].handle.fd + @fd.setter + def fd(self, int fd): + self._pvt_ptr[0].handle.fd = fd + @property + def win32(self): + return self._win32 + @win32.setter + def win32(self, win32 not None : anon_struct8): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + @property + def nvSciSyncObj(self): + return self._pvt_ptr[0].handle.nvSciSyncObj + @nvSciSyncObj.setter + def nvSciSyncObj(self, nvSciSyncObj): + _cnvSciSyncObj = _HelperInputVoidPtr(nvSciSyncObj) + self._pvt_ptr[0].handle.nvSciSyncObj = _cnvSciSyncObj.cptr + +cdef class cudaExternalSemaphoreHandleDesc: + """ + External semaphore handle descriptor + + Attributes + ---------- + type : cudaExternalSemaphoreHandleType + Type of the handle + handle : anon_union3 + + flags : unsigned int + Flags reserved for the future. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaExternalSemaphoreHandleDesc)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = anon_union3(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaExternalSemaphoreHandleType: + return None + return _dict_cudaExternalSemaphoreHandleType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaExternalSemaphoreHandleType): + self._pvt_ptr[0].type = type.value + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle not None : anon_union3): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + +cdef class anon_struct15: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.fence + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + return '\n'.join(str_list) + else: + return '' + @property + def value(self): + return self._pvt_ptr[0].params.fence.value + @value.setter + def value(self, unsigned long long value): + self._pvt_ptr[0].params.fence.value = value + +cdef class anon_union6: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.nvSciSync + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence : ' + hex(self.fence)] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._pvt_ptr[0].params.nvSciSync.fence + @fence.setter + def fence(self, fence): + _cfence = _HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + @property + def reserved(self): + return self._pvt_ptr[0].params.nvSciSync.reserved + @reserved.setter + def reserved(self, unsigned long long reserved): + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + +cdef class anon_struct16: + """ + Attributes + ---------- + key : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.keyedMutex + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['key : ' + str(self.key)] + except ValueError: + str_list += ['key : '] + return '\n'.join(str_list) + else: + return '' + @property + def key(self): + return self._pvt_ptr[0].params.keyedMutex.key + @key.setter + def key(self, unsigned long long key): + self._pvt_ptr[0].params.keyedMutex.key = key + +cdef class anon_struct17: + """ + Attributes + ---------- + fence : anon_struct15 + + nvSciSync : anon_union6 + + keyedMutex : anon_struct16 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._fence = anon_struct15(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union6(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct16(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] + except ValueError: + str_list += ['nvSciSync : '] + try: + str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] + except ValueError: + str_list += ['keyedMutex : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._fence + @fence.setter + def fence(self, fence not None : anon_struct15): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + @property + def nvSciSync(self): + return self._nvSciSync + @nvSciSync.setter + def nvSciSync(self, nvSciSync not None : anon_union6): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + @property + def keyedMutex(self): + return self._keyedMutex + @keyedMutex.setter + def keyedMutex(self, keyedMutex not None : anon_struct16): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + @property + def reserved(self): + return self._pvt_ptr[0].params.reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].params.reserved = reserved + +cdef class cudaExternalSemaphoreSignalParams: + """ + External semaphore signal parameters, compatible with driver type + + Attributes + ---------- + params : anon_struct17 + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while signaling the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._params = anon_struct17(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] + except ValueError: + str_list += ['params : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def params(self): + return self._params + @params.setter + def params(self, params not None : anon_struct17): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_struct18: + """ + Attributes + ---------- + value : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.fence + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['value : ' + str(self.value)] + except ValueError: + str_list += ['value : '] + return '\n'.join(str_list) + else: + return '' + @property + def value(self): + return self._pvt_ptr[0].params.fence.value + @value.setter + def value(self, unsigned long long value): + self._pvt_ptr[0].params.fence.value = value + +cdef class anon_union7: + """ + Attributes + ---------- + fence : Any + + reserved : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.nvSciSync + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence : ' + hex(self.fence)] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._pvt_ptr[0].params.nvSciSync.fence + @fence.setter + def fence(self, fence): + _cfence = _HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + @property + def reserved(self): + return self._pvt_ptr[0].params.nvSciSync.reserved + @reserved.setter + def reserved(self, unsigned long long reserved): + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + +cdef class anon_struct19: + """ + Attributes + ---------- + key : unsigned long long + + timeoutMs : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params.keyedMutex + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['key : ' + str(self.key)] + except ValueError: + str_list += ['key : '] + try: + str_list += ['timeoutMs : ' + str(self.timeoutMs)] + except ValueError: + str_list += ['timeoutMs : '] + return '\n'.join(str_list) + else: + return '' + @property + def key(self): + return self._pvt_ptr[0].params.keyedMutex.key + @key.setter + def key(self, unsigned long long key): + self._pvt_ptr[0].params.keyedMutex.key = key + @property + def timeoutMs(self): + return self._pvt_ptr[0].params.keyedMutex.timeoutMs + @timeoutMs.setter + def timeoutMs(self, unsigned int timeoutMs): + self._pvt_ptr[0].params.keyedMutex.timeoutMs = timeoutMs + +cdef class anon_struct20: + """ + Attributes + ---------- + fence : anon_struct18 + + nvSciSync : anon_union7 + + keyedMutex : anon_struct19 + + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._fence = anon_struct18(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct19(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].params + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] + except ValueError: + str_list += ['fence : '] + try: + str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] + except ValueError: + str_list += ['nvSciSync : '] + try: + str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] + except ValueError: + str_list += ['keyedMutex : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def fence(self): + return self._fence + @fence.setter + def fence(self, fence not None : anon_struct18): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + @property + def nvSciSync(self): + return self._nvSciSync + @nvSciSync.setter + def nvSciSync(self, nvSciSync not None : anon_union7): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + @property + def keyedMutex(self): + return self._keyedMutex + @keyedMutex.setter + def keyedMutex(self, keyedMutex not None : anon_struct19): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + @property + def reserved(self): + return self._pvt_ptr[0].params.reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].params.reserved = reserved + +cdef class cudaExternalSemaphoreWaitParams: + """ + External semaphore wait parameters, compatible with driver type + + Attributes + ---------- + params : anon_struct20 + + flags : unsigned int + Only when cudaExternalSemaphoreSignalParams is used to signal a + cudaExternalSemaphore_t of type + cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is + cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates + that while waiting for the cudaExternalSemaphore_t, no memory + synchronization operations should be performed for any external + memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For + all other types of cudaExternalSemaphore_t, flags must be zero. + reserved : list[unsigned int] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._params = anon_struct20(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] + except ValueError: + str_list += ['params : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def params(self): + return self._params + @params.setter + def params(self, params not None : anon_struct20): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class cudalibraryHostUniversalFunctionAndDataTable: + """ + Attributes + ---------- + functionTable : Any + + functionWindowSize : size_t + + dataTable : Any + + dataWindowSize : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['functionTable : ' + hex(self.functionTable)] + except ValueError: + str_list += ['functionTable : '] + try: + str_list += ['functionWindowSize : ' + str(self.functionWindowSize)] + except ValueError: + str_list += ['functionWindowSize : '] + try: + str_list += ['dataTable : ' + hex(self.dataTable)] + except ValueError: + str_list += ['dataTable : '] + try: + str_list += ['dataWindowSize : ' + str(self.dataWindowSize)] + except ValueError: + str_list += ['dataWindowSize : '] + return '\n'.join(str_list) + else: + return '' + @property + def functionTable(self): + return self._pvt_ptr[0].functionTable + @functionTable.setter + def functionTable(self, functionTable): + _cfunctionTable = _HelperInputVoidPtr(functionTable) + self._pvt_ptr[0].functionTable = _cfunctionTable.cptr + @property + def functionWindowSize(self): + return self._pvt_ptr[0].functionWindowSize + @functionWindowSize.setter + def functionWindowSize(self, size_t functionWindowSize): + self._pvt_ptr[0].functionWindowSize = functionWindowSize + @property + def dataTable(self): + return self._pvt_ptr[0].dataTable + @dataTable.setter + def dataTable(self, dataTable): + _cdataTable = _HelperInputVoidPtr(dataTable) + self._pvt_ptr[0].dataTable = _cdataTable.cptr + @property + def dataWindowSize(self): + return self._pvt_ptr[0].dataWindowSize + @dataWindowSize.setter + def dataWindowSize(self, size_t dataWindowSize): + self._pvt_ptr[0].dataWindowSize = dataWindowSize + +cdef class cudaKernelNodeParams: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + func : Any + Kernel to launch + gridDim : dim3 + Grid dimensions + blockDim : dim3 + Block dimensions + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to individual kernel arguments + extra : Any + Pointer to kernel arguments in the "extra" format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].gridDim) + self._blockDim = dim3(_ptr=&self._pvt_ptr[0].blockDim) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['func : ' + hex(self.func)] + except ValueError: + str_list += ['func : '] + try: + str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] + except ValueError: + str_list += ['gridDim : '] + try: + str_list += ['blockDim :\n' + '\n'.join([' ' + line for line in str(self.blockDim).splitlines()])] + except ValueError: + str_list += ['blockDim : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + try: + str_list += ['extra : ' + str(self.extra)] + except ValueError: + str_list += ['extra : '] + return '\n'.join(str_list) + else: + return '' + @property + def func(self): + return self._pvt_ptr[0].func + @func.setter + def func(self, func): + _cfunc = _HelperInputVoidPtr(func) + self._pvt_ptr[0].func = _cfunc.cptr + @property + def gridDim(self): + return self._gridDim + @gridDim.setter + def gridDim(self, gridDim not None : dim3): + string.memcpy(&self._pvt_ptr[0].gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].gridDim)) + @property + def blockDim(self): + return self._blockDim + @blockDim.setter + def blockDim(self, blockDim not None : dim3): + string.memcpy(&self._pvt_ptr[0].blockDim, blockDim.getPtr(), sizeof(self._pvt_ptr[0].blockDim)) + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + @property + def extra(self): + return self._pvt_ptr[0].extra + @extra.setter + def extra(self, void_ptr extra): + self._pvt_ptr[0].extra = extra + +cdef class cudaKernelNodeParamsV2: + """ + CUDA GPU kernel node parameters + + Attributes + ---------- + func : Any + Kernel to launch + gridDim : dim3 + Grid dimensions + blockDim : dim3 + Block dimensions + sharedMemBytes : unsigned int + Dynamic shared-memory size per thread block in bytes + kernelParams : Any + Array of pointers to individual kernel arguments + extra : Any + Pointer to kernel arguments in the "extra" format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].gridDim) + self._blockDim = dim3(_ptr=&self._pvt_ptr[0].blockDim) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['func : ' + hex(self.func)] + except ValueError: + str_list += ['func : '] + try: + str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] + except ValueError: + str_list += ['gridDim : '] + try: + str_list += ['blockDim :\n' + '\n'.join([' ' + line for line in str(self.blockDim).splitlines()])] + except ValueError: + str_list += ['blockDim : '] + try: + str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] + except ValueError: + str_list += ['sharedMemBytes : '] + try: + str_list += ['kernelParams : ' + str(self.kernelParams)] + except ValueError: + str_list += ['kernelParams : '] + try: + str_list += ['extra : ' + str(self.extra)] + except ValueError: + str_list += ['extra : '] + return '\n'.join(str_list) + else: + return '' + @property + def func(self): + return self._pvt_ptr[0].func + @func.setter + def func(self, func): + _cfunc = _HelperInputVoidPtr(func) + self._pvt_ptr[0].func = _cfunc.cptr + @property + def gridDim(self): + return self._gridDim + @gridDim.setter + def gridDim(self, gridDim not None : dim3): + string.memcpy(&self._pvt_ptr[0].gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].gridDim)) + @property + def blockDim(self): + return self._blockDim + @blockDim.setter + def blockDim(self, blockDim not None : dim3): + string.memcpy(&self._pvt_ptr[0].blockDim, blockDim.getPtr(), sizeof(self._pvt_ptr[0].blockDim)) + @property + def sharedMemBytes(self): + return self._pvt_ptr[0].sharedMemBytes + @sharedMemBytes.setter + def sharedMemBytes(self, unsigned int sharedMemBytes): + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + @property + def kernelParams(self): + return self._pvt_ptr[0].kernelParams + @kernelParams.setter + def kernelParams(self, kernelParams): + self._cykernelParams = _HelperKernelParams(kernelParams) + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + @property + def extra(self): + return self._pvt_ptr[0].extra + @extra.setter + def extra(self, void_ptr extra): + self._pvt_ptr[0].extra = extra + +cdef class cudaExternalSemaphoreSignalNodeParams: + """ + External semaphore signal node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphore_t)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] + return [cudaExternalSemaphoreSignalParams(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class cudaExternalSemaphoreSignalNodeParamsV2: + """ + External semaphore signal node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreSignalParams + Array of external semaphore signal parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphore_t)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] + return [cudaExternalSemaphoreSignalParams(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class cudaExternalSemaphoreWaitNodeParams: + """ + External semaphore wait node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphore_t)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] + return [cudaExternalSemaphoreWaitParams(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class cudaExternalSemaphoreWaitNodeParamsV2: + """ + External semaphore wait node parameters + + Attributes + ---------- + extSemArray : cudaExternalSemaphore_t + Array of external semaphore handles. + paramsArray : cudaExternalSemaphoreWaitParams + Array of external semaphore wait parameters. + numExtSems : unsigned int + Number of handles and parameters supplied in extSemArray and + paramsArray. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + if self._extSemArray is not NULL: + free(self._extSemArray) + if self._paramsArray is not NULL: + free(self._paramsArray) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['extSemArray : ' + str(self.extSemArray)] + except ValueError: + str_list += ['extSemArray : '] + try: + str_list += ['paramsArray : ' + str(self.paramsArray)] + except ValueError: + str_list += ['paramsArray : '] + try: + str_list += ['numExtSems : ' + str(self.numExtSems)] + except ValueError: + str_list += ['numExtSems : '] + return '\n'.join(str_list) + else: + return '' + @property + def extSemArray(self): + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] + @extSemArray.setter + def extSemArray(self, val): + if len(val) == 0: + free(self._extSemArray) + self._extSemArray_length = 0 + self._pvt_ptr[0].extSemArray = NULL + else: + if self._extSemArray_length != len(val): + free(self._extSemArray) + self._extSemArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphore_t)) + if self._extSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + self._extSemArray_length = len(val) + self._pvt_ptr[0].extSemArray = self._extSemArray + for idx in range(len(val)): + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + + @property + def paramsArray(self): + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] + return [cudaExternalSemaphoreWaitParams(_ptr=arr) for arr in arrs] + @paramsArray.setter + def paramsArray(self, val): + if len(val) == 0: + free(self._paramsArray) + self._paramsArray_length = 0 + self._pvt_ptr[0].paramsArray = NULL + else: + if self._paramsArray_length != len(val): + free(self._paramsArray) + self._paramsArray = calloc(len(val), sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + if self._paramsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) + self._paramsArray_length = len(val) + self._pvt_ptr[0].paramsArray = self._paramsArray + for idx in range(len(val)): + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + + @property + def numExtSems(self): + return self._pvt_ptr[0].numExtSems + @numExtSems.setter + def numExtSems(self, unsigned int numExtSems): + self._pvt_ptr[0].numExtSems = numExtSems + +cdef class cudaConditionalNodeParams: + """ + CUDA conditional node parameters + + Attributes + ---------- + handle : cudaGraphConditionalHandle + Conditional node handle. Handles must be created in advance of + creating the node using cudaGraphConditionalHandleCreate. + type : cudaGraphConditionalNodeType + Type of conditional node. + size : unsigned int + Size of graph output array. Allowed values are 1 for + cudaGraphCondTypeWhile, 1 or 2 for cudaGraphCondTypeWhile, or any + value greater than zero for cudaGraphCondTypeSwitch. + phGraph_out : cudaGraph_t + CUDA-owned array populated with conditional node child graphs + during creation of the node. Valid for the lifetime of the + conditional node. The contents of the graph(s) are subject to the + following constraints: - Allowed node types are kernel nodes, + empty nodes, child graphs, memsets, memcopies, and conditionals. + This applies recursively to child graphs and conditional bodies. + - All kernels, including kernels in nested conditionals or child + graphs at any level, must belong to the same CUDA context. + These graphs may be populated using graph node creation APIs or + cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + cudaGraphCondTypeWhile: phGraph_out[0] is executed as long as the + condition is non-zero. cudaGraphCondTypeSwitch: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._handle = cudaGraphConditionalHandle(_ptr=&self._pvt_ptr[0].handle) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['handle : ' + str(self.handle)] + except ValueError: + str_list += ['handle : '] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + try: + str_list += ['phGraph_out : ' + str(self.phGraph_out)] + except ValueError: + str_list += ['phGraph_out : '] + return '\n'.join(str_list) + else: + return '' + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle): + cdef cyruntime.cudaGraphConditionalHandle cyhandle + if handle is None: + cyhandle = 0 + elif isinstance(handle, (cudaGraphConditionalHandle)): + phandle = int(handle) + cyhandle = phandle + else: + phandle = int(cudaGraphConditionalHandle(handle)) + cyhandle = phandle + self._handle._pvt_ptr[0] = cyhandle + + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaGraphConditionalNodeType: + return None + return _dict_cudaGraphConditionalNodeType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaGraphConditionalNodeType): + self._pvt_ptr[0].type = type.value + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, unsigned int size): + self._pvt_ptr[0].size = size + @property + def phGraph_out(self): + arrs = [self._pvt_ptr[0].phGraph_out + x*sizeof(cyruntime.cudaGraph_t) for x in range(self.size)] + return [cudaGraph_t(_ptr=arr) for arr in arrs] + +cdef class cudaChildGraphNodeParams: + """ + Child graph node parameters + + Attributes + ---------- + graph : cudaGraph_t + The child graph to clone into the node for node creation, or a + handle to the graph owned by the node for node query. The graph + must not contain conditional nodes. Graphs containing memory + allocation or memory free nodes must set the ownership to be moved + to the parent. + ownership : cudaGraphChildGraphNodeOwnership + The ownership relationship of the child graph node. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._graph = cudaGraph_t(_ptr=&self._pvt_ptr[0].graph) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['graph : ' + str(self.graph)] + except ValueError: + str_list += ['graph : '] + try: + str_list += ['ownership : ' + str(self.ownership)] + except ValueError: + str_list += ['ownership : '] + return '\n'.join(str_list) + else: + return '' + @property + def graph(self): + return self._graph + @graph.setter + def graph(self, graph): + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + cygraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + cygraph = pgraph + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + self._graph._pvt_ptr[0] = cygraph + @property + def ownership(self): + if self._pvt_ptr[0].ownership not in _dict_cudaGraphChildGraphNodeOwnership: + return None + return _dict_cudaGraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] + @ownership.setter + def ownership(self, ownership not None : cudaGraphChildGraphNodeOwnership): + self._pvt_ptr[0].ownership = ownership.value + +cdef class cudaEventRecordNodeParams: + """ + Event record node parameters + + Attributes + ---------- + event : cudaEvent_t + The event to record when the node executes + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].event) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cyruntime.cudaEvent_t cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + +cdef class cudaEventWaitNodeParams: + """ + Event wait node parameters + + Attributes + ---------- + event : cudaEvent_t + The event to wait on from the node + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].event) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cyruntime.cudaEvent_t cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + +cdef class cudaGraphNodeParams: + """ + Graph node parameters. See cudaGraphAddNode. + + Attributes + ---------- + type : cudaGraphNodeType + Type of the node + reserved0 : list[int] + Reserved. Must be zero. + reserved1 : list[long long] + Padding. Unused bytes must be zero. + kernel : cudaKernelNodeParamsV2 + Kernel node parameters. + memcpy : cudaMemcpyNodeParams + Memcpy node parameters. + memset : cudaMemsetParamsV2 + Memset node parameters. + host : cudaHostNodeParamsV2 + Host node parameters. + graph : cudaChildGraphNodeParams + Child graph node parameters. + eventWait : cudaEventWaitNodeParams + Event wait node parameters. + eventRecord : cudaEventRecordNodeParams + Event record node parameters. + extSemSignal : cudaExternalSemaphoreSignalNodeParamsV2 + External semaphore signal node parameters. + extSemWait : cudaExternalSemaphoreWaitNodeParamsV2 + External semaphore wait node parameters. + alloc : cudaMemAllocNodeParamsV2 + Memory allocation node parameters. + free : cudaMemFreeNodeParams + Memory free node parameters. + conditional : cudaConditionalNodeParams + Conditional node parameters. + reserved2 : long long + Reserved bytes. Must be zero. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaGraphNodeParams)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._kernel = cudaKernelNodeParamsV2(_ptr=&self._pvt_ptr[0].kernel) + self._memcpy = cudaMemcpyNodeParams(_ptr=&self._pvt_ptr[0].memcpy) + self._memset = cudaMemsetParamsV2(_ptr=&self._pvt_ptr[0].memset) + self._host = cudaHostNodeParamsV2(_ptr=&self._pvt_ptr[0].host) + self._graph = cudaChildGraphNodeParams(_ptr=&self._pvt_ptr[0].graph) + self._eventWait = cudaEventWaitNodeParams(_ptr=&self._pvt_ptr[0].eventWait) + self._eventRecord = cudaEventRecordNodeParams(_ptr=&self._pvt_ptr[0].eventRecord) + self._extSemSignal = cudaExternalSemaphoreSignalNodeParamsV2(_ptr=&self._pvt_ptr[0].extSemSignal) + self._extSemWait = cudaExternalSemaphoreWaitNodeParamsV2(_ptr=&self._pvt_ptr[0].extSemWait) + self._alloc = cudaMemAllocNodeParamsV2(_ptr=&self._pvt_ptr[0].alloc) + self._free = cudaMemFreeNodeParams(_ptr=&self._pvt_ptr[0].free) + self._conditional = cudaConditionalNodeParams(_ptr=&self._pvt_ptr[0].conditional) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['reserved0 : ' + str(self.reserved0)] + except ValueError: + str_list += ['reserved0 : '] + try: + str_list += ['reserved1 : ' + str(self.reserved1)] + except ValueError: + str_list += ['reserved1 : '] + try: + str_list += ['kernel :\n' + '\n'.join([' ' + line for line in str(self.kernel).splitlines()])] + except ValueError: + str_list += ['kernel : '] + try: + str_list += ['memcpy :\n' + '\n'.join([' ' + line for line in str(self.memcpy).splitlines()])] + except ValueError: + str_list += ['memcpy : '] + try: + str_list += ['memset :\n' + '\n'.join([' ' + line for line in str(self.memset).splitlines()])] + except ValueError: + str_list += ['memset : '] + try: + str_list += ['host :\n' + '\n'.join([' ' + line for line in str(self.host).splitlines()])] + except ValueError: + str_list += ['host : '] + try: + str_list += ['graph :\n' + '\n'.join([' ' + line for line in str(self.graph).splitlines()])] + except ValueError: + str_list += ['graph : '] + try: + str_list += ['eventWait :\n' + '\n'.join([' ' + line for line in str(self.eventWait).splitlines()])] + except ValueError: + str_list += ['eventWait : '] + try: + str_list += ['eventRecord :\n' + '\n'.join([' ' + line for line in str(self.eventRecord).splitlines()])] + except ValueError: + str_list += ['eventRecord : '] + try: + str_list += ['extSemSignal :\n' + '\n'.join([' ' + line for line in str(self.extSemSignal).splitlines()])] + except ValueError: + str_list += ['extSemSignal : '] + try: + str_list += ['extSemWait :\n' + '\n'.join([' ' + line for line in str(self.extSemWait).splitlines()])] + except ValueError: + str_list += ['extSemWait : '] + try: + str_list += ['alloc :\n' + '\n'.join([' ' + line for line in str(self.alloc).splitlines()])] + except ValueError: + str_list += ['alloc : '] + try: + str_list += ['free :\n' + '\n'.join([' ' + line for line in str(self.free).splitlines()])] + except ValueError: + str_list += ['free : '] + try: + str_list += ['conditional :\n' + '\n'.join([' ' + line for line in str(self.conditional).splitlines()])] + except ValueError: + str_list += ['conditional : '] + try: + str_list += ['reserved2 : ' + str(self.reserved2)] + except ValueError: + str_list += ['reserved2 : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaGraphNodeType: + return None + return _dict_cudaGraphNodeType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaGraphNodeType): + self._pvt_ptr[0].type = type.value + @property + def reserved0(self): + return self._pvt_ptr[0].reserved0 + @reserved0.setter + def reserved0(self, reserved0): + self._pvt_ptr[0].reserved0 = reserved0 + @property + def reserved1(self): + return self._pvt_ptr[0].reserved1 + @reserved1.setter + def reserved1(self, reserved1): + self._pvt_ptr[0].reserved1 = reserved1 + @property + def kernel(self): + return self._kernel + @kernel.setter + def kernel(self, kernel not None : cudaKernelNodeParamsV2): + string.memcpy(&self._pvt_ptr[0].kernel, kernel.getPtr(), sizeof(self._pvt_ptr[0].kernel)) + @property + def memcpy(self): + return self._memcpy + @memcpy.setter + def memcpy(self, memcpy not None : cudaMemcpyNodeParams): + string.memcpy(&self._pvt_ptr[0].memcpy, memcpy.getPtr(), sizeof(self._pvt_ptr[0].memcpy)) + @property + def memset(self): + return self._memset + @memset.setter + def memset(self, memset not None : cudaMemsetParamsV2): + string.memcpy(&self._pvt_ptr[0].memset, memset.getPtr(), sizeof(self._pvt_ptr[0].memset)) + @property + def host(self): + return self._host + @host.setter + def host(self, host not None : cudaHostNodeParamsV2): + string.memcpy(&self._pvt_ptr[0].host, host.getPtr(), sizeof(self._pvt_ptr[0].host)) + @property + def graph(self): + return self._graph + @graph.setter + def graph(self, graph not None : cudaChildGraphNodeParams): + string.memcpy(&self._pvt_ptr[0].graph, graph.getPtr(), sizeof(self._pvt_ptr[0].graph)) + @property + def eventWait(self): + return self._eventWait + @eventWait.setter + def eventWait(self, eventWait not None : cudaEventWaitNodeParams): + string.memcpy(&self._pvt_ptr[0].eventWait, eventWait.getPtr(), sizeof(self._pvt_ptr[0].eventWait)) + @property + def eventRecord(self): + return self._eventRecord + @eventRecord.setter + def eventRecord(self, eventRecord not None : cudaEventRecordNodeParams): + string.memcpy(&self._pvt_ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._pvt_ptr[0].eventRecord)) + @property + def extSemSignal(self): + return self._extSemSignal + @extSemSignal.setter + def extSemSignal(self, extSemSignal not None : cudaExternalSemaphoreSignalNodeParamsV2): + string.memcpy(&self._pvt_ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._pvt_ptr[0].extSemSignal)) + @property + def extSemWait(self): + return self._extSemWait + @extSemWait.setter + def extSemWait(self, extSemWait not None : cudaExternalSemaphoreWaitNodeParamsV2): + string.memcpy(&self._pvt_ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._pvt_ptr[0].extSemWait)) + @property + def alloc(self): + return self._alloc + @alloc.setter + def alloc(self, alloc not None : cudaMemAllocNodeParamsV2): + string.memcpy(&self._pvt_ptr[0].alloc, alloc.getPtr(), sizeof(self._pvt_ptr[0].alloc)) + @property + def free(self): + return self._free + @free.setter + def free(self, free not None : cudaMemFreeNodeParams): + string.memcpy(&self._pvt_ptr[0].free, free.getPtr(), sizeof(self._pvt_ptr[0].free)) + @property + def conditional(self): + return self._conditional + @conditional.setter + def conditional(self, conditional not None : cudaConditionalNodeParams): + string.memcpy(&self._pvt_ptr[0].conditional, conditional.getPtr(), sizeof(self._pvt_ptr[0].conditional)) + @property + def reserved2(self): + return self._pvt_ptr[0].reserved2 + @reserved2.setter + def reserved2(self, long long reserved2): + self._pvt_ptr[0].reserved2 = reserved2 + +cdef class cudaGraphEdgeData_st: + """ + Optional annotation for edges in a CUDA graph. Note, all edges + implicitly have annotations and default to a zero-initialized value + if not specified. A zero-initialized struct indicates a standard + full serialization of two nodes with memory visibility. + + Attributes + ---------- + from_port : bytes + This indicates when the dependency is triggered from the upstream + node on the edge. The meaning is specfic to the node type. A value + of 0 in all cases means full completion of the upstream node, with + memory visibility to the downstream node or portion thereof + (indicated by `to_port`). Only kernel nodes define non-zero + ports. A kernel node can use the following output port types: + cudaGraphKernelNodePortDefault, + cudaGraphKernelNodePortProgrammatic, or + cudaGraphKernelNodePortLaunchCompletion. + to_port : bytes + This indicates what portion of the downstream node is dependent on + the upstream node or portion thereof (indicated by `from_port`). + The meaning is specific to the node type. A value of 0 in all cases + means the entirety of the downstream node is dependent on the + upstream work. Currently no node types define non-zero ports. + Accordingly, this field must be set to zero. + type : bytes + This should be populated with a value from + ::cudaGraphDependencyType. (It is typed as char due to compiler- + specific layout of bitfields.) See ::cudaGraphDependencyType. + reserved : bytes + These bytes are unused and must be zeroed. This ensures + compatibility if additional fields are added in the future. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['from_port : ' + str(self.from_port)] + except ValueError: + str_list += ['from_port : '] + try: + str_list += ['to_port : ' + str(self.to_port)] + except ValueError: + str_list += ['to_port : '] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def from_port(self): + return self._pvt_ptr[0].from_port + @from_port.setter + def from_port(self, unsigned char from_port): + self._pvt_ptr[0].from_port = from_port + @property + def to_port(self): + return self._pvt_ptr[0].to_port + @to_port.setter + def to_port(self, unsigned char to_port): + self._pvt_ptr[0].to_port = to_port + @property + def type(self): + return self._pvt_ptr[0].type + @type.setter + def type(self, unsigned char type): + self._pvt_ptr[0].type = type + @property + def reserved(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 5) + @reserved.setter + def reserved(self, reserved): + if len(reserved) != 5: + raise ValueError("reserved length must be 5, is " + str(len(reserved))) + for i, b in enumerate(reserved): + self._pvt_ptr[0].reserved[i] = b + +cdef class cudaGraphInstantiateParams_st: + """ + Graph instantiation parameters + + Attributes + ---------- + flags : unsigned long long + Instantiation flags + uploadStream : cudaStream_t + Upload stream + errNode_out : cudaGraphNode_t + The node which caused instantiation to fail, if any + result_out : cudaGraphInstantiateResult + Whether instantiation was successful. If it failed, the reason why + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._uploadStream = cudaStream_t(_ptr=&self._pvt_ptr[0].uploadStream) + self._errNode_out = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errNode_out) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['uploadStream : ' + str(self.uploadStream)] + except ValueError: + str_list += ['uploadStream : '] + try: + str_list += ['errNode_out : ' + str(self.errNode_out)] + except ValueError: + str_list += ['errNode_out : '] + try: + str_list += ['result_out : ' + str(self.result_out)] + except ValueError: + str_list += ['result_out : '] + return '\n'.join(str_list) + else: + return '' + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned long long flags): + self._pvt_ptr[0].flags = flags + @property + def uploadStream(self): + return self._uploadStream + @uploadStream.setter + def uploadStream(self, uploadStream): + cdef cyruntime.cudaStream_t cyuploadStream + if uploadStream is None: + cyuploadStream = 0 + elif isinstance(uploadStream, (cudaStream_t,driver.CUstream)): + puploadStream = int(uploadStream) + cyuploadStream = puploadStream + else: + puploadStream = int(cudaStream_t(uploadStream)) + cyuploadStream = puploadStream + self._uploadStream._pvt_ptr[0] = cyuploadStream + @property + def errNode_out(self): + return self._errNode_out + @errNode_out.setter + def errNode_out(self, errNode_out): + cdef cyruntime.cudaGraphNode_t cyerrNode_out + if errNode_out is None: + cyerrNode_out = 0 + elif isinstance(errNode_out, (cudaGraphNode_t,driver.CUgraphNode)): + perrNode_out = int(errNode_out) + cyerrNode_out = perrNode_out + else: + perrNode_out = int(cudaGraphNode_t(errNode_out)) + cyerrNode_out = perrNode_out + self._errNode_out._pvt_ptr[0] = cyerrNode_out + @property + def result_out(self): + if self._pvt_ptr[0].result_out not in _dict_cudaGraphInstantiateResult: + return None + return _dict_cudaGraphInstantiateResult[self._pvt_ptr[0].result_out] + @result_out.setter + def result_out(self, result_out not None : cudaGraphInstantiateResult): + self._pvt_ptr[0].result_out = result_out.value + +cdef class cudaGraphExecUpdateResultInfo_st: + """ + Result information returned by cudaGraphExecUpdate + + Attributes + ---------- + result : cudaGraphExecUpdateResult + Gives more specific detail when a cuda graph update fails. + errorNode : cudaGraphNode_t + The "to node" of the error edge when the topologies do not match. + The error node when the error is associated with a specific node. + NULL when the error is generic. + errorFromNode : cudaGraphNode_t + The from node of error edge when the topologies do not match. + Otherwise NULL. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._errorNode = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errorNode) + self._errorFromNode = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errorFromNode) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['result : ' + str(self.result)] + except ValueError: + str_list += ['result : '] + try: + str_list += ['errorNode : ' + str(self.errorNode)] + except ValueError: + str_list += ['errorNode : '] + try: + str_list += ['errorFromNode : ' + str(self.errorFromNode)] + except ValueError: + str_list += ['errorFromNode : '] + return '\n'.join(str_list) + else: + return '' + @property + def result(self): + if self._pvt_ptr[0].result not in _dict_cudaGraphExecUpdateResult: + return None + return _dict_cudaGraphExecUpdateResult[self._pvt_ptr[0].result] + @result.setter + def result(self, result not None : cudaGraphExecUpdateResult): + self._pvt_ptr[0].result = result.value + @property + def errorNode(self): + return self._errorNode + @errorNode.setter + def errorNode(self, errorNode): + cdef cyruntime.cudaGraphNode_t cyerrorNode + if errorNode is None: + cyerrorNode = 0 + elif isinstance(errorNode, (cudaGraphNode_t,driver.CUgraphNode)): + perrorNode = int(errorNode) + cyerrorNode = perrorNode + else: + perrorNode = int(cudaGraphNode_t(errorNode)) + cyerrorNode = perrorNode + self._errorNode._pvt_ptr[0] = cyerrorNode + @property + def errorFromNode(self): + return self._errorFromNode + @errorFromNode.setter + def errorFromNode(self, errorFromNode): + cdef cyruntime.cudaGraphNode_t cyerrorFromNode + if errorFromNode is None: + cyerrorFromNode = 0 + elif isinstance(errorFromNode, (cudaGraphNode_t,driver.CUgraphNode)): + perrorFromNode = int(errorFromNode) + cyerrorFromNode = perrorFromNode + else: + perrorFromNode = int(cudaGraphNode_t(errorFromNode)) + cyerrorFromNode = perrorFromNode + self._errorFromNode._pvt_ptr[0] = cyerrorFromNode + +cdef class anon_struct21: + """ + Attributes + ---------- + pValue : Any + + offset : size_t + + size : size_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].updateData.param + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['pValue : ' + hex(self.pValue)] + except ValueError: + str_list += ['pValue : '] + try: + str_list += ['offset : ' + str(self.offset)] + except ValueError: + str_list += ['offset : '] + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + return '\n'.join(str_list) + else: + return '' + @property + def pValue(self): + return self._pvt_ptr[0].updateData.param.pValue + @pValue.setter + def pValue(self, pValue): + _cpValue = _HelperInputVoidPtr(pValue) + self._pvt_ptr[0].updateData.param.pValue = _cpValue.cptr + @property + def offset(self): + return self._pvt_ptr[0].updateData.param.offset + @offset.setter + def offset(self, size_t offset): + self._pvt_ptr[0].updateData.param.offset = offset + @property + def size(self): + return self._pvt_ptr[0].updateData.param.size + @size.setter + def size(self, size_t size): + self._pvt_ptr[0].updateData.param.size = size + +cdef class anon_union9: + """ + Attributes + ---------- + gridDim : dim3 + + param : anon_struct21 + + isEnabled : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].updateData.gridDim) + self._param = anon_struct21(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].updateData + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] + except ValueError: + str_list += ['gridDim : '] + try: + str_list += ['param :\n' + '\n'.join([' ' + line for line in str(self.param).splitlines()])] + except ValueError: + str_list += ['param : '] + try: + str_list += ['isEnabled : ' + str(self.isEnabled)] + except ValueError: + str_list += ['isEnabled : '] + return '\n'.join(str_list) + else: + return '' + @property + def gridDim(self): + return self._gridDim + @gridDim.setter + def gridDim(self, gridDim not None : dim3): + string.memcpy(&self._pvt_ptr[0].updateData.gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].updateData.gridDim)) + @property + def param(self): + return self._param + @param.setter + def param(self, param not None : anon_struct21): + string.memcpy(&self._pvt_ptr[0].updateData.param, param.getPtr(), sizeof(self._pvt_ptr[0].updateData.param)) + @property + def isEnabled(self): + return self._pvt_ptr[0].updateData.isEnabled + @isEnabled.setter + def isEnabled(self, unsigned int isEnabled): + self._pvt_ptr[0].updateData.isEnabled = isEnabled + +cdef class cudaGraphKernelNodeUpdate: + """ + Struct to specify a single node update to pass as part of a larger + array to ::cudaGraphKernelNodeUpdatesApply + + Attributes + ---------- + node : cudaGraphDeviceNode_t + Node to update + field : cudaGraphKernelNodeField + Which type of update to apply. Determines how updateData is + interpreted + updateData : anon_union9 + Update data to apply. Which field is used depends on field's value + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaGraphKernelNodeUpdate)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._node = cudaGraphDeviceNode_t(_ptr=&self._pvt_ptr[0].node) + self._updateData = anon_union9(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['node : ' + str(self.node)] + except ValueError: + str_list += ['node : '] + try: + str_list += ['field : ' + str(self.field)] + except ValueError: + str_list += ['field : '] + try: + str_list += ['updateData :\n' + '\n'.join([' ' + line for line in str(self.updateData).splitlines()])] + except ValueError: + str_list += ['updateData : '] + return '\n'.join(str_list) + else: + return '' + @property + def node(self): + return self._node + @node.setter + def node(self, node): + cdef cyruntime.cudaGraphDeviceNode_t cynode + if node is None: + cynode = 0 + elif isinstance(node, (cudaGraphDeviceNode_t,)): + pnode = int(node) + cynode = pnode + else: + pnode = int(cudaGraphDeviceNode_t(node)) + cynode = pnode + self._node._pvt_ptr[0] = cynode + @property + def field(self): + if self._pvt_ptr[0].field not in _dict_cudaGraphKernelNodeField: + return None + return _dict_cudaGraphKernelNodeField[self._pvt_ptr[0].field] + @field.setter + def field(self, field not None : cudaGraphKernelNodeField): + self._pvt_ptr[0].field = field.value + @property + def updateData(self): + return self._updateData + @updateData.setter + def updateData(self, updateData not None : anon_union9): + string.memcpy(&self._pvt_ptr[0].updateData, updateData.getPtr(), sizeof(self._pvt_ptr[0].updateData)) + +cdef class cudaLaunchMemSyncDomainMap_st: + """ + Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By + default, kernels are launched in domain 0. Kernel launched with + cudaLaunchMemSyncDomainRemote will have a different domain ID. User + may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for + a specific stream / graph node / kernel launch. See + cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available + through cudaDevAttrMemSyncDomainCount. + + Attributes + ---------- + default_ : bytes + The default domain ID to use for designated kernels + remote : bytes + The remote domain ID to use for designated kernels + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['default_ : ' + str(self.default_)] + except ValueError: + str_list += ['default_ : '] + try: + str_list += ['remote : ' + str(self.remote)] + except ValueError: + str_list += ['remote : '] + return '\n'.join(str_list) + else: + return '' + @property + def default_(self): + return self._pvt_ptr[0].default_ + @default_.setter + def default_(self, unsigned char default_): + self._pvt_ptr[0].default_ = default_ + @property + def remote(self): + return self._pvt_ptr[0].remote + @remote.setter + def remote(self, unsigned char remote): + self._pvt_ptr[0].remote = remote + +cdef class anon_struct22: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].clusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].clusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].clusterDim.x = x + @property + def y(self): + return self._pvt_ptr[0].clusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].clusterDim.y = y + @property + def z(self): + return self._pvt_ptr[0].clusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].clusterDim.z = z + +cdef class anon_struct23: + """ + Attributes + ---------- + event : cudaEvent_t + + flags : int + + triggerAtBlockStart : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].programmaticEvent.event) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].programmaticEvent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + try: + str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)] + except ValueError: + str_list += ['triggerAtBlockStart : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cyruntime.cudaEvent_t cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + @property + def flags(self): + return self._pvt_ptr[0].programmaticEvent.flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].programmaticEvent.flags = flags + @property + def triggerAtBlockStart(self): + return self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart + @triggerAtBlockStart.setter + def triggerAtBlockStart(self, int triggerAtBlockStart): + self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + +cdef class anon_struct24: + """ + Attributes + ---------- + x : unsigned int + + y : unsigned int + + z : unsigned int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].preferredClusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + return '\n'.join(str_list) + else: + return '' + @property + def x(self): + return self._pvt_ptr[0].preferredClusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].preferredClusterDim.x = x + @property + def y(self): + return self._pvt_ptr[0].preferredClusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].preferredClusterDim.y = y + @property + def z(self): + return self._pvt_ptr[0].preferredClusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].preferredClusterDim.z = z + +cdef class anon_struct25: + """ + Attributes + ---------- + event : cudaEvent_t + + flags : int + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].launchCompletionEvent.event) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].launchCompletionEvent + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['event : ' + str(self.event)] + except ValueError: + str_list += ['event : '] + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + return '\n'.join(str_list) + else: + return '' + @property + def event(self): + return self._event + @event.setter + def event(self, event): + cdef cyruntime.cudaEvent_t cyevent + if event is None: + cyevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + cyevent = pevent + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + self._event._pvt_ptr[0] = cyevent + @property + def flags(self): + return self._pvt_ptr[0].launchCompletionEvent.flags + @flags.setter + def flags(self, int flags): + self._pvt_ptr[0].launchCompletionEvent.flags = flags + +cdef class anon_struct26: + """ + Attributes + ---------- + deviceUpdatable : int + + devNode : cudaGraphDeviceNode_t + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._devNode = cudaGraphDeviceNode_t(_ptr=&self._pvt_ptr[0].deviceUpdatableKernelNode.devNode) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].deviceUpdatableKernelNode + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['deviceUpdatable : ' + str(self.deviceUpdatable)] + except ValueError: + str_list += ['deviceUpdatable : '] + try: + str_list += ['devNode : ' + str(self.devNode)] + except ValueError: + str_list += ['devNode : '] + return '\n'.join(str_list) + else: + return '' + @property + def deviceUpdatable(self): + return self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable + @deviceUpdatable.setter + def deviceUpdatable(self, int deviceUpdatable): + self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + @property + def devNode(self): + return self._devNode + @devNode.setter + def devNode(self, devNode): + cdef cyruntime.cudaGraphDeviceNode_t cydevNode + if devNode is None: + cydevNode = 0 + elif isinstance(devNode, (cudaGraphDeviceNode_t,)): + pdevNode = int(devNode) + cydevNode = pdevNode + else: + pdevNode = int(cudaGraphDeviceNode_t(devNode)) + cydevNode = pdevNode + self._devNode._pvt_ptr[0] = cydevNode + +cdef class cudaLaunchAttributeValue: + """ + Launch attributes union; used as value field of + ::cudaLaunchAttribute + + Attributes + ---------- + pad : bytes + + accessPolicyWindow : cudaAccessPolicyWindow + Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + cooperative : int + Value of launch attribute cudaLaunchAttributeCooperative. Nonzero + indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + syncPolicy : cudaSynchronizationPolicy + Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. + ::cudaSynchronizationPolicy for work queued up in this stream. + clusterDim : anon_struct22 + Value of launch attribute cudaLaunchAttributeClusterDimension that + represents the desired cluster dimensions for the kernel. Opaque + type with the following fields: - `x` - The X dimension of the + cluster, in blocks. Must be a divisor of the grid X dimension. - + `y` - The Y dimension of the cluster, in blocks. Must be a divisor + of the grid Y dimension. - `z` - The Z dimension of the cluster, + in blocks. Must be a divisor of the grid Z dimension. + clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy + Value of launch attribute + cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster + scheduling policy preference for the kernel. + programmaticStreamSerializationAllowed : int + Value of launch attribute + cudaLaunchAttributeProgrammaticStreamSerialization. + programmaticEvent : anon_struct23 + Value of launch attribute cudaLaunchAttributeProgrammaticEvent with + the following fields: - `cudaEvent_t` event - Event to fire when + all blocks trigger it. - `int` flags; - Event record flags, see + cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. + - `int` triggerAtBlockStart - If this is set to non-0, each block + launch will automatically trigger the event. + priority : int + Value of launch attribute cudaLaunchAttributePriority. Execution + priority of the kernel. + memSyncDomainMap : cudaLaunchMemSyncDomainMap + Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See + ::cudaLaunchMemSyncDomainMap. + memSyncDomain : cudaLaunchMemSyncDomain + Value of launch attribute cudaLaunchAttributeMemSyncDomain. See + cudaLaunchMemSyncDomain. + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + launchCompletionEvent : anon_struct25 + Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent + with the following fields: - `cudaEvent_t` event - Event to fire + when the last block launches. - `int` flags - Event record + flags, see cudaEventRecordWithFlags. Does not accept + cudaEventRecordExternal. + deviceUpdatableKernelNode : anon_struct26 + Value of launch attribute + cudaLaunchAttributeDeviceUpdatableKernelNode with the following + fields: - `int` deviceUpdatable - Whether or not the resulting + kernel node should be device-updatable. - + `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the + various device-side update functions. + sharedMemCarveout : unsigned int + Value of launch attribute + cudaLaunchAttributePreferredSharedMemoryCarveout. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._accessPolicyWindow = cudaAccessPolicyWindow(_ptr=&self._pvt_ptr[0].accessPolicyWindow) + self._clusterDim = anon_struct22(_ptr=self._pvt_ptr) + self._programmaticEvent = anon_struct23(_ptr=self._pvt_ptr) + self._memSyncDomainMap = cudaLaunchMemSyncDomainMap(_ptr=&self._pvt_ptr[0].memSyncDomainMap) + self._preferredClusterDim = anon_struct24(_ptr=self._pvt_ptr) + self._launchCompletionEvent = anon_struct25(_ptr=self._pvt_ptr) + self._deviceUpdatableKernelNode = anon_struct26(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['pad : ' + str(self.pad)] + except ValueError: + str_list += ['pad : '] + try: + str_list += ['accessPolicyWindow :\n' + '\n'.join([' ' + line for line in str(self.accessPolicyWindow).splitlines()])] + except ValueError: + str_list += ['accessPolicyWindow : '] + try: + str_list += ['cooperative : ' + str(self.cooperative)] + except ValueError: + str_list += ['cooperative : '] + try: + str_list += ['syncPolicy : ' + str(self.syncPolicy)] + except ValueError: + str_list += ['syncPolicy : '] + try: + str_list += ['clusterDim :\n' + '\n'.join([' ' + line for line in str(self.clusterDim).splitlines()])] + except ValueError: + str_list += ['clusterDim : '] + try: + str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] + except ValueError: + str_list += ['clusterSchedulingPolicyPreference : '] + try: + str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)] + except ValueError: + str_list += ['programmaticStreamSerializationAllowed : '] + try: + str_list += ['programmaticEvent :\n' + '\n'.join([' ' + line for line in str(self.programmaticEvent).splitlines()])] + except ValueError: + str_list += ['programmaticEvent : '] + try: + str_list += ['priority : ' + str(self.priority)] + except ValueError: + str_list += ['priority : '] + try: + str_list += ['memSyncDomainMap :\n' + '\n'.join([' ' + line for line in str(self.memSyncDomainMap).splitlines()])] + except ValueError: + str_list += ['memSyncDomainMap : '] + try: + str_list += ['memSyncDomain : ' + str(self.memSyncDomain)] + except ValueError: + str_list += ['memSyncDomain : '] + try: + str_list += ['preferredClusterDim :\n' + '\n'.join([' ' + line for line in str(self.preferredClusterDim).splitlines()])] + except ValueError: + str_list += ['preferredClusterDim : '] + try: + str_list += ['launchCompletionEvent :\n' + '\n'.join([' ' + line for line in str(self.launchCompletionEvent).splitlines()])] + except ValueError: + str_list += ['launchCompletionEvent : '] + try: + str_list += ['deviceUpdatableKernelNode :\n' + '\n'.join([' ' + line for line in str(self.deviceUpdatableKernelNode).splitlines()])] + except ValueError: + str_list += ['deviceUpdatableKernelNode : '] + try: + str_list += ['sharedMemCarveout : ' + str(self.sharedMemCarveout)] + except ValueError: + str_list += ['sharedMemCarveout : '] + return '\n'.join(str_list) + else: + return '' + @property + def pad(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].pad, 64) + @pad.setter + def pad(self, pad): + if len(pad) != 64: + raise ValueError("pad length must be 64, is " + str(len(pad))) + if CHAR_MIN == 0: + for i, b in enumerate(pad): + if b < 0 and b > -129: + b = b + 256 + self._pvt_ptr[0].pad[i] = b + else: + for i, b in enumerate(pad): + if b > 127 and b < 256: + b = b - 256 + self._pvt_ptr[0].pad[i] = b + @property + def accessPolicyWindow(self): + return self._accessPolicyWindow + @accessPolicyWindow.setter + def accessPolicyWindow(self, accessPolicyWindow not None : cudaAccessPolicyWindow): + string.memcpy(&self._pvt_ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._pvt_ptr[0].accessPolicyWindow)) + @property + def cooperative(self): + return self._pvt_ptr[0].cooperative + @cooperative.setter + def cooperative(self, int cooperative): + self._pvt_ptr[0].cooperative = cooperative + @property + def syncPolicy(self): + if self._pvt_ptr[0].syncPolicy not in _dict_cudaSynchronizationPolicy: + return None + return _dict_cudaSynchronizationPolicy[self._pvt_ptr[0].syncPolicy] + @syncPolicy.setter + def syncPolicy(self, syncPolicy not None : cudaSynchronizationPolicy): + self._pvt_ptr[0].syncPolicy = syncPolicy.value + @property + def clusterDim(self): + return self._clusterDim + @clusterDim.setter + def clusterDim(self, clusterDim not None : anon_struct22): + string.memcpy(&self._pvt_ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._pvt_ptr[0].clusterDim)) + @property + def clusterSchedulingPolicyPreference(self): + if self._pvt_ptr[0].clusterSchedulingPolicyPreference not in _dict_cudaClusterSchedulingPolicy: + return None + return _dict_cudaClusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] + @clusterSchedulingPolicyPreference.setter + def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : cudaClusterSchedulingPolicy): + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + @property + def programmaticStreamSerializationAllowed(self): + return self._pvt_ptr[0].programmaticStreamSerializationAllowed + @programmaticStreamSerializationAllowed.setter + def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed): + self._pvt_ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + @property + def programmaticEvent(self): + return self._programmaticEvent + @programmaticEvent.setter + def programmaticEvent(self, programmaticEvent not None : anon_struct23): + string.memcpy(&self._pvt_ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._pvt_ptr[0].programmaticEvent)) + @property + def priority(self): + return self._pvt_ptr[0].priority + @priority.setter + def priority(self, int priority): + self._pvt_ptr[0].priority = priority + @property + def memSyncDomainMap(self): + return self._memSyncDomainMap + @memSyncDomainMap.setter + def memSyncDomainMap(self, memSyncDomainMap not None : cudaLaunchMemSyncDomainMap): + string.memcpy(&self._pvt_ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._pvt_ptr[0].memSyncDomainMap)) + @property + def memSyncDomain(self): + if self._pvt_ptr[0].memSyncDomain not in _dict_cudaLaunchMemSyncDomain: + return None + return _dict_cudaLaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] + @memSyncDomain.setter + def memSyncDomain(self, memSyncDomain not None : cudaLaunchMemSyncDomain): + self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + @property + def preferredClusterDim(self): + return self._preferredClusterDim + @preferredClusterDim.setter + def preferredClusterDim(self, preferredClusterDim not None : anon_struct24): + string.memcpy(&self._pvt_ptr[0].preferredClusterDim, preferredClusterDim.getPtr(), sizeof(self._pvt_ptr[0].preferredClusterDim)) + @property + def launchCompletionEvent(self): + return self._launchCompletionEvent + @launchCompletionEvent.setter + def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct25): + string.memcpy(&self._pvt_ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._pvt_ptr[0].launchCompletionEvent)) + @property + def deviceUpdatableKernelNode(self): + return self._deviceUpdatableKernelNode + @deviceUpdatableKernelNode.setter + def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct26): + string.memcpy(&self._pvt_ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._pvt_ptr[0].deviceUpdatableKernelNode)) + @property + def sharedMemCarveout(self): + return self._pvt_ptr[0].sharedMemCarveout + @sharedMemCarveout.setter + def sharedMemCarveout(self, unsigned int sharedMemCarveout): + self._pvt_ptr[0].sharedMemCarveout = sharedMemCarveout + +cdef class cudaLaunchAttribute_st: + """ + Launch attribute + + Attributes + ---------- + id : cudaLaunchAttributeID + Attribute to set + val : cudaLaunchAttributeValue + Value of the attribute + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._val = cudaLaunchAttributeValue(_ptr=&self._pvt_ptr[0].val) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['id : ' + str(self.id)] + except ValueError: + str_list += ['id : '] + try: + str_list += ['val :\n' + '\n'.join([' ' + line for line in str(self.val).splitlines()])] + except ValueError: + str_list += ['val : '] + return '\n'.join(str_list) + else: + return '' + @property + def id(self): + if self._pvt_ptr[0].id not in _dict_cudaLaunchAttributeID: + return None + return _dict_cudaLaunchAttributeID[self._pvt_ptr[0].id] + @id.setter + def id(self, id not None : cudaLaunchAttributeID): + self._pvt_ptr[0].id = id.value + @property + def val(self): + return self._val + @val.setter + def val(self, val not None : cudaLaunchAttributeValue): + string.memcpy(&self._pvt_ptr[0].val, val.getPtr(), sizeof(self._pvt_ptr[0].val)) + +cdef class anon_struct27: + """ + Attributes + ---------- + bytesOverBudget : unsigned long long + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].info.overBudget + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['bytesOverBudget : ' + str(self.bytesOverBudget)] + except ValueError: + str_list += ['bytesOverBudget : '] + return '\n'.join(str_list) + else: + return '' + @property + def bytesOverBudget(self): + return self._pvt_ptr[0].info.overBudget.bytesOverBudget + @bytesOverBudget.setter + def bytesOverBudget(self, unsigned long long bytesOverBudget): + self._pvt_ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + +cdef class anon_union10: + """ + Attributes + ---------- + overBudget : anon_struct27 + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + self._overBudget = anon_struct27(_ptr=self._pvt_ptr) + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].info + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['overBudget :\n' + '\n'.join([' ' + line for line in str(self.overBudget).splitlines()])] + except ValueError: + str_list += ['overBudget : '] + return '\n'.join(str_list) + else: + return '' + @property + def overBudget(self): + return self._overBudget + @overBudget.setter + def overBudget(self, overBudget not None : anon_struct27): + string.memcpy(&self._pvt_ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._pvt_ptr[0].info.overBudget)) + +cdef class cudaAsyncNotificationInfo: + """ + Information describing an async notification event + + Attributes + ---------- + type : cudaAsyncNotificationType + The type of notification being sent + info : anon_union10 + Information about the notification. `typename` must be checked in + order to interpret this field. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaAsyncNotificationInfo)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._info = anon_union10(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + try: + str_list += ['info :\n' + '\n'.join([' ' + line for line in str(self.info).splitlines()])] + except ValueError: + str_list += ['info : '] + return '\n'.join(str_list) + else: + return '' + @property + def type(self): + if self._pvt_ptr[0].type not in _dict_cudaAsyncNotificationType: + return None + return _dict_cudaAsyncNotificationType[self._pvt_ptr[0].type] + @type.setter + def type(self, type not None : cudaAsyncNotificationType): + self._pvt_ptr[0].type = type.value + @property + def info(self): + return self._info + @info.setter + def info(self, info not None : anon_union10): + string.memcpy(&self._pvt_ptr[0].info, info.getPtr(), sizeof(self._pvt_ptr[0].info)) + +cdef class cudaTextureDesc: + """ + CUDA texture descriptor + + Attributes + ---------- + addressMode : list[cudaTextureAddressMode] + Texture address mode for up to 3 dimensions + filterMode : cudaTextureFilterMode + Texture filter mode + readMode : cudaTextureReadMode + Texture read mode + sRGB : int + Perform sRGB->linear conversion during texture read + borderColor : list[float] + Texture Border Color + normalizedCoords : int + Indicates whether texture reads are normalized or not + maxAnisotropy : unsigned int + Limit to the anisotropy ratio + mipmapFilterMode : cudaTextureFilterMode + Mipmap filter mode + mipmapLevelBias : float + Offset applied to the supplied mipmap level + minMipmapLevelClamp : float + Lower end of the mipmap level range to clamp access to + maxMipmapLevelClamp : float + Upper end of the mipmap level range to clamp access to + disableTrilinearOptimization : int + Disable any trilinear filtering optimizations. + seamlessCubemap : int + Enable seamless cube map filtering. + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['addressMode : ' + str(self.addressMode)] + except ValueError: + str_list += ['addressMode : '] + try: + str_list += ['filterMode : ' + str(self.filterMode)] + except ValueError: + str_list += ['filterMode : '] + try: + str_list += ['readMode : ' + str(self.readMode)] + except ValueError: + str_list += ['readMode : '] + try: + str_list += ['sRGB : ' + str(self.sRGB)] + except ValueError: + str_list += ['sRGB : '] + try: + str_list += ['borderColor : ' + str(self.borderColor)] + except ValueError: + str_list += ['borderColor : '] + try: + str_list += ['normalizedCoords : ' + str(self.normalizedCoords)] + except ValueError: + str_list += ['normalizedCoords : '] + try: + str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)] + except ValueError: + str_list += ['maxAnisotropy : '] + try: + str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)] + except ValueError: + str_list += ['mipmapFilterMode : '] + try: + str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)] + except ValueError: + str_list += ['mipmapLevelBias : '] + try: + str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)] + except ValueError: + str_list += ['minMipmapLevelClamp : '] + try: + str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)] + except ValueError: + str_list += ['maxMipmapLevelClamp : '] + try: + str_list += ['disableTrilinearOptimization : ' + str(self.disableTrilinearOptimization)] + except ValueError: + str_list += ['disableTrilinearOptimization : '] + try: + str_list += ['seamlessCubemap : ' + str(self.seamlessCubemap)] + except ValueError: + str_list += ['seamlessCubemap : '] + return '\n'.join(str_list) + else: + return '' + @property + def addressMode(self): + return [_dict_cudaTextureAddressMode[_x] if _x in _dict_cudaTextureAddressMode else None for _x in list(self._pvt_ptr[0].addressMode)] + @addressMode.setter + def addressMode(self, addressMode): + self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + @property + def filterMode(self): + if self._pvt_ptr[0].filterMode not in _dict_cudaTextureFilterMode: + return None + return _dict_cudaTextureFilterMode[self._pvt_ptr[0].filterMode] + @filterMode.setter + def filterMode(self, filterMode not None : cudaTextureFilterMode): + self._pvt_ptr[0].filterMode = filterMode.value + @property + def readMode(self): + if self._pvt_ptr[0].readMode not in _dict_cudaTextureReadMode: + return None + return _dict_cudaTextureReadMode[self._pvt_ptr[0].readMode] + @readMode.setter + def readMode(self, readMode not None : cudaTextureReadMode): + self._pvt_ptr[0].readMode = readMode.value + @property + def sRGB(self): + return self._pvt_ptr[0].sRGB + @sRGB.setter + def sRGB(self, int sRGB): + self._pvt_ptr[0].sRGB = sRGB + @property + def borderColor(self): + return self._pvt_ptr[0].borderColor + @borderColor.setter + def borderColor(self, borderColor): + self._pvt_ptr[0].borderColor = borderColor + @property + def normalizedCoords(self): + return self._pvt_ptr[0].normalizedCoords + @normalizedCoords.setter + def normalizedCoords(self, int normalizedCoords): + self._pvt_ptr[0].normalizedCoords = normalizedCoords + @property + def maxAnisotropy(self): + return self._pvt_ptr[0].maxAnisotropy + @maxAnisotropy.setter + def maxAnisotropy(self, unsigned int maxAnisotropy): + self._pvt_ptr[0].maxAnisotropy = maxAnisotropy + @property + def mipmapFilterMode(self): + if self._pvt_ptr[0].mipmapFilterMode not in _dict_cudaTextureFilterMode: + return None + return _dict_cudaTextureFilterMode[self._pvt_ptr[0].mipmapFilterMode] + @mipmapFilterMode.setter + def mipmapFilterMode(self, mipmapFilterMode not None : cudaTextureFilterMode): + self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + @property + def mipmapLevelBias(self): + return self._pvt_ptr[0].mipmapLevelBias + @mipmapLevelBias.setter + def mipmapLevelBias(self, float mipmapLevelBias): + self._pvt_ptr[0].mipmapLevelBias = mipmapLevelBias + @property + def minMipmapLevelClamp(self): + return self._pvt_ptr[0].minMipmapLevelClamp + @minMipmapLevelClamp.setter + def minMipmapLevelClamp(self, float minMipmapLevelClamp): + self._pvt_ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + @property + def maxMipmapLevelClamp(self): + return self._pvt_ptr[0].maxMipmapLevelClamp + @maxMipmapLevelClamp.setter + def maxMipmapLevelClamp(self, float maxMipmapLevelClamp): + self._pvt_ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + @property + def disableTrilinearOptimization(self): + return self._pvt_ptr[0].disableTrilinearOptimization + @disableTrilinearOptimization.setter + def disableTrilinearOptimization(self, int disableTrilinearOptimization): + self._pvt_ptr[0].disableTrilinearOptimization = disableTrilinearOptimization + @property + def seamlessCubemap(self): + return self._pvt_ptr[0].seamlessCubemap + @seamlessCubemap.setter + def seamlessCubemap(self, int seamlessCubemap): + self._pvt_ptr[0].seamlessCubemap = seamlessCubemap + +cdef class cudaEglPlaneDesc_st: + """ + CUDA EGL Plane Descriptor - structure defining each plane of a CUDA + EGLFrame + + Attributes + ---------- + width : unsigned int + Width of plane + height : unsigned int + Height of plane + depth : unsigned int + Depth of plane + pitch : unsigned int + Pitch of plane + numChannels : unsigned int + Number of channels for the plane + channelDesc : cudaChannelFormatDesc + Channel Format Descriptor + reserved : list[unsigned int] + Reserved for future use + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._channelDesc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].channelDesc) + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + try: + str_list += ['pitch : ' + str(self.pitch)] + except ValueError: + str_list += ['pitch : '] + try: + str_list += ['numChannels : ' + str(self.numChannels)] + except ValueError: + str_list += ['numChannels : '] + try: + str_list += ['channelDesc :\n' + '\n'.join([' ' + line for line in str(self.channelDesc).splitlines()])] + except ValueError: + str_list += ['channelDesc : '] + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + return '\n'.join(str_list) + else: + return '' + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, unsigned int width): + self._pvt_ptr[0].width = width + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, unsigned int height): + self._pvt_ptr[0].height = height + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, unsigned int depth): + self._pvt_ptr[0].depth = depth + @property + def pitch(self): + return self._pvt_ptr[0].pitch + @pitch.setter + def pitch(self, unsigned int pitch): + self._pvt_ptr[0].pitch = pitch + @property + def numChannels(self): + return self._pvt_ptr[0].numChannels + @numChannels.setter + def numChannels(self, unsigned int numChannels): + self._pvt_ptr[0].numChannels = numChannels + @property + def channelDesc(self): + return self._channelDesc + @channelDesc.setter + def channelDesc(self, channelDesc not None : cudaChannelFormatDesc): + string.memcpy(&self._pvt_ptr[0].channelDesc, channelDesc.getPtr(), sizeof(self._pvt_ptr[0].channelDesc)) + @property + def reserved(self): + return self._pvt_ptr[0].reserved + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + +cdef class anon_union11: + """ + Attributes + ---------- + pArray : list[cudaArray_t] + + pPitch : list[cudaPitchedPtr] + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].frame + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['pArray : ' + str(self.pArray)] + except ValueError: + str_list += ['pArray : '] + try: + str_list += ['pPitch :\n' + '\n'.join([' ' + line for line in str(self.pPitch).splitlines()])] + except ValueError: + str_list += ['pPitch : '] + return '\n'.join(str_list) + else: + return '' + @property + def pArray(self): + return [cudaArray_t(init_value=_pArray) for _pArray in self._pvt_ptr[0].frame.pArray] + @pArray.setter + def pArray(self, pArray : list[cudaArray_t]): + if len(pArray) != 3: + raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray)) + pArray = [int(_pArray) for _pArray in pArray] + for _idx, _pArray in enumerate(pArray): + self._pvt_ptr[0].frame.pArray[_idx] = _pArray + + @property + def pPitch(self): + out_pPitch = [cudaPitchedPtr() for _pPitch in self._pvt_ptr[0].frame.pPitch] + for _idx in range(len(out_pPitch)): + string.memcpy(out_pPitch[_idx].getPtr(), &self._pvt_ptr[0].frame.pPitch[_idx], sizeof(cyruntime.cudaPitchedPtr)) + return out_pPitch + @pPitch.setter + def pPitch(self, pPitch : list[cudaPitchedPtr]): + if len(pPitch) != 3: + raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch)) + for _idx in range(len(pPitch)): + string.memcpy(&self._pvt_ptr[0].frame.pPitch[_idx], pPitch[_idx].getPtr(), sizeof(cyruntime.cudaPitchedPtr)) + + +cdef class cudaEglFrame_st: + """ + CUDA EGLFrame Descriptor - structure defining one frame of EGL. + Each frame may contain one or more planes depending on whether the + surface is Multiplanar or not. Each plane of EGLFrame is + represented by cudaEglPlaneDesc which is defined as: + typedefstructcudaEglPlaneDesc_st unsignedintwidth; + unsignedintheight; unsignedintdepth; unsignedintpitch; + unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; + unsignedintreserved[4]; cudaEglPlaneDesc; + + Attributes + ---------- + frame : anon_union11 + + planeDesc : list[cudaEglPlaneDesc] + CUDA EGL Plane Descriptor cudaEglPlaneDesc + planeCount : unsigned int + Number of planes + frameType : cudaEglFrameType + Array or Pitch + eglColorFormat : cudaEglColorFormat + CUDA EGL Color Format + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaEglFrame_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + self._frame = anon_union11(_ptr=self._pvt_ptr) + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + try: + str_list += ['frame :\n' + '\n'.join([' ' + line for line in str(self.frame).splitlines()])] + except ValueError: + str_list += ['frame : '] + try: + str_list += ['planeDesc :\n' + '\n'.join([' ' + line for line in str(self.planeDesc).splitlines()])] + except ValueError: + str_list += ['planeDesc : '] + try: + str_list += ['planeCount : ' + str(self.planeCount)] + except ValueError: + str_list += ['planeCount : '] + try: + str_list += ['frameType : ' + str(self.frameType)] + except ValueError: + str_list += ['frameType : '] + try: + str_list += ['eglColorFormat : ' + str(self.eglColorFormat)] + except ValueError: + str_list += ['eglColorFormat : '] + return '\n'.join(str_list) + else: + return '' + @property + def frame(self): + return self._frame + @frame.setter + def frame(self, frame not None : anon_union11): + string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) + @property + def planeDesc(self): + out_planeDesc = [cudaEglPlaneDesc() for _planeDesc in self._pvt_ptr[0].planeDesc] + for _idx in range(len(out_planeDesc)): + string.memcpy(out_planeDesc[_idx].getPtr(), &self._pvt_ptr[0].planeDesc[_idx], sizeof(cyruntime.cudaEglPlaneDesc)) + return out_planeDesc + @planeDesc.setter + def planeDesc(self, planeDesc : list[cudaEglPlaneDesc]): + if len(planeDesc) != 3: + raise IndexError('not enough values found during array assignment, expected 3, got', len(planeDesc)) + for _idx in range(len(planeDesc)): + string.memcpy(&self._pvt_ptr[0].planeDesc[_idx], planeDesc[_idx].getPtr(), sizeof(cyruntime.cudaEglPlaneDesc)) + + @property + def planeCount(self): + return self._pvt_ptr[0].planeCount + @planeCount.setter + def planeCount(self, unsigned int planeCount): + self._pvt_ptr[0].planeCount = planeCount + @property + def frameType(self): + if self._pvt_ptr[0].frameType not in _dict_cudaEglFrameType: + return None + return _dict_cudaEglFrameType[self._pvt_ptr[0].frameType] + @frameType.setter + def frameType(self, frameType not None : cudaEglFrameType): + self._pvt_ptr[0].frameType = frameType.value + @property + def eglColorFormat(self): + if self._pvt_ptr[0].eglColorFormat not in _dict_cudaEglColorFormat: + return None + return _dict_cudaEglColorFormat[self._pvt_ptr[0].eglColorFormat] + @eglColorFormat.setter + def eglColorFormat(self, eglColorFormat not None : cudaEglColorFormat): + self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + +cdef class cudaGraphConditionalHandle: + """ + + CUDA handle for conditional graph nodes + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaSurfaceObject_t: + """ + + An opaque value that represents a CUDA Surface object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class cudaTextureObject_t: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class GLenum: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class GLuint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class EGLint: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpDevice: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpGetProcAddress: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpVideoSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +cdef class VdpOutputSurface: + """ + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + if init_value: + self._pvt_ptr[0] = init_value + def __dealloc__(self): + pass + def __repr__(self): + return '' + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + +@cython.embedsignature(True) +def cudaDeviceReset(): + """ Destroy all allocations and reset all state on the current device in the current process. + + Explicitly destroys and cleans up all resources associated with the + current device in the current process. It is the caller's + responsibility to ensure that the resources are not accessed or passed + in subsequent API calls and doing so will result in undefined behavior. + These resources include CUDA types :py:obj:`~.cudaStream_t`, + :py:obj:`~.cudaEvent_t`, :py:obj:`~.cudaArray_t`, + :py:obj:`~.cudaMipmappedArray_t`, :py:obj:`~.cudaPitchedPtr`, + :py:obj:`~.cudaTextureObject_t`, :py:obj:`~.cudaSurfaceObject_t`, + :py:obj:`~.textureReference`, :py:obj:`~.surfaceReference`, + :py:obj:`~.cudaExternalMemory_t`, :py:obj:`~.cudaExternalSemaphore_t` + and :py:obj:`~.cudaGraphicsResource_t`. These resources also include + memory allocations by :py:obj:`~.cudaMalloc`, + :py:obj:`~.cudaMallocHost`, :py:obj:`~.cudaMallocManaged` and + :py:obj:`~.cudaMallocPitch`. Any subsequent API call to this device + will reinitialize the device. + + Note that this function will reset the device immediately. It is the + caller's responsibility to ensure that the device is not being accessed + by any other host threads from the process when this function is + called. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + + See Also + -------- + :py:obj:`~.cudaDeviceSynchronize` + + Notes + ----- + :py:obj:`~.cudaDeviceReset()` will not destroy memory allocations by :py:obj:`~.cudaMallocAsync()` and :py:obj:`~.cudaMallocFromPoolAsync()`. These memory allocations need to be destroyed explicitly. + + If a non-primary :py:obj:`~.CUcontext` is current to the thread, :py:obj:`~.cudaDeviceReset()` will destroy only the internal CUDA RT state for that :py:obj:`~.CUcontext`. + """ + with nogil: + err = cyruntime.cudaDeviceReset() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceSynchronize(): + """ Wait for compute device to finish. + + Blocks until the device has completed all preceding requested tasks. + :py:obj:`~.cudaDeviceSynchronize()` returns an error if one of the + preceding tasks has failed. If the + :py:obj:`~.cudaDeviceScheduleBlockingSync` flag was set for this + device, the host thread will block until the device has finished its + work. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + + See Also + -------- + :py:obj:`~.cudaDeviceReset`, :py:obj:`~.cuCtxSynchronize` + """ + with nogil: + err = cyruntime.cudaDeviceSynchronize() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceSetLimit(limit not None : cudaLimit, size_t value): + """ Set resource limits. + + Setting `limit` to `value` is a request by the application to update + the current limit maintained by the device. The driver is free to + modify the requested value to meet h/w requirements (this could be + clamping to minimum or maximum values, rounding up to nearest element + size, etc). The application can use :py:obj:`~.cudaDeviceGetLimit()` to + find out exactly what the limit has been set to. + + Setting each :py:obj:`~.cudaLimit` has its own specific restrictions, + so each is discussed here. + + - :py:obj:`~.cudaLimitStackSize` controls the stack size in bytes of + each GPU thread. + + - :py:obj:`~.cudaLimitPrintfFifoSize` controls the size in bytes of the + shared FIFO used by the :py:obj:`~.printf()` device system call. + Setting :py:obj:`~.cudaLimitPrintfFifoSize` must not be performed + after launching any kernel that uses the :py:obj:`~.printf()` device + system call - in such case :py:obj:`~.cudaErrorInvalidValue` will be + returned. + + - :py:obj:`~.cudaLimitMallocHeapSize` controls the size in bytes of the + heap used by the :py:obj:`~.malloc()` and :py:obj:`~.free()` device + system calls. Setting :py:obj:`~.cudaLimitMallocHeapSize` must not be + performed after launching any kernel that uses the + :py:obj:`~.malloc()` or :py:obj:`~.free()` device system calls - in + such case :py:obj:`~.cudaErrorInvalidValue` will be returned. + + - :py:obj:`~.cudaLimitDevRuntimeSyncDepth` controls the maximum nesting + depth of a grid at which a thread can safely call + :py:obj:`~.cudaDeviceSynchronize()`. Setting this limit must be + performed before any launch of a kernel that uses the device runtime + and calls :py:obj:`~.cudaDeviceSynchronize()` above the default sync + depth, two levels of grids. Calls to + :py:obj:`~.cudaDeviceSynchronize()` will fail with error code + :py:obj:`~.cudaErrorSyncDepthExceeded` if the limitation is violated. + This limit can be set smaller than the default or up the maximum + launch depth of 24. When setting this limit, keep in mind that + additional levels of sync depth require the runtime to reserve large + amounts of device memory which can no longer be used for user + allocations. If these reservations of device memory fail, + :py:obj:`~.cudaDeviceSetLimit` will return + :py:obj:`~.cudaErrorMemoryAllocation`, and the limit can be reset to + a lower value. This limit is only applicable to devices of compute + capability < 9.0. Attempting to set this limit on devices of other + compute capability will results in error + :py:obj:`~.cudaErrorUnsupportedLimit` being returned. + + - :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` controls the + maximum number of outstanding device runtime launches that can be + made from the current device. A grid is outstanding from the point of + launch up until the grid is known to have been completed. Device + runtime launches which violate this limitation fail and return + :py:obj:`~.cudaErrorLaunchPendingCountExceeded` when + :py:obj:`~.cudaGetLastError()` is called after launch. If more + pending launches than the default (2048 launches) are needed for a + module using the device runtime, this limit can be increased. Keep in + mind that being able to sustain additional pending launches will + require the runtime to reserve larger amounts of device memory + upfront which can no longer be used for allocations. If these + reservations fail, :py:obj:`~.cudaDeviceSetLimit` will return + :py:obj:`~.cudaErrorMemoryAllocation`, and the limit can be reset to + a lower value. This limit is only applicable to devices of compute + capability 3.5 and higher. Attempting to set this limit on devices of + compute capability less than 3.5 will result in the error + :py:obj:`~.cudaErrorUnsupportedLimit` being returned. + + - :py:obj:`~.cudaLimitMaxL2FetchGranularity` controls the L2 cache + fetch granularity. Values can range from 0B to 128B. This is purely a + performance hint and it can be ignored or clamped depending on the + platform. + + - :py:obj:`~.cudaLimitPersistingL2CacheSize` controls size in bytes + available for persisting L2 cache. This is purely a performance hint + and it can be ignored or clamped depending on the platform. + + Parameters + ---------- + limit : :py:obj:`~.cudaLimit` + Limit to set + value : size_t + Size of limit + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorUnsupportedLimit`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + + See Also + -------- + :py:obj:`~.cudaDeviceGetLimit`, :py:obj:`~.cuCtxSetLimit` + """ + cdef cyruntime.cudaLimit cylimit = limit.value + with nogil: + err = cyruntime.cudaDeviceSetLimit(cylimit, value) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetLimit(limit not None : cudaLimit): + """ Return resource limits. + + Returns in `*pValue` the current size of `limit`. The following + :py:obj:`~.cudaLimit` values are supported. + + - :py:obj:`~.cudaLimitStackSize` is the stack size in bytes of each GPU + thread. + + - :py:obj:`~.cudaLimitPrintfFifoSize` is the size in bytes of the + shared FIFO used by the :py:obj:`~.printf()` device system call. + + - :py:obj:`~.cudaLimitMallocHeapSize` is the size in bytes of the heap + used by the :py:obj:`~.malloc()` and :py:obj:`~.free()` device system + calls. + + - :py:obj:`~.cudaLimitDevRuntimeSyncDepth` is the maximum grid depth at + which a thread can isssue the device runtime call + :py:obj:`~.cudaDeviceSynchronize()` to wait on child grid launches to + complete. This functionality is removed for devices of compute + capability >= 9.0, and hence will return error + :py:obj:`~.cudaErrorUnsupportedLimit` on such devices. + + - :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` is the maximum + number of outstanding device runtime launches. + + - :py:obj:`~.cudaLimitMaxL2FetchGranularity` is the L2 cache fetch + granularity. + + - :py:obj:`~.cudaLimitPersistingL2CacheSize` is the persisting L2 cache + size in bytes. + + Parameters + ---------- + limit : :py:obj:`~.cudaLimit` + Limit to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorUnsupportedLimit`, :py:obj:`~.cudaErrorInvalidValue` + pValue : int + Returned size of the limit + + See Also + -------- + :py:obj:`~.cudaDeviceSetLimit`, :py:obj:`~.cuCtxGetLimit` + """ + cdef size_t pValue = 0 + cdef cyruntime.cudaLimit cylimit = limit.value + with nogil: + err = cyruntime.cudaDeviceGetLimit(&pValue, cylimit) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pValue) + +@cython.embedsignature(True) +def cudaDeviceGetTexture1DLinearMaxWidth(fmtDesc : Optional[cudaChannelFormatDesc], int device): + """ Returns the maximum number of elements allocatable in a 1D linear texture for a given element size. + + Returns in `maxWidthInElements` the maximum number of elements + allocatable in a 1D linear texture for given format descriptor + `fmtDesc`. + + Parameters + ---------- + fmtDesc : :py:obj:`~.cudaChannelFormatDesc` + Texture format description. + None : int + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorUnsupportedLimit`, :py:obj:`~.cudaErrorInvalidValue` + maxWidthInElements : int + Returns maximum number of texture elements allocatable for given + `fmtDesc`. + + See Also + -------- + :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth` + """ + cdef size_t maxWidthInElements = 0 + cdef cyruntime.cudaChannelFormatDesc* cyfmtDesc_ptr = fmtDesc._pvt_ptr if fmtDesc is not None else NULL + with nogil: + err = cyruntime.cudaDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cyfmtDesc_ptr, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], maxWidthInElements) + +@cython.embedsignature(True) +def cudaDeviceGetCacheConfig(): + """ Returns the preferred cache configuration for the current device. + + On devices where the L1 cache and shared memory use the same hardware + resources, this returns through `pCacheConfig` the preferred cache + configuration for the current device. This is only a preference. The + runtime will use the requested configuration if possible, but it is + free to choose a different configuration if required to execute + functions. + + This will return a `pCacheConfig` of + :py:obj:`~.cudaFuncCachePreferNone` on devices where the size of the L1 + cache and shared memory are fixed. + + The supported cache configurations are: + + - :py:obj:`~.cudaFuncCachePreferNone`: no preference for shared memory + or L1 (default) + + - :py:obj:`~.cudaFuncCachePreferShared`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.cudaFuncCachePreferL1`: prefer larger L1 cache and smaller + shared memory + + - :py:obj:`~.cudaFuncCachePreferEqual`: prefer equal size L1 cache and + shared memory + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + pCacheConfig : :py:obj:`~.cudaFuncCache` + Returned cache configuration + + See Also + -------- + :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cudaFuncSetCacheConfig (C API)`, cudaFuncSetCacheConfig (C++ API), :py:obj:`~.cuCtxGetCacheConfig` + """ + cdef cyruntime.cudaFuncCache pCacheConfig + with nogil: + err = cyruntime.cudaDeviceGetCacheConfig(&pCacheConfig) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaFuncCache(pCacheConfig)) + +@cython.embedsignature(True) +def cudaDeviceGetStreamPriorityRange(): + """ Returns numerical values that correspond to the least and greatest stream priorities. + + Returns in `*leastPriority` and `*greatestPriority` the numerical + values that correspond to the least and greatest stream priorities + respectively. Stream priorities follow a convention where lower numbers + imply greater priorities. The range of meaningful stream priorities is + given by [`*greatestPriority`, `*leastPriority`]. If the user attempts + to create a stream with a priority value that is outside the the + meaningful range as specified by this API, the priority is + automatically clamped down or up to either `*leastPriority` or + `*greatestPriority` respectively. See + :py:obj:`~.cudaStreamCreateWithPriority` for details on creating a + priority stream. A NULL may be passed in for `*leastPriority` or + `*greatestPriority` if the value is not desired. + + This function will return '0' in both `*leastPriority` and + `*greatestPriority` if the current context's device does not support + stream priorities (see :py:obj:`~.cudaDeviceGetAttribute`). + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + leastPriority : int + Pointer to an int in which the numerical value for least stream + priority is returned + greatestPriority : int + Pointer to an int in which the numerical value for greatest stream + priority is returned + + See Also + -------- + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange` + """ + cdef int leastPriority = 0 + cdef int greatestPriority = 0 + with nogil: + err = cyruntime.cudaDeviceGetStreamPriorityRange(&leastPriority, &greatestPriority) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], leastPriority, greatestPriority) + +@cython.embedsignature(True) +def cudaDeviceSetCacheConfig(cacheConfig not None : cudaFuncCache): + """ Sets the preferred cache configuration for the current device. + + On devices where the L1 cache and shared memory use the same hardware + resources, this sets through `cacheConfig` the preferred cache + configuration for the current device. This is only a preference. The + runtime will use the requested configuration if possible, but it is + free to choose a different configuration if required to execute the + function. Any function preference set via + :py:obj:`~.cudaFuncSetCacheConfig (C API)` or cudaFuncSetCacheConfig + (C++ API) will be preferred over this device-wide setting. Setting the + device-wide cache configuration to :py:obj:`~.cudaFuncCachePreferNone` + will cause subsequent kernel launches to prefer to not change the cache + configuration unless required to launch the kernel. + + This setting does nothing on devices where the size of the L1 cache and + shared memory are fixed. + + Launching a kernel with a different preference than the most recent + preference setting may insert a device-side synchronization point. + + The supported cache configurations are: + + - :py:obj:`~.cudaFuncCachePreferNone`: no preference for shared memory + or L1 (default) + + - :py:obj:`~.cudaFuncCachePreferShared`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.cudaFuncCachePreferL1`: prefer larger L1 cache and smaller + shared memory + + - :py:obj:`~.cudaFuncCachePreferEqual`: prefer equal size L1 cache and + shared memory + + Parameters + ---------- + cacheConfig : :py:obj:`~.cudaFuncCache` + Requested cache configuration + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + + See Also + -------- + :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaFuncSetCacheConfig (C API)`, cudaFuncSetCacheConfig (C++ API), :py:obj:`~.cuCtxSetCacheConfig` + """ + cdef cyruntime.cudaFuncCache cycacheConfig = cacheConfig.value + with nogil: + err = cyruntime.cudaDeviceSetCacheConfig(cycacheConfig) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetByPCIBusId(char* pciBusId): + """ Returns a handle to a compute device. + + Returns in `*device` a device ordinal given a PCI bus ID string. + + where `domain`, `bus`, `device`, and `function` are all hexadecimal + values + + Parameters + ---------- + pciBusId : bytes + String in one of the following forms: + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + device : int + Returned device ordinal + + See Also + -------- + :py:obj:`~.cudaDeviceGetPCIBusId`, :py:obj:`~.cuDeviceGetByPCIBusId` + """ + cdef int device = 0 + with nogil: + err = cyruntime.cudaDeviceGetByPCIBusId(&device, pciBusId) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], device) + +@cython.embedsignature(True) +def cudaDeviceGetPCIBusId(int length, int device): + """ Returns a PCI Bus Id string for the device. + + Returns an ASCII string identifying the device `dev` in the NULL- + terminated string pointed to by `pciBusId`. `length` specifies the + maximum length of the string that may be returned. + + where `domain`, `bus`, `device`, and `function` are all hexadecimal + values. pciBusId should be large enough to store 13 characters + including the NULL-terminator. + + Parameters + ---------- + length : int + Maximum length of string to store in `name` + device : int + Device to get identifier string for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + pciBusId : bytes + Returned identifier string for the device in the following format + + See Also + -------- + :py:obj:`~.cudaDeviceGetByPCIBusId`, :py:obj:`~.cuDeviceGetPCIBusId` + """ + pypciBusId = b" " * length + cdef char* pciBusId = pypciBusId + with nogil: + err = cyruntime.cudaDeviceGetPCIBusId(pciBusId, length, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pypciBusId) + +@cython.embedsignature(True) +def cudaIpcGetEventHandle(event): + """ Gets an interprocess handle for a previously allocated event. + + Takes as input a previously allocated event. This event must have been + created with the :py:obj:`~.cudaEventInterprocess` and + :py:obj:`~.cudaEventDisableTiming` flags set. This opaque handle may be + copied into other processes and opened with + :py:obj:`~.cudaIpcOpenEventHandle` to allow efficient hardware + synchronization between GPU work in different processes. + + After the event has been been opened in the importing process, + :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventSynchronize`, + :py:obj:`~.cudaStreamWaitEvent` and :py:obj:`~.cudaEventQuery` may be + used in either process. Performing operations on the imported event + after the exported event has been freed with + :py:obj:`~.cudaEventDestroy` will result in undefined behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cudaDeviceGetAttribute` with + :py:obj:`~.cudaDevAttrIpcEventSupport` + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event allocated with :py:obj:`~.cudaEventInterprocess` and + :py:obj:`~.cudaEventDisableTiming` flags. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorMapBufferObjectFailed`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + handle : :py:obj:`~.cudaIpcEventHandle_t` + Pointer to a user allocated cudaIpcEventHandle in which to return + the opaque event handle + + See Also + -------- + :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaIpcOpenEventHandle`, :py:obj:`~.cudaIpcGetMemHandle`, :py:obj:`~.cudaIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`, :py:obj:`~.cuIpcGetEventHandle` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cudaIpcEventHandle_t handle = cudaIpcEventHandle_t() + with nogil: + err = cyruntime.cudaIpcGetEventHandle(handle._pvt_ptr, cyevent) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], handle) + +@cython.embedsignature(True) +def cudaIpcOpenEventHandle(handle not None : cudaIpcEventHandle_t): + """ Opens an interprocess event handle for use in the current process. + + Opens an interprocess event handle exported from another process with + :py:obj:`~.cudaIpcGetEventHandle`. This function returns a + :py:obj:`~.cudaEvent_t` that behaves like a locally created event with + the :py:obj:`~.cudaEventDisableTiming` flag specified. This event must + be freed with :py:obj:`~.cudaEventDestroy`. + + Performing operations on the imported event after the exported event + has been freed with :py:obj:`~.cudaEventDestroy` will result in + undefined behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cudaDeviceGetAttribute` with + :py:obj:`~.cudaDevAttrIpcEventSupport` + + Parameters + ---------- + handle : :py:obj:`~.cudaIpcEventHandle_t` + Interprocess handle to open + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMapBufferObjectFailed`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorDeviceUninitialized` + event : :py:obj:`~.cudaEvent_t` + Returns the imported event + + See Also + -------- + :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaIpcGetEventHandle`, :py:obj:`~.cudaIpcGetMemHandle`, :py:obj:`~.cudaIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`, :py:obj:`~.cuIpcOpenEventHandle` + """ + cdef cudaEvent_t event = cudaEvent_t() + with nogil: + err = cyruntime.cudaIpcOpenEventHandle(event._pvt_ptr, handle._pvt_ptr[0]) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], event) + +@cython.embedsignature(True) +def cudaIpcGetMemHandle(devPtr): + """ Gets an interprocess memory handle for an existing device memory allocation. + + Takes a pointer to the base of an existing device memory allocation + created with :py:obj:`~.cudaMalloc` and exports it for use in another + process. This is a lightweight operation and may be called multiple + times on an allocation without adverse effects. + + If a region of memory is freed with :py:obj:`~.cudaFree` and a + subsequent call to :py:obj:`~.cudaMalloc` returns memory with the same + device address, :py:obj:`~.cudaIpcGetMemHandle` will return a unique + handle for the new memory. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cudaDeviceGetAttribute` with + :py:obj:`~.cudaDevAttrIpcEventSupport` + + Parameters + ---------- + devPtr : Any + Base pointer to previously allocated device memory + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorMapBufferObjectFailed`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + handle : :py:obj:`~.cudaIpcMemHandle_t` + Pointer to user allocated :py:obj:`~.cudaIpcMemHandle` to return + the handle in. + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaIpcGetEventHandle`, :py:obj:`~.cudaIpcOpenEventHandle`, :py:obj:`~.cudaIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`, :py:obj:`~.cuIpcGetMemHandle` + """ + cdef cudaIpcMemHandle_t handle = cudaIpcMemHandle_t() + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaIpcGetMemHandle(handle._pvt_ptr, cydevPtr_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], handle) + +@cython.embedsignature(True) +def cudaIpcOpenMemHandle(handle not None : cudaIpcMemHandle_t, unsigned int flags): + """ Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process. + + Maps memory exported from another process with + :py:obj:`~.cudaIpcGetMemHandle` into the current device address space. + For contexts on different devices :py:obj:`~.cudaIpcOpenMemHandle` can + attempt to enable peer access between the devices as if the user called + :py:obj:`~.cudaDeviceEnablePeerAccess`. This behavior is controlled by + the :py:obj:`~.cudaIpcMemLazyEnablePeerAccess` flag. + :py:obj:`~.cudaDeviceCanAccessPeer` can determine if a mapping is + possible. + + :py:obj:`~.cudaIpcOpenMemHandle` can open handles to devices that may + not be visible in the process calling the API. + + Contexts that may open :py:obj:`~.cudaIpcMemHandles` are restricted in + the following way. :py:obj:`~.cudaIpcMemHandles` from each device in a + given process may only be opened by one context per device per other + process. + + If the memory handle has already been opened by the current context, + the reference count on the handle is incremented by 1 and the existing + device pointer is returned. + + Memory returned from :py:obj:`~.cudaIpcOpenMemHandle` must be freed + with :py:obj:`~.cudaIpcCloseMemHandle`. + + Calling :py:obj:`~.cudaFree` on an exported memory region before + calling :py:obj:`~.cudaIpcCloseMemHandle` in the importing context will + result in undefined behavior. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cudaDeviceGetAttribute` with + :py:obj:`~.cudaDevAttrIpcEventSupport` + + Parameters + ---------- + handle : :py:obj:`~.cudaIpcMemHandle_t` + :py:obj:`~.cudaIpcMemHandle` to open + flags : unsigned int + Flags for this operation. Must be specified as + :py:obj:`~.cudaIpcMemLazyEnablePeerAccess` + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMapBufferObjectFailed`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorDeviceUninitialized`, :py:obj:`~.cudaErrorTooManyPeers`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + devPtr : Any + Returned device pointer + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaIpcGetEventHandle`, :py:obj:`~.cudaIpcOpenEventHandle`, :py:obj:`~.cudaIpcGetMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`, :py:obj:`~.cudaDeviceEnablePeerAccess`, :py:obj:`~.cudaDeviceCanAccessPeer`, :py:obj:`~.cuIpcOpenMemHandle` + + Notes + ----- + No guarantees are made about the address returned in `*devPtr`. + In particular, multiple processes may not receive the same address for the same `handle`. + """ + cdef void_ptr devPtr = 0 + with nogil: + err = cyruntime.cudaIpcOpenMemHandle(&devPtr, handle._pvt_ptr[0], flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], devPtr) + +@cython.embedsignature(True) +def cudaIpcCloseMemHandle(devPtr): + """ Attempts to close memory mapped with cudaIpcOpenMemHandle. + + Decrements the reference count of the memory returnd by + :py:obj:`~.cudaIpcOpenMemHandle` by 1. When the reference count reaches + 0, this API unmaps the memory. The original allocation in the exporting + process as well as imported mappings in other processes will be + unaffected. + + Any resources used to enable peer access will be freed if this is the + last mapping using them. + + IPC functionality is restricted to devices with support for unified + addressing on Linux and Windows operating systems. IPC functionality on + Windows is supported for compatibility purposes but not recommended as + it comes with performance cost. Users can test their device for IPC + functionality by calling :py:obj:`~.cudaDeviceGetAttribute` with + :py:obj:`~.cudaDevAttrIpcEventSupport` + + Parameters + ---------- + devPtr : Any + Device pointer returned by :py:obj:`~.cudaIpcOpenMemHandle` + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMapBufferObjectFailed`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaIpcGetEventHandle`, :py:obj:`~.cudaIpcOpenEventHandle`, :py:obj:`~.cudaIpcGetMemHandle`, :py:obj:`~.cudaIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaIpcCloseMemHandle(cydevPtr_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceFlushGPUDirectRDMAWrites(target not None : cudaFlushGPUDirectRDMAWritesTarget, scope not None : cudaFlushGPUDirectRDMAWritesScope): + """ Blocks until remote writes are visible to the specified scope. + + Blocks until remote writes to the target context via mappings created + through GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see + https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are + visible to the specified scope. + + If the scope equals or lies within the scope indicated by + :py:obj:`~.cudaDevAttrGPUDirectRDMAWritesOrdering`, the call will be a + no-op and can be safely omitted for performance. This can be determined + by comparing the numerical values between the two enums, with smaller + scopes having smaller values. + + Users may query support for this API via + :py:obj:`~.cudaDevAttrGPUDirectRDMAFlushWritesOptions`. + + Parameters + ---------- + target : :py:obj:`~.cudaFlushGPUDirectRDMAWritesTarget` + The target of the operation, see cudaFlushGPUDirectRDMAWritesTarget + scope : :py:obj:`~.cudaFlushGPUDirectRDMAWritesScope` + The scope of the operation, see cudaFlushGPUDirectRDMAWritesScope + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotSupported`, + + See Also + -------- + :py:obj:`~.cuFlushGPUDirectRDMAWrites` + """ + cdef cyruntime.cudaFlushGPUDirectRDMAWritesTarget cytarget = target.value + cdef cyruntime.cudaFlushGPUDirectRDMAWritesScope cyscope = scope.value + with nogil: + err = cyruntime.cudaDeviceFlushGPUDirectRDMAWrites(cytarget, cyscope) + return (_dict_cudaError_t[err],) + +ctypedef struct cudaAsyncCallbackData_st: + cyruntime.cudaAsyncCallback callback + void *userData + +ctypedef cudaAsyncCallbackData_st cudaAsyncCallbackData + +@cython.show_performance_hints(False) +cdef void cudaAsyncNotificationCallbackWrapper(cyruntime.cudaAsyncNotificationInfo_t *info, void *data, cyruntime.cudaAsyncCallbackHandle_t handle) nogil: + cdef cudaAsyncCallbackData *cbData = data + with gil: + cbData.callback(info, cbData.userData, handle) + +@cython.embedsignature(True) +def cudaDeviceRegisterAsyncNotification(int device, callbackFunc, userData): + """ Registers a callback function to receive async notifications. + + Registers `callbackFunc` to receive async notifications. + + The `userData` parameter is passed to the callback function at async + notification time. Likewise, `callback` is also passed to the callback + function to distinguish between multiple registered callbacks. + + The callback function being registered should be designed to return + quickly (~10ms). Any long running tasks should be queued for execution + on an application thread. + + Callbacks may not call cudaDeviceRegisterAsyncNotification or + cudaDeviceUnregisterAsyncNotification. Doing so will result in + :py:obj:`~.cudaErrorNotPermitted`. Async notification callbacks execute + in an undefined order and may be serialized. + + Returns in `*callback` a handle representing the registered callback + instance. + + Parameters + ---------- + device : int + The device on which to register the callback + callbackFunc : :py:obj:`~.cudaAsyncCallback` + The function to register as a callback + userData : Any + A generic pointer to user data. This is passed into the callback + function. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorNotSupported` :py:obj:`~.cudaErrorInvalidDevice` :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorNotPermitted` :py:obj:`~.cudaErrorUnknown` + callback : :py:obj:`~.cudaAsyncCallbackHandle_t` + A handle representing the registered callback instance + + See Also + -------- + :py:obj:`~.cudaDeviceUnregisterAsyncNotification` + """ + cdef cyruntime.cudaAsyncCallback cycallbackFunc + if callbackFunc is None: + pcallbackFunc = 0 + elif isinstance(callbackFunc, (cudaAsyncCallback,)): + pcallbackFunc = int(callbackFunc) + else: + pcallbackFunc = int(cudaAsyncCallback(callbackFunc)) + cycallbackFunc = pcallbackFunc + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cudaAsyncCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (cudaError_t.cudaErrorMemoryAllocation, None) + cbData.callback = cycallbackFunc + cbData.userData = cyuserData_ptr + + cdef cudaAsyncCallbackHandle_t callback = cudaAsyncCallbackHandle_t() + with nogil: + err = cyruntime.cudaDeviceRegisterAsyncNotification(device, cudaAsyncNotificationCallbackWrapper, cbData, callback._pvt_ptr) + if err != cyruntime.cudaSuccess: + free(cbData) + else: + m_global._allocated[int(callback)] = cbData + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], callback) + +@cython.embedsignature(True) +def cudaDeviceUnregisterAsyncNotification(int device, callback): + """ Unregisters an async notification callback. + + Unregisters `callback` so that the corresponding callback function will + stop receiving async notifications. + + Parameters + ---------- + device : int + The device from which to remove `callback`. + callback : :py:obj:`~.cudaAsyncCallbackHandle_t` + The callback instance to unregister from receiving async + notifications. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorNotSupported` :py:obj:`~.cudaErrorInvalidDevice` :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorNotPermitted` :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaDeviceRegisterAsyncNotification` + """ + cdef cyruntime.cudaAsyncCallbackHandle_t cycallback + if callback is None: + pcallback = 0 + elif isinstance(callback, (cudaAsyncCallbackHandle_t,)): + pcallback = int(callback) + else: + pcallback = int(cudaAsyncCallbackHandle_t(callback)) + cycallback = pcallback + with nogil: + err = cyruntime.cudaDeviceUnregisterAsyncNotification(device, cycallback) + if err == cyruntime.cudaSuccess: + free(m_global._allocated[pcallback]) + m_global._allocated.erase(pcallback) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetSharedMemConfig(): + """ Returns the shared memory configuration for the current device. + + [Deprecated] + + This function will return in `pConfig` the current size of shared + memory banks on the current device. On devices with configurable shared + memory banks, :py:obj:`~.cudaDeviceSetSharedMemConfig` can be used to + change this setting, so that all subsequent kernel launches will by + default use the new bank size. When + :py:obj:`~.cudaDeviceGetSharedMemConfig` is called on devices without + configurable shared memory, it will return the fixed bank size of the + hardware. + + The returned bank configurations can be either: + + - :py:obj:`~.cudaSharedMemBankSizeFourByte` - shared memory bank width + is four bytes. + + - :py:obj:`~.cudaSharedMemBankSizeEightByte` - shared memory bank width + is eight bytes. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pConfig : :py:obj:`~.cudaSharedMemConfig` + Returned cache configuration + + See Also + -------- + :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaDeviceSetSharedMemConfig`, :py:obj:`~.cudaFuncSetCacheConfig`, :py:obj:`~.cuCtxGetSharedMemConfig` + """ + cdef cyruntime.cudaSharedMemConfig pConfig + with nogil: + err = cyruntime.cudaDeviceGetSharedMemConfig(&pConfig) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaSharedMemConfig(pConfig)) + +@cython.embedsignature(True) +def cudaDeviceSetSharedMemConfig(config not None : cudaSharedMemConfig): + """ Sets the shared memory configuration for the current device. + + [Deprecated] + + On devices with configurable shared memory banks, this function will + set the shared memory bank size which is used for all subsequent kernel + launches. Any per-function setting of shared memory set via + :py:obj:`~.cudaFuncSetSharedMemConfig` will override the device wide + setting. + + Changing the shared memory configuration between launches may introduce + a device side synchronization point. + + Changing the shared memory bank size will not increase shared memory + usage or affect occupancy of kernels, but may have major effects on + performance. Larger bank sizes will allow for greater potential + bandwidth to shared memory, but will change what kinds of accesses to + shared memory will result in bank conflicts. + + This function will do nothing on devices with fixed shared memory bank + size. + + The supported bank configurations are: + + - :py:obj:`~.cudaSharedMemBankSizeDefault`: set bank width the device + default (currently, four bytes) + + - :py:obj:`~.cudaSharedMemBankSizeFourByte`: set shared memory bank + width to be four bytes natively. + + - :py:obj:`~.cudaSharedMemBankSizeEightByte`: set shared memory bank + width to be eight bytes natively. + + Parameters + ---------- + config : :py:obj:`~.cudaSharedMemConfig` + Requested cache configuration + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaDeviceGetSharedMemConfig`, :py:obj:`~.cudaFuncSetCacheConfig`, :py:obj:`~.cuCtxSetSharedMemConfig` + """ + cdef cyruntime.cudaSharedMemConfig cyconfig = config.value + with nogil: + err = cyruntime.cudaDeviceSetSharedMemConfig(cyconfig) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetLastError(): + """ Returns the last error from a runtime call. + + Returns the last error that has been produced by any of the runtime + calls in the same instance of the CUDA Runtime library in the host + thread and resets it to :py:obj:`~.cudaSuccess`. + + Note: Multiple instances of the CUDA Runtime library can be present in + an application when using a library that statically links the CUDA + Runtime. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMissingConfiguration`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorLaunchTimeout`, :py:obj:`~.cudaErrorLaunchOutOfResources`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidConfiguration`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidSymbol`, :py:obj:`~.cudaErrorUnmapBufferObjectFailed`, :py:obj:`~.cudaErrorInvalidDevicePointer`, :py:obj:`~.cudaErrorInvalidTexture`, :py:obj:`~.cudaErrorInvalidTextureBinding`, :py:obj:`~.cudaErrorInvalidChannelDescriptor`, :py:obj:`~.cudaErrorInvalidMemcpyDirection`, :py:obj:`~.cudaErrorInvalidFilterSetting`, :py:obj:`~.cudaErrorInvalidNormSetting`, :py:obj:`~.cudaErrorUnknown`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorInsufficientDriver`, :py:obj:`~.cudaErrorNoDevice`, :py:obj:`~.cudaErrorSetOnActiveProcess`, :py:obj:`~.cudaErrorStartupFailure`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorJitCompilerNotFound`, :py:obj:`~.cudaErrorJitCompilationDisabled` + + See Also + -------- + :py:obj:`~.cudaPeekAtLastError`, :py:obj:`~.cudaGetErrorName`, :py:obj:`~.cudaGetErrorString`, :py:obj:`~.cudaError` + """ + with nogil: + err = cyruntime.cudaGetLastError() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaPeekAtLastError(): + """ Returns the last error from a runtime call. + + Returns the last error that has been produced by any of the runtime + calls in the same instance of the CUDA Runtime library in the host + thread. This call does not reset the error to :py:obj:`~.cudaSuccess` + like :py:obj:`~.cudaGetLastError()`. + + Note: Multiple instances of the CUDA Runtime library can be present in + an application when using a library that statically links the CUDA + Runtime. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMissingConfiguration`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorLaunchTimeout`, :py:obj:`~.cudaErrorLaunchOutOfResources`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidConfiguration`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidSymbol`, :py:obj:`~.cudaErrorUnmapBufferObjectFailed`, :py:obj:`~.cudaErrorInvalidDevicePointer`, :py:obj:`~.cudaErrorInvalidTexture`, :py:obj:`~.cudaErrorInvalidTextureBinding`, :py:obj:`~.cudaErrorInvalidChannelDescriptor`, :py:obj:`~.cudaErrorInvalidMemcpyDirection`, :py:obj:`~.cudaErrorInvalidFilterSetting`, :py:obj:`~.cudaErrorInvalidNormSetting`, :py:obj:`~.cudaErrorUnknown`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorInsufficientDriver`, :py:obj:`~.cudaErrorNoDevice`, :py:obj:`~.cudaErrorSetOnActiveProcess`, :py:obj:`~.cudaErrorStartupFailure`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorJitCompilerNotFound`, :py:obj:`~.cudaErrorJitCompilationDisabled` + + See Also + -------- + :py:obj:`~.cudaGetLastError`, :py:obj:`~.cudaGetErrorName`, :py:obj:`~.cudaGetErrorString`, :py:obj:`~.cudaError` + """ + with nogil: + err = cyruntime.cudaPeekAtLastError() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetErrorName(error not None : cudaError_t): + """ Returns the string representation of an error code enum name. + + Returns a string containing the name of an error code in the enum. If + the error code is not recognized, "unrecognized error code" is + returned. + + Parameters + ---------- + error : :py:obj:`~.cudaError_t` + Error code to convert to string + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + bytes + `char*` pointer to a NULL-terminated string + + See Also + -------- + :py:obj:`~.cudaGetErrorString`, :py:obj:`~.cudaGetLastError`, :py:obj:`~.cudaPeekAtLastError`, :py:obj:`~.cudaError`, :py:obj:`~.cuGetErrorName` + """ + cdef cyruntime.cudaError_t cyerror = error.value + with nogil: + err = cyruntime.cudaGetErrorName(cyerror) + return (cudaError_t.cudaSuccess, err) + +@cython.embedsignature(True) +def cudaGetErrorString(error not None : cudaError_t): + """ Returns the description string for an error code. + + Returns the description string for an error code. If the error code is + not recognized, "unrecognized error code" is returned. + + Parameters + ---------- + error : :py:obj:`~.cudaError_t` + Error code to convert to string + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + bytes + `char*` pointer to a NULL-terminated string + + See Also + -------- + :py:obj:`~.cudaGetErrorName`, :py:obj:`~.cudaGetLastError`, :py:obj:`~.cudaPeekAtLastError`, :py:obj:`~.cudaError`, :py:obj:`~.cuGetErrorString` + """ + cdef cyruntime.cudaError_t cyerror = error.value + with nogil: + err = cyruntime.cudaGetErrorString(cyerror) + return (cudaError_t.cudaSuccess, err) + +@cython.embedsignature(True) +def cudaGetDeviceCount(): + """ Returns the number of compute-capable devices. + + Returns in `*count` the number of devices with compute capability + greater or equal to 2.0 that are available for execution. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + count : int + Returns the number of devices with compute capability greater or + equal to 2.0 + + See Also + -------- + :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuDeviceGetCount` + """ + cdef int count = 0 + with nogil: + err = cyruntime.cudaGetDeviceCount(&count) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], count) + +@cython.embedsignature(True) +def cudaGetDeviceProperties(int device): + """ Returns information about the compute-device. + + Returns in `*prop` the properties of device `dev`. The + :py:obj:`~.cudaDeviceProp` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.name[256]` is an ASCII string identifying the device. + + - :py:obj:`~.uuid` is a 16-byte unique identifier. + + - :py:obj:`~.totalGlobalMem` is the total amount of global memory + available on the device in bytes. + + - :py:obj:`~.sharedMemPerBlock` is the maximum amount of shared memory + available to a thread block in bytes. + + - :py:obj:`~.regsPerBlock` is the maximum number of 32-bit registers + available to a thread block. + + - :py:obj:`~.warpSize` is the warp size in threads. + + - :py:obj:`~.memPitch` is the maximum pitch in bytes allowed by the + memory copy functions that involve memory regions allocated through + :py:obj:`~.cudaMallocPitch()`. + + - :py:obj:`~.maxThreadsPerBlock` is the maximum number of threads per + block. + + - :py:obj:`~.maxThreadsDim[3]` contains the maximum size of each + dimension of a block. + + - :py:obj:`~.maxGridSize[3]` contains the maximum size of each + dimension of a grid. + + - :py:obj:`~.clockRate` is the clock frequency in kilohertz. + + - :py:obj:`~.totalConstMem` is the total amount of constant memory + available on the device in bytes. + + - :py:obj:`~.major`, :py:obj:`~.minor` are the major and minor revision + numbers defining the device's compute capability. + + - :py:obj:`~.textureAlignment` is the alignment requirement; texture + base addresses that are aligned to :py:obj:`~.textureAlignment` bytes + do not need an offset applied to texture fetches. + + - :py:obj:`~.texturePitchAlignment` is the pitch alignment requirement + for 2D texture references that are bound to pitched memory. + + - :py:obj:`~.deviceOverlap` is 1 if the device can concurrently copy + memory between host and device while executing a kernel, or 0 if not. + Deprecated, use instead asyncEngineCount. + + - :py:obj:`~.multiProcessorCount` is the number of multiprocessors on + the device. + + - :py:obj:`~.kernelExecTimeoutEnabled` is 1 if there is a run time + limit for kernels executed on the device, or 0 if not. + + - :py:obj:`~.integrated` is 1 if the device is an integrated + (motherboard) GPU and 0 if it is a discrete (card) component. + + - :py:obj:`~.canMapHostMemory` is 1 if the device can map host memory + into the CUDA address space for use with + :py:obj:`~.cudaHostAlloc()`/:py:obj:`~.cudaHostGetDevicePointer()`, + or 0 if not. + + - :py:obj:`~.computeMode` is the compute mode that the device is + currently in. Available modes are as follows: + + - cudaComputeModeDefault: Default mode - Device is not restricted and + multiple threads can use :py:obj:`~.cudaSetDevice()` with this + device. + + - cudaComputeModeProhibited: Compute-prohibited mode - No threads can + use :py:obj:`~.cudaSetDevice()` with this device. + + - cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - + Many threads in one process will be able to use + :py:obj:`~.cudaSetDevice()` with this device. When an occupied + exclusive mode device is chosen with :py:obj:`~.cudaSetDevice`, all + subsequent non-device management runtime functions will return + :py:obj:`~.cudaErrorDevicesUnavailable`. + + - :py:obj:`~.maxTexture1D` is the maximum 1D texture size. + + - :py:obj:`~.maxTexture1DMipmap` is the maximum 1D mipmapped texture + texture size. + + - :py:obj:`~.maxTexture1DLinear` is the maximum 1D texture size for + textures bound to linear memory. + + - :py:obj:`~.maxTexture2D[2]` contains the maximum 2D texture + dimensions. + + - :py:obj:`~.maxTexture2DMipmap[2]` contains the maximum 2D mipmapped + texture dimensions. + + - :py:obj:`~.maxTexture2DLinear[3]` contains the maximum 2D texture + dimensions for 2D textures bound to pitch linear memory. + + - :py:obj:`~.maxTexture2DGather[2]` contains the maximum 2D texture + dimensions if texture gather operations have to be performed. + + - :py:obj:`~.maxTexture3D[3]` contains the maximum 3D texture + dimensions. + + - :py:obj:`~.maxTexture3DAlt[3]` contains the maximum alternate 3D + texture dimensions. + + - :py:obj:`~.maxTextureCubemap` is the maximum cubemap texture width or + height. + + - :py:obj:`~.maxTexture1DLayered[2]` contains the maximum 1D layered + texture dimensions. + + - :py:obj:`~.maxTexture2DLayered[3]` contains the maximum 2D layered + texture dimensions. + + - :py:obj:`~.maxTextureCubemapLayered[2]` contains the maximum cubemap + layered texture dimensions. + + - :py:obj:`~.maxSurface1D` is the maximum 1D surface size. + + - :py:obj:`~.maxSurface2D[2]` contains the maximum 2D surface + dimensions. + + - :py:obj:`~.maxSurface3D[3]` contains the maximum 3D surface + dimensions. + + - :py:obj:`~.maxSurface1DLayered[2]` contains the maximum 1D layered + surface dimensions. + + - :py:obj:`~.maxSurface2DLayered[3]` contains the maximum 2D layered + surface dimensions. + + - :py:obj:`~.maxSurfaceCubemap` is the maximum cubemap surface width or + height. + + - :py:obj:`~.maxSurfaceCubemapLayered[2]` contains the maximum cubemap + layered surface dimensions. + + - :py:obj:`~.surfaceAlignment` specifies the alignment requirements for + surfaces. + + - :py:obj:`~.concurrentKernels` is 1 if the device supports executing + multiple kernels within the same context simultaneously, or 0 if not. + It is not guaranteed that multiple kernels will be resident on the + device concurrently so this feature should not be relied upon for + correctness. + + - :py:obj:`~.ECCEnabled` is 1 if the device has ECC support turned on, + or 0 if not. + + - :py:obj:`~.pciBusID` is the PCI bus identifier of the device. + + - :py:obj:`~.pciDeviceID` is the PCI device (sometimes called slot) + identifier of the device. + + - :py:obj:`~.pciDomainID` is the PCI domain identifier of the device. + + - :py:obj:`~.tccDriver` is 1 if the device is using a TCC driver or 0 + if not. + + - :py:obj:`~.asyncEngineCount` is 1 when the device can concurrently + copy memory between host and device while executing a kernel. It is 2 + when the device can concurrently copy memory between host and device + in both directions and execute a kernel at the same time. It is 0 if + neither of these is supported. + + - :py:obj:`~.unifiedAddressing` is 1 if the device shares a unified + address space with the host and 0 otherwise. + + - :py:obj:`~.memoryClockRate` is the peak memory clock frequency in + kilohertz. + + - :py:obj:`~.memoryBusWidth` is the memory bus width in bits. + + - :py:obj:`~.l2CacheSize` is L2 cache size in bytes. + + - :py:obj:`~.persistingL2CacheMaxSize` is L2 cache's maximum persisting + lines size in bytes. + + - :py:obj:`~.maxThreadsPerMultiProcessor` is the number of maximum + resident threads per multiprocessor. + + - :py:obj:`~.streamPrioritiesSupported` is 1 if the device supports + stream priorities, or 0 if it is not supported. + + - :py:obj:`~.globalL1CacheSupported` is 1 if the device supports + caching of globals in L1 cache, or 0 if it is not supported. + + - :py:obj:`~.localL1CacheSupported` is 1 if the device supports caching + of locals in L1 cache, or 0 if it is not supported. + + - :py:obj:`~.sharedMemPerMultiprocessor` is the maximum amount of + shared memory available to a multiprocessor in bytes; this amount is + shared by all thread blocks simultaneously resident on a + multiprocessor. + + - :py:obj:`~.regsPerMultiprocessor` is the maximum number of 32-bit + registers available to a multiprocessor; this number is shared by all + thread blocks simultaneously resident on a multiprocessor. + + - :py:obj:`~.managedMemory` is 1 if the device supports allocating + managed memory on this system, or 0 if it is not supported. + + - :py:obj:`~.isMultiGpuBoard` is 1 if the device is on a multi-GPU + board (e.g. Gemini cards), and 0 if not; + + - :py:obj:`~.multiGpuBoardGroupID` is a unique identifier for a group + of devices associated with the same board. Devices on the same multi- + GPU board will share the same identifier. + + - :py:obj:`~.hostNativeAtomicSupported` is 1 if the link between the + device and the host supports native atomic operations, or 0 if it is + not supported. + + - :py:obj:`~.singleToDoublePrecisionPerfRatio` is the ratio of single + precision performance (in floating-point operations per second) to + double precision performance. + + - :py:obj:`~.pageableMemoryAccess` is 1 if the device supports + coherently accessing pageable memory without calling cudaHostRegister + on it, and 0 otherwise. + + - :py:obj:`~.concurrentManagedAccess` is 1 if the device can coherently + access managed memory concurrently with the CPU, and 0 otherwise. + + - :py:obj:`~.computePreemptionSupported` is 1 if the device supports + Compute Preemption, and 0 otherwise. + + - :py:obj:`~.canUseHostPointerForRegisteredMem` is 1 if the device can + access host registered memory at the same virtual address as the CPU, + and 0 otherwise. + + - :py:obj:`~.cooperativeLaunch` is 1 if the device supports launching + cooperative kernels via :py:obj:`~.cudaLaunchCooperativeKernel`, and + 0 otherwise. + + - :py:obj:`~.cooperativeMultiDeviceLaunch` is 1 if the device supports + launching cooperative kernels via + :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice`, and 0 otherwise. + + - :py:obj:`~.sharedMemPerBlockOptin` is the per device maximum shared + memory per block usable by special opt in + + - :py:obj:`~.pageableMemoryAccessUsesHostPageTables` is 1 if the device + accesses pageable memory via the host's page tables, and 0 otherwise. + + - :py:obj:`~.directManagedMemAccessFromHost` is 1 if the host can + directly access managed memory on the device without migration, and 0 + otherwise. + + - :py:obj:`~.maxBlocksPerMultiProcessor` is the maximum number of + thread blocks that can reside on a multiprocessor. + + - :py:obj:`~.accessPolicyMaxWindowSize` is the maximum value of + :py:obj:`~.cudaAccessPolicyWindow.num_bytes`. + + - :py:obj:`~.reservedSharedMemPerBlock` is the shared memory reserved + by CUDA driver per block in bytes + + - :py:obj:`~.hostRegisterSupported` is 1 if the device supports host + memory registration via :py:obj:`~.cudaHostRegister`, and 0 + otherwise. + + - :py:obj:`~.sparseCudaArraySupported` is 1 if the device supports + sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise + + - :py:obj:`~.hostRegisterReadOnlySupported` is 1 if the device supports + using the :py:obj:`~.cudaHostRegister` flag cudaHostRegisterReadOnly + to register memory that must be mapped as read-only to the GPU + + - :py:obj:`~.timelineSemaphoreInteropSupported` is 1 if external + timeline semaphore interop is supported on the device, 0 otherwise + + - :py:obj:`~.memoryPoolsSupported` is 1 if the device supports using + the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise + + - :py:obj:`~.gpuDirectRDMASupported` is 1 if the device supports + GPUDirect RDMA APIs, 0 otherwise + + - :py:obj:`~.gpuDirectRDMAFlushWritesOptions` is a bitmask to be + interpreted according to the + :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum + + - :py:obj:`~.gpuDirectRDMAWritesOrdering` See the + :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` enum for numerical values + + - :py:obj:`~.memoryPoolSupportedHandleTypes` is a bitmask of handle + types supported with mempool-based IPC + + - :py:obj:`~.deferredMappingCudaArraySupported` is 1 if the device + supports deferred mapping CUDA arrays and CUDA mipmapped arrays + + - :py:obj:`~.ipcEventSupported` is 1 if the device supports IPC Events, + and 0 otherwise + + - :py:obj:`~.unifiedFunctionPointers` is 1 if the device support + unified pointers, and 0 otherwise + + Parameters + ---------- + device : int + None + + Returns + ------- + cudaError_t + + prop : :py:obj:`~.cudaDeviceProp` + None + """ + cdef cudaDeviceProp prop = cudaDeviceProp() + with nogil: + err = cyruntime.cudaGetDeviceProperties(prop._pvt_ptr, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], prop) + +@cython.embedsignature(True) +def cudaDeviceGetAttribute(attr not None : cudaDeviceAttr, int device): + """ Returns information about the device. + + Returns in `*value` the integer value of the attribute `attr` on device + `device`. The supported attributes are: + + - :py:obj:`~.cudaDevAttrMaxThreadsPerBlock`: Maximum number of threads + per block + + - :py:obj:`~.cudaDevAttrMaxBlockDimX`: Maximum x-dimension of a block + + - :py:obj:`~.cudaDevAttrMaxBlockDimY`: Maximum y-dimension of a block + + - :py:obj:`~.cudaDevAttrMaxBlockDimZ`: Maximum z-dimension of a block + + - :py:obj:`~.cudaDevAttrMaxGridDimX`: Maximum x-dimension of a grid + + - :py:obj:`~.cudaDevAttrMaxGridDimY`: Maximum y-dimension of a grid + + - :py:obj:`~.cudaDevAttrMaxGridDimZ`: Maximum z-dimension of a grid + + - :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlock`: Maximum amount of + shared memory available to a thread block in bytes + + - :py:obj:`~.cudaDevAttrTotalConstantMemory`: Memory available on + device for constant variables in a CUDA C kernel in bytes + + - :py:obj:`~.cudaDevAttrWarpSize`: Warp size in threads + + - :py:obj:`~.cudaDevAttrMaxPitch`: Maximum pitch in bytes allowed by + the memory copy functions that involve memory regions allocated + through :py:obj:`~.cudaMallocPitch()` + + - :py:obj:`~.cudaDevAttrMaxTexture1DWidth`: Maximum 1D texture width + + - :py:obj:`~.cudaDevAttrMaxTexture1DLinearWidth`: Maximum width for a + 1D texture bound to linear memory + + - :py:obj:`~.cudaDevAttrMaxTexture1DMipmappedWidth`: Maximum mipmapped + 1D texture width + + - :py:obj:`~.cudaDevAttrMaxTexture2DWidth`: Maximum 2D texture width + + - :py:obj:`~.cudaDevAttrMaxTexture2DHeight`: Maximum 2D texture height + + - :py:obj:`~.cudaDevAttrMaxTexture2DLinearWidth`: Maximum width for a + 2D texture bound to linear memory + + - :py:obj:`~.cudaDevAttrMaxTexture2DLinearHeight`: Maximum height for a + 2D texture bound to linear memory + + - :py:obj:`~.cudaDevAttrMaxTexture2DLinearPitch`: Maximum pitch in + bytes for a 2D texture bound to linear memory + + - :py:obj:`~.cudaDevAttrMaxTexture2DMipmappedWidth`: Maximum mipmapped + 2D texture width + + - :py:obj:`~.cudaDevAttrMaxTexture2DMipmappedHeight`: Maximum mipmapped + 2D texture height + + - :py:obj:`~.cudaDevAttrMaxTexture3DWidth`: Maximum 3D texture width + + - :py:obj:`~.cudaDevAttrMaxTexture3DHeight`: Maximum 3D texture height + + - :py:obj:`~.cudaDevAttrMaxTexture3DDepth`: Maximum 3D texture depth + + - :py:obj:`~.cudaDevAttrMaxTexture3DWidthAlt`: Alternate maximum 3D + texture width, 0 if no alternate maximum 3D texture size is supported + + - :py:obj:`~.cudaDevAttrMaxTexture3DHeightAlt`: Alternate maximum 3D + texture height, 0 if no alternate maximum 3D texture size is + supported + + - :py:obj:`~.cudaDevAttrMaxTexture3DDepthAlt`: Alternate maximum 3D + texture depth, 0 if no alternate maximum 3D texture size is supported + + - :py:obj:`~.cudaDevAttrMaxTextureCubemapWidth`: Maximum cubemap + texture width or height + + - :py:obj:`~.cudaDevAttrMaxTexture1DLayeredWidth`: Maximum 1D layered + texture width + + - :py:obj:`~.cudaDevAttrMaxTexture1DLayeredLayers`: Maximum layers in a + 1D layered texture + + - :py:obj:`~.cudaDevAttrMaxTexture2DLayeredWidth`: Maximum 2D layered + texture width + + - :py:obj:`~.cudaDevAttrMaxTexture2DLayeredHeight`: Maximum 2D layered + texture height + + - :py:obj:`~.cudaDevAttrMaxTexture2DLayeredLayers`: Maximum layers in a + 2D layered texture + + - :py:obj:`~.cudaDevAttrMaxTextureCubemapLayeredWidth`: Maximum cubemap + layered texture width or height + + - :py:obj:`~.cudaDevAttrMaxTextureCubemapLayeredLayers`: Maximum layers + in a cubemap layered texture + + - :py:obj:`~.cudaDevAttrMaxSurface1DWidth`: Maximum 1D surface width + + - :py:obj:`~.cudaDevAttrMaxSurface2DWidth`: Maximum 2D surface width + + - :py:obj:`~.cudaDevAttrMaxSurface2DHeight`: Maximum 2D surface height + + - :py:obj:`~.cudaDevAttrMaxSurface3DWidth`: Maximum 3D surface width + + - :py:obj:`~.cudaDevAttrMaxSurface3DHeight`: Maximum 3D surface height + + - :py:obj:`~.cudaDevAttrMaxSurface3DDepth`: Maximum 3D surface depth + + - :py:obj:`~.cudaDevAttrMaxSurface1DLayeredWidth`: Maximum 1D layered + surface width + + - :py:obj:`~.cudaDevAttrMaxSurface1DLayeredLayers`: Maximum layers in a + 1D layered surface + + - :py:obj:`~.cudaDevAttrMaxSurface2DLayeredWidth`: Maximum 2D layered + surface width + + - :py:obj:`~.cudaDevAttrMaxSurface2DLayeredHeight`: Maximum 2D layered + surface height + + - :py:obj:`~.cudaDevAttrMaxSurface2DLayeredLayers`: Maximum layers in a + 2D layered surface + + - :py:obj:`~.cudaDevAttrMaxSurfaceCubemapWidth`: Maximum cubemap + surface width + + - :py:obj:`~.cudaDevAttrMaxSurfaceCubemapLayeredWidth`: Maximum cubemap + layered surface width + + - :py:obj:`~.cudaDevAttrMaxSurfaceCubemapLayeredLayers`: Maximum layers + in a cubemap layered surface + + - :py:obj:`~.cudaDevAttrMaxRegistersPerBlock`: Maximum number of 32-bit + registers available to a thread block + + - :py:obj:`~.cudaDevAttrClockRate`: Peak clock frequency in kilohertz + + - :py:obj:`~.cudaDevAttrTextureAlignment`: Alignment requirement; + texture base addresses aligned to :py:obj:`~.textureAlign` bytes do + not need an offset applied to texture fetches + + - :py:obj:`~.cudaDevAttrTexturePitchAlignment`: Pitch alignment + requirement for 2D texture references bound to pitched memory + + - :py:obj:`~.cudaDevAttrGpuOverlap`: 1 if the device can concurrently + copy memory between host and device while executing a kernel, or 0 if + not + + - :py:obj:`~.cudaDevAttrMultiProcessorCount`: Number of multiprocessors + on the device + + - :py:obj:`~.cudaDevAttrKernelExecTimeout`: 1 if there is a run time + limit for kernels executed on the device, or 0 if not + + - :py:obj:`~.cudaDevAttrIntegrated`: 1 if the device is integrated with + the memory subsystem, or 0 if not + + - :py:obj:`~.cudaDevAttrCanMapHostMemory`: 1 if the device can map host + memory into the CUDA address space, or 0 if not + + - :py:obj:`~.cudaDevAttrComputeMode`: Compute mode is the compute mode + that the device is currently in. Available modes are as follows: + + - :py:obj:`~.cudaComputeModeDefault`: Default mode - Device is not + restricted and multiple threads can use :py:obj:`~.cudaSetDevice()` + with this device. + + - :py:obj:`~.cudaComputeModeProhibited`: Compute-prohibited mode - No + threads can use :py:obj:`~.cudaSetDevice()` with this device. + + - :py:obj:`~.cudaComputeModeExclusiveProcess`: Compute-exclusive- + process mode - Many threads in one process will be able to use + :py:obj:`~.cudaSetDevice()` with this device. + + - :py:obj:`~.cudaDevAttrConcurrentKernels`: 1 if the device supports + executing multiple kernels within the same context simultaneously, or + 0 if not. It is not guaranteed that multiple kernels will be resident + on the device concurrently so this feature should not be relied upon + for correctness. + + - :py:obj:`~.cudaDevAttrEccEnabled`: 1 if error correction is enabled + on the device, 0 if error correction is disabled or not supported by + the device + + - :py:obj:`~.cudaDevAttrPciBusId`: PCI bus identifier of the device + + - :py:obj:`~.cudaDevAttrPciDeviceId`: PCI device (also known as slot) + identifier of the device + + - :py:obj:`~.cudaDevAttrTccDriver`: 1 if the device is using a TCC + driver. TCC is only available on Tesla hardware running Windows Vista + or later. + + - :py:obj:`~.cudaDevAttrMemoryClockRate`: Peak memory clock frequency + in kilohertz + + - :py:obj:`~.cudaDevAttrGlobalMemoryBusWidth`: Global memory bus width + in bits + + - :py:obj:`~.cudaDevAttrL2CacheSize`: Size of L2 cache in bytes. 0 if + the device doesn't have L2 cache. + + - :py:obj:`~.cudaDevAttrMaxThreadsPerMultiProcessor`: Maximum resident + threads per multiprocessor + + - :py:obj:`~.cudaDevAttrUnifiedAddressing`: 1 if the device shares a + unified address space with the host, or 0 if not + + - :py:obj:`~.cudaDevAttrComputeCapabilityMajor`: Major compute + capability version number + + - :py:obj:`~.cudaDevAttrComputeCapabilityMinor`: Minor compute + capability version number + + - :py:obj:`~.cudaDevAttrStreamPrioritiesSupported`: 1 if the device + supports stream priorities, or 0 if not + + - :py:obj:`~.cudaDevAttrGlobalL1CacheSupported`: 1 if device supports + caching globals in L1 cache, 0 if not + + - :py:obj:`~.cudaDevAttrLocalL1CacheSupported`: 1 if device supports + caching locals in L1 cache, 0 if not + + - :py:obj:`~.cudaDevAttrMaxSharedMemoryPerMultiprocessor`: Maximum + amount of shared memory available to a multiprocessor in bytes; this + amount is shared by all thread blocks simultaneously resident on a + multiprocessor + + - :py:obj:`~.cudaDevAttrMaxRegistersPerMultiprocessor`: Maximum number + of 32-bit registers available to a multiprocessor; this number is + shared by all thread blocks simultaneously resident on a + multiprocessor + + - :py:obj:`~.cudaDevAttrManagedMemory`: 1 if device supports allocating + managed memory, 0 if not + + - :py:obj:`~.cudaDevAttrIsMultiGpuBoard`: 1 if device is on a multi-GPU + board, 0 if not + + - :py:obj:`~.cudaDevAttrMultiGpuBoardGroupID`: Unique identifier for a + group of devices on the same multi-GPU board + + - :py:obj:`~.cudaDevAttrHostNativeAtomicSupported`: 1 if the link + between the device and the host supports native atomic operations + + - :py:obj:`~.cudaDevAttrSingleToDoublePrecisionPerfRatio`: Ratio of + single precision performance (in floating-point operations per + second) to double precision performance + + - :py:obj:`~.cudaDevAttrPageableMemoryAccess`: 1 if the device supports + coherently accessing pageable memory without calling cudaHostRegister + on it, and 0 otherwise + + - :py:obj:`~.cudaDevAttrConcurrentManagedAccess`: 1 if the device can + coherently access managed memory concurrently with the CPU, and 0 + otherwise + + - :py:obj:`~.cudaDevAttrComputePreemptionSupported`: 1 if the device + supports Compute Preemption, 0 if not + + - :py:obj:`~.cudaDevAttrCanUseHostPointerForRegisteredMem`: 1 if the + device can access host registered memory at the same virtual address + as the CPU, and 0 otherwise + + - :py:obj:`~.cudaDevAttrCooperativeLaunch`: 1 if the device supports + launching cooperative kernels via + :py:obj:`~.cudaLaunchCooperativeKernel`, and 0 otherwise + + - :py:obj:`~.cudaDevAttrCooperativeMultiDeviceLaunch`: 1 if the device + supports launching cooperative kernels via + :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice`, and 0 otherwise + + - :py:obj:`~.cudaDevAttrCanFlushRemoteWrites`: 1 if the device supports + flushing of outstanding remote writes, and 0 otherwise + + - :py:obj:`~.cudaDevAttrHostRegisterSupported`: 1 if the device + supports host memory registration via :py:obj:`~.cudaHostRegister`, + and 0 otherwise + + - :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`: 1 if + the device accesses pageable memory via the host's page tables, and 0 + otherwise + + - :py:obj:`~.cudaDevAttrDirectManagedMemAccessFromHost`: 1 if the host + can directly access managed memory on the device without migration, + and 0 otherwise + + - :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin`: Maximum per + block shared memory size on the device. This value can be opted into + when using :py:obj:`~.cudaFuncSetAttribute` + + - :py:obj:`~.cudaDevAttrMaxBlocksPerMultiprocessor`: Maximum number of + thread blocks that can reside on a multiprocessor + + - :py:obj:`~.cudaDevAttrMaxPersistingL2CacheSize`: Maximum L2 + persisting lines capacity setting in bytes + + - :py:obj:`~.cudaDevAttrMaxAccessPolicyWindowSize`: Maximum value of + :py:obj:`~.cudaAccessPolicyWindow.num_bytes` + + - :py:obj:`~.cudaDevAttrReservedSharedMemoryPerBlock`: Shared memory + reserved by CUDA driver per block in bytes + + - :py:obj:`~.cudaDevAttrSparseCudaArraySupported`: 1 if the device + supports sparse CUDA arrays and sparse CUDA mipmapped arrays. + + - :py:obj:`~.cudaDevAttrHostRegisterReadOnlySupported`: Device supports + using the :py:obj:`~.cudaHostRegister` flag cudaHostRegisterReadOnly + to register memory that must be mapped as read-only to the GPU + + - :py:obj:`~.cudaDevAttrMemoryPoolsSupported`: 1 if the device supports + using the cudaMallocAsync and cudaMemPool family of APIs, and 0 + otherwise + + - :py:obj:`~.cudaDevAttrGPUDirectRDMASupported`: 1 if the device + supports GPUDirect RDMA APIs, and 0 otherwise + + - :py:obj:`~.cudaDevAttrGPUDirectRDMAFlushWritesOptions`: bitmask to be + interpreted according to the + :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum + + - :py:obj:`~.cudaDevAttrGPUDirectRDMAWritesOrdering`: see the + :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` enum for numerical values + + - :py:obj:`~.cudaDevAttrMemoryPoolSupportedHandleTypes`: Bitmask of + handle types supported with mempool based IPC + + - :py:obj:`~.cudaDevAttrDeferredMappingCudaArraySupported` : 1 if the + device supports deferred mapping CUDA arrays and CUDA mipmapped + arrays. + + - :py:obj:`~.cudaDevAttrIpcEventSupport`: 1 if the device supports IPC + Events. + + - :py:obj:`~.cudaDevAttrNumaConfig`: NUMA configuration of a device: + value is of type :py:obj:`~.cudaDeviceNumaConfig` enum + + - :py:obj:`~.cudaDevAttrNumaId`: NUMA node ID of the GPU memory + + - :py:obj:`~.cudaDevAttrGpuPciDeviceId`: The combined 16-bit PCI device + ID and 16-bit PCI vendor ID. + + - :py:obj:`~.cudaDevAttrGpuPciSubsystemId`: The combined 16-bit PCI + subsystem ID and 16-bit PCI vendor subsystem ID. + + Parameters + ---------- + attr : :py:obj:`~.cudaDeviceAttr` + Device attribute to query + device : int + Device number to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue` + value : int + Returned device attribute value + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuDeviceGetAttribute` + """ + cdef int value = 0 + cdef cyruntime.cudaDeviceAttr cyattr = attr.value + with nogil: + err = cyruntime.cudaDeviceGetAttribute(&value, cyattr, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], value) + +@cython.embedsignature(True) +def cudaDeviceGetDefaultMemPool(int device): + """ Returns the default mempool of a device. + + The default mempool of a device contains device memory from that + device. + + Parameters + ---------- + device : int + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorNotSupported` + memPool : :py:obj:`~.cudaMemPool_t` + None + + See Also + -------- + :py:obj:`~.cuDeviceGetDefaultMemPool`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaMemPoolTrimTo`, :py:obj:`~.cudaMemPoolGetAttribute`, :py:obj:`~.cudaDeviceSetMemPool`, :py:obj:`~.cudaMemPoolSetAttribute`, :py:obj:`~.cudaMemPoolSetAccess` + """ + cdef cudaMemPool_t memPool = cudaMemPool_t() + with nogil: + err = cyruntime.cudaDeviceGetDefaultMemPool(memPool._pvt_ptr, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memPool) + +@cython.embedsignature(True) +def cudaDeviceSetMemPool(int device, memPool): + """ Sets the current memory pool of a device. + + The memory pool must be local to the specified device. Unless a mempool + is specified in the :py:obj:`~.cudaMallocAsync` call, + :py:obj:`~.cudaMallocAsync` allocates from the current mempool of the + provided stream's device. By default, a device's current memory pool is + its default memory pool. + + Parameters + ---------- + device : int + None + memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorInvalidDevice` :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cuDeviceSetMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaMemPoolCreate`, :py:obj:`~.cudaMemPoolDestroy`, :py:obj:`~.cudaMallocFromPoolAsync` + + Notes + ----- + Use :py:obj:`~.cudaMallocFromPoolAsync` to specify asynchronous allocations from a device different than the one the stream runs on. + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + with nogil: + err = cyruntime.cudaDeviceSetMemPool(device, cymemPool) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetMemPool(int device): + """ Gets the current mempool for a device. + + Returns the last pool provided to :py:obj:`~.cudaDeviceSetMemPool` for + this device or the device's default memory pool if + :py:obj:`~.cudaDeviceSetMemPool` has never been called. By default the + current mempool is the default mempool for a device, otherwise the + returned pool must have been set with :py:obj:`~.cuDeviceSetMemPool` or + :py:obj:`~.cudaDeviceSetMemPool`. + + Parameters + ---------- + device : int + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorNotSupported` + memPool : :py:obj:`~.cudaMemPool_t` + None + + See Also + -------- + :py:obj:`~.cuDeviceGetMemPool`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceSetMemPool` + """ + cdef cudaMemPool_t memPool = cudaMemPool_t() + with nogil: + err = cyruntime.cudaDeviceGetMemPool(memPool._pvt_ptr, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memPool) + +@cython.embedsignature(True) +def cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, int device, int flags): + """ Return NvSciSync attributes that this device can support. + + Returns in `nvSciSyncAttrList`, the properties of NvSciSync that this + CUDA device, `dev` can support. The returned `nvSciSyncAttrList` can be + used to create an NvSciSync that matches this device's capabilities. + + If NvSciSyncAttrKey_RequiredPerm field in `nvSciSyncAttrList` is + already set this API will return :py:obj:`~.cudaErrorInvalidValue`. + + The applications should set `nvSciSyncAttrList` to a valid + NvSciSyncAttrList failing which this API will return + :py:obj:`~.cudaErrorInvalidHandle`. + + The `flags` controls how applications intends to use the NvSciSync + created from the `nvSciSyncAttrList`. The valid flags are: + + - :py:obj:`~.cudaNvSciSyncAttrSignal`, specifies that the applications + intends to signal an NvSciSync on this CUDA device. + + - :py:obj:`~.cudaNvSciSyncAttrWait`, specifies that the applications + intends to wait on an NvSciSync on this CUDA device. + + At least one of these flags must be set, failing which the API returns + :py:obj:`~.cudaErrorInvalidValue`. Both the flags are orthogonal to one + another: a developer may set both these flags that allows to set both + wait and signal specific attributes in the same `nvSciSyncAttrList`. + + Note that this API updates the input `nvSciSyncAttrList` with values + equivalent to the following public attribute key-values: + NvSciSyncAttrKey_RequiredPerm is set to + + - NvSciSyncAccessPerm_SignalOnly if :py:obj:`~.cudaNvSciSyncAttrSignal` + is set in `flags`. + + - NvSciSyncAccessPerm_WaitOnly if :py:obj:`~.cudaNvSciSyncAttrWait` is + set in `flags`. + + - NvSciSyncAccessPerm_WaitSignal if both + :py:obj:`~.cudaNvSciSyncAttrWait` and + :py:obj:`~.cudaNvSciSyncAttrSignal` are set in `flags`. + NvSciSyncAttrKey_PrimitiveInfo is set to + + - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid `device`. + + - NvSciSyncAttrValPrimitiveType_Syncpoint if `device` is a Tegra + device. + + - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if `device` + is GA10X+. NvSciSyncAttrKey_GpuId is set to the same UUID that is + returned in `None` from :py:obj:`~.cudaDeviceGetProperties` for this + `device`. + + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorDeviceUninitialized`, + :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidHandle`, + :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorNotSupported`, + :py:obj:`~.cudaErrorMemoryAllocation` + + Parameters + ---------- + nvSciSyncAttrList : Any + Return NvSciSync attributes supported. + device : int + Valid Cuda Device to get NvSciSync attributes for. + flags : int + flags describing NvSciSync usage. + + Returns + ------- + cudaError_t + + + See Also + -------- + :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cynvSciSyncAttrList = _HelperInputVoidPtr(nvSciSyncAttrList) + cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr + with nogil: + err = cyruntime.cudaDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, device, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetP2PAttribute(attr not None : cudaDeviceP2PAttr, int srcDevice, int dstDevice): + """ Queries attributes of the link between two devices. + + Returns in `*value` the value of the requested attribute `attrib` of + the link between `srcDevice` and `dstDevice`. The supported attributes + are: + + - :py:obj:`~.cudaDevP2PAttrPerformanceRank`: A relative value + indicating the performance of the link between two devices. Lower + value means better performance (0 being the value used for most + performant link). + + - :py:obj:`~.cudaDevP2PAttrAccessSupported`: 1 if peer access is + enabled. + + - :py:obj:`~.cudaDevP2PAttrNativeAtomicSupported`: 1 if native atomic + operations over the link are supported. + + - :py:obj:`~.cudaDevP2PAttrCudaArrayAccessSupported`: 1 if accessing + CUDA arrays over the link is supported. + + Returns :py:obj:`~.cudaErrorInvalidDevice` if `srcDevice` or + `dstDevice` are not valid or if they represent the same device. + + Returns :py:obj:`~.cudaErrorInvalidValue` if `attrib` is not valid or + if `value` is a null pointer. + + Parameters + ---------- + attrib : :py:obj:`~.cudaDeviceP2PAttr` + The requested attribute of the link between `srcDevice` and + `dstDevice`. + srcDevice : int + The source device of the target link. + dstDevice : int + The destination device of the target link. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue` + value : int + Returned value of the requested attribute + + See Also + -------- + :py:obj:`~.cudaDeviceEnablePeerAccess`, :py:obj:`~.cudaDeviceDisablePeerAccess`, :py:obj:`~.cudaDeviceCanAccessPeer`, :py:obj:`~.cuDeviceGetP2PAttribute` + """ + cdef int value = 0 + cdef cyruntime.cudaDeviceP2PAttr cyattr = attr.value + with nogil: + err = cyruntime.cudaDeviceGetP2PAttribute(&value, cyattr, srcDevice, dstDevice) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], value) + +@cython.embedsignature(True) +def cudaChooseDevice(prop : Optional[cudaDeviceProp]): + """ Select compute-device which best matches criteria. + + Returns in `*device` the device which has properties that best match + `*prop`. + + Parameters + ---------- + prop : :py:obj:`~.cudaDeviceProp` + Desired device properties + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + device : int + Device with best match + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaInitDevice` + """ + cdef int device = 0 + cdef cyruntime.cudaDeviceProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL + with nogil: + err = cyruntime.cudaChooseDevice(&device, cyprop_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], device) + +@cython.embedsignature(True) +def cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags): + """ Initialize device to be used for GPU executions. + + This function will initialize the CUDA Runtime structures and primary + context on `device` when called, but the context will not be made + current to `device`. + + When :py:obj:`~.cudaInitDeviceFlagsAreValid` is set in `flags`, + deviceFlags are applied to the requested device. The values of + deviceFlags match those of the flags parameters in + :py:obj:`~.cudaSetDeviceFlags`. The effect may be verified by + :py:obj:`~.cudaGetDeviceFlags`. + + This function will return an error if the device is in + :py:obj:`~.cudaComputeModeExclusiveProcess` and is occupied by another + process or if the device is in :py:obj:`~.cudaComputeModeProhibited`. + + Parameters + ---------- + device : int + Device on which the runtime will initialize itself. + deviceFlags : unsigned int + Parameters for device operation. + flags : unsigned int + Flags for controlling the device initialization. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaSetDevice` :py:obj:`~.cuCtxSetCurrent` + """ + with nogil: + err = cyruntime.cudaInitDevice(device, deviceFlags, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaSetDevice(int device): + """ Set device to be used for GPU executions. + + Sets `device` as the current device for the calling host thread. Valid + device id's are 0 to (:py:obj:`~.cudaGetDeviceCount()` - 1). + + Any device memory subsequently allocated from this host thread using + :py:obj:`~.cudaMalloc()`, :py:obj:`~.cudaMallocPitch()` or + :py:obj:`~.cudaMallocArray()` will be physically resident on `device`. + Any host memory allocated from this host thread using + :py:obj:`~.cudaMallocHost()` or :py:obj:`~.cudaHostAlloc()` or + :py:obj:`~.cudaHostRegister()` will have its lifetime associated with + `device`. Any streams or events created from this host thread will be + associated with `device`. Any kernels launched from this host thread + using the <<<>>> operator or :py:obj:`~.cudaLaunchKernel()` will be + executed on `device`. + + This call may be made from any host thread, to any device, and at any + time. This function will do no synchronization with the previous or new + device, and should only take significant time when it initializes the + runtime's context state. This call will bind the primary context of the + specified device to the calling thread and all the subsequent memory + allocations, stream and event creations, and kernel launches will be + associated with the primary context. This function will also + immediately initialize the runtime state on the primary context, and + the context will be current on `device` immediately. This function will + return an error if the device is in + :py:obj:`~.cudaComputeModeExclusiveProcess` and is occupied by another + process or if the device is in :py:obj:`~.cudaComputeModeProhibited`. + + It is not required to call :py:obj:`~.cudaInitDevice` before using this + function. + + Parameters + ---------- + device : int + Device on which the active host thread should execute the device + code. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorDeviceUnavailable`, + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuCtxSetCurrent` + """ + with nogil: + err = cyruntime.cudaSetDevice(device) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetDevice(): + """ Returns which device is currently being used. + + Returns in `*device` the current device for the calling host thread. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorDeviceUnavailable`, + device : int + Returns the device on which the active host thread executes the + device code. + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cuCtxGetCurrent` + """ + cdef int device = 0 + with nogil: + err = cyruntime.cudaGetDevice(&device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], device) + +@cython.embedsignature(True) +def cudaSetDeviceFlags(unsigned int flags): + """ Sets flags to be used for device executions. + + Records `flags` as the flags for the current device. If the current + device has been set and that device has already been initialized, the + previous flags are overwritten. If the current device has not been + initialized, it is initialized with the provided flags. If no device + has been made current to the calling thread, a default device is + selected and initialized with the provided flags. + + The three LSBs of the `flags` parameter can be used to control how the + CPU thread interacts with the OS scheduler when waiting for results + from the device. + + - :py:obj:`~.cudaDeviceScheduleAuto`: The default value if the `flags` + parameter is zero, uses a heuristic based on the number of active + CUDA contexts in the process `C` and the number of logical processors + in the system `P`. If `C` > `P`, then CUDA will yield to other OS + threads when waiting for the device, otherwise CUDA will not yield + while waiting for results and actively spin on the processor. + Additionally, on Tegra devices, :py:obj:`~.cudaDeviceScheduleAuto` + uses a heuristic based on the power profile of the platform and may + choose :py:obj:`~.cudaDeviceScheduleBlockingSync` for low-powered + devices. + + - :py:obj:`~.cudaDeviceScheduleSpin`: Instruct CUDA to actively spin + when waiting for results from the device. This can decrease latency + when waiting for the device, but may lower the performance of CPU + threads if they are performing work in parallel with the CUDA thread. + + - :py:obj:`~.cudaDeviceScheduleYield`: Instruct CUDA to yield its + thread when waiting for results from the device. This can increase + latency when waiting for the device, but can increase the performance + of CPU threads performing work in parallel with the device. + + - :py:obj:`~.cudaDeviceScheduleBlockingSync`: Instruct CUDA to block + the CPU thread on a synchronization primitive when waiting for the + device to finish work. + + - :py:obj:`~.cudaDeviceBlockingSync`: Instruct CUDA to block the CPU + thread on a synchronization primitive when waiting for the device to + finish work. :py:obj:`~.Deprecated:` This flag was deprecated as of + CUDA 4.0 and replaced with + :py:obj:`~.cudaDeviceScheduleBlockingSync`. + + - :py:obj:`~.cudaDeviceMapHost`: This flag enables allocating pinned + host memory that is accessible to the device. It is implicit for the + runtime but may be absent if a context is created using the driver + API. If this flag is not set, :py:obj:`~.cudaHostGetDevicePointer()` + will always return a failure code. + + - :py:obj:`~.cudaDeviceLmemResizeToMax`: Instruct CUDA to not reduce + local memory after resizing local memory for a kernel. This can + prevent thrashing by local memory allocations when launching many + kernels with high local memory usage at the cost of potentially + increased memory usage. :py:obj:`~.Deprecated:` This flag is + deprecated and the behavior enabled by this flag is now the default + and cannot be disabled. + + - :py:obj:`~.cudaDeviceSyncMemops`: Ensures that synchronous memory + operations initiated on this context will always synchronize. See + further documentation in the section titled "API Synchronization + behavior" to learn more about cases when synchronous memory + operations can exhibit asynchronous behavior. + + Parameters + ---------- + flags : unsigned int + Parameters for device operation + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGetDeviceFlags`, :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaSetValidDevices`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cuDevicePrimaryCtxSetFlags` + """ + with nogil: + err = cyruntime.cudaSetDeviceFlags(flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetDeviceFlags(): + """ Gets the flags for the current device. + + Returns in `flags` the flags for the current device. If there is a + current device for the calling thread, the flags for the device are + returned. If there is no current device, the flags for the first device + are returned, which may be the default flags. Compare to the behavior + of :py:obj:`~.cudaSetDeviceFlags`. + + Typically, the flags returned should match the behavior that will be + seen if the calling thread uses a device after this call, without any + change to the flags or current device inbetween by this or another + thread. Note that if the device is not initialized, it is possible for + another thread to change the flags for the current device before it is + initialized. Additionally, when using exclusive mode, if this thread + has not requested a specific device, it may use a device other than the + first device, contrary to the assumption made by this function. + + If a context has been created via the driver API and is current to the + calling thread, the flags for that context are always returned. + + Flags returned by this function may specifically include + :py:obj:`~.cudaDeviceMapHost` even though it is not accepted by + :py:obj:`~.cudaSetDeviceFlags` because it is implicit in runtime API + flags. The reason for this is that the current context may have been + created via the driver API in which case the flag is not implicit and + may be unset. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice` + flags : unsigned int + Pointer to store the device flags + + See Also + -------- + :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaSetDeviceFlags`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuDevicePrimaryCtxGetState` + """ + cdef unsigned int flags = 0 + with nogil: + err = cyruntime.cudaGetDeviceFlags(&flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], flags) + +@cython.embedsignature(True) +def cudaStreamCreate(): + """ Create an asynchronous stream. + + Creates a new asynchronous stream on the context that is current to the + calling host thread. If no context is current to the calling host + thread, then the primary context for a device is selected, made current + to the calling thread, and initialized before creating a stream on it. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pStream : :py:obj:`~.cudaStream_t` + Pointer to new stream identifier + + See Also + -------- + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` + """ + cdef cudaStream_t pStream = cudaStream_t() + with nogil: + err = cyruntime.cudaStreamCreate(pStream._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pStream) + +@cython.embedsignature(True) +def cudaStreamCreateWithFlags(unsigned int flags): + """ Create an asynchronous stream. + + Creates a new asynchronous stream on the context that is current to the + calling host thread. If no context is current to the calling host + thread, then the primary context for a device is selected, made current + to the calling thread, and initialized before creating a stream on it. + The `flags` argument determines the behaviors of the stream. Valid + values for `flags` are + + - :py:obj:`~.cudaStreamDefault`: Default stream creation flag. + + - :py:obj:`~.cudaStreamNonBlocking`: Specifies that work running in the + created stream may run concurrently with work in stream 0 (the NULL + stream), and that the created stream should perform no implicit + synchronization with stream 0. + + Parameters + ---------- + flags : unsigned int + Parameters for stream creation + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pStream : :py:obj:`~.cudaStream_t` + Pointer to new stream identifier + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` + """ + cdef cudaStream_t pStream = cudaStream_t() + with nogil: + err = cyruntime.cudaStreamCreateWithFlags(pStream._pvt_ptr, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pStream) + +@cython.embedsignature(True) +def cudaStreamCreateWithPriority(unsigned int flags, int priority): + """ Create an asynchronous stream with the specified priority. + + Creates a stream with the specified priority and returns a handle in + `pStream`. The stream is created on the context that is current to the + calling host thread. If no context is current to the calling host + thread, then the primary context for a device is selected, made current + to the calling thread, and initialized before creating a stream on it. + This affects the scheduling priority of work in the stream. Priorities + provide a hint to preferentially run work with higher priority when + possible, but do not preempt already-running work or provide any other + functional guarantee on execution order. + + `priority` follows a convention where lower numbers represent higher + priorities. '0' represents default priority. The range of meaningful + numerical priorities can be queried using + :py:obj:`~.cudaDeviceGetStreamPriorityRange`. If the specified priority + is outside the numerical range returned by + :py:obj:`~.cudaDeviceGetStreamPriorityRange`, it will automatically be + clamped to the lowest or the highest number in the range. + + Parameters + ---------- + flags : unsigned int + Flags for stream creation. See + :py:obj:`~.cudaStreamCreateWithFlags` for a list of valid flags + that can be passed + priority : int + Priority of the stream. Lower numbers represent higher priorities. + See :py:obj:`~.cudaDeviceGetStreamPriorityRange` for more + information about the meaningful stream priorities that can be + passed. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pStream : :py:obj:`~.cudaStream_t` + Pointer to new stream identifier + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority` + + Notes + ----- + Stream priorities are supported only on GPUs with compute capability 3.5 or higher. + + In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations. + """ + cdef cudaStream_t pStream = cudaStream_t() + with nogil: + err = cyruntime.cudaStreamCreateWithPriority(pStream._pvt_ptr, flags, priority) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pStream) + +@cython.embedsignature(True) +def cudaStreamGetPriority(hStream): + """ Query the priority of a stream. + + Query the priority of a stream. The priority is returned in in + `priority`. Note that if the stream was created with a priority outside + the meaningful numerical range returned by + :py:obj:`~.cudaDeviceGetStreamPriorityRange`, this function returns the + clamped priority. See :py:obj:`~.cudaStreamCreateWithPriority` for + details about priority clamping. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + priority : int + Pointer to a signed integer in which the stream's priority is + returned + + See Also + -------- + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cuStreamGetPriority` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef int priority = 0 + with nogil: + err = cyruntime.cudaStreamGetPriority(cyhStream, &priority) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], priority) + +@cython.embedsignature(True) +def cudaStreamGetFlags(hStream): + """ Query the flags of a stream. + + Query the flags of a stream. The flags are returned in `flags`. See + :py:obj:`~.cudaStreamCreateWithFlags` for a list of valid flags. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + flags : unsigned int + Pointer to an unsigned integer in which the stream's flags are + returned + + See Also + -------- + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cuStreamGetFlags` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef unsigned int flags = 0 + with nogil: + err = cyruntime.cudaStreamGetFlags(cyhStream, &flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], flags) + +@cython.embedsignature(True) +def cudaStreamGetId(hStream): + """ Query the Id of a stream. + + Query the Id of a stream. The Id is returned in `streamId`. The Id is + unique for the life of the program. + + The stream handle `hStream` can refer to any of the following: + + - a stream created via any of the CUDA runtime APIs such as + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` + and :py:obj:`~.cudaStreamCreateWithPriority`, or their driver API + equivalents such as :py:obj:`~.cuStreamCreate` or + :py:obj:`~.cuStreamCreateWithPriority`. Passing an invalid handle + will result in undefined behavior. + + - any of the special streams such as the NULL stream, + :py:obj:`~.cudaStreamLegacy` and :py:obj:`~.cudaStreamPerThread` + respectively. The driver API equivalents of these are also accepted + which are NULL, :py:obj:`~.CU_STREAM_LEGACY` and + :py:obj:`~.CU_STREAM_PER_THREAD`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + streamId : unsigned long long + Pointer to an unsigned long long in which the stream Id is returned + + See Also + -------- + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cuStreamGetId` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef unsigned long long streamId = 0 + with nogil: + err = cyruntime.cudaStreamGetId(cyhStream, &streamId) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], streamId) + +@cython.embedsignature(True) +def cudaStreamGetDevice(hStream): + """ Query the device of a stream. + + Returns in `*device` the device of the stream. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorDeviceUnavailable`, + device : int + Returns the device to which the stream belongs + + See Also + -------- + :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cuStreamGetId` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef int device = 0 + with nogil: + err = cyruntime.cudaStreamGetDevice(cyhStream, &device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], device) + +@cython.embedsignature(True) +def cudaCtxResetPersistingL2Cache(): + """ Resets all persisting lines in cache to normal status. + + Resets all persisting lines in cache to normal status. Takes effect on + function return. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + with nogil: + err = cyruntime.cudaCtxResetPersistingL2Cache() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamCopyAttributes(dst, src): + """ Copies attributes from source stream to destination stream. + + Copies attributes from source stream `src` to destination stream `dst`. + Both streams must have the same context. + + Parameters + ---------- + dst : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Destination stream + src : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Source stream For attributes see :py:obj:`~.cudaStreamAttrID` + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaStream_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaStream_t,driver.CUstream)): + psrc = int(src) + else: + psrc = int(cudaStream_t(src)) + cysrc = psrc + cdef cyruntime.cudaStream_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaStream_t,driver.CUstream)): + pdst = int(dst) + else: + pdst = int(cudaStream_t(dst)) + cydst = pdst + with nogil: + err = cyruntime.cudaStreamCopyAttributes(cydst, cysrc) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamGetAttribute(hStream, attr not None : cudaStreamAttrID): + """ Queries stream attribute. + + Queries attribute `attr` from `hStream` and stores it in corresponding + member of `value_out`. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + + attr : :py:obj:`~.cudaStreamAttrID` + + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + value_out : :py:obj:`~.cudaStreamAttrValue` + + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef cyruntime.cudaStreamAttrID cyattr = attr.value + cdef cudaStreamAttrValue value_out = cudaStreamAttrValue() + with nogil: + err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], value_out) + +@cython.embedsignature(True) +def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Optional[cudaStreamAttrValue]): + """ Sets stream attribute. + + Sets attribute `attr` on `hStream` from corresponding attribute of + `value`. The updated attribute will be applied to subsequent work + submitted to the stream. It will not affect previously submitted work. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + + attr : :py:obj:`~.cudaStreamAttrID` + + value : :py:obj:`~.cudaStreamAttrValue` + + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef cyruntime.cudaStreamAttrID cyattr = attr.value + cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + with nogil: + err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamDestroy(stream): + """ Destroys and cleans up an asynchronous stream. + + Destroys and cleans up the asynchronous stream specified by `stream`. + + In case the device is still doing work in the stream `stream` when + :py:obj:`~.cudaStreamDestroy()` is called, the function will return + immediately and the resources associated with `stream` will be released + automatically once the device has completed all work in `stream`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cuStreamDestroy` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + with nogil: + err = cyruntime.cudaStreamDestroy(cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamWaitEvent(stream, event, unsigned int flags): + """ Make a compute stream wait on an event. + + Makes all future work submitted to `stream` wait for all work captured + in `event`. See :py:obj:`~.cudaEventRecord()` for details on what is + captured by an event. The synchronization will be performed efficiently + on the device when applicable. `event` may be from a different device + than `stream`. + + flags include: + + - :py:obj:`~.cudaEventWaitDefault`: Default event creation flag. + + - :py:obj:`~.cudaEventWaitExternal`: Event is captured in the graph as + an external event node when performing stream capture. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to wait + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait on + flags : unsigned int + Parameters for the operation(See above) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamWaitEvent` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + with nogil: + err = cyruntime.cudaStreamWaitEvent(cystream, cyevent, flags) + return (_dict_cudaError_t[err],) + +ctypedef struct cudaStreamCallbackData_st: + cyruntime.cudaStreamCallback_t callback + void *userData + +ctypedef cudaStreamCallbackData_st cudaStreamCallbackData + +@cython.show_performance_hints(False) +cdef void cudaStreamRtCallbackWrapper(cyruntime.cudaStream_t stream, cyruntime.cudaError_t status, void *data) nogil: + cdef cudaStreamCallbackData *cbData = data + with gil: + cbData.callback(stream, status, cbData.userData) + free(cbData) + +@cython.embedsignature(True) +def cudaStreamAddCallback(stream, callback, userData, unsigned int flags): + """ Add a callback to a compute stream. + + Adds a callback to be called on the host after all currently enqueued + items in the stream have completed. For each cudaStreamAddCallback + call, a callback will be executed exactly once. The callback will block + later work in the stream until it is finished. + + The callback may be passed :py:obj:`~.cudaSuccess` or an error code. In + the event of a device error, all subsequently executed callbacks will + receive an appropriate :py:obj:`~.cudaError_t`. + + Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs + may result in :py:obj:`~.cudaErrorNotPermitted`. Callbacks must not + perform any synchronization that may depend on outstanding device work + or other callbacks that are not mandated to run earlier. Callbacks + without a mandated order (in independent streams) execute in undefined + order and may be serialized. + + For the purposes of Unified Memory, callback execution makes a number + of guarantees: + + - The callback stream is considered idle for the duration of the + callback. Thus, for example, a callback may always use memory + attached to the callback stream. + + - The start of execution of a callback has the same effect as + synchronizing an event recorded in the same stream immediately prior + to the callback. It thus synchronizes streams which have been + "joined" prior to the callback. + + - Adding device work to any stream does not have the effect of making + the stream active until all preceding callbacks have executed. Thus, + for example, a callback might use global attached memory even if work + has been added to another stream, if it has been properly ordered + with an event. + + - Completion of a callback does not cause a stream to become active + except as described above. The callback stream will remain idle if no + device work follows the callback, and will remain idle across + consecutive callbacks without device work in between. Thus, for + example, stream synchronization can be done by signaling from a + callback at the end of the stream. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to add callback to + callback : :py:obj:`~.cudaStreamCallback_t` + The function to call once preceding stream operations are complete + userData : Any + User specified data to be passed to the callback function + flags : unsigned int + Reserved for future use, must be 0 + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cudaMallocManaged`, :py:obj:`~.cudaStreamAttachMemAsync`, :py:obj:`~.cudaLaunchHostFunc`, :py:obj:`~.cuStreamAddCallback` + + Notes + ----- + This function is slated for eventual deprecation and removal. If you do not require the callback to execute in case of a device error, consider using :py:obj:`~.cudaLaunchHostFunc`. Additionally, this function is not supported with :py:obj:`~.cudaStreamBeginCapture` and :py:obj:`~.cudaStreamEndCapture`, unlike :py:obj:`~.cudaLaunchHostFunc`. + """ + cdef cyruntime.cudaStreamCallback_t cycallback + if callback is None: + pcallback = 0 + elif isinstance(callback, (cudaStreamCallback_t,)): + pcallback = int(callback) + else: + pcallback = int(cudaStreamCallback_t(callback)) + cycallback = pcallback + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cudaStreamCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (cudaError_t.cudaErrorMemoryAllocation,) + cbData.callback = cycallback + cbData.userData = cyuserData_ptr + + with nogil: + err = cyruntime.cudaStreamAddCallback(cystream, cudaStreamRtCallbackWrapper, cbData, flags) + if err != cyruntime.cudaSuccess: + free(cbData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamSynchronize(stream): + """ Waits for stream tasks to complete. + + Blocks until `stream` has completed all operations. If the + :py:obj:`~.cudaDeviceScheduleBlockingSync` flag was set for this + device, the host thread will block until the stream is finished with + all of its tasks. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamSynchronize` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + with nogil: + err = cyruntime.cudaStreamSynchronize(cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamQuery(stream): + """ Queries an asynchronous stream for completion status. + + Returns :py:obj:`~.cudaSuccess` if all operations in `stream` have + completed, or :py:obj:`~.cudaErrorNotReady` if not. + + For the purposes of Unified Memory, a return value of + :py:obj:`~.cudaSuccess` is equivalent to having called + :py:obj:`~.cudaStreamSynchronize()`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamQuery` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + with nogil: + err = cyruntime.cudaStreamQuery(cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamAttachMemAsync(stream, devPtr, size_t length, unsigned int flags): + """ Attach memory to a stream asynchronously. + + Enqueues an operation in `stream` to specify stream association of + `length` bytes of memory starting from `devPtr`. This function is a + stream-ordered operation, meaning that it is dependent on, and will + only take effect when, previous work in stream has completed. Any + previous association is automatically replaced. + + `devPtr` must point to an one of the following types of memories: + + - managed memory declared using the managed keyword or allocated with + :py:obj:`~.cudaMallocManaged`. + + - a valid host-accessible region of system-allocated pageable memory. + This type of memory may only be specified if the device associated + with the stream reports a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + + For managed allocations, `length` must be either zero or the entire + allocation's size. Both indicate that the entire allocation's stream + association is being changed. Currently, it is not possible to change + stream association for a portion of a managed allocation. + + For pageable allocations, `length` must be non-zero. + + The stream association is specified using `flags` which must be one of + :py:obj:`~.cudaMemAttachGlobal`, :py:obj:`~.cudaMemAttachHost` or + :py:obj:`~.cudaMemAttachSingle`. The default value for `flags` is + :py:obj:`~.cudaMemAttachSingle` If the :py:obj:`~.cudaMemAttachGlobal` + flag is specified, the memory can be accessed by any stream on any + device. If the :py:obj:`~.cudaMemAttachHost` flag is specified, the + program makes a guarantee that it won't access the memory on the device + from any stream on a device that has a zero value for the device + attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. If the + :py:obj:`~.cudaMemAttachSingle` flag is specified and `stream` is + associated with a device that has a zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`, the program makes a + guarantee that it will only access the memory on the device from + `stream`. It is illegal to attach singly to the NULL stream, because + the NULL stream is a virtual global stream and not a specific stream. + An error will be returned in this case. + + When memory is associated with a single stream, the Unified Memory + system will allow CPU access to this memory region so long as all + operations in `stream` have completed, regardless of whether other + streams are active. In effect, this constrains exclusive ownership of + the managed memory region by an active GPU to per-stream activity + instead of whole-GPU activity. + + Accessing memory on the device from streams that are not associated + with it will produce undefined results. No error checking is performed + by the Unified Memory system to ensure that kernels launched into other + streams do not access this region. + + It is a program's responsibility to order calls to + :py:obj:`~.cudaStreamAttachMemAsync` via events, synchronization or + other means to ensure legal access to memory at all times. Data + visibility and coherency will be changed appropriately for all kernels + which follow a stream-association change. + + If `stream` is destroyed while data is associated with it, the + association is removed and the association reverts to the default + visibility of the allocation as specified at + :py:obj:`~.cudaMallocManaged`. For managed variables, the default + association is always :py:obj:`~.cudaMemAttachGlobal`. Note that + destroying a stream is an asynchronous operation, and as a result, the + change to default association won't happen until all work in the stream + has completed. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to enqueue the attach operation + devPtr : Any + Pointer to memory (must be a pointer to managed memory or to a + valid host-accessible region of system-allocated memory) + length : size_t + Length of memory (defaults to zero) + flags : unsigned int + Must be one of :py:obj:`~.cudaMemAttachGlobal`, + :py:obj:`~.cudaMemAttachHost` or :py:obj:`~.cudaMemAttachSingle` + (defaults to :py:obj:`~.cudaMemAttachSingle`) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cudaMallocManaged`, :py:obj:`~.cuStreamAttachMemAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaStreamAttachMemAsync(cystream, cydevPtr_ptr, length, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamBeginCapture(stream, mode not None : cudaStreamCaptureMode): + """ Begins graph capture on a stream. + + Begin graph capture on `stream`. When a stream is in capture mode, all + operations pushed into the stream will not be executed, but will + instead be captured into a graph, which will be returned via + :py:obj:`~.cudaStreamEndCapture`. Capture may not be initiated if + `stream` is :py:obj:`~.cudaStreamLegacy`. Capture must be ended on the + same stream in which it was initiated, and it may only be initiated if + the stream is not already in capture mode. The capture mode may be + queried via :py:obj:`~.cudaStreamIsCapturing`. A unique id representing + the capture sequence may be queried via + :py:obj:`~.cudaStreamGetCaptureInfo`. + + If `mode` is not :py:obj:`~.cudaStreamCaptureModeRelaxed`, + :py:obj:`~.cudaStreamEndCapture` must be called on this stream from the + same thread. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to initiate capture + mode : :py:obj:`~.cudaStreamCaptureMode` + Controls the interaction of this capture sequence with other API + calls that are potentially unsafe. For more details see + :py:obj:`~.cudaThreadExchangeStreamCaptureMode`. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamIsCapturing`, :py:obj:`~.cudaStreamEndCapture`, :py:obj:`~.cudaThreadExchangeStreamCaptureMode` + + Notes + ----- + Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + with nogil: + err = cyruntime.cudaStreamBeginCapture(cystream, cymode) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamBeginCaptureToGraph(stream, graph, dependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], dependencyData : Optional[tuple[cudaGraphEdgeData] | list[cudaGraphEdgeData]], size_t numDependencies, mode not None : cudaStreamCaptureMode): + """ Begins graph capture on a stream to an existing graph. + + Begin graph capture on `stream`. When a stream is in capture mode, all + operations pushed into the stream will not be executed, but will + instead be captured into `graph`, which will be returned via + :py:obj:`~.cudaStreamEndCapture`. + + Capture may not be initiated if `stream` is + :py:obj:`~.cudaStreamLegacy`. Capture must be ended on the same stream + in which it was initiated, and it may only be initiated if the stream + is not already in capture mode. The capture mode may be queried via + :py:obj:`~.cudaStreamIsCapturing`. A unique id representing the capture + sequence may be queried via :py:obj:`~.cudaStreamGetCaptureInfo`. + + If `mode` is not :py:obj:`~.cudaStreamCaptureModeRelaxed`, + :py:obj:`~.cudaStreamEndCapture` must be called on this stream from the + same thread. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to initiate capture. + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to capture into. + dependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the first node captured in the stream. Can be NULL + if numDependencies is 0. + dependencyData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional array of data associated with each dependency. + numDependencies : size_t + Number of dependencies. + mode : :py:obj:`~.cudaStreamCaptureMode` + Controls the interaction of this capture sequence with other API + calls that are potentially unsafe. For more details see + :py:obj:`~.cudaThreadExchangeStreamCaptureMode`. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamIsCapturing`, :py:obj:`~.cudaStreamEndCapture`, :py:obj:`~.cudaThreadExchangeStreamCaptureMode` + + Notes + ----- + Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (cudaGraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cyruntime.cudaGraphEdgeData,] or list[cyruntime.cudaGraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphNode_t* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + with nogil: + err = cyruntime.cudaStreamBeginCaptureToGraph(cystream, cygraph, cydependencies, cydependencyData, numDependencies, cymode) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaThreadExchangeStreamCaptureMode(mode not None : cudaStreamCaptureMode): + """ Swaps the stream capture interaction mode for a thread. + + Sets the calling thread's stream capture interaction mode to the value + contained in `*mode`, and overwrites `*mode` with the previous mode for + the thread. To facilitate deterministic behavior across function or + module boundaries, callers are encouraged to use this API in a push-pop + fashion: + + **View CUDA Toolkit Documentation for a C++ code example** + + During stream capture (see :py:obj:`~.cudaStreamBeginCapture`), some + actions, such as a call to :py:obj:`~.cudaMalloc`, may be unsafe. In + the case of :py:obj:`~.cudaMalloc`, the operation is not enqueued + asynchronously to a stream, and is not observed by stream capture. + Therefore, if the sequence of operations captured via + :py:obj:`~.cudaStreamBeginCapture` depended on the allocation being + replayed whenever the graph is launched, the captured graph would be + invalid. + + Therefore, stream capture places restrictions on API calls that can be + made within or concurrently to a + :py:obj:`~.cudaStreamBeginCapture`-:py:obj:`~.cudaStreamEndCapture` + sequence. This behavior can be controlled via this API and flags to + :py:obj:`~.cudaStreamBeginCapture`. + + A thread's mode is one of the following: + + - `cudaStreamCaptureModeGlobal:` This is the default mode. If the local + thread has an ongoing capture sequence that was not initiated with + `cudaStreamCaptureModeRelaxed` at `cuStreamBeginCapture`, or if any + other thread has a concurrent capture sequence initiated with + `cudaStreamCaptureModeGlobal`, this thread is prohibited from + potentially unsafe API calls. + + - `cudaStreamCaptureModeThreadLocal:` If the local thread has an + ongoing capture sequence not initiated with + `cudaStreamCaptureModeRelaxed`, it is prohibited from potentially + unsafe API calls. Concurrent capture sequences in other threads are + ignored. + + - `cudaStreamCaptureModeRelaxed:` The local thread is not prohibited + from potentially unsafe API calls. Note that the thread is still + prohibited from API calls which necessarily conflict with stream + capture, for example, attempting :py:obj:`~.cudaEventQuery` on an + event that was last recorded inside a capture sequence. + + Parameters + ---------- + mode : :py:obj:`~.cudaStreamCaptureMode` + Pointer to mode value to swap with the current mode + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + mode : :py:obj:`~.cudaStreamCaptureMode` + Pointer to mode value to swap with the current mode + + See Also + -------- + :py:obj:`~.cudaStreamBeginCapture` + """ + cdef cyruntime.cudaStreamCaptureMode cymode = mode.value + with nogil: + err = cyruntime.cudaThreadExchangeStreamCaptureMode(&cymode) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaStreamCaptureMode(cymode)) + +@cython.embedsignature(True) +def cudaStreamEndCapture(stream): + """ Ends capture on a stream, returning the captured graph. + + End capture on `stream`, returning the captured graph via `pGraph`. + Capture must have been initiated on `stream` via a call to + :py:obj:`~.cudaStreamBeginCapture`. If capture was invalidated, due to + a violation of the rules of stream capture, then a NULL graph will be + returned. + + If the `mode` argument to :py:obj:`~.cudaStreamBeginCapture` was not + :py:obj:`~.cudaStreamCaptureModeRelaxed`, this call must be from the + same thread as :py:obj:`~.cudaStreamBeginCapture`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorStreamCaptureWrongThread` + pGraph : :py:obj:`~.cudaGraph_t` + The captured graph + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamIsCapturing`, :py:obj:`~.cudaGraphDestroy` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cudaGraph_t pGraph = cudaGraph_t() + with nogil: + err = cyruntime.cudaStreamEndCapture(cystream, pGraph._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraph) + +@cython.embedsignature(True) +def cudaStreamIsCapturing(stream): + """ Returns a stream's capture status. + + Return the capture status of `stream` via `pCaptureStatus`. After a + successful call, `*pCaptureStatus` will contain one of the following: + + - :py:obj:`~.cudaStreamCaptureStatusNone`: The stream is not capturing. + + - :py:obj:`~.cudaStreamCaptureStatusActive`: The stream is capturing. + + - :py:obj:`~.cudaStreamCaptureStatusInvalidated`: The stream was + capturing but an error has invalidated the capture sequence. The + capture sequence must be terminated with + :py:obj:`~.cudaStreamEndCapture` on the stream where it was initiated + in order to continue using `stream`. + + Note that, if this is called on :py:obj:`~.cudaStreamLegacy` (the "null + stream") while a blocking stream on the same device is capturing, it + will return :py:obj:`~.cudaErrorStreamCaptureImplicit` and + `*pCaptureStatus` is unspecified after the call. The blocking stream + capture is not invalidated. + + When a blocking stream is capturing, the legacy stream is in an + unusable state until the blocking stream capture is terminated. The + legacy stream is not supported for stream capture, but attempted use + would have an implicit dependency on the capturing stream(s). + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorStreamCaptureImplicit` + pCaptureStatus : :py:obj:`~.cudaStreamCaptureStatus` + Returns the stream's capture status + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamEndCapture` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaStreamCaptureStatus pCaptureStatus + with nogil: + err = cyruntime.cudaStreamIsCapturing(cystream, &pCaptureStatus) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaStreamCaptureStatus(pCaptureStatus)) + +@cython.embedsignature(True) +def cudaStreamGetCaptureInfo(stream): + """ Query a stream's capture state. + + Query stream state related to stream capture. + + If called on :py:obj:`~.cudaStreamLegacy` (the "null stream") while a + stream not created with :py:obj:`~.cudaStreamNonBlocking` is capturing, + returns :py:obj:`~.cudaErrorStreamCaptureImplicit`. + + Valid data (other than capture status) is returned only if both of the + following are true: + + - the call returns cudaSuccess + + - the returned capture status is + :py:obj:`~.cudaStreamCaptureStatusActive` + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorStreamCaptureImplicit` + captureStatus_out : :py:obj:`~.cudaStreamCaptureStatus` + Location to return the capture status of the stream; required + id_out : unsigned long long + Optional location to return an id for the capture sequence, which + is unique over the lifetime of the process + graph_out : :py:obj:`~.cudaGraph_t` + Optional location to return the graph being captured into. All + operations other than destroy and node removal are permitted on the + graph while the capture sequence is in progress. This API does not + transfer ownership of the graph, which is transferred or destroyed + at :py:obj:`~.cudaStreamEndCapture`. Note that the graph handle may + be invalidated before end of capture for certain errors. Nodes that + are or become unreachable from the original stream at + :py:obj:`~.cudaStreamEndCapture` due to direct actions on the graph + do not trigger :py:obj:`~.cudaErrorStreamCaptureUnjoined`. + dependencies_out : list[:py:obj:`~.cudaGraphNode_t`] + Optional location to store a pointer to an array of nodes. The next + node to be captured in the stream will depend on this set of nodes, + absent operations such as event wait which modify this set. The + array pointer is valid until the next API call which operates on + the stream or until the capture is terminated. The node handles may + be copied out and are valid until they or the graph is destroyed. + The driver-owned array may also be passed directly to APIs that + operate on the graph (not the stream) without copying. + numDependencies_out : int + Optional location to store the size of the array returned in + dependencies_out. + + See Also + -------- + :py:obj:`~.cudaStreamGetCaptureInfo_v3`, :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamIsCapturing`, :py:obj:`~.cudaStreamUpdateCaptureDependencies` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaStreamCaptureStatus captureStatus_out + cdef unsigned long long id_out = 0 + cdef cudaGraph_t graph_out = cudaGraph_t() + cdef const cyruntime.cudaGraphNode_t* cydependencies_out = NULL + pydependencies_out = [] + cdef size_t numDependencies_out = 0 + with nogil: + err = cyruntime.cudaStreamGetCaptureInfo(cystream, &captureStatus_out, &id_out, graph_out._pvt_ptr, &cydependencies_out, &numDependencies_out) + if cudaError_t(err) == cudaError_t(0): + pydependencies_out = [cudaGraphNode_t(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None, None, None) + return (_dict_cudaError_t[err], cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out) + +@cython.embedsignature(True) +def cudaStreamGetCaptureInfo_v3(stream): + """ Query a stream's capture state (12.3+) + + Query stream state related to stream capture. + + If called on :py:obj:`~.cudaStreamLegacy` (the "null stream") while a + stream not created with :py:obj:`~.cudaStreamNonBlocking` is capturing, + returns :py:obj:`~.cudaErrorStreamCaptureImplicit`. + + Valid data (other than capture status) is returned only if both of the + following are true: + + - the call returns cudaSuccess + + - the returned capture status is + :py:obj:`~.cudaStreamCaptureStatusActive` + + If `edgeData_out` is non-NULL then `dependencies_out` must be as well. + If `dependencies_out` is non-NULL and `edgeData_out` is NULL, but there + is non-zero edge data for one or more of the current stream + dependencies, the call will return :py:obj:`~.cudaErrorLossyQuery`. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorStreamCaptureImplicit`, :py:obj:`~.cudaErrorLossyQuery` + captureStatus_out : :py:obj:`~.cudaStreamCaptureStatus` + Location to return the capture status of the stream; required + id_out : unsigned long long + Optional location to return an id for the capture sequence, which + is unique over the lifetime of the process + graph_out : :py:obj:`~.cudaGraph_t` + Optional location to return the graph being captured into. All + operations other than destroy and node removal are permitted on the + graph while the capture sequence is in progress. This API does not + transfer ownership of the graph, which is transferred or destroyed + at :py:obj:`~.cudaStreamEndCapture`. Note that the graph handle may + be invalidated before end of capture for certain errors. Nodes that + are or become unreachable from the original stream at + :py:obj:`~.cudaStreamEndCapture` due to direct actions on the graph + do not trigger :py:obj:`~.cudaErrorStreamCaptureUnjoined`. + dependencies_out : list[:py:obj:`~.cudaGraphNode_t`] + Optional location to store a pointer to an array of nodes. The next + node to be captured in the stream will depend on this set of nodes, + absent operations such as event wait which modify this set. The + array pointer is valid until the next API call which operates on + the stream or until the capture is terminated. The node handles may + be copied out and are valid until they or the graph is destroyed. + The driver-owned array may also be passed directly to APIs that + operate on the graph (not the stream) without copying. + edgeData_out : list[:py:obj:`~.cudaGraphEdgeData`] + Optional location to store a pointer to an array of graph edge + data. This array parallels `dependencies_out`; the next node to be + added has an edge to `dependencies_out`[i] with annotation + `edgeData_out`[i] for each `i`. The array pointer is valid until + the next API call which operates on the stream or until the capture + is terminated. + numDependencies_out : int + Optional location to store the size of the array returned in + dependencies_out. + + See Also + -------- + :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamIsCapturing`, :py:obj:`~.cudaStreamUpdateCaptureDependencies` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaStreamCaptureStatus captureStatus_out + cdef unsigned long long id_out = 0 + cdef cudaGraph_t graph_out = cudaGraph_t() + cdef const cyruntime.cudaGraphNode_t* cydependencies_out = NULL + pydependencies_out = [] + cdef const cyruntime.cudaGraphEdgeData* cyedgeData_out = NULL + pyedgeData_out = [] + cdef size_t numDependencies_out = 0 + with nogil: + err = cyruntime.cudaStreamGetCaptureInfo_v3(cystream, &captureStatus_out, &id_out, graph_out._pvt_ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) + if cudaError_t(err) == cudaError_t(0): + pydependencies_out = [cudaGraphNode_t(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] + if cudaError_t(err) == cudaError_t(0): + pyedgeData_out = [cudaGraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None, None, None, None) + return (_dict_cudaError_t[err], cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + +@cython.embedsignature(True) +def cudaStreamUpdateCaptureDependencies(stream, dependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, unsigned int flags): + """ Update the set of dependencies in a capturing stream (11.3+) + + Modifies the dependency set of a capturing stream. The dependency set + is the set of nodes that the next captured node in the stream will + depend on. + + Valid flags are :py:obj:`~.cudaStreamAddCaptureDependencies` and + :py:obj:`~.cudaStreamSetCaptureDependencies`. These control whether the + set passed to the API is added to the existing set or replaces it. A + flags value of 0 defaults to + :py:obj:`~.cudaStreamAddCaptureDependencies`. + + Nodes that are removed from the dependency set via this API do not + result in :py:obj:`~.cudaErrorStreamCaptureUnjoined` if they are + unreachable from the stream at :py:obj:`~.cudaStreamEndCapture`. + + Returns :py:obj:`~.cudaErrorIllegalState` if the stream is not + capturing. + + This API is new in CUDA 11.3. Developers requiring compatibility across + minor versions of the CUDA driver to 11.0 should not use this API or + provide a fallback. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to update + dependencies : list[:py:obj:`~.cudaGraphNode_t`] + The set of dependencies to add + numDependencies : size_t + The size of the dependencies array + flags : unsigned int + See above + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorIllegalState` + + See Also + -------- + :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamGetCaptureInfo`, + """ + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphNode_t* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaStreamUpdateCaptureDependencies(cystream, cydependencies, numDependencies, flags) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaStreamUpdateCaptureDependencies_v2(stream, dependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], dependencyData : Optional[tuple[cudaGraphEdgeData] | list[cudaGraphEdgeData]], size_t numDependencies, unsigned int flags): + """ Update the set of dependencies in a capturing stream (12.3+) + + Modifies the dependency set of a capturing stream. The dependency set + is the set of nodes that the next captured node in the stream will + depend on. + + Valid flags are :py:obj:`~.cudaStreamAddCaptureDependencies` and + :py:obj:`~.cudaStreamSetCaptureDependencies`. These control whether the + set passed to the API is added to the existing set or replaces it. A + flags value of 0 defaults to + :py:obj:`~.cudaStreamAddCaptureDependencies`. + + Nodes that are removed from the dependency set via this API do not + result in :py:obj:`~.cudaErrorStreamCaptureUnjoined` if they are + unreachable from the stream at :py:obj:`~.cudaStreamEndCapture`. + + Returns :py:obj:`~.cudaErrorIllegalState` if the stream is not + capturing. + + Parameters + ---------- + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to update + dependencies : list[:py:obj:`~.cudaGraphNode_t`] + The set of dependencies to add + dependencyData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional array of data associated with each dependency. + numDependencies : size_t + The size of the dependencies array + flags : unsigned int + See above + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorIllegalState` + + See Also + -------- + :py:obj:`~.cudaStreamBeginCapture`, :py:obj:`~.cudaStreamGetCaptureInfo`, + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (cudaGraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cyruntime.cudaGraphEdgeData,] or list[cyruntime.cudaGraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphNode_t* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + with nogil: + err = cyruntime.cudaStreamUpdateCaptureDependencies_v2(cystream, cydependencies, cydependencyData, numDependencies, flags) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventCreate(): + """ Creates an event object. + + Creates an event object for the current device using + :py:obj:`~.cudaEventDefault`. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorMemoryAllocation` + event : :py:obj:`~.cudaEvent_t` + Newly created event + + See Also + -------- + cudaEventCreate (C++ API), :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cuEventCreate` + """ + cdef cudaEvent_t event = cudaEvent_t() + with nogil: + err = cyruntime.cudaEventCreate(event._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], event) + +@cython.embedsignature(True) +def cudaEventCreateWithFlags(unsigned int flags): + """ Creates an event object with the specified flags. + + Creates an event object for the current device with the specified + flags. Valid flags include: + + - :py:obj:`~.cudaEventDefault`: Default event creation flag. + + - :py:obj:`~.cudaEventBlockingSync`: Specifies that event should use + blocking synchronization. A host thread that uses + :py:obj:`~.cudaEventSynchronize()` to wait on an event created with + this flag will block until the event actually completes. + + - :py:obj:`~.cudaEventDisableTiming`: Specifies that the created event + does not need to record timing data. Events created with this flag + specified and the :py:obj:`~.cudaEventBlockingSync` flag not + specified will provide the best performance when used with + :py:obj:`~.cudaStreamWaitEvent()` and :py:obj:`~.cudaEventQuery()`. + + - :py:obj:`~.cudaEventInterprocess`: Specifies that the created event + may be used as an interprocess event by + :py:obj:`~.cudaIpcGetEventHandle()`. + :py:obj:`~.cudaEventInterprocess` must be specified along with + :py:obj:`~.cudaEventDisableTiming`. + + Parameters + ---------- + flags : unsigned int + Flags for new event + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorMemoryAllocation` + event : :py:obj:`~.cudaEvent_t` + Newly created event + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cuEventCreate` + """ + cdef cudaEvent_t event = cudaEvent_t() + with nogil: + err = cyruntime.cudaEventCreateWithFlags(event._pvt_ptr, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], event) + +@cython.embedsignature(True) +def cudaEventRecord(event, stream): + """ Records an event. + + Captures in `event` the contents of `stream` at the time of this call. + `event` and `stream` must be on the same CUDA context. Calls such as + :py:obj:`~.cudaEventQuery()` or :py:obj:`~.cudaStreamWaitEvent()` will + then examine or wait for completion of the work that was captured. Uses + of `stream` after this call do not modify `event`. See note on default + stream behavior for what is captured in the default case. + + :py:obj:`~.cudaEventRecord()` can be called multiple times on the same + event and will overwrite the previously captured state. Other APIs such + as :py:obj:`~.cudaStreamWaitEvent()` use the most recently captured + state at the time of the API call, and are not affected by later calls + to :py:obj:`~.cudaEventRecord()`. Before the first call to + :py:obj:`~.cudaEventRecord()`, an event represents an empty set of + work, so for example :py:obj:`~.cudaEventQuery()` would return + :py:obj:`~.cudaSuccess`. + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to record event + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure` + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cuEventRecord` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + with nogil: + err = cyruntime.cudaEventRecord(cyevent, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventRecordWithFlags(event, stream, unsigned int flags): + """ Records an event. + + Captures in `event` the contents of `stream` at the time of this call. + `event` and `stream` must be on the same CUDA context. Calls such as + :py:obj:`~.cudaEventQuery()` or :py:obj:`~.cudaStreamWaitEvent()` will + then examine or wait for completion of the work that was captured. Uses + of `stream` after this call do not modify `event`. See note on default + stream behavior for what is captured in the default case. + + :py:obj:`~.cudaEventRecordWithFlags()` can be called multiple times on + the same event and will overwrite the previously captured state. Other + APIs such as :py:obj:`~.cudaStreamWaitEvent()` use the most recently + captured state at the time of the API call, and are not affected by + later calls to :py:obj:`~.cudaEventRecordWithFlags()`. Before the first + call to :py:obj:`~.cudaEventRecordWithFlags()`, an event represents an + empty set of work, so for example :py:obj:`~.cudaEventQuery()` would + return :py:obj:`~.cudaSuccess`. + + flags include: + + - :py:obj:`~.cudaEventRecordDefault`: Default event creation flag. + + - :py:obj:`~.cudaEventRecordExternal`: Event is captured in the graph + as an external event node when performing stream capture. + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to record + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to record event + flags : unsigned int + Parameters for the operation(See above) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure` + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventRecord`, + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + with nogil: + err = cyruntime.cudaEventRecordWithFlags(cyevent, cystream, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventQuery(event): + """ Queries an event's status. + + Queries the status of all work currently captured by `event`. See + :py:obj:`~.cudaEventRecord()` for details on what is captured by an + event. + + Returns :py:obj:`~.cudaSuccess` if all captured work has been + completed, or :py:obj:`~.cudaErrorNotReady` if any captured work is + incomplete. + + For the purposes of Unified Memory, a return value of + :py:obj:`~.cudaSuccess` is equivalent to having called + :py:obj:`~.cudaEventSynchronize()`. + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure` + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cuEventQuery` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + with nogil: + err = cyruntime.cudaEventQuery(cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventSynchronize(event): + """ Waits for an event to complete. + + Waits until the completion of all work currently captured in `event`. + See :py:obj:`~.cudaEventRecord()` for details on what is captured by an + event. + + Waiting for an event that was created with the + :py:obj:`~.cudaEventBlockingSync` flag will cause the calling CPU + thread to block until the event has been completed by the device. If + the :py:obj:`~.cudaEventBlockingSync` flag has not been set, then the + CPU thread will busy-wait until the event has been completed by the + device. + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to wait for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure` + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cuEventSynchronize` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + with nogil: + err = cyruntime.cudaEventSynchronize(cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventDestroy(event): + """ Destroys an event object. + + Destroys the event specified by `event`. + + An event may be destroyed before it is complete (i.e., while + :py:obj:`~.cudaEventQuery()` would return + :py:obj:`~.cudaErrorNotReady`). In this case, the call does not block + on completion of the event, and any associated resources will + automatically be released asynchronously at completion. + + Parameters + ---------- + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to destroy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure` + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cuEventDestroy` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + with nogil: + err = cyruntime.cudaEventDestroy(cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEventElapsedTime(start, end): + """ Computes the elapsed time between events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cudaEventRecord()` + operation takes place asynchronously and there is no guarantee that the + measured latency is actually just between the two events. Any number of + other different stream operations could execute in between the two + measured events, thus altering the timing in a significant way. + + If :py:obj:`~.cudaEventRecord()` has not been called on either event, + then :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. If + :py:obj:`~.cudaEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cudaEventQuery()` would return :py:obj:`~.cudaErrorNotReady` + on at least one of the events), :py:obj:`~.cudaErrorNotReady` is + returned. If either event was created with the + :py:obj:`~.cudaEventDisableTiming` flag, then this function will return + :py:obj:`~.cudaErrorInvalidResourceHandle`. + + Parameters + ---------- + start : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + end : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorUnknown` + ms : float + Time between `start` and `end` in ms + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventElapsedTime` + """ + cdef cyruntime.cudaEvent_t cyend + if end is None: + pend = 0 + elif isinstance(end, (cudaEvent_t,driver.CUevent)): + pend = int(end) + else: + pend = int(cudaEvent_t(end)) + cyend = pend + cdef cyruntime.cudaEvent_t cystart + if start is None: + pstart = 0 + elif isinstance(start, (cudaEvent_t,driver.CUevent)): + pstart = int(start) + else: + pstart = int(cudaEvent_t(start)) + cystart = pstart + cdef float ms = 0 + with nogil: + err = cyruntime.cudaEventElapsedTime(&ms, cystart, cyend) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ms) + +@cython.embedsignature(True) +def cudaEventElapsedTime_v2(start, end): + """ Computes the elapsed time between events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). Note this API is not guaranteed + to return the latest errors for pending work. As such this API is + intended to serve as a elapsed time calculation only and polling for + completion on the events to be compared should be done with + :py:obj:`~.cudaEventQuery` instead. + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cudaEventRecord()` + operation takes place asynchronously and there is no guarantee that the + measured latency is actually just between the two events. Any number of + other different stream operations could execute in between the two + measured events, thus altering the timing in a significant way. + + If :py:obj:`~.cudaEventRecord()` has not been called on either event, + then :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. If + :py:obj:`~.cudaEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cudaEventQuery()` would return :py:obj:`~.cudaErrorNotReady` + on at least one of the events), :py:obj:`~.cudaErrorNotReady` is + returned. If either event was created with the + :py:obj:`~.cudaEventDisableTiming` flag, then this function will return + :py:obj:`~.cudaErrorInvalidResourceHandle`. + + Parameters + ---------- + start : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + end : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorUnknown` + ms : float + Time between `start` and `end` in ms + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventElapsedTime` + """ + cdef cyruntime.cudaEvent_t cyend + if end is None: + pend = 0 + elif isinstance(end, (cudaEvent_t,driver.CUevent)): + pend = int(end) + else: + pend = int(cudaEvent_t(end)) + cyend = pend + cdef cyruntime.cudaEvent_t cystart + if start is None: + pstart = 0 + elif isinstance(start, (cudaEvent_t,driver.CUevent)): + pstart = int(start) + else: + pstart = int(cudaEvent_t(start)) + cystart = pstart + cdef float ms = 0 + with nogil: + err = cyruntime.cudaEventElapsedTime_v2(&ms, cystart, cyend) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ms) + +@cython.embedsignature(True) +def cudaImportExternalMemory(memHandleDesc : Optional[cudaExternalMemoryHandleDesc]): + """ Imports an external memory object. + + Imports an externally allocated memory object and returns a handle to + that in `extMem_out`. + + The properties of the handle being imported must be described in + `memHandleDesc`. The :py:obj:`~.cudaExternalMemoryHandleDesc` structure + is defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaExternalMemoryHandleDesc.type` specifies the type + of handle being imported. :py:obj:`~.cudaExternalMemoryHandleType` is + defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeOpaqueFd`, then + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::fd must be a valid + file descriptor referencing a memory object. Ownership of the file + descriptor is transferred to the CUDA driver when the handle is + imported successfully. Performing any operations on the file descriptor + after it is imported results in undefined behavior. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeOpaqueWin32`, then exactly one + of :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must not + be NULL. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle is not + NULL, then it must represent a valid shared NT handle that references a + memory object. Ownership of this handle is not transferred to CUDA + after the import operation, so the application must release the handle + using the appropriate system call. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name is not + NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a memory object. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeOpaqueWin32Kmt`, then + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle must be + non-NULL and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must be + NULL. The handle specified must be a globally shared KMT handle. This + handle does not hold a reference to the underlying object, and thus + will be invalid when all references to the memory object are destroyed. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeD3D12Heap`, then exactly one of + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must not + be NULL. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle is not + NULL, then it must represent a valid shared NT handle that is returned + by ID3D12Device::CreateSharedHandle when referring to a ID3D12Heap + object. This handle holds a reference to the underlying object. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name is not + NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D12Heap object. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeD3D12Resource`, then exactly one + of :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must not + be NULL. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle is not + NULL, then it must represent a valid shared NT handle that is returned + by ID3D12Device::CreateSharedHandle when referring to a ID3D12Resource + object. This handle holds a reference to the underlying object. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name is not + NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D12Resource object. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeD3D11Resource`,then exactly one + of :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must not + be NULL. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that is + returned by IDXGIResource1::CreateSharedHandle when referring to a + ID3D11Resource object. If + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name is not + NULL, then it must point to a NULL-terminated array of UTF-16 + characters that refers to a ID3D11Resource object. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeD3D11ResourceKmt`, then + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::handle must be + non-NULL and + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::win32::name must be + NULL. The handle specified must be a valid shared KMT handle that is + returned by IDXGIResource::GetSharedHandle when referring to a + ID3D11Resource object. + + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is + :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, then + :py:obj:`~.cudaExternalMemoryHandleDesc`::handle::nvSciBufObject must + be NON-NULL and reference a valid NvSciBuf object. If the NvSciBuf + object imported into CUDA is also mapped by other drivers, then the + application must use :py:obj:`~.cudaWaitExternalSemaphoresAsync` or + :py:obj:`~.cudaSignalExternalSemaphoresAsync` as approprriate barriers + to maintain coherence between CUDA and the other drivers. See + :py:obj:`~.cudaExternalSemaphoreWaitSkipNvSciBufMemSync` and + :py:obj:`~.cudaExternalSemaphoreSignalSkipNvSciBufMemSync` for memory + synchronization. + + The size of the memory object must be specified in + :py:obj:`~.cudaExternalMemoryHandleDesc.size`. + + Specifying the flag :py:obj:`~.cudaExternalMemoryDedicated` in + :py:obj:`~.cudaExternalMemoryHandleDesc.flags` indicates that the + resource is a dedicated resource. The definition of what a dedicated + resource is outside the scope of this extension. This flag must be set + if :py:obj:`~.cudaExternalMemoryHandleDesc.type` is one of the + following: :py:obj:`~.cudaExternalMemoryHandleTypeD3D12Resource` + :py:obj:`~.cudaExternalMemoryHandleTypeD3D11Resource` + :py:obj:`~.cudaExternalMemoryHandleTypeD3D11ResourceKmt` + + Parameters + ---------- + memHandleDesc : :py:obj:`~.cudaExternalMemoryHandleDesc` + Memory import handle descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorOperatingSystem` + extMem_out : :py:obj:`~.cudaExternalMemory_t` + Returned handle to an external memory object + + See Also + -------- + :py:obj:`~.cudaDestroyExternalMemory`, :py:obj:`~.cudaExternalMemoryGetMappedBuffer`, :py:obj:`~.cudaExternalMemoryGetMappedMipmappedArray` + + Notes + ----- + If the Vulkan memory imported into CUDA is mapped on the CPU then the application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges as well as appropriate Vulkan pipeline barriers to maintain coherence between CPU and GPU. For more information on these APIs, please refer to "Synchronization + and Cache Control" chapter from Vulkan specification. + """ + cdef cudaExternalMemory_t extMem_out = cudaExternalMemory_t() + cdef cyruntime.cudaExternalMemoryHandleDesc* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc is not None else NULL + with nogil: + err = cyruntime.cudaImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], extMem_out) + +@cython.embedsignature(True) +def cudaExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[cudaExternalMemoryBufferDesc]): + """ Maps a buffer onto an imported memory object. + + Maps a buffer onto an imported memory object and returns a device + pointer in `devPtr`. + + The properties of the buffer being mapped must be described in + `bufferDesc`. The :py:obj:`~.cudaExternalMemoryBufferDesc` structure is + defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaExternalMemoryBufferDesc.offset` is the offset in + the memory object where the buffer's base address is. + :py:obj:`~.cudaExternalMemoryBufferDesc.size` is the size of the + buffer. :py:obj:`~.cudaExternalMemoryBufferDesc.flags` must be zero. + + The offset and size have to be suitably aligned to match the + requirements of the external API. Mapping two buffers whose ranges + overlap may or may not result in the same virtual address being + returned for the overlapped portion. In such cases, the application + must ensure that all accesses to that region from the GPU are volatile. + Otherwise writes made via one address are not guaranteed to be visible + via the other address, even if they're issued by the same thread. It is + recommended that applications map the combined range instead of mapping + separate buffers and then apply the appropriate offsets to the returned + pointer to derive the individual buffers. + + The returned pointer `devPtr` must be freed using :py:obj:`~.cudaFree`. + + Parameters + ---------- + extMem : :py:obj:`~.cudaExternalMemory_t` + Handle to external memory object + bufferDesc : :py:obj:`~.cudaExternalMemoryBufferDesc` + Buffer descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + devPtr : Any + Returned device pointer to buffer + + See Also + -------- + :py:obj:`~.cudaImportExternalMemory`, :py:obj:`~.cudaDestroyExternalMemory`, :py:obj:`~.cudaExternalMemoryGetMappedMipmappedArray` + """ + cdef cyruntime.cudaExternalMemory_t cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (cudaExternalMemory_t,)): + pextMem = int(extMem) + else: + pextMem = int(cudaExternalMemory_t(extMem)) + cyextMem = pextMem + cdef void_ptr devPtr = 0 + cdef cyruntime.cudaExternalMemoryBufferDesc* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc is not None else NULL + with nogil: + err = cyruntime.cudaExternalMemoryGetMappedBuffer(&devPtr, cyextMem, cybufferDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], devPtr) + +@cython.embedsignature(True) +def cudaExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[cudaExternalMemoryMipmappedArrayDesc]): + """ Maps a CUDA mipmapped array onto an external memory object. + + Maps a CUDA mipmapped array onto an external object and returns a + handle to it in `mipmap`. + + The properties of the CUDA mipmapped array being mapped must be + described in `mipmapDesc`. The structure + :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc` is defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.offset` is the + offset in the memory object where the base level of the mipmap chain + is. :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.formatDesc` + describes the format of the data. + :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.extent` specifies the + dimensions of the base level of the mipmap chain. + :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.flags` are flags + associated with CUDA mipmapped arrays. For further details, please + refer to the documentation for :py:obj:`~.cudaMalloc3DArray`. Note that + if the mipmapped array is bound as a color target in the graphics API, + then the flag :py:obj:`~.cudaArrayColorAttachment` must be specified in + :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.flags`. + :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.numLevels` specifies + the total number of levels in the mipmap chain. + + The returned CUDA mipmapped array must be freed using + :py:obj:`~.cudaFreeMipmappedArray`. + + Parameters + ---------- + extMem : :py:obj:`~.cudaExternalMemory_t` + Handle to external memory object + mipmapDesc : :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc` + CUDA array descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + mipmap : :py:obj:`~.cudaMipmappedArray_t` + Returned CUDA mipmapped array + + See Also + -------- + :py:obj:`~.cudaImportExternalMemory`, :py:obj:`~.cudaDestroyExternalMemory`, :py:obj:`~.cudaExternalMemoryGetMappedBuffer` + + Notes + ----- + If :py:obj:`~.cudaExternalMemoryHandleDesc.type` is :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`, then :py:obj:`~.cudaExternalMemoryMipmappedArrayDesc.numLevels` must not be greater than 1. + """ + cdef cyruntime.cudaExternalMemory_t cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (cudaExternalMemory_t,)): + pextMem = int(extMem) + else: + pextMem = int(cudaExternalMemory_t(extMem)) + cyextMem = pextMem + cdef cudaMipmappedArray_t mipmap = cudaMipmappedArray_t() + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc is not None else NULL + with nogil: + err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], mipmap) + +@cython.embedsignature(True) +def cudaDestroyExternalMemory(extMem): + """ Destroys an external memory object. + + Destroys the specified external memory object. Any existing buffers and + CUDA mipmapped arrays mapped onto this object must no longer be used + and must be explicitly freed using :py:obj:`~.cudaFree` and + :py:obj:`~.cudaFreeMipmappedArray` respectively. + + Parameters + ---------- + extMem : :py:obj:`~.cudaExternalMemory_t` + External memory object to be destroyed + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaImportExternalMemory`, :py:obj:`~.cudaExternalMemoryGetMappedBuffer`, :py:obj:`~.cudaExternalMemoryGetMappedMipmappedArray` + """ + cdef cyruntime.cudaExternalMemory_t cyextMem + if extMem is None: + pextMem = 0 + elif isinstance(extMem, (cudaExternalMemory_t,)): + pextMem = int(extMem) + else: + pextMem = int(cudaExternalMemory_t(extMem)) + cyextMem = pextMem + with nogil: + err = cyruntime.cudaDestroyExternalMemory(cyextMem) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaImportExternalSemaphore(semHandleDesc : Optional[cudaExternalSemaphoreHandleDesc]): + """ Imports an external semaphore. + + Imports an externally allocated synchronization object and returns a + handle to that in `extSem_out`. + + The properties of the handle being imported must be described in + `semHandleDesc`. The :py:obj:`~.cudaExternalSemaphoreHandleDesc` is + defined as follows: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` specifies the + type of handle being imported. + :py:obj:`~.cudaExternalSemaphoreHandleType` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueFd`, then + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::fd must be a valid + file descriptor referencing a synchronization object. Ownership of the + file descriptor is transferred to the CUDA driver when the handle is + imported successfully. Performing any operations on the file descriptor + after it is imported results in undefined behavior. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32`, then exactly + one of + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name must + not be NULL. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that + references a synchronization object. Ownership of this handle is not + transferred to CUDA after the import operation, so the application must + release the handle using the appropriate system call. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name is not + NULL, then it must name a valid synchronization object. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt`, then + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle must + be non-NULL and + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name must + be NULL. The handle specified must be a globally shared KMT handle. + This handle does not hold a reference to the underlying object, and + thus will be invalid when all references to the synchronization object + are destroyed. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D12Fence`, then exactly one + of :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle + and :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name + must not be NULL. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that is + returned by ID3D12Device::CreateSharedHandle when referring to a + ID3D12Fence object. This handle holds a reference to the underlying + object. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name is not + NULL, then it must name a valid synchronization object that refers to a + valid ID3D12Fence object. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D11Fence`, then exactly one + of :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle + and :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name + must not be NULL. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that is + returned by ID3D11Fence::CreateSharedHandle. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name is not + NULL, then it must name a valid synchronization object that refers to a + valid ID3D11Fence object. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync`, then + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::nvSciSyncObj + represents a valid NvSciSyncObj. + + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutex`, then exactly one + of :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle + and :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name + must not be NULL. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle is + not NULL, then it represent a valid shared NT handle that is returned + by IDXGIResource1::CreateSharedHandle when referring to a + IDXGIKeyedMutex object. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutexKmt`, then + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle must + be non-NULL and + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name must + be NULL. The handle specified must represent a valid KMT handle that is + returned by IDXGIResource::GetSharedHandle when referring to a + IDXGIKeyedMutex object. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd`, then + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::fd must be a valid + file descriptor referencing a synchronization object. Ownership of the + file descriptor is transferred to the CUDA driver when the handle is + imported successfully. Performing any operations on the file descriptor + after it is imported results in undefined behavior. + + If :py:obj:`~.cudaExternalSemaphoreHandleDesc.type` is + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32`, then + exactly one of + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle and + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name must + not be NULL. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::handle is + not NULL, then it must represent a valid shared NT handle that + references a synchronization object. Ownership of this handle is not + transferred to CUDA after the import operation, so the application must + release the handle using the appropriate system call. If + :py:obj:`~.cudaExternalSemaphoreHandleDesc`::handle::win32::name is not + NULL, then it must name a valid synchronization object. + + Parameters + ---------- + semHandleDesc : :py:obj:`~.cudaExternalSemaphoreHandleDesc` + Semaphore import handle descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorOperatingSystem` + extSem_out : :py:obj:`~.cudaExternalSemaphore_t` + Returned handle to an external semaphore + + See Also + -------- + :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cudaExternalSemaphore_t extSem_out = cudaExternalSemaphore_t() + cdef cyruntime.cudaExternalSemaphoreHandleDesc* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc is not None else NULL + with nogil: + err = cyruntime.cudaImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], extSem_out) + +@cython.embedsignature(True) +def cudaSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalSemaphore_t] | list[cudaExternalSemaphore_t]], paramsArray : Optional[tuple[cudaExternalSemaphoreSignalParams] | list[cudaExternalSemaphoreSignalParams]], unsigned int numExtSems, stream): + """ Signals a set of external semaphore objects. + + Enqueues a signal operation on a set of externally allocated semaphore + object in the specified stream. The operations will be executed when + all prior operations in the stream complete. + + The exact semantics of signaling a semaphore depends on the type of the + object. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueFd`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt` then + signaling the semaphore will set it to the signaled state. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D12Fence`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D11Fence`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32` then + the semaphore will be set to the value specified in + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::fence::value. + + If the semaphore object is of the type + :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync` this API sets + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::nvSciSync::fence + to a value that can be used by subsequent waiters of the same NvSciSync + object to order operations with those currently submitted in `stream`. + Such an update will overwrite previous contents of + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::nvSciSync::fence. + By default, signaling such an external semaphore object causes + appropriate memory synchronization operations to be performed over all + the external memory objects that are imported as + :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`. This ensures that any + subsequent accesses made by other importers of the same set of NvSciBuf + memory object(s) are coherent. These operations can be skipped by + specifying the flag + :py:obj:`~.cudaExternalSemaphoreSignalSkipNvSciBufMemSync`, which can + be used as a performance optimization when data coherency is not + required. But specifying this flag in scenarios where data coherency is + required results in undefined behavior. Also, for semaphore object of + the type :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync`, if the + NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags + in :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` to + cudaNvSciSyncAttrSignal, this API will return cudaErrorNotSupported. + + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::nvSciSync::fence + associated with semaphore object of the type + :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync` can be + deterministic. For this the NvSciSyncAttrList used to create the + semaphore object must have value of + NvSciSyncAttrKey_RequireDeterministicFences key set to true. + Deterministic fences allow users to enqueue a wait over the semaphore + object even before corresponding signal is enqueued. For such a + semaphore object, CUDA guarantees that each signal operation will + increment the fence value by '1'. Users are expected to track count of + signals enqueued on the semaphore object and insert waits accordingly. + When such a semaphore object is signaled from multiple streams, due to + concurrent stream execution, it is possible that the order in which the + semaphore gets signaled is indeterministic. This could lead to waiters + of the semaphore getting unblocked incorrectly. Users are expected to + handle such situations, either by not using the same semaphore object + with deterministic fence support enabled in different streams or by + adding explicit dependency amongst such streams so that the semaphore + is signaled in order. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutex`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutexKmt`, then the + keyed mutex will be released with the key specified in + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::keyedmutex::key. + + Parameters + ---------- + extSemArray : list[:py:obj:`~.cudaExternalSemaphore_t`] + Set of external semaphores to be signaled + paramsArray : list[:py:obj:`~.cudaExternalSemaphoreSignalParams`] + Array of semaphore parameters + numExtSems : unsigned int + Number of semaphores to signal + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue the signal operations in + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + paramsArray = [] if paramsArray is None else paramsArray + if not all(isinstance(_x, (cudaExternalSemaphoreSignalParams,)) for _x in paramsArray): + raise TypeError("Argument 'paramsArray' is not instance of type (expected tuple[cyruntime.cudaExternalSemaphoreSignalParams,] or list[cyruntime.cudaExternalSemaphoreSignalParams,]") + extSemArray = [] if extSemArray is None else extSemArray + if not all(isinstance(_x, (cudaExternalSemaphore_t,)) for _x in extSemArray): + raise TypeError("Argument 'extSemArray' is not instance of type (expected tuple[cyruntime.cudaExternalSemaphore_t,] or list[cyruntime.cudaExternalSemaphore_t,]") + cdef cyruntime.cudaExternalSemaphore_t* cyextSemArray = NULL + if len(extSemArray) > 1: + cyextSemArray = calloc(len(extSemArray), sizeof(cyruntime.cudaExternalSemaphore_t)) + if cyextSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + else: + for idx in range(len(extSemArray)): + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] + elif len(extSemArray) == 1: + cyextSemArray = (extSemArray[0])._pvt_ptr + cdef cyruntime.cudaExternalSemaphoreSignalParams* cyparamsArray = NULL + if len(paramsArray) > 1: + cyparamsArray = calloc(len(paramsArray), sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + if cyparamsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) + for idx in range(len(paramsArray)): + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + elif len(paramsArray) == 1: + cyparamsArray = (paramsArray[0])._pvt_ptr + if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) + if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) + with nogil: + err = cyruntime.cudaSignalExternalSemaphoresAsync(cyextSemArray, cyparamsArray, numExtSems, cystream) + if len(extSemArray) > 1 and cyextSemArray is not NULL: + free(cyextSemArray) + if len(paramsArray) > 1 and cyparamsArray is not NULL: + free(cyparamsArray) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalSemaphore_t] | list[cudaExternalSemaphore_t]], paramsArray : Optional[tuple[cudaExternalSemaphoreWaitParams] | list[cudaExternalSemaphoreWaitParams]], unsigned int numExtSems, stream): + """ Waits on a set of external semaphore objects. + + Enqueues a wait operation on a set of externally allocated semaphore + object in the specified stream. The operations will be executed when + all prior operations in the stream complete. + + The exact semantics of waiting on a semaphore depends on the type of + the object. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueFd`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt` then waiting + on the semaphore will wait until the semaphore reaches the signaled + state. The semaphore will then be reset to the unsignaled state. + Therefore for every signal operation, there can only be one wait + operation. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D12Fence`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeD3D11Fence`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32` then + waiting on the semaphore will wait until the value of the semaphore is + greater than or equal to + :py:obj:`~.cudaExternalSemaphoreWaitParams`::params::fence::value. + + If the semaphore object is of the type + :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync` then, waiting on + the semaphore will wait until the + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::nvSciSync::fence + is signaled by the signaler of the NvSciSyncObj that was associated + with this semaphore object. By default, waiting on such an external + semaphore object causes appropriate memory synchronization operations + to be performed over all external memory objects that are imported as + :py:obj:`~.cudaExternalMemoryHandleTypeNvSciBuf`. This ensures that any + subsequent accesses made by other importers of the same set of NvSciBuf + memory object(s) are coherent. These operations can be skipped by + specifying the flag + :py:obj:`~.cudaExternalSemaphoreWaitSkipNvSciBufMemSync`, which can be + used as a performance optimization when data coherency is not required. + But specifying this flag in scenarios where data coherency is required + results in undefined behavior. Also, for semaphore object of the type + :py:obj:`~.cudaExternalSemaphoreHandleTypeNvSciSync`, if the + NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags + in :py:obj:`~.cudaDeviceGetNvSciSyncAttributes` to + cudaNvSciSyncAttrWait, this API will return cudaErrorNotSupported. + + If the semaphore object is any one of the following types: + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutex`, + :py:obj:`~.cudaExternalSemaphoreHandleTypeKeyedMutexKmt`, then the + keyed mutex will be acquired when it is released with the key specified + in + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::keyedmutex::key + or until the timeout specified by + :py:obj:`~.cudaExternalSemaphoreSignalParams`::params::keyedmutex::timeoutMs + has lapsed. The timeout interval can either be a finite value specified + in milliseconds or an infinite value. In case an infinite value is + specified the timeout never elapses. The windows INFINITE macro must be + used to specify infinite timeout + + Parameters + ---------- + extSemArray : list[:py:obj:`~.cudaExternalSemaphore_t`] + External semaphores to be waited on + paramsArray : list[:py:obj:`~.cudaExternalSemaphoreWaitParams`] + Array of semaphore parameters + numExtSems : unsigned int + Number of semaphores to wait on + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue the wait operations in + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle` :py:obj:`~.cudaErrorTimeout` + + See Also + -------- + :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + paramsArray = [] if paramsArray is None else paramsArray + if not all(isinstance(_x, (cudaExternalSemaphoreWaitParams,)) for _x in paramsArray): + raise TypeError("Argument 'paramsArray' is not instance of type (expected tuple[cyruntime.cudaExternalSemaphoreWaitParams,] or list[cyruntime.cudaExternalSemaphoreWaitParams,]") + extSemArray = [] if extSemArray is None else extSemArray + if not all(isinstance(_x, (cudaExternalSemaphore_t,)) for _x in extSemArray): + raise TypeError("Argument 'extSemArray' is not instance of type (expected tuple[cyruntime.cudaExternalSemaphore_t,] or list[cyruntime.cudaExternalSemaphore_t,]") + cdef cyruntime.cudaExternalSemaphore_t* cyextSemArray = NULL + if len(extSemArray) > 1: + cyextSemArray = calloc(len(extSemArray), sizeof(cyruntime.cudaExternalSemaphore_t)) + if cyextSemArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) + else: + for idx in range(len(extSemArray)): + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] + elif len(extSemArray) == 1: + cyextSemArray = (extSemArray[0])._pvt_ptr + cdef cyruntime.cudaExternalSemaphoreWaitParams* cyparamsArray = NULL + if len(paramsArray) > 1: + cyparamsArray = calloc(len(paramsArray), sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + if cyparamsArray is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) + for idx in range(len(paramsArray)): + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + elif len(paramsArray) == 1: + cyparamsArray = (paramsArray[0])._pvt_ptr + if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) + if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) + with nogil: + err = cyruntime.cudaWaitExternalSemaphoresAsync(cyextSemArray, cyparamsArray, numExtSems, cystream) + if len(extSemArray) > 1 and cyextSemArray is not NULL: + free(cyextSemArray) + if len(paramsArray) > 1 and cyparamsArray is not NULL: + free(cyparamsArray) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDestroyExternalSemaphore(extSem): + """ Destroys an external semaphore. + + Destroys an external semaphore object and releases any references to + the underlying resource. Any outstanding signals or waits must have + completed before the semaphore is destroyed. + + Parameters + ---------- + extSem : :py:obj:`~.cudaExternalSemaphore_t` + External semaphore to be destroyed + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaExternalSemaphore_t cyextSem + if extSem is None: + pextSem = 0 + elif isinstance(extSem, (cudaExternalSemaphore_t,)): + pextSem = int(extSem) + else: + pextSem = int(cudaExternalSemaphore_t(extSem)) + cyextSem = pextSem + with nogil: + err = cyruntime.cudaDestroyExternalSemaphore(cyextSem) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFuncSetCacheConfig(func, cacheConfig not None : cudaFuncCache): + """ Sets the preferred cache configuration for a device function. + + On devices where the L1 cache and shared memory use the same hardware + resources, this sets through `cacheConfig` the preferred cache + configuration for the function specified via `func`. This is only a + preference. The runtime will use the requested configuration if + possible, but it is free to choose a different configuration if + required to execute `func`. + + `func` is a device function symbol and must be declared as a `None` + function. If the specified function does not exist, then + :py:obj:`~.cudaErrorInvalidDeviceFunction` is returned. For templated + functions, pass the function symbol as follows: + func_name + + This setting does nothing on devices where the size of the L1 cache and + shared memory are fixed. + + Launching a kernel with a different preference than the most recent + preference setting may insert a device-side synchronization point. + + The supported cache configurations are: + + - :py:obj:`~.cudaFuncCachePreferNone`: no preference for shared memory + or L1 (default) + + - :py:obj:`~.cudaFuncCachePreferShared`: prefer larger shared memory + and smaller L1 cache + + - :py:obj:`~.cudaFuncCachePreferL1`: prefer larger L1 cache and smaller + shared memory + + - :py:obj:`~.cudaFuncCachePreferEqual`: prefer equal size L1 cache and + shared memory + + Parameters + ---------- + func : Any + Device function symbol + cacheConfig : :py:obj:`~.cudaFuncCache` + Requested cache configuration + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`2 + + See Also + -------- + cudaFuncSetCacheConfig (C++ API), :py:obj:`~.cudaFuncGetAttributes (C API)`, :py:obj:`~.cudaLaunchKernel (C API)`, :py:obj:`~.cuFuncSetCacheConfig` + + Notes + ----- + This API does not accept a :py:obj:`~.cudaKernel_t` casted as void*. If cache config modification is required for a :py:obj:`~.cudaKernel_t` (or a global function), it can be replaced with a call to :py:obj:`~.cudaFuncSetAttributes` with the attribute :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout` to specify a more granular L1 cache and shared memory split configuration. + """ + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + cdef cyruntime.cudaFuncCache cycacheConfig = cacheConfig.value + with nogil: + err = cyruntime.cudaFuncSetCacheConfig(cyfunc_ptr, cycacheConfig) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFuncGetAttributes(func): + """ Find out attributes for a given function. + + This function obtains the attributes of a function specified via + `func`. `func` is a device function symbol and must be declared as a + `None` function. The fetched attributes are placed in `attr`. If the + specified function does not exist, then it is assumed to be a + :py:obj:`~.cudaKernel_t` and used as is. For templated functions, pass + the function symbol as follows: + func_name + + Note that some function attributes such as + :py:obj:`~.maxThreadsPerBlock` may vary based on the device that is + currently being used. + + Parameters + ---------- + func : Any + Device function symbol + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`2 + attr : :py:obj:`~.cudaFuncAttributes` + Return pointer to function's attributes + + See Also + -------- + :py:obj:`~.cudaFuncSetCacheConfig (C API)`, cudaFuncGetAttributes (C++ API), :py:obj:`~.cudaLaunchKernel (C API)`, :py:obj:`~.cuFuncGetAttribute` + """ + cdef cudaFuncAttributes attr = cudaFuncAttributes() + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + with nogil: + err = cyruntime.cudaFuncGetAttributes(attr._pvt_ptr, cyfunc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], attr) + +@cython.embedsignature(True) +def cudaFuncSetAttribute(func, attr not None : cudaFuncAttribute, int value): + """ Set attributes for a given function. + + This function sets the attributes of a function specified via `func`. + The parameter `func` must be a pointer to a function that executes on + the device. The parameter specified by `func` must be declared as a + `None` function. The enumeration defined by `attr` is set to the value + defined by `value`. If the specified function does not exist, then it + is assumed to be a :py:obj:`~.cudaKernel_t` and used as is. If the + specified attribute cannot be written, or if the value is incorrect, + then :py:obj:`~.cudaErrorInvalidValue` is returned. + + Valid values for `attr` are: + + - :py:obj:`~.cudaFuncAttributeMaxDynamicSharedMemorySize` - The + requested maximum size in bytes of dynamically-allocated shared + memory. The sum of this value and the function attribute + :py:obj:`~.sharedSizeBytes` cannot exceed the device attribute + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin`. The maximal size + of requestable dynamic shared memory may differ by GPU architecture. + + - :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout` - On + devices where the L1 cache and shared memory use the same hardware + resources, this sets the shared memory carveout preference, in + percent of the total shared memory. See + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerMultiprocessor`. This is only + a hint, and the driver can choose a different ratio if required to + execute the function. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterWidth`: The required + cluster width in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterHeight`: The required + cluster height in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterDepth`: The required + cluster depth in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeNonPortableClusterSizeAllowed`: Indicates + whether the function can be launched with non-portable cluster size. + 1 is allowed, 0 is disallowed. + + - :py:obj:`~.cudaFuncAttributeClusterSchedulingPolicyPreference`: The + block scheduling policy of a function. The value type is + cudaClusterSchedulingPolicy. + + cudaLaunchKernel (C++ API), cudaFuncSetCacheConfig (C++ API), + :py:obj:`~.cudaFuncGetAttributes (C API)`, + + Parameters + ---------- + func : Any + Function to get attributes of + attr : :py:obj:`~.cudaFuncAttribute` + Attribute to set + value : int + Value to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue` + """ + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + cdef cyruntime.cudaFuncAttribute cyattr = attr.value + with nogil: + err = cyruntime.cudaFuncSetAttribute(cyfunc_ptr, cyattr, value) + return (_dict_cudaError_t[err],) + +ctypedef struct cudaStreamHostCallbackData_st: + cyruntime.cudaHostFn_t callback + void *userData + +ctypedef cudaStreamHostCallbackData_st cudaStreamHostCallbackData + +@cython.show_performance_hints(False) +cdef void cudaStreamRtHostCallbackWrapper(void *data) nogil: + cdef cudaStreamHostCallbackData *cbData = data + with gil: + cbData.callback(cbData.userData) + free(cbData) + +@cython.embedsignature(True) +def cudaLaunchHostFunc(stream, fn, userData): + """ Enqueues a host function call in a stream. + + Enqueues a host function to run in a stream. The function will be + called after currently enqueued work and will block work added after + it. + + The host function must not make any CUDA API calls. Attempting to use a + CUDA API may result in :py:obj:`~.cudaErrorNotPermitted`, but this is + not required. The host function must not perform any synchronization + that may depend on outstanding CUDA work not mandated to run earlier. + Host functions without a mandated order (such as in independent + streams) execute in undefined order and may be serialized. + + For the purposes of Unified Memory, execution makes a number of + guarantees: + + - The stream is considered idle for the duration of the function's + execution. Thus, for example, the function may always use memory + attached to the stream it was enqueued in. + + - The start of execution of the function has the same effect as + synchronizing an event recorded in the same stream immediately prior + to the function. It thus synchronizes streams which have been + "joined" prior to the function. + + - Adding device work to any stream does not have the effect of making + the stream active until all preceding host functions and stream + callbacks have executed. Thus, for example, a function might use + global attached memory even if work has been added to another stream, + if the work has been ordered behind the function call with an event. + + - Completion of the function does not cause a stream to become active + except as described above. The stream will remain idle if no device + work follows the function, and will remain idle across consecutive + host functions or stream callbacks without device work in between. + Thus, for example, stream synchronization can be done by signaling + from a host function at the end of the stream. + + Note that, in constrast to :py:obj:`~.cuStreamAddCallback`, the + function will not be called in the event of an error in the CUDA + context. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue function call in + fn : :py:obj:`~.cudaHostFn_t` + The function to call once preceding stream operations are complete + userData : Any + User-specified data to be passed to the function + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cudaMallocManaged`, :py:obj:`~.cudaStreamAttachMemAsync`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cuLaunchHostFunc` + """ + cdef cyruntime.cudaHostFn_t cyfn + if fn is None: + pfn = 0 + elif isinstance(fn, (cudaHostFn_t,)): + pfn = int(fn) + else: + pfn = int(cudaHostFn_t(fn)) + cyfn = pfn + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cyuserData = _HelperInputVoidPtr(userData) + cdef void* cyuserData_ptr = cyuserData.cptr + + cdef cudaStreamHostCallbackData *cbData = NULL + cbData = malloc(sizeof(cbData[0])) + if cbData == NULL: + return (cudaError_t.cudaErrorMemoryAllocation,) + cbData.callback = cyfn + cbData.userData = cyuserData_ptr + + with nogil: + err = cyruntime.cudaLaunchHostFunc(cystream, cudaStreamRtHostCallbackWrapper, cbData) + if err != cyruntime.cudaSuccess: + free(cbData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFuncSetSharedMemConfig(func, config not None : cudaSharedMemConfig): + """ Sets the shared memory configuration for a device function. + + [Deprecated] + + On devices with configurable shared memory banks, this function will + force all subsequent launches of the specified device function to have + the given shared memory bank size configuration. On any given launch of + the function, the shared memory configuration of the device will be + temporarily changed if needed to suit the function's preferred + configuration. Changes in shared memory configuration between + subsequent launches of functions, may introduce a device side + synchronization point. + + Any per-function setting of shared memory bank size set via + :py:obj:`~.cudaFuncSetSharedMemConfig` will override the device wide + setting set by :py:obj:`~.cudaDeviceSetSharedMemConfig`. + + Changing the shared memory bank size will not increase shared memory + usage or affect occupancy of kernels, but may have major effects on + performance. Larger bank sizes will allow for greater potential + bandwidth to shared memory, but will change what kinds of accesses to + shared memory will result in bank conflicts. + + This function will do nothing on devices with fixed shared memory bank + size. + + For templated functions, pass the function symbol as follows: + func_name + + The supported bank configurations are: + + - :py:obj:`~.cudaSharedMemBankSizeDefault`: use the device's shared + memory configuration when launching this function. + + - :py:obj:`~.cudaSharedMemBankSizeFourByte`: set shared memory bank + width to be four bytes natively when launching this function. + + - :py:obj:`~.cudaSharedMemBankSizeEightByte`: set shared memory bank + width to be eight bytes natively when launching this function. + + Parameters + ---------- + func : Any + Device function symbol + config : :py:obj:`~.cudaSharedMemConfig` + Requested shared memory configuration + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue`,2 + + See Also + -------- + :py:obj:`~.cudaDeviceSetSharedMemConfig`, :py:obj:`~.cudaDeviceGetSharedMemConfig`, :py:obj:`~.cudaDeviceSetCacheConfig`, :py:obj:`~.cudaDeviceGetCacheConfig`, :py:obj:`~.cudaFuncSetCacheConfig`, :py:obj:`~.cuFuncSetSharedMemConfig` + """ + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + cdef cyruntime.cudaSharedMemConfig cyconfig = config.value + with nogil: + err = cyruntime.cudaFuncSetSharedMemConfig(cyfunc_ptr, cyconfig) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize): + """ Returns occupancy for a device function. + + Returns in `*numBlocks` the maximum number of active blocks per + streaming multiprocessor for the device function. + + Parameters + ---------- + func : Any + Kernel function for which occupancy is calculated + blockSize : int + Block size the kernel is intended to be launched with + dynamicSMemSize : size_t + Per-block dynamic shared memory usage intended, in bytes + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown`, + numBlocks : int + Returned occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`, cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API), cudaOccupancyAvailableDynamicSMemPerBlock (C++ API), :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` + """ + cdef int numBlocks = 0 + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + with nogil: + err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], numBlocks) + +@cython.embedsignature(True) +def cudaOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize): + """ Returns dynamic shared memory available per block when launching `numBlocks` blocks on SM. + + Returns in `*dynamicSmemSize` the maximum size of dynamic shared memory + to allow `numBlocks` blocks per SM. + + Parameters + ---------- + func : Any + Kernel function for which occupancy is calculated + numBlocks : int + Number of blocks to fit on SM + blockSize : int + Size of the block + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown`, + dynamicSmemSize : int + Returned maximum dynamic shared memory + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags`, cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API), :py:obj:`~.cudaOccupancyAvailableDynamicSMemPerBlock` + """ + cdef size_t dynamicSmemSize = 0 + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + with nogil: + err = cyruntime.cudaOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc_ptr, numBlocks, blockSize) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], dynamicSmemSize) + +@cython.embedsignature(True) +def cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags): + """ Returns occupancy for a device function with the specified flags. + + Returns in `*numBlocks` the maximum number of active blocks per + streaming multiprocessor for the device function. + + The `flags` parameter controls how special cases are handled. Valid + flags include: + + - :py:obj:`~.cudaOccupancyDefault`: keeps the default behavior as + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` + + - :py:obj:`~.cudaOccupancyDisableCachingOverride`: This flag suppresses + the default behavior on platform where global caching affects + occupancy. On such platforms, if caching is enabled, but per-block SM + resource usage would result in zero occupancy, the occupancy + calculator will calculate the occupancy as if caching is disabled. + Setting this flag makes the occupancy calculator to return 0 in such + cases. More information can be found about this feature in the + "Unified L1/Texture Cache" section of the Maxwell tuning guide. + + Parameters + ---------- + func : Any + Kernel function for which occupancy is calculated + blockSize : int + Block size the kernel is intended to be launched with + dynamicSMemSize : size_t + Per-block dynamic shared memory usage intended, in bytes + flags : unsigned int + Requested behavior for the occupancy calculator + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown`, + numBlocks : int + Returned occupancy + + See Also + -------- + :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor`, cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API), cudaOccupancyAvailableDynamicSMemPerBlock (C++ API), :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` + """ + cdef int numBlocks = 0 + cyfunc = _HelperInputVoidPtr(func) + cdef void* cyfunc_ptr = cyfunc.cptr + with nogil: + err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], numBlocks) + +@cython.embedsignature(True) +def cudaMallocManaged(size_t size, unsigned int flags): + """ Allocates memory that will be automatically managed by the Unified Memory system. + + Allocates `size` bytes of managed memory on the device and returns in + `*devPtr` a pointer to the allocated memory. If the device doesn't + support allocating managed memory, :py:obj:`~.cudaErrorNotSupported` is + returned. Support for managed memory can be queried using the device + attribute :py:obj:`~.cudaDevAttrManagedMemory`. The allocated memory is + suitably aligned for any kind of variable. The memory is not cleared. + If `size` is 0, :py:obj:`~.cudaMallocManaged` returns + :py:obj:`~.cudaErrorInvalidValue`. The pointer is valid on the CPU and + on all GPUs in the system that support managed memory. All accesses to + this pointer must obey the Unified Memory programming model. + + `flags` specifies the default stream association for this allocation. + `flags` must be one of :py:obj:`~.cudaMemAttachGlobal` or + :py:obj:`~.cudaMemAttachHost`. The default value for `flags` is + :py:obj:`~.cudaMemAttachGlobal`. If :py:obj:`~.cudaMemAttachGlobal` is + specified, then this memory is accessible from any stream on any + device. If :py:obj:`~.cudaMemAttachHost` is specified, then the + allocation should not be accessed from devices that have a zero value + for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`; an explicit call to + :py:obj:`~.cudaStreamAttachMemAsync` will be required to enable access + on such devices. + + If the association is later changed via + :py:obj:`~.cudaStreamAttachMemAsync` to a single stream, the default + association, as specifed during :py:obj:`~.cudaMallocManaged`, is + restored when that stream is destroyed. For managed variables, the + default association is always :py:obj:`~.cudaMemAttachGlobal`. Note + that destroying a stream is an asynchronous operation, and as a result, + the change to default association won't happen until all work in the + stream has completed. + + Memory allocated with :py:obj:`~.cudaMallocManaged` should be released + with :py:obj:`~.cudaFree`. + + Device memory oversubscription is possible for GPUs that have a non- + zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. Managed memory on such + GPUs may be evicted from device memory to host memory at any time by + the Unified Memory driver in order to make room for other allocations. + + In a system where all GPUs have a non-zero value for the device + attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess`, managed + memory may not be populated when this API returns and instead may be + populated on access. In such systems, managed memory can migrate to any + processor's memory at any time. The Unified Memory driver will employ + heuristics to maintain data locality and prevent excessive page faults + to the extent possible. The application can also guide the driver about + memory usage patterns via :py:obj:`~.cudaMemAdvise`. The application + can also explicitly migrate memory to a desired processor's memory via + :py:obj:`~.cudaMemPrefetchAsync`. + + In a multi-GPU system where all of the GPUs have a zero value for the + device attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess` and all + the GPUs have peer-to-peer support with each other, the physical + storage for managed memory is created on the GPU which is active at the + time :py:obj:`~.cudaMallocManaged` is called. All other GPUs will + reference the data at reduced bandwidth via peer mappings over the PCIe + bus. The Unified Memory driver does not migrate memory among such GPUs. + + In a multi-GPU system where not all GPUs have peer-to-peer support with + each other and where the value of the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` is zero for at least one + of those GPUs, the location chosen for physical storage of managed + memory is system-dependent. + + - On Linux, the location chosen will be device memory as long as the + current set of active contexts are on devices that either have peer- + to-peer support with each other or have a non-zero value for the + device attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. If + there is an active context on a GPU that does not have a non-zero + value for that device attribute and it does not have peer-to-peer + support with the other devices that have active contexts on them, + then the location for physical storage will be 'zero-copy' or host + memory. Note that this means that managed memory that is located in + device memory is migrated to host memory if a new context is created + on a GPU that doesn't have a non-zero value for the device attribute + and does not support peer-to-peer with at least one of the other + devices that has an active context. This in turn implies that context + creation may fail if there is insufficient host memory to migrate all + managed allocations. + + - On Windows, the physical storage is always created in 'zero-copy' or + host memory. All GPUs will reference the data at reduced bandwidth + over the PCIe bus. In these circumstances, use of the environment + variable CUDA_VISIBLE_DEVICES is recommended to restrict CUDA to only + use those GPUs that have peer-to-peer support. Alternatively, users + can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero value to + force the driver to always use device memory for physical storage. + When this environment variable is set to a non-zero value, all + devices used in that process that support managed memory have to be + peer-to-peer compatible with each other. The error + :py:obj:`~.cudaErrorInvalidDevice` will be returned if a device that + supports managed memory is used and it is not peer-to-peer compatible + with any of the other managed memory supporting devices that were + previously used in that process, even if :py:obj:`~.cudaDeviceReset` + has been called on those devices. These environment variables are + described in the CUDA programming guide under the "CUDA environment + variables" section. + + Parameters + ---------- + size : size_t + Requested allocation size in bytes + flags : unsigned int + Must be either :py:obj:`~.cudaMemAttachGlobal` or + :py:obj:`~.cudaMemAttachHost` (defaults to + :py:obj:`~.cudaMemAttachGlobal`) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + devPtr : Any + Pointer to allocated device memory + + See Also + -------- + :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cudaDeviceGetAttribute`, :py:obj:`~.cudaStreamAttachMemAsync`, :py:obj:`~.cuMemAllocManaged` + """ + cdef void_ptr devPtr = 0 + with nogil: + err = cyruntime.cudaMallocManaged(&devPtr, size, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], devPtr) + +@cython.embedsignature(True) +def cudaMalloc(size_t size): + """ Allocate memory on the device. + + Allocates `size` bytes of linear memory on the device and returns in + `*devPtr` a pointer to the allocated memory. The allocated memory is + suitably aligned for any kind of variable. The memory is not cleared. + :py:obj:`~.cudaMalloc()` returns :py:obj:`~.cudaErrorMemoryAllocation` + in case of failure. + + The device version of :py:obj:`~.cudaFree` cannot be used with a + `*devPtr` allocated using the host API, and vice versa. + + Parameters + ---------- + size : size_t + Requested allocation size in bytes + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + devPtr : Any + Pointer to allocated device memory + + See Also + -------- + :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemAlloc` + """ + cdef void_ptr devPtr = 0 + with nogil: + err = cyruntime.cudaMalloc(&devPtr, size) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], devPtr) + +@cython.embedsignature(True) +def cudaMallocHost(size_t size): + """ Allocates page-locked memory on the host. + + Allocates `size` bytes of host memory that is page-locked and + accessible to the device. The driver tracks the virtual memory ranges + allocated with this function and automatically accelerates calls to + functions such as :py:obj:`~.cudaMemcpy`*(). Since the memory can be + accessed directly by the device, it can be read or written with much + higher bandwidth than pageable memory obtained with functions such as + :py:obj:`~.malloc()`. + + On systems where :py:obj:`~.pageableMemoryAccessUsesHostPageTables` is + true, :py:obj:`~.cudaMallocHost` may not page-lock the allocated + memory. + + Page-locking excessive amounts of memory with + :py:obj:`~.cudaMallocHost()` may degrade system performance, since it + reduces the amount of memory available to the system for paging. As a + result, this function is best used sparingly to allocate staging areas + for data exchange between host and device. + + Parameters + ---------- + size : size_t + Requested allocation size in bytes + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + ptr : Any + Pointer to allocated host memory + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, cudaMallocHost (C++ API), :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemAllocHost` + """ + cdef void_ptr ptr = 0 + with nogil: + err = cyruntime.cudaMallocHost(&ptr, size) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ptr) + +@cython.embedsignature(True) +def cudaMallocPitch(size_t width, size_t height): + """ Allocates pitched memory on the device. + + Allocates at least `width` (in bytes) * `height` bytes of linear memory + on the device and returns in `*devPtr` a pointer to the allocated + memory. The function may pad the allocation to ensure that + corresponding pointers in any given row will continue to meet the + alignment requirements for coalescing as the address is updated from + row to row. The pitch returned in `*pitch` by + :py:obj:`~.cudaMallocPitch()` is the width in bytes of the allocation. + The intended usage of `pitch` is as a separate parameter of the + allocation, used to compute addresses within the 2D array. Given the + row and column of an array element of type `T`, the address is computed + as: + + **View CUDA Toolkit Documentation for a C++ code example** + + For allocations of 2D arrays, it is recommended that programmers + consider performing pitch allocations using + :py:obj:`~.cudaMallocPitch()`. Due to pitch alignment restrictions in + the hardware, this is especially true if the application will be + performing 2D memory copies between different regions of device memory + (whether linear memory or CUDA arrays). + + Parameters + ---------- + width : size_t + Requested pitched allocation width (in bytes) + height : size_t + Requested pitched allocation height + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + devPtr : Any + Pointer to allocated pitched device memory + pitch : int + Pitch for allocation + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemAllocPitch` + """ + cdef void_ptr devPtr = 0 + cdef size_t pitch = 0 + with nogil: + err = cyruntime.cudaMallocPitch(&devPtr, &pitch, width, height) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], devPtr, pitch) + +@cython.embedsignature(True) +def cudaMallocArray(desc : Optional[cudaChannelFormatDesc], size_t width, size_t height, unsigned int flags): + """ Allocate an array on the device. + + Allocates a CUDA array according to the + :py:obj:`~.cudaChannelFormatDesc` structure `desc` and returns a handle + to the new CUDA array in `*array`. + + The :py:obj:`~.cudaChannelFormatDesc` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaChannelFormatKind` is one of + :py:obj:`~.cudaChannelFormatKindSigned`, + :py:obj:`~.cudaChannelFormatKindUnsigned`, or + :py:obj:`~.cudaChannelFormatKindFloat`. + + The `flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.cudaArrayDefault`: This flag's value is defined to be 0 + and provides default array allocation + + - :py:obj:`~.cudaArraySurfaceLoadStore`: Allocates an array that can be + read from or written to using a surface reference + + - :py:obj:`~.cudaArrayTextureGather`: This flag indicates that texture + gather operations will be performed on the array. + + - :py:obj:`~.cudaArraySparse`: Allocates a CUDA array without physical + backing memory. The subregions within this sparse array can later be + mapped onto a physical memory allocation by calling + :py:obj:`~.cuMemMapArrayAsync`. The physical backing memory must be + allocated via :py:obj:`~.cuMemCreate`. + + - :py:obj:`~.cudaArrayDeferredMapping`: Allocates a CUDA array without + physical backing memory. The entire array can later be mapped onto a + physical memory allocation by calling :py:obj:`~.cuMemMapArrayAsync`. + The physical backing memory must be allocated via + :py:obj:`~.cuMemCreate`. + + `width` and `height` must meet certain size requirements. See + :py:obj:`~.cudaMalloc3DArray()` for more details. + + Parameters + ---------- + desc : :py:obj:`~.cudaChannelFormatDesc` + Requested channel format + width : size_t + Requested array allocation width + height : size_t + Requested array allocation height + flags : unsigned int + Requested properties of allocated array + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + array : :py:obj:`~.cudaArray_t` + Pointer to allocated array in device memory + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuArrayCreate` + """ + cdef cudaArray_t array = cudaArray_t() + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + with nogil: + err = cyruntime.cudaMallocArray(array._pvt_ptr, cydesc_ptr, width, height, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], array) + +@cython.embedsignature(True) +def cudaFree(devPtr): + """ Frees memory on the device. + + Frees the memory space pointed to by `devPtr`, which must have been + returned by a previous call to one of the following memory allocation + APIs - :py:obj:`~.cudaMalloc()`, :py:obj:`~.cudaMallocPitch()`, + :py:obj:`~.cudaMallocManaged()`, :py:obj:`~.cudaMallocAsync()`, + :py:obj:`~.cudaMallocFromPoolAsync()`. + + Note - This API will not perform any implicit synchronization when the + pointer was allocated with :py:obj:`~.cudaMallocAsync` or + :py:obj:`~.cudaMallocFromPoolAsync`. Callers must ensure that all + accesses to these pointer have completed before invoking + :py:obj:`~.cudaFree`. For best performance and memory reuse, users + should use :py:obj:`~.cudaFreeAsync` to free memory allocated via the + stream ordered memory allocator. For all other pointers, this API may + perform implicit synchronization. + + If :py:obj:`~.cudaFree`(`devPtr`) has already been called before, an + error is returned. If `devPtr` is 0, no operation is performed. + :py:obj:`~.cudaFree()` returns :py:obj:`~.cudaErrorValue` in case of + failure. + + The device version of :py:obj:`~.cudaFree` cannot be used with a + `*devPtr` allocated using the host API, and vice versa. + + Parameters + ---------- + devPtr : Any + Device pointer to memory to free + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaMallocManaged`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaMallocFromPoolAsync` :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaFreeAsync` :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemFree` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaFree(cydevPtr_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFreeHost(ptr): + """ Frees page-locked memory. + + Frees the memory space pointed to by `hostPtr`, which must have been + returned by a previous call to :py:obj:`~.cudaMallocHost()` or + :py:obj:`~.cudaHostAlloc()`. + + Parameters + ---------- + ptr : Any + Pointer to memory to free + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemFreeHost` + """ + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaFreeHost(cyptr_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFreeArray(array): + """ Frees an array on the device. + + Frees the CUDA array `array`, which must have been returned by a + previous call to :py:obj:`~.cudaMallocArray()`. If `devPtr` is 0, no + operation is performed. + + Parameters + ---------- + array : :py:obj:`~.cudaArray_t` + Pointer to array to free + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuArrayDestroy` + """ + cdef cyruntime.cudaArray_t cyarray + if array is None: + parray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + else: + parray = int(cudaArray_t(array)) + cyarray = parray + with nogil: + err = cyruntime.cudaFreeArray(cyarray) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaFreeMipmappedArray(mipmappedArray): + """ Frees a mipmapped array on the device. + + Frees the CUDA mipmapped array `mipmappedArray`, which must have been + returned by a previous call to :py:obj:`~.cudaMallocMipmappedArray()`. + If `devPtr` is 0, no operation is performed. + + Parameters + ---------- + mipmappedArray : :py:obj:`~.cudaMipmappedArray_t` + Pointer to mipmapped array to free + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMipmappedArrayDestroy` + """ + cdef cyruntime.cudaMipmappedArray_t cymipmappedArray + if mipmappedArray is None: + pmipmappedArray = 0 + elif isinstance(mipmappedArray, (cudaMipmappedArray_t,)): + pmipmappedArray = int(mipmappedArray) + else: + pmipmappedArray = int(cudaMipmappedArray_t(mipmappedArray)) + cymipmappedArray = pmipmappedArray + with nogil: + err = cyruntime.cudaFreeMipmappedArray(cymipmappedArray) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaHostAlloc(size_t size, unsigned int flags): + """ Allocates page-locked memory on the host. + + Allocates `size` bytes of host memory that is page-locked and + accessible to the device. The driver tracks the virtual memory ranges + allocated with this function and automatically accelerates calls to + functions such as :py:obj:`~.cudaMemcpy()`. Since the memory can be + accessed directly by the device, it can be read or written with much + higher bandwidth than pageable memory obtained with functions such as + :py:obj:`~.malloc()`. Allocating excessive amounts of pinned memory may + degrade system performance, since it reduces the amount of memory + available to the system for paging. As a result, this function is best + used sparingly to allocate staging areas for data exchange between host + and device. + + The `flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.cudaHostAllocDefault`: This flag's value is defined to be + 0 and causes :py:obj:`~.cudaHostAlloc()` to emulate + :py:obj:`~.cudaMallocHost()`. + + - :py:obj:`~.cudaHostAllocPortable`: The memory returned by this call + will be considered as pinned memory by all CUDA contexts, not just + the one that performed the allocation. + + - :py:obj:`~.cudaHostAllocMapped`: Maps the allocation into the CUDA + address space. The device pointer to the memory may be obtained by + calling :py:obj:`~.cudaHostGetDevicePointer()`. + + - :py:obj:`~.cudaHostAllocWriteCombined`: Allocates the memory as + write-combined (WC). WC memory can be transferred across the PCI + Express bus more quickly on some system configurations, but cannot be + read efficiently by most CPUs. WC memory is a good option for buffers + that will be written by the CPU and read by the device via mapped + pinned memory or host->device transfers. + + All of these flags are orthogonal to one another: a developer may + allocate memory that is portable, mapped and/or write-combined with no + restrictions. + + In order for the :py:obj:`~.cudaHostAllocMapped` flag to have any + effect, the CUDA context must support the :py:obj:`~.cudaDeviceMapHost` + flag, which can be checked via :py:obj:`~.cudaGetDeviceFlags()`. The + :py:obj:`~.cudaDeviceMapHost` flag is implicitly set for contexts + created via the runtime API. + + The :py:obj:`~.cudaHostAllocMapped` flag may be specified on CUDA + contexts for devices that do not support mapped pinned memory. The + failure is deferred to :py:obj:`~.cudaHostGetDevicePointer()` because + the memory may be mapped into other CUDA contexts via the + :py:obj:`~.cudaHostAllocPortable` flag. + + Memory allocated by this function must be freed with + :py:obj:`~.cudaFreeHost()`. + + Parameters + ---------- + size : size_t + Requested allocation size in bytes + flags : unsigned int + Requested properties of allocated memory + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + pHost : Any + Device pointer to allocated memory + + See Also + -------- + :py:obj:`~.cudaSetDeviceFlags`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaGetDeviceFlags`, :py:obj:`~.cuMemHostAlloc` + """ + cdef void_ptr pHost = 0 + with nogil: + err = cyruntime.cudaHostAlloc(&pHost, size, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pHost) + +@cython.embedsignature(True) +def cudaHostRegister(ptr, size_t size, unsigned int flags): + """ Registers an existing host memory range for use by CUDA. + + Page-locks the memory range specified by `ptr` and `size` and maps it + for the device(s) as specified by `flags`. This memory range also is + added to the same tracking mechanism as :py:obj:`~.cudaHostAlloc()` to + automatically accelerate calls to functions such as + :py:obj:`~.cudaMemcpy()`. Since the memory can be accessed directly by + the device, it can be read or written with much higher bandwidth than + pageable memory that has not been registered. Page-locking excessive + amounts of memory may degrade system performance, since it reduces the + amount of memory available to the system for paging. As a result, this + function is best used sparingly to register staging areas for data + exchange between host and device. + + On systems where :py:obj:`~.pageableMemoryAccessUsesHostPageTables` is + true, :py:obj:`~.cudaHostRegister` will not page-lock the memory range + specified by `ptr` but only populate unpopulated pages. + + :py:obj:`~.cudaHostRegister` is supported only on I/O coherent devices + that have a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrHostRegisterSupported`. + + The `flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.cudaHostRegisterDefault`: On a system with unified virtual + addressing, the memory will be both mapped and portable. On a system + with no unified virtual addressing, the memory will be neither mapped + nor portable. + + - :py:obj:`~.cudaHostRegisterPortable`: The memory returned by this + call will be considered as pinned memory by all CUDA contexts, not + just the one that performed the allocation. + + - :py:obj:`~.cudaHostRegisterMapped`: Maps the allocation into the CUDA + address space. The device pointer to the memory may be obtained by + calling :py:obj:`~.cudaHostGetDevicePointer()`. + + - :py:obj:`~.cudaHostRegisterIoMemory`: The passed memory pointer is + treated as pointing to some memory-mapped I/O space, e.g. belonging + to a third-party PCIe device, and it will marked as non cache- + coherent and contiguous. + + - :py:obj:`~.cudaHostRegisterReadOnly`: The passed memory pointer is + treated as pointing to memory that is considered read-only by the + device. On platforms without + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, this + flag is required in order to register memory mapped to the CPU as + read-only. Support for the use of this flag can be queried from the + device attribute + :py:obj:`~.cudaDevAttrHostRegisterReadOnlySupported`. Using this flag + with a current context associated with a device that does not have + this attribute set will cause :py:obj:`~.cudaHostRegister` to error + with cudaErrorNotSupported. + + All of these flags are orthogonal to one another: a developer may page- + lock memory that is portable or mapped with no restrictions. + + The CUDA context must have been created with the + :py:obj:`~.cudaMapHost` flag in order for the + :py:obj:`~.cudaHostRegisterMapped` flag to have any effect. + + The :py:obj:`~.cudaHostRegisterMapped` flag may be specified on CUDA + contexts for devices that do not support mapped pinned memory. The + failure is deferred to :py:obj:`~.cudaHostGetDevicePointer()` because + the memory may be mapped into other CUDA contexts via the + :py:obj:`~.cudaHostRegisterPortable` flag. + + For devices that have a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrCanUseHostPointerForRegisteredMem`, the memory + can also be accessed from the device using the host pointer `ptr`. The + device pointer returned by :py:obj:`~.cudaHostGetDevicePointer()` may + or may not match the original host pointer `ptr` and depends on the + devices visible to the application. If all devices visible to the + application have a non-zero value for the device attribute, the device + pointer returned by :py:obj:`~.cudaHostGetDevicePointer()` will match + the original pointer `ptr`. If any device visible to the application + has a zero value for the device attribute, the device pointer returned + by :py:obj:`~.cudaHostGetDevicePointer()` will not match the original + host pointer `ptr`, but it will be suitable for use on all devices + provided Unified Virtual Addressing is enabled. In such systems, it is + valid to access the memory using either pointer on devices that have a + non-zero value for the device attribute. Note however that such devices + should access the memory using only of the two pointers and not both. + + The memory page-locked by this function must be unregistered with + :py:obj:`~.cudaHostUnregister()`. + + Parameters + ---------- + ptr : Any + Host pointer to memory to page-lock + size : size_t + Size in bytes of the address range to page-lock in bytes + flags : unsigned int + Flags for allocation request + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorHostMemoryAlreadyRegistered`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaHostUnregister`, :py:obj:`~.cudaHostGetFlags`, :py:obj:`~.cudaHostGetDevicePointer`, :py:obj:`~.cuMemHostRegister` + """ + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaHostRegister(cyptr_ptr, size, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaHostUnregister(ptr): + """ Unregisters a memory range that was registered with cudaHostRegister. + + Unmaps the memory range whose base address is specified by `ptr`, and + makes it pageable again. + + The base address must be the same one specified to + :py:obj:`~.cudaHostRegister()`. + + Parameters + ---------- + ptr : Any + Host pointer to memory to unregister + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorHostMemoryNotRegistered` + + See Also + -------- + :py:obj:`~.cudaHostUnregister`, :py:obj:`~.cuMemHostUnregister` + """ + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaHostUnregister(cyptr_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaHostGetDevicePointer(pHost, unsigned int flags): + """ Passes back device pointer of mapped host memory allocated by cudaHostAlloc or registered by cudaHostRegister. + + Passes back the device pointer corresponding to the mapped, pinned host + buffer allocated by :py:obj:`~.cudaHostAlloc()` or registered by + :py:obj:`~.cudaHostRegister()`. + + :py:obj:`~.cudaHostGetDevicePointer()` will fail if the + :py:obj:`~.cudaDeviceMapHost` flag was not specified before deferred + context creation occurred, or if called on a device that does not + support mapped, pinned memory. + + For devices that have a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrCanUseHostPointerForRegisteredMem`, the memory + can also be accessed from the device using the host pointer `pHost`. + The device pointer returned by :py:obj:`~.cudaHostGetDevicePointer()` + may or may not match the original host pointer `pHost` and depends on + the devices visible to the application. If all devices visible to the + application have a non-zero value for the device attribute, the device + pointer returned by :py:obj:`~.cudaHostGetDevicePointer()` will match + the original pointer `pHost`. If any device visible to the application + has a zero value for the device attribute, the device pointer returned + by :py:obj:`~.cudaHostGetDevicePointer()` will not match the original + host pointer `pHost`, but it will be suitable for use on all devices + provided Unified Virtual Addressing is enabled. In such systems, it is + valid to access the memory using either pointer on devices that have a + non-zero value for the device attribute. Note however that such devices + should access the memory using only of the two pointers and not both. + + `flags` provides for future releases. For now, it must be set to 0. + + Parameters + ---------- + pHost : Any + Requested host pointer mapping + flags : unsigned int + Flags for extensions (must be 0 for now) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + pDevice : Any + Returned device pointer for mapped memory + + See Also + -------- + :py:obj:`~.cudaSetDeviceFlags`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer` + """ + cdef void_ptr pDevice = 0 + cypHost = _HelperInputVoidPtr(pHost) + cdef void* cypHost_ptr = cypHost.cptr + with nogil: + err = cyruntime.cudaHostGetDevicePointer(&pDevice, cypHost_ptr, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pDevice) + +@cython.embedsignature(True) +def cudaHostGetFlags(pHost): + """ Passes back flags used to allocate pinned host memory allocated by cudaHostAlloc. + + :py:obj:`~.cudaHostGetFlags()` will fail if the input pointer does not + reside in an address range allocated by :py:obj:`~.cudaHostAlloc()`. + + Parameters + ---------- + pHost : Any + Host pointer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pFlags : unsigned int + Returned flags word + + See Also + -------- + :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuMemHostGetFlags` + """ + cdef unsigned int pFlags = 0 + cypHost = _HelperInputVoidPtr(pHost) + cdef void* cypHost_ptr = cypHost.cptr + with nogil: + err = cyruntime.cudaHostGetFlags(&pFlags, cypHost_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pFlags) + +@cython.embedsignature(True) +def cudaMalloc3D(extent not None : cudaExtent): + """ Allocates logical 1D, 2D, or 3D memory objects on the device. + + Allocates at least `width` * `height` * `depth` bytes of linear memory + on the device and returns a :py:obj:`~.cudaPitchedPtr` in which `ptr` + is a pointer to the allocated memory. The function may pad the + allocation to ensure hardware alignment requirements are met. The pitch + returned in the `pitch` field of `pitchedDevPtr` is the width in bytes + of the allocation. + + The returned :py:obj:`~.cudaPitchedPtr` contains additional fields + `xsize` and `ysize`, the logical width and height of the allocation, + which are equivalent to the `width` and `height` `extent` parameters + provided by the programmer during allocation. + + For allocations of 2D and 3D objects, it is highly recommended that + programmers perform allocations using :py:obj:`~.cudaMalloc3D()` or + :py:obj:`~.cudaMallocPitch()`. Due to alignment restrictions in the + hardware, this is especially true if the application will be performing + memory copies involving 2D or 3D objects (whether linear memory or CUDA + arrays). + + Parameters + ---------- + extent : :py:obj:`~.cudaExtent` + Requested allocation size (`width` field in bytes) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + pitchedDevPtr : :py:obj:`~.cudaPitchedPtr` + Pointer to allocated pitched device memory + + See Also + -------- + :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaPitchedPtr`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMemAllocPitch` + """ + cdef cudaPitchedPtr pitchedDevPtr = cudaPitchedPtr() + with nogil: + err = cyruntime.cudaMalloc3D(pitchedDevPtr._pvt_ptr, extent._pvt_ptr[0]) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pitchedDevPtr) + +@cython.embedsignature(True) +def cudaMalloc3DArray(desc : Optional[cudaChannelFormatDesc], extent not None : cudaExtent, unsigned int flags): + """ Allocate an array on the device. + + Allocates a CUDA array according to the + :py:obj:`~.cudaChannelFormatDesc` structure `desc` and returns a handle + to the new CUDA array in `*array`. + + The :py:obj:`~.cudaChannelFormatDesc` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaChannelFormatKind` is one of + :py:obj:`~.cudaChannelFormatKindSigned`, + :py:obj:`~.cudaChannelFormatKindUnsigned`, or + :py:obj:`~.cudaChannelFormatKindFloat`. + + :py:obj:`~.cudaMalloc3DArray()` can allocate the following: + + - A 1D array is allocated if the height and depth extents are both + zero. + + - A 2D array is allocated if only the depth extent is zero. + + - A 3D array is allocated if all three extents are non-zero. + + - A 1D layered CUDA array is allocated if only the height extent is + zero and the cudaArrayLayered flag is set. Each layer is a 1D array. + The number of layers is determined by the depth extent. + + - A 2D layered CUDA array is allocated if all three extents are non- + zero and the cudaArrayLayered flag is set. Each layer is a 2D array. + The number of layers is determined by the depth extent. + + - A cubemap CUDA array is allocated if all three extents are non-zero + and the cudaArrayCubemap flag is set. Width must be equal to height, + and depth must be six. A cubemap is a special type of 2D layered CUDA + array, where the six layers represent the six faces of a cube. The + order of the six layers in memory is the same as that listed in + :py:obj:`~.cudaGraphicsCubeFace`. + + - A cubemap layered CUDA array is allocated if all three extents are + non-zero, and both, cudaArrayCubemap and cudaArrayLayered flags are + set. Width must be equal to height, and depth must be a multiple of + six. A cubemap layered CUDA array is a special type of 2D layered + CUDA array that consists of a collection of cubemaps. The first six + layers represent the first cubemap, the next six layers form the + second cubemap, and so on. + + The `flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.cudaArrayDefault`: This flag's value is defined to be 0 + and provides default array allocation + + - :py:obj:`~.cudaArrayLayered`: Allocates a layered CUDA array, with + the depth extent indicating the number of layers + + - :py:obj:`~.cudaArrayCubemap`: Allocates a cubemap CUDA array. Width + must be equal to height, and depth must be six. If the + cudaArrayLayered flag is also set, depth must be a multiple of six. + + - :py:obj:`~.cudaArraySurfaceLoadStore`: Allocates a CUDA array that + could be read from or written to using a surface reference. + + - :py:obj:`~.cudaArrayTextureGather`: This flag indicates that texture + gather operations will be performed on the CUDA array. Texture gather + can only be performed on 2D CUDA arrays. + + - :py:obj:`~.cudaArraySparse`: Allocates a CUDA array without physical + backing memory. The subregions within this sparse array can later be + mapped onto a physical memory allocation by calling + :py:obj:`~.cuMemMapArrayAsync`. This flag can only be used for + creating 2D, 3D or 2D layered sparse CUDA arrays. The physical + backing memory must be allocated via :py:obj:`~.cuMemCreate`. + + - :py:obj:`~.cudaArrayDeferredMapping`: Allocates a CUDA array without + physical backing memory. The entire array can later be mapped onto a + physical memory allocation by calling :py:obj:`~.cuMemMapArrayAsync`. + The physical backing memory must be allocated via + :py:obj:`~.cuMemCreate`. + + The width, height and depth extents must meet certain size requirements + as listed in the following table. All values are specified in elements. + + Note that 2D CUDA arrays have different size requirements if the + :py:obj:`~.cudaArrayTextureGather` flag is set. In that case, the valid + range for (width, height, depth) is ((1,maxTexture2DGather[0]), + (1,maxTexture2DGather[1]), 0). + + **View CUDA Toolkit Documentation for a table example** + + Parameters + ---------- + desc : :py:obj:`~.cudaChannelFormatDesc` + Requested channel format + extent : :py:obj:`~.cudaExtent` + Requested allocation size (`width` field in elements) + flags : unsigned int + Flags for extensions + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + array : :py:obj:`~.cudaArray_t` + Pointer to allocated array in device memory + + See Also + -------- + :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuArray3DCreate` + """ + cdef cudaArray_t array = cudaArray_t() + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + with nogil: + err = cyruntime.cudaMalloc3DArray(array._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], array) + +@cython.embedsignature(True) +def cudaMallocMipmappedArray(desc : Optional[cudaChannelFormatDesc], extent not None : cudaExtent, unsigned int numLevels, unsigned int flags): + """ Allocate a mipmapped array on the device. + + Allocates a CUDA mipmapped array according to the + :py:obj:`~.cudaChannelFormatDesc` structure `desc` and returns a handle + to the new CUDA mipmapped array in `*mipmappedArray`. `numLevels` + specifies the number of mipmap levels to be allocated. This value is + clamped to the range [1, 1 + floor(log2(max(width, height, depth)))]. + + The :py:obj:`~.cudaChannelFormatDesc` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaChannelFormatKind` is one of + :py:obj:`~.cudaChannelFormatKindSigned`, + :py:obj:`~.cudaChannelFormatKindUnsigned`, or + :py:obj:`~.cudaChannelFormatKindFloat`. + + :py:obj:`~.cudaMallocMipmappedArray()` can allocate the following: + + - A 1D mipmapped array is allocated if the height and depth extents are + both zero. + + - A 2D mipmapped array is allocated if only the depth extent is zero. + + - A 3D mipmapped array is allocated if all three extents are non-zero. + + - A 1D layered CUDA mipmapped array is allocated if only the height + extent is zero and the cudaArrayLayered flag is set. Each layer is a + 1D mipmapped array. The number of layers is determined by the depth + extent. + + - A 2D layered CUDA mipmapped array is allocated if all three extents + are non-zero and the cudaArrayLayered flag is set. Each layer is a 2D + mipmapped array. The number of layers is determined by the depth + extent. + + - A cubemap CUDA mipmapped array is allocated if all three extents are + non-zero and the cudaArrayCubemap flag is set. Width must be equal to + height, and depth must be six. The order of the six layers in memory + is the same as that listed in :py:obj:`~.cudaGraphicsCubeFace`. + + - A cubemap layered CUDA mipmapped array is allocated if all three + extents are non-zero, and both, cudaArrayCubemap and cudaArrayLayered + flags are set. Width must be equal to height, and depth must be a + multiple of six. A cubemap layered CUDA mipmapped array is a special + type of 2D layered CUDA mipmapped array that consists of a collection + of cubemap mipmapped arrays. The first six layers represent the first + cubemap mipmapped array, the next six layers form the second cubemap + mipmapped array, and so on. + + The `flags` parameter enables different options to be specified that + affect the allocation, as follows. + + - :py:obj:`~.cudaArrayDefault`: This flag's value is defined to be 0 + and provides default mipmapped array allocation + + - :py:obj:`~.cudaArrayLayered`: Allocates a layered CUDA mipmapped + array, with the depth extent indicating the number of layers + + - :py:obj:`~.cudaArrayCubemap`: Allocates a cubemap CUDA mipmapped + array. Width must be equal to height, and depth must be six. If the + cudaArrayLayered flag is also set, depth must be a multiple of six. + + - :py:obj:`~.cudaArraySurfaceLoadStore`: This flag indicates that + individual mipmap levels of the CUDA mipmapped array will be read + from or written to using a surface reference. + + - :py:obj:`~.cudaArrayTextureGather`: This flag indicates that texture + gather operations will be performed on the CUDA array. Texture gather + can only be performed on 2D CUDA mipmapped arrays, and the gather + operations are performed only on the most detailed mipmap level. + + - :py:obj:`~.cudaArraySparse`: Allocates a CUDA mipmapped array without + physical backing memory. The subregions within this sparse array can + later be mapped onto a physical memory allocation by calling + :py:obj:`~.cuMemMapArrayAsync`. This flag can only be used for + creating 2D, 3D or 2D layered sparse CUDA mipmapped arrays. The + physical backing memory must be allocated via + :py:obj:`~.cuMemCreate`. + + - :py:obj:`~.cudaArrayDeferredMapping`: Allocates a CUDA mipmapped + array without physical backing memory. The entire array can later be + mapped onto a physical memory allocation by calling + :py:obj:`~.cuMemMapArrayAsync`. The physical backing memory must be + allocated via :py:obj:`~.cuMemCreate`. + + The width, height and depth extents must meet certain size requirements + as listed in the following table. All values are specified in elements. + + **View CUDA Toolkit Documentation for a table example** + + Parameters + ---------- + desc : :py:obj:`~.cudaChannelFormatDesc` + Requested channel format + extent : :py:obj:`~.cudaExtent` + Requested allocation size (`width` field in elements) + numLevels : unsigned int + Number of mipmap levels to allocate + flags : unsigned int + Flags for extensions + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + mipmappedArray : :py:obj:`~.cudaMipmappedArray_t` + Pointer to allocated mipmapped array in device memory + + See Also + -------- + :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMipmappedArrayCreate` + """ + cdef cudaMipmappedArray_t mipmappedArray = cudaMipmappedArray_t() + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL + with nogil: + err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], numLevels, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], mipmappedArray) + +@cython.embedsignature(True) +def cudaGetMipmappedArrayLevel(mipmappedArray, unsigned int level): + """ Gets a mipmap level of a CUDA mipmapped array. + + Returns in `*levelArray` a CUDA array that represents a single mipmap + level of the CUDA mipmapped array `mipmappedArray`. + + If `level` is greater than the maximum number of levels in this + mipmapped array, :py:obj:`~.cudaErrorInvalidValue` is returned. + + If `mipmappedArray` is NULL, :py:obj:`~.cudaErrorInvalidResourceHandle` + is returned. + + Parameters + ---------- + mipmappedArray : :py:obj:`~.cudaMipmappedArray_const_t` + CUDA mipmapped array + level : unsigned int + Mipmap level + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorInvalidResourceHandle` + levelArray : :py:obj:`~.cudaArray_t` + Returned mipmap level CUDA array + + See Also + -------- + :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMipmappedArrayGetLevel` + """ + cdef cyruntime.cudaMipmappedArray_const_t cymipmappedArray + if mipmappedArray is None: + pmipmappedArray = 0 + elif isinstance(mipmappedArray, (cudaMipmappedArray_const_t,)): + pmipmappedArray = int(mipmappedArray) + else: + pmipmappedArray = int(cudaMipmappedArray_const_t(mipmappedArray)) + cymipmappedArray = pmipmappedArray + cdef cudaArray_t levelArray = cudaArray_t() + with nogil: + err = cyruntime.cudaGetMipmappedArrayLevel(levelArray._pvt_ptr, cymipmappedArray, level) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], levelArray) + +@cython.embedsignature(True) +def cudaMemcpy3D(p : Optional[cudaMemcpy3DParms]): + """ Copies data between 3D objects. + + **View CUDA Toolkit Documentation for a C++ code example** + + :py:obj:`~.cudaMemcpy3D()` copies data betwen two 3D objects. The + source and destination objects may be in either host memory, device + memory, or a CUDA array. The source, destination, extent, and kind of + copy performed is specified by the :py:obj:`~.cudaMemcpy3DParms` struct + which should be initialized to zero before use: + + **View CUDA Toolkit Documentation for a C++ code example** + + The struct passed to :py:obj:`~.cudaMemcpy3D()` must specify one of + `srcArray` or `srcPtr` and one of `dstArray` or `dstPtr`. Passing more + than one non-zero source or destination will cause + :py:obj:`~.cudaMemcpy3D()` to return an error. + + The `srcPos` and `dstPos` fields are optional offsets into the source + and destination objects and are defined in units of each object's + elements. The element for a host or device pointer is assumed to be + unsigned char. + + The `extent` field defines the dimensions of the transferred area in + elements. If a CUDA array is participating in the copy, the extent is + defined in terms of that array's elements. If no CUDA array is + participating in the copy then the extents are defined in elements of + unsigned char. + + The `kind` field defines the direction of the copy. It must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. For :py:obj:`~.cudaMemcpyHostToHost` or + :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` passed as kind and cudaArray type + passed as source or destination, if the kind implies cudaArray type to + be present on the host, :py:obj:`~.cudaMemcpy3D()` will disregard that + implication and silently correct the kind based on the fact that + cudaArray type can only be present on the device. + + If the source and destination are both arrays, + :py:obj:`~.cudaMemcpy3D()` will return an error if they do not have the + same element size. + + The source and destination object may not overlap. If overlapping + source and destination objects are specified, undefined behavior will + result. + + The source object must entirely contain the region defined by `srcPos` + and `extent`. The destination object must entirely contain the region + defined by `dstPos` and `extent`. + + :py:obj:`~.cudaMemcpy3D()` returns an error if the pitch of `srcPtr` or + `dstPtr` exceeds the maximum allowed. The pitch of a + :py:obj:`~.cudaPitchedPtr` allocated with :py:obj:`~.cudaMalloc3D()` + will always be valid. + + Parameters + ---------- + p : :py:obj:`~.cudaMemcpy3DParms` + 3D memory copy parameters + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemcpy3DAsync`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.make_cudaPos`, :py:obj:`~.cuMemcpy3D` + """ + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + with nogil: + err = cyruntime.cudaMemcpy3D(cyp_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy3DPeer(p : Optional[cudaMemcpy3DPeerParms]): + """ Copies memory between devices. + + Perform a 3D memory copy according to the parameters specified in `p`. + See the definition of the :py:obj:`~.cudaMemcpy3DPeerParms` structure + for documentation of its parameters. + + Note that this function is synchronous with respect to the host only if + the source or destination of the transfer is host memory. Note also + that this copy is serialized with respect to all pending and future + asynchronous work in to the current device, the copy's source device, + and the copy's destination device (use + :py:obj:`~.cudaMemcpy3DPeerAsync` to avoid this synchronization). + + Parameters + ---------- + p : :py:obj:`~.cudaMemcpy3DPeerParms` + Parameters for the memory copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidPitchValue` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpy3DPeer` + """ + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + with nogil: + err = cyruntime.cudaMemcpy3DPeer(cyp_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy3DAsync(p : Optional[cudaMemcpy3DParms], stream): + """ Copies data between 3D objects. + + **View CUDA Toolkit Documentation for a C++ code example** + + :py:obj:`~.cudaMemcpy3DAsync()` copies data betwen two 3D objects. The + source and destination objects may be in either host memory, device + memory, or a CUDA array. The source, destination, extent, and kind of + copy performed is specified by the :py:obj:`~.cudaMemcpy3DParms` struct + which should be initialized to zero before use: + + **View CUDA Toolkit Documentation for a C++ code example** + + The struct passed to :py:obj:`~.cudaMemcpy3DAsync()` must specify one + of `srcArray` or `srcPtr` and one of `dstArray` or `dstPtr`. Passing + more than one non-zero source or destination will cause + :py:obj:`~.cudaMemcpy3DAsync()` to return an error. + + The `srcPos` and `dstPos` fields are optional offsets into the source + and destination objects and are defined in units of each object's + elements. The element for a host or device pointer is assumed to be + unsigned char. For CUDA arrays, positions must be in the range [0, + 2048) for any dimension. + + The `extent` field defines the dimensions of the transferred area in + elements. If a CUDA array is participating in the copy, the extent is + defined in terms of that array's elements. If no CUDA array is + participating in the copy then the extents are defined in elements of + unsigned char. + + The `kind` field defines the direction of the copy. It must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. For :py:obj:`~.cudaMemcpyHostToHost` or + :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` passed as kind and cudaArray type + passed as source or destination, if the kind implies cudaArray type to + be present on the host, :py:obj:`~.cudaMemcpy3DAsync()` will disregard + that implication and silently correct the kind based on the fact that + cudaArray type can only be present on the device. + + If the source and destination are both arrays, + :py:obj:`~.cudaMemcpy3DAsync()` will return an error if they do not + have the same element size. + + The source and destination object may not overlap. If overlapping + source and destination objects are specified, undefined behavior will + result. + + The source object must lie entirely within the region defined by + `srcPos` and `extent`. The destination object must lie entirely within + the region defined by `dstPos` and `extent`. + + :py:obj:`~.cudaMemcpy3DAsync()` returns an error if the pitch of + `srcPtr` or `dstPtr` exceeds the maximum allowed. The pitch of a + :py:obj:`~.cudaPitchedPtr` allocated with :py:obj:`~.cudaMalloc3D()` + will always be valid. + + :py:obj:`~.cudaMemcpy3DAsync()` is asynchronous with respect to the + host, so the call may return before the copy is complete. The copy can + optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + p : :py:obj:`~.cudaMemcpy3DParms` + 3D memory copy parameters + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, ::::py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.make_cudaPos`, :py:obj:`~.cuMemcpy3DAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + with nogil: + err = cyruntime.cudaMemcpy3DAsync(cyp_ptr, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy3DPeerAsync(p : Optional[cudaMemcpy3DPeerParms], stream): + """ Copies memory between devices asynchronously. + + Perform a 3D memory copy according to the parameters specified in `p`. + See the definition of the :py:obj:`~.cudaMemcpy3DPeerParms` structure + for documentation of its parameters. + + Parameters + ---------- + p : :py:obj:`~.cudaMemcpy3DPeerParms` + Parameters for the memory copy + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidPitchValue` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL + with nogil: + err = cyruntime.cudaMemcpy3DPeerAsync(cyp_ptr, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemGetInfo(): + """ Gets free and total device memory. + + Returns in `*total` the total amount of memory available to the the + current context. Returns in `*free` the amount of memory on the device + that is free according to the OS. CUDA is not guaranteed to be able to + allocate all of the memory that the OS reports as free. In a multi- + tenet situation, free estimate returned is prone to race condition + where a new allocation/free done by a different process or a different + thread in the same process between the time when free memory was + estimated and reported, will result in deviation in free value reported + and actual free memory. + + The integrated GPU on Tegra shares memory with CPU and other component + of the SoC. The free and total values returned by the API excludes the + SWAP memory space maintained by the OS on some platforms. The OS may + move some of the memory pages into swap area as the GPU or CPU allocate + or access memory. See Tegra app note on how to calculate total and free + memory on Tegra. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorLaunchFailure` + free : int + Returned free memory in bytes + total : int + Returned total memory in bytes + + See Also + -------- + :py:obj:`~.cuMemGetInfo` + """ + cdef size_t free = 0 + cdef size_t total = 0 + with nogil: + err = cyruntime.cudaMemGetInfo(&free, &total) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], free, total) + +@cython.embedsignature(True) +def cudaArrayGetInfo(array): + """ Gets info about the specified cudaArray. + + Returns in `*desc`, `*extent` and `*flags` respectively, the type, + shape and flags of `array`. + + Any of `*desc`, `*extent` and `*flags` may be specified as NULL. + + Parameters + ---------- + array : :py:obj:`~.cudaArray_t` + The :py:obj:`~.cudaArray` to get info for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + desc : :py:obj:`~.cudaChannelFormatDesc` + Returned array type + extent : :py:obj:`~.cudaExtent` + Returned array shape. 2D arrays will have depth of zero + flags : unsigned int + Returned array flags + + See Also + -------- + :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuArray3DGetDescriptor` + """ + cdef cyruntime.cudaArray_t cyarray + if array is None: + parray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + else: + parray = int(cudaArray_t(array)) + cyarray = parray + cdef cudaChannelFormatDesc desc = cudaChannelFormatDesc() + cdef cudaExtent extent = cudaExtent() + cdef unsigned int flags = 0 + with nogil: + err = cyruntime.cudaArrayGetInfo(desc._pvt_ptr, extent._pvt_ptr, &flags, cyarray) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None) + return (_dict_cudaError_t[err], desc, extent, flags) + +@cython.embedsignature(True) +def cudaArrayGetPlane(hArray, unsigned int planeIdx): + """ Gets a CUDA array plane from a CUDA array. + + Returns in `pPlaneArray` a CUDA array that represents a single format + plane of the CUDA array `hArray`. + + If `planeIdx` is greater than the maximum number of planes in this + array or if the array does not have a multi-planar format e.g: + :py:obj:`~.cudaChannelFormatKindNV12`, then + :py:obj:`~.cudaErrorInvalidValue` is returned. + + Note that if the `hArray` has format + :py:obj:`~.cudaChannelFormatKindNV12`, then passing in 0 for `planeIdx` + returns a CUDA array of the same size as `hArray` but with one 8-bit + channel and :py:obj:`~.cudaChannelFormatKindUnsigned` as its format + kind. If 1 is passed for `planeIdx`, then the returned CUDA array has + half the height and width of `hArray` with two 8-bit channels and + :py:obj:`~.cudaChannelFormatKindUnsigned` as its format kind. + + Parameters + ---------- + hArray : :py:obj:`~.cudaArray_t` + CUDA array + planeIdx : unsigned int + Plane index + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` :py:obj:`~.cudaErrorInvalidResourceHandle` + pPlaneArray : :py:obj:`~.cudaArray_t` + Returned CUDA array referenced by the `planeIdx` + + See Also + -------- + :py:obj:`~.cuArrayGetPlane` + """ + cdef cyruntime.cudaArray_t cyhArray + if hArray is None: + phArray = 0 + elif isinstance(hArray, (cudaArray_t,)): + phArray = int(hArray) + else: + phArray = int(cudaArray_t(hArray)) + cyhArray = phArray + cdef cudaArray_t pPlaneArray = cudaArray_t() + with nogil: + err = cyruntime.cudaArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pPlaneArray) + +@cython.embedsignature(True) +def cudaArrayGetMemoryRequirements(array, int device): + """ Returns the memory requirements of a CUDA array. + + Returns the memory requirements of a CUDA array in `memoryRequirements` + If the CUDA array is not allocated with flag + :py:obj:`~.cudaArrayDeferredMapping` :py:obj:`~.cudaErrorInvalidValue` + will be returned. + + The returned value in :py:obj:`~.cudaArrayMemoryRequirements.size` + represents the total size of the CUDA array. The returned value in + :py:obj:`~.cudaArrayMemoryRequirements.alignment` represents the + alignment necessary for mapping the CUDA array. + + Parameters + ---------- + array : :py:obj:`~.cudaArray_t` + CUDA array to get the memory requirements of + device : int + Device to get the memory requirements for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + memoryRequirements : :py:obj:`~.cudaArrayMemoryRequirements` + Pointer to :py:obj:`~.cudaArrayMemoryRequirements` + + See Also + -------- + :py:obj:`~.cudaMipmappedArrayGetMemoryRequirements` + """ + cdef cyruntime.cudaArray_t cyarray + if array is None: + parray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + else: + parray = int(cudaArray_t(array)) + cyarray = parray + cdef cudaArrayMemoryRequirements memoryRequirements = cudaArrayMemoryRequirements() + with nogil: + err = cyruntime.cudaArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memoryRequirements) + +@cython.embedsignature(True) +def cudaMipmappedArrayGetMemoryRequirements(mipmap, int device): + """ Returns the memory requirements of a CUDA mipmapped array. + + Returns the memory requirements of a CUDA mipmapped array in + `memoryRequirements` If the CUDA mipmapped array is not allocated with + flag :py:obj:`~.cudaArrayDeferredMapping` + :py:obj:`~.cudaErrorInvalidValue` will be returned. + + The returned value in :py:obj:`~.cudaArrayMemoryRequirements.size` + represents the total size of the CUDA mipmapped array. The returned + value in :py:obj:`~.cudaArrayMemoryRequirements.alignment` represents + the alignment necessary for mapping the CUDA mipmapped array. + + Parameters + ---------- + mipmap : :py:obj:`~.cudaMipmappedArray_t` + CUDA mipmapped array to get the memory requirements of + device : int + Device to get the memory requirements for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + memoryRequirements : :py:obj:`~.cudaArrayMemoryRequirements` + Pointer to :py:obj:`~.cudaArrayMemoryRequirements` + + See Also + -------- + :py:obj:`~.cudaArrayGetMemoryRequirements` + """ + cdef cyruntime.cudaMipmappedArray_t cymipmap + if mipmap is None: + pmipmap = 0 + elif isinstance(mipmap, (cudaMipmappedArray_t,)): + pmipmap = int(mipmap) + else: + pmipmap = int(cudaMipmappedArray_t(mipmap)) + cymipmap = pmipmap + cdef cudaArrayMemoryRequirements memoryRequirements = cudaArrayMemoryRequirements() + with nogil: + err = cyruntime.cudaMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, device) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memoryRequirements) + +@cython.embedsignature(True) +def cudaArrayGetSparseProperties(array): + """ Returns the layout properties of a sparse CUDA array. + + Returns the layout properties of a sparse CUDA array in + `sparseProperties`. If the CUDA array is not allocated with flag + :py:obj:`~.cudaArraySparse` :py:obj:`~.cudaErrorInvalidValue` will be + returned. + + If the returned value in :py:obj:`~.cudaArraySparseProperties.flags` + contains :py:obj:`~.cudaArraySparsePropertiesSingleMipTail`, then + :py:obj:`~.cudaArraySparseProperties.miptailSize` represents the total + size of the array. Otherwise, it will be zero. Also, the returned value + in :py:obj:`~.cudaArraySparseProperties.miptailFirstLevel` is always + zero. Note that the `array` must have been allocated using + :py:obj:`~.cudaMallocArray` or :py:obj:`~.cudaMalloc3DArray`. For CUDA + arrays obtained using :py:obj:`~.cudaMipmappedArrayGetLevel`, + :py:obj:`~.cudaErrorInvalidValue` will be returned. Instead, + :py:obj:`~.cudaMipmappedArrayGetSparseProperties` must be used to + obtain the sparse properties of the entire CUDA mipmapped array to + which `array` belongs to. + + Parameters + ---------- + array : :py:obj:`~.cudaArray_t` + The CUDA array to get the sparse properties of + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + sparseProperties : :py:obj:`~.cudaArraySparseProperties` + Pointer to return the :py:obj:`~.cudaArraySparseProperties` + + See Also + -------- + :py:obj:`~.cudaMipmappedArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cyruntime.cudaArray_t cyarray + if array is None: + parray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + else: + parray = int(cudaArray_t(array)) + cyarray = parray + cdef cudaArraySparseProperties sparseProperties = cudaArraySparseProperties() + with nogil: + err = cyruntime.cudaArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], sparseProperties) + +@cython.embedsignature(True) +def cudaMipmappedArrayGetSparseProperties(mipmap): + """ Returns the layout properties of a sparse CUDA mipmapped array. + + Returns the sparse array layout properties in `sparseProperties`. If + the CUDA mipmapped array is not allocated with flag + :py:obj:`~.cudaArraySparse` :py:obj:`~.cudaErrorInvalidValue` will be + returned. + + For non-layered CUDA mipmapped arrays, + :py:obj:`~.cudaArraySparseProperties.miptailSize` returns the size of + the mip tail region. The mip tail region includes all mip levels whose + width, height or depth is less than that of the tile. For layered CUDA + mipmapped arrays, if :py:obj:`~.cudaArraySparseProperties.flags` + contains :py:obj:`~.cudaArraySparsePropertiesSingleMipTail`, then + :py:obj:`~.cudaArraySparseProperties.miptailSize` specifies the size of + the mip tail of all layers combined. Otherwise, + :py:obj:`~.cudaArraySparseProperties.miptailSize` specifies mip tail + size per layer. The returned value of + :py:obj:`~.cudaArraySparseProperties.miptailFirstLevel` is valid only + if :py:obj:`~.cudaArraySparseProperties.miptailSize` is non-zero. + + Parameters + ---------- + mipmap : :py:obj:`~.cudaMipmappedArray_t` + The CUDA mipmapped array to get the sparse properties of + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + sparseProperties : :py:obj:`~.cudaArraySparseProperties` + Pointer to return :py:obj:`~.cudaArraySparseProperties` + + See Also + -------- + :py:obj:`~.cudaArrayGetSparseProperties`, :py:obj:`~.cuMemMapArrayAsync` + """ + cdef cyruntime.cudaMipmappedArray_t cymipmap + if mipmap is None: + pmipmap = 0 + elif isinstance(mipmap, (cudaMipmappedArray_t,)): + pmipmap = int(mipmap) + else: + pmipmap = int(cudaMipmappedArray_t(mipmap)) + cymipmap = pmipmap + cdef cudaArraySparseProperties sparseProperties = cudaArraySparseProperties() + with nogil: + err = cyruntime.cudaMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], sparseProperties) + +@cython.embedsignature(True) +def cudaMemcpy(dst, src, size_t count, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + Copies `count` bytes from the memory area pointed to by `src` to the + memory area pointed to by `dst`, where `kind` specifies the direction + of the copy, and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. Calling :py:obj:`~.cudaMemcpy()` with dst + and src pointers that do not match the direction of the copy results in + an undefined behavior. + + \note_sync + + Parameters + ---------- + dst : Any + Destination memory address + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpy` + """ + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy(cydst_ptr, cysrc_ptr, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyPeer(dst, int dstDevice, src, int srcDevice, size_t count): + """ Copies memory between two devices. + + Copies memory from one device to memory on another device. `dst` is the + base device pointer of the destination memory and `dstDevice` is the + destination device. `src` is the base device pointer of the source + memory and `srcDevice` is the source device. `count` specifies the + number of bytes to copy. + + Note that this function is asynchronous with respect to the host, but + serialized with respect all pending and future asynchronous work in to + the current device, `srcDevice`, and `dstDevice` (use + :py:obj:`~.cudaMemcpyPeerAsync` to avoid this synchronization). + + Parameters + ---------- + dst : Any + Destination device pointer + dstDevice : int + Destination device + src : Any + Source device pointer + srcDevice : int + Source device + count : size_t + Size of memory copy in bytes + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpyPeer` + """ + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + with nogil: + err = cyruntime.cudaMemcpyPeer(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2D(dst, size_t dpitch, src, size_t spitch, size_t width, size_t height, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the memory + area pointed to by `src` to the memory area pointed to by `dst`, where + `kind` specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `dpitch` and `spitch` are the widths in + memory in bytes of the 2D arrays pointed to by `dst` and `src`, + including any padding added to the end of each row. The memory areas + may not overlap. `width` must not exceed either `dpitch` or `spitch`. + Calling :py:obj:`~.cudaMemcpy2D()` with `dst` and `src` pointers that + do not match the direction of the copy results in an undefined + behavior. :py:obj:`~.cudaMemcpy2D()` returns an error if `dpitch` or + `spitch` exceeds the maximum allowed. + + Parameters + ---------- + dst : Any + Destination memory address + dpitch : size_t + Pitch of destination memory + src : Any + Source memory address + spitch : size_t + Pitch of source memory + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned` + """ + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2D(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2DToArray(dst, size_t wOffset, size_t hOffset, src, size_t spitch, size_t width, size_t height, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the memory + area pointed to by `src` to the CUDA array `dst` starting at `hOffset` + rows and `wOffset` bytes from the upper left corner, where `kind` + specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `spitch` is the width in memory in bytes of + the 2D array pointed to by `src`, including any padding added to the + end of each row. `wOffset` + `width` must not exceed the width of the + CUDA array `dst`. `width` must not exceed `spitch`. + :py:obj:`~.cudaMemcpy2DToArray()` returns an error if `spitch` exceeds + the maximum allowed. + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffset : size_t + Destination starting X offset (columns in bytes) + hOffset : size_t + Destination starting Y offset (rows) + src : Any + Source memory address + spitch : size_t + Pitch of source memory + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned` + """ + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DToArray(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2DFromArray(dst, size_t dpitch, src, size_t wOffset, size_t hOffset, size_t width, size_t height, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the CUDA + array `src` starting at `hOffset` rows and `wOffset` bytes from the + upper left corner to the memory area pointed to by `dst`, where `kind` + specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `dpitch` is the width in memory in bytes of + the 2D array pointed to by `dst`, including any padding added to the + end of each row. `wOffset` + `width` must not exceed the width of the + CUDA array `src`. `width` must not exceed `dpitch`. + :py:obj:`~.cudaMemcpy2DFromArray()` returns an error if `dpitch` + exceeds the maximum allowed. + + Parameters + ---------- + dst : Any + Destination memory address + dpitch : size_t + Pitch of destination memory + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffset : size_t + Source starting X offset (columns in bytes) + hOffset : size_t + Source starting Y offset (rows) + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned` + """ + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DFromArray(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2DArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the CUDA + array `src` starting at `hOffsetSrc` rows and `wOffsetSrc` bytes from + the upper left corner to the CUDA array `dst` starting at `hOffsetDst` + rows and `wOffsetDst` bytes from the upper left corner, where `kind` + specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `wOffsetDst` + `width` must not exceed the + width of the CUDA array `dst`. `wOffsetSrc` + `width` must not exceed + the width of the CUDA array `src`. + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffsetDst : size_t + Destination starting X offset (columns in bytes) + hOffsetDst : size_t + Destination starting Y offset (rows) + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffsetSrc : size_t + Source starting X offset (columns in bytes) + hOffsetSrc : size_t + Source starting Y offset (rows) + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DUnaligned` + """ + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, width, height, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyAsync(dst, src, size_t count, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + Copies `count` bytes from the memory area pointed to by `src` to the + memory area pointed to by `dst`, where `kind` specifies the direction + of the copy, and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + The memory areas may not overlap. Calling :py:obj:`~.cudaMemcpyAsync()` + with `dst` and `src` pointers that do not match the direction of the + copy results in an undefined behavior. + + :py:obj:`~.cudaMemcpyAsync()` is asynchronous with respect to the host, + so the call may return before the copy is complete. The copy can + optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and the `stream` is non-zero, the + copy may overlap with operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + dst : Any + Destination memory address + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyAsync`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemcpyDtoDAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyAsync(cydst_ptr, cysrc_ptr, count, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyPeerAsync(dst, int dstDevice, src, int srcDevice, size_t count, stream): + """ Copies memory between two devices asynchronously. + + Copies memory from one device to memory on another device. `dst` is the + base device pointer of the destination memory and `dstDevice` is the + destination device. `src` is the base device pointer of the source + memory and `srcDevice` is the source device. `count` specifies the + number of bytes to copy. + + Note that this function is asynchronous with respect to the host and + all work on other devices. + + Parameters + ---------- + dst : Any + Destination device pointer + dstDevice : int + Destination device + src : Any + Source device pointer + srcDevice : int + Source device + count : size_t + Size of memory copy in bytes + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpyPeerAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + with nogil: + err = cyruntime.cudaMemcpyPeerAsync(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyBatchAsync(dsts : Optional[tuple[Any] | list[Any]], srcs : Optional[tuple[Any] | list[Any]], sizes : tuple[int] | list[int], size_t count, attrs : Optional[tuple[cudaMemcpyAttributes] | list[cudaMemcpyAttributes]], attrsIdxs : tuple[int] | list[int], size_t numAttrs, stream): + """ Performs a batch of memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. This API only supports pointer-to-pointer copies. + For copies involving CUDA arrays, please see + :py:obj:`~.cudaMemcpy3DBatchAsync`. + + Performs memory copies from source buffers specified in `srcs` to + destination buffers specified in `dsts`. The size of each copy is + specified in `sizes`. All three arrays must be of the same length as + specified by `count`. Since there are no ordering guarantees for copies + within a batch, specifying any dependent copies within a batch will + result in undefined behavior. + + Every copy in the batch has to be associated with a set of attributes + specified in the `attrs` array. Each entry in this array can apply to + more than one copy. This can be done by specifying in the `attrsIdxs` + array, the index of the first copy that the corresponding entry in the + `attrs` array applies to. Both `attrs` and `attrsIdxs` must be of the + same length as specified by `numAttrs`. For example, if a batch has 10 + copies listed in dst/src/sizes, the first 6 of which have one set of + attributes and the remaining 4 another, then `numAttrs` will be 2, + `attrsIdxs` will be {0, 6} and `attrs` will contains the two sets of + attributes. Note that the first entry in `attrsIdxs` must always be 0. + Also, each entry must be greater than the previous entry and the last + entry should be less than `count`. Furthermore, `numAttrs` must be + lesser than or equal to `count`. + + The :py:obj:`~.cudaMemcpyAttributes.srcAccessOrder` indicates the + source access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderStream`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderDuringApiCall` then it indicates + that access to the source pointer can be out of stream order and all + accesses must be complete before the API call returns. This flag is + suited for ephemeral sources (ex., stack variables) when it's known + that no prior operations in the stream can be accessing the memory and + also that the lifetime of the memory is limited to the scope that the + source variable was declared in. Specifying this flag allows the driver + to optimize the copy and removes the need for the user to synchronize + the stream after the API call. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderAny` then it indicates that access + to the source pointer can be out of stream order and the accesses can + happen even after the API call returns. This flag is suited for host + pointers allocated outside CUDA (ex., via malloc) when it's known that + no prior operations in the stream can be accessing the memory. + Specifying this flag allows the driver to optimize the copy on certain + platforms. Each memcpy operation in the batch must have a valid + :py:obj:`~.cudaMemcpyAttributes` corresponding to it including the + appropriate srcAccessOrder setting, otherwise the API will return + :py:obj:`~.cudaErrorInvalidValue`. + + The :py:obj:`~.cudaMemcpyAttributes.srcLocHint` and + :py:obj:`~.cudaMemcpyAttributes.dstLocHint` allows applications to + specify hint locations for operands of a copy when the operand doesn't + have a fixed location. That is, these hints are only applicable for + managed memory pointers on devices where + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` is true or system- + allocated pageable memory on devices where + :py:obj:`~.cudaDevAttrPageableMemoryAccess` is true. For other cases, + these hints are ignored. + + The :py:obj:`~.cudaMemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.cudaMemcpyFlagPreferOverlapWithCompute` flag indicates that + the associated copies should preferably overlap with any compute work. + Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + dsts : list[Any] + Array of destination pointers. + srcs : list[Any] + Array of memcpy source pointers. + sizes : list[int] + Array of sizes for memcpy operations. + count : size_t + Size of `dsts`, `srcs` and `sizes` arrays + attrs : list[:py:obj:`~.cudaMemcpyAttributes`] + Array of memcpy attributes. + attrsIdxs : list[int] + Array of indices to specify which copies each entry in the `attrs` + array applies to. The attributes specified in attrs[k] will be + applied to copies starting from attrsIdxs[k] through attrsIdxs[k+1] + - 1. Also attrs[numAttrs-1] will apply to copies starting from + attrsIdxs[numAttrs-1] through count - 1. + numAttrs : size_t + Size of `attrs` and `attrsIdxs` arrays. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be legacy NULL + stream. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + if not all(isinstance(_x, (int)) for _x in attrsIdxs): + raise TypeError("Argument 'attrsIdxs' is not instance of type (expected tuple[int] or list[int]") + attrs = [] if attrs is None else attrs + if not all(isinstance(_x, (cudaMemcpyAttributes,)) for _x in attrs): + raise TypeError("Argument 'attrs' is not instance of type (expected tuple[cyruntime.cudaMemcpyAttributes,] or list[cyruntime.cudaMemcpyAttributes,]") + if not all(isinstance(_x, (int)) for _x in sizes): + raise TypeError("Argument 'sizes' is not instance of type (expected tuple[int] or list[int]") + srcs = [] if srcs is None else srcs + dsts = [] if dsts is None else dsts + pylist = [_HelperInputVoidPtr(pydsts) for pydsts in dsts] + cdef _InputVoidPtrPtrHelper voidStarHelperdsts = _InputVoidPtrPtrHelper(pylist) + cdef void** cydsts_ptr = voidStarHelperdsts.cptr + pylist = [_HelperInputVoidPtr(pysrcs) for pysrcs in srcs] + cdef _InputVoidPtrPtrHelper voidStarHelpersrcs = _InputVoidPtrPtrHelper(pylist) + cdef void** cysrcs_ptr = voidStarHelpersrcs.cptr + cdef vector[size_t] cysizes = sizes + if count > len(dsts): raise RuntimeError("List is too small: " + str(len(dsts)) + " < " + str(count)) + if count > len(srcs): raise RuntimeError("List is too small: " + str(len(srcs)) + " < " + str(count)) + if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) + cdef cyruntime.cudaMemcpyAttributes* cyattrs = NULL + if len(attrs) > 1: + cyattrs = calloc(len(attrs), sizeof(cyruntime.cudaMemcpyAttributes)) + if cyattrs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(attrs)) + 'x' + str(sizeof(cyruntime.cudaMemcpyAttributes))) + for idx in range(len(attrs)): + string.memcpy(&cyattrs[idx], (attrs[idx])._pvt_ptr, sizeof(cyruntime.cudaMemcpyAttributes)) + elif len(attrs) == 1: + cyattrs = (attrs[0])._pvt_ptr + cdef vector[size_t] cyattrsIdxs = attrsIdxs + if numAttrs > len(attrs): raise RuntimeError("List is too small: " + str(len(attrs)) + " < " + str(numAttrs)) + if numAttrs > len(attrsIdxs): raise RuntimeError("List is too small: " + str(len(attrsIdxs)) + " < " + str(numAttrs)) + cdef size_t failIdx = 0 + with nogil: + err = cyruntime.cudaMemcpyBatchAsync(cydsts_ptr, cysrcs_ptr, cysizes.data(), count, cyattrs, cyattrsIdxs.data(), numAttrs, &failIdx, cystream) + if len(attrs) > 1 and cyattrs is not NULL: + free(cyattrs) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], failIdx) + +@cython.embedsignature(True) +def cudaMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[cudaMemcpy3DBatchOp] | list[cudaMemcpy3DBatchOp]], unsigned long long flags, stream): + """ Performs a batch of 3D memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. Note that this means specifying any dependent + copies within a batch will result in undefined behavior. + + Performs memory copies as specified in the `opList` array. The length + of this array is specified in `numOps`. Each entry in this array + describes a copy operation. This includes among other things, the + source and destination operands for the copy as specified in + :py:obj:`~.cudaMemcpy3DBatchOp.src` and + :py:obj:`~.cudaMemcpy3DBatchOp.dst` respectively. The source and + destination operands of a copy can either be a pointer or a CUDA array. + The width, height and depth of a copy is specified in + :py:obj:`~.cudaMemcpy3DBatchOp.extent`. The width, height and depth of + a copy are specified in elements and must not be zero. For pointer-to- + pointer copies, the element size is considered to be 1. For pointer to + CUDA array or vice versa copies, the element size is determined by the + CUDA array. For CUDA array to CUDA array copies, the element size of + the two CUDA arrays must match. + + For a given operand, if :py:obj:`~.cudaMemcpy3DOperand`::type is + specified as :py:obj:`~.cudaMemcpyOperandTypePointer`, then + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr will be used. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::ptr field must contain the + pointer where the copy should begin. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::rowLength field specifies the + length of each row in elements and must either be zero or be greater + than or equal to the width of the copy specified in + :py:obj:`~.cudaMemcpy3DBatchOp`::extent::width. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::layerHeight field specifies + the height of each layer and must either be zero or be greater than or + equal to the height of the copy specified in + :py:obj:`~.cudaMemcpy3DBatchOp`::extent::height. When either of these + values is zero, that aspect of the operand is considered to be tightly + packed according to the copy extent. For managed memory pointers on + devices where :py:obj:`~.cudaDevAttrConcurrentManagedAccess` is true or + system-allocated pageable memory on devices where + :py:obj:`~.cudaDevAttrPageableMemoryAccess` is true, the + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::locHint field can be used to + hint the location of the operand. + + If an operand's type is specified as + :py:obj:`~.cudaMemcpyOperandTypeArray`, then + :py:obj:`~.cudaMemcpy3DOperand`::op::array will be used. The + :py:obj:`~.cudaMemcpy3DOperand`::op::array::array field specifies the + CUDA array and :py:obj:`~.cudaMemcpy3DOperand`::op::array::offset + specifies the 3D offset into that array where the copy begins. + + The :py:obj:`~.cudaMemcpyAttributes.srcAccessOrder` indicates the + source access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderStream`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderDuringApiCall` then it indicates + that access to the source pointer can be out of stream order and all + accesses must be complete before the API call returns. This flag is + suited for ephemeral sources (ex., stack variables) when it's known + that no prior operations in the stream can be accessing the memory and + also that the lifetime of the memory is limited to the scope that the + source variable was declared in. Specifying this flag allows the driver + to optimize the copy and removes the need for the user to synchronize + the stream after the API call. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderAny` then it indicates that access + to the source pointer can be out of stream order and the accesses can + happen even after the API call returns. This flag is suited for host + pointers allocated outside CUDA (ex., via malloc) when it's known that + no prior operations in the stream can be accessing the memory. + Specifying this flag allows the driver to optimize the copy on certain + platforms. Each memcopy operation in `opList` must have a valid + srcAccessOrder setting, otherwise this API will return + :py:obj:`~.cudaErrorInvalidValue`. + + The :py:obj:`~.cudaMemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.cudaMemcpyFlagPreferOverlapWithCompute` flag indicates that + the associated copies should preferably overlap with any compute work. + Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + numOps : size_t + Total number of memcpy operations. + opList : list[:py:obj:`~.cudaMemcpy3DBatchOp`] + Array of size `numOps` containing the actual memcpy operations. + flags : unsigned long long + Flags for future use, must be zero now. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be default NULL + stream. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + opList = [] if opList is None else opList + if not all(isinstance(_x, (cudaMemcpy3DBatchOp,)) for _x in opList): + raise TypeError("Argument 'opList' is not instance of type (expected tuple[cyruntime.cudaMemcpy3DBatchOp,] or list[cyruntime.cudaMemcpy3DBatchOp,]") + if numOps > len(opList): raise RuntimeError("List is too small: " + str(len(opList)) + " < " + str(numOps)) + cdef cyruntime.cudaMemcpy3DBatchOp* cyopList = NULL + if len(opList) > 1: + cyopList = calloc(len(opList), sizeof(cyruntime.cudaMemcpy3DBatchOp)) + if cyopList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(opList)) + 'x' + str(sizeof(cyruntime.cudaMemcpy3DBatchOp))) + for idx in range(len(opList)): + string.memcpy(&cyopList[idx], (opList[idx])._pvt_ptr, sizeof(cyruntime.cudaMemcpy3DBatchOp)) + elif len(opList) == 1: + cyopList = (opList[0])._pvt_ptr + cdef size_t failIdx = 0 + with nogil: + err = cyruntime.cudaMemcpy3DBatchAsync(numOps, cyopList, &failIdx, flags, cystream) + if len(opList) > 1 and cyopList is not NULL: + free(cyopList) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], failIdx) + +@cython.embedsignature(True) +def cudaMemcpy2DAsync(dst, size_t dpitch, src, size_t spitch, size_t width, size_t height, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the memory + area pointed to by `src` to the memory area pointed to by `dst`, where + `kind` specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `dpitch` and `spitch` are the widths in + memory in bytes of the 2D arrays pointed to by `dst` and `src`, + including any padding added to the end of each row. The memory areas + may not overlap. `width` must not exceed either `dpitch` or `spitch`. + + Calling :py:obj:`~.cudaMemcpy2DAsync()` with `dst` and `src` pointers + that do not match the direction of the copy results in an undefined + behavior. :py:obj:`~.cudaMemcpy2DAsync()` returns an error if `dpitch` + or `spitch` is greater than the maximum allowed. + + :py:obj:`~.cudaMemcpy2DAsync()` is asynchronous with respect to the + host, so the call may return before the copy is complete. The copy can + optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + dst : Any + Destination memory address + dpitch : size_t + Pitch of destination memory + src : Any + Source memory address + spitch : size_t + Pitch of source memory + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2DAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DAsync(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2DToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t spitch, size_t width, size_t height, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the memory + area pointed to by `src` to the CUDA array `dst` starting at `hOffset` + rows and `wOffset` bytes from the upper left corner, where `kind` + specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `spitch` is the width in memory in bytes of + the 2D array pointed to by `src`, including any padding added to the + end of each row. `wOffset` + `width` must not exceed the width of the + CUDA array `dst`. `width` must not exceed `spitch`. + :py:obj:`~.cudaMemcpy2DToArrayAsync()` returns an error if `spitch` + exceeds the maximum allowed. + + :py:obj:`~.cudaMemcpy2DToArrayAsync()` is asynchronous with respect to + the host, so the call may return before the copy is complete. The copy + can optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + :py:obj:`~.cudaMemcpy2DFromArrayAsync`, + :py:obj:`~.cudaMemcpyToSymbolAsync`, + :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2DAsync` + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffset : size_t + Destination starting X offset (columns in bytes) + hOffset : size_t + Destination starting Y offset (rows) + src : Any + Source memory address + spitch : size_t + Pitch of source memory + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpy2DFromArrayAsync(dst, size_t dpitch, src, size_t wOffset, size_t hOffset, size_t width, size_t height, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + Copies a matrix (`height` rows of `width` bytes each) from the CUDA + array `src` starting at `hOffset` rows and `wOffset` bytes from the + upper left corner to the memory area pointed to by `dst`, where `kind` + specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. `dpitch` is the width in memory in bytes of + the 2D array pointed to by `dst`, including any padding added to the + end of each row. `wOffset` + `width` must not exceed the width of the + CUDA array `src`. `width` must not exceed `dpitch`. + :py:obj:`~.cudaMemcpy2DFromArrayAsync()` returns an error if `dpitch` + exceeds the maximum allowed. + + :py:obj:`~.cudaMemcpy2DFromArrayAsync()` is asynchronous with respect + to the host, so the call may return before the copy is complete. The + copy can optionally be associated to a stream by passing a non-zero + `stream` argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + :py:obj:`~.cudaMemcpyToSymbolAsync`, + :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpy2DAsync` + + Parameters + ---------- + dst : Any + Destination memory address + dpitch : size_t + Pitch of destination memory + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffset : size_t + Source starting X offset (columns in bytes) + hOffset : size_t + Source starting Y offset (rows) + width : size_t + Width of matrix transfer (columns in bytes) + height : size_t + Height of matrix transfer (rows) + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidPitchValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpy2DFromArrayAsync(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemset(devPtr, int value, size_t count): + """ Initializes or sets device memory to a value. + + Fills the first `count` bytes of the memory area pointed to by `devPtr` + with the constant byte value `value`. + + Note that this function is asynchronous with respect to the host unless + `devPtr` refers to pinned host memory. + + Parameters + ---------- + devPtr : Any + Pointer to device memory + value : int + Value to set for each byte of specified memory + count : size_t + Size in bytes to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemset(cydevPtr_ptr, value, count) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemset2D(devPtr, size_t pitch, int value, size_t width, size_t height): + """ Initializes or sets device memory to a value. + + Sets to the specified value `value` a matrix (`height` rows of `width` + bytes each) pointed to by `dstPtr`. `pitch` is the width in bytes of + the 2D array pointed to by `dstPtr`, including any padding added to the + end of each row. This function performs fastest when the pitch is one + that has been passed back by :py:obj:`~.cudaMallocPitch()`. + + Note that this function is asynchronous with respect to the host unless + `devPtr` refers to pinned host memory. + + Parameters + ---------- + devPtr : Any + Pointer to 2D device memory + pitch : size_t + Pitch in bytes of 2D device memory(Unused if `height` is 1) + value : int + Value to set for each byte of specified memory + width : size_t + Width of matrix set (columns in bytes) + height : size_t + Height of matrix set (rows) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemsetAsync`, :py:obj:`~.cudaMemset2DAsync`, :py:obj:`~.cudaMemset3DAsync`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemset2D(cydevPtr_ptr, pitch, value, width, height) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemset3D(pitchedDevPtr not None : cudaPitchedPtr, int value, extent not None : cudaExtent): + """ Initializes or sets device memory to a value. + + Initializes each element of a 3D array to the specified value `value`. + The object to initialize is defined by `pitchedDevPtr`. The `pitch` + field of `pitchedDevPtr` is the width in memory in bytes of the 3D + array pointed to by `pitchedDevPtr`, including any padding added to the + end of each row. The `xsize` field specifies the logical width of each + row in bytes, while the `ysize` field specifies the height of each 2D + slice in rows. The `pitch` field of `pitchedDevPtr` is ignored when + `height` and `depth` are both equal to 1. + + The extents of the initialized region are specified as a `width` in + bytes, a `height` in rows, and a `depth` in slices. + + Extents with `width` greater than or equal to the `xsize` of + `pitchedDevPtr` may perform significantly faster than extents narrower + than the `xsize`. Secondarily, extents with `height` equal to the + `ysize` of `pitchedDevPtr` will perform faster than when the `height` + is shorter than the `ysize`. + + This function performs fastest when the `pitchedDevPtr` has been + allocated by :py:obj:`~.cudaMalloc3D()`. + + Note that this function is asynchronous with respect to the host unless + `pitchedDevPtr` refers to pinned host memory. + + Parameters + ---------- + pitchedDevPtr : :py:obj:`~.cudaPitchedPtr` + Pointer to pitched device memory + value : int + Value to set for each byte of specified memory + extent : :py:obj:`~.cudaExtent` + Size parameters for where to set device memory (`width` field in + bytes) + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaMemsetAsync`, :py:obj:`~.cudaMemset2DAsync`, :py:obj:`~.cudaMemset3DAsync`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.make_cudaPitchedPtr`, :py:obj:`~.make_cudaExtent` + """ + with nogil: + err = cyruntime.cudaMemset3D(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0]) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemsetAsync(devPtr, int value, size_t count, stream): + """ Initializes or sets device memory to a value. + + Fills the first `count` bytes of the memory area pointed to by `devPtr` + with the constant byte value `value`. + + :py:obj:`~.cudaMemsetAsync()` is asynchronous with respect to the host, + so the call may return before the memset is complete. The operation can + optionally be associated to a stream by passing a non-zero `stream` + argument. If `stream` is non-zero, the operation may overlap with + operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + devPtr : Any + Pointer to device memory + value : int + Value to set for each byte of specified memory + count : size_t + Size in bytes to set + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemset2DAsync`, :py:obj:`~.cudaMemset3DAsync`, :py:obj:`~.cuMemsetD8Async`, :py:obj:`~.cuMemsetD16Async`, :py:obj:`~.cuMemsetD32Async` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemsetAsync(cydevPtr_ptr, value, count, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemset2DAsync(devPtr, size_t pitch, int value, size_t width, size_t height, stream): + """ Initializes or sets device memory to a value. + + Sets to the specified value `value` a matrix (`height` rows of `width` + bytes each) pointed to by `dstPtr`. `pitch` is the width in bytes of + the 2D array pointed to by `dstPtr`, including any padding added to the + end of each row. This function performs fastest when the pitch is one + that has been passed back by :py:obj:`~.cudaMallocPitch()`. + + :py:obj:`~.cudaMemset2DAsync()` is asynchronous with respect to the + host, so the call may return before the memset is complete. The + operation can optionally be associated to a stream by passing a non- + zero `stream` argument. If `stream` is non-zero, the operation may + overlap with operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + devPtr : Any + Pointer to 2D device memory + pitch : size_t + Pitch in bytes of 2D device memory(Unused if `height` is 1) + value : int + Value to set for each byte of specified memory + width : size_t + Width of matrix set (columns in bytes) + height : size_t + Height of matrix set (rows) + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemsetAsync`, :py:obj:`~.cudaMemset3DAsync`, :py:obj:`~.cuMemsetD2D8Async`, :py:obj:`~.cuMemsetD2D16Async`, :py:obj:`~.cuMemsetD2D32Async` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemset2DAsync(cydevPtr_ptr, pitch, value, width, height, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemset3DAsync(pitchedDevPtr not None : cudaPitchedPtr, int value, extent not None : cudaExtent, stream): + """ Initializes or sets device memory to a value. + + Initializes each element of a 3D array to the specified value `value`. + The object to initialize is defined by `pitchedDevPtr`. The `pitch` + field of `pitchedDevPtr` is the width in memory in bytes of the 3D + array pointed to by `pitchedDevPtr`, including any padding added to the + end of each row. The `xsize` field specifies the logical width of each + row in bytes, while the `ysize` field specifies the height of each 2D + slice in rows. The `pitch` field of `pitchedDevPtr` is ignored when + `height` and `depth` are both equal to 1. + + The extents of the initialized region are specified as a `width` in + bytes, a `height` in rows, and a `depth` in slices. + + Extents with `width` greater than or equal to the `xsize` of + `pitchedDevPtr` may perform significantly faster than extents narrower + than the `xsize`. Secondarily, extents with `height` equal to the + `ysize` of `pitchedDevPtr` will perform faster than when the `height` + is shorter than the `ysize`. + + This function performs fastest when the `pitchedDevPtr` has been + allocated by :py:obj:`~.cudaMalloc3D()`. + + :py:obj:`~.cudaMemset3DAsync()` is asynchronous with respect to the + host, so the call may return before the memset is complete. The + operation can optionally be associated to a stream by passing a non- + zero `stream` argument. If `stream` is non-zero, the operation may + overlap with operations in other streams. + + The device version of this function only handles device to device + copies and cannot be given local or shared pointers. + + Parameters + ---------- + pitchedDevPtr : :py:obj:`~.cudaPitchedPtr` + Pointer to pitched device memory + value : int + Value to set for each byte of specified memory + extent : :py:obj:`~.cudaExtent` + Size parameters for where to set device memory (`width` field in + bytes) + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemsetAsync`, :py:obj:`~.cudaMemset2DAsync`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.make_cudaPitchedPtr`, :py:obj:`~.make_cudaExtent` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + with nogil: + err = cyruntime.cudaMemset3DAsync(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0], cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPrefetchAsync(devPtr, size_t count, int dstDevice, stream): + """ Prefetches memory to the specified destination device. + + Prefetches memory to the specified destination device. `devPtr` is the + base device pointer of the memory to be prefetched and `dstDevice` is + the destination device. `count` specifies the number of bytes to copy. + `stream` is the stream in which the operation is enqueued. The memory + range must refer to managed memory allocated via + :py:obj:`~.cudaMallocManaged` or declared via managed variables, or it + may also refer to system-allocated memory on systems with non-zero + cudaDevAttrPageableMemoryAccess. + + Passing in cudaCpuDeviceId for `dstDevice` will prefetch the data to + host memory. If `dstDevice` is a GPU, then the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` must be non-zero. + Additionally, `stream` must be associated with a device that has a non- + zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. + + The start address and end address of the memory range will be rounded + down and rounded up respectively to be aligned to CPU page size before + the prefetch operation is enqueued in the stream. + + If no physical memory has been allocated for this region, then this + memory region will be populated and mapped on the destination device. + If there's insufficient memory to prefetch the desired region, the + Unified Memory driver may evict pages from other + :py:obj:`~.cudaMallocManaged` allocations to host memory in order to + make room. Device memory allocated using :py:obj:`~.cudaMalloc` or + :py:obj:`~.cudaMallocArray` will not be evicted. + + By default, any mappings to the previous location of the migrated pages + are removed and mappings for the new location are only setup on + `dstDevice`. The exact behavior however also depends on the settings + applied to this memory range via :py:obj:`~.cudaMemAdvise` as described + below: + + If :py:obj:`~.cudaMemAdviseSetReadMostly` was set on any subset of this + memory range, then that subset will create a read-only copy of the + pages on `dstDevice`. + + If :py:obj:`~.cudaMemAdviseSetPreferredLocation` was called on any + subset of this memory range, then the pages will be migrated to + `dstDevice` even if `dstDevice` is not the preferred location of any + pages in the memory range. + + If :py:obj:`~.cudaMemAdviseSetAccessedBy` was called on any subset of + this memory range, then mappings to those pages from all the + appropriate processors are updated to refer to the new location if + establishing such a mapping is possible. Otherwise, those mappings are + cleared. + + Note that this API is not required for functionality and only serves to + improve performance by allowing the application to migrate data to a + suitable location before it is accessed. Memory accesses to this range + are always coherent and are allowed even when the data is actively + being migrated. + + Note that this function is asynchronous with respect to the host and + all work on other devices. + + Parameters + ---------- + devPtr : Any + Pointer to be prefetched + count : size_t + Size in bytes + dstDevice : int + Destination device to prefetch to + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue prefetch operation + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cudaMemAdvise`, :py:obj:`~.cudaMemAdvise_v2` :py:obj:`~.cuMemPrefetchAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemPrefetchAsync(cydevPtr_ptr, count, dstDevice, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPrefetchAsync_v2(devPtr, size_t count, location not None : cudaMemLocation, unsigned int flags, stream): + """ Prefetches memory to the specified destination location. + + Prefetches memory to the specified destination location. `devPtr` is + the base device pointer of the memory to be prefetched and `location` + specifies the destination location. `count` specifies the number of + bytes to copy. `stream` is the stream in which the operation is + enqueued. The memory range must refer to managed memory allocated via + :py:obj:`~.cudaMallocManaged` or declared via managed variables, or it + may also refer to system-allocated memory on systems with non-zero + cudaDevAttrPageableMemoryAccess. + + Specifying :py:obj:`~.cudaMemLocationTypeDevice` for + :py:obj:`~.cudaMemLocation.type` will prefetch memory to GPU specified + by device ordinal :py:obj:`~.cudaMemLocation.id` which must have non- + zero value for the device attribute + :py:obj:`~.concurrentManagedAccess`. Additionally, `stream` must be + associated with a device that has a non-zero value for the device + attribute :py:obj:`~.concurrentManagedAccess`. Specifying + :py:obj:`~.cudaMemLocationTypeHost` as :py:obj:`~.cudaMemLocation.type` + will prefetch data to host memory. Applications can request prefetching + memory to a specific host NUMA node by specifying + :py:obj:`~.cudaMemLocationTypeHostNuma` for + :py:obj:`~.cudaMemLocation.type` and a valid host NUMA node id in + :py:obj:`~.cudaMemLocation.id` Users can also request prefetching + memory to the host NUMA node closest to the current thread's CPU by + specifying :py:obj:`~.cudaMemLocationTypeHostNumaCurrent` for + :py:obj:`~.cudaMemLocation.type`. Note when + :py:obj:`~.cudaMemLocation.type` is etiher + :py:obj:`~.cudaMemLocationTypeHost` OR + :py:obj:`~.cudaMemLocationTypeHostNumaCurrent`, + :py:obj:`~.cudaMemLocation.id` will be ignored. + + The start address and end address of the memory range will be rounded + down and rounded up respectively to be aligned to CPU page size before + the prefetch operation is enqueued in the stream. + + If no physical memory has been allocated for this region, then this + memory region will be populated and mapped on the destination device. + If there's insufficient memory to prefetch the desired region, the + Unified Memory driver may evict pages from other + :py:obj:`~.cudaMallocManaged` allocations to host memory in order to + make room. Device memory allocated using :py:obj:`~.cudaMalloc` or + :py:obj:`~.cudaMallocArray` will not be evicted. + + By default, any mappings to the previous location of the migrated pages + are removed and mappings for the new location are only setup on the + destination location. The exact behavior however also depends on the + settings applied to this memory range via :py:obj:`~.cuMemAdvise` as + described below: + + If :py:obj:`~.cudaMemAdviseSetReadMostly` was set on any subset of this + memory range, then that subset will create a read-only copy of the + pages on destination location. If however the destination location is a + host NUMA node, then any pages of that subset that are already in + another host NUMA node will be transferred to the destination. + + If :py:obj:`~.cudaMemAdviseSetPreferredLocation` was called on any + subset of this memory range, then the pages will be migrated to + `location` even if `location` is not the preferred location of any + pages in the memory range. + + If :py:obj:`~.cudaMemAdviseSetAccessedBy` was called on any subset of + this memory range, then mappings to those pages from all the + appropriate processors are updated to refer to the new location if + establishing such a mapping is possible. Otherwise, those mappings are + cleared. + + Note that this API is not required for functionality and only serves to + improve performance by allowing the application to migrate data to a + suitable location before it is accessed. Memory accesses to this range + are always coherent and are allowed even when the data is actively + being migrated. + + Note that this function is asynchronous with respect to the host and + all work on other devices. + + Parameters + ---------- + devPtr : Any + Pointer to be prefetched + count : size_t + Size in bytes + location : :py:obj:`~.cudaMemLocation` + location to prefetch to + flags : unsigned int + flags for future use, must be zero now. + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream to enqueue prefetch operation + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cudaMemAdvise`, :py:obj:`~.cudaMemAdvise_v2` :py:obj:`~.cuMemPrefetchAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemPrefetchAsync_v2(cydevPtr_ptr, count, location._pvt_ptr[0], flags, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, int device): + """ Advise about the usage of a given memory range. + + Advise the Unified Memory subsystem about the usage pattern for the + memory range starting at `devPtr` with a size of `count` bytes. The + start address and end address of the memory range will be rounded down + and rounded up respectively to be aligned to CPU page size before the + advice is applied. The memory range must refer to managed memory + allocated via :py:obj:`~.cudaMallocManaged` or declared via managed + variables. The memory range could also refer to system-allocated + pageable memory provided it represents a valid, host-accessible region + of memory and all additional constraints imposed by `advice` as + outlined below are also satisfied. Specifying an invalid system- + allocated pageable memory range results in an error being returned. + + The `advice` parameter can take the following values: + + - :py:obj:`~.cudaMemAdviseSetReadMostly`: This implies that the data is + mostly going to be read from and only occasionally written to. Any + read accesses from any processor to this region will create a read- + only copy of at least the accessed pages in that processor's memory. + Additionally, if :py:obj:`~.cudaMemPrefetchAsync` is called on this + region, it will create a read-only copy of the data on the + destination processor. If any processor writes to this region, all + copies of the corresponding page will be invalidated except for the + one where the write occurred. The `device` argument is ignored for + this advice. Note that for a page to be read-duplicated, the + accessing processor must either be the CPU or a GPU that has a non- + zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. Also, if a context is + created on a device that does not have the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` set, then read- + duplication will not occur until all such contexts are destroyed. If + the memory region refers to valid system-allocated pageable memory, + then the accessing device must have a non-zero value for the device + attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess` for a read-only + copy to be created on that device. Note however that if the accessing + device also has a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + setting this advice will not create a read-only copy when that device + accesses this memory region. + + - :py:obj:`~.cudaMemAdviceUnsetReadMostly`: Undoes the effect of + :py:obj:`~.cudaMemAdviceReadMostly` and also prevents the Unified + Memory driver from attempting heuristic read-duplication on the + memory range. Any read-duplicated copies of the data will be + collapsed into a single copy. The location for the collapsed copy + will be the preferred location if the page has a preferred location + and one of the read-duplicated copies was resident at that location. + Otherwise, the location chosen is arbitrary. + + - :py:obj:`~.cudaMemAdviseSetPreferredLocation`: This advice sets the + preferred location for the data to be the memory belonging to + `device`. Passing in cudaCpuDeviceId for `device` sets the preferred + location as host memory. If `device` is a GPU, then it must have a + non-zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. Setting the preferred + location does not cause data to migrate to that location immediately. + Instead, it guides the migration policy when a fault occurs on that + memory region. If the data is already in its preferred location and + the faulting processor can establish a mapping without requiring the + data to be migrated, then data migration will be avoided. On the + other hand, if the data is not in its preferred location or if a + direct mapping cannot be established, then it will be migrated to the + processor accessing it. It is important to note that setting the + preferred location does not prevent data prefetching done using + :py:obj:`~.cudaMemPrefetchAsync`. Having a preferred location can + override the page thrash detection and resolution logic in the + Unified Memory driver. Normally, if a page is detected to be + constantly thrashing between for example host and device memory, the + page may eventually be pinned to host memory by the Unified Memory + driver. But if the preferred location is set as device memory, then + the page will continue to thrash indefinitely. If + :py:obj:`~.cudaMemAdviseSetReadMostly` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice, unless read + accesses from `device` will not result in a read-only copy being + created on that device as outlined in description for the advice + :py:obj:`~.cudaMemAdviseSetReadMostly`. If the memory region refers + to valid system-allocated pageable memory, then `device` must have a + non-zero value for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + + - :py:obj:`~.cudaMemAdviseUnsetPreferredLocation`: Undoes the effect of + :py:obj:`~.cudaMemAdviseSetPreferredLocation` and changes the + preferred location to none. + + - :py:obj:`~.cudaMemAdviseSetAccessedBy`: This advice implies that the + data will be accessed by `device`. Passing in + :py:obj:`~.cudaCpuDeviceId` for `device` will set the advice for the + CPU. If `device` is a GPU, then the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` must be non-zero. This + advice does not cause data migration and has no impact on the + location of the data per se. Instead, it causes the data to always be + mapped in the specified processor's page tables, as long as the + location of the data permits a mapping to be established. If the data + gets migrated for any reason, the mappings are updated accordingly. + This advice is recommended in scenarios where data locality is not + important, but avoiding faults is. Consider for example a system + containing multiple GPUs with peer-to-peer access enabled, where the + data located on one GPU is occasionally accessed by peer GPUs. In + such scenarios, migrating data over to the other GPUs is not as + important because the accesses are infrequent and the overhead of + migration may be too high. But preventing faults can still help + improve performance, and so having a mapping set up in advance is + useful. Note that on CPU access of this data, the data may be + migrated to host memory because the CPU typically cannot access + device memory directly. Any GPU that had the + :py:obj:`~.cudaMemAdviceSetAccessedBy` flag set for this data will + now have its mapping updated to point to the page in host memory. If + :py:obj:`~.cudaMemAdviseSetReadMostly` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice. Additionally, if + the preferred location of this memory region or any subset of it is + also `device`, then the policies associated with + :py:obj:`~.cudaMemAdviseSetPreferredLocation` will override the + policies of this advice. If the memory region refers to valid system- + allocated pageable memory, then `device` must have a non-zero value + for the device attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + Additionally, if `device` has a non-zero value for the device + attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + this call has no effect. + + - :py:obj:`~.cudaMemAdviseUnsetAccessedBy`: Undoes the effect of + :py:obj:`~.cudaMemAdviseSetAccessedBy`. Any mappings to the data from + `device` may be removed at any time causing accesses to result in + non-fatal page faults. If the memory region refers to valid system- + allocated pageable memory, then `device` must have a non-zero value + for the device attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + Additionally, if `device` has a non-zero value for the device + attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + this call has no effect. + + Parameters + ---------- + devPtr : Any + Pointer to memory to set the advice for + count : size_t + Size in bytes of the memory range + advice : :py:obj:`~.cudaMemoryAdvise` + Advice to be applied for the specified memory range + device : int + Device to apply the advice for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cudaMemPrefetchAsync`, :py:obj:`~.cuMemAdvise` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + cdef cyruntime.cudaMemoryAdvise cyadvice = advice.value + with nogil: + err = cyruntime.cudaMemAdvise(cydevPtr_ptr, count, cyadvice, device) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemAdvise_v2(devPtr, size_t count, advice not None : cudaMemoryAdvise, location not None : cudaMemLocation): + """ Advise about the usage of a given memory range. + + Advise the Unified Memory subsystem about the usage pattern for the + memory range starting at `devPtr` with a size of `count` bytes. The + start address and end address of the memory range will be rounded down + and rounded up respectively to be aligned to CPU page size before the + advice is applied. The memory range must refer to managed memory + allocated via :py:obj:`~.cudaMallocManaged` or declared via managed + variables. The memory range could also refer to system-allocated + pageable memory provided it represents a valid, host-accessible region + of memory and all additional constraints imposed by `advice` as + outlined below are also satisfied. Specifying an invalid system- + allocated pageable memory range results in an error being returned. + + The `advice` parameter can take the following values: + + - :py:obj:`~.cudaMemAdviseSetReadMostly`: This implies that the data is + mostly going to be read from and only occasionally written to. Any + read accesses from any processor to this region will create a read- + only copy of at least the accessed pages in that processor's memory. + Additionally, if :py:obj:`~.cudaMemPrefetchAsync` or + :py:obj:`~.cudaMemPrefetchAsync_v2` is called on this region, it will + create a read-only copy of the data on the destination processor. If + the target location for :py:obj:`~.cudaMemPrefetchAsync_v2` is a host + NUMA node and a read-only copy already exists on another host NUMA + node, that copy will be migrated to the targeted host NUMA node. If + any processor writes to this region, all copies of the corresponding + page will be invalidated except for the one where the write occurred. + If the writing processor is the CPU and the preferred location of the + page is a host NUMA node, then the page will also be migrated to that + host NUMA node. The `location` argument is ignored for this advice. + Note that for a page to be read-duplicated, the accessing processor + must either be the CPU or a GPU that has a non-zero value for the + device attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. + Also, if a context is created on a device that does not have the + device attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess` set, + then read-duplication will not occur until all such contexts are + destroyed. If the memory region refers to valid system-allocated + pageable memory, then the accessing device must have a non-zero value + for the device attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess` + for a read-only copy to be created on that device. Note however that + if the accessing device also has a non-zero value for the device + attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + setting this advice will not create a read-only copy when that device + accesses this memory region. + + - :py:obj:`~.cudaMemAdviceUnsetReadMostly`: Undoes the effect of + :py:obj:`~.cudaMemAdviseSetReadMostly` and also prevents the Unified + Memory driver from attempting heuristic read-duplication on the + memory range. Any read-duplicated copies of the data will be + collapsed into a single copy. The location for the collapsed copy + will be the preferred location if the page has a preferred location + and one of the read-duplicated copies was resident at that location. + Otherwise, the location chosen is arbitrary. Note: The `location` + argument is ignored for this advice. + + - :py:obj:`~.cudaMemAdviseSetPreferredLocation`: This advice sets the + preferred location for the data to be the memory belonging to + `location`. When :py:obj:`~.cudaMemLocation.type` is + :py:obj:`~.cudaMemLocationTypeHost`, :py:obj:`~.cudaMemLocation.id` + is ignored and the preferred location is set to be host memory. To + set the preferred location to a specific host NUMA node, applications + must set :py:obj:`~.cudaMemLocation.type` to + :py:obj:`~.cudaMemLocationTypeHostNuma` and + :py:obj:`~.cudaMemLocation.id` must specify the NUMA ID of the host + NUMA node. If :py:obj:`~.cudaMemLocation.type` is set to + :py:obj:`~.cudaMemLocationTypeHostNumaCurrent`, + :py:obj:`~.cudaMemLocation.id` will be ignored and the host NUMA node + closest to the calling thread's CPU will be used as the preferred + location. If :py:obj:`~.cudaMemLocation.type` is a + :py:obj:`~.cudaMemLocationTypeDevice`, then + :py:obj:`~.cudaMemLocation.id` must be a valid device ordinal and the + device must have a non-zero value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. Setting the preferred + location does not cause data to migrate to that location immediately. + Instead, it guides the migration policy when a fault occurs on that + memory region. If the data is already in its preferred location and + the faulting processor can establish a mapping without requiring the + data to be migrated, then data migration will be avoided. On the + other hand, if the data is not in its preferred location or if a + direct mapping cannot be established, then it will be migrated to the + processor accessing it. It is important to note that setting the + preferred location does not prevent data prefetching done using + :py:obj:`~.cudaMemPrefetchAsync`. Having a preferred location can + override the page thrash detection and resolution logic in the + Unified Memory driver. Normally, if a page is detected to be + constantly thrashing between for example host and device memory, the + page may eventually be pinned to host memory by the Unified Memory + driver. But if the preferred location is set as device memory, then + the page will continue to thrash indefinitely. If + :py:obj:`~.cudaMemAdviseSetReadMostly` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice, unless read + accesses from `location` will not result in a read-only copy being + created on that procesor as outlined in description for the advice + :py:obj:`~.cudaMemAdviseSetReadMostly`. If the memory region refers + to valid system-allocated pageable memory, and + :py:obj:`~.cudaMemLocation.type` is + :py:obj:`~.cudaMemLocationTypeDevice` then + :py:obj:`~.cudaMemLocation.id` must be a valid device that has a non- + zero alue for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + + - :py:obj:`~.cudaMemAdviseUnsetPreferredLocation`: Undoes the effect of + :py:obj:`~.cudaMemAdviseSetPreferredLocation` and changes the + preferred location to none. The `location` argument is ignored for + this advice. + + - :py:obj:`~.cudaMemAdviseSetAccessedBy`: This advice implies that the + data will be accessed by processor `location`. The + :py:obj:`~.cudaMemLocation.type` must be either + :py:obj:`~.cudaMemLocationTypeDevice` with + :py:obj:`~.cudaMemLocation.id` representing a valid device ordinal or + :py:obj:`~.cudaMemLocationTypeHost` and + :py:obj:`~.cudaMemLocation.id` will be ignored. All other location + types are invalid. If :py:obj:`~.cudaMemLocation.id` is a GPU, then + the device attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess` + must be non-zero. This advice does not cause data migration and has + no impact on the location of the data per se. Instead, it causes the + data to always be mapped in the specified processor's page tables, as + long as the location of the data permits a mapping to be established. + If the data gets migrated for any reason, the mappings are updated + accordingly. This advice is recommended in scenarios where data + locality is not important, but avoiding faults is. Consider for + example a system containing multiple GPUs with peer-to-peer access + enabled, where the data located on one GPU is occasionally accessed + by peer GPUs. In such scenarios, migrating data over to the other + GPUs is not as important because the accesses are infrequent and the + overhead of migration may be too high. But preventing faults can + still help improve performance, and so having a mapping set up in + advance is useful. Note that on CPU access of this data, the data may + be migrated to host memory because the CPU typically cannot access + device memory directly. Any GPU that had the + :py:obj:`~.cudaMemAdviseSetAccessedBy` flag set for this data will + now have its mapping updated to point to the page in host memory. If + :py:obj:`~.cudaMemAdviseSetReadMostly` is also set on this memory + region or any subset of it, then the policies associated with that + advice will override the policies of this advice. Additionally, if + the preferred location of this memory region or any subset of it is + also `location`, then the policies associated with + :py:obj:`~.CU_MEM_ADVISE_SET_PREFERRED_LOCATION` will override the + policies of this advice. If the memory region refers to valid system- + allocated pageable memory, and :py:obj:`~.cudaMemLocation.type` is + :py:obj:`~.cudaMemLocationTypeDevice` then device in + :py:obj:`~.cudaMemLocation.id` must have a non-zero value for the + device attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + Additionally, if :py:obj:`~.cudaMemLocation.id` has a non-zero value + for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + this call has no effect. + + - :py:obj:`~.CU_MEM_ADVISE_UNSET_ACCESSED_BY`: Undoes the effect of + :py:obj:`~.cudaMemAdviseSetAccessedBy`. Any mappings to the data from + `location` may be removed at any time causing accesses to result in + non-fatal page faults. If the memory region refers to valid system- + allocated pageable memory, and :py:obj:`~.cudaMemLocation.type` is + :py:obj:`~.cudaMemLocationTypeDevice` then device in + :py:obj:`~.cudaMemLocation.id` must have a non-zero value for the + device attribute :py:obj:`~.cudaDevAttrPageableMemoryAccess`. + Additionally, if :py:obj:`~.cudaMemLocation.id` has a non-zero value + for the device attribute + :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, then + this call has no effect. + + Parameters + ---------- + devPtr : Any + Pointer to memory to set the advice for + count : size_t + Size in bytes of the memory range + advice : :py:obj:`~.cudaMemoryAdvise` + Advice to be applied for the specified memory range + location : :py:obj:`~.cudaMemLocation` + location to apply the advice for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cudaMemPrefetchAsync`, :py:obj:`~.cuMemAdvise`, :py:obj:`~.cuMemAdvise_v2` + """ + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + cdef cyruntime.cudaMemoryAdvise cyadvice = advice.value + with nogil: + err = cyruntime.cudaMemAdvise_v2(cydevPtr_ptr, count, cyadvice, location._pvt_ptr[0]) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemRangeGetAttribute(size_t dataSize, attribute not None : cudaMemRangeAttribute, devPtr, size_t count): + """ Query an attribute of a given memory range. + + Query an attribute about the memory range starting at `devPtr` with a + size of `count` bytes. The memory range must refer to managed memory + allocated via :py:obj:`~.cudaMallocManaged` or declared via managed + variables. + + The `attribute` parameter can take the following values: + + - :py:obj:`~.cudaMemRangeAttributeReadMostly`: If this attribute is + specified, `data` will be interpreted as a 32-bit integer, and + `dataSize` must be 4. The result returned will be 1 if all pages in + the given memory range have read-duplication enabled, or 0 otherwise. + + - :py:obj:`~.cudaMemRangeAttributePreferredLocation`: If this attribute + is specified, `data` will be interpreted as a 32-bit integer, and + `dataSize` must be 4. The result returned will be a GPU device id if + all pages in the memory range have that GPU as their preferred + location, or it will be cudaCpuDeviceId if all pages in the memory + range have the CPU as their preferred location, or it will be + cudaInvalidDeviceId if either all the pages don't have the same + preferred location or some of the pages don't have a preferred + location at all. Note that the actual location of the pages in the + memory range at the time of the query may be different from the + preferred location. + + - :py:obj:`~.cudaMemRangeAttributeAccessedBy`: If this attribute is + specified, `data` will be interpreted as an array of 32-bit integers, + and `dataSize` must be a non-zero multiple of 4. The result returned + will be a list of device ids that had + :py:obj:`~.cudaMemAdviceSetAccessedBy` set for that entire memory + range. If any device does not have that advice set for the entire + memory range, that device will not be included. If `data` is larger + than the number of devices that have that advice set for that memory + range, cudaInvalidDeviceId will be returned in all the extra space + provided. For ex., if `dataSize` is 12 (i.e. `data` has 3 elements) + and only device 0 has the advice set, then the result returned will + be { 0, cudaInvalidDeviceId, cudaInvalidDeviceId }. If `data` is + smaller than the number of devices that have that advice set, then + only as many devices will be returned as can fit in the array. There + is no guarantee on which specific devices will be returned, however. + + - :py:obj:`~.cudaMemRangeAttributeLastPrefetchLocation`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. The result returned will be the + last location to which all pages in the memory range were prefetched + explicitly via :py:obj:`~.cudaMemPrefetchAsync`. This will either be + a GPU id or cudaCpuDeviceId depending on whether the last location + for prefetch was a GPU or the CPU respectively. If any page in the + memory range was never explicitly prefetched or if all pages were not + prefetched to the same location, cudaInvalidDeviceId will be + returned. Note that this simply returns the last location that the + applicaton requested to prefetch the memory range to. It gives no + indication as to whether the prefetch operation to that location has + completed or even begun. + + - :py:obj:`~.cudaMemRangeAttributePreferredLocationType`: If this + attribute is specified, `data` will be interpreted as a + :py:obj:`~.cudaMemLocationType`, and `dataSize` must be + sizeof(cudaMemLocationType). The :py:obj:`~.cudaMemLocationType` + returned will be :py:obj:`~.cudaMemLocationTypeDevice` if all pages + in the memory range have the same GPU as their preferred location, or + :py:obj:`~.cudaMemLocationType` will be + :py:obj:`~.cudaMemLocationTypeHost` if all pages in the memory range + have the CPU as their preferred location, or or it will be + :py:obj:`~.cudaMemLocationTypeHostNuma` if all the pages in the + memory range have the same host NUMA node ID as their preferred + location or it will be :py:obj:`~.cudaMemLocationTypeInvalid` if + either all the pages don't have the same preferred location or some + of the pages don't have a preferred location at all. Note that the + actual location type of the pages in the memory range at the time of + the query may be different from the preferred location type. + + - :py:obj:`~.cudaMemRangeAttributePreferredLocationId`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. If the + :py:obj:`~.cudaMemRangeAttributePreferredLocationType` query for + the same address range returns + :py:obj:`~.cudaMemLocationTypeDevice`, it will be a valid device + ordinal or if it returns :py:obj:`~.cudaMemLocationTypeHostNuma`, + it will be a valid host NUMA node ID or if it returns any other + location type, the id should be ignored. + + - :py:obj:`~.cudaMemRangeAttributeLastPrefetchLocationType`: If this + attribute is specified, `data` will be interpreted as a + :py:obj:`~.cudaMemLocationType`, and `dataSize` must be + sizeof(cudaMemLocationType). The result returned will be the last + location type to which all pages in the memory range were prefetched + explicitly via :py:obj:`~.cuMemPrefetchAsync`. The + :py:obj:`~.cudaMemLocationType` returned will be + :py:obj:`~.cudaMemLocationTypeDevice` if the last prefetch location + was the GPU or :py:obj:`~.cudaMemLocationTypeHost` if it was the CPU + or :py:obj:`~.cudaMemLocationTypeHostNuma` if the last prefetch + location was a specific host NUMA node. If any page in the memory + range was never explicitly prefetched or if all pages were not + prefetched to the same location, :py:obj:`~.CUmemLocationType` will + be :py:obj:`~.cudaMemLocationTypeInvalid`. Note that this simply + returns the last location type that the application requested to + prefetch the memory range to. It gives no indication as to whether + the prefetch operation to that location has completed or even begun. + + - :py:obj:`~.cudaMemRangeAttributeLastPrefetchLocationId`: If this + attribute is specified, `data` will be interpreted as a 32-bit + integer, and `dataSize` must be 4. If the + :py:obj:`~.cudaMemRangeAttributeLastPrefetchLocationType` query for + the same address range returns + :py:obj:`~.cudaMemLocationTypeDevice`, it will be a valid device + ordinal or if it returns :py:obj:`~.cudaMemLocationTypeHostNuma`, + it will be a valid host NUMA node ID or if it returns any other + location type, the id should be ignored. + + Parameters + ---------- + dataSize : size_t + Array containing the size of data + attribute : :py:obj:`~.cudaMemRangeAttribute` + The attribute to query + devPtr : Any + Start of the range to query + count : size_t + Size of the range to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + data : Any + A pointers to a memory location where the result of each attribute + query will be written to. + + See Also + -------- + :py:obj:`~.cudaMemRangeGetAttributes`, :py:obj:`~.cudaMemPrefetchAsync`, :py:obj:`~.cudaMemAdvise`, :py:obj:`~.cuMemRangeGetAttribute` + """ + cdef _HelperCUmem_range_attribute cydata = _HelperCUmem_range_attribute(attribute, dataSize) + cdef void* cydata_ptr = cydata.cptr + cdef cyruntime.cudaMemRangeAttribute cyattribute = attribute.value + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr_ptr, count) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cydata.pyObj()) + +@cython.embedsignature(True) +def cudaMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Optional[tuple[cudaMemRangeAttribute] | list[cudaMemRangeAttribute]], size_t numAttributes, devPtr, size_t count): + """ Query attributes of a given memory range. + + Query attributes of the memory range starting at `devPtr` with a size + of `count` bytes. The memory range must refer to managed memory + allocated via :py:obj:`~.cudaMallocManaged` or declared via managed + variables. The `attributes` array will be interpreted to have + `numAttributes` entries. The `dataSizes` array will also be interpreted + to have `numAttributes` entries. The results of the query will be + stored in `data`. + + The list of supported attributes are given below. Please refer to + :py:obj:`~.cudaMemRangeGetAttribute` for attribute descriptions and + restrictions. + + - :py:obj:`~.cudaMemRangeAttributeReadMostly` + + - :py:obj:`~.cudaMemRangeAttributePreferredLocation` + + - :py:obj:`~.cudaMemRangeAttributeAccessedBy` + + - :py:obj:`~.cudaMemRangeAttributeLastPrefetchLocation` + + - :: cudaMemRangeAttributePreferredLocationType + + - :: cudaMemRangeAttributePreferredLocationId + + - :: cudaMemRangeAttributeLastPrefetchLocationType + + - :: cudaMemRangeAttributeLastPrefetchLocationId + + Parameters + ---------- + dataSizes : list[int] + Array containing the sizes of each result + attributes : list[:py:obj:`~.cudaMemRangeAttribute`] + An array of attributes to query (numAttributes and the number of + attributes in this array should match) + numAttributes : size_t + Number of attributes to query + devPtr : Any + Start of the range to query + count : size_t + Size of the range to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + data : list[Any] + A two-dimensional array containing pointers to memory locations + where the result of each attribute query will be written to. + + See Also + -------- + :py:obj:`~.cudaMemRangeGetAttribute`, :py:obj:`~.cudaMemAdvise`, :py:obj:`~.cudaMemPrefetchAsync`, :py:obj:`~.cuMemRangeGetAttributes` + """ + attributes = [] if attributes is None else attributes + if not all(isinstance(_x, (cudaMemRangeAttribute)) for _x in attributes): + raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cyruntime.cudaMemRangeAttribute] or list[cyruntime.cudaMemRangeAttribute]") + if not all(isinstance(_x, (int)) for _x in dataSizes): + raise TypeError("Argument 'dataSizes' is not instance of type (expected tuple[int] or list[int]") + pylist = [_HelperCUmem_range_attribute(pyattributes, pydataSizes) for (pyattributes, pydataSizes) in zip(attributes, dataSizes)] + cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) + cdef void** cyvoidStarHelper_ptr = voidStarHelperdata.cptr + cdef vector[size_t] cydataSizes = dataSizes + cdef vector[cyruntime.cudaMemRangeAttribute] cyattributes = [pyattributes.value for pyattributes in (attributes)] + if numAttributes > len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes)) + if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr_ptr, count) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], [obj.pyObj() for obj in pylist]) + +@cython.embedsignature(True) +def cudaMemcpyToArray(dst, size_t wOffset, size_t hOffset, src, size_t count, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + [Deprecated] + + Copies `count` bytes from the memory area pointed to by `src` to the + CUDA array `dst` starting at `hOffset` rows and `wOffset` bytes from + the upper left corner, where `kind` specifies the direction of the + copy, and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffset : size_t + Destination starting X offset (columns in bytes) + hOffset : size_t + Destination starting Y offset (rows) + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpyFromArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpyArrayToArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpyToArrayAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpyFromArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyDtoA` + """ + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyToArray(cydst, wOffset, hOffset, cysrc_ptr, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyFromArray(dst, src, size_t wOffset, size_t hOffset, size_t count, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + [Deprecated] + + Copies `count` bytes from the CUDA array `src` starting at `hOffset` + rows and `wOffset` bytes from the upper left corner to the memory area + pointed to by `dst`, where `kind` specifies the direction of the copy, + and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + Parameters + ---------- + dst : Any + Destination memory address + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffset : size_t + Source starting X offset (columns in bytes) + hOffset : size_t + Source starting Y offset (rows) + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpyToArray`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpyArrayToArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpyToArrayAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpyFromArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoD` + """ + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyFromArray(cydst_ptr, cysrc, wOffset, hOffset, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, kind not None : cudaMemcpyKind): + """ Copies data between host and device. + + [Deprecated] + + Copies `count` bytes from the CUDA array `src` starting at `hOffsetSrc` + rows and `wOffsetSrc` bytes from the upper left corner to the CUDA + array `dst` starting at `hOffsetDst` rows and `wOffsetDst` bytes from + the upper left corner, where `kind` specifies the direction of the + copy, and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffsetDst : size_t + Destination starting X offset (columns in bytes) + hOffsetDst : size_t + Destination starting Y offset (rows) + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffsetSrc : size_t + Source starting X offset (columns in bytes) + hOffsetSrc : size_t + Source starting Y offset (rows) + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpyToArray`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpyFromArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpyToArrayAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpyFromArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyAtoA` + """ + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t count, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + [Deprecated] + + Copies `count` bytes from the memory area pointed to by `src` to the + CUDA array `dst` starting at `hOffset` rows and `wOffset` bytes from + the upper left corner, where `kind` specifies the direction of the + copy, and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + :py:obj:`~.cudaMemcpyToArrayAsync()` is asynchronous with respect to + the host, so the call may return before the copy is complete. The copy + can optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + Parameters + ---------- + dst : :py:obj:`~.cudaArray_t` + Destination memory address + wOffset : size_t + Destination starting X offset (columns in bytes) + hOffset : size_t + Destination starting Y offset (rows) + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpyToArray`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpyFromArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpyArrayToArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpyFromArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpy2DAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaArray_t cydst + if dst is None: + pdst = 0 + elif isinstance(dst, (cudaArray_t,)): + pdst = int(dst) + else: + pdst = int(cudaArray_t(dst)) + cydst = pdst + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, count, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemcpyFromArrayAsync(dst, src, size_t wOffset, size_t hOffset, size_t count, kind not None : cudaMemcpyKind, stream): + """ Copies data between host and device. + + [Deprecated] + + Copies `count` bytes from the CUDA array `src` starting at `hOffset` + rows and `wOffset` bytes from the upper left corner to the memory area + pointed to by `dst`, where `kind` specifies the direction of the copy, + and must be one of :py:obj:`~.cudaMemcpyHostToHost`, + :py:obj:`~.cudaMemcpyHostToDevice`, :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. + + :py:obj:`~.cudaMemcpyFromArrayAsync()` is asynchronous with respect to + the host, so the call may return before the copy is complete. The copy + can optionally be associated to a stream by passing a non-zero `stream` + argument. If `kind` is :py:obj:`~.cudaMemcpyHostToDevice` or + :py:obj:`~.cudaMemcpyDeviceToHost` and `stream` is non-zero, the copy + may overlap with operations in other streams. + + Parameters + ---------- + dst : Any + Destination memory address + src : :py:obj:`~.cudaArray_const_t` + Source memory address + wOffset : size_t + Source starting X offset (columns in bytes) + hOffset : size_t + Source starting Y offset (rows) + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream identifier + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidMemcpyDirection` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpyToArray`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpyFromArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpyArrayToArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpyToArrayAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpy2DAsync` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaArray_const_t cysrc + if src is None: + psrc = 0 + elif isinstance(src, (cudaArray_const_t,)): + psrc = int(src) + else: + psrc = int(cudaArray_const_t(src)) + cysrc = psrc + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaMemcpyFromArrayAsync(cydst_ptr, cysrc, wOffset, hOffset, count, cykind, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMallocAsync(size_t size, hStream): + """ Allocates memory with stream ordered semantics. + + Inserts an allocation operation into `hStream`. A pointer to the + allocated memory is returned immediately in *dptr. The allocation must + not be accessed until the the allocation operation completes. The + allocation comes from the memory pool associated with the stream's + device. + + Parameters + ---------- + size : size_t + Number of bytes to allocate + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering contract and the memory + pool to allocate from + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorOutOfMemory`, + devPtr : Any + Returned device pointer + + See Also + -------- + :py:obj:`~.cuMemAllocAsync`, cudaMallocAsync (C++ API), :py:obj:`~.cudaMallocFromPoolAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceSetMemPool`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaMemPoolSetAccess`, :py:obj:`~.cudaMemPoolSetAttribute`, :py:obj:`~.cudaMemPoolGetAttribute` + + Notes + ----- + The default memory pool of a device contains device memory from that device. + + Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs. + + During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters. + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef void_ptr devPtr = 0 + with nogil: + err = cyruntime.cudaMallocAsync(&devPtr, size, cyhStream) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], devPtr) + +@cython.embedsignature(True) +def cudaFreeAsync(devPtr, hStream): + """ Frees memory with stream ordered semantics. + + Inserts a free operation into `hStream`. The allocation must not be + accessed after stream execution reaches the free. After this API + returns, accessing the memory from any subsequent work launched on the + GPU or querying its pointer attributes results in undefined behavior. + + Parameters + ---------- + dptr : Any + memory to free + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering promise + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cuMemFreeAsync`, :py:obj:`~.cudaMallocAsync` + + Notes + ----- + During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation. + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + phStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cydevPtr = _HelperInputVoidPtr(devPtr) + cdef void* cydevPtr_ptr = cydevPtr.cptr + with nogil: + err = cyruntime.cudaFreeAsync(cydevPtr_ptr, cyhStream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPoolTrimTo(memPool, size_t minBytesToKeep): + """ Tries to release memory back to the OS. + + Releases memory back to the OS until the pool contains fewer than + minBytesToKeep reserved bytes, or there is no more memory that the + allocator can safely release. The allocator cannot release OS + allocations that back outstanding asynchronous allocations. The OS + allocations may happen at different granularity from the user + allocations. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to trim + minBytesToKeep : size_t + If the pool has less than minBytesToKeep reserved, the TrimTo + operation is a no-op. Otherwise the pool will be guaranteed to have + at least minBytesToKeep bytes reserved after the operation. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cuMemPoolTrimTo`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaMemPoolCreate` + + Notes + ----- + : Allocations that have not been freed count as outstanding. + + : Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding. + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + with nogil: + err = cyruntime.cudaMemPoolTrimTo(cymemPool, minBytesToKeep) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPoolSetAttribute(memPool, attr not None : cudaMemPoolAttr, value): + """ Sets attributes of a memory pool. + + Supported attributes are: + + - :py:obj:`~.cudaMemPoolAttrReleaseThreshold`: (value type = + cuuint64_t) Amount of reserved memory in bytes to hold onto before + trying to release memory back to the OS. When more than the release + threshold bytes of memory are held by the memory pool, the allocator + will try to release memory back to the OS on the next call to stream, + event or context synchronize. (default 0) + + - :py:obj:`~.cudaMemPoolReuseFollowEventDependencies`: (value type = + int) Allow :py:obj:`~.cudaMallocAsync` to use memory asynchronously + freed in another stream as long as a stream ordering dependency of + the allocating stream on the free action exists. Cuda events and null + stream interactions can create the required stream ordered + dependencies. (default enabled) + + - :py:obj:`~.cudaMemPoolReuseAllowOpportunistic`: (value type = int) + Allow reuse of already completed frees when there is no dependency + between the free and allocation. (default enabled) + + - :py:obj:`~.cudaMemPoolReuseAllowInternalDependencies`: (value type = + int) Allow :py:obj:`~.cudaMallocAsync` to insert new stream + dependencies in order to establish the stream ordering required to + reuse a piece of memory released by :py:obj:`~.cudaFreeAsync` + (default enabled). + + - :py:obj:`~.cudaMemPoolAttrReservedMemHigh`: (value type = cuuint64_t) + Reset the high watermark that tracks the amount of backing memory + that was allocated for the memory pool. It is illegal to set this + attribute to a non-zero value. + + - :py:obj:`~.cudaMemPoolAttrUsedMemHigh`: (value type = cuuint64_t) + Reset the high watermark that tracks the amount of used memory that + was allocated for the memory pool. It is illegal to set this + attribute to a non-zero value. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to modify + attr : :py:obj:`~.cudaMemPoolAttr` + The attribute to modify + value : Any + Pointer to the value to assign + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cuMemPoolSetAttribute`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaMemPoolCreate` + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef cyruntime.cudaMemPoolAttr cyattr = attr.value + cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cyruntime.cudaMemPoolSetAttribute(cymemPool, cyattr, cyvalue_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPoolGetAttribute(memPool, attr not None : cudaMemPoolAttr): + """ Gets attributes of a memory pool. + + Supported attributes are: + + - :py:obj:`~.cudaMemPoolAttrReleaseThreshold`: (value type = + cuuint64_t) Amount of reserved memory in bytes to hold onto before + trying to release memory back to the OS. When more than the release + threshold bytes of memory are held by the memory pool, the allocator + will try to release memory back to the OS on the next call to stream, + event or context synchronize. (default 0) + + - :py:obj:`~.cudaMemPoolReuseFollowEventDependencies`: (value type = + int) Allow :py:obj:`~.cudaMallocAsync` to use memory asynchronously + freed in another stream as long as a stream ordering dependency of + the allocating stream on the free action exists. Cuda events and null + stream interactions can create the required stream ordered + dependencies. (default enabled) + + - :py:obj:`~.cudaMemPoolReuseAllowOpportunistic`: (value type = int) + Allow reuse of already completed frees when there is no dependency + between the free and allocation. (default enabled) + + - :py:obj:`~.cudaMemPoolReuseAllowInternalDependencies`: (value type = + int) Allow :py:obj:`~.cudaMallocAsync` to insert new stream + dependencies in order to establish the stream ordering required to + reuse a piece of memory released by :py:obj:`~.cudaFreeAsync` + (default enabled). + + - :py:obj:`~.cudaMemPoolAttrReservedMemCurrent`: (value type = + cuuint64_t) Amount of backing memory currently allocated for the + mempool. + + - :py:obj:`~.cudaMemPoolAttrReservedMemHigh`: (value type = cuuint64_t) + High watermark of backing memory allocated for the mempool since the + last time it was reset. + + - :py:obj:`~.cudaMemPoolAttrUsedMemCurrent`: (value type = cuuint64_t) + Amount of memory from the pool that is currently in use by the + application. + + - :py:obj:`~.cudaMemPoolAttrUsedMemHigh`: (value type = cuuint64_t) + High watermark of the amount of memory from the pool that was in use + by the application since the last time it was reset. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The memory pool to get attributes of + attr : :py:obj:`~.cudaMemPoolAttr` + The attribute to get + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + value : Any + Retrieved value + + See Also + -------- + :py:obj:`~.cuMemPoolGetAttribute`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaMemPoolCreate` + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef cyruntime.cudaMemPoolAttr cyattr = attr.value + cdef _HelperCUmemPool_attribute cyvalue = _HelperCUmemPool_attribute(attr, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cyruntime.cudaMemPoolGetAttribute(cymemPool, cyattr, cyvalue_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cudaMemPoolSetAccess(memPool, descList : Optional[tuple[cudaMemAccessDesc] | list[cudaMemAccessDesc]], size_t count): + """ Controls visibility of pools between devices. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The pool being modified + map : list[:py:obj:`~.cudaMemAccessDesc`] + Array of access descriptors. Each descriptor instructs the access + to enable for a single gpu + count : size_t + Number of descriptors in the map array. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cuMemPoolSetAccess`, :py:obj:`~.cudaMemPoolGetAccess`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` + """ + descList = [] if descList is None else descList + if not all(isinstance(_x, (cudaMemAccessDesc,)) for _x in descList): + raise TypeError("Argument 'descList' is not instance of type (expected tuple[cyruntime.cudaMemAccessDesc,] or list[cyruntime.cudaMemAccessDesc,]") + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef cyruntime.cudaMemAccessDesc* cydescList = NULL + if len(descList) > 1: + cydescList = calloc(len(descList), sizeof(cyruntime.cudaMemAccessDesc)) + if cydescList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(descList)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) + for idx in range(len(descList)): + string.memcpy(&cydescList[idx], (descList[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) + elif len(descList) == 1: + cydescList = (descList[0])._pvt_ptr + if count > len(descList): raise RuntimeError("List is too small: " + str(len(descList)) + " < " + str(count)) + with nogil: + err = cyruntime.cudaMemPoolSetAccess(cymemPool, cydescList, count) + if len(descList) > 1 and cydescList is not NULL: + free(cydescList) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMemPoolGetAccess(memPool, location : Optional[cudaMemLocation]): + """ Returns the accessibility of a pool from a device. + + Returns the accessibility of the pool's memory from the specified + location. + + Parameters + ---------- + memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + the pool being queried + location : :py:obj:`~.cudaMemLocation` + the location accessing the pool + + Returns + ------- + cudaError_t + + flags : :py:obj:`~.cudaMemAccessFlags` + the accessibility of the pool from the specified location + + See Also + -------- + :py:obj:`~.cuMemPoolGetAccess`, :py:obj:`~.cudaMemPoolSetAccess` + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef cyruntime.cudaMemAccessFlags flags + cdef cyruntime.cudaMemLocation* cylocation_ptr = location._pvt_ptr if location is not None else NULL + with nogil: + err = cyruntime.cudaMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaMemAccessFlags(flags)) + +@cython.embedsignature(True) +def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): + """ Creates a memory pool. + + Creates a CUDA memory pool and returns the handle in `pool`. The + `poolProps` determines the properties of the pool such as the backing + device and IPC capabilities. + + To create a memory pool targeting a specific host NUMA node, + applications must set + :py:obj:`~.cudaMemPoolProps`::cudaMemLocation::type to + :py:obj:`~.cudaMemLocationTypeHostNuma` and + :py:obj:`~.cudaMemPoolProps`::cudaMemLocation::id must specify the NUMA + ID of the host memory node. Specifying + :py:obj:`~.cudaMemLocationTypeHostNumaCurrent` or + :py:obj:`~.cudaMemLocationTypeHost` as the + :py:obj:`~.cudaMemPoolProps`::cudaMemLocation::type will result in + :py:obj:`~.cudaErrorInvalidValue`. By default, the pool's memory will + be accessible from the device it is allocated on. In the case of pools + created with :py:obj:`~.cudaMemLocationTypeHostNuma`, their default + accessibility will be from the host CPU. Applications can control the + maximum size of the pool by specifying a non-zero value for + :py:obj:`~.cudaMemPoolProps.maxSize`. If set to 0, the maximum size of + the pool will default to a system dependent value. + + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` + + Parameters + ---------- + poolProps : :py:obj:`~.cudaMemPoolProps` + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + memPool : :py:obj:`~.cudaMemPool_t` + None + + See Also + -------- + :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cudaDeviceSetMemPool`, :py:obj:`~.cudaMallocFromPoolAsync`, :py:obj:`~.cudaMemPoolExportToShareableHandle`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool` + + Notes + ----- + Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC. + """ + cdef cudaMemPool_t memPool = cudaMemPool_t() + cdef cyruntime.cudaMemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps is not None else NULL + with nogil: + err = cyruntime.cudaMemPoolCreate(memPool._pvt_ptr, cypoolProps_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memPool) + +@cython.embedsignature(True) +def cudaMemPoolDestroy(memPool): + """ Destroys the specified memory pool. + + If any pointers obtained from this pool haven't been freed or the pool + has free operations that haven't completed when + :py:obj:`~.cudaMemPoolDestroy` is invoked, the function will return + immediately and the resources associated with the pool will be released + automatically once there are no more outstanding allocations. + + Destroying the current mempool of a device sets the default mempool of + that device as the current mempool for that device. + + Parameters + ---------- + memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + None + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + cuMemPoolDestroy, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceSetMemPool`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaDeviceGetMemPool`, :py:obj:`~.cudaMemPoolCreate` + + Notes + ----- + A device's default memory pool cannot be destroyed. + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + with nogil: + err = cyruntime.cudaMemPoolDestroy(cymemPool) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaMallocFromPoolAsync(size_t size, memPool, stream): + """ Allocates memory from a specified pool with stream ordered semantics. + + Inserts an allocation operation into `hStream`. A pointer to the + allocated memory is returned immediately in *dptr. The allocation must + not be accessed until the the allocation operation completes. The + allocation comes from the specified memory pool. + + Parameters + ---------- + bytesize : size_t + Number of bytes to allocate + memPool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + The pool to allocate from + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream establishing the stream ordering semantic + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorOutOfMemory` + ptr : Any + Returned device pointer + + See Also + -------- + :py:obj:`~.cuMemAllocFromPoolAsync`, cudaMallocAsync (C++ API), :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaDeviceGetDefaultMemPool`, :py:obj:`~.cudaMemPoolCreate`, :py:obj:`~.cudaMemPoolSetAccess`, :py:obj:`~.cudaMemPoolSetAttribute` + + Notes + ----- + During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef void_ptr ptr = 0 + with nogil: + err = cyruntime.cudaMallocFromPoolAsync(&ptr, size, cymemPool, cystream) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ptr) + +@cython.embedsignature(True) +def cudaMemPoolExportToShareableHandle(memPool, handleType not None : cudaMemAllocationHandleType, unsigned int flags): + """ Exports a memory pool to the requested handle type. + + Given an IPC capable mempool, create an OS handle to share the pool + with another process. A recipient process can convert the shareable + handle into a mempool with + :py:obj:`~.cudaMemPoolImportFromShareableHandle`. Individual pointers + can then be shared with the :py:obj:`~.cudaMemPoolExportPointer` and + :py:obj:`~.cudaMemPoolImportPointer` APIs. The implementation of what + the shareable handle is and how it can be transferred is defined by the + requested handle type. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + pool to export + handleType : :py:obj:`~.cudaMemAllocationHandleType` + the type of handle to create + flags : unsigned int + must be 0 + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOutOfMemory` + handle_out : Any + pointer to the location in which to store the requested handle + + See Also + -------- + :py:obj:`~.cuMemPoolExportToShareableHandle`, :py:obj:`~.cudaMemPoolImportFromShareableHandle`, :py:obj:`~.cudaMemPoolExportPointer`, :py:obj:`~.cudaMemPoolImportPointer` + + Notes + ----- + : To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone. + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef _HelperCUmemAllocationHandleType cyshareableHandle = _HelperCUmemAllocationHandleType(handleType) + cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr + cdef cyruntime.cudaMemAllocationHandleType cyhandleType = handleType.value + with nogil: + err = cyruntime.cudaMemPoolExportToShareableHandle(cyshareableHandle_ptr, cymemPool, cyhandleType, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cyshareableHandle.pyObj()) + +@cython.embedsignature(True) +def cudaMemPoolImportFromShareableHandle(shareableHandle, handleType not None : cudaMemAllocationHandleType, unsigned int flags): + """ imports a memory pool from a shared handle. + + Specific allocations can be imported from the imported pool with + :py:obj:`~.cudaMemPoolImportPointer`. + + Parameters + ---------- + handle : Any + OS handle of the pool to open + handleType : :py:obj:`~.cudaMemAllocationHandleType` + The type of handle being imported + flags : unsigned int + must be 0 + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOutOfMemory` + pool_out : :py:obj:`~.cudaMemPool_t` + Returned memory pool + + See Also + -------- + :py:obj:`~.cuMemPoolImportFromShareableHandle`, :py:obj:`~.cudaMemPoolExportToShareableHandle`, :py:obj:`~.cudaMemPoolExportPointer`, :py:obj:`~.cudaMemPoolImportPointer` + + Notes + ----- + Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in :py:obj:`~.cudaDeviceSetMemPool` or :py:obj:`~.cudaMallocFromPoolAsync` calls. + """ + cdef cudaMemPool_t memPool = cudaMemPool_t() + cyshareableHandle = _HelperInputVoidPtr(shareableHandle) + cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr + cdef cyruntime.cudaMemAllocationHandleType cyhandleType = handleType.value + with nogil: + err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._pvt_ptr, cyshareableHandle_ptr, cyhandleType, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], memPool) + +@cython.embedsignature(True) +def cudaMemPoolExportPointer(ptr): + """ Export data to share a memory pool allocation between processes. + + Constructs `shareData_out` for sharing a specific allocation from an + already shared memory pool. The recipient process can import the + allocation with the :py:obj:`~.cudaMemPoolImportPointer` api. The data + is not a handle and may be shared through any IPC mechanism. + + Parameters + ---------- + ptr : Any + pointer to memory being exported + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOutOfMemory` + shareData_out : :py:obj:`~.cudaMemPoolPtrExportData` + Returned export data + + See Also + -------- + :py:obj:`~.cuMemPoolExportPointer`, :py:obj:`~.cudaMemPoolExportToShareableHandle`, :py:obj:`~.cudaMemPoolImportFromShareableHandle`, :py:obj:`~.cudaMemPoolImportPointer` + """ + cdef cudaMemPoolPtrExportData exportData = cudaMemPoolPtrExportData() + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaMemPoolExportPointer(exportData._pvt_ptr, cyptr_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], exportData) + +@cython.embedsignature(True) +def cudaMemPoolImportPointer(memPool, exportData : Optional[cudaMemPoolPtrExportData]): + """ Import a memory pool allocation from another process. + + Returns in `ptr_out` a pointer to the imported memory. The imported + memory must not be accessed before the allocation operation completes + in the exporting process. The imported memory must be freed from all + importing processes before being freed in the exporting process. The + pointer may be freed with cudaFree or cudaFreeAsync. If + :py:obj:`~.cudaFreeAsync` is used, the free must be completed on the + importing process before the free operation on the exporting process. + + Parameters + ---------- + pool : :py:obj:`~.CUmemoryPool` or :py:obj:`~.cudaMemPool_t` + pool from which to import + shareData : :py:obj:`~.cudaMemPoolPtrExportData` + data specifying the memory to import + + Returns + ------- + cudaError_t + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + ptr_out : Any + pointer to imported memory + + See Also + -------- + :py:obj:`~.cuMemPoolImportPointer`, :py:obj:`~.cudaMemPoolExportToShareableHandle`, :py:obj:`~.cudaMemPoolImportFromShareableHandle`, :py:obj:`~.cudaMemPoolExportPointer` + + Notes + ----- + The :py:obj:`~.cudaFreeAsync` api may be used in the exporting process before the :py:obj:`~.cudaFreeAsync` operation completes in its stream as long as the :py:obj:`~.cudaFreeAsync` in the exporting process specifies a stream with a stream dependency on the importing process's :py:obj:`~.cudaFreeAsync`. + """ + cdef cyruntime.cudaMemPool_t cymemPool + if memPool is None: + pmemPool = 0 + elif isinstance(memPool, (cudaMemPool_t,driver.CUmemoryPool)): + pmemPool = int(memPool) + else: + pmemPool = int(cudaMemPool_t(memPool)) + cymemPool = pmemPool + cdef void_ptr ptr = 0 + cdef cyruntime.cudaMemPoolPtrExportData* cyexportData_ptr = exportData._pvt_ptr if exportData is not None else NULL + with nogil: + err = cyruntime.cudaMemPoolImportPointer(&ptr, cymemPool, cyexportData_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ptr) + +@cython.embedsignature(True) +def cudaPointerGetAttributes(ptr): + """ Returns attributes about a specified pointer. + + Returns in `*attributes` the attributes of the pointer `ptr`. If + pointer was not allocated in, mapped by or registered with context + supporting unified addressing :py:obj:`~.cudaErrorInvalidValue` is + returned. + + The :py:obj:`~.cudaPointerAttributes` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + In this structure, the individual fields mean + + - :py:obj:`~.cudaPointerAttributes.type` identifies type of memory. It + can be :py:obj:`~.cudaMemoryTypeUnregistered` for unregistered host + memory, :py:obj:`~.cudaMemoryTypeHost` for registered host memory, + :py:obj:`~.cudaMemoryTypeDevice` for device memory or + :py:obj:`~.cudaMemoryTypeManaged` for managed memory. + + - :py:obj:`~.device` is the device against which `ptr` was allocated. + If `ptr` has memory type :py:obj:`~.cudaMemoryTypeDevice` then this + identifies the device on which the memory referred to by `ptr` + physically resides. If `ptr` has memory type + :py:obj:`~.cudaMemoryTypeHost` then this identifies the device which + was current when the allocation was made (and if that device is + deinitialized then this allocation will vanish with that device's + state). + + - :py:obj:`~.devicePointer` is the device pointer alias through which + the memory referred to by `ptr` may be accessed on the current + device. If the memory referred to by `ptr` cannot be accessed + directly by the current device then this is NULL. + + - :py:obj:`~.hostPointer` is the host pointer alias through which the + memory referred to by `ptr` may be accessed on the host. If the + memory referred to by `ptr` cannot be accessed directly by the host + then this is NULL. + + Parameters + ---------- + ptr : Any + Pointer to get attributes for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue` + attributes : :py:obj:`~.cudaPointerAttributes` + Attributes for the specified pointer + + See Also + -------- + :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuPointerGetAttributes` + + Notes + ----- + In CUDA 11.0 forward passing host pointer will return :py:obj:`~.cudaMemoryTypeUnregistered` in :py:obj:`~.cudaPointerAttributes.type` and call will return :py:obj:`~.cudaSuccess`. + """ + cdef cudaPointerAttributes attributes = cudaPointerAttributes() + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaPointerGetAttributes(attributes._pvt_ptr, cyptr_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], attributes) + +@cython.embedsignature(True) +def cudaDeviceCanAccessPeer(int device, int peerDevice): + """ Queries if a device may directly access a peer device's memory. + + Returns in `*canAccessPeer` a value of 1 if device `device` is capable + of directly accessing memory from `peerDevice` and 0 otherwise. If + direct access of `peerDevice` from `device` is possible, then access + may be enabled by calling :py:obj:`~.cudaDeviceEnablePeerAccess()`. + + Parameters + ---------- + device : int + Device from which allocations on `peerDevice` are to be directly + accessed. + peerDevice : int + Device on which the allocations to be directly accessed by `device` + reside. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice` + canAccessPeer : int + Returned access capability + + See Also + -------- + :py:obj:`~.cudaDeviceEnablePeerAccess`, :py:obj:`~.cudaDeviceDisablePeerAccess`, :py:obj:`~.cuDeviceCanAccessPeer` + """ + cdef int canAccessPeer = 0 + with nogil: + err = cyruntime.cudaDeviceCanAccessPeer(&canAccessPeer, device, peerDevice) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], canAccessPeer) + +@cython.embedsignature(True) +def cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags): + """ Enables direct access to memory allocations on a peer device. + + On success, all allocations from `peerDevice` will immediately be + accessible by the current device. They will remain accessible until + access is explicitly disabled using + :py:obj:`~.cudaDeviceDisablePeerAccess()` or either device is reset + using :py:obj:`~.cudaDeviceReset()`. + + Note that access granted by this call is unidirectional and that in + order to access memory on the current device from `peerDevice`, a + separate symmetric call to :py:obj:`~.cudaDeviceEnablePeerAccess()` is + required. + + Note that there are both device-wide and system-wide limitations per + system configuration, as noted in the CUDA Programming Guide under the + section "Peer-to-Peer Memory Access". + + Returns :py:obj:`~.cudaErrorInvalidDevice` if + :py:obj:`~.cudaDeviceCanAccessPeer()` indicates that the current device + cannot directly access memory from `peerDevice`. + + Returns :py:obj:`~.cudaErrorPeerAccessAlreadyEnabled` if direct access + of `peerDevice` from the current device has already been enabled. + + Returns :py:obj:`~.cudaErrorInvalidValue` if `flags` is not 0. + + Parameters + ---------- + peerDevice : int + Peer device to enable direct access to from the current device + flags : unsigned int + Reserved for future use and must be set to 0 + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorPeerAccessAlreadyEnabled`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaDeviceCanAccessPeer`, :py:obj:`~.cudaDeviceDisablePeerAccess`, :py:obj:`~.cuCtxEnablePeerAccess` + """ + with nogil: + err = cyruntime.cudaDeviceEnablePeerAccess(peerDevice, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceDisablePeerAccess(int peerDevice): + """ Disables direct access to memory allocations on a peer device. + + Returns :py:obj:`~.cudaErrorPeerAccessNotEnabled` if direct access to + memory on `peerDevice` has not yet been enabled from the current + device. + + Parameters + ---------- + peerDevice : int + Peer device to disable direct access to + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorPeerAccessNotEnabled`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaDeviceCanAccessPeer`, :py:obj:`~.cudaDeviceEnablePeerAccess`, :py:obj:`~.cuCtxDisablePeerAccess` + """ + with nogil: + err = cyruntime.cudaDeviceDisablePeerAccess(peerDevice) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsUnregisterResource(resource): + """ Unregisters a graphics resource for access by CUDA. + + Unregisters the graphics resource `resource` so it is not accessible by + CUDA unless registered again. + + If `resource` is invalid then + :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + Resource to unregister + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaGraphicsD3D9RegisterResource`, :py:obj:`~.cudaGraphicsD3D10RegisterResource`, :py:obj:`~.cudaGraphicsD3D11RegisterResource`, :py:obj:`~.cudaGraphicsGLRegisterBuffer`, :py:obj:`~.cudaGraphicsGLRegisterImage`, :py:obj:`~.cuGraphicsUnregisterResource` + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + with nogil: + err = cyruntime.cudaGraphicsUnregisterResource(cyresource) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsResourceSetMapFlags(resource, unsigned int flags): + """ Set usage flags for mapping a graphics resource. + + Set `flags` for mapping the graphics resource `resource`. + + Changes to `flags` will take effect the next time `resource` is mapped. + The `flags` argument may be any of the following: + + - :py:obj:`~.cudaGraphicsMapFlagsNone`: Specifies no hints about how + `resource` will be used. It is therefore assumed that CUDA may read + from or write to `resource`. + + - :py:obj:`~.cudaGraphicsMapFlagsReadOnly`: Specifies that CUDA will + not write to `resource`. + + - :py:obj:`~.cudaGraphicsMapFlagsWriteDiscard`: Specifies CUDA will not + read from `resource` and will write over the entire contents of + `resource`, so none of the data previously stored in `resource` will + be preserved. + + If `resource` is presently mapped for access by CUDA then + :py:obj:`~.cudaErrorUnknown` is returned. If `flags` is not one of the + above values then :py:obj:`~.cudaErrorInvalidValue` is returned. + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + Registered resource to set flags for + flags : unsigned int + Parameters for resource mapping + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown`, + + See Also + -------- + :py:obj:`~.cudaGraphicsMapResources`, :py:obj:`~.cuGraphicsResourceSetMapFlags` + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + with nogil: + err = cyruntime.cudaGraphicsResourceSetMapFlags(cyresource, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsMapResources(int count, resources, stream): + """ Map graphics resources for access by CUDA. + + Maps the `count` graphics resources in `resources` for access by CUDA. + + The resources in `resources` may be accessed by CUDA until they are + unmapped. The graphics API from which `resources` were registered + should not access any resources while they are mapped by CUDA. If an + application does so, the results are undefined. + + This function provides the synchronization guarantee that any graphics + calls issued before :py:obj:`~.cudaGraphicsMapResources()` will + complete before any subsequent CUDA work issued in `stream` begins. + + If `resources` contains any duplicate entries then + :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. If any of + `resources` are presently mapped for access by CUDA then + :py:obj:`~.cudaErrorUnknown` is returned. + + Parameters + ---------- + count : int + Number of resources to map + resources : :py:obj:`~.cudaGraphicsResource_t` + Resources to map for CUDA + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream for synchronization + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaGraphicsResourceGetMappedPointer`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaGraphicsUnmapResources`, :py:obj:`~.cuGraphicsMapResources` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphicsResource_t *cyresources + if resources is None: + cyresources = NULL + elif isinstance(resources, (cudaGraphicsResource_t,)): + presources = resources.getPtr() + cyresources = presources + elif isinstance(resources, (int)): + cyresources = resources + else: + raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) + with nogil: + err = cyruntime.cudaGraphicsMapResources(count, cyresources, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsUnmapResources(int count, resources, stream): + """ Unmap graphics resources. + + Unmaps the `count` graphics resources in `resources`. + + Once unmapped, the resources in `resources` may not be accessed by CUDA + until they are mapped again. + + This function provides the synchronization guarantee that any CUDA work + issued in `stream` before :py:obj:`~.cudaGraphicsUnmapResources()` will + complete before any subsequently issued graphics work begins. + + If `resources` contains any duplicate entries then + :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. If any of + `resources` are not presently mapped for access by CUDA then + :py:obj:`~.cudaErrorUnknown` is returned. + + Parameters + ---------- + count : int + Number of resources to unmap + resources : :py:obj:`~.cudaGraphicsResource_t` + Resources to unmap + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream for synchronization + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaGraphicsMapResources`, :py:obj:`~.cuGraphicsUnmapResources` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphicsResource_t *cyresources + if resources is None: + cyresources = NULL + elif isinstance(resources, (cudaGraphicsResource_t,)): + presources = resources.getPtr() + cyresources = presources + elif isinstance(resources, (int)): + cyresources = resources + else: + raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) + with nogil: + err = cyruntime.cudaGraphicsUnmapResources(count, cyresources, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsResourceGetMappedPointer(resource): + """ Get an device pointer through which to access a mapped graphics resource. + + Returns in `*devPtr` a pointer through which the mapped graphics + resource `resource` may be accessed. Returns in `*size` the size of the + memory in bytes which may be accessed from that pointer. The value set + in `devPtr` may change every time that `resource` is mapped. + + If `resource` is not a buffer then it cannot be accessed via a pointer + and :py:obj:`~.cudaErrorUnknown` is returned. If `resource` is not + mapped then :py:obj:`~.cudaErrorUnknown` is returned. + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + None + + Returns + ------- + cudaError_t + + devPtr : Any + None + size : int + None + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + cdef void_ptr devPtr = 0 + cdef size_t size = 0 + with nogil: + err = cyruntime.cudaGraphicsResourceGetMappedPointer(&devPtr, &size, cyresource) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], devPtr, size) + +@cython.embedsignature(True) +def cudaGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel): + """ Get an array through which to access a subresource of a mapped graphics resource. + + Returns in `*array` an array through which the subresource of the + mapped graphics resource `resource` which corresponds to array index + `arrayIndex` and mipmap level `mipLevel` may be accessed. The value set + in `array` may change every time that `resource` is mapped. + + If `resource` is not a texture then it cannot be accessed via an array + and :py:obj:`~.cudaErrorUnknown` is returned. If `arrayIndex` is not a + valid array index for `resource` then :py:obj:`~.cudaErrorInvalidValue` + is returned. If `mipLevel` is not a valid mipmap level for `resource` + then :py:obj:`~.cudaErrorInvalidValue` is returned. If `resource` is + not mapped then :py:obj:`~.cudaErrorUnknown` is returned. + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + Mapped resource to access + arrayIndex : unsigned int + Array index for array textures or cubemap face index as defined by + :py:obj:`~.cudaGraphicsCubeFace` for cubemap textures for the + subresource to access + mipLevel : unsigned int + Mipmap level for the subresource to access + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + array : :py:obj:`~.cudaArray_t` + Returned array through which a subresource of `resource` may be + accessed + + See Also + -------- + :py:obj:`~.cudaGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsSubResourceGetMappedArray` + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + cdef cudaArray_t array = cudaArray_t() + with nogil: + err = cyruntime.cudaGraphicsSubResourceGetMappedArray(array._pvt_ptr, cyresource, arrayIndex, mipLevel) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], array) + +@cython.embedsignature(True) +def cudaGraphicsResourceGetMappedMipmappedArray(resource): + """ Get a mipmapped array through which to access a mapped graphics resource. + + Returns in `*mipmappedArray` a mipmapped array through which the mapped + graphics resource `resource` may be accessed. The value set in + `mipmappedArray` may change every time that `resource` is mapped. + + If `resource` is not a texture then it cannot be accessed via an array + and :py:obj:`~.cudaErrorUnknown` is returned. If `resource` is not + mapped then :py:obj:`~.cudaErrorUnknown` is returned. + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + Mapped resource to access + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + mipmappedArray : :py:obj:`~.cudaMipmappedArray_t` + Returned mipmapped array through which `resource` may be accessed + + See Also + -------- + :py:obj:`~.cudaGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsResourceGetMappedMipmappedArray` + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + cdef cudaMipmappedArray_t mipmappedArray = cudaMipmappedArray_t() + with nogil: + err = cyruntime.cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray._pvt_ptr, cyresource) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], mipmappedArray) + +@cython.embedsignature(True) +def cudaGetChannelDesc(array): + """ Get the channel descriptor of an array. + + Returns in `*desc` the channel descriptor of the CUDA array `array`. + + Parameters + ---------- + array : :py:obj:`~.cudaArray_const_t` + Memory array on device + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + desc : :py:obj:`~.cudaChannelFormatDesc` + Channel format + + See Also + -------- + :py:obj:`~.cudaCreateChannelDesc (C API)`, :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cudaCreateSurfaceObject` + """ + cdef cyruntime.cudaArray_const_t cyarray + if array is None: + parray = 0 + elif isinstance(array, (cudaArray_const_t,)): + parray = int(array) + else: + parray = int(cudaArray_const_t(array)) + cyarray = parray + cdef cudaChannelFormatDesc desc = cudaChannelFormatDesc() + with nogil: + err = cyruntime.cudaGetChannelDesc(desc._pvt_ptr, cyarray) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], desc) + +@cython.embedsignature(True) +def cudaCreateChannelDesc(int x, int y, int z, int w, f not None : cudaChannelFormatKind): + """ Returns a channel descriptor using the specified format. + + Returns a channel descriptor with format `f` and number of bits of each + component `x`, `y`, `z`, and `w`. The :py:obj:`~.cudaChannelFormatDesc` + is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where :py:obj:`~.cudaChannelFormatKind` is one of + :py:obj:`~.cudaChannelFormatKindSigned`, + :py:obj:`~.cudaChannelFormatKindUnsigned`, or + :py:obj:`~.cudaChannelFormatKindFloat`. + + Parameters + ---------- + x : int + X component + y : int + Y component + z : int + Z component + w : int + W component + f : :py:obj:`~.cudaChannelFormatKind` + Channel format + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + :py:obj:`~.cudaChannelFormatDesc` + Channel descriptor with format `f` + + See Also + -------- + cudaCreateChannelDesc (C++ API), :py:obj:`~.cudaGetChannelDesc`, :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cudaCreateSurfaceObject` + """ + cdef cyruntime.cudaChannelFormatKind cyf = f.value + with nogil: + err = cyruntime.cudaCreateChannelDesc(x, y, z, w, cyf) + cdef cudaChannelFormatDesc wrapper = cudaChannelFormatDesc() + wrapper._pvt_ptr[0] = err + return (cudaError_t.cudaSuccess, wrapper) + +@cython.embedsignature(True) +def cudaCreateTextureObject(pResDesc : Optional[cudaResourceDesc], pTexDesc : Optional[cudaTextureDesc], pResViewDesc : Optional[cudaResourceViewDesc]): + """ Creates a texture object. + + Creates a texture object and returns it in `pTexObject`. `pResDesc` + describes the data to texture from. `pTexDesc` describes how the data + should be sampled. `pResViewDesc` is an optional argument that + specifies an alternate format for the data described by `pResDesc`, and + also describes the subresource region to restrict access to when + texturing. `pResViewDesc` can only be specified if the type of resource + is a CUDA array or a CUDA mipmapped array not in a block compressed + format. + + Texture objects are only supported on devices of compute capability 3.0 + or higher. Additionally, a texture object is an opaque value, and, as + such, should only be accessed through CUDA API calls. + + The :py:obj:`~.cudaResourceDesc` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.cudaResourceDesc.resType` specifies the type of resource + to texture from. CUresourceType is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + If :py:obj:`~.cudaResourceDesc.resType` is set to + :py:obj:`~.cudaResourceTypeArray`, + :py:obj:`~.cudaResourceDesc`::res::array::array must be set to a valid + CUDA array handle. + + If :py:obj:`~.cudaResourceDesc.resType` is set to + :py:obj:`~.cudaResourceTypeMipmappedArray`, + :py:obj:`~.cudaResourceDesc`::res::mipmap::mipmap must be set to a + valid CUDA mipmapped array handle and + :py:obj:`~.cudaTextureDesc.normalizedCoords` must be set to true. + + If :py:obj:`~.cudaResourceDesc.resType` is set to + :py:obj:`~.cudaResourceTypeLinear`, + :py:obj:`~.cudaResourceDesc`::res::linear::devPtr must be set to a + valid device pointer, that is aligned to + :py:obj:`~.cudaDeviceProp.textureAlignment`. + :py:obj:`~.cudaResourceDesc`::res::linear::desc describes the format + and the number of components per array element. + :py:obj:`~.cudaResourceDesc`::res::linear::sizeInBytes specifies the + size of the array in bytes. The total number of elements in the linear + address range cannot exceed + :py:obj:`~.cudaDeviceProp.maxTexture1DLinear`. The number of elements + is computed as (sizeInBytes / sizeof(desc)). + + If :py:obj:`~.cudaResourceDesc.resType` is set to + :py:obj:`~.cudaResourceTypePitch2D`, + :py:obj:`~.cudaResourceDesc`::res::pitch2D::devPtr must be set to a + valid device pointer, that is aligned to + :py:obj:`~.cudaDeviceProp.textureAlignment`. + :py:obj:`~.cudaResourceDesc`::res::pitch2D::desc describes the format + and the number of components per array element. + :py:obj:`~.cudaResourceDesc`::res::pitch2D::width and + :py:obj:`~.cudaResourceDesc`::res::pitch2D::height specify the width + and height of the array in elements, and cannot exceed + :py:obj:`~.cudaDeviceProp.maxTexture2DLinear`[0] and + :py:obj:`~.cudaDeviceProp.maxTexture2DLinear`[1] respectively. + :py:obj:`~.cudaResourceDesc`::res::pitch2D::pitchInBytes specifies the + pitch between two rows in bytes and has to be aligned to + :py:obj:`~.cudaDeviceProp.texturePitchAlignment`. Pitch cannot exceed + :py:obj:`~.cudaDeviceProp.maxTexture2DLinear`[2]. + + The :py:obj:`~.cudaTextureDesc` struct is defined as + + **View CUDA Toolkit Documentation for a C++ code example** + + where + + - :py:obj:`~.cudaTextureDesc.addressMode` specifies the addressing mode + for each dimension of the texture data. + :py:obj:`~.cudaTextureAddressMode` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - This is ignored if :py:obj:`~.cudaResourceDesc.resType` is + :py:obj:`~.cudaResourceTypeLinear`. Also, if + :py:obj:`~.cudaTextureDesc.normalizedCoords` is set to zero, + :py:obj:`~.cudaAddressModeWrap` and :py:obj:`~.cudaAddressModeMirror` + won't be supported and will be switched to + :py:obj:`~.cudaAddressModeClamp`. + + - :py:obj:`~.cudaTextureDesc.filterMode` specifies the filtering mode + to be used when fetching from the texture. + :py:obj:`~.cudaTextureFilterMode` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - This is ignored if :py:obj:`~.cudaResourceDesc.resType` is + :py:obj:`~.cudaResourceTypeLinear`. + + - :py:obj:`~.cudaTextureDesc.readMode` specifies whether integer data + should be converted to floating point or not. + :py:obj:`~.cudaTextureReadMode` is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Note that this applies only to 8-bit and 16-bit integer formats. + 32-bit integer format would not be promoted, regardless of whether or + not this :py:obj:`~.cudaTextureDesc.readMode` is set + :py:obj:`~.cudaReadModeNormalizedFloat` is specified. + + - :py:obj:`~.cudaTextureDesc.sRGB` specifies whether sRGB to linear + conversion should be performed during texture fetch. + + - :py:obj:`~.cudaTextureDesc.borderColor` specifies the float values of + color. where: :py:obj:`~.cudaTextureDesc.borderColor`[0] contains + value of 'R', :py:obj:`~.cudaTextureDesc.borderColor`[1] contains + value of 'G', :py:obj:`~.cudaTextureDesc.borderColor`[2] contains + value of 'B', :py:obj:`~.cudaTextureDesc.borderColor`[3] contains + value of 'A' Note that application using integer border color values + will need to these values to float. The values are + set only when the addressing mode specified by + :py:obj:`~.cudaTextureDesc.addressMode` is cudaAddressModeBorder. + + - :py:obj:`~.cudaTextureDesc.normalizedCoords` specifies whether the + texture coordinates will be normalized or not. + + - :py:obj:`~.cudaTextureDesc.maxAnisotropy` specifies the maximum + anistropy ratio to be used when doing anisotropic filtering. This + value will be clamped to the range [1,16]. + + - :py:obj:`~.cudaTextureDesc.mipmapFilterMode` specifies the filter + mode when the calculated mipmap level lies between two defined mipmap + levels. + + - :py:obj:`~.cudaTextureDesc.mipmapLevelBias` specifies the offset to + be applied to the calculated mipmap level. + + - :py:obj:`~.cudaTextureDesc.minMipmapLevelClamp` specifies the lower + end of the mipmap level range to clamp access to. + + - :py:obj:`~.cudaTextureDesc.maxMipmapLevelClamp` specifies the upper + end of the mipmap level range to clamp access to. + + - :py:obj:`~.cudaTextureDesc.disableTrilinearOptimization` specifies + whether the trilinear filtering optimizations will be disabled. + + - :py:obj:`~.cudaTextureDesc.seamlessCubemap` specifies whether + seamless cube map filtering is enabled. This flag can only be + specified if the underlying resource is a CUDA array or a CUDA + mipmapped array that was created with the flag + :py:obj:`~.cudaArrayCubemap`. When seamless cube map filtering is + enabled, texture address modes specified by + :py:obj:`~.cudaTextureDesc.addressMode` are ignored. Instead, if the + :py:obj:`~.cudaTextureDesc.filterMode` is set to + :py:obj:`~.cudaFilterModePoint` the address mode + :py:obj:`~.cudaAddressModeClamp` will be applied for all dimensions. + If the :py:obj:`~.cudaTextureDesc.filterMode` is set to + :py:obj:`~.cudaFilterModeLinear` seamless cube map filtering will be + performed when sampling along the cube face borders. + + The :py:obj:`~.cudaResourceViewDesc` struct is defined as + + **View CUDA Toolkit Documentation for a C++ code example** + + where: + + - :py:obj:`~.cudaResourceViewDesc.format` specifies how the data + contained in the CUDA array or CUDA mipmapped array should be + interpreted. Note that this can incur a change in size of the texture + data. If the resource view format is a block compressed format, then + the underlying CUDA array or CUDA mipmapped array has to have a + 32-bit unsigned integer format with 2 or 4 channels, depending on the + block compressed format. For ex., BC1 and BC4 require the underlying + CUDA array to have a 32-bit unsigned int with 2 channels. The other + BC formats require the underlying resource to have the same 32-bit + unsigned int format but with 4 channels. + + - :py:obj:`~.cudaResourceViewDesc.width` specifies the new width of the + texture data. If the resource view format is a block compressed + format, this value has to be 4 times the original width of the + resource. For non block compressed formats, this value has to be + equal to that of the original resource. + + - :py:obj:`~.cudaResourceViewDesc.height` specifies the new height of + the texture data. If the resource view format is a block compressed + format, this value has to be 4 times the original height of the + resource. For non block compressed formats, this value has to be + equal to that of the original resource. + + - :py:obj:`~.cudaResourceViewDesc.depth` specifies the new depth of the + texture data. This value has to be equal to that of the original + resource. + + - :py:obj:`~.cudaResourceViewDesc.firstMipmapLevel` specifies the most + detailed mipmap level. This will be the new mipmap level zero. For + non-mipmapped resources, this value has to be + zero.:py:obj:`~.cudaTextureDesc.minMipmapLevelClamp` and + :py:obj:`~.cudaTextureDesc.maxMipmapLevelClamp` will be relative to + this value. For ex., if the firstMipmapLevel is set to 2, and a + minMipmapLevelClamp of 1.2 is specified, then the actual minimum + mipmap level clamp will be 3.2. + + - :py:obj:`~.cudaResourceViewDesc.lastMipmapLevel` specifies the least + detailed mipmap level. For non-mipmapped resources, this value has to + be zero. + + - :py:obj:`~.cudaResourceViewDesc.firstLayer` specifies the first layer + index for layered textures. This will be the new layer zero. For non- + layered resources, this value has to be zero. + + - :py:obj:`~.cudaResourceViewDesc.lastLayer` specifies the last layer + index for layered textures. For non-layered resources, this value has + to be zero. + + Parameters + ---------- + pResDesc : :py:obj:`~.cudaResourceDesc` + Resource descriptor + pTexDesc : :py:obj:`~.cudaTextureDesc` + Texture descriptor + pResViewDesc : :py:obj:`~.cudaResourceViewDesc` + Resource view descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pTexObject : :py:obj:`~.cudaTextureObject_t` + Texture object to create + + See Also + -------- + :py:obj:`~.cudaDestroyTextureObject`, :py:obj:`~.cuTexObjectCreate` + """ + cdef cudaTextureObject_t pTexObject = cudaTextureObject_t() + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + cdef cyruntime.cudaTextureDesc* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc is not None else NULL + cdef cyruntime.cudaResourceViewDesc* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc is not None else NULL + with nogil: + err = cyruntime.cudaCreateTextureObject(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pTexObject) + +@cython.embedsignature(True) +def cudaDestroyTextureObject(texObject): + """ Destroys a texture object. + + Destroys the texture object specified by `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.cudaTextureObject_t` + Texture object to destroy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cuTexObjectDestroy` + """ + cdef cyruntime.cudaTextureObject_t cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (cudaTextureObject_t,)): + ptexObject = int(texObject) + else: + ptexObject = int(cudaTextureObject_t(texObject)) + cytexObject = ptexObject + with nogil: + err = cyruntime.cudaDestroyTextureObject(cytexObject) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetTextureObjectResourceDesc(texObject): + """ Returns a texture object's resource descriptor. + + Returns the resource descriptor for the texture object specified by + `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.cudaTextureObject_t` + Texture object + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pResDesc : :py:obj:`~.cudaResourceDesc` + Resource descriptor + + See Also + -------- + :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cuTexObjectGetResourceDesc` + """ + cdef cyruntime.cudaTextureObject_t cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (cudaTextureObject_t,)): + ptexObject = int(texObject) + else: + ptexObject = int(cudaTextureObject_t(texObject)) + cytexObject = ptexObject + cdef cudaResourceDesc pResDesc = cudaResourceDesc() + with nogil: + err = cyruntime.cudaGetTextureObjectResourceDesc(pResDesc._pvt_ptr, cytexObject) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pResDesc) + +@cython.embedsignature(True) +def cudaGetTextureObjectTextureDesc(texObject): + """ Returns a texture object's texture descriptor. + + Returns the texture descriptor for the texture object specified by + `texObject`. + + Parameters + ---------- + texObject : :py:obj:`~.cudaTextureObject_t` + Texture object + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pTexDesc : :py:obj:`~.cudaTextureDesc` + Texture descriptor + + See Also + -------- + :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cuTexObjectGetTextureDesc` + """ + cdef cyruntime.cudaTextureObject_t cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (cudaTextureObject_t,)): + ptexObject = int(texObject) + else: + ptexObject = int(cudaTextureObject_t(texObject)) + cytexObject = ptexObject + cdef cudaTextureDesc pTexDesc = cudaTextureDesc() + with nogil: + err = cyruntime.cudaGetTextureObjectTextureDesc(pTexDesc._pvt_ptr, cytexObject) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pTexDesc) + +@cython.embedsignature(True) +def cudaGetTextureObjectResourceViewDesc(texObject): + """ Returns a texture object's resource view descriptor. + + Returns the resource view descriptor for the texture object specified + by `texObject`. If no resource view was specified, + :py:obj:`~.cudaErrorInvalidValue` is returned. + + Parameters + ---------- + texObject : :py:obj:`~.cudaTextureObject_t` + Texture object + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pResViewDesc : :py:obj:`~.cudaResourceViewDesc` + Resource view descriptor + + See Also + -------- + :py:obj:`~.cudaCreateTextureObject`, :py:obj:`~.cuTexObjectGetResourceViewDesc` + """ + cdef cyruntime.cudaTextureObject_t cytexObject + if texObject is None: + ptexObject = 0 + elif isinstance(texObject, (cudaTextureObject_t,)): + ptexObject = int(texObject) + else: + ptexObject = int(cudaTextureObject_t(texObject)) + cytexObject = ptexObject + cdef cudaResourceViewDesc pResViewDesc = cudaResourceViewDesc() + with nogil: + err = cyruntime.cudaGetTextureObjectResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pResViewDesc) + +@cython.embedsignature(True) +def cudaCreateSurfaceObject(pResDesc : Optional[cudaResourceDesc]): + """ Creates a surface object. + + Creates a surface object and returns it in `pSurfObject`. `pResDesc` + describes the data to perform surface load/stores on. + :py:obj:`~.cudaResourceDesc.resType` must be + :py:obj:`~.cudaResourceTypeArray` and + :py:obj:`~.cudaResourceDesc`::res::array::array must be set to a valid + CUDA array handle. + + Surface objects are only supported on devices of compute capability 3.0 + or higher. Additionally, a surface object is an opaque value, and, as + such, should only be accessed through CUDA API calls. + + Parameters + ---------- + pResDesc : :py:obj:`~.cudaResourceDesc` + Resource descriptor + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidChannelDescriptor`, :py:obj:`~.cudaErrorInvalidResourceHandle` + pSurfObject : :py:obj:`~.cudaSurfaceObject_t` + Surface object to create + + See Also + -------- + :py:obj:`~.cudaDestroySurfaceObject`, :py:obj:`~.cuSurfObjectCreate` + """ + cdef cudaSurfaceObject_t pSurfObject = cudaSurfaceObject_t() + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc is not None else NULL + with nogil: + err = cyruntime.cudaCreateSurfaceObject(pSurfObject._pvt_ptr, cypResDesc_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pSurfObject) + +@cython.embedsignature(True) +def cudaDestroySurfaceObject(surfObject): + """ Destroys a surface object. + + Destroys the surface object specified by `surfObject`. + + Parameters + ---------- + surfObject : :py:obj:`~.cudaSurfaceObject_t` + Surface object to destroy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaCreateSurfaceObject`, :py:obj:`~.cuSurfObjectDestroy` + """ + cdef cyruntime.cudaSurfaceObject_t cysurfObject + if surfObject is None: + psurfObject = 0 + elif isinstance(surfObject, (cudaSurfaceObject_t,)): + psurfObject = int(surfObject) + else: + psurfObject = int(cudaSurfaceObject_t(surfObject)) + cysurfObject = psurfObject + with nogil: + err = cyruntime.cudaDestroySurfaceObject(cysurfObject) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetSurfaceObjectResourceDesc(surfObject): + """ Returns a surface object's resource descriptor Returns the resource descriptor for the surface object specified by `surfObject`. + + Parameters + ---------- + surfObject : :py:obj:`~.cudaSurfaceObject_t` + Surface object + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pResDesc : :py:obj:`~.cudaResourceDesc` + Resource descriptor + + See Also + -------- + :py:obj:`~.cudaCreateSurfaceObject`, :py:obj:`~.cuSurfObjectGetResourceDesc` + """ + cdef cyruntime.cudaSurfaceObject_t cysurfObject + if surfObject is None: + psurfObject = 0 + elif isinstance(surfObject, (cudaSurfaceObject_t,)): + psurfObject = int(surfObject) + else: + psurfObject = int(cudaSurfaceObject_t(surfObject)) + cysurfObject = psurfObject + cdef cudaResourceDesc pResDesc = cudaResourceDesc() + with nogil: + err = cyruntime.cudaGetSurfaceObjectResourceDesc(pResDesc._pvt_ptr, cysurfObject) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pResDesc) + +@cython.embedsignature(True) +def cudaDriverGetVersion(): + """ Returns the latest version of CUDA supported by the driver. + + Returns in `*driverVersion` the latest version of CUDA supported by the + driver. The version is returned as (1000 * major + 10 * minor). For + example, CUDA 9.2 would be represented by 9020. If no driver is + installed, then 0 is returned as the driver version. + + This function automatically returns :py:obj:`~.cudaErrorInvalidValue` + if `driverVersion` is NULL. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + driverVersion : int + Returns the CUDA driver version. + + See Also + -------- + :py:obj:`~.cudaRuntimeGetVersion`, :py:obj:`~.cuDriverGetVersion` + """ + cdef int driverVersion = 0 + with nogil: + err = cyruntime.cudaDriverGetVersion(&driverVersion) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], driverVersion) + +@cython.embedsignature(True) +def cudaRuntimeGetVersion(): + """ Returns the CUDA Runtime version. + + Returns in `*runtimeVersion` the version number of the current CUDA + Runtime instance. The version is returned as (1000 * major + 10 * + minor). For example, CUDA 9.2 would be represented by 9020. + + As of CUDA 12.0, this function no longer initializes CUDA. The purpose + of this API is solely to return a compile-time constant stating the + CUDA Toolkit version in the above format. + + This function automatically returns :py:obj:`~.cudaErrorInvalidValue` + if the `runtimeVersion` argument is NULL. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + runtimeVersion : int + Returns the CUDA Runtime version. + + See Also + -------- + :py:obj:`~.cudaDriverGetVersion`, :py:obj:`~.cuDriverGetVersion` + """ + cdef int runtimeVersion = 0 + with nogil: + err = cyruntime.cudaRuntimeGetVersion(&runtimeVersion) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], runtimeVersion) + +@cython.embedsignature(True) +def cudaGraphCreate(unsigned int flags): + """ Creates a graph. + + Creates an empty graph, which is returned via `pGraph`. + + Parameters + ---------- + flags : unsigned int + Graph creation flags, must be 0 + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + pGraph : :py:obj:`~.cudaGraph_t` + Returns newly created graph + + See Also + -------- + :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphDestroy`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphClone` + """ + cdef cudaGraph_t pGraph = cudaGraph_t() + with nogil: + err = cyruntime.cudaGraphCreate(pGraph._pvt_ptr, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraph) + +@cython.embedsignature(True) +def cudaGraphAddKernelNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, pNodeParams : Optional[cudaKernelNodeParams]): + """ Creates a kernel execution node and adds it to a graph. + + Creates a new kernel execution node and adds it to `graph` with + `numDependencies` dependencies specified via `pDependencies` and + arguments specified in `pNodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `pDependencies` may not have any duplicate entries. + A handle to the new node will be returned in `pGraphNode`. + + The :py:obj:`~.cudaKernelNodeParams` structure is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + When the graph is launched, the node will invoke kernel `func` on a + (`gridDim.x` x `gridDim.y` x `gridDim.z`) grid of blocks. Each block + contains (`blockDim.x` x `blockDim.y` x `blockDim.z`) threads. + + `sharedMem` sets the amount of dynamic shared memory that will be + available to each thread block. + + Kernel parameters to `func` can be specified in one of two ways: + + 1) Kernel parameters can be specified via `kernelParams`. If the kernel + has N parameters, then `kernelParams` needs to be an array of N + pointers. Each pointer, from `kernelParams`[0] to `kernelParams`[N-1], + points to the region of memory from which the actual parameter will be + copied. The number of kernel parameters and their offsets and sizes do + not need to be specified as that information is retrieved directly from + the kernel's image. + + 2) Kernel parameters can also be packaged by the application into a + single buffer that is passed in via `extra`. This places the burden on + the application of knowing each kernel parameter's size and + alignment/padding within the buffer. The `extra` parameter exists to + allow this function to take additional less commonly used arguments. + `extra` specifies a list of names of extra settings and their + corresponding values. Each extra setting name is immediately followed + by the corresponding value. The list must be terminated with either + NULL or CU_LAUNCH_PARAM_END. + + - :py:obj:`~.CU_LAUNCH_PARAM_END`, which indicates the end of the + `extra` array; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`, which specifies that the + next value in `extra` will be a pointer to a buffer containing all + the kernel parameters for launching kernel `func`; + + - :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_SIZE`, which specifies that the + next value in `extra` will be a pointer to a size_t containing the + size of the buffer specified with + :py:obj:`~.CU_LAUNCH_PARAM_BUFFER_POINTER`; + + The error :py:obj:`~.cudaErrorInvalidValue` will be returned if kernel + parameters are specified with both `kernelParams` and `extra` (i.e. + both `kernelParams` and `extra` are non-NULL). + + The `kernelParams` or `extra` array, as well as the argument values it + points to, are copied during this call. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + pNodeParams : :py:obj:`~.cudaKernelNodeParams` + Parameters for the GPU execution node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaGraphKernelNodeGetParams`, :py:obj:`~.cudaGraphKernelNodeSetParams`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + + Notes + ----- + Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects. + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddKernelNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypNodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphKernelNodeGetParams(node): + """ Returns a kernel node's parameters. + + Returns the parameters of kernel node `node` in `pNodeParams`. The + `kernelParams` or `extra` array returned in `pNodeParams`, as well as + the argument values it points to, are owned by the node. This memory + remains valid until the node is destroyed or its parameters are + modified, and should not be modified directly. Use + :py:obj:`~.cudaGraphKernelNodeSetParams` to update the parameters of + this node. + + The params will contain either `kernelParams` or `extra`, according to + which of these was most recently set on the node. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction` + pNodeParams : :py:obj:`~.cudaKernelNodeParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphKernelNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaKernelNodeParams pNodeParams = cudaKernelNodeParams() + with nogil: + err = cyruntime.cudaGraphKernelNodeGetParams(cynode, pNodeParams._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pNodeParams) + +@cython.embedsignature(True) +def cudaGraphKernelNodeSetParams(node, pNodeParams : Optional[cudaKernelNodeParams]): + """ Sets a kernel node's parameters. + + Sets the parameters of kernel node `node` to `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + pNodeParams : :py:obj:`~.cudaKernelNodeParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorMemoryAllocation` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphKernelNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphKernelNodeSetParams(cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphKernelNodeCopyAttributes(hSrc, hDst): + """ Copies attributes from source node to destination node. + + Copies attributes from source node `src` to destination node `dst`. + Both node must have the same context. + + Parameters + ---------- + dst : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Destination node + src : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Source node For list of attributes see + :py:obj:`~.cudaKernelNodeAttrID` + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidContext` + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaGraphNode_t cyhDst + if hDst is None: + phDst = 0 + elif isinstance(hDst, (cudaGraphNode_t,driver.CUgraphNode)): + phDst = int(hDst) + else: + phDst = int(cudaGraphNode_t(hDst)) + cyhDst = phDst + cdef cyruntime.cudaGraphNode_t cyhSrc + if hSrc is None: + phSrc = 0 + elif isinstance(hSrc, (cudaGraphNode_t,driver.CUgraphNode)): + phSrc = int(hSrc) + else: + phSrc = int(cudaGraphNode_t(hSrc)) + cyhSrc = phSrc + with nogil: + err = cyruntime.cudaGraphKernelNodeCopyAttributes(cyhSrc, cyhDst) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphKernelNodeGetAttribute(hNode, attr not None : cudaKernelNodeAttrID): + """ Queries node attribute. + + Queries attribute `attr` from node `hNode` and stores it in + corresponding member of `value_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + + attr : :py:obj:`~.cudaKernelNodeAttrID` + + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + value_out : :py:obj:`~.cudaKernelNodeAttrValue` + + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value + cdef cudaKernelNodeAttrValue value_out = cudaKernelNodeAttrValue() + with nogil: + err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], value_out) + +@cython.embedsignature(True) +def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, value : Optional[cudaKernelNodeAttrValue]): + """ Sets node attribute. + + Sets attribute `attr` on node `hNode` from corresponding attribute of + `value`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + + attr : :py:obj:`~.cudaKernelNodeAttrID` + + value : :py:obj:`~.cudaKernelNodeAttrValue` + + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + + See Also + -------- + :py:obj:`~.cudaAccessPolicyWindow` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value + cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL + with nogil: + err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddMemcpyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, pCopyParams : Optional[cudaMemcpy3DParms]): + """ Creates a memcpy node and adds it to a graph. + + Creates a new memcpy node and adds it to `graph` with `numDependencies` + dependencies specified via `pDependencies`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `pDependencies` may not have any duplicate entries. + A handle to the new node will be returned in `pGraphNode`. + + When the graph is launched, the node will perform the memcpy described + by `pCopyParams`. See :py:obj:`~.cudaMemcpy3D()` for a description of + the structure and its restrictions. + + Memcpy nodes have some additional restrictions with regards to managed + memory, if the system contains at least one device which has a zero + value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + pCopyParams : :py:obj:`~.cudaMemcpy3DParms` + Parameters for the memory copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaGraphAddMemcpyNodeToSymbol`, :py:obj:`~.cudaGraphAddMemcpyNodeFromSymbol`, :py:obj:`~.cudaGraphAddMemcpyNode1D`, :py:obj:`~.cudaGraphMemcpyNodeGetParams`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaMemcpy3DParms* cypCopyParams_ptr = pCopyParams._pvt_ptr if pCopyParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddMemcpyNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypCopyParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphAddMemcpyNode1D(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, dst, src, size_t count, kind not None : cudaMemcpyKind): + """ Creates a 1D memcpy node and adds it to a graph. + + Creates a new 1D memcpy node and adds it to `graph` with + `numDependencies` dependencies specified via `pDependencies`. It is + possible for `numDependencies` to be 0, in which case the node will be + placed at the root of the graph. `pDependencies` may not have any + duplicate entries. A handle to the new node will be returned in + `pGraphNode`. + + When the graph is launched, the node will copy `count` bytes from the + memory area pointed to by `src` to the memory area pointed to by `dst`, + where `kind` specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. Launching a memcpy node with dst and src + pointers that do not match the direction of the copy results in an + undefined behavior. + + Memcpy nodes have some additional restrictions with regards to managed + memory, if the system contains at least one device which has a zero + value for the device attribute + :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + dst : Any + Destination memory address + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphMemcpyNodeGetParams`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphMemcpyNodeSetParams1D`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaGraphAddMemcpyNode1D(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cydst_ptr, cysrc_ptr, count, cykind) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphMemcpyNodeGetParams(node): + """ Returns a memcpy node's parameters. + + Returns the parameters of memcpy node `node` in `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pNodeParams : :py:obj:`~.cudaMemcpy3DParms` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphMemcpyNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaMemcpy3DParms pNodeParams = cudaMemcpy3DParms() + with nogil: + err = cyruntime.cudaGraphMemcpyNodeGetParams(cynode, pNodeParams._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pNodeParams) + +@cython.embedsignature(True) +def cudaGraphMemcpyNodeSetParams(node, pNodeParams : Optional[cudaMemcpy3DParms]): + """ Sets a memcpy node's parameters. + + Sets the parameters of memcpy node `node` to `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + pNodeParams : :py:obj:`~.cudaMemcpy3DParms` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaGraphMemcpyNodeSetParamsToSymbol`, :py:obj:`~.cudaGraphMemcpyNodeSetParamsFromSymbol`, :py:obj:`~.cudaGraphMemcpyNodeSetParams1D`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphMemcpyNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphMemcpyNodeSetParams(cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphMemcpyNodeSetParams1D(node, dst, src, size_t count, kind not None : cudaMemcpyKind): + """ Sets a memcpy node's parameters to perform a 1-dimensional copy. + + Sets the parameters of memcpy node `node` to the copy described by the + provided parameters. + + When the graph is launched, the node will copy `count` bytes from the + memory area pointed to by `src` to the memory area pointed to by `dst`, + where `kind` specifies the direction of the copy, and must be one of + :py:obj:`~.cudaMemcpyHostToHost`, :py:obj:`~.cudaMemcpyHostToDevice`, + :py:obj:`~.cudaMemcpyDeviceToHost`, + :py:obj:`~.cudaMemcpyDeviceToDevice`, or :py:obj:`~.cudaMemcpyDefault`. + Passing :py:obj:`~.cudaMemcpyDefault` is recommended, in which case the + type of transfer is inferred from the pointer values. However, + :py:obj:`~.cudaMemcpyDefault` is only allowed on systems that support + unified virtual addressing. Launching a memcpy node with dst and src + pointers that do not match the direction of the copy results in an + undefined behavior. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + dst : Any + Destination memory address + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphMemcpyNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaGraphMemcpyNodeSetParams1D(cynode, cydst_ptr, cysrc_ptr, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddMemsetNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, pMemsetParams : Optional[cudaMemsetParams]): + """ Creates a memset node and adds it to a graph. + + Creates a new memset node and adds it to `graph` with `numDependencies` + dependencies specified via `pDependencies`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `pDependencies` may not have any duplicate entries. + A handle to the new node will be returned in `pGraphNode`. + + The element size must be 1, 2, or 4 bytes. When the graph is launched, + the node will perform the memset described by `pMemsetParams`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + pMemsetParams : :py:obj:`~.cudaMemsetParams` + Parameters for the memory set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaGraphMemsetNodeGetParams`, :py:obj:`~.cudaGraphMemsetNodeSetParams`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaMemsetParams* cypMemsetParams_ptr = pMemsetParams._pvt_ptr if pMemsetParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddMemsetNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypMemsetParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphMemsetNodeGetParams(node): + """ Returns a memset node's parameters. + + Returns the parameters of memset node `node` in `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pNodeParams : :py:obj:`~.cudaMemsetParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphMemsetNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaMemsetParams pNodeParams = cudaMemsetParams() + with nogil: + err = cyruntime.cudaGraphMemsetNodeGetParams(cynode, pNodeParams._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pNodeParams) + +@cython.embedsignature(True) +def cudaGraphMemsetNodeSetParams(node, pNodeParams : Optional[cudaMemsetParams]): + """ Sets a memset node's parameters. + + Sets the parameters of memset node `node` to `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + pNodeParams : :py:obj:`~.cudaMemsetParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphMemsetNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphMemsetNodeSetParams(cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddHostNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, pNodeParams : Optional[cudaHostNodeParams]): + """ Creates a host execution node and adds it to a graph. + + Creates a new CPU execution node and adds it to `graph` with + `numDependencies` dependencies specified via `pDependencies` and + arguments specified in `pNodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `pDependencies` may not have any duplicate entries. + A handle to the new node will be returned in `pGraphNode`. + + When the graph is launched, the node will invoke the specified CPU + function. Host nodes are not supported under MPS with pre-Volta GPUs. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + pNodeParams : :py:obj:`~.cudaHostNodeParams` + Parameters for the host node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaLaunchHostFunc`, :py:obj:`~.cudaGraphHostNodeGetParams`, :py:obj:`~.cudaGraphHostNodeSetParams`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddHostNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cypNodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphHostNodeGetParams(node): + """ Returns a host node's parameters. + + Returns the parameters of host node `node` in `pNodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pNodeParams : :py:obj:`~.cudaHostNodeParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaLaunchHostFunc`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphHostNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaHostNodeParams pNodeParams = cudaHostNodeParams() + with nogil: + err = cyruntime.cudaGraphHostNodeGetParams(cynode, pNodeParams._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pNodeParams) + +@cython.embedsignature(True) +def cudaGraphHostNodeSetParams(node, pNodeParams : Optional[cudaHostNodeParams]): + """ Sets a host node's parameters. + + Sets the parameters of host node `node` to `nodeParams`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + pNodeParams : :py:obj:`~.cudaHostNodeParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaLaunchHostFunc`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphHostNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphHostNodeSetParams(cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddChildGraphNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, childGraph): + """ Creates a child graph node and adds it to a graph. + + Creates a new node which executes an embedded graph, and adds it to + `graph` with `numDependencies` dependencies specified via + `pDependencies`. It is possible for `numDependencies` to be 0, in which + case the node will be placed at the root of the graph. `pDependencies` + may not have any duplicate entries. A handle to the new node will be + returned in `pGraphNode`. + + If `childGraph` contains allocation nodes, free nodes, or conditional + nodes, this call will return an error. + + The node executes an embedded child graph. The child graph is cloned in + this call. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to clone into this node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphChildGraphNodeGetGraph`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphClone` + """ + cdef cyruntime.cudaGraph_t cychildGraph + if childGraph is None: + pchildGraph = 0 + elif isinstance(childGraph, (cudaGraph_t,driver.CUgraph)): + pchildGraph = int(childGraph) + else: + pchildGraph = int(cudaGraph_t(childGraph)) + cychildGraph = pchildGraph + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphAddChildGraphNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cychildGraph) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphChildGraphNodeGetGraph(node): + """ Gets a handle to the embedded graph of a child graph node. + + Gets a handle to the embedded graph in a child graph node. This call + does not clone the graph. Changes to the graph will be reflected in the + node, and the node retains ownership of the graph. + + Allocation and free nodes cannot be added to the returned graph. + Attempting to do so will return an error. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the embedded graph for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraph : :py:obj:`~.cudaGraph_t` + Location to store a handle to the graph + + See Also + -------- + :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphNodeFindInClone` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaGraph_t pGraph = cudaGraph_t() + with nogil: + err = cyruntime.cudaGraphChildGraphNodeGetGraph(cynode, pGraph._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraph) + +@cython.embedsignature(True) +def cudaGraphAddEmptyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies): + """ Creates an empty node and adds it to a graph. + + Creates a new node which performs no operation, and adds it to `graph` + with `numDependencies` dependencies specified via `pDependencies`. It + is possible for `numDependencies` to be 0, in which case the node will + be placed at the root of the graph. `pDependencies` may not have any + duplicate entries. A handle to the new node will be returned in + `pGraphNode`. + + An empty node performs no operation during execution, but can be used + for transitive ordering. For example, a phased execution graph with 2 + groups of n nodes with a barrier between them can be represented using + an empty node and 2*n dependency edges, rather than no empty node and + n^2 dependency edges. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphAddEmptyNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphAddEventRecordNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, event): + """ Creates an event record node and adds it to a graph. + + Creates a new event record node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and event + specified in `event`. It is possible for `numDependencies` to be 0, in + which case the node will be placed at the root of the graph. + `dependencies` may not have any duplicate entries. A handle to the new + node will be returned in `phGraphNode`. + + Each launch of the graph will record `event` to capture execution of + the node's dependencies. + + These nodes may not be used in loops or conditionals. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event for the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + phGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphAddEventRecordNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cyevent) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphEventRecordNodeGetEvent(node): + """ Returns the event associated with an event record node. + + Returns the event of event record node `hNode` in `event_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the event for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + event_out : :py:obj:`~.cudaEvent_t` + Pointer to return the event + + See Also + -------- + :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphEventWaitNodeGetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaEvent_t event_out = cudaEvent_t() + with nogil: + err = cyruntime.cudaGraphEventRecordNodeGetEvent(cynode, event_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], event_out) + +@cython.embedsignature(True) +def cudaGraphEventRecordNodeSetEvent(node, event): + """ Sets an event record node's event. + + Sets the event of event record node `hNode` to `event`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the event for + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to use + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphEventRecordNodeGetEvent`, :py:obj:`~.cudaGraphEventWaitNodeSetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + with nogil: + err = cyruntime.cudaGraphEventRecordNodeSetEvent(cynode, cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddEventWaitNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, event): + """ Creates an event wait node and adds it to a graph. + + Creates a new event wait node and adds it to `hGraph` with + `numDependencies` dependencies specified via `dependencies` and event + specified in `event`. It is possible for `numDependencies` to be 0, in + which case the node will be placed at the root of the graph. + `dependencies` may not have any duplicate entries. A handle to the new + node will be returned in `phGraphNode`. + + The graph node will wait for all work captured in `event`. See + :py:obj:`~.cuEventRecord()` for details on what is captured by an + event. The synchronization will be performed efficiently on the device + when applicable. `event` may be from a different context or device than + the launch stream. + + These nodes may not be used in loops or conditionals. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event for the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + phGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphAddEventWaitNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cyevent) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphEventWaitNodeGetEvent(node): + """ Returns the event associated with an event wait node. + + Returns the event of event wait node `hNode` in `event_out`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the event for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + event_out : :py:obj:`~.cudaEvent_t` + Pointer to return the event + + See Also + -------- + :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphEventRecordNodeGetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaEvent_t event_out = cudaEvent_t() + with nogil: + err = cyruntime.cudaGraphEventWaitNodeGetEvent(cynode, event_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], event_out) + +@cython.embedsignature(True) +def cudaGraphEventWaitNodeSetEvent(node, event): + """ Sets an event wait node's event. + + Sets the event of event wait node `hNode` to `event`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the event for + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Event to use + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphEventWaitNodeGetEvent`, :py:obj:`~.cudaGraphEventRecordNodeSetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + with nogil: + err = cyruntime.cudaGraphEventWaitNodeSetEvent(cynode, cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, nodeParams : Optional[cudaExternalSemaphoreSignalNodeParams]): + """ Creates an external semaphore signal node and adds it to a graph. + + Creates a new external semaphore signal node and adds it to `graph` + with `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `pGraphNode`. + + Performs a signal operation on a set of externally allocated semaphore + objects when the node is launched. The operation(s) will occur after + all of the node's dependencies have completed. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` + Parameters for the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeGetParams`, :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddExternalSemaphoresSignalNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphExternalSemaphoresSignalNodeGetParams(hNode): + """ Returns an external semaphore signal node's parameters. + + Returns the parameters of an external semaphore signal node `hNode` in + `params_out`. The `extSemArray` and `paramsArray` returned in + `params_out`, are owned by the node. This memory remains valid until + the node is destroyed or its parameters are modified, and should not be + modified directly. Use + :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeSetParams` to update + the parameters of this node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + params_out : :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cudaExternalSemaphoreSignalNodeParams params_out = cudaExternalSemaphoreSignalNodeParams() + with nogil: + err = cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], params_out) + +@cython.embedsignature(True) +def cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[cudaExternalSemaphoreSignalNodeParams]): + """ Sets an external semaphore signal node's parameters. + + Sets the parameters of an external semaphore signal node `hNode` to + `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, nodeParams : Optional[cudaExternalSemaphoreWaitNodeParams]): + """ Creates an external semaphore wait node and adds it to a graph. + + Creates a new external semaphore wait node and adds it to `graph` with + `numDependencies` dependencies specified via `dependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `dependencies` may not have any duplicate entries. A + handle to the new node will be returned in `pGraphNode`. + + Performs a wait operation on a set of externally allocated semaphore + objects when the node is launched. The node's dependencies will not be + launched until the wait operation has completed. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` + Parameters for the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphExternalSemaphoresWaitNodeGetParams`, :py:obj:`~.cudaGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddExternalSemaphoresWaitNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphExternalSemaphoresWaitNodeGetParams(hNode): + """ Returns an external semaphore wait node's parameters. + + Returns the parameters of an external semaphore wait node `hNode` in + `params_out`. The `extSemArray` and `paramsArray` returned in + `params_out`, are owned by the node. This memory remains valid until + the node is destroyed or its parameters are modified, and should not be + modified directly. Use + :py:obj:`~.cudaGraphExternalSemaphoresSignalNodeSetParams` to update + the parameters of this node. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + params_out : :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cudaExternalSemaphoreWaitNodeParams params_out = cudaExternalSemaphoreWaitNodeParams() + with nogil: + err = cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], params_out) + +@cython.embedsignature(True) +def cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[cudaExternalSemaphoreWaitNodeParams]): + """ Sets an external semaphore wait node's parameters. + + Sets the parameters of an external semaphore wait node `hNode` to + `nodeParams`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaGraphExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddMemAllocNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, nodeParams : Optional[cudaMemAllocNodeParams]): + """ Creates an allocation node and adds it to a graph. + + Creates a new allocation node and adds it to `graph` with + `numDependencies` dependencies specified via `pDependencies` and + arguments specified in `nodeParams`. It is possible for + `numDependencies` to be 0, in which case the node will be placed at the + root of the graph. `pDependencies` may not have any duplicate entries. + A handle to the new node will be returned in `pGraphNode`. + + When :py:obj:`~.cudaGraphAddMemAllocNode` creates an allocation node, + it returns the address of the allocation in `nodeParams.dptr`. The + allocation's address remains fixed across instantiations and launches. + + If the allocation is freed in the same graph, by creating a free node + using :py:obj:`~.cudaGraphAddMemFreeNode`, the allocation can be + accessed by nodes ordered after the allocation node but before the free + node. These allocations cannot be freed outside the owning graph, and + they can only be freed once in the owning graph. + + If the allocation is not freed in the same graph, then it can be + accessed not only by nodes in the graph which are ordered after the + allocation node, but also by stream operations ordered after the + graph's execution but before the allocation is freed. + + Allocations which are not freed in the same graph can be freed by: + + - passing the allocation to :py:obj:`~.cudaMemFreeAsync` or + :py:obj:`~.cudaMemFree`; + + - launching a graph with a free node for that allocation; or + + - specifying :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch` + during instantiation, which makes each launch behave as though it + called :py:obj:`~.cudaMemFreeAsync` for every unfreed allocation. + + It is not possible to free an allocation in both the owning graph and + another graph. If the allocation is freed in the same graph, a free + node cannot be added to another graph. If the allocation is freed in + another graph, a free node can no longer be added to the owning graph. + + The following restrictions apply to graphs which contain allocation + and/or memory free nodes: + + - Nodes and edges of the graph cannot be deleted. + + - The graph can only be used in a child node if the ownership is moved + to the parent. + + - Only one instantiation of the graph may exist at any point in time. + + - The graph cannot be cloned. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.cudaMemAllocNodeParams` + Parameters for the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOutOfMemory` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaGraphMemAllocNodeGetParams`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaDeviceGetGraphMemAttribute`, :py:obj:`~.cudaDeviceSetGraphMemAttribute`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaMemAllocNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddMemAllocNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphMemAllocNodeGetParams(node): + """ Returns a memory alloc node's parameters. + + Returns the parameters of a memory alloc node `hNode` in `params_out`. + The `poolProps` and `accessDescs` returned in `params_out`, are owned + by the node. This memory remains valid until the node is destroyed. The + returned parameters must not be modified. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + params_out : :py:obj:`~.cudaMemAllocNodeParams` + Pointer to return the parameters + + See Also + -------- + :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphMemFreeNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cudaMemAllocNodeParams params_out = cudaMemAllocNodeParams() + with nogil: + err = cyruntime.cudaGraphMemAllocNodeGetParams(cynode, params_out._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], params_out) + +@cython.embedsignature(True) +def cudaGraphAddMemFreeNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, dptr): + """ Creates a memory free node and adds it to a graph. + + Creates a new memory free node and adds it to `graph` with + `numDependencies` dependencies specified via `pDependencies` and + address specified in `dptr`. It is possible for `numDependencies` to be + 0, in which case the node will be placed at the root of the graph. + `pDependencies` may not have any duplicate entries. A handle to the new + node will be returned in `pGraphNode`. + + :py:obj:`~.cudaGraphAddMemFreeNode` will return + :py:obj:`~.cudaErrorInvalidValue` if the user attempts to free: + + - an allocation twice in the same graph. + + - an address that was not returned by an allocation node. + + - an invalid address. + + The following restrictions apply to graphs which contain allocation + and/or memory free nodes: + + - Nodes and edges of the graph cannot be deleted. + + - The graph can only be used in a child node if the ownership is moved + to the parent. + + - Only one instantiation of the graph may exist at any point in time. + + - The graph cannot be cloned. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + dptr : Any + Address of memory to free + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorNotSupported`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOutOfMemory` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphMemFreeNodeGetParams`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaDeviceGetGraphMemAttribute`, :py:obj:`~.cudaDeviceSetGraphMemAttribute`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphDestroyNode`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cydptr = _HelperInputVoidPtr(dptr) + cdef void* cydptr_ptr = cydptr.cptr + with nogil: + err = cyruntime.cudaGraphAddMemFreeNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cydptr_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphMemFreeNodeGetParams(node): + """ Returns a memory free node's parameters. + + Returns the address of a memory free node `hNode` in `dptr_out`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to get the parameters for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + dptr_out : Any + Pointer to return the device address + + See Also + -------- + :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaGraphMemFreeNodeGetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef void_ptr dptr_out = 0 + cdef void* cydptr_out_ptr = &dptr_out + with nogil: + err = cyruntime.cudaGraphMemFreeNodeGetParams(cynode, cydptr_out_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], dptr_out) + +@cython.embedsignature(True) +def cudaDeviceGraphMemTrim(int device): + """ Free unused memory that was cached on the specified device for use with graphs back to the OS. + + Blocks which are not in use by a graph that is either currently + executing or scheduled to execute are freed back to the operating + system. + + Parameters + ---------- + device : int + The device for which cached memory should be freed. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaDeviceGetGraphMemAttribute`, :py:obj:`~.cudaDeviceSetGraphMemAttribute`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` + """ + with nogil: + err = cyruntime.cudaDeviceGraphMemTrim(device) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaDeviceGetGraphMemAttribute(int device, attr not None : cudaGraphMemAttributeType): + """ Query asynchronous allocation attributes related to graphs. + + Valid attributes are: + + - :py:obj:`~.cudaGraphMemAttrUsedMemCurrent`: Amount of memory, in + bytes, currently associated with graphs + + - :py:obj:`~.cudaGraphMemAttrUsedMemHigh`: High watermark of memory, in + bytes, associated with graphs since the last time it was reset. High + watermark can only be reset to zero. + + - :py:obj:`~.cudaGraphMemAttrReservedMemCurrent`: Amount of memory, in + bytes, currently allocated for use by the CUDA graphs asynchronous + allocator. + + - :py:obj:`~.cudaGraphMemAttrReservedMemHigh`: High watermark of + memory, in bytes, currently allocated for use by the CUDA graphs + asynchronous allocator. + + Parameters + ---------- + device : int + Specifies the scope of the query + attr : :py:obj:`~.cudaGraphMemAttributeType` + attribute to get + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice` + value : Any + retrieved value + + See Also + -------- + :py:obj:`~.cudaDeviceSetGraphMemAttribute`, :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` + """ + cdef cyruntime.cudaGraphMemAttributeType cyattr = attr.value + cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, 0, is_getter=True) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cyruntime.cudaDeviceGetGraphMemAttribute(device, cyattr, cyvalue_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cyvalue.pyObj()) + +@cython.embedsignature(True) +def cudaDeviceSetGraphMemAttribute(int device, attr not None : cudaGraphMemAttributeType, value): + """ Set asynchronous allocation attributes related to graphs. + + Valid attributes are: + + - :py:obj:`~.cudaGraphMemAttrUsedMemHigh`: High watermark of memory, in + bytes, associated with graphs since the last time it was reset. High + watermark can only be reset to zero. + + - :py:obj:`~.cudaGraphMemAttrReservedMemHigh`: High watermark of + memory, in bytes, currently allocated for use by the CUDA graphs + asynchronous allocator. + + Parameters + ---------- + device : int + Specifies the scope of the query + attr : :py:obj:`~.cudaGraphMemAttributeType` + attribute to get + value : Any + pointer to value to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice` + + See Also + -------- + :py:obj:`~.cudaDeviceGetGraphMemAttribute`, :py:obj:`~.cudaGraphAddMemAllocNode`, :py:obj:`~.cudaGraphAddMemFreeNode`, :py:obj:`~.cudaDeviceGraphMemTrim`, :py:obj:`~.cudaMallocAsync`, :py:obj:`~.cudaFreeAsync` + """ + cdef cyruntime.cudaGraphMemAttributeType cyattr = attr.value + cdef _HelperCUgraphMem_attribute cyvalue = _HelperCUgraphMem_attribute(attr, value, is_getter=False) + cdef void* cyvalue_ptr = cyvalue.cptr + with nogil: + err = cyruntime.cudaDeviceSetGraphMemAttribute(device, cyattr, cyvalue_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphClone(originalGraph): + """ Clones a graph. + + This function creates a copy of `originalGraph` and returns it in + `pGraphClone`. All parameters are copied into the cloned graph. The + original graph may be modified after this call without affecting the + clone. + + Child graph nodes in the original graph are recursively copied into the + clone. + + Parameters + ---------- + originalGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to clone + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation` + pGraphClone : :py:obj:`~.cudaGraph_t` + Returns newly created cloned graph + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphNodeFindInClone` + + Notes + ----- + : Cloning is not supported for graphs which contain memory allocation nodes, memory free nodes, or conditional nodes. + """ + cdef cyruntime.cudaGraph_t cyoriginalGraph + if originalGraph is None: + poriginalGraph = 0 + elif isinstance(originalGraph, (cudaGraph_t,driver.CUgraph)): + poriginalGraph = int(originalGraph) + else: + poriginalGraph = int(cudaGraph_t(originalGraph)) + cyoriginalGraph = poriginalGraph + cdef cudaGraph_t pGraphClone = cudaGraph_t() + with nogil: + err = cyruntime.cudaGraphClone(pGraphClone._pvt_ptr, cyoriginalGraph) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphClone) + +@cython.embedsignature(True) +def cudaGraphNodeFindInClone(originalNode, clonedGraph): + """ Finds a cloned version of a node. + + This function returns the node in `clonedGraph` corresponding to + `originalNode` in the original graph. + + `clonedGraph` must have been cloned from `originalGraph` via + :py:obj:`~.cudaGraphClone`. `originalNode` must have been in + `originalGraph` at the time of the call to :py:obj:`~.cudaGraphClone`, + and the corresponding cloned node in `clonedGraph` must not have been + removed. The cloned node is then returned via `pClonedNode`. + + Parameters + ---------- + originalNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Handle to the original node + clonedGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Cloned graph to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pNode : :py:obj:`~.cudaGraphNode_t` + Returns handle to the cloned node + + See Also + -------- + :py:obj:`~.cudaGraphClone` + """ + cdef cyruntime.cudaGraph_t cyclonedGraph + if clonedGraph is None: + pclonedGraph = 0 + elif isinstance(clonedGraph, (cudaGraph_t,driver.CUgraph)): + pclonedGraph = int(clonedGraph) + else: + pclonedGraph = int(cudaGraph_t(clonedGraph)) + cyclonedGraph = pclonedGraph + cdef cyruntime.cudaGraphNode_t cyoriginalNode + if originalNode is None: + poriginalNode = 0 + elif isinstance(originalNode, (cudaGraphNode_t,driver.CUgraphNode)): + poriginalNode = int(originalNode) + else: + poriginalNode = int(cudaGraphNode_t(originalNode)) + cyoriginalNode = poriginalNode + cdef cudaGraphNode_t pNode = cudaGraphNode_t() + with nogil: + err = cyruntime.cudaGraphNodeFindInClone(pNode._pvt_ptr, cyoriginalNode, cyclonedGraph) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pNode) + +@cython.embedsignature(True) +def cudaGraphNodeGetType(node): + """ Returns a node's type. + + Returns the node type of `node` in `pType`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pType : :py:obj:`~.cudaGraphNodeType` + Pointer to return the node type + + See Also + -------- + :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphChildGraphNodeGetGraph`, :py:obj:`~.cudaGraphKernelNodeGetParams`, :py:obj:`~.cudaGraphKernelNodeSetParams`, :py:obj:`~.cudaGraphHostNodeGetParams`, :py:obj:`~.cudaGraphHostNodeSetParams`, :py:obj:`~.cudaGraphMemcpyNodeGetParams`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphMemsetNodeGetParams`, :py:obj:`~.cudaGraphMemsetNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNodeType pType + with nogil: + err = cyruntime.cudaGraphNodeGetType(cynode, &pType) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], cudaGraphNodeType(pType)) + +@cython.embedsignature(True) +def cudaGraphGetNodes(graph, size_t numNodes = 0): + """ Returns a graph's nodes. + + Returns a list of `graph's` nodes. `nodes` may be NULL, in which case + this function will return the number of nodes in `numNodes`. Otherwise, + `numNodes` entries will be filled in. If `numNodes` is higher than the + actual number of nodes, the remaining entries in `nodes` will be set to + NULL, and the number of nodes actually obtained will be returned in + `numNodes`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to query + numNodes : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + nodes : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the nodes + numNodes : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetType`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numNodes + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cynodes = NULL + pynodes = [] + if _graph_length != 0: + cynodes = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cynodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + with nogil: + err = cyruntime.cudaGraphGetNodes(cygraph, cynodes, &numNodes) + if cudaError_t(err) == cudaError_t(0): + pynodes = [cudaGraphNode_t(init_value=cynodes[idx]) for idx in range(_graph_length)] + if cynodes is not NULL: + free(cynodes) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], pynodes, numNodes) + +@cython.embedsignature(True) +def cudaGraphGetRootNodes(graph, size_t pNumRootNodes = 0): + """ Returns a graph's root nodes. + + Returns a list of `graph's` root nodes. `pRootNodes` may be NULL, in + which case this function will return the number of root nodes in + `pNumRootNodes`. Otherwise, `pNumRootNodes` entries will be filled in. + If `pNumRootNodes` is higher than the actual number of root nodes, the + remaining entries in `pRootNodes` will be set to NULL, and the number + of nodes actually obtained will be returned in `pNumRootNodes`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to query + pNumRootNodes : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pRootNodes : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the root nodes + pNumRootNodes : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetType`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = pNumRootNodes + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cypRootNodes = NULL + pypRootNodes = [] + if _graph_length != 0: + cypRootNodes = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cypRootNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + with nogil: + err = cyruntime.cudaGraphGetRootNodes(cygraph, cypRootNodes, &pNumRootNodes) + if cudaError_t(err) == cudaError_t(0): + pypRootNodes = [cudaGraphNode_t(init_value=cypRootNodes[idx]) for idx in range(_graph_length)] + if cypRootNodes is not NULL: + free(cypRootNodes) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], pypRootNodes, pNumRootNodes) + +@cython.embedsignature(True) +def cudaGraphGetEdges(graph, size_t numEdges = 0): + """ Returns a graph's dependency edges. + + Returns a list of `graph's` dependency edges. Edges are returned via + corresponding indices in `from` and `to`; that is, the node in `to`[i] + has a dependency on the node in `from`[i]. `from` and `to` may both be + NULL, in which case this function only returns the number of edges in + `numEdges`. Otherwise, `numEdges` entries will be filled in. If + `numEdges` is higher than the actual number of edges, the remaining + entries in `from` and `to` will be set to NULL, and the number of edges + actually returned will be written to `numEdges`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to get the edges from + numEdges : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + from : list[:py:obj:`~.cudaGraphNode_t`] + Location to return edge endpoints + to : list[:py:obj:`~.cudaGraphNode_t`] + Location to return edge endpoints + numEdges : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numEdges + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + pyfrom_ = [] + if _graph_length != 0: + cyfrom_ = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + cdef cyruntime.cudaGraphNode_t* cyto = NULL + pyto = [] + if _graph_length != 0: + cyto = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + with nogil: + err = cyruntime.cudaGraphGetEdges(cygraph, cyfrom_, cyto, &numEdges) + if cudaError_t(err) == cudaError_t(0): + pyfrom_ = [cudaGraphNode_t(init_value=cyfrom_[idx]) for idx in range(_graph_length)] + if cyfrom_ is not NULL: + free(cyfrom_) + if cudaError_t(err) == cudaError_t(0): + pyto = [cudaGraphNode_t(init_value=cyto[idx]) for idx in range(_graph_length)] + if cyto is not NULL: + free(cyto) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None) + return (_dict_cudaError_t[err], pyfrom_, pyto, numEdges) + +@cython.embedsignature(True) +def cudaGraphGetEdges_v2(graph, size_t numEdges = 0): + """ Returns a graph's dependency edges (12.3+) + + Returns a list of `graph's` dependency edges. Edges are returned via + corresponding indices in `from`, `to` and `edgeData`; that is, the node + in `to`[i] has a dependency on the node in `from`[i] with data + `edgeData`[i]. `from` and `to` may both be NULL, in which case this + function only returns the number of edges in `numEdges`. Otherwise, + `numEdges` entries will be filled in. If `numEdges` is higher than the + actual number of edges, the remaining entries in `from` and `to` will + be set to NULL, and the number of edges actually returned will be + written to `numEdges`. `edgeData` may alone be NULL, in which case the + edges must all have default (zeroed) edge data. Attempting a losst + query via NULL `edgeData` will result in + :py:obj:`~.cudaErrorLossyQuery`. If `edgeData` is non-NULL then `from` + and `to` must be as well. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to get the edges from + numEdges : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorLossyQuery`, :py:obj:`~.cudaErrorInvalidValue` + from : list[:py:obj:`~.cudaGraphNode_t`] + Location to return edge endpoints + to : list[:py:obj:`~.cudaGraphNode_t`] + Location to return edge endpoints + edgeData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional location to return edge data + numEdges : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + cdef size_t _graph_length = numEdges + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + pyfrom_ = [] + if _graph_length != 0: + cyfrom_ = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + cdef cyruntime.cudaGraphNode_t* cyto = NULL + pyto = [] + if _graph_length != 0: + cyto = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cyruntime.cudaGraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + with nogil: + err = cyruntime.cudaGraphGetEdges_v2(cygraph, cyfrom_, cyto, cyedgeData, &numEdges) + if cudaError_t(err) == cudaError_t(0): + pyfrom_ = [cudaGraphNode_t(init_value=cyfrom_[idx]) for idx in range(_graph_length)] + if cyfrom_ is not NULL: + free(cyfrom_) + if cudaError_t(err) == cudaError_t(0): + pyto = [cudaGraphNode_t(init_value=cyto[idx]) for idx in range(_graph_length)] + if cyto is not NULL: + free(cyto) + if cudaError_t(err) == cudaError_t(0): + pyedgeData = [cudaGraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None, None) + return (_dict_cudaError_t[err], pyfrom_, pyto, pyedgeData, numEdges) + +@cython.embedsignature(True) +def cudaGraphNodeGetDependencies(node, size_t pNumDependencies = 0): + """ Returns a node's dependencies. + + Returns a list of `node's` dependencies. `pDependencies` may be NULL, + in which case this function will return the number of dependencies in + `pNumDependencies`. Otherwise, `pNumDependencies` entries will be + filled in. If `pNumDependencies` is higher than the actual number of + dependencies, the remaining entries in `pDependencies` will be set to + NULL, and the number of nodes actually obtained will be returned in + `pNumDependencies`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + pNumDependencies : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the dependencies + pNumDependencies : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphNodeGetDependentNodes`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies` + """ + cdef size_t _graph_length = pNumDependencies + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + pypDependencies = [] + if _graph_length != 0: + cypDependencies = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + with nogil: + err = cyruntime.cudaGraphNodeGetDependencies(cynode, cypDependencies, &pNumDependencies) + if cudaError_t(err) == cudaError_t(0): + pypDependencies = [cudaGraphNode_t(init_value=cypDependencies[idx]) for idx in range(_graph_length)] + if cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], pypDependencies, pNumDependencies) + +@cython.embedsignature(True) +def cudaGraphNodeGetDependencies_v2(node, size_t pNumDependencies = 0): + """ Returns a node's dependencies (12.3+) + + Returns a list of `node's` dependencies. `pDependencies` may be NULL, + in which case this function will return the number of dependencies in + `pNumDependencies`. Otherwise, `pNumDependencies` entries will be + filled in. If `pNumDependencies` is higher than the actual number of + dependencies, the remaining entries in `pDependencies` will be set to + NULL, and the number of nodes actually obtained will be returned in + `pNumDependencies`. + + Note that if an edge has non-zero (non-default) edge data and + `edgeData` is NULL, this API will return + :py:obj:`~.cudaErrorLossyQuery`. If `edgeData` is non-NULL, then + `pDependencies` must be as well. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + pNumDependencies : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorLossyQuery`, :py:obj:`~.cudaErrorInvalidValue` + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the dependencies + edgeData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional array to return edge data for each dependency + pNumDependencies : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphNodeGetDependentNodes`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies` + """ + cdef size_t _graph_length = pNumDependencies + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + pypDependencies = [] + if _graph_length != 0: + cypDependencies = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cyruntime.cudaGraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + with nogil: + err = cyruntime.cudaGraphNodeGetDependencies_v2(cynode, cypDependencies, cyedgeData, &pNumDependencies) + if cudaError_t(err) == cudaError_t(0): + pypDependencies = [cudaGraphNode_t(init_value=cypDependencies[idx]) for idx in range(_graph_length)] + if cypDependencies is not NULL: + free(cypDependencies) + if cudaError_t(err) == cudaError_t(0): + pyedgeData = [cudaGraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None) + return (_dict_cudaError_t[err], pypDependencies, pyedgeData, pNumDependencies) + +@cython.embedsignature(True) +def cudaGraphNodeGetDependentNodes(node, size_t pNumDependentNodes = 0): + """ Returns a node's dependent nodes. + + Returns a list of `node's` dependent nodes. `pDependentNodes` may be + NULL, in which case this function will return the number of dependent + nodes in `pNumDependentNodes`. Otherwise, `pNumDependentNodes` entries + will be filled in. If `pNumDependentNodes` is higher than the actual + number of dependent nodes, the remaining entries in `pDependentNodes` + will be set to NULL, and the number of nodes actually obtained will be + returned in `pNumDependentNodes`. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + pNumDependentNodes : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pDependentNodes : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the dependent nodes + pNumDependentNodes : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies` + """ + cdef size_t _graph_length = pNumDependentNodes + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNode_t* cypDependentNodes = NULL + pypDependentNodes = [] + if _graph_length != 0: + cypDependentNodes = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cypDependentNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + with nogil: + err = cyruntime.cudaGraphNodeGetDependentNodes(cynode, cypDependentNodes, &pNumDependentNodes) + if cudaError_t(err) == cudaError_t(0): + pypDependentNodes = [cudaGraphNode_t(init_value=cypDependentNodes[idx]) for idx in range(_graph_length)] + if cypDependentNodes is not NULL: + free(cypDependentNodes) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], pypDependentNodes, pNumDependentNodes) + +@cython.embedsignature(True) +def cudaGraphNodeGetDependentNodes_v2(node, size_t pNumDependentNodes = 0): + """ Returns a node's dependent nodes (12.3+) + + Returns a list of `node's` dependent nodes. `pDependentNodes` may be + NULL, in which case this function will return the number of dependent + nodes in `pNumDependentNodes`. Otherwise, `pNumDependentNodes` entries + will be filled in. If `pNumDependentNodes` is higher than the actual + number of dependent nodes, the remaining entries in `pDependentNodes` + will be set to NULL, and the number of nodes actually obtained will be + returned in `pNumDependentNodes`. + + Note that if an edge has non-zero (non-default) edge data and + `edgeData` is NULL, this API will return + :py:obj:`~.cudaErrorLossyQuery`. If `edgeData` is non-NULL, then + `pDependentNodes` must be as well. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to query + pNumDependentNodes : int + See description + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorLossyQuery`, :py:obj:`~.cudaErrorInvalidValue` + pDependentNodes : list[:py:obj:`~.cudaGraphNode_t`] + Pointer to return the dependent nodes + edgeData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional pointer to return edge data for dependent nodes + pNumDependentNodes : int + See description + + See Also + -------- + :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphRemoveDependencies` + """ + cdef size_t _graph_length = pNumDependentNodes + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNode_t* cypDependentNodes = NULL + pypDependentNodes = [] + if _graph_length != 0: + cypDependentNodes = calloc(_graph_length, sizeof(cyruntime.cudaGraphNode_t)) + if cypDependentNodes is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL + pyedgeData = [] + if _graph_length != 0: + cyedgeData = calloc(_graph_length, sizeof(cyruntime.cudaGraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_graph_length) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + with nogil: + err = cyruntime.cudaGraphNodeGetDependentNodes_v2(cynode, cypDependentNodes, cyedgeData, &pNumDependentNodes) + if cudaError_t(err) == cudaError_t(0): + pypDependentNodes = [cudaGraphNode_t(init_value=cypDependentNodes[idx]) for idx in range(_graph_length)] + if cypDependentNodes is not NULL: + free(cypDependentNodes) + if cudaError_t(err) == cudaError_t(0): + pyedgeData = [cudaGraphEdgeData(_ptr=&cyedgeData[idx]) for idx in range(_graph_length)] + if cyedgeData is not NULL: + free(cyedgeData) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None, None) + return (_dict_cudaError_t[err], pypDependentNodes, pyedgeData, pNumDependentNodes) + +@cython.embedsignature(True) +def cudaGraphAddDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], to : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies): + """ Adds dependency edges to a graph. + + The number of dependencies to be added is defined by `numDependencies` + Elements in `pFrom` and `pTo` at corresponding indices define a + dependency. Each node in `pFrom` and `pTo` must belong to `graph`. + + If `numDependencies` is 0, elements in `pFrom` and `pTo` will be + ignored. Specifying an existing dependency will return an error. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which dependencies are added + from : list[:py:obj:`~.cudaGraphNode_t`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.cudaGraphNode_t`] + Array of dependent nodes + numDependencies : size_t + Number of dependencies to be added + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphRemoveDependencies`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + to = [] if to is None else to + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cyruntime.cudaGraphNode_t* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + if numDependencies > len(from_): raise RuntimeError("List is too small: " + str(len(from_)) + " < " + str(numDependencies)) + if numDependencies > len(to): raise RuntimeError("List is too small: " + str(len(to)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphAddDependencies(cygraph, cyfrom_, cyto, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddDependencies_v2(graph, from_ : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], to : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], edgeData : Optional[tuple[cudaGraphEdgeData] | list[cudaGraphEdgeData]], size_t numDependencies): + """ Adds dependency edges to a graph. (12.3+) + + The number of dependencies to be added is defined by `numDependencies` + Elements in `pFrom` and `pTo` at corresponding indices define a + dependency. Each node in `pFrom` and `pTo` must belong to `graph`. + + If `numDependencies` is 0, elements in `pFrom` and `pTo` will be + ignored. Specifying an existing dependency will return an error. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which dependencies are added + from : list[:py:obj:`~.cudaGraphNode_t`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.cudaGraphNode_t`] + Array of dependent nodes + edgeData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional array of edge data. If NULL, default (zeroed) edge data is + assumed. + numDependencies : size_t + Number of dependencies to be added + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphRemoveDependencies`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + edgeData = [] if edgeData is None else edgeData + if not all(isinstance(_x, (cudaGraphEdgeData,)) for _x in edgeData): + raise TypeError("Argument 'edgeData' is not instance of type (expected tuple[cyruntime.cudaGraphEdgeData,] or list[cyruntime.cudaGraphEdgeData,]") + to = [] if to is None else to + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cyruntime.cudaGraphNode_t* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL + if len(edgeData) > 1: + cyedgeData = calloc(len(edgeData), sizeof(cyruntime.cudaGraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + for idx in range(len(edgeData)): + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + elif len(edgeData) == 1: + cyedgeData = (edgeData[0])._pvt_ptr + with nogil: + err = cyruntime.cudaGraphAddDependencies_v2(cygraph, cyfrom_, cyto, cyedgeData, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + if len(edgeData) > 1 and cyedgeData is not NULL: + free(cyedgeData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphRemoveDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], to : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies): + """ Removes dependency edges from a graph. + + The number of `pDependencies` to be removed is defined by + `numDependencies`. Elements in `pFrom` and `pTo` at corresponding + indices define a dependency. Each node in `pFrom` and `pTo` must belong + to `graph`. + + If `numDependencies` is 0, elements in `pFrom` and `pTo` will be + ignored. Specifying a non-existing dependency will return an error. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph from which to remove dependencies + from : list[:py:obj:`~.cudaGraphNode_t`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.cudaGraphNode_t`] + Array of dependent nodes + numDependencies : size_t + Number of dependencies to be removed + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + to = [] if to is None else to + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cyruntime.cudaGraphNode_t* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + if numDependencies > len(from_): raise RuntimeError("List is too small: " + str(len(from_)) + " < " + str(numDependencies)) + if numDependencies > len(to): raise RuntimeError("List is too small: " + str(len(to)) + " < " + str(numDependencies)) + with nogil: + err = cyruntime.cudaGraphRemoveDependencies(cygraph, cyfrom_, cyto, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphRemoveDependencies_v2(graph, from_ : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], to : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], edgeData : Optional[tuple[cudaGraphEdgeData] | list[cudaGraphEdgeData]], size_t numDependencies): + """ Removes dependency edges from a graph. (12.3+) + + The number of `pDependencies` to be removed is defined by + `numDependencies`. Elements in `pFrom` and `pTo` at corresponding + indices define a dependency. Each node in `pFrom` and `pTo` must belong + to `graph`. + + If `numDependencies` is 0, elements in `pFrom` and `pTo` will be + ignored. Specifying an edge that does not exist in the graph, with data + matching `edgeData`, results in an error. `edgeData` is nullable, which + is equivalent to passing default (zeroed) data for each edge. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph from which to remove dependencies + from : list[:py:obj:`~.cudaGraphNode_t`] + Array of nodes that provide the dependencies + to : list[:py:obj:`~.cudaGraphNode_t`] + Array of dependent nodes + edgeData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional array of edge data. If NULL, edge data is assumed to be + default (zeroed). + numDependencies : size_t + Number of dependencies to be removed + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphAddDependencies`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphNodeGetDependencies`, :py:obj:`~.cudaGraphNodeGetDependentNodes` + """ + edgeData = [] if edgeData is None else edgeData + if not all(isinstance(_x, (cudaGraphEdgeData,)) for _x in edgeData): + raise TypeError("Argument 'edgeData' is not instance of type (expected tuple[cyruntime.cudaGraphEdgeData,] or list[cyruntime.cudaGraphEdgeData,]") + to = [] if to is None else to + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in to): + raise TypeError("Argument 'to' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + from_ = [] if from_ is None else from_ + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in from_): + raise TypeError("Argument 'from_' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cyruntime.cudaGraphNode_t* cyfrom_ = NULL + if len(from_) > 1: + cyfrom_ = calloc(len(from_), sizeof(cyruntime.cudaGraphNode_t)) + if cyfrom_ is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(from_)): + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] + elif len(from_) == 1: + cyfrom_ = (from_[0])._pvt_ptr + cdef cyruntime.cudaGraphNode_t* cyto = NULL + if len(to) > 1: + cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) + if cyto is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(to)): + cyto[idx] = (to[idx])._pvt_ptr[0] + elif len(to) == 1: + cyto = (to[0])._pvt_ptr + cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL + if len(edgeData) > 1: + cyedgeData = calloc(len(edgeData), sizeof(cyruntime.cudaGraphEdgeData)) + if cyedgeData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + for idx in range(len(edgeData)): + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + elif len(edgeData) == 1: + cyedgeData = (edgeData[0])._pvt_ptr + with nogil: + err = cyruntime.cudaGraphRemoveDependencies_v2(cygraph, cyfrom_, cyto, cyedgeData, numDependencies) + if len(from_) > 1 and cyfrom_ is not NULL: + free(cyfrom_) + if len(to) > 1 and cyto is not NULL: + free(cyto) + if len(edgeData) > 1 and cyedgeData is not NULL: + free(cyedgeData) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphDestroyNode(node): + """ Remove a node from the graph. + + Removes `node` from its graph. This operation also severs any + dependencies of other nodes on `node` and vice versa. + + Dependencies cannot be removed from graphs which contain allocation or + free nodes. Any attempt to do so will return an error. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to remove + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + with nogil: + err = cyruntime.cudaGraphDestroyNode(cynode) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphInstantiate(graph, unsigned long long flags): + """ Creates an executable graph from a graph. + + Instantiates `graph` as an executable graph. The graph is validated for + any structural constraints or intra-node constraints which were not + previously validated. If instantiation is successful, a handle to the + instantiated graph is returned in `pGraphExec`. + + The `flags` parameter controls the behavior of instantiation and + subsequent graph launches. Valid flags are: + + - :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`, which + configures a graph containing memory allocation nodes to + automatically free any unfreed memory allocations before the graph is + relaunched. + + - :py:obj:`~.cudaGraphInstantiateFlagDeviceLaunch`, which configures + the graph for launch from the device. If this flag is passed, the + executable graph handle returned can be used to launch the graph from + both the host and device. This flag cannot be used in conjunction + with :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`. + + - :py:obj:`~.cudaGraphInstantiateFlagUseNodePriority`, which causes the + graph to use the priorities from the per-node attributes rather than + the priority of the launch stream during execution. Note that + priorities are only available on kernel nodes, and are copied from + stream priority during stream capture. + + If `graph` contains any allocation or free nodes, there can be at most + one executable graph in existence for that graph at a time. An attempt + to instantiate a second executable graph before destroying the first + with :py:obj:`~.cudaGraphExecDestroy` will result in an error. The same + also applies if `graph` contains any device-updatable kernel nodes. + + Graphs instantiated for launch on the device have additional + restrictions which do not apply to host graphs: + + - The graph's nodes must reside on a single device. + + - The graph can only contain kernel nodes, memcpy nodes, memset nodes, + and child graph nodes. + + - The graph cannot be empty and must contain at least one kernel, + memcpy, or memset node. Operation-specific restrictions are outlined + below. + + - Kernel nodes: + + - Use of CUDA Dynamic Parallelism is not permitted. + + - Cooperative launches are permitted as long as MPS is not in use. + + - Memcpy nodes: + + - Only copies involving device memory and/or pinned device-mapped + host memory are permitted. + + - Copies involving CUDA arrays are not permitted. + + - Both operands must be accessible from the current device, and the + current device must match the device of other nodes in the graph. + + If `graph` is not instantiated for launch on the device but contains + kernels which call device-side :py:obj:`~.cudaGraphLaunch()` from + multiple devices, this will result in an error. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to instantiate + flags : unsigned long long + Flags to control instantiation. See + :py:obj:`~.CUgraphInstantiate_flags`. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphExec : :py:obj:`~.cudaGraphExec_t` + Returns instantiated graph + + See Also + -------- + :py:obj:`~.cudaGraphInstantiateWithFlags`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphUpload`, :py:obj:`~.cudaGraphLaunch`, :py:obj:`~.cudaGraphExecDestroy` + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() + with nogil: + err = cyruntime.cudaGraphInstantiate(pGraphExec._pvt_ptr, cygraph, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphExec) + +@cython.embedsignature(True) +def cudaGraphInstantiateWithFlags(graph, unsigned long long flags): + """ Creates an executable graph from a graph. + + Instantiates `graph` as an executable graph. The graph is validated for + any structural constraints or intra-node constraints which were not + previously validated. If instantiation is successful, a handle to the + instantiated graph is returned in `pGraphExec`. + + The `flags` parameter controls the behavior of instantiation and + subsequent graph launches. Valid flags are: + + - :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`, which + configures a graph containing memory allocation nodes to + automatically free any unfreed memory allocations before the graph is + relaunched. + + - :py:obj:`~.cudaGraphInstantiateFlagDeviceLaunch`, which configures + the graph for launch from the device. If this flag is passed, the + executable graph handle returned can be used to launch the graph from + both the host and device. This flag can only be used on platforms + which support unified addressing. This flag cannot be used in + conjunction with + :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`. + + - :py:obj:`~.cudaGraphInstantiateFlagUseNodePriority`, which causes the + graph to use the priorities from the per-node attributes rather than + the priority of the launch stream during execution. Note that + priorities are only available on kernel nodes, and are copied from + stream priority during stream capture. + + If `graph` contains any allocation or free nodes, there can be at most + one executable graph in existence for that graph at a time. An attempt + to instantiate a second executable graph before destroying the first + with :py:obj:`~.cudaGraphExecDestroy` will result in an error. The same + also applies if `graph` contains any device-updatable kernel nodes. + + If `graph` contains kernels which call device-side + :py:obj:`~.cudaGraphLaunch()` from multiple devices, this will result + in an error. + + Graphs instantiated for launch on the device have additional + restrictions which do not apply to host graphs: + + - The graph's nodes must reside on a single device. + + - The graph can only contain kernel nodes, memcpy nodes, memset nodes, + and child graph nodes. + + - The graph cannot be empty and must contain at least one kernel, + memcpy, or memset node. Operation-specific restrictions are outlined + below. + + - Kernel nodes: + + - Use of CUDA Dynamic Parallelism is not permitted. + + - Cooperative launches are permitted as long as MPS is not in use. + + - Memcpy nodes: + + - Only copies involving device memory and/or pinned device-mapped + host memory are permitted. + + - Copies involving CUDA arrays are not permitted. + + - Both operands must be accessible from the current device, and the + current device must match the device of other nodes in the graph. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to instantiate + flags : unsigned long long + Flags to control instantiation. See + :py:obj:`~.CUgraphInstantiate_flags`. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphExec : :py:obj:`~.cudaGraphExec_t` + Returns instantiated graph + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphUpload`, :py:obj:`~.cudaGraphLaunch`, :py:obj:`~.cudaGraphExecDestroy` + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() + with nogil: + err = cyruntime.cudaGraphInstantiateWithFlags(pGraphExec._pvt_ptr, cygraph, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphExec) + +@cython.embedsignature(True) +def cudaGraphInstantiateWithParams(graph, instantiateParams : Optional[cudaGraphInstantiateParams]): + """ Creates an executable graph from a graph. + + Instantiates `graph` as an executable graph according to the + `instantiateParams` structure. The graph is validated for any + structural constraints or intra-node constraints which were not + previously validated. If instantiation is successful, a handle to the + instantiated graph is returned in `pGraphExec`. + + `instantiateParams` controls the behavior of instantiation and + subsequent graph launches, as well as returning more detailed + information in the event of an error. + :py:obj:`~.cudaGraphInstantiateParams` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + The `flags` field controls the behavior of instantiation and subsequent + graph launches. Valid flags are: + + - :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`, which + configures a graph containing memory allocation nodes to + automatically free any unfreed memory allocations before the graph is + relaunched. + + - :py:obj:`~.cudaGraphInstantiateFlagUpload`, which will perform an + upload of the graph into `uploadStream` once the graph has been + instantiated. + + - :py:obj:`~.cudaGraphInstantiateFlagDeviceLaunch`, which configures + the graph for launch from the device. If this flag is passed, the + executable graph handle returned can be used to launch the graph from + both the host and device. This flag can only be used on platforms + which support unified addressing. This flag cannot be used in + conjunction with + :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`. + + - :py:obj:`~.cudaGraphInstantiateFlagUseNodePriority`, which causes the + graph to use the priorities from the per-node attributes rather than + the priority of the launch stream during execution. Note that + priorities are only available on kernel nodes, and are copied from + stream priority during stream capture. + + If `graph` contains any allocation or free nodes, there can be at most + one executable graph in existence for that graph at a time. An attempt + to instantiate a second executable graph before destroying the first + with :py:obj:`~.cudaGraphExecDestroy` will result in an error. The same + also applies if `graph` contains any device-updatable kernel nodes. + + If `graph` contains kernels which call device-side + :py:obj:`~.cudaGraphLaunch()` from multiple devices, this will result + in an error. + + Graphs instantiated for launch on the device have additional + restrictions which do not apply to host graphs: + + - The graph's nodes must reside on a single device. + + - The graph can only contain kernel nodes, memcpy nodes, memset nodes, + and child graph nodes. + + - The graph cannot be empty and must contain at least one kernel, + memcpy, or memset node. Operation-specific restrictions are outlined + below. + + - Kernel nodes: + + - Use of CUDA Dynamic Parallelism is not permitted. + + - Cooperative launches are permitted as long as MPS is not in use. + + - Memcpy nodes: + + - Only copies involving device memory and/or pinned device-mapped + host memory are permitted. + + - Copies involving CUDA arrays are not permitted. + + - Both operands must be accessible from the current device, and the + current device must match the device of other nodes in the graph. + + In the event of an error, the `result_out` and `errNode_out` fields + will contain more information about the nature of the error. Possible + error reporting includes: + + - :py:obj:`~.cudaGraphInstantiateError`, if passed an invalid value or + if an unexpected error occurred which is described by the return + value of the function. `errNode_out` will be set to NULL. + + - :py:obj:`~.cudaGraphInstantiateInvalidStructure`, if the graph + structure is invalid. `errNode_out` will be set to one of the + offending nodes. + + - :py:obj:`~.cudaGraphInstantiateNodeOperationNotSupported`, if the + graph is instantiated for device launch but contains a node of an + unsupported node type, or a node which performs unsupported + operations, such as use of CUDA dynamic parallelism within a kernel + node. `errNode_out` will be set to this node. + + - :py:obj:`~.cudaGraphInstantiateMultipleDevicesNotSupported`, if the + graph is instantiated for device launch but a node’s device differs + from that of another node. This error can also be returned if a graph + is not instantiated for device launch and it contains kernels which + call device-side :py:obj:`~.cudaGraphLaunch()` from multiple devices. + `errNode_out` will be set to this node. + + If instantiation is successful, `result_out` will be set to + :py:obj:`~.cudaGraphInstantiateSuccess`, and `hErrNode_out` will be set + to NULL. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to instantiate + instantiateParams : :py:obj:`~.cudaGraphInstantiateParams` + Instantiation parameters + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + pGraphExec : :py:obj:`~.cudaGraphExec_t` + Returns instantiated graph + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphInstantiateWithFlags`, :py:obj:`~.cudaGraphExecDestroy` + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() + cdef cyruntime.cudaGraphInstantiateParams* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._pvt_ptr, cygraph, cyinstantiateParams_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphExec) + +@cython.embedsignature(True) +def cudaGraphExecGetFlags(graphExec): + """ Query the instantiation flags of an executable graph. + + Returns the flags that were passed to instantiation for the given + executable graph. :py:obj:`~.cudaGraphInstantiateFlagUpload` will not + be returned by this API as it does not affect the resulting executable + graph. + + Parameters + ---------- + graphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + flags : unsigned long long + Returns the instantiation flags + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphInstantiateWithFlags`, :py:obj:`~.cudaGraphInstantiateWithParams` + """ + cdef cyruntime.cudaGraphExec_t cygraphExec + if graphExec is None: + pgraphExec = 0 + elif isinstance(graphExec, (cudaGraphExec_t,driver.CUgraphExec)): + pgraphExec = int(graphExec) + else: + pgraphExec = int(cudaGraphExec_t(graphExec)) + cygraphExec = pgraphExec + cdef unsigned long long flags = 0 + with nogil: + err = cyruntime.cudaGraphExecGetFlags(cygraphExec, &flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], flags) + +@cython.embedsignature(True) +def cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams : Optional[cudaKernelNodeParams]): + """ Sets the parameters for a kernel node in the given graphExec. + + Sets the parameters of a kernel node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `node` + in the non-executable graph, from which the executable graph was + instantiated. + + `node` must not have been removed from the original graph. All + `nodeParams` fields may change, but the following restrictions apply to + `func` updates: + + - The owning device of the function cannot change. + + - A node whose function originally did not use CUDA dynamic parallelism + cannot be updated to a function which uses CDP + + - A node whose function originally did not make device-side update + calls cannot be updated to a function which makes device-side update + calls. + + - If `hGraphExec` was not instantiated for device launch, a node whose + function originally did not use device-side + :py:obj:`~.cudaGraphLaunch()` cannot be updated to a function which + uses device-side :py:obj:`~.cudaGraphLaunch()` unless the node + resides on the same device as nodes which contained such calls at + instantiate-time. If no such calls were present at instantiation, + these updates cannot be performed at all. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + If `node` is a device-updatable kernel node, the next upload/launch of + `hGraphExec` will overwrite any previous device-side updates. + Additionally, applying host updates to a device-updatable kernel node + while it is being updated from the device will result in undefined + behavior. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + kernel node from the graph from which graphExec was instantiated + pNodeParams : :py:obj:`~.cudaKernelNodeParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecKernelNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams : Optional[cudaMemcpy3DParms]): + """ Sets the parameters for a memcpy node in the given graphExec. + + Updates the work represented by `node` in `hGraphExec` as though `node` + had contained `pNodeParams` at instantiation. `node` must remain in the + graph which was used to instantiate `hGraphExec`. Changed edges to and + from `node` are ignored. + + The source and destination memory in `pNodeParams` must be allocated + from the same contexts as the original source and destination memory. + Both the instantiation-time memory operands and the memory operands in + `pNodeParams` must be 1-dimensional. Zero-length operations are not + supported. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + Returns :py:obj:`~.cudaErrorInvalidValue` if the memory operands' + mappings changed or either the original or new memory operands are + multidimensional. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Memcpy node from the graph which was used to instantiate graphExec + pNodeParams : :py:obj:`~.cudaMemcpy3DParms` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParamsToSymbol`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParamsFromSymbol`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams1D`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecMemcpyNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, size_t count, kind not None : cudaMemcpyKind): + """ Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional copy. + + Updates the work represented by `node` in `hGraphExec` as though `node` + had contained the given params at instantiation. `node` must remain in + the graph which was used to instantiate `hGraphExec`. Changed edges to + and from `node` are ignored. + + `src` and `dst` must be allocated from the same contexts as the + original source and destination memory. The instantiation-time memory + operands must be 1-dimensional. Zero-length operations are not + supported. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + Returns :py:obj:`~.cudaErrorInvalidValue` if the memory operands' + mappings changed or the original memory operands are multidimensional. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Memcpy node from the graph which was used to instantiate graphExec + dst : Any + Destination memory address + src : Any + Source memory address + count : size_t + Size in bytes to copy + kind : :py:obj:`~.cudaMemcpyKind` + Type of transfer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemcpyNode1D`, :py:obj:`~.cudaGraphMemcpyNodeSetParams`, :py:obj:`~.cudaGraphMemcpyNodeSetParams1D`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cydst = _HelperInputVoidPtr(dst) + cdef void* cydst_ptr = cydst.cptr + cysrc = _HelperInputVoidPtr(src) + cdef void* cysrc_ptr = cysrc.cptr + cdef cyruntime.cudaMemcpyKind cykind = kind.value + with nogil: + err = cyruntime.cudaGraphExecMemcpyNodeSetParams1D(cyhGraphExec, cynode, cydst_ptr, cysrc_ptr, count, cykind) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams : Optional[cudaMemsetParams]): + """ Sets the parameters for a memset node in the given graphExec. + + Updates the work represented by `node` in `hGraphExec` as though `node` + had contained `pNodeParams` at instantiation. `node` must remain in the + graph which was used to instantiate `hGraphExec`. Changed edges to and + from `node` are ignored. + + Zero sized operations are not supported. + + The new destination pointer in `pNodeParams` must be to the same kind + of allocation as the original destination pointer and have the same + context association and device mapping as the original destination + pointer. + + Both the value and pointer address may be updated. Changing other + aspects of the memset (width, height, element size or pitch) may cause + the update to be rejected. Specifically, for 2d memsets, all dimension + changes are rejected. For 1d memsets, changes in height are explicitly + rejected and other changes are opportunistically allowed if the + resulting work maps onto the work resources already allocated for the + node. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Memset node from the graph which was used to instantiate graphExec + pNodeParams : :py:obj:`~.cudaMemsetParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecMemsetNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams : Optional[cudaHostNodeParams]): + """ Sets the parameters for a host node in the given graphExec. + + Updates the work represented by `node` in `hGraphExec` as though `node` + had contained `pNodeParams` at instantiation. `node` must remain in the + graph which was used to instantiate `hGraphExec`. Changed edges to and + from `node` are ignored. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Host node from the graph which was used to instantiate graphExec + pNodeParams : :py:obj:`~.cudaHostNodeParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphHostNodeSetParams`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecHostNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph): + """ Updates node parameters in the child graph node in the given graphExec. + + Updates the work represented by `node` in `hGraphExec` as though the + nodes contained in `node's` graph had the parameters contained in + `childGraph's` nodes at instantiation. `node` must remain in the graph + which was used to instantiate `hGraphExec`. Changed edges to and from + `node` are ignored. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `node` is also not modified by this call. + + The topology of `childGraph`, as well as the node insertion order, must + match that of the graph contained in `node`. See + :py:obj:`~.cudaGraphExecUpdate()` for a list of restrictions on what + can be updated in an instantiated graph. The update is recursive, so + child graph nodes contained within the top level child graph will also + be updated. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Host node from the graph which was used to instantiate graphExec + childGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph supplying the updated parameters + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphChildGraphNodeGetGraph`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraph_t cychildGraph + if childGraph is None: + pchildGraph = 0 + elif isinstance(childGraph, (cudaGraph_t,driver.CUgraph)): + pchildGraph = int(childGraph) + else: + pchildGraph = int(cudaGraph_t(childGraph)) + cychildGraph = pchildGraph + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cyruntime.cudaGraphExecChildGraphNodeSetParams(cyhGraphExec, cynode, cychildGraph) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): + """ Sets the event for an event record node in the given graphExec. + + Sets the event of an event record node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Event record node from the graph from which graphExec was + instantiated + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Updated event to use + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddEventRecordNode`, :py:obj:`~.cudaGraphEventRecordNodeGetEvent`, :py:obj:`~.cudaGraphEventWaitNodeSetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cyruntime.cudaGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): + """ Sets the event for an event wait node in the given graphExec. + + Sets the event of an event wait node in an executable graph + `hGraphExec`. The node is identified by the corresponding node `hNode` + in the non-executable graph, from which the executable graph was + instantiated. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Event wait node from the graph from which graphExec was + instantiated + event : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Updated event to use + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddEventWaitNode`, :py:obj:`~.cudaGraphEventWaitNodeGetEvent`, :py:obj:`~.cudaGraphEventRecordNodeSetEvent`, :py:obj:`~.cudaEventRecordWithFlags`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaEvent_t cyevent + if event is None: + pevent = 0 + elif isinstance(event, (cudaEvent_t,driver.CUevent)): + pevent = int(event) + else: + pevent = int(cudaEvent_t(event)) + cyevent = pevent + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cyruntime.cudaGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams : Optional[cudaExternalSemaphoreSignalNodeParams]): + """ Sets the parameters for an external semaphore signal node in the given graphExec. + + Sets the parameters of an external semaphore signal node in an + executable graph `hGraphExec`. The node is identified by the + corresponding node `hNode` in the non-executable graph, from which the + executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Changing `nodeParams->numExtSems` is not supported. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + semaphore signal node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresSignalNode`, :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresWaitNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams : Optional[cudaExternalSemaphoreWaitNodeParams]): + """ Sets the parameters for an external semaphore wait node in the given graphExec. + + Sets the parameters of an external semaphore wait node in an executable + graph `hGraphExec`. The node is identified by the corresponding node + `hNode` in the non-executable graph, from which the executable graph + was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Changing `nodeParams->numExtSems` is not supported. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + semaphore wait node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphExecNodeSetParams`, :py:obj:`~.cudaGraphAddExternalSemaphoresWaitNode`, :py:obj:`~.cudaImportExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync`, :py:obj:`~.cudaGraphExecKernelNodeSetParams`, :py:obj:`~.cudaGraphExecMemcpyNodeSetParams`, :py:obj:`~.cudaGraphExecMemsetNodeSetParams`, :py:obj:`~.cudaGraphExecHostNodeSetParams`, :py:obj:`~.cudaGraphExecChildGraphNodeSetParams`, :py:obj:`~.cudaGraphExecEventRecordNodeSetEvent`, :py:obj:`~.cudaGraphExecEventWaitNodeSetEvent`, :py:obj:`~.cudaGraphExecExternalSemaphoresSignalNodeSetParams`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): + """ Enables or disables the specified node in the given graphExec. + + Sets `hNode` to be either enabled or disabled. Disabled nodes are + functionally equivalent to empty nodes until they are reenabled. + Existing node parameters are not affected by disabling/enabling the + node. + + The node is identified by the corresponding node `hNode` in the non- + executable graph, from which the executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + The modifications only affect future launches of `hGraphExec`. Already + enqueued or running launches of `hGraphExec` are not affected by this + call. `hNode` is also not modified by this call. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node from the graph from which graphExec was instantiated + isEnabled : unsigned int + Node is enabled if != 0, otherwise the node is disabled + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphNodeGetEnabled`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` :py:obj:`~.cudaGraphLaunch` + + Notes + ----- + Currently only kernel, memset and memcpy nodes are supported. + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + with nogil: + err = cyruntime.cudaGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphNodeGetEnabled(hGraphExec, hNode): + """ Query whether a node in the given graphExec is enabled. + + Sets isEnabled to 1 if `hNode` is enabled, or 0 if `hNode` is disabled. + + The node is identified by the corresponding node `hNode` in the non- + executable graph, from which the executable graph was instantiated. + + `hNode` must not have been removed from the original graph. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to set the specified node + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node from the graph from which graphExec was instantiated + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + isEnabled : unsigned int + Location to return the enabled status of the node + + See Also + -------- + :py:obj:`~.cudaGraphNodeSetEnabled`, :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` :py:obj:`~.cudaGraphLaunch` + + Notes + ----- + Currently only kernel, memset and memcpy nodes are supported. + """ + cdef cyruntime.cudaGraphNode_t cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (cudaGraphNode_t,driver.CUgraphNode)): + phNode = int(hNode) + else: + phNode = int(cudaGraphNode_t(hNode)) + cyhNode = phNode + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef unsigned int isEnabled = 0 + with nogil: + err = cyruntime.cudaGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], isEnabled) + +@cython.embedsignature(True) +def cudaGraphExecUpdate(hGraphExec, hGraph): + """ Check whether an executable graph can be updated with a graph and perform the update if possible. + + Updates the node parameters in the instantiated graph specified by + `hGraphExec` with the node parameters in a topologically identical + graph specified by `hGraph`. + + Limitations: + + - Kernel nodes: + + - The owning context of the function cannot change. + + - A node whose function originally did not use CUDA dynamic + parallelism cannot be updated to a function which uses CDP. + + - A node whose function originally did not make device-side update + calls cannot be updated to a function which makes device-side + update calls. + + - A cooperative node cannot be updated to a non-cooperative node, and + vice-versa. + + - If the graph was instantiated with + cudaGraphInstantiateFlagUseNodePriority, the priority attribute + cannot change. Equality is checked on the originally requested + priority values, before they are clamped to the device's supported + range. + + - If `hGraphExec` was not instantiated for device launch, a node + whose function originally did not use device-side + :py:obj:`~.cudaGraphLaunch()` cannot be updated to a function which + uses device-side :py:obj:`~.cudaGraphLaunch()` unless the node + resides on the same device as nodes which contained such calls at + instantiate-time. If no such calls were present at instantiation, + these updates cannot be performed at all. + + - Neither `hGraph` nor `hGraphExec` may contain device-updatable + kernel nodes. + + - Memset and memcpy nodes: + + - The CUDA device(s) to which the operand(s) was allocated/mapped + cannot change. + + - The source/destination memory must be allocated from the same + contexts as the original source/destination memory. + + - For 2d memsets, only address and assigned value may be updated. + + - For 1d memsets, updating dimensions is also allowed, but may fail + if the resulting operation doesn't map onto the work resources + already allocated for the node. + + - Additional memcpy node restrictions: + + - Changing either the source or destination memory type(i.e. + CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported. + + - Conditional nodes: + + - Changing node parameters is not supported. + + - Changing parameters of nodes within the conditional body graph is + subject to the rules above. + + - Conditional handle flags and default values are updated as part of + the graph update. + + Note: The API may add further restrictions in future releases. The + return code should always be checked. + + cudaGraphExecUpdate sets the result member of `resultInfo` to + cudaGraphExecUpdateErrorTopologyChanged under the following conditions: + + - The count of nodes directly in `hGraphExec` and `hGraph` differ, in + which case resultInfo->errorNode is set to NULL. + + - `hGraph` has more exit nodes than `hGraph`, in which case + resultInfo->errorNode is set to one of the exit nodes in hGraph. + + - A node in `hGraph` has a different number of dependencies than the + node from `hGraphExec` it is paired with, in which case + resultInfo->errorNode is set to the node from `hGraph`. + + - A node in `hGraph` has a dependency that does not match with the + corresponding dependency of the paired node from `hGraphExec`. + resultInfo->errorNode will be set to the node from `hGraph`. + resultInfo->errorFromNode will be set to the mismatched dependency. + The dependencies are paired based on edge order and a dependency does + not match when the nodes are already paired based on other edges + examined in the graph. + + cudaGraphExecUpdate sets `the` result member of `resultInfo` to: + + - cudaGraphExecUpdateError if passed an invalid value. + + - cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed + + - cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node + changed, in which case `hErrorNode_out` is set to the node from + `hGraph`. + + - cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel + node changed (CUDA driver < 11.2) + + - cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field + of a kernel changed in an unsupported way(see note above), in which + case `hErrorNode_out` is set to the node from `hGraph` + + - cudaGraphExecUpdateErrorParametersChanged if any parameters to a node + changed in a way that is not supported, in which case + `hErrorNode_out` is set to the node from `hGraph` + + - cudaGraphExecUpdateErrorAttributesChanged if any attributes of a node + changed in a way that is not supported, in which case + `hErrorNode_out` is set to the node from `hGraph` + + - cudaGraphExecUpdateErrorNotSupported if something about a node is + unsupported, like the node's type or configuration, in which case + `hErrorNode_out` is set to the node from `hGraph` + + If the update fails for a reason not listed above, the result member of + `resultInfo` will be set to cudaGraphExecUpdateError. If the update + succeeds, the result member will be set to cudaGraphExecUpdateSuccess. + + cudaGraphExecUpdate returns cudaSuccess when the updated was performed + successfully. It returns cudaErrorGraphExecUpdateFailure if the graph + update was not performed because it included changes which violated + constraints specific to instantiated graph update. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The instantiated graph to be updated + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph containing the updated parameters + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorGraphExecUpdateFailure`, + resultInfo : :py:obj:`~.cudaGraphExecUpdateResultInfo` + the error info structure + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraph_t cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (cudaGraph_t,driver.CUgraph)): + phGraph = int(hGraph) + else: + phGraph = int(cudaGraph_t(hGraph)) + cyhGraph = phGraph + cdef cyruntime.cudaGraphExec_t cyhGraphExec + if hGraphExec is None: + phGraphExec = 0 + elif isinstance(hGraphExec, (cudaGraphExec_t,driver.CUgraphExec)): + phGraphExec = int(hGraphExec) + else: + phGraphExec = int(cudaGraphExec_t(hGraphExec)) + cyhGraphExec = phGraphExec + cdef cudaGraphExecUpdateResultInfo resultInfo = cudaGraphExecUpdateResultInfo() + with nogil: + err = cyruntime.cudaGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], resultInfo) + +@cython.embedsignature(True) +def cudaGraphUpload(graphExec, stream): + """ Uploads an executable graph in a stream. + + Uploads `hGraphExec` to the device in `hStream` without executing it. + Uploads of the same `hGraphExec` will be serialized. Each upload is + ordered behind both any previous work in `hStream` and any previous + launches of `hGraphExec`. Uses memory cached by `stream` to back the + allocations owned by `graphExec`. + + Parameters + ---------- + hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to upload + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to upload the graph + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphLaunch`, :py:obj:`~.cudaGraphExecDestroy` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphExec_t cygraphExec + if graphExec is None: + pgraphExec = 0 + elif isinstance(graphExec, (cudaGraphExec_t,driver.CUgraphExec)): + pgraphExec = int(graphExec) + else: + pgraphExec = int(cudaGraphExec_t(graphExec)) + cygraphExec = pgraphExec + with nogil: + err = cyruntime.cudaGraphUpload(cygraphExec, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphLaunch(graphExec, stream): + """ Launches an executable graph in a stream. + + Executes `graphExec` in `stream`. Only one instance of `graphExec` may + be executing at a time. Each launch is ordered behind both any previous + work in `stream` and any previous launches of `graphExec`. To execute a + graph concurrently, it must be instantiated multiple times into + multiple executable graphs. + + If any allocations created by `graphExec` remain unfreed (from a + previous launch) and `graphExec` was not instantiated with + :py:obj:`~.cudaGraphInstantiateFlagAutoFreeOnLaunch`, the launch will + fail with :py:obj:`~.cudaErrorInvalidValue`. + + Parameters + ---------- + graphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to launch + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Stream in which to launch the graph + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphUpload`, :py:obj:`~.cudaGraphExecDestroy` + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + pstream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + cdef cyruntime.cudaGraphExec_t cygraphExec + if graphExec is None: + pgraphExec = 0 + elif isinstance(graphExec, (cudaGraphExec_t,driver.CUgraphExec)): + pgraphExec = int(graphExec) + else: + pgraphExec = int(cudaGraphExec_t(graphExec)) + cygraphExec = pgraphExec + with nogil: + err = cyruntime.cudaGraphLaunch(cygraphExec, cystream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecDestroy(graphExec): + """ Destroys an executable graph. + + Destroys the executable graph specified by `graphExec`. + + Parameters + ---------- + graphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + Executable graph to destroy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphUpload`, :py:obj:`~.cudaGraphLaunch` + """ + cdef cyruntime.cudaGraphExec_t cygraphExec + if graphExec is None: + pgraphExec = 0 + elif isinstance(graphExec, (cudaGraphExec_t,driver.CUgraphExec)): + pgraphExec = int(graphExec) + else: + pgraphExec = int(cudaGraphExec_t(graphExec)) + cygraphExec = pgraphExec + with nogil: + err = cyruntime.cudaGraphExecDestroy(cygraphExec) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphDestroy(graph): + """ Destroys a graph. + + Destroys the graph specified by `graph`, as well as all of its nodes. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to destroy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + with nogil: + err = cyruntime.cudaGraphDestroy(cygraph) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphDebugDotPrint(graph, char* path, unsigned int flags): + """ Write a DOT file describing graph structure. + + Using the provided `graph`, write to `path` a DOT formatted description + of the graph. By default this includes the graph topology, node types, + node id, kernel names and memcpy direction. `flags` can be specified to + write more detailed information about each node type such as parameter + values, kernel attributes, node and function handles. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to create a DOT file from + path : bytes + The path to write the DOT file to + flags : unsigned int + Flags from cudaGraphDebugDotFlags for specifying which additional + node information to write + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorOperatingSystem` + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + with nogil: + err = cyruntime.cudaGraphDebugDotPrint(cygraph, path, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags): + """ Create a user object. + + Create a user object with the specified destructor callback and initial + reference count. The initial references are owned by the caller. + + Destructor callbacks cannot make CUDA API calls and should avoid + blocking behavior, as they are executed by a shared internal thread. + Another thread may be signaled to perform such actions, if it does not + block forward progress of tasks scheduled through CUDA. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + ptr : Any + The pointer to pass to the destroy function + destroy : :py:obj:`~.cudaHostFn_t` + Callback to free the user object when it is no longer in use + initialRefcount : unsigned int + The initial refcount to create the object with, typically 1. The + initial references are owned by the calling thread. + flags : unsigned int + Currently it is required to pass + :py:obj:`~.cudaUserObjectNoDestructorSync`, which is the only + defined flag. This indicates that the destroy callback cannot be + waited on by any CUDA API. Users requiring synchronization of the + callback should signal its completion manually. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + object_out : :py:obj:`~.cudaUserObject_t` + Location to return the user object handle + + See Also + -------- + :py:obj:`~.cudaUserObjectRetain`, :py:obj:`~.cudaUserObjectRelease`, :py:obj:`~.cudaGraphRetainUserObject`, :py:obj:`~.cudaGraphReleaseUserObject`, :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaHostFn_t cydestroy + if destroy is None: + pdestroy = 0 + elif isinstance(destroy, (cudaHostFn_t,)): + pdestroy = int(destroy) + else: + pdestroy = int(cudaHostFn_t(destroy)) + cydestroy = pdestroy + cdef cudaUserObject_t object_out = cudaUserObject_t() + cyptr = _HelperInputVoidPtr(ptr) + cdef void* cyptr_ptr = cyptr.cptr + with nogil: + err = cyruntime.cudaUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], object_out) + +@cython.embedsignature(True) +def cudaUserObjectRetain(object, unsigned int count): + """ Retain a reference to a user object. + + Retains new references to a user object. The new references are owned + by the caller. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + object : :py:obj:`~.cudaUserObject_t` + The object to retain + count : unsigned int + The number of references to retain, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaUserObjectCreate`, :py:obj:`~.cudaUserObjectRelease`, :py:obj:`~.cudaGraphRetainUserObject`, :py:obj:`~.cudaGraphReleaseUserObject`, :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaUserObject_t cyobject + if object is None: + pobject = 0 + elif isinstance(object, (cudaUserObject_t,driver.CUuserObject)): + pobject = int(object) + else: + pobject = int(cudaUserObject_t(object)) + cyobject = pobject + with nogil: + err = cyruntime.cudaUserObjectRetain(cyobject, count) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaUserObjectRelease(object, unsigned int count): + """ Release a reference to a user object. + + Releases user object references owned by the caller. The object's + destructor is invoked if the reference count reaches zero. + + It is undefined behavior to release references not owned by the caller, + or to use a user object handle after all references are released. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + object : :py:obj:`~.cudaUserObject_t` + The object to release + count : unsigned int + The number of references to release, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaUserObjectCreate`, :py:obj:`~.cudaUserObjectRetain`, :py:obj:`~.cudaGraphRetainUserObject`, :py:obj:`~.cudaGraphReleaseUserObject`, :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaUserObject_t cyobject + if object is None: + pobject = 0 + elif isinstance(object, (cudaUserObject_t,driver.CUuserObject)): + pobject = int(object) + else: + pobject = int(cudaUserObject_t(object)) + cyobject = pobject + with nogil: + err = cyruntime.cudaUserObjectRelease(cyobject, count) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags): + """ Retain a reference to a user object from a graph. + + Creates or moves user object references that will be owned by a CUDA + graph. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph to associate the reference with + object : :py:obj:`~.cudaUserObject_t` + The user object to retain a reference for + count : unsigned int + The number of references to add to the graph, typically 1. Must be + nonzero and not larger than INT_MAX. + flags : unsigned int + The optional flag :py:obj:`~.cudaGraphUserObjectMove` transfers + references from the calling thread, rather than create new + references. Pass 0 to create new references. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaUserObjectCreate` :py:obj:`~.cudaUserObjectRetain`, :py:obj:`~.cudaUserObjectRelease`, :py:obj:`~.cudaGraphReleaseUserObject`, :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaUserObject_t cyobject + if object is None: + pobject = 0 + elif isinstance(object, (cudaUserObject_t,driver.CUuserObject)): + pobject = int(object) + else: + pobject = int(cudaUserObject_t(object)) + cyobject = pobject + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + with nogil: + err = cyruntime.cudaGraphRetainUserObject(cygraph, cyobject, count, flags) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphReleaseUserObject(graph, object, unsigned int count): + """ Release a user object reference from a graph. + + Releases user object references owned by a graph. + + See CUDA User Objects in the CUDA C++ Programming Guide for more + information on user objects. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + The graph that will release the reference + object : :py:obj:`~.cudaUserObject_t` + The user object to release a reference for + count : unsigned int + The number of references to release, typically 1. Must be nonzero + and not larger than INT_MAX. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaUserObjectCreate` :py:obj:`~.cudaUserObjectRetain`, :py:obj:`~.cudaUserObjectRelease`, :py:obj:`~.cudaGraphRetainUserObject`, :py:obj:`~.cudaGraphCreate` + """ + cdef cyruntime.cudaUserObject_t cyobject + if object is None: + pobject = 0 + elif isinstance(object, (cudaUserObject_t,driver.CUuserObject)): + pobject = int(object) + else: + pobject = int(cudaUserObject_t(object)) + cyobject = pobject + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + with nogil: + err = cyruntime.cudaGraphReleaseUserObject(cygraph, cyobject, count) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphAddNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], size_t numDependencies, nodeParams : Optional[cudaGraphNodeParams]): + """ Adds a node of arbitrary type to a graph. + + Creates a new node in `graph` described by `nodeParams` with + `numDependencies` dependencies specified via `pDependencies`. + `numDependencies` may be 0. `pDependencies` may be null if + `numDependencies` is 0. `pDependencies` may not have any duplicate + entries. + + `nodeParams` is a tagged union. The node type should be specified in + the `typename` field, and type-specific parameters in the corresponding + union member. All unused bytes - that is, `reserved0` and all bytes + past the utilized union member - must be set to zero. It is recommended + to use brace initialization or memset to ensure all bytes are + initialized. + + Note that for some node types, `nodeParams` may contain "out + parameters" which are modified during the call, such as + `nodeParams->alloc.dptr`. + + A handle to the new node will be returned in `phGraphNode`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.cudaGraphNodeParams` + Specification of the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorNotSupported` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphExecNodeSetParams` + """ + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddNode(pGraphNode._pvt_ptr, cygraph, cypDependencies, numDependencies, cynodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphAddNode_v2(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | list[cudaGraphNode_t]], dependencyData : Optional[tuple[cudaGraphEdgeData] | list[cudaGraphEdgeData]], size_t numDependencies, nodeParams : Optional[cudaGraphNodeParams]): + """ Adds a node of arbitrary type to a graph (12.3+) + + Creates a new node in `graph` described by `nodeParams` with + `numDependencies` dependencies specified via `pDependencies`. + `numDependencies` may be 0. `pDependencies` may be null if + `numDependencies` is 0. `pDependencies` may not have any duplicate + entries. + + `nodeParams` is a tagged union. The node type should be specified in + the `typename` field, and type-specific parameters in the corresponding + union member. All unused bytes - that is, `reserved0` and all bytes + past the utilized union member - must be set to zero. It is recommended + to use brace initialization or memset to ensure all bytes are + initialized. + + Note that for some node types, `nodeParams` may contain "out + parameters" which are modified during the call, such as + `nodeParams->alloc.dptr`. + + A handle to the new node will be returned in `phGraphNode`. + + Parameters + ---------- + graph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + pDependencies : list[:py:obj:`~.cudaGraphNode_t`] + Dependencies of the node + dependencyData : list[:py:obj:`~.cudaGraphEdgeData`] + Optional edge data for the dependencies. If NULL, the data is + assumed to be default (zeroed) for all dependencies. + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.cudaGraphNodeParams` + Specification of the node + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorNotSupported` + pGraphNode : :py:obj:`~.cudaGraphNode_t` + Returns newly created node + + See Also + -------- + :py:obj:`~.cudaGraphCreate`, :py:obj:`~.cudaGraphNodeSetParams`, :py:obj:`~.cudaGraphExecNodeSetParams` + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (cudaGraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cyruntime.cudaGraphEdgeData,] or list[cyruntime.cudaGraphEdgeData,]") + pDependencies = [] if pDependencies is None else pDependencies + if not all(isinstance(_x, (cudaGraphNode_t,driver.CUgraphNode)) for _x in pDependencies): + raise TypeError("Argument 'pDependencies' is not instance of type (expected tuple[cyruntime.cudaGraphNode_t,driver.CUgraphNode] or list[cyruntime.cudaGraphNode_t,driver.CUgraphNode]") + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphNode_t pGraphNode = cudaGraphNode_t() + cdef cyruntime.cudaGraphNode_t* cypDependencies = NULL + if len(pDependencies) > 1: + cypDependencies = calloc(len(pDependencies), sizeof(cyruntime.cudaGraphNode_t)) + if cypDependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) + else: + for idx in range(len(pDependencies)): + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] + elif len(pDependencies) == 1: + cypDependencies = (pDependencies[0])._pvt_ptr + cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) + if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphAddNode_v2(pGraphNode._pvt_ptr, cygraph, cypDependencies, cydependencyData, numDependencies, cynodeParams_ptr) + if len(pDependencies) > 1 and cypDependencies is not NULL: + free(cypDependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pGraphNode) + +@cython.embedsignature(True) +def cudaGraphNodeSetParams(node, nodeParams : Optional[cudaGraphNodeParams]): + """ Update's a graph node's parameters. + + Sets the parameters of graph node `node` to `nodeParams`. The node type + specified by `nodeParams->type` must match the type of `node`. + `nodeParams` must be fully initialized and all unused bytes (reserved, + padding) zeroed. + + Modifying parameters is not supported for node types + cudaGraphNodeTypeMemAlloc and cudaGraphNodeTypeMemFree. + + Parameters + ---------- + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.cudaGraphNodeParams` + Parameters to copy + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphExecNodeSetParams` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphNodeSetParams(cynode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphExecNodeSetParams(graphExec, node, nodeParams : Optional[cudaGraphNodeParams]): + """ Update's a graph node's parameters in an instantiated graph. + + Sets the parameters of a node in an executable graph `graphExec`. The + node is identified by the corresponding node `node` in the non- + executable graph from which the executable graph was instantiated. + `node` must not have been removed from the original graph. + + The modifications only affect future launches of `graphExec`. Already + enqueued or running launches of `graphExec` are not affected by this + call. `node` is also not modified by this call. + + Allowed changes to parameters on executable graphs are as follows: + + **View CUDA Toolkit Documentation for a table example** + + Parameters + ---------- + graphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + The executable graph in which to update the specified node + node : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Corresponding node from the graph from which graphExec was + instantiated + nodeParams : :py:obj:`~.cudaGraphNodeParams` + Updated Parameters to set + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorNotSupported` + + See Also + -------- + :py:obj:`~.cudaGraphAddNode`, :py:obj:`~.cudaGraphNodeSetParams` :py:obj:`~.cudaGraphExecUpdate`, :py:obj:`~.cudaGraphInstantiate` + """ + cdef cyruntime.cudaGraphNode_t cynode + if node is None: + pnode = 0 + elif isinstance(node, (cudaGraphNode_t,driver.CUgraphNode)): + pnode = int(node) + else: + pnode = int(cudaGraphNode_t(node)) + cynode = pnode + cdef cyruntime.cudaGraphExec_t cygraphExec + if graphExec is None: + pgraphExec = 0 + elif isinstance(graphExec, (cudaGraphExec_t,driver.CUgraphExec)): + pgraphExec = int(graphExec) + else: + pgraphExec = int(cudaGraphExec_t(graphExec)) + cygraphExec = pgraphExec + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cyruntime.cudaGraphExecNodeSetParams(cygraphExec, cynode, cynodeParams_ptr) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, unsigned int flags): + """ Create a conditional handle. + + Creates a conditional handle associated with `hGraph`. + + The conditional handle must be associated with a conditional node in + this graph or one of its children. + + Handles not associated with a conditional node may cause graph + instantiation to fail. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph which will contain the conditional node using this handle. + defaultLaunchValue : unsigned int + Optional initial value for the conditional variable. Applied at the + beginning of each graph execution if cudaGraphCondAssignDefault is + set in `flags`. + flags : unsigned int + Currently must be cudaGraphCondAssignDefault or 0. + + Returns + ------- + cudaError_t + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + pHandle_out : :py:obj:`~.cudaGraphConditionalHandle` + Pointer used to return the handle to the caller. + + See Also + -------- + :py:obj:`~.cuGraphAddNode`, + """ + cdef cyruntime.cudaGraph_t cygraph + if graph is None: + pgraph = 0 + elif isinstance(graph, (cudaGraph_t,driver.CUgraph)): + pgraph = int(graph) + else: + pgraph = int(cudaGraph_t(graph)) + cygraph = pgraph + cdef cudaGraphConditionalHandle pHandle_out = cudaGraphConditionalHandle() + with nogil: + err = cyruntime.cudaGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cygraph, defaultLaunchValue, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pHandle_out) + +@cython.embedsignature(True) +def cudaGetDriverEntryPoint(char* symbol, unsigned long long flags): + """ Returns the requested driver API function pointer. + + Returns in `**funcPtr` the address of the CUDA driver function for the + requested flags. + + For a requested driver symbol, if the CUDA version in which the driver + symbol was introduced is less than or equal to the CUDA runtime + version, the API will return the function pointer to the corresponding + versioned driver function. + + The pointer returned by the API should be cast to a function pointer + matching the requested driver function's definition in the API header + file. The function pointer typedef can be picked up from the + corresponding typedefs header file. For example, cudaTypedefs.h + consists of function pointer typedefs for driver APIs defined in + cuda.h. + + The API will return :py:obj:`~.cudaSuccess` and set the returned + `funcPtr` if the requested driver function is valid and supported on + the platform. + + The API will return :py:obj:`~.cudaSuccess` and set the returned + `funcPtr` to NULL if the requested driver function is not supported on + the platform, no ABI compatible driver function exists for the CUDA + runtime version or if the driver symbol is invalid. + + It will also set the optional `driverStatus` to one of the values in + :py:obj:`~.cudaDriverEntryPointQueryResult` with the following + meanings: + + - :py:obj:`~.cudaDriverEntryPointSuccess` - The requested symbol was + succesfully found based on input arguments and `pfn` is valid + + - :py:obj:`~.cudaDriverEntryPointSymbolNotFound` - The requested symbol + was not found + + - :py:obj:`~.cudaDriverEntryPointVersionNotSufficent` - The requested + symbol was found but is not supported by the current runtime version + (CUDART_VERSION) + + The requested flags can be: + + - :py:obj:`~.cudaEnableDefault`: This is the default mode. This is + equivalent to :py:obj:`~.cudaEnablePerThreadDefaultStream` if the + code is compiled with --default-stream per-thread compilation flag or + the macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; + :py:obj:`~.cudaEnableLegacyStream` otherwise. + + - :py:obj:`~.cudaEnableLegacyStream`: This will enable the search for + all driver symbols that match the requested driver symbol name except + the corresponding per-thread versions. + + - :py:obj:`~.cudaEnablePerThreadDefaultStream`: This will enable the + search for all driver symbols that match the requested driver symbol + name including the per-thread versions. If a per-thread version is + not found, the API will return the legacy version of the driver + function. + + Parameters + ---------- + symbol : bytes + The base name of the driver API function to look for. As an + example, for the driver API :py:obj:`~.cuMemAlloc_v2`, `symbol` + would be cuMemAlloc. Note that the API will use the CUDA runtime + version to return the address to the most recent ABI compatible + driver symbol, :py:obj:`~.cuMemAlloc` or :py:obj:`~.cuMemAlloc_v2`. + flags : unsigned long long + Flags to specify search options. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + funcPtr : Any + Location to return the function pointer to the requested driver + function + driverStatus : :py:obj:`~.cudaDriverEntryPointQueryResult` + Optional location to store the status of finding the symbol from + the driver. See :py:obj:`~.cudaDriverEntryPointQueryResult` for + possible values. + + See Also + -------- + :py:obj:`~.cuGetProcAddress` + """ + cdef void_ptr funcPtr = 0 + cdef cyruntime.cudaDriverEntryPointQueryResult driverStatus + with nogil: + err = cyruntime.cudaGetDriverEntryPoint(symbol, &funcPtr, flags, &driverStatus) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + +@cython.embedsignature(True) +def cudaGetDriverEntryPointByVersion(char* symbol, unsigned int cudaVersion, unsigned long long flags): + """ Returns the requested driver API function pointer by CUDA version. + + Returns in `**funcPtr` the address of the CUDA driver function for the + requested flags and CUDA driver version. + + The CUDA version is specified as (1000 * major + 10 * minor), so CUDA + 11.2 should be specified as 11020. For a requested driver symbol, if + the specified CUDA version is greater than or equal to the CUDA version + in which the driver symbol was introduced, this API will return the + function pointer to the corresponding versioned function. + + The pointer returned by the API should be cast to a function pointer + matching the requested driver function's definition in the API header + file. The function pointer typedef can be picked up from the + corresponding typedefs header file. For example, cudaTypedefs.h + consists of function pointer typedefs for driver APIs defined in + cuda.h. + + For the case where the CUDA version requested is greater than the CUDA + Toolkit installed, there may not be an appropriate function pointer + typedef in the corresponding header file and may need a custom typedef + to match the driver function signature returned. This can be done by + getting the typedefs from a later toolkit or creating appropriately + matching custom function typedefs. + + The API will return :py:obj:`~.cudaSuccess` and set the returned + `funcPtr` if the requested driver function is valid and supported on + the platform. + + The API will return :py:obj:`~.cudaSuccess` and set the returned + `funcPtr` to NULL if the requested driver function is not supported on + the platform, no ABI compatible driver function exists for the + requested version or if the driver symbol is invalid. + + It will also set the optional `driverStatus` to one of the values in + :py:obj:`~.cudaDriverEntryPointQueryResult` with the following + meanings: + + - :py:obj:`~.cudaDriverEntryPointSuccess` - The requested symbol was + succesfully found based on input arguments and `pfn` is valid + + - :py:obj:`~.cudaDriverEntryPointSymbolNotFound` - The requested symbol + was not found + + - :py:obj:`~.cudaDriverEntryPointVersionNotSufficent` - The requested + symbol was found but is not supported by the specified version + `cudaVersion` + + The requested flags can be: + + - :py:obj:`~.cudaEnableDefault`: This is the default mode. This is + equivalent to :py:obj:`~.cudaEnablePerThreadDefaultStream` if the + code is compiled with --default-stream per-thread compilation flag or + the macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; + :py:obj:`~.cudaEnableLegacyStream` otherwise. + + - :py:obj:`~.cudaEnableLegacyStream`: This will enable the search for + all driver symbols that match the requested driver symbol name except + the corresponding per-thread versions. + + - :py:obj:`~.cudaEnablePerThreadDefaultStream`: This will enable the + search for all driver symbols that match the requested driver symbol + name including the per-thread versions. If a per-thread version is + not found, the API will return the legacy version of the driver + function. + + Parameters + ---------- + symbol : bytes + The base name of the driver API function to look for. As an + example, for the driver API :py:obj:`~.cuMemAlloc_v2`, `symbol` + would be cuMemAlloc. + cudaVersion : unsigned int + The CUDA version to look for the requested driver symbol + flags : unsigned long long + Flags to specify search options. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + funcPtr : Any + Location to return the function pointer to the requested driver + function + driverStatus : :py:obj:`~.cudaDriverEntryPointQueryResult` + Optional location to store the status of finding the symbol from + the driver. See :py:obj:`~.cudaDriverEntryPointQueryResult` for + possible values. + + See Also + -------- + :py:obj:`~.cuGetProcAddress` + """ + cdef void_ptr funcPtr = 0 + cdef cyruntime.cudaDriverEntryPointQueryResult driverStatus + with nogil: + err = cyruntime.cudaGetDriverEntryPointByVersion(symbol, &funcPtr, cudaVersion, flags, &driverStatus) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + +@cython.embedsignature(True) +def cudaLibraryLoadData(code, jitOptions : Optional[tuple[cudaJitOption] | list[cudaJitOption]], jitOptionsValues : Optional[tuple[Any] | list[Any]], unsigned int numJitOptions, libraryOptions : Optional[tuple[cudaLibraryOption] | list[cudaLibraryOption]], libraryOptionValues : Optional[tuple[Any] | list[Any]], unsigned int numLibraryOptions): + """ Load a library with specified code and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cudaLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The `code` may be a `cubin` or `fatbin` as output by nvcc, or a NULL- + terminated `PTX`, either as output by nvcc or hand-written. A fatbin + should also contain relocatable code when doing separate compilation. + Please also see the documentation for nvrtc + (https://docs.nvidia.com/cuda/nvrtc/index.html), nvjitlink + (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information + on generating loadable code at runtime. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total JIT + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + code : Any + Code to load + jitOptions : list[:py:obj:`~.cudaJitOption`] + Options for JIT + jitOptionsValues : list[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : list[:py:obj:`~.cudaLibraryOption`] + Options for loading + libraryOptionValues : list[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorSharedObjectSymbolNotFound`, :py:obj:`~.cudaErrorSharedObjectInitFailed`, :py:obj:`~.cudaErrorJitCompilerNotFound` + library : :py:obj:`~.cudaLibrary_t` + Returned library + + See Also + -------- + :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryLoadData` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (cudaLibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected tuple[cyruntime.cudaLibraryOption] or list[cyruntime.cudaLibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (cudaJitOption)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cyruntime.cudaJitOption] or list[cyruntime.cudaJitOption]") + cdef cudaLibrary_t library = cudaLibrary_t() + cycode = _HelperInputVoidPtr(code) + cdef void* cycode_ptr = cycode.cptr + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [_HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [_HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + with nogil: + err = cyruntime.cudaLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], library) + +@cython.embedsignature(True) +def cudaLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[cudaJitOption] | list[cudaJitOption]], jitOptionsValues : Optional[tuple[Any] | list[Any]], unsigned int numJitOptions, libraryOptions : Optional[tuple[cudaLibraryOption] | list[cudaLibraryOption]], libraryOptionValues : Optional[tuple[Any] | list[Any]], unsigned int numLibraryOptions): + """ Load a library with specified file and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cudaLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The file should be a `cubin` file as output by nvcc, or a `PTX` file + either as output by nvcc or handwritten, or a `fatbin` file as output + by nvcc. A fatbin should also contain relocatable code when doing + separate compilation. Please also see the documentation for nvrtc + (https://docs.nvidia.com/cuda/nvrtc/index.html), nvjitlink + (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information + on generating loadable code at runtime. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + fileName : bytes + File to load from + jitOptions : list[:py:obj:`~.cudaJitOption`] + Options for JIT + jitOptionsValues : list[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : list[:py:obj:`~.cudaLibraryOption`] + Options for loading + libraryOptionValues : list[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorSharedObjectSymbolNotFound`, :py:obj:`~.cudaErrorSharedObjectInitFailed`, :py:obj:`~.cudaErrorJitCompilerNotFound` + library : :py:obj:`~.cudaLibrary_t` + Returned library + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryLoadFromFile` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (cudaLibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected tuple[cyruntime.cudaLibraryOption] or list[cyruntime.cudaLibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (cudaJitOption)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cyruntime.cudaJitOption] or list[cyruntime.cudaJitOption]") + cdef cudaLibrary_t library = cudaLibrary_t() + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [_HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cyjitOptionsValues_ptr = voidStarHelperjitOptionsValues.cptr + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [_HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) + cdef void** cylibraryOptionValues_ptr = voidStarHelperlibraryOptionValues.cptr + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + with nogil: + err = cyruntime.cudaLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], library) + +@cython.embedsignature(True) +def cudaLibraryUnload(library): + """ Unloads a library. + + Unloads the library specified with `library` + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to unload + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + with nogil: + err = cyruntime.cudaLibraryUnload(cylibrary) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaLibraryGetKernel(library, char* name): + """ Returns a kernel handle. + + Returns in `pKernel` the handle of the kernel with name `name` located + in library `library`. If kernel handle is not found, the call returns + :py:obj:`~.cudaErrorSymbolNotFound`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve kernel from + name : bytes + Name of kernel to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + pKernel : :py:obj:`~.cudaKernel_t` + Returned kernel handle + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryGetKernel` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef cudaKernel_t pKernel = cudaKernel_t() + with nogil: + err = cyruntime.cudaLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pKernel) + +@cython.embedsignature(True) +def cudaLibraryGetGlobal(library, char* name): + """ Returns a global device pointer. + + Returns in `*dptr` and `*bytes` the base pointer and size of the global + with name `name` for the requested library `library` and the current + device. If no global for the requested name `name` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. One of the parameters + `dptr` or `numbytes` (not both) can be NULL in which case it is + ignored. The returned `dptr` cannot be passed to the Symbol APIs such + as :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, + :py:obj:`~.cudaGetSymbolAddress`, or :py:obj:`~.cudaGetSymbolSize`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve global from + name : bytes + Name of global to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` :py:obj:`~.cudaErrorDeviceUninitialized`, :py:obj:`~.cudaErrorContextIsDestroyed` + dptr : Any + Returned global device pointer for the requested library + numbytes : int + Returned global size in bytes + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetManaged`, :py:obj:`~.cuLibraryGetGlobal` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr dptr = 0 + cdef size_t numbytes = 0 + with nogil: + err = cyruntime.cudaLibraryGetGlobal(&dptr, &numbytes, cylibrary, name) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], dptr, numbytes) + +@cython.embedsignature(True) +def cudaLibraryGetManaged(library, char* name): + """ Returns a pointer to managed memory. + + Returns in `*dptr` and `*bytes` the base pointer and size of the + managed memory with name `name` for the requested library `library`. If + no managed memory with the requested name `name` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. One of the parameters + `dptr` or `numbytes` (not both) can be NULL in which case it is + ignored. Note that managed memory for library `library` is shared + across devices and is registered when the library is loaded. The + returned `dptr` cannot be passed to the Symbol APIs such as + :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, + :py:obj:`~.cudaGetSymbolAddress`, or :py:obj:`~.cudaGetSymbolSize`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve managed memory from + name : bytes + Name of managed memory to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + dptr : Any + Returned pointer to the managed memory + numbytes : int + Returned memory size in bytes + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetGlobal`, :py:obj:`~.cuLibraryGetManaged` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr dptr = 0 + cdef size_t numbytes = 0 + with nogil: + err = cyruntime.cudaLibraryGetManaged(&dptr, &numbytes, cylibrary, name) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], dptr, numbytes) + +@cython.embedsignature(True) +def cudaLibraryGetUnifiedFunction(library, char* symbol): + """ Returns a pointer to a unified function. + + Returns in `*fptr` the function pointer to a unified function denoted + by `symbol`. If no unified function with name `symbol` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. If there is no device with + attribute :py:obj:`~.cudaDeviceProp.unifiedFunctionPointers` present in + the system, the call may return :py:obj:`~.cudaErrorSymbolNotFound`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve function pointer memory from + symbol : bytes + Name of function pointer to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + fptr : Any + Returned pointer to a unified function + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryGetUnifiedFunction` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + plibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr fptr = 0 + with nogil: + err = cyruntime.cudaLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], fptr) + +@cython.embedsignature(True) +def cudaLibraryGetKernelCount(lib): + """ Returns the number of kernels within a library. + + Returns in `count` the number of kernels in `lib`. + + Parameters + ---------- + lib : :py:obj:`~.cudaLibrary_t` + Library to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + count : unsigned int + Number of kernels found within the library + + See Also + -------- + :py:obj:`~.cudaLibraryEnumerateKernels`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cuLibraryGetKernelCount` + """ + cdef cyruntime.cudaLibrary_t cylib + if lib is None: + plib = 0 + elif isinstance(lib, (cudaLibrary_t,)): + plib = int(lib) + else: + plib = int(cudaLibrary_t(lib)) + cylib = plib + cdef unsigned int count = 0 + with nogil: + err = cyruntime.cudaLibraryGetKernelCount(&count, cylib) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], count) + +@cython.embedsignature(True) +def cudaLibraryEnumerateKernels(unsigned int numKernels, lib): + """ Retrieve the kernel handles within a library. + + Returns in `kernels` a maximum number of `numKernels` kernel handles + within `lib`. The returned kernel handle becomes invalid when the + library is unloaded. + + Parameters + ---------- + numKernels : unsigned int + Maximum number of kernel handles may be returned to the buffer + lib : :py:obj:`~.cudaLibrary_t` + Library to query from + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + kernels : list[:py:obj:`~.cudaKernel_t`] + Buffer where the kernel handles are returned to + + See Also + -------- + :py:obj:`~.cudaLibraryGetKernelCount`, :py:obj:`~.cuLibraryEnumerateKernels` + """ + cdef cyruntime.cudaLibrary_t cylib + if lib is None: + plib = 0 + elif isinstance(lib, (cudaLibrary_t,)): + plib = int(lib) + else: + plib = int(cudaLibrary_t(lib)) + cylib = plib + cdef cyruntime.cudaKernel_t* cykernels = NULL + pykernels = [] + if numKernels != 0: + cykernels = calloc(numKernels, sizeof(cyruntime.cudaKernel_t)) + if cykernels is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(numKernels) + 'x' + str(sizeof(cyruntime.cudaKernel_t))) + with nogil: + err = cyruntime.cudaLibraryEnumerateKernels(cykernels, numKernels, cylib) + if cudaError_t(err) == cudaError_t(0): + pykernels = [cudaKernel_t(init_value=cykernels[idx]) for idx in range(numKernels)] + if cykernels is not NULL: + free(cykernels) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pykernels) + +@cython.embedsignature(True) +def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, int value, int device): + """ Sets information about a kernel. + + This call sets the value of a specified attribute `attr` on the kernel + `kernel` for the requested device `device` to an integer value + specified by `value`. This function returns :py:obj:`~.cudaSuccess` if + the new value of the attribute could be successfully set. If the set + fails, this call will return an error. Not all attributes can have + values set. Attempting to set a value on a read-only attribute will + result in an error (:py:obj:`~.cudaErrorInvalidValue`) + + Note that attributes set using :py:obj:`~.cudaFuncSetAttribute()` will + override the attribute set by this API irrespective of whether the call + to :py:obj:`~.cudaFuncSetAttribute()` is made before or after this API + call. Because of this and the stricter locking requirements mentioned + below it is suggested that this call be used during the initialization + path and not on each thread accessing `kernel` such as on kernel + launches or on the critical path. + + Valid values for `attr` are: + + - :py:obj:`~.cudaFuncAttributeMaxDynamicSharedMemorySize` - The + requested maximum size in bytes of dynamically-allocated shared + memory. The sum of this value and the function attribute + :py:obj:`~.sharedSizeBytes` cannot exceed the device attribute + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin`. The maximal size + of requestable dynamic shared memory may differ by GPU architecture. + + - :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout` - On + devices where the L1 cache and shared memory use the same hardware + resources, this sets the shared memory carveout preference, in + percent of the total shared memory. See + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerMultiprocessor`. This is only + a hint, and the driver can choose a different ratio if required to + execute the function. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterWidth`: The required + cluster width in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterHeight`: The required + cluster height in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterDepth`: The required + cluster depth in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeNonPortableClusterSizeAllowed`: Indicates + whether the function can be launched with non-portable cluster size. + 1 is allowed, 0 is disallowed. + + - :py:obj:`~.cudaFuncAttributeClusterSchedulingPolicyPreference`: The + block scheduling policy of a function. The value type is + cudaClusterSchedulingPolicy. + + Parameters + ---------- + kernel : :py:obj:`~.cudaKernel_t` + Kernel to set attribute of + attr : :py:obj:`~.cudaFuncAttribute` + Attribute requested + value : int + Value to set + device : int + Device to set attribute of + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetKernel`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + + Notes + ----- + The API has stricter locking requirements in comparison to its legacy counterpart :py:obj:`~.cudaFuncSetAttribute()` due to device-wide semantics. If multiple threads are trying to set the same attribute on the same device simultaneously, the attribute setting will depend on the interleavings chosen by the OS scheduler and memory consistency. + """ + cdef cyruntime.cudaKernel_t cykernel + if kernel is None: + pkernel = 0 + elif isinstance(kernel, (cudaKernel_t,)): + pkernel = int(kernel) + else: + pkernel = int(cudaKernel_t(kernel)) + cykernel = pkernel + cdef cyruntime.cudaFuncAttribute cyattr = attr.value + with nogil: + err = cyruntime.cudaKernelSetAttributeForDevice(cykernel, cyattr, value, device) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGetExportTable(pExportTableId : Optional[cudaUUID_t]): + """""" + cdef void_ptr ppExportTable = 0 + cdef cyruntime.cudaUUID_t* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId is not None else NULL + with nogil: + err = cyruntime.cudaGetExportTable(&ppExportTable, cypExportTableId_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], ppExportTable) + +@cython.embedsignature(True) +def cudaGetKernel(entryFuncAddr): + """ Get pointer to device kernel that matches entry function `entryFuncAddr`. + + Returns in `kernelPtr` the device kernel corresponding to the entry + function `entryFuncAddr`. + + Note that it is possible that there are multiple symbols belonging to + different translation units with the same `entryFuncAddr` registered + with this CUDA Runtime and so the order which the translation units are + loaded and registered with the CUDA Runtime can lead to differing + return pointers in `kernelPtr` . Suggested methods of ensuring + uniqueness are to limit visibility of global device functions by using + static or hidden visibility attribute in the respective translation + units. + + Parameters + ---------- + entryFuncAddr : Any + Address of device entry function to search kernel for + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + kernelPtr : :py:obj:`~.cudaKernel_t` + Returns the device kernel + + See Also + -------- + cudaGetKernel (C++ API) + """ + cdef cudaKernel_t kernelPtr = cudaKernel_t() + cyentryFuncAddr = _HelperInputVoidPtr(entryFuncAddr) + cdef void* cyentryFuncAddr_ptr = cyentryFuncAddr.cptr + with nogil: + err = cyruntime.cudaGetKernel(kernelPtr._pvt_ptr, cyentryFuncAddr_ptr) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], kernelPtr) + +@cython.embedsignature(True) +def make_cudaPitchedPtr(d, size_t p, size_t xsz, size_t ysz): + """ Returns a :py:obj:`~.cudaPitchedPtr` based on input parameters. + + Returns a :py:obj:`~.cudaPitchedPtr` based on the specified input + parameters `d`, `p`, `xsz`, and `ysz`. + + Parameters + ---------- + d : Any + Pointer to allocated memory + p : size_t + Pitch of allocated memory in bytes + xsz : size_t + Logical width of allocation in elements + ysz : size_t + Logical height of allocation in elements + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + :py:obj:`~.cudaPitchedPtr` + :py:obj:`~.cudaPitchedPtr` specified by `d`, `p`, `xsz`, and `ysz` + + See Also + -------- + make_cudaExtent, make_cudaPos + """ + cyd = _HelperInputVoidPtr(d) + cdef void* cyd_ptr = cyd.cptr + with nogil: + err = cyruntime.make_cudaPitchedPtr(cyd_ptr, p, xsz, ysz) + cdef cudaPitchedPtr wrapper = cudaPitchedPtr() + wrapper._pvt_ptr[0] = err + return wrapper + +@cython.embedsignature(True) +def make_cudaPos(size_t x, size_t y, size_t z): + """ Returns a :py:obj:`~.cudaPos` based on input parameters. + + Returns a :py:obj:`~.cudaPos` based on the specified input parameters + `x`, `y`, and `z`. + + Parameters + ---------- + x : size_t + X position + y : size_t + Y position + z : size_t + Z position + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + :py:obj:`~.cudaPos` + :py:obj:`~.cudaPos` specified by `x`, `y`, and `z` + + See Also + -------- + make_cudaExtent, make_cudaPitchedPtr + """ + with nogil: + err = cyruntime.make_cudaPos(x, y, z) + cdef cudaPos wrapper = cudaPos() + wrapper._pvt_ptr[0] = err + return wrapper + +@cython.embedsignature(True) +def make_cudaExtent(size_t w, size_t h, size_t d): + """ Returns a :py:obj:`~.cudaExtent` based on input parameters. + + Returns a :py:obj:`~.cudaExtent` based on the specified input + parameters `w`, `h`, and `d`. + + Parameters + ---------- + w : size_t + Width in elements when referring to array memory, in bytes when + referring to linear memory + h : size_t + Height in elements + d : size_t + Depth in elements + + Returns + ------- + cudaError_t.cudaSuccess + cudaError_t.cudaSuccess + :py:obj:`~.cudaExtent` + :py:obj:`~.cudaExtent` specified by `w`, `h`, and `d` + + See Also + -------- + make_cudaPitchedPtr, make_cudaPos + """ + with nogil: + err = cyruntime.make_cudaExtent(w, h, d) + cdef cudaExtent wrapper = cudaExtent() + wrapper._pvt_ptr[0] = err + return wrapper + +@cython.embedsignature(True) +def cudaGraphicsEGLRegisterImage(image, unsigned int flags): + """ Registers an EGL image. + + Registers the EGLImageKHR specified by `image` for access by CUDA. A + handle to the registered object is returned as `pCudaResource`. + Additional Mapping/Unmapping is not required for the registered + resource and :py:obj:`~.cudaGraphicsResourceGetMappedEglFrame` can be + directly called on the `pCudaResource`. + + The application will be responsible for synchronizing access to shared + objects. The application must ensure that any pending operation which + access the objects have completed before passing control to CUDA. This + may be accomplished by issuing and waiting for glFinish command on all + GLcontexts (for OpenGL and likewise for other APIs). The application + will be also responsible for ensuring that any pending operation on the + registered CUDA resource has completed prior to executing subsequent + commands in other APIs accesing the same memory objects. This can be + accomplished by calling cuCtxSynchronize or cuEventSynchronize + (preferably). + + The surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.cudaGraphicsRegisterFlagsNone`: Specifies no hints about + how this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.cudaGraphicsRegisterFlagsReadOnly`: Specifies that CUDA + will not write to this resource. + + - :py:obj:`~.cudaGraphicsRegisterFlagsWriteDiscard`: Specifies that + CUDA will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + The EGLImageKHR is an object which can be used to create EGLImage + target resource. It is defined as a void pointer. typedef void* + EGLImageKHR + + Parameters + ---------- + image : :py:obj:`~.EGLImageKHR` + An EGLImageKHR image which can be used to create target resource. + flags : unsigned int + Map flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + pCudaResource : :py:obj:`~.cudaGraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cudaGraphicsUnregisterResource`, :py:obj:`~.cudaGraphicsResourceGetMappedEglFrame`, :py:obj:`~.cuGraphicsEGLRegisterImage` + """ + cdef cyruntime.EGLImageKHR cyimage + if image is None: + pimage = 0 + elif isinstance(image, (EGLImageKHR,)): + pimage = int(image) + else: + pimage = int(EGLImageKHR(image)) + cyimage = pimage + cdef cudaGraphicsResource_t pCudaResource = cudaGraphicsResource_t() + with nogil: + err = cyruntime.cudaGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], pCudaResource) + +@cython.embedsignature(True) +def cudaEGLStreamConsumerConnect(eglStream): + """ Connect CUDA to EGLStream as a consumer. + + Connect CUDA as a consumer to EGLStreamKHR specified by `eglStream`. + + The EGLStreamKHR is an EGL object that transfers a sequence of image + frames from one API to another. + + Parameters + ---------- + eglStream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + conn : :py:obj:`~.cudaEglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cudaEGLStreamConsumerDisconnect`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame`, :py:obj:`~.cuEGLStreamConsumerConnect` + """ + cdef cyruntime.EGLStreamKHR cyeglStream + if eglStream is None: + peglStream = 0 + elif isinstance(eglStream, (EGLStreamKHR,)): + peglStream = int(eglStream) + else: + peglStream = int(EGLStreamKHR(eglStream)) + cyeglStream = peglStream + cdef cudaEglStreamConnection conn = cudaEglStreamConnection() + with nogil: + err = cyruntime.cudaEGLStreamConsumerConnect(conn._pvt_ptr, cyeglStream) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], conn) + +@cython.embedsignature(True) +def cudaEGLStreamConsumerConnectWithFlags(eglStream, unsigned int flags): + """ Connect CUDA to EGLStream as a consumer with given flags. + + Connect CUDA as a consumer to EGLStreamKHR specified by `stream` with + specified `flags` defined by :py:obj:`~.cudaEglResourceLocationFlags`. + + The flags specify whether the consumer wants to access frames from + system memory or video memory. Default is + :py:obj:`~.cudaEglResourceLocationVidmem`. + + Parameters + ---------- + eglStream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + flags : unsigned int + Flags denote intended location - system or video. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + conn : :py:obj:`~.cudaEglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cudaEGLStreamConsumerDisconnect`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame`, :py:obj:`~.cuEGLStreamConsumerConnectWithFlags` + """ + cdef cyruntime.EGLStreamKHR cyeglStream + if eglStream is None: + peglStream = 0 + elif isinstance(eglStream, (EGLStreamKHR,)): + peglStream = int(eglStream) + else: + peglStream = int(EGLStreamKHR(eglStream)) + cyeglStream = peglStream + cdef cudaEglStreamConnection conn = cudaEglStreamConnection() + with nogil: + err = cyruntime.cudaEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cyeglStream, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], conn) + +@cython.embedsignature(True) +def cudaEGLStreamConsumerDisconnect(conn): + """ Disconnect CUDA as a consumer to EGLStream . + + Disconnect CUDA as a consumer to EGLStreamKHR. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Conection to disconnect. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaEGLStreamConsumerConnect`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame`, :py:obj:`~.cuEGLStreamConsumerDisconnect` + """ + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cyruntime.cudaEGLStreamConsumerDisconnect(cyconn) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout): + """ Acquire an image frame from the EGLStream with CUDA as a consumer. + + Acquire an image frame from EGLStreamKHR. + :py:obj:`~.cudaGraphicsResourceGetMappedEglFrame` can be called on + `pCudaResource` to get :py:obj:`~.cudaEglFrame`. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Connection on which to acquire + pCudaResource : :py:obj:`~.cudaGraphicsResource_t` + CUDA resource on which the EGLStream frame will be mapped for use. + pStream : :py:obj:`~.cudaStream_t` + CUDA stream for synchronization and any data migrations implied by + :py:obj:`~.cudaEglResourceLocationFlags`. + timeout : unsigned int + Desired timeout in usec. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown`, :py:obj:`~.cudaErrorLaunchTimeout` + + See Also + -------- + :py:obj:`~.cudaEGLStreamConsumerConnect`, :py:obj:`~.cudaEGLStreamConsumerDisconnect`, :py:obj:`~.cudaEGLStreamConsumerReleaseFrame`, :py:obj:`~.cuEGLStreamConsumerAcquireFrame` + """ + cdef cyruntime.cudaStream_t *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (cudaStream_t,driver.CUstream)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cyruntime.cudaGraphicsResource_t *cypCudaResource + if pCudaResource is None: + cypCudaResource = NULL + elif isinstance(pCudaResource, (cudaGraphicsResource_t,)): + ppCudaResource = pCudaResource.getPtr() + cypCudaResource = ppCudaResource + elif isinstance(pCudaResource, (int)): + cypCudaResource = pCudaResource + else: + raise TypeError("Argument 'pCudaResource' is not instance of type (expected , found " + str(type(pCudaResource))) + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cyruntime.cudaEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): + """ Releases the last frame acquired from the EGLStream. + + Release the acquired image frame specified by `pCudaResource` to + EGLStreamKHR. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Connection on which to release + pCudaResource : :py:obj:`~.cudaGraphicsResource_t` + CUDA resource whose corresponding frame is to be released + pStream : :py:obj:`~.cudaStream_t` + CUDA stream on which release will be done. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaEGLStreamConsumerConnect`, :py:obj:`~.cudaEGLStreamConsumerDisconnect`, :py:obj:`~.cudaEGLStreamConsumerAcquireFrame`, :py:obj:`~.cuEGLStreamConsumerReleaseFrame` + """ + cdef cyruntime.cudaStream_t *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (cudaStream_t,driver.CUstream)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cyruntime.cudaGraphicsResource_t cypCudaResource + if pCudaResource is None: + ppCudaResource = 0 + elif isinstance(pCudaResource, (cudaGraphicsResource_t,)): + ppCudaResource = int(pCudaResource) + else: + ppCudaResource = int(cudaGraphicsResource_t(pCudaResource)) + cypCudaResource = ppCudaResource + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cyruntime.cudaEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEGLStreamProducerConnect(eglStream, width, height): + """ Connect CUDA to EGLStream as a producer. + + Connect CUDA as a producer to EGLStreamKHR specified by `stream`. + + The EGLStreamKHR is an EGL object that transfers a sequence of image + frames from one API to another. + + Parameters + ---------- + eglStream : :py:obj:`~.EGLStreamKHR` + EGLStreamKHR handle + width : :py:obj:`~.EGLint` + width of the image to be submitted to the stream + height : :py:obj:`~.EGLint` + height of the image to be submitted to the stream + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + conn : :py:obj:`~.cudaEglStreamConnection` + Pointer to the returned connection handle + + See Also + -------- + :py:obj:`~.cudaEGLStreamProducerDisconnect`, :py:obj:`~.cudaEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerReturnFrame`, :py:obj:`~.cuEGLStreamProducerConnect` + """ + cdef cyruntime.EGLint cyheight + if height is None: + pheight = 0 + elif isinstance(height, (EGLint,)): + pheight = int(height) + else: + pheight = int(EGLint(height)) + cyheight = pheight + cdef cyruntime.EGLint cywidth + if width is None: + pwidth = 0 + elif isinstance(width, (EGLint,)): + pwidth = int(width) + else: + pwidth = int(EGLint(width)) + cywidth = pwidth + cdef cyruntime.EGLStreamKHR cyeglStream + if eglStream is None: + peglStream = 0 + elif isinstance(eglStream, (EGLStreamKHR,)): + peglStream = int(eglStream) + else: + peglStream = int(EGLStreamKHR(eglStream)) + cyeglStream = peglStream + cdef cudaEglStreamConnection conn = cudaEglStreamConnection() + with nogil: + err = cyruntime.cudaEGLStreamProducerConnect(conn._pvt_ptr, cyeglStream, cywidth, cyheight) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], conn) + +@cython.embedsignature(True) +def cudaEGLStreamProducerDisconnect(conn): + """ Disconnect CUDA as a producer to EGLStream . + + Disconnect CUDA as a producer to EGLStreamKHR. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Conection to disconnect. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaEGLStreamProducerConnect`, :py:obj:`~.cudaEGLStreamProducerPresentFrame`, :py:obj:`~.cudaEGLStreamProducerReturnFrame`, :py:obj:`~.cuEGLStreamProducerDisconnect` + """ + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cyruntime.cudaEGLStreamProducerDisconnect(cyconn) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEGLStreamProducerPresentFrame(conn, eglframe not None : cudaEglFrame, pStream): + """ Present a CUDA eglFrame to the EGLStream with CUDA as a producer. + + The :py:obj:`~.cudaEglFrame` is defined as: + + **View CUDA Toolkit Documentation for a C++ code example** + + For :py:obj:`~.cudaEglFrame` of type :py:obj:`~.cudaEglFrameTypePitch`, + the application may present sub-region of a memory allocation. In that + case, :py:obj:`~.cudaPitchedPtr.ptr` will specify the start address of + the sub-region in the allocation and :py:obj:`~.cudaEglPlaneDesc` will + specify the dimensions of the sub-region. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Connection on which to present the CUDA array + eglframe : :py:obj:`~.cudaEglFrame` + CUDA Eglstream Proucer Frame handle to be sent to the consumer over + EglStream. + pStream : :py:obj:`~.cudaStream_t` + CUDA stream on which to present the frame. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaEGLStreamProducerConnect`, :py:obj:`~.cudaEGLStreamProducerDisconnect`, :py:obj:`~.cudaEGLStreamProducerReturnFrame`, :py:obj:`~.cuEGLStreamProducerPresentFrame` + """ + cdef cyruntime.cudaStream_t *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (cudaStream_t,driver.CUstream)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + with nogil: + err = cyruntime.cudaEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaEGLStreamProducerReturnFrame(conn, eglframe : Optional[cudaEglFrame], pStream): + """ Return the CUDA eglFrame to the EGLStream last released by the consumer. + + This API can potentially return cudaErrorLaunchTimeout if the consumer + has not returned a frame to EGL stream. If timeout is returned the + application can retry. + + Parameters + ---------- + conn : :py:obj:`~.cudaEglStreamConnection` + Connection on which to present the CUDA array + eglframe : :py:obj:`~.cudaEglFrame` + CUDA Eglstream Proucer Frame handle returned from the consumer over + EglStream. + pStream : :py:obj:`~.cudaStream_t` + CUDA stream on which to return the frame. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorLaunchTimeout`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + + See Also + -------- + :py:obj:`~.cudaEGLStreamProducerConnect`, :py:obj:`~.cudaEGLStreamProducerDisconnect`, :py:obj:`~.cudaEGLStreamProducerPresentFrame`, :py:obj:`~.cuEGLStreamProducerReturnFrame` + """ + cdef cyruntime.cudaStream_t *cypStream + if pStream is None: + cypStream = NULL + elif isinstance(pStream, (cudaStream_t,driver.CUstream)): + ppStream = pStream.getPtr() + cypStream = ppStream + elif isinstance(pStream, (int)): + cypStream = pStream + else: + raise TypeError("Argument 'pStream' is not instance of type (expected , found " + str(type(pStream))) + cdef cyruntime.cudaEglStreamConnection *cyconn + if conn is None: + cyconn = NULL + elif isinstance(conn, (cudaEglStreamConnection,driver.CUeglStreamConnection)): + pconn = conn.getPtr() + cyconn = pconn + elif isinstance(conn, (int)): + cyconn = conn + else: + raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) + cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL + with nogil: + err = cyruntime.cudaEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel): + """ Get an eglFrame through which to access a registered EGL graphics resource. + + Returns in `*eglFrame` an eglFrame pointer through which the registered + graphics resource `resource` may be accessed. This API can only be + called for EGL graphics resources. + + The :py:obj:`~.cudaEglFrame` is defined as + + **View CUDA Toolkit Documentation for a C++ code example** + + Parameters + ---------- + resource : :py:obj:`~.cudaGraphicsResource_t` + Registered resource to access. + index : unsigned int + Index for cubemap surfaces. + mipLevel : unsigned int + Mipmap level for the subresource to access. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorUnknown` + eglFrame : :py:obj:`~.cudaEglFrame` + Returned eglFrame. + + See Also + -------- + :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`, :py:obj:`~.cudaGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsResourceGetMappedEglFrame` + + Notes + ----- + Note that in case of multiplanar `*eglFrame`, pitch of only first plane (unsigned int :py:obj:`~.cudaEglPlaneDesc.pitch`) is to be considered by the application. + """ + cdef cyruntime.cudaGraphicsResource_t cyresource + if resource is None: + presource = 0 + elif isinstance(resource, (cudaGraphicsResource_t,)): + presource = int(resource) + else: + presource = int(cudaGraphicsResource_t(resource)) + cyresource = presource + cdef cudaEglFrame eglFrame = cudaEglFrame() + with nogil: + err = cyruntime.cudaGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], eglFrame) + +@cython.embedsignature(True) +def cudaEventCreateFromEGLSync(eglSync, unsigned int flags): + """ Creates an event from EGLSync object. + + Creates an event *phEvent from an EGLSyncKHR eglSync with the flages + specified via `flags`. Valid flags include: + + - :py:obj:`~.cudaEventDefault`: Default event creation flag. + + - :py:obj:`~.cudaEventBlockingSync`: Specifies that the created event + should use blocking synchronization. A CPU thread that uses + :py:obj:`~.cudaEventSynchronize()` to wait on an event created with + this flag will block until the event has actually been completed. + + :py:obj:`~.cudaEventRecord` and TimingData are not supported for events + created from EGLSync. + + The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void* + EGLSyncKHR + + Parameters + ---------- + eglSync : :py:obj:`~.EGLSyncKHR` + Opaque handle to EGLSync object + flags : unsigned int + Event creation flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorMemoryAllocation` + phEvent : :py:obj:`~.cudaEvent_t` + Returns newly created event + + See Also + -------- + :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy` + """ + cdef cyruntime.EGLSyncKHR cyeglSync + if eglSync is None: + peglSync = 0 + elif isinstance(eglSync, (EGLSyncKHR,)): + peglSync = int(eglSync) + else: + peglSync = int(EGLSyncKHR(eglSync)) + cyeglSync = peglSync + cdef cudaEvent_t phEvent = cudaEvent_t() + with nogil: + err = cyruntime.cudaEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], phEvent) + +@cython.embedsignature(True) +def cudaProfilerStart(): + """ Enable profiling. + + Enables profile collection by the active profiling tool for the current + context. If profiling is already enabled, then + :py:obj:`~.cudaProfilerStart()` has no effect. + + cudaProfilerStart and cudaProfilerStop APIs are used to + programmatically control the profiling granularity by allowing + profiling to be done only on selective pieces of code. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + + See Also + -------- + :py:obj:`~.cudaProfilerStop`, :py:obj:`~.cuProfilerStart` + """ + with nogil: + err = cyruntime.cudaProfilerStart() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaProfilerStop(): + """ Disable profiling. + + Disables profile collection by the active profiling tool for the + current context. If profiling is already disabled, then + :py:obj:`~.cudaProfilerStop()` has no effect. + + cudaProfilerStart and cudaProfilerStop APIs are used to + programmatically control the profiling granularity by allowing + profiling to be done only on selective pieces of code. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + + See Also + -------- + :py:obj:`~.cudaProfilerStart`, :py:obj:`~.cuProfilerStop` + """ + with nogil: + err = cyruntime.cudaProfilerStop() + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : cudaGLDeviceList): + """ Gets the CUDA devices associated with the current OpenGL context. + + Returns in `*pCudaDeviceCount` the number of CUDA-compatible devices + corresponding to the current OpenGL context. Also returns in + `*pCudaDevices` at most `cudaDeviceCount` of the CUDA-compatible + devices corresponding to the current OpenGL context. If any of the GPUs + being used by the current OpenGL context are not CUDA capable then the + call will return cudaErrorNoDevice. + + Parameters + ---------- + cudaDeviceCount : unsigned int + The size of the output device array `pCudaDevices` + deviceList : cudaGLDeviceList + The set of devices to return. This set may be cudaGLDeviceListAll + for all devices, cudaGLDeviceListCurrentFrame for the devices used + to render the current frame (in SLI), or cudaGLDeviceListNextFrame + for the devices used to render the next frame (in SLI). + + Returns + ------- + cudaError_t + cudaSuccess + cudaErrorNoDevice + cudaErrorInvalidGraphicsContext + cudaErrorUnknown + pCudaDeviceCount : unsigned int + Returned number of CUDA devices corresponding to the current OpenGL + context + pCudaDevices : list[int] + Returned CUDA devices corresponding to the current OpenGL context + + See Also + -------- + ~.cudaGraphicsUnregisterResource + ~.cudaGraphicsMapResources + ~.cudaGraphicsSubResourceGetMappedArray + ~.cudaGraphicsResourceGetMappedPointer + ~.cuGLGetDevices + + Notes + ----- + This function is not supported on Mac OS X. + + """ + cdef unsigned int pCudaDeviceCount = 0 + cdef int* cypCudaDevices = NULL + pypCudaDevices = [] + if cudaDeviceCount != 0: + cypCudaDevices = calloc(cudaDeviceCount, sizeof(int)) + if cypCudaDevices is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(cudaDeviceCount) + 'x' + str(sizeof(int))) + cdef cyruntime.cudaGLDeviceList cydeviceList = deviceList.value + with nogil: + err = cyruntime.cudaGLGetDevices(&pCudaDeviceCount, cypCudaDevices, cudaDeviceCount, cydeviceList) + if cudaError_t(err) == cudaError_t(0): + pypCudaDevices = [cypCudaDevices[idx] for idx in range(cudaDeviceCount)] + if cypCudaDevices is not NULL: + free(cypCudaDevices) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None, None) + return (_dict_cudaError_t[err], pCudaDeviceCount, pypCudaDevices) + +@cython.embedsignature(True) +def cudaGraphicsGLRegisterImage(image, target, unsigned int flags): + """ Register an OpenGL texture or renderbuffer object. + + Registers the texture or renderbuffer object specified by `image` for + access by CUDA. A handle to the registered object is returned as + `resource`. + + `target` must match the type of the object, and must be one of + :py:obj:`~.GL_TEXTURE_2D`, :py:obj:`~.GL_TEXTURE_RECTANGLE`, + :py:obj:`~.GL_TEXTURE_CUBE_MAP`, :py:obj:`~.GL_TEXTURE_3D`, + :py:obj:`~.GL_TEXTURE_2D_ARRAY`, or :py:obj:`~.GL_RENDERBUFFER`. + + The register flags `flags` specify the intended usage, as follows: + + - :py:obj:`~.cudaGraphicsRegisterFlagsNone`: Specifies no hints about + how this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.cudaGraphicsRegisterFlagsReadOnly`: Specifies that CUDA + will not write to this resource. + + - :py:obj:`~.cudaGraphicsRegisterFlagsWriteDiscard`: Specifies that + CUDA will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + - :py:obj:`~.cudaGraphicsRegisterFlagsSurfaceLoadStore`: Specifies that + CUDA will bind this resource to a surface reference. + + - :py:obj:`~.cudaGraphicsRegisterFlagsTextureGather`: Specifies that + CUDA will perform texture gather operations on this resource. + + The following image formats are supported. For brevity's sake, the list + is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the + following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} : + + - GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, + GL_INTENSITY + + - {GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I, + 32I} + + - {GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY} X {8, 16, + 16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT, + 32I_EXT} + + The following image classes are currently disallowed: + + - Textures with borders + + - Multisampled renderbuffers + + Parameters + ---------- + image : :py:obj:`~.GLuint` + name of texture or renderbuffer object to be registered + target : :py:obj:`~.GLenum` + Identifies the type of object specified by `image` + flags : unsigned int + Register flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorOperatingSystem`, :py:obj:`~.cudaErrorUnknown` + resource : :py:obj:`~.cudaGraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cudaGraphicsUnregisterResource`, :py:obj:`~.cudaGraphicsMapResources`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuGraphicsGLRegisterImage` + """ + cdef cyruntime.GLenum cytarget + if target is None: + ptarget = 0 + elif isinstance(target, (GLenum,)): + ptarget = int(target) + else: + ptarget = int(GLenum(target)) + cytarget = ptarget + cdef cyruntime.GLuint cyimage + if image is None: + pimage = 0 + elif isinstance(image, (GLuint,)): + pimage = int(image) + else: + pimage = int(GLuint(image)) + cyimage = pimage + cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() + with nogil: + err = cyruntime.cudaGraphicsGLRegisterImage(resource._pvt_ptr, cyimage, cytarget, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], resource) + +@cython.embedsignature(True) +def cudaGraphicsGLRegisterBuffer(buffer, unsigned int flags): + """ Registers an OpenGL buffer object. + + Registers the buffer object specified by `buffer` for access by CUDA. A + handle to the registered object is returned as `resource`. The register + flags `flags` specify the intended usage, as follows: + + - :py:obj:`~.cudaGraphicsRegisterFlagsNone`: Specifies no hints about + how this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.cudaGraphicsRegisterFlagsReadOnly`: Specifies that CUDA + will not write to this resource. + + - :py:obj:`~.cudaGraphicsRegisterFlagsWriteDiscard`: Specifies that + CUDA will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + Parameters + ---------- + buffer : :py:obj:`~.GLuint` + name of buffer object to be registered + flags : unsigned int + Register flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorOperatingSystem`, :py:obj:`~.cudaErrorUnknown` + resource : :py:obj:`~.cudaGraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cudaGraphicsUnregisterResource`, :py:obj:`~.cudaGraphicsMapResources`, :py:obj:`~.cudaGraphicsResourceGetMappedPointer`, :py:obj:`~.cuGraphicsGLRegisterBuffer` + """ + cdef cyruntime.GLuint cybuffer + if buffer is None: + pbuffer = 0 + elif isinstance(buffer, (GLuint,)): + pbuffer = int(buffer) + else: + pbuffer = int(GLuint(buffer)) + cybuffer = pbuffer + cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() + with nogil: + err = cyruntime.cudaGraphicsGLRegisterBuffer(resource._pvt_ptr, cybuffer, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], resource) + +@cython.embedsignature(True) +def cudaVDPAUGetDevice(vdpDevice, vdpGetProcAddress): + """ Gets the CUDA device associated with a VdpDevice. + + Returns the CUDA device associated with a VdpDevice, if applicable. + + Parameters + ---------- + vdpDevice : :py:obj:`~.VdpDevice` + A VdpDevice handle + vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress` + VDPAU's VdpGetProcAddress function pointer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` + device : int + Returns the device associated with vdpDevice, or -1 if the device + associated with vdpDevice is not a compute device. + + See Also + -------- + :py:obj:`~.cudaVDPAUSetVDPAUDevice`, :py:obj:`~.cuVDPAUGetDevice` + """ + cdef cyruntime.VdpGetProcAddress *cyvdpGetProcAddress + if vdpGetProcAddress is None: + cyvdpGetProcAddress = NULL + elif isinstance(vdpGetProcAddress, (VdpGetProcAddress,)): + pvdpGetProcAddress = vdpGetProcAddress.getPtr() + cyvdpGetProcAddress = pvdpGetProcAddress + elif isinstance(vdpGetProcAddress, (int)): + cyvdpGetProcAddress = vdpGetProcAddress + else: + raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected , found " + str(type(vdpGetProcAddress))) + cdef cyruntime.VdpDevice cyvdpDevice + if vdpDevice is None: + pvdpDevice = 0 + elif isinstance(vdpDevice, (VdpDevice,)): + pvdpDevice = int(vdpDevice) + else: + pvdpDevice = int(VdpDevice(vdpDevice)) + cyvdpDevice = pvdpDevice + cdef int device = 0 + with nogil: + err = cyruntime.cudaVDPAUGetDevice(&device, cyvdpDevice, cyvdpGetProcAddress) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], device) + +@cython.embedsignature(True) +def cudaVDPAUSetVDPAUDevice(int device, vdpDevice, vdpGetProcAddress): + """ Sets a CUDA device to use VDPAU interoperability. + + Records `vdpDevice` as the VdpDevice for VDPAU interoperability with + the CUDA device `device` and sets `device` as the current device for + the calling host thread. + + This function will immediately initialize the primary context on + `device` if needed. + + If `device` has already been initialized then this call will fail with + the error :py:obj:`~.cudaErrorSetOnActiveProcess`. In this case it is + necessary to reset `device` using :py:obj:`~.cudaDeviceReset()` before + VDPAU interoperability on `device` may be enabled. + + Parameters + ---------- + device : int + Device to use for VDPAU interoperability + vdpDevice : :py:obj:`~.VdpDevice` + The VdpDevice to interoperate with + vdpGetProcAddress : :py:obj:`~.VdpGetProcAddress` + VDPAU's VdpGetProcAddress function pointer + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorSetOnActiveProcess` + + See Also + -------- + :py:obj:`~.cudaGraphicsVDPAURegisterVideoSurface`, :py:obj:`~.cudaGraphicsVDPAURegisterOutputSurface`, :py:obj:`~.cudaDeviceReset` + """ + cdef cyruntime.VdpGetProcAddress *cyvdpGetProcAddress + if vdpGetProcAddress is None: + cyvdpGetProcAddress = NULL + elif isinstance(vdpGetProcAddress, (VdpGetProcAddress,)): + pvdpGetProcAddress = vdpGetProcAddress.getPtr() + cyvdpGetProcAddress = pvdpGetProcAddress + elif isinstance(vdpGetProcAddress, (int)): + cyvdpGetProcAddress = vdpGetProcAddress + else: + raise TypeError("Argument 'vdpGetProcAddress' is not instance of type (expected , found " + str(type(vdpGetProcAddress))) + cdef cyruntime.VdpDevice cyvdpDevice + if vdpDevice is None: + pvdpDevice = 0 + elif isinstance(vdpDevice, (VdpDevice,)): + pvdpDevice = int(vdpDevice) + else: + pvdpDevice = int(VdpDevice(vdpDevice)) + cyvdpDevice = pvdpDevice + with nogil: + err = cyruntime.cudaVDPAUSetVDPAUDevice(device, cyvdpDevice, cyvdpGetProcAddress) + return (_dict_cudaError_t[err],) + +@cython.embedsignature(True) +def cudaGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): + """ Register a VdpVideoSurface object. + + Registers the VdpVideoSurface specified by `vdpSurface` for access by + CUDA. A handle to the registered object is returned as `resource`. The + surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.cudaGraphicsMapFlagsNone`: Specifies no hints about how + this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.cudaGraphicsMapFlagsReadOnly`: Specifies that CUDA will + not write to this resource. + + - :py:obj:`~.cudaGraphicsMapFlagsWriteDiscard`: Specifies that CUDA + will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + Parameters + ---------- + vdpSurface : :py:obj:`~.VdpVideoSurface` + VDPAU object to be registered + flags : unsigned int + Map flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + resource : :py:obj:`~.cudaGraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cudaVDPAUSetVDPAUDevice`, :py:obj:`~.cudaGraphicsUnregisterResource`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuGraphicsVDPAURegisterVideoSurface` + """ + cdef cyruntime.VdpVideoSurface cyvdpSurface + if vdpSurface is None: + pvdpSurface = 0 + elif isinstance(vdpSurface, (VdpVideoSurface,)): + pvdpSurface = int(vdpSurface) + else: + pvdpSurface = int(VdpVideoSurface(vdpSurface)) + cyvdpSurface = pvdpSurface + cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() + with nogil: + err = cyruntime.cudaGraphicsVDPAURegisterVideoSurface(resource._pvt_ptr, cyvdpSurface, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], resource) + +@cython.embedsignature(True) +def cudaGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): + """ Register a VdpOutputSurface object. + + Registers the VdpOutputSurface specified by `vdpSurface` for access by + CUDA. A handle to the registered object is returned as `resource`. The + surface's intended usage is specified using `flags`, as follows: + + - :py:obj:`~.cudaGraphicsMapFlagsNone`: Specifies no hints about how + this resource will be used. It is therefore assumed that this + resource will be read from and written to by CUDA. This is the + default value. + + - :py:obj:`~.cudaGraphicsMapFlagsReadOnly`: Specifies that CUDA will + not write to this resource. + + - :py:obj:`~.cudaGraphicsMapFlagsWriteDiscard`: Specifies that CUDA + will not read from this resource and will write over the entire + contents of the resource, so none of the data previously stored in + the resource will be preserved. + + Parameters + ---------- + vdpSurface : :py:obj:`~.VdpOutputSurface` + VDPAU object to be registered + flags : unsigned int + Map flags + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorUnknown` + resource : :py:obj:`~.cudaGraphicsResource` + Pointer to the returned object handle + + See Also + -------- + :py:obj:`~.cudaVDPAUSetVDPAUDevice`, :py:obj:`~.cudaGraphicsUnregisterResource`, :py:obj:`~.cudaGraphicsSubResourceGetMappedArray`, :py:obj:`~.cuGraphicsVDPAURegisterOutputSurface` + """ + cdef cyruntime.VdpOutputSurface cyvdpSurface + if vdpSurface is None: + pvdpSurface = 0 + elif isinstance(vdpSurface, (VdpOutputSurface,)): + pvdpSurface = int(vdpSurface) + else: + pvdpSurface = int(VdpOutputSurface(vdpSurface)) + cyvdpSurface = pvdpSurface + cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() + with nogil: + err = cyruntime.cudaGraphicsVDPAURegisterOutputSurface(resource._pvt_ptr, cyvdpSurface, flags) + if err != cyruntime.cudaSuccess: + return (_dict_cudaError_t[err], None) + return (_dict_cudaError_t[err], resource) + + +@cython.embedsignature(True) +def getLocalRuntimeVersion(): + """ Returns the CUDA Runtime version of local shared library. + + Returns in `*runtimeVersion` the version number of the current CUDA + Runtime instance. The version is returned as (1000 * major + 10 * + minor). For example, CUDA 9.2 would be represented by 9020. + + As of CUDA 12.0, this function no longer initializes CUDA. The purpose + of this API is solely to return a compile-time constant stating the + CUDA Toolkit version in the above format. + + This function automatically returns :py:obj:`~.cudaErrorInvalidValue` + if the `runtimeVersion` argument is NULL. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + runtimeVersion : int + Returns the CUDA Runtime version. + + See Also + -------- + :py:obj:`~.cudaDriverGetVersion`, :py:obj:`~.cuDriverGetVersion` + """ + cdef int runtimeVersion = 0 + err = cyruntime.getLocalRuntimeVersion(&runtimeVersion) + return (cudaError_t(err), runtimeVersion) + + +cdef class cudaBindingsRuntimeGlobal: + cdef map[void_ptr, void*] _allocated + + def __dealloc__(self): + for item in self._allocated: + free(item.second) + self._allocated.clear() + +cdef cudaBindingsRuntimeGlobal m_global = cudaBindingsRuntimeGlobal() + + +@cython.embedsignature(True) +def sizeof(objType): + """ Returns the size of provided CUDA Python structure in bytes + + Parameters + ---------- + objType : Any + CUDA Python object + + Returns + ------- + lowered_name : int + The size of `objType` in bytes + """ + if objType == dim3: + return sizeof(cyruntime.dim3) + if objType == cudaChannelFormatDesc: + return sizeof(cyruntime.cudaChannelFormatDesc) + if objType == cudaArray_t: + return sizeof(cyruntime.cudaArray_t) + if objType == cudaArray_const_t: + return sizeof(cyruntime.cudaArray_const_t) + if objType == cudaMipmappedArray_t: + return sizeof(cyruntime.cudaMipmappedArray_t) + if objType == cudaMipmappedArray_const_t: + return sizeof(cyruntime.cudaMipmappedArray_const_t) + if objType == cudaArraySparseProperties: + return sizeof(cyruntime.cudaArraySparseProperties) + if objType == cudaArrayMemoryRequirements: + return sizeof(cyruntime.cudaArrayMemoryRequirements) + if objType == cudaPitchedPtr: + return sizeof(cyruntime.cudaPitchedPtr) + if objType == cudaExtent: + return sizeof(cyruntime.cudaExtent) + if objType == cudaPos: + return sizeof(cyruntime.cudaPos) + if objType == cudaMemcpy3DParms: + return sizeof(cyruntime.cudaMemcpy3DParms) + if objType == cudaMemcpyNodeParams: + return sizeof(cyruntime.cudaMemcpyNodeParams) + if objType == cudaMemcpy3DPeerParms: + return sizeof(cyruntime.cudaMemcpy3DPeerParms) + if objType == cudaMemsetParams: + return sizeof(cyruntime.cudaMemsetParams) + if objType == cudaMemsetParamsV2: + return sizeof(cyruntime.cudaMemsetParamsV2) + if objType == cudaAccessPolicyWindow: + return sizeof(cyruntime.cudaAccessPolicyWindow) + if objType == cudaHostFn_t: + return sizeof(cyruntime.cudaHostFn_t) + if objType == cudaHostNodeParams: + return sizeof(cyruntime.cudaHostNodeParams) + if objType == cudaHostNodeParamsV2: + return sizeof(cyruntime.cudaHostNodeParamsV2) + if objType == cudaResourceDesc: + return sizeof(cyruntime.cudaResourceDesc) + if objType == cudaResourceViewDesc: + return sizeof(cyruntime.cudaResourceViewDesc) + if objType == cudaPointerAttributes: + return sizeof(cyruntime.cudaPointerAttributes) + if objType == cudaFuncAttributes: + return sizeof(cyruntime.cudaFuncAttributes) + if objType == cudaMemLocation: + return sizeof(cyruntime.cudaMemLocation) + if objType == cudaMemAccessDesc: + return sizeof(cyruntime.cudaMemAccessDesc) + if objType == cudaMemPoolProps: + return sizeof(cyruntime.cudaMemPoolProps) + if objType == cudaMemPoolPtrExportData: + return sizeof(cyruntime.cudaMemPoolPtrExportData) + if objType == cudaMemAllocNodeParams: + return sizeof(cyruntime.cudaMemAllocNodeParams) + if objType == cudaMemAllocNodeParamsV2: + return sizeof(cyruntime.cudaMemAllocNodeParamsV2) + if objType == cudaMemFreeNodeParams: + return sizeof(cyruntime.cudaMemFreeNodeParams) + if objType == cudaMemcpyAttributes: + return sizeof(cyruntime.cudaMemcpyAttributes) + if objType == cudaOffset3D: + return sizeof(cyruntime.cudaOffset3D) + if objType == cudaMemcpy3DOperand: + return sizeof(cyruntime.cudaMemcpy3DOperand) + if objType == cudaMemcpy3DBatchOp: + return sizeof(cyruntime.cudaMemcpy3DBatchOp) + if objType == CUuuid_st: + return sizeof(cyruntime.CUuuid_st) + if objType == CUuuid: + return sizeof(cyruntime.CUuuid) + if objType == cudaUUID_t: + return sizeof(cyruntime.cudaUUID_t) + if objType == cudaDeviceProp: + return sizeof(cyruntime.cudaDeviceProp) + if objType == cudaIpcEventHandle_st: + return sizeof(cyruntime.cudaIpcEventHandle_st) + if objType == cudaIpcEventHandle_t: + return sizeof(cyruntime.cudaIpcEventHandle_t) + if objType == cudaIpcMemHandle_st: + return sizeof(cyruntime.cudaIpcMemHandle_st) + if objType == cudaIpcMemHandle_t: + return sizeof(cyruntime.cudaIpcMemHandle_t) + if objType == cudaMemFabricHandle_st: + return sizeof(cyruntime.cudaMemFabricHandle_st) + if objType == cudaMemFabricHandle_t: + return sizeof(cyruntime.cudaMemFabricHandle_t) + if objType == cudaExternalMemoryHandleDesc: + return sizeof(cyruntime.cudaExternalMemoryHandleDesc) + if objType == cudaExternalMemoryBufferDesc: + return sizeof(cyruntime.cudaExternalMemoryBufferDesc) + if objType == cudaExternalMemoryMipmappedArrayDesc: + return sizeof(cyruntime.cudaExternalMemoryMipmappedArrayDesc) + if objType == cudaExternalSemaphoreHandleDesc: + return sizeof(cyruntime.cudaExternalSemaphoreHandleDesc) + if objType == cudaExternalSemaphoreSignalParams: + return sizeof(cyruntime.cudaExternalSemaphoreSignalParams) + if objType == cudaExternalSemaphoreWaitParams: + return sizeof(cyruntime.cudaExternalSemaphoreWaitParams) + if objType == cudaStream_t: + return sizeof(cyruntime.cudaStream_t) + if objType == cudaEvent_t: + return sizeof(cyruntime.cudaEvent_t) + if objType == cudaGraphicsResource_t: + return sizeof(cyruntime.cudaGraphicsResource_t) + if objType == cudaExternalMemory_t: + return sizeof(cyruntime.cudaExternalMemory_t) + if objType == cudaExternalSemaphore_t: + return sizeof(cyruntime.cudaExternalSemaphore_t) + if objType == cudaGraph_t: + return sizeof(cyruntime.cudaGraph_t) + if objType == cudaGraphNode_t: + return sizeof(cyruntime.cudaGraphNode_t) + if objType == cudaUserObject_t: + return sizeof(cyruntime.cudaUserObject_t) + if objType == cudaGraphConditionalHandle: + return sizeof(cyruntime.cudaGraphConditionalHandle) + if objType == cudaFunction_t: + return sizeof(cyruntime.cudaFunction_t) + if objType == cudaKernel_t: + return sizeof(cyruntime.cudaKernel_t) + if objType == cudalibraryHostUniversalFunctionAndDataTable: + return sizeof(cyruntime.cudalibraryHostUniversalFunctionAndDataTable) + if objType == cudaLibrary_t: + return sizeof(cyruntime.cudaLibrary_t) + if objType == cudaMemPool_t: + return sizeof(cyruntime.cudaMemPool_t) + if objType == cudaKernelNodeParams: + return sizeof(cyruntime.cudaKernelNodeParams) + if objType == cudaKernelNodeParamsV2: + return sizeof(cyruntime.cudaKernelNodeParamsV2) + if objType == cudaExternalSemaphoreSignalNodeParams: + return sizeof(cyruntime.cudaExternalSemaphoreSignalNodeParams) + if objType == cudaExternalSemaphoreSignalNodeParamsV2: + return sizeof(cyruntime.cudaExternalSemaphoreSignalNodeParamsV2) + if objType == cudaExternalSemaphoreWaitNodeParams: + return sizeof(cyruntime.cudaExternalSemaphoreWaitNodeParams) + if objType == cudaExternalSemaphoreWaitNodeParamsV2: + return sizeof(cyruntime.cudaExternalSemaphoreWaitNodeParamsV2) + if objType == cudaConditionalNodeParams: + return sizeof(cyruntime.cudaConditionalNodeParams) + if objType == cudaChildGraphNodeParams: + return sizeof(cyruntime.cudaChildGraphNodeParams) + if objType == cudaEventRecordNodeParams: + return sizeof(cyruntime.cudaEventRecordNodeParams) + if objType == cudaEventWaitNodeParams: + return sizeof(cyruntime.cudaEventWaitNodeParams) + if objType == cudaGraphNodeParams: + return sizeof(cyruntime.cudaGraphNodeParams) + if objType == cudaGraphEdgeData_st: + return sizeof(cyruntime.cudaGraphEdgeData_st) + if objType == cudaGraphEdgeData: + return sizeof(cyruntime.cudaGraphEdgeData) + if objType == cudaGraphExec_t: + return sizeof(cyruntime.cudaGraphExec_t) + if objType == cudaGraphInstantiateParams_st: + return sizeof(cyruntime.cudaGraphInstantiateParams_st) + if objType == cudaGraphInstantiateParams: + return sizeof(cyruntime.cudaGraphInstantiateParams) + if objType == cudaGraphExecUpdateResultInfo_st: + return sizeof(cyruntime.cudaGraphExecUpdateResultInfo_st) + if objType == cudaGraphExecUpdateResultInfo: + return sizeof(cyruntime.cudaGraphExecUpdateResultInfo) + if objType == cudaGraphDeviceNode_t: + return sizeof(cyruntime.cudaGraphDeviceNode_t) + if objType == cudaGraphKernelNodeUpdate: + return sizeof(cyruntime.cudaGraphKernelNodeUpdate) + if objType == cudaLaunchMemSyncDomainMap_st: + return sizeof(cyruntime.cudaLaunchMemSyncDomainMap_st) + if objType == cudaLaunchMemSyncDomainMap: + return sizeof(cyruntime.cudaLaunchMemSyncDomainMap) + if objType == cudaLaunchAttributeValue: + return sizeof(cyruntime.cudaLaunchAttributeValue) + if objType == cudaLaunchAttribute_st: + return sizeof(cyruntime.cudaLaunchAttribute_st) + if objType == cudaLaunchAttribute: + return sizeof(cyruntime.cudaLaunchAttribute) + if objType == cudaAsyncCallbackHandle_t: + return sizeof(cyruntime.cudaAsyncCallbackHandle_t) + if objType == cudaAsyncNotificationInfo: + return sizeof(cyruntime.cudaAsyncNotificationInfo) + if objType == cudaAsyncNotificationInfo_t: + return sizeof(cyruntime.cudaAsyncNotificationInfo_t) + if objType == cudaAsyncCallback: + return sizeof(cyruntime.cudaAsyncCallback) + if objType == cudaSurfaceObject_t: + return sizeof(cyruntime.cudaSurfaceObject_t) + if objType == cudaTextureDesc: + return sizeof(cyruntime.cudaTextureDesc) + if objType == cudaTextureObject_t: + return sizeof(cyruntime.cudaTextureObject_t) + if objType == cudaStreamCallback_t: + return sizeof(cyruntime.cudaStreamCallback_t) + if objType == GLenum: + return sizeof(cyruntime.GLenum) + if objType == GLuint: + return sizeof(cyruntime.GLuint) + if objType == EGLImageKHR: + return sizeof(cyruntime.EGLImageKHR) + if objType == EGLStreamKHR: + return sizeof(cyruntime.EGLStreamKHR) + if objType == EGLint: + return sizeof(cyruntime.EGLint) + if objType == EGLSyncKHR: + return sizeof(cyruntime.EGLSyncKHR) + if objType == VdpDevice: + return sizeof(cyruntime.VdpDevice) + if objType == VdpGetProcAddress: + return sizeof(cyruntime.VdpGetProcAddress) + if objType == VdpVideoSurface: + return sizeof(cyruntime.VdpVideoSurface) + if objType == VdpOutputSurface: + return sizeof(cyruntime.VdpOutputSurface) + if objType == cudaStreamAttrValue: + return sizeof(cyruntime.cudaStreamAttrValue) + if objType == cudaKernelNodeAttrValue: + return sizeof(cyruntime.cudaKernelNodeAttrValue) + if objType == cudaEglPlaneDesc_st: + return sizeof(cyruntime.cudaEglPlaneDesc_st) + if objType == cudaEglPlaneDesc: + return sizeof(cyruntime.cudaEglPlaneDesc) + if objType == cudaEglFrame_st: + return sizeof(cyruntime.cudaEglFrame_st) + if objType == cudaEglFrame: + return sizeof(cyruntime.cudaEglFrame) + if objType == cudaEglStreamConnection: + return sizeof(cyruntime.cudaEglStreamConnection) + raise TypeError("Unknown type: " + str(objType)) + +cdef int _add_native_handle_getters() except?-1: + from cuda.bindings.utils import _add_cuda_native_handle_getter + def cudaArray_t_getter(cudaArray_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaArray_t, cudaArray_t_getter) + def cudaArray_const_t_getter(cudaArray_const_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaArray_const_t, cudaArray_const_t_getter) + def cudaMipmappedArray_t_getter(cudaMipmappedArray_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaMipmappedArray_t, cudaMipmappedArray_t_getter) + def cudaMipmappedArray_const_t_getter(cudaMipmappedArray_const_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaMipmappedArray_const_t, cudaMipmappedArray_const_t_getter) + def cudaStream_t_getter(cudaStream_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaStream_t, cudaStream_t_getter) + def cudaEvent_t_getter(cudaEvent_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaEvent_t, cudaEvent_t_getter) + def cudaGraphicsResource_t_getter(cudaGraphicsResource_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaGraphicsResource_t, cudaGraphicsResource_t_getter) + def cudaExternalMemory_t_getter(cudaExternalMemory_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaExternalMemory_t, cudaExternalMemory_t_getter) + def cudaExternalSemaphore_t_getter(cudaExternalSemaphore_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaExternalSemaphore_t, cudaExternalSemaphore_t_getter) + def cudaGraph_t_getter(cudaGraph_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaGraph_t, cudaGraph_t_getter) + def cudaGraphNode_t_getter(cudaGraphNode_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaGraphNode_t, cudaGraphNode_t_getter) + def cudaUserObject_t_getter(cudaUserObject_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaUserObject_t, cudaUserObject_t_getter) + def cudaFunction_t_getter(cudaFunction_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaFunction_t, cudaFunction_t_getter) + def cudaKernel_t_getter(cudaKernel_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaKernel_t, cudaKernel_t_getter) + def cudaLibrary_t_getter(cudaLibrary_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaLibrary_t, cudaLibrary_t_getter) + def cudaMemPool_t_getter(cudaMemPool_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaMemPool_t, cudaMemPool_t_getter) + def cudaGraphExec_t_getter(cudaGraphExec_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaGraphExec_t, cudaGraphExec_t_getter) + def cudaGraphDeviceNode_t_getter(cudaGraphDeviceNode_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaGraphDeviceNode_t, cudaGraphDeviceNode_t_getter) + def cudaAsyncCallbackHandle_t_getter(cudaAsyncCallbackHandle_t x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaAsyncCallbackHandle_t, cudaAsyncCallbackHandle_t_getter) + def EGLImageKHR_getter(EGLImageKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLImageKHR, EGLImageKHR_getter) + def EGLStreamKHR_getter(EGLStreamKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLStreamKHR, EGLStreamKHR_getter) + def EGLSyncKHR_getter(EGLSyncKHR x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(EGLSyncKHR, EGLSyncKHR_getter) + def cudaEglStreamConnection_getter(cudaEglStreamConnection x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(cudaEglStreamConnection, cudaEglStreamConnection_getter) + return 0 +_add_native_handle_getters() + diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f9288b81e400cc115fdc36b4660203a02f1ea2b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__init__.py @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +from typing import Any, Callable + +from ._ptx_utils import get_minimal_required_cuda_ver_from_ptx_ver, get_ptx_ver + +_handle_getters: dict[type, Callable[[Any], int]] = {} + + +def _add_cuda_native_handle_getter(t: type, getter: Callable[[Any], int]) -> None: + _handle_getters[t] = getter + + +def get_cuda_native_handle(obj: Any) -> int: + """Returns the address of the provided CUDA Python object as a Python int. + + Parameters + ---------- + obj : Any + CUDA Python object + + Returns + ------- + int : The object address. + """ + obj_type = type(obj) + try: + return _handle_getters[obj_type](obj) + except KeyError: + raise TypeError("Unknown type: " + str(obj_type)) from None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c84808579ff8aa9a51f40caf03b42889c2f6b3f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..286b628f5097f1676b18d6972e92bf1739095b3e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/__pycache__/_ptx_utils.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..d303d5980bc4575d974afef017dcd13262e7424c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/bindings/utils/_ptx_utils.py @@ -0,0 +1,131 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +import re + +# Mapping based on the official PTX ISA <-> CUDA Release table +# https://docs.nvidia.com/cuda/parallel-thread-execution/#release-notes-ptx-release-history +_ptx_to_cuda = { + "1.0": (1, 0), + "1.1": (1, 1), + "1.2": (2, 0), + "1.3": (2, 1), + "1.4": (2, 2), + "2.0": (3, 0), + "2.1": (3, 1), + "2.2": (3, 2), + "2.3": (4, 0), + "3.0": (4, 1), + "3.1": (5, 0), + "3.2": (5, 5), + "4.0": (6, 0), + "4.1": (6, 5), + "4.2": (7, 0), + "4.3": (7, 5), + "5.0": (8, 0), + "6.0": (9, 0), + "6.1": (9, 1), + "6.2": (9, 2), + "6.3": (10, 0), + "6.4": (10, 1), + "6.5": (10, 2), + "7.0": (11, 0), + "7.1": (11, 1), + "7.2": (11, 2), + "7.3": (11, 3), + "7.4": (11, 4), + "7.5": (11, 5), + "7.6": (11, 6), + "7.7": (11, 7), + "7.8": (11, 8), + "8.0": (12, 0), + "8.1": (12, 1), + "8.2": (12, 2), + "8.3": (12, 3), + "8.4": (12, 4), + "8.5": (12, 5), + "8.6": (12, 7), + "8.7": (12, 8), + "8.8": (12, 9), +} + + +def get_minimal_required_cuda_ver_from_ptx_ver(ptx_version: str) -> int: + """ + Maps the PTX ISA version to the minimal CUDA driver, nvPTXCompiler, or nvJitLink version + that is needed to load a PTX of the given ISA version. + + Parameters + ---------- + ptx_version : str + PTX ISA version as a string, e.g. "8.8" for PTX ISA 8.8. This is the ``.version`` + directive in the PTX header. + + Returns + ------- + int + Minimal CUDA version as 1000 * major + 10 * minor, e.g. 12090 for CUDA 12.9. + + Raises + ------ + ValueError + If the PTX version is unknown. + + Examples + -------- + >>> get_minimal_required_driver_ver_from_ptx_ver("8.8") + 12090 + >>> get_minimal_required_driver_ver_from_ptx_ver("7.0") + 11000 + """ + try: + major, minor = _ptx_to_cuda[ptx_version] + return 1000 * major + 10 * minor + except KeyError: + raise ValueError(f"Unknown or unsupported PTX ISA version: {ptx_version}") from None + + +# Regex pattern to match .version directive and capture the version number +# TODO: if import speed is a concern, consider lazy-initializing it. +_ptx_ver_pattern = re.compile(r"\.version\s+([0-9]+\.[0-9]+)") + + +def get_ptx_ver(ptx: str) -> str: + """ + Extract the PTX ISA version string from PTX source code. + + Parameters + ---------- + ptx : str + The PTX assembly source code as a string. + + Returns + ------- + str + The PTX ISA version string, e.g., "8.8". + + Raises + ------ + ValueError + If the .version directive is not found in the PTX source. + + Examples + -------- + >>> ptx = r''' + ... .version 8.8 + ... .target sm_86 + ... .address_size 64 + ... + ... .visible .entry test_kernel() + ... { + ... ret; + ... } + ... ''' + >>> get_ptx_ver(ptx) + '8.8' + """ + m = _ptx_ver_pattern.search(ptx) + if m: + return m.group(1) + else: + raise ValueError("No .version directive found in PTX source. Is it a valid PTX?") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53f2527c71bd14403a5cae2d9ff51a3296b071b7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__init__.py @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError as DynamicLibNotFoundError +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL as LoadedDL +from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import load_nvidia_dynamic_lib as load_nvidia_dynamic_lib +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ( + SUPPORTED_LIBNAMES as SUPPORTED_NVIDIA_LIBNAMES, # noqa: F401 +) +from cuda.pathfinder._headers.find_nvidia_headers import ( + find_nvidia_header_directory as _find_nvidia_header_directory, # noqa: F401 +) +from cuda.pathfinder._version import __version__ as __version__ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..537a30dbe85afe9f93b91cf5983edee7168bf109 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fded593da26949df1fe9c24b5c16701e4c93731b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/__pycache__/_version.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/find_nvidia_dynamic_lib.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/find_nvidia_dynamic_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6354642015a3c276eafa53fb269cb6ced5251e77 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/find_nvidia_dynamic_lib.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d02b57002946ff311ad9f367c2a72108226695f1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_common.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1efde0960250affb63c53318f5bdf5a380d1c9f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_linux.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5803ad171bcea423fae910b2c3b5f2891033c00c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_dl_windows.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e84737559580e198f151e472425ff1a2fbfc6641 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/load_nvidia_dynamic_lib.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83e8734b5c3b29a80f4392a8f7599a9bd1037a34 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/__pycache__/supported_nvidia_libs.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/find_nvidia_dynamic_lib.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/find_nvidia_dynamic_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..18708a2b3ebba0aa6e706018e659041a6186136e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/find_nvidia_dynamic_lib.py @@ -0,0 +1,204 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import glob +import os +from collections.abc import Sequence +from typing import Optional + +from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ( + IS_WINDOWS, + SITE_PACKAGES_LIBDIRS_LINUX, + SITE_PACKAGES_LIBDIRS_WINDOWS, + is_suppressed_dll_file, +) +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs, find_sub_dirs_all_sitepackages + + +def _no_such_file_in_sub_dirs( + sub_dirs: Sequence[str], file_wild: str, error_messages: list[str], attachments: list[str] +) -> None: + error_messages.append(f"No such file: {file_wild}") + for sub_dir in find_sub_dirs_all_sitepackages(sub_dirs): + attachments.append(f' listdir("{sub_dir}"):') + for node in sorted(os.listdir(sub_dir)): + attachments.append(f" {node}") + + +def _find_so_using_nvidia_lib_dirs( + libname: str, so_basename: str, error_messages: list[str], attachments: list[str] +) -> Optional[str]: + rel_dirs = SITE_PACKAGES_LIBDIRS_LINUX.get(libname) + if rel_dirs is not None: + sub_dirs_searched = [] + file_wild = so_basename + "*" + for rel_dir in rel_dirs: + sub_dir = tuple(rel_dir.split(os.path.sep)) + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + # First look for an exact match + so_name = os.path.join(abs_dir, so_basename) + if os.path.isfile(so_name): + return so_name + # Look for a versioned library + # Using sort here mainly to make the result deterministic. + for so_name in sorted(glob.glob(os.path.join(abs_dir, file_wild))): + if os.path.isfile(so_name): + return so_name + sub_dirs_searched.append(sub_dir) + for sub_dir in sub_dirs_searched: + _no_such_file_in_sub_dirs(sub_dir, file_wild, error_messages, attachments) + return None + + +def _find_dll_under_dir(dirpath: str, file_wild: str) -> Optional[str]: + for path in sorted(glob.glob(os.path.join(dirpath, file_wild))): + if not os.path.isfile(path): + continue + if not is_suppressed_dll_file(os.path.basename(path)): + return path + return None + + +def _find_dll_using_nvidia_bin_dirs( + libname: str, lib_searched_for: str, error_messages: list[str], attachments: list[str] +) -> Optional[str]: + rel_dirs = SITE_PACKAGES_LIBDIRS_WINDOWS.get(libname) + if rel_dirs is not None: + sub_dirs_searched = [] + for rel_dir in rel_dirs: + sub_dir = tuple(rel_dir.split(os.path.sep)) + for abs_dir in find_sub_dirs_all_sitepackages(sub_dir): + dll_name = _find_dll_under_dir(abs_dir, lib_searched_for) + if dll_name is not None: + return dll_name + sub_dirs_searched.append(sub_dir) + for sub_dir in sub_dirs_searched: + _no_such_file_in_sub_dirs(sub_dir, lib_searched_for, error_messages, attachments) + return None + + +def _get_cuda_home() -> Optional[str]: + cuda_home = os.environ.get("CUDA_HOME") + if cuda_home is None: + cuda_home = os.environ.get("CUDA_PATH") + return cuda_home + + +def _find_lib_dir_using_cuda_home(libname: str) -> Optional[str]: + cuda_home = _get_cuda_home() + if cuda_home is None: + return None + subdirs_list: tuple[tuple[str, ...], ...] + if IS_WINDOWS: + if libname == "nvvm": # noqa: SIM108 + subdirs_list = ( + ("nvvm", "bin", "*"), # CTK 13 + ("nvvm", "bin"), # CTK 12 + ) + else: + subdirs_list = ( + ("bin", "x64"), # CTK 13 + ("bin",), # CTK 12 + ) + else: + if libname == "nvvm": # noqa: SIM108 + subdirs_list = (("nvvm", "lib64"),) + else: + subdirs_list = ( + ("lib64",), # CTK + ("lib",), # Conda + ) + for sub_dirs in subdirs_list: + dirname: str # work around bug in mypy + for dirname in find_sub_dirs((cuda_home,), sub_dirs): + return dirname + return None + + +def _find_so_using_lib_dir( + lib_dir: str, so_basename: str, error_messages: list[str], attachments: list[str] +) -> Optional[str]: + so_name = os.path.join(lib_dir, so_basename) + if os.path.isfile(so_name): + return so_name + error_messages.append(f"No such file: {so_name}") + attachments.append(f' listdir("{lib_dir}"):') + if not os.path.isdir(lib_dir): + attachments.append(" DIRECTORY DOES NOT EXIST") + else: + for node in sorted(os.listdir(lib_dir)): + attachments.append(f" {node}") + return None + + +def _find_dll_using_lib_dir( + lib_dir: str, libname: str, error_messages: list[str], attachments: list[str] +) -> Optional[str]: + file_wild = libname + "*.dll" + dll_name = _find_dll_under_dir(lib_dir, file_wild) + if dll_name is not None: + return dll_name + error_messages.append(f"No such file: {file_wild}") + attachments.append(f' listdir("{lib_dir}"):') + for node in sorted(os.listdir(lib_dir)): + attachments.append(f" {node}") + return None + + +class _FindNvidiaDynamicLib: + def __init__(self, libname: str): + self.libname = libname + self.error_messages: list[str] = [] + self.attachments: list[str] = [] + self.abs_path = None + + if IS_WINDOWS: + self.lib_searched_for = f"{libname}*.dll" + if self.abs_path is None: + self.abs_path = _find_dll_using_nvidia_bin_dirs( + libname, + self.lib_searched_for, + self.error_messages, + self.attachments, + ) + else: + self.lib_searched_for = f"lib{libname}.so" + if self.abs_path is None: + self.abs_path = _find_so_using_nvidia_lib_dirs( + libname, + self.lib_searched_for, + self.error_messages, + self.attachments, + ) + + def retry_with_cuda_home_priority_last(self) -> None: + cuda_home_lib_dir = _find_lib_dir_using_cuda_home(self.libname) + if cuda_home_lib_dir is not None: + if IS_WINDOWS: + self.abs_path = _find_dll_using_lib_dir( + cuda_home_lib_dir, + self.libname, + self.error_messages, + self.attachments, + ) + else: + self.abs_path = _find_so_using_lib_dir( + cuda_home_lib_dir, + self.lib_searched_for, + self.error_messages, + self.attachments, + ) + + def raise_if_abs_path_is_None(self) -> str: # noqa: N802 + if self.abs_path: + return self.abs_path + err = ", ".join(self.error_messages) + att = "\n".join(self.attachments) + raise DynamicLibNotFoundError(f'Failure finding "{self.lib_searched_for}": {err}\n{att}') + + +@functools.cache +def find_nvidia_dynamic_lib(libname: str) -> str: + return _FindNvidiaDynamicLib(libname).raise_if_abs_path_is_None() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py new file mode 100644 index 0000000000000000000000000000000000000000..416718f5a407094c596414c73339e26752cb45f6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_common.py @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +from dataclasses import dataclass +from typing import Callable, Optional + +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import DIRECT_DEPENDENCIES + + +class DynamicLibNotFoundError(RuntimeError): + pass + + +@dataclass +class LoadedDL: + abs_path: Optional[str] + was_already_loaded_from_elsewhere: bool + _handle_uint: int # Platform-agnostic unsigned pointer value + + +def load_dependencies(libname: str, load_func: Callable[[str], LoadedDL]) -> None: + for dep in DIRECT_DEPENDENCIES.get(libname, ()): + load_func(dep) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py new file mode 100644 index 0000000000000000000000000000000000000000..a7de858b7327ba14de4d48aefe5a89ae9b7e5619 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_linux.py @@ -0,0 +1,214 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import contextlib +import ctypes +import ctypes.util +import os +from typing import Optional, cast + +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ( + LIBNAMES_REQUIRING_RTLD_DEEPBIND, + SUPPORTED_LINUX_SONAMES, +) + +CDLL_MODE = os.RTLD_NOW | os.RTLD_GLOBAL + + +def _load_libdl() -> ctypes.CDLL: + # In normal glibc-based Linux environments, find_library("dl") should return + # something like "libdl.so.2". In minimal or stripped-down environments + # (no ldconfig/gcc, incomplete linker cache), this can return None even + # though libdl is present. In that case, we fall back to the stable SONAME. + name = ctypes.util.find_library("dl") or "libdl.so.2" + try: + return ctypes.CDLL(name) + except OSError as e: + raise RuntimeError(f"Could not load {name!r} (required for dlinfo/dlerror on Linux)") from e + + +LIBDL = _load_libdl() + +# dlinfo +LIBDL.dlinfo.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p] +LIBDL.dlinfo.restype = ctypes.c_int + +# dlerror (thread-local error string; cleared after read) +LIBDL.dlerror.argtypes = [] +LIBDL.dlerror.restype = ctypes.c_char_p + +# First appeared in 2004-era glibc. Universally correct on Linux for all practical purposes. +RTLD_DI_LINKMAP = 2 +RTLD_DI_ORIGIN = 6 + + +class _LinkMapLNameView(ctypes.Structure): + """ + Prefix-only view of glibc's `struct link_map` used **solely** to read `l_name`. + + Background: + - `dlinfo(handle, RTLD_DI_LINKMAP, ...)` returns a `struct link_map*`. + - The first few members of `struct link_map` (including `l_name`) have been + stable on glibc for decades and are documented as debugger-visible. + - We only need the offset/layout of `l_name`, not the full struct. + + Safety constraints: + - This is a **partial** definition (prefix). It must only be used via a pointer + returned by `dlinfo(...)`. + - Do **not** instantiate it or pass it **by value** to any C function. + - Do **not** access any members beyond those declared here. + - Do **not** rely on `ctypes.sizeof(LinkMapPrefix)` for allocation. + + Rationale: + - Defining only the leading fields avoids depending on internal/unstable + tail members while keeping code more readable than raw pointer arithmetic. + """ + + _fields_ = ( + ("l_addr", ctypes.c_void_p), # ElfW(Addr) + ("l_name", ctypes.c_char_p), # char* + ) + + +# Defensive assertions, mainly to document the invariants we depend on +assert _LinkMapLNameView.l_addr.offset == 0 +assert _LinkMapLNameView.l_name.offset == ctypes.sizeof(ctypes.c_void_p) + + +def _dl_last_error() -> Optional[str]: + msg_bytes = cast(Optional[bytes], LIBDL.dlerror()) + if not msg_bytes: + return None # no pending error + # Never raises; undecodable bytes are mapped to U+DC80..U+DCFF + return msg_bytes.decode("utf-8", "surrogateescape") + + +def l_name_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + lm_view = ctypes.POINTER(_LinkMapLNameView)() + rc = LIBDL.dlinfo(ctypes.c_void_p(handle._handle), RTLD_DI_LINKMAP, ctypes.byref(lm_view)) + if rc != 0: + err = _dl_last_error() + raise OSError(f"dlinfo failed for {libname=!r} (rc={rc})" + (f": {err}" if err else "")) + if not lm_view: # NULL link_map** + raise OSError(f"dlinfo returned NULL link_map pointer for {libname=!r}") + + l_name_bytes = lm_view.contents.l_name + if not l_name_bytes: + raise OSError(f"dlinfo returned empty link_map->l_name for {libname=!r}") + + path = os.fsdecode(l_name_bytes) + if not path: + raise OSError(f"dlinfo returned empty l_name string for {libname=!r}") + + return path + + +def l_origin_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + l_origin_buf = ctypes.create_string_buffer(4096) + rc = LIBDL.dlinfo(ctypes.c_void_p(handle._handle), RTLD_DI_ORIGIN, l_origin_buf) + if rc != 0: + err = _dl_last_error() + raise OSError(f"dlinfo failed for {libname=!r} (rc={rc})" + (f": {err}" if err else "")) + + path = os.fsdecode(l_origin_buf.value) + if not path: + raise OSError(f"dlinfo returned empty l_origin string for {libname=!r}") + + return path + + +def abs_path_for_dynamic_library(libname: str, handle: ctypes.CDLL) -> str: + l_name = l_name_for_dynamic_library(libname, handle) + l_origin = l_origin_for_dynamic_library(libname, handle) + return os.path.join(l_origin, os.path.basename(l_name)) + + +def get_candidate_sonames(libname: str) -> list[str]: + # Reverse tabulated names to achieve new → old search order. + candidate_sonames = list(reversed(SUPPORTED_LINUX_SONAMES.get(libname, ()))) + candidate_sonames.append(f"lib{libname}.so") + return candidate_sonames + + +def check_if_already_loaded_from_elsewhere(libname: str, _have_abs_path: bool) -> Optional[LoadedDL]: + for soname in get_candidate_sonames(libname): + try: + handle = ctypes.CDLL(soname, mode=os.RTLD_NOLOAD) + except OSError: + continue + else: + return LoadedDL(abs_path_for_dynamic_library(libname, handle), True, handle._handle) + return None + + +def _load_lib(libname: str, filename: str) -> ctypes.CDLL: + cdll_mode = CDLL_MODE + if libname in LIBNAMES_REQUIRING_RTLD_DEEPBIND: + cdll_mode |= os.RTLD_DEEPBIND + return ctypes.CDLL(filename, cdll_mode) + + +def load_with_system_search(libname: str) -> Optional[LoadedDL]: + """Try to load a library using system search paths. + + Args: + libname: The name of the library to load + + Returns: + A LoadedDL object if successful, None if the library cannot be loaded + + Raises: + RuntimeError: If the library is loaded but no expected symbol is found + """ + for soname in get_candidate_sonames(libname): + try: + handle = _load_lib(libname, soname) + except OSError: + pass + else: + abs_path = abs_path_for_dynamic_library(libname, handle) + if abs_path is None: + raise RuntimeError(f"No expected symbol for {libname=!r}") + return LoadedDL(abs_path, False, handle._handle) + return None + + +def _work_around_known_bugs(libname: str, found_path: str) -> None: + if libname == "nvrtc": + # Work around bug/oversight in + # nvidia_cuda_nvrtc-13.0.48-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl + # Issue: libnvrtc.so.13 RUNPATH is not set. + # This workaround is highly specific + # - for simplicity. + # - to not mask bugs in future nvidia-cuda-nvrtc releases. + # - because a more general workaround is complicated. + dirname, basename = os.path.split(found_path) + if basename == "libnvrtc.so.13": + dep_basename = "libnvrtc-builtins.so.13.0" + dep_path = os.path.join(dirname, dep_basename) + if os.path.isfile(dep_path): + # In case of failure, defer to primary load, which is almost certain to fail, too. + with contextlib.suppress(OSError): + ctypes.CDLL(dep_path, CDLL_MODE) + + +def load_with_abs_path(libname: str, found_path: str) -> LoadedDL: + """Load a dynamic library from the given path. + + Args: + libname: The name of the library to load + found_path: The absolute path to the library file + + Returns: + A LoadedDL object representing the loaded library + + Raises: + RuntimeError: If the library cannot be loaded + """ + _work_around_known_bugs(libname, found_path) + try: + handle = _load_lib(libname, found_path) + except OSError as e: + raise RuntimeError(f"Failed to dlopen {found_path}: {e}") from e + return LoadedDL(found_path, False, handle._handle) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py new file mode 100644 index 0000000000000000000000000000000000000000..5da6d9b84a22026b01bfaf5ba1055ded5a02f8b3 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_dl_windows.py @@ -0,0 +1,159 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import ctypes +import ctypes.wintypes +import os +import struct +from typing import Optional + +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import ( + LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY, + SUPPORTED_WINDOWS_DLLS, +) + +# Mirrors WinBase.h (unfortunately not defined already elsewhere) +WINBASE_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x00000100 +WINBASE_LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x00001000 + +POINTER_ADDRESS_SPACE = 2 ** (struct.calcsize("P") * 8) + +# Set up kernel32 functions with proper types +kernel32 = ctypes.windll.kernel32 # type: ignore[attr-defined] + +# GetModuleHandleW +kernel32.GetModuleHandleW.argtypes = [ctypes.wintypes.LPCWSTR] +kernel32.GetModuleHandleW.restype = ctypes.wintypes.HMODULE + +# LoadLibraryExW +kernel32.LoadLibraryExW.argtypes = [ + ctypes.wintypes.LPCWSTR, # lpLibFileName + ctypes.wintypes.HANDLE, # hFile (reserved, must be NULL) + ctypes.wintypes.DWORD, # dwFlags +] +kernel32.LoadLibraryExW.restype = ctypes.wintypes.HMODULE + +# GetModuleFileNameW +kernel32.GetModuleFileNameW.argtypes = [ + ctypes.wintypes.HMODULE, # hModule + ctypes.wintypes.LPWSTR, # lpFilename + ctypes.wintypes.DWORD, # nSize +] +kernel32.GetModuleFileNameW.restype = ctypes.wintypes.DWORD + +# AddDllDirectory (Windows 7+) +kernel32.AddDllDirectory.argtypes = [ctypes.wintypes.LPCWSTR] +kernel32.AddDllDirectory.restype = ctypes.c_void_p # DLL_DIRECTORY_COOKIE + + +def ctypes_handle_to_unsigned_int(handle: ctypes.wintypes.HMODULE) -> int: + """Convert ctypes HMODULE to unsigned int.""" + handle_uint = int(handle) + if handle_uint < 0: + # Convert from signed to unsigned representation + handle_uint += POINTER_ADDRESS_SPACE + return handle_uint + + +def add_dll_directory(dll_abs_path: str) -> None: + """Add a DLL directory to the search path and update PATH environment variable. + + Args: + dll_abs_path: Absolute path to the DLL file + + Raises: + AssertionError: If the directory containing the DLL does not exist + """ + dirpath = os.path.dirname(dll_abs_path) + assert os.path.isdir(dirpath), dll_abs_path + + # Add the DLL directory to the search path + result = kernel32.AddDllDirectory(dirpath) + if not result: + # Fallback: just update PATH if AddDllDirectory fails + pass + + # Update PATH as a fallback for dependent DLL resolution + curr_path = os.environ.get("PATH") + os.environ["PATH"] = dirpath if curr_path is None else os.pathsep.join((curr_path, dirpath)) + + +def abs_path_for_dynamic_library(libname: str, handle: ctypes.wintypes.HMODULE) -> str: + """Get the absolute path of a loaded dynamic library on Windows.""" + # Create buffer for the path + buffer = ctypes.create_unicode_buffer(260) # MAX_PATH + length = kernel32.GetModuleFileNameW(handle, buffer, len(buffer)) + + if length == 0: + error_code = ctypes.GetLastError() # type: ignore[attr-defined] + raise RuntimeError(f"GetModuleFileNameW failed for {libname!r} (error code: {error_code})") + + # If buffer was too small, try with larger buffer + if length == len(buffer): + buffer = ctypes.create_unicode_buffer(32768) # Extended path length + length = kernel32.GetModuleFileNameW(handle, buffer, len(buffer)) + if length == 0: + error_code = ctypes.GetLastError() # type: ignore[attr-defined] + raise RuntimeError(f"GetModuleFileNameW failed for {libname!r} (error code: {error_code})") + + return buffer.value + + +def check_if_already_loaded_from_elsewhere(libname: str, have_abs_path: bool) -> Optional[LoadedDL]: + for dll_name in SUPPORTED_WINDOWS_DLLS.get(libname, ()): + handle = kernel32.GetModuleHandleW(dll_name) + if handle: + abs_path = abs_path_for_dynamic_library(libname, handle) + if have_abs_path and libname in LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY: + # This is a side-effect if the pathfinder loads the library via + # load_with_abs_path(). To make the side-effect more deterministic, + # activate it even if the library was already loaded from elsewhere. + add_dll_directory(abs_path) + return LoadedDL(abs_path, True, ctypes_handle_to_unsigned_int(handle)) + return None + + +def load_with_system_search(libname: str) -> Optional[LoadedDL]: + """Try to load a DLL using system search paths. + + Args: + libname: The name of the library to load + + Returns: + A LoadedDL object if successful, None if the library cannot be loaded + """ + # Reverse tabulated names to achieve new → old search order. + for dll_name in reversed(SUPPORTED_WINDOWS_DLLS.get(libname, ())): + handle = kernel32.LoadLibraryExW(dll_name, None, 0) + if handle: + abs_path = abs_path_for_dynamic_library(libname, handle) + return LoadedDL(abs_path, False, ctypes_handle_to_unsigned_int(handle)) + + return None + + +def load_with_abs_path(libname: str, found_path: str) -> LoadedDL: + """Load a dynamic library from the given path. + + Args: + libname: The name of the library to load + found_path: The absolute path to the DLL file + + Returns: + A LoadedDL object representing the loaded library + + Raises: + RuntimeError: If the DLL cannot be loaded + """ + if libname in LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY: + add_dll_directory(found_path) + + flags = WINBASE_LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | WINBASE_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR + handle = kernel32.LoadLibraryExW(found_path, None, flags) + + if not handle: + error_code = ctypes.GetLastError() # type: ignore[attr-defined] + raise RuntimeError(f"Failed to load DLL at {found_path}: Windows error {error_code}") + + return LoadedDL(found_path, False, ctypes_handle_to_unsigned_int(handle)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..3160333aa92b101a2901c430d670008b4722f756 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/load_nvidia_dynamic_lib.py @@ -0,0 +1,120 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import struct +import sys + +from cuda.pathfinder._dynamic_libs.find_nvidia_dynamic_lib import _FindNvidiaDynamicLib +from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL, load_dependencies +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import IS_WINDOWS + +if IS_WINDOWS: + from cuda.pathfinder._dynamic_libs.load_dl_windows import ( + check_if_already_loaded_from_elsewhere, + load_with_abs_path, + load_with_system_search, + ) +else: + from cuda.pathfinder._dynamic_libs.load_dl_linux import ( + check_if_already_loaded_from_elsewhere, + load_with_abs_path, + load_with_system_search, + ) + + +def _load_lib_no_cache(libname: str) -> LoadedDL: + found = _FindNvidiaDynamicLib(libname) + have_abs_path = found.abs_path is not None + + # If the library was already loaded by someone else, reproduce any OS-specific + # side-effects we would have applied on a direct absolute-path load (e.g., + # AddDllDirectory on Windows for libs that require it). + loaded = check_if_already_loaded_from_elsewhere(libname, have_abs_path) + + # Load dependencies regardless of who loaded the primary lib first. + # Doing this *after* the side-effect ensures dependencies resolve consistently + # relative to the actually loaded location. + load_dependencies(libname, load_nvidia_dynamic_lib) + + if loaded is not None: + return loaded + + if not have_abs_path: + loaded = load_with_system_search(libname) + if loaded is not None: + return loaded + found.retry_with_cuda_home_priority_last() + found.raise_if_abs_path_is_None() + + assert found.abs_path is not None # for mypy + return load_with_abs_path(libname, found.abs_path) + + +@functools.cache +def load_nvidia_dynamic_lib(libname: str) -> LoadedDL: + """Load an NVIDIA dynamic library by name. + + Args: + libname (str): The short name of the library to load (e.g., ``"cudart"``, + ``"nvvm"``, etc.). + + Returns: + LoadedDL: Object containing the OS library handle and absolute path. + + Raises: + DynamicLibNotFoundError: If the library cannot be found or loaded. + RuntimeError: If Python is not 64-bit. + + Search order: + 0. **Already loaded in the current process** + + - If a matching library is already loaded by some other component, + return its absolute path and handle and skip the rest of the search. + + 1. **NVIDIA Python wheels** + + - Scan installed distributions (``site-packages``) to find libraries + shipped in NVIDIA wheels. + + 2. **OS default mechanisms / Conda environments** + + - Fall back to the native loader: + + - Linux: ``dlopen()`` + + - Windows: ``LoadLibraryW()`` + + - Conda installations are commonly discovered via: + + - Linux: ``$ORIGIN/../lib`` in the ``RPATH`` of the ``python`` binary + (note: this can take precedence over ``LD_LIBRARY_PATH`` and + ``/etc/ld.so.conf.d/``). + + - Windows: ``%CONDA_PREFIX%\\Library\\bin`` on the system ``PATH``. + + - CUDA Toolkit (CTK) system installs with system config updates are often + discovered via: + + - Linux: ``/etc/ld.so.conf.d/*cuda*.conf`` + + - Windows: ``C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\vX.Y\\bin`` + on the system ``PATH``. + + 3. **Environment variables** + + - If set, use ``CUDA_HOME`` or ``CUDA_PATH`` (in that order). + + Notes: + The search is performed **per library**. There is currently no mechanism to + guarantee that multiple libraries are all resolved from the same location. + + """ + pointer_size_bits = struct.calcsize("P") * 8 + if pointer_size_bits != 64: + raise RuntimeError( + f"cuda.pathfinder.load_nvidia_dynamic_lib() requires 64-bit Python." + f" Currently running: {pointer_size_bits}-bit Python" + f" {sys.version_info.major}.{sys.version_info.minor}" + ) + return _load_lib_no_cache(libname) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py new file mode 100644 index 0000000000000000000000000000000000000000..4b1eb5ce66c09a6886c8b48e7a48a81ad0178de5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py @@ -0,0 +1,500 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +# THIS FILE NEEDS TO BE REVIEWED/UPDATED FOR EACH CTK RELEASE +# Likely candidates for updates are: +# SUPPORTED_LIBNAMES +# SUPPORTED_WINDOWS_DLLS +# SUPPORTED_LINUX_SONAMES + +import sys + +IS_WINDOWS = sys.platform == "win32" + +SUPPORTED_LIBNAMES_COMMON = ( + # Core CUDA Runtime and Compiler + "cudart", + "nvfatbin", + "nvJitLink", + "nvrtc", + "nvvm", + # Math Libraries + "cublas", + "cublasLt", + "cufft", + "cufftw", + "curand", + "cusolver", + "cusolverMg", + "cusparse", + "nppc", + "nppial", + "nppicc", + "nppidei", + "nppif", + "nppig", + "nppim", + "nppist", + "nppisu", + "nppitc", + "npps", + "nvblas", + # Other + "nvjpeg", +) + +# Note: The `cufile_rdma` information is intentionally retained (commented out) +# despite not being actively used in the current build. It took a nontrivial +# amount of effort to determine the SONAME, dependencies, and expected symbols +# for this special-case library, especially given its RDMA/MLX5 dependencies +# and limited availability. Keeping this as a reference avoids having to +# reconstruct the information from scratch in the future. + +SUPPORTED_LIBNAMES_LINUX_ONLY = ( + "cufile", + # "cufile_rdma", # Requires libmlx5.so +) +SUPPORTED_LIBNAMES_LINUX = SUPPORTED_LIBNAMES_COMMON + SUPPORTED_LIBNAMES_LINUX_ONLY + +SUPPORTED_LIBNAMES_WINDOWS_ONLY = () +SUPPORTED_LIBNAMES_WINDOWS = SUPPORTED_LIBNAMES_COMMON + SUPPORTED_LIBNAMES_WINDOWS_ONLY + +SUPPORTED_LIBNAMES_ALL = SUPPORTED_LIBNAMES_COMMON + SUPPORTED_LIBNAMES_LINUX_ONLY + SUPPORTED_LIBNAMES_WINDOWS_ONLY +SUPPORTED_LIBNAMES = SUPPORTED_LIBNAMES_WINDOWS if IS_WINDOWS else SUPPORTED_LIBNAMES_LINUX + +# Based on ldd output for Linux x86_64 nvidia-*-cu12 wheels (12.8.1) +DIRECT_DEPENDENCIES_CTK = { + "cublas": ("cublasLt",), + "cufftw": ("cufft",), + # "cufile_rdma": ("cufile",), + "cusolver": ("nvJitLink", "cusparse", "cublasLt", "cublas"), + "cusolverMg": ("nvJitLink", "cublasLt", "cublas"), + "cusparse": ("nvJitLink",), + "nppial": ("nppc",), + "nppicc": ("nppc",), + "nppidei": ("nppc",), + "nppif": ("nppc",), + "nppig": ("nppc",), + "nppim": ("nppc",), + "nppist": ("nppc",), + "nppisu": ("nppc",), + "nppitc": ("nppc",), + "npps": ("nppc",), + "nvblas": ("cublas", "cublasLt"), +} +DIRECT_DEPENDENCIES = DIRECT_DEPENDENCIES_CTK | { + "mathdx": ("nvrtc",), + "cufftMp": ("nvshmem_host",), + "cudss": ("cublas", "cublasLt"), +} + +# Based on these released files: +# cuda_11.0.3_450.51.06_linux.run +# cuda_11.1.1_455.32.00_linux.run +# cuda_11.2.2_460.32.03_linux.run +# cuda_11.3.1_465.19.01_linux.run +# cuda_11.4.4_470.82.01_linux.run +# cuda_11.5.1_495.29.05_linux.run +# cuda_11.6.2_510.47.03_linux.run +# cuda_11.7.1_515.65.01_linux.run +# cuda_11.8.0_520.61.05_linux.run +# cuda_12.0.1_525.85.12_linux.run +# cuda_12.1.1_530.30.02_linux.run +# cuda_12.2.2_535.104.05_linux.run +# cuda_12.3.2_545.23.08_linux.run +# cuda_12.4.1_550.54.15_linux.run +# cuda_12.5.1_555.42.06_linux.run +# cuda_12.6.2_560.35.03_linux.run +# cuda_12.8.1_570.124.06_linux.run +# cuda_12.9.1_575.57.08_linux.run +# cuda_13.0.0_580.65.06_linux.run +# Generated with toolshed/build_pathfinder_sonames.py +# Please keep in old → new sort order. +SUPPORTED_LINUX_SONAMES_CTK = { + "cublas": ( + "libcublas.so.11", + "libcublas.so.12", + "libcublas.so.13", + ), + "cublasLt": ( + "libcublasLt.so.11", + "libcublasLt.so.12", + "libcublasLt.so.13", + ), + "cudart": ( + "libcudart.so.11.0", + "libcudart.so.12", + "libcudart.so.13", + ), + "cufft": ( + "libcufft.so.10", + "libcufft.so.11", + "libcufft.so.12", + ), + "cufftw": ( + "libcufftw.so.10", + "libcufftw.so.11", + "libcufftw.so.12", + ), + "cufile": ("libcufile.so.0",), + # "cufile_rdma": ("libcufile_rdma.so.1",), + "curand": ("libcurand.so.10",), + "cusolver": ( + "libcusolver.so.10", + "libcusolver.so.11", + "libcusolver.so.12", + ), + "cusolverMg": ( + "libcusolverMg.so.10", + "libcusolverMg.so.11", + "libcusolverMg.so.12", + ), + "cusparse": ( + "libcusparse.so.11", + "libcusparse.so.12", + ), + "nppc": ( + "libnppc.so.11", + "libnppc.so.12", + "libnppc.so.13", + ), + "nppial": ( + "libnppial.so.11", + "libnppial.so.12", + "libnppial.so.13", + ), + "nppicc": ( + "libnppicc.so.11", + "libnppicc.so.12", + "libnppicc.so.13", + ), + "nppidei": ( + "libnppidei.so.11", + "libnppidei.so.12", + "libnppidei.so.13", + ), + "nppif": ( + "libnppif.so.11", + "libnppif.so.12", + "libnppif.so.13", + ), + "nppig": ( + "libnppig.so.11", + "libnppig.so.12", + "libnppig.so.13", + ), + "nppim": ( + "libnppim.so.11", + "libnppim.so.12", + "libnppim.so.13", + ), + "nppist": ( + "libnppist.so.11", + "libnppist.so.12", + "libnppist.so.13", + ), + "nppisu": ( + "libnppisu.so.11", + "libnppisu.so.12", + "libnppisu.so.13", + ), + "nppitc": ( + "libnppitc.so.11", + "libnppitc.so.12", + "libnppitc.so.13", + ), + "npps": ( + "libnpps.so.11", + "libnpps.so.12", + "libnpps.so.13", + ), + "nvJitLink": ( + "libnvJitLink.so.12", + "libnvJitLink.so.13", + ), + "nvblas": ( + "libnvblas.so.11", + "libnvblas.so.12", + "libnvblas.so.13", + ), + "nvfatbin": ( + "libnvfatbin.so.12", + "libnvfatbin.so.13", + ), + "nvjpeg": ( + "libnvjpeg.so.11", + "libnvjpeg.so.12", + "libnvjpeg.so.13", + ), + "nvrtc": ( + "libnvrtc.so.11.0", + "libnvrtc.so.11.1", + "libnvrtc.so.11.2", + "libnvrtc.so.12", + "libnvrtc.so.13", + ), + "nvvm": ( + "libnvvm.so.3", + "libnvvm.so.4", + ), +} +SUPPORTED_LINUX_SONAMES_OTHER = { + "cufftMp": ("libcufftMp.so.11",), + "mathdx": ("libmathdx.so.0",), + "cudss": ("libcudss.so.0",), + "nccl": ("libnccl.so.2",), + "nvpl_fftw": ("libnvpl_fftw.so.0",), + "nvshmem_host": ("libnvshmem_host.so.3",), +} +SUPPORTED_LINUX_SONAMES = SUPPORTED_LINUX_SONAMES_CTK | SUPPORTED_LINUX_SONAMES_OTHER + +# Based on these released files: +# cuda_11.0.3_451.82_win10.exe +# cuda_11.1.1_456.81_win10.exe +# cuda_11.2.2_461.33_win10.exe +# cuda_11.3.1_465.89_win10.exe +# cuda_11.4.4_472.50_windows.exe +# cuda_11.5.1_496.13_windows.exe +# cuda_11.6.2_511.65_windows.exe +# cuda_11.7.1_516.94_windows.exe +# cuda_11.8.0_522.06_windows.exe +# cuda_12.0.1_528.33_windows.exe +# cuda_12.1.1_531.14_windows.exe +# cuda_12.2.2_537.13_windows.exe +# cuda_12.3.2_546.12_windows.exe +# cuda_12.4.1_551.78_windows.exe +# cuda_12.5.1_555.85_windows.exe +# cuda_12.6.2_560.94_windows.exe +# cuda_12.8.1_572.61_windows.exe +# cuda_12.9.1_576.57_windows.exe +# cuda_13.0.0_windows.exe +# Generated with toolshed/build_pathfinder_dlls.py +# Please keep in old → new sort order. +SUPPORTED_WINDOWS_DLLS_CTK = { + "cublas": ( + "cublas64_11.dll", + "cublas64_12.dll", + "cublas64_13.dll", + ), + "cublasLt": ( + "cublasLt64_11.dll", + "cublasLt64_12.dll", + "cublasLt64_13.dll", + ), + "cudart": ( + "cudart64_101.dll", + "cudart64_110.dll", + "cudart64_12.dll", + "cudart64_13.dll", + "cudart64_65.dll", + ), + "cufft": ( + "cufft64_10.dll", + "cufft64_11.dll", + "cufft64_12.dll", + ), + "cufftw": ( + "cufftw64_10.dll", + "cufftw64_11.dll", + "cufftw64_12.dll", + ), + "curand": ("curand64_10.dll",), + "cusolver": ( + "cusolver64_10.dll", + "cusolver64_11.dll", + "cusolver64_12.dll", + ), + "cusolverMg": ( + "cusolverMg64_10.dll", + "cusolverMg64_11.dll", + "cusolverMg64_12.dll", + ), + "cusparse": ( + "cusparse64_11.dll", + "cusparse64_12.dll", + ), + "nppc": ( + "nppc64_11.dll", + "nppc64_12.dll", + "nppc64_13.dll", + ), + "nppial": ( + "nppial64_11.dll", + "nppial64_12.dll", + "nppial64_13.dll", + ), + "nppicc": ( + "nppicc64_11.dll", + "nppicc64_12.dll", + "nppicc64_13.dll", + ), + "nppidei": ( + "nppidei64_11.dll", + "nppidei64_12.dll", + "nppidei64_13.dll", + ), + "nppif": ( + "nppif64_11.dll", + "nppif64_12.dll", + "nppif64_13.dll", + ), + "nppig": ( + "nppig64_11.dll", + "nppig64_12.dll", + "nppig64_13.dll", + ), + "nppim": ( + "nppim64_11.dll", + "nppim64_12.dll", + "nppim64_13.dll", + ), + "nppist": ( + "nppist64_11.dll", + "nppist64_12.dll", + "nppist64_13.dll", + ), + "nppisu": ( + "nppisu64_11.dll", + "nppisu64_12.dll", + "nppisu64_13.dll", + ), + "nppitc": ( + "nppitc64_11.dll", + "nppitc64_12.dll", + "nppitc64_13.dll", + ), + "npps": ( + "npps64_11.dll", + "npps64_12.dll", + "npps64_13.dll", + ), + "nvJitLink": ( + "nvJitLink_120_0.dll", + "nvJitLink_130_0.dll", + ), + "nvblas": ( + "nvblas64_11.dll", + "nvblas64_12.dll", + "nvblas64_13.dll", + ), + "nvfatbin": ( + "nvfatbin_120_0.dll", + "nvfatbin_130_0.dll", + ), + "nvjpeg": ( + "nvjpeg64_11.dll", + "nvjpeg64_12.dll", + "nvjpeg64_13.dll", + ), + "nvrtc": ( + "nvrtc64_110_0.dll", + "nvrtc64_111_0.dll", + "nvrtc64_112_0.dll", + "nvrtc64_120_0.dll", + "nvrtc64_130_0.dll", + ), + "nvvm": ( + "nvvm64.dll", + "nvvm64_33_0.dll", + "nvvm64_40_0.dll", + "nvvm70.dll", + ), +} +SUPPORTED_WINDOWS_DLLS_OTHER = { + "mathdx": ("mathdx64_0.dll",), + "cudss": ("cudss64_0.dll",), +} +SUPPORTED_WINDOWS_DLLS = SUPPORTED_WINDOWS_DLLS_CTK | SUPPORTED_WINDOWS_DLLS_OTHER + +LIBNAMES_REQUIRING_OS_ADD_DLL_DIRECTORY = ( + "cufft", + "nvrtc", +) + +LIBNAMES_REQUIRING_RTLD_DEEPBIND = ("cufftMp",) + +# Based on output of toolshed/make_site_packages_libdirs_linux.py +SITE_PACKAGES_LIBDIRS_LINUX_CTK = { + "cublas": ("nvidia/cu13/lib", "nvidia/cublas/lib"), + "cublasLt": ("nvidia/cu13/lib", "nvidia/cublas/lib"), + "cudart": ("nvidia/cu13/lib", "nvidia/cuda_runtime/lib"), + "cufft": ("nvidia/cu13/lib", "nvidia/cufft/lib"), + "cufftw": ("nvidia/cu13/lib", "nvidia/cufft/lib"), + "cufile": ("nvidia/cu13/lib", "nvidia/cufile/lib"), + # "cufile_rdma": ("nvidia/cu13/lib", "nvidia/cufile/lib"), + "curand": ("nvidia/cu13/lib", "nvidia/curand/lib"), + "cusolver": ("nvidia/cu13/lib", "nvidia/cusolver/lib"), + "cusolverMg": ("nvidia/cu13/lib", "nvidia/cusolver/lib"), + "cusparse": ("nvidia/cu13/lib", "nvidia/cusparse/lib"), + "nppc": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppial": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppicc": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppidei": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppif": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppig": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppim": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppist": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppisu": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nppitc": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "npps": ("nvidia/cu13/lib", "nvidia/npp/lib"), + "nvJitLink": ("nvidia/cu13/lib", "nvidia/nvjitlink/lib"), + "nvblas": ("nvidia/cu13/lib", "nvidia/cublas/lib"), + "nvfatbin": ("nvidia/cu13/lib", "nvidia/nvfatbin/lib"), + "nvjpeg": ("nvidia/cu13/lib", "nvidia/nvjpeg/lib"), + "nvrtc": ("nvidia/cu13/lib", "nvidia/cuda_nvrtc/lib"), + "nvvm": ("nvidia/cu13/lib", "nvidia/cuda_nvcc/nvvm/lib64"), +} +SITE_PACKAGES_LIBDIRS_LINUX_OTHER = { + "cudss": ("nvidia/cu12/lib",), + "cufftMp": ("nvidia/cufftmp/cu12/lib",), + "mathdx": ("nvidia/cu13/lib", "nvidia/cu12/lib"), + "nccl": ("nvidia/nccl/lib",), + "nvpl_fftw": ("nvpl/lib",), + "nvshmem_host": ("nvidia/nvshmem/lib",), +} +SITE_PACKAGES_LIBDIRS_LINUX = SITE_PACKAGES_LIBDIRS_LINUX_CTK | SITE_PACKAGES_LIBDIRS_LINUX_OTHER + +# Based on output of toolshed/make_site_packages_libdirs_windows.py +SITE_PACKAGES_LIBDIRS_WINDOWS_CTK = { + "cublas": ("nvidia/cu13/bin/x86_64", "nvidia/cublas/bin"), + "cublasLt": ("nvidia/cu13/bin/x86_64", "nvidia/cublas/bin"), + "cudart": ("nvidia/cu13/bin/x86_64", "nvidia/cuda_runtime/bin"), + "cufft": ("nvidia/cu13/bin/x86_64", "nvidia/cufft/bin"), + "cufftw": ("nvidia/cu13/bin/x86_64", "nvidia/cufft/bin"), + "curand": ("nvidia/cu13/bin/x86_64", "nvidia/curand/bin"), + "cusolver": ("nvidia/cu13/bin/x86_64", "nvidia/cusolver/bin"), + "cusolverMg": ("nvidia/cu13/bin/x86_64", "nvidia/cusolver/bin"), + "cusparse": ("nvidia/cu13/bin/x86_64", "nvidia/cusparse/bin"), + "nppc": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppial": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppicc": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppidei": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppif": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppig": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppim": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppist": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppisu": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nppitc": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "npps": ("nvidia/cu13/bin/x86_64", "nvidia/npp/bin"), + "nvJitLink": ("nvidia/cu13/bin/x86_64", "nvidia/nvjitlink/bin"), + "nvblas": ("nvidia/cu13/bin/x86_64", "nvidia/cublas/bin"), + "nvfatbin": ("nvidia/cu13/bin/x86_64", "nvidia/nvfatbin/bin"), + "nvjpeg": ("nvidia/cu13/bin/x86_64", "nvidia/nvjpeg/bin"), + "nvrtc": ("nvidia/cu13/bin/x86_64", "nvidia/cuda_nvrtc/bin"), + "nvvm": ("nvidia/cu13/bin/x86_64", "nvidia/cuda_nvcc/nvvm/bin"), +} +SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER = { + "mathdx": ("nvidia/cu13/bin/x86_64", "nvidia/cu12/bin"), +} +SITE_PACKAGES_LIBDIRS_WINDOWS = SITE_PACKAGES_LIBDIRS_WINDOWS_CTK | SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER + + +def is_suppressed_dll_file(path_basename: str) -> bool: + if path_basename.startswith("nvrtc"): + # nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-win_amd64.whl: + # nvidia\cuda_nvrtc\bin\ + # nvrtc-builtins64_128.dll + # nvrtc64_120_0.alt.dll + # nvrtc64_120_0.dll + return path_basename.endswith(".alt.dll") or "-builtins" in path_basename + return path_basename.startswith(("cudart32_", "nvvm32")) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9754bc77f3c18462134e4cddcb9f186dd481a9f1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/__pycache__/find_nvidia_headers.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py new file mode 100644 index 0000000000000000000000000000000000000000..cc2c8654cba5afa22e60b123b0512b9233fbae38 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_headers/find_nvidia_headers.py @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import glob +import os +from typing import Optional + +from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import IS_WINDOWS +from cuda.pathfinder._utils.find_sub_dirs import find_sub_dirs_all_sitepackages + + +@functools.cache +def find_nvidia_header_directory(libname: str) -> Optional[str]: + if libname != "nvshmem": + raise RuntimeError(f"UNKNOWN {libname=}") + + if libname == "nvshmem" and IS_WINDOWS: + # nvshmem has no Windows support. + return None + + # Installed from a wheel + nvidia_sub_dirs = ("nvidia", "nvshmem", "include") + hdr_dir: str # help mypy + for hdr_dir in find_sub_dirs_all_sitepackages(nvidia_sub_dirs): + nvshmem_h_path = os.path.join(hdr_dir, "nvshmem.h") + if os.path.isfile(nvshmem_h_path): + return hdr_dir + + conda_prefix = os.environ.get("CONDA_PREFIX") + if conda_prefix and os.path.isdir(conda_prefix): + hdr_dir = os.path.join(conda_prefix, "include") + nvshmem_h_path = os.path.join(hdr_dir, "nvshmem.h") + if os.path.isfile(nvshmem_h_path): + return hdr_dir + + for hdr_dir in sorted(glob.glob("/usr/include/nvshmem_*"), reverse=True): + nvshmem_h_path = os.path.join(hdr_dir, "nvshmem.h") + if os.path.isfile(nvshmem_h_path): + return hdr_dir + + return None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c4bd157f536a914fa4a0922962f0c024bbe93537 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_dll.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..370beaef144bfdc6007b2dd869cfcdccedbb95e5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_site_packages_so.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7664de1deedc6ff74faa1d5d37a879a8a042d8e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/__pycache__/find_sub_dirs.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py new file mode 100644 index 0000000000000000000000000000000000000000..2f5695093c715987a71d32fdf676f41a660a027e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_dll.py @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import collections +import functools +import importlib.metadata + + +@functools.cache +def find_all_dll_files_via_metadata() -> dict[str, tuple[str, ...]]: + results: collections.defaultdict[str, list[str]] = collections.defaultdict(list) + + # sort dists for deterministic output + for dist in sorted(importlib.metadata.distributions(), key=lambda d: (d.metadata.get("Name", ""), d.version)): + files = dist.files + if not files: + continue + for relpath in sorted(files, key=lambda p: str(p)): # deterministic + relname = relpath.name.lower() + if not relname.endswith(".dll"): + continue + abs_path = str(dist.locate_file(relpath)) + results[relname].append(abs_path) + + # plain dicts; sort inner list for stability + return {k: tuple(sorted(v)) for k, v in results.items()} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py new file mode 100644 index 0000000000000000000000000000000000000000..69e7eea3ad562866f2d75a845c9272856f6ab35f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_site_packages_so.py @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import collections +import functools +import importlib.metadata +import re + +_SO_RE = re.compile(r"\.so(?:$|\.)") # matches libfoo.so or libfoo.so.1.2.3 + + +def split_so_version_suffix(so_filename: str) -> tuple[str, str]: + idx = so_filename.rfind(".so") + assert idx > 0, so_filename + idx += 3 + return (so_filename[:idx], so_filename[idx:]) + + +@functools.cache +def find_all_so_files_via_metadata() -> dict[str, dict[str, tuple[str, ...]]]: + results: collections.defaultdict[str, collections.defaultdict[str, list[str]]] = collections.defaultdict( + lambda: collections.defaultdict(list) + ) + + # sort dists for deterministic output + for dist in sorted(importlib.metadata.distributions(), key=lambda d: (d.metadata.get("Name", ""), d.version)): + files = dist.files + if not files: + continue + for relpath in sorted(files, key=lambda p: str(p)): # deterministic + relname = relpath.name + if not _SO_RE.search(relname): + continue + so_basename, so_version_suffix = split_so_version_suffix(relname) + abs_path = str(dist.locate_file(relpath)) + results[so_basename][so_version_suffix].append(abs_path) + + # plain dicts; sort inner lists for stability + return {k: {kk: tuple(sorted(vv)) for kk, vv in v.items()} for k, v in results.items()} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py new file mode 100644 index 0000000000000000000000000000000000000000..0b6f06c4781a498f0cbd6ff5a824d28ff825f0c5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_utils/find_sub_dirs.py @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +import functools +import os +import site +import sys +from collections.abc import Sequence + + +def find_sub_dirs_no_cache(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + results = [] + for base in parent_dirs: + stack = [(base, 0)] # (current_path, index into sub_dirs) + while stack: + current_path, idx = stack.pop() + if idx == len(sub_dirs): + if os.path.isdir(current_path): + results.append(current_path) + continue + + sub = sub_dirs[idx] + if sub == "*": + try: + entries = sorted(os.listdir(current_path)) + except OSError: + continue + for entry in entries: + entry_path = os.path.join(current_path, entry) + if os.path.isdir(entry_path): + stack.append((entry_path, idx + 1)) + else: + next_path = os.path.join(current_path, sub) + if os.path.isdir(next_path): + stack.append((next_path, idx + 1)) + return results + + +@functools.cache +def find_sub_dirs_cached(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs_no_cache(parent_dirs, sub_dirs) + + +def find_sub_dirs(parent_dirs: Sequence[str], sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs_cached(tuple(parent_dirs), tuple(sub_dirs)) + + +def find_sub_dirs_sys_path(sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs(sys.path, sub_dirs) + + +def find_sub_dirs_all_sitepackages(sub_dirs: Sequence[str]) -> list[str]: + return find_sub_dirs((site.getusersitepackages(), *site.getsitepackages()), sub_dirs) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_version.py b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..70aa6255c8f5c1a061b9809db7616b13cffae80a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/cuda/pathfinder/_version.py @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +__version__ = "1.2.2" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6c2ec7d1e45208e75767fca1245414048a150c26 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..548c689f883b71370bd736989ee6c9f88fe6e5a4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3314a16b11c3d56e0bb0abd1de8f6f5172ff927 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c184eaf6211692d52c4139d0259587276561a1f3 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b0846cdadbd3b4d0b6d1e18d7289713fac52ab2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a625d08a3b133cb3b95c80f60a80e972f99afd5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ea00f801645ad6453ffbe3b291802bd28469a7af Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c6b1f8b8ad34134d29a1735af02cf028b91f19a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3bd76a8a870b7669b099f5c08c1ad6f2403b159f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e589bb917e23823e25f9fff7e0849c4d6d4a62bc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__init__.py @@ -0,0 +1,4 @@ +"""Subpackage containing all of pip's command line interface related code +""" + +# This file intentionally does not import submodules diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3bab236440281ad3dd28e878867789e3c2d60be Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c459a7392b264c0307e9e1947c134b3c72682fa Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17611c070e3e1972ded4c3b06d0e86074714f2ec Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a87516b35178bc36971490bfdfea7416dd62bc1f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6db0853d5bc4f562d4ec92bae2076a14e407a4e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef1db11100dd697a66da75453ac289388385f1c0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6bff6c5552d95179d46d1ae57399ceacf766955 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76e958c57b21b0e052ee47918d010cd84ccea7b6 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6917f44df467f5315f198b9515fe34c0928e21d5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bbe626620b2c1cd4bb68d62fc641aa9df1daa241 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de8f4de44b11302b2c66f91ca29e800355f80110 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..313468297dce08ae3ef88fbc8f6bd4709a2f8a0c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..28231a0eda845b27f777360e4afe17678908b97c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py new file mode 100644 index 0000000000000000000000000000000000000000..f3f70ac8553b069d2d7f87926e6ba12f8998b5e5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py @@ -0,0 +1,176 @@ +"""Logic that powers autocompletion installed by ``pip completion``. +""" + +import optparse +import os +import sys +from itertools import chain +from typing import Any, Iterable, List, Optional + +from pip._internal.cli.main_parser import create_main_parser +from pip._internal.commands import commands_dict, create_command +from pip._internal.metadata import get_default_environment + + +def autocomplete() -> None: + """Entry Point for completion of main and subcommand options.""" + # Don't complete if user hasn't sourced bash_completion file. + if "PIP_AUTO_COMPLETE" not in os.environ: + return + # Don't complete if autocompletion environment variables + # are not present + if not os.environ.get("COMP_WORDS") or not os.environ.get("COMP_CWORD"): + return + cwords = os.environ["COMP_WORDS"].split()[1:] + cword = int(os.environ["COMP_CWORD"]) + try: + current = cwords[cword - 1] + except IndexError: + current = "" + + parser = create_main_parser() + subcommands = list(commands_dict) + options = [] + + # subcommand + subcommand_name: Optional[str] = None + for word in cwords: + if word in subcommands: + subcommand_name = word + break + # subcommand options + if subcommand_name is not None: + # special case: 'help' subcommand has no options + if subcommand_name == "help": + sys.exit(1) + # special case: list locally installed dists for show and uninstall + should_list_installed = not current.startswith("-") and subcommand_name in [ + "show", + "uninstall", + ] + if should_list_installed: + env = get_default_environment() + lc = current.lower() + installed = [ + dist.canonical_name + for dist in env.iter_installed_distributions(local_only=True) + if dist.canonical_name.startswith(lc) + and dist.canonical_name not in cwords[1:] + ] + # if there are no dists installed, fall back to option completion + if installed: + for dist in installed: + print(dist) + sys.exit(1) + + should_list_installables = ( + not current.startswith("-") and subcommand_name == "install" + ) + if should_list_installables: + for path in auto_complete_paths(current, "path"): + print(path) + sys.exit(1) + + subcommand = create_command(subcommand_name) + + for opt in subcommand.parser.option_list_all: + if opt.help != optparse.SUPPRESS_HELP: + options += [ + (opt_str, opt.nargs) for opt_str in opt._long_opts + opt._short_opts + ] + + # filter out previously specified options from available options + prev_opts = [x.split("=")[0] for x in cwords[1 : cword - 1]] + options = [(x, v) for (x, v) in options if x not in prev_opts] + # filter options by current input + options = [(k, v) for k, v in options if k.startswith(current)] + # get completion type given cwords and available subcommand options + completion_type = get_path_completion_type( + cwords, + cword, + subcommand.parser.option_list_all, + ) + # get completion files and directories if ``completion_type`` is + # ````, ```` or ```` + if completion_type: + paths = auto_complete_paths(current, completion_type) + options = [(path, 0) for path in paths] + for option in options: + opt_label = option[0] + # append '=' to options which require args + if option[1] and option[0][:2] == "--": + opt_label += "=" + print(opt_label) + else: + # show main parser options only when necessary + + opts = [i.option_list for i in parser.option_groups] + opts.append(parser.option_list) + flattened_opts = chain.from_iterable(opts) + if current.startswith("-"): + for opt in flattened_opts: + if opt.help != optparse.SUPPRESS_HELP: + subcommands += opt._long_opts + opt._short_opts + else: + # get completion type given cwords and all available options + completion_type = get_path_completion_type(cwords, cword, flattened_opts) + if completion_type: + subcommands = list(auto_complete_paths(current, completion_type)) + + print(" ".join([x for x in subcommands if x.startswith(current)])) + sys.exit(1) + + +def get_path_completion_type( + cwords: List[str], cword: int, opts: Iterable[Any] +) -> Optional[str]: + """Get the type of path completion (``file``, ``dir``, ``path`` or None) + + :param cwords: same as the environmental variable ``COMP_WORDS`` + :param cword: same as the environmental variable ``COMP_CWORD`` + :param opts: The available options to check + :return: path completion type (``file``, ``dir``, ``path`` or None) + """ + if cword < 2 or not cwords[cword - 2].startswith("-"): + return None + for opt in opts: + if opt.help == optparse.SUPPRESS_HELP: + continue + for o in str(opt).split("/"): + if cwords[cword - 2].split("=")[0] == o: + if not opt.metavar or any( + x in ("path", "file", "dir") for x in opt.metavar.split("/") + ): + return opt.metavar + return None + + +def auto_complete_paths(current: str, completion_type: str) -> Iterable[str]: + """If ``completion_type`` is ``file`` or ``path``, list all regular files + and directories starting with ``current``; otherwise only list directories + starting with ``current``. + + :param current: The word to be completed + :param completion_type: path completion type(``file``, ``path`` or ``dir``) + :return: A generator of regular files and/or directories + """ + directory, filename = os.path.split(current) + current_path = os.path.abspath(directory) + # Don't complete paths if they can't be accessed + if not os.access(current_path, os.R_OK): + return + filename = os.path.normcase(filename) + # list all files that start with ``filename`` + file_list = ( + x for x in os.listdir(current_path) if os.path.normcase(x).startswith(filename) + ) + for f in file_list: + opt = os.path.join(current_path, f) + comp_file = os.path.normcase(os.path.join(directory, f)) + # complete regular files when there is not ```` after option + # complete directories when there is ````, ```` or + # ````after option + if completion_type != "dir" and os.path.isfile(opt): + yield comp_file + elif os.path.isdir(opt): + yield os.path.join(comp_file, "") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/base_command.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/base_command.py new file mode 100644 index 0000000000000000000000000000000000000000..362f84b6b0b84612e40bd6e96b94fd0e05bb48d6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/base_command.py @@ -0,0 +1,240 @@ +"""Base Command class, and related routines""" + +import logging +import logging.config +import optparse +import os +import sys +import traceback +from optparse import Values +from typing import List, Optional, Tuple + +from pip._vendor.rich import reconfigure +from pip._vendor.rich import traceback as rich_traceback + +from pip._internal.cli import cmdoptions +from pip._internal.cli.command_context import CommandContextMixIn +from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter +from pip._internal.cli.status_codes import ( + ERROR, + PREVIOUS_BUILD_DIR_ERROR, + UNKNOWN_ERROR, + VIRTUALENV_NOT_FOUND, +) +from pip._internal.exceptions import ( + BadCommand, + CommandError, + DiagnosticPipError, + InstallationError, + NetworkConnectionError, + PreviousBuildDirError, +) +from pip._internal.utils.deprecation import deprecated +from pip._internal.utils.filesystem import check_path_owner +from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging +from pip._internal.utils.misc import get_prog, normalize_path +from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry +from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry +from pip._internal.utils.virtualenv import running_under_virtualenv + +__all__ = ["Command"] + +logger = logging.getLogger(__name__) + + +class Command(CommandContextMixIn): + usage: str = "" + ignore_require_venv: bool = False + + def __init__(self, name: str, summary: str, isolated: bool = False) -> None: + super().__init__() + + self.name = name + self.summary = summary + self.parser = ConfigOptionParser( + usage=self.usage, + prog=f"{get_prog()} {name}", + formatter=UpdatingDefaultsHelpFormatter(), + add_help_option=False, + name=name, + description=self.__doc__, + isolated=isolated, + ) + + self.tempdir_registry: Optional[TempDirRegistry] = None + + # Commands should add options to this option group + optgroup_name = f"{self.name.capitalize()} Options" + self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name) + + # Add the general options + gen_opts = cmdoptions.make_option_group( + cmdoptions.general_group, + self.parser, + ) + self.parser.add_option_group(gen_opts) + + self.add_options() + + def add_options(self) -> None: + pass + + def handle_pip_version_check(self, options: Values) -> None: + """ + This is a no-op so that commands by default do not do the pip version + check. + """ + # Make sure we do the pip version check if the index_group options + # are present. + assert not hasattr(options, "no_index") + + def run(self, options: Values, args: List[str]) -> int: + raise NotImplementedError + + def _run_wrapper(self, level_number: int, options: Values, args: List[str]) -> int: + def _inner_run() -> int: + try: + return self.run(options, args) + finally: + self.handle_pip_version_check(options) + + if options.debug_mode: + rich_traceback.install(show_locals=True) + return _inner_run() + + try: + status = _inner_run() + assert isinstance(status, int) + return status + except DiagnosticPipError as exc: + logger.error("%s", exc, extra={"rich": True}) + logger.debug("Exception information:", exc_info=True) + + return ERROR + except PreviousBuildDirError as exc: + logger.critical(str(exc)) + logger.debug("Exception information:", exc_info=True) + + return PREVIOUS_BUILD_DIR_ERROR + except ( + InstallationError, + BadCommand, + NetworkConnectionError, + ) as exc: + logger.critical(str(exc)) + logger.debug("Exception information:", exc_info=True) + + return ERROR + except CommandError as exc: + logger.critical("%s", exc) + logger.debug("Exception information:", exc_info=True) + + return ERROR + except BrokenStdoutLoggingError: + # Bypass our logger and write any remaining messages to + # stderr because stdout no longer works. + print("ERROR: Pipe to stdout was broken", file=sys.stderr) + if level_number <= logging.DEBUG: + traceback.print_exc(file=sys.stderr) + + return ERROR + except KeyboardInterrupt: + logger.critical("Operation cancelled by user") + logger.debug("Exception information:", exc_info=True) + + return ERROR + except BaseException: + logger.critical("Exception:", exc_info=True) + + return UNKNOWN_ERROR + + def parse_args(self, args: List[str]) -> Tuple[Values, List[str]]: + # factored out for testability + return self.parser.parse_args(args) + + def main(self, args: List[str]) -> int: + try: + with self.main_context(): + return self._main(args) + finally: + logging.shutdown() + + def _main(self, args: List[str]) -> int: + # We must initialize this before the tempdir manager, otherwise the + # configuration would not be accessible by the time we clean up the + # tempdir manager. + self.tempdir_registry = self.enter_context(tempdir_registry()) + # Intentionally set as early as possible so globally-managed temporary + # directories are available to the rest of the code. + self.enter_context(global_tempdir_manager()) + + options, args = self.parse_args(args) + + # Set verbosity so that it can be used elsewhere. + self.verbosity = options.verbose - options.quiet + + reconfigure(no_color=options.no_color) + level_number = setup_logging( + verbosity=self.verbosity, + no_color=options.no_color, + user_log_file=options.log, + ) + + always_enabled_features = set(options.features_enabled) & set( + cmdoptions.ALWAYS_ENABLED_FEATURES + ) + if always_enabled_features: + logger.warning( + "The following features are always enabled: %s. ", + ", ".join(sorted(always_enabled_features)), + ) + + # Make sure that the --python argument isn't specified after the + # subcommand. We can tell, because if --python was specified, + # we should only reach this point if we're running in the created + # subprocess, which has the _PIP_RUNNING_IN_SUBPROCESS environment + # variable set. + if options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ: + logger.critical( + "The --python option must be placed before the pip subcommand name" + ) + sys.exit(ERROR) + + # TODO: Try to get these passing down from the command? + # without resorting to os.environ to hold these. + # This also affects isolated builds and it should. + + if options.no_input: + os.environ["PIP_NO_INPUT"] = "1" + + if options.exists_action: + os.environ["PIP_EXISTS_ACTION"] = " ".join(options.exists_action) + + if options.require_venv and not self.ignore_require_venv: + # If a venv is required check if it can really be found + if not running_under_virtualenv(): + logger.critical("Could not find an activated virtualenv (required).") + sys.exit(VIRTUALENV_NOT_FOUND) + + if options.cache_dir: + options.cache_dir = normalize_path(options.cache_dir) + if not check_path_owner(options.cache_dir): + logger.warning( + "The directory '%s' or its parent directory is not owned " + "or is not writable by the current user. The cache " + "has been disabled. Check the permissions and owner of " + "that directory. If executing pip with sudo, you should " + "use sudo's -H flag.", + options.cache_dir, + ) + options.cache_dir = None + + if options.no_python_version_warning: + deprecated( + reason="--no-python-version-warning is deprecated.", + replacement="to remove the flag as it's a no-op", + gone_in="25.1", + issue=13154, + ) + + return self._run_wrapper(level_number, options, args) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py new file mode 100644 index 0000000000000000000000000000000000000000..eeb7e651b792b0c6c2d40ad6934216b05dd8354b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py @@ -0,0 +1,1075 @@ +""" +shared options and groups + +The principle here is to define options once, but *not* instantiate them +globally. One reason being that options with action='append' can carry state +between parses. pip parses general options twice internally, and shouldn't +pass on state. To be consistent, all options will follow this design. +""" + +# The following comment should be removed at some point in the future. +# mypy: strict-optional=False + +import importlib.util +import logging +import os +import textwrap +from functools import partial +from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values +from textwrap import dedent +from typing import Any, Callable, Dict, Optional, Tuple + +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.cli.parser import ConfigOptionParser +from pip._internal.exceptions import CommandError +from pip._internal.locations import USER_CACHE_DIR, get_src_prefix +from pip._internal.models.format_control import FormatControl +from pip._internal.models.index import PyPI +from pip._internal.models.target_python import TargetPython +from pip._internal.utils.hashes import STRONG_HASHES +from pip._internal.utils.misc import strtobool + +logger = logging.getLogger(__name__) + + +def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None: + """ + Raise an option parsing error using parser.error(). + + Args: + parser: an OptionParser instance. + option: an Option instance. + msg: the error text. + """ + msg = f"{option} error: {msg}" + msg = textwrap.fill(" ".join(msg.split())) + parser.error(msg) + + +def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: + """ + Return an OptionGroup object + group -- assumed to be dict with 'name' and 'options' keys + parser -- an optparse Parser + """ + option_group = OptionGroup(parser, group["name"]) + for option in group["options"]: + option_group.add_option(option()) + return option_group + + +def check_dist_restriction(options: Values, check_target: bool = False) -> None: + """Function for determining if custom platform options are allowed. + + :param options: The OptionParser options. + :param check_target: Whether or not to check if --target is being used. + """ + dist_restriction_set = any( + [ + options.python_version, + options.platforms, + options.abis, + options.implementation, + ] + ) + + binary_only = FormatControl(set(), {":all:"}) + sdist_dependencies_allowed = ( + options.format_control != binary_only and not options.ignore_dependencies + ) + + # Installations or downloads using dist restrictions must not combine + # source distributions and dist-specific wheels, as they are not + # guaranteed to be locally compatible. + if dist_restriction_set and sdist_dependencies_allowed: + raise CommandError( + "When restricting platform and interpreter constraints using " + "--python-version, --platform, --abi, or --implementation, " + "either --no-deps must be set, or --only-binary=:all: must be " + "set and --no-binary must not be set (or must be set to " + ":none:)." + ) + + if check_target: + if not options.dry_run and dist_restriction_set and not options.target_dir: + raise CommandError( + "Can not use any platform or abi specific options unless " + "installing via '--target' or using '--dry-run'" + ) + + +def _path_option_check(option: Option, opt: str, value: str) -> str: + return os.path.expanduser(value) + + +def _package_name_option_check(option: Option, opt: str, value: str) -> str: + return canonicalize_name(value) + + +class PipOption(Option): + TYPES = Option.TYPES + ("path", "package_name") + TYPE_CHECKER = Option.TYPE_CHECKER.copy() + TYPE_CHECKER["package_name"] = _package_name_option_check + TYPE_CHECKER["path"] = _path_option_check + + +########### +# options # +########### + +help_: Callable[..., Option] = partial( + Option, + "-h", + "--help", + dest="help", + action="help", + help="Show help.", +) + +debug_mode: Callable[..., Option] = partial( + Option, + "--debug", + dest="debug_mode", + action="store_true", + default=False, + help=( + "Let unhandled exceptions propagate outside the main subroutine, " + "instead of logging them to stderr." + ), +) + +isolated_mode: Callable[..., Option] = partial( + Option, + "--isolated", + dest="isolated_mode", + action="store_true", + default=False, + help=( + "Run pip in an isolated mode, ignoring environment variables and user " + "configuration." + ), +) + +require_virtualenv: Callable[..., Option] = partial( + Option, + "--require-virtualenv", + "--require-venv", + dest="require_venv", + action="store_true", + default=False, + help=( + "Allow pip to only run in a virtual environment; " + "exit with an error otherwise." + ), +) + +override_externally_managed: Callable[..., Option] = partial( + Option, + "--break-system-packages", + dest="override_externally_managed", + action="store_true", + help="Allow pip to modify an EXTERNALLY-MANAGED Python installation", +) + +python: Callable[..., Option] = partial( + Option, + "--python", + dest="python", + help="Run pip with the specified Python interpreter.", +) + +verbose: Callable[..., Option] = partial( + Option, + "-v", + "--verbose", + dest="verbose", + action="count", + default=0, + help="Give more output. Option is additive, and can be used up to 3 times.", +) + +no_color: Callable[..., Option] = partial( + Option, + "--no-color", + dest="no_color", + action="store_true", + default=False, + help="Suppress colored output.", +) + +version: Callable[..., Option] = partial( + Option, + "-V", + "--version", + dest="version", + action="store_true", + help="Show version and exit.", +) + +quiet: Callable[..., Option] = partial( + Option, + "-q", + "--quiet", + dest="quiet", + action="count", + default=0, + help=( + "Give less output. Option is additive, and can be used up to 3" + " times (corresponding to WARNING, ERROR, and CRITICAL logging" + " levels)." + ), +) + +progress_bar: Callable[..., Option] = partial( + Option, + "--progress-bar", + dest="progress_bar", + type="choice", + choices=["on", "off", "raw"], + default="on", + help="Specify whether the progress bar should be used [on, off, raw] (default: on)", +) + +log: Callable[..., Option] = partial( + PipOption, + "--log", + "--log-file", + "--local-log", + dest="log", + metavar="path", + type="path", + help="Path to a verbose appending log.", +) + +no_input: Callable[..., Option] = partial( + Option, + # Don't ask for input + "--no-input", + dest="no_input", + action="store_true", + default=False, + help="Disable prompting for input.", +) + +keyring_provider: Callable[..., Option] = partial( + Option, + "--keyring-provider", + dest="keyring_provider", + choices=["auto", "disabled", "import", "subprocess"], + default="auto", + help=( + "Enable the credential lookup via the keyring library if user input is allowed." + " Specify which mechanism to use [auto, disabled, import, subprocess]." + " (default: %default)" + ), +) + +proxy: Callable[..., Option] = partial( + Option, + "--proxy", + dest="proxy", + type="str", + default="", + help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.", +) + +retries: Callable[..., Option] = partial( + Option, + "--retries", + dest="retries", + type="int", + default=5, + help="Maximum number of retries each connection should attempt " + "(default %default times).", +) + +timeout: Callable[..., Option] = partial( + Option, + "--timeout", + "--default-timeout", + metavar="sec", + dest="timeout", + type="float", + default=15, + help="Set the socket timeout (default %default seconds).", +) + + +def exists_action() -> Option: + return Option( + # Option when path already exist + "--exists-action", + dest="exists_action", + type="choice", + choices=["s", "i", "w", "b", "a"], + default=[], + action="append", + metavar="action", + help="Default action when a path already exists: " + "(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.", + ) + + +cert: Callable[..., Option] = partial( + PipOption, + "--cert", + dest="cert", + type="path", + metavar="path", + help=( + "Path to PEM-encoded CA certificate bundle. " + "If provided, overrides the default. " + "See 'SSL Certificate Verification' in pip documentation " + "for more information." + ), +) + +client_cert: Callable[..., Option] = partial( + PipOption, + "--client-cert", + dest="client_cert", + type="path", + default=None, + metavar="path", + help="Path to SSL client certificate, a single file containing the " + "private key and the certificate in PEM format.", +) + +index_url: Callable[..., Option] = partial( + Option, + "-i", + "--index-url", + "--pypi-url", + dest="index_url", + metavar="URL", + default=PyPI.simple_url, + help="Base URL of the Python Package Index (default %default). " + "This should point to a repository compliant with PEP 503 " + "(the simple repository API) or a local directory laid out " + "in the same format.", +) + + +def extra_index_url() -> Option: + return Option( + "--extra-index-url", + dest="extra_index_urls", + metavar="URL", + action="append", + default=[], + help="Extra URLs of package indexes to use in addition to " + "--index-url. Should follow the same rules as " + "--index-url.", + ) + + +no_index: Callable[..., Option] = partial( + Option, + "--no-index", + dest="no_index", + action="store_true", + default=False, + help="Ignore package index (only looking at --find-links URLs instead).", +) + + +def find_links() -> Option: + return Option( + "-f", + "--find-links", + dest="find_links", + action="append", + default=[], + metavar="url", + help="If a URL or path to an html file, then parse for links to " + "archives such as sdist (.tar.gz) or wheel (.whl) files. " + "If a local path or file:// URL that's a directory, " + "then look for archives in the directory listing. " + "Links to VCS project URLs are not supported.", + ) + + +def trusted_host() -> Option: + return Option( + "--trusted-host", + dest="trusted_hosts", + action="append", + metavar="HOSTNAME", + default=[], + help="Mark this host or host:port pair as trusted, even though it " + "does not have valid or any HTTPS.", + ) + + +def constraints() -> Option: + return Option( + "-c", + "--constraint", + dest="constraints", + action="append", + default=[], + metavar="file", + help="Constrain versions using the given constraints file. " + "This option can be used multiple times.", + ) + + +def requirements() -> Option: + return Option( + "-r", + "--requirement", + dest="requirements", + action="append", + default=[], + metavar="file", + help="Install from the given requirements file. " + "This option can be used multiple times.", + ) + + +def editable() -> Option: + return Option( + "-e", + "--editable", + dest="editables", + action="append", + default=[], + metavar="path/url", + help=( + "Install a project in editable mode (i.e. setuptools " + '"develop mode") from a local project path or a VCS url.' + ), + ) + + +def _handle_src(option: Option, opt_str: str, value: str, parser: OptionParser) -> None: + value = os.path.abspath(value) + setattr(parser.values, option.dest, value) + + +src: Callable[..., Option] = partial( + PipOption, + "--src", + "--source", + "--source-dir", + "--source-directory", + dest="src_dir", + type="path", + metavar="dir", + default=get_src_prefix(), + action="callback", + callback=_handle_src, + help="Directory to check out editable projects into. " + 'The default in a virtualenv is "/src". ' + 'The default for global installs is "/src".', +) + + +def _get_format_control(values: Values, option: Option) -> Any: + """Get a format_control object.""" + return getattr(values, option.dest) + + +def _handle_no_binary( + option: Option, opt_str: str, value: str, parser: OptionParser +) -> None: + existing = _get_format_control(parser.values, option) + FormatControl.handle_mutual_excludes( + value, + existing.no_binary, + existing.only_binary, + ) + + +def _handle_only_binary( + option: Option, opt_str: str, value: str, parser: OptionParser +) -> None: + existing = _get_format_control(parser.values, option) + FormatControl.handle_mutual_excludes( + value, + existing.only_binary, + existing.no_binary, + ) + + +def no_binary() -> Option: + format_control = FormatControl(set(), set()) + return Option( + "--no-binary", + dest="format_control", + action="callback", + callback=_handle_no_binary, + type="str", + default=format_control, + help="Do not use binary packages. Can be supplied multiple times, and " + 'each time adds to the existing value. Accepts either ":all:" to ' + 'disable all binary packages, ":none:" to empty the set (notice ' + "the colons), or one or more package names with commas between " + "them (no colons). Note that some packages are tricky to compile " + "and may fail to install when this option is used on them.", + ) + + +def only_binary() -> Option: + format_control = FormatControl(set(), set()) + return Option( + "--only-binary", + dest="format_control", + action="callback", + callback=_handle_only_binary, + type="str", + default=format_control, + help="Do not use source packages. Can be supplied multiple times, and " + 'each time adds to the existing value. Accepts either ":all:" to ' + 'disable all source packages, ":none:" to empty the set, or one ' + "or more package names with commas between them. Packages " + "without binary distributions will fail to install when this " + "option is used on them.", + ) + + +platforms: Callable[..., Option] = partial( + Option, + "--platform", + dest="platforms", + metavar="platform", + action="append", + default=None, + help=( + "Only use wheels compatible with . Defaults to the " + "platform of the running system. Use this option multiple times to " + "specify multiple platforms supported by the target interpreter." + ), +) + + +# This was made a separate function for unit-testing purposes. +def _convert_python_version(value: str) -> Tuple[Tuple[int, ...], Optional[str]]: + """ + Convert a version string like "3", "37", or "3.7.3" into a tuple of ints. + + :return: A 2-tuple (version_info, error_msg), where `error_msg` is + non-None if and only if there was a parsing error. + """ + if not value: + # The empty string is the same as not providing a value. + return (None, None) + + parts = value.split(".") + if len(parts) > 3: + return ((), "at most three version parts are allowed") + + if len(parts) == 1: + # Then we are in the case of "3" or "37". + value = parts[0] + if len(value) > 1: + parts = [value[0], value[1:]] + + try: + version_info = tuple(int(part) for part in parts) + except ValueError: + return ((), "each version part must be an integer") + + return (version_info, None) + + +def _handle_python_version( + option: Option, opt_str: str, value: str, parser: OptionParser +) -> None: + """ + Handle a provided --python-version value. + """ + version_info, error_msg = _convert_python_version(value) + if error_msg is not None: + msg = f"invalid --python-version value: {value!r}: {error_msg}" + raise_option_error(parser, option=option, msg=msg) + + parser.values.python_version = version_info + + +python_version: Callable[..., Option] = partial( + Option, + "--python-version", + dest="python_version", + metavar="python_version", + action="callback", + callback=_handle_python_version, + type="str", + default=None, + help=dedent( + """\ + The Python interpreter version to use for wheel and "Requires-Python" + compatibility checks. Defaults to a version derived from the running + interpreter. The version can be specified using up to three dot-separated + integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor + version can also be given as a string without dots (e.g. "37" for 3.7.0). + """ + ), +) + + +implementation: Callable[..., Option] = partial( + Option, + "--implementation", + dest="implementation", + metavar="implementation", + default=None, + help=( + "Only use wheels compatible with Python " + "implementation , e.g. 'pp', 'jy', 'cp', " + " or 'ip'. If not specified, then the current " + "interpreter implementation is used. Use 'py' to force " + "implementation-agnostic wheels." + ), +) + + +abis: Callable[..., Option] = partial( + Option, + "--abi", + dest="abis", + metavar="abi", + action="append", + default=None, + help=( + "Only use wheels compatible with Python abi , e.g. 'pypy_41'. " + "If not specified, then the current interpreter abi tag is used. " + "Use this option multiple times to specify multiple abis supported " + "by the target interpreter. Generally you will need to specify " + "--implementation, --platform, and --python-version when using this " + "option." + ), +) + + +def add_target_python_options(cmd_opts: OptionGroup) -> None: + cmd_opts.add_option(platforms()) + cmd_opts.add_option(python_version()) + cmd_opts.add_option(implementation()) + cmd_opts.add_option(abis()) + + +def make_target_python(options: Values) -> TargetPython: + target_python = TargetPython( + platforms=options.platforms, + py_version_info=options.python_version, + abis=options.abis, + implementation=options.implementation, + ) + + return target_python + + +def prefer_binary() -> Option: + return Option( + "--prefer-binary", + dest="prefer_binary", + action="store_true", + default=False, + help=( + "Prefer binary packages over source packages, even if the " + "source packages are newer." + ), + ) + + +cache_dir: Callable[..., Option] = partial( + PipOption, + "--cache-dir", + dest="cache_dir", + default=USER_CACHE_DIR, + metavar="dir", + type="path", + help="Store the cache data in .", +) + + +def _handle_no_cache_dir( + option: Option, opt: str, value: str, parser: OptionParser +) -> None: + """ + Process a value provided for the --no-cache-dir option. + + This is an optparse.Option callback for the --no-cache-dir option. + """ + # The value argument will be None if --no-cache-dir is passed via the + # command-line, since the option doesn't accept arguments. However, + # the value can be non-None if the option is triggered e.g. by an + # environment variable, like PIP_NO_CACHE_DIR=true. + if value is not None: + # Then parse the string value to get argument error-checking. + try: + strtobool(value) + except ValueError as exc: + raise_option_error(parser, option=option, msg=str(exc)) + + # Originally, setting PIP_NO_CACHE_DIR to a value that strtobool() + # converted to 0 (like "false" or "no") caused cache_dir to be disabled + # rather than enabled (logic would say the latter). Thus, we disable + # the cache directory not just on values that parse to True, but (for + # backwards compatibility reasons) also on values that parse to False. + # In other words, always set it to False if the option is provided in + # some (valid) form. + parser.values.cache_dir = False + + +no_cache: Callable[..., Option] = partial( + Option, + "--no-cache-dir", + dest="cache_dir", + action="callback", + callback=_handle_no_cache_dir, + help="Disable the cache.", +) + +no_deps: Callable[..., Option] = partial( + Option, + "--no-deps", + "--no-dependencies", + dest="ignore_dependencies", + action="store_true", + default=False, + help="Don't install package dependencies.", +) + +ignore_requires_python: Callable[..., Option] = partial( + Option, + "--ignore-requires-python", + dest="ignore_requires_python", + action="store_true", + help="Ignore the Requires-Python information.", +) + +no_build_isolation: Callable[..., Option] = partial( + Option, + "--no-build-isolation", + dest="build_isolation", + action="store_false", + default=True, + help="Disable isolation when building a modern source distribution. " + "Build dependencies specified by PEP 518 must be already installed " + "if this option is used.", +) + +check_build_deps: Callable[..., Option] = partial( + Option, + "--check-build-dependencies", + dest="check_build_deps", + action="store_true", + default=False, + help="Check the build dependencies when PEP517 is used.", +) + + +def _handle_no_use_pep517( + option: Option, opt: str, value: str, parser: OptionParser +) -> None: + """ + Process a value provided for the --no-use-pep517 option. + + This is an optparse.Option callback for the no_use_pep517 option. + """ + # Since --no-use-pep517 doesn't accept arguments, the value argument + # will be None if --no-use-pep517 is passed via the command-line. + # However, the value can be non-None if the option is triggered e.g. + # by an environment variable, for example "PIP_NO_USE_PEP517=true". + if value is not None: + msg = """A value was passed for --no-use-pep517, + probably using either the PIP_NO_USE_PEP517 environment variable + or the "no-use-pep517" config file option. Use an appropriate value + of the PIP_USE_PEP517 environment variable or the "use-pep517" + config file option instead. + """ + raise_option_error(parser, option=option, msg=msg) + + # If user doesn't wish to use pep517, we check if setuptools and wheel are installed + # and raise error if it is not. + packages = ("setuptools", "wheel") + if not all(importlib.util.find_spec(package) for package in packages): + msg = ( + f"It is not possible to use --no-use-pep517 " + f"without {' and '.join(packages)} installed." + ) + raise_option_error(parser, option=option, msg=msg) + + # Otherwise, --no-use-pep517 was passed via the command-line. + parser.values.use_pep517 = False + + +use_pep517: Any = partial( + Option, + "--use-pep517", + dest="use_pep517", + action="store_true", + default=None, + help="Use PEP 517 for building source distributions " + "(use --no-use-pep517 to force legacy behaviour).", +) + +no_use_pep517: Any = partial( + Option, + "--no-use-pep517", + dest="use_pep517", + action="callback", + callback=_handle_no_use_pep517, + default=None, + help=SUPPRESS_HELP, +) + + +def _handle_config_settings( + option: Option, opt_str: str, value: str, parser: OptionParser +) -> None: + key, sep, val = value.partition("=") + if sep != "=": + parser.error(f"Arguments to {opt_str} must be of the form KEY=VAL") + dest = getattr(parser.values, option.dest) + if dest is None: + dest = {} + setattr(parser.values, option.dest, dest) + if key in dest: + if isinstance(dest[key], list): + dest[key].append(val) + else: + dest[key] = [dest[key], val] + else: + dest[key] = val + + +config_settings: Callable[..., Option] = partial( + Option, + "-C", + "--config-settings", + dest="config_settings", + type=str, + action="callback", + callback=_handle_config_settings, + metavar="settings", + help="Configuration settings to be passed to the PEP 517 build backend. " + "Settings take the form KEY=VALUE. Use multiple --config-settings options " + "to pass multiple keys to the backend.", +) + +build_options: Callable[..., Option] = partial( + Option, + "--build-option", + dest="build_options", + metavar="options", + action="append", + help="Extra arguments to be supplied to 'setup.py bdist_wheel'.", +) + +global_options: Callable[..., Option] = partial( + Option, + "--global-option", + dest="global_options", + action="append", + metavar="options", + help="Extra global options to be supplied to the setup.py " + "call before the install or bdist_wheel command.", +) + +no_clean: Callable[..., Option] = partial( + Option, + "--no-clean", + action="store_true", + default=False, + help="Don't clean up build directories.", +) + +pre: Callable[..., Option] = partial( + Option, + "--pre", + action="store_true", + default=False, + help="Include pre-release and development versions. By default, " + "pip only finds stable versions.", +) + +disable_pip_version_check: Callable[..., Option] = partial( + Option, + "--disable-pip-version-check", + dest="disable_pip_version_check", + action="store_true", + default=False, + help="Don't periodically check PyPI to determine whether a new version " + "of pip is available for download. Implied with --no-index.", +) + +root_user_action: Callable[..., Option] = partial( + Option, + "--root-user-action", + dest="root_user_action", + default="warn", + choices=["warn", "ignore"], + help="Action if pip is run as a root user [warn, ignore] (default: warn)", +) + + +def _handle_merge_hash( + option: Option, opt_str: str, value: str, parser: OptionParser +) -> None: + """Given a value spelled "algo:digest", append the digest to a list + pointed to in a dict by the algo name.""" + if not parser.values.hashes: + parser.values.hashes = {} + try: + algo, digest = value.split(":", 1) + except ValueError: + parser.error( + f"Arguments to {opt_str} must be a hash name " + "followed by a value, like --hash=sha256:" + "abcde..." + ) + if algo not in STRONG_HASHES: + parser.error( + "Allowed hash algorithms for {} are {}.".format( + opt_str, ", ".join(STRONG_HASHES) + ) + ) + parser.values.hashes.setdefault(algo, []).append(digest) + + +hash: Callable[..., Option] = partial( + Option, + "--hash", + # Hash values eventually end up in InstallRequirement.hashes due to + # __dict__ copying in process_line(). + dest="hashes", + action="callback", + callback=_handle_merge_hash, + type="string", + help="Verify that the package's archive matches this " + "hash before installing. Example: --hash=sha256:abcdef...", +) + + +require_hashes: Callable[..., Option] = partial( + Option, + "--require-hashes", + dest="require_hashes", + action="store_true", + default=False, + help="Require a hash to check each requirement against, for " + "repeatable installs. This option is implied when any package in a " + "requirements file has a --hash option.", +) + + +list_path: Callable[..., Option] = partial( + PipOption, + "--path", + dest="path", + type="path", + action="append", + help="Restrict to the specified installation path for listing " + "packages (can be used multiple times).", +) + + +def check_list_path_option(options: Values) -> None: + if options.path and (options.user or options.local): + raise CommandError("Cannot combine '--path' with '--user' or '--local'") + + +list_exclude: Callable[..., Option] = partial( + PipOption, + "--exclude", + dest="excludes", + action="append", + metavar="package", + type="package_name", + help="Exclude specified package from the output", +) + + +no_python_version_warning: Callable[..., Option] = partial( + Option, + "--no-python-version-warning", + dest="no_python_version_warning", + action="store_true", + default=False, + help="Silence deprecation warnings for upcoming unsupported Pythons.", +) + + +# Features that are now always on. A warning is printed if they are used. +ALWAYS_ENABLED_FEATURES = [ + "truststore", # always on since 24.2 + "no-binary-enable-wheel-cache", # always on since 23.1 +] + +use_new_feature: Callable[..., Option] = partial( + Option, + "--use-feature", + dest="features_enabled", + metavar="feature", + action="append", + default=[], + choices=[ + "fast-deps", + ] + + ALWAYS_ENABLED_FEATURES, + help="Enable new functionality, that may be backward incompatible.", +) + +use_deprecated_feature: Callable[..., Option] = partial( + Option, + "--use-deprecated", + dest="deprecated_features_enabled", + metavar="feature", + action="append", + default=[], + choices=[ + "legacy-resolver", + "legacy-certs", + ], + help=("Enable deprecated functionality, that will be removed in the future."), +) + + +########## +# groups # +########## + +general_group: Dict[str, Any] = { + "name": "General Options", + "options": [ + help_, + debug_mode, + isolated_mode, + require_virtualenv, + python, + verbose, + version, + quiet, + log, + no_input, + keyring_provider, + proxy, + retries, + timeout, + exists_action, + trusted_host, + cert, + client_cert, + cache_dir, + no_cache, + disable_pip_version_check, + no_color, + no_python_version_warning, + use_new_feature, + use_deprecated_feature, + ], +} + +index_group: Dict[str, Any] = { + "name": "Package Index Options", + "options": [ + index_url, + extra_index_url, + no_index, + find_links, + ], +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/command_context.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/command_context.py new file mode 100644 index 0000000000000000000000000000000000000000..139995ac3f109a82664e4913f7ebc32ecf7617e1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/command_context.py @@ -0,0 +1,27 @@ +from contextlib import ExitStack, contextmanager +from typing import ContextManager, Generator, TypeVar + +_T = TypeVar("_T", covariant=True) + + +class CommandContextMixIn: + def __init__(self) -> None: + super().__init__() + self._in_main_context = False + self._main_context = ExitStack() + + @contextmanager + def main_context(self) -> Generator[None, None, None]: + assert not self._in_main_context + + self._in_main_context = True + try: + with self._main_context: + yield + finally: + self._in_main_context = False + + def enter_context(self, context_provider: ContextManager[_T]) -> _T: + assert self._in_main_context + + return self._main_context.enter_context(context_provider) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/index_command.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/index_command.py new file mode 100644 index 0000000000000000000000000000000000000000..295108ed605d678c6d26f0a489481eb381d02e7e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/index_command.py @@ -0,0 +1,171 @@ +""" +Contains command classes which may interact with an index / the network. + +Unlike its sister module, req_command, this module still uses lazy imports +so commands which don't always hit the network (e.g. list w/o --outdated or +--uptodate) don't need waste time importing PipSession and friends. +""" + +import logging +import os +import sys +from optparse import Values +from typing import TYPE_CHECKING, List, Optional + +from pip._vendor import certifi + +from pip._internal.cli.base_command import Command +from pip._internal.cli.command_context import CommandContextMixIn + +if TYPE_CHECKING: + from ssl import SSLContext + + from pip._internal.network.session import PipSession + +logger = logging.getLogger(__name__) + + +def _create_truststore_ssl_context() -> Optional["SSLContext"]: + if sys.version_info < (3, 10): + logger.debug("Disabling truststore because Python version isn't 3.10+") + return None + + try: + import ssl + except ImportError: + logger.warning("Disabling truststore since ssl support is missing") + return None + + try: + from pip._vendor import truststore + except ImportError: + logger.warning("Disabling truststore because platform isn't supported") + return None + + ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + ctx.load_verify_locations(certifi.where()) + return ctx + + +class SessionCommandMixin(CommandContextMixIn): + """ + A class mixin for command classes needing _build_session(). + """ + + def __init__(self) -> None: + super().__init__() + self._session: Optional[PipSession] = None + + @classmethod + def _get_index_urls(cls, options: Values) -> Optional[List[str]]: + """Return a list of index urls from user-provided options.""" + index_urls = [] + if not getattr(options, "no_index", False): + url = getattr(options, "index_url", None) + if url: + index_urls.append(url) + urls = getattr(options, "extra_index_urls", None) + if urls: + index_urls.extend(urls) + # Return None rather than an empty list + return index_urls or None + + def get_default_session(self, options: Values) -> "PipSession": + """Get a default-managed session.""" + if self._session is None: + self._session = self.enter_context(self._build_session(options)) + # there's no type annotation on requests.Session, so it's + # automatically ContextManager[Any] and self._session becomes Any, + # then https://github.com/python/mypy/issues/7696 kicks in + assert self._session is not None + return self._session + + def _build_session( + self, + options: Values, + retries: Optional[int] = None, + timeout: Optional[int] = None, + ) -> "PipSession": + from pip._internal.network.session import PipSession + + cache_dir = options.cache_dir + assert not cache_dir or os.path.isabs(cache_dir) + + if "legacy-certs" not in options.deprecated_features_enabled: + ssl_context = _create_truststore_ssl_context() + else: + ssl_context = None + + session = PipSession( + cache=os.path.join(cache_dir, "http-v2") if cache_dir else None, + retries=retries if retries is not None else options.retries, + trusted_hosts=options.trusted_hosts, + index_urls=self._get_index_urls(options), + ssl_context=ssl_context, + ) + + # Handle custom ca-bundles from the user + if options.cert: + session.verify = options.cert + + # Handle SSL client certificate + if options.client_cert: + session.cert = options.client_cert + + # Handle timeouts + if options.timeout or timeout: + session.timeout = timeout if timeout is not None else options.timeout + + # Handle configured proxies + if options.proxy: + session.proxies = { + "http": options.proxy, + "https": options.proxy, + } + session.trust_env = False + session.pip_proxy = options.proxy + + # Determine if we can prompt the user for authentication or not + session.auth.prompting = not options.no_input + session.auth.keyring_provider = options.keyring_provider + + return session + + +def _pip_self_version_check(session: "PipSession", options: Values) -> None: + from pip._internal.self_outdated_check import pip_self_version_check as check + + check(session, options) + + +class IndexGroupCommand(Command, SessionCommandMixin): + """ + Abstract base class for commands with the index_group options. + + This also corresponds to the commands that permit the pip version check. + """ + + def handle_pip_version_check(self, options: Values) -> None: + """ + Do the pip version check if not disabled. + + This overrides the default behavior of not doing the check. + """ + # Make sure the index_group options are present. + assert hasattr(options, "no_index") + + if options.disable_pip_version_check or options.no_index: + return + + try: + # Otherwise, check if we're using the latest version of pip available. + session = self._build_session( + options, + retries=0, + timeout=min(5, options.timeout), + ) + with session: + _pip_self_version_check(session, options) + except Exception: + logger.warning("There was an error checking the latest version of pip.") + logger.debug("See below for error", exc_info=True) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main.py new file mode 100644 index 0000000000000000000000000000000000000000..563ac79c98460809f8f349d254a4f16dbda2f7e0 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main.py @@ -0,0 +1,80 @@ +"""Primary application entrypoint. +""" + +import locale +import logging +import os +import sys +import warnings +from typing import List, Optional + +from pip._internal.cli.autocompletion import autocomplete +from pip._internal.cli.main_parser import parse_command +from pip._internal.commands import create_command +from pip._internal.exceptions import PipError +from pip._internal.utils import deprecation + +logger = logging.getLogger(__name__) + + +# Do not import and use main() directly! Using it directly is actively +# discouraged by pip's maintainers. The name, location and behavior of +# this function is subject to change, so calling it directly is not +# portable across different pip versions. + +# In addition, running pip in-process is unsupported and unsafe. This is +# elaborated in detail at +# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program. +# That document also provides suggestions that should work for nearly +# all users that are considering importing and using main() directly. + +# However, we know that certain users will still want to invoke pip +# in-process. If you understand and accept the implications of using pip +# in an unsupported manner, the best approach is to use runpy to avoid +# depending on the exact location of this entry point. + +# The following example shows how to use runpy to invoke pip in that +# case: +# +# sys.argv = ["pip", your, args, here] +# runpy.run_module("pip", run_name="__main__") +# +# Note that this will exit the process after running, unlike a direct +# call to main. As it is not safe to do any processing after calling +# main, this should not be an issue in practice. + + +def main(args: Optional[List[str]] = None) -> int: + if args is None: + args = sys.argv[1:] + + # Suppress the pkg_resources deprecation warning + # Note - we use a module of .*pkg_resources to cover + # the normal case (pip._vendor.pkg_resources) and the + # devendored case (a bare pkg_resources) + warnings.filterwarnings( + action="ignore", category=DeprecationWarning, module=".*pkg_resources" + ) + + # Configure our deprecation warnings to be sent through loggers + deprecation.install_warning_logger() + + autocomplete() + + try: + cmd_name, cmd_args = parse_command(args) + except PipError as exc: + sys.stderr.write(f"ERROR: {exc}") + sys.stderr.write(os.linesep) + sys.exit(1) + + # Needed for locale.getpreferredencoding(False) to work + # in pip._internal.utils.encoding.auto_decode + try: + locale.setlocale(locale.LC_ALL, "") + except locale.Error as e: + # setlocale can apparently crash if locale are uninitialized + logger.debug("Ignoring error %s when setting locale", e) + command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) + + return command.main(cmd_args) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..5ade356b9c2f3e375bf598635627870f248c0cc3 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py @@ -0,0 +1,134 @@ +"""A single place for constructing and exposing the main parser +""" + +import os +import subprocess +import sys +from typing import List, Optional, Tuple + +from pip._internal.build_env import get_runnable_pip +from pip._internal.cli import cmdoptions +from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter +from pip._internal.commands import commands_dict, get_similar_commands +from pip._internal.exceptions import CommandError +from pip._internal.utils.misc import get_pip_version, get_prog + +__all__ = ["create_main_parser", "parse_command"] + + +def create_main_parser() -> ConfigOptionParser: + """Creates and returns the main parser for pip's CLI""" + + parser = ConfigOptionParser( + usage="\n%prog [options]", + add_help_option=False, + formatter=UpdatingDefaultsHelpFormatter(), + name="global", + prog=get_prog(), + ) + parser.disable_interspersed_args() + + parser.version = get_pip_version() + + # add the general options + gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser) + parser.add_option_group(gen_opts) + + # so the help formatter knows + parser.main = True # type: ignore + + # create command listing for description + description = [""] + [ + f"{name:27} {command_info.summary}" + for name, command_info in commands_dict.items() + ] + parser.description = "\n".join(description) + + return parser + + +def identify_python_interpreter(python: str) -> Optional[str]: + # If the named file exists, use it. + # If it's a directory, assume it's a virtual environment and + # look for the environment's Python executable. + if os.path.exists(python): + if os.path.isdir(python): + # bin/python for Unix, Scripts/python.exe for Windows + # Try both in case of odd cases like cygwin. + for exe in ("bin/python", "Scripts/python.exe"): + py = os.path.join(python, exe) + if os.path.exists(py): + return py + else: + return python + + # Could not find the interpreter specified + return None + + +def parse_command(args: List[str]) -> Tuple[str, List[str]]: + parser = create_main_parser() + + # Note: parser calls disable_interspersed_args(), so the result of this + # call is to split the initial args into the general options before the + # subcommand and everything else. + # For example: + # args: ['--timeout=5', 'install', '--user', 'INITools'] + # general_options: ['--timeout==5'] + # args_else: ['install', '--user', 'INITools'] + general_options, args_else = parser.parse_args(args) + + # --python + if general_options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ: + # Re-invoke pip using the specified Python interpreter + interpreter = identify_python_interpreter(general_options.python) + if interpreter is None: + raise CommandError( + f"Could not locate Python interpreter {general_options.python}" + ) + + pip_cmd = [ + interpreter, + get_runnable_pip(), + ] + pip_cmd.extend(args) + + # Set a flag so the child doesn't re-invoke itself, causing + # an infinite loop. + os.environ["_PIP_RUNNING_IN_SUBPROCESS"] = "1" + returncode = 0 + try: + proc = subprocess.run(pip_cmd) + returncode = proc.returncode + except (subprocess.SubprocessError, OSError) as exc: + raise CommandError(f"Failed to run pip under {interpreter}: {exc}") + sys.exit(returncode) + + # --version + if general_options.version: + sys.stdout.write(parser.version) + sys.stdout.write(os.linesep) + sys.exit() + + # pip || pip help -> print_help() + if not args_else or (args_else[0] == "help" and len(args_else) == 1): + parser.print_help() + sys.exit() + + # the subcommand name + cmd_name = args_else[0] + + if cmd_name not in commands_dict: + guess = get_similar_commands(cmd_name) + + msg = [f'unknown command "{cmd_name}"'] + if guess: + msg.append(f'maybe you meant "{guess}"') + + raise CommandError(" - ".join(msg)) + + # all the args without the subcommand + cmd_args = args[:] + cmd_args.remove(cmd_name) + + return cmd_name, cmd_args diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/parser.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/parser.py new file mode 100644 index 0000000000000000000000000000000000000000..bc4aca032d4adddbb7b9d8b0c981187aa11e40fc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/parser.py @@ -0,0 +1,294 @@ +"""Base option parser setup""" + +import logging +import optparse +import shutil +import sys +import textwrap +from contextlib import suppress +from typing import Any, Dict, Generator, List, NoReturn, Optional, Tuple + +from pip._internal.cli.status_codes import UNKNOWN_ERROR +from pip._internal.configuration import Configuration, ConfigurationError +from pip._internal.utils.misc import redact_auth_from_url, strtobool + +logger = logging.getLogger(__name__) + + +class PrettyHelpFormatter(optparse.IndentedHelpFormatter): + """A prettier/less verbose help formatter for optparse.""" + + def __init__(self, *args: Any, **kwargs: Any) -> None: + # help position must be aligned with __init__.parseopts.description + kwargs["max_help_position"] = 30 + kwargs["indent_increment"] = 1 + kwargs["width"] = shutil.get_terminal_size()[0] - 2 + super().__init__(*args, **kwargs) + + def format_option_strings(self, option: optparse.Option) -> str: + return self._format_option_strings(option) + + def _format_option_strings( + self, option: optparse.Option, mvarfmt: str = " <{}>", optsep: str = ", " + ) -> str: + """ + Return a comma-separated list of option strings and metavars. + + :param option: tuple of (short opt, long opt), e.g: ('-f', '--format') + :param mvarfmt: metavar format string + :param optsep: separator + """ + opts = [] + + if option._short_opts: + opts.append(option._short_opts[0]) + if option._long_opts: + opts.append(option._long_opts[0]) + if len(opts) > 1: + opts.insert(1, optsep) + + if option.takes_value(): + assert option.dest is not None + metavar = option.metavar or option.dest.lower() + opts.append(mvarfmt.format(metavar.lower())) + + return "".join(opts) + + def format_heading(self, heading: str) -> str: + if heading == "Options": + return "" + return heading + ":\n" + + def format_usage(self, usage: str) -> str: + """ + Ensure there is only one newline between usage and the first heading + if there is no description. + """ + msg = "\nUsage: {}\n".format(self.indent_lines(textwrap.dedent(usage), " ")) + return msg + + def format_description(self, description: Optional[str]) -> str: + # leave full control over description to us + if description: + if hasattr(self.parser, "main"): + label = "Commands" + else: + label = "Description" + # some doc strings have initial newlines, some don't + description = description.lstrip("\n") + # some doc strings have final newlines and spaces, some don't + description = description.rstrip() + # dedent, then reindent + description = self.indent_lines(textwrap.dedent(description), " ") + description = f"{label}:\n{description}\n" + return description + else: + return "" + + def format_epilog(self, epilog: Optional[str]) -> str: + # leave full control over epilog to us + if epilog: + return epilog + else: + return "" + + def indent_lines(self, text: str, indent: str) -> str: + new_lines = [indent + line for line in text.split("\n")] + return "\n".join(new_lines) + + +class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter): + """Custom help formatter for use in ConfigOptionParser. + + This is updates the defaults before expanding them, allowing + them to show up correctly in the help listing. + + Also redact auth from url type options + """ + + def expand_default(self, option: optparse.Option) -> str: + default_values = None + if self.parser is not None: + assert isinstance(self.parser, ConfigOptionParser) + self.parser._update_defaults(self.parser.defaults) + assert option.dest is not None + default_values = self.parser.defaults.get(option.dest) + help_text = super().expand_default(option) + + if default_values and option.metavar == "URL": + if isinstance(default_values, str): + default_values = [default_values] + + # If its not a list, we should abort and just return the help text + if not isinstance(default_values, list): + default_values = [] + + for val in default_values: + help_text = help_text.replace(val, redact_auth_from_url(val)) + + return help_text + + +class CustomOptionParser(optparse.OptionParser): + def insert_option_group( + self, idx: int, *args: Any, **kwargs: Any + ) -> optparse.OptionGroup: + """Insert an OptionGroup at a given position.""" + group = self.add_option_group(*args, **kwargs) + + self.option_groups.pop() + self.option_groups.insert(idx, group) + + return group + + @property + def option_list_all(self) -> List[optparse.Option]: + """Get a list of all options, including those in option groups.""" + res = self.option_list[:] + for i in self.option_groups: + res.extend(i.option_list) + + return res + + +class ConfigOptionParser(CustomOptionParser): + """Custom option parser which updates its defaults by checking the + configuration files and environmental variables""" + + def __init__( + self, + *args: Any, + name: str, + isolated: bool = False, + **kwargs: Any, + ) -> None: + self.name = name + self.config = Configuration(isolated) + + assert self.name + super().__init__(*args, **kwargs) + + def check_default(self, option: optparse.Option, key: str, val: Any) -> Any: + try: + return option.check_value(key, val) + except optparse.OptionValueError as exc: + print(f"An error occurred during configuration: {exc}") + sys.exit(3) + + def _get_ordered_configuration_items( + self, + ) -> Generator[Tuple[str, Any], None, None]: + # Configuration gives keys in an unordered manner. Order them. + override_order = ["global", self.name, ":env:"] + + # Pool the options into different groups + section_items: Dict[str, List[Tuple[str, Any]]] = { + name: [] for name in override_order + } + for section_key, val in self.config.items(): + # ignore empty values + if not val: + logger.debug( + "Ignoring configuration key '%s' as it's value is empty.", + section_key, + ) + continue + + section, key = section_key.split(".", 1) + if section in override_order: + section_items[section].append((key, val)) + + # Yield each group in their override order + for section in override_order: + for key, val in section_items[section]: + yield key, val + + def _update_defaults(self, defaults: Dict[str, Any]) -> Dict[str, Any]: + """Updates the given defaults with values from the config files and + the environ. Does a little special handling for certain types of + options (lists).""" + + # Accumulate complex default state. + self.values = optparse.Values(self.defaults) + late_eval = set() + # Then set the options with those values + for key, val in self._get_ordered_configuration_items(): + # '--' because configuration supports only long names + option = self.get_option("--" + key) + + # Ignore options not present in this parser. E.g. non-globals put + # in [global] by users that want them to apply to all applicable + # commands. + if option is None: + continue + + assert option.dest is not None + + if option.action in ("store_true", "store_false"): + try: + val = strtobool(val) + except ValueError: + self.error( + f"{val} is not a valid value for {key} option, " + "please specify a boolean value like yes/no, " + "true/false or 1/0 instead." + ) + elif option.action == "count": + with suppress(ValueError): + val = strtobool(val) + with suppress(ValueError): + val = int(val) + if not isinstance(val, int) or val < 0: + self.error( + f"{val} is not a valid value for {key} option, " + "please instead specify either a non-negative integer " + "or a boolean value like yes/no or false/true " + "which is equivalent to 1/0." + ) + elif option.action == "append": + val = val.split() + val = [self.check_default(option, key, v) for v in val] + elif option.action == "callback": + assert option.callback is not None + late_eval.add(option.dest) + opt_str = option.get_opt_string() + val = option.convert_value(opt_str, val) + # From take_action + args = option.callback_args or () + kwargs = option.callback_kwargs or {} + option.callback(option, opt_str, val, self, *args, **kwargs) + else: + val = self.check_default(option, key, val) + + defaults[option.dest] = val + + for key in late_eval: + defaults[key] = getattr(self.values, key) + self.values = None + return defaults + + def get_default_values(self) -> optparse.Values: + """Overriding to make updating the defaults after instantiation of + the option parser possible, _update_defaults() does the dirty work.""" + if not self.process_default_values: + # Old, pre-Optik 1.5 behaviour. + return optparse.Values(self.defaults) + + # Load the configuration, or error out in case of an error + try: + self.config.load() + except ConfigurationError as err: + self.exit(UNKNOWN_ERROR, str(err)) + + defaults = self._update_defaults(self.defaults.copy()) # ours + for option in self._get_all_options(): + assert option.dest is not None + default = defaults.get(option.dest) + if isinstance(default, str): + opt_str = option.get_opt_string() + defaults[option.dest] = option.check_value(opt_str, default) + return optparse.Values(defaults) + + def error(self, msg: str) -> NoReturn: + self.print_usage(sys.stderr) + self.exit(UNKNOWN_ERROR, f"{msg}\n") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py new file mode 100644 index 0000000000000000000000000000000000000000..3d9dde8ed88fd36ec9b11094427201529dcd0a40 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py @@ -0,0 +1,94 @@ +import functools +import sys +from typing import Callable, Generator, Iterable, Iterator, Optional, Tuple + +from pip._vendor.rich.progress import ( + BarColumn, + DownloadColumn, + FileSizeColumn, + Progress, + ProgressColumn, + SpinnerColumn, + TextColumn, + TimeElapsedColumn, + TimeRemainingColumn, + TransferSpeedColumn, +) + +from pip._internal.cli.spinners import RateLimiter +from pip._internal.utils.logging import get_indentation + +DownloadProgressRenderer = Callable[[Iterable[bytes]], Iterator[bytes]] + + +def _rich_progress_bar( + iterable: Iterable[bytes], + *, + bar_type: str, + size: Optional[int], +) -> Generator[bytes, None, None]: + assert bar_type == "on", "This should only be used in the default mode." + + if not size: + total = float("inf") + columns: Tuple[ProgressColumn, ...] = ( + TextColumn("[progress.description]{task.description}"), + SpinnerColumn("line", speed=1.5), + FileSizeColumn(), + TransferSpeedColumn(), + TimeElapsedColumn(), + ) + else: + total = size + columns = ( + TextColumn("[progress.description]{task.description}"), + BarColumn(), + DownloadColumn(), + TransferSpeedColumn(), + TextColumn("eta"), + TimeRemainingColumn(), + ) + + progress = Progress(*columns, refresh_per_second=5) + task_id = progress.add_task(" " * (get_indentation() + 2), total=total) + with progress: + for chunk in iterable: + yield chunk + progress.update(task_id, advance=len(chunk)) + + +def _raw_progress_bar( + iterable: Iterable[bytes], + *, + size: Optional[int], +) -> Generator[bytes, None, None]: + def write_progress(current: int, total: int) -> None: + sys.stdout.write(f"Progress {current} of {total}\n") + sys.stdout.flush() + + current = 0 + total = size or 0 + rate_limiter = RateLimiter(0.25) + + write_progress(current, total) + for chunk in iterable: + current += len(chunk) + if rate_limiter.ready() or current == total: + write_progress(current, total) + rate_limiter.reset() + yield chunk + + +def get_download_progress_renderer( + *, bar_type: str, size: Optional[int] = None +) -> DownloadProgressRenderer: + """Get an object that can be used to render the download progress. + + Returns a callable, that takes an iterable to "wrap". + """ + if bar_type == "on": + return functools.partial(_rich_progress_bar, bar_type=bar_type, size=size) + elif bar_type == "raw": + return functools.partial(_raw_progress_bar, size=size) + else: + return iter # no-op, when passed an iterator diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/req_command.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/req_command.py new file mode 100644 index 0000000000000000000000000000000000000000..92900f94ff4cb4b43126ca92964655fcb9016f50 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/req_command.py @@ -0,0 +1,329 @@ +"""Contains the RequirementCommand base class. + +This class is in a separate module so the commands that do not always +need PackageFinder capability don't unnecessarily import the +PackageFinder machinery and all its vendored dependencies, etc. +""" + +import logging +from functools import partial +from optparse import Values +from typing import Any, List, Optional, Tuple + +from pip._internal.cache import WheelCache +from pip._internal.cli import cmdoptions +from pip._internal.cli.index_command import IndexGroupCommand +from pip._internal.cli.index_command import SessionCommandMixin as SessionCommandMixin +from pip._internal.exceptions import CommandError, PreviousBuildDirError +from pip._internal.index.collector import LinkCollector +from pip._internal.index.package_finder import PackageFinder +from pip._internal.models.selection_prefs import SelectionPreferences +from pip._internal.models.target_python import TargetPython +from pip._internal.network.session import PipSession +from pip._internal.operations.build.build_tracker import BuildTracker +from pip._internal.operations.prepare import RequirementPreparer +from pip._internal.req.constructors import ( + install_req_from_editable, + install_req_from_line, + install_req_from_parsed_requirement, + install_req_from_req_string, +) +from pip._internal.req.req_file import parse_requirements +from pip._internal.req.req_install import InstallRequirement +from pip._internal.resolution.base import BaseResolver +from pip._internal.utils.temp_dir import ( + TempDirectory, + TempDirectoryTypeRegistry, + tempdir_kinds, +) + +logger = logging.getLogger(__name__) + + +KEEPABLE_TEMPDIR_TYPES = [ + tempdir_kinds.BUILD_ENV, + tempdir_kinds.EPHEM_WHEEL_CACHE, + tempdir_kinds.REQ_BUILD, +] + + +def with_cleanup(func: Any) -> Any: + """Decorator for common logic related to managing temporary + directories. + """ + + def configure_tempdir_registry(registry: TempDirectoryTypeRegistry) -> None: + for t in KEEPABLE_TEMPDIR_TYPES: + registry.set_delete(t, False) + + def wrapper( + self: RequirementCommand, options: Values, args: List[Any] + ) -> Optional[int]: + assert self.tempdir_registry is not None + if options.no_clean: + configure_tempdir_registry(self.tempdir_registry) + + try: + return func(self, options, args) + except PreviousBuildDirError: + # This kind of conflict can occur when the user passes an explicit + # build directory with a pre-existing folder. In that case we do + # not want to accidentally remove it. + configure_tempdir_registry(self.tempdir_registry) + raise + + return wrapper + + +class RequirementCommand(IndexGroupCommand): + def __init__(self, *args: Any, **kw: Any) -> None: + super().__init__(*args, **kw) + + self.cmd_opts.add_option(cmdoptions.no_clean()) + + @staticmethod + def determine_resolver_variant(options: Values) -> str: + """Determines which resolver should be used, based on the given options.""" + if "legacy-resolver" in options.deprecated_features_enabled: + return "legacy" + + return "resolvelib" + + @classmethod + def make_requirement_preparer( + cls, + temp_build_dir: TempDirectory, + options: Values, + build_tracker: BuildTracker, + session: PipSession, + finder: PackageFinder, + use_user_site: bool, + download_dir: Optional[str] = None, + verbosity: int = 0, + ) -> RequirementPreparer: + """ + Create a RequirementPreparer instance for the given parameters. + """ + temp_build_dir_path = temp_build_dir.path + assert temp_build_dir_path is not None + legacy_resolver = False + + resolver_variant = cls.determine_resolver_variant(options) + if resolver_variant == "resolvelib": + lazy_wheel = "fast-deps" in options.features_enabled + if lazy_wheel: + logger.warning( + "pip is using lazily downloaded wheels using HTTP " + "range requests to obtain dependency information. " + "This experimental feature is enabled through " + "--use-feature=fast-deps and it is not ready for " + "production." + ) + else: + legacy_resolver = True + lazy_wheel = False + if "fast-deps" in options.features_enabled: + logger.warning( + "fast-deps has no effect when used with the legacy resolver." + ) + + return RequirementPreparer( + build_dir=temp_build_dir_path, + src_dir=options.src_dir, + download_dir=download_dir, + build_isolation=options.build_isolation, + check_build_deps=options.check_build_deps, + build_tracker=build_tracker, + session=session, + progress_bar=options.progress_bar, + finder=finder, + require_hashes=options.require_hashes, + use_user_site=use_user_site, + lazy_wheel=lazy_wheel, + verbosity=verbosity, + legacy_resolver=legacy_resolver, + ) + + @classmethod + def make_resolver( + cls, + preparer: RequirementPreparer, + finder: PackageFinder, + options: Values, + wheel_cache: Optional[WheelCache] = None, + use_user_site: bool = False, + ignore_installed: bool = True, + ignore_requires_python: bool = False, + force_reinstall: bool = False, + upgrade_strategy: str = "to-satisfy-only", + use_pep517: Optional[bool] = None, + py_version_info: Optional[Tuple[int, ...]] = None, + ) -> BaseResolver: + """ + Create a Resolver instance for the given parameters. + """ + make_install_req = partial( + install_req_from_req_string, + isolated=options.isolated_mode, + use_pep517=use_pep517, + ) + resolver_variant = cls.determine_resolver_variant(options) + # The long import name and duplicated invocation is needed to convince + # Mypy into correctly typechecking. Otherwise it would complain the + # "Resolver" class being redefined. + if resolver_variant == "resolvelib": + import pip._internal.resolution.resolvelib.resolver + + return pip._internal.resolution.resolvelib.resolver.Resolver( + preparer=preparer, + finder=finder, + wheel_cache=wheel_cache, + make_install_req=make_install_req, + use_user_site=use_user_site, + ignore_dependencies=options.ignore_dependencies, + ignore_installed=ignore_installed, + ignore_requires_python=ignore_requires_python, + force_reinstall=force_reinstall, + upgrade_strategy=upgrade_strategy, + py_version_info=py_version_info, + ) + import pip._internal.resolution.legacy.resolver + + return pip._internal.resolution.legacy.resolver.Resolver( + preparer=preparer, + finder=finder, + wheel_cache=wheel_cache, + make_install_req=make_install_req, + use_user_site=use_user_site, + ignore_dependencies=options.ignore_dependencies, + ignore_installed=ignore_installed, + ignore_requires_python=ignore_requires_python, + force_reinstall=force_reinstall, + upgrade_strategy=upgrade_strategy, + py_version_info=py_version_info, + ) + + def get_requirements( + self, + args: List[str], + options: Values, + finder: PackageFinder, + session: PipSession, + ) -> List[InstallRequirement]: + """ + Parse command-line arguments into the corresponding requirements. + """ + requirements: List[InstallRequirement] = [] + for filename in options.constraints: + for parsed_req in parse_requirements( + filename, + constraint=True, + finder=finder, + options=options, + session=session, + ): + req_to_add = install_req_from_parsed_requirement( + parsed_req, + isolated=options.isolated_mode, + user_supplied=False, + ) + requirements.append(req_to_add) + + for req in args: + req_to_add = install_req_from_line( + req, + comes_from=None, + isolated=options.isolated_mode, + use_pep517=options.use_pep517, + user_supplied=True, + config_settings=getattr(options, "config_settings", None), + ) + requirements.append(req_to_add) + + for req in options.editables: + req_to_add = install_req_from_editable( + req, + user_supplied=True, + isolated=options.isolated_mode, + use_pep517=options.use_pep517, + config_settings=getattr(options, "config_settings", None), + ) + requirements.append(req_to_add) + + # NOTE: options.require_hashes may be set if --require-hashes is True + for filename in options.requirements: + for parsed_req in parse_requirements( + filename, finder=finder, options=options, session=session + ): + req_to_add = install_req_from_parsed_requirement( + parsed_req, + isolated=options.isolated_mode, + use_pep517=options.use_pep517, + user_supplied=True, + config_settings=( + parsed_req.options.get("config_settings") + if parsed_req.options + else None + ), + ) + requirements.append(req_to_add) + + # If any requirement has hash options, enable hash checking. + if any(req.has_hash_options for req in requirements): + options.require_hashes = True + + if not (args or options.editables or options.requirements): + opts = {"name": self.name} + if options.find_links: + raise CommandError( + "You must give at least one requirement to {name} " + '(maybe you meant "pip {name} {links}"?)'.format( + **dict(opts, links=" ".join(options.find_links)) + ) + ) + else: + raise CommandError( + "You must give at least one requirement to {name} " + '(see "pip help {name}")'.format(**opts) + ) + + return requirements + + @staticmethod + def trace_basic_info(finder: PackageFinder) -> None: + """ + Trace basic information about the provided objects. + """ + # Display where finder is looking for packages + search_scope = finder.search_scope + locations = search_scope.get_formatted_locations() + if locations: + logger.info(locations) + + def _build_package_finder( + self, + options: Values, + session: PipSession, + target_python: Optional[TargetPython] = None, + ignore_requires_python: Optional[bool] = None, + ) -> PackageFinder: + """ + Create a package finder appropriate to this requirement command. + + :param ignore_requires_python: Whether to ignore incompatible + "Requires-Python" values in links. Defaults to False. + """ + link_collector = LinkCollector.create(session, options=options) + selection_prefs = SelectionPreferences( + allow_yanked=True, + format_control=options.format_control, + allow_all_prereleases=options.pre, + prefer_binary=options.prefer_binary, + ignore_requires_python=ignore_requires_python, + ) + + return PackageFinder.create( + link_collector=link_collector, + selection_prefs=selection_prefs, + target_python=target_python, + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/spinners.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/spinners.py new file mode 100644 index 0000000000000000000000000000000000000000..cf2b976f377c2656afb3d84add8d30b0fc280c03 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/spinners.py @@ -0,0 +1,159 @@ +import contextlib +import itertools +import logging +import sys +import time +from typing import IO, Generator, Optional + +from pip._internal.utils.compat import WINDOWS +from pip._internal.utils.logging import get_indentation + +logger = logging.getLogger(__name__) + + +class SpinnerInterface: + def spin(self) -> None: + raise NotImplementedError() + + def finish(self, final_status: str) -> None: + raise NotImplementedError() + + +class InteractiveSpinner(SpinnerInterface): + def __init__( + self, + message: str, + file: Optional[IO[str]] = None, + spin_chars: str = "-\\|/", + # Empirically, 8 updates/second looks nice + min_update_interval_seconds: float = 0.125, + ): + self._message = message + if file is None: + file = sys.stdout + self._file = file + self._rate_limiter = RateLimiter(min_update_interval_seconds) + self._finished = False + + self._spin_cycle = itertools.cycle(spin_chars) + + self._file.write(" " * get_indentation() + self._message + " ... ") + self._width = 0 + + def _write(self, status: str) -> None: + assert not self._finished + # Erase what we wrote before by backspacing to the beginning, writing + # spaces to overwrite the old text, and then backspacing again + backup = "\b" * self._width + self._file.write(backup + " " * self._width + backup) + # Now we have a blank slate to add our status + self._file.write(status) + self._width = len(status) + self._file.flush() + self._rate_limiter.reset() + + def spin(self) -> None: + if self._finished: + return + if not self._rate_limiter.ready(): + return + self._write(next(self._spin_cycle)) + + def finish(self, final_status: str) -> None: + if self._finished: + return + self._write(final_status) + self._file.write("\n") + self._file.flush() + self._finished = True + + +# Used for dumb terminals, non-interactive installs (no tty), etc. +# We still print updates occasionally (once every 60 seconds by default) to +# act as a keep-alive for systems like Travis-CI that take lack-of-output as +# an indication that a task has frozen. +class NonInteractiveSpinner(SpinnerInterface): + def __init__(self, message: str, min_update_interval_seconds: float = 60.0) -> None: + self._message = message + self._finished = False + self._rate_limiter = RateLimiter(min_update_interval_seconds) + self._update("started") + + def _update(self, status: str) -> None: + assert not self._finished + self._rate_limiter.reset() + logger.info("%s: %s", self._message, status) + + def spin(self) -> None: + if self._finished: + return + if not self._rate_limiter.ready(): + return + self._update("still running...") + + def finish(self, final_status: str) -> None: + if self._finished: + return + self._update(f"finished with status '{final_status}'") + self._finished = True + + +class RateLimiter: + def __init__(self, min_update_interval_seconds: float) -> None: + self._min_update_interval_seconds = min_update_interval_seconds + self._last_update: float = 0 + + def ready(self) -> bool: + now = time.time() + delta = now - self._last_update + return delta >= self._min_update_interval_seconds + + def reset(self) -> None: + self._last_update = time.time() + + +@contextlib.contextmanager +def open_spinner(message: str) -> Generator[SpinnerInterface, None, None]: + # Interactive spinner goes directly to sys.stdout rather than being routed + # through the logging system, but it acts like it has level INFO, + # i.e. it's only displayed if we're at level INFO or better. + # Non-interactive spinner goes through the logging system, so it is always + # in sync with logging configuration. + if sys.stdout.isatty() and logger.getEffectiveLevel() <= logging.INFO: + spinner: SpinnerInterface = InteractiveSpinner(message) + else: + spinner = NonInteractiveSpinner(message) + try: + with hidden_cursor(sys.stdout): + yield spinner + except KeyboardInterrupt: + spinner.finish("canceled") + raise + except Exception: + spinner.finish("error") + raise + else: + spinner.finish("done") + + +HIDE_CURSOR = "\x1b[?25l" +SHOW_CURSOR = "\x1b[?25h" + + +@contextlib.contextmanager +def hidden_cursor(file: IO[str]) -> Generator[None, None, None]: + # The Windows terminal does not support the hide/show cursor ANSI codes, + # even via colorama. So don't even try. + if WINDOWS: + yield + # We don't want to clutter the output with control characters if we're + # writing to a file, or if the user is running with --quiet. + # See https://github.com/pypa/pip/issues/3418 + elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO: + yield + else: + file.write(HIDE_CURSOR) + try: + yield + finally: + file.write(SHOW_CURSOR) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py new file mode 100644 index 0000000000000000000000000000000000000000..5e29502cddfa9a9887a93399ab4193fb75dfe605 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py @@ -0,0 +1,6 @@ +SUCCESS = 0 +ERROR = 1 +UNKNOWN_ERROR = 2 +VIRTUALENV_NOT_FOUND = 3 +PREVIOUS_BUILD_DIR_ERROR = 4 +NO_MATCHES_FOUND = 23 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e33b73029641710bd82618753bf6b582ce9eaf2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd7d40133374a440cf34bcccb5bd4ea7bc2b90d1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27f85b7d9d081d8c7ac581e618ef350fed8b476d Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b373a45b5ad246ed4476bbe7f220ce1c3780bec0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6b8646aeff6d614d6c3db0bf4c787d7b47f2e06 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..578abf5cde0786f4bf3791f4fe3ff02ec67735c5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1baaee75693b2669178d4909ca9d1cfe0e3fa573 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..792f8fc8bbd5f8b3080826e402c44ca46d6a9b59 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a44558960f792471d48138d33839db2e972e18c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..768e38d599155f0856539a1a07b668d2ab55d135 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..503f09b24fc0ab791316616262b47c5532dcf007 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ea9353244866f2b310aac5bee660fa5cd9478ba Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4751c2228c1f452204f4fd64b7dbcc2929874dd Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20bdd5483a6e4a5151683fa22392ab8b43330c61 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae59628530d00ef20a7f34bfa9c8ced33d622993 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a171b56275caafb0947417a6a9684716940f91a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ac02198fd4156e4832d2e76f142d442193d0d190 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9adf30e02c7b3e93ef0ffdf27df8e4a959c878a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/configuration.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/configuration.py new file mode 100644 index 0000000000000000000000000000000000000000..1a1dc6b6cd841dc2a9f5666fb34d8120e612346e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/configuration.py @@ -0,0 +1,280 @@ +import logging +import os +import subprocess +from optparse import Values +from typing import Any, List, Optional + +from pip._internal.cli.base_command import Command +from pip._internal.cli.status_codes import ERROR, SUCCESS +from pip._internal.configuration import ( + Configuration, + Kind, + get_configuration_files, + kinds, +) +from pip._internal.exceptions import PipError +from pip._internal.utils.logging import indent_log +from pip._internal.utils.misc import get_prog, write_output + +logger = logging.getLogger(__name__) + + +class ConfigurationCommand(Command): + """ + Manage local and global configuration. + + Subcommands: + + - list: List the active configuration (or from the file specified) + - edit: Edit the configuration file in an editor + - get: Get the value associated with command.option + - set: Set the command.option=value + - unset: Unset the value associated with command.option + - debug: List the configuration files and values defined under them + + Configuration keys should be dot separated command and option name, + with the special prefix "global" affecting any command. For example, + "pip config set global.index-url https://example.org/" would configure + the index url for all commands, but "pip config set download.timeout 10" + would configure a 10 second timeout only for "pip download" commands. + + If none of --user, --global and --site are passed, a virtual + environment configuration file is used if one is active and the file + exists. Otherwise, all modifications happen to the user file by + default. + """ + + ignore_require_venv = True + usage = """ + %prog [] list + %prog [] [--editor ] edit + + %prog [] get command.option + %prog [] set command.option value + %prog [] unset command.option + %prog [] debug + """ + + def add_options(self) -> None: + self.cmd_opts.add_option( + "--editor", + dest="editor", + action="store", + default=None, + help=( + "Editor to use to edit the file. Uses VISUAL or EDITOR " + "environment variables if not provided." + ), + ) + + self.cmd_opts.add_option( + "--global", + dest="global_file", + action="store_true", + default=False, + help="Use the system-wide configuration file only", + ) + + self.cmd_opts.add_option( + "--user", + dest="user_file", + action="store_true", + default=False, + help="Use the user configuration file only", + ) + + self.cmd_opts.add_option( + "--site", + dest="site_file", + action="store_true", + default=False, + help="Use the current environment configuration file only", + ) + + self.parser.insert_option_group(0, self.cmd_opts) + + def run(self, options: Values, args: List[str]) -> int: + handlers = { + "list": self.list_values, + "edit": self.open_in_editor, + "get": self.get_name, + "set": self.set_name_value, + "unset": self.unset_name, + "debug": self.list_config_values, + } + + # Determine action + if not args or args[0] not in handlers: + logger.error( + "Need an action (%s) to perform.", + ", ".join(sorted(handlers)), + ) + return ERROR + + action = args[0] + + # Determine which configuration files are to be loaded + # Depends on whether the command is modifying. + try: + load_only = self._determine_file( + options, need_value=(action in ["get", "set", "unset", "edit"]) + ) + except PipError as e: + logger.error(e.args[0]) + return ERROR + + # Load a new configuration + self.configuration = Configuration( + isolated=options.isolated_mode, load_only=load_only + ) + self.configuration.load() + + # Error handling happens here, not in the action-handlers. + try: + handlers[action](options, args[1:]) + except PipError as e: + logger.error(e.args[0]) + return ERROR + + return SUCCESS + + def _determine_file(self, options: Values, need_value: bool) -> Optional[Kind]: + file_options = [ + key + for key, value in ( + (kinds.USER, options.user_file), + (kinds.GLOBAL, options.global_file), + (kinds.SITE, options.site_file), + ) + if value + ] + + if not file_options: + if not need_value: + return None + # Default to user, unless there's a site file. + elif any( + os.path.exists(site_config_file) + for site_config_file in get_configuration_files()[kinds.SITE] + ): + return kinds.SITE + else: + return kinds.USER + elif len(file_options) == 1: + return file_options[0] + + raise PipError( + "Need exactly one file to operate upon " + "(--user, --site, --global) to perform." + ) + + def list_values(self, options: Values, args: List[str]) -> None: + self._get_n_args(args, "list", n=0) + + for key, value in sorted(self.configuration.items()): + write_output("%s=%r", key, value) + + def get_name(self, options: Values, args: List[str]) -> None: + key = self._get_n_args(args, "get [name]", n=1) + value = self.configuration.get_value(key) + + write_output("%s", value) + + def set_name_value(self, options: Values, args: List[str]) -> None: + key, value = self._get_n_args(args, "set [name] [value]", n=2) + self.configuration.set_value(key, value) + + self._save_configuration() + + def unset_name(self, options: Values, args: List[str]) -> None: + key = self._get_n_args(args, "unset [name]", n=1) + self.configuration.unset_value(key) + + self._save_configuration() + + def list_config_values(self, options: Values, args: List[str]) -> None: + """List config key-value pairs across different config files""" + self._get_n_args(args, "debug", n=0) + + self.print_env_var_values() + # Iterate over config files and print if they exist, and the + # key-value pairs present in them if they do + for variant, files in sorted(self.configuration.iter_config_files()): + write_output("%s:", variant) + for fname in files: + with indent_log(): + file_exists = os.path.exists(fname) + write_output("%s, exists: %r", fname, file_exists) + if file_exists: + self.print_config_file_values(variant) + + def print_config_file_values(self, variant: Kind) -> None: + """Get key-value pairs from the file of a variant""" + for name, value in self.configuration.get_values_in_config(variant).items(): + with indent_log(): + write_output("%s: %s", name, value) + + def print_env_var_values(self) -> None: + """Get key-values pairs present as environment variables""" + write_output("%s:", "env_var") + with indent_log(): + for key, value in sorted(self.configuration.get_environ_vars()): + env_var = f"PIP_{key.upper()}" + write_output("%s=%r", env_var, value) + + def open_in_editor(self, options: Values, args: List[str]) -> None: + editor = self._determine_editor(options) + + fname = self.configuration.get_file_to_edit() + if fname is None: + raise PipError("Could not determine appropriate file.") + elif '"' in fname: + # This shouldn't happen, unless we see a username like that. + # If that happens, we'd appreciate a pull request fixing this. + raise PipError( + f'Can not open an editor for a file name containing "\n{fname}' + ) + + try: + subprocess.check_call(f'{editor} "{fname}"', shell=True) + except FileNotFoundError as e: + if not e.filename: + e.filename = editor + raise + except subprocess.CalledProcessError as e: + raise PipError(f"Editor Subprocess exited with exit code {e.returncode}") + + def _get_n_args(self, args: List[str], example: str, n: int) -> Any: + """Helper to make sure the command got the right number of arguments""" + if len(args) != n: + msg = ( + f"Got unexpected number of arguments, expected {n}. " + f'(example: "{get_prog()} config {example}")' + ) + raise PipError(msg) + + if n == 1: + return args[0] + else: + return args + + def _save_configuration(self) -> None: + # We successfully ran a modifying command. Need to save the + # configuration. + try: + self.configuration.save() + except Exception: + logger.exception( + "Unable to save configuration. Please report this as a bug." + ) + raise PipError("Internal Error.") + + def _determine_editor(self, options: Values) -> str: + if options.editor is not None: + return options.editor + elif "VISUAL" in os.environ: + return os.environ["VISUAL"] + elif "EDITOR" in os.environ: + return os.environ["EDITOR"] + else: + raise PipError("Could not determine editor to use.") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/download.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/download.py new file mode 100644 index 0000000000000000000000000000000000000000..917bbb91d83cbb81a5814d510b5dd3bdd6c0f510 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/download.py @@ -0,0 +1,146 @@ +import logging +import os +from optparse import Values +from typing import List + +from pip._internal.cli import cmdoptions +from pip._internal.cli.cmdoptions import make_target_python +from pip._internal.cli.req_command import RequirementCommand, with_cleanup +from pip._internal.cli.status_codes import SUCCESS +from pip._internal.operations.build.build_tracker import get_build_tracker +from pip._internal.req.req_install import check_legacy_setup_py_options +from pip._internal.utils.misc import ensure_dir, normalize_path, write_output +from pip._internal.utils.temp_dir import TempDirectory + +logger = logging.getLogger(__name__) + + +class DownloadCommand(RequirementCommand): + """ + Download packages from: + + - PyPI (and other indexes) using requirement specifiers. + - VCS project urls. + - Local project directories. + - Local or remote source archives. + + pip also supports downloading from "requirements files", which provide + an easy way to specify a whole environment to be downloaded. + """ + + usage = """ + %prog [options] [package-index-options] ... + %prog [options] -r [package-index-options] ... + %prog [options] ... + %prog [options] ... + %prog [options] ...""" + + def add_options(self) -> None: + self.cmd_opts.add_option(cmdoptions.constraints()) + self.cmd_opts.add_option(cmdoptions.requirements()) + self.cmd_opts.add_option(cmdoptions.no_deps()) + self.cmd_opts.add_option(cmdoptions.global_options()) + self.cmd_opts.add_option(cmdoptions.no_binary()) + self.cmd_opts.add_option(cmdoptions.only_binary()) + self.cmd_opts.add_option(cmdoptions.prefer_binary()) + self.cmd_opts.add_option(cmdoptions.src()) + self.cmd_opts.add_option(cmdoptions.pre()) + self.cmd_opts.add_option(cmdoptions.require_hashes()) + self.cmd_opts.add_option(cmdoptions.progress_bar()) + self.cmd_opts.add_option(cmdoptions.no_build_isolation()) + self.cmd_opts.add_option(cmdoptions.use_pep517()) + self.cmd_opts.add_option(cmdoptions.no_use_pep517()) + self.cmd_opts.add_option(cmdoptions.check_build_deps()) + self.cmd_opts.add_option(cmdoptions.ignore_requires_python()) + + self.cmd_opts.add_option( + "-d", + "--dest", + "--destination-dir", + "--destination-directory", + dest="download_dir", + metavar="dir", + default=os.curdir, + help="Download packages into .", + ) + + cmdoptions.add_target_python_options(self.cmd_opts) + + index_opts = cmdoptions.make_option_group( + cmdoptions.index_group, + self.parser, + ) + + self.parser.insert_option_group(0, index_opts) + self.parser.insert_option_group(0, self.cmd_opts) + + @with_cleanup + def run(self, options: Values, args: List[str]) -> int: + options.ignore_installed = True + # editable doesn't really make sense for `pip download`, but the bowels + # of the RequirementSet code require that property. + options.editables = [] + + cmdoptions.check_dist_restriction(options) + + options.download_dir = normalize_path(options.download_dir) + ensure_dir(options.download_dir) + + session = self.get_default_session(options) + + target_python = make_target_python(options) + finder = self._build_package_finder( + options=options, + session=session, + target_python=target_python, + ignore_requires_python=options.ignore_requires_python, + ) + + build_tracker = self.enter_context(get_build_tracker()) + + directory = TempDirectory( + delete=not options.no_clean, + kind="download", + globally_managed=True, + ) + + reqs = self.get_requirements(args, options, finder, session) + check_legacy_setup_py_options(options, reqs) + + preparer = self.make_requirement_preparer( + temp_build_dir=directory, + options=options, + build_tracker=build_tracker, + session=session, + finder=finder, + download_dir=options.download_dir, + use_user_site=False, + verbosity=self.verbosity, + ) + + resolver = self.make_resolver( + preparer=preparer, + finder=finder, + options=options, + ignore_requires_python=options.ignore_requires_python, + use_pep517=options.use_pep517, + py_version_info=options.python_version, + ) + + self.trace_basic_info(finder) + + requirement_set = resolver.resolve(reqs, check_supported_wheels=True) + + downloaded: List[str] = [] + for req in requirement_set.requirements.values(): + if req.satisfied_by is None: + assert req.name is not None + preparer.save_linked_requirement(req) + downloaded.append(req.name) + + preparer.prepare_linked_requirements_more(requirement_set.requirements.values()) + + if downloaded: + write_output("Successfully downloaded %s", " ".join(downloaded)) + + return SUCCESS diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/help.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/help.py new file mode 100644 index 0000000000000000000000000000000000000000..62066318b74dcc5c32bcd24b9493fb34d1ce52d7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/help.py @@ -0,0 +1,41 @@ +from optparse import Values +from typing import List + +from pip._internal.cli.base_command import Command +from pip._internal.cli.status_codes import SUCCESS +from pip._internal.exceptions import CommandError + + +class HelpCommand(Command): + """Show help for commands""" + + usage = """ + %prog """ + ignore_require_venv = True + + def run(self, options: Values, args: List[str]) -> int: + from pip._internal.commands import ( + commands_dict, + create_command, + get_similar_commands, + ) + + try: + # 'pip help' with no args is handled by pip.__init__.parseopt() + cmd_name = args[0] # the command we need help for + except IndexError: + return SUCCESS + + if cmd_name not in commands_dict: + guess = get_similar_commands(cmd_name) + + msg = [f'unknown command "{cmd_name}"'] + if guess: + msg.append(f'maybe you meant "{guess}"') + + raise CommandError(" - ".join(msg)) + + command = create_command(cmd_name) + command.parser.print_help() + + return SUCCESS diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/inspect.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/inspect.py new file mode 100644 index 0000000000000000000000000000000000000000..e810c13166bbdf0e38c94bc3ef66af7aeda2bba7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/inspect.py @@ -0,0 +1,92 @@ +import logging +from optparse import Values +from typing import Any, Dict, List + +from pip._vendor.packaging.markers import default_environment +from pip._vendor.rich import print_json + +from pip import __version__ +from pip._internal.cli import cmdoptions +from pip._internal.cli.base_command import Command +from pip._internal.cli.status_codes import SUCCESS +from pip._internal.metadata import BaseDistribution, get_environment +from pip._internal.utils.compat import stdlib_pkgs +from pip._internal.utils.urls import path_to_url + +logger = logging.getLogger(__name__) + + +class InspectCommand(Command): + """ + Inspect the content of a Python environment and produce a report in JSON format. + """ + + ignore_require_venv = True + usage = """ + %prog [options]""" + + def add_options(self) -> None: + self.cmd_opts.add_option( + "--local", + action="store_true", + default=False, + help=( + "If in a virtualenv that has global access, do not list " + "globally-installed packages." + ), + ) + self.cmd_opts.add_option( + "--user", + dest="user", + action="store_true", + default=False, + help="Only output packages installed in user-site.", + ) + self.cmd_opts.add_option(cmdoptions.list_path()) + self.parser.insert_option_group(0, self.cmd_opts) + + def run(self, options: Values, args: List[str]) -> int: + cmdoptions.check_list_path_option(options) + dists = get_environment(options.path).iter_installed_distributions( + local_only=options.local, + user_only=options.user, + skip=set(stdlib_pkgs), + ) + output = { + "version": "1", + "pip_version": __version__, + "installed": [self._dist_to_dict(dist) for dist in dists], + "environment": default_environment(), + # TODO tags? scheme? + } + print_json(data=output) + return SUCCESS + + def _dist_to_dict(self, dist: BaseDistribution) -> Dict[str, Any]: + res: Dict[str, Any] = { + "metadata": dist.metadata_dict, + "metadata_location": dist.info_location, + } + # direct_url. Note that we don't have download_info (as in the installation + # report) since it is not recorded in installed metadata. + direct_url = dist.direct_url + if direct_url is not None: + res["direct_url"] = direct_url.to_dict() + else: + # Emulate direct_url for legacy editable installs. + editable_project_location = dist.editable_project_location + if editable_project_location is not None: + res["direct_url"] = { + "url": path_to_url(editable_project_location), + "dir_info": { + "editable": True, + }, + } + # installer + installer = dist.installer + if dist.installer: + res["installer"] = installer + # requested + if dist.installed_with_dist_info: + res["requested"] = dist.requested + return res diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py new file mode 100644 index 0000000000000000000000000000000000000000..bc0edeac9fb74e4dfb6d7a095483c11557d268ba --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py @@ -0,0 +1,114 @@ +import logging +from optparse import Values +from typing import List + +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.cli import cmdoptions +from pip._internal.cli.base_command import Command +from pip._internal.cli.index_command import SessionCommandMixin +from pip._internal.cli.status_codes import SUCCESS +from pip._internal.exceptions import InstallationError +from pip._internal.req import parse_requirements +from pip._internal.req.constructors import ( + install_req_from_line, + install_req_from_parsed_requirement, +) +from pip._internal.utils.misc import ( + check_externally_managed, + protect_pip_from_modification_on_windows, + warn_if_run_as_root, +) + +logger = logging.getLogger(__name__) + + +class UninstallCommand(Command, SessionCommandMixin): + """ + Uninstall packages. + + pip is able to uninstall most installed packages. Known exceptions are: + + - Pure distutils packages installed with ``python setup.py install``, which + leave behind no metadata to determine what files were installed. + - Script wrappers installed by ``python setup.py develop``. + """ + + usage = """ + %prog [options] ... + %prog [options] -r ...""" + + def add_options(self) -> None: + self.cmd_opts.add_option( + "-r", + "--requirement", + dest="requirements", + action="append", + default=[], + metavar="file", + help=( + "Uninstall all the packages listed in the given requirements " + "file. This option can be used multiple times." + ), + ) + self.cmd_opts.add_option( + "-y", + "--yes", + dest="yes", + action="store_true", + help="Don't ask for confirmation of uninstall deletions.", + ) + self.cmd_opts.add_option(cmdoptions.root_user_action()) + self.cmd_opts.add_option(cmdoptions.override_externally_managed()) + self.parser.insert_option_group(0, self.cmd_opts) + + def run(self, options: Values, args: List[str]) -> int: + session = self.get_default_session(options) + + reqs_to_uninstall = {} + for name in args: + req = install_req_from_line( + name, + isolated=options.isolated_mode, + ) + if req.name: + reqs_to_uninstall[canonicalize_name(req.name)] = req + else: + logger.warning( + "Invalid requirement: %r ignored -" + " the uninstall command expects named" + " requirements.", + name, + ) + for filename in options.requirements: + for parsed_req in parse_requirements( + filename, options=options, session=session + ): + req = install_req_from_parsed_requirement( + parsed_req, isolated=options.isolated_mode + ) + if req.name: + reqs_to_uninstall[canonicalize_name(req.name)] = req + if not reqs_to_uninstall: + raise InstallationError( + f"You must give at least one requirement to {self.name} (see " + f'"pip help {self.name}")' + ) + + if not options.override_externally_managed: + check_externally_managed() + + protect_pip_from_modification_on_windows( + modifying_pip="pip" in reqs_to_uninstall + ) + + for req in reqs_to_uninstall.values(): + uninstall_pathset = req.uninstall( + auto_confirm=options.yes, + verbose=self.verbosity > 0, + ) + if uninstall_pathset: + uninstall_pathset.commit() + if options.root_user_action == "warn": + warn_if_run_as_root() + return SUCCESS diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9a89a838b9a5cb264e9ae9d269fbedca6e2d6333 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py @@ -0,0 +1,21 @@ +from pip._internal.distributions.base import AbstractDistribution +from pip._internal.distributions.sdist import SourceDistribution +from pip._internal.distributions.wheel import WheelDistribution +from pip._internal.req.req_install import InstallRequirement + + +def make_distribution_for_install_requirement( + install_req: InstallRequirement, +) -> AbstractDistribution: + """Returns a Distribution for the given InstallRequirement""" + # Editable requirements will always be source distributions. They use the + # legacy logic until we create a modern standard for them. + if install_req.editable: + return SourceDistribution(install_req) + + # If it's a wheel, it's a WheelDistribution + if install_req.is_wheel: + return WheelDistribution(install_req) + + # Otherwise, a SourceDistribution + return SourceDistribution(install_req) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..537681b875d4192c0594f18cb6755653f9c5b3ae Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6214fea73c5be76cf2f5997e2c5117e8768c972 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ae3b86568c21644c991074bde75be9f3661af30 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ccaf0afcf9cf95b8f3510143f439d84b01ee678 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8869e8ba39a7e1437867083353cc362ded173ca0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/base.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/base.py new file mode 100644 index 0000000000000000000000000000000000000000..6e4d0c91a901c46ab20be813af083cd19809318a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/base.py @@ -0,0 +1,53 @@ +import abc +from typing import TYPE_CHECKING, Optional + +from pip._internal.metadata.base import BaseDistribution +from pip._internal.req import InstallRequirement + +if TYPE_CHECKING: + from pip._internal.index.package_finder import PackageFinder + + +class AbstractDistribution(metaclass=abc.ABCMeta): + """A base class for handling installable artifacts. + + The requirements for anything installable are as follows: + + - we must be able to determine the requirement name + (or we can't correctly handle the non-upgrade case). + + - for packages with setup requirements, we must also be able + to determine their requirements without installing additional + packages (for the same reason as run-time dependencies) + + - we must be able to create a Distribution object exposing the + above metadata. + + - if we need to do work in the build tracker, we must be able to generate a unique + string to identify the requirement in the build tracker. + """ + + def __init__(self, req: InstallRequirement) -> None: + super().__init__() + self.req = req + + @abc.abstractproperty + def build_tracker_id(self) -> Optional[str]: + """A string that uniquely identifies this requirement to the build tracker. + + If None, then this dist has no work to do in the build tracker, and + ``.prepare_distribution_metadata()`` will not be called.""" + raise NotImplementedError() + + @abc.abstractmethod + def get_metadata_distribution(self) -> BaseDistribution: + raise NotImplementedError() + + @abc.abstractmethod + def prepare_distribution_metadata( + self, + finder: "PackageFinder", + build_isolation: bool, + check_build_deps: bool, + ) -> None: + raise NotImplementedError() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/installed.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/installed.py new file mode 100644 index 0000000000000000000000000000000000000000..ab8d53be7408626719c27aa29fdc2e143b7c380a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/installed.py @@ -0,0 +1,29 @@ +from typing import Optional + +from pip._internal.distributions.base import AbstractDistribution +from pip._internal.index.package_finder import PackageFinder +from pip._internal.metadata import BaseDistribution + + +class InstalledDistribution(AbstractDistribution): + """Represents an installed package. + + This does not need any preparation as the required information has already + been computed. + """ + + @property + def build_tracker_id(self) -> Optional[str]: + return None + + def get_metadata_distribution(self) -> BaseDistribution: + assert self.req.satisfied_by is not None, "not actually installed" + return self.req.satisfied_by + + def prepare_distribution_metadata( + self, + finder: PackageFinder, + build_isolation: bool, + check_build_deps: bool, + ) -> None: + pass diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py new file mode 100644 index 0000000000000000000000000000000000000000..28ea5cea16cdf9b740809553cbf2d3bf8d626e1e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py @@ -0,0 +1,158 @@ +import logging +from typing import TYPE_CHECKING, Iterable, Optional, Set, Tuple + +from pip._internal.build_env import BuildEnvironment +from pip._internal.distributions.base import AbstractDistribution +from pip._internal.exceptions import InstallationError +from pip._internal.metadata import BaseDistribution +from pip._internal.utils.subprocess import runner_with_spinner_message + +if TYPE_CHECKING: + from pip._internal.index.package_finder import PackageFinder + +logger = logging.getLogger(__name__) + + +class SourceDistribution(AbstractDistribution): + """Represents a source distribution. + + The preparation step for these needs metadata for the packages to be + generated, either using PEP 517 or using the legacy `setup.py egg_info`. + """ + + @property + def build_tracker_id(self) -> Optional[str]: + """Identify this requirement uniquely by its link.""" + assert self.req.link + return self.req.link.url_without_fragment + + def get_metadata_distribution(self) -> BaseDistribution: + return self.req.get_dist() + + def prepare_distribution_metadata( + self, + finder: "PackageFinder", + build_isolation: bool, + check_build_deps: bool, + ) -> None: + # Load pyproject.toml, to determine whether PEP 517 is to be used + self.req.load_pyproject_toml() + + # Set up the build isolation, if this requirement should be isolated + should_isolate = self.req.use_pep517 and build_isolation + if should_isolate: + # Setup an isolated environment and install the build backend static + # requirements in it. + self._prepare_build_backend(finder) + # Check that if the requirement is editable, it either supports PEP 660 or + # has a setup.py or a setup.cfg. This cannot be done earlier because we need + # to setup the build backend to verify it supports build_editable, nor can + # it be done later, because we want to avoid installing build requirements + # needlessly. Doing it here also works around setuptools generating + # UNKNOWN.egg-info when running get_requires_for_build_wheel on a directory + # without setup.py nor setup.cfg. + self.req.isolated_editable_sanity_check() + # Install the dynamic build requirements. + self._install_build_reqs(finder) + # Check if the current environment provides build dependencies + should_check_deps = self.req.use_pep517 and check_build_deps + if should_check_deps: + pyproject_requires = self.req.pyproject_requires + assert pyproject_requires is not None + conflicting, missing = self.req.build_env.check_requirements( + pyproject_requires + ) + if conflicting: + self._raise_conflicts("the backend dependencies", conflicting) + if missing: + self._raise_missing_reqs(missing) + self.req.prepare_metadata() + + def _prepare_build_backend(self, finder: "PackageFinder") -> None: + # Isolate in a BuildEnvironment and install the build-time + # requirements. + pyproject_requires = self.req.pyproject_requires + assert pyproject_requires is not None + + self.req.build_env = BuildEnvironment() + self.req.build_env.install_requirements( + finder, pyproject_requires, "overlay", kind="build dependencies" + ) + conflicting, missing = self.req.build_env.check_requirements( + self.req.requirements_to_check + ) + if conflicting: + self._raise_conflicts("PEP 517/518 supported requirements", conflicting) + if missing: + logger.warning( + "Missing build requirements in pyproject.toml for %s.", + self.req, + ) + logger.warning( + "The project does not specify a build backend, and " + "pip cannot fall back to setuptools without %s.", + " and ".join(map(repr, sorted(missing))), + ) + + def _get_build_requires_wheel(self) -> Iterable[str]: + with self.req.build_env: + runner = runner_with_spinner_message("Getting requirements to build wheel") + backend = self.req.pep517_backend + assert backend is not None + with backend.subprocess_runner(runner): + return backend.get_requires_for_build_wheel() + + def _get_build_requires_editable(self) -> Iterable[str]: + with self.req.build_env: + runner = runner_with_spinner_message( + "Getting requirements to build editable" + ) + backend = self.req.pep517_backend + assert backend is not None + with backend.subprocess_runner(runner): + return backend.get_requires_for_build_editable() + + def _install_build_reqs(self, finder: "PackageFinder") -> None: + # Install any extra build dependencies that the backend requests. + # This must be done in a second pass, as the pyproject.toml + # dependencies must be installed before we can call the backend. + if ( + self.req.editable + and self.req.permit_editable_wheels + and self.req.supports_pyproject_editable + ): + build_reqs = self._get_build_requires_editable() + else: + build_reqs = self._get_build_requires_wheel() + conflicting, missing = self.req.build_env.check_requirements(build_reqs) + if conflicting: + self._raise_conflicts("the backend dependencies", conflicting) + self.req.build_env.install_requirements( + finder, missing, "normal", kind="backend dependencies" + ) + + def _raise_conflicts( + self, conflicting_with: str, conflicting_reqs: Set[Tuple[str, str]] + ) -> None: + format_string = ( + "Some build dependencies for {requirement} " + "conflict with {conflicting_with}: {description}." + ) + error_message = format_string.format( + requirement=self.req, + conflicting_with=conflicting_with, + description=", ".join( + f"{installed} is incompatible with {wanted}" + for installed, wanted in sorted(conflicting_reqs) + ), + ) + raise InstallationError(error_message) + + def _raise_missing_reqs(self, missing: Set[str]) -> None: + format_string = ( + "Some build dependencies for {requirement} are missing: {missing}." + ) + error_message = format_string.format( + requirement=self.req, missing=", ".join(map(repr, sorted(missing))) + ) + raise InstallationError(error_message) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py new file mode 100644 index 0000000000000000000000000000000000000000..bfadd39dcb77dfdaa2cca24e8a6db7e5beac181e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py @@ -0,0 +1,42 @@ +from typing import TYPE_CHECKING, Optional + +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.distributions.base import AbstractDistribution +from pip._internal.metadata import ( + BaseDistribution, + FilesystemWheel, + get_wheel_distribution, +) + +if TYPE_CHECKING: + from pip._internal.index.package_finder import PackageFinder + + +class WheelDistribution(AbstractDistribution): + """Represents a wheel distribution. + + This does not need any preparation as wheels can be directly unpacked. + """ + + @property + def build_tracker_id(self) -> Optional[str]: + return None + + def get_metadata_distribution(self) -> BaseDistribution: + """Loads the metadata from the wheel file into memory and returns a + Distribution that uses it, not relying on the wheel file or + requirement. + """ + assert self.req.local_file_path, "Set as part of preparation during download" + assert self.req.name, "Wheels are never unnamed" + wheel = FilesystemWheel(self.req.local_file_path) + return get_wheel_distribution(wheel, canonicalize_name(self.req.name)) + + def prepare_distribution_metadata( + self, + finder: "PackageFinder", + build_isolation: bool, + check_build_deps: bool, + ) -> None: + pass diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0bacee51a696087f011168f20d8d41e9002e03c0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e41d3e2fbdbc90bc7a82d8139345dd5036eab85 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40c7f08588dd6127cc6d6a1e887b937d72ebfdfa Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40b1a455cd30ac8e982b22c348881a26e93a2236 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d97f7f5504f7c835b3404019ab5d55aca3f6ea1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..18d54a49db26356ea896c06f1cd7a957b37e9090 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aca815b1727d88c1952402dd1f59c930a51e6a50 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3c4c126e2bb65f9650c3de27b62e0790c5943e0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..804b9039ba5b4a1127cc4b8759f975f24067517a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76a9d98d50d263df74abcbff387ba33e771f3e2f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..862e2f654b9a3ac3684f56f3d0464d03b74dc1a4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15c940ee3925d2acd5d38f8be6b4c7dfc886d359 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a779138db1040d3903c2bb66ecb2f52a46879dae --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py @@ -0,0 +1,6 @@ +from ._dists import Distribution +from ._envs import Environment + +__all__ = ["NAME", "Distribution", "Environment"] + +NAME = "importlib" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2bcb08272ffbff5b0467d9cd60a2f8339c11165b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3baa6ff0c0155cf1cc775323e932505f7cbe7143 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..19d28bfd0dba5a5bcb042b4702723a28ff89a78c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f32794a0e174ef6f95007836d9b5e300e6f8301 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..ec1e815cdbdf517ec8b3565d7dafb7e67ce1705c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py @@ -0,0 +1,85 @@ +import importlib.metadata +import os +from typing import Any, Optional, Protocol, Tuple, cast + +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name + + +class BadMetadata(ValueError): + def __init__(self, dist: importlib.metadata.Distribution, *, reason: str) -> None: + self.dist = dist + self.reason = reason + + def __str__(self) -> str: + return f"Bad metadata in {self.dist} ({self.reason})" + + +class BasePath(Protocol): + """A protocol that various path objects conform. + + This exists because importlib.metadata uses both ``pathlib.Path`` and + ``zipfile.Path``, and we need a common base for type hints (Union does not + work well since ``zipfile.Path`` is too new for our linter setup). + + This does not mean to be exhaustive, but only contains things that present + in both classes *that we need*. + """ + + @property + def name(self) -> str: + raise NotImplementedError() + + @property + def parent(self) -> "BasePath": + raise NotImplementedError() + + +def get_info_location(d: importlib.metadata.Distribution) -> Optional[BasePath]: + """Find the path to the distribution's metadata directory. + + HACK: This relies on importlib.metadata's private ``_path`` attribute. Not + all distributions exist on disk, so importlib.metadata is correct to not + expose the attribute as public. But pip's code base is old and not as clean, + so we do this to avoid having to rewrite too many things. Hopefully we can + eliminate this some day. + """ + return getattr(d, "_path", None) + + +def parse_name_and_version_from_info_directory( + dist: importlib.metadata.Distribution, +) -> Tuple[Optional[str], Optional[str]]: + """Get a name and version from the metadata directory name. + + This is much faster than reading distribution metadata. + """ + info_location = get_info_location(dist) + if info_location is None: + return None, None + + stem, suffix = os.path.splitext(info_location.name) + if suffix == ".dist-info": + name, sep, version = stem.partition("-") + if sep: + return name, version + + if suffix == ".egg-info": + name = stem.split("-", 1)[0] + return name, None + + return None, None + + +def get_dist_canonical_name(dist: importlib.metadata.Distribution) -> NormalizedName: + """Get the distribution's normalized name. + + The ``name`` attribute is only available in Python 3.10 or later. We are + targeting exactly that, but Mypy does not know this. + """ + if name := parse_name_and_version_from_info_directory(dist)[0]: + return canonicalize_name(name) + + name = cast(Any, dist).name + if not isinstance(name, str): + raise BadMetadata(dist, reason="invalid metadata entry 'name'") + return canonicalize_name(name) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py new file mode 100644 index 0000000000000000000000000000000000000000..d220b616e2860407336cfaed32c6d5972e7688dd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py @@ -0,0 +1,228 @@ +import email.message +import importlib.metadata +import pathlib +import zipfile +from os import PathLike +from typing import ( + Collection, + Dict, + Iterable, + Iterator, + Mapping, + Optional, + Sequence, + Union, + cast, +) + +from pip._vendor.packaging.requirements import Requirement +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +from pip._vendor.packaging.version import Version +from pip._vendor.packaging.version import parse as parse_version + +from pip._internal.exceptions import InvalidWheel, UnsupportedWheel +from pip._internal.metadata.base import ( + BaseDistribution, + BaseEntryPoint, + InfoPath, + Wheel, +) +from pip._internal.utils.misc import normalize_path +from pip._internal.utils.packaging import get_requirement +from pip._internal.utils.temp_dir import TempDirectory +from pip._internal.utils.wheel import parse_wheel, read_wheel_metadata_file + +from ._compat import ( + BasePath, + get_dist_canonical_name, + parse_name_and_version_from_info_directory, +) + + +class WheelDistribution(importlib.metadata.Distribution): + """An ``importlib.metadata.Distribution`` read from a wheel. + + Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``, + its implementation is too "lazy" for pip's needs (we can't keep the ZipFile + handle open for the entire lifetime of the distribution object). + + This implementation eagerly reads the entire metadata directory into the + memory instead, and operates from that. + """ + + def __init__( + self, + files: Mapping[pathlib.PurePosixPath, bytes], + info_location: pathlib.PurePosixPath, + ) -> None: + self._files = files + self.info_location = info_location + + @classmethod + def from_zipfile( + cls, + zf: zipfile.ZipFile, + name: str, + location: str, + ) -> "WheelDistribution": + info_dir, _ = parse_wheel(zf, name) + paths = ( + (name, pathlib.PurePosixPath(name.split("/", 1)[-1])) + for name in zf.namelist() + if name.startswith(f"{info_dir}/") + ) + files = { + relpath: read_wheel_metadata_file(zf, fullpath) + for fullpath, relpath in paths + } + info_location = pathlib.PurePosixPath(location, info_dir) + return cls(files, info_location) + + def iterdir(self, path: InfoPath) -> Iterator[pathlib.PurePosixPath]: + # Only allow iterating through the metadata directory. + if pathlib.PurePosixPath(str(path)) in self._files: + return iter(self._files) + raise FileNotFoundError(path) + + def read_text(self, filename: str) -> Optional[str]: + try: + data = self._files[pathlib.PurePosixPath(filename)] + except KeyError: + return None + try: + text = data.decode("utf-8") + except UnicodeDecodeError as e: + wheel = self.info_location.parent + error = f"Error decoding metadata for {wheel}: {e} in {filename} file" + raise UnsupportedWheel(error) + return text + + def locate_file(self, path: Union[str, "PathLike[str]"]) -> pathlib.Path: + # This method doesn't make sense for our in-memory wheel, but the API + # requires us to define it. + raise NotImplementedError + + +class Distribution(BaseDistribution): + def __init__( + self, + dist: importlib.metadata.Distribution, + info_location: Optional[BasePath], + installed_location: Optional[BasePath], + ) -> None: + self._dist = dist + self._info_location = info_location + self._installed_location = installed_location + + @classmethod + def from_directory(cls, directory: str) -> BaseDistribution: + info_location = pathlib.Path(directory) + dist = importlib.metadata.Distribution.at(info_location) + return cls(dist, info_location, info_location.parent) + + @classmethod + def from_metadata_file_contents( + cls, + metadata_contents: bytes, + filename: str, + project_name: str, + ) -> BaseDistribution: + # Generate temp dir to contain the metadata file, and write the file contents. + temp_dir = pathlib.Path( + TempDirectory(kind="metadata", globally_managed=True).path + ) + metadata_path = temp_dir / "METADATA" + metadata_path.write_bytes(metadata_contents) + # Construct dist pointing to the newly created directory. + dist = importlib.metadata.Distribution.at(metadata_path.parent) + return cls(dist, metadata_path.parent, None) + + @classmethod + def from_wheel(cls, wheel: Wheel, name: str) -> BaseDistribution: + try: + with wheel.as_zipfile() as zf: + dist = WheelDistribution.from_zipfile(zf, name, wheel.location) + except zipfile.BadZipFile as e: + raise InvalidWheel(wheel.location, name) from e + return cls(dist, dist.info_location, pathlib.PurePosixPath(wheel.location)) + + @property + def location(self) -> Optional[str]: + if self._info_location is None: + return None + return str(self._info_location.parent) + + @property + def info_location(self) -> Optional[str]: + if self._info_location is None: + return None + return str(self._info_location) + + @property + def installed_location(self) -> Optional[str]: + if self._installed_location is None: + return None + return normalize_path(str(self._installed_location)) + + @property + def canonical_name(self) -> NormalizedName: + return get_dist_canonical_name(self._dist) + + @property + def version(self) -> Version: + if version := parse_name_and_version_from_info_directory(self._dist)[1]: + return parse_version(version) + return parse_version(self._dist.version) + + @property + def raw_version(self) -> str: + return self._dist.version + + def is_file(self, path: InfoPath) -> bool: + return self._dist.read_text(str(path)) is not None + + def iter_distutils_script_names(self) -> Iterator[str]: + # A distutils installation is always "flat" (not in e.g. egg form), so + # if this distribution's info location is NOT a pathlib.Path (but e.g. + # zipfile.Path), it can never contain any distutils scripts. + if not isinstance(self._info_location, pathlib.Path): + return + for child in self._info_location.joinpath("scripts").iterdir(): + yield child.name + + def read_text(self, path: InfoPath) -> str: + content = self._dist.read_text(str(path)) + if content is None: + raise FileNotFoundError(path) + return content + + def iter_entry_points(self) -> Iterable[BaseEntryPoint]: + # importlib.metadata's EntryPoint structure satisfies BaseEntryPoint. + return self._dist.entry_points + + def _metadata_impl(self) -> email.message.Message: + # From Python 3.10+, importlib.metadata declares PackageMetadata as the + # return type. This protocol is unfortunately a disaster now and misses + # a ton of fields that we need, including get() and get_payload(). We + # rely on the implementation that the object is actually a Message now, + # until upstream can improve the protocol. (python/cpython#94952) + return cast(email.message.Message, self._dist.metadata) + + def iter_provided_extras(self) -> Iterable[NormalizedName]: + return [ + canonicalize_name(extra) + for extra in self.metadata.get_all("Provides-Extra", []) + ] + + def iter_dependencies(self, extras: Collection[str] = ()) -> Iterable[Requirement]: + contexts: Sequence[Dict[str, str]] = [{"extra": e} for e in extras] + for req_string in self.metadata.get_all("Requires-Dist", []): + # strip() because email.message.Message.get_all() may return a leading \n + # in case a long header was wrapped. + req = get_requirement(req_string.strip()) + if not req.marker: + yield req + elif not extras and req.marker.evaluate({"extra": ""}): + yield req + elif any(req.marker.evaluate(context) for context in contexts): + yield req diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py new file mode 100644 index 0000000000000000000000000000000000000000..4d906fd3149f1242db2efa6ed095d5857d61116c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py @@ -0,0 +1,189 @@ +import functools +import importlib.metadata +import logging +import os +import pathlib +import sys +import zipfile +import zipimport +from typing import Iterator, List, Optional, Sequence, Set, Tuple + +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name + +from pip._internal.metadata.base import BaseDistribution, BaseEnvironment +from pip._internal.models.wheel import Wheel +from pip._internal.utils.deprecation import deprecated +from pip._internal.utils.filetypes import WHEEL_EXTENSION + +from ._compat import BadMetadata, BasePath, get_dist_canonical_name, get_info_location +from ._dists import Distribution + +logger = logging.getLogger(__name__) + + +def _looks_like_wheel(location: str) -> bool: + if not location.endswith(WHEEL_EXTENSION): + return False + if not os.path.isfile(location): + return False + if not Wheel.wheel_file_re.match(os.path.basename(location)): + return False + return zipfile.is_zipfile(location) + + +class _DistributionFinder: + """Finder to locate distributions. + + The main purpose of this class is to memoize found distributions' names, so + only one distribution is returned for each package name. At lot of pip code + assumes this (because it is setuptools's behavior), and not doing the same + can potentially cause a distribution in lower precedence path to override a + higher precedence one if the caller is not careful. + + Eventually we probably want to make it possible to see lower precedence + installations as well. It's useful feature, after all. + """ + + FoundResult = Tuple[importlib.metadata.Distribution, Optional[BasePath]] + + def __init__(self) -> None: + self._found_names: Set[NormalizedName] = set() + + def _find_impl(self, location: str) -> Iterator[FoundResult]: + """Find distributions in a location.""" + # Skip looking inside a wheel. Since a package inside a wheel is not + # always valid (due to .data directories etc.), its .dist-info entry + # should not be considered an installed distribution. + if _looks_like_wheel(location): + return + # To know exactly where we find a distribution, we have to feed in the + # paths one by one, instead of dumping the list to importlib.metadata. + for dist in importlib.metadata.distributions(path=[location]): + info_location = get_info_location(dist) + try: + name = get_dist_canonical_name(dist) + except BadMetadata as e: + logger.warning("Skipping %s due to %s", info_location, e.reason) + continue + if name in self._found_names: + continue + self._found_names.add(name) + yield dist, info_location + + def find(self, location: str) -> Iterator[BaseDistribution]: + """Find distributions in a location. + + The path can be either a directory, or a ZIP archive. + """ + for dist, info_location in self._find_impl(location): + if info_location is None: + installed_location: Optional[BasePath] = None + else: + installed_location = info_location.parent + yield Distribution(dist, info_location, installed_location) + + def find_linked(self, location: str) -> Iterator[BaseDistribution]: + """Read location in egg-link files and return distributions in there. + + The path should be a directory; otherwise this returns nothing. This + follows how setuptools does this for compatibility. The first non-empty + line in the egg-link is read as a path (resolved against the egg-link's + containing directory if relative). Distributions found at that linked + location are returned. + """ + path = pathlib.Path(location) + if not path.is_dir(): + return + for child in path.iterdir(): + if child.suffix != ".egg-link": + continue + with child.open() as f: + lines = (line.strip() for line in f) + target_rel = next((line for line in lines if line), "") + if not target_rel: + continue + target_location = str(path.joinpath(target_rel)) + for dist, info_location in self._find_impl(target_location): + yield Distribution(dist, info_location, path) + + def _find_eggs_in_dir(self, location: str) -> Iterator[BaseDistribution]: + from pip._vendor.pkg_resources import find_distributions + + from pip._internal.metadata import pkg_resources as legacy + + with os.scandir(location) as it: + for entry in it: + if not entry.name.endswith(".egg"): + continue + for dist in find_distributions(entry.path): + yield legacy.Distribution(dist) + + def _find_eggs_in_zip(self, location: str) -> Iterator[BaseDistribution]: + from pip._vendor.pkg_resources import find_eggs_in_zip + + from pip._internal.metadata import pkg_resources as legacy + + try: + importer = zipimport.zipimporter(location) + except zipimport.ZipImportError: + return + for dist in find_eggs_in_zip(importer, location): + yield legacy.Distribution(dist) + + def find_eggs(self, location: str) -> Iterator[BaseDistribution]: + """Find eggs in a location. + + This actually uses the old *pkg_resources* backend. We likely want to + deprecate this so we can eventually remove the *pkg_resources* + dependency entirely. Before that, this should first emit a deprecation + warning for some versions when using the fallback since importing + *pkg_resources* is slow for those who don't need it. + """ + if os.path.isdir(location): + yield from self._find_eggs_in_dir(location) + if zipfile.is_zipfile(location): + yield from self._find_eggs_in_zip(location) + + +@functools.lru_cache(maxsize=None) # Warn a distribution exactly once. +def _emit_egg_deprecation(location: Optional[str]) -> None: + deprecated( + reason=f"Loading egg at {location} is deprecated.", + replacement="to use pip for package installation", + gone_in="25.1", + issue=12330, + ) + + +class Environment(BaseEnvironment): + def __init__(self, paths: Sequence[str]) -> None: + self._paths = paths + + @classmethod + def default(cls) -> BaseEnvironment: + return cls(sys.path) + + @classmethod + def from_paths(cls, paths: Optional[List[str]]) -> BaseEnvironment: + if paths is None: + return cls(sys.path) + return cls(paths) + + def _iter_distributions(self) -> Iterator[BaseDistribution]: + finder = _DistributionFinder() + for location in self._paths: + yield from finder.find(location) + for dist in finder.find_eggs(location): + _emit_egg_deprecation(dist.location) + yield dist + # This must go last because that's how pkg_resources tie-breaks. + yield from finder.find_linked(location) + + def get_distribution(self, name: str) -> Optional[BaseDistribution]: + canonical_name = canonicalize_name(name) + matches = ( + distribution + for distribution in self.iter_all_distributions() + if distribution.canonical_name == canonical_name + ) + return next(matches, None) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a19968ab4a9e592b2f6ed7e62c9ec8f96b42d1f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dde031a39394b42b8ecfe1cff8bb639858f91594 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38a0f28fa1f4fa17acd53f8cf77e2f4cc1e11272 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c933aa558cd46272f5fc364619c7a52b10ee9500 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..552cab034269ac209006ec96baed8a1e81cb53c9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80ef31e9830efea6ea32e0a0f211c37f6ee3cf55 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7b5764471425e7d292a58b4945b7644f04c30cd Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f08aea81eb3d48f96b3d97522320874ba95a36c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2674700c0ba7e812aa52b72fa24a8c665b3da86 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1034618bfb88febe6af8029824b9d79b298adb85 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e8a4e48a6a24059863b06994be63cbdec5bdf2d5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ea4143cadb96dbb5ced91ea58c37e83e5af244b5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b51bde91b2e5b4e557ed9b70fc113843cc3d49ae --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__init__.py @@ -0,0 +1,2 @@ +"""Contains purely network-related utilities. +""" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5285106aaa139632ae364e89d12afb8ef1046537 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d83477ff29e68c30065d9423818816e08dfa9f62 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86c34fddeb8bacf63ba7bcff31337dd9ce4eac97 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aaf5a9eb0151a009d4dbb04cb7c3e3347a959f6e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e79fb69796aa3a561037288d59c9e6fc3d6eb72d Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78837656aa116e8996d4b7bf046074a0e8de43e2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..547f2b305ecfe90336dbeecff34bad08cbee74bf Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..104a53a7d8a6a4c53da02eb8ace95ee24b1953d5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/auth.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/auth.py new file mode 100644 index 0000000000000000000000000000000000000000..1a2606ed080463dc36d34d5a4ff33b8937839823 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/auth.py @@ -0,0 +1,566 @@ +"""Network Authentication Helpers + +Contains interface (MultiDomainBasicAuth) and associated glue code for +providing credentials in the context of network requests. +""" + +import logging +import os +import shutil +import subprocess +import sysconfig +import typing +import urllib.parse +from abc import ABC, abstractmethod +from functools import lru_cache +from os.path import commonprefix +from pathlib import Path +from typing import Any, Dict, List, NamedTuple, Optional, Tuple + +from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth +from pip._vendor.requests.models import Request, Response +from pip._vendor.requests.utils import get_netrc_auth + +from pip._internal.utils.logging import getLogger +from pip._internal.utils.misc import ( + ask, + ask_input, + ask_password, + remove_auth_from_url, + split_auth_netloc_from_url, +) +from pip._internal.vcs.versioncontrol import AuthInfo + +logger = getLogger(__name__) + +KEYRING_DISABLED = False + + +class Credentials(NamedTuple): + url: str + username: str + password: str + + +class KeyRingBaseProvider(ABC): + """Keyring base provider interface""" + + has_keyring: bool + + @abstractmethod + def get_auth_info( + self, url: str, username: Optional[str] + ) -> Optional[AuthInfo]: ... + + @abstractmethod + def save_auth_info(self, url: str, username: str, password: str) -> None: ... + + +class KeyRingNullProvider(KeyRingBaseProvider): + """Keyring null provider""" + + has_keyring = False + + def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]: + return None + + def save_auth_info(self, url: str, username: str, password: str) -> None: + return None + + +class KeyRingPythonProvider(KeyRingBaseProvider): + """Keyring interface which uses locally imported `keyring`""" + + has_keyring = True + + def __init__(self) -> None: + import keyring + + self.keyring = keyring + + def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]: + # Support keyring's get_credential interface which supports getting + # credentials without a username. This is only available for + # keyring>=15.2.0. + if hasattr(self.keyring, "get_credential"): + logger.debug("Getting credentials from keyring for %s", url) + cred = self.keyring.get_credential(url, username) + if cred is not None: + return cred.username, cred.password + return None + + if username is not None: + logger.debug("Getting password from keyring for %s", url) + password = self.keyring.get_password(url, username) + if password: + return username, password + return None + + def save_auth_info(self, url: str, username: str, password: str) -> None: + self.keyring.set_password(url, username, password) + + +class KeyRingCliProvider(KeyRingBaseProvider): + """Provider which uses `keyring` cli + + Instead of calling the keyring package installed alongside pip + we call keyring on the command line which will enable pip to + use which ever installation of keyring is available first in + PATH. + """ + + has_keyring = True + + def __init__(self, cmd: str) -> None: + self.keyring = cmd + + def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]: + # This is the default implementation of keyring.get_credential + # https://github.com/jaraco/keyring/blob/97689324abcf01bd1793d49063e7ca01e03d7d07/keyring/backend.py#L134-L139 + if username is not None: + password = self._get_password(url, username) + if password is not None: + return username, password + return None + + def save_auth_info(self, url: str, username: str, password: str) -> None: + return self._set_password(url, username, password) + + def _get_password(self, service_name: str, username: str) -> Optional[str]: + """Mirror the implementation of keyring.get_password using cli""" + if self.keyring is None: + return None + + cmd = [self.keyring, "get", service_name, username] + env = os.environ.copy() + env["PYTHONIOENCODING"] = "utf-8" + res = subprocess.run( + cmd, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + env=env, + ) + if res.returncode: + return None + return res.stdout.decode("utf-8").strip(os.linesep) + + def _set_password(self, service_name: str, username: str, password: str) -> None: + """Mirror the implementation of keyring.set_password using cli""" + if self.keyring is None: + return None + env = os.environ.copy() + env["PYTHONIOENCODING"] = "utf-8" + subprocess.run( + [self.keyring, "set", service_name, username], + input=f"{password}{os.linesep}".encode(), + env=env, + check=True, + ) + return None + + +@lru_cache(maxsize=None) +def get_keyring_provider(provider: str) -> KeyRingBaseProvider: + logger.verbose("Keyring provider requested: %s", provider) + + # keyring has previously failed and been disabled + if KEYRING_DISABLED: + provider = "disabled" + if provider in ["import", "auto"]: + try: + impl = KeyRingPythonProvider() + logger.verbose("Keyring provider set: import") + return impl + except ImportError: + pass + except Exception as exc: + # In the event of an unexpected exception + # we should warn the user + msg = "Installed copy of keyring fails with exception %s" + if provider == "auto": + msg = msg + ", trying to find a keyring executable as a fallback" + logger.warning(msg, exc, exc_info=logger.isEnabledFor(logging.DEBUG)) + if provider in ["subprocess", "auto"]: + cli = shutil.which("keyring") + if cli and cli.startswith(sysconfig.get_path("scripts")): + # all code within this function is stolen from shutil.which implementation + @typing.no_type_check + def PATH_as_shutil_which_determines_it() -> str: + path = os.environ.get("PATH", None) + if path is None: + try: + path = os.confstr("CS_PATH") + except (AttributeError, ValueError): + # os.confstr() or CS_PATH is not available + path = os.defpath + # bpo-35755: Don't use os.defpath if the PATH environment variable is + # set to an empty string + + return path + + scripts = Path(sysconfig.get_path("scripts")) + + paths = [] + for path in PATH_as_shutil_which_determines_it().split(os.pathsep): + p = Path(path) + try: + if not p.samefile(scripts): + paths.append(path) + except FileNotFoundError: + pass + + path = os.pathsep.join(paths) + + cli = shutil.which("keyring", path=path) + + if cli: + logger.verbose("Keyring provider set: subprocess with executable %s", cli) + return KeyRingCliProvider(cli) + + logger.verbose("Keyring provider set: disabled") + return KeyRingNullProvider() + + +class MultiDomainBasicAuth(AuthBase): + def __init__( + self, + prompting: bool = True, + index_urls: Optional[List[str]] = None, + keyring_provider: str = "auto", + ) -> None: + self.prompting = prompting + self.index_urls = index_urls + self.keyring_provider = keyring_provider # type: ignore[assignment] + self.passwords: Dict[str, AuthInfo] = {} + # When the user is prompted to enter credentials and keyring is + # available, we will offer to save them. If the user accepts, + # this value is set to the credentials they entered. After the + # request authenticates, the caller should call + # ``save_credentials`` to save these. + self._credentials_to_save: Optional[Credentials] = None + + @property + def keyring_provider(self) -> KeyRingBaseProvider: + return get_keyring_provider(self._keyring_provider) + + @keyring_provider.setter + def keyring_provider(self, provider: str) -> None: + # The free function get_keyring_provider has been decorated with + # functools.cache. If an exception occurs in get_keyring_auth that + # cache will be cleared and keyring disabled, take that into account + # if you want to remove this indirection. + self._keyring_provider = provider + + @property + def use_keyring(self) -> bool: + # We won't use keyring when --no-input is passed unless + # a specific provider is requested because it might require + # user interaction + return self.prompting or self._keyring_provider not in ["auto", "disabled"] + + def _get_keyring_auth( + self, + url: Optional[str], + username: Optional[str], + ) -> Optional[AuthInfo]: + """Return the tuple auth for a given url from keyring.""" + # Do nothing if no url was provided + if not url: + return None + + try: + return self.keyring_provider.get_auth_info(url, username) + except Exception as exc: + # Log the full exception (with stacktrace) at debug, so it'll only + # show up when running in verbose mode. + logger.debug("Keyring is skipped due to an exception", exc_info=True) + # Always log a shortened version of the exception. + logger.warning( + "Keyring is skipped due to an exception: %s", + str(exc), + ) + global KEYRING_DISABLED + KEYRING_DISABLED = True + get_keyring_provider.cache_clear() + return None + + def _get_index_url(self, url: str) -> Optional[str]: + """Return the original index URL matching the requested URL. + + Cached or dynamically generated credentials may work against + the original index URL rather than just the netloc. + + The provided url should have had its username and password + removed already. If the original index url had credentials then + they will be included in the return value. + + Returns None if no matching index was found, or if --no-index + was specified by the user. + """ + if not url or not self.index_urls: + return None + + url = remove_auth_from_url(url).rstrip("/") + "/" + parsed_url = urllib.parse.urlsplit(url) + + candidates = [] + + for index in self.index_urls: + index = index.rstrip("/") + "/" + parsed_index = urllib.parse.urlsplit(remove_auth_from_url(index)) + if parsed_url == parsed_index: + return index + + if parsed_url.netloc != parsed_index.netloc: + continue + + candidate = urllib.parse.urlsplit(index) + candidates.append(candidate) + + if not candidates: + return None + + candidates.sort( + reverse=True, + key=lambda candidate: commonprefix( + [ + parsed_url.path, + candidate.path, + ] + ).rfind("/"), + ) + + return urllib.parse.urlunsplit(candidates[0]) + + def _get_new_credentials( + self, + original_url: str, + *, + allow_netrc: bool = True, + allow_keyring: bool = False, + ) -> AuthInfo: + """Find and return credentials for the specified URL.""" + # Split the credentials and netloc from the url. + url, netloc, url_user_password = split_auth_netloc_from_url( + original_url, + ) + + # Start with the credentials embedded in the url + username, password = url_user_password + if username is not None and password is not None: + logger.debug("Found credentials in url for %s", netloc) + return url_user_password + + # Find a matching index url for this request + index_url = self._get_index_url(url) + if index_url: + # Split the credentials from the url. + index_info = split_auth_netloc_from_url(index_url) + if index_info: + index_url, _, index_url_user_password = index_info + logger.debug("Found index url %s", index_url) + + # If an index URL was found, try its embedded credentials + if index_url and index_url_user_password[0] is not None: + username, password = index_url_user_password + if username is not None and password is not None: + logger.debug("Found credentials in index url for %s", netloc) + return index_url_user_password + + # Get creds from netrc if we still don't have them + if allow_netrc: + netrc_auth = get_netrc_auth(original_url) + if netrc_auth: + logger.debug("Found credentials in netrc for %s", netloc) + return netrc_auth + + # If we don't have a password and keyring is available, use it. + if allow_keyring: + # The index url is more specific than the netloc, so try it first + # fmt: off + kr_auth = ( + self._get_keyring_auth(index_url, username) or + self._get_keyring_auth(netloc, username) + ) + # fmt: on + if kr_auth: + logger.debug("Found credentials in keyring for %s", netloc) + return kr_auth + + return username, password + + def _get_url_and_credentials( + self, original_url: str + ) -> Tuple[str, Optional[str], Optional[str]]: + """Return the credentials to use for the provided URL. + + If allowed, netrc and keyring may be used to obtain the + correct credentials. + + Returns (url_without_credentials, username, password). Note + that even if the original URL contains credentials, this + function may return a different username and password. + """ + url, netloc, _ = split_auth_netloc_from_url(original_url) + + # Try to get credentials from original url + username, password = self._get_new_credentials(original_url) + + # If credentials not found, use any stored credentials for this netloc. + # Do this if either the username or the password is missing. + # This accounts for the situation in which the user has specified + # the username in the index url, but the password comes from keyring. + if (username is None or password is None) and netloc in self.passwords: + un, pw = self.passwords[netloc] + # It is possible that the cached credentials are for a different username, + # in which case the cache should be ignored. + if username is None or username == un: + username, password = un, pw + + if username is not None or password is not None: + # Convert the username and password if they're None, so that + # this netloc will show up as "cached" in the conditional above. + # Further, HTTPBasicAuth doesn't accept None, so it makes sense to + # cache the value that is going to be used. + username = username or "" + password = password or "" + + # Store any acquired credentials. + self.passwords[netloc] = (username, password) + + assert ( + # Credentials were found + (username is not None and password is not None) + # Credentials were not found + or (username is None and password is None) + ), f"Could not load credentials from url: {original_url}" + + return url, username, password + + def __call__(self, req: Request) -> Request: + # Get credentials for this request + url, username, password = self._get_url_and_credentials(req.url) + + # Set the url of the request to the url without any credentials + req.url = url + + if username is not None and password is not None: + # Send the basic auth with this request + req = HTTPBasicAuth(username, password)(req) + + # Attach a hook to handle 401 responses + req.register_hook("response", self.handle_401) + + return req + + # Factored out to allow for easy patching in tests + def _prompt_for_password( + self, netloc: str + ) -> Tuple[Optional[str], Optional[str], bool]: + username = ask_input(f"User for {netloc}: ") if self.prompting else None + if not username: + return None, None, False + if self.use_keyring: + auth = self._get_keyring_auth(netloc, username) + if auth and auth[0] is not None and auth[1] is not None: + return auth[0], auth[1], False + password = ask_password("Password: ") + return username, password, True + + # Factored out to allow for easy patching in tests + def _should_save_password_to_keyring(self) -> bool: + if ( + not self.prompting + or not self.use_keyring + or not self.keyring_provider.has_keyring + ): + return False + return ask("Save credentials to keyring [y/N]: ", ["y", "n"]) == "y" + + def handle_401(self, resp: Response, **kwargs: Any) -> Response: + # We only care about 401 responses, anything else we want to just + # pass through the actual response + if resp.status_code != 401: + return resp + + username, password = None, None + + # Query the keyring for credentials: + if self.use_keyring: + username, password = self._get_new_credentials( + resp.url, + allow_netrc=False, + allow_keyring=True, + ) + + # We are not able to prompt the user so simply return the response + if not self.prompting and not username and not password: + return resp + + parsed = urllib.parse.urlparse(resp.url) + + # Prompt the user for a new username and password + save = False + if not username and not password: + username, password, save = self._prompt_for_password(parsed.netloc) + + # Store the new username and password to use for future requests + self._credentials_to_save = None + if username is not None and password is not None: + self.passwords[parsed.netloc] = (username, password) + + # Prompt to save the password to keyring + if save and self._should_save_password_to_keyring(): + self._credentials_to_save = Credentials( + url=parsed.netloc, + username=username, + password=password, + ) + + # Consume content and release the original connection to allow our new + # request to reuse the same one. + # The result of the assignment isn't used, it's just needed to consume + # the content. + _ = resp.content + resp.raw.release_conn() + + # Add our new username and password to the request + req = HTTPBasicAuth(username or "", password or "")(resp.request) + req.register_hook("response", self.warn_on_401) + + # On successful request, save the credentials that were used to + # keyring. (Note that if the user responded "no" above, this member + # is not set and nothing will be saved.) + if self._credentials_to_save: + req.register_hook("response", self.save_credentials) + + # Send our new request + new_resp = resp.connection.send(req, **kwargs) + new_resp.history.append(resp) + + return new_resp + + def warn_on_401(self, resp: Response, **kwargs: Any) -> None: + """Response callback to warn about incorrect credentials.""" + if resp.status_code == 401: + logger.warning( + "401 Error, Credentials not correct for %s", + resp.request.url, + ) + + def save_credentials(self, resp: Response, **kwargs: Any) -> None: + """Response callback to save credentials on success.""" + assert ( + self.keyring_provider.has_keyring + ), "should never reach here without keyring" + + creds = self._credentials_to_save + self._credentials_to_save = None + if creds and resp.status_code < 400: + try: + logger.info("Saving credentials to keyring") + self.keyring_provider.save_auth_info( + creds.url, creds.username, creds.password + ) + except Exception: + logger.exception("Failed to save credentials") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/cache.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/cache.py new file mode 100644 index 0000000000000000000000000000000000000000..fca04e6945fd8a926e559902ee68ae45f7265a4c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/cache.py @@ -0,0 +1,118 @@ +"""HTTP cache implementation. +""" + +import os +from contextlib import contextmanager +from datetime import datetime +from typing import BinaryIO, Generator, Optional, Union + +from pip._vendor.cachecontrol.cache import SeparateBodyBaseCache +from pip._vendor.cachecontrol.caches import SeparateBodyFileCache +from pip._vendor.requests.models import Response + +from pip._internal.utils.filesystem import adjacent_tmp_file, replace +from pip._internal.utils.misc import ensure_dir + + +def is_from_cache(response: Response) -> bool: + return getattr(response, "from_cache", False) + + +@contextmanager +def suppressed_cache_errors() -> Generator[None, None, None]: + """If we can't access the cache then we can just skip caching and process + requests as if caching wasn't enabled. + """ + try: + yield + except OSError: + pass + + +class SafeFileCache(SeparateBodyBaseCache): + """ + A file based cache which is safe to use even when the target directory may + not be accessible or writable. + + There is a race condition when two processes try to write and/or read the + same entry at the same time, since each entry consists of two separate + files (https://github.com/psf/cachecontrol/issues/324). We therefore have + additional logic that makes sure that both files to be present before + returning an entry; this fixes the read side of the race condition. + + For the write side, we assume that the server will only ever return the + same data for the same URL, which ought to be the case for files pip is + downloading. PyPI does not have a mechanism to swap out a wheel for + another wheel, for example. If this assumption is not true, the + CacheControl issue will need to be fixed. + """ + + def __init__(self, directory: str) -> None: + assert directory is not None, "Cache directory must not be None." + super().__init__() + self.directory = directory + + def _get_cache_path(self, name: str) -> str: + # From cachecontrol.caches.file_cache.FileCache._fn, brought into our + # class for backwards-compatibility and to avoid using a non-public + # method. + hashed = SeparateBodyFileCache.encode(name) + parts = list(hashed[:5]) + [hashed] + return os.path.join(self.directory, *parts) + + def get(self, key: str) -> Optional[bytes]: + # The cache entry is only valid if both metadata and body exist. + metadata_path = self._get_cache_path(key) + body_path = metadata_path + ".body" + if not (os.path.exists(metadata_path) and os.path.exists(body_path)): + return None + with suppressed_cache_errors(): + with open(metadata_path, "rb") as f: + return f.read() + + def _write(self, path: str, data: bytes) -> None: + with suppressed_cache_errors(): + ensure_dir(os.path.dirname(path)) + + with adjacent_tmp_file(path) as f: + f.write(data) + # Inherit the read/write permissions of the cache directory + # to enable multi-user cache use-cases. + mode = ( + os.stat(self.directory).st_mode + & 0o666 # select read/write permissions of cache directory + | 0o600 # set owner read/write permissions + ) + # Change permissions only if there is no risk of following a symlink. + if os.chmod in os.supports_fd: + os.chmod(f.fileno(), mode) + elif os.chmod in os.supports_follow_symlinks: + os.chmod(f.name, mode, follow_symlinks=False) + + replace(f.name, path) + + def set( + self, key: str, value: bytes, expires: Union[int, datetime, None] = None + ) -> None: + path = self._get_cache_path(key) + self._write(path, value) + + def delete(self, key: str) -> None: + path = self._get_cache_path(key) + with suppressed_cache_errors(): + os.remove(path) + with suppressed_cache_errors(): + os.remove(path + ".body") + + def get_body(self, key: str) -> Optional[BinaryIO]: + # The cache entry is only valid if both metadata and body exist. + metadata_path = self._get_cache_path(key) + body_path = metadata_path + ".body" + if not (os.path.exists(metadata_path) and os.path.exists(body_path)): + return None + with suppressed_cache_errors(): + return open(body_path, "rb") + + def set_body(self, key: str, body: bytes) -> None: + path = self._get_cache_path(key) + ".body" + self._write(path, body) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/download.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/download.py new file mode 100644 index 0000000000000000000000000000000000000000..5c3bce3d2fd0cd0678ab4af066dea803b7064067 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/download.py @@ -0,0 +1,187 @@ +"""Download files with progress indicators. +""" + +import email.message +import logging +import mimetypes +import os +from typing import Iterable, Optional, Tuple + +from pip._vendor.requests.models import Response + +from pip._internal.cli.progress_bars import get_download_progress_renderer +from pip._internal.exceptions import NetworkConnectionError +from pip._internal.models.index import PyPI +from pip._internal.models.link import Link +from pip._internal.network.cache import is_from_cache +from pip._internal.network.session import PipSession +from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks +from pip._internal.utils.misc import format_size, redact_auth_from_url, splitext + +logger = logging.getLogger(__name__) + + +def _get_http_response_size(resp: Response) -> Optional[int]: + try: + return int(resp.headers["content-length"]) + except (ValueError, KeyError, TypeError): + return None + + +def _prepare_download( + resp: Response, + link: Link, + progress_bar: str, +) -> Iterable[bytes]: + total_length = _get_http_response_size(resp) + + if link.netloc == PyPI.file_storage_domain: + url = link.show_url + else: + url = link.url_without_fragment + + logged_url = redact_auth_from_url(url) + + if total_length: + logged_url = f"{logged_url} ({format_size(total_length)})" + + if is_from_cache(resp): + logger.info("Using cached %s", logged_url) + else: + logger.info("Downloading %s", logged_url) + + if logger.getEffectiveLevel() > logging.INFO: + show_progress = False + elif is_from_cache(resp): + show_progress = False + elif not total_length: + show_progress = True + elif total_length > (512 * 1024): + show_progress = True + else: + show_progress = False + + chunks = response_chunks(resp) + + if not show_progress: + return chunks + + renderer = get_download_progress_renderer(bar_type=progress_bar, size=total_length) + return renderer(chunks) + + +def sanitize_content_filename(filename: str) -> str: + """ + Sanitize the "filename" value from a Content-Disposition header. + """ + return os.path.basename(filename) + + +def parse_content_disposition(content_disposition: str, default_filename: str) -> str: + """ + Parse the "filename" value from a Content-Disposition header, and + return the default filename if the result is empty. + """ + m = email.message.Message() + m["content-type"] = content_disposition + filename = m.get_param("filename") + if filename: + # We need to sanitize the filename to prevent directory traversal + # in case the filename contains ".." path parts. + filename = sanitize_content_filename(str(filename)) + return filename or default_filename + + +def _get_http_response_filename(resp: Response, link: Link) -> str: + """Get an ideal filename from the given HTTP response, falling back to + the link filename if not provided. + """ + filename = link.filename # fallback + # Have a look at the Content-Disposition header for a better guess + content_disposition = resp.headers.get("content-disposition") + if content_disposition: + filename = parse_content_disposition(content_disposition, filename) + ext: Optional[str] = splitext(filename)[1] + if not ext: + ext = mimetypes.guess_extension(resp.headers.get("content-type", "")) + if ext: + filename += ext + if not ext and link.url != resp.url: + ext = os.path.splitext(resp.url)[1] + if ext: + filename += ext + return filename + + +def _http_get_download(session: PipSession, link: Link) -> Response: + target_url = link.url.split("#", 1)[0] + resp = session.get(target_url, headers=HEADERS, stream=True) + raise_for_status(resp) + return resp + + +class Downloader: + def __init__( + self, + session: PipSession, + progress_bar: str, + ) -> None: + self._session = session + self._progress_bar = progress_bar + + def __call__(self, link: Link, location: str) -> Tuple[str, str]: + """Download the file given by link into location.""" + try: + resp = _http_get_download(self._session, link) + except NetworkConnectionError as e: + assert e.response is not None + logger.critical( + "HTTP error %s while getting %s", e.response.status_code, link + ) + raise + + filename = _get_http_response_filename(resp, link) + filepath = os.path.join(location, filename) + + chunks = _prepare_download(resp, link, self._progress_bar) + with open(filepath, "wb") as content_file: + for chunk in chunks: + content_file.write(chunk) + content_type = resp.headers.get("Content-Type", "") + return filepath, content_type + + +class BatchDownloader: + def __init__( + self, + session: PipSession, + progress_bar: str, + ) -> None: + self._session = session + self._progress_bar = progress_bar + + def __call__( + self, links: Iterable[Link], location: str + ) -> Iterable[Tuple[Link, Tuple[str, str]]]: + """Download the files given by links into location.""" + for link in links: + try: + resp = _http_get_download(self._session, link) + except NetworkConnectionError as e: + assert e.response is not None + logger.critical( + "HTTP error %s while getting %s", + e.response.status_code, + link, + ) + raise + + filename = _get_http_response_filename(resp, link) + filepath = os.path.join(location, filename) + + chunks = _prepare_download(resp, link, self._progress_bar) + with open(filepath, "wb") as content_file: + for chunk in chunks: + content_file.write(chunk) + content_type = resp.headers.get("Content-Type", "") + yield link, (filepath, content_type) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py new file mode 100644 index 0000000000000000000000000000000000000000..03f883c1fc46d374e2b4556c361e4d173aacf027 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py @@ -0,0 +1,210 @@ +"""Lazy ZIP over HTTP""" + +__all__ = ["HTTPRangeRequestUnsupported", "dist_from_wheel_url"] + +from bisect import bisect_left, bisect_right +from contextlib import contextmanager +from tempfile import NamedTemporaryFile +from typing import Any, Dict, Generator, List, Optional, Tuple +from zipfile import BadZipFile, ZipFile + +from pip._vendor.packaging.utils import canonicalize_name +from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response + +from pip._internal.metadata import BaseDistribution, MemoryWheel, get_wheel_distribution +from pip._internal.network.session import PipSession +from pip._internal.network.utils import HEADERS, raise_for_status, response_chunks + + +class HTTPRangeRequestUnsupported(Exception): + pass + + +def dist_from_wheel_url(name: str, url: str, session: PipSession) -> BaseDistribution: + """Return a distribution object from the given wheel URL. + + This uses HTTP range requests to only fetch the portion of the wheel + containing metadata, just enough for the object to be constructed. + If such requests are not supported, HTTPRangeRequestUnsupported + is raised. + """ + with LazyZipOverHTTP(url, session) as zf: + # For read-only ZIP files, ZipFile only needs methods read, + # seek, seekable and tell, not the whole IO protocol. + wheel = MemoryWheel(zf.name, zf) # type: ignore + # After context manager exit, wheel.name + # is an invalid file by intention. + return get_wheel_distribution(wheel, canonicalize_name(name)) + + +class LazyZipOverHTTP: + """File-like object mapped to a ZIP file over HTTP. + + This uses HTTP range requests to lazily fetch the file's content, + which is supposed to be fed to ZipFile. If such requests are not + supported by the server, raise HTTPRangeRequestUnsupported + during initialization. + """ + + def __init__( + self, url: str, session: PipSession, chunk_size: int = CONTENT_CHUNK_SIZE + ) -> None: + head = session.head(url, headers=HEADERS) + raise_for_status(head) + assert head.status_code == 200 + self._session, self._url, self._chunk_size = session, url, chunk_size + self._length = int(head.headers["Content-Length"]) + self._file = NamedTemporaryFile() + self.truncate(self._length) + self._left: List[int] = [] + self._right: List[int] = [] + if "bytes" not in head.headers.get("Accept-Ranges", "none"): + raise HTTPRangeRequestUnsupported("range request is not supported") + self._check_zip() + + @property + def mode(self) -> str: + """Opening mode, which is always rb.""" + return "rb" + + @property + def name(self) -> str: + """Path to the underlying file.""" + return self._file.name + + def seekable(self) -> bool: + """Return whether random access is supported, which is True.""" + return True + + def close(self) -> None: + """Close the file.""" + self._file.close() + + @property + def closed(self) -> bool: + """Whether the file is closed.""" + return self._file.closed + + def read(self, size: int = -1) -> bytes: + """Read up to size bytes from the object and return them. + + As a convenience, if size is unspecified or -1, + all bytes until EOF are returned. Fewer than + size bytes may be returned if EOF is reached. + """ + download_size = max(size, self._chunk_size) + start, length = self.tell(), self._length + stop = length if size < 0 else min(start + download_size, length) + start = max(0, stop - download_size) + self._download(start, stop - 1) + return self._file.read(size) + + def readable(self) -> bool: + """Return whether the file is readable, which is True.""" + return True + + def seek(self, offset: int, whence: int = 0) -> int: + """Change stream position and return the new absolute position. + + Seek to offset relative position indicated by whence: + * 0: Start of stream (the default). pos should be >= 0; + * 1: Current position - pos may be negative; + * 2: End of stream - pos usually negative. + """ + return self._file.seek(offset, whence) + + def tell(self) -> int: + """Return the current position.""" + return self._file.tell() + + def truncate(self, size: Optional[int] = None) -> int: + """Resize the stream to the given size in bytes. + + If size is unspecified resize to the current position. + The current stream position isn't changed. + + Return the new file size. + """ + return self._file.truncate(size) + + def writable(self) -> bool: + """Return False.""" + return False + + def __enter__(self) -> "LazyZipOverHTTP": + self._file.__enter__() + return self + + def __exit__(self, *exc: Any) -> None: + self._file.__exit__(*exc) + + @contextmanager + def _stay(self) -> Generator[None, None, None]: + """Return a context manager keeping the position. + + At the end of the block, seek back to original position. + """ + pos = self.tell() + try: + yield + finally: + self.seek(pos) + + def _check_zip(self) -> None: + """Check and download until the file is a valid ZIP.""" + end = self._length - 1 + for start in reversed(range(0, end, self._chunk_size)): + self._download(start, end) + with self._stay(): + try: + # For read-only ZIP files, ZipFile only needs + # methods read, seek, seekable and tell. + ZipFile(self) + except BadZipFile: + pass + else: + break + + def _stream_response( + self, start: int, end: int, base_headers: Dict[str, str] = HEADERS + ) -> Response: + """Return HTTP response to a range request from start to end.""" + headers = base_headers.copy() + headers["Range"] = f"bytes={start}-{end}" + # TODO: Get range requests to be correctly cached + headers["Cache-Control"] = "no-cache" + return self._session.get(self._url, headers=headers, stream=True) + + def _merge( + self, start: int, end: int, left: int, right: int + ) -> Generator[Tuple[int, int], None, None]: + """Return a generator of intervals to be fetched. + + Args: + start (int): Start of needed interval + end (int): End of needed interval + left (int): Index of first overlapping downloaded data + right (int): Index after last overlapping downloaded data + """ + lslice, rslice = self._left[left:right], self._right[left:right] + i = start = min([start] + lslice[:1]) + end = max([end] + rslice[-1:]) + for j, k in zip(lslice, rslice): + if j > i: + yield i, j - 1 + i = k + 1 + if i <= end: + yield i, end + self._left[left:right], self._right[left:right] = [start], [end] + + def _download(self, start: int, end: int) -> None: + """Download bytes from start to end inclusively.""" + with self._stay(): + left = bisect_left(self._right, start) + right = bisect_right(self._left, end) + for start, end in self._merge(start, end, left, right): + response = self._stream_response(start, end) + response.raise_for_status() + self.seek(start) + for chunk in response_chunks(response, self._chunk_size): + self._file.write(chunk) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/session.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/session.py new file mode 100644 index 0000000000000000000000000000000000000000..5e10f8f56154032bd06400db48afc890326dc5f6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/session.py @@ -0,0 +1,523 @@ +"""PipSession and supporting code, containing all pip-specific +network request configuration and behavior. +""" + +import email.utils +import functools +import io +import ipaddress +import json +import logging +import mimetypes +import os +import platform +import shutil +import subprocess +import sys +import urllib.parse +import warnings +from typing import ( + TYPE_CHECKING, + Any, + Dict, + Generator, + List, + Mapping, + Optional, + Sequence, + Tuple, + Union, +) + +from pip._vendor import requests, urllib3 +from pip._vendor.cachecontrol import CacheControlAdapter as _BaseCacheControlAdapter +from pip._vendor.requests.adapters import DEFAULT_POOLBLOCK, BaseAdapter +from pip._vendor.requests.adapters import HTTPAdapter as _BaseHTTPAdapter +from pip._vendor.requests.models import PreparedRequest, Response +from pip._vendor.requests.structures import CaseInsensitiveDict +from pip._vendor.urllib3.connectionpool import ConnectionPool +from pip._vendor.urllib3.exceptions import InsecureRequestWarning + +from pip import __version__ +from pip._internal.metadata import get_default_environment +from pip._internal.models.link import Link +from pip._internal.network.auth import MultiDomainBasicAuth +from pip._internal.network.cache import SafeFileCache + +# Import ssl from compat so the initial import occurs in only one place. +from pip._internal.utils.compat import has_tls +from pip._internal.utils.glibc import libc_ver +from pip._internal.utils.misc import build_url_from_netloc, parse_netloc +from pip._internal.utils.urls import url_to_path + +if TYPE_CHECKING: + from ssl import SSLContext + + from pip._vendor.urllib3.poolmanager import PoolManager + + +logger = logging.getLogger(__name__) + +SecureOrigin = Tuple[str, str, Optional[Union[int, str]]] + + +# Ignore warning raised when using --trusted-host. +warnings.filterwarnings("ignore", category=InsecureRequestWarning) + + +SECURE_ORIGINS: List[SecureOrigin] = [ + # protocol, hostname, port + # Taken from Chrome's list of secure origins (See: http://bit.ly/1qrySKC) + ("https", "*", "*"), + ("*", "localhost", "*"), + ("*", "127.0.0.0/8", "*"), + ("*", "::1/128", "*"), + ("file", "*", None), + # ssh is always secure. + ("ssh", "*", "*"), +] + + +# These are environment variables present when running under various +# CI systems. For each variable, some CI systems that use the variable +# are indicated. The collection was chosen so that for each of a number +# of popular systems, at least one of the environment variables is used. +# This list is used to provide some indication of and lower bound for +# CI traffic to PyPI. Thus, it is okay if the list is not comprehensive. +# For more background, see: https://github.com/pypa/pip/issues/5499 +CI_ENVIRONMENT_VARIABLES = ( + # Azure Pipelines + "BUILD_BUILDID", + # Jenkins + "BUILD_ID", + # AppVeyor, CircleCI, Codeship, Gitlab CI, Shippable, Travis CI + "CI", + # Explicit environment variable. + "PIP_IS_CI", +) + + +def looks_like_ci() -> bool: + """ + Return whether it looks like pip is running under CI. + """ + # We don't use the method of checking for a tty (e.g. using isatty()) + # because some CI systems mimic a tty (e.g. Travis CI). Thus that + # method doesn't provide definitive information in either direction. + return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES) + + +@functools.lru_cache(maxsize=1) +def user_agent() -> str: + """ + Return a string representing the user agent. + """ + data: Dict[str, Any] = { + "installer": {"name": "pip", "version": __version__}, + "python": platform.python_version(), + "implementation": { + "name": platform.python_implementation(), + }, + } + + if data["implementation"]["name"] == "CPython": + data["implementation"]["version"] = platform.python_version() + elif data["implementation"]["name"] == "PyPy": + pypy_version_info = sys.pypy_version_info # type: ignore + if pypy_version_info.releaselevel == "final": + pypy_version_info = pypy_version_info[:3] + data["implementation"]["version"] = ".".join( + [str(x) for x in pypy_version_info] + ) + elif data["implementation"]["name"] == "Jython": + # Complete Guess + data["implementation"]["version"] = platform.python_version() + elif data["implementation"]["name"] == "IronPython": + # Complete Guess + data["implementation"]["version"] = platform.python_version() + + if sys.platform.startswith("linux"): + from pip._vendor import distro + + linux_distribution = distro.name(), distro.version(), distro.codename() + distro_infos: Dict[str, Any] = dict( + filter( + lambda x: x[1], + zip(["name", "version", "id"], linux_distribution), + ) + ) + libc = dict( + filter( + lambda x: x[1], + zip(["lib", "version"], libc_ver()), + ) + ) + if libc: + distro_infos["libc"] = libc + if distro_infos: + data["distro"] = distro_infos + + if sys.platform.startswith("darwin") and platform.mac_ver()[0]: + data["distro"] = {"name": "macOS", "version": platform.mac_ver()[0]} + + if platform.system(): + data.setdefault("system", {})["name"] = platform.system() + + if platform.release(): + data.setdefault("system", {})["release"] = platform.release() + + if platform.machine(): + data["cpu"] = platform.machine() + + if has_tls(): + import _ssl as ssl + + data["openssl_version"] = ssl.OPENSSL_VERSION + + setuptools_dist = get_default_environment().get_distribution("setuptools") + if setuptools_dist is not None: + data["setuptools_version"] = str(setuptools_dist.version) + + if shutil.which("rustc") is not None: + # If for any reason `rustc --version` fails, silently ignore it + try: + rustc_output = subprocess.check_output( + ["rustc", "--version"], stderr=subprocess.STDOUT, timeout=0.5 + ) + except Exception: + pass + else: + if rustc_output.startswith(b"rustc "): + # The format of `rustc --version` is: + # `b'rustc 1.52.1 (9bc8c42bb 2021-05-09)\n'` + # We extract just the middle (1.52.1) part + data["rustc_version"] = rustc_output.split(b" ")[1].decode() + + # Use None rather than False so as not to give the impression that + # pip knows it is not being run under CI. Rather, it is a null or + # inconclusive result. Also, we include some value rather than no + # value to make it easier to know that the check has been run. + data["ci"] = True if looks_like_ci() else None + + user_data = os.environ.get("PIP_USER_AGENT_USER_DATA") + if user_data is not None: + data["user_data"] = user_data + + return "{data[installer][name]}/{data[installer][version]} {json}".format( + data=data, + json=json.dumps(data, separators=(",", ":"), sort_keys=True), + ) + + +class LocalFSAdapter(BaseAdapter): + def send( + self, + request: PreparedRequest, + stream: bool = False, + timeout: Optional[Union[float, Tuple[float, float]]] = None, + verify: Union[bool, str] = True, + cert: Optional[Union[str, Tuple[str, str]]] = None, + proxies: Optional[Mapping[str, str]] = None, + ) -> Response: + pathname = url_to_path(request.url) + + resp = Response() + resp.status_code = 200 + resp.url = request.url + + try: + stats = os.stat(pathname) + except OSError as exc: + # format the exception raised as a io.BytesIO object, + # to return a better error message: + resp.status_code = 404 + resp.reason = type(exc).__name__ + resp.raw = io.BytesIO(f"{resp.reason}: {exc}".encode()) + else: + modified = email.utils.formatdate(stats.st_mtime, usegmt=True) + content_type = mimetypes.guess_type(pathname)[0] or "text/plain" + resp.headers = CaseInsensitiveDict( + { + "Content-Type": content_type, + "Content-Length": stats.st_size, + "Last-Modified": modified, + } + ) + + resp.raw = open(pathname, "rb") + resp.close = resp.raw.close + + return resp + + def close(self) -> None: + pass + + +class _SSLContextAdapterMixin: + """Mixin to add the ``ssl_context`` constructor argument to HTTP adapters. + + The additional argument is forwarded directly to the pool manager. This allows us + to dynamically decide what SSL store to use at runtime, which is used to implement + the optional ``truststore`` backend. + """ + + def __init__( + self, + *, + ssl_context: Optional["SSLContext"] = None, + **kwargs: Any, + ) -> None: + self._ssl_context = ssl_context + super().__init__(**kwargs) + + def init_poolmanager( + self, + connections: int, + maxsize: int, + block: bool = DEFAULT_POOLBLOCK, + **pool_kwargs: Any, + ) -> "PoolManager": + if self._ssl_context is not None: + pool_kwargs.setdefault("ssl_context", self._ssl_context) + return super().init_poolmanager( # type: ignore[misc] + connections=connections, + maxsize=maxsize, + block=block, + **pool_kwargs, + ) + + +class HTTPAdapter(_SSLContextAdapterMixin, _BaseHTTPAdapter): + pass + + +class CacheControlAdapter(_SSLContextAdapterMixin, _BaseCacheControlAdapter): + pass + + +class InsecureHTTPAdapter(HTTPAdapter): + def cert_verify( + self, + conn: ConnectionPool, + url: str, + verify: Union[bool, str], + cert: Optional[Union[str, Tuple[str, str]]], + ) -> None: + super().cert_verify(conn=conn, url=url, verify=False, cert=cert) + + +class InsecureCacheControlAdapter(CacheControlAdapter): + def cert_verify( + self, + conn: ConnectionPool, + url: str, + verify: Union[bool, str], + cert: Optional[Union[str, Tuple[str, str]]], + ) -> None: + super().cert_verify(conn=conn, url=url, verify=False, cert=cert) + + +class PipSession(requests.Session): + timeout: Optional[int] = None + + def __init__( + self, + *args: Any, + retries: int = 0, + cache: Optional[str] = None, + trusted_hosts: Sequence[str] = (), + index_urls: Optional[List[str]] = None, + ssl_context: Optional["SSLContext"] = None, + **kwargs: Any, + ) -> None: + """ + :param trusted_hosts: Domains not to emit warnings for when not using + HTTPS. + """ + super().__init__(*args, **kwargs) + + # Namespace the attribute with "pip_" just in case to prevent + # possible conflicts with the base class. + self.pip_trusted_origins: List[Tuple[str, Optional[int]]] = [] + self.pip_proxy = None + + # Attach our User Agent to the request + self.headers["User-Agent"] = user_agent() + + # Attach our Authentication handler to the session + self.auth = MultiDomainBasicAuth(index_urls=index_urls) + + # Create our urllib3.Retry instance which will allow us to customize + # how we handle retries. + retries = urllib3.Retry( + # Set the total number of retries that a particular request can + # have. + total=retries, + # A 503 error from PyPI typically means that the Fastly -> Origin + # connection got interrupted in some way. A 503 error in general + # is typically considered a transient error so we'll go ahead and + # retry it. + # A 500 may indicate transient error in Amazon S3 + # A 502 may be a transient error from a CDN like CloudFlare or CloudFront + # A 520 or 527 - may indicate transient error in CloudFlare + status_forcelist=[500, 502, 503, 520, 527], + # Add a small amount of back off between failed requests in + # order to prevent hammering the service. + backoff_factor=0.25, + ) # type: ignore + + # Our Insecure HTTPAdapter disables HTTPS validation. It does not + # support caching so we'll use it for all http:// URLs. + # If caching is disabled, we will also use it for + # https:// hosts that we've marked as ignoring + # TLS errors for (trusted-hosts). + insecure_adapter = InsecureHTTPAdapter(max_retries=retries) + + # We want to _only_ cache responses on securely fetched origins or when + # the host is specified as trusted. We do this because + # we can't validate the response of an insecurely/untrusted fetched + # origin, and we don't want someone to be able to poison the cache and + # require manual eviction from the cache to fix it. + if cache: + secure_adapter = CacheControlAdapter( + cache=SafeFileCache(cache), + max_retries=retries, + ssl_context=ssl_context, + ) + self._trusted_host_adapter = InsecureCacheControlAdapter( + cache=SafeFileCache(cache), + max_retries=retries, + ) + else: + secure_adapter = HTTPAdapter(max_retries=retries, ssl_context=ssl_context) + self._trusted_host_adapter = insecure_adapter + + self.mount("https://", secure_adapter) + self.mount("http://", insecure_adapter) + + # Enable file:// urls + self.mount("file://", LocalFSAdapter()) + + for host in trusted_hosts: + self.add_trusted_host(host, suppress_logging=True) + + def update_index_urls(self, new_index_urls: List[str]) -> None: + """ + :param new_index_urls: New index urls to update the authentication + handler with. + """ + self.auth.index_urls = new_index_urls + + def add_trusted_host( + self, host: str, source: Optional[str] = None, suppress_logging: bool = False + ) -> None: + """ + :param host: It is okay to provide a host that has previously been + added. + :param source: An optional source string, for logging where the host + string came from. + """ + if not suppress_logging: + msg = f"adding trusted host: {host!r}" + if source is not None: + msg += f" (from {source})" + logger.info(msg) + + parsed_host, parsed_port = parse_netloc(host) + if parsed_host is None: + raise ValueError(f"Trusted host URL must include a host part: {host!r}") + if (parsed_host, parsed_port) not in self.pip_trusted_origins: + self.pip_trusted_origins.append((parsed_host, parsed_port)) + + self.mount( + build_url_from_netloc(host, scheme="http") + "/", self._trusted_host_adapter + ) + self.mount(build_url_from_netloc(host) + "/", self._trusted_host_adapter) + if not parsed_port: + self.mount( + build_url_from_netloc(host, scheme="http") + ":", + self._trusted_host_adapter, + ) + # Mount wildcard ports for the same host. + self.mount(build_url_from_netloc(host) + ":", self._trusted_host_adapter) + + def iter_secure_origins(self) -> Generator[SecureOrigin, None, None]: + yield from SECURE_ORIGINS + for host, port in self.pip_trusted_origins: + yield ("*", host, "*" if port is None else port) + + def is_secure_origin(self, location: Link) -> bool: + # Determine if this url used a secure transport mechanism + parsed = urllib.parse.urlparse(str(location)) + origin_protocol, origin_host, origin_port = ( + parsed.scheme, + parsed.hostname, + parsed.port, + ) + + # The protocol to use to see if the protocol matches. + # Don't count the repository type as part of the protocol: in + # cases such as "git+ssh", only use "ssh". (I.e., Only verify against + # the last scheme.) + origin_protocol = origin_protocol.rsplit("+", 1)[-1] + + # Determine if our origin is a secure origin by looking through our + # hardcoded list of secure origins, as well as any additional ones + # configured on this PackageFinder instance. + for secure_origin in self.iter_secure_origins(): + secure_protocol, secure_host, secure_port = secure_origin + if origin_protocol != secure_protocol and secure_protocol != "*": + continue + + try: + addr = ipaddress.ip_address(origin_host or "") + network = ipaddress.ip_network(secure_host) + except ValueError: + # We don't have both a valid address or a valid network, so + # we'll check this origin against hostnames. + if ( + origin_host + and origin_host.lower() != secure_host.lower() + and secure_host != "*" + ): + continue + else: + # We have a valid address and network, so see if the address + # is contained within the network. + if addr not in network: + continue + + # Check to see if the port matches. + if ( + origin_port != secure_port + and secure_port != "*" + and secure_port is not None + ): + continue + + # If we've gotten here, then this origin matches the current + # secure origin and we should return True + return True + + # If we've gotten to this point, then the origin isn't secure and we + # will not accept it as a valid location to search. We will however + # log a warning that we are ignoring it. + logger.warning( + "The repository located at %s is not a trusted or secure host and " + "is being ignored. If this repository is available via HTTPS we " + "recommend you use HTTPS instead, otherwise you may silence " + "this warning and allow it anyway with '--trusted-host %s'.", + origin_host, + origin_host, + ) + + return False + + def request(self, method: str, url: str, *args: Any, **kwargs: Any) -> Response: + # Allow setting a default timeout on a session + kwargs.setdefault("timeout", self.timeout) + # Allow setting a default proxies on a session + kwargs.setdefault("proxies", self.proxies) + + # Dispatch the actual request + return super().request(method, url, *args, **kwargs) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/utils.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..bba4c265e89b1ce570ceeeebf1a321eebec919b4 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/utils.py @@ -0,0 +1,98 @@ +from typing import Dict, Generator + +from pip._vendor.requests.models import Response + +from pip._internal.exceptions import NetworkConnectionError + +# The following comments and HTTP headers were originally added by +# Donald Stufft in git commit 22c562429a61bb77172039e480873fb239dd8c03. +# +# We use Accept-Encoding: identity here because requests defaults to +# accepting compressed responses. This breaks in a variety of ways +# depending on how the server is configured. +# - Some servers will notice that the file isn't a compressible file +# and will leave the file alone and with an empty Content-Encoding +# - Some servers will notice that the file is already compressed and +# will leave the file alone, adding a Content-Encoding: gzip header +# - Some servers won't notice anything at all and will take a file +# that's already been compressed and compress it again, and set +# the Content-Encoding: gzip header +# By setting this to request only the identity encoding we're hoping +# to eliminate the third case. Hopefully there does not exist a server +# which when given a file will notice it is already compressed and that +# you're not asking for a compressed file and will then decompress it +# before sending because if that's the case I don't think it'll ever be +# possible to make this work. +HEADERS: Dict[str, str] = {"Accept-Encoding": "identity"} + +DOWNLOAD_CHUNK_SIZE = 256 * 1024 + + +def raise_for_status(resp: Response) -> None: + http_error_msg = "" + if isinstance(resp.reason, bytes): + # We attempt to decode utf-8 first because some servers + # choose to localize their reason strings. If the string + # isn't utf-8, we fall back to iso-8859-1 for all other + # encodings. + try: + reason = resp.reason.decode("utf-8") + except UnicodeDecodeError: + reason = resp.reason.decode("iso-8859-1") + else: + reason = resp.reason + + if 400 <= resp.status_code < 500: + http_error_msg = ( + f"{resp.status_code} Client Error: {reason} for url: {resp.url}" + ) + + elif 500 <= resp.status_code < 600: + http_error_msg = ( + f"{resp.status_code} Server Error: {reason} for url: {resp.url}" + ) + + if http_error_msg: + raise NetworkConnectionError(http_error_msg, response=resp) + + +def response_chunks( + response: Response, chunk_size: int = DOWNLOAD_CHUNK_SIZE +) -> Generator[bytes, None, None]: + """Given a requests Response, provide the data chunks.""" + try: + # Special case for urllib3. + for chunk in response.raw.stream( + chunk_size, + # We use decode_content=False here because we don't + # want urllib3 to mess with the raw bytes we get + # from the server. If we decompress inside of + # urllib3 then we cannot verify the checksum + # because the checksum will be of the compressed + # file. This breakage will only occur if the + # server adds a Content-Encoding header, which + # depends on how the server was configured: + # - Some servers will notice that the file isn't a + # compressible file and will leave the file alone + # and with an empty Content-Encoding + # - Some servers will notice that the file is + # already compressed and will leave the file + # alone and will add a Content-Encoding: gzip + # header + # - Some servers won't notice anything at all and + # will take a file that's already been compressed + # and compress it again and set the + # Content-Encoding: gzip header + # + # By setting this not to decode automatically we + # hope to eliminate problems with the second case. + decode_content=False, + ): + yield chunk + except AttributeError: + # Standard file-like object. + while True: + chunk = response.raw.read(chunk_size) + if not chunk: + break + yield chunk diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py new file mode 100644 index 0000000000000000000000000000000000000000..22ec8d2f4a6b276aedf2249d50ff10a21922513c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py @@ -0,0 +1,62 @@ +"""xmlrpclib.Transport implementation +""" + +import logging +import urllib.parse +import xmlrpc.client +from typing import TYPE_CHECKING, Tuple + +from pip._internal.exceptions import NetworkConnectionError +from pip._internal.network.session import PipSession +from pip._internal.network.utils import raise_for_status + +if TYPE_CHECKING: + from xmlrpc.client import _HostType, _Marshallable + + from _typeshed import SizedBuffer + +logger = logging.getLogger(__name__) + + +class PipXmlrpcTransport(xmlrpc.client.Transport): + """Provide a `xmlrpclib.Transport` implementation via a `PipSession` + object. + """ + + def __init__( + self, index_url: str, session: PipSession, use_datetime: bool = False + ) -> None: + super().__init__(use_datetime) + index_parts = urllib.parse.urlparse(index_url) + self._scheme = index_parts.scheme + self._session = session + + def request( + self, + host: "_HostType", + handler: str, + request_body: "SizedBuffer", + verbose: bool = False, + ) -> Tuple["_Marshallable", ...]: + assert isinstance(host, str) + parts = (self._scheme, host, handler, None, None, None) + url = urllib.parse.urlunparse(parts) + try: + headers = {"Content-Type": "text/xml"} + response = self._session.post( + url, + data=request_body, + headers=headers, + stream=True, + ) + raise_for_status(response) + self.verbose = verbose + return self.parse_response(response.raw) + except NetworkConnectionError as exc: + assert exc.response + logger.critical( + "HTTP error %s while getting %s", + exc.response.status_code, + url, + ) + raise diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f39d23c29d4e56507697266e6c2c6a1ec9d0a600 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a1280cf559d0dff562a3a083954884e369e6740 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8ab2494ca9c0d751b153be83e1b5d7c21277877 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d3e57c4ef84befc579360a2c2966c7de6a106489 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b869444e4931b4c3d2ee20fdd8368cf800483e0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6749682ad83b97510984142a21ddb46aa1891447 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a44a339c5c00b39c53f3c132c4803f9943048307 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..37ff5aba704566ec34a93c7200ae8f289f41bc9f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c15cc0a4b54eb37d8db44038ef5a42948004ca3 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25e1bd2e8f8ffd18b2a0adba5af69faf6c7ae717 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3cc78418da7cd034bb7ad935895a4c8ac28b227c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f03d1a71986835e43b6ef552036aa3709144a67e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py new file mode 100644 index 0000000000000000000000000000000000000000..0ed8dd235960bf406e26d5c0069b12c7f2d463e9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py @@ -0,0 +1,138 @@ +import contextlib +import hashlib +import logging +import os +from types import TracebackType +from typing import Dict, Generator, Optional, Type, Union + +from pip._internal.req.req_install import InstallRequirement +from pip._internal.utils.temp_dir import TempDirectory + +logger = logging.getLogger(__name__) + + +@contextlib.contextmanager +def update_env_context_manager(**changes: str) -> Generator[None, None, None]: + target = os.environ + + # Save values from the target and change them. + non_existent_marker = object() + saved_values: Dict[str, Union[object, str]] = {} + for name, new_value in changes.items(): + try: + saved_values[name] = target[name] + except KeyError: + saved_values[name] = non_existent_marker + target[name] = new_value + + try: + yield + finally: + # Restore original values in the target. + for name, original_value in saved_values.items(): + if original_value is non_existent_marker: + del target[name] + else: + assert isinstance(original_value, str) # for mypy + target[name] = original_value + + +@contextlib.contextmanager +def get_build_tracker() -> Generator["BuildTracker", None, None]: + root = os.environ.get("PIP_BUILD_TRACKER") + with contextlib.ExitStack() as ctx: + if root is None: + root = ctx.enter_context(TempDirectory(kind="build-tracker")).path + ctx.enter_context(update_env_context_manager(PIP_BUILD_TRACKER=root)) + logger.debug("Initialized build tracking at %s", root) + + with BuildTracker(root) as tracker: + yield tracker + + +class TrackerId(str): + """Uniquely identifying string provided to the build tracker.""" + + +class BuildTracker: + """Ensure that an sdist cannot request itself as a setup requirement. + + When an sdist is prepared, it identifies its setup requirements in the + context of ``BuildTracker.track()``. If a requirement shows up recursively, this + raises an exception. + + This stops fork bombs embedded in malicious packages.""" + + def __init__(self, root: str) -> None: + self._root = root + self._entries: Dict[TrackerId, InstallRequirement] = {} + logger.debug("Created build tracker: %s", self._root) + + def __enter__(self) -> "BuildTracker": + logger.debug("Entered build tracker: %s", self._root) + return self + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + self.cleanup() + + def _entry_path(self, key: TrackerId) -> str: + hashed = hashlib.sha224(key.encode()).hexdigest() + return os.path.join(self._root, hashed) + + def add(self, req: InstallRequirement, key: TrackerId) -> None: + """Add an InstallRequirement to build tracking.""" + + # Get the file to write information about this requirement. + entry_path = self._entry_path(key) + + # Try reading from the file. If it exists and can be read from, a build + # is already in progress, so a LookupError is raised. + try: + with open(entry_path) as fp: + contents = fp.read() + except FileNotFoundError: + pass + else: + message = f"{req.link} is already being built: {contents}" + raise LookupError(message) + + # If we're here, req should really not be building already. + assert key not in self._entries + + # Start tracking this requirement. + with open(entry_path, "w", encoding="utf-8") as fp: + fp.write(str(req)) + self._entries[key] = req + + logger.debug("Added %s to build tracker %r", req, self._root) + + def remove(self, req: InstallRequirement, key: TrackerId) -> None: + """Remove an InstallRequirement from build tracking.""" + + # Delete the created file and the corresponding entry. + os.unlink(self._entry_path(key)) + del self._entries[key] + + logger.debug("Removed %s from build tracker %r", req, self._root) + + def cleanup(self) -> None: + for key, req in list(self._entries.items()): + self.remove(req, key) + + logger.debug("Removed build tracker: %r", self._root) + + @contextlib.contextmanager + def track(self, req: InstallRequirement, key: str) -> Generator[None, None, None]: + """Ensure that `key` cannot install itself as a setup requirement. + + :raises LookupError: If `key` was already provided in a parent invocation of + the context introduced by this method.""" + tracker_id = TrackerId(key) + self.add(req, tracker_id) + yield + self.remove(req, tracker_id) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..c66ac354deb035405fe0e4040dac539d28570257 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py @@ -0,0 +1,39 @@ +"""Metadata generation logic for source distributions. +""" + +import os + +from pip._vendor.pyproject_hooks import BuildBackendHookCaller + +from pip._internal.build_env import BuildEnvironment +from pip._internal.exceptions import ( + InstallationSubprocessError, + MetadataGenerationFailed, +) +from pip._internal.utils.subprocess import runner_with_spinner_message +from pip._internal.utils.temp_dir import TempDirectory + + +def generate_metadata( + build_env: BuildEnvironment, backend: BuildBackendHookCaller, details: str +) -> str: + """Generate metadata using mechanisms described in PEP 517. + + Returns the generated metadata directory. + """ + metadata_tmpdir = TempDirectory(kind="modern-metadata", globally_managed=True) + + metadata_dir = metadata_tmpdir.path + + with build_env: + # Note that BuildBackendHookCaller implements a fallback for + # prepare_metadata_for_build_wheel, so we don't have to + # consider the possibility that this hook doesn't exist. + runner = runner_with_spinner_message("Preparing metadata (pyproject.toml)") + with backend.subprocess_runner(runner): + try: + distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir) + except InstallationSubprocessError as error: + raise MetadataGenerationFailed(package_details=details) from error + + return os.path.join(metadata_dir, distinfo_dir) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py new file mode 100644 index 0000000000000000000000000000000000000000..3397ccf0f92d5903281866a693979fdcfa7d3d61 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py @@ -0,0 +1,42 @@ +"""Metadata generation logic for source distributions. +""" + +import os + +from pip._vendor.pyproject_hooks import BuildBackendHookCaller + +from pip._internal.build_env import BuildEnvironment +from pip._internal.exceptions import ( + InstallationSubprocessError, + MetadataGenerationFailed, +) +from pip._internal.utils.subprocess import runner_with_spinner_message +from pip._internal.utils.temp_dir import TempDirectory + + +def generate_editable_metadata( + build_env: BuildEnvironment, backend: BuildBackendHookCaller, details: str +) -> str: + """Generate metadata using mechanisms described in PEP 660. + + Returns the generated metadata directory. + """ + metadata_tmpdir = TempDirectory(kind="modern-metadata", globally_managed=True) + + metadata_dir = metadata_tmpdir.path + + with build_env: + # Note that BuildBackendHookCaller implements a fallback for + # prepare_metadata_for_build_wheel/editable, so we don't have to + # consider the possibility that this hook doesn't exist. + runner = runner_with_spinner_message( + "Preparing editable metadata (pyproject.toml)" + ) + with backend.subprocess_runner(runner): + try: + distinfo_dir = backend.prepare_metadata_for_build_editable(metadata_dir) + except InstallationSubprocessError as error: + raise MetadataGenerationFailed(package_details=details) from error + + assert distinfo_dir is not None + return os.path.join(metadata_dir, distinfo_dir) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py new file mode 100644 index 0000000000000000000000000000000000000000..c01dd1c678a083c17190fc9b7e214eca5c91f4f1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py @@ -0,0 +1,74 @@ +"""Metadata generation logic for legacy source distributions. +""" + +import logging +import os + +from pip._internal.build_env import BuildEnvironment +from pip._internal.cli.spinners import open_spinner +from pip._internal.exceptions import ( + InstallationError, + InstallationSubprocessError, + MetadataGenerationFailed, +) +from pip._internal.utils.setuptools_build import make_setuptools_egg_info_args +from pip._internal.utils.subprocess import call_subprocess +from pip._internal.utils.temp_dir import TempDirectory + +logger = logging.getLogger(__name__) + + +def _find_egg_info(directory: str) -> str: + """Find an .egg-info subdirectory in `directory`.""" + filenames = [f for f in os.listdir(directory) if f.endswith(".egg-info")] + + if not filenames: + raise InstallationError(f"No .egg-info directory found in {directory}") + + if len(filenames) > 1: + raise InstallationError( + f"More than one .egg-info directory found in {directory}" + ) + + return os.path.join(directory, filenames[0]) + + +def generate_metadata( + build_env: BuildEnvironment, + setup_py_path: str, + source_dir: str, + isolated: bool, + details: str, +) -> str: + """Generate metadata using setup.py-based defacto mechanisms. + + Returns the generated metadata directory. + """ + logger.debug( + "Running setup.py (path:%s) egg_info for package %s", + setup_py_path, + details, + ) + + egg_info_dir = TempDirectory(kind="pip-egg-info", globally_managed=True).path + + args = make_setuptools_egg_info_args( + setup_py_path, + egg_info_dir=egg_info_dir, + no_user_config=isolated, + ) + + with build_env: + with open_spinner("Preparing metadata (setup.py)") as spinner: + try: + call_subprocess( + args, + cwd=source_dir, + command_desc="python setup.py egg_info", + spinner=spinner, + ) + except InstallationSubprocessError as error: + raise MetadataGenerationFailed(package_details=details) from error + + # Return the .egg-info directory. + return _find_egg_info(egg_info_dir) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py new file mode 100644 index 0000000000000000000000000000000000000000..064811ad11bb07b2b7bc8e30ec6c03f21997d6b2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py @@ -0,0 +1,37 @@ +import logging +import os +from typing import Optional + +from pip._vendor.pyproject_hooks import BuildBackendHookCaller + +from pip._internal.utils.subprocess import runner_with_spinner_message + +logger = logging.getLogger(__name__) + + +def build_wheel_pep517( + name: str, + backend: BuildBackendHookCaller, + metadata_directory: str, + tempd: str, +) -> Optional[str]: + """Build one InstallRequirement using the PEP 517 build process. + + Returns path to wheel if successfully built. Otherwise, returns None. + """ + assert metadata_directory is not None + try: + logger.debug("Destination directory: %s", tempd) + + runner = runner_with_spinner_message( + f"Building wheel for {name} (pyproject.toml)" + ) + with backend.subprocess_runner(runner): + wheel_name = backend.build_wheel( + tempd, + metadata_directory=metadata_directory, + ) + except Exception: + logger.error("Failed building wheel for %s", name) + return None + return os.path.join(tempd, wheel_name) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py new file mode 100644 index 0000000000000000000000000000000000000000..719d69dd801b78b360c6c2234080eee638b8de82 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py @@ -0,0 +1,46 @@ +import logging +import os +from typing import Optional + +from pip._vendor.pyproject_hooks import BuildBackendHookCaller, HookMissing + +from pip._internal.utils.subprocess import runner_with_spinner_message + +logger = logging.getLogger(__name__) + + +def build_wheel_editable( + name: str, + backend: BuildBackendHookCaller, + metadata_directory: str, + tempd: str, +) -> Optional[str]: + """Build one InstallRequirement using the PEP 660 build process. + + Returns path to wheel if successfully built. Otherwise, returns None. + """ + assert metadata_directory is not None + try: + logger.debug("Destination directory: %s", tempd) + + runner = runner_with_spinner_message( + f"Building editable for {name} (pyproject.toml)" + ) + with backend.subprocess_runner(runner): + try: + wheel_name = backend.build_editable( + tempd, + metadata_directory=metadata_directory, + ) + except HookMissing as e: + logger.error( + "Cannot build editable %s because the build " + "backend does not have the %s hook", + name, + e, + ) + return None + except Exception: + logger.error("Failed building editable for %s", name) + return None + return os.path.join(tempd, wheel_name) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee2a7058d323e41f3c930f14685f68e6a599fa5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py @@ -0,0 +1,102 @@ +import logging +import os.path +from typing import List, Optional + +from pip._internal.cli.spinners import open_spinner +from pip._internal.utils.setuptools_build import make_setuptools_bdist_wheel_args +from pip._internal.utils.subprocess import call_subprocess, format_command_args + +logger = logging.getLogger(__name__) + + +def format_command_result( + command_args: List[str], + command_output: str, +) -> str: + """Format command information for logging.""" + command_desc = format_command_args(command_args) + text = f"Command arguments: {command_desc}\n" + + if not command_output: + text += "Command output: None" + elif logger.getEffectiveLevel() > logging.DEBUG: + text += "Command output: [use --verbose to show]" + else: + if not command_output.endswith("\n"): + command_output += "\n" + text += f"Command output:\n{command_output}" + + return text + + +def get_legacy_build_wheel_path( + names: List[str], + temp_dir: str, + name: str, + command_args: List[str], + command_output: str, +) -> Optional[str]: + """Return the path to the wheel in the temporary build directory.""" + # Sort for determinism. + names = sorted(names) + if not names: + msg = f"Legacy build of wheel for {name!r} created no files.\n" + msg += format_command_result(command_args, command_output) + logger.warning(msg) + return None + + if len(names) > 1: + msg = ( + f"Legacy build of wheel for {name!r} created more than one file.\n" + f"Filenames (choosing first): {names}\n" + ) + msg += format_command_result(command_args, command_output) + logger.warning(msg) + + return os.path.join(temp_dir, names[0]) + + +def build_wheel_legacy( + name: str, + setup_py_path: str, + source_dir: str, + global_options: List[str], + build_options: List[str], + tempd: str, +) -> Optional[str]: + """Build one unpacked package using the "legacy" build process. + + Returns path to wheel if successfully built. Otherwise, returns None. + """ + wheel_args = make_setuptools_bdist_wheel_args( + setup_py_path, + global_options=global_options, + build_options=build_options, + destination_dir=tempd, + ) + + spin_message = f"Building wheel for {name} (setup.py)" + with open_spinner(spin_message) as spinner: + logger.debug("Destination directory: %s", tempd) + + try: + output = call_subprocess( + wheel_args, + command_desc="python setup.py bdist_wheel", + cwd=source_dir, + spinner=spinner, + ) + except Exception: + spinner.finish("error") + logger.error("Failed building wheel for %s", name) + return None + + names = os.listdir(tempd) + wheel_path = get_legacy_build_wheel_path( + names=names, + temp_dir=tempd, + name=name, + command_args=wheel_args, + command_output=output, + ) + return wheel_path diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/check.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/check.py new file mode 100644 index 0000000000000000000000000000000000000000..4b6fbc4c37599588ad69da3dc8a4d9628dc89b96 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/check.py @@ -0,0 +1,181 @@ +"""Validation of dependencies of packages +""" + +import logging +from contextlib import suppress +from email.parser import Parser +from functools import reduce +from typing import ( + Callable, + Dict, + FrozenSet, + Generator, + Iterable, + List, + NamedTuple, + Optional, + Set, + Tuple, +) + +from pip._vendor.packaging.requirements import Requirement +from pip._vendor.packaging.tags import Tag, parse_tag +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +from pip._vendor.packaging.version import Version + +from pip._internal.distributions import make_distribution_for_install_requirement +from pip._internal.metadata import get_default_environment +from pip._internal.metadata.base import BaseDistribution +from pip._internal.req.req_install import InstallRequirement + +logger = logging.getLogger(__name__) + + +class PackageDetails(NamedTuple): + version: Version + dependencies: List[Requirement] + + +# Shorthands +PackageSet = Dict[NormalizedName, PackageDetails] +Missing = Tuple[NormalizedName, Requirement] +Conflicting = Tuple[NormalizedName, Version, Requirement] + +MissingDict = Dict[NormalizedName, List[Missing]] +ConflictingDict = Dict[NormalizedName, List[Conflicting]] +CheckResult = Tuple[MissingDict, ConflictingDict] +ConflictDetails = Tuple[PackageSet, CheckResult] + + +def create_package_set_from_installed() -> Tuple[PackageSet, bool]: + """Converts a list of distributions into a PackageSet.""" + package_set = {} + problems = False + env = get_default_environment() + for dist in env.iter_installed_distributions(local_only=False, skip=()): + name = dist.canonical_name + try: + dependencies = list(dist.iter_dependencies()) + package_set[name] = PackageDetails(dist.version, dependencies) + except (OSError, ValueError) as e: + # Don't crash on unreadable or broken metadata. + logger.warning("Error parsing dependencies of %s: %s", name, e) + problems = True + return package_set, problems + + +def check_package_set( + package_set: PackageSet, should_ignore: Optional[Callable[[str], bool]] = None +) -> CheckResult: + """Check if a package set is consistent + + If should_ignore is passed, it should be a callable that takes a + package name and returns a boolean. + """ + + missing = {} + conflicting = {} + + for package_name, package_detail in package_set.items(): + # Info about dependencies of package_name + missing_deps: Set[Missing] = set() + conflicting_deps: Set[Conflicting] = set() + + if should_ignore and should_ignore(package_name): + continue + + for req in package_detail.dependencies: + name = canonicalize_name(req.name) + + # Check if it's missing + if name not in package_set: + missed = True + if req.marker is not None: + missed = req.marker.evaluate({"extra": ""}) + if missed: + missing_deps.add((name, req)) + continue + + # Check if there's a conflict + version = package_set[name].version + if not req.specifier.contains(version, prereleases=True): + conflicting_deps.add((name, version, req)) + + if missing_deps: + missing[package_name] = sorted(missing_deps, key=str) + if conflicting_deps: + conflicting[package_name] = sorted(conflicting_deps, key=str) + + return missing, conflicting + + +def check_install_conflicts(to_install: List[InstallRequirement]) -> ConflictDetails: + """For checking if the dependency graph would be consistent after \ + installing given requirements + """ + # Start from the current state + package_set, _ = create_package_set_from_installed() + # Install packages + would_be_installed = _simulate_installation_of(to_install, package_set) + + # Only warn about directly-dependent packages; create a whitelist of them + whitelist = _create_whitelist(would_be_installed, package_set) + + return ( + package_set, + check_package_set( + package_set, should_ignore=lambda name: name not in whitelist + ), + ) + + +def check_unsupported( + packages: Iterable[BaseDistribution], + supported_tags: Iterable[Tag], +) -> Generator[BaseDistribution, None, None]: + for p in packages: + with suppress(FileNotFoundError): + wheel_file = p.read_text("WHEEL") + wheel_tags: FrozenSet[Tag] = reduce( + frozenset.union, + map(parse_tag, Parser().parsestr(wheel_file).get_all("Tag", [])), + frozenset(), + ) + if wheel_tags.isdisjoint(supported_tags): + yield p + + +def _simulate_installation_of( + to_install: List[InstallRequirement], package_set: PackageSet +) -> Set[NormalizedName]: + """Computes the version of packages after installing to_install.""" + # Keep track of packages that were installed + installed = set() + + # Modify it as installing requirement_set would (assuming no errors) + for inst_req in to_install: + abstract_dist = make_distribution_for_install_requirement(inst_req) + dist = abstract_dist.get_metadata_distribution() + name = dist.canonical_name + package_set[name] = PackageDetails(dist.version, list(dist.iter_dependencies())) + + installed.add(name) + + return installed + + +def _create_whitelist( + would_be_installed: Set[NormalizedName], package_set: PackageSet +) -> Set[NormalizedName]: + packages_affected = set(would_be_installed) + + for package_name in package_set: + if package_name in packages_affected: + continue + + for req in package_set[package_name].dependencies: + if canonicalize_name(req.name) in packages_affected: + packages_affected.add(package_name) + break + + return packages_affected diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/freeze.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/freeze.py new file mode 100644 index 0000000000000000000000000000000000000000..ae5dd37f9db6e50dd48de55660bcb90e80b0ea64 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/freeze.py @@ -0,0 +1,256 @@ +import collections +import logging +import os +from dataclasses import dataclass, field +from typing import Container, Dict, Generator, Iterable, List, NamedTuple, Optional, Set + +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +from pip._vendor.packaging.version import InvalidVersion + +from pip._internal.exceptions import BadCommand, InstallationError +from pip._internal.metadata import BaseDistribution, get_environment +from pip._internal.req.constructors import ( + install_req_from_editable, + install_req_from_line, +) +from pip._internal.req.req_file import COMMENT_RE +from pip._internal.utils.direct_url_helpers import direct_url_as_pep440_direct_reference + +logger = logging.getLogger(__name__) + + +class _EditableInfo(NamedTuple): + requirement: str + comments: List[str] + + +def freeze( + requirement: Optional[List[str]] = None, + local_only: bool = False, + user_only: bool = False, + paths: Optional[List[str]] = None, + isolated: bool = False, + exclude_editable: bool = False, + skip: Container[str] = (), +) -> Generator[str, None, None]: + installations: Dict[str, FrozenRequirement] = {} + + dists = get_environment(paths).iter_installed_distributions( + local_only=local_only, + skip=(), + user_only=user_only, + ) + for dist in dists: + req = FrozenRequirement.from_dist(dist) + if exclude_editable and req.editable: + continue + installations[req.canonical_name] = req + + if requirement: + # the options that don't get turned into an InstallRequirement + # should only be emitted once, even if the same option is in multiple + # requirements files, so we need to keep track of what has been emitted + # so that we don't emit it again if it's seen again + emitted_options: Set[str] = set() + # keep track of which files a requirement is in so that we can + # give an accurate warning if a requirement appears multiple times. + req_files: Dict[str, List[str]] = collections.defaultdict(list) + for req_file_path in requirement: + with open(req_file_path) as req_file: + for line in req_file: + if ( + not line.strip() + or line.strip().startswith("#") + or line.startswith( + ( + "-r", + "--requirement", + "-f", + "--find-links", + "-i", + "--index-url", + "--pre", + "--trusted-host", + "--process-dependency-links", + "--extra-index-url", + "--use-feature", + ) + ) + ): + line = line.rstrip() + if line not in emitted_options: + emitted_options.add(line) + yield line + continue + + if line.startswith("-e") or line.startswith("--editable"): + if line.startswith("-e"): + line = line[2:].strip() + else: + line = line[len("--editable") :].strip().lstrip("=") + line_req = install_req_from_editable( + line, + isolated=isolated, + ) + else: + line_req = install_req_from_line( + COMMENT_RE.sub("", line).strip(), + isolated=isolated, + ) + + if not line_req.name: + logger.info( + "Skipping line in requirement file [%s] because " + "it's not clear what it would install: %s", + req_file_path, + line.strip(), + ) + logger.info( + " (add #egg=PackageName to the URL to avoid" + " this warning)" + ) + else: + line_req_canonical_name = canonicalize_name(line_req.name) + if line_req_canonical_name not in installations: + # either it's not installed, or it is installed + # but has been processed already + if not req_files[line_req.name]: + logger.warning( + "Requirement file [%s] contains %s, but " + "package %r is not installed", + req_file_path, + COMMENT_RE.sub("", line).strip(), + line_req.name, + ) + else: + req_files[line_req.name].append(req_file_path) + else: + yield str(installations[line_req_canonical_name]).rstrip() + del installations[line_req_canonical_name] + req_files[line_req.name].append(req_file_path) + + # Warn about requirements that were included multiple times (in a + # single requirements file or in different requirements files). + for name, files in req_files.items(): + if len(files) > 1: + logger.warning( + "Requirement %s included multiple times [%s]", + name, + ", ".join(sorted(set(files))), + ) + + yield ("## The following requirements were added by pip freeze:") + for installation in sorted(installations.values(), key=lambda x: x.name.lower()): + if installation.canonical_name not in skip: + yield str(installation).rstrip() + + +def _format_as_name_version(dist: BaseDistribution) -> str: + try: + dist_version = dist.version + except InvalidVersion: + # legacy version + return f"{dist.raw_name}==={dist.raw_version}" + else: + return f"{dist.raw_name}=={dist_version}" + + +def _get_editable_info(dist: BaseDistribution) -> _EditableInfo: + """ + Compute and return values (req, comments) for use in + FrozenRequirement.from_dist(). + """ + editable_project_location = dist.editable_project_location + assert editable_project_location + location = os.path.normcase(os.path.abspath(editable_project_location)) + + from pip._internal.vcs import RemoteNotFoundError, RemoteNotValidError, vcs + + vcs_backend = vcs.get_backend_for_dir(location) + + if vcs_backend is None: + display = _format_as_name_version(dist) + logger.debug( + 'No VCS found for editable requirement "%s" in: %r', + display, + location, + ) + return _EditableInfo( + requirement=location, + comments=[f"# Editable install with no version control ({display})"], + ) + + vcs_name = type(vcs_backend).__name__ + + try: + req = vcs_backend.get_src_requirement(location, dist.raw_name) + except RemoteNotFoundError: + display = _format_as_name_version(dist) + return _EditableInfo( + requirement=location, + comments=[f"# Editable {vcs_name} install with no remote ({display})"], + ) + except RemoteNotValidError as ex: + display = _format_as_name_version(dist) + return _EditableInfo( + requirement=location, + comments=[ + f"# Editable {vcs_name} install ({display}) with either a deleted " + f"local remote or invalid URI:", + f"# '{ex.url}'", + ], + ) + except BadCommand: + logger.warning( + "cannot determine version of editable source in %s " + "(%s command not found in path)", + location, + vcs_backend.name, + ) + return _EditableInfo(requirement=location, comments=[]) + except InstallationError as exc: + logger.warning("Error when trying to get requirement for VCS system %s", exc) + else: + return _EditableInfo(requirement=req, comments=[]) + + logger.warning("Could not determine repository location of %s", location) + + return _EditableInfo( + requirement=location, + comments=["## !! Could not determine repository location"], + ) + + +@dataclass(frozen=True) +class FrozenRequirement: + name: str + req: str + editable: bool + comments: Iterable[str] = field(default_factory=tuple) + + @property + def canonical_name(self) -> NormalizedName: + return canonicalize_name(self.name) + + @classmethod + def from_dist(cls, dist: BaseDistribution) -> "FrozenRequirement": + editable = dist.editable + if editable: + req, comments = _get_editable_info(dist) + else: + comments = [] + direct_url = dist.direct_url + if direct_url: + # if PEP 610 metadata is present, use it + req = direct_url_as_pep440_direct_reference(direct_url, dist.raw_name) + else: + # name==version requirement + req = _format_as_name_version(dist) + + return cls(dist.raw_name, req, editable, comments=comments) + + def __str__(self) -> str: + req = self.req + if self.editable: + req = f"-e {req}" + return "\n".join(list(self.comments) + [str(req)]) + "\n" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24d6a5dd31fe33b03f90ed0f9ee465253686900c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py @@ -0,0 +1,2 @@ +"""For modules related to installing packages. +""" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4a7449174080e206561d9e28d1e229f6a7228d1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..426ca5a0f7b2d776d6e906aecab6ab5eb48f39d6 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6f72c13922e3cea41ea88cc1c335d95917d01224 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py new file mode 100644 index 0000000000000000000000000000000000000000..9aaa699a645e03d5971dbb5e43ff73d2f412a550 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py @@ -0,0 +1,47 @@ +"""Legacy editable installation process, i.e. `setup.py develop`. +""" + +import logging +from typing import Optional, Sequence + +from pip._internal.build_env import BuildEnvironment +from pip._internal.utils.logging import indent_log +from pip._internal.utils.setuptools_build import make_setuptools_develop_args +from pip._internal.utils.subprocess import call_subprocess + +logger = logging.getLogger(__name__) + + +def install_editable( + *, + global_options: Sequence[str], + prefix: Optional[str], + home: Optional[str], + use_user_site: bool, + name: str, + setup_py_path: str, + isolated: bool, + build_env: BuildEnvironment, + unpacked_source_directory: str, +) -> None: + """Install a package in editable mode. Most arguments are pass-through + to setuptools. + """ + logger.info("Running setup.py develop for %s", name) + + args = make_setuptools_develop_args( + setup_py_path, + global_options=global_options, + no_user_config=isolated, + prefix=prefix, + home=home, + use_user_site=use_user_site, + ) + + with indent_log(): + with build_env: + call_subprocess( + args, + command_desc="python setup.py develop", + cwd=unpacked_source_directory, + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py new file mode 100644 index 0000000000000000000000000000000000000000..aef42aa9eefae7cae4a3d877b6dab1c53d85ad5f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py @@ -0,0 +1,741 @@ +"""Support for installing and building the "wheel" binary package format. +""" + +import collections +import compileall +import contextlib +import csv +import importlib +import logging +import os.path +import re +import shutil +import sys +import warnings +from base64 import urlsafe_b64encode +from email.message import Message +from itertools import chain, filterfalse, starmap +from typing import ( + IO, + TYPE_CHECKING, + Any, + BinaryIO, + Callable, + Dict, + Generator, + Iterable, + Iterator, + List, + NewType, + Optional, + Protocol, + Sequence, + Set, + Tuple, + Union, + cast, +) +from zipfile import ZipFile, ZipInfo + +from pip._vendor.distlib.scripts import ScriptMaker +from pip._vendor.distlib.util import get_export_entry +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.exceptions import InstallationError +from pip._internal.locations import get_major_minor_version +from pip._internal.metadata import ( + BaseDistribution, + FilesystemWheel, + get_wheel_distribution, +) +from pip._internal.models.direct_url import DIRECT_URL_METADATA_NAME, DirectUrl +from pip._internal.models.scheme import SCHEME_KEYS, Scheme +from pip._internal.utils.filesystem import adjacent_tmp_file, replace +from pip._internal.utils.misc import StreamWrapper, ensure_dir, hash_file, partition +from pip._internal.utils.unpacking import ( + current_umask, + is_within_directory, + set_extracted_file_to_default_mode_plus_executable, + zip_item_is_executable, +) +from pip._internal.utils.wheel import parse_wheel + +if TYPE_CHECKING: + + class File(Protocol): + src_record_path: "RecordPath" + dest_path: str + changed: bool + + def save(self) -> None: + pass + + +logger = logging.getLogger(__name__) + +RecordPath = NewType("RecordPath", str) +InstalledCSVRow = Tuple[RecordPath, str, Union[int, str]] + + +def rehash(path: str, blocksize: int = 1 << 20) -> Tuple[str, str]: + """Return (encoded_digest, length) for path using hashlib.sha256()""" + h, length = hash_file(path, blocksize) + digest = "sha256=" + urlsafe_b64encode(h.digest()).decode("latin1").rstrip("=") + return (digest, str(length)) + + +def csv_io_kwargs(mode: str) -> Dict[str, Any]: + """Return keyword arguments to properly open a CSV file + in the given mode. + """ + return {"mode": mode, "newline": "", "encoding": "utf-8"} + + +def fix_script(path: str) -> bool: + """Replace #!python with #!/path/to/python + Return True if file was changed. + """ + # XXX RECORD hashes will need to be updated + assert os.path.isfile(path) + + with open(path, "rb") as script: + firstline = script.readline() + if not firstline.startswith(b"#!python"): + return False + exename = sys.executable.encode(sys.getfilesystemencoding()) + firstline = b"#!" + exename + os.linesep.encode("ascii") + rest = script.read() + with open(path, "wb") as script: + script.write(firstline) + script.write(rest) + return True + + +def wheel_root_is_purelib(metadata: Message) -> bool: + return metadata.get("Root-Is-Purelib", "").lower() == "true" + + +def get_entrypoints(dist: BaseDistribution) -> Tuple[Dict[str, str], Dict[str, str]]: + console_scripts = {} + gui_scripts = {} + for entry_point in dist.iter_entry_points(): + if entry_point.group == "console_scripts": + console_scripts[entry_point.name] = entry_point.value + elif entry_point.group == "gui_scripts": + gui_scripts[entry_point.name] = entry_point.value + return console_scripts, gui_scripts + + +def message_about_scripts_not_on_PATH(scripts: Sequence[str]) -> Optional[str]: + """Determine if any scripts are not on PATH and format a warning. + Returns a warning message if one or more scripts are not on PATH, + otherwise None. + """ + if not scripts: + return None + + # Group scripts by the path they were installed in + grouped_by_dir: Dict[str, Set[str]] = collections.defaultdict(set) + for destfile in scripts: + parent_dir = os.path.dirname(destfile) + script_name = os.path.basename(destfile) + grouped_by_dir[parent_dir].add(script_name) + + # We don't want to warn for directories that are on PATH. + not_warn_dirs = [ + os.path.normcase(os.path.normpath(i)).rstrip(os.sep) + for i in os.environ.get("PATH", "").split(os.pathsep) + ] + # If an executable sits with sys.executable, we don't warn for it. + # This covers the case of venv invocations without activating the venv. + not_warn_dirs.append( + os.path.normcase(os.path.normpath(os.path.dirname(sys.executable))) + ) + warn_for: Dict[str, Set[str]] = { + parent_dir: scripts + for parent_dir, scripts in grouped_by_dir.items() + if os.path.normcase(os.path.normpath(parent_dir)) not in not_warn_dirs + } + if not warn_for: + return None + + # Format a message + msg_lines = [] + for parent_dir, dir_scripts in warn_for.items(): + sorted_scripts: List[str] = sorted(dir_scripts) + if len(sorted_scripts) == 1: + start_text = f"script {sorted_scripts[0]} is" + else: + start_text = "scripts {} are".format( + ", ".join(sorted_scripts[:-1]) + " and " + sorted_scripts[-1] + ) + + msg_lines.append( + f"The {start_text} installed in '{parent_dir}' which is not on PATH." + ) + + last_line_fmt = ( + "Consider adding {} to PATH or, if you prefer " + "to suppress this warning, use --no-warn-script-location." + ) + if len(msg_lines) == 1: + msg_lines.append(last_line_fmt.format("this directory")) + else: + msg_lines.append(last_line_fmt.format("these directories")) + + # Add a note if any directory starts with ~ + warn_for_tilde = any( + i[0] == "~" for i in os.environ.get("PATH", "").split(os.pathsep) if i + ) + if warn_for_tilde: + tilde_warning_msg = ( + "NOTE: The current PATH contains path(s) starting with `~`, " + "which may not be expanded by all applications." + ) + msg_lines.append(tilde_warning_msg) + + # Returns the formatted multiline message + return "\n".join(msg_lines) + + +def _normalized_outrows( + outrows: Iterable[InstalledCSVRow], +) -> List[Tuple[str, str, str]]: + """Normalize the given rows of a RECORD file. + + Items in each row are converted into str. Rows are then sorted to make + the value more predictable for tests. + + Each row is a 3-tuple (path, hash, size) and corresponds to a record of + a RECORD file (see PEP 376 and PEP 427 for details). For the rows + passed to this function, the size can be an integer as an int or string, + or the empty string. + """ + # Normally, there should only be one row per path, in which case the + # second and third elements don't come into play when sorting. + # However, in cases in the wild where a path might happen to occur twice, + # we don't want the sort operation to trigger an error (but still want + # determinism). Since the third element can be an int or string, we + # coerce each element to a string to avoid a TypeError in this case. + # For additional background, see-- + # https://github.com/pypa/pip/issues/5868 + return sorted( + (record_path, hash_, str(size)) for record_path, hash_, size in outrows + ) + + +def _record_to_fs_path(record_path: RecordPath, lib_dir: str) -> str: + return os.path.join(lib_dir, record_path) + + +def _fs_to_record_path(path: str, lib_dir: str) -> RecordPath: + # On Windows, do not handle relative paths if they belong to different + # logical disks + if os.path.splitdrive(path)[0].lower() == os.path.splitdrive(lib_dir)[0].lower(): + path = os.path.relpath(path, lib_dir) + + path = path.replace(os.path.sep, "/") + return cast("RecordPath", path) + + +def get_csv_rows_for_installed( + old_csv_rows: List[List[str]], + installed: Dict[RecordPath, RecordPath], + changed: Set[RecordPath], + generated: List[str], + lib_dir: str, +) -> List[InstalledCSVRow]: + """ + :param installed: A map from archive RECORD path to installation RECORD + path. + """ + installed_rows: List[InstalledCSVRow] = [] + for row in old_csv_rows: + if len(row) > 3: + logger.warning("RECORD line has more than three elements: %s", row) + old_record_path = cast("RecordPath", row[0]) + new_record_path = installed.pop(old_record_path, old_record_path) + if new_record_path in changed: + digest, length = rehash(_record_to_fs_path(new_record_path, lib_dir)) + else: + digest = row[1] if len(row) > 1 else "" + length = row[2] if len(row) > 2 else "" + installed_rows.append((new_record_path, digest, length)) + for f in generated: + path = _fs_to_record_path(f, lib_dir) + digest, length = rehash(f) + installed_rows.append((path, digest, length)) + return installed_rows + [ + (installed_record_path, "", "") for installed_record_path in installed.values() + ] + + +def get_console_script_specs(console: Dict[str, str]) -> List[str]: + """ + Given the mapping from entrypoint name to callable, return the relevant + console script specs. + """ + # Don't mutate caller's version + console = console.copy() + + scripts_to_generate = [] + + # Special case pip and setuptools to generate versioned wrappers + # + # The issue is that some projects (specifically, pip and setuptools) use + # code in setup.py to create "versioned" entry points - pip2.7 on Python + # 2.7, pip3.3 on Python 3.3, etc. But these entry points are baked into + # the wheel metadata at build time, and so if the wheel is installed with + # a *different* version of Python the entry points will be wrong. The + # correct fix for this is to enhance the metadata to be able to describe + # such versioned entry points. + # Currently, projects using versioned entry points will either have + # incorrect versioned entry points, or they will not be able to distribute + # "universal" wheels (i.e., they will need a wheel per Python version). + # + # Because setuptools and pip are bundled with _ensurepip and virtualenv, + # we need to use universal wheels. As a workaround, we + # override the versioned entry points in the wheel and generate the + # correct ones. + # + # To add the level of hack in this section of code, in order to support + # ensurepip this code will look for an ``ENSUREPIP_OPTIONS`` environment + # variable which will control which version scripts get installed. + # + # ENSUREPIP_OPTIONS=altinstall + # - Only pipX.Y and easy_install-X.Y will be generated and installed + # ENSUREPIP_OPTIONS=install + # - pipX.Y, pipX, easy_install-X.Y will be generated and installed. Note + # that this option is technically if ENSUREPIP_OPTIONS is set and is + # not altinstall + # DEFAULT + # - The default behavior is to install pip, pipX, pipX.Y, easy_install + # and easy_install-X.Y. + pip_script = console.pop("pip", None) + if pip_script: + if "ENSUREPIP_OPTIONS" not in os.environ: + scripts_to_generate.append("pip = " + pip_script) + + if os.environ.get("ENSUREPIP_OPTIONS", "") != "altinstall": + scripts_to_generate.append(f"pip{sys.version_info[0]} = {pip_script}") + + scripts_to_generate.append(f"pip{get_major_minor_version()} = {pip_script}") + # Delete any other versioned pip entry points + pip_ep = [k for k in console if re.match(r"pip(\d+(\.\d+)?)?$", k)] + for k in pip_ep: + del console[k] + easy_install_script = console.pop("easy_install", None) + if easy_install_script: + if "ENSUREPIP_OPTIONS" not in os.environ: + scripts_to_generate.append("easy_install = " + easy_install_script) + + scripts_to_generate.append( + f"easy_install-{get_major_minor_version()} = {easy_install_script}" + ) + # Delete any other versioned easy_install entry points + easy_install_ep = [ + k for k in console if re.match(r"easy_install(-\d+\.\d+)?$", k) + ] + for k in easy_install_ep: + del console[k] + + # Generate the console entry points specified in the wheel + scripts_to_generate.extend(starmap("{} = {}".format, console.items())) + + return scripts_to_generate + + +class ZipBackedFile: + def __init__( + self, src_record_path: RecordPath, dest_path: str, zip_file: ZipFile + ) -> None: + self.src_record_path = src_record_path + self.dest_path = dest_path + self._zip_file = zip_file + self.changed = False + + def _getinfo(self) -> ZipInfo: + return self._zip_file.getinfo(self.src_record_path) + + def save(self) -> None: + # When we open the output file below, any existing file is truncated + # before we start writing the new contents. This is fine in most + # cases, but can cause a segfault if pip has loaded a shared + # object (e.g. from pyopenssl through its vendored urllib3) + # Since the shared object is mmap'd an attempt to call a + # symbol in it will then cause a segfault. Unlinking the file + # allows writing of new contents while allowing the process to + # continue to use the old copy. + if os.path.exists(self.dest_path): + os.unlink(self.dest_path) + + zipinfo = self._getinfo() + + # optimization: the file is created by open(), + # skip the decompression when there is 0 bytes to decompress. + with open(self.dest_path, "wb") as dest: + if zipinfo.file_size > 0: + with self._zip_file.open(zipinfo) as f: + blocksize = min(zipinfo.file_size, 1024 * 1024) + shutil.copyfileobj(f, dest, blocksize) + + if zip_item_is_executable(zipinfo): + set_extracted_file_to_default_mode_plus_executable(self.dest_path) + + +class ScriptFile: + def __init__(self, file: "File") -> None: + self._file = file + self.src_record_path = self._file.src_record_path + self.dest_path = self._file.dest_path + self.changed = False + + def save(self) -> None: + self._file.save() + self.changed = fix_script(self.dest_path) + + +class MissingCallableSuffix(InstallationError): + def __init__(self, entry_point: str) -> None: + super().__init__( + f"Invalid script entry point: {entry_point} - A callable " + "suffix is required. Cf https://packaging.python.org/" + "specifications/entry-points/#use-for-scripts for more " + "information." + ) + + +def _raise_for_invalid_entrypoint(specification: str) -> None: + entry = get_export_entry(specification) + if entry is not None and entry.suffix is None: + raise MissingCallableSuffix(str(entry)) + + +class PipScriptMaker(ScriptMaker): + def make( + self, specification: str, options: Optional[Dict[str, Any]] = None + ) -> List[str]: + _raise_for_invalid_entrypoint(specification) + return super().make(specification, options) + + +def _install_wheel( # noqa: C901, PLR0915 function is too long + name: str, + wheel_zip: ZipFile, + wheel_path: str, + scheme: Scheme, + pycompile: bool = True, + warn_script_location: bool = True, + direct_url: Optional[DirectUrl] = None, + requested: bool = False, +) -> None: + """Install a wheel. + + :param name: Name of the project to install + :param wheel_zip: open ZipFile for wheel being installed + :param scheme: Distutils scheme dictating the install directories + :param req_description: String used in place of the requirement, for + logging + :param pycompile: Whether to byte-compile installed Python files + :param warn_script_location: Whether to check that scripts are installed + into a directory on PATH + :raises UnsupportedWheel: + * when the directory holds an unpacked wheel with incompatible + Wheel-Version + * when the .dist-info dir does not match the wheel + """ + info_dir, metadata = parse_wheel(wheel_zip, name) + + if wheel_root_is_purelib(metadata): + lib_dir = scheme.purelib + else: + lib_dir = scheme.platlib + + # Record details of the files moved + # installed = files copied from the wheel to the destination + # changed = files changed while installing (scripts #! line typically) + # generated = files newly generated during the install (script wrappers) + installed: Dict[RecordPath, RecordPath] = {} + changed: Set[RecordPath] = set() + generated: List[str] = [] + + def record_installed( + srcfile: RecordPath, destfile: str, modified: bool = False + ) -> None: + """Map archive RECORD paths to installation RECORD paths.""" + newpath = _fs_to_record_path(destfile, lib_dir) + installed[srcfile] = newpath + if modified: + changed.add(newpath) + + def is_dir_path(path: RecordPath) -> bool: + return path.endswith("/") + + def assert_no_path_traversal(dest_dir_path: str, target_path: str) -> None: + if not is_within_directory(dest_dir_path, target_path): + message = ( + "The wheel {!r} has a file {!r} trying to install" + " outside the target directory {!r}" + ) + raise InstallationError( + message.format(wheel_path, target_path, dest_dir_path) + ) + + def root_scheme_file_maker( + zip_file: ZipFile, dest: str + ) -> Callable[[RecordPath], "File"]: + def make_root_scheme_file(record_path: RecordPath) -> "File": + normed_path = os.path.normpath(record_path) + dest_path = os.path.join(dest, normed_path) + assert_no_path_traversal(dest, dest_path) + return ZipBackedFile(record_path, dest_path, zip_file) + + return make_root_scheme_file + + def data_scheme_file_maker( + zip_file: ZipFile, scheme: Scheme + ) -> Callable[[RecordPath], "File"]: + scheme_paths = {key: getattr(scheme, key) for key in SCHEME_KEYS} + + def make_data_scheme_file(record_path: RecordPath) -> "File": + normed_path = os.path.normpath(record_path) + try: + _, scheme_key, dest_subpath = normed_path.split(os.path.sep, 2) + except ValueError: + message = ( + f"Unexpected file in {wheel_path}: {record_path!r}. .data directory" + " contents should be named like: '/'." + ) + raise InstallationError(message) + + try: + scheme_path = scheme_paths[scheme_key] + except KeyError: + valid_scheme_keys = ", ".join(sorted(scheme_paths)) + message = ( + f"Unknown scheme key used in {wheel_path}: {scheme_key} " + f"(for file {record_path!r}). .data directory contents " + f"should be in subdirectories named with a valid scheme " + f"key ({valid_scheme_keys})" + ) + raise InstallationError(message) + + dest_path = os.path.join(scheme_path, dest_subpath) + assert_no_path_traversal(scheme_path, dest_path) + return ZipBackedFile(record_path, dest_path, zip_file) + + return make_data_scheme_file + + def is_data_scheme_path(path: RecordPath) -> bool: + return path.split("/", 1)[0].endswith(".data") + + paths = cast(List[RecordPath], wheel_zip.namelist()) + file_paths = filterfalse(is_dir_path, paths) + root_scheme_paths, data_scheme_paths = partition(is_data_scheme_path, file_paths) + + make_root_scheme_file = root_scheme_file_maker(wheel_zip, lib_dir) + files: Iterator[File] = map(make_root_scheme_file, root_scheme_paths) + + def is_script_scheme_path(path: RecordPath) -> bool: + parts = path.split("/", 2) + return len(parts) > 2 and parts[0].endswith(".data") and parts[1] == "scripts" + + other_scheme_paths, script_scheme_paths = partition( + is_script_scheme_path, data_scheme_paths + ) + + make_data_scheme_file = data_scheme_file_maker(wheel_zip, scheme) + other_scheme_files = map(make_data_scheme_file, other_scheme_paths) + files = chain(files, other_scheme_files) + + # Get the defined entry points + distribution = get_wheel_distribution( + FilesystemWheel(wheel_path), + canonicalize_name(name), + ) + console, gui = get_entrypoints(distribution) + + def is_entrypoint_wrapper(file: "File") -> bool: + # EP, EP.exe and EP-script.py are scripts generated for + # entry point EP by setuptools + path = file.dest_path + name = os.path.basename(path) + if name.lower().endswith(".exe"): + matchname = name[:-4] + elif name.lower().endswith("-script.py"): + matchname = name[:-10] + elif name.lower().endswith(".pya"): + matchname = name[:-4] + else: + matchname = name + # Ignore setuptools-generated scripts + return matchname in console or matchname in gui + + script_scheme_files: Iterator[File] = map( + make_data_scheme_file, script_scheme_paths + ) + script_scheme_files = filterfalse(is_entrypoint_wrapper, script_scheme_files) + script_scheme_files = map(ScriptFile, script_scheme_files) + files = chain(files, script_scheme_files) + + existing_parents = set() + for file in files: + # directory creation is lazy and after file filtering + # to ensure we don't install empty dirs; empty dirs can't be + # uninstalled. + parent_dir = os.path.dirname(file.dest_path) + if parent_dir not in existing_parents: + ensure_dir(parent_dir) + existing_parents.add(parent_dir) + file.save() + record_installed(file.src_record_path, file.dest_path, file.changed) + + def pyc_source_file_paths() -> Generator[str, None, None]: + # We de-duplicate installation paths, since there can be overlap (e.g. + # file in .data maps to same location as file in wheel root). + # Sorting installation paths makes it easier to reproduce and debug + # issues related to permissions on existing files. + for installed_path in sorted(set(installed.values())): + full_installed_path = os.path.join(lib_dir, installed_path) + if not os.path.isfile(full_installed_path): + continue + if not full_installed_path.endswith(".py"): + continue + yield full_installed_path + + def pyc_output_path(path: str) -> str: + """Return the path the pyc file would have been written to.""" + return importlib.util.cache_from_source(path) + + # Compile all of the pyc files for the installed files + if pycompile: + with contextlib.redirect_stdout( + StreamWrapper.from_stream(sys.stdout) + ) as stdout: + with warnings.catch_warnings(): + warnings.filterwarnings("ignore") + for path in pyc_source_file_paths(): + success = compileall.compile_file(path, force=True, quiet=True) + if success: + pyc_path = pyc_output_path(path) + assert os.path.exists(pyc_path) + pyc_record_path = cast( + "RecordPath", pyc_path.replace(os.path.sep, "/") + ) + record_installed(pyc_record_path, pyc_path) + logger.debug(stdout.getvalue()) + + maker = PipScriptMaker(None, scheme.scripts) + + # Ensure old scripts are overwritten. + # See https://github.com/pypa/pip/issues/1800 + maker.clobber = True + + # Ensure we don't generate any variants for scripts because this is almost + # never what somebody wants. + # See https://bitbucket.org/pypa/distlib/issue/35/ + maker.variants = {""} + + # This is required because otherwise distlib creates scripts that are not + # executable. + # See https://bitbucket.org/pypa/distlib/issue/32/ + maker.set_mode = True + + # Generate the console and GUI entry points specified in the wheel + scripts_to_generate = get_console_script_specs(console) + + gui_scripts_to_generate = list(starmap("{} = {}".format, gui.items())) + + generated_console_scripts = maker.make_multiple(scripts_to_generate) + generated.extend(generated_console_scripts) + + generated.extend(maker.make_multiple(gui_scripts_to_generate, {"gui": True})) + + if warn_script_location: + msg = message_about_scripts_not_on_PATH(generated_console_scripts) + if msg is not None: + logger.warning(msg) + + generated_file_mode = 0o666 & ~current_umask() + + @contextlib.contextmanager + def _generate_file(path: str, **kwargs: Any) -> Generator[BinaryIO, None, None]: + with adjacent_tmp_file(path, **kwargs) as f: + yield f + os.chmod(f.name, generated_file_mode) + replace(f.name, path) + + dest_info_dir = os.path.join(lib_dir, info_dir) + + # Record pip as the installer + installer_path = os.path.join(dest_info_dir, "INSTALLER") + with _generate_file(installer_path) as installer_file: + installer_file.write(b"pip\n") + generated.append(installer_path) + + # Record the PEP 610 direct URL reference + if direct_url is not None: + direct_url_path = os.path.join(dest_info_dir, DIRECT_URL_METADATA_NAME) + with _generate_file(direct_url_path) as direct_url_file: + direct_url_file.write(direct_url.to_json().encode("utf-8")) + generated.append(direct_url_path) + + # Record the REQUESTED file + if requested: + requested_path = os.path.join(dest_info_dir, "REQUESTED") + with open(requested_path, "wb"): + pass + generated.append(requested_path) + + record_text = distribution.read_text("RECORD") + record_rows = list(csv.reader(record_text.splitlines())) + + rows = get_csv_rows_for_installed( + record_rows, + installed=installed, + changed=changed, + generated=generated, + lib_dir=lib_dir, + ) + + # Record details of all files installed + record_path = os.path.join(dest_info_dir, "RECORD") + + with _generate_file(record_path, **csv_io_kwargs("w")) as record_file: + # Explicitly cast to typing.IO[str] as a workaround for the mypy error: + # "writer" has incompatible type "BinaryIO"; expected "_Writer" + writer = csv.writer(cast("IO[str]", record_file)) + writer.writerows(_normalized_outrows(rows)) + + +@contextlib.contextmanager +def req_error_context(req_description: str) -> Generator[None, None, None]: + try: + yield + except InstallationError as e: + message = f"For req: {req_description}. {e.args[0]}" + raise InstallationError(message) from e + + +def install_wheel( + name: str, + wheel_path: str, + scheme: Scheme, + req_description: str, + pycompile: bool = True, + warn_script_location: bool = True, + direct_url: Optional[DirectUrl] = None, + requested: bool = False, +) -> None: + with ZipFile(wheel_path, allowZip64=True) as z: + with req_error_context(req_description): + _install_wheel( + name=name, + wheel_zip=z, + wheel_path=wheel_path, + scheme=scheme, + pycompile=pycompile, + warn_script_location=warn_script_location, + direct_url=direct_url, + requested=requested, + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/prepare.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/prepare.py new file mode 100644 index 0000000000000000000000000000000000000000..e6aa344720028f422840a720d26f5cfab358062c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/operations/prepare.py @@ -0,0 +1,732 @@ +"""Prepares a distribution for installation +""" + +# The following comment should be removed at some point in the future. +# mypy: strict-optional=False + +import mimetypes +import os +import shutil +from dataclasses import dataclass +from pathlib import Path +from typing import Dict, Iterable, List, Optional + +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.distributions import make_distribution_for_install_requirement +from pip._internal.distributions.installed import InstalledDistribution +from pip._internal.exceptions import ( + DirectoryUrlHashUnsupported, + HashMismatch, + HashUnpinned, + InstallationError, + MetadataInconsistent, + NetworkConnectionError, + VcsHashUnsupported, +) +from pip._internal.index.package_finder import PackageFinder +from pip._internal.metadata import BaseDistribution, get_metadata_distribution +from pip._internal.models.direct_url import ArchiveInfo +from pip._internal.models.link import Link +from pip._internal.models.wheel import Wheel +from pip._internal.network.download import BatchDownloader, Downloader +from pip._internal.network.lazy_wheel import ( + HTTPRangeRequestUnsupported, + dist_from_wheel_url, +) +from pip._internal.network.session import PipSession +from pip._internal.operations.build.build_tracker import BuildTracker +from pip._internal.req.req_install import InstallRequirement +from pip._internal.utils._log import getLogger +from pip._internal.utils.direct_url_helpers import ( + direct_url_for_editable, + direct_url_from_link, +) +from pip._internal.utils.hashes import Hashes, MissingHashes +from pip._internal.utils.logging import indent_log +from pip._internal.utils.misc import ( + display_path, + hash_file, + hide_url, + redact_auth_from_requirement, +) +from pip._internal.utils.temp_dir import TempDirectory +from pip._internal.utils.unpacking import unpack_file +from pip._internal.vcs import vcs + +logger = getLogger(__name__) + + +def _get_prepared_distribution( + req: InstallRequirement, + build_tracker: BuildTracker, + finder: PackageFinder, + build_isolation: bool, + check_build_deps: bool, +) -> BaseDistribution: + """Prepare a distribution for installation.""" + abstract_dist = make_distribution_for_install_requirement(req) + tracker_id = abstract_dist.build_tracker_id + if tracker_id is not None: + with build_tracker.track(req, tracker_id): + abstract_dist.prepare_distribution_metadata( + finder, build_isolation, check_build_deps + ) + return abstract_dist.get_metadata_distribution() + + +def unpack_vcs_link(link: Link, location: str, verbosity: int) -> None: + vcs_backend = vcs.get_backend_for_scheme(link.scheme) + assert vcs_backend is not None + vcs_backend.unpack(location, url=hide_url(link.url), verbosity=verbosity) + + +@dataclass +class File: + path: str + content_type: Optional[str] = None + + def __post_init__(self) -> None: + if self.content_type is None: + self.content_type = mimetypes.guess_type(self.path)[0] + + +def get_http_url( + link: Link, + download: Downloader, + download_dir: Optional[str] = None, + hashes: Optional[Hashes] = None, +) -> File: + temp_dir = TempDirectory(kind="unpack", globally_managed=True) + # If a download dir is specified, is the file already downloaded there? + already_downloaded_path = None + if download_dir: + already_downloaded_path = _check_download_dir(link, download_dir, hashes) + + if already_downloaded_path: + from_path = already_downloaded_path + content_type = None + else: + # let's download to a tmp dir + from_path, content_type = download(link, temp_dir.path) + if hashes: + hashes.check_against_path(from_path) + + return File(from_path, content_type) + + +def get_file_url( + link: Link, download_dir: Optional[str] = None, hashes: Optional[Hashes] = None +) -> File: + """Get file and optionally check its hash.""" + # If a download dir is specified, is the file already there and valid? + already_downloaded_path = None + if download_dir: + already_downloaded_path = _check_download_dir(link, download_dir, hashes) + + if already_downloaded_path: + from_path = already_downloaded_path + else: + from_path = link.file_path + + # If --require-hashes is off, `hashes` is either empty, the + # link's embedded hash, or MissingHashes; it is required to + # match. If --require-hashes is on, we are satisfied by any + # hash in `hashes` matching: a URL-based or an option-based + # one; no internet-sourced hash will be in `hashes`. + if hashes: + hashes.check_against_path(from_path) + return File(from_path, None) + + +def unpack_url( + link: Link, + location: str, + download: Downloader, + verbosity: int, + download_dir: Optional[str] = None, + hashes: Optional[Hashes] = None, +) -> Optional[File]: + """Unpack link into location, downloading if required. + + :param hashes: A Hashes object, one of whose embedded hashes must match, + or HashMismatch will be raised. If the Hashes is empty, no matches are + required, and unhashable types of requirements (like VCS ones, which + would ordinarily raise HashUnsupported) are allowed. + """ + # non-editable vcs urls + if link.is_vcs: + unpack_vcs_link(link, location, verbosity=verbosity) + return None + + assert not link.is_existing_dir() + + # file urls + if link.is_file: + file = get_file_url(link, download_dir, hashes=hashes) + + # http urls + else: + file = get_http_url( + link, + download, + download_dir, + hashes=hashes, + ) + + # unpack the archive to the build dir location. even when only downloading + # archives, they have to be unpacked to parse dependencies, except wheels + if not link.is_wheel: + unpack_file(file.path, location, file.content_type) + + return file + + +def _check_download_dir( + link: Link, + download_dir: str, + hashes: Optional[Hashes], + warn_on_hash_mismatch: bool = True, +) -> Optional[str]: + """Check download_dir for previously downloaded file with correct hash + If a correct file is found return its path else None + """ + download_path = os.path.join(download_dir, link.filename) + + if not os.path.exists(download_path): + return None + + # If already downloaded, does its hash match? + logger.info("File was already downloaded %s", download_path) + if hashes: + try: + hashes.check_against_path(download_path) + except HashMismatch: + if warn_on_hash_mismatch: + logger.warning( + "Previously-downloaded file %s has bad hash. Re-downloading.", + download_path, + ) + os.unlink(download_path) + return None + return download_path + + +class RequirementPreparer: + """Prepares a Requirement""" + + def __init__( + self, + build_dir: str, + download_dir: Optional[str], + src_dir: str, + build_isolation: bool, + check_build_deps: bool, + build_tracker: BuildTracker, + session: PipSession, + progress_bar: str, + finder: PackageFinder, + require_hashes: bool, + use_user_site: bool, + lazy_wheel: bool, + verbosity: int, + legacy_resolver: bool, + ) -> None: + super().__init__() + + self.src_dir = src_dir + self.build_dir = build_dir + self.build_tracker = build_tracker + self._session = session + self._download = Downloader(session, progress_bar) + self._batch_download = BatchDownloader(session, progress_bar) + self.finder = finder + + # Where still-packed archives should be written to. If None, they are + # not saved, and are deleted immediately after unpacking. + self.download_dir = download_dir + + # Is build isolation allowed? + self.build_isolation = build_isolation + + # Should check build dependencies? + self.check_build_deps = check_build_deps + + # Should hash-checking be required? + self.require_hashes = require_hashes + + # Should install in user site-packages? + self.use_user_site = use_user_site + + # Should wheels be downloaded lazily? + self.use_lazy_wheel = lazy_wheel + + # How verbose should underlying tooling be? + self.verbosity = verbosity + + # Are we using the legacy resolver? + self.legacy_resolver = legacy_resolver + + # Memoized downloaded files, as mapping of url: path. + self._downloaded: Dict[str, str] = {} + + # Previous "header" printed for a link-based InstallRequirement + self._previous_requirement_header = ("", "") + + def _log_preparing_link(self, req: InstallRequirement) -> None: + """Provide context for the requirement being prepared.""" + if req.link.is_file and not req.is_wheel_from_cache: + message = "Processing %s" + information = str(display_path(req.link.file_path)) + else: + message = "Collecting %s" + information = redact_auth_from_requirement(req.req) if req.req else str(req) + + # If we used req.req, inject requirement source if available (this + # would already be included if we used req directly) + if req.req and req.comes_from: + if isinstance(req.comes_from, str): + comes_from: Optional[str] = req.comes_from + else: + comes_from = req.comes_from.from_path() + if comes_from: + information += f" (from {comes_from})" + + if (message, information) != self._previous_requirement_header: + self._previous_requirement_header = (message, information) + logger.info(message, information) + + if req.is_wheel_from_cache: + with indent_log(): + logger.info("Using cached %s", req.link.filename) + + def _ensure_link_req_src_dir( + self, req: InstallRequirement, parallel_builds: bool + ) -> None: + """Ensure source_dir of a linked InstallRequirement.""" + # Since source_dir is only set for editable requirements. + if req.link.is_wheel: + # We don't need to unpack wheels, so no need for a source + # directory. + return + assert req.source_dir is None + if req.link.is_existing_dir(): + # build local directories in-tree + req.source_dir = req.link.file_path + return + + # We always delete unpacked sdists after pip runs. + req.ensure_has_source_dir( + self.build_dir, + autodelete=True, + parallel_builds=parallel_builds, + ) + req.ensure_pristine_source_checkout() + + def _get_linked_req_hashes(self, req: InstallRequirement) -> Hashes: + # By the time this is called, the requirement's link should have + # been checked so we can tell what kind of requirements req is + # and raise some more informative errors than otherwise. + # (For example, we can raise VcsHashUnsupported for a VCS URL + # rather than HashMissing.) + if not self.require_hashes: + return req.hashes(trust_internet=True) + + # We could check these first 2 conditions inside unpack_url + # and save repetition of conditions, but then we would + # report less-useful error messages for unhashable + # requirements, complaining that there's no hash provided. + if req.link.is_vcs: + raise VcsHashUnsupported() + if req.link.is_existing_dir(): + raise DirectoryUrlHashUnsupported() + + # Unpinned packages are asking for trouble when a new version + # is uploaded. This isn't a security check, but it saves users + # a surprising hash mismatch in the future. + # file:/// URLs aren't pinnable, so don't complain about them + # not being pinned. + if not req.is_direct and not req.is_pinned: + raise HashUnpinned() + + # If known-good hashes are missing for this requirement, + # shim it with a facade object that will provoke hash + # computation and then raise a HashMissing exception + # showing the user what the hash should be. + return req.hashes(trust_internet=False) or MissingHashes() + + def _fetch_metadata_only( + self, + req: InstallRequirement, + ) -> Optional[BaseDistribution]: + if self.legacy_resolver: + logger.debug( + "Metadata-only fetching is not used in the legacy resolver", + ) + return None + if self.require_hashes: + logger.debug( + "Metadata-only fetching is not used as hash checking is required", + ) + return None + # Try PEP 658 metadata first, then fall back to lazy wheel if unavailable. + return self._fetch_metadata_using_link_data_attr( + req + ) or self._fetch_metadata_using_lazy_wheel(req.link) + + def _fetch_metadata_using_link_data_attr( + self, + req: InstallRequirement, + ) -> Optional[BaseDistribution]: + """Fetch metadata from the data-dist-info-metadata attribute, if possible.""" + # (1) Get the link to the metadata file, if provided by the backend. + metadata_link = req.link.metadata_link() + if metadata_link is None: + return None + assert req.req is not None + logger.verbose( + "Obtaining dependency information for %s from %s", + req.req, + metadata_link, + ) + # (2) Download the contents of the METADATA file, separate from the dist itself. + metadata_file = get_http_url( + metadata_link, + self._download, + hashes=metadata_link.as_hashes(), + ) + with open(metadata_file.path, "rb") as f: + metadata_contents = f.read() + # (3) Generate a dist just from those file contents. + metadata_dist = get_metadata_distribution( + metadata_contents, + req.link.filename, + req.req.name, + ) + # (4) Ensure the Name: field from the METADATA file matches the name from the + # install requirement. + # + # NB: raw_name will fall back to the name from the install requirement if + # the Name: field is not present, but it's noted in the raw_name docstring + # that that should NEVER happen anyway. + if canonicalize_name(metadata_dist.raw_name) != canonicalize_name(req.req.name): + raise MetadataInconsistent( + req, "Name", req.req.name, metadata_dist.raw_name + ) + return metadata_dist + + def _fetch_metadata_using_lazy_wheel( + self, + link: Link, + ) -> Optional[BaseDistribution]: + """Fetch metadata using lazy wheel, if possible.""" + # --use-feature=fast-deps must be provided. + if not self.use_lazy_wheel: + return None + if link.is_file or not link.is_wheel: + logger.debug( + "Lazy wheel is not used as %r does not point to a remote wheel", + link, + ) + return None + + wheel = Wheel(link.filename) + name = canonicalize_name(wheel.name) + logger.info( + "Obtaining dependency information from %s %s", + name, + wheel.version, + ) + url = link.url.split("#", 1)[0] + try: + return dist_from_wheel_url(name, url, self._session) + except HTTPRangeRequestUnsupported: + logger.debug("%s does not support range requests", url) + return None + + def _complete_partial_requirements( + self, + partially_downloaded_reqs: Iterable[InstallRequirement], + parallel_builds: bool = False, + ) -> None: + """Download any requirements which were only fetched by metadata.""" + # Download to a temporary directory. These will be copied over as + # needed for downstream 'download', 'wheel', and 'install' commands. + temp_dir = TempDirectory(kind="unpack", globally_managed=True).path + + # Map each link to the requirement that owns it. This allows us to set + # `req.local_file_path` on the appropriate requirement after passing + # all the links at once into BatchDownloader. + links_to_fully_download: Dict[Link, InstallRequirement] = {} + for req in partially_downloaded_reqs: + assert req.link + links_to_fully_download[req.link] = req + + batch_download = self._batch_download( + links_to_fully_download.keys(), + temp_dir, + ) + for link, (filepath, _) in batch_download: + logger.debug("Downloading link %s to %s", link, filepath) + req = links_to_fully_download[link] + # Record the downloaded file path so wheel reqs can extract a Distribution + # in .get_dist(). + req.local_file_path = filepath + # Record that the file is downloaded so we don't do it again in + # _prepare_linked_requirement(). + self._downloaded[req.link.url] = filepath + + # If this is an sdist, we need to unpack it after downloading, but the + # .source_dir won't be set up until we are in _prepare_linked_requirement(). + # Add the downloaded archive to the install requirement to unpack after + # preparing the source dir. + if not req.is_wheel: + req.needs_unpacked_archive(Path(filepath)) + + # This step is necessary to ensure all lazy wheels are processed + # successfully by the 'download', 'wheel', and 'install' commands. + for req in partially_downloaded_reqs: + self._prepare_linked_requirement(req, parallel_builds) + + def prepare_linked_requirement( + self, req: InstallRequirement, parallel_builds: bool = False + ) -> BaseDistribution: + """Prepare a requirement to be obtained from req.link.""" + assert req.link + self._log_preparing_link(req) + with indent_log(): + # Check if the relevant file is already available + # in the download directory + file_path = None + if self.download_dir is not None and req.link.is_wheel: + hashes = self._get_linked_req_hashes(req) + file_path = _check_download_dir( + req.link, + self.download_dir, + hashes, + # When a locally built wheel has been found in cache, we don't warn + # about re-downloading when the already downloaded wheel hash does + # not match. This is because the hash must be checked against the + # original link, not the cached link. It that case the already + # downloaded file will be removed and re-fetched from cache (which + # implies a hash check against the cache entry's origin.json). + warn_on_hash_mismatch=not req.is_wheel_from_cache, + ) + + if file_path is not None: + # The file is already available, so mark it as downloaded + self._downloaded[req.link.url] = file_path + else: + # The file is not available, attempt to fetch only metadata + metadata_dist = self._fetch_metadata_only(req) + if metadata_dist is not None: + req.needs_more_preparation = True + return metadata_dist + + # None of the optimizations worked, fully prepare the requirement + return self._prepare_linked_requirement(req, parallel_builds) + + def prepare_linked_requirements_more( + self, reqs: Iterable[InstallRequirement], parallel_builds: bool = False + ) -> None: + """Prepare linked requirements more, if needed.""" + reqs = [req for req in reqs if req.needs_more_preparation] + for req in reqs: + # Determine if any of these requirements were already downloaded. + if self.download_dir is not None and req.link.is_wheel: + hashes = self._get_linked_req_hashes(req) + file_path = _check_download_dir(req.link, self.download_dir, hashes) + if file_path is not None: + self._downloaded[req.link.url] = file_path + req.needs_more_preparation = False + + # Prepare requirements we found were already downloaded for some + # reason. The other downloads will be completed separately. + partially_downloaded_reqs: List[InstallRequirement] = [] + for req in reqs: + if req.needs_more_preparation: + partially_downloaded_reqs.append(req) + else: + self._prepare_linked_requirement(req, parallel_builds) + + # TODO: separate this part out from RequirementPreparer when the v1 + # resolver can be removed! + self._complete_partial_requirements( + partially_downloaded_reqs, + parallel_builds=parallel_builds, + ) + + def _prepare_linked_requirement( + self, req: InstallRequirement, parallel_builds: bool + ) -> BaseDistribution: + assert req.link + link = req.link + + hashes = self._get_linked_req_hashes(req) + + if hashes and req.is_wheel_from_cache: + assert req.download_info is not None + assert link.is_wheel + assert link.is_file + # We need to verify hashes, and we have found the requirement in the cache + # of locally built wheels. + if ( + isinstance(req.download_info.info, ArchiveInfo) + and req.download_info.info.hashes + and hashes.has_one_of(req.download_info.info.hashes) + ): + # At this point we know the requirement was built from a hashable source + # artifact, and we verified that the cache entry's hash of the original + # artifact matches one of the hashes we expect. We don't verify hashes + # against the cached wheel, because the wheel is not the original. + hashes = None + else: + logger.warning( + "The hashes of the source archive found in cache entry " + "don't match, ignoring cached built wheel " + "and re-downloading source." + ) + req.link = req.cached_wheel_source_link + link = req.link + + self._ensure_link_req_src_dir(req, parallel_builds) + + if link.is_existing_dir(): + local_file = None + elif link.url not in self._downloaded: + try: + local_file = unpack_url( + link, + req.source_dir, + self._download, + self.verbosity, + self.download_dir, + hashes, + ) + except NetworkConnectionError as exc: + raise InstallationError( + f"Could not install requirement {req} because of HTTP " + f"error {exc} for URL {link}" + ) + else: + file_path = self._downloaded[link.url] + if hashes: + hashes.check_against_path(file_path) + local_file = File(file_path, content_type=None) + + # If download_info is set, we got it from the wheel cache. + if req.download_info is None: + # Editables don't go through this function (see + # prepare_editable_requirement). + assert not req.editable + req.download_info = direct_url_from_link(link, req.source_dir) + # Make sure we have a hash in download_info. If we got it as part of the + # URL, it will have been verified and we can rely on it. Otherwise we + # compute it from the downloaded file. + # FIXME: https://github.com/pypa/pip/issues/11943 + if ( + isinstance(req.download_info.info, ArchiveInfo) + and not req.download_info.info.hashes + and local_file + ): + hash = hash_file(local_file.path)[0].hexdigest() + # We populate info.hash for backward compatibility. + # This will automatically populate info.hashes. + req.download_info.info.hash = f"sha256={hash}" + + # For use in later processing, + # preserve the file path on the requirement. + if local_file: + req.local_file_path = local_file.path + + dist = _get_prepared_distribution( + req, + self.build_tracker, + self.finder, + self.build_isolation, + self.check_build_deps, + ) + return dist + + def save_linked_requirement(self, req: InstallRequirement) -> None: + assert self.download_dir is not None + assert req.link is not None + link = req.link + if link.is_vcs or (link.is_existing_dir() and req.editable): + # Make a .zip of the source_dir we already created. + req.archive(self.download_dir) + return + + if link.is_existing_dir(): + logger.debug( + "Not copying link to destination directory " + "since it is a directory: %s", + link, + ) + return + if req.local_file_path is None: + # No distribution was downloaded for this requirement. + return + + download_location = os.path.join(self.download_dir, link.filename) + if not os.path.exists(download_location): + shutil.copy(req.local_file_path, download_location) + download_path = display_path(download_location) + logger.info("Saved %s", download_path) + + def prepare_editable_requirement( + self, + req: InstallRequirement, + ) -> BaseDistribution: + """Prepare an editable requirement.""" + assert req.editable, "cannot prepare a non-editable req as editable" + + logger.info("Obtaining %s", req) + + with indent_log(): + if self.require_hashes: + raise InstallationError( + f"The editable requirement {req} cannot be installed when " + "requiring hashes, because there is no single file to " + "hash." + ) + req.ensure_has_source_dir(self.src_dir) + req.update_editable() + assert req.source_dir + req.download_info = direct_url_for_editable(req.unpacked_source_directory) + + dist = _get_prepared_distribution( + req, + self.build_tracker, + self.finder, + self.build_isolation, + self.check_build_deps, + ) + + req.check_if_exists(self.use_user_site) + + return dist + + def prepare_installed_requirement( + self, + req: InstallRequirement, + skip_reason: str, + ) -> BaseDistribution: + """Prepare an already-installed requirement.""" + assert req.satisfied_by, "req should have been satisfied but isn't" + assert skip_reason is not None, ( + "did not get skip reason skipped but req.satisfied_by " + f"is set to {req.satisfied_by}" + ) + logger.info( + "Requirement %s: %s (%s)", skip_reason, req, req.satisfied_by.version + ) + with indent_log(): + if self.require_hashes: + logger.debug( + "Since it is already installed, we are trusting this " + "package without checking its hash. To ensure a " + "completely repeatable environment, install into an " + "empty virtualenv." + ) + return InstalledDistribution(req).get_metadata_distribution() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..422d851d7293d702f1a4c5e79f92b428703dc852 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__init__.py @@ -0,0 +1,90 @@ +import collections +import logging +from dataclasses import dataclass +from typing import Generator, List, Optional, Sequence, Tuple + +from pip._internal.utils.logging import indent_log + +from .req_file import parse_requirements +from .req_install import InstallRequirement +from .req_set import RequirementSet + +__all__ = [ + "RequirementSet", + "InstallRequirement", + "parse_requirements", + "install_given_reqs", +] + +logger = logging.getLogger(__name__) + + +@dataclass(frozen=True) +class InstallationResult: + name: str + + +def _validate_requirements( + requirements: List[InstallRequirement], +) -> Generator[Tuple[str, InstallRequirement], None, None]: + for req in requirements: + assert req.name, f"invalid to-be-installed requirement: {req}" + yield req.name, req + + +def install_given_reqs( + requirements: List[InstallRequirement], + global_options: Sequence[str], + root: Optional[str], + home: Optional[str], + prefix: Optional[str], + warn_script_location: bool, + use_user_site: bool, + pycompile: bool, +) -> List[InstallationResult]: + """ + Install everything in the given list. + + (to be called after having downloaded and unpacked the packages) + """ + to_install = collections.OrderedDict(_validate_requirements(requirements)) + + if to_install: + logger.info( + "Installing collected packages: %s", + ", ".join(to_install.keys()), + ) + + installed = [] + + with indent_log(): + for req_name, requirement in to_install.items(): + if requirement.should_reinstall: + logger.info("Attempting uninstall: %s", req_name) + with indent_log(): + uninstalled_pathset = requirement.uninstall(auto_confirm=True) + else: + uninstalled_pathset = None + + try: + requirement.install( + global_options, + root=root, + home=home, + prefix=prefix, + warn_script_location=warn_script_location, + use_user_site=use_user_site, + pycompile=pycompile, + ) + except Exception: + # if install did not succeed, rollback previous uninstall + if uninstalled_pathset and not requirement.install_succeeded: + uninstalled_pathset.rollback() + raise + else: + if uninstalled_pathset and requirement.install_succeeded: + uninstalled_pathset.commit() + + installed.append(InstallationResult(req_name)) + + return installed diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86da0ff47d6032fb2559d0fd7f2acf833e6b2895 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8dff3cfb80d8ba6f2de46acb143e1e60091d41ba Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7817e4dad923d07b810630197595d6a1b2fc00d6 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..06b1a078711f9e3f70aec81be2d2ff158fbbc13f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fccda6b5bedc0f093435791d5908aa7696533137 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8924b6446ce5aba0848f2a06daa3714f409c70dd Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/constructors.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/constructors.py new file mode 100644 index 0000000000000000000000000000000000000000..56a964f3177dc47d747ccf55361fccb8aea70ebf --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/constructors.py @@ -0,0 +1,560 @@ +"""Backing implementation for InstallRequirement's various constructors + +The idea here is that these formed a major chunk of InstallRequirement's size +so, moving them and support code dedicated to them outside of that class +helps creates for better understandability for the rest of the code. + +These are meant to be used elsewhere within pip to create instances of +InstallRequirement. +""" + +import copy +import logging +import os +import re +from dataclasses import dataclass +from typing import Collection, Dict, List, Optional, Set, Tuple, Union + +from pip._vendor.packaging.markers import Marker +from pip._vendor.packaging.requirements import InvalidRequirement, Requirement +from pip._vendor.packaging.specifiers import Specifier + +from pip._internal.exceptions import InstallationError +from pip._internal.models.index import PyPI, TestPyPI +from pip._internal.models.link import Link +from pip._internal.models.wheel import Wheel +from pip._internal.req.req_file import ParsedRequirement +from pip._internal.req.req_install import InstallRequirement +from pip._internal.utils.filetypes import is_archive_file +from pip._internal.utils.misc import is_installable_dir +from pip._internal.utils.packaging import get_requirement +from pip._internal.utils.urls import path_to_url +from pip._internal.vcs import is_url, vcs + +__all__ = [ + "install_req_from_editable", + "install_req_from_line", + "parse_editable", +] + +logger = logging.getLogger(__name__) +operators = Specifier._operators.keys() + + +def _strip_extras(path: str) -> Tuple[str, Optional[str]]: + m = re.match(r"^(.+)(\[[^\]]+\])$", path) + extras = None + if m: + path_no_extras = m.group(1) + extras = m.group(2) + else: + path_no_extras = path + + return path_no_extras, extras + + +def convert_extras(extras: Optional[str]) -> Set[str]: + if not extras: + return set() + return get_requirement("placeholder" + extras.lower()).extras + + +def _set_requirement_extras(req: Requirement, new_extras: Set[str]) -> Requirement: + """ + Returns a new requirement based on the given one, with the supplied extras. If the + given requirement already has extras those are replaced (or dropped if no new extras + are given). + """ + match: Optional[re.Match[str]] = re.fullmatch( + # see https://peps.python.org/pep-0508/#complete-grammar + r"([\w\t .-]+)(\[[^\]]*\])?(.*)", + str(req), + flags=re.ASCII, + ) + # ireq.req is a valid requirement so the regex should always match + assert ( + match is not None + ), f"regex match on requirement {req} failed, this should never happen" + pre: Optional[str] = match.group(1) + post: Optional[str] = match.group(3) + assert ( + pre is not None and post is not None + ), f"regex group selection for requirement {req} failed, this should never happen" + extras: str = "[{}]".format(",".join(sorted(new_extras)) if new_extras else "") + return get_requirement(f"{pre}{extras}{post}") + + +def parse_editable(editable_req: str) -> Tuple[Optional[str], str, Set[str]]: + """Parses an editable requirement into: + - a requirement name + - an URL + - extras + - editable options + Accepted requirements: + svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir + .[some_extra] + """ + + url = editable_req + + # If a file path is specified with extras, strip off the extras. + url_no_extras, extras = _strip_extras(url) + + if os.path.isdir(url_no_extras): + # Treating it as code that has already been checked out + url_no_extras = path_to_url(url_no_extras) + + if url_no_extras.lower().startswith("file:"): + package_name = Link(url_no_extras).egg_fragment + if extras: + return ( + package_name, + url_no_extras, + get_requirement("placeholder" + extras.lower()).extras, + ) + else: + return package_name, url_no_extras, set() + + for version_control in vcs: + if url.lower().startswith(f"{version_control}:"): + url = f"{version_control}+{url}" + break + + link = Link(url) + + if not link.is_vcs: + backends = ", ".join(vcs.all_schemes) + raise InstallationError( + f"{editable_req} is not a valid editable requirement. " + f"It should either be a path to a local project or a VCS URL " + f"(beginning with {backends})." + ) + + package_name = link.egg_fragment + if not package_name: + raise InstallationError( + f"Could not detect requirement name for '{editable_req}', " + "please specify one with #egg=your_package_name" + ) + return package_name, url, set() + + +def check_first_requirement_in_file(filename: str) -> None: + """Check if file is parsable as a requirements file. + + This is heavily based on ``pkg_resources.parse_requirements``, but + simplified to just check the first meaningful line. + + :raises InvalidRequirement: If the first meaningful line cannot be parsed + as an requirement. + """ + with open(filename, encoding="utf-8", errors="ignore") as f: + # Create a steppable iterator, so we can handle \-continuations. + lines = ( + line + for line in (line.strip() for line in f) + if line and not line.startswith("#") # Skip blank lines/comments. + ) + + for line in lines: + # Drop comments -- a hash without a space may be in a URL. + if " #" in line: + line = line[: line.find(" #")] + # If there is a line continuation, drop it, and append the next line. + if line.endswith("\\"): + line = line[:-2].strip() + next(lines, "") + get_requirement(line) + return + + +def deduce_helpful_msg(req: str) -> str: + """Returns helpful msg in case requirements file does not exist, + or cannot be parsed. + + :params req: Requirements file path + """ + if not os.path.exists(req): + return f" File '{req}' does not exist." + msg = " The path does exist. " + # Try to parse and check if it is a requirements file. + try: + check_first_requirement_in_file(req) + except InvalidRequirement: + logger.debug("Cannot parse '%s' as requirements file", req) + else: + msg += ( + f"The argument you provided " + f"({req}) appears to be a" + f" requirements file. If that is the" + f" case, use the '-r' flag to install" + f" the packages specified within it." + ) + return msg + + +@dataclass(frozen=True) +class RequirementParts: + requirement: Optional[Requirement] + link: Optional[Link] + markers: Optional[Marker] + extras: Set[str] + + +def parse_req_from_editable(editable_req: str) -> RequirementParts: + name, url, extras_override = parse_editable(editable_req) + + if name is not None: + try: + req: Optional[Requirement] = get_requirement(name) + except InvalidRequirement as exc: + raise InstallationError(f"Invalid requirement: {name!r}: {exc}") + else: + req = None + + link = Link(url) + + return RequirementParts(req, link, None, extras_override) + + +# ---- The actual constructors follow ---- + + +def install_req_from_editable( + editable_req: str, + comes_from: Optional[Union[InstallRequirement, str]] = None, + *, + use_pep517: Optional[bool] = None, + isolated: bool = False, + global_options: Optional[List[str]] = None, + hash_options: Optional[Dict[str, List[str]]] = None, + constraint: bool = False, + user_supplied: bool = False, + permit_editable_wheels: bool = False, + config_settings: Optional[Dict[str, Union[str, List[str]]]] = None, +) -> InstallRequirement: + parts = parse_req_from_editable(editable_req) + + return InstallRequirement( + parts.requirement, + comes_from=comes_from, + user_supplied=user_supplied, + editable=True, + permit_editable_wheels=permit_editable_wheels, + link=parts.link, + constraint=constraint, + use_pep517=use_pep517, + isolated=isolated, + global_options=global_options, + hash_options=hash_options, + config_settings=config_settings, + extras=parts.extras, + ) + + +def _looks_like_path(name: str) -> bool: + """Checks whether the string "looks like" a path on the filesystem. + + This does not check whether the target actually exists, only judge from the + appearance. + + Returns true if any of the following conditions is true: + * a path separator is found (either os.path.sep or os.path.altsep); + * a dot is found (which represents the current directory). + """ + if os.path.sep in name: + return True + if os.path.altsep is not None and os.path.altsep in name: + return True + if name.startswith("."): + return True + return False + + +def _get_url_from_path(path: str, name: str) -> Optional[str]: + """ + First, it checks whether a provided path is an installable directory. If it + is, returns the path. + + If false, check if the path is an archive file (such as a .whl). + The function checks if the path is a file. If false, if the path has + an @, it will treat it as a PEP 440 URL requirement and return the path. + """ + if _looks_like_path(name) and os.path.isdir(path): + if is_installable_dir(path): + return path_to_url(path) + # TODO: The is_installable_dir test here might not be necessary + # now that it is done in load_pyproject_toml too. + raise InstallationError( + f"Directory {name!r} is not installable. Neither 'setup.py' " + "nor 'pyproject.toml' found." + ) + if not is_archive_file(path): + return None + if os.path.isfile(path): + return path_to_url(path) + urlreq_parts = name.split("@", 1) + if len(urlreq_parts) >= 2 and not _looks_like_path(urlreq_parts[0]): + # If the path contains '@' and the part before it does not look + # like a path, try to treat it as a PEP 440 URL req instead. + return None + logger.warning( + "Requirement %r looks like a filename, but the file does not exist", + name, + ) + return path_to_url(path) + + +def parse_req_from_line(name: str, line_source: Optional[str]) -> RequirementParts: + if is_url(name): + marker_sep = "; " + else: + marker_sep = ";" + if marker_sep in name: + name, markers_as_string = name.split(marker_sep, 1) + markers_as_string = markers_as_string.strip() + if not markers_as_string: + markers = None + else: + markers = Marker(markers_as_string) + else: + markers = None + name = name.strip() + req_as_string = None + path = os.path.normpath(os.path.abspath(name)) + link = None + extras_as_string = None + + if is_url(name): + link = Link(name) + else: + p, extras_as_string = _strip_extras(path) + url = _get_url_from_path(p, name) + if url is not None: + link = Link(url) + + # it's a local file, dir, or url + if link: + # Handle relative file URLs + if link.scheme == "file" and re.search(r"\.\./", link.url): + link = Link(path_to_url(os.path.normpath(os.path.abspath(link.path)))) + # wheel file + if link.is_wheel: + wheel = Wheel(link.filename) # can raise InvalidWheelFilename + req_as_string = f"{wheel.name}=={wheel.version}" + else: + # set the req to the egg fragment. when it's not there, this + # will become an 'unnamed' requirement + req_as_string = link.egg_fragment + + # a requirement specifier + else: + req_as_string = name + + extras = convert_extras(extras_as_string) + + def with_source(text: str) -> str: + if not line_source: + return text + return f"{text} (from {line_source})" + + def _parse_req_string(req_as_string: str) -> Requirement: + try: + return get_requirement(req_as_string) + except InvalidRequirement as exc: + if os.path.sep in req_as_string: + add_msg = "It looks like a path." + add_msg += deduce_helpful_msg(req_as_string) + elif "=" in req_as_string and not any( + op in req_as_string for op in operators + ): + add_msg = "= is not a valid operator. Did you mean == ?" + else: + add_msg = "" + msg = with_source(f"Invalid requirement: {req_as_string!r}: {exc}") + if add_msg: + msg += f"\nHint: {add_msg}" + raise InstallationError(msg) + + if req_as_string is not None: + req: Optional[Requirement] = _parse_req_string(req_as_string) + else: + req = None + + return RequirementParts(req, link, markers, extras) + + +def install_req_from_line( + name: str, + comes_from: Optional[Union[str, InstallRequirement]] = None, + *, + use_pep517: Optional[bool] = None, + isolated: bool = False, + global_options: Optional[List[str]] = None, + hash_options: Optional[Dict[str, List[str]]] = None, + constraint: bool = False, + line_source: Optional[str] = None, + user_supplied: bool = False, + config_settings: Optional[Dict[str, Union[str, List[str]]]] = None, +) -> InstallRequirement: + """Creates an InstallRequirement from a name, which might be a + requirement, directory containing 'setup.py', filename, or URL. + + :param line_source: An optional string describing where the line is from, + for logging purposes in case of an error. + """ + parts = parse_req_from_line(name, line_source) + + return InstallRequirement( + parts.requirement, + comes_from, + link=parts.link, + markers=parts.markers, + use_pep517=use_pep517, + isolated=isolated, + global_options=global_options, + hash_options=hash_options, + config_settings=config_settings, + constraint=constraint, + extras=parts.extras, + user_supplied=user_supplied, + ) + + +def install_req_from_req_string( + req_string: str, + comes_from: Optional[InstallRequirement] = None, + isolated: bool = False, + use_pep517: Optional[bool] = None, + user_supplied: bool = False, +) -> InstallRequirement: + try: + req = get_requirement(req_string) + except InvalidRequirement as exc: + raise InstallationError(f"Invalid requirement: {req_string!r}: {exc}") + + domains_not_allowed = [ + PyPI.file_storage_domain, + TestPyPI.file_storage_domain, + ] + if ( + req.url + and comes_from + and comes_from.link + and comes_from.link.netloc in domains_not_allowed + ): + # Explicitly disallow pypi packages that depend on external urls + raise InstallationError( + "Packages installed from PyPI cannot depend on packages " + "which are not also hosted on PyPI.\n" + f"{comes_from.name} depends on {req} " + ) + + return InstallRequirement( + req, + comes_from, + isolated=isolated, + use_pep517=use_pep517, + user_supplied=user_supplied, + ) + + +def install_req_from_parsed_requirement( + parsed_req: ParsedRequirement, + isolated: bool = False, + use_pep517: Optional[bool] = None, + user_supplied: bool = False, + config_settings: Optional[Dict[str, Union[str, List[str]]]] = None, +) -> InstallRequirement: + if parsed_req.is_editable: + req = install_req_from_editable( + parsed_req.requirement, + comes_from=parsed_req.comes_from, + use_pep517=use_pep517, + constraint=parsed_req.constraint, + isolated=isolated, + user_supplied=user_supplied, + config_settings=config_settings, + ) + + else: + req = install_req_from_line( + parsed_req.requirement, + comes_from=parsed_req.comes_from, + use_pep517=use_pep517, + isolated=isolated, + global_options=( + parsed_req.options.get("global_options", []) + if parsed_req.options + else [] + ), + hash_options=( + parsed_req.options.get("hashes", {}) if parsed_req.options else {} + ), + constraint=parsed_req.constraint, + line_source=parsed_req.line_source, + user_supplied=user_supplied, + config_settings=config_settings, + ) + return req + + +def install_req_from_link_and_ireq( + link: Link, ireq: InstallRequirement +) -> InstallRequirement: + return InstallRequirement( + req=ireq.req, + comes_from=ireq.comes_from, + editable=ireq.editable, + link=link, + markers=ireq.markers, + use_pep517=ireq.use_pep517, + isolated=ireq.isolated, + global_options=ireq.global_options, + hash_options=ireq.hash_options, + config_settings=ireq.config_settings, + user_supplied=ireq.user_supplied, + ) + + +def install_req_drop_extras(ireq: InstallRequirement) -> InstallRequirement: + """ + Creates a new InstallationRequirement using the given template but without + any extras. Sets the original requirement as the new one's parent + (comes_from). + """ + return InstallRequirement( + req=( + _set_requirement_extras(ireq.req, set()) if ireq.req is not None else None + ), + comes_from=ireq, + editable=ireq.editable, + link=ireq.link, + markers=ireq.markers, + use_pep517=ireq.use_pep517, + isolated=ireq.isolated, + global_options=ireq.global_options, + hash_options=ireq.hash_options, + constraint=ireq.constraint, + extras=[], + config_settings=ireq.config_settings, + user_supplied=ireq.user_supplied, + permit_editable_wheels=ireq.permit_editable_wheels, + ) + + +def install_req_extend_extras( + ireq: InstallRequirement, + extras: Collection[str], +) -> InstallRequirement: + """ + Returns a copy of an installation requirement with some additional extras. + Makes a shallow copy of the ireq object. + """ + result = copy.copy(ireq) + result.extras = {*ireq.extras, *extras} + result.req = ( + _set_requirement_extras(ireq.req, result.extras) + if ireq.req is not None + else None + ) + return result diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_file.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_file.py new file mode 100644 index 0000000000000000000000000000000000000000..f6ba70fe7f69cf6de1967c015b8c3ebd5da37145 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_file.py @@ -0,0 +1,623 @@ +""" +Requirements file parsing +""" + +import codecs +import locale +import logging +import optparse +import os +import re +import shlex +import sys +import urllib.parse +from dataclasses import dataclass +from optparse import Values +from typing import ( + TYPE_CHECKING, + Any, + Callable, + Dict, + Generator, + Iterable, + List, + NoReturn, + Optional, + Tuple, +) + +from pip._internal.cli import cmdoptions +from pip._internal.exceptions import InstallationError, RequirementsFileParseError +from pip._internal.models.search_scope import SearchScope + +if TYPE_CHECKING: + from pip._internal.index.package_finder import PackageFinder + from pip._internal.network.session import PipSession + +__all__ = ["parse_requirements"] + +ReqFileLines = Iterable[Tuple[int, str]] + +LineParser = Callable[[str], Tuple[str, Values]] + +SCHEME_RE = re.compile(r"^(http|https|file):", re.I) +COMMENT_RE = re.compile(r"(^|\s+)#.*$") + +# Matches environment variable-style values in '${MY_VARIABLE_1}' with the +# variable name consisting of only uppercase letters, digits or the '_' +# (underscore). This follows the POSIX standard defined in IEEE Std 1003.1, +# 2013 Edition. +ENV_VAR_RE = re.compile(r"(?P\$\{(?P[A-Z0-9_]+)\})") + +SUPPORTED_OPTIONS: List[Callable[..., optparse.Option]] = [ + cmdoptions.index_url, + cmdoptions.extra_index_url, + cmdoptions.no_index, + cmdoptions.constraints, + cmdoptions.requirements, + cmdoptions.editable, + cmdoptions.find_links, + cmdoptions.no_binary, + cmdoptions.only_binary, + cmdoptions.prefer_binary, + cmdoptions.require_hashes, + cmdoptions.pre, + cmdoptions.trusted_host, + cmdoptions.use_new_feature, +] + +# options to be passed to requirements +SUPPORTED_OPTIONS_REQ: List[Callable[..., optparse.Option]] = [ + cmdoptions.global_options, + cmdoptions.hash, + cmdoptions.config_settings, +] + +SUPPORTED_OPTIONS_EDITABLE_REQ: List[Callable[..., optparse.Option]] = [ + cmdoptions.config_settings, +] + + +# the 'dest' string values +SUPPORTED_OPTIONS_REQ_DEST = [str(o().dest) for o in SUPPORTED_OPTIONS_REQ] +SUPPORTED_OPTIONS_EDITABLE_REQ_DEST = [ + str(o().dest) for o in SUPPORTED_OPTIONS_EDITABLE_REQ +] + +# order of BOMS is important: codecs.BOM_UTF16_LE is a prefix of codecs.BOM_UTF32_LE +# so data.startswith(BOM_UTF16_LE) would be true for UTF32_LE data +BOMS: List[Tuple[bytes, str]] = [ + (codecs.BOM_UTF8, "utf-8"), + (codecs.BOM_UTF32, "utf-32"), + (codecs.BOM_UTF32_BE, "utf-32-be"), + (codecs.BOM_UTF32_LE, "utf-32-le"), + (codecs.BOM_UTF16, "utf-16"), + (codecs.BOM_UTF16_BE, "utf-16-be"), + (codecs.BOM_UTF16_LE, "utf-16-le"), +] + +PEP263_ENCODING_RE = re.compile(rb"coding[:=]\s*([-\w.]+)") +DEFAULT_ENCODING = "utf-8" + +logger = logging.getLogger(__name__) + + +@dataclass(frozen=True) +class ParsedRequirement: + # TODO: replace this with slots=True when dropping Python 3.9 support. + __slots__ = ( + "requirement", + "is_editable", + "comes_from", + "constraint", + "options", + "line_source", + ) + + requirement: str + is_editable: bool + comes_from: str + constraint: bool + options: Optional[Dict[str, Any]] + line_source: Optional[str] + + +@dataclass(frozen=True) +class ParsedLine: + __slots__ = ("filename", "lineno", "args", "opts", "constraint") + + filename: str + lineno: int + args: str + opts: Values + constraint: bool + + @property + def is_editable(self) -> bool: + return bool(self.opts.editables) + + @property + def requirement(self) -> Optional[str]: + if self.args: + return self.args + elif self.is_editable: + # We don't support multiple -e on one line + return self.opts.editables[0] + return None + + +def parse_requirements( + filename: str, + session: "PipSession", + finder: Optional["PackageFinder"] = None, + options: Optional[optparse.Values] = None, + constraint: bool = False, +) -> Generator[ParsedRequirement, None, None]: + """Parse a requirements file and yield ParsedRequirement instances. + + :param filename: Path or url of requirements file. + :param session: PipSession instance. + :param finder: Instance of pip.index.PackageFinder. + :param options: cli options. + :param constraint: If true, parsing a constraint file rather than + requirements file. + """ + line_parser = get_line_parser(finder) + parser = RequirementsFileParser(session, line_parser) + + for parsed_line in parser.parse(filename, constraint): + parsed_req = handle_line( + parsed_line, options=options, finder=finder, session=session + ) + if parsed_req is not None: + yield parsed_req + + +def preprocess(content: str) -> ReqFileLines: + """Split, filter, and join lines, and return a line iterator + + :param content: the content of the requirements file + """ + lines_enum: ReqFileLines = enumerate(content.splitlines(), start=1) + lines_enum = join_lines(lines_enum) + lines_enum = ignore_comments(lines_enum) + lines_enum = expand_env_variables(lines_enum) + return lines_enum + + +def handle_requirement_line( + line: ParsedLine, + options: Optional[optparse.Values] = None, +) -> ParsedRequirement: + # preserve for the nested code path + line_comes_from = "{} {} (line {})".format( + "-c" if line.constraint else "-r", + line.filename, + line.lineno, + ) + + assert line.requirement is not None + + # get the options that apply to requirements + if line.is_editable: + supported_dest = SUPPORTED_OPTIONS_EDITABLE_REQ_DEST + else: + supported_dest = SUPPORTED_OPTIONS_REQ_DEST + req_options = {} + for dest in supported_dest: + if dest in line.opts.__dict__ and line.opts.__dict__[dest]: + req_options[dest] = line.opts.__dict__[dest] + + line_source = f"line {line.lineno} of {line.filename}" + return ParsedRequirement( + requirement=line.requirement, + is_editable=line.is_editable, + comes_from=line_comes_from, + constraint=line.constraint, + options=req_options, + line_source=line_source, + ) + + +def handle_option_line( + opts: Values, + filename: str, + lineno: int, + finder: Optional["PackageFinder"] = None, + options: Optional[optparse.Values] = None, + session: Optional["PipSession"] = None, +) -> None: + if opts.hashes: + logger.warning( + "%s line %s has --hash but no requirement, and will be ignored.", + filename, + lineno, + ) + + if options: + # percolate options upward + if opts.require_hashes: + options.require_hashes = opts.require_hashes + if opts.features_enabled: + options.features_enabled.extend( + f for f in opts.features_enabled if f not in options.features_enabled + ) + + # set finder options + if finder: + find_links = finder.find_links + index_urls = finder.index_urls + no_index = finder.search_scope.no_index + if opts.no_index is True: + no_index = True + index_urls = [] + if opts.index_url and not no_index: + index_urls = [opts.index_url] + if opts.extra_index_urls and not no_index: + index_urls.extend(opts.extra_index_urls) + if opts.find_links: + # FIXME: it would be nice to keep track of the source + # of the find_links: support a find-links local path + # relative to a requirements file. + value = opts.find_links[0] + req_dir = os.path.dirname(os.path.abspath(filename)) + relative_to_reqs_file = os.path.join(req_dir, value) + if os.path.exists(relative_to_reqs_file): + value = relative_to_reqs_file + find_links.append(value) + + if session: + # We need to update the auth urls in session + session.update_index_urls(index_urls) + + search_scope = SearchScope( + find_links=find_links, + index_urls=index_urls, + no_index=no_index, + ) + finder.search_scope = search_scope + + if opts.pre: + finder.set_allow_all_prereleases() + + if opts.prefer_binary: + finder.set_prefer_binary() + + if session: + for host in opts.trusted_hosts or []: + source = f"line {lineno} of {filename}" + session.add_trusted_host(host, source=source) + + +def handle_line( + line: ParsedLine, + options: Optional[optparse.Values] = None, + finder: Optional["PackageFinder"] = None, + session: Optional["PipSession"] = None, +) -> Optional[ParsedRequirement]: + """Handle a single parsed requirements line; This can result in + creating/yielding requirements, or updating the finder. + + :param line: The parsed line to be processed. + :param options: CLI options. + :param finder: The finder - updated by non-requirement lines. + :param session: The session - updated by non-requirement lines. + + Returns a ParsedRequirement object if the line is a requirement line, + otherwise returns None. + + For lines that contain requirements, the only options that have an effect + are from SUPPORTED_OPTIONS_REQ, and they are scoped to the + requirement. Other options from SUPPORTED_OPTIONS may be present, but are + ignored. + + For lines that do not contain requirements, the only options that have an + effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may + be present, but are ignored. These lines may contain multiple options + (although our docs imply only one is supported), and all our parsed and + affect the finder. + """ + + if line.requirement is not None: + parsed_req = handle_requirement_line(line, options) + return parsed_req + else: + handle_option_line( + line.opts, + line.filename, + line.lineno, + finder, + options, + session, + ) + return None + + +class RequirementsFileParser: + def __init__( + self, + session: "PipSession", + line_parser: LineParser, + ) -> None: + self._session = session + self._line_parser = line_parser + + def parse( + self, filename: str, constraint: bool + ) -> Generator[ParsedLine, None, None]: + """Parse a given file, yielding parsed lines.""" + yield from self._parse_and_recurse( + filename, constraint, [{os.path.abspath(filename): None}] + ) + + def _parse_and_recurse( + self, + filename: str, + constraint: bool, + parsed_files_stack: List[Dict[str, Optional[str]]], + ) -> Generator[ParsedLine, None, None]: + for line in self._parse_file(filename, constraint): + if line.requirement is None and ( + line.opts.requirements or line.opts.constraints + ): + # parse a nested requirements file + if line.opts.requirements: + req_path = line.opts.requirements[0] + nested_constraint = False + else: + req_path = line.opts.constraints[0] + nested_constraint = True + + # original file is over http + if SCHEME_RE.search(filename): + # do a url join so relative paths work + req_path = urllib.parse.urljoin(filename, req_path) + # original file and nested file are paths + elif not SCHEME_RE.search(req_path): + # do a join so relative paths work + # and then abspath so that we can identify recursive references + req_path = os.path.abspath( + os.path.join( + os.path.dirname(filename), + req_path, + ) + ) + parsed_files = parsed_files_stack[0] + if req_path in parsed_files: + initial_file = parsed_files[req_path] + tail = ( + f" and again in {initial_file}" + if initial_file is not None + else "" + ) + raise RequirementsFileParseError( + f"{req_path} recursively references itself in {filename}{tail}" + ) + # Keeping a track where was each file first included in + new_parsed_files = parsed_files.copy() + new_parsed_files[req_path] = filename + yield from self._parse_and_recurse( + req_path, nested_constraint, [new_parsed_files, *parsed_files_stack] + ) + else: + yield line + + def _parse_file( + self, filename: str, constraint: bool + ) -> Generator[ParsedLine, None, None]: + _, content = get_file_content(filename, self._session) + + lines_enum = preprocess(content) + + for line_number, line in lines_enum: + try: + args_str, opts = self._line_parser(line) + except OptionParsingError as e: + # add offending line + msg = f"Invalid requirement: {line}\n{e.msg}" + raise RequirementsFileParseError(msg) + + yield ParsedLine( + filename, + line_number, + args_str, + opts, + constraint, + ) + + +def get_line_parser(finder: Optional["PackageFinder"]) -> LineParser: + def parse_line(line: str) -> Tuple[str, Values]: + # Build new parser for each line since it accumulates appendable + # options. + parser = build_parser() + defaults = parser.get_default_values() + defaults.index_url = None + if finder: + defaults.format_control = finder.format_control + + args_str, options_str = break_args_options(line) + + try: + options = shlex.split(options_str) + except ValueError as e: + raise OptionParsingError(f"Could not split options: {options_str}") from e + + opts, _ = parser.parse_args(options, defaults) + + return args_str, opts + + return parse_line + + +def break_args_options(line: str) -> Tuple[str, str]: + """Break up the line into an args and options string. We only want to shlex + (and then optparse) the options, not the args. args can contain markers + which are corrupted by shlex. + """ + tokens = line.split(" ") + args = [] + options = tokens[:] + for token in tokens: + if token.startswith("-") or token.startswith("--"): + break + else: + args.append(token) + options.pop(0) + return " ".join(args), " ".join(options) + + +class OptionParsingError(Exception): + def __init__(self, msg: str) -> None: + self.msg = msg + + +def build_parser() -> optparse.OptionParser: + """ + Return a parser for parsing requirement lines + """ + parser = optparse.OptionParser(add_help_option=False) + + option_factories = SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ + for option_factory in option_factories: + option = option_factory() + parser.add_option(option) + + # By default optparse sys.exits on parsing errors. We want to wrap + # that in our own exception. + def parser_exit(self: Any, msg: str) -> "NoReturn": + raise OptionParsingError(msg) + + # NOTE: mypy disallows assigning to a method + # https://github.com/python/mypy/issues/2427 + parser.exit = parser_exit # type: ignore + + return parser + + +def join_lines(lines_enum: ReqFileLines) -> ReqFileLines: + """Joins a line ending in '\' with the previous line (except when following + comments). The joined line takes on the index of the first line. + """ + primary_line_number = None + new_line: List[str] = [] + for line_number, line in lines_enum: + if not line.endswith("\\") or COMMENT_RE.match(line): + if COMMENT_RE.match(line): + # this ensures comments are always matched later + line = " " + line + if new_line: + new_line.append(line) + assert primary_line_number is not None + yield primary_line_number, "".join(new_line) + new_line = [] + else: + yield line_number, line + else: + if not new_line: + primary_line_number = line_number + new_line.append(line.strip("\\")) + + # last line contains \ + if new_line: + assert primary_line_number is not None + yield primary_line_number, "".join(new_line) + + # TODO: handle space after '\'. + + +def ignore_comments(lines_enum: ReqFileLines) -> ReqFileLines: + """ + Strips comments and filter empty lines. + """ + for line_number, line in lines_enum: + line = COMMENT_RE.sub("", line) + line = line.strip() + if line: + yield line_number, line + + +def expand_env_variables(lines_enum: ReqFileLines) -> ReqFileLines: + """Replace all environment variables that can be retrieved via `os.getenv`. + + The only allowed format for environment variables defined in the + requirement file is `${MY_VARIABLE_1}` to ensure two things: + + 1. Strings that contain a `$` aren't accidentally (partially) expanded. + 2. Ensure consistency across platforms for requirement files. + + These points are the result of a discussion on the `github pull + request #3514 `_. + + Valid characters in variable names follow the `POSIX standard + `_ and are limited + to uppercase letter, digits and the `_` (underscore). + """ + for line_number, line in lines_enum: + for env_var, var_name in ENV_VAR_RE.findall(line): + value = os.getenv(var_name) + if not value: + continue + + line = line.replace(env_var, value) + + yield line_number, line + + +def get_file_content(url: str, session: "PipSession") -> Tuple[str, str]: + """Gets the content of a file; it may be a filename, file: URL, or + http: URL. Returns (location, content). Content is unicode. + Respects # -*- coding: declarations on the retrieved files. + + :param url: File path or url. + :param session: PipSession instance. + """ + scheme = urllib.parse.urlsplit(url).scheme + # Pip has special support for file:// URLs (LocalFSAdapter). + if scheme in ["http", "https", "file"]: + # Delay importing heavy network modules until absolutely necessary. + from pip._internal.network.utils import raise_for_status + + resp = session.get(url) + raise_for_status(resp) + return resp.url, resp.text + + # Assume this is a bare path. + try: + with open(url, "rb") as f: + raw_content = f.read() + except OSError as exc: + raise InstallationError(f"Could not open requirements file: {exc}") + + content = _decode_req_file(raw_content, url) + + return url, content + + +def _decode_req_file(data: bytes, url: str) -> str: + for bom, encoding in BOMS: + if data.startswith(bom): + return data[len(bom) :].decode(encoding) + + for line in data.split(b"\n")[:2]: + if line[0:1] == b"#": + result = PEP263_ENCODING_RE.search(line) + if result is not None: + encoding = result.groups()[0].decode("ascii") + return data.decode(encoding) + + try: + return data.decode(DEFAULT_ENCODING) + except UnicodeDecodeError: + locale_encoding = locale.getpreferredencoding(False) or sys.getdefaultencoding() + logging.warning( + "unable to decode data from %s with default encoding %s, " + "falling back to encoding from locale: %s. " + "If this is intentional you should specify the encoding with a " + "PEP-263 style comment, e.g. '# -*- coding: %s -*-'", + url, + DEFAULT_ENCODING, + locale_encoding, + locale_encoding, + ) + return data.decode(locale_encoding) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_install.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_install.py new file mode 100644 index 0000000000000000000000000000000000000000..3262d82658e93c3a7a71d88d6f14f786fa64b14a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_install.py @@ -0,0 +1,934 @@ +import functools +import logging +import os +import shutil +import sys +import uuid +import zipfile +from optparse import Values +from pathlib import Path +from typing import Any, Collection, Dict, Iterable, List, Optional, Sequence, Union + +from pip._vendor.packaging.markers import Marker +from pip._vendor.packaging.requirements import Requirement +from pip._vendor.packaging.specifiers import SpecifierSet +from pip._vendor.packaging.utils import canonicalize_name +from pip._vendor.packaging.version import Version +from pip._vendor.packaging.version import parse as parse_version +from pip._vendor.pyproject_hooks import BuildBackendHookCaller + +from pip._internal.build_env import BuildEnvironment, NoOpBuildEnvironment +from pip._internal.exceptions import InstallationError, PreviousBuildDirError +from pip._internal.locations import get_scheme +from pip._internal.metadata import ( + BaseDistribution, + get_default_environment, + get_directory_distribution, + get_wheel_distribution, +) +from pip._internal.metadata.base import FilesystemWheel +from pip._internal.models.direct_url import DirectUrl +from pip._internal.models.link import Link +from pip._internal.operations.build.metadata import generate_metadata +from pip._internal.operations.build.metadata_editable import generate_editable_metadata +from pip._internal.operations.build.metadata_legacy import ( + generate_metadata as generate_metadata_legacy, +) +from pip._internal.operations.install.editable_legacy import ( + install_editable as install_editable_legacy, +) +from pip._internal.operations.install.wheel import install_wheel +from pip._internal.pyproject import load_pyproject_toml, make_pyproject_path +from pip._internal.req.req_uninstall import UninstallPathSet +from pip._internal.utils.deprecation import deprecated +from pip._internal.utils.hashes import Hashes +from pip._internal.utils.misc import ( + ConfiguredBuildBackendHookCaller, + ask_path_exists, + backup_dir, + display_path, + hide_url, + is_installable_dir, + redact_auth_from_requirement, + redact_auth_from_url, +) +from pip._internal.utils.packaging import get_requirement +from pip._internal.utils.subprocess import runner_with_spinner_message +from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds +from pip._internal.utils.unpacking import unpack_file +from pip._internal.utils.virtualenv import running_under_virtualenv +from pip._internal.vcs import vcs + +logger = logging.getLogger(__name__) + + +class InstallRequirement: + """ + Represents something that may be installed later on, may have information + about where to fetch the relevant requirement and also contains logic for + installing the said requirement. + """ + + def __init__( + self, + req: Optional[Requirement], + comes_from: Optional[Union[str, "InstallRequirement"]], + editable: bool = False, + link: Optional[Link] = None, + markers: Optional[Marker] = None, + use_pep517: Optional[bool] = None, + isolated: bool = False, + *, + global_options: Optional[List[str]] = None, + hash_options: Optional[Dict[str, List[str]]] = None, + config_settings: Optional[Dict[str, Union[str, List[str]]]] = None, + constraint: bool = False, + extras: Collection[str] = (), + user_supplied: bool = False, + permit_editable_wheels: bool = False, + ) -> None: + assert req is None or isinstance(req, Requirement), req + self.req = req + self.comes_from = comes_from + self.constraint = constraint + self.editable = editable + self.permit_editable_wheels = permit_editable_wheels + + # source_dir is the local directory where the linked requirement is + # located, or unpacked. In case unpacking is needed, creating and + # populating source_dir is done by the RequirementPreparer. Note this + # is not necessarily the directory where pyproject.toml or setup.py is + # located - that one is obtained via unpacked_source_directory. + self.source_dir: Optional[str] = None + if self.editable: + assert link + if link.is_file: + self.source_dir = os.path.normpath(os.path.abspath(link.file_path)) + + # original_link is the direct URL that was provided by the user for the + # requirement, either directly or via a constraints file. + if link is None and req and req.url: + # PEP 508 URL requirement + link = Link(req.url) + self.link = self.original_link = link + + # When this InstallRequirement is a wheel obtained from the cache of locally + # built wheels, this is the source link corresponding to the cache entry, which + # was used to download and build the cached wheel. + self.cached_wheel_source_link: Optional[Link] = None + + # Information about the location of the artifact that was downloaded . This + # property is guaranteed to be set in resolver results. + self.download_info: Optional[DirectUrl] = None + + # Path to any downloaded or already-existing package. + self.local_file_path: Optional[str] = None + if self.link and self.link.is_file: + self.local_file_path = self.link.file_path + + if extras: + self.extras = extras + elif req: + self.extras = req.extras + else: + self.extras = set() + if markers is None and req: + markers = req.marker + self.markers = markers + + # This holds the Distribution object if this requirement is already installed. + self.satisfied_by: Optional[BaseDistribution] = None + # Whether the installation process should try to uninstall an existing + # distribution before installing this requirement. + self.should_reinstall = False + # Temporary build location + self._temp_build_dir: Optional[TempDirectory] = None + # Set to True after successful installation + self.install_succeeded: Optional[bool] = None + # Supplied options + self.global_options = global_options if global_options else [] + self.hash_options = hash_options if hash_options else {} + self.config_settings = config_settings + # Set to True after successful preparation of this requirement + self.prepared = False + # User supplied requirement are explicitly requested for installation + # by the user via CLI arguments or requirements files, as opposed to, + # e.g. dependencies, extras or constraints. + self.user_supplied = user_supplied + + self.isolated = isolated + self.build_env: BuildEnvironment = NoOpBuildEnvironment() + + # For PEP 517, the directory where we request the project metadata + # gets stored. We need this to pass to build_wheel, so the backend + # can ensure that the wheel matches the metadata (see the PEP for + # details). + self.metadata_directory: Optional[str] = None + + # The static build requirements (from pyproject.toml) + self.pyproject_requires: Optional[List[str]] = None + + # Build requirements that we will check are available + self.requirements_to_check: List[str] = [] + + # The PEP 517 backend we should use to build the project + self.pep517_backend: Optional[BuildBackendHookCaller] = None + + # Are we using PEP 517 for this requirement? + # After pyproject.toml has been loaded, the only valid values are True + # and False. Before loading, None is valid (meaning "use the default"). + # Setting an explicit value before loading pyproject.toml is supported, + # but after loading this flag should be treated as read only. + self.use_pep517 = use_pep517 + + # If config settings are provided, enforce PEP 517. + if self.config_settings: + if self.use_pep517 is False: + logger.warning( + "--no-use-pep517 ignored for %s " + "because --config-settings are specified.", + self, + ) + self.use_pep517 = True + + # This requirement needs more preparation before it can be built + self.needs_more_preparation = False + + # This requirement needs to be unpacked before it can be installed. + self._archive_source: Optional[Path] = None + + def __str__(self) -> str: + if self.req: + s = redact_auth_from_requirement(self.req) + if self.link: + s += f" from {redact_auth_from_url(self.link.url)}" + elif self.link: + s = redact_auth_from_url(self.link.url) + else: + s = "" + if self.satisfied_by is not None: + if self.satisfied_by.location is not None: + location = display_path(self.satisfied_by.location) + else: + location = "" + s += f" in {location}" + if self.comes_from: + if isinstance(self.comes_from, str): + comes_from: Optional[str] = self.comes_from + else: + comes_from = self.comes_from.from_path() + if comes_from: + s += f" (from {comes_from})" + return s + + def __repr__(self) -> str: + return ( + f"<{self.__class__.__name__} object: " + f"{str(self)} editable={self.editable!r}>" + ) + + def format_debug(self) -> str: + """An un-tested helper for getting state, for debugging.""" + attributes = vars(self) + names = sorted(attributes) + + state = (f"{attr}={attributes[attr]!r}" for attr in sorted(names)) + return "<{name} object: {{{state}}}>".format( + name=self.__class__.__name__, + state=", ".join(state), + ) + + # Things that are valid for all kinds of requirements? + @property + def name(self) -> Optional[str]: + if self.req is None: + return None + return self.req.name + + @functools.cached_property + def supports_pyproject_editable(self) -> bool: + if not self.use_pep517: + return False + assert self.pep517_backend + with self.build_env: + runner = runner_with_spinner_message( + "Checking if build backend supports build_editable" + ) + with self.pep517_backend.subprocess_runner(runner): + return "build_editable" in self.pep517_backend._supported_features() + + @property + def specifier(self) -> SpecifierSet: + assert self.req is not None + return self.req.specifier + + @property + def is_direct(self) -> bool: + """Whether this requirement was specified as a direct URL.""" + return self.original_link is not None + + @property + def is_pinned(self) -> bool: + """Return whether I am pinned to an exact version. + + For example, some-package==1.2 is pinned; some-package>1.2 is not. + """ + assert self.req is not None + specifiers = self.req.specifier + return len(specifiers) == 1 and next(iter(specifiers)).operator in {"==", "==="} + + def match_markers(self, extras_requested: Optional[Iterable[str]] = None) -> bool: + if not extras_requested: + # Provide an extra to safely evaluate the markers + # without matching any extra + extras_requested = ("",) + if self.markers is not None: + return any( + self.markers.evaluate({"extra": extra}) for extra in extras_requested + ) + else: + return True + + @property + def has_hash_options(self) -> bool: + """Return whether any known-good hashes are specified as options. + + These activate --require-hashes mode; hashes specified as part of a + URL do not. + + """ + return bool(self.hash_options) + + def hashes(self, trust_internet: bool = True) -> Hashes: + """Return a hash-comparer that considers my option- and URL-based + hashes to be known-good. + + Hashes in URLs--ones embedded in the requirements file, not ones + downloaded from an index server--are almost peers with ones from + flags. They satisfy --require-hashes (whether it was implicitly or + explicitly activated) but do not activate it. md5 and sha224 are not + allowed in flags, which should nudge people toward good algos. We + always OR all hashes together, even ones from URLs. + + :param trust_internet: Whether to trust URL-based (#md5=...) hashes + downloaded from the internet, as by populate_link() + + """ + good_hashes = self.hash_options.copy() + if trust_internet: + link = self.link + elif self.is_direct and self.user_supplied: + link = self.original_link + else: + link = None + if link and link.hash: + assert link.hash_name is not None + good_hashes.setdefault(link.hash_name, []).append(link.hash) + return Hashes(good_hashes) + + def from_path(self) -> Optional[str]: + """Format a nice indicator to show where this "comes from" """ + if self.req is None: + return None + s = str(self.req) + if self.comes_from: + comes_from: Optional[str] + if isinstance(self.comes_from, str): + comes_from = self.comes_from + else: + comes_from = self.comes_from.from_path() + if comes_from: + s += "->" + comes_from + return s + + def ensure_build_location( + self, build_dir: str, autodelete: bool, parallel_builds: bool + ) -> str: + assert build_dir is not None + if self._temp_build_dir is not None: + assert self._temp_build_dir.path + return self._temp_build_dir.path + if self.req is None: + # Some systems have /tmp as a symlink which confuses custom + # builds (such as numpy). Thus, we ensure that the real path + # is returned. + self._temp_build_dir = TempDirectory( + kind=tempdir_kinds.REQ_BUILD, globally_managed=True + ) + + return self._temp_build_dir.path + + # This is the only remaining place where we manually determine the path + # for the temporary directory. It is only needed for editables where + # it is the value of the --src option. + + # When parallel builds are enabled, add a UUID to the build directory + # name so multiple builds do not interfere with each other. + dir_name: str = canonicalize_name(self.req.name) + if parallel_builds: + dir_name = f"{dir_name}_{uuid.uuid4().hex}" + + # FIXME: Is there a better place to create the build_dir? (hg and bzr + # need this) + if not os.path.exists(build_dir): + logger.debug("Creating directory %s", build_dir) + os.makedirs(build_dir) + actual_build_dir = os.path.join(build_dir, dir_name) + # `None` indicates that we respect the globally-configured deletion + # settings, which is what we actually want when auto-deleting. + delete_arg = None if autodelete else False + return TempDirectory( + path=actual_build_dir, + delete=delete_arg, + kind=tempdir_kinds.REQ_BUILD, + globally_managed=True, + ).path + + def _set_requirement(self) -> None: + """Set requirement after generating metadata.""" + assert self.req is None + assert self.metadata is not None + assert self.source_dir is not None + + # Construct a Requirement object from the generated metadata + if isinstance(parse_version(self.metadata["Version"]), Version): + op = "==" + else: + op = "===" + + self.req = get_requirement( + "".join( + [ + self.metadata["Name"], + op, + self.metadata["Version"], + ] + ) + ) + + def warn_on_mismatching_name(self) -> None: + assert self.req is not None + metadata_name = canonicalize_name(self.metadata["Name"]) + if canonicalize_name(self.req.name) == metadata_name: + # Everything is fine. + return + + # If we're here, there's a mismatch. Log a warning about it. + logger.warning( + "Generating metadata for package %s " + "produced metadata for project name %s. Fix your " + "#egg=%s fragments.", + self.name, + metadata_name, + self.name, + ) + self.req = get_requirement(metadata_name) + + def check_if_exists(self, use_user_site: bool) -> None: + """Find an installed distribution that satisfies or conflicts + with this requirement, and set self.satisfied_by or + self.should_reinstall appropriately. + """ + if self.req is None: + return + existing_dist = get_default_environment().get_distribution(self.req.name) + if not existing_dist: + return + + version_compatible = self.req.specifier.contains( + existing_dist.version, + prereleases=True, + ) + if not version_compatible: + self.satisfied_by = None + if use_user_site: + if existing_dist.in_usersite: + self.should_reinstall = True + elif running_under_virtualenv() and existing_dist.in_site_packages: + raise InstallationError( + f"Will not install to the user site because it will " + f"lack sys.path precedence to {existing_dist.raw_name} " + f"in {existing_dist.location}" + ) + else: + self.should_reinstall = True + else: + if self.editable: + self.should_reinstall = True + # when installing editables, nothing pre-existing should ever + # satisfy + self.satisfied_by = None + else: + self.satisfied_by = existing_dist + + # Things valid for wheels + @property + def is_wheel(self) -> bool: + if not self.link: + return False + return self.link.is_wheel + + @property + def is_wheel_from_cache(self) -> bool: + # When True, it means that this InstallRequirement is a local wheel file in the + # cache of locally built wheels. + return self.cached_wheel_source_link is not None + + # Things valid for sdists + @property + def unpacked_source_directory(self) -> str: + assert self.source_dir, f"No source dir for {self}" + return os.path.join( + self.source_dir, self.link and self.link.subdirectory_fragment or "" + ) + + @property + def setup_py_path(self) -> str: + assert self.source_dir, f"No source dir for {self}" + setup_py = os.path.join(self.unpacked_source_directory, "setup.py") + + return setup_py + + @property + def setup_cfg_path(self) -> str: + assert self.source_dir, f"No source dir for {self}" + setup_cfg = os.path.join(self.unpacked_source_directory, "setup.cfg") + + return setup_cfg + + @property + def pyproject_toml_path(self) -> str: + assert self.source_dir, f"No source dir for {self}" + return make_pyproject_path(self.unpacked_source_directory) + + def load_pyproject_toml(self) -> None: + """Load the pyproject.toml file. + + After calling this routine, all of the attributes related to PEP 517 + processing for this requirement have been set. In particular, the + use_pep517 attribute can be used to determine whether we should + follow the PEP 517 or legacy (setup.py) code path. + """ + pyproject_toml_data = load_pyproject_toml( + self.use_pep517, self.pyproject_toml_path, self.setup_py_path, str(self) + ) + + if pyproject_toml_data is None: + assert not self.config_settings + self.use_pep517 = False + return + + self.use_pep517 = True + requires, backend, check, backend_path = pyproject_toml_data + self.requirements_to_check = check + self.pyproject_requires = requires + self.pep517_backend = ConfiguredBuildBackendHookCaller( + self, + self.unpacked_source_directory, + backend, + backend_path=backend_path, + ) + + def isolated_editable_sanity_check(self) -> None: + """Check that an editable requirement if valid for use with PEP 517/518. + + This verifies that an editable that has a pyproject.toml either supports PEP 660 + or as a setup.py or a setup.cfg + """ + if ( + self.editable + and self.use_pep517 + and not self.supports_pyproject_editable + and not os.path.isfile(self.setup_py_path) + and not os.path.isfile(self.setup_cfg_path) + ): + raise InstallationError( + f"Project {self} has a 'pyproject.toml' and its build " + f"backend is missing the 'build_editable' hook. Since it does not " + f"have a 'setup.py' nor a 'setup.cfg', " + f"it cannot be installed in editable mode. " + f"Consider using a build backend that supports PEP 660." + ) + + def prepare_metadata(self) -> None: + """Ensure that project metadata is available. + + Under PEP 517 and PEP 660, call the backend hook to prepare the metadata. + Under legacy processing, call setup.py egg-info. + """ + assert self.source_dir, f"No source dir for {self}" + details = self.name or f"from {self.link}" + + if self.use_pep517: + assert self.pep517_backend is not None + if ( + self.editable + and self.permit_editable_wheels + and self.supports_pyproject_editable + ): + self.metadata_directory = generate_editable_metadata( + build_env=self.build_env, + backend=self.pep517_backend, + details=details, + ) + else: + self.metadata_directory = generate_metadata( + build_env=self.build_env, + backend=self.pep517_backend, + details=details, + ) + else: + self.metadata_directory = generate_metadata_legacy( + build_env=self.build_env, + setup_py_path=self.setup_py_path, + source_dir=self.unpacked_source_directory, + isolated=self.isolated, + details=details, + ) + + # Act on the newly generated metadata, based on the name and version. + if not self.name: + self._set_requirement() + else: + self.warn_on_mismatching_name() + + self.assert_source_matches_version() + + @property + def metadata(self) -> Any: + if not hasattr(self, "_metadata"): + self._metadata = self.get_dist().metadata + + return self._metadata + + def get_dist(self) -> BaseDistribution: + if self.metadata_directory: + return get_directory_distribution(self.metadata_directory) + elif self.local_file_path and self.is_wheel: + assert self.req is not None + return get_wheel_distribution( + FilesystemWheel(self.local_file_path), + canonicalize_name(self.req.name), + ) + raise AssertionError( + f"InstallRequirement {self} has no metadata directory and no wheel: " + f"can't make a distribution." + ) + + def assert_source_matches_version(self) -> None: + assert self.source_dir, f"No source dir for {self}" + version = self.metadata["version"] + if self.req and self.req.specifier and version not in self.req.specifier: + logger.warning( + "Requested %s, but installing version %s", + self, + version, + ) + else: + logger.debug( + "Source in %s has version %s, which satisfies requirement %s", + display_path(self.source_dir), + version, + self, + ) + + # For both source distributions and editables + def ensure_has_source_dir( + self, + parent_dir: str, + autodelete: bool = False, + parallel_builds: bool = False, + ) -> None: + """Ensure that a source_dir is set. + + This will create a temporary build dir if the name of the requirement + isn't known yet. + + :param parent_dir: The ideal pip parent_dir for the source_dir. + Generally src_dir for editables and build_dir for sdists. + :return: self.source_dir + """ + if self.source_dir is None: + self.source_dir = self.ensure_build_location( + parent_dir, + autodelete=autodelete, + parallel_builds=parallel_builds, + ) + + def needs_unpacked_archive(self, archive_source: Path) -> None: + assert self._archive_source is None + self._archive_source = archive_source + + def ensure_pristine_source_checkout(self) -> None: + """Ensure the source directory has not yet been built in.""" + assert self.source_dir is not None + if self._archive_source is not None: + unpack_file(str(self._archive_source), self.source_dir) + elif is_installable_dir(self.source_dir): + # If a checkout exists, it's unwise to keep going. + # version inconsistencies are logged later, but do not fail + # the installation. + raise PreviousBuildDirError( + f"pip can't proceed with requirements '{self}' due to a " + f"pre-existing build directory ({self.source_dir}). This is likely " + "due to a previous installation that failed . pip is " + "being responsible and not assuming it can delete this. " + "Please delete it and try again." + ) + + # For editable installations + def update_editable(self) -> None: + if not self.link: + logger.debug( + "Cannot update repository at %s; repository location is unknown", + self.source_dir, + ) + return + assert self.editable + assert self.source_dir + if self.link.scheme == "file": + # Static paths don't get updated + return + vcs_backend = vcs.get_backend_for_scheme(self.link.scheme) + # Editable requirements are validated in Requirement constructors. + # So here, if it's neither a path nor a valid VCS URL, it's a bug. + assert vcs_backend, f"Unsupported VCS URL {self.link.url}" + hidden_url = hide_url(self.link.url) + vcs_backend.obtain(self.source_dir, url=hidden_url, verbosity=0) + + # Top-level Actions + def uninstall( + self, auto_confirm: bool = False, verbose: bool = False + ) -> Optional[UninstallPathSet]: + """ + Uninstall the distribution currently satisfying this requirement. + + Prompts before removing or modifying files unless + ``auto_confirm`` is True. + + Refuses to delete or modify files outside of ``sys.prefix`` - + thus uninstallation within a virtual environment can only + modify that virtual environment, even if the virtualenv is + linked to global site-packages. + + """ + assert self.req + dist = get_default_environment().get_distribution(self.req.name) + if not dist: + logger.warning("Skipping %s as it is not installed.", self.name) + return None + logger.info("Found existing installation: %s", dist) + + uninstalled_pathset = UninstallPathSet.from_dist(dist) + uninstalled_pathset.remove(auto_confirm, verbose) + return uninstalled_pathset + + def _get_archive_name(self, path: str, parentdir: str, rootdir: str) -> str: + def _clean_zip_name(name: str, prefix: str) -> str: + assert name.startswith( + prefix + os.path.sep + ), f"name {name!r} doesn't start with prefix {prefix!r}" + name = name[len(prefix) + 1 :] + name = name.replace(os.path.sep, "/") + return name + + assert self.req is not None + path = os.path.join(parentdir, path) + name = _clean_zip_name(path, rootdir) + return self.req.name + "/" + name + + def archive(self, build_dir: Optional[str]) -> None: + """Saves archive to provided build_dir. + + Used for saving downloaded VCS requirements as part of `pip download`. + """ + assert self.source_dir + if build_dir is None: + return + + create_archive = True + archive_name = "{}-{}.zip".format(self.name, self.metadata["version"]) + archive_path = os.path.join(build_dir, archive_name) + + if os.path.exists(archive_path): + response = ask_path_exists( + f"The file {display_path(archive_path)} exists. (i)gnore, (w)ipe, " + "(b)ackup, (a)bort ", + ("i", "w", "b", "a"), + ) + if response == "i": + create_archive = False + elif response == "w": + logger.warning("Deleting %s", display_path(archive_path)) + os.remove(archive_path) + elif response == "b": + dest_file = backup_dir(archive_path) + logger.warning( + "Backing up %s to %s", + display_path(archive_path), + display_path(dest_file), + ) + shutil.move(archive_path, dest_file) + elif response == "a": + sys.exit(-1) + + if not create_archive: + return + + zip_output = zipfile.ZipFile( + archive_path, + "w", + zipfile.ZIP_DEFLATED, + allowZip64=True, + ) + with zip_output: + dir = os.path.normcase(os.path.abspath(self.unpacked_source_directory)) + for dirpath, dirnames, filenames in os.walk(dir): + for dirname in dirnames: + dir_arcname = self._get_archive_name( + dirname, + parentdir=dirpath, + rootdir=dir, + ) + zipdir = zipfile.ZipInfo(dir_arcname + "/") + zipdir.external_attr = 0x1ED << 16 # 0o755 + zip_output.writestr(zipdir, "") + for filename in filenames: + file_arcname = self._get_archive_name( + filename, + parentdir=dirpath, + rootdir=dir, + ) + filename = os.path.join(dirpath, filename) + zip_output.write(filename, file_arcname) + + logger.info("Saved %s", display_path(archive_path)) + + def install( + self, + global_options: Optional[Sequence[str]] = None, + root: Optional[str] = None, + home: Optional[str] = None, + prefix: Optional[str] = None, + warn_script_location: bool = True, + use_user_site: bool = False, + pycompile: bool = True, + ) -> None: + assert self.req is not None + scheme = get_scheme( + self.req.name, + user=use_user_site, + home=home, + root=root, + isolated=self.isolated, + prefix=prefix, + ) + + if self.editable and not self.is_wheel: + deprecated( + reason=( + f"Legacy editable install of {self} (setup.py develop) " + "is deprecated." + ), + replacement=( + "to add a pyproject.toml or enable --use-pep517, " + "and use setuptools >= 64. " + "If the resulting installation is not behaving as expected, " + "try using --config-settings editable_mode=compat. " + "Please consult the setuptools documentation for more information" + ), + gone_in="25.1", + issue=11457, + ) + if self.config_settings: + logger.warning( + "--config-settings ignored for legacy editable install of %s. " + "Consider upgrading to a version of setuptools " + "that supports PEP 660 (>= 64).", + self, + ) + install_editable_legacy( + global_options=global_options if global_options is not None else [], + prefix=prefix, + home=home, + use_user_site=use_user_site, + name=self.req.name, + setup_py_path=self.setup_py_path, + isolated=self.isolated, + build_env=self.build_env, + unpacked_source_directory=self.unpacked_source_directory, + ) + self.install_succeeded = True + return + + assert self.is_wheel + assert self.local_file_path + + install_wheel( + self.req.name, + self.local_file_path, + scheme=scheme, + req_description=str(self.req), + pycompile=pycompile, + warn_script_location=warn_script_location, + direct_url=self.download_info if self.is_direct else None, + requested=self.user_supplied, + ) + self.install_succeeded = True + + +def check_invalid_constraint_type(req: InstallRequirement) -> str: + # Check for unsupported forms + problem = "" + if not req.name: + problem = "Unnamed requirements are not allowed as constraints" + elif req.editable: + problem = "Editable requirements are not allowed as constraints" + elif req.extras: + problem = "Constraints cannot have extras" + + if problem: + deprecated( + reason=( + "Constraints are only allowed to take the form of a package " + "name and a version specifier. Other forms were originally " + "permitted as an accident of the implementation, but were " + "undocumented. The new implementation of the resolver no " + "longer supports these forms." + ), + replacement="replacing the constraint with a requirement", + # No plan yet for when the new resolver becomes default + gone_in=None, + issue=8210, + ) + + return problem + + +def _has_option(options: Values, reqs: List[InstallRequirement], option: str) -> bool: + if getattr(options, option, None): + return True + for req in reqs: + if getattr(req, option, None): + return True + return False + + +def check_legacy_setup_py_options( + options: Values, + reqs: List[InstallRequirement], +) -> None: + has_build_options = _has_option(options, reqs, "build_options") + has_global_options = _has_option(options, reqs, "global_options") + if has_build_options or has_global_options: + deprecated( + reason="--build-option and --global-option are deprecated.", + issue=11859, + replacement="to use --config-settings", + gone_in=None, + ) + logger.warning( + "Implying --no-binary=:all: due to the presence of " + "--build-option / --global-option. " + ) + options.format_control.disallow_binaries() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_set.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_set.py new file mode 100644 index 0000000000000000000000000000000000000000..ec7a6e07a25acfa978030c65ae7c1d8609163249 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_set.py @@ -0,0 +1,82 @@ +import logging +from collections import OrderedDict +from typing import Dict, List + +from pip._vendor.packaging.utils import canonicalize_name + +from pip._internal.req.req_install import InstallRequirement + +logger = logging.getLogger(__name__) + + +class RequirementSet: + def __init__(self, check_supported_wheels: bool = True) -> None: + """Create a RequirementSet.""" + + self.requirements: Dict[str, InstallRequirement] = OrderedDict() + self.check_supported_wheels = check_supported_wheels + + self.unnamed_requirements: List[InstallRequirement] = [] + + def __str__(self) -> str: + requirements = sorted( + (req for req in self.requirements.values() if not req.comes_from), + key=lambda req: canonicalize_name(req.name or ""), + ) + return " ".join(str(req.req) for req in requirements) + + def __repr__(self) -> str: + requirements = sorted( + self.requirements.values(), + key=lambda req: canonicalize_name(req.name or ""), + ) + + format_string = "<{classname} object; {count} requirement(s): {reqs}>" + return format_string.format( + classname=self.__class__.__name__, + count=len(requirements), + reqs=", ".join(str(req.req) for req in requirements), + ) + + def add_unnamed_requirement(self, install_req: InstallRequirement) -> None: + assert not install_req.name + self.unnamed_requirements.append(install_req) + + def add_named_requirement(self, install_req: InstallRequirement) -> None: + assert install_req.name + + project_name = canonicalize_name(install_req.name) + self.requirements[project_name] = install_req + + def has_requirement(self, name: str) -> bool: + project_name = canonicalize_name(name) + + return ( + project_name in self.requirements + and not self.requirements[project_name].constraint + ) + + def get_requirement(self, name: str) -> InstallRequirement: + project_name = canonicalize_name(name) + + if project_name in self.requirements: + return self.requirements[project_name] + + raise KeyError(f"No project with the name {name!r}") + + @property + def all_requirements(self) -> List[InstallRequirement]: + return self.unnamed_requirements + list(self.requirements.values()) + + @property + def requirements_to_install(self) -> List[InstallRequirement]: + """Return the list of requirements that need to be installed. + + TODO remove this property together with the legacy resolver, since the new + resolver only returns requirements that need to be installed. + """ + return [ + install_req + for install_req in self.all_requirements + if not install_req.constraint and not install_req.satisfied_by + ] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py new file mode 100644 index 0000000000000000000000000000000000000000..26df20844b379bd7c06f3db7d75cddad5755d22e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py @@ -0,0 +1,633 @@ +import functools +import os +import sys +import sysconfig +from importlib.util import cache_from_source +from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Set, Tuple + +from pip._internal.exceptions import LegacyDistutilsInstall, UninstallMissingRecord +from pip._internal.locations import get_bin_prefix, get_bin_user +from pip._internal.metadata import BaseDistribution +from pip._internal.utils.compat import WINDOWS +from pip._internal.utils.egg_link import egg_link_path_from_location +from pip._internal.utils.logging import getLogger, indent_log +from pip._internal.utils.misc import ask, normalize_path, renames, rmtree +from pip._internal.utils.temp_dir import AdjacentTempDirectory, TempDirectory +from pip._internal.utils.virtualenv import running_under_virtualenv + +logger = getLogger(__name__) + + +def _script_names( + bin_dir: str, script_name: str, is_gui: bool +) -> Generator[str, None, None]: + """Create the fully qualified name of the files created by + {console,gui}_scripts for the given ``dist``. + Returns the list of file names + """ + exe_name = os.path.join(bin_dir, script_name) + yield exe_name + if not WINDOWS: + return + yield f"{exe_name}.exe" + yield f"{exe_name}.exe.manifest" + if is_gui: + yield f"{exe_name}-script.pyw" + else: + yield f"{exe_name}-script.py" + + +def _unique( + fn: Callable[..., Generator[Any, None, None]] +) -> Callable[..., Generator[Any, None, None]]: + @functools.wraps(fn) + def unique(*args: Any, **kw: Any) -> Generator[Any, None, None]: + seen: Set[Any] = set() + for item in fn(*args, **kw): + if item not in seen: + seen.add(item) + yield item + + return unique + + +@_unique +def uninstallation_paths(dist: BaseDistribution) -> Generator[str, None, None]: + """ + Yield all the uninstallation paths for dist based on RECORD-without-.py[co] + + Yield paths to all the files in RECORD. For each .py file in RECORD, add + the .pyc and .pyo in the same directory. + + UninstallPathSet.add() takes care of the __pycache__ .py[co]. + + If RECORD is not found, raises an error, + with possible information from the INSTALLER file. + + https://packaging.python.org/specifications/recording-installed-packages/ + """ + location = dist.location + assert location is not None, "not installed" + + entries = dist.iter_declared_entries() + if entries is None: + raise UninstallMissingRecord(distribution=dist) + + for entry in entries: + path = os.path.join(location, entry) + yield path + if path.endswith(".py"): + dn, fn = os.path.split(path) + base = fn[:-3] + path = os.path.join(dn, base + ".pyc") + yield path + path = os.path.join(dn, base + ".pyo") + yield path + + +def compact(paths: Iterable[str]) -> Set[str]: + """Compact a path set to contain the minimal number of paths + necessary to contain all paths in the set. If /a/path/ and + /a/path/to/a/file.txt are both in the set, leave only the + shorter path.""" + + sep = os.path.sep + short_paths: Set[str] = set() + for path in sorted(paths, key=len): + should_skip = any( + path.startswith(shortpath.rstrip("*")) + and path[len(shortpath.rstrip("*").rstrip(sep))] == sep + for shortpath in short_paths + ) + if not should_skip: + short_paths.add(path) + return short_paths + + +def compress_for_rename(paths: Iterable[str]) -> Set[str]: + """Returns a set containing the paths that need to be renamed. + + This set may include directories when the original sequence of paths + included every file on disk. + """ + case_map = {os.path.normcase(p): p for p in paths} + remaining = set(case_map) + unchecked = sorted({os.path.split(p)[0] for p in case_map.values()}, key=len) + wildcards: Set[str] = set() + + def norm_join(*a: str) -> str: + return os.path.normcase(os.path.join(*a)) + + for root in unchecked: + if any(os.path.normcase(root).startswith(w) for w in wildcards): + # This directory has already been handled. + continue + + all_files: Set[str] = set() + all_subdirs: Set[str] = set() + for dirname, subdirs, files in os.walk(root): + all_subdirs.update(norm_join(root, dirname, d) for d in subdirs) + all_files.update(norm_join(root, dirname, f) for f in files) + # If all the files we found are in our remaining set of files to + # remove, then remove them from the latter set and add a wildcard + # for the directory. + if not (all_files - remaining): + remaining.difference_update(all_files) + wildcards.add(root + os.sep) + + return set(map(case_map.__getitem__, remaining)) | wildcards + + +def compress_for_output_listing(paths: Iterable[str]) -> Tuple[Set[str], Set[str]]: + """Returns a tuple of 2 sets of which paths to display to user + + The first set contains paths that would be deleted. Files of a package + are not added and the top-level directory of the package has a '*' added + at the end - to signify that all it's contents are removed. + + The second set contains files that would have been skipped in the above + folders. + """ + + will_remove = set(paths) + will_skip = set() + + # Determine folders and files + folders = set() + files = set() + for path in will_remove: + if path.endswith(".pyc"): + continue + if path.endswith("__init__.py") or ".dist-info" in path: + folders.add(os.path.dirname(path)) + files.add(path) + + _normcased_files = set(map(os.path.normcase, files)) + + folders = compact(folders) + + # This walks the tree using os.walk to not miss extra folders + # that might get added. + for folder in folders: + for dirpath, _, dirfiles in os.walk(folder): + for fname in dirfiles: + if fname.endswith(".pyc"): + continue + + file_ = os.path.join(dirpath, fname) + if ( + os.path.isfile(file_) + and os.path.normcase(file_) not in _normcased_files + ): + # We are skipping this file. Add it to the set. + will_skip.add(file_) + + will_remove = files | {os.path.join(folder, "*") for folder in folders} + + return will_remove, will_skip + + +class StashedUninstallPathSet: + """A set of file rename operations to stash files while + tentatively uninstalling them.""" + + def __init__(self) -> None: + # Mapping from source file root to [Adjacent]TempDirectory + # for files under that directory. + self._save_dirs: Dict[str, TempDirectory] = {} + # (old path, new path) tuples for each move that may need + # to be undone. + self._moves: List[Tuple[str, str]] = [] + + def _get_directory_stash(self, path: str) -> str: + """Stashes a directory. + + Directories are stashed adjacent to their original location if + possible, or else moved/copied into the user's temp dir.""" + + try: + save_dir: TempDirectory = AdjacentTempDirectory(path) + except OSError: + save_dir = TempDirectory(kind="uninstall") + self._save_dirs[os.path.normcase(path)] = save_dir + + return save_dir.path + + def _get_file_stash(self, path: str) -> str: + """Stashes a file. + + If no root has been provided, one will be created for the directory + in the user's temp directory.""" + path = os.path.normcase(path) + head, old_head = os.path.dirname(path), None + save_dir = None + + while head != old_head: + try: + save_dir = self._save_dirs[head] + break + except KeyError: + pass + head, old_head = os.path.dirname(head), head + else: + # Did not find any suitable root + head = os.path.dirname(path) + save_dir = TempDirectory(kind="uninstall") + self._save_dirs[head] = save_dir + + relpath = os.path.relpath(path, head) + if relpath and relpath != os.path.curdir: + return os.path.join(save_dir.path, relpath) + return save_dir.path + + def stash(self, path: str) -> str: + """Stashes the directory or file and returns its new location. + Handle symlinks as files to avoid modifying the symlink targets. + """ + path_is_dir = os.path.isdir(path) and not os.path.islink(path) + if path_is_dir: + new_path = self._get_directory_stash(path) + else: + new_path = self._get_file_stash(path) + + self._moves.append((path, new_path)) + if path_is_dir and os.path.isdir(new_path): + # If we're moving a directory, we need to + # remove the destination first or else it will be + # moved to inside the existing directory. + # We just created new_path ourselves, so it will + # be removable. + os.rmdir(new_path) + renames(path, new_path) + return new_path + + def commit(self) -> None: + """Commits the uninstall by removing stashed files.""" + for save_dir in self._save_dirs.values(): + save_dir.cleanup() + self._moves = [] + self._save_dirs = {} + + def rollback(self) -> None: + """Undoes the uninstall by moving stashed files back.""" + for p in self._moves: + logger.info("Moving to %s\n from %s", *p) + + for new_path, path in self._moves: + try: + logger.debug("Replacing %s from %s", new_path, path) + if os.path.isfile(new_path) or os.path.islink(new_path): + os.unlink(new_path) + elif os.path.isdir(new_path): + rmtree(new_path) + renames(path, new_path) + except OSError as ex: + logger.error("Failed to restore %s", new_path) + logger.debug("Exception: %s", ex) + + self.commit() + + @property + def can_rollback(self) -> bool: + return bool(self._moves) + + +class UninstallPathSet: + """A set of file paths to be removed in the uninstallation of a + requirement.""" + + def __init__(self, dist: BaseDistribution) -> None: + self._paths: Set[str] = set() + self._refuse: Set[str] = set() + self._pth: Dict[str, UninstallPthEntries] = {} + self._dist = dist + self._moved_paths = StashedUninstallPathSet() + # Create local cache of normalize_path results. Creating an UninstallPathSet + # can result in hundreds/thousands of redundant calls to normalize_path with + # the same args, which hurts performance. + self._normalize_path_cached = functools.lru_cache(normalize_path) + + def _permitted(self, path: str) -> bool: + """ + Return True if the given path is one we are permitted to + remove/modify, False otherwise. + + """ + # aka is_local, but caching normalized sys.prefix + if not running_under_virtualenv(): + return True + return path.startswith(self._normalize_path_cached(sys.prefix)) + + def add(self, path: str) -> None: + head, tail = os.path.split(path) + + # we normalize the head to resolve parent directory symlinks, but not + # the tail, since we only want to uninstall symlinks, not their targets + path = os.path.join(self._normalize_path_cached(head), os.path.normcase(tail)) + + if not os.path.exists(path): + return + if self._permitted(path): + self._paths.add(path) + else: + self._refuse.add(path) + + # __pycache__ files can show up after 'installed-files.txt' is created, + # due to imports + if os.path.splitext(path)[1] == ".py": + self.add(cache_from_source(path)) + + def add_pth(self, pth_file: str, entry: str) -> None: + pth_file = self._normalize_path_cached(pth_file) + if self._permitted(pth_file): + if pth_file not in self._pth: + self._pth[pth_file] = UninstallPthEntries(pth_file) + self._pth[pth_file].add(entry) + else: + self._refuse.add(pth_file) + + def remove(self, auto_confirm: bool = False, verbose: bool = False) -> None: + """Remove paths in ``self._paths`` with confirmation (unless + ``auto_confirm`` is True).""" + + if not self._paths: + logger.info( + "Can't uninstall '%s'. No files were found to uninstall.", + self._dist.raw_name, + ) + return + + dist_name_version = f"{self._dist.raw_name}-{self._dist.raw_version}" + logger.info("Uninstalling %s:", dist_name_version) + + with indent_log(): + if auto_confirm or self._allowed_to_proceed(verbose): + moved = self._moved_paths + + for_rename = compress_for_rename(self._paths) + + for path in sorted(compact(for_rename)): + moved.stash(path) + logger.verbose("Removing file or directory %s", path) + + for pth in self._pth.values(): + pth.remove() + + logger.info("Successfully uninstalled %s", dist_name_version) + + def _allowed_to_proceed(self, verbose: bool) -> bool: + """Display which files would be deleted and prompt for confirmation""" + + def _display(msg: str, paths: Iterable[str]) -> None: + if not paths: + return + + logger.info(msg) + with indent_log(): + for path in sorted(compact(paths)): + logger.info(path) + + if not verbose: + will_remove, will_skip = compress_for_output_listing(self._paths) + else: + # In verbose mode, display all the files that are going to be + # deleted. + will_remove = set(self._paths) + will_skip = set() + + _display("Would remove:", will_remove) + _display("Would not remove (might be manually added):", will_skip) + _display("Would not remove (outside of prefix):", self._refuse) + if verbose: + _display("Will actually move:", compress_for_rename(self._paths)) + + return ask("Proceed (Y/n)? ", ("y", "n", "")) != "n" + + def rollback(self) -> None: + """Rollback the changes previously made by remove().""" + if not self._moved_paths.can_rollback: + logger.error( + "Can't roll back %s; was not uninstalled", + self._dist.raw_name, + ) + return + logger.info("Rolling back uninstall of %s", self._dist.raw_name) + self._moved_paths.rollback() + for pth in self._pth.values(): + pth.rollback() + + def commit(self) -> None: + """Remove temporary save dir: rollback will no longer be possible.""" + self._moved_paths.commit() + + @classmethod + def from_dist(cls, dist: BaseDistribution) -> "UninstallPathSet": + dist_location = dist.location + info_location = dist.info_location + if dist_location is None: + logger.info( + "Not uninstalling %s since it is not installed", + dist.canonical_name, + ) + return cls(dist) + + normalized_dist_location = normalize_path(dist_location) + if not dist.local: + logger.info( + "Not uninstalling %s at %s, outside environment %s", + dist.canonical_name, + normalized_dist_location, + sys.prefix, + ) + return cls(dist) + + if normalized_dist_location in { + p + for p in {sysconfig.get_path("stdlib"), sysconfig.get_path("platstdlib")} + if p + }: + logger.info( + "Not uninstalling %s at %s, as it is in the standard library.", + dist.canonical_name, + normalized_dist_location, + ) + return cls(dist) + + paths_to_remove = cls(dist) + develop_egg_link = egg_link_path_from_location(dist.raw_name) + + # Distribution is installed with metadata in a "flat" .egg-info + # directory. This means it is not a modern .dist-info installation, an + # egg, or legacy editable. + setuptools_flat_installation = ( + dist.installed_with_setuptools_egg_info + and info_location is not None + and os.path.exists(info_location) + # If dist is editable and the location points to a ``.egg-info``, + # we are in fact in the legacy editable case. + and not info_location.endswith(f"{dist.setuptools_filename}.egg-info") + ) + + # Uninstall cases order do matter as in the case of 2 installs of the + # same package, pip needs to uninstall the currently detected version + if setuptools_flat_installation: + if info_location is not None: + paths_to_remove.add(info_location) + installed_files = dist.iter_declared_entries() + if installed_files is not None: + for installed_file in installed_files: + paths_to_remove.add(os.path.join(dist_location, installed_file)) + # FIXME: need a test for this elif block + # occurs with --single-version-externally-managed/--record outside + # of pip + elif dist.is_file("top_level.txt"): + try: + namespace_packages = dist.read_text("namespace_packages.txt") + except FileNotFoundError: + namespaces = [] + else: + namespaces = namespace_packages.splitlines(keepends=False) + for top_level_pkg in [ + p + for p in dist.read_text("top_level.txt").splitlines() + if p and p not in namespaces + ]: + path = os.path.join(dist_location, top_level_pkg) + paths_to_remove.add(path) + paths_to_remove.add(f"{path}.py") + paths_to_remove.add(f"{path}.pyc") + paths_to_remove.add(f"{path}.pyo") + + elif dist.installed_by_distutils: + raise LegacyDistutilsInstall(distribution=dist) + + elif dist.installed_as_egg: + # package installed by easy_install + # We cannot match on dist.egg_name because it can slightly vary + # i.e. setuptools-0.6c11-py2.6.egg vs setuptools-0.6rc11-py2.6.egg + paths_to_remove.add(dist_location) + easy_install_egg = os.path.split(dist_location)[1] + easy_install_pth = os.path.join( + os.path.dirname(dist_location), + "easy-install.pth", + ) + paths_to_remove.add_pth(easy_install_pth, "./" + easy_install_egg) + + elif dist.installed_with_dist_info: + for path in uninstallation_paths(dist): + paths_to_remove.add(path) + + elif develop_egg_link: + # PEP 660 modern editable is handled in the ``.dist-info`` case + # above, so this only covers the setuptools-style editable. + with open(develop_egg_link) as fh: + link_pointer = os.path.normcase(fh.readline().strip()) + normalized_link_pointer = paths_to_remove._normalize_path_cached( + link_pointer + ) + assert os.path.samefile( + normalized_link_pointer, normalized_dist_location + ), ( + f"Egg-link {develop_egg_link} (to {link_pointer}) does not match " + f"installed location of {dist.raw_name} (at {dist_location})" + ) + paths_to_remove.add(develop_egg_link) + easy_install_pth = os.path.join( + os.path.dirname(develop_egg_link), "easy-install.pth" + ) + paths_to_remove.add_pth(easy_install_pth, dist_location) + + else: + logger.debug( + "Not sure how to uninstall: %s - Check: %s", + dist, + dist_location, + ) + + if dist.in_usersite: + bin_dir = get_bin_user() + else: + bin_dir = get_bin_prefix() + + # find distutils scripts= scripts + try: + for script in dist.iter_distutils_script_names(): + paths_to_remove.add(os.path.join(bin_dir, script)) + if WINDOWS: + paths_to_remove.add(os.path.join(bin_dir, f"{script}.bat")) + except (FileNotFoundError, NotADirectoryError): + pass + + # find console_scripts and gui_scripts + def iter_scripts_to_remove( + dist: BaseDistribution, + bin_dir: str, + ) -> Generator[str, None, None]: + for entry_point in dist.iter_entry_points(): + if entry_point.group == "console_scripts": + yield from _script_names(bin_dir, entry_point.name, False) + elif entry_point.group == "gui_scripts": + yield from _script_names(bin_dir, entry_point.name, True) + + for s in iter_scripts_to_remove(dist, bin_dir): + paths_to_remove.add(s) + + return paths_to_remove + + +class UninstallPthEntries: + def __init__(self, pth_file: str) -> None: + self.file = pth_file + self.entries: Set[str] = set() + self._saved_lines: Optional[List[bytes]] = None + + def add(self, entry: str) -> None: + entry = os.path.normcase(entry) + # On Windows, os.path.normcase converts the entry to use + # backslashes. This is correct for entries that describe absolute + # paths outside of site-packages, but all the others use forward + # slashes. + # os.path.splitdrive is used instead of os.path.isabs because isabs + # treats non-absolute paths with drive letter markings like c:foo\bar + # as absolute paths. It also does not recognize UNC paths if they don't + # have more than "\\sever\share". Valid examples: "\\server\share\" or + # "\\server\share\folder". + if WINDOWS and not os.path.splitdrive(entry)[0]: + entry = entry.replace("\\", "/") + self.entries.add(entry) + + def remove(self) -> None: + logger.verbose("Removing pth entries from %s:", self.file) + + # If the file doesn't exist, log a warning and return + if not os.path.isfile(self.file): + logger.warning("Cannot remove entries from nonexistent file %s", self.file) + return + with open(self.file, "rb") as fh: + # windows uses '\r\n' with py3k, but uses '\n' with py2.x + lines = fh.readlines() + self._saved_lines = lines + if any(b"\r\n" in line for line in lines): + endline = "\r\n" + else: + endline = "\n" + # handle missing trailing newline + if lines and not lines[-1].endswith(endline.encode("utf-8")): + lines[-1] = lines[-1] + endline.encode("utf-8") + for entry in self.entries: + try: + logger.verbose("Removing entry: %s", entry) + lines.remove((entry + endline).encode("utf-8")) + except ValueError: + pass + with open(self.file, "wb") as fh: + fh.writelines(lines) + + def rollback(self) -> bool: + if self._saved_lines is None: + logger.error("Cannot roll back changes to %s, none were made", self.file) + return False + logger.debug("Rolling %s back to previous state", self.file) + with open(self.file, "wb") as fh: + fh.writelines(self._saved_lines) + return True diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..edef3b0872a217740334527138ea77f41abf5a2b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dcf224cc6dd3c1ac0a6da2dadda2a16ba8750b6b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd3086e8271f8858066ee87f88ae479cb1688a05 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..feaa01f1cb419990e829685749195d1b9a4b9dc1 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py new file mode 100644 index 0000000000000000000000000000000000000000..1dd0d7041bb7a0a32bdf22f825c52f87276e5e07 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py @@ -0,0 +1,597 @@ +"""Dependency Resolution + +The dependency resolution in pip is performed as follows: + +for top-level requirements: + a. only one spec allowed per project, regardless of conflicts or not. + otherwise a "double requirement" exception is raised + b. they override sub-dependency requirements. +for sub-dependencies + a. "first found, wins" (where the order is breadth first) +""" + +import logging +import sys +from collections import defaultdict +from itertools import chain +from typing import DefaultDict, Iterable, List, Optional, Set, Tuple + +from pip._vendor.packaging import specifiers +from pip._vendor.packaging.requirements import Requirement + +from pip._internal.cache import WheelCache +from pip._internal.exceptions import ( + BestVersionAlreadyInstalled, + DistributionNotFound, + HashError, + HashErrors, + InstallationError, + NoneMetadataError, + UnsupportedPythonVersion, +) +from pip._internal.index.package_finder import PackageFinder +from pip._internal.metadata import BaseDistribution +from pip._internal.models.link import Link +from pip._internal.models.wheel import Wheel +from pip._internal.operations.prepare import RequirementPreparer +from pip._internal.req.req_install import ( + InstallRequirement, + check_invalid_constraint_type, +) +from pip._internal.req.req_set import RequirementSet +from pip._internal.resolution.base import BaseResolver, InstallRequirementProvider +from pip._internal.utils import compatibility_tags +from pip._internal.utils.compatibility_tags import get_supported +from pip._internal.utils.direct_url_helpers import direct_url_from_link +from pip._internal.utils.logging import indent_log +from pip._internal.utils.misc import normalize_version_info +from pip._internal.utils.packaging import check_requires_python + +logger = logging.getLogger(__name__) + +DiscoveredDependencies = DefaultDict[Optional[str], List[InstallRequirement]] + + +def _check_dist_requires_python( + dist: BaseDistribution, + version_info: Tuple[int, int, int], + ignore_requires_python: bool = False, +) -> None: + """ + Check whether the given Python version is compatible with a distribution's + "Requires-Python" value. + + :param version_info: A 3-tuple of ints representing the Python + major-minor-micro version to check. + :param ignore_requires_python: Whether to ignore the "Requires-Python" + value if the given Python version isn't compatible. + + :raises UnsupportedPythonVersion: When the given Python version isn't + compatible. + """ + # This idiosyncratically converts the SpecifierSet to str and let + # check_requires_python then parse it again into SpecifierSet. But this + # is the legacy resolver so I'm just not going to bother refactoring. + try: + requires_python = str(dist.requires_python) + except FileNotFoundError as e: + raise NoneMetadataError(dist, str(e)) + try: + is_compatible = check_requires_python( + requires_python, + version_info=version_info, + ) + except specifiers.InvalidSpecifier as exc: + logger.warning( + "Package %r has an invalid Requires-Python: %s", dist.raw_name, exc + ) + return + + if is_compatible: + return + + version = ".".join(map(str, version_info)) + if ignore_requires_python: + logger.debug( + "Ignoring failed Requires-Python check for package %r: %s not in %r", + dist.raw_name, + version, + requires_python, + ) + return + + raise UnsupportedPythonVersion( + f"Package {dist.raw_name!r} requires a different Python: " + f"{version} not in {requires_python!r}" + ) + + +class Resolver(BaseResolver): + """Resolves which packages need to be installed/uninstalled to perform \ + the requested operation without breaking the requirements of any package. + """ + + _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"} + + def __init__( + self, + preparer: RequirementPreparer, + finder: PackageFinder, + wheel_cache: Optional[WheelCache], + make_install_req: InstallRequirementProvider, + use_user_site: bool, + ignore_dependencies: bool, + ignore_installed: bool, + ignore_requires_python: bool, + force_reinstall: bool, + upgrade_strategy: str, + py_version_info: Optional[Tuple[int, ...]] = None, + ) -> None: + super().__init__() + assert upgrade_strategy in self._allowed_strategies + + if py_version_info is None: + py_version_info = sys.version_info[:3] + else: + py_version_info = normalize_version_info(py_version_info) + + self._py_version_info = py_version_info + + self.preparer = preparer + self.finder = finder + self.wheel_cache = wheel_cache + + self.upgrade_strategy = upgrade_strategy + self.force_reinstall = force_reinstall + self.ignore_dependencies = ignore_dependencies + self.ignore_installed = ignore_installed + self.ignore_requires_python = ignore_requires_python + self.use_user_site = use_user_site + self._make_install_req = make_install_req + + self._discovered_dependencies: DiscoveredDependencies = defaultdict(list) + + def resolve( + self, root_reqs: List[InstallRequirement], check_supported_wheels: bool + ) -> RequirementSet: + """Resolve what operations need to be done + + As a side-effect of this method, the packages (and their dependencies) + are downloaded, unpacked and prepared for installation. This + preparation is done by ``pip.operations.prepare``. + + Once PyPI has static dependency metadata available, it would be + possible to move the preparation to become a step separated from + dependency resolution. + """ + requirement_set = RequirementSet(check_supported_wheels=check_supported_wheels) + for req in root_reqs: + if req.constraint: + check_invalid_constraint_type(req) + self._add_requirement_to_set(requirement_set, req) + + # Actually prepare the files, and collect any exceptions. Most hash + # exceptions cannot be checked ahead of time, because + # _populate_link() needs to be called before we can make decisions + # based on link type. + discovered_reqs: List[InstallRequirement] = [] + hash_errors = HashErrors() + for req in chain(requirement_set.all_requirements, discovered_reqs): + try: + discovered_reqs.extend(self._resolve_one(requirement_set, req)) + except HashError as exc: + exc.req = req + hash_errors.append(exc) + + if hash_errors: + raise hash_errors + + return requirement_set + + def _add_requirement_to_set( + self, + requirement_set: RequirementSet, + install_req: InstallRequirement, + parent_req_name: Optional[str] = None, + extras_requested: Optional[Iterable[str]] = None, + ) -> Tuple[List[InstallRequirement], Optional[InstallRequirement]]: + """Add install_req as a requirement to install. + + :param parent_req_name: The name of the requirement that needed this + added. The name is used because when multiple unnamed requirements + resolve to the same name, we could otherwise end up with dependency + links that point outside the Requirements set. parent_req must + already be added. Note that None implies that this is a user + supplied requirement, vs an inferred one. + :param extras_requested: an iterable of extras used to evaluate the + environment markers. + :return: Additional requirements to scan. That is either [] if + the requirement is not applicable, or [install_req] if the + requirement is applicable and has just been added. + """ + # If the markers do not match, ignore this requirement. + if not install_req.match_markers(extras_requested): + logger.info( + "Ignoring %s: markers '%s' don't match your environment", + install_req.name, + install_req.markers, + ) + return [], None + + # If the wheel is not supported, raise an error. + # Should check this after filtering out based on environment markers to + # allow specifying different wheels based on the environment/OS, in a + # single requirements file. + if install_req.link and install_req.link.is_wheel: + wheel = Wheel(install_req.link.filename) + tags = compatibility_tags.get_supported() + if requirement_set.check_supported_wheels and not wheel.supported(tags): + raise InstallationError( + f"{wheel.filename} is not a supported wheel on this platform." + ) + + # This next bit is really a sanity check. + assert ( + not install_req.user_supplied or parent_req_name is None + ), "a user supplied req shouldn't have a parent" + + # Unnamed requirements are scanned again and the requirement won't be + # added as a dependency until after scanning. + if not install_req.name: + requirement_set.add_unnamed_requirement(install_req) + return [install_req], None + + try: + existing_req: Optional[InstallRequirement] = ( + requirement_set.get_requirement(install_req.name) + ) + except KeyError: + existing_req = None + + has_conflicting_requirement = ( + parent_req_name is None + and existing_req + and not existing_req.constraint + and existing_req.extras == install_req.extras + and existing_req.req + and install_req.req + and existing_req.req.specifier != install_req.req.specifier + ) + if has_conflicting_requirement: + raise InstallationError( + f"Double requirement given: {install_req} " + f"(already in {existing_req}, name={install_req.name!r})" + ) + + # When no existing requirement exists, add the requirement as a + # dependency and it will be scanned again after. + if not existing_req: + requirement_set.add_named_requirement(install_req) + # We'd want to rescan this requirement later + return [install_req], install_req + + # Assume there's no need to scan, and that we've already + # encountered this for scanning. + if install_req.constraint or not existing_req.constraint: + return [], existing_req + + does_not_satisfy_constraint = install_req.link and not ( + existing_req.link and install_req.link.path == existing_req.link.path + ) + if does_not_satisfy_constraint: + raise InstallationError( + f"Could not satisfy constraints for '{install_req.name}': " + "installation from path or url cannot be " + "constrained to a version" + ) + # If we're now installing a constraint, mark the existing + # object for real installation. + existing_req.constraint = False + # If we're now installing a user supplied requirement, + # mark the existing object as such. + if install_req.user_supplied: + existing_req.user_supplied = True + existing_req.extras = tuple( + sorted(set(existing_req.extras) | set(install_req.extras)) + ) + logger.debug( + "Setting %s extras to: %s", + existing_req, + existing_req.extras, + ) + # Return the existing requirement for addition to the parent and + # scanning again. + return [existing_req], existing_req + + def _is_upgrade_allowed(self, req: InstallRequirement) -> bool: + if self.upgrade_strategy == "to-satisfy-only": + return False + elif self.upgrade_strategy == "eager": + return True + else: + assert self.upgrade_strategy == "only-if-needed" + return req.user_supplied or req.constraint + + def _set_req_to_reinstall(self, req: InstallRequirement) -> None: + """ + Set a requirement to be installed. + """ + # Don't uninstall the conflict if doing a user install and the + # conflict is not a user install. + assert req.satisfied_by is not None + if not self.use_user_site or req.satisfied_by.in_usersite: + req.should_reinstall = True + req.satisfied_by = None + + def _check_skip_installed( + self, req_to_install: InstallRequirement + ) -> Optional[str]: + """Check if req_to_install should be skipped. + + This will check if the req is installed, and whether we should upgrade + or reinstall it, taking into account all the relevant user options. + + After calling this req_to_install will only have satisfied_by set to + None if the req_to_install is to be upgraded/reinstalled etc. Any + other value will be a dist recording the current thing installed that + satisfies the requirement. + + Note that for vcs urls and the like we can't assess skipping in this + routine - we simply identify that we need to pull the thing down, + then later on it is pulled down and introspected to assess upgrade/ + reinstalls etc. + + :return: A text reason for why it was skipped, or None. + """ + if self.ignore_installed: + return None + + req_to_install.check_if_exists(self.use_user_site) + if not req_to_install.satisfied_by: + return None + + if self.force_reinstall: + self._set_req_to_reinstall(req_to_install) + return None + + if not self._is_upgrade_allowed(req_to_install): + if self.upgrade_strategy == "only-if-needed": + return "already satisfied, skipping upgrade" + return "already satisfied" + + # Check for the possibility of an upgrade. For link-based + # requirements we have to pull the tree down and inspect to assess + # the version #, so it's handled way down. + if not req_to_install.link: + try: + self.finder.find_requirement(req_to_install, upgrade=True) + except BestVersionAlreadyInstalled: + # Then the best version is installed. + return "already up-to-date" + except DistributionNotFound: + # No distribution found, so we squash the error. It will + # be raised later when we re-try later to do the install. + # Why don't we just raise here? + pass + + self._set_req_to_reinstall(req_to_install) + return None + + def _find_requirement_link(self, req: InstallRequirement) -> Optional[Link]: + upgrade = self._is_upgrade_allowed(req) + best_candidate = self.finder.find_requirement(req, upgrade) + if not best_candidate: + return None + + # Log a warning per PEP 592 if necessary before returning. + link = best_candidate.link + if link.is_yanked: + reason = link.yanked_reason or "" + msg = ( + # Mark this as a unicode string to prevent + # "UnicodeEncodeError: 'ascii' codec can't encode character" + # in Python 2 when the reason contains non-ascii characters. + "The candidate selected for download or install is a " + f"yanked version: {best_candidate}\n" + f"Reason for being yanked: {reason}" + ) + logger.warning(msg) + + return link + + def _populate_link(self, req: InstallRequirement) -> None: + """Ensure that if a link can be found for this, that it is found. + + Note that req.link may still be None - if the requirement is already + installed and not needed to be upgraded based on the return value of + _is_upgrade_allowed(). + + If preparer.require_hashes is True, don't use the wheel cache, because + cached wheels, always built locally, have different hashes than the + files downloaded from the index server and thus throw false hash + mismatches. Furthermore, cached wheels at present have undeterministic + contents due to file modification times. + """ + if req.link is None: + req.link = self._find_requirement_link(req) + + if self.wheel_cache is None or self.preparer.require_hashes: + return + + assert req.link is not None, "_find_requirement_link unexpectedly returned None" + cache_entry = self.wheel_cache.get_cache_entry( + link=req.link, + package_name=req.name, + supported_tags=get_supported(), + ) + if cache_entry is not None: + logger.debug("Using cached wheel link: %s", cache_entry.link) + if req.link is req.original_link and cache_entry.persistent: + req.cached_wheel_source_link = req.link + if cache_entry.origin is not None: + req.download_info = cache_entry.origin + else: + # Legacy cache entry that does not have origin.json. + # download_info may miss the archive_info.hashes field. + req.download_info = direct_url_from_link( + req.link, link_is_in_wheel_cache=cache_entry.persistent + ) + req.link = cache_entry.link + + def _get_dist_for(self, req: InstallRequirement) -> BaseDistribution: + """Takes a InstallRequirement and returns a single AbstractDist \ + representing a prepared variant of the same. + """ + if req.editable: + return self.preparer.prepare_editable_requirement(req) + + # satisfied_by is only evaluated by calling _check_skip_installed, + # so it must be None here. + assert req.satisfied_by is None + skip_reason = self._check_skip_installed(req) + + if req.satisfied_by: + return self.preparer.prepare_installed_requirement(req, skip_reason) + + # We eagerly populate the link, since that's our "legacy" behavior. + self._populate_link(req) + dist = self.preparer.prepare_linked_requirement(req) + + # NOTE + # The following portion is for determining if a certain package is + # going to be re-installed/upgraded or not and reporting to the user. + # This should probably get cleaned up in a future refactor. + + # req.req is only avail after unpack for URL + # pkgs repeat check_if_exists to uninstall-on-upgrade + # (#14) + if not self.ignore_installed: + req.check_if_exists(self.use_user_site) + + if req.satisfied_by: + should_modify = ( + self.upgrade_strategy != "to-satisfy-only" + or self.force_reinstall + or self.ignore_installed + or req.link.scheme == "file" + ) + if should_modify: + self._set_req_to_reinstall(req) + else: + logger.info( + "Requirement already satisfied (use --upgrade to upgrade): %s", + req, + ) + return dist + + def _resolve_one( + self, + requirement_set: RequirementSet, + req_to_install: InstallRequirement, + ) -> List[InstallRequirement]: + """Prepare a single requirements file. + + :return: A list of additional InstallRequirements to also install. + """ + # Tell user what we are doing for this requirement: + # obtain (editable), skipping, processing (local url), collecting + # (remote url or package name) + if req_to_install.constraint or req_to_install.prepared: + return [] + + req_to_install.prepared = True + + # Parse and return dependencies + dist = self._get_dist_for(req_to_install) + # This will raise UnsupportedPythonVersion if the given Python + # version isn't compatible with the distribution's Requires-Python. + _check_dist_requires_python( + dist, + version_info=self._py_version_info, + ignore_requires_python=self.ignore_requires_python, + ) + + more_reqs: List[InstallRequirement] = [] + + def add_req(subreq: Requirement, extras_requested: Iterable[str]) -> None: + # This idiosyncratically converts the Requirement to str and let + # make_install_req then parse it again into Requirement. But this is + # the legacy resolver so I'm just not going to bother refactoring. + sub_install_req = self._make_install_req(str(subreq), req_to_install) + parent_req_name = req_to_install.name + to_scan_again, add_to_parent = self._add_requirement_to_set( + requirement_set, + sub_install_req, + parent_req_name=parent_req_name, + extras_requested=extras_requested, + ) + if parent_req_name and add_to_parent: + self._discovered_dependencies[parent_req_name].append(add_to_parent) + more_reqs.extend(to_scan_again) + + with indent_log(): + # We add req_to_install before its dependencies, so that we + # can refer to it when adding dependencies. + assert req_to_install.name is not None + if not requirement_set.has_requirement(req_to_install.name): + # 'unnamed' requirements will get added here + # 'unnamed' requirements can only come from being directly + # provided by the user. + assert req_to_install.user_supplied + self._add_requirement_to_set( + requirement_set, req_to_install, parent_req_name=None + ) + + if not self.ignore_dependencies: + if req_to_install.extras: + logger.debug( + "Installing extra requirements: %r", + ",".join(req_to_install.extras), + ) + missing_requested = sorted( + set(req_to_install.extras) - set(dist.iter_provided_extras()) + ) + for missing in missing_requested: + logger.warning( + "%s %s does not provide the extra '%s'", + dist.raw_name, + dist.version, + missing, + ) + + available_requested = sorted( + set(dist.iter_provided_extras()) & set(req_to_install.extras) + ) + for subreq in dist.iter_dependencies(available_requested): + add_req(subreq, extras_requested=available_requested) + + return more_reqs + + def get_installation_order( + self, req_set: RequirementSet + ) -> List[InstallRequirement]: + """Create the installation order. + + The installation order is topological - requirements are installed + before the requiring thing. We break cycles at an arbitrary point, + and make no other guarantees. + """ + # The current implementation, which we may change at any point + # installs the user specified things in the order given, except when + # dependencies must come earlier to achieve topological order. + order = [] + ordered_reqs: Set[InstallRequirement] = set() + + def schedule(req: InstallRequirement) -> None: + if req.satisfied_by or req in ordered_reqs: + return + if req.constraint: + return + ordered_reqs.add(req) + for dep in self._discovered_dependencies[req.name]: + schedule(dep) + order.append(req) + + for install_req in req_set.requirements.values(): + schedule(install_req) + return order diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..654ed95e80c9b3510f35f4c9e5b0605e0c8577f4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cf8e6860814ea237d56a026c2b082d117266ae96 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f44a39621f701a8cfa24a7a2443b5c38e55a3fa7 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7cca8b159270552b0d01ca58826905f8a63abf62 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7e3a9f1497488ed3a1557c95d48846964c0030b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ae2c9194e85b76ba42f8465f3682d5d9137a106 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fc027348386b8fe96ca094544ba71db922d042b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ebb53d1903d35f8c41f7c94f0d01859fb48f990a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67bc5ce8b747370cc33f368f126afc755dfbf539 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py new file mode 100644 index 0000000000000000000000000000000000000000..0f31dc9b3073ecf2a9ae234b752e33c8caf5798a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py @@ -0,0 +1,139 @@ +from dataclasses import dataclass +from typing import FrozenSet, Iterable, Optional, Tuple + +from pip._vendor.packaging.specifiers import SpecifierSet +from pip._vendor.packaging.utils import NormalizedName +from pip._vendor.packaging.version import Version + +from pip._internal.models.link import Link, links_equivalent +from pip._internal.req.req_install import InstallRequirement +from pip._internal.utils.hashes import Hashes + +CandidateLookup = Tuple[Optional["Candidate"], Optional[InstallRequirement]] + + +def format_name(project: NormalizedName, extras: FrozenSet[NormalizedName]) -> str: + if not extras: + return project + extras_expr = ",".join(sorted(extras)) + return f"{project}[{extras_expr}]" + + +@dataclass(frozen=True) +class Constraint: + specifier: SpecifierSet + hashes: Hashes + links: FrozenSet[Link] + + @classmethod + def empty(cls) -> "Constraint": + return Constraint(SpecifierSet(), Hashes(), frozenset()) + + @classmethod + def from_ireq(cls, ireq: InstallRequirement) -> "Constraint": + links = frozenset([ireq.link]) if ireq.link else frozenset() + return Constraint(ireq.specifier, ireq.hashes(trust_internet=False), links) + + def __bool__(self) -> bool: + return bool(self.specifier) or bool(self.hashes) or bool(self.links) + + def __and__(self, other: InstallRequirement) -> "Constraint": + if not isinstance(other, InstallRequirement): + return NotImplemented + specifier = self.specifier & other.specifier + hashes = self.hashes & other.hashes(trust_internet=False) + links = self.links + if other.link: + links = links.union([other.link]) + return Constraint(specifier, hashes, links) + + def is_satisfied_by(self, candidate: "Candidate") -> bool: + # Reject if there are any mismatched URL constraints on this package. + if self.links and not all(_match_link(link, candidate) for link in self.links): + return False + # We can safely always allow prereleases here since PackageFinder + # already implements the prerelease logic, and would have filtered out + # prerelease candidates if the user does not expect them. + return self.specifier.contains(candidate.version, prereleases=True) + + +class Requirement: + @property + def project_name(self) -> NormalizedName: + """The "project name" of a requirement. + + This is different from ``name`` if this requirement contains extras, + in which case ``name`` would contain the ``[...]`` part, while this + refers to the name of the project. + """ + raise NotImplementedError("Subclass should override") + + @property + def name(self) -> str: + """The name identifying this requirement in the resolver. + + This is different from ``project_name`` if this requirement contains + extras, where ``project_name`` would not contain the ``[...]`` part. + """ + raise NotImplementedError("Subclass should override") + + def is_satisfied_by(self, candidate: "Candidate") -> bool: + return False + + def get_candidate_lookup(self) -> CandidateLookup: + raise NotImplementedError("Subclass should override") + + def format_for_error(self) -> str: + raise NotImplementedError("Subclass should override") + + +def _match_link(link: Link, candidate: "Candidate") -> bool: + if candidate.source_link: + return links_equivalent(link, candidate.source_link) + return False + + +class Candidate: + @property + def project_name(self) -> NormalizedName: + """The "project name" of the candidate. + + This is different from ``name`` if this candidate contains extras, + in which case ``name`` would contain the ``[...]`` part, while this + refers to the name of the project. + """ + raise NotImplementedError("Override in subclass") + + @property + def name(self) -> str: + """The name identifying this candidate in the resolver. + + This is different from ``project_name`` if this candidate contains + extras, where ``project_name`` would not contain the ``[...]`` part. + """ + raise NotImplementedError("Override in subclass") + + @property + def version(self) -> Version: + raise NotImplementedError("Override in subclass") + + @property + def is_installed(self) -> bool: + raise NotImplementedError("Override in subclass") + + @property + def is_editable(self) -> bool: + raise NotImplementedError("Override in subclass") + + @property + def source_link(self) -> Optional[Link]: + raise NotImplementedError("Override in subclass") + + def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: + raise NotImplementedError("Override in subclass") + + def get_install_requirement(self) -> Optional[InstallRequirement]: + raise NotImplementedError("Override in subclass") + + def format_for_error(self) -> str: + raise NotImplementedError("Subclass should override") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py new file mode 100644 index 0000000000000000000000000000000000000000..6617644fe5316cb739050cc2266a5c015f9279e3 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py @@ -0,0 +1,574 @@ +import logging +import sys +from typing import TYPE_CHECKING, Any, FrozenSet, Iterable, Optional, Tuple, Union, cast + +from pip._vendor.packaging.requirements import InvalidRequirement +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +from pip._vendor.packaging.version import Version + +from pip._internal.exceptions import ( + HashError, + InstallationSubprocessError, + InvalidInstalledPackage, + MetadataInconsistent, + MetadataInvalid, +) +from pip._internal.metadata import BaseDistribution +from pip._internal.models.link import Link, links_equivalent +from pip._internal.models.wheel import Wheel +from pip._internal.req.constructors import ( + install_req_from_editable, + install_req_from_line, +) +from pip._internal.req.req_install import InstallRequirement +from pip._internal.utils.direct_url_helpers import direct_url_from_link +from pip._internal.utils.misc import normalize_version_info + +from .base import Candidate, Requirement, format_name + +if TYPE_CHECKING: + from .factory import Factory + +logger = logging.getLogger(__name__) + +BaseCandidate = Union[ + "AlreadyInstalledCandidate", + "EditableCandidate", + "LinkCandidate", +] + +# Avoid conflicting with the PyPI package "Python". +REQUIRES_PYTHON_IDENTIFIER = cast(NormalizedName, "") + + +def as_base_candidate(candidate: Candidate) -> Optional[BaseCandidate]: + """The runtime version of BaseCandidate.""" + base_candidate_classes = ( + AlreadyInstalledCandidate, + EditableCandidate, + LinkCandidate, + ) + if isinstance(candidate, base_candidate_classes): + return candidate + return None + + +def make_install_req_from_link( + link: Link, template: InstallRequirement +) -> InstallRequirement: + assert not template.editable, "template is editable" + if template.req: + line = str(template.req) + else: + line = link.url + ireq = install_req_from_line( + line, + user_supplied=template.user_supplied, + comes_from=template.comes_from, + use_pep517=template.use_pep517, + isolated=template.isolated, + constraint=template.constraint, + global_options=template.global_options, + hash_options=template.hash_options, + config_settings=template.config_settings, + ) + ireq.original_link = template.original_link + ireq.link = link + ireq.extras = template.extras + return ireq + + +def make_install_req_from_editable( + link: Link, template: InstallRequirement +) -> InstallRequirement: + assert template.editable, "template not editable" + ireq = install_req_from_editable( + link.url, + user_supplied=template.user_supplied, + comes_from=template.comes_from, + use_pep517=template.use_pep517, + isolated=template.isolated, + constraint=template.constraint, + permit_editable_wheels=template.permit_editable_wheels, + global_options=template.global_options, + hash_options=template.hash_options, + config_settings=template.config_settings, + ) + ireq.extras = template.extras + return ireq + + +def _make_install_req_from_dist( + dist: BaseDistribution, template: InstallRequirement +) -> InstallRequirement: + if template.req: + line = str(template.req) + elif template.link: + line = f"{dist.canonical_name} @ {template.link.url}" + else: + line = f"{dist.canonical_name}=={dist.version}" + ireq = install_req_from_line( + line, + user_supplied=template.user_supplied, + comes_from=template.comes_from, + use_pep517=template.use_pep517, + isolated=template.isolated, + constraint=template.constraint, + global_options=template.global_options, + hash_options=template.hash_options, + config_settings=template.config_settings, + ) + ireq.satisfied_by = dist + return ireq + + +class _InstallRequirementBackedCandidate(Candidate): + """A candidate backed by an ``InstallRequirement``. + + This represents a package request with the target not being already + in the environment, and needs to be fetched and installed. The backing + ``InstallRequirement`` is responsible for most of the leg work; this + class exposes appropriate information to the resolver. + + :param link: The link passed to the ``InstallRequirement``. The backing + ``InstallRequirement`` will use this link to fetch the distribution. + :param source_link: The link this candidate "originates" from. This is + different from ``link`` when the link is found in the wheel cache. + ``link`` would point to the wheel cache, while this points to the + found remote link (e.g. from pypi.org). + """ + + dist: BaseDistribution + is_installed = False + + def __init__( + self, + link: Link, + source_link: Link, + ireq: InstallRequirement, + factory: "Factory", + name: Optional[NormalizedName] = None, + version: Optional[Version] = None, + ) -> None: + self._link = link + self._source_link = source_link + self._factory = factory + self._ireq = ireq + self._name = name + self._version = version + self.dist = self._prepare() + self._hash: Optional[int] = None + + def __str__(self) -> str: + return f"{self.name} {self.version}" + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({str(self._link)!r})" + + def __hash__(self) -> int: + if self._hash is not None: + return self._hash + + self._hash = hash((self.__class__, self._link)) + return self._hash + + def __eq__(self, other: Any) -> bool: + if isinstance(other, self.__class__): + return links_equivalent(self._link, other._link) + return False + + @property + def source_link(self) -> Optional[Link]: + return self._source_link + + @property + def project_name(self) -> NormalizedName: + """The normalised name of the project the candidate refers to""" + if self._name is None: + self._name = self.dist.canonical_name + return self._name + + @property + def name(self) -> str: + return self.project_name + + @property + def version(self) -> Version: + if self._version is None: + self._version = self.dist.version + return self._version + + def format_for_error(self) -> str: + return ( + f"{self.name} {self.version} " + f"(from {self._link.file_path if self._link.is_file else self._link})" + ) + + def _prepare_distribution(self) -> BaseDistribution: + raise NotImplementedError("Override in subclass") + + def _check_metadata_consistency(self, dist: BaseDistribution) -> None: + """Check for consistency of project name and version of dist.""" + if self._name is not None and self._name != dist.canonical_name: + raise MetadataInconsistent( + self._ireq, + "name", + self._name, + dist.canonical_name, + ) + if self._version is not None and self._version != dist.version: + raise MetadataInconsistent( + self._ireq, + "version", + str(self._version), + str(dist.version), + ) + # check dependencies are valid + # TODO performance: this means we iterate the dependencies at least twice, + # we may want to cache parsed Requires-Dist + try: + list(dist.iter_dependencies(list(dist.iter_provided_extras()))) + except InvalidRequirement as e: + raise MetadataInvalid(self._ireq, str(e)) + + def _prepare(self) -> BaseDistribution: + try: + dist = self._prepare_distribution() + except HashError as e: + # Provide HashError the underlying ireq that caused it. This + # provides context for the resulting error message to show the + # offending line to the user. + e.req = self._ireq + raise + except InstallationSubprocessError as exc: + # The output has been presented already, so don't duplicate it. + exc.context = "See above for output." + raise + + self._check_metadata_consistency(dist) + return dist + + def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: + requires = self.dist.iter_dependencies() if with_requires else () + for r in requires: + yield from self._factory.make_requirements_from_spec(str(r), self._ireq) + yield self._factory.make_requires_python_requirement(self.dist.requires_python) + + def get_install_requirement(self) -> Optional[InstallRequirement]: + return self._ireq + + +class LinkCandidate(_InstallRequirementBackedCandidate): + is_editable = False + + def __init__( + self, + link: Link, + template: InstallRequirement, + factory: "Factory", + name: Optional[NormalizedName] = None, + version: Optional[Version] = None, + ) -> None: + source_link = link + cache_entry = factory.get_wheel_cache_entry(source_link, name) + if cache_entry is not None: + logger.debug("Using cached wheel link: %s", cache_entry.link) + link = cache_entry.link + ireq = make_install_req_from_link(link, template) + assert ireq.link == link + if ireq.link.is_wheel and not ireq.link.is_file: + wheel = Wheel(ireq.link.filename) + wheel_name = canonicalize_name(wheel.name) + assert name == wheel_name, f"{name!r} != {wheel_name!r} for wheel" + # Version may not be present for PEP 508 direct URLs + if version is not None: + wheel_version = Version(wheel.version) + assert ( + version == wheel_version + ), f"{version!r} != {wheel_version!r} for wheel {name}" + + if cache_entry is not None: + assert ireq.link.is_wheel + assert ireq.link.is_file + if cache_entry.persistent and template.link is template.original_link: + ireq.cached_wheel_source_link = source_link + if cache_entry.origin is not None: + ireq.download_info = cache_entry.origin + else: + # Legacy cache entry that does not have origin.json. + # download_info may miss the archive_info.hashes field. + ireq.download_info = direct_url_from_link( + source_link, link_is_in_wheel_cache=cache_entry.persistent + ) + + super().__init__( + link=link, + source_link=source_link, + ireq=ireq, + factory=factory, + name=name, + version=version, + ) + + def _prepare_distribution(self) -> BaseDistribution: + preparer = self._factory.preparer + return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) + + +class EditableCandidate(_InstallRequirementBackedCandidate): + is_editable = True + + def __init__( + self, + link: Link, + template: InstallRequirement, + factory: "Factory", + name: Optional[NormalizedName] = None, + version: Optional[Version] = None, + ) -> None: + super().__init__( + link=link, + source_link=link, + ireq=make_install_req_from_editable(link, template), + factory=factory, + name=name, + version=version, + ) + + def _prepare_distribution(self) -> BaseDistribution: + return self._factory.preparer.prepare_editable_requirement(self._ireq) + + +class AlreadyInstalledCandidate(Candidate): + is_installed = True + source_link = None + + def __init__( + self, + dist: BaseDistribution, + template: InstallRequirement, + factory: "Factory", + ) -> None: + self.dist = dist + self._ireq = _make_install_req_from_dist(dist, template) + self._factory = factory + self._version = None + + # This is just logging some messages, so we can do it eagerly. + # The returned dist would be exactly the same as self.dist because we + # set satisfied_by in _make_install_req_from_dist. + # TODO: Supply reason based on force_reinstall and upgrade_strategy. + skip_reason = "already satisfied" + factory.preparer.prepare_installed_requirement(self._ireq, skip_reason) + + def __str__(self) -> str: + return str(self.dist) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({self.dist!r})" + + def __eq__(self, other: object) -> bool: + if not isinstance(other, AlreadyInstalledCandidate): + return NotImplemented + return self.name == other.name and self.version == other.version + + def __hash__(self) -> int: + return hash((self.name, self.version)) + + @property + def project_name(self) -> NormalizedName: + return self.dist.canonical_name + + @property + def name(self) -> str: + return self.project_name + + @property + def version(self) -> Version: + if self._version is None: + self._version = self.dist.version + return self._version + + @property + def is_editable(self) -> bool: + return self.dist.editable + + def format_for_error(self) -> str: + return f"{self.name} {self.version} (Installed)" + + def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: + if not with_requires: + return + + try: + for r in self.dist.iter_dependencies(): + yield from self._factory.make_requirements_from_spec(str(r), self._ireq) + except InvalidRequirement as exc: + raise InvalidInstalledPackage(dist=self.dist, invalid_exc=exc) from None + + def get_install_requirement(self) -> Optional[InstallRequirement]: + return None + + +class ExtrasCandidate(Candidate): + """A candidate that has 'extras', indicating additional dependencies. + + Requirements can be for a project with dependencies, something like + foo[extra]. The extras don't affect the project/version being installed + directly, but indicate that we need additional dependencies. We model that + by having an artificial ExtrasCandidate that wraps the "base" candidate. + + The ExtrasCandidate differs from the base in the following ways: + + 1. It has a unique name, of the form foo[extra]. This causes the resolver + to treat it as a separate node in the dependency graph. + 2. When we're getting the candidate's dependencies, + a) We specify that we want the extra dependencies as well. + b) We add a dependency on the base candidate. + See below for why this is needed. + 3. We return None for the underlying InstallRequirement, as the base + candidate will provide it, and we don't want to end up with duplicates. + + The dependency on the base candidate is needed so that the resolver can't + decide that it should recommend foo[extra1] version 1.0 and foo[extra2] + version 2.0. Having those candidates depend on foo=1.0 and foo=2.0 + respectively forces the resolver to recognise that this is a conflict. + """ + + def __init__( + self, + base: BaseCandidate, + extras: FrozenSet[str], + *, + comes_from: Optional[InstallRequirement] = None, + ) -> None: + """ + :param comes_from: the InstallRequirement that led to this candidate if it + differs from the base's InstallRequirement. This will often be the + case in the sense that this candidate's requirement has the extras + while the base's does not. Unlike the InstallRequirement backed + candidates, this requirement is used solely for reporting purposes, + it does not do any leg work. + """ + self.base = base + self.extras = frozenset(canonicalize_name(e) for e in extras) + self._comes_from = comes_from if comes_from is not None else self.base._ireq + + def __str__(self) -> str: + name, rest = str(self.base).split(" ", 1) + return "{}[{}] {}".format(name, ",".join(self.extras), rest) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(base={self.base!r}, extras={self.extras!r})" + + def __hash__(self) -> int: + return hash((self.base, self.extras)) + + def __eq__(self, other: Any) -> bool: + if isinstance(other, self.__class__): + return self.base == other.base and self.extras == other.extras + return False + + @property + def project_name(self) -> NormalizedName: + return self.base.project_name + + @property + def name(self) -> str: + """The normalised name of the project the candidate refers to""" + return format_name(self.base.project_name, self.extras) + + @property + def version(self) -> Version: + return self.base.version + + def format_for_error(self) -> str: + return "{} [{}]".format( + self.base.format_for_error(), ", ".join(sorted(self.extras)) + ) + + @property + def is_installed(self) -> bool: + return self.base.is_installed + + @property + def is_editable(self) -> bool: + return self.base.is_editable + + @property + def source_link(self) -> Optional[Link]: + return self.base.source_link + + def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: + factory = self.base._factory + + # Add a dependency on the exact base + # (See note 2b in the class docstring) + yield factory.make_requirement_from_candidate(self.base) + if not with_requires: + return + + # The user may have specified extras that the candidate doesn't + # support. We ignore any unsupported extras here. + valid_extras = self.extras.intersection(self.base.dist.iter_provided_extras()) + invalid_extras = self.extras.difference(self.base.dist.iter_provided_extras()) + for extra in sorted(invalid_extras): + logger.warning( + "%s %s does not provide the extra '%s'", + self.base.name, + self.version, + extra, + ) + + for r in self.base.dist.iter_dependencies(valid_extras): + yield from factory.make_requirements_from_spec( + str(r), + self._comes_from, + valid_extras, + ) + + def get_install_requirement(self) -> Optional[InstallRequirement]: + # We don't return anything here, because we always + # depend on the base candidate, and we'll get the + # install requirement from that. + return None + + +class RequiresPythonCandidate(Candidate): + is_installed = False + source_link = None + + def __init__(self, py_version_info: Optional[Tuple[int, ...]]) -> None: + if py_version_info is not None: + version_info = normalize_version_info(py_version_info) + else: + version_info = sys.version_info[:3] + self._version = Version(".".join(str(c) for c in version_info)) + + # We don't need to implement __eq__() and __ne__() since there is always + # only one RequiresPythonCandidate in a resolution, i.e. the host Python. + # The built-in object.__eq__() and object.__ne__() do exactly what we want. + + def __str__(self) -> str: + return f"Python {self._version}" + + @property + def project_name(self) -> NormalizedName: + return REQUIRES_PYTHON_IDENTIFIER + + @property + def name(self) -> str: + return REQUIRES_PYTHON_IDENTIFIER + + @property + def version(self) -> Version: + return self._version + + def format_for_error(self) -> str: + return f"Python {self.version}" + + def iter_dependencies(self, with_requires: bool) -> Iterable[Optional[Requirement]]: + return () + + def get_install_requirement(self) -> Optional[InstallRequirement]: + return None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py new file mode 100644 index 0000000000000000000000000000000000000000..6c273eb88dbc6b2de39b6f444991f3781834854b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py @@ -0,0 +1,823 @@ +import contextlib +import functools +import logging +from typing import ( + TYPE_CHECKING, + Callable, + Dict, + FrozenSet, + Iterable, + Iterator, + List, + Mapping, + NamedTuple, + Optional, + Protocol, + Sequence, + Set, + Tuple, + TypeVar, + cast, +) + +from pip._vendor.packaging.requirements import InvalidRequirement +from pip._vendor.packaging.specifiers import SpecifierSet +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name +from pip._vendor.packaging.version import InvalidVersion, Version +from pip._vendor.resolvelib import ResolutionImpossible + +from pip._internal.cache import CacheEntry, WheelCache +from pip._internal.exceptions import ( + DistributionNotFound, + InstallationError, + InvalidInstalledPackage, + MetadataInconsistent, + MetadataInvalid, + UnsupportedPythonVersion, + UnsupportedWheel, +) +from pip._internal.index.package_finder import PackageFinder +from pip._internal.metadata import BaseDistribution, get_default_environment +from pip._internal.models.link import Link +from pip._internal.models.wheel import Wheel +from pip._internal.operations.prepare import RequirementPreparer +from pip._internal.req.constructors import ( + install_req_drop_extras, + install_req_from_link_and_ireq, +) +from pip._internal.req.req_install import ( + InstallRequirement, + check_invalid_constraint_type, +) +from pip._internal.resolution.base import InstallRequirementProvider +from pip._internal.utils.compatibility_tags import get_supported +from pip._internal.utils.hashes import Hashes +from pip._internal.utils.packaging import get_requirement +from pip._internal.utils.virtualenv import running_under_virtualenv + +from .base import Candidate, Constraint, Requirement +from .candidates import ( + AlreadyInstalledCandidate, + BaseCandidate, + EditableCandidate, + ExtrasCandidate, + LinkCandidate, + RequiresPythonCandidate, + as_base_candidate, +) +from .found_candidates import FoundCandidates, IndexCandidateInfo +from .requirements import ( + ExplicitRequirement, + RequiresPythonRequirement, + SpecifierRequirement, + SpecifierWithoutExtrasRequirement, + UnsatisfiableRequirement, +) + +if TYPE_CHECKING: + + class ConflictCause(Protocol): + requirement: RequiresPythonRequirement + parent: Candidate + + +logger = logging.getLogger(__name__) + +C = TypeVar("C") +Cache = Dict[Link, C] + + +class CollectedRootRequirements(NamedTuple): + requirements: List[Requirement] + constraints: Dict[str, Constraint] + user_requested: Dict[str, int] + + +class Factory: + def __init__( + self, + finder: PackageFinder, + preparer: RequirementPreparer, + make_install_req: InstallRequirementProvider, + wheel_cache: Optional[WheelCache], + use_user_site: bool, + force_reinstall: bool, + ignore_installed: bool, + ignore_requires_python: bool, + py_version_info: Optional[Tuple[int, ...]] = None, + ) -> None: + self._finder = finder + self.preparer = preparer + self._wheel_cache = wheel_cache + self._python_candidate = RequiresPythonCandidate(py_version_info) + self._make_install_req_from_spec = make_install_req + self._use_user_site = use_user_site + self._force_reinstall = force_reinstall + self._ignore_requires_python = ignore_requires_python + + self._build_failures: Cache[InstallationError] = {} + self._link_candidate_cache: Cache[LinkCandidate] = {} + self._editable_candidate_cache: Cache[EditableCandidate] = {} + self._installed_candidate_cache: Dict[str, AlreadyInstalledCandidate] = {} + self._extras_candidate_cache: Dict[ + Tuple[int, FrozenSet[NormalizedName]], ExtrasCandidate + ] = {} + self._supported_tags_cache = get_supported() + + if not ignore_installed: + env = get_default_environment() + self._installed_dists = { + dist.canonical_name: dist + for dist in env.iter_installed_distributions(local_only=False) + } + else: + self._installed_dists = {} + + @property + def force_reinstall(self) -> bool: + return self._force_reinstall + + def _fail_if_link_is_unsupported_wheel(self, link: Link) -> None: + if not link.is_wheel: + return + wheel = Wheel(link.filename) + if wheel.supported(self._finder.target_python.get_unsorted_tags()): + return + msg = f"{link.filename} is not a supported wheel on this platform." + raise UnsupportedWheel(msg) + + def _make_extras_candidate( + self, + base: BaseCandidate, + extras: FrozenSet[str], + *, + comes_from: Optional[InstallRequirement] = None, + ) -> ExtrasCandidate: + cache_key = (id(base), frozenset(canonicalize_name(e) for e in extras)) + try: + candidate = self._extras_candidate_cache[cache_key] + except KeyError: + candidate = ExtrasCandidate(base, extras, comes_from=comes_from) + self._extras_candidate_cache[cache_key] = candidate + return candidate + + def _make_candidate_from_dist( + self, + dist: BaseDistribution, + extras: FrozenSet[str], + template: InstallRequirement, + ) -> Candidate: + try: + base = self._installed_candidate_cache[dist.canonical_name] + except KeyError: + base = AlreadyInstalledCandidate(dist, template, factory=self) + self._installed_candidate_cache[dist.canonical_name] = base + if not extras: + return base + return self._make_extras_candidate(base, extras, comes_from=template) + + def _make_candidate_from_link( + self, + link: Link, + extras: FrozenSet[str], + template: InstallRequirement, + name: Optional[NormalizedName], + version: Optional[Version], + ) -> Optional[Candidate]: + base: Optional[BaseCandidate] = self._make_base_candidate_from_link( + link, template, name, version + ) + if not extras or base is None: + return base + return self._make_extras_candidate(base, extras, comes_from=template) + + def _make_base_candidate_from_link( + self, + link: Link, + template: InstallRequirement, + name: Optional[NormalizedName], + version: Optional[Version], + ) -> Optional[BaseCandidate]: + # TODO: Check already installed candidate, and use it if the link and + # editable flag match. + + if link in self._build_failures: + # We already tried this candidate before, and it does not build. + # Don't bother trying again. + return None + + if template.editable: + if link not in self._editable_candidate_cache: + try: + self._editable_candidate_cache[link] = EditableCandidate( + link, + template, + factory=self, + name=name, + version=version, + ) + except (MetadataInconsistent, MetadataInvalid) as e: + logger.info( + "Discarding [blue underline]%s[/]: [yellow]%s[reset]", + link, + e, + extra={"markup": True}, + ) + self._build_failures[link] = e + return None + + return self._editable_candidate_cache[link] + else: + if link not in self._link_candidate_cache: + try: + self._link_candidate_cache[link] = LinkCandidate( + link, + template, + factory=self, + name=name, + version=version, + ) + except MetadataInconsistent as e: + logger.info( + "Discarding [blue underline]%s[/]: [yellow]%s[reset]", + link, + e, + extra={"markup": True}, + ) + self._build_failures[link] = e + return None + return self._link_candidate_cache[link] + + def _iter_found_candidates( + self, + ireqs: Sequence[InstallRequirement], + specifier: SpecifierSet, + hashes: Hashes, + prefers_installed: bool, + incompatible_ids: Set[int], + ) -> Iterable[Candidate]: + if not ireqs: + return () + + # The InstallRequirement implementation requires us to give it a + # "template". Here we just choose the first requirement to represent + # all of them. + # Hopefully the Project model can correct this mismatch in the future. + template = ireqs[0] + assert template.req, "Candidates found on index must be PEP 508" + name = canonicalize_name(template.req.name) + + extras: FrozenSet[str] = frozenset() + for ireq in ireqs: + assert ireq.req, "Candidates found on index must be PEP 508" + specifier &= ireq.req.specifier + hashes &= ireq.hashes(trust_internet=False) + extras |= frozenset(ireq.extras) + + def _get_installed_candidate() -> Optional[Candidate]: + """Get the candidate for the currently-installed version.""" + # If --force-reinstall is set, we want the version from the index + # instead, so we "pretend" there is nothing installed. + if self._force_reinstall: + return None + try: + installed_dist = self._installed_dists[name] + except KeyError: + return None + + try: + # Don't use the installed distribution if its version + # does not fit the current dependency graph. + if not specifier.contains(installed_dist.version, prereleases=True): + return None + except InvalidVersion as e: + raise InvalidInstalledPackage(dist=installed_dist, invalid_exc=e) + + candidate = self._make_candidate_from_dist( + dist=installed_dist, + extras=extras, + template=template, + ) + # The candidate is a known incompatibility. Don't use it. + if id(candidate) in incompatible_ids: + return None + return candidate + + def iter_index_candidate_infos() -> Iterator[IndexCandidateInfo]: + result = self._finder.find_best_candidate( + project_name=name, + specifier=specifier, + hashes=hashes, + ) + icans = result.applicable_candidates + + # PEP 592: Yanked releases are ignored unless the specifier + # explicitly pins a version (via '==' or '===') that can be + # solely satisfied by a yanked release. + all_yanked = all(ican.link.is_yanked for ican in icans) + + def is_pinned(specifier: SpecifierSet) -> bool: + for sp in specifier: + if sp.operator == "===": + return True + if sp.operator != "==": + continue + if sp.version.endswith(".*"): + continue + return True + return False + + pinned = is_pinned(specifier) + + # PackageFinder returns earlier versions first, so we reverse. + for ican in reversed(icans): + if not (all_yanked and pinned) and ican.link.is_yanked: + continue + func = functools.partial( + self._make_candidate_from_link, + link=ican.link, + extras=extras, + template=template, + name=name, + version=ican.version, + ) + yield ican.version, func + + return FoundCandidates( + iter_index_candidate_infos, + _get_installed_candidate(), + prefers_installed, + incompatible_ids, + ) + + def _iter_explicit_candidates_from_base( + self, + base_requirements: Iterable[Requirement], + extras: FrozenSet[str], + ) -> Iterator[Candidate]: + """Produce explicit candidates from the base given an extra-ed package. + + :param base_requirements: Requirements known to the resolver. The + requirements are guaranteed to not have extras. + :param extras: The extras to inject into the explicit requirements' + candidates. + """ + for req in base_requirements: + lookup_cand, _ = req.get_candidate_lookup() + if lookup_cand is None: # Not explicit. + continue + # We've stripped extras from the identifier, and should always + # get a BaseCandidate here, unless there's a bug elsewhere. + base_cand = as_base_candidate(lookup_cand) + assert base_cand is not None, "no extras here" + yield self._make_extras_candidate(base_cand, extras) + + def _iter_candidates_from_constraints( + self, + identifier: str, + constraint: Constraint, + template: InstallRequirement, + ) -> Iterator[Candidate]: + """Produce explicit candidates from constraints. + + This creates "fake" InstallRequirement objects that are basically clones + of what "should" be the template, but with original_link set to link. + """ + for link in constraint.links: + self._fail_if_link_is_unsupported_wheel(link) + candidate = self._make_base_candidate_from_link( + link, + template=install_req_from_link_and_ireq(link, template), + name=canonicalize_name(identifier), + version=None, + ) + if candidate: + yield candidate + + def find_candidates( + self, + identifier: str, + requirements: Mapping[str, Iterable[Requirement]], + incompatibilities: Mapping[str, Iterator[Candidate]], + constraint: Constraint, + prefers_installed: bool, + is_satisfied_by: Callable[[Requirement, Candidate], bool], + ) -> Iterable[Candidate]: + # Collect basic lookup information from the requirements. + explicit_candidates: Set[Candidate] = set() + ireqs: List[InstallRequirement] = [] + for req in requirements[identifier]: + cand, ireq = req.get_candidate_lookup() + if cand is not None: + explicit_candidates.add(cand) + if ireq is not None: + ireqs.append(ireq) + + # If the current identifier contains extras, add requires and explicit + # candidates from entries from extra-less identifier. + with contextlib.suppress(InvalidRequirement): + parsed_requirement = get_requirement(identifier) + if parsed_requirement.name != identifier: + explicit_candidates.update( + self._iter_explicit_candidates_from_base( + requirements.get(parsed_requirement.name, ()), + frozenset(parsed_requirement.extras), + ), + ) + for req in requirements.get(parsed_requirement.name, []): + _, ireq = req.get_candidate_lookup() + if ireq is not None: + ireqs.append(ireq) + + # Add explicit candidates from constraints. We only do this if there are + # known ireqs, which represent requirements not already explicit. If + # there are no ireqs, we're constraining already-explicit requirements, + # which is handled later when we return the explicit candidates. + if ireqs: + try: + explicit_candidates.update( + self._iter_candidates_from_constraints( + identifier, + constraint, + template=ireqs[0], + ), + ) + except UnsupportedWheel: + # If we're constrained to install a wheel incompatible with the + # target architecture, no candidates will ever be valid. + return () + + # Since we cache all the candidates, incompatibility identification + # can be made quicker by comparing only the id() values. + incompat_ids = {id(c) for c in incompatibilities.get(identifier, ())} + + # If none of the requirements want an explicit candidate, we can ask + # the finder for candidates. + if not explicit_candidates: + return self._iter_found_candidates( + ireqs, + constraint.specifier, + constraint.hashes, + prefers_installed, + incompat_ids, + ) + + return ( + c + for c in explicit_candidates + if id(c) not in incompat_ids + and constraint.is_satisfied_by(c) + and all(is_satisfied_by(req, c) for req in requirements[identifier]) + ) + + def _make_requirements_from_install_req( + self, ireq: InstallRequirement, requested_extras: Iterable[str] + ) -> Iterator[Requirement]: + """ + Returns requirement objects associated with the given InstallRequirement. In + most cases this will be a single object but the following special cases exist: + - the InstallRequirement has markers that do not apply -> result is empty + - the InstallRequirement has both a constraint (or link) and extras + -> result is split in two requirement objects: one with the constraint + (or link) and one with the extra. This allows centralized constraint + handling for the base, resulting in fewer candidate rejections. + """ + if not ireq.match_markers(requested_extras): + logger.info( + "Ignoring %s: markers '%s' don't match your environment", + ireq.name, + ireq.markers, + ) + elif not ireq.link: + if ireq.extras and ireq.req is not None and ireq.req.specifier: + yield SpecifierWithoutExtrasRequirement(ireq) + yield SpecifierRequirement(ireq) + else: + self._fail_if_link_is_unsupported_wheel(ireq.link) + # Always make the link candidate for the base requirement to make it + # available to `find_candidates` for explicit candidate lookup for any + # set of extras. + # The extras are required separately via a second requirement. + cand = self._make_base_candidate_from_link( + ireq.link, + template=install_req_drop_extras(ireq) if ireq.extras else ireq, + name=canonicalize_name(ireq.name) if ireq.name else None, + version=None, + ) + if cand is None: + # There's no way we can satisfy a URL requirement if the underlying + # candidate fails to build. An unnamed URL must be user-supplied, so + # we fail eagerly. If the URL is named, an unsatisfiable requirement + # can make the resolver do the right thing, either backtrack (and + # maybe find some other requirement that's buildable) or raise a + # ResolutionImpossible eventually. + if not ireq.name: + raise self._build_failures[ireq.link] + yield UnsatisfiableRequirement(canonicalize_name(ireq.name)) + else: + # require the base from the link + yield self.make_requirement_from_candidate(cand) + if ireq.extras: + # require the extras on top of the base candidate + yield self.make_requirement_from_candidate( + self._make_extras_candidate(cand, frozenset(ireq.extras)) + ) + + def collect_root_requirements( + self, root_ireqs: List[InstallRequirement] + ) -> CollectedRootRequirements: + collected = CollectedRootRequirements([], {}, {}) + for i, ireq in enumerate(root_ireqs): + if ireq.constraint: + # Ensure we only accept valid constraints + problem = check_invalid_constraint_type(ireq) + if problem: + raise InstallationError(problem) + if not ireq.match_markers(): + continue + assert ireq.name, "Constraint must be named" + name = canonicalize_name(ireq.name) + if name in collected.constraints: + collected.constraints[name] &= ireq + else: + collected.constraints[name] = Constraint.from_ireq(ireq) + else: + reqs = list( + self._make_requirements_from_install_req( + ireq, + requested_extras=(), + ) + ) + if not reqs: + continue + template = reqs[0] + if ireq.user_supplied and template.name not in collected.user_requested: + collected.user_requested[template.name] = i + collected.requirements.extend(reqs) + # Put requirements with extras at the end of the root requires. This does not + # affect resolvelib's picking preference but it does affect its initial criteria + # population: by putting extras at the end we enable the candidate finder to + # present resolvelib with a smaller set of candidates to resolvelib, already + # taking into account any non-transient constraints on the associated base. This + # means resolvelib will have fewer candidates to visit and reject. + # Python's list sort is stable, meaning relative order is kept for objects with + # the same key. + collected.requirements.sort(key=lambda r: r.name != r.project_name) + return collected + + def make_requirement_from_candidate( + self, candidate: Candidate + ) -> ExplicitRequirement: + return ExplicitRequirement(candidate) + + def make_requirements_from_spec( + self, + specifier: str, + comes_from: Optional[InstallRequirement], + requested_extras: Iterable[str] = (), + ) -> Iterator[Requirement]: + """ + Returns requirement objects associated with the given specifier. In most cases + this will be a single object but the following special cases exist: + - the specifier has markers that do not apply -> result is empty + - the specifier has both a constraint and extras -> result is split + in two requirement objects: one with the constraint and one with the + extra. This allows centralized constraint handling for the base, + resulting in fewer candidate rejections. + """ + ireq = self._make_install_req_from_spec(specifier, comes_from) + return self._make_requirements_from_install_req(ireq, requested_extras) + + def make_requires_python_requirement( + self, + specifier: SpecifierSet, + ) -> Optional[Requirement]: + if self._ignore_requires_python: + return None + # Don't bother creating a dependency for an empty Requires-Python. + if not str(specifier): + return None + return RequiresPythonRequirement(specifier, self._python_candidate) + + def get_wheel_cache_entry( + self, link: Link, name: Optional[str] + ) -> Optional[CacheEntry]: + """Look up the link in the wheel cache. + + If ``preparer.require_hashes`` is True, don't use the wheel cache, + because cached wheels, always built locally, have different hashes + than the files downloaded from the index server and thus throw false + hash mismatches. Furthermore, cached wheels at present have + nondeterministic contents due to file modification times. + """ + if self._wheel_cache is None: + return None + return self._wheel_cache.get_cache_entry( + link=link, + package_name=name, + supported_tags=self._supported_tags_cache, + ) + + def get_dist_to_uninstall(self, candidate: Candidate) -> Optional[BaseDistribution]: + # TODO: Are there more cases this needs to return True? Editable? + dist = self._installed_dists.get(candidate.project_name) + if dist is None: # Not installed, no uninstallation required. + return None + + # We're installing into global site. The current installation must + # be uninstalled, no matter it's in global or user site, because the + # user site installation has precedence over global. + if not self._use_user_site: + return dist + + # We're installing into user site. Remove the user site installation. + if dist.in_usersite: + return dist + + # We're installing into user site, but the installed incompatible + # package is in global site. We can't uninstall that, and would let + # the new user installation to "shadow" it. But shadowing won't work + # in virtual environments, so we error out. + if running_under_virtualenv() and dist.in_site_packages: + message = ( + f"Will not install to the user site because it will lack " + f"sys.path precedence to {dist.raw_name} in {dist.location}" + ) + raise InstallationError(message) + return None + + def _report_requires_python_error( + self, causes: Sequence["ConflictCause"] + ) -> UnsupportedPythonVersion: + assert causes, "Requires-Python error reported with no cause" + + version = self._python_candidate.version + + if len(causes) == 1: + specifier = str(causes[0].requirement.specifier) + message = ( + f"Package {causes[0].parent.name!r} requires a different " + f"Python: {version} not in {specifier!r}" + ) + return UnsupportedPythonVersion(message) + + message = f"Packages require a different Python. {version} not in:" + for cause in causes: + package = cause.parent.format_for_error() + specifier = str(cause.requirement.specifier) + message += f"\n{specifier!r} (required by {package})" + return UnsupportedPythonVersion(message) + + def _report_single_requirement_conflict( + self, req: Requirement, parent: Optional[Candidate] + ) -> DistributionNotFound: + if parent is None: + req_disp = str(req) + else: + req_disp = f"{req} (from {parent.name})" + + cands = self._finder.find_all_candidates(req.project_name) + skipped_by_requires_python = self._finder.requires_python_skipped_reasons() + + versions_set: Set[Version] = set() + yanked_versions_set: Set[Version] = set() + for c in cands: + is_yanked = c.link.is_yanked if c.link else False + if is_yanked: + yanked_versions_set.add(c.version) + else: + versions_set.add(c.version) + + versions = [str(v) for v in sorted(versions_set)] + yanked_versions = [str(v) for v in sorted(yanked_versions_set)] + + if yanked_versions: + # Saying "version X is yanked" isn't entirely accurate. + # https://github.com/pypa/pip/issues/11745#issuecomment-1402805842 + logger.critical( + "Ignored the following yanked versions: %s", + ", ".join(yanked_versions) or "none", + ) + if skipped_by_requires_python: + logger.critical( + "Ignored the following versions that require a different python " + "version: %s", + "; ".join(skipped_by_requires_python) or "none", + ) + logger.critical( + "Could not find a version that satisfies the requirement %s " + "(from versions: %s)", + req_disp, + ", ".join(versions) or "none", + ) + if str(req) == "requirements.txt": + logger.info( + "HINT: You are attempting to install a package literally " + 'named "requirements.txt" (which cannot exist). Consider ' + "using the '-r' flag to install the packages listed in " + "requirements.txt" + ) + + return DistributionNotFound(f"No matching distribution found for {req}") + + def get_installation_error( + self, + e: "ResolutionImpossible[Requirement, Candidate]", + constraints: Dict[str, Constraint], + ) -> InstallationError: + assert e.causes, "Installation error reported with no cause" + + # If one of the things we can't solve is "we need Python X.Y", + # that is what we report. + requires_python_causes = [ + cause + for cause in e.causes + if isinstance(cause.requirement, RequiresPythonRequirement) + and not cause.requirement.is_satisfied_by(self._python_candidate) + ] + if requires_python_causes: + # The comprehension above makes sure all Requirement instances are + # RequiresPythonRequirement, so let's cast for convenience. + return self._report_requires_python_error( + cast("Sequence[ConflictCause]", requires_python_causes), + ) + + # Otherwise, we have a set of causes which can't all be satisfied + # at once. + + # The simplest case is when we have *one* cause that can't be + # satisfied. We just report that case. + if len(e.causes) == 1: + req, parent = e.causes[0] + if req.name not in constraints: + return self._report_single_requirement_conflict(req, parent) + + # OK, we now have a list of requirements that can't all be + # satisfied at once. + + # A couple of formatting helpers + def text_join(parts: List[str]) -> str: + if len(parts) == 1: + return parts[0] + + return ", ".join(parts[:-1]) + " and " + parts[-1] + + def describe_trigger(parent: Candidate) -> str: + ireq = parent.get_install_requirement() + if not ireq or not ireq.comes_from: + return f"{parent.name}=={parent.version}" + if isinstance(ireq.comes_from, InstallRequirement): + return str(ireq.comes_from.name) + return str(ireq.comes_from) + + triggers = set() + for req, parent in e.causes: + if parent is None: + # This is a root requirement, so we can report it directly + trigger = req.format_for_error() + else: + trigger = describe_trigger(parent) + triggers.add(trigger) + + if triggers: + info = text_join(sorted(triggers)) + else: + info = "the requested packages" + + msg = ( + f"Cannot install {info} because these package versions " + "have conflicting dependencies." + ) + logger.critical(msg) + msg = "\nThe conflict is caused by:" + + relevant_constraints = set() + for req, parent in e.causes: + if req.name in constraints: + relevant_constraints.add(req.name) + msg = msg + "\n " + if parent: + msg = msg + f"{parent.name} {parent.version} depends on " + else: + msg = msg + "The user requested " + msg = msg + req.format_for_error() + for key in relevant_constraints: + spec = constraints[key].specifier + msg += f"\n The user requested (constraint) {key}{spec}" + + msg = ( + msg + + "\n\n" + + "To fix this you could try to:\n" + + "1. loosen the range of package versions you've specified\n" + + "2. remove package versions to allow pip to attempt to solve " + + "the dependency conflict\n" + ) + + logger.info(msg) + + return DistributionNotFound( + "ResolutionImpossible: for help visit " + "https://pip.pypa.io/en/latest/topics/dependency-resolution/" + "#dealing-with-dependency-conflicts" + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py new file mode 100644 index 0000000000000000000000000000000000000000..a1d57e0f4b275cd5783c950381ddfff0184da138 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py @@ -0,0 +1,174 @@ +"""Utilities to lazily create and visit candidates found. + +Creating and visiting a candidate is a *very* costly operation. It involves +fetching, extracting, potentially building modules from source, and verifying +distribution metadata. It is therefore crucial for performance to keep +everything here lazy all the way down, so we only touch candidates that we +absolutely need, and not "download the world" when we only need one version of +something. +""" + +import functools +import logging +from collections.abc import Sequence +from typing import TYPE_CHECKING, Any, Callable, Iterator, Optional, Set, Tuple + +from pip._vendor.packaging.version import _BaseVersion + +from pip._internal.exceptions import MetadataInvalid + +from .base import Candidate + +logger = logging.getLogger(__name__) + +IndexCandidateInfo = Tuple[_BaseVersion, Callable[[], Optional[Candidate]]] + +if TYPE_CHECKING: + SequenceCandidate = Sequence[Candidate] +else: + # For compatibility: Python before 3.9 does not support using [] on the + # Sequence class. + # + # >>> from collections.abc import Sequence + # >>> Sequence[str] + # Traceback (most recent call last): + # File "", line 1, in + # TypeError: 'ABCMeta' object is not subscriptable + # + # TODO: Remove this block after dropping Python 3.8 support. + SequenceCandidate = Sequence + + +def _iter_built(infos: Iterator[IndexCandidateInfo]) -> Iterator[Candidate]: + """Iterator for ``FoundCandidates``. + + This iterator is used when the package is not already installed. Candidates + from index come later in their normal ordering. + """ + versions_found: Set[_BaseVersion] = set() + for version, func in infos: + if version in versions_found: + continue + try: + candidate = func() + except MetadataInvalid as e: + logger.warning( + "Ignoring version %s of %s since it has invalid metadata:\n" + "%s\n" + "Please use pip<24.1 if you need to use this version.", + version, + e.ireq.name, + e, + ) + # Mark version as found to avoid trying other candidates with the same + # version, since they most likely have invalid metadata as well. + versions_found.add(version) + else: + if candidate is None: + continue + yield candidate + versions_found.add(version) + + +def _iter_built_with_prepended( + installed: Candidate, infos: Iterator[IndexCandidateInfo] +) -> Iterator[Candidate]: + """Iterator for ``FoundCandidates``. + + This iterator is used when the resolver prefers the already-installed + candidate and NOT to upgrade. The installed candidate is therefore + always yielded first, and candidates from index come later in their + normal ordering, except skipped when the version is already installed. + """ + yield installed + versions_found: Set[_BaseVersion] = {installed.version} + for version, func in infos: + if version in versions_found: + continue + candidate = func() + if candidate is None: + continue + yield candidate + versions_found.add(version) + + +def _iter_built_with_inserted( + installed: Candidate, infos: Iterator[IndexCandidateInfo] +) -> Iterator[Candidate]: + """Iterator for ``FoundCandidates``. + + This iterator is used when the resolver prefers to upgrade an + already-installed package. Candidates from index are returned in their + normal ordering, except replaced when the version is already installed. + + The implementation iterates through and yields other candidates, inserting + the installed candidate exactly once before we start yielding older or + equivalent candidates, or after all other candidates if they are all newer. + """ + versions_found: Set[_BaseVersion] = set() + for version, func in infos: + if version in versions_found: + continue + # If the installed candidate is better, yield it first. + if installed.version >= version: + yield installed + versions_found.add(installed.version) + candidate = func() + if candidate is None: + continue + yield candidate + versions_found.add(version) + + # If the installed candidate is older than all other candidates. + if installed.version not in versions_found: + yield installed + + +class FoundCandidates(SequenceCandidate): + """A lazy sequence to provide candidates to the resolver. + + The intended usage is to return this from `find_matches()` so the resolver + can iterate through the sequence multiple times, but only access the index + page when remote packages are actually needed. This improve performances + when suitable candidates are already installed on disk. + """ + + def __init__( + self, + get_infos: Callable[[], Iterator[IndexCandidateInfo]], + installed: Optional[Candidate], + prefers_installed: bool, + incompatible_ids: Set[int], + ): + self._get_infos = get_infos + self._installed = installed + self._prefers_installed = prefers_installed + self._incompatible_ids = incompatible_ids + + def __getitem__(self, index: Any) -> Any: + # Implemented to satisfy the ABC check. This is not needed by the + # resolver, and should not be used by the provider either (for + # performance reasons). + raise NotImplementedError("don't do this") + + def __iter__(self) -> Iterator[Candidate]: + infos = self._get_infos() + if not self._installed: + iterator = _iter_built(infos) + elif self._prefers_installed: + iterator = _iter_built_with_prepended(self._installed, infos) + else: + iterator = _iter_built_with_inserted(self._installed, infos) + return (c for c in iterator if id(c) not in self._incompatible_ids) + + def __len__(self) -> int: + # Implemented to satisfy the ABC check. This is not needed by the + # resolver, and should not be used by the provider either (for + # performance reasons). + raise NotImplementedError("don't do this") + + @functools.lru_cache(maxsize=1) + def __bool__(self) -> bool: + if self._prefers_installed and self._installed: + return True + return any(self) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py new file mode 100644 index 0000000000000000000000000000000000000000..fb0dd85f1124bed20da9402ada714af3f3584e07 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py @@ -0,0 +1,258 @@ +import collections +import math +from functools import lru_cache +from typing import ( + TYPE_CHECKING, + Dict, + Iterable, + Iterator, + Mapping, + Sequence, + TypeVar, + Union, +) + +from pip._vendor.resolvelib.providers import AbstractProvider + +from .base import Candidate, Constraint, Requirement +from .candidates import REQUIRES_PYTHON_IDENTIFIER +from .factory import Factory + +if TYPE_CHECKING: + from pip._vendor.resolvelib.providers import Preference + from pip._vendor.resolvelib.resolvers import RequirementInformation + + PreferenceInformation = RequirementInformation[Requirement, Candidate] + + _ProviderBase = AbstractProvider[Requirement, Candidate, str] +else: + _ProviderBase = AbstractProvider + +# Notes on the relationship between the provider, the factory, and the +# candidate and requirement classes. +# +# The provider is a direct implementation of the resolvelib class. Its role +# is to deliver the API that resolvelib expects. +# +# Rather than work with completely abstract "requirement" and "candidate" +# concepts as resolvelib does, pip has concrete classes implementing these two +# ideas. The API of Requirement and Candidate objects are defined in the base +# classes, but essentially map fairly directly to the equivalent provider +# methods. In particular, `find_matches` and `is_satisfied_by` are +# requirement methods, and `get_dependencies` is a candidate method. +# +# The factory is the interface to pip's internal mechanisms. It is stateless, +# and is created by the resolver and held as a property of the provider. It is +# responsible for creating Requirement and Candidate objects, and provides +# services to those objects (access to pip's finder and preparer). + + +D = TypeVar("D") +V = TypeVar("V") + + +def _get_with_identifier( + mapping: Mapping[str, V], + identifier: str, + default: D, +) -> Union[D, V]: + """Get item from a package name lookup mapping with a resolver identifier. + + This extra logic is needed when the target mapping is keyed by package + name, which cannot be directly looked up with an identifier (which may + contain requested extras). Additional logic is added to also look up a value + by "cleaning up" the extras from the identifier. + """ + if identifier in mapping: + return mapping[identifier] + # HACK: Theoretically we should check whether this identifier is a valid + # "NAME[EXTRAS]" format, and parse out the name part with packaging or + # some regular expression. But since pip's resolver only spits out three + # kinds of identifiers: normalized PEP 503 names, normalized names plus + # extras, and Requires-Python, we can cheat a bit here. + name, open_bracket, _ = identifier.partition("[") + if open_bracket and name in mapping: + return mapping[name] + return default + + +class PipProvider(_ProviderBase): + """Pip's provider implementation for resolvelib. + + :params constraints: A mapping of constraints specified by the user. Keys + are canonicalized project names. + :params ignore_dependencies: Whether the user specified ``--no-deps``. + :params upgrade_strategy: The user-specified upgrade strategy. + :params user_requested: A set of canonicalized package names that the user + supplied for pip to install/upgrade. + """ + + def __init__( + self, + factory: Factory, + constraints: Dict[str, Constraint], + ignore_dependencies: bool, + upgrade_strategy: str, + user_requested: Dict[str, int], + ) -> None: + self._factory = factory + self._constraints = constraints + self._ignore_dependencies = ignore_dependencies + self._upgrade_strategy = upgrade_strategy + self._user_requested = user_requested + self._known_depths: Dict[str, float] = collections.defaultdict(lambda: math.inf) + + def identify(self, requirement_or_candidate: Union[Requirement, Candidate]) -> str: + return requirement_or_candidate.name + + def get_preference( + self, + identifier: str, + resolutions: Mapping[str, Candidate], + candidates: Mapping[str, Iterator[Candidate]], + information: Mapping[str, Iterable["PreferenceInformation"]], + backtrack_causes: Sequence["PreferenceInformation"], + ) -> "Preference": + """Produce a sort key for given requirement based on preference. + + The lower the return value is, the more preferred this group of + arguments is. + + Currently pip considers the following in order: + + * Prefer if any of the known requirements is "direct", e.g. points to an + explicit URL. + * If equal, prefer if any requirement is "pinned", i.e. contains + operator ``===`` or ``==``. + * If equal, calculate an approximate "depth" and resolve requirements + closer to the user-specified requirements first. If the depth cannot + by determined (eg: due to no matching parents), it is considered + infinite. + * Order user-specified requirements by the order they are specified. + * If equal, prefers "non-free" requirements, i.e. contains at least one + operator, such as ``>=`` or ``<``. + * If equal, order alphabetically for consistency (helps debuggability). + """ + try: + next(iter(information[identifier])) + except StopIteration: + # There is no information for this identifier, so there's no known + # candidates. + has_information = False + else: + has_information = True + + if has_information: + lookups = (r.get_candidate_lookup() for r, _ in information[identifier]) + candidate, ireqs = zip(*lookups) + else: + candidate, ireqs = None, () + + operators = [ + specifier.operator + for specifier_set in (ireq.specifier for ireq in ireqs if ireq) + for specifier in specifier_set + ] + + direct = candidate is not None + pinned = any(op[:2] == "==" for op in operators) + unfree = bool(operators) + + try: + requested_order: Union[int, float] = self._user_requested[identifier] + except KeyError: + requested_order = math.inf + if has_information: + parent_depths = ( + self._known_depths[parent.name] if parent is not None else 0.0 + for _, parent in information[identifier] + ) + inferred_depth = min(d for d in parent_depths) + 1.0 + else: + inferred_depth = math.inf + else: + inferred_depth = 1.0 + self._known_depths[identifier] = inferred_depth + + requested_order = self._user_requested.get(identifier, math.inf) + + # Requires-Python has only one candidate and the check is basically + # free, so we always do it first to avoid needless work if it fails. + requires_python = identifier == REQUIRES_PYTHON_IDENTIFIER + + # Prefer the causes of backtracking on the assumption that the problem + # resolving the dependency tree is related to the failures that caused + # the backtracking + backtrack_cause = self.is_backtrack_cause(identifier, backtrack_causes) + + return ( + not requires_python, + not direct, + not pinned, + not backtrack_cause, + inferred_depth, + requested_order, + not unfree, + identifier, + ) + + def find_matches( + self, + identifier: str, + requirements: Mapping[str, Iterator[Requirement]], + incompatibilities: Mapping[str, Iterator[Candidate]], + ) -> Iterable[Candidate]: + def _eligible_for_upgrade(identifier: str) -> bool: + """Are upgrades allowed for this project? + + This checks the upgrade strategy, and whether the project was one + that the user specified in the command line, in order to decide + whether we should upgrade if there's a newer version available. + + (Note that we don't need access to the `--upgrade` flag, because + an upgrade strategy of "to-satisfy-only" means that `--upgrade` + was not specified). + """ + if self._upgrade_strategy == "eager": + return True + elif self._upgrade_strategy == "only-if-needed": + user_order = _get_with_identifier( + self._user_requested, + identifier, + default=None, + ) + return user_order is not None + return False + + constraint = _get_with_identifier( + self._constraints, + identifier, + default=Constraint.empty(), + ) + return self._factory.find_candidates( + identifier=identifier, + requirements=requirements, + constraint=constraint, + prefers_installed=(not _eligible_for_upgrade(identifier)), + incompatibilities=incompatibilities, + is_satisfied_by=self.is_satisfied_by, + ) + + @lru_cache(maxsize=None) + def is_satisfied_by(self, requirement: Requirement, candidate: Candidate) -> bool: + return requirement.is_satisfied_by(candidate) + + def get_dependencies(self, candidate: Candidate) -> Sequence[Requirement]: + with_requires = not self._ignore_dependencies + return [r for r in candidate.iter_dependencies(with_requires) if r is not None] + + @staticmethod + def is_backtrack_cause( + identifier: str, backtrack_causes: Sequence["PreferenceInformation"] + ) -> bool: + for backtrack_cause in backtrack_causes: + if identifier == backtrack_cause.requirement.name: + return True + if backtrack_cause.parent and identifier == backtrack_cause.parent.name: + return True + return False diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py new file mode 100644 index 0000000000000000000000000000000000000000..0594569d85010d23cc03b178c56cb472908ed59c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py @@ -0,0 +1,81 @@ +from collections import defaultdict +from logging import getLogger +from typing import Any, DefaultDict + +from pip._vendor.resolvelib.reporters import BaseReporter + +from .base import Candidate, Requirement + +logger = getLogger(__name__) + + +class PipReporter(BaseReporter): + def __init__(self) -> None: + self.reject_count_by_package: DefaultDict[str, int] = defaultdict(int) + + self._messages_at_reject_count = { + 1: ( + "pip is looking at multiple versions of {package_name} to " + "determine which version is compatible with other " + "requirements. This could take a while." + ), + 8: ( + "pip is still looking at multiple versions of {package_name} to " + "determine which version is compatible with other " + "requirements. This could take a while." + ), + 13: ( + "This is taking longer than usual. You might need to provide " + "the dependency resolver with stricter constraints to reduce " + "runtime. See https://pip.pypa.io/warnings/backtracking for " + "guidance. If you want to abort this run, press Ctrl + C." + ), + } + + def rejecting_candidate(self, criterion: Any, candidate: Candidate) -> None: + self.reject_count_by_package[candidate.name] += 1 + + count = self.reject_count_by_package[candidate.name] + if count not in self._messages_at_reject_count: + return + + message = self._messages_at_reject_count[count] + logger.info("INFO: %s", message.format(package_name=candidate.name)) + + msg = "Will try a different candidate, due to conflict:" + for req_info in criterion.information: + req, parent = req_info.requirement, req_info.parent + # Inspired by Factory.get_installation_error + msg += "\n " + if parent: + msg += f"{parent.name} {parent.version} depends on " + else: + msg += "The user requested " + msg += req.format_for_error() + logger.debug(msg) + + +class PipDebuggingReporter(BaseReporter): + """A reporter that does an info log for every event it sees.""" + + def starting(self) -> None: + logger.info("Reporter.starting()") + + def starting_round(self, index: int) -> None: + logger.info("Reporter.starting_round(%r)", index) + + def ending_round(self, index: int, state: Any) -> None: + logger.info("Reporter.ending_round(%r, state)", index) + logger.debug("Reporter.ending_round(%r, %r)", index, state) + + def ending(self, state: Any) -> None: + logger.info("Reporter.ending(%r)", state) + + def adding_requirement(self, requirement: Requirement, parent: Candidate) -> None: + logger.info("Reporter.adding_requirement(%r, %r)", requirement, parent) + + def rejecting_candidate(self, criterion: Any, candidate: Candidate) -> None: + logger.info("Reporter.rejecting_candidate(%r, %r)", criterion, candidate) + + def pinning(self, candidate: Candidate) -> None: + logger.info("Reporter.pinning(%r)", candidate) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py new file mode 100644 index 0000000000000000000000000000000000000000..b04f41b2191840865307be5dd9cec4271f19bcd2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py @@ -0,0 +1,245 @@ +from typing import Any, Optional + +from pip._vendor.packaging.specifiers import SpecifierSet +from pip._vendor.packaging.utils import NormalizedName, canonicalize_name + +from pip._internal.req.constructors import install_req_drop_extras +from pip._internal.req.req_install import InstallRequirement + +from .base import Candidate, CandidateLookup, Requirement, format_name + + +class ExplicitRequirement(Requirement): + def __init__(self, candidate: Candidate) -> None: + self.candidate = candidate + + def __str__(self) -> str: + return str(self.candidate) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({self.candidate!r})" + + def __hash__(self) -> int: + return hash(self.candidate) + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, ExplicitRequirement): + return False + return self.candidate == other.candidate + + @property + def project_name(self) -> NormalizedName: + # No need to canonicalize - the candidate did this + return self.candidate.project_name + + @property + def name(self) -> str: + # No need to canonicalize - the candidate did this + return self.candidate.name + + def format_for_error(self) -> str: + return self.candidate.format_for_error() + + def get_candidate_lookup(self) -> CandidateLookup: + return self.candidate, None + + def is_satisfied_by(self, candidate: Candidate) -> bool: + return candidate == self.candidate + + +class SpecifierRequirement(Requirement): + def __init__(self, ireq: InstallRequirement) -> None: + assert ireq.link is None, "This is a link, not a specifier" + self._ireq = ireq + self._equal_cache: Optional[str] = None + self._hash: Optional[int] = None + self._extras = frozenset(canonicalize_name(e) for e in self._ireq.extras) + + @property + def _equal(self) -> str: + if self._equal_cache is not None: + return self._equal_cache + + self._equal_cache = str(self._ireq) + return self._equal_cache + + def __str__(self) -> str: + return str(self._ireq.req) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({str(self._ireq.req)!r})" + + def __eq__(self, other: object) -> bool: + if not isinstance(other, SpecifierRequirement): + return NotImplemented + return self._equal == other._equal + + def __hash__(self) -> int: + if self._hash is not None: + return self._hash + + self._hash = hash(self._equal) + return self._hash + + @property + def project_name(self) -> NormalizedName: + assert self._ireq.req, "Specifier-backed ireq is always PEP 508" + return canonicalize_name(self._ireq.req.name) + + @property + def name(self) -> str: + return format_name(self.project_name, self._extras) + + def format_for_error(self) -> str: + # Convert comma-separated specifiers into "A, B, ..., F and G" + # This makes the specifier a bit more "human readable", without + # risking a change in meaning. (Hopefully! Not all edge cases have + # been checked) + parts = [s.strip() for s in str(self).split(",")] + if len(parts) == 0: + return "" + elif len(parts) == 1: + return parts[0] + + return ", ".join(parts[:-1]) + " and " + parts[-1] + + def get_candidate_lookup(self) -> CandidateLookup: + return None, self._ireq + + def is_satisfied_by(self, candidate: Candidate) -> bool: + assert candidate.name == self.name, ( + f"Internal issue: Candidate is not for this requirement " + f"{candidate.name} vs {self.name}" + ) + # We can safely always allow prereleases here since PackageFinder + # already implements the prerelease logic, and would have filtered out + # prerelease candidates if the user does not expect them. + assert self._ireq.req, "Specifier-backed ireq is always PEP 508" + spec = self._ireq.req.specifier + return spec.contains(candidate.version, prereleases=True) + + +class SpecifierWithoutExtrasRequirement(SpecifierRequirement): + """ + Requirement backed by an install requirement on a base package. + Trims extras from its install requirement if there are any. + """ + + def __init__(self, ireq: InstallRequirement) -> None: + assert ireq.link is None, "This is a link, not a specifier" + self._ireq = install_req_drop_extras(ireq) + self._equal_cache: Optional[str] = None + self._hash: Optional[int] = None + self._extras = frozenset(canonicalize_name(e) for e in self._ireq.extras) + + @property + def _equal(self) -> str: + if self._equal_cache is not None: + return self._equal_cache + + self._equal_cache = str(self._ireq) + return self._equal_cache + + def __eq__(self, other: object) -> bool: + if not isinstance(other, SpecifierWithoutExtrasRequirement): + return NotImplemented + return self._equal == other._equal + + def __hash__(self) -> int: + if self._hash is not None: + return self._hash + + self._hash = hash(self._equal) + return self._hash + + +class RequiresPythonRequirement(Requirement): + """A requirement representing Requires-Python metadata.""" + + def __init__(self, specifier: SpecifierSet, match: Candidate) -> None: + self.specifier = specifier + self._specifier_string = str(specifier) # for faster __eq__ + self._hash: Optional[int] = None + self._candidate = match + + def __str__(self) -> str: + return f"Python {self.specifier}" + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({str(self.specifier)!r})" + + def __hash__(self) -> int: + if self._hash is not None: + return self._hash + + self._hash = hash((self._specifier_string, self._candidate)) + return self._hash + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, RequiresPythonRequirement): + return False + return ( + self._specifier_string == other._specifier_string + and self._candidate == other._candidate + ) + + @property + def project_name(self) -> NormalizedName: + return self._candidate.project_name + + @property + def name(self) -> str: + return self._candidate.name + + def format_for_error(self) -> str: + return str(self) + + def get_candidate_lookup(self) -> CandidateLookup: + if self.specifier.contains(self._candidate.version, prereleases=True): + return self._candidate, None + return None, None + + def is_satisfied_by(self, candidate: Candidate) -> bool: + assert candidate.name == self._candidate.name, "Not Python candidate" + # We can safely always allow prereleases here since PackageFinder + # already implements the prerelease logic, and would have filtered out + # prerelease candidates if the user does not expect them. + return self.specifier.contains(candidate.version, prereleases=True) + + +class UnsatisfiableRequirement(Requirement): + """A requirement that cannot be satisfied.""" + + def __init__(self, name: NormalizedName) -> None: + self._name = name + + def __str__(self) -> str: + return f"{self._name} (unavailable)" + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({str(self._name)!r})" + + def __eq__(self, other: object) -> bool: + if not isinstance(other, UnsatisfiableRequirement): + return NotImplemented + return self._name == other._name + + def __hash__(self) -> int: + return hash(self._name) + + @property + def project_name(self) -> NormalizedName: + return self._name + + @property + def name(self) -> str: + return self._name + + def format_for_error(self) -> str: + return str(self) + + def get_candidate_lookup(self) -> CandidateLookup: + return None, None + + def is_satisfied_by(self, candidate: Candidate) -> bool: + return False diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py new file mode 100644 index 0000000000000000000000000000000000000000..c12beef0b2a4344a4e0daca2540bbfd0c58ce777 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py @@ -0,0 +1,317 @@ +import contextlib +import functools +import logging +import os +from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, cast + +from pip._vendor.packaging.utils import canonicalize_name +from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible +from pip._vendor.resolvelib import Resolver as RLResolver +from pip._vendor.resolvelib.structs import DirectedGraph + +from pip._internal.cache import WheelCache +from pip._internal.index.package_finder import PackageFinder +from pip._internal.operations.prepare import RequirementPreparer +from pip._internal.req.constructors import install_req_extend_extras +from pip._internal.req.req_install import InstallRequirement +from pip._internal.req.req_set import RequirementSet +from pip._internal.resolution.base import BaseResolver, InstallRequirementProvider +from pip._internal.resolution.resolvelib.provider import PipProvider +from pip._internal.resolution.resolvelib.reporter import ( + PipDebuggingReporter, + PipReporter, +) +from pip._internal.utils.packaging import get_requirement + +from .base import Candidate, Requirement +from .factory import Factory + +if TYPE_CHECKING: + from pip._vendor.resolvelib.resolvers import Result as RLResult + + Result = RLResult[Requirement, Candidate, str] + + +logger = logging.getLogger(__name__) + + +class Resolver(BaseResolver): + _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"} + + def __init__( + self, + preparer: RequirementPreparer, + finder: PackageFinder, + wheel_cache: Optional[WheelCache], + make_install_req: InstallRequirementProvider, + use_user_site: bool, + ignore_dependencies: bool, + ignore_installed: bool, + ignore_requires_python: bool, + force_reinstall: bool, + upgrade_strategy: str, + py_version_info: Optional[Tuple[int, ...]] = None, + ): + super().__init__() + assert upgrade_strategy in self._allowed_strategies + + self.factory = Factory( + finder=finder, + preparer=preparer, + make_install_req=make_install_req, + wheel_cache=wheel_cache, + use_user_site=use_user_site, + force_reinstall=force_reinstall, + ignore_installed=ignore_installed, + ignore_requires_python=ignore_requires_python, + py_version_info=py_version_info, + ) + self.ignore_dependencies = ignore_dependencies + self.upgrade_strategy = upgrade_strategy + self._result: Optional[Result] = None + + def resolve( + self, root_reqs: List[InstallRequirement], check_supported_wheels: bool + ) -> RequirementSet: + collected = self.factory.collect_root_requirements(root_reqs) + provider = PipProvider( + factory=self.factory, + constraints=collected.constraints, + ignore_dependencies=self.ignore_dependencies, + upgrade_strategy=self.upgrade_strategy, + user_requested=collected.user_requested, + ) + if "PIP_RESOLVER_DEBUG" in os.environ: + reporter: BaseReporter = PipDebuggingReporter() + else: + reporter = PipReporter() + resolver: RLResolver[Requirement, Candidate, str] = RLResolver( + provider, + reporter, + ) + + try: + limit_how_complex_resolution_can_be = 200000 + result = self._result = resolver.resolve( + collected.requirements, max_rounds=limit_how_complex_resolution_can_be + ) + + except ResolutionImpossible as e: + error = self.factory.get_installation_error( + cast("ResolutionImpossible[Requirement, Candidate]", e), + collected.constraints, + ) + raise error from e + + req_set = RequirementSet(check_supported_wheels=check_supported_wheels) + # process candidates with extras last to ensure their base equivalent is + # already in the req_set if appropriate. + # Python's sort is stable so using a binary key function keeps relative order + # within both subsets. + for candidate in sorted( + result.mapping.values(), key=lambda c: c.name != c.project_name + ): + ireq = candidate.get_install_requirement() + if ireq is None: + if candidate.name != candidate.project_name: + # extend existing req's extras + with contextlib.suppress(KeyError): + req = req_set.get_requirement(candidate.project_name) + req_set.add_named_requirement( + install_req_extend_extras( + req, get_requirement(candidate.name).extras + ) + ) + continue + + # Check if there is already an installation under the same name, + # and set a flag for later stages to uninstall it, if needed. + installed_dist = self.factory.get_dist_to_uninstall(candidate) + if installed_dist is None: + # There is no existing installation -- nothing to uninstall. + ireq.should_reinstall = False + elif self.factory.force_reinstall: + # The --force-reinstall flag is set -- reinstall. + ireq.should_reinstall = True + elif installed_dist.version != candidate.version: + # The installation is different in version -- reinstall. + ireq.should_reinstall = True + elif candidate.is_editable or installed_dist.editable: + # The incoming distribution is editable, or different in + # editable-ness to installation -- reinstall. + ireq.should_reinstall = True + elif candidate.source_link and candidate.source_link.is_file: + # The incoming distribution is under file:// + if candidate.source_link.is_wheel: + # is a local wheel -- do nothing. + logger.info( + "%s is already installed with the same version as the " + "provided wheel. Use --force-reinstall to force an " + "installation of the wheel.", + ireq.name, + ) + continue + + # is a local sdist or path -- reinstall + ireq.should_reinstall = True + else: + continue + + link = candidate.source_link + if link and link.is_yanked: + # The reason can contain non-ASCII characters, Unicode + # is required for Python 2. + msg = ( + "The candidate selected for download or install is a " + "yanked version: {name!r} candidate (version {version} " + "at {link})\nReason for being yanked: {reason}" + ).format( + name=candidate.name, + version=candidate.version, + link=link, + reason=link.yanked_reason or "", + ) + logger.warning(msg) + + req_set.add_named_requirement(ireq) + + reqs = req_set.all_requirements + self.factory.preparer.prepare_linked_requirements_more(reqs) + for req in reqs: + req.prepared = True + req.needs_more_preparation = False + return req_set + + def get_installation_order( + self, req_set: RequirementSet + ) -> List[InstallRequirement]: + """Get order for installation of requirements in RequirementSet. + + The returned list contains a requirement before another that depends on + it. This helps ensure that the environment is kept consistent as they + get installed one-by-one. + + The current implementation creates a topological ordering of the + dependency graph, giving more weight to packages with less + or no dependencies, while breaking any cycles in the graph at + arbitrary points. We make no guarantees about where the cycle + would be broken, other than it *would* be broken. + """ + assert self._result is not None, "must call resolve() first" + + if not req_set.requirements: + # Nothing is left to install, so we do not need an order. + return [] + + graph = self._result.graph + weights = get_topological_weights(graph, set(req_set.requirements.keys())) + + sorted_items = sorted( + req_set.requirements.items(), + key=functools.partial(_req_set_item_sorter, weights=weights), + reverse=True, + ) + return [ireq for _, ireq in sorted_items] + + +def get_topological_weights( + graph: "DirectedGraph[Optional[str]]", requirement_keys: Set[str] +) -> Dict[Optional[str], int]: + """Assign weights to each node based on how "deep" they are. + + This implementation may change at any point in the future without prior + notice. + + We first simplify the dependency graph by pruning any leaves and giving them + the highest weight: a package without any dependencies should be installed + first. This is done again and again in the same way, giving ever less weight + to the newly found leaves. The loop stops when no leaves are left: all + remaining packages have at least one dependency left in the graph. + + Then we continue with the remaining graph, by taking the length for the + longest path to any node from root, ignoring any paths that contain a single + node twice (i.e. cycles). This is done through a depth-first search through + the graph, while keeping track of the path to the node. + + Cycles in the graph result would result in node being revisited while also + being on its own path. In this case, take no action. This helps ensure we + don't get stuck in a cycle. + + When assigning weight, the longer path (i.e. larger length) is preferred. + + We are only interested in the weights of packages that are in the + requirement_keys. + """ + path: Set[Optional[str]] = set() + weights: Dict[Optional[str], int] = {} + + def visit(node: Optional[str]) -> None: + if node in path: + # We hit a cycle, so we'll break it here. + return + + # Time to visit the children! + path.add(node) + for child in graph.iter_children(node): + visit(child) + path.remove(node) + + if node not in requirement_keys: + return + + last_known_parent_count = weights.get(node, 0) + weights[node] = max(last_known_parent_count, len(path)) + + # Simplify the graph, pruning leaves that have no dependencies. + # This is needed for large graphs (say over 200 packages) because the + # `visit` function is exponentially slower then, taking minutes. + # See https://github.com/pypa/pip/issues/10557 + # We will loop until we explicitly break the loop. + while True: + leaves = set() + for key in graph: + if key is None: + continue + for _child in graph.iter_children(key): + # This means we have at least one child + break + else: + # No child. + leaves.add(key) + if not leaves: + # We are done simplifying. + break + # Calculate the weight for the leaves. + weight = len(graph) - 1 + for leaf in leaves: + if leaf not in requirement_keys: + continue + weights[leaf] = weight + # Remove the leaves from the graph, making it simpler. + for leaf in leaves: + graph.remove(leaf) + + # Visit the remaining graph. + # `None` is guaranteed to be the root node by resolvelib. + visit(None) + + # Sanity check: all requirement keys should be in the weights, + # and no other keys should be in the weights. + difference = set(weights.keys()).difference(requirement_keys) + assert not difference, difference + + return weights + + +def _req_set_item_sorter( + item: Tuple[str, InstallRequirement], + weights: Dict[Optional[str], int], +) -> Tuple[int, str]: + """Key function used to sort install requirements for installation. + + Based on the "weight" mapping calculated in ``get_installation_order()``. + The canonical package name is returned as the second member as a tie- + breaker to ensure the result is predictable, which is useful in tests. + """ + name = canonicalize_name(item[0]) + return weights[name], name diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..24f58550387ffa3baf48a0bf3c58a281d36a3d26 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..721229e92d1b4234a90742c220f6c64219c6452b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5357ce2a1226e1693be963b9805bc1ef414ac7fe Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe555d2084c9066d8f58da418b657cc3a29813b3 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6de46c88636f87e74cbc84e0b7c7111bc1e533e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ad5331a57fd9df230fccb950a9bdc48c659915b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..417cefa0ebe77b7954b0649e49ce1db3dac300c8 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..133c90b4755d9a265ca85779a1a9b017f67b4fad Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b1f90319b65fd67239ce4d0dbdd9840a66026b9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20c15013768f02ebaa759b6ba6bdb9740b367245 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38b861592aed949cd0bb09247b503c718288e221 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74fb7ee8ce4ad62f7b29f60b43637029af5519d8 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..26c77ba99bdf0b85520a98d4844c9978576c6830 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d94cf256c5cc85e8fcfb87fd9440291e0b0ad12a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..33cd8213eb0627dc0caa2b5ef358663041fc73ef Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ec992d461be5b54c4dec75bf7e92c99771a3b86 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e5c1f27386c6fcabf4eb766815ec33e8eddbeeb9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2dabfd7e349867cf3002bf68127730f38bca0ce3 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/retry.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/retry.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e748cd0e885818a78bc08fdc29555011366080ff Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/retry.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..850b85a85b25536b4d4001994c285a92cbc2c6d8 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..553b18e10a11c88a08197981e11d9702b355316c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ef798ef724b1729cbf76690b42e6c6b435d1c5a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f2426b38d771eae729df714f24603b59df935f1c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6db88b649ec67b67df0c823fe8dec0be673de093 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b72cd7d69f389c7566c8c38e46420439ebc06980 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..717d1e2fc2c6003e5545d6be85c50ff0d466deca Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..512f13ce3c2920a4de31bf690a40983d780bd7e6 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1d14b3e2563cfe6e138793bafe14782e32f11c0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b4e87d105958d4cc01929cf740b1a43986edb5e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b1a1c45866d8cbe6344c18496fcc3e3270264fc Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..59f9fa7cef9761d2e3c23bea88f1800286501189 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eec2bd3af191fe326ec10c8f278a3224086bfe39 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..619bced48d16c1e93491018cbd28bf739522a213 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21916243c56e306f6c18b265afc20d2095cd4e52 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py @@ -0,0 +1,29 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 + +"""CacheControl import Interface. + +Make it easy to import from cachecontrol without long namespaces. +""" + +__author__ = "Eric Larson" +__email__ = "eric@ionrock.org" +__version__ = "0.14.1" + +from pip._vendor.cachecontrol.adapter import CacheControlAdapter +from pip._vendor.cachecontrol.controller import CacheController +from pip._vendor.cachecontrol.wrapper import CacheControl + +__all__ = [ + "__author__", + "__email__", + "__version__", + "CacheControlAdapter", + "CacheController", + "CacheControl", +] + +import logging + +logging.getLogger(__name__).addHandler(logging.NullHandler()) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d21321774259b8367acd1f9f391bd04df472aac9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..04e6f7f3a3ab5d5f80a7f79e678a8bd825b87c45 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7df4dc6b6bd2ef5d62c26440d79ba38bc9fea24b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9971717a00e3e8b031fe96eecc8ff4eeedd6ad6f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39f457dbdb456cdf781229a291463f2b90425017 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e94fb601aac013cac0bc03a76a236d4b00e06730 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0aafe310e41f64b5338e17f44134c7b7b1c8362 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..11c4f402c8b664fbc2f23f2cd577c8450c0b41c2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..edc2705f9fd9e96a0aeedfd4ed0ed0b39b147d10 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..2c84208a5d87511cc4a63dcd9c647ac75c6f4475 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py @@ -0,0 +1,70 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import logging +from argparse import ArgumentParser +from typing import TYPE_CHECKING + +from pip._vendor import requests + +from pip._vendor.cachecontrol.adapter import CacheControlAdapter +from pip._vendor.cachecontrol.cache import DictCache +from pip._vendor.cachecontrol.controller import logger + +if TYPE_CHECKING: + from argparse import Namespace + + from pip._vendor.cachecontrol.controller import CacheController + + +def setup_logging() -> None: + logger.setLevel(logging.DEBUG) + handler = logging.StreamHandler() + logger.addHandler(handler) + + +def get_session() -> requests.Session: + adapter = CacheControlAdapter( + DictCache(), cache_etags=True, serializer=None, heuristic=None + ) + sess = requests.Session() + sess.mount("http://", adapter) + sess.mount("https://", adapter) + + sess.cache_controller = adapter.controller # type: ignore[attr-defined] + return sess + + +def get_args() -> Namespace: + parser = ArgumentParser() + parser.add_argument("url", help="The URL to try and cache") + return parser.parse_args() + + +def main() -> None: + args = get_args() + sess = get_session() + + # Make a request to get a response + resp = sess.get(args.url) + + # Turn on logging + setup_logging() + + # try setting the cache + cache_controller: CacheController = ( + sess.cache_controller # type: ignore[attr-defined] + ) + cache_controller.cache_response(resp.request, resp.raw) + + # Now try to get it + if cache_controller.cached_request(resp.request): + print("Cached!") + else: + print("Not cached :(") + + +if __name__ == "__main__": + main() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py new file mode 100644 index 0000000000000000000000000000000000000000..34a9eb82798715a17b9529290cd4f25a13e5d9c9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py @@ -0,0 +1,161 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import functools +import types +import zlib +from typing import TYPE_CHECKING, Any, Collection, Mapping + +from pip._vendor.requests.adapters import HTTPAdapter + +from pip._vendor.cachecontrol.cache import DictCache +from pip._vendor.cachecontrol.controller import PERMANENT_REDIRECT_STATUSES, CacheController +from pip._vendor.cachecontrol.filewrapper import CallbackFileWrapper + +if TYPE_CHECKING: + from pip._vendor.requests import PreparedRequest, Response + from pip._vendor.urllib3 import HTTPResponse + + from pip._vendor.cachecontrol.cache import BaseCache + from pip._vendor.cachecontrol.heuristics import BaseHeuristic + from pip._vendor.cachecontrol.serialize import Serializer + + +class CacheControlAdapter(HTTPAdapter): + invalidating_methods = {"PUT", "PATCH", "DELETE"} + + def __init__( + self, + cache: BaseCache | None = None, + cache_etags: bool = True, + controller_class: type[CacheController] | None = None, + serializer: Serializer | None = None, + heuristic: BaseHeuristic | None = None, + cacheable_methods: Collection[str] | None = None, + *args: Any, + **kw: Any, + ) -> None: + super().__init__(*args, **kw) + self.cache = DictCache() if cache is None else cache + self.heuristic = heuristic + self.cacheable_methods = cacheable_methods or ("GET",) + + controller_factory = controller_class or CacheController + self.controller = controller_factory( + self.cache, cache_etags=cache_etags, serializer=serializer + ) + + def send( + self, + request: PreparedRequest, + stream: bool = False, + timeout: None | float | tuple[float, float] | tuple[float, None] = None, + verify: bool | str = True, + cert: (None | bytes | str | tuple[bytes | str, bytes | str]) = None, + proxies: Mapping[str, str] | None = None, + cacheable_methods: Collection[str] | None = None, + ) -> Response: + """ + Send a request. Use the request information to see if it + exists in the cache and cache the response if we need to and can. + """ + cacheable = cacheable_methods or self.cacheable_methods + if request.method in cacheable: + try: + cached_response = self.controller.cached_request(request) + except zlib.error: + cached_response = None + if cached_response: + return self.build_response(request, cached_response, from_cache=True) + + # check for etags and add headers if appropriate + request.headers.update(self.controller.conditional_headers(request)) + + resp = super().send(request, stream, timeout, verify, cert, proxies) + + return resp + + def build_response( # type: ignore[override] + self, + request: PreparedRequest, + response: HTTPResponse, + from_cache: bool = False, + cacheable_methods: Collection[str] | None = None, + ) -> Response: + """ + Build a response by making a request or using the cache. + + This will end up calling send and returning a potentially + cached response + """ + cacheable = cacheable_methods or self.cacheable_methods + if not from_cache and request.method in cacheable: + # Check for any heuristics that might update headers + # before trying to cache. + if self.heuristic: + response = self.heuristic.apply(response) + + # apply any expiration heuristics + if response.status == 304: + # We must have sent an ETag request. This could mean + # that we've been expired already or that we simply + # have an etag. In either case, we want to try and + # update the cache if that is the case. + cached_response = self.controller.update_cached_response( + request, response + ) + + if cached_response is not response: + from_cache = True + + # We are done with the server response, read a + # possible response body (compliant servers will + # not return one, but we cannot be 100% sure) and + # release the connection back to the pool. + response.read(decode_content=False) + response.release_conn() + + response = cached_response + + # We always cache the 301 responses + elif int(response.status) in PERMANENT_REDIRECT_STATUSES: + self.controller.cache_response(request, response) + else: + # Wrap the response file with a wrapper that will cache the + # response when the stream has been consumed. + response._fp = CallbackFileWrapper( # type: ignore[assignment] + response._fp, # type: ignore[arg-type] + functools.partial( + self.controller.cache_response, request, response + ), + ) + if response.chunked: + super_update_chunk_length = response._update_chunk_length + + def _update_chunk_length(self: HTTPResponse) -> None: + super_update_chunk_length() + if self.chunk_left == 0: + self._fp._close() # type: ignore[union-attr] + + response._update_chunk_length = types.MethodType( # type: ignore[method-assign] + _update_chunk_length, response + ) + + resp: Response = super().build_response(request, response) + + # See if we should invalidate the cache. + if request.method in self.invalidating_methods and resp.ok: + assert request.url is not None + cache_url = self.controller.cache_url(request.url) + self.cache.delete(cache_url) + + # Give the request a from_cache attr to let people use it + resp.from_cache = from_cache # type: ignore[attr-defined] + + return resp + + def close(self) -> None: + self.cache.close() + super().close() # type: ignore[no-untyped-call] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py new file mode 100644 index 0000000000000000000000000000000000000000..91598e92034fa4f70353fbf7c9c19dc9558e320b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py @@ -0,0 +1,75 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 + +""" +The cache object API for implementing caches. The default is a thread +safe in-memory dictionary. +""" + +from __future__ import annotations + +from threading import Lock +from typing import IO, TYPE_CHECKING, MutableMapping + +if TYPE_CHECKING: + from datetime import datetime + + +class BaseCache: + def get(self, key: str) -> bytes | None: + raise NotImplementedError() + + def set( + self, key: str, value: bytes, expires: int | datetime | None = None + ) -> None: + raise NotImplementedError() + + def delete(self, key: str) -> None: + raise NotImplementedError() + + def close(self) -> None: + pass + + +class DictCache(BaseCache): + def __init__(self, init_dict: MutableMapping[str, bytes] | None = None) -> None: + self.lock = Lock() + self.data = init_dict or {} + + def get(self, key: str) -> bytes | None: + return self.data.get(key, None) + + def set( + self, key: str, value: bytes, expires: int | datetime | None = None + ) -> None: + with self.lock: + self.data.update({key: value}) + + def delete(self, key: str) -> None: + with self.lock: + if key in self.data: + self.data.pop(key) + + +class SeparateBodyBaseCache(BaseCache): + """ + In this variant, the body is not stored mixed in with the metadata, but is + passed in (as a bytes-like object) in a separate call to ``set_body()``. + + That is, the expected interaction pattern is:: + + cache.set(key, serialized_metadata) + cache.set_body(key) + + Similarly, the body should be loaded separately via ``get_body()``. + """ + + def set_body(self, key: str, body: bytes) -> None: + raise NotImplementedError() + + def get_body(self, key: str) -> IO[bytes] | None: + """ + Return the body as file-like object. + """ + raise NotImplementedError() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..24ff469ff98baf5a4457ba6a34330be310058cb4 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 + +from pip._vendor.cachecontrol.caches.file_cache import FileCache, SeparateBodyFileCache +from pip._vendor.cachecontrol.caches.redis_cache import RedisCache + +__all__ = ["FileCache", "SeparateBodyFileCache", "RedisCache"] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f84b6a4f897cf78f02e38186230a37dcf2d9fa11 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc44978ee00b471e0f08d590c476ec7c30ec2021 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2439075158053f3efaa0758bc723f7f71119ca2d Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py new file mode 100644 index 0000000000000000000000000000000000000000..81d2ef46cf8e9556f1bd2d03b42bc51a3ccfcf5a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py @@ -0,0 +1,182 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import hashlib +import os +from textwrap import dedent +from typing import IO, TYPE_CHECKING +from pathlib import Path + +from pip._vendor.cachecontrol.cache import BaseCache, SeparateBodyBaseCache +from pip._vendor.cachecontrol.controller import CacheController + +if TYPE_CHECKING: + from datetime import datetime + + from filelock import BaseFileLock + + +def _secure_open_write(filename: str, fmode: int) -> IO[bytes]: + # We only want to write to this file, so open it in write only mode + flags = os.O_WRONLY + + # os.O_CREAT | os.O_EXCL will fail if the file already exists, so we only + # will open *new* files. + # We specify this because we want to ensure that the mode we pass is the + # mode of the file. + flags |= os.O_CREAT | os.O_EXCL + + # Do not follow symlinks to prevent someone from making a symlink that + # we follow and insecurely open a cache file. + if hasattr(os, "O_NOFOLLOW"): + flags |= os.O_NOFOLLOW + + # On Windows we'll mark this file as binary + if hasattr(os, "O_BINARY"): + flags |= os.O_BINARY + + # Before we open our file, we want to delete any existing file that is + # there + try: + os.remove(filename) + except OSError: + # The file must not exist already, so we can just skip ahead to opening + pass + + # Open our file, the use of os.O_CREAT | os.O_EXCL will ensure that if a + # race condition happens between the os.remove and this line, that an + # error will be raised. Because we utilize a lockfile this should only + # happen if someone is attempting to attack us. + fd = os.open(filename, flags, fmode) + try: + return os.fdopen(fd, "wb") + + except: + # An error occurred wrapping our FD in a file object + os.close(fd) + raise + + +class _FileCacheMixin: + """Shared implementation for both FileCache variants.""" + + def __init__( + self, + directory: str | Path, + forever: bool = False, + filemode: int = 0o0600, + dirmode: int = 0o0700, + lock_class: type[BaseFileLock] | None = None, + ) -> None: + try: + if lock_class is None: + from filelock import FileLock + + lock_class = FileLock + except ImportError: + notice = dedent( + """ + NOTE: In order to use the FileCache you must have + filelock installed. You can install it via pip: + pip install cachecontrol[filecache] + """ + ) + raise ImportError(notice) + + self.directory = directory + self.forever = forever + self.filemode = filemode + self.dirmode = dirmode + self.lock_class = lock_class + + @staticmethod + def encode(x: str) -> str: + return hashlib.sha224(x.encode()).hexdigest() + + def _fn(self, name: str) -> str: + # NOTE: This method should not change as some may depend on it. + # See: https://github.com/ionrock/cachecontrol/issues/63 + hashed = self.encode(name) + parts = list(hashed[:5]) + [hashed] + return os.path.join(self.directory, *parts) + + def get(self, key: str) -> bytes | None: + name = self._fn(key) + try: + with open(name, "rb") as fh: + return fh.read() + + except FileNotFoundError: + return None + + def set( + self, key: str, value: bytes, expires: int | datetime | None = None + ) -> None: + name = self._fn(key) + self._write(name, value) + + def _write(self, path: str, data: bytes) -> None: + """ + Safely write the data to the given path. + """ + # Make sure the directory exists + try: + os.makedirs(os.path.dirname(path), self.dirmode) + except OSError: + pass + + with self.lock_class(path + ".lock"): + # Write our actual file + with _secure_open_write(path, self.filemode) as fh: + fh.write(data) + + def _delete(self, key: str, suffix: str) -> None: + name = self._fn(key) + suffix + if not self.forever: + try: + os.remove(name) + except FileNotFoundError: + pass + + +class FileCache(_FileCacheMixin, BaseCache): + """ + Traditional FileCache: body is stored in memory, so not suitable for large + downloads. + """ + + def delete(self, key: str) -> None: + self._delete(key, "") + + +class SeparateBodyFileCache(_FileCacheMixin, SeparateBodyBaseCache): + """ + Memory-efficient FileCache: body is stored in a separate file, reducing + peak memory usage. + """ + + def get_body(self, key: str) -> IO[bytes] | None: + name = self._fn(key) + ".body" + try: + return open(name, "rb") + except FileNotFoundError: + return None + + def set_body(self, key: str, body: bytes) -> None: + name = self._fn(key) + ".body" + self._write(name, body) + + def delete(self, key: str) -> None: + self._delete(key, "") + self._delete(key, ".body") + + +def url_to_file_path(url: str, filecache: FileCache) -> str: + """Return the file cache path based on the URL. + + This does not ensure the file exists! + """ + key = CacheController.cache_url(url) + return filecache._fn(key) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py new file mode 100644 index 0000000000000000000000000000000000000000..f4f68c47bf6e82b3faea0bd558852585f5f50a81 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + + +from datetime import datetime, timezone +from typing import TYPE_CHECKING + +from pip._vendor.cachecontrol.cache import BaseCache + +if TYPE_CHECKING: + from redis import Redis + + +class RedisCache(BaseCache): + def __init__(self, conn: Redis[bytes]) -> None: + self.conn = conn + + def get(self, key: str) -> bytes | None: + return self.conn.get(key) + + def set( + self, key: str, value: bytes, expires: int | datetime | None = None + ) -> None: + if not expires: + self.conn.set(key, value) + elif isinstance(expires, datetime): + now_utc = datetime.now(timezone.utc) + if expires.tzinfo is None: + now_utc = now_utc.replace(tzinfo=None) + delta = expires - now_utc + self.conn.setex(key, int(delta.total_seconds()), value) + else: + self.conn.setex(key, expires, value) + + def delete(self, key: str) -> None: + self.conn.delete(key) + + def clear(self) -> None: + """Helper for clearing all the keys in a database. Use with + caution!""" + for key in self.conn.keys(): + self.conn.delete(key) + + def close(self) -> None: + """Redis uses connection pooling, no need to close the connection.""" + pass diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ff6e1bedcca5d5bc741c85ae4c0be9f4a2861c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py @@ -0,0 +1,500 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 + +""" +The httplib2 algorithms ported for use with requests. +""" + +from __future__ import annotations + +import calendar +import logging +import re +import time +from email.utils import parsedate_tz +from typing import TYPE_CHECKING, Collection, Mapping + +from pip._vendor.requests.structures import CaseInsensitiveDict + +from pip._vendor.cachecontrol.cache import DictCache, SeparateBodyBaseCache +from pip._vendor.cachecontrol.serialize import Serializer + +if TYPE_CHECKING: + from typing import Literal + + from pip._vendor.requests import PreparedRequest + from pip._vendor.urllib3 import HTTPResponse + + from pip._vendor.cachecontrol.cache import BaseCache + +logger = logging.getLogger(__name__) + +URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?") + +PERMANENT_REDIRECT_STATUSES = (301, 308) + + +def parse_uri(uri: str) -> tuple[str, str, str, str, str]: + """Parses a URI using the regex given in Appendix B of RFC 3986. + + (scheme, authority, path, query, fragment) = parse_uri(uri) + """ + match = URI.match(uri) + assert match is not None + groups = match.groups() + return (groups[1], groups[3], groups[4], groups[6], groups[8]) + + +class CacheController: + """An interface to see if request should cached or not.""" + + def __init__( + self, + cache: BaseCache | None = None, + cache_etags: bool = True, + serializer: Serializer | None = None, + status_codes: Collection[int] | None = None, + ): + self.cache = DictCache() if cache is None else cache + self.cache_etags = cache_etags + self.serializer = serializer or Serializer() + self.cacheable_status_codes = status_codes or (200, 203, 300, 301, 308) + + @classmethod + def _urlnorm(cls, uri: str) -> str: + """Normalize the URL to create a safe key for the cache""" + (scheme, authority, path, query, fragment) = parse_uri(uri) + if not scheme or not authority: + raise Exception("Only absolute URIs are allowed. uri = %s" % uri) + + scheme = scheme.lower() + authority = authority.lower() + + if not path: + path = "/" + + # Could do syntax based normalization of the URI before + # computing the digest. See Section 6.2.2 of Std 66. + request_uri = query and "?".join([path, query]) or path + defrag_uri = scheme + "://" + authority + request_uri + + return defrag_uri + + @classmethod + def cache_url(cls, uri: str) -> str: + return cls._urlnorm(uri) + + def parse_cache_control(self, headers: Mapping[str, str]) -> dict[str, int | None]: + known_directives = { + # https://tools.ietf.org/html/rfc7234#section-5.2 + "max-age": (int, True), + "max-stale": (int, False), + "min-fresh": (int, True), + "no-cache": (None, False), + "no-store": (None, False), + "no-transform": (None, False), + "only-if-cached": (None, False), + "must-revalidate": (None, False), + "public": (None, False), + "private": (None, False), + "proxy-revalidate": (None, False), + "s-maxage": (int, True), + } + + cc_headers = headers.get("cache-control", headers.get("Cache-Control", "")) + + retval: dict[str, int | None] = {} + + for cc_directive in cc_headers.split(","): + if not cc_directive.strip(): + continue + + parts = cc_directive.split("=", 1) + directive = parts[0].strip() + + try: + typ, required = known_directives[directive] + except KeyError: + logger.debug("Ignoring unknown cache-control directive: %s", directive) + continue + + if not typ or not required: + retval[directive] = None + if typ: + try: + retval[directive] = typ(parts[1].strip()) + except IndexError: + if required: + logger.debug( + "Missing value for cache-control " "directive: %s", + directive, + ) + except ValueError: + logger.debug( + "Invalid value for cache-control directive " "%s, must be %s", + directive, + typ.__name__, + ) + + return retval + + def _load_from_cache(self, request: PreparedRequest) -> HTTPResponse | None: + """ + Load a cached response, or return None if it's not available. + """ + # We do not support caching of partial content: so if the request contains a + # Range header then we don't want to load anything from the cache. + if "Range" in request.headers: + return None + + cache_url = request.url + assert cache_url is not None + cache_data = self.cache.get(cache_url) + if cache_data is None: + logger.debug("No cache entry available") + return None + + if isinstance(self.cache, SeparateBodyBaseCache): + body_file = self.cache.get_body(cache_url) + else: + body_file = None + + result = self.serializer.loads(request, cache_data, body_file) + if result is None: + logger.warning("Cache entry deserialization failed, entry ignored") + return result + + def cached_request(self, request: PreparedRequest) -> HTTPResponse | Literal[False]: + """ + Return a cached response if it exists in the cache, otherwise + return False. + """ + assert request.url is not None + cache_url = self.cache_url(request.url) + logger.debug('Looking up "%s" in the cache', cache_url) + cc = self.parse_cache_control(request.headers) + + # Bail out if the request insists on fresh data + if "no-cache" in cc: + logger.debug('Request header has "no-cache", cache bypassed') + return False + + if "max-age" in cc and cc["max-age"] == 0: + logger.debug('Request header has "max_age" as 0, cache bypassed') + return False + + # Check whether we can load the response from the cache: + resp = self._load_from_cache(request) + if not resp: + return False + + # If we have a cached permanent redirect, return it immediately. We + # don't need to test our response for other headers b/c it is + # intrinsically "cacheable" as it is Permanent. + # + # See: + # https://tools.ietf.org/html/rfc7231#section-6.4.2 + # + # Client can try to refresh the value by repeating the request + # with cache busting headers as usual (ie no-cache). + if int(resp.status) in PERMANENT_REDIRECT_STATUSES: + msg = ( + "Returning cached permanent redirect response " + "(ignoring date and etag information)" + ) + logger.debug(msg) + return resp + + headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers) + if not headers or "date" not in headers: + if "etag" not in headers: + # Without date or etag, the cached response can never be used + # and should be deleted. + logger.debug("Purging cached response: no date or etag") + self.cache.delete(cache_url) + logger.debug("Ignoring cached response: no date") + return False + + now = time.time() + time_tuple = parsedate_tz(headers["date"]) + assert time_tuple is not None + date = calendar.timegm(time_tuple[:6]) + current_age = max(0, now - date) + logger.debug("Current age based on date: %i", current_age) + + # TODO: There is an assumption that the result will be a + # urllib3 response object. This may not be best since we + # could probably avoid instantiating or constructing the + # response until we know we need it. + resp_cc = self.parse_cache_control(headers) + + # determine freshness + freshness_lifetime = 0 + + # Check the max-age pragma in the cache control header + max_age = resp_cc.get("max-age") + if max_age is not None: + freshness_lifetime = max_age + logger.debug("Freshness lifetime from max-age: %i", freshness_lifetime) + + # If there isn't a max-age, check for an expires header + elif "expires" in headers: + expires = parsedate_tz(headers["expires"]) + if expires is not None: + expire_time = calendar.timegm(expires[:6]) - date + freshness_lifetime = max(0, expire_time) + logger.debug("Freshness lifetime from expires: %i", freshness_lifetime) + + # Determine if we are setting freshness limit in the + # request. Note, this overrides what was in the response. + max_age = cc.get("max-age") + if max_age is not None: + freshness_lifetime = max_age + logger.debug( + "Freshness lifetime from request max-age: %i", freshness_lifetime + ) + + min_fresh = cc.get("min-fresh") + if min_fresh is not None: + # adjust our current age by our min fresh + current_age += min_fresh + logger.debug("Adjusted current age from min-fresh: %i", current_age) + + # Return entry if it is fresh enough + if freshness_lifetime > current_age: + logger.debug('The response is "fresh", returning cached response') + logger.debug("%i > %i", freshness_lifetime, current_age) + return resp + + # we're not fresh. If we don't have an Etag, clear it out + if "etag" not in headers: + logger.debug('The cached response is "stale" with no etag, purging') + self.cache.delete(cache_url) + + # return the original handler + return False + + def conditional_headers(self, request: PreparedRequest) -> dict[str, str]: + resp = self._load_from_cache(request) + new_headers = {} + + if resp: + headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers) + + if "etag" in headers: + new_headers["If-None-Match"] = headers["ETag"] + + if "last-modified" in headers: + new_headers["If-Modified-Since"] = headers["Last-Modified"] + + return new_headers + + def _cache_set( + self, + cache_url: str, + request: PreparedRequest, + response: HTTPResponse, + body: bytes | None = None, + expires_time: int | None = None, + ) -> None: + """ + Store the data in the cache. + """ + if isinstance(self.cache, SeparateBodyBaseCache): + # We pass in the body separately; just put a placeholder empty + # string in the metadata. + self.cache.set( + cache_url, + self.serializer.dumps(request, response, b""), + expires=expires_time, + ) + # body is None can happen when, for example, we're only updating + # headers, as is the case in update_cached_response(). + if body is not None: + self.cache.set_body(cache_url, body) + else: + self.cache.set( + cache_url, + self.serializer.dumps(request, response, body), + expires=expires_time, + ) + + def cache_response( + self, + request: PreparedRequest, + response: HTTPResponse, + body: bytes | None = None, + status_codes: Collection[int] | None = None, + ) -> None: + """ + Algorithm for caching requests. + + This assumes a requests Response object. + """ + # From httplib2: Don't cache 206's since we aren't going to + # handle byte range requests + cacheable_status_codes = status_codes or self.cacheable_status_codes + if response.status not in cacheable_status_codes: + logger.debug( + "Status code %s not in %s", response.status, cacheable_status_codes + ) + return + + response_headers: CaseInsensitiveDict[str] = CaseInsensitiveDict( + response.headers + ) + + if "date" in response_headers: + time_tuple = parsedate_tz(response_headers["date"]) + assert time_tuple is not None + date = calendar.timegm(time_tuple[:6]) + else: + date = 0 + + # If we've been given a body, our response has a Content-Length, that + # Content-Length is valid then we can check to see if the body we've + # been given matches the expected size, and if it doesn't we'll just + # skip trying to cache it. + if ( + body is not None + and "content-length" in response_headers + and response_headers["content-length"].isdigit() + and int(response_headers["content-length"]) != len(body) + ): + return + + cc_req = self.parse_cache_control(request.headers) + cc = self.parse_cache_control(response_headers) + + assert request.url is not None + cache_url = self.cache_url(request.url) + logger.debug('Updating cache with response from "%s"', cache_url) + + # Delete it from the cache if we happen to have it stored there + no_store = False + if "no-store" in cc: + no_store = True + logger.debug('Response header has "no-store"') + if "no-store" in cc_req: + no_store = True + logger.debug('Request header has "no-store"') + if no_store and self.cache.get(cache_url): + logger.debug('Purging existing cache entry to honor "no-store"') + self.cache.delete(cache_url) + if no_store: + return + + # https://tools.ietf.org/html/rfc7234#section-4.1: + # A Vary header field-value of "*" always fails to match. + # Storing such a response leads to a deserialization warning + # during cache lookup and is not allowed to ever be served, + # so storing it can be avoided. + if "*" in response_headers.get("vary", ""): + logger.debug('Response header has "Vary: *"') + return + + # If we've been given an etag, then keep the response + if self.cache_etags and "etag" in response_headers: + expires_time = 0 + if response_headers.get("expires"): + expires = parsedate_tz(response_headers["expires"]) + if expires is not None: + expires_time = calendar.timegm(expires[:6]) - date + + expires_time = max(expires_time, 14 * 86400) + + logger.debug(f"etag object cached for {expires_time} seconds") + logger.debug("Caching due to etag") + self._cache_set(cache_url, request, response, body, expires_time) + + # Add to the cache any permanent redirects. We do this before looking + # that the Date headers. + elif int(response.status) in PERMANENT_REDIRECT_STATUSES: + logger.debug("Caching permanent redirect") + self._cache_set(cache_url, request, response, b"") + + # Add to the cache if the response headers demand it. If there + # is no date header then we can't do anything about expiring + # the cache. + elif "date" in response_headers: + time_tuple = parsedate_tz(response_headers["date"]) + assert time_tuple is not None + date = calendar.timegm(time_tuple[:6]) + # cache when there is a max-age > 0 + max_age = cc.get("max-age") + if max_age is not None and max_age > 0: + logger.debug("Caching b/c date exists and max-age > 0") + expires_time = max_age + self._cache_set( + cache_url, + request, + response, + body, + expires_time, + ) + + # If the request can expire, it means we should cache it + # in the meantime. + elif "expires" in response_headers: + if response_headers["expires"]: + expires = parsedate_tz(response_headers["expires"]) + if expires is not None: + expires_time = calendar.timegm(expires[:6]) - date + else: + expires_time = None + + logger.debug( + "Caching b/c of expires header. expires in {} seconds".format( + expires_time + ) + ) + self._cache_set( + cache_url, + request, + response, + body, + expires_time, + ) + + def update_cached_response( + self, request: PreparedRequest, response: HTTPResponse + ) -> HTTPResponse: + """On a 304 we will get a new set of headers that we want to + update our cached value with, assuming we have one. + + This should only ever be called when we've sent an ETag and + gotten a 304 as the response. + """ + assert request.url is not None + cache_url = self.cache_url(request.url) + cached_response = self._load_from_cache(request) + + if not cached_response: + # we didn't have a cached response + return response + + # Lets update our headers with the headers from the new request: + # http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-26#section-4.1 + # + # The server isn't supposed to send headers that would make + # the cached body invalid. But... just in case, we'll be sure + # to strip out ones we know that might be problmatic due to + # typical assumptions. + excluded_headers = ["content-length"] + + cached_response.headers.update( + { + k: v + for k, v in response.headers.items() + if k.lower() not in excluded_headers + } + ) + + # we want a 200 b/c we have content via the cache + cached_response.status = 200 + + # update our cache + self._cache_set(cache_url, request, cached_response) + + return cached_response diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..37d2fa5915e098b430d802f5a578da309b4bf87f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py @@ -0,0 +1,119 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import mmap +from tempfile import NamedTemporaryFile +from typing import TYPE_CHECKING, Any, Callable + +if TYPE_CHECKING: + from http.client import HTTPResponse + + +class CallbackFileWrapper: + """ + Small wrapper around a fp object which will tee everything read into a + buffer, and when that file is closed it will execute a callback with the + contents of that buffer. + + All attributes are proxied to the underlying file object. + + This class uses members with a double underscore (__) leading prefix so as + not to accidentally shadow an attribute. + + The data is stored in a temporary file until it is all available. As long + as the temporary files directory is disk-based (sometimes it's a + memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory + pressure is high. For small files the disk usually won't be used at all, + it'll all be in the filesystem memory cache, so there should be no + performance impact. + """ + + def __init__( + self, fp: HTTPResponse, callback: Callable[[bytes], None] | None + ) -> None: + self.__buf = NamedTemporaryFile("rb+", delete=True) + self.__fp = fp + self.__callback = callback + + def __getattr__(self, name: str) -> Any: + # The vagaries of garbage collection means that self.__fp is + # not always set. By using __getattribute__ and the private + # name[0] allows looking up the attribute value and raising an + # AttributeError when it doesn't exist. This stop things from + # infinitely recursing calls to getattr in the case where + # self.__fp hasn't been set. + # + # [0] https://docs.python.org/2/reference/expressions.html#atom-identifiers + fp = self.__getattribute__("_CallbackFileWrapper__fp") + return getattr(fp, name) + + def __is_fp_closed(self) -> bool: + try: + return self.__fp.fp is None + + except AttributeError: + pass + + try: + closed: bool = self.__fp.closed + return closed + + except AttributeError: + pass + + # We just don't cache it then. + # TODO: Add some logging here... + return False + + def _close(self) -> None: + if self.__callback: + if self.__buf.tell() == 0: + # Empty file: + result = b"" + else: + # Return the data without actually loading it into memory, + # relying on Python's buffer API and mmap(). mmap() just gives + # a view directly into the filesystem's memory cache, so it + # doesn't result in duplicate memory use. + self.__buf.seek(0, 0) + result = memoryview( + mmap.mmap(self.__buf.fileno(), 0, access=mmap.ACCESS_READ) + ) + self.__callback(result) + + # We assign this to None here, because otherwise we can get into + # really tricky problems where the CPython interpreter dead locks + # because the callback is holding a reference to something which + # has a __del__ method. Setting this to None breaks the cycle + # and allows the garbage collector to do it's thing normally. + self.__callback = None + + # Closing the temporary file releases memory and frees disk space. + # Important when caching big files. + self.__buf.close() + + def read(self, amt: int | None = None) -> bytes: + data: bytes = self.__fp.read(amt) + if data: + # We may be dealing with b'', a sign that things are over: + # it's passed e.g. after we've already closed self.__buf. + self.__buf.write(data) + if self.__is_fp_closed(): + self._close() + + return data + + def _safe_read(self, amt: int) -> bytes: + data: bytes = self.__fp._safe_read(amt) # type: ignore[attr-defined] + if amt == 2 and data == b"\r\n": + # urllib executes this read to toss the CRLF at the end + # of the chunk. + return data + + self.__buf.write(data) + if self.__is_fp_closed(): + self._close() + + return data diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py new file mode 100644 index 0000000000000000000000000000000000000000..b778c4f3f7ad5e22fca433be02a824446fb47ff5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py @@ -0,0 +1,157 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import calendar +import time +from datetime import datetime, timedelta, timezone +from email.utils import formatdate, parsedate, parsedate_tz +from typing import TYPE_CHECKING, Any, Mapping + +if TYPE_CHECKING: + from pip._vendor.urllib3 import HTTPResponse + +TIME_FMT = "%a, %d %b %Y %H:%M:%S GMT" + + +def expire_after(delta: timedelta, date: datetime | None = None) -> datetime: + date = date or datetime.now(timezone.utc) + return date + delta + + +def datetime_to_header(dt: datetime) -> str: + return formatdate(calendar.timegm(dt.timetuple())) + + +class BaseHeuristic: + def warning(self, response: HTTPResponse) -> str | None: + """ + Return a valid 1xx warning header value describing the cache + adjustments. + + The response is provided too allow warnings like 113 + http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need + to explicitly say response is over 24 hours old. + """ + return '110 - "Response is Stale"' + + def update_headers(self, response: HTTPResponse) -> dict[str, str]: + """Update the response headers with any new headers. + + NOTE: This SHOULD always include some Warning header to + signify that the response was cached by the client, not + by way of the provided headers. + """ + return {} + + def apply(self, response: HTTPResponse) -> HTTPResponse: + updated_headers = self.update_headers(response) + + if updated_headers: + response.headers.update(updated_headers) + warning_header_value = self.warning(response) + if warning_header_value is not None: + response.headers.update({"Warning": warning_header_value}) + + return response + + +class OneDayCache(BaseHeuristic): + """ + Cache the response by providing an expires 1 day in the + future. + """ + + def update_headers(self, response: HTTPResponse) -> dict[str, str]: + headers = {} + + if "expires" not in response.headers: + date = parsedate(response.headers["date"]) + expires = expire_after( + timedelta(days=1), + date=datetime(*date[:6], tzinfo=timezone.utc), # type: ignore[index,misc] + ) + headers["expires"] = datetime_to_header(expires) + headers["cache-control"] = "public" + return headers + + +class ExpiresAfter(BaseHeuristic): + """ + Cache **all** requests for a defined time period. + """ + + def __init__(self, **kw: Any) -> None: + self.delta = timedelta(**kw) + + def update_headers(self, response: HTTPResponse) -> dict[str, str]: + expires = expire_after(self.delta) + return {"expires": datetime_to_header(expires), "cache-control": "public"} + + def warning(self, response: HTTPResponse) -> str | None: + tmpl = "110 - Automatically cached for %s. Response might be stale" + return tmpl % self.delta + + +class LastModified(BaseHeuristic): + """ + If there is no Expires header already, fall back on Last-Modified + using the heuristic from + http://tools.ietf.org/html/rfc7234#section-4.2.2 + to calculate a reasonable value. + + Firefox also does something like this per + https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ + http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397 + Unlike mozilla we limit this to 24-hr. + """ + + cacheable_by_default_statuses = { + 200, + 203, + 204, + 206, + 300, + 301, + 404, + 405, + 410, + 414, + 501, + } + + def update_headers(self, resp: HTTPResponse) -> dict[str, str]: + headers: Mapping[str, str] = resp.headers + + if "expires" in headers: + return {} + + if "cache-control" in headers and headers["cache-control"] != "public": + return {} + + if resp.status not in self.cacheable_by_default_statuses: + return {} + + if "date" not in headers or "last-modified" not in headers: + return {} + + time_tuple = parsedate_tz(headers["date"]) + assert time_tuple is not None + date = calendar.timegm(time_tuple[:6]) + last_modified = parsedate(headers["last-modified"]) + if last_modified is None: + return {} + + now = time.time() + current_age = max(0, now - date) + delta = date - calendar.timegm(last_modified) + freshness_lifetime = max(0, min(delta / 10, 24 * 3600)) + if freshness_lifetime <= current_age: + return {} + + expires = date + freshness_lifetime + return {"expires": time.strftime(TIME_FMT, time.gmtime(expires))} + + def warning(self, resp: HTTPResponse) -> str | None: + return None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py new file mode 100644 index 0000000000000000000000000000000000000000..a49487a1493f9bbd160645ea4e491b4ac54a19a9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py @@ -0,0 +1,146 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +import io +from typing import IO, TYPE_CHECKING, Any, Mapping, cast + +from pip._vendor import msgpack +from pip._vendor.requests.structures import CaseInsensitiveDict +from pip._vendor.urllib3 import HTTPResponse + +if TYPE_CHECKING: + from pip._vendor.requests import PreparedRequest + + +class Serializer: + serde_version = "4" + + def dumps( + self, + request: PreparedRequest, + response: HTTPResponse, + body: bytes | None = None, + ) -> bytes: + response_headers: CaseInsensitiveDict[str] = CaseInsensitiveDict( + response.headers + ) + + if body is None: + # When a body isn't passed in, we'll read the response. We + # also update the response with a new file handler to be + # sure it acts as though it was never read. + body = response.read(decode_content=False) + response._fp = io.BytesIO(body) # type: ignore[assignment] + response.length_remaining = len(body) + + data = { + "response": { + "body": body, # Empty bytestring if body is stored separately + "headers": {str(k): str(v) for k, v in response.headers.items()}, + "status": response.status, + "version": response.version, + "reason": str(response.reason), + "decode_content": response.decode_content, + } + } + + # Construct our vary headers + data["vary"] = {} + if "vary" in response_headers: + varied_headers = response_headers["vary"].split(",") + for header in varied_headers: + header = str(header).strip() + header_value = request.headers.get(header, None) + if header_value is not None: + header_value = str(header_value) + data["vary"][header] = header_value + + return b",".join([f"cc={self.serde_version}".encode(), self.serialize(data)]) + + def serialize(self, data: dict[str, Any]) -> bytes: + return cast(bytes, msgpack.dumps(data, use_bin_type=True)) + + def loads( + self, + request: PreparedRequest, + data: bytes, + body_file: IO[bytes] | None = None, + ) -> HTTPResponse | None: + # Short circuit if we've been given an empty set of data + if not data: + return None + + # Previous versions of this library supported other serialization + # formats, but these have all been removed. + if not data.startswith(f"cc={self.serde_version},".encode()): + return None + + data = data[5:] + return self._loads_v4(request, data, body_file) + + def prepare_response( + self, + request: PreparedRequest, + cached: Mapping[str, Any], + body_file: IO[bytes] | None = None, + ) -> HTTPResponse | None: + """Verify our vary headers match and construct a real urllib3 + HTTPResponse object. + """ + # Special case the '*' Vary value as it means we cannot actually + # determine if the cached response is suitable for this request. + # This case is also handled in the controller code when creating + # a cache entry, but is left here for backwards compatibility. + if "*" in cached.get("vary", {}): + return None + + # Ensure that the Vary headers for the cached response match our + # request + for header, value in cached.get("vary", {}).items(): + if request.headers.get(header, None) != value: + return None + + body_raw = cached["response"].pop("body") + + headers: CaseInsensitiveDict[str] = CaseInsensitiveDict( + data=cached["response"]["headers"] + ) + if headers.get("transfer-encoding", "") == "chunked": + headers.pop("transfer-encoding") + + cached["response"]["headers"] = headers + + try: + body: IO[bytes] + if body_file is None: + body = io.BytesIO(body_raw) + else: + body = body_file + except TypeError: + # This can happen if cachecontrol serialized to v1 format (pickle) + # using Python 2. A Python 2 str(byte string) will be unpickled as + # a Python 3 str (unicode string), which will cause the above to + # fail with: + # + # TypeError: 'str' does not support the buffer interface + body = io.BytesIO(body_raw.encode("utf8")) + + # Discard any `strict` parameter serialized by older version of cachecontrol. + cached["response"].pop("strict", None) + + return HTTPResponse(body=body, preload_content=False, **cached["response"]) + + def _loads_v4( + self, + request: PreparedRequest, + data: bytes, + body_file: IO[bytes] | None = None, + ) -> HTTPResponse | None: + try: + cached = msgpack.loads(data, raw=False) + except ValueError: + return None + + return self.prepare_response(request, cached, body_file) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..f618bc363f12fb416b048e2a86cbddb6082874d6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: 2015 Eric Larson +# +# SPDX-License-Identifier: Apache-2.0 +from __future__ import annotations + +from typing import TYPE_CHECKING, Collection + +from pip._vendor.cachecontrol.adapter import CacheControlAdapter +from pip._vendor.cachecontrol.cache import DictCache + +if TYPE_CHECKING: + from pip._vendor import requests + + from pip._vendor.cachecontrol.cache import BaseCache + from pip._vendor.cachecontrol.controller import CacheController + from pip._vendor.cachecontrol.heuristics import BaseHeuristic + from pip._vendor.cachecontrol.serialize import Serializer + + +def CacheControl( + sess: requests.Session, + cache: BaseCache | None = None, + cache_etags: bool = True, + serializer: Serializer | None = None, + heuristic: BaseHeuristic | None = None, + controller_class: type[CacheController] | None = None, + adapter_class: type[CacheControlAdapter] | None = None, + cacheable_methods: Collection[str] | None = None, +) -> requests.Session: + cache = DictCache() if cache is None else cache + adapter_class = adapter_class or CacheControlAdapter + adapter = adapter_class( + cache, + cache_etags=cache_etags, + serializer=serializer, + heuristic=heuristic, + controller_class=controller_class, + cacheable_methods=cacheable_methods, + ) + sess.mount("http://", adapter) + sess.mount("https://", adapter) + + return sess diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f61d77fa382e836d69b48f93752b9b9e803483e1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py @@ -0,0 +1,4 @@ +from .core import contents, where + +__all__ = ["contents", "where"] +__version__ = "2024.08.30" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..00376349e69ad8b9dbf401cddc34055951e4b02e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py @@ -0,0 +1,12 @@ +import argparse + +from pip._vendor.certifi import contents, where + +parser = argparse.ArgumentParser() +parser.add_argument("-c", "--contents", action="store_true") +args = parser.parse_args() + +if args.contents: + print(contents()) +else: + print(where()) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2714f7c4dc23b16ba37050891a59ef7eea1cdc4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..af023f020104c136ce759bc120f15270310cdc0a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..099ceb072a1f9521680320eecafe4c733db1434d Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem new file mode 100644 index 0000000000000000000000000000000000000000..3c165a1b85e5fd8940bddbf2349c24ae2b4f314b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem @@ -0,0 +1,4929 @@ + +# Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA +# Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA +# Label: "GlobalSign Root CA" +# Serial: 4835703278459707669005204 +# MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a +# SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c +# SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99 +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG +A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv +b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw +MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i +YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT +aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ +jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp +xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp +1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG +snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ +U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8 +9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E +BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B +AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz +yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE +38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP +AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad +DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME +HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +# Issuer: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited +# Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited +# Label: "Entrust.net Premium 2048 Secure Server CA" +# Serial: 946069240 +# MD5 Fingerprint: ee:29:31:bc:32:7e:9a:e6:e8:b5:f7:51:b4:34:71:90 +# SHA1 Fingerprint: 50:30:06:09:1d:97:d4:f5:ae:39:f7:cb:e7:92:7d:7d:65:2d:34:31 +# SHA256 Fingerprint: 6d:c4:71:72:e0:1c:bc:b0:bf:62:58:0d:89:5f:e2:b8:ac:9a:d4:f8:73:80:1e:0c:10:b9:c8:37:d2:1e:b1:77 +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML +RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp +bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5 +IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3 +MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3 +LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp +YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG +A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq +K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe +sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX +MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT +XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/ +HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH +4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV +HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub +j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo +U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b +u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+ +bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er +fF6adulZkMV8gzURZVE= +-----END CERTIFICATE----- + +# Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust +# Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust +# Label: "Baltimore CyberTrust Root" +# Serial: 33554617 +# MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4 +# SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74 +# SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ +RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD +VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX +DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y +ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy +VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr +mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr +IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK +mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu +XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy +dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye +jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 +BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3 +DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92 +9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx +jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0 +Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz +ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS +R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +# Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc. +# Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc. +# Label: "Entrust Root Certification Authority" +# Serial: 1164660820 +# MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4 +# SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9 +# SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0 +Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW +KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw +NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw +NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy +ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV +BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo +Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4 +4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9 +KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI +rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi +94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB +sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi +gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo +kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE +vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA +A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t +O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua +AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP +9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/ +eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m +0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +# Issuer: CN=AAA Certificate Services O=Comodo CA Limited +# Subject: CN=AAA Certificate Services O=Comodo CA Limited +# Label: "Comodo AAA Services root" +# Serial: 1 +# MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0 +# SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49 +# SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4 +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb +MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow +GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj +YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL +MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE +BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM +GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua +BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe +3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4 +YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR +rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm +ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU +oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v +QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t +b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF +AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q +GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2 +G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi +l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3 +smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +# Issuer: CN=QuoVadis Root CA 2 O=QuoVadis Limited +# Subject: CN=QuoVadis Root CA 2 O=QuoVadis Limited +# Label: "QuoVadis Root CA 2" +# Serial: 1289 +# MD5 Fingerprint: 5e:39:7b:dd:f8:ba:ec:82:e9:ac:62:ba:0c:54:00:2b +# SHA1 Fingerprint: ca:3a:fb:cf:12:40:36:4b:44:b2:16:20:88:80:48:39:19:93:7c:f7 +# SHA256 Fingerprint: 85:a0:dd:7d:d7:20:ad:b7:ff:05:f8:3d:54:2b:20:9d:c7:ff:45:28:f7:d6:77:b1:83:89:fe:a5:e5:c4:9e:86 +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x +GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv +b3QgQ0EgMjAeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV +BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W +YWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCa +GMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6XJxg +Fyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55J +WpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bB +rrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp ++ARz8un+XJiM9XOva7R+zdRcAitMOeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1 +ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i +Ucw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz +PtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og +/zOhD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH +oycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuI +yV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1Ud +EwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBQahGK8SEwzJQTU7tD2 +A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL +MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT +ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f +BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn +g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl +fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K +WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha +B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc +hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR +TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD +mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z +ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y +4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza +8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +# Issuer: CN=QuoVadis Root CA 3 O=QuoVadis Limited +# Subject: CN=QuoVadis Root CA 3 O=QuoVadis Limited +# Label: "QuoVadis Root CA 3" +# Serial: 1478 +# MD5 Fingerprint: 31:85:3c:62:94:97:63:b9:aa:fd:89:4e:af:6f:e0:cf +# SHA1 Fingerprint: 1f:49:14:f7:d8:74:95:1d:dd:ae:02:c0:be:fd:3a:2d:82:75:51:85 +# SHA256 Fingerprint: 18:f1:fc:7f:20:5d:f8:ad:dd:eb:7f:e0:07:dd:57:e3:af:37:5a:9c:4d:8d:73:54:6b:f4:f1:fe:d1:e1:8d:35 +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x +GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv +b3QgQ0EgMzAeFw0wNjExMjQxOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNV +BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W +YWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDM +V0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNggDhoB +4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUr +H556VOijKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd +8lyyBTNvijbO0BNO/79KDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9Cabwv +vWhDFlaJKjdhkf2mrk7AyxRllDdLkgbvBNDInIjbC3uBr7E9KsRlOni27tyAsdLT +mZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwpp5ijJUMv7/FfJuGITfhe +btfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8nT8KKdjc +T5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDt +WAEXMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZ +c6tsgLjoC2SToJyMGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A +4iLItLRkT9a6fUg+qGkM17uGcclzuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYD +VR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHTBgkrBgEEAb5YAAMwgcUwgZMG +CCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmljYXRlIGNvbnN0 +aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 +aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu +dC4wLQYIKwYBBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2Nw +czALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4G +A1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4ywLQoUmkRzBFMQswCQYDVQQGEwJC +TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UEAxMSUXVvVmFkaXMg +Um9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZVqyM0 +7ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSem +d1o417+shvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd ++LJ2w/w4E6oM3kJpK27zPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B +4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadN +t54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp8kokUvd0/bpO5qgdAm6x +DYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBCbjPsMZ57 +k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6s +zHXug/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0j +Wy10QJLZYxkNc91pvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeT +mJlglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK +4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +# Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com +# Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com +# Label: "XRamp Global CA Root" +# Serial: 107108908803651509692980124233745014957 +# MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1 +# SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6 +# SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2 +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB +gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk +MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY +UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx +NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3 +dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy +dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6 +38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP +KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q +DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4 +qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa +JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi +PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P +BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs +jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0 +eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD +ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR +vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa +IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy +i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ +O+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +# Issuer: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority +# Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority +# Label: "Go Daddy Class 2 CA" +# Serial: 0 +# MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67 +# SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4 +# SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4 +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh +MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE +YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3 +MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo +ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg +MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN +ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA +PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w +wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi +EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY +avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+ +YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE +sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h +/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5 +IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD +ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy +OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P +TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER +dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf +ReYNnyicsbkqWletNw+vHX/bvZ8= +-----END CERTIFICATE----- + +# Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority +# Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority +# Label: "Starfield Class 2 CA" +# Serial: 0 +# MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24 +# SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a +# SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58 +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl +MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp +U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw +NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE +ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp +ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 +DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf +8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN ++lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 +X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa +K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA +1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G +A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR +zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 +YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD +bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 +L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D +eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp +VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY +WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Assured ID Root CA" +# Serial: 17154717934120587862167794914071425081 +# MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72 +# SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43 +# SHA256 Fingerprint: 3e:90:99:b5:01:5e:8f:48:6c:00:bc:ea:9d:11:1e:e7:21:fa:ba:35:5a:89:bc:f1:df:69:56:1e:3d:c6:32:5c +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv +b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl +cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c +JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP +mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+ +wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4 +VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/ +AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB +AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun +pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC +dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf +fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm +NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx +H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Global Root CA" +# Serial: 10944719598952040374951832963794454346 +# MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e +# SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36 +# SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61 +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD +QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB +CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97 +nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt +43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P +T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4 +gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR +TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw +DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr +hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg +06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF +PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls +YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert High Assurance EV Root CA" +# Serial: 3553400076410547919724730734378100087 +# MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a +# SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25 +# SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j +ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 +LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug +RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm ++9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW +PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM +xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB +Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3 +hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg +EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA +FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec +nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z +eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF +hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2 +Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep ++OkuE6N36B9K +-----END CERTIFICATE----- + +# Issuer: CN=SwissSign Gold CA - G2 O=SwissSign AG +# Subject: CN=SwissSign Gold CA - G2 O=SwissSign AG +# Label: "SwissSign Gold CA - G2" +# Serial: 13492815561806991280 +# MD5 Fingerprint: 24:77:d9:a8:91:d1:3b:fa:88:2d:c2:ff:f8:cd:33:93 +# SHA1 Fingerprint: d8:c5:38:8a:b7:30:1b:1b:6e:d4:7a:e6:45:25:3a:6f:9f:1a:27:61 +# SHA256 Fingerprint: 62:dd:0b:e9:b9:f5:0a:16:3e:a0:f8:e7:5c:05:3b:1e:ca:57:ea:55:c8:68:8f:64:7c:68:81:f2:c8:35:7b:95 +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV +BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln +biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF +MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT +d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8 +76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+ +bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c +6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE +emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd +MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt +MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y +MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y +FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi +aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM +gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB +qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7 +lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn +8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov +L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6 +45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO +UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5 +O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC +bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv +GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a +77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC +hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3 +92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp +Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w +ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt +Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +# Issuer: CN=SwissSign Silver CA - G2 O=SwissSign AG +# Subject: CN=SwissSign Silver CA - G2 O=SwissSign AG +# Label: "SwissSign Silver CA - G2" +# Serial: 5700383053117599563 +# MD5 Fingerprint: e0:06:a1:c9:7d:cf:c9:fc:0d:c0:56:75:96:d8:62:13 +# SHA1 Fingerprint: 9b:aa:e5:9f:56:ee:21:cb:43:5a:be:25:93:df:a7:f0:40:d1:1d:cb +# SHA256 Fingerprint: be:6c:4d:a2:bb:b9:ba:59:b6:f3:93:97:68:37:42:46:c3:c0:05:99:3f:a9:8f:02:0d:1d:ed:be:d4:8a:81:d5 +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE +BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu +IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow +RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY +U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv +Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br +YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF +nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH +6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt +eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/ +c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ +MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH +HTBsROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTf +jNFusB3hB48IHpmccelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb6 +5i/4z3GcRm25xBWNOHkDRUjvxF3XCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOB +rDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU +F6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRBtjpbO8tFnb0c +wpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIB +AHPGgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp +WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9 +xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ +2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ +IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8 +aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X +em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR +dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/ +OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+ +hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy +tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +# Issuer: CN=SecureTrust CA O=SecureTrust Corporation +# Subject: CN=SecureTrust CA O=SecureTrust Corporation +# Label: "SecureTrust CA" +# Serial: 17199774589125277788362757014266862032 +# MD5 Fingerprint: dc:32:c3:a7:6d:25:57:c7:68:09:9d:ea:2d:a9:a2:d1 +# SHA1 Fingerprint: 87:82:c6:c3:04:35:3b:cf:d2:96:92:d2:59:3e:7d:44:d9:34:ff:11 +# SHA256 Fingerprint: f1:c1:b5:0a:e5:a2:0d:d8:03:0e:c9:f6:bc:24:82:3d:d3:67:b5:25:57:59:b4:e7:1b:61:fc:e9:f7:37:5d:73 +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBI +MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x +FzAVBgNVBAMTDlNlY3VyZVRydXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIz +MTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1NlY3VyZVRydXN0IENv +cnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQXOZEz +Zum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO +0gMdA+9tDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIao +wW8xQmxSPmjL8xk037uHGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj +7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b01k/unK8RCSc43Oz969XL0Imnal0ugBS +8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmHursCAwEAAaOBnTCBmjAT +BgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCeg +JYYjaHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGC +NxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt3 +6Z3q059c4EVlew3KW+JwULKUBRSuSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/ +3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHfmbx8IVQr5Fiiu1cprp6poxkm +D5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZnMUFdAvnZyPS +CPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR +3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= +-----END CERTIFICATE----- + +# Issuer: CN=Secure Global CA O=SecureTrust Corporation +# Subject: CN=Secure Global CA O=SecureTrust Corporation +# Label: "Secure Global CA" +# Serial: 9751836167731051554232119481456978597 +# MD5 Fingerprint: cf:f4:27:0d:d4:ed:dc:65:16:49:6d:3d:da:bf:6e:de +# SHA1 Fingerprint: 3a:44:73:5a:e5:81:90:1f:24:86:61:46:1e:3b:9c:c4:5f:f5:3a:1b +# SHA256 Fingerprint: 42:00:f5:04:3a:c8:59:0e:bb:52:7d:20:9e:d1:50:30:29:fb:cb:d4:1c:a1:b5:06:ec:27:f1:5a:de:7d:ac:69 +-----BEGIN CERTIFICATE----- +MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBK +MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x +GTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkx +MjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3Qg +Q29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jxYDiJ +iQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa +/FHtaMbQbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJ +jnIFHovdRIWCQtBJwB1g8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnI +HmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYVHDGA76oYa8J719rO+TMg1fW9ajMtgQT7 +sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi0XPnj3pDAgMBAAGjgZ0w +gZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCsw +KaAnoCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsG +AQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0L +URYD7xh8yOOvaliTFGCRsoTciE6+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXO +H0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cnCDpOGR86p1hcF895P4vkp9Mm +I50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/53CYNv6ZHdAbY +iNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +# Issuer: CN=COMODO Certification Authority O=COMODO CA Limited +# Subject: CN=COMODO Certification Authority O=COMODO CA Limited +# Label: "COMODO Certification Authority" +# Serial: 104350513648249232941998508985834464573 +# MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75 +# SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b +# SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09:11:6b:57:5b:f8:79:89:f0:65:18:f9:80:8c:86:05:03:17:8b:af:66 +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB +gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G +A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV +BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw +MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl +YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P +RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3 +UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI +2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8 +Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp ++2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+ +DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O +nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW +/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g +PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u +QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY +SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv +IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4 +zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd +BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB +ZQ== +-----END CERTIFICATE----- + +# Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited +# Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited +# Label: "COMODO ECC Certification Authority" +# Serial: 41578283867086692638256921589707938090 +# MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23 +# SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11 +# SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7 +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL +MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE +BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT +IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw +MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy +ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N +T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR +FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J +cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW +BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm +fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv +GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +# Issuer: CN=Certigna O=Dhimyotis +# Subject: CN=Certigna O=Dhimyotis +# Label: "Certigna" +# Serial: 18364802974209362175 +# MD5 Fingerprint: ab:57:a6:5b:7d:42:82:19:b5:d8:58:26:28:5e:fd:ff +# SHA1 Fingerprint: b1:2e:13:63:45:86:a4:6f:1a:b2:60:68:37:58:2d:c4:ac:fd:94:97 +# SHA256 Fingerprint: e3:b6:a2:db:2e:d7:ce:48:84:2f:7a:c5:32:41:c7:b7:1d:54:14:4b:fb:40:c1:1f:3f:1d:0b:42:f5:ee:a1:2d +-----BEGIN CERTIFICATE----- +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV +BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X +DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ +BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4 +QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny +gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw +zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q +130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2 +JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw +DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw +ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT +AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj +AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG +9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h +bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc +fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu +HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w +t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +# Issuer: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority +# Subject: O=Chunghwa Telecom Co., Ltd. OU=ePKI Root Certification Authority +# Label: "ePKI Root Certification Authority" +# Serial: 28956088682735189655030529057352760477 +# MD5 Fingerprint: 1b:2e:00:ca:26:06:90:3d:ad:fe:6f:15:68:d3:6b:b3 +# SHA1 Fingerprint: 67:65:0d:f1:7e:8e:7e:5b:82:40:a4:f4:56:4b:cf:e2:3d:69:c6:f0 +# SHA256 Fingerprint: c0:a6:f4:dc:63:a2:4b:fd:cf:54:ef:2a:6a:08:2a:0a:72:de:35:80:3e:2f:f5:ff:52:7a:e5:d8:72:06:df:d5 +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBe +MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0 +ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe +Fw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMxMjdaMF4xCzAJBgNVBAYTAlRXMSMw +IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEqMCgGA1UECwwhZVBL +SSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAH +SyZbCUNsIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAh +ijHyl3SJCRImHJ7K2RKilTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3X +DZoTM1PRYfl61dd4s5oz9wCGzh1NlDivqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1 +TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX12ruOzjjK9SXDrkb5wdJ +fzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0OWQqraffA +sgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uU +WH1+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLS +nT0IFaUQAS2zMnaolQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pH +dmX2Os+PYhcZewoozRrSgx4hxyy/vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJip +NiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXiZo1jDiVN1Rmy5nk3pyKdVDEC +AwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/QkqiMAwGA1UdEwQF +MAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGB +uvl2ICO1J2B01GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6Yl +PwZpVnPDimZI+ymBV3QGypzqKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkP +JXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdVxrsStZf0X4OFunHB2WyBEXYKCrC/ +gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEPNXubrjlpC2JgQCA2 +j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+rGNm6 +5ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUB +o2M3IUxExJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS +/jQ6fbjpKdx2qcgw+BRxgMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2z +Gp1iro2C6pSe3VkQw63d4k3jMdXH7OjysP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTE +W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D +hNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +# Issuer: O=certSIGN OU=certSIGN ROOT CA +# Subject: O=certSIGN OU=certSIGN ROOT CA +# Label: "certSIGN ROOT CA" +# Serial: 35210227249154 +# MD5 Fingerprint: 18:98:c0:d6:e9:3a:fc:f9:b0:f5:0c:f7:4b:01:44:17 +# SHA1 Fingerprint: fa:b7:ee:36:97:26:62:fb:2d:b0:2a:f6:bf:03:fd:e8:7c:4b:2f:9b +# SHA256 Fingerprint: ea:a9:62:c4:fa:4a:6b:af:eb:e4:15:19:6d:35:1c:cd:88:8d:4f:53:f3:fa:8a:e6:d7:c4:66:a9:4e:60:42:bb +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYT +AlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBD +QTAeFw0wNjA3MDQxNzIwMDRaFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJP +MREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7IJUqOtdu0KBuqV5Do +0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHHrfAQ +UySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5d +RdY4zTW2ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQ +OA7+j0xbm0bqQfWwCHTD0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwv +JoIQ4uNllAoEwF73XVv4EOLQunpL+943AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08C +AwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0O +BBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IBAQA+0hyJ +LjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecY +MnQ8SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ +44gx+FkagQnIl6Z0x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6I +Jd1hJyMctTEHBDa0GpC9oHRxUIltvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNw +i/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7NzTogVZ96edhBiIL5VaZVDADlN +9u6wWk5JRFRYX0KD +-----END CERTIFICATE----- + +# Issuer: CN=NetLock Arany (Class Gold) F\u0151tan\xfas\xedtv\xe1ny O=NetLock Kft. OU=Tan\xfas\xedtv\xe1nykiad\xf3k (Certification Services) +# Subject: CN=NetLock Arany (Class Gold) F\u0151tan\xfas\xedtv\xe1ny O=NetLock Kft. OU=Tan\xfas\xedtv\xe1nykiad\xf3k (Certification Services) +# Label: "NetLock Arany (Class Gold) F\u0151tan\xfas\xedtv\xe1ny" +# Serial: 80544274841616 +# MD5 Fingerprint: c5:a1:b7:ff:73:dd:d6:d7:34:32:18:df:fc:3c:ad:88 +# SHA1 Fingerprint: 06:08:3f:59:3f:15:a1:04:a0:69:a4:6b:a9:03:d0:06:b7:97:09:91 +# SHA256 Fingerprint: 6c:61:da:c3:a2:de:f0:31:50:6b:e0:36:d2:a6:fe:40:19:94:fb:d1:3d:f9:c8:d4:66:59:92:74:c4:46:ec:98 +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQG +EwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3 +MDUGA1UECwwuVGFuw7pzw610dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNl +cnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBBcmFueSAoQ2xhc3MgR29sZCkgRsWR +dGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgxMjA2MTUwODIxWjCB +pzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxOZXRM +b2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlm +aWNhdGlvbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNz +IEdvbGQpIEbFkXRhbsO6c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAxCRec75LbRTDofTjl5Bu0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrT +lF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw/HpYzY6b7cNGbIRwXdrz +AZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAkH3B5r9s5 +VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRG +ILdwfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2 +BJtr+UBdADTHLpl1neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAG +AQH/AgEEMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2M +U9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwWqZw8UQCgwBEIBaeZ5m8BiFRh +bvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTtaYtOUZcTh5m2C ++C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2F +uLjbvrW5KfnaNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2 +XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +# Issuer: CN=SecureSign RootCA11 O=Japan Certification Services, Inc. +# Subject: CN=SecureSign RootCA11 O=Japan Certification Services, Inc. +# Label: "SecureSign RootCA11" +# Serial: 1 +# MD5 Fingerprint: b7:52:74:e2:92:b4:80:93:f2:75:e4:cc:d7:f2:ea:26 +# SHA1 Fingerprint: 3b:c4:9f:48:f8:f3:73:a0:9c:1e:bd:f8:5b:b1:c3:65:c7:d8:11:b3 +# SHA256 Fingerprint: bf:0f:ee:fb:9e:3a:58:1a:d5:f9:e9:db:75:89:98:57:43:d2:61:08:5c:4d:31:4f:6f:5d:72:59:aa:42:16:12 +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDEr +MCkGA1UEChMiSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoG +A1UEAxMTU2VjdXJlU2lnbiBSb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0 +MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSswKQYDVQQKEyJKYXBhbiBDZXJ0aWZp +Y2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1cmVTaWduIFJvb3RD +QTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvLTJsz +i1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8 +h9uuywGOwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOV +MdrAG/LuYpmGYz+/3ZMqg6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9 +UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rPO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni +8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitAbpSACW22s293bzUIUPsC +h8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZXt94wDgYD +VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB +AKChOBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xm +KbabfSVSSUOrTC4rbnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQ +X5Ucv+2rIrVls4W6ng+4reV6G4pQOh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWr +QbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01y8hSyn+B/tlr0/cR7SXf+Of5 +pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061lgeLKBObjBmN +QSdJQO7e5iNEOdyhIta6A/I= +-----END CERTIFICATE----- + +# Issuer: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd. +# Subject: CN=Microsec e-Szigno Root CA 2009 O=Microsec Ltd. +# Label: "Microsec e-Szigno Root CA 2009" +# Serial: 14014712776195784473 +# MD5 Fingerprint: f8:49:f4:03:bc:44:2d:83:be:48:69:7d:29:64:fc:b1 +# SHA1 Fingerprint: 89:df:74:fe:5c:f4:0f:4a:80:f9:e3:37:7d:54:da:91:e1:01:31:8e +# SHA256 Fingerprint: 3c:5f:81:fe:a5:fa:b8:2c:64:bf:a2:ea:ec:af:cd:e8:e0:77:fc:86:20:a7:ca:e5:37:16:3d:f3:6e:db:f3:78 +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD +VQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0 +ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0G +CSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTAeFw0wOTA2MTYxMTMwMThaFw0y +OTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3Qx +FjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3pp +Z25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvP +kd6mJviZpWNwrZuuyjNAfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tc +cbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG0IMZfcChEhyVbUr02MelTTMuhTlAdX4U +fIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKApxn1ntxVUwOXewdI/5n7 +N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm1HxdrtbC +xkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1 ++rUCAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPM +Pcu1SCOhGnqmKrs0aDAbBgNVHREEFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqG +SIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0olZMEyL/azXm4Q5DwpL7v8u8h +mLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfXI/OMn74dseGk +ddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c +2Pm2G2JwCz02yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5t +HMN1Rq41Bab2XD0h7lbwyYIiLXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3 +# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3 +# Label: "GlobalSign Root CA - R3" +# Serial: 4835703278459759426209954 +# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28 +# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad +# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G +A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp +Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4 +MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG +A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 +RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT +gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm +KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd +QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ +XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw +DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o +LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU +RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp +jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK +6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE----- + +# Issuer: CN=Izenpe.com O=IZENPE S.A. +# Subject: CN=Izenpe.com O=IZENPE S.A. +# Label: "Izenpe.com" +# Serial: 917563065490389241595536686991402621 +# MD5 Fingerprint: a6:b0:cd:85:80:da:5c:50:34:a3:39:90:2f:55:67:73 +# SHA1 Fingerprint: 2f:78:3d:25:52:18:a7:4a:65:39:71:b5:2c:a2:9c:45:15:6f:e9:19 +# SHA256 Fingerprint: 25:30:cc:8e:98:32:15:02:ba:d9:6f:9b:1f:ba:1b:09:9e:2d:29:9e:0f:45:48:bb:91:4f:36:3b:c0:d4:53:1f +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4 +MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6 +ZW5wZS5jb20wHhcNMDcxMjEzMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD +VQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5j +b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ03rKDx6sp4boFmVq +scIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAKClaO +xdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6H +LmYRY2xU+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFX +uaOKmMPsOzTFlUFpfnXCPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQD +yCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxTOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+ +JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbKF7jJeodWLBoBHmy+E60Q +rLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK0GqfvEyN +BjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8L +hij+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIB +QFqNeb+Lz0vPqhbBleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+ +HMh3/1uaD7euBUbl8agW7EekFwIDAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2lu +Zm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+SVpFTlBFIFMuQS4gLSBDSUYg +QTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBGNjIgUzgxQzBB +BgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx +MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUA +A4ICAQB4pgwWSp9MiDrAyw6lFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWb +laQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbgakEyrkgPH7UIBzg/YsfqikuFgba56 +awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8qhT/AQKM6WfxZSzwo +JNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Csg1lw +LDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCT +VyvehQP5aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGk +LhObNA5me0mrZJfQRsN5nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJb +UjWumDqtujWTI6cfSN01RpiyEGjkpTHCClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/ +QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZoQ0iy2+tzJOeRf1SktoA+ +naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1ZWrOZyGls +QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +# Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc. +# Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc. +# Label: "Go Daddy Root Certificate Authority - G2" +# Serial: 0 +# MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01 +# SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b +# SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT +EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp +ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz +NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH +EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE +AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD +E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH +/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy +DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh +GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR +tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA +AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX +WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu +9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr +gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo +2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI +4uJEvlz36hz1 +-----END CERTIFICATE----- + +# Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc. +# Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc. +# Label: "Starfield Root Certificate Authority - G2" +# Serial: 0 +# MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96 +# SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e +# SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5 +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT +HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs +ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw +MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj +aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp +Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg +nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1 +HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N +Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN +dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0 +HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO +BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G +CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU +sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3 +4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg +8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1 +mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +# Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc. +# Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc. +# Label: "Starfield Services Root Certificate Authority - G2" +# Serial: 0 +# MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2 +# SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f +# SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5 +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx +EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT +HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs +ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD +VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy +ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy +dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p +OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2 +8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K +Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe +hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk +6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw +DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q +AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI +bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB +ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z +qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn +0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN +sSi6 +-----END CERTIFICATE----- + +# Issuer: CN=AffirmTrust Commercial O=AffirmTrust +# Subject: CN=AffirmTrust Commercial O=AffirmTrust +# Label: "AffirmTrust Commercial" +# Serial: 8608355977964138876 +# MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7 +# SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7 +# SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c:e4:b2:e2:01:a0:ee:7e:ef:7b:57:b6:36:e8:a9:3c:9b:8d:48:60:c9:6f:5f:a7 +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE +BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz +dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL +MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp +cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC +AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP +Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr +ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL +MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1 +yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr +VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/ +nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ +KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG +XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj +vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt +Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g +N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC +nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +# Issuer: CN=AffirmTrust Networking O=AffirmTrust +# Subject: CN=AffirmTrust Networking O=AffirmTrust +# Label: "AffirmTrust Networking" +# Serial: 8957382827206547757 +# MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f +# SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f +# SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE +BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz +dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL +MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp +cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC +AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y +YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua +kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL +QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp +6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG +yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i +QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ +KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO +tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu +QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ +Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u +olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48 +x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= +-----END CERTIFICATE----- + +# Issuer: CN=AffirmTrust Premium O=AffirmTrust +# Subject: CN=AffirmTrust Premium O=AffirmTrust +# Label: "AffirmTrust Premium" +# Serial: 7893706540734352110 +# MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57 +# SHA1 Fingerprint: d8:a6:33:2c:e0:03:6f:b1:85:f6:63:4f:7d:6a:06:65:26:32:28:27 +# SHA256 Fingerprint: 70:a7:3f:7f:37:6b:60:07:42:48:90:45:34:b1:14:82:d5:bf:0e:69:8e:cc:49:8d:f5:25:77:eb:f2:e9:3b:9a +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE +BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz +dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG +A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U +cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf +qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ +JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ ++jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS +s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5 +HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7 +70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG +V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S +qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S +5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia +C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX +OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE +FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ +BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2 +KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg +Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B +8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ +MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc +0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ +u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF +u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH +YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8 +GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO +RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e +KeC2uAloGRwYQw== +-----END CERTIFICATE----- + +# Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust +# Subject: CN=AffirmTrust Premium ECC O=AffirmTrust +# Label: "AffirmTrust Premium ECC" +# Serial: 8401224907861490260 +# MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d +# SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb +# SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23 +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC +VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ +cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ +BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt +VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D +0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9 +ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G +A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs +aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I +flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ== +-----END CERTIFICATE----- + +# Issuer: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority +# Subject: CN=Certum Trusted Network CA O=Unizeto Technologies S.A. OU=Certum Certification Authority +# Label: "Certum Trusted Network CA" +# Serial: 279744 +# MD5 Fingerprint: d5:e9:81:40:c5:18:69:fc:46:2c:89:75:62:0f:aa:78 +# SHA1 Fingerprint: 07:e0:32:e0:20:b7:2c:3f:19:2f:06:28:a2:59:3a:19:a7:0f:06:9e +# SHA256 Fingerprint: 5c:58:46:8d:55:f5:8e:49:7e:74:39:82:d2:b5:00:10:b6:d1:65:37:4a:cf:83:a7:d4:a3:2d:b7:68:c4:40:8e +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM +MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D +ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU +cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3 +WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg +Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw +IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH +UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM +TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU +BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM +kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x +AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV +HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y +sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL +I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8 +J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY +VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- + +# Issuer: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA +# Subject: CN=TWCA Root Certification Authority O=TAIWAN-CA OU=Root CA +# Label: "TWCA Root Certification Authority" +# Serial: 1 +# MD5 Fingerprint: aa:08:8f:f6:f9:7b:b7:f2:b1:a7:1e:9b:ea:ea:bd:79 +# SHA1 Fingerprint: cf:9e:87:6d:d3:eb:fc:42:26:97:a3:b5:a3:7a:a0:76:a9:06:23:48 +# SHA256 Fingerprint: bf:d8:8f:e1:10:1c:41:ae:3e:80:1b:f8:be:56:35:0e:e9:ba:d1:a6:b9:bd:51:5e:dc:5c:6d:5b:87:11:ac:44 +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzES +MBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFU +V0NBIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMz +WhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJVEFJV0FO +LUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlm +aWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +AQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFE +AcK0HMMxQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HH +K3XLfJ+utdGdIzdjp9xCoi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeX +RfwZVzsrb+RH9JlF/h3x+JejiB03HFyP4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/z +rX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1ry+UPizgN7gr8/g+YnzAx +3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkq +hkiG9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeC +MErJk/9q56YAf4lCmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdls +XebQ79NqZp4VKIV66IIArB6nCWlWQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62D +lhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVYT0bf+215WfKEIlKuD8z7fDvn +aspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocnyYh0igzyXxfkZ +YiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +# Issuer: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2 +# Subject: O=SECOM Trust Systems CO.,LTD. OU=Security Communication RootCA2 +# Label: "Security Communication RootCA2" +# Serial: 0 +# MD5 Fingerprint: 6c:39:7d:a4:0e:55:59:b2:3f:d6:41:b1:12:50:de:43 +# SHA1 Fingerprint: 5f:3b:8c:f2:f8:10:b3:7d:78:b4:ce:ec:19:19:c3:73:34:b9:c7:74 +# SHA256 Fingerprint: 51:3b:2c:ec:b8:10:d4:cd:e5:dd:85:39:1a:df:c6:c2:dd:60:d8:7b:b7:36:d2:b5:21:48:4a:a4:7a:0e:be:f6 +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl +MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe +U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX +DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy +dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj +YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV +OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr +zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM +VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ +hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO +ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw +awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs +OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 +DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF +coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc +okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8 +t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy +1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/ +SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- + +# Issuer: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967 +# Subject: CN=Actalis Authentication Root CA O=Actalis S.p.A./03358520967 +# Label: "Actalis Authentication Root CA" +# Serial: 6271844772424770508 +# MD5 Fingerprint: 69:c1:0d:4f:07:a3:1b:c3:fe:56:3d:04:bc:11:f6:a6 +# SHA1 Fingerprint: f3:73:b3:87:06:5a:28:84:8a:f2:f3:4a:ce:19:2b:dd:c7:8e:9c:ac +# SHA256 Fingerprint: 55:92:60:84:ec:96:3a:64:b9:6e:2a:be:01:ce:0b:a8:6a:64:fb:fe:bc:c7:aa:b5:af:c1:55:b3:7f:d7:60:66 +-----BEGIN CERTIFICATE----- +MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UE +BhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8w +MzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 +IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC +SVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1 +ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv +UTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX +4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9 +KK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/ +gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1fYVEiVRvjRuPjPdA1Yprb +rxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2oxgkg4YQ +51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F +be8lEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe +KF+w6D9Fz8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F +v6MGn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbn +fpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jVo23Eek7 +jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLYiDrIn3hm7Ynz +ezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt +ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAL +e3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70 +jsNjLiNmsGe+b7bAEzlgqqI0JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz +WochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V +SM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j +pwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX +X04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+Ok +fcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7R +K4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btU +ZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvBeyqdn6/axag67XH/JJU +LysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9vwGYT7JZVEc+NHt4bVaT +LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== +-----END CERTIFICATE----- + +# Issuer: CN=Buypass Class 2 Root CA O=Buypass AS-983163327 +# Subject: CN=Buypass Class 2 Root CA O=Buypass AS-983163327 +# Label: "Buypass Class 2 Root CA" +# Serial: 2 +# MD5 Fingerprint: 46:a7:d2:fe:45:fb:64:5a:a8:59:90:9b:78:44:9b:29 +# SHA1 Fingerprint: 49:0a:75:74:de:87:0a:47:fe:58:ee:f6:c7:6b:eb:c6:0b:12:40:99 +# SHA256 Fingerprint: 9a:11:40:25:19:7c:5b:b9:5d:94:e6:3d:55:cd:43:79:08:47:b6:46:b2:3c:df:11:ad:a4:a0:0e:ff:15:fb:48 +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd +MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg +Q2xhc3MgMiBSb290IENBMB4XDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1ow +TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw +HgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB +BQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1g1Lr +6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPV +L4O2fuPn9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC91 +1K2GScuVr1QGbNgGE41b/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHx +MlAQTn/0hpPshNOOvEu/XAFOBz3cFIqUCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZ +QmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeffawrbD02TTqigzXsu8lkB +arcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgIzRFo1clr +Us3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLi +FRhnBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRS +P/TizPJhk9H9Z2vXUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN +9SG9dKpN6nIDSdvHXx1iY8f93ZHsM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxP +AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMmAd+BikoL1Rpzz +uvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAU18h +9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s +A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3t +OluwlN5E40EIosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo ++fsicdl9sz1Gv7SEr5AcD48Saq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7 +KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYdDnkM/crqJIByw5c/8nerQyIKx+u2 +DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWDLfJ6v9r9jv6ly0Us +H8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0oyLQ +I+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK7 +5t98biGCwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h +3PFaTWwyI0PurKju7koSCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPz +Y11aWOIv4x3kqdbQCtCev9eBCfHJxyYNrJgWVqA= +-----END CERTIFICATE----- + +# Issuer: CN=Buypass Class 3 Root CA O=Buypass AS-983163327 +# Subject: CN=Buypass Class 3 Root CA O=Buypass AS-983163327 +# Label: "Buypass Class 3 Root CA" +# Serial: 2 +# MD5 Fingerprint: 3d:3b:18:9e:2c:64:5a:e8:d5:88:ce:0e:f9:37:c2:ec +# SHA1 Fingerprint: da:fa:f7:fa:66:84:ec:06:8f:14:50:bd:c7:c2:81:a5:bc:a9:64:57 +# SHA256 Fingerprint: ed:f7:eb:bc:a2:7a:2a:38:4d:38:7b:7d:40:10:c6:66:e2:ed:b4:84:3e:4c:29:b4:ae:1d:5b:93:32:e6:b2:4d +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd +MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg +Q2xhc3MgMyBSb290IENBMB4XDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFow +TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw +HgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB +BQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRHsJ8Y +ZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3E +N3coTRiR5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9 +tznDDgFHmV0ST9tD+leh7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX +0DJq1l1sDPGzbjniazEuOQAnFN44wOwZZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c +/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH2xc519woe2v1n/MuwU8X +KhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV/afmiSTY +zIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvS +O1UQRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D +34xFMFbG02SrZvPAXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgP +K9Dx2hzLabjKSWJtyNBjYt1gD1iqj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3 +AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEe4zf/lb+74suwv +Tg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAACAj +QTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV +cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXS +IGrs/CIBKM+GuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2 +HJLw5QY33KbmkJs4j1xrG0aGQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsa +O5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8ZORK15FTAaggiG6cX0S5y2CBNOxv +033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2KSb12tjE8nVhz36u +dmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz6MkE +kbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg41 +3OEMXbugUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvD +u79leNKGef9JOxqDDPDeeOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq +4/g7u9xN12TyUb7mqqta6THuBrxzvxNiCp/HuZc= +-----END CERTIFICATE----- + +# Issuer: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center +# Subject: CN=T-TeleSec GlobalRoot Class 3 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center +# Label: "T-TeleSec GlobalRoot Class 3" +# Serial: 1 +# MD5 Fingerprint: ca:fb:40:a8:4e:39:92:8a:1d:fe:8e:2f:c4:27:ea:ef +# SHA1 Fingerprint: 55:a6:72:3e:cb:f2:ec:cd:c3:23:74:70:19:9d:2a:be:11:e3:81:d1 +# SHA256 Fingerprint: fd:73:da:d3:1c:64:4f:f1:b4:3b:ef:0c:cd:da:96:71:0b:9c:d9:87:5e:ca:7e:31:70:7a:f3:e9:6d:52:2b:bd +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx +KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd +BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl +YyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgxMDAxMTAyOTU2WhcNMzMxMDAxMjM1 +OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy +aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50 +ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN +8ELg63iIVl6bmlQdTQyK9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/ +RLyTPWGrTs0NvvAgJ1gORH8EGoel15YUNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4 +hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZFiP0Zf3WHHx+xGwpzJFu5 +ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W0eDrXltM +EnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1 +A/d2O2GCahKqGFPrAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOy +WL6ukK2YJ5f+AbGwUgC4TeQbIXQbfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ +1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzTucpH9sry9uetuUg/vBa3wW30 +6gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7hP0HHRwA11fXT +91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml +e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4p +TpPDpFQUWw== +-----END CERTIFICATE----- + +# Issuer: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH +# Subject: CN=D-TRUST Root Class 3 CA 2 2009 O=D-Trust GmbH +# Label: "D-TRUST Root Class 3 CA 2 2009" +# Serial: 623603 +# MD5 Fingerprint: cd:e0:25:69:8d:47:ac:9c:89:35:90:f7:fd:51:3d:2f +# SHA1 Fingerprint: 58:e8:ab:b0:36:15:33:fb:80:f7:9b:1b:6d:29:d3:ff:8d:5f:00:f0 +# SHA256 Fingerprint: 49:e7:a4:42:ac:f0:ea:62:87:05:00:54:b5:25:64:b6:50:e4:f4:9e:42:e3:48:d6:aa:38:e0:39:e9:57:b1:c1 +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF +MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD +bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha +ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM +HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03 +UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42 +tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R +ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM +lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp +/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G +A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G +A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj +dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy +MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl +cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js +L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL +BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni +acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K +zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8 +PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y +Johw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +# Issuer: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH +# Subject: CN=D-TRUST Root Class 3 CA 2 EV 2009 O=D-Trust GmbH +# Label: "D-TRUST Root Class 3 CA 2 EV 2009" +# Serial: 623604 +# MD5 Fingerprint: aa:c6:43:2c:5e:2d:cd:c4:34:c0:50:4f:11:02:4f:b6 +# SHA1 Fingerprint: 96:c9:1b:0b:95:b4:10:98:42:fa:d0:d8:22:79:fe:60:fa:b9:16:83 +# SHA256 Fingerprint: ee:c5:49:6b:98:8c:e9:86:25:b9:34:09:2e:ec:29:08:be:d0:b0:f3:16:c2:d4:73:0c:84:ea:f1:f3:d3:48:81 +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF +MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD +bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUw +NDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV +BAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfSegpn +ljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM0 +3TP1YtHhzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6Z +qQTMFexgaDbtCHu39b+T7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lR +p75mpoo6Kr3HGrHhFPC+Oh25z1uxav60sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8 +HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure3511H3a6UCAwEAAaOCASQw +ggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyvcop9Ntea +HNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFw +Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xh +c3MlMjAzJTIwQ0ElMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1E +RT9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQt +dHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xhc3NfM19jYV8yX2V2XzIwMDku +Y3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+PPoeUSbrh/Yp +3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 +nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNF +CSuGdXzfX2lXANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7na +xpeG0ILD5EJt/rDiZE4OJudANCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqX +KVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVvw9y4AyHqnxbxLFS1 +-----END CERTIFICATE----- + +# Issuer: CN=CA Disig Root R2 O=Disig a.s. +# Subject: CN=CA Disig Root R2 O=Disig a.s. +# Label: "CA Disig Root R2" +# Serial: 10572350602393338211 +# MD5 Fingerprint: 26:01:fb:d8:27:a7:17:9a:45:54:38:1a:43:01:3b:03 +# SHA1 Fingerprint: b5:61:eb:ea:a4:de:e4:25:4b:69:1a:98:a5:57:47:c2:34:c7:d9:71 +# SHA256 Fingerprint: e2:3d:4a:03:6d:7b:70:e9:f5:95:b1:42:20:79:d2:b9:1e:df:bb:1f:b6:51:a0:63:3e:aa:8a:9d:c5:f8:07:03 +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV +BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu +MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQy +MDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx +EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjIw +ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbCw3Oe +NcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNH +PWSb6WiaxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3I +x2ymrdMxp7zo5eFm1tL7A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbe +QTg06ov80egEFGEtQX6sx3dOy1FU+16SGBsEWmjGycT6txOgmLcRK7fWV8x8nhfR +yyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqVg8NTEQxzHQuyRpDRQjrO +QG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa5Beny912 +H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJ +QfYEkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUD +i/ZnWejBBhG93c+AAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORs +nLMOPReisjQS1n6yqEm70XooQL6iFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1 +rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5uQu0wDQYJKoZI +hvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqf +GopTpti72TVVsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkb +lvdhuDvEK7Z4bLQjb/D907JedR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka ++elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W81k/BfDxujRNt+3vrMNDcTa/F1bal +TFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjxmHHEt38OFdAlab0i +nSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01utI3 +gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18Dr +G5gPcFw0sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3Os +zMOl6W8KjptlwlCFtaOgUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8x +L4ysEr3vQCj8KWefshNPZiTEUxnpHikV7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +# Issuer: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV +# Subject: CN=ACCVRAIZ1 O=ACCV OU=PKIACCV +# Label: "ACCVRAIZ1" +# Serial: 6828503384748696800 +# MD5 Fingerprint: d0:a0:5a:ee:05:b6:09:94:21:a1:7d:f1:b2:29:82:02 +# SHA1 Fingerprint: 93:05:7a:88:15:c6:4f:ce:88:2f:fa:91:16:52:28:78:bc:53:64:17 +# SHA256 Fingerprint: 9a:6e:c0:12:e1:a7:da:9d:be:34:19:4d:47:8a:d7:c0:db:18:22:fb:07:1d:f1:29:81:49:6e:d1:04:38:41:13 +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE +AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw +CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ +BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND +VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb +qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY +HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo +G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA +lHPrzg5XPAOBOp0KoVdDaaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhr +IA8wKFSVf+DuzgpmndFALW4ir50awQUZ0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/ +0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH +k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47 +4KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMO +m3WR5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpa +cXpkatcnYGMN285J9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPl +uUsXQA+xtrn13k/c4LOsOxFwYIRKQ26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYI +KwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRwOi8vd3d3LmFjY3YuZXMvZmls +ZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEuY3J0MB8GCCsG +AQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 +VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeT +VfZW6oHlNsyMHj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIG +CCsGAQUFBwICMIIBFB6CARAAQQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUA +cgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBhAO0AegAgAGQAZQAgAGwAYQAgAEEA +QwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUAYwBuAG8AbABvAGcA +7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBjAHQA +cgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAA +QwBQAFMAIABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUA +czAwBggrBgEFBQcCARYkaHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2Mu +aHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRt +aW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2MV9kZXIuY3JsMA4GA1Ud +DwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZIhvcNAQEF +BQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdp +D70ER9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gU +JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m +AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD +vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms +tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH +7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h +I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA +h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF +d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H +pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7 +-----END CERTIFICATE----- + +# Issuer: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA +# Subject: CN=TWCA Global Root CA O=TAIWAN-CA OU=Root CA +# Label: "TWCA Global Root CA" +# Serial: 3262 +# MD5 Fingerprint: f9:03:7e:cf:e6:9e:3c:73:7a:2a:90:07:69:ff:2b:96 +# SHA1 Fingerprint: 9c:bb:48:53:f6:a4:f6:d3:52:a4:e8:32:52:55:60:13:f5:ad:af:65 +# SHA256 Fingerprint: 59:76:90:07:f7:68:5d:0f:cd:50:87:2f:9f:95:d5:75:5a:5b:2b:45:7d:81:f3:69:2b:61:0a:98:67:2f:0e:1b +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcx +EjAQBgNVBAoTCVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMT +VFdDQSBHbG9iYWwgUm9vdCBDQTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5 +NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQKEwlUQUlXQU4tQ0ExEDAOBgNVBAsT +B1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3QgQ0EwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2CnJfF +10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz +0ALfUPZVr2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfCh +MBwqoJimFb3u/Rk28OKRQ4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbH +zIh1HrtsBv+baz4X7GGqcXzGHaL3SekVtTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc +46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1WKKD+u4ZqyPpcC1jcxkt2 +yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99sy2sbZCi +laLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYP +oA/pyJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQA +BDzfuBSO6N+pjWxnkjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcE +qYSjMq+u7msXi7Kx/mzhkIyIqJdIzshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm +4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6gcFGn90xHNcgL +1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn +LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WF +H6vPNOw/KP4M8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNo +RI2T9GRwoD2dKAXDOXC4Ynsg/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+ +nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlglPx4mI88k1HtQJAH32RjJMtOcQWh +15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryPA9gK8kxkRr05YuWW +6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3mi4TW +nsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5j +wa19hAM8EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWz +aGHQRiapIVJpLesux+t3zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmy +KwbQBM0= +-----END CERTIFICATE----- + +# Issuer: CN=TeliaSonera Root CA v1 O=TeliaSonera +# Subject: CN=TeliaSonera Root CA v1 O=TeliaSonera +# Label: "TeliaSonera Root CA v1" +# Serial: 199041966741090107964904287217786801558 +# MD5 Fingerprint: 37:41:49:1b:18:56:9a:26:f5:ad:c2:66:fb:40:a5:4c +# SHA1 Fingerprint: 43:13:bb:96:f1:d5:86:9b:c1:4e:6a:92:f6:cf:f6:34:69:87:82:37 +# SHA256 Fingerprint: dd:69:36:fe:21:f8:f0:77:c1:23:a1:a5:21:c1:22:24:f7:22:55:b7:3e:03:a7:26:06:93:e8:a2:4b:0f:a3:89 +-----BEGIN CERTIFICATE----- +MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAw +NzEUMBIGA1UECgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJv +b3QgQ0EgdjEwHhcNMDcxMDE4MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYD +VQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwWVGVsaWFTb25lcmEgUm9vdCBDQSB2 +MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+6yfwIaPzaSZVfp3F +VRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA3GV1 +7CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+X +Z75Ljo1kB1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+ +/jXh7VB7qTCNGdMJjmhnXb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs +81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxHoLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkm +dtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3F0fUTPHSiXk+TT2YqGHe +Oh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJoWjiUIMu +sDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4 +pgd7gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fs +slESl1MpWtTwEhDcTwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQ +arMCpgKIv7NHfirZ1fpoeDVNAgMBAAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYD +VR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qWDNXr+nuqF+gTEjANBgkqhkiG +9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNmzqjMDfz1mgbl +dxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1Tj +TQpgcmLNkQfWpb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBed +Y2gea+zDTYa4EzAvXUYNR0PVG6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7 +Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpcc41teyWRyu5FrgZLAMzTsVlQ2jqI +OylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOTJsjrDNYmiLbAJM+7 +vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2qReW +t88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcn +HL/EVlP6Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVx +SK236thZiNSQvxaz2emsWWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +# Issuer: CN=T-TeleSec GlobalRoot Class 2 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center +# Subject: CN=T-TeleSec GlobalRoot Class 2 O=T-Systems Enterprise Services GmbH OU=T-Systems Trust Center +# Label: "T-TeleSec GlobalRoot Class 2" +# Serial: 1 +# MD5 Fingerprint: 2b:9b:9e:e4:7b:6c:1f:00:72:1a:cc:c1:77:79:df:6a +# SHA1 Fingerprint: 59:0d:2d:7d:88:4f:40:2e:61:7e:a5:62:32:17:65:cf:17:d8:94:e9 +# SHA256 Fingerprint: 91:e2:f5:78:8d:58:10:eb:a7:ba:58:73:7d:e1:54:8a:8e:ca:cd:01:45:98:bc:0b:14:3e:04:1b:17:05:25:52 +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx +KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd +BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl +YyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgxMDAxMTA0MDE0WhcNMzMxMDAxMjM1 +OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy +aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50 +ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUd +AqSzm1nzHoqvNK38DcLZSBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiC +FoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/FvudocP05l03Sx5iRUKrERLMjfTlH6VJi +1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx9702cu+fjOlbpSD8DT6Iavq +jnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGVWOHAD3bZ +wI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/ +WSA2AHmgoCJrjNXyYdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhy +NsZt+U2e+iKo4YFWz827n+qrkRk4r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPAC +uvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNfvNoBYimipidx5joifsFvHZVw +IEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR3p1m0IvVVGb6 +g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlP +BSeOE6Fuwg== +-----END CERTIFICATE----- + +# Issuer: CN=Atos TrustedRoot 2011 O=Atos +# Subject: CN=Atos TrustedRoot 2011 O=Atos +# Label: "Atos TrustedRoot 2011" +# Serial: 6643877497813316402 +# MD5 Fingerprint: ae:b9:c4:32:4b:ac:7f:5d:66:cc:77:94:bb:2a:77:56 +# SHA1 Fingerprint: 2b:b1:f5:3e:55:0c:1d:c5:f1:d4:e6:b7:6a:46:4b:55:06:02:ac:21 +# SHA256 Fingerprint: f3:56:be:a2:44:b7:a9:1e:b3:5d:53:ca:9a:d7:86:4a:ce:01:8e:2d:35:d5:f8:f9:6d:df:68:a6:f4:1a:a4:74 +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UE +AwwVQXRvcyBUcnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQG +EwJERTAeFw0xMTA3MDcxNDU4MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMM +FUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsGA1UECgwEQXRvczELMAkGA1UEBhMC +REUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCVhTuXbyo7LjvPpvMp +Nb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr54rM +VD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+ +SZFhyBH+DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ +4J7sVaE3IqKHBAUsR320HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0L +cp2AMBYHlT8oDv3FdU9T1nSatCQujgKRz3bFmx5VdJx4IbHwLfELn8LVlhgf8FQi +eowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7Rl+lwrrw7GWzbITAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZbNshMBgG +A1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3 +DQEBCwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8j +vZfza1zv7v1Apt+hk6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kP +DpFrdRbhIfzYJsdHt6bPWHJxfrrhTZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pc +maHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a961qn8FYiqTxlVMYVqL2Gns2D +lmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G3mB/ufNPRJLv +KrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed +-----END CERTIFICATE----- + +# Issuer: CN=QuoVadis Root CA 1 G3 O=QuoVadis Limited +# Subject: CN=QuoVadis Root CA 1 G3 O=QuoVadis Limited +# Label: "QuoVadis Root CA 1 G3" +# Serial: 687049649626669250736271037606554624078720034195 +# MD5 Fingerprint: a4:bc:5b:3f:fe:37:9a:fa:64:f0:e2:fa:05:3d:0b:ab +# SHA1 Fingerprint: 1b:8e:ea:57:96:29:1a:c9:39:ea:b8:0a:81:1a:73:73:c0:93:79:67 +# SHA256 Fingerprint: 8a:86:6f:d1:b2:76:b5:7e:57:8e:92:1c:65:82:8a:2b:ed:58:e9:f2:f2:88:05:41:34:b7:f1:f4:bf:c9:cc:74 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00 +MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakEPBtV +wedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWe +rNrwU8lmPNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF341 +68Xfuw6cwI2H44g4hWf6Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh +4Pw5qlPafX7PGglTvF0FBM+hSo+LdoINofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXp +UhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/lg6AnhF4EwfWQvTA9xO+o +abw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV7qJZjqlc +3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/G +KubX9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSt +hfbZxbGL0eUQMk1fiyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KO +Tk0k+17kBL5yG6YnLUlamXrXXAkgt3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOt +zCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZIhvcNAQELBQAD +ggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC +MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2 +cDMT/uFPpiN3GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUN +qXsCHKnQO18LwIE6PWThv6ctTr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5 +YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP+V04ikkwj+3x6xn0dxoxGE1nVGwv +b2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh3jRJjehZrJ3ydlo2 +8hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fawx/k +NSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNj +ZgKAvQU6O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhp +q1467HxpvMc7hU6eFbm0FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFt +nh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOVhMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +# Issuer: CN=QuoVadis Root CA 2 G3 O=QuoVadis Limited +# Subject: CN=QuoVadis Root CA 2 G3 O=QuoVadis Limited +# Label: "QuoVadis Root CA 2 G3" +# Serial: 390156079458959257446133169266079962026824725800 +# MD5 Fingerprint: af:0c:86:6e:bf:40:2d:7f:0b:3e:12:50:ba:12:3d:06 +# SHA1 Fingerprint: 09:3c:61:f3:8b:8b:dc:7d:55:df:75:38:02:05:00:e1:25:f5:c8:36 +# SHA256 Fingerprint: 8f:e4:fb:0a:f9:3a:4d:0d:67:db:0b:eb:b2:3e:37:c7:1b:f3:25:dc:bc:dd:24:0e:a0:4d:af:58:b4:7e:18:40 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00 +MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFhZiFf +qq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMW +n4rjyduYNM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ym +c5GQYaYDFCDy54ejiK2toIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+ +O7q414AB+6XrW7PFXmAqMaCvN+ggOp+oMiwMzAkd056OXbxMmO7FGmh77FOm6RQ1 +o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+lV0POKa2Mq1W/xPtbAd0j +IaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZoL1NesNKq +IcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz +8eQQsSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43eh +vNURG3YBZwjgQQvD6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l +7ZizlWNof/k19N+IxWA1ksB8aRxhlRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALG +cC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZIhvcNAQELBQAD +ggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RC +roijQ1h5fq7KpVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0Ga +W/ZZGYjeVYg3UQt4XAoeo0L9x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4n +lv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgzdWqTHBLmYF5vHX/JHyPLhGGfHoJE ++V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6XU/IyAgkwo1jwDQHV +csaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+NwmNtd +dbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNg +KCLjsZWDzYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeM +HVOyToV7BjjHLPj4sHKNJeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4 +WSr2Rz0ZiC3oheGe7IUIarFsNMkd7EgrO3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +# Issuer: CN=QuoVadis Root CA 3 G3 O=QuoVadis Limited +# Subject: CN=QuoVadis Root CA 3 G3 O=QuoVadis Limited +# Label: "QuoVadis Root CA 3 G3" +# Serial: 268090761170461462463995952157327242137089239581 +# MD5 Fingerprint: df:7d:b9:ad:54:6f:68:a1:df:89:57:03:97:43:b0:d7 +# SHA1 Fingerprint: 48:12:bd:92:3c:a8:c4:39:06:e7:30:6d:27:96:e6:a4:cf:22:2e:7d +# SHA256 Fingerprint: 88:ef:81:de:20:2e:b0:18:45:2e:43:f8:64:72:5c:ea:5f:bd:1f:c2:d9:d2:05:73:07:09:c5:d8:b8:69:0f:46 +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQEL +BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc +BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00 +MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMgRzMwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286IxSR +/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNu +FoM7pmRLMon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXR +U7Ox7sWTaYI+FrUoRqHe6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+c +ra1AdHkrAj80//ogaX3T7mH1urPnMNA3I4ZyYUUpSFlob3emLoG+B01vr87ERROR +FHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3UVDmrJqMz6nWB2i3ND0/k +A9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f75li59wzw +eyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634Ryl +sSqiMd5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBp +VzgeAVuNVejH38DMdyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0Q +A4XN8f+MFrXBsj6IbGB/kE+V9/YtrQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ +ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZIhvcNAQELBQAD +ggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnI +FUBhynLWcKzSt/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5Wvv +oxXqA/4Ti2Tk08HS6IT7SdEQTXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFg +u/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9DuDcpmvJRPpq3t/O5jrFc/ZSXPsoaP +0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGibIh6BJpsQBJFxwAYf +3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmDhPbl +8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+ +DhcI00iX0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HN +PlopNLk9hM6xZdRZkZFWdSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ +ywaZWWDYWGWVjUTR939+J399roD1B0y2PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Assured ID Root G2 O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Assured ID Root G2 O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Assured ID Root G2" +# Serial: 15385348160840213938643033620894905419 +# MD5 Fingerprint: 92:38:b9:f8:63:24:82:65:2c:57:33:e6:fe:81:8f:9d +# SHA1 Fingerprint: a1:4b:48:d9:43:ee:0a:0e:40:90:4f:3c:e0:a4:c0:91:93:51:5d:3f +# SHA256 Fingerprint: 7d:05:eb:b6:82:33:9f:8c:94:51:ee:09:4e:eb:fe:fa:79:53:a1:14:ed:b2:f4:49:49:45:2f:ab:7d:2f:c1:85 +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBl +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv +b3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl +cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSA +n61UQbVH35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4Htecc +biJVMWWXvdMX0h5i89vqbFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9Hp +EgjAALAcKxHad3A2m67OeYfcgnDmCXRwVWmvo2ifv922ebPynXApVfSr/5Vh88lA +bx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OPYLfykqGxvYmJHzDNw6Yu +YjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+RnlTGNAgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQW +BBTOw0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPI +QW5pJ6d1Ee88hjZv0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I +0jJmwYrA8y8678Dj1JGG0VDjA9tzd29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4Gni +lmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAWhsI6yLETcDbYz+70CjTVW0z9 +B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0MjomZmWzwPDCv +ON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Assured ID Root G3 O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Assured ID Root G3 O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Assured ID Root G3" +# Serial: 15459312981008553731928384953135426796 +# MD5 Fingerprint: 7c:7f:65:31:0c:81:df:8d:ba:3e:99:e2:5c:ad:6e:fb +# SHA1 Fingerprint: f5:17:a2:4f:9a:48:c6:c9:f8:a2:00:26:9f:dc:0f:48:2c:ab:30:89 +# SHA256 Fingerprint: 7e:37:cb:8b:4c:47:09:0c:ab:36:55:1b:a6:f4:5d:b8:40:68:0f:ba:16:6a:95:2d:b1:00:71:7f:43:05:3f:c2 +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQsw +CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu +ZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3Qg +RzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu +Y29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJf +Zn4f5dwbRXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17Q +RSAPWXYQ1qAk8C3eNvJsKTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ +BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgFUaFNN6KDec6NHSrkhDAKBggqhkjOPQQD +AwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5FyYZ5eEJJZVrmDxxDnOOlY +JjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy1vUhZscv +6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Global Root G2 O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Global Root G2 O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Global Root G2" +# Serial: 4293743540046975378534879503202253541 +# MD5 Fingerprint: e4:a6:8a:c8:54:ac:52:42:46:0a:fd:72:48:1b:2a:44 +# SHA1 Fingerprint: df:3c:24:f9:bf:d6:66:76:1b:26:80:73:fe:06:d1:cc:8d:4f:82:a4 +# SHA256 Fingerprint: cb:3c:cb:b7:60:31:e5:e0:13:8f:8d:d3:9a:23:f9:de:47:ff:c3:5e:43:c1:14:4c:ea:27:d4:6a:5a:b1:cb:5f +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH +MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI +2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx +1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ +q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz +tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ +vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV +5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY +1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4 +NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG +Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91 +8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe +pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Global Root G3 O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Global Root G3 O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Global Root G3" +# Serial: 7089244469030293291760083333884364146 +# MD5 Fingerprint: f5:5d:a4:50:a5:fb:28:7e:1e:0f:0d:cc:96:57:56:ca +# SHA1 Fingerprint: 7e:04:de:89:6a:3e:66:6d:00:e6:87:d3:3f:fa:d9:3b:e8:3d:34:9e +# SHA256 Fingerprint: 31:ad:66:48:f8:10:41:38:c7:38:f3:9e:a4:32:01:33:39:3e:3a:18:cc:02:29:6e:f9:7c:2a:c9:ef:67:31:d0 +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQsw +CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu +ZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAe +Fw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUw +EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x +IDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0CAQYF +K4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FG +fp4tn+6OYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPO +Z9wj/wMco+I+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAd +BgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNpYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIx +AK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y3maTD/HMsQmP3Wyr+mt/ +oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34VOKa5Vt8 +sycX +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert Trusted Root G4 O=DigiCert Inc OU=www.digicert.com +# Subject: CN=DigiCert Trusted Root G4 O=DigiCert Inc OU=www.digicert.com +# Label: "DigiCert Trusted Root G4" +# Serial: 7451500558977370777930084869016614236 +# MD5 Fingerprint: 78:f2:fc:aa:60:1f:2f:b4:eb:c9:37:ba:53:2e:75:49 +# SHA1 Fingerprint: dd:fb:16:cd:49:31:c9:73:a2:03:7d:3f:c8:3a:4d:7d:77:5d:05:e4 +# SHA256 Fingerprint: 55:2f:7b:dc:f1:a7:af:9e:6c:e6:72:01:7f:4f:12:ab:f7:72:40:c7:8e:76:1a:c2:03:d1:d9:d2:0a:c8:99:88 +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBi +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3Qg +RzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1MTIwMDAwWjBiMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu +Y29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3y +ithZwuEppz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1If +xp4VpX6+n6lXFllVcq9ok3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDV +ySAdYyktzuxeTsiT+CFhmzTrBcZe7FsavOvJz82sNEBfsXpm7nfISKhmV1efVFiO +DCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGYQJB5w3jHtrHEtWoYOAMQ +jdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6MUSaM0C/ +CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCi +EhtmmnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADM +fRyVw4/3IbKyEbe7f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QY +uKZ3AeEPlAwhHbJUKSWJbOUOUlFHdL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXK +chYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8oR7FwI+isX4KJpn15GkvmB0t +9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB +hjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD +ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2 +SV1EY+CtnJYYZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd ++SeuMIW59mdNOj6PWTkiU0TryF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWc +fFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy7zBZLq7gcfJW5GqXb5JQbZaNaHqa +sjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iahixTXTBmyUEFxPT9N +cCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN5r5N +0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie +4u1Ki7wb/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mI +r/OSmbaz5mEP0oUA51Aa5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1 +/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tKG48BtieVU+i2iW1bvGjUI+iLUaJW+fCm +gKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP82Z+ +-----END CERTIFICATE----- + +# Issuer: CN=COMODO RSA Certification Authority O=COMODO CA Limited +# Subject: CN=COMODO RSA Certification Authority O=COMODO CA Limited +# Label: "COMODO RSA Certification Authority" +# Serial: 101909084537582093308941363524873193117 +# MD5 Fingerprint: 1b:31:b0:71:40:36:cc:14:36:91:ad:c4:3e:fd:ec:18 +# SHA1 Fingerprint: af:e5:d2:44:a8:d1:19:42:30:ff:47:9f:e2:f8:97:bb:cd:7a:8c:b4 +# SHA256 Fingerprint: 52:f0:e1:c4:e5:8e:c6:29:29:1b:60:31:7f:07:46:71:b8:5d:7e:a8:0d:5b:07:27:34:63:53:4b:32:b4:02:34 +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB +hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G +A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV +BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5 +MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT +EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR +6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X +pz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC +9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+5eNu/Nio5JIk2kNrYrhV +/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pGx8cgoLEf +Zd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z ++pUX2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7w +qP/0uK3pN/u6uPQLOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZah +SL0896+1DSJMwBGB7FY79tOi4lu3sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVIC +u9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+CGCe01a60y1Dma/RMhnEw6abf +Fobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5WdYgGq/yapiq +crxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E +FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB +/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvl +wFTPoCWOAvn9sKIN9SCYPBMtrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM +4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV +2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna +FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ +CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK +boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke +jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL +S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb +QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl +0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB +NVOFBkpdn627G190 +-----END CERTIFICATE----- + +# Issuer: CN=USERTrust RSA Certification Authority O=The USERTRUST Network +# Subject: CN=USERTrust RSA Certification Authority O=The USERTRUST Network +# Label: "USERTrust RSA Certification Authority" +# Serial: 2645093764781058787591871645665788717 +# MD5 Fingerprint: 1b:fe:69:d1:91:b7:19:33:a3:72:a8:0f:e1:55:e5:b5 +# SHA1 Fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e +# SHA256 Fingerprint: e7:93:c9:b0:2f:d8:aa:13:e2:1c:31:22:8a:cc:b0:81:19:64:3b:74:9c:89:89:64:b1:74:6d:46:c3:d4:cb:d2 +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB +iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl +cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV +BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw +MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV +BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy +dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK +AoICAQCAEmUXNg7D2wiz0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B +3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2jY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkY +tJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFnRghRy4YUVD+8M/5+bJz/ +Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O+T23LLb2 +VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT +79uq/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6 +c0Plfg6lZrEpfDKEY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmT +Yo61Zs8liM2EuLE/pDkP2QKe6xJMlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97l +c6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8yexDJtC/QV9AqURE9JnnV4ee +UB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+eLf8ZxXhyVeE +Hg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd +BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8G +A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPF +Up/L+M+ZBn8b2kMVn54CVVeWFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KO +VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3 +ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs +8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR +iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze +Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ +XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/ +qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB +VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB +L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG +jjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +# Issuer: CN=USERTrust ECC Certification Authority O=The USERTRUST Network +# Subject: CN=USERTrust ECC Certification Authority O=The USERTRUST Network +# Label: "USERTrust ECC Certification Authority" +# Serial: 123013823720199481456569720443997572134 +# MD5 Fingerprint: fa:68:bc:d9:b5:7f:ad:fd:c9:1d:06:83:28:cc:24:c1 +# SHA1 Fingerprint: d1:cb:ca:5d:b2:d5:2a:7f:69:3b:67:4d:e5:f0:5a:1d:0c:95:7d:f0 +# SHA256 Fingerprint: 4f:f4:60:d5:4b:9c:86:da:bf:bc:fc:57:12:e0:40:0d:2b:ed:3f:bc:4d:4f:bd:aa:86:e0:6a:dc:d2:a9:ad:7a +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNl +eSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMT +JVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMjAx +MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT +Ck5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVUaGUg +VVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlm +aWNhdGlvbiBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqflo +I+d61SRvU8Za2EurxtW20eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinng +o4N+LZfQYcTxmdwlkWOrfzCjtHDix6EznPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0G +A1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBBHU6+4WMB +zzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbW +RNZu9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign ECC Root CA - R5 +# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign ECC Root CA - R5 +# Label: "GlobalSign ECC Root CA - R5" +# Serial: 32785792099990507226680698011560947931244 +# MD5 Fingerprint: 9f:ad:3b:1c:02:1e:8a:ba:17:74:38:81:0c:a2:bc:08 +# SHA1 Fingerprint: 1f:24:c6:30:cd:a4:18:ef:20:69:ff:ad:4f:dd:5f:46:3a:1b:69:aa +# SHA256 Fingerprint: 17:9f:bc:14:8a:3d:d0:0f:d2:4e:a1:34:58:cc:43:bf:a7:f5:9c:81:82:d7:83:a5:13:f6:eb:ec:10:0c:89:24 +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEk +MCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpH +bG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoX +DTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMbR2xvYmFsU2lnbiBFQ0MgUm9vdCBD +QSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6SFkc +8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8ke +hOvRnkmSh5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYI +KoZIzj0EAwMDaAAwZQIxAOVpEslu28YxuglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg +515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7yFz9SO8NdCKoCOJuxUnO +xwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +# Issuer: CN=IdenTrust Commercial Root CA 1 O=IdenTrust +# Subject: CN=IdenTrust Commercial Root CA 1 O=IdenTrust +# Label: "IdenTrust Commercial Root CA 1" +# Serial: 13298821034946342390520003877796839426 +# MD5 Fingerprint: b3:3e:77:73:75:ee:a0:d3:e3:7e:49:63:49:59:bb:c7 +# SHA1 Fingerprint: df:71:7e:aa:4a:d9:4e:c9:55:84:99:60:2d:48:de:5f:bc:f0:3a:25 +# SHA256 Fingerprint: 5d:56:49:9b:e4:d2:e0:8b:cf:ca:d0:8a:3e:38:72:3d:50:50:3b:de:70:69:48:e4:2f:55:60:30:19:e5:28:ae +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBK +MQswCQYDVQQGEwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVu +VHJ1c3QgQ29tbWVyY2lhbCBSb290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQw +MTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzESMBAGA1UEChMJSWRlblRydXN0MScw +JQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENBIDEwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ldhNlT +3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU ++ehcCuz/mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gp +S0l4PJNgiCL8mdo2yMKi1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1 +bVoE/c40yiTcdCMbXTMTEl3EASX2MN0CXZ/g1Ue9tOsbobtJSdifWwLziuQkkORi +T0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl3ZBWzvurpWCdxJ35UrCL +vYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzyNeVJSQjK +Vsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZK +dHzVWYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHT +c+XvvqDtMwt0viAgxGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hv +l7yTmvmcEpB4eoCHFddydJxVdHixuuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5N +iGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZIhvcNAQELBQAD +ggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwt +LRvM7Kqas6pgghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93 +nAbowacYXVKV7cndJZ5t+qntozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3 ++wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmVYjzlVYA211QC//G5Xc7UI2/YRYRK +W2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUXfeu+h1sXIFRRk0pT +AwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/rokTLq +l1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG +4iZZRHUe2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZ +mUlO+KWA2yUPHGNiiskzZ2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A +7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7RcGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +# Issuer: CN=IdenTrust Public Sector Root CA 1 O=IdenTrust +# Subject: CN=IdenTrust Public Sector Root CA 1 O=IdenTrust +# Label: "IdenTrust Public Sector Root CA 1" +# Serial: 13298821034946342390521976156843933698 +# MD5 Fingerprint: 37:06:a5:b0:fc:89:9d:ba:f4:6b:8c:1a:64:cd:d5:ba +# SHA1 Fingerprint: ba:29:41:60:77:98:3f:f4:f3:ef:f2:31:05:3b:2e:ea:6d:4d:45:fd +# SHA256 Fingerprint: 30:d0:89:5a:9a:44:8a:26:20:91:63:55:22:d1:f5:20:10:b5:86:7a:ca:e1:2c:78:ef:95:8f:d4:f4:38:9f:2f +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBN +MQswCQYDVQQGEwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVu +VHJ1c3QgUHVibGljIFNlY3RvciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcN +MzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJVUzESMBAGA1UEChMJSWRlblRydXN0 +MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBSb290IENBIDEwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTyP4o7 +ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGy +RBb06tD6Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlS +bdsHyo+1W/CD80/HLaXIrcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF +/YTLNiCBWS2ab21ISGHKTN9T0a9SvESfqy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R +3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoSmJxZZoY+rfGwyj4GD3vw +EUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFnol57plzy +9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9V +GxyhLrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ +2fjXctscvG29ZV/viDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsV +WaFHVCkugyhfHMKiq3IXAAaOReyL4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gD +W/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMwDQYJKoZIhvcN +AQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHV +DRDtfULAj+7AmgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9 +TaDKQGXSc3z1i9kKlT/YPyNtGtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8G +lwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFtm6/n6J91eEyrRjuazr8FGF1NFTwW +mhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMxNRF4eKLg6TCMf4Df +WN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4Mhn5 ++bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJ +tshquDDIajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhA +GaQdp/lLQzfcaFpPz+vCZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv +8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +# Issuer: CN=Entrust Root Certification Authority - G2 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2009 Entrust, Inc. - for authorized use only +# Subject: CN=Entrust Root Certification Authority - G2 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2009 Entrust, Inc. - for authorized use only +# Label: "Entrust Root Certification Authority - G2" +# Serial: 1246989352 +# MD5 Fingerprint: 4b:e2:c9:91:96:65:0c:f4:0e:5a:93:92:a0:0a:fe:b2 +# SHA1 Fingerprint: 8c:f4:27:fd:79:0c:3a:d1:66:06:8d:e8:1e:57:ef:bb:93:22:72:d4 +# SHA256 Fingerprint: 43:df:57:74:b0:3e:7f:ef:5f:e4:0d:93:1a:7b:ed:f1:bb:2e:6b:42:73:8c:4e:6d:38:41:10:3d:3a:a7:f3:39 +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50 +cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3Qs +IEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVz +dCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwHhcNMDkwNzA3MTcy +NTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVu +dHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwt +dGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0 +aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP/vaCeb9zYQYKpSfYs1/T +RU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXzHHfV1IWN +cCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hW +wcKUs/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1 +U1+cPvQXLOZprE4yTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0 +jaWvYkxN4FisZDQSA/i2jZRjJKRxAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ60B7vfec7aVHUbI2fkBJmqzAN +BgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5ZiXMRrEPR9RP/ +jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ +Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v +1fN2D807iDginWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4R +nAuknZoh8/CbCzB428Hch0P+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmH +VHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xOe4pIb4tF9g== +-----END CERTIFICATE----- + +# Issuer: CN=Entrust Root Certification Authority - EC1 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2012 Entrust, Inc. - for authorized use only +# Subject: CN=Entrust Root Certification Authority - EC1 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2012 Entrust, Inc. - for authorized use only +# Label: "Entrust Root Certification Authority - EC1" +# Serial: 51543124481930649114116133369 +# MD5 Fingerprint: b6:7e:1d:f0:58:c5:49:6c:24:3b:3d:ed:98:18:ed:bc +# SHA1 Fingerprint: 20:d8:06:40:df:9b:25:f5:12:25:3a:11:ea:f7:59:8a:eb:14:b5:47 +# SHA256 Fingerprint: 02:ed:0e:b2:8c:14:da:45:16:5c:56:67:91:70:0d:64:51:d7:fb:56:f0:b2:ab:1d:3b:8e:b0:70:e5:6e:df:f5 +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkG +A1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3 +d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVu +dHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEzMDEGA1UEAxMq +RW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRUMxMB4XDTEy +MTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYwFAYD +VQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0 +L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0g +Zm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEVDMTB2MBAGByqGSM49AgEGBSuBBAAi +A2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHyAsWfoPZb1YsGGYZPUxBt +ByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef9eNi1KlH +Bz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O +BBYEFLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVC +R98crlOZF7ZvHH3hvxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nX +hTcGtXsI/esni0qU+eH6p44mCOh8kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +# Issuer: CN=CFCA EV ROOT O=China Financial Certification Authority +# Subject: CN=CFCA EV ROOT O=China Financial Certification Authority +# Label: "CFCA EV ROOT" +# Serial: 407555286 +# MD5 Fingerprint: 74:e1:b6:ed:26:7a:7a:44:30:33:94:ab:7b:27:81:30 +# SHA1 Fingerprint: e2:b8:29:4b:55:84:ab:6b:58:c2:90:46:6c:ac:3f:b8:39:8f:84:83 +# SHA256 Fingerprint: 5c:c3:d7:8e:4e:1d:5e:45:54:7a:04:e6:87:3e:64:f9:0c:f9:53:6d:1c:cc:2e:f8:00:f3:55:c4:c5:fd:70:fd +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJD +TjEwMC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9y +aXR5MRUwEwYDVQQDDAxDRkNBIEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkx +MjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEwMC4GA1UECgwnQ2hpbmEgRmluYW5j +aWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNBIEVWIFJP +T1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnVBU03 +sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpL +TIpTUnrD7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5 +/ZOkVIBMUtRSqy5J35DNuF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp +7hZZLDRJGqgG16iI0gNyejLi6mhNbiyWZXvKWfry4t3uMCz7zEasxGPrb382KzRz +EpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7xzbh72fROdOXW3NiGUgt +hxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9fpy25IGvP +a931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqot +aK8KgWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNg +TnYGmE69g60dWIolhdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfV +PKPtl8MeNPo4+QgO48BdK4PRVmrJtqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hv +cWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAfBgNVHSMEGDAWgBTj/i39KNAL +tbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAd +BgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB +ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObT +ej/tUxPQ4i9qecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdL +jOztUmCypAbqTuv0axn96/Ua4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBS +ESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sGE5uPhnEFtC+NiWYzKXZUmhH4J/qy +P5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfXBDrDMlI1Dlb4pd19 +xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjnaH9d +Ci77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN +5mydLIhyPDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe +/v5WOaHIz16eGWRGENoXkbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+Z +AAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3CekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ +5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +# Issuer: CN=OISTE WISeKey Global Root GB CA O=WISeKey OU=OISTE Foundation Endorsed +# Subject: CN=OISTE WISeKey Global Root GB CA O=WISeKey OU=OISTE Foundation Endorsed +# Label: "OISTE WISeKey Global Root GB CA" +# Serial: 157768595616588414422159278966750757568 +# MD5 Fingerprint: a4:eb:b9:61:28:2e:b7:2f:98:b0:35:26:90:99:51:1d +# SHA1 Fingerprint: 0f:f9:40:76:18:d3:d7:6a:4b:98:f0:a8:35:9e:0c:fd:27:ac:cc:ed +# SHA256 Fingerprint: 6b:9c:08:e8:6e:b0:f7:67:cf:ad:65:cd:98:b6:21:49:e5:49:4a:67:f5:84:5e:7b:d1:ed:01:9f:27:b8:6b:d6 +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBt +MQswCQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUg +Rm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9i +YWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAwMzJaFw0zOTEyMDExNTEwMzFaMG0x +CzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQLExlPSVNURSBG +b3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2Jh +bCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3 +HEokKtaXscriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGx +WuR51jIjK+FTzJlFXHtPrby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX +1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNk +u7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4oQnc/nSMbsrY9gBQHTC5P +99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvgGUpuuy9r +M2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUB +BAMCAQAwDQYJKoZIhvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrgh +cViXfa43FK8+5/ea4n32cZiZBKpDdHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5 +gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0VQreUGdNZtGn//3ZwLWoo4rO +ZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEuiHZeeevJuQHHf +aPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- + +# Issuer: CN=SZAFIR ROOT CA2 O=Krajowa Izba Rozliczeniowa S.A. +# Subject: CN=SZAFIR ROOT CA2 O=Krajowa Izba Rozliczeniowa S.A. +# Label: "SZAFIR ROOT CA2" +# Serial: 357043034767186914217277344587386743377558296292 +# MD5 Fingerprint: 11:64:c1:89:b0:24:b1:8c:b1:07:7e:89:9e:51:9e:99 +# SHA1 Fingerprint: e2:52:fa:95:3f:ed:db:24:60:bd:6e:28:f3:9c:cc:cf:5e:b3:3f:de +# SHA256 Fingerprint: a1:33:9d:33:28:1a:0b:56:e5:57:d3:d3:2b:1c:e7:f9:36:7e:b0:94:bd:5f:a7:2a:7e:50:04:c8:de:d7:ca:fe +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQEL +BQAwUTELMAkGA1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6 +ZW5pb3dhIFMuQS4xGDAWBgNVBAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkw +NzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJBgNVBAYTAlBMMSgwJgYDVQQKDB9L +cmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYDVQQDDA9TWkFGSVIg +Uk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5QqEvN +QLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT +3PSQ1hNKDJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw +3gAeqDRHu5rr/gsUvTaE2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr6 +3fE9biCloBK0TXC5ztdyO4mTp4CEHCdJckm1/zuVnsHMyAHs6A6KCpbns6aH5db5 +BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwiieDhZNRnvDF5YTy7ykHN +XGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD +AgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsF +AAOCAQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw +8PRBEew/R40/cof5O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOG +nXkZ7/e7DDWQw4rtTw/1zBLZpD67oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCP +oky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul4+vJhaAlIDf7js4MNIThPIGy +d05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6+/NNIxuZMzSg +LvWpCz/UXeHPhJ/iGcJfitYgHuNztw== +-----END CERTIFICATE----- + +# Issuer: CN=Certum Trusted Network CA 2 O=Unizeto Technologies S.A. OU=Certum Certification Authority +# Subject: CN=Certum Trusted Network CA 2 O=Unizeto Technologies S.A. OU=Certum Certification Authority +# Label: "Certum Trusted Network CA 2" +# Serial: 44979900017204383099463764357512596969 +# MD5 Fingerprint: 6d:46:9e:d9:25:6d:08:23:5b:5e:74:7d:1e:27:db:f2 +# SHA1 Fingerprint: d3:dd:48:3e:2b:bf:4c:05:e8:af:10:f5:fa:76:26:cf:d3:dc:30:92 +# SHA256 Fingerprint: b6:76:f2:ed:da:e8:77:5c:d3:6c:b0:f6:3c:d1:d4:60:39:61:f4:9e:62:65:ba:01:3a:2f:03:07:b6:d0:b8:04 +-----BEGIN CERTIFICATE----- +MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCB +gDELMAkGA1UEBhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMu +QS4xJzAlBgNVBAsTHkNlcnR1bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIG +A1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29yayBDQSAyMCIYDzIwMTExMDA2MDgz +OTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQTDEiMCAGA1UEChMZ +VW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3 +b3JrIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWA +DGSdhhuWZGc/IjoedQF97/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn +0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+oCgCXhVqqndwpyeI1B+twTUrWwbNWuKFB +OJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40bRr5HMNUuctHFY9rnY3lE +fktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2puTRZCr+E +Sv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1m +o130GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02i +sx7QBlrd9pPPV3WZ9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOW +OZV7bIBaTxNyxtd9KXpEulKkKtVBRgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgez +Tv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pyehizKV/Ma5ciSixqClnrDvFAS +adgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vMBhBgu4M1t15n +3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQ +F/xlhMcQSZDe28cmk4gmb3DWAl45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTf +CVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuAL55MYIR4PSFk1vtBHxgP58l1cb29 +XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMoclm2q8KMZiYcdywm +djWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tMpkT/ +WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jb +AoJnwTnbw3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksq +P/ujmv5zMnHCnsZy4YpoJ/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Ko +b7a6bINDd82Kkhehnlt4Fj1F4jNy3eFmypnTycUm/Q1oBEauttmbjL4ZvrHG8hnj +XALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLXis7VmFxWlgPF7ncGNf/P +5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7zAYspsbi +DrW5viSP +-----END CERTIFICATE----- + +# Issuer: CN=Hellenic Academic and Research Institutions RootCA 2015 O=Hellenic Academic and Research Institutions Cert. Authority +# Subject: CN=Hellenic Academic and Research Institutions RootCA 2015 O=Hellenic Academic and Research Institutions Cert. Authority +# Label: "Hellenic Academic and Research Institutions RootCA 2015" +# Serial: 0 +# MD5 Fingerprint: ca:ff:e2:db:03:d9:cb:4b:e9:0f:ad:84:fd:7b:18:ce +# SHA1 Fingerprint: 01:0c:06:95:a6:98:19:14:ff:bf:5f:c6:b0:b6:95:ea:29:e9:12:a6 +# SHA256 Fingerprint: a0:40:92:9a:02:ce:53:b4:ac:f4:f2:ff:c6:98:1c:e4:49:6f:75:5e:6d:45:fe:0b:2a:69:2b:cd:52:52:3f:36 +-----BEGIN CERTIFICATE----- +MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1Ix +DzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5k +IFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMT +N0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9v +dENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAxMTIxWjCBpjELMAkG +A1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNh +ZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkx +QDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1 +dGlvbnMgUm9vdENBIDIwMTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQDC+Kk/G4n8PDwEXT2QNrCROnk8ZlrvbTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA +4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+ehiGsxr/CL0BgzuNtFajT0 +AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+6PAQZe10 +4S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06C +ojXdFPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV +9Cz82XBST3i4vTwri5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrD +gfgXy5I2XdGj2HUb4Ysn6npIQf1FGQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6 +Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2fu/Z8VFRfS0myGlZYeCsargq +NhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9muiNX6hME6wGko +LfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc +Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVd +ctA4GGqd83EkVAswDQYJKoZIhvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0I +XtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+D1hYc2Ryx+hFjtyp8iY/xnmMsVMI +M4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrMd/K4kPFox/la/vot +9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+yd+2V +Z5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/ea +j8GsGsVn82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnh +X9izjFk0WaSrT2y7HxjbdavYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQ +l033DlZdwJVqwjbDG2jJ9SrcR5q+ss7FJej6A7na+RZukYT1HCjI/CbM1xyQVqdf +bzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVtJ94Cj8rDtSvK6evIIVM4 +pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGaJI7ZjnHK +e7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0 +vm9qp/UsQu0yrbYhnr68 +-----END CERTIFICATE----- + +# Issuer: CN=Hellenic Academic and Research Institutions ECC RootCA 2015 O=Hellenic Academic and Research Institutions Cert. Authority +# Subject: CN=Hellenic Academic and Research Institutions ECC RootCA 2015 O=Hellenic Academic and Research Institutions Cert. Authority +# Label: "Hellenic Academic and Research Institutions ECC RootCA 2015" +# Serial: 0 +# MD5 Fingerprint: 81:e5:b4:17:eb:c2:f5:e1:4b:0d:41:7b:49:92:fe:ef +# SHA1 Fingerprint: 9f:f1:71:8d:92:d5:9a:f3:7d:74:97:b4:bc:6f:84:68:0b:ba:b6:66 +# SHA256 Fingerprint: 44:b5:45:aa:8a:25:e6:5a:73:ca:15:dc:27:fc:36:d2:4c:1c:b9:95:3a:06:65:39:b1:15:82:dc:48:7b:48:33 +-----BEGIN CERTIFICATE----- +MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzAN +BgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl +c2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hl +bGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgRUNDIFJv +b3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEwMzcxMlowgaoxCzAJ +BgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmljIEFj +YWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5 +MUQwQgYDVQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0 +dXRpb25zIEVDQyBSb290Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKg +QehLgoRc4vgxEZmGZE4JJS+dQS8KrjVPdJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJa +jq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoKVlp8aQuqgAkkbH7BRqNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFLQi +C4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaep +lSTAGiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7Sof +TUwJCA3sS61kFyjndc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR +-----END CERTIFICATE----- + +# Issuer: CN=ISRG Root X1 O=Internet Security Research Group +# Subject: CN=ISRG Root X1 O=Internet Security Research Group +# Label: "ISRG Root X1" +# Serial: 172886928669790476064670243504169061120 +# MD5 Fingerprint: 0c:d2:f9:e0:da:17:73:e9:ed:86:4d:a5:e3:70:e7:4e +# SHA1 Fingerprint: ca:bd:2a:79:a1:07:6a:31:f2:1d:25:36:35:cb:03:9d:43:29:a5:e8 +# SHA256 Fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6 +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw +TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh +cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4 +WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu +ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY +MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc +h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+ +0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U +A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW +T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH +B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC +B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv +KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn +OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn +jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw +qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI +rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq +hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ +3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK +NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5 +ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur +TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC +jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc +oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq +4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA +mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d +emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- + +# Issuer: O=FNMT-RCM OU=AC RAIZ FNMT-RCM +# Subject: O=FNMT-RCM OU=AC RAIZ FNMT-RCM +# Label: "AC RAIZ FNMT-RCM" +# Serial: 485876308206448804701554682760554759 +# MD5 Fingerprint: e2:09:04:b4:d3:bd:d1:a0:14:fd:1a:d2:47:c4:57:1d +# SHA1 Fingerprint: ec:50:35:07:b2:15:c4:95:62:19:e2:a8:9a:5b:42:99:2c:4c:2c:20 +# SHA256 Fingerprint: eb:c5:57:0c:29:01:8c:4d:67:b1:aa:12:7b:af:12:f7:03:b4:61:1e:bc:17:b7:da:b5:57:38:94:17:9b:93:fa +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsx +CzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJ +WiBGTk1ULVJDTTAeFw0wODEwMjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJ +BgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBG +Tk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALpxgHpMhm5/ +yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcfqQgf +BBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAz +WHFctPVrbtQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxF +tBDXaEAUwED653cXeuYLj2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z +374jNUUeAlz+taibmSXaXvMiwzn15Cou08YfxGyqxRxqAQVKL9LFwag0Jl1mpdIC +IfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mwWsXmo8RZZUc1g16p6DUL +mbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnTtOmlcYF7 +wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peS +MKGJ47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2 +ZSysV4999AeU14ECll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMet +UqIJ5G+GR4of6ygnXYMgrwTJbFaai0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFPd9xf3E6Jobd2Sn9R2gzL+H +YJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1odHRwOi8vd3d3 +LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD +nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1 +RXxlDPiyN8+sD8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYM +LVN0V2Ue1bLdI4E7pWYjJ2cJj+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf +77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrTQfv6MooqtyuGC2mDOL7Nii4LcK2N +JpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW+YJF1DngoABd15jm +fZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7Ixjp +6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp +1txyM/1d8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B +9kiABdcPUXmsEKvU7ANm5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wok +RqEIr9baRRmW1FMdW4R58MD3R++Lj8UGrp1MYp3/RgT408m2ECVAdf4WqslKYIYv +uu8wd+RU4riEmViAqhOLUTpPSPaLtrM= +-----END CERTIFICATE----- + +# Issuer: CN=Amazon Root CA 1 O=Amazon +# Subject: CN=Amazon Root CA 1 O=Amazon +# Label: "Amazon Root CA 1" +# Serial: 143266978916655856878034712317230054538369994 +# MD5 Fingerprint: 43:c6:bf:ae:ec:fe:ad:2f:18:c6:88:68:30:fc:c8:e6 +# SHA1 Fingerprint: 8d:a7:f9:65:ec:5e:fc:37:91:0f:1c:6e:59:fd:c1:cc:6a:6e:de:16 +# SHA256 Fingerprint: 8e:cd:e6:88:4f:3d:87:b1:12:5b:a3:1a:c3:fc:b1:3d:70:16:de:7f:57:cc:90:4f:e1:cb:97:c6:ae:98:19:6e +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj +ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM +9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw +IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6 +VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L +93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm +jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA +A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI +U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs +N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv +o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU +5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy +rqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +# Issuer: CN=Amazon Root CA 2 O=Amazon +# Subject: CN=Amazon Root CA 2 O=Amazon +# Label: "Amazon Root CA 2" +# Serial: 143266982885963551818349160658925006970653239 +# MD5 Fingerprint: c8:e5:8d:ce:a8:42:e2:7a:c0:2a:5c:7c:9e:26:bf:66 +# SHA1 Fingerprint: 5a:8c:ef:45:d7:a6:98:59:76:7a:8c:8b:44:96:b5:78:cf:47:4b:1a +# SHA256 Fingerprint: 1b:a5:b2:aa:8c:65:40:1a:82:96:01:18:f8:0b:ec:4f:62:30:4d:83:ce:c4:71:3a:19:c3:9c:01:1e:a4:6d:b4 +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwF +ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6 +b24gUm9vdCBDQSAyMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTEL +MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv +b3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK2Wny2cSkxK +gXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4kHbZ +W0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg +1dKmSYXpN+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K +8nu+NQWpEjTj82R0Yiw9AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r +2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvdfLC6HM783k81ds8P+HgfajZRRidhW+me +z/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAExkv8LV/SasrlX6avvDXbR +8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSSbtqDT6Zj +mUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz +7Mt0Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6 ++XUyo05f7O0oYtlNc/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI +0u1ufm8/0i2BWSlmy5A5lREedCf+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMB +Af8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSwDPBMMPQFWAJI/TPlUq9LhONm +UjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oAA7CXDpO8Wqj2 +LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kS +k5Nrp+gvU5LEYFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl +7uxMMne0nxrpS10gxdr9HIcWxkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygm +btmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQgj9sAq+uEjonljYE1x2igGOpm/Hl +urR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbWaQbLU8uz/mtBzUF+ +fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoVYh63 +n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE +76KlXIx3KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H +9jVlpNMKVv/1F2Rs76giJUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT +4PsJYGw= +-----END CERTIFICATE----- + +# Issuer: CN=Amazon Root CA 3 O=Amazon +# Subject: CN=Amazon Root CA 3 O=Amazon +# Label: "Amazon Root CA 3" +# Serial: 143266986699090766294700635381230934788665930 +# MD5 Fingerprint: a0:d4:ef:0b:f7:b5:d8:49:95:2a:ec:f5:c4:fc:81:87 +# SHA1 Fingerprint: 0d:44:dd:8c:3c:8c:1a:1a:58:75:64:81:e9:0f:2e:2a:ff:b3:d2:6e +# SHA256 Fingerprint: 18:ce:6c:fe:7b:f1:4e:60:b2:e3:47:b8:df:e8:68:cb:31:d0:2e:bb:3a:da:27:15:69:f5:03:43:b4:6d:b3:a4 +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5 +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g +Um9vdCBDQSAzMB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG +A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg +Q0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZBf8ANm+gBG1bG8lKl +ui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjrZt6j +QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSr +ttvXBp43rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkr +BqWTrBqYaGFy+uGh0PsceGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteM +YyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +# Issuer: CN=Amazon Root CA 4 O=Amazon +# Subject: CN=Amazon Root CA 4 O=Amazon +# Label: "Amazon Root CA 4" +# Serial: 143266989758080763974105200630763877849284878 +# MD5 Fingerprint: 89:bc:27:d5:eb:17:8d:06:6a:69:d5:fd:89:47:b4:cd +# SHA1 Fingerprint: f6:10:84:07:d6:f8:bb:67:98:0c:c2:e2:44:c2:eb:ae:1c:ef:63:be +# SHA256 Fingerprint: e3:5d:28:41:9e:d0:20:25:cf:a6:90:38:cd:62:39:62:45:8d:a5:c6:95:fb:de:a3:c2:2b:0b:fb:25:89:70:92 +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5 +MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24g +Um9vdCBDQSA0MB4XDTE1MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkG +A1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJvb3Qg +Q0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN/sGKe0uoe0ZLY7Bi +9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri83Bk +M6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WB +MAoGCCqGSM49BAMDA2gAMGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlw +CkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1AE47xDqUEpHJWEadIRNyp4iciuRMStuW +1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +# Issuer: CN=TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 O=Turkiye Bilimsel ve Teknolojik Arastirma Kurumu - TUBITAK OU=Kamu Sertifikasyon Merkezi - Kamu SM +# Subject: CN=TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 O=Turkiye Bilimsel ve Teknolojik Arastirma Kurumu - TUBITAK OU=Kamu Sertifikasyon Merkezi - Kamu SM +# Label: "TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1" +# Serial: 1 +# MD5 Fingerprint: dc:00:81:dc:69:2f:3e:2f:b0:3b:f6:3d:5a:91:8e:49 +# SHA1 Fingerprint: 31:43:64:9b:ec:ce:27:ec:ed:3a:3f:0b:8f:0d:e4:e8:91:dd:ee:ca +# SHA256 Fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 +-----BEGIN CERTIFICATE----- +MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIx +GDAWBgNVBAcTD0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxp +bXNlbCB2ZSBUZWtub2xvamlrIEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0w +KwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24gTWVya2V6aSAtIEthbXUgU00xNjA0 +BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRpZmlrYXNpIC0gU3Vy +dW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYDVQQG +EwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXll +IEJpbGltc2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklU +QUsxLTArBgNVBAsTJEthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBT +TTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11IFNNIFNTTCBLb2sgU2VydGlmaWthc2kg +LSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr3UwM6q7 +a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y86Ij5iySr +LqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INr +N3wcwv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2X +YacQuFWQfw4tJzh03+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/ +iSIzL+aFCr2lqBs23tPcLG07xxO9WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4f +AJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQUZT/HiobGPN08VFw1+DrtUgxH +V8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh +AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPf +IPP54+M638yclNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4 +lzwDGrpDxpa5RXI4s6ehlj2Re37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c +8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0jq5Rm+K37DwhuJi1/FwcJsoz7UMCf +lo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= +-----END CERTIFICATE----- + +# Issuer: CN=GDCA TrustAUTH R5 ROOT O=GUANG DONG CERTIFICATE AUTHORITY CO.,LTD. +# Subject: CN=GDCA TrustAUTH R5 ROOT O=GUANG DONG CERTIFICATE AUTHORITY CO.,LTD. +# Label: "GDCA TrustAUTH R5 ROOT" +# Serial: 9009899650740120186 +# MD5 Fingerprint: 63:cc:d9:3d:34:35:5c:6f:53:a3:e2:08:70:48:1f:b4 +# SHA1 Fingerprint: 0f:36:38:5b:81:1a:25:c3:9b:31:4e:83:ca:e9:34:66:70:cc:74:b4 +# SHA256 Fingerprint: bf:ff:8f:d0:44:33:48:7d:6a:8a:a6:0c:1a:29:76:7a:9f:c2:bb:b0:5e:42:0f:71:3a:13:b9:92:89:1d:38:93 +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UE +BhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0 +MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVowYjELMAkGA1UEBhMCQ04xMjAwBgNV +BAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8w +HQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJj +Dp6L3TQsAlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBj +TnnEt1u9ol2x8kECK62pOqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+u +KU49tm7srsHwJ5uu4/Ts765/94Y9cnrrpftZTqfrlYwiOXnhLQiPzLyRuEH3FMEj +qcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ9Cy5WmYqsBebnh52nUpm +MUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQxXABZG12 +ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloP +zgsMR6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3Gk +L30SgLdTMEZeS1SZD2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeC +jGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4oR24qoAATILnsn8JuLwwoC8N9VKejveSswoA +HQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx9hoh49pwBiFYFIeFd3mqgnkC +AwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlRMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZm +DRd9FBUb1Ov9H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5 +COmSdI31R9KrO9b7eGZONn356ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ry +L3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd+PwyvzeG5LuOmCd+uh8W4XAR8gPf +JWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQHtZa37dG/OaG+svg +IHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBDF8Io +2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV +09tL7ECQ8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQ +XR4EzzffHqhmsYzmIGrv/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrq +T8p+ck0LcIymSLumoRT2+1hEmRSuqguTaaApJUqlyyvdimYHFngVV3Eb7PVHhPOe +MTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com Root Certification Authority RSA O=SSL Corporation +# Subject: CN=SSL.com Root Certification Authority RSA O=SSL Corporation +# Label: "SSL.com Root Certification Authority RSA" +# Serial: 8875640296558310041 +# MD5 Fingerprint: 86:69:12:c0:70:f1:ec:ac:ac:c2:d5:bc:a5:5b:a1:29 +# SHA1 Fingerprint: b7:ab:33:08:d1:ea:44:77:ba:14:80:12:5a:6f:bd:a9:36:49:0c:bb +# SHA256 Fingerprint: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UE +BhMCVVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQK +DA9TU0wgQ29ycG9yYXRpb24xMTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYwMjEyMTczOTM5WhcNNDEwMjEyMTcz +OTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hv +dXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcN +AQEBBQADggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2R +xFdHaxh3a3by/ZPkPQ/CFp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aX +qhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcC +C52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/geoeOy3ZExqysdBP+lSgQ3 +6YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkpk8zruFvh +/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrF +YD3ZfBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93E +JNyAKoFBbZQ+yODJgUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVc +US4cK38acijnALXRdMbX5J+tB5O2UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8 +ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi81xtZPCvM8hnIk2snYxnP/Okm ++Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4sbE6x/c+cCbqi +M+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4G +A1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGV +cpNxJK1ok1iOMq8bs3AD/CUrdIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBc +Hadm47GUBwwyOabqG7B52B2ccETjit3E+ZUfijhDPwGFpUenPUayvOUiaPd7nNgs +PgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAslu1OJD7OAUN5F7kR/ +q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjqerQ0 +cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jr +a6x+3uxjMxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90I +H37hVZkLId6Tngr75qNJvTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/Y +K9f1JmzJBjSWFupwWRoyeXkLtoh/D1JIPb9s2KJELtFOt3JY04kTlf5Eq/jXixtu +nLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406ywKBjYZC6VWg3dGq2ktuf +oYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NIWuuA8ShY +Ic2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com Root Certification Authority ECC O=SSL Corporation +# Subject: CN=SSL.com Root Certification Authority ECC O=SSL Corporation +# Label: "SSL.com Root Certification Authority ECC" +# Serial: 8495723813297216424 +# MD5 Fingerprint: 2e:da:e4:39:7f:9c:8f:37:d1:70:9f:26:17:51:3a:8e +# SHA1 Fingerprint: c3:19:7c:39:24:e6:54:af:1b:c4:ab:20:95:7a:e2:c3:0e:13:02:6a +# SHA256 Fingerprint: 34:17:bb:06:cc:60:07:da:1b:96:1c:92:0b:8a:b4:ce:3f:ad:82:0e:4a:a3:0b:9a:cb:c4:a7:4e:bd:ce:bc:65 +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMC +VVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9T +U0wgQ29ycG9yYXRpb24xMTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0 +aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEyMTgxNDAzWhcNNDEwMjEyMTgxNDAz +WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hvdXN0 +b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNvbSBS +b290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI +7Z4INcgn64mMU1jrYor+8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPg +CemB+vNH06NjMGEwHQYDVR0OBBYEFILRhXMw5zUE044CkvvlpNHEIejNMA8GA1Ud +EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTTjgKS++Wk0cQh6M0wDgYD +VR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCWe+0F+S8T +kdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+ +gA0z5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com EV Root Certification Authority RSA R2 O=SSL Corporation +# Subject: CN=SSL.com EV Root Certification Authority RSA R2 O=SSL Corporation +# Label: "SSL.com EV Root Certification Authority RSA R2" +# Serial: 6248227494352943350 +# MD5 Fingerprint: e1:1e:31:58:1a:ae:54:53:02:f6:17:6a:11:7b:4d:95 +# SHA1 Fingerprint: 74:3a:f0:52:9b:d0:32:a0:f4:4a:83:cd:d4:ba:a9:7b:7c:2e:c4:9a +# SHA256 Fingerprint: 2e:7b:f1:6c:c2:24:85:a7:bb:e2:aa:86:96:75:07:61:b0:ae:39:be:3b:2f:e9:d0:cc:6d:4e:f7:34:91:42:5c +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNV +BAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UE +CgwPU1NMIENvcnBvcmF0aW9uMTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2Vy +dGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMB4XDTE3MDUzMTE4MTQzN1oXDTQy +MDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEQMA4G +A1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYDVQQD +DC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvq +M0fNTPl9fb69LT3w23jhhqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssuf +OePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7wcXHswxzpY6IXFJ3vG2fThVUCAtZJycxa +4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTOZw+oz12WGQvE43LrrdF9 +HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+B6KjBSYR +aZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcA +b9ZhCBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQ +Gp8hLH94t2S42Oim9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQV +PWKchjgGAGYS5Fl2WlPAApiiECtoRHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMO +pgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+SlmJuwgUHfbSguPvuUCYHBBXtSu +UDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48+qvWBkofZ6aY +MBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa4 +9QaAJadz20ZpqJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBW +s47LCp1Jjr+kxJG7ZhcFUZh1++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5 +Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nxY/hoLVUE0fKNsKTPvDxeH3jnpaAg +cLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2GguDKBAdRUNf/ktUM +79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDzOFSz +/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXt +ll9ldDz7CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEm +Kf7GUmG6sXP/wwyc5WxqlD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKK +QbNmC1r7fSOl8hqw/96bg5Qu0T/fkreRrwU7ZcegbLHNYhLDkBvjJc40vG93drEQ +w/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1hlMYegouCRw2n5H9gooi +S9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX9hwJ1C07 +mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com EV Root Certification Authority ECC O=SSL Corporation +# Subject: CN=SSL.com EV Root Certification Authority ECC O=SSL Corporation +# Label: "SSL.com EV Root Certification Authority ECC" +# Serial: 3182246526754555285 +# MD5 Fingerprint: 59:53:22:65:83:42:01:54:c0:ce:42:b9:5a:7c:f2:90 +# SHA1 Fingerprint: 4c:dd:51:a3:d1:f5:20:32:14:b0:c6:c5:32:23:03:91:c7:46:42:6d +# SHA256 Fingerprint: 22:a2:c1:f7:bd:ed:70:4c:c1:e7:01:b5:f4:08:c3:10:88:0f:e9:56:b5:de:2a:4a:44:f9:9c:87:3a:25:a7:c8 +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMC +VVMxDjAMBgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9T +U0wgQ29ycG9yYXRpb24xNDAyBgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEyMTgxNTIzWhcNNDEwMjEyMTgx +NTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAOBgNVBAcMB0hv +dXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NMLmNv +bSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49 +AgEGBSuBBAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMA +VIbc/R/fALhBYlzccBYy3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1Kthku +WnBaBu2+8KGwytAJKaNjMGEwHQYDVR0OBBYEFFvKXuXe0oGqzagtZFG22XKbl+ZP +MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe5d7SgarNqC1kUbbZcpuX +5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJN+vp1RPZ +ytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZg +h5Mmm7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R6 +# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R6 +# Label: "GlobalSign Root CA - R6" +# Serial: 1417766617973444989252670301619537 +# MD5 Fingerprint: 4f:dd:07:e4:d4:22:64:39:1e:0c:37:42:ea:d1:c6:ae +# SHA1 Fingerprint: 80:94:64:0e:b5:a7:a1:ca:11:9c:1f:dd:d5:9f:81:02:63:a7:fb:d1 +# SHA256 Fingerprint: 2c:ab:ea:fe:37:d0:6c:a2:2a:ba:73:91:c0:03:3d:25:98:29:52:c4:53:64:73:49:76:3a:3a:b5:ad:6c:cf:69 +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIORea7A4Mzw4VlSOb/RVEwDQYJKoZIhvcNAQEMBQAwTDEg +MB4GA1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjYxEzARBgNVBAoTCkdsb2Jh +bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMTQxMjEwMDAwMDAwWhcNMzQx +MjEwMDAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSNjET +MBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAJUH6HPKZvnsFMp7PPcNCPG0RQssgrRI +xutbPK6DuEGSMxSkb3/pKszGsIhrxbaJ0cay/xTOURQh7ErdG1rG1ofuTToVBu1k +ZguSgMpE3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxD +aNc9PIrFsmbVkJq3MQbFvuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJw +LnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqMPKq0pPbzlUoSB239jLKJz9CgYXfIWHSw +1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+azayOeSsJDa38O+2HBNX +k7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05OWgtH8wY2 +SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/h +bguyCLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4n +WUx2OVvq+aWh2IMP0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpY +rZxCRXluDocZXFSxZba/jJvcE+kNb7gu3GduyYsRtYQUigAZcIN5kZeR1Bonvzce +MgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNVHSMEGDAWgBSu +bAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN +nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGt +Ixg93eFyRJa0lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr61 +55wsTLxDKZmOMNOsIeDjHfrYBzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLj +vUYAGm0CuiVdjaExUd1URhxN25mW7xocBFymFe944Hn+Xds+qkxV/ZoVqW/hpvvf +cDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr3TsTjxKM4kEaSHpz +oHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+uA/iU3/gKbaKxCXcPu9czc8FB10jZp +nOZ7BN9uBmm23goJSFmH63sUYHpkqmlD75HHTOwY3WzvUy2MmeFe8nI+z1TIvWfs +pA9MRf/TuTAjB0yPEL+GltmZWrSZVxykzLsViVO6LAUP5MSeGbEYNNVMnbrt9x+v +JJUEeKgDu+6B5dpffItKoZB0JaezPkvILFa9x8jvOOJckvB595yEunQtYQEgfn7R +8k8HWV+LLUNS60YMlOH1Zkd5d9VUWx+tJDfLRVpOoERIyNiwmcUVhAn21klJwGW4 +5hpxbqCo8YLoRT5s1gLXCmeDBVrJpBA= +-----END CERTIFICATE----- + +# Issuer: CN=OISTE WISeKey Global Root GC CA O=WISeKey OU=OISTE Foundation Endorsed +# Subject: CN=OISTE WISeKey Global Root GC CA O=WISeKey OU=OISTE Foundation Endorsed +# Label: "OISTE WISeKey Global Root GC CA" +# Serial: 44084345621038548146064804565436152554 +# MD5 Fingerprint: a9:d6:b9:2d:2f:93:64:f8:a5:69:ca:91:e9:68:07:23 +# SHA1 Fingerprint: e0:11:84:5e:34:de:be:88:81:b9:9c:f6:16:26:d1:96:1f:c3:b9:31 +# SHA256 Fingerprint: 85:60:f9:1c:36:24:da:ba:95:70:b5:fe:a0:db:e3:6f:f1:1a:83:23:be:94:86:85:4f:b3:f3:4a:55:71:19:8d +-----BEGIN CERTIFICATE----- +MIICaTCCAe+gAwIBAgIQISpWDK7aDKtARb8roi066jAKBggqhkjOPQQDAzBtMQsw +CQYDVQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91 +bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwg +Um9vdCBHQyBDQTAeFw0xNzA1MDkwOTQ4MzRaFw00MjA1MDkwOTU4MzNaMG0xCzAJ +BgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYDVQQLExlPSVNURSBGb3Vu +ZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEdsb2JhbCBS +b290IEdDIENBMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAETOlQwMYPchi82PG6s4ni +eUqjFqdrVCTbUf/q9Akkwwsin8tqJ4KBDdLArzHkdIJuyiXZjHWd8dvQmqJLIX4W +p2OQ0jnUsYd4XxiWD1AbNTcPasbc2RNNpI6QN+a9WzGRo1QwUjAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7T +rYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0EAwMDaAAwZQIwJsdpW9zV +57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtkAjEA2zQg +Mgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 +-----END CERTIFICATE----- + +# Issuer: CN=UCA Global G2 Root O=UniTrust +# Subject: CN=UCA Global G2 Root O=UniTrust +# Label: "UCA Global G2 Root" +# Serial: 124779693093741543919145257850076631279 +# MD5 Fingerprint: 80:fe:f0:c4:4a:f0:5c:62:32:9f:1c:ba:78:a9:50:f8 +# SHA1 Fingerprint: 28:f9:78:16:19:7a:ff:18:25:18:aa:44:fe:c1:a0:ce:5c:b6:4c:8a +# SHA256 Fingerprint: 9b:ea:11:c9:76:fe:01:47:64:c1:be:56:a6:f9:14:b5:a5:60:31:7a:bd:99:88:39:33:82:e5:16:1a:a0:49:3c +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIQXd+x2lqj7V2+WmUgZQOQ7zANBgkqhkiG9w0BAQsFADA9 +MQswCQYDVQQGEwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxGzAZBgNVBAMMElVDQSBH +bG9iYWwgRzIgUm9vdDAeFw0xNjAzMTEwMDAwMDBaFw00MDEyMzEwMDAwMDBaMD0x +CzAJBgNVBAYTAkNOMREwDwYDVQQKDAhVbmlUcnVzdDEbMBkGA1UEAwwSVUNBIEds +b2JhbCBHMiBSb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxeYr +b3zvJgUno4Ek2m/LAfmZmqkywiKHYUGRO8vDaBsGxUypK8FnFyIdK+35KYmToni9 +kmugow2ifsqTs6bRjDXVdfkX9s9FxeV67HeToI8jrg4aA3++1NDtLnurRiNb/yzm +VHqUwCoV8MmNsHo7JOHXaOIxPAYzRrZUEaalLyJUKlgNAQLx+hVRZ2zA+te2G3/R +VogvGjqNO7uCEeBHANBSh6v7hn4PJGtAnTRnvI3HLYZveT6OqTwXS3+wmeOwcWDc +C/Vkw85DvG1xudLeJ1uK6NjGruFZfc8oLTW4lVYa8bJYS7cSN8h8s+1LgOGN+jIj +tm+3SJUIsUROhYw6AlQgL9+/V087OpAh18EmNVQg7Mc/R+zvWr9LesGtOxdQXGLY +D0tK3Cv6brxzks3sx1DoQZbXqX5t2Okdj4q1uViSukqSKwxW/YDrCPBeKW4bHAyv +j5OJrdu9o54hyokZ7N+1wxrrFv54NkzWbtA+FxyQF2smuvt6L78RHBgOLXMDj6Dl +NaBa4kx1HXHhOThTeEDMg5PXCp6dW4+K5OXgSORIskfNTip1KnvyIvbJvgmRlld6 +iIis7nCs+dwp4wwcOxJORNanTrAmyPPZGpeRaOrvjUYG0lZFWJo8DA+DuAUlwznP +O6Q0ibd5Ei9Hxeepl2n8pndntd978XplFeRhVmUCAwEAAaNCMEAwDgYDVR0PAQH/ +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFIHEjMz15DD/pQwIX4wV +ZyF0Ad/fMA0GCSqGSIb3DQEBCwUAA4ICAQATZSL1jiutROTL/7lo5sOASD0Ee/oj +L3rtNtqyzm325p7lX1iPyzcyochltq44PTUbPrw7tgTQvPlJ9Zv3hcU2tsu8+Mg5 +1eRfB70VVJd0ysrtT7q6ZHafgbiERUlMjW+i67HM0cOU2kTC5uLqGOiiHycFutfl +1qnN3e92mI0ADs0b+gO3joBYDic/UvuUospeZcnWhNq5NXHzJsBPd+aBJ9J3O5oU +b3n09tDh05S60FdRvScFDcH9yBIw7m+NESsIndTUv4BFFJqIRNow6rSn4+7vW4LV +PtateJLbXDzz2K36uGt/xDYotgIVilQsnLAXc47QN6MUPJiVAAwpBVueSUmxX8fj +y88nZY41F7dXyDDZQVu5FLbowg+UMaeUmMxq67XhJ/UQqAHojhJi6IjMtX9Gl8Cb +EGY4GjZGXyJoPd/JxhMnq1MGrKI8hgZlb7F+sSlEmqO6SWkoaY/X5V+tBIZkbxqg +DMUIYs6Ao9Dz7GjevjPHF1t/gMRMTLGmhIrDO7gJzRSBuhjjVFc2/tsvfEehOjPI ++Vg7RE+xygKJBJYoaMVLuCaJu9YzL1DV/pqJuhgyklTGW+Cd+V7lDSKb9triyCGy +YiGqhkCyLmTTX8jjfhFnRR8F/uOi77Oos/N9j/gMHyIfLXC0uAE0djAA5SN4p1bX +UB+K+wb1whnw0A== +-----END CERTIFICATE----- + +# Issuer: CN=UCA Extended Validation Root O=UniTrust +# Subject: CN=UCA Extended Validation Root O=UniTrust +# Label: "UCA Extended Validation Root" +# Serial: 106100277556486529736699587978573607008 +# MD5 Fingerprint: a1:f3:5f:43:c6:34:9b:da:bf:8c:7e:05:53:ad:96:e2 +# SHA1 Fingerprint: a3:a1:b0:6f:24:61:23:4a:e3:36:a5:c2:37:fc:a6:ff:dd:f0:d7:3a +# SHA256 Fingerprint: d4:3a:f9:b3:54:73:75:5c:96:84:fc:06:d7:d8:cb:70:ee:5c:28:e7:73:fb:29:4e:b4:1e:e7:17:22:92:4d:24 +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQT9Irj/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBH +MQswCQYDVQQGEwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBF +eHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMx +MDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNV +BAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrsiWog +D4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvS +sPGP2KxFRv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aop +O2z6+I9tTcg1367r3CTueUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dk +sHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR59mzLC52LqGj3n5qiAno8geK+LLNEOfi +c0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH0mK1lTnj8/FtDw5lhIpj +VMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KRel7sFsLz +KuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/ +TuDvB0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41G +sx2VYVdWf6/wFlthWG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs +1+lvK9JKBZP8nm9rZ/+I8U6laUpSNwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQD +fwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS3H5aBZ8eNJr34RQwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBADaN +l8xCFWQpN5smLNb7rhVpLGsaGvdftvkHTFnq88nIua7Mui563MD1sC3AO6+fcAUR +ap8lTwEpcOPlDOHqWnzcSbvBHiqB9RZLcpHIojG5qtr8nR/zXUACE/xOHAbKsxSQ +VBcZEhrxH9cMaVr2cXj0lH2RC47skFSOvG+hTKv8dGT9cZr4QQehzZHkPJrgmzI5 +c6sq1WnIeJEmMX3ixzDx/BR4dxIOE/TdFpS/S2d7cFOFyrC78zhNLJA5wA3CXWvp +4uXViI3WLL+rG761KIcSF3Ru/H38j9CHJrAb+7lsq+KePRXBOy5nAliRn+/4Qh8s +t2j1da3Ptfb/EX3C8CSlrdP6oDyp+l3cpaDvRKS+1ujl5BOWF3sGPjLtx7dCvHaj +2GU4Kzg1USEODm8uNBNA4StnDG1KQTAYI1oyVZnJF+A83vbsea0rWBmirSwiGpWO +vpaQXUJXxPkUAzUrHC1RVwinOt4/5Mi0A3PCwSaAuwtCH60NryZy2sy+s6ODWA2C +xR9GUeOcGMyNm43sSet1UNWMKFnKdDTajAshqx7qG+XH/RU+wBeq+yNuJkbL+vmx +cmtpzyKEC2IPrNkZAJSidjzULZrtBJ4tBmIQN1IchXIbJ+XMxjHsN+xjWZsLHXbM +fjKaiJUINlK73nZfdklJrX+9ZSCyycErdhh2n1ax +-----END CERTIFICATE----- + +# Issuer: CN=Certigna Root CA O=Dhimyotis OU=0002 48146308100036 +# Subject: CN=Certigna Root CA O=Dhimyotis OU=0002 48146308100036 +# Label: "Certigna Root CA" +# Serial: 269714418870597844693661054334862075617 +# MD5 Fingerprint: 0e:5c:30:62:27:eb:5b:bc:d7:ae:62:ba:e9:d5:df:77 +# SHA1 Fingerprint: 2d:0d:52:14:ff:9e:ad:99:24:01:74:20:47:6e:6c:85:27:27:f5:43 +# SHA256 Fingerprint: d4:8d:3d:23:ee:db:50:a4:59:e5:51:97:60:1c:27:77:4b:9d:7b:18:c9:4d:5a:05:95:11:a1:02:50:b9:31:68 +-----BEGIN CERTIFICATE----- +MIIGWzCCBEOgAwIBAgIRAMrpG4nxVQMNo+ZBbcTjpuEwDQYJKoZIhvcNAQELBQAw +WjELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczEcMBoGA1UECwwTMDAw +MiA0ODE0NjMwODEwMDAzNjEZMBcGA1UEAwwQQ2VydGlnbmEgUm9vdCBDQTAeFw0x +MzEwMDEwODMyMjdaFw0zMzEwMDEwODMyMjdaMFoxCzAJBgNVBAYTAkZSMRIwEAYD +VQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYzMDgxMDAwMzYxGTAX +BgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw +ggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sO +ty3tRQgXstmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9M +CiBtnyN6tMbaLOQdLNyzKNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPu +I9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8JXrJhFwLrN1CTivngqIkicuQstDuI7pm +TLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16XdG+RCYyKfHx9WzMfgIh +C59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq4NYKpkDf +ePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3Yz +IoejwpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWT +Co/1VTp2lc5ZmIoJlXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1k +JWumIWmbat10TWuXekG9qxf5kBdIjzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5 +hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp//TBt2dzhauH8XwIDAQABo4IB +GjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of +1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczov +L3d3d3cuY2VydGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+gLaArhilo +dHRwOi8vY3JsLmNlcnRpZ25hLmZyL2NlcnRpZ25hcm9vdGNhLmNybDAxoC+gLYYr +aHR0cDovL2NybC5kaGlteW90aXMuY29tL2NlcnRpZ25hcm9vdGNhLmNybDANBgkq +hkiG9w0BAQsFAAOCAgEAlLieT/DjlQgi581oQfccVdV8AOItOoldaDgvUSILSo3L +6btdPrtcPbEo/uRTVRPPoZAbAh1fZkYJMyjhDSSXcNMQH+pkV5a7XdrnxIxPTGRG +HVyH41neQtGbqH6mid2PHMkwgu07nM3A6RngatgCdTer9zQoKJHyBApPNeNgJgH6 +0BGM+RFq7q89w1DTj18zeTyGqHNFkIwgtnJzFyO+B2XleJINugHA64wcZr+shncB +lA2c5uk5jR+mUYyZDDl34bSb+hxnV29qao6pK0xXeXpXIs/NX2NGjVxZOob4Mkdi +o2cNGJHc+6Zr9UhhcyNZjgKnvETq9Emd8VRY+WCv2hikLyhF3HqgiIZd8zvn/yk1 +gPxkQ5Tm4xxvvq0OKmOZK8l+hfZx6AYDlf7ej0gcWtSS6Cvu5zHbugRqh5jnxV/v +faci9wHYTfmJ0A6aBVmknpjZbyvKcL5kwlWj9Omvw5Ip3IgWJJk8jSaYtlu3zM63 +Nwf9JtmYhST/WSMDmu2dnajkXjjO11INb9I/bbEFa0nOipFGc/T2L/Coc3cOZayh +jWZSaX5LaAzHHjcng6WMxwLkFM1JAbBzs/3GkDpv0mztO+7skb6iQ12LAEpmJURw +3kAP+HwV96LOPNdeE4yBFxgX0b3xdxA61GU5wSesVywlVP+i2k+KYTlerj1KjL0= +-----END CERTIFICATE----- + +# Issuer: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI +# Subject: CN=emSign Root CA - G1 O=eMudhra Technologies Limited OU=emSign PKI +# Label: "emSign Root CA - G1" +# Serial: 235931866688319308814040 +# MD5 Fingerprint: 9c:42:84:57:dd:cb:0b:a7:2e:95:ad:b6:f3:da:bc:ac +# SHA1 Fingerprint: 8a:c7:ad:8f:73:ac:4e:c1:b5:75:4d:a5:40:f4:fc:cf:7c:b5:8e:8c +# SHA256 Fingerprint: 40:f6:af:03:46:a9:9a:a1:cd:1d:55:5a:4e:9c:ce:62:c7:f9:63:46:03:ee:40:66:15:83:3d:c8:c8:d0:03:67 +-----BEGIN CERTIFICATE----- +MIIDlDCCAnygAwIBAgIKMfXkYgxsWO3W2DANBgkqhkiG9w0BAQsFADBnMQswCQYD +VQQGEwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBU +ZWNobm9sb2dpZXMgTGltaXRlZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBH +MTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgxODMwMDBaMGcxCzAJBgNVBAYTAklO +MRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVkaHJhIFRlY2hub2xv +Z2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQz +f2N4aLTNLnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO +8oG0x5ZOrRkVUkr+PHB1cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aq +d7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHWDV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhM +tTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ6DqS0hdW5TUaQBw+jSzt +Od9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrHhQIDAQAB +o0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQD +AgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31x +PaOfG1vR2vjTnGs2vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjM +wiI/aTvFthUvozXGaCocV685743QNcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6d +GNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q+Mri/Tm3R7nrft8EI6/6nAYH +6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeihU80Bv2noWgby +RQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx +iN66zB+Afko= +-----END CERTIFICATE----- + +# Issuer: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI +# Subject: CN=emSign ECC Root CA - G3 O=eMudhra Technologies Limited OU=emSign PKI +# Label: "emSign ECC Root CA - G3" +# Serial: 287880440101571086945156 +# MD5 Fingerprint: ce:0b:72:d1:9f:88:8e:d0:50:03:e8:e3:b8:8b:67:40 +# SHA1 Fingerprint: 30:43:fa:4f:f2:57:dc:a0:c3:80:ee:2e:58:ea:78:b2:3f:e6:bb:c1 +# SHA256 Fingerprint: 86:a1:ec:ba:08:9c:4a:8d:3b:be:27:34:c6:12:ba:34:1d:81:3e:04:3c:f9:e8:a8:62:cd:5c:57:a3:6b:be:6b +-----BEGIN CERTIFICATE----- +MIICTjCCAdOgAwIBAgIKPPYHqWhwDtqLhDAKBggqhkjOPQQDAzBrMQswCQYDVQQG +EwJJTjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNo +bm9sb2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0g +RzMwHhcNMTgwMjE4MTgzMDAwWhcNNDMwMjE4MTgzMDAwWjBrMQswCQYDVQQGEwJJ +TjETMBEGA1UECxMKZW1TaWduIFBLSTElMCMGA1UEChMcZU11ZGhyYSBUZWNobm9s +b2dpZXMgTGltaXRlZDEgMB4GA1UEAxMXZW1TaWduIEVDQyBSb290IENBIC0gRzMw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAAQjpQy4LRL1KPOxst3iAhKAnjlfSU2fySU0 +WXTsuwYc58Byr+iuL+FBVIcUqEqy6HyC5ltqtdyzdc6LBtCGI79G1Y4PPwT01xyS +fvalY8L1X44uT6EYGQIrMgqCZH0Wk9GjQjBAMB0GA1UdDgQWBBR8XQKEE9TMipuB +zhccLikenEhjQjAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggq +hkjOPQQDAwNpADBmAjEAvvNhzwIQHWSVB7gYboiFBS+DCBeQyh+KTOgNG3qxrdWB +CUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7jHvrZQnD ++JbNR6iC8hZVdyR+EhCVBCyj +-----END CERTIFICATE----- + +# Issuer: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI +# Subject: CN=emSign Root CA - C1 O=eMudhra Inc OU=emSign PKI +# Label: "emSign Root CA - C1" +# Serial: 825510296613316004955058 +# MD5 Fingerprint: d8:e3:5d:01:21:fa:78:5a:b0:df:ba:d2:ee:2a:5f:68 +# SHA1 Fingerprint: e7:2e:f1:df:fc:b2:09:28:cf:5d:d4:d5:67:37:b1:51:cb:86:4f:01 +# SHA256 Fingerprint: 12:56:09:aa:30:1d:a0:a2:49:b9:7a:82:39:cb:6a:34:21:6f:44:dc:ac:9f:39:54:b1:42:92:f2:e8:c8:60:8f +-----BEGIN CERTIFICATE----- +MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkG +A1UEBhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEg +SW5jMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAw +MFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln +biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNpZ24gUm9v +dCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+upufGZ +BczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZ +HdPIWoU/Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH +3DspVpNqs8FqOp099cGXOFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvH +GPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4VI5b2P/AgNBbeCsbEBEV5f6f9vtKppa+c +xSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleoomslMuoaJuvimUnzYnu3Yy1 +aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+XJGFehiq +TbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL +BQADggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87 +/kOXSTKZEhVb3xEp/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4 +kqNPEjE2NuLe/gDEo2APJ62gsIq1NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrG +YQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9wC68AivTxEDkigcxHpvOJpkT ++xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQBmIMMMAVSKeo +WXzhriKi4gp6D/piq1JM4fHfyr6DDUI= +-----END CERTIFICATE----- + +# Issuer: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI +# Subject: CN=emSign ECC Root CA - C3 O=eMudhra Inc OU=emSign PKI +# Label: "emSign ECC Root CA - C3" +# Serial: 582948710642506000014504 +# MD5 Fingerprint: 3e:53:b3:a3:81:ee:d7:10:f8:d3:b0:1d:17:92:f5:d5 +# SHA1 Fingerprint: b6:af:43:c2:9b:81:53:7d:f6:ef:6b:c3:1f:1f:60:15:0c:ee:48:66 +# SHA256 Fingerprint: bc:4d:80:9b:15:18:9d:78:db:3e:1d:8c:f4:f9:72:6a:79:5d:a1:64:3c:a5:f1:35:8e:1d:db:0e:dc:0d:7e:b3 +-----BEGIN CERTIFICATE----- +MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQG +EwJVUzETMBEGA1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMx +IDAeBgNVBAMTF2VtU2lnbiBFQ0MgUm9vdCBDQSAtIEMzMB4XDTE4MDIxODE4MzAw +MFoXDTQzMDIxODE4MzAwMFowWjELMAkGA1UEBhMCVVMxEzARBgNVBAsTCmVtU2ln +biBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMSAwHgYDVQQDExdlbVNpZ24gRUND +IFJvb3QgQ0EgLSBDMzB2MBAGByqGSM49AgEGBSuBBAAiA2IABP2lYa57JhAd6bci +MK4G9IGzsUJxlTm801Ljr6/58pc1kjZGDoeVjbk5Wum739D+yAdBPLtVb4Ojavti +sIGJAnB9SMVK4+kiVCJNk7tCDK93nCOmfddhEc5lx/h//vXyqaNCMEAwHQYDVR0O +BBYEFPtaSNCAIEDyqOkAB2kZd6fmw/TPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB +Af8EBTADAQH/MAoGCCqGSM49BAMDA2gAMGUCMQC02C8Cif22TGK6Q04ThHK1rt0c +3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwUZOR8loMRnLDRWmFLpg9J +0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ== +-----END CERTIFICATE----- + +# Issuer: CN=Hongkong Post Root CA 3 O=Hongkong Post +# Subject: CN=Hongkong Post Root CA 3 O=Hongkong Post +# Label: "Hongkong Post Root CA 3" +# Serial: 46170865288971385588281144162979347873371282084 +# MD5 Fingerprint: 11:fc:9f:bd:73:30:02:8a:fd:3f:f3:58:b9:cb:20:f0 +# SHA1 Fingerprint: 58:a2:d0:ec:20:52:81:5b:c1:f3:f8:64:02:24:4e:c2:8e:02:4b:02 +# SHA256 Fingerprint: 5a:2f:c0:3f:0c:83:b0:90:bb:fa:40:60:4b:09:88:44:6c:76:36:18:3d:f9:84:6e:17:10:1a:44:7f:b8:ef:d6 +-----BEGIN CERTIFICATE----- +MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQEL +BQAwbzELMAkGA1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJ +SG9uZyBLb25nMRYwFAYDVQQKEw1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25n +a29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2MDMwMjI5NDZaFw00MjA2MDMwMjI5 +NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtvbmcxEjAQBgNVBAcT +CUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMXSG9u +Z2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK +AoICAQCziNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFO +dem1p+/l6TWZ5Mwc50tfjTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mI +VoBc+L0sPOFMV4i707mV78vH9toxdCim5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV +9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOesL4jpNrcyCse2m5FHomY +2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj0mRiikKY +vLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+Tt +bNe/JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZb +x39ri1UbSsUgYT2uy1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+ +l2oBlKN8W4UdKjk60FSh0Tlxnf0h+bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YK +TE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsGxVd7GYYKecsAyVKvQv83j+Gj +Hno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwIDAQABo2MwYTAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e +i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEw +DQYJKoZIhvcNAQELBQADggIBAFbVe27mIgHSQpsY1Q7XZiNc4/6gx5LS6ZStS6LG +7BJ8dNVI0lkUmcDrudHr9EgwW62nV3OZqdPlt9EuWSRY3GguLmLYauRwCy0gUCCk +MpXRAJi70/33MvJJrsZ64Ee+bs7Lo3I6LWldy8joRTnU+kLBEUx3XZL7av9YROXr +gZ6voJmtvqkBZss4HTzfQx/0TW60uhdG/H39h4F5ag0zD/ov+BS5gLNdTaqX4fnk +GMX41TiMJjz98iji7lpJiCzfeT2OnpA8vUFKOt1b9pq0zj8lMH8yfaIDlNDceqFS +3m6TjRgm/VWsvY+b0s+v54Ysyx8Jb6NvqYTUc79NoXQbTiNg8swOqn+knEwlqLJm +Ozj/2ZQw9nKEvmhVEA/GcywWaZMH/rFF7buiVWqw2rVKAiUnhde3t4ZEFolsgCs+ +l6mc1X5VTMbeRRAc6uk7nwNT7u56AQIWeNTowr5GdogTPyK7SBIdUgC0An4hGh6c +JfTzPV4e0hz5sy229zdcxsshTrD3mUcYhcErulWuBurQB7Lcq9CClnXO0lD+mefP +L5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB60PZ2Pierc+xYw5F9KBa +LJstxabArahH9CdMOA0uG0k7UvToiIMrVCjU8jVStDKDYmlkDJGcn5fqdBb9HxEG +mpv0 +-----END CERTIFICATE----- + +# Issuer: CN=Entrust Root Certification Authority - G4 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2015 Entrust, Inc. - for authorized use only +# Subject: CN=Entrust Root Certification Authority - G4 O=Entrust, Inc. OU=See www.entrust.net/legal-terms/(c) 2015 Entrust, Inc. - for authorized use only +# Label: "Entrust Root Certification Authority - G4" +# Serial: 289383649854506086828220374796556676440 +# MD5 Fingerprint: 89:53:f1:83:23:b7:7c:8e:05:f1:8c:71:38:4e:1f:88 +# SHA1 Fingerprint: 14:88:4e:86:26:37:b0:26:af:59:62:5c:40:77:ec:35:29:ba:96:01 +# SHA256 Fingerprint: db:35:17:d1:f6:73:2a:2d:5a:b9:7c:53:3e:c7:07:79:ee:32:70:a6:2f:b4:ac:42:38:37:24:60:e6:f0:1e:88 +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAw +gb4xCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQL +Ex9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykg +MjAxNSBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAw +BgNVBAMTKUVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0 +MB4XDTE1MDUyNzExMTExNloXDTM3MTIyNzExNDExNlowgb4xCzAJBgNVBAYTAlVT +MRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1 +c3QubmV0L2xlZ2FsLXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxNSBFbnRydXN0LCBJ +bmMuIC0gZm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxMjAwBgNVBAMTKUVudHJ1c3Qg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEc0MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAsewsQu7i0TD/pZJH4i3DumSXbcr3DbVZwbPLqGgZ +2K+EbTBwXX7zLtJTmeH+H17ZSK9dE43b/2MzTdMAArzE+NEGCJR5WIoV3imz/f3E +T+iq4qA7ec2/a0My3dl0ELn39GjUu9CH1apLiipvKgS1sqbHoHrmSKvS0VnM1n4j +5pds8ELl3FFLFUHtSUrJ3hCX1nbB76W1NhSXNdh4IjVS70O92yfbYVaCNNzLiGAM +C1rlLAHGVK/XqsEQe9IFWrhAnoanw5CGAlZSCXqc0ieCU0plUmr1POeo8pyvi73T +DtTUXm6Hnmo9RR3RXRv06QqsYJn7ibT/mCzPfB3pAqoEmh643IhuJbNsZvc8kPNX +wbMv9W3y+8qh+CmdRouzavbmZwe+LGcKKh9asj5XxNMhIWNlUpEbsZmOeX7m640A +2Vqq6nPopIICR5b+W45UYaPrL0swsIsjdXJ8ITzI9vF01Bx7owVV7rtNOzK+mndm +nqxpkCIHH2E6lr7lmk/MBTwoWdPBDFSoWWG9yHJM6Nyfh3+9nEg2XpWjDrk4JFX8 +dWbrAuMINClKxuMrLzOg2qOGpRKX/YAr2hRC45K9PvJdXmd0LhyIRyk0X+IyqJwl +N4y6mACXi0mWHv0liqzc2thddG5msP9E36EYxr5ILzeUePiVSj9/E15dWf10hkNj +c0kCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFJ84xFYjwznooHFs6FRM5Og6sb9nMA0GCSqGSIb3DQEBCwUAA4ICAQAS +5UKme4sPDORGpbZgQIeMJX6tuGguW8ZAdjwD+MlZ9POrYs4QjbRaZIxowLByQzTS +Gwv2LFPSypBLhmb8qoMi9IsabyZIrHZ3CL/FmFz0Jomee8O5ZDIBf9PD3Vht7LGr +hFV0d4QEJ1JrhkzO3bll/9bGXp+aEJlLdWr+aumXIOTkdnrG0CSqkM0gkLpHZPt/ +B7NTeLUKYvJzQ85BK4FqLoUWlFPUa19yIqtRLULVAJyZv967lDtX/Zr1hstWO1uI +AeV8KEsD+UmDfLJ/fOPtjqF/YFOOVZ1QNBIPt5d7bIdKROf1beyAN/BYGW5KaHbw +H5Lk6rWS02FREAutp9lfx1/cH6NcjKF+m7ee01ZvZl4HliDtC3T7Zk6LERXpgUl+ +b7DUUH8i119lAg2m9IUe2K4GS0qn0jFmwvjO5QimpAKWRGhXxNUzzxkvFMSUHHuk +2fCfDrGA4tGeEWSpiBE6doLlYsKA2KSD7ZPvfC+QsDJMlhVoSFLUmQjAJOgc47Ol +IQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk +5F6G+TaU33fD6Q3AOfF5u0aOq0NZJ7cguyPpVkAh7DE9ZapD8j3fcEThuk0mEDuY +n/PIjhs4ViFqUZPTkcpG2om3PVODLAgfi49T3f+sHw== +-----END CERTIFICATE----- + +# Issuer: CN=Microsoft ECC Root Certificate Authority 2017 O=Microsoft Corporation +# Subject: CN=Microsoft ECC Root Certificate Authority 2017 O=Microsoft Corporation +# Label: "Microsoft ECC Root Certificate Authority 2017" +# Serial: 136839042543790627607696632466672567020 +# MD5 Fingerprint: dd:a1:03:e6:4a:93:10:d1:bf:f0:19:42:cb:fe:ed:67 +# SHA1 Fingerprint: 99:9a:64:c3:7f:f4:7d:9f:ab:95:f1:47:69:89:14:60:ee:c4:c3:c5 +# SHA256 Fingerprint: 35:8d:f3:9d:76:4a:f9:e1:b7:66:e9:c9:72:df:35:2e:e1:5c:fa:c2:27:af:6a:d1:d7:0e:8e:4a:6e:dc:ba:02 +-----BEGIN CERTIFICATE----- +MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQsw +CQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYD +VQQDEy1NaWNyb3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIw +MTcwHhcNMTkxMjE4MjMwNjQ1WhcNNDIwNzE4MjMxNjA0WjBlMQswCQYDVQQGEwJV +UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNy +b3NvZnQgRUNDIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATUvD0CQnVBEyPNgASGAlEvaqiBYgtlzPbKnR5vSmZR +ogPZnZH6thaxjG7efM3beaYvzrvOcS/lpaso7GMEZpn4+vKTEAXhgShC48Zo9OYb +hGBKia/teQ87zvH2RPUBeMCjVDBSMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8E +BTADAQH/MB0GA1UdDgQWBBTIy5lycFIM+Oa+sgRXKSrPQhDtNTAQBgkrBgEEAYI3 +FQEEAwIBADAKBggqhkjOPQQDAwNoADBlAjBY8k3qDPlfXu5gKcs68tvWMoQZP3zV +L8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaReNtUjGUB +iudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M= +-----END CERTIFICATE----- + +# Issuer: CN=Microsoft RSA Root Certificate Authority 2017 O=Microsoft Corporation +# Subject: CN=Microsoft RSA Root Certificate Authority 2017 O=Microsoft Corporation +# Label: "Microsoft RSA Root Certificate Authority 2017" +# Serial: 40975477897264996090493496164228220339 +# MD5 Fingerprint: 10:ff:00:ff:cf:c9:f8:c7:7a:c0:ee:35:8e:c9:0f:47 +# SHA1 Fingerprint: 73:a5:e6:4a:3b:ff:83:16:ff:0e:dc:cc:61:8a:90:6e:4e:ae:4d:74 +# SHA256 Fingerprint: c7:41:f7:0f:4b:2a:8d:88:bf:2e:71:c1:41:22:ef:53:ef:10:eb:a0:cf:a5:e6:4c:fa:20:f4:18:85:30:73:e0 +-----BEGIN CERTIFICATE----- +MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBl +MQswCQYDVQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYw +NAYDVQQDEy1NaWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +IDIwMTcwHhcNMTkxMjE4MjI1MTIyWhcNNDIwNzE4MjMwMDIzWjBlMQswCQYDVQQG +EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1N +aWNyb3NvZnQgUlNBIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTcwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKW76UM4wplZEWCpW9R2LBifOZ +Nt9GkMml7Xhqb0eRaPgnZ1AzHaGm++DlQ6OEAlcBXZxIQIJTELy/xztokLaCLeX0 +ZdDMbRnMlfl7rEqUrQ7eS0MdhweSE5CAg2Q1OQT85elss7YfUJQ4ZVBcF0a5toW1 +HLUX6NZFndiyJrDKxHBKrmCk3bPZ7Pw71VdyvD/IybLeS2v4I2wDwAW9lcfNcztm +gGTjGqwu+UcF8ga2m3P1eDNbx6H7JyqhtJqRjJHTOoI+dkC0zVJhUXAoP8XFWvLJ +jEm7FFtNyP9nTUwSlq31/niol4fX/V4ggNyhSyL71Imtus5Hl0dVe49FyGcohJUc +aDDv70ngNXtk55iwlNpNhTs+VcQor1fznhPbRiefHqJeRIOkpcrVE7NLP8TjwuaG +YaRSMLl6IE9vDzhTyzMMEyuP1pq9KsgtsRx9S1HKR9FIJ3Jdh+vVReZIZZ2vUpC6 +W6IYZVcSn2i51BVrlMRpIpj0M+Dt+VGOQVDJNE92kKz8OMHY4Xu54+OU4UZpyw4K +UGsTuqwPN1q3ErWQgR5WrlcihtnJ0tHXUeOrO8ZV/R4O03QK0dqq6mm4lyiPSMQH ++FJDOvTKVTUssKZqwJz58oHhEmrARdlns87/I6KJClTUFLkqqNfs+avNJVgyeY+Q +W5g5xAgGwax/Dj0ApQIDAQABo1QwUjAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUCctZf4aycI8awznjwNnpv7tNsiMwEAYJKwYBBAGC +NxUBBAMCAQAwDQYJKoZIhvcNAQEMBQADggIBAKyvPl3CEZaJjqPnktaXFbgToqZC +LgLNFgVZJ8og6Lq46BrsTaiXVq5lQ7GPAJtSzVXNUzltYkyLDVt8LkS/gxCP81OC +gMNPOsduET/m4xaRhPtthH80dK2Jp86519efhGSSvpWhrQlTM93uCupKUY5vVau6 +tZRGrox/2KJQJWVggEbbMwSubLWYdFQl3JPk+ONVFT24bcMKpBLBaYVu32TxU5nh +SnUgnZUP5NbcA/FZGOhHibJXWpS2qdgXKxdJ5XbLwVaZOjex/2kskZGT4d9Mozd2 +TaGf+G0eHdP67Pv0RR0Tbc/3WeUiJ3IrhvNXuzDtJE3cfVa7o7P4NHmJweDyAmH3 +pvwPuxwXC65B2Xy9J6P9LjrRk5Sxcx0ki69bIImtt2dmefU6xqaWM/5TkshGsRGR +xpl/j8nWZjEgQRCHLQzWwa80mMpkg/sTV9HB8Dx6jKXB/ZUhoHHBk2dxEuqPiApp +GWSZI1b7rCoucL5mxAyE7+WL85MB+GqQk2dLsmijtWKP6T+MejteD+eMuMZ87zf9 +dOLITzNy4ZQ5bb0Sr74MTnB8G2+NszKTc0QWbej09+CVgI+WXTik9KveCjCHk9hN +AHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D5KbvtwEwXlGjefVwaaZB +RA+GsCyRxj3qrg+E +-----END CERTIFICATE----- + +# Issuer: CN=e-Szigno Root CA 2017 O=Microsec Ltd. +# Subject: CN=e-Szigno Root CA 2017 O=Microsec Ltd. +# Label: "e-Szigno Root CA 2017" +# Serial: 411379200276854331539784714 +# MD5 Fingerprint: de:1f:f6:9e:84:ae:a7:b4:21:ce:1e:58:7d:d1:84:98 +# SHA1 Fingerprint: 89:d4:83:03:4f:9e:9a:48:80:5f:72:37:d4:a9:a6:ef:cb:7c:1f:d1 +# SHA256 Fingerprint: be:b0:0b:30:83:9b:9b:c3:2c:32:e4:44:79:05:95:06:41:f2:64:21:b1:5e:d0:89:19:8b:51:8a:e2:ea:1b:99 +-----BEGIN CERTIFICATE----- +MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNV +BAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRk +LjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25vIFJv +b3QgQ0EgMjAxNzAeFw0xNzA4MjIxMjA3MDZaFw00MjA4MjIxMjA3MDZaMHExCzAJ +BgNVBAYTAkhVMREwDwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMg +THRkLjEXMBUGA1UEYQwOVkFUSFUtMjM1ODQ0OTcxHjAcBgNVBAMMFWUtU3ppZ25v +IFJvb3QgQ0EgMjAxNzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJbcPYrYsHtv +xie+RJCxs1YVe45DJH0ahFnuY2iyxl6H0BVIHqiQrb1TotreOpCmYF9oMrWGQd+H +Wyx7xf58etqjYzBhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G +A1UdDgQWBBSHERUI0arBeAyxr87GyZDvvzAEwDAfBgNVHSMEGDAWgBSHERUI0arB +eAyxr87GyZDvvzAEwDAKBggqhkjOPQQDAgNJADBGAiEAtVfd14pVCzbhhkT61Nlo +jbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxOsvxyqltZ ++efcMQ== +-----END CERTIFICATE----- + +# Issuer: O=CERTSIGN SA OU=certSIGN ROOT CA G2 +# Subject: O=CERTSIGN SA OU=certSIGN ROOT CA G2 +# Label: "certSIGN Root CA G2" +# Serial: 313609486401300475190 +# MD5 Fingerprint: 8c:f1:75:8a:c6:19:cf:94:b7:f7:65:20:87:c3:97:c7 +# SHA1 Fingerprint: 26:f9:93:b4:ed:3d:28:27:b0:b9:4b:a7:e9:15:1d:a3:8d:92:e5:32 +# SHA256 Fingerprint: 65:7c:fe:2f:a7:3f:aa:38:46:25:71:f3:32:a2:36:3a:46:fc:e7:02:09:51:71:07:02:cd:fb:b6:ee:da:33:05 +-----BEGIN CERTIFICATE----- +MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNV +BAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04g +Uk9PVCBDQSBHMjAeFw0xNzAyMDYwOTI3MzVaFw00MjAyMDYwOTI3MzVaMEExCzAJ +BgNVBAYTAlJPMRQwEgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJ +R04gUk9PVCBDQSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDF +dRmRfUR0dIf+DjuW3NgBFszuY5HnC2/OOwppGnzC46+CjobXXo9X69MhWf05N0Iw +vlDqtg+piNguLWkh59E3GE59kdUWX2tbAMI5Qw02hVK5U2UPHULlj88F0+7cDBrZ +uIt4ImfkabBoxTzkbFpG583H+u/E7Eu9aqSs/cwoUe+StCmrqzWaTOTECMYmzPhp +n+Sc8CnTXPnGFiWeI8MgwT0PPzhAsP6CRDiqWhqKa2NYOLQV07YRaXseVO6MGiKs +cpc/I1mbySKEwQdPzH/iV8oScLumZfNpdWO9lfsbl83kqK/20U6o2YpxJM02PbyW +xPFsqa7lzw1uKA2wDrXKUXt4FMMgL3/7FFXhEZn91QqhngLjYl/rNUssuHLoPj1P +rCy7Lobio3aP5ZMqz6WryFyNSwb/EkaseMsUBzXgqd+L6a8VTxaJW732jcZZroiF +DsGJ6x9nxUWO/203Nit4ZoORUSs9/1F3dmKh7Gc+PoGD4FapUB8fepmrY7+EF3fx +DTvf95xhszWYijqy7DwaNz9+j5LP2RIUZNoQAhVB/0/E6xyjyfqZ90bp4RjZsbgy +LcsUDFDYg2WD7rlcz8sFWkz6GZdr1l0T08JcVLwyc6B49fFtHsufpaafItzRUZ6C +eWRgKRM+o/1Pcmqr4tTluCRVLERLiohEnMqE0yo7AgMBAAGjQjBAMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSCIS1mxteg4BXrzkwJ +d8RgnlRuAzANBgkqhkiG9w0BAQsFAAOCAgEAYN4auOfyYILVAzOBywaK8SJJ6ejq +kX/GM15oGQOGO0MBzwdw5AgeZYWR5hEit/UCI46uuR59H35s5r0l1ZUa8gWmr4UC +b6741jH/JclKyMeKqdmfS0mbEVeZkkMR3rYzpMzXjWR91M08KCy0mpbqTfXERMQl +qiCA2ClV9+BB/AYm/7k29UMUA2Z44RGx2iBfRgB4ACGlHgAoYXhvqAEBj500mv/0 +OJD7uNGzcgbJceaBxXntC6Z58hMLnPddDnskk7RI24Zf3lCGeOdA5jGokHZwYa+c +NywRtYK3qq4kNFtyDGkNzVmf9nGvnAvRCjj5BiKDUyUM/FHE5r7iOZULJK2v0ZXk +ltd0ZGtxTgI8qoXzIKNDOXZbbFD+mpwUHmUUihW9o4JFWklWatKcsWMy5WHgUyIO +pwpJ6st+H6jiYoD2EEVSmAYY3qXNL3+q1Ok+CHLsIwMCPKaq2LxndD0UF/tUSxfj +03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZk +PuXaTH4MNMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE +1LlSVHJ7liXMvGnjSG4N0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MX +QRBdJ3NghVdJIgc= +-----END CERTIFICATE----- + +# Issuer: CN=Trustwave Global Certification Authority O=Trustwave Holdings, Inc. +# Subject: CN=Trustwave Global Certification Authority O=Trustwave Holdings, Inc. +# Label: "Trustwave Global Certification Authority" +# Serial: 1846098327275375458322922162 +# MD5 Fingerprint: f8:1c:18:2d:2f:ba:5f:6d:a1:6c:bc:c7:ab:91:c7:0e +# SHA1 Fingerprint: 2f:8f:36:4f:e1:58:97:44:21:59:87:a5:2a:9a:d0:69:95:26:7f:b5 +# SHA256 Fingerprint: 97:55:20:15:f5:dd:fc:3c:87:88:c0:06:94:45:55:40:88:94:45:00:84:f1:00:86:70:86:bc:1a:2b:b5:8d:c8 +-----BEGIN CERTIFICATE----- +MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQsw +CQYDVQQGEwJVUzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28x +ITAfBgNVBAoMGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1 +c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMx +OTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJVUzERMA8GA1UECAwI +SWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB +ALldUShLPDeS0YLOvR29zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0Xzn +swuvCAAJWX/NKSqIk4cXGIDtiLK0thAfLdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu +7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4BqstTnoApTAbqOl5F2brz8 +1Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9oWN0EACyW +80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotP +JqX+OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1l +RtzuzWniTY+HKE40Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfw +hI0Vcnyh78zyiGG69Gm7DIwLdVcEuE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10 +coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm+9jaJXLE9gCxInm943xZYkqc +BW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqjifLJS3tBEW1n +twiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1Ud +DwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W +0OhUKDtkLSGm+J1WE2pIPU/HPinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfe +uyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0HZJDmHvUqoai7PF35owgLEQzxPy0Q +lG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla4gt5kNdXElE1GYhB +aCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5RvbbE +sLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPT +MaCm/zjdzyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qe +qu5AvzSxnI9O4fKSTx+O856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxh +VicGaeVyQYHTtgGJoC86cnn+OjC/QezHYj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8 +h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu3R3y4G5OBVixwJAWKqQ9 +EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP29FpHOTK +yeC2nOnOcXHebD8WpHk= +-----END CERTIFICATE----- + +# Issuer: CN=Trustwave Global ECC P256 Certification Authority O=Trustwave Holdings, Inc. +# Subject: CN=Trustwave Global ECC P256 Certification Authority O=Trustwave Holdings, Inc. +# Label: "Trustwave Global ECC P256 Certification Authority" +# Serial: 4151900041497450638097112925 +# MD5 Fingerprint: 5b:44:e3:8d:5d:36:86:26:e8:0d:05:d2:59:a7:83:54 +# SHA1 Fingerprint: b4:90:82:dd:45:0c:be:8b:5b:b1:66:d3:e2:a4:08:26:cd:ed:42:cf +# SHA256 Fingerprint: 94:5b:bc:82:5e:a5:54:f4:89:d1:fd:51:a7:3d:df:2e:a6:24:ac:70:19:a0:52:05:22:5c:22:a7:8c:cf:a8:b4 +-----BEGIN CERTIFICATE----- +MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAf +BgNVBAoTGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3 +YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0x +NzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYDVQQGEwJVUzERMA8G +A1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0 +d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBF +Q0MgUDI1NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABH77bOYj43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoN +FWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqmP62jQzBBMA8GA1UdEwEB/wQFMAMBAf8w +DwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt0UrrdaVKEJmzsaGLSvcw +CgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjzRM4q3wgh +DDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 +-----END CERTIFICATE----- + +# Issuer: CN=Trustwave Global ECC P384 Certification Authority O=Trustwave Holdings, Inc. +# Subject: CN=Trustwave Global ECC P384 Certification Authority O=Trustwave Holdings, Inc. +# Label: "Trustwave Global ECC P384 Certification Authority" +# Serial: 2704997926503831671788816187 +# MD5 Fingerprint: ea:cf:60:c4:3b:b9:15:29:40:a1:97:ed:78:27:93:d6 +# SHA1 Fingerprint: e7:f3:a3:c8:cf:6f:c3:04:2e:6d:0e:67:32:c5:9e:68:95:0d:5e:d2 +# SHA256 Fingerprint: 55:90:38:59:c8:c0:c3:eb:b8:75:9e:ce:4e:25:57:22:5f:f5:75:8b:bd:38:eb:d4:82:76:60:1e:1b:d5:80:97 +-----BEGIN CERTIFICATE----- +MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAf +BgNVBAoTGFRydXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3 +YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0x +NzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYDVQQGEwJVUzERMA8G +A1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0 +d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBF +Q0MgUDM4NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuB +BAAiA2IABGvaDXU1CDFHBa5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJ +j9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr/TklZvFe/oyujUF5nQlgziip04pt89ZF +1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNVHQ8BAf8EBQMDBwYAMB0G +A1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNnADBkAjA3 +AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsC +MGclCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVu +Sw== +-----END CERTIFICATE----- + +# Issuer: CN=NAVER Global Root Certification Authority O=NAVER BUSINESS PLATFORM Corp. +# Subject: CN=NAVER Global Root Certification Authority O=NAVER BUSINESS PLATFORM Corp. +# Label: "NAVER Global Root Certification Authority" +# Serial: 9013692873798656336226253319739695165984492813 +# MD5 Fingerprint: c8:7e:41:f6:25:3b:f5:09:b3:17:e8:46:3d:bf:d0:9b +# SHA1 Fingerprint: 8f:6b:f2:a9:27:4a:da:14:a0:c4:f4:8e:61:27:f9:c0:1e:78:5d:d1 +# SHA256 Fingerprint: 88:f4:38:dc:f8:ff:d1:fa:8f:42:91:15:ff:e5:f8:2a:e1:e0:6e:0c:70:c3:75:fa:ad:71:7b:34:a4:9e:72:65 +-----BEGIN CERTIFICATE----- +MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEM +BQAwaTELMAkGA1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRG +T1JNIENvcnAuMTIwMAYDVQQDDClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0 +aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4NDJaFw0zNzA4MTgyMzU5NTlaMGkx +CzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVTUyBQTEFURk9STSBD +b3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVA +iQqrDZBbUGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH +38dq6SZeWYp34+hInDEW+j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lE +HoSTGEq0n+USZGnQJoViAbbJAh2+g1G7XNr4rRVqmfeSVPc0W+m/6imBEtRTkZaz +kVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2aacp+yPOiNgSnABIqKYP +szuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4Yb8Obtoq +vC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHf +nZ3zVHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaG +YQ5fG8Ir4ozVu53BA0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo +0es+nPxdGoMuK8u180SdOqcXYZaicdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3a +CJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejyYhbLgGvtPe31HzClrkvJE+2K +AQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNVHQ4EFgQU0p+I +36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB +Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoN +qo0hV4/GPnrK21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatj +cu3cvuzHV+YwIHHW1xDBE1UBjCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm ++LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bxhYTeodoS76TiEJd6eN4MUZeoIUCL +hr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTgE34h5prCy8VCZLQe +lHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTHD8z7 +p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8 +piKCk5XQA76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLR +LBT/DShycpWbXgnbiUSYqqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX +5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oGI/hGoiLtk/bdmuYqh7GYVPEi92tF4+KO +dh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmgkpzNNIaRkPpkUZ3+/uul +9XXeifdy +-----END CERTIFICATE----- + +# Issuer: CN=AC RAIZ FNMT-RCM SERVIDORES SEGUROS O=FNMT-RCM OU=Ceres +# Subject: CN=AC RAIZ FNMT-RCM SERVIDORES SEGUROS O=FNMT-RCM OU=Ceres +# Label: "AC RAIZ FNMT-RCM SERVIDORES SEGUROS" +# Serial: 131542671362353147877283741781055151509 +# MD5 Fingerprint: 19:36:9c:52:03:2f:d2:d1:bb:23:cc:dd:1e:12:55:bb +# SHA1 Fingerprint: 62:ff:d9:9e:c0:65:0d:03:ce:75:93:d2:ed:3f:2d:32:c9:e3:e5:4a +# SHA256 Fingerprint: 55:41:53:b1:3d:2c:f9:dd:b7:53:bf:be:1a:4e:0a:e0:8d:0a:a4:18:70:58:fe:60:a2:b8:62:b2:e4:b8:7b:cb +-----BEGIN CERTIFICATE----- +MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQsw +CQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgw +FgYDVQRhDA9WQVRFUy1RMjgyNjAwNEoxLDAqBgNVBAMMI0FDIFJBSVogRk5NVC1S +Q00gU0VSVklET1JFUyBTRUdVUk9TMB4XDTE4MTIyMDA5MzczM1oXDTQzMTIyMDA5 +MzczM1oweDELMAkGA1UEBhMCRVMxETAPBgNVBAoMCEZOTVQtUkNNMQ4wDAYDVQQL +DAVDZXJlczEYMBYGA1UEYQwPVkFURVMtUTI4MjYwMDRKMSwwKgYDVQQDDCNBQyBS +QUlaIEZOTVQtUkNNIFNFUlZJRE9SRVMgU0VHVVJPUzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPa6V1PIyqvfNkpSIeSX0oNnnvBlUdBeh8dHsVnyV0ebAAKTRBdp20LH +sbI6GA60XYyzZl2hNPk2LEnb80b8s0RpRBNm/dfF/a82Tc4DTQdxz69qBdKiQ1oK +Um8BA06Oi6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFAG5L++/EYZg8k/QQW6rcx/n0m5JMAoGCCqGSM49BAMDA2kAMGYCMQCu +SuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoDzBOQn5IC +MQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJy +v+c= +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign Root R46 O=GlobalSign nv-sa +# Subject: CN=GlobalSign Root R46 O=GlobalSign nv-sa +# Label: "GlobalSign Root R46" +# Serial: 1552617688466950547958867513931858518042577 +# MD5 Fingerprint: c4:14:30:e4:fa:66:43:94:2a:6a:1b:24:5f:19:d0:ef +# SHA1 Fingerprint: 53:a2:b0:4b:ca:6b:d6:45:e6:39:8a:8e:c4:0d:d2:bf:77:c3:a2:90 +# SHA256 Fingerprint: 4f:a3:12:6d:8d:3a:11:d1:c4:85:5a:4f:80:7c:ba:d6:cf:91:9d:3a:5a:88:b0:3b:ea:2c:63:72:d9:3c:40:c9 +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUA +MEYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYD +VQQDExNHbG9iYWxTaWduIFJvb3QgUjQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMy +MDAwMDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYt +c2ExHDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBSNDYwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQCsrHQy6LNl5brtQyYdpokNRbopiLKkHWPd08EsCVeJ +OaFV6Wc0dwxu5FUdUiXSE2te4R2pt32JMl8Nnp8semNgQB+msLZ4j5lUlghYruQG +vGIFAha/r6gjA7aUD7xubMLL1aa7DOn2wQL7Id5m3RerdELv8HQvJfTqa1VbkNud +316HCkD7rRlr+/fKYIje2sGP1q7Vf9Q8g+7XFkyDRTNrJ9CG0Bwta/OrffGFqfUo +0q3v84RLHIf8E6M6cqJaESvWJ3En7YEtbWaBkoe0G1h6zD8K+kZPTXhc+CtI4wSE +y132tGqzZfxCnlEmIyDLPRT5ge1lFgBPGmSXZgjPjHvjK8Cd+RTyG/FWaha/LIWF +zXg4mutCagI0GIMXTpRW+LaCtfOW3T3zvn8gdz57GSNrLNRyc0NXfeD412lPFzYE ++cCQYDdF3uYM2HSNrpyibXRdQr4G9dlkbgIQrImwTDsHTUB+JMWKmIJ5jqSngiCN +I/onccnfxkF0oE32kRbcRoxfKWMxWXEM2G/CtjJ9++ZdU6Z+Ffy7dXxd7Pj2Fxzs +x2sZy/N78CsHpdlseVR2bJ0cpm4O6XkMqCNqo98bMDGfsVR7/mrLZqrcZdCinkqa +ByFrgY/bxFn63iLABJzjqls2k+g9vXqhnQt2sQvHnf3PmKgGwvgqo6GDoLclcqUC +4wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV +HQ4EFgQUA1yrc4GHqMywptWU4jaWSf8FmSwwDQYJKoZIhvcNAQEMBQADggIBAHx4 +7PYCLLtbfpIrXTncvtgdokIzTfnvpCo7RGkerNlFo048p9gkUbJUHJNOxO97k4Vg +JuoJSOD1u8fpaNK7ajFxzHmuEajwmf3lH7wvqMxX63bEIaZHU1VNaL8FpO7XJqti +2kM3S+LGteWygxk6x9PbTZ4IevPuzz5i+6zoYMzRx6Fcg0XERczzF2sUyQQCPtIk +pnnpHs6i58FZFZ8d4kuaPp92CC1r2LpXFNqD6v6MVenQTqnMdzGxRBF6XLE+0xRF +FRhiJBPSy03OXIPBNvIQtQ6IbbjhVp+J3pZmOUdkLG5NrmJ7v2B0GbhWrJKsFjLt +rWhV/pi60zTe9Mlhww6G9kuEYO4Ne7UyWHmRVSyBQ7N0H3qqJZ4d16GLuc1CLgSk +ZoNNiTW2bKg2SnkheCLQQrzRQDGQob4Ez8pn7fXwgNNgyYMqIgXQBztSvwyeqiv5 +u+YfjyW6hY0XHgL+XVAEV8/+LbzvXMAaq7afJMbfc2hIkCwU9D9SGuTSyxTDYWnP +4vkYxboznxSjBF25cfe1lNj2M8FawTSLfJvdkzrnE6JwYZ+vj+vYxXX4M2bUdGc6 +N3ec592kD3ZDZopD8p/7DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3 +vouXsXgxT7PntgMTzlSdriVZzH81Xwj3QEUxeCp6 +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign Root E46 O=GlobalSign nv-sa +# Subject: CN=GlobalSign Root E46 O=GlobalSign nv-sa +# Label: "GlobalSign Root E46" +# Serial: 1552617690338932563915843282459653771421763 +# MD5 Fingerprint: b5:b8:66:ed:de:08:83:e3:c9:e2:01:34:06:ac:51:6f +# SHA1 Fingerprint: 39:b4:6c:d5:fe:80:06:eb:e2:2f:4a:bb:08:33:a0:af:db:b9:dd:84 +# SHA256 Fingerprint: cb:b9:c4:4d:84:b8:04:3e:10:50:ea:31:a6:9f:51:49:55:d7:bf:d2:e2:c6:b4:93:01:01:9a:d6:1d:9f:50:58 +-----BEGIN CERTIFICATE----- +MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYx +CzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQD +ExNHbG9iYWxTaWduIFJvb3QgRTQ2MB4XDTE5MDMyMDAwMDAwMFoXDTQ2MDMyMDAw +MDAwMFowRjELMAkGA1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2Ex +HDAaBgNVBAMTE0dsb2JhbFNpZ24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAScDrHPt+ieUnd1NPqlRqetMhkytAepJ8qUuwzSChDH2omwlwxwEwkBjtjq +R+q+soArzfwoDdusvKSGN+1wCAB16pMLey5SnCNoIwZD7JIvU4Tb+0cUB+hflGdd +yXqBPCCjQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud +DgQWBBQxCpCPtsad0kRLgLWi5h+xEk8blTAKBggqhkjOPQQDAwNoADBlAjEA31SQ +7Zvvi5QCkxeCmb6zniz2C5GMn0oUsfZkvLtoURMMA/cVi4RguYv/Uo7njLwcAjA8 ++RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+CAezNIm8BZ/3Hobui3A= +-----END CERTIFICATE----- + +# Issuer: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz +# Subject: CN=ANF Secure Server Root CA O=ANF Autoridad de Certificacion OU=ANF CA Raiz +# Label: "ANF Secure Server Root CA" +# Serial: 996390341000653745 +# MD5 Fingerprint: 26:a6:44:5a:d9:af:4e:2f:b2:1d:b6:65:b0:4e:e8:96 +# SHA1 Fingerprint: 5b:6e:68:d0:cc:15:b6:a0:5f:1e:c1:5f:ae:02:fc:6b:2f:5d:6f:74 +# SHA256 Fingerprint: fb:8f:ec:75:91:69:b9:10:6b:1e:51:16:44:c6:18:c5:13:04:37:3f:6c:06:43:08:8d:8b:ef:fd:1b:99:75:99 +-----BEGIN CERTIFICATE----- +MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNV +BAUTCUc2MzI4NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlk +YWQgZGUgQ2VydGlmaWNhY2lvbjEUMBIGA1UECxMLQU5GIENBIFJhaXoxIjAgBgNV +BAMTGUFORiBTZWN1cmUgU2VydmVyIFJvb3QgQ0EwHhcNMTkwOTA0MTAwMDM4WhcN +MzkwODMwMTAwMDM4WjCBhDESMBAGA1UEBRMJRzYzMjg3NTEwMQswCQYDVQQGEwJF +UzEnMCUGA1UEChMeQU5GIEF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uMRQwEgYD +VQQLEwtBTkYgQ0EgUmFpejEiMCAGA1UEAxMZQU5GIFNlY3VyZSBTZXJ2ZXIgUm9v +dCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANvrayvmZFSVgpCj +cqQZAZ2cC4Ffc0m6p6zzBE57lgvsEeBbphzOG9INgxwruJ4dfkUyYA8H6XdYfp9q +yGFOtibBTI3/TO80sh9l2Ll49a2pcbnvT1gdpd50IJeh7WhM3pIXS7yr/2WanvtH +2Vdy8wmhrnZEE26cLUQ5vPnHO6RYPUG9tMJJo8gN0pcvB2VSAKduyK9o7PQUlrZX +H1bDOZ8rbeTzPvY1ZNoMHKGESy9LS+IsJJ1tk0DrtSOOMspvRdOoiXsezx76W0OL +zc2oD2rKDF65nkeP8Nm2CgtYZRczuSPkdxl9y0oukntPLxB3sY0vaJxizOBQ+OyR +p1RMVwnVdmPF6GUe7m1qzwmd+nxPrWAI/VaZDxUse6mAq4xhj0oHdkLePfTdsiQz +W7i1o0TJrH93PB0j7IKppuLIBkwC/qxcmZkLLxCKpvR/1Yd0DVlJRfbwcVw5Kda/ +SiOL9V8BY9KHcyi1Swr1+KuCLH5zJTIdC2MKF4EA/7Z2Xue0sUDKIbvVgFHlSFJn +LNJhiQcND85Cd8BEc5xEUKDbEAotlRyBr+Qc5RQe8TZBAQIvfXOn3kLMTOmJDVb3 +n5HUA8ZsyY/b2BzgQJhdZpmYgG4t/wHFzstGH6wCxkPmrqKEPMVOHj1tyRRM4y5B +u8o5vzY8KhmqQYdOpc5LMnndkEl/AgMBAAGjYzBhMB8GA1UdIwQYMBaAFJxf0Gxj +o1+TypOYCK2Mh6UsXME3MB0GA1UdDgQWBBScX9BsY6Nfk8qTmAitjIelLFzBNzAO +BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC +AgEATh65isagmD9uw2nAalxJUqzLK114OMHVVISfk/CHGT0sZonrDUL8zPB1hT+L +9IBdeeUXZ701guLyPI59WzbLWoAAKfLOKyzxj6ptBZNscsdW699QIyjlRRA96Gej +rw5VD5AJYu9LWaL2U/HANeQvwSS9eS9OICI7/RogsKQOLHDtdD+4E5UGUcjohybK +pFtqFiGS3XNgnhAY3jyB6ugYw3yJ8otQPr0R4hUDqDZ9MwFsSBXXiJCZBMXM5gf0 +vPSQ7RPi6ovDj6MzD8EpTBNO2hVWcXNyglD2mjN8orGoGjR0ZVzO0eurU+AagNjq +OknkJjCb5RyKqKkVMoaZkgoQI1YS4PbOTOK7vtuNknMBZi9iPrJyJ0U27U1W45eZ +/zo1PqVUSlJZS2Db7v54EX9K3BR5YLZrZAPbFYPhor72I5dQ8AkzNqdxliXzuUJ9 +2zg/LFis6ELhDtjTO0wugumDLmsx2d1Hhk9tl5EuT+IocTUW0fJz/iUrB0ckYyfI ++PbZa/wSMVYIwFNCr5zQM378BvAxRAMU8Vjq8moNqRGyg77FGr8H6lnco4g175x2 +MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3r5+qPeoo +tt7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw= +-----END CERTIFICATE----- + +# Issuer: CN=Certum EC-384 CA O=Asseco Data Systems S.A. OU=Certum Certification Authority +# Subject: CN=Certum EC-384 CA O=Asseco Data Systems S.A. OU=Certum Certification Authority +# Label: "Certum EC-384 CA" +# Serial: 160250656287871593594747141429395092468 +# MD5 Fingerprint: b6:65:b3:96:60:97:12:a1:ec:4e:e1:3d:a3:c6:c9:f1 +# SHA1 Fingerprint: f3:3e:78:3c:ac:df:f4:a2:cc:ac:67:55:69:56:d7:e5:16:3c:e1:ed +# SHA256 Fingerprint: 6b:32:80:85:62:53:18:aa:50:d1:73:c9:8d:8b:da:09:d5:7e:27:41:3d:11:4c:f7:87:a0:f5:d0:6c:03:0c:f6 +-----BEGIN CERTIFICATE----- +MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQsw +CQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScw +JQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAXBgNVBAMT +EENlcnR1bSBFQy0zODQgQ0EwHhcNMTgwMzI2MDcyNDU0WhcNNDMwMzI2MDcyNDU0 +WjB0MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBT +LkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxGTAX +BgNVBAMTEENlcnR1bSBFQy0zODQgQ0EwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATE +KI6rGFtqvm5kN2PkzeyrOvfMobgOgknXhimfoZTy42B4mIF4Bk3y7JoOV2CDn7Tm +Fy8as10CW4kjPMIRBSqniBMY81CE1700LCeJVf/OTOffph8oxPBUw7l8t1Ot68Kj +QjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI0GZnQkdjrzife81r1HfS+8 +EF9LMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjADVS2m5hjEfO/J +UG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0QoSZ/6vn +nvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k= +-----END CERTIFICATE----- + +# Issuer: CN=Certum Trusted Root CA O=Asseco Data Systems S.A. OU=Certum Certification Authority +# Subject: CN=Certum Trusted Root CA O=Asseco Data Systems S.A. OU=Certum Certification Authority +# Label: "Certum Trusted Root CA" +# Serial: 40870380103424195783807378461123655149 +# MD5 Fingerprint: 51:e1:c2:e7:fe:4c:84:af:59:0e:2f:f4:54:6f:ea:29 +# SHA1 Fingerprint: c8:83:44:c0:18:ae:9f:cc:f1:87:b7:8f:22:d1:c5:d7:45:84:ba:e5 +# SHA256 Fingerprint: fe:76:96:57:38:55:77:3e:37:a9:5e:7a:d4:d9:cc:96:c3:01:57:c1:5d:31:76:5b:a9:b1:57:04:e1:ae:78:fd +-----BEGIN CERTIFICATE----- +MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6 +MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEu +MScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxHzAdBgNV +BAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwHhcNMTgwMzE2MTIxMDEzWhcNNDMw +MzE2MTIxMDEzWjB6MQswCQYDVQQGEwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEg +U3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkxHzAdBgNVBAMTFkNlcnR1bSBUcnVzdGVkIFJvb3QgQ0EwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQDRLY67tzbqbTeRn06TpwXkKQMlzhyC93yZ +n0EGze2jusDbCSzBfN8pfktlL5On1AFrAygYo9idBcEq2EXxkd7fO9CAAozPOA/q +p1x4EaTByIVcJdPTsuclzxFUl6s1wB52HO8AU5853BSlLCIls3Jy/I2z5T4IHhQq +NwuIPMqw9MjCoa68wb4pZ1Xi/K1ZXP69VyywkI3C7Te2fJmItdUDmj0VDT06qKhF +8JVOJVkdzZhpu9PMMsmN74H+rX2Ju7pgE8pllWeg8xn2A1bUatMn4qGtg/BKEiJ3 +HAVz4hlxQsDsdUaakFjgao4rpUYwBI4Zshfjvqm6f1bxJAPXsiEodg42MEx51UGa +mqi4NboMOvJEGyCI98Ul1z3G4z5D3Yf+xOr1Uz5MZf87Sst4WmsXXw3Hw09Omiqi +7VdNIuJGmj8PkTQkfVXjjJU30xrwCSss0smNtA0Aq2cpKNgB9RkEth2+dv5yXMSF +ytKAQd8FqKPVhJBPC/PgP5sZ0jeJP/J7UhyM9uH3PAeXjA6iWYEMspA90+NZRu0P +qafegGtaqge2Gcu8V/OXIXoMsSt0Puvap2ctTMSYnjYJdmZm/Bo/6khUHL4wvYBQ +v3y1zgD2DGHZ5yQD4OMBgQ692IU0iL2yNqh7XAjlRICMb/gv1SHKHRzQ+8S1h9E6 +Tsd2tTVItQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSM+xx1 +vALTn04uSNn5YFSqxLNP+jAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQAD +ggIBAEii1QALLtA/vBzVtVRJHlpr9OTy4EA34MwUe7nJ+jW1dReTagVphZzNTxl4 +WxmB82M+w85bj/UvXgF2Ez8sALnNllI5SW0ETsXpD4YN4fqzX4IS8TrOZgYkNCvo +zMrnadyHncI013nR03e4qllY/p0m+jiGPp2Kh2RX5Rc64vmNueMzeMGQ2Ljdt4NR +5MTMI9UGfOZR0800McD2RrsLrfw9EAUqO0qRJe6M1ISHgCq8CYyqOhNf6DR5UMEQ +GfnTKB7U0VEwKbOukGfWHwpjscWpxkIxYxeU72nLL/qMFH3EQxiJ2fAyQOaA4kZf +5ePBAFmo+eggvIksDkc0C+pXwlM2/KfUrzHN/gLldfq5Jwn58/U7yn2fqSLLiMmq +0Uc9NneoWWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7D +P78v3DSk+yshzWePS/Tj6tQ/50+6uaWTRRxmHyH6ZF5v4HaUMst19W7l9o/HuKTM +qJZ9ZPskWkoDbGs4xugDQ5r3V7mzKWmTOPQD8rv7gmsHINFSH5pkAnuYZttcTVoP +0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZckbxJF0WddCajJFdr60qZf +E2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb +-----END CERTIFICATE----- + +# Issuer: CN=TunTrust Root CA O=Agence Nationale de Certification Electronique +# Subject: CN=TunTrust Root CA O=Agence Nationale de Certification Electronique +# Label: "TunTrust Root CA" +# Serial: 108534058042236574382096126452369648152337120275 +# MD5 Fingerprint: 85:13:b9:90:5b:36:5c:b6:5e:b8:5a:f8:e0:31:57:b4 +# SHA1 Fingerprint: cf:e9:70:84:0f:e0:73:0f:9d:f6:0c:7f:2c:4b:ee:20:46:34:9c:bb +# SHA256 Fingerprint: 2e:44:10:2a:b5:8c:b8:54:19:45:1c:8e:19:d9:ac:f3:66:2c:af:bc:61:4b:6a:53:96:0a:30:f7:d0:e2:eb:41 +-----BEGIN CERTIFICATE----- +MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQEL +BQAwYTELMAkGA1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUg +Q2VydGlmaWNhdGlvbiBFbGVjdHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJv +b3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQwNDI2MDg1NzU2WjBhMQswCQYDVQQG +EwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBDZXJ0aWZpY2F0aW9u +IEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZ +n56eY+hz2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd +2JQDoOw05TDENX37Jk0bbjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgF +VwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZ +GoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAdgjH8KcwAWJeRTIAAHDOF +li/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViWVSHbhlnU +r8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2 +eY8fTpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIb +MlEsPvLfe/ZdeikZjuXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISg +jwBUFfyRbVinljvrS5YnzWuioYasDXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB +7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwSVXAkPcvCFDVDXSdOvsC9qnyW +5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI04Y+oXNZtPdE +ITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0 +90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+z +xiD2BkewhpMl0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYu +QEkHDVneixCwSQXi/5E/S7fdAo74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4 +FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRYYdZ2vyJ/0Adqp2RT8JeNnYA/u8EH +22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJpadbGNjHh/PqAulxP +xOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65xxBzn +dFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5 +Xc0yGYuPjCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7b +nV2UqL1g52KAdoGDDIzMMEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQ +CvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9zZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZH +u/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3rAZ3r2OvEhJn7wAzMMujj +d9qDRIueVSjAi1jTkD5OGwDxFa2DK5o= +-----END CERTIFICATE----- + +# Issuer: CN=HARICA TLS RSA Root CA 2021 O=Hellenic Academic and Research Institutions CA +# Subject: CN=HARICA TLS RSA Root CA 2021 O=Hellenic Academic and Research Institutions CA +# Label: "HARICA TLS RSA Root CA 2021" +# Serial: 76817823531813593706434026085292783742 +# MD5 Fingerprint: 65:47:9b:58:86:dd:2c:f0:fc:a2:84:1f:1e:96:c4:91 +# SHA1 Fingerprint: 02:2d:05:82:fa:88:ce:14:0c:06:79:de:7f:14:10:e9:45:d7:a5:6d +# SHA256 Fingerprint: d9:5d:0e:8e:da:79:52:5b:f9:be:b1:1b:14:d2:10:0d:32:94:98:5f:0c:62:d9:fa:bd:9c:d9:99:ec:cb:7b:1d +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBs +MQswCQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl +c2VhcmNoIEluc3RpdHV0aW9ucyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0Eg +Um9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUzOFoXDTQ1MDIxMzEwNTUzN1owbDEL +MAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl +YXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNBIFJv +b3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569l +mwVnlskNJLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE +4VGC/6zStGndLuwRo0Xua2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uv +a9of08WRiFukiZLRgeaMOVig1mlDqa2YUlhu2wr7a89o+uOkXjpFc5gH6l8Cct4M +pbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K5FrZx40d/JiZ+yykgmvw +Kh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEvdmn8kN3b +LW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcY +AuUR0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqB +AGMUuTNe3QvboEUHGjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYq +E613TBoYm5EPWNgGVMWX+Ko/IIqmhaZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHr +W2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQCPxrvrNQKlr9qEgYRtaQQJKQ +CoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAU +X15QvWiWkKQUEapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3 +f5Z2EMVGpdAgS1D0NTsY9FVqQRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxaja +H6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxDQpSbIPDRzbLrLFPCU3hKTwSUQZqP +JzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcRj88YxeMn/ibvBZ3P +zzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5vZSt +jBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0 +/L5H9MG0qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pT +BGIBnfHAT+7hOtSLIBD6Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79 +aPib8qXPMThcFarmlwDB31qlpzmq6YR/PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YW +xw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnnkf3/W9b3raYvAwtt41dU +63ZTGI0RmLo= +-----END CERTIFICATE----- + +# Issuer: CN=HARICA TLS ECC Root CA 2021 O=Hellenic Academic and Research Institutions CA +# Subject: CN=HARICA TLS ECC Root CA 2021 O=Hellenic Academic and Research Institutions CA +# Label: "HARICA TLS ECC Root CA 2021" +# Serial: 137515985548005187474074462014555733966 +# MD5 Fingerprint: ae:f7:4c:e5:66:35:d1:b7:9b:8c:22:93:74:d3:4b:b0 +# SHA1 Fingerprint: bc:b0:c1:9d:e9:98:92:70:19:38:57:e9:8d:a7:b4:5d:6e:ee:01:48 +# SHA256 Fingerprint: 3f:99:cc:47:4a:cf:ce:4d:fe:d5:87:94:66:5e:47:8d:15:47:73:9f:2e:78:0f:1b:b4:ca:9b:13:30:97:d4:01 +-----BEGIN CERTIFICATE----- +MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQsw +CQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2Vh +cmNoIEluc3RpdHV0aW9ucyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9v +dCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoXDTQ1MDIxMzExMDEwOVowbDELMAkG +A1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj +aCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJvb3Qg +Q0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7 +KKrxcm1lAEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9Y +STHMmE5gEYd103KUkE+bECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQD +AgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAircJRQO9gcS3ujwLEXQNw +SaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/QwCZ61IygN +nxS2PFOiTAZpffpskcYqSUXm7LcT4Tps +-----END CERTIFICATE----- + +# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068 +# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068 +# Label: "Autoridad de Certificacion Firmaprofesional CIF A62634068" +# Serial: 1977337328857672817 +# MD5 Fingerprint: 4e:6e:9b:54:4c:ca:b7:fa:48:e4:90:b1:15:4b:1c:a3 +# SHA1 Fingerprint: 0b:be:c2:27:22:49:cb:39:aa:db:35:5c:53:e3:8c:ae:78:ff:b6:fe +# SHA256 Fingerprint: 57:de:05:83:ef:d2:b2:6e:03:61:da:99:da:9d:f4:64:8d:ef:7e:e8:44:1c:3b:72:8a:fa:9b:cd:e0:f9:b2:6a +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIG3Dp0v+ubHEwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UE +BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h +cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0xNDA5MjMxNTIyMDdaFw0zNjA1 +MDUxNTIyMDdaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg +Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9 +thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM +cas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefG +L9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i +NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/h +X68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2b +m8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCy +Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja +EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T +KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF +6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh +OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMB0GA1UdDgQWBBRlzeurNR4APn7VdMAc +tHNHDhpkLzASBgNVHRMBAf8ECDAGAQH/AgEBMIGmBgNVHSAEgZ4wgZswgZgGBFUd +IAAwgY8wLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuZmlybWFwcm9mZXNpb25hbC5j +b20vY3BzMFwGCCsGAQUFBwICMFAeTgBQAGEAcwBlAG8AIABkAGUAIABsAGEAIABC +AG8AbgBhAG4AbwB2AGEAIAA0ADcAIABCAGEAcgBjAGUAbABvAG4AYQAgADAAOAAw +ADEANzAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggIBAHSHKAIrdx9m +iWTtj3QuRhy7qPj4Cx2Dtjqn6EWKB7fgPiDL4QjbEwj4KKE1soCzC1HA01aajTNF +Sa9J8OA9B3pFE1r/yJfY0xgsfZb43aJlQ3CTkBW6kN/oGbDbLIpgD7dvlAceHabJ +hfa9NPhAeGIQcDq+fUs5gakQ1JZBu/hfHAsdCPKxsIl68veg4MSPi3i1O1ilI45P +Vf42O+AMt8oqMEEgtIDNrvx2ZnOorm7hfNoD6JQg5iKj0B+QXSBTFCZX2lSX3xZE +EAEeiGaPcjiT3SC3NL7X8e5jjkd5KAb881lFJWAiMxujX6i6KtoaPc1A6ozuBRWV +1aUsIC+nmCjuRfzxuIgALI9C2lHVnOUTaHFFQ4ueCyE8S1wF3BqfmI7avSKecs2t +CsvMo2ebKHTEm9caPARYpoKdrcd7b/+Alun4jWq9GJAd/0kakFI3ky88Al2CdgtR +5xbHV/g4+afNmyJU72OwFW1TZQNKXkqgsqeOSQBZONXH9IBk9W6VULgRfhVwOEqw +f9DEMnDAGf/JOC0ULGb0QkTmVXYbgBVX/8Cnp6o5qtjTcNAuuuuUavpfNIbnYrX9 +ivAwhZTJryQCL2/W3Wf+47BVTwSYT6RBVuKT0Gro1vP7ZeDOdcQxWQzugsgMYDNK +GbqEZycPvEJdvSRUDewdcAZfpLz6IHxV +-----END CERTIFICATE----- + +# Issuer: CN=vTrus ECC Root CA O=iTrusChina Co.,Ltd. +# Subject: CN=vTrus ECC Root CA O=iTrusChina Co.,Ltd. +# Label: "vTrus ECC Root CA" +# Serial: 630369271402956006249506845124680065938238527194 +# MD5 Fingerprint: de:4b:c1:f5:52:8c:9b:43:e1:3e:8f:55:54:17:8d:85 +# SHA1 Fingerprint: f6:9c:db:b0:fc:f6:02:13:b6:52:32:a6:a3:91:3f:16:70:da:c3:e1 +# SHA256 Fingerprint: 30:fb:ba:2c:32:23:8e:2a:98:54:7a:f9:79:31:e5:50:42:8b:9b:3f:1c:8e:eb:66:33:dc:fa:86:c5:b2:7d:d3 +-----BEGIN CERTIFICATE----- +MIICDzCCAZWgAwIBAgIUbmq8WapTvpg5Z6LSa6Q75m0c1towCgYIKoZIzj0EAwMw +RzELMAkGA1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4xGjAY +BgNVBAMTEXZUcnVzIEVDQyBSb290IENBMB4XDTE4MDczMTA3MjY0NFoXDTQzMDcz +MTA3MjY0NFowRzELMAkGA1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28u +LEx0ZC4xGjAYBgNVBAMTEXZUcnVzIEVDQyBSb290IENBMHYwEAYHKoZIzj0CAQYF +K4EEACIDYgAEZVBKrox5lkqqHAjDo6LN/llWQXf9JpRCux3NCNtzslt188+cToL0 +v/hhJoVs1oVbcnDS/dtitN9Ti72xRFhiQgnH+n9bEOf+QP3A2MMrMudwpremIFUd +e4BdS49nTPEQo0IwQDAdBgNVHQ4EFgQUmDnNvtiyjPeyq+GtJK97fKHbH88wDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwMDaAAwZQIw +V53dVvHH4+m4SVBrm2nDb+zDfSXkV5UTQJtS0zvzQBm8JsctBp61ezaf9SXUY2sA +AjEA6dPGnlaaKsyh2j/IZivTWJwghfqrkYpwcBE4YGQLYgmRWAD5Tfs0aNoJrSEG +GJTO +-----END CERTIFICATE----- + +# Issuer: CN=vTrus Root CA O=iTrusChina Co.,Ltd. +# Subject: CN=vTrus Root CA O=iTrusChina Co.,Ltd. +# Label: "vTrus Root CA" +# Serial: 387574501246983434957692974888460947164905180485 +# MD5 Fingerprint: b8:c9:37:df:fa:6b:31:84:64:c5:ea:11:6a:1b:75:fc +# SHA1 Fingerprint: 84:1a:69:fb:f5:cd:1a:25:34:13:3d:e3:f8:fc:b8:99:d0:c9:14:b7 +# SHA256 Fingerprint: 8a:71:de:65:59:33:6f:42:6c:26:e5:38:80:d0:0d:88:a1:8d:a4:c6:a9:1f:0d:cb:61:94:e2:06:c5:c9:63:87 +-----BEGIN CERTIFICATE----- +MIIFVjCCAz6gAwIBAgIUQ+NxE9izWRRdt86M/TX9b7wFjUUwDQYJKoZIhvcNAQEL +BQAwQzELMAkGA1UEBhMCQ04xHDAaBgNVBAoTE2lUcnVzQ2hpbmEgQ28uLEx0ZC4x +FjAUBgNVBAMTDXZUcnVzIFJvb3QgQ0EwHhcNMTgwNzMxMDcyNDA1WhcNNDMwNzMx +MDcyNDA1WjBDMQswCQYDVQQGEwJDTjEcMBoGA1UEChMTaVRydXNDaGluYSBDby4s +THRkLjEWMBQGA1UEAxMNdlRydXMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAL1VfGHTuB0EYgWgrmy3cLRB6ksDXhA/kFocizuwZotsSKYc +IrrVQJLuM7IjWcmOvFjai57QGfIvWcaMY1q6n6MLsLOaXLoRuBLpDLvPbmyAhykU +AyyNJJrIZIO1aqwTLDPxn9wsYTwaP3BVm60AUn/PBLn+NvqcwBauYv6WTEN+VRS+ +GrPSbcKvdmaVayqwlHeFXgQPYh1jdfdr58tbmnDsPmcF8P4HCIDPKNsFxhQnL4Z9 +8Cfe/+Z+M0jnCx5Y0ScrUw5XSmXX+6KAYPxMvDVTAWqXcoKv8R1w6Jz1717CbMdH +flqUhSZNO7rrTOiwCcJlwp2dCZtOtZcFrPUGoPc2BX70kLJrxLT5ZOrpGgrIDajt +J8nU57O5q4IikCc9Kuh8kO+8T/3iCiSn3mUkpF3qwHYw03dQ+A0Em5Q2AXPKBlim +0zvc+gRGE1WKyURHuFE5Gi7oNOJ5y1lKCn+8pu8fA2dqWSslYpPZUxlmPCdiKYZN +pGvu/9ROutW04o5IWgAZCfEF2c6Rsffr6TlP9m8EQ5pV9T4FFL2/s1m02I4zhKOQ +UqqzApVg+QxMaPnu1RcN+HFXtSXkKe5lXa/R7jwXC1pDxaWG6iSe4gUH3DRCEpHW +OXSuTEGC2/KmSNGzm/MzqvOmwMVO9fSddmPmAsYiS8GVP1BkLFTltvA8Kc9XAgMB +AAGjQjBAMB0GA1UdDgQWBBRUYnBj8XWEQ1iO0RYgscasGrz2iTAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAKbqSSaet +8PFww+SX8J+pJdVrnjT+5hpk9jprUrIQeBqfTNqK2uwcN1LgQkv7bHbKJAs5EhWd +nxEt/Hlk3ODg9d3gV8mlsnZwUKT+twpw1aA08XXXTUm6EdGz2OyC/+sOxL9kLX1j +bhd47F18iMjrjld22VkE+rxSH0Ws8HqA7Oxvdq6R2xCOBNyS36D25q5J08FsEhvM +Kar5CKXiNxTKsbhm7xqC5PD48acWabfbqWE8n/Uxy+QARsIvdLGx14HuqCaVvIiv +TDUHKgLKeBRtRytAVunLKmChZwOgzoy8sHJnxDHO2zTlJQNgJXtxmOTAGytfdELS +S8VZCAeHvsXDf+eW2eHcKJfWjwXj9ZtOyh1QRwVTsMo554WgicEFOwE30z9J4nfr +I8iIZjs9OXYhRvHsXyO466JmdXTBQPfYaJqT4i2pLr0cox7IdMakLXogqzu4sEb9 +b91fUlV1YvCXoHzXOP0l382gmxDPi7g4Xl7FtKYCNqEeXxzP4padKar9mK5S4fNB +UvupLnKWnyfjqnN9+BojZns7q2WwMgFLFT49ok8MKzWixtlnEjUwzXYuFrOZnk1P +Ti07NEPhmg4NpGaXutIcSkwsKouLgU9xGqndXHt7CMUADTdA43x7VF8vhV929ven +sBxXVsFy6K2ir40zSbofitzmdHxghm+Hl3s= +-----END CERTIFICATE----- + +# Issuer: CN=ISRG Root X2 O=Internet Security Research Group +# Subject: CN=ISRG Root X2 O=Internet Security Research Group +# Label: "ISRG Root X2" +# Serial: 87493402998870891108772069816698636114 +# MD5 Fingerprint: d3:9e:c4:1e:23:3c:a6:df:cf:a3:7e:6d:e0:14:e6:e5 +# SHA1 Fingerprint: bd:b1:b9:3c:d5:97:8d:45:c6:26:14:55:f8:db:95:c7:5a:d1:53:af +# SHA256 Fingerprint: 69:72:9b:8e:15:a8:6e:fc:17:7a:57:af:b7:17:1d:fc:64:ad:d2:8c:2f:ca:8c:f1:50:7e:34:45:3c:cb:14:70 +-----BEGIN CERTIFICATE----- +MIICGzCCAaGgAwIBAgIQQdKd0XLq7qeAwSxs6S+HUjAKBggqhkjOPQQDAzBPMQsw +CQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2gg +R3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMjAeFw0yMDA5MDQwMDAwMDBaFw00 +MDA5MTcxNjAwMDBaME8xCzAJBgNVBAYTAlVTMSkwJwYDVQQKEyBJbnRlcm5ldCBT +ZWN1cml0eSBSZXNlYXJjaCBHcm91cDEVMBMGA1UEAxMMSVNSRyBSb290IFgyMHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAEzZvVn4CDCuwJSvMWSj5cz3es3mcFDR0HttwW ++1qLFNvicWDEukWVEYmO6gbf9yoWHKS5xcUy4APgHoIYOIvXRdgKam7mAHf7AlF9 +ItgKbppbd9/w+kHsOdx1ymgHDB/qo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUfEKWrt5LSDv6kviejM9ti6lyN5UwCgYIKoZI +zj0EAwMDaAAwZQIwe3lORlCEwkSHRhtFcP9Ymd70/aTSVaYgLXTWNLxBo1BfASdW +tL4ndQavEi51mI38AjEAi/V3bNTIZargCyzuFJ0nN6T5U6VR5CmD1/iQMVtCnwr1 +/q4AaOeMSQ+2b1tbFfLn +-----END CERTIFICATE----- + +# Issuer: CN=HiPKI Root CA - G1 O=Chunghwa Telecom Co., Ltd. +# Subject: CN=HiPKI Root CA - G1 O=Chunghwa Telecom Co., Ltd. +# Label: "HiPKI Root CA - G1" +# Serial: 60966262342023497858655262305426234976 +# MD5 Fingerprint: 69:45:df:16:65:4b:e8:68:9a:8f:76:5f:ff:80:9e:d3 +# SHA1 Fingerprint: 6a:92:e4:a8:ee:1b:ec:96:45:37:e3:29:57:49:cd:96:e3:e5:d2:60 +# SHA256 Fingerprint: f0:15:ce:3c:c2:39:bf:ef:06:4b:e9:f1:d2:c4:17:e1:a0:26:4a:0a:94:be:1f:0c:8d:12:18:64:eb:69:49:cc +-----BEGIN CERTIFICATE----- +MIIFajCCA1KgAwIBAgIQLd2szmKXlKFD6LDNdmpeYDANBgkqhkiG9w0BAQsFADBP +MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0 +ZC4xGzAZBgNVBAMMEkhpUEtJIFJvb3QgQ0EgLSBHMTAeFw0xOTAyMjIwOTQ2MDRa +Fw0zNzEyMzExNTU5NTlaME8xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3 +YSBUZWxlY29tIENvLiwgTHRkLjEbMBkGA1UEAwwSSGlQS0kgUm9vdCBDQSAtIEcx +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA9B5/UnMyDHPkvRN0o9Qw +qNCuS9i233VHZvR85zkEHmpwINJaR3JnVfSl6J3VHiGh8Ge6zCFovkRTv4354twv +Vcg3Px+kwJyz5HdcoEb+d/oaoDjq7Zpy3iu9lFc6uux55199QmQ5eiY29yTw1S+6 +lZgRZq2XNdZ1AYDgr/SEYYwNHl98h5ZeQa/rh+r4XfEuiAU+TCK72h8q3VJGZDnz +Qs7ZngyzsHeXZJzA9KMuH5UHsBffMNsAGJZMoYFL3QRtU6M9/Aes1MU3guvklQgZ +KILSQjqj2FPseYlgSGDIcpJQ3AOPgz+yQlda22rpEZfdhSi8MEyr48KxRURHH+CK +FgeW0iEPU8DtqX7UTuybCeyvQqww1r/REEXgphaypcXTT3OUM3ECoWqj1jOXTyFj +HluP2cFeRXF3D4FdXyGarYPM+l7WjSNfGz1BryB1ZlpK9p/7qxj3ccC2HTHsOyDr +y+K49a6SsvfhhEvyovKTmiKe0xRvNlS9H15ZFblzqMF8b3ti6RZsR1pl8w4Rm0bZ +/W3c1pzAtH2lsN0/Vm+h+fbkEkj9Bn8SV7apI09bA8PgcSojt/ewsTu8mL3WmKgM +a/aOEmem8rJY5AIJEzypuxC00jBF8ez3ABHfZfjcK0NVvxaXxA/VLGGEqnKG/uY6 +fsI/fe78LxQ+5oXdUG+3Se0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNV +HQ4EFgQU8ncX+l6o/vY9cdVouslGDDjYr7AwDgYDVR0PAQH/BAQDAgGGMA0GCSqG +SIb3DQEBCwUAA4ICAQBQUfB13HAE4/+qddRxosuej6ip0691x1TPOhwEmSKsxBHi +7zNKpiMdDg1H2DfHb680f0+BazVP6XKlMeJ45/dOlBhbQH3PayFUhuaVevvGyuqc +SE5XCV0vrPSltJczWNWseanMX/mF+lLFjfiRFOs6DRfQUsJ748JzjkZ4Bjgs6Fza +ZsT0pPBWGTMpWmWSBUdGSquEwx4noR8RkpkndZMPvDY7l1ePJlsMu5wP1G4wB9Tc +XzZoZjmDlicmisjEOf6aIW/Vcobpf2Lll07QJNBAsNB1CI69aO4I1258EHBGG3zg +iLKecoaZAeO/n0kZtCW+VmWuF2PlHt/o/0elv+EmBYTksMCv5wiZqAxeJoBF1Pho +L5aPruJKHJwWDBNvOIf2u8g0X5IDUXlwpt/L9ZlNec1OvFefQ05rLisY+GpzjLrF +Ne85akEez3GoorKGB1s6yeHvP2UEgEcyRHCVTjFnanRbEEV16rCf0OY1/k6fi8wr +kkVbbiVghUbN0aqwdmaTd5a+g744tiROJgvM7XpWGuDpWsZkrUx6AEhEL7lAuxM+ +vhV4nYWBSipX3tUZQ9rbyltHhoMLP7YNdnhzeSJesYAfz77RP1YQmCuVh6EfnWQU +YDksswBVLuT1sw5XxJFBAJw/6KXf6vb/yPCtbVKoF6ubYfwSUTXkJf2vqmqGOQ== +-----END CERTIFICATE----- + +# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign ECC Root CA - R4 +# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign ECC Root CA - R4 +# Label: "GlobalSign ECC Root CA - R4" +# Serial: 159662223612894884239637590694 +# MD5 Fingerprint: 26:29:f8:6d:e1:88:bf:a2:65:7f:aa:c4:cd:0f:7f:fc +# SHA1 Fingerprint: 6b:a0:b0:98:e1:71:ef:5a:ad:fe:48:15:80:77:10:f4:bd:6f:0b:28 +# SHA256 Fingerprint: b0:85:d7:0b:96:4f:19:1a:73:e4:af:0d:54:ae:7a:0e:07:aa:fd:af:9b:71:dd:08:62:13:8a:b7:32:5a:24:a2 +-----BEGIN CERTIFICATE----- +MIIB3DCCAYOgAwIBAgINAgPlfvU/k/2lCSGypjAKBggqhkjOPQQDAjBQMSQwIgYD +VQQLExtHbG9iYWxTaWduIEVDQyBSb290IENBIC0gUjQxEzARBgNVBAoTCkdsb2Jh +bFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMTIxMTEzMDAwMDAwWhcNMzgw +MTE5MDMxNDA3WjBQMSQwIgYDVQQLExtHbG9iYWxTaWduIEVDQyBSb290IENBIC0g +UjQxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2JhbFNpZ24wWTAT +BgcqhkjOPQIBBggqhkjOPQMBBwNCAAS4xnnTj2wlDp8uORkcA6SumuU5BwkWymOx +uYb4ilfBV85C+nOh92VC/x7BALJucw7/xyHlGKSq2XE/qNS5zowdo0IwQDAOBgNV +HQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVLB7rUW44kB/ ++wpu+74zyTyjhNUwCgYIKoZIzj0EAwIDRwAwRAIgIk90crlgr/HmnKAWBVBfw147 +bmF0774BxL4YSFlhgjICICadVGNA3jdgUM/I2O2dgq43mLyjj0xMqTQrbO/7lZsm +-----END CERTIFICATE----- + +# Issuer: CN=GTS Root R1 O=Google Trust Services LLC +# Subject: CN=GTS Root R1 O=Google Trust Services LLC +# Label: "GTS Root R1" +# Serial: 159662320309726417404178440727 +# MD5 Fingerprint: 05:fe:d0:bf:71:a8:a3:76:63:da:01:e0:d8:52:dc:40 +# SHA1 Fingerprint: e5:8c:1c:c4:91:3b:38:63:4b:e9:10:6e:e3:ad:8e:6b:9d:d9:81:4a +# SHA256 Fingerprint: d9:47:43:2a:bd:e7:b7:fa:90:fc:2e:6b:59:10:1b:12:80:e0:e1:c7:e4:e4:0f:a3:c6:88:7f:ff:57:a7:f4:cf +-----BEGIN CERTIFICATE----- +MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQsw +CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU +MBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAw +MDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp +Y2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaMf/vo +27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7w +Cl7raKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjw +TcLCeoiKu7rPWRnWr4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0Pfybl +qAj+lug8aJRT7oM6iCsVlgmy4HqMLnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaH +szVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk9+aCEI3oncKKiPo4Zor8 +Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zqkUspzBmk +MiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92 +wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70p +aDPvOmbsB4om3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrN +VjzRlwW5y0vtOUucxD/SVRNuJLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQID +AQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQADggIBAJ+qQibb +C5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe +QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuy +h6f88/qBVRRiClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM4 +7HLwEXWdyzRSjeZ2axfG34arJ45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8J +ZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYciNuaCp+0KueIHoI17eko8cdLiA6Ef +MgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5meLMFrUKTX5hgUvYU/ +Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJFfbdT +6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ +0E6yove+7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm +2tIMPNuzjsmhDYAPexZ3FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bb +bP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3gm3c +-----END CERTIFICATE----- + +# Issuer: CN=GTS Root R2 O=Google Trust Services LLC +# Subject: CN=GTS Root R2 O=Google Trust Services LLC +# Label: "GTS Root R2" +# Serial: 159662449406622349769042896298 +# MD5 Fingerprint: 1e:39:c0:53:e6:1e:29:82:0b:ca:52:55:36:5d:57:dc +# SHA1 Fingerprint: 9a:44:49:76:32:db:de:fa:d0:bc:fb:5a:7b:17:bd:9e:56:09:24:94 +# SHA256 Fingerprint: 8d:25:cd:97:22:9d:bf:70:35:6b:da:4e:b3:cc:73:40:31:e2:4c:f0:0f:af:cf:d3:2d:c7:6e:b5:84:1c:7e:a8 +-----BEGIN CERTIFICATE----- +MIIFVzCCAz+gAwIBAgINAgPlrsWNBCUaqxElqjANBgkqhkiG9w0BAQwFADBHMQsw +CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU +MBIGA1UEAxMLR1RTIFJvb3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAw +MDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp +Y2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTukk3LvCvpt +nfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY +6Dlo7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAu +MC6C/Pq8tBcKSOWIm8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7k +RXuJVfeKH2JShBKzwkCX44ofR5GmdFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWg +f9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbuak7MkogwTZq9TwtImoS1mKPV ++3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscszcTJGr61K8Yzo +dDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW +Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKa +G73VululycslaVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCq +gc7dGtxRcw1PcOnlthYhGXmy5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwID +AQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEMBQADggIBAB/Kzt3H +vqGf2SdMC9wXmBFqiN495nFWcrKeGk6c1SuYJF2ba3uwM4IJvd8lRuqYnrYb/oM8 +0mJhwQTtzuDFycgTE1XnqGOtjHsB/ncw4c5omwX4Eu55MaBBRTUoCnGkJE+M3DyC +B19m3H0Q/gxhswWV7uGugQ+o+MePTagjAiZrHYNSVc61LwDKgEDg4XSsYPWHgJ2u +NmSRXbBoGOqKYcl3qJfEycel/FVL8/B/uWU9J2jQzGv6U53hkRrJXRqWbTKH7QMg +yALOWr7Z6v2yTcQvG99fevX4i8buMTolUVVnjWQye+mew4K6Ki3pHrTgSAai/Gev +HyICc/sgCq+dVEuhzf9gR7A/Xe8bVr2XIZYtCtFenTgCR2y59PYjJbigapordwj6 +xLEokCZYCDzifqrXPW+6MYgKBesntaFJ7qBFVHvmJ2WZICGoo7z7GJa7Um8M7YNR +TOlZ4iBgxcJlkoKM8xAfDoqXvneCbT+PHV28SSe9zE8P4c52hgQjxcCMElv924Sg +JPFI/2R80L5cFtHvma3AH/vLrrw4IgYmZNralw4/KBVEqE8AyvCazM90arQ+POuV +7LXTWtiBmelDGDfrs7vRWGJB82bSj6p4lVQgw1oudCvV0b4YacCs1aTPObpRhANl +6WLAYv7YTVWW4tAR+kg0Eeye7QUd5MjWHYbL +-----END CERTIFICATE----- + +# Issuer: CN=GTS Root R3 O=Google Trust Services LLC +# Subject: CN=GTS Root R3 O=Google Trust Services LLC +# Label: "GTS Root R3" +# Serial: 159662495401136852707857743206 +# MD5 Fingerprint: 3e:e7:9d:58:02:94:46:51:94:e5:e0:22:4a:8b:e7:73 +# SHA1 Fingerprint: ed:e5:71:80:2b:c8:92:b9:5b:83:3c:d2:32:68:3f:09:cd:a0:1e:46 +# SHA256 Fingerprint: 34:d8:a7:3e:e2:08:d9:bc:db:0d:95:65:20:93:4b:4e:40:e6:94:82:59:6e:8b:6f:73:c8:42:6b:01:0a:6f:48 +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPluILrIPglJ209ZjAKBggqhkjOPQQDAzBHMQswCQYD +VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG +A1UEAxMLR1RTIFJvb3QgUjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAw +WjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz +IExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcqhkjOPQIBBgUrgQQAIgNi +AAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUURout736G +jOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL2 +4CejQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBTB8Sa6oC2uhYHP0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEA9uEglRR7 +VKOQFhG/hMjqb2sXnh5GmCCbn9MN2azTL818+FsuVbu/3ZL3pAzcMeGiAjEA/Jdm +ZuVDFhOD3cffL74UOO0BzrEXGhF16b0DjyZ+hOXJYKaV11RZt+cRLInUue4X +-----END CERTIFICATE----- + +# Issuer: CN=GTS Root R4 O=Google Trust Services LLC +# Subject: CN=GTS Root R4 O=Google Trust Services LLC +# Label: "GTS Root R4" +# Serial: 159662532700760215368942768210 +# MD5 Fingerprint: 43:96:83:77:19:4d:76:b3:9d:65:52:e4:1d:22:a5:e8 +# SHA1 Fingerprint: 77:d3:03:67:b5:e0:0c:15:f6:0c:38:61:df:7c:e1:3b:92:46:4d:47 +# SHA256 Fingerprint: 34:9d:fa:40:58:c5:e2:63:12:3b:39:8a:e7:95:57:3c:4e:13:13:c8:3f:e6:8f:93:55:6c:d5:e8:03:1b:3c:7d +-----BEGIN CERTIFICATE----- +MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYD +VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG +A1UEAxMLR1RTIFJvb3QgUjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAw +WjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz +IExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjOPQIBBgUrgQQAIgNi +AATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzuhXyi +QHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvR +HYqjQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBSATNbrdP9JNqPV2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D +9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/Cr8deVl5c1RxYIigL9zC2L7F8AjEA8GE8 +p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh4rsUecrNIdSUtUlD +-----END CERTIFICATE----- + +# Issuer: CN=Telia Root CA v2 O=Telia Finland Oyj +# Subject: CN=Telia Root CA v2 O=Telia Finland Oyj +# Label: "Telia Root CA v2" +# Serial: 7288924052977061235122729490515358 +# MD5 Fingerprint: 0e:8f:ac:aa:82:df:85:b1:f4:dc:10:1c:fc:99:d9:48 +# SHA1 Fingerprint: b9:99:cd:d1:73:50:8a:c4:47:05:08:9c:8c:88:fb:be:a0:2b:40:cd +# SHA256 Fingerprint: 24:2b:69:74:2f:cb:1e:5b:2a:bf:98:89:8b:94:57:21:87:54:4e:5b:4d:99:11:78:65:73:62:1f:6a:74:b8:2c +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIPAWdfJ9b+euPkrL4JWwWeMA0GCSqGSIb3DQEBCwUAMEQx +CzAJBgNVBAYTAkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZMBcGA1UE +AwwQVGVsaWEgUm9vdCBDQSB2MjAeFw0xODExMjkxMTU1NTRaFw00MzExMjkxMTU1 +NTRaMEQxCzAJBgNVBAYTAkZJMRowGAYDVQQKDBFUZWxpYSBGaW5sYW5kIE95ajEZ +MBcGA1UEAwwQVGVsaWEgUm9vdCBDQSB2MjCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBALLQPwe84nvQa5n44ndp586dpAO8gm2h/oFlH0wnrI4AuhZ76zBq +AMCzdGh+sq/H1WKzej9Qyow2RCRj0jbpDIX2Q3bVTKFgcmfiKDOlyzG4OiIjNLh9 +vVYiQJ3q9HsDrWj8soFPmNB06o3lfc1jw6P23pLCWBnglrvFxKk9pXSW/q/5iaq9 +lRdU2HhE8Qx3FZLgmEKnpNaqIJLNwaCzlrI6hEKNfdWV5Nbb6WLEWLN5xYzTNTOD +n3WhUidhOPFZPY5Q4L15POdslv5e2QJltI5c0BE0312/UqeBAMN/mUWZFdUXyApT +7GPzmX3MaRKGwhfwAZ6/hLzRUssbkmbOpFPlob/E2wnW5olWK8jjfN7j/4nlNW4o +6GwLI1GpJQXrSPjdscr6bAhR77cYbETKJuFzxokGgeWKrLDiKca5JLNrRBH0pUPC +TEPlcDaMtjNXepUugqD0XBCzYYP2AgWGLnwtbNwDRm41k9V6lS/eINhbfpSQBGq6 +WT0EBXWdN6IOLj3rwaRSg/7Qa9RmjtzG6RJOHSpXqhC8fF6CfaamyfItufUXJ63R +DolUK5X6wK0dmBR4M0KGCqlztft0DbcbMBnEWg4cJ7faGND/isgFuvGqHKI3t+ZI +pEYslOqodmJHixBTB0hXbOKSTbauBcvcwUpej6w9GU7C7WB1K9vBykLVAgMBAAGj +YzBhMB8GA1UdIwQYMBaAFHKs5DN5qkWH9v2sHZ7Wxy+G2CQ5MB0GA1UdDgQWBBRy +rOQzeapFh/b9rB2e1scvhtgkOTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAoDtZpwmUPjaE0n4vOaWWl/oRrfxn83EJ +8rKJhGdEr7nv7ZbsnGTbMjBvZ5qsfl+yqwE2foH65IRe0qw24GtixX1LDoJt0nZi +0f6X+J8wfBj5tFJ3gh1229MdqfDBmgC9bXXYfef6xzijnHDoRnkDry5023X4blMM +A8iZGok1GTzTyVR8qPAs5m4HeW9q4ebqkYJpCh3DflminmtGFZhb069GHWLIzoBS +SRE/yQQSwxN8PzuKlts8oB4KtItUsiRnDe+Cy748fdHif64W1lZYudogsYMVoe+K +TTJvQS8TUoKU1xrBeKJR3Stwbbca+few4GeXVtt8YVMJAygCQMez2P2ccGrGKMOF +6eLtGpOg3kuYooQ+BXcBlj37tCAPnHICehIv1aO6UXivKitEZU61/Qrowc15h2Er +3oBXRb9n8ZuRXqWk7FlIEA04x7D6w0RtBPV4UBySllva9bguulvP5fBqnUsvWHMt +Ty3EHD70sz+rFQ47GUGKpMFXEmZxTPpT41frYpUJnlTd0cI8Vzy9OK2YZLe4A5pT +VmBds9hCG1xLEooc6+t9xnppxyd/pPiL8uSUZodL6ZQHCRJ5irLrdATczvREWeAW +ysUsWNc8e89ihmpQfTU2Zqf7N+cox9jQraVplI/owd8k+BsHMYeB2F326CjYSlKA +rBPuUBQemMc= +-----END CERTIFICATE----- + +# Issuer: CN=D-TRUST BR Root CA 1 2020 O=D-Trust GmbH +# Subject: CN=D-TRUST BR Root CA 1 2020 O=D-Trust GmbH +# Label: "D-TRUST BR Root CA 1 2020" +# Serial: 165870826978392376648679885835942448534 +# MD5 Fingerprint: b5:aa:4b:d5:ed:f7:e3:55:2e:8f:72:0a:f3:75:b8:ed +# SHA1 Fingerprint: 1f:5b:98:f0:e3:b5:f7:74:3c:ed:e6:b0:36:7d:32:cd:f4:09:41:67 +# SHA256 Fingerprint: e5:9a:aa:81:60:09:c2:2b:ff:5b:25:ba:d3:7d:f3:06:f0:49:79:7c:1f:81:d8:5a:b0:89:e6:57:bd:8f:00:44 +-----BEGIN CERTIFICATE----- +MIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQsw +CQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRS +VVNUIEJSIFJvb3QgQ0EgMSAyMDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5 +NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAG +A1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAGByqGSM49AgEGBSuB +BAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7dPYS +zuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0 +QVK5buXuQqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/ +VbNafAkl1bK6CKBrqx9tMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6g +PKA6hjhodHRwOi8vY3JsLmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X2JyX3Jvb3Rf +Y2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVjdG9yeS5kLXRydXN0Lm5l +dC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxPPUQtVHJ1 +c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjO +PQQDAwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFW +wKrY7RjEsK70PvomAjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHV +dWNbFJWcHwHP2NVypw87 +-----END CERTIFICATE----- + +# Issuer: CN=D-TRUST EV Root CA 1 2020 O=D-Trust GmbH +# Subject: CN=D-TRUST EV Root CA 1 2020 O=D-Trust GmbH +# Label: "D-TRUST EV Root CA 1 2020" +# Serial: 126288379621884218666039612629459926992 +# MD5 Fingerprint: 8c:2d:9d:70:9f:48:99:11:06:11:fb:e9:cb:30:c0:6e +# SHA1 Fingerprint: 61:db:8c:21:59:69:03:90:d8:7c:9c:12:86:54:cf:9d:3d:f4:dd:07 +# SHA256 Fingerprint: 08:17:0d:1a:a3:64:53:90:1a:2f:95:92:45:e3:47:db:0c:8d:37:ab:aa:bc:56:b8:1a:a1:00:dc:95:89:70:db +-----BEGIN CERTIFICATE----- +MIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQsw +CQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRS +VVNUIEVWIFJvb3QgQ0EgMSAyMDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5 +NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAG +A1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8ZRCC +/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rD +wpdhQntJraOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3 +OqQo5FD4pPfsazK2/umLMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6g +PKA6hjhodHRwOi8vY3JsLmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X2V2X3Jvb3Rf +Y2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVjdG9yeS5kLXRydXN0Lm5l +dC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxPPUQtVHJ1 +c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjO +PQQDAwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CA +y/m0sRtW9XLS/BnRAjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJb +gfM0agPnIjhQW+0ZT0MW +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert TLS ECC P384 Root G5 O=DigiCert, Inc. +# Subject: CN=DigiCert TLS ECC P384 Root G5 O=DigiCert, Inc. +# Label: "DigiCert TLS ECC P384 Root G5" +# Serial: 13129116028163249804115411775095713523 +# MD5 Fingerprint: d3:71:04:6a:43:1c:db:a6:59:e1:a8:a3:aa:c5:71:ed +# SHA1 Fingerprint: 17:f3:de:5e:9f:0f:19:e9:8e:f6:1f:32:26:6e:20:c4:07:ae:30:ee +# SHA256 Fingerprint: 01:8e:13:f0:77:25:32:cf:80:9b:d1:b1:72:81:86:72:83:fc:48:c6:e1:3b:e9:c6:98:12:85:4a:49:0c:1b:05 +-----BEGIN CERTIFICATE----- +MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp +Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2 +MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ +bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS +7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp +0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS +B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ +LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4 +DXZDjC5Ty3zfDBeWUA== +-----END CERTIFICATE----- + +# Issuer: CN=DigiCert TLS RSA4096 Root G5 O=DigiCert, Inc. +# Subject: CN=DigiCert TLS RSA4096 Root G5 O=DigiCert, Inc. +# Label: "DigiCert TLS RSA4096 Root G5" +# Serial: 11930366277458970227240571539258396554 +# MD5 Fingerprint: ac:fe:f7:34:96:a9:f2:b3:b4:12:4b:e4:27:41:6f:e1 +# SHA1 Fingerprint: a7:88:49:dc:5d:7c:75:8c:8c:de:39:98:56:b3:aa:d0:b2:a5:71:35 +# SHA256 Fingerprint: 37:1a:00:dc:05:33:b3:72:1a:7e:eb:40:e8:41:9e:70:79:9d:2b:0a:0f:2c:1d:80:69:31:65:f7:ce:c4:ad:75 +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBN +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMT +HERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcN +NDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQs +IEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS87IE+ +ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG0 +2C+JFvuUAT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgp +wgscONyfMXdcvyej/Cestyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZM +pG2T6T867jp8nVid9E6P/DsjyG244gXazOvswzH016cpVIDPRFtMbzCe88zdH5RD +nU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnVDdXifBBiqmvwPXbzP6Po +sMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9qTXeXAaDx +Zre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cd +Lvvyz6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvX +KyY//SovcfXWJL5/MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNe +XoVPzthwiHvOAbWWl9fNff2C+MIkwcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPL +tgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4EFgQUUTMc7TZArxfTJc1paPKv +TiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN +AQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw +GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7H +PNtQOa27PShNlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLF +O4uJ+DQtpBflF+aZfTCIITfNMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQ +REtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/u4cnYiWB39yhL/btp/96j1EuMPik +AdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9GOUrYU9DzLjtxpdRv +/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh47a+ +p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilw +MUc/dNAUFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WF +qUITVuwhd4GTWgzqltlJyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCK +ovfepEWFJqgejF0pW8hL2JpqA15w8oVPbEtoL8pU9ozaMv7Da4M/OMZ+ +-----END CERTIFICATE----- + +# Issuer: CN=Certainly Root R1 O=Certainly +# Subject: CN=Certainly Root R1 O=Certainly +# Label: "Certainly Root R1" +# Serial: 188833316161142517227353805653483829216 +# MD5 Fingerprint: 07:70:d4:3e:82:87:a0:fa:33:36:13:f4:fa:33:e7:12 +# SHA1 Fingerprint: a0:50:ee:0f:28:71:f4:27:b2:12:6d:6f:50:96:25:ba:cc:86:42:af +# SHA256 Fingerprint: 77:b8:2c:d8:64:4c:43:05:f7:ac:c5:cb:15:6b:45:67:50:04:03:3d:51:c6:0c:62:02:a8:e0:c3:34:67:d3:a0 +-----BEGIN CERTIFICATE----- +MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAw +PTELMAkGA1UEBhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2Vy +dGFpbmx5IFJvb3QgUjEwHhcNMjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9 +MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0 +YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANA2 +1B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O5MQT +vqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbed +aFySpvXl8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b0 +1C7jcvk2xusVtyWMOvwlDbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5 +r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGIXsXwClTNSaa/ApzSRKft43jvRl5tcdF5 +cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkNKPl6I7ENPT2a/Z2B7yyQ +wHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQAjeZjOVJ +6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA +2CnbrlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyH +Wyf5QBGenDPBt+U1VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMR +eiFPCyEQtkA6qyI6BJyLm4SGcprSp6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB +/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTgqj8ljZ9EXME66C6u +d0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAszHQNTVfSVcOQr +PbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d +8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi +1wrykXprOQ4vMMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrd +rRT90+7iIgXr0PK3aBLXWopBGsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9di +taY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+gjwN/KUD+nsa2UUeYNrEjvn8K8l7 +lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgHJBu6haEaBQmAupVj +yTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7fpYn +Kx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLy +yCwzk5Iwx06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5n +wXARPbv0+Em34yaXOp/SX3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6 +OV+KmalBWQewLK8= +-----END CERTIFICATE----- + +# Issuer: CN=Certainly Root E1 O=Certainly +# Subject: CN=Certainly Root E1 O=Certainly +# Label: "Certainly Root E1" +# Serial: 8168531406727139161245376702891150584 +# MD5 Fingerprint: 0a:9e:ca:cd:3e:52:50:c6:36:f3:4b:a3:ed:a7:53:e9 +# SHA1 Fingerprint: f9:e1:6d:dc:01:89:cf:d5:82:45:63:3e:c5:37:7d:c2:eb:93:6f:2b +# SHA256 Fingerprint: b4:58:5f:22:e4:ac:75:6a:4e:86:12:a1:36:1c:5d:9d:03:1a:93:fd:84:fe:bb:77:8f:a3:06:8b:0f:c4:2d:c2 +-----BEGIN CERTIFICATE----- +MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQsw +CQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlu +bHkgUm9vdCBFMTAeFw0yMTA0MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJ +BgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlubHkxGjAYBgNVBAMTEUNlcnRhaW5s +eSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4fxzf7flHh4axpMCK ++IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9YBk2 +QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4 +hevIIgcwCgYIKoZIzj0EAwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozm +ut6Dacpps6kFtZaSF4fC0urQe87YQVt8rgIwRt7qy12a7DLCZRawTDBcMPPaTnOG +BtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR +-----END CERTIFICATE----- + +# Issuer: CN=Security Communication RootCA3 O=SECOM Trust Systems CO.,LTD. +# Subject: CN=Security Communication RootCA3 O=SECOM Trust Systems CO.,LTD. +# Label: "Security Communication RootCA3" +# Serial: 16247922307909811815 +# MD5 Fingerprint: 1c:9a:16:ff:9e:5c:e0:4d:8a:14:01:f4:35:5d:29:26 +# SHA1 Fingerprint: c3:03:c8:22:74:92:e5:61:a2:9c:5f:79:91:2b:1e:44:13:91:30:3a +# SHA256 Fingerprint: 24:a5:5c:2a:b0:51:44:2d:06:17:76:65:41:23:9a:4a:d0:32:d7:c5:51:75:aa:34:ff:de:2f:bc:4f:5c:52:94 +-----BEGIN CERTIFICATE----- +MIIFfzCCA2egAwIBAgIJAOF8N0D9G/5nMA0GCSqGSIb3DQEBDAUAMF0xCzAJBgNV +BAYTAkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScw +JQYDVQQDEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTMwHhcNMTYwNjE2 +MDYxNzE2WhcNMzgwMTE4MDYxNzE2WjBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UEAxMeU2VjdXJpdHkg +Q29tbXVuaWNhdGlvbiBSb290Q0EzMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +CgKCAgEA48lySfcw3gl8qUCBWNO0Ot26YQ+TUG5pPDXC7ltzkBtnTCHsXzW7OT4r +CmDvu20rhvtxosis5FaU+cmvsXLUIKx00rgVrVH+hXShuRD+BYD5UpOzQD11EKzA +lrenfna84xtSGc4RHwsENPXY9Wk8d/Nk9A2qhd7gCVAEF5aEt8iKvE1y/By7z/MG +TfmfZPd+pmaGNXHIEYBMwXFAWB6+oHP2/D5Q4eAvJj1+XCO1eXDe+uDRpdYMQXF7 +9+qMHIjH7Iv10S9VlkZ8WjtYO/u62C21Jdp6Ts9EriGmnpjKIG58u4iFW/vAEGK7 +8vknR+/RiTlDxN/e4UG/VHMgly1s2vPUB6PmudhvrvyMGS7TZ2crldtYXLVqAvO4 +g160a75BflcJdURQVc1aEWEhCmHCqYj9E7wtiS/NYeCVvsq1e+F7NGcLH7YMx3we +GVPKp7FKFSBWFHA9K4IsD50VHUeAR/94mQ4xr28+j+2GaR57GIgUssL8gjMunEst ++3A7caoreyYn8xrC3PsXuKHqy6C0rtOUfnrQq8PsOC0RLoi/1D+tEjtCrI8Cbn3M +0V9hvqG8OmpI6iZVIhZdXw3/JzOfGAN0iltSIEdrRU0id4xVJ/CvHozJgyJUt5rQ +T9nO/NkuHJYosQLTA70lUhw0Zk8jq/R3gpYd0VcwCBEF/VfR2ccCAwEAAaNCMEAw +HQYDVR0OBBYEFGQUfPxYchamCik0FW8qy7z8r6irMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBDAUAA4ICAQDcAiMI4u8hOscNtybS +YpOnpSNyByCCYN8Y11StaSWSntkUz5m5UoHPrmyKO1o5yGwBQ8IibQLwYs1OY0PA +FNr0Y/Dq9HHuTofjcan0yVflLl8cebsjqodEV+m9NU1Bu0soo5iyG9kLFwfl9+qd +9XbXv8S2gVj/yP9kaWJ5rW4OH3/uHWnlt3Jxs/6lATWUVCvAUm2PVcTJ0rjLyjQI +UYWg9by0F1jqClx6vWPGOi//lkkZhOpn2ASxYfQAW0q3nHE3GYV5v4GwxxMOdnE+ +OoAGrgYWp421wsTL/0ClXI2lyTrtcoHKXJg80jQDdwj98ClZXSEIx2C/pHF7uNke +gr4Jr2VvKKu/S7XuPghHJ6APbw+LP6yVGPO5DtxnVW5inkYO0QR4ynKudtml+LLf +iAlhi+8kTtFZP1rUPcmTPCtk9YENFpb3ksP+MW/oKjJ0DvRMmEoYDjBU1cXrvMUV +nuiZIesnKwkK2/HmcBhWuwzkvvnoEKQTkrgc4NtnHVMDpCKn3F2SEDzq//wbEBrD +2NCcnWXL0CsnMQMeNuE9dnUM/0Umud1RvCPHX9jYhxBAEg09ODfnRDwYwFMJZI// +1ZqmfHAuc1Uh6N//g7kdPjIe1qZ9LPFm6Vwdp6POXiUyK+OVrCoHzrQoeIY8Laad +TdJ0MN1kURXbg4NR16/9M51NZg== +-----END CERTIFICATE----- + +# Issuer: CN=Security Communication ECC RootCA1 O=SECOM Trust Systems CO.,LTD. +# Subject: CN=Security Communication ECC RootCA1 O=SECOM Trust Systems CO.,LTD. +# Label: "Security Communication ECC RootCA1" +# Serial: 15446673492073852651 +# MD5 Fingerprint: 7e:43:b0:92:68:ec:05:43:4c:98:ab:5d:35:2e:7e:86 +# SHA1 Fingerprint: b8:0e:26:a9:bf:d2:b2:3b:c0:ef:46:c9:ba:c7:bb:f6:1d:0d:41:41 +# SHA256 Fingerprint: e7:4f:bd:a5:5b:d5:64:c4:73:a3:6b:44:1a:a7:99:c8:a6:8e:07:74:40:e8:28:8b:9f:a1:e5:0e:4b:ba:ca:11 +-----BEGIN CERTIFICATE----- +MIICODCCAb6gAwIBAgIJANZdm7N4gS7rMAoGCCqGSM49BAMDMGExCzAJBgNVBAYT +AkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMSswKQYD +VQQDEyJTZWN1cml0eSBDb21tdW5pY2F0aW9uIEVDQyBSb290Q0ExMB4XDTE2MDYx +NjA1MTUyOFoXDTM4MDExODA1MTUyOFowYTELMAkGA1UEBhMCSlAxJTAjBgNVBAoT +HFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKzApBgNVBAMTIlNlY3VyaXR5 +IENvbW11bmljYXRpb24gRUNDIFJvb3RDQTEwdjAQBgcqhkjOPQIBBgUrgQQAIgNi +AASkpW9gAwPDvTH00xecK4R1rOX9PVdu12O/5gSJko6BnOPpR27KkBLIE+Cnnfdl +dB9sELLo5OnvbYUymUSxXv3MdhDYW72ixvnWQuRXdtyQwjWpS4g8EkdtXP9JTxpK +ULGjQjBAMB0GA1UdDgQWBBSGHOf+LaVKiwj+KBH6vqNm+GBZLzAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu +9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3LsnNdo4gIxwwCMQDAqy0O +be0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70eN9k= +-----END CERTIFICATE----- + +# Issuer: CN=BJCA Global Root CA1 O=BEIJING CERTIFICATE AUTHORITY +# Subject: CN=BJCA Global Root CA1 O=BEIJING CERTIFICATE AUTHORITY +# Label: "BJCA Global Root CA1" +# Serial: 113562791157148395269083148143378328608 +# MD5 Fingerprint: 42:32:99:76:43:33:36:24:35:07:82:9b:28:f9:d0:90 +# SHA1 Fingerprint: d5:ec:8d:7b:4c:ba:79:f4:e7:e8:cb:9d:6b:ae:77:83:10:03:21:6a +# SHA256 Fingerprint: f3:89:6f:88:fe:7c:0a:88:27:66:a7:fa:6a:d2:74:9f:b5:7a:7f:3e:98:fb:76:9c:1f:a7:b0:9c:2c:44:d5:ae +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBU +MQswCQYDVQQGEwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRI +T1JJVFkxHTAbBgNVBAMMFEJKQ0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAz +MTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkGA1UEBhMCQ04xJjAkBgNVBAoMHUJF +SUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRCSkNBIEdsb2Jh +bCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFmCL3Z +xRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZ +spDyRhySsTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O5 +58dnJCNPYwpj9mZ9S1WnP3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgR +at7GGPZHOiJBhyL8xIkoVNiMpTAK+BcWyqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll +5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRjeulumijWML3mG90Vr4Tq +nMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNnMoH1V6XK +V0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/ +pj+bOT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZO +z2nxbkRs1CTqjSShGL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXn +jSXWgXSHRtQpdaJCbPdzied9v3pKH9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+ +WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMBAAGjQjBAMB0GA1UdDgQWBBTF +7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4 +YRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3Kli +awLwQ8hOnThJdMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u ++2D2/VnGKhs/I0qUJDAnyIm860Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88 +X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuhTaRjAv04l5U/BXCga99igUOLtFkN +SoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW4AB+dAb/OMRyHdOo +P2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmpGQrI ++pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRz +znfSxqxx4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9 +eVzYH6Eze9mCUAyTF6ps3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2 +YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4SSPfSKcOYKMryMguTjClPPGAyzQWWYezy +r/6zcCwupvI= +-----END CERTIFICATE----- + +# Issuer: CN=BJCA Global Root CA2 O=BEIJING CERTIFICATE AUTHORITY +# Subject: CN=BJCA Global Root CA2 O=BEIJING CERTIFICATE AUTHORITY +# Label: "BJCA Global Root CA2" +# Serial: 58605626836079930195615843123109055211 +# MD5 Fingerprint: 5e:0a:f6:47:5f:a6:14:e8:11:01:95:3f:4d:01:eb:3c +# SHA1 Fingerprint: f4:27:86:eb:6e:b8:6d:88:31:67:02:fb:ba:66:a4:53:00:aa:7a:a6 +# SHA256 Fingerprint: 57:4d:f6:93:1e:27:80:39:66:7b:72:0a:fd:c1:60:0f:c2:7e:b6:6d:d3:09:29:79:fb:73:85:64:87:21:28:82 +-----BEGIN CERTIFICATE----- +MIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQsw +CQYDVQQGEwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJ +VFkxHTAbBgNVBAMMFEJKQ0EgR2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgy +MVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJ +TkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRCSkNBIEdsb2JhbCBS +b290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jlSR9B +IgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK+ ++kpRuDCK/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJK +sVF/BvDRgh9Obl+rg/xI1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD +AgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8W9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA +94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8gUXOQwKhbYdDFUDn9hf7B +43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w== +-----END CERTIFICATE----- + +# Issuer: CN=Sectigo Public Server Authentication Root E46 O=Sectigo Limited +# Subject: CN=Sectigo Public Server Authentication Root E46 O=Sectigo Limited +# Label: "Sectigo Public Server Authentication Root E46" +# Serial: 88989738453351742415770396670917916916 +# MD5 Fingerprint: 28:23:f8:b2:98:5c:37:16:3b:3e:46:13:4e:b0:b3:01 +# SHA1 Fingerprint: ec:8a:39:6c:40:f0:2e:bc:42:75:d4:9f:ab:1c:1a:5b:67:be:d2:9a +# SHA256 Fingerprint: c9:0f:26:f0:fb:1b:40:18:b2:22:27:51:9b:5c:a2:b5:3e:2c:a5:b3:be:5c:f1:8e:fe:1b:ef:47:38:0c:53:83 +-----BEGIN CERTIFICATE----- +MIICOjCCAcGgAwIBAgIQQvLM2htpN0RfFf51KBC49DAKBggqhkjOPQQDAzBfMQsw +CQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1T +ZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwHhcN +MjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5WjBfMQswCQYDVQQGEwJHQjEYMBYG +A1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBT +ZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAR2+pmpbiDt+dd34wc7qNs9Xzjoq1WmVk/WSOrsfy2qw7LFeeyZYX8QeccC +WvkEN/U0NSt3zn8gj1KjAIns1aeibVvjS5KToID1AZTc8GgHHs3u/iVStSBDHBv+ +6xnOQ6OjQjBAMB0GA1UdDgQWBBTRItpMWfFLXyY4qp3W7usNw/upYTAOBgNVHQ8B +Af8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNnADBkAjAn7qRa +qCG76UeXlImldCBteU/IvZNeWBj7LRoAasm4PdCkT0RHlAFWovgzJQxC36oCMB3q +4S6ILuH5px0CMk7yn2xVdOOurvulGu7t0vzCAxHrRVxgED1cf5kDW21USAGKcw== +-----END CERTIFICATE----- + +# Issuer: CN=Sectigo Public Server Authentication Root R46 O=Sectigo Limited +# Subject: CN=Sectigo Public Server Authentication Root R46 O=Sectigo Limited +# Label: "Sectigo Public Server Authentication Root R46" +# Serial: 156256931880233212765902055439220583700 +# MD5 Fingerprint: 32:10:09:52:00:d5:7e:6c:43:df:15:c0:b1:16:93:e5 +# SHA1 Fingerprint: ad:98:f9:f3:e4:7d:75:3b:65:d4:82:b3:a4:52:17:bb:6e:f5:e4:38 +# SHA256 Fingerprint: 7b:b6:47:a6:2a:ee:ac:88:bf:25:7a:a5:22:d0:1f:fe:a3:95:e0:ab:45:c7:3f:93:f6:56:54:ec:38:f2:5a:06 +-----BEGIN CERTIFICATE----- +MIIFijCCA3KgAwIBAgIQdY39i658BwD6qSWn4cetFDANBgkqhkiG9w0BAQwFADBf +MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQD +Ey1TZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYw +HhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5WjBfMQswCQYDVQQGEwJHQjEY +MBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1Ymxp +YyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQCTvtU2UnXYASOgHEdCSe5jtrch/cSV1UgrJnwUUxDa +ef0rty2k1Cz66jLdScK5vQ9IPXtamFSvnl0xdE8H/FAh3aTPaE8bEmNtJZlMKpnz +SDBh+oF8HqcIStw+KxwfGExxqjWMrfhu6DtK2eWUAtaJhBOqbchPM8xQljeSM9xf +iOefVNlI8JhD1mb9nxc4Q8UBUQvX4yMPFF1bFOdLvt30yNoDN9HWOaEhUTCDsG3X +ME6WW5HwcCSrv0WBZEMNvSE6Lzzpng3LILVCJ8zab5vuZDCQOc2TZYEhMbUjUDM3 +IuM47fgxMMxF/mL50V0yeUKH32rMVhlATc6qu/m1dkmU8Sf4kaWD5QazYw6A3OAS +VYCmO2a0OYctyPDQ0RTp5A1NDvZdV3LFOxxHVp3i1fuBYYzMTYCQNFu31xR13NgE +SJ/AwSiItOkcyqex8Va3e0lMWeUgFaiEAin6OJRpmkkGj80feRQXEgyDet4fsZfu ++Zd4KKTIRJLpfSYFplhym3kT2BFfrsU4YjRosoYwjviQYZ4ybPUHNs2iTG7sijbt +8uaZFURww3y8nDnAtOFr94MlI1fZEoDlSfB1D++N6xybVCi0ITz8fAr/73trdf+L +HaAZBav6+CuBQug4urv7qv094PPK306Xlynt8xhW6aWWrL3DkJiy4Pmi1KZHQ3xt +zwIDAQABo0IwQDAdBgNVHQ4EFgQUVnNYZJX5khqwEioEYnmhQBWIIUkwDgYDVR0P +AQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAC9c +mTz8Bl6MlC5w6tIyMY208FHVvArzZJ8HXtXBc2hkeqK5Duj5XYUtqDdFqij0lgVQ +YKlJfp/imTYpE0RHap1VIDzYm/EDMrraQKFz6oOht0SmDpkBm+S8f74TlH7Kph52 +gDY9hAaLMyZlbcp+nv4fjFg4exqDsQ+8FxG75gbMY/qB8oFM2gsQa6H61SilzwZA +Fv97fRheORKkU55+MkIQpiGRqRxOF3yEvJ+M0ejf5lG5Nkc/kLnHvALcWxxPDkjB +JYOcCj+esQMzEhonrPcibCTRAUH4WAP+JWgiH5paPHxsnnVI84HxZmduTILA7rpX +DhjvLpr3Etiga+kFpaHpaPi8TD8SHkXoUsCjvxInebnMMTzD9joiFgOgyY9mpFui +TdaBJQbpdqQACj7LzTWb4OE4y2BThihCQRxEV+ioratF4yUQvNs+ZUH7G6aXD+u5 +dHn5HrwdVw1Hr8Mvn4dGp+smWg9WY7ViYG4A++MnESLn/pmPNPW56MORcr3Ywx65 +LvKRRFHQV80MNNVIIb/bE/FmJUNS0nAiNs2fxBx1IK1jcmMGDw4nztJqDby1ORrp +0XZ60Vzk50lJLVU3aPAaOpg+VBeHVOmmJ1CJeyAvP/+/oYtKR5j/K3tJPsMpRmAY +QqszKbrAKbkTidOIijlBO8n9pu0f9GBj39ItVQGL +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com TLS RSA Root CA 2022 O=SSL Corporation +# Subject: CN=SSL.com TLS RSA Root CA 2022 O=SSL Corporation +# Label: "SSL.com TLS RSA Root CA 2022" +# Serial: 148535279242832292258835760425842727825 +# MD5 Fingerprint: d8:4e:c6:59:30:d8:fe:a0:d6:7a:5a:2c:2c:69:78:da +# SHA1 Fingerprint: ec:2c:83:40:72:af:26:95:10:ff:0e:f2:03:ee:31:70:f6:78:9d:ca +# SHA256 Fingerprint: 8f:af:7d:2e:2c:b4:70:9b:b8:e0:b3:36:66:bf:75:a5:dd:45:b5:de:48:0f:8e:a8:d4:bf:e6:be:bc:17:f2:ed +-----BEGIN CERTIFICATE----- +MIIFiTCCA3GgAwIBAgIQb77arXO9CEDii02+1PdbkTANBgkqhkiG9w0BAQsFADBO +MQswCQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQD +DBxTU0wuY29tIFRMUyBSU0EgUm9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzQyMloX +DTQ2MDgxOTE2MzQyMVowTjELMAkGA1UEBhMCVVMxGDAWBgNVBAoMD1NTTCBDb3Jw +b3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgUlNBIFJvb3QgQ0EgMjAyMjCC +AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANCkCXJPQIgSYT41I57u9nTP +L3tYPc48DRAokC+X94xI2KDYJbFMsBFMF3NQ0CJKY7uB0ylu1bUJPiYYf7ISf5OY +t6/wNr/y7hienDtSxUcZXXTzZGbVXcdotL8bHAajvI9AI7YexoS9UcQbOcGV0ins +S657Lb85/bRi3pZ7QcacoOAGcvvwB5cJOYF0r/c0WRFXCsJbwST0MXMwgsadugL3 +PnxEX4MN8/HdIGkWCVDi1FW24IBydm5MR7d1VVm0U3TZlMZBrViKMWYPHqIbKUBO +L9975hYsLfy/7PO0+r4Y9ptJ1O4Fbtk085zx7AGL0SDGD6C1vBdOSHtRwvzpXGk3 +R2azaPgVKPC506QVzFpPulJwoxJF3ca6TvvC0PeoUidtbnm1jPx7jMEWTO6Af77w +dr5BUxIzrlo4QqvXDz5BjXYHMtWrifZOZ9mxQnUjbvPNQrL8VfVThxc7wDNY8VLS ++YCk8OjwO4s4zKTGkH8PnP2L0aPP2oOnaclQNtVcBdIKQXTbYxE3waWglksejBYS +d66UNHsef8JmAOSqg+qKkK3ONkRN0VHpvB/zagX9wHQfJRlAUW7qglFA35u5CCoG +AtUjHBPW6dvbxrB6y3snm/vg1UYk7RBLY0ulBY+6uB0rpvqR4pJSvezrZ5dtmi2f +gTIFZzL7SAg/2SW4BCUvAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j +BBgwFoAU+y437uOEeicuzRk1sTN8/9REQrkwHQYDVR0OBBYEFPsuN+7jhHonLs0Z +NbEzfP/UREK5MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAjYlt +hEUY8U+zoO9opMAdrDC8Z2awms22qyIZZtM7QbUQnRC6cm4pJCAcAZli05bg4vsM +QtfhWsSWTVTNj8pDU/0quOr4ZcoBwq1gaAafORpR2eCNJvkLTqVTJXojpBzOCBvf +R4iyrT7gJ4eLSYwfqUdYe5byiB0YrrPRpgqU+tvT5TgKa3kSM/tKWTcWQA673vWJ +DPFs0/dRa1419dvAJuoSc06pkZCmF8NsLzjUo3KUQyxi4U5cMj29TH0ZR6LDSeeW +P4+a0zvkEdiLA9z2tmBVGKaBUfPhqBVq6+AL8BQx1rmMRTqoENjwuSfr98t67wVy +lrXEj5ZzxOhWc5y8aVFjvO9nHEMaX3cZHxj4HCUp+UmZKbaSPaKDN7EgkaibMOlq +bLQjk2UEqxHzDh1TJElTHaE/nUiSEeJ9DU/1172iWD54nR4fK/4huxoTtrEoZP2w +AgDHbICivRZQIA9ygV/MlP+7mea6kMvq+cYMwq7FGc4zoWtcu358NFcXrfA/rs3q +r5nsLFR+jM4uElZI7xc7P0peYNLcdDa8pUNjyw9bowJWCZ4kLOGGgYz+qxcs+sji +Mho6/4UIyYOf8kpIEFR3N+2ivEC+5BB09+Rbu7nzifmPQdjH5FCQNYA+HLhNkNPU +98OwoX6EyneSMSy4kLGCenROmxMmtNVQZlR4rmA= +-----END CERTIFICATE----- + +# Issuer: CN=SSL.com TLS ECC Root CA 2022 O=SSL Corporation +# Subject: CN=SSL.com TLS ECC Root CA 2022 O=SSL Corporation +# Label: "SSL.com TLS ECC Root CA 2022" +# Serial: 26605119622390491762507526719404364228 +# MD5 Fingerprint: 99:d7:5c:f1:51:36:cc:e9:ce:d9:19:2e:77:71:56:c5 +# SHA1 Fingerprint: 9f:5f:d9:1a:54:6d:f5:0c:71:f0:ee:7a:bd:17:49:98:84:73:e2:39 +# SHA256 Fingerprint: c3:2f:fd:9f:46:f9:36:d1:6c:36:73:99:09:59:43:4b:9a:d6:0a:af:bb:9e:7c:f3:36:54:f1:44:cc:1b:a1:43 +-----BEGIN CERTIFICATE----- +MIICOjCCAcCgAwIBAgIQFAP1q/s3ixdAW+JDsqXRxDAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxT +U0wuY29tIFRMUyBFQ0MgUm9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzM0OFoXDTQ2 +MDgxOTE2MzM0N1owTjELMAkGA1UEBhMCVVMxGDAWBgNVBAoMD1NTTCBDb3Jwb3Jh +dGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgRUNDIFJvb3QgQ0EgMjAyMjB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABEUpNXP6wrgjzhR9qLFNoFs27iosU8NgCTWyJGYm +acCzldZdkkAZDsalE3D07xJRKF3nzL35PIXBz5SQySvOkkJYWWf9lCcQZIxPBLFN +SeR7T5v15wj4A4j3p8OSSxlUgaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSME +GDAWgBSJjy+j6CugFFR781a4Jl9nOAuc0DAdBgNVHQ4EFgQUiY8vo+groBRUe/NW +uCZfZzgLnNAwDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2gAMGUCMFXjIlbp +15IkWE8elDIPDAI2wv2sdDJO4fscgIijzPvX6yv/N33w7deedWo1dlJF4AIxAMeN +b0Igj762TVntd00pxCAgRWSGOlDGxK0tk/UYfXLtqc/ErFc2KAhl3zx5Zn6g6g== +-----END CERTIFICATE----- + +# Issuer: CN=Atos TrustedRoot Root CA ECC TLS 2021 O=Atos +# Subject: CN=Atos TrustedRoot Root CA ECC TLS 2021 O=Atos +# Label: "Atos TrustedRoot Root CA ECC TLS 2021" +# Serial: 81873346711060652204712539181482831616 +# MD5 Fingerprint: 16:9f:ad:f1:70:ad:79:d6:ed:29:b4:d1:c5:79:70:a8 +# SHA1 Fingerprint: 9e:bc:75:10:42:b3:02:f3:81:f4:f7:30:62:d4:8f:c3:a7:51:b2:dd +# SHA256 Fingerprint: b2:fa:e5:3e:14:cc:d7:ab:92:12:06:47:01:ae:27:9c:1d:89:88:fa:cb:77:5f:a8:a0:08:91:4e:66:39:88:a8 +-----BEGIN CERTIFICATE----- +MIICFTCCAZugAwIBAgIQPZg7pmY9kGP3fiZXOATvADAKBggqhkjOPQQDAzBMMS4w +LAYDVQQDDCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgRUNDIFRMUyAyMDIxMQ0w +CwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0yMTA0MjIwOTI2MjNaFw00MTA0 +MTcwOTI2MjJaMEwxLjAsBgNVBAMMJUF0b3MgVHJ1c3RlZFJvb3QgUm9vdCBDQSBF +Q0MgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYTAkRFMHYwEAYHKoZI +zj0CAQYFK4EEACIDYgAEloZYKDcKZ9Cg3iQZGeHkBQcfl+3oZIK59sRxUM6KDP/X +tXa7oWyTbIOiaG6l2b4siJVBzV3dscqDY4PMwL502eCdpO5KTlbgmClBk1IQ1SQ4 +AjJn8ZQSb+/Xxd4u/RmAo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR2 +KCXWfeBmmnoJsmo7jjPXNtNPojAOBgNVHQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMD +aAAwZQIwW5kp85wxtolrbNa9d+F851F+uDrNozZffPc8dz7kUK2o59JZDCaOMDtu +CCrCp1rIAjEAmeMM56PDr9NJLkaCI2ZdyQAUEv049OGYa3cpetskz2VAv9LcjBHo +9H1/IISpQuQo +-----END CERTIFICATE----- + +# Issuer: CN=Atos TrustedRoot Root CA RSA TLS 2021 O=Atos +# Subject: CN=Atos TrustedRoot Root CA RSA TLS 2021 O=Atos +# Label: "Atos TrustedRoot Root CA RSA TLS 2021" +# Serial: 111436099570196163832749341232207667876 +# MD5 Fingerprint: d4:d3:46:b8:9a:c0:9c:76:5d:9e:3a:c3:b9:99:31:d2 +# SHA1 Fingerprint: 18:52:3b:0d:06:37:e4:d6:3a:df:23:e4:98:fb:5b:16:fb:86:74:48 +# SHA256 Fingerprint: 81:a9:08:8e:a5:9f:b3:64:c5:48:a6:f8:55:59:09:9b:6f:04:05:ef:bf:18:e5:32:4e:c9:f4:57:ba:00:11:2f +-----BEGIN CERTIFICATE----- +MIIFZDCCA0ygAwIBAgIQU9XP5hmTC/srBRLYwiqipDANBgkqhkiG9w0BAQwFADBM +MS4wLAYDVQQDDCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgUlNBIFRMUyAyMDIx +MQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0yMTA0MjIwOTIxMTBaFw00 +MTA0MTcwOTIxMDlaMEwxLjAsBgNVBAMMJUF0b3MgVHJ1c3RlZFJvb3QgUm9vdCBD +QSBSU0EgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYTAkRFMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoAOxHm9BYx9sKOdTSJNy/BBl01Z +4NH+VoyX8te9j2y3I49f1cTYQcvyAh5x5en2XssIKl4w8i1mx4QbZFc4nXUtVsYv +Ye+W/CBGvevUez8/fEc4BKkbqlLfEzfTFRVOvV98r61jx3ncCHvVoOX3W3WsgFWZ +kmGbzSoXfduP9LVq6hdKZChmFSlsAvFr1bqjM9xaZ6cF4r9lthawEO3NUDPJcFDs +GY6wx/J0W2tExn2WuZgIWWbeKQGb9Cpt0xU6kGpn8bRrZtkh68rZYnxGEFzedUln +nkL5/nWpo63/dgpnQOPF943HhZpZnmKaau1Fh5hnstVKPNe0OwANwI8f4UDErmwh +3El+fsqyjW22v5MvoVw+j8rtgI5Y4dtXz4U2OLJxpAmMkokIiEjxQGMYsluMWuPD +0xeqqxmjLBvk1cbiZnrXghmmOxYsL3GHX0WelXOTwkKBIROW1527k2gV+p2kHYzy +geBYBr3JtuP2iV2J+axEoctr+hbxx1A9JNr3w+SH1VbxT5Aw+kUJWdo0zuATHAR8 +ANSbhqRAvNncTFd+rrcztl524WWLZt+NyteYr842mIycg5kDcPOvdO3GDjbnvezB +c6eUWsuSZIKmAMFwoW4sKeFYV+xafJlrJaSQOoD0IJ2azsct+bJLKZWD6TWNp0lI +pw9MGZHQ9b8Q4HECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU +dEmZ0f+0emhFdcN+tNzMzjkz2ggwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +DAUAA4ICAQAjQ1MkYlxt/T7Cz1UAbMVWiLkO3TriJQ2VSpfKgInuKs1l+NsW4AmS +4BjHeJi78+xCUvuppILXTdiK/ORO/auQxDh1MoSf/7OwKwIzNsAQkG8dnK/haZPs +o0UvFJ/1TCplQ3IM98P4lYsU84UgYt1UU90s3BiVaU+DR3BAM1h3Egyi61IxHkzJ +qM7F78PRreBrAwA0JrRUITWXAdxfG/F851X6LWh3e9NpzNMOa7pNdkTWwhWaJuyw +xfW70Xp0wmzNxbVe9kzmWy2B27O3Opee7c9GslA9hGCZcbUztVdF5kJHdWoOsAgM +rr3e97sPWD2PAzHoPYJQyi9eDF20l74gNAf0xBLh7tew2VktafcxBPTy+av5EzH4 +AXcOPUIjJsyacmdRIXrMPIWo6iFqO9taPKU0nprALN+AnCng33eU0aKAQv9qTFsR +0PXNor6uzFFcw9VUewyu1rkGd4Di7wcaaMxZUa1+XGdrudviB0JbuAEFWDlN5LuY +o7Ey7Nmj1m+UI/87tyll5gfp77YZ6ufCOB0yiJA8EytuzO+rdwY0d4RPcuSBhPm5 +dDTedk+SKlOxJTnbPP/lPqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcE +oji2jbDwN/zIIX8/syQbPYtuzE2wFg2WHYMfRsCbvUOZ58SWLs5fyQ== +-----END CERTIFICATE----- + +# Issuer: CN=TrustAsia Global Root CA G3 O=TrustAsia Technologies, Inc. +# Subject: CN=TrustAsia Global Root CA G3 O=TrustAsia Technologies, Inc. +# Label: "TrustAsia Global Root CA G3" +# Serial: 576386314500428537169965010905813481816650257167 +# MD5 Fingerprint: 30:42:1b:b7:bb:81:75:35:e4:16:4f:53:d2:94:de:04 +# SHA1 Fingerprint: 63:cf:b6:c1:27:2b:56:e4:88:8e:1c:23:9a:b6:2e:81:47:24:c3:c7 +# SHA256 Fingerprint: e0:d3:22:6a:eb:11:63:c2:e4:8f:f9:be:3b:50:b4:c6:43:1b:e7:bb:1e:ac:c5:c3:6b:5d:5e:c5:09:03:9a:08 +-----BEGIN CERTIFICATE----- +MIIFpTCCA42gAwIBAgIUZPYOZXdhaqs7tOqFhLuxibhxkw8wDQYJKoZIhvcNAQEM +BQAwWjELMAkGA1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dp +ZXMsIEluYy4xJDAiBgNVBAMMG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHMzAe +Fw0yMTA1MjAwMjEwMTlaFw00NjA1MTkwMjEwMTlaMFoxCzAJBgNVBAYTAkNOMSUw +IwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMSQwIgYDVQQDDBtU +cnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDAMYJhkuSUGwoqZdC+BqmHO1ES6nBBruL7dOoKjbmzTNyPtxNS +T1QY4SxzlZHFZjtqz6xjbYdT8PfxObegQ2OwxANdV6nnRM7EoYNl9lA+sX4WuDqK +AtCWHwDNBSHvBm3dIZwZQ0WhxeiAysKtQGIXBsaqvPPW5vxQfmZCHzyLpnl5hkA1 +nyDvP+uLRx+PjsXUjrYsyUQE49RDdT/VP68czH5GX6zfZBCK70bwkPAPLfSIC7Ep +qq+FqklYqL9joDiR5rPmd2jE+SoZhLsO4fWvieylL1AgdB4SQXMeJNnKziyhWTXA +yB1GJ2Faj/lN03J5Zh6fFZAhLf3ti1ZwA0pJPn9pMRJpxx5cynoTi+jm9WAPzJMs +hH/x/Gr8m0ed262IPfN2dTPXS6TIi/n1Q1hPy8gDVI+lhXgEGvNz8teHHUGf59gX +zhqcD0r83ERoVGjiQTz+LISGNzzNPy+i2+f3VANfWdP3kXjHi3dqFuVJhZBFcnAv +kV34PmVACxmZySYgWmjBNb9Pp1Hx2BErW+Canig7CjoKH8GB5S7wprlppYiU5msT +f9FkPz2ccEblooV7WIQn3MSAPmeamseaMQ4w7OYXQJXZRe0Blqq/DPNL0WP3E1jA +uPP6Z92bfW1K/zJMtSU7/xxnD4UiWQWRkUF3gdCFTIcQcf+eQxuulXUtgQIDAQAB +o2MwYTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEDk5PIj7zjKsK5Xf/Ih +MBY027ySMB0GA1UdDgQWBBRA5OTyI+84yrCuV3/yITAWNNu8kjAOBgNVHQ8BAf8E +BAMCAQYwDQYJKoZIhvcNAQEMBQADggIBACY7UeFNOPMyGLS0XuFlXsSUT9SnYaP4 +wM8zAQLpw6o1D/GUE3d3NZ4tVlFEbuHGLige/9rsR82XRBf34EzC4Xx8MnpmyFq2 +XFNFV1pF1AWZLy4jVe5jaN/TG3inEpQGAHUNcoTpLrxaatXeL1nHo+zSh2bbt1S1 +JKv0Q3jbSwTEb93mPmY+KfJLaHEih6D4sTNjduMNhXJEIlU/HHzp/LgV6FL6qj6j +ITk1dImmasI5+njPtqzn59ZW/yOSLlALqbUHM/Q4X6RJpstlcHboCoWASzY9M/eV +VHUl2qzEc4Jl6VL1XP04lQJqaTDFHApXB64ipCz5xUG3uOyfT0gA+QEEVcys+TIx +xHWVBqB/0Y0n3bOppHKH/lmLmnp0Ft0WpWIp6zqW3IunaFnT63eROfjXy9mPX1on +AX1daBli2MjN9LdyR75bl87yraKZk62Uy5P2EgmVtqvXO9A/EcswFi55gORngS1d +7XB4tmBZrOFdRWOPyN9yaFvqHbgB8X7754qz41SgOAngPN5C8sLtLpvzHzW2Ntjj +gKGLzZlkD8Kqq7HK9W+eQ42EVJmzbsASZthwEPEGNTNDqJwuuhQxzhB/HIbjj9LV ++Hfsm6vxL2PZQl/gZ4FkkfGXL/xuJvYz+NO1+MRiqzFRJQJ6+N1rZdVtTTDIZbpo +FGWsJwt0ivKH +-----END CERTIFICATE----- + +# Issuer: CN=TrustAsia Global Root CA G4 O=TrustAsia Technologies, Inc. +# Subject: CN=TrustAsia Global Root CA G4 O=TrustAsia Technologies, Inc. +# Label: "TrustAsia Global Root CA G4" +# Serial: 451799571007117016466790293371524403291602933463 +# MD5 Fingerprint: 54:dd:b2:d7:5f:d8:3e:ed:7c:e0:0b:2e:cc:ed:eb:eb +# SHA1 Fingerprint: 57:73:a5:61:5d:80:b2:e6:ac:38:82:fc:68:07:31:ac:9f:b5:92:5a +# SHA256 Fingerprint: be:4b:56:cb:50:56:c0:13:6a:52:6d:f4:44:50:8d:aa:36:a0:b5:4f:42:e4:ac:38:f7:2a:f4:70:e4:79:65:4c +-----BEGIN CERTIFICATE----- +MIICVTCCAdygAwIBAgIUTyNkuI6XY57GU4HBdk7LKnQV1tcwCgYIKoZIzj0EAwMw +WjELMAkGA1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMs +IEluYy4xJDAiBgNVBAMMG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHNDAeFw0y +MTA1MjAwMjEwMjJaFw00NjA1MTkwMjEwMjJaMFoxCzAJBgNVBAYTAkNOMSUwIwYD +VQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9naWVzLCBJbmMuMSQwIgYDVQQDDBtUcnVz +dEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATx +s8045CVD5d4ZCbuBeaIVXxVjAd7Cq92zphtnS4CDr5nLrBfbK5bKfFJV4hrhPVbw +LxYI+hW8m7tH5j/uqOFMjPXTNvk4XatwmkcN4oFBButJ+bAp3TPsUKV/eSm4IJij +YzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUpbtKl86zK3+kMd6Xg1mD +pm9xy94wHQYDVR0OBBYEFKW7SpfOsyt/pDHel4NZg6ZvccveMA4GA1UdDwEB/wQE +AwIBBjAKBggqhkjOPQQDAwNnADBkAjBe8usGzEkxn0AAbbd+NvBNEU/zy4k6LHiR +UKNbwMp1JvK/kF0LgoxgKJ/GcJpo5PECMFxYDlZ2z1jD1xCMuo6u47xkdUfFVZDj +/bpV6wfEU6s3qe4hsiFbYI89MvHVI5TWWA== +-----END CERTIFICATE----- + +# Issuer: CN=CommScope Public Trust ECC Root-01 O=CommScope +# Subject: CN=CommScope Public Trust ECC Root-01 O=CommScope +# Label: "CommScope Public Trust ECC Root-01" +# Serial: 385011430473757362783587124273108818652468453534 +# MD5 Fingerprint: 3a:40:a7:fc:03:8c:9c:38:79:2f:3a:a2:6c:b6:0a:16 +# SHA1 Fingerprint: 07:86:c0:d8:dd:8e:c0:80:98:06:98:d0:58:7a:ef:de:a6:cc:a2:5d +# SHA256 Fingerprint: 11:43:7c:da:7b:b4:5e:41:36:5f:45:b3:9a:38:98:6b:0d:e0:0d:ef:34:8e:0c:7b:b0:87:36:33:80:0b:c3:8b +-----BEGIN CERTIFICATE----- +MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29t +bVNjb3BlIFB1YmxpYyBUcnVzdCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNa +Fw00NjA0MjgxNzM1NDJaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2Nv +cGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDEw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16ocNfQj3Rid8NeeqrltqLxeP0C +flfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOcw5tjnSCDPgYLpkJE +hRGnSjot6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggq +hkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg +2NED3W3ROT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liWpDVfG2XqYZpwI7UNo5uS +Um9poIyNStDuiw7LR47QjRE= +-----END CERTIFICATE----- + +# Issuer: CN=CommScope Public Trust ECC Root-02 O=CommScope +# Subject: CN=CommScope Public Trust ECC Root-02 O=CommScope +# Label: "CommScope Public Trust ECC Root-02" +# Serial: 234015080301808452132356021271193974922492992893 +# MD5 Fingerprint: 59:b0:44:d5:65:4d:b8:5c:55:19:92:02:b6:d1:94:b2 +# SHA1 Fingerprint: 3c:3f:ef:57:0f:fe:65:93:86:9e:a0:fe:b0:f6:ed:8e:d1:13:c7:e5 +# SHA256 Fingerprint: 2f:fb:7f:81:3b:bb:b3:c8:9a:b4:e8:16:2d:0f:16:d7:15:09:a8:30:cc:9d:73:c2:62:e5:14:08:75:d1:ad:4a +-----BEGIN CERTIFICATE----- +MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMw +TjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29t +bVNjb3BlIFB1YmxpYyBUcnVzdCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRa +Fw00NjA0MjgxNzQ0NTNaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2Nv +cGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDIw +djAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l63FRD/cHB8o5mXxO1Q/MMDAL +j2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/ubCK1sK9IRQq9qEmU +v4RDsNuESgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggq +hkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9Uj/UQQSugEODZXW5hYA4O9Zv5JOGq4/n +ich/m35rChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs73u1Z/GtMMH9ZzkXpc2AV +mkzw5l4lIhVtwodZ0LKOag== +-----END CERTIFICATE----- + +# Issuer: CN=CommScope Public Trust RSA Root-01 O=CommScope +# Subject: CN=CommScope Public Trust RSA Root-01 O=CommScope +# Label: "CommScope Public Trust RSA Root-01" +# Serial: 354030733275608256394402989253558293562031411421 +# MD5 Fingerprint: 0e:b4:15:bc:87:63:5d:5d:02:73:d4:26:38:68:73:d8 +# SHA1 Fingerprint: 6d:0a:5f:f7:b4:23:06:b4:85:b3:b7:97:64:fc:ac:75:f5:33:f2:93 +# SHA256 Fingerprint: 02:bd:f9:6e:2a:45:dd:9b:f1:8f:c7:e1:db:df:21:a0:37:9b:a3:c9:c2:61:03:44:cf:d8:d6:06:fe:c1:ed:81 +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQEL +BQAwTjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwi +Q29tbVNjb3BlIFB1YmxpYyBUcnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1 +NTRaFw00NjA0MjgxNjQ1NTNaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21t +U2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3Qt +MDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwSGWjDR1C45FtnYSk +YZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2bKOx7dAvnQmtVzslh +suitQDy6uUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBWBB0HW0al +DrJLpA6lfO741GIDuZNqihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3Oj +WiE260f6GBfZumbCk6SP/F2krfxQapWsvCQz0b2If4b19bJzKo98rwjyGpg/qYFl +P8GMicWWMJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/cZip8UlF1y5mO6D1cv547 +KI2DAg+pn3LiLCuz3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTifBSeolz7p +UcZsBSjBAg/pGG3svZwG1KdJ9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/ +kQO9lLvkuI6cMmPNn7togbGEW682v3fuHX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JO +Hg9O5j9ZpSPcPYeoKFgo0fEbNttPxP/hjFtyjMcmAyejOQoBqsCyMWCDIqFPEgkB +Ea801M/XrmLTBQe0MXXgDW1XT2mH+VepuhX2yFJtocucH+X8eKg1mp9BFM6ltM6U +CBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm45P3luG0wDQYJ +KoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6 +NWPxzIHIxgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQ +nmhUQo8mUuJM3y+Xpi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+ +QgvfKNmwrZggvkN80V4aCRckjXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2v +trV0KnahP/t1MJ+UXjulYPPLXAziDslg+MkfFoom3ecnf+slpoq9uC02EJqxWE2a +aE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0DLwAHb/WNyVntHKLr4W96ioD +j8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/xBpMu95yo9GA+o/E4 +Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054A5U+1C0w +lREQKC6/oAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHn +YfkUyq+Dj7+vsQpZXdxc1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVoc +icCMb3SgazNNtQEo/a2tiRc7ppqEvOuM6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw +-----END CERTIFICATE----- + +# Issuer: CN=CommScope Public Trust RSA Root-02 O=CommScope +# Subject: CN=CommScope Public Trust RSA Root-02 O=CommScope +# Label: "CommScope Public Trust RSA Root-02" +# Serial: 480062499834624527752716769107743131258796508494 +# MD5 Fingerprint: e1:29:f9:62:7b:76:e2:96:6d:f3:d4:d7:0f:ae:1f:aa +# SHA1 Fingerprint: ea:b0:e2:52:1b:89:93:4c:11:68:f2:d8:9a:ac:22:4c:a3:8a:57:ae +# SHA256 Fingerprint: ff:e9:43:d7:93:42:4b:4f:7c:44:0c:1c:3d:64:8d:53:63:f3:4b:82:dc:87:aa:7a:9f:11:8f:c5:de:e1:01:f1 +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIUVBa/O345lXGN0aoApYYNK496BU4wDQYJKoZIhvcNAQEL +BQAwTjELMAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwi +Q29tbVNjb3BlIFB1YmxpYyBUcnVzdCBSU0EgUm9vdC0wMjAeFw0yMTA0MjgxNzE2 +NDNaFw00NjA0MjgxNzE2NDJaME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21t +U2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3Qt +MDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDh+g77aAASyE3VrCLE +NQE7xVTlWXZjpX/rwcRqmL0yjReA61260WI9JSMZNRTpf4mnG2I81lDnNJUDMrG0 +kyI9p+Kx7eZ7Ti6Hmw0zdQreqjXnfuU2mKKuJZ6VszKWpCtYHu8//mI0SFHRtI1C +rWDaSWqVcN3SAOLMV2MCe5bdSZdbkk6V0/nLKR8YSvgBKtJjCW4k6YnS5cciTNxz +hkcAqg2Ijq6FfUrpuzNPDlJwnZXjfG2WWy09X6GDRl224yW4fKcZgBzqZUPckXk2 +LHR88mcGyYnJ27/aaL8j7dxrrSiDeS/sOKUNNwFnJ5rpM9kzXzehxfCrPfp4sOcs +n/Y+n2Dg70jpkEUeBVF4GiwSLFworA2iI540jwXmojPOEXcT1A6kHkIfhs1w/tku +FT0du7jyU1fbzMZ0KZwYszZ1OC4PVKH4kh+Jlk+71O6d6Ts2QrUKOyrUZHk2EOH5 +kQMreyBUzQ0ZGshBMjTRsJnhkB4BQDa1t/qp5Xd1pCKBXbCL5CcSD1SIxtuFdOa3 +wNemKfrb3vOTlycEVS8KbzfFPROvCgCpLIscgSjX74Yxqa7ybrjKaixUR9gqiC6v +wQcQeKwRoi9C8DfF8rhW3Q5iLc4tVn5V8qdE9isy9COoR+jUKgF4z2rDN6ieZdIs +5fq6M8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7GxcJXvYXowDQYJ +KoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqB +KCh6krm2qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3 ++VGXu6TwYofF1gbTl4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbyme +APnCKfWxkxlSaRosTKCL4BWaMS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3Nyq +pgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv41xdgSGn2rtO/+YHqP65DSdsu3BaVXoT +6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u5cSoHw2OHG1QAk8mGEPej1WF +sQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FUmrh1CoFSl+NmYWvt +PjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jauwy8CTl2d +lklyALKrdVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670 +v64fG9PiO/yzcnMcmyiQiRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17O +rg3bhzjlP1v9mxnhMUF6cKojawHhRUzNlM47ni3niAIi9G7oyOzWPPO5std3eqx7 +-----END CERTIFICATE----- + +# Issuer: CN=Telekom Security TLS ECC Root 2020 O=Deutsche Telekom Security GmbH +# Subject: CN=Telekom Security TLS ECC Root 2020 O=Deutsche Telekom Security GmbH +# Label: "Telekom Security TLS ECC Root 2020" +# Serial: 72082518505882327255703894282316633856 +# MD5 Fingerprint: c1:ab:fe:6a:10:2c:03:8d:bc:1c:22:32:c0:85:a7:fd +# SHA1 Fingerprint: c0:f8:96:c5:a9:3b:01:06:21:07:da:18:42:48:bc:e9:9d:88:d5:ec +# SHA256 Fingerprint: 57:8a:f4:de:d0:85:3f:4e:59:98:db:4a:ea:f9:cb:ea:8d:94:5f:60:b6:20:a3:8d:1a:3c:13:b2:bc:7b:a8:e1 +-----BEGIN CERTIFICATE----- +MIICQjCCAcmgAwIBAgIQNjqWjMlcsljN0AFdxeVXADAKBggqhkjOPQQDAzBjMQsw +CQYDVQQGEwJERTEnMCUGA1UECgweRGV1dHNjaGUgVGVsZWtvbSBTZWN1cml0eSBH +bWJIMSswKQYDVQQDDCJUZWxla29tIFNlY3VyaXR5IFRMUyBFQ0MgUm9vdCAyMDIw +MB4XDTIwMDgyNTA3NDgyMFoXDTQ1MDgyNTIzNTk1OVowYzELMAkGA1UEBhMCREUx +JzAlBgNVBAoMHkRldXRzY2hlIFRlbGVrb20gU2VjdXJpdHkgR21iSDErMCkGA1UE +AwwiVGVsZWtvbSBTZWN1cml0eSBUTFMgRUNDIFJvb3QgMjAyMDB2MBAGByqGSM49 +AgEGBSuBBAAiA2IABM6//leov9Wq9xCazbzREaK9Z0LMkOsVGJDZos0MKiXrPk/O +tdKPD/M12kOLAoC+b1EkHQ9rK8qfwm9QMuU3ILYg/4gND21Ju9sGpIeQkpT0CdDP +f8iAC8GXs7s1J8nCG6NCMEAwHQYDVR0OBBYEFONyzG6VmUex5rNhTNHLq+O6zd6f +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2cA +MGQCMHVSi7ekEE+uShCLsoRbQuHmKjYC2qBuGT8lv9pZMo7k+5Dck2TOrbRBR2Di +z6fLHgIwN0GMZt9Ba9aDAEH9L1r3ULRn0SyocddDypwnJJGDSA3PzfdUga/sf+Rn +27iQ7t0l +-----END CERTIFICATE----- + +# Issuer: CN=Telekom Security TLS RSA Root 2023 O=Deutsche Telekom Security GmbH +# Subject: CN=Telekom Security TLS RSA Root 2023 O=Deutsche Telekom Security GmbH +# Label: "Telekom Security TLS RSA Root 2023" +# Serial: 44676229530606711399881795178081572759 +# MD5 Fingerprint: bf:5b:eb:54:40:cd:48:71:c4:20:8d:7d:de:0a:42:f2 +# SHA1 Fingerprint: 54:d3:ac:b3:bd:57:56:f6:85:9d:ce:e5:c3:21:e2:d4:ad:83:d0:93 +# SHA256 Fingerprint: ef:c6:5c:ad:bb:59:ad:b6:ef:e8:4d:a2:23:11:b3:56:24:b7:1b:3b:1e:a0:da:8b:66:55:17:4e:c8:97:86:46 +-----BEGIN CERTIFICATE----- +MIIFszCCA5ugAwIBAgIQIZxULej27HF3+k7ow3BXlzANBgkqhkiG9w0BAQwFADBj +MQswCQYDVQQGEwJERTEnMCUGA1UECgweRGV1dHNjaGUgVGVsZWtvbSBTZWN1cml0 +eSBHbWJIMSswKQYDVQQDDCJUZWxla29tIFNlY3VyaXR5IFRMUyBSU0EgUm9vdCAy +MDIzMB4XDTIzMDMyODEyMTY0NVoXDTQ4MDMyNzIzNTk1OVowYzELMAkGA1UEBhMC +REUxJzAlBgNVBAoMHkRldXRzY2hlIFRlbGVrb20gU2VjdXJpdHkgR21iSDErMCkG +A1UEAwwiVGVsZWtvbSBTZWN1cml0eSBUTFMgUlNBIFJvb3QgMjAyMzCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAO01oYGA88tKaVvC+1GDrib94W7zgRJ9 +cUD/h3VCKSHtgVIs3xLBGYSJwb3FKNXVS2xE1kzbB5ZKVXrKNoIENqil/Cf2SfHV +cp6R+SPWcHu79ZvB7JPPGeplfohwoHP89v+1VmLhc2o0mD6CuKyVU/QBoCcHcqMA +U6DksquDOFczJZSfvkgdmOGjup5czQRxUX11eKvzWarE4GC+j4NSuHUaQTXtvPM6 +Y+mpFEXX5lLRbtLevOP1Czvm4MS9Q2QTps70mDdsipWol8hHD/BeEIvnHRz+sTug +BTNoBUGCwQMrAcjnj02r6LX2zWtEtefdi+zqJbQAIldNsLGyMcEWzv/9FIS3R/qy +8XDe24tsNlikfLMR0cN3f1+2JeANxdKz+bi4d9s3cXFH42AYTyS2dTd4uaNir73J +co4vzLuu2+QVUhkHM/tqty1LkCiCc/4YizWN26cEar7qwU02OxY2kTLvtkCJkUPg +8qKrBC7m8kwOFjQgrIfBLX7JZkcXFBGk8/ehJImr2BrIoVyxo/eMbcgByU/J7MT8 +rFEz0ciD0cmfHdRHNCk+y7AO+oMLKFjlKdw/fKifybYKu6boRhYPluV75Gp6SG12 +mAWl3G0eQh5C2hrgUve1g8Aae3g1LDj1H/1Joy7SWWO/gLCMk3PLNaaZlSJhZQNg ++y+TS/qanIA7AgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtqeX +gj10hZv3PJ+TmpV5dVKMbUcwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS2 +p5eCPXSFm/c8n5OalXl1UoxtRzANBgkqhkiG9w0BAQwFAAOCAgEAqMxhpr51nhVQ +pGv7qHBFfLp+sVr8WyP6Cnf4mHGCDG3gXkaqk/QeoMPhk9tLrbKmXauw1GLLXrtm +9S3ul0A8Yute1hTWjOKWi0FpkzXmuZlrYrShF2Y0pmtjxrlO8iLpWA1WQdH6DErw +M807u20hOq6OcrXDSvvpfeWxm4bu4uB9tPcy/SKE8YXJN3nptT+/XOR0so8RYgDd +GGah2XsjX/GO1WfoVNpbOms2b/mBsTNHM3dA+VKq3dSDz4V4mZqTuXNnQkYRIer+ +CqkbGmVps4+uFrb2S1ayLfmlyOw7YqPta9BO1UAJpB+Y1zqlklkg5LB9zVtzaL1t +xKITDmcZuI1CfmwMmm6gJC3VRRvcxAIU/oVbZZfKTpBQCHpCNfnqwmbU+AGuHrS+ +w6jv/naaoqYfRvaE7fzbzsQCzndILIyy7MMAo+wsVRjBfhnu4S/yrYObnqsZ38aK +L4x35bcF7DvB7L6Gs4a8wPfc5+pbrrLMtTWGS9DiP7bY+A4A7l3j941Y/8+LN+lj +X273CXE2whJdV/LItM3z7gLfEdxquVeEHVlNjM7IDiPCtyaaEBRx/pOyiriA8A4Q +ntOoUAw3gi/q4Iqd4Sw5/7W0cwDk90imc6y/st53BIe0o82bNSQ3+pCTE4FCxpgm +dTdmQRCsu/WU48IxK63nI1bMNSWSs1A= +-----END CERTIFICATE----- + +# Issuer: CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA +# Subject: CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA +# Label: "FIRMAPROFESIONAL CA ROOT-A WEB" +# Serial: 65916896770016886708751106294915943533 +# MD5 Fingerprint: 82:b2:ad:45:00:82:b0:66:63:f8:5f:c3:67:4e:ce:a3 +# SHA1 Fingerprint: a8:31:11:74:a6:14:15:0d:ca:77:dd:0e:e4:0c:5d:58:fc:a0:72:a5 +# SHA256 Fingerprint: be:f2:56:da:f2:6e:9c:69:bd:ec:16:02:35:97:98:f3:ca:f7:18:21:a0:3e:01:82:57:c5:3c:65:61:7f:3d:4a +-----BEGIN CERTIFICATE----- +MIICejCCAgCgAwIBAgIQMZch7a+JQn81QYehZ1ZMbTAKBggqhkjOPQQDAzBuMQsw +CQYDVQQGEwJFUzEcMBoGA1UECgwTRmlybWFwcm9mZXNpb25hbCBTQTEYMBYGA1UE +YQwPVkFURVMtQTYyNjM0MDY4MScwJQYDVQQDDB5GSVJNQVBST0ZFU0lPTkFMIENB +IFJPT1QtQSBXRUIwHhcNMjIwNDA2MDkwMTM2WhcNNDcwMzMxMDkwMTM2WjBuMQsw +CQYDVQQGEwJFUzEcMBoGA1UECgwTRmlybWFwcm9mZXNpb25hbCBTQTEYMBYGA1UE +YQwPVkFURVMtQTYyNjM0MDY4MScwJQYDVQQDDB5GSVJNQVBST0ZFU0lPTkFMIENB +IFJPT1QtQSBXRUIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARHU+osEaR3xyrq89Zf +e9MEkVz6iMYiuYMQYneEMy3pA4jU4DP37XcsSmDq5G+tbbT4TIqk5B/K6k84Si6C +cyvHZpsKjECcfIr28jlgst7L7Ljkb+qbXbdTkBgyVcUgt5SjYzBhMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAUk+FDY1w8ndYn81LsF7Kpryz3dvgwHQYDVR0O +BBYEFJPhQ2NcPJ3WJ/NS7Beyqa8s93b4MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO +PQQDAwNoADBlAjAdfKR7w4l1M+E7qUW/Runpod3JIha3RxEL2Jq68cgLcFBTApFw +hVmpHqTm6iMxoAACMQD94vizrxa5HnPEluPBMBnYfubDl94cT7iJLzPrSA8Z94dG +XSaQpYXFuXqUPoeovQA= +-----END CERTIFICATE----- + +# Issuer: CN=TWCA CYBER Root CA O=TAIWAN-CA OU=Root CA +# Subject: CN=TWCA CYBER Root CA O=TAIWAN-CA OU=Root CA +# Label: "TWCA CYBER Root CA" +# Serial: 85076849864375384482682434040119489222 +# MD5 Fingerprint: 0b:33:a0:97:52:95:d4:a9:fd:bb:db:6e:a3:55:5b:51 +# SHA1 Fingerprint: f6:b1:1c:1a:83:38:e9:7b:db:b3:a8:c8:33:24:e0:2d:9c:7f:26:66 +# SHA256 Fingerprint: 3f:63:bb:28:14:be:17:4e:c8:b6:43:9c:f0:8d:6d:56:f0:b7:c4:05:88:3a:56:48:a3:34:42:4d:6b:3e:c5:58 +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIQQAE0jMIAAAAAAAAAATzyxjANBgkqhkiG9w0BAQwFADBQ +MQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FOLUNBMRAwDgYDVQQLEwdSb290 +IENBMRswGQYDVQQDExJUV0NBIENZQkVSIFJvb3QgQ0EwHhcNMjIxMTIyMDY1NDI5 +WhcNNDcxMTIyMTU1OTU5WjBQMQswCQYDVQQGEwJUVzESMBAGA1UEChMJVEFJV0FO +LUNBMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJUV0NBIENZQkVSIFJvb3Qg +Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDG+Moe2Qkgfh1sTs6P +40czRJzHyWmqOlt47nDSkvgEs1JSHWdyKKHfi12VCv7qze33Kc7wb3+szT3vsxxF +avcokPFhV8UMxKNQXd7UtcsZyoC5dc4pztKFIuwCY8xEMCDa6pFbVuYdHNWdZsc/ +34bKS1PE2Y2yHer43CdTo0fhYcx9tbD47nORxc5zb87uEB8aBs/pJ2DFTxnk684i +JkXXYJndzk834H/nY62wuFm40AZoNWDTNq5xQwTxaWV4fPMf88oon1oglWa0zbfu +j3ikRRjpJi+NmykosaS3Om251Bw4ckVYsV7r8Cibt4LK/c/WMw+f+5eesRycnupf +Xtuq3VTpMCEobY5583WSjCb+3MX2w7DfRFlDo7YDKPYIMKoNM+HvnKkHIuNZW0CP +2oi3aQiotyMuRAlZN1vH4xfyIutuOVLF3lSnmMlLIJXcRolftBL5hSmO68gnFSDA +S9TMfAxsNAwmmyYxpjyn9tnQS6Jk/zuZQXLB4HCX8SS7K8R0IrGsayIyJNN4KsDA +oS/xUgXJP+92ZuJF2A09rZXIx4kmyA+upwMu+8Ff+iDhcK2wZSA3M2Cw1a/XDBzC +kHDXShi8fgGwsOsVHkQGzaRP6AzRwyAQ4VRlnrZR0Bp2a0JaWHY06rc3Ga4udfmW +5cFZ95RXKSWNOkyrTZpB0F8mAwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSdhWEUfMFib5do5E83QOGt4A1WNzAd +BgNVHQ4EFgQUnYVhFHzBYm+XaORPN0DhreANVjcwDQYJKoZIhvcNAQEMBQADggIB +AGSPesRiDrWIzLjHhg6hShbNcAu3p4ULs3a2D6f/CIsLJc+o1IN1KriWiLb73y0t +tGlTITVX1olNc79pj3CjYcya2x6a4CD4bLubIp1dhDGaLIrdaqHXKGnK/nZVekZn +68xDiBaiA9a5F/gZbG0jAn/xX9AKKSM70aoK7akXJlQKTcKlTfjF/biBzysseKNn +TKkHmvPfXvt89YnNdJdhEGoHK4Fa0o635yDRIG4kqIQnoVesqlVYL9zZyvpoBJ7t +RCT5dEA7IzOrg1oYJkK2bVS1FmAwbLGg+LhBoF1JSdJlBTrq/p1hvIbZv97Tujqx +f36SNI7JAG7cmL3c7IAFrQI932XtCwP39xaEBDG6k5TY8hL4iuO/Qq+n1M0RFxbI +Qh0UqEL20kCGoE8jypZFVmAGzbdVAaYBlGX+bgUJurSkquLvWL69J1bY73NxW0Qz +8ppy6rBePm6pUlvscG21h483XjyMnM7k8M4MZ0HMzvaAq07MTFb1wWFZk7Q+ptq4 +NxKfKjLji7gh7MMrZQzvIt6IKTtM1/r+t+FHvpw+PoP7UV31aPcuIYXcv/Fa4nzX +xeSDwWrruoBa3lwtcHb4yOWHh8qgnaHlIhInD0Q9HWzq1MKLL295q39QpsQZp6F6 +t5b5wR9iWqJDB0BeJsas7a5wFsWqynKKTbDPAYsDP27X +-----END CERTIFICATE----- + +# Issuer: CN=SecureSign Root CA12 O=Cybertrust Japan Co., Ltd. +# Subject: CN=SecureSign Root CA12 O=Cybertrust Japan Co., Ltd. +# Label: "SecureSign Root CA12" +# Serial: 587887345431707215246142177076162061960426065942 +# MD5 Fingerprint: c6:89:ca:64:42:9b:62:08:49:0b:1e:7f:e9:07:3d:e8 +# SHA1 Fingerprint: 7a:22:1e:3d:de:1b:06:ac:9e:c8:47:70:16:8e:3c:e5:f7:6b:06:f4 +# SHA256 Fingerprint: 3f:03:4b:b5:70:4d:44:b2:d0:85:45:a0:20:57:de:93:eb:f3:90:5f:ce:72:1a:cb:c7:30:c0:6d:da:ee:90:4e +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUZvnHwa/swlG07VOX5uaCwysckBYwDQYJKoZIhvcNAQEL +BQAwUTELMAkGA1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28u +LCBMdGQuMR0wGwYDVQQDExRTZWN1cmVTaWduIFJvb3QgQ0ExMjAeFw0yMDA0MDgw +NTM2NDZaFw00MDA0MDgwNTM2NDZaMFExCzAJBgNVBAYTAkpQMSMwIQYDVQQKExpD +eWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMUU2VjdXJlU2lnbiBS +b290IENBMTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6OcE3emhF +KxS06+QT61d1I02PJC0W6K6OyX2kVzsqdiUzg2zqMoqUm048luT9Ub+ZyZN+v/mt +p7JIKwccJ/VMvHASd6SFVLX9kHrko+RRWAPNEHl57muTH2SOa2SroxPjcf59q5zd +J1M3s6oYwlkm7Fsf0uZlfO+TvdhYXAvA42VvPMfKWeP+bl+sg779XSVOKik71gur +FzJ4pOE+lEa+Ym6b3kaosRbnhW70CEBFEaCeVESE99g2zvVQR9wsMJvuwPWW0v4J +hscGWa5Pro4RmHvzC1KqYiaqId+OJTN5lxZJjfU+1UefNzFJM3IFTQy2VYzxV4+K +h9GtxRESOaCtAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD +AgEGMB0GA1UdDgQWBBRXNPN0zwRL1SXm8UC2LEzZLemgrTANBgkqhkiG9w0BAQsF +AAOCAQEAPrvbFxbS8hQBICw4g0utvsqFepq2m2um4fylOqyttCg6r9cBg0krY6Ld +mmQOmFxv3Y67ilQiLUoT865AQ9tPkbeGGuwAtEGBpE/6aouIs3YIcipJQMPTw4WJ +mBClnW8Zt7vPemVV2zfrPIpyMpcemik+rY3moxtt9XUa5rBouVui7mlHJzWhhpmA +8zNL4WukJsPvdFlseqJkth5Ew1DgDzk9qTPxpfPSvWKErI4cqc1avTc7bgoitPQV +55FYxTpE05Uo2cBl6XLK0A+9H7MV2anjpEcJnuDLN/v9vZfVvhgaaaI5gdka9at/ +yOPiZwud9AzqVN/Ssq+xIvEg37xEHA== +-----END CERTIFICATE----- + +# Issuer: CN=SecureSign Root CA14 O=Cybertrust Japan Co., Ltd. +# Subject: CN=SecureSign Root CA14 O=Cybertrust Japan Co., Ltd. +# Label: "SecureSign Root CA14" +# Serial: 575790784512929437950770173562378038616896959179 +# MD5 Fingerprint: 71:0d:72:fa:92:19:65:5e:89:04:ac:16:33:f0:bc:d5 +# SHA1 Fingerprint: dd:50:c0:f7:79:b3:64:2e:74:a2:b8:9d:9f:d3:40:dd:bb:f0:f2:4f +# SHA256 Fingerprint: 4b:00:9c:10:34:49:4f:9a:b5:6b:ba:3b:a1:d6:27:31:fc:4d:20:d8:95:5a:dc:ec:10:a9:25:60:72:61:e3:38 +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIUZNtaDCBO6Ncpd8hQJ6JaJ90t8sswDQYJKoZIhvcNAQEM +BQAwUTELMAkGA1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28u +LCBMdGQuMR0wGwYDVQQDExRTZWN1cmVTaWduIFJvb3QgQ0ExNDAeFw0yMDA0MDgw +NzA2MTlaFw00NTA0MDgwNzA2MTlaMFExCzAJBgNVBAYTAkpQMSMwIQYDVQQKExpD +eWJlcnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMUU2VjdXJlU2lnbiBS +b290IENBMTQwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDF0nqh1oq/ +FjHQmNE6lPxauG4iwWL3pwon71D2LrGeaBLwbCRjOfHw3xDG3rdSINVSW0KZnvOg +vlIfX8xnbacuUKLBl422+JX1sLrcneC+y9/3OPJH9aaakpUqYllQC6KxNedlsmGy +6pJxaeQp8E+BgQQ8sqVb1MWoWWd7VRxJq3qdwudzTe/NCcLEVxLbAQ4jeQkHO6Lo +/IrPj8BGJJw4J+CDnRugv3gVEOuGTgpa/d/aLIJ+7sr2KeH6caH3iGicnPCNvg9J +kdjqOvn90Ghx2+m1K06Ckm9mH+Dw3EzsytHqunQG+bOEkJTRX45zGRBdAuVwpcAQ +0BB8b8VYSbSwbprafZX1zNoCr7gsfXmPvkPx+SgojQlD+Ajda8iLLCSxjVIHvXib +y8posqTdDEx5YMaZ0ZPxMBoH064iwurO8YQJzOAUbn8/ftKChazcqRZOhaBgy/ac +18izju3Gm5h1DVXoX+WViwKkrkMpKBGk5hIwAUt1ax5mnXkvpXYvHUC0bcl9eQjs +0Wq2XSqypWa9a4X0dFbD9ed1Uigspf9mR6XU/v6eVL9lfgHWMI+lNpyiUBzuOIAB +SMbHdPTGrMNASRZhdCyvjG817XsYAFs2PJxQDcqSMxDxJklt33UkN4Ii1+iW/RVL +ApY+B3KVfqs9TC7XyvDf4Fg/LS8EmjijAQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUBpOjCl4oaTeqYR3r6/wtbyPk +86AwDQYJKoZIhvcNAQEMBQADggIBAJaAcgkGfpzMkwQWu6A6jZJOtxEaCnFxEM0E +rX+lRVAQZk5KQaID2RFPeje5S+LGjzJmdSX7684/AykmjbgWHfYfM25I5uj4V7Ib +ed87hwriZLoAymzvftAj63iP/2SbNDefNWWipAA9EiOWWF3KY4fGoweITedpdopT +zfFP7ELyk+OZpDc8h7hi2/DsHzc/N19DzFGdtfCXwreFamgLRB7lUe6TzktuhsHS +DCRZNhqfLJGP4xjblJUK7ZGqDpncllPjYYPGFrojutzdfhrGe0K22VoF3Jpf1d+4 +2kd92jjbrDnVHmtsKheMYc2xbXIBw8MgAGJoFjHVdqqGuw6qnsb58Nn4DSEC5MUo +FlkRudlpcyqSeLiSV5sI8jrlL5WwWLdrIBRtFO8KvH7YVdiI2i/6GaX7i+B/OfVy +K4XELKzvGUWSTLNhB9xNH27SgRNcmvMSZ4PPmz+Ln52kuaiWA3rF7iDeM9ovnhp6 +dB7h7sxaOgTdsxoEqBRjrLdHEoOabPXm6RUVkRqEGQ6UROcSjiVbgGcZ3GOTEAtl +Lor6CZpO2oYofaphNdgOpygau1LgePhsumywbrmHXumZNTfxPWQrqaA0k89jL9WB +365jJ6UeTo3cKXhZ+PmhIIynJkBugnLNeLLIjzwec+fBH7/PzqUqm9tEZDKgu39c +JRNItX+S +-----END CERTIFICATE----- + +# Issuer: CN=SecureSign Root CA15 O=Cybertrust Japan Co., Ltd. +# Subject: CN=SecureSign Root CA15 O=Cybertrust Japan Co., Ltd. +# Label: "SecureSign Root CA15" +# Serial: 126083514594751269499665114766174399806381178503 +# MD5 Fingerprint: 13:30:fc:c4:62:a6:a9:de:b5:c1:68:af:b5:d2:31:47 +# SHA1 Fingerprint: cb:ba:83:c8:c1:5a:5d:f1:f9:73:6f:ca:d7:ef:28:13:06:4a:07:7d +# SHA256 Fingerprint: e7:78:f0:f0:95:fe:84:37:29:cd:1a:00:82:17:9e:53:14:a9:c2:91:44:28:05:e1:fb:1d:8f:b6:b8:88:6c:3a +-----BEGIN CERTIFICATE----- +MIICIzCCAamgAwIBAgIUFhXHw9hJp75pDIqI7fBw+d23PocwCgYIKoZIzj0EAwMw +UTELMAkGA1UEBhMCSlAxIzAhBgNVBAoTGkN5YmVydHJ1c3QgSmFwYW4gQ28uLCBM +dGQuMR0wGwYDVQQDExRTZWN1cmVTaWduIFJvb3QgQ0ExNTAeFw0yMDA0MDgwODMy +NTZaFw00NTA0MDgwODMyNTZaMFExCzAJBgNVBAYTAkpQMSMwIQYDVQQKExpDeWJl +cnRydXN0IEphcGFuIENvLiwgTHRkLjEdMBsGA1UEAxMUU2VjdXJlU2lnbiBSb290 +IENBMTUwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQLUHSNZDKZmbPSYAi4Io5GdCx4 +wCtELW1fHcmuS1Iggz24FG1Th2CeX2yF2wYUleDHKP+dX+Sq8bOLbe1PL0vJSpSR +ZHX+AezB2Ot6lHhWGENfa4HL9rzatAy2KZMIaY+jQjBAMA8GA1UdEwEB/wQFMAMB +Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTrQciu/NWeUUj1vYv0hyCTQSvT +9DAKBggqhkjOPQQDAwNoADBlAjEA2S6Jfl5OpBEHvVnCB96rMjhTKkZEBhd6zlHp +4P9mLQlO4E/0BdGF9jVg3PVys0Z9AjBEmEYagoUeYWmJSwdLZrWeqrqgHkHZAXQ6 +bkU6iYAZezKYVWOr62Nuk22rGwlgMU4= +-----END CERTIFICATE----- diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/core.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/core.py new file mode 100644 index 0000000000000000000000000000000000000000..70e0c3bdbd2efcbd5576c03d96597aa5e8f8a52c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/core.py @@ -0,0 +1,114 @@ +""" +certifi.py +~~~~~~~~~~ + +This module returns the installation location of cacert.pem or its contents. +""" +import sys +import atexit + +def exit_cacert_ctx() -> None: + _CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr] + + +if sys.version_info >= (3, 11): + + from importlib.resources import as_file, files + + _CACERT_CTX = None + _CACERT_PATH = None + + def where() -> str: + # This is slightly terrible, but we want to delay extracting the file + # in cases where we're inside of a zipimport situation until someone + # actually calls where(), but we don't want to re-extract the file + # on every call of where(), so we'll do it once then store it in a + # global variable. + global _CACERT_CTX + global _CACERT_PATH + if _CACERT_PATH is None: + # This is slightly janky, the importlib.resources API wants you to + # manage the cleanup of this file, so it doesn't actually return a + # path, it returns a context manager that will give you the path + # when you enter it and will do any cleanup when you leave it. In + # the common case of not needing a temporary file, it will just + # return the file system location and the __exit__() is a no-op. + # + # We also have to hold onto the actual context manager, because + # it will do the cleanup whenever it gets garbage collected, so + # we will also store that at the global level as well. + _CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem")) + _CACERT_PATH = str(_CACERT_CTX.__enter__()) + atexit.register(exit_cacert_ctx) + + return _CACERT_PATH + + def contents() -> str: + return files("pip._vendor.certifi").joinpath("cacert.pem").read_text(encoding="ascii") + +elif sys.version_info >= (3, 7): + + from importlib.resources import path as get_path, read_text + + _CACERT_CTX = None + _CACERT_PATH = None + + def where() -> str: + # This is slightly terrible, but we want to delay extracting the + # file in cases where we're inside of a zipimport situation until + # someone actually calls where(), but we don't want to re-extract + # the file on every call of where(), so we'll do it once then store + # it in a global variable. + global _CACERT_CTX + global _CACERT_PATH + if _CACERT_PATH is None: + # This is slightly janky, the importlib.resources API wants you + # to manage the cleanup of this file, so it doesn't actually + # return a path, it returns a context manager that will give + # you the path when you enter it and will do any cleanup when + # you leave it. In the common case of not needing a temporary + # file, it will just return the file system location and the + # __exit__() is a no-op. + # + # We also have to hold onto the actual context manager, because + # it will do the cleanup whenever it gets garbage collected, so + # we will also store that at the global level as well. + _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem") + _CACERT_PATH = str(_CACERT_CTX.__enter__()) + atexit.register(exit_cacert_ctx) + + return _CACERT_PATH + + def contents() -> str: + return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") + +else: + import os + import types + from typing import Union + + Package = Union[types.ModuleType, str] + Resource = Union[str, "os.PathLike"] + + # This fallback will work for Python versions prior to 3.7 that lack the + # importlib.resources module but relies on the existing `where` function + # so won't address issues with environments like PyOxidizer that don't set + # __file__ on modules. + def read_text( + package: Package, + resource: Resource, + encoding: str = 'utf-8', + errors: str = 'strict' + ) -> str: + with open(where(), encoding=encoding) as data: + return data.read() + + # If we don't have importlib.resources, then we will just do the old logic + # of assuming we're on the filesystem and munge the path directly. + def where() -> str: + f = os.path.dirname(__file__) + + return os.path.join(f, "cacert.pem") + + def contents() -> str: + return read_text("pip._vendor.certifi", "cacert.pem", encoding="ascii") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/certifi/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bf0d6c6d30e3747ae08789e6c94d31d009f4bbf2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2023 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +import logging + +__version__ = '0.3.9' + + +class DistlibException(Exception): + pass + + +try: + from logging import NullHandler +except ImportError: # pragma: no cover + + class NullHandler(logging.Handler): + + def handle(self, record): + pass + + def emit(self, record): + pass + + def createLock(self): + self.lock = None + + +logger = logging.getLogger(__name__) +logger.addHandler(NullHandler()) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d140a4cb4d24a7eeafc27ff9bf8eac2e63d4857a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca0816938221841c21208540eb80ed466d1532d2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51555f2d0c7df42b325fde801b7b1227148c8263 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9e8274d0385515fe5a84a26ffc28da618ae9472 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba606935c9297828422fb1d534663ace608f8d7f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..630ffe94c401279e60ee7bfb065905a3ee69e094 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..490daa96d6b75a06f8316d0c3ef6a39444bcfded Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3dacb88e713cee9dd7772e25b8d5e3883cdfd91b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ac7887f647bda06527b7766132fb1f329023d2c2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e013988abf4c37f78ad1a42bfc71c687828665e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9dbe640a9c24905f9b904599fc34711f6d2be800 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cfd5a786df3d2350947fa2fdb02ea359f09b42e0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30b2e0e72ed07e11c1568793bb35540a04c9ce63 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py new file mode 100644 index 0000000000000000000000000000000000000000..ca561dd2e37d623caa303f5564425bce657a35e7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py @@ -0,0 +1,1137 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2013-2017 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +from __future__ import absolute_import + +import os +import re +import shutil +import sys + +try: + import ssl +except ImportError: # pragma: no cover + ssl = None + +if sys.version_info[0] < 3: # pragma: no cover + from StringIO import StringIO + string_types = basestring, + text_type = unicode + from types import FileType as file_type + import __builtin__ as builtins + import ConfigParser as configparser + from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit + from urllib import (urlretrieve, quote as _quote, unquote, url2pathname, + pathname2url, ContentTooShortError, splittype) + + def quote(s): + if isinstance(s, unicode): + s = s.encode('utf-8') + return _quote(s) + + import urllib2 + from urllib2 import (Request, urlopen, URLError, HTTPError, + HTTPBasicAuthHandler, HTTPPasswordMgr, HTTPHandler, + HTTPRedirectHandler, build_opener) + if ssl: + from urllib2 import HTTPSHandler + import httplib + import xmlrpclib + import Queue as queue + from HTMLParser import HTMLParser + import htmlentitydefs + raw_input = raw_input + from itertools import ifilter as filter + from itertools import ifilterfalse as filterfalse + + # Leaving this around for now, in case it needs resurrecting in some way + # _userprog = None + # def splituser(host): + # """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" + # global _userprog + # if _userprog is None: + # import re + # _userprog = re.compile('^(.*)@(.*)$') + + # match = _userprog.match(host) + # if match: return match.group(1, 2) + # return None, host + +else: # pragma: no cover + from io import StringIO + string_types = str, + text_type = str + from io import TextIOWrapper as file_type + import builtins + import configparser + from urllib.parse import (urlparse, urlunparse, urljoin, quote, unquote, + urlsplit, urlunsplit, splittype) + from urllib.request import (urlopen, urlretrieve, Request, url2pathname, + pathname2url, HTTPBasicAuthHandler, + HTTPPasswordMgr, HTTPHandler, + HTTPRedirectHandler, build_opener) + if ssl: + from urllib.request import HTTPSHandler + from urllib.error import HTTPError, URLError, ContentTooShortError + import http.client as httplib + import urllib.request as urllib2 + import xmlrpc.client as xmlrpclib + import queue + from html.parser import HTMLParser + import html.entities as htmlentitydefs + raw_input = input + from itertools import filterfalse + filter = filter + +try: + from ssl import match_hostname, CertificateError +except ImportError: # pragma: no cover + + class CertificateError(ValueError): + pass + + def _dnsname_match(dn, hostname, max_wildcards=1): + """Matching according to RFC 6125, section 6.4.3 + + http://tools.ietf.org/html/rfc6125#section-6.4.3 + """ + pats = [] + if not dn: + return False + + parts = dn.split('.') + leftmost, remainder = parts[0], parts[1:] + + wildcards = leftmost.count('*') + if wildcards > max_wildcards: + # Issue #17980: avoid denials of service by refusing more + # than one wildcard per fragment. A survey of established + # policy among SSL implementations showed it to be a + # reasonable choice. + raise CertificateError( + "too many wildcards in certificate DNS name: " + repr(dn)) + + # speed up common case w/o wildcards + if not wildcards: + return dn.lower() == hostname.lower() + + # RFC 6125, section 6.4.3, subitem 1. + # The client SHOULD NOT attempt to match a presented identifier in which + # the wildcard character comprises a label other than the left-most label. + if leftmost == '*': + # When '*' is a fragment by itself, it matches a non-empty dotless + # fragment. + pats.append('[^.]+') + elif leftmost.startswith('xn--') or hostname.startswith('xn--'): + # RFC 6125, section 6.4.3, subitem 3. + # The client SHOULD NOT attempt to match a presented identifier + # where the wildcard character is embedded within an A-label or + # U-label of an internationalized domain name. + pats.append(re.escape(leftmost)) + else: + # Otherwise, '*' matches any dotless string, e.g. www* + pats.append(re.escape(leftmost).replace(r'\*', '[^.]*')) + + # add the remaining fragments, ignore any wildcards + for frag in remainder: + pats.append(re.escape(frag)) + + pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) + return pat.match(hostname) + + def match_hostname(cert, hostname): + """Verify that *cert* (in decoded format as returned by + SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125 + rules are followed, but IP addresses are not accepted for *hostname*. + + CertificateError is raised on failure. On success, the function + returns nothing. + """ + if not cert: + raise ValueError("empty or no certificate, match_hostname needs a " + "SSL socket or SSL context with either " + "CERT_OPTIONAL or CERT_REQUIRED") + dnsnames = [] + san = cert.get('subjectAltName', ()) + for key, value in san: + if key == 'DNS': + if _dnsname_match(value, hostname): + return + dnsnames.append(value) + if not dnsnames: + # The subject is only checked when there is no dNSName entry + # in subjectAltName + for sub in cert.get('subject', ()): + for key, value in sub: + # XXX according to RFC 2818, the most specific Common Name + # must be used. + if key == 'commonName': + if _dnsname_match(value, hostname): + return + dnsnames.append(value) + if len(dnsnames) > 1: + raise CertificateError("hostname %r " + "doesn't match either of %s" % + (hostname, ', '.join(map(repr, dnsnames)))) + elif len(dnsnames) == 1: + raise CertificateError("hostname %r " + "doesn't match %r" % + (hostname, dnsnames[0])) + else: + raise CertificateError("no appropriate commonName or " + "subjectAltName fields were found") + + +try: + from types import SimpleNamespace as Container +except ImportError: # pragma: no cover + + class Container(object): + """ + A generic container for when multiple values need to be returned + """ + + def __init__(self, **kwargs): + self.__dict__.update(kwargs) + + +try: + from shutil import which +except ImportError: # pragma: no cover + # Implementation from Python 3.3 + def which(cmd, mode=os.F_OK | os.X_OK, path=None): + """Given a command, mode, and a PATH string, return the path which + conforms to the given mode on the PATH, or None if there is no such + file. + + `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result + of os.environ.get("PATH"), or can be overridden with a custom search + path. + + """ + + # Check that a given file can be accessed with the correct mode. + # Additionally check that `file` is not a directory, as on Windows + # directories pass the os.access check. + def _access_check(fn, mode): + return (os.path.exists(fn) and os.access(fn, mode) and not os.path.isdir(fn)) + + # If we're given a path with a directory part, look it up directly rather + # than referring to PATH directories. This includes checking relative to the + # current directory, e.g. ./script + if os.path.dirname(cmd): + if _access_check(cmd, mode): + return cmd + return None + + if path is None: + path = os.environ.get("PATH", os.defpath) + if not path: + return None + path = path.split(os.pathsep) + + if sys.platform == "win32": + # The current directory takes precedence on Windows. + if os.curdir not in path: + path.insert(0, os.curdir) + + # PATHEXT is necessary to check on Windows. + pathext = os.environ.get("PATHEXT", "").split(os.pathsep) + # See if the given file matches any of the expected path extensions. + # This will allow us to short circuit when given "python.exe". + # If it does match, only test that one, otherwise we have to try + # others. + if any(cmd.lower().endswith(ext.lower()) for ext in pathext): + files = [cmd] + else: + files = [cmd + ext for ext in pathext] + else: + # On other platforms you don't have things like PATHEXT to tell you + # what file suffixes are executable, so just pass on cmd as-is. + files = [cmd] + + seen = set() + for dir in path: + normdir = os.path.normcase(dir) + if normdir not in seen: + seen.add(normdir) + for thefile in files: + name = os.path.join(dir, thefile) + if _access_check(name, mode): + return name + return None + + +# ZipFile is a context manager in 2.7, but not in 2.6 + +from zipfile import ZipFile as BaseZipFile + +if hasattr(BaseZipFile, '__enter__'): # pragma: no cover + ZipFile = BaseZipFile +else: # pragma: no cover + from zipfile import ZipExtFile as BaseZipExtFile + + class ZipExtFile(BaseZipExtFile): + + def __init__(self, base): + self.__dict__.update(base.__dict__) + + def __enter__(self): + return self + + def __exit__(self, *exc_info): + self.close() + # return None, so if an exception occurred, it will propagate + + class ZipFile(BaseZipFile): + + def __enter__(self): + return self + + def __exit__(self, *exc_info): + self.close() + # return None, so if an exception occurred, it will propagate + + def open(self, *args, **kwargs): + base = BaseZipFile.open(self, *args, **kwargs) + return ZipExtFile(base) + + +try: + from platform import python_implementation +except ImportError: # pragma: no cover + + def python_implementation(): + """Return a string identifying the Python implementation.""" + if 'PyPy' in sys.version: + return 'PyPy' + if os.name == 'java': + return 'Jython' + if sys.version.startswith('IronPython'): + return 'IronPython' + return 'CPython' + + +import sysconfig + +try: + callable = callable +except NameError: # pragma: no cover + from collections.abc import Callable + + def callable(obj): + return isinstance(obj, Callable) + + +try: + fsencode = os.fsencode + fsdecode = os.fsdecode +except AttributeError: # pragma: no cover + # Issue #99: on some systems (e.g. containerised), + # sys.getfilesystemencoding() returns None, and we need a real value, + # so fall back to utf-8. From the CPython 2.7 docs relating to Unix and + # sys.getfilesystemencoding(): the return value is "the user’s preference + # according to the result of nl_langinfo(CODESET), or None if the + # nl_langinfo(CODESET) failed." + _fsencoding = sys.getfilesystemencoding() or 'utf-8' + if _fsencoding == 'mbcs': + _fserrors = 'strict' + else: + _fserrors = 'surrogateescape' + + def fsencode(filename): + if isinstance(filename, bytes): + return filename + elif isinstance(filename, text_type): + return filename.encode(_fsencoding, _fserrors) + else: + raise TypeError("expect bytes or str, not %s" % + type(filename).__name__) + + def fsdecode(filename): + if isinstance(filename, text_type): + return filename + elif isinstance(filename, bytes): + return filename.decode(_fsencoding, _fserrors) + else: + raise TypeError("expect bytes or str, not %s" % + type(filename).__name__) + + +try: + from tokenize import detect_encoding +except ImportError: # pragma: no cover + from codecs import BOM_UTF8, lookup + + cookie_re = re.compile(r"coding[:=]\s*([-\w.]+)") + + def _get_normal_name(orig_enc): + """Imitates get_normal_name in tokenizer.c.""" + # Only care about the first 12 characters. + enc = orig_enc[:12].lower().replace("_", "-") + if enc == "utf-8" or enc.startswith("utf-8-"): + return "utf-8" + if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \ + enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")): + return "iso-8859-1" + return orig_enc + + def detect_encoding(readline): + """ + The detect_encoding() function is used to detect the encoding that should + be used to decode a Python source file. It requires one argument, readline, + in the same way as the tokenize() generator. + + It will call readline a maximum of twice, and return the encoding used + (as a string) and a list of any lines (left as bytes) it has read in. + + It detects the encoding from the presence of a utf-8 bom or an encoding + cookie as specified in pep-0263. If both a bom and a cookie are present, + but disagree, a SyntaxError will be raised. If the encoding cookie is an + invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, + 'utf-8-sig' is returned. + + If no encoding is specified, then the default of 'utf-8' will be returned. + """ + try: + filename = readline.__self__.name + except AttributeError: + filename = None + bom_found = False + encoding = None + default = 'utf-8' + + def read_or_stop(): + try: + return readline() + except StopIteration: + return b'' + + def find_cookie(line): + try: + # Decode as UTF-8. Either the line is an encoding declaration, + # in which case it should be pure ASCII, or it must be UTF-8 + # per default encoding. + line_string = line.decode('utf-8') + except UnicodeDecodeError: + msg = "invalid or missing encoding declaration" + if filename is not None: + msg = '{} for {!r}'.format(msg, filename) + raise SyntaxError(msg) + + matches = cookie_re.findall(line_string) + if not matches: + return None + encoding = _get_normal_name(matches[0]) + try: + codec = lookup(encoding) + except LookupError: + # This behaviour mimics the Python interpreter + if filename is None: + msg = "unknown encoding: " + encoding + else: + msg = "unknown encoding for {!r}: {}".format( + filename, encoding) + raise SyntaxError(msg) + + if bom_found: + if codec.name != 'utf-8': + # This behaviour mimics the Python interpreter + if filename is None: + msg = 'encoding problem: utf-8' + else: + msg = 'encoding problem for {!r}: utf-8'.format( + filename) + raise SyntaxError(msg) + encoding += '-sig' + return encoding + + first = read_or_stop() + if first.startswith(BOM_UTF8): + bom_found = True + first = first[3:] + default = 'utf-8-sig' + if not first: + return default, [] + + encoding = find_cookie(first) + if encoding: + return encoding, [first] + + second = read_or_stop() + if not second: + return default, [first] + + encoding = find_cookie(second) + if encoding: + return encoding, [first, second] + + return default, [first, second] + + +# For converting & <-> & etc. +try: + from html import escape +except ImportError: + from cgi import escape +if sys.version_info[:2] < (3, 4): + unescape = HTMLParser().unescape +else: + from html import unescape + +try: + from collections import ChainMap +except ImportError: # pragma: no cover + from collections import MutableMapping + + try: + from reprlib import recursive_repr as _recursive_repr + except ImportError: + + def _recursive_repr(fillvalue='...'): + ''' + Decorator to make a repr function return fillvalue for a recursive + call + ''' + + def decorating_function(user_function): + repr_running = set() + + def wrapper(self): + key = id(self), get_ident() + if key in repr_running: + return fillvalue + repr_running.add(key) + try: + result = user_function(self) + finally: + repr_running.discard(key) + return result + + # Can't use functools.wraps() here because of bootstrap issues + wrapper.__module__ = getattr(user_function, '__module__') + wrapper.__doc__ = getattr(user_function, '__doc__') + wrapper.__name__ = getattr(user_function, '__name__') + wrapper.__annotations__ = getattr(user_function, + '__annotations__', {}) + return wrapper + + return decorating_function + + class ChainMap(MutableMapping): + ''' + A ChainMap groups multiple dicts (or other mappings) together + to create a single, updateable view. + + The underlying mappings are stored in a list. That list is public and can + accessed or updated using the *maps* attribute. There is no other state. + + Lookups search the underlying mappings successively until a key is found. + In contrast, writes, updates, and deletions only operate on the first + mapping. + ''' + + def __init__(self, *maps): + '''Initialize a ChainMap by setting *maps* to the given mappings. + If no mappings are provided, a single empty dictionary is used. + + ''' + self.maps = list(maps) or [{}] # always at least one map + + def __missing__(self, key): + raise KeyError(key) + + def __getitem__(self, key): + for mapping in self.maps: + try: + return mapping[ + key] # can't use 'key in mapping' with defaultdict + except KeyError: + pass + return self.__missing__( + key) # support subclasses that define __missing__ + + def get(self, key, default=None): + return self[key] if key in self else default + + def __len__(self): + return len(set().union( + *self.maps)) # reuses stored hash values if possible + + def __iter__(self): + return iter(set().union(*self.maps)) + + def __contains__(self, key): + return any(key in m for m in self.maps) + + def __bool__(self): + return any(self.maps) + + @_recursive_repr() + def __repr__(self): + return '{0.__class__.__name__}({1})'.format( + self, ', '.join(map(repr, self.maps))) + + @classmethod + def fromkeys(cls, iterable, *args): + 'Create a ChainMap with a single dict created from the iterable.' + return cls(dict.fromkeys(iterable, *args)) + + def copy(self): + 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' + return self.__class__(self.maps[0].copy(), *self.maps[1:]) + + __copy__ = copy + + def new_child(self): # like Django's Context.push() + 'New ChainMap with a new dict followed by all previous maps.' + return self.__class__({}, *self.maps) + + @property + def parents(self): # like Django's Context.pop() + 'New ChainMap from maps[1:].' + return self.__class__(*self.maps[1:]) + + def __setitem__(self, key, value): + self.maps[0][key] = value + + def __delitem__(self, key): + try: + del self.maps[0][key] + except KeyError: + raise KeyError( + 'Key not found in the first mapping: {!r}'.format(key)) + + def popitem(self): + 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' + try: + return self.maps[0].popitem() + except KeyError: + raise KeyError('No keys found in the first mapping.') + + def pop(self, key, *args): + 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' + try: + return self.maps[0].pop(key, *args) + except KeyError: + raise KeyError( + 'Key not found in the first mapping: {!r}'.format(key)) + + def clear(self): + 'Clear maps[0], leaving maps[1:] intact.' + self.maps[0].clear() + + +try: + from importlib.util import cache_from_source # Python >= 3.4 +except ImportError: # pragma: no cover + + def cache_from_source(path, debug_override=None): + assert path.endswith('.py') + if debug_override is None: + debug_override = __debug__ + if debug_override: + suffix = 'c' + else: + suffix = 'o' + return path + suffix + + +try: + from collections import OrderedDict +except ImportError: # pragma: no cover + # {{{ http://code.activestate.com/recipes/576693/ (r9) + # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. + # Passes Python2.7's test suite and incorporates all the latest updates. + try: + from thread import get_ident as _get_ident + except ImportError: + from dummy_thread import get_ident as _get_ident + + try: + from _abcoll import KeysView, ValuesView, ItemsView + except ImportError: + pass + + class OrderedDict(dict): + 'Dictionary that remembers insertion order' + + # An inherited dict maps keys to values. + # The inherited dict provides __getitem__, __len__, __contains__, and get. + # The remaining methods are order-aware. + # Big-O running times for all methods are the same as for regular dictionaries. + + # The internal self.__map dictionary maps keys to links in a doubly linked list. + # The circular doubly linked list starts and ends with a sentinel element. + # The sentinel element never gets deleted (this simplifies the algorithm). + # Each link is stored as a list of length three: [PREV, NEXT, KEY]. + + def __init__(self, *args, **kwds): + '''Initialize an ordered dictionary. Signature is the same as for + regular dictionaries, but keyword arguments are not recommended + because their insertion order is arbitrary. + + ''' + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % + len(args)) + try: + self.__root + except AttributeError: + self.__root = root = [] # sentinel node + root[:] = [root, root, None] + self.__map = {} + self.__update(*args, **kwds) + + def __setitem__(self, key, value, dict_setitem=dict.__setitem__): + 'od.__setitem__(i, y) <==> od[i]=y' + # Setting a new item creates a new link which goes at the end of the linked + # list, and the inherited dictionary is updated with the new key/value pair. + if key not in self: + root = self.__root + last = root[0] + last[1] = root[0] = self.__map[key] = [last, root, key] + dict_setitem(self, key, value) + + def __delitem__(self, key, dict_delitem=dict.__delitem__): + 'od.__delitem__(y) <==> del od[y]' + # Deleting an existing item uses self.__map to find the link which is + # then removed by updating the links in the predecessor and successor nodes. + dict_delitem(self, key) + link_prev, link_next, key = self.__map.pop(key) + link_prev[1] = link_next + link_next[0] = link_prev + + def __iter__(self): + 'od.__iter__() <==> iter(od)' + root = self.__root + curr = root[1] + while curr is not root: + yield curr[2] + curr = curr[1] + + def __reversed__(self): + 'od.__reversed__() <==> reversed(od)' + root = self.__root + curr = root[0] + while curr is not root: + yield curr[2] + curr = curr[0] + + def clear(self): + 'od.clear() -> None. Remove all items from od.' + try: + for node in self.__map.itervalues(): + del node[:] + root = self.__root + root[:] = [root, root, None] + self.__map.clear() + except AttributeError: + pass + dict.clear(self) + + def popitem(self, last=True): + '''od.popitem() -> (k, v), return and remove a (key, value) pair. + Pairs are returned in LIFO order if last is true or FIFO order if false. + + ''' + if not self: + raise KeyError('dictionary is empty') + root = self.__root + if last: + link = root[0] + link_prev = link[0] + link_prev[1] = root + root[0] = link_prev + else: + link = root[1] + link_next = link[1] + root[1] = link_next + link_next[0] = root + key = link[2] + del self.__map[key] + value = dict.pop(self, key) + return key, value + + # -- the following methods do not depend on the internal structure -- + + def keys(self): + 'od.keys() -> list of keys in od' + return list(self) + + def values(self): + 'od.values() -> list of values in od' + return [self[key] for key in self] + + def items(self): + 'od.items() -> list of (key, value) pairs in od' + return [(key, self[key]) for key in self] + + def iterkeys(self): + 'od.iterkeys() -> an iterator over the keys in od' + return iter(self) + + def itervalues(self): + 'od.itervalues -> an iterator over the values in od' + for k in self: + yield self[k] + + def iteritems(self): + 'od.iteritems -> an iterator over the (key, value) items in od' + for k in self: + yield (k, self[k]) + + def update(*args, **kwds): + '''od.update(E, **F) -> None. Update od from dict/iterable E and F. + + If E is a dict instance, does: for k in E: od[k] = E[k] + If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] + Or if E is an iterable of items, does: for k, v in E: od[k] = v + In either case, this is followed by: for k, v in F.items(): od[k] = v + + ''' + if len(args) > 2: + raise TypeError('update() takes at most 2 positional ' + 'arguments (%d given)' % (len(args), )) + elif not args: + raise TypeError('update() takes at least 1 argument (0 given)') + self = args[0] + # Make progressively weaker assumptions about "other" + other = () + if len(args) == 2: + other = args[1] + if isinstance(other, dict): + for key in other: + self[key] = other[key] + elif hasattr(other, 'keys'): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + __update = update # let subclasses override update without breaking __init__ + + __marker = object() + + def pop(self, key, default=__marker): + '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. + If key is not found, d is returned if given, otherwise KeyError is raised. + + ''' + if key in self: + result = self[key] + del self[key] + return result + if default is self.__marker: + raise KeyError(key) + return default + + def setdefault(self, key, default=None): + 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' + if key in self: + return self[key] + self[key] = default + return default + + def __repr__(self, _repr_running=None): + 'od.__repr__() <==> repr(od)' + if not _repr_running: + _repr_running = {} + call_key = id(self), _get_ident() + if call_key in _repr_running: + return '...' + _repr_running[call_key] = 1 + try: + if not self: + return '%s()' % (self.__class__.__name__, ) + return '%s(%r)' % (self.__class__.__name__, self.items()) + finally: + del _repr_running[call_key] + + def __reduce__(self): + 'Return state information for pickling' + items = [[k, self[k]] for k in self] + inst_dict = vars(self).copy() + for k in vars(OrderedDict()): + inst_dict.pop(k, None) + if inst_dict: + return (self.__class__, (items, ), inst_dict) + return self.__class__, (items, ) + + def copy(self): + 'od.copy() -> a shallow copy of od' + return self.__class__(self) + + @classmethod + def fromkeys(cls, iterable, value=None): + '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S + and values equal to v (which defaults to None). + + ''' + d = cls() + for key in iterable: + d[key] = value + return d + + def __eq__(self, other): + '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive + while comparison to a regular mapping is order-insensitive. + + ''' + if isinstance(other, OrderedDict): + return len(self) == len( + other) and self.items() == other.items() + return dict.__eq__(self, other) + + def __ne__(self, other): + return not self == other + + # -- the following methods are only used in Python 2.7 -- + + def viewkeys(self): + "od.viewkeys() -> a set-like object providing a view on od's keys" + return KeysView(self) + + def viewvalues(self): + "od.viewvalues() -> an object providing a view on od's values" + return ValuesView(self) + + def viewitems(self): + "od.viewitems() -> a set-like object providing a view on od's items" + return ItemsView(self) + + +try: + from logging.config import BaseConfigurator, valid_ident +except ImportError: # pragma: no cover + IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I) + + def valid_ident(s): + m = IDENTIFIER.match(s) + if not m: + raise ValueError('Not a valid Python identifier: %r' % s) + return True + + # The ConvertingXXX classes are wrappers around standard Python containers, + # and they serve to convert any suitable values in the container. The + # conversion converts base dicts, lists and tuples to their wrapped + # equivalents, whereas strings which match a conversion format are converted + # appropriately. + # + # Each wrapper should have a configurator attribute holding the actual + # configurator to use for conversion. + + class ConvertingDict(dict): + """A converting dictionary wrapper.""" + + def __getitem__(self, key): + value = dict.__getitem__(self, key) + result = self.configurator.convert(value) + # If the converted value is different, save for next time + if value is not result: + self[key] = result + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + result.key = key + return result + + def get(self, key, default=None): + value = dict.get(self, key, default) + result = self.configurator.convert(value) + # If the converted value is different, save for next time + if value is not result: + self[key] = result + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + result.key = key + return result + + def pop(self, key, default=None): + value = dict.pop(self, key, default) + result = self.configurator.convert(value) + if value is not result: + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + result.key = key + return result + + class ConvertingList(list): + """A converting list wrapper.""" + + def __getitem__(self, key): + value = list.__getitem__(self, key) + result = self.configurator.convert(value) + # If the converted value is different, save for next time + if value is not result: + self[key] = result + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + result.key = key + return result + + def pop(self, idx=-1): + value = list.pop(self, idx) + result = self.configurator.convert(value) + if value is not result: + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + return result + + class ConvertingTuple(tuple): + """A converting tuple wrapper.""" + + def __getitem__(self, key): + value = tuple.__getitem__(self, key) + result = self.configurator.convert(value) + if value is not result: + if type(result) in (ConvertingDict, ConvertingList, + ConvertingTuple): + result.parent = self + result.key = key + return result + + class BaseConfigurator(object): + """ + The configurator base class which defines some useful defaults. + """ + + CONVERT_PATTERN = re.compile(r'^(?P[a-z]+)://(?P.*)$') + + WORD_PATTERN = re.compile(r'^\s*(\w+)\s*') + DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*') + INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*') + DIGIT_PATTERN = re.compile(r'^\d+$') + + value_converters = { + 'ext': 'ext_convert', + 'cfg': 'cfg_convert', + } + + # We might want to use a different one, e.g. importlib + importer = staticmethod(__import__) + + def __init__(self, config): + self.config = ConvertingDict(config) + self.config.configurator = self + + def resolve(self, s): + """ + Resolve strings to objects using standard import and attribute + syntax. + """ + name = s.split('.') + used = name.pop(0) + try: + found = self.importer(used) + for frag in name: + used += '.' + frag + try: + found = getattr(found, frag) + except AttributeError: + self.importer(used) + found = getattr(found, frag) + return found + except ImportError: + e, tb = sys.exc_info()[1:] + v = ValueError('Cannot resolve %r: %s' % (s, e)) + v.__cause__, v.__traceback__ = e, tb + raise v + + def ext_convert(self, value): + """Default converter for the ext:// protocol.""" + return self.resolve(value) + + def cfg_convert(self, value): + """Default converter for the cfg:// protocol.""" + rest = value + m = self.WORD_PATTERN.match(rest) + if m is None: + raise ValueError("Unable to convert %r" % value) + else: + rest = rest[m.end():] + d = self.config[m.groups()[0]] + while rest: + m = self.DOT_PATTERN.match(rest) + if m: + d = d[m.groups()[0]] + else: + m = self.INDEX_PATTERN.match(rest) + if m: + idx = m.groups()[0] + if not self.DIGIT_PATTERN.match(idx): + d = d[idx] + else: + try: + n = int( + idx + ) # try as number first (most likely) + d = d[n] + except TypeError: + d = d[idx] + if m: + rest = rest[m.end():] + else: + raise ValueError('Unable to convert ' + '%r at %r' % (value, rest)) + # rest should be empty + return d + + def convert(self, value): + """ + Convert values to an appropriate type. dicts, lists and tuples are + replaced by their converting alternatives. Strings are checked to + see if they have a conversion format and are converted if they do. + """ + if not isinstance(value, ConvertingDict) and isinstance( + value, dict): + value = ConvertingDict(value) + value.configurator = self + elif not isinstance(value, ConvertingList) and isinstance( + value, list): + value = ConvertingList(value) + value.configurator = self + elif not isinstance(value, ConvertingTuple) and isinstance(value, tuple): + value = ConvertingTuple(value) + value.configurator = self + elif isinstance(value, string_types): + m = self.CONVERT_PATTERN.match(value) + if m: + d = m.groupdict() + prefix = d['prefix'] + converter = self.value_converters.get(prefix, None) + if converter: + suffix = d['suffix'] + converter = getattr(self, converter) + value = converter(suffix) + return value + + def configure_custom(self, config): + """Configure an object with a user-supplied factory.""" + c = config.pop('()') + if not callable(c): + c = self.resolve(c) + props = config.pop('.', None) + # Check for valid identifiers + kwargs = dict([(k, config[k]) for k in config if valid_ident(k)]) + result = c(**kwargs) + if props: + for name, value in props.items(): + setattr(result, name, value) + return result + + def as_tuple(self, value): + """Utility function which converts lists to tuples.""" + if isinstance(value, list): + value = tuple(value) + return value diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/database.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/database.py new file mode 100644 index 0000000000000000000000000000000000000000..c0f896a7d8597f279837961f64e85e962afb026d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/database.py @@ -0,0 +1,1329 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2023 The Python Software Foundation. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +"""PEP 376 implementation.""" + +from __future__ import unicode_literals + +import base64 +import codecs +import contextlib +import hashlib +import logging +import os +import posixpath +import sys +import zipimport + +from . import DistlibException, resources +from .compat import StringIO +from .version import get_scheme, UnsupportedVersionError +from .metadata import (Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME) +from .util import (parse_requirement, cached_property, parse_name_and_version, read_exports, write_exports, CSVReader, + CSVWriter) + +__all__ = [ + 'Distribution', 'BaseInstalledDistribution', 'InstalledDistribution', 'EggInfoDistribution', 'DistributionPath' +] + +logger = logging.getLogger(__name__) + +EXPORTS_FILENAME = 'pydist-exports.json' +COMMANDS_FILENAME = 'pydist-commands.json' + +DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED', 'RESOURCES', EXPORTS_FILENAME, 'SHARED') + +DISTINFO_EXT = '.dist-info' + + +class _Cache(object): + """ + A simple cache mapping names and .dist-info paths to distributions + """ + + def __init__(self): + """ + Initialise an instance. There is normally one for each DistributionPath. + """ + self.name = {} + self.path = {} + self.generated = False + + def clear(self): + """ + Clear the cache, setting it to its initial state. + """ + self.name.clear() + self.path.clear() + self.generated = False + + def add(self, dist): + """ + Add a distribution to the cache. + :param dist: The distribution to add. + """ + if dist.path not in self.path: + self.path[dist.path] = dist + self.name.setdefault(dist.key, []).append(dist) + + +class DistributionPath(object): + """ + Represents a set of distributions installed on a path (typically sys.path). + """ + + def __init__(self, path=None, include_egg=False): + """ + Create an instance from a path, optionally including legacy (distutils/ + setuptools/distribute) distributions. + :param path: The path to use, as a list of directories. If not specified, + sys.path is used. + :param include_egg: If True, this instance will look for and return legacy + distributions as well as those based on PEP 376. + """ + if path is None: + path = sys.path + self.path = path + self._include_dist = True + self._include_egg = include_egg + + self._cache = _Cache() + self._cache_egg = _Cache() + self._cache_enabled = True + self._scheme = get_scheme('default') + + def _get_cache_enabled(self): + return self._cache_enabled + + def _set_cache_enabled(self, value): + self._cache_enabled = value + + cache_enabled = property(_get_cache_enabled, _set_cache_enabled) + + def clear_cache(self): + """ + Clears the internal cache. + """ + self._cache.clear() + self._cache_egg.clear() + + def _yield_distributions(self): + """ + Yield .dist-info and/or .egg(-info) distributions. + """ + # We need to check if we've seen some resources already, because on + # some Linux systems (e.g. some Debian/Ubuntu variants) there are + # symlinks which alias other files in the environment. + seen = set() + for path in self.path: + finder = resources.finder_for_path(path) + if finder is None: + continue + r = finder.find('') + if not r or not r.is_container: + continue + rset = sorted(r.resources) + for entry in rset: + r = finder.find(entry) + if not r or r.path in seen: + continue + try: + if self._include_dist and entry.endswith(DISTINFO_EXT): + possible_filenames = [METADATA_FILENAME, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME] + for metadata_filename in possible_filenames: + metadata_path = posixpath.join(entry, metadata_filename) + pydist = finder.find(metadata_path) + if pydist: + break + else: + continue + + with contextlib.closing(pydist.as_stream()) as stream: + metadata = Metadata(fileobj=stream, scheme='legacy') + logger.debug('Found %s', r.path) + seen.add(r.path) + yield new_dist_class(r.path, metadata=metadata, env=self) + elif self._include_egg and entry.endswith(('.egg-info', '.egg')): + logger.debug('Found %s', r.path) + seen.add(r.path) + yield old_dist_class(r.path, self) + except Exception as e: + msg = 'Unable to read distribution at %s, perhaps due to bad metadata: %s' + logger.warning(msg, r.path, e) + import warnings + warnings.warn(msg % (r.path, e), stacklevel=2) + + def _generate_cache(self): + """ + Scan the path for distributions and populate the cache with + those that are found. + """ + gen_dist = not self._cache.generated + gen_egg = self._include_egg and not self._cache_egg.generated + if gen_dist or gen_egg: + for dist in self._yield_distributions(): + if isinstance(dist, InstalledDistribution): + self._cache.add(dist) + else: + self._cache_egg.add(dist) + + if gen_dist: + self._cache.generated = True + if gen_egg: + self._cache_egg.generated = True + + @classmethod + def distinfo_dirname(cls, name, version): + """ + The *name* and *version* parameters are converted into their + filename-escaped form, i.e. any ``'-'`` characters are replaced + with ``'_'`` other than the one in ``'dist-info'`` and the one + separating the name from the version number. + + :parameter name: is converted to a standard distribution name by replacing + any runs of non- alphanumeric characters with a single + ``'-'``. + :type name: string + :parameter version: is converted to a standard version string. Spaces + become dots, and all other non-alphanumeric characters + (except dots) become dashes, with runs of multiple + dashes condensed to a single dash. + :type version: string + :returns: directory name + :rtype: string""" + name = name.replace('-', '_') + return '-'.join([name, version]) + DISTINFO_EXT + + def get_distributions(self): + """ + Provides an iterator that looks for distributions and returns + :class:`InstalledDistribution` or + :class:`EggInfoDistribution` instances for each one of them. + + :rtype: iterator of :class:`InstalledDistribution` and + :class:`EggInfoDistribution` instances + """ + if not self._cache_enabled: + for dist in self._yield_distributions(): + yield dist + else: + self._generate_cache() + + for dist in self._cache.path.values(): + yield dist + + if self._include_egg: + for dist in self._cache_egg.path.values(): + yield dist + + def get_distribution(self, name): + """ + Looks for a named distribution on the path. + + This function only returns the first result found, as no more than one + value is expected. If nothing is found, ``None`` is returned. + + :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution` + or ``None`` + """ + result = None + name = name.lower() + if not self._cache_enabled: + for dist in self._yield_distributions(): + if dist.key == name: + result = dist + break + else: + self._generate_cache() + + if name in self._cache.name: + result = self._cache.name[name][0] + elif self._include_egg and name in self._cache_egg.name: + result = self._cache_egg.name[name][0] + return result + + def provides_distribution(self, name, version=None): + """ + Iterates over all distributions to find which distributions provide *name*. + If a *version* is provided, it will be used to filter the results. + + This function only returns the first result found, since no more than + one values are expected. If the directory is not found, returns ``None``. + + :parameter version: a version specifier that indicates the version + required, conforming to the format in ``PEP-345`` + + :type name: string + :type version: string + """ + matcher = None + if version is not None: + try: + matcher = self._scheme.matcher('%s (%s)' % (name, version)) + except ValueError: + raise DistlibException('invalid name or version: %r, %r' % (name, version)) + + for dist in self.get_distributions(): + # We hit a problem on Travis where enum34 was installed and doesn't + # have a provides attribute ... + if not hasattr(dist, 'provides'): + logger.debug('No "provides": %s', dist) + else: + provided = dist.provides + + for p in provided: + p_name, p_ver = parse_name_and_version(p) + if matcher is None: + if p_name == name: + yield dist + break + else: + if p_name == name and matcher.match(p_ver): + yield dist + break + + def get_file_path(self, name, relative_path): + """ + Return the path to a resource file. + """ + dist = self.get_distribution(name) + if dist is None: + raise LookupError('no distribution named %r found' % name) + return dist.get_resource_path(relative_path) + + def get_exported_entries(self, category, name=None): + """ + Return all of the exported entries in a particular category. + + :param category: The category to search for entries. + :param name: If specified, only entries with that name are returned. + """ + for dist in self.get_distributions(): + r = dist.exports + if category in r: + d = r[category] + if name is not None: + if name in d: + yield d[name] + else: + for v in d.values(): + yield v + + +class Distribution(object): + """ + A base class for distributions, whether installed or from indexes. + Either way, it must have some metadata, so that's all that's needed + for construction. + """ + + build_time_dependency = False + """ + Set to True if it's known to be only a build-time dependency (i.e. + not needed after installation). + """ + + requested = False + """A boolean that indicates whether the ``REQUESTED`` metadata file is + present (in other words, whether the package was installed by user + request or it was installed as a dependency).""" + + def __init__(self, metadata): + """ + Initialise an instance. + :param metadata: The instance of :class:`Metadata` describing this + distribution. + """ + self.metadata = metadata + self.name = metadata.name + self.key = self.name.lower() # for case-insensitive comparisons + self.version = metadata.version + self.locator = None + self.digest = None + self.extras = None # additional features requested + self.context = None # environment marker overrides + self.download_urls = set() + self.digests = {} + + @property + def source_url(self): + """ + The source archive download URL for this distribution. + """ + return self.metadata.source_url + + download_url = source_url # Backward compatibility + + @property + def name_and_version(self): + """ + A utility property which displays the name and version in parentheses. + """ + return '%s (%s)' % (self.name, self.version) + + @property + def provides(self): + """ + A set of distribution names and versions provided by this distribution. + :return: A set of "name (version)" strings. + """ + plist = self.metadata.provides + s = '%s (%s)' % (self.name, self.version) + if s not in plist: + plist.append(s) + return plist + + def _get_requirements(self, req_attr): + md = self.metadata + reqts = getattr(md, req_attr) + logger.debug('%s: got requirements %r from metadata: %r', self.name, req_attr, reqts) + return set(md.get_requirements(reqts, extras=self.extras, env=self.context)) + + @property + def run_requires(self): + return self._get_requirements('run_requires') + + @property + def meta_requires(self): + return self._get_requirements('meta_requires') + + @property + def build_requires(self): + return self._get_requirements('build_requires') + + @property + def test_requires(self): + return self._get_requirements('test_requires') + + @property + def dev_requires(self): + return self._get_requirements('dev_requires') + + def matches_requirement(self, req): + """ + Say if this instance matches (fulfills) a requirement. + :param req: The requirement to match. + :rtype req: str + :return: True if it matches, else False. + """ + # Requirement may contain extras - parse to lose those + # from what's passed to the matcher + r = parse_requirement(req) + scheme = get_scheme(self.metadata.scheme) + try: + matcher = scheme.matcher(r.requirement) + except UnsupportedVersionError: + # XXX compat-mode if cannot read the version + logger.warning('could not read version %r - using name only', req) + name = req.split()[0] + matcher = scheme.matcher(name) + + name = matcher.key # case-insensitive + + result = False + for p in self.provides: + p_name, p_ver = parse_name_and_version(p) + if p_name != name: + continue + try: + result = matcher.match(p_ver) + break + except UnsupportedVersionError: + pass + return result + + def __repr__(self): + """ + Return a textual representation of this instance, + """ + if self.source_url: + suffix = ' [%s]' % self.source_url + else: + suffix = '' + return '' % (self.name, self.version, suffix) + + def __eq__(self, other): + """ + See if this distribution is the same as another. + :param other: The distribution to compare with. To be equal to one + another. distributions must have the same type, name, + version and source_url. + :return: True if it is the same, else False. + """ + if type(other) is not type(self): + result = False + else: + result = (self.name == other.name and self.version == other.version and self.source_url == other.source_url) + return result + + def __hash__(self): + """ + Compute hash in a way which matches the equality test. + """ + return hash(self.name) + hash(self.version) + hash(self.source_url) + + +class BaseInstalledDistribution(Distribution): + """ + This is the base class for installed distributions (whether PEP 376 or + legacy). + """ + + hasher = None + + def __init__(self, metadata, path, env=None): + """ + Initialise an instance. + :param metadata: An instance of :class:`Metadata` which describes the + distribution. This will normally have been initialised + from a metadata file in the ``path``. + :param path: The path of the ``.dist-info`` or ``.egg-info`` + directory for the distribution. + :param env: This is normally the :class:`DistributionPath` + instance where this distribution was found. + """ + super(BaseInstalledDistribution, self).__init__(metadata) + self.path = path + self.dist_path = env + + def get_hash(self, data, hasher=None): + """ + Get the hash of some data, using a particular hash algorithm, if + specified. + + :param data: The data to be hashed. + :type data: bytes + :param hasher: The name of a hash implementation, supported by hashlib, + or ``None``. Examples of valid values are ``'sha1'``, + ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and + ``'sha512'``. If no hasher is specified, the ``hasher`` + attribute of the :class:`InstalledDistribution` instance + is used. If the hasher is determined to be ``None``, MD5 + is used as the hashing algorithm. + :returns: The hash of the data. If a hasher was explicitly specified, + the returned hash will be prefixed with the specified hasher + followed by '='. + :rtype: str + """ + if hasher is None: + hasher = self.hasher + if hasher is None: + hasher = hashlib.md5 + prefix = '' + else: + hasher = getattr(hashlib, hasher) + prefix = '%s=' % self.hasher + digest = hasher(data).digest() + digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii') + return '%s%s' % (prefix, digest) + + +class InstalledDistribution(BaseInstalledDistribution): + """ + Created with the *path* of the ``.dist-info`` directory provided to the + constructor. It reads the metadata contained in ``pydist.json`` when it is + instantiated., or uses a passed in Metadata instance (useful for when + dry-run mode is being used). + """ + + hasher = 'sha256' + + def __init__(self, path, metadata=None, env=None): + self.modules = [] + self.finder = finder = resources.finder_for_path(path) + if finder is None: + raise ValueError('finder unavailable for %s' % path) + if env and env._cache_enabled and path in env._cache.path: + metadata = env._cache.path[path].metadata + elif metadata is None: + r = finder.find(METADATA_FILENAME) + # Temporary - for Wheel 0.23 support + if r is None: + r = finder.find(WHEEL_METADATA_FILENAME) + # Temporary - for legacy support + if r is None: + r = finder.find(LEGACY_METADATA_FILENAME) + if r is None: + raise ValueError('no %s found in %s' % (METADATA_FILENAME, path)) + with contextlib.closing(r.as_stream()) as stream: + metadata = Metadata(fileobj=stream, scheme='legacy') + + super(InstalledDistribution, self).__init__(metadata, path, env) + + if env and env._cache_enabled: + env._cache.add(self) + + r = finder.find('REQUESTED') + self.requested = r is not None + p = os.path.join(path, 'top_level.txt') + if os.path.exists(p): + with open(p, 'rb') as f: + data = f.read().decode('utf-8') + self.modules = data.splitlines() + + def __repr__(self): + return '' % (self.name, self.version, self.path) + + def __str__(self): + return "%s %s" % (self.name, self.version) + + def _get_records(self): + """ + Get the list of installed files for the distribution + :return: A list of tuples of path, hash and size. Note that hash and + size might be ``None`` for some entries. The path is exactly + as stored in the file (which is as in PEP 376). + """ + results = [] + r = self.get_distinfo_resource('RECORD') + with contextlib.closing(r.as_stream()) as stream: + with CSVReader(stream=stream) as record_reader: + # Base location is parent dir of .dist-info dir + # base_location = os.path.dirname(self.path) + # base_location = os.path.abspath(base_location) + for row in record_reader: + missing = [None for i in range(len(row), 3)] + path, checksum, size = row + missing + # if not os.path.isabs(path): + # path = path.replace('/', os.sep) + # path = os.path.join(base_location, path) + results.append((path, checksum, size)) + return results + + @cached_property + def exports(self): + """ + Return the information exported by this distribution. + :return: A dictionary of exports, mapping an export category to a dict + of :class:`ExportEntry` instances describing the individual + export entries, and keyed by name. + """ + result = {} + r = self.get_distinfo_resource(EXPORTS_FILENAME) + if r: + result = self.read_exports() + return result + + def read_exports(self): + """ + Read exports data from a file in .ini format. + + :return: A dictionary of exports, mapping an export category to a list + of :class:`ExportEntry` instances describing the individual + export entries. + """ + result = {} + r = self.get_distinfo_resource(EXPORTS_FILENAME) + if r: + with contextlib.closing(r.as_stream()) as stream: + result = read_exports(stream) + return result + + def write_exports(self, exports): + """ + Write a dictionary of exports to a file in .ini format. + :param exports: A dictionary of exports, mapping an export category to + a list of :class:`ExportEntry` instances describing the + individual export entries. + """ + rf = self.get_distinfo_file(EXPORTS_FILENAME) + with open(rf, 'w') as f: + write_exports(exports, f) + + def get_resource_path(self, relative_path): + """ + NOTE: This API may change in the future. + + Return the absolute path to a resource file with the given relative + path. + + :param relative_path: The path, relative to .dist-info, of the resource + of interest. + :return: The absolute path where the resource is to be found. + """ + r = self.get_distinfo_resource('RESOURCES') + with contextlib.closing(r.as_stream()) as stream: + with CSVReader(stream=stream) as resources_reader: + for relative, destination in resources_reader: + if relative == relative_path: + return destination + raise KeyError('no resource file with relative path %r ' + 'is installed' % relative_path) + + def list_installed_files(self): + """ + Iterates over the ``RECORD`` entries and returns a tuple + ``(path, hash, size)`` for each line. + + :returns: iterator of (path, hash, size) + """ + for result in self._get_records(): + yield result + + def write_installed_files(self, paths, prefix, dry_run=False): + """ + Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any + existing ``RECORD`` file is silently overwritten. + + prefix is used to determine when to write absolute paths. + """ + prefix = os.path.join(prefix, '') + base = os.path.dirname(self.path) + base_under_prefix = base.startswith(prefix) + base = os.path.join(base, '') + record_path = self.get_distinfo_file('RECORD') + logger.info('creating %s', record_path) + if dry_run: + return None + with CSVWriter(record_path) as writer: + for path in paths: + if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')): + # do not put size and hash, as in PEP-376 + hash_value = size = '' + else: + size = '%d' % os.path.getsize(path) + with open(path, 'rb') as fp: + hash_value = self.get_hash(fp.read()) + if path.startswith(base) or (base_under_prefix and path.startswith(prefix)): + path = os.path.relpath(path, base) + writer.writerow((path, hash_value, size)) + + # add the RECORD file itself + if record_path.startswith(base): + record_path = os.path.relpath(record_path, base) + writer.writerow((record_path, '', '')) + return record_path + + def check_installed_files(self): + """ + Checks that the hashes and sizes of the files in ``RECORD`` are + matched by the files themselves. Returns a (possibly empty) list of + mismatches. Each entry in the mismatch list will be a tuple consisting + of the path, 'exists', 'size' or 'hash' according to what didn't match + (existence is checked first, then size, then hash), the expected + value and the actual value. + """ + mismatches = [] + base = os.path.dirname(self.path) + record_path = self.get_distinfo_file('RECORD') + for path, hash_value, size in self.list_installed_files(): + if not os.path.isabs(path): + path = os.path.join(base, path) + if path == record_path: + continue + if not os.path.exists(path): + mismatches.append((path, 'exists', True, False)) + elif os.path.isfile(path): + actual_size = str(os.path.getsize(path)) + if size and actual_size != size: + mismatches.append((path, 'size', size, actual_size)) + elif hash_value: + if '=' in hash_value: + hasher = hash_value.split('=', 1)[0] + else: + hasher = None + + with open(path, 'rb') as f: + actual_hash = self.get_hash(f.read(), hasher) + if actual_hash != hash_value: + mismatches.append((path, 'hash', hash_value, actual_hash)) + return mismatches + + @cached_property + def shared_locations(self): + """ + A dictionary of shared locations whose keys are in the set 'prefix', + 'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'. + The corresponding value is the absolute path of that category for + this distribution, and takes into account any paths selected by the + user at installation time (e.g. via command-line arguments). In the + case of the 'namespace' key, this would be a list of absolute paths + for the roots of namespace packages in this distribution. + + The first time this property is accessed, the relevant information is + read from the SHARED file in the .dist-info directory. + """ + result = {} + shared_path = os.path.join(self.path, 'SHARED') + if os.path.isfile(shared_path): + with codecs.open(shared_path, 'r', encoding='utf-8') as f: + lines = f.read().splitlines() + for line in lines: + key, value = line.split('=', 1) + if key == 'namespace': + result.setdefault(key, []).append(value) + else: + result[key] = value + return result + + def write_shared_locations(self, paths, dry_run=False): + """ + Write shared location information to the SHARED file in .dist-info. + :param paths: A dictionary as described in the documentation for + :meth:`shared_locations`. + :param dry_run: If True, the action is logged but no file is actually + written. + :return: The path of the file written to. + """ + shared_path = os.path.join(self.path, 'SHARED') + logger.info('creating %s', shared_path) + if dry_run: + return None + lines = [] + for key in ('prefix', 'lib', 'headers', 'scripts', 'data'): + path = paths[key] + if os.path.isdir(paths[key]): + lines.append('%s=%s' % (key, path)) + for ns in paths.get('namespace', ()): + lines.append('namespace=%s' % ns) + + with codecs.open(shared_path, 'w', encoding='utf-8') as f: + f.write('\n'.join(lines)) + return shared_path + + def get_distinfo_resource(self, path): + if path not in DIST_FILES: + raise DistlibException('invalid path for a dist-info file: ' + '%r at %r' % (path, self.path)) + finder = resources.finder_for_path(self.path) + if finder is None: + raise DistlibException('Unable to get a finder for %s' % self.path) + return finder.find(path) + + def get_distinfo_file(self, path): + """ + Returns a path located under the ``.dist-info`` directory. Returns a + string representing the path. + + :parameter path: a ``'/'``-separated path relative to the + ``.dist-info`` directory or an absolute path; + If *path* is an absolute path and doesn't start + with the ``.dist-info`` directory path, + a :class:`DistlibException` is raised + :type path: str + :rtype: str + """ + # Check if it is an absolute path # XXX use relpath, add tests + if path.find(os.sep) >= 0: + # it's an absolute path? + distinfo_dirname, path = path.split(os.sep)[-2:] + if distinfo_dirname != self.path.split(os.sep)[-1]: + raise DistlibException('dist-info file %r does not belong to the %r %s ' + 'distribution' % (path, self.name, self.version)) + + # The file must be relative + if path not in DIST_FILES: + raise DistlibException('invalid path for a dist-info file: ' + '%r at %r' % (path, self.path)) + + return os.path.join(self.path, path) + + def list_distinfo_files(self): + """ + Iterates over the ``RECORD`` entries and returns paths for each line if + the path is pointing to a file located in the ``.dist-info`` directory + or one of its subdirectories. + + :returns: iterator of paths + """ + base = os.path.dirname(self.path) + for path, checksum, size in self._get_records(): + # XXX add separator or use real relpath algo + if not os.path.isabs(path): + path = os.path.join(base, path) + if path.startswith(self.path): + yield path + + def __eq__(self, other): + return (isinstance(other, InstalledDistribution) and self.path == other.path) + + # See http://docs.python.org/reference/datamodel#object.__hash__ + __hash__ = object.__hash__ + + +class EggInfoDistribution(BaseInstalledDistribution): + """Created with the *path* of the ``.egg-info`` directory or file provided + to the constructor. It reads the metadata contained in the file itself, or + if the given path happens to be a directory, the metadata is read from the + file ``PKG-INFO`` under that directory.""" + + requested = True # as we have no way of knowing, assume it was + shared_locations = {} + + def __init__(self, path, env=None): + + def set_name_and_version(s, n, v): + s.name = n + s.key = n.lower() # for case-insensitive comparisons + s.version = v + + self.path = path + self.dist_path = env + if env and env._cache_enabled and path in env._cache_egg.path: + metadata = env._cache_egg.path[path].metadata + set_name_and_version(self, metadata.name, metadata.version) + else: + metadata = self._get_metadata(path) + + # Need to be set before caching + set_name_and_version(self, metadata.name, metadata.version) + + if env and env._cache_enabled: + env._cache_egg.add(self) + super(EggInfoDistribution, self).__init__(metadata, path, env) + + def _get_metadata(self, path): + requires = None + + def parse_requires_data(data): + """Create a list of dependencies from a requires.txt file. + + *data*: the contents of a setuptools-produced requires.txt file. + """ + reqs = [] + lines = data.splitlines() + for line in lines: + line = line.strip() + # sectioned files have bare newlines (separating sections) + if not line: # pragma: no cover + continue + if line.startswith('['): # pragma: no cover + logger.warning('Unexpected line: quitting requirement scan: %r', line) + break + r = parse_requirement(line) + if not r: # pragma: no cover + logger.warning('Not recognised as a requirement: %r', line) + continue + if r.extras: # pragma: no cover + logger.warning('extra requirements in requires.txt are ' + 'not supported') + if not r.constraints: + reqs.append(r.name) + else: + cons = ', '.join('%s%s' % c for c in r.constraints) + reqs.append('%s (%s)' % (r.name, cons)) + return reqs + + def parse_requires_path(req_path): + """Create a list of dependencies from a requires.txt file. + + *req_path*: the path to a setuptools-produced requires.txt file. + """ + + reqs = [] + try: + with codecs.open(req_path, 'r', 'utf-8') as fp: + reqs = parse_requires_data(fp.read()) + except IOError: + pass + return reqs + + tl_path = tl_data = None + if path.endswith('.egg'): + if os.path.isdir(path): + p = os.path.join(path, 'EGG-INFO') + meta_path = os.path.join(p, 'PKG-INFO') + metadata = Metadata(path=meta_path, scheme='legacy') + req_path = os.path.join(p, 'requires.txt') + tl_path = os.path.join(p, 'top_level.txt') + requires = parse_requires_path(req_path) + else: + # FIXME handle the case where zipfile is not available + zipf = zipimport.zipimporter(path) + fileobj = StringIO(zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8')) + metadata = Metadata(fileobj=fileobj, scheme='legacy') + try: + data = zipf.get_data('EGG-INFO/requires.txt') + tl_data = zipf.get_data('EGG-INFO/top_level.txt').decode('utf-8') + requires = parse_requires_data(data.decode('utf-8')) + except IOError: + requires = None + elif path.endswith('.egg-info'): + if os.path.isdir(path): + req_path = os.path.join(path, 'requires.txt') + requires = parse_requires_path(req_path) + path = os.path.join(path, 'PKG-INFO') + tl_path = os.path.join(path, 'top_level.txt') + metadata = Metadata(path=path, scheme='legacy') + else: + raise DistlibException('path must end with .egg-info or .egg, ' + 'got %r' % path) + + if requires: + metadata.add_requirements(requires) + # look for top-level modules in top_level.txt, if present + if tl_data is None: + if tl_path is not None and os.path.exists(tl_path): + with open(tl_path, 'rb') as f: + tl_data = f.read().decode('utf-8') + if not tl_data: + tl_data = [] + else: + tl_data = tl_data.splitlines() + self.modules = tl_data + return metadata + + def __repr__(self): + return '' % (self.name, self.version, self.path) + + def __str__(self): + return "%s %s" % (self.name, self.version) + + def check_installed_files(self): + """ + Checks that the hashes and sizes of the files in ``RECORD`` are + matched by the files themselves. Returns a (possibly empty) list of + mismatches. Each entry in the mismatch list will be a tuple consisting + of the path, 'exists', 'size' or 'hash' according to what didn't match + (existence is checked first, then size, then hash), the expected + value and the actual value. + """ + mismatches = [] + record_path = os.path.join(self.path, 'installed-files.txt') + if os.path.exists(record_path): + for path, _, _ in self.list_installed_files(): + if path == record_path: + continue + if not os.path.exists(path): + mismatches.append((path, 'exists', True, False)) + return mismatches + + def list_installed_files(self): + """ + Iterates over the ``installed-files.txt`` entries and returns a tuple + ``(path, hash, size)`` for each line. + + :returns: a list of (path, hash, size) + """ + + def _md5(path): + f = open(path, 'rb') + try: + content = f.read() + finally: + f.close() + return hashlib.md5(content).hexdigest() + + def _size(path): + return os.stat(path).st_size + + record_path = os.path.join(self.path, 'installed-files.txt') + result = [] + if os.path.exists(record_path): + with codecs.open(record_path, 'r', encoding='utf-8') as f: + for line in f: + line = line.strip() + p = os.path.normpath(os.path.join(self.path, line)) + # "./" is present as a marker between installed files + # and installation metadata files + if not os.path.exists(p): + logger.warning('Non-existent file: %s', p) + if p.endswith(('.pyc', '.pyo')): + continue + # otherwise fall through and fail + if not os.path.isdir(p): + result.append((p, _md5(p), _size(p))) + result.append((record_path, None, None)) + return result + + def list_distinfo_files(self, absolute=False): + """ + Iterates over the ``installed-files.txt`` entries and returns paths for + each line if the path is pointing to a file located in the + ``.egg-info`` directory or one of its subdirectories. + + :parameter absolute: If *absolute* is ``True``, each returned path is + transformed into a local absolute path. Otherwise the + raw value from ``installed-files.txt`` is returned. + :type absolute: boolean + :returns: iterator of paths + """ + record_path = os.path.join(self.path, 'installed-files.txt') + if os.path.exists(record_path): + skip = True + with codecs.open(record_path, 'r', encoding='utf-8') as f: + for line in f: + line = line.strip() + if line == './': + skip = False + continue + if not skip: + p = os.path.normpath(os.path.join(self.path, line)) + if p.startswith(self.path): + if absolute: + yield p + else: + yield line + + def __eq__(self, other): + return (isinstance(other, EggInfoDistribution) and self.path == other.path) + + # See http://docs.python.org/reference/datamodel#object.__hash__ + __hash__ = object.__hash__ + + +new_dist_class = InstalledDistribution +old_dist_class = EggInfoDistribution + + +class DependencyGraph(object): + """ + Represents a dependency graph between distributions. + + The dependency relationships are stored in an ``adjacency_list`` that maps + distributions to a list of ``(other, label)`` tuples where ``other`` + is a distribution and the edge is labeled with ``label`` (i.e. the version + specifier, if such was provided). Also, for more efficient traversal, for + every distribution ``x``, a list of predecessors is kept in + ``reverse_list[x]``. An edge from distribution ``a`` to + distribution ``b`` means that ``a`` depends on ``b``. If any missing + dependencies are found, they are stored in ``missing``, which is a + dictionary that maps distributions to a list of requirements that were not + provided by any other distributions. + """ + + def __init__(self): + self.adjacency_list = {} + self.reverse_list = {} + self.missing = {} + + def add_distribution(self, distribution): + """Add the *distribution* to the graph. + + :type distribution: :class:`distutils2.database.InstalledDistribution` + or :class:`distutils2.database.EggInfoDistribution` + """ + self.adjacency_list[distribution] = [] + self.reverse_list[distribution] = [] + # self.missing[distribution] = [] + + def add_edge(self, x, y, label=None): + """Add an edge from distribution *x* to distribution *y* with the given + *label*. + + :type x: :class:`distutils2.database.InstalledDistribution` or + :class:`distutils2.database.EggInfoDistribution` + :type y: :class:`distutils2.database.InstalledDistribution` or + :class:`distutils2.database.EggInfoDistribution` + :type label: ``str`` or ``None`` + """ + self.adjacency_list[x].append((y, label)) + # multiple edges are allowed, so be careful + if x not in self.reverse_list[y]: + self.reverse_list[y].append(x) + + def add_missing(self, distribution, requirement): + """ + Add a missing *requirement* for the given *distribution*. + + :type distribution: :class:`distutils2.database.InstalledDistribution` + or :class:`distutils2.database.EggInfoDistribution` + :type requirement: ``str`` + """ + logger.debug('%s missing %r', distribution, requirement) + self.missing.setdefault(distribution, []).append(requirement) + + def _repr_dist(self, dist): + return '%s %s' % (dist.name, dist.version) + + def repr_node(self, dist, level=1): + """Prints only a subgraph""" + output = [self._repr_dist(dist)] + for other, label in self.adjacency_list[dist]: + dist = self._repr_dist(other) + if label is not None: + dist = '%s [%s]' % (dist, label) + output.append(' ' * level + str(dist)) + suboutput = self.repr_node(other, level + 1) + subs = suboutput.split('\n') + output.extend(subs[1:]) + return '\n'.join(output) + + def to_dot(self, f, skip_disconnected=True): + """Writes a DOT output for the graph to the provided file *f*. + + If *skip_disconnected* is set to ``True``, then all distributions + that are not dependent on any other distribution are skipped. + + :type f: has to support ``file``-like operations + :type skip_disconnected: ``bool`` + """ + disconnected = [] + + f.write("digraph dependencies {\n") + for dist, adjs in self.adjacency_list.items(): + if len(adjs) == 0 and not skip_disconnected: + disconnected.append(dist) + for other, label in adjs: + if label is not None: + f.write('"%s" -> "%s" [label="%s"]\n' % (dist.name, other.name, label)) + else: + f.write('"%s" -> "%s"\n' % (dist.name, other.name)) + if not skip_disconnected and len(disconnected) > 0: + f.write('subgraph disconnected {\n') + f.write('label = "Disconnected"\n') + f.write('bgcolor = red\n') + + for dist in disconnected: + f.write('"%s"' % dist.name) + f.write('\n') + f.write('}\n') + f.write('}\n') + + def topological_sort(self): + """ + Perform a topological sort of the graph. + :return: A tuple, the first element of which is a topologically sorted + list of distributions, and the second element of which is a + list of distributions that cannot be sorted because they have + circular dependencies and so form a cycle. + """ + result = [] + # Make a shallow copy of the adjacency list + alist = {} + for k, v in self.adjacency_list.items(): + alist[k] = v[:] + while True: + # See what we can remove in this run + to_remove = [] + for k, v in list(alist.items())[:]: + if not v: + to_remove.append(k) + del alist[k] + if not to_remove: + # What's left in alist (if anything) is a cycle. + break + # Remove from the adjacency list of others + for k, v in alist.items(): + alist[k] = [(d, r) for d, r in v if d not in to_remove] + logger.debug('Moving to result: %s', ['%s (%s)' % (d.name, d.version) for d in to_remove]) + result.extend(to_remove) + return result, list(alist.keys()) + + def __repr__(self): + """Representation of the graph""" + output = [] + for dist, adjs in self.adjacency_list.items(): + output.append(self.repr_node(dist)) + return '\n'.join(output) + + +def make_graph(dists, scheme='default'): + """Makes a dependency graph from the given distributions. + + :parameter dists: a list of distributions + :type dists: list of :class:`distutils2.database.InstalledDistribution` and + :class:`distutils2.database.EggInfoDistribution` instances + :rtype: a :class:`DependencyGraph` instance + """ + scheme = get_scheme(scheme) + graph = DependencyGraph() + provided = {} # maps names to lists of (version, dist) tuples + + # first, build the graph and find out what's provided + for dist in dists: + graph.add_distribution(dist) + + for p in dist.provides: + name, version = parse_name_and_version(p) + logger.debug('Add to provided: %s, %s, %s', name, version, dist) + provided.setdefault(name, []).append((version, dist)) + + # now make the edges + for dist in dists: + requires = (dist.run_requires | dist.meta_requires | dist.build_requires | dist.dev_requires) + for req in requires: + try: + matcher = scheme.matcher(req) + except UnsupportedVersionError: + # XXX compat-mode if cannot read the version + logger.warning('could not read version %r - using name only', req) + name = req.split()[0] + matcher = scheme.matcher(name) + + name = matcher.key # case-insensitive + + matched = False + if name in provided: + for version, provider in provided[name]: + try: + match = matcher.match(version) + except UnsupportedVersionError: + match = False + + if match: + graph.add_edge(dist, provider, req) + matched = True + break + if not matched: + graph.add_missing(dist, req) + return graph + + +def get_dependent_dists(dists, dist): + """Recursively generate a list of distributions from *dists* that are + dependent on *dist*. + + :param dists: a list of distributions + :param dist: a distribution, member of *dists* for which we are interested + """ + if dist not in dists: + raise DistlibException('given distribution %r is not a member ' + 'of the list' % dist.name) + graph = make_graph(dists) + + dep = [dist] # dependent distributions + todo = graph.reverse_list[dist] # list of nodes we should inspect + + while todo: + d = todo.pop() + dep.append(d) + for succ in graph.reverse_list[d]: + if succ not in dep: + todo.append(succ) + + dep.pop(0) # remove dist from dep, was there to prevent infinite loops + return dep + + +def get_required_dists(dists, dist): + """Recursively generate a list of distributions from *dists* that are + required by *dist*. + + :param dists: a list of distributions + :param dist: a distribution, member of *dists* for which we are interested + in finding the dependencies. + """ + if dist not in dists: + raise DistlibException('given distribution %r is not a member ' + 'of the list' % dist.name) + graph = make_graph(dists) + + req = set() # required distributions + todo = graph.adjacency_list[dist] # list of nodes we should inspect + seen = set(t[0] for t in todo) # already added to todo + + while todo: + d = todo.pop()[0] + req.add(d) + pred_list = graph.adjacency_list[d] + for pred in pred_list: + d = pred[0] + if d not in req and d not in seen: + seen.add(d) + todo.append(pred) + return req + + +def make_dist(name, version, **kwargs): + """ + A convenience method for making a dist given just a name and version. + """ + summary = kwargs.pop('summary', 'Placeholder for summary') + md = Metadata(**kwargs) + md.name = name + md.version = version + md.summary = summary or 'Placeholder for summary' + return Distribution(md) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/index.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/index.py new file mode 100644 index 0000000000000000000000000000000000000000..56cd2867145fadb498717739ed5a7773148c7160 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/index.py @@ -0,0 +1,508 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2013-2023 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +import hashlib +import logging +import os +import shutil +import subprocess +import tempfile +try: + from threading import Thread +except ImportError: # pragma: no cover + from dummy_threading import Thread + +from . import DistlibException +from .compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr, + urlparse, build_opener, string_types) +from .util import zip_dir, ServerProxy + +logger = logging.getLogger(__name__) + +DEFAULT_INDEX = 'https://pypi.org/pypi' +DEFAULT_REALM = 'pypi' + + +class PackageIndex(object): + """ + This class represents a package index compatible with PyPI, the Python + Package Index. + """ + + boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$' + + def __init__(self, url=None): + """ + Initialise an instance. + + :param url: The URL of the index. If not specified, the URL for PyPI is + used. + """ + self.url = url or DEFAULT_INDEX + self.read_configuration() + scheme, netloc, path, params, query, frag = urlparse(self.url) + if params or query or frag or scheme not in ('http', 'https'): + raise DistlibException('invalid repository: %s' % self.url) + self.password_handler = None + self.ssl_verifier = None + self.gpg = None + self.gpg_home = None + with open(os.devnull, 'w') as sink: + # Use gpg by default rather than gpg2, as gpg2 insists on + # prompting for passwords + for s in ('gpg', 'gpg2'): + try: + rc = subprocess.check_call([s, '--version'], stdout=sink, + stderr=sink) + if rc == 0: + self.gpg = s + break + except OSError: + pass + + def _get_pypirc_command(self): + """ + Get the distutils command for interacting with PyPI configurations. + :return: the command. + """ + from .util import _get_pypirc_command as cmd + return cmd() + + def read_configuration(self): + """ + Read the PyPI access configuration as supported by distutils. This populates + ``username``, ``password``, ``realm`` and ``url`` attributes from the + configuration. + """ + from .util import _load_pypirc + cfg = _load_pypirc(self) + self.username = cfg.get('username') + self.password = cfg.get('password') + self.realm = cfg.get('realm', 'pypi') + self.url = cfg.get('repository', self.url) + + def save_configuration(self): + """ + Save the PyPI access configuration. You must have set ``username`` and + ``password`` attributes before calling this method. + """ + self.check_credentials() + from .util import _store_pypirc + _store_pypirc(self) + + def check_credentials(self): + """ + Check that ``username`` and ``password`` have been set, and raise an + exception if not. + """ + if self.username is None or self.password is None: + raise DistlibException('username and password must be set') + pm = HTTPPasswordMgr() + _, netloc, _, _, _, _ = urlparse(self.url) + pm.add_password(self.realm, netloc, self.username, self.password) + self.password_handler = HTTPBasicAuthHandler(pm) + + def register(self, metadata): # pragma: no cover + """ + Register a distribution on PyPI, using the provided metadata. + + :param metadata: A :class:`Metadata` instance defining at least a name + and version number for the distribution to be + registered. + :return: The HTTP response received from PyPI upon submission of the + request. + """ + self.check_credentials() + metadata.validate() + d = metadata.todict() + d[':action'] = 'verify' + request = self.encode_request(d.items(), []) + self.send_request(request) + d[':action'] = 'submit' + request = self.encode_request(d.items(), []) + return self.send_request(request) + + def _reader(self, name, stream, outbuf): + """ + Thread runner for reading lines of from a subprocess into a buffer. + + :param name: The logical name of the stream (used for logging only). + :param stream: The stream to read from. This will typically a pipe + connected to the output stream of a subprocess. + :param outbuf: The list to append the read lines to. + """ + while True: + s = stream.readline() + if not s: + break + s = s.decode('utf-8').rstrip() + outbuf.append(s) + logger.debug('%s: %s' % (name, s)) + stream.close() + + def get_sign_command(self, filename, signer, sign_password, keystore=None): # pragma: no cover + """ + Return a suitable command for signing a file. + + :param filename: The pathname to the file to be signed. + :param signer: The identifier of the signer of the file. + :param sign_password: The passphrase for the signer's + private key used for signing. + :param keystore: The path to a directory which contains the keys + used in verification. If not specified, the + instance's ``gpg_home`` attribute is used instead. + :return: The signing command as a list suitable to be + passed to :class:`subprocess.Popen`. + """ + cmd = [self.gpg, '--status-fd', '2', '--no-tty'] + if keystore is None: + keystore = self.gpg_home + if keystore: + cmd.extend(['--homedir', keystore]) + if sign_password is not None: + cmd.extend(['--batch', '--passphrase-fd', '0']) + td = tempfile.mkdtemp() + sf = os.path.join(td, os.path.basename(filename) + '.asc') + cmd.extend(['--detach-sign', '--armor', '--local-user', + signer, '--output', sf, filename]) + logger.debug('invoking: %s', ' '.join(cmd)) + return cmd, sf + + def run_command(self, cmd, input_data=None): + """ + Run a command in a child process , passing it any input data specified. + + :param cmd: The command to run. + :param input_data: If specified, this must be a byte string containing + data to be sent to the child process. + :return: A tuple consisting of the subprocess' exit code, a list of + lines read from the subprocess' ``stdout``, and a list of + lines read from the subprocess' ``stderr``. + """ + kwargs = { + 'stdout': subprocess.PIPE, + 'stderr': subprocess.PIPE, + } + if input_data is not None: + kwargs['stdin'] = subprocess.PIPE + stdout = [] + stderr = [] + p = subprocess.Popen(cmd, **kwargs) + # We don't use communicate() here because we may need to + # get clever with interacting with the command + t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout)) + t1.start() + t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr)) + t2.start() + if input_data is not None: + p.stdin.write(input_data) + p.stdin.close() + + p.wait() + t1.join() + t2.join() + return p.returncode, stdout, stderr + + def sign_file(self, filename, signer, sign_password, keystore=None): # pragma: no cover + """ + Sign a file. + + :param filename: The pathname to the file to be signed. + :param signer: The identifier of the signer of the file. + :param sign_password: The passphrase for the signer's + private key used for signing. + :param keystore: The path to a directory which contains the keys + used in signing. If not specified, the instance's + ``gpg_home`` attribute is used instead. + :return: The absolute pathname of the file where the signature is + stored. + """ + cmd, sig_file = self.get_sign_command(filename, signer, sign_password, + keystore) + rc, stdout, stderr = self.run_command(cmd, + sign_password.encode('utf-8')) + if rc != 0: + raise DistlibException('sign command failed with error ' + 'code %s' % rc) + return sig_file + + def upload_file(self, metadata, filename, signer=None, sign_password=None, + filetype='sdist', pyversion='source', keystore=None): + """ + Upload a release file to the index. + + :param metadata: A :class:`Metadata` instance defining at least a name + and version number for the file to be uploaded. + :param filename: The pathname of the file to be uploaded. + :param signer: The identifier of the signer of the file. + :param sign_password: The passphrase for the signer's + private key used for signing. + :param filetype: The type of the file being uploaded. This is the + distutils command which produced that file, e.g. + ``sdist`` or ``bdist_wheel``. + :param pyversion: The version of Python which the release relates + to. For code compatible with any Python, this would + be ``source``, otherwise it would be e.g. ``3.2``. + :param keystore: The path to a directory which contains the keys + used in signing. If not specified, the instance's + ``gpg_home`` attribute is used instead. + :return: The HTTP response received from PyPI upon submission of the + request. + """ + self.check_credentials() + if not os.path.exists(filename): + raise DistlibException('not found: %s' % filename) + metadata.validate() + d = metadata.todict() + sig_file = None + if signer: + if not self.gpg: + logger.warning('no signing program available - not signed') + else: + sig_file = self.sign_file(filename, signer, sign_password, + keystore) + with open(filename, 'rb') as f: + file_data = f.read() + md5_digest = hashlib.md5(file_data).hexdigest() + sha256_digest = hashlib.sha256(file_data).hexdigest() + d.update({ + ':action': 'file_upload', + 'protocol_version': '1', + 'filetype': filetype, + 'pyversion': pyversion, + 'md5_digest': md5_digest, + 'sha256_digest': sha256_digest, + }) + files = [('content', os.path.basename(filename), file_data)] + if sig_file: + with open(sig_file, 'rb') as f: + sig_data = f.read() + files.append(('gpg_signature', os.path.basename(sig_file), + sig_data)) + shutil.rmtree(os.path.dirname(sig_file)) + request = self.encode_request(d.items(), files) + return self.send_request(request) + + def upload_documentation(self, metadata, doc_dir): # pragma: no cover + """ + Upload documentation to the index. + + :param metadata: A :class:`Metadata` instance defining at least a name + and version number for the documentation to be + uploaded. + :param doc_dir: The pathname of the directory which contains the + documentation. This should be the directory that + contains the ``index.html`` for the documentation. + :return: The HTTP response received from PyPI upon submission of the + request. + """ + self.check_credentials() + if not os.path.isdir(doc_dir): + raise DistlibException('not a directory: %r' % doc_dir) + fn = os.path.join(doc_dir, 'index.html') + if not os.path.exists(fn): + raise DistlibException('not found: %r' % fn) + metadata.validate() + name, version = metadata.name, metadata.version + zip_data = zip_dir(doc_dir).getvalue() + fields = [(':action', 'doc_upload'), + ('name', name), ('version', version)] + files = [('content', name, zip_data)] + request = self.encode_request(fields, files) + return self.send_request(request) + + def get_verify_command(self, signature_filename, data_filename, + keystore=None): + """ + Return a suitable command for verifying a file. + + :param signature_filename: The pathname to the file containing the + signature. + :param data_filename: The pathname to the file containing the + signed data. + :param keystore: The path to a directory which contains the keys + used in verification. If not specified, the + instance's ``gpg_home`` attribute is used instead. + :return: The verifying command as a list suitable to be + passed to :class:`subprocess.Popen`. + """ + cmd = [self.gpg, '--status-fd', '2', '--no-tty'] + if keystore is None: + keystore = self.gpg_home + if keystore: + cmd.extend(['--homedir', keystore]) + cmd.extend(['--verify', signature_filename, data_filename]) + logger.debug('invoking: %s', ' '.join(cmd)) + return cmd + + def verify_signature(self, signature_filename, data_filename, + keystore=None): + """ + Verify a signature for a file. + + :param signature_filename: The pathname to the file containing the + signature. + :param data_filename: The pathname to the file containing the + signed data. + :param keystore: The path to a directory which contains the keys + used in verification. If not specified, the + instance's ``gpg_home`` attribute is used instead. + :return: True if the signature was verified, else False. + """ + if not self.gpg: + raise DistlibException('verification unavailable because gpg ' + 'unavailable') + cmd = self.get_verify_command(signature_filename, data_filename, + keystore) + rc, stdout, stderr = self.run_command(cmd) + if rc not in (0, 1): + raise DistlibException('verify command failed with error code %s' % rc) + return rc == 0 + + def download_file(self, url, destfile, digest=None, reporthook=None): + """ + This is a convenience method for downloading a file from an URL. + Normally, this will be a file from the index, though currently + no check is made for this (i.e. a file can be downloaded from + anywhere). + + The method is just like the :func:`urlretrieve` function in the + standard library, except that it allows digest computation to be + done during download and checking that the downloaded data + matched any expected value. + + :param url: The URL of the file to be downloaded (assumed to be + available via an HTTP GET request). + :param destfile: The pathname where the downloaded file is to be + saved. + :param digest: If specified, this must be a (hasher, value) + tuple, where hasher is the algorithm used (e.g. + ``'md5'``) and ``value`` is the expected value. + :param reporthook: The same as for :func:`urlretrieve` in the + standard library. + """ + if digest is None: + digester = None + logger.debug('No digest specified') + else: + if isinstance(digest, (list, tuple)): + hasher, digest = digest + else: + hasher = 'md5' + digester = getattr(hashlib, hasher)() + logger.debug('Digest specified: %s' % digest) + # The following code is equivalent to urlretrieve. + # We need to do it this way so that we can compute the + # digest of the file as we go. + with open(destfile, 'wb') as dfp: + # addinfourl is not a context manager on 2.x + # so we have to use try/finally + sfp = self.send_request(Request(url)) + try: + headers = sfp.info() + blocksize = 8192 + size = -1 + read = 0 + blocknum = 0 + if "content-length" in headers: + size = int(headers["Content-Length"]) + if reporthook: + reporthook(blocknum, blocksize, size) + while True: + block = sfp.read(blocksize) + if not block: + break + read += len(block) + dfp.write(block) + if digester: + digester.update(block) + blocknum += 1 + if reporthook: + reporthook(blocknum, blocksize, size) + finally: + sfp.close() + + # check that we got the whole file, if we can + if size >= 0 and read < size: + raise DistlibException( + 'retrieval incomplete: got only %d out of %d bytes' + % (read, size)) + # if we have a digest, it must match. + if digester: + actual = digester.hexdigest() + if digest != actual: + raise DistlibException('%s digest mismatch for %s: expected ' + '%s, got %s' % (hasher, destfile, + digest, actual)) + logger.debug('Digest verified: %s', digest) + + def send_request(self, req): + """ + Send a standard library :class:`Request` to PyPI and return its + response. + + :param req: The request to send. + :return: The HTTP response from PyPI (a standard library HTTPResponse). + """ + handlers = [] + if self.password_handler: + handlers.append(self.password_handler) + if self.ssl_verifier: + handlers.append(self.ssl_verifier) + opener = build_opener(*handlers) + return opener.open(req) + + def encode_request(self, fields, files): + """ + Encode fields and files for posting to an HTTP server. + + :param fields: The fields to send as a list of (fieldname, value) + tuples. + :param files: The files to send as a list of (fieldname, filename, + file_bytes) tuple. + """ + # Adapted from packaging, which in turn was adapted from + # http://code.activestate.com/recipes/146306 + + parts = [] + boundary = self.boundary + for k, values in fields: + if not isinstance(values, (list, tuple)): + values = [values] + + for v in values: + parts.extend(( + b'--' + boundary, + ('Content-Disposition: form-data; name="%s"' % + k).encode('utf-8'), + b'', + v.encode('utf-8'))) + for key, filename, value in files: + parts.extend(( + b'--' + boundary, + ('Content-Disposition: form-data; name="%s"; filename="%s"' % + (key, filename)).encode('utf-8'), + b'', + value)) + + parts.extend((b'--' + boundary + b'--', b'')) + + body = b'\r\n'.join(parts) + ct = b'multipart/form-data; boundary=' + boundary + headers = { + 'Content-type': ct, + 'Content-length': str(len(body)) + } + return Request(self.url, body, headers) + + def search(self, terms, operator=None): # pragma: no cover + if isinstance(terms, string_types): + terms = {'name': terms} + rpc_proxy = ServerProxy(self.url, timeout=3.0) + try: + return rpc_proxy.search(terms, operator or 'and') + finally: + rpc_proxy('close')() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py new file mode 100644 index 0000000000000000000000000000000000000000..222c1bf3e90da230fbd2e0891cf2724e6f23a943 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py @@ -0,0 +1,1295 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2023 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# + +import gzip +from io import BytesIO +import json +import logging +import os +import posixpath +import re +try: + import threading +except ImportError: # pragma: no cover + import dummy_threading as threading +import zlib + +from . import DistlibException +from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url, queue, quote, unescape, build_opener, + HTTPRedirectHandler as BaseRedirectHandler, text_type, Request, HTTPError, URLError) +from .database import Distribution, DistributionPath, make_dist +from .metadata import Metadata, MetadataInvalidError +from .util import (cached_property, ensure_slash, split_filename, get_project_data, parse_requirement, + parse_name_and_version, ServerProxy, normalize_name) +from .version import get_scheme, UnsupportedVersionError +from .wheel import Wheel, is_compatible + +logger = logging.getLogger(__name__) + +HASHER_HASH = re.compile(r'^(\w+)=([a-f0-9]+)') +CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I) +HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml') +DEFAULT_INDEX = 'https://pypi.org/pypi' + + +def get_all_distribution_names(url=None): + """ + Return all distribution names known by an index. + :param url: The URL of the index. + :return: A list of all known distribution names. + """ + if url is None: + url = DEFAULT_INDEX + client = ServerProxy(url, timeout=3.0) + try: + return client.list_packages() + finally: + client('close')() + + +class RedirectHandler(BaseRedirectHandler): + """ + A class to work around a bug in some Python 3.2.x releases. + """ + + # There's a bug in the base version for some 3.2.x + # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header + # returns e.g. /abc, it bails because it says the scheme '' + # is bogus, when actually it should use the request's + # URL for the scheme. See Python issue #13696. + def http_error_302(self, req, fp, code, msg, headers): + # Some servers (incorrectly) return multiple Location headers + # (so probably same goes for URI). Use first header. + newurl = None + for key in ('location', 'uri'): + if key in headers: + newurl = headers[key] + break + if newurl is None: # pragma: no cover + return + urlparts = urlparse(newurl) + if urlparts.scheme == '': + newurl = urljoin(req.get_full_url(), newurl) + if hasattr(headers, 'replace_header'): + headers.replace_header(key, newurl) + else: + headers[key] = newurl + return BaseRedirectHandler.http_error_302(self, req, fp, code, msg, headers) + + http_error_301 = http_error_303 = http_error_307 = http_error_302 + + +class Locator(object): + """ + A base class for locators - things that locate distributions. + """ + source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz') + binary_extensions = ('.egg', '.exe', '.whl') + excluded_extensions = ('.pdf', ) + + # A list of tags indicating which wheels you want to match. The default + # value of None matches against the tags compatible with the running + # Python. If you want to match other values, set wheel_tags on a locator + # instance to a list of tuples (pyver, abi, arch) which you want to match. + wheel_tags = None + + downloadable_extensions = source_extensions + ('.whl', ) + + def __init__(self, scheme='default'): + """ + Initialise an instance. + :param scheme: Because locators look for most recent versions, they + need to know the version scheme to use. This specifies + the current PEP-recommended scheme - use ``'legacy'`` + if you need to support existing distributions on PyPI. + """ + self._cache = {} + self.scheme = scheme + # Because of bugs in some of the handlers on some of the platforms, + # we use our own opener rather than just using urlopen. + self.opener = build_opener(RedirectHandler()) + # If get_project() is called from locate(), the matcher instance + # is set from the requirement passed to locate(). See issue #18 for + # why this can be useful to know. + self.matcher = None + self.errors = queue.Queue() + + def get_errors(self): + """ + Return any errors which have occurred. + """ + result = [] + while not self.errors.empty(): # pragma: no cover + try: + e = self.errors.get(False) + result.append(e) + except self.errors.Empty: + continue + self.errors.task_done() + return result + + def clear_errors(self): + """ + Clear any errors which may have been logged. + """ + # Just get the errors and throw them away + self.get_errors() + + def clear_cache(self): + self._cache.clear() + + def _get_scheme(self): + return self._scheme + + def _set_scheme(self, value): + self._scheme = value + + scheme = property(_get_scheme, _set_scheme) + + def _get_project(self, name): + """ + For a given project, get a dictionary mapping available versions to Distribution + instances. + + This should be implemented in subclasses. + + If called from a locate() request, self.matcher will be set to a + matcher for the requirement to satisfy, otherwise it will be None. + """ + raise NotImplementedError('Please implement in the subclass') + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + raise NotImplementedError('Please implement in the subclass') + + def get_project(self, name): + """ + For a given project, get a dictionary mapping available versions to Distribution + instances. + + This calls _get_project to do all the work, and just implements a caching layer on top. + """ + if self._cache is None: # pragma: no cover + result = self._get_project(name) + elif name in self._cache: + result = self._cache[name] + else: + self.clear_errors() + result = self._get_project(name) + self._cache[name] = result + return result + + def score_url(self, url): + """ + Give an url a score which can be used to choose preferred URLs + for a given project release. + """ + t = urlparse(url) + basename = posixpath.basename(t.path) + compatible = True + is_wheel = basename.endswith('.whl') + is_downloadable = basename.endswith(self.downloadable_extensions) + if is_wheel: + compatible = is_compatible(Wheel(basename), self.wheel_tags) + return (t.scheme == 'https', 'pypi.org' in t.netloc, is_downloadable, is_wheel, compatible, basename) + + def prefer_url(self, url1, url2): + """ + Choose one of two URLs where both are candidates for distribution + archives for the same version of a distribution (for example, + .tar.gz vs. zip). + + The current implementation favours https:// URLs over http://, archives + from PyPI over those from other locations, wheel compatibility (if a + wheel) and then the archive name. + """ + result = url2 + if url1: + s1 = self.score_url(url1) + s2 = self.score_url(url2) + if s1 > s2: + result = url1 + if result != url2: + logger.debug('Not replacing %r with %r', url1, url2) + else: + logger.debug('Replacing %r with %r', url1, url2) + return result + + def split_filename(self, filename, project_name): + """ + Attempt to split a filename in project name, version and Python version. + """ + return split_filename(filename, project_name) + + def convert_url_to_download_info(self, url, project_name): + """ + See if a URL is a candidate for a download URL for a project (the URL + has typically been scraped from an HTML page). + + If it is, a dictionary is returned with keys "name", "version", + "filename" and "url"; otherwise, None is returned. + """ + + def same_project(name1, name2): + return normalize_name(name1) == normalize_name(name2) + + result = None + scheme, netloc, path, params, query, frag = urlparse(url) + if frag.lower().startswith('egg='): # pragma: no cover + logger.debug('%s: version hint in fragment: %r', project_name, frag) + m = HASHER_HASH.match(frag) + if m: + algo, digest = m.groups() + else: + algo, digest = None, None + origpath = path + if path and path[-1] == '/': # pragma: no cover + path = path[:-1] + if path.endswith('.whl'): + try: + wheel = Wheel(path) + if not is_compatible(wheel, self.wheel_tags): + logger.debug('Wheel not compatible: %s', path) + else: + if project_name is None: + include = True + else: + include = same_project(wheel.name, project_name) + if include: + result = { + 'name': wheel.name, + 'version': wheel.version, + 'filename': wheel.filename, + 'url': urlunparse((scheme, netloc, origpath, params, query, '')), + 'python-version': ', '.join(['.'.join(list(v[2:])) for v in wheel.pyver]), + } + except Exception: # pragma: no cover + logger.warning('invalid path for wheel: %s', path) + elif not path.endswith(self.downloadable_extensions): # pragma: no cover + logger.debug('Not downloadable: %s', path) + else: # downloadable extension + path = filename = posixpath.basename(path) + for ext in self.downloadable_extensions: + if path.endswith(ext): + path = path[:-len(ext)] + t = self.split_filename(path, project_name) + if not t: # pragma: no cover + logger.debug('No match for project/version: %s', path) + else: + name, version, pyver = t + if not project_name or same_project(project_name, name): + result = { + 'name': name, + 'version': version, + 'filename': filename, + 'url': urlunparse((scheme, netloc, origpath, params, query, '')), + } + if pyver: # pragma: no cover + result['python-version'] = pyver + break + if result and algo: + result['%s_digest' % algo] = digest + return result + + def _get_digest(self, info): + """ + Get a digest from a dictionary by looking at a "digests" dictionary + or keys of the form 'algo_digest'. + + Returns a 2-tuple (algo, digest) if found, else None. Currently + looks only for SHA256, then MD5. + """ + result = None + if 'digests' in info: + digests = info['digests'] + for algo in ('sha256', 'md5'): + if algo in digests: + result = (algo, digests[algo]) + break + if not result: + for algo in ('sha256', 'md5'): + key = '%s_digest' % algo + if key in info: + result = (algo, info[key]) + break + return result + + def _update_version_data(self, result, info): + """ + Update a result dictionary (the final result from _get_project) with a + dictionary for a specific version, which typically holds information + gleaned from a filename or URL for an archive for the distribution. + """ + name = info.pop('name') + version = info.pop('version') + if version in result: + dist = result[version] + md = dist.metadata + else: + dist = make_dist(name, version, scheme=self.scheme) + md = dist.metadata + dist.digest = digest = self._get_digest(info) + url = info['url'] + result['digests'][url] = digest + if md.source_url != info['url']: + md.source_url = self.prefer_url(md.source_url, url) + result['urls'].setdefault(version, set()).add(url) + dist.locator = self + result[version] = dist + + def locate(self, requirement, prereleases=False): + """ + Find the most recent distribution which matches the given + requirement. + + :param requirement: A requirement of the form 'foo (1.0)' or perhaps + 'foo (>= 1.0, < 2.0, != 1.3)' + :param prereleases: If ``True``, allow pre-release versions + to be located. Otherwise, pre-release versions + are not returned. + :return: A :class:`Distribution` instance, or ``None`` if no such + distribution could be located. + """ + result = None + r = parse_requirement(requirement) + if r is None: # pragma: no cover + raise DistlibException('Not a valid requirement: %r' % requirement) + scheme = get_scheme(self.scheme) + self.matcher = matcher = scheme.matcher(r.requirement) + logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__) + versions = self.get_project(r.name) + if len(versions) > 2: # urls and digests keys are present + # sometimes, versions are invalid + slist = [] + vcls = matcher.version_class + for k in versions: + if k in ('urls', 'digests'): + continue + try: + if not matcher.match(k): + pass # logger.debug('%s did not match %r', matcher, k) + else: + if prereleases or not vcls(k).is_prerelease: + slist.append(k) + except Exception: # pragma: no cover + logger.warning('error matching %s with %r', matcher, k) + pass # slist.append(k) + if len(slist) > 1: + slist = sorted(slist, key=scheme.key) + if slist: + logger.debug('sorted list: %s', slist) + version = slist[-1] + result = versions[version] + if result: + if r.extras: + result.extras = r.extras + result.download_urls = versions.get('urls', {}).get(version, set()) + d = {} + sd = versions.get('digests', {}) + for url in result.download_urls: + if url in sd: # pragma: no cover + d[url] = sd[url] + result.digests = d + self.matcher = None + return result + + +class PyPIRPCLocator(Locator): + """ + This locator uses XML-RPC to locate distributions. It therefore + cannot be used with simple mirrors (that only mirror file content). + """ + + def __init__(self, url, **kwargs): + """ + Initialise an instance. + + :param url: The URL to use for XML-RPC. + :param kwargs: Passed to the superclass constructor. + """ + super(PyPIRPCLocator, self).__init__(**kwargs) + self.base_url = url + self.client = ServerProxy(url, timeout=3.0) + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + return set(self.client.list_packages()) + + def _get_project(self, name): + result = {'urls': {}, 'digests': {}} + versions = self.client.package_releases(name, True) + for v in versions: + urls = self.client.release_urls(name, v) + data = self.client.release_data(name, v) + metadata = Metadata(scheme=self.scheme) + metadata.name = data['name'] + metadata.version = data['version'] + metadata.license = data.get('license') + metadata.keywords = data.get('keywords', []) + metadata.summary = data.get('summary') + dist = Distribution(metadata) + if urls: + info = urls[0] + metadata.source_url = info['url'] + dist.digest = self._get_digest(info) + dist.locator = self + result[v] = dist + for info in urls: + url = info['url'] + digest = self._get_digest(info) + result['urls'].setdefault(v, set()).add(url) + result['digests'][url] = digest + return result + + +class PyPIJSONLocator(Locator): + """ + This locator uses PyPI's JSON interface. It's very limited in functionality + and probably not worth using. + """ + + def __init__(self, url, **kwargs): + super(PyPIJSONLocator, self).__init__(**kwargs) + self.base_url = ensure_slash(url) + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + raise NotImplementedError('Not available from this locator') + + def _get_project(self, name): + result = {'urls': {}, 'digests': {}} + url = urljoin(self.base_url, '%s/json' % quote(name)) + try: + resp = self.opener.open(url) + data = resp.read().decode() # for now + d = json.loads(data) + md = Metadata(scheme=self.scheme) + data = d['info'] + md.name = data['name'] + md.version = data['version'] + md.license = data.get('license') + md.keywords = data.get('keywords', []) + md.summary = data.get('summary') + dist = Distribution(md) + dist.locator = self + # urls = d['urls'] + result[md.version] = dist + for info in d['urls']: + url = info['url'] + dist.download_urls.add(url) + dist.digests[url] = self._get_digest(info) + result['urls'].setdefault(md.version, set()).add(url) + result['digests'][url] = self._get_digest(info) + # Now get other releases + for version, infos in d['releases'].items(): + if version == md.version: + continue # already done + omd = Metadata(scheme=self.scheme) + omd.name = md.name + omd.version = version + odist = Distribution(omd) + odist.locator = self + result[version] = odist + for info in infos: + url = info['url'] + odist.download_urls.add(url) + odist.digests[url] = self._get_digest(info) + result['urls'].setdefault(version, set()).add(url) + result['digests'][url] = self._get_digest(info) + + +# for info in urls: +# md.source_url = info['url'] +# dist.digest = self._get_digest(info) +# dist.locator = self +# for info in urls: +# url = info['url'] +# result['urls'].setdefault(md.version, set()).add(url) +# result['digests'][url] = self._get_digest(info) + except Exception as e: + self.errors.put(text_type(e)) + logger.exception('JSON fetch failed: %s', e) + return result + + +class Page(object): + """ + This class represents a scraped HTML page. + """ + # The following slightly hairy-looking regex just looks for the contents of + # an anchor link, which has an attribute "href" either immediately preceded + # or immediately followed by a "rel" attribute. The attribute values can be + # declared with double quotes, single quotes or no quotes - which leads to + # the length of the expression. + _href = re.compile( + """ +(rel\\s*=\\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\\s\n]*))\\s+)? +href\\s*=\\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\\s\n]*)) +(\\s+rel\\s*=\\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\\s\n]*)))? +""", re.I | re.S | re.X) + _base = re.compile(r"""]+)""", re.I | re.S) + + def __init__(self, data, url): + """ + Initialise an instance with the Unicode page contents and the URL they + came from. + """ + self.data = data + self.base_url = self.url = url + m = self._base.search(self.data) + if m: + self.base_url = m.group(1) + + _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I) + + @cached_property + def links(self): + """ + Return the URLs of all the links on a page together with information + about their "rel" attribute, for determining which ones to treat as + downloads and which ones to queue for further scraping. + """ + + def clean(url): + "Tidy up an URL." + scheme, netloc, path, params, query, frag = urlparse(url) + return urlunparse((scheme, netloc, quote(path), params, query, frag)) + + result = set() + for match in self._href.finditer(self.data): + d = match.groupdict('') + rel = (d['rel1'] or d['rel2'] or d['rel3'] or d['rel4'] or d['rel5'] or d['rel6']) + url = d['url1'] or d['url2'] or d['url3'] + url = urljoin(self.base_url, url) + url = unescape(url) + url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url) + result.add((url, rel)) + # We sort the result, hoping to bring the most recent versions + # to the front + result = sorted(result, key=lambda t: t[0], reverse=True) + return result + + +class SimpleScrapingLocator(Locator): + """ + A locator which scrapes HTML pages to locate downloads for a distribution. + This runs multiple threads to do the I/O; performance is at least as good + as pip's PackageFinder, which works in an analogous fashion. + """ + + # These are used to deal with various Content-Encoding schemes. + decoders = { + 'deflate': zlib.decompress, + 'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(b)).read(), + 'none': lambda b: b, + } + + def __init__(self, url, timeout=None, num_workers=10, **kwargs): + """ + Initialise an instance. + :param url: The root URL to use for scraping. + :param timeout: The timeout, in seconds, to be applied to requests. + This defaults to ``None`` (no timeout specified). + :param num_workers: The number of worker threads you want to do I/O, + This defaults to 10. + :param kwargs: Passed to the superclass. + """ + super(SimpleScrapingLocator, self).__init__(**kwargs) + self.base_url = ensure_slash(url) + self.timeout = timeout + self._page_cache = {} + self._seen = set() + self._to_fetch = queue.Queue() + self._bad_hosts = set() + self.skip_externals = False + self.num_workers = num_workers + self._lock = threading.RLock() + # See issue #45: we need to be resilient when the locator is used + # in a thread, e.g. with concurrent.futures. We can't use self._lock + # as it is for coordinating our internal threads - the ones created + # in _prepare_threads. + self._gplock = threading.RLock() + self.platform_check = False # See issue #112 + + def _prepare_threads(self): + """ + Threads are created only when get_project is called, and terminate + before it returns. They are there primarily to parallelise I/O (i.e. + fetching web pages). + """ + self._threads = [] + for i in range(self.num_workers): + t = threading.Thread(target=self._fetch) + t.daemon = True + t.start() + self._threads.append(t) + + def _wait_threads(self): + """ + Tell all the threads to terminate (by sending a sentinel value) and + wait for them to do so. + """ + # Note that you need two loops, since you can't say which + # thread will get each sentinel + for t in self._threads: + self._to_fetch.put(None) # sentinel + for t in self._threads: + t.join() + self._threads = [] + + def _get_project(self, name): + result = {'urls': {}, 'digests': {}} + with self._gplock: + self.result = result + self.project_name = name + url = urljoin(self.base_url, '%s/' % quote(name)) + self._seen.clear() + self._page_cache.clear() + self._prepare_threads() + try: + logger.debug('Queueing %s', url) + self._to_fetch.put(url) + self._to_fetch.join() + finally: + self._wait_threads() + del self.result + return result + + platform_dependent = re.compile(r'\b(linux_(i\d86|x86_64|arm\w+)|' + r'win(32|_amd64)|macosx_?\d+)\b', re.I) + + def _is_platform_dependent(self, url): + """ + Does an URL refer to a platform-specific download? + """ + return self.platform_dependent.search(url) + + def _process_download(self, url): + """ + See if an URL is a suitable download for a project. + + If it is, register information in the result dictionary (for + _get_project) about the specific version it's for. + + Note that the return value isn't actually used other than as a boolean + value. + """ + if self.platform_check and self._is_platform_dependent(url): + info = None + else: + info = self.convert_url_to_download_info(url, self.project_name) + logger.debug('process_download: %s -> %s', url, info) + if info: + with self._lock: # needed because self.result is shared + self._update_version_data(self.result, info) + return info + + def _should_queue(self, link, referrer, rel): + """ + Determine whether a link URL from a referring page and with a + particular "rel" attribute should be queued for scraping. + """ + scheme, netloc, path, _, _, _ = urlparse(link) + if path.endswith(self.source_extensions + self.binary_extensions + self.excluded_extensions): + result = False + elif self.skip_externals and not link.startswith(self.base_url): + result = False + elif not referrer.startswith(self.base_url): + result = False + elif rel not in ('homepage', 'download'): + result = False + elif scheme not in ('http', 'https', 'ftp'): + result = False + elif self._is_platform_dependent(link): + result = False + else: + host = netloc.split(':', 1)[0] + if host.lower() == 'localhost': + result = False + else: + result = True + logger.debug('should_queue: %s (%s) from %s -> %s', link, rel, referrer, result) + return result + + def _fetch(self): + """ + Get a URL to fetch from the work queue, get the HTML page, examine its + links for download candidates and candidates for further scraping. + + This is a handy method to run in a thread. + """ + while True: + url = self._to_fetch.get() + try: + if url: + page = self.get_page(url) + if page is None: # e.g. after an error + continue + for link, rel in page.links: + if link not in self._seen: + try: + self._seen.add(link) + if (not self._process_download(link) and self._should_queue(link, url, rel)): + logger.debug('Queueing %s from %s', link, url) + self._to_fetch.put(link) + except MetadataInvalidError: # e.g. invalid versions + pass + except Exception as e: # pragma: no cover + self.errors.put(text_type(e)) + finally: + # always do this, to avoid hangs :-) + self._to_fetch.task_done() + if not url: + # logger.debug('Sentinel seen, quitting.') + break + + def get_page(self, url): + """ + Get the HTML for an URL, possibly from an in-memory cache. + + XXX TODO Note: this cache is never actually cleared. It's assumed that + the data won't get stale over the lifetime of a locator instance (not + necessarily true for the default_locator). + """ + # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api + scheme, netloc, path, _, _, _ = urlparse(url) + if scheme == 'file' and os.path.isdir(url2pathname(path)): + url = urljoin(ensure_slash(url), 'index.html') + + if url in self._page_cache: + result = self._page_cache[url] + logger.debug('Returning %s from cache: %s', url, result) + else: + host = netloc.split(':', 1)[0] + result = None + if host in self._bad_hosts: + logger.debug('Skipping %s due to bad host %s', url, host) + else: + req = Request(url, headers={'Accept-encoding': 'identity'}) + try: + logger.debug('Fetching %s', url) + resp = self.opener.open(req, timeout=self.timeout) + logger.debug('Fetched %s', url) + headers = resp.info() + content_type = headers.get('Content-Type', '') + if HTML_CONTENT_TYPE.match(content_type): + final_url = resp.geturl() + data = resp.read() + encoding = headers.get('Content-Encoding') + if encoding: + decoder = self.decoders[encoding] # fail if not found + data = decoder(data) + encoding = 'utf-8' + m = CHARSET.search(content_type) + if m: + encoding = m.group(1) + try: + data = data.decode(encoding) + except UnicodeError: # pragma: no cover + data = data.decode('latin-1') # fallback + result = Page(data, final_url) + self._page_cache[final_url] = result + except HTTPError as e: + if e.code != 404: + logger.exception('Fetch failed: %s: %s', url, e) + except URLError as e: # pragma: no cover + logger.exception('Fetch failed: %s: %s', url, e) + with self._lock: + self._bad_hosts.add(host) + except Exception as e: # pragma: no cover + logger.exception('Fetch failed: %s: %s', url, e) + finally: + self._page_cache[url] = result # even if None (failure) + return result + + _distname_re = re.compile(']*>([^<]+)<') + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + result = set() + page = self.get_page(self.base_url) + if not page: + raise DistlibException('Unable to get %s' % self.base_url) + for match in self._distname_re.finditer(page.data): + result.add(match.group(1)) + return result + + +class DirectoryLocator(Locator): + """ + This class locates distributions in a directory tree. + """ + + def __init__(self, path, **kwargs): + """ + Initialise an instance. + :param path: The root of the directory tree to search. + :param kwargs: Passed to the superclass constructor, + except for: + * recursive - if True (the default), subdirectories are + recursed into. If False, only the top-level directory + is searched, + """ + self.recursive = kwargs.pop('recursive', True) + super(DirectoryLocator, self).__init__(**kwargs) + path = os.path.abspath(path) + if not os.path.isdir(path): # pragma: no cover + raise DistlibException('Not a directory: %r' % path) + self.base_dir = path + + def should_include(self, filename, parent): + """ + Should a filename be considered as a candidate for a distribution + archive? As well as the filename, the directory which contains it + is provided, though not used by the current implementation. + """ + return filename.endswith(self.downloadable_extensions) + + def _get_project(self, name): + result = {'urls': {}, 'digests': {}} + for root, dirs, files in os.walk(self.base_dir): + for fn in files: + if self.should_include(fn, root): + fn = os.path.join(root, fn) + url = urlunparse(('file', '', pathname2url(os.path.abspath(fn)), '', '', '')) + info = self.convert_url_to_download_info(url, name) + if info: + self._update_version_data(result, info) + if not self.recursive: + break + return result + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + result = set() + for root, dirs, files in os.walk(self.base_dir): + for fn in files: + if self.should_include(fn, root): + fn = os.path.join(root, fn) + url = urlunparse(('file', '', pathname2url(os.path.abspath(fn)), '', '', '')) + info = self.convert_url_to_download_info(url, None) + if info: + result.add(info['name']) + if not self.recursive: + break + return result + + +class JSONLocator(Locator): + """ + This locator uses special extended metadata (not available on PyPI) and is + the basis of performant dependency resolution in distlib. Other locators + require archive downloads before dependencies can be determined! As you + might imagine, that can be slow. + """ + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + raise NotImplementedError('Not available from this locator') + + def _get_project(self, name): + result = {'urls': {}, 'digests': {}} + data = get_project_data(name) + if data: + for info in data.get('files', []): + if info['ptype'] != 'sdist' or info['pyversion'] != 'source': + continue + # We don't store summary in project metadata as it makes + # the data bigger for no benefit during dependency + # resolution + dist = make_dist(data['name'], + info['version'], + summary=data.get('summary', 'Placeholder for summary'), + scheme=self.scheme) + md = dist.metadata + md.source_url = info['url'] + # TODO SHA256 digest + if 'digest' in info and info['digest']: + dist.digest = ('md5', info['digest']) + md.dependencies = info.get('requirements', {}) + dist.exports = info.get('exports', {}) + result[dist.version] = dist + result['urls'].setdefault(dist.version, set()).add(info['url']) + return result + + +class DistPathLocator(Locator): + """ + This locator finds installed distributions in a path. It can be useful for + adding to an :class:`AggregatingLocator`. + """ + + def __init__(self, distpath, **kwargs): + """ + Initialise an instance. + + :param distpath: A :class:`DistributionPath` instance to search. + """ + super(DistPathLocator, self).__init__(**kwargs) + assert isinstance(distpath, DistributionPath) + self.distpath = distpath + + def _get_project(self, name): + dist = self.distpath.get_distribution(name) + if dist is None: + result = {'urls': {}, 'digests': {}} + else: + result = { + dist.version: dist, + 'urls': { + dist.version: set([dist.source_url]) + }, + 'digests': { + dist.version: set([None]) + } + } + return result + + +class AggregatingLocator(Locator): + """ + This class allows you to chain and/or merge a list of locators. + """ + + def __init__(self, *locators, **kwargs): + """ + Initialise an instance. + + :param locators: The list of locators to search. + :param kwargs: Passed to the superclass constructor, + except for: + * merge - if False (the default), the first successful + search from any of the locators is returned. If True, + the results from all locators are merged (this can be + slow). + """ + self.merge = kwargs.pop('merge', False) + self.locators = locators + super(AggregatingLocator, self).__init__(**kwargs) + + def clear_cache(self): + super(AggregatingLocator, self).clear_cache() + for locator in self.locators: + locator.clear_cache() + + def _set_scheme(self, value): + self._scheme = value + for locator in self.locators: + locator.scheme = value + + scheme = property(Locator.scheme.fget, _set_scheme) + + def _get_project(self, name): + result = {} + for locator in self.locators: + d = locator.get_project(name) + if d: + if self.merge: + files = result.get('urls', {}) + digests = result.get('digests', {}) + # next line could overwrite result['urls'], result['digests'] + result.update(d) + df = result.get('urls') + if files and df: + for k, v in files.items(): + if k in df: + df[k] |= v + else: + df[k] = v + dd = result.get('digests') + if digests and dd: + dd.update(digests) + else: + # See issue #18. If any dists are found and we're looking + # for specific constraints, we only return something if + # a match is found. For example, if a DirectoryLocator + # returns just foo (1.0) while we're looking for + # foo (>= 2.0), we'll pretend there was nothing there so + # that subsequent locators can be queried. Otherwise we + # would just return foo (1.0) which would then lead to a + # failure to find foo (>= 2.0), because other locators + # weren't searched. Note that this only matters when + # merge=False. + if self.matcher is None: + found = True + else: + found = False + for k in d: + if self.matcher.match(k): + found = True + break + if found: + result = d + break + return result + + def get_distribution_names(self): + """ + Return all the distribution names known to this locator. + """ + result = set() + for locator in self.locators: + try: + result |= locator.get_distribution_names() + except NotImplementedError: + pass + return result + + +# We use a legacy scheme simply because most of the dists on PyPI use legacy +# versions which don't conform to PEP 440. +default_locator = AggregatingLocator( + # JSONLocator(), # don't use as PEP 426 is withdrawn + SimpleScrapingLocator('https://pypi.org/simple/', timeout=3.0), + scheme='legacy') + +locate = default_locator.locate + + +class DependencyFinder(object): + """ + Locate dependencies for distributions. + """ + + def __init__(self, locator=None): + """ + Initialise an instance, using the specified locator + to locate distributions. + """ + self.locator = locator or default_locator + self.scheme = get_scheme(self.locator.scheme) + + def add_distribution(self, dist): + """ + Add a distribution to the finder. This will update internal information + about who provides what. + :param dist: The distribution to add. + """ + logger.debug('adding distribution %s', dist) + name = dist.key + self.dists_by_name[name] = dist + self.dists[(name, dist.version)] = dist + for p in dist.provides: + name, version = parse_name_and_version(p) + logger.debug('Add to provided: %s, %s, %s', name, version, dist) + self.provided.setdefault(name, set()).add((version, dist)) + + def remove_distribution(self, dist): + """ + Remove a distribution from the finder. This will update internal + information about who provides what. + :param dist: The distribution to remove. + """ + logger.debug('removing distribution %s', dist) + name = dist.key + del self.dists_by_name[name] + del self.dists[(name, dist.version)] + for p in dist.provides: + name, version = parse_name_and_version(p) + logger.debug('Remove from provided: %s, %s, %s', name, version, dist) + s = self.provided[name] + s.remove((version, dist)) + if not s: + del self.provided[name] + + def get_matcher(self, reqt): + """ + Get a version matcher for a requirement. + :param reqt: The requirement + :type reqt: str + :return: A version matcher (an instance of + :class:`distlib.version.Matcher`). + """ + try: + matcher = self.scheme.matcher(reqt) + except UnsupportedVersionError: # pragma: no cover + # XXX compat-mode if cannot read the version + name = reqt.split()[0] + matcher = self.scheme.matcher(name) + return matcher + + def find_providers(self, reqt): + """ + Find the distributions which can fulfill a requirement. + + :param reqt: The requirement. + :type reqt: str + :return: A set of distribution which can fulfill the requirement. + """ + matcher = self.get_matcher(reqt) + name = matcher.key # case-insensitive + result = set() + provided = self.provided + if name in provided: + for version, provider in provided[name]: + try: + match = matcher.match(version) + except UnsupportedVersionError: + match = False + + if match: + result.add(provider) + break + return result + + def try_to_replace(self, provider, other, problems): + """ + Attempt to replace one provider with another. This is typically used + when resolving dependencies from multiple sources, e.g. A requires + (B >= 1.0) while C requires (B >= 1.1). + + For successful replacement, ``provider`` must meet all the requirements + which ``other`` fulfills. + + :param provider: The provider we are trying to replace with. + :param other: The provider we're trying to replace. + :param problems: If False is returned, this will contain what + problems prevented replacement. This is currently + a tuple of the literal string 'cantreplace', + ``provider``, ``other`` and the set of requirements + that ``provider`` couldn't fulfill. + :return: True if we can replace ``other`` with ``provider``, else + False. + """ + rlist = self.reqts[other] + unmatched = set() + for s in rlist: + matcher = self.get_matcher(s) + if not matcher.match(provider.version): + unmatched.add(s) + if unmatched: + # can't replace other with provider + problems.add(('cantreplace', provider, other, frozenset(unmatched))) + result = False + else: + # can replace other with provider + self.remove_distribution(other) + del self.reqts[other] + for s in rlist: + self.reqts.setdefault(provider, set()).add(s) + self.add_distribution(provider) + result = True + return result + + def find(self, requirement, meta_extras=None, prereleases=False): + """ + Find a distribution and all distributions it depends on. + + :param requirement: The requirement specifying the distribution to + find, or a Distribution instance. + :param meta_extras: A list of meta extras such as :test:, :build: and + so on. + :param prereleases: If ``True``, allow pre-release versions to be + returned - otherwise, don't return prereleases + unless they're all that's available. + + Return a set of :class:`Distribution` instances and a set of + problems. + + The distributions returned should be such that they have the + :attr:`required` attribute set to ``True`` if they were + from the ``requirement`` passed to ``find()``, and they have the + :attr:`build_time_dependency` attribute set to ``True`` unless they + are post-installation dependencies of the ``requirement``. + + The problems should be a tuple consisting of the string + ``'unsatisfied'`` and the requirement which couldn't be satisfied + by any distribution known to the locator. + """ + + self.provided = {} + self.dists = {} + self.dists_by_name = {} + self.reqts = {} + + meta_extras = set(meta_extras or []) + if ':*:' in meta_extras: + meta_extras.remove(':*:') + # :meta: and :run: are implicitly included + meta_extras |= set([':test:', ':build:', ':dev:']) + + if isinstance(requirement, Distribution): + dist = odist = requirement + logger.debug('passed %s as requirement', odist) + else: + dist = odist = self.locator.locate(requirement, prereleases=prereleases) + if dist is None: + raise DistlibException('Unable to locate %r' % requirement) + logger.debug('located %s', odist) + dist.requested = True + problems = set() + todo = set([dist]) + install_dists = set([odist]) + while todo: + dist = todo.pop() + name = dist.key # case-insensitive + if name not in self.dists_by_name: + self.add_distribution(dist) + else: + # import pdb; pdb.set_trace() + other = self.dists_by_name[name] + if other != dist: + self.try_to_replace(dist, other, problems) + + ireqts = dist.run_requires | dist.meta_requires + sreqts = dist.build_requires + ereqts = set() + if meta_extras and dist in install_dists: + for key in ('test', 'build', 'dev'): + e = ':%s:' % key + if e in meta_extras: + ereqts |= getattr(dist, '%s_requires' % key) + all_reqts = ireqts | sreqts | ereqts + for r in all_reqts: + providers = self.find_providers(r) + if not providers: + logger.debug('No providers found for %r', r) + provider = self.locator.locate(r, prereleases=prereleases) + # If no provider is found and we didn't consider + # prereleases, consider them now. + if provider is None and not prereleases: + provider = self.locator.locate(r, prereleases=True) + if provider is None: + logger.debug('Cannot satisfy %r', r) + problems.add(('unsatisfied', r)) + else: + n, v = provider.key, provider.version + if (n, v) not in self.dists: + todo.add(provider) + providers.add(provider) + if r in ireqts and dist in install_dists: + install_dists.add(provider) + logger.debug('Adding %s to install_dists', provider.name_and_version) + for p in providers: + name = p.key + if name not in self.dists_by_name: + self.reqts.setdefault(p, set()).add(r) + else: + other = self.dists_by_name[name] + if other != p: + # see if other can be replaced by p + self.try_to_replace(p, other, problems) + + dists = set(self.dists.values()) + for dist in dists: + dist.build_time_dependency = dist not in install_dists + if dist.build_time_dependency: + logger.debug('%s is a build-time dependency only.', dist.name_and_version) + logger.debug('find done for %s', odist) + return dists, problems diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py new file mode 100644 index 0000000000000000000000000000000000000000..420dcf12ed2571245b29d3ceb96f7dd3ae3665ea --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py @@ -0,0 +1,384 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2023 Python Software Foundation. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +""" +Class representing the list of files in a distribution. + +Equivalent to distutils.filelist, but fixes some problems. +""" +import fnmatch +import logging +import os +import re +import sys + +from . import DistlibException +from .compat import fsdecode +from .util import convert_path + + +__all__ = ['Manifest'] + +logger = logging.getLogger(__name__) + +# a \ followed by some spaces + EOL +_COLLAPSE_PATTERN = re.compile('\\\\w*\n', re.M) +_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S) + +# +# Due to the different results returned by fnmatch.translate, we need +# to do slightly different processing for Python 2.7 and 3.2 ... this needed +# to be brought in for Python 3.6 onwards. +# +_PYTHON_VERSION = sys.version_info[:2] + + +class Manifest(object): + """ + A list of files built by exploring the filesystem and filtered by applying various + patterns to what we find there. + """ + + def __init__(self, base=None): + """ + Initialise an instance. + + :param base: The base directory to explore under. + """ + self.base = os.path.abspath(os.path.normpath(base or os.getcwd())) + self.prefix = self.base + os.sep + self.allfiles = None + self.files = set() + + # + # Public API + # + + def findall(self): + """Find all files under the base and set ``allfiles`` to the absolute + pathnames of files found. + """ + from stat import S_ISREG, S_ISDIR, S_ISLNK + + self.allfiles = allfiles = [] + root = self.base + stack = [root] + pop = stack.pop + push = stack.append + + while stack: + root = pop() + names = os.listdir(root) + + for name in names: + fullname = os.path.join(root, name) + + # Avoid excess stat calls -- just one will do, thank you! + stat = os.stat(fullname) + mode = stat.st_mode + if S_ISREG(mode): + allfiles.append(fsdecode(fullname)) + elif S_ISDIR(mode) and not S_ISLNK(mode): + push(fullname) + + def add(self, item): + """ + Add a file to the manifest. + + :param item: The pathname to add. This can be relative to the base. + """ + if not item.startswith(self.prefix): + item = os.path.join(self.base, item) + self.files.add(os.path.normpath(item)) + + def add_many(self, items): + """ + Add a list of files to the manifest. + + :param items: The pathnames to add. These can be relative to the base. + """ + for item in items: + self.add(item) + + def sorted(self, wantdirs=False): + """ + Return sorted files in directory order + """ + + def add_dir(dirs, d): + dirs.add(d) + logger.debug('add_dir added %s', d) + if d != self.base: + parent, _ = os.path.split(d) + assert parent not in ('', '/') + add_dir(dirs, parent) + + result = set(self.files) # make a copy! + if wantdirs: + dirs = set() + for f in result: + add_dir(dirs, os.path.dirname(f)) + result |= dirs + return [os.path.join(*path_tuple) for path_tuple in + sorted(os.path.split(path) for path in result)] + + def clear(self): + """Clear all collected files.""" + self.files = set() + self.allfiles = [] + + def process_directive(self, directive): + """ + Process a directive which either adds some files from ``allfiles`` to + ``files``, or removes some files from ``files``. + + :param directive: The directive to process. This should be in a format + compatible with distutils ``MANIFEST.in`` files: + + http://docs.python.org/distutils/sourcedist.html#commands + """ + # Parse the line: split it up, make sure the right number of words + # is there, and return the relevant words. 'action' is always + # defined: it's the first word of the line. Which of the other + # three are defined depends on the action; it'll be either + # patterns, (dir and patterns), or (dirpattern). + action, patterns, thedir, dirpattern = self._parse_directive(directive) + + # OK, now we know that the action is valid and we have the + # right number of words on the line for that action -- so we + # can proceed with minimal error-checking. + if action == 'include': + for pattern in patterns: + if not self._include_pattern(pattern, anchor=True): + logger.warning('no files found matching %r', pattern) + + elif action == 'exclude': + for pattern in patterns: + self._exclude_pattern(pattern, anchor=True) + + elif action == 'global-include': + for pattern in patterns: + if not self._include_pattern(pattern, anchor=False): + logger.warning('no files found matching %r ' + 'anywhere in distribution', pattern) + + elif action == 'global-exclude': + for pattern in patterns: + self._exclude_pattern(pattern, anchor=False) + + elif action == 'recursive-include': + for pattern in patterns: + if not self._include_pattern(pattern, prefix=thedir): + logger.warning('no files found matching %r ' + 'under directory %r', pattern, thedir) + + elif action == 'recursive-exclude': + for pattern in patterns: + self._exclude_pattern(pattern, prefix=thedir) + + elif action == 'graft': + if not self._include_pattern(None, prefix=dirpattern): + logger.warning('no directories found matching %r', + dirpattern) + + elif action == 'prune': + if not self._exclude_pattern(None, prefix=dirpattern): + logger.warning('no previously-included directories found ' + 'matching %r', dirpattern) + else: # pragma: no cover + # This should never happen, as it should be caught in + # _parse_template_line + raise DistlibException( + 'invalid action %r' % action) + + # + # Private API + # + + def _parse_directive(self, directive): + """ + Validate a directive. + :param directive: The directive to validate. + :return: A tuple of action, patterns, thedir, dir_patterns + """ + words = directive.split() + if len(words) == 1 and words[0] not in ('include', 'exclude', + 'global-include', + 'global-exclude', + 'recursive-include', + 'recursive-exclude', + 'graft', 'prune'): + # no action given, let's use the default 'include' + words.insert(0, 'include') + + action = words[0] + patterns = thedir = dir_pattern = None + + if action in ('include', 'exclude', + 'global-include', 'global-exclude'): + if len(words) < 2: + raise DistlibException( + '%r expects ...' % action) + + patterns = [convert_path(word) for word in words[1:]] + + elif action in ('recursive-include', 'recursive-exclude'): + if len(words) < 3: + raise DistlibException( + '%r expects ...' % action) + + thedir = convert_path(words[1]) + patterns = [convert_path(word) for word in words[2:]] + + elif action in ('graft', 'prune'): + if len(words) != 2: + raise DistlibException( + '%r expects a single ' % action) + + dir_pattern = convert_path(words[1]) + + else: + raise DistlibException('unknown action %r' % action) + + return action, patterns, thedir, dir_pattern + + def _include_pattern(self, pattern, anchor=True, prefix=None, + is_regex=False): + """Select strings (presumably filenames) from 'self.files' that + match 'pattern', a Unix-style wildcard (glob) pattern. + + Patterns are not quite the same as implemented by the 'fnmatch' + module: '*' and '?' match non-special characters, where "special" + is platform-dependent: slash on Unix; colon, slash, and backslash on + DOS/Windows; and colon on Mac OS. + + If 'anchor' is true (the default), then the pattern match is more + stringent: "*.py" will match "foo.py" but not "foo/bar.py". If + 'anchor' is false, both of these will match. + + If 'prefix' is supplied, then only filenames starting with 'prefix' + (itself a pattern) and ending with 'pattern', with anything in between + them, will match. 'anchor' is ignored in this case. + + If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and + 'pattern' is assumed to be either a string containing a regex or a + regex object -- no translation is done, the regex is just compiled + and used as-is. + + Selected strings will be added to self.files. + + Return True if files are found. + """ + # XXX docstring lying about what the special chars are? + found = False + pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex) + + # delayed loading of allfiles list + if self.allfiles is None: + self.findall() + + for name in self.allfiles: + if pattern_re.search(name): + self.files.add(name) + found = True + return found + + def _exclude_pattern(self, pattern, anchor=True, prefix=None, + is_regex=False): + """Remove strings (presumably filenames) from 'files' that match + 'pattern'. + + Other parameters are the same as for 'include_pattern()', above. + The list 'self.files' is modified in place. Return True if files are + found. + + This API is public to allow e.g. exclusion of SCM subdirs, e.g. when + packaging source distributions + """ + found = False + pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex) + for f in list(self.files): + if pattern_re.search(f): + self.files.remove(f) + found = True + return found + + def _translate_pattern(self, pattern, anchor=True, prefix=None, + is_regex=False): + """Translate a shell-like wildcard pattern to a compiled regular + expression. + + Return the compiled regex. If 'is_regex' true, + then 'pattern' is directly compiled to a regex (if it's a string) + or just returned as-is (assumes it's a regex object). + """ + if is_regex: + if isinstance(pattern, str): + return re.compile(pattern) + else: + return pattern + + if _PYTHON_VERSION > (3, 2): + # ditch start and end characters + start, _, end = self._glob_to_re('_').partition('_') + + if pattern: + pattern_re = self._glob_to_re(pattern) + if _PYTHON_VERSION > (3, 2): + assert pattern_re.startswith(start) and pattern_re.endswith(end) + else: + pattern_re = '' + + base = re.escape(os.path.join(self.base, '')) + if prefix is not None: + # ditch end of pattern character + if _PYTHON_VERSION <= (3, 2): + empty_pattern = self._glob_to_re('') + prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)] + else: + prefix_re = self._glob_to_re(prefix) + assert prefix_re.startswith(start) and prefix_re.endswith(end) + prefix_re = prefix_re[len(start): len(prefix_re) - len(end)] + sep = os.sep + if os.sep == '\\': + sep = r'\\' + if _PYTHON_VERSION <= (3, 2): + pattern_re = '^' + base + sep.join((prefix_re, + '.*' + pattern_re)) + else: + pattern_re = pattern_re[len(start): len(pattern_re) - len(end)] + pattern_re = r'%s%s%s%s.*%s%s' % (start, base, prefix_re, sep, + pattern_re, end) + else: # no prefix -- respect anchor flag + if anchor: + if _PYTHON_VERSION <= (3, 2): + pattern_re = '^' + base + pattern_re + else: + pattern_re = r'%s%s%s' % (start, base, pattern_re[len(start):]) + + return re.compile(pattern_re) + + def _glob_to_re(self, pattern): + """Translate a shell-like glob pattern to a regular expression. + + Return a string containing the regex. Differs from + 'fnmatch.translate()' in that '*' does not match "special characters" + (which are platform-specific). + """ + pattern_re = fnmatch.translate(pattern) + + # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which + # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, + # and by extension they shouldn't match such "special characters" under + # any OS. So change all non-escaped dots in the RE to match any + # character except the special characters (currently: just os.sep). + sep = os.sep + if os.sep == '\\': + # we're using a regex to manipulate a regex, so we need + # to escape the backslash twice + sep = r'\\\\' + escaped = r'\1[^%s]' % sep + pattern_re = re.sub(r'((? y, + '!=': lambda x, y: x != y, + '<': lambda x, y: x < y, + '<=': lambda x, y: x == y or x < y, + '>': lambda x, y: x > y, + '>=': lambda x, y: x == y or x > y, + 'and': lambda x, y: x and y, + 'or': lambda x, y: x or y, + 'in': lambda x, y: x in y, + 'not in': lambda x, y: x not in y, + } + + def evaluate(self, expr, context): + """ + Evaluate a marker expression returned by the :func:`parse_requirement` + function in the specified context. + """ + if isinstance(expr, string_types): + if expr[0] in '\'"': + result = expr[1:-1] + else: + if expr not in context: + raise SyntaxError('unknown variable: %s' % expr) + result = context[expr] + else: + assert isinstance(expr, dict) + op = expr['op'] + if op not in self.operations: + raise NotImplementedError('op not implemented: %s' % op) + elhs = expr['lhs'] + erhs = expr['rhs'] + if _is_literal(expr['lhs']) and _is_literal(expr['rhs']): + raise SyntaxError('invalid comparison: %s %s %s' % (elhs, op, erhs)) + + lhs = self.evaluate(elhs, context) + rhs = self.evaluate(erhs, context) + if ((_is_version_marker(elhs) or _is_version_marker(erhs)) and + op in ('<', '<=', '>', '>=', '===', '==', '!=', '~=')): + lhs = LV(lhs) + rhs = LV(rhs) + elif _is_version_marker(elhs) and op in ('in', 'not in'): + lhs = LV(lhs) + rhs = _get_versions(rhs) + result = self.operations[op](lhs, rhs) + return result + + +_DIGITS = re.compile(r'\d+\.\d+') + + +def default_context(): + + def format_full_version(info): + version = '%s.%s.%s' % (info.major, info.minor, info.micro) + kind = info.releaselevel + if kind != 'final': + version += kind[0] + str(info.serial) + return version + + if hasattr(sys, 'implementation'): + implementation_version = format_full_version(sys.implementation.version) + implementation_name = sys.implementation.name + else: + implementation_version = '0' + implementation_name = '' + + ppv = platform.python_version() + m = _DIGITS.match(ppv) + pv = m.group(0) + result = { + 'implementation_name': implementation_name, + 'implementation_version': implementation_version, + 'os_name': os.name, + 'platform_machine': platform.machine(), + 'platform_python_implementation': platform.python_implementation(), + 'platform_release': platform.release(), + 'platform_system': platform.system(), + 'platform_version': platform.version(), + 'platform_in_venv': str(in_venv()), + 'python_full_version': ppv, + 'python_version': pv, + 'sys_platform': sys.platform, + } + return result + + +DEFAULT_CONTEXT = default_context() +del default_context + +evaluator = Evaluator() + + +def interpret(marker, execution_context=None): + """ + Interpret a marker and return a result depending on environment. + + :param marker: The marker to interpret. + :type marker: str + :param execution_context: The context used for name lookup. + :type execution_context: mapping + """ + try: + expr, rest = parse_marker(marker) + except Exception as e: + raise SyntaxError('Unable to interpret marker syntax: %s: %s' % (marker, e)) + if rest and rest[0] != '#': + raise SyntaxError('unexpected trailing data in marker: %s: %s' % (marker, rest)) + context = dict(DEFAULT_CONTEXT) + if execution_context: + context.update(execution_context) + return evaluator.evaluate(expr, context) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..ce9a34b3e243ec7c15db48bc91623d8468a1a5f2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.py @@ -0,0 +1,1031 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012 The Python Software Foundation. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +"""Implementation of the Metadata for Python packages PEPs. + +Supports all metadata formats (1.0, 1.1, 1.2, 1.3/2.1 and 2.2). +""" +from __future__ import unicode_literals + +import codecs +from email import message_from_file +import json +import logging +import re + +from . import DistlibException, __version__ +from .compat import StringIO, string_types, text_type +from .markers import interpret +from .util import extract_by_key, get_extras +from .version import get_scheme, PEP440_VERSION_RE + +logger = logging.getLogger(__name__) + + +class MetadataMissingError(DistlibException): + """A required metadata is missing""" + + +class MetadataConflictError(DistlibException): + """Attempt to read or write metadata fields that are conflictual.""" + + +class MetadataUnrecognizedVersionError(DistlibException): + """Unknown metadata version number.""" + + +class MetadataInvalidError(DistlibException): + """A metadata value is invalid""" + + +# public API of this module +__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION'] + +# Encoding used for the PKG-INFO files +PKG_INFO_ENCODING = 'utf-8' + +# preferred version. Hopefully will be changed +# to 1.2 once PEP 345 is supported everywhere +PKG_INFO_PREFERRED_VERSION = '1.1' + +_LINE_PREFIX_1_2 = re.compile('\n \\|') +_LINE_PREFIX_PRE_1_2 = re.compile('\n ') +_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', 'Summary', 'Description', 'Keywords', 'Home-page', + 'Author', 'Author-email', 'License') + +_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', 'Supported-Platform', 'Summary', 'Description', + 'Keywords', 'Home-page', 'Author', 'Author-email', 'License', 'Classifier', 'Download-URL', 'Obsoletes', + 'Provides', 'Requires') + +_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier', 'Download-URL') + +_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', 'Supported-Platform', 'Summary', 'Description', + 'Keywords', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', + 'Classifier', 'Download-URL', 'Obsoletes-Dist', 'Project-URL', 'Provides-Dist', 'Requires-Dist', + 'Requires-Python', 'Requires-External') + +_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python', 'Obsoletes-Dist', 'Requires-External', + 'Maintainer', 'Maintainer-email', 'Project-URL') + +_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', 'Supported-Platform', 'Summary', 'Description', + 'Keywords', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', + 'Classifier', 'Download-URL', 'Obsoletes-Dist', 'Project-URL', 'Provides-Dist', 'Requires-Dist', + 'Requires-Python', 'Requires-External', 'Private-Version', 'Obsoleted-By', 'Setup-Requires-Dist', + 'Extension', 'Provides-Extra') + +_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By', 'Setup-Requires-Dist', 'Extension') + +# See issue #106: Sometimes 'Requires' and 'Provides' occur wrongly in +# the metadata. Include them in the tuple literal below to allow them +# (for now). +# Ditto for Obsoletes - see issue #140. +_566_FIELDS = _426_FIELDS + ('Description-Content-Type', 'Requires', 'Provides', 'Obsoletes') + +_566_MARKERS = ('Description-Content-Type', ) + +_643_MARKERS = ('Dynamic', 'License-File') + +_643_FIELDS = _566_FIELDS + _643_MARKERS + +_ALL_FIELDS = set() +_ALL_FIELDS.update(_241_FIELDS) +_ALL_FIELDS.update(_314_FIELDS) +_ALL_FIELDS.update(_345_FIELDS) +_ALL_FIELDS.update(_426_FIELDS) +_ALL_FIELDS.update(_566_FIELDS) +_ALL_FIELDS.update(_643_FIELDS) + +EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''') + + +def _version2fieldlist(version): + if version == '1.0': + return _241_FIELDS + elif version == '1.1': + return _314_FIELDS + elif version == '1.2': + return _345_FIELDS + elif version in ('1.3', '2.1'): + # avoid adding field names if already there + return _345_FIELDS + tuple(f for f in _566_FIELDS if f not in _345_FIELDS) + elif version == '2.0': + raise ValueError('Metadata 2.0 is withdrawn and not supported') + # return _426_FIELDS + elif version == '2.2': + return _643_FIELDS + raise MetadataUnrecognizedVersionError(version) + + +def _best_version(fields): + """Detect the best version depending on the fields used.""" + + def _has_marker(keys, markers): + return any(marker in keys for marker in markers) + + keys = [key for key, value in fields.items() if value not in ([], 'UNKNOWN', None)] + possible_versions = ['1.0', '1.1', '1.2', '1.3', '2.1', '2.2'] # 2.0 removed + + # first let's try to see if a field is not part of one of the version + for key in keys: + if key not in _241_FIELDS and '1.0' in possible_versions: + possible_versions.remove('1.0') + logger.debug('Removed 1.0 due to %s', key) + if key not in _314_FIELDS and '1.1' in possible_versions: + possible_versions.remove('1.1') + logger.debug('Removed 1.1 due to %s', key) + if key not in _345_FIELDS and '1.2' in possible_versions: + possible_versions.remove('1.2') + logger.debug('Removed 1.2 due to %s', key) + if key not in _566_FIELDS and '1.3' in possible_versions: + possible_versions.remove('1.3') + logger.debug('Removed 1.3 due to %s', key) + if key not in _566_FIELDS and '2.1' in possible_versions: + if key != 'Description': # In 2.1, description allowed after headers + possible_versions.remove('2.1') + logger.debug('Removed 2.1 due to %s', key) + if key not in _643_FIELDS and '2.2' in possible_versions: + possible_versions.remove('2.2') + logger.debug('Removed 2.2 due to %s', key) + # if key not in _426_FIELDS and '2.0' in possible_versions: + # possible_versions.remove('2.0') + # logger.debug('Removed 2.0 due to %s', key) + + # possible_version contains qualified versions + if len(possible_versions) == 1: + return possible_versions[0] # found ! + elif len(possible_versions) == 0: + logger.debug('Out of options - unknown metadata set: %s', fields) + raise MetadataConflictError('Unknown metadata set') + + # let's see if one unique marker is found + is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS) + is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS) + is_2_1 = '2.1' in possible_versions and _has_marker(keys, _566_MARKERS) + # is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS) + is_2_2 = '2.2' in possible_versions and _has_marker(keys, _643_MARKERS) + if int(is_1_1) + int(is_1_2) + int(is_2_1) + int(is_2_2) > 1: + raise MetadataConflictError('You used incompatible 1.1/1.2/2.1/2.2 fields') + + # we have the choice, 1.0, or 1.2, 2.1 or 2.2 + # - 1.0 has a broken Summary field but works with all tools + # - 1.1 is to avoid + # - 1.2 fixes Summary but has little adoption + # - 2.1 adds more features + # - 2.2 is the latest + if not is_1_1 and not is_1_2 and not is_2_1 and not is_2_2: + # we couldn't find any specific marker + if PKG_INFO_PREFERRED_VERSION in possible_versions: + return PKG_INFO_PREFERRED_VERSION + if is_1_1: + return '1.1' + if is_1_2: + return '1.2' + if is_2_1: + return '2.1' + # if is_2_2: + # return '2.2' + + return '2.2' + + +# This follows the rules about transforming keys as described in +# https://www.python.org/dev/peps/pep-0566/#id17 +_ATTR2FIELD = {name.lower().replace("-", "_"): name for name in _ALL_FIELDS} +_FIELD2ATTR = {field: attr for attr, field in _ATTR2FIELD.items()} + +_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist') +_VERSIONS_FIELDS = ('Requires-Python', ) +_VERSION_FIELDS = ('Version', ) +_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes', 'Requires', 'Provides', 'Obsoletes-Dist', 'Provides-Dist', + 'Requires-Dist', 'Requires-External', 'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist', + 'Provides-Extra', 'Extension', 'License-File') +_LISTTUPLEFIELDS = ('Project-URL', ) + +_ELEMENTSFIELD = ('Keywords', ) + +_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description') + +_MISSING = object() + +_FILESAFE = re.compile('[^A-Za-z0-9.]+') + + +def _get_name_and_version(name, version, for_filename=False): + """Return the distribution name with version. + + If for_filename is true, return a filename-escaped form.""" + if for_filename: + # For both name and version any runs of non-alphanumeric or '.' + # characters are replaced with a single '-'. Additionally any + # spaces in the version string become '.' + name = _FILESAFE.sub('-', name) + version = _FILESAFE.sub('-', version.replace(' ', '.')) + return '%s-%s' % (name, version) + + +class LegacyMetadata(object): + """The legacy metadata of a release. + + Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can + instantiate the class with one of these arguments (or none): + - *path*, the path to a metadata file + - *fileobj* give a file-like object with metadata as content + - *mapping* is a dict-like object + - *scheme* is a version scheme name + """ + + # TODO document the mapping API and UNKNOWN default key + + def __init__(self, path=None, fileobj=None, mapping=None, scheme='default'): + if [path, fileobj, mapping].count(None) < 2: + raise TypeError('path, fileobj and mapping are exclusive') + self._fields = {} + self.requires_files = [] + self._dependencies = None + self.scheme = scheme + if path is not None: + self.read(path) + elif fileobj is not None: + self.read_file(fileobj) + elif mapping is not None: + self.update(mapping) + self.set_metadata_version() + + def set_metadata_version(self): + self._fields['Metadata-Version'] = _best_version(self._fields) + + def _write_field(self, fileobj, name, value): + fileobj.write('%s: %s\n' % (name, value)) + + def __getitem__(self, name): + return self.get(name) + + def __setitem__(self, name, value): + return self.set(name, value) + + def __delitem__(self, name): + field_name = self._convert_name(name) + try: + del self._fields[field_name] + except KeyError: + raise KeyError(name) + + def __contains__(self, name): + return (name in self._fields or self._convert_name(name) in self._fields) + + def _convert_name(self, name): + if name in _ALL_FIELDS: + return name + name = name.replace('-', '_').lower() + return _ATTR2FIELD.get(name, name) + + def _default_value(self, name): + if name in _LISTFIELDS or name in _ELEMENTSFIELD: + return [] + return 'UNKNOWN' + + def _remove_line_prefix(self, value): + if self.metadata_version in ('1.0', '1.1'): + return _LINE_PREFIX_PRE_1_2.sub('\n', value) + else: + return _LINE_PREFIX_1_2.sub('\n', value) + + def __getattr__(self, name): + if name in _ATTR2FIELD: + return self[name] + raise AttributeError(name) + + # + # Public API + # + + def get_fullname(self, filesafe=False): + """ + Return the distribution name with version. + + If filesafe is true, return a filename-escaped form. + """ + return _get_name_and_version(self['Name'], self['Version'], filesafe) + + def is_field(self, name): + """return True if name is a valid metadata key""" + name = self._convert_name(name) + return name in _ALL_FIELDS + + def is_multi_field(self, name): + name = self._convert_name(name) + return name in _LISTFIELDS + + def read(self, filepath): + """Read the metadata values from a file path.""" + fp = codecs.open(filepath, 'r', encoding='utf-8') + try: + self.read_file(fp) + finally: + fp.close() + + def read_file(self, fileob): + """Read the metadata values from a file object.""" + msg = message_from_file(fileob) + self._fields['Metadata-Version'] = msg['metadata-version'] + + # When reading, get all the fields we can + for field in _ALL_FIELDS: + if field not in msg: + continue + if field in _LISTFIELDS: + # we can have multiple lines + values = msg.get_all(field) + if field in _LISTTUPLEFIELDS and values is not None: + values = [tuple(value.split(',')) for value in values] + self.set(field, values) + else: + # single line + value = msg[field] + if value is not None and value != 'UNKNOWN': + self.set(field, value) + + # PEP 566 specifies that the body be used for the description, if + # available + body = msg.get_payload() + self["Description"] = body if body else self["Description"] + # logger.debug('Attempting to set metadata for %s', self) + # self.set_metadata_version() + + def write(self, filepath, skip_unknown=False): + """Write the metadata fields to filepath.""" + fp = codecs.open(filepath, 'w', encoding='utf-8') + try: + self.write_file(fp, skip_unknown) + finally: + fp.close() + + def write_file(self, fileobject, skip_unknown=False): + """Write the PKG-INFO format data to a file object.""" + self.set_metadata_version() + + for field in _version2fieldlist(self['Metadata-Version']): + values = self.get(field) + if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']): + continue + if field in _ELEMENTSFIELD: + self._write_field(fileobject, field, ','.join(values)) + continue + if field not in _LISTFIELDS: + if field == 'Description': + if self.metadata_version in ('1.0', '1.1'): + values = values.replace('\n', '\n ') + else: + values = values.replace('\n', '\n |') + values = [values] + + if field in _LISTTUPLEFIELDS: + values = [','.join(value) for value in values] + + for value in values: + self._write_field(fileobject, field, value) + + def update(self, other=None, **kwargs): + """Set metadata values from the given iterable `other` and kwargs. + + Behavior is like `dict.update`: If `other` has a ``keys`` method, + they are looped over and ``self[key]`` is assigned ``other[key]``. + Else, ``other`` is an iterable of ``(key, value)`` iterables. + + Keys that don't match a metadata field or that have an empty value are + dropped. + """ + + def _set(key, value): + if key in _ATTR2FIELD and value: + self.set(self._convert_name(key), value) + + if not other: + # other is None or empty container + pass + elif hasattr(other, 'keys'): + for k in other.keys(): + _set(k, other[k]) + else: + for k, v in other: + _set(k, v) + + if kwargs: + for k, v in kwargs.items(): + _set(k, v) + + def set(self, name, value): + """Control then set a metadata field.""" + name = self._convert_name(name) + + if ((name in _ELEMENTSFIELD or name == 'Platform') and not isinstance(value, (list, tuple))): + if isinstance(value, string_types): + value = [v.strip() for v in value.split(',')] + else: + value = [] + elif (name in _LISTFIELDS and not isinstance(value, (list, tuple))): + if isinstance(value, string_types): + value = [value] + else: + value = [] + + if logger.isEnabledFor(logging.WARNING): + project_name = self['Name'] + + scheme = get_scheme(self.scheme) + if name in _PREDICATE_FIELDS and value is not None: + for v in value: + # check that the values are valid + if not scheme.is_valid_matcher(v.split(';')[0]): + logger.warning("'%s': '%s' is not valid (field '%s')", project_name, v, name) + # FIXME this rejects UNKNOWN, is that right? + elif name in _VERSIONS_FIELDS and value is not None: + if not scheme.is_valid_constraint_list(value): + logger.warning("'%s': '%s' is not a valid version (field '%s')", project_name, value, name) + elif name in _VERSION_FIELDS and value is not None: + if not scheme.is_valid_version(value): + logger.warning("'%s': '%s' is not a valid version (field '%s')", project_name, value, name) + + if name in _UNICODEFIELDS: + if name == 'Description': + value = self._remove_line_prefix(value) + + self._fields[name] = value + + def get(self, name, default=_MISSING): + """Get a metadata field.""" + name = self._convert_name(name) + if name not in self._fields: + if default is _MISSING: + default = self._default_value(name) + return default + if name in _UNICODEFIELDS: + value = self._fields[name] + return value + elif name in _LISTFIELDS: + value = self._fields[name] + if value is None: + return [] + res = [] + for val in value: + if name not in _LISTTUPLEFIELDS: + res.append(val) + else: + # That's for Project-URL + res.append((val[0], val[1])) + return res + + elif name in _ELEMENTSFIELD: + value = self._fields[name] + if isinstance(value, string_types): + return value.split(',') + return self._fields[name] + + def check(self, strict=False): + """Check if the metadata is compliant. If strict is True then raise if + no Name or Version are provided""" + self.set_metadata_version() + + # XXX should check the versions (if the file was loaded) + missing, warnings = [], [] + + for attr in ('Name', 'Version'): # required by PEP 345 + if attr not in self: + missing.append(attr) + + if strict and missing != []: + msg = 'missing required metadata: %s' % ', '.join(missing) + raise MetadataMissingError(msg) + + for attr in ('Home-page', 'Author'): + if attr not in self: + missing.append(attr) + + # checking metadata 1.2 (XXX needs to check 1.1, 1.0) + if self['Metadata-Version'] != '1.2': + return missing, warnings + + scheme = get_scheme(self.scheme) + + def are_valid_constraints(value): + for v in value: + if not scheme.is_valid_matcher(v.split(';')[0]): + return False + return True + + for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints), + (_VERSIONS_FIELDS, scheme.is_valid_constraint_list), (_VERSION_FIELDS, + scheme.is_valid_version)): + for field in fields: + value = self.get(field, None) + if value is not None and not controller(value): + warnings.append("Wrong value for '%s': %s" % (field, value)) + + return missing, warnings + + def todict(self, skip_missing=False): + """Return fields as a dict. + + Field names will be converted to use the underscore-lowercase style + instead of hyphen-mixed case (i.e. home_page instead of Home-page). + This is as per https://www.python.org/dev/peps/pep-0566/#id17. + """ + self.set_metadata_version() + + fields = _version2fieldlist(self['Metadata-Version']) + + data = {} + + for field_name in fields: + if not skip_missing or field_name in self._fields: + key = _FIELD2ATTR[field_name] + if key != 'project_url': + data[key] = self[field_name] + else: + data[key] = [','.join(u) for u in self[field_name]] + + return data + + def add_requirements(self, requirements): + if self['Metadata-Version'] == '1.1': + # we can't have 1.1 metadata *and* Setuptools requires + for field in ('Obsoletes', 'Requires', 'Provides'): + if field in self: + del self[field] + self['Requires-Dist'] += requirements + + # Mapping API + # TODO could add iter* variants + + def keys(self): + return list(_version2fieldlist(self['Metadata-Version'])) + + def __iter__(self): + for key in self.keys(): + yield key + + def values(self): + return [self[key] for key in self.keys()] + + def items(self): + return [(key, self[key]) for key in self.keys()] + + def __repr__(self): + return '<%s %s %s>' % (self.__class__.__name__, self.name, self.version) + + +METADATA_FILENAME = 'pydist.json' +WHEEL_METADATA_FILENAME = 'metadata.json' +LEGACY_METADATA_FILENAME = 'METADATA' + + +class Metadata(object): + """ + The metadata of a release. This implementation uses 2.1 + metadata where possible. If not possible, it wraps a LegacyMetadata + instance which handles the key-value metadata format. + """ + + METADATA_VERSION_MATCHER = re.compile(r'^\d+(\.\d+)*$') + + NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I) + + FIELDNAME_MATCHER = re.compile('^[A-Z]([0-9A-Z-]*[0-9A-Z])?$', re.I) + + VERSION_MATCHER = PEP440_VERSION_RE + + SUMMARY_MATCHER = re.compile('.{1,2047}') + + METADATA_VERSION = '2.0' + + GENERATOR = 'distlib (%s)' % __version__ + + MANDATORY_KEYS = { + 'name': (), + 'version': (), + 'summary': ('legacy', ), + } + + INDEX_KEYS = ('name version license summary description author ' + 'author_email keywords platform home_page classifiers ' + 'download_url') + + DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires ' + 'dev_requires provides meta_requires obsoleted_by ' + 'supports_environments') + + SYNTAX_VALIDATORS = { + 'metadata_version': (METADATA_VERSION_MATCHER, ()), + 'name': (NAME_MATCHER, ('legacy', )), + 'version': (VERSION_MATCHER, ('legacy', )), + 'summary': (SUMMARY_MATCHER, ('legacy', )), + 'dynamic': (FIELDNAME_MATCHER, ('legacy', )), + } + + __slots__ = ('_legacy', '_data', 'scheme') + + def __init__(self, path=None, fileobj=None, mapping=None, scheme='default'): + if [path, fileobj, mapping].count(None) < 2: + raise TypeError('path, fileobj and mapping are exclusive') + self._legacy = None + self._data = None + self.scheme = scheme + # import pdb; pdb.set_trace() + if mapping is not None: + try: + self._validate_mapping(mapping, scheme) + self._data = mapping + except MetadataUnrecognizedVersionError: + self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme) + self.validate() + else: + data = None + if path: + with open(path, 'rb') as f: + data = f.read() + elif fileobj: + data = fileobj.read() + if data is None: + # Initialised with no args - to be added + self._data = { + 'metadata_version': self.METADATA_VERSION, + 'generator': self.GENERATOR, + } + else: + if not isinstance(data, text_type): + data = data.decode('utf-8') + try: + self._data = json.loads(data) + self._validate_mapping(self._data, scheme) + except ValueError: + # Note: MetadataUnrecognizedVersionError does not + # inherit from ValueError (it's a DistlibException, + # which should not inherit from ValueError). + # The ValueError comes from the json.load - if that + # succeeds and we get a validation error, we want + # that to propagate + self._legacy = LegacyMetadata(fileobj=StringIO(data), scheme=scheme) + self.validate() + + common_keys = set(('name', 'version', 'license', 'keywords', 'summary')) + + none_list = (None, list) + none_dict = (None, dict) + + mapped_keys = { + 'run_requires': ('Requires-Dist', list), + 'build_requires': ('Setup-Requires-Dist', list), + 'dev_requires': none_list, + 'test_requires': none_list, + 'meta_requires': none_list, + 'extras': ('Provides-Extra', list), + 'modules': none_list, + 'namespaces': none_list, + 'exports': none_dict, + 'commands': none_dict, + 'classifiers': ('Classifier', list), + 'source_url': ('Download-URL', None), + 'metadata_version': ('Metadata-Version', None), + } + + del none_list, none_dict + + def __getattribute__(self, key): + common = object.__getattribute__(self, 'common_keys') + mapped = object.__getattribute__(self, 'mapped_keys') + if key in mapped: + lk, maker = mapped[key] + if self._legacy: + if lk is None: + result = None if maker is None else maker() + else: + result = self._legacy.get(lk) + else: + value = None if maker is None else maker() + if key not in ('commands', 'exports', 'modules', 'namespaces', 'classifiers'): + result = self._data.get(key, value) + else: + # special cases for PEP 459 + sentinel = object() + result = sentinel + d = self._data.get('extensions') + if d: + if key == 'commands': + result = d.get('python.commands', value) + elif key == 'classifiers': + d = d.get('python.details') + if d: + result = d.get(key, value) + else: + d = d.get('python.exports') + if not d: + d = self._data.get('python.exports') + if d: + result = d.get(key, value) + if result is sentinel: + result = value + elif key not in common: + result = object.__getattribute__(self, key) + elif self._legacy: + result = self._legacy.get(key) + else: + result = self._data.get(key) + return result + + def _validate_value(self, key, value, scheme=None): + if key in self.SYNTAX_VALIDATORS: + pattern, exclusions = self.SYNTAX_VALIDATORS[key] + if (scheme or self.scheme) not in exclusions: + m = pattern.match(value) + if not m: + raise MetadataInvalidError("'%s' is an invalid value for " + "the '%s' property" % (value, key)) + + def __setattr__(self, key, value): + self._validate_value(key, value) + common = object.__getattribute__(self, 'common_keys') + mapped = object.__getattribute__(self, 'mapped_keys') + if key in mapped: + lk, _ = mapped[key] + if self._legacy: + if lk is None: + raise NotImplementedError + self._legacy[lk] = value + elif key not in ('commands', 'exports', 'modules', 'namespaces', 'classifiers'): + self._data[key] = value + else: + # special cases for PEP 459 + d = self._data.setdefault('extensions', {}) + if key == 'commands': + d['python.commands'] = value + elif key == 'classifiers': + d = d.setdefault('python.details', {}) + d[key] = value + else: + d = d.setdefault('python.exports', {}) + d[key] = value + elif key not in common: + object.__setattr__(self, key, value) + else: + if key == 'keywords': + if isinstance(value, string_types): + value = value.strip() + if value: + value = value.split() + else: + value = [] + if self._legacy: + self._legacy[key] = value + else: + self._data[key] = value + + @property + def name_and_version(self): + return _get_name_and_version(self.name, self.version, True) + + @property + def provides(self): + if self._legacy: + result = self._legacy['Provides-Dist'] + else: + result = self._data.setdefault('provides', []) + s = '%s (%s)' % (self.name, self.version) + if s not in result: + result.append(s) + return result + + @provides.setter + def provides(self, value): + if self._legacy: + self._legacy['Provides-Dist'] = value + else: + self._data['provides'] = value + + def get_requirements(self, reqts, extras=None, env=None): + """ + Base method to get dependencies, given a set of extras + to satisfy and an optional environment context. + :param reqts: A list of sometimes-wanted dependencies, + perhaps dependent on extras and environment. + :param extras: A list of optional components being requested. + :param env: An optional environment for marker evaluation. + """ + if self._legacy: + result = reqts + else: + result = [] + extras = get_extras(extras or [], self.extras) + for d in reqts: + if 'extra' not in d and 'environment' not in d: + # unconditional + include = True + else: + if 'extra' not in d: + # Not extra-dependent - only environment-dependent + include = True + else: + include = d.get('extra') in extras + if include: + # Not excluded because of extras, check environment + marker = d.get('environment') + if marker: + include = interpret(marker, env) + if include: + result.extend(d['requires']) + for key in ('build', 'dev', 'test'): + e = ':%s:' % key + if e in extras: + extras.remove(e) + # A recursive call, but it should terminate since 'test' + # has been removed from the extras + reqts = self._data.get('%s_requires' % key, []) + result.extend(self.get_requirements(reqts, extras=extras, env=env)) + return result + + @property + def dictionary(self): + if self._legacy: + return self._from_legacy() + return self._data + + @property + def dependencies(self): + if self._legacy: + raise NotImplementedError + else: + return extract_by_key(self._data, self.DEPENDENCY_KEYS) + + @dependencies.setter + def dependencies(self, value): + if self._legacy: + raise NotImplementedError + else: + self._data.update(value) + + def _validate_mapping(self, mapping, scheme): + if mapping.get('metadata_version') != self.METADATA_VERSION: + raise MetadataUnrecognizedVersionError() + missing = [] + for key, exclusions in self.MANDATORY_KEYS.items(): + if key not in mapping: + if scheme not in exclusions: + missing.append(key) + if missing: + msg = 'Missing metadata items: %s' % ', '.join(missing) + raise MetadataMissingError(msg) + for k, v in mapping.items(): + self._validate_value(k, v, scheme) + + def validate(self): + if self._legacy: + missing, warnings = self._legacy.check(True) + if missing or warnings: + logger.warning('Metadata: missing: %s, warnings: %s', missing, warnings) + else: + self._validate_mapping(self._data, self.scheme) + + def todict(self): + if self._legacy: + return self._legacy.todict(True) + else: + result = extract_by_key(self._data, self.INDEX_KEYS) + return result + + def _from_legacy(self): + assert self._legacy and not self._data + result = { + 'metadata_version': self.METADATA_VERSION, + 'generator': self.GENERATOR, + } + lmd = self._legacy.todict(True) # skip missing ones + for k in ('name', 'version', 'license', 'summary', 'description', 'classifier'): + if k in lmd: + if k == 'classifier': + nk = 'classifiers' + else: + nk = k + result[nk] = lmd[k] + kw = lmd.get('Keywords', []) + if kw == ['']: + kw = [] + result['keywords'] = kw + keys = (('requires_dist', 'run_requires'), ('setup_requires_dist', 'build_requires')) + for ok, nk in keys: + if ok in lmd and lmd[ok]: + result[nk] = [{'requires': lmd[ok]}] + result['provides'] = self.provides + # author = {} + # maintainer = {} + return result + + LEGACY_MAPPING = { + 'name': 'Name', + 'version': 'Version', + ('extensions', 'python.details', 'license'): 'License', + 'summary': 'Summary', + 'description': 'Description', + ('extensions', 'python.project', 'project_urls', 'Home'): 'Home-page', + ('extensions', 'python.project', 'contacts', 0, 'name'): 'Author', + ('extensions', 'python.project', 'contacts', 0, 'email'): 'Author-email', + 'source_url': 'Download-URL', + ('extensions', 'python.details', 'classifiers'): 'Classifier', + } + + def _to_legacy(self): + + def process_entries(entries): + reqts = set() + for e in entries: + extra = e.get('extra') + env = e.get('environment') + rlist = e['requires'] + for r in rlist: + if not env and not extra: + reqts.add(r) + else: + marker = '' + if extra: + marker = 'extra == "%s"' % extra + if env: + if marker: + marker = '(%s) and %s' % (env, marker) + else: + marker = env + reqts.add(';'.join((r, marker))) + return reqts + + assert self._data and not self._legacy + result = LegacyMetadata() + nmd = self._data + # import pdb; pdb.set_trace() + for nk, ok in self.LEGACY_MAPPING.items(): + if not isinstance(nk, tuple): + if nk in nmd: + result[ok] = nmd[nk] + else: + d = nmd + found = True + for k in nk: + try: + d = d[k] + except (KeyError, IndexError): + found = False + break + if found: + result[ok] = d + r1 = process_entries(self.run_requires + self.meta_requires) + r2 = process_entries(self.build_requires + self.dev_requires) + if self.extras: + result['Provides-Extra'] = sorted(self.extras) + result['Requires-Dist'] = sorted(r1) + result['Setup-Requires-Dist'] = sorted(r2) + # TODO: any other fields wanted + return result + + def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True): + if [path, fileobj].count(None) != 1: + raise ValueError('Exactly one of path and fileobj is needed') + self.validate() + if legacy: + if self._legacy: + legacy_md = self._legacy + else: + legacy_md = self._to_legacy() + if path: + legacy_md.write(path, skip_unknown=skip_unknown) + else: + legacy_md.write_file(fileobj, skip_unknown=skip_unknown) + else: + if self._legacy: + d = self._from_legacy() + else: + d = self._data + if fileobj: + json.dump(d, fileobj, ensure_ascii=True, indent=2, sort_keys=True) + else: + with codecs.open(path, 'w', 'utf-8') as f: + json.dump(d, f, ensure_ascii=True, indent=2, sort_keys=True) + + def add_requirements(self, requirements): + if self._legacy: + self._legacy.add_requirements(requirements) + else: + run_requires = self._data.setdefault('run_requires', []) + always = None + for entry in run_requires: + if 'environment' not in entry and 'extra' not in entry: + always = entry + break + if always is None: + always = {'requires': requirements} + run_requires.insert(0, always) + else: + rset = set(always['requires']) | set(requirements) + always['requires'] = sorted(rset) + + def __repr__(self): + name = self.name or '(no name)' + version = self.version or 'no version' + return '<%s %s %s (%s)>' % (self.__class__.__name__, self.metadata_version, name, version) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py new file mode 100644 index 0000000000000000000000000000000000000000..fef52aa103ea369c96567b9af2a5a0ba14db5cb9 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py @@ -0,0 +1,358 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2013-2017 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +from __future__ import unicode_literals + +import bisect +import io +import logging +import os +import pkgutil +import sys +import types +import zipimport + +from . import DistlibException +from .util import cached_property, get_cache_base, Cache + +logger = logging.getLogger(__name__) + + +cache = None # created when needed + + +class ResourceCache(Cache): + def __init__(self, base=None): + if base is None: + # Use native string to avoid issues on 2.x: see Python #20140. + base = os.path.join(get_cache_base(), str('resource-cache')) + super(ResourceCache, self).__init__(base) + + def is_stale(self, resource, path): + """ + Is the cache stale for the given resource? + + :param resource: The :class:`Resource` being cached. + :param path: The path of the resource in the cache. + :return: True if the cache is stale. + """ + # Cache invalidation is a hard problem :-) + return True + + def get(self, resource): + """ + Get a resource into the cache, + + :param resource: A :class:`Resource` instance. + :return: The pathname of the resource in the cache. + """ + prefix, path = resource.finder.get_cache_info(resource) + if prefix is None: + result = path + else: + result = os.path.join(self.base, self.prefix_to_dir(prefix), path) + dirname = os.path.dirname(result) + if not os.path.isdir(dirname): + os.makedirs(dirname) + if not os.path.exists(result): + stale = True + else: + stale = self.is_stale(resource, path) + if stale: + # write the bytes of the resource to the cache location + with open(result, 'wb') as f: + f.write(resource.bytes) + return result + + +class ResourceBase(object): + def __init__(self, finder, name): + self.finder = finder + self.name = name + + +class Resource(ResourceBase): + """ + A class representing an in-package resource, such as a data file. This is + not normally instantiated by user code, but rather by a + :class:`ResourceFinder` which manages the resource. + """ + is_container = False # Backwards compatibility + + def as_stream(self): + """ + Get the resource as a stream. + + This is not a property to make it obvious that it returns a new stream + each time. + """ + return self.finder.get_stream(self) + + @cached_property + def file_path(self): + global cache + if cache is None: + cache = ResourceCache() + return cache.get(self) + + @cached_property + def bytes(self): + return self.finder.get_bytes(self) + + @cached_property + def size(self): + return self.finder.get_size(self) + + +class ResourceContainer(ResourceBase): + is_container = True # Backwards compatibility + + @cached_property + def resources(self): + return self.finder.get_resources(self) + + +class ResourceFinder(object): + """ + Resource finder for file system resources. + """ + + if sys.platform.startswith('java'): + skipped_extensions = ('.pyc', '.pyo', '.class') + else: + skipped_extensions = ('.pyc', '.pyo') + + def __init__(self, module): + self.module = module + self.loader = getattr(module, '__loader__', None) + self.base = os.path.dirname(getattr(module, '__file__', '')) + + def _adjust_path(self, path): + return os.path.realpath(path) + + def _make_path(self, resource_name): + # Issue #50: need to preserve type of path on Python 2.x + # like os.path._get_sep + if isinstance(resource_name, bytes): # should only happen on 2.x + sep = b'/' + else: + sep = '/' + parts = resource_name.split(sep) + parts.insert(0, self.base) + result = os.path.join(*parts) + return self._adjust_path(result) + + def _find(self, path): + return os.path.exists(path) + + def get_cache_info(self, resource): + return None, resource.path + + def find(self, resource_name): + path = self._make_path(resource_name) + if not self._find(path): + result = None + else: + if self._is_directory(path): + result = ResourceContainer(self, resource_name) + else: + result = Resource(self, resource_name) + result.path = path + return result + + def get_stream(self, resource): + return open(resource.path, 'rb') + + def get_bytes(self, resource): + with open(resource.path, 'rb') as f: + return f.read() + + def get_size(self, resource): + return os.path.getsize(resource.path) + + def get_resources(self, resource): + def allowed(f): + return (f != '__pycache__' and not + f.endswith(self.skipped_extensions)) + return set([f for f in os.listdir(resource.path) if allowed(f)]) + + def is_container(self, resource): + return self._is_directory(resource.path) + + _is_directory = staticmethod(os.path.isdir) + + def iterator(self, resource_name): + resource = self.find(resource_name) + if resource is not None: + todo = [resource] + while todo: + resource = todo.pop(0) + yield resource + if resource.is_container: + rname = resource.name + for name in resource.resources: + if not rname: + new_name = name + else: + new_name = '/'.join([rname, name]) + child = self.find(new_name) + if child.is_container: + todo.append(child) + else: + yield child + + +class ZipResourceFinder(ResourceFinder): + """ + Resource finder for resources in .zip files. + """ + def __init__(self, module): + super(ZipResourceFinder, self).__init__(module) + archive = self.loader.archive + self.prefix_len = 1 + len(archive) + # PyPy doesn't have a _files attr on zipimporter, and you can't set one + if hasattr(self.loader, '_files'): + self._files = self.loader._files + else: + self._files = zipimport._zip_directory_cache[archive] + self.index = sorted(self._files) + + def _adjust_path(self, path): + return path + + def _find(self, path): + path = path[self.prefix_len:] + if path in self._files: + result = True + else: + if path and path[-1] != os.sep: + path = path + os.sep + i = bisect.bisect(self.index, path) + try: + result = self.index[i].startswith(path) + except IndexError: + result = False + if not result: + logger.debug('_find failed: %r %r', path, self.loader.prefix) + else: + logger.debug('_find worked: %r %r', path, self.loader.prefix) + return result + + def get_cache_info(self, resource): + prefix = self.loader.archive + path = resource.path[1 + len(prefix):] + return prefix, path + + def get_bytes(self, resource): + return self.loader.get_data(resource.path) + + def get_stream(self, resource): + return io.BytesIO(self.get_bytes(resource)) + + def get_size(self, resource): + path = resource.path[self.prefix_len:] + return self._files[path][3] + + def get_resources(self, resource): + path = resource.path[self.prefix_len:] + if path and path[-1] != os.sep: + path += os.sep + plen = len(path) + result = set() + i = bisect.bisect(self.index, path) + while i < len(self.index): + if not self.index[i].startswith(path): + break + s = self.index[i][plen:] + result.add(s.split(os.sep, 1)[0]) # only immediate children + i += 1 + return result + + def _is_directory(self, path): + path = path[self.prefix_len:] + if path and path[-1] != os.sep: + path += os.sep + i = bisect.bisect(self.index, path) + try: + result = self.index[i].startswith(path) + except IndexError: + result = False + return result + + +_finder_registry = { + type(None): ResourceFinder, + zipimport.zipimporter: ZipResourceFinder +} + +try: + # In Python 3.6, _frozen_importlib -> _frozen_importlib_external + try: + import _frozen_importlib_external as _fi + except ImportError: + import _frozen_importlib as _fi + _finder_registry[_fi.SourceFileLoader] = ResourceFinder + _finder_registry[_fi.FileFinder] = ResourceFinder + # See issue #146 + _finder_registry[_fi.SourcelessFileLoader] = ResourceFinder + del _fi +except (ImportError, AttributeError): + pass + + +def register_finder(loader, finder_maker): + _finder_registry[type(loader)] = finder_maker + + +_finder_cache = {} + + +def finder(package): + """ + Return a resource finder for a package. + :param package: The name of the package. + :return: A :class:`ResourceFinder` instance for the package. + """ + if package in _finder_cache: + result = _finder_cache[package] + else: + if package not in sys.modules: + __import__(package) + module = sys.modules[package] + path = getattr(module, '__path__', None) + if path is None: + raise DistlibException('You cannot get a finder for a module, ' + 'only for a package') + loader = getattr(module, '__loader__', None) + finder_maker = _finder_registry.get(type(loader)) + if finder_maker is None: + raise DistlibException('Unable to locate finder for %r' % package) + result = finder_maker(module) + _finder_cache[package] = result + return result + + +_dummy_module = types.ModuleType(str('__dummy__')) + + +def finder_for_path(path): + """ + Return a resource finder for a path, which should represent a container. + + :param path: The path. + :return: A :class:`ResourceFinder` instance for the path. + """ + result = None + # calls any path hooks, gets importer into cache + pkgutil.get_importer(path) + loader = sys.path_importer_cache.get(path) + finder = _finder_registry.get(type(loader)) + if finder: + module = _dummy_module + module.__file__ = os.path.join(path, '') + module.__loader__ = loader + result = finder(module) + return result diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..b1fc705b7e643d0a9f315c6a51fa894dce1ac3d0 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py @@ -0,0 +1,447 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2013-2023 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +from io import BytesIO +import logging +import os +import re +import struct +import sys +import time +from zipfile import ZipInfo + +from .compat import sysconfig, detect_encoding, ZipFile +from .resources import finder +from .util import (FileOperator, get_export_entry, convert_path, get_executable, get_platform, in_venv) + +logger = logging.getLogger(__name__) + +_DEFAULT_MANIFEST = ''' + + + + + + + + + + + + +'''.strip() + +# check if Python is called on the first line with this expression +FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$') +SCRIPT_TEMPLATE = r'''# -*- coding: utf-8 -*- +import re +import sys +from %(module)s import %(import_name)s +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(%(func)s()) +''' + +# Pre-fetch the contents of all executable wrapper stubs. +# This is to address https://github.com/pypa/pip/issues/12666. +# When updating pip, we rename the old pip in place before installing the +# new version. If we try to fetch a wrapper *after* that rename, the finder +# machinery will be confused as the package is no longer available at the +# location where it was imported from. So we load everything into memory in +# advance. + +if os.name == 'nt' or (os.name == 'java' and os._name == 'nt'): + # Issue 31: don't hardcode an absolute package name, but + # determine it relative to the current package + DISTLIB_PACKAGE = __name__.rsplit('.', 1)[0] + + WRAPPERS = { + r.name: r.bytes + for r in finder(DISTLIB_PACKAGE).iterator("") + if r.name.endswith(".exe") + } + + +def enquote_executable(executable): + if ' ' in executable: + # make sure we quote only the executable in case of env + # for example /usr/bin/env "/dir with spaces/bin/jython" + # instead of "/usr/bin/env /dir with spaces/bin/jython" + # otherwise whole + if executable.startswith('/usr/bin/env '): + env, _executable = executable.split(' ', 1) + if ' ' in _executable and not _executable.startswith('"'): + executable = '%s "%s"' % (env, _executable) + else: + if not executable.startswith('"'): + executable = '"%s"' % executable + return executable + + +# Keep the old name around (for now), as there is at least one project using it! +_enquote_executable = enquote_executable + + +class ScriptMaker(object): + """ + A class to copy or create scripts from source scripts or callable + specifications. + """ + script_template = SCRIPT_TEMPLATE + + executable = None # for shebangs + + def __init__(self, source_dir, target_dir, add_launchers=True, dry_run=False, fileop=None): + self.source_dir = source_dir + self.target_dir = target_dir + self.add_launchers = add_launchers + self.force = False + self.clobber = False + # It only makes sense to set mode bits on POSIX. + self.set_mode = (os.name == 'posix') or (os.name == 'java' and os._name == 'posix') + self.variants = set(('', 'X.Y')) + self._fileop = fileop or FileOperator(dry_run) + + self._is_nt = os.name == 'nt' or (os.name == 'java' and os._name == 'nt') + self.version_info = sys.version_info + + def _get_alternate_executable(self, executable, options): + if options.get('gui', False) and self._is_nt: # pragma: no cover + dn, fn = os.path.split(executable) + fn = fn.replace('python', 'pythonw') + executable = os.path.join(dn, fn) + return executable + + if sys.platform.startswith('java'): # pragma: no cover + + def _is_shell(self, executable): + """ + Determine if the specified executable is a script + (contains a #! line) + """ + try: + with open(executable) as fp: + return fp.read(2) == '#!' + except (OSError, IOError): + logger.warning('Failed to open %s', executable) + return False + + def _fix_jython_executable(self, executable): + if self._is_shell(executable): + # Workaround for Jython is not needed on Linux systems. + import java + + if java.lang.System.getProperty('os.name') == 'Linux': + return executable + elif executable.lower().endswith('jython.exe'): + # Use wrapper exe for Jython on Windows + return executable + return '/usr/bin/env %s' % executable + + def _build_shebang(self, executable, post_interp): + """ + Build a shebang line. In the simple case (on Windows, or a shebang line + which is not too long or contains spaces) use a simple formulation for + the shebang. Otherwise, use /bin/sh as the executable, with a contrived + shebang which allows the script to run either under Python or sh, using + suitable quoting. Thanks to Harald Nordgren for his input. + + See also: http://www.in-ulm.de/~mascheck/various/shebang/#length + https://hg.mozilla.org/mozilla-central/file/tip/mach + """ + if os.name != 'posix': + simple_shebang = True + elif getattr(sys, "cross_compiling", False): + # In a cross-compiling environment, the shebang will likely be a + # script; this *must* be invoked with the "safe" version of the + # shebang, or else using os.exec() to run the entry script will + # fail, raising "OSError 8 [Errno 8] Exec format error". + simple_shebang = False + else: + # Add 3 for '#!' prefix and newline suffix. + shebang_length = len(executable) + len(post_interp) + 3 + if sys.platform == 'darwin': + max_shebang_length = 512 + else: + max_shebang_length = 127 + simple_shebang = ((b' ' not in executable) and (shebang_length <= max_shebang_length)) + + if simple_shebang: + result = b'#!' + executable + post_interp + b'\n' + else: + result = b'#!/bin/sh\n' + result += b"'''exec' " + executable + post_interp + b' "$0" "$@"\n' + result += b"' '''\n" + return result + + def _get_shebang(self, encoding, post_interp=b'', options=None): + enquote = True + if self.executable: + executable = self.executable + enquote = False # assume this will be taken care of + elif not sysconfig.is_python_build(): + executable = get_executable() + elif in_venv(): # pragma: no cover + executable = os.path.join(sysconfig.get_path('scripts'), 'python%s' % sysconfig.get_config_var('EXE')) + else: # pragma: no cover + if os.name == 'nt': + # for Python builds from source on Windows, no Python executables with + # a version suffix are created, so we use python.exe + executable = os.path.join(sysconfig.get_config_var('BINDIR'), + 'python%s' % (sysconfig.get_config_var('EXE'))) + else: + executable = os.path.join( + sysconfig.get_config_var('BINDIR'), + 'python%s%s' % (sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('EXE'))) + if options: + executable = self._get_alternate_executable(executable, options) + + if sys.platform.startswith('java'): # pragma: no cover + executable = self._fix_jython_executable(executable) + + # Normalise case for Windows - COMMENTED OUT + # executable = os.path.normcase(executable) + # N.B. The normalising operation above has been commented out: See + # issue #124. Although paths in Windows are generally case-insensitive, + # they aren't always. For example, a path containing a ẞ (which is a + # LATIN CAPITAL LETTER SHARP S - U+1E9E) is normcased to ß (which is a + # LATIN SMALL LETTER SHARP S' - U+00DF). The two are not considered by + # Windows as equivalent in path names. + + # If the user didn't specify an executable, it may be necessary to + # cater for executable paths with spaces (not uncommon on Windows) + if enquote: + executable = enquote_executable(executable) + # Issue #51: don't use fsencode, since we later try to + # check that the shebang is decodable using utf-8. + executable = executable.encode('utf-8') + # in case of IronPython, play safe and enable frames support + if (sys.platform == 'cli' and '-X:Frames' not in post_interp and + '-X:FullFrames' not in post_interp): # pragma: no cover + post_interp += b' -X:Frames' + shebang = self._build_shebang(executable, post_interp) + # Python parser starts to read a script using UTF-8 until + # it gets a #coding:xxx cookie. The shebang has to be the + # first line of a file, the #coding:xxx cookie cannot be + # written before. So the shebang has to be decodable from + # UTF-8. + try: + shebang.decode('utf-8') + except UnicodeDecodeError: # pragma: no cover + raise ValueError('The shebang (%r) is not decodable from utf-8' % shebang) + # If the script is encoded to a custom encoding (use a + # #coding:xxx cookie), the shebang has to be decodable from + # the script encoding too. + if encoding != 'utf-8': + try: + shebang.decode(encoding) + except UnicodeDecodeError: # pragma: no cover + raise ValueError('The shebang (%r) is not decodable ' + 'from the script encoding (%r)' % (shebang, encoding)) + return shebang + + def _get_script_text(self, entry): + return self.script_template % dict( + module=entry.prefix, import_name=entry.suffix.split('.')[0], func=entry.suffix) + + manifest = _DEFAULT_MANIFEST + + def get_manifest(self, exename): + base = os.path.basename(exename) + return self.manifest % base + + def _write_script(self, names, shebang, script_bytes, filenames, ext): + use_launcher = self.add_launchers and self._is_nt + if not use_launcher: + script_bytes = shebang + script_bytes + else: # pragma: no cover + if ext == 'py': + launcher = self._get_launcher('t') + else: + launcher = self._get_launcher('w') + stream = BytesIO() + with ZipFile(stream, 'w') as zf: + source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH') + if source_date_epoch: + date_time = time.gmtime(int(source_date_epoch))[:6] + zinfo = ZipInfo(filename='__main__.py', date_time=date_time) + zf.writestr(zinfo, script_bytes) + else: + zf.writestr('__main__.py', script_bytes) + zip_data = stream.getvalue() + script_bytes = launcher + shebang + zip_data + for name in names: + outname = os.path.join(self.target_dir, name) + if use_launcher: # pragma: no cover + n, e = os.path.splitext(outname) + if e.startswith('.py'): + outname = n + outname = '%s.exe' % outname + try: + self._fileop.write_binary_file(outname, script_bytes) + except Exception: + # Failed writing an executable - it might be in use. + logger.warning('Failed to write executable - trying to ' + 'use .deleteme logic') + dfname = '%s.deleteme' % outname + if os.path.exists(dfname): + os.remove(dfname) # Not allowed to fail here + os.rename(outname, dfname) # nor here + self._fileop.write_binary_file(outname, script_bytes) + logger.debug('Able to replace executable using ' + '.deleteme logic') + try: + os.remove(dfname) + except Exception: + pass # still in use - ignore error + else: + if self._is_nt and not outname.endswith('.' + ext): # pragma: no cover + outname = '%s.%s' % (outname, ext) + if os.path.exists(outname) and not self.clobber: + logger.warning('Skipping existing file %s', outname) + continue + self._fileop.write_binary_file(outname, script_bytes) + if self.set_mode: + self._fileop.set_executable_mode([outname]) + filenames.append(outname) + + variant_separator = '-' + + def get_script_filenames(self, name): + result = set() + if '' in self.variants: + result.add(name) + if 'X' in self.variants: + result.add('%s%s' % (name, self.version_info[0])) + if 'X.Y' in self.variants: + result.add('%s%s%s.%s' % (name, self.variant_separator, self.version_info[0], self.version_info[1])) + return result + + def _make_script(self, entry, filenames, options=None): + post_interp = b'' + if options: + args = options.get('interpreter_args', []) + if args: + args = ' %s' % ' '.join(args) + post_interp = args.encode('utf-8') + shebang = self._get_shebang('utf-8', post_interp, options=options) + script = self._get_script_text(entry).encode('utf-8') + scriptnames = self.get_script_filenames(entry.name) + if options and options.get('gui', False): + ext = 'pyw' + else: + ext = 'py' + self._write_script(scriptnames, shebang, script, filenames, ext) + + def _copy_script(self, script, filenames): + adjust = False + script = os.path.join(self.source_dir, convert_path(script)) + outname = os.path.join(self.target_dir, os.path.basename(script)) + if not self.force and not self._fileop.newer(script, outname): + logger.debug('not copying %s (up-to-date)', script) + return + + # Always open the file, but ignore failures in dry-run mode -- + # that way, we'll get accurate feedback if we can read the + # script. + try: + f = open(script, 'rb') + except IOError: # pragma: no cover + if not self.dry_run: + raise + f = None + else: + first_line = f.readline() + if not first_line: # pragma: no cover + logger.warning('%s is an empty file (skipping)', script) + return + + match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n')) + if match: + adjust = True + post_interp = match.group(1) or b'' + + if not adjust: + if f: + f.close() + self._fileop.copy_file(script, outname) + if self.set_mode: + self._fileop.set_executable_mode([outname]) + filenames.append(outname) + else: + logger.info('copying and adjusting %s -> %s', script, self.target_dir) + if not self._fileop.dry_run: + encoding, lines = detect_encoding(f.readline) + f.seek(0) + shebang = self._get_shebang(encoding, post_interp) + if b'pythonw' in first_line: # pragma: no cover + ext = 'pyw' + else: + ext = 'py' + n = os.path.basename(outname) + self._write_script([n], shebang, f.read(), filenames, ext) + if f: + f.close() + + @property + def dry_run(self): + return self._fileop.dry_run + + @dry_run.setter + def dry_run(self, value): + self._fileop.dry_run = value + + if os.name == 'nt' or (os.name == 'java' and os._name == 'nt'): # pragma: no cover + # Executable launcher support. + # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/ + + def _get_launcher(self, kind): + if struct.calcsize('P') == 8: # 64-bit + bits = '64' + else: + bits = '32' + platform_suffix = '-arm' if get_platform() == 'win-arm64' else '' + name = '%s%s%s.exe' % (kind, bits, platform_suffix) + if name not in WRAPPERS: + msg = ('Unable to find resource %s in package %s' % + (name, DISTLIB_PACKAGE)) + raise ValueError(msg) + return WRAPPERS[name] + + # Public API follows + + def make(self, specification, options=None): + """ + Make a script. + + :param specification: The specification, which is either a valid export + entry specification (to make a script from a + callable) or a filename (to make a script by + copying from a source location). + :param options: A dictionary of options controlling script generation. + :return: A list of all absolute pathnames written to. + """ + filenames = [] + entry = get_export_entry(specification) + if entry is None: + self._copy_script(specification, filenames) + else: + self._make_script(entry, filenames, options=options) + return filenames + + def make_multiple(self, specifications, options=None): + """ + Take a list of specifications and make scripts from them, + :param specifications: A list of specifications. + :return: A list of all absolute pathnames written to, + """ + filenames = [] + for specification in specifications: + filenames.extend(self.make(specification, options)) + return filenames diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/t32.exe b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/t32.exe new file mode 100644 index 0000000000000000000000000000000000000000..52154f0be32cc2bdbf98af131d477900667d0abd Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/t32.exe differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/util.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/util.py new file mode 100644 index 0000000000000000000000000000000000000000..0d5bd7a8bf364095e232b3d2c1ef64500dd20db4 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/util.py @@ -0,0 +1,1984 @@ +# +# Copyright (C) 2012-2023 The Python Software Foundation. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +import codecs +from collections import deque +import contextlib +import csv +from glob import iglob as std_iglob +import io +import json +import logging +import os +import py_compile +import re +import socket +try: + import ssl +except ImportError: # pragma: no cover + ssl = None +import subprocess +import sys +import tarfile +import tempfile +import textwrap + +try: + import threading +except ImportError: # pragma: no cover + import dummy_threading as threading +import time + +from . import DistlibException +from .compat import (string_types, text_type, shutil, raw_input, StringIO, cache_from_source, urlopen, urljoin, httplib, + xmlrpclib, HTTPHandler, BaseConfigurator, valid_ident, Container, configparser, URLError, ZipFile, + fsdecode, unquote, urlparse) + +logger = logging.getLogger(__name__) + +# +# Requirement parsing code as per PEP 508 +# + +IDENTIFIER = re.compile(r'^([\w\.-]+)\s*') +VERSION_IDENTIFIER = re.compile(r'^([\w\.*+-]+)\s*') +COMPARE_OP = re.compile(r'^(<=?|>=?|={2,3}|[~!]=)\s*') +MARKER_OP = re.compile(r'^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*') +OR = re.compile(r'^or\b\s*') +AND = re.compile(r'^and\b\s*') +NON_SPACE = re.compile(r'(\S+)\s*') +STRING_CHUNK = re.compile(r'([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)') + + +def parse_marker(marker_string): + """ + Parse a marker string and return a dictionary containing a marker expression. + + The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in + the expression grammar, or strings. A string contained in quotes is to be + interpreted as a literal string, and a string not contained in quotes is a + variable (such as os_name). + """ + + def marker_var(remaining): + # either identifier, or literal string + m = IDENTIFIER.match(remaining) + if m: + result = m.groups()[0] + remaining = remaining[m.end():] + elif not remaining: + raise SyntaxError('unexpected end of input') + else: + q = remaining[0] + if q not in '\'"': + raise SyntaxError('invalid expression: %s' % remaining) + oq = '\'"'.replace(q, '') + remaining = remaining[1:] + parts = [q] + while remaining: + # either a string chunk, or oq, or q to terminate + if remaining[0] == q: + break + elif remaining[0] == oq: + parts.append(oq) + remaining = remaining[1:] + else: + m = STRING_CHUNK.match(remaining) + if not m: + raise SyntaxError('error in string literal: %s' % remaining) + parts.append(m.groups()[0]) + remaining = remaining[m.end():] + else: + s = ''.join(parts) + raise SyntaxError('unterminated string: %s' % s) + parts.append(q) + result = ''.join(parts) + remaining = remaining[1:].lstrip() # skip past closing quote + return result, remaining + + def marker_expr(remaining): + if remaining and remaining[0] == '(': + result, remaining = marker(remaining[1:].lstrip()) + if remaining[0] != ')': + raise SyntaxError('unterminated parenthesis: %s' % remaining) + remaining = remaining[1:].lstrip() + else: + lhs, remaining = marker_var(remaining) + while remaining: + m = MARKER_OP.match(remaining) + if not m: + break + op = m.groups()[0] + remaining = remaining[m.end():] + rhs, remaining = marker_var(remaining) + lhs = {'op': op, 'lhs': lhs, 'rhs': rhs} + result = lhs + return result, remaining + + def marker_and(remaining): + lhs, remaining = marker_expr(remaining) + while remaining: + m = AND.match(remaining) + if not m: + break + remaining = remaining[m.end():] + rhs, remaining = marker_expr(remaining) + lhs = {'op': 'and', 'lhs': lhs, 'rhs': rhs} + return lhs, remaining + + def marker(remaining): + lhs, remaining = marker_and(remaining) + while remaining: + m = OR.match(remaining) + if not m: + break + remaining = remaining[m.end():] + rhs, remaining = marker_and(remaining) + lhs = {'op': 'or', 'lhs': lhs, 'rhs': rhs} + return lhs, remaining + + return marker(marker_string) + + +def parse_requirement(req): + """ + Parse a requirement passed in as a string. Return a Container + whose attributes contain the various parts of the requirement. + """ + remaining = req.strip() + if not remaining or remaining.startswith('#'): + return None + m = IDENTIFIER.match(remaining) + if not m: + raise SyntaxError('name expected: %s' % remaining) + distname = m.groups()[0] + remaining = remaining[m.end():] + extras = mark_expr = versions = uri = None + if remaining and remaining[0] == '[': + i = remaining.find(']', 1) + if i < 0: + raise SyntaxError('unterminated extra: %s' % remaining) + s = remaining[1:i] + remaining = remaining[i + 1:].lstrip() + extras = [] + while s: + m = IDENTIFIER.match(s) + if not m: + raise SyntaxError('malformed extra: %s' % s) + extras.append(m.groups()[0]) + s = s[m.end():] + if not s: + break + if s[0] != ',': + raise SyntaxError('comma expected in extras: %s' % s) + s = s[1:].lstrip() + if not extras: + extras = None + if remaining: + if remaining[0] == '@': + # it's a URI + remaining = remaining[1:].lstrip() + m = NON_SPACE.match(remaining) + if not m: + raise SyntaxError('invalid URI: %s' % remaining) + uri = m.groups()[0] + t = urlparse(uri) + # there are issues with Python and URL parsing, so this test + # is a bit crude. See bpo-20271, bpo-23505. Python doesn't + # always parse invalid URLs correctly - it should raise + # exceptions for malformed URLs + if not (t.scheme and t.netloc): + raise SyntaxError('Invalid URL: %s' % uri) + remaining = remaining[m.end():].lstrip() + else: + + def get_versions(ver_remaining): + """ + Return a list of operator, version tuples if any are + specified, else None. + """ + m = COMPARE_OP.match(ver_remaining) + versions = None + if m: + versions = [] + while True: + op = m.groups()[0] + ver_remaining = ver_remaining[m.end():] + m = VERSION_IDENTIFIER.match(ver_remaining) + if not m: + raise SyntaxError('invalid version: %s' % ver_remaining) + v = m.groups()[0] + versions.append((op, v)) + ver_remaining = ver_remaining[m.end():] + if not ver_remaining or ver_remaining[0] != ',': + break + ver_remaining = ver_remaining[1:].lstrip() + # Some packages have a trailing comma which would break things + # See issue #148 + if not ver_remaining: + break + m = COMPARE_OP.match(ver_remaining) + if not m: + raise SyntaxError('invalid constraint: %s' % ver_remaining) + if not versions: + versions = None + return versions, ver_remaining + + if remaining[0] != '(': + versions, remaining = get_versions(remaining) + else: + i = remaining.find(')', 1) + if i < 0: + raise SyntaxError('unterminated parenthesis: %s' % remaining) + s = remaining[1:i] + remaining = remaining[i + 1:].lstrip() + # As a special diversion from PEP 508, allow a version number + # a.b.c in parentheses as a synonym for ~= a.b.c (because this + # is allowed in earlier PEPs) + if COMPARE_OP.match(s): + versions, _ = get_versions(s) + else: + m = VERSION_IDENTIFIER.match(s) + if not m: + raise SyntaxError('invalid constraint: %s' % s) + v = m.groups()[0] + s = s[m.end():].lstrip() + if s: + raise SyntaxError('invalid constraint: %s' % s) + versions = [('~=', v)] + + if remaining: + if remaining[0] != ';': + raise SyntaxError('invalid requirement: %s' % remaining) + remaining = remaining[1:].lstrip() + + mark_expr, remaining = parse_marker(remaining) + + if remaining and remaining[0] != '#': + raise SyntaxError('unexpected trailing data: %s' % remaining) + + if not versions: + rs = distname + else: + rs = '%s %s' % (distname, ', '.join(['%s %s' % con for con in versions])) + return Container(name=distname, extras=extras, constraints=versions, marker=mark_expr, url=uri, requirement=rs) + + +def get_resources_dests(resources_root, rules): + """Find destinations for resources files""" + + def get_rel_path(root, path): + # normalizes and returns a lstripped-/-separated path + root = root.replace(os.path.sep, '/') + path = path.replace(os.path.sep, '/') + assert path.startswith(root) + return path[len(root):].lstrip('/') + + destinations = {} + for base, suffix, dest in rules: + prefix = os.path.join(resources_root, base) + for abs_base in iglob(prefix): + abs_glob = os.path.join(abs_base, suffix) + for abs_path in iglob(abs_glob): + resource_file = get_rel_path(resources_root, abs_path) + if dest is None: # remove the entry if it was here + destinations.pop(resource_file, None) + else: + rel_path = get_rel_path(abs_base, abs_path) + rel_dest = dest.replace(os.path.sep, '/').rstrip('/') + destinations[resource_file] = rel_dest + '/' + rel_path + return destinations + + +def in_venv(): + if hasattr(sys, 'real_prefix'): + # virtualenv venvs + result = True + else: + # PEP 405 venvs + result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix) + return result + + +def get_executable(): + # The __PYVENV_LAUNCHER__ dance is apparently no longer needed, as + # changes to the stub launcher mean that sys.executable always points + # to the stub on OS X + # if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__' + # in os.environ): + # result = os.environ['__PYVENV_LAUNCHER__'] + # else: + # result = sys.executable + # return result + # Avoid normcasing: see issue #143 + # result = os.path.normcase(sys.executable) + result = sys.executable + if not isinstance(result, text_type): + result = fsdecode(result) + return result + + +def proceed(prompt, allowed_chars, error_prompt=None, default=None): + p = prompt + while True: + s = raw_input(p) + p = prompt + if not s and default: + s = default + if s: + c = s[0].lower() + if c in allowed_chars: + break + if error_prompt: + p = '%c: %s\n%s' % (c, error_prompt, prompt) + return c + + +def extract_by_key(d, keys): + if isinstance(keys, string_types): + keys = keys.split() + result = {} + for key in keys: + if key in d: + result[key] = d[key] + return result + + +def read_exports(stream): + if sys.version_info[0] >= 3: + # needs to be a text stream + stream = codecs.getreader('utf-8')(stream) + # Try to load as JSON, falling back on legacy format + data = stream.read() + stream = StringIO(data) + try: + jdata = json.load(stream) + result = jdata['extensions']['python.exports']['exports'] + for group, entries in result.items(): + for k, v in entries.items(): + s = '%s = %s' % (k, v) + entry = get_export_entry(s) + assert entry is not None + entries[k] = entry + return result + except Exception: + stream.seek(0, 0) + + def read_stream(cp, stream): + if hasattr(cp, 'read_file'): + cp.read_file(stream) + else: + cp.readfp(stream) + + cp = configparser.ConfigParser() + try: + read_stream(cp, stream) + except configparser.MissingSectionHeaderError: + stream.close() + data = textwrap.dedent(data) + stream = StringIO(data) + read_stream(cp, stream) + + result = {} + for key in cp.sections(): + result[key] = entries = {} + for name, value in cp.items(key): + s = '%s = %s' % (name, value) + entry = get_export_entry(s) + assert entry is not None + # entry.dist = self + entries[name] = entry + return result + + +def write_exports(exports, stream): + if sys.version_info[0] >= 3: + # needs to be a text stream + stream = codecs.getwriter('utf-8')(stream) + cp = configparser.ConfigParser() + for k, v in exports.items(): + # TODO check k, v for valid values + cp.add_section(k) + for entry in v.values(): + if entry.suffix is None: + s = entry.prefix + else: + s = '%s:%s' % (entry.prefix, entry.suffix) + if entry.flags: + s = '%s [%s]' % (s, ', '.join(entry.flags)) + cp.set(k, entry.name, s) + cp.write(stream) + + +@contextlib.contextmanager +def tempdir(): + td = tempfile.mkdtemp() + try: + yield td + finally: + shutil.rmtree(td) + + +@contextlib.contextmanager +def chdir(d): + cwd = os.getcwd() + try: + os.chdir(d) + yield + finally: + os.chdir(cwd) + + +@contextlib.contextmanager +def socket_timeout(seconds=15): + cto = socket.getdefaulttimeout() + try: + socket.setdefaulttimeout(seconds) + yield + finally: + socket.setdefaulttimeout(cto) + + +class cached_property(object): + + def __init__(self, func): + self.func = func + # for attr in ('__name__', '__module__', '__doc__'): + # setattr(self, attr, getattr(func, attr, None)) + + def __get__(self, obj, cls=None): + if obj is None: + return self + value = self.func(obj) + object.__setattr__(obj, self.func.__name__, value) + # obj.__dict__[self.func.__name__] = value = self.func(obj) + return value + + +def convert_path(pathname): + """Return 'pathname' as a name that will work on the native filesystem. + + The path is split on '/' and put back together again using the current + directory separator. Needed because filenames in the setup script are + always supplied in Unix style, and have to be converted to the local + convention before we can actually use them in the filesystem. Raises + ValueError on non-Unix-ish systems if 'pathname' either starts or + ends with a slash. + """ + if os.sep == '/': + return pathname + if not pathname: + return pathname + if pathname[0] == '/': + raise ValueError("path '%s' cannot be absolute" % pathname) + if pathname[-1] == '/': + raise ValueError("path '%s' cannot end with '/'" % pathname) + + paths = pathname.split('/') + while os.curdir in paths: + paths.remove(os.curdir) + if not paths: + return os.curdir + return os.path.join(*paths) + + +class FileOperator(object): + + def __init__(self, dry_run=False): + self.dry_run = dry_run + self.ensured = set() + self._init_record() + + def _init_record(self): + self.record = False + self.files_written = set() + self.dirs_created = set() + + def record_as_written(self, path): + if self.record: + self.files_written.add(path) + + def newer(self, source, target): + """Tell if the target is newer than the source. + + Returns true if 'source' exists and is more recently modified than + 'target', or if 'source' exists and 'target' doesn't. + + Returns false if both exist and 'target' is the same age or younger + than 'source'. Raise PackagingFileError if 'source' does not exist. + + Note that this test is not very accurate: files created in the same + second will have the same "age". + """ + if not os.path.exists(source): + raise DistlibException("file '%r' does not exist" % os.path.abspath(source)) + if not os.path.exists(target): + return True + + return os.stat(source).st_mtime > os.stat(target).st_mtime + + def copy_file(self, infile, outfile, check=True): + """Copy a file respecting dry-run and force flags. + """ + self.ensure_dir(os.path.dirname(outfile)) + logger.info('Copying %s to %s', infile, outfile) + if not self.dry_run: + msg = None + if check: + if os.path.islink(outfile): + msg = '%s is a symlink' % outfile + elif os.path.exists(outfile) and not os.path.isfile(outfile): + msg = '%s is a non-regular file' % outfile + if msg: + raise ValueError(msg + ' which would be overwritten') + shutil.copyfile(infile, outfile) + self.record_as_written(outfile) + + def copy_stream(self, instream, outfile, encoding=None): + assert not os.path.isdir(outfile) + self.ensure_dir(os.path.dirname(outfile)) + logger.info('Copying stream %s to %s', instream, outfile) + if not self.dry_run: + if encoding is None: + outstream = open(outfile, 'wb') + else: + outstream = codecs.open(outfile, 'w', encoding=encoding) + try: + shutil.copyfileobj(instream, outstream) + finally: + outstream.close() + self.record_as_written(outfile) + + def write_binary_file(self, path, data): + self.ensure_dir(os.path.dirname(path)) + if not self.dry_run: + if os.path.exists(path): + os.remove(path) + with open(path, 'wb') as f: + f.write(data) + self.record_as_written(path) + + def write_text_file(self, path, data, encoding): + self.write_binary_file(path, data.encode(encoding)) + + def set_mode(self, bits, mask, files): + if os.name == 'posix' or (os.name == 'java' and os._name == 'posix'): + # Set the executable bits (owner, group, and world) on + # all the files specified. + for f in files: + if self.dry_run: + logger.info("changing mode of %s", f) + else: + mode = (os.stat(f).st_mode | bits) & mask + logger.info("changing mode of %s to %o", f, mode) + os.chmod(f, mode) + + set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f) + + def ensure_dir(self, path): + path = os.path.abspath(path) + if path not in self.ensured and not os.path.exists(path): + self.ensured.add(path) + d, f = os.path.split(path) + self.ensure_dir(d) + logger.info('Creating %s' % path) + if not self.dry_run: + os.mkdir(path) + if self.record: + self.dirs_created.add(path) + + def byte_compile(self, path, optimize=False, force=False, prefix=None, hashed_invalidation=False): + dpath = cache_from_source(path, not optimize) + logger.info('Byte-compiling %s to %s', path, dpath) + if not self.dry_run: + if force or self.newer(path, dpath): + if not prefix: + diagpath = None + else: + assert path.startswith(prefix) + diagpath = path[len(prefix):] + compile_kwargs = {} + if hashed_invalidation and hasattr(py_compile, 'PycInvalidationMode'): + if not isinstance(hashed_invalidation, py_compile.PycInvalidationMode): + hashed_invalidation = py_compile.PycInvalidationMode.CHECKED_HASH + compile_kwargs['invalidation_mode'] = hashed_invalidation + py_compile.compile(path, dpath, diagpath, True, **compile_kwargs) # raise error + self.record_as_written(dpath) + return dpath + + def ensure_removed(self, path): + if os.path.exists(path): + if os.path.isdir(path) and not os.path.islink(path): + logger.debug('Removing directory tree at %s', path) + if not self.dry_run: + shutil.rmtree(path) + if self.record: + if path in self.dirs_created: + self.dirs_created.remove(path) + else: + if os.path.islink(path): + s = 'link' + else: + s = 'file' + logger.debug('Removing %s %s', s, path) + if not self.dry_run: + os.remove(path) + if self.record: + if path in self.files_written: + self.files_written.remove(path) + + def is_writable(self, path): + result = False + while not result: + if os.path.exists(path): + result = os.access(path, os.W_OK) + break + parent = os.path.dirname(path) + if parent == path: + break + path = parent + return result + + def commit(self): + """ + Commit recorded changes, turn off recording, return + changes. + """ + assert self.record + result = self.files_written, self.dirs_created + self._init_record() + return result + + def rollback(self): + if not self.dry_run: + for f in list(self.files_written): + if os.path.exists(f): + os.remove(f) + # dirs should all be empty now, except perhaps for + # __pycache__ subdirs + # reverse so that subdirs appear before their parents + dirs = sorted(self.dirs_created, reverse=True) + for d in dirs: + flist = os.listdir(d) + if flist: + assert flist == ['__pycache__'] + sd = os.path.join(d, flist[0]) + os.rmdir(sd) + os.rmdir(d) # should fail if non-empty + self._init_record() + + +def resolve(module_name, dotted_path): + if module_name in sys.modules: + mod = sys.modules[module_name] + else: + mod = __import__(module_name) + if dotted_path is None: + result = mod + else: + parts = dotted_path.split('.') + result = getattr(mod, parts.pop(0)) + for p in parts: + result = getattr(result, p) + return result + + +class ExportEntry(object): + + def __init__(self, name, prefix, suffix, flags): + self.name = name + self.prefix = prefix + self.suffix = suffix + self.flags = flags + + @cached_property + def value(self): + return resolve(self.prefix, self.suffix) + + def __repr__(self): # pragma: no cover + return '' % (self.name, self.prefix, self.suffix, self.flags) + + def __eq__(self, other): + if not isinstance(other, ExportEntry): + result = False + else: + result = (self.name == other.name and self.prefix == other.prefix and self.suffix == other.suffix and + self.flags == other.flags) + return result + + __hash__ = object.__hash__ + + +ENTRY_RE = re.compile( + r'''(?P([^\[]\S*)) + \s*=\s*(?P(\w+)([:\.]\w+)*) + \s*(\[\s*(?P[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])? + ''', re.VERBOSE) + + +def get_export_entry(specification): + m = ENTRY_RE.search(specification) + if not m: + result = None + if '[' in specification or ']' in specification: + raise DistlibException("Invalid specification " + "'%s'" % specification) + else: + d = m.groupdict() + name = d['name'] + path = d['callable'] + colons = path.count(':') + if colons == 0: + prefix, suffix = path, None + else: + if colons != 1: + raise DistlibException("Invalid specification " + "'%s'" % specification) + prefix, suffix = path.split(':') + flags = d['flags'] + if flags is None: + if '[' in specification or ']' in specification: + raise DistlibException("Invalid specification " + "'%s'" % specification) + flags = [] + else: + flags = [f.strip() for f in flags.split(',')] + result = ExportEntry(name, prefix, suffix, flags) + return result + + +def get_cache_base(suffix=None): + """ + Return the default base location for distlib caches. If the directory does + not exist, it is created. Use the suffix provided for the base directory, + and default to '.distlib' if it isn't provided. + + On Windows, if LOCALAPPDATA is defined in the environment, then it is + assumed to be a directory, and will be the parent directory of the result. + On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home + directory - using os.expanduser('~') - will be the parent directory of + the result. + + The result is just the directory '.distlib' in the parent directory as + determined above, or with the name specified with ``suffix``. + """ + if suffix is None: + suffix = '.distlib' + if os.name == 'nt' and 'LOCALAPPDATA' in os.environ: + result = os.path.expandvars('$localappdata') + else: + # Assume posix, or old Windows + result = os.path.expanduser('~') + # we use 'isdir' instead of 'exists', because we want to + # fail if there's a file with that name + if os.path.isdir(result): + usable = os.access(result, os.W_OK) + if not usable: + logger.warning('Directory exists but is not writable: %s', result) + else: + try: + os.makedirs(result) + usable = True + except OSError: + logger.warning('Unable to create %s', result, exc_info=True) + usable = False + if not usable: + result = tempfile.mkdtemp() + logger.warning('Default location unusable, using %s', result) + return os.path.join(result, suffix) + + +def path_to_cache_dir(path, use_abspath=True): + """ + Convert an absolute path to a directory name for use in a cache. + + The algorithm used is: + + #. On Windows, any ``':'`` in the drive is replaced with ``'---'``. + #. Any occurrence of ``os.sep`` is replaced with ``'--'``. + #. ``'.cache'`` is appended. + """ + d, p = os.path.splitdrive(os.path.abspath(path) if use_abspath else path) + if d: + d = d.replace(':', '---') + p = p.replace(os.sep, '--') + return d + p + '.cache' + + +def ensure_slash(s): + if not s.endswith('/'): + return s + '/' + return s + + +def parse_credentials(netloc): + username = password = None + if '@' in netloc: + prefix, netloc = netloc.rsplit('@', 1) + if ':' not in prefix: + username = prefix + else: + username, password = prefix.split(':', 1) + if username: + username = unquote(username) + if password: + password = unquote(password) + return username, password, netloc + + +def get_process_umask(): + result = os.umask(0o22) + os.umask(result) + return result + + +def is_string_sequence(seq): + result = True + i = None + for i, s in enumerate(seq): + if not isinstance(s, string_types): + result = False + break + assert i is not None + return result + + +PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-' + '([a-z0-9_.+-]+)', re.I) +PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)') + + +def split_filename(filename, project_name=None): + """ + Extract name, version, python version from a filename (no extension) + + Return name, version, pyver or None + """ + result = None + pyver = None + filename = unquote(filename).replace(' ', '-') + m = PYTHON_VERSION.search(filename) + if m: + pyver = m.group(1) + filename = filename[:m.start()] + if project_name and len(filename) > len(project_name) + 1: + m = re.match(re.escape(project_name) + r'\b', filename) + if m: + n = m.end() + result = filename[:n], filename[n + 1:], pyver + if result is None: + m = PROJECT_NAME_AND_VERSION.match(filename) + if m: + result = m.group(1), m.group(3), pyver + return result + + +# Allow spaces in name because of legacy dists like "Twisted Core" +NAME_VERSION_RE = re.compile(r'(?P[\w .-]+)\s*' + r'\(\s*(?P[^\s)]+)\)$') + + +def parse_name_and_version(p): + """ + A utility method used to get name and version from a string. + + From e.g. a Provides-Dist value. + + :param p: A value in a form 'foo (1.0)' + :return: The name and version as a tuple. + """ + m = NAME_VERSION_RE.match(p) + if not m: + raise DistlibException('Ill-formed name/version string: \'%s\'' % p) + d = m.groupdict() + return d['name'].strip().lower(), d['ver'] + + +def get_extras(requested, available): + result = set() + requested = set(requested or []) + available = set(available or []) + if '*' in requested: + requested.remove('*') + result |= available + for r in requested: + if r == '-': + result.add(r) + elif r.startswith('-'): + unwanted = r[1:] + if unwanted not in available: + logger.warning('undeclared extra: %s' % unwanted) + if unwanted in result: + result.remove(unwanted) + else: + if r not in available: + logger.warning('undeclared extra: %s' % r) + result.add(r) + return result + + +# +# Extended metadata functionality +# + + +def _get_external_data(url): + result = {} + try: + # urlopen might fail if it runs into redirections, + # because of Python issue #13696. Fixed in locators + # using a custom redirect handler. + resp = urlopen(url) + headers = resp.info() + ct = headers.get('Content-Type') + if not ct.startswith('application/json'): + logger.debug('Unexpected response for JSON request: %s', ct) + else: + reader = codecs.getreader('utf-8')(resp) + # data = reader.read().decode('utf-8') + # result = json.loads(data) + result = json.load(reader) + except Exception as e: + logger.exception('Failed to get external data for %s: %s', url, e) + return result + + +_external_data_base_url = 'https://www.red-dove.com/pypi/projects/' + + +def get_project_data(name): + url = '%s/%s/project.json' % (name[0].upper(), name) + url = urljoin(_external_data_base_url, url) + result = _get_external_data(url) + return result + + +def get_package_data(name, version): + url = '%s/%s/package-%s.json' % (name[0].upper(), name, version) + url = urljoin(_external_data_base_url, url) + return _get_external_data(url) + + +class Cache(object): + """ + A class implementing a cache for resources that need to live in the file system + e.g. shared libraries. This class was moved from resources to here because it + could be used by other modules, e.g. the wheel module. + """ + + def __init__(self, base): + """ + Initialise an instance. + + :param base: The base directory where the cache should be located. + """ + # we use 'isdir' instead of 'exists', because we want to + # fail if there's a file with that name + if not os.path.isdir(base): # pragma: no cover + os.makedirs(base) + if (os.stat(base).st_mode & 0o77) != 0: + logger.warning('Directory \'%s\' is not private', base) + self.base = os.path.abspath(os.path.normpath(base)) + + def prefix_to_dir(self, prefix, use_abspath=True): + """ + Converts a resource prefix to a directory name in the cache. + """ + return path_to_cache_dir(prefix, use_abspath=use_abspath) + + def clear(self): + """ + Clear the cache. + """ + not_removed = [] + for fn in os.listdir(self.base): + fn = os.path.join(self.base, fn) + try: + if os.path.islink(fn) or os.path.isfile(fn): + os.remove(fn) + elif os.path.isdir(fn): + shutil.rmtree(fn) + except Exception: + not_removed.append(fn) + return not_removed + + +class EventMixin(object): + """ + A very simple publish/subscribe system. + """ + + def __init__(self): + self._subscribers = {} + + def add(self, event, subscriber, append=True): + """ + Add a subscriber for an event. + + :param event: The name of an event. + :param subscriber: The subscriber to be added (and called when the + event is published). + :param append: Whether to append or prepend the subscriber to an + existing subscriber list for the event. + """ + subs = self._subscribers + if event not in subs: + subs[event] = deque([subscriber]) + else: + sq = subs[event] + if append: + sq.append(subscriber) + else: + sq.appendleft(subscriber) + + def remove(self, event, subscriber): + """ + Remove a subscriber for an event. + + :param event: The name of an event. + :param subscriber: The subscriber to be removed. + """ + subs = self._subscribers + if event not in subs: + raise ValueError('No subscribers: %r' % event) + subs[event].remove(subscriber) + + def get_subscribers(self, event): + """ + Return an iterator for the subscribers for an event. + :param event: The event to return subscribers for. + """ + return iter(self._subscribers.get(event, ())) + + def publish(self, event, *args, **kwargs): + """ + Publish a event and return a list of values returned by its + subscribers. + + :param event: The event to publish. + :param args: The positional arguments to pass to the event's + subscribers. + :param kwargs: The keyword arguments to pass to the event's + subscribers. + """ + result = [] + for subscriber in self.get_subscribers(event): + try: + value = subscriber(event, *args, **kwargs) + except Exception: + logger.exception('Exception during event publication') + value = None + result.append(value) + logger.debug('publish %s: args = %s, kwargs = %s, result = %s', event, args, kwargs, result) + return result + + +# +# Simple sequencing +# +class Sequencer(object): + + def __init__(self): + self._preds = {} + self._succs = {} + self._nodes = set() # nodes with no preds/succs + + def add_node(self, node): + self._nodes.add(node) + + def remove_node(self, node, edges=False): + if node in self._nodes: + self._nodes.remove(node) + if edges: + for p in set(self._preds.get(node, ())): + self.remove(p, node) + for s in set(self._succs.get(node, ())): + self.remove(node, s) + # Remove empties + for k, v in list(self._preds.items()): + if not v: + del self._preds[k] + for k, v in list(self._succs.items()): + if not v: + del self._succs[k] + + def add(self, pred, succ): + assert pred != succ + self._preds.setdefault(succ, set()).add(pred) + self._succs.setdefault(pred, set()).add(succ) + + def remove(self, pred, succ): + assert pred != succ + try: + preds = self._preds[succ] + succs = self._succs[pred] + except KeyError: # pragma: no cover + raise ValueError('%r not a successor of anything' % succ) + try: + preds.remove(pred) + succs.remove(succ) + except KeyError: # pragma: no cover + raise ValueError('%r not a successor of %r' % (succ, pred)) + + def is_step(self, step): + return (step in self._preds or step in self._succs or step in self._nodes) + + def get_steps(self, final): + if not self.is_step(final): + raise ValueError('Unknown: %r' % final) + result = [] + todo = [] + seen = set() + todo.append(final) + while todo: + step = todo.pop(0) + if step in seen: + # if a step was already seen, + # move it to the end (so it will appear earlier + # when reversed on return) ... but not for the + # final step, as that would be confusing for + # users + if step != final: + result.remove(step) + result.append(step) + else: + seen.add(step) + result.append(step) + preds = self._preds.get(step, ()) + todo.extend(preds) + return reversed(result) + + @property + def strong_connections(self): + # http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm + index_counter = [0] + stack = [] + lowlinks = {} + index = {} + result = [] + + graph = self._succs + + def strongconnect(node): + # set the depth index for this node to the smallest unused index + index[node] = index_counter[0] + lowlinks[node] = index_counter[0] + index_counter[0] += 1 + stack.append(node) + + # Consider successors + try: + successors = graph[node] + except Exception: + successors = [] + for successor in successors: + if successor not in lowlinks: + # Successor has not yet been visited + strongconnect(successor) + lowlinks[node] = min(lowlinks[node], lowlinks[successor]) + elif successor in stack: + # the successor is in the stack and hence in the current + # strongly connected component (SCC) + lowlinks[node] = min(lowlinks[node], index[successor]) + + # If `node` is a root node, pop the stack and generate an SCC + if lowlinks[node] == index[node]: + connected_component = [] + + while True: + successor = stack.pop() + connected_component.append(successor) + if successor == node: + break + component = tuple(connected_component) + # storing the result + result.append(component) + + for node in graph: + if node not in lowlinks: + strongconnect(node) + + return result + + @property + def dot(self): + result = ['digraph G {'] + for succ in self._preds: + preds = self._preds[succ] + for pred in preds: + result.append(' %s -> %s;' % (pred, succ)) + for node in self._nodes: + result.append(' %s;' % node) + result.append('}') + return '\n'.join(result) + + +# +# Unarchiving functionality for zip, tar, tgz, tbz, whl +# + +ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz', '.whl') + + +def unarchive(archive_filename, dest_dir, format=None, check=True): + + def check_path(path): + if not isinstance(path, text_type): + path = path.decode('utf-8') + p = os.path.abspath(os.path.join(dest_dir, path)) + if not p.startswith(dest_dir) or p[plen] != os.sep: + raise ValueError('path outside destination: %r' % p) + + dest_dir = os.path.abspath(dest_dir) + plen = len(dest_dir) + archive = None + if format is None: + if archive_filename.endswith(('.zip', '.whl')): + format = 'zip' + elif archive_filename.endswith(('.tar.gz', '.tgz')): + format = 'tgz' + mode = 'r:gz' + elif archive_filename.endswith(('.tar.bz2', '.tbz')): + format = 'tbz' + mode = 'r:bz2' + elif archive_filename.endswith('.tar'): + format = 'tar' + mode = 'r' + else: # pragma: no cover + raise ValueError('Unknown format for %r' % archive_filename) + try: + if format == 'zip': + archive = ZipFile(archive_filename, 'r') + if check: + names = archive.namelist() + for name in names: + check_path(name) + else: + archive = tarfile.open(archive_filename, mode) + if check: + names = archive.getnames() + for name in names: + check_path(name) + if format != 'zip' and sys.version_info[0] < 3: + # See Python issue 17153. If the dest path contains Unicode, + # tarfile extraction fails on Python 2.x if a member path name + # contains non-ASCII characters - it leads to an implicit + # bytes -> unicode conversion using ASCII to decode. + for tarinfo in archive.getmembers(): + if not isinstance(tarinfo.name, text_type): + tarinfo.name = tarinfo.name.decode('utf-8') + + # Limit extraction of dangerous items, if this Python + # allows it easily. If not, just trust the input. + # See: https://docs.python.org/3/library/tarfile.html#extraction-filters + def extraction_filter(member, path): + """Run tarfile.tar_filter, but raise the expected ValueError""" + # This is only called if the current Python has tarfile filters + try: + return tarfile.tar_filter(member, path) + except tarfile.FilterError as exc: + raise ValueError(str(exc)) + + archive.extraction_filter = extraction_filter + + archive.extractall(dest_dir) + + finally: + if archive: + archive.close() + + +def zip_dir(directory): + """zip a directory tree into a BytesIO object""" + result = io.BytesIO() + dlen = len(directory) + with ZipFile(result, "w") as zf: + for root, dirs, files in os.walk(directory): + for name in files: + full = os.path.join(root, name) + rel = root[dlen:] + dest = os.path.join(rel, name) + zf.write(full, dest) + return result + + +# +# Simple progress bar +# + +UNITS = ('', 'K', 'M', 'G', 'T', 'P') + + +class Progress(object): + unknown = 'UNKNOWN' + + def __init__(self, minval=0, maxval=100): + assert maxval is None or maxval >= minval + self.min = self.cur = minval + self.max = maxval + self.started = None + self.elapsed = 0 + self.done = False + + def update(self, curval): + assert self.min <= curval + assert self.max is None or curval <= self.max + self.cur = curval + now = time.time() + if self.started is None: + self.started = now + else: + self.elapsed = now - self.started + + def increment(self, incr): + assert incr >= 0 + self.update(self.cur + incr) + + def start(self): + self.update(self.min) + return self + + def stop(self): + if self.max is not None: + self.update(self.max) + self.done = True + + @property + def maximum(self): + return self.unknown if self.max is None else self.max + + @property + def percentage(self): + if self.done: + result = '100 %' + elif self.max is None: + result = ' ?? %' + else: + v = 100.0 * (self.cur - self.min) / (self.max - self.min) + result = '%3d %%' % v + return result + + def format_duration(self, duration): + if (duration <= 0) and self.max is None or self.cur == self.min: + result = '??:??:??' + # elif duration < 1: + # result = '--:--:--' + else: + result = time.strftime('%H:%M:%S', time.gmtime(duration)) + return result + + @property + def ETA(self): + if self.done: + prefix = 'Done' + t = self.elapsed + # import pdb; pdb.set_trace() + else: + prefix = 'ETA ' + if self.max is None: + t = -1 + elif self.elapsed == 0 or (self.cur == self.min): + t = 0 + else: + # import pdb; pdb.set_trace() + t = float(self.max - self.min) + t /= self.cur - self.min + t = (t - 1) * self.elapsed + return '%s: %s' % (prefix, self.format_duration(t)) + + @property + def speed(self): + if self.elapsed == 0: + result = 0.0 + else: + result = (self.cur - self.min) / self.elapsed + for unit in UNITS: + if result < 1000: + break + result /= 1000.0 + return '%d %sB/s' % (result, unit) + + +# +# Glob functionality +# + +RICH_GLOB = re.compile(r'\{([^}]*)\}') +_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]') +_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$') + + +def iglob(path_glob): + """Extended globbing function that supports ** and {opt1,opt2,opt3}.""" + if _CHECK_RECURSIVE_GLOB.search(path_glob): + msg = """invalid glob %r: recursive glob "**" must be used alone""" + raise ValueError(msg % path_glob) + if _CHECK_MISMATCH_SET.search(path_glob): + msg = """invalid glob %r: mismatching set marker '{' or '}'""" + raise ValueError(msg % path_glob) + return _iglob(path_glob) + + +def _iglob(path_glob): + rich_path_glob = RICH_GLOB.split(path_glob, 1) + if len(rich_path_glob) > 1: + assert len(rich_path_glob) == 3, rich_path_glob + prefix, set, suffix = rich_path_glob + for item in set.split(','): + for path in _iglob(''.join((prefix, item, suffix))): + yield path + else: + if '**' not in path_glob: + for item in std_iglob(path_glob): + yield item + else: + prefix, radical = path_glob.split('**', 1) + if prefix == '': + prefix = '.' + if radical == '': + radical = '*' + else: + # we support both + radical = radical.lstrip('/') + radical = radical.lstrip('\\') + for path, dir, files in os.walk(prefix): + path = os.path.normpath(path) + for fn in _iglob(os.path.join(path, radical)): + yield fn + + +if ssl: + from .compat import (HTTPSHandler as BaseHTTPSHandler, match_hostname, CertificateError) + + # + # HTTPSConnection which verifies certificates/matches domains + # + + class HTTPSConnection(httplib.HTTPSConnection): + ca_certs = None # set this to the path to the certs file (.pem) + check_domain = True # only used if ca_certs is not None + + # noinspection PyPropertyAccess + def connect(self): + sock = socket.create_connection((self.host, self.port), self.timeout) + if getattr(self, '_tunnel_host', False): + self.sock = sock + self._tunnel() + + context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) + if hasattr(ssl, 'OP_NO_SSLv2'): + context.options |= ssl.OP_NO_SSLv2 + if getattr(self, 'cert_file', None): + context.load_cert_chain(self.cert_file, self.key_file) + kwargs = {} + if self.ca_certs: + context.verify_mode = ssl.CERT_REQUIRED + context.load_verify_locations(cafile=self.ca_certs) + if getattr(ssl, 'HAS_SNI', False): + kwargs['server_hostname'] = self.host + + self.sock = context.wrap_socket(sock, **kwargs) + if self.ca_certs and self.check_domain: + try: + match_hostname(self.sock.getpeercert(), self.host) + logger.debug('Host verified: %s', self.host) + except CertificateError: # pragma: no cover + self.sock.shutdown(socket.SHUT_RDWR) + self.sock.close() + raise + + class HTTPSHandler(BaseHTTPSHandler): + + def __init__(self, ca_certs, check_domain=True): + BaseHTTPSHandler.__init__(self) + self.ca_certs = ca_certs + self.check_domain = check_domain + + def _conn_maker(self, *args, **kwargs): + """ + This is called to create a connection instance. Normally you'd + pass a connection class to do_open, but it doesn't actually check for + a class, and just expects a callable. As long as we behave just as a + constructor would have, we should be OK. If it ever changes so that + we *must* pass a class, we'll create an UnsafeHTTPSConnection class + which just sets check_domain to False in the class definition, and + choose which one to pass to do_open. + """ + result = HTTPSConnection(*args, **kwargs) + if self.ca_certs: + result.ca_certs = self.ca_certs + result.check_domain = self.check_domain + return result + + def https_open(self, req): + try: + return self.do_open(self._conn_maker, req) + except URLError as e: + if 'certificate verify failed' in str(e.reason): + raise CertificateError('Unable to verify server certificate ' + 'for %s' % req.host) + else: + raise + + # + # To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The- + # Middle proxy using HTTP listens on port 443, or an index mistakenly serves + # HTML containing a http://xyz link when it should be https://xyz), + # you can use the following handler class, which does not allow HTTP traffic. + # + # It works by inheriting from HTTPHandler - so build_opener won't add a + # handler for HTTP itself. + # + class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler): + + def http_open(self, req): + raise URLError('Unexpected HTTP request on what should be a secure ' + 'connection: %s' % req) + + +# +# XML-RPC with timeouts +# +class Transport(xmlrpclib.Transport): + + def __init__(self, timeout, use_datetime=0): + self.timeout = timeout + xmlrpclib.Transport.__init__(self, use_datetime) + + def make_connection(self, host): + h, eh, x509 = self.get_host_info(host) + if not self._connection or host != self._connection[0]: + self._extra_headers = eh + self._connection = host, httplib.HTTPConnection(h) + return self._connection[1] + + +if ssl: + + class SafeTransport(xmlrpclib.SafeTransport): + + def __init__(self, timeout, use_datetime=0): + self.timeout = timeout + xmlrpclib.SafeTransport.__init__(self, use_datetime) + + def make_connection(self, host): + h, eh, kwargs = self.get_host_info(host) + if not kwargs: + kwargs = {} + kwargs['timeout'] = self.timeout + if not self._connection or host != self._connection[0]: + self._extra_headers = eh + self._connection = host, httplib.HTTPSConnection(h, None, **kwargs) + return self._connection[1] + + +class ServerProxy(xmlrpclib.ServerProxy): + + def __init__(self, uri, **kwargs): + self.timeout = timeout = kwargs.pop('timeout', None) + # The above classes only come into play if a timeout + # is specified + if timeout is not None: + # scheme = splittype(uri) # deprecated as of Python 3.8 + scheme = urlparse(uri)[0] + use_datetime = kwargs.get('use_datetime', 0) + if scheme == 'https': + tcls = SafeTransport + else: + tcls = Transport + kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime) + self.transport = t + xmlrpclib.ServerProxy.__init__(self, uri, **kwargs) + + +# +# CSV functionality. This is provided because on 2.x, the csv module can't +# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files. +# + + +def _csv_open(fn, mode, **kwargs): + if sys.version_info[0] < 3: + mode += 'b' + else: + kwargs['newline'] = '' + # Python 3 determines encoding from locale. Force 'utf-8' + # file encoding to match other forced utf-8 encoding + kwargs['encoding'] = 'utf-8' + return open(fn, mode, **kwargs) + + +class CSVBase(object): + defaults = { + 'delimiter': str(','), # The strs are used because we need native + 'quotechar': str('"'), # str in the csv API (2.x won't take + 'lineterminator': str('\n') # Unicode) + } + + def __enter__(self): + return self + + def __exit__(self, *exc_info): + self.stream.close() + + +class CSVReader(CSVBase): + + def __init__(self, **kwargs): + if 'stream' in kwargs: + stream = kwargs['stream'] + if sys.version_info[0] >= 3: + # needs to be a text stream + stream = codecs.getreader('utf-8')(stream) + self.stream = stream + else: + self.stream = _csv_open(kwargs['path'], 'r') + self.reader = csv.reader(self.stream, **self.defaults) + + def __iter__(self): + return self + + def next(self): + result = next(self.reader) + if sys.version_info[0] < 3: + for i, item in enumerate(result): + if not isinstance(item, text_type): + result[i] = item.decode('utf-8') + return result + + __next__ = next + + +class CSVWriter(CSVBase): + + def __init__(self, fn, **kwargs): + self.stream = _csv_open(fn, 'w') + self.writer = csv.writer(self.stream, **self.defaults) + + def writerow(self, row): + if sys.version_info[0] < 3: + r = [] + for item in row: + if isinstance(item, text_type): + item = item.encode('utf-8') + r.append(item) + row = r + self.writer.writerow(row) + + +# +# Configurator functionality +# + + +class Configurator(BaseConfigurator): + + value_converters = dict(BaseConfigurator.value_converters) + value_converters['inc'] = 'inc_convert' + + def __init__(self, config, base=None): + super(Configurator, self).__init__(config) + self.base = base or os.getcwd() + + def configure_custom(self, config): + + def convert(o): + if isinstance(o, (list, tuple)): + result = type(o)([convert(i) for i in o]) + elif isinstance(o, dict): + if '()' in o: + result = self.configure_custom(o) + else: + result = {} + for k in o: + result[k] = convert(o[k]) + else: + result = self.convert(o) + return result + + c = config.pop('()') + if not callable(c): + c = self.resolve(c) + props = config.pop('.', None) + # Check for valid identifiers + args = config.pop('[]', ()) + if args: + args = tuple([convert(o) for o in args]) + items = [(k, convert(config[k])) for k in config if valid_ident(k)] + kwargs = dict(items) + result = c(*args, **kwargs) + if props: + for n, v in props.items(): + setattr(result, n, convert(v)) + return result + + def __getitem__(self, key): + result = self.config[key] + if isinstance(result, dict) and '()' in result: + self.config[key] = result = self.configure_custom(result) + return result + + def inc_convert(self, value): + """Default converter for the inc:// protocol.""" + if not os.path.isabs(value): + value = os.path.join(self.base, value) + with codecs.open(value, 'r', encoding='utf-8') as f: + result = json.load(f) + return result + + +class SubprocessMixin(object): + """ + Mixin for running subprocesses and capturing their output + """ + + def __init__(self, verbose=False, progress=None): + self.verbose = verbose + self.progress = progress + + def reader(self, stream, context): + """ + Read lines from a subprocess' output stream and either pass to a progress + callable (if specified) or write progress information to sys.stderr. + """ + progress = self.progress + verbose = self.verbose + while True: + s = stream.readline() + if not s: + break + if progress is not None: + progress(s, context) + else: + if not verbose: + sys.stderr.write('.') + else: + sys.stderr.write(s.decode('utf-8')) + sys.stderr.flush() + stream.close() + + def run_command(self, cmd, **kwargs): + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs) + t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout')) + t1.start() + t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr')) + t2.start() + p.wait() + t1.join() + t2.join() + if self.progress is not None: + self.progress('done.', 'main') + elif self.verbose: + sys.stderr.write('done.\n') + return p + + +def normalize_name(name): + """Normalize a python package name a la PEP 503""" + # https://www.python.org/dev/peps/pep-0503/#normalized-names + return re.sub('[-_.]+', '-', name).lower() + + +# def _get_pypirc_command(): +# """ +# Get the distutils command for interacting with PyPI configurations. +# :return: the command. +# """ +# from distutils.core import Distribution +# from distutils.config import PyPIRCCommand +# d = Distribution() +# return PyPIRCCommand(d) + + +class PyPIRCFile(object): + + DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/' + DEFAULT_REALM = 'pypi' + + def __init__(self, fn=None, url=None): + if fn is None: + fn = os.path.join(os.path.expanduser('~'), '.pypirc') + self.filename = fn + self.url = url + + def read(self): + result = {} + + if os.path.exists(self.filename): + repository = self.url or self.DEFAULT_REPOSITORY + + config = configparser.RawConfigParser() + config.read(self.filename) + sections = config.sections() + if 'distutils' in sections: + # let's get the list of servers + index_servers = config.get('distutils', 'index-servers') + _servers = [server.strip() for server in index_servers.split('\n') if server.strip() != ''] + if _servers == []: + # nothing set, let's try to get the default pypi + if 'pypi' in sections: + _servers = ['pypi'] + else: + for server in _servers: + result = {'server': server} + result['username'] = config.get(server, 'username') + + # optional params + for key, default in (('repository', self.DEFAULT_REPOSITORY), ('realm', self.DEFAULT_REALM), + ('password', None)): + if config.has_option(server, key): + result[key] = config.get(server, key) + else: + result[key] = default + + # work around people having "repository" for the "pypi" + # section of their config set to the HTTP (rather than + # HTTPS) URL + if (server == 'pypi' and repository in (self.DEFAULT_REPOSITORY, 'pypi')): + result['repository'] = self.DEFAULT_REPOSITORY + elif (result['server'] != repository and result['repository'] != repository): + result = {} + elif 'server-login' in sections: + # old format + server = 'server-login' + if config.has_option(server, 'repository'): + repository = config.get(server, 'repository') + else: + repository = self.DEFAULT_REPOSITORY + result = { + 'username': config.get(server, 'username'), + 'password': config.get(server, 'password'), + 'repository': repository, + 'server': server, + 'realm': self.DEFAULT_REALM + } + return result + + def update(self, username, password): + # import pdb; pdb.set_trace() + config = configparser.RawConfigParser() + fn = self.filename + config.read(fn) + if not config.has_section('pypi'): + config.add_section('pypi') + config.set('pypi', 'username', username) + config.set('pypi', 'password', password) + with open(fn, 'w') as f: + config.write(f) + + +def _load_pypirc(index): + """ + Read the PyPI access configuration as supported by distutils. + """ + return PyPIRCFile(url=index.url).read() + + +def _store_pypirc(index): + PyPIRCFile().update(index.username, index.password) + + +# +# get_platform()/get_host_platform() copied from Python 3.10.a0 source, with some minor +# tweaks +# + + +def get_host_platform(): + """Return a string that identifies the current platform. This is used mainly to + distinguish platform-specific build directories and platform-specific built + distributions. Typically includes the OS name and version and the + architecture (as supplied by 'os.uname()'), although the exact information + included depends on the OS; eg. on Linux, the kernel version isn't + particularly important. + + Examples of returned values: + linux-i586 + linux-alpha (?) + solaris-2.6-sun4u + + Windows will return one of: + win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) + win32 (all others - specifically, sys.platform is returned) + + For other non-POSIX platforms, currently just returns 'sys.platform'. + + """ + if os.name == 'nt': + if 'amd64' in sys.version.lower(): + return 'win-amd64' + if '(arm)' in sys.version.lower(): + return 'win-arm32' + if '(arm64)' in sys.version.lower(): + return 'win-arm64' + return sys.platform + + # Set for cross builds explicitly + if "_PYTHON_HOST_PLATFORM" in os.environ: + return os.environ["_PYTHON_HOST_PLATFORM"] + + if os.name != 'posix' or not hasattr(os, 'uname'): + # XXX what about the architecture? NT is Intel or Alpha, + # Mac OS is M68k or PPC, etc. + return sys.platform + + # Try to distinguish various flavours of Unix + + (osname, host, release, version, machine) = os.uname() + + # Convert the OS name to lowercase, remove '/' characters, and translate + # spaces (for "Power Macintosh") + osname = osname.lower().replace('/', '') + machine = machine.replace(' ', '_').replace('/', '-') + + if osname[:5] == 'linux': + # At least on Linux/Intel, 'machine' is the processor -- + # i386, etc. + # XXX what about Alpha, SPARC, etc? + return "%s-%s" % (osname, machine) + + elif osname[:5] == 'sunos': + if release[0] >= '5': # SunOS 5 == Solaris 2 + osname = 'solaris' + release = '%d.%s' % (int(release[0]) - 3, release[2:]) + # We can't use 'platform.architecture()[0]' because a + # bootstrap problem. We use a dict to get an error + # if some suspicious happens. + bitness = {2147483647: '32bit', 9223372036854775807: '64bit'} + machine += '.%s' % bitness[sys.maxsize] + # fall through to standard osname-release-machine representation + elif osname[:3] == 'aix': + from _aix_support import aix_platform + return aix_platform() + elif osname[:6] == 'cygwin': + osname = 'cygwin' + rel_re = re.compile(r'[\d.]+', re.ASCII) + m = rel_re.match(release) + if m: + release = m.group() + elif osname[:6] == 'darwin': + import _osx_support + try: + from distutils import sysconfig + except ImportError: + import sysconfig + osname, release, machine = _osx_support.get_platform_osx(sysconfig.get_config_vars(), osname, release, machine) + + return '%s-%s-%s' % (osname, release, machine) + + +_TARGET_TO_PLAT = { + 'x86': 'win32', + 'x64': 'win-amd64', + 'arm': 'win-arm32', +} + + +def get_platform(): + if os.name != 'nt': + return get_host_platform() + cross_compilation_target = os.environ.get('VSCMD_ARG_TGT_ARCH') + if cross_compilation_target not in _TARGET_TO_PLAT: + return get_host_platform() + return _TARGET_TO_PLAT[cross_compilation_target] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/version.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/version.py new file mode 100644 index 0000000000000000000000000000000000000000..d70a96ef51e737d207c87e0af404b225764a6027 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/version.py @@ -0,0 +1,750 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2012-2023 The Python Software Foundation. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +""" +Implementation of a flexible versioning scheme providing support for PEP-440, +setuptools-compatible and semantic versioning. +""" + +import logging +import re + +from .compat import string_types +from .util import parse_requirement + +__all__ = ['NormalizedVersion', 'NormalizedMatcher', + 'LegacyVersion', 'LegacyMatcher', + 'SemanticVersion', 'SemanticMatcher', + 'UnsupportedVersionError', 'get_scheme'] + +logger = logging.getLogger(__name__) + + +class UnsupportedVersionError(ValueError): + """This is an unsupported version.""" + pass + + +class Version(object): + def __init__(self, s): + self._string = s = s.strip() + self._parts = parts = self.parse(s) + assert isinstance(parts, tuple) + assert len(parts) > 0 + + def parse(self, s): + raise NotImplementedError('please implement in a subclass') + + def _check_compatible(self, other): + if type(self) != type(other): + raise TypeError('cannot compare %r and %r' % (self, other)) + + def __eq__(self, other): + self._check_compatible(other) + return self._parts == other._parts + + def __ne__(self, other): + return not self.__eq__(other) + + def __lt__(self, other): + self._check_compatible(other) + return self._parts < other._parts + + def __gt__(self, other): + return not (self.__lt__(other) or self.__eq__(other)) + + def __le__(self, other): + return self.__lt__(other) or self.__eq__(other) + + def __ge__(self, other): + return self.__gt__(other) or self.__eq__(other) + + # See http://docs.python.org/reference/datamodel#object.__hash__ + def __hash__(self): + return hash(self._parts) + + def __repr__(self): + return "%s('%s')" % (self.__class__.__name__, self._string) + + def __str__(self): + return self._string + + @property + def is_prerelease(self): + raise NotImplementedError('Please implement in subclasses.') + + +class Matcher(object): + version_class = None + + # value is either a callable or the name of a method + _operators = { + '<': lambda v, c, p: v < c, + '>': lambda v, c, p: v > c, + '<=': lambda v, c, p: v == c or v < c, + '>=': lambda v, c, p: v == c or v > c, + '==': lambda v, c, p: v == c, + '===': lambda v, c, p: v == c, + # by default, compatible => >=. + '~=': lambda v, c, p: v == c or v > c, + '!=': lambda v, c, p: v != c, + } + + # this is a method only to support alternative implementations + # via overriding + def parse_requirement(self, s): + return parse_requirement(s) + + def __init__(self, s): + if self.version_class is None: + raise ValueError('Please specify a version class') + self._string = s = s.strip() + r = self.parse_requirement(s) + if not r: + raise ValueError('Not valid: %r' % s) + self.name = r.name + self.key = self.name.lower() # for case-insensitive comparisons + clist = [] + if r.constraints: + # import pdb; pdb.set_trace() + for op, s in r.constraints: + if s.endswith('.*'): + if op not in ('==', '!='): + raise ValueError('\'.*\' not allowed for ' + '%r constraints' % op) + # Could be a partial version (e.g. for '2.*') which + # won't parse as a version, so keep it as a string + vn, prefix = s[:-2], True + # Just to check that vn is a valid version + self.version_class(vn) + else: + # Should parse as a version, so we can create an + # instance for the comparison + vn, prefix = self.version_class(s), False + clist.append((op, vn, prefix)) + self._parts = tuple(clist) + + def match(self, version): + """ + Check if the provided version matches the constraints. + + :param version: The version to match against this instance. + :type version: String or :class:`Version` instance. + """ + if isinstance(version, string_types): + version = self.version_class(version) + for operator, constraint, prefix in self._parts: + f = self._operators.get(operator) + if isinstance(f, string_types): + f = getattr(self, f) + if not f: + msg = ('%r not implemented ' + 'for %s' % (operator, self.__class__.__name__)) + raise NotImplementedError(msg) + if not f(version, constraint, prefix): + return False + return True + + @property + def exact_version(self): + result = None + if len(self._parts) == 1 and self._parts[0][0] in ('==', '==='): + result = self._parts[0][1] + return result + + def _check_compatible(self, other): + if type(self) != type(other) or self.name != other.name: + raise TypeError('cannot compare %s and %s' % (self, other)) + + def __eq__(self, other): + self._check_compatible(other) + return self.key == other.key and self._parts == other._parts + + def __ne__(self, other): + return not self.__eq__(other) + + # See http://docs.python.org/reference/datamodel#object.__hash__ + def __hash__(self): + return hash(self.key) + hash(self._parts) + + def __repr__(self): + return "%s(%r)" % (self.__class__.__name__, self._string) + + def __str__(self): + return self._string + + +PEP440_VERSION_RE = re.compile(r'^v?(\d+!)?(\d+(\.\d+)*)((a|alpha|b|beta|c|rc|pre|preview)(\d+)?)?' + r'(\.(post|r|rev)(\d+)?)?([._-]?(dev)(\d+)?)?' + r'(\+([a-zA-Z\d]+(\.[a-zA-Z\d]+)?))?$', re.I) + + +def _pep_440_key(s): + s = s.strip() + m = PEP440_VERSION_RE.match(s) + if not m: + raise UnsupportedVersionError('Not a valid version: %s' % s) + groups = m.groups() + nums = tuple(int(v) for v in groups[1].split('.')) + while len(nums) > 1 and nums[-1] == 0: + nums = nums[:-1] + + if not groups[0]: + epoch = 0 + else: + epoch = int(groups[0][:-1]) + pre = groups[4:6] + post = groups[7:9] + dev = groups[10:12] + local = groups[13] + if pre == (None, None): + pre = () + else: + if pre[1] is None: + pre = pre[0], 0 + else: + pre = pre[0], int(pre[1]) + if post == (None, None): + post = () + else: + if post[1] is None: + post = post[0], 0 + else: + post = post[0], int(post[1]) + if dev == (None, None): + dev = () + else: + if dev[1] is None: + dev = dev[0], 0 + else: + dev = dev[0], int(dev[1]) + if local is None: + local = () + else: + parts = [] + for part in local.split('.'): + # to ensure that numeric compares as > lexicographic, avoid + # comparing them directly, but encode a tuple which ensures + # correct sorting + if part.isdigit(): + part = (1, int(part)) + else: + part = (0, part) + parts.append(part) + local = tuple(parts) + if not pre: + # either before pre-release, or final release and after + if not post and dev: + # before pre-release + pre = ('a', -1) # to sort before a0 + else: + pre = ('z',) # to sort after all pre-releases + # now look at the state of post and dev. + if not post: + post = ('_',) # sort before 'a' + if not dev: + dev = ('final',) + + return epoch, nums, pre, post, dev, local + + +_normalized_key = _pep_440_key + + +class NormalizedVersion(Version): + """A rational version. + + Good: + 1.2 # equivalent to "1.2.0" + 1.2.0 + 1.2a1 + 1.2.3a2 + 1.2.3b1 + 1.2.3c1 + 1.2.3.4 + TODO: fill this out + + Bad: + 1 # minimum two numbers + 1.2a # release level must have a release serial + 1.2.3b + """ + def parse(self, s): + result = _normalized_key(s) + # _normalized_key loses trailing zeroes in the release + # clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0 + # However, PEP 440 prefix matching needs it: for example, + # (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0). + m = PEP440_VERSION_RE.match(s) # must succeed + groups = m.groups() + self._release_clause = tuple(int(v) for v in groups[1].split('.')) + return result + + PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev']) + + @property + def is_prerelease(self): + return any(t[0] in self.PREREL_TAGS for t in self._parts if t) + + +def _match_prefix(x, y): + x = str(x) + y = str(y) + if x == y: + return True + if not x.startswith(y): + return False + n = len(y) + return x[n] == '.' + + +class NormalizedMatcher(Matcher): + version_class = NormalizedVersion + + # value is either a callable or the name of a method + _operators = { + '~=': '_match_compatible', + '<': '_match_lt', + '>': '_match_gt', + '<=': '_match_le', + '>=': '_match_ge', + '==': '_match_eq', + '===': '_match_arbitrary', + '!=': '_match_ne', + } + + def _adjust_local(self, version, constraint, prefix): + if prefix: + strip_local = '+' not in constraint and version._parts[-1] + else: + # both constraint and version are + # NormalizedVersion instances. + # If constraint does not have a local component, + # ensure the version doesn't, either. + strip_local = not constraint._parts[-1] and version._parts[-1] + if strip_local: + s = version._string.split('+', 1)[0] + version = self.version_class(s) + return version, constraint + + def _match_lt(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + if version >= constraint: + return False + release_clause = constraint._release_clause + pfx = '.'.join([str(i) for i in release_clause]) + return not _match_prefix(version, pfx) + + def _match_gt(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + if version <= constraint: + return False + release_clause = constraint._release_clause + pfx = '.'.join([str(i) for i in release_clause]) + return not _match_prefix(version, pfx) + + def _match_le(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + return version <= constraint + + def _match_ge(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + return version >= constraint + + def _match_eq(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + if not prefix: + result = (version == constraint) + else: + result = _match_prefix(version, constraint) + return result + + def _match_arbitrary(self, version, constraint, prefix): + return str(version) == str(constraint) + + def _match_ne(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + if not prefix: + result = (version != constraint) + else: + result = not _match_prefix(version, constraint) + return result + + def _match_compatible(self, version, constraint, prefix): + version, constraint = self._adjust_local(version, constraint, prefix) + if version == constraint: + return True + if version < constraint: + return False +# if not prefix: +# return True + release_clause = constraint._release_clause + if len(release_clause) > 1: + release_clause = release_clause[:-1] + pfx = '.'.join([str(i) for i in release_clause]) + return _match_prefix(version, pfx) + + +_REPLACEMENTS = ( + (re.compile('[.+-]$'), ''), # remove trailing puncts + (re.compile(r'^[.](\d)'), r'0.\1'), # .N -> 0.N at start + (re.compile('^[.-]'), ''), # remove leading puncts + (re.compile(r'^\((.*)\)$'), r'\1'), # remove parentheses + (re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'), # remove leading v(ersion) + (re.compile(r'^r(ev)?\s*(\d+)'), r'\2'), # remove leading v(ersion) + (re.compile('[.]{2,}'), '.'), # multiple runs of '.' + (re.compile(r'\b(alfa|apha)\b'), 'alpha'), # misspelt alpha + (re.compile(r'\b(pre-alpha|prealpha)\b'), + 'pre.alpha'), # standardise + (re.compile(r'\(beta\)$'), 'beta'), # remove parentheses +) + +_SUFFIX_REPLACEMENTS = ( + (re.compile('^[:~._+-]+'), ''), # remove leading puncts + (re.compile('[,*")([\\]]'), ''), # remove unwanted chars + (re.compile('[~:+_ -]'), '.'), # replace illegal chars + (re.compile('[.]{2,}'), '.'), # multiple runs of '.' + (re.compile(r'\.$'), ''), # trailing '.' +) + +_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)') + + +def _suggest_semantic_version(s): + """ + Try to suggest a semantic form for a version for which + _suggest_normalized_version couldn't come up with anything. + """ + result = s.strip().lower() + for pat, repl in _REPLACEMENTS: + result = pat.sub(repl, result) + if not result: + result = '0.0.0' + + # Now look for numeric prefix, and separate it out from + # the rest. + # import pdb; pdb.set_trace() + m = _NUMERIC_PREFIX.match(result) + if not m: + prefix = '0.0.0' + suffix = result + else: + prefix = m.groups()[0].split('.') + prefix = [int(i) for i in prefix] + while len(prefix) < 3: + prefix.append(0) + if len(prefix) == 3: + suffix = result[m.end():] + else: + suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():] + prefix = prefix[:3] + prefix = '.'.join([str(i) for i in prefix]) + suffix = suffix.strip() + if suffix: + # import pdb; pdb.set_trace() + # massage the suffix. + for pat, repl in _SUFFIX_REPLACEMENTS: + suffix = pat.sub(repl, suffix) + + if not suffix: + result = prefix + else: + sep = '-' if 'dev' in suffix else '+' + result = prefix + sep + suffix + if not is_semver(result): + result = None + return result + + +def _suggest_normalized_version(s): + """Suggest a normalized version close to the given version string. + + If you have a version string that isn't rational (i.e. NormalizedVersion + doesn't like it) then you might be able to get an equivalent (or close) + rational version from this function. + + This does a number of simple normalizations to the given string, based + on observation of versions currently in use on PyPI. Given a dump of + those version during PyCon 2009, 4287 of them: + - 2312 (53.93%) match NormalizedVersion without change + with the automatic suggestion + - 3474 (81.04%) match when using this suggestion method + + @param s {str} An irrational version string. + @returns A rational version string, or None, if couldn't determine one. + """ + try: + _normalized_key(s) + return s # already rational + except UnsupportedVersionError: + pass + + rs = s.lower() + + # part of this could use maketrans + for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'), + ('beta', 'b'), ('rc', 'c'), ('-final', ''), + ('-pre', 'c'), + ('-release', ''), ('.release', ''), ('-stable', ''), + ('+', '.'), ('_', '.'), (' ', ''), ('.final', ''), + ('final', '')): + rs = rs.replace(orig, repl) + + # if something ends with dev or pre, we add a 0 + rs = re.sub(r"pre$", r"pre0", rs) + rs = re.sub(r"dev$", r"dev0", rs) + + # if we have something like "b-2" or "a.2" at the end of the + # version, that is probably beta, alpha, etc + # let's remove the dash or dot + rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs) + + # 1.0-dev-r371 -> 1.0.dev371 + # 0.1-dev-r79 -> 0.1.dev79 + rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs) + + # Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1 + rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs) + + # Clean: v0.3, v1.0 + if rs.startswith('v'): + rs = rs[1:] + + # Clean leading '0's on numbers. + # TODO: unintended side-effect on, e.g., "2003.05.09" + # PyPI stats: 77 (~2%) better + rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs) + + # Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers + # zero. + # PyPI stats: 245 (7.56%) better + rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs) + + # the 'dev-rNNN' tag is a dev tag + rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs) + + # clean the - when used as a pre delimiter + rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs) + + # a terminal "dev" or "devel" can be changed into ".dev0" + rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs) + + # a terminal "dev" can be changed into ".dev0" + rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs) + + # a terminal "final" or "stable" can be removed + rs = re.sub(r"(final|stable)$", "", rs) + + # The 'r' and the '-' tags are post release tags + # 0.4a1.r10 -> 0.4a1.post10 + # 0.9.33-17222 -> 0.9.33.post17222 + # 0.9.33-r17222 -> 0.9.33.post17222 + rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs) + + # Clean 'r' instead of 'dev' usage: + # 0.9.33+r17222 -> 0.9.33.dev17222 + # 1.0dev123 -> 1.0.dev123 + # 1.0.git123 -> 1.0.dev123 + # 1.0.bzr123 -> 1.0.dev123 + # 0.1a0dev.123 -> 0.1a0.dev123 + # PyPI stats: ~150 (~4%) better + rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs) + + # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage: + # 0.2.pre1 -> 0.2c1 + # 0.2-c1 -> 0.2c1 + # 1.0preview123 -> 1.0c123 + # PyPI stats: ~21 (0.62%) better + rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs) + + # Tcl/Tk uses "px" for their post release markers + rs = re.sub(r"p(\d+)$", r".post\1", rs) + + try: + _normalized_key(rs) + except UnsupportedVersionError: + rs = None + return rs + +# +# Legacy version processing (distribute-compatible) +# + + +_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I) +_VERSION_REPLACE = { + 'pre': 'c', + 'preview': 'c', + '-': 'final-', + 'rc': 'c', + 'dev': '@', + '': None, + '.': None, +} + + +def _legacy_key(s): + def get_parts(s): + result = [] + for p in _VERSION_PART.split(s.lower()): + p = _VERSION_REPLACE.get(p, p) + if p: + if '0' <= p[:1] <= '9': + p = p.zfill(8) + else: + p = '*' + p + result.append(p) + result.append('*final') + return result + + result = [] + for p in get_parts(s): + if p.startswith('*'): + if p < '*final': + while result and result[-1] == '*final-': + result.pop() + while result and result[-1] == '00000000': + result.pop() + result.append(p) + return tuple(result) + + +class LegacyVersion(Version): + def parse(self, s): + return _legacy_key(s) + + @property + def is_prerelease(self): + result = False + for x in self._parts: + if (isinstance(x, string_types) and x.startswith('*') and x < '*final'): + result = True + break + return result + + +class LegacyMatcher(Matcher): + version_class = LegacyVersion + + _operators = dict(Matcher._operators) + _operators['~='] = '_match_compatible' + + numeric_re = re.compile(r'^(\d+(\.\d+)*)') + + def _match_compatible(self, version, constraint, prefix): + if version < constraint: + return False + m = self.numeric_re.match(str(constraint)) + if not m: + logger.warning('Cannot compute compatible match for version %s ' + ' and constraint %s', version, constraint) + return True + s = m.groups()[0] + if '.' in s: + s = s.rsplit('.', 1)[0] + return _match_prefix(version, s) + +# +# Semantic versioning +# + + +_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)' + r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?' + r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I) + + +def is_semver(s): + return _SEMVER_RE.match(s) + + +def _semantic_key(s): + def make_tuple(s, absent): + if s is None: + result = (absent,) + else: + parts = s[1:].split('.') + # We can't compare ints and strings on Python 3, so fudge it + # by zero-filling numeric values so simulate a numeric comparison + result = tuple([p.zfill(8) if p.isdigit() else p for p in parts]) + return result + + m = is_semver(s) + if not m: + raise UnsupportedVersionError(s) + groups = m.groups() + major, minor, patch = [int(i) for i in groups[:3]] + # choose the '|' and '*' so that versions sort correctly + pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*') + return (major, minor, patch), pre, build + + +class SemanticVersion(Version): + def parse(self, s): + return _semantic_key(s) + + @property + def is_prerelease(self): + return self._parts[1][0] != '|' + + +class SemanticMatcher(Matcher): + version_class = SemanticVersion + + +class VersionScheme(object): + def __init__(self, key, matcher, suggester=None): + self.key = key + self.matcher = matcher + self.suggester = suggester + + def is_valid_version(self, s): + try: + self.matcher.version_class(s) + result = True + except UnsupportedVersionError: + result = False + return result + + def is_valid_matcher(self, s): + try: + self.matcher(s) + result = True + except UnsupportedVersionError: + result = False + return result + + def is_valid_constraint_list(self, s): + """ + Used for processing some metadata fields + """ + # See issue #140. Be tolerant of a single trailing comma. + if s.endswith(','): + s = s[:-1] + return self.is_valid_matcher('dummy_name (%s)' % s) + + def suggest(self, s): + if self.suggester is None: + result = None + else: + result = self.suggester(s) + return result + + +_SCHEMES = { + 'normalized': VersionScheme(_normalized_key, NormalizedMatcher, + _suggest_normalized_version), + 'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s), + 'semantic': VersionScheme(_semantic_key, SemanticMatcher, + _suggest_semantic_version), +} + +_SCHEMES['default'] = _SCHEMES['normalized'] + + +def get_scheme(name): + if name not in _SCHEMES: + raise ValueError('unknown scheme name: %r' % name) + return _SCHEMES[name] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/w32.exe b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/w32.exe new file mode 100644 index 0000000000000000000000000000000000000000..4ee2d3a31b59e8b50f433ecdf0be9e496e8cc3b8 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/w32.exe differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py new file mode 100644 index 0000000000000000000000000000000000000000..62ab10fb3adaaa7e2221874bd9d3c4672b1b681a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py @@ -0,0 +1,1100 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2013-2023 Vinay Sajip. +# Licensed to the Python Software Foundation under a contributor agreement. +# See LICENSE.txt and CONTRIBUTORS.txt. +# +from __future__ import unicode_literals + +import base64 +import codecs +import datetime +from email import message_from_file +import hashlib +import json +import logging +import os +import posixpath +import re +import shutil +import sys +import tempfile +import zipfile + +from . import __version__, DistlibException +from .compat import sysconfig, ZipFile, fsdecode, text_type, filter +from .database import InstalledDistribution +from .metadata import Metadata, WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME +from .util import (FileOperator, convert_path, CSVReader, CSVWriter, Cache, cached_property, get_cache_base, + read_exports, tempdir, get_platform) +from .version import NormalizedVersion, UnsupportedVersionError + +logger = logging.getLogger(__name__) + +cache = None # created when needed + +if hasattr(sys, 'pypy_version_info'): # pragma: no cover + IMP_PREFIX = 'pp' +elif sys.platform.startswith('java'): # pragma: no cover + IMP_PREFIX = 'jy' +elif sys.platform == 'cli': # pragma: no cover + IMP_PREFIX = 'ip' +else: + IMP_PREFIX = 'cp' + +VER_SUFFIX = sysconfig.get_config_var('py_version_nodot') +if not VER_SUFFIX: # pragma: no cover + VER_SUFFIX = '%s%s' % sys.version_info[:2] +PYVER = 'py' + VER_SUFFIX +IMPVER = IMP_PREFIX + VER_SUFFIX + +ARCH = get_platform().replace('-', '_').replace('.', '_') + +ABI = sysconfig.get_config_var('SOABI') +if ABI and ABI.startswith('cpython-'): + ABI = ABI.replace('cpython-', 'cp').split('-')[0] +else: + + def _derive_abi(): + parts = ['cp', VER_SUFFIX] + if sysconfig.get_config_var('Py_DEBUG'): + parts.append('d') + if IMP_PREFIX == 'cp': + vi = sys.version_info[:2] + if vi < (3, 8): + wpm = sysconfig.get_config_var('WITH_PYMALLOC') + if wpm is None: + wpm = True + if wpm: + parts.append('m') + if vi < (3, 3): + us = sysconfig.get_config_var('Py_UNICODE_SIZE') + if us == 4 or (us is None and sys.maxunicode == 0x10FFFF): + parts.append('u') + return ''.join(parts) + + ABI = _derive_abi() + del _derive_abi + +FILENAME_RE = re.compile( + r''' +(?P[^-]+) +-(?P\d+[^-]*) +(-(?P\d+[^-]*))? +-(?P\w+\d+(\.\w+\d+)*) +-(?P\w+) +-(?P\w+(\.\w+)*) +\.whl$ +''', re.IGNORECASE | re.VERBOSE) + +NAME_VERSION_RE = re.compile(r''' +(?P[^-]+) +-(?P\d+[^-]*) +(-(?P\d+[^-]*))?$ +''', re.IGNORECASE | re.VERBOSE) + +SHEBANG_RE = re.compile(br'\s*#![^\r\n]*') +SHEBANG_DETAIL_RE = re.compile(br'^(\s*#!("[^"]+"|\S+))\s+(.*)$') +SHEBANG_PYTHON = b'#!python' +SHEBANG_PYTHONW = b'#!pythonw' + +if os.sep == '/': + to_posix = lambda o: o +else: + to_posix = lambda o: o.replace(os.sep, '/') + +if sys.version_info[0] < 3: + import imp +else: + imp = None + import importlib.machinery + import importlib.util + + +def _get_suffixes(): + if imp: + return [s[0] for s in imp.get_suffixes()] + else: + return importlib.machinery.EXTENSION_SUFFIXES + + +def _load_dynamic(name, path): + # https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly + if imp: + return imp.load_dynamic(name, path) + else: + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +class Mounter(object): + + def __init__(self): + self.impure_wheels = {} + self.libs = {} + + def add(self, pathname, extensions): + self.impure_wheels[pathname] = extensions + self.libs.update(extensions) + + def remove(self, pathname): + extensions = self.impure_wheels.pop(pathname) + for k, v in extensions: + if k in self.libs: + del self.libs[k] + + def find_module(self, fullname, path=None): + if fullname in self.libs: + result = self + else: + result = None + return result + + def load_module(self, fullname): + if fullname in sys.modules: + result = sys.modules[fullname] + else: + if fullname not in self.libs: + raise ImportError('unable to find extension for %s' % fullname) + result = _load_dynamic(fullname, self.libs[fullname]) + result.__loader__ = self + parts = fullname.rsplit('.', 1) + if len(parts) > 1: + result.__package__ = parts[0] + return result + + +_hook = Mounter() + + +class Wheel(object): + """ + Class to build and install from Wheel files (PEP 427). + """ + + wheel_version = (1, 1) + hash_kind = 'sha256' + + def __init__(self, filename=None, sign=False, verify=False): + """ + Initialise an instance using a (valid) filename. + """ + self.sign = sign + self.should_verify = verify + self.buildver = '' + self.pyver = [PYVER] + self.abi = ['none'] + self.arch = ['any'] + self.dirname = os.getcwd() + if filename is None: + self.name = 'dummy' + self.version = '0.1' + self._filename = self.filename + else: + m = NAME_VERSION_RE.match(filename) + if m: + info = m.groupdict('') + self.name = info['nm'] + # Reinstate the local version separator + self.version = info['vn'].replace('_', '-') + self.buildver = info['bn'] + self._filename = self.filename + else: + dirname, filename = os.path.split(filename) + m = FILENAME_RE.match(filename) + if not m: + raise DistlibException('Invalid name or ' + 'filename: %r' % filename) + if dirname: + self.dirname = os.path.abspath(dirname) + self._filename = filename + info = m.groupdict('') + self.name = info['nm'] + self.version = info['vn'] + self.buildver = info['bn'] + self.pyver = info['py'].split('.') + self.abi = info['bi'].split('.') + self.arch = info['ar'].split('.') + + @property + def filename(self): + """ + Build and return a filename from the various components. + """ + if self.buildver: + buildver = '-' + self.buildver + else: + buildver = '' + pyver = '.'.join(self.pyver) + abi = '.'.join(self.abi) + arch = '.'.join(self.arch) + # replace - with _ as a local version separator + version = self.version.replace('-', '_') + return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver, pyver, abi, arch) + + @property + def exists(self): + path = os.path.join(self.dirname, self.filename) + return os.path.isfile(path) + + @property + def tags(self): + for pyver in self.pyver: + for abi in self.abi: + for arch in self.arch: + yield pyver, abi, arch + + @cached_property + def metadata(self): + pathname = os.path.join(self.dirname, self.filename) + name_ver = '%s-%s' % (self.name, self.version) + info_dir = '%s.dist-info' % name_ver + wrapper = codecs.getreader('utf-8') + with ZipFile(pathname, 'r') as zf: + self.get_wheel_metadata(zf) + # wv = wheel_metadata['Wheel-Version'].split('.', 1) + # file_version = tuple([int(i) for i in wv]) + # if file_version < (1, 1): + # fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME, + # LEGACY_METADATA_FILENAME] + # else: + # fns = [WHEEL_METADATA_FILENAME, METADATA_FILENAME] + fns = [WHEEL_METADATA_FILENAME, LEGACY_METADATA_FILENAME] + result = None + for fn in fns: + try: + metadata_filename = posixpath.join(info_dir, fn) + with zf.open(metadata_filename) as bf: + wf = wrapper(bf) + result = Metadata(fileobj=wf) + if result: + break + except KeyError: + pass + if not result: + raise ValueError('Invalid wheel, because metadata is ' + 'missing: looked in %s' % ', '.join(fns)) + return result + + def get_wheel_metadata(self, zf): + name_ver = '%s-%s' % (self.name, self.version) + info_dir = '%s.dist-info' % name_ver + metadata_filename = posixpath.join(info_dir, 'WHEEL') + with zf.open(metadata_filename) as bf: + wf = codecs.getreader('utf-8')(bf) + message = message_from_file(wf) + return dict(message) + + @cached_property + def info(self): + pathname = os.path.join(self.dirname, self.filename) + with ZipFile(pathname, 'r') as zf: + result = self.get_wheel_metadata(zf) + return result + + def process_shebang(self, data): + m = SHEBANG_RE.match(data) + if m: + end = m.end() + shebang, data_after_shebang = data[:end], data[end:] + # Preserve any arguments after the interpreter + if b'pythonw' in shebang.lower(): + shebang_python = SHEBANG_PYTHONW + else: + shebang_python = SHEBANG_PYTHON + m = SHEBANG_DETAIL_RE.match(shebang) + if m: + args = b' ' + m.groups()[-1] + else: + args = b'' + shebang = shebang_python + args + data = shebang + data_after_shebang + else: + cr = data.find(b'\r') + lf = data.find(b'\n') + if cr < 0 or cr > lf: + term = b'\n' + else: + if data[cr:cr + 2] == b'\r\n': + term = b'\r\n' + else: + term = b'\r' + data = SHEBANG_PYTHON + term + data + return data + + def get_hash(self, data, hash_kind=None): + if hash_kind is None: + hash_kind = self.hash_kind + try: + hasher = getattr(hashlib, hash_kind) + except AttributeError: + raise DistlibException('Unsupported hash algorithm: %r' % hash_kind) + result = hasher(data).digest() + result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii') + return hash_kind, result + + def write_record(self, records, record_path, archive_record_path): + records = list(records) # make a copy, as mutated + records.append((archive_record_path, '', '')) + with CSVWriter(record_path) as writer: + for row in records: + writer.writerow(row) + + def write_records(self, info, libdir, archive_paths): + records = [] + distinfo, info_dir = info + # hasher = getattr(hashlib, self.hash_kind) + for ap, p in archive_paths: + with open(p, 'rb') as f: + data = f.read() + digest = '%s=%s' % self.get_hash(data) + size = os.path.getsize(p) + records.append((ap, digest, size)) + + p = os.path.join(distinfo, 'RECORD') + ap = to_posix(os.path.join(info_dir, 'RECORD')) + self.write_record(records, p, ap) + archive_paths.append((ap, p)) + + def build_zip(self, pathname, archive_paths): + with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf: + for ap, p in archive_paths: + logger.debug('Wrote %s to %s in wheel', p, ap) + zf.write(p, ap) + + def build(self, paths, tags=None, wheel_version=None): + """ + Build a wheel from files in specified paths, and use any specified tags + when determining the name of the wheel. + """ + if tags is None: + tags = {} + + libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0] + if libkey == 'platlib': + is_pure = 'false' + default_pyver = [IMPVER] + default_abi = [ABI] + default_arch = [ARCH] + else: + is_pure = 'true' + default_pyver = [PYVER] + default_abi = ['none'] + default_arch = ['any'] + + self.pyver = tags.get('pyver', default_pyver) + self.abi = tags.get('abi', default_abi) + self.arch = tags.get('arch', default_arch) + + libdir = paths[libkey] + + name_ver = '%s-%s' % (self.name, self.version) + data_dir = '%s.data' % name_ver + info_dir = '%s.dist-info' % name_ver + + archive_paths = [] + + # First, stuff which is not in site-packages + for key in ('data', 'headers', 'scripts'): + if key not in paths: + continue + path = paths[key] + if os.path.isdir(path): + for root, dirs, files in os.walk(path): + for fn in files: + p = fsdecode(os.path.join(root, fn)) + rp = os.path.relpath(p, path) + ap = to_posix(os.path.join(data_dir, key, rp)) + archive_paths.append((ap, p)) + if key == 'scripts' and not p.endswith('.exe'): + with open(p, 'rb') as f: + data = f.read() + data = self.process_shebang(data) + with open(p, 'wb') as f: + f.write(data) + + # Now, stuff which is in site-packages, other than the + # distinfo stuff. + path = libdir + distinfo = None + for root, dirs, files in os.walk(path): + if root == path: + # At the top level only, save distinfo for later + # and skip it for now + for i, dn in enumerate(dirs): + dn = fsdecode(dn) + if dn.endswith('.dist-info'): + distinfo = os.path.join(root, dn) + del dirs[i] + break + assert distinfo, '.dist-info directory expected, not found' + + for fn in files: + # comment out next suite to leave .pyc files in + if fsdecode(fn).endswith(('.pyc', '.pyo')): + continue + p = os.path.join(root, fn) + rp = to_posix(os.path.relpath(p, path)) + archive_paths.append((rp, p)) + + # Now distinfo. Assumed to be flat, i.e. os.listdir is enough. + files = os.listdir(distinfo) + for fn in files: + if fn not in ('RECORD', 'INSTALLER', 'SHARED', 'WHEEL'): + p = fsdecode(os.path.join(distinfo, fn)) + ap = to_posix(os.path.join(info_dir, fn)) + archive_paths.append((ap, p)) + + wheel_metadata = [ + 'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version), + 'Generator: distlib %s' % __version__, + 'Root-Is-Purelib: %s' % is_pure, + ] + for pyver, abi, arch in self.tags: + wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch)) + p = os.path.join(distinfo, 'WHEEL') + with open(p, 'w') as f: + f.write('\n'.join(wheel_metadata)) + ap = to_posix(os.path.join(info_dir, 'WHEEL')) + archive_paths.append((ap, p)) + + # sort the entries by archive path. Not needed by any spec, but it + # keeps the archive listing and RECORD tidier than they would otherwise + # be. Use the number of path segments to keep directory entries together, + # and keep the dist-info stuff at the end. + def sorter(t): + ap = t[0] + n = ap.count('/') + if '.dist-info' in ap: + n += 10000 + return (n, ap) + + archive_paths = sorted(archive_paths, key=sorter) + + # Now, at last, RECORD. + # Paths in here are archive paths - nothing else makes sense. + self.write_records((distinfo, info_dir), libdir, archive_paths) + # Now, ready to build the zip file + pathname = os.path.join(self.dirname, self.filename) + self.build_zip(pathname, archive_paths) + return pathname + + def skip_entry(self, arcname): + """ + Determine whether an archive entry should be skipped when verifying + or installing. + """ + # The signature file won't be in RECORD, + # and we don't currently don't do anything with it + # We also skip directories, as they won't be in RECORD + # either. See: + # + # https://github.com/pypa/wheel/issues/294 + # https://github.com/pypa/wheel/issues/287 + # https://github.com/pypa/wheel/pull/289 + # + return arcname.endswith(('/', '/RECORD.jws')) + + def install(self, paths, maker, **kwargs): + """ + Install a wheel to the specified paths. If kwarg ``warner`` is + specified, it should be a callable, which will be called with two + tuples indicating the wheel version of this software and the wheel + version in the file, if there is a discrepancy in the versions. + This can be used to issue any warnings to raise any exceptions. + If kwarg ``lib_only`` is True, only the purelib/platlib files are + installed, and the headers, scripts, data and dist-info metadata are + not written. If kwarg ``bytecode_hashed_invalidation`` is True, written + bytecode will try to use file-hash based invalidation (PEP-552) on + supported interpreter versions (CPython 3.7+). + + The return value is a :class:`InstalledDistribution` instance unless + ``options.lib_only`` is True, in which case the return value is ``None``. + """ + + dry_run = maker.dry_run + warner = kwargs.get('warner') + lib_only = kwargs.get('lib_only', False) + bc_hashed_invalidation = kwargs.get('bytecode_hashed_invalidation', False) + + pathname = os.path.join(self.dirname, self.filename) + name_ver = '%s-%s' % (self.name, self.version) + data_dir = '%s.data' % name_ver + info_dir = '%s.dist-info' % name_ver + + metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME) + wheel_metadata_name = posixpath.join(info_dir, 'WHEEL') + record_name = posixpath.join(info_dir, 'RECORD') + + wrapper = codecs.getreader('utf-8') + + with ZipFile(pathname, 'r') as zf: + with zf.open(wheel_metadata_name) as bwf: + wf = wrapper(bwf) + message = message_from_file(wf) + wv = message['Wheel-Version'].split('.', 1) + file_version = tuple([int(i) for i in wv]) + if (file_version != self.wheel_version) and warner: + warner(self.wheel_version, file_version) + + if message['Root-Is-Purelib'] == 'true': + libdir = paths['purelib'] + else: + libdir = paths['platlib'] + + records = {} + with zf.open(record_name) as bf: + with CSVReader(stream=bf) as reader: + for row in reader: + p = row[0] + records[p] = row + + data_pfx = posixpath.join(data_dir, '') + info_pfx = posixpath.join(info_dir, '') + script_pfx = posixpath.join(data_dir, 'scripts', '') + + # make a new instance rather than a copy of maker's, + # as we mutate it + fileop = FileOperator(dry_run=dry_run) + fileop.record = True # so we can rollback if needed + + bc = not sys.dont_write_bytecode # Double negatives. Lovely! + + outfiles = [] # for RECORD writing + + # for script copying/shebang processing + workdir = tempfile.mkdtemp() + # set target dir later + # we default add_launchers to False, as the + # Python Launcher should be used instead + maker.source_dir = workdir + maker.target_dir = None + try: + for zinfo in zf.infolist(): + arcname = zinfo.filename + if isinstance(arcname, text_type): + u_arcname = arcname + else: + u_arcname = arcname.decode('utf-8') + if self.skip_entry(u_arcname): + continue + row = records[u_arcname] + if row[2] and str(zinfo.file_size) != row[2]: + raise DistlibException('size mismatch for ' + '%s' % u_arcname) + if row[1]: + kind, value = row[1].split('=', 1) + with zf.open(arcname) as bf: + data = bf.read() + _, digest = self.get_hash(data, kind) + if digest != value: + raise DistlibException('digest mismatch for ' + '%s' % arcname) + + if lib_only and u_arcname.startswith((info_pfx, data_pfx)): + logger.debug('lib_only: skipping %s', u_arcname) + continue + is_script = (u_arcname.startswith(script_pfx) and not u_arcname.endswith('.exe')) + + if u_arcname.startswith(data_pfx): + _, where, rp = u_arcname.split('/', 2) + outfile = os.path.join(paths[where], convert_path(rp)) + else: + # meant for site-packages. + if u_arcname in (wheel_metadata_name, record_name): + continue + outfile = os.path.join(libdir, convert_path(u_arcname)) + if not is_script: + with zf.open(arcname) as bf: + fileop.copy_stream(bf, outfile) + # Issue #147: permission bits aren't preserved. Using + # zf.extract(zinfo, libdir) should have worked, but didn't, + # see https://www.thetopsites.net/article/53834422.shtml + # So ... manually preserve permission bits as given in zinfo + if os.name == 'posix': + # just set the normal permission bits + os.chmod(outfile, (zinfo.external_attr >> 16) & 0x1FF) + outfiles.append(outfile) + # Double check the digest of the written file + if not dry_run and row[1]: + with open(outfile, 'rb') as bf: + data = bf.read() + _, newdigest = self.get_hash(data, kind) + if newdigest != digest: + raise DistlibException('digest mismatch ' + 'on write for ' + '%s' % outfile) + if bc and outfile.endswith('.py'): + try: + pyc = fileop.byte_compile(outfile, hashed_invalidation=bc_hashed_invalidation) + outfiles.append(pyc) + except Exception: + # Don't give up if byte-compilation fails, + # but log it and perhaps warn the user + logger.warning('Byte-compilation failed', exc_info=True) + else: + fn = os.path.basename(convert_path(arcname)) + workname = os.path.join(workdir, fn) + with zf.open(arcname) as bf: + fileop.copy_stream(bf, workname) + + dn, fn = os.path.split(outfile) + maker.target_dir = dn + filenames = maker.make(fn) + fileop.set_executable_mode(filenames) + outfiles.extend(filenames) + + if lib_only: + logger.debug('lib_only: returning None') + dist = None + else: + # Generate scripts + + # Try to get pydist.json so we can see if there are + # any commands to generate. If this fails (e.g. because + # of a legacy wheel), log a warning but don't give up. + commands = None + file_version = self.info['Wheel-Version'] + if file_version == '1.0': + # Use legacy info + ep = posixpath.join(info_dir, 'entry_points.txt') + try: + with zf.open(ep) as bwf: + epdata = read_exports(bwf) + commands = {} + for key in ('console', 'gui'): + k = '%s_scripts' % key + if k in epdata: + commands['wrap_%s' % key] = d = {} + for v in epdata[k].values(): + s = '%s:%s' % (v.prefix, v.suffix) + if v.flags: + s += ' [%s]' % ','.join(v.flags) + d[v.name] = s + except Exception: + logger.warning('Unable to read legacy script ' + 'metadata, so cannot generate ' + 'scripts') + else: + try: + with zf.open(metadata_name) as bwf: + wf = wrapper(bwf) + commands = json.load(wf).get('extensions') + if commands: + commands = commands.get('python.commands') + except Exception: + logger.warning('Unable to read JSON metadata, so ' + 'cannot generate scripts') + if commands: + console_scripts = commands.get('wrap_console', {}) + gui_scripts = commands.get('wrap_gui', {}) + if console_scripts or gui_scripts: + script_dir = paths.get('scripts', '') + if not os.path.isdir(script_dir): + raise ValueError('Valid script path not ' + 'specified') + maker.target_dir = script_dir + for k, v in console_scripts.items(): + script = '%s = %s' % (k, v) + filenames = maker.make(script) + fileop.set_executable_mode(filenames) + + if gui_scripts: + options = {'gui': True} + for k, v in gui_scripts.items(): + script = '%s = %s' % (k, v) + filenames = maker.make(script, options) + fileop.set_executable_mode(filenames) + + p = os.path.join(libdir, info_dir) + dist = InstalledDistribution(p) + + # Write SHARED + paths = dict(paths) # don't change passed in dict + del paths['purelib'] + del paths['platlib'] + paths['lib'] = libdir + p = dist.write_shared_locations(paths, dry_run) + if p: + outfiles.append(p) + + # Write RECORD + dist.write_installed_files(outfiles, paths['prefix'], dry_run) + return dist + except Exception: # pragma: no cover + logger.exception('installation failed.') + fileop.rollback() + raise + finally: + shutil.rmtree(workdir) + + def _get_dylib_cache(self): + global cache + if cache is None: + # Use native string to avoid issues on 2.x: see Python #20140. + base = os.path.join(get_cache_base(), str('dylib-cache'), '%s.%s' % sys.version_info[:2]) + cache = Cache(base) + return cache + + def _get_extensions(self): + pathname = os.path.join(self.dirname, self.filename) + name_ver = '%s-%s' % (self.name, self.version) + info_dir = '%s.dist-info' % name_ver + arcname = posixpath.join(info_dir, 'EXTENSIONS') + wrapper = codecs.getreader('utf-8') + result = [] + with ZipFile(pathname, 'r') as zf: + try: + with zf.open(arcname) as bf: + wf = wrapper(bf) + extensions = json.load(wf) + cache = self._get_dylib_cache() + prefix = cache.prefix_to_dir(self.filename, use_abspath=False) + cache_base = os.path.join(cache.base, prefix) + if not os.path.isdir(cache_base): + os.makedirs(cache_base) + for name, relpath in extensions.items(): + dest = os.path.join(cache_base, convert_path(relpath)) + if not os.path.exists(dest): + extract = True + else: + file_time = os.stat(dest).st_mtime + file_time = datetime.datetime.fromtimestamp(file_time) + info = zf.getinfo(relpath) + wheel_time = datetime.datetime(*info.date_time) + extract = wheel_time > file_time + if extract: + zf.extract(relpath, cache_base) + result.append((name, dest)) + except KeyError: + pass + return result + + def is_compatible(self): + """ + Determine if a wheel is compatible with the running system. + """ + return is_compatible(self) + + def is_mountable(self): + """ + Determine if a wheel is asserted as mountable by its metadata. + """ + return True # for now - metadata details TBD + + def mount(self, append=False): + pathname = os.path.abspath(os.path.join(self.dirname, self.filename)) + if not self.is_compatible(): + msg = 'Wheel %s not compatible with this Python.' % pathname + raise DistlibException(msg) + if not self.is_mountable(): + msg = 'Wheel %s is marked as not mountable.' % pathname + raise DistlibException(msg) + if pathname in sys.path: + logger.debug('%s already in path', pathname) + else: + if append: + sys.path.append(pathname) + else: + sys.path.insert(0, pathname) + extensions = self._get_extensions() + if extensions: + if _hook not in sys.meta_path: + sys.meta_path.append(_hook) + _hook.add(pathname, extensions) + + def unmount(self): + pathname = os.path.abspath(os.path.join(self.dirname, self.filename)) + if pathname not in sys.path: + logger.debug('%s not in path', pathname) + else: + sys.path.remove(pathname) + if pathname in _hook.impure_wheels: + _hook.remove(pathname) + if not _hook.impure_wheels: + if _hook in sys.meta_path: + sys.meta_path.remove(_hook) + + def verify(self): + pathname = os.path.join(self.dirname, self.filename) + name_ver = '%s-%s' % (self.name, self.version) + # data_dir = '%s.data' % name_ver + info_dir = '%s.dist-info' % name_ver + + # metadata_name = posixpath.join(info_dir, LEGACY_METADATA_FILENAME) + wheel_metadata_name = posixpath.join(info_dir, 'WHEEL') + record_name = posixpath.join(info_dir, 'RECORD') + + wrapper = codecs.getreader('utf-8') + + with ZipFile(pathname, 'r') as zf: + with zf.open(wheel_metadata_name) as bwf: + wf = wrapper(bwf) + message_from_file(wf) + # wv = message['Wheel-Version'].split('.', 1) + # file_version = tuple([int(i) for i in wv]) + # TODO version verification + + records = {} + with zf.open(record_name) as bf: + with CSVReader(stream=bf) as reader: + for row in reader: + p = row[0] + records[p] = row + + for zinfo in zf.infolist(): + arcname = zinfo.filename + if isinstance(arcname, text_type): + u_arcname = arcname + else: + u_arcname = arcname.decode('utf-8') + # See issue #115: some wheels have .. in their entries, but + # in the filename ... e.g. __main__..py ! So the check is + # updated to look for .. in the directory portions + p = u_arcname.split('/') + if '..' in p: + raise DistlibException('invalid entry in ' + 'wheel: %r' % u_arcname) + + if self.skip_entry(u_arcname): + continue + row = records[u_arcname] + if row[2] and str(zinfo.file_size) != row[2]: + raise DistlibException('size mismatch for ' + '%s' % u_arcname) + if row[1]: + kind, value = row[1].split('=', 1) + with zf.open(arcname) as bf: + data = bf.read() + _, digest = self.get_hash(data, kind) + if digest != value: + raise DistlibException('digest mismatch for ' + '%s' % arcname) + + def update(self, modifier, dest_dir=None, **kwargs): + """ + Update the contents of a wheel in a generic way. The modifier should + be a callable which expects a dictionary argument: its keys are + archive-entry paths, and its values are absolute filesystem paths + where the contents the corresponding archive entries can be found. The + modifier is free to change the contents of the files pointed to, add + new entries and remove entries, before returning. This method will + extract the entire contents of the wheel to a temporary location, call + the modifier, and then use the passed (and possibly updated) + dictionary to write a new wheel. If ``dest_dir`` is specified, the new + wheel is written there -- otherwise, the original wheel is overwritten. + + The modifier should return True if it updated the wheel, else False. + This method returns the same value the modifier returns. + """ + + def get_version(path_map, info_dir): + version = path = None + key = '%s/%s' % (info_dir, LEGACY_METADATA_FILENAME) + if key not in path_map: + key = '%s/PKG-INFO' % info_dir + if key in path_map: + path = path_map[key] + version = Metadata(path=path).version + return version, path + + def update_version(version, path): + updated = None + try: + NormalizedVersion(version) + i = version.find('-') + if i < 0: + updated = '%s+1' % version + else: + parts = [int(s) for s in version[i + 1:].split('.')] + parts[-1] += 1 + updated = '%s+%s' % (version[:i], '.'.join(str(i) for i in parts)) + except UnsupportedVersionError: + logger.debug('Cannot update non-compliant (PEP-440) ' + 'version %r', version) + if updated: + md = Metadata(path=path) + md.version = updated + legacy = path.endswith(LEGACY_METADATA_FILENAME) + md.write(path=path, legacy=legacy) + logger.debug('Version updated from %r to %r', version, updated) + + pathname = os.path.join(self.dirname, self.filename) + name_ver = '%s-%s' % (self.name, self.version) + info_dir = '%s.dist-info' % name_ver + record_name = posixpath.join(info_dir, 'RECORD') + with tempdir() as workdir: + with ZipFile(pathname, 'r') as zf: + path_map = {} + for zinfo in zf.infolist(): + arcname = zinfo.filename + if isinstance(arcname, text_type): + u_arcname = arcname + else: + u_arcname = arcname.decode('utf-8') + if u_arcname == record_name: + continue + if '..' in u_arcname: + raise DistlibException('invalid entry in ' + 'wheel: %r' % u_arcname) + zf.extract(zinfo, workdir) + path = os.path.join(workdir, convert_path(u_arcname)) + path_map[u_arcname] = path + + # Remember the version. + original_version, _ = get_version(path_map, info_dir) + # Files extracted. Call the modifier. + modified = modifier(path_map, **kwargs) + if modified: + # Something changed - need to build a new wheel. + current_version, path = get_version(path_map, info_dir) + if current_version and (current_version == original_version): + # Add or update local version to signify changes. + update_version(current_version, path) + # Decide where the new wheel goes. + if dest_dir is None: + fd, newpath = tempfile.mkstemp(suffix='.whl', prefix='wheel-update-', dir=workdir) + os.close(fd) + else: + if not os.path.isdir(dest_dir): + raise DistlibException('Not a directory: %r' % dest_dir) + newpath = os.path.join(dest_dir, self.filename) + archive_paths = list(path_map.items()) + distinfo = os.path.join(workdir, info_dir) + info = distinfo, info_dir + self.write_records(info, workdir, archive_paths) + self.build_zip(newpath, archive_paths) + if dest_dir is None: + shutil.copyfile(newpath, pathname) + return modified + + +def _get_glibc_version(): + import platform + ver = platform.libc_ver() + result = [] + if ver[0] == 'glibc': + for s in ver[1].split('.'): + result.append(int(s) if s.isdigit() else 0) + result = tuple(result) + return result + + +def compatible_tags(): + """ + Return (pyver, abi, arch) tuples compatible with this Python. + """ + class _Version: + def __init__(self, major, minor): + self.major = major + self.major_minor = (major, minor) + self.string = ''.join((str(major), str(minor))) + + def __str__(self): + return self.string + + + versions = [ + _Version(sys.version_info.major, minor_version) + for minor_version in range(sys.version_info.minor, -1, -1) + ] + abis = [] + for suffix in _get_suffixes(): + if suffix.startswith('.abi'): + abis.append(suffix.split('.', 2)[1]) + abis.sort() + if ABI != 'none': + abis.insert(0, ABI) + abis.append('none') + result = [] + + arches = [ARCH] + if sys.platform == 'darwin': + m = re.match(r'(\w+)_(\d+)_(\d+)_(\w+)$', ARCH) + if m: + name, major, minor, arch = m.groups() + minor = int(minor) + matches = [arch] + if arch in ('i386', 'ppc'): + matches.append('fat') + if arch in ('i386', 'ppc', 'x86_64'): + matches.append('fat3') + if arch in ('ppc64', 'x86_64'): + matches.append('fat64') + if arch in ('i386', 'x86_64'): + matches.append('intel') + if arch in ('i386', 'x86_64', 'intel', 'ppc', 'ppc64'): + matches.append('universal') + while minor >= 0: + for match in matches: + s = '%s_%s_%s_%s' % (name, major, minor, match) + if s != ARCH: # already there + arches.append(s) + minor -= 1 + + # Most specific - our Python version, ABI and arch + for i, version_object in enumerate(versions): + version = str(version_object) + add_abis = [] + + if i == 0: + add_abis = abis + + if IMP_PREFIX == 'cp' and version_object.major_minor >= (3, 2): + limited_api_abi = 'abi' + str(version_object.major) + if limited_api_abi not in add_abis: + add_abis.append(limited_api_abi) + + for abi in add_abis: + for arch in arches: + result.append((''.join((IMP_PREFIX, version)), abi, arch)) + # manylinux + if abi != 'none' and sys.platform.startswith('linux'): + arch = arch.replace('linux_', '') + parts = _get_glibc_version() + if len(parts) == 2: + if parts >= (2, 5): + result.append((''.join((IMP_PREFIX, version)), abi, 'manylinux1_%s' % arch)) + if parts >= (2, 12): + result.append((''.join((IMP_PREFIX, version)), abi, 'manylinux2010_%s' % arch)) + if parts >= (2, 17): + result.append((''.join((IMP_PREFIX, version)), abi, 'manylinux2014_%s' % arch)) + result.append((''.join( + (IMP_PREFIX, version)), abi, 'manylinux_%s_%s_%s' % (parts[0], parts[1], arch))) + + # where no ABI / arch dependency, but IMP_PREFIX dependency + for i, version_object in enumerate(versions): + version = str(version_object) + result.append((''.join((IMP_PREFIX, version)), 'none', 'any')) + if i == 0: + result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any')) + + # no IMP_PREFIX, ABI or arch dependency + for i, version_object in enumerate(versions): + version = str(version_object) + result.append((''.join(('py', version)), 'none', 'any')) + if i == 0: + result.append((''.join(('py', version[0])), 'none', 'any')) + + return set(result) + + +COMPATIBLE_TAGS = compatible_tags() + +del compatible_tags + + +def is_compatible(wheel, tags=None): + if not isinstance(wheel, Wheel): + wheel = Wheel(wheel) # assume it's a filename + result = False + if tags is None: + tags = COMPATIBLE_TAGS + for ver, abi, arch in tags: + if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch: + result = True + break + return result diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7686fe85a7cc94188da76bfb1c10ad2a10821256 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py @@ -0,0 +1,54 @@ +from .distro import ( + NORMALIZED_DISTRO_ID, + NORMALIZED_LSB_ID, + NORMALIZED_OS_ID, + LinuxDistribution, + __version__, + build_number, + codename, + distro_release_attr, + distro_release_info, + id, + info, + like, + linux_distribution, + lsb_release_attr, + lsb_release_info, + major_version, + minor_version, + name, + os_release_attr, + os_release_info, + uname_attr, + uname_info, + version, + version_parts, +) + +__all__ = [ + "NORMALIZED_DISTRO_ID", + "NORMALIZED_LSB_ID", + "NORMALIZED_OS_ID", + "LinuxDistribution", + "build_number", + "codename", + "distro_release_attr", + "distro_release_info", + "id", + "info", + "like", + "linux_distribution", + "lsb_release_attr", + "lsb_release_info", + "major_version", + "minor_version", + "name", + "os_release_attr", + "os_release_info", + "uname_attr", + "uname_info", + "version", + "version_parts", +] + +__version__ = __version__ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c01d5b08b6b44379b931d54d7fcf5221fdc9fde --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py @@ -0,0 +1,4 @@ +from .distro import main + +if __name__ == "__main__": + main() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7113c6421f9a7a980402166f0bd996c205e026cf Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a650f3d84b4a69d18316349f820dd44774b43c2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74ed6883cf506c77ca1155fd482bdf9e2ef2b8f2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/distro.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/distro.py new file mode 100644 index 0000000000000000000000000000000000000000..78ccdfa402ac29a8ef8aaddf7b527a0efb568d43 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/distro.py @@ -0,0 +1,1403 @@ +#!/usr/bin/env python +# Copyright 2015-2021 Nir Cohen +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +The ``distro`` package (``distro`` stands for Linux Distribution) provides +information about the Linux distribution it runs on, such as a reliable +machine-readable distro ID, or version information. + +It is the recommended replacement for Python's original +:py:func:`platform.linux_distribution` function, but it provides much more +functionality. An alternative implementation became necessary because Python +3.5 deprecated this function, and Python 3.8 removed it altogether. Its +predecessor function :py:func:`platform.dist` was already deprecated since +Python 2.6 and removed in Python 3.8. Still, there are many cases in which +access to OS distribution information is needed. See `Python issue 1322 +`_ for more information. +""" + +import argparse +import json +import logging +import os +import re +import shlex +import subprocess +import sys +import warnings +from typing import ( + Any, + Callable, + Dict, + Iterable, + Optional, + Sequence, + TextIO, + Tuple, + Type, +) + +try: + from typing import TypedDict +except ImportError: + # Python 3.7 + TypedDict = dict + +__version__ = "1.9.0" + + +class VersionDict(TypedDict): + major: str + minor: str + build_number: str + + +class InfoDict(TypedDict): + id: str + version: str + version_parts: VersionDict + like: str + codename: str + + +_UNIXCONFDIR = os.environ.get("UNIXCONFDIR", "/etc") +_UNIXUSRLIBDIR = os.environ.get("UNIXUSRLIBDIR", "/usr/lib") +_OS_RELEASE_BASENAME = "os-release" + +#: Translation table for normalizing the "ID" attribute defined in os-release +#: files, for use by the :func:`distro.id` method. +#: +#: * Key: Value as defined in the os-release file, translated to lower case, +#: with blanks translated to underscores. +#: +#: * Value: Normalized value. +NORMALIZED_OS_ID = { + "ol": "oracle", # Oracle Linux + "opensuse-leap": "opensuse", # Newer versions of OpenSuSE report as opensuse-leap +} + +#: Translation table for normalizing the "Distributor ID" attribute returned by +#: the lsb_release command, for use by the :func:`distro.id` method. +#: +#: * Key: Value as returned by the lsb_release command, translated to lower +#: case, with blanks translated to underscores. +#: +#: * Value: Normalized value. +NORMALIZED_LSB_ID = { + "enterpriseenterpriseas": "oracle", # Oracle Enterprise Linux 4 + "enterpriseenterpriseserver": "oracle", # Oracle Linux 5 + "redhatenterpriseworkstation": "rhel", # RHEL 6, 7 Workstation + "redhatenterpriseserver": "rhel", # RHEL 6, 7 Server + "redhatenterprisecomputenode": "rhel", # RHEL 6 ComputeNode +} + +#: Translation table for normalizing the distro ID derived from the file name +#: of distro release files, for use by the :func:`distro.id` method. +#: +#: * Key: Value as derived from the file name of a distro release file, +#: translated to lower case, with blanks translated to underscores. +#: +#: * Value: Normalized value. +NORMALIZED_DISTRO_ID = { + "redhat": "rhel", # RHEL 6.x, 7.x +} + +# Pattern for content of distro release file (reversed) +_DISTRO_RELEASE_CONTENT_REVERSED_PATTERN = re.compile( + r"(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)" +) + +# Pattern for base file name of distro release file +_DISTRO_RELEASE_BASENAME_PATTERN = re.compile(r"(\w+)[-_](release|version)$") + +# Base file names to be looked up for if _UNIXCONFDIR is not readable. +_DISTRO_RELEASE_BASENAMES = [ + "SuSE-release", + "altlinux-release", + "arch-release", + "base-release", + "centos-release", + "fedora-release", + "gentoo-release", + "mageia-release", + "mandrake-release", + "mandriva-release", + "mandrivalinux-release", + "manjaro-release", + "oracle-release", + "redhat-release", + "rocky-release", + "sl-release", + "slackware-version", +] + +# Base file names to be ignored when searching for distro release file +_DISTRO_RELEASE_IGNORE_BASENAMES = ( + "debian_version", + "lsb-release", + "oem-release", + _OS_RELEASE_BASENAME, + "system-release", + "plesk-release", + "iredmail-release", + "board-release", + "ec2_version", +) + + +def linux_distribution(full_distribution_name: bool = True) -> Tuple[str, str, str]: + """ + .. deprecated:: 1.6.0 + + :func:`distro.linux_distribution()` is deprecated. It should only be + used as a compatibility shim with Python's + :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`, + :func:`distro.version` and :func:`distro.name` instead. + + Return information about the current OS distribution as a tuple + ``(id_name, version, codename)`` with items as follows: + + * ``id_name``: If *full_distribution_name* is false, the result of + :func:`distro.id`. Otherwise, the result of :func:`distro.name`. + + * ``version``: The result of :func:`distro.version`. + + * ``codename``: The extra item (usually in parentheses) after the + os-release version number, or the result of :func:`distro.codename`. + + The interface of this function is compatible with the original + :py:func:`platform.linux_distribution` function, supporting a subset of + its parameters. + + The data it returns may not exactly be the same, because it uses more data + sources than the original function, and that may lead to different data if + the OS distribution is not consistent across multiple data sources it + provides (there are indeed such distributions ...). + + Another reason for differences is the fact that the :func:`distro.id` + method normalizes the distro ID string to a reliable machine-readable value + for a number of popular OS distributions. + """ + warnings.warn( + "distro.linux_distribution() is deprecated. It should only be used as a " + "compatibility shim with Python's platform.linux_distribution(). Please use " + "distro.id(), distro.version() and distro.name() instead.", + DeprecationWarning, + stacklevel=2, + ) + return _distro.linux_distribution(full_distribution_name) + + +def id() -> str: + """ + Return the distro ID of the current distribution, as a + machine-readable string. + + For a number of OS distributions, the returned distro ID value is + *reliable*, in the sense that it is documented and that it does not change + across releases of the distribution. + + This package maintains the following reliable distro ID values: + + ============== ========================================= + Distro ID Distribution + ============== ========================================= + "ubuntu" Ubuntu + "debian" Debian + "rhel" RedHat Enterprise Linux + "centos" CentOS + "fedora" Fedora + "sles" SUSE Linux Enterprise Server + "opensuse" openSUSE + "amzn" Amazon Linux + "arch" Arch Linux + "buildroot" Buildroot + "cloudlinux" CloudLinux OS + "exherbo" Exherbo Linux + "gentoo" GenToo Linux + "ibm_powerkvm" IBM PowerKVM + "kvmibm" KVM for IBM z Systems + "linuxmint" Linux Mint + "mageia" Mageia + "mandriva" Mandriva Linux + "parallels" Parallels + "pidora" Pidora + "raspbian" Raspbian + "oracle" Oracle Linux (and Oracle Enterprise Linux) + "scientific" Scientific Linux + "slackware" Slackware + "xenserver" XenServer + "openbsd" OpenBSD + "netbsd" NetBSD + "freebsd" FreeBSD + "midnightbsd" MidnightBSD + "rocky" Rocky Linux + "aix" AIX + "guix" Guix System + "altlinux" ALT Linux + ============== ========================================= + + If you have a need to get distros for reliable IDs added into this set, + or if you find that the :func:`distro.id` function returns a different + distro ID for one of the listed distros, please create an issue in the + `distro issue tracker`_. + + **Lookup hierarchy and transformations:** + + First, the ID is obtained from the following sources, in the specified + order. The first available and non-empty value is used: + + * the value of the "ID" attribute of the os-release file, + + * the value of the "Distributor ID" attribute returned by the lsb_release + command, + + * the first part of the file name of the distro release file, + + The so determined ID value then passes the following transformations, + before it is returned by this method: + + * it is translated to lower case, + + * blanks (which should not be there anyway) are translated to underscores, + + * a normalization of the ID is performed, based upon + `normalization tables`_. The purpose of this normalization is to ensure + that the ID is as reliable as possible, even across incompatible changes + in the OS distributions. A common reason for an incompatible change is + the addition of an os-release file, or the addition of the lsb_release + command, with ID values that differ from what was previously determined + from the distro release file name. + """ + return _distro.id() + + +def name(pretty: bool = False) -> str: + """ + Return the name of the current OS distribution, as a human-readable + string. + + If *pretty* is false, the name is returned without version or codename. + (e.g. "CentOS Linux") + + If *pretty* is true, the version and codename are appended. + (e.g. "CentOS Linux 7.1.1503 (Core)") + + **Lookup hierarchy:** + + The name is obtained from the following sources, in the specified order. + The first available and non-empty value is used: + + * If *pretty* is false: + + - the value of the "NAME" attribute of the os-release file, + + - the value of the "Distributor ID" attribute returned by the lsb_release + command, + + - the value of the "" field of the distro release file. + + * If *pretty* is true: + + - the value of the "PRETTY_NAME" attribute of the os-release file, + + - the value of the "Description" attribute returned by the lsb_release + command, + + - the value of the "" field of the distro release file, appended + with the value of the pretty version ("" and "" + fields) of the distro release file, if available. + """ + return _distro.name(pretty) + + +def version(pretty: bool = False, best: bool = False) -> str: + """ + Return the version of the current OS distribution, as a human-readable + string. + + If *pretty* is false, the version is returned without codename (e.g. + "7.0"). + + If *pretty* is true, the codename in parenthesis is appended, if the + codename is non-empty (e.g. "7.0 (Maipo)"). + + Some distributions provide version numbers with different precisions in + the different sources of distribution information. Examining the different + sources in a fixed priority order does not always yield the most precise + version (e.g. for Debian 8.2, or CentOS 7.1). + + Some other distributions may not provide this kind of information. In these + cases, an empty string would be returned. This behavior can be observed + with rolling releases distributions (e.g. Arch Linux). + + The *best* parameter can be used to control the approach for the returned + version: + + If *best* is false, the first non-empty version number in priority order of + the examined sources is returned. + + If *best* is true, the most precise version number out of all examined + sources is returned. + + **Lookup hierarchy:** + + In all cases, the version number is obtained from the following sources. + If *best* is false, this order represents the priority order: + + * the value of the "VERSION_ID" attribute of the os-release file, + * the value of the "Release" attribute returned by the lsb_release + command, + * the version number parsed from the "" field of the first line + of the distro release file, + * the version number parsed from the "PRETTY_NAME" attribute of the + os-release file, if it follows the format of the distro release files. + * the version number parsed from the "Description" attribute returned by + the lsb_release command, if it follows the format of the distro release + files. + """ + return _distro.version(pretty, best) + + +def version_parts(best: bool = False) -> Tuple[str, str, str]: + """ + Return the version of the current OS distribution as a tuple + ``(major, minor, build_number)`` with items as follows: + + * ``major``: The result of :func:`distro.major_version`. + + * ``minor``: The result of :func:`distro.minor_version`. + + * ``build_number``: The result of :func:`distro.build_number`. + + For a description of the *best* parameter, see the :func:`distro.version` + method. + """ + return _distro.version_parts(best) + + +def major_version(best: bool = False) -> str: + """ + Return the major version of the current OS distribution, as a string, + if provided. + Otherwise, the empty string is returned. The major version is the first + part of the dot-separated version string. + + For a description of the *best* parameter, see the :func:`distro.version` + method. + """ + return _distro.major_version(best) + + +def minor_version(best: bool = False) -> str: + """ + Return the minor version of the current OS distribution, as a string, + if provided. + Otherwise, the empty string is returned. The minor version is the second + part of the dot-separated version string. + + For a description of the *best* parameter, see the :func:`distro.version` + method. + """ + return _distro.minor_version(best) + + +def build_number(best: bool = False) -> str: + """ + Return the build number of the current OS distribution, as a string, + if provided. + Otherwise, the empty string is returned. The build number is the third part + of the dot-separated version string. + + For a description of the *best* parameter, see the :func:`distro.version` + method. + """ + return _distro.build_number(best) + + +def like() -> str: + """ + Return a space-separated list of distro IDs of distributions that are + closely related to the current OS distribution in regards to packaging + and programming interfaces, for example distributions the current + distribution is a derivative from. + + **Lookup hierarchy:** + + This information item is only provided by the os-release file. + For details, see the description of the "ID_LIKE" attribute in the + `os-release man page + `_. + """ + return _distro.like() + + +def codename() -> str: + """ + Return the codename for the release of the current OS distribution, + as a string. + + If the distribution does not have a codename, an empty string is returned. + + Note that the returned codename is not always really a codename. For + example, openSUSE returns "x86_64". This function does not handle such + cases in any special way and just returns the string it finds, if any. + + **Lookup hierarchy:** + + * the codename within the "VERSION" attribute of the os-release file, if + provided, + + * the value of the "Codename" attribute returned by the lsb_release + command, + + * the value of the "" field of the distro release file. + """ + return _distro.codename() + + +def info(pretty: bool = False, best: bool = False) -> InfoDict: + """ + Return certain machine-readable information items about the current OS + distribution in a dictionary, as shown in the following example: + + .. sourcecode:: python + + { + 'id': 'rhel', + 'version': '7.0', + 'version_parts': { + 'major': '7', + 'minor': '0', + 'build_number': '' + }, + 'like': 'fedora', + 'codename': 'Maipo' + } + + The dictionary structure and keys are always the same, regardless of which + information items are available in the underlying data sources. The values + for the various keys are as follows: + + * ``id``: The result of :func:`distro.id`. + + * ``version``: The result of :func:`distro.version`. + + * ``version_parts -> major``: The result of :func:`distro.major_version`. + + * ``version_parts -> minor``: The result of :func:`distro.minor_version`. + + * ``version_parts -> build_number``: The result of + :func:`distro.build_number`. + + * ``like``: The result of :func:`distro.like`. + + * ``codename``: The result of :func:`distro.codename`. + + For a description of the *pretty* and *best* parameters, see the + :func:`distro.version` method. + """ + return _distro.info(pretty, best) + + +def os_release_info() -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information items + from the os-release file data source of the current OS distribution. + + See `os-release file`_ for details about these information items. + """ + return _distro.os_release_info() + + +def lsb_release_info() -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information items + from the lsb_release command data source of the current OS distribution. + + See `lsb_release command output`_ for details about these information + items. + """ + return _distro.lsb_release_info() + + +def distro_release_info() -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information items + from the distro release file data source of the current OS distribution. + + See `distro release file`_ for details about these information items. + """ + return _distro.distro_release_info() + + +def uname_info() -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information items + from the distro release file data source of the current OS distribution. + """ + return _distro.uname_info() + + +def os_release_attr(attribute: str) -> str: + """ + Return a single named information item from the os-release file data source + of the current OS distribution. + + Parameters: + + * ``attribute`` (string): Key of the information item. + + Returns: + + * (string): Value of the information item, if the item exists. + The empty string, if the item does not exist. + + See `os-release file`_ for details about these information items. + """ + return _distro.os_release_attr(attribute) + + +def lsb_release_attr(attribute: str) -> str: + """ + Return a single named information item from the lsb_release command output + data source of the current OS distribution. + + Parameters: + + * ``attribute`` (string): Key of the information item. + + Returns: + + * (string): Value of the information item, if the item exists. + The empty string, if the item does not exist. + + See `lsb_release command output`_ for details about these information + items. + """ + return _distro.lsb_release_attr(attribute) + + +def distro_release_attr(attribute: str) -> str: + """ + Return a single named information item from the distro release file + data source of the current OS distribution. + + Parameters: + + * ``attribute`` (string): Key of the information item. + + Returns: + + * (string): Value of the information item, if the item exists. + The empty string, if the item does not exist. + + See `distro release file`_ for details about these information items. + """ + return _distro.distro_release_attr(attribute) + + +def uname_attr(attribute: str) -> str: + """ + Return a single named information item from the distro release file + data source of the current OS distribution. + + Parameters: + + * ``attribute`` (string): Key of the information item. + + Returns: + + * (string): Value of the information item, if the item exists. + The empty string, if the item does not exist. + """ + return _distro.uname_attr(attribute) + + +try: + from functools import cached_property +except ImportError: + # Python < 3.8 + class cached_property: # type: ignore + """A version of @property which caches the value. On access, it calls the + underlying function and sets the value in `__dict__` so future accesses + will not re-call the property. + """ + + def __init__(self, f: Callable[[Any], Any]) -> None: + self._fname = f.__name__ + self._f = f + + def __get__(self, obj: Any, owner: Type[Any]) -> Any: + assert obj is not None, f"call {self._fname} on an instance" + ret = obj.__dict__[self._fname] = self._f(obj) + return ret + + +class LinuxDistribution: + """ + Provides information about a OS distribution. + + This package creates a private module-global instance of this class with + default initialization arguments, that is used by the + `consolidated accessor functions`_ and `single source accessor functions`_. + By using default initialization arguments, that module-global instance + returns data about the current OS distribution (i.e. the distro this + package runs on). + + Normally, it is not necessary to create additional instances of this class. + However, in situations where control is needed over the exact data sources + that are used, instances of this class can be created with a specific + distro release file, or a specific os-release file, or without invoking the + lsb_release command. + """ + + def __init__( + self, + include_lsb: Optional[bool] = None, + os_release_file: str = "", + distro_release_file: str = "", + include_uname: Optional[bool] = None, + root_dir: Optional[str] = None, + include_oslevel: Optional[bool] = None, + ) -> None: + """ + The initialization method of this class gathers information from the + available data sources, and stores that in private instance attributes. + Subsequent access to the information items uses these private instance + attributes, so that the data sources are read only once. + + Parameters: + + * ``include_lsb`` (bool): Controls whether the + `lsb_release command output`_ is included as a data source. + + If the lsb_release command is not available in the program execution + path, the data source for the lsb_release command will be empty. + + * ``os_release_file`` (string): The path name of the + `os-release file`_ that is to be used as a data source. + + An empty string (the default) will cause the default path name to + be used (see `os-release file`_ for details). + + If the specified or defaulted os-release file does not exist, the + data source for the os-release file will be empty. + + * ``distro_release_file`` (string): The path name of the + `distro release file`_ that is to be used as a data source. + + An empty string (the default) will cause a default search algorithm + to be used (see `distro release file`_ for details). + + If the specified distro release file does not exist, or if no default + distro release file can be found, the data source for the distro + release file will be empty. + + * ``include_uname`` (bool): Controls whether uname command output is + included as a data source. If the uname command is not available in + the program execution path the data source for the uname command will + be empty. + + * ``root_dir`` (string): The absolute path to the root directory to use + to find distro-related information files. Note that ``include_*`` + parameters must not be enabled in combination with ``root_dir``. + + * ``include_oslevel`` (bool): Controls whether (AIX) oslevel command + output is included as a data source. If the oslevel command is not + available in the program execution path the data source will be + empty. + + Public instance attributes: + + * ``os_release_file`` (string): The path name of the + `os-release file`_ that is actually used as a data source. The + empty string if no distro release file is used as a data source. + + * ``distro_release_file`` (string): The path name of the + `distro release file`_ that is actually used as a data source. The + empty string if no distro release file is used as a data source. + + * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter. + This controls whether the lsb information will be loaded. + + * ``include_uname`` (bool): The result of the ``include_uname`` + parameter. This controls whether the uname information will + be loaded. + + * ``include_oslevel`` (bool): The result of the ``include_oslevel`` + parameter. This controls whether (AIX) oslevel information will be + loaded. + + * ``root_dir`` (string): The result of the ``root_dir`` parameter. + The absolute path to the root directory to use to find distro-related + information files. + + Raises: + + * :py:exc:`ValueError`: Initialization parameters combination is not + supported. + + * :py:exc:`OSError`: Some I/O issue with an os-release file or distro + release file. + + * :py:exc:`UnicodeError`: A data source has unexpected characters or + uses an unexpected encoding. + """ + self.root_dir = root_dir + self.etc_dir = os.path.join(root_dir, "etc") if root_dir else _UNIXCONFDIR + self.usr_lib_dir = ( + os.path.join(root_dir, "usr/lib") if root_dir else _UNIXUSRLIBDIR + ) + + if os_release_file: + self.os_release_file = os_release_file + else: + etc_dir_os_release_file = os.path.join(self.etc_dir, _OS_RELEASE_BASENAME) + usr_lib_os_release_file = os.path.join( + self.usr_lib_dir, _OS_RELEASE_BASENAME + ) + + # NOTE: The idea is to respect order **and** have it set + # at all times for API backwards compatibility. + if os.path.isfile(etc_dir_os_release_file) or not os.path.isfile( + usr_lib_os_release_file + ): + self.os_release_file = etc_dir_os_release_file + else: + self.os_release_file = usr_lib_os_release_file + + self.distro_release_file = distro_release_file or "" # updated later + + is_root_dir_defined = root_dir is not None + if is_root_dir_defined and (include_lsb or include_uname or include_oslevel): + raise ValueError( + "Including subprocess data sources from specific root_dir is disallowed" + " to prevent false information" + ) + self.include_lsb = ( + include_lsb if include_lsb is not None else not is_root_dir_defined + ) + self.include_uname = ( + include_uname if include_uname is not None else not is_root_dir_defined + ) + self.include_oslevel = ( + include_oslevel if include_oslevel is not None else not is_root_dir_defined + ) + + def __repr__(self) -> str: + """Return repr of all info""" + return ( + "LinuxDistribution(" + "os_release_file={self.os_release_file!r}, " + "distro_release_file={self.distro_release_file!r}, " + "include_lsb={self.include_lsb!r}, " + "include_uname={self.include_uname!r}, " + "include_oslevel={self.include_oslevel!r}, " + "root_dir={self.root_dir!r}, " + "_os_release_info={self._os_release_info!r}, " + "_lsb_release_info={self._lsb_release_info!r}, " + "_distro_release_info={self._distro_release_info!r}, " + "_uname_info={self._uname_info!r}, " + "_oslevel_info={self._oslevel_info!r})".format(self=self) + ) + + def linux_distribution( + self, full_distribution_name: bool = True + ) -> Tuple[str, str, str]: + """ + Return information about the OS distribution that is compatible + with Python's :func:`platform.linux_distribution`, supporting a subset + of its parameters. + + For details, see :func:`distro.linux_distribution`. + """ + return ( + self.name() if full_distribution_name else self.id(), + self.version(), + self._os_release_info.get("release_codename") or self.codename(), + ) + + def id(self) -> str: + """Return the distro ID of the OS distribution, as a string. + + For details, see :func:`distro.id`. + """ + + def normalize(distro_id: str, table: Dict[str, str]) -> str: + distro_id = distro_id.lower().replace(" ", "_") + return table.get(distro_id, distro_id) + + distro_id = self.os_release_attr("id") + if distro_id: + return normalize(distro_id, NORMALIZED_OS_ID) + + distro_id = self.lsb_release_attr("distributor_id") + if distro_id: + return normalize(distro_id, NORMALIZED_LSB_ID) + + distro_id = self.distro_release_attr("id") + if distro_id: + return normalize(distro_id, NORMALIZED_DISTRO_ID) + + distro_id = self.uname_attr("id") + if distro_id: + return normalize(distro_id, NORMALIZED_DISTRO_ID) + + return "" + + def name(self, pretty: bool = False) -> str: + """ + Return the name of the OS distribution, as a string. + + For details, see :func:`distro.name`. + """ + name = ( + self.os_release_attr("name") + or self.lsb_release_attr("distributor_id") + or self.distro_release_attr("name") + or self.uname_attr("name") + ) + if pretty: + name = self.os_release_attr("pretty_name") or self.lsb_release_attr( + "description" + ) + if not name: + name = self.distro_release_attr("name") or self.uname_attr("name") + version = self.version(pretty=True) + if version: + name = f"{name} {version}" + return name or "" + + def version(self, pretty: bool = False, best: bool = False) -> str: + """ + Return the version of the OS distribution, as a string. + + For details, see :func:`distro.version`. + """ + versions = [ + self.os_release_attr("version_id"), + self.lsb_release_attr("release"), + self.distro_release_attr("version_id"), + self._parse_distro_release_content(self.os_release_attr("pretty_name")).get( + "version_id", "" + ), + self._parse_distro_release_content( + self.lsb_release_attr("description") + ).get("version_id", ""), + self.uname_attr("release"), + ] + if self.uname_attr("id").startswith("aix"): + # On AIX platforms, prefer oslevel command output. + versions.insert(0, self.oslevel_info()) + elif self.id() == "debian" or "debian" in self.like().split(): + # On Debian-like, add debian_version file content to candidates list. + versions.append(self._debian_version) + version = "" + if best: + # This algorithm uses the last version in priority order that has + # the best precision. If the versions are not in conflict, that + # does not matter; otherwise, using the last one instead of the + # first one might be considered a surprise. + for v in versions: + if v.count(".") > version.count(".") or version == "": + version = v + else: + for v in versions: + if v != "": + version = v + break + if pretty and version and self.codename(): + version = f"{version} ({self.codename()})" + return version + + def version_parts(self, best: bool = False) -> Tuple[str, str, str]: + """ + Return the version of the OS distribution, as a tuple of version + numbers. + + For details, see :func:`distro.version_parts`. + """ + version_str = self.version(best=best) + if version_str: + version_regex = re.compile(r"(\d+)\.?(\d+)?\.?(\d+)?") + matches = version_regex.match(version_str) + if matches: + major, minor, build_number = matches.groups() + return major, minor or "", build_number or "" + return "", "", "" + + def major_version(self, best: bool = False) -> str: + """ + Return the major version number of the current distribution. + + For details, see :func:`distro.major_version`. + """ + return self.version_parts(best)[0] + + def minor_version(self, best: bool = False) -> str: + """ + Return the minor version number of the current distribution. + + For details, see :func:`distro.minor_version`. + """ + return self.version_parts(best)[1] + + def build_number(self, best: bool = False) -> str: + """ + Return the build number of the current distribution. + + For details, see :func:`distro.build_number`. + """ + return self.version_parts(best)[2] + + def like(self) -> str: + """ + Return the IDs of distributions that are like the OS distribution. + + For details, see :func:`distro.like`. + """ + return self.os_release_attr("id_like") or "" + + def codename(self) -> str: + """ + Return the codename of the OS distribution. + + For details, see :func:`distro.codename`. + """ + try: + # Handle os_release specially since distros might purposefully set + # this to empty string to have no codename + return self._os_release_info["codename"] + except KeyError: + return ( + self.lsb_release_attr("codename") + or self.distro_release_attr("codename") + or "" + ) + + def info(self, pretty: bool = False, best: bool = False) -> InfoDict: + """ + Return certain machine-readable information about the OS + distribution. + + For details, see :func:`distro.info`. + """ + return InfoDict( + id=self.id(), + version=self.version(pretty, best), + version_parts=VersionDict( + major=self.major_version(best), + minor=self.minor_version(best), + build_number=self.build_number(best), + ), + like=self.like(), + codename=self.codename(), + ) + + def os_release_info(self) -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information + items from the os-release file data source of the OS distribution. + + For details, see :func:`distro.os_release_info`. + """ + return self._os_release_info + + def lsb_release_info(self) -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information + items from the lsb_release command data source of the OS + distribution. + + For details, see :func:`distro.lsb_release_info`. + """ + return self._lsb_release_info + + def distro_release_info(self) -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information + items from the distro release file data source of the OS + distribution. + + For details, see :func:`distro.distro_release_info`. + """ + return self._distro_release_info + + def uname_info(self) -> Dict[str, str]: + """ + Return a dictionary containing key-value pairs for the information + items from the uname command data source of the OS distribution. + + For details, see :func:`distro.uname_info`. + """ + return self._uname_info + + def oslevel_info(self) -> str: + """ + Return AIX' oslevel command output. + """ + return self._oslevel_info + + def os_release_attr(self, attribute: str) -> str: + """ + Return a single named information item from the os-release file data + source of the OS distribution. + + For details, see :func:`distro.os_release_attr`. + """ + return self._os_release_info.get(attribute, "") + + def lsb_release_attr(self, attribute: str) -> str: + """ + Return a single named information item from the lsb_release command + output data source of the OS distribution. + + For details, see :func:`distro.lsb_release_attr`. + """ + return self._lsb_release_info.get(attribute, "") + + def distro_release_attr(self, attribute: str) -> str: + """ + Return a single named information item from the distro release file + data source of the OS distribution. + + For details, see :func:`distro.distro_release_attr`. + """ + return self._distro_release_info.get(attribute, "") + + def uname_attr(self, attribute: str) -> str: + """ + Return a single named information item from the uname command + output data source of the OS distribution. + + For details, see :func:`distro.uname_attr`. + """ + return self._uname_info.get(attribute, "") + + @cached_property + def _os_release_info(self) -> Dict[str, str]: + """ + Get the information items from the specified os-release file. + + Returns: + A dictionary containing all information items. + """ + if os.path.isfile(self.os_release_file): + with open(self.os_release_file, encoding="utf-8") as release_file: + return self._parse_os_release_content(release_file) + return {} + + @staticmethod + def _parse_os_release_content(lines: TextIO) -> Dict[str, str]: + """ + Parse the lines of an os-release file. + + Parameters: + + * lines: Iterable through the lines in the os-release file. + Each line must be a unicode string or a UTF-8 encoded byte + string. + + Returns: + A dictionary containing all information items. + """ + props = {} + lexer = shlex.shlex(lines, posix=True) + lexer.whitespace_split = True + + tokens = list(lexer) + for token in tokens: + # At this point, all shell-like parsing has been done (i.e. + # comments processed, quotes and backslash escape sequences + # processed, multi-line values assembled, trailing newlines + # stripped, etc.), so the tokens are now either: + # * variable assignments: var=value + # * commands or their arguments (not allowed in os-release) + # Ignore any tokens that are not variable assignments + if "=" in token: + k, v = token.split("=", 1) + props[k.lower()] = v + + if "version" in props: + # extract release codename (if any) from version attribute + match = re.search(r"\((\D+)\)|,\s*(\D+)", props["version"]) + if match: + release_codename = match.group(1) or match.group(2) + props["codename"] = props["release_codename"] = release_codename + + if "version_codename" in props: + # os-release added a version_codename field. Use that in + # preference to anything else Note that some distros purposefully + # do not have code names. They should be setting + # version_codename="" + props["codename"] = props["version_codename"] + elif "ubuntu_codename" in props: + # Same as above but a non-standard field name used on older Ubuntus + props["codename"] = props["ubuntu_codename"] + + return props + + @cached_property + def _lsb_release_info(self) -> Dict[str, str]: + """ + Get the information items from the lsb_release command output. + + Returns: + A dictionary containing all information items. + """ + if not self.include_lsb: + return {} + try: + cmd = ("lsb_release", "-a") + stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) + # Command not found or lsb_release returned error + except (OSError, subprocess.CalledProcessError): + return {} + content = self._to_str(stdout).splitlines() + return self._parse_lsb_release_content(content) + + @staticmethod + def _parse_lsb_release_content(lines: Iterable[str]) -> Dict[str, str]: + """ + Parse the output of the lsb_release command. + + Parameters: + + * lines: Iterable through the lines of the lsb_release output. + Each line must be a unicode string or a UTF-8 encoded byte + string. + + Returns: + A dictionary containing all information items. + """ + props = {} + for line in lines: + kv = line.strip("\n").split(":", 1) + if len(kv) != 2: + # Ignore lines without colon. + continue + k, v = kv + props.update({k.replace(" ", "_").lower(): v.strip()}) + return props + + @cached_property + def _uname_info(self) -> Dict[str, str]: + if not self.include_uname: + return {} + try: + cmd = ("uname", "-rs") + stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) + except OSError: + return {} + content = self._to_str(stdout).splitlines() + return self._parse_uname_content(content) + + @cached_property + def _oslevel_info(self) -> str: + if not self.include_oslevel: + return "" + try: + stdout = subprocess.check_output("oslevel", stderr=subprocess.DEVNULL) + except (OSError, subprocess.CalledProcessError): + return "" + return self._to_str(stdout).strip() + + @cached_property + def _debian_version(self) -> str: + try: + with open( + os.path.join(self.etc_dir, "debian_version"), encoding="ascii" + ) as fp: + return fp.readline().rstrip() + except FileNotFoundError: + return "" + + @staticmethod + def _parse_uname_content(lines: Sequence[str]) -> Dict[str, str]: + if not lines: + return {} + props = {} + match = re.search(r"^([^\s]+)\s+([\d\.]+)", lines[0].strip()) + if match: + name, version = match.groups() + + # This is to prevent the Linux kernel version from + # appearing as the 'best' version on otherwise + # identifiable distributions. + if name == "Linux": + return {} + props["id"] = name.lower() + props["name"] = name + props["release"] = version + return props + + @staticmethod + def _to_str(bytestring: bytes) -> str: + encoding = sys.getfilesystemencoding() + return bytestring.decode(encoding) + + @cached_property + def _distro_release_info(self) -> Dict[str, str]: + """ + Get the information items from the specified distro release file. + + Returns: + A dictionary containing all information items. + """ + if self.distro_release_file: + # If it was specified, we use it and parse what we can, even if + # its file name or content does not match the expected pattern. + distro_info = self._parse_distro_release_file(self.distro_release_file) + basename = os.path.basename(self.distro_release_file) + # The file name pattern for user-specified distro release files + # is somewhat more tolerant (compared to when searching for the + # file), because we want to use what was specified as best as + # possible. + match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename) + else: + try: + basenames = [ + basename + for basename in os.listdir(self.etc_dir) + if basename not in _DISTRO_RELEASE_IGNORE_BASENAMES + and os.path.isfile(os.path.join(self.etc_dir, basename)) + ] + # We sort for repeatability in cases where there are multiple + # distro specific files; e.g. CentOS, Oracle, Enterprise all + # containing `redhat-release` on top of their own. + basenames.sort() + except OSError: + # This may occur when /etc is not readable but we can't be + # sure about the *-release files. Check common entries of + # /etc for information. If they turn out to not be there the + # error is handled in `_parse_distro_release_file()`. + basenames = _DISTRO_RELEASE_BASENAMES + for basename in basenames: + match = _DISTRO_RELEASE_BASENAME_PATTERN.match(basename) + if match is None: + continue + filepath = os.path.join(self.etc_dir, basename) + distro_info = self._parse_distro_release_file(filepath) + # The name is always present if the pattern matches. + if "name" not in distro_info: + continue + self.distro_release_file = filepath + break + else: # the loop didn't "break": no candidate. + return {} + + if match is not None: + distro_info["id"] = match.group(1) + + # CloudLinux < 7: manually enrich info with proper id. + if "cloudlinux" in distro_info.get("name", "").lower(): + distro_info["id"] = "cloudlinux" + + return distro_info + + def _parse_distro_release_file(self, filepath: str) -> Dict[str, str]: + """ + Parse a distro release file. + + Parameters: + + * filepath: Path name of the distro release file. + + Returns: + A dictionary containing all information items. + """ + try: + with open(filepath, encoding="utf-8") as fp: + # Only parse the first line. For instance, on SLES there + # are multiple lines. We don't want them... + return self._parse_distro_release_content(fp.readline()) + except OSError: + # Ignore not being able to read a specific, seemingly version + # related file. + # See https://github.com/python-distro/distro/issues/162 + return {} + + @staticmethod + def _parse_distro_release_content(line: str) -> Dict[str, str]: + """ + Parse a line from a distro release file. + + Parameters: + * line: Line from the distro release file. Must be a unicode string + or a UTF-8 encoded byte string. + + Returns: + A dictionary containing all information items. + """ + matches = _DISTRO_RELEASE_CONTENT_REVERSED_PATTERN.match(line.strip()[::-1]) + distro_info = {} + if matches: + # regexp ensures non-None + distro_info["name"] = matches.group(3)[::-1] + if matches.group(2): + distro_info["version_id"] = matches.group(2)[::-1] + if matches.group(1): + distro_info["codename"] = matches.group(1)[::-1] + elif line: + distro_info["name"] = line.strip() + return distro_info + + +_distro = LinuxDistribution() + + +def main() -> None: + logger = logging.getLogger(__name__) + logger.setLevel(logging.DEBUG) + logger.addHandler(logging.StreamHandler(sys.stdout)) + + parser = argparse.ArgumentParser(description="OS distro info tool") + parser.add_argument( + "--json", "-j", help="Output in machine readable format", action="store_true" + ) + + parser.add_argument( + "--root-dir", + "-r", + type=str, + dest="root_dir", + help="Path to the root filesystem directory (defaults to /)", + ) + + args = parser.parse_args() + + if args.root_dir: + dist = LinuxDistribution( + include_lsb=False, + include_uname=False, + include_oslevel=False, + root_dir=args.root_dir, + ) + else: + dist = _distro + + if args.json: + logger.info(json.dumps(dist.info(), indent=4, sort_keys=True)) + else: + logger.info("Name: %s", dist.name(pretty=True)) + distribution_version = dist.version(pretty=True) + logger.info("Version: %s", distribution_version) + distribution_codename = dist.codename() + logger.info("Codename: %s", distribution_codename) + + +if __name__ == "__main__": + main() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/distro/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfdc030a751b089fc7e38fc88093b791605d501d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py @@ -0,0 +1,45 @@ +from .core import ( + IDNABidiError, + IDNAError, + InvalidCodepoint, + InvalidCodepointContext, + alabel, + check_bidi, + check_hyphen_ok, + check_initial_combiner, + check_label, + check_nfc, + decode, + encode, + ulabel, + uts46_remap, + valid_contextj, + valid_contexto, + valid_label_length, + valid_string_length, +) +from .intranges import intranges_contain +from .package_data import __version__ + +__all__ = [ + "__version__", + "IDNABidiError", + "IDNAError", + "InvalidCodepoint", + "InvalidCodepointContext", + "alabel", + "check_bidi", + "check_hyphen_ok", + "check_initial_combiner", + "check_label", + "check_nfc", + "decode", + "encode", + "intranges_contain", + "ulabel", + "uts46_remap", + "valid_contextj", + "valid_contexto", + "valid_label_length", + "valid_string_length", +] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80ea535255fff7765b43fae214681fe41957dcdb Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d6666b5be9ace82bc6273335c31673e7b856160 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db472d43465a4f4557c8c4f97e790f4df45fe030 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f20ff86c80891af6780fc8be2e59ffd1226ce09 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f61937b72e6e6396d39470eb2fa68ba810957d35 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c725b6c26023d646c8045d9bac68ba1c9f21720 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6eea81693d1224f5ee5165c3f22c879044f283c Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/codec.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/codec.py new file mode 100644 index 0000000000000000000000000000000000000000..913abfd6a23ce547f84de2adc41221012f1007d6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/codec.py @@ -0,0 +1,122 @@ +import codecs +import re +from typing import Any, Optional, Tuple + +from .core import IDNAError, alabel, decode, encode, ulabel + +_unicode_dots_re = re.compile("[\u002e\u3002\uff0e\uff61]") + + +class Codec(codecs.Codec): + def encode(self, data: str, errors: str = "strict") -> Tuple[bytes, int]: + if errors != "strict": + raise IDNAError('Unsupported error handling "{}"'.format(errors)) + + if not data: + return b"", 0 + + return encode(data), len(data) + + def decode(self, data: bytes, errors: str = "strict") -> Tuple[str, int]: + if errors != "strict": + raise IDNAError('Unsupported error handling "{}"'.format(errors)) + + if not data: + return "", 0 + + return decode(data), len(data) + + +class IncrementalEncoder(codecs.BufferedIncrementalEncoder): + def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[bytes, int]: + if errors != "strict": + raise IDNAError('Unsupported error handling "{}"'.format(errors)) + + if not data: + return b"", 0 + + labels = _unicode_dots_re.split(data) + trailing_dot = b"" + if labels: + if not labels[-1]: + trailing_dot = b"." + del labels[-1] + elif not final: + # Keep potentially unfinished label until the next call + del labels[-1] + if labels: + trailing_dot = b"." + + result = [] + size = 0 + for label in labels: + result.append(alabel(label)) + if size: + size += 1 + size += len(label) + + # Join with U+002E + result_bytes = b".".join(result) + trailing_dot + size += len(trailing_dot) + return result_bytes, size + + +class IncrementalDecoder(codecs.BufferedIncrementalDecoder): + def _buffer_decode(self, data: Any, errors: str, final: bool) -> Tuple[str, int]: + if errors != "strict": + raise IDNAError('Unsupported error handling "{}"'.format(errors)) + + if not data: + return ("", 0) + + if not isinstance(data, str): + data = str(data, "ascii") + + labels = _unicode_dots_re.split(data) + trailing_dot = "" + if labels: + if not labels[-1]: + trailing_dot = "." + del labels[-1] + elif not final: + # Keep potentially unfinished label until the next call + del labels[-1] + if labels: + trailing_dot = "." + + result = [] + size = 0 + for label in labels: + result.append(ulabel(label)) + if size: + size += 1 + size += len(label) + + result_str = ".".join(result) + trailing_dot + size += len(trailing_dot) + return (result_str, size) + + +class StreamWriter(Codec, codecs.StreamWriter): + pass + + +class StreamReader(Codec, codecs.StreamReader): + pass + + +def search_function(name: str) -> Optional[codecs.CodecInfo]: + if name != "idna2008": + return None + return codecs.CodecInfo( + name=name, + encode=Codec().encode, + decode=Codec().decode, + incrementalencoder=IncrementalEncoder, + incrementaldecoder=IncrementalDecoder, + streamwriter=StreamWriter, + streamreader=StreamReader, + ) + + +codecs.register(search_function) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/compat.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/compat.py new file mode 100644 index 0000000000000000000000000000000000000000..1df9f2a70e6815908f2784e88897a9a359eef84c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/compat.py @@ -0,0 +1,15 @@ +from typing import Any, Union + +from .core import decode, encode + + +def ToASCII(label: str) -> bytes: + return encode(label) + + +def ToUnicode(label: Union[bytes, bytearray]) -> str: + return decode(label) + + +def nameprep(s: Any) -> None: + raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/core.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/core.py new file mode 100644 index 0000000000000000000000000000000000000000..9115f123f0274832af5ba1cf3c5481cc5353eecd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/core.py @@ -0,0 +1,437 @@ +import bisect +import re +import unicodedata +from typing import Optional, Union + +from . import idnadata +from .intranges import intranges_contain + +_virama_combining_class = 9 +_alabel_prefix = b"xn--" +_unicode_dots_re = re.compile("[\u002e\u3002\uff0e\uff61]") + + +class IDNAError(UnicodeError): + """Base exception for all IDNA-encoding related problems""" + + pass + + +class IDNABidiError(IDNAError): + """Exception when bidirectional requirements are not satisfied""" + + pass + + +class InvalidCodepoint(IDNAError): + """Exception when a disallowed or unallocated codepoint is used""" + + pass + + +class InvalidCodepointContext(IDNAError): + """Exception when the codepoint is not valid in the context it is used""" + + pass + + +def _combining_class(cp: int) -> int: + v = unicodedata.combining(chr(cp)) + if v == 0: + if not unicodedata.name(chr(cp)): + raise ValueError("Unknown character in unicodedata") + return v + + +def _is_script(cp: str, script: str) -> bool: + return intranges_contain(ord(cp), idnadata.scripts[script]) + + +def _punycode(s: str) -> bytes: + return s.encode("punycode") + + +def _unot(s: int) -> str: + return "U+{:04X}".format(s) + + +def valid_label_length(label: Union[bytes, str]) -> bool: + if len(label) > 63: + return False + return True + + +def valid_string_length(label: Union[bytes, str], trailing_dot: bool) -> bool: + if len(label) > (254 if trailing_dot else 253): + return False + return True + + +def check_bidi(label: str, check_ltr: bool = False) -> bool: + # Bidi rules should only be applied if string contains RTL characters + bidi_label = False + for idx, cp in enumerate(label, 1): + direction = unicodedata.bidirectional(cp) + if direction == "": + # String likely comes from a newer version of Unicode + raise IDNABidiError("Unknown directionality in label {} at position {}".format(repr(label), idx)) + if direction in ["R", "AL", "AN"]: + bidi_label = True + if not bidi_label and not check_ltr: + return True + + # Bidi rule 1 + direction = unicodedata.bidirectional(label[0]) + if direction in ["R", "AL"]: + rtl = True + elif direction == "L": + rtl = False + else: + raise IDNABidiError("First codepoint in label {} must be directionality L, R or AL".format(repr(label))) + + valid_ending = False + number_type: Optional[str] = None + for idx, cp in enumerate(label, 1): + direction = unicodedata.bidirectional(cp) + + if rtl: + # Bidi rule 2 + if direction not in [ + "R", + "AL", + "AN", + "EN", + "ES", + "CS", + "ET", + "ON", + "BN", + "NSM", + ]: + raise IDNABidiError("Invalid direction for codepoint at position {} in a right-to-left label".format(idx)) + # Bidi rule 3 + if direction in ["R", "AL", "EN", "AN"]: + valid_ending = True + elif direction != "NSM": + valid_ending = False + # Bidi rule 4 + if direction in ["AN", "EN"]: + if not number_type: + number_type = direction + else: + if number_type != direction: + raise IDNABidiError("Can not mix numeral types in a right-to-left label") + else: + # Bidi rule 5 + if direction not in ["L", "EN", "ES", "CS", "ET", "ON", "BN", "NSM"]: + raise IDNABidiError("Invalid direction for codepoint at position {} in a left-to-right label".format(idx)) + # Bidi rule 6 + if direction in ["L", "EN"]: + valid_ending = True + elif direction != "NSM": + valid_ending = False + + if not valid_ending: + raise IDNABidiError("Label ends with illegal codepoint directionality") + + return True + + +def check_initial_combiner(label: str) -> bool: + if unicodedata.category(label[0])[0] == "M": + raise IDNAError("Label begins with an illegal combining character") + return True + + +def check_hyphen_ok(label: str) -> bool: + if label[2:4] == "--": + raise IDNAError("Label has disallowed hyphens in 3rd and 4th position") + if label[0] == "-" or label[-1] == "-": + raise IDNAError("Label must not start or end with a hyphen") + return True + + +def check_nfc(label: str) -> None: + if unicodedata.normalize("NFC", label) != label: + raise IDNAError("Label must be in Normalization Form C") + + +def valid_contextj(label: str, pos: int) -> bool: + cp_value = ord(label[pos]) + + if cp_value == 0x200C: + if pos > 0: + if _combining_class(ord(label[pos - 1])) == _virama_combining_class: + return True + + ok = False + for i in range(pos - 1, -1, -1): + joining_type = idnadata.joining_types.get(ord(label[i])) + if joining_type == ord("T"): + continue + elif joining_type in [ord("L"), ord("D")]: + ok = True + break + else: + break + + if not ok: + return False + + ok = False + for i in range(pos + 1, len(label)): + joining_type = idnadata.joining_types.get(ord(label[i])) + if joining_type == ord("T"): + continue + elif joining_type in [ord("R"), ord("D")]: + ok = True + break + else: + break + return ok + + if cp_value == 0x200D: + if pos > 0: + if _combining_class(ord(label[pos - 1])) == _virama_combining_class: + return True + return False + + else: + return False + + +def valid_contexto(label: str, pos: int, exception: bool = False) -> bool: + cp_value = ord(label[pos]) + + if cp_value == 0x00B7: + if 0 < pos < len(label) - 1: + if ord(label[pos - 1]) == 0x006C and ord(label[pos + 1]) == 0x006C: + return True + return False + + elif cp_value == 0x0375: + if pos < len(label) - 1 and len(label) > 1: + return _is_script(label[pos + 1], "Greek") + return False + + elif cp_value == 0x05F3 or cp_value == 0x05F4: + if pos > 0: + return _is_script(label[pos - 1], "Hebrew") + return False + + elif cp_value == 0x30FB: + for cp in label: + if cp == "\u30fb": + continue + if _is_script(cp, "Hiragana") or _is_script(cp, "Katakana") or _is_script(cp, "Han"): + return True + return False + + elif 0x660 <= cp_value <= 0x669: + for cp in label: + if 0x6F0 <= ord(cp) <= 0x06F9: + return False + return True + + elif 0x6F0 <= cp_value <= 0x6F9: + for cp in label: + if 0x660 <= ord(cp) <= 0x0669: + return False + return True + + return False + + +def check_label(label: Union[str, bytes, bytearray]) -> None: + if isinstance(label, (bytes, bytearray)): + label = label.decode("utf-8") + if len(label) == 0: + raise IDNAError("Empty Label") + + check_nfc(label) + check_hyphen_ok(label) + check_initial_combiner(label) + + for pos, cp in enumerate(label): + cp_value = ord(cp) + if intranges_contain(cp_value, idnadata.codepoint_classes["PVALID"]): + continue + elif intranges_contain(cp_value, idnadata.codepoint_classes["CONTEXTJ"]): + try: + if not valid_contextj(label, pos): + raise InvalidCodepointContext( + "Joiner {} not allowed at position {} in {}".format(_unot(cp_value), pos + 1, repr(label)) + ) + except ValueError: + raise IDNAError( + "Unknown codepoint adjacent to joiner {} at position {} in {}".format( + _unot(cp_value), pos + 1, repr(label) + ) + ) + elif intranges_contain(cp_value, idnadata.codepoint_classes["CONTEXTO"]): + if not valid_contexto(label, pos): + raise InvalidCodepointContext( + "Codepoint {} not allowed at position {} in {}".format(_unot(cp_value), pos + 1, repr(label)) + ) + else: + raise InvalidCodepoint( + "Codepoint {} at position {} of {} not allowed".format(_unot(cp_value), pos + 1, repr(label)) + ) + + check_bidi(label) + + +def alabel(label: str) -> bytes: + try: + label_bytes = label.encode("ascii") + ulabel(label_bytes) + if not valid_label_length(label_bytes): + raise IDNAError("Label too long") + return label_bytes + except UnicodeEncodeError: + pass + + check_label(label) + label_bytes = _alabel_prefix + _punycode(label) + + if not valid_label_length(label_bytes): + raise IDNAError("Label too long") + + return label_bytes + + +def ulabel(label: Union[str, bytes, bytearray]) -> str: + if not isinstance(label, (bytes, bytearray)): + try: + label_bytes = label.encode("ascii") + except UnicodeEncodeError: + check_label(label) + return label + else: + label_bytes = label + + label_bytes = label_bytes.lower() + if label_bytes.startswith(_alabel_prefix): + label_bytes = label_bytes[len(_alabel_prefix) :] + if not label_bytes: + raise IDNAError("Malformed A-label, no Punycode eligible content found") + if label_bytes.decode("ascii")[-1] == "-": + raise IDNAError("A-label must not end with a hyphen") + else: + check_label(label_bytes) + return label_bytes.decode("ascii") + + try: + label = label_bytes.decode("punycode") + except UnicodeError: + raise IDNAError("Invalid A-label") + check_label(label) + return label + + +def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False) -> str: + """Re-map the characters in the string according to UTS46 processing.""" + from .uts46data import uts46data + + output = "" + + for pos, char in enumerate(domain): + code_point = ord(char) + try: + uts46row = uts46data[code_point if code_point < 256 else bisect.bisect_left(uts46data, (code_point, "Z")) - 1] + status = uts46row[1] + replacement: Optional[str] = None + if len(uts46row) == 3: + replacement = uts46row[2] + if ( + status == "V" + or (status == "D" and not transitional) + or (status == "3" and not std3_rules and replacement is None) + ): + output += char + elif replacement is not None and ( + status == "M" or (status == "3" and not std3_rules) or (status == "D" and transitional) + ): + output += replacement + elif status != "I": + raise IndexError() + except IndexError: + raise InvalidCodepoint( + "Codepoint {} not allowed at position {} in {}".format(_unot(code_point), pos + 1, repr(domain)) + ) + + return unicodedata.normalize("NFC", output) + + +def encode( + s: Union[str, bytes, bytearray], + strict: bool = False, + uts46: bool = False, + std3_rules: bool = False, + transitional: bool = False, +) -> bytes: + if not isinstance(s, str): + try: + s = str(s, "ascii") + except UnicodeDecodeError: + raise IDNAError("should pass a unicode string to the function rather than a byte string.") + if uts46: + s = uts46_remap(s, std3_rules, transitional) + trailing_dot = False + result = [] + if strict: + labels = s.split(".") + else: + labels = _unicode_dots_re.split(s) + if not labels or labels == [""]: + raise IDNAError("Empty domain") + if labels[-1] == "": + del labels[-1] + trailing_dot = True + for label in labels: + s = alabel(label) + if s: + result.append(s) + else: + raise IDNAError("Empty label") + if trailing_dot: + result.append(b"") + s = b".".join(result) + if not valid_string_length(s, trailing_dot): + raise IDNAError("Domain too long") + return s + + +def decode( + s: Union[str, bytes, bytearray], + strict: bool = False, + uts46: bool = False, + std3_rules: bool = False, +) -> str: + try: + if not isinstance(s, str): + s = str(s, "ascii") + except UnicodeDecodeError: + raise IDNAError("Invalid ASCII in A-label") + if uts46: + s = uts46_remap(s, std3_rules, False) + trailing_dot = False + result = [] + if not strict: + labels = _unicode_dots_re.split(s) + else: + labels = s.split(".") + if not labels or labels == [""]: + raise IDNAError("Empty domain") + if not labels[-1]: + del labels[-1] + trailing_dot = True + for label in labels: + s = ulabel(label) + if s: + result.append(s) + else: + raise IDNAError("Empty label") + if trailing_dot: + result.append("") + return ".".join(result) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py new file mode 100644 index 0000000000000000000000000000000000000000..4be6004622efcdc36a8d15efc0ac3e138a4bae02 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py @@ -0,0 +1,4243 @@ +# This file is automatically generated by tools/idna-data + +__version__ = "15.1.0" +scripts = { + "Greek": ( + 0x37000000374, + 0x37500000378, + 0x37A0000037E, + 0x37F00000380, + 0x38400000385, + 0x38600000387, + 0x3880000038B, + 0x38C0000038D, + 0x38E000003A2, + 0x3A3000003E2, + 0x3F000000400, + 0x1D2600001D2B, + 0x1D5D00001D62, + 0x1D6600001D6B, + 0x1DBF00001DC0, + 0x1F0000001F16, + 0x1F1800001F1E, + 0x1F2000001F46, + 0x1F4800001F4E, + 0x1F5000001F58, + 0x1F5900001F5A, + 0x1F5B00001F5C, + 0x1F5D00001F5E, + 0x1F5F00001F7E, + 0x1F8000001FB5, + 0x1FB600001FC5, + 0x1FC600001FD4, + 0x1FD600001FDC, + 0x1FDD00001FF0, + 0x1FF200001FF5, + 0x1FF600001FFF, + 0x212600002127, + 0xAB650000AB66, + 0x101400001018F, + 0x101A0000101A1, + 0x1D2000001D246, + ), + "Han": ( + 0x2E8000002E9A, + 0x2E9B00002EF4, + 0x2F0000002FD6, + 0x300500003006, + 0x300700003008, + 0x30210000302A, + 0x30380000303C, + 0x340000004DC0, + 0x4E000000A000, + 0xF9000000FA6E, + 0xFA700000FADA, + 0x16FE200016FE4, + 0x16FF000016FF2, + 0x200000002A6E0, + 0x2A7000002B73A, + 0x2B7400002B81E, + 0x2B8200002CEA2, + 0x2CEB00002EBE1, + 0x2EBF00002EE5E, + 0x2F8000002FA1E, + 0x300000003134B, + 0x31350000323B0, + ), + "Hebrew": ( + 0x591000005C8, + 0x5D0000005EB, + 0x5EF000005F5, + 0xFB1D0000FB37, + 0xFB380000FB3D, + 0xFB3E0000FB3F, + 0xFB400000FB42, + 0xFB430000FB45, + 0xFB460000FB50, + ), + "Hiragana": ( + 0x304100003097, + 0x309D000030A0, + 0x1B0010001B120, + 0x1B1320001B133, + 0x1B1500001B153, + 0x1F2000001F201, + ), + "Katakana": ( + 0x30A1000030FB, + 0x30FD00003100, + 0x31F000003200, + 0x32D0000032FF, + 0x330000003358, + 0xFF660000FF70, + 0xFF710000FF9E, + 0x1AFF00001AFF4, + 0x1AFF50001AFFC, + 0x1AFFD0001AFFF, + 0x1B0000001B001, + 0x1B1200001B123, + 0x1B1550001B156, + 0x1B1640001B168, + ), +} +joining_types = { + 0xAD: 84, + 0x300: 84, + 0x301: 84, + 0x302: 84, + 0x303: 84, + 0x304: 84, + 0x305: 84, + 0x306: 84, + 0x307: 84, + 0x308: 84, + 0x309: 84, + 0x30A: 84, + 0x30B: 84, + 0x30C: 84, + 0x30D: 84, + 0x30E: 84, + 0x30F: 84, + 0x310: 84, + 0x311: 84, + 0x312: 84, + 0x313: 84, + 0x314: 84, + 0x315: 84, + 0x316: 84, + 0x317: 84, + 0x318: 84, + 0x319: 84, + 0x31A: 84, + 0x31B: 84, + 0x31C: 84, + 0x31D: 84, + 0x31E: 84, + 0x31F: 84, + 0x320: 84, + 0x321: 84, + 0x322: 84, + 0x323: 84, + 0x324: 84, + 0x325: 84, + 0x326: 84, + 0x327: 84, + 0x328: 84, + 0x329: 84, + 0x32A: 84, + 0x32B: 84, + 0x32C: 84, + 0x32D: 84, + 0x32E: 84, + 0x32F: 84, + 0x330: 84, + 0x331: 84, + 0x332: 84, + 0x333: 84, + 0x334: 84, + 0x335: 84, + 0x336: 84, + 0x337: 84, + 0x338: 84, + 0x339: 84, + 0x33A: 84, + 0x33B: 84, + 0x33C: 84, + 0x33D: 84, + 0x33E: 84, + 0x33F: 84, + 0x340: 84, + 0x341: 84, + 0x342: 84, + 0x343: 84, + 0x344: 84, + 0x345: 84, + 0x346: 84, + 0x347: 84, + 0x348: 84, + 0x349: 84, + 0x34A: 84, + 0x34B: 84, + 0x34C: 84, + 0x34D: 84, + 0x34E: 84, + 0x34F: 84, + 0x350: 84, + 0x351: 84, + 0x352: 84, + 0x353: 84, + 0x354: 84, + 0x355: 84, + 0x356: 84, + 0x357: 84, + 0x358: 84, + 0x359: 84, + 0x35A: 84, + 0x35B: 84, + 0x35C: 84, + 0x35D: 84, + 0x35E: 84, + 0x35F: 84, + 0x360: 84, + 0x361: 84, + 0x362: 84, + 0x363: 84, + 0x364: 84, + 0x365: 84, + 0x366: 84, + 0x367: 84, + 0x368: 84, + 0x369: 84, + 0x36A: 84, + 0x36B: 84, + 0x36C: 84, + 0x36D: 84, + 0x36E: 84, + 0x36F: 84, + 0x483: 84, + 0x484: 84, + 0x485: 84, + 0x486: 84, + 0x487: 84, + 0x488: 84, + 0x489: 84, + 0x591: 84, + 0x592: 84, + 0x593: 84, + 0x594: 84, + 0x595: 84, + 0x596: 84, + 0x597: 84, + 0x598: 84, + 0x599: 84, + 0x59A: 84, + 0x59B: 84, + 0x59C: 84, + 0x59D: 84, + 0x59E: 84, + 0x59F: 84, + 0x5A0: 84, + 0x5A1: 84, + 0x5A2: 84, + 0x5A3: 84, + 0x5A4: 84, + 0x5A5: 84, + 0x5A6: 84, + 0x5A7: 84, + 0x5A8: 84, + 0x5A9: 84, + 0x5AA: 84, + 0x5AB: 84, + 0x5AC: 84, + 0x5AD: 84, + 0x5AE: 84, + 0x5AF: 84, + 0x5B0: 84, + 0x5B1: 84, + 0x5B2: 84, + 0x5B3: 84, + 0x5B4: 84, + 0x5B5: 84, + 0x5B6: 84, + 0x5B7: 84, + 0x5B8: 84, + 0x5B9: 84, + 0x5BA: 84, + 0x5BB: 84, + 0x5BC: 84, + 0x5BD: 84, + 0x5BF: 84, + 0x5C1: 84, + 0x5C2: 84, + 0x5C4: 84, + 0x5C5: 84, + 0x5C7: 84, + 0x610: 84, + 0x611: 84, + 0x612: 84, + 0x613: 84, + 0x614: 84, + 0x615: 84, + 0x616: 84, + 0x617: 84, + 0x618: 84, + 0x619: 84, + 0x61A: 84, + 0x61C: 84, + 0x620: 68, + 0x622: 82, + 0x623: 82, + 0x624: 82, + 0x625: 82, + 0x626: 68, + 0x627: 82, + 0x628: 68, + 0x629: 82, + 0x62A: 68, + 0x62B: 68, + 0x62C: 68, + 0x62D: 68, + 0x62E: 68, + 0x62F: 82, + 0x630: 82, + 0x631: 82, + 0x632: 82, + 0x633: 68, + 0x634: 68, + 0x635: 68, + 0x636: 68, + 0x637: 68, + 0x638: 68, + 0x639: 68, + 0x63A: 68, + 0x63B: 68, + 0x63C: 68, + 0x63D: 68, + 0x63E: 68, + 0x63F: 68, + 0x640: 67, + 0x641: 68, + 0x642: 68, + 0x643: 68, + 0x644: 68, + 0x645: 68, + 0x646: 68, + 0x647: 68, + 0x648: 82, + 0x649: 68, + 0x64A: 68, + 0x64B: 84, + 0x64C: 84, + 0x64D: 84, + 0x64E: 84, + 0x64F: 84, + 0x650: 84, + 0x651: 84, + 0x652: 84, + 0x653: 84, + 0x654: 84, + 0x655: 84, + 0x656: 84, + 0x657: 84, + 0x658: 84, + 0x659: 84, + 0x65A: 84, + 0x65B: 84, + 0x65C: 84, + 0x65D: 84, + 0x65E: 84, + 0x65F: 84, + 0x66E: 68, + 0x66F: 68, + 0x670: 84, + 0x671: 82, + 0x672: 82, + 0x673: 82, + 0x675: 82, + 0x676: 82, + 0x677: 82, + 0x678: 68, + 0x679: 68, + 0x67A: 68, + 0x67B: 68, + 0x67C: 68, + 0x67D: 68, + 0x67E: 68, + 0x67F: 68, + 0x680: 68, + 0x681: 68, + 0x682: 68, + 0x683: 68, + 0x684: 68, + 0x685: 68, + 0x686: 68, + 0x687: 68, + 0x688: 82, + 0x689: 82, + 0x68A: 82, + 0x68B: 82, + 0x68C: 82, + 0x68D: 82, + 0x68E: 82, + 0x68F: 82, + 0x690: 82, + 0x691: 82, + 0x692: 82, + 0x693: 82, + 0x694: 82, + 0x695: 82, + 0x696: 82, + 0x697: 82, + 0x698: 82, + 0x699: 82, + 0x69A: 68, + 0x69B: 68, + 0x69C: 68, + 0x69D: 68, + 0x69E: 68, + 0x69F: 68, + 0x6A0: 68, + 0x6A1: 68, + 0x6A2: 68, + 0x6A3: 68, + 0x6A4: 68, + 0x6A5: 68, + 0x6A6: 68, + 0x6A7: 68, + 0x6A8: 68, + 0x6A9: 68, + 0x6AA: 68, + 0x6AB: 68, + 0x6AC: 68, + 0x6AD: 68, + 0x6AE: 68, + 0x6AF: 68, + 0x6B0: 68, + 0x6B1: 68, + 0x6B2: 68, + 0x6B3: 68, + 0x6B4: 68, + 0x6B5: 68, + 0x6B6: 68, + 0x6B7: 68, + 0x6B8: 68, + 0x6B9: 68, + 0x6BA: 68, + 0x6BB: 68, + 0x6BC: 68, + 0x6BD: 68, + 0x6BE: 68, + 0x6BF: 68, + 0x6C0: 82, + 0x6C1: 68, + 0x6C2: 68, + 0x6C3: 82, + 0x6C4: 82, + 0x6C5: 82, + 0x6C6: 82, + 0x6C7: 82, + 0x6C8: 82, + 0x6C9: 82, + 0x6CA: 82, + 0x6CB: 82, + 0x6CC: 68, + 0x6CD: 82, + 0x6CE: 68, + 0x6CF: 82, + 0x6D0: 68, + 0x6D1: 68, + 0x6D2: 82, + 0x6D3: 82, + 0x6D5: 82, + 0x6D6: 84, + 0x6D7: 84, + 0x6D8: 84, + 0x6D9: 84, + 0x6DA: 84, + 0x6DB: 84, + 0x6DC: 84, + 0x6DF: 84, + 0x6E0: 84, + 0x6E1: 84, + 0x6E2: 84, + 0x6E3: 84, + 0x6E4: 84, + 0x6E7: 84, + 0x6E8: 84, + 0x6EA: 84, + 0x6EB: 84, + 0x6EC: 84, + 0x6ED: 84, + 0x6EE: 82, + 0x6EF: 82, + 0x6FA: 68, + 0x6FB: 68, + 0x6FC: 68, + 0x6FF: 68, + 0x70F: 84, + 0x710: 82, + 0x711: 84, + 0x712: 68, + 0x713: 68, + 0x714: 68, + 0x715: 82, + 0x716: 82, + 0x717: 82, + 0x718: 82, + 0x719: 82, + 0x71A: 68, + 0x71B: 68, + 0x71C: 68, + 0x71D: 68, + 0x71E: 82, + 0x71F: 68, + 0x720: 68, + 0x721: 68, + 0x722: 68, + 0x723: 68, + 0x724: 68, + 0x725: 68, + 0x726: 68, + 0x727: 68, + 0x728: 82, + 0x729: 68, + 0x72A: 82, + 0x72B: 68, + 0x72C: 82, + 0x72D: 68, + 0x72E: 68, + 0x72F: 82, + 0x730: 84, + 0x731: 84, + 0x732: 84, + 0x733: 84, + 0x734: 84, + 0x735: 84, + 0x736: 84, + 0x737: 84, + 0x738: 84, + 0x739: 84, + 0x73A: 84, + 0x73B: 84, + 0x73C: 84, + 0x73D: 84, + 0x73E: 84, + 0x73F: 84, + 0x740: 84, + 0x741: 84, + 0x742: 84, + 0x743: 84, + 0x744: 84, + 0x745: 84, + 0x746: 84, + 0x747: 84, + 0x748: 84, + 0x749: 84, + 0x74A: 84, + 0x74D: 82, + 0x74E: 68, + 0x74F: 68, + 0x750: 68, + 0x751: 68, + 0x752: 68, + 0x753: 68, + 0x754: 68, + 0x755: 68, + 0x756: 68, + 0x757: 68, + 0x758: 68, + 0x759: 82, + 0x75A: 82, + 0x75B: 82, + 0x75C: 68, + 0x75D: 68, + 0x75E: 68, + 0x75F: 68, + 0x760: 68, + 0x761: 68, + 0x762: 68, + 0x763: 68, + 0x764: 68, + 0x765: 68, + 0x766: 68, + 0x767: 68, + 0x768: 68, + 0x769: 68, + 0x76A: 68, + 0x76B: 82, + 0x76C: 82, + 0x76D: 68, + 0x76E: 68, + 0x76F: 68, + 0x770: 68, + 0x771: 82, + 0x772: 68, + 0x773: 82, + 0x774: 82, + 0x775: 68, + 0x776: 68, + 0x777: 68, + 0x778: 82, + 0x779: 82, + 0x77A: 68, + 0x77B: 68, + 0x77C: 68, + 0x77D: 68, + 0x77E: 68, + 0x77F: 68, + 0x7A6: 84, + 0x7A7: 84, + 0x7A8: 84, + 0x7A9: 84, + 0x7AA: 84, + 0x7AB: 84, + 0x7AC: 84, + 0x7AD: 84, + 0x7AE: 84, + 0x7AF: 84, + 0x7B0: 84, + 0x7CA: 68, + 0x7CB: 68, + 0x7CC: 68, + 0x7CD: 68, + 0x7CE: 68, + 0x7CF: 68, + 0x7D0: 68, + 0x7D1: 68, + 0x7D2: 68, + 0x7D3: 68, + 0x7D4: 68, + 0x7D5: 68, + 0x7D6: 68, + 0x7D7: 68, + 0x7D8: 68, + 0x7D9: 68, + 0x7DA: 68, + 0x7DB: 68, + 0x7DC: 68, + 0x7DD: 68, + 0x7DE: 68, + 0x7DF: 68, + 0x7E0: 68, + 0x7E1: 68, + 0x7E2: 68, + 0x7E3: 68, + 0x7E4: 68, + 0x7E5: 68, + 0x7E6: 68, + 0x7E7: 68, + 0x7E8: 68, + 0x7E9: 68, + 0x7EA: 68, + 0x7EB: 84, + 0x7EC: 84, + 0x7ED: 84, + 0x7EE: 84, + 0x7EF: 84, + 0x7F0: 84, + 0x7F1: 84, + 0x7F2: 84, + 0x7F3: 84, + 0x7FA: 67, + 0x7FD: 84, + 0x816: 84, + 0x817: 84, + 0x818: 84, + 0x819: 84, + 0x81B: 84, + 0x81C: 84, + 0x81D: 84, + 0x81E: 84, + 0x81F: 84, + 0x820: 84, + 0x821: 84, + 0x822: 84, + 0x823: 84, + 0x825: 84, + 0x826: 84, + 0x827: 84, + 0x829: 84, + 0x82A: 84, + 0x82B: 84, + 0x82C: 84, + 0x82D: 84, + 0x840: 82, + 0x841: 68, + 0x842: 68, + 0x843: 68, + 0x844: 68, + 0x845: 68, + 0x846: 82, + 0x847: 82, + 0x848: 68, + 0x849: 82, + 0x84A: 68, + 0x84B: 68, + 0x84C: 68, + 0x84D: 68, + 0x84E: 68, + 0x84F: 68, + 0x850: 68, + 0x851: 68, + 0x852: 68, + 0x853: 68, + 0x854: 82, + 0x855: 68, + 0x856: 82, + 0x857: 82, + 0x858: 82, + 0x859: 84, + 0x85A: 84, + 0x85B: 84, + 0x860: 68, + 0x862: 68, + 0x863: 68, + 0x864: 68, + 0x865: 68, + 0x867: 82, + 0x868: 68, + 0x869: 82, + 0x86A: 82, + 0x870: 82, + 0x871: 82, + 0x872: 82, + 0x873: 82, + 0x874: 82, + 0x875: 82, + 0x876: 82, + 0x877: 82, + 0x878: 82, + 0x879: 82, + 0x87A: 82, + 0x87B: 82, + 0x87C: 82, + 0x87D: 82, + 0x87E: 82, + 0x87F: 82, + 0x880: 82, + 0x881: 82, + 0x882: 82, + 0x883: 67, + 0x884: 67, + 0x885: 67, + 0x886: 68, + 0x889: 68, + 0x88A: 68, + 0x88B: 68, + 0x88C: 68, + 0x88D: 68, + 0x88E: 82, + 0x898: 84, + 0x899: 84, + 0x89A: 84, + 0x89B: 84, + 0x89C: 84, + 0x89D: 84, + 0x89E: 84, + 0x89F: 84, + 0x8A0: 68, + 0x8A1: 68, + 0x8A2: 68, + 0x8A3: 68, + 0x8A4: 68, + 0x8A5: 68, + 0x8A6: 68, + 0x8A7: 68, + 0x8A8: 68, + 0x8A9: 68, + 0x8AA: 82, + 0x8AB: 82, + 0x8AC: 82, + 0x8AE: 82, + 0x8AF: 68, + 0x8B0: 68, + 0x8B1: 82, + 0x8B2: 82, + 0x8B3: 68, + 0x8B4: 68, + 0x8B5: 68, + 0x8B6: 68, + 0x8B7: 68, + 0x8B8: 68, + 0x8B9: 82, + 0x8BA: 68, + 0x8BB: 68, + 0x8BC: 68, + 0x8BD: 68, + 0x8BE: 68, + 0x8BF: 68, + 0x8C0: 68, + 0x8C1: 68, + 0x8C2: 68, + 0x8C3: 68, + 0x8C4: 68, + 0x8C5: 68, + 0x8C6: 68, + 0x8C7: 68, + 0x8C8: 68, + 0x8CA: 84, + 0x8CB: 84, + 0x8CC: 84, + 0x8CD: 84, + 0x8CE: 84, + 0x8CF: 84, + 0x8D0: 84, + 0x8D1: 84, + 0x8D2: 84, + 0x8D3: 84, + 0x8D4: 84, + 0x8D5: 84, + 0x8D6: 84, + 0x8D7: 84, + 0x8D8: 84, + 0x8D9: 84, + 0x8DA: 84, + 0x8DB: 84, + 0x8DC: 84, + 0x8DD: 84, + 0x8DE: 84, + 0x8DF: 84, + 0x8E0: 84, + 0x8E1: 84, + 0x8E3: 84, + 0x8E4: 84, + 0x8E5: 84, + 0x8E6: 84, + 0x8E7: 84, + 0x8E8: 84, + 0x8E9: 84, + 0x8EA: 84, + 0x8EB: 84, + 0x8EC: 84, + 0x8ED: 84, + 0x8EE: 84, + 0x8EF: 84, + 0x8F0: 84, + 0x8F1: 84, + 0x8F2: 84, + 0x8F3: 84, + 0x8F4: 84, + 0x8F5: 84, + 0x8F6: 84, + 0x8F7: 84, + 0x8F8: 84, + 0x8F9: 84, + 0x8FA: 84, + 0x8FB: 84, + 0x8FC: 84, + 0x8FD: 84, + 0x8FE: 84, + 0x8FF: 84, + 0x900: 84, + 0x901: 84, + 0x902: 84, + 0x93A: 84, + 0x93C: 84, + 0x941: 84, + 0x942: 84, + 0x943: 84, + 0x944: 84, + 0x945: 84, + 0x946: 84, + 0x947: 84, + 0x948: 84, + 0x94D: 84, + 0x951: 84, + 0x952: 84, + 0x953: 84, + 0x954: 84, + 0x955: 84, + 0x956: 84, + 0x957: 84, + 0x962: 84, + 0x963: 84, + 0x981: 84, + 0x9BC: 84, + 0x9C1: 84, + 0x9C2: 84, + 0x9C3: 84, + 0x9C4: 84, + 0x9CD: 84, + 0x9E2: 84, + 0x9E3: 84, + 0x9FE: 84, + 0xA01: 84, + 0xA02: 84, + 0xA3C: 84, + 0xA41: 84, + 0xA42: 84, + 0xA47: 84, + 0xA48: 84, + 0xA4B: 84, + 0xA4C: 84, + 0xA4D: 84, + 0xA51: 84, + 0xA70: 84, + 0xA71: 84, + 0xA75: 84, + 0xA81: 84, + 0xA82: 84, + 0xABC: 84, + 0xAC1: 84, + 0xAC2: 84, + 0xAC3: 84, + 0xAC4: 84, + 0xAC5: 84, + 0xAC7: 84, + 0xAC8: 84, + 0xACD: 84, + 0xAE2: 84, + 0xAE3: 84, + 0xAFA: 84, + 0xAFB: 84, + 0xAFC: 84, + 0xAFD: 84, + 0xAFE: 84, + 0xAFF: 84, + 0xB01: 84, + 0xB3C: 84, + 0xB3F: 84, + 0xB41: 84, + 0xB42: 84, + 0xB43: 84, + 0xB44: 84, + 0xB4D: 84, + 0xB55: 84, + 0xB56: 84, + 0xB62: 84, + 0xB63: 84, + 0xB82: 84, + 0xBC0: 84, + 0xBCD: 84, + 0xC00: 84, + 0xC04: 84, + 0xC3C: 84, + 0xC3E: 84, + 0xC3F: 84, + 0xC40: 84, + 0xC46: 84, + 0xC47: 84, + 0xC48: 84, + 0xC4A: 84, + 0xC4B: 84, + 0xC4C: 84, + 0xC4D: 84, + 0xC55: 84, + 0xC56: 84, + 0xC62: 84, + 0xC63: 84, + 0xC81: 84, + 0xCBC: 84, + 0xCBF: 84, + 0xCC6: 84, + 0xCCC: 84, + 0xCCD: 84, + 0xCE2: 84, + 0xCE3: 84, + 0xD00: 84, + 0xD01: 84, + 0xD3B: 84, + 0xD3C: 84, + 0xD41: 84, + 0xD42: 84, + 0xD43: 84, + 0xD44: 84, + 0xD4D: 84, + 0xD62: 84, + 0xD63: 84, + 0xD81: 84, + 0xDCA: 84, + 0xDD2: 84, + 0xDD3: 84, + 0xDD4: 84, + 0xDD6: 84, + 0xE31: 84, + 0xE34: 84, + 0xE35: 84, + 0xE36: 84, + 0xE37: 84, + 0xE38: 84, + 0xE39: 84, + 0xE3A: 84, + 0xE47: 84, + 0xE48: 84, + 0xE49: 84, + 0xE4A: 84, + 0xE4B: 84, + 0xE4C: 84, + 0xE4D: 84, + 0xE4E: 84, + 0xEB1: 84, + 0xEB4: 84, + 0xEB5: 84, + 0xEB6: 84, + 0xEB7: 84, + 0xEB8: 84, + 0xEB9: 84, + 0xEBA: 84, + 0xEBB: 84, + 0xEBC: 84, + 0xEC8: 84, + 0xEC9: 84, + 0xECA: 84, + 0xECB: 84, + 0xECC: 84, + 0xECD: 84, + 0xECE: 84, + 0xF18: 84, + 0xF19: 84, + 0xF35: 84, + 0xF37: 84, + 0xF39: 84, + 0xF71: 84, + 0xF72: 84, + 0xF73: 84, + 0xF74: 84, + 0xF75: 84, + 0xF76: 84, + 0xF77: 84, + 0xF78: 84, + 0xF79: 84, + 0xF7A: 84, + 0xF7B: 84, + 0xF7C: 84, + 0xF7D: 84, + 0xF7E: 84, + 0xF80: 84, + 0xF81: 84, + 0xF82: 84, + 0xF83: 84, + 0xF84: 84, + 0xF86: 84, + 0xF87: 84, + 0xF8D: 84, + 0xF8E: 84, + 0xF8F: 84, + 0xF90: 84, + 0xF91: 84, + 0xF92: 84, + 0xF93: 84, + 0xF94: 84, + 0xF95: 84, + 0xF96: 84, + 0xF97: 84, + 0xF99: 84, + 0xF9A: 84, + 0xF9B: 84, + 0xF9C: 84, + 0xF9D: 84, + 0xF9E: 84, + 0xF9F: 84, + 0xFA0: 84, + 0xFA1: 84, + 0xFA2: 84, + 0xFA3: 84, + 0xFA4: 84, + 0xFA5: 84, + 0xFA6: 84, + 0xFA7: 84, + 0xFA8: 84, + 0xFA9: 84, + 0xFAA: 84, + 0xFAB: 84, + 0xFAC: 84, + 0xFAD: 84, + 0xFAE: 84, + 0xFAF: 84, + 0xFB0: 84, + 0xFB1: 84, + 0xFB2: 84, + 0xFB3: 84, + 0xFB4: 84, + 0xFB5: 84, + 0xFB6: 84, + 0xFB7: 84, + 0xFB8: 84, + 0xFB9: 84, + 0xFBA: 84, + 0xFBB: 84, + 0xFBC: 84, + 0xFC6: 84, + 0x102D: 84, + 0x102E: 84, + 0x102F: 84, + 0x1030: 84, + 0x1032: 84, + 0x1033: 84, + 0x1034: 84, + 0x1035: 84, + 0x1036: 84, + 0x1037: 84, + 0x1039: 84, + 0x103A: 84, + 0x103D: 84, + 0x103E: 84, + 0x1058: 84, + 0x1059: 84, + 0x105E: 84, + 0x105F: 84, + 0x1060: 84, + 0x1071: 84, + 0x1072: 84, + 0x1073: 84, + 0x1074: 84, + 0x1082: 84, + 0x1085: 84, + 0x1086: 84, + 0x108D: 84, + 0x109D: 84, + 0x135D: 84, + 0x135E: 84, + 0x135F: 84, + 0x1712: 84, + 0x1713: 84, + 0x1714: 84, + 0x1732: 84, + 0x1733: 84, + 0x1752: 84, + 0x1753: 84, + 0x1772: 84, + 0x1773: 84, + 0x17B4: 84, + 0x17B5: 84, + 0x17B7: 84, + 0x17B8: 84, + 0x17B9: 84, + 0x17BA: 84, + 0x17BB: 84, + 0x17BC: 84, + 0x17BD: 84, + 0x17C6: 84, + 0x17C9: 84, + 0x17CA: 84, + 0x17CB: 84, + 0x17CC: 84, + 0x17CD: 84, + 0x17CE: 84, + 0x17CF: 84, + 0x17D0: 84, + 0x17D1: 84, + 0x17D2: 84, + 0x17D3: 84, + 0x17DD: 84, + 0x1807: 68, + 0x180A: 67, + 0x180B: 84, + 0x180C: 84, + 0x180D: 84, + 0x180F: 84, + 0x1820: 68, + 0x1821: 68, + 0x1822: 68, + 0x1823: 68, + 0x1824: 68, + 0x1825: 68, + 0x1826: 68, + 0x1827: 68, + 0x1828: 68, + 0x1829: 68, + 0x182A: 68, + 0x182B: 68, + 0x182C: 68, + 0x182D: 68, + 0x182E: 68, + 0x182F: 68, + 0x1830: 68, + 0x1831: 68, + 0x1832: 68, + 0x1833: 68, + 0x1834: 68, + 0x1835: 68, + 0x1836: 68, + 0x1837: 68, + 0x1838: 68, + 0x1839: 68, + 0x183A: 68, + 0x183B: 68, + 0x183C: 68, + 0x183D: 68, + 0x183E: 68, + 0x183F: 68, + 0x1840: 68, + 0x1841: 68, + 0x1842: 68, + 0x1843: 68, + 0x1844: 68, + 0x1845: 68, + 0x1846: 68, + 0x1847: 68, + 0x1848: 68, + 0x1849: 68, + 0x184A: 68, + 0x184B: 68, + 0x184C: 68, + 0x184D: 68, + 0x184E: 68, + 0x184F: 68, + 0x1850: 68, + 0x1851: 68, + 0x1852: 68, + 0x1853: 68, + 0x1854: 68, + 0x1855: 68, + 0x1856: 68, + 0x1857: 68, + 0x1858: 68, + 0x1859: 68, + 0x185A: 68, + 0x185B: 68, + 0x185C: 68, + 0x185D: 68, + 0x185E: 68, + 0x185F: 68, + 0x1860: 68, + 0x1861: 68, + 0x1862: 68, + 0x1863: 68, + 0x1864: 68, + 0x1865: 68, + 0x1866: 68, + 0x1867: 68, + 0x1868: 68, + 0x1869: 68, + 0x186A: 68, + 0x186B: 68, + 0x186C: 68, + 0x186D: 68, + 0x186E: 68, + 0x186F: 68, + 0x1870: 68, + 0x1871: 68, + 0x1872: 68, + 0x1873: 68, + 0x1874: 68, + 0x1875: 68, + 0x1876: 68, + 0x1877: 68, + 0x1878: 68, + 0x1885: 84, + 0x1886: 84, + 0x1887: 68, + 0x1888: 68, + 0x1889: 68, + 0x188A: 68, + 0x188B: 68, + 0x188C: 68, + 0x188D: 68, + 0x188E: 68, + 0x188F: 68, + 0x1890: 68, + 0x1891: 68, + 0x1892: 68, + 0x1893: 68, + 0x1894: 68, + 0x1895: 68, + 0x1896: 68, + 0x1897: 68, + 0x1898: 68, + 0x1899: 68, + 0x189A: 68, + 0x189B: 68, + 0x189C: 68, + 0x189D: 68, + 0x189E: 68, + 0x189F: 68, + 0x18A0: 68, + 0x18A1: 68, + 0x18A2: 68, + 0x18A3: 68, + 0x18A4: 68, + 0x18A5: 68, + 0x18A6: 68, + 0x18A7: 68, + 0x18A8: 68, + 0x18A9: 84, + 0x18AA: 68, + 0x1920: 84, + 0x1921: 84, + 0x1922: 84, + 0x1927: 84, + 0x1928: 84, + 0x1932: 84, + 0x1939: 84, + 0x193A: 84, + 0x193B: 84, + 0x1A17: 84, + 0x1A18: 84, + 0x1A1B: 84, + 0x1A56: 84, + 0x1A58: 84, + 0x1A59: 84, + 0x1A5A: 84, + 0x1A5B: 84, + 0x1A5C: 84, + 0x1A5D: 84, + 0x1A5E: 84, + 0x1A60: 84, + 0x1A62: 84, + 0x1A65: 84, + 0x1A66: 84, + 0x1A67: 84, + 0x1A68: 84, + 0x1A69: 84, + 0x1A6A: 84, + 0x1A6B: 84, + 0x1A6C: 84, + 0x1A73: 84, + 0x1A74: 84, + 0x1A75: 84, + 0x1A76: 84, + 0x1A77: 84, + 0x1A78: 84, + 0x1A79: 84, + 0x1A7A: 84, + 0x1A7B: 84, + 0x1A7C: 84, + 0x1A7F: 84, + 0x1AB0: 84, + 0x1AB1: 84, + 0x1AB2: 84, + 0x1AB3: 84, + 0x1AB4: 84, + 0x1AB5: 84, + 0x1AB6: 84, + 0x1AB7: 84, + 0x1AB8: 84, + 0x1AB9: 84, + 0x1ABA: 84, + 0x1ABB: 84, + 0x1ABC: 84, + 0x1ABD: 84, + 0x1ABE: 84, + 0x1ABF: 84, + 0x1AC0: 84, + 0x1AC1: 84, + 0x1AC2: 84, + 0x1AC3: 84, + 0x1AC4: 84, + 0x1AC5: 84, + 0x1AC6: 84, + 0x1AC7: 84, + 0x1AC8: 84, + 0x1AC9: 84, + 0x1ACA: 84, + 0x1ACB: 84, + 0x1ACC: 84, + 0x1ACD: 84, + 0x1ACE: 84, + 0x1B00: 84, + 0x1B01: 84, + 0x1B02: 84, + 0x1B03: 84, + 0x1B34: 84, + 0x1B36: 84, + 0x1B37: 84, + 0x1B38: 84, + 0x1B39: 84, + 0x1B3A: 84, + 0x1B3C: 84, + 0x1B42: 84, + 0x1B6B: 84, + 0x1B6C: 84, + 0x1B6D: 84, + 0x1B6E: 84, + 0x1B6F: 84, + 0x1B70: 84, + 0x1B71: 84, + 0x1B72: 84, + 0x1B73: 84, + 0x1B80: 84, + 0x1B81: 84, + 0x1BA2: 84, + 0x1BA3: 84, + 0x1BA4: 84, + 0x1BA5: 84, + 0x1BA8: 84, + 0x1BA9: 84, + 0x1BAB: 84, + 0x1BAC: 84, + 0x1BAD: 84, + 0x1BE6: 84, + 0x1BE8: 84, + 0x1BE9: 84, + 0x1BED: 84, + 0x1BEF: 84, + 0x1BF0: 84, + 0x1BF1: 84, + 0x1C2C: 84, + 0x1C2D: 84, + 0x1C2E: 84, + 0x1C2F: 84, + 0x1C30: 84, + 0x1C31: 84, + 0x1C32: 84, + 0x1C33: 84, + 0x1C36: 84, + 0x1C37: 84, + 0x1CD0: 84, + 0x1CD1: 84, + 0x1CD2: 84, + 0x1CD4: 84, + 0x1CD5: 84, + 0x1CD6: 84, + 0x1CD7: 84, + 0x1CD8: 84, + 0x1CD9: 84, + 0x1CDA: 84, + 0x1CDB: 84, + 0x1CDC: 84, + 0x1CDD: 84, + 0x1CDE: 84, + 0x1CDF: 84, + 0x1CE0: 84, + 0x1CE2: 84, + 0x1CE3: 84, + 0x1CE4: 84, + 0x1CE5: 84, + 0x1CE6: 84, + 0x1CE7: 84, + 0x1CE8: 84, + 0x1CED: 84, + 0x1CF4: 84, + 0x1CF8: 84, + 0x1CF9: 84, + 0x1DC0: 84, + 0x1DC1: 84, + 0x1DC2: 84, + 0x1DC3: 84, + 0x1DC4: 84, + 0x1DC5: 84, + 0x1DC6: 84, + 0x1DC7: 84, + 0x1DC8: 84, + 0x1DC9: 84, + 0x1DCA: 84, + 0x1DCB: 84, + 0x1DCC: 84, + 0x1DCD: 84, + 0x1DCE: 84, + 0x1DCF: 84, + 0x1DD0: 84, + 0x1DD1: 84, + 0x1DD2: 84, + 0x1DD3: 84, + 0x1DD4: 84, + 0x1DD5: 84, + 0x1DD6: 84, + 0x1DD7: 84, + 0x1DD8: 84, + 0x1DD9: 84, + 0x1DDA: 84, + 0x1DDB: 84, + 0x1DDC: 84, + 0x1DDD: 84, + 0x1DDE: 84, + 0x1DDF: 84, + 0x1DE0: 84, + 0x1DE1: 84, + 0x1DE2: 84, + 0x1DE3: 84, + 0x1DE4: 84, + 0x1DE5: 84, + 0x1DE6: 84, + 0x1DE7: 84, + 0x1DE8: 84, + 0x1DE9: 84, + 0x1DEA: 84, + 0x1DEB: 84, + 0x1DEC: 84, + 0x1DED: 84, + 0x1DEE: 84, + 0x1DEF: 84, + 0x1DF0: 84, + 0x1DF1: 84, + 0x1DF2: 84, + 0x1DF3: 84, + 0x1DF4: 84, + 0x1DF5: 84, + 0x1DF6: 84, + 0x1DF7: 84, + 0x1DF8: 84, + 0x1DF9: 84, + 0x1DFA: 84, + 0x1DFB: 84, + 0x1DFC: 84, + 0x1DFD: 84, + 0x1DFE: 84, + 0x1DFF: 84, + 0x200B: 84, + 0x200D: 67, + 0x200E: 84, + 0x200F: 84, + 0x202A: 84, + 0x202B: 84, + 0x202C: 84, + 0x202D: 84, + 0x202E: 84, + 0x2060: 84, + 0x2061: 84, + 0x2062: 84, + 0x2063: 84, + 0x2064: 84, + 0x206A: 84, + 0x206B: 84, + 0x206C: 84, + 0x206D: 84, + 0x206E: 84, + 0x206F: 84, + 0x20D0: 84, + 0x20D1: 84, + 0x20D2: 84, + 0x20D3: 84, + 0x20D4: 84, + 0x20D5: 84, + 0x20D6: 84, + 0x20D7: 84, + 0x20D8: 84, + 0x20D9: 84, + 0x20DA: 84, + 0x20DB: 84, + 0x20DC: 84, + 0x20DD: 84, + 0x20DE: 84, + 0x20DF: 84, + 0x20E0: 84, + 0x20E1: 84, + 0x20E2: 84, + 0x20E3: 84, + 0x20E4: 84, + 0x20E5: 84, + 0x20E6: 84, + 0x20E7: 84, + 0x20E8: 84, + 0x20E9: 84, + 0x20EA: 84, + 0x20EB: 84, + 0x20EC: 84, + 0x20ED: 84, + 0x20EE: 84, + 0x20EF: 84, + 0x20F0: 84, + 0x2CEF: 84, + 0x2CF0: 84, + 0x2CF1: 84, + 0x2D7F: 84, + 0x2DE0: 84, + 0x2DE1: 84, + 0x2DE2: 84, + 0x2DE3: 84, + 0x2DE4: 84, + 0x2DE5: 84, + 0x2DE6: 84, + 0x2DE7: 84, + 0x2DE8: 84, + 0x2DE9: 84, + 0x2DEA: 84, + 0x2DEB: 84, + 0x2DEC: 84, + 0x2DED: 84, + 0x2DEE: 84, + 0x2DEF: 84, + 0x2DF0: 84, + 0x2DF1: 84, + 0x2DF2: 84, + 0x2DF3: 84, + 0x2DF4: 84, + 0x2DF5: 84, + 0x2DF6: 84, + 0x2DF7: 84, + 0x2DF8: 84, + 0x2DF9: 84, + 0x2DFA: 84, + 0x2DFB: 84, + 0x2DFC: 84, + 0x2DFD: 84, + 0x2DFE: 84, + 0x2DFF: 84, + 0x302A: 84, + 0x302B: 84, + 0x302C: 84, + 0x302D: 84, + 0x3099: 84, + 0x309A: 84, + 0xA66F: 84, + 0xA670: 84, + 0xA671: 84, + 0xA672: 84, + 0xA674: 84, + 0xA675: 84, + 0xA676: 84, + 0xA677: 84, + 0xA678: 84, + 0xA679: 84, + 0xA67A: 84, + 0xA67B: 84, + 0xA67C: 84, + 0xA67D: 84, + 0xA69E: 84, + 0xA69F: 84, + 0xA6F0: 84, + 0xA6F1: 84, + 0xA802: 84, + 0xA806: 84, + 0xA80B: 84, + 0xA825: 84, + 0xA826: 84, + 0xA82C: 84, + 0xA840: 68, + 0xA841: 68, + 0xA842: 68, + 0xA843: 68, + 0xA844: 68, + 0xA845: 68, + 0xA846: 68, + 0xA847: 68, + 0xA848: 68, + 0xA849: 68, + 0xA84A: 68, + 0xA84B: 68, + 0xA84C: 68, + 0xA84D: 68, + 0xA84E: 68, + 0xA84F: 68, + 0xA850: 68, + 0xA851: 68, + 0xA852: 68, + 0xA853: 68, + 0xA854: 68, + 0xA855: 68, + 0xA856: 68, + 0xA857: 68, + 0xA858: 68, + 0xA859: 68, + 0xA85A: 68, + 0xA85B: 68, + 0xA85C: 68, + 0xA85D: 68, + 0xA85E: 68, + 0xA85F: 68, + 0xA860: 68, + 0xA861: 68, + 0xA862: 68, + 0xA863: 68, + 0xA864: 68, + 0xA865: 68, + 0xA866: 68, + 0xA867: 68, + 0xA868: 68, + 0xA869: 68, + 0xA86A: 68, + 0xA86B: 68, + 0xA86C: 68, + 0xA86D: 68, + 0xA86E: 68, + 0xA86F: 68, + 0xA870: 68, + 0xA871: 68, + 0xA872: 76, + 0xA8C4: 84, + 0xA8C5: 84, + 0xA8E0: 84, + 0xA8E1: 84, + 0xA8E2: 84, + 0xA8E3: 84, + 0xA8E4: 84, + 0xA8E5: 84, + 0xA8E6: 84, + 0xA8E7: 84, + 0xA8E8: 84, + 0xA8E9: 84, + 0xA8EA: 84, + 0xA8EB: 84, + 0xA8EC: 84, + 0xA8ED: 84, + 0xA8EE: 84, + 0xA8EF: 84, + 0xA8F0: 84, + 0xA8F1: 84, + 0xA8FF: 84, + 0xA926: 84, + 0xA927: 84, + 0xA928: 84, + 0xA929: 84, + 0xA92A: 84, + 0xA92B: 84, + 0xA92C: 84, + 0xA92D: 84, + 0xA947: 84, + 0xA948: 84, + 0xA949: 84, + 0xA94A: 84, + 0xA94B: 84, + 0xA94C: 84, + 0xA94D: 84, + 0xA94E: 84, + 0xA94F: 84, + 0xA950: 84, + 0xA951: 84, + 0xA980: 84, + 0xA981: 84, + 0xA982: 84, + 0xA9B3: 84, + 0xA9B6: 84, + 0xA9B7: 84, + 0xA9B8: 84, + 0xA9B9: 84, + 0xA9BC: 84, + 0xA9BD: 84, + 0xA9E5: 84, + 0xAA29: 84, + 0xAA2A: 84, + 0xAA2B: 84, + 0xAA2C: 84, + 0xAA2D: 84, + 0xAA2E: 84, + 0xAA31: 84, + 0xAA32: 84, + 0xAA35: 84, + 0xAA36: 84, + 0xAA43: 84, + 0xAA4C: 84, + 0xAA7C: 84, + 0xAAB0: 84, + 0xAAB2: 84, + 0xAAB3: 84, + 0xAAB4: 84, + 0xAAB7: 84, + 0xAAB8: 84, + 0xAABE: 84, + 0xAABF: 84, + 0xAAC1: 84, + 0xAAEC: 84, + 0xAAED: 84, + 0xAAF6: 84, + 0xABE5: 84, + 0xABE8: 84, + 0xABED: 84, + 0xFB1E: 84, + 0xFE00: 84, + 0xFE01: 84, + 0xFE02: 84, + 0xFE03: 84, + 0xFE04: 84, + 0xFE05: 84, + 0xFE06: 84, + 0xFE07: 84, + 0xFE08: 84, + 0xFE09: 84, + 0xFE0A: 84, + 0xFE0B: 84, + 0xFE0C: 84, + 0xFE0D: 84, + 0xFE0E: 84, + 0xFE0F: 84, + 0xFE20: 84, + 0xFE21: 84, + 0xFE22: 84, + 0xFE23: 84, + 0xFE24: 84, + 0xFE25: 84, + 0xFE26: 84, + 0xFE27: 84, + 0xFE28: 84, + 0xFE29: 84, + 0xFE2A: 84, + 0xFE2B: 84, + 0xFE2C: 84, + 0xFE2D: 84, + 0xFE2E: 84, + 0xFE2F: 84, + 0xFEFF: 84, + 0xFFF9: 84, + 0xFFFA: 84, + 0xFFFB: 84, + 0x101FD: 84, + 0x102E0: 84, + 0x10376: 84, + 0x10377: 84, + 0x10378: 84, + 0x10379: 84, + 0x1037A: 84, + 0x10A01: 84, + 0x10A02: 84, + 0x10A03: 84, + 0x10A05: 84, + 0x10A06: 84, + 0x10A0C: 84, + 0x10A0D: 84, + 0x10A0E: 84, + 0x10A0F: 84, + 0x10A38: 84, + 0x10A39: 84, + 0x10A3A: 84, + 0x10A3F: 84, + 0x10AC0: 68, + 0x10AC1: 68, + 0x10AC2: 68, + 0x10AC3: 68, + 0x10AC4: 68, + 0x10AC5: 82, + 0x10AC7: 82, + 0x10AC9: 82, + 0x10ACA: 82, + 0x10ACD: 76, + 0x10ACE: 82, + 0x10ACF: 82, + 0x10AD0: 82, + 0x10AD1: 82, + 0x10AD2: 82, + 0x10AD3: 68, + 0x10AD4: 68, + 0x10AD5: 68, + 0x10AD6: 68, + 0x10AD7: 76, + 0x10AD8: 68, + 0x10AD9: 68, + 0x10ADA: 68, + 0x10ADB: 68, + 0x10ADC: 68, + 0x10ADD: 82, + 0x10ADE: 68, + 0x10ADF: 68, + 0x10AE0: 68, + 0x10AE1: 82, + 0x10AE4: 82, + 0x10AE5: 84, + 0x10AE6: 84, + 0x10AEB: 68, + 0x10AEC: 68, + 0x10AED: 68, + 0x10AEE: 68, + 0x10AEF: 82, + 0x10B80: 68, + 0x10B81: 82, + 0x10B82: 68, + 0x10B83: 82, + 0x10B84: 82, + 0x10B85: 82, + 0x10B86: 68, + 0x10B87: 68, + 0x10B88: 68, + 0x10B89: 82, + 0x10B8A: 68, + 0x10B8B: 68, + 0x10B8C: 82, + 0x10B8D: 68, + 0x10B8E: 82, + 0x10B8F: 82, + 0x10B90: 68, + 0x10B91: 82, + 0x10BA9: 82, + 0x10BAA: 82, + 0x10BAB: 82, + 0x10BAC: 82, + 0x10BAD: 68, + 0x10BAE: 68, + 0x10D00: 76, + 0x10D01: 68, + 0x10D02: 68, + 0x10D03: 68, + 0x10D04: 68, + 0x10D05: 68, + 0x10D06: 68, + 0x10D07: 68, + 0x10D08: 68, + 0x10D09: 68, + 0x10D0A: 68, + 0x10D0B: 68, + 0x10D0C: 68, + 0x10D0D: 68, + 0x10D0E: 68, + 0x10D0F: 68, + 0x10D10: 68, + 0x10D11: 68, + 0x10D12: 68, + 0x10D13: 68, + 0x10D14: 68, + 0x10D15: 68, + 0x10D16: 68, + 0x10D17: 68, + 0x10D18: 68, + 0x10D19: 68, + 0x10D1A: 68, + 0x10D1B: 68, + 0x10D1C: 68, + 0x10D1D: 68, + 0x10D1E: 68, + 0x10D1F: 68, + 0x10D20: 68, + 0x10D21: 68, + 0x10D22: 82, + 0x10D23: 68, + 0x10D24: 84, + 0x10D25: 84, + 0x10D26: 84, + 0x10D27: 84, + 0x10EAB: 84, + 0x10EAC: 84, + 0x10EFD: 84, + 0x10EFE: 84, + 0x10EFF: 84, + 0x10F30: 68, + 0x10F31: 68, + 0x10F32: 68, + 0x10F33: 82, + 0x10F34: 68, + 0x10F35: 68, + 0x10F36: 68, + 0x10F37: 68, + 0x10F38: 68, + 0x10F39: 68, + 0x10F3A: 68, + 0x10F3B: 68, + 0x10F3C: 68, + 0x10F3D: 68, + 0x10F3E: 68, + 0x10F3F: 68, + 0x10F40: 68, + 0x10F41: 68, + 0x10F42: 68, + 0x10F43: 68, + 0x10F44: 68, + 0x10F46: 84, + 0x10F47: 84, + 0x10F48: 84, + 0x10F49: 84, + 0x10F4A: 84, + 0x10F4B: 84, + 0x10F4C: 84, + 0x10F4D: 84, + 0x10F4E: 84, + 0x10F4F: 84, + 0x10F50: 84, + 0x10F51: 68, + 0x10F52: 68, + 0x10F53: 68, + 0x10F54: 82, + 0x10F70: 68, + 0x10F71: 68, + 0x10F72: 68, + 0x10F73: 68, + 0x10F74: 82, + 0x10F75: 82, + 0x10F76: 68, + 0x10F77: 68, + 0x10F78: 68, + 0x10F79: 68, + 0x10F7A: 68, + 0x10F7B: 68, + 0x10F7C: 68, + 0x10F7D: 68, + 0x10F7E: 68, + 0x10F7F: 68, + 0x10F80: 68, + 0x10F81: 68, + 0x10F82: 84, + 0x10F83: 84, + 0x10F84: 84, + 0x10F85: 84, + 0x10FB0: 68, + 0x10FB2: 68, + 0x10FB3: 68, + 0x10FB4: 82, + 0x10FB5: 82, + 0x10FB6: 82, + 0x10FB8: 68, + 0x10FB9: 82, + 0x10FBA: 82, + 0x10FBB: 68, + 0x10FBC: 68, + 0x10FBD: 82, + 0x10FBE: 68, + 0x10FBF: 68, + 0x10FC1: 68, + 0x10FC2: 82, + 0x10FC3: 82, + 0x10FC4: 68, + 0x10FC9: 82, + 0x10FCA: 68, + 0x10FCB: 76, + 0x11001: 84, + 0x11038: 84, + 0x11039: 84, + 0x1103A: 84, + 0x1103B: 84, + 0x1103C: 84, + 0x1103D: 84, + 0x1103E: 84, + 0x1103F: 84, + 0x11040: 84, + 0x11041: 84, + 0x11042: 84, + 0x11043: 84, + 0x11044: 84, + 0x11045: 84, + 0x11046: 84, + 0x11070: 84, + 0x11073: 84, + 0x11074: 84, + 0x1107F: 84, + 0x11080: 84, + 0x11081: 84, + 0x110B3: 84, + 0x110B4: 84, + 0x110B5: 84, + 0x110B6: 84, + 0x110B9: 84, + 0x110BA: 84, + 0x110C2: 84, + 0x11100: 84, + 0x11101: 84, + 0x11102: 84, + 0x11127: 84, + 0x11128: 84, + 0x11129: 84, + 0x1112A: 84, + 0x1112B: 84, + 0x1112D: 84, + 0x1112E: 84, + 0x1112F: 84, + 0x11130: 84, + 0x11131: 84, + 0x11132: 84, + 0x11133: 84, + 0x11134: 84, + 0x11173: 84, + 0x11180: 84, + 0x11181: 84, + 0x111B6: 84, + 0x111B7: 84, + 0x111B8: 84, + 0x111B9: 84, + 0x111BA: 84, + 0x111BB: 84, + 0x111BC: 84, + 0x111BD: 84, + 0x111BE: 84, + 0x111C9: 84, + 0x111CA: 84, + 0x111CB: 84, + 0x111CC: 84, + 0x111CF: 84, + 0x1122F: 84, + 0x11230: 84, + 0x11231: 84, + 0x11234: 84, + 0x11236: 84, + 0x11237: 84, + 0x1123E: 84, + 0x11241: 84, + 0x112DF: 84, + 0x112E3: 84, + 0x112E4: 84, + 0x112E5: 84, + 0x112E6: 84, + 0x112E7: 84, + 0x112E8: 84, + 0x112E9: 84, + 0x112EA: 84, + 0x11300: 84, + 0x11301: 84, + 0x1133B: 84, + 0x1133C: 84, + 0x11340: 84, + 0x11366: 84, + 0x11367: 84, + 0x11368: 84, + 0x11369: 84, + 0x1136A: 84, + 0x1136B: 84, + 0x1136C: 84, + 0x11370: 84, + 0x11371: 84, + 0x11372: 84, + 0x11373: 84, + 0x11374: 84, + 0x11438: 84, + 0x11439: 84, + 0x1143A: 84, + 0x1143B: 84, + 0x1143C: 84, + 0x1143D: 84, + 0x1143E: 84, + 0x1143F: 84, + 0x11442: 84, + 0x11443: 84, + 0x11444: 84, + 0x11446: 84, + 0x1145E: 84, + 0x114B3: 84, + 0x114B4: 84, + 0x114B5: 84, + 0x114B6: 84, + 0x114B7: 84, + 0x114B8: 84, + 0x114BA: 84, + 0x114BF: 84, + 0x114C0: 84, + 0x114C2: 84, + 0x114C3: 84, + 0x115B2: 84, + 0x115B3: 84, + 0x115B4: 84, + 0x115B5: 84, + 0x115BC: 84, + 0x115BD: 84, + 0x115BF: 84, + 0x115C0: 84, + 0x115DC: 84, + 0x115DD: 84, + 0x11633: 84, + 0x11634: 84, + 0x11635: 84, + 0x11636: 84, + 0x11637: 84, + 0x11638: 84, + 0x11639: 84, + 0x1163A: 84, + 0x1163D: 84, + 0x1163F: 84, + 0x11640: 84, + 0x116AB: 84, + 0x116AD: 84, + 0x116B0: 84, + 0x116B1: 84, + 0x116B2: 84, + 0x116B3: 84, + 0x116B4: 84, + 0x116B5: 84, + 0x116B7: 84, + 0x1171D: 84, + 0x1171E: 84, + 0x1171F: 84, + 0x11722: 84, + 0x11723: 84, + 0x11724: 84, + 0x11725: 84, + 0x11727: 84, + 0x11728: 84, + 0x11729: 84, + 0x1172A: 84, + 0x1172B: 84, + 0x1182F: 84, + 0x11830: 84, + 0x11831: 84, + 0x11832: 84, + 0x11833: 84, + 0x11834: 84, + 0x11835: 84, + 0x11836: 84, + 0x11837: 84, + 0x11839: 84, + 0x1183A: 84, + 0x1193B: 84, + 0x1193C: 84, + 0x1193E: 84, + 0x11943: 84, + 0x119D4: 84, + 0x119D5: 84, + 0x119D6: 84, + 0x119D7: 84, + 0x119DA: 84, + 0x119DB: 84, + 0x119E0: 84, + 0x11A01: 84, + 0x11A02: 84, + 0x11A03: 84, + 0x11A04: 84, + 0x11A05: 84, + 0x11A06: 84, + 0x11A07: 84, + 0x11A08: 84, + 0x11A09: 84, + 0x11A0A: 84, + 0x11A33: 84, + 0x11A34: 84, + 0x11A35: 84, + 0x11A36: 84, + 0x11A37: 84, + 0x11A38: 84, + 0x11A3B: 84, + 0x11A3C: 84, + 0x11A3D: 84, + 0x11A3E: 84, + 0x11A47: 84, + 0x11A51: 84, + 0x11A52: 84, + 0x11A53: 84, + 0x11A54: 84, + 0x11A55: 84, + 0x11A56: 84, + 0x11A59: 84, + 0x11A5A: 84, + 0x11A5B: 84, + 0x11A8A: 84, + 0x11A8B: 84, + 0x11A8C: 84, + 0x11A8D: 84, + 0x11A8E: 84, + 0x11A8F: 84, + 0x11A90: 84, + 0x11A91: 84, + 0x11A92: 84, + 0x11A93: 84, + 0x11A94: 84, + 0x11A95: 84, + 0x11A96: 84, + 0x11A98: 84, + 0x11A99: 84, + 0x11C30: 84, + 0x11C31: 84, + 0x11C32: 84, + 0x11C33: 84, + 0x11C34: 84, + 0x11C35: 84, + 0x11C36: 84, + 0x11C38: 84, + 0x11C39: 84, + 0x11C3A: 84, + 0x11C3B: 84, + 0x11C3C: 84, + 0x11C3D: 84, + 0x11C3F: 84, + 0x11C92: 84, + 0x11C93: 84, + 0x11C94: 84, + 0x11C95: 84, + 0x11C96: 84, + 0x11C97: 84, + 0x11C98: 84, + 0x11C99: 84, + 0x11C9A: 84, + 0x11C9B: 84, + 0x11C9C: 84, + 0x11C9D: 84, + 0x11C9E: 84, + 0x11C9F: 84, + 0x11CA0: 84, + 0x11CA1: 84, + 0x11CA2: 84, + 0x11CA3: 84, + 0x11CA4: 84, + 0x11CA5: 84, + 0x11CA6: 84, + 0x11CA7: 84, + 0x11CAA: 84, + 0x11CAB: 84, + 0x11CAC: 84, + 0x11CAD: 84, + 0x11CAE: 84, + 0x11CAF: 84, + 0x11CB0: 84, + 0x11CB2: 84, + 0x11CB3: 84, + 0x11CB5: 84, + 0x11CB6: 84, + 0x11D31: 84, + 0x11D32: 84, + 0x11D33: 84, + 0x11D34: 84, + 0x11D35: 84, + 0x11D36: 84, + 0x11D3A: 84, + 0x11D3C: 84, + 0x11D3D: 84, + 0x11D3F: 84, + 0x11D40: 84, + 0x11D41: 84, + 0x11D42: 84, + 0x11D43: 84, + 0x11D44: 84, + 0x11D45: 84, + 0x11D47: 84, + 0x11D90: 84, + 0x11D91: 84, + 0x11D95: 84, + 0x11D97: 84, + 0x11EF3: 84, + 0x11EF4: 84, + 0x11F00: 84, + 0x11F01: 84, + 0x11F36: 84, + 0x11F37: 84, + 0x11F38: 84, + 0x11F39: 84, + 0x11F3A: 84, + 0x11F40: 84, + 0x11F42: 84, + 0x13430: 84, + 0x13431: 84, + 0x13432: 84, + 0x13433: 84, + 0x13434: 84, + 0x13435: 84, + 0x13436: 84, + 0x13437: 84, + 0x13438: 84, + 0x13439: 84, + 0x1343A: 84, + 0x1343B: 84, + 0x1343C: 84, + 0x1343D: 84, + 0x1343E: 84, + 0x1343F: 84, + 0x13440: 84, + 0x13447: 84, + 0x13448: 84, + 0x13449: 84, + 0x1344A: 84, + 0x1344B: 84, + 0x1344C: 84, + 0x1344D: 84, + 0x1344E: 84, + 0x1344F: 84, + 0x13450: 84, + 0x13451: 84, + 0x13452: 84, + 0x13453: 84, + 0x13454: 84, + 0x13455: 84, + 0x16AF0: 84, + 0x16AF1: 84, + 0x16AF2: 84, + 0x16AF3: 84, + 0x16AF4: 84, + 0x16B30: 84, + 0x16B31: 84, + 0x16B32: 84, + 0x16B33: 84, + 0x16B34: 84, + 0x16B35: 84, + 0x16B36: 84, + 0x16F4F: 84, + 0x16F8F: 84, + 0x16F90: 84, + 0x16F91: 84, + 0x16F92: 84, + 0x16FE4: 84, + 0x1BC9D: 84, + 0x1BC9E: 84, + 0x1BCA0: 84, + 0x1BCA1: 84, + 0x1BCA2: 84, + 0x1BCA3: 84, + 0x1CF00: 84, + 0x1CF01: 84, + 0x1CF02: 84, + 0x1CF03: 84, + 0x1CF04: 84, + 0x1CF05: 84, + 0x1CF06: 84, + 0x1CF07: 84, + 0x1CF08: 84, + 0x1CF09: 84, + 0x1CF0A: 84, + 0x1CF0B: 84, + 0x1CF0C: 84, + 0x1CF0D: 84, + 0x1CF0E: 84, + 0x1CF0F: 84, + 0x1CF10: 84, + 0x1CF11: 84, + 0x1CF12: 84, + 0x1CF13: 84, + 0x1CF14: 84, + 0x1CF15: 84, + 0x1CF16: 84, + 0x1CF17: 84, + 0x1CF18: 84, + 0x1CF19: 84, + 0x1CF1A: 84, + 0x1CF1B: 84, + 0x1CF1C: 84, + 0x1CF1D: 84, + 0x1CF1E: 84, + 0x1CF1F: 84, + 0x1CF20: 84, + 0x1CF21: 84, + 0x1CF22: 84, + 0x1CF23: 84, + 0x1CF24: 84, + 0x1CF25: 84, + 0x1CF26: 84, + 0x1CF27: 84, + 0x1CF28: 84, + 0x1CF29: 84, + 0x1CF2A: 84, + 0x1CF2B: 84, + 0x1CF2C: 84, + 0x1CF2D: 84, + 0x1CF30: 84, + 0x1CF31: 84, + 0x1CF32: 84, + 0x1CF33: 84, + 0x1CF34: 84, + 0x1CF35: 84, + 0x1CF36: 84, + 0x1CF37: 84, + 0x1CF38: 84, + 0x1CF39: 84, + 0x1CF3A: 84, + 0x1CF3B: 84, + 0x1CF3C: 84, + 0x1CF3D: 84, + 0x1CF3E: 84, + 0x1CF3F: 84, + 0x1CF40: 84, + 0x1CF41: 84, + 0x1CF42: 84, + 0x1CF43: 84, + 0x1CF44: 84, + 0x1CF45: 84, + 0x1CF46: 84, + 0x1D167: 84, + 0x1D168: 84, + 0x1D169: 84, + 0x1D173: 84, + 0x1D174: 84, + 0x1D175: 84, + 0x1D176: 84, + 0x1D177: 84, + 0x1D178: 84, + 0x1D179: 84, + 0x1D17A: 84, + 0x1D17B: 84, + 0x1D17C: 84, + 0x1D17D: 84, + 0x1D17E: 84, + 0x1D17F: 84, + 0x1D180: 84, + 0x1D181: 84, + 0x1D182: 84, + 0x1D185: 84, + 0x1D186: 84, + 0x1D187: 84, + 0x1D188: 84, + 0x1D189: 84, + 0x1D18A: 84, + 0x1D18B: 84, + 0x1D1AA: 84, + 0x1D1AB: 84, + 0x1D1AC: 84, + 0x1D1AD: 84, + 0x1D242: 84, + 0x1D243: 84, + 0x1D244: 84, + 0x1DA00: 84, + 0x1DA01: 84, + 0x1DA02: 84, + 0x1DA03: 84, + 0x1DA04: 84, + 0x1DA05: 84, + 0x1DA06: 84, + 0x1DA07: 84, + 0x1DA08: 84, + 0x1DA09: 84, + 0x1DA0A: 84, + 0x1DA0B: 84, + 0x1DA0C: 84, + 0x1DA0D: 84, + 0x1DA0E: 84, + 0x1DA0F: 84, + 0x1DA10: 84, + 0x1DA11: 84, + 0x1DA12: 84, + 0x1DA13: 84, + 0x1DA14: 84, + 0x1DA15: 84, + 0x1DA16: 84, + 0x1DA17: 84, + 0x1DA18: 84, + 0x1DA19: 84, + 0x1DA1A: 84, + 0x1DA1B: 84, + 0x1DA1C: 84, + 0x1DA1D: 84, + 0x1DA1E: 84, + 0x1DA1F: 84, + 0x1DA20: 84, + 0x1DA21: 84, + 0x1DA22: 84, + 0x1DA23: 84, + 0x1DA24: 84, + 0x1DA25: 84, + 0x1DA26: 84, + 0x1DA27: 84, + 0x1DA28: 84, + 0x1DA29: 84, + 0x1DA2A: 84, + 0x1DA2B: 84, + 0x1DA2C: 84, + 0x1DA2D: 84, + 0x1DA2E: 84, + 0x1DA2F: 84, + 0x1DA30: 84, + 0x1DA31: 84, + 0x1DA32: 84, + 0x1DA33: 84, + 0x1DA34: 84, + 0x1DA35: 84, + 0x1DA36: 84, + 0x1DA3B: 84, + 0x1DA3C: 84, + 0x1DA3D: 84, + 0x1DA3E: 84, + 0x1DA3F: 84, + 0x1DA40: 84, + 0x1DA41: 84, + 0x1DA42: 84, + 0x1DA43: 84, + 0x1DA44: 84, + 0x1DA45: 84, + 0x1DA46: 84, + 0x1DA47: 84, + 0x1DA48: 84, + 0x1DA49: 84, + 0x1DA4A: 84, + 0x1DA4B: 84, + 0x1DA4C: 84, + 0x1DA4D: 84, + 0x1DA4E: 84, + 0x1DA4F: 84, + 0x1DA50: 84, + 0x1DA51: 84, + 0x1DA52: 84, + 0x1DA53: 84, + 0x1DA54: 84, + 0x1DA55: 84, + 0x1DA56: 84, + 0x1DA57: 84, + 0x1DA58: 84, + 0x1DA59: 84, + 0x1DA5A: 84, + 0x1DA5B: 84, + 0x1DA5C: 84, + 0x1DA5D: 84, + 0x1DA5E: 84, + 0x1DA5F: 84, + 0x1DA60: 84, + 0x1DA61: 84, + 0x1DA62: 84, + 0x1DA63: 84, + 0x1DA64: 84, + 0x1DA65: 84, + 0x1DA66: 84, + 0x1DA67: 84, + 0x1DA68: 84, + 0x1DA69: 84, + 0x1DA6A: 84, + 0x1DA6B: 84, + 0x1DA6C: 84, + 0x1DA75: 84, + 0x1DA84: 84, + 0x1DA9B: 84, + 0x1DA9C: 84, + 0x1DA9D: 84, + 0x1DA9E: 84, + 0x1DA9F: 84, + 0x1DAA1: 84, + 0x1DAA2: 84, + 0x1DAA3: 84, + 0x1DAA4: 84, + 0x1DAA5: 84, + 0x1DAA6: 84, + 0x1DAA7: 84, + 0x1DAA8: 84, + 0x1DAA9: 84, + 0x1DAAA: 84, + 0x1DAAB: 84, + 0x1DAAC: 84, + 0x1DAAD: 84, + 0x1DAAE: 84, + 0x1DAAF: 84, + 0x1E000: 84, + 0x1E001: 84, + 0x1E002: 84, + 0x1E003: 84, + 0x1E004: 84, + 0x1E005: 84, + 0x1E006: 84, + 0x1E008: 84, + 0x1E009: 84, + 0x1E00A: 84, + 0x1E00B: 84, + 0x1E00C: 84, + 0x1E00D: 84, + 0x1E00E: 84, + 0x1E00F: 84, + 0x1E010: 84, + 0x1E011: 84, + 0x1E012: 84, + 0x1E013: 84, + 0x1E014: 84, + 0x1E015: 84, + 0x1E016: 84, + 0x1E017: 84, + 0x1E018: 84, + 0x1E01B: 84, + 0x1E01C: 84, + 0x1E01D: 84, + 0x1E01E: 84, + 0x1E01F: 84, + 0x1E020: 84, + 0x1E021: 84, + 0x1E023: 84, + 0x1E024: 84, + 0x1E026: 84, + 0x1E027: 84, + 0x1E028: 84, + 0x1E029: 84, + 0x1E02A: 84, + 0x1E08F: 84, + 0x1E130: 84, + 0x1E131: 84, + 0x1E132: 84, + 0x1E133: 84, + 0x1E134: 84, + 0x1E135: 84, + 0x1E136: 84, + 0x1E2AE: 84, + 0x1E2EC: 84, + 0x1E2ED: 84, + 0x1E2EE: 84, + 0x1E2EF: 84, + 0x1E4EC: 84, + 0x1E4ED: 84, + 0x1E4EE: 84, + 0x1E4EF: 84, + 0x1E8D0: 84, + 0x1E8D1: 84, + 0x1E8D2: 84, + 0x1E8D3: 84, + 0x1E8D4: 84, + 0x1E8D5: 84, + 0x1E8D6: 84, + 0x1E900: 68, + 0x1E901: 68, + 0x1E902: 68, + 0x1E903: 68, + 0x1E904: 68, + 0x1E905: 68, + 0x1E906: 68, + 0x1E907: 68, + 0x1E908: 68, + 0x1E909: 68, + 0x1E90A: 68, + 0x1E90B: 68, + 0x1E90C: 68, + 0x1E90D: 68, + 0x1E90E: 68, + 0x1E90F: 68, + 0x1E910: 68, + 0x1E911: 68, + 0x1E912: 68, + 0x1E913: 68, + 0x1E914: 68, + 0x1E915: 68, + 0x1E916: 68, + 0x1E917: 68, + 0x1E918: 68, + 0x1E919: 68, + 0x1E91A: 68, + 0x1E91B: 68, + 0x1E91C: 68, + 0x1E91D: 68, + 0x1E91E: 68, + 0x1E91F: 68, + 0x1E920: 68, + 0x1E921: 68, + 0x1E922: 68, + 0x1E923: 68, + 0x1E924: 68, + 0x1E925: 68, + 0x1E926: 68, + 0x1E927: 68, + 0x1E928: 68, + 0x1E929: 68, + 0x1E92A: 68, + 0x1E92B: 68, + 0x1E92C: 68, + 0x1E92D: 68, + 0x1E92E: 68, + 0x1E92F: 68, + 0x1E930: 68, + 0x1E931: 68, + 0x1E932: 68, + 0x1E933: 68, + 0x1E934: 68, + 0x1E935: 68, + 0x1E936: 68, + 0x1E937: 68, + 0x1E938: 68, + 0x1E939: 68, + 0x1E93A: 68, + 0x1E93B: 68, + 0x1E93C: 68, + 0x1E93D: 68, + 0x1E93E: 68, + 0x1E93F: 68, + 0x1E940: 68, + 0x1E941: 68, + 0x1E942: 68, + 0x1E943: 68, + 0x1E944: 84, + 0x1E945: 84, + 0x1E946: 84, + 0x1E947: 84, + 0x1E948: 84, + 0x1E949: 84, + 0x1E94A: 84, + 0x1E94B: 84, + 0xE0001: 84, + 0xE0020: 84, + 0xE0021: 84, + 0xE0022: 84, + 0xE0023: 84, + 0xE0024: 84, + 0xE0025: 84, + 0xE0026: 84, + 0xE0027: 84, + 0xE0028: 84, + 0xE0029: 84, + 0xE002A: 84, + 0xE002B: 84, + 0xE002C: 84, + 0xE002D: 84, + 0xE002E: 84, + 0xE002F: 84, + 0xE0030: 84, + 0xE0031: 84, + 0xE0032: 84, + 0xE0033: 84, + 0xE0034: 84, + 0xE0035: 84, + 0xE0036: 84, + 0xE0037: 84, + 0xE0038: 84, + 0xE0039: 84, + 0xE003A: 84, + 0xE003B: 84, + 0xE003C: 84, + 0xE003D: 84, + 0xE003E: 84, + 0xE003F: 84, + 0xE0040: 84, + 0xE0041: 84, + 0xE0042: 84, + 0xE0043: 84, + 0xE0044: 84, + 0xE0045: 84, + 0xE0046: 84, + 0xE0047: 84, + 0xE0048: 84, + 0xE0049: 84, + 0xE004A: 84, + 0xE004B: 84, + 0xE004C: 84, + 0xE004D: 84, + 0xE004E: 84, + 0xE004F: 84, + 0xE0050: 84, + 0xE0051: 84, + 0xE0052: 84, + 0xE0053: 84, + 0xE0054: 84, + 0xE0055: 84, + 0xE0056: 84, + 0xE0057: 84, + 0xE0058: 84, + 0xE0059: 84, + 0xE005A: 84, + 0xE005B: 84, + 0xE005C: 84, + 0xE005D: 84, + 0xE005E: 84, + 0xE005F: 84, + 0xE0060: 84, + 0xE0061: 84, + 0xE0062: 84, + 0xE0063: 84, + 0xE0064: 84, + 0xE0065: 84, + 0xE0066: 84, + 0xE0067: 84, + 0xE0068: 84, + 0xE0069: 84, + 0xE006A: 84, + 0xE006B: 84, + 0xE006C: 84, + 0xE006D: 84, + 0xE006E: 84, + 0xE006F: 84, + 0xE0070: 84, + 0xE0071: 84, + 0xE0072: 84, + 0xE0073: 84, + 0xE0074: 84, + 0xE0075: 84, + 0xE0076: 84, + 0xE0077: 84, + 0xE0078: 84, + 0xE0079: 84, + 0xE007A: 84, + 0xE007B: 84, + 0xE007C: 84, + 0xE007D: 84, + 0xE007E: 84, + 0xE007F: 84, + 0xE0100: 84, + 0xE0101: 84, + 0xE0102: 84, + 0xE0103: 84, + 0xE0104: 84, + 0xE0105: 84, + 0xE0106: 84, + 0xE0107: 84, + 0xE0108: 84, + 0xE0109: 84, + 0xE010A: 84, + 0xE010B: 84, + 0xE010C: 84, + 0xE010D: 84, + 0xE010E: 84, + 0xE010F: 84, + 0xE0110: 84, + 0xE0111: 84, + 0xE0112: 84, + 0xE0113: 84, + 0xE0114: 84, + 0xE0115: 84, + 0xE0116: 84, + 0xE0117: 84, + 0xE0118: 84, + 0xE0119: 84, + 0xE011A: 84, + 0xE011B: 84, + 0xE011C: 84, + 0xE011D: 84, + 0xE011E: 84, + 0xE011F: 84, + 0xE0120: 84, + 0xE0121: 84, + 0xE0122: 84, + 0xE0123: 84, + 0xE0124: 84, + 0xE0125: 84, + 0xE0126: 84, + 0xE0127: 84, + 0xE0128: 84, + 0xE0129: 84, + 0xE012A: 84, + 0xE012B: 84, + 0xE012C: 84, + 0xE012D: 84, + 0xE012E: 84, + 0xE012F: 84, + 0xE0130: 84, + 0xE0131: 84, + 0xE0132: 84, + 0xE0133: 84, + 0xE0134: 84, + 0xE0135: 84, + 0xE0136: 84, + 0xE0137: 84, + 0xE0138: 84, + 0xE0139: 84, + 0xE013A: 84, + 0xE013B: 84, + 0xE013C: 84, + 0xE013D: 84, + 0xE013E: 84, + 0xE013F: 84, + 0xE0140: 84, + 0xE0141: 84, + 0xE0142: 84, + 0xE0143: 84, + 0xE0144: 84, + 0xE0145: 84, + 0xE0146: 84, + 0xE0147: 84, + 0xE0148: 84, + 0xE0149: 84, + 0xE014A: 84, + 0xE014B: 84, + 0xE014C: 84, + 0xE014D: 84, + 0xE014E: 84, + 0xE014F: 84, + 0xE0150: 84, + 0xE0151: 84, + 0xE0152: 84, + 0xE0153: 84, + 0xE0154: 84, + 0xE0155: 84, + 0xE0156: 84, + 0xE0157: 84, + 0xE0158: 84, + 0xE0159: 84, + 0xE015A: 84, + 0xE015B: 84, + 0xE015C: 84, + 0xE015D: 84, + 0xE015E: 84, + 0xE015F: 84, + 0xE0160: 84, + 0xE0161: 84, + 0xE0162: 84, + 0xE0163: 84, + 0xE0164: 84, + 0xE0165: 84, + 0xE0166: 84, + 0xE0167: 84, + 0xE0168: 84, + 0xE0169: 84, + 0xE016A: 84, + 0xE016B: 84, + 0xE016C: 84, + 0xE016D: 84, + 0xE016E: 84, + 0xE016F: 84, + 0xE0170: 84, + 0xE0171: 84, + 0xE0172: 84, + 0xE0173: 84, + 0xE0174: 84, + 0xE0175: 84, + 0xE0176: 84, + 0xE0177: 84, + 0xE0178: 84, + 0xE0179: 84, + 0xE017A: 84, + 0xE017B: 84, + 0xE017C: 84, + 0xE017D: 84, + 0xE017E: 84, + 0xE017F: 84, + 0xE0180: 84, + 0xE0181: 84, + 0xE0182: 84, + 0xE0183: 84, + 0xE0184: 84, + 0xE0185: 84, + 0xE0186: 84, + 0xE0187: 84, + 0xE0188: 84, + 0xE0189: 84, + 0xE018A: 84, + 0xE018B: 84, + 0xE018C: 84, + 0xE018D: 84, + 0xE018E: 84, + 0xE018F: 84, + 0xE0190: 84, + 0xE0191: 84, + 0xE0192: 84, + 0xE0193: 84, + 0xE0194: 84, + 0xE0195: 84, + 0xE0196: 84, + 0xE0197: 84, + 0xE0198: 84, + 0xE0199: 84, + 0xE019A: 84, + 0xE019B: 84, + 0xE019C: 84, + 0xE019D: 84, + 0xE019E: 84, + 0xE019F: 84, + 0xE01A0: 84, + 0xE01A1: 84, + 0xE01A2: 84, + 0xE01A3: 84, + 0xE01A4: 84, + 0xE01A5: 84, + 0xE01A6: 84, + 0xE01A7: 84, + 0xE01A8: 84, + 0xE01A9: 84, + 0xE01AA: 84, + 0xE01AB: 84, + 0xE01AC: 84, + 0xE01AD: 84, + 0xE01AE: 84, + 0xE01AF: 84, + 0xE01B0: 84, + 0xE01B1: 84, + 0xE01B2: 84, + 0xE01B3: 84, + 0xE01B4: 84, + 0xE01B5: 84, + 0xE01B6: 84, + 0xE01B7: 84, + 0xE01B8: 84, + 0xE01B9: 84, + 0xE01BA: 84, + 0xE01BB: 84, + 0xE01BC: 84, + 0xE01BD: 84, + 0xE01BE: 84, + 0xE01BF: 84, + 0xE01C0: 84, + 0xE01C1: 84, + 0xE01C2: 84, + 0xE01C3: 84, + 0xE01C4: 84, + 0xE01C5: 84, + 0xE01C6: 84, + 0xE01C7: 84, + 0xE01C8: 84, + 0xE01C9: 84, + 0xE01CA: 84, + 0xE01CB: 84, + 0xE01CC: 84, + 0xE01CD: 84, + 0xE01CE: 84, + 0xE01CF: 84, + 0xE01D0: 84, + 0xE01D1: 84, + 0xE01D2: 84, + 0xE01D3: 84, + 0xE01D4: 84, + 0xE01D5: 84, + 0xE01D6: 84, + 0xE01D7: 84, + 0xE01D8: 84, + 0xE01D9: 84, + 0xE01DA: 84, + 0xE01DB: 84, + 0xE01DC: 84, + 0xE01DD: 84, + 0xE01DE: 84, + 0xE01DF: 84, + 0xE01E0: 84, + 0xE01E1: 84, + 0xE01E2: 84, + 0xE01E3: 84, + 0xE01E4: 84, + 0xE01E5: 84, + 0xE01E6: 84, + 0xE01E7: 84, + 0xE01E8: 84, + 0xE01E9: 84, + 0xE01EA: 84, + 0xE01EB: 84, + 0xE01EC: 84, + 0xE01ED: 84, + 0xE01EE: 84, + 0xE01EF: 84, +} +codepoint_classes = { + "PVALID": ( + 0x2D0000002E, + 0x300000003A, + 0x610000007B, + 0xDF000000F7, + 0xF800000100, + 0x10100000102, + 0x10300000104, + 0x10500000106, + 0x10700000108, + 0x1090000010A, + 0x10B0000010C, + 0x10D0000010E, + 0x10F00000110, + 0x11100000112, + 0x11300000114, + 0x11500000116, + 0x11700000118, + 0x1190000011A, + 0x11B0000011C, + 0x11D0000011E, + 0x11F00000120, + 0x12100000122, + 0x12300000124, + 0x12500000126, + 0x12700000128, + 0x1290000012A, + 0x12B0000012C, + 0x12D0000012E, + 0x12F00000130, + 0x13100000132, + 0x13500000136, + 0x13700000139, + 0x13A0000013B, + 0x13C0000013D, + 0x13E0000013F, + 0x14200000143, + 0x14400000145, + 0x14600000147, + 0x14800000149, + 0x14B0000014C, + 0x14D0000014E, + 0x14F00000150, + 0x15100000152, + 0x15300000154, + 0x15500000156, + 0x15700000158, + 0x1590000015A, + 0x15B0000015C, + 0x15D0000015E, + 0x15F00000160, + 0x16100000162, + 0x16300000164, + 0x16500000166, + 0x16700000168, + 0x1690000016A, + 0x16B0000016C, + 0x16D0000016E, + 0x16F00000170, + 0x17100000172, + 0x17300000174, + 0x17500000176, + 0x17700000178, + 0x17A0000017B, + 0x17C0000017D, + 0x17E0000017F, + 0x18000000181, + 0x18300000184, + 0x18500000186, + 0x18800000189, + 0x18C0000018E, + 0x19200000193, + 0x19500000196, + 0x1990000019C, + 0x19E0000019F, + 0x1A1000001A2, + 0x1A3000001A4, + 0x1A5000001A6, + 0x1A8000001A9, + 0x1AA000001AC, + 0x1AD000001AE, + 0x1B0000001B1, + 0x1B4000001B5, + 0x1B6000001B7, + 0x1B9000001BC, + 0x1BD000001C4, + 0x1CE000001CF, + 0x1D0000001D1, + 0x1D2000001D3, + 0x1D4000001D5, + 0x1D6000001D7, + 0x1D8000001D9, + 0x1DA000001DB, + 0x1DC000001DE, + 0x1DF000001E0, + 0x1E1000001E2, + 0x1E3000001E4, + 0x1E5000001E6, + 0x1E7000001E8, + 0x1E9000001EA, + 0x1EB000001EC, + 0x1ED000001EE, + 0x1EF000001F1, + 0x1F5000001F6, + 0x1F9000001FA, + 0x1FB000001FC, + 0x1FD000001FE, + 0x1FF00000200, + 0x20100000202, + 0x20300000204, + 0x20500000206, + 0x20700000208, + 0x2090000020A, + 0x20B0000020C, + 0x20D0000020E, + 0x20F00000210, + 0x21100000212, + 0x21300000214, + 0x21500000216, + 0x21700000218, + 0x2190000021A, + 0x21B0000021C, + 0x21D0000021E, + 0x21F00000220, + 0x22100000222, + 0x22300000224, + 0x22500000226, + 0x22700000228, + 0x2290000022A, + 0x22B0000022C, + 0x22D0000022E, + 0x22F00000230, + 0x23100000232, + 0x2330000023A, + 0x23C0000023D, + 0x23F00000241, + 0x24200000243, + 0x24700000248, + 0x2490000024A, + 0x24B0000024C, + 0x24D0000024E, + 0x24F000002B0, + 0x2B9000002C2, + 0x2C6000002D2, + 0x2EC000002ED, + 0x2EE000002EF, + 0x30000000340, + 0x34200000343, + 0x3460000034F, + 0x35000000370, + 0x37100000372, + 0x37300000374, + 0x37700000378, + 0x37B0000037E, + 0x39000000391, + 0x3AC000003CF, + 0x3D7000003D8, + 0x3D9000003DA, + 0x3DB000003DC, + 0x3DD000003DE, + 0x3DF000003E0, + 0x3E1000003E2, + 0x3E3000003E4, + 0x3E5000003E6, + 0x3E7000003E8, + 0x3E9000003EA, + 0x3EB000003EC, + 0x3ED000003EE, + 0x3EF000003F0, + 0x3F3000003F4, + 0x3F8000003F9, + 0x3FB000003FD, + 0x43000000460, + 0x46100000462, + 0x46300000464, + 0x46500000466, + 0x46700000468, + 0x4690000046A, + 0x46B0000046C, + 0x46D0000046E, + 0x46F00000470, + 0x47100000472, + 0x47300000474, + 0x47500000476, + 0x47700000478, + 0x4790000047A, + 0x47B0000047C, + 0x47D0000047E, + 0x47F00000480, + 0x48100000482, + 0x48300000488, + 0x48B0000048C, + 0x48D0000048E, + 0x48F00000490, + 0x49100000492, + 0x49300000494, + 0x49500000496, + 0x49700000498, + 0x4990000049A, + 0x49B0000049C, + 0x49D0000049E, + 0x49F000004A0, + 0x4A1000004A2, + 0x4A3000004A4, + 0x4A5000004A6, + 0x4A7000004A8, + 0x4A9000004AA, + 0x4AB000004AC, + 0x4AD000004AE, + 0x4AF000004B0, + 0x4B1000004B2, + 0x4B3000004B4, + 0x4B5000004B6, + 0x4B7000004B8, + 0x4B9000004BA, + 0x4BB000004BC, + 0x4BD000004BE, + 0x4BF000004C0, + 0x4C2000004C3, + 0x4C4000004C5, + 0x4C6000004C7, + 0x4C8000004C9, + 0x4CA000004CB, + 0x4CC000004CD, + 0x4CE000004D0, + 0x4D1000004D2, + 0x4D3000004D4, + 0x4D5000004D6, + 0x4D7000004D8, + 0x4D9000004DA, + 0x4DB000004DC, + 0x4DD000004DE, + 0x4DF000004E0, + 0x4E1000004E2, + 0x4E3000004E4, + 0x4E5000004E6, + 0x4E7000004E8, + 0x4E9000004EA, + 0x4EB000004EC, + 0x4ED000004EE, + 0x4EF000004F0, + 0x4F1000004F2, + 0x4F3000004F4, + 0x4F5000004F6, + 0x4F7000004F8, + 0x4F9000004FA, + 0x4FB000004FC, + 0x4FD000004FE, + 0x4FF00000500, + 0x50100000502, + 0x50300000504, + 0x50500000506, + 0x50700000508, + 0x5090000050A, + 0x50B0000050C, + 0x50D0000050E, + 0x50F00000510, + 0x51100000512, + 0x51300000514, + 0x51500000516, + 0x51700000518, + 0x5190000051A, + 0x51B0000051C, + 0x51D0000051E, + 0x51F00000520, + 0x52100000522, + 0x52300000524, + 0x52500000526, + 0x52700000528, + 0x5290000052A, + 0x52B0000052C, + 0x52D0000052E, + 0x52F00000530, + 0x5590000055A, + 0x56000000587, + 0x58800000589, + 0x591000005BE, + 0x5BF000005C0, + 0x5C1000005C3, + 0x5C4000005C6, + 0x5C7000005C8, + 0x5D0000005EB, + 0x5EF000005F3, + 0x6100000061B, + 0x62000000640, + 0x64100000660, + 0x66E00000675, + 0x679000006D4, + 0x6D5000006DD, + 0x6DF000006E9, + 0x6EA000006F0, + 0x6FA00000700, + 0x7100000074B, + 0x74D000007B2, + 0x7C0000007F6, + 0x7FD000007FE, + 0x8000000082E, + 0x8400000085C, + 0x8600000086B, + 0x87000000888, + 0x8890000088F, + 0x898000008E2, + 0x8E300000958, + 0x96000000964, + 0x96600000970, + 0x97100000984, + 0x9850000098D, + 0x98F00000991, + 0x993000009A9, + 0x9AA000009B1, + 0x9B2000009B3, + 0x9B6000009BA, + 0x9BC000009C5, + 0x9C7000009C9, + 0x9CB000009CF, + 0x9D7000009D8, + 0x9E0000009E4, + 0x9E6000009F2, + 0x9FC000009FD, + 0x9FE000009FF, + 0xA0100000A04, + 0xA0500000A0B, + 0xA0F00000A11, + 0xA1300000A29, + 0xA2A00000A31, + 0xA3200000A33, + 0xA3500000A36, + 0xA3800000A3A, + 0xA3C00000A3D, + 0xA3E00000A43, + 0xA4700000A49, + 0xA4B00000A4E, + 0xA5100000A52, + 0xA5C00000A5D, + 0xA6600000A76, + 0xA8100000A84, + 0xA8500000A8E, + 0xA8F00000A92, + 0xA9300000AA9, + 0xAAA00000AB1, + 0xAB200000AB4, + 0xAB500000ABA, + 0xABC00000AC6, + 0xAC700000ACA, + 0xACB00000ACE, + 0xAD000000AD1, + 0xAE000000AE4, + 0xAE600000AF0, + 0xAF900000B00, + 0xB0100000B04, + 0xB0500000B0D, + 0xB0F00000B11, + 0xB1300000B29, + 0xB2A00000B31, + 0xB3200000B34, + 0xB3500000B3A, + 0xB3C00000B45, + 0xB4700000B49, + 0xB4B00000B4E, + 0xB5500000B58, + 0xB5F00000B64, + 0xB6600000B70, + 0xB7100000B72, + 0xB8200000B84, + 0xB8500000B8B, + 0xB8E00000B91, + 0xB9200000B96, + 0xB9900000B9B, + 0xB9C00000B9D, + 0xB9E00000BA0, + 0xBA300000BA5, + 0xBA800000BAB, + 0xBAE00000BBA, + 0xBBE00000BC3, + 0xBC600000BC9, + 0xBCA00000BCE, + 0xBD000000BD1, + 0xBD700000BD8, + 0xBE600000BF0, + 0xC0000000C0D, + 0xC0E00000C11, + 0xC1200000C29, + 0xC2A00000C3A, + 0xC3C00000C45, + 0xC4600000C49, + 0xC4A00000C4E, + 0xC5500000C57, + 0xC5800000C5B, + 0xC5D00000C5E, + 0xC6000000C64, + 0xC6600000C70, + 0xC8000000C84, + 0xC8500000C8D, + 0xC8E00000C91, + 0xC9200000CA9, + 0xCAA00000CB4, + 0xCB500000CBA, + 0xCBC00000CC5, + 0xCC600000CC9, + 0xCCA00000CCE, + 0xCD500000CD7, + 0xCDD00000CDF, + 0xCE000000CE4, + 0xCE600000CF0, + 0xCF100000CF4, + 0xD0000000D0D, + 0xD0E00000D11, + 0xD1200000D45, + 0xD4600000D49, + 0xD4A00000D4F, + 0xD5400000D58, + 0xD5F00000D64, + 0xD6600000D70, + 0xD7A00000D80, + 0xD8100000D84, + 0xD8500000D97, + 0xD9A00000DB2, + 0xDB300000DBC, + 0xDBD00000DBE, + 0xDC000000DC7, + 0xDCA00000DCB, + 0xDCF00000DD5, + 0xDD600000DD7, + 0xDD800000DE0, + 0xDE600000DF0, + 0xDF200000DF4, + 0xE0100000E33, + 0xE3400000E3B, + 0xE4000000E4F, + 0xE5000000E5A, + 0xE8100000E83, + 0xE8400000E85, + 0xE8600000E8B, + 0xE8C00000EA4, + 0xEA500000EA6, + 0xEA700000EB3, + 0xEB400000EBE, + 0xEC000000EC5, + 0xEC600000EC7, + 0xEC800000ECF, + 0xED000000EDA, + 0xEDE00000EE0, + 0xF0000000F01, + 0xF0B00000F0C, + 0xF1800000F1A, + 0xF2000000F2A, + 0xF3500000F36, + 0xF3700000F38, + 0xF3900000F3A, + 0xF3E00000F43, + 0xF4400000F48, + 0xF4900000F4D, + 0xF4E00000F52, + 0xF5300000F57, + 0xF5800000F5C, + 0xF5D00000F69, + 0xF6A00000F6D, + 0xF7100000F73, + 0xF7400000F75, + 0xF7A00000F81, + 0xF8200000F85, + 0xF8600000F93, + 0xF9400000F98, + 0xF9900000F9D, + 0xF9E00000FA2, + 0xFA300000FA7, + 0xFA800000FAC, + 0xFAD00000FB9, + 0xFBA00000FBD, + 0xFC600000FC7, + 0x10000000104A, + 0x10500000109E, + 0x10D0000010FB, + 0x10FD00001100, + 0x120000001249, + 0x124A0000124E, + 0x125000001257, + 0x125800001259, + 0x125A0000125E, + 0x126000001289, + 0x128A0000128E, + 0x1290000012B1, + 0x12B2000012B6, + 0x12B8000012BF, + 0x12C0000012C1, + 0x12C2000012C6, + 0x12C8000012D7, + 0x12D800001311, + 0x131200001316, + 0x13180000135B, + 0x135D00001360, + 0x138000001390, + 0x13A0000013F6, + 0x14010000166D, + 0x166F00001680, + 0x16810000169B, + 0x16A0000016EB, + 0x16F1000016F9, + 0x170000001716, + 0x171F00001735, + 0x174000001754, + 0x17600000176D, + 0x176E00001771, + 0x177200001774, + 0x1780000017B4, + 0x17B6000017D4, + 0x17D7000017D8, + 0x17DC000017DE, + 0x17E0000017EA, + 0x18100000181A, + 0x182000001879, + 0x1880000018AB, + 0x18B0000018F6, + 0x19000000191F, + 0x19200000192C, + 0x19300000193C, + 0x19460000196E, + 0x197000001975, + 0x1980000019AC, + 0x19B0000019CA, + 0x19D0000019DA, + 0x1A0000001A1C, + 0x1A2000001A5F, + 0x1A6000001A7D, + 0x1A7F00001A8A, + 0x1A9000001A9A, + 0x1AA700001AA8, + 0x1AB000001ABE, + 0x1ABF00001ACF, + 0x1B0000001B4D, + 0x1B5000001B5A, + 0x1B6B00001B74, + 0x1B8000001BF4, + 0x1C0000001C38, + 0x1C4000001C4A, + 0x1C4D00001C7E, + 0x1CD000001CD3, + 0x1CD400001CFB, + 0x1D0000001D2C, + 0x1D2F00001D30, + 0x1D3B00001D3C, + 0x1D4E00001D4F, + 0x1D6B00001D78, + 0x1D7900001D9B, + 0x1DC000001E00, + 0x1E0100001E02, + 0x1E0300001E04, + 0x1E0500001E06, + 0x1E0700001E08, + 0x1E0900001E0A, + 0x1E0B00001E0C, + 0x1E0D00001E0E, + 0x1E0F00001E10, + 0x1E1100001E12, + 0x1E1300001E14, + 0x1E1500001E16, + 0x1E1700001E18, + 0x1E1900001E1A, + 0x1E1B00001E1C, + 0x1E1D00001E1E, + 0x1E1F00001E20, + 0x1E2100001E22, + 0x1E2300001E24, + 0x1E2500001E26, + 0x1E2700001E28, + 0x1E2900001E2A, + 0x1E2B00001E2C, + 0x1E2D00001E2E, + 0x1E2F00001E30, + 0x1E3100001E32, + 0x1E3300001E34, + 0x1E3500001E36, + 0x1E3700001E38, + 0x1E3900001E3A, + 0x1E3B00001E3C, + 0x1E3D00001E3E, + 0x1E3F00001E40, + 0x1E4100001E42, + 0x1E4300001E44, + 0x1E4500001E46, + 0x1E4700001E48, + 0x1E4900001E4A, + 0x1E4B00001E4C, + 0x1E4D00001E4E, + 0x1E4F00001E50, + 0x1E5100001E52, + 0x1E5300001E54, + 0x1E5500001E56, + 0x1E5700001E58, + 0x1E5900001E5A, + 0x1E5B00001E5C, + 0x1E5D00001E5E, + 0x1E5F00001E60, + 0x1E6100001E62, + 0x1E6300001E64, + 0x1E6500001E66, + 0x1E6700001E68, + 0x1E6900001E6A, + 0x1E6B00001E6C, + 0x1E6D00001E6E, + 0x1E6F00001E70, + 0x1E7100001E72, + 0x1E7300001E74, + 0x1E7500001E76, + 0x1E7700001E78, + 0x1E7900001E7A, + 0x1E7B00001E7C, + 0x1E7D00001E7E, + 0x1E7F00001E80, + 0x1E8100001E82, + 0x1E8300001E84, + 0x1E8500001E86, + 0x1E8700001E88, + 0x1E8900001E8A, + 0x1E8B00001E8C, + 0x1E8D00001E8E, + 0x1E8F00001E90, + 0x1E9100001E92, + 0x1E9300001E94, + 0x1E9500001E9A, + 0x1E9C00001E9E, + 0x1E9F00001EA0, + 0x1EA100001EA2, + 0x1EA300001EA4, + 0x1EA500001EA6, + 0x1EA700001EA8, + 0x1EA900001EAA, + 0x1EAB00001EAC, + 0x1EAD00001EAE, + 0x1EAF00001EB0, + 0x1EB100001EB2, + 0x1EB300001EB4, + 0x1EB500001EB6, + 0x1EB700001EB8, + 0x1EB900001EBA, + 0x1EBB00001EBC, + 0x1EBD00001EBE, + 0x1EBF00001EC0, + 0x1EC100001EC2, + 0x1EC300001EC4, + 0x1EC500001EC6, + 0x1EC700001EC8, + 0x1EC900001ECA, + 0x1ECB00001ECC, + 0x1ECD00001ECE, + 0x1ECF00001ED0, + 0x1ED100001ED2, + 0x1ED300001ED4, + 0x1ED500001ED6, + 0x1ED700001ED8, + 0x1ED900001EDA, + 0x1EDB00001EDC, + 0x1EDD00001EDE, + 0x1EDF00001EE0, + 0x1EE100001EE2, + 0x1EE300001EE4, + 0x1EE500001EE6, + 0x1EE700001EE8, + 0x1EE900001EEA, + 0x1EEB00001EEC, + 0x1EED00001EEE, + 0x1EEF00001EF0, + 0x1EF100001EF2, + 0x1EF300001EF4, + 0x1EF500001EF6, + 0x1EF700001EF8, + 0x1EF900001EFA, + 0x1EFB00001EFC, + 0x1EFD00001EFE, + 0x1EFF00001F08, + 0x1F1000001F16, + 0x1F2000001F28, + 0x1F3000001F38, + 0x1F4000001F46, + 0x1F5000001F58, + 0x1F6000001F68, + 0x1F7000001F71, + 0x1F7200001F73, + 0x1F7400001F75, + 0x1F7600001F77, + 0x1F7800001F79, + 0x1F7A00001F7B, + 0x1F7C00001F7D, + 0x1FB000001FB2, + 0x1FB600001FB7, + 0x1FC600001FC7, + 0x1FD000001FD3, + 0x1FD600001FD8, + 0x1FE000001FE3, + 0x1FE400001FE8, + 0x1FF600001FF7, + 0x214E0000214F, + 0x218400002185, + 0x2C3000002C60, + 0x2C6100002C62, + 0x2C6500002C67, + 0x2C6800002C69, + 0x2C6A00002C6B, + 0x2C6C00002C6D, + 0x2C7100002C72, + 0x2C7300002C75, + 0x2C7600002C7C, + 0x2C8100002C82, + 0x2C8300002C84, + 0x2C8500002C86, + 0x2C8700002C88, + 0x2C8900002C8A, + 0x2C8B00002C8C, + 0x2C8D00002C8E, + 0x2C8F00002C90, + 0x2C9100002C92, + 0x2C9300002C94, + 0x2C9500002C96, + 0x2C9700002C98, + 0x2C9900002C9A, + 0x2C9B00002C9C, + 0x2C9D00002C9E, + 0x2C9F00002CA0, + 0x2CA100002CA2, + 0x2CA300002CA4, + 0x2CA500002CA6, + 0x2CA700002CA8, + 0x2CA900002CAA, + 0x2CAB00002CAC, + 0x2CAD00002CAE, + 0x2CAF00002CB0, + 0x2CB100002CB2, + 0x2CB300002CB4, + 0x2CB500002CB6, + 0x2CB700002CB8, + 0x2CB900002CBA, + 0x2CBB00002CBC, + 0x2CBD00002CBE, + 0x2CBF00002CC0, + 0x2CC100002CC2, + 0x2CC300002CC4, + 0x2CC500002CC6, + 0x2CC700002CC8, + 0x2CC900002CCA, + 0x2CCB00002CCC, + 0x2CCD00002CCE, + 0x2CCF00002CD0, + 0x2CD100002CD2, + 0x2CD300002CD4, + 0x2CD500002CD6, + 0x2CD700002CD8, + 0x2CD900002CDA, + 0x2CDB00002CDC, + 0x2CDD00002CDE, + 0x2CDF00002CE0, + 0x2CE100002CE2, + 0x2CE300002CE5, + 0x2CEC00002CED, + 0x2CEE00002CF2, + 0x2CF300002CF4, + 0x2D0000002D26, + 0x2D2700002D28, + 0x2D2D00002D2E, + 0x2D3000002D68, + 0x2D7F00002D97, + 0x2DA000002DA7, + 0x2DA800002DAF, + 0x2DB000002DB7, + 0x2DB800002DBF, + 0x2DC000002DC7, + 0x2DC800002DCF, + 0x2DD000002DD7, + 0x2DD800002DDF, + 0x2DE000002E00, + 0x2E2F00002E30, + 0x300500003008, + 0x302A0000302E, + 0x303C0000303D, + 0x304100003097, + 0x30990000309B, + 0x309D0000309F, + 0x30A1000030FB, + 0x30FC000030FF, + 0x310500003130, + 0x31A0000031C0, + 0x31F000003200, + 0x340000004DC0, + 0x4E000000A48D, + 0xA4D00000A4FE, + 0xA5000000A60D, + 0xA6100000A62C, + 0xA6410000A642, + 0xA6430000A644, + 0xA6450000A646, + 0xA6470000A648, + 0xA6490000A64A, + 0xA64B0000A64C, + 0xA64D0000A64E, + 0xA64F0000A650, + 0xA6510000A652, + 0xA6530000A654, + 0xA6550000A656, + 0xA6570000A658, + 0xA6590000A65A, + 0xA65B0000A65C, + 0xA65D0000A65E, + 0xA65F0000A660, + 0xA6610000A662, + 0xA6630000A664, + 0xA6650000A666, + 0xA6670000A668, + 0xA6690000A66A, + 0xA66B0000A66C, + 0xA66D0000A670, + 0xA6740000A67E, + 0xA67F0000A680, + 0xA6810000A682, + 0xA6830000A684, + 0xA6850000A686, + 0xA6870000A688, + 0xA6890000A68A, + 0xA68B0000A68C, + 0xA68D0000A68E, + 0xA68F0000A690, + 0xA6910000A692, + 0xA6930000A694, + 0xA6950000A696, + 0xA6970000A698, + 0xA6990000A69A, + 0xA69B0000A69C, + 0xA69E0000A6E6, + 0xA6F00000A6F2, + 0xA7170000A720, + 0xA7230000A724, + 0xA7250000A726, + 0xA7270000A728, + 0xA7290000A72A, + 0xA72B0000A72C, + 0xA72D0000A72E, + 0xA72F0000A732, + 0xA7330000A734, + 0xA7350000A736, + 0xA7370000A738, + 0xA7390000A73A, + 0xA73B0000A73C, + 0xA73D0000A73E, + 0xA73F0000A740, + 0xA7410000A742, + 0xA7430000A744, + 0xA7450000A746, + 0xA7470000A748, + 0xA7490000A74A, + 0xA74B0000A74C, + 0xA74D0000A74E, + 0xA74F0000A750, + 0xA7510000A752, + 0xA7530000A754, + 0xA7550000A756, + 0xA7570000A758, + 0xA7590000A75A, + 0xA75B0000A75C, + 0xA75D0000A75E, + 0xA75F0000A760, + 0xA7610000A762, + 0xA7630000A764, + 0xA7650000A766, + 0xA7670000A768, + 0xA7690000A76A, + 0xA76B0000A76C, + 0xA76D0000A76E, + 0xA76F0000A770, + 0xA7710000A779, + 0xA77A0000A77B, + 0xA77C0000A77D, + 0xA77F0000A780, + 0xA7810000A782, + 0xA7830000A784, + 0xA7850000A786, + 0xA7870000A789, + 0xA78C0000A78D, + 0xA78E0000A790, + 0xA7910000A792, + 0xA7930000A796, + 0xA7970000A798, + 0xA7990000A79A, + 0xA79B0000A79C, + 0xA79D0000A79E, + 0xA79F0000A7A0, + 0xA7A10000A7A2, + 0xA7A30000A7A4, + 0xA7A50000A7A6, + 0xA7A70000A7A8, + 0xA7A90000A7AA, + 0xA7AF0000A7B0, + 0xA7B50000A7B6, + 0xA7B70000A7B8, + 0xA7B90000A7BA, + 0xA7BB0000A7BC, + 0xA7BD0000A7BE, + 0xA7BF0000A7C0, + 0xA7C10000A7C2, + 0xA7C30000A7C4, + 0xA7C80000A7C9, + 0xA7CA0000A7CB, + 0xA7D10000A7D2, + 0xA7D30000A7D4, + 0xA7D50000A7D6, + 0xA7D70000A7D8, + 0xA7D90000A7DA, + 0xA7F60000A7F8, + 0xA7FA0000A828, + 0xA82C0000A82D, + 0xA8400000A874, + 0xA8800000A8C6, + 0xA8D00000A8DA, + 0xA8E00000A8F8, + 0xA8FB0000A8FC, + 0xA8FD0000A92E, + 0xA9300000A954, + 0xA9800000A9C1, + 0xA9CF0000A9DA, + 0xA9E00000A9FF, + 0xAA000000AA37, + 0xAA400000AA4E, + 0xAA500000AA5A, + 0xAA600000AA77, + 0xAA7A0000AAC3, + 0xAADB0000AADE, + 0xAAE00000AAF0, + 0xAAF20000AAF7, + 0xAB010000AB07, + 0xAB090000AB0F, + 0xAB110000AB17, + 0xAB200000AB27, + 0xAB280000AB2F, + 0xAB300000AB5B, + 0xAB600000AB69, + 0xABC00000ABEB, + 0xABEC0000ABEE, + 0xABF00000ABFA, + 0xAC000000D7A4, + 0xFA0E0000FA10, + 0xFA110000FA12, + 0xFA130000FA15, + 0xFA1F0000FA20, + 0xFA210000FA22, + 0xFA230000FA25, + 0xFA270000FA2A, + 0xFB1E0000FB1F, + 0xFE200000FE30, + 0xFE730000FE74, + 0x100000001000C, + 0x1000D00010027, + 0x100280001003B, + 0x1003C0001003E, + 0x1003F0001004E, + 0x100500001005E, + 0x10080000100FB, + 0x101FD000101FE, + 0x102800001029D, + 0x102A0000102D1, + 0x102E0000102E1, + 0x1030000010320, + 0x1032D00010341, + 0x103420001034A, + 0x103500001037B, + 0x103800001039E, + 0x103A0000103C4, + 0x103C8000103D0, + 0x104280001049E, + 0x104A0000104AA, + 0x104D8000104FC, + 0x1050000010528, + 0x1053000010564, + 0x10597000105A2, + 0x105A3000105B2, + 0x105B3000105BA, + 0x105BB000105BD, + 0x1060000010737, + 0x1074000010756, + 0x1076000010768, + 0x1078000010781, + 0x1080000010806, + 0x1080800010809, + 0x1080A00010836, + 0x1083700010839, + 0x1083C0001083D, + 0x1083F00010856, + 0x1086000010877, + 0x108800001089F, + 0x108E0000108F3, + 0x108F4000108F6, + 0x1090000010916, + 0x109200001093A, + 0x10980000109B8, + 0x109BE000109C0, + 0x10A0000010A04, + 0x10A0500010A07, + 0x10A0C00010A14, + 0x10A1500010A18, + 0x10A1900010A36, + 0x10A3800010A3B, + 0x10A3F00010A40, + 0x10A6000010A7D, + 0x10A8000010A9D, + 0x10AC000010AC8, + 0x10AC900010AE7, + 0x10B0000010B36, + 0x10B4000010B56, + 0x10B6000010B73, + 0x10B8000010B92, + 0x10C0000010C49, + 0x10CC000010CF3, + 0x10D0000010D28, + 0x10D3000010D3A, + 0x10E8000010EAA, + 0x10EAB00010EAD, + 0x10EB000010EB2, + 0x10EFD00010F1D, + 0x10F2700010F28, + 0x10F3000010F51, + 0x10F7000010F86, + 0x10FB000010FC5, + 0x10FE000010FF7, + 0x1100000011047, + 0x1106600011076, + 0x1107F000110BB, + 0x110C2000110C3, + 0x110D0000110E9, + 0x110F0000110FA, + 0x1110000011135, + 0x1113600011140, + 0x1114400011148, + 0x1115000011174, + 0x1117600011177, + 0x11180000111C5, + 0x111C9000111CD, + 0x111CE000111DB, + 0x111DC000111DD, + 0x1120000011212, + 0x1121300011238, + 0x1123E00011242, + 0x1128000011287, + 0x1128800011289, + 0x1128A0001128E, + 0x1128F0001129E, + 0x1129F000112A9, + 0x112B0000112EB, + 0x112F0000112FA, + 0x1130000011304, + 0x113050001130D, + 0x1130F00011311, + 0x1131300011329, + 0x1132A00011331, + 0x1133200011334, + 0x113350001133A, + 0x1133B00011345, + 0x1134700011349, + 0x1134B0001134E, + 0x1135000011351, + 0x1135700011358, + 0x1135D00011364, + 0x113660001136D, + 0x1137000011375, + 0x114000001144B, + 0x114500001145A, + 0x1145E00011462, + 0x11480000114C6, + 0x114C7000114C8, + 0x114D0000114DA, + 0x11580000115B6, + 0x115B8000115C1, + 0x115D8000115DE, + 0x1160000011641, + 0x1164400011645, + 0x116500001165A, + 0x11680000116B9, + 0x116C0000116CA, + 0x117000001171B, + 0x1171D0001172C, + 0x117300001173A, + 0x1174000011747, + 0x118000001183B, + 0x118C0000118EA, + 0x118FF00011907, + 0x119090001190A, + 0x1190C00011914, + 0x1191500011917, + 0x1191800011936, + 0x1193700011939, + 0x1193B00011944, + 0x119500001195A, + 0x119A0000119A8, + 0x119AA000119D8, + 0x119DA000119E2, + 0x119E3000119E5, + 0x11A0000011A3F, + 0x11A4700011A48, + 0x11A5000011A9A, + 0x11A9D00011A9E, + 0x11AB000011AF9, + 0x11C0000011C09, + 0x11C0A00011C37, + 0x11C3800011C41, + 0x11C5000011C5A, + 0x11C7200011C90, + 0x11C9200011CA8, + 0x11CA900011CB7, + 0x11D0000011D07, + 0x11D0800011D0A, + 0x11D0B00011D37, + 0x11D3A00011D3B, + 0x11D3C00011D3E, + 0x11D3F00011D48, + 0x11D5000011D5A, + 0x11D6000011D66, + 0x11D6700011D69, + 0x11D6A00011D8F, + 0x11D9000011D92, + 0x11D9300011D99, + 0x11DA000011DAA, + 0x11EE000011EF7, + 0x11F0000011F11, + 0x11F1200011F3B, + 0x11F3E00011F43, + 0x11F5000011F5A, + 0x11FB000011FB1, + 0x120000001239A, + 0x1248000012544, + 0x12F9000012FF1, + 0x1300000013430, + 0x1344000013456, + 0x1440000014647, + 0x1680000016A39, + 0x16A4000016A5F, + 0x16A6000016A6A, + 0x16A7000016ABF, + 0x16AC000016ACA, + 0x16AD000016AEE, + 0x16AF000016AF5, + 0x16B0000016B37, + 0x16B4000016B44, + 0x16B5000016B5A, + 0x16B6300016B78, + 0x16B7D00016B90, + 0x16E6000016E80, + 0x16F0000016F4B, + 0x16F4F00016F88, + 0x16F8F00016FA0, + 0x16FE000016FE2, + 0x16FE300016FE5, + 0x16FF000016FF2, + 0x17000000187F8, + 0x1880000018CD6, + 0x18D0000018D09, + 0x1AFF00001AFF4, + 0x1AFF50001AFFC, + 0x1AFFD0001AFFF, + 0x1B0000001B123, + 0x1B1320001B133, + 0x1B1500001B153, + 0x1B1550001B156, + 0x1B1640001B168, + 0x1B1700001B2FC, + 0x1BC000001BC6B, + 0x1BC700001BC7D, + 0x1BC800001BC89, + 0x1BC900001BC9A, + 0x1BC9D0001BC9F, + 0x1CF000001CF2E, + 0x1CF300001CF47, + 0x1DA000001DA37, + 0x1DA3B0001DA6D, + 0x1DA750001DA76, + 0x1DA840001DA85, + 0x1DA9B0001DAA0, + 0x1DAA10001DAB0, + 0x1DF000001DF1F, + 0x1DF250001DF2B, + 0x1E0000001E007, + 0x1E0080001E019, + 0x1E01B0001E022, + 0x1E0230001E025, + 0x1E0260001E02B, + 0x1E08F0001E090, + 0x1E1000001E12D, + 0x1E1300001E13E, + 0x1E1400001E14A, + 0x1E14E0001E14F, + 0x1E2900001E2AF, + 0x1E2C00001E2FA, + 0x1E4D00001E4FA, + 0x1E7E00001E7E7, + 0x1E7E80001E7EC, + 0x1E7ED0001E7EF, + 0x1E7F00001E7FF, + 0x1E8000001E8C5, + 0x1E8D00001E8D7, + 0x1E9220001E94C, + 0x1E9500001E95A, + 0x200000002A6E0, + 0x2A7000002B73A, + 0x2B7400002B81E, + 0x2B8200002CEA2, + 0x2CEB00002EBE1, + 0x2EBF00002EE5E, + 0x300000003134B, + 0x31350000323B0, + ), + "CONTEXTJ": (0x200C0000200E,), + "CONTEXTO": ( + 0xB7000000B8, + 0x37500000376, + 0x5F3000005F5, + 0x6600000066A, + 0x6F0000006FA, + 0x30FB000030FC, + ), +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py new file mode 100644 index 0000000000000000000000000000000000000000..7bfaa8d80d7dc471d572db0f949460901126e8bd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py @@ -0,0 +1,57 @@ +""" +Given a list of integers, made up of (hopefully) a small number of long runs +of consecutive integers, compute a representation of the form +((start1, end1), (start2, end2) ...). Then answer the question "was x present +in the original list?" in time O(log(# runs)). +""" + +import bisect +from typing import List, Tuple + + +def intranges_from_list(list_: List[int]) -> Tuple[int, ...]: + """Represent a list of integers as a sequence of ranges: + ((start_0, end_0), (start_1, end_1), ...), such that the original + integers are exactly those x such that start_i <= x < end_i for some i. + + Ranges are encoded as single integers (start << 32 | end), not as tuples. + """ + + sorted_list = sorted(list_) + ranges = [] + last_write = -1 + for i in range(len(sorted_list)): + if i + 1 < len(sorted_list): + if sorted_list[i] == sorted_list[i + 1] - 1: + continue + current_range = sorted_list[last_write + 1 : i + 1] + ranges.append(_encode_range(current_range[0], current_range[-1] + 1)) + last_write = i + + return tuple(ranges) + + +def _encode_range(start: int, end: int) -> int: + return (start << 32) | end + + +def _decode_range(r: int) -> Tuple[int, int]: + return (r >> 32), (r & ((1 << 32) - 1)) + + +def intranges_contain(int_: int, ranges: Tuple[int, ...]) -> bool: + """Determine if `int_` falls into one of the ranges in `ranges`.""" + tuple_ = _encode_range(int_, 0) + pos = bisect.bisect_left(ranges, tuple_) + # we could be immediately ahead of a tuple (start, end) + # with start < int_ <= end + if pos > 0: + left, right = _decode_range(ranges[pos - 1]) + if left <= int_ < right: + return True + # or we could be immediately behind a tuple (int_, end) + if pos < len(ranges): + left, _ = _decode_range(ranges[pos]) + if left == int_: + return True + return False diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py new file mode 100644 index 0000000000000000000000000000000000000000..514ff7e2e68b65f309d30a0b06e6b290d2c353a8 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py @@ -0,0 +1 @@ +__version__ = "3.10" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py new file mode 100644 index 0000000000000000000000000000000000000000..eb894327410debecb64ddf40eddc3131cf8344de --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py @@ -0,0 +1,8681 @@ +# This file is automatically generated by tools/idna-data +# vim: set fileencoding=utf-8 : + +from typing import List, Tuple, Union + +"""IDNA Mapping Table from UTS46.""" + + +__version__ = "15.1.0" + + +def _seg_0() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x0, "3"), + (0x1, "3"), + (0x2, "3"), + (0x3, "3"), + (0x4, "3"), + (0x5, "3"), + (0x6, "3"), + (0x7, "3"), + (0x8, "3"), + (0x9, "3"), + (0xA, "3"), + (0xB, "3"), + (0xC, "3"), + (0xD, "3"), + (0xE, "3"), + (0xF, "3"), + (0x10, "3"), + (0x11, "3"), + (0x12, "3"), + (0x13, "3"), + (0x14, "3"), + (0x15, "3"), + (0x16, "3"), + (0x17, "3"), + (0x18, "3"), + (0x19, "3"), + (0x1A, "3"), + (0x1B, "3"), + (0x1C, "3"), + (0x1D, "3"), + (0x1E, "3"), + (0x1F, "3"), + (0x20, "3"), + (0x21, "3"), + (0x22, "3"), + (0x23, "3"), + (0x24, "3"), + (0x25, "3"), + (0x26, "3"), + (0x27, "3"), + (0x28, "3"), + (0x29, "3"), + (0x2A, "3"), + (0x2B, "3"), + (0x2C, "3"), + (0x2D, "V"), + (0x2E, "V"), + (0x2F, "3"), + (0x30, "V"), + (0x31, "V"), + (0x32, "V"), + (0x33, "V"), + (0x34, "V"), + (0x35, "V"), + (0x36, "V"), + (0x37, "V"), + (0x38, "V"), + (0x39, "V"), + (0x3A, "3"), + (0x3B, "3"), + (0x3C, "3"), + (0x3D, "3"), + (0x3E, "3"), + (0x3F, "3"), + (0x40, "3"), + (0x41, "M", "a"), + (0x42, "M", "b"), + (0x43, "M", "c"), + (0x44, "M", "d"), + (0x45, "M", "e"), + (0x46, "M", "f"), + (0x47, "M", "g"), + (0x48, "M", "h"), + (0x49, "M", "i"), + (0x4A, "M", "j"), + (0x4B, "M", "k"), + (0x4C, "M", "l"), + (0x4D, "M", "m"), + (0x4E, "M", "n"), + (0x4F, "M", "o"), + (0x50, "M", "p"), + (0x51, "M", "q"), + (0x52, "M", "r"), + (0x53, "M", "s"), + (0x54, "M", "t"), + (0x55, "M", "u"), + (0x56, "M", "v"), + (0x57, "M", "w"), + (0x58, "M", "x"), + (0x59, "M", "y"), + (0x5A, "M", "z"), + (0x5B, "3"), + (0x5C, "3"), + (0x5D, "3"), + (0x5E, "3"), + (0x5F, "3"), + (0x60, "3"), + (0x61, "V"), + (0x62, "V"), + (0x63, "V"), + ] + + +def _seg_1() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x64, "V"), + (0x65, "V"), + (0x66, "V"), + (0x67, "V"), + (0x68, "V"), + (0x69, "V"), + (0x6A, "V"), + (0x6B, "V"), + (0x6C, "V"), + (0x6D, "V"), + (0x6E, "V"), + (0x6F, "V"), + (0x70, "V"), + (0x71, "V"), + (0x72, "V"), + (0x73, "V"), + (0x74, "V"), + (0x75, "V"), + (0x76, "V"), + (0x77, "V"), + (0x78, "V"), + (0x79, "V"), + (0x7A, "V"), + (0x7B, "3"), + (0x7C, "3"), + (0x7D, "3"), + (0x7E, "3"), + (0x7F, "3"), + (0x80, "X"), + (0x81, "X"), + (0x82, "X"), + (0x83, "X"), + (0x84, "X"), + (0x85, "X"), + (0x86, "X"), + (0x87, "X"), + (0x88, "X"), + (0x89, "X"), + (0x8A, "X"), + (0x8B, "X"), + (0x8C, "X"), + (0x8D, "X"), + (0x8E, "X"), + (0x8F, "X"), + (0x90, "X"), + (0x91, "X"), + (0x92, "X"), + (0x93, "X"), + (0x94, "X"), + (0x95, "X"), + (0x96, "X"), + (0x97, "X"), + (0x98, "X"), + (0x99, "X"), + (0x9A, "X"), + (0x9B, "X"), + (0x9C, "X"), + (0x9D, "X"), + (0x9E, "X"), + (0x9F, "X"), + (0xA0, "3", " "), + (0xA1, "V"), + (0xA2, "V"), + (0xA3, "V"), + (0xA4, "V"), + (0xA5, "V"), + (0xA6, "V"), + (0xA7, "V"), + (0xA8, "3", " ̈"), + (0xA9, "V"), + (0xAA, "M", "a"), + (0xAB, "V"), + (0xAC, "V"), + (0xAD, "I"), + (0xAE, "V"), + (0xAF, "3", " ̄"), + (0xB0, "V"), + (0xB1, "V"), + (0xB2, "M", "2"), + (0xB3, "M", "3"), + (0xB4, "3", " ́"), + (0xB5, "M", "μ"), + (0xB6, "V"), + (0xB7, "V"), + (0xB8, "3", " ̧"), + (0xB9, "M", "1"), + (0xBA, "M", "o"), + (0xBB, "V"), + (0xBC, "M", "1⁄4"), + (0xBD, "M", "1⁄2"), + (0xBE, "M", "3⁄4"), + (0xBF, "V"), + (0xC0, "M", "à"), + (0xC1, "M", "á"), + (0xC2, "M", "â"), + (0xC3, "M", "ã"), + (0xC4, "M", "ä"), + (0xC5, "M", "å"), + (0xC6, "M", "æ"), + (0xC7, "M", "ç"), + ] + + +def _seg_2() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xC8, "M", "è"), + (0xC9, "M", "é"), + (0xCA, "M", "ê"), + (0xCB, "M", "ë"), + (0xCC, "M", "ì"), + (0xCD, "M", "í"), + (0xCE, "M", "î"), + (0xCF, "M", "ï"), + (0xD0, "M", "ð"), + (0xD1, "M", "ñ"), + (0xD2, "M", "ò"), + (0xD3, "M", "ó"), + (0xD4, "M", "ô"), + (0xD5, "M", "õ"), + (0xD6, "M", "ö"), + (0xD7, "V"), + (0xD8, "M", "ø"), + (0xD9, "M", "ù"), + (0xDA, "M", "ú"), + (0xDB, "M", "û"), + (0xDC, "M", "ü"), + (0xDD, "M", "ý"), + (0xDE, "M", "þ"), + (0xDF, "D", "ss"), + (0xE0, "V"), + (0xE1, "V"), + (0xE2, "V"), + (0xE3, "V"), + (0xE4, "V"), + (0xE5, "V"), + (0xE6, "V"), + (0xE7, "V"), + (0xE8, "V"), + (0xE9, "V"), + (0xEA, "V"), + (0xEB, "V"), + (0xEC, "V"), + (0xED, "V"), + (0xEE, "V"), + (0xEF, "V"), + (0xF0, "V"), + (0xF1, "V"), + (0xF2, "V"), + (0xF3, "V"), + (0xF4, "V"), + (0xF5, "V"), + (0xF6, "V"), + (0xF7, "V"), + (0xF8, "V"), + (0xF9, "V"), + (0xFA, "V"), + (0xFB, "V"), + (0xFC, "V"), + (0xFD, "V"), + (0xFE, "V"), + (0xFF, "V"), + (0x100, "M", "ā"), + (0x101, "V"), + (0x102, "M", "ă"), + (0x103, "V"), + (0x104, "M", "ą"), + (0x105, "V"), + (0x106, "M", "ć"), + (0x107, "V"), + (0x108, "M", "ĉ"), + (0x109, "V"), + (0x10A, "M", "ċ"), + (0x10B, "V"), + (0x10C, "M", "č"), + (0x10D, "V"), + (0x10E, "M", "ď"), + (0x10F, "V"), + (0x110, "M", "đ"), + (0x111, "V"), + (0x112, "M", "ē"), + (0x113, "V"), + (0x114, "M", "ĕ"), + (0x115, "V"), + (0x116, "M", "ė"), + (0x117, "V"), + (0x118, "M", "ę"), + (0x119, "V"), + (0x11A, "M", "ě"), + (0x11B, "V"), + (0x11C, "M", "ĝ"), + (0x11D, "V"), + (0x11E, "M", "ğ"), + (0x11F, "V"), + (0x120, "M", "ġ"), + (0x121, "V"), + (0x122, "M", "ģ"), + (0x123, "V"), + (0x124, "M", "ĥ"), + (0x125, "V"), + (0x126, "M", "ħ"), + (0x127, "V"), + (0x128, "M", "ĩ"), + (0x129, "V"), + (0x12A, "M", "ī"), + (0x12B, "V"), + ] + + +def _seg_3() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x12C, "M", "ĭ"), + (0x12D, "V"), + (0x12E, "M", "į"), + (0x12F, "V"), + (0x130, "M", "i̇"), + (0x131, "V"), + (0x132, "M", "ij"), + (0x134, "M", "ĵ"), + (0x135, "V"), + (0x136, "M", "ķ"), + (0x137, "V"), + (0x139, "M", "ĺ"), + (0x13A, "V"), + (0x13B, "M", "ļ"), + (0x13C, "V"), + (0x13D, "M", "ľ"), + (0x13E, "V"), + (0x13F, "M", "l·"), + (0x141, "M", "ł"), + (0x142, "V"), + (0x143, "M", "ń"), + (0x144, "V"), + (0x145, "M", "ņ"), + (0x146, "V"), + (0x147, "M", "ň"), + (0x148, "V"), + (0x149, "M", "ʼn"), + (0x14A, "M", "ŋ"), + (0x14B, "V"), + (0x14C, "M", "ō"), + (0x14D, "V"), + (0x14E, "M", "ŏ"), + (0x14F, "V"), + (0x150, "M", "ő"), + (0x151, "V"), + (0x152, "M", "œ"), + (0x153, "V"), + (0x154, "M", "ŕ"), + (0x155, "V"), + (0x156, "M", "ŗ"), + (0x157, "V"), + (0x158, "M", "ř"), + (0x159, "V"), + (0x15A, "M", "ś"), + (0x15B, "V"), + (0x15C, "M", "ŝ"), + (0x15D, "V"), + (0x15E, "M", "ş"), + (0x15F, "V"), + (0x160, "M", "š"), + (0x161, "V"), + (0x162, "M", "ţ"), + (0x163, "V"), + (0x164, "M", "ť"), + (0x165, "V"), + (0x166, "M", "ŧ"), + (0x167, "V"), + (0x168, "M", "ũ"), + (0x169, "V"), + (0x16A, "M", "ū"), + (0x16B, "V"), + (0x16C, "M", "ŭ"), + (0x16D, "V"), + (0x16E, "M", "ů"), + (0x16F, "V"), + (0x170, "M", "ű"), + (0x171, "V"), + (0x172, "M", "ų"), + (0x173, "V"), + (0x174, "M", "ŵ"), + (0x175, "V"), + (0x176, "M", "ŷ"), + (0x177, "V"), + (0x178, "M", "ÿ"), + (0x179, "M", "ź"), + (0x17A, "V"), + (0x17B, "M", "ż"), + (0x17C, "V"), + (0x17D, "M", "ž"), + (0x17E, "V"), + (0x17F, "M", "s"), + (0x180, "V"), + (0x181, "M", "ɓ"), + (0x182, "M", "ƃ"), + (0x183, "V"), + (0x184, "M", "ƅ"), + (0x185, "V"), + (0x186, "M", "ɔ"), + (0x187, "M", "ƈ"), + (0x188, "V"), + (0x189, "M", "ɖ"), + (0x18A, "M", "ɗ"), + (0x18B, "M", "ƌ"), + (0x18C, "V"), + (0x18E, "M", "ǝ"), + (0x18F, "M", "ə"), + (0x190, "M", "ɛ"), + (0x191, "M", "ƒ"), + (0x192, "V"), + (0x193, "M", "ɠ"), + ] + + +def _seg_4() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x194, "M", "ɣ"), + (0x195, "V"), + (0x196, "M", "ɩ"), + (0x197, "M", "ɨ"), + (0x198, "M", "ƙ"), + (0x199, "V"), + (0x19C, "M", "ɯ"), + (0x19D, "M", "ɲ"), + (0x19E, "V"), + (0x19F, "M", "ɵ"), + (0x1A0, "M", "ơ"), + (0x1A1, "V"), + (0x1A2, "M", "ƣ"), + (0x1A3, "V"), + (0x1A4, "M", "ƥ"), + (0x1A5, "V"), + (0x1A6, "M", "ʀ"), + (0x1A7, "M", "ƨ"), + (0x1A8, "V"), + (0x1A9, "M", "ʃ"), + (0x1AA, "V"), + (0x1AC, "M", "ƭ"), + (0x1AD, "V"), + (0x1AE, "M", "ʈ"), + (0x1AF, "M", "ư"), + (0x1B0, "V"), + (0x1B1, "M", "ʊ"), + (0x1B2, "M", "ʋ"), + (0x1B3, "M", "ƴ"), + (0x1B4, "V"), + (0x1B5, "M", "ƶ"), + (0x1B6, "V"), + (0x1B7, "M", "ʒ"), + (0x1B8, "M", "ƹ"), + (0x1B9, "V"), + (0x1BC, "M", "ƽ"), + (0x1BD, "V"), + (0x1C4, "M", "dž"), + (0x1C7, "M", "lj"), + (0x1CA, "M", "nj"), + (0x1CD, "M", "ǎ"), + (0x1CE, "V"), + (0x1CF, "M", "ǐ"), + (0x1D0, "V"), + (0x1D1, "M", "ǒ"), + (0x1D2, "V"), + (0x1D3, "M", "ǔ"), + (0x1D4, "V"), + (0x1D5, "M", "ǖ"), + (0x1D6, "V"), + (0x1D7, "M", "ǘ"), + (0x1D8, "V"), + (0x1D9, "M", "ǚ"), + (0x1DA, "V"), + (0x1DB, "M", "ǜ"), + (0x1DC, "V"), + (0x1DE, "M", "ǟ"), + (0x1DF, "V"), + (0x1E0, "M", "ǡ"), + (0x1E1, "V"), + (0x1E2, "M", "ǣ"), + (0x1E3, "V"), + (0x1E4, "M", "ǥ"), + (0x1E5, "V"), + (0x1E6, "M", "ǧ"), + (0x1E7, "V"), + (0x1E8, "M", "ǩ"), + (0x1E9, "V"), + (0x1EA, "M", "ǫ"), + (0x1EB, "V"), + (0x1EC, "M", "ǭ"), + (0x1ED, "V"), + (0x1EE, "M", "ǯ"), + (0x1EF, "V"), + (0x1F1, "M", "dz"), + (0x1F4, "M", "ǵ"), + (0x1F5, "V"), + (0x1F6, "M", "ƕ"), + (0x1F7, "M", "ƿ"), + (0x1F8, "M", "ǹ"), + (0x1F9, "V"), + (0x1FA, "M", "ǻ"), + (0x1FB, "V"), + (0x1FC, "M", "ǽ"), + (0x1FD, "V"), + (0x1FE, "M", "ǿ"), + (0x1FF, "V"), + (0x200, "M", "ȁ"), + (0x201, "V"), + (0x202, "M", "ȃ"), + (0x203, "V"), + (0x204, "M", "ȅ"), + (0x205, "V"), + (0x206, "M", "ȇ"), + (0x207, "V"), + (0x208, "M", "ȉ"), + (0x209, "V"), + (0x20A, "M", "ȋ"), + (0x20B, "V"), + (0x20C, "M", "ȍ"), + ] + + +def _seg_5() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x20D, "V"), + (0x20E, "M", "ȏ"), + (0x20F, "V"), + (0x210, "M", "ȑ"), + (0x211, "V"), + (0x212, "M", "ȓ"), + (0x213, "V"), + (0x214, "M", "ȕ"), + (0x215, "V"), + (0x216, "M", "ȗ"), + (0x217, "V"), + (0x218, "M", "ș"), + (0x219, "V"), + (0x21A, "M", "ț"), + (0x21B, "V"), + (0x21C, "M", "ȝ"), + (0x21D, "V"), + (0x21E, "M", "ȟ"), + (0x21F, "V"), + (0x220, "M", "ƞ"), + (0x221, "V"), + (0x222, "M", "ȣ"), + (0x223, "V"), + (0x224, "M", "ȥ"), + (0x225, "V"), + (0x226, "M", "ȧ"), + (0x227, "V"), + (0x228, "M", "ȩ"), + (0x229, "V"), + (0x22A, "M", "ȫ"), + (0x22B, "V"), + (0x22C, "M", "ȭ"), + (0x22D, "V"), + (0x22E, "M", "ȯ"), + (0x22F, "V"), + (0x230, "M", "ȱ"), + (0x231, "V"), + (0x232, "M", "ȳ"), + (0x233, "V"), + (0x23A, "M", "ⱥ"), + (0x23B, "M", "ȼ"), + (0x23C, "V"), + (0x23D, "M", "ƚ"), + (0x23E, "M", "ⱦ"), + (0x23F, "V"), + (0x241, "M", "ɂ"), + (0x242, "V"), + (0x243, "M", "ƀ"), + (0x244, "M", "ʉ"), + (0x245, "M", "ʌ"), + (0x246, "M", "ɇ"), + (0x247, "V"), + (0x248, "M", "ɉ"), + (0x249, "V"), + (0x24A, "M", "ɋ"), + (0x24B, "V"), + (0x24C, "M", "ɍ"), + (0x24D, "V"), + (0x24E, "M", "ɏ"), + (0x24F, "V"), + (0x2B0, "M", "h"), + (0x2B1, "M", "ɦ"), + (0x2B2, "M", "j"), + (0x2B3, "M", "r"), + (0x2B4, "M", "ɹ"), + (0x2B5, "M", "ɻ"), + (0x2B6, "M", "ʁ"), + (0x2B7, "M", "w"), + (0x2B8, "M", "y"), + (0x2B9, "V"), + (0x2D8, "3", " ̆"), + (0x2D9, "3", " ̇"), + (0x2DA, "3", " ̊"), + (0x2DB, "3", " ̨"), + (0x2DC, "3", " ̃"), + (0x2DD, "3", " ̋"), + (0x2DE, "V"), + (0x2E0, "M", "ɣ"), + (0x2E1, "M", "l"), + (0x2E2, "M", "s"), + (0x2E3, "M", "x"), + (0x2E4, "M", "ʕ"), + (0x2E5, "V"), + (0x340, "M", "̀"), + (0x341, "M", "́"), + (0x342, "V"), + (0x343, "M", "̓"), + (0x344, "M", "̈́"), + (0x345, "M", "ι"), + (0x346, "V"), + (0x34F, "I"), + (0x350, "V"), + (0x370, "M", "ͱ"), + (0x371, "V"), + (0x372, "M", "ͳ"), + (0x373, "V"), + (0x374, "M", "ʹ"), + (0x375, "V"), + (0x376, "M", "ͷ"), + (0x377, "V"), + ] + + +def _seg_6() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x378, "X"), + (0x37A, "3", " ι"), + (0x37B, "V"), + (0x37E, "3", ";"), + (0x37F, "M", "ϳ"), + (0x380, "X"), + (0x384, "3", " ́"), + (0x385, "3", " ̈́"), + (0x386, "M", "ά"), + (0x387, "M", "·"), + (0x388, "M", "έ"), + (0x389, "M", "ή"), + (0x38A, "M", "ί"), + (0x38B, "X"), + (0x38C, "M", "ό"), + (0x38D, "X"), + (0x38E, "M", "ύ"), + (0x38F, "M", "ώ"), + (0x390, "V"), + (0x391, "M", "α"), + (0x392, "M", "β"), + (0x393, "M", "γ"), + (0x394, "M", "δ"), + (0x395, "M", "ε"), + (0x396, "M", "ζ"), + (0x397, "M", "η"), + (0x398, "M", "θ"), + (0x399, "M", "ι"), + (0x39A, "M", "κ"), + (0x39B, "M", "λ"), + (0x39C, "M", "μ"), + (0x39D, "M", "ν"), + (0x39E, "M", "ξ"), + (0x39F, "M", "ο"), + (0x3A0, "M", "π"), + (0x3A1, "M", "ρ"), + (0x3A2, "X"), + (0x3A3, "M", "σ"), + (0x3A4, "M", "τ"), + (0x3A5, "M", "υ"), + (0x3A6, "M", "φ"), + (0x3A7, "M", "χ"), + (0x3A8, "M", "ψ"), + (0x3A9, "M", "ω"), + (0x3AA, "M", "ϊ"), + (0x3AB, "M", "ϋ"), + (0x3AC, "V"), + (0x3C2, "D", "σ"), + (0x3C3, "V"), + (0x3CF, "M", "ϗ"), + (0x3D0, "M", "β"), + (0x3D1, "M", "θ"), + (0x3D2, "M", "υ"), + (0x3D3, "M", "ύ"), + (0x3D4, "M", "ϋ"), + (0x3D5, "M", "φ"), + (0x3D6, "M", "π"), + (0x3D7, "V"), + (0x3D8, "M", "ϙ"), + (0x3D9, "V"), + (0x3DA, "M", "ϛ"), + (0x3DB, "V"), + (0x3DC, "M", "ϝ"), + (0x3DD, "V"), + (0x3DE, "M", "ϟ"), + (0x3DF, "V"), + (0x3E0, "M", "ϡ"), + (0x3E1, "V"), + (0x3E2, "M", "ϣ"), + (0x3E3, "V"), + (0x3E4, "M", "ϥ"), + (0x3E5, "V"), + (0x3E6, "M", "ϧ"), + (0x3E7, "V"), + (0x3E8, "M", "ϩ"), + (0x3E9, "V"), + (0x3EA, "M", "ϫ"), + (0x3EB, "V"), + (0x3EC, "M", "ϭ"), + (0x3ED, "V"), + (0x3EE, "M", "ϯ"), + (0x3EF, "V"), + (0x3F0, "M", "κ"), + (0x3F1, "M", "ρ"), + (0x3F2, "M", "σ"), + (0x3F3, "V"), + (0x3F4, "M", "θ"), + (0x3F5, "M", "ε"), + (0x3F6, "V"), + (0x3F7, "M", "ϸ"), + (0x3F8, "V"), + (0x3F9, "M", "σ"), + (0x3FA, "M", "ϻ"), + (0x3FB, "V"), + (0x3FD, "M", "ͻ"), + (0x3FE, "M", "ͼ"), + (0x3FF, "M", "ͽ"), + (0x400, "M", "ѐ"), + (0x401, "M", "ё"), + (0x402, "M", "ђ"), + ] + + +def _seg_7() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x403, "M", "ѓ"), + (0x404, "M", "є"), + (0x405, "M", "ѕ"), + (0x406, "M", "і"), + (0x407, "M", "ї"), + (0x408, "M", "ј"), + (0x409, "M", "љ"), + (0x40A, "M", "њ"), + (0x40B, "M", "ћ"), + (0x40C, "M", "ќ"), + (0x40D, "M", "ѝ"), + (0x40E, "M", "ў"), + (0x40F, "M", "џ"), + (0x410, "M", "а"), + (0x411, "M", "б"), + (0x412, "M", "в"), + (0x413, "M", "г"), + (0x414, "M", "д"), + (0x415, "M", "е"), + (0x416, "M", "ж"), + (0x417, "M", "з"), + (0x418, "M", "и"), + (0x419, "M", "й"), + (0x41A, "M", "к"), + (0x41B, "M", "л"), + (0x41C, "M", "м"), + (0x41D, "M", "н"), + (0x41E, "M", "о"), + (0x41F, "M", "п"), + (0x420, "M", "р"), + (0x421, "M", "с"), + (0x422, "M", "т"), + (0x423, "M", "у"), + (0x424, "M", "ф"), + (0x425, "M", "х"), + (0x426, "M", "ц"), + (0x427, "M", "ч"), + (0x428, "M", "ш"), + (0x429, "M", "щ"), + (0x42A, "M", "ъ"), + (0x42B, "M", "ы"), + (0x42C, "M", "ь"), + (0x42D, "M", "э"), + (0x42E, "M", "ю"), + (0x42F, "M", "я"), + (0x430, "V"), + (0x460, "M", "ѡ"), + (0x461, "V"), + (0x462, "M", "ѣ"), + (0x463, "V"), + (0x464, "M", "ѥ"), + (0x465, "V"), + (0x466, "M", "ѧ"), + (0x467, "V"), + (0x468, "M", "ѩ"), + (0x469, "V"), + (0x46A, "M", "ѫ"), + (0x46B, "V"), + (0x46C, "M", "ѭ"), + (0x46D, "V"), + (0x46E, "M", "ѯ"), + (0x46F, "V"), + (0x470, "M", "ѱ"), + (0x471, "V"), + (0x472, "M", "ѳ"), + (0x473, "V"), + (0x474, "M", "ѵ"), + (0x475, "V"), + (0x476, "M", "ѷ"), + (0x477, "V"), + (0x478, "M", "ѹ"), + (0x479, "V"), + (0x47A, "M", "ѻ"), + (0x47B, "V"), + (0x47C, "M", "ѽ"), + (0x47D, "V"), + (0x47E, "M", "ѿ"), + (0x47F, "V"), + (0x480, "M", "ҁ"), + (0x481, "V"), + (0x48A, "M", "ҋ"), + (0x48B, "V"), + (0x48C, "M", "ҍ"), + (0x48D, "V"), + (0x48E, "M", "ҏ"), + (0x48F, "V"), + (0x490, "M", "ґ"), + (0x491, "V"), + (0x492, "M", "ғ"), + (0x493, "V"), + (0x494, "M", "ҕ"), + (0x495, "V"), + (0x496, "M", "җ"), + (0x497, "V"), + (0x498, "M", "ҙ"), + (0x499, "V"), + (0x49A, "M", "қ"), + (0x49B, "V"), + (0x49C, "M", "ҝ"), + (0x49D, "V"), + ] + + +def _seg_8() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x49E, "M", "ҟ"), + (0x49F, "V"), + (0x4A0, "M", "ҡ"), + (0x4A1, "V"), + (0x4A2, "M", "ң"), + (0x4A3, "V"), + (0x4A4, "M", "ҥ"), + (0x4A5, "V"), + (0x4A6, "M", "ҧ"), + (0x4A7, "V"), + (0x4A8, "M", "ҩ"), + (0x4A9, "V"), + (0x4AA, "M", "ҫ"), + (0x4AB, "V"), + (0x4AC, "M", "ҭ"), + (0x4AD, "V"), + (0x4AE, "M", "ү"), + (0x4AF, "V"), + (0x4B0, "M", "ұ"), + (0x4B1, "V"), + (0x4B2, "M", "ҳ"), + (0x4B3, "V"), + (0x4B4, "M", "ҵ"), + (0x4B5, "V"), + (0x4B6, "M", "ҷ"), + (0x4B7, "V"), + (0x4B8, "M", "ҹ"), + (0x4B9, "V"), + (0x4BA, "M", "һ"), + (0x4BB, "V"), + (0x4BC, "M", "ҽ"), + (0x4BD, "V"), + (0x4BE, "M", "ҿ"), + (0x4BF, "V"), + (0x4C0, "X"), + (0x4C1, "M", "ӂ"), + (0x4C2, "V"), + (0x4C3, "M", "ӄ"), + (0x4C4, "V"), + (0x4C5, "M", "ӆ"), + (0x4C6, "V"), + (0x4C7, "M", "ӈ"), + (0x4C8, "V"), + (0x4C9, "M", "ӊ"), + (0x4CA, "V"), + (0x4CB, "M", "ӌ"), + (0x4CC, "V"), + (0x4CD, "M", "ӎ"), + (0x4CE, "V"), + (0x4D0, "M", "ӑ"), + (0x4D1, "V"), + (0x4D2, "M", "ӓ"), + (0x4D3, "V"), + (0x4D4, "M", "ӕ"), + (0x4D5, "V"), + (0x4D6, "M", "ӗ"), + (0x4D7, "V"), + (0x4D8, "M", "ә"), + (0x4D9, "V"), + (0x4DA, "M", "ӛ"), + (0x4DB, "V"), + (0x4DC, "M", "ӝ"), + (0x4DD, "V"), + (0x4DE, "M", "ӟ"), + (0x4DF, "V"), + (0x4E0, "M", "ӡ"), + (0x4E1, "V"), + (0x4E2, "M", "ӣ"), + (0x4E3, "V"), + (0x4E4, "M", "ӥ"), + (0x4E5, "V"), + (0x4E6, "M", "ӧ"), + (0x4E7, "V"), + (0x4E8, "M", "ө"), + (0x4E9, "V"), + (0x4EA, "M", "ӫ"), + (0x4EB, "V"), + (0x4EC, "M", "ӭ"), + (0x4ED, "V"), + (0x4EE, "M", "ӯ"), + (0x4EF, "V"), + (0x4F0, "M", "ӱ"), + (0x4F1, "V"), + (0x4F2, "M", "ӳ"), + (0x4F3, "V"), + (0x4F4, "M", "ӵ"), + (0x4F5, "V"), + (0x4F6, "M", "ӷ"), + (0x4F7, "V"), + (0x4F8, "M", "ӹ"), + (0x4F9, "V"), + (0x4FA, "M", "ӻ"), + (0x4FB, "V"), + (0x4FC, "M", "ӽ"), + (0x4FD, "V"), + (0x4FE, "M", "ӿ"), + (0x4FF, "V"), + (0x500, "M", "ԁ"), + (0x501, "V"), + (0x502, "M", "ԃ"), + ] + + +def _seg_9() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x503, "V"), + (0x504, "M", "ԅ"), + (0x505, "V"), + (0x506, "M", "ԇ"), + (0x507, "V"), + (0x508, "M", "ԉ"), + (0x509, "V"), + (0x50A, "M", "ԋ"), + (0x50B, "V"), + (0x50C, "M", "ԍ"), + (0x50D, "V"), + (0x50E, "M", "ԏ"), + (0x50F, "V"), + (0x510, "M", "ԑ"), + (0x511, "V"), + (0x512, "M", "ԓ"), + (0x513, "V"), + (0x514, "M", "ԕ"), + (0x515, "V"), + (0x516, "M", "ԗ"), + (0x517, "V"), + (0x518, "M", "ԙ"), + (0x519, "V"), + (0x51A, "M", "ԛ"), + (0x51B, "V"), + (0x51C, "M", "ԝ"), + (0x51D, "V"), + (0x51E, "M", "ԟ"), + (0x51F, "V"), + (0x520, "M", "ԡ"), + (0x521, "V"), + (0x522, "M", "ԣ"), + (0x523, "V"), + (0x524, "M", "ԥ"), + (0x525, "V"), + (0x526, "M", "ԧ"), + (0x527, "V"), + (0x528, "M", "ԩ"), + (0x529, "V"), + (0x52A, "M", "ԫ"), + (0x52B, "V"), + (0x52C, "M", "ԭ"), + (0x52D, "V"), + (0x52E, "M", "ԯ"), + (0x52F, "V"), + (0x530, "X"), + (0x531, "M", "ա"), + (0x532, "M", "բ"), + (0x533, "M", "գ"), + (0x534, "M", "դ"), + (0x535, "M", "ե"), + (0x536, "M", "զ"), + (0x537, "M", "է"), + (0x538, "M", "ը"), + (0x539, "M", "թ"), + (0x53A, "M", "ժ"), + (0x53B, "M", "ի"), + (0x53C, "M", "լ"), + (0x53D, "M", "խ"), + (0x53E, "M", "ծ"), + (0x53F, "M", "կ"), + (0x540, "M", "հ"), + (0x541, "M", "ձ"), + (0x542, "M", "ղ"), + (0x543, "M", "ճ"), + (0x544, "M", "մ"), + (0x545, "M", "յ"), + (0x546, "M", "ն"), + (0x547, "M", "շ"), + (0x548, "M", "ո"), + (0x549, "M", "չ"), + (0x54A, "M", "պ"), + (0x54B, "M", "ջ"), + (0x54C, "M", "ռ"), + (0x54D, "M", "ս"), + (0x54E, "M", "վ"), + (0x54F, "M", "տ"), + (0x550, "M", "ր"), + (0x551, "M", "ց"), + (0x552, "M", "ւ"), + (0x553, "M", "փ"), + (0x554, "M", "ք"), + (0x555, "M", "օ"), + (0x556, "M", "ֆ"), + (0x557, "X"), + (0x559, "V"), + (0x587, "M", "եւ"), + (0x588, "V"), + (0x58B, "X"), + (0x58D, "V"), + (0x590, "X"), + (0x591, "V"), + (0x5C8, "X"), + (0x5D0, "V"), + (0x5EB, "X"), + (0x5EF, "V"), + (0x5F5, "X"), + (0x606, "V"), + (0x61C, "X"), + (0x61D, "V"), + ] + + +def _seg_10() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x675, "M", "اٴ"), + (0x676, "M", "وٴ"), + (0x677, "M", "ۇٴ"), + (0x678, "M", "يٴ"), + (0x679, "V"), + (0x6DD, "X"), + (0x6DE, "V"), + (0x70E, "X"), + (0x710, "V"), + (0x74B, "X"), + (0x74D, "V"), + (0x7B2, "X"), + (0x7C0, "V"), + (0x7FB, "X"), + (0x7FD, "V"), + (0x82E, "X"), + (0x830, "V"), + (0x83F, "X"), + (0x840, "V"), + (0x85C, "X"), + (0x85E, "V"), + (0x85F, "X"), + (0x860, "V"), + (0x86B, "X"), + (0x870, "V"), + (0x88F, "X"), + (0x898, "V"), + (0x8E2, "X"), + (0x8E3, "V"), + (0x958, "M", "क़"), + (0x959, "M", "ख़"), + (0x95A, "M", "ग़"), + (0x95B, "M", "ज़"), + (0x95C, "M", "ड़"), + (0x95D, "M", "ढ़"), + (0x95E, "M", "फ़"), + (0x95F, "M", "य़"), + (0x960, "V"), + (0x984, "X"), + (0x985, "V"), + (0x98D, "X"), + (0x98F, "V"), + (0x991, "X"), + (0x993, "V"), + (0x9A9, "X"), + (0x9AA, "V"), + (0x9B1, "X"), + (0x9B2, "V"), + (0x9B3, "X"), + (0x9B6, "V"), + (0x9BA, "X"), + (0x9BC, "V"), + (0x9C5, "X"), + (0x9C7, "V"), + (0x9C9, "X"), + (0x9CB, "V"), + (0x9CF, "X"), + (0x9D7, "V"), + (0x9D8, "X"), + (0x9DC, "M", "ড়"), + (0x9DD, "M", "ঢ়"), + (0x9DE, "X"), + (0x9DF, "M", "য়"), + (0x9E0, "V"), + (0x9E4, "X"), + (0x9E6, "V"), + (0x9FF, "X"), + (0xA01, "V"), + (0xA04, "X"), + (0xA05, "V"), + (0xA0B, "X"), + (0xA0F, "V"), + (0xA11, "X"), + (0xA13, "V"), + (0xA29, "X"), + (0xA2A, "V"), + (0xA31, "X"), + (0xA32, "V"), + (0xA33, "M", "ਲ਼"), + (0xA34, "X"), + (0xA35, "V"), + (0xA36, "M", "ਸ਼"), + (0xA37, "X"), + (0xA38, "V"), + (0xA3A, "X"), + (0xA3C, "V"), + (0xA3D, "X"), + (0xA3E, "V"), + (0xA43, "X"), + (0xA47, "V"), + (0xA49, "X"), + (0xA4B, "V"), + (0xA4E, "X"), + (0xA51, "V"), + (0xA52, "X"), + (0xA59, "M", "ਖ਼"), + (0xA5A, "M", "ਗ਼"), + (0xA5B, "M", "ਜ਼"), + (0xA5C, "V"), + (0xA5D, "X"), + ] + + +def _seg_11() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xA5E, "M", "ਫ਼"), + (0xA5F, "X"), + (0xA66, "V"), + (0xA77, "X"), + (0xA81, "V"), + (0xA84, "X"), + (0xA85, "V"), + (0xA8E, "X"), + (0xA8F, "V"), + (0xA92, "X"), + (0xA93, "V"), + (0xAA9, "X"), + (0xAAA, "V"), + (0xAB1, "X"), + (0xAB2, "V"), + (0xAB4, "X"), + (0xAB5, "V"), + (0xABA, "X"), + (0xABC, "V"), + (0xAC6, "X"), + (0xAC7, "V"), + (0xACA, "X"), + (0xACB, "V"), + (0xACE, "X"), + (0xAD0, "V"), + (0xAD1, "X"), + (0xAE0, "V"), + (0xAE4, "X"), + (0xAE6, "V"), + (0xAF2, "X"), + (0xAF9, "V"), + (0xB00, "X"), + (0xB01, "V"), + (0xB04, "X"), + (0xB05, "V"), + (0xB0D, "X"), + (0xB0F, "V"), + (0xB11, "X"), + (0xB13, "V"), + (0xB29, "X"), + (0xB2A, "V"), + (0xB31, "X"), + (0xB32, "V"), + (0xB34, "X"), + (0xB35, "V"), + (0xB3A, "X"), + (0xB3C, "V"), + (0xB45, "X"), + (0xB47, "V"), + (0xB49, "X"), + (0xB4B, "V"), + (0xB4E, "X"), + (0xB55, "V"), + (0xB58, "X"), + (0xB5C, "M", "ଡ଼"), + (0xB5D, "M", "ଢ଼"), + (0xB5E, "X"), + (0xB5F, "V"), + (0xB64, "X"), + (0xB66, "V"), + (0xB78, "X"), + (0xB82, "V"), + (0xB84, "X"), + (0xB85, "V"), + (0xB8B, "X"), + (0xB8E, "V"), + (0xB91, "X"), + (0xB92, "V"), + (0xB96, "X"), + (0xB99, "V"), + (0xB9B, "X"), + (0xB9C, "V"), + (0xB9D, "X"), + (0xB9E, "V"), + (0xBA0, "X"), + (0xBA3, "V"), + (0xBA5, "X"), + (0xBA8, "V"), + (0xBAB, "X"), + (0xBAE, "V"), + (0xBBA, "X"), + (0xBBE, "V"), + (0xBC3, "X"), + (0xBC6, "V"), + (0xBC9, "X"), + (0xBCA, "V"), + (0xBCE, "X"), + (0xBD0, "V"), + (0xBD1, "X"), + (0xBD7, "V"), + (0xBD8, "X"), + (0xBE6, "V"), + (0xBFB, "X"), + (0xC00, "V"), + (0xC0D, "X"), + (0xC0E, "V"), + (0xC11, "X"), + (0xC12, "V"), + (0xC29, "X"), + (0xC2A, "V"), + ] + + +def _seg_12() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xC3A, "X"), + (0xC3C, "V"), + (0xC45, "X"), + (0xC46, "V"), + (0xC49, "X"), + (0xC4A, "V"), + (0xC4E, "X"), + (0xC55, "V"), + (0xC57, "X"), + (0xC58, "V"), + (0xC5B, "X"), + (0xC5D, "V"), + (0xC5E, "X"), + (0xC60, "V"), + (0xC64, "X"), + (0xC66, "V"), + (0xC70, "X"), + (0xC77, "V"), + (0xC8D, "X"), + (0xC8E, "V"), + (0xC91, "X"), + (0xC92, "V"), + (0xCA9, "X"), + (0xCAA, "V"), + (0xCB4, "X"), + (0xCB5, "V"), + (0xCBA, "X"), + (0xCBC, "V"), + (0xCC5, "X"), + (0xCC6, "V"), + (0xCC9, "X"), + (0xCCA, "V"), + (0xCCE, "X"), + (0xCD5, "V"), + (0xCD7, "X"), + (0xCDD, "V"), + (0xCDF, "X"), + (0xCE0, "V"), + (0xCE4, "X"), + (0xCE6, "V"), + (0xCF0, "X"), + (0xCF1, "V"), + (0xCF4, "X"), + (0xD00, "V"), + (0xD0D, "X"), + (0xD0E, "V"), + (0xD11, "X"), + (0xD12, "V"), + (0xD45, "X"), + (0xD46, "V"), + (0xD49, "X"), + (0xD4A, "V"), + (0xD50, "X"), + (0xD54, "V"), + (0xD64, "X"), + (0xD66, "V"), + (0xD80, "X"), + (0xD81, "V"), + (0xD84, "X"), + (0xD85, "V"), + (0xD97, "X"), + (0xD9A, "V"), + (0xDB2, "X"), + (0xDB3, "V"), + (0xDBC, "X"), + (0xDBD, "V"), + (0xDBE, "X"), + (0xDC0, "V"), + (0xDC7, "X"), + (0xDCA, "V"), + (0xDCB, "X"), + (0xDCF, "V"), + (0xDD5, "X"), + (0xDD6, "V"), + (0xDD7, "X"), + (0xDD8, "V"), + (0xDE0, "X"), + (0xDE6, "V"), + (0xDF0, "X"), + (0xDF2, "V"), + (0xDF5, "X"), + (0xE01, "V"), + (0xE33, "M", "ํา"), + (0xE34, "V"), + (0xE3B, "X"), + (0xE3F, "V"), + (0xE5C, "X"), + (0xE81, "V"), + (0xE83, "X"), + (0xE84, "V"), + (0xE85, "X"), + (0xE86, "V"), + (0xE8B, "X"), + (0xE8C, "V"), + (0xEA4, "X"), + (0xEA5, "V"), + (0xEA6, "X"), + (0xEA7, "V"), + (0xEB3, "M", "ໍາ"), + (0xEB4, "V"), + ] + + +def _seg_13() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xEBE, "X"), + (0xEC0, "V"), + (0xEC5, "X"), + (0xEC6, "V"), + (0xEC7, "X"), + (0xEC8, "V"), + (0xECF, "X"), + (0xED0, "V"), + (0xEDA, "X"), + (0xEDC, "M", "ຫນ"), + (0xEDD, "M", "ຫມ"), + (0xEDE, "V"), + (0xEE0, "X"), + (0xF00, "V"), + (0xF0C, "M", "་"), + (0xF0D, "V"), + (0xF43, "M", "གྷ"), + (0xF44, "V"), + (0xF48, "X"), + (0xF49, "V"), + (0xF4D, "M", "ཌྷ"), + (0xF4E, "V"), + (0xF52, "M", "དྷ"), + (0xF53, "V"), + (0xF57, "M", "བྷ"), + (0xF58, "V"), + (0xF5C, "M", "ཛྷ"), + (0xF5D, "V"), + (0xF69, "M", "ཀྵ"), + (0xF6A, "V"), + (0xF6D, "X"), + (0xF71, "V"), + (0xF73, "M", "ཱི"), + (0xF74, "V"), + (0xF75, "M", "ཱུ"), + (0xF76, "M", "ྲྀ"), + (0xF77, "M", "ྲཱྀ"), + (0xF78, "M", "ླྀ"), + (0xF79, "M", "ླཱྀ"), + (0xF7A, "V"), + (0xF81, "M", "ཱྀ"), + (0xF82, "V"), + (0xF93, "M", "ྒྷ"), + (0xF94, "V"), + (0xF98, "X"), + (0xF99, "V"), + (0xF9D, "M", "ྜྷ"), + (0xF9E, "V"), + (0xFA2, "M", "ྡྷ"), + (0xFA3, "V"), + (0xFA7, "M", "ྦྷ"), + (0xFA8, "V"), + (0xFAC, "M", "ྫྷ"), + (0xFAD, "V"), + (0xFB9, "M", "ྐྵ"), + (0xFBA, "V"), + (0xFBD, "X"), + (0xFBE, "V"), + (0xFCD, "X"), + (0xFCE, "V"), + (0xFDB, "X"), + (0x1000, "V"), + (0x10A0, "X"), + (0x10C7, "M", "ⴧ"), + (0x10C8, "X"), + (0x10CD, "M", "ⴭ"), + (0x10CE, "X"), + (0x10D0, "V"), + (0x10FC, "M", "ნ"), + (0x10FD, "V"), + (0x115F, "X"), + (0x1161, "V"), + (0x1249, "X"), + (0x124A, "V"), + (0x124E, "X"), + (0x1250, "V"), + (0x1257, "X"), + (0x1258, "V"), + (0x1259, "X"), + (0x125A, "V"), + (0x125E, "X"), + (0x1260, "V"), + (0x1289, "X"), + (0x128A, "V"), + (0x128E, "X"), + (0x1290, "V"), + (0x12B1, "X"), + (0x12B2, "V"), + (0x12B6, "X"), + (0x12B8, "V"), + (0x12BF, "X"), + (0x12C0, "V"), + (0x12C1, "X"), + (0x12C2, "V"), + (0x12C6, "X"), + (0x12C8, "V"), + (0x12D7, "X"), + (0x12D8, "V"), + (0x1311, "X"), + (0x1312, "V"), + ] + + +def _seg_14() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1316, "X"), + (0x1318, "V"), + (0x135B, "X"), + (0x135D, "V"), + (0x137D, "X"), + (0x1380, "V"), + (0x139A, "X"), + (0x13A0, "V"), + (0x13F6, "X"), + (0x13F8, "M", "Ᏸ"), + (0x13F9, "M", "Ᏹ"), + (0x13FA, "M", "Ᏺ"), + (0x13FB, "M", "Ᏻ"), + (0x13FC, "M", "Ᏼ"), + (0x13FD, "M", "Ᏽ"), + (0x13FE, "X"), + (0x1400, "V"), + (0x1680, "X"), + (0x1681, "V"), + (0x169D, "X"), + (0x16A0, "V"), + (0x16F9, "X"), + (0x1700, "V"), + (0x1716, "X"), + (0x171F, "V"), + (0x1737, "X"), + (0x1740, "V"), + (0x1754, "X"), + (0x1760, "V"), + (0x176D, "X"), + (0x176E, "V"), + (0x1771, "X"), + (0x1772, "V"), + (0x1774, "X"), + (0x1780, "V"), + (0x17B4, "X"), + (0x17B6, "V"), + (0x17DE, "X"), + (0x17E0, "V"), + (0x17EA, "X"), + (0x17F0, "V"), + (0x17FA, "X"), + (0x1800, "V"), + (0x1806, "X"), + (0x1807, "V"), + (0x180B, "I"), + (0x180E, "X"), + (0x180F, "I"), + (0x1810, "V"), + (0x181A, "X"), + (0x1820, "V"), + (0x1879, "X"), + (0x1880, "V"), + (0x18AB, "X"), + (0x18B0, "V"), + (0x18F6, "X"), + (0x1900, "V"), + (0x191F, "X"), + (0x1920, "V"), + (0x192C, "X"), + (0x1930, "V"), + (0x193C, "X"), + (0x1940, "V"), + (0x1941, "X"), + (0x1944, "V"), + (0x196E, "X"), + (0x1970, "V"), + (0x1975, "X"), + (0x1980, "V"), + (0x19AC, "X"), + (0x19B0, "V"), + (0x19CA, "X"), + (0x19D0, "V"), + (0x19DB, "X"), + (0x19DE, "V"), + (0x1A1C, "X"), + (0x1A1E, "V"), + (0x1A5F, "X"), + (0x1A60, "V"), + (0x1A7D, "X"), + (0x1A7F, "V"), + (0x1A8A, "X"), + (0x1A90, "V"), + (0x1A9A, "X"), + (0x1AA0, "V"), + (0x1AAE, "X"), + (0x1AB0, "V"), + (0x1ACF, "X"), + (0x1B00, "V"), + (0x1B4D, "X"), + (0x1B50, "V"), + (0x1B7F, "X"), + (0x1B80, "V"), + (0x1BF4, "X"), + (0x1BFC, "V"), + (0x1C38, "X"), + (0x1C3B, "V"), + (0x1C4A, "X"), + (0x1C4D, "V"), + (0x1C80, "M", "в"), + ] + + +def _seg_15() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1C81, "M", "д"), + (0x1C82, "M", "о"), + (0x1C83, "M", "с"), + (0x1C84, "M", "т"), + (0x1C86, "M", "ъ"), + (0x1C87, "M", "ѣ"), + (0x1C88, "M", "ꙋ"), + (0x1C89, "X"), + (0x1C90, "M", "ა"), + (0x1C91, "M", "ბ"), + (0x1C92, "M", "გ"), + (0x1C93, "M", "დ"), + (0x1C94, "M", "ე"), + (0x1C95, "M", "ვ"), + (0x1C96, "M", "ზ"), + (0x1C97, "M", "თ"), + (0x1C98, "M", "ი"), + (0x1C99, "M", "კ"), + (0x1C9A, "M", "ლ"), + (0x1C9B, "M", "მ"), + (0x1C9C, "M", "ნ"), + (0x1C9D, "M", "ო"), + (0x1C9E, "M", "პ"), + (0x1C9F, "M", "ჟ"), + (0x1CA0, "M", "რ"), + (0x1CA1, "M", "ს"), + (0x1CA2, "M", "ტ"), + (0x1CA3, "M", "უ"), + (0x1CA4, "M", "ფ"), + (0x1CA5, "M", "ქ"), + (0x1CA6, "M", "ღ"), + (0x1CA7, "M", "ყ"), + (0x1CA8, "M", "შ"), + (0x1CA9, "M", "ჩ"), + (0x1CAA, "M", "ც"), + (0x1CAB, "M", "ძ"), + (0x1CAC, "M", "წ"), + (0x1CAD, "M", "ჭ"), + (0x1CAE, "M", "ხ"), + (0x1CAF, "M", "ჯ"), + (0x1CB0, "M", "ჰ"), + (0x1CB1, "M", "ჱ"), + (0x1CB2, "M", "ჲ"), + (0x1CB3, "M", "ჳ"), + (0x1CB4, "M", "ჴ"), + (0x1CB5, "M", "ჵ"), + (0x1CB6, "M", "ჶ"), + (0x1CB7, "M", "ჷ"), + (0x1CB8, "M", "ჸ"), + (0x1CB9, "M", "ჹ"), + (0x1CBA, "M", "ჺ"), + (0x1CBB, "X"), + (0x1CBD, "M", "ჽ"), + (0x1CBE, "M", "ჾ"), + (0x1CBF, "M", "ჿ"), + (0x1CC0, "V"), + (0x1CC8, "X"), + (0x1CD0, "V"), + (0x1CFB, "X"), + (0x1D00, "V"), + (0x1D2C, "M", "a"), + (0x1D2D, "M", "æ"), + (0x1D2E, "M", "b"), + (0x1D2F, "V"), + (0x1D30, "M", "d"), + (0x1D31, "M", "e"), + (0x1D32, "M", "ǝ"), + (0x1D33, "M", "g"), + (0x1D34, "M", "h"), + (0x1D35, "M", "i"), + (0x1D36, "M", "j"), + (0x1D37, "M", "k"), + (0x1D38, "M", "l"), + (0x1D39, "M", "m"), + (0x1D3A, "M", "n"), + (0x1D3B, "V"), + (0x1D3C, "M", "o"), + (0x1D3D, "M", "ȣ"), + (0x1D3E, "M", "p"), + (0x1D3F, "M", "r"), + (0x1D40, "M", "t"), + (0x1D41, "M", "u"), + (0x1D42, "M", "w"), + (0x1D43, "M", "a"), + (0x1D44, "M", "ɐ"), + (0x1D45, "M", "ɑ"), + (0x1D46, "M", "ᴂ"), + (0x1D47, "M", "b"), + (0x1D48, "M", "d"), + (0x1D49, "M", "e"), + (0x1D4A, "M", "ə"), + (0x1D4B, "M", "ɛ"), + (0x1D4C, "M", "ɜ"), + (0x1D4D, "M", "g"), + (0x1D4E, "V"), + (0x1D4F, "M", "k"), + (0x1D50, "M", "m"), + (0x1D51, "M", "ŋ"), + (0x1D52, "M", "o"), + (0x1D53, "M", "ɔ"), + ] + + +def _seg_16() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D54, "M", "ᴖ"), + (0x1D55, "M", "ᴗ"), + (0x1D56, "M", "p"), + (0x1D57, "M", "t"), + (0x1D58, "M", "u"), + (0x1D59, "M", "ᴝ"), + (0x1D5A, "M", "ɯ"), + (0x1D5B, "M", "v"), + (0x1D5C, "M", "ᴥ"), + (0x1D5D, "M", "β"), + (0x1D5E, "M", "γ"), + (0x1D5F, "M", "δ"), + (0x1D60, "M", "φ"), + (0x1D61, "M", "χ"), + (0x1D62, "M", "i"), + (0x1D63, "M", "r"), + (0x1D64, "M", "u"), + (0x1D65, "M", "v"), + (0x1D66, "M", "β"), + (0x1D67, "M", "γ"), + (0x1D68, "M", "ρ"), + (0x1D69, "M", "φ"), + (0x1D6A, "M", "χ"), + (0x1D6B, "V"), + (0x1D78, "M", "н"), + (0x1D79, "V"), + (0x1D9B, "M", "ɒ"), + (0x1D9C, "M", "c"), + (0x1D9D, "M", "ɕ"), + (0x1D9E, "M", "ð"), + (0x1D9F, "M", "ɜ"), + (0x1DA0, "M", "f"), + (0x1DA1, "M", "ɟ"), + (0x1DA2, "M", "ɡ"), + (0x1DA3, "M", "ɥ"), + (0x1DA4, "M", "ɨ"), + (0x1DA5, "M", "ɩ"), + (0x1DA6, "M", "ɪ"), + (0x1DA7, "M", "ᵻ"), + (0x1DA8, "M", "ʝ"), + (0x1DA9, "M", "ɭ"), + (0x1DAA, "M", "ᶅ"), + (0x1DAB, "M", "ʟ"), + (0x1DAC, "M", "ɱ"), + (0x1DAD, "M", "ɰ"), + (0x1DAE, "M", "ɲ"), + (0x1DAF, "M", "ɳ"), + (0x1DB0, "M", "ɴ"), + (0x1DB1, "M", "ɵ"), + (0x1DB2, "M", "ɸ"), + (0x1DB3, "M", "ʂ"), + (0x1DB4, "M", "ʃ"), + (0x1DB5, "M", "ƫ"), + (0x1DB6, "M", "ʉ"), + (0x1DB7, "M", "ʊ"), + (0x1DB8, "M", "ᴜ"), + (0x1DB9, "M", "ʋ"), + (0x1DBA, "M", "ʌ"), + (0x1DBB, "M", "z"), + (0x1DBC, "M", "ʐ"), + (0x1DBD, "M", "ʑ"), + (0x1DBE, "M", "ʒ"), + (0x1DBF, "M", "θ"), + (0x1DC0, "V"), + (0x1E00, "M", "ḁ"), + (0x1E01, "V"), + (0x1E02, "M", "ḃ"), + (0x1E03, "V"), + (0x1E04, "M", "ḅ"), + (0x1E05, "V"), + (0x1E06, "M", "ḇ"), + (0x1E07, "V"), + (0x1E08, "M", "ḉ"), + (0x1E09, "V"), + (0x1E0A, "M", "ḋ"), + (0x1E0B, "V"), + (0x1E0C, "M", "ḍ"), + (0x1E0D, "V"), + (0x1E0E, "M", "ḏ"), + (0x1E0F, "V"), + (0x1E10, "M", "ḑ"), + (0x1E11, "V"), + (0x1E12, "M", "ḓ"), + (0x1E13, "V"), + (0x1E14, "M", "ḕ"), + (0x1E15, "V"), + (0x1E16, "M", "ḗ"), + (0x1E17, "V"), + (0x1E18, "M", "ḙ"), + (0x1E19, "V"), + (0x1E1A, "M", "ḛ"), + (0x1E1B, "V"), + (0x1E1C, "M", "ḝ"), + (0x1E1D, "V"), + (0x1E1E, "M", "ḟ"), + (0x1E1F, "V"), + (0x1E20, "M", "ḡ"), + (0x1E21, "V"), + (0x1E22, "M", "ḣ"), + (0x1E23, "V"), + ] + + +def _seg_17() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1E24, "M", "ḥ"), + (0x1E25, "V"), + (0x1E26, "M", "ḧ"), + (0x1E27, "V"), + (0x1E28, "M", "ḩ"), + (0x1E29, "V"), + (0x1E2A, "M", "ḫ"), + (0x1E2B, "V"), + (0x1E2C, "M", "ḭ"), + (0x1E2D, "V"), + (0x1E2E, "M", "ḯ"), + (0x1E2F, "V"), + (0x1E30, "M", "ḱ"), + (0x1E31, "V"), + (0x1E32, "M", "ḳ"), + (0x1E33, "V"), + (0x1E34, "M", "ḵ"), + (0x1E35, "V"), + (0x1E36, "M", "ḷ"), + (0x1E37, "V"), + (0x1E38, "M", "ḹ"), + (0x1E39, "V"), + (0x1E3A, "M", "ḻ"), + (0x1E3B, "V"), + (0x1E3C, "M", "ḽ"), + (0x1E3D, "V"), + (0x1E3E, "M", "ḿ"), + (0x1E3F, "V"), + (0x1E40, "M", "ṁ"), + (0x1E41, "V"), + (0x1E42, "M", "ṃ"), + (0x1E43, "V"), + (0x1E44, "M", "ṅ"), + (0x1E45, "V"), + (0x1E46, "M", "ṇ"), + (0x1E47, "V"), + (0x1E48, "M", "ṉ"), + (0x1E49, "V"), + (0x1E4A, "M", "ṋ"), + (0x1E4B, "V"), + (0x1E4C, "M", "ṍ"), + (0x1E4D, "V"), + (0x1E4E, "M", "ṏ"), + (0x1E4F, "V"), + (0x1E50, "M", "ṑ"), + (0x1E51, "V"), + (0x1E52, "M", "ṓ"), + (0x1E53, "V"), + (0x1E54, "M", "ṕ"), + (0x1E55, "V"), + (0x1E56, "M", "ṗ"), + (0x1E57, "V"), + (0x1E58, "M", "ṙ"), + (0x1E59, "V"), + (0x1E5A, "M", "ṛ"), + (0x1E5B, "V"), + (0x1E5C, "M", "ṝ"), + (0x1E5D, "V"), + (0x1E5E, "M", "ṟ"), + (0x1E5F, "V"), + (0x1E60, "M", "ṡ"), + (0x1E61, "V"), + (0x1E62, "M", "ṣ"), + (0x1E63, "V"), + (0x1E64, "M", "ṥ"), + (0x1E65, "V"), + (0x1E66, "M", "ṧ"), + (0x1E67, "V"), + (0x1E68, "M", "ṩ"), + (0x1E69, "V"), + (0x1E6A, "M", "ṫ"), + (0x1E6B, "V"), + (0x1E6C, "M", "ṭ"), + (0x1E6D, "V"), + (0x1E6E, "M", "ṯ"), + (0x1E6F, "V"), + (0x1E70, "M", "ṱ"), + (0x1E71, "V"), + (0x1E72, "M", "ṳ"), + (0x1E73, "V"), + (0x1E74, "M", "ṵ"), + (0x1E75, "V"), + (0x1E76, "M", "ṷ"), + (0x1E77, "V"), + (0x1E78, "M", "ṹ"), + (0x1E79, "V"), + (0x1E7A, "M", "ṻ"), + (0x1E7B, "V"), + (0x1E7C, "M", "ṽ"), + (0x1E7D, "V"), + (0x1E7E, "M", "ṿ"), + (0x1E7F, "V"), + (0x1E80, "M", "ẁ"), + (0x1E81, "V"), + (0x1E82, "M", "ẃ"), + (0x1E83, "V"), + (0x1E84, "M", "ẅ"), + (0x1E85, "V"), + (0x1E86, "M", "ẇ"), + (0x1E87, "V"), + ] + + +def _seg_18() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1E88, "M", "ẉ"), + (0x1E89, "V"), + (0x1E8A, "M", "ẋ"), + (0x1E8B, "V"), + (0x1E8C, "M", "ẍ"), + (0x1E8D, "V"), + (0x1E8E, "M", "ẏ"), + (0x1E8F, "V"), + (0x1E90, "M", "ẑ"), + (0x1E91, "V"), + (0x1E92, "M", "ẓ"), + (0x1E93, "V"), + (0x1E94, "M", "ẕ"), + (0x1E95, "V"), + (0x1E9A, "M", "aʾ"), + (0x1E9B, "M", "ṡ"), + (0x1E9C, "V"), + (0x1E9E, "M", "ß"), + (0x1E9F, "V"), + (0x1EA0, "M", "ạ"), + (0x1EA1, "V"), + (0x1EA2, "M", "ả"), + (0x1EA3, "V"), + (0x1EA4, "M", "ấ"), + (0x1EA5, "V"), + (0x1EA6, "M", "ầ"), + (0x1EA7, "V"), + (0x1EA8, "M", "ẩ"), + (0x1EA9, "V"), + (0x1EAA, "M", "ẫ"), + (0x1EAB, "V"), + (0x1EAC, "M", "ậ"), + (0x1EAD, "V"), + (0x1EAE, "M", "ắ"), + (0x1EAF, "V"), + (0x1EB0, "M", "ằ"), + (0x1EB1, "V"), + (0x1EB2, "M", "ẳ"), + (0x1EB3, "V"), + (0x1EB4, "M", "ẵ"), + (0x1EB5, "V"), + (0x1EB6, "M", "ặ"), + (0x1EB7, "V"), + (0x1EB8, "M", "ẹ"), + (0x1EB9, "V"), + (0x1EBA, "M", "ẻ"), + (0x1EBB, "V"), + (0x1EBC, "M", "ẽ"), + (0x1EBD, "V"), + (0x1EBE, "M", "ế"), + (0x1EBF, "V"), + (0x1EC0, "M", "ề"), + (0x1EC1, "V"), + (0x1EC2, "M", "ể"), + (0x1EC3, "V"), + (0x1EC4, "M", "ễ"), + (0x1EC5, "V"), + (0x1EC6, "M", "ệ"), + (0x1EC7, "V"), + (0x1EC8, "M", "ỉ"), + (0x1EC9, "V"), + (0x1ECA, "M", "ị"), + (0x1ECB, "V"), + (0x1ECC, "M", "ọ"), + (0x1ECD, "V"), + (0x1ECE, "M", "ỏ"), + (0x1ECF, "V"), + (0x1ED0, "M", "ố"), + (0x1ED1, "V"), + (0x1ED2, "M", "ồ"), + (0x1ED3, "V"), + (0x1ED4, "M", "ổ"), + (0x1ED5, "V"), + (0x1ED6, "M", "ỗ"), + (0x1ED7, "V"), + (0x1ED8, "M", "ộ"), + (0x1ED9, "V"), + (0x1EDA, "M", "ớ"), + (0x1EDB, "V"), + (0x1EDC, "M", "ờ"), + (0x1EDD, "V"), + (0x1EDE, "M", "ở"), + (0x1EDF, "V"), + (0x1EE0, "M", "ỡ"), + (0x1EE1, "V"), + (0x1EE2, "M", "ợ"), + (0x1EE3, "V"), + (0x1EE4, "M", "ụ"), + (0x1EE5, "V"), + (0x1EE6, "M", "ủ"), + (0x1EE7, "V"), + (0x1EE8, "M", "ứ"), + (0x1EE9, "V"), + (0x1EEA, "M", "ừ"), + (0x1EEB, "V"), + (0x1EEC, "M", "ử"), + (0x1EED, "V"), + (0x1EEE, "M", "ữ"), + (0x1EEF, "V"), + (0x1EF0, "M", "ự"), + ] + + +def _seg_19() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1EF1, "V"), + (0x1EF2, "M", "ỳ"), + (0x1EF3, "V"), + (0x1EF4, "M", "ỵ"), + (0x1EF5, "V"), + (0x1EF6, "M", "ỷ"), + (0x1EF7, "V"), + (0x1EF8, "M", "ỹ"), + (0x1EF9, "V"), + (0x1EFA, "M", "ỻ"), + (0x1EFB, "V"), + (0x1EFC, "M", "ỽ"), + (0x1EFD, "V"), + (0x1EFE, "M", "ỿ"), + (0x1EFF, "V"), + (0x1F08, "M", "ἀ"), + (0x1F09, "M", "ἁ"), + (0x1F0A, "M", "ἂ"), + (0x1F0B, "M", "ἃ"), + (0x1F0C, "M", "ἄ"), + (0x1F0D, "M", "ἅ"), + (0x1F0E, "M", "ἆ"), + (0x1F0F, "M", "ἇ"), + (0x1F10, "V"), + (0x1F16, "X"), + (0x1F18, "M", "ἐ"), + (0x1F19, "M", "ἑ"), + (0x1F1A, "M", "ἒ"), + (0x1F1B, "M", "ἓ"), + (0x1F1C, "M", "ἔ"), + (0x1F1D, "M", "ἕ"), + (0x1F1E, "X"), + (0x1F20, "V"), + (0x1F28, "M", "ἠ"), + (0x1F29, "M", "ἡ"), + (0x1F2A, "M", "ἢ"), + (0x1F2B, "M", "ἣ"), + (0x1F2C, "M", "ἤ"), + (0x1F2D, "M", "ἥ"), + (0x1F2E, "M", "ἦ"), + (0x1F2F, "M", "ἧ"), + (0x1F30, "V"), + (0x1F38, "M", "ἰ"), + (0x1F39, "M", "ἱ"), + (0x1F3A, "M", "ἲ"), + (0x1F3B, "M", "ἳ"), + (0x1F3C, "M", "ἴ"), + (0x1F3D, "M", "ἵ"), + (0x1F3E, "M", "ἶ"), + (0x1F3F, "M", "ἷ"), + (0x1F40, "V"), + (0x1F46, "X"), + (0x1F48, "M", "ὀ"), + (0x1F49, "M", "ὁ"), + (0x1F4A, "M", "ὂ"), + (0x1F4B, "M", "ὃ"), + (0x1F4C, "M", "ὄ"), + (0x1F4D, "M", "ὅ"), + (0x1F4E, "X"), + (0x1F50, "V"), + (0x1F58, "X"), + (0x1F59, "M", "ὑ"), + (0x1F5A, "X"), + (0x1F5B, "M", "ὓ"), + (0x1F5C, "X"), + (0x1F5D, "M", "ὕ"), + (0x1F5E, "X"), + (0x1F5F, "M", "ὗ"), + (0x1F60, "V"), + (0x1F68, "M", "ὠ"), + (0x1F69, "M", "ὡ"), + (0x1F6A, "M", "ὢ"), + (0x1F6B, "M", "ὣ"), + (0x1F6C, "M", "ὤ"), + (0x1F6D, "M", "ὥ"), + (0x1F6E, "M", "ὦ"), + (0x1F6F, "M", "ὧ"), + (0x1F70, "V"), + (0x1F71, "M", "ά"), + (0x1F72, "V"), + (0x1F73, "M", "έ"), + (0x1F74, "V"), + (0x1F75, "M", "ή"), + (0x1F76, "V"), + (0x1F77, "M", "ί"), + (0x1F78, "V"), + (0x1F79, "M", "ό"), + (0x1F7A, "V"), + (0x1F7B, "M", "ύ"), + (0x1F7C, "V"), + (0x1F7D, "M", "ώ"), + (0x1F7E, "X"), + (0x1F80, "M", "ἀι"), + (0x1F81, "M", "ἁι"), + (0x1F82, "M", "ἂι"), + (0x1F83, "M", "ἃι"), + (0x1F84, "M", "ἄι"), + (0x1F85, "M", "ἅι"), + (0x1F86, "M", "ἆι"), + (0x1F87, "M", "ἇι"), + ] + + +def _seg_20() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1F88, "M", "ἀι"), + (0x1F89, "M", "ἁι"), + (0x1F8A, "M", "ἂι"), + (0x1F8B, "M", "ἃι"), + (0x1F8C, "M", "ἄι"), + (0x1F8D, "M", "ἅι"), + (0x1F8E, "M", "ἆι"), + (0x1F8F, "M", "ἇι"), + (0x1F90, "M", "ἠι"), + (0x1F91, "M", "ἡι"), + (0x1F92, "M", "ἢι"), + (0x1F93, "M", "ἣι"), + (0x1F94, "M", "ἤι"), + (0x1F95, "M", "ἥι"), + (0x1F96, "M", "ἦι"), + (0x1F97, "M", "ἧι"), + (0x1F98, "M", "ἠι"), + (0x1F99, "M", "ἡι"), + (0x1F9A, "M", "ἢι"), + (0x1F9B, "M", "ἣι"), + (0x1F9C, "M", "ἤι"), + (0x1F9D, "M", "ἥι"), + (0x1F9E, "M", "ἦι"), + (0x1F9F, "M", "ἧι"), + (0x1FA0, "M", "ὠι"), + (0x1FA1, "M", "ὡι"), + (0x1FA2, "M", "ὢι"), + (0x1FA3, "M", "ὣι"), + (0x1FA4, "M", "ὤι"), + (0x1FA5, "M", "ὥι"), + (0x1FA6, "M", "ὦι"), + (0x1FA7, "M", "ὧι"), + (0x1FA8, "M", "ὠι"), + (0x1FA9, "M", "ὡι"), + (0x1FAA, "M", "ὢι"), + (0x1FAB, "M", "ὣι"), + (0x1FAC, "M", "ὤι"), + (0x1FAD, "M", "ὥι"), + (0x1FAE, "M", "ὦι"), + (0x1FAF, "M", "ὧι"), + (0x1FB0, "V"), + (0x1FB2, "M", "ὰι"), + (0x1FB3, "M", "αι"), + (0x1FB4, "M", "άι"), + (0x1FB5, "X"), + (0x1FB6, "V"), + (0x1FB7, "M", "ᾶι"), + (0x1FB8, "M", "ᾰ"), + (0x1FB9, "M", "ᾱ"), + (0x1FBA, "M", "ὰ"), + (0x1FBB, "M", "ά"), + (0x1FBC, "M", "αι"), + (0x1FBD, "3", " ̓"), + (0x1FBE, "M", "ι"), + (0x1FBF, "3", " ̓"), + (0x1FC0, "3", " ͂"), + (0x1FC1, "3", " ̈͂"), + (0x1FC2, "M", "ὴι"), + (0x1FC3, "M", "ηι"), + (0x1FC4, "M", "ήι"), + (0x1FC5, "X"), + (0x1FC6, "V"), + (0x1FC7, "M", "ῆι"), + (0x1FC8, "M", "ὲ"), + (0x1FC9, "M", "έ"), + (0x1FCA, "M", "ὴ"), + (0x1FCB, "M", "ή"), + (0x1FCC, "M", "ηι"), + (0x1FCD, "3", " ̓̀"), + (0x1FCE, "3", " ̓́"), + (0x1FCF, "3", " ̓͂"), + (0x1FD0, "V"), + (0x1FD3, "M", "ΐ"), + (0x1FD4, "X"), + (0x1FD6, "V"), + (0x1FD8, "M", "ῐ"), + (0x1FD9, "M", "ῑ"), + (0x1FDA, "M", "ὶ"), + (0x1FDB, "M", "ί"), + (0x1FDC, "X"), + (0x1FDD, "3", " ̔̀"), + (0x1FDE, "3", " ̔́"), + (0x1FDF, "3", " ̔͂"), + (0x1FE0, "V"), + (0x1FE3, "M", "ΰ"), + (0x1FE4, "V"), + (0x1FE8, "M", "ῠ"), + (0x1FE9, "M", "ῡ"), + (0x1FEA, "M", "ὺ"), + (0x1FEB, "M", "ύ"), + (0x1FEC, "M", "ῥ"), + (0x1FED, "3", " ̈̀"), + (0x1FEE, "3", " ̈́"), + (0x1FEF, "3", "`"), + (0x1FF0, "X"), + (0x1FF2, "M", "ὼι"), + (0x1FF3, "M", "ωι"), + (0x1FF4, "M", "ώι"), + (0x1FF5, "X"), + (0x1FF6, "V"), + ] + + +def _seg_21() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1FF7, "M", "ῶι"), + (0x1FF8, "M", "ὸ"), + (0x1FF9, "M", "ό"), + (0x1FFA, "M", "ὼ"), + (0x1FFB, "M", "ώ"), + (0x1FFC, "M", "ωι"), + (0x1FFD, "3", " ́"), + (0x1FFE, "3", " ̔"), + (0x1FFF, "X"), + (0x2000, "3", " "), + (0x200B, "I"), + (0x200C, "D", ""), + (0x200E, "X"), + (0x2010, "V"), + (0x2011, "M", "‐"), + (0x2012, "V"), + (0x2017, "3", " ̳"), + (0x2018, "V"), + (0x2024, "X"), + (0x2027, "V"), + (0x2028, "X"), + (0x202F, "3", " "), + (0x2030, "V"), + (0x2033, "M", "′′"), + (0x2034, "M", "′′′"), + (0x2035, "V"), + (0x2036, "M", "‵‵"), + (0x2037, "M", "‵‵‵"), + (0x2038, "V"), + (0x203C, "3", "!!"), + (0x203D, "V"), + (0x203E, "3", " ̅"), + (0x203F, "V"), + (0x2047, "3", "??"), + (0x2048, "3", "?!"), + (0x2049, "3", "!?"), + (0x204A, "V"), + (0x2057, "M", "′′′′"), + (0x2058, "V"), + (0x205F, "3", " "), + (0x2060, "I"), + (0x2061, "X"), + (0x2064, "I"), + (0x2065, "X"), + (0x2070, "M", "0"), + (0x2071, "M", "i"), + (0x2072, "X"), + (0x2074, "M", "4"), + (0x2075, "M", "5"), + (0x2076, "M", "6"), + (0x2077, "M", "7"), + (0x2078, "M", "8"), + (0x2079, "M", "9"), + (0x207A, "3", "+"), + (0x207B, "M", "−"), + (0x207C, "3", "="), + (0x207D, "3", "("), + (0x207E, "3", ")"), + (0x207F, "M", "n"), + (0x2080, "M", "0"), + (0x2081, "M", "1"), + (0x2082, "M", "2"), + (0x2083, "M", "3"), + (0x2084, "M", "4"), + (0x2085, "M", "5"), + (0x2086, "M", "6"), + (0x2087, "M", "7"), + (0x2088, "M", "8"), + (0x2089, "M", "9"), + (0x208A, "3", "+"), + (0x208B, "M", "−"), + (0x208C, "3", "="), + (0x208D, "3", "("), + (0x208E, "3", ")"), + (0x208F, "X"), + (0x2090, "M", "a"), + (0x2091, "M", "e"), + (0x2092, "M", "o"), + (0x2093, "M", "x"), + (0x2094, "M", "ə"), + (0x2095, "M", "h"), + (0x2096, "M", "k"), + (0x2097, "M", "l"), + (0x2098, "M", "m"), + (0x2099, "M", "n"), + (0x209A, "M", "p"), + (0x209B, "M", "s"), + (0x209C, "M", "t"), + (0x209D, "X"), + (0x20A0, "V"), + (0x20A8, "M", "rs"), + (0x20A9, "V"), + (0x20C1, "X"), + (0x20D0, "V"), + (0x20F1, "X"), + (0x2100, "3", "a/c"), + (0x2101, "3", "a/s"), + (0x2102, "M", "c"), + (0x2103, "M", "°c"), + (0x2104, "V"), + ] + + +def _seg_22() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2105, "3", "c/o"), + (0x2106, "3", "c/u"), + (0x2107, "M", "ɛ"), + (0x2108, "V"), + (0x2109, "M", "°f"), + (0x210A, "M", "g"), + (0x210B, "M", "h"), + (0x210F, "M", "ħ"), + (0x2110, "M", "i"), + (0x2112, "M", "l"), + (0x2114, "V"), + (0x2115, "M", "n"), + (0x2116, "M", "no"), + (0x2117, "V"), + (0x2119, "M", "p"), + (0x211A, "M", "q"), + (0x211B, "M", "r"), + (0x211E, "V"), + (0x2120, "M", "sm"), + (0x2121, "M", "tel"), + (0x2122, "M", "tm"), + (0x2123, "V"), + (0x2124, "M", "z"), + (0x2125, "V"), + (0x2126, "M", "ω"), + (0x2127, "V"), + (0x2128, "M", "z"), + (0x2129, "V"), + (0x212A, "M", "k"), + (0x212B, "M", "å"), + (0x212C, "M", "b"), + (0x212D, "M", "c"), + (0x212E, "V"), + (0x212F, "M", "e"), + (0x2131, "M", "f"), + (0x2132, "X"), + (0x2133, "M", "m"), + (0x2134, "M", "o"), + (0x2135, "M", "א"), + (0x2136, "M", "ב"), + (0x2137, "M", "ג"), + (0x2138, "M", "ד"), + (0x2139, "M", "i"), + (0x213A, "V"), + (0x213B, "M", "fax"), + (0x213C, "M", "π"), + (0x213D, "M", "γ"), + (0x213F, "M", "π"), + (0x2140, "M", "∑"), + (0x2141, "V"), + (0x2145, "M", "d"), + (0x2147, "M", "e"), + (0x2148, "M", "i"), + (0x2149, "M", "j"), + (0x214A, "V"), + (0x2150, "M", "1⁄7"), + (0x2151, "M", "1⁄9"), + (0x2152, "M", "1⁄10"), + (0x2153, "M", "1⁄3"), + (0x2154, "M", "2⁄3"), + (0x2155, "M", "1⁄5"), + (0x2156, "M", "2⁄5"), + (0x2157, "M", "3⁄5"), + (0x2158, "M", "4⁄5"), + (0x2159, "M", "1⁄6"), + (0x215A, "M", "5⁄6"), + (0x215B, "M", "1⁄8"), + (0x215C, "M", "3⁄8"), + (0x215D, "M", "5⁄8"), + (0x215E, "M", "7⁄8"), + (0x215F, "M", "1⁄"), + (0x2160, "M", "i"), + (0x2161, "M", "ii"), + (0x2162, "M", "iii"), + (0x2163, "M", "iv"), + (0x2164, "M", "v"), + (0x2165, "M", "vi"), + (0x2166, "M", "vii"), + (0x2167, "M", "viii"), + (0x2168, "M", "ix"), + (0x2169, "M", "x"), + (0x216A, "M", "xi"), + (0x216B, "M", "xii"), + (0x216C, "M", "l"), + (0x216D, "M", "c"), + (0x216E, "M", "d"), + (0x216F, "M", "m"), + (0x2170, "M", "i"), + (0x2171, "M", "ii"), + (0x2172, "M", "iii"), + (0x2173, "M", "iv"), + (0x2174, "M", "v"), + (0x2175, "M", "vi"), + (0x2176, "M", "vii"), + (0x2177, "M", "viii"), + (0x2178, "M", "ix"), + (0x2179, "M", "x"), + (0x217A, "M", "xi"), + (0x217B, "M", "xii"), + (0x217C, "M", "l"), + ] + + +def _seg_23() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x217D, "M", "c"), + (0x217E, "M", "d"), + (0x217F, "M", "m"), + (0x2180, "V"), + (0x2183, "X"), + (0x2184, "V"), + (0x2189, "M", "0⁄3"), + (0x218A, "V"), + (0x218C, "X"), + (0x2190, "V"), + (0x222C, "M", "∫∫"), + (0x222D, "M", "∫∫∫"), + (0x222E, "V"), + (0x222F, "M", "∮∮"), + (0x2230, "M", "∮∮∮"), + (0x2231, "V"), + (0x2329, "M", "〈"), + (0x232A, "M", "〉"), + (0x232B, "V"), + (0x2427, "X"), + (0x2440, "V"), + (0x244B, "X"), + (0x2460, "M", "1"), + (0x2461, "M", "2"), + (0x2462, "M", "3"), + (0x2463, "M", "4"), + (0x2464, "M", "5"), + (0x2465, "M", "6"), + (0x2466, "M", "7"), + (0x2467, "M", "8"), + (0x2468, "M", "9"), + (0x2469, "M", "10"), + (0x246A, "M", "11"), + (0x246B, "M", "12"), + (0x246C, "M", "13"), + (0x246D, "M", "14"), + (0x246E, "M", "15"), + (0x246F, "M", "16"), + (0x2470, "M", "17"), + (0x2471, "M", "18"), + (0x2472, "M", "19"), + (0x2473, "M", "20"), + (0x2474, "3", "(1)"), + (0x2475, "3", "(2)"), + (0x2476, "3", "(3)"), + (0x2477, "3", "(4)"), + (0x2478, "3", "(5)"), + (0x2479, "3", "(6)"), + (0x247A, "3", "(7)"), + (0x247B, "3", "(8)"), + (0x247C, "3", "(9)"), + (0x247D, "3", "(10)"), + (0x247E, "3", "(11)"), + (0x247F, "3", "(12)"), + (0x2480, "3", "(13)"), + (0x2481, "3", "(14)"), + (0x2482, "3", "(15)"), + (0x2483, "3", "(16)"), + (0x2484, "3", "(17)"), + (0x2485, "3", "(18)"), + (0x2486, "3", "(19)"), + (0x2487, "3", "(20)"), + (0x2488, "X"), + (0x249C, "3", "(a)"), + (0x249D, "3", "(b)"), + (0x249E, "3", "(c)"), + (0x249F, "3", "(d)"), + (0x24A0, "3", "(e)"), + (0x24A1, "3", "(f)"), + (0x24A2, "3", "(g)"), + (0x24A3, "3", "(h)"), + (0x24A4, "3", "(i)"), + (0x24A5, "3", "(j)"), + (0x24A6, "3", "(k)"), + (0x24A7, "3", "(l)"), + (0x24A8, "3", "(m)"), + (0x24A9, "3", "(n)"), + (0x24AA, "3", "(o)"), + (0x24AB, "3", "(p)"), + (0x24AC, "3", "(q)"), + (0x24AD, "3", "(r)"), + (0x24AE, "3", "(s)"), + (0x24AF, "3", "(t)"), + (0x24B0, "3", "(u)"), + (0x24B1, "3", "(v)"), + (0x24B2, "3", "(w)"), + (0x24B3, "3", "(x)"), + (0x24B4, "3", "(y)"), + (0x24B5, "3", "(z)"), + (0x24B6, "M", "a"), + (0x24B7, "M", "b"), + (0x24B8, "M", "c"), + (0x24B9, "M", "d"), + (0x24BA, "M", "e"), + (0x24BB, "M", "f"), + (0x24BC, "M", "g"), + (0x24BD, "M", "h"), + (0x24BE, "M", "i"), + (0x24BF, "M", "j"), + (0x24C0, "M", "k"), + ] + + +def _seg_24() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x24C1, "M", "l"), + (0x24C2, "M", "m"), + (0x24C3, "M", "n"), + (0x24C4, "M", "o"), + (0x24C5, "M", "p"), + (0x24C6, "M", "q"), + (0x24C7, "M", "r"), + (0x24C8, "M", "s"), + (0x24C9, "M", "t"), + (0x24CA, "M", "u"), + (0x24CB, "M", "v"), + (0x24CC, "M", "w"), + (0x24CD, "M", "x"), + (0x24CE, "M", "y"), + (0x24CF, "M", "z"), + (0x24D0, "M", "a"), + (0x24D1, "M", "b"), + (0x24D2, "M", "c"), + (0x24D3, "M", "d"), + (0x24D4, "M", "e"), + (0x24D5, "M", "f"), + (0x24D6, "M", "g"), + (0x24D7, "M", "h"), + (0x24D8, "M", "i"), + (0x24D9, "M", "j"), + (0x24DA, "M", "k"), + (0x24DB, "M", "l"), + (0x24DC, "M", "m"), + (0x24DD, "M", "n"), + (0x24DE, "M", "o"), + (0x24DF, "M", "p"), + (0x24E0, "M", "q"), + (0x24E1, "M", "r"), + (0x24E2, "M", "s"), + (0x24E3, "M", "t"), + (0x24E4, "M", "u"), + (0x24E5, "M", "v"), + (0x24E6, "M", "w"), + (0x24E7, "M", "x"), + (0x24E8, "M", "y"), + (0x24E9, "M", "z"), + (0x24EA, "M", "0"), + (0x24EB, "V"), + (0x2A0C, "M", "∫∫∫∫"), + (0x2A0D, "V"), + (0x2A74, "3", "::="), + (0x2A75, "3", "=="), + (0x2A76, "3", "==="), + (0x2A77, "V"), + (0x2ADC, "M", "⫝̸"), + (0x2ADD, "V"), + (0x2B74, "X"), + (0x2B76, "V"), + (0x2B96, "X"), + (0x2B97, "V"), + (0x2C00, "M", "ⰰ"), + (0x2C01, "M", "ⰱ"), + (0x2C02, "M", "ⰲ"), + (0x2C03, "M", "ⰳ"), + (0x2C04, "M", "ⰴ"), + (0x2C05, "M", "ⰵ"), + (0x2C06, "M", "ⰶ"), + (0x2C07, "M", "ⰷ"), + (0x2C08, "M", "ⰸ"), + (0x2C09, "M", "ⰹ"), + (0x2C0A, "M", "ⰺ"), + (0x2C0B, "M", "ⰻ"), + (0x2C0C, "M", "ⰼ"), + (0x2C0D, "M", "ⰽ"), + (0x2C0E, "M", "ⰾ"), + (0x2C0F, "M", "ⰿ"), + (0x2C10, "M", "ⱀ"), + (0x2C11, "M", "ⱁ"), + (0x2C12, "M", "ⱂ"), + (0x2C13, "M", "ⱃ"), + (0x2C14, "M", "ⱄ"), + (0x2C15, "M", "ⱅ"), + (0x2C16, "M", "ⱆ"), + (0x2C17, "M", "ⱇ"), + (0x2C18, "M", "ⱈ"), + (0x2C19, "M", "ⱉ"), + (0x2C1A, "M", "ⱊ"), + (0x2C1B, "M", "ⱋ"), + (0x2C1C, "M", "ⱌ"), + (0x2C1D, "M", "ⱍ"), + (0x2C1E, "M", "ⱎ"), + (0x2C1F, "M", "ⱏ"), + (0x2C20, "M", "ⱐ"), + (0x2C21, "M", "ⱑ"), + (0x2C22, "M", "ⱒ"), + (0x2C23, "M", "ⱓ"), + (0x2C24, "M", "ⱔ"), + (0x2C25, "M", "ⱕ"), + (0x2C26, "M", "ⱖ"), + (0x2C27, "M", "ⱗ"), + (0x2C28, "M", "ⱘ"), + (0x2C29, "M", "ⱙ"), + (0x2C2A, "M", "ⱚ"), + (0x2C2B, "M", "ⱛ"), + (0x2C2C, "M", "ⱜ"), + ] + + +def _seg_25() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2C2D, "M", "ⱝ"), + (0x2C2E, "M", "ⱞ"), + (0x2C2F, "M", "ⱟ"), + (0x2C30, "V"), + (0x2C60, "M", "ⱡ"), + (0x2C61, "V"), + (0x2C62, "M", "ɫ"), + (0x2C63, "M", "ᵽ"), + (0x2C64, "M", "ɽ"), + (0x2C65, "V"), + (0x2C67, "M", "ⱨ"), + (0x2C68, "V"), + (0x2C69, "M", "ⱪ"), + (0x2C6A, "V"), + (0x2C6B, "M", "ⱬ"), + (0x2C6C, "V"), + (0x2C6D, "M", "ɑ"), + (0x2C6E, "M", "ɱ"), + (0x2C6F, "M", "ɐ"), + (0x2C70, "M", "ɒ"), + (0x2C71, "V"), + (0x2C72, "M", "ⱳ"), + (0x2C73, "V"), + (0x2C75, "M", "ⱶ"), + (0x2C76, "V"), + (0x2C7C, "M", "j"), + (0x2C7D, "M", "v"), + (0x2C7E, "M", "ȿ"), + (0x2C7F, "M", "ɀ"), + (0x2C80, "M", "ⲁ"), + (0x2C81, "V"), + (0x2C82, "M", "ⲃ"), + (0x2C83, "V"), + (0x2C84, "M", "ⲅ"), + (0x2C85, "V"), + (0x2C86, "M", "ⲇ"), + (0x2C87, "V"), + (0x2C88, "M", "ⲉ"), + (0x2C89, "V"), + (0x2C8A, "M", "ⲋ"), + (0x2C8B, "V"), + (0x2C8C, "M", "ⲍ"), + (0x2C8D, "V"), + (0x2C8E, "M", "ⲏ"), + (0x2C8F, "V"), + (0x2C90, "M", "ⲑ"), + (0x2C91, "V"), + (0x2C92, "M", "ⲓ"), + (0x2C93, "V"), + (0x2C94, "M", "ⲕ"), + (0x2C95, "V"), + (0x2C96, "M", "ⲗ"), + (0x2C97, "V"), + (0x2C98, "M", "ⲙ"), + (0x2C99, "V"), + (0x2C9A, "M", "ⲛ"), + (0x2C9B, "V"), + (0x2C9C, "M", "ⲝ"), + (0x2C9D, "V"), + (0x2C9E, "M", "ⲟ"), + (0x2C9F, "V"), + (0x2CA0, "M", "ⲡ"), + (0x2CA1, "V"), + (0x2CA2, "M", "ⲣ"), + (0x2CA3, "V"), + (0x2CA4, "M", "ⲥ"), + (0x2CA5, "V"), + (0x2CA6, "M", "ⲧ"), + (0x2CA7, "V"), + (0x2CA8, "M", "ⲩ"), + (0x2CA9, "V"), + (0x2CAA, "M", "ⲫ"), + (0x2CAB, "V"), + (0x2CAC, "M", "ⲭ"), + (0x2CAD, "V"), + (0x2CAE, "M", "ⲯ"), + (0x2CAF, "V"), + (0x2CB0, "M", "ⲱ"), + (0x2CB1, "V"), + (0x2CB2, "M", "ⲳ"), + (0x2CB3, "V"), + (0x2CB4, "M", "ⲵ"), + (0x2CB5, "V"), + (0x2CB6, "M", "ⲷ"), + (0x2CB7, "V"), + (0x2CB8, "M", "ⲹ"), + (0x2CB9, "V"), + (0x2CBA, "M", "ⲻ"), + (0x2CBB, "V"), + (0x2CBC, "M", "ⲽ"), + (0x2CBD, "V"), + (0x2CBE, "M", "ⲿ"), + (0x2CBF, "V"), + (0x2CC0, "M", "ⳁ"), + (0x2CC1, "V"), + (0x2CC2, "M", "ⳃ"), + (0x2CC3, "V"), + (0x2CC4, "M", "ⳅ"), + (0x2CC5, "V"), + (0x2CC6, "M", "ⳇ"), + ] + + +def _seg_26() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2CC7, "V"), + (0x2CC8, "M", "ⳉ"), + (0x2CC9, "V"), + (0x2CCA, "M", "ⳋ"), + (0x2CCB, "V"), + (0x2CCC, "M", "ⳍ"), + (0x2CCD, "V"), + (0x2CCE, "M", "ⳏ"), + (0x2CCF, "V"), + (0x2CD0, "M", "ⳑ"), + (0x2CD1, "V"), + (0x2CD2, "M", "ⳓ"), + (0x2CD3, "V"), + (0x2CD4, "M", "ⳕ"), + (0x2CD5, "V"), + (0x2CD6, "M", "ⳗ"), + (0x2CD7, "V"), + (0x2CD8, "M", "ⳙ"), + (0x2CD9, "V"), + (0x2CDA, "M", "ⳛ"), + (0x2CDB, "V"), + (0x2CDC, "M", "ⳝ"), + (0x2CDD, "V"), + (0x2CDE, "M", "ⳟ"), + (0x2CDF, "V"), + (0x2CE0, "M", "ⳡ"), + (0x2CE1, "V"), + (0x2CE2, "M", "ⳣ"), + (0x2CE3, "V"), + (0x2CEB, "M", "ⳬ"), + (0x2CEC, "V"), + (0x2CED, "M", "ⳮ"), + (0x2CEE, "V"), + (0x2CF2, "M", "ⳳ"), + (0x2CF3, "V"), + (0x2CF4, "X"), + (0x2CF9, "V"), + (0x2D26, "X"), + (0x2D27, "V"), + (0x2D28, "X"), + (0x2D2D, "V"), + (0x2D2E, "X"), + (0x2D30, "V"), + (0x2D68, "X"), + (0x2D6F, "M", "ⵡ"), + (0x2D70, "V"), + (0x2D71, "X"), + (0x2D7F, "V"), + (0x2D97, "X"), + (0x2DA0, "V"), + (0x2DA7, "X"), + (0x2DA8, "V"), + (0x2DAF, "X"), + (0x2DB0, "V"), + (0x2DB7, "X"), + (0x2DB8, "V"), + (0x2DBF, "X"), + (0x2DC0, "V"), + (0x2DC7, "X"), + (0x2DC8, "V"), + (0x2DCF, "X"), + (0x2DD0, "V"), + (0x2DD7, "X"), + (0x2DD8, "V"), + (0x2DDF, "X"), + (0x2DE0, "V"), + (0x2E5E, "X"), + (0x2E80, "V"), + (0x2E9A, "X"), + (0x2E9B, "V"), + (0x2E9F, "M", "母"), + (0x2EA0, "V"), + (0x2EF3, "M", "龟"), + (0x2EF4, "X"), + (0x2F00, "M", "一"), + (0x2F01, "M", "丨"), + (0x2F02, "M", "丶"), + (0x2F03, "M", "丿"), + (0x2F04, "M", "乙"), + (0x2F05, "M", "亅"), + (0x2F06, "M", "二"), + (0x2F07, "M", "亠"), + (0x2F08, "M", "人"), + (0x2F09, "M", "儿"), + (0x2F0A, "M", "入"), + (0x2F0B, "M", "八"), + (0x2F0C, "M", "冂"), + (0x2F0D, "M", "冖"), + (0x2F0E, "M", "冫"), + (0x2F0F, "M", "几"), + (0x2F10, "M", "凵"), + (0x2F11, "M", "刀"), + (0x2F12, "M", "力"), + (0x2F13, "M", "勹"), + (0x2F14, "M", "匕"), + (0x2F15, "M", "匚"), + (0x2F16, "M", "匸"), + (0x2F17, "M", "十"), + (0x2F18, "M", "卜"), + (0x2F19, "M", "卩"), + ] + + +def _seg_27() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F1A, "M", "厂"), + (0x2F1B, "M", "厶"), + (0x2F1C, "M", "又"), + (0x2F1D, "M", "口"), + (0x2F1E, "M", "囗"), + (0x2F1F, "M", "土"), + (0x2F20, "M", "士"), + (0x2F21, "M", "夂"), + (0x2F22, "M", "夊"), + (0x2F23, "M", "夕"), + (0x2F24, "M", "大"), + (0x2F25, "M", "女"), + (0x2F26, "M", "子"), + (0x2F27, "M", "宀"), + (0x2F28, "M", "寸"), + (0x2F29, "M", "小"), + (0x2F2A, "M", "尢"), + (0x2F2B, "M", "尸"), + (0x2F2C, "M", "屮"), + (0x2F2D, "M", "山"), + (0x2F2E, "M", "巛"), + (0x2F2F, "M", "工"), + (0x2F30, "M", "己"), + (0x2F31, "M", "巾"), + (0x2F32, "M", "干"), + (0x2F33, "M", "幺"), + (0x2F34, "M", "广"), + (0x2F35, "M", "廴"), + (0x2F36, "M", "廾"), + (0x2F37, "M", "弋"), + (0x2F38, "M", "弓"), + (0x2F39, "M", "彐"), + (0x2F3A, "M", "彡"), + (0x2F3B, "M", "彳"), + (0x2F3C, "M", "心"), + (0x2F3D, "M", "戈"), + (0x2F3E, "M", "戶"), + (0x2F3F, "M", "手"), + (0x2F40, "M", "支"), + (0x2F41, "M", "攴"), + (0x2F42, "M", "文"), + (0x2F43, "M", "斗"), + (0x2F44, "M", "斤"), + (0x2F45, "M", "方"), + (0x2F46, "M", "无"), + (0x2F47, "M", "日"), + (0x2F48, "M", "曰"), + (0x2F49, "M", "月"), + (0x2F4A, "M", "木"), + (0x2F4B, "M", "欠"), + (0x2F4C, "M", "止"), + (0x2F4D, "M", "歹"), + (0x2F4E, "M", "殳"), + (0x2F4F, "M", "毋"), + (0x2F50, "M", "比"), + (0x2F51, "M", "毛"), + (0x2F52, "M", "氏"), + (0x2F53, "M", "气"), + (0x2F54, "M", "水"), + (0x2F55, "M", "火"), + (0x2F56, "M", "爪"), + (0x2F57, "M", "父"), + (0x2F58, "M", "爻"), + (0x2F59, "M", "爿"), + (0x2F5A, "M", "片"), + (0x2F5B, "M", "牙"), + (0x2F5C, "M", "牛"), + (0x2F5D, "M", "犬"), + (0x2F5E, "M", "玄"), + (0x2F5F, "M", "玉"), + (0x2F60, "M", "瓜"), + (0x2F61, "M", "瓦"), + (0x2F62, "M", "甘"), + (0x2F63, "M", "生"), + (0x2F64, "M", "用"), + (0x2F65, "M", "田"), + (0x2F66, "M", "疋"), + (0x2F67, "M", "疒"), + (0x2F68, "M", "癶"), + (0x2F69, "M", "白"), + (0x2F6A, "M", "皮"), + (0x2F6B, "M", "皿"), + (0x2F6C, "M", "目"), + (0x2F6D, "M", "矛"), + (0x2F6E, "M", "矢"), + (0x2F6F, "M", "石"), + (0x2F70, "M", "示"), + (0x2F71, "M", "禸"), + (0x2F72, "M", "禾"), + (0x2F73, "M", "穴"), + (0x2F74, "M", "立"), + (0x2F75, "M", "竹"), + (0x2F76, "M", "米"), + (0x2F77, "M", "糸"), + (0x2F78, "M", "缶"), + (0x2F79, "M", "网"), + (0x2F7A, "M", "羊"), + (0x2F7B, "M", "羽"), + (0x2F7C, "M", "老"), + (0x2F7D, "M", "而"), + ] + + +def _seg_28() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F7E, "M", "耒"), + (0x2F7F, "M", "耳"), + (0x2F80, "M", "聿"), + (0x2F81, "M", "肉"), + (0x2F82, "M", "臣"), + (0x2F83, "M", "自"), + (0x2F84, "M", "至"), + (0x2F85, "M", "臼"), + (0x2F86, "M", "舌"), + (0x2F87, "M", "舛"), + (0x2F88, "M", "舟"), + (0x2F89, "M", "艮"), + (0x2F8A, "M", "色"), + (0x2F8B, "M", "艸"), + (0x2F8C, "M", "虍"), + (0x2F8D, "M", "虫"), + (0x2F8E, "M", "血"), + (0x2F8F, "M", "行"), + (0x2F90, "M", "衣"), + (0x2F91, "M", "襾"), + (0x2F92, "M", "見"), + (0x2F93, "M", "角"), + (0x2F94, "M", "言"), + (0x2F95, "M", "谷"), + (0x2F96, "M", "豆"), + (0x2F97, "M", "豕"), + (0x2F98, "M", "豸"), + (0x2F99, "M", "貝"), + (0x2F9A, "M", "赤"), + (0x2F9B, "M", "走"), + (0x2F9C, "M", "足"), + (0x2F9D, "M", "身"), + (0x2F9E, "M", "車"), + (0x2F9F, "M", "辛"), + (0x2FA0, "M", "辰"), + (0x2FA1, "M", "辵"), + (0x2FA2, "M", "邑"), + (0x2FA3, "M", "酉"), + (0x2FA4, "M", "釆"), + (0x2FA5, "M", "里"), + (0x2FA6, "M", "金"), + (0x2FA7, "M", "長"), + (0x2FA8, "M", "門"), + (0x2FA9, "M", "阜"), + (0x2FAA, "M", "隶"), + (0x2FAB, "M", "隹"), + (0x2FAC, "M", "雨"), + (0x2FAD, "M", "靑"), + (0x2FAE, "M", "非"), + (0x2FAF, "M", "面"), + (0x2FB0, "M", "革"), + (0x2FB1, "M", "韋"), + (0x2FB2, "M", "韭"), + (0x2FB3, "M", "音"), + (0x2FB4, "M", "頁"), + (0x2FB5, "M", "風"), + (0x2FB6, "M", "飛"), + (0x2FB7, "M", "食"), + (0x2FB8, "M", "首"), + (0x2FB9, "M", "香"), + (0x2FBA, "M", "馬"), + (0x2FBB, "M", "骨"), + (0x2FBC, "M", "高"), + (0x2FBD, "M", "髟"), + (0x2FBE, "M", "鬥"), + (0x2FBF, "M", "鬯"), + (0x2FC0, "M", "鬲"), + (0x2FC1, "M", "鬼"), + (0x2FC2, "M", "魚"), + (0x2FC3, "M", "鳥"), + (0x2FC4, "M", "鹵"), + (0x2FC5, "M", "鹿"), + (0x2FC6, "M", "麥"), + (0x2FC7, "M", "麻"), + (0x2FC8, "M", "黃"), + (0x2FC9, "M", "黍"), + (0x2FCA, "M", "黑"), + (0x2FCB, "M", "黹"), + (0x2FCC, "M", "黽"), + (0x2FCD, "M", "鼎"), + (0x2FCE, "M", "鼓"), + (0x2FCF, "M", "鼠"), + (0x2FD0, "M", "鼻"), + (0x2FD1, "M", "齊"), + (0x2FD2, "M", "齒"), + (0x2FD3, "M", "龍"), + (0x2FD4, "M", "龜"), + (0x2FD5, "M", "龠"), + (0x2FD6, "X"), + (0x3000, "3", " "), + (0x3001, "V"), + (0x3002, "M", "."), + (0x3003, "V"), + (0x3036, "M", "〒"), + (0x3037, "V"), + (0x3038, "M", "十"), + (0x3039, "M", "卄"), + (0x303A, "M", "卅"), + (0x303B, "V"), + (0x3040, "X"), + ] + + +def _seg_29() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x3041, "V"), + (0x3097, "X"), + (0x3099, "V"), + (0x309B, "3", " ゙"), + (0x309C, "3", " ゚"), + (0x309D, "V"), + (0x309F, "M", "より"), + (0x30A0, "V"), + (0x30FF, "M", "コト"), + (0x3100, "X"), + (0x3105, "V"), + (0x3130, "X"), + (0x3131, "M", "ᄀ"), + (0x3132, "M", "ᄁ"), + (0x3133, "M", "ᆪ"), + (0x3134, "M", "ᄂ"), + (0x3135, "M", "ᆬ"), + (0x3136, "M", "ᆭ"), + (0x3137, "M", "ᄃ"), + (0x3138, "M", "ᄄ"), + (0x3139, "M", "ᄅ"), + (0x313A, "M", "ᆰ"), + (0x313B, "M", "ᆱ"), + (0x313C, "M", "ᆲ"), + (0x313D, "M", "ᆳ"), + (0x313E, "M", "ᆴ"), + (0x313F, "M", "ᆵ"), + (0x3140, "M", "ᄚ"), + (0x3141, "M", "ᄆ"), + (0x3142, "M", "ᄇ"), + (0x3143, "M", "ᄈ"), + (0x3144, "M", "ᄡ"), + (0x3145, "M", "ᄉ"), + (0x3146, "M", "ᄊ"), + (0x3147, "M", "ᄋ"), + (0x3148, "M", "ᄌ"), + (0x3149, "M", "ᄍ"), + (0x314A, "M", "ᄎ"), + (0x314B, "M", "ᄏ"), + (0x314C, "M", "ᄐ"), + (0x314D, "M", "ᄑ"), + (0x314E, "M", "ᄒ"), + (0x314F, "M", "ᅡ"), + (0x3150, "M", "ᅢ"), + (0x3151, "M", "ᅣ"), + (0x3152, "M", "ᅤ"), + (0x3153, "M", "ᅥ"), + (0x3154, "M", "ᅦ"), + (0x3155, "M", "ᅧ"), + (0x3156, "M", "ᅨ"), + (0x3157, "M", "ᅩ"), + (0x3158, "M", "ᅪ"), + (0x3159, "M", "ᅫ"), + (0x315A, "M", "ᅬ"), + (0x315B, "M", "ᅭ"), + (0x315C, "M", "ᅮ"), + (0x315D, "M", "ᅯ"), + (0x315E, "M", "ᅰ"), + (0x315F, "M", "ᅱ"), + (0x3160, "M", "ᅲ"), + (0x3161, "M", "ᅳ"), + (0x3162, "M", "ᅴ"), + (0x3163, "M", "ᅵ"), + (0x3164, "X"), + (0x3165, "M", "ᄔ"), + (0x3166, "M", "ᄕ"), + (0x3167, "M", "ᇇ"), + (0x3168, "M", "ᇈ"), + (0x3169, "M", "ᇌ"), + (0x316A, "M", "ᇎ"), + (0x316B, "M", "ᇓ"), + (0x316C, "M", "ᇗ"), + (0x316D, "M", "ᇙ"), + (0x316E, "M", "ᄜ"), + (0x316F, "M", "ᇝ"), + (0x3170, "M", "ᇟ"), + (0x3171, "M", "ᄝ"), + (0x3172, "M", "ᄞ"), + (0x3173, "M", "ᄠ"), + (0x3174, "M", "ᄢ"), + (0x3175, "M", "ᄣ"), + (0x3176, "M", "ᄧ"), + (0x3177, "M", "ᄩ"), + (0x3178, "M", "ᄫ"), + (0x3179, "M", "ᄬ"), + (0x317A, "M", "ᄭ"), + (0x317B, "M", "ᄮ"), + (0x317C, "M", "ᄯ"), + (0x317D, "M", "ᄲ"), + (0x317E, "M", "ᄶ"), + (0x317F, "M", "ᅀ"), + (0x3180, "M", "ᅇ"), + (0x3181, "M", "ᅌ"), + (0x3182, "M", "ᇱ"), + (0x3183, "M", "ᇲ"), + (0x3184, "M", "ᅗ"), + (0x3185, "M", "ᅘ"), + (0x3186, "M", "ᅙ"), + (0x3187, "M", "ᆄ"), + (0x3188, "M", "ᆅ"), + ] + + +def _seg_30() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x3189, "M", "ᆈ"), + (0x318A, "M", "ᆑ"), + (0x318B, "M", "ᆒ"), + (0x318C, "M", "ᆔ"), + (0x318D, "M", "ᆞ"), + (0x318E, "M", "ᆡ"), + (0x318F, "X"), + (0x3190, "V"), + (0x3192, "M", "一"), + (0x3193, "M", "二"), + (0x3194, "M", "三"), + (0x3195, "M", "四"), + (0x3196, "M", "上"), + (0x3197, "M", "中"), + (0x3198, "M", "下"), + (0x3199, "M", "甲"), + (0x319A, "M", "乙"), + (0x319B, "M", "丙"), + (0x319C, "M", "丁"), + (0x319D, "M", "天"), + (0x319E, "M", "地"), + (0x319F, "M", "人"), + (0x31A0, "V"), + (0x31E4, "X"), + (0x31F0, "V"), + (0x3200, "3", "(ᄀ)"), + (0x3201, "3", "(ᄂ)"), + (0x3202, "3", "(ᄃ)"), + (0x3203, "3", "(ᄅ)"), + (0x3204, "3", "(ᄆ)"), + (0x3205, "3", "(ᄇ)"), + (0x3206, "3", "(ᄉ)"), + (0x3207, "3", "(ᄋ)"), + (0x3208, "3", "(ᄌ)"), + (0x3209, "3", "(ᄎ)"), + (0x320A, "3", "(ᄏ)"), + (0x320B, "3", "(ᄐ)"), + (0x320C, "3", "(ᄑ)"), + (0x320D, "3", "(ᄒ)"), + (0x320E, "3", "(가)"), + (0x320F, "3", "(나)"), + (0x3210, "3", "(다)"), + (0x3211, "3", "(라)"), + (0x3212, "3", "(마)"), + (0x3213, "3", "(바)"), + (0x3214, "3", "(사)"), + (0x3215, "3", "(아)"), + (0x3216, "3", "(자)"), + (0x3217, "3", "(차)"), + (0x3218, "3", "(카)"), + (0x3219, "3", "(타)"), + (0x321A, "3", "(파)"), + (0x321B, "3", "(하)"), + (0x321C, "3", "(주)"), + (0x321D, "3", "(오전)"), + (0x321E, "3", "(오후)"), + (0x321F, "X"), + (0x3220, "3", "(一)"), + (0x3221, "3", "(二)"), + (0x3222, "3", "(三)"), + (0x3223, "3", "(四)"), + (0x3224, "3", "(五)"), + (0x3225, "3", "(六)"), + (0x3226, "3", "(七)"), + (0x3227, "3", "(八)"), + (0x3228, "3", "(九)"), + (0x3229, "3", "(十)"), + (0x322A, "3", "(月)"), + (0x322B, "3", "(火)"), + (0x322C, "3", "(水)"), + (0x322D, "3", "(木)"), + (0x322E, "3", "(金)"), + (0x322F, "3", "(土)"), + (0x3230, "3", "(日)"), + (0x3231, "3", "(株)"), + (0x3232, "3", "(有)"), + (0x3233, "3", "(社)"), + (0x3234, "3", "(名)"), + (0x3235, "3", "(特)"), + (0x3236, "3", "(財)"), + (0x3237, "3", "(祝)"), + (0x3238, "3", "(労)"), + (0x3239, "3", "(代)"), + (0x323A, "3", "(呼)"), + (0x323B, "3", "(学)"), + (0x323C, "3", "(監)"), + (0x323D, "3", "(企)"), + (0x323E, "3", "(資)"), + (0x323F, "3", "(協)"), + (0x3240, "3", "(祭)"), + (0x3241, "3", "(休)"), + (0x3242, "3", "(自)"), + (0x3243, "3", "(至)"), + (0x3244, "M", "問"), + (0x3245, "M", "幼"), + (0x3246, "M", "文"), + (0x3247, "M", "箏"), + (0x3248, "V"), + (0x3250, "M", "pte"), + (0x3251, "M", "21"), + ] + + +def _seg_31() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x3252, "M", "22"), + (0x3253, "M", "23"), + (0x3254, "M", "24"), + (0x3255, "M", "25"), + (0x3256, "M", "26"), + (0x3257, "M", "27"), + (0x3258, "M", "28"), + (0x3259, "M", "29"), + (0x325A, "M", "30"), + (0x325B, "M", "31"), + (0x325C, "M", "32"), + (0x325D, "M", "33"), + (0x325E, "M", "34"), + (0x325F, "M", "35"), + (0x3260, "M", "ᄀ"), + (0x3261, "M", "ᄂ"), + (0x3262, "M", "ᄃ"), + (0x3263, "M", "ᄅ"), + (0x3264, "M", "ᄆ"), + (0x3265, "M", "ᄇ"), + (0x3266, "M", "ᄉ"), + (0x3267, "M", "ᄋ"), + (0x3268, "M", "ᄌ"), + (0x3269, "M", "ᄎ"), + (0x326A, "M", "ᄏ"), + (0x326B, "M", "ᄐ"), + (0x326C, "M", "ᄑ"), + (0x326D, "M", "ᄒ"), + (0x326E, "M", "가"), + (0x326F, "M", "나"), + (0x3270, "M", "다"), + (0x3271, "M", "라"), + (0x3272, "M", "마"), + (0x3273, "M", "바"), + (0x3274, "M", "사"), + (0x3275, "M", "아"), + (0x3276, "M", "자"), + (0x3277, "M", "차"), + (0x3278, "M", "카"), + (0x3279, "M", "타"), + (0x327A, "M", "파"), + (0x327B, "M", "하"), + (0x327C, "M", "참고"), + (0x327D, "M", "주의"), + (0x327E, "M", "우"), + (0x327F, "V"), + (0x3280, "M", "一"), + (0x3281, "M", "二"), + (0x3282, "M", "三"), + (0x3283, "M", "四"), + (0x3284, "M", "五"), + (0x3285, "M", "六"), + (0x3286, "M", "七"), + (0x3287, "M", "八"), + (0x3288, "M", "九"), + (0x3289, "M", "十"), + (0x328A, "M", "月"), + (0x328B, "M", "火"), + (0x328C, "M", "水"), + (0x328D, "M", "木"), + (0x328E, "M", "金"), + (0x328F, "M", "土"), + (0x3290, "M", "日"), + (0x3291, "M", "株"), + (0x3292, "M", "有"), + (0x3293, "M", "社"), + (0x3294, "M", "名"), + (0x3295, "M", "特"), + (0x3296, "M", "財"), + (0x3297, "M", "祝"), + (0x3298, "M", "労"), + (0x3299, "M", "秘"), + (0x329A, "M", "男"), + (0x329B, "M", "女"), + (0x329C, "M", "適"), + (0x329D, "M", "優"), + (0x329E, "M", "印"), + (0x329F, "M", "注"), + (0x32A0, "M", "項"), + (0x32A1, "M", "休"), + (0x32A2, "M", "写"), + (0x32A3, "M", "正"), + (0x32A4, "M", "上"), + (0x32A5, "M", "中"), + (0x32A6, "M", "下"), + (0x32A7, "M", "左"), + (0x32A8, "M", "右"), + (0x32A9, "M", "医"), + (0x32AA, "M", "宗"), + (0x32AB, "M", "学"), + (0x32AC, "M", "監"), + (0x32AD, "M", "企"), + (0x32AE, "M", "資"), + (0x32AF, "M", "協"), + (0x32B0, "M", "夜"), + (0x32B1, "M", "36"), + (0x32B2, "M", "37"), + (0x32B3, "M", "38"), + (0x32B4, "M", "39"), + (0x32B5, "M", "40"), + ] + + +def _seg_32() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x32B6, "M", "41"), + (0x32B7, "M", "42"), + (0x32B8, "M", "43"), + (0x32B9, "M", "44"), + (0x32BA, "M", "45"), + (0x32BB, "M", "46"), + (0x32BC, "M", "47"), + (0x32BD, "M", "48"), + (0x32BE, "M", "49"), + (0x32BF, "M", "50"), + (0x32C0, "M", "1月"), + (0x32C1, "M", "2月"), + (0x32C2, "M", "3月"), + (0x32C3, "M", "4月"), + (0x32C4, "M", "5月"), + (0x32C5, "M", "6月"), + (0x32C6, "M", "7月"), + (0x32C7, "M", "8月"), + (0x32C8, "M", "9月"), + (0x32C9, "M", "10月"), + (0x32CA, "M", "11月"), + (0x32CB, "M", "12月"), + (0x32CC, "M", "hg"), + (0x32CD, "M", "erg"), + (0x32CE, "M", "ev"), + (0x32CF, "M", "ltd"), + (0x32D0, "M", "ア"), + (0x32D1, "M", "イ"), + (0x32D2, "M", "ウ"), + (0x32D3, "M", "エ"), + (0x32D4, "M", "オ"), + (0x32D5, "M", "カ"), + (0x32D6, "M", "キ"), + (0x32D7, "M", "ク"), + (0x32D8, "M", "ケ"), + (0x32D9, "M", "コ"), + (0x32DA, "M", "サ"), + (0x32DB, "M", "シ"), + (0x32DC, "M", "ス"), + (0x32DD, "M", "セ"), + (0x32DE, "M", "ソ"), + (0x32DF, "M", "タ"), + (0x32E0, "M", "チ"), + (0x32E1, "M", "ツ"), + (0x32E2, "M", "テ"), + (0x32E3, "M", "ト"), + (0x32E4, "M", "ナ"), + (0x32E5, "M", "ニ"), + (0x32E6, "M", "ヌ"), + (0x32E7, "M", "ネ"), + (0x32E8, "M", "ノ"), + (0x32E9, "M", "ハ"), + (0x32EA, "M", "ヒ"), + (0x32EB, "M", "フ"), + (0x32EC, "M", "ヘ"), + (0x32ED, "M", "ホ"), + (0x32EE, "M", "マ"), + (0x32EF, "M", "ミ"), + (0x32F0, "M", "ム"), + (0x32F1, "M", "メ"), + (0x32F2, "M", "モ"), + (0x32F3, "M", "ヤ"), + (0x32F4, "M", "ユ"), + (0x32F5, "M", "ヨ"), + (0x32F6, "M", "ラ"), + (0x32F7, "M", "リ"), + (0x32F8, "M", "ル"), + (0x32F9, "M", "レ"), + (0x32FA, "M", "ロ"), + (0x32FB, "M", "ワ"), + (0x32FC, "M", "ヰ"), + (0x32FD, "M", "ヱ"), + (0x32FE, "M", "ヲ"), + (0x32FF, "M", "令和"), + (0x3300, "M", "アパート"), + (0x3301, "M", "アルファ"), + (0x3302, "M", "アンペア"), + (0x3303, "M", "アール"), + (0x3304, "M", "イニング"), + (0x3305, "M", "インチ"), + (0x3306, "M", "ウォン"), + (0x3307, "M", "エスクード"), + (0x3308, "M", "エーカー"), + (0x3309, "M", "オンス"), + (0x330A, "M", "オーム"), + (0x330B, "M", "カイリ"), + (0x330C, "M", "カラット"), + (0x330D, "M", "カロリー"), + (0x330E, "M", "ガロン"), + (0x330F, "M", "ガンマ"), + (0x3310, "M", "ギガ"), + (0x3311, "M", "ギニー"), + (0x3312, "M", "キュリー"), + (0x3313, "M", "ギルダー"), + (0x3314, "M", "キロ"), + (0x3315, "M", "キログラム"), + (0x3316, "M", "キロメートル"), + (0x3317, "M", "キロワット"), + (0x3318, "M", "グラム"), + (0x3319, "M", "グラムトン"), + ] + + +def _seg_33() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x331A, "M", "クルゼイロ"), + (0x331B, "M", "クローネ"), + (0x331C, "M", "ケース"), + (0x331D, "M", "コルナ"), + (0x331E, "M", "コーポ"), + (0x331F, "M", "サイクル"), + (0x3320, "M", "サンチーム"), + (0x3321, "M", "シリング"), + (0x3322, "M", "センチ"), + (0x3323, "M", "セント"), + (0x3324, "M", "ダース"), + (0x3325, "M", "デシ"), + (0x3326, "M", "ドル"), + (0x3327, "M", "トン"), + (0x3328, "M", "ナノ"), + (0x3329, "M", "ノット"), + (0x332A, "M", "ハイツ"), + (0x332B, "M", "パーセント"), + (0x332C, "M", "パーツ"), + (0x332D, "M", "バーレル"), + (0x332E, "M", "ピアストル"), + (0x332F, "M", "ピクル"), + (0x3330, "M", "ピコ"), + (0x3331, "M", "ビル"), + (0x3332, "M", "ファラッド"), + (0x3333, "M", "フィート"), + (0x3334, "M", "ブッシェル"), + (0x3335, "M", "フラン"), + (0x3336, "M", "ヘクタール"), + (0x3337, "M", "ペソ"), + (0x3338, "M", "ペニヒ"), + (0x3339, "M", "ヘルツ"), + (0x333A, "M", "ペンス"), + (0x333B, "M", "ページ"), + (0x333C, "M", "ベータ"), + (0x333D, "M", "ポイント"), + (0x333E, "M", "ボルト"), + (0x333F, "M", "ホン"), + (0x3340, "M", "ポンド"), + (0x3341, "M", "ホール"), + (0x3342, "M", "ホーン"), + (0x3343, "M", "マイクロ"), + (0x3344, "M", "マイル"), + (0x3345, "M", "マッハ"), + (0x3346, "M", "マルク"), + (0x3347, "M", "マンション"), + (0x3348, "M", "ミクロン"), + (0x3349, "M", "ミリ"), + (0x334A, "M", "ミリバール"), + (0x334B, "M", "メガ"), + (0x334C, "M", "メガトン"), + (0x334D, "M", "メートル"), + (0x334E, "M", "ヤード"), + (0x334F, "M", "ヤール"), + (0x3350, "M", "ユアン"), + (0x3351, "M", "リットル"), + (0x3352, "M", "リラ"), + (0x3353, "M", "ルピー"), + (0x3354, "M", "ルーブル"), + (0x3355, "M", "レム"), + (0x3356, "M", "レントゲン"), + (0x3357, "M", "ワット"), + (0x3358, "M", "0点"), + (0x3359, "M", "1点"), + (0x335A, "M", "2点"), + (0x335B, "M", "3点"), + (0x335C, "M", "4点"), + (0x335D, "M", "5点"), + (0x335E, "M", "6点"), + (0x335F, "M", "7点"), + (0x3360, "M", "8点"), + (0x3361, "M", "9点"), + (0x3362, "M", "10点"), + (0x3363, "M", "11点"), + (0x3364, "M", "12点"), + (0x3365, "M", "13点"), + (0x3366, "M", "14点"), + (0x3367, "M", "15点"), + (0x3368, "M", "16点"), + (0x3369, "M", "17点"), + (0x336A, "M", "18点"), + (0x336B, "M", "19点"), + (0x336C, "M", "20点"), + (0x336D, "M", "21点"), + (0x336E, "M", "22点"), + (0x336F, "M", "23点"), + (0x3370, "M", "24点"), + (0x3371, "M", "hpa"), + (0x3372, "M", "da"), + (0x3373, "M", "au"), + (0x3374, "M", "bar"), + (0x3375, "M", "ov"), + (0x3376, "M", "pc"), + (0x3377, "M", "dm"), + (0x3378, "M", "dm2"), + (0x3379, "M", "dm3"), + (0x337A, "M", "iu"), + (0x337B, "M", "平成"), + (0x337C, "M", "昭和"), + (0x337D, "M", "大正"), + ] + + +def _seg_34() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x337E, "M", "明治"), + (0x337F, "M", "株式会社"), + (0x3380, "M", "pa"), + (0x3381, "M", "na"), + (0x3382, "M", "μa"), + (0x3383, "M", "ma"), + (0x3384, "M", "ka"), + (0x3385, "M", "kb"), + (0x3386, "M", "mb"), + (0x3387, "M", "gb"), + (0x3388, "M", "cal"), + (0x3389, "M", "kcal"), + (0x338A, "M", "pf"), + (0x338B, "M", "nf"), + (0x338C, "M", "μf"), + (0x338D, "M", "μg"), + (0x338E, "M", "mg"), + (0x338F, "M", "kg"), + (0x3390, "M", "hz"), + (0x3391, "M", "khz"), + (0x3392, "M", "mhz"), + (0x3393, "M", "ghz"), + (0x3394, "M", "thz"), + (0x3395, "M", "μl"), + (0x3396, "M", "ml"), + (0x3397, "M", "dl"), + (0x3398, "M", "kl"), + (0x3399, "M", "fm"), + (0x339A, "M", "nm"), + (0x339B, "M", "μm"), + (0x339C, "M", "mm"), + (0x339D, "M", "cm"), + (0x339E, "M", "km"), + (0x339F, "M", "mm2"), + (0x33A0, "M", "cm2"), + (0x33A1, "M", "m2"), + (0x33A2, "M", "km2"), + (0x33A3, "M", "mm3"), + (0x33A4, "M", "cm3"), + (0x33A5, "M", "m3"), + (0x33A6, "M", "km3"), + (0x33A7, "M", "m∕s"), + (0x33A8, "M", "m∕s2"), + (0x33A9, "M", "pa"), + (0x33AA, "M", "kpa"), + (0x33AB, "M", "mpa"), + (0x33AC, "M", "gpa"), + (0x33AD, "M", "rad"), + (0x33AE, "M", "rad∕s"), + (0x33AF, "M", "rad∕s2"), + (0x33B0, "M", "ps"), + (0x33B1, "M", "ns"), + (0x33B2, "M", "μs"), + (0x33B3, "M", "ms"), + (0x33B4, "M", "pv"), + (0x33B5, "M", "nv"), + (0x33B6, "M", "μv"), + (0x33B7, "M", "mv"), + (0x33B8, "M", "kv"), + (0x33B9, "M", "mv"), + (0x33BA, "M", "pw"), + (0x33BB, "M", "nw"), + (0x33BC, "M", "μw"), + (0x33BD, "M", "mw"), + (0x33BE, "M", "kw"), + (0x33BF, "M", "mw"), + (0x33C0, "M", "kω"), + (0x33C1, "M", "mω"), + (0x33C2, "X"), + (0x33C3, "M", "bq"), + (0x33C4, "M", "cc"), + (0x33C5, "M", "cd"), + (0x33C6, "M", "c∕kg"), + (0x33C7, "X"), + (0x33C8, "M", "db"), + (0x33C9, "M", "gy"), + (0x33CA, "M", "ha"), + (0x33CB, "M", "hp"), + (0x33CC, "M", "in"), + (0x33CD, "M", "kk"), + (0x33CE, "M", "km"), + (0x33CF, "M", "kt"), + (0x33D0, "M", "lm"), + (0x33D1, "M", "ln"), + (0x33D2, "M", "log"), + (0x33D3, "M", "lx"), + (0x33D4, "M", "mb"), + (0x33D5, "M", "mil"), + (0x33D6, "M", "mol"), + (0x33D7, "M", "ph"), + (0x33D8, "X"), + (0x33D9, "M", "ppm"), + (0x33DA, "M", "pr"), + (0x33DB, "M", "sr"), + (0x33DC, "M", "sv"), + (0x33DD, "M", "wb"), + (0x33DE, "M", "v∕m"), + (0x33DF, "M", "a∕m"), + (0x33E0, "M", "1日"), + (0x33E1, "M", "2日"), + ] + + +def _seg_35() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x33E2, "M", "3日"), + (0x33E3, "M", "4日"), + (0x33E4, "M", "5日"), + (0x33E5, "M", "6日"), + (0x33E6, "M", "7日"), + (0x33E7, "M", "8日"), + (0x33E8, "M", "9日"), + (0x33E9, "M", "10日"), + (0x33EA, "M", "11日"), + (0x33EB, "M", "12日"), + (0x33EC, "M", "13日"), + (0x33ED, "M", "14日"), + (0x33EE, "M", "15日"), + (0x33EF, "M", "16日"), + (0x33F0, "M", "17日"), + (0x33F1, "M", "18日"), + (0x33F2, "M", "19日"), + (0x33F3, "M", "20日"), + (0x33F4, "M", "21日"), + (0x33F5, "M", "22日"), + (0x33F6, "M", "23日"), + (0x33F7, "M", "24日"), + (0x33F8, "M", "25日"), + (0x33F9, "M", "26日"), + (0x33FA, "M", "27日"), + (0x33FB, "M", "28日"), + (0x33FC, "M", "29日"), + (0x33FD, "M", "30日"), + (0x33FE, "M", "31日"), + (0x33FF, "M", "gal"), + (0x3400, "V"), + (0xA48D, "X"), + (0xA490, "V"), + (0xA4C7, "X"), + (0xA4D0, "V"), + (0xA62C, "X"), + (0xA640, "M", "ꙁ"), + (0xA641, "V"), + (0xA642, "M", "ꙃ"), + (0xA643, "V"), + (0xA644, "M", "ꙅ"), + (0xA645, "V"), + (0xA646, "M", "ꙇ"), + (0xA647, "V"), + (0xA648, "M", "ꙉ"), + (0xA649, "V"), + (0xA64A, "M", "ꙋ"), + (0xA64B, "V"), + (0xA64C, "M", "ꙍ"), + (0xA64D, "V"), + (0xA64E, "M", "ꙏ"), + (0xA64F, "V"), + (0xA650, "M", "ꙑ"), + (0xA651, "V"), + (0xA652, "M", "ꙓ"), + (0xA653, "V"), + (0xA654, "M", "ꙕ"), + (0xA655, "V"), + (0xA656, "M", "ꙗ"), + (0xA657, "V"), + (0xA658, "M", "ꙙ"), + (0xA659, "V"), + (0xA65A, "M", "ꙛ"), + (0xA65B, "V"), + (0xA65C, "M", "ꙝ"), + (0xA65D, "V"), + (0xA65E, "M", "ꙟ"), + (0xA65F, "V"), + (0xA660, "M", "ꙡ"), + (0xA661, "V"), + (0xA662, "M", "ꙣ"), + (0xA663, "V"), + (0xA664, "M", "ꙥ"), + (0xA665, "V"), + (0xA666, "M", "ꙧ"), + (0xA667, "V"), + (0xA668, "M", "ꙩ"), + (0xA669, "V"), + (0xA66A, "M", "ꙫ"), + (0xA66B, "V"), + (0xA66C, "M", "ꙭ"), + (0xA66D, "V"), + (0xA680, "M", "ꚁ"), + (0xA681, "V"), + (0xA682, "M", "ꚃ"), + (0xA683, "V"), + (0xA684, "M", "ꚅ"), + (0xA685, "V"), + (0xA686, "M", "ꚇ"), + (0xA687, "V"), + (0xA688, "M", "ꚉ"), + (0xA689, "V"), + (0xA68A, "M", "ꚋ"), + (0xA68B, "V"), + (0xA68C, "M", "ꚍ"), + (0xA68D, "V"), + (0xA68E, "M", "ꚏ"), + (0xA68F, "V"), + (0xA690, "M", "ꚑ"), + (0xA691, "V"), + ] + + +def _seg_36() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xA692, "M", "ꚓ"), + (0xA693, "V"), + (0xA694, "M", "ꚕ"), + (0xA695, "V"), + (0xA696, "M", "ꚗ"), + (0xA697, "V"), + (0xA698, "M", "ꚙ"), + (0xA699, "V"), + (0xA69A, "M", "ꚛ"), + (0xA69B, "V"), + (0xA69C, "M", "ъ"), + (0xA69D, "M", "ь"), + (0xA69E, "V"), + (0xA6F8, "X"), + (0xA700, "V"), + (0xA722, "M", "ꜣ"), + (0xA723, "V"), + (0xA724, "M", "ꜥ"), + (0xA725, "V"), + (0xA726, "M", "ꜧ"), + (0xA727, "V"), + (0xA728, "M", "ꜩ"), + (0xA729, "V"), + (0xA72A, "M", "ꜫ"), + (0xA72B, "V"), + (0xA72C, "M", "ꜭ"), + (0xA72D, "V"), + (0xA72E, "M", "ꜯ"), + (0xA72F, "V"), + (0xA732, "M", "ꜳ"), + (0xA733, "V"), + (0xA734, "M", "ꜵ"), + (0xA735, "V"), + (0xA736, "M", "ꜷ"), + (0xA737, "V"), + (0xA738, "M", "ꜹ"), + (0xA739, "V"), + (0xA73A, "M", "ꜻ"), + (0xA73B, "V"), + (0xA73C, "M", "ꜽ"), + (0xA73D, "V"), + (0xA73E, "M", "ꜿ"), + (0xA73F, "V"), + (0xA740, "M", "ꝁ"), + (0xA741, "V"), + (0xA742, "M", "ꝃ"), + (0xA743, "V"), + (0xA744, "M", "ꝅ"), + (0xA745, "V"), + (0xA746, "M", "ꝇ"), + (0xA747, "V"), + (0xA748, "M", "ꝉ"), + (0xA749, "V"), + (0xA74A, "M", "ꝋ"), + (0xA74B, "V"), + (0xA74C, "M", "ꝍ"), + (0xA74D, "V"), + (0xA74E, "M", "ꝏ"), + (0xA74F, "V"), + (0xA750, "M", "ꝑ"), + (0xA751, "V"), + (0xA752, "M", "ꝓ"), + (0xA753, "V"), + (0xA754, "M", "ꝕ"), + (0xA755, "V"), + (0xA756, "M", "ꝗ"), + (0xA757, "V"), + (0xA758, "M", "ꝙ"), + (0xA759, "V"), + (0xA75A, "M", "ꝛ"), + (0xA75B, "V"), + (0xA75C, "M", "ꝝ"), + (0xA75D, "V"), + (0xA75E, "M", "ꝟ"), + (0xA75F, "V"), + (0xA760, "M", "ꝡ"), + (0xA761, "V"), + (0xA762, "M", "ꝣ"), + (0xA763, "V"), + (0xA764, "M", "ꝥ"), + (0xA765, "V"), + (0xA766, "M", "ꝧ"), + (0xA767, "V"), + (0xA768, "M", "ꝩ"), + (0xA769, "V"), + (0xA76A, "M", "ꝫ"), + (0xA76B, "V"), + (0xA76C, "M", "ꝭ"), + (0xA76D, "V"), + (0xA76E, "M", "ꝯ"), + (0xA76F, "V"), + (0xA770, "M", "ꝯ"), + (0xA771, "V"), + (0xA779, "M", "ꝺ"), + (0xA77A, "V"), + (0xA77B, "M", "ꝼ"), + (0xA77C, "V"), + (0xA77D, "M", "ᵹ"), + (0xA77E, "M", "ꝿ"), + (0xA77F, "V"), + ] + + +def _seg_37() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xA780, "M", "ꞁ"), + (0xA781, "V"), + (0xA782, "M", "ꞃ"), + (0xA783, "V"), + (0xA784, "M", "ꞅ"), + (0xA785, "V"), + (0xA786, "M", "ꞇ"), + (0xA787, "V"), + (0xA78B, "M", "ꞌ"), + (0xA78C, "V"), + (0xA78D, "M", "ɥ"), + (0xA78E, "V"), + (0xA790, "M", "ꞑ"), + (0xA791, "V"), + (0xA792, "M", "ꞓ"), + (0xA793, "V"), + (0xA796, "M", "ꞗ"), + (0xA797, "V"), + (0xA798, "M", "ꞙ"), + (0xA799, "V"), + (0xA79A, "M", "ꞛ"), + (0xA79B, "V"), + (0xA79C, "M", "ꞝ"), + (0xA79D, "V"), + (0xA79E, "M", "ꞟ"), + (0xA79F, "V"), + (0xA7A0, "M", "ꞡ"), + (0xA7A1, "V"), + (0xA7A2, "M", "ꞣ"), + (0xA7A3, "V"), + (0xA7A4, "M", "ꞥ"), + (0xA7A5, "V"), + (0xA7A6, "M", "ꞧ"), + (0xA7A7, "V"), + (0xA7A8, "M", "ꞩ"), + (0xA7A9, "V"), + (0xA7AA, "M", "ɦ"), + (0xA7AB, "M", "ɜ"), + (0xA7AC, "M", "ɡ"), + (0xA7AD, "M", "ɬ"), + (0xA7AE, "M", "ɪ"), + (0xA7AF, "V"), + (0xA7B0, "M", "ʞ"), + (0xA7B1, "M", "ʇ"), + (0xA7B2, "M", "ʝ"), + (0xA7B3, "M", "ꭓ"), + (0xA7B4, "M", "ꞵ"), + (0xA7B5, "V"), + (0xA7B6, "M", "ꞷ"), + (0xA7B7, "V"), + (0xA7B8, "M", "ꞹ"), + (0xA7B9, "V"), + (0xA7BA, "M", "ꞻ"), + (0xA7BB, "V"), + (0xA7BC, "M", "ꞽ"), + (0xA7BD, "V"), + (0xA7BE, "M", "ꞿ"), + (0xA7BF, "V"), + (0xA7C0, "M", "ꟁ"), + (0xA7C1, "V"), + (0xA7C2, "M", "ꟃ"), + (0xA7C3, "V"), + (0xA7C4, "M", "ꞔ"), + (0xA7C5, "M", "ʂ"), + (0xA7C6, "M", "ᶎ"), + (0xA7C7, "M", "ꟈ"), + (0xA7C8, "V"), + (0xA7C9, "M", "ꟊ"), + (0xA7CA, "V"), + (0xA7CB, "X"), + (0xA7D0, "M", "ꟑ"), + (0xA7D1, "V"), + (0xA7D2, "X"), + (0xA7D3, "V"), + (0xA7D4, "X"), + (0xA7D5, "V"), + (0xA7D6, "M", "ꟗ"), + (0xA7D7, "V"), + (0xA7D8, "M", "ꟙ"), + (0xA7D9, "V"), + (0xA7DA, "X"), + (0xA7F2, "M", "c"), + (0xA7F3, "M", "f"), + (0xA7F4, "M", "q"), + (0xA7F5, "M", "ꟶ"), + (0xA7F6, "V"), + (0xA7F8, "M", "ħ"), + (0xA7F9, "M", "œ"), + (0xA7FA, "V"), + (0xA82D, "X"), + (0xA830, "V"), + (0xA83A, "X"), + (0xA840, "V"), + (0xA878, "X"), + (0xA880, "V"), + (0xA8C6, "X"), + (0xA8CE, "V"), + (0xA8DA, "X"), + (0xA8E0, "V"), + (0xA954, "X"), + ] + + +def _seg_38() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xA95F, "V"), + (0xA97D, "X"), + (0xA980, "V"), + (0xA9CE, "X"), + (0xA9CF, "V"), + (0xA9DA, "X"), + (0xA9DE, "V"), + (0xA9FF, "X"), + (0xAA00, "V"), + (0xAA37, "X"), + (0xAA40, "V"), + (0xAA4E, "X"), + (0xAA50, "V"), + (0xAA5A, "X"), + (0xAA5C, "V"), + (0xAAC3, "X"), + (0xAADB, "V"), + (0xAAF7, "X"), + (0xAB01, "V"), + (0xAB07, "X"), + (0xAB09, "V"), + (0xAB0F, "X"), + (0xAB11, "V"), + (0xAB17, "X"), + (0xAB20, "V"), + (0xAB27, "X"), + (0xAB28, "V"), + (0xAB2F, "X"), + (0xAB30, "V"), + (0xAB5C, "M", "ꜧ"), + (0xAB5D, "M", "ꬷ"), + (0xAB5E, "M", "ɫ"), + (0xAB5F, "M", "ꭒ"), + (0xAB60, "V"), + (0xAB69, "M", "ʍ"), + (0xAB6A, "V"), + (0xAB6C, "X"), + (0xAB70, "M", "Ꭰ"), + (0xAB71, "M", "Ꭱ"), + (0xAB72, "M", "Ꭲ"), + (0xAB73, "M", "Ꭳ"), + (0xAB74, "M", "Ꭴ"), + (0xAB75, "M", "Ꭵ"), + (0xAB76, "M", "Ꭶ"), + (0xAB77, "M", "Ꭷ"), + (0xAB78, "M", "Ꭸ"), + (0xAB79, "M", "Ꭹ"), + (0xAB7A, "M", "Ꭺ"), + (0xAB7B, "M", "Ꭻ"), + (0xAB7C, "M", "Ꭼ"), + (0xAB7D, "M", "Ꭽ"), + (0xAB7E, "M", "Ꭾ"), + (0xAB7F, "M", "Ꭿ"), + (0xAB80, "M", "Ꮀ"), + (0xAB81, "M", "Ꮁ"), + (0xAB82, "M", "Ꮂ"), + (0xAB83, "M", "Ꮃ"), + (0xAB84, "M", "Ꮄ"), + (0xAB85, "M", "Ꮅ"), + (0xAB86, "M", "Ꮆ"), + (0xAB87, "M", "Ꮇ"), + (0xAB88, "M", "Ꮈ"), + (0xAB89, "M", "Ꮉ"), + (0xAB8A, "M", "Ꮊ"), + (0xAB8B, "M", "Ꮋ"), + (0xAB8C, "M", "Ꮌ"), + (0xAB8D, "M", "Ꮍ"), + (0xAB8E, "M", "Ꮎ"), + (0xAB8F, "M", "Ꮏ"), + (0xAB90, "M", "Ꮐ"), + (0xAB91, "M", "Ꮑ"), + (0xAB92, "M", "Ꮒ"), + (0xAB93, "M", "Ꮓ"), + (0xAB94, "M", "Ꮔ"), + (0xAB95, "M", "Ꮕ"), + (0xAB96, "M", "Ꮖ"), + (0xAB97, "M", "Ꮗ"), + (0xAB98, "M", "Ꮘ"), + (0xAB99, "M", "Ꮙ"), + (0xAB9A, "M", "Ꮚ"), + (0xAB9B, "M", "Ꮛ"), + (0xAB9C, "M", "Ꮜ"), + (0xAB9D, "M", "Ꮝ"), + (0xAB9E, "M", "Ꮞ"), + (0xAB9F, "M", "Ꮟ"), + (0xABA0, "M", "Ꮠ"), + (0xABA1, "M", "Ꮡ"), + (0xABA2, "M", "Ꮢ"), + (0xABA3, "M", "Ꮣ"), + (0xABA4, "M", "Ꮤ"), + (0xABA5, "M", "Ꮥ"), + (0xABA6, "M", "Ꮦ"), + (0xABA7, "M", "Ꮧ"), + (0xABA8, "M", "Ꮨ"), + (0xABA9, "M", "Ꮩ"), + (0xABAA, "M", "Ꮪ"), + (0xABAB, "M", "Ꮫ"), + (0xABAC, "M", "Ꮬ"), + (0xABAD, "M", "Ꮭ"), + (0xABAE, "M", "Ꮮ"), + ] + + +def _seg_39() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xABAF, "M", "Ꮯ"), + (0xABB0, "M", "Ꮰ"), + (0xABB1, "M", "Ꮱ"), + (0xABB2, "M", "Ꮲ"), + (0xABB3, "M", "Ꮳ"), + (0xABB4, "M", "Ꮴ"), + (0xABB5, "M", "Ꮵ"), + (0xABB6, "M", "Ꮶ"), + (0xABB7, "M", "Ꮷ"), + (0xABB8, "M", "Ꮸ"), + (0xABB9, "M", "Ꮹ"), + (0xABBA, "M", "Ꮺ"), + (0xABBB, "M", "Ꮻ"), + (0xABBC, "M", "Ꮼ"), + (0xABBD, "M", "Ꮽ"), + (0xABBE, "M", "Ꮾ"), + (0xABBF, "M", "Ꮿ"), + (0xABC0, "V"), + (0xABEE, "X"), + (0xABF0, "V"), + (0xABFA, "X"), + (0xAC00, "V"), + (0xD7A4, "X"), + (0xD7B0, "V"), + (0xD7C7, "X"), + (0xD7CB, "V"), + (0xD7FC, "X"), + (0xF900, "M", "豈"), + (0xF901, "M", "更"), + (0xF902, "M", "車"), + (0xF903, "M", "賈"), + (0xF904, "M", "滑"), + (0xF905, "M", "串"), + (0xF906, "M", "句"), + (0xF907, "M", "龜"), + (0xF909, "M", "契"), + (0xF90A, "M", "金"), + (0xF90B, "M", "喇"), + (0xF90C, "M", "奈"), + (0xF90D, "M", "懶"), + (0xF90E, "M", "癩"), + (0xF90F, "M", "羅"), + (0xF910, "M", "蘿"), + (0xF911, "M", "螺"), + (0xF912, "M", "裸"), + (0xF913, "M", "邏"), + (0xF914, "M", "樂"), + (0xF915, "M", "洛"), + (0xF916, "M", "烙"), + (0xF917, "M", "珞"), + (0xF918, "M", "落"), + (0xF919, "M", "酪"), + (0xF91A, "M", "駱"), + (0xF91B, "M", "亂"), + (0xF91C, "M", "卵"), + (0xF91D, "M", "欄"), + (0xF91E, "M", "爛"), + (0xF91F, "M", "蘭"), + (0xF920, "M", "鸞"), + (0xF921, "M", "嵐"), + (0xF922, "M", "濫"), + (0xF923, "M", "藍"), + (0xF924, "M", "襤"), + (0xF925, "M", "拉"), + (0xF926, "M", "臘"), + (0xF927, "M", "蠟"), + (0xF928, "M", "廊"), + (0xF929, "M", "朗"), + (0xF92A, "M", "浪"), + (0xF92B, "M", "狼"), + (0xF92C, "M", "郎"), + (0xF92D, "M", "來"), + (0xF92E, "M", "冷"), + (0xF92F, "M", "勞"), + (0xF930, "M", "擄"), + (0xF931, "M", "櫓"), + (0xF932, "M", "爐"), + (0xF933, "M", "盧"), + (0xF934, "M", "老"), + (0xF935, "M", "蘆"), + (0xF936, "M", "虜"), + (0xF937, "M", "路"), + (0xF938, "M", "露"), + (0xF939, "M", "魯"), + (0xF93A, "M", "鷺"), + (0xF93B, "M", "碌"), + (0xF93C, "M", "祿"), + (0xF93D, "M", "綠"), + (0xF93E, "M", "菉"), + (0xF93F, "M", "錄"), + (0xF940, "M", "鹿"), + (0xF941, "M", "論"), + (0xF942, "M", "壟"), + (0xF943, "M", "弄"), + (0xF944, "M", "籠"), + (0xF945, "M", "聾"), + (0xF946, "M", "牢"), + (0xF947, "M", "磊"), + (0xF948, "M", "賂"), + (0xF949, "M", "雷"), + ] + + +def _seg_40() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xF94A, "M", "壘"), + (0xF94B, "M", "屢"), + (0xF94C, "M", "樓"), + (0xF94D, "M", "淚"), + (0xF94E, "M", "漏"), + (0xF94F, "M", "累"), + (0xF950, "M", "縷"), + (0xF951, "M", "陋"), + (0xF952, "M", "勒"), + (0xF953, "M", "肋"), + (0xF954, "M", "凜"), + (0xF955, "M", "凌"), + (0xF956, "M", "稜"), + (0xF957, "M", "綾"), + (0xF958, "M", "菱"), + (0xF959, "M", "陵"), + (0xF95A, "M", "讀"), + (0xF95B, "M", "拏"), + (0xF95C, "M", "樂"), + (0xF95D, "M", "諾"), + (0xF95E, "M", "丹"), + (0xF95F, "M", "寧"), + (0xF960, "M", "怒"), + (0xF961, "M", "率"), + (0xF962, "M", "異"), + (0xF963, "M", "北"), + (0xF964, "M", "磻"), + (0xF965, "M", "便"), + (0xF966, "M", "復"), + (0xF967, "M", "不"), + (0xF968, "M", "泌"), + (0xF969, "M", "數"), + (0xF96A, "M", "索"), + (0xF96B, "M", "參"), + (0xF96C, "M", "塞"), + (0xF96D, "M", "省"), + (0xF96E, "M", "葉"), + (0xF96F, "M", "說"), + (0xF970, "M", "殺"), + (0xF971, "M", "辰"), + (0xF972, "M", "沈"), + (0xF973, "M", "拾"), + (0xF974, "M", "若"), + (0xF975, "M", "掠"), + (0xF976, "M", "略"), + (0xF977, "M", "亮"), + (0xF978, "M", "兩"), + (0xF979, "M", "凉"), + (0xF97A, "M", "梁"), + (0xF97B, "M", "糧"), + (0xF97C, "M", "良"), + (0xF97D, "M", "諒"), + (0xF97E, "M", "量"), + (0xF97F, "M", "勵"), + (0xF980, "M", "呂"), + (0xF981, "M", "女"), + (0xF982, "M", "廬"), + (0xF983, "M", "旅"), + (0xF984, "M", "濾"), + (0xF985, "M", "礪"), + (0xF986, "M", "閭"), + (0xF987, "M", "驪"), + (0xF988, "M", "麗"), + (0xF989, "M", "黎"), + (0xF98A, "M", "力"), + (0xF98B, "M", "曆"), + (0xF98C, "M", "歷"), + (0xF98D, "M", "轢"), + (0xF98E, "M", "年"), + (0xF98F, "M", "憐"), + (0xF990, "M", "戀"), + (0xF991, "M", "撚"), + (0xF992, "M", "漣"), + (0xF993, "M", "煉"), + (0xF994, "M", "璉"), + (0xF995, "M", "秊"), + (0xF996, "M", "練"), + (0xF997, "M", "聯"), + (0xF998, "M", "輦"), + (0xF999, "M", "蓮"), + (0xF99A, "M", "連"), + (0xF99B, "M", "鍊"), + (0xF99C, "M", "列"), + (0xF99D, "M", "劣"), + (0xF99E, "M", "咽"), + (0xF99F, "M", "烈"), + (0xF9A0, "M", "裂"), + (0xF9A1, "M", "說"), + (0xF9A2, "M", "廉"), + (0xF9A3, "M", "念"), + (0xF9A4, "M", "捻"), + (0xF9A5, "M", "殮"), + (0xF9A6, "M", "簾"), + (0xF9A7, "M", "獵"), + (0xF9A8, "M", "令"), + (0xF9A9, "M", "囹"), + (0xF9AA, "M", "寧"), + (0xF9AB, "M", "嶺"), + (0xF9AC, "M", "怜"), + (0xF9AD, "M", "玲"), + ] + + +def _seg_41() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xF9AE, "M", "瑩"), + (0xF9AF, "M", "羚"), + (0xF9B0, "M", "聆"), + (0xF9B1, "M", "鈴"), + (0xF9B2, "M", "零"), + (0xF9B3, "M", "靈"), + (0xF9B4, "M", "領"), + (0xF9B5, "M", "例"), + (0xF9B6, "M", "禮"), + (0xF9B7, "M", "醴"), + (0xF9B8, "M", "隸"), + (0xF9B9, "M", "惡"), + (0xF9BA, "M", "了"), + (0xF9BB, "M", "僚"), + (0xF9BC, "M", "寮"), + (0xF9BD, "M", "尿"), + (0xF9BE, "M", "料"), + (0xF9BF, "M", "樂"), + (0xF9C0, "M", "燎"), + (0xF9C1, "M", "療"), + (0xF9C2, "M", "蓼"), + (0xF9C3, "M", "遼"), + (0xF9C4, "M", "龍"), + (0xF9C5, "M", "暈"), + (0xF9C6, "M", "阮"), + (0xF9C7, "M", "劉"), + (0xF9C8, "M", "杻"), + (0xF9C9, "M", "柳"), + (0xF9CA, "M", "流"), + (0xF9CB, "M", "溜"), + (0xF9CC, "M", "琉"), + (0xF9CD, "M", "留"), + (0xF9CE, "M", "硫"), + (0xF9CF, "M", "紐"), + (0xF9D0, "M", "類"), + (0xF9D1, "M", "六"), + (0xF9D2, "M", "戮"), + (0xF9D3, "M", "陸"), + (0xF9D4, "M", "倫"), + (0xF9D5, "M", "崙"), + (0xF9D6, "M", "淪"), + (0xF9D7, "M", "輪"), + (0xF9D8, "M", "律"), + (0xF9D9, "M", "慄"), + (0xF9DA, "M", "栗"), + (0xF9DB, "M", "率"), + (0xF9DC, "M", "隆"), + (0xF9DD, "M", "利"), + (0xF9DE, "M", "吏"), + (0xF9DF, "M", "履"), + (0xF9E0, "M", "易"), + (0xF9E1, "M", "李"), + (0xF9E2, "M", "梨"), + (0xF9E3, "M", "泥"), + (0xF9E4, "M", "理"), + (0xF9E5, "M", "痢"), + (0xF9E6, "M", "罹"), + (0xF9E7, "M", "裏"), + (0xF9E8, "M", "裡"), + (0xF9E9, "M", "里"), + (0xF9EA, "M", "離"), + (0xF9EB, "M", "匿"), + (0xF9EC, "M", "溺"), + (0xF9ED, "M", "吝"), + (0xF9EE, "M", "燐"), + (0xF9EF, "M", "璘"), + (0xF9F0, "M", "藺"), + (0xF9F1, "M", "隣"), + (0xF9F2, "M", "鱗"), + (0xF9F3, "M", "麟"), + (0xF9F4, "M", "林"), + (0xF9F5, "M", "淋"), + (0xF9F6, "M", "臨"), + (0xF9F7, "M", "立"), + (0xF9F8, "M", "笠"), + (0xF9F9, "M", "粒"), + (0xF9FA, "M", "狀"), + (0xF9FB, "M", "炙"), + (0xF9FC, "M", "識"), + (0xF9FD, "M", "什"), + (0xF9FE, "M", "茶"), + (0xF9FF, "M", "刺"), + (0xFA00, "M", "切"), + (0xFA01, "M", "度"), + (0xFA02, "M", "拓"), + (0xFA03, "M", "糖"), + (0xFA04, "M", "宅"), + (0xFA05, "M", "洞"), + (0xFA06, "M", "暴"), + (0xFA07, "M", "輻"), + (0xFA08, "M", "行"), + (0xFA09, "M", "降"), + (0xFA0A, "M", "見"), + (0xFA0B, "M", "廓"), + (0xFA0C, "M", "兀"), + (0xFA0D, "M", "嗀"), + (0xFA0E, "V"), + (0xFA10, "M", "塚"), + (0xFA11, "V"), + (0xFA12, "M", "晴"), + ] + + +def _seg_42() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFA13, "V"), + (0xFA15, "M", "凞"), + (0xFA16, "M", "猪"), + (0xFA17, "M", "益"), + (0xFA18, "M", "礼"), + (0xFA19, "M", "神"), + (0xFA1A, "M", "祥"), + (0xFA1B, "M", "福"), + (0xFA1C, "M", "靖"), + (0xFA1D, "M", "精"), + (0xFA1E, "M", "羽"), + (0xFA1F, "V"), + (0xFA20, "M", "蘒"), + (0xFA21, "V"), + (0xFA22, "M", "諸"), + (0xFA23, "V"), + (0xFA25, "M", "逸"), + (0xFA26, "M", "都"), + (0xFA27, "V"), + (0xFA2A, "M", "飯"), + (0xFA2B, "M", "飼"), + (0xFA2C, "M", "館"), + (0xFA2D, "M", "鶴"), + (0xFA2E, "M", "郞"), + (0xFA2F, "M", "隷"), + (0xFA30, "M", "侮"), + (0xFA31, "M", "僧"), + (0xFA32, "M", "免"), + (0xFA33, "M", "勉"), + (0xFA34, "M", "勤"), + (0xFA35, "M", "卑"), + (0xFA36, "M", "喝"), + (0xFA37, "M", "嘆"), + (0xFA38, "M", "器"), + (0xFA39, "M", "塀"), + (0xFA3A, "M", "墨"), + (0xFA3B, "M", "層"), + (0xFA3C, "M", "屮"), + (0xFA3D, "M", "悔"), + (0xFA3E, "M", "慨"), + (0xFA3F, "M", "憎"), + (0xFA40, "M", "懲"), + (0xFA41, "M", "敏"), + (0xFA42, "M", "既"), + (0xFA43, "M", "暑"), + (0xFA44, "M", "梅"), + (0xFA45, "M", "海"), + (0xFA46, "M", "渚"), + (0xFA47, "M", "漢"), + (0xFA48, "M", "煮"), + (0xFA49, "M", "爫"), + (0xFA4A, "M", "琢"), + (0xFA4B, "M", "碑"), + (0xFA4C, "M", "社"), + (0xFA4D, "M", "祉"), + (0xFA4E, "M", "祈"), + (0xFA4F, "M", "祐"), + (0xFA50, "M", "祖"), + (0xFA51, "M", "祝"), + (0xFA52, "M", "禍"), + (0xFA53, "M", "禎"), + (0xFA54, "M", "穀"), + (0xFA55, "M", "突"), + (0xFA56, "M", "節"), + (0xFA57, "M", "練"), + (0xFA58, "M", "縉"), + (0xFA59, "M", "繁"), + (0xFA5A, "M", "署"), + (0xFA5B, "M", "者"), + (0xFA5C, "M", "臭"), + (0xFA5D, "M", "艹"), + (0xFA5F, "M", "著"), + (0xFA60, "M", "褐"), + (0xFA61, "M", "視"), + (0xFA62, "M", "謁"), + (0xFA63, "M", "謹"), + (0xFA64, "M", "賓"), + (0xFA65, "M", "贈"), + (0xFA66, "M", "辶"), + (0xFA67, "M", "逸"), + (0xFA68, "M", "難"), + (0xFA69, "M", "響"), + (0xFA6A, "M", "頻"), + (0xFA6B, "M", "恵"), + (0xFA6C, "M", "𤋮"), + (0xFA6D, "M", "舘"), + (0xFA6E, "X"), + (0xFA70, "M", "並"), + (0xFA71, "M", "况"), + (0xFA72, "M", "全"), + (0xFA73, "M", "侀"), + (0xFA74, "M", "充"), + (0xFA75, "M", "冀"), + (0xFA76, "M", "勇"), + (0xFA77, "M", "勺"), + (0xFA78, "M", "喝"), + (0xFA79, "M", "啕"), + (0xFA7A, "M", "喙"), + (0xFA7B, "M", "嗢"), + (0xFA7C, "M", "塚"), + ] + + +def _seg_43() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFA7D, "M", "墳"), + (0xFA7E, "M", "奄"), + (0xFA7F, "M", "奔"), + (0xFA80, "M", "婢"), + (0xFA81, "M", "嬨"), + (0xFA82, "M", "廒"), + (0xFA83, "M", "廙"), + (0xFA84, "M", "彩"), + (0xFA85, "M", "徭"), + (0xFA86, "M", "惘"), + (0xFA87, "M", "慎"), + (0xFA88, "M", "愈"), + (0xFA89, "M", "憎"), + (0xFA8A, "M", "慠"), + (0xFA8B, "M", "懲"), + (0xFA8C, "M", "戴"), + (0xFA8D, "M", "揄"), + (0xFA8E, "M", "搜"), + (0xFA8F, "M", "摒"), + (0xFA90, "M", "敖"), + (0xFA91, "M", "晴"), + (0xFA92, "M", "朗"), + (0xFA93, "M", "望"), + (0xFA94, "M", "杖"), + (0xFA95, "M", "歹"), + (0xFA96, "M", "殺"), + (0xFA97, "M", "流"), + (0xFA98, "M", "滛"), + (0xFA99, "M", "滋"), + (0xFA9A, "M", "漢"), + (0xFA9B, "M", "瀞"), + (0xFA9C, "M", "煮"), + (0xFA9D, "M", "瞧"), + (0xFA9E, "M", "爵"), + (0xFA9F, "M", "犯"), + (0xFAA0, "M", "猪"), + (0xFAA1, "M", "瑱"), + (0xFAA2, "M", "甆"), + (0xFAA3, "M", "画"), + (0xFAA4, "M", "瘝"), + (0xFAA5, "M", "瘟"), + (0xFAA6, "M", "益"), + (0xFAA7, "M", "盛"), + (0xFAA8, "M", "直"), + (0xFAA9, "M", "睊"), + (0xFAAA, "M", "着"), + (0xFAAB, "M", "磌"), + (0xFAAC, "M", "窱"), + (0xFAAD, "M", "節"), + (0xFAAE, "M", "类"), + (0xFAAF, "M", "絛"), + (0xFAB0, "M", "練"), + (0xFAB1, "M", "缾"), + (0xFAB2, "M", "者"), + (0xFAB3, "M", "荒"), + (0xFAB4, "M", "華"), + (0xFAB5, "M", "蝹"), + (0xFAB6, "M", "襁"), + (0xFAB7, "M", "覆"), + (0xFAB8, "M", "視"), + (0xFAB9, "M", "調"), + (0xFABA, "M", "諸"), + (0xFABB, "M", "請"), + (0xFABC, "M", "謁"), + (0xFABD, "M", "諾"), + (0xFABE, "M", "諭"), + (0xFABF, "M", "謹"), + (0xFAC0, "M", "變"), + (0xFAC1, "M", "贈"), + (0xFAC2, "M", "輸"), + (0xFAC3, "M", "遲"), + (0xFAC4, "M", "醙"), + (0xFAC5, "M", "鉶"), + (0xFAC6, "M", "陼"), + (0xFAC7, "M", "難"), + (0xFAC8, "M", "靖"), + (0xFAC9, "M", "韛"), + (0xFACA, "M", "響"), + (0xFACB, "M", "頋"), + (0xFACC, "M", "頻"), + (0xFACD, "M", "鬒"), + (0xFACE, "M", "龜"), + (0xFACF, "M", "𢡊"), + (0xFAD0, "M", "𢡄"), + (0xFAD1, "M", "𣏕"), + (0xFAD2, "M", "㮝"), + (0xFAD3, "M", "䀘"), + (0xFAD4, "M", "䀹"), + (0xFAD5, "M", "𥉉"), + (0xFAD6, "M", "𥳐"), + (0xFAD7, "M", "𧻓"), + (0xFAD8, "M", "齃"), + (0xFAD9, "M", "龎"), + (0xFADA, "X"), + (0xFB00, "M", "ff"), + (0xFB01, "M", "fi"), + (0xFB02, "M", "fl"), + (0xFB03, "M", "ffi"), + (0xFB04, "M", "ffl"), + (0xFB05, "M", "st"), + ] + + +def _seg_44() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFB07, "X"), + (0xFB13, "M", "մն"), + (0xFB14, "M", "մե"), + (0xFB15, "M", "մի"), + (0xFB16, "M", "վն"), + (0xFB17, "M", "մխ"), + (0xFB18, "X"), + (0xFB1D, "M", "יִ"), + (0xFB1E, "V"), + (0xFB1F, "M", "ײַ"), + (0xFB20, "M", "ע"), + (0xFB21, "M", "א"), + (0xFB22, "M", "ד"), + (0xFB23, "M", "ה"), + (0xFB24, "M", "כ"), + (0xFB25, "M", "ל"), + (0xFB26, "M", "ם"), + (0xFB27, "M", "ר"), + (0xFB28, "M", "ת"), + (0xFB29, "3", "+"), + (0xFB2A, "M", "שׁ"), + (0xFB2B, "M", "שׂ"), + (0xFB2C, "M", "שּׁ"), + (0xFB2D, "M", "שּׂ"), + (0xFB2E, "M", "אַ"), + (0xFB2F, "M", "אָ"), + (0xFB30, "M", "אּ"), + (0xFB31, "M", "בּ"), + (0xFB32, "M", "גּ"), + (0xFB33, "M", "דּ"), + (0xFB34, "M", "הּ"), + (0xFB35, "M", "וּ"), + (0xFB36, "M", "זּ"), + (0xFB37, "X"), + (0xFB38, "M", "טּ"), + (0xFB39, "M", "יּ"), + (0xFB3A, "M", "ךּ"), + (0xFB3B, "M", "כּ"), + (0xFB3C, "M", "לּ"), + (0xFB3D, "X"), + (0xFB3E, "M", "מּ"), + (0xFB3F, "X"), + (0xFB40, "M", "נּ"), + (0xFB41, "M", "סּ"), + (0xFB42, "X"), + (0xFB43, "M", "ףּ"), + (0xFB44, "M", "פּ"), + (0xFB45, "X"), + (0xFB46, "M", "צּ"), + (0xFB47, "M", "קּ"), + (0xFB48, "M", "רּ"), + (0xFB49, "M", "שּ"), + (0xFB4A, "M", "תּ"), + (0xFB4B, "M", "וֹ"), + (0xFB4C, "M", "בֿ"), + (0xFB4D, "M", "כֿ"), + (0xFB4E, "M", "פֿ"), + (0xFB4F, "M", "אל"), + (0xFB50, "M", "ٱ"), + (0xFB52, "M", "ٻ"), + (0xFB56, "M", "پ"), + (0xFB5A, "M", "ڀ"), + (0xFB5E, "M", "ٺ"), + (0xFB62, "M", "ٿ"), + (0xFB66, "M", "ٹ"), + (0xFB6A, "M", "ڤ"), + (0xFB6E, "M", "ڦ"), + (0xFB72, "M", "ڄ"), + (0xFB76, "M", "ڃ"), + (0xFB7A, "M", "چ"), + (0xFB7E, "M", "ڇ"), + (0xFB82, "M", "ڍ"), + (0xFB84, "M", "ڌ"), + (0xFB86, "M", "ڎ"), + (0xFB88, "M", "ڈ"), + (0xFB8A, "M", "ژ"), + (0xFB8C, "M", "ڑ"), + (0xFB8E, "M", "ک"), + (0xFB92, "M", "گ"), + (0xFB96, "M", "ڳ"), + (0xFB9A, "M", "ڱ"), + (0xFB9E, "M", "ں"), + (0xFBA0, "M", "ڻ"), + (0xFBA4, "M", "ۀ"), + (0xFBA6, "M", "ہ"), + (0xFBAA, "M", "ھ"), + (0xFBAE, "M", "ے"), + (0xFBB0, "M", "ۓ"), + (0xFBB2, "V"), + (0xFBC3, "X"), + (0xFBD3, "M", "ڭ"), + (0xFBD7, "M", "ۇ"), + (0xFBD9, "M", "ۆ"), + (0xFBDB, "M", "ۈ"), + (0xFBDD, "M", "ۇٴ"), + (0xFBDE, "M", "ۋ"), + (0xFBE0, "M", "ۅ"), + (0xFBE2, "M", "ۉ"), + (0xFBE4, "M", "ې"), + (0xFBE8, "M", "ى"), + ] + + +def _seg_45() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFBEA, "M", "ئا"), + (0xFBEC, "M", "ئە"), + (0xFBEE, "M", "ئو"), + (0xFBF0, "M", "ئۇ"), + (0xFBF2, "M", "ئۆ"), + (0xFBF4, "M", "ئۈ"), + (0xFBF6, "M", "ئې"), + (0xFBF9, "M", "ئى"), + (0xFBFC, "M", "ی"), + (0xFC00, "M", "ئج"), + (0xFC01, "M", "ئح"), + (0xFC02, "M", "ئم"), + (0xFC03, "M", "ئى"), + (0xFC04, "M", "ئي"), + (0xFC05, "M", "بج"), + (0xFC06, "M", "بح"), + (0xFC07, "M", "بخ"), + (0xFC08, "M", "بم"), + (0xFC09, "M", "بى"), + (0xFC0A, "M", "بي"), + (0xFC0B, "M", "تج"), + (0xFC0C, "M", "تح"), + (0xFC0D, "M", "تخ"), + (0xFC0E, "M", "تم"), + (0xFC0F, "M", "تى"), + (0xFC10, "M", "تي"), + (0xFC11, "M", "ثج"), + (0xFC12, "M", "ثم"), + (0xFC13, "M", "ثى"), + (0xFC14, "M", "ثي"), + (0xFC15, "M", "جح"), + (0xFC16, "M", "جم"), + (0xFC17, "M", "حج"), + (0xFC18, "M", "حم"), + (0xFC19, "M", "خج"), + (0xFC1A, "M", "خح"), + (0xFC1B, "M", "خم"), + (0xFC1C, "M", "سج"), + (0xFC1D, "M", "سح"), + (0xFC1E, "M", "سخ"), + (0xFC1F, "M", "سم"), + (0xFC20, "M", "صح"), + (0xFC21, "M", "صم"), + (0xFC22, "M", "ضج"), + (0xFC23, "M", "ضح"), + (0xFC24, "M", "ضخ"), + (0xFC25, "M", "ضم"), + (0xFC26, "M", "طح"), + (0xFC27, "M", "طم"), + (0xFC28, "M", "ظم"), + (0xFC29, "M", "عج"), + (0xFC2A, "M", "عم"), + (0xFC2B, "M", "غج"), + (0xFC2C, "M", "غم"), + (0xFC2D, "M", "فج"), + (0xFC2E, "M", "فح"), + (0xFC2F, "M", "فخ"), + (0xFC30, "M", "فم"), + (0xFC31, "M", "فى"), + (0xFC32, "M", "في"), + (0xFC33, "M", "قح"), + (0xFC34, "M", "قم"), + (0xFC35, "M", "قى"), + (0xFC36, "M", "قي"), + (0xFC37, "M", "كا"), + (0xFC38, "M", "كج"), + (0xFC39, "M", "كح"), + (0xFC3A, "M", "كخ"), + (0xFC3B, "M", "كل"), + (0xFC3C, "M", "كم"), + (0xFC3D, "M", "كى"), + (0xFC3E, "M", "كي"), + (0xFC3F, "M", "لج"), + (0xFC40, "M", "لح"), + (0xFC41, "M", "لخ"), + (0xFC42, "M", "لم"), + (0xFC43, "M", "لى"), + (0xFC44, "M", "لي"), + (0xFC45, "M", "مج"), + (0xFC46, "M", "مح"), + (0xFC47, "M", "مخ"), + (0xFC48, "M", "مم"), + (0xFC49, "M", "مى"), + (0xFC4A, "M", "مي"), + (0xFC4B, "M", "نج"), + (0xFC4C, "M", "نح"), + (0xFC4D, "M", "نخ"), + (0xFC4E, "M", "نم"), + (0xFC4F, "M", "نى"), + (0xFC50, "M", "ني"), + (0xFC51, "M", "هج"), + (0xFC52, "M", "هم"), + (0xFC53, "M", "هى"), + (0xFC54, "M", "هي"), + (0xFC55, "M", "يج"), + (0xFC56, "M", "يح"), + (0xFC57, "M", "يخ"), + (0xFC58, "M", "يم"), + (0xFC59, "M", "يى"), + (0xFC5A, "M", "يي"), + ] + + +def _seg_46() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFC5B, "M", "ذٰ"), + (0xFC5C, "M", "رٰ"), + (0xFC5D, "M", "ىٰ"), + (0xFC5E, "3", " ٌّ"), + (0xFC5F, "3", " ٍّ"), + (0xFC60, "3", " َّ"), + (0xFC61, "3", " ُّ"), + (0xFC62, "3", " ِّ"), + (0xFC63, "3", " ّٰ"), + (0xFC64, "M", "ئر"), + (0xFC65, "M", "ئز"), + (0xFC66, "M", "ئم"), + (0xFC67, "M", "ئن"), + (0xFC68, "M", "ئى"), + (0xFC69, "M", "ئي"), + (0xFC6A, "M", "بر"), + (0xFC6B, "M", "بز"), + (0xFC6C, "M", "بم"), + (0xFC6D, "M", "بن"), + (0xFC6E, "M", "بى"), + (0xFC6F, "M", "بي"), + (0xFC70, "M", "تر"), + (0xFC71, "M", "تز"), + (0xFC72, "M", "تم"), + (0xFC73, "M", "تن"), + (0xFC74, "M", "تى"), + (0xFC75, "M", "تي"), + (0xFC76, "M", "ثر"), + (0xFC77, "M", "ثز"), + (0xFC78, "M", "ثم"), + (0xFC79, "M", "ثن"), + (0xFC7A, "M", "ثى"), + (0xFC7B, "M", "ثي"), + (0xFC7C, "M", "فى"), + (0xFC7D, "M", "في"), + (0xFC7E, "M", "قى"), + (0xFC7F, "M", "قي"), + (0xFC80, "M", "كا"), + (0xFC81, "M", "كل"), + (0xFC82, "M", "كم"), + (0xFC83, "M", "كى"), + (0xFC84, "M", "كي"), + (0xFC85, "M", "لم"), + (0xFC86, "M", "لى"), + (0xFC87, "M", "لي"), + (0xFC88, "M", "ما"), + (0xFC89, "M", "مم"), + (0xFC8A, "M", "نر"), + (0xFC8B, "M", "نز"), + (0xFC8C, "M", "نم"), + (0xFC8D, "M", "نن"), + (0xFC8E, "M", "نى"), + (0xFC8F, "M", "ني"), + (0xFC90, "M", "ىٰ"), + (0xFC91, "M", "ير"), + (0xFC92, "M", "يز"), + (0xFC93, "M", "يم"), + (0xFC94, "M", "ين"), + (0xFC95, "M", "يى"), + (0xFC96, "M", "يي"), + (0xFC97, "M", "ئج"), + (0xFC98, "M", "ئح"), + (0xFC99, "M", "ئخ"), + (0xFC9A, "M", "ئم"), + (0xFC9B, "M", "ئه"), + (0xFC9C, "M", "بج"), + (0xFC9D, "M", "بح"), + (0xFC9E, "M", "بخ"), + (0xFC9F, "M", "بم"), + (0xFCA0, "M", "به"), + (0xFCA1, "M", "تج"), + (0xFCA2, "M", "تح"), + (0xFCA3, "M", "تخ"), + (0xFCA4, "M", "تم"), + (0xFCA5, "M", "ته"), + (0xFCA6, "M", "ثم"), + (0xFCA7, "M", "جح"), + (0xFCA8, "M", "جم"), + (0xFCA9, "M", "حج"), + (0xFCAA, "M", "حم"), + (0xFCAB, "M", "خج"), + (0xFCAC, "M", "خم"), + (0xFCAD, "M", "سج"), + (0xFCAE, "M", "سح"), + (0xFCAF, "M", "سخ"), + (0xFCB0, "M", "سم"), + (0xFCB1, "M", "صح"), + (0xFCB2, "M", "صخ"), + (0xFCB3, "M", "صم"), + (0xFCB4, "M", "ضج"), + (0xFCB5, "M", "ضح"), + (0xFCB6, "M", "ضخ"), + (0xFCB7, "M", "ضم"), + (0xFCB8, "M", "طح"), + (0xFCB9, "M", "ظم"), + (0xFCBA, "M", "عج"), + (0xFCBB, "M", "عم"), + (0xFCBC, "M", "غج"), + (0xFCBD, "M", "غم"), + (0xFCBE, "M", "فج"), + ] + + +def _seg_47() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFCBF, "M", "فح"), + (0xFCC0, "M", "فخ"), + (0xFCC1, "M", "فم"), + (0xFCC2, "M", "قح"), + (0xFCC3, "M", "قم"), + (0xFCC4, "M", "كج"), + (0xFCC5, "M", "كح"), + (0xFCC6, "M", "كخ"), + (0xFCC7, "M", "كل"), + (0xFCC8, "M", "كم"), + (0xFCC9, "M", "لج"), + (0xFCCA, "M", "لح"), + (0xFCCB, "M", "لخ"), + (0xFCCC, "M", "لم"), + (0xFCCD, "M", "له"), + (0xFCCE, "M", "مج"), + (0xFCCF, "M", "مح"), + (0xFCD0, "M", "مخ"), + (0xFCD1, "M", "مم"), + (0xFCD2, "M", "نج"), + (0xFCD3, "M", "نح"), + (0xFCD4, "M", "نخ"), + (0xFCD5, "M", "نم"), + (0xFCD6, "M", "نه"), + (0xFCD7, "M", "هج"), + (0xFCD8, "M", "هم"), + (0xFCD9, "M", "هٰ"), + (0xFCDA, "M", "يج"), + (0xFCDB, "M", "يح"), + (0xFCDC, "M", "يخ"), + (0xFCDD, "M", "يم"), + (0xFCDE, "M", "يه"), + (0xFCDF, "M", "ئم"), + (0xFCE0, "M", "ئه"), + (0xFCE1, "M", "بم"), + (0xFCE2, "M", "به"), + (0xFCE3, "M", "تم"), + (0xFCE4, "M", "ته"), + (0xFCE5, "M", "ثم"), + (0xFCE6, "M", "ثه"), + (0xFCE7, "M", "سم"), + (0xFCE8, "M", "سه"), + (0xFCE9, "M", "شم"), + (0xFCEA, "M", "شه"), + (0xFCEB, "M", "كل"), + (0xFCEC, "M", "كم"), + (0xFCED, "M", "لم"), + (0xFCEE, "M", "نم"), + (0xFCEF, "M", "نه"), + (0xFCF0, "M", "يم"), + (0xFCF1, "M", "يه"), + (0xFCF2, "M", "ـَّ"), + (0xFCF3, "M", "ـُّ"), + (0xFCF4, "M", "ـِّ"), + (0xFCF5, "M", "طى"), + (0xFCF6, "M", "طي"), + (0xFCF7, "M", "عى"), + (0xFCF8, "M", "عي"), + (0xFCF9, "M", "غى"), + (0xFCFA, "M", "غي"), + (0xFCFB, "M", "سى"), + (0xFCFC, "M", "سي"), + (0xFCFD, "M", "شى"), + (0xFCFE, "M", "شي"), + (0xFCFF, "M", "حى"), + (0xFD00, "M", "حي"), + (0xFD01, "M", "جى"), + (0xFD02, "M", "جي"), + (0xFD03, "M", "خى"), + (0xFD04, "M", "خي"), + (0xFD05, "M", "صى"), + (0xFD06, "M", "صي"), + (0xFD07, "M", "ضى"), + (0xFD08, "M", "ضي"), + (0xFD09, "M", "شج"), + (0xFD0A, "M", "شح"), + (0xFD0B, "M", "شخ"), + (0xFD0C, "M", "شم"), + (0xFD0D, "M", "شر"), + (0xFD0E, "M", "سر"), + (0xFD0F, "M", "صر"), + (0xFD10, "M", "ضر"), + (0xFD11, "M", "طى"), + (0xFD12, "M", "طي"), + (0xFD13, "M", "عى"), + (0xFD14, "M", "عي"), + (0xFD15, "M", "غى"), + (0xFD16, "M", "غي"), + (0xFD17, "M", "سى"), + (0xFD18, "M", "سي"), + (0xFD19, "M", "شى"), + (0xFD1A, "M", "شي"), + (0xFD1B, "M", "حى"), + (0xFD1C, "M", "حي"), + (0xFD1D, "M", "جى"), + (0xFD1E, "M", "جي"), + (0xFD1F, "M", "خى"), + (0xFD20, "M", "خي"), + (0xFD21, "M", "صى"), + (0xFD22, "M", "صي"), + ] + + +def _seg_48() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFD23, "M", "ضى"), + (0xFD24, "M", "ضي"), + (0xFD25, "M", "شج"), + (0xFD26, "M", "شح"), + (0xFD27, "M", "شخ"), + (0xFD28, "M", "شم"), + (0xFD29, "M", "شر"), + (0xFD2A, "M", "سر"), + (0xFD2B, "M", "صر"), + (0xFD2C, "M", "ضر"), + (0xFD2D, "M", "شج"), + (0xFD2E, "M", "شح"), + (0xFD2F, "M", "شخ"), + (0xFD30, "M", "شم"), + (0xFD31, "M", "سه"), + (0xFD32, "M", "شه"), + (0xFD33, "M", "طم"), + (0xFD34, "M", "سج"), + (0xFD35, "M", "سح"), + (0xFD36, "M", "سخ"), + (0xFD37, "M", "شج"), + (0xFD38, "M", "شح"), + (0xFD39, "M", "شخ"), + (0xFD3A, "M", "طم"), + (0xFD3B, "M", "ظم"), + (0xFD3C, "M", "اً"), + (0xFD3E, "V"), + (0xFD50, "M", "تجم"), + (0xFD51, "M", "تحج"), + (0xFD53, "M", "تحم"), + (0xFD54, "M", "تخم"), + (0xFD55, "M", "تمج"), + (0xFD56, "M", "تمح"), + (0xFD57, "M", "تمخ"), + (0xFD58, "M", "جمح"), + (0xFD5A, "M", "حمي"), + (0xFD5B, "M", "حمى"), + (0xFD5C, "M", "سحج"), + (0xFD5D, "M", "سجح"), + (0xFD5E, "M", "سجى"), + (0xFD5F, "M", "سمح"), + (0xFD61, "M", "سمج"), + (0xFD62, "M", "سمم"), + (0xFD64, "M", "صحح"), + (0xFD66, "M", "صمم"), + (0xFD67, "M", "شحم"), + (0xFD69, "M", "شجي"), + (0xFD6A, "M", "شمخ"), + (0xFD6C, "M", "شمم"), + (0xFD6E, "M", "ضحى"), + (0xFD6F, "M", "ضخم"), + (0xFD71, "M", "طمح"), + (0xFD73, "M", "طمم"), + (0xFD74, "M", "طمي"), + (0xFD75, "M", "عجم"), + (0xFD76, "M", "عمم"), + (0xFD78, "M", "عمى"), + (0xFD79, "M", "غمم"), + (0xFD7A, "M", "غمي"), + (0xFD7B, "M", "غمى"), + (0xFD7C, "M", "فخم"), + (0xFD7E, "M", "قمح"), + (0xFD7F, "M", "قمم"), + (0xFD80, "M", "لحم"), + (0xFD81, "M", "لحي"), + (0xFD82, "M", "لحى"), + (0xFD83, "M", "لجج"), + (0xFD85, "M", "لخم"), + (0xFD87, "M", "لمح"), + (0xFD89, "M", "محج"), + (0xFD8A, "M", "محم"), + (0xFD8B, "M", "محي"), + (0xFD8C, "M", "مجح"), + (0xFD8D, "M", "مجم"), + (0xFD8E, "M", "مخج"), + (0xFD8F, "M", "مخم"), + (0xFD90, "X"), + (0xFD92, "M", "مجخ"), + (0xFD93, "M", "همج"), + (0xFD94, "M", "همم"), + (0xFD95, "M", "نحم"), + (0xFD96, "M", "نحى"), + (0xFD97, "M", "نجم"), + (0xFD99, "M", "نجى"), + (0xFD9A, "M", "نمي"), + (0xFD9B, "M", "نمى"), + (0xFD9C, "M", "يمم"), + (0xFD9E, "M", "بخي"), + (0xFD9F, "M", "تجي"), + (0xFDA0, "M", "تجى"), + (0xFDA1, "M", "تخي"), + (0xFDA2, "M", "تخى"), + (0xFDA3, "M", "تمي"), + (0xFDA4, "M", "تمى"), + (0xFDA5, "M", "جمي"), + (0xFDA6, "M", "جحى"), + (0xFDA7, "M", "جمى"), + (0xFDA8, "M", "سخى"), + (0xFDA9, "M", "صحي"), + (0xFDAA, "M", "شحي"), + ] + + +def _seg_49() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFDAB, "M", "ضحي"), + (0xFDAC, "M", "لجي"), + (0xFDAD, "M", "لمي"), + (0xFDAE, "M", "يحي"), + (0xFDAF, "M", "يجي"), + (0xFDB0, "M", "يمي"), + (0xFDB1, "M", "ممي"), + (0xFDB2, "M", "قمي"), + (0xFDB3, "M", "نحي"), + (0xFDB4, "M", "قمح"), + (0xFDB5, "M", "لحم"), + (0xFDB6, "M", "عمي"), + (0xFDB7, "M", "كمي"), + (0xFDB8, "M", "نجح"), + (0xFDB9, "M", "مخي"), + (0xFDBA, "M", "لجم"), + (0xFDBB, "M", "كمم"), + (0xFDBC, "M", "لجم"), + (0xFDBD, "M", "نجح"), + (0xFDBE, "M", "جحي"), + (0xFDBF, "M", "حجي"), + (0xFDC0, "M", "مجي"), + (0xFDC1, "M", "فمي"), + (0xFDC2, "M", "بحي"), + (0xFDC3, "M", "كمم"), + (0xFDC4, "M", "عجم"), + (0xFDC5, "M", "صمم"), + (0xFDC6, "M", "سخي"), + (0xFDC7, "M", "نجي"), + (0xFDC8, "X"), + (0xFDCF, "V"), + (0xFDD0, "X"), + (0xFDF0, "M", "صلے"), + (0xFDF1, "M", "قلے"), + (0xFDF2, "M", "الله"), + (0xFDF3, "M", "اكبر"), + (0xFDF4, "M", "محمد"), + (0xFDF5, "M", "صلعم"), + (0xFDF6, "M", "رسول"), + (0xFDF7, "M", "عليه"), + (0xFDF8, "M", "وسلم"), + (0xFDF9, "M", "صلى"), + (0xFDFA, "3", "صلى الله عليه وسلم"), + (0xFDFB, "3", "جل جلاله"), + (0xFDFC, "M", "ریال"), + (0xFDFD, "V"), + (0xFE00, "I"), + (0xFE10, "3", ","), + (0xFE11, "M", "、"), + (0xFE12, "X"), + (0xFE13, "3", ":"), + (0xFE14, "3", ";"), + (0xFE15, "3", "!"), + (0xFE16, "3", "?"), + (0xFE17, "M", "〖"), + (0xFE18, "M", "〗"), + (0xFE19, "X"), + (0xFE20, "V"), + (0xFE30, "X"), + (0xFE31, "M", "—"), + (0xFE32, "M", "–"), + (0xFE33, "3", "_"), + (0xFE35, "3", "("), + (0xFE36, "3", ")"), + (0xFE37, "3", "{"), + (0xFE38, "3", "}"), + (0xFE39, "M", "〔"), + (0xFE3A, "M", "〕"), + (0xFE3B, "M", "【"), + (0xFE3C, "M", "】"), + (0xFE3D, "M", "《"), + (0xFE3E, "M", "》"), + (0xFE3F, "M", "〈"), + (0xFE40, "M", "〉"), + (0xFE41, "M", "「"), + (0xFE42, "M", "」"), + (0xFE43, "M", "『"), + (0xFE44, "M", "』"), + (0xFE45, "V"), + (0xFE47, "3", "["), + (0xFE48, "3", "]"), + (0xFE49, "3", " ̅"), + (0xFE4D, "3", "_"), + (0xFE50, "3", ","), + (0xFE51, "M", "、"), + (0xFE52, "X"), + (0xFE54, "3", ";"), + (0xFE55, "3", ":"), + (0xFE56, "3", "?"), + (0xFE57, "3", "!"), + (0xFE58, "M", "—"), + (0xFE59, "3", "("), + (0xFE5A, "3", ")"), + (0xFE5B, "3", "{"), + (0xFE5C, "3", "}"), + (0xFE5D, "M", "〔"), + (0xFE5E, "M", "〕"), + (0xFE5F, "3", "#"), + (0xFE60, "3", "&"), + (0xFE61, "3", "*"), + ] + + +def _seg_50() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFE62, "3", "+"), + (0xFE63, "M", "-"), + (0xFE64, "3", "<"), + (0xFE65, "3", ">"), + (0xFE66, "3", "="), + (0xFE67, "X"), + (0xFE68, "3", "\\"), + (0xFE69, "3", "$"), + (0xFE6A, "3", "%"), + (0xFE6B, "3", "@"), + (0xFE6C, "X"), + (0xFE70, "3", " ً"), + (0xFE71, "M", "ـً"), + (0xFE72, "3", " ٌ"), + (0xFE73, "V"), + (0xFE74, "3", " ٍ"), + (0xFE75, "X"), + (0xFE76, "3", " َ"), + (0xFE77, "M", "ـَ"), + (0xFE78, "3", " ُ"), + (0xFE79, "M", "ـُ"), + (0xFE7A, "3", " ِ"), + (0xFE7B, "M", "ـِ"), + (0xFE7C, "3", " ّ"), + (0xFE7D, "M", "ـّ"), + (0xFE7E, "3", " ْ"), + (0xFE7F, "M", "ـْ"), + (0xFE80, "M", "ء"), + (0xFE81, "M", "آ"), + (0xFE83, "M", "أ"), + (0xFE85, "M", "ؤ"), + (0xFE87, "M", "إ"), + (0xFE89, "M", "ئ"), + (0xFE8D, "M", "ا"), + (0xFE8F, "M", "ب"), + (0xFE93, "M", "ة"), + (0xFE95, "M", "ت"), + (0xFE99, "M", "ث"), + (0xFE9D, "M", "ج"), + (0xFEA1, "M", "ح"), + (0xFEA5, "M", "خ"), + (0xFEA9, "M", "د"), + (0xFEAB, "M", "ذ"), + (0xFEAD, "M", "ر"), + (0xFEAF, "M", "ز"), + (0xFEB1, "M", "س"), + (0xFEB5, "M", "ش"), + (0xFEB9, "M", "ص"), + (0xFEBD, "M", "ض"), + (0xFEC1, "M", "ط"), + (0xFEC5, "M", "ظ"), + (0xFEC9, "M", "ع"), + (0xFECD, "M", "غ"), + (0xFED1, "M", "ف"), + (0xFED5, "M", "ق"), + (0xFED9, "M", "ك"), + (0xFEDD, "M", "ل"), + (0xFEE1, "M", "م"), + (0xFEE5, "M", "ن"), + (0xFEE9, "M", "ه"), + (0xFEED, "M", "و"), + (0xFEEF, "M", "ى"), + (0xFEF1, "M", "ي"), + (0xFEF5, "M", "لآ"), + (0xFEF7, "M", "لأ"), + (0xFEF9, "M", "لإ"), + (0xFEFB, "M", "لا"), + (0xFEFD, "X"), + (0xFEFF, "I"), + (0xFF00, "X"), + (0xFF01, "3", "!"), + (0xFF02, "3", '"'), + (0xFF03, "3", "#"), + (0xFF04, "3", "$"), + (0xFF05, "3", "%"), + (0xFF06, "3", "&"), + (0xFF07, "3", "'"), + (0xFF08, "3", "("), + (0xFF09, "3", ")"), + (0xFF0A, "3", "*"), + (0xFF0B, "3", "+"), + (0xFF0C, "3", ","), + (0xFF0D, "M", "-"), + (0xFF0E, "M", "."), + (0xFF0F, "3", "/"), + (0xFF10, "M", "0"), + (0xFF11, "M", "1"), + (0xFF12, "M", "2"), + (0xFF13, "M", "3"), + (0xFF14, "M", "4"), + (0xFF15, "M", "5"), + (0xFF16, "M", "6"), + (0xFF17, "M", "7"), + (0xFF18, "M", "8"), + (0xFF19, "M", "9"), + (0xFF1A, "3", ":"), + (0xFF1B, "3", ";"), + (0xFF1C, "3", "<"), + (0xFF1D, "3", "="), + (0xFF1E, "3", ">"), + ] + + +def _seg_51() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFF1F, "3", "?"), + (0xFF20, "3", "@"), + (0xFF21, "M", "a"), + (0xFF22, "M", "b"), + (0xFF23, "M", "c"), + (0xFF24, "M", "d"), + (0xFF25, "M", "e"), + (0xFF26, "M", "f"), + (0xFF27, "M", "g"), + (0xFF28, "M", "h"), + (0xFF29, "M", "i"), + (0xFF2A, "M", "j"), + (0xFF2B, "M", "k"), + (0xFF2C, "M", "l"), + (0xFF2D, "M", "m"), + (0xFF2E, "M", "n"), + (0xFF2F, "M", "o"), + (0xFF30, "M", "p"), + (0xFF31, "M", "q"), + (0xFF32, "M", "r"), + (0xFF33, "M", "s"), + (0xFF34, "M", "t"), + (0xFF35, "M", "u"), + (0xFF36, "M", "v"), + (0xFF37, "M", "w"), + (0xFF38, "M", "x"), + (0xFF39, "M", "y"), + (0xFF3A, "M", "z"), + (0xFF3B, "3", "["), + (0xFF3C, "3", "\\"), + (0xFF3D, "3", "]"), + (0xFF3E, "3", "^"), + (0xFF3F, "3", "_"), + (0xFF40, "3", "`"), + (0xFF41, "M", "a"), + (0xFF42, "M", "b"), + (0xFF43, "M", "c"), + (0xFF44, "M", "d"), + (0xFF45, "M", "e"), + (0xFF46, "M", "f"), + (0xFF47, "M", "g"), + (0xFF48, "M", "h"), + (0xFF49, "M", "i"), + (0xFF4A, "M", "j"), + (0xFF4B, "M", "k"), + (0xFF4C, "M", "l"), + (0xFF4D, "M", "m"), + (0xFF4E, "M", "n"), + (0xFF4F, "M", "o"), + (0xFF50, "M", "p"), + (0xFF51, "M", "q"), + (0xFF52, "M", "r"), + (0xFF53, "M", "s"), + (0xFF54, "M", "t"), + (0xFF55, "M", "u"), + (0xFF56, "M", "v"), + (0xFF57, "M", "w"), + (0xFF58, "M", "x"), + (0xFF59, "M", "y"), + (0xFF5A, "M", "z"), + (0xFF5B, "3", "{"), + (0xFF5C, "3", "|"), + (0xFF5D, "3", "}"), + (0xFF5E, "3", "~"), + (0xFF5F, "M", "⦅"), + (0xFF60, "M", "⦆"), + (0xFF61, "M", "."), + (0xFF62, "M", "「"), + (0xFF63, "M", "」"), + (0xFF64, "M", "、"), + (0xFF65, "M", "・"), + (0xFF66, "M", "ヲ"), + (0xFF67, "M", "ァ"), + (0xFF68, "M", "ィ"), + (0xFF69, "M", "ゥ"), + (0xFF6A, "M", "ェ"), + (0xFF6B, "M", "ォ"), + (0xFF6C, "M", "ャ"), + (0xFF6D, "M", "ュ"), + (0xFF6E, "M", "ョ"), + (0xFF6F, "M", "ッ"), + (0xFF70, "M", "ー"), + (0xFF71, "M", "ア"), + (0xFF72, "M", "イ"), + (0xFF73, "M", "ウ"), + (0xFF74, "M", "エ"), + (0xFF75, "M", "オ"), + (0xFF76, "M", "カ"), + (0xFF77, "M", "キ"), + (0xFF78, "M", "ク"), + (0xFF79, "M", "ケ"), + (0xFF7A, "M", "コ"), + (0xFF7B, "M", "サ"), + (0xFF7C, "M", "シ"), + (0xFF7D, "M", "ス"), + (0xFF7E, "M", "セ"), + (0xFF7F, "M", "ソ"), + (0xFF80, "M", "タ"), + (0xFF81, "M", "チ"), + (0xFF82, "M", "ツ"), + ] + + +def _seg_52() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFF83, "M", "テ"), + (0xFF84, "M", "ト"), + (0xFF85, "M", "ナ"), + (0xFF86, "M", "ニ"), + (0xFF87, "M", "ヌ"), + (0xFF88, "M", "ネ"), + (0xFF89, "M", "ノ"), + (0xFF8A, "M", "ハ"), + (0xFF8B, "M", "ヒ"), + (0xFF8C, "M", "フ"), + (0xFF8D, "M", "ヘ"), + (0xFF8E, "M", "ホ"), + (0xFF8F, "M", "マ"), + (0xFF90, "M", "ミ"), + (0xFF91, "M", "ム"), + (0xFF92, "M", "メ"), + (0xFF93, "M", "モ"), + (0xFF94, "M", "ヤ"), + (0xFF95, "M", "ユ"), + (0xFF96, "M", "ヨ"), + (0xFF97, "M", "ラ"), + (0xFF98, "M", "リ"), + (0xFF99, "M", "ル"), + (0xFF9A, "M", "レ"), + (0xFF9B, "M", "ロ"), + (0xFF9C, "M", "ワ"), + (0xFF9D, "M", "ン"), + (0xFF9E, "M", "゙"), + (0xFF9F, "M", "゚"), + (0xFFA0, "X"), + (0xFFA1, "M", "ᄀ"), + (0xFFA2, "M", "ᄁ"), + (0xFFA3, "M", "ᆪ"), + (0xFFA4, "M", "ᄂ"), + (0xFFA5, "M", "ᆬ"), + (0xFFA6, "M", "ᆭ"), + (0xFFA7, "M", "ᄃ"), + (0xFFA8, "M", "ᄄ"), + (0xFFA9, "M", "ᄅ"), + (0xFFAA, "M", "ᆰ"), + (0xFFAB, "M", "ᆱ"), + (0xFFAC, "M", "ᆲ"), + (0xFFAD, "M", "ᆳ"), + (0xFFAE, "M", "ᆴ"), + (0xFFAF, "M", "ᆵ"), + (0xFFB0, "M", "ᄚ"), + (0xFFB1, "M", "ᄆ"), + (0xFFB2, "M", "ᄇ"), + (0xFFB3, "M", "ᄈ"), + (0xFFB4, "M", "ᄡ"), + (0xFFB5, "M", "ᄉ"), + (0xFFB6, "M", "ᄊ"), + (0xFFB7, "M", "ᄋ"), + (0xFFB8, "M", "ᄌ"), + (0xFFB9, "M", "ᄍ"), + (0xFFBA, "M", "ᄎ"), + (0xFFBB, "M", "ᄏ"), + (0xFFBC, "M", "ᄐ"), + (0xFFBD, "M", "ᄑ"), + (0xFFBE, "M", "ᄒ"), + (0xFFBF, "X"), + (0xFFC2, "M", "ᅡ"), + (0xFFC3, "M", "ᅢ"), + (0xFFC4, "M", "ᅣ"), + (0xFFC5, "M", "ᅤ"), + (0xFFC6, "M", "ᅥ"), + (0xFFC7, "M", "ᅦ"), + (0xFFC8, "X"), + (0xFFCA, "M", "ᅧ"), + (0xFFCB, "M", "ᅨ"), + (0xFFCC, "M", "ᅩ"), + (0xFFCD, "M", "ᅪ"), + (0xFFCE, "M", "ᅫ"), + (0xFFCF, "M", "ᅬ"), + (0xFFD0, "X"), + (0xFFD2, "M", "ᅭ"), + (0xFFD3, "M", "ᅮ"), + (0xFFD4, "M", "ᅯ"), + (0xFFD5, "M", "ᅰ"), + (0xFFD6, "M", "ᅱ"), + (0xFFD7, "M", "ᅲ"), + (0xFFD8, "X"), + (0xFFDA, "M", "ᅳ"), + (0xFFDB, "M", "ᅴ"), + (0xFFDC, "M", "ᅵ"), + (0xFFDD, "X"), + (0xFFE0, "M", "¢"), + (0xFFE1, "M", "£"), + (0xFFE2, "M", "¬"), + (0xFFE3, "3", " ̄"), + (0xFFE4, "M", "¦"), + (0xFFE5, "M", "¥"), + (0xFFE6, "M", "₩"), + (0xFFE7, "X"), + (0xFFE8, "M", "│"), + (0xFFE9, "M", "←"), + (0xFFEA, "M", "↑"), + (0xFFEB, "M", "→"), + (0xFFEC, "M", "↓"), + (0xFFED, "M", "■"), + ] + + +def _seg_53() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0xFFEE, "M", "○"), + (0xFFEF, "X"), + (0x10000, "V"), + (0x1000C, "X"), + (0x1000D, "V"), + (0x10027, "X"), + (0x10028, "V"), + (0x1003B, "X"), + (0x1003C, "V"), + (0x1003E, "X"), + (0x1003F, "V"), + (0x1004E, "X"), + (0x10050, "V"), + (0x1005E, "X"), + (0x10080, "V"), + (0x100FB, "X"), + (0x10100, "V"), + (0x10103, "X"), + (0x10107, "V"), + (0x10134, "X"), + (0x10137, "V"), + (0x1018F, "X"), + (0x10190, "V"), + (0x1019D, "X"), + (0x101A0, "V"), + (0x101A1, "X"), + (0x101D0, "V"), + (0x101FE, "X"), + (0x10280, "V"), + (0x1029D, "X"), + (0x102A0, "V"), + (0x102D1, "X"), + (0x102E0, "V"), + (0x102FC, "X"), + (0x10300, "V"), + (0x10324, "X"), + (0x1032D, "V"), + (0x1034B, "X"), + (0x10350, "V"), + (0x1037B, "X"), + (0x10380, "V"), + (0x1039E, "X"), + (0x1039F, "V"), + (0x103C4, "X"), + (0x103C8, "V"), + (0x103D6, "X"), + (0x10400, "M", "𐐨"), + (0x10401, "M", "𐐩"), + (0x10402, "M", "𐐪"), + (0x10403, "M", "𐐫"), + (0x10404, "M", "𐐬"), + (0x10405, "M", "𐐭"), + (0x10406, "M", "𐐮"), + (0x10407, "M", "𐐯"), + (0x10408, "M", "𐐰"), + (0x10409, "M", "𐐱"), + (0x1040A, "M", "𐐲"), + (0x1040B, "M", "𐐳"), + (0x1040C, "M", "𐐴"), + (0x1040D, "M", "𐐵"), + (0x1040E, "M", "𐐶"), + (0x1040F, "M", "𐐷"), + (0x10410, "M", "𐐸"), + (0x10411, "M", "𐐹"), + (0x10412, "M", "𐐺"), + (0x10413, "M", "𐐻"), + (0x10414, "M", "𐐼"), + (0x10415, "M", "𐐽"), + (0x10416, "M", "𐐾"), + (0x10417, "M", "𐐿"), + (0x10418, "M", "𐑀"), + (0x10419, "M", "𐑁"), + (0x1041A, "M", "𐑂"), + (0x1041B, "M", "𐑃"), + (0x1041C, "M", "𐑄"), + (0x1041D, "M", "𐑅"), + (0x1041E, "M", "𐑆"), + (0x1041F, "M", "𐑇"), + (0x10420, "M", "𐑈"), + (0x10421, "M", "𐑉"), + (0x10422, "M", "𐑊"), + (0x10423, "M", "𐑋"), + (0x10424, "M", "𐑌"), + (0x10425, "M", "𐑍"), + (0x10426, "M", "𐑎"), + (0x10427, "M", "𐑏"), + (0x10428, "V"), + (0x1049E, "X"), + (0x104A0, "V"), + (0x104AA, "X"), + (0x104B0, "M", "𐓘"), + (0x104B1, "M", "𐓙"), + (0x104B2, "M", "𐓚"), + (0x104B3, "M", "𐓛"), + (0x104B4, "M", "𐓜"), + (0x104B5, "M", "𐓝"), + (0x104B6, "M", "𐓞"), + (0x104B7, "M", "𐓟"), + (0x104B8, "M", "𐓠"), + (0x104B9, "M", "𐓡"), + ] + + +def _seg_54() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x104BA, "M", "𐓢"), + (0x104BB, "M", "𐓣"), + (0x104BC, "M", "𐓤"), + (0x104BD, "M", "𐓥"), + (0x104BE, "M", "𐓦"), + (0x104BF, "M", "𐓧"), + (0x104C0, "M", "𐓨"), + (0x104C1, "M", "𐓩"), + (0x104C2, "M", "𐓪"), + (0x104C3, "M", "𐓫"), + (0x104C4, "M", "𐓬"), + (0x104C5, "M", "𐓭"), + (0x104C6, "M", "𐓮"), + (0x104C7, "M", "𐓯"), + (0x104C8, "M", "𐓰"), + (0x104C9, "M", "𐓱"), + (0x104CA, "M", "𐓲"), + (0x104CB, "M", "𐓳"), + (0x104CC, "M", "𐓴"), + (0x104CD, "M", "𐓵"), + (0x104CE, "M", "𐓶"), + (0x104CF, "M", "𐓷"), + (0x104D0, "M", "𐓸"), + (0x104D1, "M", "𐓹"), + (0x104D2, "M", "𐓺"), + (0x104D3, "M", "𐓻"), + (0x104D4, "X"), + (0x104D8, "V"), + (0x104FC, "X"), + (0x10500, "V"), + (0x10528, "X"), + (0x10530, "V"), + (0x10564, "X"), + (0x1056F, "V"), + (0x10570, "M", "𐖗"), + (0x10571, "M", "𐖘"), + (0x10572, "M", "𐖙"), + (0x10573, "M", "𐖚"), + (0x10574, "M", "𐖛"), + (0x10575, "M", "𐖜"), + (0x10576, "M", "𐖝"), + (0x10577, "M", "𐖞"), + (0x10578, "M", "𐖟"), + (0x10579, "M", "𐖠"), + (0x1057A, "M", "𐖡"), + (0x1057B, "X"), + (0x1057C, "M", "𐖣"), + (0x1057D, "M", "𐖤"), + (0x1057E, "M", "𐖥"), + (0x1057F, "M", "𐖦"), + (0x10580, "M", "𐖧"), + (0x10581, "M", "𐖨"), + (0x10582, "M", "𐖩"), + (0x10583, "M", "𐖪"), + (0x10584, "M", "𐖫"), + (0x10585, "M", "𐖬"), + (0x10586, "M", "𐖭"), + (0x10587, "M", "𐖮"), + (0x10588, "M", "𐖯"), + (0x10589, "M", "𐖰"), + (0x1058A, "M", "𐖱"), + (0x1058B, "X"), + (0x1058C, "M", "𐖳"), + (0x1058D, "M", "𐖴"), + (0x1058E, "M", "𐖵"), + (0x1058F, "M", "𐖶"), + (0x10590, "M", "𐖷"), + (0x10591, "M", "𐖸"), + (0x10592, "M", "𐖹"), + (0x10593, "X"), + (0x10594, "M", "𐖻"), + (0x10595, "M", "𐖼"), + (0x10596, "X"), + (0x10597, "V"), + (0x105A2, "X"), + (0x105A3, "V"), + (0x105B2, "X"), + (0x105B3, "V"), + (0x105BA, "X"), + (0x105BB, "V"), + (0x105BD, "X"), + (0x10600, "V"), + (0x10737, "X"), + (0x10740, "V"), + (0x10756, "X"), + (0x10760, "V"), + (0x10768, "X"), + (0x10780, "V"), + (0x10781, "M", "ː"), + (0x10782, "M", "ˑ"), + (0x10783, "M", "æ"), + (0x10784, "M", "ʙ"), + (0x10785, "M", "ɓ"), + (0x10786, "X"), + (0x10787, "M", "ʣ"), + (0x10788, "M", "ꭦ"), + (0x10789, "M", "ʥ"), + (0x1078A, "M", "ʤ"), + (0x1078B, "M", "ɖ"), + (0x1078C, "M", "ɗ"), + ] + + +def _seg_55() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1078D, "M", "ᶑ"), + (0x1078E, "M", "ɘ"), + (0x1078F, "M", "ɞ"), + (0x10790, "M", "ʩ"), + (0x10791, "M", "ɤ"), + (0x10792, "M", "ɢ"), + (0x10793, "M", "ɠ"), + (0x10794, "M", "ʛ"), + (0x10795, "M", "ħ"), + (0x10796, "M", "ʜ"), + (0x10797, "M", "ɧ"), + (0x10798, "M", "ʄ"), + (0x10799, "M", "ʪ"), + (0x1079A, "M", "ʫ"), + (0x1079B, "M", "ɬ"), + (0x1079C, "M", "𝼄"), + (0x1079D, "M", "ꞎ"), + (0x1079E, "M", "ɮ"), + (0x1079F, "M", "𝼅"), + (0x107A0, "M", "ʎ"), + (0x107A1, "M", "𝼆"), + (0x107A2, "M", "ø"), + (0x107A3, "M", "ɶ"), + (0x107A4, "M", "ɷ"), + (0x107A5, "M", "q"), + (0x107A6, "M", "ɺ"), + (0x107A7, "M", "𝼈"), + (0x107A8, "M", "ɽ"), + (0x107A9, "M", "ɾ"), + (0x107AA, "M", "ʀ"), + (0x107AB, "M", "ʨ"), + (0x107AC, "M", "ʦ"), + (0x107AD, "M", "ꭧ"), + (0x107AE, "M", "ʧ"), + (0x107AF, "M", "ʈ"), + (0x107B0, "M", "ⱱ"), + (0x107B1, "X"), + (0x107B2, "M", "ʏ"), + (0x107B3, "M", "ʡ"), + (0x107B4, "M", "ʢ"), + (0x107B5, "M", "ʘ"), + (0x107B6, "M", "ǀ"), + (0x107B7, "M", "ǁ"), + (0x107B8, "M", "ǂ"), + (0x107B9, "M", "𝼊"), + (0x107BA, "M", "𝼞"), + (0x107BB, "X"), + (0x10800, "V"), + (0x10806, "X"), + (0x10808, "V"), + (0x10809, "X"), + (0x1080A, "V"), + (0x10836, "X"), + (0x10837, "V"), + (0x10839, "X"), + (0x1083C, "V"), + (0x1083D, "X"), + (0x1083F, "V"), + (0x10856, "X"), + (0x10857, "V"), + (0x1089F, "X"), + (0x108A7, "V"), + (0x108B0, "X"), + (0x108E0, "V"), + (0x108F3, "X"), + (0x108F4, "V"), + (0x108F6, "X"), + (0x108FB, "V"), + (0x1091C, "X"), + (0x1091F, "V"), + (0x1093A, "X"), + (0x1093F, "V"), + (0x10940, "X"), + (0x10980, "V"), + (0x109B8, "X"), + (0x109BC, "V"), + (0x109D0, "X"), + (0x109D2, "V"), + (0x10A04, "X"), + (0x10A05, "V"), + (0x10A07, "X"), + (0x10A0C, "V"), + (0x10A14, "X"), + (0x10A15, "V"), + (0x10A18, "X"), + (0x10A19, "V"), + (0x10A36, "X"), + (0x10A38, "V"), + (0x10A3B, "X"), + (0x10A3F, "V"), + (0x10A49, "X"), + (0x10A50, "V"), + (0x10A59, "X"), + (0x10A60, "V"), + (0x10AA0, "X"), + (0x10AC0, "V"), + (0x10AE7, "X"), + (0x10AEB, "V"), + (0x10AF7, "X"), + (0x10B00, "V"), + ] + + +def _seg_56() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x10B36, "X"), + (0x10B39, "V"), + (0x10B56, "X"), + (0x10B58, "V"), + (0x10B73, "X"), + (0x10B78, "V"), + (0x10B92, "X"), + (0x10B99, "V"), + (0x10B9D, "X"), + (0x10BA9, "V"), + (0x10BB0, "X"), + (0x10C00, "V"), + (0x10C49, "X"), + (0x10C80, "M", "𐳀"), + (0x10C81, "M", "𐳁"), + (0x10C82, "M", "𐳂"), + (0x10C83, "M", "𐳃"), + (0x10C84, "M", "𐳄"), + (0x10C85, "M", "𐳅"), + (0x10C86, "M", "𐳆"), + (0x10C87, "M", "𐳇"), + (0x10C88, "M", "𐳈"), + (0x10C89, "M", "𐳉"), + (0x10C8A, "M", "𐳊"), + (0x10C8B, "M", "𐳋"), + (0x10C8C, "M", "𐳌"), + (0x10C8D, "M", "𐳍"), + (0x10C8E, "M", "𐳎"), + (0x10C8F, "M", "𐳏"), + (0x10C90, "M", "𐳐"), + (0x10C91, "M", "𐳑"), + (0x10C92, "M", "𐳒"), + (0x10C93, "M", "𐳓"), + (0x10C94, "M", "𐳔"), + (0x10C95, "M", "𐳕"), + (0x10C96, "M", "𐳖"), + (0x10C97, "M", "𐳗"), + (0x10C98, "M", "𐳘"), + (0x10C99, "M", "𐳙"), + (0x10C9A, "M", "𐳚"), + (0x10C9B, "M", "𐳛"), + (0x10C9C, "M", "𐳜"), + (0x10C9D, "M", "𐳝"), + (0x10C9E, "M", "𐳞"), + (0x10C9F, "M", "𐳟"), + (0x10CA0, "M", "𐳠"), + (0x10CA1, "M", "𐳡"), + (0x10CA2, "M", "𐳢"), + (0x10CA3, "M", "𐳣"), + (0x10CA4, "M", "𐳤"), + (0x10CA5, "M", "𐳥"), + (0x10CA6, "M", "𐳦"), + (0x10CA7, "M", "𐳧"), + (0x10CA8, "M", "𐳨"), + (0x10CA9, "M", "𐳩"), + (0x10CAA, "M", "𐳪"), + (0x10CAB, "M", "𐳫"), + (0x10CAC, "M", "𐳬"), + (0x10CAD, "M", "𐳭"), + (0x10CAE, "M", "𐳮"), + (0x10CAF, "M", "𐳯"), + (0x10CB0, "M", "𐳰"), + (0x10CB1, "M", "𐳱"), + (0x10CB2, "M", "𐳲"), + (0x10CB3, "X"), + (0x10CC0, "V"), + (0x10CF3, "X"), + (0x10CFA, "V"), + (0x10D28, "X"), + (0x10D30, "V"), + (0x10D3A, "X"), + (0x10E60, "V"), + (0x10E7F, "X"), + (0x10E80, "V"), + (0x10EAA, "X"), + (0x10EAB, "V"), + (0x10EAE, "X"), + (0x10EB0, "V"), + (0x10EB2, "X"), + (0x10EFD, "V"), + (0x10F28, "X"), + (0x10F30, "V"), + (0x10F5A, "X"), + (0x10F70, "V"), + (0x10F8A, "X"), + (0x10FB0, "V"), + (0x10FCC, "X"), + (0x10FE0, "V"), + (0x10FF7, "X"), + (0x11000, "V"), + (0x1104E, "X"), + (0x11052, "V"), + (0x11076, "X"), + (0x1107F, "V"), + (0x110BD, "X"), + (0x110BE, "V"), + (0x110C3, "X"), + (0x110D0, "V"), + (0x110E9, "X"), + (0x110F0, "V"), + ] + + +def _seg_57() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x110FA, "X"), + (0x11100, "V"), + (0x11135, "X"), + (0x11136, "V"), + (0x11148, "X"), + (0x11150, "V"), + (0x11177, "X"), + (0x11180, "V"), + (0x111E0, "X"), + (0x111E1, "V"), + (0x111F5, "X"), + (0x11200, "V"), + (0x11212, "X"), + (0x11213, "V"), + (0x11242, "X"), + (0x11280, "V"), + (0x11287, "X"), + (0x11288, "V"), + (0x11289, "X"), + (0x1128A, "V"), + (0x1128E, "X"), + (0x1128F, "V"), + (0x1129E, "X"), + (0x1129F, "V"), + (0x112AA, "X"), + (0x112B0, "V"), + (0x112EB, "X"), + (0x112F0, "V"), + (0x112FA, "X"), + (0x11300, "V"), + (0x11304, "X"), + (0x11305, "V"), + (0x1130D, "X"), + (0x1130F, "V"), + (0x11311, "X"), + (0x11313, "V"), + (0x11329, "X"), + (0x1132A, "V"), + (0x11331, "X"), + (0x11332, "V"), + (0x11334, "X"), + (0x11335, "V"), + (0x1133A, "X"), + (0x1133B, "V"), + (0x11345, "X"), + (0x11347, "V"), + (0x11349, "X"), + (0x1134B, "V"), + (0x1134E, "X"), + (0x11350, "V"), + (0x11351, "X"), + (0x11357, "V"), + (0x11358, "X"), + (0x1135D, "V"), + (0x11364, "X"), + (0x11366, "V"), + (0x1136D, "X"), + (0x11370, "V"), + (0x11375, "X"), + (0x11400, "V"), + (0x1145C, "X"), + (0x1145D, "V"), + (0x11462, "X"), + (0x11480, "V"), + (0x114C8, "X"), + (0x114D0, "V"), + (0x114DA, "X"), + (0x11580, "V"), + (0x115B6, "X"), + (0x115B8, "V"), + (0x115DE, "X"), + (0x11600, "V"), + (0x11645, "X"), + (0x11650, "V"), + (0x1165A, "X"), + (0x11660, "V"), + (0x1166D, "X"), + (0x11680, "V"), + (0x116BA, "X"), + (0x116C0, "V"), + (0x116CA, "X"), + (0x11700, "V"), + (0x1171B, "X"), + (0x1171D, "V"), + (0x1172C, "X"), + (0x11730, "V"), + (0x11747, "X"), + (0x11800, "V"), + (0x1183C, "X"), + (0x118A0, "M", "𑣀"), + (0x118A1, "M", "𑣁"), + (0x118A2, "M", "𑣂"), + (0x118A3, "M", "𑣃"), + (0x118A4, "M", "𑣄"), + (0x118A5, "M", "𑣅"), + (0x118A6, "M", "𑣆"), + (0x118A7, "M", "𑣇"), + (0x118A8, "M", "𑣈"), + (0x118A9, "M", "𑣉"), + (0x118AA, "M", "𑣊"), + ] + + +def _seg_58() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x118AB, "M", "𑣋"), + (0x118AC, "M", "𑣌"), + (0x118AD, "M", "𑣍"), + (0x118AE, "M", "𑣎"), + (0x118AF, "M", "𑣏"), + (0x118B0, "M", "𑣐"), + (0x118B1, "M", "𑣑"), + (0x118B2, "M", "𑣒"), + (0x118B3, "M", "𑣓"), + (0x118B4, "M", "𑣔"), + (0x118B5, "M", "𑣕"), + (0x118B6, "M", "𑣖"), + (0x118B7, "M", "𑣗"), + (0x118B8, "M", "𑣘"), + (0x118B9, "M", "𑣙"), + (0x118BA, "M", "𑣚"), + (0x118BB, "M", "𑣛"), + (0x118BC, "M", "𑣜"), + (0x118BD, "M", "𑣝"), + (0x118BE, "M", "𑣞"), + (0x118BF, "M", "𑣟"), + (0x118C0, "V"), + (0x118F3, "X"), + (0x118FF, "V"), + (0x11907, "X"), + (0x11909, "V"), + (0x1190A, "X"), + (0x1190C, "V"), + (0x11914, "X"), + (0x11915, "V"), + (0x11917, "X"), + (0x11918, "V"), + (0x11936, "X"), + (0x11937, "V"), + (0x11939, "X"), + (0x1193B, "V"), + (0x11947, "X"), + (0x11950, "V"), + (0x1195A, "X"), + (0x119A0, "V"), + (0x119A8, "X"), + (0x119AA, "V"), + (0x119D8, "X"), + (0x119DA, "V"), + (0x119E5, "X"), + (0x11A00, "V"), + (0x11A48, "X"), + (0x11A50, "V"), + (0x11AA3, "X"), + (0x11AB0, "V"), + (0x11AF9, "X"), + (0x11B00, "V"), + (0x11B0A, "X"), + (0x11C00, "V"), + (0x11C09, "X"), + (0x11C0A, "V"), + (0x11C37, "X"), + (0x11C38, "V"), + (0x11C46, "X"), + (0x11C50, "V"), + (0x11C6D, "X"), + (0x11C70, "V"), + (0x11C90, "X"), + (0x11C92, "V"), + (0x11CA8, "X"), + (0x11CA9, "V"), + (0x11CB7, "X"), + (0x11D00, "V"), + (0x11D07, "X"), + (0x11D08, "V"), + (0x11D0A, "X"), + (0x11D0B, "V"), + (0x11D37, "X"), + (0x11D3A, "V"), + (0x11D3B, "X"), + (0x11D3C, "V"), + (0x11D3E, "X"), + (0x11D3F, "V"), + (0x11D48, "X"), + (0x11D50, "V"), + (0x11D5A, "X"), + (0x11D60, "V"), + (0x11D66, "X"), + (0x11D67, "V"), + (0x11D69, "X"), + (0x11D6A, "V"), + (0x11D8F, "X"), + (0x11D90, "V"), + (0x11D92, "X"), + (0x11D93, "V"), + (0x11D99, "X"), + (0x11DA0, "V"), + (0x11DAA, "X"), + (0x11EE0, "V"), + (0x11EF9, "X"), + (0x11F00, "V"), + (0x11F11, "X"), + (0x11F12, "V"), + (0x11F3B, "X"), + (0x11F3E, "V"), + ] + + +def _seg_59() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x11F5A, "X"), + (0x11FB0, "V"), + (0x11FB1, "X"), + (0x11FC0, "V"), + (0x11FF2, "X"), + (0x11FFF, "V"), + (0x1239A, "X"), + (0x12400, "V"), + (0x1246F, "X"), + (0x12470, "V"), + (0x12475, "X"), + (0x12480, "V"), + (0x12544, "X"), + (0x12F90, "V"), + (0x12FF3, "X"), + (0x13000, "V"), + (0x13430, "X"), + (0x13440, "V"), + (0x13456, "X"), + (0x14400, "V"), + (0x14647, "X"), + (0x16800, "V"), + (0x16A39, "X"), + (0x16A40, "V"), + (0x16A5F, "X"), + (0x16A60, "V"), + (0x16A6A, "X"), + (0x16A6E, "V"), + (0x16ABF, "X"), + (0x16AC0, "V"), + (0x16ACA, "X"), + (0x16AD0, "V"), + (0x16AEE, "X"), + (0x16AF0, "V"), + (0x16AF6, "X"), + (0x16B00, "V"), + (0x16B46, "X"), + (0x16B50, "V"), + (0x16B5A, "X"), + (0x16B5B, "V"), + (0x16B62, "X"), + (0x16B63, "V"), + (0x16B78, "X"), + (0x16B7D, "V"), + (0x16B90, "X"), + (0x16E40, "M", "𖹠"), + (0x16E41, "M", "𖹡"), + (0x16E42, "M", "𖹢"), + (0x16E43, "M", "𖹣"), + (0x16E44, "M", "𖹤"), + (0x16E45, "M", "𖹥"), + (0x16E46, "M", "𖹦"), + (0x16E47, "M", "𖹧"), + (0x16E48, "M", "𖹨"), + (0x16E49, "M", "𖹩"), + (0x16E4A, "M", "𖹪"), + (0x16E4B, "M", "𖹫"), + (0x16E4C, "M", "𖹬"), + (0x16E4D, "M", "𖹭"), + (0x16E4E, "M", "𖹮"), + (0x16E4F, "M", "𖹯"), + (0x16E50, "M", "𖹰"), + (0x16E51, "M", "𖹱"), + (0x16E52, "M", "𖹲"), + (0x16E53, "M", "𖹳"), + (0x16E54, "M", "𖹴"), + (0x16E55, "M", "𖹵"), + (0x16E56, "M", "𖹶"), + (0x16E57, "M", "𖹷"), + (0x16E58, "M", "𖹸"), + (0x16E59, "M", "𖹹"), + (0x16E5A, "M", "𖹺"), + (0x16E5B, "M", "𖹻"), + (0x16E5C, "M", "𖹼"), + (0x16E5D, "M", "𖹽"), + (0x16E5E, "M", "𖹾"), + (0x16E5F, "M", "𖹿"), + (0x16E60, "V"), + (0x16E9B, "X"), + (0x16F00, "V"), + (0x16F4B, "X"), + (0x16F4F, "V"), + (0x16F88, "X"), + (0x16F8F, "V"), + (0x16FA0, "X"), + (0x16FE0, "V"), + (0x16FE5, "X"), + (0x16FF0, "V"), + (0x16FF2, "X"), + (0x17000, "V"), + (0x187F8, "X"), + (0x18800, "V"), + (0x18CD6, "X"), + (0x18D00, "V"), + (0x18D09, "X"), + (0x1AFF0, "V"), + (0x1AFF4, "X"), + (0x1AFF5, "V"), + (0x1AFFC, "X"), + (0x1AFFD, "V"), + ] + + +def _seg_60() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1AFFF, "X"), + (0x1B000, "V"), + (0x1B123, "X"), + (0x1B132, "V"), + (0x1B133, "X"), + (0x1B150, "V"), + (0x1B153, "X"), + (0x1B155, "V"), + (0x1B156, "X"), + (0x1B164, "V"), + (0x1B168, "X"), + (0x1B170, "V"), + (0x1B2FC, "X"), + (0x1BC00, "V"), + (0x1BC6B, "X"), + (0x1BC70, "V"), + (0x1BC7D, "X"), + (0x1BC80, "V"), + (0x1BC89, "X"), + (0x1BC90, "V"), + (0x1BC9A, "X"), + (0x1BC9C, "V"), + (0x1BCA0, "I"), + (0x1BCA4, "X"), + (0x1CF00, "V"), + (0x1CF2E, "X"), + (0x1CF30, "V"), + (0x1CF47, "X"), + (0x1CF50, "V"), + (0x1CFC4, "X"), + (0x1D000, "V"), + (0x1D0F6, "X"), + (0x1D100, "V"), + (0x1D127, "X"), + (0x1D129, "V"), + (0x1D15E, "M", "𝅗𝅥"), + (0x1D15F, "M", "𝅘𝅥"), + (0x1D160, "M", "𝅘𝅥𝅮"), + (0x1D161, "M", "𝅘𝅥𝅯"), + (0x1D162, "M", "𝅘𝅥𝅰"), + (0x1D163, "M", "𝅘𝅥𝅱"), + (0x1D164, "M", "𝅘𝅥𝅲"), + (0x1D165, "V"), + (0x1D173, "X"), + (0x1D17B, "V"), + (0x1D1BB, "M", "𝆹𝅥"), + (0x1D1BC, "M", "𝆺𝅥"), + (0x1D1BD, "M", "𝆹𝅥𝅮"), + (0x1D1BE, "M", "𝆺𝅥𝅮"), + (0x1D1BF, "M", "𝆹𝅥𝅯"), + (0x1D1C0, "M", "𝆺𝅥𝅯"), + (0x1D1C1, "V"), + (0x1D1EB, "X"), + (0x1D200, "V"), + (0x1D246, "X"), + (0x1D2C0, "V"), + (0x1D2D4, "X"), + (0x1D2E0, "V"), + (0x1D2F4, "X"), + (0x1D300, "V"), + (0x1D357, "X"), + (0x1D360, "V"), + (0x1D379, "X"), + (0x1D400, "M", "a"), + (0x1D401, "M", "b"), + (0x1D402, "M", "c"), + (0x1D403, "M", "d"), + (0x1D404, "M", "e"), + (0x1D405, "M", "f"), + (0x1D406, "M", "g"), + (0x1D407, "M", "h"), + (0x1D408, "M", "i"), + (0x1D409, "M", "j"), + (0x1D40A, "M", "k"), + (0x1D40B, "M", "l"), + (0x1D40C, "M", "m"), + (0x1D40D, "M", "n"), + (0x1D40E, "M", "o"), + (0x1D40F, "M", "p"), + (0x1D410, "M", "q"), + (0x1D411, "M", "r"), + (0x1D412, "M", "s"), + (0x1D413, "M", "t"), + (0x1D414, "M", "u"), + (0x1D415, "M", "v"), + (0x1D416, "M", "w"), + (0x1D417, "M", "x"), + (0x1D418, "M", "y"), + (0x1D419, "M", "z"), + (0x1D41A, "M", "a"), + (0x1D41B, "M", "b"), + (0x1D41C, "M", "c"), + (0x1D41D, "M", "d"), + (0x1D41E, "M", "e"), + (0x1D41F, "M", "f"), + (0x1D420, "M", "g"), + (0x1D421, "M", "h"), + (0x1D422, "M", "i"), + (0x1D423, "M", "j"), + (0x1D424, "M", "k"), + ] + + +def _seg_61() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D425, "M", "l"), + (0x1D426, "M", "m"), + (0x1D427, "M", "n"), + (0x1D428, "M", "o"), + (0x1D429, "M", "p"), + (0x1D42A, "M", "q"), + (0x1D42B, "M", "r"), + (0x1D42C, "M", "s"), + (0x1D42D, "M", "t"), + (0x1D42E, "M", "u"), + (0x1D42F, "M", "v"), + (0x1D430, "M", "w"), + (0x1D431, "M", "x"), + (0x1D432, "M", "y"), + (0x1D433, "M", "z"), + (0x1D434, "M", "a"), + (0x1D435, "M", "b"), + (0x1D436, "M", "c"), + (0x1D437, "M", "d"), + (0x1D438, "M", "e"), + (0x1D439, "M", "f"), + (0x1D43A, "M", "g"), + (0x1D43B, "M", "h"), + (0x1D43C, "M", "i"), + (0x1D43D, "M", "j"), + (0x1D43E, "M", "k"), + (0x1D43F, "M", "l"), + (0x1D440, "M", "m"), + (0x1D441, "M", "n"), + (0x1D442, "M", "o"), + (0x1D443, "M", "p"), + (0x1D444, "M", "q"), + (0x1D445, "M", "r"), + (0x1D446, "M", "s"), + (0x1D447, "M", "t"), + (0x1D448, "M", "u"), + (0x1D449, "M", "v"), + (0x1D44A, "M", "w"), + (0x1D44B, "M", "x"), + (0x1D44C, "M", "y"), + (0x1D44D, "M", "z"), + (0x1D44E, "M", "a"), + (0x1D44F, "M", "b"), + (0x1D450, "M", "c"), + (0x1D451, "M", "d"), + (0x1D452, "M", "e"), + (0x1D453, "M", "f"), + (0x1D454, "M", "g"), + (0x1D455, "X"), + (0x1D456, "M", "i"), + (0x1D457, "M", "j"), + (0x1D458, "M", "k"), + (0x1D459, "M", "l"), + (0x1D45A, "M", "m"), + (0x1D45B, "M", "n"), + (0x1D45C, "M", "o"), + (0x1D45D, "M", "p"), + (0x1D45E, "M", "q"), + (0x1D45F, "M", "r"), + (0x1D460, "M", "s"), + (0x1D461, "M", "t"), + (0x1D462, "M", "u"), + (0x1D463, "M", "v"), + (0x1D464, "M", "w"), + (0x1D465, "M", "x"), + (0x1D466, "M", "y"), + (0x1D467, "M", "z"), + (0x1D468, "M", "a"), + (0x1D469, "M", "b"), + (0x1D46A, "M", "c"), + (0x1D46B, "M", "d"), + (0x1D46C, "M", "e"), + (0x1D46D, "M", "f"), + (0x1D46E, "M", "g"), + (0x1D46F, "M", "h"), + (0x1D470, "M", "i"), + (0x1D471, "M", "j"), + (0x1D472, "M", "k"), + (0x1D473, "M", "l"), + (0x1D474, "M", "m"), + (0x1D475, "M", "n"), + (0x1D476, "M", "o"), + (0x1D477, "M", "p"), + (0x1D478, "M", "q"), + (0x1D479, "M", "r"), + (0x1D47A, "M", "s"), + (0x1D47B, "M", "t"), + (0x1D47C, "M", "u"), + (0x1D47D, "M", "v"), + (0x1D47E, "M", "w"), + (0x1D47F, "M", "x"), + (0x1D480, "M", "y"), + (0x1D481, "M", "z"), + (0x1D482, "M", "a"), + (0x1D483, "M", "b"), + (0x1D484, "M", "c"), + (0x1D485, "M", "d"), + (0x1D486, "M", "e"), + (0x1D487, "M", "f"), + (0x1D488, "M", "g"), + ] + + +def _seg_62() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D489, "M", "h"), + (0x1D48A, "M", "i"), + (0x1D48B, "M", "j"), + (0x1D48C, "M", "k"), + (0x1D48D, "M", "l"), + (0x1D48E, "M", "m"), + (0x1D48F, "M", "n"), + (0x1D490, "M", "o"), + (0x1D491, "M", "p"), + (0x1D492, "M", "q"), + (0x1D493, "M", "r"), + (0x1D494, "M", "s"), + (0x1D495, "M", "t"), + (0x1D496, "M", "u"), + (0x1D497, "M", "v"), + (0x1D498, "M", "w"), + (0x1D499, "M", "x"), + (0x1D49A, "M", "y"), + (0x1D49B, "M", "z"), + (0x1D49C, "M", "a"), + (0x1D49D, "X"), + (0x1D49E, "M", "c"), + (0x1D49F, "M", "d"), + (0x1D4A0, "X"), + (0x1D4A2, "M", "g"), + (0x1D4A3, "X"), + (0x1D4A5, "M", "j"), + (0x1D4A6, "M", "k"), + (0x1D4A7, "X"), + (0x1D4A9, "M", "n"), + (0x1D4AA, "M", "o"), + (0x1D4AB, "M", "p"), + (0x1D4AC, "M", "q"), + (0x1D4AD, "X"), + (0x1D4AE, "M", "s"), + (0x1D4AF, "M", "t"), + (0x1D4B0, "M", "u"), + (0x1D4B1, "M", "v"), + (0x1D4B2, "M", "w"), + (0x1D4B3, "M", "x"), + (0x1D4B4, "M", "y"), + (0x1D4B5, "M", "z"), + (0x1D4B6, "M", "a"), + (0x1D4B7, "M", "b"), + (0x1D4B8, "M", "c"), + (0x1D4B9, "M", "d"), + (0x1D4BA, "X"), + (0x1D4BB, "M", "f"), + (0x1D4BC, "X"), + (0x1D4BD, "M", "h"), + (0x1D4BE, "M", "i"), + (0x1D4BF, "M", "j"), + (0x1D4C0, "M", "k"), + (0x1D4C1, "M", "l"), + (0x1D4C2, "M", "m"), + (0x1D4C3, "M", "n"), + (0x1D4C4, "X"), + (0x1D4C5, "M", "p"), + (0x1D4C6, "M", "q"), + (0x1D4C7, "M", "r"), + (0x1D4C8, "M", "s"), + (0x1D4C9, "M", "t"), + (0x1D4CA, "M", "u"), + (0x1D4CB, "M", "v"), + (0x1D4CC, "M", "w"), + (0x1D4CD, "M", "x"), + (0x1D4CE, "M", "y"), + (0x1D4CF, "M", "z"), + (0x1D4D0, "M", "a"), + (0x1D4D1, "M", "b"), + (0x1D4D2, "M", "c"), + (0x1D4D3, "M", "d"), + (0x1D4D4, "M", "e"), + (0x1D4D5, "M", "f"), + (0x1D4D6, "M", "g"), + (0x1D4D7, "M", "h"), + (0x1D4D8, "M", "i"), + (0x1D4D9, "M", "j"), + (0x1D4DA, "M", "k"), + (0x1D4DB, "M", "l"), + (0x1D4DC, "M", "m"), + (0x1D4DD, "M", "n"), + (0x1D4DE, "M", "o"), + (0x1D4DF, "M", "p"), + (0x1D4E0, "M", "q"), + (0x1D4E1, "M", "r"), + (0x1D4E2, "M", "s"), + (0x1D4E3, "M", "t"), + (0x1D4E4, "M", "u"), + (0x1D4E5, "M", "v"), + (0x1D4E6, "M", "w"), + (0x1D4E7, "M", "x"), + (0x1D4E8, "M", "y"), + (0x1D4E9, "M", "z"), + (0x1D4EA, "M", "a"), + (0x1D4EB, "M", "b"), + (0x1D4EC, "M", "c"), + (0x1D4ED, "M", "d"), + (0x1D4EE, "M", "e"), + (0x1D4EF, "M", "f"), + ] + + +def _seg_63() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D4F0, "M", "g"), + (0x1D4F1, "M", "h"), + (0x1D4F2, "M", "i"), + (0x1D4F3, "M", "j"), + (0x1D4F4, "M", "k"), + (0x1D4F5, "M", "l"), + (0x1D4F6, "M", "m"), + (0x1D4F7, "M", "n"), + (0x1D4F8, "M", "o"), + (0x1D4F9, "M", "p"), + (0x1D4FA, "M", "q"), + (0x1D4FB, "M", "r"), + (0x1D4FC, "M", "s"), + (0x1D4FD, "M", "t"), + (0x1D4FE, "M", "u"), + (0x1D4FF, "M", "v"), + (0x1D500, "M", "w"), + (0x1D501, "M", "x"), + (0x1D502, "M", "y"), + (0x1D503, "M", "z"), + (0x1D504, "M", "a"), + (0x1D505, "M", "b"), + (0x1D506, "X"), + (0x1D507, "M", "d"), + (0x1D508, "M", "e"), + (0x1D509, "M", "f"), + (0x1D50A, "M", "g"), + (0x1D50B, "X"), + (0x1D50D, "M", "j"), + (0x1D50E, "M", "k"), + (0x1D50F, "M", "l"), + (0x1D510, "M", "m"), + (0x1D511, "M", "n"), + (0x1D512, "M", "o"), + (0x1D513, "M", "p"), + (0x1D514, "M", "q"), + (0x1D515, "X"), + (0x1D516, "M", "s"), + (0x1D517, "M", "t"), + (0x1D518, "M", "u"), + (0x1D519, "M", "v"), + (0x1D51A, "M", "w"), + (0x1D51B, "M", "x"), + (0x1D51C, "M", "y"), + (0x1D51D, "X"), + (0x1D51E, "M", "a"), + (0x1D51F, "M", "b"), + (0x1D520, "M", "c"), + (0x1D521, "M", "d"), + (0x1D522, "M", "e"), + (0x1D523, "M", "f"), + (0x1D524, "M", "g"), + (0x1D525, "M", "h"), + (0x1D526, "M", "i"), + (0x1D527, "M", "j"), + (0x1D528, "M", "k"), + (0x1D529, "M", "l"), + (0x1D52A, "M", "m"), + (0x1D52B, "M", "n"), + (0x1D52C, "M", "o"), + (0x1D52D, "M", "p"), + (0x1D52E, "M", "q"), + (0x1D52F, "M", "r"), + (0x1D530, "M", "s"), + (0x1D531, "M", "t"), + (0x1D532, "M", "u"), + (0x1D533, "M", "v"), + (0x1D534, "M", "w"), + (0x1D535, "M", "x"), + (0x1D536, "M", "y"), + (0x1D537, "M", "z"), + (0x1D538, "M", "a"), + (0x1D539, "M", "b"), + (0x1D53A, "X"), + (0x1D53B, "M", "d"), + (0x1D53C, "M", "e"), + (0x1D53D, "M", "f"), + (0x1D53E, "M", "g"), + (0x1D53F, "X"), + (0x1D540, "M", "i"), + (0x1D541, "M", "j"), + (0x1D542, "M", "k"), + (0x1D543, "M", "l"), + (0x1D544, "M", "m"), + (0x1D545, "X"), + (0x1D546, "M", "o"), + (0x1D547, "X"), + (0x1D54A, "M", "s"), + (0x1D54B, "M", "t"), + (0x1D54C, "M", "u"), + (0x1D54D, "M", "v"), + (0x1D54E, "M", "w"), + (0x1D54F, "M", "x"), + (0x1D550, "M", "y"), + (0x1D551, "X"), + (0x1D552, "M", "a"), + (0x1D553, "M", "b"), + (0x1D554, "M", "c"), + (0x1D555, "M", "d"), + (0x1D556, "M", "e"), + ] + + +def _seg_64() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D557, "M", "f"), + (0x1D558, "M", "g"), + (0x1D559, "M", "h"), + (0x1D55A, "M", "i"), + (0x1D55B, "M", "j"), + (0x1D55C, "M", "k"), + (0x1D55D, "M", "l"), + (0x1D55E, "M", "m"), + (0x1D55F, "M", "n"), + (0x1D560, "M", "o"), + (0x1D561, "M", "p"), + (0x1D562, "M", "q"), + (0x1D563, "M", "r"), + (0x1D564, "M", "s"), + (0x1D565, "M", "t"), + (0x1D566, "M", "u"), + (0x1D567, "M", "v"), + (0x1D568, "M", "w"), + (0x1D569, "M", "x"), + (0x1D56A, "M", "y"), + (0x1D56B, "M", "z"), + (0x1D56C, "M", "a"), + (0x1D56D, "M", "b"), + (0x1D56E, "M", "c"), + (0x1D56F, "M", "d"), + (0x1D570, "M", "e"), + (0x1D571, "M", "f"), + (0x1D572, "M", "g"), + (0x1D573, "M", "h"), + (0x1D574, "M", "i"), + (0x1D575, "M", "j"), + (0x1D576, "M", "k"), + (0x1D577, "M", "l"), + (0x1D578, "M", "m"), + (0x1D579, "M", "n"), + (0x1D57A, "M", "o"), + (0x1D57B, "M", "p"), + (0x1D57C, "M", "q"), + (0x1D57D, "M", "r"), + (0x1D57E, "M", "s"), + (0x1D57F, "M", "t"), + (0x1D580, "M", "u"), + (0x1D581, "M", "v"), + (0x1D582, "M", "w"), + (0x1D583, "M", "x"), + (0x1D584, "M", "y"), + (0x1D585, "M", "z"), + (0x1D586, "M", "a"), + (0x1D587, "M", "b"), + (0x1D588, "M", "c"), + (0x1D589, "M", "d"), + (0x1D58A, "M", "e"), + (0x1D58B, "M", "f"), + (0x1D58C, "M", "g"), + (0x1D58D, "M", "h"), + (0x1D58E, "M", "i"), + (0x1D58F, "M", "j"), + (0x1D590, "M", "k"), + (0x1D591, "M", "l"), + (0x1D592, "M", "m"), + (0x1D593, "M", "n"), + (0x1D594, "M", "o"), + (0x1D595, "M", "p"), + (0x1D596, "M", "q"), + (0x1D597, "M", "r"), + (0x1D598, "M", "s"), + (0x1D599, "M", "t"), + (0x1D59A, "M", "u"), + (0x1D59B, "M", "v"), + (0x1D59C, "M", "w"), + (0x1D59D, "M", "x"), + (0x1D59E, "M", "y"), + (0x1D59F, "M", "z"), + (0x1D5A0, "M", "a"), + (0x1D5A1, "M", "b"), + (0x1D5A2, "M", "c"), + (0x1D5A3, "M", "d"), + (0x1D5A4, "M", "e"), + (0x1D5A5, "M", "f"), + (0x1D5A6, "M", "g"), + (0x1D5A7, "M", "h"), + (0x1D5A8, "M", "i"), + (0x1D5A9, "M", "j"), + (0x1D5AA, "M", "k"), + (0x1D5AB, "M", "l"), + (0x1D5AC, "M", "m"), + (0x1D5AD, "M", "n"), + (0x1D5AE, "M", "o"), + (0x1D5AF, "M", "p"), + (0x1D5B0, "M", "q"), + (0x1D5B1, "M", "r"), + (0x1D5B2, "M", "s"), + (0x1D5B3, "M", "t"), + (0x1D5B4, "M", "u"), + (0x1D5B5, "M", "v"), + (0x1D5B6, "M", "w"), + (0x1D5B7, "M", "x"), + (0x1D5B8, "M", "y"), + (0x1D5B9, "M", "z"), + (0x1D5BA, "M", "a"), + ] + + +def _seg_65() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D5BB, "M", "b"), + (0x1D5BC, "M", "c"), + (0x1D5BD, "M", "d"), + (0x1D5BE, "M", "e"), + (0x1D5BF, "M", "f"), + (0x1D5C0, "M", "g"), + (0x1D5C1, "M", "h"), + (0x1D5C2, "M", "i"), + (0x1D5C3, "M", "j"), + (0x1D5C4, "M", "k"), + (0x1D5C5, "M", "l"), + (0x1D5C6, "M", "m"), + (0x1D5C7, "M", "n"), + (0x1D5C8, "M", "o"), + (0x1D5C9, "M", "p"), + (0x1D5CA, "M", "q"), + (0x1D5CB, "M", "r"), + (0x1D5CC, "M", "s"), + (0x1D5CD, "M", "t"), + (0x1D5CE, "M", "u"), + (0x1D5CF, "M", "v"), + (0x1D5D0, "M", "w"), + (0x1D5D1, "M", "x"), + (0x1D5D2, "M", "y"), + (0x1D5D3, "M", "z"), + (0x1D5D4, "M", "a"), + (0x1D5D5, "M", "b"), + (0x1D5D6, "M", "c"), + (0x1D5D7, "M", "d"), + (0x1D5D8, "M", "e"), + (0x1D5D9, "M", "f"), + (0x1D5DA, "M", "g"), + (0x1D5DB, "M", "h"), + (0x1D5DC, "M", "i"), + (0x1D5DD, "M", "j"), + (0x1D5DE, "M", "k"), + (0x1D5DF, "M", "l"), + (0x1D5E0, "M", "m"), + (0x1D5E1, "M", "n"), + (0x1D5E2, "M", "o"), + (0x1D5E3, "M", "p"), + (0x1D5E4, "M", "q"), + (0x1D5E5, "M", "r"), + (0x1D5E6, "M", "s"), + (0x1D5E7, "M", "t"), + (0x1D5E8, "M", "u"), + (0x1D5E9, "M", "v"), + (0x1D5EA, "M", "w"), + (0x1D5EB, "M", "x"), + (0x1D5EC, "M", "y"), + (0x1D5ED, "M", "z"), + (0x1D5EE, "M", "a"), + (0x1D5EF, "M", "b"), + (0x1D5F0, "M", "c"), + (0x1D5F1, "M", "d"), + (0x1D5F2, "M", "e"), + (0x1D5F3, "M", "f"), + (0x1D5F4, "M", "g"), + (0x1D5F5, "M", "h"), + (0x1D5F6, "M", "i"), + (0x1D5F7, "M", "j"), + (0x1D5F8, "M", "k"), + (0x1D5F9, "M", "l"), + (0x1D5FA, "M", "m"), + (0x1D5FB, "M", "n"), + (0x1D5FC, "M", "o"), + (0x1D5FD, "M", "p"), + (0x1D5FE, "M", "q"), + (0x1D5FF, "M", "r"), + (0x1D600, "M", "s"), + (0x1D601, "M", "t"), + (0x1D602, "M", "u"), + (0x1D603, "M", "v"), + (0x1D604, "M", "w"), + (0x1D605, "M", "x"), + (0x1D606, "M", "y"), + (0x1D607, "M", "z"), + (0x1D608, "M", "a"), + (0x1D609, "M", "b"), + (0x1D60A, "M", "c"), + (0x1D60B, "M", "d"), + (0x1D60C, "M", "e"), + (0x1D60D, "M", "f"), + (0x1D60E, "M", "g"), + (0x1D60F, "M", "h"), + (0x1D610, "M", "i"), + (0x1D611, "M", "j"), + (0x1D612, "M", "k"), + (0x1D613, "M", "l"), + (0x1D614, "M", "m"), + (0x1D615, "M", "n"), + (0x1D616, "M", "o"), + (0x1D617, "M", "p"), + (0x1D618, "M", "q"), + (0x1D619, "M", "r"), + (0x1D61A, "M", "s"), + (0x1D61B, "M", "t"), + (0x1D61C, "M", "u"), + (0x1D61D, "M", "v"), + (0x1D61E, "M", "w"), + ] + + +def _seg_66() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D61F, "M", "x"), + (0x1D620, "M", "y"), + (0x1D621, "M", "z"), + (0x1D622, "M", "a"), + (0x1D623, "M", "b"), + (0x1D624, "M", "c"), + (0x1D625, "M", "d"), + (0x1D626, "M", "e"), + (0x1D627, "M", "f"), + (0x1D628, "M", "g"), + (0x1D629, "M", "h"), + (0x1D62A, "M", "i"), + (0x1D62B, "M", "j"), + (0x1D62C, "M", "k"), + (0x1D62D, "M", "l"), + (0x1D62E, "M", "m"), + (0x1D62F, "M", "n"), + (0x1D630, "M", "o"), + (0x1D631, "M", "p"), + (0x1D632, "M", "q"), + (0x1D633, "M", "r"), + (0x1D634, "M", "s"), + (0x1D635, "M", "t"), + (0x1D636, "M", "u"), + (0x1D637, "M", "v"), + (0x1D638, "M", "w"), + (0x1D639, "M", "x"), + (0x1D63A, "M", "y"), + (0x1D63B, "M", "z"), + (0x1D63C, "M", "a"), + (0x1D63D, "M", "b"), + (0x1D63E, "M", "c"), + (0x1D63F, "M", "d"), + (0x1D640, "M", "e"), + (0x1D641, "M", "f"), + (0x1D642, "M", "g"), + (0x1D643, "M", "h"), + (0x1D644, "M", "i"), + (0x1D645, "M", "j"), + (0x1D646, "M", "k"), + (0x1D647, "M", "l"), + (0x1D648, "M", "m"), + (0x1D649, "M", "n"), + (0x1D64A, "M", "o"), + (0x1D64B, "M", "p"), + (0x1D64C, "M", "q"), + (0x1D64D, "M", "r"), + (0x1D64E, "M", "s"), + (0x1D64F, "M", "t"), + (0x1D650, "M", "u"), + (0x1D651, "M", "v"), + (0x1D652, "M", "w"), + (0x1D653, "M", "x"), + (0x1D654, "M", "y"), + (0x1D655, "M", "z"), + (0x1D656, "M", "a"), + (0x1D657, "M", "b"), + (0x1D658, "M", "c"), + (0x1D659, "M", "d"), + (0x1D65A, "M", "e"), + (0x1D65B, "M", "f"), + (0x1D65C, "M", "g"), + (0x1D65D, "M", "h"), + (0x1D65E, "M", "i"), + (0x1D65F, "M", "j"), + (0x1D660, "M", "k"), + (0x1D661, "M", "l"), + (0x1D662, "M", "m"), + (0x1D663, "M", "n"), + (0x1D664, "M", "o"), + (0x1D665, "M", "p"), + (0x1D666, "M", "q"), + (0x1D667, "M", "r"), + (0x1D668, "M", "s"), + (0x1D669, "M", "t"), + (0x1D66A, "M", "u"), + (0x1D66B, "M", "v"), + (0x1D66C, "M", "w"), + (0x1D66D, "M", "x"), + (0x1D66E, "M", "y"), + (0x1D66F, "M", "z"), + (0x1D670, "M", "a"), + (0x1D671, "M", "b"), + (0x1D672, "M", "c"), + (0x1D673, "M", "d"), + (0x1D674, "M", "e"), + (0x1D675, "M", "f"), + (0x1D676, "M", "g"), + (0x1D677, "M", "h"), + (0x1D678, "M", "i"), + (0x1D679, "M", "j"), + (0x1D67A, "M", "k"), + (0x1D67B, "M", "l"), + (0x1D67C, "M", "m"), + (0x1D67D, "M", "n"), + (0x1D67E, "M", "o"), + (0x1D67F, "M", "p"), + (0x1D680, "M", "q"), + (0x1D681, "M", "r"), + (0x1D682, "M", "s"), + ] + + +def _seg_67() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D683, "M", "t"), + (0x1D684, "M", "u"), + (0x1D685, "M", "v"), + (0x1D686, "M", "w"), + (0x1D687, "M", "x"), + (0x1D688, "M", "y"), + (0x1D689, "M", "z"), + (0x1D68A, "M", "a"), + (0x1D68B, "M", "b"), + (0x1D68C, "M", "c"), + (0x1D68D, "M", "d"), + (0x1D68E, "M", "e"), + (0x1D68F, "M", "f"), + (0x1D690, "M", "g"), + (0x1D691, "M", "h"), + (0x1D692, "M", "i"), + (0x1D693, "M", "j"), + (0x1D694, "M", "k"), + (0x1D695, "M", "l"), + (0x1D696, "M", "m"), + (0x1D697, "M", "n"), + (0x1D698, "M", "o"), + (0x1D699, "M", "p"), + (0x1D69A, "M", "q"), + (0x1D69B, "M", "r"), + (0x1D69C, "M", "s"), + (0x1D69D, "M", "t"), + (0x1D69E, "M", "u"), + (0x1D69F, "M", "v"), + (0x1D6A0, "M", "w"), + (0x1D6A1, "M", "x"), + (0x1D6A2, "M", "y"), + (0x1D6A3, "M", "z"), + (0x1D6A4, "M", "ı"), + (0x1D6A5, "M", "ȷ"), + (0x1D6A6, "X"), + (0x1D6A8, "M", "α"), + (0x1D6A9, "M", "β"), + (0x1D6AA, "M", "γ"), + (0x1D6AB, "M", "δ"), + (0x1D6AC, "M", "ε"), + (0x1D6AD, "M", "ζ"), + (0x1D6AE, "M", "η"), + (0x1D6AF, "M", "θ"), + (0x1D6B0, "M", "ι"), + (0x1D6B1, "M", "κ"), + (0x1D6B2, "M", "λ"), + (0x1D6B3, "M", "μ"), + (0x1D6B4, "M", "ν"), + (0x1D6B5, "M", "ξ"), + (0x1D6B6, "M", "ο"), + (0x1D6B7, "M", "π"), + (0x1D6B8, "M", "ρ"), + (0x1D6B9, "M", "θ"), + (0x1D6BA, "M", "σ"), + (0x1D6BB, "M", "τ"), + (0x1D6BC, "M", "υ"), + (0x1D6BD, "M", "φ"), + (0x1D6BE, "M", "χ"), + (0x1D6BF, "M", "ψ"), + (0x1D6C0, "M", "ω"), + (0x1D6C1, "M", "∇"), + (0x1D6C2, "M", "α"), + (0x1D6C3, "M", "β"), + (0x1D6C4, "M", "γ"), + (0x1D6C5, "M", "δ"), + (0x1D6C6, "M", "ε"), + (0x1D6C7, "M", "ζ"), + (0x1D6C8, "M", "η"), + (0x1D6C9, "M", "θ"), + (0x1D6CA, "M", "ι"), + (0x1D6CB, "M", "κ"), + (0x1D6CC, "M", "λ"), + (0x1D6CD, "M", "μ"), + (0x1D6CE, "M", "ν"), + (0x1D6CF, "M", "ξ"), + (0x1D6D0, "M", "ο"), + (0x1D6D1, "M", "π"), + (0x1D6D2, "M", "ρ"), + (0x1D6D3, "M", "σ"), + (0x1D6D5, "M", "τ"), + (0x1D6D6, "M", "υ"), + (0x1D6D7, "M", "φ"), + (0x1D6D8, "M", "χ"), + (0x1D6D9, "M", "ψ"), + (0x1D6DA, "M", "ω"), + (0x1D6DB, "M", "∂"), + (0x1D6DC, "M", "ε"), + (0x1D6DD, "M", "θ"), + (0x1D6DE, "M", "κ"), + (0x1D6DF, "M", "φ"), + (0x1D6E0, "M", "ρ"), + (0x1D6E1, "M", "π"), + (0x1D6E2, "M", "α"), + (0x1D6E3, "M", "β"), + (0x1D6E4, "M", "γ"), + (0x1D6E5, "M", "δ"), + (0x1D6E6, "M", "ε"), + (0x1D6E7, "M", "ζ"), + (0x1D6E8, "M", "η"), + ] + + +def _seg_68() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D6E9, "M", "θ"), + (0x1D6EA, "M", "ι"), + (0x1D6EB, "M", "κ"), + (0x1D6EC, "M", "λ"), + (0x1D6ED, "M", "μ"), + (0x1D6EE, "M", "ν"), + (0x1D6EF, "M", "ξ"), + (0x1D6F0, "M", "ο"), + (0x1D6F1, "M", "π"), + (0x1D6F2, "M", "ρ"), + (0x1D6F3, "M", "θ"), + (0x1D6F4, "M", "σ"), + (0x1D6F5, "M", "τ"), + (0x1D6F6, "M", "υ"), + (0x1D6F7, "M", "φ"), + (0x1D6F8, "M", "χ"), + (0x1D6F9, "M", "ψ"), + (0x1D6FA, "M", "ω"), + (0x1D6FB, "M", "∇"), + (0x1D6FC, "M", "α"), + (0x1D6FD, "M", "β"), + (0x1D6FE, "M", "γ"), + (0x1D6FF, "M", "δ"), + (0x1D700, "M", "ε"), + (0x1D701, "M", "ζ"), + (0x1D702, "M", "η"), + (0x1D703, "M", "θ"), + (0x1D704, "M", "ι"), + (0x1D705, "M", "κ"), + (0x1D706, "M", "λ"), + (0x1D707, "M", "μ"), + (0x1D708, "M", "ν"), + (0x1D709, "M", "ξ"), + (0x1D70A, "M", "ο"), + (0x1D70B, "M", "π"), + (0x1D70C, "M", "ρ"), + (0x1D70D, "M", "σ"), + (0x1D70F, "M", "τ"), + (0x1D710, "M", "υ"), + (0x1D711, "M", "φ"), + (0x1D712, "M", "χ"), + (0x1D713, "M", "ψ"), + (0x1D714, "M", "ω"), + (0x1D715, "M", "∂"), + (0x1D716, "M", "ε"), + (0x1D717, "M", "θ"), + (0x1D718, "M", "κ"), + (0x1D719, "M", "φ"), + (0x1D71A, "M", "ρ"), + (0x1D71B, "M", "π"), + (0x1D71C, "M", "α"), + (0x1D71D, "M", "β"), + (0x1D71E, "M", "γ"), + (0x1D71F, "M", "δ"), + (0x1D720, "M", "ε"), + (0x1D721, "M", "ζ"), + (0x1D722, "M", "η"), + (0x1D723, "M", "θ"), + (0x1D724, "M", "ι"), + (0x1D725, "M", "κ"), + (0x1D726, "M", "λ"), + (0x1D727, "M", "μ"), + (0x1D728, "M", "ν"), + (0x1D729, "M", "ξ"), + (0x1D72A, "M", "ο"), + (0x1D72B, "M", "π"), + (0x1D72C, "M", "ρ"), + (0x1D72D, "M", "θ"), + (0x1D72E, "M", "σ"), + (0x1D72F, "M", "τ"), + (0x1D730, "M", "υ"), + (0x1D731, "M", "φ"), + (0x1D732, "M", "χ"), + (0x1D733, "M", "ψ"), + (0x1D734, "M", "ω"), + (0x1D735, "M", "∇"), + (0x1D736, "M", "α"), + (0x1D737, "M", "β"), + (0x1D738, "M", "γ"), + (0x1D739, "M", "δ"), + (0x1D73A, "M", "ε"), + (0x1D73B, "M", "ζ"), + (0x1D73C, "M", "η"), + (0x1D73D, "M", "θ"), + (0x1D73E, "M", "ι"), + (0x1D73F, "M", "κ"), + (0x1D740, "M", "λ"), + (0x1D741, "M", "μ"), + (0x1D742, "M", "ν"), + (0x1D743, "M", "ξ"), + (0x1D744, "M", "ο"), + (0x1D745, "M", "π"), + (0x1D746, "M", "ρ"), + (0x1D747, "M", "σ"), + (0x1D749, "M", "τ"), + (0x1D74A, "M", "υ"), + (0x1D74B, "M", "φ"), + (0x1D74C, "M", "χ"), + (0x1D74D, "M", "ψ"), + (0x1D74E, "M", "ω"), + ] + + +def _seg_69() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D74F, "M", "∂"), + (0x1D750, "M", "ε"), + (0x1D751, "M", "θ"), + (0x1D752, "M", "κ"), + (0x1D753, "M", "φ"), + (0x1D754, "M", "ρ"), + (0x1D755, "M", "π"), + (0x1D756, "M", "α"), + (0x1D757, "M", "β"), + (0x1D758, "M", "γ"), + (0x1D759, "M", "δ"), + (0x1D75A, "M", "ε"), + (0x1D75B, "M", "ζ"), + (0x1D75C, "M", "η"), + (0x1D75D, "M", "θ"), + (0x1D75E, "M", "ι"), + (0x1D75F, "M", "κ"), + (0x1D760, "M", "λ"), + (0x1D761, "M", "μ"), + (0x1D762, "M", "ν"), + (0x1D763, "M", "ξ"), + (0x1D764, "M", "ο"), + (0x1D765, "M", "π"), + (0x1D766, "M", "ρ"), + (0x1D767, "M", "θ"), + (0x1D768, "M", "σ"), + (0x1D769, "M", "τ"), + (0x1D76A, "M", "υ"), + (0x1D76B, "M", "φ"), + (0x1D76C, "M", "χ"), + (0x1D76D, "M", "ψ"), + (0x1D76E, "M", "ω"), + (0x1D76F, "M", "∇"), + (0x1D770, "M", "α"), + (0x1D771, "M", "β"), + (0x1D772, "M", "γ"), + (0x1D773, "M", "δ"), + (0x1D774, "M", "ε"), + (0x1D775, "M", "ζ"), + (0x1D776, "M", "η"), + (0x1D777, "M", "θ"), + (0x1D778, "M", "ι"), + (0x1D779, "M", "κ"), + (0x1D77A, "M", "λ"), + (0x1D77B, "M", "μ"), + (0x1D77C, "M", "ν"), + (0x1D77D, "M", "ξ"), + (0x1D77E, "M", "ο"), + (0x1D77F, "M", "π"), + (0x1D780, "M", "ρ"), + (0x1D781, "M", "σ"), + (0x1D783, "M", "τ"), + (0x1D784, "M", "υ"), + (0x1D785, "M", "φ"), + (0x1D786, "M", "χ"), + (0x1D787, "M", "ψ"), + (0x1D788, "M", "ω"), + (0x1D789, "M", "∂"), + (0x1D78A, "M", "ε"), + (0x1D78B, "M", "θ"), + (0x1D78C, "M", "κ"), + (0x1D78D, "M", "φ"), + (0x1D78E, "M", "ρ"), + (0x1D78F, "M", "π"), + (0x1D790, "M", "α"), + (0x1D791, "M", "β"), + (0x1D792, "M", "γ"), + (0x1D793, "M", "δ"), + (0x1D794, "M", "ε"), + (0x1D795, "M", "ζ"), + (0x1D796, "M", "η"), + (0x1D797, "M", "θ"), + (0x1D798, "M", "ι"), + (0x1D799, "M", "κ"), + (0x1D79A, "M", "λ"), + (0x1D79B, "M", "μ"), + (0x1D79C, "M", "ν"), + (0x1D79D, "M", "ξ"), + (0x1D79E, "M", "ο"), + (0x1D79F, "M", "π"), + (0x1D7A0, "M", "ρ"), + (0x1D7A1, "M", "θ"), + (0x1D7A2, "M", "σ"), + (0x1D7A3, "M", "τ"), + (0x1D7A4, "M", "υ"), + (0x1D7A5, "M", "φ"), + (0x1D7A6, "M", "χ"), + (0x1D7A7, "M", "ψ"), + (0x1D7A8, "M", "ω"), + (0x1D7A9, "M", "∇"), + (0x1D7AA, "M", "α"), + (0x1D7AB, "M", "β"), + (0x1D7AC, "M", "γ"), + (0x1D7AD, "M", "δ"), + (0x1D7AE, "M", "ε"), + (0x1D7AF, "M", "ζ"), + (0x1D7B0, "M", "η"), + (0x1D7B1, "M", "θ"), + (0x1D7B2, "M", "ι"), + (0x1D7B3, "M", "κ"), + ] + + +def _seg_70() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1D7B4, "M", "λ"), + (0x1D7B5, "M", "μ"), + (0x1D7B6, "M", "ν"), + (0x1D7B7, "M", "ξ"), + (0x1D7B8, "M", "ο"), + (0x1D7B9, "M", "π"), + (0x1D7BA, "M", "ρ"), + (0x1D7BB, "M", "σ"), + (0x1D7BD, "M", "τ"), + (0x1D7BE, "M", "υ"), + (0x1D7BF, "M", "φ"), + (0x1D7C0, "M", "χ"), + (0x1D7C1, "M", "ψ"), + (0x1D7C2, "M", "ω"), + (0x1D7C3, "M", "∂"), + (0x1D7C4, "M", "ε"), + (0x1D7C5, "M", "θ"), + (0x1D7C6, "M", "κ"), + (0x1D7C7, "M", "φ"), + (0x1D7C8, "M", "ρ"), + (0x1D7C9, "M", "π"), + (0x1D7CA, "M", "ϝ"), + (0x1D7CC, "X"), + (0x1D7CE, "M", "0"), + (0x1D7CF, "M", "1"), + (0x1D7D0, "M", "2"), + (0x1D7D1, "M", "3"), + (0x1D7D2, "M", "4"), + (0x1D7D3, "M", "5"), + (0x1D7D4, "M", "6"), + (0x1D7D5, "M", "7"), + (0x1D7D6, "M", "8"), + (0x1D7D7, "M", "9"), + (0x1D7D8, "M", "0"), + (0x1D7D9, "M", "1"), + (0x1D7DA, "M", "2"), + (0x1D7DB, "M", "3"), + (0x1D7DC, "M", "4"), + (0x1D7DD, "M", "5"), + (0x1D7DE, "M", "6"), + (0x1D7DF, "M", "7"), + (0x1D7E0, "M", "8"), + (0x1D7E1, "M", "9"), + (0x1D7E2, "M", "0"), + (0x1D7E3, "M", "1"), + (0x1D7E4, "M", "2"), + (0x1D7E5, "M", "3"), + (0x1D7E6, "M", "4"), + (0x1D7E7, "M", "5"), + (0x1D7E8, "M", "6"), + (0x1D7E9, "M", "7"), + (0x1D7EA, "M", "8"), + (0x1D7EB, "M", "9"), + (0x1D7EC, "M", "0"), + (0x1D7ED, "M", "1"), + (0x1D7EE, "M", "2"), + (0x1D7EF, "M", "3"), + (0x1D7F0, "M", "4"), + (0x1D7F1, "M", "5"), + (0x1D7F2, "M", "6"), + (0x1D7F3, "M", "7"), + (0x1D7F4, "M", "8"), + (0x1D7F5, "M", "9"), + (0x1D7F6, "M", "0"), + (0x1D7F7, "M", "1"), + (0x1D7F8, "M", "2"), + (0x1D7F9, "M", "3"), + (0x1D7FA, "M", "4"), + (0x1D7FB, "M", "5"), + (0x1D7FC, "M", "6"), + (0x1D7FD, "M", "7"), + (0x1D7FE, "M", "8"), + (0x1D7FF, "M", "9"), + (0x1D800, "V"), + (0x1DA8C, "X"), + (0x1DA9B, "V"), + (0x1DAA0, "X"), + (0x1DAA1, "V"), + (0x1DAB0, "X"), + (0x1DF00, "V"), + (0x1DF1F, "X"), + (0x1DF25, "V"), + (0x1DF2B, "X"), + (0x1E000, "V"), + (0x1E007, "X"), + (0x1E008, "V"), + (0x1E019, "X"), + (0x1E01B, "V"), + (0x1E022, "X"), + (0x1E023, "V"), + (0x1E025, "X"), + (0x1E026, "V"), + (0x1E02B, "X"), + (0x1E030, "M", "а"), + (0x1E031, "M", "б"), + (0x1E032, "M", "в"), + (0x1E033, "M", "г"), + (0x1E034, "M", "д"), + (0x1E035, "M", "е"), + (0x1E036, "M", "ж"), + ] + + +def _seg_71() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1E037, "M", "з"), + (0x1E038, "M", "и"), + (0x1E039, "M", "к"), + (0x1E03A, "M", "л"), + (0x1E03B, "M", "м"), + (0x1E03C, "M", "о"), + (0x1E03D, "M", "п"), + (0x1E03E, "M", "р"), + (0x1E03F, "M", "с"), + (0x1E040, "M", "т"), + (0x1E041, "M", "у"), + (0x1E042, "M", "ф"), + (0x1E043, "M", "х"), + (0x1E044, "M", "ц"), + (0x1E045, "M", "ч"), + (0x1E046, "M", "ш"), + (0x1E047, "M", "ы"), + (0x1E048, "M", "э"), + (0x1E049, "M", "ю"), + (0x1E04A, "M", "ꚉ"), + (0x1E04B, "M", "ә"), + (0x1E04C, "M", "і"), + (0x1E04D, "M", "ј"), + (0x1E04E, "M", "ө"), + (0x1E04F, "M", "ү"), + (0x1E050, "M", "ӏ"), + (0x1E051, "M", "а"), + (0x1E052, "M", "б"), + (0x1E053, "M", "в"), + (0x1E054, "M", "г"), + (0x1E055, "M", "д"), + (0x1E056, "M", "е"), + (0x1E057, "M", "ж"), + (0x1E058, "M", "з"), + (0x1E059, "M", "и"), + (0x1E05A, "M", "к"), + (0x1E05B, "M", "л"), + (0x1E05C, "M", "о"), + (0x1E05D, "M", "п"), + (0x1E05E, "M", "с"), + (0x1E05F, "M", "у"), + (0x1E060, "M", "ф"), + (0x1E061, "M", "х"), + (0x1E062, "M", "ц"), + (0x1E063, "M", "ч"), + (0x1E064, "M", "ш"), + (0x1E065, "M", "ъ"), + (0x1E066, "M", "ы"), + (0x1E067, "M", "ґ"), + (0x1E068, "M", "і"), + (0x1E069, "M", "ѕ"), + (0x1E06A, "M", "џ"), + (0x1E06B, "M", "ҫ"), + (0x1E06C, "M", "ꙑ"), + (0x1E06D, "M", "ұ"), + (0x1E06E, "X"), + (0x1E08F, "V"), + (0x1E090, "X"), + (0x1E100, "V"), + (0x1E12D, "X"), + (0x1E130, "V"), + (0x1E13E, "X"), + (0x1E140, "V"), + (0x1E14A, "X"), + (0x1E14E, "V"), + (0x1E150, "X"), + (0x1E290, "V"), + (0x1E2AF, "X"), + (0x1E2C0, "V"), + (0x1E2FA, "X"), + (0x1E2FF, "V"), + (0x1E300, "X"), + (0x1E4D0, "V"), + (0x1E4FA, "X"), + (0x1E7E0, "V"), + (0x1E7E7, "X"), + (0x1E7E8, "V"), + (0x1E7EC, "X"), + (0x1E7ED, "V"), + (0x1E7EF, "X"), + (0x1E7F0, "V"), + (0x1E7FF, "X"), + (0x1E800, "V"), + (0x1E8C5, "X"), + (0x1E8C7, "V"), + (0x1E8D7, "X"), + (0x1E900, "M", "𞤢"), + (0x1E901, "M", "𞤣"), + (0x1E902, "M", "𞤤"), + (0x1E903, "M", "𞤥"), + (0x1E904, "M", "𞤦"), + (0x1E905, "M", "𞤧"), + (0x1E906, "M", "𞤨"), + (0x1E907, "M", "𞤩"), + (0x1E908, "M", "𞤪"), + (0x1E909, "M", "𞤫"), + (0x1E90A, "M", "𞤬"), + (0x1E90B, "M", "𞤭"), + (0x1E90C, "M", "𞤮"), + (0x1E90D, "M", "𞤯"), + ] + + +def _seg_72() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1E90E, "M", "𞤰"), + (0x1E90F, "M", "𞤱"), + (0x1E910, "M", "𞤲"), + (0x1E911, "M", "𞤳"), + (0x1E912, "M", "𞤴"), + (0x1E913, "M", "𞤵"), + (0x1E914, "M", "𞤶"), + (0x1E915, "M", "𞤷"), + (0x1E916, "M", "𞤸"), + (0x1E917, "M", "𞤹"), + (0x1E918, "M", "𞤺"), + (0x1E919, "M", "𞤻"), + (0x1E91A, "M", "𞤼"), + (0x1E91B, "M", "𞤽"), + (0x1E91C, "M", "𞤾"), + (0x1E91D, "M", "𞤿"), + (0x1E91E, "M", "𞥀"), + (0x1E91F, "M", "𞥁"), + (0x1E920, "M", "𞥂"), + (0x1E921, "M", "𞥃"), + (0x1E922, "V"), + (0x1E94C, "X"), + (0x1E950, "V"), + (0x1E95A, "X"), + (0x1E95E, "V"), + (0x1E960, "X"), + (0x1EC71, "V"), + (0x1ECB5, "X"), + (0x1ED01, "V"), + (0x1ED3E, "X"), + (0x1EE00, "M", "ا"), + (0x1EE01, "M", "ب"), + (0x1EE02, "M", "ج"), + (0x1EE03, "M", "د"), + (0x1EE04, "X"), + (0x1EE05, "M", "و"), + (0x1EE06, "M", "ز"), + (0x1EE07, "M", "ح"), + (0x1EE08, "M", "ط"), + (0x1EE09, "M", "ي"), + (0x1EE0A, "M", "ك"), + (0x1EE0B, "M", "ل"), + (0x1EE0C, "M", "م"), + (0x1EE0D, "M", "ن"), + (0x1EE0E, "M", "س"), + (0x1EE0F, "M", "ع"), + (0x1EE10, "M", "ف"), + (0x1EE11, "M", "ص"), + (0x1EE12, "M", "ق"), + (0x1EE13, "M", "ر"), + (0x1EE14, "M", "ش"), + (0x1EE15, "M", "ت"), + (0x1EE16, "M", "ث"), + (0x1EE17, "M", "خ"), + (0x1EE18, "M", "ذ"), + (0x1EE19, "M", "ض"), + (0x1EE1A, "M", "ظ"), + (0x1EE1B, "M", "غ"), + (0x1EE1C, "M", "ٮ"), + (0x1EE1D, "M", "ں"), + (0x1EE1E, "M", "ڡ"), + (0x1EE1F, "M", "ٯ"), + (0x1EE20, "X"), + (0x1EE21, "M", "ب"), + (0x1EE22, "M", "ج"), + (0x1EE23, "X"), + (0x1EE24, "M", "ه"), + (0x1EE25, "X"), + (0x1EE27, "M", "ح"), + (0x1EE28, "X"), + (0x1EE29, "M", "ي"), + (0x1EE2A, "M", "ك"), + (0x1EE2B, "M", "ل"), + (0x1EE2C, "M", "م"), + (0x1EE2D, "M", "ن"), + (0x1EE2E, "M", "س"), + (0x1EE2F, "M", "ع"), + (0x1EE30, "M", "ف"), + (0x1EE31, "M", "ص"), + (0x1EE32, "M", "ق"), + (0x1EE33, "X"), + (0x1EE34, "M", "ش"), + (0x1EE35, "M", "ت"), + (0x1EE36, "M", "ث"), + (0x1EE37, "M", "خ"), + (0x1EE38, "X"), + (0x1EE39, "M", "ض"), + (0x1EE3A, "X"), + (0x1EE3B, "M", "غ"), + (0x1EE3C, "X"), + (0x1EE42, "M", "ج"), + (0x1EE43, "X"), + (0x1EE47, "M", "ح"), + (0x1EE48, "X"), + (0x1EE49, "M", "ي"), + (0x1EE4A, "X"), + (0x1EE4B, "M", "ل"), + (0x1EE4C, "X"), + (0x1EE4D, "M", "ن"), + (0x1EE4E, "M", "س"), + ] + + +def _seg_73() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1EE4F, "M", "ع"), + (0x1EE50, "X"), + (0x1EE51, "M", "ص"), + (0x1EE52, "M", "ق"), + (0x1EE53, "X"), + (0x1EE54, "M", "ش"), + (0x1EE55, "X"), + (0x1EE57, "M", "خ"), + (0x1EE58, "X"), + (0x1EE59, "M", "ض"), + (0x1EE5A, "X"), + (0x1EE5B, "M", "غ"), + (0x1EE5C, "X"), + (0x1EE5D, "M", "ں"), + (0x1EE5E, "X"), + (0x1EE5F, "M", "ٯ"), + (0x1EE60, "X"), + (0x1EE61, "M", "ب"), + (0x1EE62, "M", "ج"), + (0x1EE63, "X"), + (0x1EE64, "M", "ه"), + (0x1EE65, "X"), + (0x1EE67, "M", "ح"), + (0x1EE68, "M", "ط"), + (0x1EE69, "M", "ي"), + (0x1EE6A, "M", "ك"), + (0x1EE6B, "X"), + (0x1EE6C, "M", "م"), + (0x1EE6D, "M", "ن"), + (0x1EE6E, "M", "س"), + (0x1EE6F, "M", "ع"), + (0x1EE70, "M", "ف"), + (0x1EE71, "M", "ص"), + (0x1EE72, "M", "ق"), + (0x1EE73, "X"), + (0x1EE74, "M", "ش"), + (0x1EE75, "M", "ت"), + (0x1EE76, "M", "ث"), + (0x1EE77, "M", "خ"), + (0x1EE78, "X"), + (0x1EE79, "M", "ض"), + (0x1EE7A, "M", "ظ"), + (0x1EE7B, "M", "غ"), + (0x1EE7C, "M", "ٮ"), + (0x1EE7D, "X"), + (0x1EE7E, "M", "ڡ"), + (0x1EE7F, "X"), + (0x1EE80, "M", "ا"), + (0x1EE81, "M", "ب"), + (0x1EE82, "M", "ج"), + (0x1EE83, "M", "د"), + (0x1EE84, "M", "ه"), + (0x1EE85, "M", "و"), + (0x1EE86, "M", "ز"), + (0x1EE87, "M", "ح"), + (0x1EE88, "M", "ط"), + (0x1EE89, "M", "ي"), + (0x1EE8A, "X"), + (0x1EE8B, "M", "ل"), + (0x1EE8C, "M", "م"), + (0x1EE8D, "M", "ن"), + (0x1EE8E, "M", "س"), + (0x1EE8F, "M", "ع"), + (0x1EE90, "M", "ف"), + (0x1EE91, "M", "ص"), + (0x1EE92, "M", "ق"), + (0x1EE93, "M", "ر"), + (0x1EE94, "M", "ش"), + (0x1EE95, "M", "ت"), + (0x1EE96, "M", "ث"), + (0x1EE97, "M", "خ"), + (0x1EE98, "M", "ذ"), + (0x1EE99, "M", "ض"), + (0x1EE9A, "M", "ظ"), + (0x1EE9B, "M", "غ"), + (0x1EE9C, "X"), + (0x1EEA1, "M", "ب"), + (0x1EEA2, "M", "ج"), + (0x1EEA3, "M", "د"), + (0x1EEA4, "X"), + (0x1EEA5, "M", "و"), + (0x1EEA6, "M", "ز"), + (0x1EEA7, "M", "ح"), + (0x1EEA8, "M", "ط"), + (0x1EEA9, "M", "ي"), + (0x1EEAA, "X"), + (0x1EEAB, "M", "ل"), + (0x1EEAC, "M", "م"), + (0x1EEAD, "M", "ن"), + (0x1EEAE, "M", "س"), + (0x1EEAF, "M", "ع"), + (0x1EEB0, "M", "ف"), + (0x1EEB1, "M", "ص"), + (0x1EEB2, "M", "ق"), + (0x1EEB3, "M", "ر"), + (0x1EEB4, "M", "ش"), + (0x1EEB5, "M", "ت"), + (0x1EEB6, "M", "ث"), + (0x1EEB7, "M", "خ"), + (0x1EEB8, "M", "ذ"), + ] + + +def _seg_74() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1EEB9, "M", "ض"), + (0x1EEBA, "M", "ظ"), + (0x1EEBB, "M", "غ"), + (0x1EEBC, "X"), + (0x1EEF0, "V"), + (0x1EEF2, "X"), + (0x1F000, "V"), + (0x1F02C, "X"), + (0x1F030, "V"), + (0x1F094, "X"), + (0x1F0A0, "V"), + (0x1F0AF, "X"), + (0x1F0B1, "V"), + (0x1F0C0, "X"), + (0x1F0C1, "V"), + (0x1F0D0, "X"), + (0x1F0D1, "V"), + (0x1F0F6, "X"), + (0x1F101, "3", "0,"), + (0x1F102, "3", "1,"), + (0x1F103, "3", "2,"), + (0x1F104, "3", "3,"), + (0x1F105, "3", "4,"), + (0x1F106, "3", "5,"), + (0x1F107, "3", "6,"), + (0x1F108, "3", "7,"), + (0x1F109, "3", "8,"), + (0x1F10A, "3", "9,"), + (0x1F10B, "V"), + (0x1F110, "3", "(a)"), + (0x1F111, "3", "(b)"), + (0x1F112, "3", "(c)"), + (0x1F113, "3", "(d)"), + (0x1F114, "3", "(e)"), + (0x1F115, "3", "(f)"), + (0x1F116, "3", "(g)"), + (0x1F117, "3", "(h)"), + (0x1F118, "3", "(i)"), + (0x1F119, "3", "(j)"), + (0x1F11A, "3", "(k)"), + (0x1F11B, "3", "(l)"), + (0x1F11C, "3", "(m)"), + (0x1F11D, "3", "(n)"), + (0x1F11E, "3", "(o)"), + (0x1F11F, "3", "(p)"), + (0x1F120, "3", "(q)"), + (0x1F121, "3", "(r)"), + (0x1F122, "3", "(s)"), + (0x1F123, "3", "(t)"), + (0x1F124, "3", "(u)"), + (0x1F125, "3", "(v)"), + (0x1F126, "3", "(w)"), + (0x1F127, "3", "(x)"), + (0x1F128, "3", "(y)"), + (0x1F129, "3", "(z)"), + (0x1F12A, "M", "〔s〕"), + (0x1F12B, "M", "c"), + (0x1F12C, "M", "r"), + (0x1F12D, "M", "cd"), + (0x1F12E, "M", "wz"), + (0x1F12F, "V"), + (0x1F130, "M", "a"), + (0x1F131, "M", "b"), + (0x1F132, "M", "c"), + (0x1F133, "M", "d"), + (0x1F134, "M", "e"), + (0x1F135, "M", "f"), + (0x1F136, "M", "g"), + (0x1F137, "M", "h"), + (0x1F138, "M", "i"), + (0x1F139, "M", "j"), + (0x1F13A, "M", "k"), + (0x1F13B, "M", "l"), + (0x1F13C, "M", "m"), + (0x1F13D, "M", "n"), + (0x1F13E, "M", "o"), + (0x1F13F, "M", "p"), + (0x1F140, "M", "q"), + (0x1F141, "M", "r"), + (0x1F142, "M", "s"), + (0x1F143, "M", "t"), + (0x1F144, "M", "u"), + (0x1F145, "M", "v"), + (0x1F146, "M", "w"), + (0x1F147, "M", "x"), + (0x1F148, "M", "y"), + (0x1F149, "M", "z"), + (0x1F14A, "M", "hv"), + (0x1F14B, "M", "mv"), + (0x1F14C, "M", "sd"), + (0x1F14D, "M", "ss"), + (0x1F14E, "M", "ppv"), + (0x1F14F, "M", "wc"), + (0x1F150, "V"), + (0x1F16A, "M", "mc"), + (0x1F16B, "M", "md"), + (0x1F16C, "M", "mr"), + (0x1F16D, "V"), + (0x1F190, "M", "dj"), + (0x1F191, "V"), + ] + + +def _seg_75() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1F1AE, "X"), + (0x1F1E6, "V"), + (0x1F200, "M", "ほか"), + (0x1F201, "M", "ココ"), + (0x1F202, "M", "サ"), + (0x1F203, "X"), + (0x1F210, "M", "手"), + (0x1F211, "M", "字"), + (0x1F212, "M", "双"), + (0x1F213, "M", "デ"), + (0x1F214, "M", "二"), + (0x1F215, "M", "多"), + (0x1F216, "M", "解"), + (0x1F217, "M", "天"), + (0x1F218, "M", "交"), + (0x1F219, "M", "映"), + (0x1F21A, "M", "無"), + (0x1F21B, "M", "料"), + (0x1F21C, "M", "前"), + (0x1F21D, "M", "後"), + (0x1F21E, "M", "再"), + (0x1F21F, "M", "新"), + (0x1F220, "M", "初"), + (0x1F221, "M", "終"), + (0x1F222, "M", "生"), + (0x1F223, "M", "販"), + (0x1F224, "M", "声"), + (0x1F225, "M", "吹"), + (0x1F226, "M", "演"), + (0x1F227, "M", "投"), + (0x1F228, "M", "捕"), + (0x1F229, "M", "一"), + (0x1F22A, "M", "三"), + (0x1F22B, "M", "遊"), + (0x1F22C, "M", "左"), + (0x1F22D, "M", "中"), + (0x1F22E, "M", "右"), + (0x1F22F, "M", "指"), + (0x1F230, "M", "走"), + (0x1F231, "M", "打"), + (0x1F232, "M", "禁"), + (0x1F233, "M", "空"), + (0x1F234, "M", "合"), + (0x1F235, "M", "満"), + (0x1F236, "M", "有"), + (0x1F237, "M", "月"), + (0x1F238, "M", "申"), + (0x1F239, "M", "割"), + (0x1F23A, "M", "営"), + (0x1F23B, "M", "配"), + (0x1F23C, "X"), + (0x1F240, "M", "〔本〕"), + (0x1F241, "M", "〔三〕"), + (0x1F242, "M", "〔二〕"), + (0x1F243, "M", "〔安〕"), + (0x1F244, "M", "〔点〕"), + (0x1F245, "M", "〔打〕"), + (0x1F246, "M", "〔盗〕"), + (0x1F247, "M", "〔勝〕"), + (0x1F248, "M", "〔敗〕"), + (0x1F249, "X"), + (0x1F250, "M", "得"), + (0x1F251, "M", "可"), + (0x1F252, "X"), + (0x1F260, "V"), + (0x1F266, "X"), + (0x1F300, "V"), + (0x1F6D8, "X"), + (0x1F6DC, "V"), + (0x1F6ED, "X"), + (0x1F6F0, "V"), + (0x1F6FD, "X"), + (0x1F700, "V"), + (0x1F777, "X"), + (0x1F77B, "V"), + (0x1F7DA, "X"), + (0x1F7E0, "V"), + (0x1F7EC, "X"), + (0x1F7F0, "V"), + (0x1F7F1, "X"), + (0x1F800, "V"), + (0x1F80C, "X"), + (0x1F810, "V"), + (0x1F848, "X"), + (0x1F850, "V"), + (0x1F85A, "X"), + (0x1F860, "V"), + (0x1F888, "X"), + (0x1F890, "V"), + (0x1F8AE, "X"), + (0x1F8B0, "V"), + (0x1F8B2, "X"), + (0x1F900, "V"), + (0x1FA54, "X"), + (0x1FA60, "V"), + (0x1FA6E, "X"), + (0x1FA70, "V"), + (0x1FA7D, "X"), + (0x1FA80, "V"), + (0x1FA89, "X"), + ] + + +def _seg_76() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x1FA90, "V"), + (0x1FABE, "X"), + (0x1FABF, "V"), + (0x1FAC6, "X"), + (0x1FACE, "V"), + (0x1FADC, "X"), + (0x1FAE0, "V"), + (0x1FAE9, "X"), + (0x1FAF0, "V"), + (0x1FAF9, "X"), + (0x1FB00, "V"), + (0x1FB93, "X"), + (0x1FB94, "V"), + (0x1FBCB, "X"), + (0x1FBF0, "M", "0"), + (0x1FBF1, "M", "1"), + (0x1FBF2, "M", "2"), + (0x1FBF3, "M", "3"), + (0x1FBF4, "M", "4"), + (0x1FBF5, "M", "5"), + (0x1FBF6, "M", "6"), + (0x1FBF7, "M", "7"), + (0x1FBF8, "M", "8"), + (0x1FBF9, "M", "9"), + (0x1FBFA, "X"), + (0x20000, "V"), + (0x2A6E0, "X"), + (0x2A700, "V"), + (0x2B73A, "X"), + (0x2B740, "V"), + (0x2B81E, "X"), + (0x2B820, "V"), + (0x2CEA2, "X"), + (0x2CEB0, "V"), + (0x2EBE1, "X"), + (0x2EBF0, "V"), + (0x2EE5E, "X"), + (0x2F800, "M", "丽"), + (0x2F801, "M", "丸"), + (0x2F802, "M", "乁"), + (0x2F803, "M", "𠄢"), + (0x2F804, "M", "你"), + (0x2F805, "M", "侮"), + (0x2F806, "M", "侻"), + (0x2F807, "M", "倂"), + (0x2F808, "M", "偺"), + (0x2F809, "M", "備"), + (0x2F80A, "M", "僧"), + (0x2F80B, "M", "像"), + (0x2F80C, "M", "㒞"), + (0x2F80D, "M", "𠘺"), + (0x2F80E, "M", "免"), + (0x2F80F, "M", "兔"), + (0x2F810, "M", "兤"), + (0x2F811, "M", "具"), + (0x2F812, "M", "𠔜"), + (0x2F813, "M", "㒹"), + (0x2F814, "M", "內"), + (0x2F815, "M", "再"), + (0x2F816, "M", "𠕋"), + (0x2F817, "M", "冗"), + (0x2F818, "M", "冤"), + (0x2F819, "M", "仌"), + (0x2F81A, "M", "冬"), + (0x2F81B, "M", "况"), + (0x2F81C, "M", "𩇟"), + (0x2F81D, "M", "凵"), + (0x2F81E, "M", "刃"), + (0x2F81F, "M", "㓟"), + (0x2F820, "M", "刻"), + (0x2F821, "M", "剆"), + (0x2F822, "M", "割"), + (0x2F823, "M", "剷"), + (0x2F824, "M", "㔕"), + (0x2F825, "M", "勇"), + (0x2F826, "M", "勉"), + (0x2F827, "M", "勤"), + (0x2F828, "M", "勺"), + (0x2F829, "M", "包"), + (0x2F82A, "M", "匆"), + (0x2F82B, "M", "北"), + (0x2F82C, "M", "卉"), + (0x2F82D, "M", "卑"), + (0x2F82E, "M", "博"), + (0x2F82F, "M", "即"), + (0x2F830, "M", "卽"), + (0x2F831, "M", "卿"), + (0x2F834, "M", "𠨬"), + (0x2F835, "M", "灰"), + (0x2F836, "M", "及"), + (0x2F837, "M", "叟"), + (0x2F838, "M", "𠭣"), + (0x2F839, "M", "叫"), + (0x2F83A, "M", "叱"), + (0x2F83B, "M", "吆"), + (0x2F83C, "M", "咞"), + (0x2F83D, "M", "吸"), + (0x2F83E, "M", "呈"), + (0x2F83F, "M", "周"), + (0x2F840, "M", "咢"), + ] + + +def _seg_77() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F841, "M", "哶"), + (0x2F842, "M", "唐"), + (0x2F843, "M", "啓"), + (0x2F844, "M", "啣"), + (0x2F845, "M", "善"), + (0x2F847, "M", "喙"), + (0x2F848, "M", "喫"), + (0x2F849, "M", "喳"), + (0x2F84A, "M", "嗂"), + (0x2F84B, "M", "圖"), + (0x2F84C, "M", "嘆"), + (0x2F84D, "M", "圗"), + (0x2F84E, "M", "噑"), + (0x2F84F, "M", "噴"), + (0x2F850, "M", "切"), + (0x2F851, "M", "壮"), + (0x2F852, "M", "城"), + (0x2F853, "M", "埴"), + (0x2F854, "M", "堍"), + (0x2F855, "M", "型"), + (0x2F856, "M", "堲"), + (0x2F857, "M", "報"), + (0x2F858, "M", "墬"), + (0x2F859, "M", "𡓤"), + (0x2F85A, "M", "売"), + (0x2F85B, "M", "壷"), + (0x2F85C, "M", "夆"), + (0x2F85D, "M", "多"), + (0x2F85E, "M", "夢"), + (0x2F85F, "M", "奢"), + (0x2F860, "M", "𡚨"), + (0x2F861, "M", "𡛪"), + (0x2F862, "M", "姬"), + (0x2F863, "M", "娛"), + (0x2F864, "M", "娧"), + (0x2F865, "M", "姘"), + (0x2F866, "M", "婦"), + (0x2F867, "M", "㛮"), + (0x2F868, "X"), + (0x2F869, "M", "嬈"), + (0x2F86A, "M", "嬾"), + (0x2F86C, "M", "𡧈"), + (0x2F86D, "M", "寃"), + (0x2F86E, "M", "寘"), + (0x2F86F, "M", "寧"), + (0x2F870, "M", "寳"), + (0x2F871, "M", "𡬘"), + (0x2F872, "M", "寿"), + (0x2F873, "M", "将"), + (0x2F874, "X"), + (0x2F875, "M", "尢"), + (0x2F876, "M", "㞁"), + (0x2F877, "M", "屠"), + (0x2F878, "M", "屮"), + (0x2F879, "M", "峀"), + (0x2F87A, "M", "岍"), + (0x2F87B, "M", "𡷤"), + (0x2F87C, "M", "嵃"), + (0x2F87D, "M", "𡷦"), + (0x2F87E, "M", "嵮"), + (0x2F87F, "M", "嵫"), + (0x2F880, "M", "嵼"), + (0x2F881, "M", "巡"), + (0x2F882, "M", "巢"), + (0x2F883, "M", "㠯"), + (0x2F884, "M", "巽"), + (0x2F885, "M", "帨"), + (0x2F886, "M", "帽"), + (0x2F887, "M", "幩"), + (0x2F888, "M", "㡢"), + (0x2F889, "M", "𢆃"), + (0x2F88A, "M", "㡼"), + (0x2F88B, "M", "庰"), + (0x2F88C, "M", "庳"), + (0x2F88D, "M", "庶"), + (0x2F88E, "M", "廊"), + (0x2F88F, "M", "𪎒"), + (0x2F890, "M", "廾"), + (0x2F891, "M", "𢌱"), + (0x2F893, "M", "舁"), + (0x2F894, "M", "弢"), + (0x2F896, "M", "㣇"), + (0x2F897, "M", "𣊸"), + (0x2F898, "M", "𦇚"), + (0x2F899, "M", "形"), + (0x2F89A, "M", "彫"), + (0x2F89B, "M", "㣣"), + (0x2F89C, "M", "徚"), + (0x2F89D, "M", "忍"), + (0x2F89E, "M", "志"), + (0x2F89F, "M", "忹"), + (0x2F8A0, "M", "悁"), + (0x2F8A1, "M", "㤺"), + (0x2F8A2, "M", "㤜"), + (0x2F8A3, "M", "悔"), + (0x2F8A4, "M", "𢛔"), + (0x2F8A5, "M", "惇"), + (0x2F8A6, "M", "慈"), + (0x2F8A7, "M", "慌"), + (0x2F8A8, "M", "慎"), + ] + + +def _seg_78() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F8A9, "M", "慌"), + (0x2F8AA, "M", "慺"), + (0x2F8AB, "M", "憎"), + (0x2F8AC, "M", "憲"), + (0x2F8AD, "M", "憤"), + (0x2F8AE, "M", "憯"), + (0x2F8AF, "M", "懞"), + (0x2F8B0, "M", "懲"), + (0x2F8B1, "M", "懶"), + (0x2F8B2, "M", "成"), + (0x2F8B3, "M", "戛"), + (0x2F8B4, "M", "扝"), + (0x2F8B5, "M", "抱"), + (0x2F8B6, "M", "拔"), + (0x2F8B7, "M", "捐"), + (0x2F8B8, "M", "𢬌"), + (0x2F8B9, "M", "挽"), + (0x2F8BA, "M", "拼"), + (0x2F8BB, "M", "捨"), + (0x2F8BC, "M", "掃"), + (0x2F8BD, "M", "揤"), + (0x2F8BE, "M", "𢯱"), + (0x2F8BF, "M", "搢"), + (0x2F8C0, "M", "揅"), + (0x2F8C1, "M", "掩"), + (0x2F8C2, "M", "㨮"), + (0x2F8C3, "M", "摩"), + (0x2F8C4, "M", "摾"), + (0x2F8C5, "M", "撝"), + (0x2F8C6, "M", "摷"), + (0x2F8C7, "M", "㩬"), + (0x2F8C8, "M", "敏"), + (0x2F8C9, "M", "敬"), + (0x2F8CA, "M", "𣀊"), + (0x2F8CB, "M", "旣"), + (0x2F8CC, "M", "書"), + (0x2F8CD, "M", "晉"), + (0x2F8CE, "M", "㬙"), + (0x2F8CF, "M", "暑"), + (0x2F8D0, "M", "㬈"), + (0x2F8D1, "M", "㫤"), + (0x2F8D2, "M", "冒"), + (0x2F8D3, "M", "冕"), + (0x2F8D4, "M", "最"), + (0x2F8D5, "M", "暜"), + (0x2F8D6, "M", "肭"), + (0x2F8D7, "M", "䏙"), + (0x2F8D8, "M", "朗"), + (0x2F8D9, "M", "望"), + (0x2F8DA, "M", "朡"), + (0x2F8DB, "M", "杞"), + (0x2F8DC, "M", "杓"), + (0x2F8DD, "M", "𣏃"), + (0x2F8DE, "M", "㭉"), + (0x2F8DF, "M", "柺"), + (0x2F8E0, "M", "枅"), + (0x2F8E1, "M", "桒"), + (0x2F8E2, "M", "梅"), + (0x2F8E3, "M", "𣑭"), + (0x2F8E4, "M", "梎"), + (0x2F8E5, "M", "栟"), + (0x2F8E6, "M", "椔"), + (0x2F8E7, "M", "㮝"), + (0x2F8E8, "M", "楂"), + (0x2F8E9, "M", "榣"), + (0x2F8EA, "M", "槪"), + (0x2F8EB, "M", "檨"), + (0x2F8EC, "M", "𣚣"), + (0x2F8ED, "M", "櫛"), + (0x2F8EE, "M", "㰘"), + (0x2F8EF, "M", "次"), + (0x2F8F0, "M", "𣢧"), + (0x2F8F1, "M", "歔"), + (0x2F8F2, "M", "㱎"), + (0x2F8F3, "M", "歲"), + (0x2F8F4, "M", "殟"), + (0x2F8F5, "M", "殺"), + (0x2F8F6, "M", "殻"), + (0x2F8F7, "M", "𣪍"), + (0x2F8F8, "M", "𡴋"), + (0x2F8F9, "M", "𣫺"), + (0x2F8FA, "M", "汎"), + (0x2F8FB, "M", "𣲼"), + (0x2F8FC, "M", "沿"), + (0x2F8FD, "M", "泍"), + (0x2F8FE, "M", "汧"), + (0x2F8FF, "M", "洖"), + (0x2F900, "M", "派"), + (0x2F901, "M", "海"), + (0x2F902, "M", "流"), + (0x2F903, "M", "浩"), + (0x2F904, "M", "浸"), + (0x2F905, "M", "涅"), + (0x2F906, "M", "𣴞"), + (0x2F907, "M", "洴"), + (0x2F908, "M", "港"), + (0x2F909, "M", "湮"), + (0x2F90A, "M", "㴳"), + (0x2F90B, "M", "滋"), + (0x2F90C, "M", "滇"), + ] + + +def _seg_79() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F90D, "M", "𣻑"), + (0x2F90E, "M", "淹"), + (0x2F90F, "M", "潮"), + (0x2F910, "M", "𣽞"), + (0x2F911, "M", "𣾎"), + (0x2F912, "M", "濆"), + (0x2F913, "M", "瀹"), + (0x2F914, "M", "瀞"), + (0x2F915, "M", "瀛"), + (0x2F916, "M", "㶖"), + (0x2F917, "M", "灊"), + (0x2F918, "M", "災"), + (0x2F919, "M", "灷"), + (0x2F91A, "M", "炭"), + (0x2F91B, "M", "𠔥"), + (0x2F91C, "M", "煅"), + (0x2F91D, "M", "𤉣"), + (0x2F91E, "M", "熜"), + (0x2F91F, "X"), + (0x2F920, "M", "爨"), + (0x2F921, "M", "爵"), + (0x2F922, "M", "牐"), + (0x2F923, "M", "𤘈"), + (0x2F924, "M", "犀"), + (0x2F925, "M", "犕"), + (0x2F926, "M", "𤜵"), + (0x2F927, "M", "𤠔"), + (0x2F928, "M", "獺"), + (0x2F929, "M", "王"), + (0x2F92A, "M", "㺬"), + (0x2F92B, "M", "玥"), + (0x2F92C, "M", "㺸"), + (0x2F92E, "M", "瑇"), + (0x2F92F, "M", "瑜"), + (0x2F930, "M", "瑱"), + (0x2F931, "M", "璅"), + (0x2F932, "M", "瓊"), + (0x2F933, "M", "㼛"), + (0x2F934, "M", "甤"), + (0x2F935, "M", "𤰶"), + (0x2F936, "M", "甾"), + (0x2F937, "M", "𤲒"), + (0x2F938, "M", "異"), + (0x2F939, "M", "𢆟"), + (0x2F93A, "M", "瘐"), + (0x2F93B, "M", "𤾡"), + (0x2F93C, "M", "𤾸"), + (0x2F93D, "M", "𥁄"), + (0x2F93E, "M", "㿼"), + (0x2F93F, "M", "䀈"), + (0x2F940, "M", "直"), + (0x2F941, "M", "𥃳"), + (0x2F942, "M", "𥃲"), + (0x2F943, "M", "𥄙"), + (0x2F944, "M", "𥄳"), + (0x2F945, "M", "眞"), + (0x2F946, "M", "真"), + (0x2F948, "M", "睊"), + (0x2F949, "M", "䀹"), + (0x2F94A, "M", "瞋"), + (0x2F94B, "M", "䁆"), + (0x2F94C, "M", "䂖"), + (0x2F94D, "M", "𥐝"), + (0x2F94E, "M", "硎"), + (0x2F94F, "M", "碌"), + (0x2F950, "M", "磌"), + (0x2F951, "M", "䃣"), + (0x2F952, "M", "𥘦"), + (0x2F953, "M", "祖"), + (0x2F954, "M", "𥚚"), + (0x2F955, "M", "𥛅"), + (0x2F956, "M", "福"), + (0x2F957, "M", "秫"), + (0x2F958, "M", "䄯"), + (0x2F959, "M", "穀"), + (0x2F95A, "M", "穊"), + (0x2F95B, "M", "穏"), + (0x2F95C, "M", "𥥼"), + (0x2F95D, "M", "𥪧"), + (0x2F95F, "X"), + (0x2F960, "M", "䈂"), + (0x2F961, "M", "𥮫"), + (0x2F962, "M", "篆"), + (0x2F963, "M", "築"), + (0x2F964, "M", "䈧"), + (0x2F965, "M", "𥲀"), + (0x2F966, "M", "糒"), + (0x2F967, "M", "䊠"), + (0x2F968, "M", "糨"), + (0x2F969, "M", "糣"), + (0x2F96A, "M", "紀"), + (0x2F96B, "M", "𥾆"), + (0x2F96C, "M", "絣"), + (0x2F96D, "M", "䌁"), + (0x2F96E, "M", "緇"), + (0x2F96F, "M", "縂"), + (0x2F970, "M", "繅"), + (0x2F971, "M", "䌴"), + (0x2F972, "M", "𦈨"), + (0x2F973, "M", "𦉇"), + ] + + +def _seg_80() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F974, "M", "䍙"), + (0x2F975, "M", "𦋙"), + (0x2F976, "M", "罺"), + (0x2F977, "M", "𦌾"), + (0x2F978, "M", "羕"), + (0x2F979, "M", "翺"), + (0x2F97A, "M", "者"), + (0x2F97B, "M", "𦓚"), + (0x2F97C, "M", "𦔣"), + (0x2F97D, "M", "聠"), + (0x2F97E, "M", "𦖨"), + (0x2F97F, "M", "聰"), + (0x2F980, "M", "𣍟"), + (0x2F981, "M", "䏕"), + (0x2F982, "M", "育"), + (0x2F983, "M", "脃"), + (0x2F984, "M", "䐋"), + (0x2F985, "M", "脾"), + (0x2F986, "M", "媵"), + (0x2F987, "M", "𦞧"), + (0x2F988, "M", "𦞵"), + (0x2F989, "M", "𣎓"), + (0x2F98A, "M", "𣎜"), + (0x2F98B, "M", "舁"), + (0x2F98C, "M", "舄"), + (0x2F98D, "M", "辞"), + (0x2F98E, "M", "䑫"), + (0x2F98F, "M", "芑"), + (0x2F990, "M", "芋"), + (0x2F991, "M", "芝"), + (0x2F992, "M", "劳"), + (0x2F993, "M", "花"), + (0x2F994, "M", "芳"), + (0x2F995, "M", "芽"), + (0x2F996, "M", "苦"), + (0x2F997, "M", "𦬼"), + (0x2F998, "M", "若"), + (0x2F999, "M", "茝"), + (0x2F99A, "M", "荣"), + (0x2F99B, "M", "莭"), + (0x2F99C, "M", "茣"), + (0x2F99D, "M", "莽"), + (0x2F99E, "M", "菧"), + (0x2F99F, "M", "著"), + (0x2F9A0, "M", "荓"), + (0x2F9A1, "M", "菊"), + (0x2F9A2, "M", "菌"), + (0x2F9A3, "M", "菜"), + (0x2F9A4, "M", "𦰶"), + (0x2F9A5, "M", "𦵫"), + (0x2F9A6, "M", "𦳕"), + (0x2F9A7, "M", "䔫"), + (0x2F9A8, "M", "蓱"), + (0x2F9A9, "M", "蓳"), + (0x2F9AA, "M", "蔖"), + (0x2F9AB, "M", "𧏊"), + (0x2F9AC, "M", "蕤"), + (0x2F9AD, "M", "𦼬"), + (0x2F9AE, "M", "䕝"), + (0x2F9AF, "M", "䕡"), + (0x2F9B0, "M", "𦾱"), + (0x2F9B1, "M", "𧃒"), + (0x2F9B2, "M", "䕫"), + (0x2F9B3, "M", "虐"), + (0x2F9B4, "M", "虜"), + (0x2F9B5, "M", "虧"), + (0x2F9B6, "M", "虩"), + (0x2F9B7, "M", "蚩"), + (0x2F9B8, "M", "蚈"), + (0x2F9B9, "M", "蜎"), + (0x2F9BA, "M", "蛢"), + (0x2F9BB, "M", "蝹"), + (0x2F9BC, "M", "蜨"), + (0x2F9BD, "M", "蝫"), + (0x2F9BE, "M", "螆"), + (0x2F9BF, "X"), + (0x2F9C0, "M", "蟡"), + (0x2F9C1, "M", "蠁"), + (0x2F9C2, "M", "䗹"), + (0x2F9C3, "M", "衠"), + (0x2F9C4, "M", "衣"), + (0x2F9C5, "M", "𧙧"), + (0x2F9C6, "M", "裗"), + (0x2F9C7, "M", "裞"), + (0x2F9C8, "M", "䘵"), + (0x2F9C9, "M", "裺"), + (0x2F9CA, "M", "㒻"), + (0x2F9CB, "M", "𧢮"), + (0x2F9CC, "M", "𧥦"), + (0x2F9CD, "M", "䚾"), + (0x2F9CE, "M", "䛇"), + (0x2F9CF, "M", "誠"), + (0x2F9D0, "M", "諭"), + (0x2F9D1, "M", "變"), + (0x2F9D2, "M", "豕"), + (0x2F9D3, "M", "𧲨"), + (0x2F9D4, "M", "貫"), + (0x2F9D5, "M", "賁"), + (0x2F9D6, "M", "贛"), + (0x2F9D7, "M", "起"), + ] + + +def _seg_81() -> List[Union[Tuple[int, str], Tuple[int, str, str]]]: + return [ + (0x2F9D8, "M", "𧼯"), + (0x2F9D9, "M", "𠠄"), + (0x2F9DA, "M", "跋"), + (0x2F9DB, "M", "趼"), + (0x2F9DC, "M", "跰"), + (0x2F9DD, "M", "𠣞"), + (0x2F9DE, "M", "軔"), + (0x2F9DF, "M", "輸"), + (0x2F9E0, "M", "𨗒"), + (0x2F9E1, "M", "𨗭"), + (0x2F9E2, "M", "邔"), + (0x2F9E3, "M", "郱"), + (0x2F9E4, "M", "鄑"), + (0x2F9E5, "M", "𨜮"), + (0x2F9E6, "M", "鄛"), + (0x2F9E7, "M", "鈸"), + (0x2F9E8, "M", "鋗"), + (0x2F9E9, "M", "鋘"), + (0x2F9EA, "M", "鉼"), + (0x2F9EB, "M", "鏹"), + (0x2F9EC, "M", "鐕"), + (0x2F9ED, "M", "𨯺"), + (0x2F9EE, "M", "開"), + (0x2F9EF, "M", "䦕"), + (0x2F9F0, "M", "閷"), + (0x2F9F1, "M", "𨵷"), + (0x2F9F2, "M", "䧦"), + (0x2F9F3, "M", "雃"), + (0x2F9F4, "M", "嶲"), + (0x2F9F5, "M", "霣"), + (0x2F9F6, "M", "𩅅"), + (0x2F9F7, "M", "𩈚"), + (0x2F9F8, "M", "䩮"), + (0x2F9F9, "M", "䩶"), + (0x2F9FA, "M", "韠"), + (0x2F9FB, "M", "𩐊"), + (0x2F9FC, "M", "䪲"), + (0x2F9FD, "M", "𩒖"), + (0x2F9FE, "M", "頋"), + (0x2FA00, "M", "頩"), + (0x2FA01, "M", "𩖶"), + (0x2FA02, "M", "飢"), + (0x2FA03, "M", "䬳"), + (0x2FA04, "M", "餩"), + (0x2FA05, "M", "馧"), + (0x2FA06, "M", "駂"), + (0x2FA07, "M", "駾"), + (0x2FA08, "M", "䯎"), + (0x2FA09, "M", "𩬰"), + (0x2FA0A, "M", "鬒"), + (0x2FA0B, "M", "鱀"), + (0x2FA0C, "M", "鳽"), + (0x2FA0D, "M", "䳎"), + (0x2FA0E, "M", "䳭"), + (0x2FA0F, "M", "鵧"), + (0x2FA10, "M", "𪃎"), + (0x2FA11, "M", "䳸"), + (0x2FA12, "M", "𪄅"), + (0x2FA13, "M", "𪈎"), + (0x2FA14, "M", "𪊑"), + (0x2FA15, "M", "麻"), + (0x2FA16, "M", "䵖"), + (0x2FA17, "M", "黹"), + (0x2FA18, "M", "黾"), + (0x2FA19, "M", "鼅"), + (0x2FA1A, "M", "鼏"), + (0x2FA1B, "M", "鼖"), + (0x2FA1C, "M", "鼻"), + (0x2FA1D, "M", "𪘀"), + (0x2FA1E, "X"), + (0x30000, "V"), + (0x3134B, "X"), + (0x31350, "V"), + (0x323B0, "X"), + (0xE0100, "I"), + (0xE01F0, "X"), + ] + + +uts46data = tuple( + _seg_0() + + _seg_1() + + _seg_2() + + _seg_3() + + _seg_4() + + _seg_5() + + _seg_6() + + _seg_7() + + _seg_8() + + _seg_9() + + _seg_10() + + _seg_11() + + _seg_12() + + _seg_13() + + _seg_14() + + _seg_15() + + _seg_16() + + _seg_17() + + _seg_18() + + _seg_19() + + _seg_20() + + _seg_21() + + _seg_22() + + _seg_23() + + _seg_24() + + _seg_25() + + _seg_26() + + _seg_27() + + _seg_28() + + _seg_29() + + _seg_30() + + _seg_31() + + _seg_32() + + _seg_33() + + _seg_34() + + _seg_35() + + _seg_36() + + _seg_37() + + _seg_38() + + _seg_39() + + _seg_40() + + _seg_41() + + _seg_42() + + _seg_43() + + _seg_44() + + _seg_45() + + _seg_46() + + _seg_47() + + _seg_48() + + _seg_49() + + _seg_50() + + _seg_51() + + _seg_52() + + _seg_53() + + _seg_54() + + _seg_55() + + _seg_56() + + _seg_57() + + _seg_58() + + _seg_59() + + _seg_60() + + _seg_61() + + _seg_62() + + _seg_63() + + _seg_64() + + _seg_65() + + _seg_66() + + _seg_67() + + _seg_68() + + _seg_69() + + _seg_70() + + _seg_71() + + _seg_72() + + _seg_73() + + _seg_74() + + _seg_75() + + _seg_76() + + _seg_77() + + _seg_78() + + _seg_79() + + _seg_80() + + _seg_81() +) # type: Tuple[Union[Tuple[int, str], Tuple[int, str, str]], ...] diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b61510544a97a6a20051c0e0e60cb4c37a8e1bcd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py @@ -0,0 +1,55 @@ +# ruff: noqa: F401 +import os + +from .exceptions import * # noqa: F403 +from .ext import ExtType, Timestamp + +version = (1, 1, 0) +__version__ = "1.1.0" + + +if os.environ.get("MSGPACK_PUREPYTHON"): + from .fallback import Packer, Unpacker, unpackb +else: + try: + from ._cmsgpack import Packer, Unpacker, unpackb + except ImportError: + from .fallback import Packer, Unpacker, unpackb + + +def pack(o, stream, **kwargs): + """ + Pack object `o` and write it to `stream` + + See :class:`Packer` for options. + """ + packer = Packer(**kwargs) + stream.write(packer.pack(o)) + + +def packb(o, **kwargs): + """ + Pack object `o` and return packed bytes + + See :class:`Packer` for options. + """ + return Packer(**kwargs).pack(o) + + +def unpack(stream, **kwargs): + """ + Unpack an object from `stream`. + + Raises `ExtraData` when `stream` contains extra bytes. + See :class:`Unpacker` for options. + """ + data = stream.read() + return unpackb(data, **kwargs) + + +# alias for compatibility to simplejson/marshal/pickle. +load = unpack +loads = unpackb + +dump = pack +dumps = packb diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4cd22802c9d82b9157d42cbb61027ec31767ee4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25df13c346c210df13abc4bad5394f4cb0ea83c9 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..560ea508b75118011b0a5ae5d8388f5e13d58301 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ec05d880ac93a466595f30302d96e6520499965d Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..d6d2615cfdd0b914d064cdf7eecd45761e4bcaf6 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py @@ -0,0 +1,48 @@ +class UnpackException(Exception): + """Base class for some exceptions raised while unpacking. + + NOTE: unpack may raise exception other than subclass of + UnpackException. If you want to catch all error, catch + Exception instead. + """ + + +class BufferFull(UnpackException): + pass + + +class OutOfData(UnpackException): + pass + + +class FormatError(ValueError, UnpackException): + """Invalid msgpack format""" + + +class StackError(ValueError, UnpackException): + """Too nested""" + + +# Deprecated. Use ValueError instead +UnpackValueError = ValueError + + +class ExtraData(UnpackValueError): + """ExtraData is raised when there is trailing data. + + This exception is raised while only one-shot (not streaming) + unpack. + """ + + def __init__(self, unpacked, extra): + self.unpacked = unpacked + self.extra = extra + + def __str__(self): + return "unpack(b) received extra data." + + +# Deprecated. Use Exception instead to catch all exception during packing. +PackException = Exception +PackValueError = ValueError +PackOverflowError = OverflowError diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py new file mode 100644 index 0000000000000000000000000000000000000000..9694819a7df1570ccbb41de065cb7052f9af8e79 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py @@ -0,0 +1,170 @@ +import datetime +import struct +from collections import namedtuple + + +class ExtType(namedtuple("ExtType", "code data")): + """ExtType represents ext type in msgpack.""" + + def __new__(cls, code, data): + if not isinstance(code, int): + raise TypeError("code must be int") + if not isinstance(data, bytes): + raise TypeError("data must be bytes") + if not 0 <= code <= 127: + raise ValueError("code must be 0~127") + return super().__new__(cls, code, data) + + +class Timestamp: + """Timestamp represents the Timestamp extension type in msgpack. + + When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. + When using pure-Python msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and + unpack `Timestamp`. + + This class is immutable: Do not override seconds and nanoseconds. + """ + + __slots__ = ["seconds", "nanoseconds"] + + def __init__(self, seconds, nanoseconds=0): + """Initialize a Timestamp object. + + :param int seconds: + Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds). + May be negative. + + :param int nanoseconds: + Number of nanoseconds to add to `seconds` to get fractional time. + Maximum is 999_999_999. Default is 0. + + Note: Negative times (before the UNIX epoch) are represented as neg. seconds + pos. ns. + """ + if not isinstance(seconds, int): + raise TypeError("seconds must be an integer") + if not isinstance(nanoseconds, int): + raise TypeError("nanoseconds must be an integer") + if not (0 <= nanoseconds < 10**9): + raise ValueError("nanoseconds must be a non-negative integer less than 999999999.") + self.seconds = seconds + self.nanoseconds = nanoseconds + + def __repr__(self): + """String representation of Timestamp.""" + return f"Timestamp(seconds={self.seconds}, nanoseconds={self.nanoseconds})" + + def __eq__(self, other): + """Check for equality with another Timestamp object""" + if type(other) is self.__class__: + return self.seconds == other.seconds and self.nanoseconds == other.nanoseconds + return False + + def __ne__(self, other): + """not-equals method (see :func:`__eq__()`)""" + return not self.__eq__(other) + + def __hash__(self): + return hash((self.seconds, self.nanoseconds)) + + @staticmethod + def from_bytes(b): + """Unpack bytes into a `Timestamp` object. + + Used for pure-Python msgpack unpacking. + + :param b: Payload from msgpack ext message with code -1 + :type b: bytes + + :returns: Timestamp object unpacked from msgpack ext payload + :rtype: Timestamp + """ + if len(b) == 4: + seconds = struct.unpack("!L", b)[0] + nanoseconds = 0 + elif len(b) == 8: + data64 = struct.unpack("!Q", b)[0] + seconds = data64 & 0x00000003FFFFFFFF + nanoseconds = data64 >> 34 + elif len(b) == 12: + nanoseconds, seconds = struct.unpack("!Iq", b) + else: + raise ValueError( + "Timestamp type can only be created from 32, 64, or 96-bit byte objects" + ) + return Timestamp(seconds, nanoseconds) + + def to_bytes(self): + """Pack this Timestamp object into bytes. + + Used for pure-Python msgpack packing. + + :returns data: Payload for EXT message with code -1 (timestamp type) + :rtype: bytes + """ + if (self.seconds >> 34) == 0: # seconds is non-negative and fits in 34 bits + data64 = self.nanoseconds << 34 | self.seconds + if data64 & 0xFFFFFFFF00000000 == 0: + # nanoseconds is zero and seconds < 2**32, so timestamp 32 + data = struct.pack("!L", data64) + else: + # timestamp 64 + data = struct.pack("!Q", data64) + else: + # timestamp 96 + data = struct.pack("!Iq", self.nanoseconds, self.seconds) + return data + + @staticmethod + def from_unix(unix_sec): + """Create a Timestamp from posix timestamp in seconds. + + :param unix_float: Posix timestamp in seconds. + :type unix_float: int or float + """ + seconds = int(unix_sec // 1) + nanoseconds = int((unix_sec % 1) * 10**9) + return Timestamp(seconds, nanoseconds) + + def to_unix(self): + """Get the timestamp as a floating-point value. + + :returns: posix timestamp + :rtype: float + """ + return self.seconds + self.nanoseconds / 1e9 + + @staticmethod + def from_unix_nano(unix_ns): + """Create a Timestamp from posix timestamp in nanoseconds. + + :param int unix_ns: Posix timestamp in nanoseconds. + :rtype: Timestamp + """ + return Timestamp(*divmod(unix_ns, 10**9)) + + def to_unix_nano(self): + """Get the timestamp as a unixtime in nanoseconds. + + :returns: posix timestamp in nanoseconds + :rtype: int + """ + return self.seconds * 10**9 + self.nanoseconds + + def to_datetime(self): + """Get the timestamp as a UTC datetime. + + :rtype: `datetime.datetime` + """ + utc = datetime.timezone.utc + return datetime.datetime.fromtimestamp(0, utc) + datetime.timedelta( + seconds=self.seconds, microseconds=self.nanoseconds // 1000 + ) + + @staticmethod + def from_datetime(dt): + """Create a Timestamp from datetime with tzinfo. + + :rtype: Timestamp + """ + return Timestamp(seconds=int(dt.timestamp()), nanoseconds=dt.microsecond * 1000) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py new file mode 100644 index 0000000000000000000000000000000000000000..b02e47cfb91a54a7205881ee87a5db2ea8d049a7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py @@ -0,0 +1,929 @@ +"""Fallback pure Python implementation of msgpack""" + +import struct +import sys +from datetime import datetime as _DateTime + +if hasattr(sys, "pypy_version_info"): + from __pypy__ import newlist_hint + from __pypy__.builders import BytesBuilder + + _USING_STRINGBUILDER = True + + class BytesIO: + def __init__(self, s=b""): + if s: + self.builder = BytesBuilder(len(s)) + self.builder.append(s) + else: + self.builder = BytesBuilder() + + def write(self, s): + if isinstance(s, memoryview): + s = s.tobytes() + elif isinstance(s, bytearray): + s = bytes(s) + self.builder.append(s) + + def getvalue(self): + return self.builder.build() + +else: + from io import BytesIO + + _USING_STRINGBUILDER = False + + def newlist_hint(size): + return [] + + +from .exceptions import BufferFull, ExtraData, FormatError, OutOfData, StackError +from .ext import ExtType, Timestamp + +EX_SKIP = 0 +EX_CONSTRUCT = 1 +EX_READ_ARRAY_HEADER = 2 +EX_READ_MAP_HEADER = 3 + +TYPE_IMMEDIATE = 0 +TYPE_ARRAY = 1 +TYPE_MAP = 2 +TYPE_RAW = 3 +TYPE_BIN = 4 +TYPE_EXT = 5 + +DEFAULT_RECURSE_LIMIT = 511 + + +def _check_type_strict(obj, t, type=type, tuple=tuple): + if type(t) is tuple: + return type(obj) in t + else: + return type(obj) is t + + +def _get_data_from_buffer(obj): + view = memoryview(obj) + if view.itemsize != 1: + raise ValueError("cannot unpack from multi-byte object") + return view + + +def unpackb(packed, **kwargs): + """ + Unpack an object from `packed`. + + Raises ``ExtraData`` when *packed* contains extra bytes. + Raises ``ValueError`` when *packed* is incomplete. + Raises ``FormatError`` when *packed* is not valid msgpack. + Raises ``StackError`` when *packed* contains too nested. + Other exceptions can be raised during unpacking. + + See :class:`Unpacker` for options. + """ + unpacker = Unpacker(None, max_buffer_size=len(packed), **kwargs) + unpacker.feed(packed) + try: + ret = unpacker._unpack() + except OutOfData: + raise ValueError("Unpack failed: incomplete input") + except RecursionError: + raise StackError + if unpacker._got_extradata(): + raise ExtraData(ret, unpacker._get_extradata()) + return ret + + +_NO_FORMAT_USED = "" +_MSGPACK_HEADERS = { + 0xC4: (1, _NO_FORMAT_USED, TYPE_BIN), + 0xC5: (2, ">H", TYPE_BIN), + 0xC6: (4, ">I", TYPE_BIN), + 0xC7: (2, "Bb", TYPE_EXT), + 0xC8: (3, ">Hb", TYPE_EXT), + 0xC9: (5, ">Ib", TYPE_EXT), + 0xCA: (4, ">f"), + 0xCB: (8, ">d"), + 0xCC: (1, _NO_FORMAT_USED), + 0xCD: (2, ">H"), + 0xCE: (4, ">I"), + 0xCF: (8, ">Q"), + 0xD0: (1, "b"), + 0xD1: (2, ">h"), + 0xD2: (4, ">i"), + 0xD3: (8, ">q"), + 0xD4: (1, "b1s", TYPE_EXT), + 0xD5: (2, "b2s", TYPE_EXT), + 0xD6: (4, "b4s", TYPE_EXT), + 0xD7: (8, "b8s", TYPE_EXT), + 0xD8: (16, "b16s", TYPE_EXT), + 0xD9: (1, _NO_FORMAT_USED, TYPE_RAW), + 0xDA: (2, ">H", TYPE_RAW), + 0xDB: (4, ">I", TYPE_RAW), + 0xDC: (2, ">H", TYPE_ARRAY), + 0xDD: (4, ">I", TYPE_ARRAY), + 0xDE: (2, ">H", TYPE_MAP), + 0xDF: (4, ">I", TYPE_MAP), +} + + +class Unpacker: + """Streaming unpacker. + + Arguments: + + :param file_like: + File-like object having `.read(n)` method. + If specified, unpacker reads serialized data from it and `.feed()` is not usable. + + :param int read_size: + Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`) + + :param bool use_list: + If true, unpack msgpack array to Python list. + Otherwise, unpack to Python tuple. (default: True) + + :param bool raw: + If true, unpack msgpack raw to Python bytes. + Otherwise, unpack to Python str by decoding with UTF-8 encoding (default). + + :param int timestamp: + Control how timestamp type is unpacked: + + 0 - Timestamp + 1 - float (Seconds from the EPOCH) + 2 - int (Nanoseconds from the EPOCH) + 3 - datetime.datetime (UTC). + + :param bool strict_map_key: + If true (default), only str or bytes are accepted for map (dict) keys. + + :param object_hook: + When specified, it should be callable. + Unpacker calls it with a dict argument after unpacking msgpack map. + (See also simplejson) + + :param object_pairs_hook: + When specified, it should be callable. + Unpacker calls it with a list of key-value pairs after unpacking msgpack map. + (See also simplejson) + + :param str unicode_errors: + The error handler for decoding unicode. (default: 'strict') + This option should be used only when you have msgpack data which + contains invalid UTF-8 string. + + :param int max_buffer_size: + Limits size of data waiting unpacked. 0 means 2**32-1. + The default value is 100*1024*1024 (100MiB). + Raises `BufferFull` exception when it is insufficient. + You should set this parameter when unpacking data from untrusted source. + + :param int max_str_len: + Deprecated, use *max_buffer_size* instead. + Limits max length of str. (default: max_buffer_size) + + :param int max_bin_len: + Deprecated, use *max_buffer_size* instead. + Limits max length of bin. (default: max_buffer_size) + + :param int max_array_len: + Limits max length of array. + (default: max_buffer_size) + + :param int max_map_len: + Limits max length of map. + (default: max_buffer_size//2) + + :param int max_ext_len: + Deprecated, use *max_buffer_size* instead. + Limits max size of ext type. (default: max_buffer_size) + + Example of streaming deserialize from file-like object:: + + unpacker = Unpacker(file_like) + for o in unpacker: + process(o) + + Example of streaming deserialize from socket:: + + unpacker = Unpacker() + while True: + buf = sock.recv(1024**2) + if not buf: + break + unpacker.feed(buf) + for o in unpacker: + process(o) + + Raises ``ExtraData`` when *packed* contains extra bytes. + Raises ``OutOfData`` when *packed* is incomplete. + Raises ``FormatError`` when *packed* is not valid msgpack. + Raises ``StackError`` when *packed* contains too nested. + Other exceptions can be raised during unpacking. + """ + + def __init__( + self, + file_like=None, + *, + read_size=0, + use_list=True, + raw=False, + timestamp=0, + strict_map_key=True, + object_hook=None, + object_pairs_hook=None, + list_hook=None, + unicode_errors=None, + max_buffer_size=100 * 1024 * 1024, + ext_hook=ExtType, + max_str_len=-1, + max_bin_len=-1, + max_array_len=-1, + max_map_len=-1, + max_ext_len=-1, + ): + if unicode_errors is None: + unicode_errors = "strict" + + if file_like is None: + self._feeding = True + else: + if not callable(file_like.read): + raise TypeError("`file_like.read` must be callable") + self.file_like = file_like + self._feeding = False + + #: array of bytes fed. + self._buffer = bytearray() + #: Which position we currently reads + self._buff_i = 0 + + # When Unpacker is used as an iterable, between the calls to next(), + # the buffer is not "consumed" completely, for efficiency sake. + # Instead, it is done sloppily. To make sure we raise BufferFull at + # the correct moments, we have to keep track of how sloppy we were. + # Furthermore, when the buffer is incomplete (that is: in the case + # we raise an OutOfData) we need to rollback the buffer to the correct + # state, which _buf_checkpoint records. + self._buf_checkpoint = 0 + + if not max_buffer_size: + max_buffer_size = 2**31 - 1 + if max_str_len == -1: + max_str_len = max_buffer_size + if max_bin_len == -1: + max_bin_len = max_buffer_size + if max_array_len == -1: + max_array_len = max_buffer_size + if max_map_len == -1: + max_map_len = max_buffer_size // 2 + if max_ext_len == -1: + max_ext_len = max_buffer_size + + self._max_buffer_size = max_buffer_size + if read_size > self._max_buffer_size: + raise ValueError("read_size must be smaller than max_buffer_size") + self._read_size = read_size or min(self._max_buffer_size, 16 * 1024) + self._raw = bool(raw) + self._strict_map_key = bool(strict_map_key) + self._unicode_errors = unicode_errors + self._use_list = use_list + if not (0 <= timestamp <= 3): + raise ValueError("timestamp must be 0..3") + self._timestamp = timestamp + self._list_hook = list_hook + self._object_hook = object_hook + self._object_pairs_hook = object_pairs_hook + self._ext_hook = ext_hook + self._max_str_len = max_str_len + self._max_bin_len = max_bin_len + self._max_array_len = max_array_len + self._max_map_len = max_map_len + self._max_ext_len = max_ext_len + self._stream_offset = 0 + + if list_hook is not None and not callable(list_hook): + raise TypeError("`list_hook` is not callable") + if object_hook is not None and not callable(object_hook): + raise TypeError("`object_hook` is not callable") + if object_pairs_hook is not None and not callable(object_pairs_hook): + raise TypeError("`object_pairs_hook` is not callable") + if object_hook is not None and object_pairs_hook is not None: + raise TypeError("object_pairs_hook and object_hook are mutually exclusive") + if not callable(ext_hook): + raise TypeError("`ext_hook` is not callable") + + def feed(self, next_bytes): + assert self._feeding + view = _get_data_from_buffer(next_bytes) + if len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size: + raise BufferFull + + # Strip buffer before checkpoint before reading file. + if self._buf_checkpoint > 0: + del self._buffer[: self._buf_checkpoint] + self._buff_i -= self._buf_checkpoint + self._buf_checkpoint = 0 + + # Use extend here: INPLACE_ADD += doesn't reliably typecast memoryview in jython + self._buffer.extend(view) + view.release() + + def _consume(self): + """Gets rid of the used parts of the buffer.""" + self._stream_offset += self._buff_i - self._buf_checkpoint + self._buf_checkpoint = self._buff_i + + def _got_extradata(self): + return self._buff_i < len(self._buffer) + + def _get_extradata(self): + return self._buffer[self._buff_i :] + + def read_bytes(self, n): + ret = self._read(n, raise_outofdata=False) + self._consume() + return ret + + def _read(self, n, raise_outofdata=True): + # (int) -> bytearray + self._reserve(n, raise_outofdata=raise_outofdata) + i = self._buff_i + ret = self._buffer[i : i + n] + self._buff_i = i + len(ret) + return ret + + def _reserve(self, n, raise_outofdata=True): + remain_bytes = len(self._buffer) - self._buff_i - n + + # Fast path: buffer has n bytes already + if remain_bytes >= 0: + return + + if self._feeding: + self._buff_i = self._buf_checkpoint + raise OutOfData + + # Strip buffer before checkpoint before reading file. + if self._buf_checkpoint > 0: + del self._buffer[: self._buf_checkpoint] + self._buff_i -= self._buf_checkpoint + self._buf_checkpoint = 0 + + # Read from file + remain_bytes = -remain_bytes + if remain_bytes + len(self._buffer) > self._max_buffer_size: + raise BufferFull + while remain_bytes > 0: + to_read_bytes = max(self._read_size, remain_bytes) + read_data = self.file_like.read(to_read_bytes) + if not read_data: + break + assert isinstance(read_data, bytes) + self._buffer += read_data + remain_bytes -= len(read_data) + + if len(self._buffer) < n + self._buff_i and raise_outofdata: + self._buff_i = 0 # rollback + raise OutOfData + + def _read_header(self): + typ = TYPE_IMMEDIATE + n = 0 + obj = None + self._reserve(1) + b = self._buffer[self._buff_i] + self._buff_i += 1 + if b & 0b10000000 == 0: + obj = b + elif b & 0b11100000 == 0b11100000: + obj = -1 - (b ^ 0xFF) + elif b & 0b11100000 == 0b10100000: + n = b & 0b00011111 + typ = TYPE_RAW + if n > self._max_str_len: + raise ValueError(f"{n} exceeds max_str_len({self._max_str_len})") + obj = self._read(n) + elif b & 0b11110000 == 0b10010000: + n = b & 0b00001111 + typ = TYPE_ARRAY + if n > self._max_array_len: + raise ValueError(f"{n} exceeds max_array_len({self._max_array_len})") + elif b & 0b11110000 == 0b10000000: + n = b & 0b00001111 + typ = TYPE_MAP + if n > self._max_map_len: + raise ValueError(f"{n} exceeds max_map_len({self._max_map_len})") + elif b == 0xC0: + obj = None + elif b == 0xC2: + obj = False + elif b == 0xC3: + obj = True + elif 0xC4 <= b <= 0xC6: + size, fmt, typ = _MSGPACK_HEADERS[b] + self._reserve(size) + if len(fmt) > 0: + n = struct.unpack_from(fmt, self._buffer, self._buff_i)[0] + else: + n = self._buffer[self._buff_i] + self._buff_i += size + if n > self._max_bin_len: + raise ValueError(f"{n} exceeds max_bin_len({self._max_bin_len})") + obj = self._read(n) + elif 0xC7 <= b <= 0xC9: + size, fmt, typ = _MSGPACK_HEADERS[b] + self._reserve(size) + L, n = struct.unpack_from(fmt, self._buffer, self._buff_i) + self._buff_i += size + if L > self._max_ext_len: + raise ValueError(f"{L} exceeds max_ext_len({self._max_ext_len})") + obj = self._read(L) + elif 0xCA <= b <= 0xD3: + size, fmt = _MSGPACK_HEADERS[b] + self._reserve(size) + if len(fmt) > 0: + obj = struct.unpack_from(fmt, self._buffer, self._buff_i)[0] + else: + obj = self._buffer[self._buff_i] + self._buff_i += size + elif 0xD4 <= b <= 0xD8: + size, fmt, typ = _MSGPACK_HEADERS[b] + if self._max_ext_len < size: + raise ValueError(f"{size} exceeds max_ext_len({self._max_ext_len})") + self._reserve(size + 1) + n, obj = struct.unpack_from(fmt, self._buffer, self._buff_i) + self._buff_i += size + 1 + elif 0xD9 <= b <= 0xDB: + size, fmt, typ = _MSGPACK_HEADERS[b] + self._reserve(size) + if len(fmt) > 0: + (n,) = struct.unpack_from(fmt, self._buffer, self._buff_i) + else: + n = self._buffer[self._buff_i] + self._buff_i += size + if n > self._max_str_len: + raise ValueError(f"{n} exceeds max_str_len({self._max_str_len})") + obj = self._read(n) + elif 0xDC <= b <= 0xDD: + size, fmt, typ = _MSGPACK_HEADERS[b] + self._reserve(size) + (n,) = struct.unpack_from(fmt, self._buffer, self._buff_i) + self._buff_i += size + if n > self._max_array_len: + raise ValueError(f"{n} exceeds max_array_len({self._max_array_len})") + elif 0xDE <= b <= 0xDF: + size, fmt, typ = _MSGPACK_HEADERS[b] + self._reserve(size) + (n,) = struct.unpack_from(fmt, self._buffer, self._buff_i) + self._buff_i += size + if n > self._max_map_len: + raise ValueError(f"{n} exceeds max_map_len({self._max_map_len})") + else: + raise FormatError("Unknown header: 0x%x" % b) + return typ, n, obj + + def _unpack(self, execute=EX_CONSTRUCT): + typ, n, obj = self._read_header() + + if execute == EX_READ_ARRAY_HEADER: + if typ != TYPE_ARRAY: + raise ValueError("Expected array") + return n + if execute == EX_READ_MAP_HEADER: + if typ != TYPE_MAP: + raise ValueError("Expected map") + return n + # TODO should we eliminate the recursion? + if typ == TYPE_ARRAY: + if execute == EX_SKIP: + for i in range(n): + # TODO check whether we need to call `list_hook` + self._unpack(EX_SKIP) + return + ret = newlist_hint(n) + for i in range(n): + ret.append(self._unpack(EX_CONSTRUCT)) + if self._list_hook is not None: + ret = self._list_hook(ret) + # TODO is the interaction between `list_hook` and `use_list` ok? + return ret if self._use_list else tuple(ret) + if typ == TYPE_MAP: + if execute == EX_SKIP: + for i in range(n): + # TODO check whether we need to call hooks + self._unpack(EX_SKIP) + self._unpack(EX_SKIP) + return + if self._object_pairs_hook is not None: + ret = self._object_pairs_hook( + (self._unpack(EX_CONSTRUCT), self._unpack(EX_CONSTRUCT)) for _ in range(n) + ) + else: + ret = {} + for _ in range(n): + key = self._unpack(EX_CONSTRUCT) + if self._strict_map_key and type(key) not in (str, bytes): + raise ValueError("%s is not allowed for map key" % str(type(key))) + if isinstance(key, str): + key = sys.intern(key) + ret[key] = self._unpack(EX_CONSTRUCT) + if self._object_hook is not None: + ret = self._object_hook(ret) + return ret + if execute == EX_SKIP: + return + if typ == TYPE_RAW: + if self._raw: + obj = bytes(obj) + else: + obj = obj.decode("utf_8", self._unicode_errors) + return obj + if typ == TYPE_BIN: + return bytes(obj) + if typ == TYPE_EXT: + if n == -1: # timestamp + ts = Timestamp.from_bytes(bytes(obj)) + if self._timestamp == 1: + return ts.to_unix() + elif self._timestamp == 2: + return ts.to_unix_nano() + elif self._timestamp == 3: + return ts.to_datetime() + else: + return ts + else: + return self._ext_hook(n, bytes(obj)) + assert typ == TYPE_IMMEDIATE + return obj + + def __iter__(self): + return self + + def __next__(self): + try: + ret = self._unpack(EX_CONSTRUCT) + self._consume() + return ret + except OutOfData: + self._consume() + raise StopIteration + except RecursionError: + raise StackError + + next = __next__ + + def skip(self): + self._unpack(EX_SKIP) + self._consume() + + def unpack(self): + try: + ret = self._unpack(EX_CONSTRUCT) + except RecursionError: + raise StackError + self._consume() + return ret + + def read_array_header(self): + ret = self._unpack(EX_READ_ARRAY_HEADER) + self._consume() + return ret + + def read_map_header(self): + ret = self._unpack(EX_READ_MAP_HEADER) + self._consume() + return ret + + def tell(self): + return self._stream_offset + + +class Packer: + """ + MessagePack Packer + + Usage:: + + packer = Packer() + astream.write(packer.pack(a)) + astream.write(packer.pack(b)) + + Packer's constructor has some keyword arguments: + + :param default: + When specified, it should be callable. + Convert user type to builtin type that Packer supports. + See also simplejson's document. + + :param bool use_single_float: + Use single precision float type for float. (default: False) + + :param bool autoreset: + Reset buffer after each pack and return its content as `bytes`. (default: True). + If set this to false, use `bytes()` to get content and `.reset()` to clear buffer. + + :param bool use_bin_type: + Use bin type introduced in msgpack spec 2.0 for bytes. + It also enables str8 type for unicode. (default: True) + + :param bool strict_types: + If set to true, types will be checked to be exact. Derived classes + from serializable types will not be serialized and will be + treated as unsupported type and forwarded to default. + Additionally tuples will not be serialized as lists. + This is useful when trying to implement accurate serialization + for python types. + + :param bool datetime: + If set to true, datetime with tzinfo is packed into Timestamp type. + Note that the tzinfo is stripped in the timestamp. + You can get UTC datetime with `timestamp=3` option of the Unpacker. + + :param str unicode_errors: + The error handler for encoding unicode. (default: 'strict') + DO NOT USE THIS!! This option is kept for very specific usage. + + :param int buf_size: + Internal buffer size. This option is used only for C implementation. + """ + + def __init__( + self, + *, + default=None, + use_single_float=False, + autoreset=True, + use_bin_type=True, + strict_types=False, + datetime=False, + unicode_errors=None, + buf_size=None, + ): + self._strict_types = strict_types + self._use_float = use_single_float + self._autoreset = autoreset + self._use_bin_type = use_bin_type + self._buffer = BytesIO() + self._datetime = bool(datetime) + self._unicode_errors = unicode_errors or "strict" + if default is not None and not callable(default): + raise TypeError("default must be callable") + self._default = default + + def _pack( + self, + obj, + nest_limit=DEFAULT_RECURSE_LIMIT, + check=isinstance, + check_type_strict=_check_type_strict, + ): + default_used = False + if self._strict_types: + check = check_type_strict + list_types = list + else: + list_types = (list, tuple) + while True: + if nest_limit < 0: + raise ValueError("recursion limit exceeded") + if obj is None: + return self._buffer.write(b"\xc0") + if check(obj, bool): + if obj: + return self._buffer.write(b"\xc3") + return self._buffer.write(b"\xc2") + if check(obj, int): + if 0 <= obj < 0x80: + return self._buffer.write(struct.pack("B", obj)) + if -0x20 <= obj < 0: + return self._buffer.write(struct.pack("b", obj)) + if 0x80 <= obj <= 0xFF: + return self._buffer.write(struct.pack("BB", 0xCC, obj)) + if -0x80 <= obj < 0: + return self._buffer.write(struct.pack(">Bb", 0xD0, obj)) + if 0xFF < obj <= 0xFFFF: + return self._buffer.write(struct.pack(">BH", 0xCD, obj)) + if -0x8000 <= obj < -0x80: + return self._buffer.write(struct.pack(">Bh", 0xD1, obj)) + if 0xFFFF < obj <= 0xFFFFFFFF: + return self._buffer.write(struct.pack(">BI", 0xCE, obj)) + if -0x80000000 <= obj < -0x8000: + return self._buffer.write(struct.pack(">Bi", 0xD2, obj)) + if 0xFFFFFFFF < obj <= 0xFFFFFFFFFFFFFFFF: + return self._buffer.write(struct.pack(">BQ", 0xCF, obj)) + if -0x8000000000000000 <= obj < -0x80000000: + return self._buffer.write(struct.pack(">Bq", 0xD3, obj)) + if not default_used and self._default is not None: + obj = self._default(obj) + default_used = True + continue + raise OverflowError("Integer value out of range") + if check(obj, (bytes, bytearray)): + n = len(obj) + if n >= 2**32: + raise ValueError("%s is too large" % type(obj).__name__) + self._pack_bin_header(n) + return self._buffer.write(obj) + if check(obj, str): + obj = obj.encode("utf-8", self._unicode_errors) + n = len(obj) + if n >= 2**32: + raise ValueError("String is too large") + self._pack_raw_header(n) + return self._buffer.write(obj) + if check(obj, memoryview): + n = obj.nbytes + if n >= 2**32: + raise ValueError("Memoryview is too large") + self._pack_bin_header(n) + return self._buffer.write(obj) + if check(obj, float): + if self._use_float: + return self._buffer.write(struct.pack(">Bf", 0xCA, obj)) + return self._buffer.write(struct.pack(">Bd", 0xCB, obj)) + if check(obj, (ExtType, Timestamp)): + if check(obj, Timestamp): + code = -1 + data = obj.to_bytes() + else: + code = obj.code + data = obj.data + assert isinstance(code, int) + assert isinstance(data, bytes) + L = len(data) + if L == 1: + self._buffer.write(b"\xd4") + elif L == 2: + self._buffer.write(b"\xd5") + elif L == 4: + self._buffer.write(b"\xd6") + elif L == 8: + self._buffer.write(b"\xd7") + elif L == 16: + self._buffer.write(b"\xd8") + elif L <= 0xFF: + self._buffer.write(struct.pack(">BB", 0xC7, L)) + elif L <= 0xFFFF: + self._buffer.write(struct.pack(">BH", 0xC8, L)) + else: + self._buffer.write(struct.pack(">BI", 0xC9, L)) + self._buffer.write(struct.pack("b", code)) + self._buffer.write(data) + return + if check(obj, list_types): + n = len(obj) + self._pack_array_header(n) + for i in range(n): + self._pack(obj[i], nest_limit - 1) + return + if check(obj, dict): + return self._pack_map_pairs(len(obj), obj.items(), nest_limit - 1) + + if self._datetime and check(obj, _DateTime) and obj.tzinfo is not None: + obj = Timestamp.from_datetime(obj) + default_used = 1 + continue + + if not default_used and self._default is not None: + obj = self._default(obj) + default_used = 1 + continue + + if self._datetime and check(obj, _DateTime): + raise ValueError(f"Cannot serialize {obj!r} where tzinfo=None") + + raise TypeError(f"Cannot serialize {obj!r}") + + def pack(self, obj): + try: + self._pack(obj) + except: + self._buffer = BytesIO() # force reset + raise + if self._autoreset: + ret = self._buffer.getvalue() + self._buffer = BytesIO() + return ret + + def pack_map_pairs(self, pairs): + self._pack_map_pairs(len(pairs), pairs) + if self._autoreset: + ret = self._buffer.getvalue() + self._buffer = BytesIO() + return ret + + def pack_array_header(self, n): + if n >= 2**32: + raise ValueError + self._pack_array_header(n) + if self._autoreset: + ret = self._buffer.getvalue() + self._buffer = BytesIO() + return ret + + def pack_map_header(self, n): + if n >= 2**32: + raise ValueError + self._pack_map_header(n) + if self._autoreset: + ret = self._buffer.getvalue() + self._buffer = BytesIO() + return ret + + def pack_ext_type(self, typecode, data): + if not isinstance(typecode, int): + raise TypeError("typecode must have int type.") + if not 0 <= typecode <= 127: + raise ValueError("typecode should be 0-127") + if not isinstance(data, bytes): + raise TypeError("data must have bytes type") + L = len(data) + if L > 0xFFFFFFFF: + raise ValueError("Too large data") + if L == 1: + self._buffer.write(b"\xd4") + elif L == 2: + self._buffer.write(b"\xd5") + elif L == 4: + self._buffer.write(b"\xd6") + elif L == 8: + self._buffer.write(b"\xd7") + elif L == 16: + self._buffer.write(b"\xd8") + elif L <= 0xFF: + self._buffer.write(b"\xc7" + struct.pack("B", L)) + elif L <= 0xFFFF: + self._buffer.write(b"\xc8" + struct.pack(">H", L)) + else: + self._buffer.write(b"\xc9" + struct.pack(">I", L)) + self._buffer.write(struct.pack("B", typecode)) + self._buffer.write(data) + + def _pack_array_header(self, n): + if n <= 0x0F: + return self._buffer.write(struct.pack("B", 0x90 + n)) + if n <= 0xFFFF: + return self._buffer.write(struct.pack(">BH", 0xDC, n)) + if n <= 0xFFFFFFFF: + return self._buffer.write(struct.pack(">BI", 0xDD, n)) + raise ValueError("Array is too large") + + def _pack_map_header(self, n): + if n <= 0x0F: + return self._buffer.write(struct.pack("B", 0x80 + n)) + if n <= 0xFFFF: + return self._buffer.write(struct.pack(">BH", 0xDE, n)) + if n <= 0xFFFFFFFF: + return self._buffer.write(struct.pack(">BI", 0xDF, n)) + raise ValueError("Dict is too large") + + def _pack_map_pairs(self, n, pairs, nest_limit=DEFAULT_RECURSE_LIMIT): + self._pack_map_header(n) + for k, v in pairs: + self._pack(k, nest_limit - 1) + self._pack(v, nest_limit - 1) + + def _pack_raw_header(self, n): + if n <= 0x1F: + self._buffer.write(struct.pack("B", 0xA0 + n)) + elif self._use_bin_type and n <= 0xFF: + self._buffer.write(struct.pack(">BB", 0xD9, n)) + elif n <= 0xFFFF: + self._buffer.write(struct.pack(">BH", 0xDA, n)) + elif n <= 0xFFFFFFFF: + self._buffer.write(struct.pack(">BI", 0xDB, n)) + else: + raise ValueError("Raw is too large") + + def _pack_bin_header(self, n): + if not self._use_bin_type: + return self._pack_raw_header(n) + elif n <= 0xFF: + return self._buffer.write(struct.pack(">BB", 0xC4, n)) + elif n <= 0xFFFF: + return self._buffer.write(struct.pack(">BH", 0xC5, n)) + elif n <= 0xFFFFFFFF: + return self._buffer.write(struct.pack(">BI", 0xC6, n)) + else: + raise ValueError("Bin is too large") + + def bytes(self): + """Return internal buffer contents as bytes object""" + return self._buffer.getvalue() + + def reset(self): + """Reset internal buffer. + + This method is useful only when autoreset=False. + """ + self._buffer = BytesIO() + + def getbuffer(self): + """Return view of internal buffer.""" + if _USING_STRINGBUILDER: + return memoryview(self.bytes()) + else: + return self._buffer.getbuffer() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d79f73c574ffc759ef5d2145b1ec742d85c2500b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py @@ -0,0 +1,15 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +__title__ = "packaging" +__summary__ = "Core utilities for Python packages" +__uri__ = "https://github.com/pypa/packaging" + +__version__ = "24.2" + +__author__ = "Donald Stufft and individual contributors" +__email__ = "donald@stufft.io" + +__license__ = "BSD-2-Clause or Apache-2.0" +__copyright__ = f"2014 {__author__}" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c6791e1074723db7f9c9efd73511159d8b9b1629 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d49f52acae091434873d95fd6f7210e1ddb05edc Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5622a493f6b9cacd508733c2cc906fc3f94098a6 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0158a8cee8fe23c7eed016c1760887a67c99f405 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3392ec6c2bc872d390af0edb27bdc515e9577a6f Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..487eb2da72de9e24701df94d127fdd344aedc64b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0e8ef26debcd017603c1f6293632622c3f8ead5 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d74f15e0b5c72e1745bca8604579972b0dcd3cc Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c0fa9406d51618dc0a2ffbb6f1c2bdd4adda8b33 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2afb2d4180a624f22542bc8547ba48dc729a4be4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5288ff90d7f1f401867afa4c4c6a24b5fa817f14 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ee89dc5b363e8ab02dc33d668abea64443738a3 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..708e6fbaae0697597413ab18351f765dc52abfbe Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d07c40dc1e344dbd18614dd426209a0aa568397 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_elffile.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_elffile.py new file mode 100644 index 0000000000000000000000000000000000000000..25f4282cc29cb03d7be881f03dee841d7dbc215a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_elffile.py @@ -0,0 +1,110 @@ +""" +ELF file parser. + +This provides a class ``ELFFile`` that parses an ELF executable in a similar +interface to ``ZipFile``. Only the read interface is implemented. + +Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca +ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html +""" + +from __future__ import annotations + +import enum +import os +import struct +from typing import IO + + +class ELFInvalid(ValueError): + pass + + +class EIClass(enum.IntEnum): + C32 = 1 + C64 = 2 + + +class EIData(enum.IntEnum): + Lsb = 1 + Msb = 2 + + +class EMachine(enum.IntEnum): + I386 = 3 + S390 = 22 + Arm = 40 + X8664 = 62 + AArc64 = 183 + + +class ELFFile: + """ + Representation of an ELF executable. + """ + + def __init__(self, f: IO[bytes]) -> None: + self._f = f + + try: + ident = self._read("16B") + except struct.error as e: + raise ELFInvalid("unable to parse identification") from e + magic = bytes(ident[:4]) + if magic != b"\x7fELF": + raise ELFInvalid(f"invalid magic: {magic!r}") + + self.capacity = ident[4] # Format for program header (bitness). + self.encoding = ident[5] # Data structure encoding (endianness). + + try: + # e_fmt: Format for program header. + # p_fmt: Format for section header. + # p_idx: Indexes to find p_type, p_offset, and p_filesz. + e_fmt, self._p_fmt, self._p_idx = { + (1, 1): ("HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB. + (2, 1): ("HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB. + }[(self.capacity, self.encoding)] + except KeyError as e: + raise ELFInvalid( + f"unrecognized capacity ({self.capacity}) or " + f"encoding ({self.encoding})" + ) from e + + try: + ( + _, + self.machine, # Architecture type. + _, + _, + self._e_phoff, # Offset of program header. + _, + self.flags, # Processor-specific flags. + _, + self._e_phentsize, # Size of section. + self._e_phnum, # Number of sections. + ) = self._read(e_fmt) + except struct.error as e: + raise ELFInvalid("unable to parse machine and section information") from e + + def _read(self, fmt: str) -> tuple[int, ...]: + return struct.unpack(fmt, self._f.read(struct.calcsize(fmt))) + + @property + def interpreter(self) -> str | None: + """ + The path recorded in the ``PT_INTERP`` section header. + """ + for index in range(self._e_phnum): + self._f.seek(self._e_phoff + self._e_phentsize * index) + try: + data = self._read(self._p_fmt) + except struct.error: + continue + if data[self._p_idx[0]] != 3: # Not PT_INTERP. + continue + self._f.seek(data[self._p_idx[1]]) + return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0") + return None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py new file mode 100644 index 0000000000000000000000000000000000000000..61339a6fcc1b82803136f3bf980e0c8f574b2220 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py @@ -0,0 +1,263 @@ +from __future__ import annotations + +import collections +import contextlib +import functools +import os +import re +import sys +import warnings +from typing import Generator, Iterator, NamedTuple, Sequence + +from ._elffile import EIClass, EIData, ELFFile, EMachine + +EF_ARM_ABIMASK = 0xFF000000 +EF_ARM_ABI_VER5 = 0x05000000 +EF_ARM_ABI_FLOAT_HARD = 0x00000400 + + +# `os.PathLike` not a generic type until Python 3.9, so sticking with `str` +# as the type for `path` until then. +@contextlib.contextmanager +def _parse_elf(path: str) -> Generator[ELFFile | None, None, None]: + try: + with open(path, "rb") as f: + yield ELFFile(f) + except (OSError, TypeError, ValueError): + yield None + + +def _is_linux_armhf(executable: str) -> bool: + # hard-float ABI can be detected from the ELF header of the running + # process + # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf + with _parse_elf(executable) as f: + return ( + f is not None + and f.capacity == EIClass.C32 + and f.encoding == EIData.Lsb + and f.machine == EMachine.Arm + and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5 + and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD + ) + + +def _is_linux_i686(executable: str) -> bool: + with _parse_elf(executable) as f: + return ( + f is not None + and f.capacity == EIClass.C32 + and f.encoding == EIData.Lsb + and f.machine == EMachine.I386 + ) + + +def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool: + if "armv7l" in archs: + return _is_linux_armhf(executable) + if "i686" in archs: + return _is_linux_i686(executable) + allowed_archs = { + "x86_64", + "aarch64", + "ppc64", + "ppc64le", + "s390x", + "loongarch64", + "riscv64", + } + return any(arch in allowed_archs for arch in archs) + + +# If glibc ever changes its major version, we need to know what the last +# minor version was, so we can build the complete list of all versions. +# For now, guess what the highest minor version might be, assume it will +# be 50 for testing. Once this actually happens, update the dictionary +# with the actual value. +_LAST_GLIBC_MINOR: dict[int, int] = collections.defaultdict(lambda: 50) + + +class _GLibCVersion(NamedTuple): + major: int + minor: int + + +def _glibc_version_string_confstr() -> str | None: + """ + Primary implementation of glibc_version_string using os.confstr. + """ + # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely + # to be broken or missing. This strategy is used in the standard library + # platform module. + # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 + try: + # Should be a string like "glibc 2.17". + version_string: str | None = os.confstr("CS_GNU_LIBC_VERSION") + assert version_string is not None + _, version = version_string.rsplit() + except (AssertionError, AttributeError, OSError, ValueError): + # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... + return None + return version + + +def _glibc_version_string_ctypes() -> str | None: + """ + Fallback implementation of glibc_version_string using ctypes. + """ + try: + import ctypes + except ImportError: + return None + + # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen + # manpage says, "If filename is NULL, then the returned handle is for the + # main program". This way we can let the linker do the work to figure out + # which libc our process is actually using. + # + # We must also handle the special case where the executable is not a + # dynamically linked executable. This can occur when using musl libc, + # for example. In this situation, dlopen() will error, leading to an + # OSError. Interestingly, at least in the case of musl, there is no + # errno set on the OSError. The single string argument used to construct + # OSError comes from libc itself and is therefore not portable to + # hard code here. In any case, failure to call dlopen() means we + # can proceed, so we bail on our attempt. + try: + process_namespace = ctypes.CDLL(None) + except OSError: + return None + + try: + gnu_get_libc_version = process_namespace.gnu_get_libc_version + except AttributeError: + # Symbol doesn't exist -> therefore, we are not linked to + # glibc. + return None + + # Call gnu_get_libc_version, which returns a string like "2.5" + gnu_get_libc_version.restype = ctypes.c_char_p + version_str: str = gnu_get_libc_version() + # py2 / py3 compatibility: + if not isinstance(version_str, str): + version_str = version_str.decode("ascii") + + return version_str + + +def _glibc_version_string() -> str | None: + """Returns glibc version string, or None if not using glibc.""" + return _glibc_version_string_confstr() or _glibc_version_string_ctypes() + + +def _parse_glibc_version(version_str: str) -> tuple[int, int]: + """Parse glibc version. + + We use a regexp instead of str.split because we want to discard any + random junk that might come after the minor version -- this might happen + in patched/forked versions of glibc (e.g. Linaro's version of glibc + uses version strings like "2.20-2014.11"). See gh-3588. + """ + m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) + if not m: + warnings.warn( + f"Expected glibc version with 2 components major.minor," + f" got: {version_str}", + RuntimeWarning, + stacklevel=2, + ) + return -1, -1 + return int(m.group("major")), int(m.group("minor")) + + +@functools.lru_cache +def _get_glibc_version() -> tuple[int, int]: + version_str = _glibc_version_string() + if version_str is None: + return (-1, -1) + return _parse_glibc_version(version_str) + + +# From PEP 513, PEP 600 +def _is_compatible(arch: str, version: _GLibCVersion) -> bool: + sys_glibc = _get_glibc_version() + if sys_glibc < version: + return False + # Check for presence of _manylinux module. + try: + import _manylinux + except ImportError: + return True + if hasattr(_manylinux, "manylinux_compatible"): + result = _manylinux.manylinux_compatible(version[0], version[1], arch) + if result is not None: + return bool(result) + return True + if version == _GLibCVersion(2, 5): + if hasattr(_manylinux, "manylinux1_compatible"): + return bool(_manylinux.manylinux1_compatible) + if version == _GLibCVersion(2, 12): + if hasattr(_manylinux, "manylinux2010_compatible"): + return bool(_manylinux.manylinux2010_compatible) + if version == _GLibCVersion(2, 17): + if hasattr(_manylinux, "manylinux2014_compatible"): + return bool(_manylinux.manylinux2014_compatible) + return True + + +_LEGACY_MANYLINUX_MAP = { + # CentOS 7 w/ glibc 2.17 (PEP 599) + (2, 17): "manylinux2014", + # CentOS 6 w/ glibc 2.12 (PEP 571) + (2, 12): "manylinux2010", + # CentOS 5 w/ glibc 2.5 (PEP 513) + (2, 5): "manylinux1", +} + + +def platform_tags(archs: Sequence[str]) -> Iterator[str]: + """Generate manylinux tags compatible to the current platform. + + :param archs: Sequence of compatible architectures. + The first one shall be the closest to the actual architecture and be the part of + platform tag after the ``linux_`` prefix, e.g. ``x86_64``. + The ``linux_`` prefix is assumed as a prerequisite for the current platform to + be manylinux-compatible. + + :returns: An iterator of compatible manylinux tags. + """ + if not _have_compatible_abi(sys.executable, archs): + return + # Oldest glibc to be supported regardless of architecture is (2, 17). + too_old_glibc2 = _GLibCVersion(2, 16) + if set(archs) & {"x86_64", "i686"}: + # On x86/i686 also oldest glibc to be supported is (2, 5). + too_old_glibc2 = _GLibCVersion(2, 4) + current_glibc = _GLibCVersion(*_get_glibc_version()) + glibc_max_list = [current_glibc] + # We can assume compatibility across glibc major versions. + # https://sourceware.org/bugzilla/show_bug.cgi?id=24636 + # + # Build a list of maximum glibc versions so that we can + # output the canonical list of all glibc from current_glibc + # down to too_old_glibc2, including all intermediary versions. + for glibc_major in range(current_glibc.major - 1, 1, -1): + glibc_minor = _LAST_GLIBC_MINOR[glibc_major] + glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor)) + for arch in archs: + for glibc_max in glibc_max_list: + if glibc_max.major == too_old_glibc2.major: + min_minor = too_old_glibc2.minor + else: + # For other glibc major versions oldest supported is (x, 0). + min_minor = -1 + for glibc_minor in range(glibc_max.minor, min_minor, -1): + glibc_version = _GLibCVersion(glibc_max.major, glibc_minor) + tag = "manylinux_{}_{}".format(*glibc_version) + if _is_compatible(arch, glibc_version): + yield f"{tag}_{arch}" + # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags. + if glibc_version in _LEGACY_MANYLINUX_MAP: + legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version] + if _is_compatible(arch, glibc_version): + yield f"{legacy_tag}_{arch}" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py new file mode 100644 index 0000000000000000000000000000000000000000..d2bf30b56319ba862c5c9a1a39a87c6d1cb68718 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py @@ -0,0 +1,85 @@ +"""PEP 656 support. + +This module implements logic to detect if the currently running Python is +linked against musl, and what musl version is used. +""" + +from __future__ import annotations + +import functools +import re +import subprocess +import sys +from typing import Iterator, NamedTuple, Sequence + +from ._elffile import ELFFile + + +class _MuslVersion(NamedTuple): + major: int + minor: int + + +def _parse_musl_version(output: str) -> _MuslVersion | None: + lines = [n for n in (n.strip() for n in output.splitlines()) if n] + if len(lines) < 2 or lines[0][:4] != "musl": + return None + m = re.match(r"Version (\d+)\.(\d+)", lines[1]) + if not m: + return None + return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) + + +@functools.lru_cache +def _get_musl_version(executable: str) -> _MuslVersion | None: + """Detect currently-running musl runtime version. + + This is done by checking the specified executable's dynamic linking + information, and invoking the loader to parse its output for a version + string. If the loader is musl, the output would be something like:: + + musl libc (x86_64) + Version 1.2.2 + Dynamic Program Loader + """ + try: + with open(executable, "rb") as f: + ld = ELFFile(f).interpreter + except (OSError, TypeError, ValueError): + return None + if ld is None or "musl" not in ld: + return None + proc = subprocess.run([ld], stderr=subprocess.PIPE, text=True) + return _parse_musl_version(proc.stderr) + + +def platform_tags(archs: Sequence[str]) -> Iterator[str]: + """Generate musllinux tags compatible to the current platform. + + :param archs: Sequence of compatible architectures. + The first one shall be the closest to the actual architecture and be the part of + platform tag after the ``linux_`` prefix, e.g. ``x86_64``. + The ``linux_`` prefix is assumed as a prerequisite for the current platform to + be musllinux-compatible. + + :returns: An iterator of compatible musllinux tags. + """ + sys_musl = _get_musl_version(sys.executable) + if sys_musl is None: # Python not dynamically linked against musl. + return + for arch in archs: + for minor in range(sys_musl.minor, -1, -1): + yield f"musllinux_{sys_musl.major}_{minor}_{arch}" + + +if __name__ == "__main__": # pragma: no cover + import sysconfig + + plat = sysconfig.get_platform() + assert plat.startswith("linux-"), "not linux" + + print("plat:", plat) + print("musl:", _get_musl_version(sys.executable)) + print("tags:", end=" ") + for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])): + print(t, end="\n ") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_parser.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..c1238c06eab95f8c90c393383a703aa3b8c366a5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_parser.py @@ -0,0 +1,354 @@ +"""Handwritten parser of dependency specifiers. + +The docstring for each __parse_* function contains EBNF-inspired grammar representing +the implementation. +""" + +from __future__ import annotations + +import ast +from typing import NamedTuple, Sequence, Tuple, Union + +from ._tokenizer import DEFAULT_RULES, Tokenizer + + +class Node: + def __init__(self, value: str) -> None: + self.value = value + + def __str__(self) -> str: + return self.value + + def __repr__(self) -> str: + return f"<{self.__class__.__name__}('{self}')>" + + def serialize(self) -> str: + raise NotImplementedError + + +class Variable(Node): + def serialize(self) -> str: + return str(self) + + +class Value(Node): + def serialize(self) -> str: + return f'"{self}"' + + +class Op(Node): + def serialize(self) -> str: + return str(self) + + +MarkerVar = Union[Variable, Value] +MarkerItem = Tuple[MarkerVar, Op, MarkerVar] +MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]] +MarkerList = Sequence[Union["MarkerList", MarkerAtom, str]] + + +class ParsedRequirement(NamedTuple): + name: str + url: str + extras: list[str] + specifier: str + marker: MarkerList | None + + +# -------------------------------------------------------------------------------------- +# Recursive descent parser for dependency specifier +# -------------------------------------------------------------------------------------- +def parse_requirement(source: str) -> ParsedRequirement: + return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) + + +def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement: + """ + requirement = WS? IDENTIFIER WS? extras WS? requirement_details + """ + tokenizer.consume("WS") + + name_token = tokenizer.expect( + "IDENTIFIER", expected="package name at the start of dependency specifier" + ) + name = name_token.text + tokenizer.consume("WS") + + extras = _parse_extras(tokenizer) + tokenizer.consume("WS") + + url, specifier, marker = _parse_requirement_details(tokenizer) + tokenizer.expect("END", expected="end of dependency specifier") + + return ParsedRequirement(name, url, extras, specifier, marker) + + +def _parse_requirement_details( + tokenizer: Tokenizer, +) -> tuple[str, str, MarkerList | None]: + """ + requirement_details = AT URL (WS requirement_marker?)? + | specifier WS? (requirement_marker)? + """ + + specifier = "" + url = "" + marker = None + + if tokenizer.check("AT"): + tokenizer.read() + tokenizer.consume("WS") + + url_start = tokenizer.position + url = tokenizer.expect("URL", expected="URL after @").text + if tokenizer.check("END", peek=True): + return (url, specifier, marker) + + tokenizer.expect("WS", expected="whitespace after URL") + + # The input might end after whitespace. + if tokenizer.check("END", peek=True): + return (url, specifier, marker) + + marker = _parse_requirement_marker( + tokenizer, span_start=url_start, after="URL and whitespace" + ) + else: + specifier_start = tokenizer.position + specifier = _parse_specifier(tokenizer) + tokenizer.consume("WS") + + if tokenizer.check("END", peek=True): + return (url, specifier, marker) + + marker = _parse_requirement_marker( + tokenizer, + span_start=specifier_start, + after=( + "version specifier" + if specifier + else "name and no valid version specifier" + ), + ) + + return (url, specifier, marker) + + +def _parse_requirement_marker( + tokenizer: Tokenizer, *, span_start: int, after: str +) -> MarkerList: + """ + requirement_marker = SEMICOLON marker WS? + """ + + if not tokenizer.check("SEMICOLON"): + tokenizer.raise_syntax_error( + f"Expected end or semicolon (after {after})", + span_start=span_start, + ) + tokenizer.read() + + marker = _parse_marker(tokenizer) + tokenizer.consume("WS") + + return marker + + +def _parse_extras(tokenizer: Tokenizer) -> list[str]: + """ + extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)? + """ + if not tokenizer.check("LEFT_BRACKET", peek=True): + return [] + + with tokenizer.enclosing_tokens( + "LEFT_BRACKET", + "RIGHT_BRACKET", + around="extras", + ): + tokenizer.consume("WS") + extras = _parse_extras_list(tokenizer) + tokenizer.consume("WS") + + return extras + + +def _parse_extras_list(tokenizer: Tokenizer) -> list[str]: + """ + extras_list = identifier (wsp* ',' wsp* identifier)* + """ + extras: list[str] = [] + + if not tokenizer.check("IDENTIFIER"): + return extras + + extras.append(tokenizer.read().text) + + while True: + tokenizer.consume("WS") + if tokenizer.check("IDENTIFIER", peek=True): + tokenizer.raise_syntax_error("Expected comma between extra names") + elif not tokenizer.check("COMMA"): + break + + tokenizer.read() + tokenizer.consume("WS") + + extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma") + extras.append(extra_token.text) + + return extras + + +def _parse_specifier(tokenizer: Tokenizer) -> str: + """ + specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS + | WS? version_many WS? + """ + with tokenizer.enclosing_tokens( + "LEFT_PARENTHESIS", + "RIGHT_PARENTHESIS", + around="version specifier", + ): + tokenizer.consume("WS") + parsed_specifiers = _parse_version_many(tokenizer) + tokenizer.consume("WS") + + return parsed_specifiers + + +def _parse_version_many(tokenizer: Tokenizer) -> str: + """ + version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)? + """ + parsed_specifiers = "" + while tokenizer.check("SPECIFIER"): + span_start = tokenizer.position + parsed_specifiers += tokenizer.read().text + if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True): + tokenizer.raise_syntax_error( + ".* suffix can only be used with `==` or `!=` operators", + span_start=span_start, + span_end=tokenizer.position + 1, + ) + if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True): + tokenizer.raise_syntax_error( + "Local version label can only be used with `==` or `!=` operators", + span_start=span_start, + span_end=tokenizer.position, + ) + tokenizer.consume("WS") + if not tokenizer.check("COMMA"): + break + parsed_specifiers += tokenizer.read().text + tokenizer.consume("WS") + + return parsed_specifiers + + +# -------------------------------------------------------------------------------------- +# Recursive descent parser for marker expression +# -------------------------------------------------------------------------------------- +def parse_marker(source: str) -> MarkerList: + return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES)) + + +def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList: + retval = _parse_marker(tokenizer) + tokenizer.expect("END", expected="end of marker expression") + return retval + + +def _parse_marker(tokenizer: Tokenizer) -> MarkerList: + """ + marker = marker_atom (BOOLOP marker_atom)+ + """ + expression = [_parse_marker_atom(tokenizer)] + while tokenizer.check("BOOLOP"): + token = tokenizer.read() + expr_right = _parse_marker_atom(tokenizer) + expression.extend((token.text, expr_right)) + return expression + + +def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom: + """ + marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS? + | WS? marker_item WS? + """ + + tokenizer.consume("WS") + if tokenizer.check("LEFT_PARENTHESIS", peek=True): + with tokenizer.enclosing_tokens( + "LEFT_PARENTHESIS", + "RIGHT_PARENTHESIS", + around="marker expression", + ): + tokenizer.consume("WS") + marker: MarkerAtom = _parse_marker(tokenizer) + tokenizer.consume("WS") + else: + marker = _parse_marker_item(tokenizer) + tokenizer.consume("WS") + return marker + + +def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem: + """ + marker_item = WS? marker_var WS? marker_op WS? marker_var WS? + """ + tokenizer.consume("WS") + marker_var_left = _parse_marker_var(tokenizer) + tokenizer.consume("WS") + marker_op = _parse_marker_op(tokenizer) + tokenizer.consume("WS") + marker_var_right = _parse_marker_var(tokenizer) + tokenizer.consume("WS") + return (marker_var_left, marker_op, marker_var_right) + + +def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: + """ + marker_var = VARIABLE | QUOTED_STRING + """ + if tokenizer.check("VARIABLE"): + return process_env_var(tokenizer.read().text.replace(".", "_")) + elif tokenizer.check("QUOTED_STRING"): + return process_python_str(tokenizer.read().text) + else: + tokenizer.raise_syntax_error( + message="Expected a marker variable or quoted string" + ) + + +def process_env_var(env_var: str) -> Variable: + if env_var in ("platform_python_implementation", "python_implementation"): + return Variable("platform_python_implementation") + else: + return Variable(env_var) + + +def process_python_str(python_str: str) -> Value: + value = ast.literal_eval(python_str) + return Value(str(value)) + + +def _parse_marker_op(tokenizer: Tokenizer) -> Op: + """ + marker_op = IN | NOT IN | OP + """ + if tokenizer.check("IN"): + tokenizer.read() + return Op("in") + elif tokenizer.check("NOT"): + tokenizer.read() + tokenizer.expect("WS", expected="whitespace after 'not'") + tokenizer.expect("IN", expected="'in' after 'not'") + return Op("not in") + elif tokenizer.check("OP"): + return Op(tokenizer.read().text) + else: + return tokenizer.raise_syntax_error( + "Expected marker operator, one of " + "<=, <, !=, ==, >=, >, ~=, ===, in, not in" + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py new file mode 100644 index 0000000000000000000000000000000000000000..90a6465f9682c886363eea5327dac64bf623a6ff --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py @@ -0,0 +1,61 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + + +class InfinityType: + def __repr__(self) -> str: + return "Infinity" + + def __hash__(self) -> int: + return hash(repr(self)) + + def __lt__(self, other: object) -> bool: + return False + + def __le__(self, other: object) -> bool: + return False + + def __eq__(self, other: object) -> bool: + return isinstance(other, self.__class__) + + def __gt__(self, other: object) -> bool: + return True + + def __ge__(self, other: object) -> bool: + return True + + def __neg__(self: object) -> "NegativeInfinityType": + return NegativeInfinity + + +Infinity = InfinityType() + + +class NegativeInfinityType: + def __repr__(self) -> str: + return "-Infinity" + + def __hash__(self) -> int: + return hash(repr(self)) + + def __lt__(self, other: object) -> bool: + return True + + def __le__(self, other: object) -> bool: + return True + + def __eq__(self, other: object) -> bool: + return isinstance(other, self.__class__) + + def __gt__(self, other: object) -> bool: + return False + + def __ge__(self, other: object) -> bool: + return False + + def __neg__(self: object) -> InfinityType: + return Infinity + + +NegativeInfinity = NegativeInfinityType() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_tokenizer.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_tokenizer.py new file mode 100644 index 0000000000000000000000000000000000000000..89d041605c006e326a67f399a58a1fec8eb24acf --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/_tokenizer.py @@ -0,0 +1,194 @@ +from __future__ import annotations + +import contextlib +import re +from dataclasses import dataclass +from typing import Iterator, NoReturn + +from .specifiers import Specifier + + +@dataclass +class Token: + name: str + text: str + position: int + + +class ParserSyntaxError(Exception): + """The provided source text could not be parsed correctly.""" + + def __init__( + self, + message: str, + *, + source: str, + span: tuple[int, int], + ) -> None: + self.span = span + self.message = message + self.source = source + + super().__init__() + + def __str__(self) -> str: + marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^" + return "\n ".join([self.message, self.source, marker]) + + +DEFAULT_RULES: dict[str, str | re.Pattern[str]] = { + "LEFT_PARENTHESIS": r"\(", + "RIGHT_PARENTHESIS": r"\)", + "LEFT_BRACKET": r"\[", + "RIGHT_BRACKET": r"\]", + "SEMICOLON": r";", + "COMMA": r",", + "QUOTED_STRING": re.compile( + r""" + ( + ('[^']*') + | + ("[^"]*") + ) + """, + re.VERBOSE, + ), + "OP": r"(===|==|~=|!=|<=|>=|<|>)", + "BOOLOP": r"\b(or|and)\b", + "IN": r"\bin\b", + "NOT": r"\bnot\b", + "VARIABLE": re.compile( + r""" + \b( + python_version + |python_full_version + |os[._]name + |sys[._]platform + |platform_(release|system) + |platform[._](version|machine|python_implementation) + |python_implementation + |implementation_(name|version) + |extra + )\b + """, + re.VERBOSE, + ), + "SPECIFIER": re.compile( + Specifier._operator_regex_str + Specifier._version_regex_str, + re.VERBOSE | re.IGNORECASE, + ), + "AT": r"\@", + "URL": r"[^ \t]+", + "IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b", + "VERSION_PREFIX_TRAIL": r"\.\*", + "VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*", + "WS": r"[ \t]+", + "END": r"$", +} + + +class Tokenizer: + """Context-sensitive token parsing. + + Provides methods to examine the input stream to check whether the next token + matches. + """ + + def __init__( + self, + source: str, + *, + rules: dict[str, str | re.Pattern[str]], + ) -> None: + self.source = source + self.rules: dict[str, re.Pattern[str]] = { + name: re.compile(pattern) for name, pattern in rules.items() + } + self.next_token: Token | None = None + self.position = 0 + + def consume(self, name: str) -> None: + """Move beyond provided token name, if at current position.""" + if self.check(name): + self.read() + + def check(self, name: str, *, peek: bool = False) -> bool: + """Check whether the next token has the provided name. + + By default, if the check succeeds, the token *must* be read before + another check. If `peek` is set to `True`, the token is not loaded and + would need to be checked again. + """ + assert ( + self.next_token is None + ), f"Cannot check for {name!r}, already have {self.next_token!r}" + assert name in self.rules, f"Unknown token name: {name!r}" + + expression = self.rules[name] + + match = expression.match(self.source, self.position) + if match is None: + return False + if not peek: + self.next_token = Token(name, match[0], self.position) + return True + + def expect(self, name: str, *, expected: str) -> Token: + """Expect a certain token name next, failing with a syntax error otherwise. + + The token is *not* read. + """ + if not self.check(name): + raise self.raise_syntax_error(f"Expected {expected}") + return self.read() + + def read(self) -> Token: + """Consume the next token and return it.""" + token = self.next_token + assert token is not None + + self.position += len(token.text) + self.next_token = None + + return token + + def raise_syntax_error( + self, + message: str, + *, + span_start: int | None = None, + span_end: int | None = None, + ) -> NoReturn: + """Raise ParserSyntaxError at the given position.""" + span = ( + self.position if span_start is None else span_start, + self.position if span_end is None else span_end, + ) + raise ParserSyntaxError( + message, + source=self.source, + span=span, + ) + + @contextlib.contextmanager + def enclosing_tokens( + self, open_token: str, close_token: str, *, around: str + ) -> Iterator[None]: + if self.check(open_token): + open_position = self.position + self.read() + else: + open_position = None + + yield + + if open_position is None: + return + + if not self.check(close_token): + self.raise_syntax_error( + f"Expected matching {close_token} for {open_token}, after {around}", + span_start=open_position, + ) + + self.read() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..71a1a7794e097926e307e940c60f8169e2be5f47 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__init__.py @@ -0,0 +1,145 @@ +####################################################################################### +# +# Adapted from: +# https://github.com/pypa/hatch/blob/5352e44/backend/src/hatchling/licenses/parse.py +# +# MIT License +# +# Copyright (c) 2017-present Ofek Lev +# +# Permission is hereby granted, free of charge, to any person obtaining a copy of this +# software and associated documentation files (the "Software"), to deal in 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: +# +# The above copyright notice and this permission notice shall be included in all copies +# or substantial portions of the Software. +# +# 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 AUTHORS 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 IN THE SOFTWARE. +# +# +# With additional allowance of arbitrary `LicenseRef-` identifiers, not just +# `LicenseRef-Public-Domain` and `LicenseRef-Proprietary`. +# +####################################################################################### +from __future__ import annotations + +import re +from typing import NewType, cast + +from pip._vendor.packaging.licenses._spdx import EXCEPTIONS, LICENSES + +__all__ = [ + "NormalizedLicenseExpression", + "InvalidLicenseExpression", + "canonicalize_license_expression", +] + +license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$") + +NormalizedLicenseExpression = NewType("NormalizedLicenseExpression", str) + + +class InvalidLicenseExpression(ValueError): + """Raised when a license-expression string is invalid + + >>> canonicalize_license_expression("invalid") + Traceback (most recent call last): + ... + packaging.licenses.InvalidLicenseExpression: Invalid license expression: 'invalid' + """ + + +def canonicalize_license_expression( + raw_license_expression: str, +) -> NormalizedLicenseExpression: + if not raw_license_expression: + message = f"Invalid license expression: {raw_license_expression!r}" + raise InvalidLicenseExpression(message) + + # Pad any parentheses so tokenization can be achieved by merely splitting on + # whitespace. + license_expression = raw_license_expression.replace("(", " ( ").replace(")", " ) ") + licenseref_prefix = "LicenseRef-" + license_refs = { + ref.lower(): "LicenseRef-" + ref[len(licenseref_prefix) :] + for ref in license_expression.split() + if ref.lower().startswith(licenseref_prefix.lower()) + } + + # Normalize to lower case so we can look up licenses/exceptions + # and so boolean operators are Python-compatible. + license_expression = license_expression.lower() + + tokens = license_expression.split() + + # Rather than implementing boolean logic, we create an expression that Python can + # parse. Everything that is not involved with the grammar itself is treated as + # `False` and the expression should evaluate as such. + python_tokens = [] + for token in tokens: + if token not in {"or", "and", "with", "(", ")"}: + python_tokens.append("False") + elif token == "with": + python_tokens.append("or") + elif token == "(" and python_tokens and python_tokens[-1] not in {"or", "and"}: + message = f"Invalid license expression: {raw_license_expression!r}" + raise InvalidLicenseExpression(message) + else: + python_tokens.append(token) + + python_expression = " ".join(python_tokens) + try: + invalid = eval(python_expression, globals(), locals()) + except Exception: + invalid = True + + if invalid is not False: + message = f"Invalid license expression: {raw_license_expression!r}" + raise InvalidLicenseExpression(message) from None + + # Take a final pass to check for unknown licenses/exceptions. + normalized_tokens = [] + for token in tokens: + if token in {"or", "and", "with", "(", ")"}: + normalized_tokens.append(token.upper()) + continue + + if normalized_tokens and normalized_tokens[-1] == "WITH": + if token not in EXCEPTIONS: + message = f"Unknown license exception: {token!r}" + raise InvalidLicenseExpression(message) + + normalized_tokens.append(EXCEPTIONS[token]["id"]) + else: + if token.endswith("+"): + final_token = token[:-1] + suffix = "+" + else: + final_token = token + suffix = "" + + if final_token.startswith("licenseref-"): + if not license_ref_allowed.match(final_token): + message = f"Invalid licenseref: {final_token!r}" + raise InvalidLicenseExpression(message) + normalized_tokens.append(license_refs[final_token] + suffix) + else: + if final_token not in LICENSES: + message = f"Unknown license: {final_token!r}" + raise InvalidLicenseExpression(message) + normalized_tokens.append(LICENSES[final_token]["id"] + suffix) + + normalized_expression = " ".join(normalized_tokens) + + return cast( + NormalizedLicenseExpression, + normalized_expression.replace("( ", "(").replace(" )", ")"), + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46d08ec5813646adf07ccd7c00df4bc6186c7822 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/_spdx.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/_spdx.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..88fa218b0d6ab15557395a19c3726c066ea66723 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/_spdx.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/_spdx.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/_spdx.py new file mode 100644 index 0000000000000000000000000000000000000000..eac22276a34ccd73fc9d70c67ca318a49eb11e77 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/_spdx.py @@ -0,0 +1,759 @@ + +from __future__ import annotations + +from typing import TypedDict + +class SPDXLicense(TypedDict): + id: str + deprecated: bool + +class SPDXException(TypedDict): + id: str + deprecated: bool + + +VERSION = '3.25.0' + +LICENSES: dict[str, SPDXLicense] = { + '0bsd': {'id': '0BSD', 'deprecated': False}, + '3d-slicer-1.0': {'id': '3D-Slicer-1.0', 'deprecated': False}, + 'aal': {'id': 'AAL', 'deprecated': False}, + 'abstyles': {'id': 'Abstyles', 'deprecated': False}, + 'adacore-doc': {'id': 'AdaCore-doc', 'deprecated': False}, + 'adobe-2006': {'id': 'Adobe-2006', 'deprecated': False}, + 'adobe-display-postscript': {'id': 'Adobe-Display-PostScript', 'deprecated': False}, + 'adobe-glyph': {'id': 'Adobe-Glyph', 'deprecated': False}, + 'adobe-utopia': {'id': 'Adobe-Utopia', 'deprecated': False}, + 'adsl': {'id': 'ADSL', 'deprecated': False}, + 'afl-1.1': {'id': 'AFL-1.1', 'deprecated': False}, + 'afl-1.2': {'id': 'AFL-1.2', 'deprecated': False}, + 'afl-2.0': {'id': 'AFL-2.0', 'deprecated': False}, + 'afl-2.1': {'id': 'AFL-2.1', 'deprecated': False}, + 'afl-3.0': {'id': 'AFL-3.0', 'deprecated': False}, + 'afmparse': {'id': 'Afmparse', 'deprecated': False}, + 'agpl-1.0': {'id': 'AGPL-1.0', 'deprecated': True}, + 'agpl-1.0-only': {'id': 'AGPL-1.0-only', 'deprecated': False}, + 'agpl-1.0-or-later': {'id': 'AGPL-1.0-or-later', 'deprecated': False}, + 'agpl-3.0': {'id': 'AGPL-3.0', 'deprecated': True}, + 'agpl-3.0-only': {'id': 'AGPL-3.0-only', 'deprecated': False}, + 'agpl-3.0-or-later': {'id': 'AGPL-3.0-or-later', 'deprecated': False}, + 'aladdin': {'id': 'Aladdin', 'deprecated': False}, + 'amd-newlib': {'id': 'AMD-newlib', 'deprecated': False}, + 'amdplpa': {'id': 'AMDPLPA', 'deprecated': False}, + 'aml': {'id': 'AML', 'deprecated': False}, + 'aml-glslang': {'id': 'AML-glslang', 'deprecated': False}, + 'ampas': {'id': 'AMPAS', 'deprecated': False}, + 'antlr-pd': {'id': 'ANTLR-PD', 'deprecated': False}, + 'antlr-pd-fallback': {'id': 'ANTLR-PD-fallback', 'deprecated': False}, + 'any-osi': {'id': 'any-OSI', 'deprecated': False}, + 'apache-1.0': {'id': 'Apache-1.0', 'deprecated': False}, + 'apache-1.1': {'id': 'Apache-1.1', 'deprecated': False}, + 'apache-2.0': {'id': 'Apache-2.0', 'deprecated': False}, + 'apafml': {'id': 'APAFML', 'deprecated': False}, + 'apl-1.0': {'id': 'APL-1.0', 'deprecated': False}, + 'app-s2p': {'id': 'App-s2p', 'deprecated': False}, + 'apsl-1.0': {'id': 'APSL-1.0', 'deprecated': False}, + 'apsl-1.1': {'id': 'APSL-1.1', 'deprecated': False}, + 'apsl-1.2': {'id': 'APSL-1.2', 'deprecated': False}, + 'apsl-2.0': {'id': 'APSL-2.0', 'deprecated': False}, + 'arphic-1999': {'id': 'Arphic-1999', 'deprecated': False}, + 'artistic-1.0': {'id': 'Artistic-1.0', 'deprecated': False}, + 'artistic-1.0-cl8': {'id': 'Artistic-1.0-cl8', 'deprecated': False}, + 'artistic-1.0-perl': {'id': 'Artistic-1.0-Perl', 'deprecated': False}, + 'artistic-2.0': {'id': 'Artistic-2.0', 'deprecated': False}, + 'aswf-digital-assets-1.0': {'id': 'ASWF-Digital-Assets-1.0', 'deprecated': False}, + 'aswf-digital-assets-1.1': {'id': 'ASWF-Digital-Assets-1.1', 'deprecated': False}, + 'baekmuk': {'id': 'Baekmuk', 'deprecated': False}, + 'bahyph': {'id': 'Bahyph', 'deprecated': False}, + 'barr': {'id': 'Barr', 'deprecated': False}, + 'bcrypt-solar-designer': {'id': 'bcrypt-Solar-Designer', 'deprecated': False}, + 'beerware': {'id': 'Beerware', 'deprecated': False}, + 'bitstream-charter': {'id': 'Bitstream-Charter', 'deprecated': False}, + 'bitstream-vera': {'id': 'Bitstream-Vera', 'deprecated': False}, + 'bittorrent-1.0': {'id': 'BitTorrent-1.0', 'deprecated': False}, + 'bittorrent-1.1': {'id': 'BitTorrent-1.1', 'deprecated': False}, + 'blessing': {'id': 'blessing', 'deprecated': False}, + 'blueoak-1.0.0': {'id': 'BlueOak-1.0.0', 'deprecated': False}, + 'boehm-gc': {'id': 'Boehm-GC', 'deprecated': False}, + 'borceux': {'id': 'Borceux', 'deprecated': False}, + 'brian-gladman-2-clause': {'id': 'Brian-Gladman-2-Clause', 'deprecated': False}, + 'brian-gladman-3-clause': {'id': 'Brian-Gladman-3-Clause', 'deprecated': False}, + 'bsd-1-clause': {'id': 'BSD-1-Clause', 'deprecated': False}, + 'bsd-2-clause': {'id': 'BSD-2-Clause', 'deprecated': False}, + 'bsd-2-clause-darwin': {'id': 'BSD-2-Clause-Darwin', 'deprecated': False}, + 'bsd-2-clause-first-lines': {'id': 'BSD-2-Clause-first-lines', 'deprecated': False}, + 'bsd-2-clause-freebsd': {'id': 'BSD-2-Clause-FreeBSD', 'deprecated': True}, + 'bsd-2-clause-netbsd': {'id': 'BSD-2-Clause-NetBSD', 'deprecated': True}, + 'bsd-2-clause-patent': {'id': 'BSD-2-Clause-Patent', 'deprecated': False}, + 'bsd-2-clause-views': {'id': 'BSD-2-Clause-Views', 'deprecated': False}, + 'bsd-3-clause': {'id': 'BSD-3-Clause', 'deprecated': False}, + 'bsd-3-clause-acpica': {'id': 'BSD-3-Clause-acpica', 'deprecated': False}, + 'bsd-3-clause-attribution': {'id': 'BSD-3-Clause-Attribution', 'deprecated': False}, + 'bsd-3-clause-clear': {'id': 'BSD-3-Clause-Clear', 'deprecated': False}, + 'bsd-3-clause-flex': {'id': 'BSD-3-Clause-flex', 'deprecated': False}, + 'bsd-3-clause-hp': {'id': 'BSD-3-Clause-HP', 'deprecated': False}, + 'bsd-3-clause-lbnl': {'id': 'BSD-3-Clause-LBNL', 'deprecated': False}, + 'bsd-3-clause-modification': {'id': 'BSD-3-Clause-Modification', 'deprecated': False}, + 'bsd-3-clause-no-military-license': {'id': 'BSD-3-Clause-No-Military-License', 'deprecated': False}, + 'bsd-3-clause-no-nuclear-license': {'id': 'BSD-3-Clause-No-Nuclear-License', 'deprecated': False}, + 'bsd-3-clause-no-nuclear-license-2014': {'id': 'BSD-3-Clause-No-Nuclear-License-2014', 'deprecated': False}, + 'bsd-3-clause-no-nuclear-warranty': {'id': 'BSD-3-Clause-No-Nuclear-Warranty', 'deprecated': False}, + 'bsd-3-clause-open-mpi': {'id': 'BSD-3-Clause-Open-MPI', 'deprecated': False}, + 'bsd-3-clause-sun': {'id': 'BSD-3-Clause-Sun', 'deprecated': False}, + 'bsd-4-clause': {'id': 'BSD-4-Clause', 'deprecated': False}, + 'bsd-4-clause-shortened': {'id': 'BSD-4-Clause-Shortened', 'deprecated': False}, + 'bsd-4-clause-uc': {'id': 'BSD-4-Clause-UC', 'deprecated': False}, + 'bsd-4.3reno': {'id': 'BSD-4.3RENO', 'deprecated': False}, + 'bsd-4.3tahoe': {'id': 'BSD-4.3TAHOE', 'deprecated': False}, + 'bsd-advertising-acknowledgement': {'id': 'BSD-Advertising-Acknowledgement', 'deprecated': False}, + 'bsd-attribution-hpnd-disclaimer': {'id': 'BSD-Attribution-HPND-disclaimer', 'deprecated': False}, + 'bsd-inferno-nettverk': {'id': 'BSD-Inferno-Nettverk', 'deprecated': False}, + 'bsd-protection': {'id': 'BSD-Protection', 'deprecated': False}, + 'bsd-source-beginning-file': {'id': 'BSD-Source-beginning-file', 'deprecated': False}, + 'bsd-source-code': {'id': 'BSD-Source-Code', 'deprecated': False}, + 'bsd-systemics': {'id': 'BSD-Systemics', 'deprecated': False}, + 'bsd-systemics-w3works': {'id': 'BSD-Systemics-W3Works', 'deprecated': False}, + 'bsl-1.0': {'id': 'BSL-1.0', 'deprecated': False}, + 'busl-1.1': {'id': 'BUSL-1.1', 'deprecated': False}, + 'bzip2-1.0.5': {'id': 'bzip2-1.0.5', 'deprecated': True}, + 'bzip2-1.0.6': {'id': 'bzip2-1.0.6', 'deprecated': False}, + 'c-uda-1.0': {'id': 'C-UDA-1.0', 'deprecated': False}, + 'cal-1.0': {'id': 'CAL-1.0', 'deprecated': False}, + 'cal-1.0-combined-work-exception': {'id': 'CAL-1.0-Combined-Work-Exception', 'deprecated': False}, + 'caldera': {'id': 'Caldera', 'deprecated': False}, + 'caldera-no-preamble': {'id': 'Caldera-no-preamble', 'deprecated': False}, + 'catharon': {'id': 'Catharon', 'deprecated': False}, + 'catosl-1.1': {'id': 'CATOSL-1.1', 'deprecated': False}, + 'cc-by-1.0': {'id': 'CC-BY-1.0', 'deprecated': False}, + 'cc-by-2.0': {'id': 'CC-BY-2.0', 'deprecated': False}, + 'cc-by-2.5': {'id': 'CC-BY-2.5', 'deprecated': False}, + 'cc-by-2.5-au': {'id': 'CC-BY-2.5-AU', 'deprecated': False}, + 'cc-by-3.0': {'id': 'CC-BY-3.0', 'deprecated': False}, + 'cc-by-3.0-at': {'id': 'CC-BY-3.0-AT', 'deprecated': False}, + 'cc-by-3.0-au': {'id': 'CC-BY-3.0-AU', 'deprecated': False}, + 'cc-by-3.0-de': {'id': 'CC-BY-3.0-DE', 'deprecated': False}, + 'cc-by-3.0-igo': {'id': 'CC-BY-3.0-IGO', 'deprecated': False}, + 'cc-by-3.0-nl': {'id': 'CC-BY-3.0-NL', 'deprecated': False}, + 'cc-by-3.0-us': {'id': 'CC-BY-3.0-US', 'deprecated': False}, + 'cc-by-4.0': {'id': 'CC-BY-4.0', 'deprecated': False}, + 'cc-by-nc-1.0': {'id': 'CC-BY-NC-1.0', 'deprecated': False}, + 'cc-by-nc-2.0': {'id': 'CC-BY-NC-2.0', 'deprecated': False}, + 'cc-by-nc-2.5': {'id': 'CC-BY-NC-2.5', 'deprecated': False}, + 'cc-by-nc-3.0': {'id': 'CC-BY-NC-3.0', 'deprecated': False}, + 'cc-by-nc-3.0-de': {'id': 'CC-BY-NC-3.0-DE', 'deprecated': False}, + 'cc-by-nc-4.0': {'id': 'CC-BY-NC-4.0', 'deprecated': False}, + 'cc-by-nc-nd-1.0': {'id': 'CC-BY-NC-ND-1.0', 'deprecated': False}, + 'cc-by-nc-nd-2.0': {'id': 'CC-BY-NC-ND-2.0', 'deprecated': False}, + 'cc-by-nc-nd-2.5': {'id': 'CC-BY-NC-ND-2.5', 'deprecated': False}, + 'cc-by-nc-nd-3.0': {'id': 'CC-BY-NC-ND-3.0', 'deprecated': False}, + 'cc-by-nc-nd-3.0-de': {'id': 'CC-BY-NC-ND-3.0-DE', 'deprecated': False}, + 'cc-by-nc-nd-3.0-igo': {'id': 'CC-BY-NC-ND-3.0-IGO', 'deprecated': False}, + 'cc-by-nc-nd-4.0': {'id': 'CC-BY-NC-ND-4.0', 'deprecated': False}, + 'cc-by-nc-sa-1.0': {'id': 'CC-BY-NC-SA-1.0', 'deprecated': False}, + 'cc-by-nc-sa-2.0': {'id': 'CC-BY-NC-SA-2.0', 'deprecated': False}, + 'cc-by-nc-sa-2.0-de': {'id': 'CC-BY-NC-SA-2.0-DE', 'deprecated': False}, + 'cc-by-nc-sa-2.0-fr': {'id': 'CC-BY-NC-SA-2.0-FR', 'deprecated': False}, + 'cc-by-nc-sa-2.0-uk': {'id': 'CC-BY-NC-SA-2.0-UK', 'deprecated': False}, + 'cc-by-nc-sa-2.5': {'id': 'CC-BY-NC-SA-2.5', 'deprecated': False}, + 'cc-by-nc-sa-3.0': {'id': 'CC-BY-NC-SA-3.0', 'deprecated': False}, + 'cc-by-nc-sa-3.0-de': {'id': 'CC-BY-NC-SA-3.0-DE', 'deprecated': False}, + 'cc-by-nc-sa-3.0-igo': {'id': 'CC-BY-NC-SA-3.0-IGO', 'deprecated': False}, + 'cc-by-nc-sa-4.0': {'id': 'CC-BY-NC-SA-4.0', 'deprecated': False}, + 'cc-by-nd-1.0': {'id': 'CC-BY-ND-1.0', 'deprecated': False}, + 'cc-by-nd-2.0': {'id': 'CC-BY-ND-2.0', 'deprecated': False}, + 'cc-by-nd-2.5': {'id': 'CC-BY-ND-2.5', 'deprecated': False}, + 'cc-by-nd-3.0': {'id': 'CC-BY-ND-3.0', 'deprecated': False}, + 'cc-by-nd-3.0-de': {'id': 'CC-BY-ND-3.0-DE', 'deprecated': False}, + 'cc-by-nd-4.0': {'id': 'CC-BY-ND-4.0', 'deprecated': False}, + 'cc-by-sa-1.0': {'id': 'CC-BY-SA-1.0', 'deprecated': False}, + 'cc-by-sa-2.0': {'id': 'CC-BY-SA-2.0', 'deprecated': False}, + 'cc-by-sa-2.0-uk': {'id': 'CC-BY-SA-2.0-UK', 'deprecated': False}, + 'cc-by-sa-2.1-jp': {'id': 'CC-BY-SA-2.1-JP', 'deprecated': False}, + 'cc-by-sa-2.5': {'id': 'CC-BY-SA-2.5', 'deprecated': False}, + 'cc-by-sa-3.0': {'id': 'CC-BY-SA-3.0', 'deprecated': False}, + 'cc-by-sa-3.0-at': {'id': 'CC-BY-SA-3.0-AT', 'deprecated': False}, + 'cc-by-sa-3.0-de': {'id': 'CC-BY-SA-3.0-DE', 'deprecated': False}, + 'cc-by-sa-3.0-igo': {'id': 'CC-BY-SA-3.0-IGO', 'deprecated': False}, + 'cc-by-sa-4.0': {'id': 'CC-BY-SA-4.0', 'deprecated': False}, + 'cc-pddc': {'id': 'CC-PDDC', 'deprecated': False}, + 'cc0-1.0': {'id': 'CC0-1.0', 'deprecated': False}, + 'cddl-1.0': {'id': 'CDDL-1.0', 'deprecated': False}, + 'cddl-1.1': {'id': 'CDDL-1.1', 'deprecated': False}, + 'cdl-1.0': {'id': 'CDL-1.0', 'deprecated': False}, + 'cdla-permissive-1.0': {'id': 'CDLA-Permissive-1.0', 'deprecated': False}, + 'cdla-permissive-2.0': {'id': 'CDLA-Permissive-2.0', 'deprecated': False}, + 'cdla-sharing-1.0': {'id': 'CDLA-Sharing-1.0', 'deprecated': False}, + 'cecill-1.0': {'id': 'CECILL-1.0', 'deprecated': False}, + 'cecill-1.1': {'id': 'CECILL-1.1', 'deprecated': False}, + 'cecill-2.0': {'id': 'CECILL-2.0', 'deprecated': False}, + 'cecill-2.1': {'id': 'CECILL-2.1', 'deprecated': False}, + 'cecill-b': {'id': 'CECILL-B', 'deprecated': False}, + 'cecill-c': {'id': 'CECILL-C', 'deprecated': False}, + 'cern-ohl-1.1': {'id': 'CERN-OHL-1.1', 'deprecated': False}, + 'cern-ohl-1.2': {'id': 'CERN-OHL-1.2', 'deprecated': False}, + 'cern-ohl-p-2.0': {'id': 'CERN-OHL-P-2.0', 'deprecated': False}, + 'cern-ohl-s-2.0': {'id': 'CERN-OHL-S-2.0', 'deprecated': False}, + 'cern-ohl-w-2.0': {'id': 'CERN-OHL-W-2.0', 'deprecated': False}, + 'cfitsio': {'id': 'CFITSIO', 'deprecated': False}, + 'check-cvs': {'id': 'check-cvs', 'deprecated': False}, + 'checkmk': {'id': 'checkmk', 'deprecated': False}, + 'clartistic': {'id': 'ClArtistic', 'deprecated': False}, + 'clips': {'id': 'Clips', 'deprecated': False}, + 'cmu-mach': {'id': 'CMU-Mach', 'deprecated': False}, + 'cmu-mach-nodoc': {'id': 'CMU-Mach-nodoc', 'deprecated': False}, + 'cnri-jython': {'id': 'CNRI-Jython', 'deprecated': False}, + 'cnri-python': {'id': 'CNRI-Python', 'deprecated': False}, + 'cnri-python-gpl-compatible': {'id': 'CNRI-Python-GPL-Compatible', 'deprecated': False}, + 'coil-1.0': {'id': 'COIL-1.0', 'deprecated': False}, + 'community-spec-1.0': {'id': 'Community-Spec-1.0', 'deprecated': False}, + 'condor-1.1': {'id': 'Condor-1.1', 'deprecated': False}, + 'copyleft-next-0.3.0': {'id': 'copyleft-next-0.3.0', 'deprecated': False}, + 'copyleft-next-0.3.1': {'id': 'copyleft-next-0.3.1', 'deprecated': False}, + 'cornell-lossless-jpeg': {'id': 'Cornell-Lossless-JPEG', 'deprecated': False}, + 'cpal-1.0': {'id': 'CPAL-1.0', 'deprecated': False}, + 'cpl-1.0': {'id': 'CPL-1.0', 'deprecated': False}, + 'cpol-1.02': {'id': 'CPOL-1.02', 'deprecated': False}, + 'cronyx': {'id': 'Cronyx', 'deprecated': False}, + 'crossword': {'id': 'Crossword', 'deprecated': False}, + 'crystalstacker': {'id': 'CrystalStacker', 'deprecated': False}, + 'cua-opl-1.0': {'id': 'CUA-OPL-1.0', 'deprecated': False}, + 'cube': {'id': 'Cube', 'deprecated': False}, + 'curl': {'id': 'curl', 'deprecated': False}, + 'cve-tou': {'id': 'cve-tou', 'deprecated': False}, + 'd-fsl-1.0': {'id': 'D-FSL-1.0', 'deprecated': False}, + 'dec-3-clause': {'id': 'DEC-3-Clause', 'deprecated': False}, + 'diffmark': {'id': 'diffmark', 'deprecated': False}, + 'dl-de-by-2.0': {'id': 'DL-DE-BY-2.0', 'deprecated': False}, + 'dl-de-zero-2.0': {'id': 'DL-DE-ZERO-2.0', 'deprecated': False}, + 'doc': {'id': 'DOC', 'deprecated': False}, + 'docbook-schema': {'id': 'DocBook-Schema', 'deprecated': False}, + 'docbook-xml': {'id': 'DocBook-XML', 'deprecated': False}, + 'dotseqn': {'id': 'Dotseqn', 'deprecated': False}, + 'drl-1.0': {'id': 'DRL-1.0', 'deprecated': False}, + 'drl-1.1': {'id': 'DRL-1.1', 'deprecated': False}, + 'dsdp': {'id': 'DSDP', 'deprecated': False}, + 'dtoa': {'id': 'dtoa', 'deprecated': False}, + 'dvipdfm': {'id': 'dvipdfm', 'deprecated': False}, + 'ecl-1.0': {'id': 'ECL-1.0', 'deprecated': False}, + 'ecl-2.0': {'id': 'ECL-2.0', 'deprecated': False}, + 'ecos-2.0': {'id': 'eCos-2.0', 'deprecated': True}, + 'efl-1.0': {'id': 'EFL-1.0', 'deprecated': False}, + 'efl-2.0': {'id': 'EFL-2.0', 'deprecated': False}, + 'egenix': {'id': 'eGenix', 'deprecated': False}, + 'elastic-2.0': {'id': 'Elastic-2.0', 'deprecated': False}, + 'entessa': {'id': 'Entessa', 'deprecated': False}, + 'epics': {'id': 'EPICS', 'deprecated': False}, + 'epl-1.0': {'id': 'EPL-1.0', 'deprecated': False}, + 'epl-2.0': {'id': 'EPL-2.0', 'deprecated': False}, + 'erlpl-1.1': {'id': 'ErlPL-1.1', 'deprecated': False}, + 'etalab-2.0': {'id': 'etalab-2.0', 'deprecated': False}, + 'eudatagrid': {'id': 'EUDatagrid', 'deprecated': False}, + 'eupl-1.0': {'id': 'EUPL-1.0', 'deprecated': False}, + 'eupl-1.1': {'id': 'EUPL-1.1', 'deprecated': False}, + 'eupl-1.2': {'id': 'EUPL-1.2', 'deprecated': False}, + 'eurosym': {'id': 'Eurosym', 'deprecated': False}, + 'fair': {'id': 'Fair', 'deprecated': False}, + 'fbm': {'id': 'FBM', 'deprecated': False}, + 'fdk-aac': {'id': 'FDK-AAC', 'deprecated': False}, + 'ferguson-twofish': {'id': 'Ferguson-Twofish', 'deprecated': False}, + 'frameworx-1.0': {'id': 'Frameworx-1.0', 'deprecated': False}, + 'freebsd-doc': {'id': 'FreeBSD-DOC', 'deprecated': False}, + 'freeimage': {'id': 'FreeImage', 'deprecated': False}, + 'fsfap': {'id': 'FSFAP', 'deprecated': False}, + 'fsfap-no-warranty-disclaimer': {'id': 'FSFAP-no-warranty-disclaimer', 'deprecated': False}, + 'fsful': {'id': 'FSFUL', 'deprecated': False}, + 'fsfullr': {'id': 'FSFULLR', 'deprecated': False}, + 'fsfullrwd': {'id': 'FSFULLRWD', 'deprecated': False}, + 'ftl': {'id': 'FTL', 'deprecated': False}, + 'furuseth': {'id': 'Furuseth', 'deprecated': False}, + 'fwlw': {'id': 'fwlw', 'deprecated': False}, + 'gcr-docs': {'id': 'GCR-docs', 'deprecated': False}, + 'gd': {'id': 'GD', 'deprecated': False}, + 'gfdl-1.1': {'id': 'GFDL-1.1', 'deprecated': True}, + 'gfdl-1.1-invariants-only': {'id': 'GFDL-1.1-invariants-only', 'deprecated': False}, + 'gfdl-1.1-invariants-or-later': {'id': 'GFDL-1.1-invariants-or-later', 'deprecated': False}, + 'gfdl-1.1-no-invariants-only': {'id': 'GFDL-1.1-no-invariants-only', 'deprecated': False}, + 'gfdl-1.1-no-invariants-or-later': {'id': 'GFDL-1.1-no-invariants-or-later', 'deprecated': False}, + 'gfdl-1.1-only': {'id': 'GFDL-1.1-only', 'deprecated': False}, + 'gfdl-1.1-or-later': {'id': 'GFDL-1.1-or-later', 'deprecated': False}, + 'gfdl-1.2': {'id': 'GFDL-1.2', 'deprecated': True}, + 'gfdl-1.2-invariants-only': {'id': 'GFDL-1.2-invariants-only', 'deprecated': False}, + 'gfdl-1.2-invariants-or-later': {'id': 'GFDL-1.2-invariants-or-later', 'deprecated': False}, + 'gfdl-1.2-no-invariants-only': {'id': 'GFDL-1.2-no-invariants-only', 'deprecated': False}, + 'gfdl-1.2-no-invariants-or-later': {'id': 'GFDL-1.2-no-invariants-or-later', 'deprecated': False}, + 'gfdl-1.2-only': {'id': 'GFDL-1.2-only', 'deprecated': False}, + 'gfdl-1.2-or-later': {'id': 'GFDL-1.2-or-later', 'deprecated': False}, + 'gfdl-1.3': {'id': 'GFDL-1.3', 'deprecated': True}, + 'gfdl-1.3-invariants-only': {'id': 'GFDL-1.3-invariants-only', 'deprecated': False}, + 'gfdl-1.3-invariants-or-later': {'id': 'GFDL-1.3-invariants-or-later', 'deprecated': False}, + 'gfdl-1.3-no-invariants-only': {'id': 'GFDL-1.3-no-invariants-only', 'deprecated': False}, + 'gfdl-1.3-no-invariants-or-later': {'id': 'GFDL-1.3-no-invariants-or-later', 'deprecated': False}, + 'gfdl-1.3-only': {'id': 'GFDL-1.3-only', 'deprecated': False}, + 'gfdl-1.3-or-later': {'id': 'GFDL-1.3-or-later', 'deprecated': False}, + 'giftware': {'id': 'Giftware', 'deprecated': False}, + 'gl2ps': {'id': 'GL2PS', 'deprecated': False}, + 'glide': {'id': 'Glide', 'deprecated': False}, + 'glulxe': {'id': 'Glulxe', 'deprecated': False}, + 'glwtpl': {'id': 'GLWTPL', 'deprecated': False}, + 'gnuplot': {'id': 'gnuplot', 'deprecated': False}, + 'gpl-1.0': {'id': 'GPL-1.0', 'deprecated': True}, + 'gpl-1.0+': {'id': 'GPL-1.0+', 'deprecated': True}, + 'gpl-1.0-only': {'id': 'GPL-1.0-only', 'deprecated': False}, + 'gpl-1.0-or-later': {'id': 'GPL-1.0-or-later', 'deprecated': False}, + 'gpl-2.0': {'id': 'GPL-2.0', 'deprecated': True}, + 'gpl-2.0+': {'id': 'GPL-2.0+', 'deprecated': True}, + 'gpl-2.0-only': {'id': 'GPL-2.0-only', 'deprecated': False}, + 'gpl-2.0-or-later': {'id': 'GPL-2.0-or-later', 'deprecated': False}, + 'gpl-2.0-with-autoconf-exception': {'id': 'GPL-2.0-with-autoconf-exception', 'deprecated': True}, + 'gpl-2.0-with-bison-exception': {'id': 'GPL-2.0-with-bison-exception', 'deprecated': True}, + 'gpl-2.0-with-classpath-exception': {'id': 'GPL-2.0-with-classpath-exception', 'deprecated': True}, + 'gpl-2.0-with-font-exception': {'id': 'GPL-2.0-with-font-exception', 'deprecated': True}, + 'gpl-2.0-with-gcc-exception': {'id': 'GPL-2.0-with-GCC-exception', 'deprecated': True}, + 'gpl-3.0': {'id': 'GPL-3.0', 'deprecated': True}, + 'gpl-3.0+': {'id': 'GPL-3.0+', 'deprecated': True}, + 'gpl-3.0-only': {'id': 'GPL-3.0-only', 'deprecated': False}, + 'gpl-3.0-or-later': {'id': 'GPL-3.0-or-later', 'deprecated': False}, + 'gpl-3.0-with-autoconf-exception': {'id': 'GPL-3.0-with-autoconf-exception', 'deprecated': True}, + 'gpl-3.0-with-gcc-exception': {'id': 'GPL-3.0-with-GCC-exception', 'deprecated': True}, + 'graphics-gems': {'id': 'Graphics-Gems', 'deprecated': False}, + 'gsoap-1.3b': {'id': 'gSOAP-1.3b', 'deprecated': False}, + 'gtkbook': {'id': 'gtkbook', 'deprecated': False}, + 'gutmann': {'id': 'Gutmann', 'deprecated': False}, + 'haskellreport': {'id': 'HaskellReport', 'deprecated': False}, + 'hdparm': {'id': 'hdparm', 'deprecated': False}, + 'hidapi': {'id': 'HIDAPI', 'deprecated': False}, + 'hippocratic-2.1': {'id': 'Hippocratic-2.1', 'deprecated': False}, + 'hp-1986': {'id': 'HP-1986', 'deprecated': False}, + 'hp-1989': {'id': 'HP-1989', 'deprecated': False}, + 'hpnd': {'id': 'HPND', 'deprecated': False}, + 'hpnd-dec': {'id': 'HPND-DEC', 'deprecated': False}, + 'hpnd-doc': {'id': 'HPND-doc', 'deprecated': False}, + 'hpnd-doc-sell': {'id': 'HPND-doc-sell', 'deprecated': False}, + 'hpnd-export-us': {'id': 'HPND-export-US', 'deprecated': False}, + 'hpnd-export-us-acknowledgement': {'id': 'HPND-export-US-acknowledgement', 'deprecated': False}, + 'hpnd-export-us-modify': {'id': 'HPND-export-US-modify', 'deprecated': False}, + 'hpnd-export2-us': {'id': 'HPND-export2-US', 'deprecated': False}, + 'hpnd-fenneberg-livingston': {'id': 'HPND-Fenneberg-Livingston', 'deprecated': False}, + 'hpnd-inria-imag': {'id': 'HPND-INRIA-IMAG', 'deprecated': False}, + 'hpnd-intel': {'id': 'HPND-Intel', 'deprecated': False}, + 'hpnd-kevlin-henney': {'id': 'HPND-Kevlin-Henney', 'deprecated': False}, + 'hpnd-markus-kuhn': {'id': 'HPND-Markus-Kuhn', 'deprecated': False}, + 'hpnd-merchantability-variant': {'id': 'HPND-merchantability-variant', 'deprecated': False}, + 'hpnd-mit-disclaimer': {'id': 'HPND-MIT-disclaimer', 'deprecated': False}, + 'hpnd-netrek': {'id': 'HPND-Netrek', 'deprecated': False}, + 'hpnd-pbmplus': {'id': 'HPND-Pbmplus', 'deprecated': False}, + 'hpnd-sell-mit-disclaimer-xserver': {'id': 'HPND-sell-MIT-disclaimer-xserver', 'deprecated': False}, + 'hpnd-sell-regexpr': {'id': 'HPND-sell-regexpr', 'deprecated': False}, + 'hpnd-sell-variant': {'id': 'HPND-sell-variant', 'deprecated': False}, + 'hpnd-sell-variant-mit-disclaimer': {'id': 'HPND-sell-variant-MIT-disclaimer', 'deprecated': False}, + 'hpnd-sell-variant-mit-disclaimer-rev': {'id': 'HPND-sell-variant-MIT-disclaimer-rev', 'deprecated': False}, + 'hpnd-uc': {'id': 'HPND-UC', 'deprecated': False}, + 'hpnd-uc-export-us': {'id': 'HPND-UC-export-US', 'deprecated': False}, + 'htmltidy': {'id': 'HTMLTIDY', 'deprecated': False}, + 'ibm-pibs': {'id': 'IBM-pibs', 'deprecated': False}, + 'icu': {'id': 'ICU', 'deprecated': False}, + 'iec-code-components-eula': {'id': 'IEC-Code-Components-EULA', 'deprecated': False}, + 'ijg': {'id': 'IJG', 'deprecated': False}, + 'ijg-short': {'id': 'IJG-short', 'deprecated': False}, + 'imagemagick': {'id': 'ImageMagick', 'deprecated': False}, + 'imatix': {'id': 'iMatix', 'deprecated': False}, + 'imlib2': {'id': 'Imlib2', 'deprecated': False}, + 'info-zip': {'id': 'Info-ZIP', 'deprecated': False}, + 'inner-net-2.0': {'id': 'Inner-Net-2.0', 'deprecated': False}, + 'intel': {'id': 'Intel', 'deprecated': False}, + 'intel-acpi': {'id': 'Intel-ACPI', 'deprecated': False}, + 'interbase-1.0': {'id': 'Interbase-1.0', 'deprecated': False}, + 'ipa': {'id': 'IPA', 'deprecated': False}, + 'ipl-1.0': {'id': 'IPL-1.0', 'deprecated': False}, + 'isc': {'id': 'ISC', 'deprecated': False}, + 'isc-veillard': {'id': 'ISC-Veillard', 'deprecated': False}, + 'jam': {'id': 'Jam', 'deprecated': False}, + 'jasper-2.0': {'id': 'JasPer-2.0', 'deprecated': False}, + 'jpl-image': {'id': 'JPL-image', 'deprecated': False}, + 'jpnic': {'id': 'JPNIC', 'deprecated': False}, + 'json': {'id': 'JSON', 'deprecated': False}, + 'kastrup': {'id': 'Kastrup', 'deprecated': False}, + 'kazlib': {'id': 'Kazlib', 'deprecated': False}, + 'knuth-ctan': {'id': 'Knuth-CTAN', 'deprecated': False}, + 'lal-1.2': {'id': 'LAL-1.2', 'deprecated': False}, + 'lal-1.3': {'id': 'LAL-1.3', 'deprecated': False}, + 'latex2e': {'id': 'Latex2e', 'deprecated': False}, + 'latex2e-translated-notice': {'id': 'Latex2e-translated-notice', 'deprecated': False}, + 'leptonica': {'id': 'Leptonica', 'deprecated': False}, + 'lgpl-2.0': {'id': 'LGPL-2.0', 'deprecated': True}, + 'lgpl-2.0+': {'id': 'LGPL-2.0+', 'deprecated': True}, + 'lgpl-2.0-only': {'id': 'LGPL-2.0-only', 'deprecated': False}, + 'lgpl-2.0-or-later': {'id': 'LGPL-2.0-or-later', 'deprecated': False}, + 'lgpl-2.1': {'id': 'LGPL-2.1', 'deprecated': True}, + 'lgpl-2.1+': {'id': 'LGPL-2.1+', 'deprecated': True}, + 'lgpl-2.1-only': {'id': 'LGPL-2.1-only', 'deprecated': False}, + 'lgpl-2.1-or-later': {'id': 'LGPL-2.1-or-later', 'deprecated': False}, + 'lgpl-3.0': {'id': 'LGPL-3.0', 'deprecated': True}, + 'lgpl-3.0+': {'id': 'LGPL-3.0+', 'deprecated': True}, + 'lgpl-3.0-only': {'id': 'LGPL-3.0-only', 'deprecated': False}, + 'lgpl-3.0-or-later': {'id': 'LGPL-3.0-or-later', 'deprecated': False}, + 'lgpllr': {'id': 'LGPLLR', 'deprecated': False}, + 'libpng': {'id': 'Libpng', 'deprecated': False}, + 'libpng-2.0': {'id': 'libpng-2.0', 'deprecated': False}, + 'libselinux-1.0': {'id': 'libselinux-1.0', 'deprecated': False}, + 'libtiff': {'id': 'libtiff', 'deprecated': False}, + 'libutil-david-nugent': {'id': 'libutil-David-Nugent', 'deprecated': False}, + 'liliq-p-1.1': {'id': 'LiLiQ-P-1.1', 'deprecated': False}, + 'liliq-r-1.1': {'id': 'LiLiQ-R-1.1', 'deprecated': False}, + 'liliq-rplus-1.1': {'id': 'LiLiQ-Rplus-1.1', 'deprecated': False}, + 'linux-man-pages-1-para': {'id': 'Linux-man-pages-1-para', 'deprecated': False}, + 'linux-man-pages-copyleft': {'id': 'Linux-man-pages-copyleft', 'deprecated': False}, + 'linux-man-pages-copyleft-2-para': {'id': 'Linux-man-pages-copyleft-2-para', 'deprecated': False}, + 'linux-man-pages-copyleft-var': {'id': 'Linux-man-pages-copyleft-var', 'deprecated': False}, + 'linux-openib': {'id': 'Linux-OpenIB', 'deprecated': False}, + 'loop': {'id': 'LOOP', 'deprecated': False}, + 'lpd-document': {'id': 'LPD-document', 'deprecated': False}, + 'lpl-1.0': {'id': 'LPL-1.0', 'deprecated': False}, + 'lpl-1.02': {'id': 'LPL-1.02', 'deprecated': False}, + 'lppl-1.0': {'id': 'LPPL-1.0', 'deprecated': False}, + 'lppl-1.1': {'id': 'LPPL-1.1', 'deprecated': False}, + 'lppl-1.2': {'id': 'LPPL-1.2', 'deprecated': False}, + 'lppl-1.3a': {'id': 'LPPL-1.3a', 'deprecated': False}, + 'lppl-1.3c': {'id': 'LPPL-1.3c', 'deprecated': False}, + 'lsof': {'id': 'lsof', 'deprecated': False}, + 'lucida-bitmap-fonts': {'id': 'Lucida-Bitmap-Fonts', 'deprecated': False}, + 'lzma-sdk-9.11-to-9.20': {'id': 'LZMA-SDK-9.11-to-9.20', 'deprecated': False}, + 'lzma-sdk-9.22': {'id': 'LZMA-SDK-9.22', 'deprecated': False}, + 'mackerras-3-clause': {'id': 'Mackerras-3-Clause', 'deprecated': False}, + 'mackerras-3-clause-acknowledgment': {'id': 'Mackerras-3-Clause-acknowledgment', 'deprecated': False}, + 'magaz': {'id': 'magaz', 'deprecated': False}, + 'mailprio': {'id': 'mailprio', 'deprecated': False}, + 'makeindex': {'id': 'MakeIndex', 'deprecated': False}, + 'martin-birgmeier': {'id': 'Martin-Birgmeier', 'deprecated': False}, + 'mcphee-slideshow': {'id': 'McPhee-slideshow', 'deprecated': False}, + 'metamail': {'id': 'metamail', 'deprecated': False}, + 'minpack': {'id': 'Minpack', 'deprecated': False}, + 'miros': {'id': 'MirOS', 'deprecated': False}, + 'mit': {'id': 'MIT', 'deprecated': False}, + 'mit-0': {'id': 'MIT-0', 'deprecated': False}, + 'mit-advertising': {'id': 'MIT-advertising', 'deprecated': False}, + 'mit-cmu': {'id': 'MIT-CMU', 'deprecated': False}, + 'mit-enna': {'id': 'MIT-enna', 'deprecated': False}, + 'mit-feh': {'id': 'MIT-feh', 'deprecated': False}, + 'mit-festival': {'id': 'MIT-Festival', 'deprecated': False}, + 'mit-khronos-old': {'id': 'MIT-Khronos-old', 'deprecated': False}, + 'mit-modern-variant': {'id': 'MIT-Modern-Variant', 'deprecated': False}, + 'mit-open-group': {'id': 'MIT-open-group', 'deprecated': False}, + 'mit-testregex': {'id': 'MIT-testregex', 'deprecated': False}, + 'mit-wu': {'id': 'MIT-Wu', 'deprecated': False}, + 'mitnfa': {'id': 'MITNFA', 'deprecated': False}, + 'mmixware': {'id': 'MMIXware', 'deprecated': False}, + 'motosoto': {'id': 'Motosoto', 'deprecated': False}, + 'mpeg-ssg': {'id': 'MPEG-SSG', 'deprecated': False}, + 'mpi-permissive': {'id': 'mpi-permissive', 'deprecated': False}, + 'mpich2': {'id': 'mpich2', 'deprecated': False}, + 'mpl-1.0': {'id': 'MPL-1.0', 'deprecated': False}, + 'mpl-1.1': {'id': 'MPL-1.1', 'deprecated': False}, + 'mpl-2.0': {'id': 'MPL-2.0', 'deprecated': False}, + 'mpl-2.0-no-copyleft-exception': {'id': 'MPL-2.0-no-copyleft-exception', 'deprecated': False}, + 'mplus': {'id': 'mplus', 'deprecated': False}, + 'ms-lpl': {'id': 'MS-LPL', 'deprecated': False}, + 'ms-pl': {'id': 'MS-PL', 'deprecated': False}, + 'ms-rl': {'id': 'MS-RL', 'deprecated': False}, + 'mtll': {'id': 'MTLL', 'deprecated': False}, + 'mulanpsl-1.0': {'id': 'MulanPSL-1.0', 'deprecated': False}, + 'mulanpsl-2.0': {'id': 'MulanPSL-2.0', 'deprecated': False}, + 'multics': {'id': 'Multics', 'deprecated': False}, + 'mup': {'id': 'Mup', 'deprecated': False}, + 'naist-2003': {'id': 'NAIST-2003', 'deprecated': False}, + 'nasa-1.3': {'id': 'NASA-1.3', 'deprecated': False}, + 'naumen': {'id': 'Naumen', 'deprecated': False}, + 'nbpl-1.0': {'id': 'NBPL-1.0', 'deprecated': False}, + 'ncbi-pd': {'id': 'NCBI-PD', 'deprecated': False}, + 'ncgl-uk-2.0': {'id': 'NCGL-UK-2.0', 'deprecated': False}, + 'ncl': {'id': 'NCL', 'deprecated': False}, + 'ncsa': {'id': 'NCSA', 'deprecated': False}, + 'net-snmp': {'id': 'Net-SNMP', 'deprecated': True}, + 'netcdf': {'id': 'NetCDF', 'deprecated': False}, + 'newsletr': {'id': 'Newsletr', 'deprecated': False}, + 'ngpl': {'id': 'NGPL', 'deprecated': False}, + 'nicta-1.0': {'id': 'NICTA-1.0', 'deprecated': False}, + 'nist-pd': {'id': 'NIST-PD', 'deprecated': False}, + 'nist-pd-fallback': {'id': 'NIST-PD-fallback', 'deprecated': False}, + 'nist-software': {'id': 'NIST-Software', 'deprecated': False}, + 'nlod-1.0': {'id': 'NLOD-1.0', 'deprecated': False}, + 'nlod-2.0': {'id': 'NLOD-2.0', 'deprecated': False}, + 'nlpl': {'id': 'NLPL', 'deprecated': False}, + 'nokia': {'id': 'Nokia', 'deprecated': False}, + 'nosl': {'id': 'NOSL', 'deprecated': False}, + 'noweb': {'id': 'Noweb', 'deprecated': False}, + 'npl-1.0': {'id': 'NPL-1.0', 'deprecated': False}, + 'npl-1.1': {'id': 'NPL-1.1', 'deprecated': False}, + 'nposl-3.0': {'id': 'NPOSL-3.0', 'deprecated': False}, + 'nrl': {'id': 'NRL', 'deprecated': False}, + 'ntp': {'id': 'NTP', 'deprecated': False}, + 'ntp-0': {'id': 'NTP-0', 'deprecated': False}, + 'nunit': {'id': 'Nunit', 'deprecated': True}, + 'o-uda-1.0': {'id': 'O-UDA-1.0', 'deprecated': False}, + 'oar': {'id': 'OAR', 'deprecated': False}, + 'occt-pl': {'id': 'OCCT-PL', 'deprecated': False}, + 'oclc-2.0': {'id': 'OCLC-2.0', 'deprecated': False}, + 'odbl-1.0': {'id': 'ODbL-1.0', 'deprecated': False}, + 'odc-by-1.0': {'id': 'ODC-By-1.0', 'deprecated': False}, + 'offis': {'id': 'OFFIS', 'deprecated': False}, + 'ofl-1.0': {'id': 'OFL-1.0', 'deprecated': False}, + 'ofl-1.0-no-rfn': {'id': 'OFL-1.0-no-RFN', 'deprecated': False}, + 'ofl-1.0-rfn': {'id': 'OFL-1.0-RFN', 'deprecated': False}, + 'ofl-1.1': {'id': 'OFL-1.1', 'deprecated': False}, + 'ofl-1.1-no-rfn': {'id': 'OFL-1.1-no-RFN', 'deprecated': False}, + 'ofl-1.1-rfn': {'id': 'OFL-1.1-RFN', 'deprecated': False}, + 'ogc-1.0': {'id': 'OGC-1.0', 'deprecated': False}, + 'ogdl-taiwan-1.0': {'id': 'OGDL-Taiwan-1.0', 'deprecated': False}, + 'ogl-canada-2.0': {'id': 'OGL-Canada-2.0', 'deprecated': False}, + 'ogl-uk-1.0': {'id': 'OGL-UK-1.0', 'deprecated': False}, + 'ogl-uk-2.0': {'id': 'OGL-UK-2.0', 'deprecated': False}, + 'ogl-uk-3.0': {'id': 'OGL-UK-3.0', 'deprecated': False}, + 'ogtsl': {'id': 'OGTSL', 'deprecated': False}, + 'oldap-1.1': {'id': 'OLDAP-1.1', 'deprecated': False}, + 'oldap-1.2': {'id': 'OLDAP-1.2', 'deprecated': False}, + 'oldap-1.3': {'id': 'OLDAP-1.3', 'deprecated': False}, + 'oldap-1.4': {'id': 'OLDAP-1.4', 'deprecated': False}, + 'oldap-2.0': {'id': 'OLDAP-2.0', 'deprecated': False}, + 'oldap-2.0.1': {'id': 'OLDAP-2.0.1', 'deprecated': False}, + 'oldap-2.1': {'id': 'OLDAP-2.1', 'deprecated': False}, + 'oldap-2.2': {'id': 'OLDAP-2.2', 'deprecated': False}, + 'oldap-2.2.1': {'id': 'OLDAP-2.2.1', 'deprecated': False}, + 'oldap-2.2.2': {'id': 'OLDAP-2.2.2', 'deprecated': False}, + 'oldap-2.3': {'id': 'OLDAP-2.3', 'deprecated': False}, + 'oldap-2.4': {'id': 'OLDAP-2.4', 'deprecated': False}, + 'oldap-2.5': {'id': 'OLDAP-2.5', 'deprecated': False}, + 'oldap-2.6': {'id': 'OLDAP-2.6', 'deprecated': False}, + 'oldap-2.7': {'id': 'OLDAP-2.7', 'deprecated': False}, + 'oldap-2.8': {'id': 'OLDAP-2.8', 'deprecated': False}, + 'olfl-1.3': {'id': 'OLFL-1.3', 'deprecated': False}, + 'oml': {'id': 'OML', 'deprecated': False}, + 'openpbs-2.3': {'id': 'OpenPBS-2.3', 'deprecated': False}, + 'openssl': {'id': 'OpenSSL', 'deprecated': False}, + 'openssl-standalone': {'id': 'OpenSSL-standalone', 'deprecated': False}, + 'openvision': {'id': 'OpenVision', 'deprecated': False}, + 'opl-1.0': {'id': 'OPL-1.0', 'deprecated': False}, + 'opl-uk-3.0': {'id': 'OPL-UK-3.0', 'deprecated': False}, + 'opubl-1.0': {'id': 'OPUBL-1.0', 'deprecated': False}, + 'oset-pl-2.1': {'id': 'OSET-PL-2.1', 'deprecated': False}, + 'osl-1.0': {'id': 'OSL-1.0', 'deprecated': False}, + 'osl-1.1': {'id': 'OSL-1.1', 'deprecated': False}, + 'osl-2.0': {'id': 'OSL-2.0', 'deprecated': False}, + 'osl-2.1': {'id': 'OSL-2.1', 'deprecated': False}, + 'osl-3.0': {'id': 'OSL-3.0', 'deprecated': False}, + 'padl': {'id': 'PADL', 'deprecated': False}, + 'parity-6.0.0': {'id': 'Parity-6.0.0', 'deprecated': False}, + 'parity-7.0.0': {'id': 'Parity-7.0.0', 'deprecated': False}, + 'pddl-1.0': {'id': 'PDDL-1.0', 'deprecated': False}, + 'php-3.0': {'id': 'PHP-3.0', 'deprecated': False}, + 'php-3.01': {'id': 'PHP-3.01', 'deprecated': False}, + 'pixar': {'id': 'Pixar', 'deprecated': False}, + 'pkgconf': {'id': 'pkgconf', 'deprecated': False}, + 'plexus': {'id': 'Plexus', 'deprecated': False}, + 'pnmstitch': {'id': 'pnmstitch', 'deprecated': False}, + 'polyform-noncommercial-1.0.0': {'id': 'PolyForm-Noncommercial-1.0.0', 'deprecated': False}, + 'polyform-small-business-1.0.0': {'id': 'PolyForm-Small-Business-1.0.0', 'deprecated': False}, + 'postgresql': {'id': 'PostgreSQL', 'deprecated': False}, + 'ppl': {'id': 'PPL', 'deprecated': False}, + 'psf-2.0': {'id': 'PSF-2.0', 'deprecated': False}, + 'psfrag': {'id': 'psfrag', 'deprecated': False}, + 'psutils': {'id': 'psutils', 'deprecated': False}, + 'python-2.0': {'id': 'Python-2.0', 'deprecated': False}, + 'python-2.0.1': {'id': 'Python-2.0.1', 'deprecated': False}, + 'python-ldap': {'id': 'python-ldap', 'deprecated': False}, + 'qhull': {'id': 'Qhull', 'deprecated': False}, + 'qpl-1.0': {'id': 'QPL-1.0', 'deprecated': False}, + 'qpl-1.0-inria-2004': {'id': 'QPL-1.0-INRIA-2004', 'deprecated': False}, + 'radvd': {'id': 'radvd', 'deprecated': False}, + 'rdisc': {'id': 'Rdisc', 'deprecated': False}, + 'rhecos-1.1': {'id': 'RHeCos-1.1', 'deprecated': False}, + 'rpl-1.1': {'id': 'RPL-1.1', 'deprecated': False}, + 'rpl-1.5': {'id': 'RPL-1.5', 'deprecated': False}, + 'rpsl-1.0': {'id': 'RPSL-1.0', 'deprecated': False}, + 'rsa-md': {'id': 'RSA-MD', 'deprecated': False}, + 'rscpl': {'id': 'RSCPL', 'deprecated': False}, + 'ruby': {'id': 'Ruby', 'deprecated': False}, + 'ruby-pty': {'id': 'Ruby-pty', 'deprecated': False}, + 'sax-pd': {'id': 'SAX-PD', 'deprecated': False}, + 'sax-pd-2.0': {'id': 'SAX-PD-2.0', 'deprecated': False}, + 'saxpath': {'id': 'Saxpath', 'deprecated': False}, + 'scea': {'id': 'SCEA', 'deprecated': False}, + 'schemereport': {'id': 'SchemeReport', 'deprecated': False}, + 'sendmail': {'id': 'Sendmail', 'deprecated': False}, + 'sendmail-8.23': {'id': 'Sendmail-8.23', 'deprecated': False}, + 'sgi-b-1.0': {'id': 'SGI-B-1.0', 'deprecated': False}, + 'sgi-b-1.1': {'id': 'SGI-B-1.1', 'deprecated': False}, + 'sgi-b-2.0': {'id': 'SGI-B-2.0', 'deprecated': False}, + 'sgi-opengl': {'id': 'SGI-OpenGL', 'deprecated': False}, + 'sgp4': {'id': 'SGP4', 'deprecated': False}, + 'shl-0.5': {'id': 'SHL-0.5', 'deprecated': False}, + 'shl-0.51': {'id': 'SHL-0.51', 'deprecated': False}, + 'simpl-2.0': {'id': 'SimPL-2.0', 'deprecated': False}, + 'sissl': {'id': 'SISSL', 'deprecated': False}, + 'sissl-1.2': {'id': 'SISSL-1.2', 'deprecated': False}, + 'sl': {'id': 'SL', 'deprecated': False}, + 'sleepycat': {'id': 'Sleepycat', 'deprecated': False}, + 'smlnj': {'id': 'SMLNJ', 'deprecated': False}, + 'smppl': {'id': 'SMPPL', 'deprecated': False}, + 'snia': {'id': 'SNIA', 'deprecated': False}, + 'snprintf': {'id': 'snprintf', 'deprecated': False}, + 'softsurfer': {'id': 'softSurfer', 'deprecated': False}, + 'soundex': {'id': 'Soundex', 'deprecated': False}, + 'spencer-86': {'id': 'Spencer-86', 'deprecated': False}, + 'spencer-94': {'id': 'Spencer-94', 'deprecated': False}, + 'spencer-99': {'id': 'Spencer-99', 'deprecated': False}, + 'spl-1.0': {'id': 'SPL-1.0', 'deprecated': False}, + 'ssh-keyscan': {'id': 'ssh-keyscan', 'deprecated': False}, + 'ssh-openssh': {'id': 'SSH-OpenSSH', 'deprecated': False}, + 'ssh-short': {'id': 'SSH-short', 'deprecated': False}, + 'ssleay-standalone': {'id': 'SSLeay-standalone', 'deprecated': False}, + 'sspl-1.0': {'id': 'SSPL-1.0', 'deprecated': False}, + 'standardml-nj': {'id': 'StandardML-NJ', 'deprecated': True}, + 'sugarcrm-1.1.3': {'id': 'SugarCRM-1.1.3', 'deprecated': False}, + 'sun-ppp': {'id': 'Sun-PPP', 'deprecated': False}, + 'sun-ppp-2000': {'id': 'Sun-PPP-2000', 'deprecated': False}, + 'sunpro': {'id': 'SunPro', 'deprecated': False}, + 'swl': {'id': 'SWL', 'deprecated': False}, + 'swrule': {'id': 'swrule', 'deprecated': False}, + 'symlinks': {'id': 'Symlinks', 'deprecated': False}, + 'tapr-ohl-1.0': {'id': 'TAPR-OHL-1.0', 'deprecated': False}, + 'tcl': {'id': 'TCL', 'deprecated': False}, + 'tcp-wrappers': {'id': 'TCP-wrappers', 'deprecated': False}, + 'termreadkey': {'id': 'TermReadKey', 'deprecated': False}, + 'tgppl-1.0': {'id': 'TGPPL-1.0', 'deprecated': False}, + 'threeparttable': {'id': 'threeparttable', 'deprecated': False}, + 'tmate': {'id': 'TMate', 'deprecated': False}, + 'torque-1.1': {'id': 'TORQUE-1.1', 'deprecated': False}, + 'tosl': {'id': 'TOSL', 'deprecated': False}, + 'tpdl': {'id': 'TPDL', 'deprecated': False}, + 'tpl-1.0': {'id': 'TPL-1.0', 'deprecated': False}, + 'ttwl': {'id': 'TTWL', 'deprecated': False}, + 'ttyp0': {'id': 'TTYP0', 'deprecated': False}, + 'tu-berlin-1.0': {'id': 'TU-Berlin-1.0', 'deprecated': False}, + 'tu-berlin-2.0': {'id': 'TU-Berlin-2.0', 'deprecated': False}, + 'ubuntu-font-1.0': {'id': 'Ubuntu-font-1.0', 'deprecated': False}, + 'ucar': {'id': 'UCAR', 'deprecated': False}, + 'ucl-1.0': {'id': 'UCL-1.0', 'deprecated': False}, + 'ulem': {'id': 'ulem', 'deprecated': False}, + 'umich-merit': {'id': 'UMich-Merit', 'deprecated': False}, + 'unicode-3.0': {'id': 'Unicode-3.0', 'deprecated': False}, + 'unicode-dfs-2015': {'id': 'Unicode-DFS-2015', 'deprecated': False}, + 'unicode-dfs-2016': {'id': 'Unicode-DFS-2016', 'deprecated': False}, + 'unicode-tou': {'id': 'Unicode-TOU', 'deprecated': False}, + 'unixcrypt': {'id': 'UnixCrypt', 'deprecated': False}, + 'unlicense': {'id': 'Unlicense', 'deprecated': False}, + 'upl-1.0': {'id': 'UPL-1.0', 'deprecated': False}, + 'urt-rle': {'id': 'URT-RLE', 'deprecated': False}, + 'vim': {'id': 'Vim', 'deprecated': False}, + 'vostrom': {'id': 'VOSTROM', 'deprecated': False}, + 'vsl-1.0': {'id': 'VSL-1.0', 'deprecated': False}, + 'w3c': {'id': 'W3C', 'deprecated': False}, + 'w3c-19980720': {'id': 'W3C-19980720', 'deprecated': False}, + 'w3c-20150513': {'id': 'W3C-20150513', 'deprecated': False}, + 'w3m': {'id': 'w3m', 'deprecated': False}, + 'watcom-1.0': {'id': 'Watcom-1.0', 'deprecated': False}, + 'widget-workshop': {'id': 'Widget-Workshop', 'deprecated': False}, + 'wsuipa': {'id': 'Wsuipa', 'deprecated': False}, + 'wtfpl': {'id': 'WTFPL', 'deprecated': False}, + 'wxwindows': {'id': 'wxWindows', 'deprecated': True}, + 'x11': {'id': 'X11', 'deprecated': False}, + 'x11-distribute-modifications-variant': {'id': 'X11-distribute-modifications-variant', 'deprecated': False}, + 'x11-swapped': {'id': 'X11-swapped', 'deprecated': False}, + 'xdebug-1.03': {'id': 'Xdebug-1.03', 'deprecated': False}, + 'xerox': {'id': 'Xerox', 'deprecated': False}, + 'xfig': {'id': 'Xfig', 'deprecated': False}, + 'xfree86-1.1': {'id': 'XFree86-1.1', 'deprecated': False}, + 'xinetd': {'id': 'xinetd', 'deprecated': False}, + 'xkeyboard-config-zinoviev': {'id': 'xkeyboard-config-Zinoviev', 'deprecated': False}, + 'xlock': {'id': 'xlock', 'deprecated': False}, + 'xnet': {'id': 'Xnet', 'deprecated': False}, + 'xpp': {'id': 'xpp', 'deprecated': False}, + 'xskat': {'id': 'XSkat', 'deprecated': False}, + 'xzoom': {'id': 'xzoom', 'deprecated': False}, + 'ypl-1.0': {'id': 'YPL-1.0', 'deprecated': False}, + 'ypl-1.1': {'id': 'YPL-1.1', 'deprecated': False}, + 'zed': {'id': 'Zed', 'deprecated': False}, + 'zeeff': {'id': 'Zeeff', 'deprecated': False}, + 'zend-2.0': {'id': 'Zend-2.0', 'deprecated': False}, + 'zimbra-1.3': {'id': 'Zimbra-1.3', 'deprecated': False}, + 'zimbra-1.4': {'id': 'Zimbra-1.4', 'deprecated': False}, + 'zlib': {'id': 'Zlib', 'deprecated': False}, + 'zlib-acknowledgement': {'id': 'zlib-acknowledgement', 'deprecated': False}, + 'zpl-1.1': {'id': 'ZPL-1.1', 'deprecated': False}, + 'zpl-2.0': {'id': 'ZPL-2.0', 'deprecated': False}, + 'zpl-2.1': {'id': 'ZPL-2.1', 'deprecated': False}, +} + +EXCEPTIONS: dict[str, SPDXException] = { + '389-exception': {'id': '389-exception', 'deprecated': False}, + 'asterisk-exception': {'id': 'Asterisk-exception', 'deprecated': False}, + 'asterisk-linking-protocols-exception': {'id': 'Asterisk-linking-protocols-exception', 'deprecated': False}, + 'autoconf-exception-2.0': {'id': 'Autoconf-exception-2.0', 'deprecated': False}, + 'autoconf-exception-3.0': {'id': 'Autoconf-exception-3.0', 'deprecated': False}, + 'autoconf-exception-generic': {'id': 'Autoconf-exception-generic', 'deprecated': False}, + 'autoconf-exception-generic-3.0': {'id': 'Autoconf-exception-generic-3.0', 'deprecated': False}, + 'autoconf-exception-macro': {'id': 'Autoconf-exception-macro', 'deprecated': False}, + 'bison-exception-1.24': {'id': 'Bison-exception-1.24', 'deprecated': False}, + 'bison-exception-2.2': {'id': 'Bison-exception-2.2', 'deprecated': False}, + 'bootloader-exception': {'id': 'Bootloader-exception', 'deprecated': False}, + 'classpath-exception-2.0': {'id': 'Classpath-exception-2.0', 'deprecated': False}, + 'clisp-exception-2.0': {'id': 'CLISP-exception-2.0', 'deprecated': False}, + 'cryptsetup-openssl-exception': {'id': 'cryptsetup-OpenSSL-exception', 'deprecated': False}, + 'digirule-foss-exception': {'id': 'DigiRule-FOSS-exception', 'deprecated': False}, + 'ecos-exception-2.0': {'id': 'eCos-exception-2.0', 'deprecated': False}, + 'erlang-otp-linking-exception': {'id': 'erlang-otp-linking-exception', 'deprecated': False}, + 'fawkes-runtime-exception': {'id': 'Fawkes-Runtime-exception', 'deprecated': False}, + 'fltk-exception': {'id': 'FLTK-exception', 'deprecated': False}, + 'fmt-exception': {'id': 'fmt-exception', 'deprecated': False}, + 'font-exception-2.0': {'id': 'Font-exception-2.0', 'deprecated': False}, + 'freertos-exception-2.0': {'id': 'freertos-exception-2.0', 'deprecated': False}, + 'gcc-exception-2.0': {'id': 'GCC-exception-2.0', 'deprecated': False}, + 'gcc-exception-2.0-note': {'id': 'GCC-exception-2.0-note', 'deprecated': False}, + 'gcc-exception-3.1': {'id': 'GCC-exception-3.1', 'deprecated': False}, + 'gmsh-exception': {'id': 'Gmsh-exception', 'deprecated': False}, + 'gnat-exception': {'id': 'GNAT-exception', 'deprecated': False}, + 'gnome-examples-exception': {'id': 'GNOME-examples-exception', 'deprecated': False}, + 'gnu-compiler-exception': {'id': 'GNU-compiler-exception', 'deprecated': False}, + 'gnu-javamail-exception': {'id': 'gnu-javamail-exception', 'deprecated': False}, + 'gpl-3.0-interface-exception': {'id': 'GPL-3.0-interface-exception', 'deprecated': False}, + 'gpl-3.0-linking-exception': {'id': 'GPL-3.0-linking-exception', 'deprecated': False}, + 'gpl-3.0-linking-source-exception': {'id': 'GPL-3.0-linking-source-exception', 'deprecated': False}, + 'gpl-cc-1.0': {'id': 'GPL-CC-1.0', 'deprecated': False}, + 'gstreamer-exception-2005': {'id': 'GStreamer-exception-2005', 'deprecated': False}, + 'gstreamer-exception-2008': {'id': 'GStreamer-exception-2008', 'deprecated': False}, + 'i2p-gpl-java-exception': {'id': 'i2p-gpl-java-exception', 'deprecated': False}, + 'kicad-libraries-exception': {'id': 'KiCad-libraries-exception', 'deprecated': False}, + 'lgpl-3.0-linking-exception': {'id': 'LGPL-3.0-linking-exception', 'deprecated': False}, + 'libpri-openh323-exception': {'id': 'libpri-OpenH323-exception', 'deprecated': False}, + 'libtool-exception': {'id': 'Libtool-exception', 'deprecated': False}, + 'linux-syscall-note': {'id': 'Linux-syscall-note', 'deprecated': False}, + 'llgpl': {'id': 'LLGPL', 'deprecated': False}, + 'llvm-exception': {'id': 'LLVM-exception', 'deprecated': False}, + 'lzma-exception': {'id': 'LZMA-exception', 'deprecated': False}, + 'mif-exception': {'id': 'mif-exception', 'deprecated': False}, + 'nokia-qt-exception-1.1': {'id': 'Nokia-Qt-exception-1.1', 'deprecated': True}, + 'ocaml-lgpl-linking-exception': {'id': 'OCaml-LGPL-linking-exception', 'deprecated': False}, + 'occt-exception-1.0': {'id': 'OCCT-exception-1.0', 'deprecated': False}, + 'openjdk-assembly-exception-1.0': {'id': 'OpenJDK-assembly-exception-1.0', 'deprecated': False}, + 'openvpn-openssl-exception': {'id': 'openvpn-openssl-exception', 'deprecated': False}, + 'pcre2-exception': {'id': 'PCRE2-exception', 'deprecated': False}, + 'ps-or-pdf-font-exception-20170817': {'id': 'PS-or-PDF-font-exception-20170817', 'deprecated': False}, + 'qpl-1.0-inria-2004-exception': {'id': 'QPL-1.0-INRIA-2004-exception', 'deprecated': False}, + 'qt-gpl-exception-1.0': {'id': 'Qt-GPL-exception-1.0', 'deprecated': False}, + 'qt-lgpl-exception-1.1': {'id': 'Qt-LGPL-exception-1.1', 'deprecated': False}, + 'qwt-exception-1.0': {'id': 'Qwt-exception-1.0', 'deprecated': False}, + 'romic-exception': {'id': 'romic-exception', 'deprecated': False}, + 'rrdtool-floss-exception-2.0': {'id': 'RRDtool-FLOSS-exception-2.0', 'deprecated': False}, + 'sane-exception': {'id': 'SANE-exception', 'deprecated': False}, + 'shl-2.0': {'id': 'SHL-2.0', 'deprecated': False}, + 'shl-2.1': {'id': 'SHL-2.1', 'deprecated': False}, + 'stunnel-exception': {'id': 'stunnel-exception', 'deprecated': False}, + 'swi-exception': {'id': 'SWI-exception', 'deprecated': False}, + 'swift-exception': {'id': 'Swift-exception', 'deprecated': False}, + 'texinfo-exception': {'id': 'Texinfo-exception', 'deprecated': False}, + 'u-boot-exception-2.0': {'id': 'u-boot-exception-2.0', 'deprecated': False}, + 'ubdl-exception': {'id': 'UBDL-exception', 'deprecated': False}, + 'universal-foss-exception-1.0': {'id': 'Universal-FOSS-exception-1.0', 'deprecated': False}, + 'vsftpd-openssl-exception': {'id': 'vsftpd-openssl-exception', 'deprecated': False}, + 'wxwindows-exception-3.1': {'id': 'WxWindows-exception-3.1', 'deprecated': False}, + 'x11vnc-openssl-exception': {'id': 'x11vnc-openssl-exception', 'deprecated': False}, +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py new file mode 100644 index 0000000000000000000000000000000000000000..fb7f49cf8cd43ffae71e3e8d15174d7536f9da02 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py @@ -0,0 +1,331 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import annotations + +import operator +import os +import platform +import sys +from typing import Any, Callable, TypedDict, cast + +from ._parser import MarkerAtom, MarkerList, Op, Value, Variable +from ._parser import parse_marker as _parse_marker +from ._tokenizer import ParserSyntaxError +from .specifiers import InvalidSpecifier, Specifier +from .utils import canonicalize_name + +__all__ = [ + "InvalidMarker", + "Marker", + "UndefinedComparison", + "UndefinedEnvironmentName", + "default_environment", +] + +Operator = Callable[[str, str], bool] + + +class InvalidMarker(ValueError): + """ + An invalid marker was found, users should refer to PEP 508. + """ + + +class UndefinedComparison(ValueError): + """ + An invalid operation was attempted on a value that doesn't support it. + """ + + +class UndefinedEnvironmentName(ValueError): + """ + A name was attempted to be used that does not exist inside of the + environment. + """ + + +class Environment(TypedDict): + implementation_name: str + """The implementation's identifier, e.g. ``'cpython'``.""" + + implementation_version: str + """ + The implementation's version, e.g. ``'3.13.0a2'`` for CPython 3.13.0a2, or + ``'7.3.13'`` for PyPy3.10 v7.3.13. + """ + + os_name: str + """ + The value of :py:data:`os.name`. The name of the operating system dependent module + imported, e.g. ``'posix'``. + """ + + platform_machine: str + """ + Returns the machine type, e.g. ``'i386'``. + + An empty string if the value cannot be determined. + """ + + platform_release: str + """ + The system's release, e.g. ``'2.2.0'`` or ``'NT'``. + + An empty string if the value cannot be determined. + """ + + platform_system: str + """ + The system/OS name, e.g. ``'Linux'``, ``'Windows'`` or ``'Java'``. + + An empty string if the value cannot be determined. + """ + + platform_version: str + """ + The system's release version, e.g. ``'#3 on degas'``. + + An empty string if the value cannot be determined. + """ + + python_full_version: str + """ + The Python version as string ``'major.minor.patchlevel'``. + + Note that unlike the Python :py:data:`sys.version`, this value will always include + the patchlevel (it defaults to 0). + """ + + platform_python_implementation: str + """ + A string identifying the Python implementation, e.g. ``'CPython'``. + """ + + python_version: str + """The Python version as string ``'major.minor'``.""" + + sys_platform: str + """ + This string contains a platform identifier that can be used to append + platform-specific components to :py:data:`sys.path`, for instance. + + For Unix systems, except on Linux and AIX, this is the lowercased OS name as + returned by ``uname -s`` with the first part of the version as returned by + ``uname -r`` appended, e.g. ``'sunos5'`` or ``'freebsd8'``, at the time when Python + was built. + """ + + +def _normalize_extra_values(results: Any) -> Any: + """ + Normalize extra values. + """ + if isinstance(results[0], tuple): + lhs, op, rhs = results[0] + if isinstance(lhs, Variable) and lhs.value == "extra": + normalized_extra = canonicalize_name(rhs.value) + rhs = Value(normalized_extra) + elif isinstance(rhs, Variable) and rhs.value == "extra": + normalized_extra = canonicalize_name(lhs.value) + lhs = Value(normalized_extra) + results[0] = lhs, op, rhs + return results + + +def _format_marker( + marker: list[str] | MarkerAtom | str, first: bool | None = True +) -> str: + assert isinstance(marker, (list, tuple, str)) + + # Sometimes we have a structure like [[...]] which is a single item list + # where the single item is itself it's own list. In that case we want skip + # the rest of this function so that we don't get extraneous () on the + # outside. + if ( + isinstance(marker, list) + and len(marker) == 1 + and isinstance(marker[0], (list, tuple)) + ): + return _format_marker(marker[0]) + + if isinstance(marker, list): + inner = (_format_marker(m, first=False) for m in marker) + if first: + return " ".join(inner) + else: + return "(" + " ".join(inner) + ")" + elif isinstance(marker, tuple): + return " ".join([m.serialize() for m in marker]) + else: + return marker + + +_operators: dict[str, Operator] = { + "in": lambda lhs, rhs: lhs in rhs, + "not in": lambda lhs, rhs: lhs not in rhs, + "<": operator.lt, + "<=": operator.le, + "==": operator.eq, + "!=": operator.ne, + ">=": operator.ge, + ">": operator.gt, +} + + +def _eval_op(lhs: str, op: Op, rhs: str) -> bool: + try: + spec = Specifier("".join([op.serialize(), rhs])) + except InvalidSpecifier: + pass + else: + return spec.contains(lhs, prereleases=True) + + oper: Operator | None = _operators.get(op.serialize()) + if oper is None: + raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.") + + return oper(lhs, rhs) + + +def _normalize(*values: str, key: str) -> tuple[str, ...]: + # PEP 685 – Comparison of extra names for optional distribution dependencies + # https://peps.python.org/pep-0685/ + # > When comparing extra names, tools MUST normalize the names being + # > compared using the semantics outlined in PEP 503 for names + if key == "extra": + return tuple(canonicalize_name(v) for v in values) + + # other environment markers don't have such standards + return values + + +def _evaluate_markers(markers: MarkerList, environment: dict[str, str]) -> bool: + groups: list[list[bool]] = [[]] + + for marker in markers: + assert isinstance(marker, (list, tuple, str)) + + if isinstance(marker, list): + groups[-1].append(_evaluate_markers(marker, environment)) + elif isinstance(marker, tuple): + lhs, op, rhs = marker + + if isinstance(lhs, Variable): + environment_key = lhs.value + lhs_value = environment[environment_key] + rhs_value = rhs.value + else: + lhs_value = lhs.value + environment_key = rhs.value + rhs_value = environment[environment_key] + + lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key) + groups[-1].append(_eval_op(lhs_value, op, rhs_value)) + else: + assert marker in ["and", "or"] + if marker == "or": + groups.append([]) + + return any(all(item) for item in groups) + + +def format_full_version(info: sys._version_info) -> str: + version = f"{info.major}.{info.minor}.{info.micro}" + kind = info.releaselevel + if kind != "final": + version += kind[0] + str(info.serial) + return version + + +def default_environment() -> Environment: + iver = format_full_version(sys.implementation.version) + implementation_name = sys.implementation.name + return { + "implementation_name": implementation_name, + "implementation_version": iver, + "os_name": os.name, + "platform_machine": platform.machine(), + "platform_release": platform.release(), + "platform_system": platform.system(), + "platform_version": platform.version(), + "python_full_version": platform.python_version(), + "platform_python_implementation": platform.python_implementation(), + "python_version": ".".join(platform.python_version_tuple()[:2]), + "sys_platform": sys.platform, + } + + +class Marker: + def __init__(self, marker: str) -> None: + # Note: We create a Marker object without calling this constructor in + # packaging.requirements.Requirement. If any additional logic is + # added here, make sure to mirror/adapt Requirement. + try: + self._markers = _normalize_extra_values(_parse_marker(marker)) + # The attribute `_markers` can be described in terms of a recursive type: + # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]] + # + # For example, the following expression: + # python_version > "3.6" or (python_version == "3.6" and os_name == "unix") + # + # is parsed into: + # [ + # (, ')>, ), + # 'and', + # [ + # (, , ), + # 'or', + # (, , ) + # ] + # ] + except ParserSyntaxError as e: + raise InvalidMarker(str(e)) from e + + def __str__(self) -> str: + return _format_marker(self._markers) + + def __repr__(self) -> str: + return f"" + + def __hash__(self) -> int: + return hash((self.__class__.__name__, str(self))) + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, Marker): + return NotImplemented + + return str(self) == str(other) + + def evaluate(self, environment: dict[str, str] | None = None) -> bool: + """Evaluate a marker. + + Return the boolean from evaluating the given marker against the + environment. environment is an optional argument to override all or + part of the determined environment. + + The environment is determined from the current Python process. + """ + current_environment = cast("dict[str, str]", default_environment()) + current_environment["extra"] = "" + if environment is not None: + current_environment.update(environment) + # The API used to allow setting extra to None. We need to handle this + # case for backwards compatibility. + if current_environment["extra"] is None: + current_environment["extra"] = "" + + return _evaluate_markers( + self._markers, _repair_python_full_version(current_environment) + ) + + +def _repair_python_full_version(env: dict[str, str]) -> dict[str, str]: + """ + Work around platform.python_version() returning something that is not PEP 440 + compliant for non-tagged Python builds. + """ + if env["python_full_version"].endswith("+"): + env["python_full_version"] += "local" + return env diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/metadata.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..721f411cfc44f6d24c13112e4246b5ad776a5e0b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/metadata.py @@ -0,0 +1,863 @@ +from __future__ import annotations + +import email.feedparser +import email.header +import email.message +import email.parser +import email.policy +import pathlib +import sys +import typing +from typing import ( + Any, + Callable, + Generic, + Literal, + TypedDict, + cast, +) + +from . import licenses, requirements, specifiers, utils +from . import version as version_module +from .licenses import NormalizedLicenseExpression + +T = typing.TypeVar("T") + + +if sys.version_info >= (3, 11): # pragma: no cover + ExceptionGroup = ExceptionGroup +else: # pragma: no cover + + class ExceptionGroup(Exception): + """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. + + If :external:exc:`ExceptionGroup` is already defined by Python itself, + that version is used instead. + """ + + message: str + exceptions: list[Exception] + + def __init__(self, message: str, exceptions: list[Exception]) -> None: + self.message = message + self.exceptions = exceptions + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})" + + +class InvalidMetadata(ValueError): + """A metadata field contains invalid data.""" + + field: str + """The name of the field that contains invalid data.""" + + def __init__(self, field: str, message: str) -> None: + self.field = field + super().__init__(message) + + +# The RawMetadata class attempts to make as few assumptions about the underlying +# serialization formats as possible. The idea is that as long as a serialization +# formats offer some very basic primitives in *some* way then we can support +# serializing to and from that format. +class RawMetadata(TypedDict, total=False): + """A dictionary of raw core metadata. + + Each field in core metadata maps to a key of this dictionary (when data is + provided). The key is lower-case and underscores are used instead of dashes + compared to the equivalent core metadata field. Any core metadata field that + can be specified multiple times or can hold multiple values in a single + field have a key with a plural name. See :class:`Metadata` whose attributes + match the keys of this dictionary. + + Core metadata fields that can be specified multiple times are stored as a + list or dict depending on which is appropriate for the field. Any fields + which hold multiple values in a single field are stored as a list. + + """ + + # Metadata 1.0 - PEP 241 + metadata_version: str + name: str + version: str + platforms: list[str] + summary: str + description: str + keywords: list[str] + home_page: str + author: str + author_email: str + license: str + + # Metadata 1.1 - PEP 314 + supported_platforms: list[str] + download_url: str + classifiers: list[str] + requires: list[str] + provides: list[str] + obsoletes: list[str] + + # Metadata 1.2 - PEP 345 + maintainer: str + maintainer_email: str + requires_dist: list[str] + provides_dist: list[str] + obsoletes_dist: list[str] + requires_python: str + requires_external: list[str] + project_urls: dict[str, str] + + # Metadata 2.0 + # PEP 426 attempted to completely revamp the metadata format + # but got stuck without ever being able to build consensus on + # it and ultimately ended up withdrawn. + # + # However, a number of tools had started emitting METADATA with + # `2.0` Metadata-Version, so for historical reasons, this version + # was skipped. + + # Metadata 2.1 - PEP 566 + description_content_type: str + provides_extra: list[str] + + # Metadata 2.2 - PEP 643 + dynamic: list[str] + + # Metadata 2.3 - PEP 685 + # No new fields were added in PEP 685, just some edge case were + # tightened up to provide better interoptability. + + # Metadata 2.4 - PEP 639 + license_expression: str + license_files: list[str] + + +_STRING_FIELDS = { + "author", + "author_email", + "description", + "description_content_type", + "download_url", + "home_page", + "license", + "license_expression", + "maintainer", + "maintainer_email", + "metadata_version", + "name", + "requires_python", + "summary", + "version", +} + +_LIST_FIELDS = { + "classifiers", + "dynamic", + "license_files", + "obsoletes", + "obsoletes_dist", + "platforms", + "provides", + "provides_dist", + "provides_extra", + "requires", + "requires_dist", + "requires_external", + "supported_platforms", +} + +_DICT_FIELDS = { + "project_urls", +} + + +def _parse_keywords(data: str) -> list[str]: + """Split a string of comma-separated keywords into a list of keywords.""" + return [k.strip() for k in data.split(",")] + + +def _parse_project_urls(data: list[str]) -> dict[str, str]: + """Parse a list of label/URL string pairings separated by a comma.""" + urls = {} + for pair in data: + # Our logic is slightly tricky here as we want to try and do + # *something* reasonable with malformed data. + # + # The main thing that we have to worry about, is data that does + # not have a ',' at all to split the label from the Value. There + # isn't a singular right answer here, and we will fail validation + # later on (if the caller is validating) so it doesn't *really* + # matter, but since the missing value has to be an empty str + # and our return value is dict[str, str], if we let the key + # be the missing value, then they'd have multiple '' values that + # overwrite each other in a accumulating dict. + # + # The other potentional issue is that it's possible to have the + # same label multiple times in the metadata, with no solid "right" + # answer with what to do in that case. As such, we'll do the only + # thing we can, which is treat the field as unparseable and add it + # to our list of unparsed fields. + parts = [p.strip() for p in pair.split(",", 1)] + parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items + + # TODO: The spec doesn't say anything about if the keys should be + # considered case sensitive or not... logically they should + # be case-preserving and case-insensitive, but doing that + # would open up more cases where we might have duplicate + # entries. + label, url = parts + if label in urls: + # The label already exists in our set of urls, so this field + # is unparseable, and we can just add the whole thing to our + # unparseable data and stop processing it. + raise KeyError("duplicate labels in project urls") + urls[label] = url + + return urls + + +def _get_payload(msg: email.message.Message, source: bytes | str) -> str: + """Get the body of the message.""" + # If our source is a str, then our caller has managed encodings for us, + # and we don't need to deal with it. + if isinstance(source, str): + payload = msg.get_payload() + assert isinstance(payload, str) + return payload + # If our source is a bytes, then we're managing the encoding and we need + # to deal with it. + else: + bpayload = msg.get_payload(decode=True) + assert isinstance(bpayload, bytes) + try: + return bpayload.decode("utf8", "strict") + except UnicodeDecodeError as exc: + raise ValueError("payload in an invalid encoding") from exc + + +# The various parse_FORMAT functions here are intended to be as lenient as +# possible in their parsing, while still returning a correctly typed +# RawMetadata. +# +# To aid in this, we also generally want to do as little touching of the +# data as possible, except where there are possibly some historic holdovers +# that make valid data awkward to work with. +# +# While this is a lower level, intermediate format than our ``Metadata`` +# class, some light touch ups can make a massive difference in usability. + +# Map METADATA fields to RawMetadata. +_EMAIL_TO_RAW_MAPPING = { + "author": "author", + "author-email": "author_email", + "classifier": "classifiers", + "description": "description", + "description-content-type": "description_content_type", + "download-url": "download_url", + "dynamic": "dynamic", + "home-page": "home_page", + "keywords": "keywords", + "license": "license", + "license-expression": "license_expression", + "license-file": "license_files", + "maintainer": "maintainer", + "maintainer-email": "maintainer_email", + "metadata-version": "metadata_version", + "name": "name", + "obsoletes": "obsoletes", + "obsoletes-dist": "obsoletes_dist", + "platform": "platforms", + "project-url": "project_urls", + "provides": "provides", + "provides-dist": "provides_dist", + "provides-extra": "provides_extra", + "requires": "requires", + "requires-dist": "requires_dist", + "requires-external": "requires_external", + "requires-python": "requires_python", + "summary": "summary", + "supported-platform": "supported_platforms", + "version": "version", +} +_RAW_TO_EMAIL_MAPPING = {raw: email for email, raw in _EMAIL_TO_RAW_MAPPING.items()} + + +def parse_email(data: bytes | str) -> tuple[RawMetadata, dict[str, list[str]]]: + """Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``). + + This function returns a two-item tuple of dicts. The first dict is of + recognized fields from the core metadata specification. Fields that can be + parsed and translated into Python's built-in types are converted + appropriately. All other fields are left as-is. Fields that are allowed to + appear multiple times are stored as lists. + + The second dict contains all other fields from the metadata. This includes + any unrecognized fields. It also includes any fields which are expected to + be parsed into a built-in type but were not formatted appropriately. Finally, + any fields that are expected to appear only once but are repeated are + included in this dict. + + """ + raw: dict[str, str | list[str] | dict[str, str]] = {} + unparsed: dict[str, list[str]] = {} + + if isinstance(data, str): + parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data) + else: + parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data) + + # We have to wrap parsed.keys() in a set, because in the case of multiple + # values for a key (a list), the key will appear multiple times in the + # list of keys, but we're avoiding that by using get_all(). + for name in frozenset(parsed.keys()): + # Header names in RFC are case insensitive, so we'll normalize to all + # lower case to make comparisons easier. + name = name.lower() + + # We use get_all() here, even for fields that aren't multiple use, + # because otherwise someone could have e.g. two Name fields, and we + # would just silently ignore it rather than doing something about it. + headers = parsed.get_all(name) or [] + + # The way the email module works when parsing bytes is that it + # unconditionally decodes the bytes as ascii using the surrogateescape + # handler. When you pull that data back out (such as with get_all() ), + # it looks to see if the str has any surrogate escapes, and if it does + # it wraps it in a Header object instead of returning the string. + # + # As such, we'll look for those Header objects, and fix up the encoding. + value = [] + # Flag if we have run into any issues processing the headers, thus + # signalling that the data belongs in 'unparsed'. + valid_encoding = True + for h in headers: + # It's unclear if this can return more types than just a Header or + # a str, so we'll just assert here to make sure. + assert isinstance(h, (email.header.Header, str)) + + # If it's a header object, we need to do our little dance to get + # the real data out of it. In cases where there is invalid data + # we're going to end up with mojibake, but there's no obvious, good + # way around that without reimplementing parts of the Header object + # ourselves. + # + # That should be fine since, if mojibacked happens, this key is + # going into the unparsed dict anyways. + if isinstance(h, email.header.Header): + # The Header object stores it's data as chunks, and each chunk + # can be independently encoded, so we'll need to check each + # of them. + chunks: list[tuple[bytes, str | None]] = [] + for bin, encoding in email.header.decode_header(h): + try: + bin.decode("utf8", "strict") + except UnicodeDecodeError: + # Enable mojibake. + encoding = "latin1" + valid_encoding = False + else: + encoding = "utf8" + chunks.append((bin, encoding)) + + # Turn our chunks back into a Header object, then let that + # Header object do the right thing to turn them into a + # string for us. + value.append(str(email.header.make_header(chunks))) + # This is already a string, so just add it. + else: + value.append(h) + + # We've processed all of our values to get them into a list of str, + # but we may have mojibake data, in which case this is an unparsed + # field. + if not valid_encoding: + unparsed[name] = value + continue + + raw_name = _EMAIL_TO_RAW_MAPPING.get(name) + if raw_name is None: + # This is a bit of a weird situation, we've encountered a key that + # we don't know what it means, so we don't know whether it's meant + # to be a list or not. + # + # Since we can't really tell one way or another, we'll just leave it + # as a list, even though it may be a single item list, because that's + # what makes the most sense for email headers. + unparsed[name] = value + continue + + # If this is one of our string fields, then we'll check to see if our + # value is a list of a single item. If it is then we'll assume that + # it was emitted as a single string, and unwrap the str from inside + # the list. + # + # If it's any other kind of data, then we haven't the faintest clue + # what we should parse it as, and we have to just add it to our list + # of unparsed stuff. + if raw_name in _STRING_FIELDS and len(value) == 1: + raw[raw_name] = value[0] + # If this is one of our list of string fields, then we can just assign + # the value, since email *only* has strings, and our get_all() call + # above ensures that this is a list. + elif raw_name in _LIST_FIELDS: + raw[raw_name] = value + # Special Case: Keywords + # The keywords field is implemented in the metadata spec as a str, + # but it conceptually is a list of strings, and is serialized using + # ", ".join(keywords), so we'll do some light data massaging to turn + # this into what it logically is. + elif raw_name == "keywords" and len(value) == 1: + raw[raw_name] = _parse_keywords(value[0]) + # Special Case: Project-URL + # The project urls is implemented in the metadata spec as a list of + # specially-formatted strings that represent a key and a value, which + # is fundamentally a mapping, however the email format doesn't support + # mappings in a sane way, so it was crammed into a list of strings + # instead. + # + # We will do a little light data massaging to turn this into a map as + # it logically should be. + elif raw_name == "project_urls": + try: + raw[raw_name] = _parse_project_urls(value) + except KeyError: + unparsed[name] = value + # Nothing that we've done has managed to parse this, so it'll just + # throw it in our unparseable data and move on. + else: + unparsed[name] = value + + # We need to support getting the Description from the message payload in + # addition to getting it from the the headers. This does mean, though, there + # is the possibility of it being set both ways, in which case we put both + # in 'unparsed' since we don't know which is right. + try: + payload = _get_payload(parsed, data) + except ValueError: + unparsed.setdefault("description", []).append( + parsed.get_payload(decode=isinstance(data, bytes)) # type: ignore[call-overload] + ) + else: + if payload: + # Check to see if we've already got a description, if so then both + # it, and this body move to unparseable. + if "description" in raw: + description_header = cast(str, raw.pop("description")) + unparsed.setdefault("description", []).extend( + [description_header, payload] + ) + elif "description" in unparsed: + unparsed["description"].append(payload) + else: + raw["description"] = payload + + # We need to cast our `raw` to a metadata, because a TypedDict only support + # literal key names, but we're computing our key names on purpose, but the + # way this function is implemented, our `TypedDict` can only have valid key + # names. + return cast(RawMetadata, raw), unparsed + + +_NOT_FOUND = object() + + +# Keep the two values in sync. +_VALID_METADATA_VERSIONS = ["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4"] +_MetadataVersion = Literal["1.0", "1.1", "1.2", "2.1", "2.2", "2.3", "2.4"] + +_REQUIRED_ATTRS = frozenset(["metadata_version", "name", "version"]) + + +class _Validator(Generic[T]): + """Validate a metadata field. + + All _process_*() methods correspond to a core metadata field. The method is + called with the field's raw value. If the raw value is valid it is returned + in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field). + If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause + as appropriate). + """ + + name: str + raw_name: str + added: _MetadataVersion + + def __init__( + self, + *, + added: _MetadataVersion = "1.0", + ) -> None: + self.added = added + + def __set_name__(self, _owner: Metadata, name: str) -> None: + self.name = name + self.raw_name = _RAW_TO_EMAIL_MAPPING[name] + + def __get__(self, instance: Metadata, _owner: type[Metadata]) -> T: + # With Python 3.8, the caching can be replaced with functools.cached_property(). + # No need to check the cache as attribute lookup will resolve into the + # instance's __dict__ before __get__ is called. + cache = instance.__dict__ + value = instance._raw.get(self.name) + + # To make the _process_* methods easier, we'll check if the value is None + # and if this field is NOT a required attribute, and if both of those + # things are true, we'll skip the the converter. This will mean that the + # converters never have to deal with the None union. + if self.name in _REQUIRED_ATTRS or value is not None: + try: + converter: Callable[[Any], T] = getattr(self, f"_process_{self.name}") + except AttributeError: + pass + else: + value = converter(value) + + cache[self.name] = value + try: + del instance._raw[self.name] # type: ignore[misc] + except KeyError: + pass + + return cast(T, value) + + def _invalid_metadata( + self, msg: str, cause: Exception | None = None + ) -> InvalidMetadata: + exc = InvalidMetadata( + self.raw_name, msg.format_map({"field": repr(self.raw_name)}) + ) + exc.__cause__ = cause + return exc + + def _process_metadata_version(self, value: str) -> _MetadataVersion: + # Implicitly makes Metadata-Version required. + if value not in _VALID_METADATA_VERSIONS: + raise self._invalid_metadata(f"{value!r} is not a valid metadata version") + return cast(_MetadataVersion, value) + + def _process_name(self, value: str) -> str: + if not value: + raise self._invalid_metadata("{field} is a required field") + # Validate the name as a side-effect. + try: + utils.canonicalize_name(value, validate=True) + except utils.InvalidName as exc: + raise self._invalid_metadata( + f"{value!r} is invalid for {{field}}", cause=exc + ) from exc + else: + return value + + def _process_version(self, value: str) -> version_module.Version: + if not value: + raise self._invalid_metadata("{field} is a required field") + try: + return version_module.parse(value) + except version_module.InvalidVersion as exc: + raise self._invalid_metadata( + f"{value!r} is invalid for {{field}}", cause=exc + ) from exc + + def _process_summary(self, value: str) -> str: + """Check the field contains no newlines.""" + if "\n" in value: + raise self._invalid_metadata("{field} must be a single line") + return value + + def _process_description_content_type(self, value: str) -> str: + content_types = {"text/plain", "text/x-rst", "text/markdown"} + message = email.message.EmailMessage() + message["content-type"] = value + + content_type, parameters = ( + # Defaults to `text/plain` if parsing failed. + message.get_content_type().lower(), + message["content-type"].params, + ) + # Check if content-type is valid or defaulted to `text/plain` and thus was + # not parseable. + if content_type not in content_types or content_type not in value.lower(): + raise self._invalid_metadata( + f"{{field}} must be one of {list(content_types)}, not {value!r}" + ) + + charset = parameters.get("charset", "UTF-8") + if charset != "UTF-8": + raise self._invalid_metadata( + f"{{field}} can only specify the UTF-8 charset, not {list(charset)}" + ) + + markdown_variants = {"GFM", "CommonMark"} + variant = parameters.get("variant", "GFM") # Use an acceptable default. + if content_type == "text/markdown" and variant not in markdown_variants: + raise self._invalid_metadata( + f"valid Markdown variants for {{field}} are {list(markdown_variants)}, " + f"not {variant!r}", + ) + return value + + def _process_dynamic(self, value: list[str]) -> list[str]: + for dynamic_field in map(str.lower, value): + if dynamic_field in {"name", "version", "metadata-version"}: + raise self._invalid_metadata( + f"{dynamic_field!r} is not allowed as a dynamic field" + ) + elif dynamic_field not in _EMAIL_TO_RAW_MAPPING: + raise self._invalid_metadata( + f"{dynamic_field!r} is not a valid dynamic field" + ) + return list(map(str.lower, value)) + + def _process_provides_extra( + self, + value: list[str], + ) -> list[utils.NormalizedName]: + normalized_names = [] + try: + for name in value: + normalized_names.append(utils.canonicalize_name(name, validate=True)) + except utils.InvalidName as exc: + raise self._invalid_metadata( + f"{name!r} is invalid for {{field}}", cause=exc + ) from exc + else: + return normalized_names + + def _process_requires_python(self, value: str) -> specifiers.SpecifierSet: + try: + return specifiers.SpecifierSet(value) + except specifiers.InvalidSpecifier as exc: + raise self._invalid_metadata( + f"{value!r} is invalid for {{field}}", cause=exc + ) from exc + + def _process_requires_dist( + self, + value: list[str], + ) -> list[requirements.Requirement]: + reqs = [] + try: + for req in value: + reqs.append(requirements.Requirement(req)) + except requirements.InvalidRequirement as exc: + raise self._invalid_metadata( + f"{req!r} is invalid for {{field}}", cause=exc + ) from exc + else: + return reqs + + def _process_license_expression( + self, value: str + ) -> NormalizedLicenseExpression | None: + try: + return licenses.canonicalize_license_expression(value) + except ValueError as exc: + raise self._invalid_metadata( + f"{value!r} is invalid for {{field}}", cause=exc + ) from exc + + def _process_license_files(self, value: list[str]) -> list[str]: + paths = [] + for path in value: + if ".." in path: + raise self._invalid_metadata( + f"{path!r} is invalid for {{field}}, " + "parent directory indicators are not allowed" + ) + if "*" in path: + raise self._invalid_metadata( + f"{path!r} is invalid for {{field}}, paths must be resolved" + ) + if ( + pathlib.PurePosixPath(path).is_absolute() + or pathlib.PureWindowsPath(path).is_absolute() + ): + raise self._invalid_metadata( + f"{path!r} is invalid for {{field}}, paths must be relative" + ) + if pathlib.PureWindowsPath(path).as_posix() != path: + raise self._invalid_metadata( + f"{path!r} is invalid for {{field}}, " + "paths must use '/' delimiter" + ) + paths.append(path) + return paths + + +class Metadata: + """Representation of distribution metadata. + + Compared to :class:`RawMetadata`, this class provides objects representing + metadata fields instead of only using built-in types. Any invalid metadata + will cause :exc:`InvalidMetadata` to be raised (with a + :py:attr:`~BaseException.__cause__` attribute as appropriate). + """ + + _raw: RawMetadata + + @classmethod + def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> Metadata: + """Create an instance from :class:`RawMetadata`. + + If *validate* is true, all metadata will be validated. All exceptions + related to validation will be gathered and raised as an :class:`ExceptionGroup`. + """ + ins = cls() + ins._raw = data.copy() # Mutations occur due to caching enriched values. + + if validate: + exceptions: list[Exception] = [] + try: + metadata_version = ins.metadata_version + metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version) + except InvalidMetadata as metadata_version_exc: + exceptions.append(metadata_version_exc) + metadata_version = None + + # Make sure to check for the fields that are present, the required + # fields (so their absence can be reported). + fields_to_check = frozenset(ins._raw) | _REQUIRED_ATTRS + # Remove fields that have already been checked. + fields_to_check -= {"metadata_version"} + + for key in fields_to_check: + try: + if metadata_version: + # Can't use getattr() as that triggers descriptor protocol which + # will fail due to no value for the instance argument. + try: + field_metadata_version = cls.__dict__[key].added + except KeyError: + exc = InvalidMetadata(key, f"unrecognized field: {key!r}") + exceptions.append(exc) + continue + field_age = _VALID_METADATA_VERSIONS.index( + field_metadata_version + ) + if field_age > metadata_age: + field = _RAW_TO_EMAIL_MAPPING[key] + exc = InvalidMetadata( + field, + f"{field} introduced in metadata version " + f"{field_metadata_version}, not {metadata_version}", + ) + exceptions.append(exc) + continue + getattr(ins, key) + except InvalidMetadata as exc: + exceptions.append(exc) + + if exceptions: + raise ExceptionGroup("invalid metadata", exceptions) + + return ins + + @classmethod + def from_email(cls, data: bytes | str, *, validate: bool = True) -> Metadata: + """Parse metadata from email headers. + + If *validate* is true, the metadata will be validated. All exceptions + related to validation will be gathered and raised as an :class:`ExceptionGroup`. + """ + raw, unparsed = parse_email(data) + + if validate: + exceptions: list[Exception] = [] + for unparsed_key in unparsed: + if unparsed_key in _EMAIL_TO_RAW_MAPPING: + message = f"{unparsed_key!r} has invalid data" + else: + message = f"unrecognized field: {unparsed_key!r}" + exceptions.append(InvalidMetadata(unparsed_key, message)) + + if exceptions: + raise ExceptionGroup("unparsed", exceptions) + + try: + return cls.from_raw(raw, validate=validate) + except ExceptionGroup as exc_group: + raise ExceptionGroup( + "invalid or unparsed metadata", exc_group.exceptions + ) from None + + metadata_version: _Validator[_MetadataVersion] = _Validator() + """:external:ref:`core-metadata-metadata-version` + (required; validated to be a valid metadata version)""" + # `name` is not normalized/typed to NormalizedName so as to provide access to + # the original/raw name. + name: _Validator[str] = _Validator() + """:external:ref:`core-metadata-name` + (required; validated using :func:`~packaging.utils.canonicalize_name` and its + *validate* parameter)""" + version: _Validator[version_module.Version] = _Validator() + """:external:ref:`core-metadata-version` (required)""" + dynamic: _Validator[list[str] | None] = _Validator( + added="2.2", + ) + """:external:ref:`core-metadata-dynamic` + (validated against core metadata field names and lowercased)""" + platforms: _Validator[list[str] | None] = _Validator() + """:external:ref:`core-metadata-platform`""" + supported_platforms: _Validator[list[str] | None] = _Validator(added="1.1") + """:external:ref:`core-metadata-supported-platform`""" + summary: _Validator[str | None] = _Validator() + """:external:ref:`core-metadata-summary` (validated to contain no newlines)""" + description: _Validator[str | None] = _Validator() # TODO 2.1: can be in body + """:external:ref:`core-metadata-description`""" + description_content_type: _Validator[str | None] = _Validator(added="2.1") + """:external:ref:`core-metadata-description-content-type` (validated)""" + keywords: _Validator[list[str] | None] = _Validator() + """:external:ref:`core-metadata-keywords`""" + home_page: _Validator[str | None] = _Validator() + """:external:ref:`core-metadata-home-page`""" + download_url: _Validator[str | None] = _Validator(added="1.1") + """:external:ref:`core-metadata-download-url`""" + author: _Validator[str | None] = _Validator() + """:external:ref:`core-metadata-author`""" + author_email: _Validator[str | None] = _Validator() + """:external:ref:`core-metadata-author-email`""" + maintainer: _Validator[str | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-maintainer`""" + maintainer_email: _Validator[str | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-maintainer-email`""" + license: _Validator[str | None] = _Validator() + """:external:ref:`core-metadata-license`""" + license_expression: _Validator[NormalizedLicenseExpression | None] = _Validator( + added="2.4" + ) + """:external:ref:`core-metadata-license-expression`""" + license_files: _Validator[list[str] | None] = _Validator(added="2.4") + """:external:ref:`core-metadata-license-file`""" + classifiers: _Validator[list[str] | None] = _Validator(added="1.1") + """:external:ref:`core-metadata-classifier`""" + requires_dist: _Validator[list[requirements.Requirement] | None] = _Validator( + added="1.2" + ) + """:external:ref:`core-metadata-requires-dist`""" + requires_python: _Validator[specifiers.SpecifierSet | None] = _Validator( + added="1.2" + ) + """:external:ref:`core-metadata-requires-python`""" + # Because `Requires-External` allows for non-PEP 440 version specifiers, we + # don't do any processing on the values. + requires_external: _Validator[list[str] | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-requires-external`""" + project_urls: _Validator[dict[str, str] | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-project-url`""" + # PEP 685 lets us raise an error if an extra doesn't pass `Name` validation + # regardless of metadata version. + provides_extra: _Validator[list[utils.NormalizedName] | None] = _Validator( + added="2.1", + ) + """:external:ref:`core-metadata-provides-extra`""" + provides_dist: _Validator[list[str] | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-provides-dist`""" + obsoletes_dist: _Validator[list[str] | None] = _Validator(added="1.2") + """:external:ref:`core-metadata-obsoletes-dist`""" + requires: _Validator[list[str] | None] = _Validator(added="1.1") + """``Requires`` (deprecated)""" + provides: _Validator[list[str] | None] = _Validator(added="1.1") + """``Provides`` (deprecated)""" + obsoletes: _Validator[list[str] | None] = _Validator(added="1.1") + """``Obsoletes`` (deprecated)""" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py new file mode 100644 index 0000000000000000000000000000000000000000..4e068c9567def3564f238a76fe7ab46b569f33e5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py @@ -0,0 +1,91 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import annotations + +from typing import Any, Iterator + +from ._parser import parse_requirement as _parse_requirement +from ._tokenizer import ParserSyntaxError +from .markers import Marker, _normalize_extra_values +from .specifiers import SpecifierSet +from .utils import canonicalize_name + + +class InvalidRequirement(ValueError): + """ + An invalid requirement was found, users should refer to PEP 508. + """ + + +class Requirement: + """Parse a requirement. + + Parse a given requirement string into its parts, such as name, specifier, + URL, and extras. Raises InvalidRequirement on a badly-formed requirement + string. + """ + + # TODO: Can we test whether something is contained within a requirement? + # If so how do we do that? Do we need to test against the _name_ of + # the thing as well as the version? What about the markers? + # TODO: Can we normalize the name and extra name? + + def __init__(self, requirement_string: str) -> None: + try: + parsed = _parse_requirement(requirement_string) + except ParserSyntaxError as e: + raise InvalidRequirement(str(e)) from e + + self.name: str = parsed.name + self.url: str | None = parsed.url or None + self.extras: set[str] = set(parsed.extras or []) + self.specifier: SpecifierSet = SpecifierSet(parsed.specifier) + self.marker: Marker | None = None + if parsed.marker is not None: + self.marker = Marker.__new__(Marker) + self.marker._markers = _normalize_extra_values(parsed.marker) + + def _iter_parts(self, name: str) -> Iterator[str]: + yield name + + if self.extras: + formatted_extras = ",".join(sorted(self.extras)) + yield f"[{formatted_extras}]" + + if self.specifier: + yield str(self.specifier) + + if self.url: + yield f"@ {self.url}" + if self.marker: + yield " " + + if self.marker: + yield f"; {self.marker}" + + def __str__(self) -> str: + return "".join(self._iter_parts(self.name)) + + def __repr__(self) -> str: + return f"" + + def __hash__(self) -> int: + return hash( + ( + self.__class__.__name__, + *self._iter_parts(canonicalize_name(self.name)), + ) + ) + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, Requirement): + return NotImplemented + + return ( + canonicalize_name(self.name) == canonicalize_name(other.name) + and self.extras == other.extras + and self.specifier == other.specifier + and self.url == other.url + and self.marker == other.marker + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py new file mode 100644 index 0000000000000000000000000000000000000000..f18016e16638c27702ba94bef4bf93551e94b6fc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py @@ -0,0 +1,1020 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +""" +.. testsetup:: + + from pip._vendor.packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier + from pip._vendor.packaging.version import Version +""" + +from __future__ import annotations + +import abc +import itertools +import re +from typing import Callable, Iterable, Iterator, TypeVar, Union + +from .utils import canonicalize_version +from .version import Version + +UnparsedVersion = Union[Version, str] +UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion) +CallableOperator = Callable[[Version, str], bool] + + +def _coerce_version(version: UnparsedVersion) -> Version: + if not isinstance(version, Version): + version = Version(version) + return version + + +class InvalidSpecifier(ValueError): + """ + Raised when attempting to create a :class:`Specifier` with a specifier + string that is invalid. + + >>> Specifier("lolwat") + Traceback (most recent call last): + ... + packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' + """ + + +class BaseSpecifier(metaclass=abc.ABCMeta): + @abc.abstractmethod + def __str__(self) -> str: + """ + Returns the str representation of this Specifier-like object. This + should be representative of the Specifier itself. + """ + + @abc.abstractmethod + def __hash__(self) -> int: + """ + Returns a hash value for this Specifier-like object. + """ + + @abc.abstractmethod + def __eq__(self, other: object) -> bool: + """ + Returns a boolean representing whether or not the two Specifier-like + objects are equal. + + :param other: The other object to check against. + """ + + @property + @abc.abstractmethod + def prereleases(self) -> bool | None: + """Whether or not pre-releases as a whole are allowed. + + This can be set to either ``True`` or ``False`` to explicitly enable or disable + prereleases or it can be set to ``None`` (the default) to use default semantics. + """ + + @prereleases.setter + def prereleases(self, value: bool) -> None: + """Setter for :attr:`prereleases`. + + :param value: The value to set. + """ + + @abc.abstractmethod + def contains(self, item: str, prereleases: bool | None = None) -> bool: + """ + Determines if the given item is contained within this specifier. + """ + + @abc.abstractmethod + def filter( + self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None + ) -> Iterator[UnparsedVersionVar]: + """ + Takes an iterable of items and filters them so that only items which + are contained within this specifier are allowed in it. + """ + + +class Specifier(BaseSpecifier): + """This class abstracts handling of version specifiers. + + .. tip:: + + It is generally not required to instantiate this manually. You should instead + prefer to work with :class:`SpecifierSet` instead, which can parse + comma-separated version specifiers (which is what package metadata contains). + """ + + _operator_regex_str = r""" + (?P(~=|==|!=|<=|>=|<|>|===)) + """ + _version_regex_str = r""" + (?P + (?: + # The identity operators allow for an escape hatch that will + # do an exact string match of the version you wish to install. + # This will not be parsed by PEP 440 and we cannot determine + # any semantic meaning from it. This operator is discouraged + # but included entirely as an escape hatch. + (?<====) # Only match for the identity operator + \s* + [^\s;)]* # The arbitrary version can be just about anything, + # we match everything except for whitespace, a + # semi-colon for marker support, and a closing paren + # since versions can be enclosed in them. + ) + | + (?: + # The (non)equality operators allow for wild card and local + # versions to be specified so we have to define these two + # operators separately to enable that. + (?<===|!=) # Only match for equals and not equals + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)* # release + + # You cannot use a wild card and a pre-release, post-release, a dev or + # local version together so group them with a | and make them optional. + (?: + \.\* # Wild card syntax of .* + | + (?: # pre release + [-_\.]? + (alpha|beta|preview|pre|a|b|c|rc) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local + )? + ) + | + (?: + # The compatible operator requires at least two digits in the + # release segment. + (?<=~=) # Only match for the compatible operator + + \s* + v? + (?:[0-9]+!)? # epoch + [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) + (?: # pre release + [-_\.]? + (alpha|beta|preview|pre|a|b|c|rc) + [-_\.]? + [0-9]* + )? + (?: # post release + (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) + )? + (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release + ) + | + (?: + # All other operators only allow a sub set of what the + # (non)equality operators do. Specifically they do not allow + # local versions to be specified nor do they allow the prefix + # matching wild cards. + (?=": "greater_than_equal", + "<": "less_than", + ">": "greater_than", + "===": "arbitrary", + } + + def __init__(self, spec: str = "", prereleases: bool | None = None) -> None: + """Initialize a Specifier instance. + + :param spec: + The string representation of a specifier which will be parsed and + normalized before use. + :param prereleases: + This tells the specifier if it should accept prerelease versions if + applicable or not. The default of ``None`` will autodetect it from the + given specifiers. + :raises InvalidSpecifier: + If the given specifier is invalid (i.e. bad syntax). + """ + match = self._regex.search(spec) + if not match: + raise InvalidSpecifier(f"Invalid specifier: {spec!r}") + + self._spec: tuple[str, str] = ( + match.group("operator").strip(), + match.group("version").strip(), + ) + + # Store whether or not this Specifier should accept prereleases + self._prereleases = prereleases + + # https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515 + @property # type: ignore[override] + def prereleases(self) -> bool: + # If there is an explicit prereleases set for this, then we'll just + # blindly use that. + if self._prereleases is not None: + return self._prereleases + + # Look at all of our specifiers and determine if they are inclusive + # operators, and if they are if they are including an explicit + # prerelease. + operator, version = self._spec + if operator in ["==", ">=", "<=", "~=", "===", ">", "<"]: + # The == specifier can include a trailing .*, if it does we + # want to remove before parsing. + if operator == "==" and version.endswith(".*"): + version = version[:-2] + + # Parse the version, and if it is a pre-release than this + # specifier allows pre-releases. + if Version(version).is_prerelease: + return True + + return False + + @prereleases.setter + def prereleases(self, value: bool) -> None: + self._prereleases = value + + @property + def operator(self) -> str: + """The operator of this specifier. + + >>> Specifier("==1.2.3").operator + '==' + """ + return self._spec[0] + + @property + def version(self) -> str: + """The version of this specifier. + + >>> Specifier("==1.2.3").version + '1.2.3' + """ + return self._spec[1] + + def __repr__(self) -> str: + """A representation of the Specifier that shows all internal state. + + >>> Specifier('>=1.0.0') + =1.0.0')> + >>> Specifier('>=1.0.0', prereleases=False) + =1.0.0', prereleases=False)> + >>> Specifier('>=1.0.0', prereleases=True) + =1.0.0', prereleases=True)> + """ + pre = ( + f", prereleases={self.prereleases!r}" + if self._prereleases is not None + else "" + ) + + return f"<{self.__class__.__name__}({str(self)!r}{pre})>" + + def __str__(self) -> str: + """A string representation of the Specifier that can be round-tripped. + + >>> str(Specifier('>=1.0.0')) + '>=1.0.0' + >>> str(Specifier('>=1.0.0', prereleases=False)) + '>=1.0.0' + """ + return "{}{}".format(*self._spec) + + @property + def _canonical_spec(self) -> tuple[str, str]: + canonical_version = canonicalize_version( + self._spec[1], + strip_trailing_zero=(self._spec[0] != "~="), + ) + return self._spec[0], canonical_version + + def __hash__(self) -> int: + return hash(self._canonical_spec) + + def __eq__(self, other: object) -> bool: + """Whether or not the two Specifier-like objects are equal. + + :param other: The other object to check against. + + The value of :attr:`prereleases` is ignored. + + >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0") + True + >>> (Specifier("==1.2.3", prereleases=False) == + ... Specifier("==1.2.3", prereleases=True)) + True + >>> Specifier("==1.2.3") == "==1.2.3" + True + >>> Specifier("==1.2.3") == Specifier("==1.2.4") + False + >>> Specifier("==1.2.3") == Specifier("~=1.2.3") + False + """ + if isinstance(other, str): + try: + other = self.__class__(str(other)) + except InvalidSpecifier: + return NotImplemented + elif not isinstance(other, self.__class__): + return NotImplemented + + return self._canonical_spec == other._canonical_spec + + def _get_operator(self, op: str) -> CallableOperator: + operator_callable: CallableOperator = getattr( + self, f"_compare_{self._operators[op]}" + ) + return operator_callable + + def _compare_compatible(self, prospective: Version, spec: str) -> bool: + # Compatible releases have an equivalent combination of >= and ==. That + # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to + # implement this in terms of the other specifiers instead of + # implementing it ourselves. The only thing we need to do is construct + # the other specifiers. + + # We want everything but the last item in the version, but we want to + # ignore suffix segments. + prefix = _version_join( + list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1] + ) + + # Add the prefix notation to the end of our string + prefix += ".*" + + return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( + prospective, prefix + ) + + def _compare_equal(self, prospective: Version, spec: str) -> bool: + # We need special logic to handle prefix matching + if spec.endswith(".*"): + # In the case of prefix matching we want to ignore local segment. + normalized_prospective = canonicalize_version( + prospective.public, strip_trailing_zero=False + ) + # Get the normalized version string ignoring the trailing .* + normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False) + # Split the spec out by bangs and dots, and pretend that there is + # an implicit dot in between a release segment and a pre-release segment. + split_spec = _version_split(normalized_spec) + + # Split the prospective version out by bangs and dots, and pretend + # that there is an implicit dot in between a release segment and + # a pre-release segment. + split_prospective = _version_split(normalized_prospective) + + # 0-pad the prospective version before shortening it to get the correct + # shortened version. + padded_prospective, _ = _pad_version(split_prospective, split_spec) + + # Shorten the prospective version to be the same length as the spec + # so that we can determine if the specifier is a prefix of the + # prospective version or not. + shortened_prospective = padded_prospective[: len(split_spec)] + + return shortened_prospective == split_spec + else: + # Convert our spec string into a Version + spec_version = Version(spec) + + # If the specifier does not have a local segment, then we want to + # act as if the prospective version also does not have a local + # segment. + if not spec_version.local: + prospective = Version(prospective.public) + + return prospective == spec_version + + def _compare_not_equal(self, prospective: Version, spec: str) -> bool: + return not self._compare_equal(prospective, spec) + + def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool: + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) <= Version(spec) + + def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool: + # NB: Local version identifiers are NOT permitted in the version + # specifier, so local version labels can be universally removed from + # the prospective version. + return Version(prospective.public) >= Version(spec) + + def _compare_less_than(self, prospective: Version, spec_str: str) -> bool: + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec_str) + + # Check to see if the prospective version is less than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective < spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a pre-release version, that we do not accept pre-release + # versions for the version mentioned in the specifier (e.g. <3.1 should + # not match 3.1.dev0, but should match 3.0.dev0). + if not spec.is_prerelease and prospective.is_prerelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # less than the spec version *and* it's not a pre-release of the same + # version in the spec. + return True + + def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool: + # Convert our spec to a Version instance, since we'll want to work with + # it as a version. + spec = Version(spec_str) + + # Check to see if the prospective version is greater than the spec + # version. If it's not we can short circuit and just return False now + # instead of doing extra unneeded work. + if not prospective > spec: + return False + + # This special case is here so that, unless the specifier itself + # includes is a post-release version, that we do not accept + # post-release versions for the version mentioned in the specifier + # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). + if not spec.is_postrelease and prospective.is_postrelease: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # Ensure that we do not allow a local version of the version mentioned + # in the specifier, which is technically greater than, to match. + if prospective.local is not None: + if Version(prospective.base_version) == Version(spec.base_version): + return False + + # If we've gotten to here, it means that prospective version is both + # greater than the spec version *and* it's not a pre-release of the + # same version in the spec. + return True + + def _compare_arbitrary(self, prospective: Version, spec: str) -> bool: + return str(prospective).lower() == str(spec).lower() + + def __contains__(self, item: str | Version) -> bool: + """Return whether or not the item is contained in this specifier. + + :param item: The item to check for. + + This is used for the ``in`` operator and behaves the same as + :meth:`contains` with no ``prereleases`` argument passed. + + >>> "1.2.3" in Specifier(">=1.2.3") + True + >>> Version("1.2.3") in Specifier(">=1.2.3") + True + >>> "1.0.0" in Specifier(">=1.2.3") + False + >>> "1.3.0a1" in Specifier(">=1.2.3") + False + >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True) + True + """ + return self.contains(item) + + def contains(self, item: UnparsedVersion, prereleases: bool | None = None) -> bool: + """Return whether or not the item is contained in this specifier. + + :param item: + The item to check for, which can be a version string or a + :class:`Version` instance. + :param prereleases: + Whether or not to match prereleases with this Specifier. If set to + ``None`` (the default), it uses :attr:`prereleases` to determine + whether or not prereleases are allowed. + + >>> Specifier(">=1.2.3").contains("1.2.3") + True + >>> Specifier(">=1.2.3").contains(Version("1.2.3")) + True + >>> Specifier(">=1.2.3").contains("1.0.0") + False + >>> Specifier(">=1.2.3").contains("1.3.0a1") + False + >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1") + True + >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True) + True + """ + + # Determine if prereleases are to be allowed or not. + if prereleases is None: + prereleases = self.prereleases + + # Normalize item to a Version, this allows us to have a shortcut for + # "2.0" in Specifier(">=2") + normalized_item = _coerce_version(item) + + # Determine if we should be supporting prereleases in this specifier + # or not, if we do not support prereleases than we can short circuit + # logic if this version is a prereleases. + if normalized_item.is_prerelease and not prereleases: + return False + + # Actually do the comparison to determine if this item is contained + # within this Specifier or not. + operator_callable: CallableOperator = self._get_operator(self.operator) + return operator_callable(normalized_item, self.version) + + def filter( + self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None + ) -> Iterator[UnparsedVersionVar]: + """Filter items in the given iterable, that match the specifier. + + :param iterable: + An iterable that can contain version strings and :class:`Version` instances. + The items in the iterable will be filtered according to the specifier. + :param prereleases: + Whether or not to allow prereleases in the returned iterator. If set to + ``None`` (the default), it will be intelligently decide whether to allow + prereleases or not (based on the :attr:`prereleases` attribute, and + whether the only versions matching are prereleases). + + This method is smarter than just ``filter(Specifier().contains, [...])`` + because it implements the rule from :pep:`440` that a prerelease item + SHOULD be accepted if no other versions match the given specifier. + + >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) + ['1.3'] + >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")])) + ['1.2.3', '1.3', ] + >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"])) + ['1.5a1'] + >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) + ['1.3', '1.5a1'] + >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) + ['1.3', '1.5a1'] + """ + + yielded = False + found_prereleases = [] + + kw = {"prereleases": prereleases if prereleases is not None else True} + + # Attempt to iterate over all the values in the iterable and if any of + # them match, yield them. + for version in iterable: + parsed_version = _coerce_version(version) + + if self.contains(parsed_version, **kw): + # If our version is a prerelease, and we were not set to allow + # prereleases, then we'll store it for later in case nothing + # else matches this specifier. + if parsed_version.is_prerelease and not ( + prereleases or self.prereleases + ): + found_prereleases.append(version) + # Either this is not a prerelease, or we should have been + # accepting prereleases from the beginning. + else: + yielded = True + yield version + + # Now that we've iterated over everything, determine if we've yielded + # any values, and if we have not and we have any prereleases stored up + # then we will go ahead and yield the prereleases. + if not yielded and found_prereleases: + for version in found_prereleases: + yield version + + +_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$") + + +def _version_split(version: str) -> list[str]: + """Split version into components. + + The split components are intended for version comparison. The logic does + not attempt to retain the original version string, so joining the + components back with :func:`_version_join` may not produce the original + version string. + """ + result: list[str] = [] + + epoch, _, rest = version.rpartition("!") + result.append(epoch or "0") + + for item in rest.split("."): + match = _prefix_regex.search(item) + if match: + result.extend(match.groups()) + else: + result.append(item) + return result + + +def _version_join(components: list[str]) -> str: + """Join split version components into a version string. + + This function assumes the input came from :func:`_version_split`, where the + first component must be the epoch (either empty or numeric), and all other + components numeric. + """ + epoch, *rest = components + return f"{epoch}!{'.'.join(rest)}" + + +def _is_not_suffix(segment: str) -> bool: + return not any( + segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post") + ) + + +def _pad_version(left: list[str], right: list[str]) -> tuple[list[str], list[str]]: + left_split, right_split = [], [] + + # Get the release segment of our versions + left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) + right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) + + # Get the rest of our versions + left_split.append(left[len(left_split[0]) :]) + right_split.append(right[len(right_split[0]) :]) + + # Insert our padding + left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) + right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) + + return ( + list(itertools.chain.from_iterable(left_split)), + list(itertools.chain.from_iterable(right_split)), + ) + + +class SpecifierSet(BaseSpecifier): + """This class abstracts handling of a set of version specifiers. + + It can be passed a single specifier (``>=3.0``), a comma-separated list of + specifiers (``>=3.0,!=3.1``), or no specifier at all. + """ + + def __init__( + self, + specifiers: str | Iterable[Specifier] = "", + prereleases: bool | None = None, + ) -> None: + """Initialize a SpecifierSet instance. + + :param specifiers: + The string representation of a specifier or a comma-separated list of + specifiers which will be parsed and normalized before use. + May also be an iterable of ``Specifier`` instances, which will be used + as is. + :param prereleases: + This tells the SpecifierSet if it should accept prerelease versions if + applicable or not. The default of ``None`` will autodetect it from the + given specifiers. + + :raises InvalidSpecifier: + If the given ``specifiers`` are not parseable than this exception will be + raised. + """ + + if isinstance(specifiers, str): + # Split on `,` to break each individual specifier into its own item, and + # strip each item to remove leading/trailing whitespace. + split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] + + # Make each individual specifier a Specifier and save in a frozen set + # for later. + self._specs = frozenset(map(Specifier, split_specifiers)) + else: + # Save the supplied specifiers in a frozen set. + self._specs = frozenset(specifiers) + + # Store our prereleases value so we can use it later to determine if + # we accept prereleases or not. + self._prereleases = prereleases + + @property + def prereleases(self) -> bool | None: + # If we have been given an explicit prerelease modifier, then we'll + # pass that through here. + if self._prereleases is not None: + return self._prereleases + + # If we don't have any specifiers, and we don't have a forced value, + # then we'll just return None since we don't know if this should have + # pre-releases or not. + if not self._specs: + return None + + # Otherwise we'll see if any of the given specifiers accept + # prereleases, if any of them do we'll return True, otherwise False. + return any(s.prereleases for s in self._specs) + + @prereleases.setter + def prereleases(self, value: bool) -> None: + self._prereleases = value + + def __repr__(self) -> str: + """A representation of the specifier set that shows all internal state. + + Note that the ordering of the individual specifiers within the set may not + match the input string. + + >>> SpecifierSet('>=1.0.0,!=2.0.0') + =1.0.0')> + >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False) + =1.0.0', prereleases=False)> + >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True) + =1.0.0', prereleases=True)> + """ + pre = ( + f", prereleases={self.prereleases!r}" + if self._prereleases is not None + else "" + ) + + return f"" + + def __str__(self) -> str: + """A string representation of the specifier set that can be round-tripped. + + Note that the ordering of the individual specifiers within the set may not + match the input string. + + >>> str(SpecifierSet(">=1.0.0,!=1.0.1")) + '!=1.0.1,>=1.0.0' + >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False)) + '!=1.0.1,>=1.0.0' + """ + return ",".join(sorted(str(s) for s in self._specs)) + + def __hash__(self) -> int: + return hash(self._specs) + + def __and__(self, other: SpecifierSet | str) -> SpecifierSet: + """Return a SpecifierSet which is a combination of the two sets. + + :param other: The other object to combine with. + + >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1' + =1.0.0')> + >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1') + =1.0.0')> + """ + if isinstance(other, str): + other = SpecifierSet(other) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + specifier = SpecifierSet() + specifier._specs = frozenset(self._specs | other._specs) + + if self._prereleases is None and other._prereleases is not None: + specifier._prereleases = other._prereleases + elif self._prereleases is not None and other._prereleases is None: + specifier._prereleases = self._prereleases + elif self._prereleases == other._prereleases: + specifier._prereleases = self._prereleases + else: + raise ValueError( + "Cannot combine SpecifierSets with True and False prerelease " + "overrides." + ) + + return specifier + + def __eq__(self, other: object) -> bool: + """Whether or not the two SpecifierSet-like objects are equal. + + :param other: The other object to check against. + + The value of :attr:`prereleases` is ignored. + + >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1") + True + >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) == + ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)) + True + >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1" + True + >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0") + False + >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2") + False + """ + if isinstance(other, (str, Specifier)): + other = SpecifierSet(str(other)) + elif not isinstance(other, SpecifierSet): + return NotImplemented + + return self._specs == other._specs + + def __len__(self) -> int: + """Returns the number of specifiers in this specifier set.""" + return len(self._specs) + + def __iter__(self) -> Iterator[Specifier]: + """ + Returns an iterator over all the underlying :class:`Specifier` instances + in this specifier set. + + >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str) + [, =1.0.0')>] + """ + return iter(self._specs) + + def __contains__(self, item: UnparsedVersion) -> bool: + """Return whether or not the item is contained in this specifier. + + :param item: The item to check for. + + This is used for the ``in`` operator and behaves the same as + :meth:`contains` with no ``prereleases`` argument passed. + + >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") + True + >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") + True + >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") + False + >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") + False + >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) + True + """ + return self.contains(item) + + def contains( + self, + item: UnparsedVersion, + prereleases: bool | None = None, + installed: bool | None = None, + ) -> bool: + """Return whether or not the item is contained in this SpecifierSet. + + :param item: + The item to check for, which can be a version string or a + :class:`Version` instance. + :param prereleases: + Whether or not to match prereleases with this SpecifierSet. If set to + ``None`` (the default), it uses :attr:`prereleases` to determine + whether or not prereleases are allowed. + + >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3") + True + >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3")) + True + >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1") + False + >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1") + False + >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1") + True + >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True) + True + """ + # Ensure that our item is a Version instance. + if not isinstance(item, Version): + item = Version(item) + + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # We can determine if we're going to allow pre-releases by looking to + # see if any of the underlying items supports them. If none of them do + # and this item is a pre-release then we do not allow it and we can + # short circuit that here. + # Note: This means that 1.0.dev1 would not be contained in something + # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 + if not prereleases and item.is_prerelease: + return False + + if installed and item.is_prerelease: + item = Version(item.base_version) + + # We simply dispatch to the underlying specs here to make sure that the + # given version is contained within all of them. + # Note: This use of all() here means that an empty set of specifiers + # will always return True, this is an explicit design decision. + return all(s.contains(item, prereleases=prereleases) for s in self._specs) + + def filter( + self, iterable: Iterable[UnparsedVersionVar], prereleases: bool | None = None + ) -> Iterator[UnparsedVersionVar]: + """Filter items in the given iterable, that match the specifiers in this set. + + :param iterable: + An iterable that can contain version strings and :class:`Version` instances. + The items in the iterable will be filtered according to the specifier. + :param prereleases: + Whether or not to allow prereleases in the returned iterator. If set to + ``None`` (the default), it will be intelligently decide whether to allow + prereleases or not (based on the :attr:`prereleases` attribute, and + whether the only versions matching are prereleases). + + This method is smarter than just ``filter(SpecifierSet(...).contains, [...])`` + because it implements the rule from :pep:`440` that a prerelease item + SHOULD be accepted if no other versions match the given specifier. + + >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) + ['1.3'] + >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")])) + ['1.3', ] + >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"])) + [] + >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) + ['1.3', '1.5a1'] + >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) + ['1.3', '1.5a1'] + + An "empty" SpecifierSet will filter items based on the presence of prerelease + versions in the set. + + >>> list(SpecifierSet("").filter(["1.3", "1.5a1"])) + ['1.3'] + >>> list(SpecifierSet("").filter(["1.5a1"])) + ['1.5a1'] + >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"])) + ['1.3', '1.5a1'] + >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True)) + ['1.3', '1.5a1'] + """ + # Determine if we're forcing a prerelease or not, if we're not forcing + # one for this particular filter call, then we'll use whatever the + # SpecifierSet thinks for whether or not we should support prereleases. + if prereleases is None: + prereleases = self.prereleases + + # If we have any specifiers, then we want to wrap our iterable in the + # filter method for each one, this will act as a logical AND amongst + # each specifier. + if self._specs: + for spec in self._specs: + iterable = spec.filter(iterable, prereleases=bool(prereleases)) + return iter(iterable) + # If we do not have any specifiers, then we need to have a rough filter + # which will filter out any pre-releases, unless there are no final + # releases. + else: + filtered: list[UnparsedVersionVar] = [] + found_prereleases: list[UnparsedVersionVar] = [] + + for item in iterable: + parsed_version = _coerce_version(item) + + # Store any item which is a pre-release for later unless we've + # already found a final version or we are accepting prereleases + if parsed_version.is_prerelease and not prereleases: + if not filtered: + found_prereleases.append(item) + else: + filtered.append(item) + + # If we've found no items except for pre-releases, then we'll go + # ahead and use the pre-releases + if not filtered and found_prereleases and prereleases is None: + return iter(found_prereleases) + + return iter(filtered) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py new file mode 100644 index 0000000000000000000000000000000000000000..f5903402abb5a0aed37bb23914f678ef7e34a554 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py @@ -0,0 +1,617 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import annotations + +import logging +import platform +import re +import struct +import subprocess +import sys +import sysconfig +from importlib.machinery import EXTENSION_SUFFIXES +from typing import ( + Iterable, + Iterator, + Sequence, + Tuple, + cast, +) + +from . import _manylinux, _musllinux + +logger = logging.getLogger(__name__) + +PythonVersion = Sequence[int] +AppleVersion = Tuple[int, int] + +INTERPRETER_SHORT_NAMES: dict[str, str] = { + "python": "py", # Generic. + "cpython": "cp", + "pypy": "pp", + "ironpython": "ip", + "jython": "jy", +} + + +_32_BIT_INTERPRETER = struct.calcsize("P") == 4 + + +class Tag: + """ + A representation of the tag triple for a wheel. + + Instances are considered immutable and thus are hashable. Equality checking + is also supported. + """ + + __slots__ = ["_abi", "_hash", "_interpreter", "_platform"] + + def __init__(self, interpreter: str, abi: str, platform: str) -> None: + self._interpreter = interpreter.lower() + self._abi = abi.lower() + self._platform = platform.lower() + # The __hash__ of every single element in a Set[Tag] will be evaluated each time + # that a set calls its `.disjoint()` method, which may be called hundreds of + # times when scanning a page of links for packages with tags matching that + # Set[Tag]. Pre-computing the value here produces significant speedups for + # downstream consumers. + self._hash = hash((self._interpreter, self._abi, self._platform)) + + @property + def interpreter(self) -> str: + return self._interpreter + + @property + def abi(self) -> str: + return self._abi + + @property + def platform(self) -> str: + return self._platform + + def __eq__(self, other: object) -> bool: + if not isinstance(other, Tag): + return NotImplemented + + return ( + (self._hash == other._hash) # Short-circuit ASAP for perf reasons. + and (self._platform == other._platform) + and (self._abi == other._abi) + and (self._interpreter == other._interpreter) + ) + + def __hash__(self) -> int: + return self._hash + + def __str__(self) -> str: + return f"{self._interpreter}-{self._abi}-{self._platform}" + + def __repr__(self) -> str: + return f"<{self} @ {id(self)}>" + + +def parse_tag(tag: str) -> frozenset[Tag]: + """ + Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. + + Returning a set is required due to the possibility that the tag is a + compressed tag set. + """ + tags = set() + interpreters, abis, platforms = tag.split("-") + for interpreter in interpreters.split("."): + for abi in abis.split("."): + for platform_ in platforms.split("."): + tags.add(Tag(interpreter, abi, platform_)) + return frozenset(tags) + + +def _get_config_var(name: str, warn: bool = False) -> int | str | None: + value: int | str | None = sysconfig.get_config_var(name) + if value is None and warn: + logger.debug( + "Config variable '%s' is unset, Python ABI tag may be incorrect", name + ) + return value + + +def _normalize_string(string: str) -> str: + return string.replace(".", "_").replace("-", "_").replace(" ", "_") + + +def _is_threaded_cpython(abis: list[str]) -> bool: + """ + Determine if the ABI corresponds to a threaded (`--disable-gil`) build. + + The threaded builds are indicated by a "t" in the abiflags. + """ + if len(abis) == 0: + return False + # expect e.g., cp313 + m = re.match(r"cp\d+(.*)", abis[0]) + if not m: + return False + abiflags = m.group(1) + return "t" in abiflags + + +def _abi3_applies(python_version: PythonVersion, threading: bool) -> bool: + """ + Determine if the Python version supports abi3. + + PEP 384 was first implemented in Python 3.2. The threaded (`--disable-gil`) + builds do not support abi3. + """ + return len(python_version) > 1 and tuple(python_version) >= (3, 2) and not threading + + +def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> list[str]: + py_version = tuple(py_version) # To allow for version comparison. + abis = [] + version = _version_nodot(py_version[:2]) + threading = debug = pymalloc = ucs4 = "" + with_debug = _get_config_var("Py_DEBUG", warn) + has_refcount = hasattr(sys, "gettotalrefcount") + # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled + # extension modules is the best option. + # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 + has_ext = "_d.pyd" in EXTENSION_SUFFIXES + if with_debug or (with_debug is None and (has_refcount or has_ext)): + debug = "d" + if py_version >= (3, 13) and _get_config_var("Py_GIL_DISABLED", warn): + threading = "t" + if py_version < (3, 8): + with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) + if with_pymalloc or with_pymalloc is None: + pymalloc = "m" + if py_version < (3, 3): + unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) + if unicode_size == 4 or ( + unicode_size is None and sys.maxunicode == 0x10FFFF + ): + ucs4 = "u" + elif debug: + # Debug builds can also load "normal" extension modules. + # We can also assume no UCS-4 or pymalloc requirement. + abis.append(f"cp{version}{threading}") + abis.insert(0, f"cp{version}{threading}{debug}{pymalloc}{ucs4}") + return abis + + +def cpython_tags( + python_version: PythonVersion | None = None, + abis: Iterable[str] | None = None, + platforms: Iterable[str] | None = None, + *, + warn: bool = False, +) -> Iterator[Tag]: + """ + Yields the tags for a CPython interpreter. + + The tags consist of: + - cp-- + - cp-abi3- + - cp-none- + - cp-abi3- # Older Python versions down to 3.2. + + If python_version only specifies a major version then user-provided ABIs and + the 'none' ABItag will be used. + + If 'abi3' or 'none' are specified in 'abis' then they will be yielded at + their normal position and not at the beginning. + """ + if not python_version: + python_version = sys.version_info[:2] + + interpreter = f"cp{_version_nodot(python_version[:2])}" + + if abis is None: + if len(python_version) > 1: + abis = _cpython_abis(python_version, warn) + else: + abis = [] + abis = list(abis) + # 'abi3' and 'none' are explicitly handled later. + for explicit_abi in ("abi3", "none"): + try: + abis.remove(explicit_abi) + except ValueError: + pass + + platforms = list(platforms or platform_tags()) + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) + + threading = _is_threaded_cpython(abis) + use_abi3 = _abi3_applies(python_version, threading) + if use_abi3: + yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms) + yield from (Tag(interpreter, "none", platform_) for platform_ in platforms) + + if use_abi3: + for minor_version in range(python_version[1] - 1, 1, -1): + for platform_ in platforms: + version = _version_nodot((python_version[0], minor_version)) + interpreter = f"cp{version}" + yield Tag(interpreter, "abi3", platform_) + + +def _generic_abi() -> list[str]: + """ + Return the ABI tag based on EXT_SUFFIX. + """ + # The following are examples of `EXT_SUFFIX`. + # We want to keep the parts which are related to the ABI and remove the + # parts which are related to the platform: + # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310 + # - mac: '.cpython-310-darwin.so' => cp310 + # - win: '.cp310-win_amd64.pyd' => cp310 + # - win: '.pyd' => cp37 (uses _cpython_abis()) + # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73 + # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib' + # => graalpy_38_native + + ext_suffix = _get_config_var("EXT_SUFFIX", warn=True) + if not isinstance(ext_suffix, str) or ext_suffix[0] != ".": + raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')") + parts = ext_suffix.split(".") + if len(parts) < 3: + # CPython3.7 and earlier uses ".pyd" on Windows. + return _cpython_abis(sys.version_info[:2]) + soabi = parts[1] + if soabi.startswith("cpython"): + # non-windows + abi = "cp" + soabi.split("-")[1] + elif soabi.startswith("cp"): + # windows + abi = soabi.split("-")[0] + elif soabi.startswith("pypy"): + abi = "-".join(soabi.split("-")[:2]) + elif soabi.startswith("graalpy"): + abi = "-".join(soabi.split("-")[:3]) + elif soabi: + # pyston, ironpython, others? + abi = soabi + else: + return [] + return [_normalize_string(abi)] + + +def generic_tags( + interpreter: str | None = None, + abis: Iterable[str] | None = None, + platforms: Iterable[str] | None = None, + *, + warn: bool = False, +) -> Iterator[Tag]: + """ + Yields the tags for a generic interpreter. + + The tags consist of: + - -- + + The "none" ABI will be added if it was not explicitly provided. + """ + if not interpreter: + interp_name = interpreter_name() + interp_version = interpreter_version(warn=warn) + interpreter = "".join([interp_name, interp_version]) + if abis is None: + abis = _generic_abi() + else: + abis = list(abis) + platforms = list(platforms or platform_tags()) + if "none" not in abis: + abis.append("none") + for abi in abis: + for platform_ in platforms: + yield Tag(interpreter, abi, platform_) + + +def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]: + """ + Yields Python versions in descending order. + + After the latest version, the major-only version will be yielded, and then + all previous versions of that major version. + """ + if len(py_version) > 1: + yield f"py{_version_nodot(py_version[:2])}" + yield f"py{py_version[0]}" + if len(py_version) > 1: + for minor in range(py_version[1] - 1, -1, -1): + yield f"py{_version_nodot((py_version[0], minor))}" + + +def compatible_tags( + python_version: PythonVersion | None = None, + interpreter: str | None = None, + platforms: Iterable[str] | None = None, +) -> Iterator[Tag]: + """ + Yields the sequence of tags that are compatible with a specific version of Python. + + The tags consist of: + - py*-none- + - -none-any # ... if `interpreter` is provided. + - py*-none-any + """ + if not python_version: + python_version = sys.version_info[:2] + platforms = list(platforms or platform_tags()) + for version in _py_interpreter_range(python_version): + for platform_ in platforms: + yield Tag(version, "none", platform_) + if interpreter: + yield Tag(interpreter, "none", "any") + for version in _py_interpreter_range(python_version): + yield Tag(version, "none", "any") + + +def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str: + if not is_32bit: + return arch + + if arch.startswith("ppc"): + return "ppc" + + return "i386" + + +def _mac_binary_formats(version: AppleVersion, cpu_arch: str) -> list[str]: + formats = [cpu_arch] + if cpu_arch == "x86_64": + if version < (10, 4): + return [] + formats.extend(["intel", "fat64", "fat32"]) + + elif cpu_arch == "i386": + if version < (10, 4): + return [] + formats.extend(["intel", "fat32", "fat"]) + + elif cpu_arch == "ppc64": + # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? + if version > (10, 5) or version < (10, 4): + return [] + formats.append("fat64") + + elif cpu_arch == "ppc": + if version > (10, 6): + return [] + formats.extend(["fat32", "fat"]) + + if cpu_arch in {"arm64", "x86_64"}: + formats.append("universal2") + + if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}: + formats.append("universal") + + return formats + + +def mac_platforms( + version: AppleVersion | None = None, arch: str | None = None +) -> Iterator[str]: + """ + Yields the platform tags for a macOS system. + + The `version` parameter is a two-item tuple specifying the macOS version to + generate platform tags for. The `arch` parameter is the CPU architecture to + generate platform tags for. Both parameters default to the appropriate value + for the current system. + """ + version_str, _, cpu_arch = platform.mac_ver() + if version is None: + version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) + if version == (10, 16): + # When built against an older macOS SDK, Python will report macOS 10.16 + # instead of the real version. + version_str = subprocess.run( + [ + sys.executable, + "-sS", + "-c", + "import platform; print(platform.mac_ver()[0])", + ], + check=True, + env={"SYSTEM_VERSION_COMPAT": "0"}, + stdout=subprocess.PIPE, + text=True, + ).stdout + version = cast("AppleVersion", tuple(map(int, version_str.split(".")[:2]))) + else: + version = version + if arch is None: + arch = _mac_arch(cpu_arch) + else: + arch = arch + + if (10, 0) <= version and version < (11, 0): + # Prior to Mac OS 11, each yearly release of Mac OS bumped the + # "minor" version number. The major version was always 10. + major_version = 10 + for minor_version in range(version[1], -1, -1): + compat_version = major_version, minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + yield f"macosx_{major_version}_{minor_version}_{binary_format}" + + if version >= (11, 0): + # Starting with Mac OS 11, each yearly release bumps the major version + # number. The minor versions are now the midyear updates. + minor_version = 0 + for major_version in range(version[0], 10, -1): + compat_version = major_version, minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + yield f"macosx_{major_version}_{minor_version}_{binary_format}" + + if version >= (11, 0): + # Mac OS 11 on x86_64 is compatible with binaries from previous releases. + # Arm64 support was introduced in 11.0, so no Arm binaries from previous + # releases exist. + # + # However, the "universal2" binary format can have a + # macOS version earlier than 11.0 when the x86_64 part of the binary supports + # that version of macOS. + major_version = 10 + if arch == "x86_64": + for minor_version in range(16, 3, -1): + compat_version = major_version, minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + yield f"macosx_{major_version}_{minor_version}_{binary_format}" + else: + for minor_version in range(16, 3, -1): + compat_version = major_version, minor_version + binary_format = "universal2" + yield f"macosx_{major_version}_{minor_version}_{binary_format}" + + +def ios_platforms( + version: AppleVersion | None = None, multiarch: str | None = None +) -> Iterator[str]: + """ + Yields the platform tags for an iOS system. + + :param version: A two-item tuple specifying the iOS version to generate + platform tags for. Defaults to the current iOS version. + :param multiarch: The CPU architecture+ABI to generate platform tags for - + (the value used by `sys.implementation._multiarch` e.g., + `arm64_iphoneos` or `x84_64_iphonesimulator`). Defaults to the current + multiarch value. + """ + if version is None: + # if iOS is the current platform, ios_ver *must* be defined. However, + # it won't exist for CPython versions before 3.13, which causes a mypy + # error. + _, release, _, _ = platform.ios_ver() # type: ignore[attr-defined, unused-ignore] + version = cast("AppleVersion", tuple(map(int, release.split(".")[:2]))) + + if multiarch is None: + multiarch = sys.implementation._multiarch + multiarch = multiarch.replace("-", "_") + + ios_platform_template = "ios_{major}_{minor}_{multiarch}" + + # Consider any iOS major.minor version from the version requested, down to + # 12.0. 12.0 is the first iOS version that is known to have enough features + # to support CPython. Consider every possible minor release up to X.9. There + # highest the minor has ever gone is 8 (14.8 and 15.8) but having some extra + # candidates that won't ever match doesn't really hurt, and it saves us from + # having to keep an explicit list of known iOS versions in the code. Return + # the results descending order of version number. + + # If the requested major version is less than 12, there won't be any matches. + if version[0] < 12: + return + + # Consider the actual X.Y version that was requested. + yield ios_platform_template.format( + major=version[0], minor=version[1], multiarch=multiarch + ) + + # Consider every minor version from X.0 to the minor version prior to the + # version requested by the platform. + for minor in range(version[1] - 1, -1, -1): + yield ios_platform_template.format( + major=version[0], minor=minor, multiarch=multiarch + ) + + for major in range(version[0] - 1, 11, -1): + for minor in range(9, -1, -1): + yield ios_platform_template.format( + major=major, minor=minor, multiarch=multiarch + ) + + +def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]: + linux = _normalize_string(sysconfig.get_platform()) + if not linux.startswith("linux_"): + # we should never be here, just yield the sysconfig one and return + yield linux + return + if is_32bit: + if linux == "linux_x86_64": + linux = "linux_i686" + elif linux == "linux_aarch64": + linux = "linux_armv8l" + _, arch = linux.split("_", 1) + archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch]) + yield from _manylinux.platform_tags(archs) + yield from _musllinux.platform_tags(archs) + for arch in archs: + yield f"linux_{arch}" + + +def _generic_platforms() -> Iterator[str]: + yield _normalize_string(sysconfig.get_platform()) + + +def platform_tags() -> Iterator[str]: + """ + Provides the platform tags for this installation. + """ + if platform.system() == "Darwin": + return mac_platforms() + elif platform.system() == "iOS": + return ios_platforms() + elif platform.system() == "Linux": + return _linux_platforms() + else: + return _generic_platforms() + + +def interpreter_name() -> str: + """ + Returns the name of the running interpreter. + + Some implementations have a reserved, two-letter abbreviation which will + be returned when appropriate. + """ + name = sys.implementation.name + return INTERPRETER_SHORT_NAMES.get(name) or name + + +def interpreter_version(*, warn: bool = False) -> str: + """ + Returns the version of the running interpreter. + """ + version = _get_config_var("py_version_nodot", warn=warn) + if version: + version = str(version) + else: + version = _version_nodot(sys.version_info[:2]) + return version + + +def _version_nodot(version: PythonVersion) -> str: + return "".join(map(str, version)) + + +def sys_tags(*, warn: bool = False) -> Iterator[Tag]: + """ + Returns the sequence of tag triples for the running interpreter. + + The order of the sequence corresponds to priority order for the + interpreter, from most to least important. + """ + + interp_name = interpreter_name() + if interp_name == "cp": + yield from cpython_tags(warn=warn) + else: + yield from generic_tags() + + if interp_name == "pp": + interp = "pp3" + elif interp_name == "cp": + interp = "cp" + interpreter_version(warn=warn) + else: + interp = None + yield from compatible_tags(interpreter=interp) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..23450953df74eccd9c13cd2a955ce09d1f968565 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py @@ -0,0 +1,163 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. + +from __future__ import annotations + +import functools +import re +from typing import NewType, Tuple, Union, cast + +from .tags import Tag, parse_tag +from .version import InvalidVersion, Version, _TrimmedRelease + +BuildTag = Union[Tuple[()], Tuple[int, str]] +NormalizedName = NewType("NormalizedName", str) + + +class InvalidName(ValueError): + """ + An invalid distribution name; users should refer to the packaging user guide. + """ + + +class InvalidWheelFilename(ValueError): + """ + An invalid wheel filename was found, users should refer to PEP 427. + """ + + +class InvalidSdistFilename(ValueError): + """ + An invalid sdist filename was found, users should refer to the packaging user guide. + """ + + +# Core metadata spec for `Name` +_validate_regex = re.compile( + r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE +) +_canonicalize_regex = re.compile(r"[-_.]+") +_normalized_regex = re.compile(r"^([a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9])$") +# PEP 427: The build number must start with a digit. +_build_tag_regex = re.compile(r"(\d+)(.*)") + + +def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: + if validate and not _validate_regex.match(name): + raise InvalidName(f"name is invalid: {name!r}") + # This is taken from PEP 503. + value = _canonicalize_regex.sub("-", name).lower() + return cast(NormalizedName, value) + + +def is_normalized_name(name: str) -> bool: + return _normalized_regex.match(name) is not None + + +@functools.singledispatch +def canonicalize_version( + version: Version | str, *, strip_trailing_zero: bool = True +) -> str: + """ + Return a canonical form of a version as a string. + + >>> canonicalize_version('1.0.1') + '1.0.1' + + Per PEP 625, versions may have multiple canonical forms, differing + only by trailing zeros. + + >>> canonicalize_version('1.0.0') + '1' + >>> canonicalize_version('1.0.0', strip_trailing_zero=False) + '1.0.0' + + Invalid versions are returned unaltered. + + >>> canonicalize_version('foo bar baz') + 'foo bar baz' + """ + return str(_TrimmedRelease(str(version)) if strip_trailing_zero else version) + + +@canonicalize_version.register +def _(version: str, *, strip_trailing_zero: bool = True) -> str: + try: + parsed = Version(version) + except InvalidVersion: + # Legacy versions cannot be normalized + return version + return canonicalize_version(parsed, strip_trailing_zero=strip_trailing_zero) + + +def parse_wheel_filename( + filename: str, +) -> tuple[NormalizedName, Version, BuildTag, frozenset[Tag]]: + if not filename.endswith(".whl"): + raise InvalidWheelFilename( + f"Invalid wheel filename (extension must be '.whl'): {filename!r}" + ) + + filename = filename[:-4] + dashes = filename.count("-") + if dashes not in (4, 5): + raise InvalidWheelFilename( + f"Invalid wheel filename (wrong number of parts): {filename!r}" + ) + + parts = filename.split("-", dashes - 2) + name_part = parts[0] + # See PEP 427 for the rules on escaping the project name. + if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None: + raise InvalidWheelFilename(f"Invalid project name: {filename!r}") + name = canonicalize_name(name_part) + + try: + version = Version(parts[1]) + except InvalidVersion as e: + raise InvalidWheelFilename( + f"Invalid wheel filename (invalid version): {filename!r}" + ) from e + + if dashes == 5: + build_part = parts[2] + build_match = _build_tag_regex.match(build_part) + if build_match is None: + raise InvalidWheelFilename( + f"Invalid build number: {build_part} in {filename!r}" + ) + build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2))) + else: + build = () + tags = parse_tag(parts[-1]) + return (name, version, build, tags) + + +def parse_sdist_filename(filename: str) -> tuple[NormalizedName, Version]: + if filename.endswith(".tar.gz"): + file_stem = filename[: -len(".tar.gz")] + elif filename.endswith(".zip"): + file_stem = filename[: -len(".zip")] + else: + raise InvalidSdistFilename( + f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):" + f" {filename!r}" + ) + + # We are requiring a PEP 440 version, which cannot contain dashes, + # so we split on the last dash. + name_part, sep, version_part = file_stem.rpartition("-") + if not sep: + raise InvalidSdistFilename(f"Invalid sdist filename: {filename!r}") + + name = canonicalize_name(name_part) + + try: + version = Version(version_part) + except InvalidVersion as e: + raise InvalidSdistFilename( + f"Invalid sdist filename (invalid version): {filename!r}" + ) from e + + return (name, version) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/version.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/version.py new file mode 100644 index 0000000000000000000000000000000000000000..21f44ca09b500ba9bce838befab1796d178f2b17 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/packaging/version.py @@ -0,0 +1,582 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +""" +.. testsetup:: + + from pip._vendor.packaging.version import parse, Version +""" + +from __future__ import annotations + +import itertools +import re +from typing import Any, Callable, NamedTuple, SupportsInt, Tuple, Union + +from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType + +__all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"] + +LocalType = Tuple[Union[int, str], ...] + +CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]] +CmpLocalType = Union[ + NegativeInfinityType, + Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...], +] +CmpKey = Tuple[ + int, + Tuple[int, ...], + CmpPrePostDevType, + CmpPrePostDevType, + CmpPrePostDevType, + CmpLocalType, +] +VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool] + + +class _Version(NamedTuple): + epoch: int + release: tuple[int, ...] + dev: tuple[str, int] | None + pre: tuple[str, int] | None + post: tuple[str, int] | None + local: LocalType | None + + +def parse(version: str) -> Version: + """Parse the given version string. + + >>> parse('1.0.dev1') + + + :param version: The version string to parse. + :raises InvalidVersion: When the version string is not a valid version. + """ + return Version(version) + + +class InvalidVersion(ValueError): + """Raised when a version string is not a valid version. + + >>> Version("invalid") + Traceback (most recent call last): + ... + packaging.version.InvalidVersion: Invalid version: 'invalid' + """ + + +class _BaseVersion: + _key: tuple[Any, ...] + + def __hash__(self) -> int: + return hash(self._key) + + # Please keep the duplicated `isinstance` check + # in the six comparisons hereunder + # unless you find a way to avoid adding overhead function calls. + def __lt__(self, other: _BaseVersion) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key < other._key + + def __le__(self, other: _BaseVersion) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key <= other._key + + def __eq__(self, other: object) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key == other._key + + def __ge__(self, other: _BaseVersion) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key >= other._key + + def __gt__(self, other: _BaseVersion) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key > other._key + + def __ne__(self, other: object) -> bool: + if not isinstance(other, _BaseVersion): + return NotImplemented + + return self._key != other._key + + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +_VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                          # pre-release
+            [-_\.]?
+            (?Palpha|a|beta|b|preview|pre|c|rc)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [-_\.]?
+                (?Ppost|rev|r)
+                [-_\.]?
+                (?P[0-9]+)?
+            )
+        )?
+        (?P                                          # dev release
+            [-_\.]?
+            (?Pdev)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+    )
+    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
+"""
+
+VERSION_PATTERN = _VERSION_PATTERN
+"""
+A string containing the regular expression used to match a valid version.
+
+The pattern is not anchored at either end, and is intended for embedding in larger
+expressions (for example, matching a version number as part of a file name). The
+regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
+flags set.
+
+:meta hide-value:
+"""
+
+
+class Version(_BaseVersion):
+    """This class abstracts handling of a project's versions.
+
+    A :class:`Version` instance is comparison aware and can be compared and
+    sorted using the standard Python interfaces.
+
+    >>> v1 = Version("1.0a5")
+    >>> v2 = Version("1.0")
+    >>> v1
+    
+    >>> v2
+    
+    >>> v1 < v2
+    True
+    >>> v1 == v2
+    False
+    >>> v1 > v2
+    False
+    >>> v1 >= v2
+    False
+    >>> v1 <= v2
+    True
+    """
+
+    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
+    _key: CmpKey
+
+    def __init__(self, version: str) -> None:
+        """Initialize a Version object.
+
+        :param version:
+            The string representation of a version which will be parsed and normalized
+            before use.
+        :raises InvalidVersion:
+            If the ``version`` does not conform to PEP 440 in any way then this
+            exception will be raised.
+        """
+
+        # Validate the version and parse it into pieces
+        match = self._regex.search(version)
+        if not match:
+            raise InvalidVersion(f"Invalid version: {version!r}")
+
+        # Store the parsed out pieces of the version
+        self._version = _Version(
+            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
+            release=tuple(int(i) for i in match.group("release").split(".")),
+            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
+            post=_parse_letter_version(
+                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
+            ),
+            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
+            local=_parse_local_version(match.group("local")),
+        )
+
+        # Generate a key which will be used for sorting
+        self._key = _cmpkey(
+            self._version.epoch,
+            self._version.release,
+            self._version.pre,
+            self._version.post,
+            self._version.dev,
+            self._version.local,
+        )
+
+    def __repr__(self) -> str:
+        """A representation of the Version that shows all internal state.
+
+        >>> Version('1.0.0')
+        
+        """
+        return f""
+
+    def __str__(self) -> str:
+        """A string representation of the version that can be round-tripped.
+
+        >>> str(Version("1.0a5"))
+        '1.0a5'
+        """
+        parts = []
+
+        # Epoch
+        if self.epoch != 0:
+            parts.append(f"{self.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self.release))
+
+        # Pre-release
+        if self.pre is not None:
+            parts.append("".join(str(x) for x in self.pre))
+
+        # Post-release
+        if self.post is not None:
+            parts.append(f".post{self.post}")
+
+        # Development release
+        if self.dev is not None:
+            parts.append(f".dev{self.dev}")
+
+        # Local version segment
+        if self.local is not None:
+            parts.append(f"+{self.local}")
+
+        return "".join(parts)
+
+    @property
+    def epoch(self) -> int:
+        """The epoch of the version.
+
+        >>> Version("2.0.0").epoch
+        0
+        >>> Version("1!2.0.0").epoch
+        1
+        """
+        return self._version.epoch
+
+    @property
+    def release(self) -> tuple[int, ...]:
+        """The components of the "release" segment of the version.
+
+        >>> Version("1.2.3").release
+        (1, 2, 3)
+        >>> Version("2.0.0").release
+        (2, 0, 0)
+        >>> Version("1!2.0.0.post0").release
+        (2, 0, 0)
+
+        Includes trailing zeroes but not the epoch or any pre-release / development /
+        post-release suffixes.
+        """
+        return self._version.release
+
+    @property
+    def pre(self) -> tuple[str, int] | None:
+        """The pre-release segment of the version.
+
+        >>> print(Version("1.2.3").pre)
+        None
+        >>> Version("1.2.3a1").pre
+        ('a', 1)
+        >>> Version("1.2.3b1").pre
+        ('b', 1)
+        >>> Version("1.2.3rc1").pre
+        ('rc', 1)
+        """
+        return self._version.pre
+
+    @property
+    def post(self) -> int | None:
+        """The post-release number of the version.
+
+        >>> print(Version("1.2.3").post)
+        None
+        >>> Version("1.2.3.post1").post
+        1
+        """
+        return self._version.post[1] if self._version.post else None
+
+    @property
+    def dev(self) -> int | None:
+        """The development number of the version.
+
+        >>> print(Version("1.2.3").dev)
+        None
+        >>> Version("1.2.3.dev1").dev
+        1
+        """
+        return self._version.dev[1] if self._version.dev else None
+
+    @property
+    def local(self) -> str | None:
+        """The local version segment of the version.
+
+        >>> print(Version("1.2.3").local)
+        None
+        >>> Version("1.2.3+abc").local
+        'abc'
+        """
+        if self._version.local:
+            return ".".join(str(x) for x in self._version.local)
+        else:
+            return None
+
+    @property
+    def public(self) -> str:
+        """The public portion of the version.
+
+        >>> Version("1.2.3").public
+        '1.2.3'
+        >>> Version("1.2.3+abc").public
+        '1.2.3'
+        >>> Version("1!1.2.3dev1+abc").public
+        '1!1.2.3.dev1'
+        """
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self) -> str:
+        """The "base version" of the version.
+
+        >>> Version("1.2.3").base_version
+        '1.2.3'
+        >>> Version("1.2.3+abc").base_version
+        '1.2.3'
+        >>> Version("1!1.2.3dev1+abc").base_version
+        '1!1.2.3'
+
+        The "base version" is the public version of the project without any pre or post
+        release markers.
+        """
+        parts = []
+
+        # Epoch
+        if self.epoch != 0:
+            parts.append(f"{self.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self.release))
+
+        return "".join(parts)
+
+    @property
+    def is_prerelease(self) -> bool:
+        """Whether this version is a pre-release.
+
+        >>> Version("1.2.3").is_prerelease
+        False
+        >>> Version("1.2.3a1").is_prerelease
+        True
+        >>> Version("1.2.3b1").is_prerelease
+        True
+        >>> Version("1.2.3rc1").is_prerelease
+        True
+        >>> Version("1.2.3dev1").is_prerelease
+        True
+        """
+        return self.dev is not None or self.pre is not None
+
+    @property
+    def is_postrelease(self) -> bool:
+        """Whether this version is a post-release.
+
+        >>> Version("1.2.3").is_postrelease
+        False
+        >>> Version("1.2.3.post1").is_postrelease
+        True
+        """
+        return self.post is not None
+
+    @property
+    def is_devrelease(self) -> bool:
+        """Whether this version is a development release.
+
+        >>> Version("1.2.3").is_devrelease
+        False
+        >>> Version("1.2.3.dev1").is_devrelease
+        True
+        """
+        return self.dev is not None
+
+    @property
+    def major(self) -> int:
+        """The first item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").major
+        1
+        """
+        return self.release[0] if len(self.release) >= 1 else 0
+
+    @property
+    def minor(self) -> int:
+        """The second item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").minor
+        2
+        >>> Version("1").minor
+        0
+        """
+        return self.release[1] if len(self.release) >= 2 else 0
+
+    @property
+    def micro(self) -> int:
+        """The third item of :attr:`release` or ``0`` if unavailable.
+
+        >>> Version("1.2.3").micro
+        3
+        >>> Version("1").micro
+        0
+        """
+        return self.release[2] if len(self.release) >= 3 else 0
+
+
+class _TrimmedRelease(Version):
+    @property
+    def release(self) -> tuple[int, ...]:
+        """
+        Release segment without any trailing zeros.
+
+        >>> _TrimmedRelease('1.0.0').release
+        (1,)
+        >>> _TrimmedRelease('0.0').release
+        (0,)
+        """
+        rel = super().release
+        nonzeros = (index for index, val in enumerate(rel) if val)
+        last_nonzero = max(nonzeros, default=0)
+        return rel[: last_nonzero + 1]
+
+
+def _parse_letter_version(
+    letter: str | None, number: str | bytes | SupportsInt | None
+) -> tuple[str, int] | None:
+    if letter:
+        # We consider there to be an implicit 0 in a pre-release if there is
+        # not a numeral associated with it.
+        if number is None:
+            number = 0
+
+        # We normalize any letters to their lower case form
+        letter = letter.lower()
+
+        # We consider some words to be alternate spellings of other words and
+        # in those cases we want to normalize the spellings to our preferred
+        # spelling.
+        if letter == "alpha":
+            letter = "a"
+        elif letter == "beta":
+            letter = "b"
+        elif letter in ["c", "pre", "preview"]:
+            letter = "rc"
+        elif letter in ["rev", "r"]:
+            letter = "post"
+
+        return letter, int(number)
+
+    assert not letter
+    if number:
+        # We assume if we are given a number, but we are not given a letter
+        # then this is using the implicit post release syntax (e.g. 1.0-1)
+        letter = "post"
+
+        return letter, int(number)
+
+    return None
+
+
+_local_version_separators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local: str | None) -> LocalType | None:
+    """
+    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
+    """
+    if local is not None:
+        return tuple(
+            part.lower() if not part.isdigit() else int(part)
+            for part in _local_version_separators.split(local)
+        )
+    return None
+
+
+def _cmpkey(
+    epoch: int,
+    release: tuple[int, ...],
+    pre: tuple[str, int] | None,
+    post: tuple[str, int] | None,
+    dev: tuple[str, int] | None,
+    local: LocalType | None,
+) -> CmpKey:
+    # When we compare a release version, we want to compare it with all of the
+    # trailing zeros removed. So we'll use a reverse the list, drop all the now
+    # leading zeros until we come to something non zero, then take the rest
+    # re-reverse it back into the correct order and make it a tuple and use
+    # that for our sorting key.
+    _release = tuple(
+        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
+    )
+
+    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
+    # We'll do this by abusing the pre segment, but we _only_ want to do this
+    # if there is not a pre or a post segment. If we have one of those then
+    # the normal sorting rules will handle this case correctly.
+    if pre is None and post is None and dev is not None:
+        _pre: CmpPrePostDevType = NegativeInfinity
+    # Versions without a pre-release (except as noted above) should sort after
+    # those with one.
+    elif pre is None:
+        _pre = Infinity
+    else:
+        _pre = pre
+
+    # Versions without a post segment should sort before those with one.
+    if post is None:
+        _post: CmpPrePostDevType = NegativeInfinity
+
+    else:
+        _post = post
+
+    # Versions without a development segment should sort after those with one.
+    if dev is None:
+        _dev: CmpPrePostDevType = Infinity
+
+    else:
+        _dev = dev
+
+    if local is None:
+        # Versions without a local segment should sort before those with one.
+        _local: CmpLocalType = NegativeInfinity
+    else:
+        # Versions with a local segment need that segment parsed to implement
+        # the sorting rules in PEP440.
+        # - Alpha numeric segments sort before numeric segments
+        # - Alpha numeric segments sort lexicographically
+        # - Numeric segments sort numerically
+        # - Shorter versions sort before longer versions when the prefixes
+        #   match exactly
+        _local = tuple(
+            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
+        )
+
+    return epoch, _release, _pre, _post, _dev, _local
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..57ce7f100643a40f232f51e1f3d37dbbd9d9c8b6
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py
@@ -0,0 +1,3676 @@
+# TODO: Add Generic type annotations to initialized collections.
+# For now we'd simply use implicit Any/Unknown which would add redundant annotations
+# mypy: disable-error-code="var-annotated"
+"""
+Package resource API
+--------------------
+
+A resource is a logical file contained within a package, or a logical
+subdirectory thereof.  The package resource API expects resource names
+to have their path parts separated with ``/``, *not* whatever the local
+path separator is.  Do not use os.path operations to manipulate resource
+names being passed into the API.
+
+The package resource API is designed to work with normal filesystem packages,
+.egg files, and unpacked .egg files.  It can also work in a limited way with
+.zip files and with custom PEP 302 loaders that support the ``get_data()``
+method.
+
+This module is deprecated. Users are directed to :mod:`importlib.resources`,
+:mod:`importlib.metadata` and :pypi:`packaging` instead.
+"""
+
+from __future__ import annotations
+
+import sys
+
+if sys.version_info < (3, 8):  # noqa: UP036 # Check for unsupported versions
+    raise RuntimeError("Python 3.8 or later is required")
+
+import os
+import io
+import time
+import re
+import types
+from typing import (
+    Any,
+    Literal,
+    Dict,
+    Iterator,
+    Mapping,
+    MutableSequence,
+    NamedTuple,
+    NoReturn,
+    Tuple,
+    Union,
+    TYPE_CHECKING,
+    Protocol,
+    Callable,
+    Iterable,
+    TypeVar,
+    overload,
+)
+import zipfile
+import zipimport
+import warnings
+import stat
+import functools
+import pkgutil
+import operator
+import platform
+import collections
+import plistlib
+import email.parser
+import errno
+import tempfile
+import textwrap
+import inspect
+import ntpath
+import posixpath
+import importlib
+import importlib.abc
+import importlib.machinery
+from pkgutil import get_importer
+
+import _imp
+
+# capture these to bypass sandboxing
+from os import utime
+from os import open as os_open
+from os.path import isdir, split
+
+try:
+    from os import mkdir, rename, unlink
+
+    WRITE_SUPPORT = True
+except ImportError:
+    # no write support, probably under GAE
+    WRITE_SUPPORT = False
+
+from pip._internal.utils._jaraco_text import (
+    yield_lines,
+    drop_comment,
+    join_continuation,
+)
+from pip._vendor.packaging import markers as _packaging_markers
+from pip._vendor.packaging import requirements as _packaging_requirements
+from pip._vendor.packaging import utils as _packaging_utils
+from pip._vendor.packaging import version as _packaging_version
+from pip._vendor.platformdirs import user_cache_dir as _user_cache_dir
+
+if TYPE_CHECKING:
+    from _typeshed import BytesPath, StrPath, StrOrBytesPath
+    from pip._vendor.typing_extensions import Self
+
+
+# Patch: Remove deprecation warning from vendored pkg_resources.
+# Setting PYTHONWARNINGS=error to verify builds produce no warnings
+# causes immediate exceptions.
+# See https://github.com/pypa/pip/issues/12243
+
+
+_T = TypeVar("_T")
+_DistributionT = TypeVar("_DistributionT", bound="Distribution")
+# Type aliases
+_NestedStr = Union[str, Iterable[Union[str, Iterable["_NestedStr"]]]]
+_InstallerTypeT = Callable[["Requirement"], "_DistributionT"]
+_InstallerType = Callable[["Requirement"], Union["Distribution", None]]
+_PkgReqType = Union[str, "Requirement"]
+_EPDistType = Union["Distribution", _PkgReqType]
+_MetadataType = Union["IResourceProvider", None]
+_ResolvedEntryPoint = Any  # Can be any attribute in the module
+_ResourceStream = Any  # TODO / Incomplete: A readable file-like object
+# Any object works, but let's indicate we expect something like a module (optionally has __loader__ or __file__)
+_ModuleLike = Union[object, types.ModuleType]
+# Any: Should be _ModuleLike but we end up with issues where _ModuleLike doesn't have _ZipLoaderModule's __loader__
+_ProviderFactoryType = Callable[[Any], "IResourceProvider"]
+_DistFinderType = Callable[[_T, str, bool], Iterable["Distribution"]]
+_NSHandlerType = Callable[[_T, str, str, types.ModuleType], Union[str, None]]
+_AdapterT = TypeVar(
+    "_AdapterT", _DistFinderType[Any], _ProviderFactoryType, _NSHandlerType[Any]
+)
+
+
+# Use _typeshed.importlib.LoaderProtocol once available https://github.com/python/typeshed/pull/11890
+class _LoaderProtocol(Protocol):
+    def load_module(self, fullname: str, /) -> types.ModuleType: ...
+
+
+class _ZipLoaderModule(Protocol):
+    __loader__: zipimport.zipimporter
+
+
+_PEP440_FALLBACK = re.compile(r"^v?(?P(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)", re.I)
+
+
+class PEP440Warning(RuntimeWarning):
+    """
+    Used when there is an issue with a version or specifier not complying with
+    PEP 440.
+    """
+
+
+parse_version = _packaging_version.Version
+
+
+_state_vars: dict[str, str] = {}
+
+
+def _declare_state(vartype: str, varname: str, initial_value: _T) -> _T:
+    _state_vars[varname] = vartype
+    return initial_value
+
+
+def __getstate__() -> dict[str, Any]:
+    state = {}
+    g = globals()
+    for k, v in _state_vars.items():
+        state[k] = g['_sget_' + v](g[k])
+    return state
+
+
+def __setstate__(state: dict[str, Any]) -> dict[str, Any]:
+    g = globals()
+    for k, v in state.items():
+        g['_sset_' + _state_vars[k]](k, g[k], v)
+    return state
+
+
+def _sget_dict(val):
+    return val.copy()
+
+
+def _sset_dict(key, ob, state):
+    ob.clear()
+    ob.update(state)
+
+
+def _sget_object(val):
+    return val.__getstate__()
+
+
+def _sset_object(key, ob, state):
+    ob.__setstate__(state)
+
+
+_sget_none = _sset_none = lambda *args: None
+
+
+def get_supported_platform():
+    """Return this platform's maximum compatible version.
+
+    distutils.util.get_platform() normally reports the minimum version
+    of macOS that would be required to *use* extensions produced by
+    distutils.  But what we want when checking compatibility is to know the
+    version of macOS that we are *running*.  To allow usage of packages that
+    explicitly require a newer version of macOS, we must also know the
+    current version of the OS.
+
+    If this condition occurs for any other platform with a version in its
+    platform strings, this function should be extended accordingly.
+    """
+    plat = get_build_platform()
+    m = macosVersionString.match(plat)
+    if m is not None and sys.platform == "darwin":
+        try:
+            plat = 'macosx-%s-%s' % ('.'.join(_macos_vers()[:2]), m.group(3))
+        except ValueError:
+            # not macOS
+            pass
+    return plat
+
+
+__all__ = [
+    # Basic resource access and distribution/entry point discovery
+    'require',
+    'run_script',
+    'get_provider',
+    'get_distribution',
+    'load_entry_point',
+    'get_entry_map',
+    'get_entry_info',
+    'iter_entry_points',
+    'resource_string',
+    'resource_stream',
+    'resource_filename',
+    'resource_listdir',
+    'resource_exists',
+    'resource_isdir',
+    # Environmental control
+    'declare_namespace',
+    'working_set',
+    'add_activation_listener',
+    'find_distributions',
+    'set_extraction_path',
+    'cleanup_resources',
+    'get_default_cache',
+    # Primary implementation classes
+    'Environment',
+    'WorkingSet',
+    'ResourceManager',
+    'Distribution',
+    'Requirement',
+    'EntryPoint',
+    # Exceptions
+    'ResolutionError',
+    'VersionConflict',
+    'DistributionNotFound',
+    'UnknownExtra',
+    'ExtractionError',
+    # Warnings
+    'PEP440Warning',
+    # Parsing functions and string utilities
+    'parse_requirements',
+    'parse_version',
+    'safe_name',
+    'safe_version',
+    'get_platform',
+    'compatible_platforms',
+    'yield_lines',
+    'split_sections',
+    'safe_extra',
+    'to_filename',
+    'invalid_marker',
+    'evaluate_marker',
+    # filesystem utilities
+    'ensure_directory',
+    'normalize_path',
+    # Distribution "precedence" constants
+    'EGG_DIST',
+    'BINARY_DIST',
+    'SOURCE_DIST',
+    'CHECKOUT_DIST',
+    'DEVELOP_DIST',
+    # "Provider" interfaces, implementations, and registration/lookup APIs
+    'IMetadataProvider',
+    'IResourceProvider',
+    'FileMetadata',
+    'PathMetadata',
+    'EggMetadata',
+    'EmptyProvider',
+    'empty_provider',
+    'NullProvider',
+    'EggProvider',
+    'DefaultProvider',
+    'ZipProvider',
+    'register_finder',
+    'register_namespace_handler',
+    'register_loader_type',
+    'fixup_namespace_packages',
+    'get_importer',
+    # Warnings
+    'PkgResourcesDeprecationWarning',
+    # Deprecated/backward compatibility only
+    'run_main',
+    'AvailableDistributions',
+]
+
+
+class ResolutionError(Exception):
+    """Abstract base for dependency resolution errors"""
+
+    def __repr__(self):
+        return self.__class__.__name__ + repr(self.args)
+
+
+class VersionConflict(ResolutionError):
+    """
+    An already-installed version conflicts with the requested version.
+
+    Should be initialized with the installed Distribution and the requested
+    Requirement.
+    """
+
+    _template = "{self.dist} is installed but {self.req} is required"
+
+    @property
+    def dist(self) -> Distribution:
+        return self.args[0]
+
+    @property
+    def req(self) -> Requirement:
+        return self.args[1]
+
+    def report(self):
+        return self._template.format(**locals())
+
+    def with_context(self, required_by: set[Distribution | str]):
+        """
+        If required_by is non-empty, return a version of self that is a
+        ContextualVersionConflict.
+        """
+        if not required_by:
+            return self
+        args = self.args + (required_by,)
+        return ContextualVersionConflict(*args)
+
+
+class ContextualVersionConflict(VersionConflict):
+    """
+    A VersionConflict that accepts a third parameter, the set of the
+    requirements that required the installed Distribution.
+    """
+
+    _template = VersionConflict._template + ' by {self.required_by}'
+
+    @property
+    def required_by(self) -> set[str]:
+        return self.args[2]
+
+
+class DistributionNotFound(ResolutionError):
+    """A requested distribution was not found"""
+
+    _template = (
+        "The '{self.req}' distribution was not found "
+        "and is required by {self.requirers_str}"
+    )
+
+    @property
+    def req(self) -> Requirement:
+        return self.args[0]
+
+    @property
+    def requirers(self) -> set[str] | None:
+        return self.args[1]
+
+    @property
+    def requirers_str(self):
+        if not self.requirers:
+            return 'the application'
+        return ', '.join(self.requirers)
+
+    def report(self):
+        return self._template.format(**locals())
+
+    def __str__(self):
+        return self.report()
+
+
+class UnknownExtra(ResolutionError):
+    """Distribution doesn't have an "extra feature" of the given name"""
+
+
+_provider_factories: dict[type[_ModuleLike], _ProviderFactoryType] = {}
+
+PY_MAJOR = '{}.{}'.format(*sys.version_info)
+EGG_DIST = 3
+BINARY_DIST = 2
+SOURCE_DIST = 1
+CHECKOUT_DIST = 0
+DEVELOP_DIST = -1
+
+
+def register_loader_type(
+    loader_type: type[_ModuleLike], provider_factory: _ProviderFactoryType
+):
+    """Register `provider_factory` to make providers for `loader_type`
+
+    `loader_type` is the type or class of a PEP 302 ``module.__loader__``,
+    and `provider_factory` is a function that, passed a *module* object,
+    returns an ``IResourceProvider`` for that module.
+    """
+    _provider_factories[loader_type] = provider_factory
+
+
+@overload
+def get_provider(moduleOrReq: str) -> IResourceProvider: ...
+@overload
+def get_provider(moduleOrReq: Requirement) -> Distribution: ...
+def get_provider(moduleOrReq: str | Requirement) -> IResourceProvider | Distribution:
+    """Return an IResourceProvider for the named module or requirement"""
+    if isinstance(moduleOrReq, Requirement):
+        return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
+    try:
+        module = sys.modules[moduleOrReq]
+    except KeyError:
+        __import__(moduleOrReq)
+        module = sys.modules[moduleOrReq]
+    loader = getattr(module, '__loader__', None)
+    return _find_adapter(_provider_factories, loader)(module)
+
+
+@functools.lru_cache(maxsize=None)
+def _macos_vers():
+    version = platform.mac_ver()[0]
+    # fallback for MacPorts
+    if version == '':
+        plist = '/System/Library/CoreServices/SystemVersion.plist'
+        if os.path.exists(plist):
+            with open(plist, 'rb') as fh:
+                plist_content = plistlib.load(fh)
+            if 'ProductVersion' in plist_content:
+                version = plist_content['ProductVersion']
+    return version.split('.')
+
+
+def _macos_arch(machine):
+    return {'PowerPC': 'ppc', 'Power_Macintosh': 'ppc'}.get(machine, machine)
+
+
+def get_build_platform():
+    """Return this platform's string for platform-specific distributions
+
+    XXX Currently this is the same as ``distutils.util.get_platform()``, but it
+    needs some hacks for Linux and macOS.
+    """
+    from sysconfig import get_platform
+
+    plat = get_platform()
+    if sys.platform == "darwin" and not plat.startswith('macosx-'):
+        try:
+            version = _macos_vers()
+            machine = os.uname()[4].replace(" ", "_")
+            return "macosx-%d.%d-%s" % (
+                int(version[0]),
+                int(version[1]),
+                _macos_arch(machine),
+            )
+        except ValueError:
+            # if someone is running a non-Mac darwin system, this will fall
+            # through to the default implementation
+            pass
+    return plat
+
+
+macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)")
+darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")
+# XXX backward compat
+get_platform = get_build_platform
+
+
+def compatible_platforms(provided: str | None, required: str | None):
+    """Can code for the `provided` platform run on the `required` platform?
+
+    Returns true if either platform is ``None``, or the platforms are equal.
+
+    XXX Needs compatibility checks for Linux and other unixy OSes.
+    """
+    if provided is None or required is None or provided == required:
+        # easy case
+        return True
+
+    # macOS special cases
+    reqMac = macosVersionString.match(required)
+    if reqMac:
+        provMac = macosVersionString.match(provided)
+
+        # is this a Mac package?
+        if not provMac:
+            # this is backwards compatibility for packages built before
+            # setuptools 0.6. All packages built after this point will
+            # use the new macOS designation.
+            provDarwin = darwinVersionString.match(provided)
+            if provDarwin:
+                dversion = int(provDarwin.group(1))
+                macosversion = "%s.%s" % (reqMac.group(1), reqMac.group(2))
+                if (
+                    dversion == 7
+                    and macosversion >= "10.3"
+                    or dversion == 8
+                    and macosversion >= "10.4"
+                ):
+                    return True
+            # egg isn't macOS or legacy darwin
+            return False
+
+        # are they the same major version and machine type?
+        if provMac.group(1) != reqMac.group(1) or provMac.group(3) != reqMac.group(3):
+            return False
+
+        # is the required OS major update >= the provided one?
+        if int(provMac.group(2)) > int(reqMac.group(2)):
+            return False
+
+        return True
+
+    # XXX Linux and other platforms' special cases should go here
+    return False
+
+
+@overload
+def get_distribution(dist: _DistributionT) -> _DistributionT: ...
+@overload
+def get_distribution(dist: _PkgReqType) -> Distribution: ...
+def get_distribution(dist: Distribution | _PkgReqType) -> Distribution:
+    """Return a current distribution object for a Requirement or string"""
+    if isinstance(dist, str):
+        dist = Requirement.parse(dist)
+    if isinstance(dist, Requirement):
+        # Bad type narrowing, dist has to be a Requirement here, so get_provider has to return Distribution
+        dist = get_provider(dist)  # type: ignore[assignment]
+    if not isinstance(dist, Distribution):
+        raise TypeError("Expected str, Requirement, or Distribution", dist)
+    return dist
+
+
+def load_entry_point(dist: _EPDistType, group: str, name: str) -> _ResolvedEntryPoint:
+    """Return `name` entry point of `group` for `dist` or raise ImportError"""
+    return get_distribution(dist).load_entry_point(group, name)
+
+
+@overload
+def get_entry_map(
+    dist: _EPDistType, group: None = None
+) -> dict[str, dict[str, EntryPoint]]: ...
+@overload
+def get_entry_map(dist: _EPDistType, group: str) -> dict[str, EntryPoint]: ...
+def get_entry_map(dist: _EPDistType, group: str | None = None):
+    """Return the entry point map for `group`, or the full entry map"""
+    return get_distribution(dist).get_entry_map(group)
+
+
+def get_entry_info(dist: _EPDistType, group: str, name: str):
+    """Return the EntryPoint object for `group`+`name`, or ``None``"""
+    return get_distribution(dist).get_entry_info(group, name)
+
+
+class IMetadataProvider(Protocol):
+    def has_metadata(self, name: str) -> bool:
+        """Does the package's distribution contain the named metadata?"""
+
+    def get_metadata(self, name: str) -> str:
+        """The named metadata resource as a string"""
+
+    def get_metadata_lines(self, name: str) -> Iterator[str]:
+        """Yield named metadata resource as list of non-blank non-comment lines
+
+        Leading and trailing whitespace is stripped from each line, and lines
+        with ``#`` as the first non-blank character are omitted."""
+
+    def metadata_isdir(self, name: str) -> bool:
+        """Is the named metadata a directory?  (like ``os.path.isdir()``)"""
+
+    def metadata_listdir(self, name: str) -> list[str]:
+        """List of metadata names in the directory (like ``os.listdir()``)"""
+
+    def run_script(self, script_name: str, namespace: dict[str, Any]) -> None:
+        """Execute the named script in the supplied namespace dictionary"""
+
+
+class IResourceProvider(IMetadataProvider, Protocol):
+    """An object that provides access to package resources"""
+
+    def get_resource_filename(
+        self, manager: ResourceManager, resource_name: str
+    ) -> str:
+        """Return a true filesystem path for `resource_name`
+
+        `manager` must be a ``ResourceManager``"""
+
+    def get_resource_stream(
+        self, manager: ResourceManager, resource_name: str
+    ) -> _ResourceStream:
+        """Return a readable file-like object for `resource_name`
+
+        `manager` must be a ``ResourceManager``"""
+
+    def get_resource_string(
+        self, manager: ResourceManager, resource_name: str
+    ) -> bytes:
+        """Return the contents of `resource_name` as :obj:`bytes`
+
+        `manager` must be a ``ResourceManager``"""
+
+    def has_resource(self, resource_name: str) -> bool:
+        """Does the package contain the named resource?"""
+
+    def resource_isdir(self, resource_name: str) -> bool:
+        """Is the named resource a directory?  (like ``os.path.isdir()``)"""
+
+    def resource_listdir(self, resource_name: str) -> list[str]:
+        """List of resource names in the directory (like ``os.listdir()``)"""
+
+
+class WorkingSet:
+    """A collection of active distributions on sys.path (or a similar list)"""
+
+    def __init__(self, entries: Iterable[str] | None = None):
+        """Create working set from list of path entries (default=sys.path)"""
+        self.entries: list[str] = []
+        self.entry_keys = {}
+        self.by_key = {}
+        self.normalized_to_canonical_keys = {}
+        self.callbacks = []
+
+        if entries is None:
+            entries = sys.path
+
+        for entry in entries:
+            self.add_entry(entry)
+
+    @classmethod
+    def _build_master(cls):
+        """
+        Prepare the master working set.
+        """
+        ws = cls()
+        try:
+            from __main__ import __requires__
+        except ImportError:
+            # The main program does not list any requirements
+            return ws
+
+        # ensure the requirements are met
+        try:
+            ws.require(__requires__)
+        except VersionConflict:
+            return cls._build_from_requirements(__requires__)
+
+        return ws
+
+    @classmethod
+    def _build_from_requirements(cls, req_spec):
+        """
+        Build a working set from a requirement spec. Rewrites sys.path.
+        """
+        # try it without defaults already on sys.path
+        # by starting with an empty path
+        ws = cls([])
+        reqs = parse_requirements(req_spec)
+        dists = ws.resolve(reqs, Environment())
+        for dist in dists:
+            ws.add(dist)
+
+        # add any missing entries from sys.path
+        for entry in sys.path:
+            if entry not in ws.entries:
+                ws.add_entry(entry)
+
+        # then copy back to sys.path
+        sys.path[:] = ws.entries
+        return ws
+
+    def add_entry(self, entry: str):
+        """Add a path item to ``.entries``, finding any distributions on it
+
+        ``find_distributions(entry, True)`` is used to find distributions
+        corresponding to the path entry, and they are added.  `entry` is
+        always appended to ``.entries``, even if it is already present.
+        (This is because ``sys.path`` can contain the same value more than
+        once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
+        equal ``sys.path``.)
+        """
+        self.entry_keys.setdefault(entry, [])
+        self.entries.append(entry)
+        for dist in find_distributions(entry, True):
+            self.add(dist, entry, False)
+
+    def __contains__(self, dist: Distribution) -> bool:
+        """True if `dist` is the active distribution for its project"""
+        return self.by_key.get(dist.key) == dist
+
+    def find(self, req: Requirement) -> Distribution | None:
+        """Find a distribution matching requirement `req`
+
+        If there is an active distribution for the requested project, this
+        returns it as long as it meets the version requirement specified by
+        `req`.  But, if there is an active distribution for the project and it
+        does *not* meet the `req` requirement, ``VersionConflict`` is raised.
+        If there is no active distribution for the requested project, ``None``
+        is returned.
+        """
+        dist = self.by_key.get(req.key)
+
+        if dist is None:
+            canonical_key = self.normalized_to_canonical_keys.get(req.key)
+
+            if canonical_key is not None:
+                req.key = canonical_key
+                dist = self.by_key.get(canonical_key)
+
+        if dist is not None and dist not in req:
+            # XXX add more info
+            raise VersionConflict(dist, req)
+        return dist
+
+    def iter_entry_points(self, group: str, name: str | None = None):
+        """Yield entry point objects from `group` matching `name`
+
+        If `name` is None, yields all entry points in `group` from all
+        distributions in the working set, otherwise only ones matching
+        both `group` and `name` are yielded (in distribution order).
+        """
+        return (
+            entry
+            for dist in self
+            for entry in dist.get_entry_map(group).values()
+            if name is None or name == entry.name
+        )
+
+    def run_script(self, requires: str, script_name: str):
+        """Locate distribution for `requires` and run `script_name` script"""
+        ns = sys._getframe(1).f_globals
+        name = ns['__name__']
+        ns.clear()
+        ns['__name__'] = name
+        self.require(requires)[0].run_script(script_name, ns)
+
+    def __iter__(self) -> Iterator[Distribution]:
+        """Yield distributions for non-duplicate projects in the working set
+
+        The yield order is the order in which the items' path entries were
+        added to the working set.
+        """
+        seen = set()
+        for item in self.entries:
+            if item not in self.entry_keys:
+                # workaround a cache issue
+                continue
+
+            for key in self.entry_keys[item]:
+                if key not in seen:
+                    seen.add(key)
+                    yield self.by_key[key]
+
+    def add(
+        self,
+        dist: Distribution,
+        entry: str | None = None,
+        insert: bool = True,
+        replace: bool = False,
+    ):
+        """Add `dist` to working set, associated with `entry`
+
+        If `entry` is unspecified, it defaults to the ``.location`` of `dist`.
+        On exit from this routine, `entry` is added to the end of the working
+        set's ``.entries`` (if it wasn't already present).
+
+        `dist` is only added to the working set if it's for a project that
+        doesn't already have a distribution in the set, unless `replace=True`.
+        If it's added, any callbacks registered with the ``subscribe()`` method
+        will be called.
+        """
+        if insert:
+            dist.insert_on(self.entries, entry, replace=replace)
+
+        if entry is None:
+            entry = dist.location
+        keys = self.entry_keys.setdefault(entry, [])
+        keys2 = self.entry_keys.setdefault(dist.location, [])
+        if not replace and dist.key in self.by_key:
+            # ignore hidden distros
+            return
+
+        self.by_key[dist.key] = dist
+        normalized_name = _packaging_utils.canonicalize_name(dist.key)
+        self.normalized_to_canonical_keys[normalized_name] = dist.key
+        if dist.key not in keys:
+            keys.append(dist.key)
+        if dist.key not in keys2:
+            keys2.append(dist.key)
+        self._added_new(dist)
+
+    @overload
+    def resolve(
+        self,
+        requirements: Iterable[Requirement],
+        env: Environment | None,
+        installer: _InstallerTypeT[_DistributionT],
+        replace_conflicting: bool = False,
+        extras: tuple[str, ...] | None = None,
+    ) -> list[_DistributionT]: ...
+    @overload
+    def resolve(
+        self,
+        requirements: Iterable[Requirement],
+        env: Environment | None = None,
+        *,
+        installer: _InstallerTypeT[_DistributionT],
+        replace_conflicting: bool = False,
+        extras: tuple[str, ...] | None = None,
+    ) -> list[_DistributionT]: ...
+    @overload
+    def resolve(
+        self,
+        requirements: Iterable[Requirement],
+        env: Environment | None = None,
+        installer: _InstallerType | None = None,
+        replace_conflicting: bool = False,
+        extras: tuple[str, ...] | None = None,
+    ) -> list[Distribution]: ...
+    def resolve(
+        self,
+        requirements: Iterable[Requirement],
+        env: Environment | None = None,
+        installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
+        replace_conflicting: bool = False,
+        extras: tuple[str, ...] | None = None,
+    ) -> list[Distribution] | list[_DistributionT]:
+        """List all distributions needed to (recursively) meet `requirements`
+
+        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
+        if supplied, should be an ``Environment`` instance.  If
+        not supplied, it defaults to all distributions available within any
+        entry or distribution in the working set.  `installer`, if supplied,
+        will be invoked with each requirement that cannot be met by an
+        already-installed distribution; it should return a ``Distribution`` or
+        ``None``.
+
+        Unless `replace_conflicting=True`, raises a VersionConflict exception
+        if
+        any requirements are found on the path that have the correct name but
+        the wrong version.  Otherwise, if an `installer` is supplied it will be
+        invoked to obtain the correct version of the requirement and activate
+        it.
+
+        `extras` is a list of the extras to be used with these requirements.
+        This is important because extra requirements may look like `my_req;
+        extra = "my_extra"`, which would otherwise be interpreted as a purely
+        optional requirement.  Instead, we want to be able to assert that these
+        requirements are truly required.
+        """
+
+        # set up the stack
+        requirements = list(requirements)[::-1]
+        # set of processed requirements
+        processed = set()
+        # key -> dist
+        best = {}
+        to_activate = []
+
+        req_extras = _ReqExtras()
+
+        # Mapping of requirement to set of distributions that required it;
+        # useful for reporting info about conflicts.
+        required_by = collections.defaultdict(set)
+
+        while requirements:
+            # process dependencies breadth-first
+            req = requirements.pop(0)
+            if req in processed:
+                # Ignore cyclic or redundant dependencies
+                continue
+
+            if not req_extras.markers_pass(req, extras):
+                continue
+
+            dist = self._resolve_dist(
+                req, best, replace_conflicting, env, installer, required_by, to_activate
+            )
+
+            # push the new requirements onto the stack
+            new_requirements = dist.requires(req.extras)[::-1]
+            requirements.extend(new_requirements)
+
+            # Register the new requirements needed by req
+            for new_requirement in new_requirements:
+                required_by[new_requirement].add(req.project_name)
+                req_extras[new_requirement] = req.extras
+
+            processed.add(req)
+
+        # return list of distros to activate
+        return to_activate
+
+    def _resolve_dist(
+        self, req, best, replace_conflicting, env, installer, required_by, to_activate
+    ) -> Distribution:
+        dist = best.get(req.key)
+        if dist is None:
+            # Find the best distribution and add it to the map
+            dist = self.by_key.get(req.key)
+            if dist is None or (dist not in req and replace_conflicting):
+                ws = self
+                if env is None:
+                    if dist is None:
+                        env = Environment(self.entries)
+                    else:
+                        # Use an empty environment and workingset to avoid
+                        # any further conflicts with the conflicting
+                        # distribution
+                        env = Environment([])
+                        ws = WorkingSet([])
+                dist = best[req.key] = env.best_match(
+                    req, ws, installer, replace_conflicting=replace_conflicting
+                )
+                if dist is None:
+                    requirers = required_by.get(req, None)
+                    raise DistributionNotFound(req, requirers)
+            to_activate.append(dist)
+        if dist not in req:
+            # Oops, the "best" so far conflicts with a dependency
+            dependent_req = required_by[req]
+            raise VersionConflict(dist, req).with_context(dependent_req)
+        return dist
+
+    @overload
+    def find_plugins(
+        self,
+        plugin_env: Environment,
+        full_env: Environment | None,
+        installer: _InstallerTypeT[_DistributionT],
+        fallback: bool = True,
+    ) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
+    @overload
+    def find_plugins(
+        self,
+        plugin_env: Environment,
+        full_env: Environment | None = None,
+        *,
+        installer: _InstallerTypeT[_DistributionT],
+        fallback: bool = True,
+    ) -> tuple[list[_DistributionT], dict[Distribution, Exception]]: ...
+    @overload
+    def find_plugins(
+        self,
+        plugin_env: Environment,
+        full_env: Environment | None = None,
+        installer: _InstallerType | None = None,
+        fallback: bool = True,
+    ) -> tuple[list[Distribution], dict[Distribution, Exception]]: ...
+    def find_plugins(
+        self,
+        plugin_env: Environment,
+        full_env: Environment | None = None,
+        installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
+        fallback: bool = True,
+    ) -> tuple[
+        list[Distribution] | list[_DistributionT],
+        dict[Distribution, Exception],
+    ]:
+        """Find all activatable distributions in `plugin_env`
+
+        Example usage::
+
+            distributions, errors = working_set.find_plugins(
+                Environment(plugin_dirlist)
+            )
+            # add plugins+libs to sys.path
+            map(working_set.add, distributions)
+            # display errors
+            print('Could not load', errors)
+
+        The `plugin_env` should be an ``Environment`` instance that contains
+        only distributions that are in the project's "plugin directory" or
+        directories. The `full_env`, if supplied, should be an ``Environment``
+        contains all currently-available distributions.  If `full_env` is not
+        supplied, one is created automatically from the ``WorkingSet`` this
+        method is called on, which will typically mean that every directory on
+        ``sys.path`` will be scanned for distributions.
+
+        `installer` is a standard installer callback as used by the
+        ``resolve()`` method. The `fallback` flag indicates whether we should
+        attempt to resolve older versions of a plugin if the newest version
+        cannot be resolved.
+
+        This method returns a 2-tuple: (`distributions`, `error_info`), where
+        `distributions` is a list of the distributions found in `plugin_env`
+        that were loadable, along with any other distributions that are needed
+        to resolve their dependencies.  `error_info` is a dictionary mapping
+        unloadable plugin distributions to an exception instance describing the
+        error that occurred. Usually this will be a ``DistributionNotFound`` or
+        ``VersionConflict`` instance.
+        """
+
+        plugin_projects = list(plugin_env)
+        # scan project names in alphabetic order
+        plugin_projects.sort()
+
+        error_info: dict[Distribution, Exception] = {}
+        distributions: dict[Distribution, Exception | None] = {}
+
+        if full_env is None:
+            env = Environment(self.entries)
+            env += plugin_env
+        else:
+            env = full_env + plugin_env
+
+        shadow_set = self.__class__([])
+        # put all our entries in shadow_set
+        list(map(shadow_set.add, self))
+
+        for project_name in plugin_projects:
+            for dist in plugin_env[project_name]:
+                req = [dist.as_requirement()]
+
+                try:
+                    resolvees = shadow_set.resolve(req, env, installer)
+
+                except ResolutionError as v:
+                    # save error info
+                    error_info[dist] = v
+                    if fallback:
+                        # try the next older version of project
+                        continue
+                    else:
+                        # give up on this project, keep going
+                        break
+
+                else:
+                    list(map(shadow_set.add, resolvees))
+                    distributions.update(dict.fromkeys(resolvees))
+
+                    # success, no need to try any more versions of this project
+                    break
+
+        sorted_distributions = list(distributions)
+        sorted_distributions.sort()
+
+        return sorted_distributions, error_info
+
+    def require(self, *requirements: _NestedStr):
+        """Ensure that distributions matching `requirements` are activated
+
+        `requirements` must be a string or a (possibly-nested) sequence
+        thereof, specifying the distributions and versions required.  The
+        return value is a sequence of the distributions that needed to be
+        activated to fulfill the requirements; all relevant distributions are
+        included, even if they were already activated in this working set.
+        """
+        needed = self.resolve(parse_requirements(requirements))
+
+        for dist in needed:
+            self.add(dist)
+
+        return needed
+
+    def subscribe(
+        self, callback: Callable[[Distribution], object], existing: bool = True
+    ):
+        """Invoke `callback` for all distributions
+
+        If `existing=True` (default),
+        call on all existing ones, as well.
+        """
+        if callback in self.callbacks:
+            return
+        self.callbacks.append(callback)
+        if not existing:
+            return
+        for dist in self:
+            callback(dist)
+
+    def _added_new(self, dist):
+        for callback in self.callbacks:
+            callback(dist)
+
+    def __getstate__(self):
+        return (
+            self.entries[:],
+            self.entry_keys.copy(),
+            self.by_key.copy(),
+            self.normalized_to_canonical_keys.copy(),
+            self.callbacks[:],
+        )
+
+    def __setstate__(self, e_k_b_n_c):
+        entries, keys, by_key, normalized_to_canonical_keys, callbacks = e_k_b_n_c
+        self.entries = entries[:]
+        self.entry_keys = keys.copy()
+        self.by_key = by_key.copy()
+        self.normalized_to_canonical_keys = normalized_to_canonical_keys.copy()
+        self.callbacks = callbacks[:]
+
+
+class _ReqExtras(Dict["Requirement", Tuple[str, ...]]):
+    """
+    Map each requirement to the extras that demanded it.
+    """
+
+    def markers_pass(self, req: Requirement, extras: tuple[str, ...] | None = None):
+        """
+        Evaluate markers for req against each extra that
+        demanded it.
+
+        Return False if the req has a marker and fails
+        evaluation. Otherwise, return True.
+        """
+        extra_evals = (
+            req.marker.evaluate({'extra': extra})
+            for extra in self.get(req, ()) + (extras or (None,))
+        )
+        return not req.marker or any(extra_evals)
+
+
+class Environment:
+    """Searchable snapshot of distributions on a search path"""
+
+    def __init__(
+        self,
+        search_path: Iterable[str] | None = None,
+        platform: str | None = get_supported_platform(),
+        python: str | None = PY_MAJOR,
+    ):
+        """Snapshot distributions available on a search path
+
+        Any distributions found on `search_path` are added to the environment.
+        `search_path` should be a sequence of ``sys.path`` items.  If not
+        supplied, ``sys.path`` is used.
+
+        `platform` is an optional string specifying the name of the platform
+        that platform-specific distributions must be compatible with.  If
+        unspecified, it defaults to the current platform.  `python` is an
+        optional string naming the desired version of Python (e.g. ``'3.6'``);
+        it defaults to the current version.
+
+        You may explicitly set `platform` (and/or `python`) to ``None`` if you
+        wish to map *all* distributions, not just those compatible with the
+        running platform or Python version.
+        """
+        self._distmap = {}
+        self.platform = platform
+        self.python = python
+        self.scan(search_path)
+
+    def can_add(self, dist: Distribution):
+        """Is distribution `dist` acceptable for this environment?
+
+        The distribution must match the platform and python version
+        requirements specified when this environment was created, or False
+        is returned.
+        """
+        py_compat = (
+            self.python is None
+            or dist.py_version is None
+            or dist.py_version == self.python
+        )
+        return py_compat and compatible_platforms(dist.platform, self.platform)
+
+    def remove(self, dist: Distribution):
+        """Remove `dist` from the environment"""
+        self._distmap[dist.key].remove(dist)
+
+    def scan(self, search_path: Iterable[str] | None = None):
+        """Scan `search_path` for distributions usable in this environment
+
+        Any distributions found are added to the environment.
+        `search_path` should be a sequence of ``sys.path`` items.  If not
+        supplied, ``sys.path`` is used.  Only distributions conforming to
+        the platform/python version defined at initialization are added.
+        """
+        if search_path is None:
+            search_path = sys.path
+
+        for item in search_path:
+            for dist in find_distributions(item):
+                self.add(dist)
+
+    def __getitem__(self, project_name: str) -> list[Distribution]:
+        """Return a newest-to-oldest list of distributions for `project_name`
+
+        Uses case-insensitive `project_name` comparison, assuming all the
+        project's distributions use their project's name converted to all
+        lowercase as their key.
+
+        """
+        distribution_key = project_name.lower()
+        return self._distmap.get(distribution_key, [])
+
+    def add(self, dist: Distribution):
+        """Add `dist` if we ``can_add()`` it and it has not already been added"""
+        if self.can_add(dist) and dist.has_version():
+            dists = self._distmap.setdefault(dist.key, [])
+            if dist not in dists:
+                dists.append(dist)
+                dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
+
+    @overload
+    def best_match(
+        self,
+        req: Requirement,
+        working_set: WorkingSet,
+        installer: _InstallerTypeT[_DistributionT],
+        replace_conflicting: bool = False,
+    ) -> _DistributionT: ...
+    @overload
+    def best_match(
+        self,
+        req: Requirement,
+        working_set: WorkingSet,
+        installer: _InstallerType | None = None,
+        replace_conflicting: bool = False,
+    ) -> Distribution | None: ...
+    def best_match(
+        self,
+        req: Requirement,
+        working_set: WorkingSet,
+        installer: _InstallerType | None | _InstallerTypeT[_DistributionT] = None,
+        replace_conflicting: bool = False,
+    ) -> Distribution | None:
+        """Find distribution best matching `req` and usable on `working_set`
+
+        This calls the ``find(req)`` method of the `working_set` to see if a
+        suitable distribution is already active.  (This may raise
+        ``VersionConflict`` if an unsuitable version of the project is already
+        active in the specified `working_set`.)  If a suitable distribution
+        isn't active, this method returns the newest distribution in the
+        environment that meets the ``Requirement`` in `req`.  If no suitable
+        distribution is found, and `installer` is supplied, then the result of
+        calling the environment's ``obtain(req, installer)`` method will be
+        returned.
+        """
+        try:
+            dist = working_set.find(req)
+        except VersionConflict:
+            if not replace_conflicting:
+                raise
+            dist = None
+        if dist is not None:
+            return dist
+        for dist in self[req.key]:
+            if dist in req:
+                return dist
+        # try to download/install
+        return self.obtain(req, installer)
+
+    @overload
+    def obtain(
+        self,
+        requirement: Requirement,
+        installer: _InstallerTypeT[_DistributionT],
+    ) -> _DistributionT: ...
+    @overload
+    def obtain(
+        self,
+        requirement: Requirement,
+        installer: Callable[[Requirement], None] | None = None,
+    ) -> None: ...
+    @overload
+    def obtain(
+        self,
+        requirement: Requirement,
+        installer: _InstallerType | None = None,
+    ) -> Distribution | None: ...
+    def obtain(
+        self,
+        requirement: Requirement,
+        installer: Callable[[Requirement], None]
+        | _InstallerType
+        | None
+        | _InstallerTypeT[_DistributionT] = None,
+    ) -> Distribution | None:
+        """Obtain a distribution matching `requirement` (e.g. via download)
+
+        Obtain a distro that matches requirement (e.g. via download).  In the
+        base ``Environment`` class, this routine just returns
+        ``installer(requirement)``, unless `installer` is None, in which case
+        None is returned instead.  This method is a hook that allows subclasses
+        to attempt other ways of obtaining a distribution before falling back
+        to the `installer` argument."""
+        return installer(requirement) if installer else None
+
+    def __iter__(self) -> Iterator[str]:
+        """Yield the unique project names of the available distributions"""
+        for key in self._distmap.keys():
+            if self[key]:
+                yield key
+
+    def __iadd__(self, other: Distribution | Environment):
+        """In-place addition of a distribution or environment"""
+        if isinstance(other, Distribution):
+            self.add(other)
+        elif isinstance(other, Environment):
+            for project in other:
+                for dist in other[project]:
+                    self.add(dist)
+        else:
+            raise TypeError("Can't add %r to environment" % (other,))
+        return self
+
+    def __add__(self, other: Distribution | Environment):
+        """Add an environment or distribution to an environment"""
+        new = self.__class__([], platform=None, python=None)
+        for env in self, other:
+            new += env
+        return new
+
+
+# XXX backward compatibility
+AvailableDistributions = Environment
+
+
+class ExtractionError(RuntimeError):
+    """An error occurred extracting a resource
+
+    The following attributes are available from instances of this exception:
+
+    manager
+        The resource manager that raised this exception
+
+    cache_path
+        The base directory for resource extraction
+
+    original_error
+        The exception instance that caused extraction to fail
+    """
+
+    manager: ResourceManager
+    cache_path: str
+    original_error: BaseException | None
+
+
+class ResourceManager:
+    """Manage resource extraction and packages"""
+
+    extraction_path: str | None = None
+
+    def __init__(self):
+        self.cached_files = {}
+
+    def resource_exists(self, package_or_requirement: _PkgReqType, resource_name: str):
+        """Does the named resource exist?"""
+        return get_provider(package_or_requirement).has_resource(resource_name)
+
+    def resource_isdir(self, package_or_requirement: _PkgReqType, resource_name: str):
+        """Is the named resource an existing directory?"""
+        return get_provider(package_or_requirement).resource_isdir(resource_name)
+
+    def resource_filename(
+        self, package_or_requirement: _PkgReqType, resource_name: str
+    ):
+        """Return a true filesystem path for specified resource"""
+        return get_provider(package_or_requirement).get_resource_filename(
+            self, resource_name
+        )
+
+    def resource_stream(self, package_or_requirement: _PkgReqType, resource_name: str):
+        """Return a readable file-like object for specified resource"""
+        return get_provider(package_or_requirement).get_resource_stream(
+            self, resource_name
+        )
+
+    def resource_string(
+        self, package_or_requirement: _PkgReqType, resource_name: str
+    ) -> bytes:
+        """Return specified resource as :obj:`bytes`"""
+        return get_provider(package_or_requirement).get_resource_string(
+            self, resource_name
+        )
+
+    def resource_listdir(self, package_or_requirement: _PkgReqType, resource_name: str):
+        """List the contents of the named resource directory"""
+        return get_provider(package_or_requirement).resource_listdir(resource_name)
+
+    def extraction_error(self) -> NoReturn:
+        """Give an error message for problems extracting file(s)"""
+
+        old_exc = sys.exc_info()[1]
+        cache_path = self.extraction_path or get_default_cache()
+
+        tmpl = textwrap.dedent(
+            """
+            Can't extract file(s) to egg cache
+
+            The following error occurred while trying to extract file(s)
+            to the Python egg cache:
+
+              {old_exc}
+
+            The Python egg cache directory is currently set to:
+
+              {cache_path}
+
+            Perhaps your account does not have write access to this directory?
+            You can change the cache directory by setting the PYTHON_EGG_CACHE
+            environment variable to point to an accessible directory.
+            """
+        ).lstrip()
+        err = ExtractionError(tmpl.format(**locals()))
+        err.manager = self
+        err.cache_path = cache_path
+        err.original_error = old_exc
+        raise err
+
+    def get_cache_path(self, archive_name: str, names: Iterable[StrPath] = ()):
+        """Return absolute location in cache for `archive_name` and `names`
+
+        The parent directory of the resulting path will be created if it does
+        not already exist.  `archive_name` should be the base filename of the
+        enclosing egg (which may not be the name of the enclosing zipfile!),
+        including its ".egg" extension.  `names`, if provided, should be a
+        sequence of path name parts "under" the egg's extraction location.
+
+        This method should only be called by resource providers that need to
+        obtain an extraction location, and only for names they intend to
+        extract, as it tracks the generated names for possible cleanup later.
+        """
+        extract_path = self.extraction_path or get_default_cache()
+        target_path = os.path.join(extract_path, archive_name + '-tmp', *names)
+        try:
+            _bypass_ensure_directory(target_path)
+        except Exception:
+            self.extraction_error()
+
+        self._warn_unsafe_extraction_path(extract_path)
+
+        self.cached_files[target_path] = True
+        return target_path
+
+    @staticmethod
+    def _warn_unsafe_extraction_path(path):
+        """
+        If the default extraction path is overridden and set to an insecure
+        location, such as /tmp, it opens up an opportunity for an attacker to
+        replace an extracted file with an unauthorized payload. Warn the user
+        if a known insecure location is used.
+
+        See Distribute #375 for more details.
+        """
+        if os.name == 'nt' and not path.startswith(os.environ['windir']):
+            # On Windows, permissions are generally restrictive by default
+            #  and temp directories are not writable by other users, so
+            #  bypass the warning.
+            return
+        mode = os.stat(path).st_mode
+        if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
+            msg = (
+                "Extraction path is writable by group/others "
+                "and vulnerable to attack when "
+                "used with get_resource_filename ({path}). "
+                "Consider a more secure "
+                "location (set with .set_extraction_path or the "
+                "PYTHON_EGG_CACHE environment variable)."
+            ).format(**locals())
+            warnings.warn(msg, UserWarning)
+
+    def postprocess(self, tempname: StrOrBytesPath, filename: StrOrBytesPath):
+        """Perform any platform-specific postprocessing of `tempname`
+
+        This is where Mac header rewrites should be done; other platforms don't
+        have anything special they should do.
+
+        Resource providers should call this method ONLY after successfully
+        extracting a compressed resource.  They must NOT call it on resources
+        that are already in the filesystem.
+
+        `tempname` is the current (temporary) name of the file, and `filename`
+        is the name it will be renamed to by the caller after this routine
+        returns.
+        """
+
+        if os.name == 'posix':
+            # Make the resource executable
+            mode = ((os.stat(tempname).st_mode) | 0o555) & 0o7777
+            os.chmod(tempname, mode)
+
+    def set_extraction_path(self, path: str):
+        """Set the base path where resources will be extracted to, if needed.
+
+        If you do not call this routine before any extractions take place, the
+        path defaults to the return value of ``get_default_cache()``.  (Which
+        is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
+        platform-specific fallbacks.  See that routine's documentation for more
+        details.)
+
+        Resources are extracted to subdirectories of this path based upon
+        information given by the ``IResourceProvider``.  You may set this to a
+        temporary directory, but then you must call ``cleanup_resources()`` to
+        delete the extracted files when done.  There is no guarantee that
+        ``cleanup_resources()`` will be able to remove all extracted files.
+
+        (Note: you may not change the extraction path for a given resource
+        manager once resources have been extracted, unless you first call
+        ``cleanup_resources()``.)
+        """
+        if self.cached_files:
+            raise ValueError("Can't change extraction path, files already extracted")
+
+        self.extraction_path = path
+
+    def cleanup_resources(self, force: bool = False) -> list[str]:
+        """
+        Delete all extracted resource files and directories, returning a list
+        of the file and directory names that could not be successfully removed.
+        This function does not have any concurrency protection, so it should
+        generally only be called when the extraction path is a temporary
+        directory exclusive to a single process.  This method is not
+        automatically called; you must call it explicitly or register it as an
+        ``atexit`` function if you wish to ensure cleanup of a temporary
+        directory used for extractions.
+        """
+        # XXX
+        return []
+
+
+def get_default_cache() -> str:
+    """
+    Return the ``PYTHON_EGG_CACHE`` environment variable
+    or a platform-relevant user cache dir for an app
+    named "Python-Eggs".
+    """
+    return os.environ.get('PYTHON_EGG_CACHE') or _user_cache_dir(appname='Python-Eggs')
+
+
+def safe_name(name: str):
+    """Convert an arbitrary string to a standard distribution name
+
+    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
+    """
+    return re.sub('[^A-Za-z0-9.]+', '-', name)
+
+
+def safe_version(version: str):
+    """
+    Convert an arbitrary string to a standard version string
+    """
+    try:
+        # normalize the version
+        return str(_packaging_version.Version(version))
+    except _packaging_version.InvalidVersion:
+        version = version.replace(' ', '.')
+        return re.sub('[^A-Za-z0-9.]+', '-', version)
+
+
+def _forgiving_version(version):
+    """Fallback when ``safe_version`` is not safe enough
+    >>> parse_version(_forgiving_version('0.23ubuntu1'))
+    
+    >>> parse_version(_forgiving_version('0.23-'))
+    
+    >>> parse_version(_forgiving_version('0.-_'))
+    
+    >>> parse_version(_forgiving_version('42.+?1'))
+    
+    >>> parse_version(_forgiving_version('hello world'))
+    
+    """
+    version = version.replace(' ', '.')
+    match = _PEP440_FALLBACK.search(version)
+    if match:
+        safe = match["safe"]
+        rest = version[len(safe) :]
+    else:
+        safe = "0"
+        rest = version
+    local = f"sanitized.{_safe_segment(rest)}".strip(".")
+    return f"{safe}.dev0+{local}"
+
+
+def _safe_segment(segment):
+    """Convert an arbitrary string into a safe segment"""
+    segment = re.sub('[^A-Za-z0-9.]+', '-', segment)
+    segment = re.sub('-[^A-Za-z0-9]+', '-', segment)
+    return re.sub(r'\.[^A-Za-z0-9]+', '.', segment).strip(".-")
+
+
+def safe_extra(extra: str):
+    """Convert an arbitrary string to a standard 'extra' name
+
+    Any runs of non-alphanumeric characters are replaced with a single '_',
+    and the result is always lowercased.
+    """
+    return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower()
+
+
+def to_filename(name: str):
+    """Convert a project or version name to its filename-escaped form
+
+    Any '-' characters are currently replaced with '_'.
+    """
+    return name.replace('-', '_')
+
+
+def invalid_marker(text: str):
+    """
+    Validate text as a PEP 508 environment marker; return an exception
+    if invalid or False otherwise.
+    """
+    try:
+        evaluate_marker(text)
+    except SyntaxError as e:
+        e.filename = None
+        e.lineno = None
+        return e
+    return False
+
+
+def evaluate_marker(text: str, extra: str | None = None) -> bool:
+    """
+    Evaluate a PEP 508 environment marker.
+    Return a boolean indicating the marker result in this environment.
+    Raise SyntaxError if marker is invalid.
+
+    This implementation uses the 'pyparsing' module.
+    """
+    try:
+        marker = _packaging_markers.Marker(text)
+        return marker.evaluate()
+    except _packaging_markers.InvalidMarker as e:
+        raise SyntaxError(e) from e
+
+
+class NullProvider:
+    """Try to implement resources and metadata for arbitrary PEP 302 loaders"""
+
+    egg_name: str | None = None
+    egg_info: str | None = None
+    loader: _LoaderProtocol | None = None
+
+    def __init__(self, module: _ModuleLike):
+        self.loader = getattr(module, '__loader__', None)
+        self.module_path = os.path.dirname(getattr(module, '__file__', ''))
+
+    def get_resource_filename(self, manager: ResourceManager, resource_name: str):
+        return self._fn(self.module_path, resource_name)
+
+    def get_resource_stream(self, manager: ResourceManager, resource_name: str):
+        return io.BytesIO(self.get_resource_string(manager, resource_name))
+
+    def get_resource_string(
+        self, manager: ResourceManager, resource_name: str
+    ) -> bytes:
+        return self._get(self._fn(self.module_path, resource_name))
+
+    def has_resource(self, resource_name: str):
+        return self._has(self._fn(self.module_path, resource_name))
+
+    def _get_metadata_path(self, name):
+        return self._fn(self.egg_info, name)
+
+    def has_metadata(self, name: str) -> bool:
+        if not self.egg_info:
+            return False
+
+        path = self._get_metadata_path(name)
+        return self._has(path)
+
+    def get_metadata(self, name: str):
+        if not self.egg_info:
+            return ""
+        path = self._get_metadata_path(name)
+        value = self._get(path)
+        try:
+            return value.decode('utf-8')
+        except UnicodeDecodeError as exc:
+            # Include the path in the error message to simplify
+            # troubleshooting, and without changing the exception type.
+            exc.reason += ' in {} file at path: {}'.format(name, path)
+            raise
+
+    def get_metadata_lines(self, name: str) -> Iterator[str]:
+        return yield_lines(self.get_metadata(name))
+
+    def resource_isdir(self, resource_name: str):
+        return self._isdir(self._fn(self.module_path, resource_name))
+
+    def metadata_isdir(self, name: str) -> bool:
+        return bool(self.egg_info and self._isdir(self._fn(self.egg_info, name)))
+
+    def resource_listdir(self, resource_name: str):
+        return self._listdir(self._fn(self.module_path, resource_name))
+
+    def metadata_listdir(self, name: str) -> list[str]:
+        if self.egg_info:
+            return self._listdir(self._fn(self.egg_info, name))
+        return []
+
+    def run_script(self, script_name: str, namespace: dict[str, Any]):
+        script = 'scripts/' + script_name
+        if not self.has_metadata(script):
+            raise ResolutionError(
+                "Script {script!r} not found in metadata at {self.egg_info!r}".format(
+                    **locals()
+                ),
+            )
+
+        script_text = self.get_metadata(script).replace('\r\n', '\n')
+        script_text = script_text.replace('\r', '\n')
+        script_filename = self._fn(self.egg_info, script)
+        namespace['__file__'] = script_filename
+        if os.path.exists(script_filename):
+            source = _read_utf8_with_fallback(script_filename)
+            code = compile(source, script_filename, 'exec')
+            exec(code, namespace, namespace)
+        else:
+            from linecache import cache
+
+            cache[script_filename] = (
+                len(script_text),
+                0,
+                script_text.split('\n'),
+                script_filename,
+            )
+            script_code = compile(script_text, script_filename, 'exec')
+            exec(script_code, namespace, namespace)
+
+    def _has(self, path) -> bool:
+        raise NotImplementedError(
+            "Can't perform this operation for unregistered loader type"
+        )
+
+    def _isdir(self, path) -> bool:
+        raise NotImplementedError(
+            "Can't perform this operation for unregistered loader type"
+        )
+
+    def _listdir(self, path) -> list[str]:
+        raise NotImplementedError(
+            "Can't perform this operation for unregistered loader type"
+        )
+
+    def _fn(self, base: str | None, resource_name: str):
+        if base is None:
+            raise TypeError(
+                "`base` parameter in `_fn` is `None`. Either override this method or check the parameter first."
+            )
+        self._validate_resource_path(resource_name)
+        if resource_name:
+            return os.path.join(base, *resource_name.split('/'))
+        return base
+
+    @staticmethod
+    def _validate_resource_path(path):
+        """
+        Validate the resource paths according to the docs.
+        https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access
+
+        >>> warned = getfixture('recwarn')
+        >>> warnings.simplefilter('always')
+        >>> vrp = NullProvider._validate_resource_path
+        >>> vrp('foo/bar.txt')
+        >>> bool(warned)
+        False
+        >>> vrp('../foo/bar.txt')
+        >>> bool(warned)
+        True
+        >>> warned.clear()
+        >>> vrp('/foo/bar.txt')
+        >>> bool(warned)
+        True
+        >>> vrp('foo/../../bar.txt')
+        >>> bool(warned)
+        True
+        >>> warned.clear()
+        >>> vrp('foo/f../bar.txt')
+        >>> bool(warned)
+        False
+
+        Windows path separators are straight-up disallowed.
+        >>> vrp(r'\\foo/bar.txt')
+        Traceback (most recent call last):
+        ...
+        ValueError: Use of .. or absolute path in a resource path \
+is not allowed.
+
+        >>> vrp(r'C:\\foo/bar.txt')
+        Traceback (most recent call last):
+        ...
+        ValueError: Use of .. or absolute path in a resource path \
+is not allowed.
+
+        Blank values are allowed
+
+        >>> vrp('')
+        >>> bool(warned)
+        False
+
+        Non-string values are not.
+
+        >>> vrp(None)
+        Traceback (most recent call last):
+        ...
+        AttributeError: ...
+        """
+        invalid = (
+            os.path.pardir in path.split(posixpath.sep)
+            or posixpath.isabs(path)
+            or ntpath.isabs(path)
+            or path.startswith("\\")
+        )
+        if not invalid:
+            return
+
+        msg = "Use of .. or absolute path in a resource path is not allowed."
+
+        # Aggressively disallow Windows absolute paths
+        if (path.startswith("\\") or ntpath.isabs(path)) and not posixpath.isabs(path):
+            raise ValueError(msg)
+
+        # for compatibility, warn; in future
+        # raise ValueError(msg)
+        issue_warning(
+            msg[:-1] + " and will raise exceptions in a future release.",
+            DeprecationWarning,
+        )
+
+    def _get(self, path) -> bytes:
+        if hasattr(self.loader, 'get_data') and self.loader:
+            # Already checked get_data exists
+            return self.loader.get_data(path)  # type: ignore[attr-defined]
+        raise NotImplementedError(
+            "Can't perform this operation for loaders without 'get_data()'"
+        )
+
+
+register_loader_type(object, NullProvider)
+
+
+def _parents(path):
+    """
+    yield all parents of path including path
+    """
+    last = None
+    while path != last:
+        yield path
+        last = path
+        path, _ = os.path.split(path)
+
+
+class EggProvider(NullProvider):
+    """Provider based on a virtual filesystem"""
+
+    def __init__(self, module: _ModuleLike):
+        super().__init__(module)
+        self._setup_prefix()
+
+    def _setup_prefix(self):
+        # Assume that metadata may be nested inside a "basket"
+        # of multiple eggs and use module_path instead of .archive.
+        eggs = filter(_is_egg_path, _parents(self.module_path))
+        egg = next(eggs, None)
+        egg and self._set_egg(egg)
+
+    def _set_egg(self, path: str):
+        self.egg_name = os.path.basename(path)
+        self.egg_info = os.path.join(path, 'EGG-INFO')
+        self.egg_root = path
+
+
+class DefaultProvider(EggProvider):
+    """Provides access to package resources in the filesystem"""
+
+    def _has(self, path) -> bool:
+        return os.path.exists(path)
+
+    def _isdir(self, path) -> bool:
+        return os.path.isdir(path)
+
+    def _listdir(self, path):
+        return os.listdir(path)
+
+    def get_resource_stream(self, manager: object, resource_name: str):
+        return open(self._fn(self.module_path, resource_name), 'rb')
+
+    def _get(self, path) -> bytes:
+        with open(path, 'rb') as stream:
+            return stream.read()
+
+    @classmethod
+    def _register(cls):
+        loader_names = (
+            'SourceFileLoader',
+            'SourcelessFileLoader',
+        )
+        for name in loader_names:
+            loader_cls = getattr(importlib.machinery, name, type(None))
+            register_loader_type(loader_cls, cls)
+
+
+DefaultProvider._register()
+
+
+class EmptyProvider(NullProvider):
+    """Provider that returns nothing for all requests"""
+
+    # A special case, we don't want all Providers inheriting from NullProvider to have a potentially None module_path
+    module_path: str | None = None  # type: ignore[assignment]
+
+    _isdir = _has = lambda self, path: False
+
+    def _get(self, path) -> bytes:
+        return b''
+
+    def _listdir(self, path):
+        return []
+
+    def __init__(self):
+        pass
+
+
+empty_provider = EmptyProvider()
+
+
+class ZipManifests(Dict[str, "MemoizedZipManifests.manifest_mod"]):
+    """
+    zip manifest builder
+    """
+
+    # `path` could be `StrPath | IO[bytes]` but that violates the LSP for `MemoizedZipManifests.load`
+    @classmethod
+    def build(cls, path: str):
+        """
+        Build a dictionary similar to the zipimport directory
+        caches, except instead of tuples, store ZipInfo objects.
+
+        Use a platform-specific path separator (os.sep) for the path keys
+        for compatibility with pypy on Windows.
+        """
+        with zipfile.ZipFile(path) as zfile:
+            items = (
+                (
+                    name.replace('/', os.sep),
+                    zfile.getinfo(name),
+                )
+                for name in zfile.namelist()
+            )
+            return dict(items)
+
+    load = build
+
+
+class MemoizedZipManifests(ZipManifests):
+    """
+    Memoized zipfile manifests.
+    """
+
+    class manifest_mod(NamedTuple):
+        manifest: dict[str, zipfile.ZipInfo]
+        mtime: float
+
+    def load(self, path: str) -> dict[str, zipfile.ZipInfo]:  # type: ignore[override] # ZipManifests.load is a classmethod
+        """
+        Load a manifest at path or return a suitable manifest already loaded.
+        """
+        path = os.path.normpath(path)
+        mtime = os.stat(path).st_mtime
+
+        if path not in self or self[path].mtime != mtime:
+            manifest = self.build(path)
+            self[path] = self.manifest_mod(manifest, mtime)
+
+        return self[path].manifest
+
+
+class ZipProvider(EggProvider):
+    """Resource support for zips and eggs"""
+
+    eagers: list[str] | None = None
+    _zip_manifests = MemoizedZipManifests()
+    # ZipProvider's loader should always be a zipimporter or equivalent
+    loader: zipimport.zipimporter
+
+    def __init__(self, module: _ZipLoaderModule):
+        super().__init__(module)
+        self.zip_pre = self.loader.archive + os.sep
+
+    def _zipinfo_name(self, fspath):
+        # Convert a virtual filename (full path to file) into a zipfile subpath
+        # usable with the zipimport directory cache for our target archive
+        fspath = fspath.rstrip(os.sep)
+        if fspath == self.loader.archive:
+            return ''
+        if fspath.startswith(self.zip_pre):
+            return fspath[len(self.zip_pre) :]
+        raise AssertionError("%s is not a subpath of %s" % (fspath, self.zip_pre))
+
+    def _parts(self, zip_path):
+        # Convert a zipfile subpath into an egg-relative path part list.
+        # pseudo-fs path
+        fspath = self.zip_pre + zip_path
+        if fspath.startswith(self.egg_root + os.sep):
+            return fspath[len(self.egg_root) + 1 :].split(os.sep)
+        raise AssertionError("%s is not a subpath of %s" % (fspath, self.egg_root))
+
+    @property
+    def zipinfo(self):
+        return self._zip_manifests.load(self.loader.archive)
+
+    def get_resource_filename(self, manager: ResourceManager, resource_name: str):
+        if not self.egg_name:
+            raise NotImplementedError(
+                "resource_filename() only supported for .egg, not .zip"
+            )
+        # no need to lock for extraction, since we use temp names
+        zip_path = self._resource_to_zip(resource_name)
+        eagers = self._get_eager_resources()
+        if '/'.join(self._parts(zip_path)) in eagers:
+            for name in eagers:
+                self._extract_resource(manager, self._eager_to_zip(name))
+        return self._extract_resource(manager, zip_path)
+
+    @staticmethod
+    def _get_date_and_size(zip_stat):
+        size = zip_stat.file_size
+        # ymdhms+wday, yday, dst
+        date_time = zip_stat.date_time + (0, 0, -1)
+        # 1980 offset already done
+        timestamp = time.mktime(date_time)
+        return timestamp, size
+
+    # FIXME: 'ZipProvider._extract_resource' is too complex (12)
+    def _extract_resource(self, manager: ResourceManager, zip_path) -> str:  # noqa: C901
+        if zip_path in self._index():
+            for name in self._index()[zip_path]:
+                last = self._extract_resource(manager, os.path.join(zip_path, name))
+            # return the extracted directory name
+            return os.path.dirname(last)
+
+        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
+
+        if not WRITE_SUPPORT:
+            raise OSError(
+                '"os.rename" and "os.unlink" are not supported on this platform'
+            )
+        try:
+            if not self.egg_name:
+                raise OSError(
+                    '"egg_name" is empty. This likely means no egg could be found from the "module_path".'
+                )
+            real_path = manager.get_cache_path(self.egg_name, self._parts(zip_path))
+
+            if self._is_current(real_path, zip_path):
+                return real_path
+
+            outf, tmpnam = _mkstemp(
+                ".$extract",
+                dir=os.path.dirname(real_path),
+            )
+            os.write(outf, self.loader.get_data(zip_path))
+            os.close(outf)
+            utime(tmpnam, (timestamp, timestamp))
+            manager.postprocess(tmpnam, real_path)
+
+            try:
+                rename(tmpnam, real_path)
+
+            except OSError:
+                if os.path.isfile(real_path):
+                    if self._is_current(real_path, zip_path):
+                        # the file became current since it was checked above,
+                        #  so proceed.
+                        return real_path
+                    # Windows, del old file and retry
+                    elif os.name == 'nt':
+                        unlink(real_path)
+                        rename(tmpnam, real_path)
+                        return real_path
+                raise
+
+        except OSError:
+            # report a user-friendly error
+            manager.extraction_error()
+
+        return real_path
+
+    def _is_current(self, file_path, zip_path):
+        """
+        Return True if the file_path is current for this zip_path
+        """
+        timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
+        if not os.path.isfile(file_path):
+            return False
+        stat = os.stat(file_path)
+        if stat.st_size != size or stat.st_mtime != timestamp:
+            return False
+        # check that the contents match
+        zip_contents = self.loader.get_data(zip_path)
+        with open(file_path, 'rb') as f:
+            file_contents = f.read()
+        return zip_contents == file_contents
+
+    def _get_eager_resources(self):
+        if self.eagers is None:
+            eagers = []
+            for name in ('native_libs.txt', 'eager_resources.txt'):
+                if self.has_metadata(name):
+                    eagers.extend(self.get_metadata_lines(name))
+            self.eagers = eagers
+        return self.eagers
+
+    def _index(self):
+        try:
+            return self._dirindex
+        except AttributeError:
+            ind = {}
+            for path in self.zipinfo:
+                parts = path.split(os.sep)
+                while parts:
+                    parent = os.sep.join(parts[:-1])
+                    if parent in ind:
+                        ind[parent].append(parts[-1])
+                        break
+                    else:
+                        ind[parent] = [parts.pop()]
+            self._dirindex = ind
+            return ind
+
+    def _has(self, fspath) -> bool:
+        zip_path = self._zipinfo_name(fspath)
+        return zip_path in self.zipinfo or zip_path in self._index()
+
+    def _isdir(self, fspath) -> bool:
+        return self._zipinfo_name(fspath) in self._index()
+
+    def _listdir(self, fspath):
+        return list(self._index().get(self._zipinfo_name(fspath), ()))
+
+    def _eager_to_zip(self, resource_name: str):
+        return self._zipinfo_name(self._fn(self.egg_root, resource_name))
+
+    def _resource_to_zip(self, resource_name: str):
+        return self._zipinfo_name(self._fn(self.module_path, resource_name))
+
+
+register_loader_type(zipimport.zipimporter, ZipProvider)
+
+
+class FileMetadata(EmptyProvider):
+    """Metadata handler for standalone PKG-INFO files
+
+    Usage::
+
+        metadata = FileMetadata("/path/to/PKG-INFO")
+
+    This provider rejects all data and metadata requests except for PKG-INFO,
+    which is treated as existing, and will be the contents of the file at
+    the provided location.
+    """
+
+    def __init__(self, path: StrPath):
+        self.path = path
+
+    def _get_metadata_path(self, name):
+        return self.path
+
+    def has_metadata(self, name: str) -> bool:
+        return name == 'PKG-INFO' and os.path.isfile(self.path)
+
+    def get_metadata(self, name: str):
+        if name != 'PKG-INFO':
+            raise KeyError("No metadata except PKG-INFO is available")
+
+        with open(self.path, encoding='utf-8', errors="replace") as f:
+            metadata = f.read()
+        self._warn_on_replacement(metadata)
+        return metadata
+
+    def _warn_on_replacement(self, metadata):
+        replacement_char = '�'
+        if replacement_char in metadata:
+            tmpl = "{self.path} could not be properly decoded in UTF-8"
+            msg = tmpl.format(**locals())
+            warnings.warn(msg)
+
+    def get_metadata_lines(self, name: str) -> Iterator[str]:
+        return yield_lines(self.get_metadata(name))
+
+
+class PathMetadata(DefaultProvider):
+    """Metadata provider for egg directories
+
+    Usage::
+
+        # Development eggs:
+
+        egg_info = "/path/to/PackageName.egg-info"
+        base_dir = os.path.dirname(egg_info)
+        metadata = PathMetadata(base_dir, egg_info)
+        dist_name = os.path.splitext(os.path.basename(egg_info))[0]
+        dist = Distribution(basedir, project_name=dist_name, metadata=metadata)
+
+        # Unpacked egg directories:
+
+        egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
+        metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
+        dist = Distribution.from_filename(egg_path, metadata=metadata)
+    """
+
+    def __init__(self, path: str, egg_info: str):
+        self.module_path = path
+        self.egg_info = egg_info
+
+
+class EggMetadata(ZipProvider):
+    """Metadata provider for .egg files"""
+
+    def __init__(self, importer: zipimport.zipimporter):
+        """Create a metadata provider from a zipimporter"""
+
+        self.zip_pre = importer.archive + os.sep
+        self.loader = importer
+        if importer.prefix:
+            self.module_path = os.path.join(importer.archive, importer.prefix)
+        else:
+            self.module_path = importer.archive
+        self._setup_prefix()
+
+
+_distribution_finders: dict[type, _DistFinderType[Any]] = _declare_state(
+    'dict', '_distribution_finders', {}
+)
+
+
+def register_finder(importer_type: type[_T], distribution_finder: _DistFinderType[_T]):
+    """Register `distribution_finder` to find distributions in sys.path items
+
+    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
+    handler), and `distribution_finder` is a callable that, passed a path
+    item and the importer instance, yields ``Distribution`` instances found on
+    that path item.  See ``pkg_resources.find_on_path`` for an example."""
+    _distribution_finders[importer_type] = distribution_finder
+
+
+def find_distributions(path_item: str, only: bool = False):
+    """Yield distributions accessible via `path_item`"""
+    importer = get_importer(path_item)
+    finder = _find_adapter(_distribution_finders, importer)
+    return finder(importer, path_item, only)
+
+
+def find_eggs_in_zip(
+    importer: zipimport.zipimporter, path_item: str, only: bool = False
+) -> Iterator[Distribution]:
+    """
+    Find eggs in zip files; possibly multiple nested eggs.
+    """
+    if importer.archive.endswith('.whl'):
+        # wheels are not supported with this finder
+        # they don't have PKG-INFO metadata, and won't ever contain eggs
+        return
+    metadata = EggMetadata(importer)
+    if metadata.has_metadata('PKG-INFO'):
+        yield Distribution.from_filename(path_item, metadata=metadata)
+    if only:
+        # don't yield nested distros
+        return
+    for subitem in metadata.resource_listdir(''):
+        if _is_egg_path(subitem):
+            subpath = os.path.join(path_item, subitem)
+            dists = find_eggs_in_zip(zipimport.zipimporter(subpath), subpath)
+            yield from dists
+        elif subitem.lower().endswith(('.dist-info', '.egg-info')):
+            subpath = os.path.join(path_item, subitem)
+            submeta = EggMetadata(zipimport.zipimporter(subpath))
+            submeta.egg_info = subpath
+            yield Distribution.from_location(path_item, subitem, submeta)
+
+
+register_finder(zipimport.zipimporter, find_eggs_in_zip)
+
+
+def find_nothing(
+    importer: object | None, path_item: str | None, only: bool | None = False
+):
+    return ()
+
+
+register_finder(object, find_nothing)
+
+
+def find_on_path(importer: object | None, path_item, only=False):
+    """Yield distributions accessible on a sys.path directory"""
+    path_item = _normalize_cached(path_item)
+
+    if _is_unpacked_egg(path_item):
+        yield Distribution.from_filename(
+            path_item,
+            metadata=PathMetadata(path_item, os.path.join(path_item, 'EGG-INFO')),
+        )
+        return
+
+    entries = (os.path.join(path_item, child) for child in safe_listdir(path_item))
+
+    # scan for .egg and .egg-info in directory
+    for entry in sorted(entries):
+        fullpath = os.path.join(path_item, entry)
+        factory = dist_factory(path_item, entry, only)
+        yield from factory(fullpath)
+
+
+def dist_factory(path_item, entry, only):
+    """Return a dist_factory for the given entry."""
+    lower = entry.lower()
+    is_egg_info = lower.endswith('.egg-info')
+    is_dist_info = lower.endswith('.dist-info') and os.path.isdir(
+        os.path.join(path_item, entry)
+    )
+    is_meta = is_egg_info or is_dist_info
+    return (
+        distributions_from_metadata
+        if is_meta
+        else find_distributions
+        if not only and _is_egg_path(entry)
+        else resolve_egg_link
+        if not only and lower.endswith('.egg-link')
+        else NoDists()
+    )
+
+
+class NoDists:
+    """
+    >>> bool(NoDists())
+    False
+
+    >>> list(NoDists()('anything'))
+    []
+    """
+
+    def __bool__(self):
+        return False
+
+    def __call__(self, fullpath):
+        return iter(())
+
+
+def safe_listdir(path: StrOrBytesPath):
+    """
+    Attempt to list contents of path, but suppress some exceptions.
+    """
+    try:
+        return os.listdir(path)
+    except (PermissionError, NotADirectoryError):
+        pass
+    except OSError as e:
+        # Ignore the directory if does not exist, not a directory or
+        # permission denied
+        if e.errno not in (errno.ENOTDIR, errno.EACCES, errno.ENOENT):
+            raise
+    return ()
+
+
+def distributions_from_metadata(path: str):
+    root = os.path.dirname(path)
+    if os.path.isdir(path):
+        if len(os.listdir(path)) == 0:
+            # empty metadata dir; skip
+            return
+        metadata: _MetadataType = PathMetadata(root, path)
+    else:
+        metadata = FileMetadata(path)
+    entry = os.path.basename(path)
+    yield Distribution.from_location(
+        root,
+        entry,
+        metadata,
+        precedence=DEVELOP_DIST,
+    )
+
+
+def non_empty_lines(path):
+    """
+    Yield non-empty lines from file at path
+    """
+    for line in _read_utf8_with_fallback(path).splitlines():
+        line = line.strip()
+        if line:
+            yield line
+
+
+def resolve_egg_link(path):
+    """
+    Given a path to an .egg-link, resolve distributions
+    present in the referenced path.
+    """
+    referenced_paths = non_empty_lines(path)
+    resolved_paths = (
+        os.path.join(os.path.dirname(path), ref) for ref in referenced_paths
+    )
+    dist_groups = map(find_distributions, resolved_paths)
+    return next(dist_groups, ())
+
+
+if hasattr(pkgutil, 'ImpImporter'):
+    register_finder(pkgutil.ImpImporter, find_on_path)
+
+register_finder(importlib.machinery.FileFinder, find_on_path)
+
+_namespace_handlers: dict[type, _NSHandlerType[Any]] = _declare_state(
+    'dict', '_namespace_handlers', {}
+)
+_namespace_packages: dict[str | None, list[str]] = _declare_state(
+    'dict', '_namespace_packages', {}
+)
+
+
+def register_namespace_handler(
+    importer_type: type[_T], namespace_handler: _NSHandlerType[_T]
+):
+    """Register `namespace_handler` to declare namespace packages
+
+    `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
+    handler), and `namespace_handler` is a callable like this::
+
+        def namespace_handler(importer, path_entry, moduleName, module):
+            # return a path_entry to use for child packages
+
+    Namespace handlers are only called if the importer object has already
+    agreed that it can handle the relevant path item, and they should only
+    return a subpath if the module __path__ does not already contain an
+    equivalent subpath.  For an example namespace handler, see
+    ``pkg_resources.file_ns_handler``.
+    """
+    _namespace_handlers[importer_type] = namespace_handler
+
+
+def _handle_ns(packageName, path_item):
+    """Ensure that named package includes a subpath of path_item (if needed)"""
+
+    importer = get_importer(path_item)
+    if importer is None:
+        return None
+
+    # use find_spec (PEP 451) and fall-back to find_module (PEP 302)
+    try:
+        spec = importer.find_spec(packageName)
+    except AttributeError:
+        # capture warnings due to #1111
+        with warnings.catch_warnings():
+            warnings.simplefilter("ignore")
+            loader = importer.find_module(packageName)
+    else:
+        loader = spec.loader if spec else None
+
+    if loader is None:
+        return None
+    module = sys.modules.get(packageName)
+    if module is None:
+        module = sys.modules[packageName] = types.ModuleType(packageName)
+        module.__path__ = []
+        _set_parent_ns(packageName)
+    elif not hasattr(module, '__path__'):
+        raise TypeError("Not a package:", packageName)
+    handler = _find_adapter(_namespace_handlers, importer)
+    subpath = handler(importer, path_item, packageName, module)
+    if subpath is not None:
+        path = module.__path__
+        path.append(subpath)
+        importlib.import_module(packageName)
+        _rebuild_mod_path(path, packageName, module)
+    return subpath
+
+
+def _rebuild_mod_path(orig_path, package_name, module: types.ModuleType):
+    """
+    Rebuild module.__path__ ensuring that all entries are ordered
+    corresponding to their sys.path order
+    """
+    sys_path = [_normalize_cached(p) for p in sys.path]
+
+    def safe_sys_path_index(entry):
+        """
+        Workaround for #520 and #513.
+        """
+        try:
+            return sys_path.index(entry)
+        except ValueError:
+            return float('inf')
+
+    def position_in_sys_path(path):
+        """
+        Return the ordinal of the path based on its position in sys.path
+        """
+        path_parts = path.split(os.sep)
+        module_parts = package_name.count('.') + 1
+        parts = path_parts[:-module_parts]
+        return safe_sys_path_index(_normalize_cached(os.sep.join(parts)))
+
+    new_path = sorted(orig_path, key=position_in_sys_path)
+    new_path = [_normalize_cached(p) for p in new_path]
+
+    if isinstance(module.__path__, list):
+        module.__path__[:] = new_path
+    else:
+        module.__path__ = new_path
+
+
+def declare_namespace(packageName: str):
+    """Declare that package 'packageName' is a namespace package"""
+
+    msg = (
+        f"Deprecated call to `pkg_resources.declare_namespace({packageName!r})`.\n"
+        "Implementing implicit namespace packages (as specified in PEP 420) "
+        "is preferred to `pkg_resources.declare_namespace`. "
+        "See https://setuptools.pypa.io/en/latest/references/"
+        "keywords.html#keyword-namespace-packages"
+    )
+    warnings.warn(msg, DeprecationWarning, stacklevel=2)
+
+    _imp.acquire_lock()
+    try:
+        if packageName in _namespace_packages:
+            return
+
+        path: MutableSequence[str] = sys.path
+        parent, _, _ = packageName.rpartition('.')
+
+        if parent:
+            declare_namespace(parent)
+            if parent not in _namespace_packages:
+                __import__(parent)
+            try:
+                path = sys.modules[parent].__path__
+            except AttributeError as e:
+                raise TypeError("Not a package:", parent) from e
+
+        # Track what packages are namespaces, so when new path items are added,
+        # they can be updated
+        _namespace_packages.setdefault(parent or None, []).append(packageName)
+        _namespace_packages.setdefault(packageName, [])
+
+        for path_item in path:
+            # Ensure all the parent's path items are reflected in the child,
+            # if they apply
+            _handle_ns(packageName, path_item)
+
+    finally:
+        _imp.release_lock()
+
+
+def fixup_namespace_packages(path_item: str, parent: str | None = None):
+    """Ensure that previously-declared namespace packages include path_item"""
+    _imp.acquire_lock()
+    try:
+        for package in _namespace_packages.get(parent, ()):
+            subpath = _handle_ns(package, path_item)
+            if subpath:
+                fixup_namespace_packages(subpath, package)
+    finally:
+        _imp.release_lock()
+
+
+def file_ns_handler(
+    importer: object,
+    path_item: StrPath,
+    packageName: str,
+    module: types.ModuleType,
+):
+    """Compute an ns-package subpath for a filesystem or zipfile importer"""
+
+    subpath = os.path.join(path_item, packageName.split('.')[-1])
+    normalized = _normalize_cached(subpath)
+    for item in module.__path__:
+        if _normalize_cached(item) == normalized:
+            break
+    else:
+        # Only return the path if it's not already there
+        return subpath
+
+
+if hasattr(pkgutil, 'ImpImporter'):
+    register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)
+
+register_namespace_handler(zipimport.zipimporter, file_ns_handler)
+register_namespace_handler(importlib.machinery.FileFinder, file_ns_handler)
+
+
+def null_ns_handler(
+    importer: object,
+    path_item: str | None,
+    packageName: str | None,
+    module: _ModuleLike | None,
+):
+    return None
+
+
+register_namespace_handler(object, null_ns_handler)
+
+
+@overload
+def normalize_path(filename: StrPath) -> str: ...
+@overload
+def normalize_path(filename: BytesPath) -> bytes: ...
+def normalize_path(filename: StrOrBytesPath):
+    """Normalize a file/dir name for comparison purposes"""
+    return os.path.normcase(os.path.realpath(os.path.normpath(_cygwin_patch(filename))))
+
+
+def _cygwin_patch(filename: StrOrBytesPath):  # pragma: nocover
+    """
+    Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
+    symlink components. Using
+    os.path.abspath() works around this limitation. A fix in os.getcwd()
+    would probably better, in Cygwin even more so, except
+    that this seems to be by design...
+    """
+    return os.path.abspath(filename) if sys.platform == 'cygwin' else filename
+
+
+if TYPE_CHECKING:
+    # https://github.com/python/mypy/issues/16261
+    # https://github.com/python/typeshed/issues/6347
+    @overload
+    def _normalize_cached(filename: StrPath) -> str: ...
+    @overload
+    def _normalize_cached(filename: BytesPath) -> bytes: ...
+    def _normalize_cached(filename: StrOrBytesPath) -> str | bytes: ...
+else:
+
+    @functools.lru_cache(maxsize=None)
+    def _normalize_cached(filename):
+        return normalize_path(filename)
+
+
+def _is_egg_path(path):
+    """
+    Determine if given path appears to be an egg.
+    """
+    return _is_zip_egg(path) or _is_unpacked_egg(path)
+
+
+def _is_zip_egg(path):
+    return (
+        path.lower().endswith('.egg')
+        and os.path.isfile(path)
+        and zipfile.is_zipfile(path)
+    )
+
+
+def _is_unpacked_egg(path):
+    """
+    Determine if given path appears to be an unpacked egg.
+    """
+    return path.lower().endswith('.egg') and os.path.isfile(
+        os.path.join(path, 'EGG-INFO', 'PKG-INFO')
+    )
+
+
+def _set_parent_ns(packageName):
+    parts = packageName.split('.')
+    name = parts.pop()
+    if parts:
+        parent = '.'.join(parts)
+        setattr(sys.modules[parent], name, sys.modules[packageName])
+
+
+MODULE = re.compile(r"\w+(\.\w+)*$").match
+EGG_NAME = re.compile(
+    r"""
+    (?P[^-]+) (
+        -(?P[^-]+) (
+            -py(?P[^-]+) (
+                -(?P.+)
+            )?
+        )?
+    )?
+    """,
+    re.VERBOSE | re.IGNORECASE,
+).match
+
+
+class EntryPoint:
+    """Object representing an advertised importable object"""
+
+    def __init__(
+        self,
+        name: str,
+        module_name: str,
+        attrs: Iterable[str] = (),
+        extras: Iterable[str] = (),
+        dist: Distribution | None = None,
+    ):
+        if not MODULE(module_name):
+            raise ValueError("Invalid module name", module_name)
+        self.name = name
+        self.module_name = module_name
+        self.attrs = tuple(attrs)
+        self.extras = tuple(extras)
+        self.dist = dist
+
+    def __str__(self):
+        s = "%s = %s" % (self.name, self.module_name)
+        if self.attrs:
+            s += ':' + '.'.join(self.attrs)
+        if self.extras:
+            s += ' [%s]' % ','.join(self.extras)
+        return s
+
+    def __repr__(self):
+        return "EntryPoint.parse(%r)" % str(self)
+
+    @overload
+    def load(
+        self,
+        require: Literal[True] = True,
+        env: Environment | None = None,
+        installer: _InstallerType | None = None,
+    ) -> _ResolvedEntryPoint: ...
+    @overload
+    def load(
+        self,
+        require: Literal[False],
+        *args: Any,
+        **kwargs: Any,
+    ) -> _ResolvedEntryPoint: ...
+    def load(
+        self,
+        require: bool = True,
+        *args: Environment | _InstallerType | None,
+        **kwargs: Environment | _InstallerType | None,
+    ) -> _ResolvedEntryPoint:
+        """
+        Require packages for this EntryPoint, then resolve it.
+        """
+        if not require or args or kwargs:
+            warnings.warn(
+                "Parameters to load are deprecated.  Call .resolve and "
+                ".require separately.",
+                PkgResourcesDeprecationWarning,
+                stacklevel=2,
+            )
+        if require:
+            # We could pass `env` and `installer` directly,
+            # but keeping `*args` and `**kwargs` for backwards compatibility
+            self.require(*args, **kwargs)  # type: ignore
+        return self.resolve()
+
+    def resolve(self) -> _ResolvedEntryPoint:
+        """
+        Resolve the entry point from its module and attrs.
+        """
+        module = __import__(self.module_name, fromlist=['__name__'], level=0)
+        try:
+            return functools.reduce(getattr, self.attrs, module)
+        except AttributeError as exc:
+            raise ImportError(str(exc)) from exc
+
+    def require(
+        self,
+        env: Environment | None = None,
+        installer: _InstallerType | None = None,
+    ):
+        if not self.dist:
+            error_cls = UnknownExtra if self.extras else AttributeError
+            raise error_cls("Can't require() without a distribution", self)
+
+        # Get the requirements for this entry point with all its extras and
+        # then resolve them. We have to pass `extras` along when resolving so
+        # that the working set knows what extras we want. Otherwise, for
+        # dist-info distributions, the working set will assume that the
+        # requirements for that extra are purely optional and skip over them.
+        reqs = self.dist.requires(self.extras)
+        items = working_set.resolve(reqs, env, installer, extras=self.extras)
+        list(map(working_set.add, items))
+
+    pattern = re.compile(
+        r'\s*'
+        r'(?P.+?)\s*'
+        r'=\s*'
+        r'(?P[\w.]+)\s*'
+        r'(:\s*(?P[\w.]+))?\s*'
+        r'(?P\[.*\])?\s*$'
+    )
+
+    @classmethod
+    def parse(cls, src: str, dist: Distribution | None = None):
+        """Parse a single entry point from string `src`
+
+        Entry point syntax follows the form::
+
+            name = some.module:some.attr [extra1, extra2]
+
+        The entry name and module name are required, but the ``:attrs`` and
+        ``[extras]`` parts are optional
+        """
+        m = cls.pattern.match(src)
+        if not m:
+            msg = "EntryPoint must be in 'name=module:attrs [extras]' format"
+            raise ValueError(msg, src)
+        res = m.groupdict()
+        extras = cls._parse_extras(res['extras'])
+        attrs = res['attr'].split('.') if res['attr'] else ()
+        return cls(res['name'], res['module'], attrs, extras, dist)
+
+    @classmethod
+    def _parse_extras(cls, extras_spec):
+        if not extras_spec:
+            return ()
+        req = Requirement.parse('x' + extras_spec)
+        if req.specs:
+            raise ValueError
+        return req.extras
+
+    @classmethod
+    def parse_group(
+        cls,
+        group: str,
+        lines: _NestedStr,
+        dist: Distribution | None = None,
+    ):
+        """Parse an entry point group"""
+        if not MODULE(group):
+            raise ValueError("Invalid group name", group)
+        this: dict[str, Self] = {}
+        for line in yield_lines(lines):
+            ep = cls.parse(line, dist)
+            if ep.name in this:
+                raise ValueError("Duplicate entry point", group, ep.name)
+            this[ep.name] = ep
+        return this
+
+    @classmethod
+    def parse_map(
+        cls,
+        data: str | Iterable[str] | dict[str, str | Iterable[str]],
+        dist: Distribution | None = None,
+    ):
+        """Parse a map of entry point groups"""
+        _data: Iterable[tuple[str | None, str | Iterable[str]]]
+        if isinstance(data, dict):
+            _data = data.items()
+        else:
+            _data = split_sections(data)
+        maps: dict[str, dict[str, Self]] = {}
+        for group, lines in _data:
+            if group is None:
+                if not lines:
+                    continue
+                raise ValueError("Entry points must be listed in groups")
+            group = group.strip()
+            if group in maps:
+                raise ValueError("Duplicate group name", group)
+            maps[group] = cls.parse_group(group, lines, dist)
+        return maps
+
+
+def _version_from_file(lines):
+    """
+    Given an iterable of lines from a Metadata file, return
+    the value of the Version field, if present, or None otherwise.
+    """
+
+    def is_version_line(line):
+        return line.lower().startswith('version:')
+
+    version_lines = filter(is_version_line, lines)
+    line = next(iter(version_lines), '')
+    _, _, value = line.partition(':')
+    return safe_version(value.strip()) or None
+
+
+class Distribution:
+    """Wrap an actual or potential sys.path entry w/metadata"""
+
+    PKG_INFO = 'PKG-INFO'
+
+    def __init__(
+        self,
+        location: str | None = None,
+        metadata: _MetadataType = None,
+        project_name: str | None = None,
+        version: str | None = None,
+        py_version: str | None = PY_MAJOR,
+        platform: str | None = None,
+        precedence: int = EGG_DIST,
+    ):
+        self.project_name = safe_name(project_name or 'Unknown')
+        if version is not None:
+            self._version = safe_version(version)
+        self.py_version = py_version
+        self.platform = platform
+        self.location = location
+        self.precedence = precedence
+        self._provider = metadata or empty_provider
+
+    @classmethod
+    def from_location(
+        cls,
+        location: str,
+        basename: StrPath,
+        metadata: _MetadataType = None,
+        **kw: int,  # We could set `precedence` explicitly, but keeping this as `**kw` for full backwards and subclassing compatibility
+    ) -> Distribution:
+        project_name, version, py_version, platform = [None] * 4
+        basename, ext = os.path.splitext(basename)
+        if ext.lower() in _distributionImpl:
+            cls = _distributionImpl[ext.lower()]
+
+            match = EGG_NAME(basename)
+            if match:
+                project_name, version, py_version, platform = match.group(
+                    'name', 'ver', 'pyver', 'plat'
+                )
+        return cls(
+            location,
+            metadata,
+            project_name=project_name,
+            version=version,
+            py_version=py_version,
+            platform=platform,
+            **kw,
+        )._reload_version()
+
+    def _reload_version(self):
+        return self
+
+    @property
+    def hashcmp(self):
+        return (
+            self._forgiving_parsed_version,
+            self.precedence,
+            self.key,
+            self.location,
+            self.py_version or '',
+            self.platform or '',
+        )
+
+    def __hash__(self):
+        return hash(self.hashcmp)
+
+    def __lt__(self, other: Distribution):
+        return self.hashcmp < other.hashcmp
+
+    def __le__(self, other: Distribution):
+        return self.hashcmp <= other.hashcmp
+
+    def __gt__(self, other: Distribution):
+        return self.hashcmp > other.hashcmp
+
+    def __ge__(self, other: Distribution):
+        return self.hashcmp >= other.hashcmp
+
+    def __eq__(self, other: object):
+        if not isinstance(other, self.__class__):
+            # It's not a Distribution, so they are not equal
+            return False
+        return self.hashcmp == other.hashcmp
+
+    def __ne__(self, other: object):
+        return not self == other
+
+    # These properties have to be lazy so that we don't have to load any
+    # metadata until/unless it's actually needed.  (i.e., some distributions
+    # may not know their name or version without loading PKG-INFO)
+
+    @property
+    def key(self):
+        try:
+            return self._key
+        except AttributeError:
+            self._key = key = self.project_name.lower()
+            return key
+
+    @property
+    def parsed_version(self):
+        if not hasattr(self, "_parsed_version"):
+            try:
+                self._parsed_version = parse_version(self.version)
+            except _packaging_version.InvalidVersion as ex:
+                info = f"(package: {self.project_name})"
+                if hasattr(ex, "add_note"):
+                    ex.add_note(info)  # PEP 678
+                    raise
+                raise _packaging_version.InvalidVersion(f"{str(ex)} {info}") from None
+
+        return self._parsed_version
+
+    @property
+    def _forgiving_parsed_version(self):
+        try:
+            return self.parsed_version
+        except _packaging_version.InvalidVersion as ex:
+            self._parsed_version = parse_version(_forgiving_version(self.version))
+
+            notes = "\n".join(getattr(ex, "__notes__", []))  # PEP 678
+            msg = f"""!!\n\n
+            *************************************************************************
+            {str(ex)}\n{notes}
+
+            This is a long overdue deprecation.
+            For the time being, `pkg_resources` will use `{self._parsed_version}`
+            as a replacement to avoid breaking existing environments,
+            but no future compatibility is guaranteed.
+
+            If you maintain package {self.project_name} you should implement
+            the relevant changes to adequate the project to PEP 440 immediately.
+            *************************************************************************
+            \n\n!!
+            """
+            warnings.warn(msg, DeprecationWarning)
+
+            return self._parsed_version
+
+    @property
+    def version(self):
+        try:
+            return self._version
+        except AttributeError as e:
+            version = self._get_version()
+            if version is None:
+                path = self._get_metadata_path_for_display(self.PKG_INFO)
+                msg = ("Missing 'Version:' header and/or {} file at path: {}").format(
+                    self.PKG_INFO, path
+                )
+                raise ValueError(msg, self) from e
+
+            return version
+
+    @property
+    def _dep_map(self):
+        """
+        A map of extra to its list of (direct) requirements
+        for this distribution, including the null extra.
+        """
+        try:
+            return self.__dep_map
+        except AttributeError:
+            self.__dep_map = self._filter_extras(self._build_dep_map())
+        return self.__dep_map
+
+    @staticmethod
+    def _filter_extras(dm: dict[str | None, list[Requirement]]):
+        """
+        Given a mapping of extras to dependencies, strip off
+        environment markers and filter out any dependencies
+        not matching the markers.
+        """
+        for extra in list(filter(None, dm)):
+            new_extra: str | None = extra
+            reqs = dm.pop(extra)
+            new_extra, _, marker = extra.partition(':')
+            fails_marker = marker and (
+                invalid_marker(marker) or not evaluate_marker(marker)
+            )
+            if fails_marker:
+                reqs = []
+            new_extra = safe_extra(new_extra) or None
+
+            dm.setdefault(new_extra, []).extend(reqs)
+        return dm
+
+    def _build_dep_map(self):
+        dm = {}
+        for name in 'requires.txt', 'depends.txt':
+            for extra, reqs in split_sections(self._get_metadata(name)):
+                dm.setdefault(extra, []).extend(parse_requirements(reqs))
+        return dm
+
+    def requires(self, extras: Iterable[str] = ()):
+        """List of Requirements needed for this distro if `extras` are used"""
+        dm = self._dep_map
+        deps: list[Requirement] = []
+        deps.extend(dm.get(None, ()))
+        for ext in extras:
+            try:
+                deps.extend(dm[safe_extra(ext)])
+            except KeyError as e:
+                raise UnknownExtra(
+                    "%s has no such extra feature %r" % (self, ext)
+                ) from e
+        return deps
+
+    def _get_metadata_path_for_display(self, name):
+        """
+        Return the path to the given metadata file, if available.
+        """
+        try:
+            # We need to access _get_metadata_path() on the provider object
+            # directly rather than through this class's __getattr__()
+            # since _get_metadata_path() is marked private.
+            path = self._provider._get_metadata_path(name)
+
+        # Handle exceptions e.g. in case the distribution's metadata
+        # provider doesn't support _get_metadata_path().
+        except Exception:
+            return '[could not detect]'
+
+        return path
+
+    def _get_metadata(self, name):
+        if self.has_metadata(name):
+            yield from self.get_metadata_lines(name)
+
+    def _get_version(self):
+        lines = self._get_metadata(self.PKG_INFO)
+        return _version_from_file(lines)
+
+    def activate(self, path: list[str] | None = None, replace: bool = False):
+        """Ensure distribution is importable on `path` (default=sys.path)"""
+        if path is None:
+            path = sys.path
+        self.insert_on(path, replace=replace)
+        if path is sys.path and self.location is not None:
+            fixup_namespace_packages(self.location)
+            for pkg in self._get_metadata('namespace_packages.txt'):
+                if pkg in sys.modules:
+                    declare_namespace(pkg)
+
+    def egg_name(self):
+        """Return what this distribution's standard .egg filename should be"""
+        filename = "%s-%s-py%s" % (
+            to_filename(self.project_name),
+            to_filename(self.version),
+            self.py_version or PY_MAJOR,
+        )
+
+        if self.platform:
+            filename += '-' + self.platform
+        return filename
+
+    def __repr__(self):
+        if self.location:
+            return "%s (%s)" % (self, self.location)
+        else:
+            return str(self)
+
+    def __str__(self):
+        try:
+            version = getattr(self, 'version', None)
+        except ValueError:
+            version = None
+        version = version or "[unknown version]"
+        return "%s %s" % (self.project_name, version)
+
+    def __getattr__(self, attr):
+        """Delegate all unrecognized public attributes to .metadata provider"""
+        if attr.startswith('_'):
+            raise AttributeError(attr)
+        return getattr(self._provider, attr)
+
+    def __dir__(self):
+        return list(
+            set(super().__dir__())
+            | set(attr for attr in self._provider.__dir__() if not attr.startswith('_'))
+        )
+
+    @classmethod
+    def from_filename(
+        cls,
+        filename: StrPath,
+        metadata: _MetadataType = None,
+        **kw: int,  # We could set `precedence` explicitly, but keeping this as `**kw` for full backwards and subclassing compatibility
+    ):
+        return cls.from_location(
+            _normalize_cached(filename), os.path.basename(filename), metadata, **kw
+        )
+
+    def as_requirement(self):
+        """Return a ``Requirement`` that matches this distribution exactly"""
+        if isinstance(self.parsed_version, _packaging_version.Version):
+            spec = "%s==%s" % (self.project_name, self.parsed_version)
+        else:
+            spec = "%s===%s" % (self.project_name, self.parsed_version)
+
+        return Requirement.parse(spec)
+
+    def load_entry_point(self, group: str, name: str) -> _ResolvedEntryPoint:
+        """Return the `name` entry point of `group` or raise ImportError"""
+        ep = self.get_entry_info(group, name)
+        if ep is None:
+            raise ImportError("Entry point %r not found" % ((group, name),))
+        return ep.load()
+
+    @overload
+    def get_entry_map(self, group: None = None) -> dict[str, dict[str, EntryPoint]]: ...
+    @overload
+    def get_entry_map(self, group: str) -> dict[str, EntryPoint]: ...
+    def get_entry_map(self, group: str | None = None):
+        """Return the entry point map for `group`, or the full entry map"""
+        if not hasattr(self, "_ep_map"):
+            self._ep_map = EntryPoint.parse_map(
+                self._get_metadata('entry_points.txt'), self
+            )
+        if group is not None:
+            return self._ep_map.get(group, {})
+        return self._ep_map
+
+    def get_entry_info(self, group: str, name: str):
+        """Return the EntryPoint object for `group`+`name`, or ``None``"""
+        return self.get_entry_map(group).get(name)
+
+    # FIXME: 'Distribution.insert_on' is too complex (13)
+    def insert_on(  # noqa: C901
+        self,
+        path: list[str],
+        loc=None,
+        replace: bool = False,
+    ):
+        """Ensure self.location is on path
+
+        If replace=False (default):
+            - If location is already in path anywhere, do nothing.
+            - Else:
+              - If it's an egg and its parent directory is on path,
+                insert just ahead of the parent.
+              - Else: add to the end of path.
+        If replace=True:
+            - If location is already on path anywhere (not eggs)
+              or higher priority than its parent (eggs)
+              do nothing.
+            - Else:
+              - If it's an egg and its parent directory is on path,
+                insert just ahead of the parent,
+                removing any lower-priority entries.
+              - Else: add it to the front of path.
+        """
+
+        loc = loc or self.location
+        if not loc:
+            return
+
+        nloc = _normalize_cached(loc)
+        bdir = os.path.dirname(nloc)
+        npath = [(p and _normalize_cached(p) or p) for p in path]
+
+        for p, item in enumerate(npath):
+            if item == nloc:
+                if replace:
+                    break
+                else:
+                    # don't modify path (even removing duplicates) if
+                    # found and not replace
+                    return
+            elif item == bdir and self.precedence == EGG_DIST:
+                # if it's an .egg, give it precedence over its directory
+                # UNLESS it's already been added to sys.path and replace=False
+                if (not replace) and nloc in npath[p:]:
+                    return
+                if path is sys.path:
+                    self.check_version_conflict()
+                path.insert(p, loc)
+                npath.insert(p, nloc)
+                break
+        else:
+            if path is sys.path:
+                self.check_version_conflict()
+            if replace:
+                path.insert(0, loc)
+            else:
+                path.append(loc)
+            return
+
+        # p is the spot where we found or inserted loc; now remove duplicates
+        while True:
+            try:
+                np = npath.index(nloc, p + 1)
+            except ValueError:
+                break
+            else:
+                del npath[np], path[np]
+                # ha!
+                p = np
+
+        return
+
+    def check_version_conflict(self):
+        if self.key == 'setuptools':
+            # ignore the inevitable setuptools self-conflicts  :(
+            return
+
+        nsp = dict.fromkeys(self._get_metadata('namespace_packages.txt'))
+        loc = normalize_path(self.location)
+        for modname in self._get_metadata('top_level.txt'):
+            if (
+                modname not in sys.modules
+                or modname in nsp
+                or modname in _namespace_packages
+            ):
+                continue
+            if modname in ('pkg_resources', 'setuptools', 'site'):
+                continue
+            fn = getattr(sys.modules[modname], '__file__', None)
+            if fn and (
+                normalize_path(fn).startswith(loc) or fn.startswith(self.location)
+            ):
+                continue
+            issue_warning(
+                "Module %s was already imported from %s, but %s is being added"
+                " to sys.path" % (modname, fn, self.location),
+            )
+
+    def has_version(self):
+        try:
+            self.version
+        except ValueError:
+            issue_warning("Unbuilt egg for " + repr(self))
+            return False
+        except SystemError:
+            # TODO: remove this except clause when python/cpython#103632 is fixed.
+            return False
+        return True
+
+    def clone(self, **kw: str | int | IResourceProvider | None):
+        """Copy this distribution, substituting in any changed keyword args"""
+        names = 'project_name version py_version platform location precedence'
+        for attr in names.split():
+            kw.setdefault(attr, getattr(self, attr, None))
+        kw.setdefault('metadata', self._provider)
+        # Unsafely unpacking. But keeping **kw for backwards and subclassing compatibility
+        return self.__class__(**kw)  # type:ignore[arg-type]
+
+    @property
+    def extras(self):
+        return [dep for dep in self._dep_map if dep]
+
+
+class EggInfoDistribution(Distribution):
+    def _reload_version(self):
+        """
+        Packages installed by distutils (e.g. numpy or scipy),
+        which uses an old safe_version, and so
+        their version numbers can get mangled when
+        converted to filenames (e.g., 1.11.0.dev0+2329eae to
+        1.11.0.dev0_2329eae). These distributions will not be
+        parsed properly
+        downstream by Distribution and safe_version, so
+        take an extra step and try to get the version number from
+        the metadata file itself instead of the filename.
+        """
+        md_version = self._get_version()
+        if md_version:
+            self._version = md_version
+        return self
+
+
+class DistInfoDistribution(Distribution):
+    """
+    Wrap an actual or potential sys.path entry
+    w/metadata, .dist-info style.
+    """
+
+    PKG_INFO = 'METADATA'
+    EQEQ = re.compile(r"([\(,])\s*(\d.*?)\s*([,\)])")
+
+    @property
+    def _parsed_pkg_info(self):
+        """Parse and cache metadata"""
+        try:
+            return self._pkg_info
+        except AttributeError:
+            metadata = self.get_metadata(self.PKG_INFO)
+            self._pkg_info = email.parser.Parser().parsestr(metadata)
+            return self._pkg_info
+
+    @property
+    def _dep_map(self):
+        try:
+            return self.__dep_map
+        except AttributeError:
+            self.__dep_map = self._compute_dependencies()
+            return self.__dep_map
+
+    def _compute_dependencies(self) -> dict[str | None, list[Requirement]]:
+        """Recompute this distribution's dependencies."""
+        self.__dep_map: dict[str | None, list[Requirement]] = {None: []}
+
+        reqs: list[Requirement] = []
+        # Including any condition expressions
+        for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
+            reqs.extend(parse_requirements(req))
+
+        def reqs_for_extra(extra):
+            for req in reqs:
+                if not req.marker or req.marker.evaluate({'extra': extra}):
+                    yield req
+
+        common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
+        self.__dep_map[None].extend(common)
+
+        for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []:
+            s_extra = safe_extra(extra.strip())
+            self.__dep_map[s_extra] = [
+                r for r in reqs_for_extra(extra) if r not in common
+            ]
+
+        return self.__dep_map
+
+
+_distributionImpl = {
+    '.egg': Distribution,
+    '.egg-info': EggInfoDistribution,
+    '.dist-info': DistInfoDistribution,
+}
+
+
+def issue_warning(*args, **kw):
+    level = 1
+    g = globals()
+    try:
+        # find the first stack frame that is *not* code in
+        # the pkg_resources module, to use for the warning
+        while sys._getframe(level).f_globals is g:
+            level += 1
+    except ValueError:
+        pass
+    warnings.warn(stacklevel=level + 1, *args, **kw)
+
+
+def parse_requirements(strs: _NestedStr):
+    """
+    Yield ``Requirement`` objects for each specification in `strs`.
+
+    `strs` must be a string, or a (possibly-nested) iterable thereof.
+    """
+    return map(Requirement, join_continuation(map(drop_comment, yield_lines(strs))))
+
+
+class RequirementParseError(_packaging_requirements.InvalidRequirement):
+    "Compatibility wrapper for InvalidRequirement"
+
+
+class Requirement(_packaging_requirements.Requirement):
+    def __init__(self, requirement_string: str):
+        """DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!"""
+        super().__init__(requirement_string)
+        self.unsafe_name = self.name
+        project_name = safe_name(self.name)
+        self.project_name, self.key = project_name, project_name.lower()
+        self.specs = [(spec.operator, spec.version) for spec in self.specifier]
+        # packaging.requirements.Requirement uses a set for its extras. We use a variable-length tuple
+        self.extras: tuple[str] = tuple(map(safe_extra, self.extras))
+        self.hashCmp = (
+            self.key,
+            self.url,
+            self.specifier,
+            frozenset(self.extras),
+            str(self.marker) if self.marker else None,
+        )
+        self.__hash = hash(self.hashCmp)
+
+    def __eq__(self, other: object):
+        return isinstance(other, Requirement) and self.hashCmp == other.hashCmp
+
+    def __ne__(self, other):
+        return not self == other
+
+    def __contains__(self, item: Distribution | str | tuple[str, ...]) -> bool:
+        if isinstance(item, Distribution):
+            if item.key != self.key:
+                return False
+
+            item = item.version
+
+        # Allow prereleases always in order to match the previous behavior of
+        # this method. In the future this should be smarter and follow PEP 440
+        # more accurately.
+        return self.specifier.contains(item, prereleases=True)
+
+    def __hash__(self):
+        return self.__hash
+
+    def __repr__(self):
+        return "Requirement.parse(%r)" % str(self)
+
+    @staticmethod
+    def parse(s: str | Iterable[str]):
+        (req,) = parse_requirements(s)
+        return req
+
+
+def _always_object(classes):
+    """
+    Ensure object appears in the mro even
+    for old-style classes.
+    """
+    if object not in classes:
+        return classes + (object,)
+    return classes
+
+
+def _find_adapter(registry: Mapping[type, _AdapterT], ob: object) -> _AdapterT:
+    """Return an adapter factory for `ob` from `registry`"""
+    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
+    for t in types:
+        if t in registry:
+            return registry[t]
+    # _find_adapter would previously return None, and immediately be called.
+    # So we're raising a TypeError to keep backward compatibility if anyone depended on that behaviour.
+    raise TypeError(f"Could not find adapter for {registry} and {ob}")
+
+
+def ensure_directory(path: StrOrBytesPath):
+    """Ensure that the parent directory of `path` exists"""
+    dirname = os.path.dirname(path)
+    os.makedirs(dirname, exist_ok=True)
+
+
+def _bypass_ensure_directory(path):
+    """Sandbox-bypassing version of ensure_directory()"""
+    if not WRITE_SUPPORT:
+        raise OSError('"os.mkdir" not supported on this platform.')
+    dirname, filename = split(path)
+    if dirname and filename and not isdir(dirname):
+        _bypass_ensure_directory(dirname)
+        try:
+            mkdir(dirname, 0o755)
+        except FileExistsError:
+            pass
+
+
+def split_sections(s: _NestedStr) -> Iterator[tuple[str | None, list[str]]]:
+    """Split a string or iterable thereof into (section, content) pairs
+
+    Each ``section`` is a stripped version of the section header ("[section]")
+    and each ``content`` is a list of stripped lines excluding blank lines and
+    comment-only lines.  If there are any such lines before the first section
+    header, they're returned in a first ``section`` of ``None``.
+    """
+    section = None
+    content = []
+    for line in yield_lines(s):
+        if line.startswith("["):
+            if line.endswith("]"):
+                if section or content:
+                    yield section, content
+                section = line[1:-1].strip()
+                content = []
+            else:
+                raise ValueError("Invalid section heading", line)
+        else:
+            content.append(line)
+
+    # wrap up last segment
+    yield section, content
+
+
+def _mkstemp(*args, **kw):
+    old_open = os.open
+    try:
+        # temporarily bypass sandboxing
+        os.open = os_open
+        return tempfile.mkstemp(*args, **kw)
+    finally:
+        # and then put it back
+        os.open = old_open
+
+
+# Silence the PEP440Warning by default, so that end users don't get hit by it
+# randomly just because they use pkg_resources. We want to append the rule
+# because we want earlier uses of filterwarnings to take precedence over this
+# one.
+warnings.filterwarnings("ignore", category=PEP440Warning, append=True)
+
+
+class PkgResourcesDeprecationWarning(Warning):
+    """
+    Base class for warning about deprecations in ``pkg_resources``
+
+    This class is not derived from ``DeprecationWarning``, and as such is
+    visible by default.
+    """
+
+
+# Ported from ``setuptools`` to avoid introducing an import inter-dependency:
+_LOCALE_ENCODING = "locale" if sys.version_info >= (3, 10) else None
+
+
+def _read_utf8_with_fallback(file: str, fallback_encoding=_LOCALE_ENCODING) -> str:
+    """See setuptools.unicode_utils._read_utf8_with_fallback"""
+    try:
+        with open(file, "r", encoding="utf-8") as f:
+            return f.read()
+    except UnicodeDecodeError:  # pragma: no cover
+        msg = f"""\
+        ********************************************************************************
+        `encoding="utf-8"` fails with {file!r}, trying `encoding={fallback_encoding!r}`.
+
+        This fallback behaviour is considered **deprecated** and future versions of
+        `setuptools/pkg_resources` may not implement it.
+
+        Please encode {file!r} with "utf-8" to ensure future builds will succeed.
+
+        If this file was produced by `setuptools` itself, cleaning up the cached files
+        and re-building/re-installing the package with a newer version of `setuptools`
+        (e.g. by updating `build-system.requires` in its `pyproject.toml`)
+        might solve the problem.
+        ********************************************************************************
+        """
+        # TODO: Add a deadline?
+        #       See comment in setuptools.unicode_utils._Utf8EncodingNeeded
+        warnings.warn(msg, PkgResourcesDeprecationWarning, stacklevel=2)
+        with open(file, "r", encoding=fallback_encoding) as f:
+            return f.read()
+
+
+# from jaraco.functools 1.3
+def _call_aside(f, *args, **kwargs):
+    f(*args, **kwargs)
+    return f
+
+
+@_call_aside
+def _initialize(g=globals()):
+    "Set up global resource manager (deliberately not state-saved)"
+    manager = ResourceManager()
+    g['_manager'] = manager
+    g.update(
+        (name, getattr(manager, name))
+        for name in dir(manager)
+        if not name.startswith('_')
+    )
+
+
+@_call_aside
+def _initialize_master_working_set():
+    """
+    Prepare the master working set and make the ``require()``
+    API available.
+
+    This function has explicit effects on the global state
+    of pkg_resources. It is intended to be invoked once at
+    the initialization of this module.
+
+    Invocation by other packages is unsupported and done
+    at their own risk.
+    """
+    working_set = _declare_state('object', 'working_set', WorkingSet._build_master())
+
+    require = working_set.require
+    iter_entry_points = working_set.iter_entry_points
+    add_activation_listener = working_set.subscribe
+    run_script = working_set.run_script
+    # backward compatibility
+    run_main = run_script
+    # Activate all distributions already on sys.path with replace=False and
+    # ensure that all distributions added to the working set in the future
+    # (e.g. by calling ``require()``) will get activated as well,
+    # with higher priority (replace=True).
+    tuple(dist.activate(replace=False) for dist in working_set)
+    add_activation_listener(
+        lambda dist: dist.activate(replace=True),
+        existing=False,
+    )
+    working_set.entries = []
+    # match order
+    list(map(working_set.add_entry, sys.path))
+    globals().update(locals())
+
+
+if TYPE_CHECKING:
+    # All of these are set by the @_call_aside methods above
+    __resource_manager = ResourceManager()  # Won't exist at runtime
+    resource_exists = __resource_manager.resource_exists
+    resource_isdir = __resource_manager.resource_isdir
+    resource_filename = __resource_manager.resource_filename
+    resource_stream = __resource_manager.resource_stream
+    resource_string = __resource_manager.resource_string
+    resource_listdir = __resource_manager.resource_listdir
+    set_extraction_path = __resource_manager.set_extraction_path
+    cleanup_resources = __resource_manager.cleanup_resources
+
+    working_set = WorkingSet()
+    require = working_set.require
+    iter_entry_points = working_set.iter_entry_points
+    add_activation_listener = working_set.subscribe
+    run_script = working_set.run_script
+    run_main = run_script
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..edc21fad2e99a86f07fd1a66e07fe43d6f8627ab
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py
@@ -0,0 +1,631 @@
+"""
+Utilities for determining application-specific dirs.
+
+See  for details and usage.
+
+"""
+
+from __future__ import annotations
+
+import os
+import sys
+from typing import TYPE_CHECKING
+
+from .api import PlatformDirsABC
+from .version import __version__
+from .version import __version_tuple__ as __version_info__
+
+if TYPE_CHECKING:
+    from pathlib import Path
+    from typing import Literal
+
+if sys.platform == "win32":
+    from pip._vendor.platformdirs.windows import Windows as _Result
+elif sys.platform == "darwin":
+    from pip._vendor.platformdirs.macos import MacOS as _Result
+else:
+    from pip._vendor.platformdirs.unix import Unix as _Result
+
+
+def _set_platform_dir_class() -> type[PlatformDirsABC]:
+    if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
+        if os.getenv("SHELL") or os.getenv("PREFIX"):
+            return _Result
+
+        from pip._vendor.platformdirs.android import _android_folder  # noqa: PLC0415
+
+        if _android_folder() is not None:
+            from pip._vendor.platformdirs.android import Android  # noqa: PLC0415
+
+            return Android  # return to avoid redefinition of a result
+
+    return _Result
+
+
+if TYPE_CHECKING:
+    # Work around mypy issue: https://github.com/python/mypy/issues/10962
+    PlatformDirs = _Result
+else:
+    PlatformDirs = _set_platform_dir_class()  #: Currently active platform
+AppDirs = PlatformDirs  #: Backwards compatibility with appdirs
+
+
+def user_data_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: data directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_data_dir
+
+
+def site_data_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    multipath: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param multipath: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: data directory shared by users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        multipath=multipath,
+        ensure_exists=ensure_exists,
+    ).site_data_dir
+
+
+def user_config_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: config directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_config_dir
+
+
+def site_config_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    multipath: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param multipath: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: config directory shared by the users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        multipath=multipath,
+        ensure_exists=ensure_exists,
+    ).site_config_dir
+
+
+def user_cache_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: cache directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_cache_dir
+
+
+def site_cache_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: cache directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).site_cache_dir
+
+
+def user_state_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: state directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_state_dir
+
+
+def user_log_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: log directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_log_dir
+
+
+def user_documents_dir() -> str:
+    """:returns: documents directory tied to the user"""
+    return PlatformDirs().user_documents_dir
+
+
+def user_downloads_dir() -> str:
+    """:returns: downloads directory tied to the user"""
+    return PlatformDirs().user_downloads_dir
+
+
+def user_pictures_dir() -> str:
+    """:returns: pictures directory tied to the user"""
+    return PlatformDirs().user_pictures_dir
+
+
+def user_videos_dir() -> str:
+    """:returns: videos directory tied to the user"""
+    return PlatformDirs().user_videos_dir
+
+
+def user_music_dir() -> str:
+    """:returns: music directory tied to the user"""
+    return PlatformDirs().user_music_dir
+
+
+def user_desktop_dir() -> str:
+    """:returns: desktop directory tied to the user"""
+    return PlatformDirs().user_desktop_dir
+
+
+def user_runtime_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: runtime directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_runtime_dir
+
+
+def site_runtime_dir(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> str:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: runtime directory shared by users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).site_runtime_dir
+
+
+def user_data_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: data path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_data_path
+
+
+def site_data_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    multipath: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param multipath: See `multipath `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: data path shared by users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        multipath=multipath,
+        ensure_exists=ensure_exists,
+    ).site_data_path
+
+
+def user_config_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: config path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_config_path
+
+
+def site_config_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    multipath: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param multipath: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: config path shared by the users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        multipath=multipath,
+        ensure_exists=ensure_exists,
+    ).site_config_path
+
+
+def site_cache_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: cache directory tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).site_cache_path
+
+
+def user_cache_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: cache path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_cache_path
+
+
+def user_state_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    roaming: bool = False,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param roaming: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: state path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        roaming=roaming,
+        ensure_exists=ensure_exists,
+    ).user_state_path
+
+
+def user_log_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `roaming `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: log path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_log_path
+
+
+def user_documents_path() -> Path:
+    """:returns: documents a path tied to the user"""
+    return PlatformDirs().user_documents_path
+
+
+def user_downloads_path() -> Path:
+    """:returns: downloads path tied to the user"""
+    return PlatformDirs().user_downloads_path
+
+
+def user_pictures_path() -> Path:
+    """:returns: pictures path tied to the user"""
+    return PlatformDirs().user_pictures_path
+
+
+def user_videos_path() -> Path:
+    """:returns: videos path tied to the user"""
+    return PlatformDirs().user_videos_path
+
+
+def user_music_path() -> Path:
+    """:returns: music path tied to the user"""
+    return PlatformDirs().user_music_path
+
+
+def user_desktop_path() -> Path:
+    """:returns: desktop path tied to the user"""
+    return PlatformDirs().user_desktop_path
+
+
+def user_runtime_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: runtime path tied to the user
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).user_runtime_path
+
+
+def site_runtime_path(
+    appname: str | None = None,
+    appauthor: str | None | Literal[False] = None,
+    version: str | None = None,
+    opinion: bool = True,  # noqa: FBT001, FBT002
+    ensure_exists: bool = False,  # noqa: FBT001, FBT002
+) -> Path:
+    """
+    :param appname: See `appname `.
+    :param appauthor: See `appauthor `.
+    :param version: See `version `.
+    :param opinion: See `opinion `.
+    :param ensure_exists: See `ensure_exists `.
+    :returns: runtime path shared by users
+    """
+    return PlatformDirs(
+        appname=appname,
+        appauthor=appauthor,
+        version=version,
+        opinion=opinion,
+        ensure_exists=ensure_exists,
+    ).site_runtime_path
+
+
+__all__ = [
+    "AppDirs",
+    "PlatformDirs",
+    "PlatformDirsABC",
+    "__version__",
+    "__version_info__",
+    "site_cache_dir",
+    "site_cache_path",
+    "site_config_dir",
+    "site_config_path",
+    "site_data_dir",
+    "site_data_path",
+    "site_runtime_dir",
+    "site_runtime_path",
+    "user_cache_dir",
+    "user_cache_path",
+    "user_config_dir",
+    "user_config_path",
+    "user_data_dir",
+    "user_data_path",
+    "user_desktop_dir",
+    "user_desktop_path",
+    "user_documents_dir",
+    "user_documents_path",
+    "user_downloads_dir",
+    "user_downloads_path",
+    "user_log_dir",
+    "user_log_path",
+    "user_music_dir",
+    "user_music_path",
+    "user_pictures_dir",
+    "user_pictures_path",
+    "user_runtime_dir",
+    "user_runtime_path",
+    "user_state_dir",
+    "user_state_path",
+    "user_videos_dir",
+    "user_videos_path",
+]
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py
new file mode 100644
index 0000000000000000000000000000000000000000..fa8a677a336bded93ce104943c9187c917ed8b75
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py
@@ -0,0 +1,55 @@
+"""Main entry point."""
+
+from __future__ import annotations
+
+from pip._vendor.platformdirs import PlatformDirs, __version__
+
+PROPS = (
+    "user_data_dir",
+    "user_config_dir",
+    "user_cache_dir",
+    "user_state_dir",
+    "user_log_dir",
+    "user_documents_dir",
+    "user_downloads_dir",
+    "user_pictures_dir",
+    "user_videos_dir",
+    "user_music_dir",
+    "user_runtime_dir",
+    "site_data_dir",
+    "site_config_dir",
+    "site_cache_dir",
+    "site_runtime_dir",
+)
+
+
+def main() -> None:
+    """Run the main entry point."""
+    app_name = "MyApp"
+    app_author = "MyCompany"
+
+    print(f"-- platformdirs {__version__} --")  # noqa: T201
+
+    print("-- app dirs (with optional 'version')")  # noqa: T201
+    dirs = PlatformDirs(app_name, app_author, version="1.0")
+    for prop in PROPS:
+        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
+
+    print("\n-- app dirs (without optional 'version')")  # noqa: T201
+    dirs = PlatformDirs(app_name, app_author)
+    for prop in PROPS:
+        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
+
+    print("\n-- app dirs (without optional 'appauthor')")  # noqa: T201
+    dirs = PlatformDirs(app_name)
+    for prop in PROPS:
+        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
+
+    print("\n-- app dirs (with disabled 'appauthor')")  # noqa: T201
+    dirs = PlatformDirs(app_name, appauthor=False)
+    for prop in PROPS:
+        print(f"{prop}: {getattr(dirs, prop)}")  # noqa: T201
+
+
+if __name__ == "__main__":
+    main()
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..49122a6b16acc90af6af1b55a0b394c6a3b0699b
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d3946f8004150d976f584cbfb52aae523dddd64c
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c5bb008c800e6f8ff4c039e582902f6ba686fd01
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ecb648eaa8b535d6e3e1af7391f4325004d1b4b3
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1e7d1cfb6a13950c3020e84dcc8d189a8205e26e
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..361e7840c67966933c0e803edd1c8da34e7551d9
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..60aa6c256f712e470b3ecd9e7a54baf90103c171
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dbc098a48c5b230c5c10ec6b6e940155c005a214
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py
new file mode 100644
index 0000000000000000000000000000000000000000..7004a852422b104d16c9cbdfb2febe7b0504a594
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py
@@ -0,0 +1,249 @@
+"""Android."""
+
+from __future__ import annotations
+
+import os
+import re
+import sys
+from functools import lru_cache
+from typing import TYPE_CHECKING, cast
+
+from .api import PlatformDirsABC
+
+
+class Android(PlatformDirsABC):
+    """
+    Follows the guidance `from here `_.
+
+    Makes use of the `appname `, `version
+    `, `ensure_exists `.
+
+    """
+
+    @property
+    def user_data_dir(self) -> str:
+        """:return: data directory tied to the user, e.g. ``/data/user///files/``"""
+        return self._append_app_name_and_version(cast(str, _android_folder()), "files")
+
+    @property
+    def site_data_dir(self) -> str:
+        """:return: data directory shared by users, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def user_config_dir(self) -> str:
+        """
+        :return: config directory tied to the user, e.g. \
+        ``/data/user///shared_prefs/``
+        """
+        return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")
+
+    @property
+    def site_config_dir(self) -> str:
+        """:return: config directory shared by the users, same as `user_config_dir`"""
+        return self.user_config_dir
+
+    @property
+    def user_cache_dir(self) -> str:
+        """:return: cache directory tied to the user, e.g.,``/data/user///cache/``"""
+        return self._append_app_name_and_version(cast(str, _android_folder()), "cache")
+
+    @property
+    def site_cache_dir(self) -> str:
+        """:return: cache directory shared by users, same as `user_cache_dir`"""
+        return self.user_cache_dir
+
+    @property
+    def user_state_dir(self) -> str:
+        """:return: state directory tied to the user, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def user_log_dir(self) -> str:
+        """
+        :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
+          e.g. ``/data/user///cache//log``
+        """
+        path = self.user_cache_dir
+        if self.opinion:
+            path = os.path.join(path, "log")  # noqa: PTH118
+        return path
+
+    @property
+    def user_documents_dir(self) -> str:
+        """:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``"""
+        return _android_documents_folder()
+
+    @property
+    def user_downloads_dir(self) -> str:
+        """:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``"""
+        return _android_downloads_folder()
+
+    @property
+    def user_pictures_dir(self) -> str:
+        """:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``"""
+        return _android_pictures_folder()
+
+    @property
+    def user_videos_dir(self) -> str:
+        """:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``"""
+        return _android_videos_folder()
+
+    @property
+    def user_music_dir(self) -> str:
+        """:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``"""
+        return _android_music_folder()
+
+    @property
+    def user_desktop_dir(self) -> str:
+        """:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``"""
+        return "/storage/emulated/0/Desktop"
+
+    @property
+    def user_runtime_dir(self) -> str:
+        """
+        :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
+          e.g. ``/data/user///cache//tmp``
+        """
+        path = self.user_cache_dir
+        if self.opinion:
+            path = os.path.join(path, "tmp")  # noqa: PTH118
+        return path
+
+    @property
+    def site_runtime_dir(self) -> str:
+        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
+        return self.user_runtime_dir
+
+
+@lru_cache(maxsize=1)
+def _android_folder() -> str | None:  # noqa: C901
+    """:return: base folder for the Android OS or None if it cannot be found"""
+    result: str | None = None
+    # type checker isn't happy with our "import android", just don't do this when type checking see
+    # https://stackoverflow.com/a/61394121
+    if not TYPE_CHECKING:
+        try:
+            # First try to get a path to android app using python4android (if available)...
+            from android import mActivity  # noqa: PLC0415
+
+            context = cast("android.content.Context", mActivity.getApplicationContext())  # noqa: F821
+            result = context.getFilesDir().getParentFile().getAbsolutePath()
+        except Exception:  # noqa: BLE001
+            result = None
+    if result is None:
+        try:
+            # ...and fall back to using plain pyjnius, if python4android isn't available or doesn't deliver any useful
+            # result...
+            from jnius import autoclass  # noqa: PLC0415
+
+            context = autoclass("android.content.Context")
+            result = context.getFilesDir().getParentFile().getAbsolutePath()
+        except Exception:  # noqa: BLE001
+            result = None
+    if result is None:
+        # and if that fails, too, find an android folder looking at path on the sys.path
+        # warning: only works for apps installed under /data, not adopted storage etc.
+        pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
+        for path in sys.path:
+            if pattern.match(path):
+                result = path.split("/files")[0]
+                break
+        else:
+            result = None
+    if result is None:
+        # one last try: find an android folder looking at path on the sys.path taking adopted storage paths into
+        # account
+        pattern = re.compile(r"/mnt/expand/[a-fA-F0-9-]{36}/(data|user/\d+)/(.+)/files")
+        for path in sys.path:
+            if pattern.match(path):
+                result = path.split("/files")[0]
+                break
+        else:
+            result = None
+    return result
+
+
+@lru_cache(maxsize=1)
+def _android_documents_folder() -> str:
+    """:return: documents folder for the Android OS"""
+    # Get directories with pyjnius
+    try:
+        from jnius import autoclass  # noqa: PLC0415
+
+        context = autoclass("android.content.Context")
+        environment = autoclass("android.os.Environment")
+        documents_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
+    except Exception:  # noqa: BLE001
+        documents_dir = "/storage/emulated/0/Documents"
+
+    return documents_dir
+
+
+@lru_cache(maxsize=1)
+def _android_downloads_folder() -> str:
+    """:return: downloads folder for the Android OS"""
+    # Get directories with pyjnius
+    try:
+        from jnius import autoclass  # noqa: PLC0415
+
+        context = autoclass("android.content.Context")
+        environment = autoclass("android.os.Environment")
+        downloads_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOWNLOADS).getAbsolutePath()
+    except Exception:  # noqa: BLE001
+        downloads_dir = "/storage/emulated/0/Downloads"
+
+    return downloads_dir
+
+
+@lru_cache(maxsize=1)
+def _android_pictures_folder() -> str:
+    """:return: pictures folder for the Android OS"""
+    # Get directories with pyjnius
+    try:
+        from jnius import autoclass  # noqa: PLC0415
+
+        context = autoclass("android.content.Context")
+        environment = autoclass("android.os.Environment")
+        pictures_dir: str = context.getExternalFilesDir(environment.DIRECTORY_PICTURES).getAbsolutePath()
+    except Exception:  # noqa: BLE001
+        pictures_dir = "/storage/emulated/0/Pictures"
+
+    return pictures_dir
+
+
+@lru_cache(maxsize=1)
+def _android_videos_folder() -> str:
+    """:return: videos folder for the Android OS"""
+    # Get directories with pyjnius
+    try:
+        from jnius import autoclass  # noqa: PLC0415
+
+        context = autoclass("android.content.Context")
+        environment = autoclass("android.os.Environment")
+        videos_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DCIM).getAbsolutePath()
+    except Exception:  # noqa: BLE001
+        videos_dir = "/storage/emulated/0/DCIM/Camera"
+
+    return videos_dir
+
+
+@lru_cache(maxsize=1)
+def _android_music_folder() -> str:
+    """:return: music folder for the Android OS"""
+    # Get directories with pyjnius
+    try:
+        from jnius import autoclass  # noqa: PLC0415
+
+        context = autoclass("android.content.Context")
+        environment = autoclass("android.os.Environment")
+        music_dir: str = context.getExternalFilesDir(environment.DIRECTORY_MUSIC).getAbsolutePath()
+    except Exception:  # noqa: BLE001
+        music_dir = "/storage/emulated/0/Music"
+
+    return music_dir
+
+
+__all__ = [
+    "Android",
+]
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py
new file mode 100644
index 0000000000000000000000000000000000000000..18d660e4f8c90dd170f7e131a9ac55d68e60ce56
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py
@@ -0,0 +1,298 @@
+"""Base API."""
+
+from __future__ import annotations
+
+import os
+from abc import ABC, abstractmethod
+from pathlib import Path
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+    from typing import Iterator, Literal
+
+
+class PlatformDirsABC(ABC):  # noqa: PLR0904
+    """Abstract base class for platform directories."""
+
+    def __init__(  # noqa: PLR0913, PLR0917
+        self,
+        appname: str | None = None,
+        appauthor: str | None | Literal[False] = None,
+        version: str | None = None,
+        roaming: bool = False,  # noqa: FBT001, FBT002
+        multipath: bool = False,  # noqa: FBT001, FBT002
+        opinion: bool = True,  # noqa: FBT001, FBT002
+        ensure_exists: bool = False,  # noqa: FBT001, FBT002
+    ) -> None:
+        """
+        Create a new platform directory.
+
+        :param appname: See `appname`.
+        :param appauthor: See `appauthor`.
+        :param version: See `version`.
+        :param roaming: See `roaming`.
+        :param multipath: See `multipath`.
+        :param opinion: See `opinion`.
+        :param ensure_exists: See `ensure_exists`.
+
+        """
+        self.appname = appname  #: The name of application.
+        self.appauthor = appauthor
+        """
+        The name of the app author or distributing body for this application.
+
+        Typically, it is the owning company name. Defaults to `appname`. You may pass ``False`` to disable it.
+
+        """
+        self.version = version
+        """
+        An optional version path element to append to the path.
+
+        You might want to use this if you want multiple versions of your app to be able to run independently. If used,
+        this would typically be ``.``.
+
+        """
+        self.roaming = roaming
+        """
+        Whether to use the roaming appdata directory on Windows.
+
+        That means that for users on a Windows network setup for roaming profiles, this user data will be synced on
+        login (see
+        `here `_).
+
+        """
+        self.multipath = multipath
+        """
+        An optional parameter which indicates that the entire list of data dirs should be returned.
+
+        By default, the first item would only be returned.
+
+        """
+        self.opinion = opinion  #: A flag to indicating to use opinionated values.
+        self.ensure_exists = ensure_exists
+        """
+        Optionally create the directory (and any missing parents) upon access if it does not exist.
+
+        By default, no directories are created.
+
+        """
+
+    def _append_app_name_and_version(self, *base: str) -> str:
+        params = list(base[1:])
+        if self.appname:
+            params.append(self.appname)
+            if self.version:
+                params.append(self.version)
+        path = os.path.join(base[0], *params)  # noqa: PTH118
+        self._optionally_create_directory(path)
+        return path
+
+    def _optionally_create_directory(self, path: str) -> None:
+        if self.ensure_exists:
+            Path(path).mkdir(parents=True, exist_ok=True)
+
+    def _first_item_as_path_if_multipath(self, directory: str) -> Path:
+        if self.multipath:
+            # If multipath is True, the first path is returned.
+            directory = directory.split(os.pathsep)[0]
+        return Path(directory)
+
+    @property
+    @abstractmethod
+    def user_data_dir(self) -> str:
+        """:return: data directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def site_data_dir(self) -> str:
+        """:return: data directory shared by users"""
+
+    @property
+    @abstractmethod
+    def user_config_dir(self) -> str:
+        """:return: config directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def site_config_dir(self) -> str:
+        """:return: config directory shared by the users"""
+
+    @property
+    @abstractmethod
+    def user_cache_dir(self) -> str:
+        """:return: cache directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def site_cache_dir(self) -> str:
+        """:return: cache directory shared by users"""
+
+    @property
+    @abstractmethod
+    def user_state_dir(self) -> str:
+        """:return: state directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_log_dir(self) -> str:
+        """:return: log directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_documents_dir(self) -> str:
+        """:return: documents directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_downloads_dir(self) -> str:
+        """:return: downloads directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_pictures_dir(self) -> str:
+        """:return: pictures directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_videos_dir(self) -> str:
+        """:return: videos directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_music_dir(self) -> str:
+        """:return: music directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_desktop_dir(self) -> str:
+        """:return: desktop directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def user_runtime_dir(self) -> str:
+        """:return: runtime directory tied to the user"""
+
+    @property
+    @abstractmethod
+    def site_runtime_dir(self) -> str:
+        """:return: runtime directory shared by users"""
+
+    @property
+    def user_data_path(self) -> Path:
+        """:return: data path tied to the user"""
+        return Path(self.user_data_dir)
+
+    @property
+    def site_data_path(self) -> Path:
+        """:return: data path shared by users"""
+        return Path(self.site_data_dir)
+
+    @property
+    def user_config_path(self) -> Path:
+        """:return: config path tied to the user"""
+        return Path(self.user_config_dir)
+
+    @property
+    def site_config_path(self) -> Path:
+        """:return: config path shared by the users"""
+        return Path(self.site_config_dir)
+
+    @property
+    def user_cache_path(self) -> Path:
+        """:return: cache path tied to the user"""
+        return Path(self.user_cache_dir)
+
+    @property
+    def site_cache_path(self) -> Path:
+        """:return: cache path shared by users"""
+        return Path(self.site_cache_dir)
+
+    @property
+    def user_state_path(self) -> Path:
+        """:return: state path tied to the user"""
+        return Path(self.user_state_dir)
+
+    @property
+    def user_log_path(self) -> Path:
+        """:return: log path tied to the user"""
+        return Path(self.user_log_dir)
+
+    @property
+    def user_documents_path(self) -> Path:
+        """:return: documents a path tied to the user"""
+        return Path(self.user_documents_dir)
+
+    @property
+    def user_downloads_path(self) -> Path:
+        """:return: downloads path tied to the user"""
+        return Path(self.user_downloads_dir)
+
+    @property
+    def user_pictures_path(self) -> Path:
+        """:return: pictures path tied to the user"""
+        return Path(self.user_pictures_dir)
+
+    @property
+    def user_videos_path(self) -> Path:
+        """:return: videos path tied to the user"""
+        return Path(self.user_videos_dir)
+
+    @property
+    def user_music_path(self) -> Path:
+        """:return: music path tied to the user"""
+        return Path(self.user_music_dir)
+
+    @property
+    def user_desktop_path(self) -> Path:
+        """:return: desktop path tied to the user"""
+        return Path(self.user_desktop_dir)
+
+    @property
+    def user_runtime_path(self) -> Path:
+        """:return: runtime path tied to the user"""
+        return Path(self.user_runtime_dir)
+
+    @property
+    def site_runtime_path(self) -> Path:
+        """:return: runtime path shared by users"""
+        return Path(self.site_runtime_dir)
+
+    def iter_config_dirs(self) -> Iterator[str]:
+        """:yield: all user and site configuration directories."""
+        yield self.user_config_dir
+        yield self.site_config_dir
+
+    def iter_data_dirs(self) -> Iterator[str]:
+        """:yield: all user and site data directories."""
+        yield self.user_data_dir
+        yield self.site_data_dir
+
+    def iter_cache_dirs(self) -> Iterator[str]:
+        """:yield: all user and site cache directories."""
+        yield self.user_cache_dir
+        yield self.site_cache_dir
+
+    def iter_runtime_dirs(self) -> Iterator[str]:
+        """:yield: all user and site runtime directories."""
+        yield self.user_runtime_dir
+        yield self.site_runtime_dir
+
+    def iter_config_paths(self) -> Iterator[Path]:
+        """:yield: all user and site configuration paths."""
+        for path in self.iter_config_dirs():
+            yield Path(path)
+
+    def iter_data_paths(self) -> Iterator[Path]:
+        """:yield: all user and site data paths."""
+        for path in self.iter_data_dirs():
+            yield Path(path)
+
+    def iter_cache_paths(self) -> Iterator[Path]:
+        """:yield: all user and site cache paths."""
+        for path in self.iter_cache_dirs():
+            yield Path(path)
+
+    def iter_runtime_paths(self) -> Iterator[Path]:
+        """:yield: all user and site runtime paths."""
+        for path in self.iter_runtime_dirs():
+            yield Path(path)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py
new file mode 100644
index 0000000000000000000000000000000000000000..e4b0391abd7a09ab76a6351fb6757f6498cdb240
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py
@@ -0,0 +1,144 @@
+"""macOS."""
+
+from __future__ import annotations
+
+import os.path
+import sys
+from typing import TYPE_CHECKING
+
+from .api import PlatformDirsABC
+
+if TYPE_CHECKING:
+    from pathlib import Path
+
+
+class MacOS(PlatformDirsABC):
+    """
+    Platform directories for the macOS operating system.
+
+    Follows the guidance from
+    `Apple documentation `_.
+    Makes use of the `appname `,
+    `version `,
+    `ensure_exists `.
+
+    """
+
+    @property
+    def user_data_dir(self) -> str:
+        """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
+        return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support"))  # noqa: PTH111
+
+    @property
+    def site_data_dir(self) -> str:
+        """
+        :return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``.
+          If we're using a Python binary managed by `Homebrew `_, the directory
+          will be under the Homebrew prefix, e.g. ``/opt/homebrew/share/$appname/$version``.
+          If `multipath ` is enabled, and we're in Homebrew,
+          the response is a multi-path string separated by ":", e.g.
+          ``/opt/homebrew/share/$appname/$version:/Library/Application Support/$appname/$version``
+        """
+        is_homebrew = sys.prefix.startswith("/opt/homebrew")
+        path_list = [self._append_app_name_and_version("/opt/homebrew/share")] if is_homebrew else []
+        path_list.append(self._append_app_name_and_version("/Library/Application Support"))
+        if self.multipath:
+            return os.pathsep.join(path_list)
+        return path_list[0]
+
+    @property
+    def site_data_path(self) -> Path:
+        """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
+        return self._first_item_as_path_if_multipath(self.site_data_dir)
+
+    @property
+    def user_config_dir(self) -> str:
+        """:return: config directory tied to the user, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def site_config_dir(self) -> str:
+        """:return: config directory shared by the users, same as `site_data_dir`"""
+        return self.site_data_dir
+
+    @property
+    def user_cache_dir(self) -> str:
+        """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
+        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches"))  # noqa: PTH111
+
+    @property
+    def site_cache_dir(self) -> str:
+        """
+        :return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``.
+          If we're using a Python binary managed by `Homebrew `_, the directory
+          will be under the Homebrew prefix, e.g. ``/opt/homebrew/var/cache/$appname/$version``.
+          If `multipath ` is enabled, and we're in Homebrew,
+          the response is a multi-path string separated by ":", e.g.
+          ``/opt/homebrew/var/cache/$appname/$version:/Library/Caches/$appname/$version``
+        """
+        is_homebrew = sys.prefix.startswith("/opt/homebrew")
+        path_list = [self._append_app_name_and_version("/opt/homebrew/var/cache")] if is_homebrew else []
+        path_list.append(self._append_app_name_and_version("/Library/Caches"))
+        if self.multipath:
+            return os.pathsep.join(path_list)
+        return path_list[0]
+
+    @property
+    def site_cache_path(self) -> Path:
+        """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
+        return self._first_item_as_path_if_multipath(self.site_cache_dir)
+
+    @property
+    def user_state_dir(self) -> str:
+        """:return: state directory tied to the user, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def user_log_dir(self) -> str:
+        """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
+        return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs"))  # noqa: PTH111
+
+    @property
+    def user_documents_dir(self) -> str:
+        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
+        return os.path.expanduser("~/Documents")  # noqa: PTH111
+
+    @property
+    def user_downloads_dir(self) -> str:
+        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
+        return os.path.expanduser("~/Downloads")  # noqa: PTH111
+
+    @property
+    def user_pictures_dir(self) -> str:
+        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
+        return os.path.expanduser("~/Pictures")  # noqa: PTH111
+
+    @property
+    def user_videos_dir(self) -> str:
+        """:return: videos directory tied to the user, e.g. ``~/Movies``"""
+        return os.path.expanduser("~/Movies")  # noqa: PTH111
+
+    @property
+    def user_music_dir(self) -> str:
+        """:return: music directory tied to the user, e.g. ``~/Music``"""
+        return os.path.expanduser("~/Music")  # noqa: PTH111
+
+    @property
+    def user_desktop_dir(self) -> str:
+        """:return: desktop directory tied to the user, e.g. ``~/Desktop``"""
+        return os.path.expanduser("~/Desktop")  # noqa: PTH111
+
+    @property
+    def user_runtime_dir(self) -> str:
+        """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
+        return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems"))  # noqa: PTH111
+
+    @property
+    def site_runtime_dir(self) -> str:
+        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
+        return self.user_runtime_dir
+
+
+__all__ = [
+    "MacOS",
+]
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/py.typed b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/py.typed
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py
new file mode 100644
index 0000000000000000000000000000000000000000..f1942e92ef47ce5195966634c2a3c572776038de
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py
@@ -0,0 +1,269 @@
+"""Unix."""
+
+from __future__ import annotations
+
+import os
+import sys
+from configparser import ConfigParser
+from pathlib import Path
+from typing import Iterator, NoReturn
+
+from .api import PlatformDirsABC
+
+if sys.platform == "win32":
+
+    def getuid() -> NoReturn:
+        msg = "should only be used on Unix"
+        raise RuntimeError(msg)
+
+else:
+    from os import getuid
+
+
+class Unix(PlatformDirsABC):  # noqa: PLR0904
+    """
+    On Unix/Linux, we follow the `XDG Basedir Spec `_.
+
+    The spec allows overriding directories with environment variables. The examples shown are the default values,
+    alongside the name of the environment variable that overrides them. Makes use of the `appname
+    `, `version `, `multipath
+    `, `opinion `, `ensure_exists
+    `.
+
+    """
+
+    @property
+    def user_data_dir(self) -> str:
+        """
+        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
+         ``$XDG_DATA_HOME/$appname/$version``
+        """
+        path = os.environ.get("XDG_DATA_HOME", "")
+        if not path.strip():
+            path = os.path.expanduser("~/.local/share")  # noqa: PTH111
+        return self._append_app_name_and_version(path)
+
+    @property
+    def _site_data_dirs(self) -> list[str]:
+        path = os.environ.get("XDG_DATA_DIRS", "")
+        if not path.strip():
+            path = f"/usr/local/share{os.pathsep}/usr/share"
+        return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)]
+
+    @property
+    def site_data_dir(self) -> str:
+        """
+        :return: data directories shared by users (if `multipath ` is
+         enabled and ``XDG_DATA_DIRS`` is set and a multi path the response is also a multi path separated by the
+         OS path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
+        """
+        # XDG default for $XDG_DATA_DIRS; only first, if multipath is False
+        dirs = self._site_data_dirs
+        if not self.multipath:
+            return dirs[0]
+        return os.pathsep.join(dirs)
+
+    @property
+    def user_config_dir(self) -> str:
+        """
+        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
+         ``$XDG_CONFIG_HOME/$appname/$version``
+        """
+        path = os.environ.get("XDG_CONFIG_HOME", "")
+        if not path.strip():
+            path = os.path.expanduser("~/.config")  # noqa: PTH111
+        return self._append_app_name_and_version(path)
+
+    @property
+    def _site_config_dirs(self) -> list[str]:
+        path = os.environ.get("XDG_CONFIG_DIRS", "")
+        if not path.strip():
+            path = "/etc/xdg"
+        return [self._append_app_name_and_version(p) for p in path.split(os.pathsep)]
+
+    @property
+    def site_config_dir(self) -> str:
+        """
+        :return: config directories shared by users (if `multipath `
+         is enabled and ``XDG_CONFIG_DIRS`` is set and a multi path the response is also a multi path separated by
+         the OS path separator), e.g. ``/etc/xdg/$appname/$version``
+        """
+        # XDG default for $XDG_CONFIG_DIRS only first, if multipath is False
+        dirs = self._site_config_dirs
+        if not self.multipath:
+            return dirs[0]
+        return os.pathsep.join(dirs)
+
+    @property
+    def user_cache_dir(self) -> str:
+        """
+        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
+         ``~/$XDG_CACHE_HOME/$appname/$version``
+        """
+        path = os.environ.get("XDG_CACHE_HOME", "")
+        if not path.strip():
+            path = os.path.expanduser("~/.cache")  # noqa: PTH111
+        return self._append_app_name_and_version(path)
+
+    @property
+    def site_cache_dir(self) -> str:
+        """:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``"""
+        return self._append_app_name_and_version("/var/cache")
+
+    @property
+    def user_state_dir(self) -> str:
+        """
+        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
+         ``$XDG_STATE_HOME/$appname/$version``
+        """
+        path = os.environ.get("XDG_STATE_HOME", "")
+        if not path.strip():
+            path = os.path.expanduser("~/.local/state")  # noqa: PTH111
+        return self._append_app_name_and_version(path)
+
+    @property
+    def user_log_dir(self) -> str:
+        """:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it"""
+        path = self.user_state_dir
+        if self.opinion:
+            path = os.path.join(path, "log")  # noqa: PTH118
+            self._optionally_create_directory(path)
+        return path
+
+    @property
+    def user_documents_dir(self) -> str:
+        """:return: documents directory tied to the user, e.g. ``~/Documents``"""
+        return _get_user_media_dir("XDG_DOCUMENTS_DIR", "~/Documents")
+
+    @property
+    def user_downloads_dir(self) -> str:
+        """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
+        return _get_user_media_dir("XDG_DOWNLOAD_DIR", "~/Downloads")
+
+    @property
+    def user_pictures_dir(self) -> str:
+        """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
+        return _get_user_media_dir("XDG_PICTURES_DIR", "~/Pictures")
+
+    @property
+    def user_videos_dir(self) -> str:
+        """:return: videos directory tied to the user, e.g. ``~/Videos``"""
+        return _get_user_media_dir("XDG_VIDEOS_DIR", "~/Videos")
+
+    @property
+    def user_music_dir(self) -> str:
+        """:return: music directory tied to the user, e.g. ``~/Music``"""
+        return _get_user_media_dir("XDG_MUSIC_DIR", "~/Music")
+
+    @property
+    def user_desktop_dir(self) -> str:
+        """:return: desktop directory tied to the user, e.g. ``~/Desktop``"""
+        return _get_user_media_dir("XDG_DESKTOP_DIR", "~/Desktop")
+
+    @property
+    def user_runtime_dir(self) -> str:
+        """
+        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
+         ``$XDG_RUNTIME_DIR/$appname/$version``.
+
+         For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
+         exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
+         is not set.
+        """
+        path = os.environ.get("XDG_RUNTIME_DIR", "")
+        if not path.strip():
+            if sys.platform.startswith(("freebsd", "openbsd", "netbsd")):
+                path = f"/var/run/user/{getuid()}"
+                if not Path(path).exists():
+                    path = f"/tmp/runtime-{getuid()}"  # noqa: S108
+            else:
+                path = f"/run/user/{getuid()}"
+        return self._append_app_name_and_version(path)
+
+    @property
+    def site_runtime_dir(self) -> str:
+        """
+        :return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or \
+        ``$XDG_RUNTIME_DIR/$appname/$version``.
+
+        Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will
+        fall back to paths associated to the root user instead of a regular logged-in user if it's not set.
+
+        If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
+        instead.
+
+        For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.
+        """
+        path = os.environ.get("XDG_RUNTIME_DIR", "")
+        if not path.strip():
+            if sys.platform.startswith(("freebsd", "openbsd", "netbsd")):
+                path = "/var/run"
+            else:
+                path = "/run"
+        return self._append_app_name_and_version(path)
+
+    @property
+    def site_data_path(self) -> Path:
+        """:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
+        return self._first_item_as_path_if_multipath(self.site_data_dir)
+
+    @property
+    def site_config_path(self) -> Path:
+        """:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``"""
+        return self._first_item_as_path_if_multipath(self.site_config_dir)
+
+    @property
+    def site_cache_path(self) -> Path:
+        """:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``"""
+        return self._first_item_as_path_if_multipath(self.site_cache_dir)
+
+    def iter_config_dirs(self) -> Iterator[str]:
+        """:yield: all user and site configuration directories."""
+        yield self.user_config_dir
+        yield from self._site_config_dirs
+
+    def iter_data_dirs(self) -> Iterator[str]:
+        """:yield: all user and site data directories."""
+        yield self.user_data_dir
+        yield from self._site_data_dirs
+
+
+def _get_user_media_dir(env_var: str, fallback_tilde_path: str) -> str:
+    media_dir = _get_user_dirs_folder(env_var)
+    if media_dir is None:
+        media_dir = os.environ.get(env_var, "").strip()
+        if not media_dir:
+            media_dir = os.path.expanduser(fallback_tilde_path)  # noqa: PTH111
+
+    return media_dir
+
+
+def _get_user_dirs_folder(key: str) -> str | None:
+    """
+    Return directory from user-dirs.dirs config file.
+
+    See https://freedesktop.org/wiki/Software/xdg-user-dirs/.
+
+    """
+    user_dirs_config_path = Path(Unix().user_config_dir) / "user-dirs.dirs"
+    if user_dirs_config_path.exists():
+        parser = ConfigParser()
+
+        with user_dirs_config_path.open() as stream:
+            # Add fake section header, so ConfigParser doesn't complain
+            parser.read_string(f"[top]\n{stream.read()}")
+
+        if key not in parser["top"]:
+            return None
+
+        path = parser["top"][key].strip('"')
+        # Handle relative home paths
+        return path.replace("$HOME", os.path.expanduser("~"))  # noqa: PTH111
+
+    return None
+
+
+__all__ = [
+    "Unix",
+]
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py
new file mode 100644
index 0000000000000000000000000000000000000000..afb49243e3dee24315f75c2a9c7fbf20b4de4b5f
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py
@@ -0,0 +1,16 @@
+# file generated by setuptools_scm
+# don't change, don't track in version control
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+    from typing import Tuple, Union
+    VERSION_TUPLE = Tuple[Union[int, str], ...]
+else:
+    VERSION_TUPLE = object
+
+version: str
+__version__: str
+__version_tuple__: VERSION_TUPLE
+version_tuple: VERSION_TUPLE
+
+__version__ = version = '4.3.6'
+__version_tuple__ = version_tuple = (4, 3, 6)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py
new file mode 100644
index 0000000000000000000000000000000000000000..d7bc96091a2b1cd078a0847519cb5dd50a5d8898
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py
@@ -0,0 +1,272 @@
+"""Windows."""
+
+from __future__ import annotations
+
+import os
+import sys
+from functools import lru_cache
+from typing import TYPE_CHECKING
+
+from .api import PlatformDirsABC
+
+if TYPE_CHECKING:
+    from collections.abc import Callable
+
+
+class Windows(PlatformDirsABC):
+    """
+    `MSDN on where to store app data files `_.
+
+    Makes use of the `appname `, `appauthor
+    `, `version `, `roaming
+    `, `opinion `, `ensure_exists
+    `.
+
+    """
+
+    @property
+    def user_data_dir(self) -> str:
+        """
+        :return: data directory tied to the user, e.g.
+         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname`` (not roaming) or
+         ``%USERPROFILE%\\AppData\\Roaming\\$appauthor\\$appname`` (roaming)
+        """
+        const = "CSIDL_APPDATA" if self.roaming else "CSIDL_LOCAL_APPDATA"
+        path = os.path.normpath(get_win_folder(const))
+        return self._append_parts(path)
+
+    def _append_parts(self, path: str, *, opinion_value: str | None = None) -> str:
+        params = []
+        if self.appname:
+            if self.appauthor is not False:
+                author = self.appauthor or self.appname
+                params.append(author)
+            params.append(self.appname)
+            if opinion_value is not None and self.opinion:
+                params.append(opinion_value)
+            if self.version:
+                params.append(self.version)
+        path = os.path.join(path, *params)  # noqa: PTH118
+        self._optionally_create_directory(path)
+        return path
+
+    @property
+    def site_data_dir(self) -> str:
+        """:return: data directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname``"""
+        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
+        return self._append_parts(path)
+
+    @property
+    def user_config_dir(self) -> str:
+        """:return: config directory tied to the user, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def site_config_dir(self) -> str:
+        """:return: config directory shared by the users, same as `site_data_dir`"""
+        return self.site_data_dir
+
+    @property
+    def user_cache_dir(self) -> str:
+        """
+        :return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
+         ``%USERPROFILE%\\AppData\\Local\\$appauthor\\$appname\\Cache\\$version``
+        """
+        path = os.path.normpath(get_win_folder("CSIDL_LOCAL_APPDATA"))
+        return self._append_parts(path, opinion_value="Cache")
+
+    @property
+    def site_cache_dir(self) -> str:
+        """:return: cache directory shared by users, e.g. ``C:\\ProgramData\\$appauthor\\$appname\\Cache\\$version``"""
+        path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
+        return self._append_parts(path, opinion_value="Cache")
+
+    @property
+    def user_state_dir(self) -> str:
+        """:return: state directory tied to the user, same as `user_data_dir`"""
+        return self.user_data_dir
+
+    @property
+    def user_log_dir(self) -> str:
+        """:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it"""
+        path = self.user_data_dir
+        if self.opinion:
+            path = os.path.join(path, "Logs")  # noqa: PTH118
+            self._optionally_create_directory(path)
+        return path
+
+    @property
+    def user_documents_dir(self) -> str:
+        """:return: documents directory tied to the user e.g. ``%USERPROFILE%\\Documents``"""
+        return os.path.normpath(get_win_folder("CSIDL_PERSONAL"))
+
+    @property
+    def user_downloads_dir(self) -> str:
+        """:return: downloads directory tied to the user e.g. ``%USERPROFILE%\\Downloads``"""
+        return os.path.normpath(get_win_folder("CSIDL_DOWNLOADS"))
+
+    @property
+    def user_pictures_dir(self) -> str:
+        """:return: pictures directory tied to the user e.g. ``%USERPROFILE%\\Pictures``"""
+        return os.path.normpath(get_win_folder("CSIDL_MYPICTURES"))
+
+    @property
+    def user_videos_dir(self) -> str:
+        """:return: videos directory tied to the user e.g. ``%USERPROFILE%\\Videos``"""
+        return os.path.normpath(get_win_folder("CSIDL_MYVIDEO"))
+
+    @property
+    def user_music_dir(self) -> str:
+        """:return: music directory tied to the user e.g. ``%USERPROFILE%\\Music``"""
+        return os.path.normpath(get_win_folder("CSIDL_MYMUSIC"))
+
+    @property
+    def user_desktop_dir(self) -> str:
+        """:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\\Desktop``"""
+        return os.path.normpath(get_win_folder("CSIDL_DESKTOPDIRECTORY"))
+
+    @property
+    def user_runtime_dir(self) -> str:
+        """
+        :return: runtime directory tied to the user, e.g.
+         ``%USERPROFILE%\\AppData\\Local\\Temp\\$appauthor\\$appname``
+        """
+        path = os.path.normpath(os.path.join(get_win_folder("CSIDL_LOCAL_APPDATA"), "Temp"))  # noqa: PTH118
+        return self._append_parts(path)
+
+    @property
+    def site_runtime_dir(self) -> str:
+        """:return: runtime directory shared by users, same as `user_runtime_dir`"""
+        return self.user_runtime_dir
+
+
+def get_win_folder_from_env_vars(csidl_name: str) -> str:
+    """Get folder from environment variables."""
+    result = get_win_folder_if_csidl_name_not_env_var(csidl_name)
+    if result is not None:
+        return result
+
+    env_var_name = {
+        "CSIDL_APPDATA": "APPDATA",
+        "CSIDL_COMMON_APPDATA": "ALLUSERSPROFILE",
+        "CSIDL_LOCAL_APPDATA": "LOCALAPPDATA",
+    }.get(csidl_name)
+    if env_var_name is None:
+        msg = f"Unknown CSIDL name: {csidl_name}"
+        raise ValueError(msg)
+    result = os.environ.get(env_var_name)
+    if result is None:
+        msg = f"Unset environment variable: {env_var_name}"
+        raise ValueError(msg)
+    return result
+
+
+def get_win_folder_if_csidl_name_not_env_var(csidl_name: str) -> str | None:
+    """Get a folder for a CSIDL name that does not exist as an environment variable."""
+    if csidl_name == "CSIDL_PERSONAL":
+        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Documents")  # noqa: PTH118
+
+    if csidl_name == "CSIDL_DOWNLOADS":
+        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Downloads")  # noqa: PTH118
+
+    if csidl_name == "CSIDL_MYPICTURES":
+        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Pictures")  # noqa: PTH118
+
+    if csidl_name == "CSIDL_MYVIDEO":
+        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Videos")  # noqa: PTH118
+
+    if csidl_name == "CSIDL_MYMUSIC":
+        return os.path.join(os.path.normpath(os.environ["USERPROFILE"]), "Music")  # noqa: PTH118
+    return None
+
+
+def get_win_folder_from_registry(csidl_name: str) -> str:
+    """
+    Get folder from the registry.
+
+    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
+    for all CSIDL_* names.
+
+    """
+    shell_folder_name = {
+        "CSIDL_APPDATA": "AppData",
+        "CSIDL_COMMON_APPDATA": "Common AppData",
+        "CSIDL_LOCAL_APPDATA": "Local AppData",
+        "CSIDL_PERSONAL": "Personal",
+        "CSIDL_DOWNLOADS": "{374DE290-123F-4565-9164-39C4925E467B}",
+        "CSIDL_MYPICTURES": "My Pictures",
+        "CSIDL_MYVIDEO": "My Video",
+        "CSIDL_MYMUSIC": "My Music",
+    }.get(csidl_name)
+    if shell_folder_name is None:
+        msg = f"Unknown CSIDL name: {csidl_name}"
+        raise ValueError(msg)
+    if sys.platform != "win32":  # only needed for mypy type checker to know that this code runs only on Windows
+        raise NotImplementedError
+    import winreg  # noqa: PLC0415
+
+    key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders")
+    directory, _ = winreg.QueryValueEx(key, shell_folder_name)
+    return str(directory)
+
+
+def get_win_folder_via_ctypes(csidl_name: str) -> str:
+    """Get folder with ctypes."""
+    # There is no 'CSIDL_DOWNLOADS'.
+    # Use 'CSIDL_PROFILE' (40) and append the default folder 'Downloads' instead.
+    # https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
+
+    import ctypes  # noqa: PLC0415
+
+    csidl_const = {
+        "CSIDL_APPDATA": 26,
+        "CSIDL_COMMON_APPDATA": 35,
+        "CSIDL_LOCAL_APPDATA": 28,
+        "CSIDL_PERSONAL": 5,
+        "CSIDL_MYPICTURES": 39,
+        "CSIDL_MYVIDEO": 14,
+        "CSIDL_MYMUSIC": 13,
+        "CSIDL_DOWNLOADS": 40,
+        "CSIDL_DESKTOPDIRECTORY": 16,
+    }.get(csidl_name)
+    if csidl_const is None:
+        msg = f"Unknown CSIDL name: {csidl_name}"
+        raise ValueError(msg)
+
+    buf = ctypes.create_unicode_buffer(1024)
+    windll = getattr(ctypes, "windll")  # noqa: B009 # using getattr to avoid false positive with mypy type checker
+    windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
+
+    # Downgrade to short path name if it has high-bit chars.
+    if any(ord(c) > 255 for c in buf):  # noqa: PLR2004
+        buf2 = ctypes.create_unicode_buffer(1024)
+        if windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
+            buf = buf2
+
+    if csidl_name == "CSIDL_DOWNLOADS":
+        return os.path.join(buf.value, "Downloads")  # noqa: PTH118
+
+    return buf.value
+
+
+def _pick_get_win_folder() -> Callable[[str], str]:
+    try:
+        import ctypes  # noqa: PLC0415
+    except ImportError:
+        pass
+    else:
+        if hasattr(ctypes, "windll"):
+            return get_win_folder_via_ctypes
+    try:
+        import winreg  # noqa: PLC0415, F401
+    except ImportError:
+        return get_win_folder_from_env_vars
+    else:
+        return get_win_folder_from_registry
+
+
+get_win_folder = lru_cache(maxsize=None)(_pick_get_win_folder())
+
+__all__ = [
+    "Windows",
+]
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..60ae9bb85087bd5f458872157cec2929ddaaa3e5
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py
@@ -0,0 +1,82 @@
+"""
+    Pygments
+    ~~~~~~~~
+
+    Pygments is a syntax highlighting package written in Python.
+
+    It is a generic syntax highlighter for general use in all kinds of software
+    such as forum systems, wikis or other applications that need to prettify
+    source code. Highlights are:
+
+    * a wide range of common languages and markup formats is supported
+    * special attention is paid to details, increasing quality by a fair amount
+    * support for new languages and formats are added easily
+    * a number of output formats, presently HTML, LaTeX, RTF, SVG, all image
+      formats that PIL supports, and ANSI sequences
+    * it is usable as a command-line tool and as a library
+    * ... and it highlights even Brainfuck!
+
+    The `Pygments master branch`_ is installable with ``easy_install Pygments==dev``.
+
+    .. _Pygments master branch:
+       https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+from io import StringIO, BytesIO
+
+__version__ = '2.18.0'
+__docformat__ = 'restructuredtext'
+
+__all__ = ['lex', 'format', 'highlight']
+
+
+def lex(code, lexer):
+    """
+    Lex `code` with the `lexer` (must be a `Lexer` instance)
+    and return an iterable of tokens. Currently, this only calls
+    `lexer.get_tokens()`.
+    """
+    try:
+        return lexer.get_tokens(code)
+    except TypeError:
+        # Heuristic to catch a common mistake.
+        from pip._vendor.pygments.lexer import RegexLexer
+        if isinstance(lexer, type) and issubclass(lexer, RegexLexer):
+            raise TypeError('lex() argument must be a lexer instance, '
+                            'not a class')
+        raise
+
+
+def format(tokens, formatter, outfile=None):  # pylint: disable=redefined-builtin
+    """
+    Format ``tokens`` (an iterable of tokens) with the formatter ``formatter``
+    (a `Formatter` instance).
+
+    If ``outfile`` is given and a valid file object (an object with a
+    ``write`` method), the result will be written to it, otherwise it
+    is returned as a string.
+    """
+    try:
+        if not outfile:
+            realoutfile = getattr(formatter, 'encoding', None) and BytesIO() or StringIO()
+            formatter.format(tokens, realoutfile)
+            return realoutfile.getvalue()
+        else:
+            formatter.format(tokens, outfile)
+    except TypeError:
+        # Heuristic to catch a common mistake.
+        from pip._vendor.pygments.formatter import Formatter
+        if isinstance(formatter, type) and issubclass(formatter, Formatter):
+            raise TypeError('format() argument must be a formatter instance, '
+                            'not a class')
+        raise
+
+
+def highlight(code, lexer, formatter, outfile=None):
+    """
+    This is the most high-level highlighting function. It combines `lex` and
+    `format` in one function.
+    """
+    return format(lex(code, lexer), formatter, outfile)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py
new file mode 100644
index 0000000000000000000000000000000000000000..dcc6e5add71ffa9360c43c1cf7f4c2a2ed6a83bb
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py
@@ -0,0 +1,17 @@
+"""
+    pygments.__main__
+    ~~~~~~~~~~~~~~~~~
+
+    Main entry point for ``python -m pygments``.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+import sys
+from pip._vendor.pygments.cmdline import main
+
+try:
+    sys.exit(main(sys.argv))
+except KeyboardInterrupt:
+    sys.exit(1)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..69f53c783dfffbd9e83ba5a2b57e8f801e5743cb
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f18ed4f4688d9daad9f1d64499fabf2706f8f467
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1ce43bc5c93dc632504836b9f4286ef2a90a8585
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..68e1ee7f3207b19583c7d152cc183b3e86aca2c2
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7f1f98904ec64bf187a36e70c8ea71deb94613c7
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b3063470700832726c318d9db7d9fb72a671fac6
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e2d3e632610b4495e4595475dacca1624a22b505
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..81bbd406d6d840124f37b0e0bbab8e38af580378
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0572b68402b1efb12a012d5e58f222fef555ef60
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a2cef4826b35d1a55d5ead331c68721ba77bf1d9
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..26068d9a4303e3f94204e0b57d89d3f716a228ba
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5694159602a4bd41adcf2d40f4d28955296bdc61
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..56098a9e3a701ec5b1cccdad5e666125ab82efcc
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0c3ac4394c0cde91c6813ada2b38da30dee8820d
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a85de1bdc7d58c29e08dea1f705ac19ffe04f1d4
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..68105a2badf2f82265cf4993cb51c7b75a7d92ed
Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc differ
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py
new file mode 100644
index 0000000000000000000000000000000000000000..0a7072eff3e6c6e2d788a3988027496e73e89bdf
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py
@@ -0,0 +1,668 @@
+"""
+    pygments.cmdline
+    ~~~~~~~~~~~~~~~~
+
+    Command line interface.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+import os
+import sys
+import shutil
+import argparse
+from textwrap import dedent
+
+from pip._vendor.pygments import __version__, highlight
+from pip._vendor.pygments.util import ClassNotFound, OptionError, docstring_headline, \
+    guess_decode, guess_decode_from_terminal, terminal_encoding, \
+    UnclosingTextIOWrapper
+from pip._vendor.pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer, \
+    load_lexer_from_file, get_lexer_for_filename, find_lexer_class_for_filename
+from pip._vendor.pygments.lexers.special import TextLexer
+from pip._vendor.pygments.formatters.latex import LatexEmbeddedLexer, LatexFormatter
+from pip._vendor.pygments.formatters import get_all_formatters, get_formatter_by_name, \
+    load_formatter_from_file, get_formatter_for_filename, find_formatter_class
+from pip._vendor.pygments.formatters.terminal import TerminalFormatter
+from pip._vendor.pygments.formatters.terminal256 import Terminal256Formatter, TerminalTrueColorFormatter
+from pip._vendor.pygments.filters import get_all_filters, find_filter_class
+from pip._vendor.pygments.styles import get_all_styles, get_style_by_name
+
+
+def _parse_options(o_strs):
+    opts = {}
+    if not o_strs:
+        return opts
+    for o_str in o_strs:
+        if not o_str.strip():
+            continue
+        o_args = o_str.split(',')
+        for o_arg in o_args:
+            o_arg = o_arg.strip()
+            try:
+                o_key, o_val = o_arg.split('=', 1)
+                o_key = o_key.strip()
+                o_val = o_val.strip()
+            except ValueError:
+                opts[o_arg] = True
+            else:
+                opts[o_key] = o_val
+    return opts
+
+
+def _parse_filters(f_strs):
+    filters = []
+    if not f_strs:
+        return filters
+    for f_str in f_strs:
+        if ':' in f_str:
+            fname, fopts = f_str.split(':', 1)
+            filters.append((fname, _parse_options([fopts])))
+        else:
+            filters.append((f_str, {}))
+    return filters
+
+
+def _print_help(what, name):
+    try:
+        if what == 'lexer':
+            cls = get_lexer_by_name(name)
+            print(f"Help on the {cls.name} lexer:")
+            print(dedent(cls.__doc__))
+        elif what == 'formatter':
+            cls = find_formatter_class(name)
+            print(f"Help on the {cls.name} formatter:")
+            print(dedent(cls.__doc__))
+        elif what == 'filter':
+            cls = find_filter_class(name)
+            print(f"Help on the {name} filter:")
+            print(dedent(cls.__doc__))
+        return 0
+    except (AttributeError, ValueError):
+        print(f"{what} not found!", file=sys.stderr)
+        return 1
+
+
+def _print_list(what):
+    if what == 'lexer':
+        print()
+        print("Lexers:")
+        print("~~~~~~~")
+
+        info = []
+        for fullname, names, exts, _ in get_all_lexers():
+            tup = (', '.join(names)+':', fullname,
+                   exts and '(filenames ' + ', '.join(exts) + ')' or '')
+            info.append(tup)
+        info.sort()
+        for i in info:
+            print(('* {}\n    {} {}').format(*i))
+
+    elif what == 'formatter':
+        print()
+        print("Formatters:")
+        print("~~~~~~~~~~~")
+
+        info = []
+        for cls in get_all_formatters():
+            doc = docstring_headline(cls)
+            tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and
+                   '(filenames ' + ', '.join(cls.filenames) + ')' or '')
+            info.append(tup)
+        info.sort()
+        for i in info:
+            print(('* {}\n    {} {}').format(*i))
+
+    elif what == 'filter':
+        print()
+        print("Filters:")
+        print("~~~~~~~~")
+
+        for name in get_all_filters():
+            cls = find_filter_class(name)
+            print("* " + name + ':')
+            print(f"    {docstring_headline(cls)}")
+
+    elif what == 'style':
+        print()
+        print("Styles:")
+        print("~~~~~~~")
+
+        for name in get_all_styles():
+            cls = get_style_by_name(name)
+            print("* " + name + ':')
+            print(f"    {docstring_headline(cls)}")
+
+
+def _print_list_as_json(requested_items):
+    import json
+    result = {}
+    if 'lexer' in requested_items:
+        info = {}
+        for fullname, names, filenames, mimetypes in get_all_lexers():
+            info[fullname] = {
+                'aliases': names,
+                'filenames': filenames,
+                'mimetypes': mimetypes
+            }
+        result['lexers'] = info
+
+    if 'formatter' in requested_items:
+        info = {}
+        for cls in get_all_formatters():
+            doc = docstring_headline(cls)
+            info[cls.name] = {
+                'aliases': cls.aliases,
+                'filenames': cls.filenames,
+                'doc': doc
+            }
+        result['formatters'] = info
+
+    if 'filter' in requested_items:
+        info = {}
+        for name in get_all_filters():
+            cls = find_filter_class(name)
+            info[name] = {
+                'doc': docstring_headline(cls)
+            }
+        result['filters'] = info
+
+    if 'style' in requested_items:
+        info = {}
+        for name in get_all_styles():
+            cls = get_style_by_name(name)
+            info[name] = {
+                'doc': docstring_headline(cls)
+            }
+        result['styles'] = info
+
+    json.dump(result, sys.stdout)
+
+def main_inner(parser, argns):
+    if argns.help:
+        parser.print_help()
+        return 0
+
+    if argns.V:
+        print(f'Pygments version {__version__}, (c) 2006-2024 by Georg Brandl, Matthäus '
+              'Chajdas and contributors.')
+        return 0
+
+    def is_only_option(opt):
+        return not any(v for (k, v) in vars(argns).items() if k != opt)
+
+    # handle ``pygmentize -L``
+    if argns.L is not None:
+        arg_set = set()
+        for k, v in vars(argns).items():
+            if v:
+                arg_set.add(k)
+
+        arg_set.discard('L')
+        arg_set.discard('json')
+
+        if arg_set:
+            parser.print_help(sys.stderr)
+            return 2
+
+        # print version
+        if not argns.json:
+            main(['', '-V'])
+        allowed_types = {'lexer', 'formatter', 'filter', 'style'}
+        largs = [arg.rstrip('s') for arg in argns.L]
+        if any(arg not in allowed_types for arg in largs):
+            parser.print_help(sys.stderr)
+            return 0
+        if not largs:
+            largs = allowed_types
+        if not argns.json:
+            for arg in largs:
+                _print_list(arg)
+        else:
+            _print_list_as_json(largs)
+        return 0
+
+    # handle ``pygmentize -H``
+    if argns.H:
+        if not is_only_option('H'):
+            parser.print_help(sys.stderr)
+            return 2
+        what, name = argns.H
+        if what not in ('lexer', 'formatter', 'filter'):
+            parser.print_help(sys.stderr)
+            return 2
+        return _print_help(what, name)
+
+    # parse -O options
+    parsed_opts = _parse_options(argns.O or [])
+
+    # parse -P options
+    for p_opt in argns.P or []:
+        try:
+            name, value = p_opt.split('=', 1)
+        except ValueError:
+            parsed_opts[p_opt] = True
+        else:
+            parsed_opts[name] = value
+
+    # encodings
+    inencoding = parsed_opts.get('inencoding', parsed_opts.get('encoding'))
+    outencoding = parsed_opts.get('outencoding', parsed_opts.get('encoding'))
+
+    # handle ``pygmentize -N``
+    if argns.N:
+        lexer = find_lexer_class_for_filename(argns.N)
+        if lexer is None:
+            lexer = TextLexer
+
+        print(lexer.aliases[0])
+        return 0
+
+    # handle ``pygmentize -C``
+    if argns.C:
+        inp = sys.stdin.buffer.read()
+        try:
+            lexer = guess_lexer(inp, inencoding=inencoding)
+        except ClassNotFound:
+            lexer = TextLexer
+
+        print(lexer.aliases[0])
+        return 0
+
+    # handle ``pygmentize -S``
+    S_opt = argns.S
+    a_opt = argns.a
+    if S_opt is not None:
+        f_opt = argns.f
+        if not f_opt:
+            parser.print_help(sys.stderr)
+            return 2
+        if argns.l or argns.INPUTFILE:
+            parser.print_help(sys.stderr)
+            return 2
+
+        try:
+            parsed_opts['style'] = S_opt
+            fmter = get_formatter_by_name(f_opt, **parsed_opts)
+        except ClassNotFound as err:
+            print(err, file=sys.stderr)
+            return 1
+
+        print(fmter.get_style_defs(a_opt or ''))
+        return 0
+
+    # if no -S is given, -a is not allowed
+    if argns.a is not None:
+        parser.print_help(sys.stderr)
+        return 2
+
+    # parse -F options
+    F_opts = _parse_filters(argns.F or [])
+
+    # -x: allow custom (eXternal) lexers and formatters
+    allow_custom_lexer_formatter = bool(argns.x)
+
+    # select lexer
+    lexer = None
+
+    # given by name?
+    lexername = argns.l
+    if lexername:
+        # custom lexer, located relative to user's cwd
+        if allow_custom_lexer_formatter and '.py' in lexername:
+            try:
+                filename = None
+                name = None
+                if ':' in lexername:
+                    filename, name = lexername.rsplit(':', 1)
+
+                    if '.py' in name:
+                        # This can happen on Windows: If the lexername is
+                        # C:\lexer.py -- return to normal load path in that case
+                        name = None
+
+                if filename and name:
+                    lexer = load_lexer_from_file(filename, name,
+                                                 **parsed_opts)
+                else:
+                    lexer = load_lexer_from_file(lexername, **parsed_opts)
+            except ClassNotFound as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+        else:
+            try:
+                lexer = get_lexer_by_name(lexername, **parsed_opts)
+            except (OptionError, ClassNotFound) as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+
+    # read input code
+    code = None
+
+    if argns.INPUTFILE:
+        if argns.s:
+            print('Error: -s option not usable when input file specified',
+                  file=sys.stderr)
+            return 2
+
+        infn = argns.INPUTFILE
+        try:
+            with open(infn, 'rb') as infp:
+                code = infp.read()
+        except Exception as err:
+            print('Error: cannot read infile:', err, file=sys.stderr)
+            return 1
+        if not inencoding:
+            code, inencoding = guess_decode(code)
+
+        # do we have to guess the lexer?
+        if not lexer:
+            try:
+                lexer = get_lexer_for_filename(infn, code, **parsed_opts)
+            except ClassNotFound as err:
+                if argns.g:
+                    try:
+                        lexer = guess_lexer(code, **parsed_opts)
+                    except ClassNotFound:
+                        lexer = TextLexer(**parsed_opts)
+                else:
+                    print('Error:', err, file=sys.stderr)
+                    return 1
+            except OptionError as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+
+    elif not argns.s:  # treat stdin as full file (-s support is later)
+        # read code from terminal, always in binary mode since we want to
+        # decode ourselves and be tolerant with it
+        code = sys.stdin.buffer.read()  # use .buffer to get a binary stream
+        if not inencoding:
+            code, inencoding = guess_decode_from_terminal(code, sys.stdin)
+            # else the lexer will do the decoding
+        if not lexer:
+            try:
+                lexer = guess_lexer(code, **parsed_opts)
+            except ClassNotFound:
+                lexer = TextLexer(**parsed_opts)
+
+    else:  # -s option needs a lexer with -l
+        if not lexer:
+            print('Error: when using -s a lexer has to be selected with -l',
+                  file=sys.stderr)
+            return 2
+
+    # process filters
+    for fname, fopts in F_opts:
+        try:
+            lexer.add_filter(fname, **fopts)
+        except ClassNotFound as err:
+            print('Error:', err, file=sys.stderr)
+            return 1
+
+    # select formatter
+    outfn = argns.o
+    fmter = argns.f
+    if fmter:
+        # custom formatter, located relative to user's cwd
+        if allow_custom_lexer_formatter and '.py' in fmter:
+            try:
+                filename = None
+                name = None
+                if ':' in fmter:
+                    # Same logic as above for custom lexer
+                    filename, name = fmter.rsplit(':', 1)
+
+                    if '.py' in name:
+                        name = None
+
+                if filename and name:
+                    fmter = load_formatter_from_file(filename, name,
+                                                     **parsed_opts)
+                else:
+                    fmter = load_formatter_from_file(fmter, **parsed_opts)
+            except ClassNotFound as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+        else:
+            try:
+                fmter = get_formatter_by_name(fmter, **parsed_opts)
+            except (OptionError, ClassNotFound) as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+
+    if outfn:
+        if not fmter:
+            try:
+                fmter = get_formatter_for_filename(outfn, **parsed_opts)
+            except (OptionError, ClassNotFound) as err:
+                print('Error:', err, file=sys.stderr)
+                return 1
+        try:
+            outfile = open(outfn, 'wb')
+        except Exception as err:
+            print('Error: cannot open outfile:', err, file=sys.stderr)
+            return 1
+    else:
+        if not fmter:
+            if os.environ.get('COLORTERM','') in ('truecolor', '24bit'):
+                fmter = TerminalTrueColorFormatter(**parsed_opts)
+            elif '256' in os.environ.get('TERM', ''):
+                fmter = Terminal256Formatter(**parsed_opts)
+            else:
+                fmter = TerminalFormatter(**parsed_opts)
+        outfile = sys.stdout.buffer
+
+    # determine output encoding if not explicitly selected
+    if not outencoding:
+        if outfn:
+            # output file? use lexer encoding for now (can still be None)
+            fmter.encoding = inencoding
+        else:
+            # else use terminal encoding
+            fmter.encoding = terminal_encoding(sys.stdout)
+
+    # provide coloring under Windows, if possible
+    if not outfn and sys.platform in ('win32', 'cygwin') and \
+       fmter.name in ('Terminal', 'Terminal256'):  # pragma: no cover
+        # unfortunately colorama doesn't support binary streams on Py3
+        outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
+        fmter.encoding = None
+        try:
+            import colorama.initialise
+        except ImportError:
+            pass
+        else:
+            outfile = colorama.initialise.wrap_stream(
+                outfile, convert=None, strip=None, autoreset=False, wrap=True)
+
+    # When using the LaTeX formatter and the option `escapeinside` is
+    # specified, we need a special lexer which collects escaped text
+    # before running the chosen language lexer.
+    escapeinside = parsed_opts.get('escapeinside', '')
+    if len(escapeinside) == 2 and isinstance(fmter, LatexFormatter):
+        left = escapeinside[0]
+        right = escapeinside[1]
+        lexer = LatexEmbeddedLexer(left, right, lexer)
+
+    # ... and do it!
+    if not argns.s:
+        # process whole input as per normal...
+        try:
+            highlight(code, lexer, fmter, outfile)
+        finally:
+            if outfn:
+                outfile.close()
+        return 0
+    else:
+        # line by line processing of stdin (eg: for 'tail -f')...
+        try:
+            while 1:
+                line = sys.stdin.buffer.readline()
+                if not line:
+                    break
+                if not inencoding:
+                    line = guess_decode_from_terminal(line, sys.stdin)[0]
+                highlight(line, lexer, fmter, outfile)
+                if hasattr(outfile, 'flush'):
+                    outfile.flush()
+            return 0
+        except KeyboardInterrupt:  # pragma: no cover
+            return 0
+        finally:
+            if outfn:
+                outfile.close()
+
+
+class HelpFormatter(argparse.HelpFormatter):
+    def __init__(self, prog, indent_increment=2, max_help_position=16, width=None):
+        if width is None:
+            try:
+                width = shutil.get_terminal_size().columns - 2
+            except Exception:
+                pass
+        argparse.HelpFormatter.__init__(self, prog, indent_increment,
+                                        max_help_position, width)
+
+
+def main(args=sys.argv):
+    """
+    Main command line entry point.
+    """
+    desc = "Highlight an input file and write the result to an output file."
+    parser = argparse.ArgumentParser(description=desc, add_help=False,
+                                     formatter_class=HelpFormatter)
+
+    operation = parser.add_argument_group('Main operation')
+    lexersel = operation.add_mutually_exclusive_group()
+    lexersel.add_argument(
+        '-l', metavar='LEXER',
+        help='Specify the lexer to use.  (Query names with -L.)  If not '
+        'given and -g is not present, the lexer is guessed from the filename.')
+    lexersel.add_argument(
+        '-g', action='store_true',
+        help='Guess the lexer from the file contents, or pass through '
+        'as plain text if nothing can be guessed.')
+    operation.add_argument(
+        '-F', metavar='FILTER[:options]', action='append',
+        help='Add a filter to the token stream.  (Query names with -L.) '
+        'Filter options are given after a colon if necessary.')
+    operation.add_argument(
+        '-f', metavar='FORMATTER',
+        help='Specify the formatter to use.  (Query names with -L.) '
+        'If not given, the formatter is guessed from the output filename, '
+        'and defaults to the terminal formatter if the output is to the '
+        'terminal or an unknown file extension.')
+    operation.add_argument(
+        '-O', metavar='OPTION=value[,OPTION=value,...]', action='append',
+        help='Give options to the lexer and formatter as a comma-separated '
+        'list of key-value pairs. '
+        'Example: `-O bg=light,python=cool`.')
+    operation.add_argument(
+        '-P', metavar='OPTION=value', action='append',
+        help='Give a single option to the lexer and formatter - with this '
+        'you can pass options whose value contains commas and equal signs. '
+        'Example: `-P "heading=Pygments, the Python highlighter"`.')
+    operation.add_argument(
+        '-o', metavar='OUTPUTFILE',
+        help='Where to write the output.  Defaults to standard output.')
+
+    operation.add_argument(
+        'INPUTFILE', nargs='?',
+        help='Where to read the input.  Defaults to standard input.')
+
+    flags = parser.add_argument_group('Operation flags')
+    flags.add_argument(
+        '-v', action='store_true',
+        help='Print a detailed traceback on unhandled exceptions, which '
+        'is useful for debugging and bug reports.')
+    flags.add_argument(
+        '-s', action='store_true',
+        help='Process lines one at a time until EOF, rather than waiting to '
+        'process the entire file.  This only works for stdin, only for lexers '
+        'with no line-spanning constructs, and is intended for streaming '
+        'input such as you get from `tail -f`. '
+        'Example usage: `tail -f sql.log | pygmentize -s -l sql`.')
+    flags.add_argument(
+        '-x', action='store_true',
+        help='Allow custom lexers and formatters to be loaded from a .py file '
+        'relative to the current working directory. For example, '
+        '`-l ./customlexer.py -x`. By default, this option expects a file '
+        'with a class named CustomLexer or CustomFormatter; you can also '
+        'specify your own class name with a colon (`-l ./lexer.py:MyLexer`). '
+        'Users should be very careful not to use this option with untrusted '
+        'files, because it will import and run them.')
+    flags.add_argument('--json', help='Output as JSON. This can '
+        'be only used in conjunction with -L.',
+        default=False,
+        action='store_true')
+
+    special_modes_group = parser.add_argument_group(
+        'Special modes - do not do any highlighting')
+    special_modes = special_modes_group.add_mutually_exclusive_group()
+    special_modes.add_argument(
+        '-S', metavar='STYLE -f formatter',
+        help='Print style definitions for STYLE for a formatter '
+        'given with -f. The argument given by -a is formatter '
+        'dependent.')
+    special_modes.add_argument(
+        '-L', nargs='*', metavar='WHAT',
+        help='List lexers, formatters, styles or filters -- '
+        'give additional arguments for the thing(s) you want to list '
+        '(e.g. "styles"), or omit them to list everything.')
+    special_modes.add_argument(
+        '-N', metavar='FILENAME',
+        help='Guess and print out a lexer name based solely on the given '
+        'filename. Does not take input or highlight anything. If no specific '
+        'lexer can be determined, "text" is printed.')
+    special_modes.add_argument(
+        '-C', action='store_true',
+        help='Like -N, but print out a lexer name based solely on '
+        'a given content from standard input.')
+    special_modes.add_argument(
+        '-H', action='store', nargs=2, metavar=('NAME', 'TYPE'),
+        help='Print detailed help for the object  of type , '
+        'where  is one of "lexer", "formatter" or "filter".')
+    special_modes.add_argument(
+        '-V', action='store_true',
+        help='Print the package version.')
+    special_modes.add_argument(
+        '-h', '--help', action='store_true',
+        help='Print this help.')
+    special_modes_group.add_argument(
+        '-a', metavar='ARG',
+        help='Formatter-specific additional argument for the -S (print '
+        'style sheet) mode.')
+
+    argns = parser.parse_args(args[1:])
+
+    try:
+        return main_inner(parser, argns)
+    except BrokenPipeError:
+        # someone closed our stdout, e.g. by quitting a pager.
+        return 0
+    except Exception:
+        if argns.v:
+            print(file=sys.stderr)
+            print('*' * 65, file=sys.stderr)
+            print('An unhandled exception occurred while highlighting.',
+                  file=sys.stderr)
+            print('Please report the whole traceback to the issue tracker at',
+                  file=sys.stderr)
+            print('.',
+                  file=sys.stderr)
+            print('*' * 65, file=sys.stderr)
+            print(file=sys.stderr)
+            raise
+        import traceback
+        info = traceback.format_exception(*sys.exc_info())
+        msg = info[-1].strip()
+        if len(info) >= 3:
+            # extract relevant file and position info
+            msg += '\n   (f{})'.format(info[-2].split('\n')[0].strip()[1:])
+        print(file=sys.stderr)
+        print('*** Error while highlighting:', file=sys.stderr)
+        print(msg, file=sys.stderr)
+        print('*** If this is a bug you want to report, please rerun with -v.',
+              file=sys.stderr)
+        return 1
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/console.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/console.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c1a06219ca7772f4ef9c31327ada3648701a2dc
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/console.py
@@ -0,0 +1,70 @@
+"""
+    pygments.console
+    ~~~~~~~~~~~~~~~~
+
+    Format colored console output.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+esc = "\x1b["
+
+codes = {}
+codes[""] = ""
+codes["reset"] = esc + "39;49;00m"
+
+codes["bold"] = esc + "01m"
+codes["faint"] = esc + "02m"
+codes["standout"] = esc + "03m"
+codes["underline"] = esc + "04m"
+codes["blink"] = esc + "05m"
+codes["overline"] = esc + "06m"
+
+dark_colors = ["black", "red", "green", "yellow", "blue",
+               "magenta", "cyan", "gray"]
+light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brightblue",
+                "brightmagenta", "brightcyan", "white"]
+
+x = 30
+for dark, light in zip(dark_colors, light_colors):
+    codes[dark] = esc + "%im" % x
+    codes[light] = esc + "%im" % (60 + x)
+    x += 1
+
+del dark, light, x
+
+codes["white"] = codes["bold"]
+
+
+def reset_color():
+    return codes["reset"]
+
+
+def colorize(color_key, text):
+    return codes[color_key] + text + codes["reset"]
+
+
+def ansiformat(attr, text):
+    """
+    Format ``text`` with a color and/or some attributes::
+
+        color       normal color
+        *color*     bold color
+        _color_     underlined color
+        +color+     blinking color
+    """
+    result = []
+    if attr[:1] == attr[-1:] == '+':
+        result.append(codes['blink'])
+        attr = attr[1:-1]
+    if attr[:1] == attr[-1:] == '*':
+        result.append(codes['bold'])
+        attr = attr[1:-1]
+    if attr[:1] == attr[-1:] == '_':
+        result.append(codes['underline'])
+        attr = attr[1:-1]
+    result.append(codes[attr])
+    result.append(text)
+    result.append(codes['reset'])
+    return ''.join(result)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py
new file mode 100644
index 0000000000000000000000000000000000000000..aa6f76041b65b2e8a0545493d6bd1afc2f34d668
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py
@@ -0,0 +1,70 @@
+"""
+    pygments.filter
+    ~~~~~~~~~~~~~~~
+
+    Module that implements the default filter.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+
+def apply_filters(stream, filters, lexer=None):
+    """
+    Use this method to apply an iterable of filters to
+    a stream. If lexer is given it's forwarded to the
+    filter, otherwise the filter receives `None`.
+    """
+    def _apply(filter_, stream):
+        yield from filter_.filter(lexer, stream)
+    for filter_ in filters:
+        stream = _apply(filter_, stream)
+    return stream
+
+
+def simplefilter(f):
+    """
+    Decorator that converts a function into a filter::
+
+        @simplefilter
+        def lowercase(self, lexer, stream, options):
+            for ttype, value in stream:
+                yield ttype, value.lower()
+    """
+    return type(f.__name__, (FunctionFilter,), {
+        '__module__': getattr(f, '__module__'),
+        '__doc__': f.__doc__,
+        'function': f,
+    })
+
+
+class Filter:
+    """
+    Default filter. Subclass this class or use the `simplefilter`
+    decorator to create own filters.
+    """
+
+    def __init__(self, **options):
+        self.options = options
+
+    def filter(self, lexer, stream):
+        raise NotImplementedError()
+
+
+class FunctionFilter(Filter):
+    """
+    Abstract class used by `simplefilter` to create simple
+    function filters on the fly. The `simplefilter` decorator
+    automatically creates subclasses of this class for
+    functions passed to it.
+    """
+    function = None
+
+    def __init__(self, **options):
+        if not hasattr(self, 'function'):
+            raise TypeError(f'{self.__class__.__name__!r} used without bound function')
+        Filter.__init__(self, **options)
+
+    def filter(self, lexer, stream):
+        # pylint: disable=not-callable
+        yield from self.function(lexer, stream, self.options)
diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..9255ca224db98a0aa8022e456bc37acdd4e15e05
--- /dev/null
+++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py
@@ -0,0 +1,940 @@
+"""
+    pygments.filters
+    ~~~~~~~~~~~~~~~~
+
+    Module containing filter lookup functions and default
+    filters.
+
+    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+import re
+
+from pip._vendor.pygments.token import String, Comment, Keyword, Name, Error, Whitespace, \
+    string_to_tokentype
+from pip._vendor.pygments.filter import Filter
+from pip._vendor.pygments.util import get_list_opt, get_int_opt, get_bool_opt, \
+    get_choice_opt, ClassNotFound, OptionError
+from pip._vendor.pygments.plugin import find_plugin_filters
+
+
+def find_filter_class(filtername):
+    """Lookup a filter by name. Return None if not found."""
+    if filtername in FILTERS:
+        return FILTERS[filtername]
+    for name, cls in find_plugin_filters():
+        if name == filtername:
+            return cls
+    return None
+
+
+def get_filter_by_name(filtername, **options):
+    """Return an instantiated filter.
+
+    Options are passed to the filter initializer if wanted.
+    Raise a ClassNotFound if not found.
+    """
+    cls = find_filter_class(filtername)
+    if cls:
+        return cls(**options)
+    else:
+        raise ClassNotFound(f'filter {filtername!r} not found')
+
+
+def get_all_filters():
+    """Return a generator of all filter names."""
+    yield from FILTERS
+    for name, _ in find_plugin_filters():
+        yield name
+
+
+def _replace_special(ttype, value, regex, specialttype,
+                     replacefunc=lambda x: x):
+    last = 0
+    for match in regex.finditer(value):
+        start, end = match.start(), match.end()
+        if start != last:
+            yield ttype, value[last:start]
+        yield specialttype, replacefunc(value[start:end])
+        last = end
+    if last != len(value):
+        yield ttype, value[last:]
+
+
+class CodeTagFilter(Filter):
+    """Highlight special code tags in comments and docstrings.
+
+    Options accepted:
+
+    `codetags` : list of strings
+       A list of strings that are flagged as code tags.  The default is to
+       highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``.
+
+    .. versionchanged:: 2.13
+       Now recognizes ``FIXME`` by default.
+    """
+
+    def __init__(self, **options):
+        Filter.__init__(self, **options)
+        tags = get_list_opt(options, 'codetags',
+                            ['XXX', 'TODO', 'FIXME', 'BUG', 'NOTE'])
+        self.tag_re = re.compile(r'\b({})\b'.format('|'.join([
+            re.escape(tag) for tag in tags if tag
+        ])))
+
+    def filter(self, lexer, stream):
+        regex = self.tag_re
+        for ttype, value in stream:
+            if ttype in String.Doc or \
+               ttype in Comment and \
+               ttype not in Comment.Preproc:
+                yield from _replace_special(ttype, value, regex, Comment.Special)
+            else:
+                yield ttype, value
+
+
+class SymbolFilter(Filter):
+    """Convert mathematical symbols such as \\ in Isabelle
+    or \\longrightarrow in LaTeX into Unicode characters.
+
+    This is mostly useful for HTML or console output when you want to
+    approximate the source rendering you'd see in an IDE.
+
+    Options accepted:
+
+    `lang` : string
+       The symbol language. Must be one of ``'isabelle'`` or
+       ``'latex'``.  The default is ``'isabelle'``.
+    """
+
+    latex_symbols = {
+        '\\alpha'                : '\U000003b1',
+        '\\beta'                 : '\U000003b2',
+        '\\gamma'                : '\U000003b3',
+        '\\delta'                : '\U000003b4',
+        '\\varepsilon'           : '\U000003b5',
+        '\\zeta'                 : '\U000003b6',
+        '\\eta'                  : '\U000003b7',
+        '\\vartheta'             : '\U000003b8',
+        '\\iota'                 : '\U000003b9',
+        '\\kappa'                : '\U000003ba',
+        '\\lambda'               : '\U000003bb',
+        '\\mu'                   : '\U000003bc',
+        '\\nu'                   : '\U000003bd',
+        '\\xi'                   : '\U000003be',
+        '\\pi'                   : '\U000003c0',
+        '\\varrho'               : '\U000003c1',
+        '\\sigma'                : '\U000003c3',
+        '\\tau'                  : '\U000003c4',
+        '\\upsilon'              : '\U000003c5',
+        '\\varphi'               : '\U000003c6',
+        '\\chi'                  : '\U000003c7',
+        '\\psi'                  : '\U000003c8',
+        '\\omega'                : '\U000003c9',
+        '\\Gamma'                : '\U00000393',
+        '\\Delta'                : '\U00000394',
+        '\\Theta'                : '\U00000398',
+        '\\Lambda'               : '\U0000039b',
+        '\\Xi'                   : '\U0000039e',
+        '\\Pi'                   : '\U000003a0',
+        '\\Sigma'                : '\U000003a3',
+        '\\Upsilon'              : '\U000003a5',
+        '\\Phi'                  : '\U000003a6',
+        '\\Psi'                  : '\U000003a8',
+        '\\Omega'                : '\U000003a9',
+        '\\leftarrow'            : '\U00002190',
+        '\\longleftarrow'        : '\U000027f5',
+        '\\rightarrow'           : '\U00002192',
+        '\\longrightarrow'       : '\U000027f6',
+        '\\Leftarrow'            : '\U000021d0',
+        '\\Longleftarrow'        : '\U000027f8',
+        '\\Rightarrow'           : '\U000021d2',
+        '\\Longrightarrow'       : '\U000027f9',
+        '\\leftrightarrow'       : '\U00002194',
+        '\\longleftrightarrow'   : '\U000027f7',
+        '\\Leftrightarrow'       : '\U000021d4',
+        '\\Longleftrightarrow'   : '\U000027fa',
+        '\\mapsto'               : '\U000021a6',
+        '\\longmapsto'           : '\U000027fc',
+        '\\relbar'               : '\U00002500',
+        '\\Relbar'               : '\U00002550',
+        '\\hookleftarrow'        : '\U000021a9',
+        '\\hookrightarrow'       : '\U000021aa',
+        '\\leftharpoondown'      : '\U000021bd',
+        '\\rightharpoondown'     : '\U000021c1',
+        '\\leftharpoonup'        : '\U000021bc',
+        '\\rightharpoonup'       : '\U000021c0',
+        '\\rightleftharpoons'    : '\U000021cc',
+        '\\leadsto'              : '\U0000219d',
+        '\\downharpoonleft'      : '\U000021c3',
+        '\\downharpoonright'     : '\U000021c2',
+        '\\upharpoonleft'        : '\U000021bf',
+        '\\upharpoonright'       : '\U000021be',
+        '\\restriction'          : '\U000021be',
+        '\\uparrow'              : '\U00002191',
+        '\\Uparrow'              : '\U000021d1',
+        '\\downarrow'            : '\U00002193',
+        '\\Downarrow'            : '\U000021d3',
+        '\\updownarrow'          : '\U00002195',
+        '\\Updownarrow'          : '\U000021d5',
+        '\\langle'               : '\U000027e8',
+        '\\rangle'               : '\U000027e9',
+        '\\lceil'                : '\U00002308',
+        '\\rceil'                : '\U00002309',
+        '\\lfloor'               : '\U0000230a',
+        '\\rfloor'               : '\U0000230b',
+        '\\flqq'                 : '\U000000ab',
+        '\\frqq'                 : '\U000000bb',
+        '\\bot'                  : '\U000022a5',
+        '\\top'                  : '\U000022a4',
+        '\\wedge'                : '\U00002227',
+        '\\bigwedge'             : '\U000022c0',
+        '\\vee'                  : '\U00002228',
+        '\\bigvee'               : '\U000022c1',
+        '\\forall'               : '\U00002200',
+        '\\exists'               : '\U00002203',
+        '\\nexists'              : '\U00002204',
+        '\\neg'                  : '\U000000ac',
+        '\\Box'                  : '\U000025a1',
+        '\\Diamond'              : '\U000025c7',
+        '\\vdash'                : '\U000022a2',
+        '\\models'               : '\U000022a8',
+        '\\dashv'                : '\U000022a3',
+        '\\surd'                 : '\U0000221a',
+        '\\le'                   : '\U00002264',
+        '\\ge'                   : '\U00002265',
+        '\\ll'                   : '\U0000226a',
+        '\\gg'                   : '\U0000226b',
+        '\\lesssim'              : '\U00002272',
+        '\\gtrsim'               : '\U00002273',
+        '\\lessapprox'           : '\U00002a85',
+        '\\gtrapprox'            : '\U00002a86',
+        '\\in'                   : '\U00002208',
+        '\\notin'                : '\U00002209',
+        '\\subset'               : '\U00002282',
+        '\\supset'               : '\U00002283',
+        '\\subseteq'             : '\U00002286',
+        '\\supseteq'             : '\U00002287',
+        '\\sqsubset'             : '\U0000228f',
+        '\\sqsupset'             : '\U00002290',
+        '\\sqsubseteq'           : '\U00002291',
+        '\\sqsupseteq'           : '\U00002292',
+        '\\cap'                  : '\U00002229',
+        '\\bigcap'               : '\U000022c2',
+        '\\cup'                  : '\U0000222a',
+        '\\bigcup'               : '\U000022c3',
+        '\\sqcup'                : '\U00002294',
+        '\\bigsqcup'             : '\U00002a06',
+        '\\sqcap'                : '\U00002293',
+        '\\Bigsqcap'             : '\U00002a05',
+        '\\setminus'             : '\U00002216',
+        '\\propto'               : '\U0000221d',
+        '\\uplus'                : '\U0000228e',
+        '\\bigplus'              : '\U00002a04',
+        '\\sim'                  : '\U0000223c',
+        '\\doteq'                : '\U00002250',
+        '\\simeq'                : '\U00002243',
+        '\\approx'               : '\U00002248',
+        '\\asymp'                : '\U0000224d',
+        '\\cong'                 : '\U00002245',
+        '\\equiv'                : '\U00002261',
+        '\\Join'                 : '\U000022c8',
+        '\\bowtie'               : '\U00002a1d',
+        '\\prec'                 : '\U0000227a',
+        '\\succ'                 : '\U0000227b',
+        '\\preceq'               : '\U0000227c',
+        '\\succeq'               : '\U0000227d',
+        '\\parallel'             : '\U00002225',
+        '\\mid'                  : '\U000000a6',
+        '\\pm'                   : '\U000000b1',
+        '\\mp'                   : '\U00002213',
+        '\\times'                : '\U000000d7',
+        '\\div'                  : '\U000000f7',
+        '\\cdot'                 : '\U000022c5',
+        '\\star'                 : '\U000022c6',
+        '\\circ'                 : '\U00002218',
+        '\\dagger'               : '\U00002020',
+        '\\ddagger'              : '\U00002021',
+        '\\lhd'                  : '\U000022b2',
+        '\\rhd'                  : '\U000022b3',
+        '\\unlhd'                : '\U000022b4',
+        '\\unrhd'                : '\U000022b5',
+        '\\triangleleft'         : '\U000025c3',
+        '\\triangleright'        : '\U000025b9',
+        '\\triangle'             : '\U000025b3',
+        '\\triangleq'            : '\U0000225c',
+        '\\oplus'                : '\U00002295',
+        '\\bigoplus'             : '\U00002a01',
+        '\\otimes'               : '\U00002297',
+        '\\bigotimes'            : '\U00002a02',
+        '\\odot'                 : '\U00002299',
+        '\\bigodot'              : '\U00002a00',
+        '\\ominus'               : '\U00002296',
+        '\\oslash'               : '\U00002298',
+        '\\dots'                 : '\U00002026',
+        '\\cdots'                : '\U000022ef',
+        '\\sum'                  : '\U00002211',
+        '\\prod'                 : '\U0000220f',
+        '\\coprod'               : '\U00002210',
+        '\\infty'                : '\U0000221e',
+        '\\int'                  : '\U0000222b',
+        '\\oint'                 : '\U0000222e',
+        '\\clubsuit'             : '\U00002663',
+        '\\diamondsuit'          : '\U00002662',
+        '\\heartsuit'            : '\U00002661',
+        '\\spadesuit'            : '\U00002660',
+        '\\aleph'                : '\U00002135',
+        '\\emptyset'             : '\U00002205',
+        '\\nabla'                : '\U00002207',
+        '\\partial'              : '\U00002202',
+        '\\flat'                 : '\U0000266d',
+        '\\natural'              : '\U0000266e',
+        '\\sharp'                : '\U0000266f',
+        '\\angle'                : '\U00002220',
+        '\\copyright'            : '\U000000a9',
+        '\\textregistered'       : '\U000000ae',
+        '\\textonequarter'       : '\U000000bc',
+        '\\textonehalf'          : '\U000000bd',
+        '\\textthreequarters'    : '\U000000be',
+        '\\textordfeminine'      : '\U000000aa',
+        '\\textordmasculine'     : '\U000000ba',
+        '\\euro'                 : '\U000020ac',
+        '\\pounds'               : '\U000000a3',
+        '\\yen'                  : '\U000000a5',
+        '\\textcent'             : '\U000000a2',
+        '\\textcurrency'         : '\U000000a4',
+        '\\textdegree'           : '\U000000b0',
+    }
+
+    isabelle_symbols = {
+        '\\'                 : '\U0001d7ec',
+        '\\'                  : '\U0001d7ed',
+        '\\'                  : '\U0001d7ee',
+        '\\'                : '\U0001d7ef',
+        '\\'                 : '\U0001d7f0',
+        '\\'                 : '\U0001d7f1',
+        '\\'                  : '\U0001d7f2',
+        '\\'                : '\U0001d7f3',
+        '\\'                : '\U0001d7f4',
+        '\\'                 : '\U0001d7f5',
+        '\\'                    : '\U0001d49c',
+        '\\'                    : '\U0000212c',
+        '\\'                    : '\U0001d49e',
+        '\\'                    : '\U0001d49f',
+        '\\'                    : '\U00002130',
+        '\\'                    : '\U00002131',
+        '\\'                    : '\U0001d4a2',
+        '\\'                    : '\U0000210b',
+        '\\'                    : '\U00002110',
+        '\\'                    : '\U0001d4a5',
+        '\\'                    : '\U0001d4a6',
+        '\\'                    : '\U00002112',
+        '\\'                    : '\U00002133',
+        '\\'                    : '\U0001d4a9',
+        '\\'                    : '\U0001d4aa',
+        '\\

' : '\U0001d5c9', + '\\' : '\U0001d5ca', + '\\' : '\U0001d5cb', + '\\' : '\U0001d5cc', + '\\' : '\U0001d5cd', + '\\' : '\U0001d5ce', + '\\' : '\U0001d5cf', + '\\' : '\U0001d5d0', + '\\' : '\U0001d5d1', + '\\' : '\U0001d5d2', + '\\' : '\U0001d5d3', + '\\' : '\U0001d504', + '\\' : '\U0001d505', + '\\' : '\U0000212d', + '\\

' : '\U0001d507', + '\\' : '\U0001d508', + '\\' : '\U0001d509', + '\\' : '\U0001d50a', + '\\' : '\U0000210c', + '\\' : '\U00002111', + '\\' : '\U0001d50d', + '\\' : '\U0001d50e', + '\\' : '\U0001d50f', + '\\' : '\U0001d510', + '\\' : '\U0001d511', + '\\' : '\U0001d512', + '\\' : '\U0001d513', + '\\' : '\U0001d514', + '\\' : '\U0000211c', + '\\' : '\U0001d516', + '\\' : '\U0001d517', + '\\' : '\U0001d518', + '\\' : '\U0001d519', + '\\' : '\U0001d51a', + '\\' : '\U0001d51b', + '\\' : '\U0001d51c', + '\\' : '\U00002128', + '\\' : '\U0001d51e', + '\\' : '\U0001d51f', + '\\' : '\U0001d520', + '\\
' : '\U0001d521', + '\\' : '\U0001d522', + '\\' : '\U0001d523', + '\\' : '\U0001d524', + '\\' : '\U0001d525', + '\\' : '\U0001d526', + '\\' : '\U0001d527', + '\\' : '\U0001d528', + '\\' : '\U0001d529', + '\\' : '\U0001d52a', + '\\' : '\U0001d52b', + '\\' : '\U0001d52c', + '\\' : '\U0001d52d', + '\\' : '\U0001d52e', + '\\' : '\U0001d52f', + '\\' : '\U0001d530', + '\\' : '\U0001d531', + '\\' : '\U0001d532', + '\\' : '\U0001d533', + '\\' : '\U0001d534', + '\\' : '\U0001d535', + '\\' : '\U0001d536', + '\\' : '\U0001d537', + '\\' : '\U000003b1', + '\\' : '\U000003b2', + '\\' : '\U000003b3', + '\\' : '\U000003b4', + '\\' : '\U000003b5', + '\\' : '\U000003b6', + '\\' : '\U000003b7', + '\\' : '\U000003b8', + '\\' : '\U000003b9', + '\\' : '\U000003ba', + '\\' : '\U000003bb', + '\\' : '\U000003bc', + '\\' : '\U000003bd', + '\\' : '\U000003be', + '\\' : '\U000003c0', + '\\' : '\U000003c1', + '\\' : '\U000003c3', + '\\' : '\U000003c4', + '\\' : '\U000003c5', + '\\' : '\U000003c6', + '\\' : '\U000003c7', + '\\' : '\U000003c8', + '\\' : '\U000003c9', + '\\' : '\U00000393', + '\\' : '\U00000394', + '\\' : '\U00000398', + '\\' : '\U0000039b', + '\\' : '\U0000039e', + '\\' : '\U000003a0', + '\\' : '\U000003a3', + '\\' : '\U000003a5', + '\\' : '\U000003a6', + '\\' : '\U000003a8', + '\\' : '\U000003a9', + '\\' : '\U0001d539', + '\\' : '\U00002102', + '\\' : '\U00002115', + '\\' : '\U0000211a', + '\\' : '\U0000211d', + '\\' : '\U00002124', + '\\' : '\U00002190', + '\\' : '\U000027f5', + '\\' : '\U00002192', + '\\' : '\U000027f6', + '\\' : '\U000021d0', + '\\' : '\U000027f8', + '\\' : '\U000021d2', + '\\' : '\U000027f9', + '\\' : '\U00002194', + '\\' : '\U000027f7', + '\\' : '\U000021d4', + '\\' : '\U000027fa', + '\\' : '\U000021a6', + '\\' : '\U000027fc', + '\\' : '\U00002500', + '\\' : '\U00002550', + '\\' : '\U000021a9', + '\\' : '\U000021aa', + '\\' : '\U000021bd', + '\\' : '\U000021c1', + '\\' : '\U000021bc', + '\\' : '\U000021c0', + '\\' : '\U000021cc', + '\\' : '\U0000219d', + '\\' : '\U000021c3', + '\\' : '\U000021c2', + '\\' : '\U000021bf', + '\\' : '\U000021be', + '\\' : '\U000021be', + '\\' : '\U00002237', + '\\' : '\U00002191', + '\\' : '\U000021d1', + '\\' : '\U00002193', + '\\' : '\U000021d3', + '\\' : '\U00002195', + '\\' : '\U000021d5', + '\\' : '\U000027e8', + '\\' : '\U000027e9', + '\\' : '\U00002308', + '\\' : '\U00002309', + '\\' : '\U0000230a', + '\\' : '\U0000230b', + '\\' : '\U00002987', + '\\' : '\U00002988', + '\\' : '\U000027e6', + '\\' : '\U000027e7', + '\\' : '\U00002983', + '\\' : '\U00002984', + '\\' : '\U000000ab', + '\\' : '\U000000bb', + '\\' : '\U000022a5', + '\\' : '\U000022a4', + '\\' : '\U00002227', + '\\' : '\U000022c0', + '\\' : '\U00002228', + '\\' : '\U000022c1', + '\\' : '\U00002200', + '\\' : '\U00002203', + '\\' : '\U00002204', + '\\' : '\U000000ac', + '\\' : '\U000025a1', + '\\' : '\U000025c7', + '\\' : '\U000022a2', + '\\' : '\U000022a8', + '\\' : '\U000022a9', + '\\' : '\U000022ab', + '\\' : '\U000022a3', + '\\' : '\U0000221a', + '\\' : '\U00002264', + '\\' : '\U00002265', + '\\' : '\U0000226a', + '\\' : '\U0000226b', + '\\' : '\U00002272', + '\\' : '\U00002273', + '\\' : '\U00002a85', + '\\' : '\U00002a86', + '\\' : '\U00002208', + '\\' : '\U00002209', + '\\' : '\U00002282', + '\\' : '\U00002283', + '\\' : '\U00002286', + '\\' : '\U00002287', + '\\' : '\U0000228f', + '\\' : '\U00002290', + '\\' : '\U00002291', + '\\' : '\U00002292', + '\\' : '\U00002229', + '\\' : '\U000022c2', + '\\' : '\U0000222a', + '\\' : '\U000022c3', + '\\' : '\U00002294', + '\\' : '\U00002a06', + '\\' : '\U00002293', + '\\' : '\U00002a05', + '\\' : '\U00002216', + '\\' : '\U0000221d', + '\\' : '\U0000228e', + '\\' : '\U00002a04', + '\\' : '\U00002260', + '\\' : '\U0000223c', + '\\' : '\U00002250', + '\\' : '\U00002243', + '\\' : '\U00002248', + '\\' : '\U0000224d', + '\\' : '\U00002245', + '\\' : '\U00002323', + '\\' : '\U00002261', + '\\' : '\U00002322', + '\\' : '\U000022c8', + '\\' : '\U00002a1d', + '\\' : '\U0000227a', + '\\' : '\U0000227b', + '\\' : '\U0000227c', + '\\' : '\U0000227d', + '\\' : '\U00002225', + '\\' : '\U000000a6', + '\\' : '\U000000b1', + '\\' : '\U00002213', + '\\' : '\U000000d7', + '\\
' : '\U000000f7', + '\\' : '\U000022c5', + '\\' : '\U000022c6', + '\\' : '\U00002219', + '\\' : '\U00002218', + '\\' : '\U00002020', + '\\' : '\U00002021', + '\\' : '\U000022b2', + '\\' : '\U000022b3', + '\\' : '\U000022b4', + '\\' : '\U000022b5', + '\\' : '\U000025c3', + '\\' : '\U000025b9', + '\\' : '\U000025b3', + '\\' : '\U0000225c', + '\\' : '\U00002295', + '\\' : '\U00002a01', + '\\' : '\U00002297', + '\\' : '\U00002a02', + '\\' : '\U00002299', + '\\' : '\U00002a00', + '\\' : '\U00002296', + '\\' : '\U00002298', + '\\' : '\U00002026', + '\\' : '\U000022ef', + '\\' : '\U00002211', + '\\' : '\U0000220f', + '\\' : '\U00002210', + '\\' : '\U0000221e', + '\\' : '\U0000222b', + '\\' : '\U0000222e', + '\\' : '\U00002663', + '\\' : '\U00002662', + '\\' : '\U00002661', + '\\' : '\U00002660', + '\\' : '\U00002135', + '\\' : '\U00002205', + '\\' : '\U00002207', + '\\' : '\U00002202', + '\\' : '\U0000266d', + '\\' : '\U0000266e', + '\\' : '\U0000266f', + '\\' : '\U00002220', + '\\' : '\U000000a9', + '\\' : '\U000000ae', + '\\' : '\U000000ad', + '\\' : '\U000000af', + '\\' : '\U000000bc', + '\\' : '\U000000bd', + '\\' : '\U000000be', + '\\' : '\U000000aa', + '\\' : '\U000000ba', + '\\
' : '\U000000a7', + '\\' : '\U000000b6', + '\\' : '\U000000a1', + '\\' : '\U000000bf', + '\\' : '\U000020ac', + '\\' : '\U000000a3', + '\\' : '\U000000a5', + '\\' : '\U000000a2', + '\\' : '\U000000a4', + '\\' : '\U000000b0', + '\\' : '\U00002a3f', + '\\' : '\U00002127', + '\\' : '\U000025ca', + '\\' : '\U00002118', + '\\' : '\U00002240', + '\\' : '\U000022c4', + '\\' : '\U000000b4', + '\\' : '\U00000131', + '\\' : '\U000000a8', + '\\' : '\U000000b8', + '\\' : '\U000002dd', + '\\' : '\U000003f5', + '\\' : '\U000023ce', + '\\' : '\U00002039', + '\\' : '\U0000203a', + '\\' : '\U00002302', + '\\<^sub>' : '\U000021e9', + '\\<^sup>' : '\U000021e7', + '\\<^bold>' : '\U00002759', + '\\<^bsub>' : '\U000021d8', + '\\<^esub>' : '\U000021d9', + '\\<^bsup>' : '\U000021d7', + '\\<^esup>' : '\U000021d6', + } + + lang_map = {'isabelle' : isabelle_symbols, 'latex' : latex_symbols} + + def __init__(self, **options): + Filter.__init__(self, **options) + lang = get_choice_opt(options, 'lang', + ['isabelle', 'latex'], 'isabelle') + self.symbols = self.lang_map[lang] + + def filter(self, lexer, stream): + for ttype, value in stream: + if value in self.symbols: + yield ttype, self.symbols[value] + else: + yield ttype, value + + +class KeywordCaseFilter(Filter): + """Convert keywords to lowercase or uppercase or capitalize them, which + means first letter uppercase, rest lowercase. + + This can be useful e.g. if you highlight Pascal code and want to adapt the + code to your styleguide. + + Options accepted: + + `case` : string + The casing to convert keywords to. Must be one of ``'lower'``, + ``'upper'`` or ``'capitalize'``. The default is ``'lower'``. + """ + + def __init__(self, **options): + Filter.__init__(self, **options) + case = get_choice_opt(options, 'case', + ['lower', 'upper', 'capitalize'], 'lower') + self.convert = getattr(str, case) + + def filter(self, lexer, stream): + for ttype, value in stream: + if ttype in Keyword: + yield ttype, self.convert(value) + else: + yield ttype, value + + +class NameHighlightFilter(Filter): + """Highlight a normal Name (and Name.*) token with a different token type. + + Example:: + + filter = NameHighlightFilter( + names=['foo', 'bar', 'baz'], + tokentype=Name.Function, + ) + + This would highlight the names "foo", "bar" and "baz" + as functions. `Name.Function` is the default token type. + + Options accepted: + + `names` : list of strings + A list of names that should be given the different token type. + There is no default. + `tokentype` : TokenType or string + A token type or a string containing a token type name that is + used for highlighting the strings in `names`. The default is + `Name.Function`. + """ + + def __init__(self, **options): + Filter.__init__(self, **options) + self.names = set(get_list_opt(options, 'names', [])) + tokentype = options.get('tokentype') + if tokentype: + self.tokentype = string_to_tokentype(tokentype) + else: + self.tokentype = Name.Function + + def filter(self, lexer, stream): + for ttype, value in stream: + if ttype in Name and value in self.names: + yield self.tokentype, value + else: + yield ttype, value + + +class ErrorToken(Exception): + pass + + +class RaiseOnErrorTokenFilter(Filter): + """Raise an exception when the lexer generates an error token. + + Options accepted: + + `excclass` : Exception class + The exception class to raise. + The default is `pygments.filters.ErrorToken`. + + .. versionadded:: 0.8 + """ + + def __init__(self, **options): + Filter.__init__(self, **options) + self.exception = options.get('excclass', ErrorToken) + try: + # issubclass() will raise TypeError if first argument is not a class + if not issubclass(self.exception, Exception): + raise TypeError + except TypeError: + raise OptionError('excclass option is not an exception class') + + def filter(self, lexer, stream): + for ttype, value in stream: + if ttype is Error: + raise self.exception(value) + yield ttype, value + + +class VisibleWhitespaceFilter(Filter): + """Convert tabs, newlines and/or spaces to visible characters. + + Options accepted: + + `spaces` : string or bool + If this is a one-character string, spaces will be replaces by this string. + If it is another true value, spaces will be replaced by ``·`` (unicode + MIDDLE DOT). If it is a false value, spaces will not be replaced. The + default is ``False``. + `tabs` : string or bool + The same as for `spaces`, but the default replacement character is ``»`` + (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK). The default value + is ``False``. Note: this will not work if the `tabsize` option for the + lexer is nonzero, as tabs will already have been expanded then. + `tabsize` : int + If tabs are to be replaced by this filter (see the `tabs` option), this + is the total number of characters that a tab should be expanded to. + The default is ``8``. + `newlines` : string or bool + The same as for `spaces`, but the default replacement character is ``¶`` + (unicode PILCROW SIGN). The default value is ``False``. + `wstokentype` : bool + If true, give whitespace the special `Whitespace` token type. This allows + styling the visible whitespace differently (e.g. greyed out), but it can + disrupt background colors. The default is ``True``. + + .. versionadded:: 0.8 + """ + + def __init__(self, **options): + Filter.__init__(self, **options) + for name, default in [('spaces', '·'), + ('tabs', '»'), + ('newlines', '¶')]: + opt = options.get(name, False) + if isinstance(opt, str) and len(opt) == 1: + setattr(self, name, opt) + else: + setattr(self, name, (opt and default or '')) + tabsize = get_int_opt(options, 'tabsize', 8) + if self.tabs: + self.tabs += ' ' * (tabsize - 1) + if self.newlines: + self.newlines += '\n' + self.wstt = get_bool_opt(options, 'wstokentype', True) + + def filter(self, lexer, stream): + if self.wstt: + spaces = self.spaces or ' ' + tabs = self.tabs or '\t' + newlines = self.newlines or '\n' + regex = re.compile(r'\s') + + def replacefunc(wschar): + if wschar == ' ': + return spaces + elif wschar == '\t': + return tabs + elif wschar == '\n': + return newlines + return wschar + + for ttype, value in stream: + yield from _replace_special(ttype, value, regex, Whitespace, + replacefunc) + else: + spaces, tabs, newlines = self.spaces, self.tabs, self.newlines + # simpler processing + for ttype, value in stream: + if spaces: + value = value.replace(' ', spaces) + if tabs: + value = value.replace('\t', tabs) + if newlines: + value = value.replace('\n', newlines) + yield ttype, value + + +class GobbleFilter(Filter): + """Gobbles source code lines (eats initial characters). + + This filter drops the first ``n`` characters off every line of code. This + may be useful when the source code fed to the lexer is indented by a fixed + amount of space that isn't desired in the output. + + Options accepted: + + `n` : int + The number of characters to gobble. + + .. versionadded:: 1.2 + """ + def __init__(self, **options): + Filter.__init__(self, **options) + self.n = get_int_opt(options, 'n', 0) + + def gobble(self, value, left): + if left < len(value): + return value[left:], 0 + else: + return '', left - len(value) + + def filter(self, lexer, stream): + n = self.n + left = n # How many characters left to gobble. + for ttype, value in stream: + # Remove ``left`` tokens from first line, ``n`` from all others. + parts = value.split('\n') + (parts[0], left) = self.gobble(parts[0], left) + for i in range(1, len(parts)): + (parts[i], left) = self.gobble(parts[i], n) + value = '\n'.join(parts) + + if value != '': + yield ttype, value + + +class TokenMergeFilter(Filter): + """Merges consecutive tokens with the same token type in the output + stream of a lexer. + + .. versionadded:: 1.2 + """ + def __init__(self, **options): + Filter.__init__(self, **options) + + def filter(self, lexer, stream): + current_type = None + current_value = None + for ttype, value in stream: + if ttype is current_type: + current_value += value + else: + if current_type is not None: + yield current_type, current_value + current_type = ttype + current_value = value + if current_type is not None: + yield current_type, current_value + + +FILTERS = { + 'codetagify': CodeTagFilter, + 'keywordcase': KeywordCaseFilter, + 'highlight': NameHighlightFilter, + 'raiseonerror': RaiseOnErrorTokenFilter, + 'whitespace': VisibleWhitespaceFilter, + 'gobble': GobbleFilter, + 'tokenmerge': TokenMergeFilter, + 'symbols': SymbolFilter, +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7135f3eb5db3cb6e064342c958fb5c88f4d71da0 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py new file mode 100644 index 0000000000000000000000000000000000000000..d2666037f7a7d0cca00c7e63d856cc0610af3f23 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py @@ -0,0 +1,129 @@ +""" + pygments.formatter + ~~~~~~~~~~~~~~~~~~ + + Base formatter class. + + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import codecs + +from pip._vendor.pygments.util import get_bool_opt +from pip._vendor.pygments.styles import get_style_by_name + +__all__ = ['Formatter'] + + +def _lookup_style(style): + if isinstance(style, str): + return get_style_by_name(style) + return style + + +class Formatter: + """ + Converts a token stream to text. + + Formatters should have attributes to help selecting them. These + are similar to the corresponding :class:`~pygments.lexer.Lexer` + attributes. + + .. autoattribute:: name + :no-value: + + .. autoattribute:: aliases + :no-value: + + .. autoattribute:: filenames + :no-value: + + You can pass options as keyword arguments to the constructor. + All formatters accept these basic options: + + ``style`` + The style to use, can be a string or a Style subclass + (default: "default"). Not used by e.g. the + TerminalFormatter. + ``full`` + Tells the formatter to output a "full" document, i.e. + a complete self-contained document. This doesn't have + any effect for some formatters (default: false). + ``title`` + If ``full`` is true, the title that should be used to + caption the document (default: ''). + ``encoding`` + If given, must be an encoding name. This will be used to + convert the Unicode token strings to byte strings in the + output. If it is "" or None, Unicode strings will be written + to the output file, which most file-like objects do not + support (default: None). + ``outencoding`` + Overrides ``encoding`` if given. + + """ + + #: Full name for the formatter, in human-readable form. + name = None + + #: A list of short, unique identifiers that can be used to lookup + #: the formatter from a list, e.g. using :func:`.get_formatter_by_name()`. + aliases = [] + + #: A list of fnmatch patterns that match filenames for which this + #: formatter can produce output. The patterns in this list should be unique + #: among all formatters. + filenames = [] + + #: If True, this formatter outputs Unicode strings when no encoding + #: option is given. + unicodeoutput = True + + def __init__(self, **options): + """ + As with lexers, this constructor takes arbitrary optional arguments, + and if you override it, you should first process your own options, then + call the base class implementation. + """ + self.style = _lookup_style(options.get('style', 'default')) + self.full = get_bool_opt(options, 'full', False) + self.title = options.get('title', '') + self.encoding = options.get('encoding', None) or None + if self.encoding in ('guess', 'chardet'): + # can happen for e.g. pygmentize -O encoding=guess + self.encoding = 'utf-8' + self.encoding = options.get('outencoding') or self.encoding + self.options = options + + def get_style_defs(self, arg=''): + """ + This method must return statements or declarations suitable to define + the current style for subsequent highlighted text (e.g. CSS classes + in the `HTMLFormatter`). + + The optional argument `arg` can be used to modify the generation and + is formatter dependent (it is standardized because it can be given on + the command line). + + This method is called by the ``-S`` :doc:`command-line option `, + the `arg` is then given by the ``-a`` option. + """ + return '' + + def format(self, tokensource, outfile): + """ + This method must format the tokens from the `tokensource` iterable and + write the formatted version to the file object `outfile`. + + Formatter options can control how exactly the tokens are converted. + """ + if self.encoding: + # wrap the outfile in a StreamWriter + outfile = codecs.lookup(self.encoding)[3](outfile) + return self.format_unencoded(tokensource, outfile) + + # Allow writing Formatter[str] or Formatter[bytes]. That's equivalent to + # Formatter. This helps when using third-party type stubs from typeshed. + def __class_getitem__(cls, name): + return cls diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f19e9931f0737238ba8c043a2b17791fc2972913 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py @@ -0,0 +1,157 @@ +""" + pygments.formatters + ~~~~~~~~~~~~~~~~~~~ + + Pygments formatters. + + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re +import sys +import types +import fnmatch +from os.path import basename + +from pip._vendor.pygments.formatters._mapping import FORMATTERS +from pip._vendor.pygments.plugin import find_plugin_formatters +from pip._vendor.pygments.util import ClassNotFound + +__all__ = ['get_formatter_by_name', 'get_formatter_for_filename', + 'get_all_formatters', 'load_formatter_from_file'] + list(FORMATTERS) + +_formatter_cache = {} # classes by name +_pattern_cache = {} + + +def _fn_matches(fn, glob): + """Return whether the supplied file name fn matches pattern filename.""" + if glob not in _pattern_cache: + pattern = _pattern_cache[glob] = re.compile(fnmatch.translate(glob)) + return pattern.match(fn) + return _pattern_cache[glob].match(fn) + + +def _load_formatters(module_name): + """Load a formatter (and all others in the module too).""" + mod = __import__(module_name, None, None, ['__all__']) + for formatter_name in mod.__all__: + cls = getattr(mod, formatter_name) + _formatter_cache[cls.name] = cls + + +def get_all_formatters(): + """Return a generator for all formatter classes.""" + # NB: this returns formatter classes, not info like get_all_lexers(). + for info in FORMATTERS.values(): + if info[1] not in _formatter_cache: + _load_formatters(info[0]) + yield _formatter_cache[info[1]] + for _, formatter in find_plugin_formatters(): + yield formatter + + +def find_formatter_class(alias): + """Lookup a formatter by alias. + + Returns None if not found. + """ + for module_name, name, aliases, _, _ in FORMATTERS.values(): + if alias in aliases: + if name not in _formatter_cache: + _load_formatters(module_name) + return _formatter_cache[name] + for _, cls in find_plugin_formatters(): + if alias in cls.aliases: + return cls + + +def get_formatter_by_name(_alias, **options): + """ + Return an instance of a :class:`.Formatter` subclass that has `alias` in its + aliases list. The formatter is given the `options` at its instantiation. + + Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that + alias is found. + """ + cls = find_formatter_class(_alias) + if cls is None: + raise ClassNotFound(f"no formatter found for name {_alias!r}") + return cls(**options) + + +def load_formatter_from_file(filename, formattername="CustomFormatter", **options): + """ + Return a `Formatter` subclass instance loaded from the provided file, relative + to the current directory. + + The file is expected to contain a Formatter class named ``formattername`` + (by default, CustomFormatter). Users should be very careful with the input, because + this method is equivalent to running ``eval()`` on the input file. The formatter is + given the `options` at its instantiation. + + :exc:`pygments.util.ClassNotFound` is raised if there are any errors loading + the formatter. + + .. versionadded:: 2.2 + """ + try: + # This empty dict will contain the namespace for the exec'd file + custom_namespace = {} + with open(filename, 'rb') as f: + exec(f.read(), custom_namespace) + # Retrieve the class `formattername` from that namespace + if formattername not in custom_namespace: + raise ClassNotFound(f'no valid {formattername} class found in {filename}') + formatter_class = custom_namespace[formattername] + # And finally instantiate it with the options + return formatter_class(**options) + except OSError as err: + raise ClassNotFound(f'cannot read {filename}: {err}') + except ClassNotFound: + raise + except Exception as err: + raise ClassNotFound(f'error when loading custom formatter: {err}') + + +def get_formatter_for_filename(fn, **options): + """ + Return a :class:`.Formatter` subclass instance that has a filename pattern + matching `fn`. The formatter is given the `options` at its instantiation. + + Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename + is found. + """ + fn = basename(fn) + for modname, name, _, filenames, _ in FORMATTERS.values(): + for filename in filenames: + if _fn_matches(fn, filename): + if name not in _formatter_cache: + _load_formatters(modname) + return _formatter_cache[name](**options) + for _name, cls in find_plugin_formatters(): + for filename in cls.filenames: + if _fn_matches(fn, filename): + return cls(**options) + raise ClassNotFound(f"no formatter found for file name {fn!r}") + + +class _automodule(types.ModuleType): + """Automatically import formatters.""" + + def __getattr__(self, name): + info = FORMATTERS.get(name) + if info: + _load_formatters(info[0]) + cls = _formatter_cache[info[1]] + setattr(self, name, cls) + return cls + raise AttributeError(name) + + +oldmod = sys.modules[__name__] +newmod = _automodule(__name__) +newmod.__dict__.update(oldmod.__dict__) +sys.modules[__name__] = newmod +del newmod.newmod, newmod.oldmod, newmod.sys, newmod.types diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6c59229f049affa0a95bc1ebdbdd900a9d0f2d2 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..85c6f7a471e0733be6d69c9137dd4e0501f04c43 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1bdb7802d805761b79017fda761911d89de9023b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f5df753d9a325ad284df4832b7ed59ca5888a16 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d1e4fc909b42c6ddbf10efc4b2b34f25260c976 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..05a3fabfc4d6a910a53137a3bf055ed8e0ef90eb Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7ed7f93e89f8031d5a24ef93d389e8719f8965b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0ffd122ddb08f556b6a4bc980b2c1c0e4010d80 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..810f3a3000ceedfe5b0e623c259b1170bd0ad307 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..28864dd0215c3ae53f116b4212da13af5f740224 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d262d1066ccd2e119fe0fa4a8edacdbb0d1de8a Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..50cd993fdcc7ecd4b4bd390c7a8743f03f7a3f8b Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2fbd856438969948718747e2bd7886f75e88acc4 Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ba94ad37600d78b684d189e6fc4a8812678461e Binary files /dev/null and b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc differ diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py new file mode 100644 index 0000000000000000000000000000000000000000..72ca84040b626183e3328679db600c13472021be --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py @@ -0,0 +1,23 @@ +# Automatically generated by scripts/gen_mapfiles.py. +# DO NOT EDIT BY HAND; run `tox -e mapfiles` instead. + +FORMATTERS = { + 'BBCodeFormatter': ('pygments.formatters.bbcode', 'BBCode', ('bbcode', 'bb'), (), 'Format tokens with BBcodes. These formatting codes are used by many bulletin boards, so you can highlight your sourcecode with pygments before posting it there.'), + 'BmpImageFormatter': ('pygments.formatters.img', 'img_bmp', ('bmp', 'bitmap'), ('*.bmp',), 'Create a bitmap image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), + 'GifImageFormatter': ('pygments.formatters.img', 'img_gif', ('gif',), ('*.gif',), 'Create a GIF image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), + 'GroffFormatter': ('pygments.formatters.groff', 'groff', ('groff', 'troff', 'roff'), (), 'Format tokens with groff escapes to change their color and font style.'), + 'HtmlFormatter': ('pygments.formatters.html', 'HTML', ('html',), ('*.html', '*.htm'), "Format tokens as HTML 4 ```` tags. By default, the content is enclosed in a ``
`` tag, itself wrapped in a ``
`` tag (but see the `nowrap` option). The ``
``'s CSS class can be set by the `cssclass` option."), + 'IRCFormatter': ('pygments.formatters.irc', 'IRC', ('irc', 'IRC'), (), 'Format tokens with IRC color sequences'), + 'ImageFormatter': ('pygments.formatters.img', 'img', ('img', 'IMG', 'png'), ('*.png',), 'Create a PNG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), + 'JpgImageFormatter': ('pygments.formatters.img', 'img_jpg', ('jpg', 'jpeg'), ('*.jpg',), 'Create a JPEG image from source code. This uses the Python Imaging Library to generate a pixmap from the source code.'), + 'LatexFormatter': ('pygments.formatters.latex', 'LaTeX', ('latex', 'tex'), ('*.tex',), 'Format tokens as LaTeX code. This needs the `fancyvrb` and `color` standard packages.'), + 'NullFormatter': ('pygments.formatters.other', 'Text only', ('text', 'null'), ('*.txt',), 'Output the text unchanged without any formatting.'), + 'PangoMarkupFormatter': ('pygments.formatters.pangomarkup', 'Pango Markup', ('pango', 'pangomarkup'), (), 'Format tokens as Pango Markup code. It can then be rendered to an SVG.'), + 'RawTokenFormatter': ('pygments.formatters.other', 'Raw tokens', ('raw', 'tokens'), ('*.raw',), 'Format tokens as a raw representation for storing token streams.'), + 'RtfFormatter': ('pygments.formatters.rtf', 'RTF', ('rtf',), ('*.rtf',), 'Format tokens as RTF markup. This formatter automatically outputs full RTF documents with color information and other useful stuff. Perfect for Copy and Paste into Microsoft(R) Word(R) documents.'), + 'SvgFormatter': ('pygments.formatters.svg', 'SVG', ('svg',), ('*.svg',), 'Format tokens as an SVG graphics file. This formatter is still experimental. Each line of code is a ```` element with explicit ``x`` and ``y`` coordinates containing ```` elements with the individual token styles.'), + 'Terminal256Formatter': ('pygments.formatters.terminal256', 'Terminal256', ('terminal256', 'console256', '256'), (), 'Format tokens with ANSI color sequences, for output in a 256-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'), + 'TerminalFormatter': ('pygments.formatters.terminal', 'Terminal', ('terminal', 'console'), (), 'Format tokens with ANSI color sequences, for output in a text console. Color sequences are terminated at newlines, so that paging the output works correctly.'), + 'TerminalTrueColorFormatter': ('pygments.formatters.terminal256', 'TerminalTrueColor', ('terminal16m', 'console16m', '16m'), (), 'Format tokens with ANSI color sequences, for output in a true-color terminal or console. Like in `TerminalFormatter` color sequences are terminated at newlines, so that paging the output works correctly.'), + 'TestcaseFormatter': ('pygments.formatters.other', 'Testcase', ('testcase',), (), 'Format tokens as appropriate for a new testcase.'), +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py new file mode 100644 index 0000000000000000000000000000000000000000..5a05bd961de4b53cc00c9c24d9be69f5242eb3a5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py @@ -0,0 +1,108 @@ +""" + pygments.formatters.bbcode + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + + BBcode formatter. + + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + + +from pip._vendor.pygments.formatter import Formatter +from pip._vendor.pygments.util import get_bool_opt + +__all__ = ['BBCodeFormatter'] + + +class BBCodeFormatter(Formatter): + """ + Format tokens with BBcodes. These formatting codes are used by many + bulletin boards, so you can highlight your sourcecode with pygments before + posting it there. + + This formatter has no support for background colors and borders, as there + are no common BBcode tags for that. + + Some board systems (e.g. phpBB) don't support colors in their [code] tag, + so you can't use the highlighting together with that tag. + Text in a [code] tag usually is shown with a monospace font (which this + formatter can do with the ``monofont`` option) and no spaces (which you + need for indentation) are removed. + + Additional options accepted: + + `style` + The style to use, can be a string or a Style subclass (default: + ``'default'``). + + `codetag` + If set to true, put the output into ``[code]`` tags (default: + ``false``) + + `monofont` + If set to true, add a tag to show the code with a monospace font + (default: ``false``). + """ + name = 'BBCode' + aliases = ['bbcode', 'bb'] + filenames = [] + + def __init__(self, **options): + Formatter.__init__(self, **options) + self._code = get_bool_opt(options, 'codetag', False) + self._mono = get_bool_opt(options, 'monofont', False) + + self.styles = {} + self._make_styles() + + def _make_styles(self): + for ttype, ndef in self.style: + start = end = '' + if ndef['color']: + start += '[color=#{}]'.format(ndef['color']) + end = '[/color]' + end + if ndef['bold']: + start += '[b]' + end = '[/b]' + end + if ndef['italic']: + start += '[i]' + end = '[/i]' + end + if ndef['underline']: + start += '[u]' + end = '[/u]' + end + # there are no common BBcodes for background-color and border + + self.styles[ttype] = start, end + + def format_unencoded(self, tokensource, outfile): + if self._code: + outfile.write('[code]') + if self._mono: + outfile.write('[font=monospace]') + + lastval = '' + lasttype = None + + for ttype, value in tokensource: + while ttype not in self.styles: + ttype = ttype.parent + if ttype == lasttype: + lastval += value + else: + if lastval: + start, end = self.styles[lasttype] + outfile.write(''.join((start, lastval, end))) + lastval = value + lasttype = ttype + + if lastval: + start, end = self.styles[lasttype] + outfile.write(''.join((start, lastval, end))) + + if self._mono: + outfile.write('[/font]') + if self._code: + outfile.write('[/code]') + if self._code or self._mono: + outfile.write('\n') diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.py new file mode 100644 index 0000000000000000000000000000000000000000..5c8a958f8d754a1b23b34b4b2b8db5254cc0ada4 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.py @@ -0,0 +1,170 @@ +""" + pygments.formatters.groff + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + Formatter for groff output. + + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import math +from pip._vendor.pygments.formatter import Formatter +from pip._vendor.pygments.util import get_bool_opt, get_int_opt + +__all__ = ['GroffFormatter'] + + +class GroffFormatter(Formatter): + """ + Format tokens with groff escapes to change their color and font style. + + .. versionadded:: 2.11 + + Additional options accepted: + + `style` + The style to use, can be a string or a Style subclass (default: + ``'default'``). + + `monospaced` + If set to true, monospace font will be used (default: ``true``). + + `linenos` + If set to true, print the line numbers (default: ``false``). + + `wrap` + Wrap lines to the specified number of characters. Disabled if set to 0 + (default: ``0``). + """ + + name = 'groff' + aliases = ['groff','troff','roff'] + filenames = [] + + def __init__(self, **options): + Formatter.__init__(self, **options) + + self.monospaced = get_bool_opt(options, 'monospaced', True) + self.linenos = get_bool_opt(options, 'linenos', False) + self._lineno = 0 + self.wrap = get_int_opt(options, 'wrap', 0) + self._linelen = 0 + + self.styles = {} + self._make_styles() + + + def _make_styles(self): + regular = '\\f[CR]' if self.monospaced else '\\f[R]' + bold = '\\f[CB]' if self.monospaced else '\\f[B]' + italic = '\\f[CI]' if self.monospaced else '\\f[I]' + + for ttype, ndef in self.style: + start = end = '' + if ndef['color']: + start += '\\m[{}]'.format(ndef['color']) + end = '\\m[]' + end + if ndef['bold']: + start += bold + end = regular + end + if ndef['italic']: + start += italic + end = regular + end + if ndef['bgcolor']: + start += '\\M[{}]'.format(ndef['bgcolor']) + end = '\\M[]' + end + + self.styles[ttype] = start, end + + + def _define_colors(self, outfile): + colors = set() + for _, ndef in self.style: + if ndef['color'] is not None: + colors.add(ndef['color']) + + for color in sorted(colors): + outfile.write('.defcolor ' + color + ' rgb #' + color + '\n') + + + def _write_lineno(self, outfile): + self._lineno += 1 + outfile.write("%s% 4d " % (self._lineno != 1 and '\n' or '', self._lineno)) + + + def _wrap_line(self, line): + length = len(line.rstrip('\n')) + space = ' ' if self.linenos else '' + newline = '' + + if length > self.wrap: + for i in range(0, math.floor(length / self.wrap)): + chunk = line[i*self.wrap:i*self.wrap+self.wrap] + newline += (chunk + '\n' + space) + remainder = length % self.wrap + if remainder > 0: + newline += line[-remainder-1:] + self._linelen = remainder + elif self._linelen + length > self.wrap: + newline = ('\n' + space) + line + self._linelen = length + else: + newline = line + self._linelen += length + + return newline + + + def _escape_chars(self, text): + text = text.replace('\\', '\\[u005C]'). \ + replace('.', '\\[char46]'). \ + replace('\'', '\\[u0027]'). \ + replace('`', '\\[u0060]'). \ + replace('~', '\\[u007E]') + copy = text + + for char in copy: + if len(char) != len(char.encode()): + uni = char.encode('unicode_escape') \ + .decode()[1:] \ + .replace('x', 'u00') \ + .upper() + text = text.replace(char, '\\[u' + uni[1:] + ']') + + return text + + + def format_unencoded(self, tokensource, outfile): + self._define_colors(outfile) + + outfile.write('.nf\n\\f[CR]\n') + + if self.linenos: + self._write_lineno(outfile) + + for ttype, value in tokensource: + while ttype not in self.styles: + ttype = ttype.parent + start, end = self.styles[ttype] + + for line in value.splitlines(True): + if self.wrap > 0: + line = self._wrap_line(line) + + if start and end: + text = self._escape_chars(line.rstrip('\n')) + if text != '': + outfile.write(''.join((start, text, end))) + else: + outfile.write(self._escape_chars(line.rstrip('\n'))) + + if line.endswith('\n'): + if self.linenos: + self._write_lineno(outfile) + self._linelen = 0 + else: + outfile.write('\n') + self._linelen = 0 + + outfile.write('\n.fi') diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py new file mode 100644 index 0000000000000000000000000000000000000000..7aa938f5119bf723c15fed9534dbdeab2c817c9d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py @@ -0,0 +1,987 @@ +""" + pygments.formatters.html + ~~~~~~~~~~~~~~~~~~~~~~~~ + + Formatter for HTML output. + + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import functools +import os +import sys +import os.path +from io import StringIO + +from pip._vendor.pygments.formatter import Formatter +from pip._vendor.pygments.token import Token, Text, STANDARD_TYPES +from pip._vendor.pygments.util import get_bool_opt, get_int_opt, get_list_opt + +try: + import ctags +except ImportError: + ctags = None + +__all__ = ['HtmlFormatter'] + + +_escape_html_table = { + ord('&'): '&', + ord('<'): '<', + ord('>'): '>', + ord('"'): '"', + ord("'"): ''', +} + + +def escape_html(text, table=_escape_html_table): + """Escape &, <, > as well as single and double quotes for HTML.""" + return text.translate(table) + + +def webify(color): + if color.startswith('calc') or color.startswith('var'): + return color + else: + return '#' + color + + +def _get_ttype_class(ttype): + fname = STANDARD_TYPES.get(ttype) + if fname: + return fname + aname = '' + while fname is None: + aname = '-' + ttype[-1] + aname + ttype = ttype.parent + fname = STANDARD_TYPES.get(ttype) + return fname + aname + + +CSSFILE_TEMPLATE = '''\ +/* +generated by Pygments +Copyright 2006-2024 by the Pygments team. +Licensed under the BSD license, see LICENSE for details. +*/ +%(styledefs)s +''' + +DOC_HEADER = '''\ + + + + + %(title)s + + + + +

%(title)s

+ +''' + +DOC_HEADER_EXTERNALCSS = '''\ + + + + + %(title)s + + + + +

%(title)s

+ +''' + +DOC_FOOTER = '''\ + + +''' + + +class HtmlFormatter(Formatter): + r""" + Format tokens as HTML 4 ```` tags. By default, the content is enclosed + in a ``
`` tag, itself wrapped in a ``
`` tag (but see the `nowrap` option). + The ``
``'s CSS class can be set by the `cssclass` option. + + If the `linenos` option is set to ``"table"``, the ``
`` is
+    additionally wrapped inside a ```` which has one row and two
+    cells: one containing the line numbers and one containing the code.
+    Example:
+
+    .. sourcecode:: html
+
+        
+
+ + +
+
1
+            2
+
+
def foo(bar):
+              pass
+            
+
+ + (whitespace added to improve clarity). + + A list of lines can be specified using the `hl_lines` option to make these + lines highlighted (as of Pygments 0.11). + + With the `full` option, a complete HTML 4 document is output, including + the style definitions inside a `` + + +
{code}
+ + +""" + +CONSOLE_SVG_FORMAT = """\ + + + + + + + + + {lines} + + + {chrome} + + {backgrounds} + + {matrix} + + + +""" + +_SVG_FONT_FAMILY = "Rich Fira Code" +_SVG_CLASSES_PREFIX = "rich-svg" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd6da9be4956ce8558304ed72ffbe88ccd22ba5 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py @@ -0,0 +1,10 @@ +from typing import Any + + +def load_ipython_extension(ip: Any) -> None: # pragma: no cover + # prevent circular import + from pip._vendor.rich.pretty import install + from pip._vendor.rich.traceback import install as tr_install + + install() + tr_install() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py new file mode 100644 index 0000000000000000000000000000000000000000..b17ee6511742d7a8d5950bf0ee57ced4d5fd45c2 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from typing import IO, Callable + + +def get_fileno(file_like: IO[str]) -> int | None: + """Get fileno() from a file, accounting for poorly implemented file-like objects. + + Args: + file_like (IO): A file-like object. + + Returns: + int | None: The result of fileno if available, or None if operation failed. + """ + fileno: Callable[[], int] | None = getattr(file_like, "fileno", None) + if fileno is not None: + try: + return fileno() + except Exception: + # `fileno` is documented as potentially raising a OSError + # Alas, from the issues, there are so many poorly implemented file-like objects, + # that `fileno()` can raise just about anything. + return None + return None diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py new file mode 100644 index 0000000000000000000000000000000000000000..e87698d1fa8f844f04d08eb452cf4cadc25b6411 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py @@ -0,0 +1,268 @@ +import inspect +from inspect import cleandoc, getdoc, getfile, isclass, ismodule, signature +from typing import Any, Collection, Iterable, Optional, Tuple, Type, Union + +from .console import Group, RenderableType +from .control import escape_control_codes +from .highlighter import ReprHighlighter +from .jupyter import JupyterMixin +from .panel import Panel +from .pretty import Pretty +from .table import Table +from .text import Text, TextType + + +def _first_paragraph(doc: str) -> str: + """Get the first paragraph from a docstring.""" + paragraph, _, _ = doc.partition("\n\n") + return paragraph + + +class Inspect(JupyterMixin): + """A renderable to inspect any Python Object. + + Args: + obj (Any): An object to inspect. + title (str, optional): Title to display over inspect result, or None use type. Defaults to None. + help (bool, optional): Show full help text rather than just first paragraph. Defaults to False. + methods (bool, optional): Enable inspection of callables. Defaults to False. + docs (bool, optional): Also render doc strings. Defaults to True. + private (bool, optional): Show private attributes (beginning with underscore). Defaults to False. + dunder (bool, optional): Show attributes starting with double underscore. Defaults to False. + sort (bool, optional): Sort attributes alphabetically. Defaults to True. + all (bool, optional): Show all attributes. Defaults to False. + value (bool, optional): Pretty print value of object. Defaults to True. + """ + + def __init__( + self, + obj: Any, + *, + title: Optional[TextType] = None, + help: bool = False, + methods: bool = False, + docs: bool = True, + private: bool = False, + dunder: bool = False, + sort: bool = True, + all: bool = True, + value: bool = True, + ) -> None: + self.highlighter = ReprHighlighter() + self.obj = obj + self.title = title or self._make_title(obj) + if all: + methods = private = dunder = True + self.help = help + self.methods = methods + self.docs = docs or help + self.private = private or dunder + self.dunder = dunder + self.sort = sort + self.value = value + + def _make_title(self, obj: Any) -> Text: + """Make a default title.""" + title_str = ( + str(obj) + if (isclass(obj) or callable(obj) or ismodule(obj)) + else str(type(obj)) + ) + title_text = self.highlighter(title_str) + return title_text + + def __rich__(self) -> Panel: + return Panel.fit( + Group(*self._render()), + title=self.title, + border_style="scope.border", + padding=(0, 1), + ) + + def _get_signature(self, name: str, obj: Any) -> Optional[Text]: + """Get a signature for a callable.""" + try: + _signature = str(signature(obj)) + ":" + except ValueError: + _signature = "(...)" + except TypeError: + return None + + source_filename: Optional[str] = None + try: + source_filename = getfile(obj) + except (OSError, TypeError): + # OSError is raised if obj has no source file, e.g. when defined in REPL. + pass + + callable_name = Text(name, style="inspect.callable") + if source_filename: + callable_name.stylize(f"link file://{source_filename}") + signature_text = self.highlighter(_signature) + + qualname = name or getattr(obj, "__qualname__", name) + + # If obj is a module, there may be classes (which are callable) to display + if inspect.isclass(obj): + prefix = "class" + elif inspect.iscoroutinefunction(obj): + prefix = "async def" + else: + prefix = "def" + + qual_signature = Text.assemble( + (f"{prefix} ", f"inspect.{prefix.replace(' ', '_')}"), + (qualname, "inspect.callable"), + signature_text, + ) + + return qual_signature + + def _render(self) -> Iterable[RenderableType]: + """Render object.""" + + def sort_items(item: Tuple[str, Any]) -> Tuple[bool, str]: + key, (_error, value) = item + return (callable(value), key.strip("_").lower()) + + def safe_getattr(attr_name: str) -> Tuple[Any, Any]: + """Get attribute or any exception.""" + try: + return (None, getattr(obj, attr_name)) + except Exception as error: + return (error, None) + + obj = self.obj + keys = dir(obj) + total_items = len(keys) + if not self.dunder: + keys = [key for key in keys if not key.startswith("__")] + if not self.private: + keys = [key for key in keys if not key.startswith("_")] + not_shown_count = total_items - len(keys) + items = [(key, safe_getattr(key)) for key in keys] + if self.sort: + items.sort(key=sort_items) + + items_table = Table.grid(padding=(0, 1), expand=False) + items_table.add_column(justify="right") + add_row = items_table.add_row + highlighter = self.highlighter + + if callable(obj): + signature = self._get_signature("", obj) + if signature is not None: + yield signature + yield "" + + if self.docs: + _doc = self._get_formatted_doc(obj) + if _doc is not None: + doc_text = Text(_doc, style="inspect.help") + doc_text = highlighter(doc_text) + yield doc_text + yield "" + + if self.value and not (isclass(obj) or callable(obj) or ismodule(obj)): + yield Panel( + Pretty(obj, indent_guides=True, max_length=10, max_string=60), + border_style="inspect.value.border", + ) + yield "" + + for key, (error, value) in items: + key_text = Text.assemble( + ( + key, + "inspect.attr.dunder" if key.startswith("__") else "inspect.attr", + ), + (" =", "inspect.equals"), + ) + if error is not None: + warning = key_text.copy() + warning.stylize("inspect.error") + add_row(warning, highlighter(repr(error))) + continue + + if callable(value): + if not self.methods: + continue + + _signature_text = self._get_signature(key, value) + if _signature_text is None: + add_row(key_text, Pretty(value, highlighter=highlighter)) + else: + if self.docs: + docs = self._get_formatted_doc(value) + if docs is not None: + _signature_text.append("\n" if "\n" in docs else " ") + doc = highlighter(docs) + doc.stylize("inspect.doc") + _signature_text.append(doc) + + add_row(key_text, _signature_text) + else: + add_row(key_text, Pretty(value, highlighter=highlighter)) + if items_table.row_count: + yield items_table + elif not_shown_count: + yield Text.from_markup( + f"[b cyan]{not_shown_count}[/][i] attribute(s) not shown.[/i] " + f"Run [b][magenta]inspect[/]([not b]inspect[/])[/b] for options." + ) + + def _get_formatted_doc(self, object_: Any) -> Optional[str]: + """ + Extract the docstring of an object, process it and returns it. + The processing consists in cleaning up the doctring's indentation, + taking only its 1st paragraph if `self.help` is not True, + and escape its control codes. + + Args: + object_ (Any): the object to get the docstring from. + + Returns: + Optional[str]: the processed docstring, or None if no docstring was found. + """ + docs = getdoc(object_) + if docs is None: + return None + docs = cleandoc(docs).strip() + if not self.help: + docs = _first_paragraph(docs) + return escape_control_codes(docs) + + +def get_object_types_mro(obj: Union[object, Type[Any]]) -> Tuple[type, ...]: + """Returns the MRO of an object's class, or of the object itself if it's a class.""" + if not hasattr(obj, "__mro__"): + # N.B. we cannot use `if type(obj) is type` here because it doesn't work with + # some types of classes, such as the ones that use abc.ABCMeta. + obj = type(obj) + return getattr(obj, "__mro__", ()) + + +def get_object_types_mro_as_strings(obj: object) -> Collection[str]: + """ + Returns the MRO of an object's class as full qualified names, or of the object itself if it's a class. + + Examples: + `object_types_mro_as_strings(JSONDecoder)` will return `['json.decoder.JSONDecoder', 'builtins.object']` + """ + return [ + f'{getattr(type_, "__module__", "")}.{getattr(type_, "__qualname__", "")}' + for type_ in get_object_types_mro(obj) + ] + + +def is_object_one_of_types( + obj: object, fully_qualified_types_names: Collection[str] +) -> bool: + """ + Returns `True` if the given object's class (or the object itself, if it's a class) has one of the + fully qualified names in its MRO. + """ + for type_name in get_object_types_mro_as_strings(obj): + if type_name in fully_qualified_types_names: + return True + return False diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py new file mode 100644 index 0000000000000000000000000000000000000000..fc16c84437a8a34231c44d3f0a331459ddcb0f34 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py @@ -0,0 +1,94 @@ +from datetime import datetime +from typing import Iterable, List, Optional, TYPE_CHECKING, Union, Callable + + +from .text import Text, TextType + +if TYPE_CHECKING: + from .console import Console, ConsoleRenderable, RenderableType + from .table import Table + +FormatTimeCallable = Callable[[datetime], Text] + + +class LogRender: + def __init__( + self, + show_time: bool = True, + show_level: bool = False, + show_path: bool = True, + time_format: Union[str, FormatTimeCallable] = "[%x %X]", + omit_repeated_times: bool = True, + level_width: Optional[int] = 8, + ) -> None: + self.show_time = show_time + self.show_level = show_level + self.show_path = show_path + self.time_format = time_format + self.omit_repeated_times = omit_repeated_times + self.level_width = level_width + self._last_time: Optional[Text] = None + + def __call__( + self, + console: "Console", + renderables: Iterable["ConsoleRenderable"], + log_time: Optional[datetime] = None, + time_format: Optional[Union[str, FormatTimeCallable]] = None, + level: TextType = "", + path: Optional[str] = None, + line_no: Optional[int] = None, + link_path: Optional[str] = None, + ) -> "Table": + from .containers import Renderables + from .table import Table + + output = Table.grid(padding=(0, 1)) + output.expand = True + if self.show_time: + output.add_column(style="log.time") + if self.show_level: + output.add_column(style="log.level", width=self.level_width) + output.add_column(ratio=1, style="log.message", overflow="fold") + if self.show_path and path: + output.add_column(style="log.path") + row: List["RenderableType"] = [] + if self.show_time: + log_time = log_time or console.get_datetime() + time_format = time_format or self.time_format + if callable(time_format): + log_time_display = time_format(log_time) + else: + log_time_display = Text(log_time.strftime(time_format)) + if log_time_display == self._last_time and self.omit_repeated_times: + row.append(Text(" " * len(log_time_display))) + else: + row.append(log_time_display) + self._last_time = log_time_display + if self.show_level: + row.append(level) + + row.append(Renderables(renderables)) + if self.show_path and path: + path_text = Text() + path_text.append( + path, style=f"link file://{link_path}" if link_path else "" + ) + if line_no: + path_text.append(":") + path_text.append( + f"{line_no}", + style=f"link file://{link_path}#{line_no}" if link_path else "", + ) + row.append(path_text) + + output.add_row(*row) + return output + + +if __name__ == "__main__": # pragma: no cover + from pip._vendor.rich.console import Console + + c = Console() + c.print("[on blue]Hello", justify="right") + c.log("[on blue]hello", justify="right") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py new file mode 100644 index 0000000000000000000000000000000000000000..01c6cafbe53f1fcb12f7b382b2b35e2fd2c69933 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py @@ -0,0 +1,43 @@ +from typing import Iterable, Tuple, TypeVar + +T = TypeVar("T") + + +def loop_first(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: + """Iterate and generate a tuple with a flag for first value.""" + iter_values = iter(values) + try: + value = next(iter_values) + except StopIteration: + return + yield True, value + for value in iter_values: + yield False, value + + +def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: + """Iterate and generate a tuple with a flag for last value.""" + iter_values = iter(values) + try: + previous_value = next(iter_values) + except StopIteration: + return + for value in iter_values: + yield False, previous_value + previous_value = value + yield True, previous_value + + +def loop_first_last(values: Iterable[T]) -> Iterable[Tuple[bool, bool, T]]: + """Iterate and generate a tuple with a flag for first and last value.""" + iter_values = iter(values) + try: + previous_value = next(iter_values) + except StopIteration: + return + first = True + for value in iter_values: + yield first, False, previous_value + first = False + previous_value = value + yield first, True, previous_value diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py new file mode 100644 index 0000000000000000000000000000000000000000..6ae05d3e2a901af754b1626d911ebc3c45e22a40 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py @@ -0,0 +1,69 @@ +from types import TracebackType +from typing import IO, Iterable, Iterator, List, Optional, Type + + +class NullFile(IO[str]): + def close(self) -> None: + pass + + def isatty(self) -> bool: + return False + + def read(self, __n: int = 1) -> str: + return "" + + def readable(self) -> bool: + return False + + def readline(self, __limit: int = 1) -> str: + return "" + + def readlines(self, __hint: int = 1) -> List[str]: + return [] + + def seek(self, __offset: int, __whence: int = 1) -> int: + return 0 + + def seekable(self) -> bool: + return False + + def tell(self) -> int: + return 0 + + def truncate(self, __size: Optional[int] = 1) -> int: + return 0 + + def writable(self) -> bool: + return False + + def writelines(self, __lines: Iterable[str]) -> None: + pass + + def __next__(self) -> str: + return "" + + def __iter__(self) -> Iterator[str]: + return iter([""]) + + def __enter__(self) -> IO[str]: + return self + + def __exit__( + self, + __t: Optional[Type[BaseException]], + __value: Optional[BaseException], + __traceback: Optional[TracebackType], + ) -> None: + pass + + def write(self, text: str) -> int: + return 0 + + def flush(self) -> None: + pass + + def fileno(self) -> int: + return -1 + + +NULL_FILE = NullFile() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py new file mode 100644 index 0000000000000000000000000000000000000000..3c748d33e45bfcdc690ceee490cbb50b516cd2b3 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py @@ -0,0 +1,309 @@ +from .palette import Palette + + +# Taken from https://en.wikipedia.org/wiki/ANSI_escape_code (Windows 10 column) +WINDOWS_PALETTE = Palette( + [ + (12, 12, 12), + (197, 15, 31), + (19, 161, 14), + (193, 156, 0), + (0, 55, 218), + (136, 23, 152), + (58, 150, 221), + (204, 204, 204), + (118, 118, 118), + (231, 72, 86), + (22, 198, 12), + (249, 241, 165), + (59, 120, 255), + (180, 0, 158), + (97, 214, 214), + (242, 242, 242), + ] +) + +# # The standard ansi colors (including bright variants) +STANDARD_PALETTE = Palette( + [ + (0, 0, 0), + (170, 0, 0), + (0, 170, 0), + (170, 85, 0), + (0, 0, 170), + (170, 0, 170), + (0, 170, 170), + (170, 170, 170), + (85, 85, 85), + (255, 85, 85), + (85, 255, 85), + (255, 255, 85), + (85, 85, 255), + (255, 85, 255), + (85, 255, 255), + (255, 255, 255), + ] +) + + +# The 256 color palette +EIGHT_BIT_PALETTE = Palette( + [ + (0, 0, 0), + (128, 0, 0), + (0, 128, 0), + (128, 128, 0), + (0, 0, 128), + (128, 0, 128), + (0, 128, 128), + (192, 192, 192), + (128, 128, 128), + (255, 0, 0), + (0, 255, 0), + (255, 255, 0), + (0, 0, 255), + (255, 0, 255), + (0, 255, 255), + (255, 255, 255), + (0, 0, 0), + (0, 0, 95), + (0, 0, 135), + (0, 0, 175), + (0, 0, 215), + (0, 0, 255), + (0, 95, 0), + (0, 95, 95), + (0, 95, 135), + (0, 95, 175), + (0, 95, 215), + (0, 95, 255), + (0, 135, 0), + (0, 135, 95), + (0, 135, 135), + (0, 135, 175), + (0, 135, 215), + (0, 135, 255), + (0, 175, 0), + (0, 175, 95), + (0, 175, 135), + (0, 175, 175), + (0, 175, 215), + (0, 175, 255), + (0, 215, 0), + (0, 215, 95), + (0, 215, 135), + (0, 215, 175), + (0, 215, 215), + (0, 215, 255), + (0, 255, 0), + (0, 255, 95), + (0, 255, 135), + (0, 255, 175), + (0, 255, 215), + (0, 255, 255), + (95, 0, 0), + (95, 0, 95), + (95, 0, 135), + (95, 0, 175), + (95, 0, 215), + (95, 0, 255), + (95, 95, 0), + (95, 95, 95), + (95, 95, 135), + (95, 95, 175), + (95, 95, 215), + (95, 95, 255), + (95, 135, 0), + (95, 135, 95), + (95, 135, 135), + (95, 135, 175), + (95, 135, 215), + (95, 135, 255), + (95, 175, 0), + (95, 175, 95), + (95, 175, 135), + (95, 175, 175), + (95, 175, 215), + (95, 175, 255), + (95, 215, 0), + (95, 215, 95), + (95, 215, 135), + (95, 215, 175), + (95, 215, 215), + (95, 215, 255), + (95, 255, 0), + (95, 255, 95), + (95, 255, 135), + (95, 255, 175), + (95, 255, 215), + (95, 255, 255), + (135, 0, 0), + (135, 0, 95), + (135, 0, 135), + (135, 0, 175), + (135, 0, 215), + (135, 0, 255), + (135, 95, 0), + (135, 95, 95), + (135, 95, 135), + (135, 95, 175), + (135, 95, 215), + (135, 95, 255), + (135, 135, 0), + (135, 135, 95), + (135, 135, 135), + (135, 135, 175), + (135, 135, 215), + (135, 135, 255), + (135, 175, 0), + (135, 175, 95), + (135, 175, 135), + (135, 175, 175), + (135, 175, 215), + (135, 175, 255), + (135, 215, 0), + (135, 215, 95), + (135, 215, 135), + (135, 215, 175), + (135, 215, 215), + (135, 215, 255), + (135, 255, 0), + (135, 255, 95), + (135, 255, 135), + (135, 255, 175), + (135, 255, 215), + (135, 255, 255), + (175, 0, 0), + (175, 0, 95), + (175, 0, 135), + (175, 0, 175), + (175, 0, 215), + (175, 0, 255), + (175, 95, 0), + (175, 95, 95), + (175, 95, 135), + (175, 95, 175), + (175, 95, 215), + (175, 95, 255), + (175, 135, 0), + (175, 135, 95), + (175, 135, 135), + (175, 135, 175), + (175, 135, 215), + (175, 135, 255), + (175, 175, 0), + (175, 175, 95), + (175, 175, 135), + (175, 175, 175), + (175, 175, 215), + (175, 175, 255), + (175, 215, 0), + (175, 215, 95), + (175, 215, 135), + (175, 215, 175), + (175, 215, 215), + (175, 215, 255), + (175, 255, 0), + (175, 255, 95), + (175, 255, 135), + (175, 255, 175), + (175, 255, 215), + (175, 255, 255), + (215, 0, 0), + (215, 0, 95), + (215, 0, 135), + (215, 0, 175), + (215, 0, 215), + (215, 0, 255), + (215, 95, 0), + (215, 95, 95), + (215, 95, 135), + (215, 95, 175), + (215, 95, 215), + (215, 95, 255), + (215, 135, 0), + (215, 135, 95), + (215, 135, 135), + (215, 135, 175), + (215, 135, 215), + (215, 135, 255), + (215, 175, 0), + (215, 175, 95), + (215, 175, 135), + (215, 175, 175), + (215, 175, 215), + (215, 175, 255), + (215, 215, 0), + (215, 215, 95), + (215, 215, 135), + (215, 215, 175), + (215, 215, 215), + (215, 215, 255), + (215, 255, 0), + (215, 255, 95), + (215, 255, 135), + (215, 255, 175), + (215, 255, 215), + (215, 255, 255), + (255, 0, 0), + (255, 0, 95), + (255, 0, 135), + (255, 0, 175), + (255, 0, 215), + (255, 0, 255), + (255, 95, 0), + (255, 95, 95), + (255, 95, 135), + (255, 95, 175), + (255, 95, 215), + (255, 95, 255), + (255, 135, 0), + (255, 135, 95), + (255, 135, 135), + (255, 135, 175), + (255, 135, 215), + (255, 135, 255), + (255, 175, 0), + (255, 175, 95), + (255, 175, 135), + (255, 175, 175), + (255, 175, 215), + (255, 175, 255), + (255, 215, 0), + (255, 215, 95), + (255, 215, 135), + (255, 215, 175), + (255, 215, 215), + (255, 215, 255), + (255, 255, 0), + (255, 255, 95), + (255, 255, 135), + (255, 255, 175), + (255, 255, 215), + (255, 255, 255), + (8, 8, 8), + (18, 18, 18), + (28, 28, 28), + (38, 38, 38), + (48, 48, 48), + (58, 58, 58), + (68, 68, 68), + (78, 78, 78), + (88, 88, 88), + (98, 98, 98), + (108, 108, 108), + (118, 118, 118), + (128, 128, 128), + (138, 138, 138), + (148, 148, 148), + (158, 158, 158), + (168, 168, 168), + (178, 178, 178), + (188, 188, 188), + (198, 198, 198), + (208, 208, 208), + (218, 218, 218), + (228, 228, 228), + (238, 238, 238), + ] +) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py new file mode 100644 index 0000000000000000000000000000000000000000..4f6d8b2d79406012c5f8bae9c289ed5bf4d179cc --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py @@ -0,0 +1,17 @@ +from typing import Optional + + +def pick_bool(*values: Optional[bool]) -> bool: + """Pick the first non-none bool or return the last value. + + Args: + *values (bool): Any number of boolean or None values. + + Returns: + bool: First non-none boolean. + """ + assert values, "1 or more values required" + for value in values: + if value is not None: + return value + return bool(value) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py new file mode 100644 index 0000000000000000000000000000000000000000..95267b0cb6c4a1f0e95f9767d4063c3fd9ebc2d0 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py @@ -0,0 +1,159 @@ +import sys +from fractions import Fraction +from math import ceil +from typing import cast, List, Optional, Sequence + +if sys.version_info >= (3, 8): + from typing import Protocol +else: + from pip._vendor.typing_extensions import Protocol # pragma: no cover + + +class Edge(Protocol): + """Any object that defines an edge (such as Layout).""" + + size: Optional[int] = None + ratio: int = 1 + minimum_size: int = 1 + + +def ratio_resolve(total: int, edges: Sequence[Edge]) -> List[int]: + """Divide total space to satisfy size, ratio, and minimum_size, constraints. + + The returned list of integers should add up to total in most cases, unless it is + impossible to satisfy all the constraints. For instance, if there are two edges + with a minimum size of 20 each and `total` is 30 then the returned list will be + greater than total. In practice, this would mean that a Layout object would + clip the rows that would overflow the screen height. + + Args: + total (int): Total number of characters. + edges (List[Edge]): Edges within total space. + + Returns: + List[int]: Number of characters for each edge. + """ + # Size of edge or None for yet to be determined + sizes = [(edge.size or None) for edge in edges] + + _Fraction = Fraction + + # While any edges haven't been calculated + while None in sizes: + # Get flexible edges and index to map these back on to sizes list + flexible_edges = [ + (index, edge) + for index, (size, edge) in enumerate(zip(sizes, edges)) + if size is None + ] + # Remaining space in total + remaining = total - sum(size or 0 for size in sizes) + if remaining <= 0: + # No room for flexible edges + return [ + ((edge.minimum_size or 1) if size is None else size) + for size, edge in zip(sizes, edges) + ] + # Calculate number of characters in a ratio portion + portion = _Fraction( + remaining, sum((edge.ratio or 1) for _, edge in flexible_edges) + ) + + # If any edges will be less than their minimum, replace size with the minimum + for index, edge in flexible_edges: + if portion * edge.ratio <= edge.minimum_size: + sizes[index] = edge.minimum_size + # New fixed size will invalidate calculations, so we need to repeat the process + break + else: + # Distribute flexible space and compensate for rounding error + # Since edge sizes can only be integers we need to add the remainder + # to the following line + remainder = _Fraction(0) + for index, edge in flexible_edges: + size, remainder = divmod(portion * edge.ratio + remainder, 1) + sizes[index] = size + break + # Sizes now contains integers only + return cast(List[int], sizes) + + +def ratio_reduce( + total: int, ratios: List[int], maximums: List[int], values: List[int] +) -> List[int]: + """Divide an integer total in to parts based on ratios. + + Args: + total (int): The total to divide. + ratios (List[int]): A list of integer ratios. + maximums (List[int]): List of maximums values for each slot. + values (List[int]): List of values + + Returns: + List[int]: A list of integers guaranteed to sum to total. + """ + ratios = [ratio if _max else 0 for ratio, _max in zip(ratios, maximums)] + total_ratio = sum(ratios) + if not total_ratio: + return values[:] + total_remaining = total + result: List[int] = [] + append = result.append + for ratio, maximum, value in zip(ratios, maximums, values): + if ratio and total_ratio > 0: + distributed = min(maximum, round(ratio * total_remaining / total_ratio)) + append(value - distributed) + total_remaining -= distributed + total_ratio -= ratio + else: + append(value) + return result + + +def ratio_distribute( + total: int, ratios: List[int], minimums: Optional[List[int]] = None +) -> List[int]: + """Distribute an integer total in to parts based on ratios. + + Args: + total (int): The total to divide. + ratios (List[int]): A list of integer ratios. + minimums (List[int]): List of minimum values for each slot. + + Returns: + List[int]: A list of integers guaranteed to sum to total. + """ + if minimums: + ratios = [ratio if _min else 0 for ratio, _min in zip(ratios, minimums)] + total_ratio = sum(ratios) + assert total_ratio > 0, "Sum of ratios must be > 0" + + total_remaining = total + distributed_total: List[int] = [] + append = distributed_total.append + if minimums is None: + _minimums = [0] * len(ratios) + else: + _minimums = minimums + for ratio, minimum in zip(ratios, _minimums): + if total_ratio > 0: + distributed = max(minimum, ceil(ratio * total_remaining / total_ratio)) + else: + distributed = total_remaining + append(distributed) + total_ratio -= ratio + total_remaining -= distributed + return distributed_total + + +if __name__ == "__main__": + from dataclasses import dataclass + + @dataclass + class E: + size: Optional[int] = None + ratio: int = 1 + minimum_size: int = 1 + + resolved = ratio_resolve(110, [E(None, 1, 1), E(None, 1, 1), E(None, 1, 1)]) + print(sum(resolved)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py new file mode 100644 index 0000000000000000000000000000000000000000..d0bb1fe751677f0ee83fc6bb876ed72443fdcde7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py @@ -0,0 +1,482 @@ +""" +Spinners are from: +* cli-spinners: + MIT License + Copyright (c) Sindre Sorhus (sindresorhus.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 + in 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: + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + 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 AUTHORS 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 + IN THE SOFTWARE. +""" + +SPINNERS = { + "dots": { + "interval": 80, + "frames": "⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏", + }, + "dots2": {"interval": 80, "frames": "⣾⣽⣻⢿⡿⣟⣯⣷"}, + "dots3": { + "interval": 80, + "frames": "⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓", + }, + "dots4": { + "interval": 80, + "frames": "⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆", + }, + "dots5": { + "interval": 80, + "frames": "⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋", + }, + "dots6": { + "interval": 80, + "frames": "⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁", + }, + "dots7": { + "interval": 80, + "frames": "⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈", + }, + "dots8": { + "interval": 80, + "frames": "⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈", + }, + "dots9": {"interval": 80, "frames": "⢹⢺⢼⣸⣇⡧⡗⡏"}, + "dots10": {"interval": 80, "frames": "⢄⢂⢁⡁⡈⡐⡠"}, + "dots11": {"interval": 100, "frames": "⠁⠂⠄⡀⢀⠠⠐⠈"}, + "dots12": { + "interval": 80, + "frames": [ + "⢀⠀", + "⡀⠀", + "⠄⠀", + "⢂⠀", + "⡂⠀", + "⠅⠀", + "⢃⠀", + "⡃⠀", + "⠍⠀", + "⢋⠀", + "⡋⠀", + "⠍⠁", + "⢋⠁", + "⡋⠁", + "⠍⠉", + "⠋⠉", + "⠋⠉", + "⠉⠙", + "⠉⠙", + "⠉⠩", + "⠈⢙", + "⠈⡙", + "⢈⠩", + "⡀⢙", + "⠄⡙", + "⢂⠩", + "⡂⢘", + "⠅⡘", + "⢃⠨", + "⡃⢐", + "⠍⡐", + "⢋⠠", + "⡋⢀", + "⠍⡁", + "⢋⠁", + "⡋⠁", + "⠍⠉", + "⠋⠉", + "⠋⠉", + "⠉⠙", + "⠉⠙", + "⠉⠩", + "⠈⢙", + "⠈⡙", + "⠈⠩", + "⠀⢙", + "⠀⡙", + "⠀⠩", + "⠀⢘", + "⠀⡘", + "⠀⠨", + "⠀⢐", + "⠀⡐", + "⠀⠠", + "⠀⢀", + "⠀⡀", + ], + }, + "dots8Bit": { + "interval": 80, + "frames": "⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌⠍⠎⠏⡈⡉⡊⡋⡌⡍⡎⡏⠐⠑⠒⠓⠔⠕⠖⠗⡐⡑⡒⡓⡔⡕⡖⡗⠘⠙⠚⠛⠜⠝⠞⠟⡘⡙" + "⡚⡛⡜⡝⡞⡟⠠⠡⠢⠣⠤⠥⠦⠧⡠⡡⡢⡣⡤⡥⡦⡧⠨⠩⠪⠫⠬⠭⠮⠯⡨⡩⡪⡫⡬⡭⡮⡯⠰⠱⠲⠳⠴⠵⠶⠷⡰⡱⡲⡳⡴⡵⡶⡷⠸⠹⠺⠻" + "⠼⠽⠾⠿⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⣀⣁⣂⣃⣄⣅⣆⣇⢈⢉⢊⢋⢌⢍⢎⢏⣈⣉⣊⣋⣌⣍⣎⣏⢐⢑⢒⢓⢔⢕⢖⢗⣐⣑⣒⣓⣔⣕" + "⣖⣗⢘⢙⢚⢛⢜⢝⢞⢟⣘⣙⣚⣛⣜⣝⣞⣟⢠⢡⢢⢣⢤⢥⢦⢧⣠⣡⣢⣣⣤⣥⣦⣧⢨⢩⢪⢫⢬⢭⢮⢯⣨⣩⣪⣫⣬⣭⣮⣯⢰⢱⢲⢳⢴⢵⢶⢷" + "⣰⣱⣲⣳⣴⣵⣶⣷⢸⢹⢺⢻⢼⢽⢾⢿⣸⣹⣺⣻⣼⣽⣾⣿", + }, + "line": {"interval": 130, "frames": ["-", "\\", "|", "/"]}, + "line2": {"interval": 100, "frames": "⠂-–—–-"}, + "pipe": {"interval": 100, "frames": "┤┘┴└├┌┬┐"}, + "simpleDots": {"interval": 400, "frames": [". ", ".. ", "...", " "]}, + "simpleDotsScrolling": { + "interval": 200, + "frames": [". ", ".. ", "...", " ..", " .", " "], + }, + "star": {"interval": 70, "frames": "✶✸✹✺✹✷"}, + "star2": {"interval": 80, "frames": "+x*"}, + "flip": { + "interval": 70, + "frames": "___-``'´-___", + }, + "hamburger": {"interval": 100, "frames": "☱☲☴"}, + "growVertical": { + "interval": 120, + "frames": "▁▃▄▅▆▇▆▅▄▃", + }, + "growHorizontal": { + "interval": 120, + "frames": "▏▎▍▌▋▊▉▊▋▌▍▎", + }, + "balloon": {"interval": 140, "frames": " .oO@* "}, + "balloon2": {"interval": 120, "frames": ".oO°Oo."}, + "noise": {"interval": 100, "frames": "▓▒░"}, + "bounce": {"interval": 120, "frames": "⠁⠂⠄⠂"}, + "boxBounce": {"interval": 120, "frames": "▖▘▝▗"}, + "boxBounce2": {"interval": 100, "frames": "▌▀▐▄"}, + "triangle": {"interval": 50, "frames": "◢◣◤◥"}, + "arc": {"interval": 100, "frames": "◜◠◝◞◡◟"}, + "circle": {"interval": 120, "frames": "◡⊙◠"}, + "squareCorners": {"interval": 180, "frames": "◰◳◲◱"}, + "circleQuarters": {"interval": 120, "frames": "◴◷◶◵"}, + "circleHalves": {"interval": 50, "frames": "◐◓◑◒"}, + "squish": {"interval": 100, "frames": "╫╪"}, + "toggle": {"interval": 250, "frames": "⊶⊷"}, + "toggle2": {"interval": 80, "frames": "▫▪"}, + "toggle3": {"interval": 120, "frames": "□■"}, + "toggle4": {"interval": 100, "frames": "■□▪▫"}, + "toggle5": {"interval": 100, "frames": "▮▯"}, + "toggle6": {"interval": 300, "frames": "ဝ၀"}, + "toggle7": {"interval": 80, "frames": "⦾⦿"}, + "toggle8": {"interval": 100, "frames": "◍◌"}, + "toggle9": {"interval": 100, "frames": "◉◎"}, + "toggle10": {"interval": 100, "frames": "㊂㊀㊁"}, + "toggle11": {"interval": 50, "frames": "⧇⧆"}, + "toggle12": {"interval": 120, "frames": "☗☖"}, + "toggle13": {"interval": 80, "frames": "=*-"}, + "arrow": {"interval": 100, "frames": "←↖↑↗→↘↓↙"}, + "arrow2": { + "interval": 80, + "frames": ["⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "], + }, + "arrow3": { + "interval": 120, + "frames": ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], + }, + "bouncingBar": { + "interval": 80, + "frames": [ + "[ ]", + "[= ]", + "[== ]", + "[=== ]", + "[ ===]", + "[ ==]", + "[ =]", + "[ ]", + "[ =]", + "[ ==]", + "[ ===]", + "[====]", + "[=== ]", + "[== ]", + "[= ]", + ], + }, + "bouncingBall": { + "interval": 80, + "frames": [ + "( ● )", + "( ● )", + "( ● )", + "( ● )", + "( ●)", + "( ● )", + "( ● )", + "( ● )", + "( ● )", + "(● )", + ], + }, + "smiley": {"interval": 200, "frames": ["😄 ", "😝 "]}, + "monkey": {"interval": 300, "frames": ["🙈 ", "🙈 ", "🙉 ", "🙊 "]}, + "hearts": {"interval": 100, "frames": ["💛 ", "💙 ", "💜 ", "💚 ", "❤️ "]}, + "clock": { + "interval": 100, + "frames": [ + "🕛 ", + "🕐 ", + "🕑 ", + "🕒 ", + "🕓 ", + "🕔 ", + "🕕 ", + "🕖 ", + "🕗 ", + "🕘 ", + "🕙 ", + "🕚 ", + ], + }, + "earth": {"interval": 180, "frames": ["🌍 ", "🌎 ", "🌏 "]}, + "material": { + "interval": 17, + "frames": [ + "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "███████▁▁▁▁▁▁▁▁▁▁▁▁▁", + "████████▁▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "██████████▁▁▁▁▁▁▁▁▁▁", + "███████████▁▁▁▁▁▁▁▁▁", + "█████████████▁▁▁▁▁▁▁", + "██████████████▁▁▁▁▁▁", + "██████████████▁▁▁▁▁▁", + "▁██████████████▁▁▁▁▁", + "▁██████████████▁▁▁▁▁", + "▁██████████████▁▁▁▁▁", + "▁▁██████████████▁▁▁▁", + "▁▁▁██████████████▁▁▁", + "▁▁▁▁█████████████▁▁▁", + "▁▁▁▁██████████████▁▁", + "▁▁▁▁██████████████▁▁", + "▁▁▁▁▁██████████████▁", + "▁▁▁▁▁██████████████▁", + "▁▁▁▁▁██████████████▁", + "▁▁▁▁▁▁██████████████", + "▁▁▁▁▁▁██████████████", + "▁▁▁▁▁▁▁█████████████", + "▁▁▁▁▁▁▁█████████████", + "▁▁▁▁▁▁▁▁████████████", + "▁▁▁▁▁▁▁▁████████████", + "▁▁▁▁▁▁▁▁▁███████████", + "▁▁▁▁▁▁▁▁▁███████████", + "▁▁▁▁▁▁▁▁▁▁██████████", + "▁▁▁▁▁▁▁▁▁▁██████████", + "▁▁▁▁▁▁▁▁▁▁▁▁████████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", + "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", + "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", + "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", + "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", + "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", + "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "████████▁▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "█████████▁▁▁▁▁▁▁▁▁▁▁", + "███████████▁▁▁▁▁▁▁▁▁", + "████████████▁▁▁▁▁▁▁▁", + "████████████▁▁▁▁▁▁▁▁", + "██████████████▁▁▁▁▁▁", + "██████████████▁▁▁▁▁▁", + "▁██████████████▁▁▁▁▁", + "▁██████████████▁▁▁▁▁", + "▁▁▁█████████████▁▁▁▁", + "▁▁▁▁▁████████████▁▁▁", + "▁▁▁▁▁████████████▁▁▁", + "▁▁▁▁▁▁███████████▁▁▁", + "▁▁▁▁▁▁▁▁█████████▁▁▁", + "▁▁▁▁▁▁▁▁█████████▁▁▁", + "▁▁▁▁▁▁▁▁▁█████████▁▁", + "▁▁▁▁▁▁▁▁▁█████████▁▁", + "▁▁▁▁▁▁▁▁▁▁█████████▁", + "▁▁▁▁▁▁▁▁▁▁▁████████▁", + "▁▁▁▁▁▁▁▁▁▁▁████████▁", + "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", + "▁▁▁▁▁▁▁▁▁▁▁▁███████▁", + "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁███████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁", + ], + }, + "moon": { + "interval": 80, + "frames": ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], + }, + "runner": {"interval": 140, "frames": ["🚶 ", "🏃 "]}, + "pong": { + "interval": 80, + "frames": [ + "▐⠂ ▌", + "▐⠈ ▌", + "▐ ⠂ ▌", + "▐ ⠠ ▌", + "▐ ⡀ ▌", + "▐ ⠠ ▌", + "▐ ⠂ ▌", + "▐ ⠈ ▌", + "▐ ⠂ ▌", + "▐ ⠠ ▌", + "▐ ⡀ ▌", + "▐ ⠠ ▌", + "▐ ⠂ ▌", + "▐ ⠈ ▌", + "▐ ⠂▌", + "▐ ⠠▌", + "▐ ⡀▌", + "▐ ⠠ ▌", + "▐ ⠂ ▌", + "▐ ⠈ ▌", + "▐ ⠂ ▌", + "▐ ⠠ ▌", + "▐ ⡀ ▌", + "▐ ⠠ ▌", + "▐ ⠂ ▌", + "▐ ⠈ ▌", + "▐ ⠂ ▌", + "▐ ⠠ ▌", + "▐ ⡀ ▌", + "▐⠠ ▌", + ], + }, + "shark": { + "interval": 120, + "frames": [ + "▐|\\____________▌", + "▐_|\\___________▌", + "▐__|\\__________▌", + "▐___|\\_________▌", + "▐____|\\________▌", + "▐_____|\\_______▌", + "▐______|\\______▌", + "▐_______|\\_____▌", + "▐________|\\____▌", + "▐_________|\\___▌", + "▐__________|\\__▌", + "▐___________|\\_▌", + "▐____________|\\▌", + "▐____________/|▌", + "▐___________/|_▌", + "▐__________/|__▌", + "▐_________/|___▌", + "▐________/|____▌", + "▐_______/|_____▌", + "▐______/|______▌", + "▐_____/|_______▌", + "▐____/|________▌", + "▐___/|_________▌", + "▐__/|__________▌", + "▐_/|___________▌", + "▐/|____________▌", + ], + }, + "dqpb": {"interval": 100, "frames": "dqpb"}, + "weather": { + "interval": 100, + "frames": [ + "☀️ ", + "☀️ ", + "☀️ ", + "🌤 ", + "⛅️ ", + "🌥 ", + "☁️ ", + "🌧 ", + "🌨 ", + "🌧 ", + "🌨 ", + "🌧 ", + "🌨 ", + "⛈ ", + "🌨 ", + "🌧 ", + "🌨 ", + "☁️ ", + "🌥 ", + "⛅️ ", + "🌤 ", + "☀️ ", + "☀️ ", + ], + }, + "christmas": {"interval": 400, "frames": "🌲🎄"}, + "grenade": { + "interval": 80, + "frames": [ + "، ", + "′ ", + " ´ ", + " ‾ ", + " ⸌", + " ⸊", + " |", + " ⁎", + " ⁕", + " ෴ ", + " ⁓", + " ", + " ", + " ", + ], + }, + "point": {"interval": 125, "frames": ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"]}, + "layer": {"interval": 150, "frames": "-=≡"}, + "betaWave": { + "interval": 80, + "frames": [ + "ρββββββ", + "βρβββββ", + "ββρββββ", + "βββρβββ", + "ββββρββ", + "βββββρβ", + "ββββββρ", + ], + }, + "aesthetic": { + "interval": 80, + "frames": [ + "▰▱▱▱▱▱▱", + "▰▰▱▱▱▱▱", + "▰▰▰▱▱▱▱", + "▰▰▰▰▱▱▱", + "▰▰▰▰▰▱▱", + "▰▰▰▰▰▰▱", + "▰▰▰▰▰▰▰", + "▰▱▱▱▱▱▱", + ], + }, +} diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py new file mode 100644 index 0000000000000000000000000000000000000000..194564e761ddae165b39ef6598877e2e3820af0a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py @@ -0,0 +1,16 @@ +from typing import List, TypeVar + +T = TypeVar("T") + + +class Stack(List[T]): + """A small shim over builtin list.""" + + @property + def top(self) -> T: + """Get top of stack.""" + return self[-1] + + def push(self, item: T) -> None: + """Push an item on to the stack (append in stack nomenclature).""" + self.append(item) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py new file mode 100644 index 0000000000000000000000000000000000000000..a2ca6be03c43054caaa3660998273ebf704345dd --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py @@ -0,0 +1,19 @@ +""" +Timer context manager, only used in debug. + +""" + +from time import time + +import contextlib +from typing import Generator + + +@contextlib.contextmanager +def timer(subject: str = "time") -> Generator[None, None, None]: + """print the elapsed time. (only used in debugging)""" + start = time() + yield + elapsed = time() - start + elapsed_ms = elapsed * 1000 + print(f"{subject} elapsed {elapsed_ms:.1f}ms") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py new file mode 100644 index 0000000000000000000000000000000000000000..2eba1b9b4ab8492d1c2174905e4cbaf1ff185eca --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py @@ -0,0 +1,661 @@ +"""Light wrapper around the Win32 Console API - this module should only be imported on Windows + +The API that this module wraps is documented at https://docs.microsoft.com/en-us/windows/console/console-functions +""" + +import ctypes +import sys +from typing import Any + +windll: Any = None +if sys.platform == "win32": + windll = ctypes.LibraryLoader(ctypes.WinDLL) +else: + raise ImportError(f"{__name__} can only be imported on Windows") + +import time +from ctypes import Structure, byref, wintypes +from typing import IO, NamedTuple, Type, cast + +from pip._vendor.rich.color import ColorSystem +from pip._vendor.rich.style import Style + +STDOUT = -11 +ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4 + +COORD = wintypes._COORD + + +class LegacyWindowsError(Exception): + pass + + +class WindowsCoordinates(NamedTuple): + """Coordinates in the Windows Console API are (y, x), not (x, y). + This class is intended to prevent that confusion. + Rows and columns are indexed from 0. + This class can be used in place of wintypes._COORD in arguments and argtypes. + """ + + row: int + col: int + + @classmethod + def from_param(cls, value: "WindowsCoordinates") -> COORD: + """Converts a WindowsCoordinates into a wintypes _COORD structure. + This classmethod is internally called by ctypes to perform the conversion. + + Args: + value (WindowsCoordinates): The input coordinates to convert. + + Returns: + wintypes._COORD: The converted coordinates struct. + """ + return COORD(value.col, value.row) + + +class CONSOLE_SCREEN_BUFFER_INFO(Structure): + _fields_ = [ + ("dwSize", COORD), + ("dwCursorPosition", COORD), + ("wAttributes", wintypes.WORD), + ("srWindow", wintypes.SMALL_RECT), + ("dwMaximumWindowSize", COORD), + ] + + +class CONSOLE_CURSOR_INFO(ctypes.Structure): + _fields_ = [("dwSize", wintypes.DWORD), ("bVisible", wintypes.BOOL)] + + +_GetStdHandle = windll.kernel32.GetStdHandle +_GetStdHandle.argtypes = [ + wintypes.DWORD, +] +_GetStdHandle.restype = wintypes.HANDLE + + +def GetStdHandle(handle: int = STDOUT) -> wintypes.HANDLE: + """Retrieves a handle to the specified standard device (standard input, standard output, or standard error). + + Args: + handle (int): Integer identifier for the handle. Defaults to -11 (stdout). + + Returns: + wintypes.HANDLE: The handle + """ + return cast(wintypes.HANDLE, _GetStdHandle(handle)) + + +_GetConsoleMode = windll.kernel32.GetConsoleMode +_GetConsoleMode.argtypes = [wintypes.HANDLE, wintypes.LPDWORD] +_GetConsoleMode.restype = wintypes.BOOL + + +def GetConsoleMode(std_handle: wintypes.HANDLE) -> int: + """Retrieves the current input mode of a console's input buffer + or the current output mode of a console screen buffer. + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + + Raises: + LegacyWindowsError: If any error occurs while calling the Windows console API. + + Returns: + int: Value representing the current console mode as documented at + https://docs.microsoft.com/en-us/windows/console/getconsolemode#parameters + """ + + console_mode = wintypes.DWORD() + success = bool(_GetConsoleMode(std_handle, console_mode)) + if not success: + raise LegacyWindowsError("Unable to get legacy Windows Console Mode") + return console_mode.value + + +_FillConsoleOutputCharacterW = windll.kernel32.FillConsoleOutputCharacterW +_FillConsoleOutputCharacterW.argtypes = [ + wintypes.HANDLE, + ctypes.c_char, + wintypes.DWORD, + cast(Type[COORD], WindowsCoordinates), + ctypes.POINTER(wintypes.DWORD), +] +_FillConsoleOutputCharacterW.restype = wintypes.BOOL + + +def FillConsoleOutputCharacter( + std_handle: wintypes.HANDLE, + char: str, + length: int, + start: WindowsCoordinates, +) -> int: + """Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates. + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + char (str): The character to write. Must be a string of length 1. + length (int): The number of times to write the character. + start (WindowsCoordinates): The coordinates to start writing at. + + Returns: + int: The number of characters written. + """ + character = ctypes.c_char(char.encode()) + num_characters = wintypes.DWORD(length) + num_written = wintypes.DWORD(0) + _FillConsoleOutputCharacterW( + std_handle, + character, + num_characters, + start, + byref(num_written), + ) + return num_written.value + + +_FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute +_FillConsoleOutputAttribute.argtypes = [ + wintypes.HANDLE, + wintypes.WORD, + wintypes.DWORD, + cast(Type[COORD], WindowsCoordinates), + ctypes.POINTER(wintypes.DWORD), +] +_FillConsoleOutputAttribute.restype = wintypes.BOOL + + +def FillConsoleOutputAttribute( + std_handle: wintypes.HANDLE, + attributes: int, + length: int, + start: WindowsCoordinates, +) -> int: + """Sets the character attributes for a specified number of character cells, + beginning at the specified coordinates in a screen buffer. + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + attributes (int): Integer value representing the foreground and background colours of the cells. + length (int): The number of cells to set the output attribute of. + start (WindowsCoordinates): The coordinates of the first cell whose attributes are to be set. + + Returns: + int: The number of cells whose attributes were actually set. + """ + num_cells = wintypes.DWORD(length) + style_attrs = wintypes.WORD(attributes) + num_written = wintypes.DWORD(0) + _FillConsoleOutputAttribute( + std_handle, style_attrs, num_cells, start, byref(num_written) + ) + return num_written.value + + +_SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute +_SetConsoleTextAttribute.argtypes = [ + wintypes.HANDLE, + wintypes.WORD, +] +_SetConsoleTextAttribute.restype = wintypes.BOOL + + +def SetConsoleTextAttribute( + std_handle: wintypes.HANDLE, attributes: wintypes.WORD +) -> bool: + """Set the colour attributes for all text written after this function is called. + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + attributes (int): Integer value representing the foreground and background colours. + + + Returns: + bool: True if the attribute was set successfully, otherwise False. + """ + return bool(_SetConsoleTextAttribute(std_handle, attributes)) + + +_GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo +_GetConsoleScreenBufferInfo.argtypes = [ + wintypes.HANDLE, + ctypes.POINTER(CONSOLE_SCREEN_BUFFER_INFO), +] +_GetConsoleScreenBufferInfo.restype = wintypes.BOOL + + +def GetConsoleScreenBufferInfo( + std_handle: wintypes.HANDLE, +) -> CONSOLE_SCREEN_BUFFER_INFO: + """Retrieves information about the specified console screen buffer. + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + + Returns: + CONSOLE_SCREEN_BUFFER_INFO: A CONSOLE_SCREEN_BUFFER_INFO ctype struct contain information about + screen size, cursor position, colour attributes, and more.""" + console_screen_buffer_info = CONSOLE_SCREEN_BUFFER_INFO() + _GetConsoleScreenBufferInfo(std_handle, byref(console_screen_buffer_info)) + return console_screen_buffer_info + + +_SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition +_SetConsoleCursorPosition.argtypes = [ + wintypes.HANDLE, + cast(Type[COORD], WindowsCoordinates), +] +_SetConsoleCursorPosition.restype = wintypes.BOOL + + +def SetConsoleCursorPosition( + std_handle: wintypes.HANDLE, coords: WindowsCoordinates +) -> bool: + """Set the position of the cursor in the console screen + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + coords (WindowsCoordinates): The coordinates to move the cursor to. + + Returns: + bool: True if the function succeeds, otherwise False. + """ + return bool(_SetConsoleCursorPosition(std_handle, coords)) + + +_GetConsoleCursorInfo = windll.kernel32.GetConsoleCursorInfo +_GetConsoleCursorInfo.argtypes = [ + wintypes.HANDLE, + ctypes.POINTER(CONSOLE_CURSOR_INFO), +] +_GetConsoleCursorInfo.restype = wintypes.BOOL + + +def GetConsoleCursorInfo( + std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO +) -> bool: + """Get the cursor info - used to get cursor visibility and width + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct that receives information + about the console's cursor. + + Returns: + bool: True if the function succeeds, otherwise False. + """ + return bool(_GetConsoleCursorInfo(std_handle, byref(cursor_info))) + + +_SetConsoleCursorInfo = windll.kernel32.SetConsoleCursorInfo +_SetConsoleCursorInfo.argtypes = [ + wintypes.HANDLE, + ctypes.POINTER(CONSOLE_CURSOR_INFO), +] +_SetConsoleCursorInfo.restype = wintypes.BOOL + + +def SetConsoleCursorInfo( + std_handle: wintypes.HANDLE, cursor_info: CONSOLE_CURSOR_INFO +) -> bool: + """Set the cursor info - used for adjusting cursor visibility and width + + Args: + std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer. + cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct containing the new cursor info. + + Returns: + bool: True if the function succeeds, otherwise False. + """ + return bool(_SetConsoleCursorInfo(std_handle, byref(cursor_info))) + + +_SetConsoleTitle = windll.kernel32.SetConsoleTitleW +_SetConsoleTitle.argtypes = [wintypes.LPCWSTR] +_SetConsoleTitle.restype = wintypes.BOOL + + +def SetConsoleTitle(title: str) -> bool: + """Sets the title of the current console window + + Args: + title (str): The new title of the console window. + + Returns: + bool: True if the function succeeds, otherwise False. + """ + return bool(_SetConsoleTitle(title)) + + +class LegacyWindowsTerm: + """This class allows interaction with the legacy Windows Console API. It should only be used in the context + of environments where virtual terminal processing is not available. However, if it is used in a Windows environment, + the entire API should work. + + Args: + file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout. + """ + + BRIGHT_BIT = 8 + + # Indices are ANSI color numbers, values are the corresponding Windows Console API color numbers + ANSI_TO_WINDOWS = [ + 0, # black The Windows colours are defined in wincon.h as follows: + 4, # red define FOREGROUND_BLUE 0x0001 -- 0000 0001 + 2, # green define FOREGROUND_GREEN 0x0002 -- 0000 0010 + 6, # yellow define FOREGROUND_RED 0x0004 -- 0000 0100 + 1, # blue define FOREGROUND_INTENSITY 0x0008 -- 0000 1000 + 5, # magenta define BACKGROUND_BLUE 0x0010 -- 0001 0000 + 3, # cyan define BACKGROUND_GREEN 0x0020 -- 0010 0000 + 7, # white define BACKGROUND_RED 0x0040 -- 0100 0000 + 8, # bright black (grey) define BACKGROUND_INTENSITY 0x0080 -- 1000 0000 + 12, # bright red + 10, # bright green + 14, # bright yellow + 9, # bright blue + 13, # bright magenta + 11, # bright cyan + 15, # bright white + ] + + def __init__(self, file: "IO[str]") -> None: + handle = GetStdHandle(STDOUT) + self._handle = handle + default_text = GetConsoleScreenBufferInfo(handle).wAttributes + self._default_text = default_text + + self._default_fore = default_text & 7 + self._default_back = (default_text >> 4) & 7 + self._default_attrs = self._default_fore | (self._default_back << 4) + + self._file = file + self.write = file.write + self.flush = file.flush + + @property + def cursor_position(self) -> WindowsCoordinates: + """Returns the current position of the cursor (0-based) + + Returns: + WindowsCoordinates: The current cursor position. + """ + coord: COORD = GetConsoleScreenBufferInfo(self._handle).dwCursorPosition + return WindowsCoordinates(row=coord.Y, col=coord.X) + + @property + def screen_size(self) -> WindowsCoordinates: + """Returns the current size of the console screen buffer, in character columns and rows + + Returns: + WindowsCoordinates: The width and height of the screen as WindowsCoordinates. + """ + screen_size: COORD = GetConsoleScreenBufferInfo(self._handle).dwSize + return WindowsCoordinates(row=screen_size.Y, col=screen_size.X) + + def write_text(self, text: str) -> None: + """Write text directly to the terminal without any modification of styles + + Args: + text (str): The text to write to the console + """ + self.write(text) + self.flush() + + def write_styled(self, text: str, style: Style) -> None: + """Write styled text to the terminal. + + Args: + text (str): The text to write + style (Style): The style of the text + """ + color = style.color + bgcolor = style.bgcolor + if style.reverse: + color, bgcolor = bgcolor, color + + if color: + fore = color.downgrade(ColorSystem.WINDOWS).number + fore = fore if fore is not None else 7 # Default to ANSI 7: White + if style.bold: + fore = fore | self.BRIGHT_BIT + if style.dim: + fore = fore & ~self.BRIGHT_BIT + fore = self.ANSI_TO_WINDOWS[fore] + else: + fore = self._default_fore + + if bgcolor: + back = bgcolor.downgrade(ColorSystem.WINDOWS).number + back = back if back is not None else 0 # Default to ANSI 0: Black + back = self.ANSI_TO_WINDOWS[back] + else: + back = self._default_back + + assert fore is not None + assert back is not None + + SetConsoleTextAttribute( + self._handle, attributes=ctypes.c_ushort(fore | (back << 4)) + ) + self.write_text(text) + SetConsoleTextAttribute(self._handle, attributes=self._default_text) + + def move_cursor_to(self, new_position: WindowsCoordinates) -> None: + """Set the position of the cursor + + Args: + new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor. + """ + if new_position.col < 0 or new_position.row < 0: + return + SetConsoleCursorPosition(self._handle, coords=new_position) + + def erase_line(self) -> None: + """Erase all content on the line the cursor is currently located at""" + screen_size = self.screen_size + cursor_position = self.cursor_position + cells_to_erase = screen_size.col + start_coordinates = WindowsCoordinates(row=cursor_position.row, col=0) + FillConsoleOutputCharacter( + self._handle, " ", length=cells_to_erase, start=start_coordinates + ) + FillConsoleOutputAttribute( + self._handle, + self._default_attrs, + length=cells_to_erase, + start=start_coordinates, + ) + + def erase_end_of_line(self) -> None: + """Erase all content from the cursor position to the end of that line""" + cursor_position = self.cursor_position + cells_to_erase = self.screen_size.col - cursor_position.col + FillConsoleOutputCharacter( + self._handle, " ", length=cells_to_erase, start=cursor_position + ) + FillConsoleOutputAttribute( + self._handle, + self._default_attrs, + length=cells_to_erase, + start=cursor_position, + ) + + def erase_start_of_line(self) -> None: + """Erase all content from the cursor position to the start of that line""" + row, col = self.cursor_position + start = WindowsCoordinates(row, 0) + FillConsoleOutputCharacter(self._handle, " ", length=col, start=start) + FillConsoleOutputAttribute( + self._handle, self._default_attrs, length=col, start=start + ) + + def move_cursor_up(self) -> None: + """Move the cursor up a single cell""" + cursor_position = self.cursor_position + SetConsoleCursorPosition( + self._handle, + coords=WindowsCoordinates( + row=cursor_position.row - 1, col=cursor_position.col + ), + ) + + def move_cursor_down(self) -> None: + """Move the cursor down a single cell""" + cursor_position = self.cursor_position + SetConsoleCursorPosition( + self._handle, + coords=WindowsCoordinates( + row=cursor_position.row + 1, + col=cursor_position.col, + ), + ) + + def move_cursor_forward(self) -> None: + """Move the cursor forward a single cell. Wrap to the next line if required.""" + row, col = self.cursor_position + if col == self.screen_size.col - 1: + row += 1 + col = 0 + else: + col += 1 + SetConsoleCursorPosition( + self._handle, coords=WindowsCoordinates(row=row, col=col) + ) + + def move_cursor_to_column(self, column: int) -> None: + """Move cursor to the column specified by the zero-based column index, staying on the same row + + Args: + column (int): The zero-based column index to move the cursor to. + """ + row, _ = self.cursor_position + SetConsoleCursorPosition(self._handle, coords=WindowsCoordinates(row, column)) + + def move_cursor_backward(self) -> None: + """Move the cursor backward a single cell. Wrap to the previous line if required.""" + row, col = self.cursor_position + if col == 0: + row -= 1 + col = self.screen_size.col - 1 + else: + col -= 1 + SetConsoleCursorPosition( + self._handle, coords=WindowsCoordinates(row=row, col=col) + ) + + def hide_cursor(self) -> None: + """Hide the cursor""" + current_cursor_size = self._get_cursor_size() + invisible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=0) + SetConsoleCursorInfo(self._handle, cursor_info=invisible_cursor) + + def show_cursor(self) -> None: + """Show the cursor""" + current_cursor_size = self._get_cursor_size() + visible_cursor = CONSOLE_CURSOR_INFO(dwSize=current_cursor_size, bVisible=1) + SetConsoleCursorInfo(self._handle, cursor_info=visible_cursor) + + def set_title(self, title: str) -> None: + """Set the title of the terminal window + + Args: + title (str): The new title of the console window + """ + assert len(title) < 255, "Console title must be less than 255 characters" + SetConsoleTitle(title) + + def _get_cursor_size(self) -> int: + """Get the percentage of the character cell that is filled by the cursor""" + cursor_info = CONSOLE_CURSOR_INFO() + GetConsoleCursorInfo(self._handle, cursor_info=cursor_info) + return int(cursor_info.dwSize) + + +if __name__ == "__main__": + handle = GetStdHandle() + + from pip._vendor.rich.console import Console + + console = Console() + + term = LegacyWindowsTerm(sys.stdout) + term.set_title("Win32 Console Examples") + + style = Style(color="black", bgcolor="red") + + heading = Style.parse("black on green") + + # Check colour output + console.rule("Checking colour output") + console.print("[on red]on red!") + console.print("[blue]blue!") + console.print("[yellow]yellow!") + console.print("[bold yellow]bold yellow!") + console.print("[bright_yellow]bright_yellow!") + console.print("[dim bright_yellow]dim bright_yellow!") + console.print("[italic cyan]italic cyan!") + console.print("[bold white on blue]bold white on blue!") + console.print("[reverse bold white on blue]reverse bold white on blue!") + console.print("[bold black on cyan]bold black on cyan!") + console.print("[black on green]black on green!") + console.print("[blue on green]blue on green!") + console.print("[white on black]white on black!") + console.print("[black on white]black on white!") + console.print("[#1BB152 on #DA812D]#1BB152 on #DA812D!") + + # Check cursor movement + console.rule("Checking cursor movement") + console.print() + term.move_cursor_backward() + term.move_cursor_backward() + term.write_text("went back and wrapped to prev line") + time.sleep(1) + term.move_cursor_up() + term.write_text("we go up") + time.sleep(1) + term.move_cursor_down() + term.write_text("and down") + time.sleep(1) + term.move_cursor_up() + term.move_cursor_backward() + term.move_cursor_backward() + term.write_text("we went up and back 2") + time.sleep(1) + term.move_cursor_down() + term.move_cursor_backward() + term.move_cursor_backward() + term.write_text("we went down and back 2") + time.sleep(1) + + # Check erasing of lines + term.hide_cursor() + console.print() + console.rule("Checking line erasing") + console.print("\n...Deleting to the start of the line...") + term.write_text("The red arrow shows the cursor location, and direction of erase") + time.sleep(1) + term.move_cursor_to_column(16) + term.write_styled("<", Style.parse("black on red")) + term.move_cursor_backward() + time.sleep(1) + term.erase_start_of_line() + time.sleep(1) + + console.print("\n\n...And to the end of the line...") + term.write_text("The red arrow shows the cursor location, and direction of erase") + time.sleep(1) + + term.move_cursor_to_column(16) + term.write_styled(">", Style.parse("black on red")) + time.sleep(1) + term.erase_end_of_line() + time.sleep(1) + + console.print("\n\n...Now the whole line will be erased...") + term.write_styled("I'm going to disappear!", style=Style.parse("black on cyan")) + time.sleep(1) + term.erase_line() + + term.show_cursor() + print("\n") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py new file mode 100644 index 0000000000000000000000000000000000000000..7520a9f90a5bcb0ec89ffef4d77136a296e08b4e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py @@ -0,0 +1,71 @@ +import sys +from dataclasses import dataclass + + +@dataclass +class WindowsConsoleFeatures: + """Windows features available.""" + + vt: bool = False + """The console supports VT codes.""" + truecolor: bool = False + """The console supports truecolor.""" + + +try: + import ctypes + from ctypes import LibraryLoader + + if sys.platform == "win32": + windll = LibraryLoader(ctypes.WinDLL) + else: + windll = None + raise ImportError("Not windows") + + from pip._vendor.rich._win32_console import ( + ENABLE_VIRTUAL_TERMINAL_PROCESSING, + GetConsoleMode, + GetStdHandle, + LegacyWindowsError, + ) + +except (AttributeError, ImportError, ValueError): + # Fallback if we can't load the Windows DLL + def get_windows_console_features() -> WindowsConsoleFeatures: + features = WindowsConsoleFeatures() + return features + +else: + + def get_windows_console_features() -> WindowsConsoleFeatures: + """Get windows console features. + + Returns: + WindowsConsoleFeatures: An instance of WindowsConsoleFeatures. + """ + handle = GetStdHandle() + try: + console_mode = GetConsoleMode(handle) + success = True + except LegacyWindowsError: + console_mode = 0 + success = False + vt = bool(success and console_mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) + truecolor = False + if vt: + win_version = sys.getwindowsversion() + truecolor = win_version.major > 10 or ( + win_version.major == 10 and win_version.build >= 15063 + ) + features = WindowsConsoleFeatures(vt=vt, truecolor=truecolor) + return features + + +if __name__ == "__main__": + import platform + + features = get_windows_console_features() + from pip._vendor.rich import print + + print(f'platform="{platform.system()}"') + print(repr(features)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py new file mode 100644 index 0000000000000000000000000000000000000000..5ece05649e7268a75c82de6ced552619ffc093ab --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py @@ -0,0 +1,56 @@ +from typing import Iterable, Sequence, Tuple, cast + +from pip._vendor.rich._win32_console import LegacyWindowsTerm, WindowsCoordinates +from pip._vendor.rich.segment import ControlCode, ControlType, Segment + + +def legacy_windows_render(buffer: Iterable[Segment], term: LegacyWindowsTerm) -> None: + """Makes appropriate Windows Console API calls based on the segments in the buffer. + + Args: + buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls. + term (LegacyWindowsTerm): Used to call the Windows Console API. + """ + for text, style, control in buffer: + if not control: + if style: + term.write_styled(text, style) + else: + term.write_text(text) + else: + control_codes: Sequence[ControlCode] = control + for control_code in control_codes: + control_type = control_code[0] + if control_type == ControlType.CURSOR_MOVE_TO: + _, x, y = cast(Tuple[ControlType, int, int], control_code) + term.move_cursor_to(WindowsCoordinates(row=y - 1, col=x - 1)) + elif control_type == ControlType.CARRIAGE_RETURN: + term.write_text("\r") + elif control_type == ControlType.HOME: + term.move_cursor_to(WindowsCoordinates(0, 0)) + elif control_type == ControlType.CURSOR_UP: + term.move_cursor_up() + elif control_type == ControlType.CURSOR_DOWN: + term.move_cursor_down() + elif control_type == ControlType.CURSOR_FORWARD: + term.move_cursor_forward() + elif control_type == ControlType.CURSOR_BACKWARD: + term.move_cursor_backward() + elif control_type == ControlType.CURSOR_MOVE_TO_COLUMN: + _, column = cast(Tuple[ControlType, int], control_code) + term.move_cursor_to_column(column - 1) + elif control_type == ControlType.HIDE_CURSOR: + term.hide_cursor() + elif control_type == ControlType.SHOW_CURSOR: + term.show_cursor() + elif control_type == ControlType.ERASE_IN_LINE: + _, mode = cast(Tuple[ControlType, int], control_code) + if mode == 0: + term.erase_end_of_line() + elif mode == 1: + term.erase_start_of_line() + elif mode == 2: + term.erase_line() + elif control_type == ControlType.SET_WINDOW_TITLE: + _, title = cast(Tuple[ControlType, str], control_code) + term.set_title(title) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py new file mode 100644 index 0000000000000000000000000000000000000000..2e94ff6f43adfb6a6900a3a2147781e91220b189 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +import re +from typing import Iterable + +from ._loop import loop_last +from .cells import cell_len, chop_cells + +re_word = re.compile(r"\s*\S+\s*") + + +def words(text: str) -> Iterable[tuple[int, int, str]]: + """Yields each word from the text as a tuple + containing (start_index, end_index, word). A "word" in this context may + include the actual word and any whitespace to the right. + """ + position = 0 + word_match = re_word.match(text, position) + while word_match is not None: + start, end = word_match.span() + word = word_match.group(0) + yield start, end, word + word_match = re_word.match(text, end) + + +def divide_line(text: str, width: int, fold: bool = True) -> list[int]: + """Given a string of text, and a width (measured in cells), return a list + of cell offsets which the string should be split at in order for it to fit + within the given width. + + Args: + text: The text to examine. + width: The available cell width. + fold: If True, words longer than `width` will be folded onto a new line. + + Returns: + A list of indices to break the line at. + """ + break_positions: list[int] = [] # offsets to insert the breaks at + append = break_positions.append + cell_offset = 0 + _cell_len = cell_len + + for start, _end, word in words(text): + word_length = _cell_len(word.rstrip()) + remaining_space = width - cell_offset + word_fits_remaining_space = remaining_space >= word_length + + if word_fits_remaining_space: + # Simplest case - the word fits within the remaining width for this line. + cell_offset += _cell_len(word) + else: + # Not enough space remaining for this word on the current line. + if word_length > width: + # The word doesn't fit on any line, so we can't simply + # place it on the next line... + if fold: + # Fold the word across multiple lines. + folded_word = chop_cells(word, width=width) + for last, line in loop_last(folded_word): + if start: + append(start) + if last: + cell_offset = _cell_len(line) + else: + start += len(line) + else: + # Folding isn't allowed, so crop the word. + if start: + append(start) + cell_offset = _cell_len(word) + elif cell_offset and start: + # The word doesn't fit within the remaining space on the current + # line, but it *can* fit on to the next (empty) line. + append(start) + cell_offset = _cell_len(word) + + return break_positions + + +if __name__ == "__main__": # pragma: no cover + from .console import Console + + console = Console(width=10) + console.print("12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345") + print(chop_cells("abcdefghijklmnopqrstuvwxyz", 10)) + + console = Console(width=20) + console.rule() + console.print("TextualはPythonの高速アプリケーション開発フレームワークです") + + console.rule() + console.print("アプリケーションは1670万色を使用でき") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/abc.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/abc.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e498efabfab0dcf31cd7731f8f821cc423bc4f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/abc.py @@ -0,0 +1,33 @@ +from abc import ABC + + +class RichRenderable(ABC): + """An abstract base class for Rich renderables. + + Note that there is no need to extend this class, the intended use is to check if an + object supports the Rich renderable protocol. For example:: + + if isinstance(my_object, RichRenderable): + console.print(my_object) + + """ + + @classmethod + def __subclasshook__(cls, other: type) -> bool: + """Check if this class supports the rich render protocol.""" + return hasattr(other, "__rich_console__") or hasattr(other, "__rich__") + + +if __name__ == "__main__": # pragma: no cover + from pip._vendor.rich.text import Text + + t = Text() + print(isinstance(Text, RichRenderable)) + print(isinstance(t, RichRenderable)) + + class Foo: + pass + + f = Foo() + print(isinstance(f, RichRenderable)) + print(isinstance("", RichRenderable)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/align.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/align.py new file mode 100644 index 0000000000000000000000000000000000000000..330dcc51192c97c3946b4f7c03d2e4701b0c9f9f --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/align.py @@ -0,0 +1,312 @@ +import sys +from itertools import chain +from typing import TYPE_CHECKING, Iterable, Optional + +if sys.version_info >= (3, 8): + from typing import Literal +else: + from pip._vendor.typing_extensions import Literal # pragma: no cover + +from .constrain import Constrain +from .jupyter import JupyterMixin +from .measure import Measurement +from .segment import Segment +from .style import StyleType + +if TYPE_CHECKING: + from .console import Console, ConsoleOptions, RenderableType, RenderResult + +AlignMethod = Literal["left", "center", "right"] +VerticalAlignMethod = Literal["top", "middle", "bottom"] + + +class Align(JupyterMixin): + """Align a renderable by adding spaces if necessary. + + Args: + renderable (RenderableType): A console renderable. + align (AlignMethod): One of "left", "center", or "right"" + style (StyleType, optional): An optional style to apply to the background. + vertical (Optional[VerticalAlignMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None. + pad (bool, optional): Pad the right with spaces. Defaults to True. + width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None. + height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None. + + Raises: + ValueError: if ``align`` is not one of the expected values. + """ + + def __init__( + self, + renderable: "RenderableType", + align: AlignMethod = "left", + style: Optional[StyleType] = None, + *, + vertical: Optional[VerticalAlignMethod] = None, + pad: bool = True, + width: Optional[int] = None, + height: Optional[int] = None, + ) -> None: + if align not in ("left", "center", "right"): + raise ValueError( + f'invalid value for align, expected "left", "center", or "right" (not {align!r})' + ) + if vertical is not None and vertical not in ("top", "middle", "bottom"): + raise ValueError( + f'invalid value for vertical, expected "top", "middle", or "bottom" (not {vertical!r})' + ) + self.renderable = renderable + self.align = align + self.style = style + self.vertical = vertical + self.pad = pad + self.width = width + self.height = height + + def __repr__(self) -> str: + return f"Align({self.renderable!r}, {self.align!r})" + + @classmethod + def left( + cls, + renderable: "RenderableType", + style: Optional[StyleType] = None, + *, + vertical: Optional[VerticalAlignMethod] = None, + pad: bool = True, + width: Optional[int] = None, + height: Optional[int] = None, + ) -> "Align": + """Align a renderable to the left.""" + return cls( + renderable, + "left", + style=style, + vertical=vertical, + pad=pad, + width=width, + height=height, + ) + + @classmethod + def center( + cls, + renderable: "RenderableType", + style: Optional[StyleType] = None, + *, + vertical: Optional[VerticalAlignMethod] = None, + pad: bool = True, + width: Optional[int] = None, + height: Optional[int] = None, + ) -> "Align": + """Align a renderable to the center.""" + return cls( + renderable, + "center", + style=style, + vertical=vertical, + pad=pad, + width=width, + height=height, + ) + + @classmethod + def right( + cls, + renderable: "RenderableType", + style: Optional[StyleType] = None, + *, + vertical: Optional[VerticalAlignMethod] = None, + pad: bool = True, + width: Optional[int] = None, + height: Optional[int] = None, + ) -> "Align": + """Align a renderable to the right.""" + return cls( + renderable, + "right", + style=style, + vertical=vertical, + pad=pad, + width=width, + height=height, + ) + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + align = self.align + width = console.measure(self.renderable, options=options).maximum + rendered = console.render( + Constrain( + self.renderable, width if self.width is None else min(width, self.width) + ), + options.update(height=None), + ) + lines = list(Segment.split_lines(rendered)) + width, height = Segment.get_shape(lines) + lines = Segment.set_shape(lines, width, height) + new_line = Segment.line() + excess_space = options.max_width - width + style = console.get_style(self.style) if self.style is not None else None + + def generate_segments() -> Iterable[Segment]: + if excess_space <= 0: + # Exact fit + for line in lines: + yield from line + yield new_line + + elif align == "left": + # Pad on the right + pad = Segment(" " * excess_space, style) if self.pad else None + for line in lines: + yield from line + if pad: + yield pad + yield new_line + + elif align == "center": + # Pad left and right + left = excess_space // 2 + pad = Segment(" " * left, style) + pad_right = ( + Segment(" " * (excess_space - left), style) if self.pad else None + ) + for line in lines: + if left: + yield pad + yield from line + if pad_right: + yield pad_right + yield new_line + + elif align == "right": + # Padding on left + pad = Segment(" " * excess_space, style) + for line in lines: + yield pad + yield from line + yield new_line + + blank_line = ( + Segment(f"{' ' * (self.width or options.max_width)}\n", style) + if self.pad + else Segment("\n") + ) + + def blank_lines(count: int) -> Iterable[Segment]: + if count > 0: + for _ in range(count): + yield blank_line + + vertical_height = self.height or options.height + iter_segments: Iterable[Segment] + if self.vertical and vertical_height is not None: + if self.vertical == "top": + bottom_space = vertical_height - height + iter_segments = chain(generate_segments(), blank_lines(bottom_space)) + elif self.vertical == "middle": + top_space = (vertical_height - height) // 2 + bottom_space = vertical_height - top_space - height + iter_segments = chain( + blank_lines(top_space), + generate_segments(), + blank_lines(bottom_space), + ) + else: # self.vertical == "bottom": + top_space = vertical_height - height + iter_segments = chain(blank_lines(top_space), generate_segments()) + else: + iter_segments = generate_segments() + if self.style: + style = console.get_style(self.style) + iter_segments = Segment.apply_style(iter_segments, style) + yield from iter_segments + + def __rich_measure__( + self, console: "Console", options: "ConsoleOptions" + ) -> Measurement: + measurement = Measurement.get(console, options, self.renderable) + return measurement + + +class VerticalCenter(JupyterMixin): + """Vertically aligns a renderable. + + Warn: + This class is deprecated and may be removed in a future version. Use Align class with + `vertical="middle"`. + + Args: + renderable (RenderableType): A renderable object. + style (StyleType, optional): An optional style to apply to the background. Defaults to None. + """ + + def __init__( + self, + renderable: "RenderableType", + style: Optional[StyleType] = None, + ) -> None: + self.renderable = renderable + self.style = style + + def __repr__(self) -> str: + return f"VerticalCenter({self.renderable!r})" + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + style = console.get_style(self.style) if self.style is not None else None + lines = console.render_lines( + self.renderable, options.update(height=None), pad=False + ) + width, _height = Segment.get_shape(lines) + new_line = Segment.line() + height = options.height or options.size.height + top_space = (height - len(lines)) // 2 + bottom_space = height - top_space - len(lines) + blank_line = Segment(f"{' ' * width}", style) + + def blank_lines(count: int) -> Iterable[Segment]: + for _ in range(count): + yield blank_line + yield new_line + + if top_space > 0: + yield from blank_lines(top_space) + for line in lines: + yield from line + yield new_line + if bottom_space > 0: + yield from blank_lines(bottom_space) + + def __rich_measure__( + self, console: "Console", options: "ConsoleOptions" + ) -> Measurement: + measurement = Measurement.get(console, options, self.renderable) + return measurement + + +if __name__ == "__main__": # pragma: no cover + from pip._vendor.rich.console import Console, Group + from pip._vendor.rich.highlighter import ReprHighlighter + from pip._vendor.rich.panel import Panel + + highlighter = ReprHighlighter() + console = Console() + + panel = Panel( + Group( + Align.left(highlighter("align='left'")), + Align.center(highlighter("align='center'")), + Align.right(highlighter("align='right'")), + ), + width=60, + style="on dark_blue", + title="Align", + ) + + console.print( + Align.center(panel, vertical="middle", style="on red", height=console.height) + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py new file mode 100644 index 0000000000000000000000000000000000000000..7de86ce5043feeee4b6c28302cc1e72c2ad4cfe1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py @@ -0,0 +1,241 @@ +import re +import sys +from contextlib import suppress +from typing import Iterable, NamedTuple, Optional + +from .color import Color +from .style import Style +from .text import Text + +re_ansi = re.compile( + r""" +(?:\x1b[0-?])| +(?:\x1b\](.*?)\x1b\\)| +(?:\x1b([(@-Z\\-_]|\[[0-?]*[ -/]*[@-~])) +""", + re.VERBOSE, +) + + +class _AnsiToken(NamedTuple): + """Result of ansi tokenized string.""" + + plain: str = "" + sgr: Optional[str] = "" + osc: Optional[str] = "" + + +def _ansi_tokenize(ansi_text: str) -> Iterable[_AnsiToken]: + """Tokenize a string in to plain text and ANSI codes. + + Args: + ansi_text (str): A String containing ANSI codes. + + Yields: + AnsiToken: A named tuple of (plain, sgr, osc) + """ + + position = 0 + sgr: Optional[str] + osc: Optional[str] + for match in re_ansi.finditer(ansi_text): + start, end = match.span(0) + osc, sgr = match.groups() + if start > position: + yield _AnsiToken(ansi_text[position:start]) + if sgr: + if sgr == "(": + position = end + 1 + continue + if sgr.endswith("m"): + yield _AnsiToken("", sgr[1:-1], osc) + else: + yield _AnsiToken("", sgr, osc) + position = end + if position < len(ansi_text): + yield _AnsiToken(ansi_text[position:]) + + +SGR_STYLE_MAP = { + 1: "bold", + 2: "dim", + 3: "italic", + 4: "underline", + 5: "blink", + 6: "blink2", + 7: "reverse", + 8: "conceal", + 9: "strike", + 21: "underline2", + 22: "not dim not bold", + 23: "not italic", + 24: "not underline", + 25: "not blink", + 26: "not blink2", + 27: "not reverse", + 28: "not conceal", + 29: "not strike", + 30: "color(0)", + 31: "color(1)", + 32: "color(2)", + 33: "color(3)", + 34: "color(4)", + 35: "color(5)", + 36: "color(6)", + 37: "color(7)", + 39: "default", + 40: "on color(0)", + 41: "on color(1)", + 42: "on color(2)", + 43: "on color(3)", + 44: "on color(4)", + 45: "on color(5)", + 46: "on color(6)", + 47: "on color(7)", + 49: "on default", + 51: "frame", + 52: "encircle", + 53: "overline", + 54: "not frame not encircle", + 55: "not overline", + 90: "color(8)", + 91: "color(9)", + 92: "color(10)", + 93: "color(11)", + 94: "color(12)", + 95: "color(13)", + 96: "color(14)", + 97: "color(15)", + 100: "on color(8)", + 101: "on color(9)", + 102: "on color(10)", + 103: "on color(11)", + 104: "on color(12)", + 105: "on color(13)", + 106: "on color(14)", + 107: "on color(15)", +} + + +class AnsiDecoder: + """Translate ANSI code in to styled Text.""" + + def __init__(self) -> None: + self.style = Style.null() + + def decode(self, terminal_text: str) -> Iterable[Text]: + """Decode ANSI codes in an iterable of lines. + + Args: + lines (Iterable[str]): An iterable of lines of terminal output. + + Yields: + Text: Marked up Text. + """ + for line in terminal_text.splitlines(): + yield self.decode_line(line) + + def decode_line(self, line: str) -> Text: + """Decode a line containing ansi codes. + + Args: + line (str): A line of terminal output. + + Returns: + Text: A Text instance marked up according to ansi codes. + """ + from_ansi = Color.from_ansi + from_rgb = Color.from_rgb + _Style = Style + text = Text() + append = text.append + line = line.rsplit("\r", 1)[-1] + for plain_text, sgr, osc in _ansi_tokenize(line): + if plain_text: + append(plain_text, self.style or None) + elif osc is not None: + if osc.startswith("8;"): + _params, semicolon, link = osc[2:].partition(";") + if semicolon: + self.style = self.style.update_link(link or None) + elif sgr is not None: + # Translate in to semi-colon separated codes + # Ignore invalid codes, because we want to be lenient + codes = [ + min(255, int(_code) if _code else 0) + for _code in sgr.split(";") + if _code.isdigit() or _code == "" + ] + iter_codes = iter(codes) + for code in iter_codes: + if code == 0: + # reset + self.style = _Style.null() + elif code in SGR_STYLE_MAP: + # styles + self.style += _Style.parse(SGR_STYLE_MAP[code]) + elif code == 38: + #  Foreground + with suppress(StopIteration): + color_type = next(iter_codes) + if color_type == 5: + self.style += _Style.from_color( + from_ansi(next(iter_codes)) + ) + elif color_type == 2: + self.style += _Style.from_color( + from_rgb( + next(iter_codes), + next(iter_codes), + next(iter_codes), + ) + ) + elif code == 48: + # Background + with suppress(StopIteration): + color_type = next(iter_codes) + if color_type == 5: + self.style += _Style.from_color( + None, from_ansi(next(iter_codes)) + ) + elif color_type == 2: + self.style += _Style.from_color( + None, + from_rgb( + next(iter_codes), + next(iter_codes), + next(iter_codes), + ), + ) + + return text + + +if sys.platform != "win32" and __name__ == "__main__": # pragma: no cover + import io + import os + import pty + import sys + + decoder = AnsiDecoder() + + stdout = io.BytesIO() + + def read(fd: int) -> bytes: + data = os.read(fd, 1024) + stdout.write(data) + return data + + pty.spawn(sys.argv[1:], read) + + from .console import Console + + console = Console(record=True) + + stdout_result = stdout.getvalue().decode("utf-8") + print(stdout_result) + + for line in decoder.decode(stdout_result): + console.print(line) + + console.save_html("stdout.html") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/bar.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/bar.py new file mode 100644 index 0000000000000000000000000000000000000000..022284b57881d8b133aced5b5a843e6447bb4e0b --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/bar.py @@ -0,0 +1,93 @@ +from typing import Optional, Union + +from .color import Color +from .console import Console, ConsoleOptions, RenderResult +from .jupyter import JupyterMixin +from .measure import Measurement +from .segment import Segment +from .style import Style + +# There are left-aligned characters for 1/8 to 7/8, but +# the right-aligned characters exist only for 1/8 and 4/8. +BEGIN_BLOCK_ELEMENTS = ["█", "█", "█", "▐", "▐", "▐", "▕", "▕"] +END_BLOCK_ELEMENTS = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉"] +FULL_BLOCK = "█" + + +class Bar(JupyterMixin): + """Renders a solid block bar. + + Args: + size (float): Value for the end of the bar. + begin (float): Begin point (between 0 and size, inclusive). + end (float): End point (between 0 and size, inclusive). + width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None. + color (Union[Color, str], optional): Color of the bar. Defaults to "default". + bgcolor (Union[Color, str], optional): Color of bar background. Defaults to "default". + """ + + def __init__( + self, + size: float, + begin: float, + end: float, + *, + width: Optional[int] = None, + color: Union[Color, str] = "default", + bgcolor: Union[Color, str] = "default", + ): + self.size = size + self.begin = max(begin, 0) + self.end = min(end, size) + self.width = width + self.style = Style(color=color, bgcolor=bgcolor) + + def __repr__(self) -> str: + return f"Bar({self.size}, {self.begin}, {self.end})" + + def __rich_console__( + self, console: Console, options: ConsoleOptions + ) -> RenderResult: + width = min( + self.width if self.width is not None else options.max_width, + options.max_width, + ) + + if self.begin >= self.end: + yield Segment(" " * width, self.style) + yield Segment.line() + return + + prefix_complete_eights = int(width * 8 * self.begin / self.size) + prefix_bar_count = prefix_complete_eights // 8 + prefix_eights_count = prefix_complete_eights % 8 + + body_complete_eights = int(width * 8 * self.end / self.size) + body_bar_count = body_complete_eights // 8 + body_eights_count = body_complete_eights % 8 + + # When start and end fall into the same cell, we ideally should render + # a symbol that's "center-aligned", but there is no good symbol in Unicode. + # In this case, we fall back to right-aligned block symbol for simplicity. + + prefix = " " * prefix_bar_count + if prefix_eights_count: + prefix += BEGIN_BLOCK_ELEMENTS[prefix_eights_count] + + body = FULL_BLOCK * body_bar_count + if body_eights_count: + body += END_BLOCK_ELEMENTS[body_eights_count] + + suffix = " " * (width - len(body)) + + yield Segment(prefix + body[len(prefix) :] + suffix, self.style) + yield Segment.line() + + def __rich_measure__( + self, console: Console, options: ConsoleOptions + ) -> Measurement: + return ( + Measurement(self.width, self.width) + if self.width is not None + else Measurement(4, options.max_width) + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/box.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/box.py new file mode 100644 index 0000000000000000000000000000000000000000..0511a9e48bae3df44289f5ab51dd711db42fe722 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/box.py @@ -0,0 +1,480 @@ +import sys +from typing import TYPE_CHECKING, Iterable, List + +if sys.version_info >= (3, 8): + from typing import Literal +else: + from pip._vendor.typing_extensions import Literal # pragma: no cover + + +from ._loop import loop_last + +if TYPE_CHECKING: + from pip._vendor.rich.console import ConsoleOptions + + +class Box: + """Defines characters to render boxes. + + ┌─┬┐ top + │ ││ head + ├─┼┤ head_row + │ ││ mid + ├─┼┤ row + ├─┼┤ foot_row + │ ││ foot + └─┴┘ bottom + + Args: + box (str): Characters making up box. + ascii (bool, optional): True if this box uses ascii characters only. Default is False. + """ + + def __init__(self, box: str, *, ascii: bool = False) -> None: + self._box = box + self.ascii = ascii + line1, line2, line3, line4, line5, line6, line7, line8 = box.splitlines() + # top + self.top_left, self.top, self.top_divider, self.top_right = iter(line1) + # head + self.head_left, _, self.head_vertical, self.head_right = iter(line2) + # head_row + ( + self.head_row_left, + self.head_row_horizontal, + self.head_row_cross, + self.head_row_right, + ) = iter(line3) + + # mid + self.mid_left, _, self.mid_vertical, self.mid_right = iter(line4) + # row + self.row_left, self.row_horizontal, self.row_cross, self.row_right = iter(line5) + # foot_row + ( + self.foot_row_left, + self.foot_row_horizontal, + self.foot_row_cross, + self.foot_row_right, + ) = iter(line6) + # foot + self.foot_left, _, self.foot_vertical, self.foot_right = iter(line7) + # bottom + self.bottom_left, self.bottom, self.bottom_divider, self.bottom_right = iter( + line8 + ) + + def __repr__(self) -> str: + return "Box(...)" + + def __str__(self) -> str: + return self._box + + def substitute(self, options: "ConsoleOptions", safe: bool = True) -> "Box": + """Substitute this box for another if it won't render due to platform issues. + + Args: + options (ConsoleOptions): Console options used in rendering. + safe (bool, optional): Substitute this for another Box if there are known problems + displaying on the platform (currently only relevant on Windows). Default is True. + + Returns: + Box: A different Box or the same Box. + """ + box = self + if options.legacy_windows and safe: + box = LEGACY_WINDOWS_SUBSTITUTIONS.get(box, box) + if options.ascii_only and not box.ascii: + box = ASCII + return box + + def get_plain_headed_box(self) -> "Box": + """If this box uses special characters for the borders of the header, then + return the equivalent box that does not. + + Returns: + Box: The most similar Box that doesn't use header-specific box characters. + If the current Box already satisfies this criterion, then it's returned. + """ + return PLAIN_HEADED_SUBSTITUTIONS.get(self, self) + + def get_top(self, widths: Iterable[int]) -> str: + """Get the top of a simple box. + + Args: + widths (List[int]): Widths of columns. + + Returns: + str: A string of box characters. + """ + + parts: List[str] = [] + append = parts.append + append(self.top_left) + for last, width in loop_last(widths): + append(self.top * width) + if not last: + append(self.top_divider) + append(self.top_right) + return "".join(parts) + + def get_row( + self, + widths: Iterable[int], + level: Literal["head", "row", "foot", "mid"] = "row", + edge: bool = True, + ) -> str: + """Get the top of a simple box. + + Args: + width (List[int]): Widths of columns. + + Returns: + str: A string of box characters. + """ + if level == "head": + left = self.head_row_left + horizontal = self.head_row_horizontal + cross = self.head_row_cross + right = self.head_row_right + elif level == "row": + left = self.row_left + horizontal = self.row_horizontal + cross = self.row_cross + right = self.row_right + elif level == "mid": + left = self.mid_left + horizontal = " " + cross = self.mid_vertical + right = self.mid_right + elif level == "foot": + left = self.foot_row_left + horizontal = self.foot_row_horizontal + cross = self.foot_row_cross + right = self.foot_row_right + else: + raise ValueError("level must be 'head', 'row' or 'foot'") + + parts: List[str] = [] + append = parts.append + if edge: + append(left) + for last, width in loop_last(widths): + append(horizontal * width) + if not last: + append(cross) + if edge: + append(right) + return "".join(parts) + + def get_bottom(self, widths: Iterable[int]) -> str: + """Get the bottom of a simple box. + + Args: + widths (List[int]): Widths of columns. + + Returns: + str: A string of box characters. + """ + + parts: List[str] = [] + append = parts.append + append(self.bottom_left) + for last, width in loop_last(widths): + append(self.bottom * width) + if not last: + append(self.bottom_divider) + append(self.bottom_right) + return "".join(parts) + + +# fmt: off +ASCII: Box = Box( + "+--+\n" + "| ||\n" + "|-+|\n" + "| ||\n" + "|-+|\n" + "|-+|\n" + "| ||\n" + "+--+\n", + ascii=True, +) + +ASCII2: Box = Box( + "+-++\n" + "| ||\n" + "+-++\n" + "| ||\n" + "+-++\n" + "+-++\n" + "| ||\n" + "+-++\n", + ascii=True, +) + +ASCII_DOUBLE_HEAD: Box = Box( + "+-++\n" + "| ||\n" + "+=++\n" + "| ||\n" + "+-++\n" + "+-++\n" + "| ||\n" + "+-++\n", + ascii=True, +) + +SQUARE: Box = Box( + "┌─┬┐\n" + "│ ││\n" + "├─┼┤\n" + "│ ││\n" + "├─┼┤\n" + "├─┼┤\n" + "│ ││\n" + "└─┴┘\n" +) + +SQUARE_DOUBLE_HEAD: Box = Box( + "┌─┬┐\n" + "│ ││\n" + "╞═╪╡\n" + "│ ││\n" + "├─┼┤\n" + "├─┼┤\n" + "│ ││\n" + "└─┴┘\n" +) + +MINIMAL: Box = Box( + " ╷ \n" + " │ \n" + "╶─┼╴\n" + " │ \n" + "╶─┼╴\n" + "╶─┼╴\n" + " │ \n" + " ╵ \n" +) + + +MINIMAL_HEAVY_HEAD: Box = Box( + " ╷ \n" + " │ \n" + "╺━┿╸\n" + " │ \n" + "╶─┼╴\n" + "╶─┼╴\n" + " │ \n" + " ╵ \n" +) + +MINIMAL_DOUBLE_HEAD: Box = Box( + " ╷ \n" + " │ \n" + " ═╪ \n" + " │ \n" + " ─┼ \n" + " ─┼ \n" + " │ \n" + " ╵ \n" +) + + +SIMPLE: Box = Box( + " \n" + " \n" + " ── \n" + " \n" + " \n" + " ── \n" + " \n" + " \n" +) + +SIMPLE_HEAD: Box = Box( + " \n" + " \n" + " ── \n" + " \n" + " \n" + " \n" + " \n" + " \n" +) + + +SIMPLE_HEAVY: Box = Box( + " \n" + " \n" + " ━━ \n" + " \n" + " \n" + " ━━ \n" + " \n" + " \n" +) + + +HORIZONTALS: Box = Box( + " ── \n" + " \n" + " ── \n" + " \n" + " ── \n" + " ── \n" + " \n" + " ── \n" +) + +ROUNDED: Box = Box( + "╭─┬╮\n" + "│ ││\n" + "├─┼┤\n" + "│ ││\n" + "├─┼┤\n" + "├─┼┤\n" + "│ ││\n" + "╰─┴╯\n" +) + +HEAVY: Box = Box( + "┏━┳┓\n" + "┃ ┃┃\n" + "┣━╋┫\n" + "┃ ┃┃\n" + "┣━╋┫\n" + "┣━╋┫\n" + "┃ ┃┃\n" + "┗━┻┛\n" +) + +HEAVY_EDGE: Box = Box( + "┏━┯┓\n" + "┃ │┃\n" + "┠─┼┨\n" + "┃ │┃\n" + "┠─┼┨\n" + "┠─┼┨\n" + "┃ │┃\n" + "┗━┷┛\n" +) + +HEAVY_HEAD: Box = Box( + "┏━┳┓\n" + "┃ ┃┃\n" + "┡━╇┩\n" + "│ ││\n" + "├─┼┤\n" + "├─┼┤\n" + "│ ││\n" + "└─┴┘\n" +) + +DOUBLE: Box = Box( + "╔═╦╗\n" + "║ ║║\n" + "╠═╬╣\n" + "║ ║║\n" + "╠═╬╣\n" + "╠═╬╣\n" + "║ ║║\n" + "╚═╩╝\n" +) + +DOUBLE_EDGE: Box = Box( + "╔═╤╗\n" + "║ │║\n" + "╟─┼╢\n" + "║ │║\n" + "╟─┼╢\n" + "╟─┼╢\n" + "║ │║\n" + "╚═╧╝\n" +) + +MARKDOWN: Box = Box( + " \n" + "| ||\n" + "|-||\n" + "| ||\n" + "|-||\n" + "|-||\n" + "| ||\n" + " \n", + ascii=True, +) +# fmt: on + +# Map Boxes that don't render with raster fonts on to equivalent that do +LEGACY_WINDOWS_SUBSTITUTIONS = { + ROUNDED: SQUARE, + MINIMAL_HEAVY_HEAD: MINIMAL, + SIMPLE_HEAVY: SIMPLE, + HEAVY: SQUARE, + HEAVY_EDGE: SQUARE, + HEAVY_HEAD: SQUARE, +} + +# Map headed boxes to their headerless equivalents +PLAIN_HEADED_SUBSTITUTIONS = { + HEAVY_HEAD: SQUARE, + SQUARE_DOUBLE_HEAD: SQUARE, + MINIMAL_DOUBLE_HEAD: MINIMAL, + MINIMAL_HEAVY_HEAD: MINIMAL, + ASCII_DOUBLE_HEAD: ASCII2, +} + + +if __name__ == "__main__": # pragma: no cover + from pip._vendor.rich.columns import Columns + from pip._vendor.rich.panel import Panel + + from . import box as box + from .console import Console + from .table import Table + from .text import Text + + console = Console(record=True) + + BOXES = [ + "ASCII", + "ASCII2", + "ASCII_DOUBLE_HEAD", + "SQUARE", + "SQUARE_DOUBLE_HEAD", + "MINIMAL", + "MINIMAL_HEAVY_HEAD", + "MINIMAL_DOUBLE_HEAD", + "SIMPLE", + "SIMPLE_HEAD", + "SIMPLE_HEAVY", + "HORIZONTALS", + "ROUNDED", + "HEAVY", + "HEAVY_EDGE", + "HEAVY_HEAD", + "DOUBLE", + "DOUBLE_EDGE", + "MARKDOWN", + ] + + console.print(Panel("[bold green]Box Constants", style="green"), justify="center") + console.print() + + columns = Columns(expand=True, padding=2) + for box_name in sorted(BOXES): + table = Table( + show_footer=True, style="dim", border_style="not dim", expand=True + ) + table.add_column("Header 1", "Footer 1") + table.add_column("Header 2", "Footer 2") + table.add_row("Cell", "Cell") + table.add_row("Cell", "Cell") + table.box = getattr(box, box_name) + table.title = Text(f"box.{box_name}", style="magenta") + columns.add_renderable(table) + console.print(columns) + + # console.save_svg("box.svg") diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/cells.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/cells.py new file mode 100644 index 0000000000000000000000000000000000000000..a85462271c9a14f88fda9a3954f98e857fb5aac8 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/cells.py @@ -0,0 +1,174 @@ +from __future__ import annotations + +from functools import lru_cache +from typing import Callable + +from ._cell_widths import CELL_WIDTHS + +# Ranges of unicode ordinals that produce a 1-cell wide character +# This is non-exhaustive, but covers most common Western characters +_SINGLE_CELL_UNICODE_RANGES: list[tuple[int, int]] = [ + (0x20, 0x7E), # Latin (excluding non-printable) + (0xA0, 0xAC), + (0xAE, 0x002FF), + (0x00370, 0x00482), # Greek / Cyrillic + (0x02500, 0x025FC), # Box drawing, box elements, geometric shapes + (0x02800, 0x028FF), # Braille +] + +# A set of characters that are a single cell wide +_SINGLE_CELLS = frozenset( + [ + character + for _start, _end in _SINGLE_CELL_UNICODE_RANGES + for character in map(chr, range(_start, _end + 1)) + ] +) + +# When called with a string this will return True if all +# characters are single-cell, otherwise False +_is_single_cell_widths: Callable[[str], bool] = _SINGLE_CELLS.issuperset + + +@lru_cache(4096) +def cached_cell_len(text: str) -> int: + """Get the number of cells required to display text. + + This method always caches, which may use up a lot of memory. It is recommended to use + `cell_len` over this method. + + Args: + text (str): Text to display. + + Returns: + int: Get the number of cells required to display text. + """ + if _is_single_cell_widths(text): + return len(text) + return sum(map(get_character_cell_size, text)) + + +def cell_len(text: str, _cell_len: Callable[[str], int] = cached_cell_len) -> int: + """Get the number of cells required to display text. + + Args: + text (str): Text to display. + + Returns: + int: Get the number of cells required to display text. + """ + if len(text) < 512: + return _cell_len(text) + if _is_single_cell_widths(text): + return len(text) + return sum(map(get_character_cell_size, text)) + + +@lru_cache(maxsize=4096) +def get_character_cell_size(character: str) -> int: + """Get the cell size of a character. + + Args: + character (str): A single character. + + Returns: + int: Number of cells (0, 1 or 2) occupied by that character. + """ + codepoint = ord(character) + _table = CELL_WIDTHS + lower_bound = 0 + upper_bound = len(_table) - 1 + index = (lower_bound + upper_bound) // 2 + while True: + start, end, width = _table[index] + if codepoint < start: + upper_bound = index - 1 + elif codepoint > end: + lower_bound = index + 1 + else: + return 0 if width == -1 else width + if upper_bound < lower_bound: + break + index = (lower_bound + upper_bound) // 2 + return 1 + + +def set_cell_size(text: str, total: int) -> str: + """Set the length of a string to fit within given number of cells.""" + + if _is_single_cell_widths(text): + size = len(text) + if size < total: + return text + " " * (total - size) + return text[:total] + + if total <= 0: + return "" + cell_size = cell_len(text) + if cell_size == total: + return text + if cell_size < total: + return text + " " * (total - cell_size) + + start = 0 + end = len(text) + + # Binary search until we find the right size + while True: + pos = (start + end) // 2 + before = text[: pos + 1] + before_len = cell_len(before) + if before_len == total + 1 and cell_len(before[-1]) == 2: + return before[:-1] + " " + if before_len == total: + return before + if before_len > total: + end = pos + else: + start = pos + + +def chop_cells( + text: str, + width: int, +) -> list[str]: + """Split text into lines such that each line fits within the available (cell) width. + + Args: + text: The text to fold such that it fits in the given width. + width: The width available (number of cells). + + Returns: + A list of strings such that each string in the list has cell width + less than or equal to the available width. + """ + _get_character_cell_size = get_character_cell_size + lines: list[list[str]] = [[]] + + append_new_line = lines.append + append_to_last_line = lines[-1].append + + total_width = 0 + + for character in text: + cell_width = _get_character_cell_size(character) + char_doesnt_fit = total_width + cell_width > width + + if char_doesnt_fit: + append_new_line([character]) + append_to_last_line = lines[-1].append + total_width = cell_width + else: + append_to_last_line(character) + total_width += cell_width + + return ["".join(line) for line in lines] + + +if __name__ == "__main__": # pragma: no cover + print(get_character_cell_size("😽")) + for line in chop_cells("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", 8): + print(line) + for n in range(80, 1, -1): + print(set_cell_size("""这是对亚洲语言支持的测试。面对模棱两可的想法,拒绝猜测的诱惑。""", n) + "|") + print("x" * n) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c23a6a91b833fd9bb20bd5238421a5c0f08df3 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color.py @@ -0,0 +1,621 @@ +import re +import sys +from colorsys import rgb_to_hls +from enum import IntEnum +from functools import lru_cache +from typing import TYPE_CHECKING, NamedTuple, Optional, Tuple + +from ._palettes import EIGHT_BIT_PALETTE, STANDARD_PALETTE, WINDOWS_PALETTE +from .color_triplet import ColorTriplet +from .repr import Result, rich_repr +from .terminal_theme import DEFAULT_TERMINAL_THEME + +if TYPE_CHECKING: # pragma: no cover + from .terminal_theme import TerminalTheme + from .text import Text + + +WINDOWS = sys.platform == "win32" + + +class ColorSystem(IntEnum): + """One of the 3 color system supported by terminals.""" + + STANDARD = 1 + EIGHT_BIT = 2 + TRUECOLOR = 3 + WINDOWS = 4 + + def __repr__(self) -> str: + return f"ColorSystem.{self.name}" + + def __str__(self) -> str: + return repr(self) + + +class ColorType(IntEnum): + """Type of color stored in Color class.""" + + DEFAULT = 0 + STANDARD = 1 + EIGHT_BIT = 2 + TRUECOLOR = 3 + WINDOWS = 4 + + def __repr__(self) -> str: + return f"ColorType.{self.name}" + + +ANSI_COLOR_NAMES = { + "black": 0, + "red": 1, + "green": 2, + "yellow": 3, + "blue": 4, + "magenta": 5, + "cyan": 6, + "white": 7, + "bright_black": 8, + "bright_red": 9, + "bright_green": 10, + "bright_yellow": 11, + "bright_blue": 12, + "bright_magenta": 13, + "bright_cyan": 14, + "bright_white": 15, + "grey0": 16, + "gray0": 16, + "navy_blue": 17, + "dark_blue": 18, + "blue3": 20, + "blue1": 21, + "dark_green": 22, + "deep_sky_blue4": 25, + "dodger_blue3": 26, + "dodger_blue2": 27, + "green4": 28, + "spring_green4": 29, + "turquoise4": 30, + "deep_sky_blue3": 32, + "dodger_blue1": 33, + "green3": 40, + "spring_green3": 41, + "dark_cyan": 36, + "light_sea_green": 37, + "deep_sky_blue2": 38, + "deep_sky_blue1": 39, + "spring_green2": 47, + "cyan3": 43, + "dark_turquoise": 44, + "turquoise2": 45, + "green1": 46, + "spring_green1": 48, + "medium_spring_green": 49, + "cyan2": 50, + "cyan1": 51, + "dark_red": 88, + "deep_pink4": 125, + "purple4": 55, + "purple3": 56, + "blue_violet": 57, + "orange4": 94, + "grey37": 59, + "gray37": 59, + "medium_purple4": 60, + "slate_blue3": 62, + "royal_blue1": 63, + "chartreuse4": 64, + "dark_sea_green4": 71, + "pale_turquoise4": 66, + "steel_blue": 67, + "steel_blue3": 68, + "cornflower_blue": 69, + "chartreuse3": 76, + "cadet_blue": 73, + "sky_blue3": 74, + "steel_blue1": 81, + "pale_green3": 114, + "sea_green3": 78, + "aquamarine3": 79, + "medium_turquoise": 80, + "chartreuse2": 112, + "sea_green2": 83, + "sea_green1": 85, + "aquamarine1": 122, + "dark_slate_gray2": 87, + "dark_magenta": 91, + "dark_violet": 128, + "purple": 129, + "light_pink4": 95, + "plum4": 96, + "medium_purple3": 98, + "slate_blue1": 99, + "yellow4": 106, + "wheat4": 101, + "grey53": 102, + "gray53": 102, + "light_slate_grey": 103, + "light_slate_gray": 103, + "medium_purple": 104, + "light_slate_blue": 105, + "dark_olive_green3": 149, + "dark_sea_green": 108, + "light_sky_blue3": 110, + "sky_blue2": 111, + "dark_sea_green3": 150, + "dark_slate_gray3": 116, + "sky_blue1": 117, + "chartreuse1": 118, + "light_green": 120, + "pale_green1": 156, + "dark_slate_gray1": 123, + "red3": 160, + "medium_violet_red": 126, + "magenta3": 164, + "dark_orange3": 166, + "indian_red": 167, + "hot_pink3": 168, + "medium_orchid3": 133, + "medium_orchid": 134, + "medium_purple2": 140, + "dark_goldenrod": 136, + "light_salmon3": 173, + "rosy_brown": 138, + "grey63": 139, + "gray63": 139, + "medium_purple1": 141, + "gold3": 178, + "dark_khaki": 143, + "navajo_white3": 144, + "grey69": 145, + "gray69": 145, + "light_steel_blue3": 146, + "light_steel_blue": 147, + "yellow3": 184, + "dark_sea_green2": 157, + "light_cyan3": 152, + "light_sky_blue1": 153, + "green_yellow": 154, + "dark_olive_green2": 155, + "dark_sea_green1": 193, + "pale_turquoise1": 159, + "deep_pink3": 162, + "magenta2": 200, + "hot_pink2": 169, + "orchid": 170, + "medium_orchid1": 207, + "orange3": 172, + "light_pink3": 174, + "pink3": 175, + "plum3": 176, + "violet": 177, + "light_goldenrod3": 179, + "tan": 180, + "misty_rose3": 181, + "thistle3": 182, + "plum2": 183, + "khaki3": 185, + "light_goldenrod2": 222, + "light_yellow3": 187, + "grey84": 188, + "gray84": 188, + "light_steel_blue1": 189, + "yellow2": 190, + "dark_olive_green1": 192, + "honeydew2": 194, + "light_cyan1": 195, + "red1": 196, + "deep_pink2": 197, + "deep_pink1": 199, + "magenta1": 201, + "orange_red1": 202, + "indian_red1": 204, + "hot_pink": 206, + "dark_orange": 208, + "salmon1": 209, + "light_coral": 210, + "pale_violet_red1": 211, + "orchid2": 212, + "orchid1": 213, + "orange1": 214, + "sandy_brown": 215, + "light_salmon1": 216, + "light_pink1": 217, + "pink1": 218, + "plum1": 219, + "gold1": 220, + "navajo_white1": 223, + "misty_rose1": 224, + "thistle1": 225, + "yellow1": 226, + "light_goldenrod1": 227, + "khaki1": 228, + "wheat1": 229, + "cornsilk1": 230, + "grey100": 231, + "gray100": 231, + "grey3": 232, + "gray3": 232, + "grey7": 233, + "gray7": 233, + "grey11": 234, + "gray11": 234, + "grey15": 235, + "gray15": 235, + "grey19": 236, + "gray19": 236, + "grey23": 237, + "gray23": 237, + "grey27": 238, + "gray27": 238, + "grey30": 239, + "gray30": 239, + "grey35": 240, + "gray35": 240, + "grey39": 241, + "gray39": 241, + "grey42": 242, + "gray42": 242, + "grey46": 243, + "gray46": 243, + "grey50": 244, + "gray50": 244, + "grey54": 245, + "gray54": 245, + "grey58": 246, + "gray58": 246, + "grey62": 247, + "gray62": 247, + "grey66": 248, + "gray66": 248, + "grey70": 249, + "gray70": 249, + "grey74": 250, + "gray74": 250, + "grey78": 251, + "gray78": 251, + "grey82": 252, + "gray82": 252, + "grey85": 253, + "gray85": 253, + "grey89": 254, + "gray89": 254, + "grey93": 255, + "gray93": 255, +} + + +class ColorParseError(Exception): + """The color could not be parsed.""" + + +RE_COLOR = re.compile( + r"""^ +\#([0-9a-f]{6})$| +color\(([0-9]{1,3})\)$| +rgb\(([\d\s,]+)\)$ +""", + re.VERBOSE, +) + + +@rich_repr +class Color(NamedTuple): + """Terminal color definition.""" + + name: str + """The name of the color (typically the input to Color.parse).""" + type: ColorType + """The type of the color.""" + number: Optional[int] = None + """The color number, if a standard color, or None.""" + triplet: Optional[ColorTriplet] = None + """A triplet of color components, if an RGB color.""" + + def __rich__(self) -> "Text": + """Displays the actual color if Rich printed.""" + from .style import Style + from .text import Text + + return Text.assemble( + f"", + ) + + def __rich_repr__(self) -> Result: + yield self.name + yield self.type + yield "number", self.number, None + yield "triplet", self.triplet, None + + @property + def system(self) -> ColorSystem: + """Get the native color system for this color.""" + if self.type == ColorType.DEFAULT: + return ColorSystem.STANDARD + return ColorSystem(int(self.type)) + + @property + def is_system_defined(self) -> bool: + """Check if the color is ultimately defined by the system.""" + return self.system not in (ColorSystem.EIGHT_BIT, ColorSystem.TRUECOLOR) + + @property + def is_default(self) -> bool: + """Check if the color is a default color.""" + return self.type == ColorType.DEFAULT + + def get_truecolor( + self, theme: Optional["TerminalTheme"] = None, foreground: bool = True + ) -> ColorTriplet: + """Get an equivalent color triplet for this color. + + Args: + theme (TerminalTheme, optional): Optional terminal theme, or None to use default. Defaults to None. + foreground (bool, optional): True for a foreground color, or False for background. Defaults to True. + + Returns: + ColorTriplet: A color triplet containing RGB components. + """ + + if theme is None: + theme = DEFAULT_TERMINAL_THEME + if self.type == ColorType.TRUECOLOR: + assert self.triplet is not None + return self.triplet + elif self.type == ColorType.EIGHT_BIT: + assert self.number is not None + return EIGHT_BIT_PALETTE[self.number] + elif self.type == ColorType.STANDARD: + assert self.number is not None + return theme.ansi_colors[self.number] + elif self.type == ColorType.WINDOWS: + assert self.number is not None + return WINDOWS_PALETTE[self.number] + else: # self.type == ColorType.DEFAULT: + assert self.number is None + return theme.foreground_color if foreground else theme.background_color + + @classmethod + def from_ansi(cls, number: int) -> "Color": + """Create a Color number from it's 8-bit ansi number. + + Args: + number (int): A number between 0-255 inclusive. + + Returns: + Color: A new Color instance. + """ + return cls( + name=f"color({number})", + type=(ColorType.STANDARD if number < 16 else ColorType.EIGHT_BIT), + number=number, + ) + + @classmethod + def from_triplet(cls, triplet: "ColorTriplet") -> "Color": + """Create a truecolor RGB color from a triplet of values. + + Args: + triplet (ColorTriplet): A color triplet containing red, green and blue components. + + Returns: + Color: A new color object. + """ + return cls(name=triplet.hex, type=ColorType.TRUECOLOR, triplet=triplet) + + @classmethod + def from_rgb(cls, red: float, green: float, blue: float) -> "Color": + """Create a truecolor from three color components in the range(0->255). + + Args: + red (float): Red component in range 0-255. + green (float): Green component in range 0-255. + blue (float): Blue component in range 0-255. + + Returns: + Color: A new color object. + """ + return cls.from_triplet(ColorTriplet(int(red), int(green), int(blue))) + + @classmethod + def default(cls) -> "Color": + """Get a Color instance representing the default color. + + Returns: + Color: Default color. + """ + return cls(name="default", type=ColorType.DEFAULT) + + @classmethod + @lru_cache(maxsize=1024) + def parse(cls, color: str) -> "Color": + """Parse a color definition.""" + original_color = color + color = color.lower().strip() + + if color == "default": + return cls(color, type=ColorType.DEFAULT) + + color_number = ANSI_COLOR_NAMES.get(color) + if color_number is not None: + return cls( + color, + type=(ColorType.STANDARD if color_number < 16 else ColorType.EIGHT_BIT), + number=color_number, + ) + + color_match = RE_COLOR.match(color) + if color_match is None: + raise ColorParseError(f"{original_color!r} is not a valid color") + + color_24, color_8, color_rgb = color_match.groups() + if color_24: + triplet = ColorTriplet( + int(color_24[0:2], 16), int(color_24[2:4], 16), int(color_24[4:6], 16) + ) + return cls(color, ColorType.TRUECOLOR, triplet=triplet) + + elif color_8: + number = int(color_8) + if number > 255: + raise ColorParseError(f"color number must be <= 255 in {color!r}") + return cls( + color, + type=(ColorType.STANDARD if number < 16 else ColorType.EIGHT_BIT), + number=number, + ) + + else: # color_rgb: + components = color_rgb.split(",") + if len(components) != 3: + raise ColorParseError( + f"expected three components in {original_color!r}" + ) + red, green, blue = components + triplet = ColorTriplet(int(red), int(green), int(blue)) + if not all(component <= 255 for component in triplet): + raise ColorParseError( + f"color components must be <= 255 in {original_color!r}" + ) + return cls(color, ColorType.TRUECOLOR, triplet=triplet) + + @lru_cache(maxsize=1024) + def get_ansi_codes(self, foreground: bool = True) -> Tuple[str, ...]: + """Get the ANSI escape codes for this color.""" + _type = self.type + if _type == ColorType.DEFAULT: + return ("39" if foreground else "49",) + + elif _type == ColorType.WINDOWS: + number = self.number + assert number is not None + fore, back = (30, 40) if number < 8 else (82, 92) + return (str(fore + number if foreground else back + number),) + + elif _type == ColorType.STANDARD: + number = self.number + assert number is not None + fore, back = (30, 40) if number < 8 else (82, 92) + return (str(fore + number if foreground else back + number),) + + elif _type == ColorType.EIGHT_BIT: + assert self.number is not None + return ("38" if foreground else "48", "5", str(self.number)) + + else: # self.standard == ColorStandard.TRUECOLOR: + assert self.triplet is not None + red, green, blue = self.triplet + return ("38" if foreground else "48", "2", str(red), str(green), str(blue)) + + @lru_cache(maxsize=1024) + def downgrade(self, system: ColorSystem) -> "Color": + """Downgrade a color system to a system with fewer colors.""" + + if self.type in (ColorType.DEFAULT, system): + return self + # Convert to 8-bit color from truecolor color + if system == ColorSystem.EIGHT_BIT and self.system == ColorSystem.TRUECOLOR: + assert self.triplet is not None + _h, l, s = rgb_to_hls(*self.triplet.normalized) + # If saturation is under 15% assume it is grayscale + if s < 0.15: + gray = round(l * 25.0) + if gray == 0: + color_number = 16 + elif gray == 25: + color_number = 231 + else: + color_number = 231 + gray + return Color(self.name, ColorType.EIGHT_BIT, number=color_number) + + red, green, blue = self.triplet + six_red = red / 95 if red < 95 else 1 + (red - 95) / 40 + six_green = green / 95 if green < 95 else 1 + (green - 95) / 40 + six_blue = blue / 95 if blue < 95 else 1 + (blue - 95) / 40 + + color_number = ( + 16 + 36 * round(six_red) + 6 * round(six_green) + round(six_blue) + ) + return Color(self.name, ColorType.EIGHT_BIT, number=color_number) + + # Convert to standard from truecolor or 8-bit + elif system == ColorSystem.STANDARD: + if self.system == ColorSystem.TRUECOLOR: + assert self.triplet is not None + triplet = self.triplet + else: # self.system == ColorSystem.EIGHT_BIT + assert self.number is not None + triplet = ColorTriplet(*EIGHT_BIT_PALETTE[self.number]) + + color_number = STANDARD_PALETTE.match(triplet) + return Color(self.name, ColorType.STANDARD, number=color_number) + + elif system == ColorSystem.WINDOWS: + if self.system == ColorSystem.TRUECOLOR: + assert self.triplet is not None + triplet = self.triplet + else: # self.system == ColorSystem.EIGHT_BIT + assert self.number is not None + if self.number < 16: + return Color(self.name, ColorType.WINDOWS, number=self.number) + triplet = ColorTriplet(*EIGHT_BIT_PALETTE[self.number]) + + color_number = WINDOWS_PALETTE.match(triplet) + return Color(self.name, ColorType.WINDOWS, number=color_number) + + return self + + +def parse_rgb_hex(hex_color: str) -> ColorTriplet: + """Parse six hex characters in to RGB triplet.""" + assert len(hex_color) == 6, "must be 6 characters" + color = ColorTriplet( + int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16) + ) + return color + + +def blend_rgb( + color1: ColorTriplet, color2: ColorTriplet, cross_fade: float = 0.5 +) -> ColorTriplet: + """Blend one RGB color in to another.""" + r1, g1, b1 = color1 + r2, g2, b2 = color2 + new_color = ColorTriplet( + int(r1 + (r2 - r1) * cross_fade), + int(g1 + (g2 - g1) * cross_fade), + int(b1 + (b2 - b1) * cross_fade), + ) + return new_color + + +if __name__ == "__main__": # pragma: no cover + from .console import Console + from .table import Table + from .text import Text + + console = Console() + + table = Table(show_footer=False, show_edge=True) + table.add_column("Color", width=10, overflow="ellipsis") + table.add_column("Number", justify="right", style="yellow") + table.add_column("Name", style="green") + table.add_column("Hex", style="blue") + table.add_column("RGB", style="magenta") + + colors = sorted((v, k) for k, v in ANSI_COLOR_NAMES.items()) + for color_number, name in colors: + if "grey" in name: + continue + color_cell = Text(" " * 10, style=f"on {name}") + if color_number < 16: + table.add_row(color_cell, f"{color_number}", Text(f'"{name}"')) + else: + color = EIGHT_BIT_PALETTE[color_number] # type: ignore[has-type] + table.add_row( + color_cell, str(color_number), Text(f'"{name}"'), color.hex, color.rgb + ) + + console.print(table) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py new file mode 100644 index 0000000000000000000000000000000000000000..02cab328251af9bfa809981aaa44933c407e2cd7 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py @@ -0,0 +1,38 @@ +from typing import NamedTuple, Tuple + + +class ColorTriplet(NamedTuple): + """The red, green, and blue components of a color.""" + + red: int + """Red component in 0 to 255 range.""" + green: int + """Green component in 0 to 255 range.""" + blue: int + """Blue component in 0 to 255 range.""" + + @property + def hex(self) -> str: + """get the color triplet in CSS style.""" + red, green, blue = self + return f"#{red:02x}{green:02x}{blue:02x}" + + @property + def rgb(self) -> str: + """The color in RGB format. + + Returns: + str: An rgb color, e.g. ``"rgb(100,23,255)"``. + """ + red, green, blue = self + return f"rgb({red},{green},{blue})" + + @property + def normalized(self) -> Tuple[float, float, float]: + """Convert components into floats between 0 and 1. + + Returns: + Tuple[float, float, float]: A tuple of three normalized colour components. + """ + red, green, blue = self + return red / 255.0, green / 255.0, blue / 255.0 diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/columns.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/columns.py new file mode 100644 index 0000000000000000000000000000000000000000..669a3a7074f9a9e1af29cb4bc78b05851df67959 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/columns.py @@ -0,0 +1,187 @@ +from collections import defaultdict +from itertools import chain +from operator import itemgetter +from typing import Dict, Iterable, List, Optional, Tuple + +from .align import Align, AlignMethod +from .console import Console, ConsoleOptions, RenderableType, RenderResult +from .constrain import Constrain +from .measure import Measurement +from .padding import Padding, PaddingDimensions +from .table import Table +from .text import TextType +from .jupyter import JupyterMixin + + +class Columns(JupyterMixin): + """Display renderables in neat columns. + + Args: + renderables (Iterable[RenderableType]): Any number of Rich renderables (including str). + width (int, optional): The desired width of the columns, or None to auto detect. Defaults to None. + padding (PaddingDimensions, optional): Optional padding around cells. Defaults to (0, 1). + expand (bool, optional): Expand columns to full width. Defaults to False. + equal (bool, optional): Arrange in to equal sized columns. Defaults to False. + column_first (bool, optional): Align items from top to bottom (rather than left to right). Defaults to False. + right_to_left (bool, optional): Start column from right hand side. Defaults to False. + align (str, optional): Align value ("left", "right", or "center") or None for default. Defaults to None. + title (TextType, optional): Optional title for Columns. + """ + + def __init__( + self, + renderables: Optional[Iterable[RenderableType]] = None, + padding: PaddingDimensions = (0, 1), + *, + width: Optional[int] = None, + expand: bool = False, + equal: bool = False, + column_first: bool = False, + right_to_left: bool = False, + align: Optional[AlignMethod] = None, + title: Optional[TextType] = None, + ) -> None: + self.renderables = list(renderables or []) + self.width = width + self.padding = padding + self.expand = expand + self.equal = equal + self.column_first = column_first + self.right_to_left = right_to_left + self.align: Optional[AlignMethod] = align + self.title = title + + def add_renderable(self, renderable: RenderableType) -> None: + """Add a renderable to the columns. + + Args: + renderable (RenderableType): Any renderable object. + """ + self.renderables.append(renderable) + + def __rich_console__( + self, console: Console, options: ConsoleOptions + ) -> RenderResult: + render_str = console.render_str + renderables = [ + render_str(renderable) if isinstance(renderable, str) else renderable + for renderable in self.renderables + ] + if not renderables: + return + _top, right, _bottom, left = Padding.unpack(self.padding) + width_padding = max(left, right) + max_width = options.max_width + widths: Dict[int, int] = defaultdict(int) + column_count = len(renderables) + + get_measurement = Measurement.get + renderable_widths = [ + get_measurement(console, options, renderable).maximum + for renderable in renderables + ] + if self.equal: + renderable_widths = [max(renderable_widths)] * len(renderable_widths) + + def iter_renderables( + column_count: int, + ) -> Iterable[Tuple[int, Optional[RenderableType]]]: + item_count = len(renderables) + if self.column_first: + width_renderables = list(zip(renderable_widths, renderables)) + + column_lengths: List[int] = [item_count // column_count] * column_count + for col_no in range(item_count % column_count): + column_lengths[col_no] += 1 + + row_count = (item_count + column_count - 1) // column_count + cells = [[-1] * column_count for _ in range(row_count)] + row = col = 0 + for index in range(item_count): + cells[row][col] = index + column_lengths[col] -= 1 + if column_lengths[col]: + row += 1 + else: + col += 1 + row = 0 + for index in chain.from_iterable(cells): + if index == -1: + break + yield width_renderables[index] + else: + yield from zip(renderable_widths, renderables) + # Pad odd elements with spaces + if item_count % column_count: + for _ in range(column_count - (item_count % column_count)): + yield 0, None + + table = Table.grid(padding=self.padding, collapse_padding=True, pad_edge=False) + table.expand = self.expand + table.title = self.title + + if self.width is not None: + column_count = (max_width) // (self.width + width_padding) + for _ in range(column_count): + table.add_column(width=self.width) + else: + while column_count > 1: + widths.clear() + column_no = 0 + for renderable_width, _ in iter_renderables(column_count): + widths[column_no] = max(widths[column_no], renderable_width) + total_width = sum(widths.values()) + width_padding * ( + len(widths) - 1 + ) + if total_width > max_width: + column_count = len(widths) - 1 + break + else: + column_no = (column_no + 1) % column_count + else: + break + + get_renderable = itemgetter(1) + _renderables = [ + get_renderable(_renderable) + for _renderable in iter_renderables(column_count) + ] + if self.equal: + _renderables = [ + None + if renderable is None + else Constrain(renderable, renderable_widths[0]) + for renderable in _renderables + ] + if self.align: + align = self.align + _Align = Align + _renderables = [ + None if renderable is None else _Align(renderable, align) + for renderable in _renderables + ] + + right_to_left = self.right_to_left + add_row = table.add_row + for start in range(0, len(_renderables), column_count): + row = _renderables[start : start + column_count] + if right_to_left: + row = row[::-1] + add_row(*row) + yield table + + +if __name__ == "__main__": # pragma: no cover + import os + + console = Console() + + files = [f"{i} {s}" for i, s in enumerate(sorted(os.listdir()))] + columns = Columns(files, padding=(0, 1), expand=False, equal=False) + console.print(columns) + console.rule() + columns.column_first = True + console.print(columns) + columns.right_to_left = True + console.rule() + console.print(columns) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/console.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/console.py new file mode 100644 index 0000000000000000000000000000000000000000..572884542a17c149f4bd8c1ea8af9e42f4f3633a --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/console.py @@ -0,0 +1,2661 @@ +import inspect +import os +import sys +import threading +import zlib +from abc import ABC, abstractmethod +from dataclasses import dataclass, field +from datetime import datetime +from functools import wraps +from getpass import getpass +from html import escape +from inspect import isclass +from itertools import islice +from math import ceil +from time import monotonic +from types import FrameType, ModuleType, TracebackType +from typing import ( + IO, + TYPE_CHECKING, + Any, + Callable, + Dict, + Iterable, + List, + Mapping, + NamedTuple, + Optional, + TextIO, + Tuple, + Type, + Union, + cast, +) + +from pip._vendor.rich._null_file import NULL_FILE + +if sys.version_info >= (3, 8): + from typing import Literal, Protocol, runtime_checkable +else: + from pip._vendor.typing_extensions import ( + Literal, + Protocol, + runtime_checkable, + ) # pragma: no cover + +from . import errors, themes +from ._emoji_replace import _emoji_replace +from ._export_format import CONSOLE_HTML_FORMAT, CONSOLE_SVG_FORMAT +from ._fileno import get_fileno +from ._log_render import FormatTimeCallable, LogRender +from .align import Align, AlignMethod +from .color import ColorSystem, blend_rgb +from .control import Control +from .emoji import EmojiVariant +from .highlighter import NullHighlighter, ReprHighlighter +from .markup import render as render_markup +from .measure import Measurement, measure_renderables +from .pager import Pager, SystemPager +from .pretty import Pretty, is_expandable +from .protocol import rich_cast +from .region import Region +from .scope import render_scope +from .screen import Screen +from .segment import Segment +from .style import Style, StyleType +from .styled import Styled +from .terminal_theme import DEFAULT_TERMINAL_THEME, SVG_EXPORT_THEME, TerminalTheme +from .text import Text, TextType +from .theme import Theme, ThemeStack + +if TYPE_CHECKING: + from ._windows import WindowsConsoleFeatures + from .live import Live + from .status import Status + +JUPYTER_DEFAULT_COLUMNS = 115 +JUPYTER_DEFAULT_LINES = 100 +WINDOWS = sys.platform == "win32" + +HighlighterType = Callable[[Union[str, "Text"]], "Text"] +JustifyMethod = Literal["default", "left", "center", "right", "full"] +OverflowMethod = Literal["fold", "crop", "ellipsis", "ignore"] + + +class NoChange: + pass + + +NO_CHANGE = NoChange() + +try: + _STDIN_FILENO = sys.__stdin__.fileno() # type: ignore[union-attr] +except Exception: + _STDIN_FILENO = 0 +try: + _STDOUT_FILENO = sys.__stdout__.fileno() # type: ignore[union-attr] +except Exception: + _STDOUT_FILENO = 1 +try: + _STDERR_FILENO = sys.__stderr__.fileno() # type: ignore[union-attr] +except Exception: + _STDERR_FILENO = 2 + +_STD_STREAMS = (_STDIN_FILENO, _STDOUT_FILENO, _STDERR_FILENO) +_STD_STREAMS_OUTPUT = (_STDOUT_FILENO, _STDERR_FILENO) + + +_TERM_COLORS = { + "kitty": ColorSystem.EIGHT_BIT, + "256color": ColorSystem.EIGHT_BIT, + "16color": ColorSystem.STANDARD, +} + + +class ConsoleDimensions(NamedTuple): + """Size of the terminal.""" + + width: int + """The width of the console in 'cells'.""" + height: int + """The height of the console in lines.""" + + +@dataclass +class ConsoleOptions: + """Options for __rich_console__ method.""" + + size: ConsoleDimensions + """Size of console.""" + legacy_windows: bool + """legacy_windows: flag for legacy windows.""" + min_width: int + """Minimum width of renderable.""" + max_width: int + """Maximum width of renderable.""" + is_terminal: bool + """True if the target is a terminal, otherwise False.""" + encoding: str + """Encoding of terminal.""" + max_height: int + """Height of container (starts as terminal)""" + justify: Optional[JustifyMethod] = None + """Justify value override for renderable.""" + overflow: Optional[OverflowMethod] = None + """Overflow value override for renderable.""" + no_wrap: Optional[bool] = False + """Disable wrapping for text.""" + highlight: Optional[bool] = None + """Highlight override for render_str.""" + markup: Optional[bool] = None + """Enable markup when rendering strings.""" + height: Optional[int] = None + + @property + def ascii_only(self) -> bool: + """Check if renderables should use ascii only.""" + return not self.encoding.startswith("utf") + + def copy(self) -> "ConsoleOptions": + """Return a copy of the options. + + Returns: + ConsoleOptions: a copy of self. + """ + options: ConsoleOptions = ConsoleOptions.__new__(ConsoleOptions) + options.__dict__ = self.__dict__.copy() + return options + + def update( + self, + *, + width: Union[int, NoChange] = NO_CHANGE, + min_width: Union[int, NoChange] = NO_CHANGE, + max_width: Union[int, NoChange] = NO_CHANGE, + justify: Union[Optional[JustifyMethod], NoChange] = NO_CHANGE, + overflow: Union[Optional[OverflowMethod], NoChange] = NO_CHANGE, + no_wrap: Union[Optional[bool], NoChange] = NO_CHANGE, + highlight: Union[Optional[bool], NoChange] = NO_CHANGE, + markup: Union[Optional[bool], NoChange] = NO_CHANGE, + height: Union[Optional[int], NoChange] = NO_CHANGE, + ) -> "ConsoleOptions": + """Update values, return a copy.""" + options = self.copy() + if not isinstance(width, NoChange): + options.min_width = options.max_width = max(0, width) + if not isinstance(min_width, NoChange): + options.min_width = min_width + if not isinstance(max_width, NoChange): + options.max_width = max_width + if not isinstance(justify, NoChange): + options.justify = justify + if not isinstance(overflow, NoChange): + options.overflow = overflow + if not isinstance(no_wrap, NoChange): + options.no_wrap = no_wrap + if not isinstance(highlight, NoChange): + options.highlight = highlight + if not isinstance(markup, NoChange): + options.markup = markup + if not isinstance(height, NoChange): + if height is not None: + options.max_height = height + options.height = None if height is None else max(0, height) + return options + + def update_width(self, width: int) -> "ConsoleOptions": + """Update just the width, return a copy. + + Args: + width (int): New width (sets both min_width and max_width) + + Returns: + ~ConsoleOptions: New console options instance. + """ + options = self.copy() + options.min_width = options.max_width = max(0, width) + return options + + def update_height(self, height: int) -> "ConsoleOptions": + """Update the height, and return a copy. + + Args: + height (int): New height + + Returns: + ~ConsoleOptions: New Console options instance. + """ + options = self.copy() + options.max_height = options.height = height + return options + + def reset_height(self) -> "ConsoleOptions": + """Return a copy of the options with height set to ``None``. + + Returns: + ~ConsoleOptions: New console options instance. + """ + options = self.copy() + options.height = None + return options + + def update_dimensions(self, width: int, height: int) -> "ConsoleOptions": + """Update the width and height, and return a copy. + + Args: + width (int): New width (sets both min_width and max_width). + height (int): New height. + + Returns: + ~ConsoleOptions: New console options instance. + """ + options = self.copy() + options.min_width = options.max_width = max(0, width) + options.height = options.max_height = height + return options + + +@runtime_checkable +class RichCast(Protocol): + """An object that may be 'cast' to a console renderable.""" + + def __rich__( + self, + ) -> Union["ConsoleRenderable", "RichCast", str]: # pragma: no cover + ... + + +@runtime_checkable +class ConsoleRenderable(Protocol): + """An object that supports the console protocol.""" + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": # pragma: no cover + ... + + +# A type that may be rendered by Console. +RenderableType = Union[ConsoleRenderable, RichCast, str] +"""A string or any object that may be rendered by Rich.""" + +# The result of calling a __rich_console__ method. +RenderResult = Iterable[Union[RenderableType, Segment]] + +_null_highlighter = NullHighlighter() + + +class CaptureError(Exception): + """An error in the Capture context manager.""" + + +class NewLine: + """A renderable to generate new line(s)""" + + def __init__(self, count: int = 1) -> None: + self.count = count + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> Iterable[Segment]: + yield Segment("\n" * self.count) + + +class ScreenUpdate: + """Render a list of lines at a given offset.""" + + def __init__(self, lines: List[List[Segment]], x: int, y: int) -> None: + self._lines = lines + self.x = x + self.y = y + + def __rich_console__( + self, console: "Console", options: ConsoleOptions + ) -> RenderResult: + x = self.x + move_to = Control.move_to + for offset, line in enumerate(self._lines, self.y): + yield move_to(x, offset) + yield from line + + +class Capture: + """Context manager to capture the result of printing to the console. + See :meth:`~rich.console.Console.capture` for how to use. + + Args: + console (Console): A console instance to capture output. + """ + + def __init__(self, console: "Console") -> None: + self._console = console + self._result: Optional[str] = None + + def __enter__(self) -> "Capture": + self._console.begin_capture() + return self + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + self._result = self._console.end_capture() + + def get(self) -> str: + """Get the result of the capture.""" + if self._result is None: + raise CaptureError( + "Capture result is not available until context manager exits." + ) + return self._result + + +class ThemeContext: + """A context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage.""" + + def __init__(self, console: "Console", theme: Theme, inherit: bool = True) -> None: + self.console = console + self.theme = theme + self.inherit = inherit + + def __enter__(self) -> "ThemeContext": + self.console.push_theme(self.theme) + return self + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + self.console.pop_theme() + + +class PagerContext: + """A context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage.""" + + def __init__( + self, + console: "Console", + pager: Optional[Pager] = None, + styles: bool = False, + links: bool = False, + ) -> None: + self._console = console + self.pager = SystemPager() if pager is None else pager + self.styles = styles + self.links = links + + def __enter__(self) -> "PagerContext": + self._console._enter_buffer() + return self + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + if exc_type is None: + with self._console._lock: + buffer: List[Segment] = self._console._buffer[:] + del self._console._buffer[:] + segments: Iterable[Segment] = buffer + if not self.styles: + segments = Segment.strip_styles(segments) + elif not self.links: + segments = Segment.strip_links(segments) + content = self._console._render_buffer(segments) + self.pager.show(content) + self._console._exit_buffer() + + +class ScreenContext: + """A context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage.""" + + def __init__( + self, console: "Console", hide_cursor: bool, style: StyleType = "" + ) -> None: + self.console = console + self.hide_cursor = hide_cursor + self.screen = Screen(style=style) + self._changed = False + + def update( + self, *renderables: RenderableType, style: Optional[StyleType] = None + ) -> None: + """Update the screen. + + Args: + renderable (RenderableType, optional): Optional renderable to replace current renderable, + or None for no change. Defaults to None. + style: (Style, optional): Replacement style, or None for no change. Defaults to None. + """ + if renderables: + self.screen.renderable = ( + Group(*renderables) if len(renderables) > 1 else renderables[0] + ) + if style is not None: + self.screen.style = style + self.console.print(self.screen, end="") + + def __enter__(self) -> "ScreenContext": + self._changed = self.console.set_alt_screen(True) + if self._changed and self.hide_cursor: + self.console.show_cursor(False) + return self + + def __exit__( + self, + exc_type: Optional[Type[BaseException]], + exc_val: Optional[BaseException], + exc_tb: Optional[TracebackType], + ) -> None: + if self._changed: + self.console.set_alt_screen(False) + if self.hide_cursor: + self.console.show_cursor(True) + + +class Group: + """Takes a group of renderables and returns a renderable object that renders the group. + + Args: + renderables (Iterable[RenderableType]): An iterable of renderable objects. + fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True. + """ + + def __init__(self, *renderables: "RenderableType", fit: bool = True) -> None: + self._renderables = renderables + self.fit = fit + self._render: Optional[List[RenderableType]] = None + + @property + def renderables(self) -> List["RenderableType"]: + if self._render is None: + self._render = list(self._renderables) + return self._render + + def __rich_measure__( + self, console: "Console", options: "ConsoleOptions" + ) -> "Measurement": + if self.fit: + return measure_renderables(console, options, self.renderables) + else: + return Measurement(options.max_width, options.max_width) + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> RenderResult: + yield from self.renderables + + +def group(fit: bool = True) -> Callable[..., Callable[..., Group]]: + """A decorator that turns an iterable of renderables in to a group. + + Args: + fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True. + """ + + def decorator( + method: Callable[..., Iterable[RenderableType]] + ) -> Callable[..., Group]: + """Convert a method that returns an iterable of renderables in to a Group.""" + + @wraps(method) + def _replace(*args: Any, **kwargs: Any) -> Group: + renderables = method(*args, **kwargs) + return Group(*renderables, fit=fit) + + return _replace + + return decorator + + +def _is_jupyter() -> bool: # pragma: no cover + """Check if we're running in a Jupyter notebook.""" + try: + get_ipython # type: ignore[name-defined] + except NameError: + return False + ipython = get_ipython() # type: ignore[name-defined] + shell = ipython.__class__.__name__ + if ( + "google.colab" in str(ipython.__class__) + or os.getenv("DATABRICKS_RUNTIME_VERSION") + or shell == "ZMQInteractiveShell" + ): + return True # Jupyter notebook or qtconsole + elif shell == "TerminalInteractiveShell": + return False # Terminal running IPython + else: + return False # Other type (?) + + +COLOR_SYSTEMS = { + "standard": ColorSystem.STANDARD, + "256": ColorSystem.EIGHT_BIT, + "truecolor": ColorSystem.TRUECOLOR, + "windows": ColorSystem.WINDOWS, +} + +_COLOR_SYSTEMS_NAMES = {system: name for name, system in COLOR_SYSTEMS.items()} + + +@dataclass +class ConsoleThreadLocals(threading.local): + """Thread local values for Console context.""" + + theme_stack: ThemeStack + buffer: List[Segment] = field(default_factory=list) + buffer_index: int = 0 + + +class RenderHook(ABC): + """Provides hooks in to the render process.""" + + @abstractmethod + def process_renderables( + self, renderables: List[ConsoleRenderable] + ) -> List[ConsoleRenderable]: + """Called with a list of objects to render. + + This method can return a new list of renderables, or modify and return the same list. + + Args: + renderables (List[ConsoleRenderable]): A number of renderable objects. + + Returns: + List[ConsoleRenderable]: A replacement list of renderables. + """ + + +_windows_console_features: Optional["WindowsConsoleFeatures"] = None + + +def get_windows_console_features() -> "WindowsConsoleFeatures": # pragma: no cover + global _windows_console_features + if _windows_console_features is not None: + return _windows_console_features + from ._windows import get_windows_console_features + + _windows_console_features = get_windows_console_features() + return _windows_console_features + + +def detect_legacy_windows() -> bool: + """Detect legacy Windows.""" + return WINDOWS and not get_windows_console_features().vt + + +class Console: + """A high level console interface. + + Args: + color_system (str, optional): The color system supported by your terminal, + either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect. + force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None. + force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None. + force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None. + soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False. + theme (Theme, optional): An optional style theme object, or ``None`` for default theme. + stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False. + file (IO, optional): A file object where the console should write to. Defaults to stdout. + quiet (bool, Optional): Boolean to suppress all output. Defaults to False. + width (int, optional): The width of the terminal. Leave as default to auto-detect width. + height (int, optional): The height of the terminal. Leave as default to auto-detect height. + style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None. + no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None. + tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8. + record (bool, optional): Boolean to enable recording of terminal output, + required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False. + markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True. + emoji (bool, optional): Enable emoji code. Defaults to True. + emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None. + highlight (bool, optional): Enable automatic highlighting. Defaults to True. + log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True. + log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True. + log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ". + highlighter (HighlighterType, optional): Default highlighter. + legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``. + safe_box (bool, optional): Restrict box options that don't render on legacy Windows. + get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log), + or None for datetime.now. + get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic. + """ + + _environ: Mapping[str, str] = os.environ + + def __init__( + self, + *, + color_system: Optional[ + Literal["auto", "standard", "256", "truecolor", "windows"] + ] = "auto", + force_terminal: Optional[bool] = None, + force_jupyter: Optional[bool] = None, + force_interactive: Optional[bool] = None, + soft_wrap: bool = False, + theme: Optional[Theme] = None, + stderr: bool = False, + file: Optional[IO[str]] = None, + quiet: bool = False, + width: Optional[int] = None, + height: Optional[int] = None, + style: Optional[StyleType] = None, + no_color: Optional[bool] = None, + tab_size: int = 8, + record: bool = False, + markup: bool = True, + emoji: bool = True, + emoji_variant: Optional[EmojiVariant] = None, + highlight: bool = True, + log_time: bool = True, + log_path: bool = True, + log_time_format: Union[str, FormatTimeCallable] = "[%X]", + highlighter: Optional["HighlighterType"] = ReprHighlighter(), + legacy_windows: Optional[bool] = None, + safe_box: bool = True, + get_datetime: Optional[Callable[[], datetime]] = None, + get_time: Optional[Callable[[], float]] = None, + _environ: Optional[Mapping[str, str]] = None, + ): + # Copy of os.environ allows us to replace it for testing + if _environ is not None: + self._environ = _environ + + self.is_jupyter = _is_jupyter() if force_jupyter is None else force_jupyter + if self.is_jupyter: + if width is None: + jupyter_columns = self._environ.get("JUPYTER_COLUMNS") + if jupyter_columns is not None and jupyter_columns.isdigit(): + width = int(jupyter_columns) + else: + width = JUPYTER_DEFAULT_COLUMNS + if height is None: + jupyter_lines = self._environ.get("JUPYTER_LINES") + if jupyter_lines is not None and jupyter_lines.isdigit(): + height = int(jupyter_lines) + else: + height = JUPYTER_DEFAULT_LINES + + self.tab_size = tab_size + self.record = record + self._markup = markup + self._emoji = emoji + self._emoji_variant: Optional[EmojiVariant] = emoji_variant + self._highlight = highlight + self.legacy_windows: bool = ( + (detect_legacy_windows() and not self.is_jupyter) + if legacy_windows is None + else legacy_windows + ) + + if width is None: + columns = self._environ.get("COLUMNS") + if columns is not None and columns.isdigit(): + width = int(columns) - self.legacy_windows + if height is None: + lines = self._environ.get("LINES") + if lines is not None and lines.isdigit(): + height = int(lines) + + self.soft_wrap = soft_wrap + self._width = width + self._height = height + + self._color_system: Optional[ColorSystem] + + self._force_terminal = None + if force_terminal is not None: + self._force_terminal = force_terminal + + self._file = file + self.quiet = quiet + self.stderr = stderr + + if color_system is None: + self._color_system = None + elif color_system == "auto": + self._color_system = self._detect_color_system() + else: + self._color_system = COLOR_SYSTEMS[color_system] + + self._lock = threading.RLock() + self._log_render = LogRender( + show_time=log_time, + show_path=log_path, + time_format=log_time_format, + ) + self.highlighter: HighlighterType = highlighter or _null_highlighter + self.safe_box = safe_box + self.get_datetime = get_datetime or datetime.now + self.get_time = get_time or monotonic + self.style = style + self.no_color = ( + no_color if no_color is not None else "NO_COLOR" in self._environ + ) + self.is_interactive = ( + (self.is_terminal and not self.is_dumb_terminal) + if force_interactive is None + else force_interactive + ) + + self._record_buffer_lock = threading.RLock() + self._thread_locals = ConsoleThreadLocals( + theme_stack=ThemeStack(themes.DEFAULT if theme is None else theme) + ) + self._record_buffer: List[Segment] = [] + self._render_hooks: List[RenderHook] = [] + self._live: Optional["Live"] = None + self._is_alt_screen = False + + def __repr__(self) -> str: + return f"" + + @property + def file(self) -> IO[str]: + """Get the file object to write to.""" + file = self._file or (sys.stderr if self.stderr else sys.stdout) + file = getattr(file, "rich_proxied_file", file) + if file is None: + file = NULL_FILE + return file + + @file.setter + def file(self, new_file: IO[str]) -> None: + """Set a new file object.""" + self._file = new_file + + @property + def _buffer(self) -> List[Segment]: + """Get a thread local buffer.""" + return self._thread_locals.buffer + + @property + def _buffer_index(self) -> int: + """Get a thread local buffer.""" + return self._thread_locals.buffer_index + + @_buffer_index.setter + def _buffer_index(self, value: int) -> None: + self._thread_locals.buffer_index = value + + @property + def _theme_stack(self) -> ThemeStack: + """Get the thread local theme stack.""" + return self._thread_locals.theme_stack + + def _detect_color_system(self) -> Optional[ColorSystem]: + """Detect color system from env vars.""" + if self.is_jupyter: + return ColorSystem.TRUECOLOR + if not self.is_terminal or self.is_dumb_terminal: + return None + if WINDOWS: # pragma: no cover + if self.legacy_windows: # pragma: no cover + return ColorSystem.WINDOWS + windows_console_features = get_windows_console_features() + return ( + ColorSystem.TRUECOLOR + if windows_console_features.truecolor + else ColorSystem.EIGHT_BIT + ) + else: + color_term = self._environ.get("COLORTERM", "").strip().lower() + if color_term in ("truecolor", "24bit"): + return ColorSystem.TRUECOLOR + term = self._environ.get("TERM", "").strip().lower() + _term_name, _hyphen, colors = term.rpartition("-") + color_system = _TERM_COLORS.get(colors, ColorSystem.STANDARD) + return color_system + + def _enter_buffer(self) -> None: + """Enter in to a buffer context, and buffer all output.""" + self._buffer_index += 1 + + def _exit_buffer(self) -> None: + """Leave buffer context, and render content if required.""" + self._buffer_index -= 1 + self._check_buffer() + + def set_live(self, live: "Live") -> None: + """Set Live instance. Used by Live context manager. + + Args: + live (Live): Live instance using this Console. + + Raises: + errors.LiveError: If this Console has a Live context currently active. + """ + with self._lock: + if self._live is not None: + raise errors.LiveError("Only one live display may be active at once") + self._live = live + + def clear_live(self) -> None: + """Clear the Live instance.""" + with self._lock: + self._live = None + + def push_render_hook(self, hook: RenderHook) -> None: + """Add a new render hook to the stack. + + Args: + hook (RenderHook): Render hook instance. + """ + with self._lock: + self._render_hooks.append(hook) + + def pop_render_hook(self) -> None: + """Pop the last renderhook from the stack.""" + with self._lock: + self._render_hooks.pop() + + def __enter__(self) -> "Console": + """Own context manager to enter buffer context.""" + self._enter_buffer() + return self + + def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: + """Exit buffer context.""" + self._exit_buffer() + + def begin_capture(self) -> None: + """Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.""" + self._enter_buffer() + + def end_capture(self) -> str: + """End capture mode and return captured string. + + Returns: + str: Console output. + """ + render_result = self._render_buffer(self._buffer) + del self._buffer[:] + self._exit_buffer() + return render_result + + def push_theme(self, theme: Theme, *, inherit: bool = True) -> None: + """Push a new theme on to the top of the stack, replacing the styles from the previous theme. + Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather + than calling this method directly. + + Args: + theme (Theme): A theme instance. + inherit (bool, optional): Inherit existing styles. Defaults to True. + """ + self._theme_stack.push_theme(theme, inherit=inherit) + + def pop_theme(self) -> None: + """Remove theme from top of stack, restoring previous theme.""" + self._theme_stack.pop_theme() + + def use_theme(self, theme: Theme, *, inherit: bool = True) -> ThemeContext: + """Use a different theme for the duration of the context manager. + + Args: + theme (Theme): Theme instance to user. + inherit (bool, optional): Inherit existing console styles. Defaults to True. + + Returns: + ThemeContext: [description] + """ + return ThemeContext(self, theme, inherit) + + @property + def color_system(self) -> Optional[str]: + """Get color system string. + + Returns: + Optional[str]: "standard", "256" or "truecolor". + """ + + if self._color_system is not None: + return _COLOR_SYSTEMS_NAMES[self._color_system] + else: + return None + + @property + def encoding(self) -> str: + """Get the encoding of the console file, e.g. ``"utf-8"``. + + Returns: + str: A standard encoding string. + """ + return (getattr(self.file, "encoding", "utf-8") or "utf-8").lower() + + @property + def is_terminal(self) -> bool: + """Check if the console is writing to a terminal. + + Returns: + bool: True if the console writing to a device capable of + understanding terminal codes, otherwise False. + """ + if self._force_terminal is not None: + return self._force_terminal + + if hasattr(sys.stdin, "__module__") and sys.stdin.__module__.startswith( + "idlelib" + ): + # Return False for Idle which claims to be a tty but can't handle ansi codes + return False + + if self.is_jupyter: + # return False for Jupyter, which may have FORCE_COLOR set + return False + + # If FORCE_COLOR env var has any value at all, we assume a terminal. + force_color = self._environ.get("FORCE_COLOR") + if force_color is not None: + self._force_terminal = True + return True + + isatty: Optional[Callable[[], bool]] = getattr(self.file, "isatty", None) + try: + return False if isatty is None else isatty() + except ValueError: + # in some situation (at the end of a pytest run for example) isatty() can raise + # ValueError: I/O operation on closed file + # return False because we aren't in a terminal anymore + return False + + @property + def is_dumb_terminal(self) -> bool: + """Detect dumb terminal. + + Returns: + bool: True if writing to a dumb terminal, otherwise False. + + """ + _term = self._environ.get("TERM", "") + is_dumb = _term.lower() in ("dumb", "unknown") + return self.is_terminal and is_dumb + + @property + def options(self) -> ConsoleOptions: + """Get default console options.""" + return ConsoleOptions( + max_height=self.size.height, + size=self.size, + legacy_windows=self.legacy_windows, + min_width=1, + max_width=self.width, + encoding=self.encoding, + is_terminal=self.is_terminal, + ) + + @property + def size(self) -> ConsoleDimensions: + """Get the size of the console. + + Returns: + ConsoleDimensions: A named tuple containing the dimensions. + """ + + if self._width is not None and self._height is not None: + return ConsoleDimensions(self._width - self.legacy_windows, self._height) + + if self.is_dumb_terminal: + return ConsoleDimensions(80, 25) + + width: Optional[int] = None + height: Optional[int] = None + + streams = _STD_STREAMS_OUTPUT if WINDOWS else _STD_STREAMS + for file_descriptor in streams: + try: + width, height = os.get_terminal_size(file_descriptor) + except (AttributeError, ValueError, OSError): # Probably not a terminal + pass + else: + break + + columns = self._environ.get("COLUMNS") + if columns is not None and columns.isdigit(): + width = int(columns) + lines = self._environ.get("LINES") + if lines is not None and lines.isdigit(): + height = int(lines) + + # get_terminal_size can report 0, 0 if run from pseudo-terminal + width = width or 80 + height = height or 25 + return ConsoleDimensions( + width - self.legacy_windows if self._width is None else self._width, + height if self._height is None else self._height, + ) + + @size.setter + def size(self, new_size: Tuple[int, int]) -> None: + """Set a new size for the terminal. + + Args: + new_size (Tuple[int, int]): New width and height. + """ + width, height = new_size + self._width = width + self._height = height + + @property + def width(self) -> int: + """Get the width of the console. + + Returns: + int: The width (in characters) of the console. + """ + return self.size.width + + @width.setter + def width(self, width: int) -> None: + """Set width. + + Args: + width (int): New width. + """ + self._width = width + + @property + def height(self) -> int: + """Get the height of the console. + + Returns: + int: The height (in lines) of the console. + """ + return self.size.height + + @height.setter + def height(self, height: int) -> None: + """Set height. + + Args: + height (int): new height. + """ + self._height = height + + def bell(self) -> None: + """Play a 'bell' sound (if supported by the terminal).""" + self.control(Control.bell()) + + def capture(self) -> Capture: + """A context manager to *capture* the result of print() or log() in a string, + rather than writing it to the console. + + Example: + >>> from rich.console import Console + >>> console = Console() + >>> with console.capture() as capture: + ... console.print("[bold magenta]Hello World[/]") + >>> print(capture.get()) + + Returns: + Capture: Context manager with disables writing to the terminal. + """ + capture = Capture(self) + return capture + + def pager( + self, pager: Optional[Pager] = None, styles: bool = False, links: bool = False + ) -> PagerContext: + """A context manager to display anything printed within a "pager". The pager application + is defined by the system and will typically support at least pressing a key to scroll. + + Args: + pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None. + styles (bool, optional): Show styles in pager. Defaults to False. + links (bool, optional): Show links in pager. Defaults to False. + + Example: + >>> from rich.console import Console + >>> from rich.__main__ import make_test_card + >>> console = Console() + >>> with console.pager(): + console.print(make_test_card()) + + Returns: + PagerContext: A context manager. + """ + return PagerContext(self, pager=pager, styles=styles, links=links) + + def line(self, count: int = 1) -> None: + """Write new line(s). + + Args: + count (int, optional): Number of new lines. Defaults to 1. + """ + + assert count >= 0, "count must be >= 0" + self.print(NewLine(count)) + + def clear(self, home: bool = True) -> None: + """Clear the screen. + + Args: + home (bool, optional): Also move the cursor to 'home' position. Defaults to True. + """ + if home: + self.control(Control.clear(), Control.home()) + else: + self.control(Control.clear()) + + def status( + self, + status: RenderableType, + *, + spinner: str = "dots", + spinner_style: StyleType = "status.spinner", + speed: float = 1.0, + refresh_per_second: float = 12.5, + ) -> "Status": + """Display a status and spinner. + + Args: + status (RenderableType): A status renderable (str or Text typically). + spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots". + spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner". + speed (float, optional): Speed factor for spinner animation. Defaults to 1.0. + refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5. + + Returns: + Status: A Status object that may be used as a context manager. + """ + from .status import Status + + status_renderable = Status( + status, + console=self, + spinner=spinner, + spinner_style=spinner_style, + speed=speed, + refresh_per_second=refresh_per_second, + ) + return status_renderable + + def show_cursor(self, show: bool = True) -> bool: + """Show or hide the cursor. + + Args: + show (bool, optional): Set visibility of the cursor. + """ + if self.is_terminal: + self.control(Control.show_cursor(show)) + return True + return False + + def set_alt_screen(self, enable: bool = True) -> bool: + """Enables alternative screen mode. + + Note, if you enable this mode, you should ensure that is disabled before + the application exits. See :meth:`~rich.Console.screen` for a context manager + that handles this for you. + + Args: + enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True. + + Returns: + bool: True if the control codes were written. + + """ + changed = False + if self.is_terminal and not self.legacy_windows: + self.control(Control.alt_screen(enable)) + changed = True + self._is_alt_screen = enable + return changed + + @property + def is_alt_screen(self) -> bool: + """Check if the alt screen was enabled. + + Returns: + bool: True if the alt screen was enabled, otherwise False. + """ + return self._is_alt_screen + + def set_window_title(self, title: str) -> bool: + """Set the title of the console terminal window. + + Warning: There is no means within Rich of "resetting" the window title to its + previous value, meaning the title you set will persist even after your application + exits. + + ``fish`` shell resets the window title before and after each command by default, + negating this issue. Windows Terminal and command prompt will also reset the title for you. + Most other shells and terminals, however, do not do this. + + Some terminals may require configuration changes before you can set the title. + Some terminals may not support setting the title at all. + + Other software (including the terminal itself, the shell, custom prompts, plugins, etc.) + may also set the terminal window title. This could result in whatever value you write + using this method being overwritten. + + Args: + title (str): The new title of the terminal window. + + Returns: + bool: True if the control code to change the terminal title was + written, otherwise False. Note that a return value of True + does not guarantee that the window title has actually changed, + since the feature may be unsupported/disabled in some terminals. + """ + if self.is_terminal: + self.control(Control.title(title)) + return True + return False + + def screen( + self, hide_cursor: bool = True, style: Optional[StyleType] = None + ) -> "ScreenContext": + """Context manager to enable and disable 'alternative screen' mode. + + Args: + hide_cursor (bool, optional): Also hide the cursor. Defaults to False. + style (Style, optional): Optional style for screen. Defaults to None. + + Returns: + ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit. + """ + return ScreenContext(self, hide_cursor=hide_cursor, style=style or "") + + def measure( + self, renderable: RenderableType, *, options: Optional[ConsoleOptions] = None + ) -> Measurement: + """Measure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains + information regarding the number of characters required to print the renderable. + + Args: + renderable (RenderableType): Any renderable or string. + options (Optional[ConsoleOptions], optional): Options to use when measuring, or None + to use default options. Defaults to None. + + Returns: + Measurement: A measurement of the renderable. + """ + measurement = Measurement.get(self, options or self.options, renderable) + return measurement + + def render( + self, renderable: RenderableType, options: Optional[ConsoleOptions] = None + ) -> Iterable[Segment]: + """Render an object in to an iterable of `Segment` instances. + + This method contains the logic for rendering objects with the console protocol. + You are unlikely to need to use it directly, unless you are extending the library. + + Args: + renderable (RenderableType): An object supporting the console protocol, or + an object that may be converted to a string. + options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None. + + Returns: + Iterable[Segment]: An iterable of segments that may be rendered. + """ + + _options = options or self.options + if _options.max_width < 1: + # No space to render anything. This prevents potential recursion errors. + return + render_iterable: RenderResult + + renderable = rich_cast(renderable) + if hasattr(renderable, "__rich_console__") and not isclass(renderable): + render_iterable = renderable.__rich_console__(self, _options) + elif isinstance(renderable, str): + text_renderable = self.render_str( + renderable, highlight=_options.highlight, markup=_options.markup + ) + render_iterable = text_renderable.__rich_console__(self, _options) + else: + raise errors.NotRenderableError( + f"Unable to render {renderable!r}; " + "A str, Segment or object with __rich_console__ method is required" + ) + + try: + iter_render = iter(render_iterable) + except TypeError: + raise errors.NotRenderableError( + f"object {render_iterable!r} is not renderable" + ) + _Segment = Segment + _options = _options.reset_height() + for render_output in iter_render: + if isinstance(render_output, _Segment): + yield render_output + else: + yield from self.render(render_output, _options) + + def render_lines( + self, + renderable: RenderableType, + options: Optional[ConsoleOptions] = None, + *, + style: Optional[Style] = None, + pad: bool = True, + new_lines: bool = False, + ) -> List[List[Segment]]: + """Render objects in to a list of lines. + + The output of render_lines is useful when further formatting of rendered console text + is required, such as the Panel class which draws a border around any renderable object. + + Args: + renderable (RenderableType): Any object renderable in the console. + options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``. + style (Style, optional): Optional style to apply to renderables. Defaults to ``None``. + pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``. + new_lines (bool, optional): Include "\n" characters at end of lines. + + Returns: + List[List[Segment]]: A list of lines, where a line is a list of Segment objects. + """ + with self._lock: + render_options = options or self.options + _rendered = self.render(renderable, render_options) + if style: + _rendered = Segment.apply_style(_rendered, style) + + render_height = render_options.height + if render_height is not None: + render_height = max(0, render_height) + + lines = list( + islice( + Segment.split_and_crop_lines( + _rendered, + render_options.max_width, + include_new_lines=new_lines, + pad=pad, + style=style, + ), + None, + render_height, + ) + ) + if render_options.height is not None: + extra_lines = render_options.height - len(lines) + if extra_lines > 0: + pad_line = [ + ( + [ + Segment(" " * render_options.max_width, style), + Segment("\n"), + ] + if new_lines + else [Segment(" " * render_options.max_width, style)] + ) + ] + lines.extend(pad_line * extra_lines) + + return lines + + def render_str( + self, + text: str, + *, + style: Union[str, Style] = "", + justify: Optional[JustifyMethod] = None, + overflow: Optional[OverflowMethod] = None, + emoji: Optional[bool] = None, + markup: Optional[bool] = None, + highlight: Optional[bool] = None, + highlighter: Optional[HighlighterType] = None, + ) -> "Text": + """Convert a string to a Text instance. This is called automatically if + you print or log a string. + + Args: + text (str): Text to render. + style (Union[str, Style], optional): Style to apply to rendered text. + justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``. + overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``. + emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default. + markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default. + highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default. + highlighter (HighlighterType, optional): Optional highlighter to apply. + Returns: + ConsoleRenderable: Renderable object. + + """ + emoji_enabled = emoji or (emoji is None and self._emoji) + markup_enabled = markup or (markup is None and self._markup) + highlight_enabled = highlight or (highlight is None and self._highlight) + + if markup_enabled: + rich_text = render_markup( + text, + style=style, + emoji=emoji_enabled, + emoji_variant=self._emoji_variant, + ) + rich_text.justify = justify + rich_text.overflow = overflow + else: + rich_text = Text( + ( + _emoji_replace(text, default_variant=self._emoji_variant) + if emoji_enabled + else text + ), + justify=justify, + overflow=overflow, + style=style, + ) + + _highlighter = (highlighter or self.highlighter) if highlight_enabled else None + if _highlighter is not None: + highlight_text = _highlighter(str(rich_text)) + highlight_text.copy_styles(rich_text) + return highlight_text + + return rich_text + + def get_style( + self, name: Union[str, Style], *, default: Optional[Union[Style, str]] = None + ) -> Style: + """Get a Style instance by its theme name or parse a definition. + + Args: + name (str): The name of a style or a style definition. + + Returns: + Style: A Style object. + + Raises: + MissingStyle: If no style could be parsed from name. + + """ + if isinstance(name, Style): + return name + + try: + style = self._theme_stack.get(name) + if style is None: + style = Style.parse(name) + return style.copy() if style.link else style + except errors.StyleSyntaxError as error: + if default is not None: + return self.get_style(default) + raise errors.MissingStyle( + f"Failed to get style {name!r}; {error}" + ) from None + + def _collect_renderables( + self, + objects: Iterable[Any], + sep: str, + end: str, + *, + justify: Optional[JustifyMethod] = None, + emoji: Optional[bool] = None, + markup: Optional[bool] = None, + highlight: Optional[bool] = None, + ) -> List[ConsoleRenderable]: + """Combine a number of renderables and text into one renderable. + + Args: + objects (Iterable[Any]): Anything that Rich can render. + sep (str): String to write between print data. + end (str): String to write at end of print data. + justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. + emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. + markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. + highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. + + Returns: + List[ConsoleRenderable]: A list of things to render. + """ + renderables: List[ConsoleRenderable] = [] + _append = renderables.append + text: List[Text] = [] + append_text = text.append + + append = _append + if justify in ("left", "center", "right"): + + def align_append(renderable: RenderableType) -> None: + _append(Align(renderable, cast(AlignMethod, justify))) + + append = align_append + + _highlighter: HighlighterType = _null_highlighter + if highlight or (highlight is None and self._highlight): + _highlighter = self.highlighter + + def check_text() -> None: + if text: + sep_text = Text(sep, justify=justify, end=end) + append(sep_text.join(text)) + text.clear() + + for renderable in objects: + renderable = rich_cast(renderable) + if isinstance(renderable, str): + append_text( + self.render_str( + renderable, + emoji=emoji, + markup=markup, + highlight=highlight, + highlighter=_highlighter, + ) + ) + elif isinstance(renderable, Text): + append_text(renderable) + elif isinstance(renderable, ConsoleRenderable): + check_text() + append(renderable) + elif is_expandable(renderable): + check_text() + append(Pretty(renderable, highlighter=_highlighter)) + else: + append_text(_highlighter(str(renderable))) + + check_text() + + if self.style is not None: + style = self.get_style(self.style) + renderables = [Styled(renderable, style) for renderable in renderables] + + return renderables + + def rule( + self, + title: TextType = "", + *, + characters: str = "─", + style: Union[str, Style] = "rule.line", + align: AlignMethod = "center", + ) -> None: + """Draw a line with optional centered title. + + Args: + title (str, optional): Text to render over the rule. Defaults to "". + characters (str, optional): Character(s) to form the line. Defaults to "─". + style (str, optional): Style of line. Defaults to "rule.line". + align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center". + """ + from .rule import Rule + + rule = Rule(title=title, characters=characters, style=style, align=align) + self.print(rule) + + def control(self, *control: Control) -> None: + """Insert non-printing control codes. + + Args: + control_codes (str): Control codes, such as those that may move the cursor. + """ + if not self.is_dumb_terminal: + with self: + self._buffer.extend(_control.segment for _control in control) + + def out( + self, + *objects: Any, + sep: str = " ", + end: str = "\n", + style: Optional[Union[str, Style]] = None, + highlight: Optional[bool] = None, + ) -> None: + """Output to the terminal. This is a low-level way of writing to the terminal which unlike + :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will + optionally apply highlighting and a basic style. + + Args: + sep (str, optional): String to write between print data. Defaults to " ". + end (str, optional): String to write at end of print data. Defaults to "\\\\n". + style (Union[str, Style], optional): A style to apply to output. Defaults to None. + highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use + console default. Defaults to ``None``. + """ + raw_output: str = sep.join(str(_object) for _object in objects) + self.print( + raw_output, + style=style, + highlight=highlight, + emoji=False, + markup=False, + no_wrap=True, + overflow="ignore", + crop=False, + end=end, + ) + + def print( + self, + *objects: Any, + sep: str = " ", + end: str = "\n", + style: Optional[Union[str, Style]] = None, + justify: Optional[JustifyMethod] = None, + overflow: Optional[OverflowMethod] = None, + no_wrap: Optional[bool] = None, + emoji: Optional[bool] = None, + markup: Optional[bool] = None, + highlight: Optional[bool] = None, + width: Optional[int] = None, + height: Optional[int] = None, + crop: bool = True, + soft_wrap: Optional[bool] = None, + new_line_start: bool = False, + ) -> None: + """Print to the console. + + Args: + objects (positional args): Objects to log to the terminal. + sep (str, optional): String to write between print data. Defaults to " ". + end (str, optional): String to write at end of print data. Defaults to "\\\\n". + style (Union[str, Style], optional): A style to apply to output. Defaults to None. + justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``. + overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None. + no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None. + emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``. + markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``. + highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``. + width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``. + crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True. + soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for + Console default. Defaults to ``None``. + new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``. + """ + if not objects: + objects = (NewLine(),) + + if soft_wrap is None: + soft_wrap = self.soft_wrap + if soft_wrap: + if no_wrap is None: + no_wrap = True + if overflow is None: + overflow = "ignore" + crop = False + render_hooks = self._render_hooks[:] + with self: + renderables = self._collect_renderables( + objects, + sep, + end, + justify=justify, + emoji=emoji, + markup=markup, + highlight=highlight, + ) + for hook in render_hooks: + renderables = hook.process_renderables(renderables) + render_options = self.options.update( + justify=justify, + overflow=overflow, + width=min(width, self.width) if width is not None else NO_CHANGE, + height=height, + no_wrap=no_wrap, + markup=markup, + highlight=highlight, + ) + + new_segments: List[Segment] = [] + extend = new_segments.extend + render = self.render + if style is None: + for renderable in renderables: + extend(render(renderable, render_options)) + else: + for renderable in renderables: + extend( + Segment.apply_style( + render(renderable, render_options), self.get_style(style) + ) + ) + if new_line_start: + if ( + len("".join(segment.text for segment in new_segments).splitlines()) + > 1 + ): + new_segments.insert(0, Segment.line()) + if crop: + buffer_extend = self._buffer.extend + for line in Segment.split_and_crop_lines( + new_segments, self.width, pad=False + ): + buffer_extend(line) + else: + self._buffer.extend(new_segments) + + def print_json( + self, + json: Optional[str] = None, + *, + data: Any = None, + indent: Union[None, int, str] = 2, + highlight: bool = True, + skip_keys: bool = False, + ensure_ascii: bool = False, + check_circular: bool = True, + allow_nan: bool = True, + default: Optional[Callable[[Any], Any]] = None, + sort_keys: bool = False, + ) -> None: + """Pretty prints JSON. Output will be valid JSON. + + Args: + json (Optional[str]): A string containing JSON. + data (Any): If json is not supplied, then encode this data. + indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2. + highlight (bool, optional): Enable highlighting of output: Defaults to True. + skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False. + ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False. + check_circular (bool, optional): Check for circular references. Defaults to True. + allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True. + default (Callable, optional): A callable that converts values that can not be encoded + in to something that can be JSON encoded. Defaults to None. + sort_keys (bool, optional): Sort dictionary keys. Defaults to False. + """ + from pip._vendor.rich.json import JSON + + if json is None: + json_renderable = JSON.from_data( + data, + indent=indent, + highlight=highlight, + skip_keys=skip_keys, + ensure_ascii=ensure_ascii, + check_circular=check_circular, + allow_nan=allow_nan, + default=default, + sort_keys=sort_keys, + ) + else: + if not isinstance(json, str): + raise TypeError( + f"json must be str. Did you mean print_json(data={json!r}) ?" + ) + json_renderable = JSON( + json, + indent=indent, + highlight=highlight, + skip_keys=skip_keys, + ensure_ascii=ensure_ascii, + check_circular=check_circular, + allow_nan=allow_nan, + default=default, + sort_keys=sort_keys, + ) + self.print(json_renderable, soft_wrap=True) + + def update_screen( + self, + renderable: RenderableType, + *, + region: Optional[Region] = None, + options: Optional[ConsoleOptions] = None, + ) -> None: + """Update the screen at a given offset. + + Args: + renderable (RenderableType): A Rich renderable. + region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None. + x (int, optional): x offset. Defaults to 0. + y (int, optional): y offset. Defaults to 0. + + Raises: + errors.NoAltScreen: If the Console isn't in alt screen mode. + + """ + if not self.is_alt_screen: + raise errors.NoAltScreen("Alt screen must be enabled to call update_screen") + render_options = options or self.options + if region is None: + x = y = 0 + render_options = render_options.update_dimensions( + render_options.max_width, render_options.height or self.height + ) + else: + x, y, width, height = region + render_options = render_options.update_dimensions(width, height) + + lines = self.render_lines(renderable, options=render_options) + self.update_screen_lines(lines, x, y) + + def update_screen_lines( + self, lines: List[List[Segment]], x: int = 0, y: int = 0 + ) -> None: + """Update lines of the screen at a given offset. + + Args: + lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`). + x (int, optional): x offset (column no). Defaults to 0. + y (int, optional): y offset (column no). Defaults to 0. + + Raises: + errors.NoAltScreen: If the Console isn't in alt screen mode. + """ + if not self.is_alt_screen: + raise errors.NoAltScreen("Alt screen must be enabled to call update_screen") + screen_update = ScreenUpdate(lines, x, y) + segments = self.render(screen_update) + self._buffer.extend(segments) + self._check_buffer() + + def print_exception( + self, + *, + width: Optional[int] = 100, + extra_lines: int = 3, + theme: Optional[str] = None, + word_wrap: bool = False, + show_locals: bool = False, + suppress: Iterable[Union[str, ModuleType]] = (), + max_frames: int = 100, + ) -> None: + """Prints a rich render of the last exception and traceback. + + Args: + width (Optional[int], optional): Number of characters used to render code. Defaults to 100. + extra_lines (int, optional): Additional lines of code to render. Defaults to 3. + theme (str, optional): Override pygments theme used in traceback + word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False. + show_locals (bool, optional): Enable display of local variables. Defaults to False. + suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. + max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100. + """ + from .traceback import Traceback + + traceback = Traceback( + width=width, + extra_lines=extra_lines, + theme=theme, + word_wrap=word_wrap, + show_locals=show_locals, + suppress=suppress, + max_frames=max_frames, + ) + self.print(traceback) + + @staticmethod + def _caller_frame_info( + offset: int, + currentframe: Callable[[], Optional[FrameType]] = inspect.currentframe, + ) -> Tuple[str, int, Dict[str, Any]]: + """Get caller frame information. + + Args: + offset (int): the caller offset within the current frame stack. + currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to + retrieve the current frame. Defaults to ``inspect.currentframe``. + + Returns: + Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and + the dictionary of local variables associated with the caller frame. + + Raises: + RuntimeError: If the stack offset is invalid. + """ + # Ignore the frame of this local helper + offset += 1 + + frame = currentframe() + if frame is not None: + # Use the faster currentframe where implemented + while offset and frame is not None: + frame = frame.f_back + offset -= 1 + assert frame is not None + return frame.f_code.co_filename, frame.f_lineno, frame.f_locals + else: + # Fallback to the slower stack + frame_info = inspect.stack()[offset] + return frame_info.filename, frame_info.lineno, frame_info.frame.f_locals + + def log( + self, + *objects: Any, + sep: str = " ", + end: str = "\n", + style: Optional[Union[str, Style]] = None, + justify: Optional[JustifyMethod] = None, + emoji: Optional[bool] = None, + markup: Optional[bool] = None, + highlight: Optional[bool] = None, + log_locals: bool = False, + _stack_offset: int = 1, + ) -> None: + """Log rich content to the terminal. + + Args: + objects (positional args): Objects to log to the terminal. + sep (str, optional): String to write between print data. Defaults to " ". + end (str, optional): String to write at end of print data. Defaults to "\\\\n". + style (Union[str, Style], optional): A style to apply to output. Defaults to None. + justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. + emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None. + markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None. + highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None. + log_locals (bool, optional): Boolean to enable logging of locals where ``log()`` + was called. Defaults to False. + _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1. + """ + if not objects: + objects = (NewLine(),) + + render_hooks = self._render_hooks[:] + + with self: + renderables = self._collect_renderables( + objects, + sep, + end, + justify=justify, + emoji=emoji, + markup=markup, + highlight=highlight, + ) + if style is not None: + renderables = [Styled(renderable, style) for renderable in renderables] + + filename, line_no, locals = self._caller_frame_info(_stack_offset) + link_path = None if filename.startswith("<") else os.path.abspath(filename) + path = filename.rpartition(os.sep)[-1] + if log_locals: + locals_map = { + key: value + for key, value in locals.items() + if not key.startswith("__") + } + renderables.append(render_scope(locals_map, title="[i]locals")) + + renderables = [ + self._log_render( + self, + renderables, + log_time=self.get_datetime(), + path=path, + line_no=line_no, + link_path=link_path, + ) + ] + for hook in render_hooks: + renderables = hook.process_renderables(renderables) + new_segments: List[Segment] = [] + extend = new_segments.extend + render = self.render + render_options = self.options + for renderable in renderables: + extend(render(renderable, render_options)) + buffer_extend = self._buffer.extend + for line in Segment.split_and_crop_lines( + new_segments, self.width, pad=False + ): + buffer_extend(line) + + def on_broken_pipe(self) -> None: + """This function is called when a `BrokenPipeError` is raised. + + This can occur when piping Textual output in Linux and macOS. + The default implementation is to exit the app, but you could implement + this method in a subclass to change the behavior. + + See https://docs.python.org/3/library/signal.html#note-on-sigpipe for details. + """ + self.quiet = True + devnull = os.open(os.devnull, os.O_WRONLY) + os.dup2(devnull, sys.stdout.fileno()) + raise SystemExit(1) + + def _check_buffer(self) -> None: + """Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False) + Rendering is supported on Windows, Unix and Jupyter environments. For + legacy Windows consoles, the win32 API is called directly. + This method will also record what it renders if recording is enabled via Console.record. + """ + if self.quiet: + del self._buffer[:] + return + + try: + self._write_buffer() + except BrokenPipeError: + self.on_broken_pipe() + + def _write_buffer(self) -> None: + """Write the buffer to the output file.""" + + with self._lock: + if self.record and not self._buffer_index: + with self._record_buffer_lock: + self._record_buffer.extend(self._buffer[:]) + + if self._buffer_index == 0: + if self.is_jupyter: # pragma: no cover + from .jupyter import display + + display(self._buffer, self._render_buffer(self._buffer[:])) + del self._buffer[:] + else: + if WINDOWS: + use_legacy_windows_render = False + if self.legacy_windows: + fileno = get_fileno(self.file) + if fileno is not None: + use_legacy_windows_render = ( + fileno in _STD_STREAMS_OUTPUT + ) + + if use_legacy_windows_render: + from pip._vendor.rich._win32_console import LegacyWindowsTerm + from pip._vendor.rich._windows_renderer import legacy_windows_render + + buffer = self._buffer[:] + if self.no_color and self._color_system: + buffer = list(Segment.remove_color(buffer)) + + legacy_windows_render(buffer, LegacyWindowsTerm(self.file)) + else: + # Either a non-std stream on legacy Windows, or modern Windows. + text = self._render_buffer(self._buffer[:]) + # https://bugs.python.org/issue37871 + # https://github.com/python/cpython/issues/82052 + # We need to avoid writing more than 32Kb in a single write, due to the above bug + write = self.file.write + # Worse case scenario, every character is 4 bytes of utf-8 + MAX_WRITE = 32 * 1024 // 4 + try: + if len(text) <= MAX_WRITE: + write(text) + else: + batch: List[str] = [] + batch_append = batch.append + size = 0 + for line in text.splitlines(True): + if size + len(line) > MAX_WRITE and batch: + write("".join(batch)) + batch.clear() + size = 0 + batch_append(line) + size += len(line) + if batch: + write("".join(batch)) + batch.clear() + except UnicodeEncodeError as error: + error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***" + raise + else: + text = self._render_buffer(self._buffer[:]) + try: + self.file.write(text) + except UnicodeEncodeError as error: + error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***" + raise + + self.file.flush() + del self._buffer[:] + + def _render_buffer(self, buffer: Iterable[Segment]) -> str: + """Render buffered output, and clear buffer.""" + output: List[str] = [] + append = output.append + color_system = self._color_system + legacy_windows = self.legacy_windows + not_terminal = not self.is_terminal + if self.no_color and color_system: + buffer = Segment.remove_color(buffer) + for text, style, control in buffer: + if style: + append( + style.render( + text, + color_system=color_system, + legacy_windows=legacy_windows, + ) + ) + elif not (not_terminal and control): + append(text) + + rendered = "".join(output) + return rendered + + def input( + self, + prompt: TextType = "", + *, + markup: bool = True, + emoji: bool = True, + password: bool = False, + stream: Optional[TextIO] = None, + ) -> str: + """Displays a prompt and waits for input from the user. The prompt may contain color / style. + + It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded. + + Args: + prompt (Union[str, Text]): Text to render in the prompt. + markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True. + emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True. + password: (bool, optional): Hide typed text. Defaults to False. + stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None. + + Returns: + str: Text read from stdin. + """ + if prompt: + self.print(prompt, markup=markup, emoji=emoji, end="") + if password: + result = getpass("", stream=stream) + else: + if stream: + result = stream.readline() + else: + result = input() + return result + + def export_text(self, *, clear: bool = True, styles: bool = False) -> str: + """Generate text from console contents (requires record=True argument in constructor). + + Args: + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. + styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text. + Defaults to ``False``. + + Returns: + str: String containing console contents. + + """ + assert ( + self.record + ), "To export console contents set record=True in the constructor or instance" + + with self._record_buffer_lock: + if styles: + text = "".join( + (style.render(text) if style else text) + for text, style, _ in self._record_buffer + ) + else: + text = "".join( + segment.text + for segment in self._record_buffer + if not segment.control + ) + if clear: + del self._record_buffer[:] + return text + + def save_text(self, path: str, *, clear: bool = True, styles: bool = False) -> None: + """Generate text from console and save to a given location (requires record=True argument in constructor). + + Args: + path (str): Path to write text files. + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. + styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text. + Defaults to ``False``. + + """ + text = self.export_text(clear=clear, styles=styles) + with open(path, "w", encoding="utf-8") as write_file: + write_file.write(text) + + def export_html( + self, + *, + theme: Optional[TerminalTheme] = None, + clear: bool = True, + code_format: Optional[str] = None, + inline_styles: bool = False, + ) -> str: + """Generate HTML from console contents (requires record=True argument in constructor). + + Args: + theme (TerminalTheme, optional): TerminalTheme object containing console colors. + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. + code_format (str, optional): Format string to render HTML. In addition to '{foreground}', + '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. + inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files + larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. + Defaults to False. + + Returns: + str: String containing console contents as HTML. + """ + assert ( + self.record + ), "To export console contents set record=True in the constructor or instance" + fragments: List[str] = [] + append = fragments.append + _theme = theme or DEFAULT_TERMINAL_THEME + stylesheet = "" + + render_code_format = CONSOLE_HTML_FORMAT if code_format is None else code_format + + with self._record_buffer_lock: + if inline_styles: + for text, style, _ in Segment.filter_control( + Segment.simplify(self._record_buffer) + ): + text = escape(text) + if style: + rule = style.get_html_style(_theme) + if style.link: + text = f'
{text}' + text = f'{text}' if rule else text + append(text) + else: + styles: Dict[str, int] = {} + for text, style, _ in Segment.filter_control( + Segment.simplify(self._record_buffer) + ): + text = escape(text) + if style: + rule = style.get_html_style(_theme) + style_number = styles.setdefault(rule, len(styles) + 1) + if style.link: + text = f'{text}' + else: + text = f'{text}' + append(text) + stylesheet_rules: List[str] = [] + stylesheet_append = stylesheet_rules.append + for style_rule, style_number in styles.items(): + if style_rule: + stylesheet_append(f".r{style_number} {{{style_rule}}}") + stylesheet = "\n".join(stylesheet_rules) + + rendered_code = render_code_format.format( + code="".join(fragments), + stylesheet=stylesheet, + foreground=_theme.foreground_color.hex, + background=_theme.background_color.hex, + ) + if clear: + del self._record_buffer[:] + return rendered_code + + def save_html( + self, + path: str, + *, + theme: Optional[TerminalTheme] = None, + clear: bool = True, + code_format: str = CONSOLE_HTML_FORMAT, + inline_styles: bool = False, + ) -> None: + """Generate HTML from console contents and write to a file (requires record=True argument in constructor). + + Args: + path (str): Path to write html file. + theme (TerminalTheme, optional): TerminalTheme object containing console colors. + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. + code_format (str, optional): Format string to render HTML. In addition to '{foreground}', + '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. + inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files + larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. + Defaults to False. + + """ + html = self.export_html( + theme=theme, + clear=clear, + code_format=code_format, + inline_styles=inline_styles, + ) + with open(path, "w", encoding="utf-8") as write_file: + write_file.write(html) + + def export_svg( + self, + *, + title: str = "Rich", + theme: Optional[TerminalTheme] = None, + clear: bool = True, + code_format: str = CONSOLE_SVG_FORMAT, + font_aspect_ratio: float = 0.61, + unique_id: Optional[str] = None, + ) -> str: + """ + Generate an SVG from the console contents (requires record=True in Console constructor). + + Args: + title (str, optional): The title of the tab in the output image + theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True`` + code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables + into the string in order to form the final SVG output. The default template used and the variables + injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable. + font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format`` + string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font). + If you aren't specifying a different font inside ``code_format``, you probably don't need this. + unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node + ids). If not set, this defaults to a computed value based on the recorded content. + """ + + from pip._vendor.rich.cells import cell_len + + style_cache: Dict[Style, str] = {} + + def get_svg_style(style: Style) -> str: + """Convert a Style to CSS rules for SVG.""" + if style in style_cache: + return style_cache[style] + css_rules = [] + color = ( + _theme.foreground_color + if (style.color is None or style.color.is_default) + else style.color.get_truecolor(_theme) + ) + bgcolor = ( + _theme.background_color + if (style.bgcolor is None or style.bgcolor.is_default) + else style.bgcolor.get_truecolor(_theme) + ) + if style.reverse: + color, bgcolor = bgcolor, color + if style.dim: + color = blend_rgb(color, bgcolor, 0.4) + css_rules.append(f"fill: {color.hex}") + if style.bold: + css_rules.append("font-weight: bold") + if style.italic: + css_rules.append("font-style: italic;") + if style.underline: + css_rules.append("text-decoration: underline;") + if style.strike: + css_rules.append("text-decoration: line-through;") + + css = ";".join(css_rules) + style_cache[style] = css + return css + + _theme = theme or SVG_EXPORT_THEME + + width = self.width + char_height = 20 + char_width = char_height * font_aspect_ratio + line_height = char_height * 1.22 + + margin_top = 1 + margin_right = 1 + margin_bottom = 1 + margin_left = 1 + + padding_top = 40 + padding_right = 8 + padding_bottom = 8 + padding_left = 8 + + padding_width = padding_left + padding_right + padding_height = padding_top + padding_bottom + margin_width = margin_left + margin_right + margin_height = margin_top + margin_bottom + + text_backgrounds: List[str] = [] + text_group: List[str] = [] + classes: Dict[str, int] = {} + style_no = 1 + + def escape_text(text: str) -> str: + """HTML escape text and replace spaces with nbsp.""" + return escape(text).replace(" ", " ") + + def make_tag( + name: str, content: Optional[str] = None, **attribs: object + ) -> str: + """Make a tag from name, content, and attributes.""" + + def stringify(value: object) -> str: + if isinstance(value, (float)): + return format(value, "g") + return str(value) + + tag_attribs = " ".join( + f'{k.lstrip("_").replace("_", "-")}="{stringify(v)}"' + for k, v in attribs.items() + ) + return ( + f"<{name} {tag_attribs}>{content}" + if content + else f"<{name} {tag_attribs}/>" + ) + + with self._record_buffer_lock: + segments = list(Segment.filter_control(self._record_buffer)) + if clear: + self._record_buffer.clear() + + if unique_id is None: + unique_id = "terminal-" + str( + zlib.adler32( + ("".join(repr(segment) for segment in segments)).encode( + "utf-8", + "ignore", + ) + + title.encode("utf-8", "ignore") + ) + ) + y = 0 + for y, line in enumerate(Segment.split_and_crop_lines(segments, length=width)): + x = 0 + for text, style, _control in line: + style = style or Style() + rules = get_svg_style(style) + if rules not in classes: + classes[rules] = style_no + style_no += 1 + class_name = f"r{classes[rules]}" + + if style.reverse: + has_background = True + background = ( + _theme.foreground_color.hex + if style.color is None + else style.color.get_truecolor(_theme).hex + ) + else: + bgcolor = style.bgcolor + has_background = bgcolor is not None and not bgcolor.is_default + background = ( + _theme.background_color.hex + if style.bgcolor is None + else style.bgcolor.get_truecolor(_theme).hex + ) + + text_length = cell_len(text) + if has_background: + text_backgrounds.append( + make_tag( + "rect", + fill=background, + x=x * char_width, + y=y * line_height + 1.5, + width=char_width * text_length, + height=line_height + 0.25, + shape_rendering="crispEdges", + ) + ) + + if text != " " * len(text): + text_group.append( + make_tag( + "text", + escape_text(text), + _class=f"{unique_id}-{class_name}", + x=x * char_width, + y=y * line_height + char_height, + textLength=char_width * len(text), + clip_path=f"url(#{unique_id}-line-{y})", + ) + ) + x += cell_len(text) + + line_offsets = [line_no * line_height + 1.5 for line_no in range(y)] + lines = "\n".join( + f""" + {make_tag("rect", x=0, y=offset, width=char_width * width, height=line_height + 0.25)} + """ + for line_no, offset in enumerate(line_offsets) + ) + + styles = "\n".join( + f".{unique_id}-r{rule_no} {{ {css} }}" for css, rule_no in classes.items() + ) + backgrounds = "".join(text_backgrounds) + matrix = "".join(text_group) + + terminal_width = ceil(width * char_width + padding_width) + terminal_height = (y + 1) * line_height + padding_height + chrome = make_tag( + "rect", + fill=_theme.background_color.hex, + stroke="rgba(255,255,255,0.35)", + stroke_width="1", + x=margin_left, + y=margin_top, + width=terminal_width, + height=terminal_height, + rx=8, + ) + + title_color = _theme.foreground_color.hex + if title: + chrome += make_tag( + "text", + escape_text(title), + _class=f"{unique_id}-title", + fill=title_color, + text_anchor="middle", + x=terminal_width // 2, + y=margin_top + char_height + 6, + ) + chrome += f""" + + + + + + """ + + svg = code_format.format( + unique_id=unique_id, + char_width=char_width, + char_height=char_height, + line_height=line_height, + terminal_width=char_width * width - 1, + terminal_height=(y + 1) * line_height - 1, + width=terminal_width + margin_width, + height=terminal_height + margin_height, + terminal_x=margin_left + padding_left, + terminal_y=margin_top + padding_top, + styles=styles, + chrome=chrome, + backgrounds=backgrounds, + matrix=matrix, + lines=lines, + ) + return svg + + def save_svg( + self, + path: str, + *, + title: str = "Rich", + theme: Optional[TerminalTheme] = None, + clear: bool = True, + code_format: str = CONSOLE_SVG_FORMAT, + font_aspect_ratio: float = 0.61, + unique_id: Optional[str] = None, + ) -> None: + """Generate an SVG file from the console contents (requires record=True in Console constructor). + + Args: + path (str): The path to write the SVG to. + title (str, optional): The title of the tab in the output image + theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal + clear (bool, optional): Clear record buffer after exporting. Defaults to ``True`` + code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables + into the string in order to form the final SVG output. The default template used and the variables + injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable. + font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format`` + string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font). + If you aren't specifying a different font inside ``code_format``, you probably don't need this. + unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node + ids). If not set, this defaults to a computed value based on the recorded content. + """ + svg = self.export_svg( + title=title, + theme=theme, + clear=clear, + code_format=code_format, + font_aspect_ratio=font_aspect_ratio, + unique_id=unique_id, + ) + with open(path, "w", encoding="utf-8") as write_file: + write_file.write(svg) + + +def _svg_hash(svg_main_code: str) -> str: + """Returns a unique hash for the given SVG main code. + + Args: + svg_main_code (str): The content we're going to inject in the SVG envelope. + + Returns: + str: a hash of the given content + """ + return str(zlib.adler32(svg_main_code.encode())) + + +if __name__ == "__main__": # pragma: no cover + console = Console(record=True) + + console.log( + "JSONRPC [i]request[/i]", + 5, + 1.3, + True, + False, + None, + { + "jsonrpc": "2.0", + "method": "subtract", + "params": {"minuend": 42, "subtrahend": 23}, + "id": 3, + }, + ) + + console.log("Hello, World!", "{'a': 1}", repr(console)) + + console.print( + { + "name": None, + "empty": [], + "quiz": { + "sport": { + "answered": True, + "q1": { + "question": "Which one is correct team name in NBA?", + "options": [ + "New York Bulls", + "Los Angeles Kings", + "Golden State Warriors", + "Huston Rocket", + ], + "answer": "Huston Rocket", + }, + }, + "maths": { + "answered": False, + "q1": { + "question": "5 + 7 = ?", + "options": [10, 11, 12, 13], + "answer": 12, + }, + "q2": { + "question": "12 - 8 = ?", + "options": [1, 2, 3, 4], + "answer": 4, + }, + }, + }, + } + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py new file mode 100644 index 0000000000000000000000000000000000000000..65fdf56342e8b5b8e181914881025231684e1871 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py @@ -0,0 +1,37 @@ +from typing import Optional, TYPE_CHECKING + +from .jupyter import JupyterMixin +from .measure import Measurement + +if TYPE_CHECKING: + from .console import Console, ConsoleOptions, RenderableType, RenderResult + + +class Constrain(JupyterMixin): + """Constrain the width of a renderable to a given number of characters. + + Args: + renderable (RenderableType): A renderable object. + width (int, optional): The maximum width (in characters) to render. Defaults to 80. + """ + + def __init__(self, renderable: "RenderableType", width: Optional[int] = 80) -> None: + self.renderable = renderable + self.width = width + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + if self.width is None: + yield self.renderable + else: + child_options = options.update_width(min(self.width, options.max_width)) + yield from console.render(self.renderable, child_options) + + def __rich_measure__( + self, console: "Console", options: "ConsoleOptions" + ) -> "Measurement": + if self.width is not None: + options = options.update_width(self.width) + measurement = Measurement.get(console, options, self.renderable) + return measurement diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/containers.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/containers.py new file mode 100644 index 0000000000000000000000000000000000000000..901ff8ba6ea0836481a015ed5c627889cc416c03 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/containers.py @@ -0,0 +1,167 @@ +from itertools import zip_longest +from typing import ( + TYPE_CHECKING, + Iterable, + Iterator, + List, + Optional, + TypeVar, + Union, + overload, +) + +if TYPE_CHECKING: + from .console import ( + Console, + ConsoleOptions, + JustifyMethod, + OverflowMethod, + RenderResult, + RenderableType, + ) + from .text import Text + +from .cells import cell_len +from .measure import Measurement + +T = TypeVar("T") + + +class Renderables: + """A list subclass which renders its contents to the console.""" + + def __init__( + self, renderables: Optional[Iterable["RenderableType"]] = None + ) -> None: + self._renderables: List["RenderableType"] = ( + list(renderables) if renderables is not None else [] + ) + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + """Console render method to insert line-breaks.""" + yield from self._renderables + + def __rich_measure__( + self, console: "Console", options: "ConsoleOptions" + ) -> "Measurement": + dimensions = [ + Measurement.get(console, options, renderable) + for renderable in self._renderables + ] + if not dimensions: + return Measurement(1, 1) + _min = max(dimension.minimum for dimension in dimensions) + _max = max(dimension.maximum for dimension in dimensions) + return Measurement(_min, _max) + + def append(self, renderable: "RenderableType") -> None: + self._renderables.append(renderable) + + def __iter__(self) -> Iterable["RenderableType"]: + return iter(self._renderables) + + +class Lines: + """A list subclass which can render to the console.""" + + def __init__(self, lines: Iterable["Text"] = ()) -> None: + self._lines: List["Text"] = list(lines) + + def __repr__(self) -> str: + return f"Lines({self._lines!r})" + + def __iter__(self) -> Iterator["Text"]: + return iter(self._lines) + + @overload + def __getitem__(self, index: int) -> "Text": + ... + + @overload + def __getitem__(self, index: slice) -> List["Text"]: + ... + + def __getitem__(self, index: Union[slice, int]) -> Union["Text", List["Text"]]: + return self._lines[index] + + def __setitem__(self, index: int, value: "Text") -> "Lines": + self._lines[index] = value + return self + + def __len__(self) -> int: + return self._lines.__len__() + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + """Console render method to insert line-breaks.""" + yield from self._lines + + def append(self, line: "Text") -> None: + self._lines.append(line) + + def extend(self, lines: Iterable["Text"]) -> None: + self._lines.extend(lines) + + def pop(self, index: int = -1) -> "Text": + return self._lines.pop(index) + + def justify( + self, + console: "Console", + width: int, + justify: "JustifyMethod" = "left", + overflow: "OverflowMethod" = "fold", + ) -> None: + """Justify and overflow text to a given width. + + Args: + console (Console): Console instance. + width (int): Number of cells available per line. + justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left". + overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold". + + """ + from .text import Text + + if justify == "left": + for line in self._lines: + line.truncate(width, overflow=overflow, pad=True) + elif justify == "center": + for line in self._lines: + line.rstrip() + line.truncate(width, overflow=overflow) + line.pad_left((width - cell_len(line.plain)) // 2) + line.pad_right(width - cell_len(line.plain)) + elif justify == "right": + for line in self._lines: + line.rstrip() + line.truncate(width, overflow=overflow) + line.pad_left(width - cell_len(line.plain)) + elif justify == "full": + for line_index, line in enumerate(self._lines): + if line_index == len(self._lines) - 1: + break + words = line.split(" ") + words_size = sum(cell_len(word.plain) for word in words) + num_spaces = len(words) - 1 + spaces = [1 for _ in range(num_spaces)] + index = 0 + if spaces: + while words_size + num_spaces < width: + spaces[len(spaces) - index - 1] += 1 + num_spaces += 1 + index = (index + 1) % len(spaces) + tokens: List[Text] = [] + for index, (word, next_word) in enumerate( + zip_longest(words, words[1:]) + ): + tokens.append(word) + if index < len(spaces): + style = word.get_style_at_offset(console, -1) + next_style = next_word.get_style_at_offset(console, 0) + space_style = style if style == next_style else line.style + tokens.append(Text(" " * spaces[index], style=space_style)) + self[line_index] = Text("").join(tokens) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/control.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/control.py new file mode 100644 index 0000000000000000000000000000000000000000..88fcb9295164f4e18827ef61fff6723e94ef7381 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/control.py @@ -0,0 +1,225 @@ +import sys +import time +from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, Union + +if sys.version_info >= (3, 8): + from typing import Final +else: + from pip._vendor.typing_extensions import Final # pragma: no cover + +from .segment import ControlCode, ControlType, Segment + +if TYPE_CHECKING: + from .console import Console, ConsoleOptions, RenderResult + +STRIP_CONTROL_CODES: Final = [ + 7, # Bell + 8, # Backspace + 11, # Vertical tab + 12, # Form feed + 13, # Carriage return +] +_CONTROL_STRIP_TRANSLATE: Final = { + _codepoint: None for _codepoint in STRIP_CONTROL_CODES +} + +CONTROL_ESCAPE: Final = { + 7: "\\a", + 8: "\\b", + 11: "\\v", + 12: "\\f", + 13: "\\r", +} + +CONTROL_CODES_FORMAT: Dict[int, Callable[..., str]] = { + ControlType.BELL: lambda: "\x07", + ControlType.CARRIAGE_RETURN: lambda: "\r", + ControlType.HOME: lambda: "\x1b[H", + ControlType.CLEAR: lambda: "\x1b[2J", + ControlType.ENABLE_ALT_SCREEN: lambda: "\x1b[?1049h", + ControlType.DISABLE_ALT_SCREEN: lambda: "\x1b[?1049l", + ControlType.SHOW_CURSOR: lambda: "\x1b[?25h", + ControlType.HIDE_CURSOR: lambda: "\x1b[?25l", + ControlType.CURSOR_UP: lambda param: f"\x1b[{param}A", + ControlType.CURSOR_DOWN: lambda param: f"\x1b[{param}B", + ControlType.CURSOR_FORWARD: lambda param: f"\x1b[{param}C", + ControlType.CURSOR_BACKWARD: lambda param: f"\x1b[{param}D", + ControlType.CURSOR_MOVE_TO_COLUMN: lambda param: f"\x1b[{param+1}G", + ControlType.ERASE_IN_LINE: lambda param: f"\x1b[{param}K", + ControlType.CURSOR_MOVE_TO: lambda x, y: f"\x1b[{y+1};{x+1}H", + ControlType.SET_WINDOW_TITLE: lambda title: f"\x1b]0;{title}\x07", +} + + +class Control: + """A renderable that inserts a control code (non printable but may move cursor). + + Args: + *codes (str): Positional arguments are either a :class:`~rich.segment.ControlType` enum or a + tuple of ControlType and an integer parameter + """ + + __slots__ = ["segment"] + + def __init__(self, *codes: Union[ControlType, ControlCode]) -> None: + control_codes: List[ControlCode] = [ + (code,) if isinstance(code, ControlType) else code for code in codes + ] + _format_map = CONTROL_CODES_FORMAT + rendered_codes = "".join( + _format_map[code](*parameters) for code, *parameters in control_codes + ) + self.segment = Segment(rendered_codes, None, control_codes) + + @classmethod + def bell(cls) -> "Control": + """Ring the 'bell'.""" + return cls(ControlType.BELL) + + @classmethod + def home(cls) -> "Control": + """Move cursor to 'home' position.""" + return cls(ControlType.HOME) + + @classmethod + def move(cls, x: int = 0, y: int = 0) -> "Control": + """Move cursor relative to current position. + + Args: + x (int): X offset. + y (int): Y offset. + + Returns: + ~Control: Control object. + + """ + + def get_codes() -> Iterable[ControlCode]: + control = ControlType + if x: + yield ( + control.CURSOR_FORWARD if x > 0 else control.CURSOR_BACKWARD, + abs(x), + ) + if y: + yield ( + control.CURSOR_DOWN if y > 0 else control.CURSOR_UP, + abs(y), + ) + + control = cls(*get_codes()) + return control + + @classmethod + def move_to_column(cls, x: int, y: int = 0) -> "Control": + """Move to the given column, optionally add offset to row. + + Returns: + x (int): absolute x (column) + y (int): optional y offset (row) + + Returns: + ~Control: Control object. + """ + + return ( + cls( + (ControlType.CURSOR_MOVE_TO_COLUMN, x), + ( + ControlType.CURSOR_DOWN if y > 0 else ControlType.CURSOR_UP, + abs(y), + ), + ) + if y + else cls((ControlType.CURSOR_MOVE_TO_COLUMN, x)) + ) + + @classmethod + def move_to(cls, x: int, y: int) -> "Control": + """Move cursor to absolute position. + + Args: + x (int): x offset (column) + y (int): y offset (row) + + Returns: + ~Control: Control object. + """ + return cls((ControlType.CURSOR_MOVE_TO, x, y)) + + @classmethod + def clear(cls) -> "Control": + """Clear the screen.""" + return cls(ControlType.CLEAR) + + @classmethod + def show_cursor(cls, show: bool) -> "Control": + """Show or hide the cursor.""" + return cls(ControlType.SHOW_CURSOR if show else ControlType.HIDE_CURSOR) + + @classmethod + def alt_screen(cls, enable: bool) -> "Control": + """Enable or disable alt screen.""" + if enable: + return cls(ControlType.ENABLE_ALT_SCREEN, ControlType.HOME) + else: + return cls(ControlType.DISABLE_ALT_SCREEN) + + @classmethod + def title(cls, title: str) -> "Control": + """Set the terminal window title + + Args: + title (str): The new terminal window title + """ + return cls((ControlType.SET_WINDOW_TITLE, title)) + + def __str__(self) -> str: + return self.segment.text + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + if self.segment.text: + yield self.segment + + +def strip_control_codes( + text: str, _translate_table: Dict[int, None] = _CONTROL_STRIP_TRANSLATE +) -> str: + """Remove control codes from text. + + Args: + text (str): A string possibly contain control codes. + + Returns: + str: String with control codes removed. + """ + return text.translate(_translate_table) + + +def escape_control_codes( + text: str, + _translate_table: Dict[int, str] = CONTROL_ESCAPE, +) -> str: + """Replace control codes with their "escaped" equivalent in the given text. + (e.g. "\b" becomes "\\b") + + Args: + text (str): A string possibly containing control codes. + + Returns: + str: String with control codes replaced with their escaped version. + """ + return text.translate(_translate_table) + + +if __name__ == "__main__": # pragma: no cover + from pip._vendor.rich.console import Console + + console = Console() + console.print("Look at the title of your terminal window ^") + # console.print(Control((ControlType.SET_WINDOW_TITLE, "Hello, world!"))) + for i in range(10): + console.set_window_title("🚀 Loading" + "." * i) + time.sleep(0.5) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py new file mode 100644 index 0000000000000000000000000000000000000000..6c0d73231d8a04bcd0f39ca1cfd70d8adc3bff3e --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py @@ -0,0 +1,191 @@ +from typing import Dict + +from .style import Style + +DEFAULT_STYLES: Dict[str, Style] = { + "none": Style.null(), + "reset": Style( + color="default", + bgcolor="default", + dim=False, + bold=False, + italic=False, + underline=False, + blink=False, + blink2=False, + reverse=False, + conceal=False, + strike=False, + ), + "dim": Style(dim=True), + "bright": Style(dim=False), + "bold": Style(bold=True), + "strong": Style(bold=True), + "code": Style(reverse=True, bold=True), + "italic": Style(italic=True), + "emphasize": Style(italic=True), + "underline": Style(underline=True), + "blink": Style(blink=True), + "blink2": Style(blink2=True), + "reverse": Style(reverse=True), + "strike": Style(strike=True), + "black": Style(color="black"), + "red": Style(color="red"), + "green": Style(color="green"), + "yellow": Style(color="yellow"), + "magenta": Style(color="magenta"), + "cyan": Style(color="cyan"), + "white": Style(color="white"), + "inspect.attr": Style(color="yellow", italic=True), + "inspect.attr.dunder": Style(color="yellow", italic=True, dim=True), + "inspect.callable": Style(bold=True, color="red"), + "inspect.async_def": Style(italic=True, color="bright_cyan"), + "inspect.def": Style(italic=True, color="bright_cyan"), + "inspect.class": Style(italic=True, color="bright_cyan"), + "inspect.error": Style(bold=True, color="red"), + "inspect.equals": Style(), + "inspect.help": Style(color="cyan"), + "inspect.doc": Style(dim=True), + "inspect.value.border": Style(color="green"), + "live.ellipsis": Style(bold=True, color="red"), + "layout.tree.row": Style(dim=False, color="red"), + "layout.tree.column": Style(dim=False, color="blue"), + "logging.keyword": Style(bold=True, color="yellow"), + "logging.level.notset": Style(dim=True), + "logging.level.debug": Style(color="green"), + "logging.level.info": Style(color="blue"), + "logging.level.warning": Style(color="yellow"), + "logging.level.error": Style(color="red", bold=True), + "logging.level.critical": Style(color="red", bold=True, reverse=True), + "log.level": Style.null(), + "log.time": Style(color="cyan", dim=True), + "log.message": Style.null(), + "log.path": Style(dim=True), + "repr.ellipsis": Style(color="yellow"), + "repr.indent": Style(color="green", dim=True), + "repr.error": Style(color="red", bold=True), + "repr.str": Style(color="green", italic=False, bold=False), + "repr.brace": Style(bold=True), + "repr.comma": Style(bold=True), + "repr.ipv4": Style(bold=True, color="bright_green"), + "repr.ipv6": Style(bold=True, color="bright_green"), + "repr.eui48": Style(bold=True, color="bright_green"), + "repr.eui64": Style(bold=True, color="bright_green"), + "repr.tag_start": Style(bold=True), + "repr.tag_name": Style(color="bright_magenta", bold=True), + "repr.tag_contents": Style(color="default"), + "repr.tag_end": Style(bold=True), + "repr.attrib_name": Style(color="yellow", italic=False), + "repr.attrib_equal": Style(bold=True), + "repr.attrib_value": Style(color="magenta", italic=False), + "repr.number": Style(color="cyan", bold=True, italic=False), + "repr.number_complex": Style(color="cyan", bold=True, italic=False), # same + "repr.bool_true": Style(color="bright_green", italic=True), + "repr.bool_false": Style(color="bright_red", italic=True), + "repr.none": Style(color="magenta", italic=True), + "repr.url": Style(underline=True, color="bright_blue", italic=False, bold=False), + "repr.uuid": Style(color="bright_yellow", bold=False), + "repr.call": Style(color="magenta", bold=True), + "repr.path": Style(color="magenta"), + "repr.filename": Style(color="bright_magenta"), + "rule.line": Style(color="bright_green"), + "rule.text": Style.null(), + "json.brace": Style(bold=True), + "json.bool_true": Style(color="bright_green", italic=True), + "json.bool_false": Style(color="bright_red", italic=True), + "json.null": Style(color="magenta", italic=True), + "json.number": Style(color="cyan", bold=True, italic=False), + "json.str": Style(color="green", italic=False, bold=False), + "json.key": Style(color="blue", bold=True), + "prompt": Style.null(), + "prompt.choices": Style(color="magenta", bold=True), + "prompt.default": Style(color="cyan", bold=True), + "prompt.invalid": Style(color="red"), + "prompt.invalid.choice": Style(color="red"), + "pretty": Style.null(), + "scope.border": Style(color="blue"), + "scope.key": Style(color="yellow", italic=True), + "scope.key.special": Style(color="yellow", italic=True, dim=True), + "scope.equals": Style(color="red"), + "table.header": Style(bold=True), + "table.footer": Style(bold=True), + "table.cell": Style.null(), + "table.title": Style(italic=True), + "table.caption": Style(italic=True, dim=True), + "traceback.error": Style(color="red", italic=True), + "traceback.border.syntax_error": Style(color="bright_red"), + "traceback.border": Style(color="red"), + "traceback.text": Style.null(), + "traceback.title": Style(color="red", bold=True), + "traceback.exc_type": Style(color="bright_red", bold=True), + "traceback.exc_value": Style.null(), + "traceback.offset": Style(color="bright_red", bold=True), + "traceback.error_range": Style(underline=True, bold=True, dim=False), + "bar.back": Style(color="grey23"), + "bar.complete": Style(color="rgb(249,38,114)"), + "bar.finished": Style(color="rgb(114,156,31)"), + "bar.pulse": Style(color="rgb(249,38,114)"), + "progress.description": Style.null(), + "progress.filesize": Style(color="green"), + "progress.filesize.total": Style(color="green"), + "progress.download": Style(color="green"), + "progress.elapsed": Style(color="yellow"), + "progress.percentage": Style(color="magenta"), + "progress.remaining": Style(color="cyan"), + "progress.data.speed": Style(color="red"), + "progress.spinner": Style(color="green"), + "status.spinner": Style(color="green"), + "tree": Style(), + "tree.line": Style(), + "markdown.paragraph": Style(), + "markdown.text": Style(), + "markdown.em": Style(italic=True), + "markdown.emph": Style(italic=True), # For commonmark backwards compatibility + "markdown.strong": Style(bold=True), + "markdown.code": Style(bold=True, color="cyan", bgcolor="black"), + "markdown.code_block": Style(color="cyan", bgcolor="black"), + "markdown.block_quote": Style(color="magenta"), + "markdown.list": Style(color="cyan"), + "markdown.item": Style(), + "markdown.item.bullet": Style(color="yellow", bold=True), + "markdown.item.number": Style(color="yellow", bold=True), + "markdown.hr": Style(color="yellow"), + "markdown.h1.border": Style(), + "markdown.h1": Style(bold=True), + "markdown.h2": Style(bold=True, underline=True), + "markdown.h3": Style(bold=True), + "markdown.h4": Style(bold=True, dim=True), + "markdown.h5": Style(underline=True), + "markdown.h6": Style(italic=True), + "markdown.h7": Style(italic=True, dim=True), + "markdown.link": Style(color="bright_blue"), + "markdown.link_url": Style(color="blue", underline=True), + "markdown.s": Style(strike=True), + "iso8601.date": Style(color="blue"), + "iso8601.time": Style(color="magenta"), + "iso8601.timezone": Style(color="yellow"), +} + + +if __name__ == "__main__": # pragma: no cover + import argparse + import io + + from pip._vendor.rich.console import Console + from pip._vendor.rich.table import Table + from pip._vendor.rich.text import Text + + parser = argparse.ArgumentParser() + parser.add_argument("--html", action="store_true", help="Export as HTML table") + args = parser.parse_args() + html: bool = args.html + console = Console(record=True, width=70, file=io.StringIO()) if html else Console() + + table = Table("Name", "Styling") + + for style_name, style in DEFAULT_STYLES.items(): + table.add_row(Text(style_name, style=style), str(style)) + + console.print(table) + if html: + print(console.export_html(inline_styles=True)) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py new file mode 100644 index 0000000000000000000000000000000000000000..ad36183898eddb11e33ccb7623c0291ccc0f091d --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py @@ -0,0 +1,37 @@ +import os +import platform + +from pip._vendor.rich import inspect +from pip._vendor.rich.console import Console, get_windows_console_features +from pip._vendor.rich.panel import Panel +from pip._vendor.rich.pretty import Pretty + + +def report() -> None: # pragma: no cover + """Print a report to the terminal with debugging information""" + console = Console() + inspect(console) + features = get_windows_console_features() + inspect(features) + + env_names = ( + "TERM", + "COLORTERM", + "CLICOLOR", + "NO_COLOR", + "TERM_PROGRAM", + "COLUMNS", + "LINES", + "JUPYTER_COLUMNS", + "JUPYTER_LINES", + "JPY_PARENT_PID", + "VSCODE_VERBOSE_LOGGING", + ) + env = {name: os.getenv(name) for name in env_names} + console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables")) + + console.print(f'platform="{platform.system()}"') + + +if __name__ == "__main__": # pragma: no cover + report() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py new file mode 100644 index 0000000000000000000000000000000000000000..791f0465de136088e33cdc6ef5696590df1e4f86 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py @@ -0,0 +1,96 @@ +import sys +from typing import TYPE_CHECKING, Optional, Union + +from .jupyter import JupyterMixin +from .segment import Segment +from .style import Style +from ._emoji_codes import EMOJI +from ._emoji_replace import _emoji_replace + +if sys.version_info >= (3, 8): + from typing import Literal +else: + from pip._vendor.typing_extensions import Literal # pragma: no cover + + +if TYPE_CHECKING: + from .console import Console, ConsoleOptions, RenderResult + + +EmojiVariant = Literal["emoji", "text"] + + +class NoEmoji(Exception): + """No emoji by that name.""" + + +class Emoji(JupyterMixin): + __slots__ = ["name", "style", "_char", "variant"] + + VARIANTS = {"text": "\uFE0E", "emoji": "\uFE0F"} + + def __init__( + self, + name: str, + style: Union[str, Style] = "none", + variant: Optional[EmojiVariant] = None, + ) -> None: + """A single emoji character. + + Args: + name (str): Name of emoji. + style (Union[str, Style], optional): Optional style. Defaults to None. + + Raises: + NoEmoji: If the emoji doesn't exist. + """ + self.name = name + self.style = style + self.variant = variant + try: + self._char = EMOJI[name] + except KeyError: + raise NoEmoji(f"No emoji called {name!r}") + if variant is not None: + self._char += self.VARIANTS.get(variant, "") + + @classmethod + def replace(cls, text: str) -> str: + """Replace emoji markup with corresponding unicode characters. + + Args: + text (str): A string with emojis codes, e.g. "Hello :smiley:!" + + Returns: + str: A string with emoji codes replaces with actual emoji. + """ + return _emoji_replace(text) + + def __repr__(self) -> str: + return f"" + + def __str__(self) -> str: + return self._char + + def __rich_console__( + self, console: "Console", options: "ConsoleOptions" + ) -> "RenderResult": + yield Segment(self._char, console.get_style(self.style)) + + +if __name__ == "__main__": # pragma: no cover + import sys + + from pip._vendor.rich.columns import Columns + from pip._vendor.rich.console import Console + + console = Console(record=True) + + columns = Columns( + (f":{name}: {name}" for name in sorted(EMOJI.keys()) if "\u200D" not in name), + column_first=True, + ) + + console.print(columns) + if len(sys.argv) > 1: + console.save_html(sys.argv[1]) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/errors.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/errors.py new file mode 100644 index 0000000000000000000000000000000000000000..0bcbe53ef59373c608e62ea285536f8b22b47ecb --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/errors.py @@ -0,0 +1,34 @@ +class ConsoleError(Exception): + """An error in console operation.""" + + +class StyleError(Exception): + """An error in styles.""" + + +class StyleSyntaxError(ConsoleError): + """Style was badly formatted.""" + + +class MissingStyle(StyleError): + """No such style.""" + + +class StyleStackError(ConsoleError): + """Style stack is invalid.""" + + +class NotRenderableError(ConsoleError): + """Object is not renderable.""" + + +class MarkupError(ConsoleError): + """Markup was badly formatted.""" + + +class LiveError(ConsoleError): + """Error related to Live display.""" + + +class NoAltScreen(ConsoleError): + """Alt screen mode was required.""" diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py new file mode 100644 index 0000000000000000000000000000000000000000..4b0b0da6c2a62b2b1468c35ddd69f1bbb9b91aa8 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py @@ -0,0 +1,57 @@ +import io +from typing import IO, TYPE_CHECKING, Any, List + +from .ansi import AnsiDecoder +from .text import Text + +if TYPE_CHECKING: + from .console import Console + + +class FileProxy(io.TextIOBase): + """Wraps a file (e.g. sys.stdout) and redirects writes to a console.""" + + def __init__(self, console: "Console", file: IO[str]) -> None: + self.__console = console + self.__file = file + self.__buffer: List[str] = [] + self.__ansi_decoder = AnsiDecoder() + + @property + def rich_proxied_file(self) -> IO[str]: + """Get proxied file.""" + return self.__file + + def __getattr__(self, name: str) -> Any: + return getattr(self.__file, name) + + def write(self, text: str) -> int: + if not isinstance(text, str): + raise TypeError(f"write() argument must be str, not {type(text).__name__}") + buffer = self.__buffer + lines: List[str] = [] + while text: + line, new_line, text = text.partition("\n") + if new_line: + lines.append("".join(buffer) + line) + buffer.clear() + else: + buffer.append(line) + break + if lines: + console = self.__console + with console: + output = Text("\n").join( + self.__ansi_decoder.decode_line(line) for line in lines + ) + console.print(output) + return len(text) + + def flush(self) -> None: + output = "".join(self.__buffer) + if output: + self.__console.print(output) + del self.__buffer[:] + + def fileno(self) -> int: + return self.__file.fileno() diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py new file mode 100644 index 0000000000000000000000000000000000000000..83bc9118d2bdb8983f863063687c2ea394a9abb1 --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py @@ -0,0 +1,88 @@ +"""Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2 + +The functions declared in this module should cover the different +use cases needed to generate a string representation of a file size +using several different units. Since there are many standards regarding +file size units, three different functions have been implemented. + +See Also: + * `Wikipedia: Binary prefix `_ + +""" + +__all__ = ["decimal"] + +from typing import Iterable, List, Optional, Tuple + + +def _to_str( + size: int, + suffixes: Iterable[str], + base: int, + *, + precision: Optional[int] = 1, + separator: Optional[str] = " ", +) -> str: + if size == 1: + return "1 byte" + elif size < base: + return f"{size:,} bytes" + + for i, suffix in enumerate(suffixes, 2): # noqa: B007 + unit = base**i + if size < unit: + break + return "{:,.{precision}f}{separator}{}".format( + (base * size / unit), + suffix, + precision=precision, + separator=separator, + ) + + +def pick_unit_and_suffix(size: int, suffixes: List[str], base: int) -> Tuple[int, str]: + """Pick a suffix and base for the given size.""" + for i, suffix in enumerate(suffixes): + unit = base**i + if size < unit * base: + break + return unit, suffix + + +def decimal( + size: int, + *, + precision: Optional[int] = 1, + separator: Optional[str] = " ", +) -> str: + """Convert a filesize in to a string (powers of 1000, SI prefixes). + + In this convention, ``1000 B = 1 kB``. + + This is typically the format used to advertise the storage + capacity of USB flash drives and the like (*256 MB* meaning + actually a storage capacity of more than *256 000 000 B*), + or used by **Mac OS X** since v10.6 to report file sizes. + + Arguments: + int (size): A file size. + int (precision): The number of decimal places to include (default = 1). + str (separator): The string to separate the value from the units (default = " "). + + Returns: + `str`: A string containing a abbreviated file size and units. + + Example: + >>> filesize.decimal(30000) + '30.0 kB' + >>> filesize.decimal(30000, precision=2, separator="") + '30.00kB' + + """ + return _to_str( + size, + ("kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"), + 1000, + precision=precision, + separator=separator, + ) diff --git a/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py new file mode 100644 index 0000000000000000000000000000000000000000..e4c462e2b632a268ecfb4772320206b94a3d859c --- /dev/null +++ b/URSA/.venv_ursa/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py @@ -0,0 +1,232 @@ +import re +from abc import ABC, abstractmethod +from typing import List, Union + +from .text import Span, Text + + +def _combine_regex(*regexes: str) -> str: + """Combine a number of regexes in to a single regex. + + Returns: + str: New regex with all regexes ORed together. + """ + return "|".join(regexes) + + +class Highlighter(ABC): + """Abstract base class for highlighters.""" + + def __call__(self, text: Union[str, Text]) -> Text: + """Highlight a str or Text instance. + + Args: + text (Union[str, ~Text]): Text to highlight. + + Raises: + TypeError: If not called with text or str. + + Returns: + Text: A test instance with highlighting applied. + """ + if isinstance(text, str): + highlight_text = Text(text) + elif isinstance(text, Text): + highlight_text = text.copy() + else: + raise TypeError(f"str or Text instance required, not {text!r}") + self.highlight(highlight_text) + return highlight_text + + @abstractmethod + def highlight(self, text: Text) -> None: + """Apply highlighting in place to text. + + Args: + text (~Text): A text object highlight. + """ + + +class NullHighlighter(Highlighter): + """A highlighter object that doesn't highlight. + + May be used to disable highlighting entirely. + + """ + + def highlight(self, text: Text) -> None: + """Nothing to do""" + + +class RegexHighlighter(Highlighter): + """Applies highlighting from a list of regular expressions.""" + + highlights: List[str] = [] + base_style: str = "" + + def highlight(self, text: Text) -> None: + """Highlight :class:`rich.text.Text` using regular expressions. + + Args: + text (~Text): Text to highlighted. + + """ + + highlight_regex = text.highlight_regex + for re_highlight in self.highlights: + highlight_regex(re_highlight, style_prefix=self.base_style) + + +class ReprHighlighter(RegexHighlighter): + """Highlights the text typically produced from ``__repr__`` methods.""" + + base_style = "repr." + highlights = [ + r"(?P<)(?P[-\w.:|]*)(?P[\w\W]*)(?P>)", + r'(?P[\w_]{1,50})=(?P"?[\w_]+"?)?', + r"(?P[][{}()])", + _combine_regex( + r"(?P[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})", + r"(?P([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})", + r"(?P(?:[0-9A-Fa-f]{1,2}-){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){7}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){3}[0-9A-Fa-f]{4})", + r"(?P(?:[0-9A-Fa-f]{1,2}-){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}|(?:[0-9A-Fa-f]{4}\.){2}[0-9A-Fa-f]{4})", + r"(?P[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})", + r"(?P[\w.]*?)\(", + r"\b(?PTrue)\b|\b(?PFalse)\b|\b(?PNone)\b", + r"(?P\.\.\.)", + r"(?P(?(?\B(/[-\w._+]+)*\/)(?P[-\w._+]*)?", + r"(?b?'''.*?(?(file|https|http|ws|wss)://[-0-9a-zA-Z$_+!`(),.?/;:&=%#~@]*)", + ), + ] + + +class JSONHighlighter(RegexHighlighter): + """Highlights JSON""" + + # Captures the start and end of JSON strings, handling escaped quotes + JSON_STR = r"(?b?\".*?(?[\{\[\(\)\]\}])", + r"\b(?Ptrue)\b|\b(?Pfalse)\b|\b(?Pnull)\b", + r"(?P(? None: + super().highlight(text) + + # Additional work to handle highlighting JSON keys + plain = text.plain + append = text.spans.append + whitespace = self.JSON_WHITESPACE + for match in re.finditer(self.JSON_STR, plain): + start, end = match.span() + cursor = end + while cursor < len(plain): + char = plain[cursor] + cursor += 1 + if char == ":": + append(Span(start, end, "json.key")) + elif char in whitespace: + continue + break + + +class ISO8601Highlighter(RegexHighlighter): + """Highlights the ISO8601 date time strings. + Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html + """ + + base_style = "iso8601." + highlights = [ + # + # Dates + # + # Calendar month (e.g. 2008-08). The hyphen is required + r"^(?P[0-9]{4})-(?P1[0-2]|0[1-9])$", + # Calendar date w/o hyphens (e.g. 20080830) + r"^(?P(?P[0-9]{4})(?P1[0-2]|0[1-9])(?P3[01]|0[1-9]|[12][0-9]))$", + # Ordinal date (e.g. 2008-243). The hyphen is optional + r"^(?P(?P[0-9]{4})-?(?P36[0-6]|3[0-5][0-9]|[12][0-9]{2}|0[1-9][0-9]|00[1-9]))$", + # + # Weeks + # + # Week of the year (e.g., 2008-W35). The hyphen is optional + r"^(?P(?P[0-9]{4})-?W(?P5[0-3]|[1-4][0-9]|0[1-9]))$", + # Week date (e.g., 2008-W35-6). The hyphens are optional + r"^(?P(?P[0-9]{4})-?W(?P5[0-3]|[1-4][0-9]|0[1-9])-?(?P[1-7]))$", + # + # Times + # + # Hours and minutes (e.g., 17:21). The colon is optional + r"^(?P

' : '\U0001d4ab', + '\\' : '\U0001d4ac', + '\\' : '\U0000211b', + '\\' : '\U0001d4ae', + '\\' : '\U0001d4af', + '\\' : '\U0001d4b0', + '\\' : '\U0001d4b1', + '\\' : '\U0001d4b2', + '\\' : '\U0001d4b3', + '\\' : '\U0001d4b4', + '\\' : '\U0001d4b5', + '\\' : '\U0001d5ba', + '\\' : '\U0001d5bb', + '\\' : '\U0001d5bc', + '\\' : '\U0001d5bd', + '\\' : '\U0001d5be', + '\\' : '\U0001d5bf', + '\\' : '\U0001d5c0', + '\\' : '\U0001d5c1', + '\\' : '\U0001d5c2', + '\\' : '\U0001d5c3', + '\\' : '\U0001d5c4', + '\\' : '\U0001d5c5', + '\\' : '\U0001d5c6', + '\\' : '\U0001d5c7', + '\\' : '\U0001d5c8', + '\\